summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md16
-rw-r--r--classes/image_types_ostree.bbclass14
-rw-r--r--recipes-sota/ostree/ostree_git.bb2
-rw-r--r--recipes-sota/rvi-sota-client/rvi-sota-client_git.bb16
-rw-r--r--recipes-sota/sota-tools/sota-tools_git.bb4
5 files changed, 21 insertions, 31 deletions
diff --git a/README.md b/README.md
index 0e47cf6..4ea5da5 100644
--- a/README.md
+++ b/README.md
@@ -49,11 +49,9 @@ SOTA-related variables in local.conf
49* OSTREE_INITRAMFS_IMAGE - initramfs/initrd image that is used as a proxy while 49* OSTREE_INITRAMFS_IMAGE - initramfs/initrd image that is used as a proxy while
50 booting into OSTree deployment. Do not change this setting unless you are 50 booting into OSTree deployment. Do not change this setting unless you are
51 sure that your initramfs can serve as such proxy. 51 sure that your initramfs can serve as such proxy.
52* OSTREE_REMOTE_URL - when set adds pushing your ostree commit to a remote 52* OSTREE_PUSH_CREDENTIALS - when set adds pushing your ostree commit to a remote
53 repo. Defaults to an empty string. 53 repo. sota-tools will then use credentials in the file pointed to by this
54* OSTREE_REMOTE_USER and OSTREE_REMOTE_PASSWORD - should be set if 54 variable.
55 OSTREE_REMOTE_URL is set. Used to authenticate to the server set in
56 OSTREE_REMOTE_URL. Both default to an empty string.
57 55
58Usage 56Usage
59----- 57-----
@@ -100,8 +98,8 @@ changes in OSTree repository generated by bitbake process. It communicates with
100an http server capable of querying files with HEAD requests and uploading them 98an http server capable of querying files with HEAD requests and uploading them
101with POST requests. garage-push is used as following: 99with POST requests. garage-push is used as following:
102 100
103 garage-push --repo=/path/to/ostree-repo --ref=mybranch --url=https://my.ostree.server/ --user=username --password=password 101 garage-push --repo=/path/to/ostree-repo --ref=mybranch --credentials=~/.sota-tools.json --user=username --password=
104 102
105You can set OSTREE_REMOTE_URL, OSTREE_REMOTE_USER and OSTREE_REMOTE_PASSWORD in 103You can set OSTREE_PUSH_CREDENTIALS in your local.conf to make your build
106your local.conf to make your build results be automatically synchronized with a 104results be automatically synchronized with a remote server.
107remote server. 105Credentials are stored in JSON format which is described in [sota-tools documentation](https://github.com/advancedtelematic/sota-tools/blob/master/README.adoc)
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass
index 453692e..32ea98f 100644
--- a/classes/image_types_ostree.bbclass
+++ b/classes/image_types_ostree.bbclass
@@ -127,19 +127,9 @@ IMAGE_CMD_ostree () {
127IMAGE_TYPEDEP_ostreepush = "ostree" 127IMAGE_TYPEDEP_ostreepush = "ostree"
128IMAGE_DEPENDS_ostreepush = "sota-tools-native:do_populate_sysroot" 128IMAGE_DEPENDS_ostreepush = "sota-tools-native:do_populate_sysroot"
129IMAGE_CMD_ostreepush () { 129IMAGE_CMD_ostreepush () {
130 if [ ${OSTREE_REMOTE_URL} ]; then 130 if [ ${OSTREE_PUSH_CREDENTIALS} ]; then
131 if [ -z ${OSTREE_REMOTE_USER} ]; then
132 bberror "OSTREE_REMOTE_PASSWORD isn't set"
133 fi
134
135 if [ -z ${OSTREE_REMOTE_PASSWORD} ]; then
136 bberror "OSTREE_REMOTE_PASSWORD isn't set"
137 fi
138
139 garage-push --repo=${OSTREE_REPO} \ 131 garage-push --repo=${OSTREE_REPO} \
140 --ref=${OSTREE_BRANCHNAME} \ 132 --ref=${OSTREE_BRANCHNAME} \
141 --url=${OSTREE_REMOTE_URL} \ 133 --credentials=${OSTREE_PUSH_CREDENTIALS}
142 --user=${OSTREE_REMOTE_USER} \
143 --password=${OSTREE_REMOTE_PASSWORD}
144 fi 134 fi
145} 135}
diff --git a/recipes-sota/ostree/ostree_git.bb b/recipes-sota/ostree/ostree_git.bb
index 1b97e13..3d12de8 100644
--- a/recipes-sota/ostree/ostree_git.bb
+++ b/recipes-sota/ostree/ostree_git.bb
@@ -8,7 +8,7 @@ INHERIT_remove_class-native = "systemd"
8 8
9SRC_URI = "gitsm://github.com/ostreedev/ostree.git;branch=master" 9SRC_URI = "gitsm://github.com/ostreedev/ostree.git;branch=master"
10 10
11SRCREV="v2016.12" 11SRCREV="37c07d2f1c90b12bcfba85a7d900f81a7c362eb4"
12 12
13S = "${WORKDIR}/git" 13S = "${WORKDIR}/git"
14 14
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 20c32cd..0caef32 100644
--- a/recipes-sota/rvi-sota-client/rvi-sota-client_git.bb
+++ b/recipes-sota/rvi-sota-client/rvi-sota-client_git.bb
@@ -8,20 +8,21 @@ inherit cargo systemd
8 8
9S = "${WORKDIR}/git" 9S = "${WORKDIR}/git"
10 10
11SRCREV = "63437b6978bc1c2e3d6a9a5914fe165fdd2a0f5f" 11SRCREV = "2d2e57609ffa09b17a2c948365f2e74bff91ae8c"
12 12
13# Generate with: 13# Generate with:
14# git describe --tags | cut -b2- 14# git describe --tags | cut -b2-
15PV = "0.2.20-2-g63437b6" 15PV = "0.2.20-14-g2d2e576"
16 16
17BBCLASSEXTEND = "native" 17BBCLASSEXTEND = "native"
18 18
19FILES_${PN} = " \ 19FILES_${PN} = " \
20 /usr/bin/sota_client \ 20 ${bindir}/sota_client \
21 /usr/bin/system_info.sh \ 21 ${bindir}/system_info.sh \
22 /etc/sota_client.version \ 22 ${sysconfdir}/sota_client.version \
23 /etc/sota_certificates \ 23 ${sysconfdir}/sota_certificates \
24 ${base_libdir}/systemd/system/sota_client.service \ 24 ${systemd_unitdir}/system/sota_client.service \
25 ${bindir}/sota_ostree.sh \
25 " 26 "
26 27
27SRC_URI = " \ 28SRC_URI = " \
@@ -131,6 +132,7 @@ do_install() {
131 install -d ${D}${bindir} 132 install -d ${D}${bindir}
132 install -m 0755 target/${TARGET_SYS}/release/sota_client ${D}${bindir} 133 install -m 0755 target/${TARGET_SYS}/release/sota_client ${D}${bindir}
133 install -m 0755 run/system_info.sh ${D}${bindir} 134 install -m 0755 run/system_info.sh ${D}${bindir}
135 install -m 0755 run/sota_ostree.sh ${D}${bindir}
134 136
135 install -d ${D}${systemd_unitdir}/system 137 install -d ${D}${systemd_unitdir}/system
136 install -c ${S}/run/sota_client.service ${D}${systemd_unitdir}/system 138 install -c ${S}/run/sota_client.service ${D}${systemd_unitdir}/system
diff --git a/recipes-sota/sota-tools/sota-tools_git.bb b/recipes-sota/sota-tools/sota-tools_git.bb
index acd8e4a..911c66b 100644
--- a/recipes-sota/sota-tools/sota-tools_git.bb
+++ b/recipes-sota/sota-tools/sota-tools_git.bb
@@ -6,11 +6,11 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=65d26fcc2f35ea6a181ac777e42db1ea"
6S = "${WORKDIR}/git" 6S = "${WORKDIR}/git"
7 7
8SRC_URI = "gitsm://github.com/advancedtelematic/sota-tools.git;branch=master" 8SRC_URI = "gitsm://github.com/advancedtelematic/sota-tools.git;branch=master"
9SRCREV = "7ff1d92c161ba4fb047a1e1e4cba5424b4adca00" 9SRCREV = "a70ae808db4cbabdc643ea3453cd7d8efac6c659"
10 10
11inherit cmake 11inherit cmake
12 12
13DEPENDS = "boost" 13DEPENDS = "boost glib-2.0"
14 14
15BBCLASSEXTEND = "native" 15BBCLASSEXTEND = "native"
16 16