grubby: update to latest git rev
PATCH 1/2 grubby: update to latest git rev
* Refresh patches.
* Update SRC_URI. The upstrem repository has been archived.
* Depends on rpm to rpm-sort build.
* Add a patch to fix rpm-sort build error.
* Do not specify PREFIX as the issue has been fixed upstream.
Signed-off-by Yi Zhao <[email protected]>
---
...able-LIBS-to-provides-libraries-from.patch | 24 ------------
...ename-grub2-editenv-to-grub-editenv.patch} | 10 +++--
...able-LIBS-to-provides-libraries-from.patch | 38 +++++++++++++++++++
...3-include-paths.h-for-_PATH_MOUNTED.patch} | 10 +++--
...sort-include-string.h-for-strverscmp.patch | 33 ++++++++++++++++
.../recipes-devtools/grubby/grubby_git.bb | 19 +++++-----
6 files changed, 93 insertions(+), 41 deletions(-)
delete mode 100644 meta-initramfs/recipes-devtools/grubby/grubby/0001-Add-another-variable-LIBS-to-provides-libraries-from.patch
rename meta-initramfs/recipes-devtools/grubby/grubby/{grubby-rename-grub2-editenv-to-grub-editenv.patch => 0001-rename-grub2-editenv-to-grub-editenv.patch} (94%)
create mode 100644 meta-initramfs/recipes-devtools/grubby/grubby/0002-Add-another-variable-LIBS-to-provides-libraries-from.patch
rename meta-initramfs/recipes-devtools/grubby/grubby/{0002-include-paths.h-for-_PATH_MOUNTED.patch => 0003-include-paths.h-for-_PATH_MOUNTED.patch} (63%)
create mode 100644 meta-initramfs/recipes-devtools/grubby/grubby/0004-rpm-sort-include-string.h-for-strverscmp.patchmeta-initramfs/recipes-devtools/grubby/grubby/0001-Add-another-variable-LIBS-to-provides-libraries-from.patch deleted +0 -24
@@ -1,24 +0,0 @@ -From b7b3caa9b5c8abcd3c371d0683001cd681e104b3 Mon Sep 17 00:00:00 2001 -From: Khem Raj <[email protected]> -Date: Sat, 15 Jul 2017 10:19:22 -0700 -Subject: [PATCH 1/2] Add another variable LIBS to provides libraries from env - -Signed-off-by: Khem Raj <[email protected]> - ---- - Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index cc7e823..ae30a07 100644 ---- a/Makefile -+++ b/Makefile -@@ -31,7 +31,7 @@ ifneq ($(VERBOSE_TEST),) - VERBOSE_TEST="--verbose" - endif - --grubby_LIBS = -lblkid -lpopt -+grubby_LIBS = -lblkid -lpopt ${LIBS} - - all: grubby -
meta-initramfs/recipes-devtools/grubby/grubby/0001-rename-grub2-editenv-to-grub-editenv.patch renamed from meta-initramfs/recipes-devtools/grubby/grubby/grubby-rename-grub2-editenv-to-grub-editenv.patch +6 -4
@@ -1,21 +1,20 @@ -From 15f0572f2f456c2c1b700bc790d9ce7a5c13cc74 Mon Sep 17 00:00:00 2001 +From 7a72139d2e3cc80f64090a823afe7bcea76e4792 Mon Sep 17 00:00:00 2001 From: Jackie Huang <[email protected]> Date: Tue, 4 Aug 2015 23:54:41 -0700 Subject: [PATCH] rename grub2-editenv to grub-editenv We don't use the name grub2-editenv for grub2. -Upstream-Status: Inappropriate +Upstream-Status: Inactive-Upstream [lastcommit: 2022 lastrelease: 2016] Signed-off-by: Jackie Huang <[email protected]> - --- grubby.c | 4 ++-- test.sh | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/grubby.c b/grubby.c -index 396041a..3ceae69 100644 +index 98c1516..be832f6 100644 --- a/grubby.c +++ b/grubby.c @@ -301,7 +301,7 @@ static char *grub2GetEnv(struct configFileInfo *info, char *name)
@@ -74,3 +73,6 @@ index 33d24cf..009479c 100755 "saved_entry=title" testing="GRUB2 --default-index with default=saved_entry" +-- +2.25.1 +
meta-initramfs/recipes-devtools/grubby/grubby/0002-Add-another-variable-LIBS-to-provides-libraries-from.patch new file +38 -0
@@ -0,0 +1,38 @@ +From c02d1bf46174656cdb6f7c08fa3e8fa520edcd8e Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Sat, 15 Jul 2017 10:19:22 -0700 +Subject: [PATCH] Add another variable LIBS to provides libraries from env + +Upstream-Status: Inactive-Upstream [lastcommit: 2022 lastrelease: 2016] + +Signed-off-by: Khem Raj <[email protected]> +--- + Makefile | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 968c276..75abe44 100644 +--- a/Makefile ++++ b/Makefile +@@ -31,7 +31,8 @@ ifneq ($(VERBOSE_TEST),) + VERBOSE_TEST="--verbose" + endif + +-grubby_LIBS = -lblkid -lpopt ++grubby_LIBS = -lblkid -lpopt ${LIBS} ++rpm-sort_LIBS = ${LIBS} + + all: grubby rpm-sort + +@@ -63,7 +64,7 @@ grubby:: $(OBJECTS) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(grubby_LIBS) + + rpm-sort::rpm-sort.o +- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ -lrpmio ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ -lrpmio $(rpm-sort_LIBS) + + clean: + rm -f *.o grubby rpm-sort *~ +-- +2.25.1 +
meta-initramfs/recipes-devtools/grubby/grubby/0003-include-paths.h-for-_PATH_MOUNTED.patch renamed from meta-initramfs/recipes-devtools/grubby/grubby/0002-include-paths.h-for-_PATH_MOUNTED.patch +6 -4
@@ -1,7 +1,9 @@ -From 8f844ac7f44b8dc428d06cd6958c5f32d383d01c Mon Sep 17 00:00:00 2001 +From 7e68976eb6edd766471c11382f5bf57940ba9315 Mon Sep 17 00:00:00 2001 From: Khem Raj <[email protected]> Date: Sat, 15 Jul 2017 10:19:50 -0700 -Subject: [PATCH 2/2] include paths.h for _PATH_MOUNTED +Subject: [PATCH] include paths.h for _PATH_MOUNTED + +Upstream-Status: Inactive-Upstream [lastcommit: 2022 lastrelease: 2016] Signed-off-by: Khem Raj <[email protected]> ---
@@ -9,7 +11,7 @@ Signed-off-by: Khem Raj <[email protected]> 1 file changed, 1 insertion(+) diff --git a/grubby.c b/grubby.c -index 47a1a15..59f74a9 100644 +index be832f6..4825797 100644 --- a/grubby.c +++ b/grubby.c @@ -34,6 +34,7 @@
@@ -21,5 +23,5 @@ index 47a1a15..59f74a9 100644 #include "log.h" -- -2.13.3 +2.25.1
meta-initramfs/recipes-devtools/grubby/grubby/0004-rpm-sort-include-string.h-for-strverscmp.patch new file +33 -0
@@ -0,0 +1,33 @@ +From 45bc228090b3adfc0a5058b9cd019d91831e110a Mon Sep 17 00:00:00 2001 +From: Yi Zhao <[email protected]> +Date: Tue, 3 Jan 2023 13:59:48 +0800 +Subject: [PATCH] rpm-sort: include string.h for strverscmp + +Include string.h to fix build error: +rpm-sort.c: In function 'package_version_compare': +rpm-sort.c:156:13: error: 'strverscmp' undeclared (first use in this function) + 156 | cmp = strverscmp; + | ^~~~~~~~~~ + +Upstream-Status: Inactive-Upstream [lastcommit: 2022 lastrelease: 2016] + +Signed-off-by: Yi Zhao <[email protected]> +--- + rpm-sort.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/rpm-sort.c b/rpm-sort.c +index f196356..2eb91ce 100644 +--- a/rpm-sort.c ++++ b/rpm-sort.c +@@ -8,6 +8,7 @@ + #include <argp.h> + #include <rpm/rpmlib.h> + #include <err.h> ++#include <string.h> + + typedef enum { + RPMNVRCMP, +-- +2.25.1 +
meta-initramfs/recipes-devtools/grubby/grubby_git.bb +10 -9
@@ -9,25 +9,26 @@ LICENSE = "GPL-2.0-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=892f569a555ba9c07a568a7c0c4fa63a" -DEPENDS = "popt util-linux" -DEPENDS:append:libc-musl = " libexecinfo" +DEPENDS = "popt util-linux rpm" +DEPENDS:append:libc-musl = " libexecinfo argp-standalone" S = "${WORKDIR}/git" -SRCREV = "a1d2ae93408c3408e672d7eba4550fdf27fb0201" -SRC_URI = "git://github.com/rhboot/grubby.git;protocol=https;;branch=master \ - file://grubby-rename-grub2-editenv-to-grub-editenv.patch \ +SRCREV = "c01b0d5bb182bde35b464d14996acf354a3ada2e" +SRC_URI = "git://github.com/rhboot/grubby.git;protocol=https;;branch=main \ + file://0001-rename-grub2-editenv-to-grub-editenv.patch \ + file://0002-Add-another-variable-LIBS-to-provides-libraries-from.patch \ + file://0003-include-paths.h-for-_PATH_MOUNTED.patch \ + file://0004-rpm-sort-include-string.h-for-strverscmp.patch \ file://run-ptest \ - file://0001-Add-another-variable-LIBS-to-provides-libraries-from.patch \ - file://0002-include-paths.h-for-_PATH_MOUNTED.patch \ " RDEPENDS:${PN} += "dracut" inherit autotools-brokensep ptest -EXTRA_OEMAKE = "-e 'CC=${CC}' 'LDFLAGS=${LDFLAGS}' LIBS='${LIBS}' 'PREFIX'=${@bb.utils.contains('DISTRO_FEATURES','usrmerge','/usr','',d)}" +EXTRA_OEMAKE = "-e 'CC=${CC}' 'LDFLAGS=${LDFLAGS}' 'LIBS=${LIBS}'" -LIBS:libc-musl = "-lexecinfo" +LIBS:libc-musl = "-lexecinfo -largp" LIBS ?= "" do_install_ptest() { install -d ${D}${PTEST_PATH}
Signature · 1 line
2.25.1
PATCH 2/2 grubby: drop version 8.40
This version is obsolete. Drop it and only keep the git version.
Signed-off-by Yi Zhao <[email protected]>
--- .../recipes-devtools/grubby/grubby_8.40.bb | 41 ------------------- 1 file changed, 41 deletions(-) delete mode 100644 meta-initramfs/recipes-devtools/grubby/grubby_8.40.bb
meta-initramfs/recipes-devtools/grubby/grubby_8.40.bb deleted +0 -41
@@ -1,41 +0,0 @@ -SUMMARY = "A command line tool for updating and displaying info about boot loaders" -DESCRIPTION = "grubby is a command line tool for updating and displaying information \ -about the configuration files for the grub, lilo, elilo (ia64), yaboot (powerpc) and \ -zipl (s390) boot loaders. It is primarily designed to be used from scripts which install \ -new kernels and need to find information about the current boot environment. \ -" -HOMEPAGE = "https://github.com/rhboot/grubby" -LICENSE = "GPL-2.0-or-later" - -LIC_FILES_CHKSUM = "file://COPYING;md5=892f569a555ba9c07a568a7c0c4fa63a" - -DEPENDS = "popt util-linux" -DEPENDS:append:libc-musl = " libexecinfo" - -S = "${WORKDIR}/git" -SRCREV = "79c5cfa02c567efdc5bb18cdd584789e2e35aa23" -SRC_URI = "git://github.com/rhboot/grubby.git;protocol=https;;branch=master \ - file://grubby-rename-grub2-editenv-to-grub-editenv.patch \ - file://run-ptest \ - file://0001-Add-another-variable-LIBS-to-provides-libraries-from.patch \ - file://0002-include-paths.h-for-_PATH_MOUNTED.patch \ - " - -RDEPENDS:${PN} += "dracut" - -inherit autotools-brokensep ptest - -EXTRA_OEMAKE = "-e 'CC=${CC}' 'LDFLAGS=${LDFLAGS}' LIBS='${LIBS}'" - -LIBS:libc-musl = "-lexecinfo" -LIBS ?= "" -do_install_ptest() { - install -d ${D}${PTEST_PATH} - cp -r ${S}/test ${S}/test.sh ${D}${PTEST_PATH} - sed -i 's|./grubby|grubby|' ${D}${PTEST_PATH}/test.sh -} - -RDEPENDS:${PN} += "bash" -RDEPENDS:${PN}-ptest = "util-linux-getopt bash" - -COMPATIBLE_HOST = '(x86_64.*|i.86.*)-(linux|freebsd.*)'
Signature · 1 line
2.25.1