summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Vacek <patrickvacek@gmail.com>2017-08-02 12:26:51 +0200
committerPatrick Vacek <patrickvacek@gmail.com>2017-08-07 17:01:57 +0200
commitb20eb4aa872f00827d0c079d30a61bd86f68866e (patch)
treeddbd7e5eec3bbe00752562df026167a060be8a50
parentb376ae9e08c4695b95b02fbecfe55eb1bd05c603 (diff)
downloadmeta-updater-b20eb4aa872f00827d0c079d30a61bd86f68866e.tar.gz
Prepare credentials correctly for rvi-sota-client.
Unzip credentials archive and create files as appropriate, since none of that is necessary for aktualizr anymore. This is now done in the sota_provision script. It apparently does not work in the rvi-sota-client recipe, but this solution is perhaps even cleaner anyway.
-rw-r--r--recipes-sota/rvi-sota-client/files/sota-client-autoprovision.service1
-rw-r--r--recipes-sota/rvi-sota-client/rvi-sota-client.inc5
-rw-r--r--recipes-sota/rvi-sota-client/rvi-sota-client_git.bb5
3 files changed, 5 insertions, 6 deletions
diff --git a/recipes-sota/rvi-sota-client/files/sota-client-autoprovision.service b/recipes-sota/rvi-sota-client/files/sota-client-autoprovision.service
index 0431455..11b1354 100644
--- a/recipes-sota/rvi-sota-client/files/sota-client-autoprovision.service
+++ b/recipes-sota/rvi-sota-client/files/sota-client-autoprovision.service
@@ -6,7 +6,6 @@ After=network-online.target
6[Service] 6[Service]
7Type=oneshot 7Type=oneshot
8WorkingDirectory=/var/sota 8WorkingDirectory=/var/sota
9EnvironmentFile=/var/sota/sota_provisioning_url.env
10Environment=SOTA_CERT_DIR=/var/sota 9Environment=SOTA_CERT_DIR=/var/sota
11ExecStart=/usr/bin/sota_provision.sh sota_provisioning_credentials 10ExecStart=/usr/bin/sota_provision.sh sota_provisioning_credentials
12RemainAfterExit=true 11RemainAfterExit=true
diff --git a/recipes-sota/rvi-sota-client/rvi-sota-client.inc b/recipes-sota/rvi-sota-client/rvi-sota-client.inc
index 2a27c9a..00709af 100644
--- a/recipes-sota/rvi-sota-client/rvi-sota-client.inc
+++ b/recipes-sota/rvi-sota-client/rvi-sota-client.inc
@@ -13,10 +13,11 @@ SRC_URI[index.md5sum] = "6a635e8a081b4d4ba4cebffd721c2d7d"
13SRC_URI[index.sha256sum] = "1913c41d4b8de89a931b6f9e418f83e70a083e12e6c247e8510ee932571ebae2" 13SRC_URI[index.sha256sum] = "1913c41d4b8de89a931b6f9e418f83e70a083e12e6c247e8510ee932571ebae2"
14 14
15# also update PV and SRC_URI crates when updating SRCREV 15# also update PV and SRC_URI crates when updating SRCREV
16SRCREV = "b9170dfd92981505c77f8f6e51d477eb1ec57071" 16SRCREV = "5b335cd46c5848d8012ef03f06b50a63fdac4f7c"
17PR = "1"
17 18
18# generate with: `make package-version` 19# generate with: `make package-version`
19PV = "0.2.33-61-gb9170df" 20PV = "0.2.33-66-g5b335cd"
20 21
21# generate with: `make yocto-version` 22# generate with: `make yocto-version`
22SRC_URI = " \ 23SRC_URI = " \
diff --git a/recipes-sota/rvi-sota-client/rvi-sota-client_git.bb b/recipes-sota/rvi-sota-client/rvi-sota-client_git.bb
index 7ce3ab5..e286598 100644
--- a/recipes-sota/rvi-sota-client/rvi-sota-client_git.bb
+++ b/recipes-sota/rvi-sota-client/rvi-sota-client_git.bb
@@ -24,11 +24,10 @@ lshw \
24jq \ 24jq \
25python-petname \ 25python-petname \
26sota-launcher \ 26sota-launcher \
27zip \
27" 28"
28 29
29export SOTA_PACKED_CREDENTIALS 30export SOTA_PACKED_CREDENTIALS
30export SOTA_AUTOPROVISION_CREDENTIALS
31export SOTA_AUTOPROVISION_URL
32 31
33do_compile_prepend() { 32do_compile_prepend() {
34 export SOTA_VERSION=$(make sota-version) 33 export SOTA_VERSION=$(make sota-version)
@@ -50,7 +49,7 @@ do_install() {
50 49
51 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then 50 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
52 install -d ${D}/${systemd_unitdir}/system 51 install -d ${D}/${systemd_unitdir}/system
53 if [ -n "$SOTA_AUTOPROVISION_CREDENTIALS" -o -n "$SOTA_PACKED_CREDENTIALS" ]; then 52 if [ -n "$SOTA_PACKED_CREDENTIALS" ]; then
54 install -m 0644 ${WORKDIR}/sota-client-uptane.service ${D}/${systemd_unitdir}/system/sota-client.service 53 install -m 0644 ${WORKDIR}/sota-client-uptane.service ${D}/${systemd_unitdir}/system/sota-client.service
55 else 54 else
56 install -m 0644 ${WORKDIR}/sota-client-ostree.service ${D}/${systemd_unitdir}/system/sota-client.service 55 install -m 0644 ${WORKDIR}/sota-client-ostree.service ${D}/${systemd_unitdir}/system/sota-client.service