svn commit: r184137 - in stable/7/release: . scripts

Ken Smith kensmith at FreeBSD.org
Tue Oct 21 19:42:57 UTC 2008


Author: kensmith
Date: Tue Oct 21 19:42:56 2008
New Revision: 184137
URL: http://svn.freebsd.org/changeset/base/184137

Log:
  MFC r183771 and r183860:
  
  r183771:
    Add a build knob MAKE_DVD to control on a per-architecture basis whether
    or not to build a tree used for the creation of a DVD image.  If that is
    enabled set up a DVD tree by installing everything we normally install
    to the individual CDROM trees into the one DVD tree.  The result is one
    image with all the install bits, livefs bits, and doc bits suitable for
    burning to a DVD instead of CDROM.
  
    Enable building the DVD for amd64 and i386.
  
  r183860:
    The thought of making more than one DVD image for a release really
    freaks me out.  But it turns out we might be able to generalize
    a few of the other things RE uses to assemble the package trees
    for releases if the DVDs use a naming theme close to what is used
    for the CDROMS (disc1, disc2, etc).  So change the name to dvd1.
    Hopefully this way src/release/scripts/{package-split.py,package-trees.sh}
    can be generalized instead of copied-and-hacked.
  
  Approved by:	re (kib)

Modified:
  stable/7/release/   (props changed)
  stable/7/release/Makefile
  stable/7/release/scripts/src-install.sh   (props changed)

Modified: stable/7/release/Makefile
==============================================================================
--- stable/7/release/Makefile	Tue Oct 21 18:52:38 2008	(r184136)
+++ stable/7/release/Makefile	Tue Oct 21 19:42:56 2008	(r184137)
@@ -192,6 +192,7 @@ MNT=			/mnt
 .undef MAKE_FLOPPIES
 .if ${TARGET_ARCH} == "i386"
 MAKE_FLOPPIES=		true
+MAKE_DVD=
 SEPARATE_LIVEFS=
 SPLIT_MFSROOT=
 .if ${TARGET} == "pc98"
@@ -221,6 +222,7 @@ MFSLABEL=		auto
 SEPARATE_LIVEFS=
 .elif ${TARGET_ARCH} == "amd64"
 MAKE_FLOPPIES=		true
+MAKE_DVD=
 FLOPPYSIZE=		1440
 FLOPPYSPLITSIZE=	1392
 FLOPPYINODE=		40000
@@ -261,6 +263,9 @@ CD_BOOT=		${CD}/bootonly
 CD_DISC1=		${CD}/disc1
 CD_DISC2=		${CD}/disc2
 CD_DISC3=		${CD}/disc3
+.if defined(MAKE_DVD)
+CD_DVD1=		${CD}/dvd1
+.endif
 .if !defined(NODOC)
 CD_DOCS=		${CD}/docs
 .endif
@@ -479,6 +484,7 @@ release rerelease:
 	KERNELS \
 	KERNELS_BASE \
 	KERNEL_FLAGS \
+	MAKE_DVD \
 	MAKE_FLOPPIES \
 	MAKE_ISOS \
 	NOCDROM \
@@ -924,6 +930,18 @@ cdrom.1:
 			    find . -depth -print | cpio -dumpl ${CD_LIVEFS} ) ; \
 		fi \
 	done
+.if defined(MAKE_DVD)
+	@echo "Building DVD filesystem image as well as CDROM"
+	@mkdir -p ${CD_DVD1}/${BUILDNAME}
+	@for i in ${DISTRIBUTIONS} ; \
+	do \
+		if [ -d ${RD}/trees/$${i} ] ; then \
+			chflags -R noschg ${RD}/trees/$${i} || true ; \
+			( cd ${RD}/trees/$${i} && \
+			    find . -depth -print | cpio -dumpl ${CD_DVD1} ) ; \
+		fi \
+	done
+.endif
 	@echo "Copy GENERIC kernel to boot area"
 	@cp -Rp ${RD}/kernels/GENERIC/ ${CD_LIVEFS}/boot/kernel
 	@rm -f ${CD_LIVEFS}/boot/kernel/*.symbols
@@ -941,7 +959,24 @@ cdrom.1:
 	@rm -f ${CD_LIVEFS}/boot/device.hints
 	@cp ${RD}/trees/base/boot/device.hints ${CD_LIVEFS}/boot/device.hints
 .endif
+.if defined(MAKE_DVD)
+	@cp -Rp ${RD}/kernels/GENERIC/ ${CD_DVD1}/boot/kernel
+	@rm -f ${CD_DVD1}/boot/kernel/*.symbols
+	@rm -f ${CD_DVD1}/.profile
+	@cp ${.CURDIR}/fixit.profile ${CD_DVD1}/.profile
+	@ln -sf /rescue ${CD_DVD1}/stand
 	@echo "CD_VERSION = ${BUILDNAME}" > ${CD_LIVEFS}/cdrom.inf
+	@echo "CD_VERSION = ${BUILDNAME}" > ${CD_DVD1}/cdrom.inf
+	@rm -f ${CD_DVD1}/boot/loader.conf
+	@cp ${RD}/mfsroot/mfsroot.gz ${CD_DVD1}/boot/mfsroot.gz
+	@echo 'mfsroot_load="YES"' > ${CD_DVD1}/boot/loader.conf
+	@echo 'mfsroot_type="mfs_root"' >> ${CD_DVD1}/boot/loader.conf
+	@echo 'mfsroot_name="/boot/mfsroot"' >> ${CD_DVD1}/boot/loader.conf
+.if exists(${RD}/trees/base/boot/device.hints)
+	@rm -f ${CD_DVD1}/boot/device.hints
+	@cp ${RD}/trees/base/boot/device.hints ${CD_DVD1}/boot/device.hints
+.endif
+.endif
 	touch ${.TARGET}
 
 # Build disc1, disc2 and disc3 cdrom images
@@ -980,11 +1015,37 @@ cdrom.2:
 	@mkdir -p ${CD_DISC3}
 	@echo "CD_VERSION = ${BUILDNAME}" > ${CD_DISC3}/cdrom.inf
 	@echo "CD_VOLUME = 3" >> ${CD_DISC3}/cdrom.inf
+.if defined(MAKE_DVD)
+.if defined(MAKE_FLOPPIES)
+	@cd ${RD} && find floppies -print | cpio -dumpl ${CD_DVD1}
+.endif
+	@cd ${RD}/dists && find . -print | cpio -dumpl ${CD_DVD1}/${BUILDNAME}
+.if !defined(NODOC)
+	@for i in ${DIST_DOCS_ARCH_INDEP}; do \
+	  cp ${RND}/${RELNOTES_LANG}/$$i/article.txt \
+	      ${CD_DVD1}/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \
+	  cp ${RND}/${RELNOTES_LANG}/$$i/article.html \
+	      ${CD_DVD1}/`echo $${i} | tr 'a-z' 'A-Z'`.HTM; \
+	done
+	@for i in ${DIST_DOCS_ARCH_DEP}; do \
+	  cp ${RND}/${RELNOTES_LANG}/$$i/${TARGET}/article.txt \
+	      ${CD_DVD1}/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \
+	  cp ${RND}/${RELNOTES_LANG}/$$i/${TARGET}/article.html \
+	      ${CD_DVD1}/`echo $${i} | tr 'a-z' 'A-Z'`.HTM; \
+	done
+	@cp ${RND}/${RELNOTES_LANG}/readme/docbook.css ${CD_DVD1}
+.endif
+	@echo "CD_VERSION = ${BUILDNAME}" > ${CD_DVD1}/cdrom.inf
+	@echo "CD_VOLUME = 1" >> ${CD_DVD1}/cdrom.inf
+.endif
 .if !defined(NODOC)
 	echo "Building CDROM docs filesystem image"
 	@mkdir -p ${CD_DOCS}
 	@echo "CD_VERSION = ${BUILDNAME}" > ${CD_DOCS}/cdrom.inf
 	@mkdir -p ${CD_DOCS}/usr/share/doc
+.if defined(MAKE_DVD)
+	@mkdir -p ${CD_DVD1}/usr/share/doc
+.endif
 	@for i in `ls ${CD_LIVEFS}/usr/share/doc`; do \
 		if [ -L ${CD_LIVEFS}/usr/share/doc/$$i -o \
 		    -d /usr/doc/$$i ]; then \
@@ -992,6 +1053,10 @@ cdrom.2:
 			    ${CD_DOCS}/usr/share/doc; \
 		fi \
 	done
+.if defined(MAKE_DVD)
+	@cd ${CD_DOCS}/usr/share/doc && find . -print | \
+	    cpio -dumpl ${CD_DVD1}/usr/share/doc
+.endif
 .endif
 	touch ${.TARGET}
 
@@ -1025,6 +1090,9 @@ CD_DISC2_PKGS=	${CD_PACKAGE_TREE}/disc2
 .if exists(${CD_PACKAGE_TREE}/disc3)
 CD_DISC3_PKGS=	${CD_PACKAGE_TREE}/disc3
 .endif
+.if exists(${CD_PACKAGE_TREE}/dvd1)
+CD_DVD_PKGS=	${CD_PACKAGE_TREE}/dvd1
+.endif
 .endif
 .endif
 
@@ -1048,6 +1116,12 @@ iso.1:
 	    FreeBSD_Packages_2 \
 	    ${CD}/${BUILDNAME}-${TARGET}-disc3.iso ${CD_DISC3} \
 	    ${CD_DISC3_PKGS}
+.if defined(MAKE_DVD)
+	@sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh ${BOOTABLE} \
+	    FreeBSD_Install \
+	    ${CD}/${BUILDNAME}-${TARGET}-dvd1.iso ${CD_DVD1} \
+	    ${CD_DVD1_PKGS}
+.endif
 .if !defined(NODOC)
 	@sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh \
 	    FreeBSD_Documentation \


More information about the svn-src-stable-7 mailing list