Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Joshua Watt <jpewhacker@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Joshua Watt <JPEWhacker@gmail.com>
Subject: [OE-core][PATCH] syslinux: Allow mtools to be optional
Date: Mon,  8 Jan 2024 13:22:47 -0700	[thread overview]
Message-ID: <20240108202247.767072-1-JPEWhacker@gmail.com> (raw)

Adds a PACKAGECONFIG to syslinux to determine if the mtools version of
the utilities is installed or not. The difference between the two
versions is that the mtools version can be used by any user with write
permission, while the non-mtools can only be used by root.

The syslinux-nomtools package is removed, as it was empty and doesn't
appear to be used anyway

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
 .../syslinux/syslinux_6.04-pre2.bb              | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb b/meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb
index 1931bfb3c05..332655bdf98 100644
--- a/meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb
+++ b/meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb
@@ -63,6 +63,10 @@ EXTRA_OEMAKE = " \
 	RANLIB="${RANLIB}" \
 "
 
+# mtools allows non-root users to install syslinux
+PACKAGECONFIG ??= "mtools"
+PACKAGECONFIG[mtools] = ",,,"
+
 #
 # Tasks for native/nativesdk which just build the installer.
 #
@@ -77,10 +81,15 @@ do_compile() {
 do_install() {
 	install -d ${D}${bindir}
 	install \
-		${B}/bios/mtools/syslinux \
 		${B}/bios/extlinux/extlinux \
 		${B}/bios/utils/isohybrid \
 		${D}${bindir}
+
+	if ${@bb.utils.contains("PACKAGECONFIG", "mtools", "true", "false", d)}; then
+		install ${B}/bios/mtools/syslinux ${D}${bindir}
+	else
+		install ${B}/bios/linux/syslinux ${D}${bindir}
+	fi
 }
 
 #
@@ -104,14 +113,12 @@ do_install:class-target() {
 	install -m 644 ${S}/bios/core/ldlinux.bss ${D}${datadir}/syslinux/
 }
 
-PACKAGES += "${PN}-nomtools ${PN}-extlinux ${PN}-mbr ${PN}-chain ${PN}-pxelinux ${PN}-isolinux ${PN}-misc"
+PACKAGES += "${PN}-extlinux ${PN}-mbr ${PN}-chain ${PN}-pxelinux ${PN}-isolinux ${PN}-misc"
 
-RDEPENDS:${PN} += "mtools"
-RDEPENDS:${PN}-nomtools += "libext2fs"
+RDEPENDS:${PN} += "${@bb.utils.contains("PACKAGECONFIG", "mtools", "mtools", "", d)}"
 RDEPENDS:${PN}-misc += "perl"
 
 FILES:${PN} = "${bindir}/syslinux"
-FILES:${PN}-nomtools = "${bindir}/syslinux-nomtools"
 FILES:${PN}-extlinux = "${sbindir}/extlinux"
 FILES:${PN}-mbr = "${datadir}/${BPN}/mbr.bin"
 FILES:${PN}-chain = "${datadir}/${BPN}/chain.c32"
-- 
2.34.1



                 reply	other threads:[~2024-01-08 20:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240108202247.767072-1-JPEWhacker@gmail.com \
    --to=jpewhacker@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox