summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/pam/libpam_1.3.0.bb
diff options
context:
space:
mode:
authorMaxin B. John <maxin.john@intel.com>2016-05-25 17:07:39 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-30 15:58:12 +0100
commit87f0a826255e8e43a327e7b085fd5bc14b4f324c (patch)
treed39dbdf25d5e0b0690b3a39aecd5505d88b52bea /meta/recipes-extended/pam/libpam_1.3.0.bb
parent52d130d9e9735af569f018fc9161a54ed198d2d4 (diff)
downloadpoky-87f0a826255e8e43a327e7b085fd5bc14b4f324c.tar.gz
libpam: update to 1.3.0
1.2.1 -> 1.3.0 Remove upstreamed patch: a) pam-no-innetgr.patch Refreshed the following patches for 1.3.0: a) crypt_configure.patch b) pam-unix-nullok-secure.patch (From OE-Core rev: ac512ff9fbe41428e3d71d3e943aaa871d8b155a) Signed-off-by: Maxin B. John <maxin.john@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/pam/libpam_1.3.0.bb')
-rw-r--r--meta/recipes-extended/pam/libpam_1.3.0.bb169
1 files changed, 169 insertions, 0 deletions
diff --git a/meta/recipes-extended/pam/libpam_1.3.0.bb b/meta/recipes-extended/pam/libpam_1.3.0.bb
new file mode 100644
index 0000000000..966947c0ff
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam_1.3.0.bb
@@ -0,0 +1,169 @@
1SUMMARY = "Linux-PAM (Pluggable Authentication Modules)"
2DESCRIPTION = "Linux-PAM (Pluggable Authentication Modules for Linux), a flexible mechanism for authenticating users"
3HOMEPAGE = "https://fedorahosted.org/linux-pam/"
4BUGTRACKER = "https://fedorahosted.org/linux-pam/newticket"
5SECTION = "base"
6# PAM is dual licensed under GPL and BSD.
7# /etc/pam.d comes from Debian libpam-runtime in 2009-11 (at that time
8# libpam-runtime-1.0.1 is GPLv2+), by openembedded
9LICENSE = "GPLv2+ | BSD"
10LIC_FILES_CHKSUM = "file://COPYING;md5=7eb5c1bf854e8881005d673599ee74d3"
11
12SRC_URI = "http://linux-pam.org/library/Linux-PAM-${PV}.tar.bz2 \
13 file://99_pam \
14 file://pam.d/common-account \
15 file://pam.d/common-auth \
16 file://pam.d/common-password \
17 file://pam.d/common-session \
18 file://pam.d/common-session-noninteractive \
19 file://pam.d/other \
20 file://libpam-xtests.patch \
21 file://fixsepbuild.patch \
22 file://pam-security-abstract-securetty-handling.patch \
23 file://pam-unix-nullok-secure.patch \
24 file://libpam-xtests-remove-bash-dependency.patch \
25 file://crypt_configure.patch \
26 "
27
28SRC_URI[md5sum] = "da4b2289b7cfb19583d54e9eaaef1c3a"
29SRC_URI[sha256sum] = "241aed1ef522f66ed672719ecf2205ec513fd0075ed80cda8e086a5b1a01d1bb"
30
31SRC_URI_append_libc-uclibc = " file://use-utmpx.patch"
32
33SRC_URI_append_libc-musl = " file://0001-Add-support-for-defining-missing-funcitonality.patch \
34 file://include_paths_header.patch \
35 "
36
37DEPENDS = "bison flex flex-native cracklib"
38
39EXTRA_OECONF = "--with-db-uniquename=_pam \
40 --includedir=${includedir}/security \
41 --libdir=${base_libdir} \
42 --disable-nis \
43 --disable-regenerate-docu \
44 --disable-prelude"
45
46CFLAGS_append = " -fPIC "
47
48PR = "r5"
49
50S = "${WORKDIR}/Linux-PAM-${PV}"
51
52inherit autotools gettext pkgconfig
53
54PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit,"
55
56PACKAGES += "${PN}-runtime ${PN}-xtests"
57FILES_${PN} = "${base_libdir}/lib*${SOLIBS}"
58FILES_${PN}-dev += "${base_libdir}/security/*.la ${base_libdir}/*.la ${base_libdir}/lib*${SOLIBSDEV}"
59FILES_${PN}-runtime = "${sysconfdir}"
60FILES_${PN}-xtests = "${datadir}/Linux-PAM/xtests"
61
62PACKAGES_DYNAMIC += "^${MLPREFIX}pam-plugin-.*"
63
64def get_multilib_bit(d):
65 baselib = d.getVar('baselib', True) or ''
66 return baselib.replace('lib', '')
67
68libpam_suffix = "suffix${@get_multilib_bit(d)}"
69
70RPROVIDES_${PN} += "${PN}-${libpam_suffix}"
71RPROVIDES_${PN}-runtime += "${PN}-runtime-${libpam_suffix}"
72
73RDEPENDS_${PN}-runtime = "${PN}-${libpam_suffix} \
74 ${MLPREFIX}pam-plugin-deny-${libpam_suffix} \
75 ${MLPREFIX}pam-plugin-permit-${libpam_suffix} \
76 ${MLPREFIX}pam-plugin-warn-${libpam_suffix} \
77 ${MLPREFIX}pam-plugin-unix-${libpam_suffix} \
78 "
79RDEPENDS_${PN}-xtests = "${PN}-${libpam_suffix} \
80 ${MLPREFIX}pam-plugin-access-${libpam_suffix} \
81 ${MLPREFIX}pam-plugin-debug-${libpam_suffix} \
82 ${MLPREFIX}pam-plugin-cracklib-${libpam_suffix} \
83 ${MLPREFIX}pam-plugin-pwhistory-${libpam_suffix} \
84 ${MLPREFIX}pam-plugin-succeed-if-${libpam_suffix} \
85 ${MLPREFIX}pam-plugin-time-${libpam_suffix} \
86 coreutils"
87
88# FIXME: Native suffix breaks here, disable it for now
89RRECOMMENDS_${PN} = "${PN}-runtime-${libpam_suffix}"
90RRECOMMENDS_${PN}_class-native = ""
91
92python populate_packages_prepend () {
93 def pam_plugin_append_file(pn, dir, file):
94 nf = os.path.join(dir, file)
95 of = d.getVar('FILES_' + pn, True)
96 if of:
97 nf = of + " " + nf
98 d.setVar('FILES_' + pn, nf)
99
100 def pam_plugin_hook(file, pkg, pattern, format, basename):
101 pn = d.getVar('PN', True)
102 libpam_suffix = d.getVar('libpam_suffix', True)
103
104 rdeps = d.getVar('RDEPENDS_' + pkg, True)
105 if rdeps:
106 rdeps = rdeps + " " + pn + "-" + libpam_suffix
107 else:
108 rdeps = pn + "-" + libpam_suffix
109 d.setVar('RDEPENDS_' + pkg, rdeps)
110
111 provides = d.getVar('RPROVIDES_' + pkg, True)
112 if provides:
113 provides = provides + " " + pkg + "-" + libpam_suffix
114 else:
115 provides = pkg + "-" + libpam_suffix
116 d.setVar('RPROVIDES_' + pkg, provides)
117
118 mlprefix = d.getVar('MLPREFIX', True) or ''
119 dvar = bb.data.expand('${WORKDIR}/package', d, True)
120 pam_libdir = d.expand('${base_libdir}/security')
121 pam_sbindir = d.expand('${sbindir}')
122 pam_filterdir = d.expand('${base_libdir}/security/pam_filter')
123 pam_pkgname = mlprefix + 'pam-plugin%s'
124
125 do_split_packages(d, pam_libdir, '^pam(.*)\.so$', pam_pkgname,
126 'PAM plugin for %s', hook=pam_plugin_hook, extra_depends='')
127 pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_chkpwd')
128 pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_update')
129 pam_plugin_append_file('%spam-plugin-tally' % mlprefix, pam_sbindir, 'pam_tally')
130 pam_plugin_append_file('%spam-plugin-tally2' % mlprefix, pam_sbindir, 'pam_tally2')
131 pam_plugin_append_file('%spam-plugin-timestamp' % mlprefix, pam_sbindir, 'pam_timestamp_check')
132 pam_plugin_append_file('%spam-plugin-mkhomedir' % mlprefix, pam_sbindir, 'mkhomedir_helper')
133 pam_plugin_append_file('%spam-plugin-console' % mlprefix, pam_sbindir, 'pam_console_apply')
134 do_split_packages(d, pam_filterdir, '^(.*)$', 'pam-filter-%s', 'PAM filter for %s', extra_depends='')
135}
136
137do_install() {
138 autotools_do_install
139
140 # don't install /var/run when populating rootfs. Do it through volatile
141 rm -rf ${D}${localstatedir}
142 install -d ${D}${sysconfdir}/default/volatiles
143 install -m 0644 ${WORKDIR}/99_pam ${D}${sysconfdir}/default/volatiles
144
145 install -d ${D}${sysconfdir}/pam.d/
146 install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/
147
148 # The lsb requires unix_chkpwd has setuid permission
149 chmod 4755 ${D}${sbindir}/unix_chkpwd
150
151 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
152 echo "session optional pam_systemd.so" >> ${D}${sysconfdir}/pam.d/common-session
153 fi
154}
155
156python do_pam_sanity () {
157 if not bb.utils.contains('DISTRO_FEATURES', 'pam', True, False, d):
158 bb.warn("Building libpam but 'pam' isn't in DISTRO_FEATURES, PAM won't work correctly")
159}
160addtask pam_sanity before do_configure
161
162BBCLASSEXTEND = "nativesdk native"
163
164CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-session"
165CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-auth"
166CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-password"
167CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-session-noninteractive"
168CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-account"
169CONFFILES_${PN}-runtime += "${sysconfdir}/security/limits.conf"