diff options
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.bb | 139 |
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 |
14 | SRCREV = "0f4d498f969b8d5df3140f8ba80b78b5b4024e72" | 14 | SRCREV = "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 |
20 | PV = "0.2.33-30-g0f4d498" | 20 | PV = "0.2.33-39-ge3ab3b0" |
21 | 21 | ||
22 | BBCLASSEXTEND = "native" | 22 | BBCLASSEXTEND = "native" |
23 | 23 | ||
24 | FILES_${PN} = " \ | 24 | FILES_${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" \\"}' |
40 | SRC_URI = " \ | 38 | SRC_URI = " \ |
39 | crate://crates.io/advapi32-sys/0.2.0 \ | ||
41 | crate://crates.io/aho-corasick/0.6.3 \ | 40 | crate://crates.io/aho-corasick/0.6.3 \ |
42 | crate://crates.io/backtrace/0.3.0 \ | 41 | crate://crates.io/ansi_term/0.9.0 \ |
43 | crate://crates.io/backtrace-sys/0.1.10 \ | 42 | crate://crates.io/antidote/1.0.0 \ |
44 | crate://crates.io/base64/0.4.2 \ | 43 | crate://crates.io/atty/0.2.2 \ |
44 | crate://crates.io/backtrace/0.3.2 \ | ||
45 | crate://crates.io/backtrace-sys/0.1.11 \ | ||
45 | crate://crates.io/base64/0.5.2 \ | 46 | crate://crates.io/base64/0.5.2 \ |
46 | crate://crates.io/bit-set/0.4.0 \ | 47 | crate://crates.io/bit-set/0.4.0 \ |
47 | crate://crates.io/bit-vec/0.4.3 \ | 48 | crate://crates.io/bit-vec/0.4.4 \ |
48 | crate://crates.io/bitflags/0.8.2 \ | 49 | crate://crates.io/bitflags/0.9.1 \ |
49 | crate://crates.io/byteorder/1.0.0 \ | 50 | crate://crates.io/byteorder/1.0.0 \ |
50 | crate://crates.io/bytes/0.4.3 \ | 51 | crate://crates.io/bytes/0.4.4 \ |
51 | crate://crates.io/cfg-if/0.1.0 \ | 52 | crate://crates.io/cfg-if/0.1.2 \ |
52 | crate://crates.io/chan/0.1.19 \ | 53 | crate://crates.io/chan/0.1.19 \ |
53 | crate://crates.io/chan-signal/0.2.0 \ | 54 | crate://crates.io/chan-signal/0.2.0 \ |
54 | crate://crates.io/chrono/0.4.0 \ | 55 | crate://crates.io/chrono/0.4.0 \ |
56 | crate://crates.io/clap/2.25.0 \ | ||
57 | crate://crates.io/core-foundation/0.2.3 \ | ||
58 | crate://crates.io/core-foundation-sys/0.2.3 \ | ||
55 | crate://crates.io/crossbeam/0.2.10 \ | 59 | crate://crates.io/crossbeam/0.2.10 \ |
60 | crate://crates.io/crypt32-sys/0.2.0 \ | ||
56 | crate://crates.io/dbghelp-sys/0.2.0 \ | 61 | crate://crates.io/dbghelp-sys/0.2.0 \ |
57 | crate://crates.io/dbus/0.5.2 \ | 62 | crate://crates.io/dbus/0.5.3 \ |
58 | crate://crates.io/dtoa/0.4.1 \ | 63 | crate://crates.io/dtoa/0.4.1 \ |
59 | crate://crates.io/env_logger/0.4.2 \ | 64 | crate://crates.io/env_logger/0.4.3 \ |
60 | crate://crates.io/error-chain/0.10.0 \ | 65 | crate://crates.io/error-chain/0.10.0 \ |
61 | crate://crates.io/error-chain/0.7.2 \ | ||
62 | crate://crates.io/filetime/0.1.10 \ | 66 | crate://crates.io/filetime/0.1.10 \ |
63 | crate://crates.io/foreign-types/0.2.0 \ | 67 | crate://crates.io/foreign-types/0.2.0 \ |
64 | crate://crates.io/gcc/0.3.45 \ | 68 | crate://crates.io/gcc/0.3.51 \ |
65 | crate://crates.io/gdi32-sys/0.2.0 \ | ||
66 | crate://crates.io/getopts/0.2.14 \ | 69 | crate://crates.io/getopts/0.2.14 \ |
67 | crate://crates.io/hex/0.2.0 \ | 70 | crate://crates.io/hex/0.2.0 \ |
68 | crate://crates.io/httparse/1.2.2 \ | 71 | crate://crates.io/httparse/1.2.3 \ |
69 | crate://crates.io/hyper/0.10.9 \ | 72 | crate://crates.io/hyper/0.10.12 \ |
70 | crate://crates.io/idna/0.1.1 \ | 73 | crate://crates.io/hyper-native-tls/0.2.4 \ |
74 | crate://crates.io/idna/0.1.2 \ | ||
71 | crate://crates.io/iovec/0.1.0 \ | 75 | crate://crates.io/iovec/0.1.0 \ |
72 | crate://crates.io/itoa/0.3.1 \ | 76 | crate://crates.io/itoa/0.3.1 \ |
73 | crate://crates.io/kernel32-sys/0.2.2 \ | 77 | crate://crates.io/kernel32-sys/0.2.2 \ |
74 | crate://crates.io/language-tags/0.2.2 \ | 78 | crate://crates.io/language-tags/0.2.2 \ |
75 | crate://crates.io/lazy_static/0.2.8 \ | 79 | crate://crates.io/lazy_static/0.2.8 \ |
76 | crate://crates.io/libc/0.2.22 \ | 80 | crate://crates.io/libc/0.2.24 \ |
77 | crate://crates.io/log/0.3.7 \ | 81 | crate://crates.io/libflate/0.1.9 \ |
82 | crate://crates.io/log/0.3.8 \ | ||
78 | crate://crates.io/maplit/0.1.4 \ | 83 | crate://crates.io/maplit/0.1.4 \ |
79 | crate://crates.io/matches/0.1.4 \ | 84 | crate://crates.io/matches/0.1.6 \ |
80 | crate://crates.io/memchr/1.0.1 \ | 85 | crate://crates.io/memchr/1.0.1 \ |
81 | crate://crates.io/metadeps/1.1.1 \ | 86 | crate://crates.io/metadeps/1.1.2 \ |
82 | crate://crates.io/mime/0.2.3 \ | 87 | crate://crates.io/mime/0.2.6 \ |
88 | crate://crates.io/native-tls/0.1.4 \ | ||
83 | crate://crates.io/net2/0.2.29 \ | 89 | crate://crates.io/net2/0.2.29 \ |
84 | crate://crates.io/num/0.1.37 \ | 90 | crate://crates.io/num/0.1.39 \ |
85 | crate://crates.io/num-integer/0.1.34 \ | 91 | crate://crates.io/num-integer/0.1.34 \ |
86 | crate://crates.io/num-iter/0.1.33 \ | 92 | crate://crates.io/num-iter/0.1.33 \ |
87 | crate://crates.io/num-traits/0.1.37 \ | 93 | crate://crates.io/num-traits/0.1.39 \ |
88 | crate://crates.io/num_cpus/1.4.0 \ | 94 | crate://crates.io/num_cpus/1.6.2 \ |
89 | crate://crates.io/openssl/0.9.11 \ | 95 | crate://crates.io/openssl/0.9.14 \ |
90 | crate://crates.io/openssl-sys/0.9.11 \ | 96 | crate://crates.io/openssl-sys/0.9.14 \ |
91 | crate://crates.io/pem/0.4.0 \ | 97 | crate://crates.io/pem/0.4.0 \ |
98 | crate://crates.io/percent-encoding/1.0.0 \ | ||
92 | crate://crates.io/pkg-config/0.3.9 \ | 99 | crate://crates.io/pkg-config/0.3.9 \ |
93 | crate://crates.io/quote/0.3.15 \ | 100 | crate://crates.io/quote/0.3.15 \ |
94 | crate://crates.io/rand/0.3.15 \ | 101 | crate://crates.io/rand/0.3.15 \ |
95 | crate://crates.io/redox_syscall/0.1.17 \ | 102 | crate://crates.io/redox_syscall/0.1.21 \ |
96 | crate://crates.io/regex/0.2.1 \ | 103 | crate://crates.io/regex/0.2.2 \ |
97 | crate://crates.io/regex-syntax/0.4.0 \ | 104 | crate://crates.io/regex-syntax/0.4.1 \ |
105 | crate://crates.io/reqwest/0.6.2 \ | ||
98 | crate://crates.io/ring/0.7.1 \ | 106 | crate://crates.io/ring/0.7.1 \ |
99 | crate://crates.io/rust-crypto/0.2.36 \ | 107 | crate://crates.io/rust-crypto/0.2.36 \ |
100 | crate://crates.io/rustc-demangle/0.1.4 \ | 108 | crate://crates.io/rustc-demangle/0.1.4 \ |
101 | crate://crates.io/rustc-serialize/0.3.24 \ | 109 | crate://crates.io/rustc-serialize/0.3.24 \ |
102 | crate://crates.io/rustc_version/0.1.7 \ | 110 | crate://crates.io/schannel/0.1.7 \ |
103 | crate://crates.io/semver/0.1.20 \ | 111 | crate://crates.io/secur32-sys/0.2.0 \ |
104 | crate://crates.io/serde/1.0.2 \ | 112 | crate://crates.io/security-framework/0.1.14 \ |
105 | crate://crates.io/serde_derive/1.0.2 \ | 113 | crate://crates.io/security-framework-sys/0.1.14 \ |
106 | crate://crates.io/serde_derive_internals/0.15.0 \ | 114 | crate://crates.io/serde/1.0.9 \ |
107 | crate://crates.io/serde_json/1.0.1 \ | 115 | crate://crates.io/serde_derive/1.0.9 \ |
116 | crate://crates.io/serde_derive_internals/0.15.1 \ | ||
117 | crate://crates.io/serde_json/1.0.2 \ | ||
118 | crate://crates.io/serde_urlencoded/0.5.1 \ | ||
108 | crate://crates.io/sha1/0.2.0 \ | 119 | crate://crates.io/sha1/0.2.0 \ |
120 | crate://crates.io/strsim/0.6.0 \ | ||
109 | crate://crates.io/syn/0.11.11 \ | 121 | crate://crates.io/syn/0.11.11 \ |
110 | crate://crates.io/synom/0.11.3 \ | 122 | crate://crates.io/synom/0.11.3 \ |
111 | crate://crates.io/tar/0.4.11 \ | 123 | crate://crates.io/tar/0.4.13 \ |
112 | crate://crates.io/thread-id/3.0.0 \ | 124 | crate://crates.io/tempdir/0.3.5 \ |
113 | crate://crates.io/thread_local/0.3.3 \ | 125 | crate://crates.io/term_size/0.3.0 \ |
126 | crate://crates.io/textwrap/0.6.0 \ | ||
127 | crate://crates.io/thread_local/0.3.4 \ | ||
114 | crate://crates.io/time/0.1.37 \ | 128 | crate://crates.io/time/0.1.37 \ |
115 | crate://crates.io/toml/0.2.1 \ | 129 | crate://crates.io/toml/0.2.1 \ |
116 | crate://crates.io/toml/0.4.0 \ | 130 | crate://crates.io/toml/0.4.2 \ |
117 | crate://crates.io/traitobject/0.1.0 \ | 131 | crate://crates.io/traitobject/0.1.0 \ |
118 | crate://crates.io/tungstenite/0.2.2 \ | 132 | crate://crates.io/tungstenite/0.2.4 \ |
119 | crate://crates.io/typeable/0.1.2 \ | 133 | crate://crates.io/typeable/0.1.2 \ |
120 | crate://crates.io/unicase/1.4.0 \ | 134 | crate://crates.io/unicase/1.4.2 \ |
121 | crate://crates.io/unicode-bidi/0.2.5 \ | 135 | crate://crates.io/unicode-bidi/0.3.3 \ |
122 | crate://crates.io/unicode-normalization/0.1.4 \ | 136 | crate://crates.io/unicode-normalization/0.1.5 \ |
137 | crate://crates.io/unicode-segmentation/1.1.0 \ | ||
138 | crate://crates.io/unicode-width/0.1.4 \ | ||
123 | crate://crates.io/unicode-xid/0.0.4 \ | 139 | crate://crates.io/unicode-xid/0.0.4 \ |
124 | crate://crates.io/unix_socket/0.5.0 \ | 140 | crate://crates.io/unix_socket/0.5.0 \ |
125 | crate://crates.io/unreachable/0.1.1 \ | 141 | crate://crates.io/unreachable/1.0.0 \ |
126 | crate://crates.io/untrusted/0.3.2 \ | 142 | crate://crates.io/untrusted/0.3.2 \ |
127 | crate://crates.io/url/1.4.0 \ | 143 | crate://crates.io/url/1.5.1 \ |
128 | crate://crates.io/user32-sys/0.2.0 \ | 144 | crate://crates.io/utf-8/0.7.1 \ |
129 | crate://crates.io/utf-8/0.7.0 \ | ||
130 | crate://crates.io/utf8-ranges/1.0.0 \ | 145 | crate://crates.io/utf8-ranges/1.0.0 \ |
131 | crate://crates.io/uuid/0.5.0 \ | 146 | crate://crates.io/uuid/0.5.1 \ |
147 | crate://crates.io/vec_map/0.8.0 \ | ||
148 | crate://crates.io/version_check/0.1.2 \ | ||
132 | crate://crates.io/void/1.0.2 \ | 149 | crate://crates.io/void/1.0.2 \ |
133 | crate://crates.io/winapi/0.2.8 \ | 150 | crate://crates.io/winapi/0.2.8 \ |
134 | crate://crates.io/winapi-build/0.1.1 \ | 151 | crate://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 | ||
165 | do_compile_prepend() { | 181 | do_compile_prepend() { |
166 | export SOTA_VERSION=$(make sota-version) | 182 | export SOTA_VERSION=$(make sota-version) |
183 | cd sota-client | ||
167 | } | 184 | } |
168 | 185 | ||
169 | do_install() { | 186 | do_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 | } |