summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-extended/pam/libpam_1.1.6.bb29
1 files changed, 25 insertions, 4 deletions
diff --git a/meta/recipes-extended/pam/libpam_1.1.6.bb b/meta/recipes-extended/pam/libpam_1.1.6.bb
index 6ddfcf46b2..61aa0a1ddd 100644
--- a/meta/recipes-extended/pam/libpam_1.1.6.bb
+++ b/meta/recipes-extended/pam/libpam_1.1.6.bb
@@ -62,9 +62,12 @@ FILES_${PN}-xtests = "${datadir}/Linux-PAM/xtests"
62 62
63PACKAGES_DYNAMIC += "^pam-plugin-.*" 63PACKAGES_DYNAMIC += "^pam-plugin-.*"
64 64
65RDEPENDS_${PN}-runtime = "libpam pam-plugin-deny pam-plugin-permit pam-plugin-warn pam-plugin-unix" 65RPROVIDES_${PN} += "libpam-${baselib}"
66RDEPENDS_${PN}-xtests = "libpam pam-plugin-access pam-plugin-debug pam-plugin-cracklib pam-plugin-pwhistory pam-plugin-succeed-if pam-plugin-time coreutils" 66RPROVIDES_${PN}-runtime += "libpam-runtime-${baselib}"
67RRECOMMENDS_${PN} = "libpam-runtime" 67
68RDEPENDS_${PN}-runtime = "libpam-${baselib} pam-plugin-deny-${baselib} pam-plugin-permit-${baselib} pam-plugin-warn-${baselib} pam-plugin-unix-${baselib}"
69RDEPENDS_${PN}-xtests = "libpam-${baselib} pam-plugin-access-${baselib} pam-plugin-debug-${baselib} pam-plugin-cracklib-${baselib} pam-plugin-pwhistory-${baselib} pam-plugin-succeed-if-${baselib} pam-plugin-time-${baselib} coreutils"
70RRECOMMENDS_${PN} = "libpam-runtime-${baselib}"
68 71
69python populate_packages_prepend () { 72python populate_packages_prepend () {
70 def pam_plugin_append_file(pn, dir, file): 73 def pam_plugin_append_file(pn, dir, file):
@@ -74,12 +77,30 @@ python populate_packages_prepend () {
74 nf = of + " " + nf 77 nf = of + " " + nf
75 d.setVar('FILES_' + pn, nf) 78 d.setVar('FILES_' + pn, nf)
76 79
80 def pam_plugin_hook(file, pkg, pattern, format, basename):
81 baselib = d.getVar('baselib', True)
82 mlprefix = d.getVar('MLPREFIX', True) or ''
83
84 rdeps = d.getVar('RDEPENDS_' + pkg, True)
85 if rdeps:
86 rdeps = rdeps + " " + mlprefix + "libpam-" + baselib
87 else:
88 rdeps = mlprefix + "libpam-" + baselib
89 d.setVar('RDEPENDS_' + pkg, rdeps)
90
91 provides = d.getVar('RPROVIDES_' + pkg, True)
92 if provides:
93 provides = provides + " " + pkg + "-" + baselib
94 else:
95 provides = pkg + "-" + baselib
96 d.setVar('RPROVIDES_' + pkg, provides)
97
77 dvar = bb.data.expand('${WORKDIR}/package', d, True) 98 dvar = bb.data.expand('${WORKDIR}/package', d, True)
78 pam_libdir = d.expand('${base_libdir}/security') 99 pam_libdir = d.expand('${base_libdir}/security')
79 pam_sbindir = d.expand('${sbindir}') 100 pam_sbindir = d.expand('${sbindir}')
80 pam_filterdir = d.expand('${base_libdir}/security/pam_filter') 101 pam_filterdir = d.expand('${base_libdir}/security/pam_filter')
81 102
82 do_split_packages(d, pam_libdir, '^pam(.*)\.so$', 'pam-plugin%s', 'PAM plugin for %s', extra_depends='') 103 do_split_packages(d, pam_libdir, '^pam(.*)\.so$', 'pam-plugin%s', 'PAM plugin for %s', hook=pam_plugin_hook, extra_depends='')
83 mlprefix = d.getVar('MLPREFIX', True) or '' 104 mlprefix = d.getVar('MLPREFIX', True) or ''
84 pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_chkpwd') 105 pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_chkpwd')
85 pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_update') 106 pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_update')