Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 May 2025 13:06:42 GMT
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: a28f7eb863d5 - main - release: Avoid pipe in tarball creation
Message-ID:  <202505251306.54PD6gCV071110@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=a28f7eb863d52140088c4956797d97a207ac7e6e

commit a28f7eb863d52140088c4956797d97a207ac7e6e
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2025-05-22 18:52:34 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2025-05-25 01:00:41 +0000

    release: Avoid pipe in tarball creation
    
    Previously errors from invoking tar for src.txz or ports.txz were eaten
    by the pipeline.  If something fails in creating these tarballs we want
    the build to fail rather than producing subtly broken artifacts.  Use
    ${TAR_XZ_CMD} to add -J to tar's commandline rather than | xz.
    
    Reviewed by:    bz
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D50459
---
 release/Makefile | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/release/Makefile b/release/Makefile
index a5f5b65a562e..cf941534995b 100644
--- a/release/Makefile
+++ b/release/Makefile
@@ -158,19 +158,18 @@ kernel.txz:
 src.txz:
 	mkdir -p ${DISTDIR}/usr
 	ln -fs ${WORLDDIR} ${DISTDIR}/usr/src
-	( cd ${DISTDIR} && ${TAR_CMD} cLvf - --exclude .svn --exclude .zfs \
+	( cd ${DISTDIR} && ${TAR_XZ_CMD} -cLvf ${.OBJDIR}/src.txz \
+	    --exclude .svn --exclude .zfs \
 	    --exclude .git --exclude @ --exclude usr/src/release/dist \
-	    --exclude usr/src/release/obj usr/src | \
-	    ${XZ_CMD} > ${.OBJDIR}/src.txz )
+	    --exclude usr/src/release/obj usr/src )
 
 ports.txz:
 	mkdir -p ${DISTDIR}/usr
 	ln -fs ${PORTSDIR} ${DISTDIR}/usr/ports
-	( cd ${DISTDIR} && ${TAR_CMD} cLvf - \
+	( cd ${DISTDIR} && ${TAR_XZ_CMD} -cLvf ${.OBJDIR}/ports.txz \
 	    --exclude .git --exclude .svn \
 	    --exclude usr/ports/distfiles --exclude usr/ports/packages \
-	    --exclude 'usr/ports/INDEX*' --exclude work usr/ports | \
-	    ${XZ_CMD} > ${.OBJDIR}/ports.txz )
+	    --exclude 'usr/ports/INDEX*' --exclude work usr/ports )
 
 .if defined(PKGBASE)
 PKGBASE_REPO=	pkgbase-repo



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202505251306.54PD6gCV071110>