Date: Wed, 30 Dec 2015 13:12:54 +0000 (UTC) From: Glen Barber <gjb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r292940 - in stable/10: . release share/mk Message-ID: <201512301312.tBUDCsgZ077631@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: gjb Date: Wed Dec 30 13:12:54 2015 New Revision: 292940 URL: https://svnweb.freebsd.org/changeset/base/292940 Log: MFC r278449, r278926: r278449: Enable multi-threaded xz(1) compression for release install media. r278926 (rpaulo): Use xz(1) via pipe when compressing the release distribution tarballs. Tested on: stable/10@r292855 Sponsored by: The FreeBSD Foundation Modified: stable/10/Makefile.inc1 stable/10/release/Makefile stable/10/release/Makefile.vm stable/10/share/mk/bsd.own.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Wed Dec 30 12:51:43 2015 (r292939) +++ stable/10/Makefile.inc1 Wed Dec 30 13:12:54 2015 (r292940) @@ -913,13 +913,13 @@ packageworld: .for dist in base ${EXTRA_DISTRIBUTIONS} .if defined(NO_ROOT) ${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \ - tar cvJf ${DESTDIR}/${DISTDIR}/${dist}.txz \ - --exclude usr/lib/debug \ - @${DESTDIR}/${DISTDIR}/${dist}.meta + tar cvf - --exclude usr/lib/debug \ + @${DESTDIR}/${DISTDIR}/${dist}.meta | \ + ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/${dist}.txz .else ${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \ - tar cvJf ${DESTDIR}/${DISTDIR}/${dist}.txz \ - --exclude usr/lib/debug . + tar cvf - --exclude usr/lib/debug . | \ + ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/${dist}.txz .endif .endfor @@ -927,12 +927,12 @@ packageworld: . for dist in base ${EXTRA_DISTRIBUTIONS} . if defined(NO_ROOT) ${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \ - tar cvJf ${DESTDIR}/${DISTDIR}/${dist}.debug.txz \ - @${DESTDIR}/${DISTDIR}/${dist}.debug.meta + tar cvf - @${DESTDIR}/${DISTDIR}/${dist}.debug.meta | \ + ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/${dist}.debug.txz . else ${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \ - tar cvJfL ${DESTDIR}/${DISTDIR}/${dist}.debug.txz \ - usr/lib/debug + tar cvLf - usr/lib/debug | \ + ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/${dist}-debug.txz . endif . endfor .endif @@ -1141,19 +1141,21 @@ distributekernel distributekernel.debug: packagekernel: .if defined(NO_ROOT) cd ${DESTDIR}/${DISTDIR}/kernel; \ - tar cvJf ${DESTDIR}/${DISTDIR}/kernel.txz \ - @${DESTDIR}/${DISTDIR}/kernel.meta + tar cvf - @${DESTDIR}/${DISTDIR}/kernel.meta | \ + ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel.txz .for _kernel in ${BUILDKERNELS:S/${INSTALLKERNEL}//} cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \ - tar cvJf ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.txz \ - @${DESTDIR}/${DISTDIR}/kernel.${_kernel}.meta + tar cvf - @${DESTDIR}/${DISTDIR}/kernel.${_kernel}.meta | \ + ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.txz .endfor .else cd ${DESTDIR}/${DISTDIR}/kernel; \ - tar cvJf ${DESTDIR}/${DISTDIR}/kernel.txz . + tar cvf - . | \ + ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel.txz .for _kernel in ${BUILDKERNELS:S/${INSTALLKERNEL}//} cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \ - tar cvJf ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.txz . + tar cvf - . | \ + ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.txz .endfor .endif Modified: stable/10/release/Makefile ============================================================================== --- stable/10/release/Makefile Wed Dec 30 12:51:43 2015 (r292939) +++ stable/10/release/Makefile Wed Dec 30 13:12:54 2015 (r292940) @@ -40,7 +40,6 @@ 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} @@ -161,16 +160,18 @@ kernel.txz: src.txz: mkdir -p ${DISTDIR}/usr ln -fs ${WORLDDIR} ${DISTDIR}/usr/src - cd ${DISTDIR} && tar cLvJf ${.OBJDIR}/src.txz --exclude .svn --exclude .zfs \ - --exclude .git --exclude @ --exclude usr/src/release/dist usr/src + cd ${DISTDIR} && tar cLvf - --exclude .svn --exclude .zfs \ + --exclude .git --exclude @ --exclude usr/src/release/dist usr/src | \ + ${XZ_CMD} > ${.OBJDIR}/src.txz ports.txz: mkdir -p ${DISTDIR}/usr ln -fs ${PORTSDIR} ${DISTDIR}/usr/ports - cd ${DISTDIR} && tar cLvJf ${.OBJDIR}/ports.txz \ + cd ${DISTDIR} && tar cLvf - \ --exclude .git --exclude .svn \ --exclude usr/ports/distfiles --exclude usr/ports/packages \ - --exclude 'usr/ports/INDEX*' --exclude work usr/ports + --exclude 'usr/ports/INDEX*' --exclude work usr/ports | \ + ${XZ_CMD} > ${.OBJDIR}/ports.txz reldoc: cd ${.CURDIR}/doc && ${MAKE} all install clean 'FORMATS=html txt' \ @@ -333,7 +334,7 @@ release-install: .for I in ${IMAGES} cp -p ${I} ${DESTDIR}/${OSRELEASE}-${I} . if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES) - ${XZCMD} -k ${DESTDIR}/${OSRELEASE}-${I} + ${XZ_CMD} -k ${DESTDIR}/${OSRELEASE}-${I} . endif .endfor cd ${DESTDIR} && sha512 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA512 Modified: stable/10/release/Makefile.vm ============================================================================== --- stable/10/release/Makefile.vm Wed Dec 30 12:51:43 2015 (r292939) +++ stable/10/release/Makefile.vm Wed Dec 30 13:12:54 2015 (r292940) @@ -137,7 +137,7 @@ vm-install: . if defined(WITH_COMPRESSED_VMIMAGES) && !empty(WITH_COMPRESSED_VMIMAGES) . for FORMAT in ${VMFORMATS} # Don't keep the originals. There is a copy in ${.OBJDIR} if needed. - ${XZCMD} ${DESTDIR}/vmimages/${OSRELEASE}.${FORMAT} + ${XZ_CMD} ${DESTDIR}/vmimages/${OSRELEASE}.${FORMAT} . endfor . endif cd ${DESTDIR}/vmimages && sha512 ${OSRELEASE}* > \ Modified: stable/10/share/mk/bsd.own.mk ============================================================================== --- stable/10/share/mk/bsd.own.mk Wed Dec 30 12:51:43 2015 (r292939) +++ stable/10/share/mk/bsd.own.mk Wed Dec 30 13:12:54 2015 (r292940) @@ -213,6 +213,15 @@ STRIP?= -s COMPRESS_CMD?= gzip -cn COMPRESS_EXT?= .gz +# Set XZ_THREADS to 1 to disable multi-threading. +XZ_THREADS?= 0 + +.if !empty(XZ_THREADS) +XZ_CMD?= xz -T ${XZ_THREADS} +.else +XZ_CMD?= xz +.endif + .if !defined(_WITHOUT_SRCCONF) # # Define MK_* variables (which are either "yes" or "no") for users
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512301312.tBUDCsgZ077631>