From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1mpXo6-0006kf-2u for mharc-grub-devel@gnu.org; Tue, 23 Nov 2021 10:34:07 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48310) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpXo3-0006kX-Jd for grub-devel@gnu.org; Tue, 23 Nov 2021 10:34:04 -0500 Received: from [2607:f8b0:4864:20::102c] (port=51017 helo=mail-pj1-x102c.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mpXo1-0004Qd-I1 for grub-devel@gnu.org; Tue, 23 Nov 2021 10:34:03 -0500 Received: by mail-pj1-x102c.google.com with SMTP id x7so16937703pjn.0 for ; Tue, 23 Nov 2021 07:34:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axtens.net; s=google; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=3pu1o2phbpQGh82XntrqKeMvjTxM33bgEGTewXVwdFk=; b=R2ueQNZ9Zbm6cUbvVql9N6S2z9rPCN8wnsRS6ERpONCvS8PifBQzEwHjdAbf6IhgO9 QBG6xOKGuxJCAa2jJv815Yq88zYZ5DBv6xB5txe8RFkamVEGVjVGVO5P/XO81BeUzhao IBS0EMXHbmaXRCxe5QPa0NswlBKkyVJtehPL4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=3pu1o2phbpQGh82XntrqKeMvjTxM33bgEGTewXVwdFk=; b=Ew9ZIG7PGMrWwfai8zkQqC+JGfnkLS27+fF64IuWij/hcUUYDVniQFWtVbKYeiZ2Cz TypJLBH/jH2tQSKYLVbjGcIekgWrAhS7nScGNBgZt+1OMV0eEOEc/9dP5r2VDeXOmC/l ddwxuS+IpUSxAMS3d1ce5aT4EH4+ZhqpXUlnwa4e4rbzw5EyhCYi2D0W+pveVeQYZP4Y rbst48bWpl710eCTEi+sNXeoMJKnDuPrLUy9jFmK2AVQIgaNZvP0ec9qFBJqKBIanbDR 2Jh95h2u3/0W2HffRMqRLFVQJowc7Xe3aoCEV7yhTdoDOFBxDmapvaIcaGxoSGqNsEmi pNkQ== X-Gm-Message-State: AOAM533KdsKAaKw3dtL6t7IFnfd0mq6d7WtYuehkF176kczb5dUH6Fmu 6XPY9HOTXs3YyUzA4Vv1Wu5YPA== X-Google-Smtp-Source: ABdhPJyPFsfAfnQ2feIsYoi4/PxM691VBc5z2zJNd8HTrTj4qQKWXZOAHWkGqhIRXpfk1tDjeYmC1A== X-Received: by 2002:a17:90b:4a50:: with SMTP id lb16mr4034307pjb.147.1637681639474; Tue, 23 Nov 2021 07:33:59 -0800 (PST) Received: from localhost ([2001:4479:e000:e400:814:a0e8:354:5645]) by smtp.gmail.com with ESMTPSA id t2sm13446442pfd.36.2021.11.23.07.33.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Nov 2021 07:33:59 -0800 (PST) From: Daniel Axtens To: Robbie Harwood , grub-devel@gnu.org Cc: Robbie Harwood Subject: Re: [PATCH] Drop gnulib fix-base64.patch In-Reply-To: <20211028192227.351582-1-rharwood@redhat.com> References: <20211028192227.351582-1-rharwood@redhat.com> Date: Wed, 24 Nov 2021 02:33:55 +1100 Message-ID: <87wnkydgyk.fsf@dja-thinkpad.axtens.net> MIME-Version: 1.0 Content-Type: text/plain X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::102c (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::102c; envelope-from=dja@axtens.net; helo=mail-pj1-x102c.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2021 15:34:04 -0000 Robbie Harwood writes: > Originally added in 9fbdec2f6b4fa8b549daa4d49134d1fe89d95ef9 and > subsequently modified in 552c9fd08122a3036c724ce96dfe68aa2f75705f, > fix-base64.patch handled two problems we have using gnulib, which are > exerciesd by the base64 module but not directly caused by it. > > First, grub2 defines its own bool type, while gnulib expects the > equivalent of stdbool.h to be present. Rather than patching gnulib, > instead use gnulib's stdbool module to provide a bool type if needed. > (Suggested by Simon Josefsson.) > > Second, our config.h doesn't always inherit config-util.h, which is > where gnulib-related options like _GL_ATTRIBUTE_CONST end up. > fix-base64.h worked around this by defining the attribute away, but this > workaround is better placed in config.h itself, not a gnulib patch. > > Signed-off-by: Robbie Harwood > --- > bootstrap.conf | 3 ++- > config.h.in | 3 +++ > grub-core/lib/gnulib-patches/fix-base64.patch | 21 ------------------- > grub-core/lib/posix_wrap/sys/types.h | 7 +++---- > grub-core/lib/xzembed/xz.h | 5 +---- > 5 files changed, 9 insertions(+), 30 deletions(-) > delete mode 100644 grub-core/lib/gnulib-patches/fix-base64.patch > > diff --git a/bootstrap.conf b/bootstrap.conf > index 0dd893c5c..21a8cf15d 100644 > --- a/bootstrap.conf > +++ b/bootstrap.conf > @@ -35,6 +35,7 @@ gnulib_modules=" > realloc-gnu > regex > save-cwd > + stdbool > " > > gnulib_tool_option_extras="\ > @@ -80,7 +81,7 @@ cp -a INSTALL INSTALL.grub > > bootstrap_post_import_hook () { > set -e > - for patchname in fix-base64 fix-null-deref fix-null-state-deref fix-regcomp-uninit-token \ > + for patchname in fix-null-deref fix-null-state-deref fix-regcomp-uninit-token \ > fix-regexec-null-deref fix-uninit-structure fix-unused-value fix-width no-abort; do > patch -d grub-core/lib/gnulib -p2 \ > < "grub-core/lib/gnulib-patches/$patchname.patch" > diff --git a/config.h.in b/config.h.in > index 9e8f9911b..2b65c86c4 100644 > --- a/config.h.in > +++ b/config.h.in > @@ -64,4 +64,7 @@ > > #define _GNU_SOURCE 1 > > +/* For gnulib's base64 code. */ > +#define _GL_ATTRIBUTE_CONST /* empty */ Do we support any compiler so old or configuration so weird that we can't simply use 'const' here? Kind regards, Daniel