diff options
26 files changed, 74 insertions, 224 deletions
@@ -1,2 +1,3 @@ | |||
1 | __pycache__ | 1 | __pycache__ |
2 | *.pyc | 2 | *.pyc |
3 | .idea/ | ||
diff --git a/classes/image_repo_manifest.bbclass b/classes/image_repo_manifest.bbclass index 0b311bd..72dc28f 100644 --- a/classes/image_repo_manifest.bbclass +++ b/classes/image_repo_manifest.bbclass | |||
@@ -9,8 +9,6 @@ | |||
9 | # For more information, see: | 9 | # For more information, see: |
10 | # https://web.archive.org/web/20161224194009/https://wiki.cyanogenmod.org/w/Doc:_Using_manifests | 10 | # https://web.archive.org/web/20161224194009/https://wiki.cyanogenmod.org/w/Doc:_Using_manifests |
11 | 11 | ||
12 | HOSTTOOLS_NONFATAL += "repo python" | ||
13 | |||
14 | # Write build information to target filesystem | 12 | # Write build information to target filesystem |
15 | buildinfo_manifest () { | 13 | buildinfo_manifest () { |
16 | if [ $(which repo) ]; then | 14 | if [ $(which repo) ]; then |
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index 7e4a367..533d338 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass | |||
@@ -238,10 +238,10 @@ IMAGE_CMD_garagesign () { | |||
238 | target_version=${ostree_target_hash} | 238 | target_version=${ostree_target_hash} |
239 | if [ -n "${GARAGE_TARGET_VERSION}" ]; then | 239 | if [ -n "${GARAGE_TARGET_VERSION}" ]; then |
240 | target_version=${GARAGE_TARGET_VERSION} | 240 | target_version=${GARAGE_TARGET_VERSION} |
241 | bbwarn "Target version is overriden with GARAGE_TARGET_VERSION variable. It is a dangerous operation, make sure you've read the respective secion in meta-updater/README.adoc" | 241 | bbwarn "Target version is overriden with GARAGE_TARGET_VERSION variable. This is a dangerous operation! See https://docs.ota.here.com/ota-client/latest/build-configuration.html#_overriding_target_version" |
242 | elif [ -e "${STAGING_DATADIR_NATIVE}/target_version" ]; then | 242 | elif [ -e "${STAGING_DATADIR_NATIVE}/target_version" ]; then |
243 | target_version=$(cat "${STAGING_DATADIR_NATIVE}/target_version") | 243 | target_version=$(cat "${STAGING_DATADIR_NATIVE}/target_version") |
244 | bbwarn "Target version is overriden with target_version file. It is a dangerous operation, make sure you've read the respective secion in meta-updater/README.adoc" | 244 | bbwarn "Target version is overriden with target_version file. This is a dangerous operation! See https://docs.ota.here.com/ota-client/latest/build-configuration.html#_overriding_target_version" |
245 | fi | 245 | fi |
246 | 246 | ||
247 | # Push may fail due to race condition when multiple build machines try to push simultaneously | 247 | # Push may fail due to race condition when multiple build machines try to push simultaneously |
diff --git a/classes/sota.bbclass b/classes/sota.bbclass index 7bf17a4..71bd303 100644 --- a/classes/sota.bbclass +++ b/classes/sota.bbclass | |||
@@ -1,7 +1,5 @@ | |||
1 | DISTROOVERRIDES .= "${@bb.utils.contains('DISTRO_FEATURES', 'sota', ':sota', '', d)}" | 1 | DISTROOVERRIDES .= "${@bb.utils.contains('DISTRO_FEATURES', 'sota', ':sota', '', d)}" |
2 | 2 | ||
3 | HOSTTOOLS_NONFATAL += "java" | ||
4 | |||
5 | SOTA_CLIENT ??= "aktualizr" | 3 | SOTA_CLIENT ??= "aktualizr" |
6 | SOTA_CLIENT_PROV ??= "aktualizr-shared-prov" | 4 | SOTA_CLIENT_PROV ??= "aktualizr-shared-prov" |
7 | SOTA_DEPLOY_CREDENTIALS ?= "1" | 5 | SOTA_DEPLOY_CREDENTIALS ?= "1" |
diff --git a/classes/sota_bleeding.inc b/classes/sota_bleeding.inc index fc5947d..77d004b 100644 --- a/classes/sota_bleeding.inc +++ b/classes/sota_bleeding.inc | |||
@@ -1 +1,2 @@ | |||
1 | SRCREV_pn-aktualizr ?= "${AUTOREV}" | 1 | SRCREV_pn-aktualizr ?= "${AUTOREV}" |
2 | SRCREV_pn-aktualizr-native ?= "${AUTOREV}" | ||
diff --git a/classes/target_version_example.bbclass b/classes/target_version_example.bbclass index ef119fb..c0b5aec 100644 --- a/classes/target_version_example.bbclass +++ b/classes/target_version_example.bbclass | |||
@@ -1,7 +1,5 @@ | |||
1 | # Writes target version to be used by garage-sign | 1 | # Writes target version to be used by garage-sign |
2 | 2 | ||
3 | HOSTTOOLS += " git " | ||
4 | |||
5 | deploy_target_version () { | 3 | deploy_target_version () { |
6 | version=$(git --git-dir=${METADIR}/.repo/manifests/.git/ rev-parse HEAD) | 4 | version=$(git --git-dir=${METADIR}/.repo/manifests/.git/ rev-parse HEAD) |
7 | echo -n ${version} > ${STAGING_DATADIR_NATIVE}/target_version | 5 | echo -n ${version} > ${STAGING_DATADIR_NATIVE}/target_version |
diff --git a/conf/distro/sota.conf.inc b/conf/distro/sota.conf.inc index f6111bf..1d5f8df 100644 --- a/conf/distro/sota.conf.inc +++ b/conf/distro/sota.conf.inc | |||
@@ -16,4 +16,5 @@ INHERIT += "reproducible_build_simple" | |||
16 | export SOURCE_DATE_EPOCH ?= "0" | 16 | export SOURCE_DATE_EPOCH ?= "0" |
17 | REPRODUCIBLE_TIMESTAMP_ROOTFS ?= "0" | 17 | REPRODUCIBLE_TIMESTAMP_ROOTFS ?= "0" |
18 | 18 | ||
19 | HOSTTOOLS_append = " sync sha256sum" | 19 | HOSTTOOLS += "git sync sha256sum" |
20 | HOSTTOOLS_NONFATAL += "java repo python" | ||
diff --git a/lib/oeqa/selftest/cases/testutils.py b/lib/oeqa/selftest/cases/testutils.py index ea7781b..3455fa8 100644 --- a/lib/oeqa/selftest/cases/testutils.py +++ b/lib/oeqa/selftest/cases/testutils.py | |||
@@ -49,6 +49,7 @@ def qemu_boot_image(imagename, **kwargs): | |||
49 | args.overlay = kwargs.get('overlay', None) | 49 | args.overlay = kwargs.get('overlay', None) |
50 | args.dry_run = kwargs.get('dry_run', False) | 50 | args.dry_run = kwargs.get('dry_run', False) |
51 | args.secondary_network = kwargs.get('secondary_network', False) | 51 | args.secondary_network = kwargs.get('secondary_network', False) |
52 | args.uboot_enable = kwargs.get('uboot_enable', 'yes') | ||
52 | 53 | ||
53 | qemu = QemuCommand(args) | 54 | qemu = QemuCommand(args) |
54 | cmdline = qemu.command_line() | 55 | cmdline = qemu.command_line() |
diff --git a/lib/oeqa/selftest/cases/updater_qemux86_64.py b/lib/oeqa/selftest/cases/updater_qemux86_64.py index 5f152ad..08220f4 100644 --- a/lib/oeqa/selftest/cases/updater_qemux86_64.py +++ b/lib/oeqa/selftest/cases/updater_qemux86_64.py | |||
@@ -112,6 +112,32 @@ class SharedCredProvTests(OESelftestTestCase): | |||
112 | verifyProvisioned(self, machine, hwid) | 112 | verifyProvisioned(self, machine, hwid) |
113 | 113 | ||
114 | 114 | ||
115 | class SharedCredProvTestsNonOSTree(SharedCredProvTests): | ||
116 | |||
117 | def setUpLocal(self): | ||
118 | layer = "meta-updater-qemux86-64" | ||
119 | result = runCmd('bitbake-layers show-layers') | ||
120 | if re.search(layer, result.output) is None: | ||
121 | self.meta_qemu = metadir() + layer | ||
122 | runCmd('bitbake-layers add-layer "%s"' % self.meta_qemu) | ||
123 | else: | ||
124 | self.meta_qemu = None | ||
125 | self.append_config('MACHINE = "qemux86-64"') | ||
126 | self.append_config('SOTA_CLIENT_PROV = ""') | ||
127 | self.append_config('IMAGE_FSTYPES_remove = "ostreepush garagesign garagecheck"') | ||
128 | self.append_config('SOTA_HARDWARE_ID = "plain_reibekuchen_314"') | ||
129 | |||
130 | self.append_config('DISTRO = "poky"') | ||
131 | self.append_config('DISTRO_FEATURES_append = " systemd"') | ||
132 | self.append_config('VIRTUAL-RUNTIME_init_manager = "systemd"') | ||
133 | self.append_config('PREFERRED_RPROVIDER_virtual/network-configuration ??= "networkd-dhcp-conf"') | ||
134 | self.append_config('PACKAGECONFIG_pn-aktualizr = ""') | ||
135 | self.append_config('SOTA_DEPLOY_CREDENTIALS = "1"') | ||
136 | self.append_config('IMAGE_INSTALL_append += "aktualizr"') | ||
137 | self.append_config('IMAGE_INSTALL_append += " aktualizr-shared-prov"') | ||
138 | self.qemu, self.s = qemu_launch(machine='qemux86-64', uboot_enable='no') | ||
139 | |||
140 | |||
115 | class ManualControlTests(OESelftestTestCase): | 141 | class ManualControlTests(OESelftestTestCase): |
116 | 142 | ||
117 | def setUpLocal(self): | 143 | def setUpLocal(self): |
diff --git a/recipes-core/images/initramfs-ostree-image.bb b/recipes-core/images/initramfs-ostree-image.bb index 7e03f3d..936c59a 100644 --- a/recipes-core/images/initramfs-ostree-image.bb +++ b/recipes-core/images/initramfs-ostree-image.bb | |||
@@ -13,6 +13,8 @@ IMAGE_LINGUAS = "" | |||
13 | 13 | ||
14 | LICENSE = "MIT" | 14 | LICENSE = "MIT" |
15 | 15 | ||
16 | IMAGE_CLASSES_remove = "image_repo_manifest" | ||
17 | |||
16 | IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}" | 18 | IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}" |
17 | 19 | ||
18 | # Avoid circular dependencies | 20 | # Avoid circular dependencies |
@@ -28,5 +30,3 @@ IMAGE_ROOTFS_EXTRA_SPACE = "0" | |||
28 | IMAGE_OVERHEAD_FACTOR = "1.0" | 30 | IMAGE_OVERHEAD_FACTOR = "1.0" |
29 | 31 | ||
30 | BAD_RECOMMENDATIONS += "busybox-syslog" | 32 | BAD_RECOMMENDATIONS += "busybox-syslog" |
31 | |||
32 | IMAGE_PREPROCESS_COMMAND_remove = "buildinfo_manifest;" | ||
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index 0aa5702..804f2c2 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 | |||
15 | PV = "1.0+git${SRCPV}" | 15 | PV = "1.0+git${SRCPV}" |
16 | PR = "7" | 16 | PR = "7" |
17 | 17 | ||
18 | GARAGE_SIGN_PV = "0.7.0-64-gc7c279f" | 18 | GARAGE_SIGN_PV = "0.7.0-70-g3adf982" |
19 | 19 | ||
20 | SRC_URI = " \ | 20 | SRC_URI = " \ |
21 | gitsm://github.com/advancedtelematic/aktualizr;branch=${BRANCH};name=aktualizr \ | 21 | gitsm://github.com/advancedtelematic/aktualizr;branch=${BRANCH};name=aktualizr \ |
@@ -27,10 +27,10 @@ SRC_URI = " \ | |||
27 | ${@ 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 ''} \ | 27 | ${@ 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 ''} \ |
28 | " | 28 | " |
29 | 29 | ||
30 | SRC_URI[garagesign.md5sum] = "36dedbf79f71cb697a18251ea121bcc6" | 30 | SRC_URI[garagesign.md5sum] = "7c4cbeacefd97eae69104d29cf5ff37a" |
31 | SRC_URI[garagesign.sha256sum] = "f0a8e4bb258fd65a6f1fe561132d5ab3fe25b76aec0f1873993dc65bf2167608" | 31 | SRC_URI[garagesign.sha256sum] = "e9a9b68eaa1ce4104eb2ab7f1f59d99742d50805e93216fb5b21d1f212aa3d82" |
32 | 32 | ||
33 | SRCREV = "56ac8dafb552b1d15638162ca14e0b818ed5e65f" | 33 | SRCREV = "9f2cc5d7b026eb1a1404f0c77ef6cb9377245423" |
34 | BRANCH ?= "master" | 34 | BRANCH ?= "master" |
35 | 35 | ||
36 | S = "${WORKDIR}/git" | 36 | S = "${WORKDIR}/git" |
@@ -151,7 +151,7 @@ FILES_${PN} = " \ | |||
151 | " | 151 | " |
152 | 152 | ||
153 | FILES_${PN}-lib = " \ | 153 | FILES_${PN}-lib = " \ |
154 | ${libdir}/libaktualizr_lib.so \ | 154 | ${libdir}/libaktualizr.so \ |
155 | " | 155 | " |
156 | 156 | ||
157 | FILES_${PN}-resource-control = " \ | 157 | FILES_${PN}-resource-control = " \ |
@@ -170,11 +170,11 @@ FILES_${PN}-secondary = " \ | |||
170 | " | 170 | " |
171 | 171 | ||
172 | FILES_${PN}-secondary-lib = " \ | 172 | FILES_${PN}-secondary-lib = " \ |
173 | ${libdir}/libaktualizr_secondary_lib.so \ | 173 | ${libdir}/libaktualizr_secondary.so \ |
174 | " | 174 | " |
175 | 175 | ||
176 | FILES_${PN}-sotatools-lib = " \ | 176 | FILES_${PN}-sotatools-lib = " \ |
177 | ${libdir}/libsota_tools_lib.so \ | 177 | ${libdir}/libsota_tools.so \ |
178 | " | 178 | " |
179 | 179 | ||
180 | FILES_${PN}-dev = "" | 180 | FILES_${PN}-dev = "" |
diff --git a/recipes-test/demo-config/files/30-ostree-pacman.toml b/recipes-test/demo-config/files/30-ostree-pacman.toml deleted file mode 100644 index d2cf5b8..0000000 --- a/recipes-test/demo-config/files/30-ostree-pacman.toml +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | [pacman] | ||
2 | type = "ostree" | ||
diff --git a/recipes-test/demo-config/files/30-pacman-config.toml b/recipes-test/demo-config/files/30-pacman-config.toml new file mode 100644 index 0000000..750cf5c --- /dev/null +++ b/recipes-test/demo-config/files/30-pacman-config.toml | |||
@@ -0,0 +1,2 @@ | |||
1 | [pacman] | ||
2 | type = @UPDATE_TYPE@ | ||
diff --git a/recipes-test/demo-config/secondary-config.bb b/recipes-test/demo-config/secondary-config.bb index 58b18df..638f0ae 100644 --- a/recipes-test/demo-config/secondary-config.bb +++ b/recipes-test/demo-config/secondary-config.bb | |||
@@ -10,16 +10,32 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" | |||
10 | SECONDARY_SERIAL_ID ?= "" | 10 | SECONDARY_SERIAL_ID ?= "" |
11 | SOTA_HARDWARE_ID ?= "${MACHINE}-sndry" | 11 | SOTA_HARDWARE_ID ?= "${MACHINE}-sndry" |
12 | SECONDARY_HARDWARE_ID ?= "${SOTA_HARDWARE_ID}" | 12 | SECONDARY_HARDWARE_ID ?= "${SOTA_HARDWARE_ID}" |
13 | SECONDARY_UPDATE_TYPE ?= "ostree" | ||
14 | |||
15 | UPDATE_TYPE = "${SECONDARY_UPDATE_TYPE}" | ||
16 | python () { | ||
17 | update_type = d.getVar('UPDATE_TYPE') | ||
18 | if update_type not in [ 'ostree', 'file']: | ||
19 | bb.fatal('Unsupported type of an update specified for secondary: SECONDARY_UPDATE_TYPE = {}\n' | ||
20 | 'Supported update types are: ostree and file' | ||
21 | .format(update_type)) | ||
22 | |||
23 | if update_type == 'file': | ||
24 | d.setVar('UPDATE_TYPE', 'none') | ||
25 | } | ||
13 | 26 | ||
14 | SRC_URI = "\ | 27 | SRC_URI = "\ |
15 | file://30-ostree-pacman.toml \ | 28 | file://30-pacman-config.toml \ |
16 | file://35-network-config.toml \ | 29 | file://35-network-config.toml \ |
17 | file://45-id-config.toml \ | 30 | file://45-id-config.toml \ |
18 | " | 31 | " |
19 | 32 | ||
33 | |||
20 | do_install () { | 34 | do_install () { |
21 | install -m 0700 -d ${D}${libdir}/sota/conf.d | 35 | install -m 0700 -d ${D}${libdir}/sota/conf.d |
22 | install -m 0644 ${WORKDIR}/30-ostree-pacman.toml ${D}${libdir}/sota/conf.d/30-ostree-pacman.toml | 36 | |
37 | install -m 0644 ${WORKDIR}/30-pacman-config.toml ${D}${libdir}/sota/conf.d/30-pacman-config.toml | ||
38 | sed -i -e 's|@UPDATE_TYPE@|${UPDATE_TYPE}|g' ${D}${libdir}/sota/conf.d/30-pacman-config.toml | ||
23 | 39 | ||
24 | install -m 0644 ${WORKDIR}/35-network-config.toml ${D}${libdir}/sota/conf.d/35-network-config.toml | 40 | install -m 0644 ${WORKDIR}/35-network-config.toml ${D}${libdir}/sota/conf.d/35-network-config.toml |
25 | sed -i -e 's|@PORT@|${SECONDARY_PORT}|g' \ | 41 | sed -i -e 's|@PORT@|${SECONDARY_PORT}|g' \ |
@@ -36,7 +52,7 @@ do_install () { | |||
36 | 52 | ||
37 | FILES_${PN} = " \ | 53 | FILES_${PN} = " \ |
38 | ${libdir}/sota/conf.d \ | 54 | ${libdir}/sota/conf.d \ |
39 | ${libdir}/sota/conf.d/30-ostree-pacman.toml \ | 55 | ${libdir}/sota/conf.d/30-pacman-config.toml \ |
40 | ${libdir}/sota/conf.d/35-network-config.toml \ | 56 | ${libdir}/sota/conf.d/35-network-config.toml \ |
41 | ${libdir}/sota/conf.d/45-id-config.toml \ | 57 | ${libdir}/sota/conf.d/45-id-config.toml \ |
42 | " | 58 | " |
diff --git a/recipes-test/demo-config/shared-conf.inc b/recipes-test/demo-config/shared-conf.inc index c5ab598..5523406 100644 --- a/recipes-test/demo-config/shared-conf.inc +++ b/recipes-test/demo-config/shared-conf.inc | |||
@@ -1,5 +1,5 @@ | |||
1 | SECONDARY_IP ?= "10.0.3.2" | 1 | SECONDARY_IP ?= "192.168.254.2" |
2 | SECONDARY_PORT ?= "9050" | 2 | SECONDARY_PORT ?= "9050" |
3 | PRIMARY_IP ?= "10.0.3.1" | 3 | PRIMARY_IP ?= "192.168.254.1" |
4 | PRIMARY_PORT ?= "9040" | 4 | PRIMARY_PORT ?= "9040" |
5 | PRIMARY_WAIT_TIMEOUT ?= "240" | 5 | PRIMARY_WAIT_TIMEOUT ?= "240" |
diff --git a/recipes-test/demo-network-config/files/25-dhcp-server.network b/recipes-test/demo-network-config/files/25-dhcp-server.network index 4766f9a..03bb302 100644 --- a/recipes-test/demo-network-config/files/25-dhcp-server.network +++ b/recipes-test/demo-network-config/files/25-dhcp-server.network | |||
@@ -4,9 +4,9 @@ Name=enp0s4 | |||
4 | [Network] | 4 | [Network] |
5 | Description=Private internal network between aktualizr Primary and Secondary nodes | 5 | Description=Private internal network between aktualizr Primary and Secondary nodes |
6 | DHCPServer=yes | 6 | DHCPServer=yes |
7 | Address=10.0.3.1/24 | 7 | Address=192.168.254.1/24 |
8 | IPForward=yes | 8 | IPForward=yes |
9 | IPMasquerade=yes | 9 | IPMasquerade=yes |
10 | 10 | ||
11 | [DHCPServer] | 11 | [DHCPServer] |
12 | PoolOffset=10 \ No newline at end of file | 12 | PoolOffset=10 |
diff --git a/recipes-test/demo-network-config/primary-network-config.bb b/recipes-test/demo-network-config/primary-network-config.bb index 544a5ec..7ee873f 100644 --- a/recipes-test/demo-network-config/primary-network-config.bb +++ b/recipes-test/demo-network-config/primary-network-config.bb | |||
@@ -15,7 +15,7 @@ do_install() { | |||
15 | install -m 0644 ${WORKDIR}/27-dhcp-client-external.network ${D}${libdir}/systemd/network/ | 15 | install -m 0644 ${WORKDIR}/27-dhcp-client-external.network ${D}${libdir}/systemd/network/ |
16 | } | 16 | } |
17 | 17 | ||
18 | PRIMARY_IP ?= "10.0.3.1" | 18 | PRIMARY_IP ?= "192.168.254.1" |
19 | 19 | ||
20 | IP_ADDR = "${PRIMARY_IP}" | 20 | IP_ADDR = "${PRIMARY_IP}" |
21 | CONF_TYPE ?= "${@ 'multihomed' if d.getVar('MACHINE') == 'raspberrypi3' and d.getVar('RPI_WIFI_ENABLE') != '1' else 'static'}" | 21 | CONF_TYPE ?= "${@ 'multihomed' if d.getVar('MACHINE') == 'raspberrypi3' and d.getVar('RPI_WIFI_ENABLE') != '1' else 'static'}" |
diff --git a/recipes-test/demo-network-config/secondary-network-config.bb b/recipes-test/demo-network-config/secondary-network-config.bb index ca83d53..b268cd3 100644 --- a/recipes-test/demo-network-config/secondary-network-config.bb +++ b/recipes-test/demo-network-config/secondary-network-config.bb | |||
@@ -19,9 +19,9 @@ do_install() { | |||
19 | install -m 0644 ${WORKDIR}/27-dhcp-client-external.network ${D}${libdir}/systemd/network/ | 19 | install -m 0644 ${WORKDIR}/27-dhcp-client-external.network ${D}${libdir}/systemd/network/ |
20 | } | 20 | } |
21 | 21 | ||
22 | SECONDARY_IP ?= "10.0.3.2" | 22 | SECONDARY_IP ?= "192.168.254.2" |
23 | IP_ADDR = "${SECONDARY_IP}" | 23 | IP_ADDR = "${SECONDARY_IP}" |
24 | CONF_TYPE = "static" | 24 | CONF_TYPE ?= "${@ 'multihomed' if d.getVar('MACHINE') == 'raspberrypi3' and d.getVar('RPI_WIFI_ENABLE') != '1' else 'static'}" |
25 | 25 | ||
26 | require network-config.inc | 26 | require network-config.inc |
27 | 27 | ||
diff --git a/scripts/ci/Dockerfile.checkout b/scripts/ci/Dockerfile.checkout deleted file mode 100644 index 5210c6b..0000000 --- a/scripts/ci/Dockerfile.checkout +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | FROM debian:stretch-slim | ||
2 | LABEL Description="Image for checking out updater-repo" | ||
3 | |||
4 | RUN sed -i 's#deb http://deb.debian.org/debian stretch main#deb http://deb.debian.org/debian stretch main contrib#g' /etc/apt/sources.list | ||
5 | RUN sed -i 's#deb http://deb.debian.org/debian stretch-updates main#deb http://deb.debian.org/debian stretch-updates main contrib#g' /etc/apt/sources.list | ||
6 | RUN apt-get update -q && apt-get install -qy \ | ||
7 | git \ | ||
8 | repo \ | ||
9 | xmlstarlet | ||
10 | |||
11 | # checkout script | ||
12 | RUN mkdir /scripts | ||
13 | COPY checkout-oe.sh /scripts/ | ||
diff --git a/scripts/ci/checkout-oe.sh b/scripts/ci/checkout-oe.sh deleted file mode 100755 index e8a2473..0000000 --- a/scripts/ci/checkout-oe.sh +++ /dev/null | |||
@@ -1,78 +0,0 @@ | |||
1 | #!/usr/bin/env bash | ||
2 | |||
3 | set -euo pipefail | ||
4 | |||
5 | set -x | ||
6 | |||
7 | REMOTE_SOURCE=${REMOTE_SOURCE:-https://github.com/advancedtelematic} | ||
8 | MANIFEST=${MANIFEST:-master} | ||
9 | CURRENT_PROJECT=${CURRENT_PROJECT:-} | ||
10 | |||
11 | # list of projects to pin to one version in the format: | ||
12 | # "project:rev;project2:rev2..." | ||
13 | PIN_LIST=${PIN_LIST:-} | ||
14 | |||
15 | #CURRENT_REV=$(git rev-parse HEAD) | ||
16 | LOCAL_REPO=$PWD | ||
17 | |||
18 | mkdir -p updater-repo | ||
19 | |||
20 | cd updater-repo | ||
21 | |||
22 | if [ -d .repo/manifests ]; then | ||
23 | git -C .repo/manifests reset --hard | ||
24 | fi | ||
25 | |||
26 | repo init -m "${MANIFEST}.xml" -u "$REMOTE_SOURCE/updater-repo" | ||
27 | |||
28 | # patch manifest: | ||
29 | # - add a new "ats" remote that points to "$REMOTE_SOURCE" | ||
30 | # - change projects that contain "advancedtelematic" to use the ats remote | ||
31 | MANIFEST_FILE=".repo/manifests/${MANIFEST}.xml" | ||
32 | xmlstarlet ed --omit-decl -L \ | ||
33 | -s "/manifest" -t elem -n "remote" -v "" \ | ||
34 | -i "/manifest/remote[last()]" -t attr -n "name" -v "ats" \ | ||
35 | -i "/manifest/remote[last()]" -t attr -n "fetch" -v "$REMOTE_SOURCE" \ | ||
36 | -d "/manifest/project[contains(@name, 'advancedtelematic')]/@remote" \ | ||
37 | -i "/manifest/project[contains(@name, 'advancedtelematic')]" -t attr -n "remote" -v "ats" \ | ||
38 | "$MANIFEST_FILE" | ||
39 | |||
40 | # hack: sed on `advancedtelematic/` names, to remove this unwanted prefix | ||
41 | sed -i 's#name="advancedtelematic/#name="#g' "$MANIFEST_FILE" | ||
42 | |||
43 | # pin projects from the list | ||
44 | ( | ||
45 | IFS=";" | ||
46 | for pin in $PIN_LIST; do | ||
47 | IFS=":" | ||
48 | read -r project rev <<< "$pin" | ||
49 | xmlstarlet ed --omit-decl -L \ | ||
50 | -d "/manifest/project[@name=\"$project\"]/@revision" \ | ||
51 | -i "/manifest/project[@name=\"$project\"]/@revision" -t attr -n "revision" -v "$rev" \ | ||
52 | -i "/manifest/project[@name=\"$project\"]" -t attr -n "revision" -v "$rev" \ | ||
53 | "$MANIFEST_FILE" | ||
54 | IFS=";" | ||
55 | done | ||
56 | ) | ||
57 | |||
58 | # Remove the current project from the manifest if we have it checked out | ||
59 | if [ -n "$CURRENT_PROJECT" ]; then | ||
60 | xmlstarlet ed --omit-decl -L \ | ||
61 | -d "/manifest/project[@name=\"$CURRENT_PROJECT\"]" \ | ||
62 | "$MANIFEST_FILE" | ||
63 | fi | ||
64 | |||
65 | repo manifest | ||
66 | |||
67 | # Try to clean up the repos in case they are messed up, but this returns an | ||
68 | # error code if the repos don't exist, which the subsequent repo sync will fix. | ||
69 | repo forall -c 'git reset --hard ; git clean -fdx' || true | ||
70 | |||
71 | repo sync -d --force-sync | ||
72 | |||
73 | if [ -n "$CURRENT_PROJECT" ]; then | ||
74 | rm -f "$CURRENT_PROJECT" | ||
75 | ln -s "$LOCAL_REPO" "$CURRENT_PROJECT" | ||
76 | fi | ||
77 | |||
78 | repo manifest -r | ||
diff --git a/scripts/ci/docker/setup_kvm.sh b/scripts/ci/docker/setup_kvm.sh deleted file mode 100755 index 1ffbbf5..0000000 --- a/scripts/ci/docker/setup_kvm.sh +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | #!/usr/bin/env bash | ||
2 | |||
3 | # This script makes the gid of the 'kvm' group to match the group | ||
4 | # owner of '/dev/kvm' | ||
5 | # | ||
6 | # These two are not guaranteed to match when a docker image starts | ||
7 | # with access to '/dev/kvm' that comes from the host | ||
8 | |||
9 | set -euo pipefail | ||
10 | |||
11 | kvm_gid=$(stat -c "%g" /dev/kvm) | ||
12 | groupmod -g "$kvm_gid" kvm | ||
13 | usermod -a -G kvm bitbake | ||
14 | ln -s /bin/true /usr/bin/kvm-ok | ||
diff --git a/scripts/ci/gitlab/checkout.yml b/scripts/ci/gitlab/checkout.yml deleted file mode 100644 index 28c9177..0000000 --- a/scripts/ci/gitlab/checkout.yml +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | .bb_checkout: | ||
2 | # parameters: | ||
3 | # - MANIFEST | ||
4 | # - REMOTE_SOURCE | ||
5 | # - CURRENT_PROJECT (will be symlinked instead of pulled) | ||
6 | |||
7 | image: $BITBAKE_CHECKOUT_IMAGE | ||
8 | cache: | ||
9 | paths: | ||
10 | - updater-repo | ||
11 | artifacts: | ||
12 | expire_in: "1 day" | ||
13 | paths: | ||
14 | - updater-repo | ||
15 | script: | ||
16 | - /scripts/checkout-oe.sh | ||
diff --git a/scripts/ci/gitlab/docker.yml b/scripts/ci/gitlab/docker.yml deleted file mode 100644 index ba488c6..0000000 --- a/scripts/ci/gitlab/docker.yml +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | .bb_docker_local: | ||
2 | # intended to be run on meta-updater's master branch which contains the | ||
3 | # reference docker files | ||
4 | # parameters: | ||
5 | # - BITBAKE_IMAGE | ||
6 | # - BITBAKE_CHECKOUT_IMAGE | ||
7 | # - BITBKAE_IMAGE_MASTER | ||
8 | # - BITBAKE_CHECKOUT_IMAGE_MASTER | ||
9 | image: docker:18 | ||
10 | stage: docker | ||
11 | services: | ||
12 | - docker:18-dind | ||
13 | script: | ||
14 | - docker login -u gitlab-ci-token -p "$CI_JOB_TOKEN" "$CI_REGISTRY" | ||
15 | |||
16 | - docker pull "$BITBAKE_IMAGE" || docker pull "$BITBKAE_IMAGE_MASTER" || true | ||
17 | - docker build --pull --cache-from "$BITBKAE_IMAGE_MASTER" --cache-from "$BITBAKE_IMAGE" -f ./scripts/ci/Dockerfile.bitbake -t "$BITBAKE_IMAGE" ./scripts/ci | ||
18 | - docker push "$BITBAKE_IMAGE" | ||
19 | |||
20 | - docker pull "$BITBAKE_CHECKOUT_IMAGE" || docker pull "$BITBAKE_CHECKOUT_IMAGE_MASTER" || true | ||
21 | - docker build --pull --cache-from "$BITBAKE_CHECKOUT_IMAGE_MASTER" --cache-from "$BITBAKE_CHECKOUT_IMAGE" -f ./scripts/ci/Dockerfile.checkout -t "$BITBAKE_CHECKOUT_IMAGE" ./scripts/ci | ||
22 | - docker push "$BITBAKE_CHECKOUT_IMAGE" | ||
23 | |||
24 | .bb_docker_remote: | ||
25 | # intended to be run on other branches and repos: just pulls the last master image | ||
26 | # parameters: | ||
27 | # - BITBAKE_IMAGE | ||
28 | # - BITBAKE_CHECKOUT_IMAGE | ||
29 | image: docker:18 | ||
30 | stage: docker | ||
31 | services: | ||
32 | - docker:18-dind | ||
33 | script: | ||
34 | - docker login -u gitlab-ci-token -p "$CI_JOB_TOKEN" "$CI_REGISTRY" | ||
35 | |||
36 | - docker pull "$BITBAKE_IMAGE" | ||
37 | - docker pull "$BITBAKE_CHECKOUT_IMAGE" | ||
diff --git a/scripts/ci/gitlab/tests.yml b/scripts/ci/gitlab/tests.yml deleted file mode 100644 index 4175412..0000000 --- a/scripts/ci/gitlab/tests.yml +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | .bitbake: | ||
2 | # parameters: | ||
3 | # - TEST_BUILD_DIR | ||
4 | # - TEST_MACHINE (defaults to qemux86-64) | ||
5 | # - BITBAKE_TARGETS | ||
6 | image: $BITBAKE_IMAGE | ||
7 | dependencies: | ||
8 | - Checkout | ||
9 | tags: | ||
10 | - bitbake | ||
11 | script: | ||
12 | - /scripts/configure.sh | ||
13 | - /scripts/build.sh $BITBAKE_TARGETS | ||
14 | |||
15 | .oe-selftest: | ||
16 | # parameters: | ||
17 | # - TEST_BUILD_DIR | ||
18 | # - TEST_MACHINE (defaults to qemux86-64) | ||
19 | # - OE_SELFTESTS | ||
20 | image: $BITBAKE_IMAGE | ||
21 | dependencies: | ||
22 | - Checkout | ||
23 | tags: | ||
24 | - bitbake | ||
25 | variables: | ||
26 | TEST_AKTUALIZR_CREDENTIALS: $CI_PROJECT_DIR/credentials.zip | ||
27 | script: | ||
28 | - aws s3 cp s3://ota-gitlab-ci/hereotaconnect_prod.zip credentials.zip | ||
29 | - sudo /usr/local/bin/setup_kvm.sh | ||
30 | - | | ||
31 | # sg is needed after adding bitbake to the kvm group (see setup_kvm.sh) | ||
32 | sg kvm << EOS | ||
33 | /scripts/configure.sh | ||
34 | /scripts/oe-selftest.sh $OE_SELFTESTS | ||
35 | EOS | ||
diff --git a/scripts/ci/oe-selftest.sh b/scripts/ci/oe-selftest.sh index 178e7c1..d441d02 100755 --- a/scripts/ci/oe-selftest.sh +++ b/scripts/ci/oe-selftest.sh | |||
@@ -22,5 +22,9 @@ set -x | |||
22 | # see https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=d3a94e5b9b3c107cf54d5639071cc6609c002f67 | 22 | # see https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=d3a94e5b9b3c107cf54d5639071cc6609c002f67 |
23 | mkdir -p "tmp/log" | 23 | mkdir -p "tmp/log" |
24 | 24 | ||
25 | # This is apparently required here now as well. | ||
26 | git config --global user.email "meta-updater-ci@example.org" | ||
27 | git config --global user.name "meta-updater-ci" | ||
28 | |||
25 | oe-selftest -r "$@" | 29 | oe-selftest -r "$@" |
26 | ) | 30 | ) |
diff --git a/scripts/qemucommand.py b/scripts/qemucommand.py index 86b5b9f..30929ac 100644 --- a/scripts/qemucommand.py +++ b/scripts/qemucommand.py | |||
@@ -40,7 +40,6 @@ def random_mac(): | |||
40 | 40 | ||
41 | class QemuCommand(object): | 41 | class QemuCommand(object): |
42 | def __init__(self, args): | 42 | def __init__(self, args): |
43 | print(args) | ||
44 | self.enable_u_boot = True | 43 | self.enable_u_boot = True |
45 | self.dry_run = args.dry_run | 44 | self.dry_run = args.dry_run |
46 | self.overlay = args.overlay | 45 | self.overlay = args.overlay |