diff options
author | Patrick Vacek <patrickvacek@gmail.com> | 2017-08-02 12:26:51 +0200 |
---|---|---|
committer | Patrick Vacek <patrickvacek@gmail.com> | 2017-08-07 17:01:57 +0200 |
commit | b20eb4aa872f00827d0c079d30a61bd86f68866e (patch) | |
tree | ddbd7e5eec3bbe00752562df026167a060be8a50 | |
parent | b376ae9e08c4695b95b02fbecfe55eb1bd05c603 (diff) | |
download | meta-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.
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] |
7 | Type=oneshot | 7 | Type=oneshot |
8 | WorkingDirectory=/var/sota | 8 | WorkingDirectory=/var/sota |
9 | EnvironmentFile=/var/sota/sota_provisioning_url.env | ||
10 | Environment=SOTA_CERT_DIR=/var/sota | 9 | Environment=SOTA_CERT_DIR=/var/sota |
11 | ExecStart=/usr/bin/sota_provision.sh sota_provisioning_credentials | 10 | ExecStart=/usr/bin/sota_provision.sh sota_provisioning_credentials |
12 | RemainAfterExit=true | 11 | RemainAfterExit=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" | |||
13 | SRC_URI[index.sha256sum] = "1913c41d4b8de89a931b6f9e418f83e70a083e12e6c247e8510ee932571ebae2" | 13 | SRC_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 |
16 | SRCREV = "b9170dfd92981505c77f8f6e51d477eb1ec57071" | 16 | SRCREV = "5b335cd46c5848d8012ef03f06b50a63fdac4f7c" |
17 | PR = "1" | ||
17 | 18 | ||
18 | # generate with: `make package-version` | 19 | # generate with: `make package-version` |
19 | PV = "0.2.33-61-gb9170df" | 20 | PV = "0.2.33-66-g5b335cd" |
20 | 21 | ||
21 | # generate with: `make yocto-version` | 22 | # generate with: `make yocto-version` |
22 | SRC_URI = " \ | 23 | SRC_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 \ | |||
24 | jq \ | 24 | jq \ |
25 | python-petname \ | 25 | python-petname \ |
26 | sota-launcher \ | 26 | sota-launcher \ |
27 | zip \ | ||
27 | " | 28 | " |
28 | 29 | ||
29 | export SOTA_PACKED_CREDENTIALS | 30 | export SOTA_PACKED_CREDENTIALS |
30 | export SOTA_AUTOPROVISION_CREDENTIALS | ||
31 | export SOTA_AUTOPROVISION_URL | ||
32 | 31 | ||
33 | do_compile_prepend() { | 32 | do_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 |