* [PATCH v2] connman: fix systemd support for connman-* packages.
@ 2013-08-13 11:26 Yevhen Kyriukha
2013-08-13 15:30 ` Saul Wold
2013-08-20 11:58 ` Burton, Ross
0 siblings, 2 replies; 4+ messages in thread
From: Yevhen Kyriukha @ 2013-08-13 11:26 UTC (permalink / raw)
To: openembedded-core; +Cc: Yevhen Kyriukha
This patch fixes systemd's postinst/postrm script generation.
Signed-off-by: Yevhen Kyriukha <kirgene@gmail.com>
---
meta/recipes-connectivity/connman/connman.inc | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc
index 6b5ea0b..37ce3ec 100644
--- a/meta/recipes-connectivity/connman/connman.inc
+++ b/meta/recipes-connectivity/connman/connman.inc
@@ -56,6 +56,14 @@ PACKAGECONFIG[wispr] = "--enable-wispr,--disable-wispr,gnutls,"
INITSCRIPT_NAME = "connman"
INITSCRIPT_PARAMS = "start 05 5 2 3 . stop 22 0 1 6 ."
+python __anonymous () {
+ systemd_packages = "${PN}"
+ pkgconfig = d.getVar('PACKAGECONFIG', True)
+ if ('openvpn' or 'vpnc' or 'l2tp' or 'pptp') in pkgconfig.split():
+ systemd_packages += " ${PN}-vpn"
+ d.setVar('SYSTEMD_PACKAGES', systemd_packages)
+}
+
SYSTEMD_SERVICE_${PN} = "connman.service"
SYSTEMD_SERVICE_${PN}-vpn = "connman-vpn.service"
SYSTEMD_WIRED_SETUP = "ExecStartPre=-${libdir}/connman/wired-setup"
--
1.8.1.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] connman: fix systemd support for connman-* packages.
2013-08-13 11:26 [PATCH v2] connman: fix systemd support for connman-* packages Yevhen Kyriukha
@ 2013-08-13 15:30 ` Saul Wold
2013-08-13 16:08 ` Yevhen Kyriukha
2013-08-20 11:58 ` Burton, Ross
1 sibling, 1 reply; 4+ messages in thread
From: Saul Wold @ 2013-08-13 15:30 UTC (permalink / raw)
To: Yevhen Kyriukha; +Cc: openembedded-core
On 08/13/2013 04:26 AM, Yevhen Kyriukha wrote:
> This patch fixes systemd's postinst/postrm script generation.
>
> Signed-off-by: Yevhen Kyriukha <kirgene@gmail.com>
> ---
> meta/recipes-connectivity/connman/connman.inc | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc
> index 6b5ea0b..37ce3ec 100644
> --- a/meta/recipes-connectivity/connman/connman.inc
> +++ b/meta/recipes-connectivity/connman/connman.inc
> @@ -56,6 +56,14 @@ PACKAGECONFIG[wispr] = "--enable-wispr,--disable-wispr,gnutls,"
> INITSCRIPT_NAME = "connman"
> INITSCRIPT_PARAMS = "start 05 5 2 3 . stop 22 0 1 6 ."
>
> +python __anonymous () {
> + systemd_packages = "${PN}"
> + pkgconfig = d.getVar('PACKAGECONFIG', True)
> + if ('openvpn' or 'vpnc' or 'l2tp' or 'pptp') in pkgconfig.split():
> + systemd_packages += " ${PN}-vpn"
> + d.setVar('SYSTEMD_PACKAGES', systemd_packages)
> +}
> +
> SYSTEMD_SERVICE_${PN} = "connman.service"
> SYSTEMD_SERVICE_${PN}-vpn = "connman-vpn.service"
> SYSTEMD_WIRED_SETUP = "ExecStartPre=-${libdir}/connman/wired-setup"
>
Can't you use the base_contains style of anon python in the
SYSTEMD_PACKAGES:
SYSTEMD_PACKAGES = "${PN} ${@base_contains('PACKAGECONFIG', 'vpn',
'${PN}-vpn', '', d)}"
Or can any one of those in the list above trigger the vpn, it would be
cleaner if we just trigger on just one item.
Sau!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] connman: fix systemd support for connman-* packages.
2013-08-13 15:30 ` Saul Wold
@ 2013-08-13 16:08 ` Yevhen Kyriukha
0 siblings, 0 replies; 4+ messages in thread
From: Yevhen Kyriukha @ 2013-08-13 16:08 UTC (permalink / raw)
To: Saul Wold; +Cc: Patches and discussions about the oe-core layer
2013/8/13 Saul Wold <sgw@linux.intel.com>:
> On 08/13/2013 04:26 AM, Yevhen Kyriukha wrote:
>>
>> This patch fixes systemd's postinst/postrm script generation.
>>
>> Signed-off-by: Yevhen Kyriukha <kirgene@gmail.com>
>> ---
>> meta/recipes-connectivity/connman/connman.inc | 8 ++++++++
>> 1 file changed, 8 insertions(+)
>>
>> diff --git a/meta/recipes-connectivity/connman/connman.inc
>> b/meta/recipes-connectivity/connman/connman.inc
>> index 6b5ea0b..37ce3ec 100644
>> --- a/meta/recipes-connectivity/connman/connman.inc
>> +++ b/meta/recipes-connectivity/connman/connman.inc
>> @@ -56,6 +56,14 @@ PACKAGECONFIG[wispr] =
>> "--enable-wispr,--disable-wispr,gnutls,"
>> INITSCRIPT_NAME = "connman"
>> INITSCRIPT_PARAMS = "start 05 5 2 3 . stop 22 0 1 6 ."
>>
>> +python __anonymous () {
>> + systemd_packages = "${PN}"
>> + pkgconfig = d.getVar('PACKAGECONFIG', True)
>> + if ('openvpn' or 'vpnc' or 'l2tp' or 'pptp') in pkgconfig.split():
>> + systemd_packages += " ${PN}-vpn"
>> + d.setVar('SYSTEMD_PACKAGES', systemd_packages)
>> +}
>> +
>> SYSTEMD_SERVICE_${PN} = "connman.service"
>> SYSTEMD_SERVICE_${PN}-vpn = "connman-vpn.service"
>> SYSTEMD_WIRED_SETUP = "ExecStartPre=-${libdir}/connman/wired-setup"
>>
> Can't you use the base_contains style of anon python in the
> SYSTEMD_PACKAGES:
>
> SYSTEMD_PACKAGES = "${PN} ${@base_contains('PACKAGECONFIG', 'vpn',
> '${PN}-vpn', '', d)}"
>
> Or can any one of those in the list above trigger the vpn, it would be
> cleaner if we just trigger on just one item.
>
> Sau!
Here is how connman detects (in configure.ac) whether to build
connman-vpn or not:
AM_CONDITIONAL(VPN, test "${enable_openconnect}" != "no" -o \
"${enable_openvpn}" != "no" -o \
"${enable_vpnc}" != "no" -o \
"${enable_l2tp}" != "no" -o \
"${enable_pptp}" != "no")
This patch is doing the same check: if at least one of VPN
technologies were selected we should build connman-vpn.
base_contains is not an option in this case as it checks whether
environment variable contains all strings that you provide in second
parameter.
Regards,
Yevhen
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] connman: fix systemd support for connman-* packages.
2013-08-13 11:26 [PATCH v2] connman: fix systemd support for connman-* packages Yevhen Kyriukha
2013-08-13 15:30 ` Saul Wold
@ 2013-08-20 11:58 ` Burton, Ross
1 sibling, 0 replies; 4+ messages in thread
From: Burton, Ross @ 2013-08-20 11:58 UTC (permalink / raw)
To: Yevhen Kyriukha; +Cc: openembedded-core
On 13 August 2013 12:26, Yevhen Kyriukha <kirgene@gmail.com> wrote:
> +python __anonymous () {
> + systemd_packages = "${PN}"
> + pkgconfig = d.getVar('PACKAGECONFIG', True)
> + if ('openvpn' or 'vpnc' or 'l2tp' or 'pptp') in pkgconfig.split():
> + systemd_packages += " ${PN}-vpn"
> + d.setVar('SYSTEMD_PACKAGES', systemd_packages)
> +}
I'm not keen on this as its quite a lot of logic to put in the recipe
when it would be good to handle this case of optional packages in the
systemd class itself.
However I'm not sure how best to do this as the FILES_* manipulation
needs to happen *before* the package split, and this check can only
happen *after* the package split. I wonder if it's possible to split
up the systemd class functionality like that.
So, we should probably merge this now, and try and fix the class so we
can remove it again later.
Ross
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-08-20 11:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-13 11:26 [PATCH v2] connman: fix systemd support for connman-* packages Yevhen Kyriukha
2013-08-13 15:30 ` Saul Wold
2013-08-13 16:08 ` Yevhen Kyriukha
2013-08-20 11:58 ` Burton, Ross
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.