[meta-efibootguard][PATCH 1/2] rearrangement of the packages

34 views
Skip to first unread message

Michael Haener

unread,
Mar 8, 2022, 2:43:52 PM3/8/22
to efibootg...@googlegroups.com, Michael Haener
make use of the default packages and finer granular subdivision.

Signed-off-by: Michael Haener <michael...@siemens.com>
---
recipes-bsp/efibootguard/efibootguard_0.10.bb | 28 +++++++++++--------
1 file changed, 17 insertions(+), 11 deletions(-)

diff --git a/recipes-bsp/efibootguard/efibootguard_0.10.bb b/recipes-bsp/efibootguard/efibootguard_0.10.bb
index f25a67e..45a67c5 100644
--- a/recipes-bsp/efibootguard/efibootguard_0.10.bb
+++ b/recipes-bsp/efibootguard/efibootguard_0.10.bb
@@ -23,28 +23,34 @@ inherit autotools deploy pkgconfig

COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"

-PACKAGES = "${PN}-tools-dbg \
- ${PN}-tools-staticdev \
- ${PN}-tools-dev \
- ${PN}-tools \
- ${PN}"
+PACKAGES =+ " \
+ ${PN}-tools \
+ ${PN}-tools-bash-completion \
+ ${PN}-tools-zsh-completion \
+"

EXTRA_OECONF = "--with-gnuefi-sys-dir=${STAGING_DIR_HOST} \
--with-gnuefi-include-dir=${STAGING_INCDIR}/efi \
--with-gnuefi-lib-dir=${STAGING_LIBDIR}"

+FILES_${PN}-tools-bash-completion = " \
+ ${datadir}/${BPN}/completion/bash \
+"
+RDEPENDS_${PN}-tools-bash-completion = "bash-completion"
+
+FILES_${PN}-tools-zsh-completion = " \
+ ${datadir}/${BPN}/completion/zsh \
+"
+
FILES:${PN}-tools = " \
${bindir} \
- ${target_datadir}/${BPN}/completion/* \
"
-FILES:${PN}-tools-dbg = "/usr/src/debug ${bindir}/.debug /usr/lib/debug"
-FILES:${PN}-tools-staticdev = "${libdir}/lib*.a"
-FILES:${PN}-tools-dev = " \
+FILES:${PN}-staticdev = "${libdir}/lib*.a"
+FILES:${PN}-dev = " \
${includedir}/${BPN} \
${libdir}/libebgenv.so \
"
-FILES:${PN} = " \
- ${libdir}/${BPN} \
+FILES:${PN} += " \
${libdir}/libebgenv-${PV}*.so \
"

--
2.34.1

Michael Haener

unread,
Mar 8, 2022, 2:43:55 PM3/8/22
to efibootg...@googlegroups.com, Michael Haener
Path correction for the bash completion. With this fix the
completion can be used as usual.

Signed-off-by: Michael Haener <michael...@siemens.com>
---
recipes-bsp/efibootguard/efibootguard_0.10.bb | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/recipes-bsp/efibootguard/efibootguard_0.10.bb b/recipes-bsp/efibootguard/efibootguard_0.10.bb
index 45a67c5..c0182ab 100644
--- a/recipes-bsp/efibootguard/efibootguard_0.10.bb
+++ b/recipes-bsp/efibootguard/efibootguard_0.10.bb
@@ -34,7 +34,7 @@ EXTRA_OECONF = "--with-gnuefi-sys-dir=${STAGING_DIR_HOST} \
--with-gnuefi-lib-dir=${STAGING_LIBDIR}"

FILES_${PN}-tools-bash-completion = " \
- ${datadir}/${BPN}/completion/bash \
+ ${datadir}/bash-completion \
"
RDEPENDS_${PN}-tools-bash-completion = "bash-completion"

@@ -75,6 +75,16 @@ do_install:class-native () {
ln -s bg_setenv ${D}${bindir}/bg_printenv
}

+do_install:append() {
+ # Fix bash-completion path
+ if [ -d ${D}/${datadir}/${BPN}/completion/bash ]; then
+ install -d ${D}/${datadir}/bash-completion/completions
+ mv ${D}/${datadir}/${BPN}/completion/bash/bg_printenv.bash ${D}/${datadir}/bash-completion/completions/bg_printenv
+ mv ${D}/${datadir}/${BPN}/completion/bash/bg_setenv.bash ${D}/${datadir}/bash-completion/completions/bg_setenv
+ rm -rf ${D}/${datadir}/${BPN}/completion/bash
+ fi
+}
+
do_deploy:class-native () {
}

--
2.34.1

Michael Häner

unread,
Mar 9, 2022, 12:58:02 PM3/9/22
to EFI Boot Guard
Looks like zsh is still on the wrong path. I will make a version 2.

Michael Haener

unread,
Mar 9, 2022, 2:04:10 PM3/9/22
to efibootg...@googlegroups.com, Michael Haener
make use of the default packages and finer granular subdivision.

Signed-off-by: Michael Haener <michael...@siemens.com>
---
recipes-bsp/efibootguard/efibootguard_0.10.bb | 28 +++++++++++--------
1 file changed, 17 insertions(+), 11 deletions(-)

diff --git a/recipes-bsp/efibootguard/efibootguard_0.10.bb b/recipes-bsp/efibootguard/efibootguard_0.10.bb
index f25a67e..45a67c5 100644
--- a/recipes-bsp/efibootguard/efibootguard_0.10.bb
+++ b/recipes-bsp/efibootguard/efibootguard_0.10.bb
@@ -23,28 +23,34 @@ inherit autotools deploy pkgconfig

COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"

-PACKAGES = "${PN}-tools-dbg \
- ${PN}-tools-staticdev \
- ${PN}-tools-dev \
- ${PN}-tools \
- ${PN}"
+PACKAGES =+ " \
+ ${PN}-tools \
+ ${PN}-tools-bash-completion \
+ ${PN}-tools-zsh-completion \
+"

EXTRA_OECONF = "--with-gnuefi-sys-dir=${STAGING_DIR_HOST} \
--with-gnuefi-include-dir=${STAGING_INCDIR}/efi \
--with-gnuefi-lib-dir=${STAGING_LIBDIR}"

+FILES_${PN}-tools-bash-completion = " \
+ ${datadir}/${BPN}/completion/bash \
+"

Michael Haener

unread,
Mar 9, 2022, 2:04:13 PM3/9/22
to efibootg...@googlegroups.com, Michael Haener
Path correction for the bash and zsh completion. With this fix the
completion can be used as usual.

Signed-off-by: Michael Haener <michael...@siemens.com>
---
recipes-bsp/efibootguard/efibootguard_0.10.bb | 22 +++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/recipes-bsp/efibootguard/efibootguard_0.10.bb b/recipes-bsp/efibootguard/efibootguard_0.10.bb
index 45a67c5..a21abe4 100644
--- a/recipes-bsp/efibootguard/efibootguard_0.10.bb
+++ b/recipes-bsp/efibootguard/efibootguard_0.10.bb
@@ -34,12 +34,12 @@ EXTRA_OECONF = "--with-gnuefi-sys-dir=${STAGING_DIR_HOST} \
--with-gnuefi-lib-dir=${STAGING_LIBDIR}"

FILES_${PN}-tools-bash-completion = " \
- ${datadir}/${BPN}/completion/bash \
+ ${datadir}/bash-completion \
"
RDEPENDS_${PN}-tools-bash-completion = "bash-completion"

FILES_${PN}-tools-zsh-completion = " \
- ${datadir}/${BPN}/completion/zsh \
+ ${datadir}/zsh/site-functions \
"

FILES:${PN}-tools = " \
@@ -75,6 +75,24 @@ do_install:class-native () {
ln -s bg_setenv ${D}${bindir}/bg_printenv
}

+do_install:append() {
+ # Fix bash-completion path
+ if [ -d ${D}/${datadir}/${BPN}/completion/bash ]; then
+ install -d ${D}/${datadir}/bash-completion/completions
+ mv ${D}/${datadir}/${BPN}/completion/bash/bg_printenv.bash ${D}/${datadir}/bash-completion/completions/bg_printenv
+ mv ${D}/${datadir}/${BPN}/completion/bash/bg_setenv.bash ${D}/${datadir}/bash-completion/completions/bg_setenv
+ rm -rf ${D}/${datadir}/${BPN}/completion/bash
+ fi
+
+ # Fix zsh-completion path
+ if [ -d ${D}/${datadir}/${BPN}/completion/zsh ]; then
+ install -d ${D}/${datadir}/zsh/site-functions
+ mv ${D}/${datadir}/${BPN}/completion/zsh/_bg_printenv ${D}/${datadir}/zsh/site-functions/_bg_printenv
+ mv ${D}/${datadir}/${BPN}/completion/zsh/_bg_setenv ${D}/${datadir}/zsh/site-functions/_bg_setenv
+ rm -rf ${D}/${datadir}/${BPN}/completion/zsh

Michael Häner

unread,
Mar 9, 2022, 2:13:33 PM3/9/22
to EFI Boot Guard
added to next branch

Michael Adler

unread,
Mar 10, 2022, 2:04:20 AM3/10/22
to Michael Haener, efibootg...@googlegroups.com
Hi Michael,

> Path correction for the bash and zsh completion. With this fix the
> completion can be used as usual.

I guess it's a matter of taste (or maybe Debian policy?), but e.g. yadm [1] creates symlinks. I have also packaged
efibootguard in the context of ISAR and opted for the symlink approach for that reason.

Kind regards,
Michael

[1] https://packages.debian.org/bullseye/yadm

--
Michael Adler

Siemens AG
T RDA IOT SES-DE
Otto-Hahn-Ring 6
81739 München, Deutschland

Siemens Aktiengesellschaft: Vorsitzender des Aufsichtsrats: Jim Hagemann Snabe; Vorstand: Roland Busch, Vorsitzender; Klaus Helmrich, Cedrik Neike, Matthias Rebellius, Ralf P. Thomas, Judith Wiese; Sitz der Gesellschaft: Berlin und München, Deutschland; Registergericht: Berlin-Charlottenburg, HRB 12300, München, HRB 6684; WEEE-Reg.-Nr. DE 23691322

Michael Häner

unread,
Mar 13, 2022, 3:14:51 PM3/13/22
to EFI Boot Guard
Hm.... interesting. Thanks for the hint.
I did a quick search of the Yocto recipes, uniformly the paths I fixed are used. Currently I still prefer to move, but I'll sleep on it again.

Michael Häner

unread,
Mar 16, 2022, 3:15:18 AM3/16/22
to EFI Boot Guard
I took the path customization on the master branch, since the paths are used that way in all the recipes I found.
Reply all
Reply to author
Forward
0 new messages