Petitboot: Carry build-time fixes from upstream
Some upstream fixes are still not available as a release after 1.10.4,
add them as build-time patches.
In support of that, force gettext and autoreconf on petitboot.mk since
we're touching Makefile.am files (so that we can build fine)
Summary of changes for post 1.10.4 patches:
Jeremy Kerr (15):
discover/grub2: 'search' set-variable defaults to root
discover/grub2: Use getopt for `search` argument parsing
discover/grub2: test for (ignored) --no-floppy argument
discover/grub2: Add support for UUID and label for 'search' command
discover/grub2: expose a struct for grub2 file references
discover/grub2: Add parsing code for grub2 file specifiers
discover/grub2: add support for grub2-style path specifiers in resources
discover/grub2: Allow (device)/path references in general script usage
discover/grub2: Add a reference from script to parser
discover/grub2: expose internal parse function
discover/grub2: make statements_execute non-static
discover/grub2: implement 'source' command
test/parser: Add test for recent RHCOS grub2 config
test/parser: Add RHEL8 grub config test
lib/pb-protocol: fix ordering of system info length calculation
Maxim Polyakov (3):
discover/platform-powerpc: add missing mbox block selector
discover/platform-powerpc: limit mailbox response size
discover/platform-powerpc: return the actual mailbox size
Signed-off-by: Klaus Heinrich Kiwi <klaus@linux.vnet.ibm.com>
diff --git a/openpower/package/petitboot/0004-discover-grub2-search-set-variable-defaults-to-root.patch b/openpower/package/petitboot/0004-discover-grub2-search-set-variable-defaults-to-root.patch
new file mode 100644
index 0000000..bc5a0e1
--- /dev/null
+++ b/openpower/package/petitboot/0004-discover-grub2-search-set-variable-defaults-to-root.patch
@@ -0,0 +1,40 @@
+From 3794b8f14fe94fcaa7b5cdb9171aef488f93ec7e Mon Sep 17 00:00:00 2001
+From: Jeremy Kerr <jk@ozlabs.org>
+Date: Thu, 31 Oct 2019 13:56:42 +0800
+Subject: [PATCH 04/18] discover/grub2: 'search' set-variable defaults to root
+
+If no --set= argument is specified, default to the variable named
+'root', as per current grub docs.
+
+Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
+(cherry picked from commit e558da19475d747e6f8e83d07305d35da33102f9)
+Signed-off-by: Klaus Heinrich Kiwi <klaus@linux.vnet.ibm.com>
+---
+ discover/grub2/builtins.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/discover/grub2/builtins.c b/discover/grub2/builtins.c
+index 7e92299..3f09319 100644
+--- a/discover/grub2/builtins.c
++++ b/discover/grub2/builtins.c
+@@ -113,7 +113,7 @@ static int builtin_search(struct grub2_script *script,
+ const char *env_var, *spec;
+ int i;
+
+- env_var = NULL;
++ env_var = "root";
+
+ for (i = 1; i < argc - 1; i++) {
+ if (!strncmp(argv[i], "--set=", strlen("--set="))) {
+@@ -122,7 +122,7 @@ static int builtin_search(struct grub2_script *script,
+ }
+ }
+
+- if (!env_var)
++ if (!strlen(env_var))
+ return 0;
+
+ spec = argv[argc - 1];
+--
+2.17.1
+