From: David-John Willis Date: Tue, 24 Nov 2009 15:44:09 +0000 (+0000) Subject: sudo_1.7.2p1: Update recipe to support DISTRO_FEATURES = "pam". X-Git-Tag: Release-2010-05/1~72 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b38a24f32e4f50e761d93364b005b9c1ed649003;p=openembedded.git sudo_1.7.2p1: Update recipe to support DISTRO_FEATURES = "pam". * The recipe now uses the DISTRO_FEATURES flag to decide if PAM support is requested at build time. * NOTE: There is a caveat. The DISTRO_FEATURES is only really relevant if the package can have PAM enabled or disabled at build time. If the package needs PAM to build/work then the DISTRO_FEATURES are totally academic and should not be used. --- diff --git a/recipes/sudo/sudo_1.7.2p4.bb b/recipes/sudo/sudo_1.7.2p4.bb index 3fe7aeffcd..d77462b9fc 100644 --- a/recipes/sudo/sudo_1.7.2p4.bb +++ b/recipes/sudo/sudo_1.7.2p4.bb @@ -1,22 +1,30 @@ -PR = "r3" +# Enable PAM suport in SUDO (and supporting service file) only is DISTRO wants PAM. +OVERRIDES .= "${@base_contains('DISTRO_FEATURES', 'pam', ':pam-support', '', d)}" -DEPENDS = "libpam" -RDEPENDS = "libpam libpam-meta" +DEPENDS_append_pam-support = "libpam" +RDEPENDS_append_pam-support = "libpam libpam-meta" +PR = "r1" SRC_URI = "http://ftp.sudo.ws/sudo/dist/sudo-${PV}.tar.gz;name=src \ - file://sudo.pamd \ " SRC_URI[src.md5sum] = "3989e5a00538247d7dcef8b514076752" SRC_URI[src.sha256sum] = "57d9adbdffa881e32894231079da7d68ffe99f46942818b63baadf6c795b7bdd" -EXTRA_OECONF += " --with-pam " +SRC_URI_append_pam-support = "file://sudo.pamd" + +EXTRA_OECONF += " \ + ${@base_contains('DISTRO_FEATURES', 'pam', '--with-pam=yes', '--with-pam=no', d)} \ +" require sudo.inc -# Do in the recipe not the common inc as not all SUDO recipes want PAM support. +# Update DESCRIPTION to show it is build with PAM after include file. +DESCRIPTION_append_pam-support = " (with PAM support) " -do_install_append() { +do_install_append_pam-support() { install -d ${D}${sysconfdir}/pam.d/ install -m 0644 ${WORKDIR}/sudo.pamd ${D}${sysconfdir}/pam.d/sudo } + +FILES_append_pam-support = "${sysconfdir}/pam.d"