Patchwork [3/3] libpam: Allow use during build and in SDK

login
register
mail settings
Submitter Otavio Salvador
Date Aug. 11, 2014, 8:21 p.m.
Message ID <1407788504-27417-3-git-send-email-otavio@ossystems.com.br>
Download mbox | patch
Permalink /patch/77907/
State Accepted
Commit f9f818351a58ce2b640c2e304d57e7026c050b5e
Headers show

Comments

Otavio Salvador - Aug. 11, 2014, 8:21 p.m.
The recipe had libpam hardcoded in some places which were causing
failures as the metadata renaming hooks does not change those,
generating a broken dependencies list.

This patch fixes those and add the native and nativesdk support.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 meta/recipes-extended/pam/libpam_1.1.6.bb |   19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)
Richard Purdie - Aug. 15, 2014, 9:45 a.m.
On Mon, 2014-08-11 at 17:21 -0300, Otavio Salvador wrote:
> The recipe had libpam hardcoded in some places which were causing
> failures as the metadata renaming hooks does not change those,
> generating a broken dependencies list.
> 
> This patch fixes those and add the native and nativesdk support.

Well, it doesn't as far as I can tell.

Firstly, the autobuilder blew up since nativesdk-coreutils isn't
available, which in turn shows nativesdk-libcap isn't either. I pushed
patches into master-next for those, next I see:

WARNING: QA Issue: nativesdk-pam-plugin-xauth rdepends on nativesdk-nativesdk-libpam-suffix, but it isn't a build dependency? [build-deps]

So I'd love to know what testing this had?

Cheers,

Richard

> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
>  meta/recipes-extended/pam/libpam_1.1.6.bb |   19 +++++++++++--------
>  1 file changed, 11 insertions(+), 8 deletions(-)
> 
> diff --git a/meta/recipes-extended/pam/libpam_1.1.6.bb b/meta/recipes-extended/pam/libpam_1.1.6.bb
> index 3190aaf..c06709f 100644
> --- a/meta/recipes-extended/pam/libpam_1.1.6.bb
> +++ b/meta/recipes-extended/pam/libpam_1.1.6.bb
> @@ -61,7 +61,7 @@ FILES_${PN}-dev += "${base_libdir}/security/*.la ${base_libdir}/*.la ${base_libd
>  FILES_${PN}-runtime = "${sysconfdir}"
>  FILES_${PN}-xtests = "${datadir}/Linux-PAM/xtests"
>  
> -PACKAGES_DYNAMIC += "^pam-plugin-.*"
> +PACKAGES_DYNAMIC += "^${MLPREFIX}pam-plugin-.*"
>  
>  def get_multilib_bit(d):
>      baselib = d.getVar('baselib', True) or ''
> @@ -69,12 +69,12 @@ def get_multilib_bit(d):
>  
>  libpam_suffix = "suffix${@get_multilib_bit(d)}"
>  
> -RPROVIDES_${PN} += "libpam-${libpam_suffix}"
> -RPROVIDES_${PN}-runtime += "libpam-runtime-${libpam_suffix}"
> +RPROVIDES_${PN} += "${PN}-${libpam_suffix}"
> +RPROVIDES_${PN}-runtime += "${PN}-runtime-${libpam_suffix}"
>  
> -RDEPENDS_${PN}-runtime = "libpam-${libpam_suffix} pam-plugin-deny-${libpam_suffix} pam-plugin-permit-${libpam_suffix} pam-plugin-warn-${libpam_suffix} pam-plugin-unix-${libpam_suffix}"
> -RDEPENDS_${PN}-xtests = "libpam-${libpam_suffix} pam-plugin-access-${libpam_suffix} pam-plugin-debug-${libpam_suffix} pam-plugin-cracklib-${libpam_suffix} pam-plugin-pwhistory-${libpam_suffix} pam-plugin-succeed-if-${libpam_suffix} pam-plugin-time-${libpam_suffix} coreutils"
> -RRECOMMENDS_${PN} = "libpam-runtime-${libpam_suffix}"
> +RDEPENDS_${PN}-runtime = "${PN}-${libpam_suffix} pam-plugin-deny-${libpam_suffix} pam-plugin-permit-${libpam_suffix} pam-plugin-warn-${libpam_suffix} pam-plugin-unix-${libpam_suffix}"
> +RDEPENDS_${PN}-xtests = "${PN}-${libpam_suffix} pam-plugin-access-${libpam_suffix} pam-plugin-debug-${libpam_suffix} pam-plugin-cracklib-${libpam_suffix} pam-plugin-pwhistory-${libpam_suffix} pam-plugin-succeed-if-${libpam_suffix} pam-plugin-time-${libpam_suffix} coreutils"
> +#RRECOMMENDS_${PN} = "${PN}-runtime-${libpam_suffix}"
>  
>  python populate_packages_prepend () {
>      def pam_plugin_append_file(pn, dir, file):
> @@ -85,14 +85,15 @@ python populate_packages_prepend () {
>          d.setVar('FILES_' + pn, nf)
>  
>      def pam_plugin_hook(file, pkg, pattern, format, basename):
> +        pn = d.getVar('PN', True)
>          libpam_suffix = d.getVar('libpam_suffix', True)
>          mlprefix = d.getVar('MLPREFIX', True) or ''
>  
>          rdeps = d.getVar('RDEPENDS_' + pkg, True)
>          if rdeps:
> -            rdeps = rdeps + " " + mlprefix + "libpam-" + libpam_suffix
> +            rdeps = rdeps + " " + mlprefix + pn + "-" + libpam_suffix
>          else:
> -            rdeps = mlprefix + "libpam-" + libpam_suffix
> +            rdeps = mlprefix + pn + "-" + libpam_suffix
>          d.setVar('RDEPENDS_' + pkg, rdeps)
>  
>          provides = d.getVar('RPROVIDES_' + pkg, True)
> @@ -142,3 +143,5 @@ python do_pam_sanity () {
>          bb.warn("Building libpam but 'pam' isn't in DISTRO_FEATURES, PAM won't work correctly")
>  }
>  addtask pam_sanity before do_configure
> +
> +BBCLASSEXTEND = "nativesdk native"
> -- 
> 1.7.10.4
>
Otavio Salvador - Aug. 15, 2014, 12:18 p.m.
On Fri, Aug 15, 2014 at 6:45 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Mon, 2014-08-11 at 17:21 -0300, Otavio Salvador wrote:
>> The recipe had libpam hardcoded in some places which were causing
>> failures as the metadata renaming hooks does not change those,
>> generating a broken dependencies list.
>>
>> This patch fixes those and add the native and nativesdk support.
>
> Well, it doesn't as far as I can tell.
>
> Firstly, the autobuilder blew up since nativesdk-coreutils isn't
> available, which in turn shows nativesdk-libcap isn't either. I pushed
> patches into master-next for those, next I see:
>
> WARNING: QA Issue: nativesdk-pam-plugin-xauth rdepends on nativesdk-nativesdk-libpam-suffix, but it isn't a build dependency? [build-deps]
>
> So I'd love to know what testing this had?

I will test this better here and send a new patchset.

This was my fault as this were not tested in master. Will proper fix
it and send.

Sorry for that.

Patch

diff --git a/meta/recipes-extended/pam/libpam_1.1.6.bb b/meta/recipes-extended/pam/libpam_1.1.6.bb
index 3190aaf..c06709f 100644
--- a/meta/recipes-extended/pam/libpam_1.1.6.bb
+++ b/meta/recipes-extended/pam/libpam_1.1.6.bb
@@ -61,7 +61,7 @@  FILES_${PN}-dev += "${base_libdir}/security/*.la ${base_libdir}/*.la ${base_libd
 FILES_${PN}-runtime = "${sysconfdir}"
 FILES_${PN}-xtests = "${datadir}/Linux-PAM/xtests"
 
-PACKAGES_DYNAMIC += "^pam-plugin-.*"
+PACKAGES_DYNAMIC += "^${MLPREFIX}pam-plugin-.*"
 
 def get_multilib_bit(d):
     baselib = d.getVar('baselib', True) or ''
@@ -69,12 +69,12 @@  def get_multilib_bit(d):
 
 libpam_suffix = "suffix${@get_multilib_bit(d)}"
 
-RPROVIDES_${PN} += "libpam-${libpam_suffix}"
-RPROVIDES_${PN}-runtime += "libpam-runtime-${libpam_suffix}"
+RPROVIDES_${PN} += "${PN}-${libpam_suffix}"
+RPROVIDES_${PN}-runtime += "${PN}-runtime-${libpam_suffix}"
 
-RDEPENDS_${PN}-runtime = "libpam-${libpam_suffix} pam-plugin-deny-${libpam_suffix} pam-plugin-permit-${libpam_suffix} pam-plugin-warn-${libpam_suffix} pam-plugin-unix-${libpam_suffix}"
-RDEPENDS_${PN}-xtests = "libpam-${libpam_suffix} pam-plugin-access-${libpam_suffix} pam-plugin-debug-${libpam_suffix} pam-plugin-cracklib-${libpam_suffix} pam-plugin-pwhistory-${libpam_suffix} pam-plugin-succeed-if-${libpam_suffix} pam-plugin-time-${libpam_suffix} coreutils"
-RRECOMMENDS_${PN} = "libpam-runtime-${libpam_suffix}"
+RDEPENDS_${PN}-runtime = "${PN}-${libpam_suffix} pam-plugin-deny-${libpam_suffix} pam-plugin-permit-${libpam_suffix} pam-plugin-warn-${libpam_suffix} pam-plugin-unix-${libpam_suffix}"
+RDEPENDS_${PN}-xtests = "${PN}-${libpam_suffix} pam-plugin-access-${libpam_suffix} pam-plugin-debug-${libpam_suffix} pam-plugin-cracklib-${libpam_suffix} pam-plugin-pwhistory-${libpam_suffix} pam-plugin-succeed-if-${libpam_suffix} pam-plugin-time-${libpam_suffix} coreutils"
+#RRECOMMENDS_${PN} = "${PN}-runtime-${libpam_suffix}"
 
 python populate_packages_prepend () {
     def pam_plugin_append_file(pn, dir, file):
@@ -85,14 +85,15 @@  python populate_packages_prepend () {
         d.setVar('FILES_' + pn, nf)
 
     def pam_plugin_hook(file, pkg, pattern, format, basename):
+        pn = d.getVar('PN', True)
         libpam_suffix = d.getVar('libpam_suffix', True)
         mlprefix = d.getVar('MLPREFIX', True) or ''
 
         rdeps = d.getVar('RDEPENDS_' + pkg, True)
         if rdeps:
-            rdeps = rdeps + " " + mlprefix + "libpam-" + libpam_suffix
+            rdeps = rdeps + " " + mlprefix + pn + "-" + libpam_suffix
         else:
-            rdeps = mlprefix + "libpam-" + libpam_suffix
+            rdeps = mlprefix + pn + "-" + libpam_suffix
         d.setVar('RDEPENDS_' + pkg, rdeps)
 
         provides = d.getVar('RPROVIDES_' + pkg, True)
@@ -142,3 +143,5 @@  python do_pam_sanity () {
         bb.warn("Building libpam but 'pam' isn't in DISTRO_FEATURES, PAM won't work correctly")
 }
 addtask pam_sanity before do_configure
+
+BBCLASSEXTEND = "nativesdk native"