diff options
| author | Patrick Vacek <patrickvacek@gmail.com> | 2019-08-02 09:07:49 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-02 09:07:49 +0200 |
| commit | f348e80edd3d5a652bf54e59b59442e912986707 (patch) | |
| tree | cf866e74a7fba1730a7257681d32c95c0ed6cb5e | |
| parent | cf559d5857242b458720efa781a8e9a2127b1e1c (diff) | |
| parent | 8b5e97cb8c8a948e754d83c651013467942d5a5f (diff) | |
| download | meta-updater-f348e80edd3d5a652bf54e59b59442e912986707.tar.gz | |
Merge pull request #574 from advancedtelematic/connman-fix-master
Connman fix master
7 files changed, 75 insertions, 5 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 @@ | |||
| 1 | RPROVIDES_${PN} += "virtual/network-configuration" | 1 | RPROVIDES_${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 | ||
| 5 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
| 6 | SRC_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 @@ | |||
| 1 | From 9e724a61f015304c9d72d829a66178d20e3fa980 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Laurent Bonnans <laurent.bonnans@here.com> | ||
| 3 | Date: Wed, 31 Jul 2019 18:15:47 +0200 | ||
| 4 | Subject: [PATCH] tmpfiles script: do not create the resolv.conf symlink | ||
| 5 | |||
| 6 | It's handled by yocto in our case | ||
| 7 | |||
| 8 | Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com> | ||
| 9 | --- | ||
| 10 | scripts/connman_resolvconf.conf.in | 1 - | ||
| 11 | 1 file changed, 1 deletion(-) | ||
| 12 | |||
| 13 | diff --git a/scripts/connman_resolvconf.conf.in b/scripts/connman_resolvconf.conf.in | ||
| 14 | index 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 | -- | ||
| 21 | 2.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] | ||
| 2 | Description=Clean up bogus symlinked resolv.conf | ||
| 3 | Before=network-pre.target | ||
| 4 | Wants=network-pre.target | ||
| 5 | |||
| 6 | [Service] | ||
| 7 | Type=oneshot | ||
| 8 | ExecStart=/usr/sbin/resolvconf-clean | ||
| 9 | |||
| 10 | [Install] | ||
| 11 | WantedBy=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 | |||
| 3 | set -e | ||
| 4 | |||
| 5 | if [ ! -L /etc/resolv.conf ]; then | ||
| 6 | exit 0 | ||
| 7 | fi | ||
| 8 | |||
| 9 | # 'readlink -f' will fail if the symlink doesn't resolve to an existing path | ||
| 10 | if 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 | ||
| 14 | fi | ||
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 | ||
| 9 | RPROVIDES_${PN} = "virtual/network-configuration" | 9 | RPROVIDES_${PN} = "virtual/network-configuration" |
| 10 | 10 | ||
| 11 | SRC_URI_append = " file://20-wired-dhcp.network" | 11 | SRC_URI = " \ |
| 12 | file://20-wired-dhcp.network \ | ||
| 13 | file://resolvconf-clean \ | ||
| 14 | file://clean-connman-symlink.service \ | ||
| 15 | " | ||
| 12 | PR = "r1" | 16 | PR = "r1" |
| 13 | 17 | ||
| 14 | RDEPENDS_${PN} = "systemd" | 18 | RDEPENDS_${PN} = "systemd" |
| 19 | RCONFLICTS_${PN} = "connman" | ||
| 15 | 20 | ||
| 16 | S = "${WORKDIR}" | 21 | S = "${WORKDIR}" |
| 17 | 22 | ||
| 18 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 23 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 19 | 24 | ||
| 20 | FILES_${PN} = "${systemd_unitdir}/network/*" | 25 | FILES_${PN} = " \ |
| 26 | ${systemd_unitdir}/network/* \ | ||
| 27 | ${sbindir}/resolvconf-clean \ | ||
| 28 | ${systemd_unitdir}/system/clean-connman-symlink.service \ | ||
| 29 | " | ||
| 30 | |||
| 31 | SYSTEMD_SERVICE_${PN} = "clean-connman-symlink.service" | ||
| 21 | 32 | ||
| 22 | DEV_MATCH_DIRECTIVE ?= "Name=en*" | 33 | DEV_MATCH_DIRECTIVE ?= "Name=en*" |
| 23 | 34 | ||
| 24 | do_install() { | 35 | do_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 | } |
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index e9efa35..18b1a7d 100644 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb | |||
| @@ -31,7 +31,7 @@ SRC_URI = " \ | |||
| 31 | SRC_URI[md5sum] = "e104ccd4f32e52571a5fc0e5042db050" | 31 | SRC_URI[md5sum] = "e104ccd4f32e52571a5fc0e5042db050" |
| 32 | SRC_URI[sha256sum] = "c590be1a57523bfe097af82279eda5c97cf40ae47fb27162cf33c469702c8a9b" | 32 | SRC_URI[sha256sum] = "c590be1a57523bfe097af82279eda5c97cf40ae47fb27162cf33c469702c8a9b" |
| 33 | 33 | ||
| 34 | SRCREV = "17c3713fb3085fe5459ac0e8244a2047d55cb7ec" | 34 | SRCREV = "b4eb8e5af2dde54988a9ba2a760d58319dc9ce63" |
| 35 | BRANCH ?= "master" | 35 | BRANCH ?= "master" |
| 36 | 36 | ||
| 37 | S = "${WORKDIR}/git" | 37 | S = "${WORKDIR}/git" |
diff --git a/scripts/qemucommand.py b/scripts/qemucommand.py index 3045b45..6f744e2 100644 --- a/scripts/qemucommand.py +++ b/scripts/qemucommand.py | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | from os.path import exists, join, realpath, abspath | 1 | from os.path import exists, isdir, join, realpath, abspath |
| 2 | from os import listdir | 2 | from os import listdir |
| 3 | import random | 3 | import random |
| 4 | import socket | 4 | import socket |
| @@ -42,6 +42,8 @@ class QemuCommand(object): | |||
| 42 | if args.machine: | 42 | if args.machine: |
| 43 | self.machine = args.machine | 43 | self.machine = args.machine |
| 44 | else: | 44 | else: |
| 45 | if not isdir(args.dir): | ||
| 46 | raise ValueError("Directory %s does not exist, please specify a --machine or a valid images directory" % args.dir) | ||
| 45 | machines = listdir(args.dir) | 47 | machines = listdir(args.dir) |
| 46 | if len(machines) == 1: | 48 | if len(machines) == 1: |
| 47 | self.machine = machines[0] | 49 | self.machine = machines[0] |
