Analysing the journal of a custom distro running on target hardware I spotted: connman.service: Failed at step EXEC spawning /usr/lib/connman/wired-setup: No such file or directory Having done some digging I have discovered that wired-setup is a script from the connman-conf recipe that helps set up qemu machines running on the autobuilder, however the script is unconditionally inserted as an ExecPre for all targets. This means anyone building a systemd based OS with Yocto/OE Core gets this error for free unless they replace/modify the connman service. I think the default stance should be to ship metadata which is usable without errors for the use case of building an OS to run on target hardware, rather than the metadata being built to support the autobuilder use case first and foremost. Rather than hack the connman.service file to have an ExecPre couldn't the connman-conf recipe provide its own unit which uses the Before= option to ensure it's started before connman?
Yes, that's an excellent idea.
Currently testing the following pair of changes: https://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=joshuagl/connman&id=398ac8777eca62a95b8ea93e8dd4d8c4195ca15f https://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=joshuagl/connman&id=9285c0a1fc970d70ceb306b4d11e9bab472fcbd5 should possibly be squashed...
RFC patch series submitted http://lists.openembedded.org/pipermail/openembedded-core/2015-October/111536.html
v3 of the series, to address various review comments, has been submitted: http://lists.openembedded.org/pipermail/openembedded-core/2015-December/113933.html
Simpler v4 series posted based on feedback from Martin: http://lists.openembedded.org/pipermail/openembedded-core/2015-December/114241.html
v5 of canges has landed: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=79f4495244ceddb197879ae24c33f469285bbff2 http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=d74325e22ed81e49eec63335fd0f4b789f9dfc21
Verified on master: 152914f2983c5d69001de1d46ce99547fa1e75fe Steps: 1. test that qemu machines continue to work as before root@qemux86-64:~# journalctl | grep connman Feb 17 14:41:56 qemux86-64 connmand[422]: Connection Manager version 1.31 Feb 17 14:41:56 qemux86-64 connmand[422]: Adding configuration wired Feb 17 14:41:56 qemux86-64 connmand[422]: Checking loopback interface settings Feb 17 14:41:56 qemux86-64 connmand[422]: System hostname is qemux86-64 Feb 17 14:41:57 qemux86-64 connmand[422]: lo {newlink} index 1 address 00:00:00:00:00:00 mtu 65536 Feb 17 14:41:57 qemux86-64 connmand[422]: lo {newlink} index 1 operstate 0 <UNKNOWN> Feb 17 14:41:57 qemux86-64 connmand[422]: eth0 {create} index 2 type 1 <ETHER> Feb 17 14:41:57 qemux86-64 connmand[422]: eth0 {RX} 32 packets 5573 bytes Feb 17 14:41:57 qemux86-64 connmand[422]: eth0 {TX} 29 packets 4759 bytes Feb 17 14:41:57 qemux86-64 connmand[422]: eth0 {update} flags 69699 <UP,RUNNING,LOWER_UP> Feb 17 14:41:57 qemux86-64 connmand[422]: eth0 {newlink} index 2 address 52:54:00:12:34:56 mtu 1500 Feb 17 14:41:57 qemux86-64 connmand[422]: eth0 {newlink} index 2 operstate 6 <UP> Feb 17 14:41:58 qemux86-64 connmand[422]: Skipping disconnect of carrier, network is connecting. Feb 17 14:41:59 qemux86-64 connmand[422]: Adding interface eth0 [ ethernet ] Feb 17 14:41:59 qemux86-64 connmand[422]: sit0 {newlink} index 3 address 00:00:00:00:08:00 mtu 1480 Feb 17 14:41:59 qemux86-64 connmand[422]: sit0 {newlink} index 3 operstate 2 <DOWN> Feb 17 14:41:59 qemux86-64 connmand[422]: eth0 {add} address 192.168.7.2/24 label eth0 family 2 Feb 17 14:41:59 qemux86-64 connmand[422]: eth0 {add} route 192.168.7.1 gw 0.0.0.0 scope 253 <LINK> Feb 17 14:41:59 qemux86-64 connmand[422]: eth0 {add} route 8.8.8.8 gw 192.168.7.1 scope 0 <UNIVERSE> Feb 17 14:41:59 qemux86-64 connmand[422]: eth0 {add} route 0.0.0.0 gw 192.168.7.1 scope 0 <UNIVERSE> Feb 17 14:41:59 qemux86-64 connmand[422]: eth0 {add} route 8.8.8.8 gw 192.168.7.1 scope 0 <UNIVERSE> Feb 17 14:41:59 qemux86-64 connmand[422]: eth0 {add} route 192.168.7.0 gw 0.0.0.0 scope 253 <LINK> Feb 17 14:41:59 qemux86-64 connmand[422]: eth0 {add} route 192.168.7.1 gw 0.0.0.0 scope 253 <LINK> Feb 17 14:42:04 qemux86-64 connmand[422]: Online check failed for 0x726100 Wired 2. test that non-qemu machines no longer unconditionally try to run that script Feb 17 15:34:21 genericx86-64 connmand[457]: Connection Manager version 1.31 Feb 17 15:34:21 genericx86-64 connmand[457]: Checking loopback interface settings Feb 17 15:34:21 genericx86-64 connmand[457]: System hostname is genericx86-64 Feb 17 15:34:21 genericx86-64 connmand[457]: lo {newlink} index 1 address 00:00:00:00:00:00 mtu 65536 Feb 17 15:34:21 genericx86-64 connmand[457]: lo {newlink} index 1 operstate 0 <UNKNOWN> Feb 17 15:34:21 genericx86-64 connmand[457]: eno1 {create} index 2 type 1 <ETHER> Feb 17 15:34:21 genericx86-64 connmand[457]: eno1 {update} flags 4098 <DOWN> Feb 17 15:34:21 genericx86-64 connmand[457]: eno1 {newlink} index 2 address C0:3F:D5:69:19:C7 mtu 1500 Feb 17 15:34:21 genericx86-64 connmand[457]: eno1 {newlink} index 2 operstate 2 <DOWN> Feb 17 15:34:22 genericx86-64 connmand[457]: Adding interface eno1 [ ethernet ] Feb 17 15:34:22 genericx86-64 connmand[457]: sit0 {newlink} index 3 address 00:00:00:00:08:00 mtu 1480 Feb 17 15:34:22 genericx86-64 connmand[457]: sit0 {newlink} index 3 operstate 2 <DOWN> Feb 17 15:34:22 genericx86-64 connmand[457]: eno1 {update} flags 36867 <UP> Feb 17 15:34:22 genericx86-64 connmand[457]: eno1 {newlink} index 2 address C0:3F:D5:69:19:C7 mtu 1500 Feb 17 15:34:22 genericx86-64 connmand[457]: eno1 {newlink} index 2 operstate 2 <DOWN> Feb 17 15:34:25 genericx86-64 connmand[457]: eno1 {add} route ff00:: gw :: scope 0 <UNIVERSE> Feb 17 15:34:25 genericx86-64 connmand[457]: eno1 {add} route fe80:: gw :: scope 0 <UNIVERSE> Feb 17 15:34:25 genericx86-64 connmand[457]: eno1 {update} flags 102467 <UP,RUNNING,LOWER_UP> Feb 17 15:34:25 genericx86-64 connmand[457]: eno1 {newlink} index 2 address C0:3F:D5:69:19:C7 mtu 1500 Feb 17 15:34:25 genericx86-64 connmand[457]: eno1 {newlink} index 2 operstate 6 <UP> Feb 17 15:34:25 genericx86-64 connmand[457]: Skipping disconnect of carrier, network is connecting. Feb 17 15:35:04 genericx86-64 connmand[457]: eno1 {add} address 169.254.15.204/16 label eno1 family 2 Feb 17 15:35:04 genericx86-64 connmand[457]: eno1 {add} route 169.254.0.0 gw 0.0.0.0 scope 253 <LINK> Feb 17 15:35:04 genericx86-64 connmand[457]: eno1 {add} route 0.0.0.0 gw 0.0.0.0 scope 253 <LINK> No connman errors. Also the eth0 device on the QEMU machine has values matching http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-connectivity/connman/connman-conf/qemuall/wired.config and that eth0 on the non-qemu machine doesn't: NUC: eno1 Link encap:Ethernet HWaddr C0:3F:D5:69:19:C7 qemu: eth0 Link encap:Ethernet HWaddr 52:54:00:12:34:56