diff options
author | Laurent Bonnans <laurent.bonnans@here.com> | 2019-10-15 18:58:24 +0200 |
---|---|---|
committer | Patrick Vacek <patrickvacek@gmail.com> | 2019-10-17 17:03:38 +0200 |
commit | 9ff5720ec9914e15c23ec45109977d153c65facc (patch) | |
tree | b6a40a81b3866ab529066f01c74293e950c248cd /recipes-sota/aktualizr | |
parent | d1118a121810c5c76e33a63909d43b4e25439250 (diff) | |
download | meta-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>
Diffstat (limited to 'recipes-sota/aktualizr')
-rw-r--r-- | recipes-sota/aktualizr/aktualizr-hwid.bb | 23 | ||||
-rw-r--r-- | recipes-sota/aktualizr/aktualizr_git.bb | 6 |
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 @@ | |||
1 | SUMMARY = "Aktualizr hwid configuration" | ||
2 | HOMEPAGE = "https://github.com/advancedtelematic/aktualizr" | ||
3 | SECTION = "base" | ||
4 | LICENSE = "MPL-2.0" | ||
5 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad" | ||
6 | |||
7 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
8 | |||
9 | SRC_URI = "" | ||
10 | |||
11 | do_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 | |||
18 | FILES_${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 | ||
8 | DEPENDS = "boost curl openssl libarchive libsodium sqlite3 asn1c-native" | 8 | DEPENDS = "boost curl openssl libarchive libsodium sqlite3 asn1c-native" |
9 | DEPENDS_append = "${@bb.utils.contains('PTEST_ENABLED', '1', ' coreutils-native net-tools-native ostree-native aktualizr-native ', '', d)}" | 9 | DEPENDS_append = "${@bb.utils.contains('PTEST_ENABLED', '1', ' coreutils-native net-tools-native ostree-native aktualizr-native ', '', d)}" |
10 | RDEPENDS_${PN}_class-target = "aktualizr-configs lshw" | 10 | RDEPENDS_${PN}_class-target = "aktualizr-configs aktualizr-hwid lshw" |
11 | RDEPENDS_${PN}-host-tools = "aktualizr aktualizr-cert-provider ${@bb.utils.contains('PACKAGECONFIG', 'sota-tools', 'garage-deploy garage-push', '', d)}" | 11 | RDEPENDS_${PN}-host-tools = "aktualizr aktualizr-cert-provider ${@bb.utils.contains('PACKAGECONFIG', 'sota-tools', 'garage-deploy garage-push', '', d)}" |
12 | 12 | ||
13 | RDEPENDS_${PN}-ptest += "bash cmake curl net-tools python3-core python3-misc python3-modules openssl-bin sqlite3 valgrind" | 13 | RDEPENDS_${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 |