Skip to contentSkip to conversation

Move libexecdir to $prefix/libexec

RFC New Ross Burton 1 participant 9 messages Jun 23, 2015 – Jul 15, 2015

lore
Share & tools
lore
#0 lore raw

Hi,

Yes, I'm bringing this up again. :)

Our default of libexecdir=$libdir/$BPN is contrary to both the FHS[1] and GNU Coding Standards[2], mainly because the key point is that libexecdir should be global and not change per-recipe. The new FHS allows /usr/libexec so this series changes the default to that, and fixes up the recipes which need fixing.

Several of the recipe fixes are unrelated to the change and will be submitted to master shortly, but others (eg sudo) are intimately tied to the change.

I've done basic multilib-enabled builds but more testing welcome. I'd say that in general multilib problems this exposes are in fact problems with the recipe:
for example GConf should install the binaries once and libraries in each libdir.

Ross

[1] http://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s07.html
[2] https://www.gnu.org/prep/standards/html_node/Directory-Variables.html

#1 lore raw

PATCH 1/6 eglibc: WIP fix paths for libexec

---
 meta/recipes-core/glibc/glibc-package.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/glibc/glibc-package.inc +1 -1
index 984362e..2425c82 100644
@@ -35,7 +35,7 @@ libc_baselibs = "${base_libdir}/libcrypt*.so.* ${base_libdir}/libcrypt-*.so ${ba
 libc_baselibs_append_aarch64 = " /lib/ld-linux-aarch64*.so.1"
 INSANE_SKIP_glibc_append_aarch64 = " libdir"
 
-FILES_${PN} = "${libc_baselibs} ${libexecdir}/* ${@base_conditional('USE_LDCONFIG', '1', '${base_sbindir}/ldconfig ${sysconfdir}/ld.so.conf', '', d)}"
+FILES_${PN} = "${libc_baselibs} ${libexecdir} ${@base_conditional('USE_LDCONFIG', '1', '${base_sbindir}/ldconfig ${sysconfdir}/ld.so.conf', '', d)}"
 FILES_ldd = "${bindir}/ldd"
 FILES_libsegfault = "${base_libdir}/libSegFault*"
 FILES_libcidn = "${base_libdir}/libcidn-*.so ${base_libdir}/libcidn.so.*"
Signature · 1 line
2.1.4
#2 lore raw

PATCH 2/6 neard: remove libexec hacks

In reply to Ross Burton
---
 meta/recipes-connectivity/neard/neard.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-connectivity/neard/neard.inc +1 -1
index 4042a69..4ecfd69 100644
@@ -39,7 +39,7 @@ do_install_append() {
 PACKAGES =+ "${PN}-tests"
 
 FILES_${PN}-tests = "${libdir}/${BPN}/*-test"
-FILES_${PN}-dbg += "${libdir}/${BPN}/*/.debug"
+FILES_${PN}-dbg += "${libexecdir}/nfc/.debug ${libdir}/${BPN}/*/.debug"
 
 RDEPENDS_${PN} = "dbus python python-dbus python-pygobject"
 
Signature · 1 line
2.1.4
#3 lore raw

PATCH 3/6 bitbake: set libexecdir to prefix/libexec

In reply to Ross Burton
---
 meta/conf/bitbake.conf | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/conf/bitbake.conf +2 -2
index d42cd55..97ae0ef 100644
@@ -38,7 +38,7 @@ export systemd_unitdir = "/lib/systemd"
 export bindir = "${exec_prefix}/bin"
 export sbindir = "${exec_prefix}/sbin"
 export libdir = "${exec_prefix}/${baselib}"
-export libexecdir = "${libdir}/${BPN}"
+export libexecdir = "${exec_prefix}/libexec"
 export includedir = "${exec_prefix}/include"
 export oldincludedir = "${exec_prefix}/include"
 localedir = "${libdir}/locale"
@@ -52,7 +52,7 @@ bindir_native = "${prefix_native}/bin"
 sbindir_native = "${prefix_native}/sbin"
 includedir_native = "${prefix_native}/include"
 libdir_native = "${prefix_native}/lib"
-libexecdir_native = "${libdir_native}/${BPN}"
+libexecdir_native = "${prefix_native}/libexec"
 base_libdir_native = "/lib"
 datadir_native = "${prefix_native}/share"
 bindir_cross = "/bin"
Signature · 1 line
2.1.4
#4 lore raw

PATCH 4/6 bluez5: fix lib/libexecdir confusion

In reply to Ross Burton
---
 meta/recipes-connectivity/bluez5/bluez5.inc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
meta/recipes-connectivity/bluez5/bluez5.inc +3 -3
index ae9402f..0fe5be5 100644
@@ -66,13 +66,13 @@ ALLOW_EMPTY_libasound-module-bluez = "1"
 PACKAGES =+ "libasound-module-bluez ${PN}-testtools ${PN}-obex ${PN}-noinst-tools"
 
 FILES_libasound-module-bluez = "${libdir}/alsa-lib/lib*.so ${datadir}/alsa"
-FILES_${PN} += "${libdir}/bluetooth/plugins ${libdir}/bluetooth/plugins/*.so ${base_libdir}/udev/ ${nonarch_base_libdir}/udev/ ${systemd_unitdir}/ ${datadir}/dbus-1"
+FILES_${PN} += "${libdir}/bluetooth/plugins/*.so ${base_libdir}/udev/ ${nonarch_base_libdir}/udev/ ${systemd_unitdir}/ ${datadir}/dbus-1"
 FILES_${PN}-dev += "\
   ${libdir}/bluetooth/plugins/*.la \
   ${libdir}/alsa-lib/*.la \
 "
 
-FILES_${PN}-obex = "${libdir}/bluez5/bluetooth/obexd \
+FILES_${PN}-obex = "${libexecdir}/bluetooth/obexd \
                     ${exec_prefix}/lib/systemd/user/obex.service \
                     ${datadir}/dbus-1/services/org.bluez.obex.service \
                    "
@@ -91,7 +91,7 @@ def get_noinst_tools_paths (d, bb, tools):
 FILES_${PN}-noinst-tools = "${@get_noinst_tools_paths(d, bb, d.getVar('NOINST_TOOLS', True))}"
 
 FILES_${PN}-dbg += "\
-  ${libdir}/${BPN}/bluetooth/.debug \
+  ${libexecdir}/bluetooth/.debug \
   ${libdir}/bluetooth/plugins/.debug \
   ${libdir}/*/.debug \
   */udev/.debug \
Signature · 1 line
2.1.4
#5 lore raw

PATCH 5/6 weston: fix libdir/libexecdir confusion

In reply to Ross Burton

Weston installs files into $libdir/weston and $libexecdir which may not be identical, so ensure both get packaged.

---
 meta/recipes-graphics/wayland/weston_1.6.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/wayland/weston_1.6.0.bb +1 -1
index d30e48b..74ad816 100644
@@ -79,7 +79,7 @@ do_install_append() {
 
 PACKAGES += "${PN}-examples"
 
-FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libdir}/weston ${datadir}"
+FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so ${datadir}"
 FILES_${PN}-examples = "${bindir}/*"
 
 RDEPENDS_${PN} += "xkeyboard-config"
Signature · 1 line
2.1.4
#6 lore raw

PATCH 6/6 sudo: fix libdir/libexecdir confusion

In reply to Ross Burton
---
 meta/recipes-extended/sudo/sudo.inc       | 3 +++
 meta/recipes-extended/sudo/sudo_1.8.13.bb | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
meta/recipes-extended/sudo/sudo.inc +3 -0
index cdee6bb..0da30e2 100644
@@ -37,3 +37,6 @@ do_compile_prepend () {
 do_install_prepend (){
 	mkdir -p ${D}/${localstatedir}/lib
 }
+
+# Sudo insists on putting libraries into libexecdir
+INSANE_SKIP = "libdir"
meta/recipes-extended/sudo/sudo_1.8.13.bb +1 -1
index 4494170..b68863d 100644
@@ -26,4 +26,4 @@ do_install_append () {
 	rmdir -p --ignore-fail-on-non-empty ${D}${localstatedir}/run/sudo
 }
 
-FILES_${PN}-dev += "${libdir}/${BPN}/lib*${SOLIBSDEV} ${libdir}/${BPN}/*.la"
+FILES_${PN}-dev += "${libexecdir}/${BPN}/lib*${SOLIBSDEV} ${libexecdir}/${BPN}/*.la"
Signature · 1 line
2.1.4
#7 lore raw
In reply to Ross Burton

Forgot to cross-post oe-devel...

Quoted 29 lines · Ross Burton

Hi,

Yes, I'm bringing this up again. :)

Our default of libexecdir=$libdir/$BPN is contrary to both the FHS[1] and GNU
Coding Standards[2], mainly because the key point is that libexecdir should be
global and not change per-recipe. The new FHS allows /usr/libexec so this series changes the default to that, and fixes up the recipes which need fixing.

Several of the recipe fixes are unrelated to the change and will be submitted to
master shortly, but others (eg sudo) are intimately tied to the change.

I've done basic multilib-enabled builds but more testing welcome. I'd say that
in general multilib problems this exposes are in fact problems with the recipe:
for example GConf should install the binaries once and libraries in each libdir.

Ross

[1] http://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s07.html
[2] https://www.gnu.org/prep/standards/html_node/Directory-Variables.html

#8 lore raw
In reply to Ross Burton
Quoted 8 lines · Ross Burton

Our default of libexecdir=$libdir/$BPN is contrary to both the FHS[1] and GNU
Coding Standards[2], mainly because the key point is that libexecdir should be
global and not change per-recipe. The new FHS allows /usr/libexec so this series changes the default to that, and fixes up the recipes which need fixing.

Unless anyone speaks up with a good argument I'd really like to see this land the moment the current milestone release is actually made...

Ross