diff options
author | Anton Gerasimov <anton@advancedtelematic.com> | 2016-11-21 16:41:03 +0100 |
---|---|---|
committer | Anton Gerasimov <anton@advancedtelematic.com> | 2016-11-23 15:27:17 +0100 |
commit | c0bfe0c519deed4e8cb3250e56e14db08a5d8750 (patch) | |
tree | 160b6991710591fdfc20dfad1a8d75f4fe658e6b /meta-sota | |
parent | d1c5151b80a13ac0d17b20a7e38453ab96c1a703 (diff) |
Bump versions of meta-sota utilities
Authenticated OSTree pull and push is added to sota_tools, ostree and
sota-client.
Change-Id: I36a4d3d24826ab8776bc980b50aef8606af9e7a8
Signed-off-by: Anton Gerasimov <anton@advancedtelematic.com>
Diffstat (limited to 'meta-sota')
-rw-r--r-- | meta-sota/README.md | 16 | ||||
-rw-r--r-- | meta-sota/classes/image_types_ostree.bbclass | 14 | ||||
-rw-r--r-- | meta-sota/recipes-sota/ostree/ostree_git.bb | 2 | ||||
-rw-r--r-- | meta-sota/recipes-sota/rvi-sota-client/rvi-sota-client_git.bb | 16 | ||||
-rw-r--r-- | meta-sota/recipes-sota/sota-tools/sota-tools_git.bb | 4 |
5 files changed, 21 insertions, 31 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" |