summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Bonnans <laurent.bonnans@here.com>2019-10-15 18:58:24 +0200
committerPatrick Vacek <patrickvacek@gmail.com>2019-10-17 17:03:38 +0200
commit9ff5720ec9914e15c23ec45109977d153c65facc (patch)
treeb6a40a81b3866ab529066f01c74293e950c248cd
parentd1118a121810c5c76e33a63909d43b4e25439250 (diff)
downloadmeta-updater-9ff5720ec9914e15c23ec45109977d153c65facc.tar.gz
Split aktualizr hwid config to another recipe
So that we can fix the ${MACHINE} dependency issues Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
-rw-r--r--recipes-sota/aktualizr/aktualizr-hwid.bb23
-rw-r--r--recipes-sota/aktualizr/aktualizr_git.bb6
2 files changed, 24 insertions, 5 deletions
diff --git a/recipes-sota/aktualizr/aktualizr-hwid.bb b/recipes-sota/aktualizr/aktualizr-hwid.bb
new file mode 100644
index 0000000..64b1bda
--- /dev/null
+++ b/recipes-sota/aktualizr/aktualizr-hwid.bb
@@ -0,0 +1,23 @@
1SUMMARY = "Aktualizr hwid configuration"
2HOMEPAGE = "https://github.com/advancedtelematic/aktualizr"
3SECTION = "base"
4LICENSE = "MPL-2.0"
5LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad"
6
7PACKAGE_ARCH = "${MACHINE_ARCH}"
8
9SRC_URI = ""
10
11do_install() {
12 install -m 0700 -d ${D}${libdir}/sota/conf.d
13 if [ -n "${SOTA_HARDWARE_ID}" ]; then
14 printf "[provision]\nprimary_ecu_hardware_id = ${SOTA_HARDWARE_ID}\n" > ${D}${libdir}/sota/conf.d/40-hardware-id.toml
15 fi
16}
17
18FILES_${PN} = " \
19 ${libdir}/sota/conf.d \
20 ${libdir}/sota/conf.d/40-hardware-id.toml \
21 "
22
23# vim:set ts=4 sw=4 sts=4 expandtab:
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb
index d878d88..0de0866 100644
--- a/recipes-sota/aktualizr/aktualizr_git.bb
+++ b/recipes-sota/aktualizr/aktualizr_git.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=815ca599c9df247a0c7f619bab123dad"
7 7
8DEPENDS = "boost curl openssl libarchive libsodium sqlite3 asn1c-native" 8DEPENDS = "boost curl openssl libarchive libsodium sqlite3 asn1c-native"
9DEPENDS_append = "${@bb.utils.contains('PTEST_ENABLED', '1', ' coreutils-native net-tools-native ostree-native aktualizr-native ', '', d)}" 9DEPENDS_append = "${@bb.utils.contains('PTEST_ENABLED', '1', ' coreutils-native net-tools-native ostree-native aktualizr-native ', '', d)}"
10RDEPENDS_${PN}_class-target = "aktualizr-configs lshw" 10RDEPENDS_${PN}_class-target = "aktualizr-configs aktualizr-hwid lshw"
11RDEPENDS_${PN}-host-tools = "aktualizr aktualizr-cert-provider ${@bb.utils.contains('PACKAGECONFIG', 'sota-tools', 'garage-deploy garage-push', '', d)}" 11RDEPENDS_${PN}-host-tools = "aktualizr aktualizr-cert-provider ${@bb.utils.contains('PACKAGECONFIG', 'sota-tools', 'garage-deploy garage-push', '', d)}"
12 12
13RDEPENDS_${PN}-ptest += "bash cmake curl net-tools python3-core python3-misc python3-modules openssl-bin sqlite3 valgrind" 13RDEPENDS_${PN}-ptest += "bash cmake curl net-tools python3-core python3-misc python3-modules openssl-bin sqlite3 valgrind"
@@ -105,10 +105,6 @@ do_install_append () {
105 install -m 0700 -d ${D}${libdir}/sota/conf.d 105 install -m 0700 -d ${D}${libdir}/sota/conf.d
106 install -m 0700 -d ${D}${sysconfdir}/sota/conf.d 106 install -m 0700 -d ${D}${sysconfdir}/sota/conf.d
107 107
108 if [ -n "${SOTA_HARDWARE_ID}" ]; then
109 printf "[provision]\nprimary_ecu_hardware_id = ${SOTA_HARDWARE_ID}\n" > ${D}${libdir}/sota/conf.d/40-hardware-id.toml
110 fi
111
112 install -m 0755 -d ${D}${systemd_unitdir}/system 108 install -m 0755 -d ${D}${systemd_unitdir}/system
113 aktualizr_service=${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'serialcan', '${WORKDIR}/aktualizr-serialcan.service', '${WORKDIR}/aktualizr.service', d)} 109 aktualizr_service=${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'serialcan', '${WORKDIR}/aktualizr-serialcan.service', '${WORKDIR}/aktualizr.service', d)}
114 install -m 0644 ${aktualizr_service} ${D}${systemd_unitdir}/system/aktualizr.service 110 install -m 0644 ${aktualizr_service} ${D}${systemd_unitdir}/system/aktualizr.service