Index: Makefile =================================================================== --- Makefile (revision 219091) +++ Makefile (working copy) @@ -89,9 +89,11 @@ check-old check-old-dirs check-old-files check-old-libs \ checkdpadd clean cleandepend cleandir \ delete-old delete-old-dirs delete-old-files delete-old-libs \ - depend distribute distributeworld distrib-dirs distribution doxygen \ + depend distribute distributekernel distributekernel.debug \ + distributeworld distrib-dirs distribution doxygen \ everything hierarchy install installcheck installkernel \ - installkernel.debug reinstallkernel reinstallkernel.debug \ + installkernel.debug packagekernel packageworld \ + reinstallkernel reinstallkernel.debug \ installworld kernel-toolchain libraries lint maninstall \ obj objlink regress rerelease showconfig tags toolchain update \ _worldtmp _legacy _bootstrap-tools _cleanobj _obj \ Index: Makefile.inc1 =================================================================== --- Makefile.inc1 (revision 219091) +++ Makefile.inc1 (working copy) @@ -629,6 +629,13 @@ # # Installs everything compiled by a 'buildworld'. # + +# Non-base distributions produced by the base system +EXTRA_DISTRIBUTIONS= doc games +.if defined(LIB32TMP) && ${MK_LIB32} != "no" +EXTRA_DISTRIBUTIONS+= lib32 +.endif + distributeworld installworld: installcheck mkdir -p ${INSTALLTMP} progs=$$(for prog in ${ITOOLS}; do \ @@ -651,9 +658,34 @@ done); \ cp $$libs $$progs ${INSTALLTMP} cp -R $${PATH_LOCALE:-"/usr/share/locale"} ${INSTALLTMP}/locale +.if make(distributeworld) +.for dist in ${EXTRA_DISTRIBUTIONS} + -mkdir ${DESTDIR}/${DISTDIR}/${dist} + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.root.dist \ + -p ${DESTDIR}/${DISTDIR}/${dist} >/dev/null + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ + -p ${DESTDIR}/${DISTDIR}/${dist}/usr >/dev/null + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ + -p ${DESTDIR}/${DISTDIR}/${dist}/usr/include >/dev/null +.endfor + -mkdir ${DESTDIR}/${DISTDIR}/base + ${_+_}cd ${.CURDIR}; ${IMAKE} distrib-dirs \ + DESTDIR=${DESTDIR}/${DISTDIR}/base +.endif ${_+_}cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//}; \ ${IMAKEENV} rm -rf ${INSTALLTMP} +.if make(distributeworld) +.for dist in ${EXTRA_DISTRIBUTIONS} + find ${DESTDIR}/${DISTDIR}/${dist} -empty -delete +.endfor +.endif +packageworld: +.for dist in base ${EXTRA_DISTRIBUTIONS} + ${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \ + tar cvJf ${DESTDIR}/${DISTDIR}/${dist}.txz . +.endfor + # # reinstall # @@ -838,6 +870,20 @@ ${CROSSENV} PATH=${TMPPATH} \ ${MAKE} KERNEL=${INSTKERNNAME} ${.TARGET:S/kernel//} +distributekernel distributekernel.debug: +.if empty(INSTALLKERNEL) + @echo "ERROR: No kernel \"${KERNCONF}\" to install."; \ + false +.endif + cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \ + ${CROSSENV} PATH=${TMPPATH} ${MAKE} KERNEL=${INSTKERNNAME} \ + DESTDIR=${DESTDIR}/${DISTDIR}/kernel \ + ${.TARGET:S/distributekernel/install/} + +packagekernel: + ${_+_}cd ${DESTDIR}/${DISTDIR}/kernel; \ + tar cvJf ${DESTDIR}/${DISTDIR}/kernel.txz . + # # doxygen # Index: release/Makefile =================================================================== --- release/Makefile (revision 219091) +++ release/Makefile (working copy) @@ -194,8 +194,8 @@ # Things which without too much trouble can be considered variables # BASE_DISTS are special in that they get full /etc installation sets. # -OTHER_DISTS?= catpages manpages games proflibs dict info doc ${ARCH_DISTS} -BASE_DISTS?= base +OTHER_DISTS?= catpages manpages proflibs dict info +BASE_DISTS?= base doc games ${ARCH_DISTS} .if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" ARCH_DISTS?= lib32 .endif @@ -647,9 +647,7 @@ mtree -deU -f ${MTREEFILES}/BSD.usr.dist \ -p ${RD}/trees/$$i/usr > /dev/null && \ mtree -deU -f ${MTREEFILES}/BSD.include.dist \ - -p ${RD}/trees/$$i/usr/include > /dev/null && \ - mtree -deU -f ${MTREEFILES}/BSD.var.dist \ - -p ${RD}/trees/$$i/var > /dev/null ; \ + -p ${RD}/trees/$$i/usr/include > /dev/null; \ done mkdir ${RD}/kernels for i in ${KERNELS_BASE} ${KERNELS}; do \ Index: release/Makefile.bsdinstall =================================================================== --- release/Makefile.bsdinstall (revision 0) +++ release/Makefile.bsdinstall (revision 0) @@ -0,0 +1,49 @@ +# $FreeBSD: head/release/Makefile 210097 2010-07-15 01:48:30Z nwhitehorn $ + +WORLDDIR?= ${.CURDIR}/.. +DISTDIR?= ${DESTDIR}/usr/freebsd-dist +PORTSDIR?= /usr/ports + +TARGET_ARCH?= ${MACHINE_ARCH} +.if ${TARGET_ARCH} == ${MACHINE_ARCH} +TARGET?= ${MACHINE} +.else +TARGET?= ${TARGET_ARCH} +.endif +IMAKE= ${MAKE} TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET} + +packagesystem: + -mkdir -p ${DISTDIR} + cd ${WORLDDIR} && ${IMAKE} distributeworld distributekernel packageworld packagekernel DISTDIR=${DISTDIR} + -mkdir -p ${DISTDIR}/usr + ln -fs ${WORLDDIR} ${DISTDIR}/usr/src + ln -fs ${PORTSDIR} ${DISTDIR}/usr/ports +.if !defined(NOPORTS) + cd ${DISTDIR} && tar cLvJf ${DISTDIR}/ports.txz --exclude usr/ports/distfiles --exclude usr/ports/packages --exclude 'usr/ports/INDEX*' usr/ports +.endif +.if !defined(NOSRC) + cd ${DISTDIR} && tar cLvJf ${DISTDIR}/src.txz --exclude .svn --exclude CVS usr/src +.endif + +system: +# Install system + -mkdir ${DISTDIR}/release + cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution DESTDIR=${DISTDIR}/release + -rm ${DISTDIR}/release/boot/kernel/*.symbols +# Copy distfiles + mkdir ${DISTDIR}/release/usr/freebsd-dist + cp ${DISTDIR}/*.txz ${DISTDIR}/release/usr/freebsd-dist +# Set up installation environment + ln -s /tmp/bsdinstall_etc/resolv.conf ${DISTDIR}/release/etc/resolv.conf + echo sendmail_enable=\"NONE\" > ${DISTDIR}/release/etc/rc.conf + echo hostid_enable=\"NO\" >> ${DISTDIR}/release/etc/rc.conf + touch ${DISTDIR}/release/etc/fstab + cp rc.local ${DISTDIR}/release/etc + +cdrom: + echo kernel_options=\"-C\" > ${DISTDIR}/release/boot/loader.conf + sh /usr/src/release/${TARGET}/mkisoimages.sh -b FreeBSD_Install ${DISTDIR}/release.iso ${DISTDIR}/release + rm ${DISTDIR}/release/boot/loader.conf + +release: packagesystem system cdrom + Index: release/rc.local =================================================================== --- release/rc.local (revision 0) +++ release/rc.local (revision 0) @@ -0,0 +1,32 @@ +#!/bin/sh + +: ${DIALOG_OK=0} +: ${DIALOG_CANCEL=1} +: ${DIALOG_HELP=2} +: ${DIALOG_EXTRA=3} +: ${DIALOG_ITEM_HELP=4} +: ${DIALOG_ESC=255} + +TERM=xterm; export TERM # XXX: serial consoles + +dialog --backtitle "FreeBSD Installer" --title "Welcome" --extra-button --extra-label "Shell" --ok-label "Install" --cancel-label "Live CD" --yesno "Welcome to FreeBSD! Would you like to begin an installation or use the live CD?" 0 0 + +case $? in +$DIALOG_OK) # Install + BSDINSTALL_CONFIGCURRENT=yes; export BSDINSTALL_CONFIGCURRENT + trap true SIGINT # Ignore cntrl-C here + bsdinstall + dialog --backtitle "FreeBSD Installer" --title "Complete" --msgbox "Installation of FreeBSD complete! The system will now reboot." 0 0 + reboot + ;; +$DIALOG_CANCEL) # Live CD + exit 0 + ;; +$DIALOG_EXTRA) # Shell + clear + echo "When finished, type 'exit' to return to the installer." + /bin/sh + . /etc/rc.local + ;; +esac + Property changes on: release/rc.local ___________________________________________________________________ Added: svn:executable + * Index: release/scripts/games-make.sh =================================================================== --- release/scripts/games-make.sh (revision 219091) +++ release/scripts/games-make.sh (working copy) @@ -1,37 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -# Move all the games out to their own dist -if [ -d ${RD}/trees/base/usr/games ]; then - tar -cf - -C ${RD}/trees/base/usr/games . | - tar -xpf - -C ${RD}/trees/games/usr/games && - rm -rf ${RD}/trees/base/usr/games; -fi - -if [ -d ${RD}/trees/base/usr/share/games ]; then - tar -cf - -C ${RD}/trees/base/usr/share/games . | - tar -xpf - -C ${RD}/trees/games/usr/share/games && - rm -rf ${RD}/trees/base/usr/share/games; -fi - -if [ -d ${RD}/trees/base/var/games ]; then - tar -cf - -C ${RD}/trees/base/var/games . | - tar -xpf - -C ${RD}/trees/games/var/games && - rm -rf ${RD}/trees/base/var/games; -fi - -if [ -d ${RD}/trees/manpages/usr/share/man/man6 ]; then - mkdir -p ${RD}/trees/games/usr/share/man/man6 - tar -cf - -C ${RD}/trees/manpages/usr/share/man/man6 . | - tar -xpf - -C ${RD}/trees/games/usr/share/man/man6 && - rm -rf ${RD}/trees/manpages/usr/share/man/man6 -fi - -if [ -d ${RD}/trees/catpages/usr/share/man/cat6 ]; then - mkdir -p ${RD}/trees/games/usr/share/man/cat6 - tar -cf - -C ${RD}/trees/catpages/usr/share/man/cat6 . | - tar -xpf - -C ${RD}/trees/games/usr/share/man/cat6 && - rm -rf ${RD}/trees/catpages/usr/share/man/cat6 -fi Index: release/scripts/lib32-make.sh =================================================================== --- release/scripts/lib32-make.sh (revision 219091) +++ release/scripts/lib32-make.sh (working copy) @@ -1,8 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -# Clean the dust. -cd ${RD}/trees/lib32 && \ - find . '(' -path '*/usr/share/*' -or -path '*/usr/lib/*' ')' -delete