Skip to contentSkip to conversation

Fixes for a distro with a merged /usr

PATCH Superseded Joshua Lock 4 participants 20 messages Sep 3, 2015 – Sep 4, 2015

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Fixes for a distro with a merged /usr

I've been playing around with building a distro with a merged /usr[1] and the following series fixes several issues I ran across in OE core metadata.

These have been build tested by building a core-image-sato image with ipk packaging for qemux86 with both a standard/default configuration and for my merged /usr test distro.

I used buildhistory to compare core-image-sato before and after this series and the only change is:

Changes to images/qemux86/glibc/core-image-sato (files-in-image.txt):
/bin/lsmod.kmod changed symlink target from ../bin/kmod to kmod

Regards,

Joshua

1. https://wiki.freedesktop.org/www/Software/systemd/TheCaseForTheUsrMerge/

The following changes since commit bdeb32b4cdbe316f17c2fd854d59e05e8f2e8ffc:

rt-tests: drop unnecessary added-missing-dependencies.patch (2015-09-01 11:43:38 +0100)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib joshuagl/merged-usr
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=joshuagl/merged-usr

Joshua Lock (9):
kmod: fix link creation when base_bindir != /bin
busybox: fixes for when base_bindir != /bin
systemd: remove hard-coded paths in FILES entries
alsa-utils: handle udev dir being 2 levels below /
pulseaudio: handle udev dir being 2 levels below /
bluez: handle udev dir being 2 levels below /
pcmciautils: handle udev dir being 2 levels below /
nfs-utils: don't force use of /sbin as sbindir
procps: fix for base_sbindir == sbindir

 meta/recipes-bsp/pcmciautils/pcmciautils_018.bb    |  4 +-
 meta/recipes-connectivity/bluez5/bluez5.inc        |  1 +
 .../nfs-utils/nfs-utils_1.3.1.bb                   |  8 ++++
 meta/recipes-core/busybox/busybox.inc              | 49 ++++++++++++----------
 meta/recipes-core/systemd/systemd_219.bb           | 10 ++---
 meta/recipes-extended/procps/procps_3.3.10.bb      |  5 ++-
 meta/recipes-kernel/kmod/kmod_git.bb               |  4 +-
 meta/recipes-multimedia/alsa/alsa-utils_1.0.29.bb  |  2 +-
 meta/recipes-multimedia/pulseaudio/pulseaudio.inc  |  2 +-
 9 files changed, 49 insertions(+), 36 deletions(-)
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/9 kmod: fix link creation when base_bindir != /bin

If base_bindir is not a direct child of / the link creation in do_install_append creates incorrect relative links.

Instead pass a full path to the link source and use the -r flag to ln to ensure the link is relative.

---
 meta/recipes-kernel/kmod/kmod_git.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-kernel/kmod/kmod_git.bb +2 -2
index ba4d85e..120fd87 100644
@@ -21,9 +21,9 @@ do_install_append () {
         install -dm755 ${D}${base_bindir}
         install -dm755 ${D}${base_sbindir}
         # add symlinks to kmod
-        ln -s ..${base_bindir}/kmod ${D}${base_bindir}/lsmod
+        ln -sr ${D}${base_bindir}/kmod ${D}${base_bindir}/lsmod
         for tool in insmod rmmod depmod modinfo modprobe; do
-                ln -s ..${base_bindir}/kmod ${D}${base_sbindir}/${tool}
+                ln -sr ${D}${base_bindir}/kmod ${D}${base_sbindir}/${tool}
         done
         # configuration directories
         install -dm755 ${D}${base_libdir}/depmod.d
Signature · 1 line
2.1.4
#2 lore raw

PATCH 2/9 busybox: fixes for when base_bindir != /bin

In reply to Joshua Lock

* Replace all hard-coded paths with variables
* Run sed over busybox.links.* to replace /bin with ${base_bindir}

---
 meta/recipes-core/busybox/busybox.inc | 49 +++++++++++++++++++----------------
 1 file changed, 26 insertions(+), 23 deletions(-)
meta/recipes-core/busybox/busybox.inc +26 -23
index 0769d92..92b4a29 100644
@@ -178,6 +178,9 @@ do_install () {
 	if [ "${base_sbindir}" != "/sbin" ]; then
 		sed -i "s:^/sbin/:${base_sbindir}/:" busybox.links*
 	fi
+	if [ "${base_bindir}" != "/bin" ]; then
+		sed -i "s:^/bin/:${base_bindir}/:" busybox.links*
+	fi
 
 	install -d ${D}${sysconfdir}/init.d
 
@@ -338,10 +341,10 @@ python do_package_prepend () {
         return
 
     if os.path.exists('%s/etc/busybox.links' % (dvar)):
-        set_alternative_vars("/etc/busybox.links", "/bin/busybox")
+        set_alternative_vars("${sysconfdir}/busybox.links", "${base_bindir}/busybox")
     else:
-        set_alternative_vars("/etc/busybox.links.nosuid", "/bin/busybox.nosuid")
-        set_alternative_vars("/etc/busybox.links.suid", "/bin/busybox.suid")
+        set_alternative_vars("${sysconfdir}/busybox.links.nosuid", "${base_bindir}/busybox.nosuid")
+        set_alternative_vars("${sysconfdir}/busybox.links.suid", "${base_bindir}/busybox.suid")
 }
 
 pkg_postinst_${PN} () {
@@ -353,22 +356,22 @@ pkg_postinst_${PN} () {
 	if test "x$D" = "x"; then
 		# Remove busybox.nosuid if it's a symlink, because this situation indicates
 		# that we're installing or upgrading to a one-binary busybox.
-		if test -h /bin/busybox.nosuid; then
-			rm -f /bin/busybox.nosuid
+		if test -h ${bindir}/busybox.nosuid; then
+			rm -f ${bindir}/busybox.nosuid
 		fi
 		for suffix in "" ".nosuid" ".suid"; do
-			if test -e /etc/busybox.links$suffix; then
+			if test -e ${sysconfdir}/busybox.links$suffix; then
 				while read link; do
 					if test ! -e "$link"; then
 						case "$link" in
 							/*/*/*)
-								to="../../bin/busybox$suffix"
+								to="../..${base_bindir}/busybox$suffix"
 								;;
 							/bin/*)
 								to="busybox$suffix"
 								;;
 							/*/*)
-								to="../bin/busybox$suffix"
+								to="..${base_bindir}/busybox$suffix"
 								;;
 						esac
 						# we can use busybox here because even if we are using splitted busybox
@@ -376,7 +379,7 @@ pkg_postinst_${PN} () {
 						busybox rm -f $link
 						busybox ln -s $to $link
 					fi
-				done < /etc/busybox.links$suffix
+				done < ${sysconfdir}/busybox.links$suffix
 			fi
 		done
 	fi
@@ -387,19 +390,19 @@ pkg_prerm_${PN} () {
 	# providing its files, this will make update-alternatives work, but the update-rc.d part
 	# for syslog, httpd and/or udhcpd will fail if there is no other package providing sh
 	tmpdir=`mktemp -d /tmp/busyboxrm-XXXXXX`
-	ln -s /bin/busybox $tmpdir/[
-	ln -s /bin/busybox $tmpdir/test
-	ln -s /bin/busybox $tmpdir/head
-	ln -s /bin/busybox $tmpdir/sh
-	ln -s /bin/busybox $tmpdir/basename
-	ln -s /bin/busybox $tmpdir/echo
-	ln -s /bin/busybox $tmpdir/mv
-	ln -s /bin/busybox $tmpdir/ln
-	ln -s /bin/busybox $tmpdir/dirname
-	ln -s /bin/busybox $tmpdir/rm
-	ln -s /bin/busybox $tmpdir/sed
-	ln -s /bin/busybox $tmpdir/sort
-	ln -s /bin/busybox $tmpdir/grep
+	ln -s ${base_bindir}/busybox $tmpdir/[
+	ln -s ${base_bindir}/busybox $tmpdir/test
+	ln -s ${base_bindir}/busybox $tmpdir/head
+	ln -s ${base_bindir}/busybox $tmpdir/sh
+	ln -s ${base_bindir}/busybox $tmpdir/basename
+	ln -s ${base_bindir}/busybox $tmpdir/echo
+	ln -s ${base_bindir}/busybox $tmpdir/mv
+	ln -s ${base_bindir}/busybox $tmpdir/ln
+	ln -s ${base_bindir}/busybox $tmpdir/dirname
+	ln -s ${base_bindir}/busybox $tmpdir/rm
+	ln -s ${base_bindir}/busybox $tmpdir/sed
+	ln -s ${base_bindir}/busybox $tmpdir/sort
+	ln -s ${base_bindir}/busybox $tmpdir/grep
 	export PATH=$PATH:$tmpdir
 }
 
@@ -407,7 +410,7 @@ pkg_prerm_${PN}-syslog () {
 	# remove syslog
 	if test "x$D" = "x"; then
 		if test "$1" = "upgrade" -o "$1" = "remove"; then
-			/etc/init.d/syslog stop
+			${sysconfdir}/init.d/syslog stop
 		fi
 	fi
 }
Signature · 1 line
2.1.4
#3 lore raw

PATCH 3/9 systemd: remove hard-coded paths in FILES entries

In reply to Joshua Lock
---
 meta/recipes-core/systemd/systemd_219.bb | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
meta/recipes-core/systemd/systemd_219.bb +5 -5
index 4d32fd5..fbd86e8 100644
@@ -306,10 +306,10 @@ FILES_${PN} = " ${base_bindir}/* \
                 ${exec_prefix}/lib/sysctl.d \
                 ${exec_prefix}/lib/sysusers.d \
                 ${localstatedir} \
-                /lib/udev/rules.d/70-uaccess.rules \
-                /lib/udev/rules.d/71-seat.rules \
-                /lib/udev/rules.d/73-seat-late.rules \
-                /lib/udev/rules.d/99-systemd.rules \
+                ${base_libdir}/udev/rules.d/70-uaccess.rules \
+                ${base_libdir}/udev/rules.d/71-seat.rules \
+                ${base_libdir}/udev/rules.d/73-seat-late.rules \
+                ${base_libdir}/udev/rules.d/99-systemd.rules \
                "
 
 FILES_${PN}-dbg += "${rootlibdir}/.debug ${systemd_unitdir}/.debug ${systemd_unitdir}/*/.debug ${base_libdir}/security/.debug/"
@@ -327,7 +327,7 @@ RRECOMMENDS_${PN} += "systemd-serialgetty systemd-vconsole-setup \
 
 PACKAGES =+ "udev-dbg udev udev-hwdb"
 
-FILES_udev-dbg += "/lib/udev/.debug"
+FILES_udev-dbg += "${base_libdir}/udev/.debug"
 
 RPROVIDES_udev = "hotplug"
 
Signature · 1 line
2.1.4
#4 lore raw

Re: [PATCH 3/9] systemd: remove hard-coded paths in FILES entries

Quoted 25 lines · Joshua Lock
---
 meta/recipes-core/systemd/systemd_219.bb | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
meta/recipes-core/systemd/systemd_219.bb +4 -4
index 4d32fd5..fbd86e8 100644
@@ -306,10 +306,10 @@ FILES_${PN} = " ${base_bindir}/* \
                 ${exec_prefix}/lib/sysctl.d \
                 ${exec_prefix}/lib/sysusers.d \
                 ${localstatedir} \
-                /lib/udev/rules.d/70-uaccess.rules \
-                /lib/udev/rules.d/71-seat.rules \
-                /lib/udev/rules.d/73-seat-late.rules \
-                /lib/udev/rules.d/99-systemd.rules \
+                ${base_libdir}/udev/rules.d/70-uaccess.rules \
+                ${base_libdir}/udev/rules.d/71-seat.rules \
+                ${base_libdir}/udev/rules.d/73-seat-late.rules \
+                ${base_libdir}/udev/rules.d/99-systemd.rules \
                "
 
 FILES_${PN}-dbg += "${rootlibdir}/.debug ${systemd_unitdir}/.debug ${systemd_unitdir}/*/.debug ${base_libdir}/security/.debug/"

meta/recipes-core/systemd/systemd_219.bb RRECOMMENDS_${PN} += "systemd-serialgetty systemd-vconsole-setup \ · line 330

Quoted 5 lines
meta/recipes-core/systemd/systemd_219.bb +1 -1
@@ -327,7 +327,7 @@ RRECOMMENDS_${PN} += "systemd-serialgetty systemd-vconsole-setup \
 
 PACKAGES =+ "udev-dbg udev udev-hwdb"
 
-FILES_udev-dbg += "/lib/udev/.debug"
+FILES_udev-dbg += "${base_libdir}/udev/.debug"

From what I remember, this is intentional and this change likely breaks multilib. You don't want two sets of rules on a multilib system.

Cheers,

Richard

#5 lore raw

Re: [PATCH 3/9] systemd: remove hard-coded paths in FILES entries

Quoted 3 lines · Richard Purdie

From what I remember, this is intentional and this change likely breaks multilib. You don't want two sets of rules on a multilib system.

Indeed - you need nonarch_base_libdir or whatever it's called here I think, as that doesn't get renamed by multilib.

Ross

#6 lore raw

Re: [PATCH 3/9] systemd: remove hard-coded paths in FILES entries

Quoted 9 lines · Ross
Quoted 4 lines · Richard Purdie

From what I remember, this is intentional and this change likely breaks
multilib. You don't want two sets of rules on a multilib system.

Indeed - you need nonarch_base_libdir or whatever it's called here I think, as that doesn't get renamed by multilib.

Got it, thanks - I'm testing a v2 series with a multilib build thrown in to the mix.

Thanks both for the feedback,

Joshua

#7 lore raw

Re: [PATCH 3/9] systemd: remove hard-coded paths in FILES entries

In reply to Richard Purdie
Quoted 27 lines · Richard Purdie
Quoted 26 lines · Joshua Lock
---
 meta/recipes-core/systemd/systemd_219.bb | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
meta/recipes-core/systemd/systemd_219.bb +4 -4
index 4d32fd5..fbd86e8 100644
@@ -306,10 +306,10 @@ FILES_${PN} = " ${base_bindir}/* \
                 ${exec_prefix}/lib/sysctl.d \
                 ${exec_prefix}/lib/sysusers.d \
                 ${localstatedir} \
-                /lib/udev/rules.d/70-uaccess.rules \
-                /lib/udev/rules.d/71-seat.rules \
-                /lib/udev/rules.d/73-seat-late.rules \
-                /lib/udev/rules.d/99-systemd.rules \
+                ${base_libdir}/udev/rules.d/70-uaccess.rules \
+                ${base_libdir}/udev/rules.d/71-seat.rules \
+                ${base_libdir}/udev/rules.d/73-seat-late.rules \
+                ${base_libdir}/udev/rules.d/99-systemd.rules \
                "
 
 FILES_${PN}-dbg += "${rootlibdir}/.debug ${systemd_unitdir}/.debug ${systemd_unitdir}/*/.debug ${base_libdir}/security/.debug/"
@@ -327,7 +327,7 @@ RRECOMMENDS_${PN} += "systemd-serialgetty systemd-vconsole-setup \
 
Quoted 7 lines

meta/recipes-core/systemd/systemd_219.bb RRECOMMENDS_${PN} += "systemd-serialgetty systemd-vconsole-setup \ · line 330

Quoted 4 lines
meta/recipes-core/systemd/systemd_219.bb +1 -1
 PACKAGES =+ "udev-dbg udev udev-hwdb"
 
-FILES_udev-dbg += "/lib/udev/.debug"
+FILES_udev-dbg += "${base_libdir}/udev/.debug"

From what I remember, this is intentional and this change likely breaks multilib. You don't want two sets of rules on a multilib system.

Correct.. it has to go into /lib or if everything is move to /usr, then /usr/lib.

--Mark

Quoted 6 lines

Cheers,

Richard

#8 lore raw

Re: [PATCH 3/9] systemd: remove hard-coded paths in FILES entries

Quoted 41 lines · Mark Hatle
Quoted 31 lines · Richard Purdie
Quoted 30 lines · Joshua Lock
---
 meta/recipes-core/systemd/systemd_219.bb | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
meta/recipes-core/systemd/systemd_219.bb +4 -4
index 4d32fd5..fbd86e8 100644
@@ -306,10 +306,10 @@ FILES_${PN} = " ${base_bindir}/* \
                 ${exec_prefix}/lib/sysctl.d \
                 ${exec_prefix}/lib/sysusers.d \
                 ${localstatedir} \
-                /lib/udev/rules.d/70-uaccess.rules \
-                /lib/udev/rules.d/71-seat.rules \
-                /lib/udev/rules.d/73-seat-late.rules \
-                /lib/udev/rules.d/99-systemd.rules \
+                ${base_libdir}/udev/rules.d/70-uaccess.rules \
+                ${base_libdir}/udev/rules.d/71-seat.rules \
+                ${base_libdir}/udev/rules.d/73-seat-late.rules \
+                ${base_libdir}/udev/rules.d/99-systemd.rules \
                "
 
 FILES_${PN}-dbg += "${rootlibdir}/.debug

${systemd_unitdir}/.debug ${systemd_unitdir}/*/.debug ${base_libdir}/security/.debug/"

meta/recipes-core/systemd/systemd_219.bb +0 -0
@@ -327,7 +327,7 @@ RRECOMMENDS_${PN} += "systemd-serialgetty
 systemd-vconsole-setup \
 
Quoted 8 lines

meta/recipes-core/systemd/systemd_219.bb RRECOMMENDS_${PN} += "systemd-serialgetty systemd-vconsole-setup \ · line 330

Quoted 4 lines
meta/recipes-core/systemd/systemd_219.bb +1 -1
 PACKAGES =+ "udev-dbg udev udev-hwdb"
 
-FILES_udev-dbg += "/lib/udev/.debug"
+FILES_udev-dbg += "${base_libdir}/udev/.debug"

From what I remember, this is intentional and this change likely breaks
multilib. You don't want two sets of rules on a multilib system.

Quoted 2 lines

Correct.. it has to go into /lib or if everything is move to /usr, then /usr/lib.

I've prepared a v2 that changes this to nonarch_base_libdir but systemd+multilib appears to be broken, see:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=8256

Regards,

Joshua

#9 lore raw

Re: [PATCH 3/9] systemd: remove hard-coded paths in FILES entries

Quoted 5 lines · Joshua Lock

I've prepared a v2 that changes this to nonarch_base_libdir but systemd+multilib appears to be broken, see:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=8256

As far as I understand it (and that's only a bit, I'll delegate to Mark) this is because the sanity check is verifying that the files that get overwritten between different subarches are actually identical, but lib32-connman and connman have service files in /lib/systemd that refer to binaries that are in $(libdir), which changes, so the files change. Arguably connman should be using libexecdir and not libdir, but that also would mean fixing libexecdir not to change (for which I have a patch series that failed to re-send in this cycle).

I've commented on the bug that the example should be changed to be a library such as lib32-glib-2.0, which is possibly a more useful real world situation ("I have a 32-bit pre-compiled binary that needs glib" is more likely than "I want a 64-bit distro with a 32-bit connman") and should actually work.

Ross

Ross

#10 lore raw

PATCH 4/9 alsa-utils: handle udev dir being 2 levels below /

In reply to Joshua Lock

When building with a merged /usr dir the udev directory lives at /usr/lib/udev - update the FILES pattern to also pick up udev files installed two levels below the / to ensure a merged /usr works.

---
 meta/recipes-multimedia/alsa/alsa-utils_1.0.29.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-multimedia/alsa/alsa-utils_1.0.29.bb +1 -1
index 263f38a..97fe4b2 100644
@@ -58,7 +58,7 @@ FILES_alsa-utils-midi        = "${bindir}/aplaymidi ${bindir}/arecordmidi ${bind
 FILES_alsa-utils-aconnect    = "${bindir}/aconnect"
 FILES_alsa-utils-aseqnet     = "${bindir}/aseqnet"
 FILES_alsa-utils-iecset      = "${bindir}/iecset"
-FILES_alsa-utils-alsactl     = "${sbindir}/alsactl */udev/rules.d ${systemd_unitdir} ${localstatedir}/lib/alsa ${datadir}/alsa/init/"
+FILES_alsa-utils-alsactl     = "${sbindir}/alsactl */udev/rules.d */*/udev/rules.d ${systemd_unitdir} ${localstatedir}/lib/alsa ${datadir}/alsa/init/"
 FILES_alsa-utils-aseqdump    = "${bindir}/aseqdump"
 FILES_alsa-utils-alsaloop    = "${bindir}/alsaloop"
 FILES_alsa-utils-alsaucm     = "${bindir}/alsaucm"
Signature · 1 line
2.1.4
#11 lore raw

PATCH 5/9 pulseaudio: handle udev dir being 2 levels below /

In reply to Joshua Lock

When building with a merged /usr dir the udev directory lives at /usr/lib/udev - update the FILES pattern to also pick up udev files installed two levels below the / to ensure a merged /usr works.

---
 meta/recipes-multimedia/pulseaudio/pulseaudio.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-multimedia/pulseaudio/pulseaudio.inc +1 -1
index 47f5f39..5454787 100644
@@ -99,7 +99,7 @@ FILES_${PN}-dbg += "${libexecdir}/pulse/.debug \
 FILES_${PN}-dev += "${libdir}/pulse-${PV}/modules/*.la ${datadir}/vala ${libdir}/cmake"   
 FILES_${PN}-conf = "${sysconfdir}"
 FILES_${PN}-bin += "${sysconfdir}/default/volatiles/volatiles.04_pulse"
-FILES_${PN}-server = "${bindir}/pulseaudio ${bindir}/start-* ${sysconfdir} ${bindir}/pactl */udev/rules.d/*.rules ${systemd_user_unitdir}/*"
+FILES_${PN}-server = "${bindir}/pulseaudio ${bindir}/start-* ${sysconfdir} ${bindir}/pactl */udev/rules.d/*.rules */*/udev/rules.d/*.rules ${systemd_user_unitdir}/*"
 
 #SYSTEMD_PACKAGES = "${PN}-server"
 SYSTEMD_SERVICE_${PN}-server = "pulseaudio.service"
Signature · 1 line
2.1.4
#12 lore raw

PATCH 6/9 bluez: handle udev dir being 2 levels below /

In reply to Joshua Lock

When building with a merged /usr dir the udev directory lives at /usr/lib/udev - update the FILES pattern to also pick up udev files installed two levels below the / to ensure a merged /usr works.

---
 meta/recipes-connectivity/bluez5/bluez5.inc | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-connectivity/bluez5/bluez5.inc +1 -0
index 0fe5be5..039c443 100644
@@ -95,6 +95,7 @@ FILES_${PN}-dbg += "\
   ${libdir}/bluetooth/plugins/.debug \
   ${libdir}/*/.debug \
   */udev/.debug \
+  */*/udev/.debug \
   "
 
 RDEPENDS_${PN}-testtools += "python python-dbus python-pygobject"
Signature · 1 line
2.1.4
#13 lore raw

PATCH 7/9 pcmciautils: handle udev dir being 2 levels below /

In reply to Joshua Lock

When building with a merged /usr dir the udev directory lives at /usr/lib/udev - update the FILES pattern to also pick up udev files installed two levels below the / to ensure a merged /usr works.

---
 meta/recipes-bsp/pcmciautils/pcmciautils_018.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-bsp/pcmciautils/pcmciautils_018.bb +2 -2
index 24ceed8..857bd07 100644
@@ -9,5 +9,5 @@ SRC_URI[sha256sum] = "79e6ae441278e178c07501d492394ed2c0326fdb66894f6d040ec811b0
 
 PR = "r1"
 
-FILES_${PN}-dbg += "*/udev/.debug"
-FILES_${PN} += "*/udev"
+FILES_${PN}-dbg += "*/udev/.debug */*/udev/.debug"
+FILES_${PN} += "*/udev */*/udev"
Signature · 1 line
2.1.4
#14 lore raw

PATCH 8/9 nfs-utils: don't force use of /sbin as sbindir

In reply to Joshua Lock

In a system with a merged /usr /sbin isn't packaged.

---
 meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.1.bb | 8 ++++++++
 1 file changed, 8 insertions(+)
meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.1.bb +8 -0
index 6da8509..42101de 100644
@@ -90,6 +90,14 @@ RDEPENDS_${PN}-stats = "python"
 
 FILES_${PN} += "${systemd_unitdir}"
 
+do_configure_prepend() {
+        sed -i -e 's,sbindir = /sbin,sbindir = ${base_sbindir},g' \
+            ${S}/utils/mount/Makefile.am
+
+        sed -i -e 's,sbindir = /sbin,sbindir = ${base_sbindir},g' \
+            ${S}/utils/osd_login/Makefile.am
+}
+
 # Make clean needed because the package comes with
 # precompiled 64-bit objects that break the build
 do_compile_prepend() {
Signature · 1 line
2.1.4
#15 lore raw

Re: [PATCH 8/9] nfs-utils: don't force use of /sbin as sbindir

Quoted 1 line · Joshua Lock

In a system with a merged /usr /sbin isn't packaged.

This sounds like an error to me if /sbin doesn't exist at all. It should exist either as a link to /usr/sbin (or the reverse).. but it should be there as lots of things expect the directory (or link) to exist.

(It's also required by the FHS, even though that probably isn't enough of a concern.)

Quoted 15 lines
---
 meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.1.bb | 8 ++++++++
 1 file changed, 8 insertions(+)
meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.1.bb +1 -0
index 6da8509..42101de 100644
@@ -90,6 +90,14 @@ RDEPENDS_${PN}-stats = "python"
 
 FILES_${PN} += "${systemd_unitdir}"
 
+do_configure_prepend() {

meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.1.bb RDEPENDS_${PN}-stats = "python" · line 103

Quoted 10 lines
meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.1.bb +7 -0
+        sed -i -e 's,sbindir = /sbin,sbindir = ${base_sbindir},g' \
+            ${S}/utils/mount/Makefile.am
+
+        sed -i -e 's,sbindir = /sbin,sbindir = ${base_sbindir},g' \
+            ${S}/utils/osd_login/Makefile.am
+}
+
 # Make clean needed because the package comes with
 # precompiled 64-bit objects that break the build
 do_compile_prepend() {

So my concern is simply with the commit msg -- not the actual implementation. What you have above looks correct to me.

#16 lore raw

Re: [PATCH 8/9] nfs-utils: don't force use of /sbin as sbindir

Quoted 8 lines · Mark Hatle
Quoted 1 line · Joshua Lock

In a system with a merged /usr /sbin isn't packaged.

This sounds like an error to me if /sbin doesn't exist at all. It should exist
either as a link to /usr/sbin (or the reverse).. but it should be there as lots
of things expect the directory (or link) to exist.

Sure, it exists in my images but not during packaging. In my testing I have base_bindir, base_libdir and base_sbindir set to children of /usr in my distro.conf and a base-files_%.bbappend that creates the symlinks. Therefore at packaging time the /sbin directory (and symlink)
doesn't exist.

I admit this commit message is pretty poor and I'll try and remember to fix it in a v2.

Regards,

Joshua

Quoted 37 lines

(It's also required by the FHS, even though that probably isn't enough of a
concern.)

Quoted 26 lines
---
 meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.1.bb | 8
++++++++
 1 file changed, 8 insertions(+)
meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.1.bb +8 -0
index 6da8509..42101de 100644
@@ -90,6 +90,14 @@ RDEPENDS_${PN}-stats = "python"
 
 FILES_${PN} += "${systemd_unitdir}"
 
+do_configure_prepend() {
+        sed -i -e 's,sbindir = /sbin,sbindir = ${base_sbindir},g'
 \
+            ${S}/utils/mount/Makefile.am
+
+        sed -i -e 's,sbindir = /sbin,sbindir = ${base_sbindir},g'
 \
+            ${S}/utils/osd_login/Makefile.am
+}
+
 # Make clean needed because the package comes with
Quoted 3 lines
 # precompiled 64-bit objects that break the build
 do_compile_prepend() {

So my concern is simply with the commit msg -- not the actual implementation.
What you have above looks correct to me.

#17 lore raw

PATCH 9/9 procps: fix for base_sbindir == sbindir

In reply to Joshua Lock

An rmdir call in do_install_append was trying to remove the sbindir, however in a system with a merged usr this directory is not empty and therefore failing to rm it causes an ERROR.

Instead check that sbindir != base_sbindir before trying to remove the directory.

---
 meta/recipes-extended/procps/procps_3.3.10.bb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
meta/recipes-extended/procps/procps_3.3.10.bb +3 -2
index 65d64ec..dcfaba7 100644
@@ -31,8 +31,9 @@ do_install_append () {
 	[ "${bindir}" != "${base_bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i; done
 	install -d ${D}${base_sbindir}
 	[ "${sbindir}" != "${base_sbindir}" ] && for i in ${base_sbindir_progs}; do mv ${D}${sbindir}/$i ${D}${base_sbindir}/$i; done
-        # Remove now empty dir
-	rmdir ${D}/${sbindir}
+        if [ "${base_sbindir}" != "${sbindir}" ]; then
+                rmdir ${D}${sbindir}
+        fi
 
         install -d ${D}${sysconfdir}
         install -m 0644 ${WORKDIR}/sysctl.conf ${D}${sysconfdir}/sysctl.conf
Signature · 1 line
2.1.4
#18 lore raw
In reply to Joshua Lock
Quoted 2 lines · Joshua Lock

I've been playing around with building a distro with a merged /usr[1] and the following series fixes several issues I ran across in OE core metadata.

everything in '/' linked to '/usr/' or everything in '/usr/' linked down to '/'?

(I've seen both implementations... just curious which one you are trying.)

--Mark

Quoted 47 lines

These have been build tested by building a core-image-sato image with ipk packaging for qemux86 with both a standard/default configuration and for my merged /usr test distro.

I used buildhistory to compare core-image-sato before and after this series and the only change is:

Changes to images/qemux86/glibc/core-image-sato (files-in-image.txt):
/bin/lsmod.kmod changed symlink target from ../bin/kmod to kmod

Regards,

Joshua

1. https://wiki.freedesktop.org/www/Software/systemd/TheCaseForTheUsrMerge/

The following changes since commit bdeb32b4cdbe316f17c2fd854d59e05e8f2e8ffc:

rt-tests: drop unnecessary added-missing-dependencies.patch (2015-09-01 11:43:38 +0100)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib joshuagl/merged-usr
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=joshuagl/merged-usr

Joshua Lock (9):
kmod: fix link creation when base_bindir != /bin
busybox: fixes for when base_bindir != /bin
systemd: remove hard-coded paths in FILES entries
alsa-utils: handle udev dir being 2 levels below /
pulseaudio: handle udev dir being 2 levels below /
bluez: handle udev dir being 2 levels below /
pcmciautils: handle udev dir being 2 levels below /
nfs-utils: don't force use of /sbin as sbindir
procps: fix for base_sbindir == sbindir

 meta/recipes-bsp/pcmciautils/pcmciautils_018.bb    |  4 +-
 meta/recipes-connectivity/bluez5/bluez5.inc        |  1 +
 .../nfs-utils/nfs-utils_1.3.1.bb                   |  8 ++++
 meta/recipes-core/busybox/busybox.inc              | 49 ++++++++++++----------
 meta/recipes-core/systemd/systemd_219.bb           | 10 ++---
 meta/recipes-extended/procps/procps_3.3.10.bb      |  5 ++-
 meta/recipes-kernel/kmod/kmod_git.bb               |  4 +-
 meta/recipes-multimedia/alsa/alsa-utils_1.0.29.bb  |  2 +-
 meta/recipes-multimedia/pulseaudio/pulseaudio.inc  |  2 +-
 9 files changed, 49 insertions(+), 36 deletions(-)
#19 lore raw
Quoted 11 lines · Mark Hatle
Quoted 4 lines · Joshua Lock

I've been playing around with building a distro with a merged /usr[1] and
the following series fixes several issues I ran across in OE core metadata.

everything in '/' linked to '/usr/' or everything in '/usr/' linked down to '/'?

(I've seen both implementations... just curious which one you are trying.)

The latter, as per [1]. That is /bin, /lib and /sbin are symlinked into /usr.

Cheers,

Joshua

1. https://wiki.freedesktop.org/www/Software/systemd/TheCaseForTheUsrMe
rge/