summaryrefslogtreecommitdiffstats
path: root/recipes-sota/aktualizr/aktualizr_git.bb
diff options
context:
space:
mode:
authorPatrick Vacek <patrickvacek@gmail.com>2018-05-03 12:22:52 +0200
committerPatrick Vacek <patrickvacek@gmail.com>2018-05-04 14:47:42 +0200
commitf01b2b06c6fb76cd5d83f5e23643a399d7f41606 (patch)
tree284ed53990b2699c3895310aa681380e47874b71 /recipes-sota/aktualizr/aktualizr_git.bb
parent0c40c88798b9b36eae8af28424899d76ed321758 (diff)
downloadmeta-updater-f01b2b06c6fb76cd5d83f5e23643a399d7f41606.tar.gz
Update aktualizr config to use default locations.
Fix permissions, drop explicit aktualizr dependency, put everything in /usr/lib/sota/conf.d, rename with numeric prefixes to make precedence more clear.
Diffstat (limited to 'recipes-sota/aktualizr/aktualizr_git.bb')
-rw-r--r--recipes-sota/aktualizr/aktualizr_git.bb10
1 files changed, 6 insertions, 4 deletions
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb
index 4c18355..f455013 100644
--- a/recipes-sota/aktualizr/aktualizr_git.bb
+++ b/recipes-sota/aktualizr/aktualizr_git.bb
@@ -22,7 +22,7 @@ SRC_URI = " \
22 file://aktualizr-secondary.socket \ 22 file://aktualizr-secondary.socket \
23 file://aktualizr-serialcan.service \ 23 file://aktualizr-serialcan.service \
24 " 24 "
25SRCREV = "cbb586efcd5f14a5c6a2c7cf71d75f575bf3d13f" 25SRCREV = "5fa9a79f1fb29266c862a9a6cb32082bb77844a5"
26BRANCH ?= "master" 26BRANCH ?= "master"
27 27
28S = "${WORKDIR}/git" 28S = "${WORKDIR}/git"
@@ -54,21 +54,21 @@ EXTRA_OECMAKE_append_class-native = " -DBUILD_SOTA_TOOLS=ON \
54do_install_append () { 54do_install_append () {
55 rm -fr ${D}${libdir}/systemd 55 rm -fr ${D}${libdir}/systemd
56 rm -f ${D}${libdir}/sota/sota.toml # Only needed for the Debian package 56 rm -f ${D}${libdir}/sota/sota.toml # Only needed for the Debian package
57 install -d ${D}${libdir}/sota 57 install -m 0700 -d ${D}${libdir}/sota/conf.d
58 install -m 0644 ${S}/config/sota_secondary.toml ${D}/${libdir}/sota/sota_secondary.toml 58 install -m 0644 ${S}/config/sota_secondary.toml ${D}/${libdir}/sota/sota_secondary.toml
59 install -d ${D}${systemd_unitdir}/system 59 install -d ${D}${systemd_unitdir}/system
60 install -m 0644 ${WORKDIR}/aktualizr-secondary.socket ${D}${systemd_unitdir}/system/aktualizr-secondary.socket 60 install -m 0644 ${WORKDIR}/aktualizr-secondary.socket ${D}${systemd_unitdir}/system/aktualizr-secondary.socket
61 install -m 0644 ${WORKDIR}/aktualizr-secondary.service ${D}${systemd_unitdir}/system/aktualizr-secondary.service 61 install -m 0644 ${WORKDIR}/aktualizr-secondary.service ${D}${systemd_unitdir}/system/aktualizr-secondary.service
62 install -m 0700 -d ${D}${sysconfdir}/sota/conf.d
62} 63}
63 64
64do_install_append_class-target () { 65do_install_append_class-target () {
65 install -d ${D}${systemd_unitdir}/system 66 install -m 0755 -d ${D}${systemd_unitdir}/system
66 aktualizr_service=${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'serialcan', '${WORKDIR}/aktualizr-serialcan.service', '${WORKDIR}/aktualizr.service', d)} 67 aktualizr_service=${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'serialcan', '${WORKDIR}/aktualizr-serialcan.service', '${WORKDIR}/aktualizr.service', d)}
67 install -m 0644 ${aktualizr_service} ${D}${systemd_unitdir}/system/aktualizr.service 68 install -m 0644 ${aktualizr_service} ${D}${systemd_unitdir}/system/aktualizr.service
68} 69}
69 70
70do_install_append_class-native () { 71do_install_append_class-native () {
71 install -d ${D}${libdir}/sota
72 install -m 0644 ${S}/config/sota_autoprov.toml ${D}/${libdir}/sota/sota_autoprov.toml 72 install -m 0644 ${S}/config/sota_autoprov.toml ${D}/${libdir}/sota/sota_autoprov.toml
73 install -m 0644 ${S}/config/sota_autoprov_primary.toml ${D}/${libdir}/sota/sota_autoprov_primary.toml 73 install -m 0644 ${S}/config/sota_autoprov_primary.toml ${D}/${libdir}/sota/sota_autoprov_primary.toml
74 install -m 0644 ${S}/config/sota_hsm_prov.toml ${D}/${libdir}/sota/sota_hsm_prov.toml 74 install -m 0644 ${S}/config/sota_hsm_prov.toml ${D}/${libdir}/sota/sota_hsm_prov.toml
@@ -85,7 +85,9 @@ FILES_${PN} = " \
85 ${bindir}/aktualizr \ 85 ${bindir}/aktualizr \
86 ${bindir}/aktualizr-info \ 86 ${bindir}/aktualizr-info \
87 ${bindir}/aktualizr-check-discovery \ 87 ${bindir}/aktualizr-check-discovery \
88 ${libdir}/sota/conf.d \
88 ${systemd_unitdir}/system/aktualizr.service \ 89 ${systemd_unitdir}/system/aktualizr.service \
90 ${sysconfdir}/sota/conf.d \
89 " 91 "
90 92
91FILES_${PN}-common = " \ 93FILES_${PN}-common = " \