summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-sota/README.md16
-rw-r--r--meta-sota/classes/image_types_ostree.bbclass14
-rw-r--r--meta-sota/recipes-sota/ostree/ostree_git.bb2
-rw-r--r--meta-sota/recipes-sota/rvi-sota-client/rvi-sota-client_git.bb16
-rw-r--r--meta-sota/recipes-sota/sota-tools/sota-tools_git.bb4
-rw-r--r--templates/feature/agl-sota/50_local.conf.inc4
6 files changed, 23 insertions, 33 deletions
diff --git a/meta-sota/README.md b/meta-sota/README.md
index 0e47cf6..4ea5da5 100644
--- a/meta-sota/README.md
+++ b/meta-sota/README.md
@@ -49,11 +49,9 @@ SOTA-related variables in local.conf
* OSTREE_INITRAMFS_IMAGE - initramfs/initrd image that is used as a proxy while
booting into OSTree deployment. Do not change this setting unless you are
sure that your initramfs can serve as such proxy.
-* OSTREE_REMOTE_URL - when set adds pushing your ostree commit to a remote
- repo. Defaults to an empty string.
-* OSTREE_REMOTE_USER and OSTREE_REMOTE_PASSWORD - should be set if
- OSTREE_REMOTE_URL is set. Used to authenticate to the server set in
- OSTREE_REMOTE_URL. Both default to an empty string.
+* OSTREE_PUSH_CREDENTIALS - when set adds pushing your ostree commit to a remote
+ repo. sota-tools will then use credentials in the file pointed to by this
+ variable.
Usage
-----
@@ -100,8 +98,8 @@ changes in OSTree repository generated by bitbake process. It communicates with
an http server capable of querying files with HEAD requests and uploading them
with POST requests. garage-push is used as following:
- garage-push --repo=/path/to/ostree-repo --ref=mybranch --url=https://my.ostree.server/ --user=username --password=password
+ garage-push --repo=/path/to/ostree-repo --ref=mybranch --credentials=~/.sota-tools.json --user=username --password=
-You can set OSTREE_REMOTE_URL, OSTREE_REMOTE_USER and OSTREE_REMOTE_PASSWORD in
-your local.conf to make your build results be automatically synchronized with a
-remote server.
+You can set OSTREE_PUSH_CREDENTIALS in your local.conf to make your build
+results be automatically synchronized with a remote server.
+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/meta-sota/classes/image_types_ostree.bbclass b/meta-sota/classes/image_types_ostree.bbclass
index 453692e..32ea98f 100644
--- a/meta-sota/classes/image_types_ostree.bbclass
+++ b/meta-sota/classes/image_types_ostree.bbclass
@@ -127,19 +127,9 @@ IMAGE_CMD_ostree () {
IMAGE_TYPEDEP_ostreepush = "ostree"
IMAGE_DEPENDS_ostreepush = "sota-tools-native:do_populate_sysroot"
IMAGE_CMD_ostreepush () {
- if [ ${OSTREE_REMOTE_URL} ]; then
- if [ -z ${OSTREE_REMOTE_USER} ]; then
- bberror "OSTREE_REMOTE_PASSWORD isn't set"
- fi
-
- if [ -z ${OSTREE_REMOTE_PASSWORD} ]; then
- bberror "OSTREE_REMOTE_PASSWORD isn't set"
- fi
-
+ if [ ${OSTREE_PUSH_CREDENTIALS} ]; then
garage-push --repo=${OSTREE_REPO} \
--ref=${OSTREE_BRANCHNAME} \
- --url=${OSTREE_REMOTE_URL} \
- --user=${OSTREE_REMOTE_USER} \
- --password=${OSTREE_REMOTE_PASSWORD}
+ --credentials=${OSTREE_PUSH_CREDENTIALS}
fi
}
diff --git a/meta-sota/recipes-sota/ostree/ostree_git.bb b/meta-sota/recipes-sota/ostree/ostree_git.bb
index 1b97e13..3d12de8 100644
--- a/meta-sota/recipes-sota/ostree/ostree_git.bb
+++ b/meta-sota/recipes-sota/ostree/ostree_git.bb
@@ -8,7 +8,7 @@ INHERIT_remove_class-native = "systemd"
SRC_URI = "gitsm://github.com/ostreedev/ostree.git;branch=master"
-SRCREV="v2016.12"
+SRCREV="37c07d2f1c90b12bcfba85a7d900f81a7c362eb4"
S = "${WORKDIR}/git"
diff --git a/meta-sota/recipes-sota/rvi-sota-client/rvi-sota-client_git.bb b/meta-sota/recipes-sota/rvi-sota-client/rvi-sota-client_git.bb
index 20c32cd..0caef32 100644
--- a/meta-sota/recipes-sota/rvi-sota-client/rvi-sota-client_git.bb
+++ b/meta-sota/recipes-sota/rvi-sota-client/rvi-sota-client_git.bb
@@ -8,20 +8,21 @@ inherit cargo systemd
S = "${WORKDIR}/git"
-SRCREV = "63437b6978bc1c2e3d6a9a5914fe165fdd2a0f5f"
+SRCREV = "2d2e57609ffa09b17a2c948365f2e74bff91ae8c"
# Generate with:
# git describe --tags | cut -b2-
-PV = "0.2.20-2-g63437b6"
+PV = "0.2.20-14-g2d2e576"
BBCLASSEXTEND = "native"
FILES_${PN} = " \
- /usr/bin/sota_client \
- /usr/bin/system_info.sh \
- /etc/sota_client.version \
- /etc/sota_certificates \
- ${base_libdir}/systemd/system/sota_client.service \
+ ${bindir}/sota_client \
+ ${bindir}/system_info.sh \
+ ${sysconfdir}/sota_client.version \
+ ${sysconfdir}/sota_certificates \
+ ${systemd_unitdir}/system/sota_client.service \
+ ${bindir}/sota_ostree.sh \
"
SRC_URI = " \
@@ -131,6 +132,7 @@ do_install() {
install -d ${D}${bindir}
install -m 0755 target/${TARGET_SYS}/release/sota_client ${D}${bindir}
install -m 0755 run/system_info.sh ${D}${bindir}
+ install -m 0755 run/sota_ostree.sh ${D}${bindir}
install -d ${D}${systemd_unitdir}/system
install -c ${S}/run/sota_client.service ${D}${systemd_unitdir}/system
diff --git a/meta-sota/recipes-sota/sota-tools/sota-tools_git.bb b/meta-sota/recipes-sota/sota-tools/sota-tools_git.bb
index acd8e4a..911c66b 100644
--- a/meta-sota/recipes-sota/sota-tools/sota-tools_git.bb
+++ b/meta-sota/recipes-sota/sota-tools/sota-tools_git.bb
@@ -6,11 +6,11 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=65d26fcc2f35ea6a181ac777e42db1ea"
S = "${WORKDIR}/git"
SRC_URI = "gitsm://github.com/advancedtelematic/sota-tools.git;branch=master"
-SRCREV = "7ff1d92c161ba4fb047a1e1e4cba5424b4adca00"
+SRCREV = "a70ae808db4cbabdc643ea3453cd7d8efac6c659"
inherit cmake
-DEPENDS = "boost"
+DEPENDS = "boost glib-2.0"
BBCLASSEXTEND = "native"
diff --git a/templates/feature/agl-sota/50_local.conf.inc b/templates/feature/agl-sota/50_local.conf.inc
index 172ad8b..4960e1a 100644
--- a/templates/feature/agl-sota/50_local.conf.inc
+++ b/templates/feature/agl-sota/50_local.conf.inc
@@ -5,11 +5,11 @@ IMAGE_INSTALL_append = " ostree"
# live image for OSTree-enabled systems
IMAGE_CLASSES += "image_types_ostree image_types_ota"
-IMAGE_FSTYPES += "otaimg"
+IMAGE_FSTYPES += "ostreepush otaimg"
# Please redefine OSTREE_REPO in order to have a persistent OSTree repo
OSTREE_REPO ?= "${DEPLOY_DIR_IMAGE}/ostree_repo"
-OSTREE_BRANCHNAME ?= "agl-ota"
+OSTREE_BRANCHNAME ?= "agl-ota-${MACHINE}"
OSTREE_OSNAME ?= "agl"
OSTREE_INITRAMFS_IMAGE ?= "initramfs-ostree-image"