Fixes for a distro with a merged /usr
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
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
@@ -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
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
@@ -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
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
@@ -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
Re: [PATCH 3/9] systemd: remove hard-coded paths in FILES entries
Quoted 25 lines · Joshua Lock
Signed-off-by Joshua Lock <[email protected]>--- meta/recipes-core/systemd/systemd_219.bb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)meta/recipes-core/systemd/systemd_219.bb +4
-4@@ -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
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
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_libdiror 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
Re: [PATCH 3/9] systemd: remove hard-coded paths in FILES entries
In reply to Richard PurdieQuoted 27 lines · Richard Purdie
Quoted 26 lines · Joshua Lock
Signed-off-by Joshua Lock <[email protected]>--- meta/recipes-core/systemd/systemd_219.bb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)meta/recipes-core/systemd/systemd_219.bb +4
-4@@ -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
-1PACKAGES =+ "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
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
Signed-off-by Joshua Lock <[email protected]>--- meta/recipes-core/systemd/systemd_219.bb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)meta/recipes-core/systemd/systemd_219.bb +4
-4@@ -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
-1PACKAGES =+ "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
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_libdirbut systemd+multilib appears to be broken, see:
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
PATCH 4/9 alsa-utils: handle udev dir being 2 levels below /
In reply to Joshua LockWhen 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
@@ -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
PATCH 5/9 pulseaudio: handle udev dir being 2 levels below /
In reply to Joshua LockWhen 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
@@ -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
PATCH 6/9 bluez: handle udev dir being 2 levels below /
In reply to Joshua LockWhen 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
@@ -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
PATCH 7/9 pcmciautils: handle udev dir being 2 levels below /
In reply to Joshua LockWhen 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
@@ -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
PATCH 8/9 nfs-utils: don't force use of /sbin as sbindir
In reply to Joshua LockIn 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
@@ -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
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
Signed-off-by Joshua Lock <[email protected]>--- 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@@ -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.
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
Signed-off-by Joshua Lock <[email protected]>--- 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@@ -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 withQuoted 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.
PATCH 9/9 procps: fix for base_sbindir == sbindir
In reply to Joshua LockAn 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
@@ -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
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.kmodchanged symlink target from ../bin/kmod to kmodRegards,
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-contribjoshuagl/merged-usr
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=joshuagl/merged-usrJoshua Lock (9):
kmod: fix link creation whenbase_bindir!= /bin
busybox: fixes for whenbase_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 forbase_sbindir== sbindirmeta/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(-)
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/