9fbdec2f6b
The upcoming support for LUKS2 disc encryption requires us to include a parser for base64-encoded data, as it is used to represent salts and digests. As gnulib already has code to decode such data, we can just add it to the boostrapping configuration in order to make it available in GRUB. The gnulib module makes use of booleans via the <stdbool.h> header. As GRUB does not provide any POSIX wrapper header for this, but instead implements support for bool in <sys/types.h>, we need to patch base64.h to not use <stdbool.h> anymore. We unfortunately cannot include <sys/types.h> instead, as it would then use gnulib's internal header while compiling the gnulib object but our own <sys/types.h> when including it in a GRUB module. Because of this, the patch replaces the include with a direct typedef. A second fix is required to make available _GL_ATTRIBUTE_CONST, which is provided by the configure script. As base64.h does not include <config.h>, it is thus not available and results in a compile error. This is fixed by adding an include of <config-util.h>. Signed-off-by: Patrick Steinhardt <ps@pks.im> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
92 lines
2.1 KiB
Text
92 lines
2.1 KiB
Text
# Bootstrap configuration.
|
|
|
|
# Copyright (C) 2006-2019 Free Software Foundation, Inc.
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
|
|
GNULIB_REVISION=d271f868a8df9bbec29049d01e056481b7a1a263
|
|
|
|
# gnulib modules used by this package.
|
|
# mbswidth is used by gnulib-fix-width.diff's changes to argp rather than
|
|
# directly.
|
|
gnulib_modules="
|
|
argp
|
|
base64
|
|
error
|
|
fnmatch
|
|
getdelim
|
|
getline
|
|
gettext-h
|
|
gitlog-to-changelog
|
|
mbswidth
|
|
progname
|
|
realloc-gnu
|
|
regex
|
|
save-cwd
|
|
"
|
|
|
|
gnulib_tool_option_extras="\
|
|
--no-conditional-dependencies \
|
|
--no-vc-files \
|
|
"
|
|
|
|
gnulib_name=libgnu
|
|
source_base=grub-core/lib/gnulib
|
|
gnulib_extra_files="
|
|
build-aux/install-sh
|
|
build-aux/mdate-sh
|
|
build-aux/texinfo.tex
|
|
build-aux/depcomp
|
|
build-aux/config.guess
|
|
build-aux/config.sub
|
|
"
|
|
|
|
# Additional xgettext options to use. Use "\\\newline" to break lines.
|
|
XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
|
|
--from-code=UTF-8\\\
|
|
'
|
|
|
|
checkout_only_file=
|
|
copy=true
|
|
vc_ignore=
|
|
|
|
SKIP_PO=t
|
|
|
|
# Build prerequisites
|
|
buildreq="\
|
|
autoconf 2.63
|
|
automake 1.11
|
|
gettext 0.18.3
|
|
git 1.5.5
|
|
tar -
|
|
"
|
|
|
|
# bootstrap doesn't give us a reasonable way to stop Automake from
|
|
# overwriting this, so we just copy our version aside and put it back later.
|
|
cp -a INSTALL INSTALL.grub
|
|
|
|
bootstrap_post_import_hook () {
|
|
set -e
|
|
for patchname in fix-base64 fix-null-deref fix-width no-abort; do
|
|
patch -d grub-core/lib/gnulib -p2 \
|
|
< "grub-core/lib/gnulib-patches/$patchname.patch"
|
|
done
|
|
FROM_BOOTSTRAP=1 ./autogen.sh
|
|
set +e # bootstrap expects this
|
|
}
|
|
|
|
bootstrap_epilogue () {
|
|
mv INSTALL.grub INSTALL
|
|
}
|