[oe-commits] [openembedded-core] 05/18: util-linux: Make pam specific logic apply to target recipe alone

git at git.openembedded.org git at git.openembedded.org
Fri Aug 16 16:12:52 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit a57f56576eda4b3ad5496e375b432e06e34ad8b9
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Wed Aug 14 22:56:54 2019 -0700

    util-linux: Make pam specific logic apply to target recipe alone
    
    This helps with a case where a distro builds one image with systemd and
    another with sysvinit, it ends up recompiling almost everything since
    python3-native gets rebuilt and tracing dependencies with
    bitbake-diffsigs shows that the chain ends at util-linux-native being
    recompiled because distro features now does or does not have 'pam'
    
    Hash for dependent task python/python3_3.7.4.bb:do_prepare_recipe_sysroot:virtual:native:/mnt/a/yoe/sources/openembedded-core/meta/recipes-devt
    ools/python/python3_3.7.4.bb changed from 8befaac4f995aaff3f95d27c9caaf1006f86e1344b02c1ae82f5d12f885f2240 to 2a45fe0cd0d3640a88c4a5c8b1880c4e9
    a089cc7446a91d2a920c1cef6fa916a
        Hash for dependent task util-linux/util-linux_2.34.bb:do_populate_sysroot:virtual:native:/mnt/a/yoe/sources/openembedded-core/meta/recipes-
    core/util-linux/util-linux_2.34.bb changed from 0db292cb2e37d5788bdcf51038b2802d748b719d860aca3a26d7a793b0cf3905 to 15d6e165f025f10c2c455df8a87
    5cafe021eaed4214c793e708d4827a58ca89d
            Hash for dependent task util-linux/util-linux_2.34.bb:do_install:virtual:native:/mnt/a/yoe/sources/openembedded-core/meta/recipes-core/util-linux/util-linux_2.34.bb changed from 54bb4ee6bdb5c7fc260dabddb4932cb0e554a62cd92aba080a18306291fb470b to e25b1119ce8dd7ca43fbd2db771e04fa
    6ff6b9d701fd78ac6c443224b036ed9f                                                                                                                           basehash changed from 8e8687a866689a697001dedc0a43f478e68e6efe270bd77362f24c6000f9e882 to 62df6610eab9c1b1a17d7132943507641c8538690
    f26186843c86144d4598e64
                Variable do_install value changed:
    
    rm -f ${D}${bindir}/chkdupexe
    -   if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
    +   if [ "${@bb.utils.filter('PACKAGECONFIG', 'pam', d)}" ]; then
            install -d ${D}${sysconfdir}/pam.d
            install -m 0644 ${WORKDIR}/runuser.pamd ${D}${sysconfdir}/pam.d/runuser
            install -m 0644 ${WORKDIR}/runuser-l.pamd ${D}${sysconfdir}/pam.d/runuser-l
    @@ -47,5 +47,4 @@
            rm -f ${D}${base_sbindir}/nologin
            rm -f ${D}${base_bindir}/kill
    
        -DISTRO_FEATURES{pam} = Unset
        PACKAGECONFIG{pam} = Unset
    
    So far it seems this pam conditional code in util-linux is target
    specific and would not apply to native or nativesdk recipes
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/recipes-core/util-linux/util-linux.inc | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index 84c7012..1fa8236 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -190,20 +190,19 @@ do_install () {
 	echo 'MOUNTALL="-t nonfs,nosmbfs,noncpfs"' > ${D}${sysconfdir}/default/mountall
 
 	rm -f ${D}${bindir}/chkdupexe
+}
 
-	if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
+do_install_append_class-target () {
+	if [ "${@bb.utils.filter('PACKAGECONFIG', 'pam', d)}" ]; then
 		install -d ${D}${sysconfdir}/pam.d
 		install -m 0644 ${WORKDIR}/runuser.pamd ${D}${sysconfdir}/pam.d/runuser
 		install -m 0644 ${WORKDIR}/runuser-l.pamd ${D}${sysconfdir}/pam.d/runuser-l
-	fi
-	if [ "${@bb.utils.filter('PACKAGECONFIG', 'pam', d)}" ]; then
 		# Required for "su -" aka "su --login" because
 		# otherwise it uses "other", which has "auth pam_deny.so"
 		# and thus prevents the operation.
 		ln -s su ${D}${sysconfdir}/pam.d/su-l
 	fi
 }
-
 # nologin causes a conflict with shadow-native
 # kill causes a conflict with coreutils-native (if ${bindir}==${base_bindir})
 do_install_append_class-native () {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list