[OE-core] [PATCH 1/2] util-linux: Make pam specific logic apply to target recipe alone
Khem Raj
raj.khem at gmail.com
Thu Aug 15 05:38:09 UTC 2019
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>
---
meta/recipes-core/util-linux/util-linux.inc | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index 84c7012752..5b1b919800 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_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 () {
@@ -267,7 +266,7 @@ ALTERNATIVE_${PN}-doc = "\
blkid.8 eject.1 findfs.8 fsck.8 kill.1 last.1 lastb.1 libblkid.3 logger.1 mesg.1 \
mountpoint.1 nologin.8 rfkill.8 sulogin.8 utmpdump.1 uuid.3 wall.1\
"
-ALTERNATIVE_${PN}-doc += "${@bb.utils.contains('PACKAGECONFIG', 'pam', 'su.1', '', d)}"
+ALTERNATIVE_${PN}-doc_append_class-target = "${@bb.utils.contains('PACKAGECONFIG', 'pam', ' su.1', '', d)}"
ALTERNATIVE_LINK_NAME[blkid.8] = "${mandir}/man8/blkid.8"
ALTERNATIVE_LINK_NAME[eject.1] = "${mandir}/man1/eject.1"
--
2.22.0
More information about the Openembedded-core
mailing list