git: cbba69fb5793 - main - release: Use unprivileged mode for bootonly and mini-memstick
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 07 Mar 2025 11:46:12 UTC
The branch main has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=cbba69fb5793c238cfd31697667bdff6ce1920b6
commit cbba69fb5793c238cfd31697667bdff6ce1920b6
Author: Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2025-03-07 11:46:01 +0000
Commit: Ed Maste <emaste@FreeBSD.org>
CommitDate: 2025-03-07 11:46:01 +0000
release: Use unprivileged mode for bootonly and mini-memstick
This in effect always builds these targets in NO_ROOT mode, removing
one more instance where release artifact builds require a privileged
user (root). These artifacts are now always built the same way.
Reviewed by: brooks, Pat Maddox <pat@patmaddox.com>
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48121
---
release/Makefile | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/release/Makefile b/release/Makefile
index 44cd6e4bb8d5..44344c9ff20a 100644
--- a/release/Makefile
+++ b/release/Makefile
@@ -225,14 +225,12 @@ bootonly: packagesystem
MK_TOOLCHAIN=no \
MK_RESCUE=no MK_DICT=no \
MK_KERNEL_SYMBOLS=no MK_TESTS=no MK_DEBUG_FILES=no \
- -DDB_FROM_SRC )
+ -DDB_FROM_SRC -DNO_ROOT)
# Copy manifest only (no distfiles) to get checksums
mkdir -p ${.TARGET}/usr/freebsd-dist
cp MANIFEST ${.TARGET}/usr/freebsd-dist
-.if defined(NO_ROOT)
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
# Set up installation environment
ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf
echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf
@@ -242,13 +240,11 @@ bootonly: packagesystem
echo kernels_autodetect=\"NO\" >> ${.TARGET}/boot/loader.conf
echo loader_menu_multi_user_prompt=\"Installer\" >> ${.TARGET}/boot/loader.conf
cp ${.CURDIR}/rc.local ${.TARGET}/etc
-.if defined(NO_ROOT)
echo "./etc/resolv.conf type=link uname=root gname=wheel mode=0644 link=/tmp/bsdinstall_etc/resolv.conf" >> ${.TARGET}/METALOG
echo "./etc/rc.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
echo "./etc/sysctl.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
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
-.endif
dvd: packagesystem
# Install system
@@ -307,7 +303,7 @@ dvd1.iso: dvd pkg-stage
cd dvd && sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_DVD ../${.TARGET} .${NO_ROOT:D/METALOG} ${XTRADIR}
bootonly.iso: bootonly-bootonly
- cd bootonly-bootonly && sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_BO ../${.TARGET} .${NO_ROOT:D/METALOG} ${XTRADIR}
+ cd bootonly-bootonly && sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_BO ../${.TARGET} ./METALOG ${XTRADIR}
memstick: memstick.img
memstick.img: disc1-memstick
@@ -315,7 +311,7 @@ memstick.img: disc1-memstick
mini-memstick: mini-memstick.img
mini-memstick.img: bootonly-memstick
- cd bootonly-memstick && sh ${.CURDIR}/${TARGET}/make-memstick.sh .${NO_ROOT:D/METALOG} ../${.TARGET}
+ cd bootonly-memstick && sh ${.CURDIR}/${TARGET}/make-memstick.sh ./METALOG ../${.TARGET}
packagesystem: ${DISTRIBUTIONS}
sh ${.CURDIR}/scripts/make-manifest.sh $$(ls *.txz | grep -v container) > MANIFEST