All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cifs-utils: set ROOTSBINDIR to /usr/sbin if DISTRO_FEATURES has usrmerge
@ 2021-06-17 21:11 Geoff Parker
  0 siblings, 0 replies; only message in thread
From: Geoff Parker @ 2021-06-17 21:11 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Geoff Parker

From: Geoff Parker <geoffrey.parker@arthrex.com>

Fixes cif-utils recipe build when DISTRO_FEATURES includes 'usrmerge'

Add do_configure_prepend() to override ROOTSSBINDIR environment variable
so that the utilities are installed in /usr/sbin rather than /sbin.
Setting --exec-prefix or --prefix in EXTRA_OECONF does not work.

Update do_install_append() to NOT remove /usr/bin /usr/sbin if usrmerge
is set in DISTRO_FEATURES

Signed-off-by: Geoff Parker <geoffrey.parker@arthrex.com>
---
 .../recipes-support/cifs/cifs-utils_6.13.bb     | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/meta-networking/recipes-support/cifs/cifs-utils_6.13.bb b/meta-networking/recipes-support/cifs/cifs-utils_6.13.bb
index 41a9b8e76..bf8b18043 100644
--- a/meta-networking/recipes-support/cifs/cifs-utils_6.13.bb
+++ b/meta-networking/recipes-support/cifs/cifs-utils_6.13.bb
@@ -22,10 +22,21 @@ PACKAGECONFIG[pam] = "--enable-pam --with-pamdir=${base_libdir}/security,--disab
 
 inherit autotools pkgconfig
 
+do_configure_prepend() {
+    # want installed to /usr/sbin rather than /sbin to be DISTRO_FEATURES usrmerge compliant
+    # must override ROOTSBINDIR (default '/sbin'),
+    # setting --exec-prefix or --prefix in EXTRA_OECONF does not work
+    if ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','true','fakse',d)}; then
+        export ROOTSBINDIR=${sbindir}
+    fi
+}
+
 do_install_append() {
-    # Remove empty /usr/bin and /usr/sbin directories since the mount helper
-    # is installed to /sbin
-    rmdir --ignore-fail-on-non-empty ${D}${bindir} ${D}${sbindir}
+    if ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','false','true',d)}; then
+        # Remove empty /usr/bin and /usr/sbin directories since the mount helper
+        # is installed to /sbin
+        rmdir --ignore-fail-on-non-empty ${D}${bindir} ${D}${sbindir}
+    fi
 }
 
 FILES_${PN} += "${base_libdir}/security"
-- 
2.30.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-17 21:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-17 21:11 [PATCH] cifs-utils: set ROOTSBINDIR to /usr/sbin if DISTRO_FEATURES has usrmerge Geoff Parker

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.