summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlbonn <lbonn@users.noreply.github.com>2019-08-01 16:43:12 +0200
committerGitHub <noreply@github.com>2019-08-01 16:43:12 +0200
commit66a90135c7621d1337822bdee751e85ac0520e75 (patch)
tree4f235be811787010c82e1444af62ba6162b1c48c
parente4dd74565f429b576e84972d12cc1ae2048be119 (diff)
parent9d96af116c0872bf198ea331187371eb2fc89979 (diff)
downloadmeta-updater-66a90135c7621d1337822bdee751e85ac0520e75.tar.gz
Connman fix thud (#576)
Connman fix thud
-rw-r--r--recipes-connectivity/connman/connman_%.bbappend5
-rw-r--r--recipes-connectivity/connman/files/0001-tmpfiles-script-do-not-create-the-resolv.conf-symlin.patch22
-rw-r--r--recipes-connectivity/networkd-dhcp-conf/files/clean-connman-symlink.service11
-rw-r--r--recipes-connectivity/networkd-dhcp-conf/files/resolvconf-clean14
-rw-r--r--recipes-connectivity/networkd-dhcp-conf/networkd-dhcp-conf.bb22
5 files changed, 71 insertions, 3 deletions
diff --git a/recipes-connectivity/connman/connman_%.bbappend b/recipes-connectivity/connman/connman_%.bbappend
index b3633cc..08ec832 100644
--- a/recipes-connectivity/connman/connman_%.bbappend
+++ b/recipes-connectivity/connman/connman_%.bbappend
@@ -1 +1,6 @@
1RPROVIDES_${PN} += "virtual/network-configuration" 1RPROVIDES_${PN} += "virtual/network-configuration"
2
3# patch to not create the resolv.conf symlink at run-time, as it's already
4# handled in the recipe and messes up with ostree
5FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
6SRC_URI += "file://0001-tmpfiles-script-do-not-create-the-resolv.conf-symlin.patch"
diff --git a/recipes-connectivity/connman/files/0001-tmpfiles-script-do-not-create-the-resolv.conf-symlin.patch b/recipes-connectivity/connman/files/0001-tmpfiles-script-do-not-create-the-resolv.conf-symlin.patch
new file mode 100644
index 0000000..9b4a78c
--- /dev/null
+++ b/recipes-connectivity/connman/files/0001-tmpfiles-script-do-not-create-the-resolv.conf-symlin.patch
@@ -0,0 +1,22 @@
1From 9e724a61f015304c9d72d829a66178d20e3fa980 Mon Sep 17 00:00:00 2001
2From: Laurent Bonnans <laurent.bonnans@here.com>
3Date: Wed, 31 Jul 2019 18:15:47 +0200
4Subject: [PATCH] tmpfiles script: do not create the resolv.conf symlink
5
6It's handled by yocto in our case
7
8Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
9---
10 scripts/connman_resolvconf.conf.in | 1 -
11 1 file changed, 1 deletion(-)
12
13diff --git a/scripts/connman_resolvconf.conf.in b/scripts/connman_resolvconf.conf.in
14index 2d61dfe1..8a7d3071 100644
15--- a/scripts/connman_resolvconf.conf.in
16+++ b/scripts/connman_resolvconf.conf.in
17@@ -1,2 +1 @@
18 d @runstatedir@/connman - - - -
19-L+ /etc/resolv.conf - - - - @runstatedir@/connman/resolv.conf
20--
212.20.1
22
diff --git a/recipes-connectivity/networkd-dhcp-conf/files/clean-connman-symlink.service b/recipes-connectivity/networkd-dhcp-conf/files/clean-connman-symlink.service
new file mode 100644
index 0000000..8af8263
--- /dev/null
+++ b/recipes-connectivity/networkd-dhcp-conf/files/clean-connman-symlink.service
@@ -0,0 +1,11 @@
1[Unit]
2Description=Clean up bogus symlinked resolv.conf
3Before=network-pre.target
4Wants=network-pre.target
5
6[Service]
7Type=oneshot
8ExecStart=/usr/sbin/resolvconf-clean
9
10[Install]
11WantedBy=multi-user.target
diff --git a/recipes-connectivity/networkd-dhcp-conf/files/resolvconf-clean b/recipes-connectivity/networkd-dhcp-conf/files/resolvconf-clean
new file mode 100644
index 0000000..89c7e90
--- /dev/null
+++ b/recipes-connectivity/networkd-dhcp-conf/files/resolvconf-clean
@@ -0,0 +1,14 @@
1#!/bin/sh
2
3set -e
4
5if [ ! -L /etc/resolv.conf ]; then
6 exit 0
7fi
8
9# 'readlink -f' will fail if the symlink doesn't resolve to an existing path
10if readlink /etc/resolv.conf | grep -q connman; then
11 echo "Replacing resolv.conf symlink: $(readlink /etc/resolv.conf) to /etc/resolv-conf.systemd"
12 rm /etc/resolv.conf
13 ln -s /etc/resolv-conf.systemd /etc/resolv.conf
14fi
diff --git a/recipes-connectivity/networkd-dhcp-conf/networkd-dhcp-conf.bb b/recipes-connectivity/networkd-dhcp-conf/networkd-dhcp-conf.bb
index 0700ac6..b6076cd 100644
--- a/recipes-connectivity/networkd-dhcp-conf/networkd-dhcp-conf.bb
+++ b/recipes-connectivity/networkd-dhcp-conf/networkd-dhcp-conf.bb
@@ -8,21 +8,37 @@ inherit allarch systemd
8 8
9RPROVIDES_${PN} = "virtual/network-configuration" 9RPROVIDES_${PN} = "virtual/network-configuration"
10 10
11SRC_URI_append = " file://20-wired-dhcp.network" 11SRC_URI = " \
12 file://20-wired-dhcp.network \
13 file://resolvconf-clean \
14 file://clean-connman-symlink.service \
15 "
12PR = "r1" 16PR = "r1"
13 17
14RDEPENDS_${PN} = "systemd" 18RDEPENDS_${PN} = "systemd"
19RCONFLICTS_${PN} = "connman"
15 20
16S = "${WORKDIR}" 21S = "${WORKDIR}"
17 22
18PACKAGE_ARCH = "${MACHINE_ARCH}" 23PACKAGE_ARCH = "${MACHINE_ARCH}"
19 24
20FILES_${PN} = "${systemd_unitdir}/network/*" 25FILES_${PN} = " \
26 ${systemd_unitdir}/network/* \
27 ${sbindir}/resolvconf-clean \
28 ${systemd_unitdir}/system/clean-connman-symlink.service \
29 "
30
31SYSTEMD_SERVICE_${PN} = "clean-connman-symlink.service"
21 32
22DEV_MATCH_DIRECTIVE ?= "Name=en*" 33DEV_MATCH_DIRECTIVE ?= "Name=en*"
23 34
24do_install() { 35do_install() {
25 install -d ${D}/${systemd_unitdir}/network 36 install -d ${D}/${systemd_unitdir}/network
26 install -m 0644 ${WORKDIR}/20-wired-dhcp.network ${D}/${systemd_unitdir}/network 37 install -m 0644 ${WORKDIR}/20-wired-dhcp.network ${D}${systemd_unitdir}/network
27 sed -i -e 's|@MATCH_DIRECTIVE@|${DEV_MATCH_DIRECTIVE}|g' ${D}${systemd_unitdir}/network/20-wired-dhcp.network 38 sed -i -e 's|@MATCH_DIRECTIVE@|${DEV_MATCH_DIRECTIVE}|g' ${D}${systemd_unitdir}/network/20-wired-dhcp.network
39
40 install -d ${D}${sbindir}
41 install -m 0755 ${WORKDIR}/resolvconf-clean ${D}${sbindir}/resolvconf-clean
42 install -d ${D}${systemd_unitdir}/system
43 install -m 0644 ${WORKDIR}/clean-connman-symlink.service ${D}${systemd_unitdir}/system/clean-connman-symlink.service
28} 44}