From nobody Fri Jul 15 22:18:05 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ll5Mx5FYzz4WnBh; Fri, 15 Jul 2022 22:18:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ll5Mx4lnmz41xc; Fri, 15 Jul 2022 22:18:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657923485; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UzszUl8pJLN8Vb3hJywKwD/pV82vrdZ1SqX4VRtJ+FI=; b=aRgwj+PaTquPv/s8lDUcCnj/HZ4SyQYprhMMgxLCtIINIClflfR28FBNDVLfS3qp6YZaQ7 0N3zqf3UqhDj+3oq+epib9LKrZEQpQj7cYeXlb8G0bBOyENhah5yqRCSbjJ+3cRrNK/8bM YmND/TWPCu5TlepQtBAQOztCoisxtILJvosBZ6IX/ybqRUZTt5zgwSks8vBP6zKLJOmZAO MWu9QJyMPpvWIDZBe5ZqTDshgq0Hr/GttlB/ljQvK6Ca/exJGRHKK7etTs/+IWdu4LWXFH awxbRoK5GsH3ugYqlntyzuGpSMayZyz8rdiTnO9NxigSZNOu6lHbwjlD9YEg2w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ll5Mx3snFzyQb; Fri, 15 Jul 2022 22:18:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 26FMI5x7099928; Fri, 15 Jul 2022 22:18:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26FMI5FS099927; Fri, 15 Jul 2022 22:18:05 GMT (envelope-from git) Date: Fri, 15 Jul 2022 22:18:05 GMT Message-Id: <202207152218.26FMI5FS099927@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: fcf120815897 - main - Makefile.inc1 release bsd.own.mk: Introduce and use TAR_CMD List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fcf1208158973279c6410c1d24233ae8dfaedf91 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657923485; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UzszUl8pJLN8Vb3hJywKwD/pV82vrdZ1SqX4VRtJ+FI=; b=qO4yn+p07sGrPf4/45zLhbj/gzagudKuzqEHWC/hzhiooIFo1lXAlVJci4djX3R2Cakt5e HFIts3KktwgkT9PxAKTs3atf4G+3IOFb3jPS5LWpxYxxQ6+/BvJHFoBrjr1BESp1Kwp9C3 +CsMIDObGfAE4SNC/caDw0PkMn4QNCMnF1eAvVDaFbdD+IdhU3POqvLodR3i8sg11uIdZr hOWmKb4thwwGujvTulH3C8ZZ1fb+HeF7hxSU5o0jVMCgzbbqRh+nAH4g1IVFOsggZzgYRL CbZP0Z8ryu23kH/zt5mxY1SIZ6RED5Qd+I9KYAPONhdhACRT/m0DfumqMs6xcA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1657923485; a=rsa-sha256; cv=none; b=wyWgcSM9cYGDr072f1c2puoqDKoqhuuBei1mhYHZ8nPtualEDtg/hq/H9U8JaQm6FnCEZr +DJkOJI4vuM0PsPbjqSK+lwsYrxl4kbsXxyeVmG9wIhniwZ5crBgLgBCtL/eYmtumu28K9 p2Uiz+uuyMtYsAsbfBnlzkkoZHmVdHtVzRMWg6StIdmVwk2H08y3NkbeEB0Z12KuSqY73k jX30ZkXfOuZfeGgT81CzpNckLhXVU9LPjQG7BudTwtUedXBr1MfuJHRzzUdGjfZWIzg6+e 4iPVVE/ufEnTK/ukBQMMuqfWjhw5VNCv2sFtlQo52z2tXMIpADW50wB7U5+SaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=fcf1208158973279c6410c1d24233ae8dfaedf91 commit fcf1208158973279c6410c1d24233ae8dfaedf91 Author: Jessica Clarke AuthorDate: 2022-07-15 22:04:34 +0000 Commit: Jessica Clarke CommitDate: 2022-07-15 22:04:34 +0000 Makefile.inc1 release bsd.own.mk: Introduce and use TAR_CMD Our uses of tar rely on BSDisms, and so do not work in environments where GNU tar is the default tar. Providing a TAR_CMD variable like some other commands allows it to be overridden to use bsdtar in such cases. Reviewed by: brooks, delphij, gjb Obtained from: CheriBSD Differential Revision: https://reviews.freebsd.org/D35813 --- Makefile.inc1 | 24 ++++++++++++------------ release/Makefile | 4 ++-- share/mk/bsd.own.mk | 2 ++ 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index b9691017a1ab..98cb357946f7 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1491,12 +1491,12 @@ packageworld: .PHONY .for dist in base ${EXTRA_DISTRIBUTIONS} .if defined(NO_ROOT) ${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \ - tar cvf - --exclude usr/lib/debug \ + ${TAR_CMD} cvf - --exclude usr/lib/debug \ @${DESTDIR}/${DISTDIR}/${dist}.meta | \ ${XZ_CMD} > ${PACKAGEDIR}/${dist}.txz .else ${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \ - tar cvf - --exclude usr/lib/debug . | \ + ${TAR_CMD} cvf - --exclude usr/lib/debug . | \ ${XZ_CMD} > ${PACKAGEDIR}/${dist}.txz .endif .endfor @@ -1504,11 +1504,11 @@ packageworld: .PHONY .for dist in ${DEBUG_DISTRIBUTIONS} . if defined(NO_ROOT) ${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \ - tar cvf - @${DESTDIR}/${DISTDIR}/${dist}.debug.meta | \ + ${TAR_CMD} cvf - @${DESTDIR}/${DISTDIR}/${dist}.debug.meta | \ ${XZ_CMD} > ${PACKAGEDIR}/${dist}-dbg.txz . else ${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \ - tar cvLf - usr/lib/debug | \ + ${TAR_CMD} cvLf - usr/lib/debug | \ ${XZ_CMD} > ${PACKAGEDIR}/${dist}-dbg.txz . endif .endfor @@ -1827,25 +1827,25 @@ packagekernel: .PHONY .if defined(NO_ROOT) .if !defined(NO_INSTALLKERNEL) cd ${DESTDIR}/${DISTDIR}/kernel; \ - tar cvf - --exclude '*.debug' \ + ${TAR_CMD} cvf - --exclude '*.debug' \ @${DESTDIR}/${DISTDIR}/kernel.meta | \ ${XZ_CMD} > ${PACKAGEDIR}/kernel.txz .endif .if ${MK_DEBUG_FILES} != "no" cd ${DESTDIR}/${DISTDIR}/kernel; \ - tar cvf - --include '*/*/*.debug' \ + ${TAR_CMD} cvf - --include '*/*/*.debug' \ @${DESTDIR}/${DISTDIR}/kernel.meta | \ ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel-dbg.txz .endif .if ${BUILDKERNELS:[#]} > 1 && ${NO_INSTALLEXTRAKERNELS} != "yes" .for _kernel in ${BUILDKERNELS:[2..-1]} cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \ - tar cvf - --exclude '*.debug' \ + ${TAR_CMD} cvf - --exclude '*.debug' \ @${DESTDIR}/${DISTDIR}/kernel.${_kernel}.meta | \ ${XZ_CMD} > ${PACKAGEDIR}/kernel.${_kernel}.txz .if ${MK_DEBUG_FILES} != "no" cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \ - tar cvf - --include '*/*/*.debug' \ + ${TAR_CMD} cvf - --include '*/*/*.debug' \ @${DESTDIR}/${DISTDIR}/kernel.${_kernel}.meta | \ ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel.${_kernel}-dbg.txz .endif @@ -1854,22 +1854,22 @@ packagekernel: .PHONY .else .if !defined(NO_INSTALLKERNEL) cd ${DESTDIR}/${DISTDIR}/kernel; \ - tar cvf - --exclude '*.debug' . | \ + ${TAR_CMD} cvf - --exclude '*.debug' . | \ ${XZ_CMD} > ${PACKAGEDIR}/kernel.txz .endif .if ${MK_DEBUG_FILES} != "no" cd ${DESTDIR}/${DISTDIR}/kernel; \ - tar cvf - --include '*/*/*.debug' $$(eval find .) | \ + ${TAR_CMD} cvf - --include '*/*/*.debug' $$(eval find .) | \ ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel-dbg.txz .endif .if ${BUILDKERNELS:[#]} > 1 && ${NO_INSTALLEXTRAKERNELS} != "yes" .for _kernel in ${BUILDKERNELS:[2..-1]} cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \ - tar cvf - --exclude '*.debug' . | \ + ${TAR_CMD} cvf - --exclude '*.debug' . | \ ${XZ_CMD} > ${PACKAGEDIR}/kernel.${_kernel}.txz .if ${MK_DEBUG_FILES} != "no" cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \ - tar cvf - --include '*/*/*.debug' $$(eval find .) | \ + ${TAR_CMD} cvf - --include '*/*/*.debug' $$(eval find .) | \ ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel.${_kernel}-dbg.txz .endif .endfor diff --git a/release/Makefile b/release/Makefile index db9cc6b22cbe..6f250e0fc9ca 100644 --- a/release/Makefile +++ b/release/Makefile @@ -138,14 +138,14 @@ kernel.txz: src.txz: mkdir -p ${DISTDIR}/usr ln -fs ${WORLDDIR} ${DISTDIR}/usr/src - cd ${DISTDIR} && tar cLvf - --exclude .svn --exclude .zfs \ + cd ${DISTDIR} && ${TAR_CMD} 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 cLvf - \ + cd ${DISTDIR} && ${TAR_CMD} cLvf - \ --exclude .git --exclude .svn \ --exclude usr/ports/distfiles --exclude usr/ports/packages \ --exclude 'usr/ports/INDEX*' --exclude work usr/ports | \ diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index 09d7dfbd25c8..a4a407ac8b6a 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -265,6 +265,8 @@ INSTALL_RSYMLINK?= ${INSTALL} ${RSYMLINK} STRIP?= -s .endif +TAR_CMD?= tar + COMPRESS_CMD?= gzip -cn COMPRESS_EXT?= .gz