From owner-svn-src-stable@FreeBSD.ORG Tue Apr 8 00:53:32 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DCCA890A; Tue, 8 Apr 2014 00:53:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BCD9B19D8; Tue, 8 Apr 2014 00:53:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s380rWED016107; Tue, 8 Apr 2014 00:53:32 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s380rVas016103; Tue, 8 Apr 2014 00:53:31 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201404080053.s380rVas016103@svn.freebsd.org> From: Glen Barber Date: Tue, 8 Apr 2014 00:53:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264245 - in stable/10: release share/man/man7 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Apr 2014 00:53:32 -0000 Author: gjb Date: Tue Apr 8 00:53:31 2014 New Revision: 264245 URL: http://svnweb.freebsd.org/changeset/base/264245 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/10/release/Makefile stable/10/release/release.conf.sample stable/10/release/release.sh stable/10/share/man/man7/release.7 Directory Properties: stable/10/ (props changed) Modified: stable/10/release/Makefile ============================================================================== --- stable/10/release/Makefile Mon Apr 7 22:49:41 2014 (r264244) +++ stable/10/release/Makefile Tue Apr 8 00:53:31 2014 (r264245) @@ -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 . @@ -251,6 +259,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/10/release/release.conf.sample ============================================================================== --- stable/10/release/release.conf.sample Mon Apr 7 22:49:41 2014 (r264244) +++ stable/10/release/release.conf.sample Tue Apr 8 00:53:31 2014 (r264245) @@ -46,6 +46,7 @@ PORTBRANCH="ports/head@rHEAD" #NODOC= #NOPORTS= #WITH_DVD= +#WITH_COMPRESSED_IMAGES= ## Set when building embedded images. #EMBEDDEDBUILD= Modified: stable/10/release/release.sh ============================================================================== --- stable/10/release/release.sh Mon Apr 7 22:49:41 2014 (r264244) +++ stable/10/release/release.sh Tue Apr 8 00:53:31 2014 (r264245) @@ -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/10/share/man/man7/release.7 ============================================================================== --- stable/10/share/man/man7/release.7 Mon Apr 7 22:49:41 2014 (r264244) +++ stable/10/share/man/man7/release.7 Tue Apr 8 00:53:31 2014 (r264245) @@ -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