diff options
author | Dave Cobbley <david.j.cobbley@linux.intel.com> | 2018-08-14 20:05:37 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-08-23 04:26:31 +0300 |
commit | eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch) | |
tree | de291a73dc37168da6370e2cf16c347d1eba9df8 /meta-openembedded/meta-initramfs/recipes-devtools/grubby | |
parent | 9c3cf826d853102535ead04cebc2d6023eff3032 (diff) | |
download | openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.xz |
[Subtree] Removing import-layers directory
As part of the move to subtrees, need to bring all the import layers
content to the top level.
Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f
Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-openembedded/meta-initramfs/recipes-devtools/grubby')
5 files changed, 163 insertions, 0 deletions
diff --git a/meta-openembedded/meta-initramfs/recipes-devtools/grubby/grubby/0001-Add-another-variable-LIBS-to-provides-libraries-from.patch b/meta-openembedded/meta-initramfs/recipes-devtools/grubby/grubby/0001-Add-another-variable-LIBS-to-provides-libraries-from.patch new file mode 100644 index 000000000..1b1a993a0 --- /dev/null +++ b/meta-openembedded/meta-initramfs/recipes-devtools/grubby/grubby/0001-Add-another-variable-LIBS-to-provides-libraries-from.patch @@ -0,0 +1,26 @@ +From 22afaa21b4b258082be591e54c99e1ba6fbd7748 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 1/2] Add another variable LIBS to provides libraries from env + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index ac14404..92a8e73 100644 +--- a/Makefile ++++ b/Makefile +@@ -27,7 +27,7 @@ RPM_OPT_FLAGS ?= -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector + CFLAGS += $(RPM_OPT_FLAGS) -std=gnu99 -Wall -Werror -Wno-error=unused-function -Wno-unused-function -ggdb + LDFLAGS := + +-grubby_LIBS = -lblkid -lpopt ++grubby_LIBS = -lblkid -lpopt ${LIBS} + + all: grubby + +-- +2.13.3 + diff --git a/meta-openembedded/meta-initramfs/recipes-devtools/grubby/grubby/0002-include-paths.h-for-_PATH_MOUNTED.patch b/meta-openembedded/meta-initramfs/recipes-devtools/grubby/grubby/0002-include-paths.h-for-_PATH_MOUNTED.patch new file mode 100644 index 000000000..de8133a3a --- /dev/null +++ b/meta-openembedded/meta-initramfs/recipes-devtools/grubby/grubby/0002-include-paths.h-for-_PATH_MOUNTED.patch @@ -0,0 +1,25 @@ +From 8f844ac7f44b8dc428d06cd6958c5f32d383d01c 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 2/2] include paths.h for _PATH_MOUNTED + +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 47a1a15..59f74a9 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.13.3 + diff --git a/meta-openembedded/meta-initramfs/recipes-devtools/grubby/grubby/grubby-rename-grub2-editenv-to-grub-editenv.patch b/meta-openembedded/meta-initramfs/recipes-devtools/grubby/grubby/grubby-rename-grub2-editenv-to-grub-editenv.patch new file mode 100644 index 000000000..d936249be --- /dev/null +++ b/meta-openembedded/meta-initramfs/recipes-devtools/grubby/grubby/grubby-rename-grub2-editenv-to-grub-editenv.patch @@ -0,0 +1,69 @@ +From 0841706a5b5280e501c8e392c70c466c5fbcf0aa 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: Inappropriate + +Signed-off-by: Jackie Huang <jackie.huang@windriver.com> +--- + grubby.c | 4 ++-- + test.sh | 6 +++--- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/grubby.c b/grubby.c +index d4ebb86..47a1a15 100644 +--- a/grubby.c ++++ b/grubby.c +@@ -290,7 +290,7 @@ static char *grub2GetEnv(struct configFileInfo *info, char *name) + char *s = NULL; + char *ret = NULL; + char *envFile = info->envFile ? info->envFile : "/boot/grub2/grubenv"; +- int rc = asprintf(&s, "grub2-editenv %s list | grep '^%s='", envFile, name); ++ int rc = asprintf(&s, "grub-editenv %s list | grep '^%s='", envFile, name); + + if (rc < 0) + return NULL; +@@ -361,7 +361,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 6379698..f738388 100755 +--- a/test.sh ++++ b/test.sh +@@ -574,7 +574,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" +@@ -587,13 +587,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.3.5 + diff --git a/meta-openembedded/meta-initramfs/recipes-devtools/grubby/grubby/run-ptest b/meta-openembedded/meta-initramfs/recipes-devtools/grubby/grubby/run-ptest new file mode 100644 index 000000000..b06ac5946 --- /dev/null +++ b/meta-openembedded/meta-initramfs/recipes-devtools/grubby/grubby/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +./test.sh -v diff --git a/meta-openembedded/meta-initramfs/recipes-devtools/grubby/grubby_8.40.bb b/meta-openembedded/meta-initramfs/recipes-devtools/grubby/grubby_8.40.bb new file mode 100644 index 000000000..dc3a70bb5 --- /dev/null +++ b/meta-openembedded/meta-initramfs/recipes-devtools/grubby/grubby_8.40.bb @@ -0,0 +1,40 @@ +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 = "GPLv2+" + +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; \ + 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}-ptest = "util-linux-getopt bash" + +COMPATIBLE_HOST = '(x86_64.*|i.86.*)-(linux|freebsd.*)' |