Patchwork [v2,1/4] polkit 0.104: convert pam code to PACKAGECONFIG and adhere to OE recipe styleguide

login
register
mail settings
Submitter Koen Kooi
Date March 5, 2012, 7:38 a.m.
Message ID <1330933112-13510-1-git-send-email-koen@dominion.thruhere.net>
Download mbox | patch
Permalink /patch/22697/
State New
Headers show

Comments

Koen Kooi - March 5, 2012, 7:38 a.m.
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
 meta/recipes-extended/polkit/polkit_0.104.bb |   25 +++++++++++++++----------
 1 files changed, 15 insertions(+), 10 deletions(-)
Richard Purdie - March 5, 2012, 5:43 p.m.
On Mon, 2012-03-05 at 08:38 +0100, Koen Kooi wrote:
> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
> ---
>  meta/recipes-extended/polkit/polkit_0.104.bb |   25 +++++++++++++++----------
>  1 files changed, 15 insertions(+), 10 deletions(-)

Merged to master, thanks (patches 1-4).

Cheers,

Richard
Richard Purdie - March 5, 2012, 9:14 p.m.
On Mon, 2012-03-05 at 08:38 +0100, Koen Kooi wrote:
> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
> ---
>  meta/recipes-extended/polkit/polkit_0.104.bb |   25 +++++++++++++++----------
>  1 files changed, 15 insertions(+), 10 deletions(-)
> 
> diff --git a/meta/recipes-extended/polkit/polkit_0.104.bb b/meta/recipes-extended/polkit/polkit_0.104.bb
> index 2737a4a..5dc82c5 100644
> --- a/meta/recipes-extended/polkit/polkit_0.104.bb
> +++ b/meta/recipes-extended/polkit/polkit_0.104.bb
> @@ -6,28 +6,33 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=155db86cdbafa7532b41f390409283eb \
>                      file://src/polkit/polkit.h;beginline=1;endline=20;md5=0a8630b0133176d0504c87a0ded39db4 \
>                      file://docs/polkit/html/license.html;md5=d85a36709a446c10f4ee123f9dda0e38"
>  
> +DEPENDS = "expat dbus-glib eggdbus intltool-native"
> +
> +PACKAGECONFIG = "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
> +PACKAGECONFIG[pam] = "--with-authfw=pam,--with-authfw=none,libpam,libpam"
> +

After this merged I found a few issues on the autobuilder. There were
two problems. If DISTRO_FEATURES didn't contain pam and was empty, the
PACKAGECONFIG code would not trigger at all (and not add the
authfw=none). Secondly, I think we need "shadow", not "none" as
otherwise the builds fail due to an invalid configuration.

I've pushed the two fixes for this since builds were breaking.

Cheers,

Richard
Koen Kooi - March 5, 2012, 9:16 p.m.
Op 5 mrt. 2012, om 22:14 heeft Richard Purdie het volgende geschreven:

> On Mon, 2012-03-05 at 08:38 +0100, Koen Kooi wrote:
>> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
>> ---
>> meta/recipes-extended/polkit/polkit_0.104.bb |   25 +++++++++++++++----------
>> 1 files changed, 15 insertions(+), 10 deletions(-)
>> 
>> diff --git a/meta/recipes-extended/polkit/polkit_0.104.bb b/meta/recipes-extended/polkit/polkit_0.104.bb
>> index 2737a4a..5dc82c5 100644
>> --- a/meta/recipes-extended/polkit/polkit_0.104.bb
>> +++ b/meta/recipes-extended/polkit/polkit_0.104.bb
>> @@ -6,28 +6,33 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=155db86cdbafa7532b41f390409283eb \
>>                     file://src/polkit/polkit.h;beginline=1;endline=20;md5=0a8630b0133176d0504c87a0ded39db4 \
>>                     file://docs/polkit/html/license.html;md5=d85a36709a446c10f4ee123f9dda0e38"
>> 
>> +DEPENDS = "expat dbus-glib eggdbus intltool-native"
>> +
>> +PACKAGECONFIG = "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
>> +PACKAGECONFIG[pam] = "--with-authfw=pam,--with-authfw=none,libpam,libpam"
>> +
> 
> After this merged I found a few issues on the autobuilder. There were
> two problems. If DISTRO_FEATURES didn't contain pam and was empty, the
> PACKAGECONFIG code would not trigger at all (and not add the
> authfw=none).

Beth mailed me the log and I asked her is PACKAGECONFIG is broken, and it seems it is since the --disable-foo isn't triggering. Or have I misunderstood how PACKAGECONFIG is supposed to work?

regards,

Koen
Koen Kooi - March 5, 2012, 9:17 p.m.
Op 5 mrt. 2012, om 22:16 heeft Koen Kooi het volgende geschreven:

> 
> Op 5 mrt. 2012, om 22:14 heeft Richard Purdie het volgende geschreven:
> 
>> On Mon, 2012-03-05 at 08:38 +0100, Koen Kooi wrote:
>>> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
>>> ---
>>> meta/recipes-extended/polkit/polkit_0.104.bb |   25 +++++++++++++++----------
>>> 1 files changed, 15 insertions(+), 10 deletions(-)
>>> 
>>> diff --git a/meta/recipes-extended/polkit/polkit_0.104.bb b/meta/recipes-extended/polkit/polkit_0.104.bb
>>> index 2737a4a..5dc82c5 100644
>>> --- a/meta/recipes-extended/polkit/polkit_0.104.bb
>>> +++ b/meta/recipes-extended/polkit/polkit_0.104.bb
>>> @@ -6,28 +6,33 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=155db86cdbafa7532b41f390409283eb \
>>>                    file://src/polkit/polkit.h;beginline=1;endline=20;md5=0a8630b0133176d0504c87a0ded39db4 \
>>>                    file://docs/polkit/html/license.html;md5=d85a36709a446c10f4ee123f9dda0e38"
>>> 
>>> +DEPENDS = "expat dbus-glib eggdbus intltool-native"
>>> +
>>> +PACKAGECONFIG = "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
>>> +PACKAGECONFIG[pam] = "--with-authfw=pam,--with-authfw=none,libpam,libpam"
>>> +
>> 
>> After this merged I found a few issues on the autobuilder. There were
>> two problems. If DISTRO_FEATURES didn't contain pam and was empty, the
>> PACKAGECONFIG code would not trigger at all (and not add the
>> authfw=none).
> 
> Beth mailed me the log and I asked her is PACKAGECONFIG is broken, and it seems it is since the --disable-foo isn't triggering. Or have I misunderstood how PACKAGECONFIG is supposed to work?

http://cgit.openembedded.org/openembedded-core/commit/?id=d7b8c247227f3cc82f92292407f548927e9fde78 :)
Koen Kooi - March 5, 2012, 9:27 p.m.
Op 5 mrt. 2012, om 22:14 heeft Richard Purdie het volgende geschreven:

> On Mon, 2012-03-05 at 08:38 +0100, Koen Kooi wrote:
>> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
>> ---
>> meta/recipes-extended/polkit/polkit_0.104.bb |   25 +++++++++++++++----------
>> 1 files changed, 15 insertions(+), 10 deletions(-)
>> 
>> diff --git a/meta/recipes-extended/polkit/polkit_0.104.bb b/meta/recipes-extended/polkit/polkit_0.104.bb
>> index 2737a4a..5dc82c5 100644
>> --- a/meta/recipes-extended/polkit/polkit_0.104.bb
>> +++ b/meta/recipes-extended/polkit/polkit_0.104.bb
>> @@ -6,28 +6,33 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=155db86cdbafa7532b41f390409283eb \
>>                     file://src/polkit/polkit.h;beginline=1;endline=20;md5=0a8630b0133176d0504c87a0ded39db4 \
>>                     file://docs/polkit/html/license.html;md5=d85a36709a446c10f4ee123f9dda0e38"
>> 
>> +DEPENDS = "expat dbus-glib eggdbus intltool-native"
>> +
>> +PACKAGECONFIG = "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
>> +PACKAGECONFIG[pam] = "--with-authfw=pam,--with-authfw=none,libpam,libpam"
>> +
> 
> After this merged I found a few issues on the autobuilder. There were
> two problems. If DISTRO_FEATURES didn't contain pam and was empty, the
> PACKAGECONFIG code would not trigger at all (and not add the
> authfw=none). Secondly, I think we need "shadow", not "none" as
> otherwise the builds fail due to an invalid configuration.

I've thought about that, but if we choose 'shadow', we need to add (R)DEPENDS for it to work properly. So 'none' seems like the best option. 

Anyway, how can I take over maintainership of polkit, I'm getting tired of every commit breaking it subtly and taking another week of my time finding out that $random error is actually caused by polkit deep down. It's like dbus, breakage does not always point to the culprit.

Takes this one for example:

http://cgit.openembedded.org/openembedded-core/commit/meta/recipes-extended/polkit?id=6bc6406b019ebc104a4abfb15c2d2e1263968664

PAM is hardcoded to be enabled, but you'll only get a working config if you put it in DISTRO_FEATURES.

regards,

Koen

Patch

diff --git a/meta/recipes-extended/polkit/polkit_0.104.bb b/meta/recipes-extended/polkit/polkit_0.104.bb
index 2737a4a..5dc82c5 100644
--- a/meta/recipes-extended/polkit/polkit_0.104.bb
+++ b/meta/recipes-extended/polkit/polkit_0.104.bb
@@ -6,28 +6,33 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=155db86cdbafa7532b41f390409283eb \
                     file://src/polkit/polkit.h;beginline=1;endline=20;md5=0a8630b0133176d0504c87a0ded39db4 \
                     file://docs/polkit/html/license.html;md5=d85a36709a446c10f4ee123f9dda0e38"
 
+DEPENDS = "expat dbus-glib eggdbus intltool-native"
+
+PACKAGECONFIG = "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
+PACKAGECONFIG[pam] = "--with-authfw=pam,--with-authfw=none,libpam,libpam"
+
+PR = "r3"
+
+PAM_SRC_URI = "file://polkit-1_pam.patch"
 SRC_URI = "http://hal.freedesktop.org/releases/polkit-${PV}.tar.gz \
            file://introspection.patch \
-           ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
+           ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
+          "
 
 SRC_URI[md5sum] = "e380b4c6fb1e7bccf854e92edc0a8ce1"
 SRC_URI[sha256sum] = "6b0a13d8381e4a7b7e37c18a54595191b50757e0fcd186cd9918e9ad0f18c7f9"
 
-PAM_SRC_URI = "file://polkit-1_pam.patch"
-PR = "r2"
-DEPENDS = "libpam expat dbus-glib eggdbus intltool-native"
-RDEPENDS_${PN} = "libpam"
-EXTRA_OECONF = "--with-authfw=pam --with-os-type=moblin --disable-man-pages --disable-gtk-doc --disable-introspection"
+EXTRA_OECONF = "--with-os-type=moblin --disable-man-pages --disable-gtk-doc --disable-introspection"
 
 inherit autotools pkgconfig
 
+do_install_append() {
+	rm -f ${D}${libdir}/${PN}-1/extensions/*.a
+}
+
 FILES_${PN} += "${libdir}/${PN}-1/extensions/*.so \
                 ${datadir}/${PN}-1/actions/* \
                 ${datadir}/dbus-1/system-services/*"
 FILES_${PN}-dbg += "${libdir}/${PN}-1/extensions/.debug/*.so"
 FILES_${PN}-dev += "${libdir}/${PN}-1/extensions/*.la "
 
-do_install_append() {
-	rm -f ${D}${libdir}/${PN}-1/extensions/*.a
-}
-