diff options
Diffstat (limited to 'recipes-sota/aktualizr/aktualizr_git.bb')
-rw-r--r-- | recipes-sota/aktualizr/aktualizr_git.bb | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index 17aa15a..0427c3c 100644 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb | |||
@@ -3,11 +3,11 @@ DESCRIPTION = "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" |
6 | LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=9741c346eef56131163e13b9db1241b3" | 6 | 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 python3-misc python3-modules openssl-bin sqlite3 valgrind" | 13 | RDEPENDS_${PN}-ptest += "bash cmake curl python3-misc python3-modules openssl-bin sqlite3 valgrind" |
@@ -15,23 +15,22 @@ RDEPENDS_${PN}-ptest += "bash cmake curl python3-misc python3-modules openssl-bi | |||
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-33-g214dfb1" | 18 | GARAGE_SIGN_PV = "0.7.0-49-g5ffd420" |
19 | 19 | ||
20 | SRC_URI = " \ | 20 | SRC_URI = " \ |
21 | gitsm://github.com/advancedtelematic/aktualizr;branch=${BRANCH} \ | 21 | gitsm://github.com/advancedtelematic/aktualizr;branch=${BRANCH};name=aktualizr \ |
22 | file://run-ptest \ | 22 | file://run-ptest \ |
23 | file://aktualizr.service \ | 23 | file://aktualizr.service \ |
24 | file://aktualizr-secondary.service \ | 24 | file://aktualizr-secondary.service \ |
25 | file://aktualizr-serialcan.service \ | 25 | file://aktualizr-serialcan.service \ |
26 | file://10-resource-control.conf \ | 26 | file://10-resource-control.conf \ |
27 | ${@ d.expand("https://ats-tuf-cli-releases.s3-eu-central-1.amazonaws.com/cli-${GARAGE_SIGN_PV}.tgz;unpack=0") 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 | # for garage-sign archive | 30 | SRC_URI[garagesign.md5sum] = "de0877ecb693fd48ec11052e51b0ff1a" |
31 | SRC_URI[md5sum] = "66ffe8dcd61d4c15646e1c4b7dde7401" | 31 | SRC_URI[garagesign.sha256sum] = "cf25759574c9c1206835daeaf6fc345f6db7b5ccdb95fb828c86d7451f78f0aa" |
32 | SRC_URI[sha256sum] = "7a7193ddf7e1a33ea60fbb20f98318a8bd78c325dab391d8c4ebd644a738abdc" | ||
33 | 32 | ||
34 | SRCREV = "3bb9fe91b4c614a79373beadc721272fcf7acce2" | 33 | SRCREV = "fa59e33208d3b1dc690a30ce8339b3b4162f8022" |
35 | BRANCH ?= "master" | 34 | BRANCH ?= "master" |
36 | 35 | ||
37 | S = "${WORKDIR}/git" | 36 | S = "${WORKDIR}/git" |
@@ -46,11 +45,11 @@ SYSTEMD_PACKAGES = "${PN} ${PN}-secondary" | |||
46 | SYSTEMD_SERVICE_${PN} = "aktualizr.service" | 45 | SYSTEMD_SERVICE_${PN} = "aktualizr.service" |
47 | SYSTEMD_SERVICE_${PN}-secondary = "aktualizr-secondary.service" | 46 | SYSTEMD_SERVICE_${PN}-secondary = "aktualizr-secondary.service" |
48 | 47 | ||
49 | EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release -DAKTUALIZR_VERSION=${PV} ${@bb.utils.contains('PTEST_ENABLED', '1', '-DTESTSUITE_VALGRIND=on', '', d)}" | 48 | EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release ${@bb.utils.contains('PTEST_ENABLED', '1', '-DTESTSUITE_VALGRIND=on', '', d)}" |
50 | 49 | ||
51 | GARAGE_SIGN_OPS = "${@ d.expand('-DGARAGE_SIGN_ARCHIVE=${WORKDIR}/cli-${GARAGE_SIGN_PV}.tgz') if d.getVar('GARAGE_SIGN_AUTOVERSION') != '1' else ''}" | 50 | GARAGE_SIGN_OPS = "${@ d.expand('-DGARAGE_SIGN_ARCHIVE=${WORKDIR}/cli-${GARAGE_SIGN_PV}.tgz') if d.getVar('GARAGE_SIGN_AUTOVERSION') != '1' else ''}" |
52 | 51 | ||
53 | PACKAGECONFIG ?= "ostree ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} ${@bb.utils.filter('SOTA_CLIENT_FEATURES', 'hsm serialcan ubootenv', d)}" | 52 | PACKAGECONFIG ?= "ostree ${@bb.utils.filter('SOTA_CLIENT_FEATURES', 'hsm serialcan ubootenv', d)}" |
54 | PACKAGECONFIG_class-native = "sota-tools" | 53 | PACKAGECONFIG_class-native = "sota-tools" |
55 | PACKAGECONFIG[warning-as-error] = "-DWARNING_AS_ERROR=ON,-DWARNING_AS_ERROR=OFF," | 54 | PACKAGECONFIG[warning-as-error] = "-DWARNING_AS_ERROR=ON,-DWARNING_AS_ERROR=OFF," |
56 | PACKAGECONFIG[ostree] = "-DBUILD_OSTREE=ON,-DBUILD_OSTREE=OFF,ostree," | 55 | PACKAGECONFIG[ostree] = "-DBUILD_OSTREE=ON,-DBUILD_OSTREE=OFF,ostree," |
@@ -70,6 +69,14 @@ RESOURCE_CPU_WEIGHT = "100" | |||
70 | RESOURCE_MEMORY_HIGH = "100M" | 69 | RESOURCE_MEMORY_HIGH = "100M" |
71 | RESOURCE_MEMORY_MAX = "80%" | 70 | RESOURCE_MEMORY_MAX = "80%" |
72 | 71 | ||
72 | do_configure_prepend() { | ||
73 | # CMake has trouble finding yocto's git when cross-compiling, let's do this step manually | ||
74 | cd ${S} | ||
75 | if [ ! -f VERSION ]; then | ||
76 | ./scripts/get_version.sh > VERSION | ||
77 | fi | ||
78 | } | ||
79 | |||
73 | do_compile_ptest() { | 80 | do_compile_ptest() { |
74 | cmake_runcmake_build --target build_tests "${PARALLEL_MAKE}" | 81 | cmake_runcmake_build --target build_tests "${PARALLEL_MAKE}" |
75 | } | 82 | } |
@@ -102,10 +109,6 @@ do_install_append () { | |||
102 | install -m 0700 -d ${D}${libdir}/sota/conf.d | 109 | install -m 0700 -d ${D}${libdir}/sota/conf.d |
103 | install -m 0700 -d ${D}${sysconfdir}/sota/conf.d | 110 | install -m 0700 -d ${D}${sysconfdir}/sota/conf.d |
104 | 111 | ||
105 | if [ -n "${SOTA_HARDWARE_ID}" ]; then | ||
106 | printf "[provision]\nprimary_ecu_hardware_id = ${SOTA_HARDWARE_ID}\n" > ${D}${libdir}/sota/conf.d/40-hardware-id.toml | ||
107 | fi | ||
108 | |||
109 | install -m 0755 -d ${D}${systemd_unitdir}/system | 112 | install -m 0755 -d ${D}${systemd_unitdir}/system |
110 | aktualizr_service=${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'serialcan', '${WORKDIR}/aktualizr-serialcan.service', '${WORKDIR}/aktualizr.service', d)} | 113 | aktualizr_service=${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'serialcan', '${WORKDIR}/aktualizr-serialcan.service', '${WORKDIR}/aktualizr.service', d)} |
111 | install -m 0644 ${aktualizr_service} ${D}${systemd_unitdir}/system/aktualizr.service | 114 | install -m 0644 ${aktualizr_service} ${D}${systemd_unitdir}/system/aktualizr.service |