From 73d0471162a54c1737db6622781a3713a8bad61f Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Wed, 15 Jan 2020 11:15:05 +0100 Subject: gitla-ci.yml: Bring in line with other branches. There were some small differences, probably due to this coming from the master version, and I guess we never explicitly compared it to the others. Signed-off-by: Patrick Vacek --- .gitlab-ci.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c201e3b..141a9f3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -43,10 +43,6 @@ Build core-image-minimal: variables: TEST_BUILD_DIR: 'build-core-image-minimal' BITBAKE_TARGETS: 'core-image-minimal' - artifacts: - name: "core-image-minimal_$CI_COMMIT_REF_SLUG" - paths: - - $TEST_BUILD_DIR/tmp/deploy/images/*/core-image-minimal* except: - pushes @@ -58,10 +54,6 @@ Build core-image-minimal (rpi): TEST_BUILD_DIR: 'build-core-image-minimal-rpi' BITBAKE_TARGETS: 'core-image-minimal' TEST_MACHINE: 'raspberrypi3' - artifacts: - name: "core-image-minimal-rpi_$CI_COMMIT_REF_SLUG" - paths: - - $TEST_BUILD_DIR/tmp/deploy/images/*/core-image-minimal* except: - pushes @@ -94,9 +86,8 @@ Oe-selftest rpi: OE_SELFTESTS: 'updater_raspberrypi' except: - pushes - only: - variables: - - $OE_RPI + +# Not run by default Ptest qemux86_64: extends: .oe-selftest -- cgit v1.2.3-54-g00ecf From 008e95a59b6aadbceccec35eb09a8f35a3cd62c9 Mon Sep 17 00:00:00 2001 From: Ming Liu Date: Tue, 31 Dec 2019 21:32:52 +0100 Subject: meta: add python to HOSTTOOLS_NONFATAL repo is requiring python to be able to work correctly, add python to HOSTTOOLS_NONFATAL as well. image_repo_manifest is actually a image bbclass, move it to IMAGE_CLASSES instead of inheriting it in sota.bbclass. Signed-off-by: Ming Liu --- classes/image_repo_manifest.bbclass | 2 +- classes/sota.bbclass | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/classes/image_repo_manifest.bbclass b/classes/image_repo_manifest.bbclass index c2e7056..0b311bd 100644 --- a/classes/image_repo_manifest.bbclass +++ b/classes/image_repo_manifest.bbclass @@ -9,7 +9,7 @@ # For more information, see: # https://web.archive.org/web/20161224194009/https://wiki.cyanogenmod.org/w/Doc:_Using_manifests -HOSTTOOLS_NONFATAL += " repo " +HOSTTOOLS_NONFATAL += "repo python" # Write build information to target filesystem buildinfo_manifest () { diff --git a/classes/sota.bbclass b/classes/sota.bbclass index 4422741..7bf17a4 100644 --- a/classes/sota.bbclass +++ b/classes/sota.bbclass @@ -8,7 +8,7 @@ SOTA_DEPLOY_CREDENTIALS ?= "1" SOTA_HARDWARE_ID ??= "${MACHINE}" IMAGE_INSTALL_append_sota = " ostree os-release ${SOTA_CLIENT} ${SOTA_CLIENT_PROV}" -IMAGE_CLASSES += " image_types_ostree image_types_ota" +IMAGE_CLASSES += " image_types_ostree image_types_ota image_repo_manifest" IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'ostreepush garagesign garagecheck ota-ext4 wic', ' ', d)}" IMAGE_FSTYPES += "${@bb.utils.contains('BUILD_OSTREE_TARBALL', '1', 'ostree.tar.bz2', ' ', d)}" @@ -53,4 +53,4 @@ SOTA_MACHINE_freedom-u540 ?= "freedom-u540" SOTA_OVERRIDES_BLACKLIST = "ostree ota" SOTA_REQUIRED_VARIABLES = "OSTREE_REPO OSTREE_BRANCHNAME OSTREE_OSNAME OSTREE_BOOTLOADER OSTREE_BOOT_PARTITION GARAGE_SIGN_REPO GARAGE_TARGET_NAME" -inherit sota_sanity sota_${SOTA_MACHINE} image_repo_manifest +inherit sota_sanity sota_${SOTA_MACHINE} -- cgit v1.2.3-54-g00ecf From e9aaea1cdad182401e99d5061c724d2e6f84bc9a Mon Sep 17 00:00:00 2001 From: Laurent Bonnans Date: Wed, 8 Jan 2020 12:24:37 +0100 Subject: Allow dots in ostree branch names and hw ids Signed-off-by: Laurent Bonnans --- classes/sota_sanity.bbclass | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/classes/sota_sanity.bbclass b/classes/sota_sanity.bbclass index 1339fb3..74973eb 100644 --- a/classes/sota_sanity.bbclass +++ b/classes/sota_sanity.bbclass @@ -14,10 +14,10 @@ def sota_check_variables_validity(status, d): import re import os.path - if d.getVar("OSTREE_BRANCHNAME") and re.match("^[a-zA-Z0-9_-]*$", d.getVar("OSTREE_BRANCHNAME")) is None: - status.addresult("OSTREE_BRANCHNAME Should only contain characters from the character set [a-zA-Z0-9_-].\n") - if d.getVar("SOTA_HARDWARE_ID") and re.match("^[a-zA-Z0-9_-]*$", d.getVar("SOTA_HARDWARE_ID")) is None: - status.addresult("SOTA_HARDWARE_ID Should only contain characters from the character set [a-zA-Z0-9_-].\n") + if d.getVar("OSTREE_BRANCHNAME") and re.match("^[a-zA-Z0-9._-]*$", d.getVar("OSTREE_BRANCHNAME")) is None: + status.addresult("OSTREE_BRANCHNAME Should only contain characters from the character set [a-zA-Z0-9._-].\n") + if d.getVar("SOTA_HARDWARE_ID") and re.match("^[a-zA-Z0-9._-]*$", d.getVar("SOTA_HARDWARE_ID")) is None: + status.addresult("SOTA_HARDWARE_ID Should only contain characters from the character set [a-zA-Z0-9._-].\n") if d.getVar("SOTA_CLIENT_FEATURES") is not None: for feat in d.getVar("SOTA_CLIENT_FEATURES").split(' '): if feat not in ("hsm", "serialcan", "ubootenv", ""): -- cgit v1.2.3-54-g00ecf From f08f6e504c3f876414d49f1eca90eedc14dbfd18 Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Wed, 8 Jan 2020 16:45:26 +0100 Subject: README: bump copyright to 2020. Signed-off-by: Patrick Vacek --- README.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.adoc b/README.adoc index 4cccc7b..1f18af6 100644 --- a/README.adoc +++ b/README.adoc @@ -71,6 +71,6 @@ Get help on common problems. == License -This code is licensed under the link:COPYING.MIT[MIT license], a copy of which can be found in this repository. All code is copyright HERE Europe B.V., 2016-2019. +This code is licensed under the link:COPYING.MIT[MIT license], a copy of which can be found in this repository. All code is copyright HERE Europe B.V., 2016-2020. We require that contributors accept the terms of Linux Foundation's link:https://developercertificate.org/[Developer Certificate of Origin]. Please see the https://github.com/advancedtelematic/aktualizr/blob/master/CONTRIBUTING.md[contribution instructions of aktualizr] for more information. -- cgit v1.2.3-54-g00ecf From a6718feb7943fcffcc5bcc7f00d7618e4bc099a0 Mon Sep 17 00:00:00 2001 From: Laurent Bonnans Date: Wed, 8 Jan 2020 17:07:25 +0100 Subject: Adapt to shared libraries changes in aktualizr Signed-off-by: Laurent Bonnans --- recipes-sota/aktualizr/aktualizr_git.bb | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index bd9c3f8..2e91a7b 100644 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=815ca599c9df247a0c7f619bab123dad" DEPENDS = "boost curl openssl libarchive libsodium sqlite3 asn1c-native" DEPENDS_append = "${@bb.utils.contains('PTEST_ENABLED', '1', ' coreutils-native net-tools-native ostree-native aktualizr-native ', '', d)}" -RDEPENDS_${PN}_class-target = "aktualizr-configs aktualizr-hwid lshw" +RDEPENDS_${PN}_class-target = "${PN}-configs ${PN}-hwid lshw" RDEPENDS_${PN}-host-tools = "aktualizr aktualizr-cert-provider ${@bb.utils.contains('PACKAGECONFIG', 'sota-tools', 'garage-deploy garage-push', '', d)}" RDEPENDS_${PN}-ptest += "bash cmake curl net-tools python3-core python3-misc python3-modules openssl-bin sqlite3 valgrind" @@ -30,7 +30,7 @@ SRC_URI = " \ SRC_URI[garagesign.md5sum] = "3e1ae6d49cc66fda37cef47f849d9609" SRC_URI[garagesign.sha256sum] = "8d49b83efa222db2f092ee14348459ee1bfd048552b57c3cb5ab48db8e347d82" -SRCREV = "6633d0d0e6353fdf8970001dc8da70e6a28203cd" +SRCREV = "bc54d32b8d4e97409908e700b9615fef2ca7ced2" BRANCH ?= "master" S = "${WORKDIR}/git" @@ -140,7 +140,7 @@ python split_hosttools_packages () { PACKAGES_DYNAMIC = "^aktualizr-.* ^garage-.*" -PACKAGES =+ "${PN}-resource-control ${PN}-examples ${PN}-secondary ${PN}-configs ${PN}-host-tools" +PACKAGES =+ "${PN}-host-tools ${PN}-lib ${PN}-resource-control ${PN}-configs ${PN}-examples ${PN}-secondary ${PN}-secondary-lib ${PN}-sotatools-lib" ALLOW_EMPTY_${PN}-host-tools = "1" @@ -150,6 +150,10 @@ FILES_${PN} = " \ ${systemd_unitdir}/system/aktualizr.service \ " +FILES_${PN}-lib = " \ + ${libdir}/libaktualizr_lib.so \ + " + FILES_${PN}-resource-control = " \ ${systemd_system_unitdir}/aktualizr.service.d/10-resource-control.conf \ " @@ -169,6 +173,16 @@ FILES_${PN}-secondary = " \ ${systemd_unitdir}/system/aktualizr-secondary.service \ " +FILES_${PN}-secondary-lib = " \ + ${libdir}/libaktualizr_secondary_lib.so \ + " + +FILES_${PN}-sotatools-lib = " \ + ${libdir}/libsota_tools_lib.so \ + " + +FILES_${PN}-dev = "" + BBCLASSEXTEND = "native" # vim:set ts=4 sw=4 sts=4 expandtab: -- cgit v1.2.3-54-g00ecf From cfa6937bd1e83a89f012bb71cdc3e53b7a874f9c Mon Sep 17 00:00:00 2001 From: Kostiantyn Bushko Date: Tue, 14 Jan 2020 00:08:51 +0200 Subject: run-qemu-ota: passing hostfwd as command line argument Signed-off-by: Kostiantyn Bushko --- scripts/qemucommand.py | 9 +++++++++ scripts/run-qemu-ota | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/scripts/qemucommand.py b/scripts/qemucommand.py index cef434d..85b12c6 100644 --- a/scripts/qemucommand.py +++ b/scripts/qemucommand.py @@ -42,6 +42,8 @@ class QemuCommand(object): def __init__(self, args): self.dry_run = args.dry_run self.overlay = args.overlay + self.host_fwd = None + if args.machine: self.machine = args.machine else: @@ -125,10 +127,17 @@ class QemuCommand(object): self.pcap = args.pcap self.secondary_network = args.secondary_network + # Append additional port forwarding to QEMU command line. + if args.host_forward: + self.host_fwd = args.host_forward + def command_line(self): netuser = 'user,hostfwd=tcp:0.0.0.0:%d-:22,restrict=off' % self.ssh_port if self.gdb: netuser += ',hostfwd=tcp:0.0.0.0:2159-:2159' + if self.host_fwd: + netuser += ",hostfwd=" + self.host_fwd + cmdline = [ "qemu-system-x86_64", "-bios", self.bios diff --git a/scripts/run-qemu-ota b/scripts/run-qemu-ota index e2a4103..5652797 100755 --- a/scripts/run-qemu-ota +++ b/scripts/run-qemu-ota @@ -39,6 +39,12 @@ def main(): help='Give the image a second network card connected to a virtual network. ' + 'This can be used to test Uptane Primary/Secondary communication.') parser.add_argument('-n', '--dry-run', help='Print qemu command line rather then run it', action='store_true') + parser.add_argument('--host-forward', + help='Redirect incoming TCP or UDP connections to the host port. ' + 'Example forwarding guest port 10050 to the host port 10555:' + '--host-forward="tcp:0.0.0.0:10556-:10050". ' + 'For more details please refer to QEMU man page, option . ' + 'https://manpages.debian.org/testing/qemu-system-x86/qemu-system-x86_64.1.en.html') args = parser.parse_args() if args.overlay and not exists(args.overlay) and dirname(args.overlay) and not dirname(args.overlay) == '.': -- cgit v1.2.3-54-g00ecf From ddfca3b43259e6306ad6dfdbfbb1b902137d5525 Mon Sep 17 00:00:00 2001 From: Kostiantyn Bushko Date: Tue, 14 Jan 2020 11:23:32 +0200 Subject: fix issue with attr error for host_forward Signed-off-by: Kostiantyn Bushko --- scripts/qemucommand.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qemucommand.py b/scripts/qemucommand.py index 85b12c6..8d3ee0e 100644 --- a/scripts/qemucommand.py +++ b/scripts/qemucommand.py @@ -128,7 +128,7 @@ class QemuCommand(object): self.secondary_network = args.secondary_network # Append additional port forwarding to QEMU command line. - if args.host_forward: + if hasattr(args, 'host_forward'): self.host_fwd = args.host_forward def command_line(self): -- cgit v1.2.3-54-g00ecf From 44665d3656113067c0ff13bf9fe3813c98433583 Mon Sep 17 00:00:00 2001 From: Kostiantyn Bushko Date: Tue, 14 Jan 2020 15:07:28 +0200 Subject: zabbix-agent: configuration recipe Signed-off-by: Kostiantyn Bushko --- recipes-connectivity/zabbix/zabbix_%.bbappend | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 recipes-connectivity/zabbix/zabbix_%.bbappend diff --git a/recipes-connectivity/zabbix/zabbix_%.bbappend b/recipes-connectivity/zabbix/zabbix_%.bbappend new file mode 100644 index 0000000..c6a69b5 --- /dev/null +++ b/recipes-connectivity/zabbix/zabbix_%.bbappend @@ -0,0 +1,20 @@ + +do_install_append() { + + # Set the zabbix Server + if [ ! -z ${SOTA_COMM_CONF_ZABBIX_SERVER} ]; then + sed -i "s/Server=\([0-9]\{1,3\}\.\)\{3\}[0-9]\{1,3\}/Server=${SOTA_COMM_CONF_ZABBIX_SERVER}/g" ${D}${sysconfdir}/zabbix_agentd.conf + if ! grep -Fxq "Server=${SOTA_COMM_CONF_ZABBIX_SERVER}" ${D}${sysconfdir}/zabbix_agentd.conf; then + echo -e '\nServer='${SOTA_COMM_CONF_ZABBIX_SERVER} >> ${D}${sysconfdir}/zabbix_agentd.conf + fi + fi + + # Set ServerActive + if [ ! -z ${SOTA_COMM_CONF_ZABBIX_SERVERACTIVE} ]; then + sed -i "s/ServerActive=\([0-9]\{1,3\}\.\)\{3\}[0-9]\{1,3\}/ServerActive=${SOTA_COMM_CONF_ZABBIX_SERVERACTIVE}/g" ${D}${sysconfdir}/zabbix_agentd.conf + if ! grep -Fxq "ServerActive=${SOTA_COMM_CONF_ZABBIX_SERVERACTIVE}" ${D}${sysconfdir}/zabbix_agentd.conf; then + echo -e '\nServerActive='${SOTA_COMM_CONF_ZABBIX_SERVERACTIVE} >> ${D}${sysconfdir}/zabbix_agentd.conf + fi + + fi +} -- cgit v1.2.3-54-g00ecf From 00ce05aeb0b3e44764880619b6eee0d727e41a8e Mon Sep 17 00:00:00 2001 From: Mykhaylo Sul Date: Fri, 3 Jan 2020 11:36:09 +0100 Subject: OTA-4174: Make an ostree update a default on IP Secondary Signed-off-by: Mykhaylo Sul --- recipes-sota/aktualizr/aktualizr_git.bb | 2 +- recipes-test/demo-config/files/30-fake-pacman.toml | 2 -- recipes-test/demo-config/files/30-ostree-pacman.toml | 2 ++ recipes-test/demo-config/secondary-config.bb | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) delete mode 100644 recipes-test/demo-config/files/30-fake-pacman.toml create mode 100644 recipes-test/demo-config/files/30-ostree-pacman.toml diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index 2e91a7b..5728830 100644 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb @@ -30,7 +30,7 @@ SRC_URI = " \ SRC_URI[garagesign.md5sum] = "3e1ae6d49cc66fda37cef47f849d9609" SRC_URI[garagesign.sha256sum] = "8d49b83efa222db2f092ee14348459ee1bfd048552b57c3cb5ab48db8e347d82" -SRCREV = "bc54d32b8d4e97409908e700b9615fef2ca7ced2" +SRCREV = "14f7c6e74e8fade755dfdd03c856865127ba12b6" BRANCH ?= "master" S = "${WORKDIR}/git" diff --git a/recipes-test/demo-config/files/30-fake-pacman.toml b/recipes-test/demo-config/files/30-fake-pacman.toml deleted file mode 100644 index 3fb5cf2..0000000 --- a/recipes-test/demo-config/files/30-fake-pacman.toml +++ /dev/null @@ -1,2 +0,0 @@ -[pacman] -type = "fake" diff --git a/recipes-test/demo-config/files/30-ostree-pacman.toml b/recipes-test/demo-config/files/30-ostree-pacman.toml new file mode 100644 index 0000000..d2cf5b8 --- /dev/null +++ b/recipes-test/demo-config/files/30-ostree-pacman.toml @@ -0,0 +1,2 @@ +[pacman] +type = "ostree" diff --git a/recipes-test/demo-config/secondary-config.bb b/recipes-test/demo-config/secondary-config.bb index ddbed89..58b18df 100644 --- a/recipes-test/demo-config/secondary-config.bb +++ b/recipes-test/demo-config/secondary-config.bb @@ -12,14 +12,14 @@ SOTA_HARDWARE_ID ?= "${MACHINE}-sndry" SECONDARY_HARDWARE_ID ?= "${SOTA_HARDWARE_ID}" SRC_URI = "\ - file://30-fake-pacman.toml \ + file://30-ostree-pacman.toml \ file://35-network-config.toml \ file://45-id-config.toml \ " do_install () { install -m 0700 -d ${D}${libdir}/sota/conf.d - install -m 0644 ${WORKDIR}/30-fake-pacman.toml ${D}${libdir}/sota/conf.d/30-fake-pacman.toml + install -m 0644 ${WORKDIR}/30-ostree-pacman.toml ${D}${libdir}/sota/conf.d/30-ostree-pacman.toml install -m 0644 ${WORKDIR}/35-network-config.toml ${D}${libdir}/sota/conf.d/35-network-config.toml sed -i -e 's|@PORT@|${SECONDARY_PORT}|g' \ @@ -36,7 +36,7 @@ do_install () { FILES_${PN} = " \ ${libdir}/sota/conf.d \ - ${libdir}/sota/conf.d/30-fake-pacman.toml \ + ${libdir}/sota/conf.d/30-ostree-pacman.toml \ ${libdir}/sota/conf.d/35-network-config.toml \ ${libdir}/sota/conf.d/45-id-config.toml \ " -- cgit v1.2.3-54-g00ecf From 19ff287e7b6764af2f0af29cb5bac9433fc5862d Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Mon, 20 Jan 2020 08:59:42 +0100 Subject: aktualizr: Bump to latest. Bump garage-sign as well. Signed-off-by: Patrick Vacek --- recipes-sota/aktualizr/aktualizr_git.bb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index 5728830..1742430 100644 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb @@ -15,7 +15,7 @@ RDEPENDS_${PN}-ptest += "bash cmake curl net-tools python3-core python3-misc pyt PV = "1.0+git${SRCPV}" PR = "7" -GARAGE_SIGN_PV = "0.7.0-61-g909b804" +GARAGE_SIGN_PV = "0.7.0-64-gc7c279f" SRC_URI = " \ gitsm://github.com/advancedtelematic/aktualizr;branch=${BRANCH};name=aktualizr \ @@ -27,10 +27,10 @@ SRC_URI = " \ ${@ d.expand("https://ats-tuf-cli-releases.s3-eu-central-1.amazonaws.com/cli-${GARAGE_SIGN_PV}.tgz;unpack=0;name=garagesign") if d.getVar('GARAGE_SIGN_AUTOVERSION') != '1' else ''} \ " -SRC_URI[garagesign.md5sum] = "3e1ae6d49cc66fda37cef47f849d9609" -SRC_URI[garagesign.sha256sum] = "8d49b83efa222db2f092ee14348459ee1bfd048552b57c3cb5ab48db8e347d82" +SRC_URI[garagesign.md5sum] = "36dedbf79f71cb697a18251ea121bcc6" +SRC_URI[garagesign.sha256sum] = "f0a8e4bb258fd65a6f1fe561132d5ab3fe25b76aec0f1873993dc65bf2167608" -SRCREV = "14f7c6e74e8fade755dfdd03c856865127ba12b6" +SRCREV = "5ead19cf8aefee44e929b7e98bc5aa63e0621aac" BRANCH ?= "master" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf