Skip to content

Commit

Permalink
libpam: be more strict about user's sanity
Browse files Browse the repository at this point in the history
* 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:
  agherzan/meta-raspberrypi#192
* poky-lsb will need to add pam to DISTRO_FEATURES in order to build
  packagegroup-core-lsb

(From OE-Core rev: 7d05eb3b6dac2ec7711abb6ce6f3e772636aa8dc)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
  • Loading branch information
shr-project authored and rpurdie committed Mar 3, 2018
1 parent 5a9937d commit 0010169
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions meta/recipes-extended/libuser/libuser_0.62.bb
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
3 changes: 3 additions & 0 deletions meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
7 changes: 2 additions & 5 deletions meta/recipes-extended/pam/libpam_1.3.0.bb
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 0010169

Please sign in to comment.