summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrevor Woerner <twoerner@gmail.com>2018-05-09 14:28:40 -0400
committerArmin Kuster <akuster808@gmail.com>2018-05-17 08:20:48 -0700
commit9b08b7af9e6fd574c291bab4b0e570152a5f1861 (patch)
tree3c40a3106b4de2baf60d86a9c38186db957e26b2
parente3812fa4adae60a93193dabd0ecdcafbe8315f33 (diff)
downloadmeta-openembedded-9b08b7af9e6fd574c291bab4b0e570152a5f1861.tar.gz
grubby: update to latest
This project doesn't seem to produce regular releases as they once did, the last such release (8.40-1) was in 2015 (over 3 years ago at this point). Therefore switch to building the latest git commit. Also, refresh the patches as required (used devtool --force-patch-refresh). Signed-off-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-initramfs/recipes-devtools/grubby/grubby/0001-Add-another-variable-LIBS-to-provides-libraries-from.patch14
-rw-r--r--meta-initramfs/recipes-devtools/grubby/grubby/grubby-rename-grub2-editenv-to-grub-editenv.patch59
-rw-r--r--meta-initramfs/recipes-devtools/grubby/grubby_git.bb40
3 files changed, 79 insertions, 34 deletions
diff --git a/meta-initramfs/recipes-devtools/grubby/grubby/0001-Add-another-variable-LIBS-to-provides-libraries-from.patch b/meta-initramfs/recipes-devtools/grubby/grubby/0001-Add-another-variable-LIBS-to-provides-libraries-from.patch
index 1b1a993a0..dfbe7ba6b 100644
--- a/meta-initramfs/recipes-devtools/grubby/grubby/0001-Add-another-variable-LIBS-to-provides-libraries-from.patch
+++ b/meta-initramfs/recipes-devtools/grubby/grubby/0001-Add-another-variable-LIBS-to-provides-libraries-from.patch
@@ -1,26 +1,24 @@
1From 22afaa21b4b258082be591e54c99e1ba6fbd7748 Mon Sep 17 00:00:00 2001 1From b7b3caa9b5c8abcd3c371d0683001cd681e104b3 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 15 Jul 2017 10:19:22 -0700 3Date: Sat, 15 Jul 2017 10:19:22 -0700
4Subject: [PATCH 1/2] Add another variable LIBS to provides libraries from env 4Subject: [PATCH 1/2] Add another variable LIBS to provides libraries from env
5 5
6Signed-off-by: Khem Raj <raj.khem@gmail.com> 6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7
7--- 8---
8 Makefile | 2 +- 9 Makefile | 2 +-
9 1 file changed, 1 insertion(+), 1 deletion(-) 10 1 file changed, 1 insertion(+), 1 deletion(-)
10 11
11diff --git a/Makefile b/Makefile 12diff --git a/Makefile b/Makefile
12index ac14404..92a8e73 100644 13index cc7e823..ae30a07 100644
13--- a/Makefile 14--- a/Makefile
14+++ b/Makefile 15+++ b/Makefile
15@@ -27,7 +27,7 @@ RPM_OPT_FLAGS ?= -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector 16@@ -31,7 +31,7 @@ ifneq ($(VERBOSE_TEST),)
16 CFLAGS += $(RPM_OPT_FLAGS) -std=gnu99 -Wall -Werror -Wno-error=unused-function -Wno-unused-function -ggdb 17 VERBOSE_TEST="--verbose"
17 LDFLAGS := 18 endif
18 19
19-grubby_LIBS = -lblkid -lpopt 20-grubby_LIBS = -lblkid -lpopt
20+grubby_LIBS = -lblkid -lpopt ${LIBS} 21+grubby_LIBS = -lblkid -lpopt ${LIBS}
21 22
22 all: grubby 23 all: grubby
23 24
24--
252.13.3
26
diff --git a/meta-initramfs/recipes-devtools/grubby/grubby/grubby-rename-grub2-editenv-to-grub-editenv.patch b/meta-initramfs/recipes-devtools/grubby/grubby/grubby-rename-grub2-editenv-to-grub-editenv.patch
index d936249be..e693916e1 100644
--- a/meta-initramfs/recipes-devtools/grubby/grubby/grubby-rename-grub2-editenv-to-grub-editenv.patch
+++ b/meta-initramfs/recipes-devtools/grubby/grubby/grubby-rename-grub2-editenv-to-grub-editenv.patch
@@ -1,4 +1,4 @@
1From 0841706a5b5280e501c8e392c70c466c5fbcf0aa Mon Sep 17 00:00:00 2001 1From 15f0572f2f456c2c1b700bc790d9ce7a5c13cc74 Mon Sep 17 00:00:00 2001
2From: Jackie Huang <jackie.huang@windriver.com> 2From: Jackie Huang <jackie.huang@windriver.com>
3Date: Tue, 4 Aug 2015 23:54:41 -0700 3Date: Tue, 4 Aug 2015 23:54:41 -0700
4Subject: [PATCH] rename grub2-editenv to grub-editenv 4Subject: [PATCH] rename grub2-editenv to grub-editenv
@@ -8,38 +8,48 @@ We don't use the name grub2-editenv for grub2.
8Upstream-Status: Inappropriate 8Upstream-Status: Inappropriate
9 9
10Signed-off-by: Jackie Huang <jackie.huang@windriver.com> 10Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
11
11--- 12---
12 grubby.c | 4 ++-- 13 grubby.c | 4 ++--
13 test.sh | 6 +++--- 14 test.sh | 8 ++++----
14 2 files changed, 5 insertions(+), 5 deletions(-) 15 2 files changed, 6 insertions(+), 6 deletions(-)
15 16
16diff --git a/grubby.c b/grubby.c 17diff --git a/grubby.c b/grubby.c
17index d4ebb86..47a1a15 100644 18index 396041a..3ceae69 100644
18--- a/grubby.c 19--- a/grubby.c
19+++ b/grubby.c 20+++ b/grubby.c
20@@ -290,7 +290,7 @@ static char *grub2GetEnv(struct configFileInfo *info, char *name) 21@@ -301,7 +301,7 @@ static char *grub2GetEnv(struct configFileInfo *info, char *name)
21 char *s = NULL; 22 char *ret = NULL;
22 char *ret = NULL; 23 char *envFile = info->envFile ? info->envFile : "/boot/grub2/grubenv";
23 char *envFile = info->envFile ? info->envFile : "/boot/grub2/grubenv"; 24 int rc =
24- int rc = asprintf(&s, "grub2-editenv %s list | grep '^%s='", envFile, name); 25- asprintf(&s, "grub2-editenv %s list | grep '^%s='", envFile, name);
25+ int rc = asprintf(&s, "grub-editenv %s list | grep '^%s='", envFile, name); 26+ asprintf(&s, "grub-editenv %s list | grep '^%s='", envFile, name);
26 27
27 if (rc < 0) 28 if (rc < 0)
28 return NULL; 29 return NULL;
29@@ -361,7 +361,7 @@ static int grub2SetEnv(struct configFileInfo *info, char *name, char *value) 30@@ -373,7 +373,7 @@ static int grub2SetEnv(struct configFileInfo *info, char *name, char *value)
30 if (!value) 31 if (!value)
31 return -1; 32 return -1;
32 33
33- rc = asprintf(&s, "grub2-editenv %s set '%s=%s'", envFile, name, value); 34- rc = asprintf(&s, "grub2-editenv %s set '%s=%s'", envFile, name, value);
34+ rc = asprintf(&s, "grub-editenv %s set '%s=%s'", envFile, name, value); 35+ rc = asprintf(&s, "grub-editenv %s set '%s=%s'", envFile, name, value);
35 free(value); 36 free(value);
36 if (rc <0) 37 if (rc < 0)
37 return -1; 38 return -1;
38diff --git a/test.sh b/test.sh 39diff --git a/test.sh b/test.sh
39index 6379698..f738388 100755 40index 33d24cf..009479c 100755
40--- a/test.sh 41--- a/test.sh
41+++ b/test.sh 42+++ b/test.sh
42@@ -574,7 +574,7 @@ if [ "$testgrub2" == "y" ]; then 43@@ -573,7 +573,7 @@ if [ "$testgrub2" == "y" ]; then
44 --remove-kernel=/boot/vmlinuz-2.6.38.2-9.fc15.x86_64 \
45 --boot-filesystem=/boot/
46 commandTest "saved_default output" \
47- "grub2-editenv test/grub2-support_files/env_temp list" \
48+ "grub-editenv test/grub2-support_files/env_temp list" \
49 "saved_entry=Linux, with Fedora 2.6.38.8-32.fc15.x86_64"
50
51 # copy a stanza and add arguments as well, while using --set-index=
52@@ -627,7 +627,7 @@ if [ "$testgrub2" == "y" ]; then
43 --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \ 53 --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
44 --copy-default 54 --copy-default
45 commandTest "saved_default output" \ 55 commandTest "saved_default output" \
@@ -48,7 +58,7 @@ index 6379698..f738388 100755
48 "saved_entry=Linux, with Fedora 2.6.38.8-32.fc15.x86_64" 58 "saved_entry=Linux, with Fedora 2.6.38.8-32.fc15.x86_64"
49 59
50 testing="GRUB2 add kernel with default=saved_entry and a terrible title" 60 testing="GRUB2 add kernel with default=saved_entry and a terrible title"
51@@ -587,13 +587,13 @@ if [ "$testgrub2" == "y" ]; then 61@@ -640,13 +640,13 @@ if [ "$testgrub2" == "y" ]; then
52 testing="GRUB2 set default with default=saved_entry and a terrible name" 62 testing="GRUB2 set default with default=saved_entry and a terrible name"
53 grub2Test grub2.9 add/g2-1.9 --env grubenv.1 --set-default-index=0 63 grub2Test grub2.9 add/g2-1.9 --env grubenv.1 --set-default-index=0
54 commandTest "saved_default output" \ 64 commandTest "saved_default output" \
@@ -64,6 +74,3 @@ index 6379698..f738388 100755
64 "saved_entry=title" 74 "saved_entry=title"
65 75
66 testing="GRUB2 --default-index with default=saved_entry" 76 testing="GRUB2 --default-index with default=saved_entry"
67--
682.3.5
69
diff --git a/meta-initramfs/recipes-devtools/grubby/grubby_git.bb b/meta-initramfs/recipes-devtools/grubby/grubby_git.bb
new file mode 100644
index 000000000..8430b7e10
--- /dev/null
+++ b/meta-initramfs/recipes-devtools/grubby/grubby_git.bb
@@ -0,0 +1,40 @@
1SUMMARY = "A command line tool for updating and displaying info about boot loaders"
2DESCRIPTION = "grubby is a command line tool for updating and displaying information \
3about the configuration files for the grub, lilo, elilo (ia64), yaboot (powerpc) and \
4zipl (s390) boot loaders. It is primarily designed to be used from scripts which install \
5new kernels and need to find information about the current boot environment. \
6"
7HOMEPAGE = "https://github.com/rhboot/grubby"
8LICENSE = "GPLv2+"
9
10LIC_FILES_CHKSUM = "file://COPYING;md5=892f569a555ba9c07a568a7c0c4fa63a"
11
12DEPENDS = "popt util-linux"
13DEPENDS_append_libc-musl = " libexecinfo"
14
15S = "${WORKDIR}/git"
16SRCREV = "a1d2ae93408c3408e672d7eba4550fdf27fb0201"
17SRC_URI = "git://github.com/rhboot/grubby.git;protocol=https; \
18 file://grubby-rename-grub2-editenv-to-grub-editenv.patch \
19 file://run-ptest \
20 file://0001-Add-another-variable-LIBS-to-provides-libraries-from.patch \
21 file://0002-include-paths.h-for-_PATH_MOUNTED.patch \
22 "
23
24RDEPENDS_${PN} += "dracut"
25
26inherit autotools-brokensep ptest
27
28EXTRA_OEMAKE = "-e 'CC=${CC}' 'LDFLAGS=${LDFLAGS}' LIBS='${LIBS}'"
29
30LIBS_libc-musl = "-lexecinfo"
31LIBS ?= ""
32do_install_ptest() {
33 install -d ${D}${PTEST_PATH}
34 cp -r ${S}/test ${S}/test.sh ${D}${PTEST_PATH}
35 sed -i 's|./grubby|grubby|' ${D}${PTEST_PATH}/test.sh
36}
37
38RDEPENDS_${PN}-ptest = "util-linux-getopt bash"
39
40COMPATIBLE_HOST = '(x86_64.*|i.86.*)-(linux|freebsd.*)'