git: 3f494a4e5ce0 - main - release: Add NODISTSETS to skip legacy dist sets
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 23 Jun 2025 14:45:15 UTC
The branch main has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=3f494a4e5ce005c04bd96ef75e52cca0fbaaa05f
commit 3f494a4e5ce005c04bd96ef75e52cca0fbaaa05f
Author: Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2025-06-18 18:46:10 +0000
Commit: Ed Maste <emaste@FreeBSD.org>
CommitDate: 2025-06-23 14:44:14 +0000
release: Add NODISTSETS to skip legacy dist sets
`make -DPKGBASE -DNODISTSETS` can now be used to build an installer
without any support for dist sets.
Reviewed by: Isaac Freund <ifreund@freebsdfoundation.org>
Event: Kitchener-Waterloo Hackathon 202506
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50919
---
release/Makefile | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/release/Makefile b/release/Makefile
index 4de2fe5264a6..5875a22a5bfd 100644
--- a/release/Makefile
+++ b/release/Makefile
@@ -21,6 +21,7 @@
# Variables affecting the build process:
# WORLDDIR: location of src tree -- must have built world and default kernel
# (by default, the directory above this one)
+# NODISTSETS: if set, do not include dist sets or MANIFEST
# PKGBASE: if set, include pkgbase packages rather than dist tarballs in
# disc1 and dvd1 installation media
# PORTSDIR: location of ports tree to distribute (default: /usr/ports)
@@ -179,6 +180,12 @@ packagesystem: ${DISTRIBUTIONS}
sh ${.CURDIR}/scripts/make-manifest.sh $$(ls *.txz | grep -v container) > MANIFEST
touch ${.TARGET}
+.if !defined(NODISTSETS)
+disc1: packagesystem
+bootonly: packagesystem
+dvd1: packagesystem
+.endif
+
.if defined(PKGBASE)
PKGBASE_REPO= pkgbase-repo
PKG_ABI= $$(${PKG_CMD} -o ABI_FILE=${.TARGET}/usr/bin/uname config ABI)
@@ -188,7 +195,7 @@ pkgbase-repo:
mkdir -p pkgbase-repo
( ${IMAKE} -C ${WORLDDIR} packages REPODIR=${.OBJDIR}/pkgbase-repo )
-disc1: packagesystem ${PKGBASE_REPO}
+disc1: ${PKGBASE_REPO}
# Install system
mkdir -p ${.TARGET}
( cd ${WORLDDIR} && ${IMAKE} installworld installkernel distribution \
@@ -211,6 +218,7 @@ disc1: packagesystem ${PKGBASE_REPO}
mtree -C -k type,mode,link,size | \
sed 's|^\.|./usr/freebsd-packages|g' >> ${.TARGET}/METALOG
.endif
+.if !defined(NODISTSETS)
# Copy MANIFEST to provide legacy dist checksums in both modes
mkdir -p ${.TARGET}/usr/freebsd-dist
echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG
@@ -223,6 +231,7 @@ disc1: packagesystem ${PKGBASE_REPO}
echo "./usr/freebsd-dist/$${dist} type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG; \
done
.endif
+.endif
.if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG))
# Install packages onto release media.
${PKG_INSTALL} pkg || true
@@ -245,7 +254,7 @@ disc1: packagesystem ${PKGBASE_REPO}
echo "./etc/rc.local type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
touch ${.TARGET}
-bootonly: packagesystem
+bootonly:
# Install system
mkdir -p ${.TARGET}
( cd ${WORLDDIR} && ${IMAKE} installworld installkernel distribution \
@@ -256,11 +265,13 @@ bootonly: packagesystem
MK_TOOLCHAIN=no \
MK_RESCUE=no MK_DICT=no \
MK_KERNEL_SYMBOLS=no MK_TESTS=no MK_DEBUG_FILES=no)
+.if !defined(NODISTSETS)
# Copy manifest only (no distfiles) to get checksums
mkdir -p ${.TARGET}/usr/freebsd-dist
cp MANIFEST ${.TARGET}/usr/freebsd-dist
echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG
echo "./usr/freebsd-dist/MANIFEST type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
+.endif
.if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG))
# Install packages onto release media.
${PKG_INSTALL} pkg || true
@@ -281,7 +292,7 @@ bootonly: packagesystem
echo "./boot/loader.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
echo "./etc/rc.local type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
-dvd: packagesystem ${PKGBASE_REPO}
+dvd: ${PKGBASE_REPO}
# Install system
mkdir -p ${.TARGET}
( cd ${WORLDDIR} && ${IMAKE} installworld installkernel distribution \
@@ -300,6 +311,7 @@ dvd: packagesystem ${PKGBASE_REPO}
mtree -C -k type,mode,link,size | \
sed 's|^\.|./usr/freebsd-packages|g' >> ${.TARGET}/METALOG
.endif
+.if !defined(NODISTSETS)
# Copy MANIFEST to provide legacy dist checksums in both modes
mkdir -p ${.TARGET}/usr/freebsd-dist
echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG
@@ -313,6 +325,7 @@ dvd: packagesystem ${PKGBASE_REPO}
echo "./usr/freebsd-dist/$${dist} type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG; \
done
.endif
+.endif
.if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG))
# Install packages onto release media.
${PKG_INSTALL} pkg || true