git: 35623ccc3758 - main - release: Standardize on *-${FS}.* VM image naming

From: Colin Percival <cperciva_at_FreeBSD.org>
Date: Tue, 10 Dec 2024 20:48:30 UTC
The branch main has been updated by cperciva:

URL: https://cgit.FreeBSD.org/src/commit/?id=35623ccc375846648f4dcdfc47c7e84fc9db4852

commit 35623ccc375846648f4dcdfc47c7e84fc9db4852
Author:     Colin Percival <cperciva@FreeBSD.org>
AuthorDate: 2024-12-10 19:57:52 +0000
Commit:     Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2024-12-10 20:48:17 +0000

    release: Standardize on *-${FS}.* VM image naming
    
    We publish three sets of VM images on download.freebsd.org:
    * Generic VM images
    * BASIC-CLOUDINIT VM images
    * BASIC-CI VM images
    
    Of these, the first had names like
      FreeBSD-14.2-RELEASE-amd64-ufs.raw.xz,
    the second had names like
      FreeBSD-14.2-RELEASE-amd64-BASIC-CLOUDINIT.ufs.qcow2.xz,
    and the third had names like
      FreeBSD-14.2-RELEASE-amd64-BASIC-CI.ufs.raw.xz
    but were listed in the CHECKSUM files with names like
      FreeBSD-14.2-RELEASE-amd64-BASIC-CI-ufs.raw.xz
    
    Standardize these to consistently use a hyphen before the filesystem
    type rather than a period.
    
    Note: On FreeBSD 14 we ship images without the -${FS} component in
    their names; these are hardlinks to the -ufs images for compatibility
    purposes.  On FreeBSD 13 we only have UFS images and don't include the
    filesystem in the name.
    
    MFC after:      1 week
    Reported by:    jmg
    Sponsored by:   Amazon
---
 release/Makefile.mirrors | 28 ++++++++++++++--------------
 release/Makefile.vm      |  4 ++--
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/release/Makefile.mirrors b/release/Makefile.mirrors
index 7f7c34e21077..5e65bfbe8b3f 100644
--- a/release/Makefile.mirrors
+++ b/release/Makefile.mirrors
@@ -212,13 +212,13 @@ vm-images-stage:
 .    for VMFORMAT in ${${CW}_FORMAT}
 .     for FS in ${${CW}_FSLIST}
 	cd ${RELEASEDIR}/vmimages && \
-		mv ${OSRELEASE}-${CW}.${FS}.${VMFORMAT}.xz \
-		${OSRELEASE}-${CW}-${SNAP_SUFFIX}.${FS}.${VMFORMAT}.xz
-	cp -p ${RELEASEDIR}/vmimages/${OSRELEASE}-${CW}-${SNAP_SUFFIX}.${FS}.${VMFORMAT}.xz \
-		${VM_DIR}/${BUILDDATE}/${OSRELEASE}-${CW}-${SNAP_SUFFIX}.${FS}.${VMFORMAT}.xz
+		mv ${OSRELEASE}-${CW}-${FS}.${VMFORMAT}.xz \
+		${OSRELEASE}-${CW}-${SNAP_SUFFIX}-${FS}.${VMFORMAT}.xz
+	cp -p ${RELEASEDIR}/vmimages/${OSRELEASE}-${CW}-${SNAP_SUFFIX}-${FS}.${VMFORMAT}.xz \
+		${VM_DIR}/${BUILDDATE}/${OSRELEASE}-${CW}-${SNAP_SUFFIX}-${FS}.${VMFORMAT}.xz
 	cd ${VM_DIR}/Latest && \
-		ln -s ../${BUILDDATE}/${OSRELEASE}-${CW}-${SNAP_SUFFIX}.${FS}.${VMFORMAT}.xz \
-		${OSRELEASE}-${CW}.${FS}.${VMFORMAT}.xz
+		ln -s ../${BUILDDATE}/${OSRELEASE}-${CW}-${SNAP_SUFFIX}-${FS}.${VMFORMAT}.xz \
+		${OSRELEASE}-${CW}-${FS}.${VMFORMAT}.xz
 .     endfor
 .    endfor
 .   endif
@@ -250,8 +250,8 @@ vm-images-stage:
 .   if ${CW} == BASIC-CLOUDINIT
 .    for VMFORMAT in ${${CW}_FORMAT}
 .     for FS in ${${CW}_FSLIST}
-	cp -p ${RELEASEDIR}/vmimages/${OSRELEASE}-${CW}.${FS}.${VMFORMAT}.xz \
-		${VM_DIR}/Latest/${OSRELEASE}-${CW}.${FS}.${VMFORMAT}.xz
+	cp -p ${RELEASEDIR}/vmimages/${OSRELEASE}-${CW}-${FS}.${VMFORMAT}.xz \
+		${VM_DIR}/Latest/${OSRELEASE}-${CW}-${FS}.${VMFORMAT}.xz
 .     endfor
 .    endfor
 .   endif
@@ -277,12 +277,12 @@ ci-images-stage:
 .    for FS in ${${CW}_FSLIST}
 	cd ${RELEASEDIR}/ciimages && \
 		mv ${OSRELEASE}-${CW}-${FS}.${VMFORMAT}.xz \
-		${OSRELEASE}-${CW}-${SNAP_SUFFIX}.${FS}.${VMFORMAT}.xz
-	cp -p ${RELEASEDIR}/ciimages/${OSRELEASE}-${CW}-${SNAP_SUFFIX}.${FS}.${VMFORMAT}.xz \
-		${CI_DIR}/${BUILDDATE}/${OSRELEASE}-${CW}-${SNAP_SUFFIX}.${FS}.${VMFORMAT}.xz
+		${OSRELEASE}-${CW}-${SNAP_SUFFIX}-${FS}.${VMFORMAT}.xz
+	cp -p ${RELEASEDIR}/ciimages/${OSRELEASE}-${CW}-${SNAP_SUFFIX}-${FS}.${VMFORMAT}.xz \
+		${CI_DIR}/${BUILDDATE}/${OSRELEASE}-${CW}-${SNAP_SUFFIX}-${FS}.${VMFORMAT}.xz
 	cd ${CI_DIR}/Latest && \
-		ln -s ../${BUILDDATE}/${OSRELEASE}-${CW}-${SNAP_SUFFIX}.${FS}.${VMFORMAT}.xz \
-		${OSRELEASE}-${CW}.${FS}.${VMFORMAT}.xz
+		ln -s ../${BUILDDATE}/${OSRELEASE}-${CW}-${SNAP_SUFFIX}-${FS}.${VMFORMAT}.xz \
+		${OSRELEASE}-${CW}-${FS}.${VMFORMAT}.xz
 .    endfor
 .   endfor
 .  endif
@@ -307,7 +307,7 @@ ci-images-stage:
 .   for VMFORMAT in ${${CW}_FORMAT}
 .    for FS in ${${CW}_FSLIST}
 	cp -p ${RELEASEDIR}/ciimages/${OSRELEASE}-${CW}-${FS}.${VMFORMAT}.xz \
-		${CI_DIR}/Latest/${OSRELEASE}-${CW}.${FS}.${VMFORMAT}.xz
+		${CI_DIR}/Latest/${OSRELEASE}-${CW}-${FS}.${VMFORMAT}.xz
 .    endfor
 .   endfor
 .  endif
diff --git a/release/Makefile.vm b/release/Makefile.vm
index 5ae603b05983..5aa506ff6787 100644
--- a/release/Makefile.vm
+++ b/release/Makefile.vm
@@ -239,8 +239,8 @@ cloud-install-BASIC-CLOUDINIT:
 .for _FS in ${BASIC-CLOUDINIT_FSLIST}
 . for _FMT in ${BASIC-CLOUDINIT_FORMAT}
 	cp -p ${.OBJDIR}/${BASIC-CLOUDINIT${_FS:tu}${_FMT:tu}IMAGE} \
-		${DESTDIR}/vmimages/${OSRELEASE}-BASIC-CLOUDINIT.${_FS}.${_FMT}
-	${XZ_CMD} ${DESTDIR}/vmimages/${OSRELEASE}-BASIC-CLOUDINIT.${_FS}.${_FMT}
+		${DESTDIR}/vmimages/${OSRELEASE}-BASIC-CLOUDINIT-${_FS}.${_FMT}
+	${XZ_CMD} ${DESTDIR}/vmimages/${OSRELEASE}-BASIC-CLOUDINIT-${_FS}.${_FMT}
 . endfor
 .endfor
 	cd ${DESTDIR}/vmimages && sha512 ${OSRELEASE}* > \