]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
util-linux: fix packaging nativesdk-util-linux-lib*
authorAndré Draszik <andre.draszik@jci.com>
Tue, 5 Feb 2019 02:32:32 +0000 (02:32 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 12 Feb 2019 14:04:24 +0000 (14:04 +0000)
util-linux is configured with --libdir=${base_libdir} for -target builds,
but with the default --libdir=${libdir} for all other builds. Furthermore,
dynamic util-linux-lib* packages are unconditionally being generated from
${base_libdir}, which is the right location for -target builds, only.

IOW, in the nativesdk case, util-linux-lib* packages are empty, and all
the shared libraries implicitly become part of the main package again.

While this surely wasn't intended, this also is going to cause problems as
upcoming changes are explicitly making util-linux an empty meta-package,
which then is going to cause packaging failures.

While fixing this, clean up the existing use of EXTRA_OECONF as it is a
bit confusing, hard to follow, and needlessly duplicates information:
    target: ${SHARED_EXTRA_OECONF} --libdir=${base_libdir}
    native/nativesdk: ${SHARED_EXTRA_OECONF} --disable-use-tty-group
where ${SHARED_EXTRA_OECONF} already contains --disable-use-tty-group.

This can be simplified by completely dropping the duplicated EXTRA_OECONF
assignments and simply using a new variable UTIL_LINUX_LIBDIR with a
_class-target override.

Additionally, this allows to easily fix packaging of the util-linux-lib*
packages, as we can now simply inspect UTIL_LINUX_LIBDIR where and as
needed to get to the right directories.

Lastly, all this can be moved from the .bb file into the .inc file as none
of that appears to actually be version specific, and we can sort the
configure options alphabetically for clarity.

[YOCTO #13058]

Signed-off-by: André Draszik <andre.draszik@jci.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/util-linux/util-linux.inc
meta/recipes-core/util-linux/util-linux_2.32.1.bb

index 4a72e3d40e3b2e4aa0dd66b57587e23e9ef57591..a35174f009b06cf8cca1d72978509802f3a7c41a 100644 (file)
@@ -42,19 +42,26 @@ PACKAGES =+ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'util-linux-runuser
 
 PACKAGES_DYNAMIC = "^util-linux-lib.*"
 
-SHARED_EXTRA_OECONF = "--disable-use-tty-group \
-                       --disable-makeinstall-chown \
-                       --enable-kill --enable-last --enable-mesg --enable-partx \
-                       --enable-raw --enable-rfkill --disable-login \
-                       --disable-vipw --disable-newgrp --disable-chfn-chsh \
-                       --enable-write --enable-mount --enable-unshare \
-                       --enable-libuuid --enable-libblkid --enable-fsck \
-                       --disable-minix --disable-bfs --without-udev \
-                       usrsbin_execdir='${sbindir}' \
+CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=ms"
+UTIL_LINUX_LIBDIR = "${libdir}"
+UTIL_LINUX_LIBDIR_class-target = "${base_libdir}"
+EXTRA_OECONF = "\
+    --enable-libuuid --enable-libblkid \
+    \
+    --enable-fsck --enable-kill --enable-last --enable-mesg \
+    --enable-mount --enable-partx --enable-raw --enable-rfkill \
+    --enable-unshare --enable-write \
+    \
+    --disable-bfs --disable-chfn-chsh --disable-login \
+    --disable-makeinstall-chown --disable-minix --disable-newgrp \
+    --disable-use-tty-group --disable-vipw \
+    \
+    --without-udev \
+    \
+    usrsbin_execdir='${sbindir}' \
+    --libdir='${UTIL_LINUX_LIBDIR}' \
 "
 
-EXTRA_OECONF = "${SHARED_EXTRA_OECONF} --libdir=${base_libdir}"
-
 PACKAGECONFIG_class-target ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
 PACKAGECONFIG[pam] = "--enable-su --enable-runuser,--disable-su --disable-runuser, libpam,"
 
@@ -309,7 +316,7 @@ ALTERNATIVE_LINK_NAME[switch_root] = "${base_sbindir}/switch_root"
 BBCLASSEXTEND = "native nativesdk"
 
 python populate_packages_prepend() {
-    do_split_packages(d, '${base_libdir}', r'^lib(.*)\.so\..*$',
+    do_split_packages(d, d.getVar('UTIL_LINUX_LIBDIR'), r'^lib(.*)\.so\..*$',
                       output_pattern='util-linux-lib%s',
                       description='util-linux lib%s',
                       extra_depends='', prepend=True, allow_links=True)
index 0f860c221b721203ec983f480fe2d21847b8ec57..e0bd3836310eef8b88463c7fb8ffb7d33464f313 100644 (file)
@@ -11,12 +11,3 @@ SRC_URI += "file://configure-sbindir.patch \
 "
 SRC_URI[md5sum] = "9e5b1b8c1dc99455bdb6b462cf9436d9"
 SRC_URI[sha256sum] = "86e6707a379c7ff5489c218cfaf1e3464b0b95acf7817db0bc5f179e356a67b2"
-
-CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=ms"
-
-EXTRA_OECONF_class-native = "${SHARED_EXTRA_OECONF} \
-                            --disable-use-tty-group \
-"
-EXTRA_OECONF_class-nativesdk = "${SHARED_EXTRA_OECONF} \
-                               --disable-use-tty-group \
-"