generic-poky/meta/recipes-extended/pam/libpam_1.3.0.bb

170 lines
6.6 KiB
BlitzBasic
Raw Normal View History

SUMMARY = "Linux-PAM (Pluggable Authentication Modules)"
DESCRIPTION = "Linux-PAM (Pluggable Authentication Modules for Linux), a flexible mechanism for authenticating users"
HOMEPAGE = "https://fedorahosted.org/linux-pam/"
BUGTRACKER = "https://fedorahosted.org/linux-pam/newticket"
SECTION = "base"
# PAM is dual licensed under GPL and BSD.
# /etc/pam.d comes from Debian libpam-runtime in 2009-11 (at that time
# libpam-runtime-1.0.1 is GPLv2+), by openembedded
LICENSE = "GPLv2+ | BSD"
LIC_FILES_CHKSUM = "file://COPYING;md5=7eb5c1bf854e8881005d673599ee74d3"
SRC_URI = "http://linux-pam.org/library/Linux-PAM-${PV}.tar.bz2 \
file://99_pam \
file://pam.d/common-account \
file://pam.d/common-auth \
file://pam.d/common-password \
file://pam.d/common-session \
file://pam.d/common-session-noninteractive \
file://pam.d/other \
file://libpam-xtests.patch \
file://fixsepbuild.patch \
file://pam-security-abstract-securetty-handling.patch \
file://pam-unix-nullok-secure.patch \
file://libpam-xtests-remove-bash-dependency.patch \
file://crypt_configure.patch \
"
SRC_URI[md5sum] = "da4b2289b7cfb19583d54e9eaaef1c3a"
SRC_URI[sha256sum] = "241aed1ef522f66ed672719ecf2205ec513fd0075ed80cda8e086a5b1a01d1bb"
SRC_URI_append_libc-uclibc = " file://use-utmpx.patch"
SRC_URI_append_libc-musl = " file://0001-Add-support-for-defining-missing-funcitonality.patch \
file://include_paths_header.patch \
"
DEPENDS = "bison-native flex flex-native cracklib libxml2-native"
EXTRA_OECONF = "--with-db-uniquename=_pam \
--includedir=${includedir}/security \
--libdir=${base_libdir} \
--disable-nis \
--disable-regenerate-docu \
--disable-prelude"
CFLAGS_append = " -fPIC "
recipes: bump PRs * resolves following warnings: WARNING: Use of PRINC 17 was detected in the recipe meta-openembedded/meta-systemd/recipes-core/systemd/systemd-machine-units_1.0.bb (or one of its .bbappends) WARNING: Use of PRINC 1 was detected in the recipe meta-openembedded/meta-gpe/recipes-support/fbreader/fbreader_0.12.10.bb (or one of its .bbappends) WARNING: Use of PRINC 1 was detected in the recipe meta-openembedded/meta-gpe/recipes-support/fbreader/fbreader_git.bb (or one of its .bbappends) WARNING: Use of PRINC 1 was detected in the recipe meta-openembedded/meta-multimedia/recipes-multimedia/sox/sox_14.4.0.bb (or one of its .bbappends) WARNING: Use of PRINC 1 was detected in the recipe meta-openembedded/meta-oe/recipes-multimedia/mplayer/mplayer-common.bb (or one of its .bbappends) WARNING: Use of PRINC 1 was detected in the recipe meta-smartphone/meta-android/recipes-bsp/chroot-script/chroot-script_1.0.bb (or one of its .bbappends) WARNING: Use of PRINC 1 was detected in the recipe openembedded-core/meta/recipes-connectivity/avahi/avahi-ui_0.6.31.bb (or one of its .bbappends) WARNING: Use of PRINC 1 was detected in the recipe openembedded-core/meta/recipes-connectivity/bind/bind_9.8.1.bb (or one of its .bbappends) WARNING: Use of PRINC 1 was detected in the recipe openembedded-core/meta/recipes-core/systemd/systemd-serialgetty.bb (or one of its .bbappends) WARNING: Use of PRINC 1 was detected in the recipe openembedded-core/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb (or one of its .bbappends) WARNING: Use of PRINC 1 was detected in the recipe openembedded-core/meta/recipes-extended/screen/screen_4.0.3.bb (or one of its .bbappends) WARNING: Use of PRINC 1 was detected in the recipe openembedded-core/meta/recipes-extended/shadow/shadow-securetty_4.1.4.3.bb (or one of its .bbappends) WARNING: Use of PRINC 1 was detected in the recipe openembedded-core/meta/recipes-extended/shadow/shadow_4.1.4.3.bb (or one of its .bbappends) WARNING: Use of PRINC 1 was detected in the recipe openembedded-core/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb (or one of its .bbappends) WARNING: Use of PRINC 1 was detected in the recipe openembedded-core/meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb (or one of its .bbappends) WARNING: Use of PRINC 1 was detected in the recipe openembedded-core/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb (or one of its .bbappends) WARNING: Use of PRINC 1 was detected in the recipe openembedded-core/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.25.bb (or one of its .bbappends) WARNING: Use of PRINC 1 was detected in the recipe openembedded-core/meta/recipes-support/libcap/libcap_2.22.bb (or one of its .bbappends) WARNING: Use of PRINC 11 was detected in the recipe openembedded-core/meta/recipes-bsp/keymaps/keymaps_1.0.bb (or one of its .bbappends) WARNING: Use of PRINC 11 was detected in the recipe openembedded-core/meta/recipes-core/systemd/systemd-compat-units.bb (or one of its .bbappends) WARNING: Use of PRINC 12 was detected in the recipe openembedded-core/meta/recipes-core/initscripts/initscripts_1.0.bb (or one of its .bbappends) WARNING: Use of PRINC 13 was detected in the recipe openembedded-core/meta/recipes-core/base-files/base-files_3.0.14.bb (or one of its .bbappends) WARNING: Use of PRINC 2 was detected in the recipe meta-openembedded/meta-oe/recipes-navigation/navit/navit_svn.bb (or one of its .bbappends) WARNING: Use of PRINC 2 was detected in the recipe meta-openembedded/meta-oe/recipes-support/lvm2/lvm2_2.02.97.bb (or one of its .bbappends) WARNING: Use of PRINC 2 was detected in the recipe openembedded-core/meta/recipes-connectivity/portmap/portmap_6.0.bb (or one of its .bbappends) WARNING: Use of PRINC 2 was detected in the recipe openembedded-core/meta/recipes-extended/pam/libpam_1.1.6.bb (or one of its .bbappends) WARNING: Use of PRINC 2 was detected in the recipe openembedded-core/meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb (or one of its .bbappends) WARNING: Use of PRINC 3 was detected in the recipe meta-openembedded/meta-efl/recipes-efl/efl/entrance_svn.bb (or one of its .bbappends) WARNING: Use of PRINC 3 was detected in the recipe meta-openembedded/meta-oe/recipes-multimedia/mplayer/mplayer2_git.bb (or one of its .bbappends) WARNING: Use of PRINC 3 was detected in the recipe openembedded-core/meta/recipes-bsp/formfactor/formfactor_0.0.bb (or one of its .bbappends) WARNING: Use of PRINC 3 was detected in the recipe openembedded-core/meta/recipes-connectivity/avahi/avahi_0.6.31.bb (or one of its .bbappends) WARNING: Use of PRINC 3 was detected in the recipe openembedded-core/meta/recipes-connectivity/dhcp/dhcp_4.2.5-P1.bb (or one of its .bbappends) WARNING: Use of PRINC 3 was detected in the recipe openembedded-core/meta/recipes-core/init-ifupdown/init-ifupdown_1.0.bb (or one of its .bbappends) WARNING: Use of PRINC 3 was detected in the recipe openembedded-core/meta/recipes-graphics/xinput-calibrator/pointercal-xinput_0.0.bb (or one of its .bbappends) WARNING: Use of PRINC 5 was detected in the recipe meta-openembedded/meta-oe/recipes-core/meta/distro-feed-configs.bb (or one of its .bbappends) WARNING: Use of PRINC 5 was detected in the recipe openembedded-core/meta/recipes-connectivity/bluez/bluez4_4.101.bb (or one of its .bbappends) WARNING: Use of PRINC 6 was detected in the recipe openembedded-core/meta/recipes-core/packagegroups/packagegroup-base.bb (or one of its .bbappends) WARNING: Use of PRINC 6 was detected in the recipe openembedded-core/meta/recipes-core/packagegroups/packagegroup-core-boot.bb (or one of its .bbappends) WARNING: Use of PRINC 6 was detected in the recipe openembedded-core/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb (or one of its .bbappends) WARNING: Use of PRINC 7 was detected in the recipe meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd_3.7.bb (or one of its .bbappends) WARNING: Use of PRINC 7 was detected in the recipe openembedded-core/meta/recipes-core/udev/udev-extraconf_1.0.bb (or one of its .bbappends) (From OE-Core rev: c6825ec6e92e20bb64a051d1576f363c16e98d68) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-05 17:17:18 +00:00
PR = "r5"
S = "${WORKDIR}/Linux-PAM-${PV}"
inherit autotools gettext pkgconfig
PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit,"
PACKAGES += "${PN}-runtime ${PN}-xtests"
FILES_${PN} = "${base_libdir}/lib*${SOLIBS}"
FILES_${PN}-dev += "${base_libdir}/security/*.la ${base_libdir}/*.la ${base_libdir}/lib*${SOLIBSDEV}"
FILES_${PN}-runtime = "${sysconfdir}"
FILES_${PN}-xtests = "${datadir}/Linux-PAM/xtests"
PACKAGES_DYNAMIC += "^${MLPREFIX}pam-plugin-.*"
def get_multilib_bit(d):
baselib = d.getVar('baselib') or ''
return baselib.replace('lib', '')
libpam: fix multilib packaging issue for pam-plugins libpam might miss ABI specific dependencies for pam-plugins-*, for RPM uses generic names to check the packages depending on it and doesn't consider the arch, which will lead to packaging issues in mulbilib build. pam_plugin_hook is added because the plugin packages are dynamically generated, so we need to manually process multilib names by add baselib to RPROVIDES/RDEPENDS as ABI specific tag. (From OE-Core rev: d08e64a98316d7659b0fb56812667c534f66a1a8) Signed-off-by: Ming Liu <ming.liu@windriver.com> I worked with Ming Liu on this particular issue. You may wonder why this is necessary let me attempt to explain the underlying causes. In deb/ipk on a multilib package, the package name has specific multilib references in it. I.e. the alternative libraries start with something like lib32-... This was done primarily because deb/ipk do not allow two packages with the same name (but different architectures) to be installed at the same time. So the name has to be unique. In RPM however, the names of the packages and matches with the architectures and if they are not the same we can do these multilib installs. This matches the behavior of other RPM based distributions and in many ways the tools people are used to working with RPM. For the most part this works fine in multilib configurations because additional per-file dependencies are added that capture the shared library dependencies with ABI specific information. This unfortunately fails in a few cases where plugins are dynamically loaded via dlopen -- such as libpam. One possible fix is simply to follow the deb/ipk package naming, but this causes a design advantage of rpm. When a package has a dependency on 'bash', we really don't care what bash is installed, only that -a- bash is installed. In the deb/ipk case, the lib32- packages would end up with a lib32-bash dependency and you could potentially end up with two 'bash' packages being installed. So the fix I recommended for the issue was to add the baselib path to the internal dependencies. Since we know that the libpam installed in 'lib' needs the modules that were compiled to also work with the 'lib' version of libpam. While the libpam in 'lib64' need the modules to work with the 'lib64' version of the plugins. Existing dependencies are preserved so there is no impact in the ipk/deb case, the RPM case is resolved as the additional dependency information is now present for the package manager to select the package we really want. If anyone else has a suggestion for an alternative fix, we're interested -- but this is the best answer we could come up with. (If any of the above should be added to the commit message, the YP bug, or documentation, please let me know and I'll make sure it gets added.) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> [YOCTO #4532] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-28 09:43:08 +00:00
libpam_suffix = "suffix${@get_multilib_bit(d)}"
RPROVIDES_${PN} += "${PN}-${libpam_suffix}"
RPROVIDES_${PN}-runtime += "${PN}-runtime-${libpam_suffix}"
RDEPENDS_${PN}-runtime = "${PN}-${libpam_suffix} \
${MLPREFIX}pam-plugin-deny-${libpam_suffix} \
${MLPREFIX}pam-plugin-permit-${libpam_suffix} \
${MLPREFIX}pam-plugin-warn-${libpam_suffix} \
${MLPREFIX}pam-plugin-unix-${libpam_suffix} \
"
RDEPENDS_${PN}-xtests = "${PN}-${libpam_suffix} \
${MLPREFIX}pam-plugin-access-${libpam_suffix} \
${MLPREFIX}pam-plugin-debug-${libpam_suffix} \
${MLPREFIX}pam-plugin-cracklib-${libpam_suffix} \
${MLPREFIX}pam-plugin-pwhistory-${libpam_suffix} \
${MLPREFIX}pam-plugin-succeed-if-${libpam_suffix} \
${MLPREFIX}pam-plugin-time-${libpam_suffix} \
coreutils"
# FIXME: Native suffix breaks here, disable it for now
RRECOMMENDS_${PN} = "${PN}-runtime-${libpam_suffix}"
RRECOMMENDS_${PN}_class-native = ""
python populate_packages_prepend () {
def pam_plugin_append_file(pn, dir, file):
nf = os.path.join(dir, file)
of = d.getVar('FILES_' + pn)
if of:
nf = of + " " + nf
d.setVar('FILES_' + pn, nf)
libpam: fix multilib packaging issue for pam-plugins libpam might miss ABI specific dependencies for pam-plugins-*, for RPM uses generic names to check the packages depending on it and doesn't consider the arch, which will lead to packaging issues in mulbilib build. pam_plugin_hook is added because the plugin packages are dynamically generated, so we need to manually process multilib names by add baselib to RPROVIDES/RDEPENDS as ABI specific tag. (From OE-Core rev: d08e64a98316d7659b0fb56812667c534f66a1a8) Signed-off-by: Ming Liu <ming.liu@windriver.com> I worked with Ming Liu on this particular issue. You may wonder why this is necessary let me attempt to explain the underlying causes. In deb/ipk on a multilib package, the package name has specific multilib references in it. I.e. the alternative libraries start with something like lib32-... This was done primarily because deb/ipk do not allow two packages with the same name (but different architectures) to be installed at the same time. So the name has to be unique. In RPM however, the names of the packages and matches with the architectures and if they are not the same we can do these multilib installs. This matches the behavior of other RPM based distributions and in many ways the tools people are used to working with RPM. For the most part this works fine in multilib configurations because additional per-file dependencies are added that capture the shared library dependencies with ABI specific information. This unfortunately fails in a few cases where plugins are dynamically loaded via dlopen -- such as libpam. One possible fix is simply to follow the deb/ipk package naming, but this causes a design advantage of rpm. When a package has a dependency on 'bash', we really don't care what bash is installed, only that -a- bash is installed. In the deb/ipk case, the lib32- packages would end up with a lib32-bash dependency and you could potentially end up with two 'bash' packages being installed. So the fix I recommended for the issue was to add the baselib path to the internal dependencies. Since we know that the libpam installed in 'lib' needs the modules that were compiled to also work with the 'lib' version of libpam. While the libpam in 'lib64' need the modules to work with the 'lib64' version of the plugins. Existing dependencies are preserved so there is no impact in the ipk/deb case, the RPM case is resolved as the additional dependency information is now present for the package manager to select the package we really want. If anyone else has a suggestion for an alternative fix, we're interested -- but this is the best answer we could come up with. (If any of the above should be added to the commit message, the YP bug, or documentation, please let me know and I'll make sure it gets added.) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> [YOCTO #4532] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-28 09:43:08 +00:00
def pam_plugin_hook(file, pkg, pattern, format, basename):
pn = d.getVar('PN')
libpam_suffix = d.getVar('libpam_suffix')
libpam: fix multilib packaging issue for pam-plugins libpam might miss ABI specific dependencies for pam-plugins-*, for RPM uses generic names to check the packages depending on it and doesn't consider the arch, which will lead to packaging issues in mulbilib build. pam_plugin_hook is added because the plugin packages are dynamically generated, so we need to manually process multilib names by add baselib to RPROVIDES/RDEPENDS as ABI specific tag. (From OE-Core rev: d08e64a98316d7659b0fb56812667c534f66a1a8) Signed-off-by: Ming Liu <ming.liu@windriver.com> I worked with Ming Liu on this particular issue. You may wonder why this is necessary let me attempt to explain the underlying causes. In deb/ipk on a multilib package, the package name has specific multilib references in it. I.e. the alternative libraries start with something like lib32-... This was done primarily because deb/ipk do not allow two packages with the same name (but different architectures) to be installed at the same time. So the name has to be unique. In RPM however, the names of the packages and matches with the architectures and if they are not the same we can do these multilib installs. This matches the behavior of other RPM based distributions and in many ways the tools people are used to working with RPM. For the most part this works fine in multilib configurations because additional per-file dependencies are added that capture the shared library dependencies with ABI specific information. This unfortunately fails in a few cases where plugins are dynamically loaded via dlopen -- such as libpam. One possible fix is simply to follow the deb/ipk package naming, but this causes a design advantage of rpm. When a package has a dependency on 'bash', we really don't care what bash is installed, only that -a- bash is installed. In the deb/ipk case, the lib32- packages would end up with a lib32-bash dependency and you could potentially end up with two 'bash' packages being installed. So the fix I recommended for the issue was to add the baselib path to the internal dependencies. Since we know that the libpam installed in 'lib' needs the modules that were compiled to also work with the 'lib' version of libpam. While the libpam in 'lib64' need the modules to work with the 'lib64' version of the plugins. Existing dependencies are preserved so there is no impact in the ipk/deb case, the RPM case is resolved as the additional dependency information is now present for the package manager to select the package we really want. If anyone else has a suggestion for an alternative fix, we're interested -- but this is the best answer we could come up with. (If any of the above should be added to the commit message, the YP bug, or documentation, please let me know and I'll make sure it gets added.) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> [YOCTO #4532] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-28 09:43:08 +00:00
rdeps = d.getVar('RDEPENDS_' + pkg)
libpam: fix multilib packaging issue for pam-plugins libpam might miss ABI specific dependencies for pam-plugins-*, for RPM uses generic names to check the packages depending on it and doesn't consider the arch, which will lead to packaging issues in mulbilib build. pam_plugin_hook is added because the plugin packages are dynamically generated, so we need to manually process multilib names by add baselib to RPROVIDES/RDEPENDS as ABI specific tag. (From OE-Core rev: d08e64a98316d7659b0fb56812667c534f66a1a8) Signed-off-by: Ming Liu <ming.liu@windriver.com> I worked with Ming Liu on this particular issue. You may wonder why this is necessary let me attempt to explain the underlying causes. In deb/ipk on a multilib package, the package name has specific multilib references in it. I.e. the alternative libraries start with something like lib32-... This was done primarily because deb/ipk do not allow two packages with the same name (but different architectures) to be installed at the same time. So the name has to be unique. In RPM however, the names of the packages and matches with the architectures and if they are not the same we can do these multilib installs. This matches the behavior of other RPM based distributions and in many ways the tools people are used to working with RPM. For the most part this works fine in multilib configurations because additional per-file dependencies are added that capture the shared library dependencies with ABI specific information. This unfortunately fails in a few cases where plugins are dynamically loaded via dlopen -- such as libpam. One possible fix is simply to follow the deb/ipk package naming, but this causes a design advantage of rpm. When a package has a dependency on 'bash', we really don't care what bash is installed, only that -a- bash is installed. In the deb/ipk case, the lib32- packages would end up with a lib32-bash dependency and you could potentially end up with two 'bash' packages being installed. So the fix I recommended for the issue was to add the baselib path to the internal dependencies. Since we know that the libpam installed in 'lib' needs the modules that were compiled to also work with the 'lib' version of libpam. While the libpam in 'lib64' need the modules to work with the 'lib64' version of the plugins. Existing dependencies are preserved so there is no impact in the ipk/deb case, the RPM case is resolved as the additional dependency information is now present for the package manager to select the package we really want. If anyone else has a suggestion for an alternative fix, we're interested -- but this is the best answer we could come up with. (If any of the above should be added to the commit message, the YP bug, or documentation, please let me know and I'll make sure it gets added.) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> [YOCTO #4532] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-28 09:43:08 +00:00
if rdeps:
rdeps = rdeps + " " + pn + "-" + libpam_suffix
libpam: fix multilib packaging issue for pam-plugins libpam might miss ABI specific dependencies for pam-plugins-*, for RPM uses generic names to check the packages depending on it and doesn't consider the arch, which will lead to packaging issues in mulbilib build. pam_plugin_hook is added because the plugin packages are dynamically generated, so we need to manually process multilib names by add baselib to RPROVIDES/RDEPENDS as ABI specific tag. (From OE-Core rev: d08e64a98316d7659b0fb56812667c534f66a1a8) Signed-off-by: Ming Liu <ming.liu@windriver.com> I worked with Ming Liu on this particular issue. You may wonder why this is necessary let me attempt to explain the underlying causes. In deb/ipk on a multilib package, the package name has specific multilib references in it. I.e. the alternative libraries start with something like lib32-... This was done primarily because deb/ipk do not allow two packages with the same name (but different architectures) to be installed at the same time. So the name has to be unique. In RPM however, the names of the packages and matches with the architectures and if they are not the same we can do these multilib installs. This matches the behavior of other RPM based distributions and in many ways the tools people are used to working with RPM. For the most part this works fine in multilib configurations because additional per-file dependencies are added that capture the shared library dependencies with ABI specific information. This unfortunately fails in a few cases where plugins are dynamically loaded via dlopen -- such as libpam. One possible fix is simply to follow the deb/ipk package naming, but this causes a design advantage of rpm. When a package has a dependency on 'bash', we really don't care what bash is installed, only that -a- bash is installed. In the deb/ipk case, the lib32- packages would end up with a lib32-bash dependency and you could potentially end up with two 'bash' packages being installed. So the fix I recommended for the issue was to add the baselib path to the internal dependencies. Since we know that the libpam installed in 'lib' needs the modules that were compiled to also work with the 'lib' version of libpam. While the libpam in 'lib64' need the modules to work with the 'lib64' version of the plugins. Existing dependencies are preserved so there is no impact in the ipk/deb case, the RPM case is resolved as the additional dependency information is now present for the package manager to select the package we really want. If anyone else has a suggestion for an alternative fix, we're interested -- but this is the best answer we could come up with. (If any of the above should be added to the commit message, the YP bug, or documentation, please let me know and I'll make sure it gets added.) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> [YOCTO #4532] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-28 09:43:08 +00:00
else:
rdeps = pn + "-" + libpam_suffix
libpam: fix multilib packaging issue for pam-plugins libpam might miss ABI specific dependencies for pam-plugins-*, for RPM uses generic names to check the packages depending on it and doesn't consider the arch, which will lead to packaging issues in mulbilib build. pam_plugin_hook is added because the plugin packages are dynamically generated, so we need to manually process multilib names by add baselib to RPROVIDES/RDEPENDS as ABI specific tag. (From OE-Core rev: d08e64a98316d7659b0fb56812667c534f66a1a8) Signed-off-by: Ming Liu <ming.liu@windriver.com> I worked with Ming Liu on this particular issue. You may wonder why this is necessary let me attempt to explain the underlying causes. In deb/ipk on a multilib package, the package name has specific multilib references in it. I.e. the alternative libraries start with something like lib32-... This was done primarily because deb/ipk do not allow two packages with the same name (but different architectures) to be installed at the same time. So the name has to be unique. In RPM however, the names of the packages and matches with the architectures and if they are not the same we can do these multilib installs. This matches the behavior of other RPM based distributions and in many ways the tools people are used to working with RPM. For the most part this works fine in multilib configurations because additional per-file dependencies are added that capture the shared library dependencies with ABI specific information. This unfortunately fails in a few cases where plugins are dynamically loaded via dlopen -- such as libpam. One possible fix is simply to follow the deb/ipk package naming, but this causes a design advantage of rpm. When a package has a dependency on 'bash', we really don't care what bash is installed, only that -a- bash is installed. In the deb/ipk case, the lib32- packages would end up with a lib32-bash dependency and you could potentially end up with two 'bash' packages being installed. So the fix I recommended for the issue was to add the baselib path to the internal dependencies. Since we know that the libpam installed in 'lib' needs the modules that were compiled to also work with the 'lib' version of libpam. While the libpam in 'lib64' need the modules to work with the 'lib64' version of the plugins. Existing dependencies are preserved so there is no impact in the ipk/deb case, the RPM case is resolved as the additional dependency information is now present for the package manager to select the package we really want. If anyone else has a suggestion for an alternative fix, we're interested -- but this is the best answer we could come up with. (If any of the above should be added to the commit message, the YP bug, or documentation, please let me know and I'll make sure it gets added.) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> [YOCTO #4532] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-28 09:43:08 +00:00
d.setVar('RDEPENDS_' + pkg, rdeps)
provides = d.getVar('RPROVIDES_' + pkg)
libpam: fix multilib packaging issue for pam-plugins libpam might miss ABI specific dependencies for pam-plugins-*, for RPM uses generic names to check the packages depending on it and doesn't consider the arch, which will lead to packaging issues in mulbilib build. pam_plugin_hook is added because the plugin packages are dynamically generated, so we need to manually process multilib names by add baselib to RPROVIDES/RDEPENDS as ABI specific tag. (From OE-Core rev: d08e64a98316d7659b0fb56812667c534f66a1a8) Signed-off-by: Ming Liu <ming.liu@windriver.com> I worked with Ming Liu on this particular issue. You may wonder why this is necessary let me attempt to explain the underlying causes. In deb/ipk on a multilib package, the package name has specific multilib references in it. I.e. the alternative libraries start with something like lib32-... This was done primarily because deb/ipk do not allow two packages with the same name (but different architectures) to be installed at the same time. So the name has to be unique. In RPM however, the names of the packages and matches with the architectures and if they are not the same we can do these multilib installs. This matches the behavior of other RPM based distributions and in many ways the tools people are used to working with RPM. For the most part this works fine in multilib configurations because additional per-file dependencies are added that capture the shared library dependencies with ABI specific information. This unfortunately fails in a few cases where plugins are dynamically loaded via dlopen -- such as libpam. One possible fix is simply to follow the deb/ipk package naming, but this causes a design advantage of rpm. When a package has a dependency on 'bash', we really don't care what bash is installed, only that -a- bash is installed. In the deb/ipk case, the lib32- packages would end up with a lib32-bash dependency and you could potentially end up with two 'bash' packages being installed. So the fix I recommended for the issue was to add the baselib path to the internal dependencies. Since we know that the libpam installed in 'lib' needs the modules that were compiled to also work with the 'lib' version of libpam. While the libpam in 'lib64' need the modules to work with the 'lib64' version of the plugins. Existing dependencies are preserved so there is no impact in the ipk/deb case, the RPM case is resolved as the additional dependency information is now present for the package manager to select the package we really want. If anyone else has a suggestion for an alternative fix, we're interested -- but this is the best answer we could come up with. (If any of the above should be added to the commit message, the YP bug, or documentation, please let me know and I'll make sure it gets added.) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> [YOCTO #4532] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-28 09:43:08 +00:00
if provides:
provides = provides + " " + pkg + "-" + libpam_suffix
libpam: fix multilib packaging issue for pam-plugins libpam might miss ABI specific dependencies for pam-plugins-*, for RPM uses generic names to check the packages depending on it and doesn't consider the arch, which will lead to packaging issues in mulbilib build. pam_plugin_hook is added because the plugin packages are dynamically generated, so we need to manually process multilib names by add baselib to RPROVIDES/RDEPENDS as ABI specific tag. (From OE-Core rev: d08e64a98316d7659b0fb56812667c534f66a1a8) Signed-off-by: Ming Liu <ming.liu@windriver.com> I worked with Ming Liu on this particular issue. You may wonder why this is necessary let me attempt to explain the underlying causes. In deb/ipk on a multilib package, the package name has specific multilib references in it. I.e. the alternative libraries start with something like lib32-... This was done primarily because deb/ipk do not allow two packages with the same name (but different architectures) to be installed at the same time. So the name has to be unique. In RPM however, the names of the packages and matches with the architectures and if they are not the same we can do these multilib installs. This matches the behavior of other RPM based distributions and in many ways the tools people are used to working with RPM. For the most part this works fine in multilib configurations because additional per-file dependencies are added that capture the shared library dependencies with ABI specific information. This unfortunately fails in a few cases where plugins are dynamically loaded via dlopen -- such as libpam. One possible fix is simply to follow the deb/ipk package naming, but this causes a design advantage of rpm. When a package has a dependency on 'bash', we really don't care what bash is installed, only that -a- bash is installed. In the deb/ipk case, the lib32- packages would end up with a lib32-bash dependency and you could potentially end up with two 'bash' packages being installed. So the fix I recommended for the issue was to add the baselib path to the internal dependencies. Since we know that the libpam installed in 'lib' needs the modules that were compiled to also work with the 'lib' version of libpam. While the libpam in 'lib64' need the modules to work with the 'lib64' version of the plugins. Existing dependencies are preserved so there is no impact in the ipk/deb case, the RPM case is resolved as the additional dependency information is now present for the package manager to select the package we really want. If anyone else has a suggestion for an alternative fix, we're interested -- but this is the best answer we could come up with. (If any of the above should be added to the commit message, the YP bug, or documentation, please let me know and I'll make sure it gets added.) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> [YOCTO #4532] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-28 09:43:08 +00:00
else:
provides = pkg + "-" + libpam_suffix
libpam: fix multilib packaging issue for pam-plugins libpam might miss ABI specific dependencies for pam-plugins-*, for RPM uses generic names to check the packages depending on it and doesn't consider the arch, which will lead to packaging issues in mulbilib build. pam_plugin_hook is added because the plugin packages are dynamically generated, so we need to manually process multilib names by add baselib to RPROVIDES/RDEPENDS as ABI specific tag. (From OE-Core rev: d08e64a98316d7659b0fb56812667c534f66a1a8) Signed-off-by: Ming Liu <ming.liu@windriver.com> I worked with Ming Liu on this particular issue. You may wonder why this is necessary let me attempt to explain the underlying causes. In deb/ipk on a multilib package, the package name has specific multilib references in it. I.e. the alternative libraries start with something like lib32-... This was done primarily because deb/ipk do not allow two packages with the same name (but different architectures) to be installed at the same time. So the name has to be unique. In RPM however, the names of the packages and matches with the architectures and if they are not the same we can do these multilib installs. This matches the behavior of other RPM based distributions and in many ways the tools people are used to working with RPM. For the most part this works fine in multilib configurations because additional per-file dependencies are added that capture the shared library dependencies with ABI specific information. This unfortunately fails in a few cases where plugins are dynamically loaded via dlopen -- such as libpam. One possible fix is simply to follow the deb/ipk package naming, but this causes a design advantage of rpm. When a package has a dependency on 'bash', we really don't care what bash is installed, only that -a- bash is installed. In the deb/ipk case, the lib32- packages would end up with a lib32-bash dependency and you could potentially end up with two 'bash' packages being installed. So the fix I recommended for the issue was to add the baselib path to the internal dependencies. Since we know that the libpam installed in 'lib' needs the modules that were compiled to also work with the 'lib' version of libpam. While the libpam in 'lib64' need the modules to work with the 'lib64' version of the plugins. Existing dependencies are preserved so there is no impact in the ipk/deb case, the RPM case is resolved as the additional dependency information is now present for the package manager to select the package we really want. If anyone else has a suggestion for an alternative fix, we're interested -- but this is the best answer we could come up with. (If any of the above should be added to the commit message, the YP bug, or documentation, please let me know and I'll make sure it gets added.) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> [YOCTO #4532] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-28 09:43:08 +00:00
d.setVar('RPROVIDES_' + pkg, provides)
mlprefix = d.getVar('MLPREFIX') or ''
dvar = d.expand('${WORKDIR}/package')
pam_libdir = d.expand('${base_libdir}/security')
pam_sbindir = d.expand('${sbindir}')
pam_filterdir = d.expand('${base_libdir}/security/pam_filter')
pam_pkgname = mlprefix + 'pam-plugin%s'
do_split_packages(d, pam_libdir, '^pam(.*)\.so$', pam_pkgname,
'PAM plugin for %s', hook=pam_plugin_hook, extra_depends='')
pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_chkpwd')
pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_update')
pam_plugin_append_file('%spam-plugin-tally' % mlprefix, pam_sbindir, 'pam_tally')
pam_plugin_append_file('%spam-plugin-tally2' % mlprefix, pam_sbindir, 'pam_tally2')
pam_plugin_append_file('%spam-plugin-timestamp' % mlprefix, pam_sbindir, 'pam_timestamp_check')
pam_plugin_append_file('%spam-plugin-mkhomedir' % mlprefix, pam_sbindir, 'mkhomedir_helper')
pam_plugin_append_file('%spam-plugin-console' % mlprefix, pam_sbindir, 'pam_console_apply')
do_split_packages(d, pam_filterdir, '^(.*)$', 'pam-filter-%s', 'PAM filter for %s', extra_depends='')
}
do_install() {
autotools_do_install
# don't install /var/run when populating rootfs. Do it through volatile
rm -rf ${D}${localstatedir}
install -d ${D}${sysconfdir}/default/volatiles
install -m 0644 ${WORKDIR}/99_pam ${D}${sysconfdir}/default/volatiles
install -d ${D}${sysconfdir}/pam.d/
install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/
# The lsb requires unix_chkpwd has setuid permission
chmod 4755 ${D}${sbindir}/unix_chkpwd
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
echo "session optional pam_systemd.so" >> ${D}${sysconfdir}/pam.d/common-session
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
BBCLASSEXTEND = "nativesdk native"
CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-session"
CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-auth"
CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-password"
CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-session-noninteractive"
CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-account"
CONFFILES_${PN}-runtime += "${sysconfdir}/security/limits.conf"