diff options
author | gjb <gjb@FreeBSD.org> | 2015-05-22 21:38:11 +0000 |
---|---|---|
committer | gjb <gjb@FreeBSD.org> | 2015-05-22 21:38:11 +0000 |
commit | f378874c7a7796435f2dd07ecf5ff2b0342ea785 (patch) | |
tree | 831205484826fdfcea39be0e0aafd4af6e1a143d | |
parent | 23e3d79f09cf59685b55bcfe34c557d8943d8f16 (diff) | |
download | FreeBSD-src-f378874c7a7796435f2dd07ecf5ff2b0342ea785.zip FreeBSD-src-f378874c7a7796435f2dd07ecf5ff2b0342ea785.tar.gz |
Fix staging virtual machine images for ftp propagation.
MFC after: 3 days
X-MFC-Note: needs all previous changes
Sponsored by: The FreeBSD Foundation
-rw-r--r-- | release/Makefile.mirrors | 71 |
1 files changed, 41 insertions, 30 deletions
diff --git a/release/Makefile.mirrors b/release/Makefile.mirrors index f7458c7..f534c19 100644 --- a/release/Makefile.mirrors +++ b/release/Makefile.mirrors @@ -207,36 +207,47 @@ iso-images-stage: .endif # no RELEASEDIR vm-images-stage: - @true -# mkdir -p ${VM_DIR} -#.if defined(SNAPSHOT) && !empty(SNAPSHOT) -# mkdir -p ${VM_DIR}/${BUILDDATE} -#. if exists(${VM_DIR}/Latest) -# unlink ${VM_DIR}/Latest -# cd ${VM_DIR} && ln -s ${BUILDDATE} Latest -#. endif -#. for VMIMAGE in ${VMIMAGES} -# cd /R/vmimages && cp -p ${VMIMAGE}.xz \ -# ${VM_DIR}/${BUILDDATE}/${OSRELEASE}-${SNAP_SUFFIX}-${VMIMAGE}.xz -# cd ${VM_DIR}/Latest && ln -s \ -# ../${BUILDDATE}/${OSRELEASE}-${SNAP_SUFFIX}-${VMIMAGE}.xz \ -# ${OSRELEASE}-${VMIMAGE}.xz -#. endfor -#. for CHECKSUM in ${CHECKSUM_FILES} -#. if exists(${VM_DIR}/${BUILDDATE}/CHECKSUM.${CHECKSUM}) -# rm -f ${VM_DIR}/${BUILDDATE}/CHECKSUM.${CHECKSUM} -#. endif -# cd ${VM_DIR}/${BUILDDATE} && ${CHECKSUM:tl} ${OSRELEASE}* > \ -# CHECKSUM.${CHECKSUM}-${REVISION}-${BRANCH}-${SNAP_SUFFIX} -# cd ${VM_DIR}/Latest && ln -s \ -# ${VM_DIR}/${BUILDDATE}/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} \ -# CHECKSUM.${CHECKSUM} -#. endfor -#.else # !snapshot -#. for CHECKSUM in ${CHECKSUM_FILES} -# cd /R/vmimages && cp -p CHECKSUM.${CHECKSUM}* \ -# ${VM_DIR}/${BUILDDATE}/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} -#.endif + mkdir -p ${VM_DIR} +.if defined(SNAPSHOT) && !empty(SNAPSHOT) +. if exists(${VM_DIR}/Latest) + rm -rf ${VM_DIR}/Latest +. endif + mkdir -p ${VM_DIR}/Latest + mkdir -p ${VM_DIR}/${BUILDDATE} +. for VMFORMAT in ${VMFORMATS} + cd ${RELEASEDIR}/vmimages && \ + mv ${OSRELEASE}.${VMFORMAT}.xz \ + ${OSRELEASE}-${SNAP_SUFFIX}.${VMFORMAT}.xz + cp -p ${RELEASEDIR}/vmimages/${OSRELEASE}-${SNAP_SUFFIX}.${VMFORMAT}.xz \ + ${VM_DIR}/${BUILDDATE}/${OSRELEASE}-${SNAP_SUFFIX}.${VMFORMAT}.xz + cd ${VM_DIR}/Latest && \ + ln -s ../${BUILDDATE}/${OSRELEASE}-${SNAP_SUFFIX}.${VMFORMAT}.xz \ + ${OSRELEASE}.${VMFORMAT}.xz +. endfor + cd ${RELEASEDIR}/vmimages && rm -f CHECKSUM.* +. for CHECKSUM in ${CHECKSUM_FILES} + cd ${RELEASEDIR}/vmimages && \ + ${CHECKSUM:tl} ${OSRELEASE}* > CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} + cp -p ${RELEASEDIR}/vmimages/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} \ + ${VM_DIR}/${BUILDDATE}/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} + cd ${VM_DIR}/Latest && \ + ln -s ../${BUILDDATE}/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} \ + CHECKSUM.${CHECKSUM} +. endfor +.else # not snapshot +. if exists(${VM_DIR}/Latest) + rm -rf ${VM_DIR}/Latest +. endif + mkdir -p ${VM_DIR}/Latest +. for VMFORMAT in ${VMFORMATS} + cp -p ${RELEASEDIR}/vmimages/${OSRELEASE}.${VMFORMAT}.xz \ + ${VM_DIR}/Latest/${OSRELEASE}.${VMFORMAT}.xz +. endfor +. for CHECKSUM in ${CHECKSUM_FILES} + cp -p ${RELEASEDIR}/vmimages/CHECKSUM.${CHECKSUM} \ + ${VM_DIR}/Latest/CHECKSUM.${CHECKSUM} +. endfor +.endif ftp-stage: remove-old-bits ${STAGE_TARGETS} |