summaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorAnton Gerasimov <anton.gerasimov@here.com>2018-09-12 11:07:40 +0200
committerAnton Gerasimov <anton.gerasimov@here.com>2018-09-12 11:07:40 +0200
commite038765f3df4dc4781cbf58a82eee607a8e3dd84 (patch)
tree11f7d953a431d7ae08586c8747c2a34d41998746 /classes
parentb252a30428b448b610edf59c0c0116a45039e4c8 (diff)
downloadmeta-updater-e038765f3df4dc4781cbf58a82eee607a8e3dd84.tar.gz
Don't commit credentials to OSTree repositorybugfix/OTA-852/pushcredentials
Diffstat (limited to 'classes')
-rw-r--r--classes/image_types_ostree.bbclass6
-rw-r--r--classes/image_types_ota.bbclass8
2 files changed, 11 insertions, 3 deletions
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass
index b525738..a5d43dc 100644
--- a/classes/image_types_ostree.bbclass
+++ b/classes/image_types_ostree.bbclass
@@ -32,6 +32,12 @@ IMAGE_CMD_ostree () {
32 32
33 cd ${OSTREE_ROOTFS} 33 cd ${OSTREE_ROOTFS}
34 34
35 for d in var/*; do
36 if [ "${d}" != "var/local" ]; then
37 rm -rf ${d}
38 fi
39 done
40
35 # Create sysroot directory to which physical sysroot will be mounted 41 # Create sysroot directory to which physical sysroot will be mounted
36 mkdir sysroot 42 mkdir sysroot
37 ln -sf sysroot/ostree ostree 43 ln -sf sysroot/ostree ostree
diff --git a/classes/image_types_ota.bbclass b/classes/image_types_ota.bbclass
index 0b2f7a1..cd58080 100644
--- a/classes/image_types_ota.bbclass
+++ b/classes/image_types_ota.bbclass
@@ -99,13 +99,15 @@ fakeroot do_otasetup () {
99 # Copy deployment /home and /var/sota to sysroot 99 # Copy deployment /home and /var/sota to sysroot
100 HOME_TMP=`mktemp -d ${WORKDIR}/home-tmp-XXXXX` 100 HOME_TMP=`mktemp -d ${WORKDIR}/home-tmp-XXXXX`
101 101
102 tar --xattrs --xattrs-include='*' -C ${HOME_TMP} -xf ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.rootfs.ostree.tar.bz2 ./usr/homedirs ./var/sota ./var/local || true 102 tar --xattrs --xattrs-include='*' -C ${HOME_TMP} -xf ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.rootfs.ostree.tar.bz2 ./usr/homedirs ./var/local || true
103 mv ${HOME_TMP}/var/sota ${OTA_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/ || true 103
104 mv ${HOME_TMP}/var/local ${OTA_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/ || true 104 cp -a ${IMAGE_ROOTFS}/var/sota ${OTA_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/ || true
105 # Create /var/sota if it doesn't exist yet 105 # Create /var/sota if it doesn't exist yet
106 mkdir -p ${OTA_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota || true 106 mkdir -p ${OTA_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota || true
107 # Ensure the permissions are correctly set 107 # Ensure the permissions are correctly set
108 chmod 700 ${OTA_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota 108 chmod 700 ${OTA_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota
109
110 mv ${HOME_TMP}/var/local ${OTA_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/ || true
109 mv ${HOME_TMP}/usr/homedirs/home ${OTA_SYSROOT}/ || true 111 mv ${HOME_TMP}/usr/homedirs/home ${OTA_SYSROOT}/ || true
110 # Ensure that /var/local exists (AGL symlinks /usr/local to /var/local) 112 # Ensure that /var/local exists (AGL symlinks /usr/local to /var/local)
111 install -d ${OTA_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/local 113 install -d ${OTA_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/local