]> code.ossystems Code Review - openembedded-core.git/commitdiff
libpam: be more strict about user's sanity
authorMartin Jansa <martin.jansa@gmail.com>
Thu, 1 Mar 2018 10:11:38 +0000 (10:11 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 3 Mar 2018 17:08:30 +0000 (17:08 +0000)
* replace do_pam_sanity function with distro_features_check inherit
* fixes:
  WARNING: libpam-1.3.0-r5 do_pam_sanity: Building libpam but 'pam' isn't in DISTRO_FEATURES, PAM won't work correctly
  in world builds and prevents user to build libpam at all without pam
  in DISTRO_FEATURES, I don't see any users of this which wouldn't respect
  pam in DISTRO_FEATURES
* only libuser is depending on libpam without respecting DISTRO_FEATURES
* there are few recipes in meta-oe layers depending on libpam without
  respecting DISTRO_FEATURES, I've sent patch for them:
  samba, openwsman, pam-ssh-agent-auth, sblim-sfcb, passwdqc, python-pam, smbnetfs
  and omxplayer in meta-raspberrypi, I've sent PR for that one:
  https://github.com/agherzan/meta-raspberrypi/pull/192
* poky-lsb will need to add pam to DISTRO_FEATURES in order to build
  packagegroup-core-lsb

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-extended/libuser/libuser_0.62.bb
meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb
meta/recipes-extended/pam/libpam_1.3.0.bb

index 1765346646b2714da4de17e369ce5a88f42cbd13..7ec54eb16e155a7e93102a6c604fa1e716dae0b2 100644 (file)
@@ -22,6 +22,9 @@ SRC_URI[sha256sum] = "a58ff4fabb01a25043b142185a33eeea961109dd60d4b40b6a9df4fa3c
 
 DEPENDS = "popt libpam glib-2.0 python3"
 
+inherit distro_features_check
+REQUIRED_DISTRO_FEATURES = "pam"
+
 inherit autotools gettext python3native python3-dir pkgconfig gtk-doc
 
 EXTRA_OEMAKE = "PYTHON_CPPFLAGS=-I${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}"
index 8959e3c8f4663f7d0a3b882c5c374d27335977d2..53d100ce740937f29bcc30dad34fa0c15e6bdb82 100644 (file)
@@ -14,6 +14,9 @@ REQUIRED_DISTRO_FEATURES = "x11"
 # libglu needs virtual/libgl, which requires opengl in DISTRO_FEATURES
 REQUIRED_DISTRO_FEATURES += "opengl"
 
+# libpam, pam-plugin-wheel requires pam in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES += "pam"
+
 #
 # We will skip parsing this packagegeoup for non-glibc systems
 #
index 8f7753d00120cf99672e4583f5a7913ed45aaffa..92ab72a42f8a7b229a31fd0a07209bf52cff85f0 100644 (file)
@@ -151,11 +151,8 @@ do_install() {
        fi
 }
 
-python do_pam_sanity () {
-    if not bb.utils.contains('DISTRO_FEATURES', 'pam', True, False, d):
-        bb.warn("Building libpam but 'pam' isn't in DISTRO_FEATURES, PAM won't work correctly")
-}
-addtask pam_sanity before do_configure
+inherit distro_features_check
+REQUIRED_DISTRO_FEATURES = "pam"
 
 BBCLASSEXTEND = "nativesdk native"