diff options
author | Maxin B. John <maxin.john@intel.com> | 2017-06-12 18:10:22 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-06-14 14:53:57 +0100 |
commit | 4a7ce464fd9ad0b945d63cd31dc74c18c6d0fdc9 (patch) | |
tree | 1334165b64fa5406ab88f0595cdfe0a03c5dcde8 /meta | |
parent | 00e4662e55f66570cae29240c22b4d74b79d3ca5 (diff) | |
download | poky-4a7ce464fd9ad0b945d63cd31dc74c18c6d0fdc9.tar.gz |
connman: correct the systemd boot in read only rootfs
connman fails to start in systemd based read-only images while creating links:
Jun 08 12:53:56 qemux86-64 systemd[1]: Starting Create Volatile Files
and Directories...
Jun 08 12:53:56 qemux86-64 systemd-tmpfiles[366]:
[[0;1;31msymlink(/var/run/connman/resolv.conf, /etc/resolv.conf) failed:
Read-only file system[[0m
Fix this failure and make connman co-exist with systemd-resolved.
(From OE-Core rev: 732e1f74bb9f5ecc98b29197f6bcab117710adab)
Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
3 files changed, 44 insertions, 1 deletions
diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc index cc2d46935d..ab18f2fe01 100644 --- a/meta/recipes-connectivity/connman/connman.inc +++ b/meta/recipes-connectivity/connman/connman.inc | |||
@@ -13,7 +13,7 @@ LICENSE = "GPLv2" | |||
13 | LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ | 13 | LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ |
14 | file://src/main.c;beginline=1;endline=20;md5=486a279a6ab0c8d152bcda3a5b5edc36" | 14 | file://src/main.c;beginline=1;endline=20;md5=486a279a6ab0c8d152bcda3a5b5edc36" |
15 | 15 | ||
16 | inherit autotools pkgconfig systemd update-rc.d bluetooth | 16 | inherit autotools pkgconfig systemd update-rc.d bluetooth update-alternatives |
17 | 17 | ||
18 | DEPENDS = "dbus glib-2.0 ppp readline" | 18 | DEPENDS = "dbus glib-2.0 ppp readline" |
19 | 19 | ||
@@ -69,6 +69,11 @@ SYSTEMD_SERVICE_${PN} = "connman.service" | |||
69 | SYSTEMD_SERVICE_${PN}-vpn = "connman-vpn.service" | 69 | SYSTEMD_SERVICE_${PN}-vpn = "connman-vpn.service" |
70 | SYSTEMD_SERVICE_${PN}-wait-online = "connman-wait-online.service" | 70 | SYSTEMD_SERVICE_${PN}-wait-online = "connman-wait-online.service" |
71 | 71 | ||
72 | ALTERNATIVE_PRIORITY = "100" | ||
73 | ALTERNATIVE_${PN} ="resolv-conf" | ||
74 | ALTERNATIVE_TARGET[resolv-conf] = "${sysconfdir}/resolv-conf.connman" | ||
75 | ALTERNATIVE_LINK_NAME[resolv-conf] = "${sysconfdir}/resolv.conf" | ||
76 | |||
72 | do_install_append() { | 77 | do_install_append() { |
73 | if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then | 78 | if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then |
74 | install -d ${D}${sysconfdir}/init.d | 79 | install -d ${D}${sysconfdir}/init.d |
@@ -89,6 +94,14 @@ do_install_append() { | |||
89 | # Automake 1.12 won't install empty directories, but we need the | 94 | # Automake 1.12 won't install empty directories, but we need the |
90 | # plugins directory to be present for ownership | 95 | # plugins directory to be present for ownership |
91 | mkdir -p ${D}${libdir}/connman/plugins | 96 | mkdir -p ${D}${libdir}/connman/plugins |
97 | |||
98 | # For read-only filesystem, do not create links during bootup | ||
99 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then | ||
100 | if ${@bb.utils.contains('IMAGE_FEATURES','read-only-rootfs','true','false',d)}; then | ||
101 | echo "d /var/run/connman - - - -" > ${D}${sysconfdir}/tmpfiles.d/connman_resolvconf.conf | ||
102 | fi | ||
103 | ln -sf ../run/connman/resolv.conf ${D}${sysconfdir}/resolv-conf.connman | ||
104 | fi | ||
92 | } | 105 | } |
93 | 106 | ||
94 | # These used to be plugins, but now they are core | 107 | # These used to be plugins, but now they are core |
diff --git a/meta/recipes-connectivity/connman/connman/0001-connman.service-stop-systemd-resolved-when-we-use-co.patch b/meta/recipes-connectivity/connman/connman/0001-connman.service-stop-systemd-resolved-when-we-use-co.patch new file mode 100644 index 0000000000..8e2e0bd02d --- /dev/null +++ b/meta/recipes-connectivity/connman/connman/0001-connman.service-stop-systemd-resolved-when-we-use-co.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From 9f70b94ebf18f52c115634642652830fa77f27a1 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Maxin B. John" <maxin.john@intel.com> | ||
3 | Date: Mon, 12 Jun 2017 16:52:39 +0300 | ||
4 | Subject: [PATCH] connman.service: stop systemd-resolved when we use connman | ||
5 | |||
6 | Stop systemd-resolved service when we use connman as network manager. | ||
7 | |||
8 | Upstream-Status: Inappropriate [configuration] | ||
9 | |||
10 | Signed-off-by: Maxin B. John <maxin.john@intel.com> | ||
11 | --- | ||
12 | src/connman.service.in | 1 + | ||
13 | 1 file changed, 1 insertion(+) | ||
14 | |||
15 | diff --git a/src/connman.service.in b/src/connman.service.in | ||
16 | index 9f5c10f..dab48bc 100644 | ||
17 | --- a/src/connman.service.in | ||
18 | +++ b/src/connman.service.in | ||
19 | @@ -6,6 +6,7 @@ RequiresMountsFor=@localstatedir@/lib/connman | ||
20 | After=dbus.service network-pre.target systemd-sysusers.service | ||
21 | Before=network.target multi-user.target shutdown.target | ||
22 | Wants=network.target | ||
23 | +Conflicts=systemd-resolved.service | ||
24 | |||
25 | [Service] | ||
26 | Type=dbus | ||
27 | -- | ||
28 | 2.4.0 | ||
29 | |||
diff --git a/meta/recipes-connectivity/connman/connman_1.34.bb b/meta/recipes-connectivity/connman/connman_1.34.bb index 5d0f242150..d520568d46 100644 --- a/meta/recipes-connectivity/connman/connman_1.34.bb +++ b/meta/recipes-connectivity/connman/connman_1.34.bb | |||
@@ -3,6 +3,7 @@ require connman.inc | |||
3 | SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \ | 3 | SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \ |
4 | file://0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch \ | 4 | file://0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch \ |
5 | file://0001-firewall-nftables-fix-build-with-libnftnl-1.0.7.patch \ | 5 | file://0001-firewall-nftables-fix-build-with-libnftnl-1.0.7.patch \ |
6 | file://0001-connman.service-stop-systemd-resolved-when-we-use-co.patch \ | ||
6 | file://connman \ | 7 | file://connman \ |
7 | file://no-version-scripts.patch \ | 8 | file://no-version-scripts.patch \ |
8 | file://includes.patch \ | 9 | file://includes.patch \ |