diff options
author | lbonn <lbonn@users.noreply.github.com> | 2018-09-14 15:24:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-14 15:24:19 +0200 |
commit | 376c960e55eecfe20ebe8a9d73e407337f016041 (patch) | |
tree | b20fe64a8f398256b3316ae574181d886463e13c | |
parent | d85e759e3b164acb2c2c28554c61c50e482252a6 (diff) | |
parent | e038765f3df4dc4781cbf58a82eee607a8e3dd84 (diff) | |
download | meta-updater-376c960e55eecfe20ebe8a9d73e407337f016041.tar.gz |
Merge pull request #385 from advancedtelematic/bugfix/OTA-852/pushcredentials
Don't commit credentials to OSTree repository
-rw-r--r-- | classes/image_types_ostree.bbclass | 6 | ||||
-rw-r--r-- | classes/image_types_ota.bbclass | 8 |
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 |