Changeset View
Changeset View
Standalone View
Standalone View
release/Makefile
Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | ||||||||||||||||||
VOLUME_LABEL= ${REVISION:C/[.-]/_/g}_${BRANCH:C/[.-]/_/g}_${TARGET} | VOLUME_LABEL= ${REVISION:C/[.-]/_/g}_${BRANCH:C/[.-]/_/g}_${TARGET} | |||||||||||||||||
.else | .else | |||||||||||||||||
OSRELEASE= ${TYPE}-${REVISION}-${BRANCH}-${TARGET}-${TARGET_ARCH} | OSRELEASE= ${TYPE}-${REVISION}-${BRANCH}-${TARGET}-${TARGET_ARCH} | |||||||||||||||||
VOLUME_LABEL= ${REVISION:C/[.-]/_/g}_${BRANCH:C/[.-]/_/g}_${TARGET_ARCH} | VOLUME_LABEL= ${REVISION:C/[.-]/_/g}_${BRANCH:C/[.-]/_/g}_${TARGET_ARCH} | |||||||||||||||||
.endif | .endif | |||||||||||||||||
.endfor | .endfor | |||||||||||||||||
.endif | .endif | |||||||||||||||||
.if ${.MAKE.OS} == "FreeBSD" | ||||||||||||||||||
# For installing packages into the release media. | ||||||||||||||||||
.if defined(NO_ROOT) | ||||||||||||||||||
PKG_ENV+= INSTALL_AS_USER=yes | ||||||||||||||||||
PKG_ARGS+= -o METALOG=METALOG | ||||||||||||||||||
bz: Remove -c I have no idea where that crept in. I am doing a NO_ROOT build test currently. | ||||||||||||||||||
.endif | ||||||||||||||||||
PKG_ENV+= ASSUME_ALWAYS_YES=yes | ||||||||||||||||||
PKG_ARGS+= -r ${.TARGET} -o REPOS_DIR=${.CURDIR}/pkg_repos | ||||||||||||||||||
PKG_INSTALL= env ${PKG_ENV} ${PKG_CMD} ${PKG_ARGS} install | ||||||||||||||||||
Done Inline Actions
Something like this to avoid duplication, and mirroring the style the top-level Makefile.inc1 often uses? I'd also suggest using ${PKG_CMD} to find the pkg binary like Makefile.inc1 (default set by bsd.own.mk) and choosing a name for PKGCMD that doesn't sound so close to it. Maybe just PKG. Or put an R in front of all these things (for Release) like how we do [BWK]MAKE(|ENV|FLAGS) etc in Makefile.inc1 jrtc27: Something like this to avoid duplication, and mirroring the style the top-level Makefile.inc1… | ||||||||||||||||||
.endif | ||||||||||||||||||
.if !defined(VOLUME_LABEL) || empty(VOLUME_LABEL) | .if !defined(VOLUME_LABEL) || empty(VOLUME_LABEL) | |||||||||||||||||
VOLUME_LABEL= FreeBSD_Install | VOLUME_LABEL= FreeBSD_Install | |||||||||||||||||
.endif | .endif | |||||||||||||||||
.if !exists(${PORTSDIR}) | .if !exists(${PORTSDIR}) | |||||||||||||||||
NOPORTS= true | NOPORTS= true | |||||||||||||||||
.endif | .endif | |||||||||||||||||
▲ Show 20 Lines • Show All 94 Lines • ▼ Show 20 Lines | for dist in MANIFEST $$(ls *.txz | grep -v container | grep -vE -- '(${base ${_ALL_libcompats}:L:ts|})-dbg'); \ | |||||||||||||||||
do cp $${dist} ${.TARGET}/usr/freebsd-dist; \ | do cp $${dist} ${.TARGET}/usr/freebsd-dist; \ | |||||||||||||||||
done | done | |||||||||||||||||
.if defined(NO_ROOT) | .if defined(NO_ROOT) | |||||||||||||||||
echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG | echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG | |||||||||||||||||
for dist in MANIFEST $$(ls *.txz | grep -v container | grep -vE -- '(${base ${_ALL_libcompats}:L:ts|})-dbg'); \ | for dist in MANIFEST $$(ls *.txz | grep -v container | grep -vE -- '(${base ${_ALL_libcompats}:L:ts|})-dbg'); \ | |||||||||||||||||
do echo "./usr/freebsd-dist/$${dist} type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG; \ | do echo "./usr/freebsd-dist/$${dist} type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG; \ | |||||||||||||||||
done | done | |||||||||||||||||
.endif | .endif | |||||||||||||||||
.if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG)) | ||||||||||||||||||
# Install packages onto release media. | ||||||||||||||||||
${PKG_INSTALL} wifi-firmware-kmod-release | ||||||||||||||||||
.endif | ||||||||||||||||||
# Set up installation environment | # Set up installation environment | |||||||||||||||||
ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf | ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf | |||||||||||||||||
echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf | echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf | |||||||||||||||||
echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf | echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf | |||||||||||||||||
echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf | echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf | |||||||||||||||||
echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf | echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf | |||||||||||||||||
echo kernels_autodetect=\"NO\" >> ${.TARGET}/boot/loader.conf | echo kernels_autodetect=\"NO\" >> ${.TARGET}/boot/loader.conf | |||||||||||||||||
echo loader_menu_multi_user_prompt=\"Installer\" >> ${.TARGET}/boot/loader.conf | echo loader_menu_multi_user_prompt=\"Installer\" >> ${.TARGET}/boot/loader.conf | |||||||||||||||||
▲ Show 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | # Copy distfiles | |||||||||||||||||
for dist in MANIFEST $$(ls *.txz | grep -v container); \ | for dist in MANIFEST $$(ls *.txz | grep -v container); \ | |||||||||||||||||
do cp $${dist} ${.TARGET}/usr/freebsd-dist; \ | do cp $${dist} ${.TARGET}/usr/freebsd-dist; \ | |||||||||||||||||
done | done | |||||||||||||||||
.if defined(NO_ROOT) | .if defined(NO_ROOT) | |||||||||||||||||
echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG | echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG | |||||||||||||||||
for dist in MANIFEST $$(ls *.txz | grep -v container); \ | for dist in MANIFEST $$(ls *.txz | grep -v container); \ | |||||||||||||||||
do echo "./usr/freebsd-dist/$${dist} type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG; \ | do echo "./usr/freebsd-dist/$${dist} type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG; \ | |||||||||||||||||
done | done | |||||||||||||||||
.endif | ||||||||||||||||||
.if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG)) | ||||||||||||||||||
# Install packages onto release media. | ||||||||||||||||||
${PKG_INSTALL} wifi-firmware-kmod-release | ||||||||||||||||||
.endif | .endif | |||||||||||||||||
# Set up installation environment | # Set up installation environment | |||||||||||||||||
ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf | ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf | |||||||||||||||||
echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf | echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf | |||||||||||||||||
echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf | echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf | |||||||||||||||||
echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf | echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf | |||||||||||||||||
echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf | echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf | |||||||||||||||||
echo kernels_autodetect=\"NO\" >> ${.TARGET}/boot/loader.conf | echo kernels_autodetect=\"NO\" >> ${.TARGET}/boot/loader.conf | |||||||||||||||||
Show All 39 Lines | packagesystem: ${DISTRIBUTIONS} | |||||||||||||||||
touch ${.TARGET} | touch ${.TARGET} | |||||||||||||||||
pkg-stage: dvd | pkg-stage: dvd | |||||||||||||||||
# TODO: Support for -DNO_ROOT | # TODO: Support for -DNO_ROOT | |||||||||||||||||
.if !defined(NOPKG) || empty(NOPKG) | .if !defined(NOPKG) || empty(NOPKG) | |||||||||||||||||
env PORTSDIR=${PORTSDIR} REPOS_DIR=${.CURDIR}/pkg_repos/ \ | env PORTSDIR=${PORTSDIR} REPOS_DIR=${.CURDIR}/pkg_repos/ \ | |||||||||||||||||
sh ${.CURDIR}/scripts/pkg-stage.sh | sh ${.CURDIR}/scripts/pkg-stage.sh | |||||||||||||||||
mkdir -p ${.OBJDIR}/dvd/packages/repos/ | mkdir -p ${.OBJDIR}/dvd/packages/repos/ | |||||||||||||||||
cp ${.CURDIR}/scripts/FreeBSD_install_cdrom.conf \ | cp ${.CURDIR}/scripts/FreeBSD_install_cdrom.conf \ | |||||||||||||||||
Done Inline ActionsThis doesn't belong, and were we to do anything it should be error rather than echo, but still not in *this* commit. You only added this to the diff so you could test dvd builds, but it's not required for the rest of the diff otherwise. jrtc27: This doesn't belong, and were we to do anything it should be error rather than echo, but still… | ||||||||||||||||||
${.OBJDIR}/dvd/packages/repos/ | ${.OBJDIR}/dvd/packages/repos/ | |||||||||||||||||
.endif | .endif | |||||||||||||||||
touch ${.TARGET} | touch ${.TARGET} | |||||||||||||||||
cdrom: disc1.iso bootonly.iso | cdrom: disc1.iso bootonly.iso | |||||||||||||||||
dvdrom: dvd1.iso | dvdrom: dvd1.iso | |||||||||||||||||
ftp: packagesystem | ftp: packagesystem | |||||||||||||||||
rm -rf ftp | rm -rf ftp | |||||||||||||||||
Show All 36 Lines |
Remove -c I have no idea where that crept in. I am doing a NO_ROOT build test currently.