Life is pain, but especially when it's gnulib
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
This commit is contained in:
parent
3e40727f72
commit
8a74d28ac8
@ -5,21 +5,18 @@ Subject: [PATCH] Attempt to fix up all the places -Wsign-compare=error finds.
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
grub-core/kern/emu/misc.c | 2 +-
|
||||
grub-core/lib/reed_solomon.c | 4 +-
|
||||
grub-core/osdep/linux/blocklist.c | 2 +-
|
||||
grub-core/osdep/linux/getroot.c | 2 +-
|
||||
grub-core/osdep/linux/hostdisk.c | 2 +-
|
||||
util/grub-fstest.c | 2 +-
|
||||
util/grub-menulst2cfg.c | 2 +-
|
||||
util/grub-mkfont.c | 13 +-
|
||||
util/grub-probe.c | 2 +-
|
||||
util/grub-rpm-sort.c | 2 +-
|
||||
util/setup.c | 2 +-
|
||||
bootstrap.conf | 3 +-
|
||||
.../gnulib-patches/fix-sign-compare-errors.patch | 161 +++++++++++++++++++++
|
||||
13 files changed, 181 insertions(+), 18 deletions(-)
|
||||
create mode 100644 grub-core/lib/gnulib-patches/fix-sign-compare-errors.patch
|
||||
grub-core/kern/emu/misc.c | 2 +-
|
||||
grub-core/lib/reed_solomon.c | 4 ++--
|
||||
grub-core/osdep/linux/blocklist.c | 2 +-
|
||||
grub-core/osdep/linux/getroot.c | 2 +-
|
||||
grub-core/osdep/linux/hostdisk.c | 2 +-
|
||||
util/grub-fstest.c | 2 +-
|
||||
util/grub-menulst2cfg.c | 2 +-
|
||||
util/grub-mkfont.c | 13 +++++++------
|
||||
util/grub-probe.c | 2 +-
|
||||
util/grub-rpm-sort.c | 2 +-
|
||||
util/setup.c | 2 +-
|
||||
11 files changed, 18 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/grub-core/kern/emu/misc.c b/grub-core/kern/emu/misc.c
|
||||
index eeea092752d..f08a1bb8415 100644
|
||||
@ -214,184 +211,3 @@ index da5f2c07f50..8b22bb8ccac 100644
|
||||
grub_fs_t fs;
|
||||
unsigned int nsec, maxsec;
|
||||
|
||||
diff --git a/bootstrap.conf b/bootstrap.conf
|
||||
index 6b043fc354c..186be9c48ce 100644
|
||||
--- a/bootstrap.conf
|
||||
+++ b/bootstrap.conf
|
||||
@@ -80,7 +80,8 @@ 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 \
|
||||
- fix-regexec-null-deref fix-uninit-structure fix-unused-value fix-width no-abort; do
|
||||
+ fix-regexec-null-deref fix-uninit-structure fix-unused-value fix-width no-abort \
|
||||
+ fix-sign-compare-errors; do
|
||||
patch -d grub-core/lib/gnulib -p2 \
|
||||
< "grub-core/lib/gnulib-patches/$patchname.patch"
|
||||
done
|
||||
diff --git a/grub-core/lib/gnulib-patches/fix-sign-compare-errors.patch b/grub-core/lib/gnulib-patches/fix-sign-compare-errors.patch
|
||||
new file mode 100644
|
||||
index 00000000000..479029c0565
|
||||
--- /dev/null
|
||||
+++ b/grub-core/lib/gnulib-patches/fix-sign-compare-errors.patch
|
||||
@@ -0,0 +1,161 @@
|
||||
+diff --git a/lib/regcomp.c b/lib/regcomp.c
|
||||
+index cc85f35ac58..361079d82d6 100644
|
||||
+--- a/lib/regcomp.c
|
||||
++++ b/lib/regcomp.c
|
||||
+@@ -322,7 +322,7 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
|
||||
+ *p++ = dfa->nodes[node].opr.c;
|
||||
+ memset (&state, '\0', sizeof (state));
|
||||
+ if (__mbrtowc (&wc, (const char *) buf, p - buf,
|
||||
+- &state) == p - buf
|
||||
++ &state) == (size_t)(p - buf)
|
||||
+ && (__wcrtomb ((char *) buf, __towlower (wc), &state)
|
||||
+ != (size_t) -1))
|
||||
+ re_set_fastmap (fastmap, false, buf[0]);
|
||||
+@@ -3778,7 +3778,7 @@ fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax)
|
||||
+ num = ((token->type != CHARACTER || c < '0' || '9' < c || num == -2)
|
||||
+ ? -2
|
||||
+ : num == -1
|
||||
+- ? c - '0'
|
||||
++ ? (Idx)(c - '0')
|
||||
+ : MIN (RE_DUP_MAX + 1, num * 10 + c - '0'));
|
||||
+ }
|
||||
+ return num;
|
||||
+diff --git a/lib/regex_internal.c b/lib/regex_internal.c
|
||||
+index 9004ce809eb..193a1e3d332 100644
|
||||
+--- a/lib/regex_internal.c
|
||||
++++ b/lib/regex_internal.c
|
||||
+@@ -233,7 +233,7 @@ build_wcs_buffer (re_string_t *pstr)
|
||||
+ /* Apply the translation if we need. */
|
||||
+ if (__glibc_unlikely (pstr->trans != NULL))
|
||||
+ {
|
||||
+- int i, ch;
|
||||
++ unsigned int i, ch;
|
||||
+
|
||||
+ for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i)
|
||||
+ {
|
||||
+@@ -376,7 +376,7 @@ build_wcs_upper_buffer (re_string_t *pstr)
|
||||
+ prev_st = pstr->cur_state;
|
||||
+ if (__glibc_unlikely (pstr->trans != NULL))
|
||||
+ {
|
||||
+- int i, ch;
|
||||
++ unsigned int i, ch;
|
||||
+
|
||||
+ for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i)
|
||||
+ {
|
||||
+@@ -754,7 +754,7 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
|
||||
+ memset (&cur_state, 0, sizeof (cur_state));
|
||||
+ mbclen = __mbrtowc (&wc2, (const char *) pp, mlen,
|
||||
+ &cur_state);
|
||||
+- if (raw + offset - p <= mbclen
|
||||
++ if ((size_t)(raw + offset - p) <= mbclen
|
||||
+ && mbclen < (size_t) -2)
|
||||
+ {
|
||||
+ memset (&pstr->cur_state, '\0',
|
||||
+diff --git a/lib/regex_internal.h b/lib/regex_internal.h
|
||||
+index 5462419b787..e0f8292395d 100644
|
||||
+--- a/lib/regex_internal.h
|
||||
++++ b/lib/regex_internal.h
|
||||
+@@ -425,7 +425,7 @@ struct re_string_t
|
||||
+ unsigned char offsets_needed;
|
||||
+ unsigned char newline_anchor;
|
||||
+ unsigned char word_ops_used;
|
||||
+- int mb_cur_max;
|
||||
++ unsigned int mb_cur_max;
|
||||
+ };
|
||||
+ typedef struct re_string_t re_string_t;
|
||||
+
|
||||
+@@ -702,7 +702,7 @@ struct re_dfa_t
|
||||
+ unsigned int is_utf8 : 1;
|
||||
+ unsigned int map_notascii : 1;
|
||||
+ unsigned int word_ops_used : 1;
|
||||
+- int mb_cur_max;
|
||||
++ unsigned int mb_cur_max;
|
||||
+ bitset_t word_char;
|
||||
+ reg_syntax_t syntax;
|
||||
+ Idx *subexp_map;
|
||||
+diff --git a/lib/regexec.c b/lib/regexec.c
|
||||
+index 0a7a27b772e..b57d4f9141d 100644
|
||||
+--- a/lib/regexec.c
|
||||
++++ b/lib/regexec.c
|
||||
+@@ -443,7 +443,7 @@ re_search_stub (struct re_pattern_buffer *bufp, const char *string, Idx length,
|
||||
+ {
|
||||
+ if (ret_len)
|
||||
+ {
|
||||
+- assert (pmatch[0].rm_so == start);
|
||||
++ assert (pmatch[0].rm_so == (long)start);
|
||||
+ rval = pmatch[0].rm_eo - start;
|
||||
+ }
|
||||
+ else
|
||||
+@@ -877,11 +877,11 @@ re_search_internal (const regex_t *preg, const char *string, Idx length,
|
||||
+ if (__glibc_unlikely (mctx.input.offsets_needed != 0))
|
||||
+ {
|
||||
+ pmatch[reg_idx].rm_so =
|
||||
+- (pmatch[reg_idx].rm_so == mctx.input.valid_len
|
||||
++ (pmatch[reg_idx].rm_so == (long)mctx.input.valid_len
|
||||
+ ? mctx.input.valid_raw_len
|
||||
+ : mctx.input.offsets[pmatch[reg_idx].rm_so]);
|
||||
+ pmatch[reg_idx].rm_eo =
|
||||
+- (pmatch[reg_idx].rm_eo == mctx.input.valid_len
|
||||
++ (pmatch[reg_idx].rm_eo == (long)mctx.input.valid_len
|
||||
+ ? mctx.input.valid_raw_len
|
||||
+ : mctx.input.offsets[pmatch[reg_idx].rm_eo]);
|
||||
+ }
|
||||
+@@ -1418,11 +1418,11 @@ set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch,
|
||||
+ }
|
||||
+ memcpy (prev_idx_match, pmatch, sizeof (regmatch_t) * nmatch);
|
||||
+
|
||||
+- for (idx = pmatch[0].rm_so; idx <= pmatch[0].rm_eo ;)
|
||||
++ for (idx = pmatch[0].rm_so; idx <= (long)pmatch[0].rm_eo ;)
|
||||
+ {
|
||||
+ update_regs (dfa, pmatch, prev_idx_match, cur_node, idx, nmatch);
|
||||
+
|
||||
+- if (idx == pmatch[0].rm_eo && cur_node == mctx->last_node)
|
||||
++ if (idx == (long)pmatch[0].rm_eo && cur_node == mctx->last_node)
|
||||
+ {
|
||||
+ Idx reg_idx;
|
||||
+ if (fs)
|
||||
+@@ -1519,7 +1519,7 @@ update_regs (const re_dfa_t *dfa, regmatch_t *pmatch,
|
||||
+ if (reg_num < nmatch)
|
||||
+ {
|
||||
+ /* We are at the last node of this sub expression. */
|
||||
+- if (pmatch[reg_num].rm_so < cur_idx)
|
||||
++ if (pmatch[reg_num].rm_so < (long)cur_idx)
|
||||
+ {
|
||||
+ pmatch[reg_num].rm_eo = cur_idx;
|
||||
+ /* This is a non-empty match or we are not inside an optional
|
||||
+@@ -2938,7 +2938,7 @@ check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node,
|
||||
+ mctx->state_log[str_idx] = cur_state;
|
||||
+ }
|
||||
+
|
||||
+- for (null_cnt = 0; str_idx < last_str && null_cnt <= mctx->max_mb_elem_len;)
|
||||
++ for (null_cnt = 0; str_idx < last_str && null_cnt <= (long)mctx->max_mb_elem_len;)
|
||||
+ {
|
||||
+ re_node_set_empty (&next_nodes);
|
||||
+ if (mctx->state_log[str_idx + 1])
|
||||
+@@ -3718,7 +3718,7 @@ check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
|
||||
+ const re_string_t *input, Idx str_idx)
|
||||
+ {
|
||||
+ const re_token_t *node = dfa->nodes + node_idx;
|
||||
+- int char_len, elem_len;
|
||||
++ unsigned int char_len, elem_len;
|
||||
+ Idx i;
|
||||
+
|
||||
+ if (__glibc_unlikely (node->type == OP_UTF8_PERIOD))
|
||||
+@@ -4066,7 +4066,7 @@ extend_buffers (re_match_context_t *mctx, int min_len)
|
||||
+ /* Double the lengths of the buffers, but allocate at least MIN_LEN. */
|
||||
+ ret = re_string_realloc_buffers (pstr,
|
||||
+ MAX (min_len,
|
||||
+- MIN (pstr->len, pstr->bufs_len * 2)));
|
||||
++ MIN ((long)pstr->len, pstr->bufs_len * 2)));
|
||||
+ if (__glibc_unlikely (ret != REG_NOERROR))
|
||||
+ return ret;
|
||||
+
|
||||
+@@ -4236,7 +4236,7 @@ match_ctx_add_entry (re_match_context_t *mctx, Idx node, Idx str_idx, Idx from,
|
||||
+ = (from == to ? -1 : 0);
|
||||
+
|
||||
+ mctx->bkref_ents[mctx->nbkref_ents++].more = 0;
|
||||
+- if (mctx->max_mb_elem_len < to - from)
|
||||
++ if (mctx->max_mb_elem_len < (long)(to - from))
|
||||
+ mctx->max_mb_elem_len = to - from;
|
||||
+ return REG_NOERROR;
|
||||
+ }
|
||||
|
@ -1,28 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Mon, 29 Jul 2019 10:58:52 -0400
|
||||
Subject: [PATCH] Do better in bootstrap.conf
|
||||
|
||||
---
|
||||
bootstrap.conf | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/bootstrap.conf b/bootstrap.conf
|
||||
index 186be9c48ce..9259526e891 100644
|
||||
--- a/bootstrap.conf
|
||||
+++ b/bootstrap.conf
|
||||
@@ -16,7 +16,13 @@
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
-GNULIB_REVISION=d271f868a8df9bbec29049d01e056481b7a1a263
|
||||
+# GNULIB_REVISION=d271f868a8df9bbec29049d01e056481b7a1a263
|
||||
+if [[ -z "${GNULIB_REVISION}" ]] ;then
|
||||
+ GNULIB_REVISION=fixes
|
||||
+fi
|
||||
+if [[ -z "${GNULIB_URL}" ]] ;then
|
||||
+ GNULIB_URL=https://github.com/rhboot/gnulib.git
|
||||
+fi
|
||||
|
||||
# gnulib modules used by this package.
|
||||
# mbswidth is used by gnulib-fix-width.diff's changes to argp rather than
|
@ -1,631 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Mon, 29 Jul 2019 11:21:27 -0400
|
||||
Subject: [PATCH] Use git to apply gnulib patches.
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
bootstrap.conf | 6 -
|
||||
conf/Makefile.extra-dist | 10 -
|
||||
grub-core/lib/gnulib-patches/fix-base64.patch | 21 --
|
||||
grub-core/lib/gnulib-patches/fix-null-deref.patch | 13 --
|
||||
.../lib/gnulib-patches/fix-null-state-deref.patch | 12 --
|
||||
.../gnulib-patches/fix-regcomp-uninit-token.patch | 15 --
|
||||
.../gnulib-patches/fix-regexec-null-deref.patch | 12 --
|
||||
.../gnulib-patches/fix-sign-compare-errors.patch | 161 ---------------
|
||||
.../lib/gnulib-patches/fix-uninit-structure.patch | 11 --
|
||||
.../lib/gnulib-patches/fix-unused-value.patch | 14 --
|
||||
grub-core/lib/gnulib-patches/fix-width.patch | 217 ---------------------
|
||||
grub-core/lib/gnulib-patches/no-abort.patch | 26 ---
|
||||
12 files changed, 518 deletions(-)
|
||||
delete mode 100644 grub-core/lib/gnulib-patches/fix-base64.patch
|
||||
delete mode 100644 grub-core/lib/gnulib-patches/fix-null-deref.patch
|
||||
delete mode 100644 grub-core/lib/gnulib-patches/fix-null-state-deref.patch
|
||||
delete mode 100644 grub-core/lib/gnulib-patches/fix-regcomp-uninit-token.patch
|
||||
delete mode 100644 grub-core/lib/gnulib-patches/fix-regexec-null-deref.patch
|
||||
delete mode 100644 grub-core/lib/gnulib-patches/fix-sign-compare-errors.patch
|
||||
delete mode 100644 grub-core/lib/gnulib-patches/fix-uninit-structure.patch
|
||||
delete mode 100644 grub-core/lib/gnulib-patches/fix-unused-value.patch
|
||||
delete mode 100644 grub-core/lib/gnulib-patches/fix-width.patch
|
||||
delete mode 100644 grub-core/lib/gnulib-patches/no-abort.patch
|
||||
|
||||
diff --git a/bootstrap.conf b/bootstrap.conf
|
||||
index 9259526e891..452f4d79b0d 100644
|
||||
--- a/bootstrap.conf
|
||||
+++ b/bootstrap.conf
|
||||
@@ -85,12 +85,6 @@ 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 \
|
||||
- fix-regexec-null-deref fix-uninit-structure fix-unused-value fix-width no-abort \
|
||||
- fix-sign-compare-errors; do
|
||||
- patch -d grub-core/lib/gnulib -p2 \
|
||||
- < "grub-core/lib/gnulib-patches/$patchname.patch"
|
||||
- done
|
||||
for patchname in \
|
||||
0001-Support-POTFILES-shell \
|
||||
0002-Handle-gettext_printf-shell-function \
|
||||
diff --git a/conf/Makefile.extra-dist b/conf/Makefile.extra-dist
|
||||
index ea58362b555..8ddf22e6c99 100644
|
||||
--- a/conf/Makefile.extra-dist
|
||||
+++ b/conf/Makefile.extra-dist
|
||||
@@ -30,16 +30,6 @@ EXTRA_DIST += grub-core/gensymlist.sh
|
||||
EXTRA_DIST += grub-core/genemuinit.sh
|
||||
EXTRA_DIST += grub-core/genemuinitheader.sh
|
||||
|
||||
-EXTRA_DIST += grub-core/lib/gnulib-patches/fix-base64.patch
|
||||
-EXTRA_DIST += grub-core/lib/gnulib-patches/fix-null-deref.patch
|
||||
-EXTRA_DIST += grub-core/lib/gnulib-patches/fix-null-state-deref.patch
|
||||
-EXTRA_DIST += grub-core/lib/gnulib-patches/fix-regcomp-uninit-token.patch
|
||||
-EXTRA_DIST += grub-core/lib/gnulib-patches/fix-regexec-null-deref.patch
|
||||
-EXTRA_DIST += grub-core/lib/gnulib-patches/fix-uninit-structure.patch
|
||||
-EXTRA_DIST += grub-core/lib/gnulib-patches/fix-unused-value.patch
|
||||
-EXTRA_DIST += grub-core/lib/gnulib-patches/fix-width.patch
|
||||
-EXTRA_DIST += grub-core/lib/gnulib-patches/no-abort.patch
|
||||
-
|
||||
EXTRA_DIST += grub-core/lib/libgcrypt
|
||||
EXTRA_DIST += grub-core/lib/libgcrypt-grub/mpi/generic
|
||||
EXTRA_DIST += $(shell find $(top_srcdir)/include -name '*.h')
|
||||
diff --git a/grub-core/lib/gnulib-patches/fix-base64.patch b/grub-core/lib/gnulib-patches/fix-base64.patch
|
||||
deleted file mode 100644
|
||||
index 985db127971..00000000000
|
||||
--- a/grub-core/lib/gnulib-patches/fix-base64.patch
|
||||
+++ /dev/null
|
||||
@@ -1,21 +0,0 @@
|
||||
-diff --git a/lib/base64.h b/lib/base64.h
|
||||
-index 9cd0183b8..185a2afa1 100644
|
||||
---- a/lib/base64.h
|
||||
-+++ b/lib/base64.h
|
||||
-@@ -21,8 +21,14 @@
|
||||
- /* Get size_t. */
|
||||
- # include <stddef.h>
|
||||
-
|
||||
--/* Get bool. */
|
||||
--# include <stdbool.h>
|
||||
-+#ifndef GRUB_POSIX_BOOL_DEFINED
|
||||
-+typedef enum { false = 0, true = 1 } bool;
|
||||
-+#define GRUB_POSIX_BOOL_DEFINED 1
|
||||
-+#endif
|
||||
-+
|
||||
-+#ifndef _GL_ATTRIBUTE_CONST
|
||||
-+# define _GL_ATTRIBUTE_CONST /* empty */
|
||||
-+#endif
|
||||
-
|
||||
- # ifdef __cplusplus
|
||||
- extern "C" {
|
||||
diff --git a/grub-core/lib/gnulib-patches/fix-null-deref.patch b/grub-core/lib/gnulib-patches/fix-null-deref.patch
|
||||
deleted file mode 100644
|
||||
index 8fafa153a47..00000000000
|
||||
--- a/grub-core/lib/gnulib-patches/fix-null-deref.patch
|
||||
+++ /dev/null
|
||||
@@ -1,13 +0,0 @@
|
||||
-diff --git a/lib/argp-parse.c b/lib/argp-parse.c
|
||||
-index 6dec57310..900adad54 100644
|
||||
---- a/lib/argp-parse.c
|
||||
-+++ b/lib/argp-parse.c
|
||||
-@@ -940,7 +940,7 @@ weak_alias (__argp_parse, argp_parse)
|
||||
- void *
|
||||
- __argp_input (const struct argp *argp, const struct argp_state *state)
|
||||
- {
|
||||
-- if (state)
|
||||
-+ if (state && state->pstate)
|
||||
- {
|
||||
- struct group *group;
|
||||
- struct parser *parser = state->pstate;
|
||||
diff --git a/grub-core/lib/gnulib-patches/fix-null-state-deref.patch b/grub-core/lib/gnulib-patches/fix-null-state-deref.patch
|
||||
deleted file mode 100644
|
||||
index 813ec09c8a1..00000000000
|
||||
--- a/grub-core/lib/gnulib-patches/fix-null-state-deref.patch
|
||||
+++ /dev/null
|
||||
@@ -1,12 +0,0 @@
|
||||
---- a/lib/argp-help.c 2020-10-28 14:32:19.189215988 +0000
|
||||
-+++ b/lib/argp-help.c 2020-10-28 14:38:21.204673940 +0000
|
||||
-@@ -145,7 +145,8 @@
|
||||
- if (*(int *)((char *)upptr + up->uparams_offs) >= upptr->rmargin)
|
||||
- {
|
||||
- __argp_failure (state, 0, 0,
|
||||
-- dgettext (state->root_argp->argp_domain,
|
||||
-+ dgettext (state == NULL ? NULL
|
||||
-+ : state->root_argp->argp_domain,
|
||||
- "\
|
||||
- ARGP_HELP_FMT: %s value is less than or equal to %s"),
|
||||
- "rmargin", up->name);
|
||||
diff --git a/grub-core/lib/gnulib-patches/fix-regcomp-uninit-token.patch b/grub-core/lib/gnulib-patches/fix-regcomp-uninit-token.patch
|
||||
deleted file mode 100644
|
||||
index 02e06315dff..00000000000
|
||||
--- a/grub-core/lib/gnulib-patches/fix-regcomp-uninit-token.patch
|
||||
+++ /dev/null
|
||||
@@ -1,15 +0,0 @@
|
||||
---- a/lib/regcomp.c 2020-11-24 17:06:08.159223858 +0000
|
||||
-+++ b/lib/regcomp.c 2020-11-24 17:06:15.630253923 +0000
|
||||
-@@ -3808,11 +3808,7 @@
|
||||
- create_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right,
|
||||
- re_token_type_t type)
|
||||
- {
|
||||
-- re_token_t t;
|
||||
--#if defined GCC_LINT || defined lint
|
||||
-- memset (&t, 0, sizeof t);
|
||||
--#endif
|
||||
-- t.type = type;
|
||||
-+ re_token_t t = { .type = type };
|
||||
- return create_token_tree (dfa, left, right, &t);
|
||||
- }
|
||||
-
|
||||
diff --git a/grub-core/lib/gnulib-patches/fix-regexec-null-deref.patch b/grub-core/lib/gnulib-patches/fix-regexec-null-deref.patch
|
||||
deleted file mode 100644
|
||||
index db6dac9c9e3..00000000000
|
||||
--- a/grub-core/lib/gnulib-patches/fix-regexec-null-deref.patch
|
||||
+++ /dev/null
|
||||
@@ -1,12 +0,0 @@
|
||||
---- a/lib/regexec.c 2020-10-21 14:25:35.310195912 +0000
|
||||
-+++ b/lib/regexec.c 2020-11-05 10:55:09.621542984 +0000
|
||||
-@@ -1692,6 +1692,9 @@
|
||||
- {
|
||||
- Idx top = mctx->state_log_top;
|
||||
-
|
||||
-+ if (mctx->state_log == NULL)
|
||||
-+ return REG_NOERROR;
|
||||
-+
|
||||
- if ((next_state_log_idx >= mctx->input.bufs_len
|
||||
- && mctx->input.bufs_len < mctx->input.len)
|
||||
- || (next_state_log_idx >= mctx->input.valid_len
|
||||
diff --git a/grub-core/lib/gnulib-patches/fix-sign-compare-errors.patch b/grub-core/lib/gnulib-patches/fix-sign-compare-errors.patch
|
||||
deleted file mode 100644
|
||||
index 479029c0565..00000000000
|
||||
--- a/grub-core/lib/gnulib-patches/fix-sign-compare-errors.patch
|
||||
+++ /dev/null
|
||||
@@ -1,161 +0,0 @@
|
||||
-diff --git a/lib/regcomp.c b/lib/regcomp.c
|
||||
-index cc85f35ac58..361079d82d6 100644
|
||||
---- a/lib/regcomp.c
|
||||
-+++ b/lib/regcomp.c
|
||||
-@@ -322,7 +322,7 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
|
||||
- *p++ = dfa->nodes[node].opr.c;
|
||||
- memset (&state, '\0', sizeof (state));
|
||||
- if (__mbrtowc (&wc, (const char *) buf, p - buf,
|
||||
-- &state) == p - buf
|
||||
-+ &state) == (size_t)(p - buf)
|
||||
- && (__wcrtomb ((char *) buf, __towlower (wc), &state)
|
||||
- != (size_t) -1))
|
||||
- re_set_fastmap (fastmap, false, buf[0]);
|
||||
-@@ -3778,7 +3778,7 @@ fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax)
|
||||
- num = ((token->type != CHARACTER || c < '0' || '9' < c || num == -2)
|
||||
- ? -2
|
||||
- : num == -1
|
||||
-- ? c - '0'
|
||||
-+ ? (Idx)(c - '0')
|
||||
- : MIN (RE_DUP_MAX + 1, num * 10 + c - '0'));
|
||||
- }
|
||||
- return num;
|
||||
-diff --git a/lib/regex_internal.c b/lib/regex_internal.c
|
||||
-index 9004ce809eb..193a1e3d332 100644
|
||||
---- a/lib/regex_internal.c
|
||||
-+++ b/lib/regex_internal.c
|
||||
-@@ -233,7 +233,7 @@ build_wcs_buffer (re_string_t *pstr)
|
||||
- /* Apply the translation if we need. */
|
||||
- if (__glibc_unlikely (pstr->trans != NULL))
|
||||
- {
|
||||
-- int i, ch;
|
||||
-+ unsigned int i, ch;
|
||||
-
|
||||
- for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i)
|
||||
- {
|
||||
-@@ -376,7 +376,7 @@ build_wcs_upper_buffer (re_string_t *pstr)
|
||||
- prev_st = pstr->cur_state;
|
||||
- if (__glibc_unlikely (pstr->trans != NULL))
|
||||
- {
|
||||
-- int i, ch;
|
||||
-+ unsigned int i, ch;
|
||||
-
|
||||
- for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i)
|
||||
- {
|
||||
-@@ -754,7 +754,7 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
|
||||
- memset (&cur_state, 0, sizeof (cur_state));
|
||||
- mbclen = __mbrtowc (&wc2, (const char *) pp, mlen,
|
||||
- &cur_state);
|
||||
-- if (raw + offset - p <= mbclen
|
||||
-+ if ((size_t)(raw + offset - p) <= mbclen
|
||||
- && mbclen < (size_t) -2)
|
||||
- {
|
||||
- memset (&pstr->cur_state, '\0',
|
||||
-diff --git a/lib/regex_internal.h b/lib/regex_internal.h
|
||||
-index 5462419b787..e0f8292395d 100644
|
||||
---- a/lib/regex_internal.h
|
||||
-+++ b/lib/regex_internal.h
|
||||
-@@ -425,7 +425,7 @@ struct re_string_t
|
||||
- unsigned char offsets_needed;
|
||||
- unsigned char newline_anchor;
|
||||
- unsigned char word_ops_used;
|
||||
-- int mb_cur_max;
|
||||
-+ unsigned int mb_cur_max;
|
||||
- };
|
||||
- typedef struct re_string_t re_string_t;
|
||||
-
|
||||
-@@ -702,7 +702,7 @@ struct re_dfa_t
|
||||
- unsigned int is_utf8 : 1;
|
||||
- unsigned int map_notascii : 1;
|
||||
- unsigned int word_ops_used : 1;
|
||||
-- int mb_cur_max;
|
||||
-+ unsigned int mb_cur_max;
|
||||
- bitset_t word_char;
|
||||
- reg_syntax_t syntax;
|
||||
- Idx *subexp_map;
|
||||
-diff --git a/lib/regexec.c b/lib/regexec.c
|
||||
-index 0a7a27b772e..b57d4f9141d 100644
|
||||
---- a/lib/regexec.c
|
||||
-+++ b/lib/regexec.c
|
||||
-@@ -443,7 +443,7 @@ re_search_stub (struct re_pattern_buffer *bufp, const char *string, Idx length,
|
||||
- {
|
||||
- if (ret_len)
|
||||
- {
|
||||
-- assert (pmatch[0].rm_so == start);
|
||||
-+ assert (pmatch[0].rm_so == (long)start);
|
||||
- rval = pmatch[0].rm_eo - start;
|
||||
- }
|
||||
- else
|
||||
-@@ -877,11 +877,11 @@ re_search_internal (const regex_t *preg, const char *string, Idx length,
|
||||
- if (__glibc_unlikely (mctx.input.offsets_needed != 0))
|
||||
- {
|
||||
- pmatch[reg_idx].rm_so =
|
||||
-- (pmatch[reg_idx].rm_so == mctx.input.valid_len
|
||||
-+ (pmatch[reg_idx].rm_so == (long)mctx.input.valid_len
|
||||
- ? mctx.input.valid_raw_len
|
||||
- : mctx.input.offsets[pmatch[reg_idx].rm_so]);
|
||||
- pmatch[reg_idx].rm_eo =
|
||||
-- (pmatch[reg_idx].rm_eo == mctx.input.valid_len
|
||||
-+ (pmatch[reg_idx].rm_eo == (long)mctx.input.valid_len
|
||||
- ? mctx.input.valid_raw_len
|
||||
- : mctx.input.offsets[pmatch[reg_idx].rm_eo]);
|
||||
- }
|
||||
-@@ -1418,11 +1418,11 @@ set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch,
|
||||
- }
|
||||
- memcpy (prev_idx_match, pmatch, sizeof (regmatch_t) * nmatch);
|
||||
-
|
||||
-- for (idx = pmatch[0].rm_so; idx <= pmatch[0].rm_eo ;)
|
||||
-+ for (idx = pmatch[0].rm_so; idx <= (long)pmatch[0].rm_eo ;)
|
||||
- {
|
||||
- update_regs (dfa, pmatch, prev_idx_match, cur_node, idx, nmatch);
|
||||
-
|
||||
-- if (idx == pmatch[0].rm_eo && cur_node == mctx->last_node)
|
||||
-+ if (idx == (long)pmatch[0].rm_eo && cur_node == mctx->last_node)
|
||||
- {
|
||||
- Idx reg_idx;
|
||||
- if (fs)
|
||||
-@@ -1519,7 +1519,7 @@ update_regs (const re_dfa_t *dfa, regmatch_t *pmatch,
|
||||
- if (reg_num < nmatch)
|
||||
- {
|
||||
- /* We are at the last node of this sub expression. */
|
||||
-- if (pmatch[reg_num].rm_so < cur_idx)
|
||||
-+ if (pmatch[reg_num].rm_so < (long)cur_idx)
|
||||
- {
|
||||
- pmatch[reg_num].rm_eo = cur_idx;
|
||||
- /* This is a non-empty match or we are not inside an optional
|
||||
-@@ -2938,7 +2938,7 @@ check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node,
|
||||
- mctx->state_log[str_idx] = cur_state;
|
||||
- }
|
||||
-
|
||||
-- for (null_cnt = 0; str_idx < last_str && null_cnt <= mctx->max_mb_elem_len;)
|
||||
-+ for (null_cnt = 0; str_idx < last_str && null_cnt <= (long)mctx->max_mb_elem_len;)
|
||||
- {
|
||||
- re_node_set_empty (&next_nodes);
|
||||
- if (mctx->state_log[str_idx + 1])
|
||||
-@@ -3718,7 +3718,7 @@ check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
|
||||
- const re_string_t *input, Idx str_idx)
|
||||
- {
|
||||
- const re_token_t *node = dfa->nodes + node_idx;
|
||||
-- int char_len, elem_len;
|
||||
-+ unsigned int char_len, elem_len;
|
||||
- Idx i;
|
||||
-
|
||||
- if (__glibc_unlikely (node->type == OP_UTF8_PERIOD))
|
||||
-@@ -4066,7 +4066,7 @@ extend_buffers (re_match_context_t *mctx, int min_len)
|
||||
- /* Double the lengths of the buffers, but allocate at least MIN_LEN. */
|
||||
- ret = re_string_realloc_buffers (pstr,
|
||||
- MAX (min_len,
|
||||
-- MIN (pstr->len, pstr->bufs_len * 2)));
|
||||
-+ MIN ((long)pstr->len, pstr->bufs_len * 2)));
|
||||
- if (__glibc_unlikely (ret != REG_NOERROR))
|
||||
- return ret;
|
||||
-
|
||||
-@@ -4236,7 +4236,7 @@ match_ctx_add_entry (re_match_context_t *mctx, Idx node, Idx str_idx, Idx from,
|
||||
- = (from == to ? -1 : 0);
|
||||
-
|
||||
- mctx->bkref_ents[mctx->nbkref_ents++].more = 0;
|
||||
-- if (mctx->max_mb_elem_len < to - from)
|
||||
-+ if (mctx->max_mb_elem_len < (long)(to - from))
|
||||
- mctx->max_mb_elem_len = to - from;
|
||||
- return REG_NOERROR;
|
||||
- }
|
||||
diff --git a/grub-core/lib/gnulib-patches/fix-uninit-structure.patch b/grub-core/lib/gnulib-patches/fix-uninit-structure.patch
|
||||
deleted file mode 100644
|
||||
index 7b4d9f67af4..00000000000
|
||||
--- a/grub-core/lib/gnulib-patches/fix-uninit-structure.patch
|
||||
+++ /dev/null
|
||||
@@ -1,11 +0,0 @@
|
||||
---- a/lib/regcomp.c 2020-10-22 13:49:06.770168928 +0000
|
||||
-+++ b/lib/regcomp.c 2020-10-22 13:50:37.026528298 +0000
|
||||
-@@ -3662,7 +3662,7 @@
|
||||
- Idx alloc = 0;
|
||||
- #endif /* not RE_ENABLE_I18N */
|
||||
- reg_errcode_t ret;
|
||||
-- re_token_t br_token;
|
||||
-+ re_token_t br_token = {0};
|
||||
- bin_tree_t *tree;
|
||||
-
|
||||
- sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1);
|
||||
diff --git a/grub-core/lib/gnulib-patches/fix-unused-value.patch b/grub-core/lib/gnulib-patches/fix-unused-value.patch
|
||||
deleted file mode 100644
|
||||
index ba51f1bf223..00000000000
|
||||
--- a/grub-core/lib/gnulib-patches/fix-unused-value.patch
|
||||
+++ /dev/null
|
||||
@@ -1,14 +0,0 @@
|
||||
---- a/lib/regexec.c 2020-10-21 14:25:35.310195912 +0000
|
||||
-+++ b/lib/regexec.c 2020-10-21 14:32:07.961765604 +0000
|
||||
-@@ -828,7 +828,11 @@
|
||||
- break;
|
||||
- if (__glibc_unlikely (err != REG_NOMATCH))
|
||||
- goto free_return;
|
||||
-+#ifdef DEBUG
|
||||
-+ /* Only used for assertion below when DEBUG is set, otherwise
|
||||
-+ it will be over-written when we loop around. */
|
||||
- match_last = -1;
|
||||
-+#endif
|
||||
- }
|
||||
- else
|
||||
- break; /* We found a match. */
|
||||
diff --git a/grub-core/lib/gnulib-patches/fix-width.patch b/grub-core/lib/gnulib-patches/fix-width.patch
|
||||
deleted file mode 100644
|
||||
index 0a208ad08b5..00000000000
|
||||
--- a/grub-core/lib/gnulib-patches/fix-width.patch
|
||||
+++ /dev/null
|
||||
@@ -1,217 +0,0 @@
|
||||
-diff --git a/lib/argp-fmtstream.c b/lib/argp-fmtstream.c
|
||||
-index ba6a407f7..d0685b3d4 100644
|
||||
---- a/lib/argp-fmtstream.c
|
||||
-+++ b/lib/argp-fmtstream.c
|
||||
-@@ -28,9 +28,11 @@
|
||||
- #include <errno.h>
|
||||
- #include <stdarg.h>
|
||||
- #include <ctype.h>
|
||||
-+#include <wchar.h>
|
||||
-
|
||||
- #include "argp-fmtstream.h"
|
||||
- #include "argp-namefrob.h"
|
||||
-+#include "mbswidth.h"
|
||||
-
|
||||
- #ifndef ARGP_FMTSTREAM_USE_LINEWRAP
|
||||
-
|
||||
-@@ -115,6 +117,51 @@ weak_alias (__argp_fmtstream_free, argp_fmtstream_free)
|
||||
- #endif
|
||||
- #endif
|
||||
-
|
||||
-+
|
||||
-+/* Return the pointer to the first character that doesn't fit in l columns. */
|
||||
-+static inline const ptrdiff_t
|
||||
-+add_width (const char *ptr, const char *end, size_t l)
|
||||
-+{
|
||||
-+ mbstate_t ps;
|
||||
-+ const char *ptr0 = ptr;
|
||||
-+
|
||||
-+ memset (&ps, 0, sizeof (ps));
|
||||
-+
|
||||
-+ while (ptr < end)
|
||||
-+ {
|
||||
-+ wchar_t wc;
|
||||
-+ size_t s, k;
|
||||
-+
|
||||
-+ s = mbrtowc (&wc, ptr, end - ptr, &ps);
|
||||
-+ if (s == (size_t) -1)
|
||||
-+ break;
|
||||
-+ if (s == (size_t) -2)
|
||||
-+ {
|
||||
-+ if (1 >= l)
|
||||
-+ break;
|
||||
-+ l--;
|
||||
-+ ptr++;
|
||||
-+ continue;
|
||||
-+ }
|
||||
-+
|
||||
-+ if (wc == '\e' && ptr + 3 < end
|
||||
-+ && ptr[1] == '[' && (ptr[2] == '0' || ptr[2] == '1')
|
||||
-+ && ptr[3] == 'm')
|
||||
-+ {
|
||||
-+ ptr += 4;
|
||||
-+ continue;
|
||||
-+ }
|
||||
-+
|
||||
-+ k = wcwidth (wc);
|
||||
-+
|
||||
-+ if (k >= l)
|
||||
-+ break;
|
||||
-+ l -= k;
|
||||
-+ ptr += s;
|
||||
-+ }
|
||||
-+ return ptr - ptr0;
|
||||
-+}
|
||||
-+
|
||||
- /* Process FS's buffer so that line wrapping is done from POINT_OFFS to the
|
||||
- end of its buffer. This code is mostly from glibc stdio/linewrap.c. */
|
||||
- void
|
||||
-@@ -168,13 +215,15 @@ __argp_fmtstream_update (argp_fmtstream_t fs)
|
||||
- if (!nl)
|
||||
- {
|
||||
- /* The buffer ends in a partial line. */
|
||||
-+ size_t display_width = mbsnwidth (buf, fs->p - buf,
|
||||
-+ MBSW_STOP_AT_NUL);
|
||||
-
|
||||
-- if (fs->point_col + len < fs->rmargin)
|
||||
-+ if (fs->point_col + display_width < fs->rmargin)
|
||||
- {
|
||||
- /* The remaining buffer text is a partial line and fits
|
||||
- within the maximum line width. Advance point for the
|
||||
- characters to be written and stop scanning. */
|
||||
-- fs->point_col += len;
|
||||
-+ fs->point_col += display_width;
|
||||
- break;
|
||||
- }
|
||||
- else
|
||||
-@@ -182,14 +231,18 @@ __argp_fmtstream_update (argp_fmtstream_t fs)
|
||||
- the end of the buffer. */
|
||||
- nl = fs->p;
|
||||
- }
|
||||
-- else if (fs->point_col + (nl - buf) < (ssize_t) fs->rmargin)
|
||||
-- {
|
||||
-- /* The buffer contains a full line that fits within the maximum
|
||||
-- line width. Reset point and scan the next line. */
|
||||
-- fs->point_col = 0;
|
||||
-- buf = nl + 1;
|
||||
-- continue;
|
||||
-- }
|
||||
-+ else
|
||||
-+ {
|
||||
-+ size_t display_width = mbsnwidth (buf, nl - buf, MBSW_STOP_AT_NUL);
|
||||
-+ if (display_width < (ssize_t) fs->rmargin)
|
||||
-+ {
|
||||
-+ /* The buffer contains a full line that fits within the maximum
|
||||
-+ line width. Reset point and scan the next line. */
|
||||
-+ fs->point_col = 0;
|
||||
-+ buf = nl + 1;
|
||||
-+ continue;
|
||||
-+ }
|
||||
-+ }
|
||||
-
|
||||
- /* This line is too long. */
|
||||
- r = fs->rmargin - 1;
|
||||
-@@ -225,7 +278,7 @@ __argp_fmtstream_update (argp_fmtstream_t fs)
|
||||
- char *p, *nextline;
|
||||
- int i;
|
||||
-
|
||||
-- p = buf + (r + 1 - fs->point_col);
|
||||
-+ p = buf + add_width (buf, fs->p, (r + 1 - fs->point_col));
|
||||
- while (p >= buf && !isblank ((unsigned char) *p))
|
||||
- --p;
|
||||
- nextline = p + 1; /* This will begin the next line. */
|
||||
-@@ -243,7 +296,7 @@ __argp_fmtstream_update (argp_fmtstream_t fs)
|
||||
- {
|
||||
- /* A single word that is greater than the maximum line width.
|
||||
- Oh well. Put it on an overlong line by itself. */
|
||||
-- p = buf + (r + 1 - fs->point_col);
|
||||
-+ p = buf + add_width (buf, fs->p, (r + 1 - fs->point_col));
|
||||
- /* Find the end of the long word. */
|
||||
- if (p < nl)
|
||||
- do
|
||||
-@@ -277,7 +330,8 @@ __argp_fmtstream_update (argp_fmtstream_t fs)
|
||||
- && fs->p > nextline)
|
||||
- {
|
||||
- /* The margin needs more blanks than we removed. */
|
||||
-- if (fs->end - fs->p > fs->wmargin + 1)
|
||||
-+ if (mbsnwidth (fs->p, fs->end - fs->p, MBSW_STOP_AT_NUL)
|
||||
-+ > fs->wmargin + 1)
|
||||
- /* Make some space for them. */
|
||||
- {
|
||||
- size_t mv = fs->p - nextline;
|
||||
-diff --git a/lib/argp-help.c b/lib/argp-help.c
|
||||
-index e5375a0f0..5d8f451ec 100644
|
||||
---- a/lib/argp-help.c
|
||||
-+++ b/lib/argp-help.c
|
||||
-@@ -51,6 +51,7 @@
|
||||
- #include "argp.h"
|
||||
- #include "argp-fmtstream.h"
|
||||
- #include "argp-namefrob.h"
|
||||
-+#include "mbswidth.h"
|
||||
-
|
||||
- #ifndef SIZE_MAX
|
||||
- # define SIZE_MAX ((size_t) -1)
|
||||
-@@ -1432,7 +1433,7 @@ argp_args_usage (const struct argp *argp, const struct argp_state *state,
|
||||
-
|
||||
- /* Manually do line wrapping so that it (probably) won't get wrapped at
|
||||
- any embedded spaces. */
|
||||
-- space (stream, 1 + nl - cp);
|
||||
-+ space (stream, 1 + mbsnwidth (cp, nl - cp, MBSW_STOP_AT_NUL));
|
||||
-
|
||||
- __argp_fmtstream_write (stream, cp, nl - cp);
|
||||
- }
|
||||
-diff --git a/lib/mbswidth.c b/lib/mbswidth.c
|
||||
-index 408a15e34..b3fb7f83a 100644
|
||||
---- a/lib/mbswidth.c
|
||||
-+++ b/lib/mbswidth.c
|
||||
-@@ -38,6 +38,14 @@
|
||||
- /* Get INT_MAX. */
|
||||
- #include <limits.h>
|
||||
-
|
||||
-+#ifndef FALLTHROUGH
|
||||
-+# if __GNUC__ < 7
|
||||
-+# define FALLTHROUGH ((void) 0)
|
||||
-+# else
|
||||
-+# define FALLTHROUGH __attribute__ ((__fallthrough__))
|
||||
-+# endif
|
||||
-+#endif
|
||||
-+
|
||||
- /* Returns the number of columns needed to represent the multibyte
|
||||
- character string pointed to by STRING. If a non-printable character
|
||||
- occurs, and MBSW_REJECT_UNPRINTABLE is specified, -1 is returned.
|
||||
-@@ -90,6 +98,10 @@ mbsnwidth (const char *string, size_t nbytes, int flags)
|
||||
- p++;
|
||||
- width++;
|
||||
- break;
|
||||
-+ case '\0':
|
||||
-+ if (flags & MBSW_STOP_AT_NUL)
|
||||
-+ return width;
|
||||
-+ FALLTHROUGH;
|
||||
- default:
|
||||
- /* If we have a multibyte sequence, scan it up to its end. */
|
||||
- {
|
||||
-@@ -168,6 +180,9 @@ mbsnwidth (const char *string, size_t nbytes, int flags)
|
||||
- {
|
||||
- unsigned char c = (unsigned char) *p++;
|
||||
-
|
||||
-+ if (c == 0 && (flags & MBSW_STOP_AT_NUL))
|
||||
-+ return width;
|
||||
-+
|
||||
- if (isprint (c))
|
||||
- {
|
||||
- if (width == INT_MAX)
|
||||
-diff --git a/lib/mbswidth.h b/lib/mbswidth.h
|
||||
-index 2b5c53c37..45a123e63 100644
|
||||
---- a/lib/mbswidth.h
|
||||
-+++ b/lib/mbswidth.h
|
||||
-@@ -45,6 +45,10 @@ extern "C" {
|
||||
- control characters and 1 otherwise. */
|
||||
- #define MBSW_REJECT_UNPRINTABLE 2
|
||||
-
|
||||
-+/* If this bit is set \0 is treated as the end of string.
|
||||
-+ Otherwise it's treated as a normal one column width character. */
|
||||
-+#define MBSW_STOP_AT_NUL 4
|
||||
-+
|
||||
-
|
||||
- /* Returns the number of screen columns needed for STRING. */
|
||||
- #define mbswidth gnu_mbswidth /* avoid clash with UnixWare 7.1.1 function */
|
||||
diff --git a/grub-core/lib/gnulib-patches/no-abort.patch b/grub-core/lib/gnulib-patches/no-abort.patch
|
||||
deleted file mode 100644
|
||||
index e469c4762eb..00000000000
|
||||
--- a/grub-core/lib/gnulib-patches/no-abort.patch
|
||||
+++ /dev/null
|
||||
@@ -1,26 +0,0 @@
|
||||
-diff --git a/lib/regcomp.c b/lib/regcomp.c
|
||||
-index cc85f35ac..de45ebb5c 100644
|
||||
---- a/lib/regcomp.c
|
||||
-+++ b/lib/regcomp.c
|
||||
-@@ -528,9 +528,9 @@ regerror (int errcode, const regex_t *__restrict preg, char *__restrict errbuf,
|
||||
- to this routine. If we are given anything else, or if other regex
|
||||
- code generates an invalid error code, then the program has a bug.
|
||||
- Dump core so we can fix it. */
|
||||
-- abort ();
|
||||
--
|
||||
-- msg = gettext (__re_error_msgid + __re_error_msgid_idx[errcode]);
|
||||
-+ msg = gettext ("unknown regexp error");
|
||||
-+ else
|
||||
-+ msg = gettext (__re_error_msgid + __re_error_msgid_idx[errcode]);
|
||||
-
|
||||
- msg_size = strlen (msg) + 1; /* Includes the null. */
|
||||
-
|
||||
-@@ -1136,7 +1136,7 @@ optimize_utf8 (re_dfa_t *dfa)
|
||||
- }
|
||||
- break;
|
||||
- default:
|
||||
-- abort ();
|
||||
-+ break;
|
||||
- }
|
||||
-
|
||||
- if (mb_chars || has_period)
|
@ -19,10 +19,10 @@ Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/bootstrap.conf b/bootstrap.conf
|
||||
index 452f4d79b0d..03f10930230 100644
|
||||
index 6b043fc354c..52d4af44bec 100644
|
||||
--- a/bootstrap.conf
|
||||
+++ b/bootstrap.conf
|
||||
@@ -93,7 +93,7 @@ bootstrap_post_import_hook () {
|
||||
@@ -92,7 +92,7 @@ bootstrap_post_import_hook () {
|
||||
patch -d po -p3 \
|
||||
< "po/gettext-patches/$patchname.patch"
|
||||
done
|
@ -0,0 +1,90 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Fri, 28 Jan 2022 11:30:32 +0100
|
||||
Subject: [PATCH] normal/menu: Don't show "Booting `%s'" msg when auto-booting
|
||||
with TIMEOUT_STYLE_HIDDEN
|
||||
|
||||
When the user has asked the menu code to be hidden/quiet and the current
|
||||
entry is being autobooted because the timeout has expired don't show
|
||||
the "Booting `%s'" msg.
|
||||
|
||||
This is necessary to let flicker-free boots really be flicker free,
|
||||
otherwise the "Booting `%s'" msg will kick the EFI fb into text mode
|
||||
and show the msg, breaking the flicker-free experience.
|
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
---
|
||||
grub-core/normal/menu.c | 24 ++++++++++++++++--------
|
||||
1 file changed, 16 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/grub-core/normal/menu.c b/grub-core/normal/menu.c
|
||||
index ec0c92bade0..c8516a5a080 100644
|
||||
--- a/grub-core/normal/menu.c
|
||||
+++ b/grub-core/normal/menu.c
|
||||
@@ -606,13 +606,15 @@ print_countdown (struct grub_term_coordinate *pos, int n)
|
||||
entry to be executed is a result of an automatic default selection because
|
||||
of the timeout. */
|
||||
static int
|
||||
-run_menu (grub_menu_t menu, int nested, int *auto_boot)
|
||||
+run_menu (grub_menu_t menu, int nested, int *auto_boot, int *notify_boot)
|
||||
{
|
||||
grub_uint64_t saved_time;
|
||||
int default_entry, current_entry;
|
||||
int timeout;
|
||||
enum timeout_style timeout_style;
|
||||
|
||||
+ *notify_boot = 1;
|
||||
+
|
||||
default_entry = get_entry_number (menu, "default");
|
||||
|
||||
/* If DEFAULT_ENTRY is not within the menu entries, fall back to
|
||||
@@ -687,6 +689,7 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot)
|
||||
if (timeout == 0)
|
||||
{
|
||||
*auto_boot = 1;
|
||||
+ *notify_boot = timeout_style != TIMEOUT_STYLE_HIDDEN;
|
||||
return default_entry;
|
||||
}
|
||||
|
||||
@@ -840,12 +843,16 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot)
|
||||
|
||||
/* Callback invoked immediately before a menu entry is executed. */
|
||||
static void
|
||||
-notify_booting (grub_menu_entry_t entry,
|
||||
- void *userdata __attribute__((unused)))
|
||||
+notify_booting (grub_menu_entry_t entry, void *userdata)
|
||||
{
|
||||
- grub_printf (" ");
|
||||
- grub_printf_ (N_("Booting `%s'"), entry->title);
|
||||
- grub_printf ("\n\n");
|
||||
+ int *notify_boot = userdata;
|
||||
+
|
||||
+ if (*notify_boot)
|
||||
+ {
|
||||
+ grub_printf (" ");
|
||||
+ grub_printf_ (N_("Booting `%s'"), entry->title);
|
||||
+ grub_printf ("\n\n");
|
||||
+ }
|
||||
}
|
||||
|
||||
/* Callback invoked when a default menu entry executed because of a timeout
|
||||
@@ -893,8 +900,9 @@ show_menu (grub_menu_t menu, int nested, int autobooted)
|
||||
int boot_entry;
|
||||
grub_menu_entry_t e;
|
||||
int auto_boot;
|
||||
+ int notify_boot;
|
||||
|
||||
- boot_entry = run_menu (menu, nested, &auto_boot);
|
||||
+ boot_entry = run_menu (menu, nested, &auto_boot, ¬ify_boot);
|
||||
if (boot_entry < 0)
|
||||
break;
|
||||
|
||||
@@ -906,7 +914,7 @@ show_menu (grub_menu_t menu, int nested, int autobooted)
|
||||
|
||||
if (auto_boot)
|
||||
grub_menu_execute_with_fallback (menu, e, autobooted,
|
||||
- &execution_callback, 0);
|
||||
+ &execution_callback, ¬ify_boot);
|
||||
else
|
||||
grub_menu_execute_entry (e, 0);
|
||||
if (autobooted)
|
@ -0,0 +1,41 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Fri, 28 Jan 2022 11:30:33 +0100
|
||||
Subject: [PATCH] EFI: suppress the "Welcome to GRUB!" message in EFI builds
|
||||
|
||||
Grub EFI builds are now often used in combination with flicker-free
|
||||
boot, but this breaks with upstream grub because the "Welcome to GRUB!"
|
||||
message will kick the EFI fb into text mode and show the msg,
|
||||
breaking the flicker-free experience.
|
||||
|
||||
EFI systems are so fast, that when the menu or the countdown are enabled
|
||||
the message will be immediately overwritten, so in these cases not
|
||||
printing the message does not matter.
|
||||
|
||||
And in case when the timeout_style is set to TIMEOUT_STYLE_HIDDEN,
|
||||
the user has asked grub to be quiet (for example to allow flickfree
|
||||
boot) annd thus the message should not be printed.
|
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
---
|
||||
grub-core/kern/main.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/grub-core/kern/main.c b/grub-core/kern/main.c
|
||||
index 3fc34014726..993b8a8598e 100644
|
||||
--- a/grub-core/kern/main.c
|
||||
+++ b/grub-core/kern/main.c
|
||||
@@ -317,10 +317,13 @@ grub_main (void)
|
||||
|
||||
grub_boot_time ("After machine init.");
|
||||
|
||||
+ /* This breaks flicker-free boot on EFI systems, so disable it there. */
|
||||
+#ifndef GRUB_MACHINE_EFI
|
||||
/* Hello. */
|
||||
grub_setcolorstate (GRUB_TERM_COLOR_HIGHLIGHT);
|
||||
grub_printf ("Welcome to GRUB!\n\n");
|
||||
grub_setcolorstate (GRUB_TERM_COLOR_STANDARD);
|
||||
+#endif
|
||||
|
||||
/* Init verifiers API. */
|
||||
grub_verifiers_init ();
|
@ -0,0 +1,51 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Fri, 28 Jan 2022 12:43:48 +0100
|
||||
Subject: [PATCH] EFI: console: Do not set colorstate until the first text
|
||||
output
|
||||
|
||||
GRUB_MOD_INIT(normal) does an unconditional:
|
||||
|
||||
grub_env_set ("color_normal", "light-gray/black");
|
||||
|
||||
which triggers a grub_term_setcolorstate() call. The original version
|
||||
of the "efi/console: Do not set text-mode until we actually need it" patch:
|
||||
https://lists.gnu.org/archive/html/grub-devel/2018-03/msg00125.html
|
||||
|
||||
Protected against this by caching the requested state in
|
||||
grub_console_setcolorstate () and then only applying it when the first
|
||||
text output actually happens. During refactoring to move the
|
||||
grub_console_setcolorstate () up higher in the grub-core/term/efi/console.c
|
||||
file the code to cache the color-state + bail early was accidentally
|
||||
dropped.
|
||||
|
||||
Restore the cache the color-state + bail early behavior from the original.
|
||||
|
||||
Cc: Javier Martinez Canillas <javierm@redhat.com>
|
||||
Fixes: 2d7c3abd871f ("efi/console: Do not set text-mode until we actually need it")
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
---
|
||||
grub-core/term/efi/console.c | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/grub-core/term/efi/console.c b/grub-core/term/efi/console.c
|
||||
index 2f1ae85ba7d..c44b2ac318c 100644
|
||||
--- a/grub-core/term/efi/console.c
|
||||
+++ b/grub-core/term/efi/console.c
|
||||
@@ -82,6 +82,16 @@ grub_console_setcolorstate (struct grub_term_output *term
|
||||
{
|
||||
grub_efi_simple_text_output_interface_t *o;
|
||||
|
||||
+ if (grub_efi_is_finished || text_mode != GRUB_TEXT_MODE_AVAILABLE)
|
||||
+ {
|
||||
+ /*
|
||||
+ * Cache colorstate changes before the first text-output, this avoids
|
||||
+ * "color_normal" environment writes causing a switch to textmode.
|
||||
+ */
|
||||
+ text_colorstate = state;
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
if (grub_efi_is_finished)
|
||||
return;
|
||||
|
@ -0,0 +1,71 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Fri, 28 Jan 2022 12:43:49 +0100
|
||||
Subject: [PATCH] EFI: console: Do not set cursor until the first text output
|
||||
|
||||
To allow flickerfree boot the EFI console code does not call
|
||||
grub_efi_set_text_mode (1) until some text is actually output.
|
||||
|
||||
Depending on if the output text is because of an error loading
|
||||
e.g. the .cfg file; or because of showing the menu the cursor needs
|
||||
to be on or off when the first text is shown.
|
||||
|
||||
So far the cursor was hardcoded to being on, but this is causing
|
||||
drawing artifacts + slow drawing of the menu as reported here:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1946969
|
||||
|
||||
Handle the cursorstate in the same way as the colorstate to fix this,
|
||||
when no text has been output yet, just cache the cursorstate and
|
||||
then use the last set value when the first text is output.
|
||||
|
||||
Fixes: 2d7c3abd871f ("efi/console: Do not set text-mode until we actually need it")
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
---
|
||||
grub-core/term/efi/console.c | 19 ++++++++++++++++---
|
||||
1 file changed, 16 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/grub-core/term/efi/console.c b/grub-core/term/efi/console.c
|
||||
index c44b2ac318c..a3622e4fe5f 100644
|
||||
--- a/grub-core/term/efi/console.c
|
||||
+++ b/grub-core/term/efi/console.c
|
||||
@@ -31,7 +31,15 @@ typedef enum {
|
||||
}
|
||||
grub_text_mode;
|
||||
|
||||
+typedef enum {
|
||||
+ GRUB_CURSOR_MODE_UNDEFINED = -1,
|
||||
+ GRUB_CURSOR_MODE_OFF = 0,
|
||||
+ GRUB_CURSUR_MODE_ON
|
||||
+}
|
||||
+grub_cursor_mode;
|
||||
+
|
||||
static grub_text_mode text_mode = GRUB_TEXT_MODE_UNDEFINED;
|
||||
+static grub_cursor_mode cursor_mode = GRUB_CURSOR_MODE_UNDEFINED;
|
||||
static grub_term_color_state text_colorstate = GRUB_TERM_COLOR_UNDEFINED;
|
||||
|
||||
static grub_uint32_t
|
||||
@@ -119,8 +127,12 @@ grub_console_setcursor (struct grub_term_output *term __attribute__ ((unused)),
|
||||
{
|
||||
grub_efi_simple_text_output_interface_t *o;
|
||||
|
||||
- if (grub_efi_is_finished)
|
||||
- return;
|
||||
+ if (grub_efi_is_finished || text_mode != GRUB_TEXT_MODE_AVAILABLE)
|
||||
+ {
|
||||
+ /* Cache cursor changes before the first text-output */
|
||||
+ cursor_mode = on;
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
o = grub_efi_system_table->con_out;
|
||||
efi_call_2 (o->enable_cursor, o, on);
|
||||
@@ -143,7 +155,8 @@ grub_prepare_for_text_output (struct grub_term_output *term)
|
||||
return GRUB_ERR_BAD_DEVICE;
|
||||
}
|
||||
|
||||
- grub_console_setcursor (term, 1);
|
||||
+ if (cursor_mode != GRUB_CURSOR_MODE_UNDEFINED)
|
||||
+ grub_console_setcursor (term, cursor_mode);
|
||||
if (text_colorstate != GRUB_TERM_COLOR_UNDEFINED)
|
||||
grub_console_setcolorstate (term, text_colorstate);
|
||||
text_mode = GRUB_TEXT_MODE_AVAILABLE;
|
93
0205-Use-visual-indentation-in-config.h.in.patch
Normal file
93
0205-Use-visual-indentation-in-config.h.in.patch
Normal file
@ -0,0 +1,93 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Robbie Harwood <rharwood@redhat.com>
|
||||
Date: Wed, 15 Dec 2021 15:46:13 -0500
|
||||
Subject: [PATCH] Use visual indentation in config.h.in
|
||||
|
||||
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
||||
(cherry picked from commit de8051f34de0aa55c921a510974e5bb27e39c17b)
|
||||
[rharwood: GRUB_RPM_CONFIG presence]
|
||||
---
|
||||
config.h.in | 58 +++++++++++++++++++++++++++++-----------------------------
|
||||
1 file changed, 29 insertions(+), 29 deletions(-)
|
||||
|
||||
diff --git a/config.h.in b/config.h.in
|
||||
index c80e3e0aba3..f2ed0066ec0 100644
|
||||
--- a/config.h.in
|
||||
+++ b/config.h.in
|
||||
@@ -23,47 +23,47 @@
|
||||
#define MINILZO_CFG_SKIP_LZO1X_DECOMPRESS 1
|
||||
|
||||
#if defined (GRUB_BUILD)
|
||||
-#undef ENABLE_NLS
|
||||
-#define BUILD_SIZEOF_LONG @BUILD_SIZEOF_LONG@
|
||||
-#define BUILD_SIZEOF_VOID_P @BUILD_SIZEOF_VOID_P@
|
||||
-#if defined __APPLE__
|
||||
-# if defined __BIG_ENDIAN__
|
||||
-# define BUILD_WORDS_BIGENDIAN 1
|
||||
-# else
|
||||
-# define BUILD_WORDS_BIGENDIAN 0
|
||||
-# endif
|
||||
-#else
|
||||
-#define BUILD_WORDS_BIGENDIAN @BUILD_WORDS_BIGENDIAN@
|
||||
-#endif
|
||||
+# undef ENABLE_NLS
|
||||
+# define BUILD_SIZEOF_LONG @BUILD_SIZEOF_LONG@
|
||||
+# define BUILD_SIZEOF_VOID_P @BUILD_SIZEOF_VOID_P@
|
||||
+# if defined __APPLE__
|
||||
+# if defined __BIG_ENDIAN__
|
||||
+# define BUILD_WORDS_BIGENDIAN 1
|
||||
+# else
|
||||
+# define BUILD_WORDS_BIGENDIAN 0
|
||||
+# endif
|
||||
+# else /* !defined __APPLE__ */
|
||||
+# define BUILD_WORDS_BIGENDIAN @BUILD_WORDS_BIGENDIAN@
|
||||
+# endif /* !defined __APPLE__ */
|
||||
#elif defined (GRUB_UTIL) || !defined (GRUB_MACHINE)
|
||||
-#include <config-util.h>
|
||||
-#else
|
||||
-#define HAVE_FONT_SOURCE @HAVE_FONT_SOURCE@
|
||||
+# include <config-util.h>
|
||||
+#else /* !defined GRUB_UTIL && defined GRUB_MACHINE */
|
||||
+# define HAVE_FONT_SOURCE @HAVE_FONT_SOURCE@
|
||||
/* Define if C symbols get an underscore after compilation. */
|
||||
-#define HAVE_ASM_USCORE @HAVE_ASM_USCORE@
|
||||
+# define HAVE_ASM_USCORE @HAVE_ASM_USCORE@
|
||||
/* Define it to one of __bss_start, edata and _edata. */
|
||||
-#define BSS_START_SYMBOL @BSS_START_SYMBOL@
|
||||
+# define BSS_START_SYMBOL @BSS_START_SYMBOL@
|
||||
/* Define it to either end or _end. */
|
||||
-#define END_SYMBOL @END_SYMBOL@
|
||||
+# define END_SYMBOL @END_SYMBOL@
|
||||
/* Name of package. */
|
||||
-#define PACKAGE "@PACKAGE@"
|
||||
+# define PACKAGE "@PACKAGE@"
|
||||
/* Version number of package. */
|
||||
-#define VERSION "@VERSION@"
|
||||
+# define VERSION "@VERSION@"
|
||||
/* Define to the full name and version of this package. */
|
||||
-#define PACKAGE_STRING "@PACKAGE_STRING@"
|
||||
+# define PACKAGE_STRING "@PACKAGE_STRING@"
|
||||
/* Define to the version of this package. */
|
||||
-#define PACKAGE_VERSION "@PACKAGE_VERSION@"
|
||||
+# define PACKAGE_VERSION "@PACKAGE_VERSION@"
|
||||
/* Define to the full name of this package. */
|
||||
-#define PACKAGE_NAME "@PACKAGE_NAME@"
|
||||
+# define PACKAGE_NAME "@PACKAGE_NAME@"
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
-#define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
|
||||
+# define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
|
||||
|
||||
-#define GRUB_TARGET_CPU "@GRUB_TARGET_CPU@"
|
||||
-#define GRUB_PLATFORM "@GRUB_PLATFORM@"
|
||||
-#define GRUB_RPM_VERSION "@GRUB_RPM_VERSION@"
|
||||
+# define GRUB_TARGET_CPU "@GRUB_TARGET_CPU@"
|
||||
+# define GRUB_PLATFORM "@GRUB_PLATFORM@"
|
||||
+# define GRUB_RPM_VERSION "@GRUB_RPM_VERSION@"
|
||||
|
||||
-#define RE_ENABLE_I18N 1
|
||||
+# define RE_ENABLE_I18N 1
|
||||
|
||||
-#define _GNU_SOURCE 1
|
||||
+# define _GNU_SOURCE 1
|
||||
|
||||
#endif
|
275
0206-Where-present-ensure-config-util.h-precedes-config.h.patch
Normal file
275
0206-Where-present-ensure-config-util.h-precedes-config.h.patch
Normal file
@ -0,0 +1,275 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Robbie Harwood <rharwood@redhat.com>
|
||||
Date: Tue, 22 Feb 2022 16:57:54 -0500
|
||||
Subject: [PATCH] Where present, ensure config-util.h precedes config.h
|
||||
|
||||
gnulib defines go in config-util.h, and we need to know whether to
|
||||
provide duplicates in config.h or not.
|
||||
|
||||
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
||||
(cherry picked from commit 46e82b28e1a75703d0424c7e13d009171310c6cd)
|
||||
[rharwood: gensymlist isn't part of tarballs]
|
||||
---
|
||||
grub-core/disk/host.c | 2 +-
|
||||
grub-core/kern/emu/argp_common.c | 2 +-
|
||||
grub-core/kern/emu/main.c | 2 +-
|
||||
grub-core/osdep/aros/config.c | 2 +-
|
||||
grub-core/osdep/basic/emunet.c | 2 +-
|
||||
grub-core/osdep/basic/init.c | 2 +-
|
||||
grub-core/osdep/haiku/getroot.c | 2 +-
|
||||
grub-core/osdep/linux/emunet.c | 2 +-
|
||||
grub-core/osdep/unix/config.c | 2 +-
|
||||
grub-core/osdep/unix/cputime.c | 2 +-
|
||||
grub-core/osdep/unix/dl.c | 2 +-
|
||||
grub-core/osdep/unix/emuconsole.c | 2 +-
|
||||
grub-core/osdep/unix/getroot.c | 2 +-
|
||||
grub-core/osdep/windows/config.c | 2 +-
|
||||
grub-core/osdep/windows/cputime.c | 2 +-
|
||||
grub-core/osdep/windows/dl.c | 2 +-
|
||||
grub-core/osdep/windows/emuconsole.c | 2 +-
|
||||
grub-core/osdep/windows/init.c | 2 +-
|
||||
18 files changed, 18 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/grub-core/disk/host.c b/grub-core/disk/host.c
|
||||
index c151d225df7..f34529f86ae 100644
|
||||
--- a/grub-core/disk/host.c
|
||||
+++ b/grub-core/disk/host.c
|
||||
@@ -20,8 +20,8 @@
|
||||
/* When using the disk, make a reference to this module. Otherwise
|
||||
the user will end up with a useless module :-). */
|
||||
|
||||
-#include <config.h>
|
||||
#include <config-util.h>
|
||||
+#include <config.h>
|
||||
|
||||
#include <grub/dl.h>
|
||||
#include <grub/disk.h>
|
||||
diff --git a/grub-core/kern/emu/argp_common.c b/grub-core/kern/emu/argp_common.c
|
||||
index 16688587037..8cb4608c3df 100644
|
||||
--- a/grub-core/kern/emu/argp_common.c
|
||||
+++ b/grub-core/kern/emu/argp_common.c
|
||||
@@ -17,8 +17,8 @@
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
-#include <config.h>
|
||||
#include <config-util.h>
|
||||
+#include <config.h>
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wmissing-prototypes"
|
||||
#pragma GCC diagnostic ignored "-Wmissing-declarations"
|
||||
diff --git a/grub-core/kern/emu/main.c b/grub-core/kern/emu/main.c
|
||||
index 846fe9715ec..3e7929cc4af 100644
|
||||
--- a/grub-core/kern/emu/main.c
|
||||
+++ b/grub-core/kern/emu/main.c
|
||||
@@ -16,8 +16,8 @@
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
-#include <config.h>
|
||||
#include <config-util.h>
|
||||
+#include <config.h>
|
||||
|
||||
#include <time.h>
|
||||
#include <stdio.h>
|
||||
diff --git a/grub-core/osdep/aros/config.c b/grub-core/osdep/aros/config.c
|
||||
index c82d0ea8e76..55f5728efca 100644
|
||||
--- a/grub-core/osdep/aros/config.c
|
||||
+++ b/grub-core/osdep/aros/config.c
|
||||
@@ -16,8 +16,8 @@
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
-#include <config.h>
|
||||
#include <config-util.h>
|
||||
+#include <config.h>
|
||||
|
||||
#include <grub/emu/hostdisk.h>
|
||||
#include <grub/emu/exec.h>
|
||||
diff --git a/grub-core/osdep/basic/emunet.c b/grub-core/osdep/basic/emunet.c
|
||||
index 6362e5cfbb3..dbfd316d613 100644
|
||||
--- a/grub-core/osdep/basic/emunet.c
|
||||
+++ b/grub-core/osdep/basic/emunet.c
|
||||
@@ -16,8 +16,8 @@
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
-#include <config.h>
|
||||
#include <config-util.h>
|
||||
+#include <config.h>
|
||||
|
||||
#include <grub/i18n.h>
|
||||
#include <grub/emu/net.h>
|
||||
diff --git a/grub-core/osdep/basic/init.c b/grub-core/osdep/basic/init.c
|
||||
index c54c710dbcb..b104c7e162b 100644
|
||||
--- a/grub-core/osdep/basic/init.c
|
||||
+++ b/grub-core/osdep/basic/init.c
|
||||
@@ -16,8 +16,8 @@
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
-#include <config.h>
|
||||
#include <config-util.h>
|
||||
+#include <config.h>
|
||||
|
||||
#include <grub/util/misc.h>
|
||||
#include <grub/i18n.h>
|
||||
diff --git a/grub-core/osdep/haiku/getroot.c b/grub-core/osdep/haiku/getroot.c
|
||||
index 4e123c0903a..927a1ebc941 100644
|
||||
--- a/grub-core/osdep/haiku/getroot.c
|
||||
+++ b/grub-core/osdep/haiku/getroot.c
|
||||
@@ -1,5 +1,5 @@
|
||||
-#include <config.h>
|
||||
#include <config-util.h>
|
||||
+#include <config.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <string.h>
|
||||
diff --git a/grub-core/osdep/linux/emunet.c b/grub-core/osdep/linux/emunet.c
|
||||
index 19b188f09ee..d5a6417355f 100644
|
||||
--- a/grub-core/osdep/linux/emunet.c
|
||||
+++ b/grub-core/osdep/linux/emunet.c
|
||||
@@ -16,8 +16,8 @@
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
-#include <config.h>
|
||||
#include <config-util.h>
|
||||
+#include <config.h>
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
diff --git a/grub-core/osdep/unix/config.c b/grub-core/osdep/unix/config.c
|
||||
index 46a881530c0..0ce0e309ac0 100644
|
||||
--- a/grub-core/osdep/unix/config.c
|
||||
+++ b/grub-core/osdep/unix/config.c
|
||||
@@ -16,8 +16,8 @@
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
-#include <config.h>
|
||||
#include <config-util.h>
|
||||
+#include <config.h>
|
||||
|
||||
#include <grub/emu/hostdisk.h>
|
||||
#include <grub/emu/exec.h>
|
||||
diff --git a/grub-core/osdep/unix/cputime.c b/grub-core/osdep/unix/cputime.c
|
||||
index cff359a3b94..fb6ff55a1a7 100644
|
||||
--- a/grub-core/osdep/unix/cputime.c
|
||||
+++ b/grub-core/osdep/unix/cputime.c
|
||||
@@ -1,5 +1,5 @@
|
||||
-#include <config.h>
|
||||
#include <config-util.h>
|
||||
+#include <config.h>
|
||||
|
||||
#include <sys/times.h>
|
||||
#include <unistd.h>
|
||||
diff --git a/grub-core/osdep/unix/dl.c b/grub-core/osdep/unix/dl.c
|
||||
index 562b101a280..99b189bc1c9 100644
|
||||
--- a/grub-core/osdep/unix/dl.c
|
||||
+++ b/grub-core/osdep/unix/dl.c
|
||||
@@ -16,8 +16,8 @@
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
-#include <config.h>
|
||||
#include <config-util.h>
|
||||
+#include <config.h>
|
||||
|
||||
#include <grub/dl.h>
|
||||
#include <grub/misc.h>
|
||||
diff --git a/grub-core/osdep/unix/emuconsole.c b/grub-core/osdep/unix/emuconsole.c
|
||||
index 7308798efe9..cac159424d8 100644
|
||||
--- a/grub-core/osdep/unix/emuconsole.c
|
||||
+++ b/grub-core/osdep/unix/emuconsole.c
|
||||
@@ -17,8 +17,8 @@
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
-#include <config.h>
|
||||
#include <config-util.h>
|
||||
+#include <config.h>
|
||||
|
||||
#include <grub/term.h>
|
||||
#include <grub/types.h>
|
||||
diff --git a/grub-core/osdep/unix/getroot.c b/grub-core/osdep/unix/getroot.c
|
||||
index 46d7116c6e6..4f436284ce0 100644
|
||||
--- a/grub-core/osdep/unix/getroot.c
|
||||
+++ b/grub-core/osdep/unix/getroot.c
|
||||
@@ -16,8 +16,8 @@
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
-#include <config-util.h>
|
||||
#include <config.h>
|
||||
+#include <config-util.h>
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
diff --git a/grub-core/osdep/windows/config.c b/grub-core/osdep/windows/config.c
|
||||
index 928ab1a49be..2bb8a2fd88e 100644
|
||||
--- a/grub-core/osdep/windows/config.c
|
||||
+++ b/grub-core/osdep/windows/config.c
|
||||
@@ -16,8 +16,8 @@
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
-#include <config.h>
|
||||
#include <config-util.h>
|
||||
+#include <config.h>
|
||||
|
||||
#include <grub/emu/hostfile.h>
|
||||
#include <grub/emu/config.h>
|
||||
diff --git a/grub-core/osdep/windows/cputime.c b/grub-core/osdep/windows/cputime.c
|
||||
index 3568aa2d359..5d06d79dd53 100644
|
||||
--- a/grub-core/osdep/windows/cputime.c
|
||||
+++ b/grub-core/osdep/windows/cputime.c
|
||||
@@ -1,5 +1,5 @@
|
||||
-#include <config.h>
|
||||
#include <config-util.h>
|
||||
+#include <config.h>
|
||||
|
||||
#include <grub/emu/misc.h>
|
||||
#include <windows.h>
|
||||
diff --git a/grub-core/osdep/windows/dl.c b/grub-core/osdep/windows/dl.c
|
||||
index eec6a24ad7f..8eab7057e4d 100644
|
||||
--- a/grub-core/osdep/windows/dl.c
|
||||
+++ b/grub-core/osdep/windows/dl.c
|
||||
@@ -16,8 +16,8 @@
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
-#include <config.h>
|
||||
#include <config-util.h>
|
||||
+#include <config.h>
|
||||
|
||||
#include <grub/dl.h>
|
||||
#include <grub/misc.h>
|
||||
diff --git a/grub-core/osdep/windows/emuconsole.c b/grub-core/osdep/windows/emuconsole.c
|
||||
index 4fb3693cc01..17a44de4690 100644
|
||||
--- a/grub-core/osdep/windows/emuconsole.c
|
||||
+++ b/grub-core/osdep/windows/emuconsole.c
|
||||
@@ -16,8 +16,8 @@
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
-#include <config.h>
|
||||
#include <config-util.h>
|
||||
+#include <config.h>
|
||||
|
||||
#include <grub/term.h>
|
||||
#include <grub/misc.h>
|
||||
diff --git a/grub-core/osdep/windows/init.c b/grub-core/osdep/windows/init.c
|
||||
index 6297de6326a..51a9647dde4 100644
|
||||
--- a/grub-core/osdep/windows/init.c
|
||||
+++ b/grub-core/osdep/windows/init.c
|
||||
@@ -16,8 +16,8 @@
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
-#include <config.h>
|
||||
#include <config-util.h>
|
||||
+#include <config.h>
|
||||
#include <grub/util/misc.h>
|
||||
#include <grub/osdep/hostfile.h>
|
||||
#include <grub/util/windows.h>
|
140
0207-Drop-gnulib-fix-base64.patch.patch
Normal file
140
0207-Drop-gnulib-fix-base64.patch.patch
Normal file
@ -0,0 +1,140 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Robbie Harwood <rharwood@redhat.com>
|
||||
Date: Thu, 28 Oct 2021 15:07:50 -0400
|
||||
Subject: [PATCH] Drop gnulib fix-base64.patch
|
||||
|
||||
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 <rharwood@redhat.com>
|
||||
(cherry picked from commit 54fd1c3301dd15f6b6212c12887265e8a6cbc076)
|
||||
---
|
||||
grub-core/lib/posix_wrap/sys/types.h | 7 +++----
|
||||
grub-core/lib/xzembed/xz.h | 5 +----
|
||||
bootstrap.conf | 3 ++-
|
||||
conf/Makefile.extra-dist | 1 -
|
||||
config.h.in | 4 ++++
|
||||
grub-core/lib/gnulib-patches/fix-base64.patch | 21 ---------------------
|
||||
6 files changed, 10 insertions(+), 31 deletions(-)
|
||||
delete mode 100644 grub-core/lib/gnulib-patches/fix-base64.patch
|
||||
|
||||
diff --git a/grub-core/lib/posix_wrap/sys/types.h b/grub-core/lib/posix_wrap/sys/types.h
|
||||
index f63412c8da0..2f3e865495a 100644
|
||||
--- a/grub-core/lib/posix_wrap/sys/types.h
|
||||
+++ b/grub-core/lib/posix_wrap/sys/types.h
|
||||
@@ -23,11 +23,10 @@
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
+/* Provided by gnulib if not present. */
|
||||
+#include <stdbool.h>
|
||||
+
|
||||
typedef grub_ssize_t ssize_t;
|
||||
-#ifndef GRUB_POSIX_BOOL_DEFINED
|
||||
-typedef enum { false = 0, true = 1 } bool;
|
||||
-#define GRUB_POSIX_BOOL_DEFINED 1
|
||||
-#endif
|
||||
|
||||
typedef grub_uint8_t uint8_t;
|
||||
typedef grub_uint16_t uint16_t;
|
||||
diff --git a/grub-core/lib/xzembed/xz.h b/grub-core/lib/xzembed/xz.h
|
||||
index f7b32d80032..d1417039aa4 100644
|
||||
--- a/grub-core/lib/xzembed/xz.h
|
||||
+++ b/grub-core/lib/xzembed/xz.h
|
||||
@@ -29,10 +29,7 @@
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <grub/misc.h>
|
||||
-
|
||||
-#ifndef GRUB_POSIX_BOOL_DEFINED
|
||||
-typedef enum { false = 0, true = 1 } bool;
|
||||
-#endif
|
||||
+#include <stdbool.h>
|
||||
|
||||
/**
|
||||
* enum xz_ret - Return codes
|
||||
diff --git a/bootstrap.conf b/bootstrap.conf
|
||||
index 52d4af44bec..645e3a459ce 100644
|
||||
--- a/bootstrap.conf
|
||||
+++ b/bootstrap.conf
|
||||
@@ -35,6 +35,7 @@ gnulib_modules="
|
||||
realloc-gnu
|
||||
regex
|
||||
save-cwd
|
||||
+ stdbool
|
||||
"
|
||||
|
||||
gnulib_tool_option_extras="\
|
||||
@@ -79,7 +80,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/conf/Makefile.extra-dist b/conf/Makefile.extra-dist
|
||||
index ea58362b555..ca6a50deca9 100644
|
||||
--- a/conf/Makefile.extra-dist
|
||||
+++ b/conf/Makefile.extra-dist
|
||||
@@ -30,7 +30,6 @@ EXTRA_DIST += grub-core/gensymlist.sh
|
||||
EXTRA_DIST += grub-core/genemuinit.sh
|
||||
EXTRA_DIST += grub-core/genemuinitheader.sh
|
||||
|
||||
-EXTRA_DIST += grub-core/lib/gnulib-patches/fix-base64.patch
|
||||
EXTRA_DIST += grub-core/lib/gnulib-patches/fix-null-deref.patch
|
||||
EXTRA_DIST += grub-core/lib/gnulib-patches/fix-null-state-deref.patch
|
||||
EXTRA_DIST += grub-core/lib/gnulib-patches/fix-regcomp-uninit-token.patch
|
||||
diff --git a/config.h.in b/config.h.in
|
||||
index f2ed0066ec0..9c7b4afaaad 100644
|
||||
--- a/config.h.in
|
||||
+++ b/config.h.in
|
||||
@@ -66,4 +66,8 @@
|
||||
|
||||
# define _GNU_SOURCE 1
|
||||
|
||||
+# ifndef _GL_INLINE_HEADER_BEGIN
|
||||
+# define _GL_ATTRIBUTE_CONST __attribute__ ((const))
|
||||
+# endif /* !_GL_INLINE_HEADER_BEGIN */
|
||||
+
|
||||
#endif
|
||||
diff --git a/grub-core/lib/gnulib-patches/fix-base64.patch b/grub-core/lib/gnulib-patches/fix-base64.patch
|
||||
deleted file mode 100644
|
||||
index 985db127971..00000000000
|
||||
--- a/grub-core/lib/gnulib-patches/fix-base64.patch
|
||||
+++ /dev/null
|
||||
@@ -1,21 +0,0 @@
|
||||
-diff --git a/lib/base64.h b/lib/base64.h
|
||||
-index 9cd0183b8..185a2afa1 100644
|
||||
---- a/lib/base64.h
|
||||
-+++ b/lib/base64.h
|
||||
-@@ -21,8 +21,14 @@
|
||||
- /* Get size_t. */
|
||||
- # include <stddef.h>
|
||||
-
|
||||
--/* Get bool. */
|
||||
--# include <stdbool.h>
|
||||
-+#ifndef GRUB_POSIX_BOOL_DEFINED
|
||||
-+typedef enum { false = 0, true = 1 } bool;
|
||||
-+#define GRUB_POSIX_BOOL_DEFINED 1
|
||||
-+#endif
|
||||
-+
|
||||
-+#ifndef _GL_ATTRIBUTE_CONST
|
||||
-+# define _GL_ATTRIBUTE_CONST /* empty */
|
||||
-+#endif
|
||||
-
|
||||
- # ifdef __cplusplus
|
||||
- extern "C" {
|
97
0208-Drop-gnulib-no-abort.patch.patch
Normal file
97
0208-Drop-gnulib-no-abort.patch.patch
Normal file
@ -0,0 +1,97 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Robbie Harwood <rharwood@redhat.com>
|
||||
Date: Wed, 5 Jan 2022 16:42:11 -0500
|
||||
Subject: [PATCH] Drop gnulib no-abort.patch
|
||||
|
||||
Originally added in db7337a3d353a817ffe9eb4a3702120527100be9, this
|
||||
patched out all relevant invocations of abort() in gnulib. While it was
|
||||
not documented why at the time, testing suggests that there's no abort()
|
||||
implementation available for gnulib to use.
|
||||
|
||||
gnulib's position is that the use of abort() is correct here, since it
|
||||
happens when input violates a "shall" from POSIX. Additionally, the
|
||||
code in question is probably not reachable. Since abort() is more
|
||||
friendly to user-space, they prefer to make no change, so we can just
|
||||
carry a define instead. (Suggested by Paul Eggert.)
|
||||
|
||||
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
||||
(cherry picked from commit 5137c8eb3ec11c3217acea1a93a3f88f3fa4cbca)
|
||||
---
|
||||
bootstrap.conf | 2 +-
|
||||
conf/Makefile.extra-dist | 1 -
|
||||
config.h.in | 3 +++
|
||||
grub-core/lib/gnulib-patches/no-abort.patch | 26 --------------------------
|
||||
4 files changed, 4 insertions(+), 28 deletions(-)
|
||||
delete mode 100644 grub-core/lib/gnulib-patches/no-abort.patch
|
||||
|
||||
diff --git a/bootstrap.conf b/bootstrap.conf
|
||||
index 645e3a459ce..71ce943c7d4 100644
|
||||
--- a/bootstrap.conf
|
||||
+++ b/bootstrap.conf
|
||||
@@ -81,7 +81,7 @@ cp -a INSTALL INSTALL.grub
|
||||
bootstrap_post_import_hook () {
|
||||
set -e
|
||||
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
|
||||
+ fix-regexec-null-deref fix-uninit-structure fix-unused-value fix-width; do
|
||||
patch -d grub-core/lib/gnulib -p2 \
|
||||
< "grub-core/lib/gnulib-patches/$patchname.patch"
|
||||
done
|
||||
diff --git a/conf/Makefile.extra-dist b/conf/Makefile.extra-dist
|
||||
index ca6a50deca9..16248ccf032 100644
|
||||
--- a/conf/Makefile.extra-dist
|
||||
+++ b/conf/Makefile.extra-dist
|
||||
@@ -37,7 +37,6 @@ EXTRA_DIST += grub-core/lib/gnulib-patches/fix-regexec-null-deref.patch
|
||||
EXTRA_DIST += grub-core/lib/gnulib-patches/fix-uninit-structure.patch
|
||||
EXTRA_DIST += grub-core/lib/gnulib-patches/fix-unused-value.patch
|
||||
EXTRA_DIST += grub-core/lib/gnulib-patches/fix-width.patch
|
||||
-EXTRA_DIST += grub-core/lib/gnulib-patches/no-abort.patch
|
||||
|
||||
EXTRA_DIST += grub-core/lib/libgcrypt
|
||||
EXTRA_DIST += grub-core/lib/libgcrypt-grub/mpi/generic
|
||||
diff --git a/config.h.in b/config.h.in
|
||||
index 9c7b4afaaad..c3134309c63 100644
|
||||
--- a/config.h.in
|
||||
+++ b/config.h.in
|
||||
@@ -68,6 +68,9 @@
|
||||
|
||||
# ifndef _GL_INLINE_HEADER_BEGIN
|
||||
# define _GL_ATTRIBUTE_CONST __attribute__ ((const))
|
||||
+
|
||||
+/* We don't have an abort() for gnulib to call in regexp. */
|
||||
+# define abort __builtin_unreachable
|
||||
# endif /* !_GL_INLINE_HEADER_BEGIN */
|
||||
|
||||
#endif
|
||||
diff --git a/grub-core/lib/gnulib-patches/no-abort.patch b/grub-core/lib/gnulib-patches/no-abort.patch
|
||||
deleted file mode 100644
|
||||
index e469c4762eb..00000000000
|
||||
--- a/grub-core/lib/gnulib-patches/no-abort.patch
|
||||
+++ /dev/null
|
||||
@@ -1,26 +0,0 @@
|
||||
-diff --git a/lib/regcomp.c b/lib/regcomp.c
|
||||
-index cc85f35ac..de45ebb5c 100644
|
||||
---- a/lib/regcomp.c
|
||||
-+++ b/lib/regcomp.c
|
||||
-@@ -528,9 +528,9 @@ regerror (int errcode, const regex_t *__restrict preg, char *__restrict errbuf,
|
||||
- to this routine. If we are given anything else, or if other regex
|
||||
- code generates an invalid error code, then the program has a bug.
|
||||
- Dump core so we can fix it. */
|
||||
-- abort ();
|
||||
--
|
||||
-- msg = gettext (__re_error_msgid + __re_error_msgid_idx[errcode]);
|
||||
-+ msg = gettext ("unknown regexp error");
|
||||
-+ else
|
||||
-+ msg = gettext (__re_error_msgid + __re_error_msgid_idx[errcode]);
|
||||
-
|
||||
- msg_size = strlen (msg) + 1; /* Includes the null. */
|
||||
-
|
||||
-@@ -1136,7 +1136,7 @@ optimize_utf8 (re_dfa_t *dfa)
|
||||
- }
|
||||
- break;
|
||||
- default:
|
||||
-- abort ();
|
||||
-+ break;
|
||||
- }
|
||||
-
|
||||
- if (mb_chars || has_period)
|
832
0209-Update-gnulib-version-and-drop-most-gnulib-patches.patch
Normal file
832
0209-Update-gnulib-version-and-drop-most-gnulib-patches.patch
Normal file
@ -0,0 +1,832 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Robbie Harwood <rharwood@redhat.com>
|
||||
Date: Wed, 15 Dec 2021 15:07:50 -0500
|
||||
Subject: [PATCH] Update gnulib version and drop most gnulib patches
|
||||
|
||||
In addition to the changes carried in our gnulib patches, several
|
||||
Coverity and code hygiene fixes that were previously downstream are also
|
||||
included in this 3-year gnulib increment.
|
||||
|
||||
Unfortunately, fix-width.patch is retained.
|
||||
|
||||
Bump minimum autoconf version from 2.63 to 2.64 and automake from 1.11
|
||||
to 1.14, as required by gnulib.
|
||||
|
||||
Sync bootstrap script itself with gnulib.
|
||||
|
||||
Update regexp module for new dynarray dependency.
|
||||
|
||||
Fix various new warnings.
|
||||
|
||||
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
||||
(cherry picked from commit deb18ff931c3133c2aa536a92bd92e50d6615303)
|
||||
[rharwood: backport around requirements in INSTALL]
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
grub-core/Makefile.core.def | 3 +
|
||||
grub-core/disk/luks2.c | 4 +-
|
||||
grub-core/lib/posix_wrap/limits.h | 6 +-
|
||||
include/grub/compiler.h | 4 +-
|
||||
include/grub/list.h | 2 +-
|
||||
INSTALL | 2 +-
|
||||
bootstrap | 291 ++++++++++++---------
|
||||
bootstrap.conf | 22 +-
|
||||
conf/Makefile.extra-dist | 6 -
|
||||
config.h.in | 68 +++++
|
||||
grub-core/lib/gnulib-patches/fix-null-deref.patch | 13 -
|
||||
.../lib/gnulib-patches/fix-null-state-deref.patch | 12 -
|
||||
.../gnulib-patches/fix-regcomp-uninit-token.patch | 15 --
|
||||
.../gnulib-patches/fix-regexec-null-deref.patch | 12 -
|
||||
.../lib/gnulib-patches/fix-uninit-structure.patch | 11 -
|
||||
.../lib/gnulib-patches/fix-unused-value.patch | 14 -
|
||||
17 files changed, 262 insertions(+), 225 deletions(-)
|
||||
delete mode 100644 grub-core/lib/gnulib-patches/fix-null-deref.patch
|
||||
delete mode 100644 grub-core/lib/gnulib-patches/fix-null-state-deref.patch
|
||||
delete mode 100644 grub-core/lib/gnulib-patches/fix-regcomp-uninit-token.patch
|
||||
delete mode 100644 grub-core/lib/gnulib-patches/fix-regexec-null-deref.patch
|
||||
delete mode 100644 grub-core/lib/gnulib-patches/fix-uninit-structure.patch
|
||||
delete mode 100644 grub-core/lib/gnulib-patches/fix-unused-value.patch
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 3527f069ab2..d04c94691ef 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -49,7 +49,7 @@ AC_CANONICAL_TARGET
|
||||
program_prefix="${save_program_prefix}"
|
||||
|
||||
AM_INIT_AUTOMAKE([1.11])
|
||||
-AC_PREREQ(2.63)
|
||||
+AC_PREREQ(2.64)
|
||||
AC_CONFIG_SRCDIR([include/grub/dl.h])
|
||||
AC_CONFIG_HEADER([config-util.h])
|
||||
|
||||
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
|
||||
index 6b00eb55575..39233096f29 100644
|
||||
--- a/grub-core/Makefile.core.def
|
||||
+++ b/grub-core/Makefile.core.def
|
||||
@@ -762,6 +762,9 @@ module = {
|
||||
name = regexp;
|
||||
common = commands/regexp.c;
|
||||
common = commands/wildcard.c;
|
||||
+ common = lib/gnulib/malloc/dynarray_finalize.c;
|
||||
+ common = lib/gnulib/malloc/dynarray_emplace_enlarge.c;
|
||||
+ common = lib/gnulib/malloc/dynarray_resize.c;
|
||||
common = lib/gnulib/regex.c;
|
||||
cflags = '$(CFLAGS_POSIX) $(CFLAGS_GNULIB)';
|
||||
cppflags = '$(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)';
|
||||
diff --git a/grub-core/disk/luks2.c b/grub-core/disk/luks2.c
|
||||
index 371a53b837d..c917a5f91e7 100644
|
||||
--- a/grub-core/disk/luks2.c
|
||||
+++ b/grub-core/disk/luks2.c
|
||||
@@ -389,7 +389,7 @@ luks2_verify_key (grub_luks2_digest_t *d, grub_uint8_t *candidate_key,
|
||||
{
|
||||
grub_uint8_t candidate_digest[GRUB_CRYPTODISK_MAX_KEYLEN];
|
||||
grub_uint8_t digest[GRUB_CRYPTODISK_MAX_KEYLEN], salt[GRUB_CRYPTODISK_MAX_KEYLEN];
|
||||
- grub_size_t saltlen = sizeof (salt), digestlen = sizeof (digest);
|
||||
+ idx_t saltlen = sizeof (salt), digestlen = sizeof (digest);
|
||||
const gcry_md_spec_t *hash;
|
||||
gcry_err_code_t gcry_ret;
|
||||
|
||||
@@ -428,7 +428,7 @@ luks2_decrypt_key (grub_uint8_t *out_key,
|
||||
grub_uint8_t area_key[GRUB_CRYPTODISK_MAX_KEYLEN];
|
||||
grub_uint8_t salt[GRUB_CRYPTODISK_MAX_KEYLEN];
|
||||
grub_uint8_t *split_key = NULL;
|
||||
- grub_size_t saltlen = sizeof (salt);
|
||||
+ idx_t saltlen = sizeof (salt);
|
||||
char cipher[32], *p;
|
||||
const gcry_md_spec_t *hash;
|
||||
gcry_err_code_t gcry_ret;
|
||||
diff --git a/grub-core/lib/posix_wrap/limits.h b/grub-core/lib/posix_wrap/limits.h
|
||||
index 591dbf3289d..4be7b408063 100644
|
||||
--- a/grub-core/lib/posix_wrap/limits.h
|
||||
+++ b/grub-core/lib/posix_wrap/limits.h
|
||||
@@ -25,7 +25,11 @@
|
||||
#define USHRT_MAX GRUB_USHRT_MAX
|
||||
#define UINT_MAX GRUB_UINT_MAX
|
||||
#define ULONG_MAX GRUB_ULONG_MAX
|
||||
-#define SIZE_MAX GRUB_SIZE_MAX
|
||||
+
|
||||
+/* gnulib also defines this type */
|
||||
+#ifndef SIZE_MAX
|
||||
+# define SIZE_MAX GRUB_SIZE_MAX
|
||||
+#endif
|
||||
|
||||
#define SCHAR_MIN GRUB_SCHAR_MIN
|
||||
#define SCHAR_MAX GRUB_SCHAR_MAX
|
||||
diff --git a/include/grub/compiler.h b/include/grub/compiler.h
|
||||
index ebafec68957..441a9eca07c 100644
|
||||
--- a/include/grub/compiler.h
|
||||
+++ b/include/grub/compiler.h
|
||||
@@ -30,10 +30,10 @@
|
||||
|
||||
/* Does this compiler support compile-time error attributes? */
|
||||
#if GNUC_PREREQ(4,3)
|
||||
-# define ATTRIBUTE_ERROR(msg) \
|
||||
+# define GRUB_ATTRIBUTE_ERROR(msg) \
|
||||
__attribute__ ((__error__ (msg)))
|
||||
#else
|
||||
-# define ATTRIBUTE_ERROR(msg) __attribute__ ((noreturn))
|
||||
+# define GRUB_ATTRIBUTE_ERROR(msg) __attribute__ ((noreturn))
|
||||
#endif
|
||||
|
||||
#if GNUC_PREREQ(4,4)
|
||||
diff --git a/include/grub/list.h b/include/grub/list.h
|
||||
index b13acb96243..21f4b4b44a1 100644
|
||||
--- a/include/grub/list.h
|
||||
+++ b/include/grub/list.h
|
||||
@@ -40,7 +40,7 @@ void EXPORT_FUNC(grub_list_remove) (grub_list_t item);
|
||||
|
||||
static inline void *
|
||||
grub_bad_type_cast_real (int line, const char *file)
|
||||
- ATTRIBUTE_ERROR ("bad type cast between incompatible grub types");
|
||||
+ GRUB_ATTRIBUTE_ERROR ("bad type cast between incompatible grub types");
|
||||
|
||||
static inline void *
|
||||
grub_bad_type_cast_real (int line, const char *file)
|
||||
diff --git a/INSTALL b/INSTALL
|
||||
index 79a0af7d937..ee9f536f760 100644
|
||||
--- a/INSTALL
|
||||
+++ b/INSTALL
|
||||
@@ -42,7 +42,7 @@ If you use a development snapshot or want to hack on GRUB you may
|
||||
need the following.
|
||||
|
||||
* Python 2.6 or later
|
||||
-* Autoconf 2.63 or later
|
||||
+* Autoconf 2.64 or later
|
||||
* Automake 1.11 or later
|
||||
|
||||
Prerequisites for make-check:
|
||||
diff --git a/bootstrap b/bootstrap
|
||||
index 5b08e7e2d42..dc2238f4adf 100755
|
||||
--- a/bootstrap
|
||||
+++ b/bootstrap
|
||||
@@ -1,10 +1,10 @@
|
||||
#! /bin/sh
|
||||
# Print a version string.
|
||||
-scriptversion=2019-01-04.17; # UTC
|
||||
+scriptversion=2022-01-26.05; # UTC
|
||||
|
||||
# Bootstrap this package from checked-out sources.
|
||||
|
||||
-# Copyright (C) 2003-2019 Free Software Foundation, Inc.
|
||||
+# Copyright (C) 2003-2022 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
|
||||
@@ -47,7 +47,7 @@ PERL="${PERL-perl}"
|
||||
|
||||
me=$0
|
||||
|
||||
-default_gnulib_url=git://git.sv.gnu.org/gnulib
|
||||
+default_gnulib_url=https://git.savannah.gnu.org/git/gnulib.git
|
||||
|
||||
usage() {
|
||||
cat <<EOF
|
||||
@@ -71,7 +71,9 @@ Options:
|
||||
--no-git do not use git to update gnulib. Requires that
|
||||
--gnulib-srcdir point to a correct gnulib snapshot
|
||||
--skip-po do not download po files
|
||||
-
|
||||
+EOF
|
||||
+ bootstrap_print_option_usage_hook
|
||||
+ cat <<EOF
|
||||
If the file $me.conf exists in the same directory as this script, its
|
||||
contents are read as shell variables to configure the bootstrap.
|
||||
|
||||
@@ -113,6 +115,12 @@ Running without arguments will suffice in most cases.
|
||||
EOF
|
||||
}
|
||||
|
||||
+copyright_year=`echo "$scriptversion" | sed -e 's/[^0-9].*//'`
|
||||
+copyright="Copyright (C) ${copyright_year} Free Software Foundation, Inc.
|
||||
+License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
|
||||
+This is free software: you are free to change and redistribute it.
|
||||
+There is NO WARRANTY, to the extent permitted by law."
|
||||
+
|
||||
# warnf_ FORMAT-STRING ARG1...
|
||||
warnf_ ()
|
||||
{
|
||||
@@ -154,6 +162,18 @@ gnulib_files=
|
||||
: ${AUTOPOINT=autopoint}
|
||||
: ${AUTORECONF=autoreconf}
|
||||
|
||||
+# A function to be called for each unrecognized option. Returns 0 if
|
||||
+# the option in $1 has been processed by the function. Returns 1 if
|
||||
+# the option has not been processed by the function. Override it via
|
||||
+# your own definition in bootstrap.conf
|
||||
+
|
||||
+bootstrap_option_hook() { return 1; }
|
||||
+
|
||||
+# A function to be called in order to print the --help information
|
||||
+# corresponding to user-defined command-line options.
|
||||
+
|
||||
+bootstrap_print_option_usage_hook() { :; }
|
||||
+
|
||||
# A function to be called right after gnulib-tool is run.
|
||||
# Override it via your own definition in bootstrap.conf.
|
||||
bootstrap_post_import_hook() { :; }
|
||||
@@ -166,11 +186,11 @@ bootstrap_epilogue() { :; }
|
||||
# specified directory. Fill in the first %s with the destination
|
||||
# directory and the second with the domain name.
|
||||
po_download_command_format=\
|
||||
-"wget --mirror --level=1 -nd -q -A.po -P '%s' \
|
||||
+"wget --mirror --level=1 -nd -nv -A.po -P '%s' \
|
||||
https://translationproject.org/latest/%s/"
|
||||
|
||||
# Prefer a non-empty tarname (4th argument of AC_INIT if given), else
|
||||
-# fall back to the package name (1st argument with munging)
|
||||
+# fall back to the package name (1st argument with munging).
|
||||
extract_package_name='
|
||||
/^AC_INIT(\[*/{
|
||||
s///
|
||||
@@ -187,8 +207,11 @@ extract_package_name='
|
||||
p
|
||||
}
|
||||
'
|
||||
-package=$(sed -n "$extract_package_name" configure.ac) \
|
||||
- || die 'cannot find package name in configure.ac'
|
||||
+package=$(${AUTOCONF:-autoconf} --trace AC_INIT:\$4 configure.ac 2>/dev/null)
|
||||
+if test -z "$package"; then
|
||||
+ package=$(sed -n "$extract_package_name" configure.ac) \
|
||||
+ || die 'cannot find package name in configure.ac'
|
||||
+fi
|
||||
gnulib_name=lib$package
|
||||
|
||||
build_aux=build-aux
|
||||
@@ -290,6 +313,116 @@ find_tool ()
|
||||
eval "export $find_tool_envvar"
|
||||
}
|
||||
|
||||
+# Strip blank and comment lines to leave significant entries.
|
||||
+gitignore_entries() {
|
||||
+ sed '/^#/d; /^$/d' "$@"
|
||||
+}
|
||||
+
|
||||
+# If $STR is not already on a line by itself in $FILE, insert it at the start.
|
||||
+# Entries are inserted at the start of the ignore list to ensure existing
|
||||
+# entries starting with ! are not overridden. Such entries support
|
||||
+# whitelisting exceptions after a more generic blacklist pattern.
|
||||
+insert_if_absent() {
|
||||
+ file=$1
|
||||
+ str=$2
|
||||
+ test -f $file || touch $file
|
||||
+ test -r $file || die "Error: failed to read ignore file: $file"
|
||||
+ duplicate_entries=$(gitignore_entries $file | sort | uniq -d)
|
||||
+ if [ "$duplicate_entries" ] ; then
|
||||
+ die "Error: Duplicate entries in $file: " $duplicate_entries
|
||||
+ fi
|
||||
+ linesold=$(gitignore_entries $file | wc -l)
|
||||
+ linesnew=$( { echo "$str"; cat $file; } | gitignore_entries | sort -u | wc -l)
|
||||
+ if [ $linesold != $linesnew ] ; then
|
||||
+ { echo "$str" | cat - $file > $file.bak && mv $file.bak $file; } \
|
||||
+ || die "insert_if_absent $file $str: failed"
|
||||
+ fi
|
||||
+}
|
||||
+
|
||||
+# Adjust $PATTERN for $VC_IGNORE_FILE and insert it with
|
||||
+# insert_if_absent.
|
||||
+insert_vc_ignore() {
|
||||
+ vc_ignore_file="$1"
|
||||
+ pattern="$2"
|
||||
+ case $vc_ignore_file in
|
||||
+ *.gitignore)
|
||||
+ # A .gitignore entry that does not start with '/' applies
|
||||
+ # recursively to subdirectories, so prepend '/' to every
|
||||
+ # .gitignore entry.
|
||||
+ pattern=$(echo "$pattern" | sed s,^,/,);;
|
||||
+ esac
|
||||
+ insert_if_absent "$vc_ignore_file" "$pattern"
|
||||
+}
|
||||
+
|
||||
+symlink_to_dir()
|
||||
+{
|
||||
+ src=$1/$2
|
||||
+ dst=${3-$2}
|
||||
+
|
||||
+ test -f "$src" && {
|
||||
+
|
||||
+ # If the destination directory doesn't exist, create it.
|
||||
+ # This is required at least for "lib/uniwidth/cjk.h".
|
||||
+ dst_dir=$(dirname "$dst")
|
||||
+ if ! test -d "$dst_dir"; then
|
||||
+ mkdir -p "$dst_dir"
|
||||
+
|
||||
+ # If we've just created a directory like lib/uniwidth,
|
||||
+ # tell version control system(s) it's ignorable.
|
||||
+ # FIXME: for now, this does only one level
|
||||
+ parent=$(dirname "$dst_dir")
|
||||
+ for dot_ig in x $vc_ignore; do
|
||||
+ test $dot_ig = x && continue
|
||||
+ ig=$parent/$dot_ig
|
||||
+ insert_vc_ignore $ig "${dst_dir##*/}"
|
||||
+ done
|
||||
+ fi
|
||||
+
|
||||
+ if $copy; then
|
||||
+ {
|
||||
+ test ! -h "$dst" || {
|
||||
+ echo "$me: rm -f $dst" &&
|
||||
+ rm -f "$dst"
|
||||
+ }
|
||||
+ } &&
|
||||
+ test -f "$dst" &&
|
||||
+ cmp -s "$src" "$dst" || {
|
||||
+ echo "$me: cp -fp $src $dst" &&
|
||||
+ cp -fp "$src" "$dst"
|
||||
+ }
|
||||
+ else
|
||||
+ # Leave any existing symlink alone, if it already points to the source,
|
||||
+ # so that broken build tools that care about symlink times
|
||||
+ # aren't confused into doing unnecessary builds. Conversely, if the
|
||||
+ # existing symlink's timestamp is older than the source, make it afresh,
|
||||
+ # so that broken tools aren't confused into skipping needed builds. See
|
||||
+ # <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00326.html>.
|
||||
+ test -h "$dst" &&
|
||||
+ src_ls=$(ls -diL "$src" 2>/dev/null) && set $src_ls && src_i=$1 &&
|
||||
+ dst_ls=$(ls -diL "$dst" 2>/dev/null) && set $dst_ls && dst_i=$1 &&
|
||||
+ test "$src_i" = "$dst_i" &&
|
||||
+ both_ls=$(ls -dt "$src" "$dst") &&
|
||||
+ test "X$both_ls" = "X$dst$nl$src" || {
|
||||
+ dot_dots=
|
||||
+ case $src in
|
||||
+ /*) ;;
|
||||
+ *)
|
||||
+ case /$dst/ in
|
||||
+ *//* | */../* | */./* | /*/*/*/*/*/)
|
||||
+ die "invalid symlink calculation: $src -> $dst";;
|
||||
+ /*/*/*/*/) dot_dots=../../../;;
|
||||
+ /*/*/*/) dot_dots=../../;;
|
||||
+ /*/*/) dot_dots=../;;
|
||||
+ esac;;
|
||||
+ esac
|
||||
+
|
||||
+ echo "$me: ln -fs $dot_dots$src $dst" &&
|
||||
+ ln -fs "$dot_dots$src" "$dst"
|
||||
+ }
|
||||
+ fi
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
# Override the default configuration, if necessary.
|
||||
# Make sure that bootstrap.conf is sourced from the current directory
|
||||
# if we were invoked as "sh bootstrap".
|
||||
@@ -320,6 +453,12 @@ do
|
||||
--help)
|
||||
usage
|
||||
exit;;
|
||||
+ --version)
|
||||
+ set -e
|
||||
+ echo "bootstrap $scriptversion"
|
||||
+ echo "$copyright"
|
||||
+ exit 0
|
||||
+ ;;
|
||||
--gnulib-srcdir=*)
|
||||
GNULIB_SRCDIR=${option#--gnulib-srcdir=};;
|
||||
--skip-po)
|
||||
@@ -335,7 +474,7 @@ do
|
||||
--no-git)
|
||||
use_git=false;;
|
||||
*)
|
||||
- die "$option: unknown option";;
|
||||
+ bootstrap_option_hook $option || die "$option: unknown option";;
|
||||
esac
|
||||
done
|
||||
|
||||
@@ -346,47 +485,6 @@ if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then
|
||||
die "Bootstrapping from a non-checked-out distribution is risky."
|
||||
fi
|
||||
|
||||
-# Strip blank and comment lines to leave significant entries.
|
||||
-gitignore_entries() {
|
||||
- sed '/^#/d; /^$/d' "$@"
|
||||
-}
|
||||
-
|
||||
-# If $STR is not already on a line by itself in $FILE, insert it at the start.
|
||||
-# Entries are inserted at the start of the ignore list to ensure existing
|
||||
-# entries starting with ! are not overridden. Such entries support
|
||||
-# whitelisting exceptions after a more generic blacklist pattern.
|
||||
-insert_if_absent() {
|
||||
- file=$1
|
||||
- str=$2
|
||||
- test -f $file || touch $file
|
||||
- test -r $file || die "Error: failed to read ignore file: $file"
|
||||
- duplicate_entries=$(gitignore_entries $file | sort | uniq -d)
|
||||
- if [ "$duplicate_entries" ] ; then
|
||||
- die "Error: Duplicate entries in $file: " $duplicate_entries
|
||||
- fi
|
||||
- linesold=$(gitignore_entries $file | wc -l)
|
||||
- linesnew=$( { echo "$str"; cat $file; } | gitignore_entries | sort -u | wc -l)
|
||||
- if [ $linesold != $linesnew ] ; then
|
||||
- { echo "$str" | cat - $file > $file.bak && mv $file.bak $file; } \
|
||||
- || die "insert_if_absent $file $str: failed"
|
||||
- fi
|
||||
-}
|
||||
-
|
||||
-# Adjust $PATTERN for $VC_IGNORE_FILE and insert it with
|
||||
-# insert_if_absent.
|
||||
-insert_vc_ignore() {
|
||||
- vc_ignore_file="$1"
|
||||
- pattern="$2"
|
||||
- case $vc_ignore_file in
|
||||
- *.gitignore)
|
||||
- # A .gitignore entry that does not start with '/' applies
|
||||
- # recursively to subdirectories, so prepend '/' to every
|
||||
- # .gitignore entry.
|
||||
- pattern=$(echo "$pattern" | sed s,^,/,);;
|
||||
- esac
|
||||
- insert_if_absent "$vc_ignore_file" "$pattern"
|
||||
-}
|
||||
-
|
||||
# Die if there is no AC_CONFIG_AUX_DIR($build_aux) line in configure.ac.
|
||||
found_aux_dir=no
|
||||
grep '^[ ]*AC_CONFIG_AUX_DIR(\['"$build_aux"'\])' configure.ac \
|
||||
@@ -665,9 +763,25 @@ if $use_gnulib; then
|
||||
shallow=
|
||||
if test -z "$GNULIB_REVISION"; then
|
||||
git clone -h 2>&1 | grep -- --depth > /dev/null && shallow='--depth 2'
|
||||
+ git clone $shallow ${GNULIB_URL:-$default_gnulib_url} "$gnulib_path" \
|
||||
+ || cleanup_gnulib
|
||||
+ else
|
||||
+ git fetch -h 2>&1 | grep -- --depth > /dev/null && shallow='--depth 2'
|
||||
+ mkdir -p "$gnulib_path"
|
||||
+ # Only want a shallow checkout of $GNULIB_REVISION, but git does not
|
||||
+ # support cloning by commit hash. So attempt a shallow fetch by commit
|
||||
+ # hash to minimize the amount of data downloaded and changes needed to
|
||||
+ # be processed, which can drastically reduce download and processing
|
||||
+ # time for checkout. If the fetch by commit fails, a shallow fetch can
|
||||
+ # not be performed because we do not know what the depth of the commit
|
||||
+ # is without fetching all commits. So fallback to fetching all commits.
|
||||
+ git -C "$gnulib_path" init
|
||||
+ git -C "$gnulib_path" remote add origin ${GNULIB_URL:-$default_gnulib_url}
|
||||
+ git -C "$gnulib_path" fetch $shallow origin "$GNULIB_REVISION" \
|
||||
+ || git -C "$gnulib_path" fetch origin \
|
||||
+ || cleanup_gnulib
|
||||
+ git -C "$gnulib_path" reset --hard FETCH_HEAD
|
||||
fi
|
||||
- git clone $shallow ${GNULIB_URL:-$default_gnulib_url} "$gnulib_path" \
|
||||
- || cleanup_gnulib
|
||||
|
||||
trap - 1 2 13 15
|
||||
fi
|
||||
@@ -784,75 +898,6 @@ case $SKIP_PO in
|
||||
fi;;
|
||||
esac
|
||||
|
||||
-symlink_to_dir()
|
||||
-{
|
||||
- src=$1/$2
|
||||
- dst=${3-$2}
|
||||
-
|
||||
- test -f "$src" && {
|
||||
-
|
||||
- # If the destination directory doesn't exist, create it.
|
||||
- # This is required at least for "lib/uniwidth/cjk.h".
|
||||
- dst_dir=$(dirname "$dst")
|
||||
- if ! test -d "$dst_dir"; then
|
||||
- mkdir -p "$dst_dir"
|
||||
-
|
||||
- # If we've just created a directory like lib/uniwidth,
|
||||
- # tell version control system(s) it's ignorable.
|
||||
- # FIXME: for now, this does only one level
|
||||
- parent=$(dirname "$dst_dir")
|
||||
- for dot_ig in x $vc_ignore; do
|
||||
- test $dot_ig = x && continue
|
||||
- ig=$parent/$dot_ig
|
||||
- insert_vc_ignore $ig "${dst_dir##*/}"
|
||||
- done
|
||||
- fi
|
||||
-
|
||||
- if $copy; then
|
||||
- {
|
||||
- test ! -h "$dst" || {
|
||||
- echo "$me: rm -f $dst" &&
|
||||
- rm -f "$dst"
|
||||
- }
|
||||
- } &&
|
||||
- test -f "$dst" &&
|
||||
- cmp -s "$src" "$dst" || {
|
||||
- echo "$me: cp -fp $src $dst" &&
|
||||
- cp -fp "$src" "$dst"
|
||||
- }
|
||||
- else
|
||||
- # Leave any existing symlink alone, if it already points to the source,
|
||||
- # so that broken build tools that care about symlink times
|
||||
- # aren't confused into doing unnecessary builds. Conversely, if the
|
||||
- # existing symlink's timestamp is older than the source, make it afresh,
|
||||
- # so that broken tools aren't confused into skipping needed builds. See
|
||||
- # <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00326.html>.
|
||||
- test -h "$dst" &&
|
||||
- src_ls=$(ls -diL "$src" 2>/dev/null) && set $src_ls && src_i=$1 &&
|
||||
- dst_ls=$(ls -diL "$dst" 2>/dev/null) && set $dst_ls && dst_i=$1 &&
|
||||
- test "$src_i" = "$dst_i" &&
|
||||
- both_ls=$(ls -dt "$src" "$dst") &&
|
||||
- test "X$both_ls" = "X$dst$nl$src" || {
|
||||
- dot_dots=
|
||||
- case $src in
|
||||
- /*) ;;
|
||||
- *)
|
||||
- case /$dst/ in
|
||||
- *//* | */../* | */./* | /*/*/*/*/*/)
|
||||
- die "invalid symlink calculation: $src -> $dst";;
|
||||
- /*/*/*/*/) dot_dots=../../../;;
|
||||
- /*/*/*/) dot_dots=../../;;
|
||||
- /*/*/) dot_dots=../;;
|
||||
- esac;;
|
||||
- esac
|
||||
-
|
||||
- echo "$me: ln -fs $dot_dots$src $dst" &&
|
||||
- ln -fs "$dot_dots$src" "$dst"
|
||||
- }
|
||||
- fi
|
||||
- }
|
||||
-}
|
||||
-
|
||||
version_controlled_file() {
|
||||
parent=$1
|
||||
file=$2
|
||||
@@ -970,7 +1015,7 @@ bootstrap_post_import_hook \
|
||||
# Uninitialized submodules are listed with an initial dash.
|
||||
if $use_git && git submodule | grep '^-' >/dev/null; then
|
||||
die "some git submodules are not initialized. " \
|
||||
- "Run 'git submodule init' and bootstrap again."
|
||||
+ "Run 'git submodule update --init' and bootstrap again."
|
||||
fi
|
||||
|
||||
# Remove any dangling symlink matching "*.m4" or "*.[ch]" in some
|
||||
@@ -1064,7 +1109,7 @@ bootstrap_epilogue
|
||||
|
||||
echo "$0: done. Now you can run './configure'."
|
||||
|
||||
-# Local variables:
|
||||
+# Local Variables:
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
diff --git a/bootstrap.conf b/bootstrap.conf
|
||||
index 71ce943c7d4..e4e5f3750ad 100644
|
||||
--- a/bootstrap.conf
|
||||
+++ b/bootstrap.conf
|
||||
@@ -1,6 +1,6 @@
|
||||
# Bootstrap configuration.
|
||||
|
||||
-# Copyright (C) 2006-2019 Free Software Foundation, Inc.
|
||||
+# Copyright (C) 2006-2022 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
|
||||
@@ -16,11 +16,10 @@
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
-GNULIB_REVISION=d271f868a8df9bbec29049d01e056481b7a1a263
|
||||
+GNULIB_REVISION=9f48fb992a3d7e96610c4ce8be969cff2d61a01b
|
||||
|
||||
# gnulib modules used by this package.
|
||||
-# mbswidth is used by gnulib-fix-width.diff's changes to argp rather than
|
||||
-# directly.
|
||||
+# mbswidth is used by fix-width.diff's changes to argp rather than directly.
|
||||
gnulib_modules="
|
||||
argp
|
||||
base64
|
||||
@@ -67,8 +66,8 @@ SKIP_PO=t
|
||||
|
||||
# Build prerequisites
|
||||
buildreq="\
|
||||
-autoconf 2.63
|
||||
-automake 1.11
|
||||
+autoconf 2.64
|
||||
+automake 1.14
|
||||
gettext 0.18.3
|
||||
git 1.5.5
|
||||
tar -
|
||||
@@ -80,11 +79,12 @@ cp -a INSTALL INSTALL.grub
|
||||
|
||||
bootstrap_post_import_hook () {
|
||||
set -e
|
||||
- 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; do
|
||||
- patch -d grub-core/lib/gnulib -p2 \
|
||||
- < "grub-core/lib/gnulib-patches/$patchname.patch"
|
||||
- done
|
||||
+
|
||||
+ # Instead of patching our gnulib and therefore maintaining a fork, submit
|
||||
+ # changes to gnulib and update the hash above when they've merged. Do not
|
||||
+ # add new patches here.
|
||||
+ patch -d grub-core/lib/gnulib -p2 < grub-core/lib/gnulib-patches/fix-width.patch
|
||||
+
|
||||
for patchname in \
|
||||
0001-Support-POTFILES-shell \
|
||||
0002-Handle-gettext_printf-shell-function \
|
||||
diff --git a/conf/Makefile.extra-dist b/conf/Makefile.extra-dist
|
||||
index 16248ccf032..5b9fda752b6 100644
|
||||
--- a/conf/Makefile.extra-dist
|
||||
+++ b/conf/Makefile.extra-dist
|
||||
@@ -30,12 +30,6 @@ EXTRA_DIST += grub-core/gensymlist.sh
|
||||
EXTRA_DIST += grub-core/genemuinit.sh
|
||||
EXTRA_DIST += grub-core/genemuinitheader.sh
|
||||
|
||||
-EXTRA_DIST += grub-core/lib/gnulib-patches/fix-null-deref.patch
|
||||
-EXTRA_DIST += grub-core/lib/gnulib-patches/fix-null-state-deref.patch
|
||||
-EXTRA_DIST += grub-core/lib/gnulib-patches/fix-regcomp-uninit-token.patch
|
||||
-EXTRA_DIST += grub-core/lib/gnulib-patches/fix-regexec-null-deref.patch
|
||||
-EXTRA_DIST += grub-core/lib/gnulib-patches/fix-uninit-structure.patch
|
||||
-EXTRA_DIST += grub-core/lib/gnulib-patches/fix-unused-value.patch
|
||||
EXTRA_DIST += grub-core/lib/gnulib-patches/fix-width.patch
|
||||
|
||||
EXTRA_DIST += grub-core/lib/libgcrypt
|
||||
diff --git a/config.h.in b/config.h.in
|
||||
index c3134309c63..512d1bbe138 100644
|
||||
--- a/config.h.in
|
||||
+++ b/config.h.in
|
||||
@@ -67,10 +67,78 @@
|
||||
# define _GNU_SOURCE 1
|
||||
|
||||
# ifndef _GL_INLINE_HEADER_BEGIN
|
||||
+/* gnulib gets configured against the host, not the target, and the rest of
|
||||
+ * our buildsystem works around that. This is difficult to avoid as gnulib's
|
||||
+ * detection requires a more capable system than our target. Instead, we
|
||||
+ * reach in and set values appropriately - intentionally setting more than the
|
||||
+ * bare minimum. If, when updating gnulib, something breaks, there's probably
|
||||
+ * a change needed here or in grub-core/Makefile.core.def. */
|
||||
+# define SIZE_MAX ((size_t) -1)
|
||||
+# define _GL_ATTRIBUTE_ALLOC_SIZE(args) \
|
||||
+ __attribute__ ((__alloc_size__ args))
|
||||
+# define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__))
|
||||
+# define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__))
|
||||
+# define _GL_ATTRIBUTE_COLD __attribute__ ((cold))
|
||||
# define _GL_ATTRIBUTE_CONST __attribute__ ((const))
|
||||
+# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute ((__malloc__ (f, i)))
|
||||
+# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1)
|
||||
+# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__))
|
||||
+# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg)))
|
||||
+# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE \
|
||||
+ __attribute__ ((externally_visible))
|
||||
+# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
|
||||
+# define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__))
|
||||
+# define _GL_ATTRIBUTE_MALLOC __attribute__ ((malloc))
|
||||
+# define _GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_UNUSED
|
||||
+# define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__))
|
||||
+# define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__))
|
||||
+# define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__))
|
||||
+# define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args))
|
||||
+# define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__))
|
||||
+# define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__))
|
||||
+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
|
||||
+# define _GL_ATTRIBUTE_RETURNS_NONNULL \
|
||||
+ __attribute__ ((__returns_nonnull__))
|
||||
+# define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos))
|
||||
+# define _GL_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
|
||||
+# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg)))
|
||||
+# define _GL_CMP(n1, n2) (((n1) > (n2)) - ((n1) < (n2)))
|
||||
+# define _GL_GNUC_PREREQ GNUC_PREREQ
|
||||
+# define _GL_INLINE inline
|
||||
+# define _GL_UNUSED_LABEL _GL_ATTRIBUTE_UNUSED
|
||||
+
|
||||
+/* We can't use __has_attribute for these because gcc-5.1 is too old for
|
||||
+ * that. Everything above is present in that version, though. */
|
||||
+# if __GNUC__ >= 7
|
||||
+# define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((fallthrough))
|
||||
+# else
|
||||
+# define _GL_ATTRIBUTE_FALLTHROUGH /* empty */
|
||||
+# endif
|
||||
+
|
||||
+# ifndef ASM_FILE
|
||||
+typedef __INT_FAST32_TYPE__ int_fast32_t;
|
||||
+typedef __UINT_FAST32_TYPE__ uint_fast32_t;
|
||||
+# endif
|
||||
+
|
||||
+/* Ensure ialloc nests static/non-static inline properly. */
|
||||
+# define IALLOC_INLINE static inline
|
||||
+
|
||||
+/* gnulib uses these for blocking out warnings they can't/won't fix. gnulib
|
||||
+ * also makes the decision about whether to provide a declaration for
|
||||
+ * reallocarray() at compile-time, so this is a convenient place to override -
|
||||
+ * it's used by the ialloc module, which is used by base64. */
|
||||
+# define _GL_INLINE_HEADER_BEGIN _Pragma ("GCC diagnostic push") \
|
||||
+ void * \
|
||||
+ reallocarray (void *ptr, unsigned int nmemb, unsigned int size);
|
||||
+# define _GL_INLINE_HEADER_END _Pragma ("GCC diagnostic pop")
|
||||
|
||||
/* We don't have an abort() for gnulib to call in regexp. */
|
||||
# define abort __builtin_unreachable
|
||||
# endif /* !_GL_INLINE_HEADER_BEGIN */
|
||||
|
||||
+/* gnulib doesn't build cleanly with older compilers. */
|
||||
+# if __GNUC__ < 11
|
||||
+_Pragma ("GCC diagnostic ignored \"-Wtype-limits\"")
|
||||
+# endif
|
||||
+
|
||||
#endif
|
||||
diff --git a/grub-core/lib/gnulib-patches/fix-null-deref.patch b/grub-core/lib/gnulib-patches/fix-null-deref.patch
|
||||
deleted file mode 100644
|
||||
index 8fafa153a47..00000000000
|
||||
--- a/grub-core/lib/gnulib-patches/fix-null-deref.patch
|
||||
+++ /dev/null
|
||||
@@ -1,13 +0,0 @@
|
||||
-diff --git a/lib/argp-parse.c b/lib/argp-parse.c
|
||||
-index 6dec57310..900adad54 100644
|
||||
---- a/lib/argp-parse.c
|
||||
-+++ b/lib/argp-parse.c
|
||||
-@@ -940,7 +940,7 @@ weak_alias (__argp_parse, argp_parse)
|
||||
- void *
|
||||
- __argp_input (const struct argp *argp, const struct argp_state *state)
|
||||
- {
|
||||
-- if (state)
|
||||
-+ if (state && state->pstate)
|
||||
- {
|
||||
- struct group *group;
|
||||
- struct parser *parser = state->pstate;
|
||||
diff --git a/grub-core/lib/gnulib-patches/fix-null-state-deref.patch b/grub-core/lib/gnulib-patches/fix-null-state-deref.patch
|
||||
deleted file mode 100644
|
||||
index 813ec09c8a1..00000000000
|
||||
--- a/grub-core/lib/gnulib-patches/fix-null-state-deref.patch
|
||||
+++ /dev/null
|
||||
@@ -1,12 +0,0 @@
|
||||
---- a/lib/argp-help.c 2020-10-28 14:32:19.189215988 +0000
|
||||
-+++ b/lib/argp-help.c 2020-10-28 14:38:21.204673940 +0000
|
||||
-@@ -145,7 +145,8 @@
|
||||
- if (*(int *)((char *)upptr + up->uparams_offs) >= upptr->rmargin)
|
||||
- {
|
||||
- __argp_failure (state, 0, 0,
|
||||
-- dgettext (state->root_argp->argp_domain,
|
||||
-+ dgettext (state == NULL ? NULL
|
||||
-+ : state->root_argp->argp_domain,
|
||||
- "\
|
||||
- ARGP_HELP_FMT: %s value is less than or equal to %s"),
|
||||
- "rmargin", up->name);
|
||||
diff --git a/grub-core/lib/gnulib-patches/fix-regcomp-uninit-token.patch b/grub-core/lib/gnulib-patches/fix-regcomp-uninit-token.patch
|
||||
deleted file mode 100644
|
||||
index 02e06315dff..00000000000
|
||||
--- a/grub-core/lib/gnulib-patches/fix-regcomp-uninit-token.patch
|
||||
+++ /dev/null
|
||||
@@ -1,15 +0,0 @@
|
||||
---- a/lib/regcomp.c 2020-11-24 17:06:08.159223858 +0000
|
||||
-+++ b/lib/regcomp.c 2020-11-24 17:06:15.630253923 +0000
|
||||
-@@ -3808,11 +3808,7 @@
|
||||
- create_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right,
|
||||
- re_token_type_t type)
|
||||
- {
|
||||
-- re_token_t t;
|
||||
--#if defined GCC_LINT || defined lint
|
||||
-- memset (&t, 0, sizeof t);
|
||||
--#endif
|
||||
-- t.type = type;
|
||||
-+ re_token_t t = { .type = type };
|
||||
- return create_token_tree (dfa, left, right, &t);
|
||||
- }
|
||||
-
|
||||
diff --git a/grub-core/lib/gnulib-patches/fix-regexec-null-deref.patch b/grub-core/lib/gnulib-patches/fix-regexec-null-deref.patch
|
||||
deleted file mode 100644
|
||||
index db6dac9c9e3..00000000000
|
||||
--- a/grub-core/lib/gnulib-patches/fix-regexec-null-deref.patch
|
||||
+++ /dev/null
|
||||
@@ -1,12 +0,0 @@
|
||||
---- a/lib/regexec.c 2020-10-21 14:25:35.310195912 +0000
|
||||
-+++ b/lib/regexec.c 2020-11-05 10:55:09.621542984 +0000
|
||||
-@@ -1692,6 +1692,9 @@
|
||||
- {
|
||||
- Idx top = mctx->state_log_top;
|
||||
-
|
||||
-+ if (mctx->state_log == NULL)
|
||||
-+ return REG_NOERROR;
|
||||
-+
|
||||
- if ((next_state_log_idx >= mctx->input.bufs_len
|
||||
- && mctx->input.bufs_len < mctx->input.len)
|
||||
- || (next_state_log_idx >= mctx->input.valid_len
|
||||
diff --git a/grub-core/lib/gnulib-patches/fix-uninit-structure.patch b/grub-core/lib/gnulib-patches/fix-uninit-structure.patch
|
||||
deleted file mode 100644
|
||||
index 7b4d9f67af4..00000000000
|
||||
--- a/grub-core/lib/gnulib-patches/fix-uninit-structure.patch
|
||||
+++ /dev/null
|
||||
@@ -1,11 +0,0 @@
|
||||
---- a/lib/regcomp.c 2020-10-22 13:49:06.770168928 +0000
|
||||
-+++ b/lib/regcomp.c 2020-10-22 13:50:37.026528298 +0000
|
||||
-@@ -3662,7 +3662,7 @@
|
||||
- Idx alloc = 0;
|
||||
- #endif /* not RE_ENABLE_I18N */
|
||||
- reg_errcode_t ret;
|
||||
-- re_token_t br_token;
|
||||
-+ re_token_t br_token = {0};
|
||||
- bin_tree_t *tree;
|
||||
-
|
||||
- sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1);
|
||||
diff --git a/grub-core/lib/gnulib-patches/fix-unused-value.patch b/grub-core/lib/gnulib-patches/fix-unused-value.patch
|
||||
deleted file mode 100644
|
||||
index ba51f1bf223..00000000000
|
||||
--- a/grub-core/lib/gnulib-patches/fix-unused-value.patch
|
||||
+++ /dev/null
|
||||
@@ -1,14 +0,0 @@
|
||||
---- a/lib/regexec.c 2020-10-21 14:25:35.310195912 +0000
|
||||
-+++ b/lib/regexec.c 2020-10-21 14:32:07.961765604 +0000
|
||||
-@@ -828,7 +828,11 @@
|
||||
- break;
|
||||
- if (__glibc_unlikely (err != REG_NOMATCH))
|
||||
- goto free_return;
|
||||
-+#ifdef DEBUG
|
||||
-+ /* Only used for assertion below when DEBUG is set, otherwise
|
||||
-+ it will be over-written when we loop around. */
|
||||
- match_last = -1;
|
||||
-+#endif
|
||||
- }
|
||||
- else
|
||||
- break; /* We found a match. */
|
14
do-rebase
14
do-rebase
@ -155,21 +155,7 @@ fi
|
||||
unset LC_ALL
|
||||
git rm -q 0*.patch
|
||||
|
||||
# No need for this patch anymore, the package is rebased on latest release now.
|
||||
#> release-to-master.patch
|
||||
#othergit diff --full-index --binary $diff_ops grub-2.04..refs/remotes/rhboot/master > release-to-master.patch
|
||||
#git add release-to-master.patch
|
||||
|
||||
fedpkg sources
|
||||
curl -L https://github.com/rhboot/gnulib/archive/fixes.tar.gz > gnulib-fixes.tar.gz.new
|
||||
if cmp -s gnulib-fixes.tar.gz gnulib-fixes.tar.gz.new; then
|
||||
rm gnulib-fixes.tar.gz.new
|
||||
else
|
||||
mv gnulib-fixes.tar.gz.new gnulib-fixes.tar.gz
|
||||
sed -i -e '/gnulib-/d' sources
|
||||
fedpkg upload gnulib-fixes.tar.gz
|
||||
git add sources
|
||||
fi
|
||||
|
||||
> grub.patches
|
||||
patches=$(formatpatch refs/remotes/rhboot/master..refs/remotes/rhboot/${releasever})
|
||||
|
10
grub.macros
10
grub.macros
@ -9,11 +9,14 @@
|
||||
%global _configure ../configure
|
||||
|
||||
%if %{?_with_ccache: 1}%{?!_with_ccache: 0}
|
||||
%global cc_equals CC=/usr/%{_lib}/ccache/gcc
|
||||
%global ccpath /usr/%{_lib}/ccache/gcc
|
||||
%else
|
||||
%global cc_equals %{nil}
|
||||
%global ccpath %{__cc}
|
||||
%endif
|
||||
|
||||
# gnulib actively ignores CFLAGS because it's terrible
|
||||
%global cc_equals "CC=%{ccpath} -fPIE"
|
||||
|
||||
%global cflags_sed \\\
|
||||
sed \\\
|
||||
-e 's/-O. //g' \\\
|
||||
@ -330,9 +333,8 @@ git config gc.auto 0 \
|
||||
rm -f configure \
|
||||
git add . \
|
||||
git commit -a -q -m "%{tarversion} baseline." \
|
||||
#git apply --index --whitespace=nowarn %{SOURCE3} \
|
||||
#git commit -a -q -m "%{tarversion} master." \
|
||||
git am --whitespace=nowarn %%{patches} </dev/null \
|
||||
rm -r build-aux m4 \
|
||||
./bootstrap \
|
||||
%{nil}
|
||||
|
||||
|
171
grub.patches
171
grub.patches
@ -118,85 +118,92 @@ Patch0117: 0117-grub.d-Split-out-boot-success-reset-from-menu-auto-h.patch
|
||||
Patch0118: 0118-Fix-systemctl-kexec-exit-status-check.patch
|
||||
Patch0119: 0119-Print-grub-emu-linux-loader-messages-as-debug.patch
|
||||
Patch0120: 0120-Don-t-assume-that-boot-commands-will-only-return-on-.patch
|
||||
Patch0121: 0121-Do-better-in-bootstrap.conf.patch
|
||||
Patch0122: 0122-Use-git-to-apply-gnulib-patches.patch
|
||||
Patch0123: 0123-grub-set-bootflag-Update-comment-about-running-as-ro.patch
|
||||
Patch0124: 0124-grub-set-bootflag-Write-new-env-to-tmpfile-and-then-.patch
|
||||
Patch0125: 0125-grub.d-Fix-boot_indeterminate-getting-set-on-boot_su.patch
|
||||
Patch0126: 0126-Add-start-symbol-for-RISC-V.patch
|
||||
Patch0127: 0127-bootstrap.conf-Force-autogen.sh-to-use-python3.patch
|
||||
Patch0128: 0128-efi-http-Export-fw-http-_path-variables-to-make-them.patch
|
||||
Patch0129: 0129-efi-http-Enclose-literal-IPv6-addresses-in-square-br.patch
|
||||
Patch0130: 0130-efi-net-Allow-to-specify-a-port-number-in-addresses.patch
|
||||
Patch0131: 0131-efi-ip4_config-Improve-check-to-detect-literal-IPv6-.patch
|
||||
Patch0132: 0132-efi-net-Print-a-debug-message-if-parsing-the-address.patch
|
||||
Patch0133: 0133-kern-term-Also-accept-F8-as-a-user-interrupt-key.patch
|
||||
Patch0134: 0134-efi-Set-image-base-address-before-jumping-to-the-PE-.patch
|
||||
Patch0135: 0135-tpm-Don-t-propagate-TPM-measurement-errors-to-the-ve.patch
|
||||
Patch0136: 0136-x86-efi-Reduce-maximum-bounce-buffer-size-to-16-MiB.patch
|
||||
Patch0137: 0137-http-Prepend-prefix-when-the-HTTP-path-is-relative-a.patch
|
||||
Patch0138: 0138-Fix-a-missing-return-in-efi-export-env-and-efi-load-.patch
|
||||
Patch0139: 0139-efi-dhcp-fix-some-allocation-error-checking.patch
|
||||
Patch0140: 0140-efi-http-fix-some-allocation-error-checking.patch
|
||||
Patch0141: 0141-efi-ip-46-_config.c-fix-some-potential-allocation-ov.patch
|
||||
Patch0142: 0142-efilinux-Fix-integer-overflows-in-grub_cmd_initrd.patch
|
||||
Patch0143: 0143-linuxefi-fail-kernel-validation-without-shim-protoco.patch
|
||||
Patch0144: 0144-Fix-const-char-pointers-in-grub-core-net-bootp.c.patch
|
||||
Patch0145: 0145-Fix-const-char-pointers-in-grub-core-net-efi-ip4_con.patch
|
||||
Patch0146: 0146-Fix-const-char-pointers-in-grub-core-net-efi-ip6_con.patch
|
||||
Patch0147: 0147-Fix-const-char-pointers-in-grub-core-net-efi-net.c.patch
|
||||
Patch0148: 0148-Fix-const-char-pointers-in-grub-core-net-efi-pxe.c.patch
|
||||
Patch0149: 0149-Add-systemd-integration-scripts-to-make-systemctl-re.patch
|
||||
Patch0150: 0150-systemd-integration.sh-Also-set-old-menu_show_once-g.patch
|
||||
Patch0151: 0151-at_keyboard-use-set-1-when-keyboard-is-in-Translate-.patch
|
||||
Patch0152: 0152-grub-install-disable-support-for-EFI-platforms.patch
|
||||
Patch0153: 0153-New-with-debug-timestamps-configure-flag-to-prepend-.patch
|
||||
Patch0154: 0154-Added-debug-statements-to-grub_disk_open-and-grub_di.patch
|
||||
Patch0155: 0155-Introduce-function-grub_debug_is_enabled-void-return.patch
|
||||
Patch0156: 0156-Don-t-clear-screen-when-debugging-is-enabled.patch
|
||||
Patch0157: 0157-grub_file_-instrumentation-new-file-debug-tag.patch
|
||||
Patch0158: 0158-ieee1275-Avoiding-many-unecessary-open-close.patch
|
||||
Patch0159: 0159-ieee1275-powerpc-implements-fibre-channel-discovery-.patch
|
||||
Patch0160: 0160-ieee1275-powerpc-enables-device-mapper-discovery.patch
|
||||
Patch0161: 0161-Add-at_keyboard_fallback_set-var-to-force-the-set-ma.patch
|
||||
Patch0162: 0162-Add-suport-for-signing-grub-with-an-appended-signatu.patch
|
||||
Patch0163: 0163-docs-grub-Document-signing-grub-under-UEFI.patch
|
||||
Patch0164: 0164-docs-grub-Document-signing-grub-with-an-appended-sig.patch
|
||||
Patch0165: 0165-dl-provide-a-fake-grub_dl_set_persistent-for-the-emu.patch
|
||||
Patch0166: 0166-pgp-factor-out-rsa_pad.patch
|
||||
Patch0167: 0167-crypto-move-storage-for-grub_crypto_pk_-to-crypto.c.patch
|
||||
Patch0168: 0168-posix_wrap-tweaks-in-preparation-for-libtasn1.patch
|
||||
Patch0169: 0169-libtasn1-import-libtasn1-4.16.0.patch
|
||||
Patch0170: 0170-libtasn1-disable-code-not-needed-in-grub.patch
|
||||
Patch0171: 0171-libtasn1-changes-for-grub-compatibility.patch
|
||||
Patch0172: 0172-libtasn1-compile-into-asn1-module.patch
|
||||
Patch0173: 0173-test_asn1-test-module-for-libtasn1.patch
|
||||
Patch0174: 0174-grub-install-support-embedding-x509-certificates.patch
|
||||
Patch0175: 0175-appended-signatures-import-GNUTLS-s-ASN.1-descriptio.patch
|
||||
Patch0176: 0176-appended-signatures-parse-PKCS-7-signedData-and-X.50.patch
|
||||
Patch0177: 0177-appended-signatures-support-verifying-appended-signa.patch
|
||||
Patch0178: 0178-appended-signatures-verification-tests.patch
|
||||
Patch0179: 0179-appended-signatures-documentation.patch
|
||||
Patch0180: 0180-ieee1275-enter-lockdown-based-on-ibm-secure-boot.patch
|
||||
Patch0181: 0181-ieee1275-drop-HEAP_MAX_ADDR-HEAP_MIN_SIZE.patch
|
||||
Patch0182: 0182-ieee1275-claim-more-memory.patch
|
||||
Patch0183: 0183-ieee1275-request-memory-with-ibm-client-architecture.patch
|
||||
Patch0184: 0184-appendedsig-x509-Also-handle-the-Extended-Key-Usage-.patch
|
||||
Patch0185: 0185-ieee1275-ofdisk-retry-on-open-failure.patch
|
||||
Patch0186: 0186-Allow-chainloading-EFI-apps-from-loop-mounts.patch
|
||||
Patch0187: 0187-efinet-Add-DHCP-proxy-support.patch
|
||||
Patch0188: 0188-fs-ext2-Ignore-checksum-seed-incompat-feature.patch
|
||||
Patch0189: 0189-Don-t-update-the-cmdline-when-generating-legacy-menu.patch
|
||||
Patch0190: 0190-Suppress-gettext-error-message.patch
|
||||
Patch0191: 0191-grub-set-password-Always-use-boot-grub2-user.cfg-as-.patch
|
||||
Patch0192: 0192-templates-Check-for-EFI-at-runtime-instead-of-config.patch
|
||||
Patch0193: 0193-efi-Print-an-error-if-boot-to-firmware-setup-is-not-.patch
|
||||
Patch0194: 0194-arm64-Fix-EFI-loader-kernel-image-allocation.patch
|
||||
Patch0195: 0195-normal-main-Discover-the-device-to-read-the-config-f.patch
|
||||
Patch0196: 0196-powerpc-adjust-setting-of-prefix-for-signed-binary-c.patch
|
||||
Patch0197: 0197-fs-xfs-Fix-unreadable-filesystem-with-v4-superblock.patch
|
||||
Patch0198: 0198-Print-module-name-on-license-check-failure.patch
|
||||
Patch0199: 0199-powerpc-ieee1275-load-grub-at-4MB-not-2MB.patch
|
||||
Patch0200: 0200-grub-mkconfig-restore-umask-for-grub.cfg.patch
|
||||
Patch0201: 0201-fs-btrfs-Use-full-btrfs-bootloader-area.patch
|
||||
Patch0202: 0202-Add-Fedora-location-of-DejaVu-SANS-font.patch
|
||||
Patch0121: 0121-grub-set-bootflag-Update-comment-about-running-as-ro.patch
|
||||
Patch0122: 0122-grub-set-bootflag-Write-new-env-to-tmpfile-and-then-.patch
|
||||
Patch0123: 0123-grub.d-Fix-boot_indeterminate-getting-set-on-boot_su.patch
|
||||
Patch0124: 0124-Add-start-symbol-for-RISC-V.patch
|
||||
Patch0125: 0125-bootstrap.conf-Force-autogen.sh-to-use-python3.patch
|
||||
Patch0126: 0126-efi-http-Export-fw-http-_path-variables-to-make-them.patch
|
||||
Patch0127: 0127-efi-http-Enclose-literal-IPv6-addresses-in-square-br.patch
|
||||
Patch0128: 0128-efi-net-Allow-to-specify-a-port-number-in-addresses.patch
|
||||
Patch0129: 0129-efi-ip4_config-Improve-check-to-detect-literal-IPv6-.patch
|
||||
Patch0130: 0130-efi-net-Print-a-debug-message-if-parsing-the-address.patch
|
||||
Patch0131: 0131-kern-term-Also-accept-F8-as-a-user-interrupt-key.patch
|
||||
Patch0132: 0132-efi-Set-image-base-address-before-jumping-to-the-PE-.patch
|
||||
Patch0133: 0133-tpm-Don-t-propagate-TPM-measurement-errors-to-the-ve.patch
|
||||
Patch0134: 0134-x86-efi-Reduce-maximum-bounce-buffer-size-to-16-MiB.patch
|
||||
Patch0135: 0135-http-Prepend-prefix-when-the-HTTP-path-is-relative-a.patch
|
||||
Patch0136: 0136-Fix-a-missing-return-in-efi-export-env-and-efi-load-.patch
|
||||
Patch0137: 0137-efi-dhcp-fix-some-allocation-error-checking.patch
|
||||
Patch0138: 0138-efi-http-fix-some-allocation-error-checking.patch
|
||||
Patch0139: 0139-efi-ip-46-_config.c-fix-some-potential-allocation-ov.patch
|
||||
Patch0140: 0140-efilinux-Fix-integer-overflows-in-grub_cmd_initrd.patch
|
||||
Patch0141: 0141-linuxefi-fail-kernel-validation-without-shim-protoco.patch
|
||||
Patch0142: 0142-Fix-const-char-pointers-in-grub-core-net-bootp.c.patch
|
||||
Patch0143: 0143-Fix-const-char-pointers-in-grub-core-net-efi-ip4_con.patch
|
||||
Patch0144: 0144-Fix-const-char-pointers-in-grub-core-net-efi-ip6_con.patch
|
||||
Patch0145: 0145-Fix-const-char-pointers-in-grub-core-net-efi-net.c.patch
|
||||
Patch0146: 0146-Fix-const-char-pointers-in-grub-core-net-efi-pxe.c.patch
|
||||
Patch0147: 0147-Add-systemd-integration-scripts-to-make-systemctl-re.patch
|
||||
Patch0148: 0148-systemd-integration.sh-Also-set-old-menu_show_once-g.patch
|
||||
Patch0149: 0149-at_keyboard-use-set-1-when-keyboard-is-in-Translate-.patch
|
||||
Patch0150: 0150-grub-install-disable-support-for-EFI-platforms.patch
|
||||
Patch0151: 0151-New-with-debug-timestamps-configure-flag-to-prepend-.patch
|
||||
Patch0152: 0152-Added-debug-statements-to-grub_disk_open-and-grub_di.patch
|
||||
Patch0153: 0153-Introduce-function-grub_debug_is_enabled-void-return.patch
|
||||
Patch0154: 0154-Don-t-clear-screen-when-debugging-is-enabled.patch
|
||||
Patch0155: 0155-grub_file_-instrumentation-new-file-debug-tag.patch
|
||||
Patch0156: 0156-ieee1275-Avoiding-many-unecessary-open-close.patch
|
||||
Patch0157: 0157-ieee1275-powerpc-implements-fibre-channel-discovery-.patch
|
||||
Patch0158: 0158-ieee1275-powerpc-enables-device-mapper-discovery.patch
|
||||
Patch0159: 0159-Add-at_keyboard_fallback_set-var-to-force-the-set-ma.patch
|
||||
Patch0160: 0160-Add-suport-for-signing-grub-with-an-appended-signatu.patch
|
||||
Patch0161: 0161-docs-grub-Document-signing-grub-under-UEFI.patch
|
||||
Patch0162: 0162-docs-grub-Document-signing-grub-with-an-appended-sig.patch
|
||||
Patch0163: 0163-dl-provide-a-fake-grub_dl_set_persistent-for-the-emu.patch
|
||||
Patch0164: 0164-pgp-factor-out-rsa_pad.patch
|
||||
Patch0165: 0165-crypto-move-storage-for-grub_crypto_pk_-to-crypto.c.patch
|
||||
Patch0166: 0166-posix_wrap-tweaks-in-preparation-for-libtasn1.patch
|
||||
Patch0167: 0167-libtasn1-import-libtasn1-4.16.0.patch
|
||||
Patch0168: 0168-libtasn1-disable-code-not-needed-in-grub.patch
|
||||
Patch0169: 0169-libtasn1-changes-for-grub-compatibility.patch
|
||||
Patch0170: 0170-libtasn1-compile-into-asn1-module.patch
|
||||
Patch0171: 0171-test_asn1-test-module-for-libtasn1.patch
|
||||
Patch0172: 0172-grub-install-support-embedding-x509-certificates.patch
|
||||
Patch0173: 0173-appended-signatures-import-GNUTLS-s-ASN.1-descriptio.patch
|
||||
Patch0174: 0174-appended-signatures-parse-PKCS-7-signedData-and-X.50.patch
|
||||
Patch0175: 0175-appended-signatures-support-verifying-appended-signa.patch
|
||||
Patch0176: 0176-appended-signatures-verification-tests.patch
|
||||
Patch0177: 0177-appended-signatures-documentation.patch
|
||||
Patch0178: 0178-ieee1275-enter-lockdown-based-on-ibm-secure-boot.patch
|
||||
Patch0179: 0179-ieee1275-drop-HEAP_MAX_ADDR-HEAP_MIN_SIZE.patch
|
||||
Patch0180: 0180-ieee1275-claim-more-memory.patch
|
||||
Patch0181: 0181-ieee1275-request-memory-with-ibm-client-architecture.patch
|
||||
Patch0182: 0182-appendedsig-x509-Also-handle-the-Extended-Key-Usage-.patch
|
||||
Patch0183: 0183-ieee1275-ofdisk-retry-on-open-failure.patch
|
||||
Patch0184: 0184-Allow-chainloading-EFI-apps-from-loop-mounts.patch
|
||||
Patch0185: 0185-efinet-Add-DHCP-proxy-support.patch
|
||||
Patch0186: 0186-fs-ext2-Ignore-checksum-seed-incompat-feature.patch
|
||||
Patch0187: 0187-Don-t-update-the-cmdline-when-generating-legacy-menu.patch
|
||||
Patch0188: 0188-Suppress-gettext-error-message.patch
|
||||
Patch0189: 0189-grub-set-password-Always-use-boot-grub2-user.cfg-as-.patch
|
||||
Patch0190: 0190-templates-Check-for-EFI-at-runtime-instead-of-config.patch
|
||||
Patch0191: 0191-efi-Print-an-error-if-boot-to-firmware-setup-is-not-.patch
|
||||
Patch0192: 0192-arm64-Fix-EFI-loader-kernel-image-allocation.patch
|
||||
Patch0193: 0193-normal-main-Discover-the-device-to-read-the-config-f.patch
|
||||
Patch0194: 0194-powerpc-adjust-setting-of-prefix-for-signed-binary-c.patch
|
||||
Patch0195: 0195-fs-xfs-Fix-unreadable-filesystem-with-v4-superblock.patch
|
||||
Patch0196: 0196-Print-module-name-on-license-check-failure.patch
|
||||
Patch0197: 0197-powerpc-ieee1275-load-grub-at-4MB-not-2MB.patch
|
||||
Patch0198: 0198-grub-mkconfig-restore-umask-for-grub.cfg.patch
|
||||
Patch0199: 0199-fs-btrfs-Use-full-btrfs-bootloader-area.patch
|
||||
Patch0200: 0200-Add-Fedora-location-of-DejaVu-SANS-font.patch
|
||||
Patch0201: 0201-normal-menu-Don-t-show-Booting-s-msg-when-auto-booti.patch
|
||||
Patch0202: 0202-EFI-suppress-the-Welcome-to-GRUB-message-in-EFI-buil.patch
|
||||
Patch0203: 0203-EFI-console-Do-not-set-colorstate-until-the-first-te.patch
|
||||
Patch0204: 0204-EFI-console-Do-not-set-cursor-until-the-first-text-o.patch
|
||||
Patch0205: 0205-Use-visual-indentation-in-config.h.in.patch
|
||||
Patch0206: 0206-Where-present-ensure-config-util.h-precedes-config.h.patch
|
||||
Patch0207: 0207-Drop-gnulib-fix-base64.patch.patch
|
||||
Patch0208: 0208-Drop-gnulib-no-abort.patch.patch
|
||||
Patch0209: 0209-Update-gnulib-version-and-drop-most-gnulib-patches.patch
|
||||
|
@ -9,12 +9,14 @@
|
||||
%undefine _missing_build_ids_terminate_build
|
||||
%global _configure_gnuconfig_hack 0
|
||||
|
||||
%global gnulibversion fixes
|
||||
# It's a commit from their gnulib's development tree. They don't do releases,
|
||||
# and it is *awful* to update this.
|
||||
%global gnulibversion 9f48fb992a3d7e96610c4ce8be969cff2d61a01b
|
||||
|
||||
Name: grub2
|
||||
Epoch: 1
|
||||
Version: 2.06
|
||||
Release: 15%{?dist}
|
||||
Release: 16%{?dist}
|
||||
Summary: Bootloader with support for Linux, Multiboot and more
|
||||
License: GPLv3+
|
||||
URL: http://www.gnu.org/software/grub/
|
||||
@ -523,6 +525,9 @@ mv ${EFI_HOME}/grub.cfg.stb ${EFI_HOME}/grub.cfg
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Thu Feb 24 2022 Robbie Harwood <rharwood@redhat.com> - 2.06-16
|
||||
- Suffer through updating gnulib
|
||||
|
||||
* Thu Jan 20 2022 Robbie Harwood <rharwood@redhat.com> - 2.06-15
|
||||
- Skip machine ID check when updating BLS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user