diff options
Diffstat (limited to 'meta/recipes-extended/pam/libpam_1.5.1.bb')
-rw-r--r-- | meta/recipes-extended/pam/libpam_1.5.1.bb | 181 |
1 files changed, 0 insertions, 181 deletions
diff --git a/meta/recipes-extended/pam/libpam_1.5.1.bb b/meta/recipes-extended/pam/libpam_1.5.1.bb deleted file mode 100644 index efcd27137f..0000000000 --- a/meta/recipes-extended/pam/libpam_1.5.1.bb +++ /dev/null | |||
@@ -1,181 +0,0 @@ | |||
1 | DISABLE_STATIC = "" | ||
2 | SUMMARY = "Linux-PAM (Pluggable Authentication Modules)" | ||
3 | DESCRIPTION = "Linux-PAM (Pluggable Authentication Modules for Linux), a flexible mechanism for authenticating users" | ||
4 | HOMEPAGE = "https://fedorahosted.org/linux-pam/" | ||
5 | BUGTRACKER = "https://fedorahosted.org/linux-pam/newticket" | ||
6 | SECTION = "base" | ||
7 | # PAM is dual licensed under GPL and BSD. | ||
8 | # /etc/pam.d comes from Debian libpam-runtime in 2009-11 (at that time | ||
9 | # libpam-runtime-1.0.1 is GPLv2+), by openembedded | ||
10 | LICENSE = "GPLv2+ | BSD-3-Clause" | ||
11 | LIC_FILES_CHKSUM = "file://COPYING;md5=7eb5c1bf854e8881005d673599ee74d3 \ | ||
12 | file://libpamc/License;md5=a4da476a14c093fdc73be3c3c9ba8fb3 \ | ||
13 | " | ||
14 | |||
15 | SRC_URI = "https://github.com/linux-pam/linux-pam/releases/download/v${PV}/Linux-PAM-${PV}.tar.xz \ | ||
16 | file://99_pam \ | ||
17 | file://pam.d/common-account \ | ||
18 | file://pam.d/common-auth \ | ||
19 | file://pam.d/common-password \ | ||
20 | file://pam.d/common-session \ | ||
21 | file://pam.d/common-session-noninteractive \ | ||
22 | file://pam.d/other \ | ||
23 | file://libpam-xtests.patch \ | ||
24 | file://0001-modules-pam_namespace-Makefile.am-correctly-install-.patch \ | ||
25 | file://0001-Makefile.am-support-usrmage.patch \ | ||
26 | file://run-ptest \ | ||
27 | file://pam-volatiles.conf \ | ||
28 | " | ||
29 | |||
30 | SRC_URI[sha256sum] = "201d40730b1135b1b3cdea09f2c28ac634d73181ccd0172ceddee3649c5792fc" | ||
31 | |||
32 | DEPENDS = "bison-native flex flex-native cracklib libxml2-native virtual/crypt" | ||
33 | |||
34 | EXTRA_OECONF = "--includedir=${includedir}/security \ | ||
35 | --libdir=${base_libdir} \ | ||
36 | --disable-nis \ | ||
37 | --disable-regenerate-docu \ | ||
38 | --disable-doc \ | ||
39 | --disable-prelude" | ||
40 | |||
41 | CFLAGS:append = " -fPIC " | ||
42 | |||
43 | S = "${WORKDIR}/Linux-PAM-${PV}" | ||
44 | |||
45 | inherit autotools gettext pkgconfig systemd ptest | ||
46 | |||
47 | PACKAGECONFIG ??= "" | ||
48 | PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit," | ||
49 | PACKAGECONFIG[userdb] = "--enable-db=db,--enable-db=no,db," | ||
50 | |||
51 | PACKAGES += "${PN}-runtime ${PN}-xtests" | ||
52 | FILES:${PN} = "${base_libdir}/lib*${SOLIBS}" | ||
53 | FILES:${PN}-dev += "${base_libdir}/security/*.la ${base_libdir}/*.la ${base_libdir}/lib*${SOLIBSDEV}" | ||
54 | FILES:${PN}-runtime = "${sysconfdir} ${sbindir} ${systemd_system_unitdir}" | ||
55 | FILES:${PN}-xtests = "${datadir}/Linux-PAM/xtests" | ||
56 | |||
57 | PACKAGES_DYNAMIC += "^${MLPREFIX}pam-plugin-.*" | ||
58 | |||
59 | def get_multilib_bit(d): | ||
60 | baselib = d.getVar('baselib') or '' | ||
61 | return baselib.replace('lib', '') | ||
62 | |||
63 | libpam_suffix = "suffix${@get_multilib_bit(d)}" | ||
64 | |||
65 | RPROVIDES:${PN} += "${PN}-${libpam_suffix}" | ||
66 | RPROVIDES:${PN}-runtime += "${PN}-runtime-${libpam_suffix}" | ||
67 | |||
68 | RDEPENDS:${PN}-runtime = "${PN}-${libpam_suffix} \ | ||
69 | ${MLPREFIX}pam-plugin-deny-${libpam_suffix} \ | ||
70 | ${MLPREFIX}pam-plugin-permit-${libpam_suffix} \ | ||
71 | ${MLPREFIX}pam-plugin-warn-${libpam_suffix} \ | ||
72 | ${MLPREFIX}pam-plugin-unix-${libpam_suffix} \ | ||
73 | " | ||
74 | RDEPENDS:${PN}-xtests = "${PN}-${libpam_suffix} \ | ||
75 | ${MLPREFIX}pam-plugin-access-${libpam_suffix} \ | ||
76 | ${MLPREFIX}pam-plugin-debug-${libpam_suffix} \ | ||
77 | ${MLPREFIX}pam-plugin-pwhistory-${libpam_suffix} \ | ||
78 | ${MLPREFIX}pam-plugin-succeed-if-${libpam_suffix} \ | ||
79 | ${MLPREFIX}pam-plugin-time-${libpam_suffix} \ | ||
80 | bash coreutils" | ||
81 | |||
82 | # FIXME: Native suffix breaks here, disable it for now | ||
83 | RRECOMMENDS:${PN} = "${PN}-runtime-${libpam_suffix}" | ||
84 | RRECOMMENDS:${PN}:class-native = "" | ||
85 | |||
86 | python populate_packages:prepend () { | ||
87 | def pam_plugin_hook(file, pkg, pattern, format, basename): | ||
88 | pn = d.getVar('PN') | ||
89 | libpam_suffix = d.getVar('libpam_suffix') | ||
90 | |||
91 | rdeps = d.getVar('RDEPENDS:' + pkg) | ||
92 | if rdeps: | ||
93 | rdeps = rdeps + " " + pn + "-" + libpam_suffix | ||
94 | else: | ||
95 | rdeps = pn + "-" + libpam_suffix | ||
96 | d.setVar('RDEPENDS:' + pkg, rdeps) | ||
97 | |||
98 | provides = d.getVar('RPROVIDES:' + pkg) | ||
99 | if provides: | ||
100 | provides = provides + " " + pkg + "-" + libpam_suffix | ||
101 | else: | ||
102 | provides = pkg + "-" + libpam_suffix | ||
103 | d.setVar('RPROVIDES:' + pkg, provides) | ||
104 | |||
105 | mlprefix = d.getVar('MLPREFIX') or '' | ||
106 | dvar = d.expand('${WORKDIR}/package') | ||
107 | pam_libdir = d.expand('${base_libdir}/security') | ||
108 | pam_sbindir = d.expand('${sbindir}') | ||
109 | pam_filterdir = d.expand('${base_libdir}/security/pam_filter') | ||
110 | pam_pkgname = mlprefix + 'pam-plugin%s' | ||
111 | |||
112 | do_split_packages(d, pam_libdir, r'^pam(.*)\.so$', pam_pkgname, | ||
113 | 'PAM plugin for %s', hook=pam_plugin_hook, extra_depends='') | ||
114 | do_split_packages(d, pam_filterdir, r'^(.*)$', 'pam-filter-%s', 'PAM filter for %s', extra_depends='') | ||
115 | } | ||
116 | |||
117 | do_compile_ptest() { | ||
118 | cd tests | ||
119 | sed -i -e 's/$(MAKE) $(AM_MAKEFLAGS) check-TESTS//' Makefile | ||
120 | oe_runmake check-am | ||
121 | cd - | ||
122 | } | ||
123 | |||
124 | do_install() { | ||
125 | autotools_do_install | ||
126 | |||
127 | # don't install /var/run when populating rootfs. Do it through volatile | ||
128 | rm -rf ${D}${localstatedir} | ||
129 | |||
130 | if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','false','true',d)}; then | ||
131 | rm -rf ${D}${sysconfdir}/init.d/ | ||
132 | rm -rf ${D}${sysconfdir}/rc* | ||
133 | install -d ${D}${sysconfdir}/tmpfiles.d | ||
134 | install -m 0644 ${WORKDIR}/pam-volatiles.conf \ | ||
135 | ${D}${sysconfdir}/tmpfiles.d/pam.conf | ||
136 | else | ||
137 | install -d ${D}${sysconfdir}/default/volatiles | ||
138 | install -m 0644 ${WORKDIR}/99_pam \ | ||
139 | ${D}${sysconfdir}/default/volatiles/ | ||
140 | fi | ||
141 | |||
142 | install -d ${D}${sysconfdir}/pam.d/ | ||
143 | install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/ | ||
144 | |||
145 | # The lsb requires unix_chkpwd has setuid permission | ||
146 | chmod 4755 ${D}${sbindir}/unix_chkpwd | ||
147 | |||
148 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then | ||
149 | echo "session optional pam_systemd.so" >> ${D}${sysconfdir}/pam.d/common-session | ||
150 | fi | ||
151 | } | ||
152 | |||
153 | do_install_ptest() { | ||
154 | if [ ${PTEST_ENABLED} = "1" ]; then | ||
155 | mkdir -p ${D}${PTEST_PATH}/tests | ||
156 | install -m 0755 ${B}/tests/.libs/* ${D}${PTEST_PATH}/tests | ||
157 | install -m 0644 ${S}/tests/confdir ${D}${PTEST_PATH}/tests | ||
158 | fi | ||
159 | } | ||
160 | |||
161 | pkg_postinst:${PN}() { | ||
162 | if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then | ||
163 | /etc/init.d/populate-volatile.sh update | ||
164 | fi | ||
165 | } | ||
166 | |||
167 | inherit features_check | ||
168 | REQUIRED_DISTRO_FEATURES = "pam" | ||
169 | |||
170 | BBCLASSEXTEND = "nativesdk native" | ||
171 | |||
172 | CONFFILES:${PN}-runtime += "${sysconfdir}/pam.d/common-session" | ||
173 | CONFFILES:${PN}-runtime += "${sysconfdir}/pam.d/common-auth" | ||
174 | CONFFILES:${PN}-runtime += "${sysconfdir}/pam.d/common-password" | ||
175 | CONFFILES:${PN}-runtime += "${sysconfdir}/pam.d/common-session-noninteractive" | ||
176 | CONFFILES:${PN}-runtime += "${sysconfdir}/pam.d/common-account" | ||
177 | CONFFILES:${PN}-runtime += "${sysconfdir}/security/limits.conf" | ||
178 | |||
179 | UPSTREAM_CHECK_URI = "https://github.com/linux-pam/linux-pam/releases" | ||
180 | |||
181 | CVE_PRODUCT = "linux-pam" | ||