diff options
| author | Anton Gerasimov <anton@advancedtelematic.com> | 2017-03-30 17:48:10 +0200 |
|---|---|---|
| committer | Anton Gerasimov <anton@advancedtelematic.com> | 2017-04-03 12:10:15 +0200 |
| commit | 501e07acd803df6f9264c4206b4b9529006f287a (patch) | |
| tree | 20e5bd1f9b3ffd4f230c9c9f5ac87fa85e626617 /recipes-sota | |
| parent | 95b5db5a2714d429d31c42d079b192e8edb1a079 (diff) | |
| download | meta-updater-501e07acd803df6f9264c4206b4b9529006f287a.tar.gz | |
Merge from meta-agl-extra
Diffstat (limited to 'recipes-sota')
| -rw-r--r-- | recipes-sota/ostree/ostree_git.bb | 20 | ||||
| -rw-r--r-- | recipes-sota/rvi-sota-client/rvi-sota-client_git.bb | 161 | ||||
| -rw-r--r-- | recipes-sota/sota-tools/sota-tools_git.bb | 2 |
3 files changed, 127 insertions, 56 deletions
diff --git a/recipes-sota/ostree/ostree_git.bb b/recipes-sota/ostree/ostree_git.bb index 5775dfa..102b70f 100644 --- a/recipes-sota/ostree/ostree_git.bb +++ b/recipes-sota/ostree/ostree_git.bb | |||
| @@ -8,7 +8,9 @@ INHERIT_remove_class-native = "systemd" | |||
| 8 | 8 | ||
| 9 | SRC_URI = "gitsm://github.com/ostreedev/ostree.git;branch=master" | 9 | SRC_URI = "gitsm://github.com/ostreedev/ostree.git;branch=master" |
| 10 | 10 | ||
| 11 | SRCREV="6517a8a27a1386e7cb5482e7cb2919fe92721ccf" | 11 | SRCREV="3b09620c2738bce4ed45e099cf2e4c5df7671d39" |
| 12 | |||
| 13 | PV = "2017.3-31-g3b09620c" | ||
| 12 | 14 | ||
| 13 | S = "${WORKDIR}/git" | 15 | S = "${WORKDIR}/git" |
| 14 | 16 | ||
| @@ -16,16 +18,20 @@ BBCLASSEXTEND = "native" | |||
| 16 | 18 | ||
| 17 | DEPENDS += "attr libarchive glib-2.0 pkgconfig gpgme libgsystem fuse libsoup-2.4 e2fsprogs gtk-doc-native" | 19 | DEPENDS += "attr libarchive glib-2.0 pkgconfig gpgme libgsystem fuse libsoup-2.4 e2fsprogs gtk-doc-native" |
| 18 | DEPENDS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}" | 20 | DEPENDS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}" |
| 19 | |||
| 20 | DEPENDS_remove_class-native = "systemd-native" | 21 | DEPENDS_remove_class-native = "systemd-native" |
| 21 | 22 | ||
| 22 | RDEPENDS_${PN} = "python util-linux-libuuid util-linux-libblkid util-linux-libmount libcap xz os-release ca-certificates" | 23 | RDEPENDS_${PN} = "python util-linux-libuuid util-linux-libblkid util-linux-libmount libcap xz bash" |
| 23 | RDEPENDS_${PN}_remove_class-native = "python-native os-release-native" | 24 | RDEPENDS_${PN}_remove_class-native = "python-native" |
| 24 | 25 | ||
| 25 | EXTRA_OECONF = "CFLAGS='-g' --with-libarchive --disable-gtk-doc --disable-gtk-doc-html --disable-gtk-doc-pdf --disable-man" | 26 | EXTRA_OECONF = "--with-libarchive --disable-gtk-doc --disable-gtk-doc-html --disable-gtk-doc-pdf --disable-man --with-smack --with-builtin-grub2-mkconfig" |
| 26 | EXTRA_OEMAKE = "CFLAGS='-g'" | ||
| 27 | EXTRA_OECONF_append_class-native = " --enable-wrpseudo-compat" | 27 | EXTRA_OECONF_append_class-native = " --enable-wrpseudo-compat" |
| 28 | 28 | ||
| 29 | # Path to ${prefix}/lib/ostree/ostree-grub-generator is hardcoded on the | ||
| 30 | # do_configure stage so we do depend on it | ||
| 31 | SYSROOT_DIR = "${STAGING_DIR_TARGET}" | ||
| 32 | SYSROOT_DIR_class-native = "${STAGING_DIR_NATIVE}" | ||
| 33 | do_configure[vardeps] += "SYSROOT_DIR" | ||
| 34 | |||
| 29 | SYSTEMD_REQUIRED = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}" | 35 | SYSTEMD_REQUIRED = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}" |
| 30 | SYSTEMD_REQUIRED_class-native = "" | 36 | SYSTEMD_REQUIRED_class-native = "" |
| 31 | 37 | ||
| @@ -55,7 +61,7 @@ do_compile_prepend() { | |||
| 55 | export SYSTEMD_REQUIRED | 61 | export SYSTEMD_REQUIRED |
| 56 | 62 | ||
| 57 | do_install_append() { | 63 | do_install_append() { |
| 58 | if [ -n $SYSTEMD_REQUIRED ]; then | 64 | if [ -n ${SYSTEMD_REQUIRED} ]; then |
| 59 | install -p -D ${S}/src/boot/ostree-prepare-root.service ${D}${systemd_unitdir}/system/ostree-prepare-root.service | 65 | install -p -D ${S}/src/boot/ostree-prepare-root.service ${D}${systemd_unitdir}/system/ostree-prepare-root.service |
| 60 | install -p -D ${S}/src/boot/ostree-remount.service ${D}${systemd_unitdir}/system/ostree-remount.service | 66 | install -p -D ${S}/src/boot/ostree-remount.service ${D}${systemd_unitdir}/system/ostree-remount.service |
| 61 | fi | 67 | fi |
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 c469ac7..9a3dbf9 100644 --- a/recipes-sota/rvi-sota-client/rvi-sota-client_git.bb +++ b/recipes-sota/rvi-sota-client/rvi-sota-client_git.bb | |||
| @@ -8,107 +8,154 @@ inherit cargo systemd | |||
| 8 | 8 | ||
| 9 | S = "${WORKDIR}/git" | 9 | S = "${WORKDIR}/git" |
| 10 | 10 | ||
| 11 | SRCREV = "022cf8501f9eb84bf334a2490e6e0c67842882ab" | 11 | # When changing this, don't forget to: |
| 12 | # 1) Update PV | ||
| 13 | # 2) Check that Cargo.lock hasn't changed with git diff old..new Cargo.lock | ||
| 14 | SRCREV = "878aa386e61bc253e4fae624ae62507710cd23f3" | ||
| 12 | 15 | ||
| 13 | # Generate with: | 16 | # Generate with: |
| 14 | # git describe --tags | cut -b2- | 17 | # git describe --tags | cut -b2- |
| 15 | PV = "0.2.30-2-g022cf85" | 18 | # or from the rvi_sota_client repo: |
| 19 | # make package-version | ||
| 20 | PV = "0.2.32-131-g878aa38" | ||
| 16 | 21 | ||
| 17 | BBCLASSEXTEND = "native" | 22 | BBCLASSEXTEND = "native" |
| 18 | 23 | ||
| 19 | FILES_${PN} = " \ | 24 | FILES_${PN} = " \ |
| 25 | /lib64 \ | ||
| 26 | ${bindir}/canonical_json.py \ | ||
| 20 | ${bindir}/sota_client \ | 27 | ${bindir}/sota_client \ |
| 21 | ${bindir}/sota_sysinfo.sh \ | 28 | ${bindir}/sota_sysinfo.sh \ |
| 22 | ${bindir}/system_info.sh \ | 29 | ${bindir}/system_info.sh \ |
| 23 | ${bindir}/sota_ostree.sh \ | 30 | ${bindir}/sota_ostree.sh \ |
| 31 | ${bindir}/sota_prov.sh \ | ||
| 24 | ${sysconfdir}/sota_client.version \ | 32 | ${sysconfdir}/sota_client.version \ |
| 25 | ${sysconfdir}/sota_certificates \ | 33 | ${sysconfdir}/sota_certificates \ |
| 34 | /var/sota/sota_provisioning_credentials.p12 \ | ||
| 35 | /var/sota/sota_provisioning_url.env \ | ||
| 36 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_unitdir}/system/sota_client_autoprovision.service', '', d)} \ | ||
| 26 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_unitdir}/system/sota_client.service', '', d)} \ | 37 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_unitdir}/system/sota_client.service', '', d)} \ |
| 27 | " | 38 | " |
| 28 | 39 | ||
| 40 | # list of dependencies can be generated from Cargo.lock by running | ||
| 41 | # cat Cargo.lock | sed -e '1,/metadata/ d' Cargo.lock | awk '{print "crate://crates.io/"$2 "/" $3" \\"}' | ||
| 29 | SRC_URI = " \ | 42 | SRC_URI = " \ |
| 30 | crate://crates.io/aho-corasick/0.5.3 \ | 43 | crate://crates.io/aho-corasick/0.5.3 \ |
| 31 | crate://crates.io/bit-set/0.2.0 \ | 44 | crate://crates.io/aho-corasick/0.6.3 \ |
| 45 | crate://crates.io/base64/0.4.1 \ | ||
| 46 | crate://crates.io/bit-set/0.4.0 \ | ||
| 32 | crate://crates.io/bit-vec/0.4.3 \ | 47 | crate://crates.io/bit-vec/0.4.3 \ |
| 33 | crate://crates.io/bitflags/0.4.0 \ | ||
| 34 | crate://crates.io/bitflags/0.7.0 \ | 48 | crate://crates.io/bitflags/0.7.0 \ |
| 35 | crate://crates.io/bytes/0.3.0 \ | 49 | crate://crates.io/byteorder/1.0.0 \ |
| 50 | crate://crates.io/bytes/0.4.1 \ | ||
| 36 | crate://crates.io/cfg-if/0.1.0 \ | 51 | crate://crates.io/cfg-if/0.1.0 \ |
| 37 | crate://crates.io/chan-signal/0.1.7 \ | 52 | crate://crates.io/chan/0.1.19 \ |
| 38 | crate://crates.io/chan/0.1.18 \ | 53 | crate://crates.io/chan-signal/0.2.0 \ |
| 39 | crate://crates.io/cookie/0.2.5 \ | 54 | crate://crates.io/chrono/0.3.0 \ |
| 40 | crate://crates.io/crossbeam/0.2.10 \ | 55 | crate://crates.io/crossbeam/0.2.10 \ |
| 41 | crate://crates.io/dbus/0.4.1 \ | 56 | crate://crates.io/dbus/0.5.2 \ |
| 42 | crate://crates.io/env_logger/0.3.5 \ | 57 | crate://crates.io/deque/0.3.1 \ |
| 43 | crate://crates.io/gcc/0.3.40 \ | 58 | crate://crates.io/dtoa/0.4.1 \ |
| 59 | crate://crates.io/env_logger/0.4.2 \ | ||
| 60 | crate://crates.io/error-chain/0.7.2 \ | ||
| 61 | crate://crates.io/foreign-types/0.2.0 \ | ||
| 62 | crate://crates.io/gcc/0.3.45 \ | ||
| 44 | crate://crates.io/gdi32-sys/0.2.0 \ | 63 | crate://crates.io/gdi32-sys/0.2.0 \ |
| 45 | crate://crates.io/getopts/0.2.14 \ | 64 | crate://crates.io/getopts/0.2.14 \ |
| 46 | crate://crates.io/hpack/0.2.0 \ | ||
| 47 | crate://crates.io/httparse/1.2.1 \ | 65 | crate://crates.io/httparse/1.2.1 \ |
| 48 | crate://crates.io/hyper/0.9.14 \ | 66 | crate://crates.io/hyper/0.10.5 \ |
| 49 | crate://crates.io/idna/0.1.0 \ | 67 | crate://crates.io/idna/0.1.0 \ |
| 68 | crate://crates.io/iovec/0.1.0 \ | ||
| 69 | crate://crates.io/itoa/0.3.1 \ | ||
| 50 | crate://crates.io/kernel32-sys/0.2.2 \ | 70 | crate://crates.io/kernel32-sys/0.2.2 \ |
| 51 | crate://crates.io/language-tags/0.2.2 \ | 71 | crate://crates.io/language-tags/0.2.2 \ |
| 52 | crate://crates.io/lazy_static/0.1.16 \ | 72 | crate://crates.io/lazy_static/0.2.5 \ |
| 53 | crate://crates.io/lazy_static/0.2.2 \ | 73 | crate://crates.io/libc/0.2.21 \ |
| 54 | crate://crates.io/lazycell/0.4.0 \ | 74 | crate://crates.io/log/0.3.7 \ |
| 55 | crate://crates.io/libc/0.2.18 \ | ||
| 56 | crate://crates.io/log/0.3.6 \ | ||
| 57 | crate://crates.io/matches/0.1.4 \ | 75 | crate://crates.io/matches/0.1.4 \ |
| 58 | crate://crates.io/memchr/0.1.11 \ | 76 | crate://crates.io/memchr/0.1.11 \ |
| 59 | crate://crates.io/mime/0.2.2 \ | 77 | crate://crates.io/memchr/1.0.1 \ |
| 60 | crate://crates.io/mio/0.6.1 \ | 78 | crate://crates.io/metadeps/1.1.1 \ |
| 61 | crate://crates.io/miow/0.1.4 \ | 79 | crate://crates.io/mime/0.2.3 \ |
| 62 | crate://crates.io/net2/0.2.26 \ | ||
| 63 | crate://crates.io/nix/0.7.0 \ | ||
| 64 | crate://crates.io/nom/1.2.4 \ | 80 | crate://crates.io/nom/1.2.4 \ |
| 65 | crate://crates.io/num_cpus/1.2.0 \ | 81 | crate://crates.io/num/0.1.37 \ |
| 66 | crate://crates.io/openssl-sys/0.9.3 \ | 82 | crate://crates.io/num-integer/0.1.33 \ |
| 67 | crate://crates.io/openssl/0.9.3 \ | 83 | crate://crates.io/num-iter/0.1.33 \ |
| 68 | crate://crates.io/pkg-config/0.3.8 \ | 84 | crate://crates.io/num-traits/0.1.37 \ |
| 85 | crate://crates.io/num_cpus/1.3.0 \ | ||
| 86 | crate://crates.io/openssl/0.9.10 \ | ||
| 87 | crate://crates.io/openssl-sys/0.9.10 \ | ||
| 88 | crate://crates.io/pem/0.2.0 \ | ||
| 89 | crate://crates.io/pkg-config/0.3.9 \ | ||
| 90 | crate://crates.io/quote/0.3.15 \ | ||
| 69 | crate://crates.io/rand/0.3.15 \ | 91 | crate://crates.io/rand/0.3.15 \ |
| 70 | crate://crates.io/regex-syntax/0.3.9 \ | 92 | crate://crates.io/rayon/0.6.0 \ |
| 93 | crate://crates.io/redox_syscall/0.1.17 \ | ||
| 71 | crate://crates.io/regex/0.1.80 \ | 94 | crate://crates.io/regex/0.1.80 \ |
| 95 | crate://crates.io/regex/0.2.1 \ | ||
| 96 | crate://crates.io/regex-syntax/0.3.9 \ | ||
| 97 | crate://crates.io/regex-syntax/0.4.0 \ | ||
| 98 | crate://crates.io/ring/0.7.1 \ | ||
| 72 | crate://crates.io/rust-crypto/0.2.36 \ | 99 | crate://crates.io/rust-crypto/0.2.36 \ |
| 73 | crate://crates.io/rustc-serialize/0.3.22 \ | 100 | crate://crates.io/rustc-serialize/0.3.23 \ |
| 74 | crate://crates.io/rustc_version/0.1.7 \ | 101 | crate://crates.io/rustc_version/0.1.7 \ |
| 75 | crate://crates.io/semver/0.1.20 \ | 102 | crate://crates.io/semver/0.1.20 \ |
| 103 | crate://crates.io/serde/0.9.11 \ | ||
| 104 | crate://crates.io/serde_codegen_internals/0.14.1 \ | ||
| 105 | crate://crates.io/serde_derive/0.9.11 \ | ||
| 106 | crate://crates.io/serde_json/0.9.9 \ | ||
| 76 | crate://crates.io/sha1/0.2.0 \ | 107 | crate://crates.io/sha1/0.2.0 \ |
| 77 | crate://crates.io/slab/0.3.0 \ | 108 | crate://crates.io/syn/0.11.9 \ |
| 78 | crate://crates.io/solicit/0.4.4 \ | 109 | crate://crates.io/synom/0.11.3 \ |
| 79 | crate://crates.io/thread-id/2.0.0 \ | 110 | crate://crates.io/thread-id/2.0.0 \ |
| 111 | crate://crates.io/thread-id/3.0.0 \ | ||
| 80 | crate://crates.io/thread_local/0.2.7 \ | 112 | crate://crates.io/thread_local/0.2.7 \ |
| 81 | crate://crates.io/time/0.1.35 \ | 113 | crate://crates.io/thread_local/0.3.3 \ |
| 114 | crate://crates.io/time/0.1.36 \ | ||
| 82 | crate://crates.io/toml/0.2.1 \ | 115 | crate://crates.io/toml/0.2.1 \ |
| 83 | crate://crates.io/traitobject/0.0.1 \ | 116 | crate://crates.io/toml/0.3.1 \ |
| 117 | crate://crates.io/traitobject/0.1.0 \ | ||
| 118 | crate://crates.io/tungstenite/0.1.1 \ | ||
| 84 | crate://crates.io/typeable/0.1.2 \ | 119 | crate://crates.io/typeable/0.1.2 \ |
| 85 | crate://crates.io/unicase/1.4.0 \ | 120 | crate://crates.io/unicase/1.4.0 \ |
| 86 | crate://crates.io/unicode-bidi/0.2.3 \ | 121 | crate://crates.io/unicode-bidi/0.2.5 \ |
| 87 | crate://crates.io/unicode-normalization/0.1.2 \ | 122 | crate://crates.io/unicode-normalization/0.1.4 \ |
| 123 | crate://crates.io/unicode-xid/0.0.4 \ | ||
| 88 | crate://crates.io/unix_socket/0.5.0 \ | 124 | crate://crates.io/unix_socket/0.5.0 \ |
| 89 | crate://crates.io/url/1.2.3 \ | 125 | crate://crates.io/unreachable/0.1.1 \ |
| 126 | crate://crates.io/untrusted/0.3.2 \ | ||
| 127 | crate://crates.io/url/1.4.0 \ | ||
| 90 | crate://crates.io/user32-sys/0.2.0 \ | 128 | crate://crates.io/user32-sys/0.2.0 \ |
| 129 | crate://crates.io/utf-8/0.7.0 \ | ||
| 91 | crate://crates.io/utf8-ranges/0.1.3 \ | 130 | crate://crates.io/utf8-ranges/0.1.3 \ |
| 131 | crate://crates.io/utf8-ranges/1.0.0 \ | ||
| 132 | crate://crates.io/uuid/0.4.0 \ | ||
| 92 | crate://crates.io/void/1.0.2 \ | 133 | crate://crates.io/void/1.0.2 \ |
| 93 | crate://crates.io/winapi-build/0.1.1 \ | ||
| 94 | crate://crates.io/winapi/0.2.8 \ | 134 | crate://crates.io/winapi/0.2.8 \ |
| 95 | crate://crates.io/ws/0.5.3 \ | 135 | crate://crates.io/winapi-build/0.1.1 \ |
| 96 | crate://crates.io/ws2_32-sys/0.2.1 \ | ||
| 97 | git://github.com/advancedtelematic/rvi_sota_client \ | 136 | git://github.com/advancedtelematic/rvi_sota_client \ |
| 98 | " | 137 | " |
| 138 | |||
| 99 | SRC_URI[index.md5sum] = "79f10f436dbf26737cc80445746f16b4" | 139 | SRC_URI[index.md5sum] = "79f10f436dbf26737cc80445746f16b4" |
| 100 | SRC_URI[index.sha256sum] = "86114b93f1f51aaf0aec3af0751d214b351f4ff9839ba031315c1b19dcbb1913" | 140 | SRC_URI[index.sha256sum] = "86114b93f1f51aaf0aec3af0751d214b351f4ff9839ba031315c1b19dcbb1913" |
| 101 | 141 | ||
| 102 | SYSTEMD_SERVICE_${PN} = "sota_client.service" | 142 | SYSTEMD_SERVICE_${PN} = "sota_client.service sota_client_autoprovision.service" |
| 103 | 143 | ||
| 104 | DEPENDS += " openssl dbus" | 144 | DEPENDS += " openssl openssl-native dbus " |
| 105 | RDEPENDS_${PN} = " libcrypto \ | 145 | RDEPENDS_${PN} = " libcrypto \ |
| 106 | libssl \ | 146 | libssl \ |
| 107 | bash \ | 147 | bash \ |
| 108 | lshw \ | 148 | lshw \ |
| 109 | jq \ | 149 | jq \ |
| 150 | curl \ | ||
| 151 | python \ | ||
| 152 | python-canonicaljson \ | ||
| 153 | python-json \ | ||
| 110 | " | 154 | " |
| 111 | 155 | ||
| 156 | export SOTA_AUTOPROVISION_CREDENTIALS | ||
| 157 | export SOTA_AUTOPROVISION_URL | ||
| 158 | |||
| 112 | do_compile_prepend() { | 159 | do_compile_prepend() { |
| 113 | export SOTA_VERSION=$(make sota-version) | 160 | export SOTA_VERSION=$(make sota-version) |
| 114 | } | 161 | } |
| @@ -116,20 +163,38 @@ do_compile_prepend() { | |||
| 116 | do_install() { | 163 | do_install() { |
| 117 | install -d ${D}${bindir} | 164 | install -d ${D}${bindir} |
| 118 | install -m 0755 target/${TARGET_SYS}/release/sota_client ${D}${bindir} | 165 | install -m 0755 target/${TARGET_SYS}/release/sota_client ${D}${bindir} |
| 119 | install -m 0755 run/sota_sysinfo.sh ${D}${bindir} | 166 | install -m 0755 ${S}/run/sota_sysinfo.sh ${D}${bindir} |
| 120 | ln -fs ${bindir}/sota_sysinfo.sh ${D}${bindir}/system_info.sh # For compatibilty with old sota.toml files | 167 | ln -fs ${bindir}/sota_sysinfo.sh ${D}${bindir}/system_info.sh # For compatibilty with old sota.toml files |
| 121 | install -m 0755 run/sota_ostree.sh ${D}${bindir} | 168 | install -m 0755 ${S}/run/sota_ostree.sh ${D}${bindir} |
| 169 | install -m 0755 ${S}/run/sota_prov.sh ${D}${bindir} | ||
| 170 | install -m 0755 ${S}/run/canonical_json.py ${D}${bindir} | ||
| 122 | 171 | ||
| 123 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | 172 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then |
| 124 | install -d ${D}${systemd_unitdir}/system | 173 | install -d ${D}/${systemd_unitdir}/system |
| 125 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'true', 'false', d)}; then | 174 | if [ -n "$SOTA_AUTOPROVISION_CREDENTIALS" ]; then |
| 126 | install -c ${S}/run/sota_client_ostree.service ${D}${systemd_unitdir}/system/sota_client.service | 175 | install -c ${S}/run/sota_client_uptane_auto.service ${D}${systemd_unitdir}/system/sota_client.service |
| 127 | else | 176 | else |
| 128 | install -c ${S}/run/sota_client.service ${D}${systemd_unitdir}/system/sota_client.service | 177 | install -c ${S}/run/sota_client_ostree.service ${D}${systemd_unitdir}/system/sota_client.service |
| 129 | fi | 178 | fi |
| 179 | install -c ${S}/run/sota_client_autoprovision.service ${D}${systemd_unitdir}/system/sota_client_autoprovision.service | ||
| 130 | fi | 180 | fi |
| 131 | 181 | ||
| 132 | install -d ${D}${sysconfdir} | 182 | install -d ${D}${sysconfdir} |
| 133 | echo `git log -1 --pretty=format:%H` > ${D}${sysconfdir}/sota_client.version | 183 | echo `git log -1 --pretty=format:%H` > ${D}${sysconfdir}/sota_client.version |
| 134 | install -c ${S}/run/sota_certificates ${D}${sysconfdir} | 184 | install -c ${S}/run/sota_certificates ${D}${sysconfdir} |
| 185 | ln -fs /lib ${D}/lib64 | ||
| 186 | |||
| 187 | if [ -n "$SOTA_AUTOPROVISION_CREDENTIALS" ]; then | ||
| 188 | EXPDATE=`openssl pkcs12 -in $SOTA_AUTOPROVISION_CREDENTIALS -password "pass:" -nodes 2>/dev/null | openssl x509 -noout -enddate | cut -f2 -d "="` | ||
| 189 | |||
| 190 | if [ `date +%s` -ge `date -d "${EXPDATE}" +%s` ]; then | ||
| 191 | bberror "Certificate ${SOTA_AUTOPROVISION_CREDENTIALS} has expired on ${EXPDATE}" | ||
| 192 | fi | ||
| 193 | |||
| 194 | install -d ${D}/var | ||
| 195 | install -d ${D}/var/sota | ||
| 196 | install -m 0655 $SOTA_AUTOPROVISION_CREDENTIALS ${D}/var/sota/sota_provisioning_credentials.p12 | ||
| 197 | echo "SOTA_GATEWAY_URI=$SOTA_AUTOPROVISION_URL" > ${D}/var/sota/sota_provisioning_url.env | ||
| 198 | fi | ||
| 199 | |||
| 135 | } | 200 | } |
diff --git a/recipes-sota/sota-tools/sota-tools_git.bb b/recipes-sota/sota-tools/sota-tools_git.bb index e472ff8..326ff20 100644 --- a/recipes-sota/sota-tools/sota-tools_git.bb +++ b/recipes-sota/sota-tools/sota-tools_git.bb | |||
| @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=65d26fcc2f35ea6a181ac777e42db1ea" | |||
| 6 | S = "${WORKDIR}/git" | 6 | S = "${WORKDIR}/git" |
| 7 | 7 | ||
| 8 | SRC_URI = "gitsm://github.com/advancedtelematic/sota-tools.git;branch=master" | 8 | SRC_URI = "gitsm://github.com/advancedtelematic/sota-tools.git;branch=master" |
| 9 | SRCREV = "c6ecec3e86c423dd6caaa362a5ff0a1a6f4072a8" | 9 | SRCREV = "4d7f22f50ab43be5bee61ad3e96cd9db4ef3a372" |
| 10 | 10 | ||
| 11 | inherit cmake | 11 | inherit cmake |
| 12 | 12 | ||
