summaryrefslogtreecommitdiffstats
path: root/recipes-sota/rvi-sota-client/rvi-sota-client_git.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-sota/rvi-sota-client/rvi-sota-client_git.bb')
-rw-r--r--recipes-sota/rvi-sota-client/rvi-sota-client_git.bb139
1 files changed, 78 insertions, 61 deletions
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 718daf7..dd8cd01 100644
--- a/recipes-sota/rvi-sota-client/rvi-sota-client_git.bb
+++ b/recipes-sota/rvi-sota-client/rvi-sota-client_git.bb
@@ -11,22 +11,20 @@ S = "${WORKDIR}/git"
11# When changing this, don't forget to: 11# When changing this, don't forget to:
12# 1) Update PV 12# 1) Update PV
13# 2) Check that Cargo.lock hasn't changed with git diff old..new Cargo.lock 13# 2) Check that Cargo.lock hasn't changed with git diff old..new Cargo.lock
14SRCREV = "0f4d498f969b8d5df3140f8ba80b78b5b4024e72" 14SRCREV = "e3ab3b02c7c08d61064ea11c98e59559140a8219"
15 15
16# Generate with: 16# Generate with:
17# git describe --tags | cut -b2- 17# git describe --tags | cut -b2-
18# or from the rvi_sota_client repo: 18# or from the rvi_sota_client repo:
19# make package-version 19# make package-version
20PV = "0.2.33-30-g0f4d498" 20PV = "0.2.33-39-ge3ab3b0"
21 21
22BBCLASSEXTEND = "native" 22BBCLASSEXTEND = "native"
23 23
24FILES_${PN} = " \ 24FILES_${PN} = " \
25/lib64 \ 25/lib64 \
26${bindir}/canonical_json.py \
27${bindir}/sota_client \ 26${bindir}/sota_client \
28${bindir}/sota_sysinfo.sh \ 27${bindir}/sota_sysinfo.sh \
29${bindir}/system_info.sh \
30${bindir}/sota_provision.sh \ 28${bindir}/sota_provision.sh \
31${sysconfdir}/sota_client.version \ 29${sysconfdir}/sota_client.version \
32${sysconfdir}/sota_certificates \ 30${sysconfdir}/sota_certificates \
@@ -38,97 +36,116 @@ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_unitdir}/system/so
38# list of dependencies can be generated from Cargo.lock by running 36# list of dependencies can be generated from Cargo.lock by running
39# cat Cargo.lock | sed -e '1,/metadata/ d' Cargo.lock | awk '{print "crate://crates.io/"$2 "/" $3" \\"}' 37# cat Cargo.lock | sed -e '1,/metadata/ d' Cargo.lock | awk '{print "crate://crates.io/"$2 "/" $3" \\"}'
40SRC_URI = " \ 38SRC_URI = " \
39crate://crates.io/advapi32-sys/0.2.0 \
41crate://crates.io/aho-corasick/0.6.3 \ 40crate://crates.io/aho-corasick/0.6.3 \
42crate://crates.io/backtrace/0.3.0 \ 41crate://crates.io/ansi_term/0.9.0 \
43crate://crates.io/backtrace-sys/0.1.10 \ 42crate://crates.io/antidote/1.0.0 \
44crate://crates.io/base64/0.4.2 \ 43crate://crates.io/atty/0.2.2 \
44crate://crates.io/backtrace/0.3.2 \
45crate://crates.io/backtrace-sys/0.1.11 \
45crate://crates.io/base64/0.5.2 \ 46crate://crates.io/base64/0.5.2 \
46crate://crates.io/bit-set/0.4.0 \ 47crate://crates.io/bit-set/0.4.0 \
47crate://crates.io/bit-vec/0.4.3 \ 48crate://crates.io/bit-vec/0.4.4 \
48crate://crates.io/bitflags/0.8.2 \ 49crate://crates.io/bitflags/0.9.1 \
49crate://crates.io/byteorder/1.0.0 \ 50crate://crates.io/byteorder/1.0.0 \
50crate://crates.io/bytes/0.4.3 \ 51crate://crates.io/bytes/0.4.4 \
51crate://crates.io/cfg-if/0.1.0 \ 52crate://crates.io/cfg-if/0.1.2 \
52crate://crates.io/chan/0.1.19 \ 53crate://crates.io/chan/0.1.19 \
53crate://crates.io/chan-signal/0.2.0 \ 54crate://crates.io/chan-signal/0.2.0 \
54crate://crates.io/chrono/0.4.0 \ 55crate://crates.io/chrono/0.4.0 \
56crate://crates.io/clap/2.25.0 \
57crate://crates.io/core-foundation/0.2.3 \
58crate://crates.io/core-foundation-sys/0.2.3 \
55crate://crates.io/crossbeam/0.2.10 \ 59crate://crates.io/crossbeam/0.2.10 \
60crate://crates.io/crypt32-sys/0.2.0 \
56crate://crates.io/dbghelp-sys/0.2.0 \ 61crate://crates.io/dbghelp-sys/0.2.0 \
57crate://crates.io/dbus/0.5.2 \ 62crate://crates.io/dbus/0.5.3 \
58crate://crates.io/dtoa/0.4.1 \ 63crate://crates.io/dtoa/0.4.1 \
59crate://crates.io/env_logger/0.4.2 \ 64crate://crates.io/env_logger/0.4.3 \
60crate://crates.io/error-chain/0.10.0 \ 65crate://crates.io/error-chain/0.10.0 \
61crate://crates.io/error-chain/0.7.2 \
62crate://crates.io/filetime/0.1.10 \ 66crate://crates.io/filetime/0.1.10 \
63crate://crates.io/foreign-types/0.2.0 \ 67crate://crates.io/foreign-types/0.2.0 \
64crate://crates.io/gcc/0.3.45 \ 68crate://crates.io/gcc/0.3.51 \
65crate://crates.io/gdi32-sys/0.2.0 \
66crate://crates.io/getopts/0.2.14 \ 69crate://crates.io/getopts/0.2.14 \
67crate://crates.io/hex/0.2.0 \ 70crate://crates.io/hex/0.2.0 \
68crate://crates.io/httparse/1.2.2 \ 71crate://crates.io/httparse/1.2.3 \
69crate://crates.io/hyper/0.10.9 \ 72crate://crates.io/hyper/0.10.12 \
70crate://crates.io/idna/0.1.1 \ 73crate://crates.io/hyper-native-tls/0.2.4 \
74crate://crates.io/idna/0.1.2 \
71crate://crates.io/iovec/0.1.0 \ 75crate://crates.io/iovec/0.1.0 \
72crate://crates.io/itoa/0.3.1 \ 76crate://crates.io/itoa/0.3.1 \
73crate://crates.io/kernel32-sys/0.2.2 \ 77crate://crates.io/kernel32-sys/0.2.2 \
74crate://crates.io/language-tags/0.2.2 \ 78crate://crates.io/language-tags/0.2.2 \
75crate://crates.io/lazy_static/0.2.8 \ 79crate://crates.io/lazy_static/0.2.8 \
76crate://crates.io/libc/0.2.22 \ 80crate://crates.io/libc/0.2.24 \
77crate://crates.io/log/0.3.7 \ 81crate://crates.io/libflate/0.1.9 \
82crate://crates.io/log/0.3.8 \
78crate://crates.io/maplit/0.1.4 \ 83crate://crates.io/maplit/0.1.4 \
79crate://crates.io/matches/0.1.4 \ 84crate://crates.io/matches/0.1.6 \
80crate://crates.io/memchr/1.0.1 \ 85crate://crates.io/memchr/1.0.1 \
81crate://crates.io/metadeps/1.1.1 \ 86crate://crates.io/metadeps/1.1.2 \
82crate://crates.io/mime/0.2.3 \ 87crate://crates.io/mime/0.2.6 \
88crate://crates.io/native-tls/0.1.4 \
83crate://crates.io/net2/0.2.29 \ 89crate://crates.io/net2/0.2.29 \
84crate://crates.io/num/0.1.37 \ 90crate://crates.io/num/0.1.39 \
85crate://crates.io/num-integer/0.1.34 \ 91crate://crates.io/num-integer/0.1.34 \
86crate://crates.io/num-iter/0.1.33 \ 92crate://crates.io/num-iter/0.1.33 \
87crate://crates.io/num-traits/0.1.37 \ 93crate://crates.io/num-traits/0.1.39 \
88crate://crates.io/num_cpus/1.4.0 \ 94crate://crates.io/num_cpus/1.6.2 \
89crate://crates.io/openssl/0.9.11 \ 95crate://crates.io/openssl/0.9.14 \
90crate://crates.io/openssl-sys/0.9.11 \ 96crate://crates.io/openssl-sys/0.9.14 \
91crate://crates.io/pem/0.4.0 \ 97crate://crates.io/pem/0.4.0 \
98crate://crates.io/percent-encoding/1.0.0 \
92crate://crates.io/pkg-config/0.3.9 \ 99crate://crates.io/pkg-config/0.3.9 \
93crate://crates.io/quote/0.3.15 \ 100crate://crates.io/quote/0.3.15 \
94crate://crates.io/rand/0.3.15 \ 101crate://crates.io/rand/0.3.15 \
95crate://crates.io/redox_syscall/0.1.17 \ 102crate://crates.io/redox_syscall/0.1.21 \
96crate://crates.io/regex/0.2.1 \ 103crate://crates.io/regex/0.2.2 \
97crate://crates.io/regex-syntax/0.4.0 \ 104crate://crates.io/regex-syntax/0.4.1 \
105crate://crates.io/reqwest/0.6.2 \
98crate://crates.io/ring/0.7.1 \ 106crate://crates.io/ring/0.7.1 \
99crate://crates.io/rust-crypto/0.2.36 \ 107crate://crates.io/rust-crypto/0.2.36 \
100crate://crates.io/rustc-demangle/0.1.4 \ 108crate://crates.io/rustc-demangle/0.1.4 \
101crate://crates.io/rustc-serialize/0.3.24 \ 109crate://crates.io/rustc-serialize/0.3.24 \
102crate://crates.io/rustc_version/0.1.7 \ 110crate://crates.io/schannel/0.1.7 \
103crate://crates.io/semver/0.1.20 \ 111crate://crates.io/secur32-sys/0.2.0 \
104crate://crates.io/serde/1.0.2 \ 112crate://crates.io/security-framework/0.1.14 \
105crate://crates.io/serde_derive/1.0.2 \ 113crate://crates.io/security-framework-sys/0.1.14 \
106crate://crates.io/serde_derive_internals/0.15.0 \ 114crate://crates.io/serde/1.0.9 \
107crate://crates.io/serde_json/1.0.1 \ 115crate://crates.io/serde_derive/1.0.9 \
116crate://crates.io/serde_derive_internals/0.15.1 \
117crate://crates.io/serde_json/1.0.2 \
118crate://crates.io/serde_urlencoded/0.5.1 \
108crate://crates.io/sha1/0.2.0 \ 119crate://crates.io/sha1/0.2.0 \
120crate://crates.io/strsim/0.6.0 \
109crate://crates.io/syn/0.11.11 \ 121crate://crates.io/syn/0.11.11 \
110crate://crates.io/synom/0.11.3 \ 122crate://crates.io/synom/0.11.3 \
111crate://crates.io/tar/0.4.11 \ 123crate://crates.io/tar/0.4.13 \
112crate://crates.io/thread-id/3.0.0 \ 124crate://crates.io/tempdir/0.3.5 \
113crate://crates.io/thread_local/0.3.3 \ 125crate://crates.io/term_size/0.3.0 \
126crate://crates.io/textwrap/0.6.0 \
127crate://crates.io/thread_local/0.3.4 \
114crate://crates.io/time/0.1.37 \ 128crate://crates.io/time/0.1.37 \
115crate://crates.io/toml/0.2.1 \ 129crate://crates.io/toml/0.2.1 \
116crate://crates.io/toml/0.4.0 \ 130crate://crates.io/toml/0.4.2 \
117crate://crates.io/traitobject/0.1.0 \ 131crate://crates.io/traitobject/0.1.0 \
118crate://crates.io/tungstenite/0.2.2 \ 132crate://crates.io/tungstenite/0.2.4 \
119crate://crates.io/typeable/0.1.2 \ 133crate://crates.io/typeable/0.1.2 \
120crate://crates.io/unicase/1.4.0 \ 134crate://crates.io/unicase/1.4.2 \
121crate://crates.io/unicode-bidi/0.2.5 \ 135crate://crates.io/unicode-bidi/0.3.3 \
122crate://crates.io/unicode-normalization/0.1.4 \ 136crate://crates.io/unicode-normalization/0.1.5 \
137crate://crates.io/unicode-segmentation/1.1.0 \
138crate://crates.io/unicode-width/0.1.4 \
123crate://crates.io/unicode-xid/0.0.4 \ 139crate://crates.io/unicode-xid/0.0.4 \
124crate://crates.io/unix_socket/0.5.0 \ 140crate://crates.io/unix_socket/0.5.0 \
125crate://crates.io/unreachable/0.1.1 \ 141crate://crates.io/unreachable/1.0.0 \
126crate://crates.io/untrusted/0.3.2 \ 142crate://crates.io/untrusted/0.3.2 \
127crate://crates.io/url/1.4.0 \ 143crate://crates.io/url/1.5.1 \
128crate://crates.io/user32-sys/0.2.0 \ 144crate://crates.io/utf-8/0.7.1 \
129crate://crates.io/utf-8/0.7.0 \
130crate://crates.io/utf8-ranges/1.0.0 \ 145crate://crates.io/utf8-ranges/1.0.0 \
131crate://crates.io/uuid/0.5.0 \ 146crate://crates.io/uuid/0.5.1 \
147crate://crates.io/vec_map/0.8.0 \
148crate://crates.io/version_check/0.1.2 \
132crate://crates.io/void/1.0.2 \ 149crate://crates.io/void/1.0.2 \
133crate://crates.io/winapi/0.2.8 \ 150crate://crates.io/winapi/0.2.8 \
134crate://crates.io/winapi-build/0.1.1 \ 151crate://crates.io/winapi-build/0.1.1 \
@@ -153,7 +170,6 @@ RDEPENDS_${PN} = " libcrypto \
153 jq \ 170 jq \
154 curl \ 171 curl \
155 python \ 172 python \
156 python-canonicaljson \
157 python-json \ 173 python-json \
158 python-petname \ 174 python-petname \
159 " 175 "
@@ -164,15 +180,21 @@ export SOTA_AUTOPROVISION_URL
164 180
165do_compile_prepend() { 181do_compile_prepend() {
166 export SOTA_VERSION=$(make sota-version) 182 export SOTA_VERSION=$(make sota-version)
183 cd sota-client
167} 184}
168 185
169do_install() { 186do_install() {
187 ln -fs /lib ${D}/lib64
188
170 install -d ${D}${bindir} 189 install -d ${D}${bindir}
190 install -d ${D}${sysconfdir}
191
192 echo `git log -1 --pretty=format:%H` > ${D}${sysconfdir}/sota_client.version
193 install -c ${S}/sota-client/docker/sota_certificates ${D}${sysconfdir}
194
171 install -m 0755 target/${TARGET_SYS}/release/sota_client ${D}${bindir} 195 install -m 0755 target/${TARGET_SYS}/release/sota_client ${D}${bindir}
172 install -m 0755 ${S}/run/sota_sysinfo.sh ${D}${bindir} 196 install -m 0755 ${S}/sota-client/docker/sota_provision.sh ${D}${bindir}
173 ln -fs ${bindir}/sota_sysinfo.sh ${D}${bindir}/system_info.sh # For compatibilty with old sota.toml files 197 install -m 0755 ${S}/sota-client/docker/sota_sysinfo.sh ${D}${bindir}
174 install -m 0755 ${S}/run/sota_provision.sh ${D}${bindir}
175 install -m 0755 ${S}/run/canonical_json.py ${D}${bindir}
176 198
177 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then 199 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
178 install -d ${D}/${systemd_unitdir}/system 200 install -d ${D}/${systemd_unitdir}/system
@@ -183,9 +205,4 @@ do_install() {
183 fi 205 fi
184 install -m 0644 ${WORKDIR}/sota-client-autoprovision.service ${D}/${systemd_unitdir}/system/sota-client-autoprovision.service 206 install -m 0644 ${WORKDIR}/sota-client-autoprovision.service ${D}/${systemd_unitdir}/system/sota-client-autoprovision.service
185 fi 207 fi
186
187 install -d ${D}${sysconfdir}
188 echo `git log -1 --pretty=format:%H` > ${D}${sysconfdir}/sota_client.version
189 install -c ${S}/run/sota_certificates ${D}${sysconfdir}
190 ln -fs /lib ${D}/lib64
191} 208}