added my Recipes
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
From 7a72139d2e3cc80f64090a823afe7bcea76e4792 Mon Sep 17 00:00:00 2001
|
||||
From: Jackie Huang <jackie.huang@windriver.com>
|
||||
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: Inactive-Upstream [lastcommit: 2022 lastrelease: 2016]
|
||||
|
||||
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
|
||||
---
|
||||
grubby.c | 4 ++--
|
||||
test.sh | 8 ++++----
|
||||
2 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/grubby.c b/grubby.c
|
||||
index 98c1516..be832f6 100644
|
||||
--- a/grubby.c
|
||||
+++ b/grubby.c
|
||||
@@ -301,7 +301,7 @@ static char *grub2GetEnv(struct configFileInfo *info, char *name)
|
||||
char *ret = NULL;
|
||||
char *envFile = info->envFile ? info->envFile : "/boot/grub2/grubenv";
|
||||
int rc =
|
||||
- asprintf(&s, "grub2-editenv %s list | grep '^%s='", envFile, name);
|
||||
+ asprintf(&s, "grub-editenv %s list | grep '^%s='", envFile, name);
|
||||
|
||||
if (rc < 0)
|
||||
return NULL;
|
||||
@@ -373,7 +373,7 @@ static int grub2SetEnv(struct configFileInfo *info, char *name, char *value)
|
||||
if (!value)
|
||||
return -1;
|
||||
|
||||
- rc = asprintf(&s, "grub2-editenv %s set '%s=%s'", envFile, name, value);
|
||||
+ rc = asprintf(&s, "grub-editenv %s set '%s=%s'", envFile, name, value);
|
||||
free(value);
|
||||
if (rc < 0)
|
||||
return -1;
|
||||
diff --git a/test.sh b/test.sh
|
||||
index 33d24cf..009479c 100755
|
||||
--- a/test.sh
|
||||
+++ b/test.sh
|
||||
@@ -573,7 +573,7 @@ if [ "$testgrub2" == "y" ]; then
|
||||
--remove-kernel=/boot/vmlinuz-2.6.38.2-9.fc15.x86_64 \
|
||||
--boot-filesystem=/boot/
|
||||
commandTest "saved_default output" \
|
||||
- "grub2-editenv test/grub2-support_files/env_temp list" \
|
||||
+ "grub-editenv test/grub2-support_files/env_temp list" \
|
||||
"saved_entry=Linux, with Fedora 2.6.38.8-32.fc15.x86_64"
|
||||
|
||||
# copy a stanza and add arguments as well, while using --set-index=
|
||||
@@ -627,7 +627,7 @@ if [ "$testgrub2" == "y" ]; then
|
||||
--title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
|
||||
--copy-default
|
||||
commandTest "saved_default output" \
|
||||
- "grub2-editenv test/grub2-support_files/env_temp list" \
|
||||
+ "grub-editenv test/grub2-support_files/env_temp list" \
|
||||
"saved_entry=Linux, with Fedora 2.6.38.8-32.fc15.x86_64"
|
||||
|
||||
testing="GRUB2 add kernel with default=saved_entry and a terrible title"
|
||||
@@ -640,13 +640,13 @@ if [ "$testgrub2" == "y" ]; then
|
||||
testing="GRUB2 set default with default=saved_entry and a terrible name"
|
||||
grub2Test grub2.9 add/g2-1.9 --env grubenv.1 --set-default-index=0
|
||||
commandTest "saved_default output" \
|
||||
- "grub2-editenv test/grub2-support_files/env_temp list" \
|
||||
+ "grub-editenv test/grub2-support_files/env_temp list" \
|
||||
'saved_entry=Fedora (3.10.3-300.fc19.x86_64) 19 (Schrödinger’s Cat)'
|
||||
|
||||
testing="GRUB2 set default with default=saved_entry"
|
||||
grub2Test grub2.8 add/g2-1.8 --env grubenv.1 --set-default-index=0
|
||||
commandTest "saved_default output" \
|
||||
- "grub2-editenv test/grub2-support_files/env_temp list" \
|
||||
+ "grub-editenv test/grub2-support_files/env_temp list" \
|
||||
"saved_entry=title"
|
||||
|
||||
testing="GRUB2 --default-index with default=saved_entry"
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
From c02d1bf46174656cdb6f7c08fa3e8fa520edcd8e Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
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 <raj.khem@gmail.com>
|
||||
---
|
||||
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
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
From 7e68976eb6edd766471c11382f5bf57940ba9315 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sat, 15 Jul 2017 10:19:50 -0700
|
||||
Subject: [PATCH] include paths.h for _PATH_MOUNTED
|
||||
|
||||
Upstream-Status: Inactive-Upstream [lastcommit: 2022 lastrelease: 2016]
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
grubby.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/grubby.c b/grubby.c
|
||||
index be832f6..4825797 100644
|
||||
--- a/grubby.c
|
||||
+++ b/grubby.c
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <libgen.h>
|
||||
#include <execinfo.h>
|
||||
#include <signal.h>
|
||||
+#include <paths.h>
|
||||
#include <blkid/blkid.h>
|
||||
|
||||
#include "log.h"
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
From 45bc228090b3adfc0a5058b9cd019d91831e110a Mon Sep 17 00:00:00 2001
|
||||
From: Yi Zhao <yi.zhao@windriver.com>
|
||||
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 <yi.zhao@windriver.com>
|
||||
---
|
||||
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
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
./test.sh -v
|
||||
@@ -0,0 +1,46 @@
|
||||
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 rpm"
|
||||
DEPENDS:append:libc-musl = " libexecinfo argp-standalone"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
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 \
|
||||
"
|
||||
|
||||
RDEPENDS:${PN} += "dracut"
|
||||
|
||||
inherit autotools-brokensep ptest
|
||||
|
||||
EXTRA_OEMAKE = "-e 'CC=${CC}' 'LDFLAGS=${LDFLAGS}' 'LIBS=${LIBS}'"
|
||||
|
||||
LIBS:libc-musl = "-lexecinfo -largp"
|
||||
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"
|
||||
|
||||
inherit update-alternatives
|
||||
ALTERNATIVE:${PN} = "installkernel"
|
||||
ALTERNATIVE_LINK_NAME[installkernel] = "${sbindir}/installkernel"
|
||||
|
||||
COMPATIBLE_HOST = '(x86_64.*|i.86.*)-(linux|freebsd.*)'
|
||||
Reference in New Issue
Block a user