From: Ming Liu <ming.liu@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH] libpam: fix multilib packaging issue for pam-plugins
Date: Thu, 23 May 2013 16:01:55 +0800 [thread overview]
Message-ID: <1369296115-20823-1-git-send-email-ming.liu@windriver.com> (raw)
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 multilib 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.
[YOCTO #4532]
[ CQID: WIND00416824 ]
Signed-off-by: Ming Liu <ming.liu@windriver.com>
---
meta/recipes-extended/pam/libpam_1.1.6.bb | 29 +++++++++++++++++++++++++----
1 file 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 c355634..289f134 100644
--- a/meta/recipes-extended/pam/libpam_1.1.6.bb
+++ b/meta/recipes-extended/pam/libpam_1.1.6.bb
@@ -51,9 +51,12 @@ FILES_${PN}-xtests = "${datadir}/Linux-PAM/xtests"
PACKAGES_DYNAMIC += "^pam-plugin-.*"
-RDEPENDS_${PN}-runtime = "libpam pam-plugin-deny pam-plugin-permit pam-plugin-warn pam-plugin-unix"
-RDEPENDS_${PN}-xtests = "libpam pam-plugin-access pam-plugin-debug pam-plugin-cracklib pam-plugin-pwhistory pam-plugin-succeed-if pam-plugin-time coreutils"
-RRECOMMENDS_${PN} = "libpam-runtime"
+RPROVIDES_${PN} += "libpam-${baselib}"
+RPROVIDES_${PN}-runtime += "libpam-runtime-${baselib}"
+
+RDEPENDS_${PN}-runtime = "libpam-${baselib} pam-plugin-deny-${baselib} pam-plugin-permit-${baselib} pam-plugin-warn-${baselib} pam-plugin-unix-${baselib}"
+RDEPENDS_${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"
+RRECOMMENDS_${PN} = "libpam-runtime-${baselib}"
python populate_packages_prepend () {
def pam_plugin_append_file(pn, dir, file):
@@ -63,12 +66,30 @@ python populate_packages_prepend () {
nf = of + " " + nf
d.setVar('FILES_' + pn, nf)
+ def pam_plugin_hook(file, pkg, pattern, format, basename):
+ baselib = d.getVar('baselib', True)
+ mlprefix = d.getVar('MLPREFIX', True) or ''
+
+ rdeps = d.getVar('RDEPENDS_' + pkg, True)
+ if rdeps:
+ rdeps = rdeps + " " + mlprefix + "libpam-" + baselib
+ else:
+ rdeps = mlprefix + "libpam-" + baselib
+ d.setVar('RDEPENDS_' + pkg, rdeps)
+
+ provides = d.getVar('RPROVIDES_' + pkg, True)
+ if provides:
+ provides = provides + " " + pkg + "-" + baselib
+ else:
+ provides = pkg + "-" + baselib
+ d.setVar('RPROVIDES_' + pkg, provides)
+
dvar = bb.data.expand('${WORKDIR}/package', d, True)
pam_libdir = d.expand('${base_libdir}/security')
pam_sbindir = d.expand('${sbindir}')
pam_filterdir = d.expand('${base_libdir}/security/pam_filter')
- do_split_packages(d, pam_libdir, '^pam(.*)\.so$', 'pam-plugin%s', 'PAM plugin for %s', extra_depends='')
+ do_split_packages(d, pam_libdir, '^pam(.*)\.so$', 'pam-plugin%s', 'PAM plugin for %s', hook=pam_plugin_hook, extra_depends='')
mlprefix = d.getVar('MLPREFIX', True) or ''
pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_chkpwd')
pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_update')
--
1.7.11
next reply other threads:[~2013-05-23 8:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-23 8:01 Ming Liu [this message]
2013-05-23 14:40 ` [PATCH] libpam: fix multilib packaging issue for pam-plugins Mark Hatle
2013-05-24 8:52 ` Paul Eggleton
2013-05-24 14:49 ` Mark Hatle
2013-05-28 13:03 ` Saul Wold
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1369296115-20823-1-git-send-email-ming.liu@windriver.com \
--to=ming.liu@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox