diff options
author | Adrian Bunk <bunk@stusta.de> | 2019-05-20 19:30:52 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-06-04 09:09:42 +0100 |
commit | 707c0830c67a27250475a5985a1c1e7c84e3231d (patch) | |
tree | f08b2b84c1079e6121fa598543410658cf3d8e22 /meta/recipes-extended/pam/libpam_1.3.1.bb | |
parent | 5690aa952a6ad3f8df500636cfe4ce14bc825059 (diff) | |
download | poky-707c0830c67a27250475a5985a1c1e7c84e3231d.tar.gz |
libpam: Upgrade 1.3.0 -> 1.3.1
Remove patch applied upstream.
Upstream tarball location changed.
(From OE-Core rev: 40b1825a4434334f3513f94775b176545f8d2f3a)
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/pam/libpam_1.3.1.bb')
-rw-r--r-- | meta/recipes-extended/pam/libpam_1.3.1.bb | 163 |
1 files changed, 163 insertions, 0 deletions
diff --git a/meta/recipes-extended/pam/libpam_1.3.1.bb b/meta/recipes-extended/pam/libpam_1.3.1.bb new file mode 100644 index 0000000000..63ba0c16aa --- /dev/null +++ b/meta/recipes-extended/pam/libpam_1.3.1.bb | |||
@@ -0,0 +1,163 @@ | |||
1 | SUMMARY = "Linux-PAM (Pluggable Authentication Modules)" | ||
2 | DESCRIPTION = "Linux-PAM (Pluggable Authentication Modules for Linux), a flexible mechanism for authenticating users" | ||
3 | HOMEPAGE = "https://fedorahosted.org/linux-pam/" | ||
4 | BUGTRACKER = "https://fedorahosted.org/linux-pam/newticket" | ||
5 | SECTION = "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 | ||
9 | LICENSE = "GPLv2+ | BSD" | ||
10 | LIC_FILES_CHKSUM = "file://COPYING;md5=7eb5c1bf854e8881005d673599ee74d3 \ | ||
11 | file://libpamc/License;md5=a4da476a14c093fdc73be3c3c9ba8fb3 \ | ||
12 | " | ||
13 | |||
14 | SRC_URI = "https://github.com/linux-pam/linux-pam/releases/download/v${PV}/Linux-PAM-${PV}.tar.xz \ | ||
15 | file://99_pam \ | ||
16 | file://pam.d/common-account \ | ||
17 | file://pam.d/common-auth \ | ||
18 | file://pam.d/common-password \ | ||
19 | file://pam.d/common-session \ | ||
20 | file://pam.d/common-session-noninteractive \ | ||
21 | file://pam.d/other \ | ||
22 | file://libpam-xtests.patch \ | ||
23 | file://fixsepbuild.patch \ | ||
24 | file://pam-security-abstract-securetty-handling.patch \ | ||
25 | file://pam-unix-nullok-secure.patch \ | ||
26 | file://crypt_configure.patch \ | ||
27 | " | ||
28 | |||
29 | SRC_URI[md5sum] = "558ff53b0fc0563ca97f79e911822165" | ||
30 | SRC_URI[sha256sum] = "eff47a4ecd833fbf18de9686632a70ee8d0794b79aecb217ebd0ce11db4cd0db" | ||
31 | |||
32 | SRC_URI_append_libc-musl = " file://0001-Add-support-for-defining-missing-funcitonality.patch \ | ||
33 | file://include_paths_header.patch \ | ||
34 | " | ||
35 | |||
36 | DEPENDS = "bison-native flex flex-native cracklib libxml2-native virtual/crypt" | ||
37 | |||
38 | EXTRA_OECONF = "--with-db-uniquename=_pam \ | ||
39 | --includedir=${includedir}/security \ | ||
40 | --libdir=${base_libdir} \ | ||
41 | --disable-nis \ | ||
42 | --disable-regenerate-docu \ | ||
43 | --disable-prelude" | ||
44 | |||
45 | CFLAGS_append = " -fPIC " | ||
46 | |||
47 | S = "${WORKDIR}/Linux-PAM-${PV}" | ||
48 | |||
49 | inherit autotools gettext pkgconfig | ||
50 | |||
51 | PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit," | ||
52 | |||
53 | PACKAGES += "${PN}-runtime ${PN}-xtests" | ||
54 | FILES_${PN} = "${base_libdir}/lib*${SOLIBS}" | ||
55 | FILES_${PN}-dev += "${base_libdir}/security/*.la ${base_libdir}/*.la ${base_libdir}/lib*${SOLIBSDEV}" | ||
56 | FILES_${PN}-runtime = "${sysconfdir}" | ||
57 | FILES_${PN}-xtests = "${datadir}/Linux-PAM/xtests" | ||
58 | |||
59 | PACKAGES_DYNAMIC += "^${MLPREFIX}pam-plugin-.*" | ||
60 | |||
61 | def get_multilib_bit(d): | ||
62 | baselib = d.getVar('baselib') or '' | ||
63 | return baselib.replace('lib', '') | ||
64 | |||
65 | libpam_suffix = "suffix${@get_multilib_bit(d)}" | ||
66 | |||
67 | RPROVIDES_${PN} += "${PN}-${libpam_suffix}" | ||
68 | RPROVIDES_${PN}-runtime += "${PN}-runtime-${libpam_suffix}" | ||
69 | |||
70 | RDEPENDS_${PN}-runtime = "${PN}-${libpam_suffix} \ | ||
71 | ${MLPREFIX}pam-plugin-deny-${libpam_suffix} \ | ||
72 | ${MLPREFIX}pam-plugin-permit-${libpam_suffix} \ | ||
73 | ${MLPREFIX}pam-plugin-warn-${libpam_suffix} \ | ||
74 | ${MLPREFIX}pam-plugin-unix-${libpam_suffix} \ | ||
75 | " | ||
76 | RDEPENDS_${PN}-xtests = "${PN}-${libpam_suffix} \ | ||
77 | ${MLPREFIX}pam-plugin-access-${libpam_suffix} \ | ||
78 | ${MLPREFIX}pam-plugin-debug-${libpam_suffix} \ | ||
79 | ${MLPREFIX}pam-plugin-cracklib-${libpam_suffix} \ | ||
80 | ${MLPREFIX}pam-plugin-pwhistory-${libpam_suffix} \ | ||
81 | ${MLPREFIX}pam-plugin-succeed-if-${libpam_suffix} \ | ||
82 | ${MLPREFIX}pam-plugin-time-${libpam_suffix} \ | ||
83 | coreutils" | ||
84 | |||
85 | # FIXME: Native suffix breaks here, disable it for now | ||
86 | RRECOMMENDS_${PN} = "${PN}-runtime-${libpam_suffix}" | ||
87 | RRECOMMENDS_${PN}_class-native = "" | ||
88 | |||
89 | python populate_packages_prepend () { | ||
90 | def pam_plugin_append_file(pn, dir, file): | ||
91 | nf = os.path.join(dir, file) | ||
92 | of = d.getVar('FILES_' + pn) | ||
93 | if of: | ||
94 | nf = of + " " + nf | ||
95 | d.setVar('FILES_' + pn, nf) | ||
96 | |||
97 | def pam_plugin_hook(file, pkg, pattern, format, basename): | ||
98 | pn = d.getVar('PN') | ||
99 | libpam_suffix = d.getVar('libpam_suffix') | ||
100 | |||
101 | rdeps = d.getVar('RDEPENDS_' + pkg) | ||
102 | if rdeps: | ||
103 | rdeps = rdeps + " " + pn + "-" + libpam_suffix | ||
104 | else: | ||
105 | rdeps = pn + "-" + libpam_suffix | ||
106 | d.setVar('RDEPENDS_' + pkg, rdeps) | ||
107 | |||
108 | provides = d.getVar('RPROVIDES_' + pkg) | ||
109 | if provides: | ||
110 | provides = provides + " " + pkg + "-" + libpam_suffix | ||
111 | else: | ||
112 | provides = pkg + "-" + libpam_suffix | ||
113 | d.setVar('RPROVIDES_' + pkg, provides) | ||
114 | |||
115 | mlprefix = d.getVar('MLPREFIX') or '' | ||
116 | dvar = d.expand('${WORKDIR}/package') | ||
117 | pam_libdir = d.expand('${base_libdir}/security') | ||
118 | pam_sbindir = d.expand('${sbindir}') | ||
119 | pam_filterdir = d.expand('${base_libdir}/security/pam_filter') | ||
120 | pam_pkgname = mlprefix + 'pam-plugin%s' | ||
121 | |||
122 | do_split_packages(d, pam_libdir, r'^pam(.*)\.so$', pam_pkgname, | ||
123 | 'PAM plugin for %s', hook=pam_plugin_hook, extra_depends='') | ||
124 | pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_chkpwd') | ||
125 | pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_update') | ||
126 | pam_plugin_append_file('%spam-plugin-tally' % mlprefix, pam_sbindir, 'pam_tally') | ||
127 | pam_plugin_append_file('%spam-plugin-tally2' % mlprefix, pam_sbindir, 'pam_tally2') | ||
128 | pam_plugin_append_file('%spam-plugin-timestamp' % mlprefix, pam_sbindir, 'pam_timestamp_check') | ||
129 | pam_plugin_append_file('%spam-plugin-mkhomedir' % mlprefix, pam_sbindir, 'mkhomedir_helper') | ||
130 | pam_plugin_append_file('%spam-plugin-console' % mlprefix, pam_sbindir, 'pam_console_apply') | ||
131 | do_split_packages(d, pam_filterdir, r'^(.*)$', 'pam-filter-%s', 'PAM filter for %s', extra_depends='') | ||
132 | } | ||
133 | |||
134 | do_install() { | ||
135 | autotools_do_install | ||
136 | |||
137 | # don't install /var/run when populating rootfs. Do it through volatile | ||
138 | rm -rf ${D}${localstatedir} | ||
139 | install -d ${D}${sysconfdir}/default/volatiles | ||
140 | install -m 0644 ${WORKDIR}/99_pam ${D}${sysconfdir}/default/volatiles | ||
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 | inherit distro_features_check | ||
154 | REQUIRED_DISTRO_FEATURES = "pam" | ||
155 | |||
156 | BBCLASSEXTEND = "nativesdk native" | ||
157 | |||
158 | CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-session" | ||
159 | CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-auth" | ||
160 | CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-password" | ||
161 | CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-session-noninteractive" | ||
162 | CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-account" | ||
163 | CONFFILES_${PN}-runtime += "${sysconfdir}/security/limits.conf" | ||