diff options
-rw-r--r-- | README.md | 16 | ||||
-rw-r--r-- | classes/image_types_ostree.bbclass | 14 | ||||
-rw-r--r-- | recipes-sota/ostree/ostree_git.bb | 2 | ||||
-rw-r--r-- | recipes-sota/rvi-sota-client/rvi-sota-client_git.bb | 16 | ||||
-rw-r--r-- | recipes-sota/sota-tools/sota-tools_git.bb | 4 |
5 files changed, 21 insertions, 31 deletions
@@ -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 | ||
58 | Usage | 56 | Usage |
59 | ----- | 57 | ----- |
@@ -100,8 +98,8 @@ changes in OSTree repository generated by bitbake process. It communicates with | |||
100 | an http server capable of querying files with HEAD requests and uploading them | 98 | an http server capable of querying files with HEAD requests and uploading them |
101 | with POST requests. garage-push is used as following: | 99 | with 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 | ||
105 | You can set OSTREE_REMOTE_URL, OSTREE_REMOTE_USER and OSTREE_REMOTE_PASSWORD in | 103 | You can set OSTREE_PUSH_CREDENTIALS in your local.conf to make your build |
106 | your local.conf to make your build results be automatically synchronized with a | 104 | results be automatically synchronized with a remote server. |
107 | remote server. | 105 | Credentials 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 () { | |||
127 | IMAGE_TYPEDEP_ostreepush = "ostree" | 127 | IMAGE_TYPEDEP_ostreepush = "ostree" |
128 | IMAGE_DEPENDS_ostreepush = "sota-tools-native:do_populate_sysroot" | 128 | IMAGE_DEPENDS_ostreepush = "sota-tools-native:do_populate_sysroot" |
129 | IMAGE_CMD_ostreepush () { | 129 | IMAGE_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 | ||
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="v2016.12" | 11 | SRCREV="37c07d2f1c90b12bcfba85a7d900f81a7c362eb4" |
12 | 12 | ||
13 | S = "${WORKDIR}/git" | 13 | S = "${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 | ||
9 | S = "${WORKDIR}/git" | 9 | S = "${WORKDIR}/git" |
10 | 10 | ||
11 | SRCREV = "63437b6978bc1c2e3d6a9a5914fe165fdd2a0f5f" | 11 | SRCREV = "2d2e57609ffa09b17a2c948365f2e74bff91ae8c" |
12 | 12 | ||
13 | # Generate with: | 13 | # Generate with: |
14 | # git describe --tags | cut -b2- | 14 | # git describe --tags | cut -b2- |
15 | PV = "0.2.20-2-g63437b6" | 15 | PV = "0.2.20-14-g2d2e576" |
16 | 16 | ||
17 | BBCLASSEXTEND = "native" | 17 | BBCLASSEXTEND = "native" |
18 | 18 | ||
19 | FILES_${PN} = " \ | 19 | FILES_${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 | ||
27 | SRC_URI = " \ | 28 | SRC_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" | |||
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 = "7ff1d92c161ba4fb047a1e1e4cba5424b4adca00" | 9 | SRCREV = "a70ae808db4cbabdc643ea3453cd7d8efac6c659" |
10 | 10 | ||
11 | inherit cmake | 11 | inherit cmake |
12 | 12 | ||
13 | DEPENDS = "boost" | 13 | DEPENDS = "boost glib-2.0" |
14 | 14 | ||
15 | BBCLASSEXTEND = "native" | 15 | BBCLASSEXTEND = "native" |
16 | 16 | ||