summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTING.adoc10
-rw-r--r--README.adoc12
-rw-r--r--lib/oeqa/selftest/cases/updater.py9
-rwxr-xr-xrecipes-sota/aktualizr/aktualizr_git.bb5
-rw-r--r--recipes-sota/config/aktualizr-example-interface.bb21
-rw-r--r--recipes-sota/config/files/30-example-interface.toml2
-rw-r--r--recipes-sota/ostree/ostree_git.bb2
-rw-r--r--recipes-support/libgsystem/libgsystem_git.bb40
8 files changed, 16 insertions, 85 deletions
diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc
index 165e80c..cd6e981 100644
--- a/CONTRIBUTING.adoc
+++ b/CONTRIBUTING.adoc
@@ -14,12 +14,14 @@ If you are developing with meta-updater, it may be helpful to read the README an
14 14
15== Contributor checklist 15== Contributor checklist
16 16
17* OTA-enabled build succeeds at least for one platform, the resulted image boots. This check is absolutely necessary for every pull request unless it only touches documentation. 17* OTA-enabled build succeeds at least for one platform, the resulted image boots, and an update can be installed. This check is absolutely necessary for every pull request unless it only touches documentation.
18* If your change is touching platform code (like `classes/sota_<platform>.bbclass`), please check build and update on this particular platform. 18* If your change touches platform code (like `classes/sota_<platform>.bbclass`), please check building and updating on this particular platform.
19* oe-selftest succeeds. To test meta-updater, run `oe-selftest -r updater` from a build directory with `MACHINE` set to `qemux86-64`. 19* oe-selftest succeeds. To test meta-updater, run `oe-selftest -r updater` from a build directory with `MACHINE` set to `qemux86-64`.
20* Updates are forwards- and backwards-compatible. You should be able to update an OTA-enabled build before the change is applied to the version with change applied and vice versa. One should pay double attention to the compatibility when bootloader code is affected. 20* Updates are forwards- and backwards-compatible. You should be able to update an OTA-enabled build before the change is applied to the version with change applied and vice versa. One should pay double attention to the compatibility when bootloader code is affected.
21* The patch/branch should be based on the latest version of the target branch. This may mean that rebasing is necessary if other PRs are merged before yours is approved.
21 22
22We understand that making all these tests might be overly tedious taking in account build times in Yocto. Please add a comment to your PR describing the tests you've made. 23We understand that completing all these tasks might be overly tedious due to build times in Yocto. Please add a comment to your PR describing the tests you've done.
23 24
24== Approval 25== Approval
25PR approval should be accompanied by a comment describing what tests have been made by the reviewer. 26
27PR approval should be accompanied by a comment describing what tests have been done by the reviewer.
diff --git a/README.adoc b/README.adoc
index a2b0e3d..03a588a 100644
--- a/README.adoc
+++ b/README.adoc
@@ -200,14 +200,16 @@ oe-selftest --run-tests updater
200For more information about oe-selftest, including details about how to run individual test modules or classes, please refer to the https://wiki.yoctoproject.org/wiki/Oe-selftest[Yocto Project wiki]. 200For more information about oe-selftest, including details about how to run individual test modules or classes, please refer to the https://wiki.yoctoproject.org/wiki/Oe-selftest[Yocto Project wiki].
201 201
202== Manual provisoning 202== Manual provisoning
203
203As described in <<sota-related-variables-in-localconf,SOTA-related variables in local.conf>> section you can set `SOTA_DEPLOY_CREDENTIALS` to `0` to prevent deploying credentials to the built `wic` image. In this case you get a generic image that you can use e.g. on a production line to flash a series of devices. The cost of this approach is that this image is half-baked and should be provisioned before it can connect to the backend. 204As described in <<sota-related-variables-in-localconf,SOTA-related variables in local.conf>> section you can set `SOTA_DEPLOY_CREDENTIALS` to `0` to prevent deploying credentials to the built `wic` image. In this case you get a generic image that you can use e.g. on a production line to flash a series of devices. The cost of this approach is that this image is half-baked and should be provisioned before it can connect to the backend.
204 205
205Provisioning procedure depends on your provisioning recipe, i.e. the value of `SOTA_CLIENT_PROV` (equal to `aktualizr-auto-prov` by default). 206Provisioning procedure depends on your provisioning recipe, i.e. the value of `SOTA_CLIENT_PROV` (equal to `aktualizr-auto-prov` by default):
207
206* For `aktualizr-auto-prov` put your `credentials.zip` to `/var/sota/sota_provisioning_credentials.zip` on the filesystem of a running device. If you have the filesystem of our device mounted to your build machine, prefix all paths with `/ostree/deploy/poky` as in `/ostree/deploy/poky/var/sota/sota_provisioning_credentials.zip`. 208* For `aktualizr-auto-prov` put your `credentials.zip` to `/var/sota/sota_provisioning_credentials.zip` on the filesystem of a running device. If you have the filesystem of our device mounted to your build machine, prefix all paths with `/ostree/deploy/poky` as in `/ostree/deploy/poky/var/sota/sota_provisioning_credentials.zip`.
207* For `aktualizr-ca-implicit-prov` 209* For `aktualizr-ca-implicit-prov`
208** put URL to the used backend (together with protocol prefix and port number) to `/var/sota/gateway.url`. If you're using HERE OTA Connect, you can find the URL in `autoprov.url` file in your credentials archive. 210** put URL to the backend server (together with protocol prefix and port number) at `/var/sota/gateway.url`. If you're using HERE OTA Connect, you can find the URL in the `autoprov.url` file in your credentials archive.
209** put client certificate, private key and root CA certificate (for the *server*, not for the *device*) to `/var/sota/import/client.pem`, `/var/sota/import/pkey.pem` and `/var/sota/import/root.crt` respectively. 211** put client certificate, private key and root CA certificate (for the *server*, not for the *device*) at `/var/sota/import/client.pem`, `/var/sota/import/pkey.pem` and `/var/sota/import/root.crt` respectively.
210* For `aktualizr-hsm-prov` 212* For `aktualizr-hsm-prov`
211** put URL to the used backend (together with protocol prefix and port number) to `/var/sota/gateway.url`. If you're using HERE OTA Connect, you can find the URL in `autoprov.url` file in your credentials archive. 213** put URL to the server backend (together with protocol prefix and port number) at `/var/sota/gateway.url`. If you're using HERE OTA Connect, you can find the URL in the `autoprov.url` file in your credentials archive.
212** put root CA certificate (for the *server*, not for the *device*) to `/var/sota/import/root.crt`. 214** put root CA certificate (for the *server*, not for the *device*) at `/var/sota/import/root.crt`.
213** put client certificate and private key to slots 1 and 2 of the PKCS#11-compatible device. 215** put client certificate and private key to slots 1 and 2 of the PKCS#11-compatible device.
diff --git a/lib/oeqa/selftest/cases/updater.py b/lib/oeqa/selftest/cases/updater.py
index 38bdcbf..b555d92 100644
--- a/lib/oeqa/selftest/cases/updater.py
+++ b/lib/oeqa/selftest/cases/updater.py
@@ -150,8 +150,6 @@ class AutoProvTests(OESelftestTestCase):
150 self.meta_qemu = None 150 self.meta_qemu = None
151 self.append_config('MACHINE = "qemux86-64"') 151 self.append_config('MACHINE = "qemux86-64"')
152 self.append_config('SOTA_CLIENT_PROV = " aktualizr-auto-prov "') 152 self.append_config('SOTA_CLIENT_PROV = " aktualizr-auto-prov "')
153 # Test aktualizr-example-interface package.
154 self.append_config('IMAGE_INSTALL_append = " aktualizr-examples aktualizr-example-interface "')
155 self.qemu, self.s = qemu_launch(machine='qemux86-64') 153 self.qemu, self.s = qemu_launch(machine='qemux86-64')
156 154
157 def tearDownLocal(self): 155 def tearDownLocal(self):
@@ -185,12 +183,6 @@ class AutoProvTests(OESelftestTestCase):
185 self.assertTrue(ran_ok, 'aktualizr-info failed: ' + stderr.decode() + stdout.decode()) 183 self.assertTrue(ran_ok, 'aktualizr-info failed: ' + stderr.decode() + stdout.decode())
186 184
187 verifyProvisioned(self, machine) 185 verifyProvisioned(self, machine)
188 # Test aktualizr-example-interface package.
189 stdout, stderr, retcode = self.qemu_command('aktualizr-info')
190 self.assertIn(b'hardware ID: example1', stdout,
191 'Legacy secondary initialization failed: ' + stderr.decode() + stdout.decode())
192 self.assertIn(b'hardware ID: example2', stdout,
193 'Legacy secondary initialization failed: ' + stderr.decode() + stdout.decode())
194 186
195 187
196class ManualControlTests(OESelftestTestCase): 188class ManualControlTests(OESelftestTestCase):
@@ -562,6 +554,7 @@ class HsmTests(OESelftestTestCase):
562 554
563 verifyProvisioned(self, machine) 555 verifyProvisioned(self, machine)
564 556
557
565class SecondaryTests(OESelftestTestCase): 558class SecondaryTests(OESelftestTestCase):
566 @classmethod 559 @classmethod
567 def setUpClass(cls): 560 def setUpClass(cls):
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb
index 29164ed..751f529 100755
--- a/recipes-sota/aktualizr/aktualizr_git.bb
+++ b/recipes-sota/aktualizr/aktualizr_git.bb
@@ -26,7 +26,7 @@ SRC_URI = " \
26 file://aktualizr-secondary.socket \ 26 file://aktualizr-secondary.socket \
27 file://aktualizr-serialcan.service \ 27 file://aktualizr-serialcan.service \
28 " 28 "
29SRCREV = "512ad74c0b5339ca7775d8c9461b565a9e6ff5b3" 29SRCREV = "6b0114e4fad0619d16ed2063e8ff10e3fb8500f2"
30BRANCH ?= "master" 30BRANCH ?= "master"
31 31
32S = "${WORKDIR}/git" 32S = "${WORKDIR}/git"
@@ -48,7 +48,6 @@ EXTRA_OECMAKE = "-DWARNING_AS_ERROR=OFF \
48 -DAKTUALIZR_VERSION=${PV} \ 48 -DAKTUALIZR_VERSION=${PV} \
49 -DBUILD_LOAD_TESTS=OFF" 49 -DBUILD_LOAD_TESTS=OFF"
50EXTRA_OECMAKE_append_class-target = " -DBUILD_OSTREE=ON \ 50EXTRA_OECMAKE_append_class-target = " -DBUILD_OSTREE=ON \
51 -DBUILD_ISOTP=ON \
52 ${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', '-DBUILD_P11=ON', '', d)} " 51 ${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', '-DBUILD_P11=ON', '', d)} "
53EXTRA_OECMAKE_append_class-native = " -DBUILD_SOTA_TOOLS=ON \ 52EXTRA_OECMAKE_append_class-native = " -DBUILD_SOTA_TOOLS=ON \
54 -DBUILD_OSTREE=OFF \ 53 -DBUILD_OSTREE=OFF \
@@ -97,8 +96,6 @@ FILES_${PN} = " \
97 96
98FILES_${PN}-examples = " \ 97FILES_${PN}-examples = " \
99 ${libdir}/sota/demo_secondary.json \ 98 ${libdir}/sota/demo_secondary.json \
100 ${bindir}/example-interface \
101 ${bindir}/isotp-test-interface \
102 ${bindir}/hmi_stub \ 99 ${bindir}/hmi_stub \
103 " 100 "
104 101
diff --git a/recipes-sota/config/aktualizr-example-interface.bb b/recipes-sota/config/aktualizr-example-interface.bb
deleted file mode 100644
index ac75352..0000000
--- a/recipes-sota/config/aktualizr-example-interface.bb
+++ /dev/null
@@ -1,21 +0,0 @@
1SUMMARY = "Aktualizr example interface"
2DESCRIPTION = "Aktualizr example interface for legacy secondaries"
3HOMEPAGE = "https://github.com/advancedtelematic/aktualizr"
4SECTION = "base"
5LICENSE = "MPL-2.0"
6LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad"
7
8SRC_URI = " \
9 file://30-example-interface.toml \
10 "
11
12do_install_append () {
13 install -m 0700 -d ${D}${libdir}/sota/conf.d
14 install -m 0644 ${WORKDIR}/30-example-interface.toml ${D}${libdir}/sota/conf.d/30-example-interface.toml
15}
16
17FILES_${PN} = " \
18 ${libdir}/sota/conf.d/30-example-interface.toml \
19 "
20
21# vim:set ts=4 sw=4 sts=4 expandtab:
diff --git a/recipes-sota/config/files/30-example-interface.toml b/recipes-sota/config/files/30-example-interface.toml
deleted file mode 100644
index fc4e9ec..0000000
--- a/recipes-sota/config/files/30-example-interface.toml
+++ /dev/null
@@ -1,2 +0,0 @@
1[uptane]
2legacy_interface = "/usr/bin/example-interface"
diff --git a/recipes-sota/ostree/ostree_git.bb b/recipes-sota/ostree/ostree_git.bb
index 501d636..3e3c951 100644
--- a/recipes-sota/ostree/ostree_git.bb
+++ b/recipes-sota/ostree/ostree_git.bb
@@ -15,7 +15,7 @@ S = "${WORKDIR}/git"
15 15
16BBCLASSEXTEND = "native" 16BBCLASSEXTEND = "native"
17 17
18DEPENDS += "attr bison-native libarchive libcap glib-2.0 gpgme libgsystem fuse e2fsprogs curl xz" 18DEPENDS += "attr bison-native libarchive libcap glib-2.0 gpgme fuse e2fsprogs curl xz"
19DEPENDS += "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" 19DEPENDS += "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
20RDEPENDS_${PN}-dracut = "bash" 20RDEPENDS_${PN}-dracut = "bash"
21 21
diff --git a/recipes-support/libgsystem/libgsystem_git.bb b/recipes-support/libgsystem/libgsystem_git.bb
deleted file mode 100644
index e2b362f..0000000
--- a/recipes-support/libgsystem/libgsystem_git.bb
+++ /dev/null
@@ -1,40 +0,0 @@
1SUMMARY = "GIO-based library, targeted primarily for use by operating system components"
2LICENSE = "GPLv2+"
3LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
4
5SRC_URI = "gitsm://github.com/GNOME/libgsystem.git"
6SRCREV="d606bec68ddfea78de4b03c3f3568afb71bdc1ce"
7
8S = "${WORKDIR}/git"
9
10inherit autotools-brokensep gobject-introspection
11
12DEPENDS += "attr glib-2.0 pkgconfig libcap gtk-doc-native gpgme"
13RDEPENDS_${PN} = "xz "
14RDEPENDS_${PN}_append = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}"
15
16RDEPENDS_${PN}_remove_class-native = "systemd-native"
17
18BBCLASSEXTEND = "native"
19
20export STAGING_INCDIR
21export STAGING_LIBDIR
22
23do_configure() {
24 #NOCONFIGURE=true ./autogen.sh
25 autoreconf -vfi
26 oe_runconf
27}
28
29do_compile_prepend() {
30 export BUILD_SYS="${BUILD_SYS}"
31 export HOST_SYS="${HOST_SYS}"
32}
33
34FILES_${PN} += " \
35 ${datadir} \
36 ${datadir}/gir-1.0 \
37 ${datadir}/gir-1.0/GSystem-1.0.gir \
38 ${libdir}/girepository-1.0/ \
39 ${libdir}/girepository-1.0/GSystem-1.0.typelib \
40"