Thanks to sysinstall for its 15 years of service. And now to sleep,

perchance to dream...
This commit is contained in:
Nathan Whitehorn 2011-03-14 13:47:17 +00:00
parent 432edffe38
commit 12ad0bb143
5 changed files with 1577 additions and 1578 deletions

View File

@ -19,6 +19,5 @@ as a question to the questions@FreeBSD.org mailing list. If you are
unfamiliar with FreeBSD's directory layout, please refer to the hier(7) unfamiliar with FreeBSD's directory layout, please refer to the hier(7)
manual page. If you are not familiar with manual pages, type `man man'. manual page. If you are not familiar with manual pages, type `man man'.
You may also use sysinstall(8) to re-enter the installation and Edit /etc/motd to change this login announcement.
configuration utility. Edit /etc/motd to change this login announcement.

File diff suppressed because it is too large Load Diff

View File

@ -1,157 +0,0 @@
# $FreeBSD$
#
# Makefile for building releases and release media.
#
# User-driven targets:
# cdrom: Builds release CD-ROM media (release.iso)
# ftp: Sets up FTP distribution area (ftp)
# release: Build all media and FTP distribution area
#
# Variables affecting the build process:
# WORLDDIR: location of src tree -- must have built world and default kernel
# (by default, the directory above this one)
# PORTSDIR: location of ports tree to distribute (default: /usr/ports)
# DOCDIR: location of doc tree (default: /usr/doc)
# NOPORTS: if set, do not distribute ports tree
# NOSRC: if set, do not distribute source tree
# NODOC: if set, do not generate release documentation
# TARGET/TARGET_ARCH: architecture of built release
#
WORLDDIR?= ${.CURDIR}/..
PORTSDIR?= /usr/ports
DOCDIR?= /usr/doc
RELNOTES_LANG?= en_US.ISO8859-1
TARGET_ARCH?= ${MACHINE_ARCH}
.if ${TARGET_ARCH} == ${MACHINE_ARCH}
TARGET?= ${MACHINE}
.else
TARGET?= ${TARGET_ARCH}
.endif
IMAKE= ${MAKE} TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}
DISTDIR= ${.OBJDIR}/dist
.if !exists(${DOCDIR})
NODOC= true
.endif
.if !exists(${PORTSDIR})
NOPORTS= true
.endif
EXTRA_PACKAGES=
.if !defined(NOPORTS)
EXTRA_PACKAGES+= ports.txz
.endif
.if !defined(NOSRC)
EXTRA_PACKAGES+= src.txz
.endif
.if !defined(NODOC)
EXTRA_PACKAGES+= reldoc
.endif
RELEASE_TARGETS= ftp
.if exists(${.CURDIR}/${TARGET}/mkisoimages.sh)
RELEASE_TARGETS+= cdrom
.endif
.if exists(${.CURDIR}/${TARGET}/make-memstick.sh)
RELEASE_TARGETS+= memstick
.endif
.include <bsd.obj.mk>
base.txz:
-mkdir ${DISTDIR}
cd ${WORLDDIR} && ${IMAKE} distributeworld DISTDIR=${DISTDIR}
# Set up mergemaster root database
sh ${.CURDIR}/scripts/mm-mtree.sh -F \
"TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" -D "${DISTDIR}/base"
# Merge handbook, etc. from doc tree into src tree doc distribution
.if !defined(NODOC)
cd ${DOCDIR} && ${IMAKE} all install \
DOCDIR=${DISTDIR}/doc/usr/share/doc 'FORMATS=html html-split txt' \
INSTALL_COMPRESSED='' URLS_ABSOLUTE=YES
.endif
cd ${WORLDDIR} && ${IMAKE} packageworld DISTDIR=${DISTDIR}
mv ${DISTDIR}/*.txz ${.OBJDIR}
kernel.txz:
-mkdir ${DISTDIR}
cd ${WORLDDIR} && ${IMAKE} distributekernel packagekernel DISTDIR=${DISTDIR}
mv ${DISTDIR}/kernel.txz ${.OBJDIR}
src.txz:
-mkdir -p ${DISTDIR}/usr
ln -fs ${WORLDDIR} ${DISTDIR}/usr/src
cd ${DISTDIR} && tar cLvJf ${.OBJDIR}/src.txz --exclude .svn \
--exclude CVS usr/src
ports.txz:
-mkdir -p ${DISTDIR}/usr
ln -fs ${PORTSDIR} ${DISTDIR}/usr/ports
cd ${DISTDIR} && tar cLvJf ${.OBJDIR}/ports.txz \
--exclude usr/ports/distfiles --exclude usr/ports/packages \
--exclude 'usr/ports/INDEX*' --exclude work usr/ports
reldoc:
cd ${.CURDIR}/doc && ${MAKE} all install clean 'FORMATS=html txt' \
INSTALL_COMPRESSED='' URLS_ABSOLUTE=YES DOCDIR=${.OBJDIR}/rdoc
-mkdir ${.OBJDIR}/reldoc
.for i in hardware readme relnotes errata
ln -f ${.OBJDIR}/rdoc/${RELNOTES_LANG}/${i}/article.txt \
${.OBJDIR}/reldoc/${i:U}.TXT
ln -f ${.OBJDIR}/rdoc/${RELNOTES_LANG}/${i}/article.html \
${.OBJDIR}/reldoc/${i:U}.HTM
.endfor
cp ${.OBJDIR}/rdoc/${RELNOTES_LANG}/readme/docbook.css ${.OBJDIR}/reldoc
system: packagesystem
# Install system
-mkdir ${.OBJDIR}/release
cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution DESTDIR=${.OBJDIR}/release
-rm ${.OBJDIR}/release/boot/kernel/*.symbols
# Copy distfiles
mkdir ${.OBJDIR}/release/usr/freebsd-dist
cp ${.OBJDIR}/*.txz ${.OBJDIR}/MANIFEST \
${.OBJDIR}/release/usr/freebsd-dist
# Copy documentation, if generated
.if !defined(NODOC)
cp ${.OBJDIR}/reldoc/* ${.OBJDIR}/release
.endif
# Set up installation environment
ln -s /tmp/bsdinstall_etc/resolv.conf ${.OBJDIR}/release/etc/resolv.conf
echo sendmail_enable=\"NONE\" > ${.OBJDIR}/release/etc/rc.conf
echo hostid_enable=\"NO\" >> ${.OBJDIR}/release/etc/rc.conf
touch ${.OBJDIR}/release/etc/fstab
cp ${.CURDIR}/rc.local ${.OBJDIR}/release/etc
touch ${.OBJDIR}/${.TARGET}
release.iso: system
echo kernel_options=\"-C\" > ${.OBJDIR}/release/boot/loader.conf
sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b FreeBSD_Install ${.OBJDIR}/release.iso ${.OBJDIR}/release
rm ${.OBJDIR}/release/boot/loader.conf
memstick: system
sh ${.CURDIR}/${TARGET}/make-memstick.sh ${.OBJDIR}/release ${.OBJDIR}/memstick
packagesystem: base.txz kernel.txz ${EXTRA_PACKAGES}
sh ${.CURDIR}/scripts/make-manifest.sh ${.OBJDIR}/*.txz > ${.OBJDIR}/MANIFEST
touch ${.OBJDIR}/${.TARGET}
cdrom: release.iso
ftp: packagesystem
rm -rf ${.OBJDIR}/ftp
mkdir ${.OBJDIR}/ftp
cp ${.OBJDIR}/*.txz ${.OBJDIR}/MANIFEST ${.OBJDIR}/ftp
release: ${RELEASE_TARGETS}
clean:
chflags -R noschg ${.OBJDIR}
rm -rf ${.OBJDIR}/dist ${.OBJDIR}/ftp
rm -f packagesystem
rm -f ${.OBJDIR}/*.txz ${.OBJDIR}/MANIFEST
rm -f system
rm -rf ${.OBJDIR}/release
rm -f ${.OBJDIR}/release.iso ${.OBJDIR}/memstick

1442
release/Makefile.sysinstall Normal file

File diff suppressed because it is too large Load Diff

View File

@ -50,7 +50,7 @@ if [ ! -z $CVSUP_HOST ]; then
fi fi
chroot $2 /bin/sh -c "cd /usr/src && make $MAKE_FLAGS buildworld buildkernel" || exit 1 chroot $2 /bin/sh -c "cd /usr/src && make $MAKE_FLAGS buildworld buildkernel" || exit 1
chroot $2 /bin/sh -c "cd /usr/src/release && make -f Makefile.bsdinstall obj release $RELEASE_FLAGS" || exit 1 chroot $2 /bin/sh -c "cd /usr/src/release && make obj release $RELEASE_FLAGS" || exit 1
mkdir $2/R mkdir $2/R
cp -pRP $2/usr/obj/usr/src/release/release.iso $2/usr/obj/usr/src/release/memstick $2/usr/obj/usr/src/release/ftp $2/R cp -pRP $2/usr/obj/usr/src/release/release.iso $2/usr/obj/usr/src/release/memstick $2/usr/obj/usr/src/release/ftp $2/R