14731faa3SJordan K. Hubbard# $Id: Makefile,v 1.307 1997/06/23 01:49:35 jkh Exp $ 20202c140SRodney W. Grimes# 3aeb6d603SJordan K. Hubbard# make release CHROOTDIR=/some/dir BUILDNAME=somename [ RELEASETAG=tag ] 4bd668f6fSPoul-Henning Kamp# 5aeb6d603SJordan K. Hubbard# Where "/some/dir" is the pathname of a directory on a some 6aeb6d603SJordan K. Hubbard# filesystem with at least 600MB of free space, "somename" is what 7aeb6d603SJordan K. Hubbard# you want the release to call itself and, optionally, which CVS "tag" 8aeb6d603SJordan K. Hubbard# name should be used when checking out the sources to build the release 9aeb6d603SJordan K. Hubbard# (default is HEAD). 10bd668f6fSPoul-Henning Kamp# 11aeb6d603SJordan K. Hubbard# Please note: the vn driver must also be compiled into your kernel, 12f1a03fb6SAndreas Klemm# otherwise the target 'release.8' and possibly others will fail. 13f1a03fb6SAndreas Klemm# 14aeb6d603SJordan K. Hubbard# Set these, release builder! 15d013a27bSJoerg Wunsch# 16d013a27bSJoerg Wunsch# Fixed version: 17d013a27bSJoerg Wunsch#BUILDNAME=2.2-RELEASE 18d013a27bSJoerg Wunsch# 19d013a27bSJoerg Wunsch# Automatic SNAP versioning: 20d013a27bSJoerg WunschDATE != date +%y%m%d 21d013a27bSJoerg WunschBASE = 3.0 22d013a27bSJoerg WunschBUILDNAME=${BASE}-${DATE}-SNAP 23d013a27bSJoerg Wunsch# 24fe85fe95SJordan K. Hubbard#CHROOTDIR=/junk/release 25ab0e9cdcSPoul-Henning Kamp# If this is a RELEASE, then set 26fbc6f9e0SJoerg Wunsch#RELEASETAG=RELENG_2_2 27ab0e9cdcSPoul-Henning Kamp 28bd668f6fSPoul-Henning Kamp# Things which without too much trouble can be considered variables 297284556fSJordan K. Hubbard# BIN_DISTS are special in that they get full /etc installation sets. 307284556fSJordan K. Hubbard# 310a9e93bfSJordan K. HubbardCOMPAT_DISTS?= compat1x compat20 compat21 320a9e93bfSJordan K. HubbardOTHER_DISTS?= games manpages catpages proflibs dict info doc 330a9e93bfSJordan K. HubbardCRYPTO_DISTS?= krb des 347284556fSJordan K. HubbardBIN_DISTS?= bin 350a9e93bfSJordan K. HubbardDISTRIBUTIONS?= ${BIN_DISTS} ${OTHER_DISTS} ${COMPAT_DISTS} ${CRYPTO_DISTS} 3616c61233SJordan K. HubbardKERNELS?= GENERIC 37785bd4b4SPoul-Henning Kamp 3840b0c0d9SPeter Wemm# Extra source tarballs; each argument is a pair of source dir and 3940b0c0d9SPeter Wemm# distribution name. The dist name should not exceed 7 characters 4040b0c0d9SPeter Wemm# (another "s" for "source" will be prepended). 4140b0c0d9SPeter WemmEXTRA_SRC+= usr.sbin/sendmail/cf smailcf 4240b0c0d9SPeter Wemm 43aeb6d603SJordan K. HubbardBOOT1= etc/protocols etc/rc.conf 441cdab3d4SJordan K. Hubbard 457c474103SPoul-Henning Kamp# mountpoint for filesystems. 467c474103SPoul-Henning KampMNT= /mnt 47518a1d34SPoul-Henning Kamp 48518a1d34SPoul-Henning Kamp# other floppy parameters. 4932dc5e88SJordan K. HubbardFDSIZE= 1440 5032dc5e88SJordan K. HubbardFDLABEL= fd1440 510202c140SRodney W. Grimes 5200063f88SPoul-Henning KampZIPNSPLIT= gzip --no-name -9 -c | split -b 240640 - 5300063f88SPoul-Henning Kamp 54288fe4dbSPoul-Henning Kamp# Upper size for the mfs in the boot.flp kernel. 55ae33fac5SJordan K. Hubbard# These are adjusted down to the minimum needed by doFS.sh. 5632dc5e88SJordan K. HubbardBOOTMFSSIZE= 1440 57571240d7SJoerg WunschMFSINODE= 7000 58571240d7SJoerg WunschFIXITINODE= 2000 59b386088bSJordan K. HubbardBOOTINODE= 100000 60d5cf6f60SAndrey A. Chernov 617284556fSJordan K. Hubbard# Things which may get you into trouble if you change them 6248327bc9SPoul-Henning KampMTREEFILES= ${.CURDIR}/../etc/mtree 63fbc6f9e0SJoerg WunschRD= /R/stage 64fbc6f9e0SJoerg WunschFD= /R/ftp 65fbc6f9e0SJoerg WunschCD= /R/cdrom 661bac119bSJordan K. HubbardCD_DISC1= ${CD}/disc1 671bac119bSJordan K. HubbardCD_DISC2= ${CD}/disc2 6848327bc9SPoul-Henning Kamp 69571240d7SJoerg Wunsch# ${BOOTSTRAPDIR} is for those utilities that refer to the hosting 709c3b2346SDaniel O'Callaghan# environment, rather than the target environment. This is specifically 719c3b2346SDaniel O'Callaghan# intended for kernel-dependent utilities that are used during the build. 72571240d7SJoerg Wunsch# 73571240d7SJoerg Wunsch# ${BOOTSTRAPDIR} is actually being used by prepending it to the normal 74571240d7SJoerg Wunsch# ${PATH}. Thus, it's also available to outside utilities like doFS.sh. 75571240d7SJoerg WunschBOOTSTRAPDIR= /bootstrap 76571240d7SJoerg Wunsch# 77571240d7SJoerg Wunsch# The mount subsystem has been changed between 2.2 and 3.0 by the 78571240d7SJoerg Wunsch# Lite2 import. 79571240d7SJoerg WunschBOOTSTRAPUTILS= /sbin/mount /sbin/umount 80571240d7SJoerg Wunsch# 81571240d7SJoerg Wunsch# 3.0 cpio tries to reference lchown(2) which is not available in 2.2 82571240d7SJoerg WunschBOOTSTRAPUTILS+= /usr/bin/cpio 83571240d7SJoerg Wunsch 847284556fSJordan K. Hubbard.if !defined(CRUNCH_TARGETS) 857284556fSJordan K. HubbardCRUNCH_TARGETS= boot fixit 863525074dSPoul-Henning Kamp.endif 873525074dSPoul-Henning Kamp 88793e8c6fSJordan K. Hubbard.if !defined(NOPORTS) 89793e8c6fSJordan K. HubbardEXTRAS+= ports.1 90793e8c6fSJordan K. Hubbard.endif 914731faa3SJordan K. HubbardEXTRAS+= ftp.1 cdrom.1 92793e8c6fSJordan K. Hubbard 93793e8c6fSJordan K. Hubbard.if !defined(NODOC) 94793e8c6fSJordan K. HubbardDOCREL= doc.1 95793e8c6fSJordan K. Hubbard.endif 96793e8c6fSJordan K. Hubbard 9716c61233SJordan K. HubbardREDO?= sysinstall 9816c61233SJordan K. HubbardREDOSED= sed -e 's/dirs/release.1/' -e 's/trees/release.2/' \ 9916c61233SJordan K. Hubbard -e 's/kerns/release.3/' -e 's/sysinstall/release.4/' \ 10016c61233SJordan K. Hubbard -e 's/fixup/release.5/' -e 's/tarbin/release.6/' \ 10116c61233SJordan K. Hubbard -e 's/tarsrc/release.7/' -e 's/boot\.flp/release.8/' \ 10216c61233SJordan K. Hubbard -e 's/fixit\.flp/release.9/' -e 's/ftp/ftp.1/' \ 10316c61233SJordan K. Hubbard -e 's/cdrom/cdrom.1/' 10416c61233SJordan K. Hubbard 10516c61233SJordan K. HubbardREDOREDO!= echo ${REDO} | ${REDOSED} 10616c61233SJordan K. Hubbard 107288fe4dbSPoul-Henning Kamprerelease release: 10820e5d523SJordan K. Hubbard.if !defined(CHROOTDIR) || !defined(BUILDNAME) 10920e5d523SJordan K. Hubbard @echo "To make a release you must set CHROOTDIR and BUILDNAME" && false 1107eb11201SPoul-Henning Kamp.endif 111288fe4dbSPoul-Henning Kamp.if make(release) 112682078bdSRodney W. Grimes.if exists(${CHROOTDIR}) 113bd668f6fSPoul-Henning Kamp chflags -R noschg ${CHROOTDIR}/. 114b7738481SJoerg Wunsch -rm -rf ${CHROOTDIR} 115682078bdSRodney W. Grimes.endif 116b7738481SJoerg Wunsch -mkdir -p ${CHROOTDIR} 117288fe4dbSPoul-Henning Kamp cd ${.CURDIR}/../etc && ${MAKE} distrib-dirs DESTDIR=${CHROOTDIR} 118288fe4dbSPoul-Henning Kamp cd ${.CURDIR}/../etc && ${MAKE} distribution DESTDIR=${CHROOTDIR} 119849635f6SPoul-Henning Kamp cd ${.CURDIR}/.. && ${MAKE} install DESTDIR=${CHROOTDIR} NOMAN=1 120571240d7SJoerg Wunsch mkdir ${CHROOTDIR}/${BOOTSTRAPDIR} 121571240d7SJoerg Wunsch for i in ${BOOTSTRAPUTILS} ; do \ 122571240d7SJoerg Wunsch cp -p ${CHROOTDIR}$$i ${CHROOTDIR}/${BOOTSTRAPDIR} ; \ 123571240d7SJoerg Wunsch done 124bd668f6fSPoul-Henning Kamp.if !defined(RELEASETAG) 12562bb2153SPaul Traina cd ${CHROOTDIR}/usr && rm -rf src && \ 12662bb2153SPaul Traina cvs -d ${CVSROOT} co -P src 1273acfee7cSPaul Traina.if defined(INTCVSROOT) 1283acfee7cSPaul Traina cd ${CHROOTDIR}/usr && \ 1293acfee7cSPaul Traina cvs -d ${INTCVSROOT} co -P src/secure src/eBones 1303acfee7cSPaul Traina.endif 131bd668f6fSPoul-Henning Kamp.else 13262bb2153SPaul Traina cd ${CHROOTDIR}/usr && rm -rf src && \ 133ba99b43eSJoerg Wunsch cvs -d ${CVSROOT} co -P -r ${RELEASETAG} src 1343acfee7cSPaul Traina.if defined(INTCVSROOT) 1353acfee7cSPaul Traina cd ${CHROOTDIR}/usr && \ 1363acfee7cSPaul Traina cvs -d ${INTCVSROOT} co -P -r ${RELEASETAG} src/secure src/eBones 1373acfee7cSPaul Traina.endif 138288fe4dbSPoul-Henning Kamp.endif 13962bb2153SPaul Traina.if defined(LOCAL_PATCHES) && exists(${LOCAL_PATCHES}) 14062bb2153SPaul Traina cd ${CHROOTDIR}/usr/src && patch --silent < ${LOCAL_PATCHES} 14162bb2153SPaul Traina.endif 14297febce7SJoerg Wunsch.if !defined(NOPORTS) 1432b243d29SJordan K. Hubbard cd ${CHROOTDIR}/usr && rm -rf ports && cvs -d ${CVSROOT} co -P ports && cd ports && make readmes 1446e5cd2d2SJordan K. Hubbard.endif 145aeb6d603SJordan K. Hubbard.if !defined(NODOC) 146aeb6d603SJordan K. Hubbard cd ${CHROOTDIR}/usr && rm -rf doc && cvs -d ${CVSROOT} co -P doc 147aeb6d603SJordan K. Hubbard.endif 148288fe4dbSPoul-Henning Kamp.endif 149288fe4dbSPoul-Henning Kamp.if make(rerelease) 150288fe4dbSPoul-Henning Kamp.if !defined(RELEASENOUPDATE) 151288fe4dbSPoul-Henning Kamp.if !defined(RELEASETAG) 152d4983966SPaul Traina cd ${CHROOTDIR}/usr/src && cvs -q update -P -d 153288fe4dbSPoul-Henning Kamp.else 154d4983966SPaul Traina cd ${CHROOTDIR}/usr/src && cvs -q update -P -d -r ${RELEASETAG} 155288fe4dbSPoul-Henning Kamp.endif 15697febce7SJoerg Wunsch.if !defined(NOPORTS) 1576e5cd2d2SJordan K. Hubbard cd ${CHROOTDIR}/usr/ports && cvs -q update -P -d 1586e5cd2d2SJordan K. Hubbard.endif 159aeb6d603SJordan K. Hubbard.if !defined(NODOC) 160aeb6d603SJordan K. Hubbard cd ${CHROOTDIR}/usr/doc && cvs -q update -P -d 161aeb6d603SJordan K. Hubbard.endif 162288fe4dbSPoul-Henning Kamp.endif 163bd668f6fSPoul-Henning Kamp.endif 1647284556fSJordan K. Hubbard # Add version information to those things that need it. 165ab0e9cdcSPoul-Henning Kamp ( cd ${CHROOTDIR}/usr/src/sys/conf && \ 166288fe4dbSPoul-Henning Kamp mv newvers.sh foo && \ 167288fe4dbSPoul-Henning Kamp sed "s/^RELEASE=.*/RELEASE=${BUILDNAME}/" foo > newvers.sh&& rm foo ) 16840b0c0d9SPeter Wemm ( cd ${CHROOTDIR}/usr/src/release/sysinstall && \ 169288fe4dbSPoul-Henning Kamp sed "s/__RELEASE/${BUILDNAME}/" version.h > version.h.new && \ 17046a7b813SJordan K. Hubbard mv version.h.new version.h && \ 17146a7b813SJordan K. Hubbard echo XXXX ) 172d4983966SPaul Traina -test -f install.cfg && cp install.cfg ${CHROOTDIR}/usr/src/release 17320e5d523SJordan K. Hubbard echo "#!/bin/sh" > ${CHROOTDIR}/mk 17420e5d523SJordan K. Hubbard echo "set -ex" >> ${CHROOTDIR}/mk 175571240d7SJoerg Wunsch echo "export CFLAGS='-O2 -pipe'" >> ${CHROOTDIR}/mk 1767284556fSJordan K. Hubbard echo "export DISTRIBUTIONS=\"${DISTRIBUTIONS}\"" >> ${CHROOTDIR}/mk 17746e90709SJoerg Wunsch echo "export BUILDNAME=${BUILDNAME}" >> ${CHROOTDIR}/mk 17846e90709SJoerg Wunsch.if defined(RELEASETAG) 17937ca025aSJoerg Wunsch echo "export RELEASETAG=${RELEASETAG}" >> ${CHROOTDIR}/mk 18046e90709SJoerg Wunsch.endif 18197febce7SJoerg Wunsch.if defined(NOPORTS) 18297febce7SJoerg Wunsch echo "export NOPORTS=${NOPORTS}" >> ${CHROOTDIR}/mk 18337ca025aSJoerg Wunsch.endif 1844731faa3SJordan K. Hubbard.if defined(BOOT_CONFIG) 1854731faa3SJordan K. Hubbard echo "export BOOT_CONFIG=\"${BOOT_CONFIG}\"">> ${CHROOTDIR}/mk 1864731faa3SJordan K. Hubbard.endif 187793e8c6fSJordan K. Hubbard.if defined(NODOC) 188793e8c6fSJordan K. Hubbard echo "export NODOC=${NODOC}" >> ${CHROOTDIR}/mk 189793e8c6fSJordan K. Hubbard.endif 1904731faa3SJordan K. Hubbard.if defined(NOSRC) 1914731faa3SJordan K. Hubbard echo "export NOSRC=${NOSRC}" >> ${CHROOTDIR}/mk 1924731faa3SJordan K. Hubbard.endif 19343276d06SJoerg Wunsch # Don't remove this, or the build will fall over! 19443276d06SJoerg Wunsch echo "export RELEASEDIR=/R" >> ${CHROOTDIR}/mk 195b650e5b9SJoerg Wunsch echo "export PATH=${BOOTSTRAPDIR}:$${PATH}" >> ${CHROOTDIR}/mk 19620e5d523SJordan K. Hubbard echo "cd /usr/src" >> ${CHROOTDIR}/mk 197288fe4dbSPoul-Henning Kamp.if make(release) 1982c8bf35aSJoerg Wunsch # This eases bootstrapping from a more recent hosting environment: 1992c8bf35aSJoerg Wunsch echo "mkdir -p /usr/lib/compat" >> ${CHROOTDIR}/mk 2002c8bf35aSJoerg Wunsch echo "chflags noschg /usr/lib/lib*.so.*" >> ${CHROOTDIR}/mk 2012c8bf35aSJoerg Wunsch echo "mv /usr/lib/lib*.so.* /usr/lib/compat" >> ${CHROOTDIR}/mk 2022c8bf35aSJoerg Wunsch echo "ldconfig /usr/lib /usr/lib/compat" >> ${CHROOTDIR}/mk 203c70e52b1SBrian Somers echo "(cd include; make all install)" >> ${CHROOTDIR}/mk 204288fe4dbSPoul-Henning Kamp echo "make world" >> ${CHROOTDIR}/mk 2053603ee30SJoerg Wunsch echo "(cd etc; make distribution)" >> ${CHROOTDIR}/mk 2062c8bf35aSJoerg Wunsch # Now we've got our own shared libs, remove the bootstrapping 2072c8bf35aSJoerg Wunsch # libs again. 2082c8bf35aSJoerg Wunsch echo "rm -f /usr/lib/compat/*" >> ${CHROOTDIR}/mk 2092c8bf35aSJoerg Wunsch echo "ldconfig /usr/lib" >> ${CHROOTDIR}/mk 210288fe4dbSPoul-Henning Kamp.endif 211288fe4dbSPoul-Henning Kamp.if make(rerelease) 21220e5d523SJordan K. Hubbard echo "make all install" >> ${CHROOTDIR}/mk 213288fe4dbSPoul-Henning Kamp.endif 214c67c1d08SJordan K. Hubbard echo "cd /usr/src/release/sysinstall" >> ${CHROOTDIR}/mk 215c67c1d08SJordan K. Hubbard echo "make obj" >> ${CHROOTDIR}/mk 216a3e12198SJordan K. Hubbard echo "cd /usr/src/release" >> ${CHROOTDIR}/mk 217630a47cfSJordan K. Hubbard echo "make objlink" >> ${CHROOTDIR}/mk 218c67c1d08SJordan K. Hubbard echo "(cd obj; rm -f ${REDOREDO})" >> ${CHROOTDIR}/mk 21920e5d523SJordan K. Hubbard echo "make doRELEASE" >> ${CHROOTDIR}/mk 220288fe4dbSPoul-Henning Kamp echo "echo make ${.TARGET} Finished" >> ${CHROOTDIR}/mk 22120e5d523SJordan K. Hubbard chmod 755 ${CHROOTDIR}/mk 22220e5d523SJordan K. Hubbard chroot ${CHROOTDIR} /mk 22320e5d523SJordan K. Hubbard 224bd668f6fSPoul-Henning Kampclean: 2256e5cd2d2SJordan K. Hubbard rm -rf boot_crunch release.[0-9] 226bd668f6fSPoul-Henning Kamp 227fbc6f9e0SJoerg Wunsch# Clean out /R and make the directory structure. 228bd668f6fSPoul-Henning Kamprelease.1: 229fbc6f9e0SJoerg Wunsch -mkdir /R 230fbc6f9e0SJoerg Wunsch chflags -R noschg /R/. 231fbc6f9e0SJoerg Wunsch rm -rf /R/* 232bd668f6fSPoul-Henning Kamp mkdir ${RD} 233bd668f6fSPoul-Henning Kamp mkdir ${RD}/floppies 234e12c4355SPoul-Henning Kamp mkdir ${RD}/trees 235bd668f6fSPoul-Henning Kamp mkdir ${RD}/dists 236bb91094aSPoul-Henning Kamp mkdir ${RD}/kernels 2377284556fSJordan K. Hubbard for i in ${DISTRIBUTIONS} ; do \ 238288fe4dbSPoul-Henning Kamp mkdir ${RD}/trees/$$i && \ 239288fe4dbSPoul-Henning Kamp mkdir ${RD}/dists/$$i && \ 240bd668f6fSPoul-Henning Kamp mtree -deU -f ${MTREEFILES}/BSD.root.dist \ 241288fe4dbSPoul-Henning Kamp -p ${RD}/trees/$$i > /dev/null && \ 242bd668f6fSPoul-Henning Kamp mtree -deU -f ${MTREEFILES}/BSD.usr.dist \ 243288fe4dbSPoul-Henning Kamp -p ${RD}/trees/$$i/usr > /dev/null && \ 244a414a675SPoul-Henning Kamp mtree -deU -f ${MTREEFILES}/BSD.include.dist \ 245288fe4dbSPoul-Henning Kamp -p ${RD}/trees/$$i/usr/include > /dev/null && \ 246bd668f6fSPoul-Henning Kamp mtree -deU -f ${MTREEFILES}/BSD.var.dist \ 247e12c4355SPoul-Henning Kamp -p ${RD}/trees/$$i/var > /dev/null ; \ 24848327bc9SPoul-Henning Kamp done 249bd668f6fSPoul-Henning Kamp touch release.1 2507f986648SPoul-Henning Kamp 251bd668f6fSPoul-Henning Kamp# Install the system into the various distributions. 252bd668f6fSPoul-Henning Kamprelease.2: 2533c331140SJordan K. Hubbard cd ${.CURDIR}/../etc && make distrib-dirs DESTDIR=${RD}/trees/bin 25497febce7SJoerg Wunsch cd ${.CURDIR}/.. && make distribute DISTDIR=${RD}/trees 2557284556fSJordan K. Hubbard.if exists(${.CURDIR}/../eBones) && !defined(NOKERBEROS) 25697febce7SJoerg Wunsch cd ${.CURDIR}/../eBones && ( \ 25797febce7SJoerg Wunsch make bootstrap &&\ 25897febce7SJoerg Wunsch make obj all help-distribute DISTDIR=${RD}/trees &&\ 25997febce7SJoerg Wunsch make kprog \ 26097febce7SJoerg Wunsch ) 26197febce7SJoerg Wunsch.endif 26297febce7SJoerg Wunsch chflags -R noschg ${RD}/trees 26397febce7SJoerg Wunsch touch release.2 26497febce7SJoerg Wunsch 26597febce7SJoerg Wunsch# Make and install the generic kernel(s). 26697febce7SJoerg Wunschrelease.3: 26716c61233SJordan K. Hubbard.for kernel in ${KERNELS} 26816c61233SJordan K. Hubbard rm -f ${RD}/kernels/${kernel} 26916c61233SJordan K. Hubbard rm -rf ${.CURDIR}/../sys/compile/${kernel} 27016c61233SJordan K. Hubbard cd ${.CURDIR} && ${MAKE} doKERNEL KERNEL=${kernel} 27116c61233SJordan K. Hubbard rm -rf ${.CURDIR}/../sys/compile/${kernel} 27216c61233SJordan K. Hubbard ln -f ${RD}/kernels/${kernel} ${RD}/trees/bin/kernel.${kernel} 27316c61233SJordan K. Hubbard.endfor 274bd668f6fSPoul-Henning Kamp touch release.3 275bd668f6fSPoul-Henning Kamp 27601feef2cSPoul-Henning Kamp# Make and install the three crunched binaries which live on the floppies. 277bd668f6fSPoul-Henning Kamp# You are not supposed to like this :-) 278cd6f5820SJoerg Wunsch# 279cd6f5820SJoerg Wunsch# NB: the "RELEASE_BUILD_FIXIT" magic prevents vi from including the 280cd6f5820SJoerg Wunsch# Tcl and Perl APIs. See also /usr/src/usr.bin/vi/Makefile. 281bd668f6fSPoul-Henning Kamprelease.4: 2827284556fSJordan K. Hubbard cd ${.CURDIR}/sysinstall && make obj depend all 283518a1d34SPoul-Henning Kamp rm -rf ${RD}/crunch 284518a1d34SPoul-Henning Kamp mkdir -p ${RD}/crunch 285cd6f5820SJoerg Wunsch export RELEASE_BUILD_FIXIT=noway ; \ 2867284556fSJordan K. Hubbard for j in ${CRUNCH_TARGETS} ; do \ 287518a1d34SPoul-Henning Kamp rm -rf $${j}_crunch && \ 288518a1d34SPoul-Henning Kamp mkdir $${j}_crunch && \ 289518a1d34SPoul-Henning Kamp ( cd $${j}_crunch && \ 290518a1d34SPoul-Henning Kamp crunchgen ${.CURDIR}/$${j}_crunch.conf && \ 291288fe4dbSPoul-Henning Kamp ${MAKE} -f $${j}_crunch.mk all NOCRYPT=yes \ 2923525074dSPoul-Henning Kamp "CFLAGS=${CFLAGS} -DCRUNCHED_BINARY") && \ 293518a1d34SPoul-Henning Kamp mv $${j}_crunch/$${j}_crunch ${RD}/crunch/$${j} && \ 2945bb88366SJoerg Wunsch true || { rm -rf $${j}_crunch ; false ; } ; \ 295bd668f6fSPoul-Henning Kamp done 296bd668f6fSPoul-Henning Kamp touch release.4 297bd668f6fSPoul-Henning Kamp 29830e8b491SPoul-Henning Kamp# 29930e8b491SPoul-Henning Kamp# --==## Fix up the distributions. ##==-- 30030e8b491SPoul-Henning Kamp# 301bd668f6fSPoul-Henning Kamprelease.5: 30204f11c61SJordan K. Hubbard # Handle some grief caused by the munition braindeadness. 3034f9a3d48SJoerg Wunsch for i in sbin/init bin/ed ; do \ 3044f9a3d48SJoerg Wunsch ( cd ${.CURDIR}/../$$i; \ 3054f9a3d48SJoerg Wunsch make -DNOCRYPT clean all distribute DISTDIR=${RD}/trees ) ; \ 3064f9a3d48SJoerg Wunsch done 3074f9a3d48SJoerg Wunsch 3087284556fSJordan K. Hubbard # Create any "synthetic dists" now. 3097284556fSJordan K. Hubbard @for i in ${DISTRIBUTIONS}; do \ 3107284556fSJordan K. Hubbard if [ -f ${.CURDIR}/scripts/$${i}-make.sh ]; then \ 3117284556fSJordan K. Hubbard echo -n "Running $$i dist creation script... "; \ 3127284556fSJordan K. Hubbard env RD=${RD} sh ${.CURDIR}/scripts/$${i}-make.sh || echo "$$i distribution script returned bad status."; \ 31358183fc7SJordan K. Hubbard echo "Done."; \ 3147284556fSJordan K. Hubbard fi \ 3157284556fSJordan K. Hubbard done \ 3167284556fSJordan K. Hubbard 3172fb96ab9SJoerg Wunsch # Create symlinks for the MD5-based crypt lib, too. The 3182fb96ab9SJoerg Wunsch # automatically created links still point to the DES stuff, 3192fb96ab9SJoerg Wunsch # which went into its own distribution. 3202fb96ab9SJoerg Wunsch for i in ${RD}/trees/bin/usr/lib/libscrypt* ; do \ 3212fb96ab9SJoerg Wunsch c=`echo $$i | sed -e 's/libscrypt/libcrypt/'` ; \ 3222fb96ab9SJoerg Wunsch rm -f $$c ; \ 3232fb96ab9SJoerg Wunsch ln -s `basename $$i` $$c ; \ 3242fb96ab9SJoerg Wunsch done 32534fca5ddSJoerg Wunsch 32630e8b491SPoul-Henning Kamp # Remove some files we can faster regen after installing. 327d2b98961SPoul-Henning Kamp cd ${RD}/trees/bin/usr/share/misc && rm -f termcap.db vgrindefs.db 32830e8b491SPoul-Henning Kamp # Remove all the directories we don't need. 32927d44115SPoul-Henning Kamp -cd ${RD}/trees && \ 3300a9e93bfSJordan K. Hubbard find ${OTHER_DISTS} ${COMPAT_DISTS} ${CRYPTO_DISTS} -depth -type d -print | xargs rmdir 331bd668f6fSPoul-Henning Kamp touch release.5 332f14786ddSJordan K. Hubbard 33330e8b491SPoul-Henning Kamp# 3347284556fSJordan K. Hubbard# --==## Package up the tarballs from assembled trees ##==-- 33530e8b491SPoul-Henning Kamp# 336bd668f6fSPoul-Henning Kamprelease.6: 33795e34bfcSJordan K. Hubbard rm -rf ${RD}/dists 33895e34bfcSJordan K. Hubbard mkdir -p ${RD}/dists 33995e34bfcSJordan K. Hubbard @for i in ${DISTRIBUTIONS} ; \ 34095e34bfcSJordan K. Hubbard do \ 34195e34bfcSJordan K. Hubbard if [ -d ${RD}/trees/$${i} ] ; then \ 34230e8b491SPoul-Henning Kamp cd ${.CURDIR} && $(MAKE) doTARBALL \ 34330e8b491SPoul-Henning Kamp SD=${RD}/trees/$${i} \ 344288fe4dbSPoul-Henning Kamp TN=$$i TD=$$i ARG="." && \ 34595e34bfcSJordan K. Hubbard echo "$${i} distribution is finished."; \ 34695e34bfcSJordan K. Hubbard fi ; \ 34795e34bfcSJordan K. Hubbard done 3487284556fSJordan K. Hubbard # More munition braindeadness. 34930e8b491SPoul-Henning Kamp ( cd ${RD}/dists && \ 35030e8b491SPoul-Henning Kamp if [ -f krb/krb.aa ] ; then mv krb/* des && rmdir krb ; fi ) 3510412e9f7SJordan K. Hubbard touch release.6 35295e34bfcSJordan K. Hubbard 35395e34bfcSJordan K. Hubbard 35430e8b491SPoul-Henning Kamp# 35530e8b491SPoul-Henning Kamp# --==## Make source dists ##==-- 35630e8b491SPoul-Henning Kamp# 35795e34bfcSJordan K. Hubbardrelease.7: 3584731faa3SJordan K. Hubbard.if !defined(NOSRC) 359288fe4dbSPoul-Henning Kamp @cd ${.CURDIR} && $(MAKE) doTARBALL SD=/usr/src \ 36095e34bfcSJordan K. Hubbard TD=src TN=sbase ARG="[A-Z]*" 361288fe4dbSPoul-Henning Kamp @for i in `cd /usr/src && echo [a-z]*` ; do \ 36230e8b491SPoul-Henning Kamp if [ -d /usr/src/$$i ] ; then \ 36330e8b491SPoul-Henning Kamp cd ${.CURDIR} && $(MAKE) doTARBALL \ 36495e34bfcSJordan K. Hubbard TN=`echo s$$i | tr -d '.' | sed 's/usr/u/'` \ 36530e8b491SPoul-Henning Kamp SD=/usr/src TD=src ARG="$$i" ; \ 36695e34bfcSJordan K. Hubbard fi ; \ 36795e34bfcSJordan K. Hubbard done 36840b0c0d9SPeter Wemm.if defined(EXTRA_SRC) 369288fe4dbSPoul-Henning Kamp @set ${EXTRA_SRC} && \ 37040b0c0d9SPeter Wemm while [ $$# -ge 2 ] ; do \ 37130e8b491SPoul-Henning Kamp if [ -d /usr/src/$$1 ] ; then \ 37230e8b491SPoul-Henning Kamp cd ${.CURDIR} && $(MAKE) doTARBALL \ 37330e8b491SPoul-Henning Kamp SD=/usr/src TN="s$$2" TD=src ARG="$$1" ; \ 37430e8b491SPoul-Henning Kamp fi && shift && shift ; \ 37540b0c0d9SPeter Wemm done 37640b0c0d9SPeter Wemm.endif 37795e34bfcSJordan K. Hubbard ( cd ${RD}/dists/src && \ 378d3628763SRodney W. Grimes if [ -f ssecure.aa ] ; then mv ssecure.* ../des ; fi && \ 37924fe14a0SJordan K. Hubbard if [ -f sebones.aa ] ; then mv sebones.* ../des ; fi && \ 38030e8b491SPoul-Henning Kamp if [ -f ssecure.inf ] ; then mv ssecure.inf ../des ; fi && \ 38130e8b491SPoul-Henning Kamp if [ -f sebones.inf ] ; then mv sebones.inf ../des ; fi ; ) 38295e34bfcSJordan K. Hubbard @echo "src distribution is finished." 3834731faa3SJordan K. Hubbard.endif 3840412e9f7SJordan K. Hubbard touch release.7 38595e34bfcSJordan K. Hubbard 38695e34bfcSJordan K. Hubbard# Complete the bootfd 387409f9329SJordan K. Hubbard# 388409f9329SJordan K. Hubbard# Now, just to get this picture down once and for all: 389409f9329SJordan K. Hubbard# 390409f9329SJordan K. Hubbard# +------------------------------------------------------------------------+ 391409f9329SJordan K. Hubbard# |boot.flp | 392409f9329SJordan K. Hubbard# +-----+-----+------------------------------------------------------------+ 393409f9329SJordan K. Hubbard# |boot1|boot2|floppy filesystem "bootfd" | 394409f9329SJordan K. Hubbard# +-----+-----+-+--------------------------------------------------------+-+ 395409f9329SJordan K. Hubbard# |kernel | 396409f9329SJordan K. Hubbard# +------------+-----------------------------------------+-+ 397409f9329SJordan K. Hubbard# |mfs filesystem "mfsfd" | 398409f9329SJordan K. Hubbard# +-----------------------------------------+ 399409f9329SJordan K. Hubbard# 400409f9329SJordan K. Hubbard 401d50a3007SJordan K. Hubbardrelease.8: write_mfs_in_kernel dumpnlist 402409f9329SJordan K. Hubbard rm -rf ${RD}/mfsfd 403409f9329SJordan K. Hubbard mkdir ${RD}/mfsfd 404409f9329SJordan K. Hubbard cd ${RD}/mfsfd && \ 405b386088bSJordan K. Hubbard mkdir -p etc dev mnt stand/help 4063df0e2afSPoul-Henning Kamp @cd ${.CURDIR} && $(MAKE) installCRUNCH CRUNCH=boot \ 407a91fd119SPoul-Henning Kamp DIR=${RD}/mfsfd/stand ZIP=false 4083df0e2afSPoul-Henning Kamp ( cd ${RD}/trees/bin/dev && \ 40939ae3f15SJordan K. Hubbard ls console tty ttyv0 ttyv1 ttyv2 ttyv3 null zero \ 4105bf8036aSJordan K. Hubbard *[swo]d* cuaa[01] cuaa[23] fd[01] rfd[01] \ 4110e9e4efaSJordan K. Hubbard cd0a mcd0a scd0a matcd0a wcd0c rst0 rft0 rwt0 | \ 412409f9329SJordan K. Hubbard cpio -dump ${RD}/mfsfd/dev ) 4135bf8036aSJordan K. Hubbard ( cd ${RD}/mfsfd/dev && rm -f *[swo]d*[bdefgh] ) 4143df0e2afSPoul-Henning Kamp cd ${RD}/trees/bin && ls ${BOOT1} | cpio -dump ${RD}/mfsfd/stand 415d3628763SRodney W. Grimes echo "nameserver 42/tcp name" > ${RD}/mfsfd/stand/etc/services 416d3628763SRodney W. Grimes echo "ftp 21/tcp" >> ${RD}/mfsfd/stand/etc/services 417d3628763SRodney W. Grimes echo "domain 53/tcp nameserver" >> ${RD}/mfsfd/stand/etc/services 418d3628763SRodney W. Grimes echo "domain 53/udp nameserver" >> ${RD}/mfsfd/stand/etc/services 419e7fc885eSJordan K. Hubbard echo "cmd 514/tcp shell" >> ${RD}/mfsfd/stand/etc/services 4206545b6a5SJordan K. Hubbard gzip -c ${.CURDIR}/../COPYRIGHT > ${RD}/mfsfd/stand/help/COPYRIGHT.hlp.gz 421d4983966SPaul Traina -test -f ${.CURDIR}/install.cfg && cp ${.CURDIR}/install.cfg ${RD}/mfsfd 4226545b6a5SJordan K. Hubbard @echo "Making the regular boot floppy." 42317078dccSJordan K. Hubbard tar --exclude CVS -cf - -C ${.CURDIR}/sysinstall help | \ 424409f9329SJordan K. Hubbard tar xvf - -C ${RD}/mfsfd/stand 4256545b6a5SJordan K. Hubbard @echo "Compressing doc files..." 4266545b6a5SJordan K. Hubbard @gzip -9 ${RD}/mfsfd/stand/help/*.hlp 427c66cda21SPoul-Henning Kamp sh -e ${.CURDIR}/doFS.sh ${RD} ${MNT} ${BOOTMFSSIZE} ${RD}/mfsfd \ 428288fe4dbSPoul-Henning Kamp ${MFSINODE} minimum 429288fe4dbSPoul-Henning Kamp mv fs-image fs-image.std 430288fe4dbSPoul-Henning Kamp mv fs-image.size fs-image.std.size 431288fe4dbSPoul-Henning Kamp cd ${.CURDIR} && ${MAKE} doMFSKERN FSIMAGE=std 43230e8b491SPoul-Henning Kamp mv ${RD}/floppies/bootstd.flp ${RD}/floppies/boot.flp 4336545b6a5SJordan K. Hubbard @echo "Regular boot floppy made." 4340412e9f7SJordan K. Hubbard touch release.8 435bd668f6fSPoul-Henning Kamp 43630e8b491SPoul-Henning Kamp# 43730e8b491SPoul-Henning Kamp# --==## Create a fixit floppy ##==-- 43830e8b491SPoul-Henning Kamp# 439b53e8a34SJordan K. Hubbardrelease.9: 440518a1d34SPoul-Henning Kamp rm -rf ${RD}/fixitfd 441518a1d34SPoul-Henning Kamp mkdir ${RD}/fixitfd 442518a1d34SPoul-Henning Kamp cd ${RD}/fixitfd && \ 443fbc6f9e0SJoerg Wunsch mkdir -p dev stand bin sbin etc mnt mnt1 mnt2 mnt3 mnt4 tmp \ 444fbc6f9e0SJoerg Wunsch usr/share/misc 4453df0e2afSPoul-Henning Kamp @cd ${.CURDIR} && $(MAKE) installCRUNCH CRUNCH=fixit \ 446518c7f2aSJoerg Wunsch DIR=${RD}/fixitfd/stand ZIP=false 44730e8b491SPoul-Henning Kamp ( cd ${RD}/fixitfd/dev && \ 448a18763d0SJoerg Wunsch sed -e '/^PATH/s/^/#/' ${RD}/trees/bin/dev/MAKEDEV > MAKEDEV && \ 449a18763d0SJoerg Wunsch chmod 755 MAKEDEV && \ 45030e8b491SPoul-Henning Kamp sh MAKEDEV all ) 451518c7f2aSJoerg Wunsch cp ${RD}/trees/bin/etc/spwd.db ${RD}/trees/bin/etc/group \ 452518c7f2aSJoerg Wunsch ${RD}/trees/bin/etc/protocols ${RD}/fixitfd/etc 453fbc6f9e0SJoerg Wunsch cp ${RD}/trees/bin/usr/share/misc/scsi_modes \ 454fbc6f9e0SJoerg Wunsch ${RD}/fixitfd/usr/share/misc 455e12c4355SPoul-Henning Kamp cp ${.CURDIR}/fixit.profile ${RD}/fixitfd/.profile 456518c7f2aSJoerg Wunsch cp ${.CURDIR}/fixit.services ${RD}/fixitfd/etc/services 457ed228eb6SJoerg Wunsch cp ${.CURDIR}/tar.sh ${RD}/fixitfd/stand/tar 458ed228eb6SJoerg Wunsch chmod 555 ${RD}/fixitfd/stand/tar 459c66cda21SPoul-Henning Kamp sh -e ${.CURDIR}/doFS.sh ${RD} ${MNT} ${FDSIZE} ${RD}/fixitfd \ 460518c7f2aSJoerg Wunsch ${FIXITINODE} ${FDLABEL} 461288fe4dbSPoul-Henning Kamp mv fs-image ${RD}/floppies/fixit.flp 4626e5cd2d2SJordan K. Hubbard# Do our last minute floppies directory setup in a convenient place. 4636e5cd2d2SJordan K. Hubbard cp ${.CURDIR}/floppies/README.TXT ${RD}/floppies/README.TXT 4646e5cd2d2SJordan K. Hubbard @(cd ${RD}/floppies; md5 * > CHECKSUM.MD5) 465b53e8a34SJordan K. Hubbard touch release.9 4663bc93c76SPoul-Henning Kamp 46730e8b491SPoul-Henning Kamp# 46830e8b491SPoul-Henning Kamp# --==## Setup a suitable ftp-area ##==-- 46930e8b491SPoul-Henning Kamp# 470e12c4355SPoul-Henning Kampftp.1: 471ae33fac5SJordan K. Hubbard mkdir -p ${FD} 472a8335764SPoul-Henning Kamp cd ${RD} && find floppies -print | cpio -dumpl ${FD} 473a8335764SPoul-Henning Kamp cd ${RD}/dists && find . -print | cpio -dumpl ${FD} 4745bf8036aSJordan K. Hubbard cp ${.CURDIR}/ABOUT.TXT ${FD}/ABOUT.TXT 47516805608SJordan K. Hubbard cp ${.CURDIR}/sysinstall/help/readme.hlp ${FD}/README.TXT 47616805608SJordan K. Hubbard cp ${.CURDIR}/sysinstall/help/hardware.hlp ${FD}/HARDWARE.TXT 47716805608SJordan K. Hubbard cp ${.CURDIR}/sysinstall/help/install.hlp ${FD}/INSTALL.TXT 47816805608SJordan K. Hubbard cp ${.CURDIR}/sysinstall/help/relnotes.hlp ${FD}/RELNOTES.TXT 479cf078de0SJoerg Wunsch echo "CD_VERSION = ${BUILDNAME}" > ${FD}/cdrom.inf 4803bc93c76SPoul-Henning Kamp 48130e8b491SPoul-Henning Kamp# 48230e8b491SPoul-Henning Kamp# --==## Setup a suitable cdrom-area ##==-- 48330e8b491SPoul-Henning Kamp# 484c5b0a909SPoul-Henning Kampcdrom.1: 4851bac119bSJordan K. Hubbard mkdir -p ${CD_DISC1} ${CD_DISC2} 4861bac119bSJordan K. Hubbard cd ${RD} && find floppies -print | cpio -dumpl ${CD_DISC1} 4871bac119bSJordan K. Hubbard cd ${RD}/dists && find . -print | cpio -dumpl ${CD_DISC1} 4881bac119bSJordan K. Hubbard ln -f ${RD}/kernels/MFSKERNEL.std ${CD_DISC1}/kernel 4891bac119bSJordan K. Hubbard ln -f ${RD}/trees/bin/usr/mdec/fbsdboot.exe ${CD_DISC1} 490c5b0a909SPoul-Henning Kamp for i in ${DISTRIBUTIONS} ; \ 491c5b0a909SPoul-Henning Kamp do \ 492c5b0a909SPoul-Henning Kamp if [ -d ${RD}/trees/$${i} ] ; then \ 49318926d84SJordan K. Hubbard chflags -R noschg ${RD}/trees/$${i} ; \ 49401feef2cSPoul-Henning Kamp ( cd ${RD}/trees/$${i} && \ 4951bac119bSJordan K. Hubbard find . -depth -print | cpio -dumpl ${CD_DISC2} ) ; \ 496c5b0a909SPoul-Henning Kamp fi \ 497c5b0a909SPoul-Henning Kamp done 49897febce7SJoerg Wunsch rm -f ${CD_DISC2}/.profile 49997febce7SJoerg Wunsch cp ${.CURDIR}/fixit.profile ${CD_DISC2}/.profile 5001bac119bSJordan K. Hubbard echo "CD_VERSION = ${BUILDNAME}" > ${CD_DISC1}/cdrom.inf 50197febce7SJoerg Wunsch echo "CD_VERSION = ${BUILDNAME}" > ${CD_DISC2}/cdrom.inf 5021bac119bSJordan K. Hubbard cp ${.CURDIR}/ABOUT.TXT ${CD_DISC1}/ABOUT.TXT 5031bac119bSJordan K. Hubbard cp ${.CURDIR}/sysinstall/help/readme.hlp ${CD_DISC1}/README.TXT 5041bac119bSJordan K. Hubbard cp ${.CURDIR}/sysinstall/help/hardware.hlp ${CD_DISC1}/HARDWARE.TXT 5051bac119bSJordan K. Hubbard cp ${.CURDIR}/sysinstall/help/install.hlp ${CD_DISC1}/INSTALL.TXT 5061bac119bSJordan K. Hubbard cp ${.CURDIR}/sysinstall/help/relnotes.hlp ${CD_DISC1}/RELNOTES.TXT 50797febce7SJoerg Wunsch.if !defined(NOPORTS) 5086e5cd2d2SJordan K. Hubbard ln -s ../ports ${CD_DISC2}/usr/ports 509bccbd9e7SJordan K. Hubbard.endif 5106e5cd2d2SJordan K. Hubbard# 5116e5cd2d2SJordan K. Hubbard# --==## And finally, create the ports distribution & tarball ##==-- 5126e5cd2d2SJordan K. Hubbard# 5136e5cd2d2SJordan K. Hubbard# NOTE: Both ftp.1 and cdrom.1 must be run before this target or it will die 5146e5cd2d2SJordan K. Hubbard# a quick and gruesome death. We also expect the release engineer to 5156e5cd2d2SJordan K. Hubbard# manually populate ports/distfiles on the 2nd CDROM. 51697febce7SJoerg Wunsch 5176e5cd2d2SJordan K. Hubbardports.1: 5186e5cd2d2SJordan K. Hubbard tar -cBf - -C /usr ports | tar xBpf - -C ${CD_DISC2} && \ 5196e5cd2d2SJordan K. Hubbard mkdir -p ${CD_DISC1}/ports && tar -czf ${CD_DISC1}/ports/ports.tgz -C /usr ports && \ 520ff7c711cSJoerg Wunsch cp ${.CURDIR}/scripts/ports-install.sh ${CD_DISC1}/ports/install.sh && \ 52197febce7SJoerg Wunsch (cd ${CD_DISC1}/ports; md5 * > CHECKSUM.MD5) && 5226e5cd2d2SJordan K. Hubbard tar -cBf - -C ${CD_DISC1} ports | tar -xBf - -C ${FD} 5236e5cd2d2SJordan K. Hubbard 524c5b0a909SPoul-Henning Kamp 525793e8c6fSJordan K. Hubbarddoc.1: 526793e8c6fSJordan K. Hubbard cd /usr/doc && make all distribute DISTDIR=${RD}/trees 527793e8c6fSJordan K. Hubbard 5287eb11201SPoul-Henning Kamp# Various "subroutine" and other supporting targets. 5297eb11201SPoul-Henning Kamp 530bd668f6fSPoul-Henning KampdoTARBALL: 531bd668f6fSPoul-Henning Kamp.if !defined(SD) 532288fe4dbSPoul-Henning Kamp @echo "SD undefined in doTARBALL" && exit 1 533bd668f6fSPoul-Henning Kamp.endif 534bd668f6fSPoul-Henning Kamp.if !defined(TD) 535288fe4dbSPoul-Henning Kamp @echo "TB undefined in doTARBALL" && exit 1 536bd668f6fSPoul-Henning Kamp.endif 537bd668f6fSPoul-Henning Kamp.if !defined(ARG) 538288fe4dbSPoul-Henning Kamp @echo "ARG undefined in doTARBALL" && exit 1 539bd668f6fSPoul-Henning Kamp.endif 540836ed9f2SPoul-Henning Kamp rm -rf ${RD}/dists/${TD}/${TN}* 541e12c4355SPoul-Henning Kamp mkdir -p ${RD}/dists/${TD} 542d2b98961SPoul-Henning Kamp ( cd ${SD} && \ 543d2b98961SPoul-Henning Kamp tn=`echo ${TN} | tr '[A-Z]' '[a-z]' | cut -c1-8` && \ 544d2b98961SPoul-Henning Kamp echo rolling ${TD}/$$tn tarball &&\ 5450ef3fb22SJoerg Wunsch tar --exclude CVS --exclude obj --exclude BOOTMFS -cf - ${ARG} | \ 54695e34bfcSJordan K. Hubbard ${ZIPNSPLIT} ${RD}/dists/${TD}/$$tn. && \ 547ac0a5268SJordan K. Hubbard sh ${.CURDIR}/info.sh ${RD}/dists/${TD}/$$tn > \ 548ac0a5268SJordan K. Hubbard ${RD}/dists/${TD}/$$tn.inf && \ 5491e104a1eSJordan K. Hubbard if [ -f ${.CURDIR}/scripts/$${TD}-install.sh ]; then \ 5501e104a1eSJordan K. Hubbard cp -p ${.CURDIR}/scripts/$${TD}-install.sh ${RD}/dists/${TD}/install.sh; \ 5511e104a1eSJordan K. Hubbard fi && \ 55216c61233SJordan K. Hubbard if [ "${SD}" != "/usr/src" ]; then \ 55316c61233SJordan K. Hubbard mtree -c -i -p ${SD}/${ARG} \ 55416c61233SJordan K. Hubbard -k gname,md5digest,mode,nlink,uname,size,link,type \ 55591f2535eSJordan K. Hubbard > ${RD}/dists/${TD}/$$tn.mtree ; \ 55691f2535eSJordan K. Hubbard else \ 55791f2535eSJordan K. Hubbard true; \ 55891f2535eSJordan K. Hubbard fi; \ 55991f2535eSJordan K. Hubbard (cd ${RD}/dists/${TD}; \ 56091f2535eSJordan K. Hubbard rm -f CHECKSUM.MD5; \ 56191f2535eSJordan K. Hubbard md5 * > CHECKSUM.MD5) \ 56291f2535eSJordan K. Hubbard ) 5637eb11201SPoul-Henning Kamp 5643fe1f923SJordan K. HubbarddoRELEASE: release.1 release.2 ${DOCREL} release.3 release.4 release.5 \ 565793e8c6fSJordan K. Hubbard release.6 release.7 release.8 release.9 566793e8c6fSJordan K. Hubbard cd ${.CURDIR} && ${MAKE} ${EXTRAS} 5677eb11201SPoul-Henning Kamp @echo "Release done" 5687eb11201SPoul-Henning Kamp 5690ead1f1dSJordan K. Hubbardfloppies: 57040b0c0d9SPeter Wemm cd ${.CURDIR} && ${MAKE} boot.flp 57140b0c0d9SPeter Wemm cd ${.CURDIR} && ${MAKE} fixit.flp 5727854541aSJordan K. Hubbard cd ${RD} && find floppies -print | cpio -dumpl ${FD} 5730ead1f1dSJordan K. Hubbard 5743525074dSPoul-Henning Kampboot.flp: 5750412e9f7SJordan K. Hubbard rm -f release.4 release.8 5767284556fSJordan K. Hubbard cd ${.CURDIR} && ${MAKE} release.4 release.8 CRUNCH_TARGETS=boot 5773525074dSPoul-Henning Kamp 578e841846bSPoul-Henning Kampfixit.flp: 579b53e8a34SJordan K. Hubbard rm -f release.4 release.9 5807284556fSJordan K. Hubbard cd ${.CURDIR} && ${MAKE} release.4 release.9 CRUNCH_TARGETS=fixit 581e841846bSPoul-Henning Kamp 582409f9329SJordan K. Hubbardwrite_mfs_in_kernel: ${.CURDIR}/write_mfs_in_kernel.c 583409f9329SJordan K. Hubbard ${CC} ${CFLAGS} -o write_mfs_in_kernel ${.CURDIR}/write_mfs_in_kernel.c 584409f9329SJordan K. Hubbard 585d50a3007SJordan K. Hubbarddumpnlist: ${.CURDIR}/dumpnlist.c 586d50a3007SJordan K. Hubbard ${CC} ${CFLAGS} -o dumpnlist ${.CURDIR}/dumpnlist.c 587d50a3007SJordan K. Hubbard 588518a1d34SPoul-Henning KampinstallCRUNCH: 589518a1d34SPoul-Henning Kamp.if !defined(CRUNCH) 590288fe4dbSPoul-Henning Kamp @echo "CRUNCH undefined in installCRUNCH" && exit 1 591518a1d34SPoul-Henning Kamp.endif 592518a1d34SPoul-Henning Kamp.if !defined(DIR) 593288fe4dbSPoul-Henning Kamp @echo "DIR undefined in installCRUNCH" && exit 1 594518a1d34SPoul-Henning Kamp.endif 595518a1d34SPoul-Henning Kamp.if !defined(ZIP) 596288fe4dbSPoul-Henning Kamp @echo "ZIP undefined in installCRUNCH" && exit 1 597518a1d34SPoul-Henning Kamp.endif 598518a1d34SPoul-Henning Kamp if ${ZIP} ; then \ 599518a1d34SPoul-Henning Kamp gzip -9 < ${RD}/crunch/${CRUNCH} > ${DIR}/${CRUNCH}_crunch ; \ 600518a1d34SPoul-Henning Kamp else \ 601518a1d34SPoul-Henning Kamp ln -f ${RD}/crunch/${CRUNCH} ${DIR}/${CRUNCH}_crunch ; \ 602518a1d34SPoul-Henning Kamp fi 603518a1d34SPoul-Henning Kamp chmod 555 ${DIR}/${CRUNCH}_crunch 604518a1d34SPoul-Henning Kamp for i in `crunchgen -l ${.CURDIR}/${CRUNCH}_crunch.conf` ; do \ 605518a1d34SPoul-Henning Kamp ln -f ${DIR}/${CRUNCH}_crunch ${DIR}/$$i ; \ 606518a1d34SPoul-Henning Kamp done 607288fe4dbSPoul-Henning Kamp 608288fe4dbSPoul-Henning Kamp# 609288fe4dbSPoul-Henning Kamp# --==## Compile a kernel by name ${KERNEL} ##==-- 610288fe4dbSPoul-Henning Kamp# 611288fe4dbSPoul-Henning Kamp# We don't erase the sys/compile/${KERNEL} directory, since somebody 612288fe4dbSPoul-Henning Kamp# may want to reuse it (release.8 presently) 613288fe4dbSPoul-Henning Kamp# 614288fe4dbSPoul-Henning KampdoKERNEL: 615288fe4dbSPoul-Henning Kamp rm -f ${RD}/kernels/${KERNEL} 616288fe4dbSPoul-Henning Kamp cd ${.CURDIR}/../sys/i386/conf && config -n ${KERNEL} 617288fe4dbSPoul-Henning Kamp cd ${.CURDIR}/../sys/compile/${KERNEL} && \ 618288fe4dbSPoul-Henning Kamp make depend && \ 619288fe4dbSPoul-Henning Kamp make kernel && \ 620288fe4dbSPoul-Henning Kamp cp kernel ${RD}/kernels/${KERNEL} 621288fe4dbSPoul-Henning Kamp 622288fe4dbSPoul-Henning Kamp# 623288fe4dbSPoul-Henning Kamp# --==## Put a filesystem into a BOOTMFS kernel ##==-- 624288fe4dbSPoul-Henning Kamp# 625288fe4dbSPoul-Henning KampdoMFSKERN: 626d50a3007SJordan K. Hubbard @rm -f ${RD}/kernels/BOOTMFS.${FSIMAGE} 627d50a3007SJordan K. Hubbard @rm -f /sys/compile/BOOTMFS/mfs_vfsops.o 628d50a3007SJordan K. Hubbard @cd ${.CURDIR}/../sys/i386/conf && \ 62916c61233SJordan K. Hubbard sed -e '/SYSV/d' \ 63016c61233SJordan K. Hubbard -e '/pty/d' \ 63116c61233SJordan K. Hubbard -e '/PROCFS/d' \ 632a7c2b4b0SPaul Traina -e '/KTRACE/d' \ 63316c61233SJordan K. Hubbard -e 's/GENERIC/BOOTMFS/g' \ 63416c61233SJordan K. Hubbard -e '/maxusers/s/10/4/' < GENERIC > BOOTMFS && \ 635a91fd119SPoul-Henning Kamp echo "options MFS" >> BOOTMFS && \ 63616c61233SJordan K. Hubbard echo "options NFS_NOSERVER" >> BOOTMFS && \ 637d50a3007SJordan K. Hubbard echo 'options "MAXCONS=4"' >> BOOTMFS && \ 638d50a3007SJordan K. Hubbard echo "options USERCONFIG_BOOT" >> BOOTMFS 639d50a3007SJordan K. Hubbard @echo "options \"MFS_ROOT=`cat fs-image.${FSIMAGE}.size`\"" >> \ 6404676f742SJordan K. Hubbard ${.CURDIR}/../sys/i386/conf/BOOTMFS 641a590cd43SJordan K. Hubbard cd ${.CURDIR} && ${MAKE} doKERNEL KERNEL=BOOTMFS 642d50a3007SJordan K. Hubbard @rm -rf ${RD}/boot.${FSIMAGE} 643d50a3007SJordan K. Hubbard @mkdir ${RD}/boot.${FSIMAGE} 644d50a3007SJordan K. Hubbard @mv ${RD}/kernels/BOOTMFS ${RD}/kernels/BOOTMFS.${FSIMAGE} 645d50a3007SJordan K. Hubbard @cp ${RD}/kernels/BOOTMFS.${FSIMAGE} ${RD}/boot.${FSIMAGE}/kernel 6464731faa3SJordan K. Hubbard.if defined(BOOT_CONFIG) 6474731faa3SJordan K. Hubbard @echo "${BOOT_CONFIG}" >${RD}/boot.${FSIMAGE}/boot.config 6484731faa3SJordan K. Hubbardendif 649b434db23SJordan K. Hubbard @vnconfig /dev/vn0 fs-image.${FSIMAGE} 650b434db23SJordan K. Hubbard @mkdir -p /tmp/mnt_xx 651b434db23SJordan K. Hubbard @mount /dev/vn0 /tmp/mnt_xx 652b434db23SJordan K. Hubbard ./dumpnlist ${RD}/boot.${FSIMAGE}/kernel > /tmp/mnt_xx/stand/symbols 653b434db23SJordan K. Hubbard @umount /tmp/mnt_xx 654b434db23SJordan K. Hubbard @vnconfig -u /dev/vn0 655b434db23SJordan K. Hubbard @rmdir /tmp/mnt_xx 656288fe4dbSPoul-Henning Kamp ./write_mfs_in_kernel ${RD}/boot.${FSIMAGE}/kernel \ 657288fe4dbSPoul-Henning Kamp fs-image.${FSIMAGE} 658288fe4dbSPoul-Henning Kamp kzip -v ${RD}/boot.${FSIMAGE}/kernel 659d50a3007SJordan K. Hubbard @mv ${RD}/boot.${FSIMAGE}/kernel ${RD}/kernels/MFSKERNEL.${FSIMAGE} 660d50a3007SJordan K. Hubbard @mv ${RD}/boot.${FSIMAGE}/kernel.kz ${RD}/boot.${FSIMAGE}/kernel 661281e052eSJordan K. Hubbard @cp ${.CURDIR}/../sys/i386/boot/biosboot/boot.help ${RD}/boot.${FSIMAGE} 662281e052eSJordan K. Hubbard @touch ${RD}/boot.${FSIMAGE}/boot.config 663d50a3007SJordan K. Hubbard @rm -f ${RD}/floppies/boot${FSIMAGE}.flp 664b386088bSJordan K. Hubbard sh -e ${.CURDIR}/doFS.sh ${RD} ${MNT} ${FDSIZE} ${RD}/boot.${FSIMAGE} \ 665b386088bSJordan K. Hubbard ${BOOTINODE} ${FDLABEL} 666b386088bSJordan K. Hubbard mv fs-image ${RD}/floppies/boot${FSIMAGE}.flp 667288fe4dbSPoul-Henning Kamp 6682469b9a2SPoul-Henning Kamp.include <bsd.prog.mk> 669