diff options
36 files changed, 240 insertions, 416 deletions
diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc index 7255a72..69509c3 100644 --- a/CONTRIBUTING.adoc +++ b/CONTRIBUTING.adoc | |||
@@ -10,6 +10,6 @@ We welcome pull requests from everyone. Here are some notes that are useful for | |||
10 | | `require classes/sota_bleeding.inc` | Always build the latest master of Aktualizr | 10 | | `require classes/sota_bleeding.inc` | Always build the latest master of Aktualizr |
11 | | `BRANCH_pn-aktualizr = "mybranch"` | 11 | | `BRANCH_pn-aktualizr = "mybranch"` |
12 | `BRANCH_pn-aktualizr-native = "mybranch"` | Build `mybranch` of Aktualizr (note that both of these need to be set). This will normally be used with `require classes/sota_bleeding.inc` | 12 | `BRANCH_pn-aktualizr-native = "mybranch"` | Build `mybranch` of Aktualizr (note that both of these need to be set). This will normally be used with `require classes/sota_bleeding.inc` |
13 | | `SRCREV_pn-aktualizr = "1004efa3f86cef90c012b34620992b5762b741e3"` | ||
14 | `SRCREV_pn-aktualizr-native = "1004efa3f86cef90c012b34620992b5762b741e3"` | Build the specified revision of Aktualizr (note that both of these need to be set). | ||
13 | | `TOOLCHAIN_HOST_TASK_append = " nativesdk-cmake "` | Use with `bitbake -c populate_sdk core-image-minimal` to build a SDK | 15 | | `TOOLCHAIN_HOST_TASK_append = " nativesdk-cmake "` | Use with `bitbake -c populate_sdk core-image-minimal` to build a SDK |
14 | |||
15 | |||
diff --git a/README.adoc b/README.adoc index e074913..c87bd01 100644 --- a/README.adoc +++ b/README.adoc | |||
@@ -44,6 +44,16 @@ and get as a result an `ostree_repo` folder in your images directory (`tmp/deplo | |||
44 | 44 | ||
45 | Although `aglsetup.sh` hooks provide reasonable defaults for SOTA-related variables, you may want to tune some of them. | 45 | Although `aglsetup.sh` hooks provide reasonable defaults for SOTA-related variables, you may want to tune some of them. |
46 | 46 | ||
47 | === Build problems | ||
48 | |||
49 | Multilib systems may require adding this line to `local.conf`: | ||
50 | |||
51 | .... | ||
52 | HOSTTOOLS += "x86_64-linux-gnu-gcc" | ||
53 | .... | ||
54 | |||
55 | Ubuntu users that encounter an error due to missing `Python.h` should install `libpython2.7-dev` on their host machine. | ||
56 | |||
47 | == Supported boards | 57 | == Supported boards |
48 | 58 | ||
49 | Currently supported platforms are | 59 | Currently supported platforms are |
@@ -123,7 +133,7 @@ The https://github.com/advancedtelematic/aktualizr[aktualizr repo] contains a to | |||
123 | garage-push --repo=/path/to/ostree-repo --ref=mybranch --credentials=/path/to/credentials.zip | 133 | garage-push --repo=/path/to/ostree-repo --ref=mybranch --credentials=/path/to/credentials.zip |
124 | .... | 134 | .... |
125 | 135 | ||
126 | You can set SOTA_PACKED_CREDENTIALS in your local.conf to make your build results be automatically synchronized with a remote server. Credentials are stored in the JSON format described in the https://github.com/advancedtelematic/aktualizr/blob/master/README.sotatools.adoc[garage-push README]. This JSON file can be optionally stored inside a zip file, although if it is stored this way, the JSON file must be named treehub.json. | 136 | You can set `SOTA_PACKED_CREDENTIALS` in your `local.conf` to automatically synchronize your build results with a remote server. Credentials are stored in an archive as described in the https://github.com/advancedtelematic/aktualizr/blob/master/docs/credentials.adoc[aktualizr documentation]. |
127 | 137 | ||
128 | == QA with `oe-selftest` | 138 | == QA with `oe-selftest` |
129 | 139 | ||
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index dcc376d..5ebed81 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | inherit image | 3 | inherit image |
4 | 4 | ||
5 | IMAGE_DEPENDS_ostree = "ostree-native:do_populate_sysroot \ | 5 | do_image_ostree[depends] += "ostree-native:do_populate_sysroot \ |
6 | openssl-native:do_populate_sysroot \ | 6 | openssl-native:do_populate_sysroot \ |
7 | coreutils-native:do_populate_sysroot \ | 7 | coreutils-native:do_populate_sysroot \ |
8 | unzip-native:do_populate_sysroot \ | 8 | unzip-native:do_populate_sysroot \ |
@@ -164,7 +164,7 @@ IMAGE_CMD_ostree () { | |||
164 | } | 164 | } |
165 | 165 | ||
166 | IMAGE_TYPEDEP_ostreepush = "ostree" | 166 | IMAGE_TYPEDEP_ostreepush = "ostree" |
167 | IMAGE_DEPENDS_ostreepush = "aktualizr-native:do_populate_sysroot ca-certificates-native:do_populate_sysroot " | 167 | do_image_ostreepush[depends] += "aktualizr-native:do_populate_sysroot ca-certificates-native:do_populate_sysroot" |
168 | IMAGE_CMD_ostreepush () { | 168 | IMAGE_CMD_ostreepush () { |
169 | # Print warnings if credetials are not set or if the file has not been found. | 169 | # Print warnings if credetials are not set or if the file has not been found. |
170 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then | 170 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then |
@@ -182,7 +182,7 @@ IMAGE_CMD_ostreepush () { | |||
182 | } | 182 | } |
183 | 183 | ||
184 | IMAGE_TYPEDEP_garagesign = "ostreepush" | 184 | IMAGE_TYPEDEP_garagesign = "ostreepush" |
185 | IMAGE_DEPENDS_garagesign = "aktualizr-native:do_populate_sysroot" | 185 | do_image_garage_sign[depends] += "aktualizr-native:do_populate_sysroot" |
186 | IMAGE_CMD_garagesign () { | 186 | IMAGE_CMD_garagesign () { |
187 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then | 187 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then |
188 | # if credentials are issued by a server that doesn't support offline signing, exit silently | 188 | # if credentials are issued by a server that doesn't support offline signing, exit silently |
@@ -227,7 +227,7 @@ IMAGE_CMD_garagesign () { | |||
227 | } | 227 | } |
228 | 228 | ||
229 | IMAGE_TYPEDEP_garagecheck = "ostreepush garagesign" | 229 | IMAGE_TYPEDEP_garagecheck = "ostreepush garagesign" |
230 | IMAGE_DEPENDS_garagecheck = "aktualizr-native:do_populate_sysroot" | 230 | do_image_garagecheck[depends] += "aktualizr-native:do_populate_sysroot" |
231 | IMAGE_CMD_garagecheck () { | 231 | IMAGE_CMD_garagecheck () { |
232 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then | 232 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then |
233 | # if credentials are issued by a server that doesn't support offline signing, exit silently | 233 | # if credentials are issued by a server that doesn't support offline signing, exit silently |
diff --git a/classes/image_types_ota.bbclass b/classes/image_types_ota.bbclass index be9a017..e753e0e 100644 --- a/classes/image_types_ota.bbclass +++ b/classes/image_types_ota.bbclass | |||
@@ -11,7 +11,7 @@ inherit image | |||
11 | 11 | ||
12 | OSTREE_BOOTLOADER ??= 'u-boot' | 12 | OSTREE_BOOTLOADER ??= 'u-boot' |
13 | 13 | ||
14 | IMAGE_DEPENDS_otaimg = "e2fsprogs-native:do_populate_sysroot \ | 14 | do_image_otaimg[depends] += "e2fsprogs-native:do_populate_sysroot \ |
15 | ${@'grub:do_populate_sysroot' if d.getVar('OSTREE_BOOTLOADER', True) == 'grub' else ''} \ | 15 | ${@'grub:do_populate_sysroot' if d.getVar('OSTREE_BOOTLOADER', True) == 'grub' else ''} \ |
16 | ${@'virtual/bootloader:do_deploy' if d.getVar('OSTREE_BOOTLOADER', True) == 'u-boot' else ''}" | 16 | ${@'virtual/bootloader:do_deploy' if d.getVar('OSTREE_BOOTLOADER', True) == 'u-boot' else ''}" |
17 | 17 | ||
diff --git a/classes/sota_qemux86-64.bbclass b/classes/sota_qemux86-64.bbclass index 53e0026..666ad6b 100644 --- a/classes/sota_qemux86-64.bbclass +++ b/classes/sota_qemux86-64.bbclass | |||
@@ -4,7 +4,7 @@ PREFERRED_VERSION_linux-yocto_qemux86-64_sota = "4.4%" | |||
4 | IMAGE_FSTYPES_remove = "wic" | 4 | IMAGE_FSTYPES_remove = "wic" |
5 | 5 | ||
6 | # U-Boot support for SOTA | 6 | # U-Boot support for SOTA |
7 | PREFERRED_PROVIDER_virtual/bootloader_sota = "u-boot-ota" | 7 | PREFERRED_PROVIDER_virtual/bootloader_sota = "u-boot" |
8 | UBOOT_MACHINE_sota = "qemu-x86_defconfig" | 8 | UBOOT_MACHINE_sota = "qemu-x86_defconfig" |
9 | OSTREE_BOOTLOADER ?= "u-boot" | 9 | OSTREE_BOOTLOADER ?= "u-boot" |
10 | 10 | ||
diff --git a/classes/sota_raspberrypi.bbclass b/classes/sota_raspberrypi.bbclass index f8e7347..2c69ea0 100644 --- a/classes/sota_raspberrypi.bbclass +++ b/classes/sota_raspberrypi.bbclass | |||
@@ -1,3 +1,4 @@ | |||
1 | RPI_USE_U_BOOT_sota = "1" | ||
1 | KERNEL_IMAGETYPE_sota = "uImage" | 2 | KERNEL_IMAGETYPE_sota = "uImage" |
2 | PREFERRED_PROVIDER_virtual/bootloader_sota ?= "u-boot" | 3 | PREFERRED_PROVIDER_virtual/bootloader_sota ?= "u-boot" |
3 | UBOOT_MACHINE_raspberrypi2_sota ?= "rpi_2_defconfig" | 4 | UBOOT_MACHINE_raspberrypi2_sota ?= "rpi_2_defconfig" |
diff --git a/conf/include/bblayers/sota.inc b/conf/include/bblayers/sota.inc index 97edecb..26eea22 100644 --- a/conf/include/bblayers/sota.inc +++ b/conf/include/bblayers/sota.inc | |||
@@ -1,5 +1,3 @@ | |||
1 | |||
2 | BBLAYERS += "${METADIR}/meta-updater" | 1 | BBLAYERS += "${METADIR}/meta-updater" |
3 | BBLAYERS += "${METADIR}/meta-openembedded/meta-filesystems" | 2 | BBLAYERS += "${METADIR}/meta-openembedded/meta-filesystems" |
4 | BBLAYERS += "${METADIR}/meta-openembedded/meta-oe" | 3 | BBLAYERS += "${METADIR}/meta-openembedded/meta-oe" |
5 | BBLAYERS += "${METADIR}/meta-rust" | ||
diff --git a/conf/include/bblayers/sota_qemux86-64.inc b/conf/include/bblayers/sota_qemux86-64.inc index 22ace81..12d32ff 100644 --- a/conf/include/bblayers/sota_qemux86-64.inc +++ b/conf/include/bblayers/sota_qemux86-64.inc | |||
@@ -1,2 +1 @@ | |||
1 | |||
2 | BBLAYERS += " ${METADIR}/meta-updater-qemux86-64 " | BBLAYERS += " ${METADIR}/meta-updater-qemux86-64 " | |
diff --git a/conf/include/bblayers/sota_raspberrypi2.inc b/conf/include/bblayers/sota_raspberrypi2.inc index 11ede20..cc26679 100644 --- a/conf/include/bblayers/sota_raspberrypi2.inc +++ b/conf/include/bblayers/sota_raspberrypi2.inc | |||
@@ -1,2 +1,3 @@ | |||
1 | BBLAYERS += " ${METADIR}/meta-openembedded/meta-python " | ||
1 | 2 | ||
2 | BBLAYERS += " ${METADIR}/meta-updater-raspberrypi ${METADIR}/meta-raspberrypi " | 3 | BBLAYERS += " ${METADIR}/meta-updater-raspberrypi ${METADIR}/meta-raspberrypi " |
diff --git a/conf/include/bblayers/sota_raspberrypi3.inc b/conf/include/bblayers/sota_raspberrypi3.inc index 11ede20..cc26679 100644 --- a/conf/include/bblayers/sota_raspberrypi3.inc +++ b/conf/include/bblayers/sota_raspberrypi3.inc | |||
@@ -1,2 +1,3 @@ | |||
1 | BBLAYERS += " ${METADIR}/meta-openembedded/meta-python " | ||
1 | 2 | ||
2 | BBLAYERS += " ${METADIR}/meta-updater-raspberrypi ${METADIR}/meta-raspberrypi " | 3 | BBLAYERS += " ${METADIR}/meta-updater-raspberrypi ${METADIR}/meta-raspberrypi " |
diff --git a/lib/oeqa/selftest/cases/qemucommand.py b/lib/oeqa/selftest/cases/qemucommand.py new file mode 120000 index 0000000..075cdb8 --- /dev/null +++ b/lib/oeqa/selftest/cases/qemucommand.py | |||
@@ -0,0 +1 @@ | |||
../../../../scripts/qemucommand.py \ No newline at end of file | |||
diff --git a/lib/oeqa/selftest/updater.py b/lib/oeqa/selftest/cases/updater.py index 8fbc857..b544762 100644 --- a/lib/oeqa/selftest/updater.py +++ b/lib/oeqa/selftest/cases/updater.py | |||
@@ -6,15 +6,16 @@ import subprocess | |||
6 | import unittest | 6 | import unittest |
7 | from time import sleep | 7 | from time import sleep |
8 | 8 | ||
9 | from oeqa.selftest.base import oeSelfTest | 9 | from oeqa.selftest.case import OESelftestTestCase |
10 | from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars | 10 | from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars |
11 | from oeqa.selftest.qemucommand import QemuCommand | 11 | from qemucommand import QemuCommand |
12 | 12 | ||
13 | 13 | ||
14 | class SotaToolsTests(oeSelfTest): | 14 | class SotaToolsTests(OESelftestTestCase): |
15 | 15 | ||
16 | @classmethod | 16 | @classmethod |
17 | def setUpClass(cls): | 17 | def setUpClass(cls): |
18 | super(SotaToolsTests, cls).setUpClass() | ||
18 | logger = logging.getLogger("selftest") | 19 | logger = logging.getLogger("selftest") |
19 | logger.info('Running bitbake to build aktualizr-native tools') | 20 | logger.info('Running bitbake to build aktualizr-native tools') |
20 | bitbake('aktualizr-native') | 21 | bitbake('aktualizr-native') |
@@ -29,7 +30,7 @@ class SotaToolsTests(oeSelfTest): | |||
29 | akt_native_run(self, 'garage-sign --help') | 30 | akt_native_run(self, 'garage-sign --help') |
30 | 31 | ||
31 | 32 | ||
32 | class GeneralTests(oeSelfTest): | 33 | class GeneralTests(OESelftestTestCase): |
33 | 34 | ||
34 | def test_feature_sota(self): | 35 | def test_feature_sota(self): |
35 | result = get_bb_var('DISTRO_FEATURES').find('sota') | 36 | result = get_bb_var('DISTRO_FEATURES').find('sota') |
@@ -93,10 +94,11 @@ class GeneralTests(oeSelfTest): | |||
93 | self.assertNotEqual(size1, size2, "Image sizes are identical; image was not rebuilt.") | 94 | self.assertNotEqual(size1, size2, "Image sizes are identical; image was not rebuilt.") |
94 | 95 | ||
95 | 96 | ||
96 | class AktualizrToolsTests(oeSelfTest): | 97 | class AktualizrToolsTests(OESelftestTestCase): |
97 | 98 | ||
98 | @classmethod | 99 | @classmethod |
99 | def setUpClass(cls): | 100 | def setUpClass(cls): |
101 | super(AktualizrToolsTests, cls).setUpClass() | ||
100 | logger = logging.getLogger("selftest") | 102 | logger = logging.getLogger("selftest") |
101 | logger.info('Running bitbake to build aktualizr-native tools') | 103 | logger.info('Running bitbake to build aktualizr-native tools') |
102 | bitbake('aktualizr-native') | 104 | bitbake('aktualizr-native') |
@@ -132,15 +134,17 @@ class AktualizrToolsTests(oeSelfTest): | |||
132 | self.assertTrue(os.path.getsize(ca_path) > 0, "Client certificate at %s is empty." % ca_path) | 134 | self.assertTrue(os.path.getsize(ca_path) > 0, "Client certificate at %s is empty." % ca_path) |
133 | 135 | ||
134 | 136 | ||
135 | class QemuTests(oeSelfTest): | 137 | class QemuTests(OESelftestTestCase): |
136 | 138 | ||
137 | @classmethod | 139 | @classmethod |
138 | def setUpClass(cls): | 140 | def setUpClass(cls): |
141 | super(QemuTests, cls).setUpClass() | ||
139 | cls.qemu, cls.s = qemu_launch(machine='qemux86-64') | 142 | cls.qemu, cls.s = qemu_launch(machine='qemux86-64') |
140 | 143 | ||
141 | @classmethod | 144 | @classmethod |
142 | def tearDownClass(cls): | 145 | def tearDownClass(cls): |
143 | qemu_terminate(cls.s) | 146 | qemu_terminate(cls.s) |
147 | super(QemuTests, cls).tearDownClass() | ||
144 | 148 | ||
145 | def qemu_command(self, command): | 149 | def qemu_command(self, command): |
146 | return qemu_send_command(self.qemu.ssh_port, command) | 150 | return qemu_send_command(self.qemu.ssh_port, command) |
@@ -168,12 +172,12 @@ class QemuTests(oeSelfTest): | |||
168 | self.assertTrue(ran_ok, 'aktualizr-info failed: ' + stderr.decode() + stdout.decode()) | 172 | self.assertTrue(ran_ok, 'aktualizr-info failed: ' + stderr.decode() + stdout.decode()) |
169 | 173 | ||
170 | 174 | ||
171 | class GrubTests(oeSelfTest): | 175 | class GrubTests(OESelftestTestCase): |
172 | 176 | ||
173 | def setUpLocal(self): | 177 | def setUpLocal(self): |
174 | # This is a bit of a hack but I can't see a better option. | 178 | # This is a bit of a hack but I can't see a better option. |
175 | path = os.path.abspath(os.path.dirname(__file__)) | 179 | path = os.path.abspath(os.path.dirname(__file__)) |
176 | metadir = path + "/../../../../" | 180 | metadir = path + "/../../../../../" |
177 | grub_config = 'OSTREE_BOOTLOADER = "grub"\nMACHINE = "intel-corei7-64"' | 181 | grub_config = 'OSTREE_BOOTLOADER = "grub"\nMACHINE = "intel-corei7-64"' |
178 | self.append_config(grub_config) | 182 | self.append_config(grub_config) |
179 | self.meta_intel = metadir + "meta-intel" | 183 | self.meta_intel = metadir + "meta-intel" |
@@ -215,7 +219,7 @@ class GrubTests(oeSelfTest): | |||
215 | self.assertTrue(ran_ok, 'aktualizr-info failed: ' + stderr.decode() + stdout.decode()) | 219 | self.assertTrue(ran_ok, 'aktualizr-info failed: ' + stderr.decode() + stdout.decode()) |
216 | 220 | ||
217 | 221 | ||
218 | class ImplProvTests(oeSelfTest): | 222 | class ImplProvTests(OESelftestTestCase): |
219 | 223 | ||
220 | def setUpLocal(self): | 224 | def setUpLocal(self): |
221 | self.append_config('SOTA_CLIENT_PROV = " aktualizr-implicit-prov "') | 225 | self.append_config('SOTA_CLIENT_PROV = " aktualizr-implicit-prov "') |
@@ -287,7 +291,7 @@ class ImplProvTests(oeSelfTest): | |||
287 | logger.info('Device successfully provisioned with ID: ' + m.group(1)) | 291 | logger.info('Device successfully provisioned with ID: ' + m.group(1)) |
288 | 292 | ||
289 | 293 | ||
290 | class HsmTests(oeSelfTest): | 294 | class HsmTests(OESelftestTestCase): |
291 | 295 | ||
292 | def setUpLocal(self): | 296 | def setUpLocal(self): |
293 | self.append_config('SOTA_CLIENT_PROV = "aktualizr-hsm-prov"') | 297 | self.append_config('SOTA_CLIENT_PROV = "aktualizr-hsm-prov"') |
@@ -311,7 +315,8 @@ class HsmTests(oeSelfTest): | |||
311 | # Strip off line ending. | 315 | # Strip off line ending. |
312 | value_str = stdout.decode()[:-1] | 316 | value_str = stdout.decode()[:-1] |
313 | self.assertEqual(value_str, machine, | 317 | self.assertEqual(value_str, machine, |
314 | 'MACHINE does not match hostname: ' + machine + ', ' + value_str) | 318 | 'MACHINE does not match hostname: ' + machine + ', ' + value_str + |
319 | '\nIs tianocore ovmf installed?') | ||
315 | print(value_str) | 320 | print(value_str) |
316 | print('Checking output of aktualizr-info:') | 321 | print('Checking output of aktualizr-info:') |
317 | ran_ok = False | 322 | ran_ok = False |
diff --git a/lib/oeqa/selftest/qemucommand.py b/lib/oeqa/selftest/qemucommand.py deleted file mode 120000 index bc06dde..0000000 --- a/lib/oeqa/selftest/qemucommand.py +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | ../../../scripts/qemucommand.py \ No newline at end of file | ||
diff --git a/recipes-bsp/u-boot/u-boot_2016.11.bb b/recipes-bsp/u-boot/u-boot_2016.11.bb deleted file mode 100644 index acd4bb8..0000000 --- a/recipes-bsp/u-boot/u-boot_2016.11.bb +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | require recipes-bsp/u-boot/u-boot.inc | ||
2 | |||
3 | HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome" | ||
4 | SECTION = "bootloaders" | ||
5 | |||
6 | LICENSE = "GPLv2+" | ||
7 | LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6" | ||
8 | PE = "1" | ||
9 | |||
10 | DEPENDS += "dtc-native" | ||
11 | |||
12 | SRCREV = "5ea3e51fc481613a8dee8c02848d1b42c81ad892" | ||
13 | SRC_URI = "git://git.denx.de/u-boot.git" | ||
14 | S = "${WORKDIR}/git" | ||
15 | |||
16 | PV = "v2016.11+git${SRCPV}" | ||
17 | |||
18 | #This patch is not compliant with u-boot 2016.11 | ||
19 | #Version of u-boot from yocto 2.2 Morty is 2016.03 from: | ||
20 | # meta/recipes-bsp/u-boot/u-boot_2016.03.bb | ||
21 | SRC_URI_remove_raspberrypi3 = "file://0003-Include-lowlevel_init.o-for-rpi2.patch" | ||
22 | SRC_URI_remove_raspberrypi2 = "file://0003-Include-lowlevel_init.o-for-rpi2.patch" | ||
diff --git a/recipes-core/ovmf/files/0001-Compare-c-string-with-NULL-instead-of-a-literal.patch b/recipes-core/ovmf/files/0001-Compare-c-string-with-NULL-instead-of-a-literal.patch deleted file mode 100644 index 6bdaf7e..0000000 --- a/recipes-core/ovmf/files/0001-Compare-c-string-with-NULL-instead-of-a-literal.patch +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | From 6c730f3da7490ffbba5ad17af29ca44ed167cbfc Mon Sep 17 00:00:00 2001 | ||
2 | From: Patrick Vacek <patrickvacek@gmail.com> | ||
3 | Date: Tue, 13 Feb 2018 16:38:15 +0100 | ||
4 | Subject: [PATCH] Compare c-string with NULL instead of a literal. | ||
5 | |||
6 | --- | ||
7 | BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp | 2 +- | ||
8 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
9 | |||
10 | diff --git a/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp b/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp | ||
11 | index 3ca57ed741..4fa066dd9f 100644 | ||
12 | --- a/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp | ||
13 | +++ b/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp | ||
14 | @@ -3372,7 +3372,7 @@ CVfrStringDB::GetVarStoreNameFormStringId ( | ||
15 | UINT8 BlockType; | ||
16 | EFI_HII_STRING_PACKAGE_HDR *PkgHeader; | ||
17 | |||
18 | - if (mStringFileName == '\0' ) { | ||
19 | + if (mStringFileName == NULL ) { | ||
20 | return NULL; | ||
21 | } | ||
22 | |||
23 | -- | ||
24 | 2.14.1 | ||
25 | |||
diff --git a/recipes-core/ovmf/ovmf_%.bbappend b/recipes-core/ovmf/ovmf_%.bbappend deleted file mode 100644 index 142fc53..0000000 --- a/recipes-core/ovmf/ovmf_%.bbappend +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
2 | |||
3 | SRC_URI_append = "file://0001-Compare-c-string-with-NULL-instead-of-a-literal.patch" | ||
diff --git a/recipes-sota/aktualizr/aktualizr-ca-implicit-prov.bb b/recipes-sota/aktualizr/aktualizr-ca-implicit-prov.bb new file mode 100644 index 0000000..51e313d --- /dev/null +++ b/recipes-sota/aktualizr/aktualizr-ca-implicit-prov.bb | |||
@@ -0,0 +1,72 @@ | |||
1 | SUMMARY = "Aktualizr configuration for implicit provisioning with CA" | ||
2 | DESCRIPTION = "Systemd service and configurations for implicitly provisioning Aktualizr using externally provided or generated CA" | ||
3 | |||
4 | # WARNING: it is NOT a production solution. The secure way to provision devices is to create certificate request directly on the device | ||
5 | # (either with HSM/TPM or with software) and then sign it with a CA stored on a disconnected machine | ||
6 | |||
7 | HOMEPAGE = "https://github.com/advancedtelematic/aktualizr" | ||
8 | SECTION = "base" | ||
9 | LICENSE = "MPL-2.0" | ||
10 | LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=9741c346eef56131163e13b9db1241b3" | ||
11 | |||
12 | DEPENDS = "aktualizr-native openssl-native" | ||
13 | RDEPENDS_${PN} = "aktualizr" | ||
14 | |||
15 | SRC_URI = " \ | ||
16 | file://LICENSE \ | ||
17 | file://ca.cnf \ | ||
18 | " | ||
19 | PV = "1.0" | ||
20 | PR = "1" | ||
21 | |||
22 | require environment.inc | ||
23 | require credentials.inc | ||
24 | |||
25 | export SOTA_CACERT_PATH | ||
26 | export SOTA_CAKEY_PATH | ||
27 | |||
28 | do_install() { | ||
29 | install -d ${D}${libdir}/sota | ||
30 | |||
31 | if [ -z "${SOTA_PACKED_CREDENTIALS}" ]; then | ||
32 | bberror "SOTA_PACKED_CREDENTIALS are required for implicit provisioning" | ||
33 | fi | ||
34 | |||
35 | if [ -z ${SOTA_CACERT_PATH} ]; then | ||
36 | SOTA_CACERT_PATH=${DEPLOY_DIR_IMAGE}/CA/cacert.pem | ||
37 | SOTA_CAKEY_PATH=${DEPLOY_DIR_IMAGE}/CA/ca.private.pem | ||
38 | mkdir -p ${DEPLOY_DIR_IMAGE}/CA | ||
39 | bbwarn "SOTA_CACERT_PATH is not specified, use default one at $SOTA_CACERT_PATH" | ||
40 | |||
41 | if [ ! -f ${SOTA_CACERT_PATH} ]; then | ||
42 | bbwarn "${SOTA_CACERT_PATH} does not exist, generate a new CA" | ||
43 | SOTA_CACERT_DIR_PATH="$(dirname "$SOTA_CACERT_PATH")" | ||
44 | openssl genrsa -out ${SOTA_CACERT_DIR_PATH}/ca.private.pem 4096 | ||
45 | openssl req -key ${SOTA_CACERT_DIR_PATH}/ca.private.pem -new -x509 -days 7300 -out ${SOTA_CACERT_PATH} -subj "/C=DE/ST=Berlin/O=Reis und Kichererbsen e.V/commonName=meta-updater" -batch -config ${WORKDIR}/ca.cnf -extensions cacert | ||
46 | bbwarn "${SOTA_CACERT_PATH} has been created, you'll need to upload it to the server" | ||
47 | fi | ||
48 | fi | ||
49 | |||
50 | if [ -z ${SOTA_CAKEY_PATH} ]; then | ||
51 | bberror "SOTA_CAKEY_PATH should be set when using implicit provisioning" | ||
52 | fi | ||
53 | |||
54 | install -d ${D}${libdir}/sota | ||
55 | install -d ${D}${localstatedir}/sota | ||
56 | install -m 0644 ${STAGING_DIR_NATIVE}${libdir}/sota/sota_implicit_prov_ca.toml ${D}${libdir}/sota/sota.toml | ||
57 | aktualizr_cert_provider --credentials ${SOTA_PACKED_CREDENTIALS} \ | ||
58 | --device-ca ${SOTA_CACERT_PATH} \ | ||
59 | --device-ca-key ${SOTA_CAKEY_PATH} \ | ||
60 | --root-ca \ | ||
61 | --server-url \ | ||
62 | --local ${D}${localstatedir}/sota \ | ||
63 | --config ${D}${libdir}/sota/sota.toml | ||
64 | } | ||
65 | |||
66 | FILES_${PN} = " \ | ||
67 | ${localstatedir}/sota/* \ | ||
68 | ${libdir}/sota/sota.toml \ | ||
69 | ${libdir}/sota/root.crt \ | ||
70 | " | ||
71 | |||
72 | # vim:set ts=4 sw=4 sts=4 expandtab: | ||
diff --git a/recipes-sota/aktualizr/aktualizr-hsm-prov.bb b/recipes-sota/aktualizr/aktualizr-hsm-prov.bb index 944607c..5f8da3c 100644 --- a/recipes-sota/aktualizr/aktualizr-hsm-prov.bb +++ b/recipes-sota/aktualizr/aktualizr-hsm-prov.bb | |||
@@ -1,5 +1,5 @@ | |||
1 | SUMMARY = "Aktualizr configuration with HSM support" | 1 | SUMMARY = "Aktualizr configuration with HSM support" |
2 | DESCRIPTION = "Systemd service and configurations for Aktualizr, the SOTA Client application written in C++" | 2 | DESCRIPTION = "Systemd service and configurations for HSM provisioning with Aktualizr, the SOTA Client application written in C++" |
3 | HOMEPAGE = "https://github.com/advancedtelematic/aktualizr" | 3 | HOMEPAGE = "https://github.com/advancedtelematic/aktualizr" |
4 | SECTION = "base" | 4 | SECTION = "base" |
5 | LICENSE = "MPL-2.0" | 5 | LICENSE = "MPL-2.0" |
@@ -14,14 +14,15 @@ SRC_URI = " \ | |||
14 | PV = "1.0" | 14 | PV = "1.0" |
15 | PR = "6" | 15 | PR = "6" |
16 | 16 | ||
17 | |||
18 | require environment.inc | 17 | require environment.inc |
19 | require credentials.inc | 18 | require credentials.inc |
20 | 19 | ||
21 | do_install() { | 20 | do_install() { |
22 | install -d ${D}${libdir}/sota | 21 | install -d ${D}${libdir}/sota |
23 | aktualizr_implicit_writer -c ${SOTA_PACKED_CREDENTIALS} --no-root-ca \ | 22 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then |
24 | -i ${STAGING_DIR_NATIVE}${libdir}/sota/sota_hsm_prov.toml -o ${D}${libdir}/sota/sota.toml -p ${D} | 23 | aktualizr_implicit_writer -c ${SOTA_PACKED_CREDENTIALS} --no-root-ca \ |
24 | -i ${STAGING_DIR_NATIVE}${libdir}/sota/sota_hsm_prov.toml -o ${D}${libdir}/sota/sota.toml -p ${D} | ||
25 | fi | ||
25 | } | 26 | } |
26 | 27 | ||
27 | FILES_${PN} = " \ | 28 | FILES_${PN} = " \ |
diff --git a/recipes-sota/aktualizr/aktualizr-implicit-prov.bb b/recipes-sota/aktualizr/aktualizr-implicit-prov.bb index b5bf420..cf3d22c 100644 --- a/recipes-sota/aktualizr/aktualizr-implicit-prov.bb +++ b/recipes-sota/aktualizr/aktualizr-implicit-prov.bb | |||
@@ -4,15 +4,15 @@ HOMEPAGE = "https://github.com/advancedtelematic/aktualizr" | |||
4 | SECTION = "base" | 4 | SECTION = "base" |
5 | LICENSE = "MPL-2.0" | 5 | LICENSE = "MPL-2.0" |
6 | LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=9741c346eef56131163e13b9db1241b3" | 6 | LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=9741c346eef56131163e13b9db1241b3" |
7 | |||
7 | DEPENDS = "aktualizr-native" | 8 | DEPENDS = "aktualizr-native" |
8 | RDEPENDS_${PN} = "aktualizr" | 9 | RDEPENDS_${PN} = "aktualizr" |
9 | PV = "1.0" | ||
10 | PR = "1" | ||
11 | 10 | ||
12 | SRC_URI = " \ | 11 | SRC_URI = " \ |
13 | file://LICENSE \ | 12 | file://LICENSE \ |
14 | " | 13 | " |
15 | 14 | PV = "1.0" | |
15 | PR = "1" | ||
16 | 16 | ||
17 | require environment.inc | 17 | require environment.inc |
18 | require credentials.inc | 18 | require credentials.inc |
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index cba5f87..4c4e975 100644 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb | |||
@@ -5,8 +5,8 @@ SECTION = "base" | |||
5 | LICENSE = "MPL-2.0" | 5 | LICENSE = "MPL-2.0" |
6 | LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=9741c346eef56131163e13b9db1241b3" | 6 | LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=9741c346eef56131163e13b9db1241b3" |
7 | 7 | ||
8 | DEPENDS = "boost curl openssl libarchive libsodium " | 8 | DEPENDS = "boost curl openssl libarchive libsodium asn1c-native " |
9 | DEPENDS_append_class-target = "jansson ostree ${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', ' libp11', '', d)} " | 9 | DEPENDS_append_class-target = "ostree ${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', ' libp11', '', d)} " |
10 | DEPENDS_append_class-native = "glib-2.0-native " | 10 | DEPENDS_append_class-native = "glib-2.0-native " |
11 | 11 | ||
12 | RDEPENDS_${PN}_class-target = "lshw " | 12 | RDEPENDS_${PN}_class-target = "lshw " |
@@ -50,6 +50,7 @@ do_install_append_class-target () { | |||
50 | aktualizr_service=${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'serialcan', '${WORKDIR}/aktualizr-serialcan.service', '${WORKDIR}/aktualizr.service', d)} | 50 | aktualizr_service=${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'serialcan', '${WORKDIR}/aktualizr-serialcan.service', '${WORKDIR}/aktualizr.service', d)} |
51 | install -m 0644 ${aktualizr_service} ${D}${systemd_unitdir}/system/aktualizr.service | 51 | install -m 0644 ${aktualizr_service} ${D}${systemd_unitdir}/system/aktualizr.service |
52 | } | 52 | } |
53 | |||
53 | do_install_append_class-native () { | 54 | do_install_append_class-native () { |
54 | rm -f ${D}${bindir}/aktualizr | 55 | rm -f ${D}${bindir}/aktualizr |
55 | rm -f ${D}${bindir}/aktualizr-info | 56 | rm -f ${D}${bindir}/aktualizr-info |
@@ -58,6 +59,7 @@ do_install_append_class-native () { | |||
58 | install -m 0644 ${S}/config/sota_autoprov.toml ${D}/${libdir}/sota/sota_autoprov.toml | 59 | install -m 0644 ${S}/config/sota_autoprov.toml ${D}/${libdir}/sota/sota_autoprov.toml |
59 | install -m 0644 ${S}/config/sota_hsm_prov.toml ${D}/${libdir}/sota/sota_hsm_prov.toml | 60 | install -m 0644 ${S}/config/sota_hsm_prov.toml ${D}/${libdir}/sota/sota_hsm_prov.toml |
60 | install -m 0644 ${S}/config/sota_implicit_prov.toml ${D}/${libdir}/sota/sota_implicit_prov.toml | 61 | install -m 0644 ${S}/config/sota_implicit_prov.toml ${D}/${libdir}/sota/sota_implicit_prov.toml |
62 | install -m 0644 ${S}/config/sota_implicit_prov_ca.toml ${D}/${libdir}/sota/sota_implicit_prov_ca.toml | ||
61 | 63 | ||
62 | install -m 0755 ${B}/src/sota_tools/garage-sign-prefix/src/garage-sign/bin/* ${D}${bindir} | 64 | install -m 0755 ${B}/src/sota_tools/garage-sign-prefix/src/garage-sign/bin/* ${D}${bindir} |
63 | install -m 0644 ${B}/src/sota_tools/garage-sign-prefix/src/garage-sign/lib/* ${D}${libdir} | 65 | install -m 0644 ${B}/src/sota_tools/garage-sign-prefix/src/garage-sign/lib/* ${D}${libdir} |
diff --git a/recipes-sota/aktualizr/files/ca.cnf b/recipes-sota/aktualizr/files/ca.cnf new file mode 100644 index 0000000..352ec38 --- /dev/null +++ b/recipes-sota/aktualizr/files/ca.cnf | |||
@@ -0,0 +1,10 @@ | |||
1 | [req] | ||
2 | req_extensions = cacert | ||
3 | distinguished_name = req_distinguished_name | ||
4 | |||
5 | [req_distinguished_name] | ||
6 | |||
7 | [cacert] | ||
8 | basicConstraints = critical,CA:true | ||
9 | keyUsage = keyCertSign | ||
10 | |||
diff --git a/recipes-sota/asn1c/asn1c.bb b/recipes-sota/asn1c/asn1c.bb new file mode 100644 index 0000000..9d1517d --- /dev/null +++ b/recipes-sota/asn1c/asn1c.bb | |||
@@ -0,0 +1,17 @@ | |||
1 | SUMMARY = "ASN.1 to C compiler" | ||
2 | DESCRIPTION = "Generates serialization routines from ASN.1 schemas" | ||
3 | HOMEPAGE = "http://lionet.info/asn1c" | ||
4 | SECTION = "base" | ||
5 | LICENSE = "BSD" | ||
6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=ee8bfaaa7d71cf3edb079475e6716d4b" | ||
7 | |||
8 | inherit autotools native | ||
9 | |||
10 | PV = "0.9.28" | ||
11 | SRC_URI = "https://github.com/vlm/asn1c/releases/download/v${PV}/asn1c-${PV}.tar.gz \ | ||
12 | file://skeletons_dir_fix.patch" | ||
13 | SRC_URI[sha256sum] = "8007440b647ef2dd9fb73d931c33ac11764e6afb2437dbe638bb4e5fc82386b9" | ||
14 | |||
15 | BBCLASSEXTEND = "native nativesdk" | ||
16 | |||
17 | # vim:set ts=4 sw=4 sts=4 expandtab: | ||
diff --git a/recipes-sota/asn1c/files/skeletons_dir_fix.patch b/recipes-sota/asn1c/files/skeletons_dir_fix.patch new file mode 100644 index 0000000..f1caa2f --- /dev/null +++ b/recipes-sota/asn1c/files/skeletons_dir_fix.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From 1a1c2c94f700cf0f4dc5dba863950b16477fdc6d Mon Sep 17 00:00:00 2001 | ||
2 | From: Laurent Bonnans <laurent.bonnans@here.com> | ||
3 | Date: Thu, 25 Jan 2018 09:49:41 +0100 | ||
4 | Subject: [PATCH] Patch the skeletons directory detection | ||
5 | |||
6 | Detect `share/asn1c` from `bin/` if it exists | ||
7 | --- | ||
8 | asn1c/asn1c.c | 9 ++++----- | ||
9 | 1 file changed, 4 insertions(+), 5 deletions(-) | ||
10 | |||
11 | diff --git a/asn1c/asn1c.c b/asn1c/asn1c.c | ||
12 | index eb1eff7c..dd9fc832 100644 | ||
13 | --- a/asn1c/asn1c.c | ||
14 | +++ b/asn1c/asn1c.c | ||
15 | @@ -226,22 +226,21 @@ main(int ac, char **av) { | ||
16 | if(skeletons_dir == NULL) { | ||
17 | struct stat sb; | ||
18 | skeletons_dir = DATADIR; | ||
19 | - if((av[-optind][0] == '.' || av[-optind][1] == '/') | ||
20 | - && stat(skeletons_dir, &sb)) { | ||
21 | + if(stat(skeletons_dir, &sb)) { | ||
22 | /* | ||
23 | * The default skeletons directory does not exist, | ||
24 | * compute it from my file name: | ||
25 | - * ./asn1c/asn1c -> ./skeletons | ||
26 | + * ./asn1c/asn1c -> ./share/asn1c | ||
27 | */ | ||
28 | char *p; | ||
29 | size_t len; | ||
30 | |||
31 | p = a1c_dirname(av[-optind]); | ||
32 | |||
33 | - len = strlen(p) + sizeof("/../skeletons"); | ||
34 | + len = strlen(p) + sizeof("/../share/asn1c"); | ||
35 | skeletons_dir = malloc(len); | ||
36 | assert(skeletons_dir); | ||
37 | - snprintf(skeletons_dir, len, "%s/../skeletons", p); | ||
38 | + snprintf(skeletons_dir, len, "%s/../share/asn1c", p); | ||
39 | if(stat(skeletons_dir, &sb)) { | ||
40 | fprintf(stderr, | ||
41 | "WARNING: skeletons are neither in " | ||
42 | -- | ||
43 | 2.15.1 | ||
44 | |||
diff --git a/recipes-sota/rvi-sota-client/files/sota-client-autoprovision.service b/recipes-sota/rvi-sota-client/files/sota-client-autoprovision.service deleted file mode 100644 index 11b1354..0000000 --- a/recipes-sota/rvi-sota-client/files/sota-client-autoprovision.service +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | [Unit] | ||
2 | Description=SOTA Client Autoprovisioning | ||
3 | Requires=network-online.target | ||
4 | After=network-online.target | ||
5 | |||
6 | [Service] | ||
7 | Type=oneshot | ||
8 | WorkingDirectory=/var/sota | ||
9 | Environment=SOTA_CERT_DIR=/var/sota | ||
10 | ExecStart=/usr/bin/sota_provision.sh sota_provisioning_credentials | ||
11 | RemainAfterExit=true | ||
12 | StandardOutput=journal | ||
13 | |||
14 | [Install] | ||
15 | WantedBy=multi-user.target | ||
diff --git a/recipes-sota/rvi-sota-client/files/sota-client-ostree.service b/recipes-sota/rvi-sota-client/files/sota-client-ostree.service deleted file mode 100644 index 093a994..0000000 --- a/recipes-sota/rvi-sota-client/files/sota-client-ostree.service +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | [Unit] | ||
2 | Description=SOTA Client | ||
3 | Requires=network-online.target | ||
4 | After=network.target network-online.target | ||
5 | |||
6 | [Service] | ||
7 | RestartSec=5 | ||
8 | Restart=on-failure | ||
9 | Environment="RUST_LOG=debug" | ||
10 | ExecStart=/usr/bin/sota_client --config /sysroot/boot/sota.toml --device-package-manager ostree | ||
11 | |||
12 | [Install] | ||
13 | WantedBy=multi-user.target | ||
diff --git a/recipes-sota/rvi-sota-client/files/sota-client-uptane.service b/recipes-sota/rvi-sota-client/files/sota-client-uptane.service deleted file mode 100644 index a2d80ce..0000000 --- a/recipes-sota/rvi-sota-client/files/sota-client-uptane.service +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | [Unit] | ||
2 | Description=SOTA Client | ||
3 | Requires=network-online.target | ||
4 | After=network.target network-online.target | ||
5 | Requires=sota-client-autoprovision | ||
6 | After=sota-client-autoprovision | ||
7 | |||
8 | [Service] | ||
9 | RestartSec=5 | ||
10 | Restart=on-failure | ||
11 | Environment="RUST_LOG=debug" | ||
12 | ExecStart=/usr/bin/sota_client --config /var/sota/sota.toml --device-package-manager uptane | ||
13 | |||
14 | [Install] | ||
15 | WantedBy=multi-user.target | ||
diff --git a/recipes-sota/rvi-sota-client/files/sota-installer.service b/recipes-sota/rvi-sota-client/files/sota-installer.service deleted file mode 100644 index a4fd99e..0000000 --- a/recipes-sota/rvi-sota-client/files/sota-installer.service +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | [Unit] | ||
2 | Description=SOTA Secondary ECU Installer | ||
3 | Requires=network-online.target | ||
4 | After=network-online.target | ||
5 | |||
6 | [Service] | ||
7 | RestartSec=10 | ||
8 | Restart=always | ||
9 | ExecStart=/usr/bin/sota-installer --level debug --oneshot --config /var/sota/installer.toml | ||
10 | |||
11 | [Install] | ||
12 | WantedBy=multi-user.target | ||
diff --git a/recipes-sota/rvi-sota-client/rvi-sota-client.inc b/recipes-sota/rvi-sota-client/rvi-sota-client.inc deleted file mode 100644 index 712b9b3..0000000 --- a/recipes-sota/rvi-sota-client/rvi-sota-client.inc +++ /dev/null | |||
@@ -1,173 +0,0 @@ | |||
1 | inherit cargo systemd | ||
2 | |||
3 | DESCRIPTION = "rvi-sota-client recipe" | ||
4 | HOMEPAGE = "https://github.com/advancedtelematic/rvi_sota_client" | ||
5 | LICENSE = "MPL-2.0" | ||
6 | LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=65d26fcc2f35ea6a181ac777e42db1ea" | ||
7 | |||
8 | BBCLASSEXTEND = "native" | ||
9 | |||
10 | S = "${WORKDIR}/git" | ||
11 | |||
12 | SRC_URI[index.md5sum] = "6a635e8a081b4d4ba4cebffd721c2d7d" | ||
13 | SRC_URI[index.sha256sum] = "1913c41d4b8de89a931b6f9e418f83e70a083e12e6c247e8510ee932571ebae2" | ||
14 | |||
15 | # also update PV and SRC_URI crates when updating SRCREV | ||
16 | SRCREV = "be8ec83af2051a2b2499ce8878242771c65f0f1c" | ||
17 | |||
18 | PR = "1" | ||
19 | |||
20 | # generate with: `make package-version` | ||
21 | PV = "0.2.34-8-gbe8ec83" | ||
22 | |||
23 | # generate with: `make yocto-version` | ||
24 | SRC_URI = " \ | ||
25 | git://github.com/advancedtelematic/rvi_sota_client \ | ||
26 | file://sota-client-autoprovision.service \ | ||
27 | file://sota-client-ostree.service \ | ||
28 | file://sota-client-uptane.service \ | ||
29 | file://sota-installer.service \ | ||
30 | crate://crates.io/adler32/1.0.2 \ | ||
31 | crate://crates.io/advapi32-sys/0.2.0 \ | ||
32 | crate://crates.io/aho-corasick/0.6.3 \ | ||
33 | crate://crates.io/ansi_term/0.9.0 \ | ||
34 | crate://crates.io/antidote/1.0.0 \ | ||
35 | crate://crates.io/atty/0.2.3 \ | ||
36 | crate://crates.io/backtrace/0.3.3 \ | ||
37 | crate://crates.io/backtrace-sys/0.1.15 \ | ||
38 | crate://crates.io/base64/0.6.0 \ | ||
39 | crate://crates.io/bincode/0.9.0 \ | ||
40 | crate://crates.io/bit-set/0.4.0 \ | ||
41 | crate://crates.io/bit-vec/0.4.4 \ | ||
42 | crate://crates.io/bitflags/0.7.0 \ | ||
43 | crate://crates.io/bitflags/0.9.1 \ | ||
44 | crate://crates.io/block-buffer/0.2.0 \ | ||
45 | crate://crates.io/byte-tools/0.2.0 \ | ||
46 | crate://crates.io/byteorder/1.1.0 \ | ||
47 | crate://crates.io/bytes/0.4.5 \ | ||
48 | crate://crates.io/cc/1.0.1 \ | ||
49 | crate://crates.io/cfg-if/0.1.2 \ | ||
50 | crate://crates.io/chan/0.1.19 \ | ||
51 | crate://crates.io/chan-signal/0.3.1 \ | ||
52 | crate://crates.io/chrono/0.4.0 \ | ||
53 | crate://crates.io/clap/2.26.2 \ | ||
54 | crate://crates.io/coco/0.1.1 \ | ||
55 | crate://crates.io/constant_time_eq/0.1.3 \ | ||
56 | crate://crates.io/core-foundation/0.2.3 \ | ||
57 | crate://crates.io/core-foundation-sys/0.2.3 \ | ||
58 | crate://crates.io/crossbeam/0.3.0 \ | ||
59 | crate://crates.io/crypt32-sys/0.2.0 \ | ||
60 | crate://crates.io/crypto-mac/0.4.0 \ | ||
61 | crate://crates.io/dbghelp-sys/0.2.0 \ | ||
62 | crate://crates.io/dbus/0.5.4 \ | ||
63 | crate://crates.io/digest/0.6.2 \ | ||
64 | crate://crates.io/dtoa/0.4.2 \ | ||
65 | crate://crates.io/either/1.2.0 \ | ||
66 | crate://crates.io/env_logger/0.4.3 \ | ||
67 | crate://crates.io/error-chain/0.10.0 \ | ||
68 | crate://crates.io/fake-simd/0.1.2 \ | ||
69 | crate://crates.io/filetime/0.1.14 \ | ||
70 | crate://crates.io/foreign-types/0.2.0 \ | ||
71 | crate://crates.io/fuchsia-zircon/0.2.1 \ | ||
72 | crate://crates.io/fuchsia-zircon-sys/0.2.0 \ | ||
73 | crate://crates.io/futures/0.1.16 \ | ||
74 | crate://crates.io/gcc/0.3.54 \ | ||
75 | crate://crates.io/generic-array/0.8.3 \ | ||
76 | crate://crates.io/getopts/0.2.15 \ | ||
77 | crate://crates.io/hex/0.2.0 \ | ||
78 | crate://crates.io/hmac/0.4.2 \ | ||
79 | crate://crates.io/httparse/1.2.3 \ | ||
80 | crate://crates.io/hyper/0.10.13 \ | ||
81 | crate://crates.io/hyper-native-tls/0.2.4 \ | ||
82 | crate://crates.io/idna/0.1.4 \ | ||
83 | crate://crates.io/iovec/0.1.1 \ | ||
84 | crate://crates.io/itoa/0.3.4 \ | ||
85 | crate://crates.io/kernel32-sys/0.2.2 \ | ||
86 | crate://crates.io/language-tags/0.2.2 \ | ||
87 | crate://crates.io/lazy_static/0.2.9 \ | ||
88 | crate://crates.io/libc/0.2.32 \ | ||
89 | crate://crates.io/libdbus-sys/0.1.1 \ | ||
90 | crate://crates.io/libflate/0.1.11 \ | ||
91 | crate://crates.io/log/0.3.8 \ | ||
92 | crate://crates.io/maplit/0.1.5 \ | ||
93 | crate://crates.io/matches/0.1.6 \ | ||
94 | crate://crates.io/memchr/1.0.1 \ | ||
95 | crate://crates.io/metadeps/1.1.2 \ | ||
96 | crate://crates.io/mime/0.2.6 \ | ||
97 | crate://crates.io/native-tls/0.1.4 \ | ||
98 | crate://crates.io/net2/0.2.31 \ | ||
99 | crate://crates.io/nodrop/0.1.9 \ | ||
100 | crate://crates.io/num/0.1.40 \ | ||
101 | crate://crates.io/num-integer/0.1.35 \ | ||
102 | crate://crates.io/num-iter/0.1.34 \ | ||
103 | crate://crates.io/num-traits/0.1.40 \ | ||
104 | crate://crates.io/num_cpus/1.7.0 \ | ||
105 | crate://crates.io/odds/0.2.25 \ | ||
106 | crate://crates.io/openssl/0.9.19 \ | ||
107 | crate://crates.io/openssl-sys/0.9.19 \ | ||
108 | crate://crates.io/pem/0.4.1 \ | ||
109 | crate://crates.io/percent-encoding/1.0.0 \ | ||
110 | crate://crates.io/pkg-config/0.3.9 \ | ||
111 | crate://crates.io/quote/0.3.15 \ | ||
112 | crate://crates.io/rand/0.3.17 \ | ||
113 | crate://crates.io/rayon/0.8.2 \ | ||
114 | crate://crates.io/rayon-core/1.2.1 \ | ||
115 | crate://crates.io/redox_syscall/0.1.31 \ | ||
116 | crate://crates.io/redox_termios/0.1.1 \ | ||
117 | crate://crates.io/regex/0.2.2 \ | ||
118 | crate://crates.io/regex-syntax/0.4.1 \ | ||
119 | crate://crates.io/reqwest/0.6.2 \ | ||
120 | crate://crates.io/ring/0.12.1 \ | ||
121 | crate://crates.io/rust-crypto/0.2.36 \ | ||
122 | crate://crates.io/rustc-demangle/0.1.5 \ | ||
123 | crate://crates.io/rustc-serialize/0.3.24 \ | ||
124 | crate://crates.io/safemem/0.2.0 \ | ||
125 | crate://crates.io/schannel/0.1.8 \ | ||
126 | crate://crates.io/scopeguard/0.3.2 \ | ||
127 | crate://crates.io/secur32-sys/0.2.0 \ | ||
128 | crate://crates.io/security-framework/0.1.16 \ | ||
129 | crate://crates.io/security-framework-sys/0.1.16 \ | ||
130 | crate://crates.io/serde/1.0.15 \ | ||
131 | crate://crates.io/serde_derive/1.0.15 \ | ||
132 | crate://crates.io/serde_derive_internals/0.16.0 \ | ||
133 | crate://crates.io/serde_json/1.0.3 \ | ||
134 | crate://crates.io/serde_urlencoded/0.5.1 \ | ||
135 | crate://crates.io/sha1/0.2.0 \ | ||
136 | crate://crates.io/sha2/0.6.0 \ | ||
137 | crate://crates.io/strsim/0.6.0 \ | ||
138 | crate://crates.io/syn/0.11.11 \ | ||
139 | crate://crates.io/synom/0.11.3 \ | ||
140 | crate://crates.io/tar/0.4.13 \ | ||
141 | crate://crates.io/tempdir/0.3.5 \ | ||
142 | crate://crates.io/term_size/0.3.0 \ | ||
143 | crate://crates.io/termion/1.5.1 \ | ||
144 | crate://crates.io/textwrap/0.8.0 \ | ||
145 | crate://crates.io/thread_local/0.3.4 \ | ||
146 | crate://crates.io/time/0.1.38 \ | ||
147 | crate://crates.io/toml/0.2.1 \ | ||
148 | crate://crates.io/toml/0.4.5 \ | ||
149 | crate://crates.io/traitobject/0.1.0 \ | ||
150 | crate://crates.io/tungstenite/0.5.0 \ | ||
151 | crate://crates.io/typeable/0.1.2 \ | ||
152 | crate://crates.io/typenum/1.9.0 \ | ||
153 | crate://crates.io/unicase/1.4.2 \ | ||
154 | crate://crates.io/unicode-bidi/0.3.4 \ | ||
155 | crate://crates.io/unicode-normalization/0.1.5 \ | ||
156 | crate://crates.io/unicode-width/0.1.4 \ | ||
157 | crate://crates.io/unicode-xid/0.0.4 \ | ||
158 | crate://crates.io/unix_socket/0.5.0 \ | ||
159 | crate://crates.io/unreachable/1.0.0 \ | ||
160 | crate://crates.io/untrusted/0.5.1 \ | ||
161 | crate://crates.io/url/1.5.1 \ | ||
162 | crate://crates.io/utf-8/0.7.1 \ | ||
163 | crate://crates.io/utf8-ranges/1.0.0 \ | ||
164 | crate://crates.io/uuid/0.5.1 \ | ||
165 | crate://crates.io/vcpkg/0.2.2 \ | ||
166 | crate://crates.io/vec_map/0.8.0 \ | ||
167 | crate://crates.io/version_check/0.1.3 \ | ||
168 | crate://crates.io/void/1.0.2 \ | ||
169 | crate://crates.io/winapi/0.2.8 \ | ||
170 | crate://crates.io/winapi-build/0.1.1 \ | ||
171 | crate://crates.io/ws2_32-sys/0.2.1 \ | ||
172 | crate://crates.io/xattr/0.1.11 \ | ||
173 | " | ||
diff --git a/recipes-sota/rvi-sota-client/rvi-sota-client_git.bb b/recipes-sota/rvi-sota-client/rvi-sota-client_git.bb deleted file mode 100644 index e286598..0000000 --- a/recipes-sota/rvi-sota-client/rvi-sota-client_git.bb +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | require rvi-sota-client.inc | ||
2 | |||
3 | |||
4 | SYSTEMD_SERVICE_${PN} = "sota-client.service sota-client-autoprovision.service" | ||
5 | |||
6 | FILES_${PN} = " \ | ||
7 | /lib64 \ | ||
8 | ${bindir}/sota_client \ | ||
9 | ${bindir}/sota_sysinfo.sh \ | ||
10 | ${bindir}/sota_provision.sh \ | ||
11 | ${sysconfdir}/sota_client.version \ | ||
12 | ${sysconfdir}/sota_certificates \ | ||
13 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_unitdir}/system/sota-client.service', '', d)} \ | ||
14 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_unitdir}/system/sota-client-autoprovision.service', '', d)} \ | ||
15 | " | ||
16 | |||
17 | DEPENDS += " openssl openssl-native dbus " | ||
18 | RDEPENDS_${PN} = " \ | ||
19 | bash \ | ||
20 | curl \ | ||
21 | libcrypto \ | ||
22 | libssl \ | ||
23 | lshw \ | ||
24 | jq \ | ||
25 | python-petname \ | ||
26 | sota-launcher \ | ||
27 | zip \ | ||
28 | " | ||
29 | |||
30 | export SOTA_PACKED_CREDENTIALS | ||
31 | |||
32 | do_compile_prepend() { | ||
33 | export SOTA_VERSION=$(make sota-version) | ||
34 | cd sota-client | ||
35 | } | ||
36 | |||
37 | do_install() { | ||
38 | ln -fs /lib ${D}/lib64 | ||
39 | |||
40 | install -d ${D}${bindir} | ||
41 | install -d ${D}${sysconfdir} | ||
42 | |||
43 | echo `git log -1 --pretty=format:%H` > ${D}${sysconfdir}/sota_client.version | ||
44 | install -c ${S}/sota-client/docker/sota_certificates ${D}${sysconfdir} | ||
45 | |||
46 | install -m 0755 target/${TARGET_SYS}/release/sota_client ${D}${bindir} | ||
47 | install -m 0755 ${S}/sota-client/docker/sota_provision.sh ${D}${bindir} | ||
48 | install -m 0755 ${S}/sota-client/docker/sota_sysinfo.sh ${D}${bindir} | ||
49 | |||
50 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
51 | install -d ${D}/${systemd_unitdir}/system | ||
52 | if [ -n "$SOTA_PACKED_CREDENTIALS" ]; then | ||
53 | install -m 0644 ${WORKDIR}/sota-client-uptane.service ${D}/${systemd_unitdir}/system/sota-client.service | ||
54 | else | ||
55 | install -m 0644 ${WORKDIR}/sota-client-ostree.service ${D}/${systemd_unitdir}/system/sota-client.service | ||
56 | fi | ||
57 | install -m 0644 ${WORKDIR}/sota-client-autoprovision.service ${D}/${systemd_unitdir}/system/sota-client-autoprovision.service | ||
58 | fi | ||
59 | } | ||
diff --git a/recipes-sota/rvi-sota-client/sota-installer_git.bb b/recipes-sota/rvi-sota-client/sota-installer_git.bb deleted file mode 100644 index 09f6e5d..0000000 --- a/recipes-sota/rvi-sota-client/sota-installer_git.bb +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | require rvi-sota-client.inc | ||
2 | |||
3 | |||
4 | SYSTEMD_SERVICE_${PN} = "sota-installer.service" | ||
5 | |||
6 | DEPENDS += " rvi-sota-client " | ||
7 | |||
8 | FILES_${PN} = " \ | ||
9 | ${bindir}/sota-installer \ | ||
10 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_unitdir}/system/sota-installer.service', '', d)} \ | ||
11 | " | ||
12 | |||
13 | do_compile_prepend() { | ||
14 | cd sota-installer | ||
15 | } | ||
16 | |||
17 | do_install() { | ||
18 | install -d ${D}${bindir} | ||
19 | install -m 0755 target/${TARGET_SYS}/release/sota-installer ${D}${bindir} | ||
20 | |||
21 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
22 | install -d ${D}/${systemd_unitdir}/system | ||
23 | install -m 0644 ${WORKDIR}/sota-installer.service ${D}/${systemd_unitdir}/system/sota-installer.service | ||
24 | fi | ||
25 | } | ||
diff --git a/recipes-sota/rvi-sota-client/sota-launcher_git.bb b/recipes-sota/rvi-sota-client/sota-launcher_git.bb deleted file mode 100644 index e9874e7..0000000 --- a/recipes-sota/rvi-sota-client/sota-launcher_git.bb +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | require rvi-sota-client.inc | ||
2 | |||
3 | |||
4 | DEPENDS += " rvi-sota-client " | ||
5 | FILES_${PN} = "${bindir}/sota-launcher" | ||
6 | |||
7 | |||
8 | do_compile_prepend() { | ||
9 | cd sota-launcher | ||
10 | } | ||
11 | |||
12 | do_install() { | ||
13 | install -d ${D}${bindir} | ||
14 | install -m 0755 target/${TARGET_SYS}/release/sota-launcher ${D}${bindir} | ||
15 | } | ||
diff --git a/recipes-support/libp11/files/0001-Workaround-for-a-buggy-version-of-openssl-1.0.2m.patch b/recipes-support/libp11/files/0001-Workaround-for-a-buggy-version-of-openssl-1.0.2m.patch new file mode 100644 index 0000000..bd233ee --- /dev/null +++ b/recipes-support/libp11/files/0001-Workaround-for-a-buggy-version-of-openssl-1.0.2m.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From ccab5ce63dd5d3dbb4bd02998d21d34407e550f2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Anton Gerasimov <anton.gerasimov@here.com> | ||
3 | Date: Fri, 19 Jan 2018 12:44:27 +0100 | ||
4 | Subject: [PATCH] Workaround for a buggy version of openssl (1.0.2m) | ||
5 | |||
6 | --- | ||
7 | src/p11_pkey.c | 12 +++++++++--- | ||
8 | 1 file changed, 9 insertions(+), 3 deletions(-) | ||
9 | |||
10 | diff --git a/src/p11_pkey.c b/src/p11_pkey.c | ||
11 | index 45d5ad3..75625e6 100644 | ||
12 | --- a/src/p11_pkey.c | ||
13 | +++ b/src/p11_pkey.c | ||
14 | @@ -139,8 +139,14 @@ static void EVP_PKEY_meth_copy(EVP_PKEY_METHOD *dst, const EVP_PKEY_METHOD *src) | ||
15 | |||
16 | #endif | ||
17 | |||
18 | -#if OPENSSL_VERSION_NUMBER < 0x100020d0L || defined(LIBRESSL_VERSION_NUMBER) | ||
19 | -static void EVP_PKEY_meth_get_sign(EVP_PKEY_METHOD *pmeth, | ||
20 | +#if OPENSSL_VERSION_NUMBER < 0x100020f0L || defined(LIBRESSL_VERSION_NUMBER) | ||
21 | + | ||
22 | +# if (OPENSSL_VERSION_NUMBER & 0xFFFFFFF0) == 0x100020d0L | ||
23 | +# undef EVP_PKEY_meth_get_sign | ||
24 | +# undef EVP_PKEY_meth_get_decrypt | ||
25 | +# endif | ||
26 | + | ||
27 | +void EVP_PKEY_meth_get_sign(EVP_PKEY_METHOD *pmeth, | ||
28 | int (**psign_init) (EVP_PKEY_CTX *ctx), | ||
29 | int (**psign) (EVP_PKEY_CTX *ctx, | ||
30 | unsigned char *sig, size_t *siglen, | ||
31 | @@ -152,7 +158,7 @@ static void EVP_PKEY_meth_get_sign(EVP_PKEY_METHOD *pmeth, | ||
32 | *psign = pmeth->sign; | ||
33 | } | ||
34 | |||
35 | -static void EVP_PKEY_meth_get_decrypt(EVP_PKEY_METHOD *pmeth, | ||
36 | +void EVP_PKEY_meth_get_decrypt(EVP_PKEY_METHOD *pmeth, | ||
37 | int (**pdecrypt_init) (EVP_PKEY_CTX *ctx), | ||
38 | int (**pdecrypt) (EVP_PKEY_CTX *ctx, | ||
39 | unsigned char *out, | ||
40 | -- | ||
41 | 2.15.1 | ||
42 | |||
diff --git a/recipes-support/libp11/libp11_0.4.7.bb b/recipes-support/libp11/libp11_0.4.7.bb index 877a57e..02d9e50 100644 --- a/recipes-support/libp11/libp11_0.4.7.bb +++ b/recipes-support/libp11/libp11_0.4.7.bb | |||
@@ -9,7 +9,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=fad9b3332be894bab9bc501572864b29" | |||
9 | DEPENDS = "libtool openssl" | 9 | DEPENDS = "libtool openssl" |
10 | RDEPENDS_${PN} += " opensc" | 10 | RDEPENDS_${PN} += " opensc" |
11 | 11 | ||
12 | SRC_URI = "git://github.com/OpenSC/libp11.git" | 12 | SRC_URI = "git://github.com/OpenSC/libp11.git \ |
13 | file://0001-Workaround-for-a-buggy-version-of-openssl-1.0.2m.patch" | ||
13 | SRCREV = "da725ab727342083478150a203a3c80c4551feb4" | 14 | SRCREV = "da725ab727342083478150a203a3c80c4551feb4" |
14 | 15 | ||
15 | S = "${WORKDIR}/git" | 16 | S = "${WORKDIR}/git" |
diff --git a/recipes-support/util-linux/util-linux_%.bbappend b/recipes-support/util-linux/util-linux_%.bbappend deleted file mode 100644 index d653bb2..0000000 --- a/recipes-support/util-linux/util-linux_%.bbappend +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | PACKAGES_append_class-native = "${@bb.utils.contains('DISTRO_FEATURES', 'sota', ' util-linux-agetty-native util-linux-fdisk-native util-linux-cfdisk-native util-linux-sfdisk-native util-linux-swaponoff-native util-linux-losetup-native util-linux-umount-native util-linux-mount-native util-linux-readprofile-native util-linux-uuidd-native util-linux-uuidgen-native util-linux-lscpu-native util-linux-fsck-native util-linux-blkid util-linux-mkfs-native util-linux-mcookie-native util-linux-reset-native util-linux-mkfs.cramfs-native util-linux-fsck.cramfs-native util-linux-fstrim-native util-linux-partx-native ${PN}-bash-completion-native util-linux-hwclock util-linux-findfs-native util-linux-getopt-native util-linux-sulogin-native', ' ', d)}" | ||
2 | |||
3 | PACKAGES_append_class-native = "${@' util-linux-pylibmount-native' if bb.utils.contains('DISTRO_FEATURES', 'sota', True, False, d) and bb.utils.contains('PACKAGECONFIG', 'pylibmount', True, False, d) else ' '}" | ||
diff --git a/scripts/lib/wic/plugins/source/otaimage.py b/scripts/lib/wic/plugins/source/otaimage.py index 26cfb10..ee8088b 100644 --- a/scripts/lib/wic/plugins/source/otaimage.py +++ b/scripts/lib/wic/plugins/source/otaimage.py | |||
@@ -20,7 +20,7 @@ import os | |||
20 | import sys | 20 | import sys |
21 | 21 | ||
22 | from wic.plugins.source.rawcopy import RawCopyPlugin | 22 | from wic.plugins.source.rawcopy import RawCopyPlugin |
23 | from wic.utils.misc import get_bitbake_var | 23 | from wic.misc import get_bitbake_var |
24 | 24 | ||
25 | logger = logging.getLogger('wic') | 25 | logger = logging.getLogger('wic') |
26 | 26 | ||
diff --git a/scripts/qemucommand.py b/scripts/qemucommand.py index 7ae9381..6b1106d 100644 --- a/scripts/qemucommand.py +++ b/scripts/qemucommand.py | |||
@@ -73,7 +73,7 @@ class QemuCommand(object): | |||
73 | try: | 73 | try: |
74 | check_output(['kvm-ok']) | 74 | check_output(['kvm-ok']) |
75 | self.kvm = True | 75 | self.kvm = True |
76 | except CalledProcessError: | 76 | except Exception: |
77 | self.kvm = False | 77 | self.kvm = False |
78 | else: | 78 | else: |
79 | self.kvm = args.kvm | 79 | self.kvm = args.kvm |