diff options
Diffstat (limited to 'recipes-sota/aktualizr/aktualizr_git.bb')
-rw-r--r-- | recipes-sota/aktualizr/aktualizr_git.bb | 65 |
1 files changed, 45 insertions, 20 deletions
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index 768ec3d..2a803a8 100644 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb | |||
@@ -6,11 +6,10 @@ 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 asn1c-native " | 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 " |
13 | RDEPENDS_${PN}_append_class-target = "${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', ' engine-pkcs11', '', d)} " | ||
14 | RDEPENDS_${PN}_append_class-target = " ${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'serialcan', ' slcand-start', '', d)} " | 13 | RDEPENDS_${PN}_append_class-target = " ${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'serialcan', ' slcand-start', '', d)} " |
15 | 14 | ||
16 | PV = "1.0+git${SRCPV}" | 15 | PV = "1.0+git${SRCPV}" |
@@ -19,9 +18,11 @@ PR = "7" | |||
19 | SRC_URI = " \ | 18 | SRC_URI = " \ |
20 | gitsm://github.com/advancedtelematic/aktualizr;branch=${BRANCH} \ | 19 | gitsm://github.com/advancedtelematic/aktualizr;branch=${BRANCH} \ |
21 | file://aktualizr.service \ | 20 | file://aktualizr.service \ |
21 | file://aktualizr-secondary.service \ | ||
22 | file://aktualizr-secondary.socket \ | ||
22 | file://aktualizr-serialcan.service \ | 23 | file://aktualizr-serialcan.service \ |
23 | " | 24 | " |
24 | SRCREV = "d861896e7467e3e0cafdd7384ff87c62fe724640" | 25 | SRCREV = "930d8eef6eb584686654601c056d7c9c6fca3048" |
25 | BRANCH ?= "master" | 26 | BRANCH ?= "master" |
26 | 27 | ||
27 | S = "${WORKDIR}/git" | 28 | S = "${WORKDIR}/git" |
@@ -29,56 +30,80 @@ S = "${WORKDIR}/git" | |||
29 | inherit cmake | 30 | inherit cmake |
30 | 31 | ||
31 | inherit systemd | 32 | inherit systemd |
33 | |||
34 | SYSTEMD_PACKAGES = "${PN} ${PN}-secondary" | ||
32 | SYSTEMD_SERVICE_${PN} = "aktualizr.service" | 35 | SYSTEMD_SERVICE_${PN} = "aktualizr.service" |
36 | SYSTEMD_SERVICE_${PN}-secondary = "aktualizr-secondary.socket" | ||
33 | 37 | ||
34 | BBCLASSEXTEND =+ "native" | 38 | BBCLASSEXTEND =+ "native" |
35 | 39 | ||
36 | EXTRA_OECMAKE = "-DWARNING_AS_ERROR=OFF -DCMAKE_BUILD_TYPE=Release -DAKTUALIZR_VERSION=${PV} " | 40 | EXTRA_OECMAKE = "-DWARNING_AS_ERROR=OFF -DCMAKE_BUILD_TYPE=Release -DAKTUALIZR_VERSION=${PV} " |
37 | EXTRA_OECMAKE_append_class-target = " -DBUILD_OSTREE=ON -DBUILD_ISOTP=ON ${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', '-DBUILD_P11=ON', '', d)} " | 41 | EXTRA_OECMAKE_append_class-target = " -DBUILD_OSTREE=ON -DBUILD_ISOTP=ON ${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', '-DBUILD_P11=ON', '', d)} " |
38 | EXTRA_OECMAKE_append_class-native = " -DBUILD_SOTA_TOOLS=ON -DBUILD_OSTREE=OFF " | 42 | EXTRA_OECMAKE_append_class-native = " -DBUILD_SOTA_TOOLS=ON -DBUILD_OSTREE=OFF -DBUILD_SYSTEMD=OFF " |
39 | 43 | ||
40 | do_install_append () { | 44 | do_install_append () { |
41 | rm -f ${D}${bindir}/aktualizr_cert_provider | 45 | rm -fr ${D}${libdir}/systemd |
46 | rm -f ${D}${libdir}/sota/sota.toml # Only needed for the Debian package | ||
47 | install -d ${D}${libdir}/sota | ||
48 | install -m 0644 ${S}/config/sota_secondary.toml ${D}/${libdir}/sota/sota_secondary.toml | ||
49 | install -d ${D}${systemd_unitdir}/system | ||
50 | install -m 0644 ${WORKDIR}/aktualizr-secondary.socket ${D}${systemd_unitdir}/system/aktualizr-secondary.socket | ||
51 | install -m 0644 ${WORKDIR}/aktualizr-secondary.service ${D}${systemd_unitdir}/system/aktualizr-secondary.service | ||
42 | } | 52 | } |
43 | do_install_append_class-target () { | ||
44 | rm -f ${D}${bindir}/aktualizr_implicit_writer | ||
45 | rm -f ${D}${libdir}/sota/sota.toml | ||
46 | ${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'secondary-example', '', 'rm -f ${D}${bindir}/example-interface', d)} | ||
47 | ${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'secondary-isotp-example', '', 'rm -f ${D}${bindir}/isotp-test-interface', d)} | ||
48 | 53 | ||
54 | do_install_append_class-target () { | ||
49 | install -d ${D}${systemd_unitdir}/system | 55 | install -d ${D}${systemd_unitdir}/system |
50 | aktualizr_service=${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'serialcan', '${WORKDIR}/aktualizr-serialcan.service', '${WORKDIR}/aktualizr.service', d)} | 56 | 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 | 57 | install -m 0644 ${aktualizr_service} ${D}${systemd_unitdir}/system/aktualizr.service |
52 | } | 58 | } |
59 | |||
53 | do_install_append_class-native () { | 60 | do_install_append_class-native () { |
54 | rm -f ${D}${bindir}/aktualizr | ||
55 | rm -f ${D}${bindir}/aktualizr-info | ||
56 | rm -f ${D}${bindir}/example-interface | ||
57 | install -d ${D}${libdir}/sota | 61 | install -d ${D}${libdir}/sota |
58 | install -m 0644 ${S}/config/sota_autoprov.toml ${D}/${libdir}/sota/sota_autoprov.toml | 62 | install -m 0644 ${S}/config/sota_autoprov.toml ${D}/${libdir}/sota/sota_autoprov.toml |
63 | install -m 0644 ${S}/config/sota_autoprov_primary.toml ${D}/${libdir}/sota/sota_autoprov_primary.toml | ||
59 | install -m 0644 ${S}/config/sota_hsm_prov.toml ${D}/${libdir}/sota/sota_hsm_prov.toml | 64 | 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 | 65 | install -m 0644 ${S}/config/sota_implicit_prov.toml ${D}/${libdir}/sota/sota_implicit_prov.toml |
66 | install -m 0644 ${S}/config/sota_implicit_prov_ca.toml ${D}/${libdir}/sota/sota_implicit_prov_ca.toml | ||
61 | 67 | ||
62 | install -m 0755 ${B}/src/sota_tools/garage-sign-prefix/src/garage-sign/bin/* ${D}${bindir} | 68 | 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} | 69 | install -m 0644 ${B}/src/sota_tools/garage-sign-prefix/src/garage-sign/lib/* ${D}${libdir} |
64 | } | 70 | } |
65 | 71 | ||
66 | FILES_${PN}_append = " \ | 72 | PACKAGES =+ " ${PN}-common ${PN}-examples ${PN}-host-tools ${PN}-secondary " |
67 | ${libdir}/sota \ | ||
68 | " | ||
69 | 73 | ||
70 | FILES_${PN}_class-target = " \ | 74 | FILES_${PN} = " \ |
71 | ${bindir}/aktualizr \ | 75 | ${bindir}/aktualizr \ |
72 | ${bindir}/aktualizr-info \ | 76 | ${bindir}/aktualizr-info \ |
77 | ${bindir}/aktualizr-check-discovery \ | ||
73 | ${systemd_unitdir}/system/aktualizr.service \ | 78 | ${systemd_unitdir}/system/aktualizr.service \ |
74 | " | 79 | " |
75 | 80 | ||
76 | FILES_${PN}_append_class-target = " ${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'secondary-example', ' ${bindir}/example-interface', '', d)} " | 81 | FILES_${PN}-common = " \ |
77 | FILES_${PN}_append_class-target = " ${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'secondary-isotp-example', ' ${bindir}/isotp-test-interface', '', d)} " | 82 | ${libdir}/sota/schemas \ |
78 | FILES_${PN}_class-native = " \ | 83 | " |
84 | |||
85 | FILES_${PN}-examples = " \ | ||
86 | ${libdir}/sota/demo_secondary.json \ | ||
87 | ${bindir}/example-interface \ | ||
88 | ${bindir}/isotp-test-interface \ | ||
89 | " | ||
90 | |||
91 | FILES_${PN}-host-tools = " \ | ||
92 | ${bindir}/aktualizr_cert_provider \ | ||
79 | ${bindir}/aktualizr_implicit_writer \ | 93 | ${bindir}/aktualizr_implicit_writer \ |
80 | ${bindir}/garage-deploy \ | 94 | ${bindir}/garage-deploy \ |
81 | ${bindir}/garage-push \ | 95 | ${bindir}/garage-push \ |
82 | " | 96 | " |
83 | 97 | ||
98 | FILES_${PN}-secondary = " \ | ||
99 | ${bindir}/aktualizr-secondary \ | ||
100 | ${libdir}/sota/sota_secondary.toml \ | ||
101 | ${systemd_unitdir}/system/aktualizr-secondary.socket \ | ||
102 | ${systemd_unitdir}/system/aktualizr-secondary.service \ | ||
103 | " | ||
104 | |||
105 | # Both primary and secondary need the SQL Schemas | ||
106 | RDEPENDS_${PN}_class-target =+ "${PN}-common" | ||
107 | RDEPENDS_${PN}-secondary_class-target =+ "${PN}-common" | ||
108 | |||
84 | # vim:set ts=4 sw=4 sts=4 expandtab: | 109 | # vim:set ts=4 sw=4 sts=4 expandtab: |