svn commit: r264246 - in stable/9: release share/man/man7

Glen Barber gjb at FreeBSD.org
Tue Apr 8 00:54:13 UTC 2014


Author: gjb
Date: Tue Apr  8 00:54:11 2014
New Revision: 264246
URL: http://svnweb.freebsd.org/changeset/base/264246

Log:
  MFC r264027, r264028, r264029, r264030, r264046, r264073:
  
  r264027:
    Add a new release build variable, WITH_COMPRESSED_IMAGES.
  
    When set to a non-empty value, the installation medium is
    compressed as part of the 'install' target in the release/
    directory.
  
  r264028:
    Clean up trailing whitespace in release/Makefile.
  
  r264029:
    Fix logic error.
  
  r264030:
    If WITH_COMPRESSED_IMAGES is set, add the compressed images
    to the CLEANFILES list.
  
  r264046:
    Use xz(1) instead of gzip(1) to compress release images
    when WITH_COMPRESSED_IMAGES is used.
  
  r264073:
    Allow overriding xz(1) path.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/9/release/Makefile
  stable/9/release/release.conf.sample
  stable/9/release/release.sh
  stable/9/share/man/man7/release.7
Directory Properties:
  stable/9/release/   (props changed)
  stable/9/share/man/man7/   (props changed)

Modified: stable/9/release/Makefile
==============================================================================
--- stable/9/release/Makefile	Tue Apr  8 00:53:31 2014	(r264245)
+++ stable/9/release/Makefile	Tue Apr  8 00:54:11 2014	(r264246)
@@ -1,7 +1,7 @@
 # $FreeBSD$
 #
 # Makefile for building releases and release media.
-# 
+#
 # User-driven targets:
 #  cdrom: Builds release CD-ROM media (disc1.iso)
 #  dvdrom: Builds release DVD-ROM media (dvd1.iso)
@@ -13,7 +13,7 @@
 #
 # Variables affecting the build process:
 #  WORLDDIR: location of src tree -- must have built world and default kernel
-#            (by default, the directory above this one) 
+#            (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)
 #  NOPKG:    if set, do not distribute third-party packages
@@ -21,13 +21,16 @@
 #  NOSRC:    if set, do not distribute source tree
 #  NODOC:    if set, do not generate release documentation
 #  WITH_DVD: if set, generate dvd1.iso
-#  TARGET/TARGET_ARCH: architecture of built release 
+#  WITH_COMPRESSED_IMAGES: if set, compress installation images with xz(1)
+#		(uncompressed images are not removed)
+#  TARGET/TARGET_ARCH: architecture of built release
 #
 
 WORLDDIR?=	${.CURDIR}/..
 PORTSDIR?=	/usr/ports
 DOCDIR?=	/usr/doc
 RELNOTES_LANG?= en_US.ISO8859-1
+XZCMD?=		/usr/bin/xz
 
 .if !defined(TARGET) || empty(TARGET)
 TARGET=		${MACHINE}
@@ -63,7 +66,7 @@ NODOC= true
 NOPORTS= true
 .endif
 
-EXTRA_PACKAGES= 
+EXTRA_PACKAGES=
 .if !defined(NOPORTS)
 EXTRA_PACKAGES+= ports.txz
 .endif
@@ -92,6 +95,11 @@ IMAGES+=	mini-memstick.img
 .endif
 
 CLEANFILES=	packagesystem *.txz MANIFEST system ${IMAGES}
+.if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES)
+. for I in ${IMAGES}
+CLEANFILES+=	${I}.xz
+. endfor
+.endif
 CLEANDIRS=	dist ftp release bootonly dvd
 beforeclean:
 	chflags -R noschg .
@@ -260,6 +268,9 @@ install:
 	cp -a ftp ${DESTDIR}/
 .for I in ${IMAGES}
 	cp -p ${I} ${DESTDIR}/${OSRELEASE}-${I}
+. if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES)
+	${XZCMD} -k ${DESTDIR}/${OSRELEASE}-${I}
+. endif
 .endfor
 	cd ${DESTDIR} && sha256 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA256
 	cd ${DESTDIR} && md5 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.MD5

Modified: stable/9/release/release.conf.sample
==============================================================================
--- stable/9/release/release.conf.sample	Tue Apr  8 00:53:31 2014	(r264245)
+++ stable/9/release/release.conf.sample	Tue Apr  8 00:54:11 2014	(r264246)
@@ -46,6 +46,7 @@ PORTBRANCH="ports/head at rHEAD"
 #NODOC=
 #NOPORTS=
 #WITH_DVD=
+#WITH_COMPRESSED_IMAGES=
 
 ## Set when building embedded images.
 #EMBEDDEDBUILD=

Modified: stable/9/release/release.sh
==============================================================================
--- stable/9/release/release.sh	Tue Apr  8 00:53:31 2014	(r264245)
+++ stable/9/release/release.sh	Tue Apr  8 00:54:11 2014	(r264246)
@@ -83,6 +83,7 @@ NOPORTS=
 
 # Set to non-empty value to build dvd1.iso as part of the release.
 WITH_DVD=
+WITH_COMPRESSED_IMAGES=
 
 usage() {
 	echo "Usage: $0 [-c release.conf]"
@@ -128,6 +129,7 @@ if [ -n "${EMBEDDEDBUILD}" ]; then
 		exit 1
 	fi
 	WITH_DVD=
+	WITH_COMPRESSED_IMAGES=
 	NODOC=yes
 fi
 
@@ -262,4 +264,4 @@ eval chroot ${CHROOTDIR} make -C /usr/sr
 eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \
 	release
 eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \
-	install DESTDIR=/R
+	install DESTDIR=/R WITH_COMPRESSED_IMAGES=${WITH_COMPRESSED_IMAGES}

Modified: stable/9/share/man/man7/release.7
==============================================================================
--- stable/9/share/man/man7/release.7	Tue Apr  8 00:53:31 2014	(r264245)
+++ stable/9/share/man/man7/release.7	Tue Apr  8 00:54:11 2014	(r264246)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 5, 2014
+.Dd April 2, 2014
 .Dt RELEASE 7
 .Os
 .Sh NAME
@@ -250,6 +250,12 @@ Setting this also sets
 Set to a non-empty value to include the
 .Cm dvdrom
 target.
+.It Va WITH_COMPRESSED_IMAGES
+Set to a non-empty value to compress the release images with
+.Xr xz 1 .
+The original
+.Pq uncompressed
+images are not removed.
 .It Va VCSCMD
 The command run to obtain the source trees.
 Defaults to


More information about the svn-src-all mailing list