All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Clean up connman-conf
@ 2015-12-02 11:03 Joshua Lock
       [not found] ` <cover.1449054142.git.joshua.lock@collabora.co.uk>
  0 siblings, 1 reply; 6+ messages in thread
From: Joshua Lock @ 2015-12-02 11:03 UTC (permalink / raw)
  To: openembedded-core

s reported in YP#8399[1] we currently hack the connman service to try and
execute a script which is only installed on qemu targets. This pair of
patches changes the connman-conf recipe to install a oneshot systemd unit
that is called before ConnMan, removes the ExecStartPre and adds an override
to the RRECOMMENDS so that the connman-conf is only installed by default for
qemu machines and images for other machines are left with an error in the
journal about failing to start a service.

Since the initial RFC submission I've:
  * rebased on master
  * changed connman-conf to be an allarch recipe
  * updated to use the new systemd_system_unitdir variable

Regards,

Joshua

1. https://bugzilla.yoctoproject.org/show_bug.cgi?id=8399

The following changes since commit 03f15e51998a3ef65a5b68cb7cbf724f4388c289:

  sstate: Ensure siginfo and sig files are also touched (2015-11-25 08:09:00 +0000)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib joshuagl/connman
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=joshuagl/connman

Joshua Lock (3):
  connman-conf: convert to systemd oneshot
  connman-conf: mark as allarch and not requiring default deps
  connman: tidy up connman-conf usage

 meta/recipes-connectivity/connman/connman-conf.bb           | 13 +++++++++++--
 .../connman/connman-conf/qemuall/wired-connection.service   | 10 ++++++++++
 meta/recipes-connectivity/connman/connman.inc               |  5 -----
 meta/recipes-connectivity/connman/connman_1.30.bb           |  3 +--
 4 files changed, 22 insertions(+), 9 deletions(-)
 create mode 100644 meta/recipes-connectivity/connman/connman-conf/qemuall/wired-connection.service

--
2.4.3


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/3] connman-conf: convert to systemd oneshot
       [not found] ` <cover.1449054142.git.joshua.lock@collabora.co.uk>
@ 2015-12-02 11:03   ` Joshua Lock
  2015-12-02 11:03   ` [PATCH 2/3] connman-conf: mark as allarch and not requiring default deps Joshua Lock
  2015-12-02 11:03   ` [PATCH 3/3] connman: tidy up connman-conf usage Joshua Lock
  2 siblings, 0 replies; 6+ messages in thread
From: Joshua Lock @ 2015-12-02 11:03 UTC (permalink / raw)
  To: openembedded-core

Install a oneshot unit file that is started before ConnMan to
configure a wired network inteface with the wired-setup script
rather than requiring this script to be manually run some how.

Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
---
 meta/recipes-connectivity/connman/connman-conf.bb              |  9 ++++++++-
 .../connman/connman-conf/qemuall/wired-connection.service      | 10 ++++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-connectivity/connman/connman-conf/qemuall/wired-connection.service

diff --git a/meta/recipes-connectivity/connman/connman-conf.bb b/meta/recipes-connectivity/connman/connman-conf.bb
index 9254ed7..bef9237 100644
--- a/meta/recipes-connectivity/connman/connman-conf.bb
+++ b/meta/recipes-connectivity/connman/connman-conf.bb
@@ -4,8 +4,11 @@ network interface for a qemu machine."
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
 
+inherit systemd
+
 SRC_URI_append_qemuall = " file://wired.config \
                            file://wired-setup \
+                           file://wired-connection.service \
 "
 PR = "r2"
 
@@ -17,10 +20,14 @@ FILES_${PN} = "${localstatedir}/* ${datadir}/*"
 
 do_install() {
     #Configure Wired network interface in case of qemu* machines
-    if test -e ${WORKDIR}/wired.config && test -e ${WORKDIR}/wired-setup; then
+    if test -e ${WORKDIR}/wired.config &&
+       test -e ${WORKDIR}/wired-setup &&
+       test -e ${WORKDIR}/wired-connection.service; then
         install -d ${D}${localstatedir}/lib/connman
         install -m 0644 ${WORKDIR}/wired.config ${D}${localstatedir}/lib/connman
         install -d ${D}${datadir}/connman
         install -m 0755 ${WORKDIR}/wired-setup ${D}${datadir}/connman
+        install -d ${D}${systemd_system_unitdir}
+        install -m 0644 ${WORKDIR}/wired-connection.service ${D}${systemd_system_unitdir}
     fi
 }
diff --git a/meta/recipes-connectivity/connman/connman-conf/qemuall/wired-connection.service b/meta/recipes-connectivity/connman/connman-conf/qemuall/wired-connection.service
new file mode 100644
index 0000000..f66d158a
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman-conf/qemuall/wired-connection.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Setup wired interface on qemu machines
+Before=connman.service
+
+[Service]
+Type=oneshot
+ExecStart=/usr/lib/connman/wired-setup
+
+[Install]
+WantedBy=network.target
-- 
2.4.3



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/3] connman-conf: mark as allarch and not requiring default deps
       [not found] ` <cover.1449054142.git.joshua.lock@collabora.co.uk>
  2015-12-02 11:03   ` [PATCH 1/3] connman-conf: convert to systemd oneshot Joshua Lock
@ 2015-12-02 11:03   ` Joshua Lock
  2015-12-02 21:19     ` Martin Jansa
  2015-12-02 11:03   ` [PATCH 3/3] connman: tidy up connman-conf usage Joshua Lock
  2 siblings, 1 reply; 6+ messages in thread
From: Joshua Lock @ 2015-12-02 11:03 UTC (permalink / raw)
  To: openembedded-core

This recipe just installs some data files and thus is architecture
independent and doesn't require a compiler and libc in its DEPENDS.

Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
---
 meta/recipes-connectivity/connman/connman-conf.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-connectivity/connman/connman-conf.bb b/meta/recipes-connectivity/connman/connman-conf.bb
index bef9237..1e119ad 100644
--- a/meta/recipes-connectivity/connman/connman-conf.bb
+++ b/meta/recipes-connectivity/connman/connman-conf.bb
@@ -4,7 +4,9 @@ network interface for a qemu machine."
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
 
-inherit systemd
+inherit systemd allarch
+
+INHIBIT_DEFAULT_DEPS = "1"
 
 SRC_URI_append_qemuall = " file://wired.config \
                            file://wired-setup \
-- 
2.4.3



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/3] connman: tidy up connman-conf usage
       [not found] ` <cover.1449054142.git.joshua.lock@collabora.co.uk>
  2015-12-02 11:03   ` [PATCH 1/3] connman-conf: convert to systemd oneshot Joshua Lock
  2015-12-02 11:03   ` [PATCH 2/3] connman-conf: mark as allarch and not requiring default deps Joshua Lock
@ 2015-12-02 11:03   ` Joshua Lock
  2 siblings, 0 replies; 6+ messages in thread
From: Joshua Lock @ 2015-12-02 11:03 UTC (permalink / raw)
  To: openembedded-core

connman-conf is now a systemd oneshot so need not be sed'ed in to
the ConnMan service file.

Furthermore add connman-conf as RRECCOMENDS only for qemu machines.

This cleans up connman-conf so that it is not automatically installed
and unconditionally calling a script that doesn't exist for most
machines.

Note: this doesn't affect sysvinit where we provide the ConnMan
init script which checks for the presence of the wired-networking
script and if it exists executes it as part of the connman init.

[YOCTO #8399]

Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
---
 meta/recipes-connectivity/connman/connman.inc     | 5 -----
 meta/recipes-connectivity/connman/connman_1.30.bb | 3 +--
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc
index 6324d7a..40880ad 100644
--- a/meta/recipes-connectivity/connman/connman.inc
+++ b/meta/recipes-connectivity/connman/connman.inc
@@ -68,11 +68,6 @@ python __anonymous () {
 
 SYSTEMD_SERVICE_${PN} = "connman.service"
 SYSTEMD_SERVICE_${PN}-vpn = "connman-vpn.service"
-SYSTEMD_WIRED_SETUP = "ExecStartPre=-${datadir}/connman/wired-setup"
-
-do_compile_append() {
-	sed -i "s#ExecStart=#${SYSTEMD_WIRED_SETUP}\nExecStart=#" ${B}/src/connman.service
-}
 
 do_install_append() {
 	if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
diff --git a/meta/recipes-connectivity/connman/connman_1.30.bb b/meta/recipes-connectivity/connman/connman_1.30.bb
index 7d65ac9..7f7f5c3 100644
--- a/meta/recipes-connectivity/connman/connman_1.30.bb
+++ b/meta/recipes-connectivity/connman/connman_1.30.bb
@@ -10,5 +10,4 @@ SRC_URI  = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
 SRC_URI[md5sum] = "4a3efdbd6796922db9c6f66da57887fa"
 SRC_URI[sha256sum] = "5c5e464bacc9c27ed4e7269fb9b5059f07947f5be26433b59212133663ffa991"
 
-RRECOMMENDS_${PN} = "connman-conf"
-
+RRECOMMENDS_${PN}_qemuall = "connman-conf"
-- 
2.4.3



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/3] connman-conf: mark as allarch and not requiring default deps
  2015-12-02 11:03   ` [PATCH 2/3] connman-conf: mark as allarch and not requiring default deps Joshua Lock
@ 2015-12-02 21:19     ` Martin Jansa
  2015-12-03  9:18       ` Joshua Lock
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Jansa @ 2015-12-02 21:19 UTC (permalink / raw)
  To: Joshua Lock; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1394 bytes --]

On Wed, Dec 02, 2015 at 11:03:53AM +0000, Joshua Lock wrote:
> This recipe just installs some data files and thus is architecture
> independent and doesn't require a compiler and libc in its DEPENDS.

allarch.bbclass already sets INHIBIT_DEFAULT_DEPS

> Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
> ---
>  meta/recipes-connectivity/connman/connman-conf.bb | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-connectivity/connman/connman-conf.bb b/meta/recipes-connectivity/connman/connman-conf.bb
> index bef9237..1e119ad 100644
> --- a/meta/recipes-connectivity/connman/connman-conf.bb
> +++ b/meta/recipes-connectivity/connman/connman-conf.bb
> @@ -4,7 +4,9 @@ network interface for a qemu machine."
>  LICENSE = "GPLv2"
>  LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
>  
> -inherit systemd
> +inherit systemd allarch
> +
> +INHIBIT_DEFAULT_DEPS = "1"
>  
>  SRC_URI_append_qemuall = " file://wired.config \
>                             file://wired-setup \
> -- 
> 2.4.3
> 
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/3] connman-conf: mark as allarch and not requiring default deps
  2015-12-02 21:19     ` Martin Jansa
@ 2015-12-03  9:18       ` Joshua Lock
  0 siblings, 0 replies; 6+ messages in thread
From: Joshua Lock @ 2015-12-03  9:18 UTC (permalink / raw)
  To: Martin Jansa; +Cc: openembedded-core

On 02/12/15 21:19, Martin Jansa wrote:
> On Wed, Dec 02, 2015 at 11:03:53AM +0000, Joshua Lock wrote:
>> This recipe just installs some data files and thus is architecture
>> independent and doesn't require a compiler and libc in its DEPENDS.
>
> allarch.bbclass already sets INHIBIT_DEFAULT_DEPS

Indeed it does, thanks — I'll send a v2.

Regards,

Joshua

>
>> Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
>> ---
>>   meta/recipes-connectivity/connman/connman-conf.bb | 4 +++-
>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/meta/recipes-connectivity/connman/connman-conf.bb b/meta/recipes-connectivity/connman/connman-conf.bb
>> index bef9237..1e119ad 100644
>> --- a/meta/recipes-connectivity/connman/connman-conf.bb
>> +++ b/meta/recipes-connectivity/connman/connman-conf.bb
>> @@ -4,7 +4,9 @@ network interface for a qemu machine."
>>   LICENSE = "GPLv2"
>>   LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
>>
>> -inherit systemd
>> +inherit systemd allarch
>> +
>> +INHIBIT_DEFAULT_DEPS = "1"
>>
>>   SRC_URI_append_qemuall = " file://wired.config \
>>                              file://wired-setup \
>> --
>> 2.4.3
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-12-03  9:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-02 11:03 [PATCH 0/3] Clean up connman-conf Joshua Lock
     [not found] ` <cover.1449054142.git.joshua.lock@collabora.co.uk>
2015-12-02 11:03   ` [PATCH 1/3] connman-conf: convert to systemd oneshot Joshua Lock
2015-12-02 11:03   ` [PATCH 2/3] connman-conf: mark as allarch and not requiring default deps Joshua Lock
2015-12-02 21:19     ` Martin Jansa
2015-12-03  9:18       ` Joshua Lock
2015-12-02 11:03   ` [PATCH 3/3] connman: tidy up connman-conf usage Joshua Lock

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.