From 65cc6f263f1a2599576bc6e45e50587f1df4f068 Mon Sep 17 00:00:00 2001 From: agc Date: Tue, 30 Mar 1999 09:46:27 +0000 Subject: Add an EXTRACT_USING_PAX definition, which, if defined, will use pax(1) to extract archives when building, rather than GNU tar. This is needed on platforms where GNU tar is not the standard version of tar, and by people who prefer to use pax(1) in general. --- mk/bsd.pkg.mk | 29 ++++++++++++++++++----------- mk/mk.conf.example | 6 +++++- 2 files changed, 23 insertions(+), 12 deletions(-) (limited to 'mk') diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index 634e097be94..ecb48da20b8 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.234 1999/03/30 00:47:01 hubertf Exp $ +# $NetBSD: bsd.pkg.mk,v 1.235 1999/03/30 09:46:27 agc Exp $ # # This file is in the public domain. # @@ -266,10 +266,10 @@ PATCH_ARGS+= -C PATCH_DIST_ARGS+= -C .endif -# Turn off pax on NetBSD for just now. pax is not bug-compatible with -# GNU tar yet, and some of the archives contain dross after the end of -# archive. tar ignores this, pax thinks it's valid, and asks for the -# second volume of the archive. +# If the archive has a .bz2 suffix, use bzip2 to extract information +# If EXTRACT_USING_PAX is defined, use pax in preference to (GNU) tar, +# and append 2 tar blocks of zero bytes on the end, in case the archive +# was written with a buggy version of GNU tar. EXTRACT_SUFX?= .tar.gz .if (${EXTRACT_SUFX} == ".tar.bz2") @@ -279,12 +279,17 @@ BZCAT= /usr/bin/bzcat BZCAT= ${LOCALBASE}/bin/bzcat BUILD_DEPENDS+= ${BZCAT}:${PKGSRCDIR}/archivers/bzip2 .endif # !exists bzcat -EXTRACT_CMD?= ${BZCAT} +EXTRACT_CMD?= ${EXTRACT_SUBSHELL_OPEN} ${BZCAT} EXTRACT_BEFORE_ARGS?= < -EXTRACT_AFTER_ARGS?= | /usr/bin/tar -xf - .else # suffix != .tar.bz2 -EXTRACT_CMD?= ${GTAR} -EXTRACT_BEFORE_ARGS?= -xzf +EXTRACT_CMD?= ${EXTRACT_SUBSHELL_OPEN} ${GZCAT} +EXTRACT_BEFORE_ARGS?= < +.if defined(EXTRACT_USING_PAX) +EXTRACT_SUBSHELL_OPEN= ( +EXTRACT_AFTER_ARGS?= ; dd if=/dev/zero bs=10k count=2 ) | ${PAX} -r +.else +EXTRACT_AFTER_ARGS?= | /usr/bin/tar -xf - +.endif # !pax .endif # suffix != .tar.bz2 # Figure out where the local mtree file is @@ -488,7 +493,7 @@ FILE?= /usr/bin/file GREP?= /usr/bin/grep GTAR?= ${LOCALBASE}/bin/gtar GUNZIP_CMD?= ${LOCALBASE}/bin/gunzip -f -GZCAT?= ${LOCALBASE}/bin/gzcat +GZCAT?= ${LOCALBASE}/bin/zcat GZIP?= -9 GZIP_CMD?= ${LOCALBASE}/bin/gzip -nf ${GZIP} ID?= /usr/xpg4/bin/id @@ -497,6 +502,7 @@ LDCONFIG?= /usr/bin/true LN?= /usr/bin/ln MKDIR?= /usr/bin/mkdir -p MV?= /usr/bin/mv +PAX?= /bin/pax RM?= /usr/bin/rm RMDIR?= /usr/bin/rmdir SED?= /usr/bin/sed @@ -530,6 +536,7 @@ LDCONFIG?= /sbin/ldconfig LN?= /bin/ln MKDIR?= /bin/mkdir -p MV?= /bin/mv +PAX?= /bin/pax RM?= /bin/rm RMDIR?= /bin/rmdir SED?= /usr/bin/sed @@ -630,7 +637,7 @@ PKGNAME?= ${DISTNAME} # should be backed out if this is bumped beyond 19990302. - HF PKGTOOLS_REQD= 19990119 -# Version of pkgtools which supported pkg_delete -O +# Version of pkgtools which support pkg_delete -O PKGTOOLS_PKGDB_VERSION= 19990302 # Check that we're using up-to-date pkg_* tools with this file. diff --git a/mk/mk.conf.example b/mk/mk.conf.example index 6c9b92fbd73..49595e22e87 100644 --- a/mk/mk.conf.example +++ b/mk/mk.conf.example @@ -1,4 +1,4 @@ -# $NetBSD: mk.conf.example,v 1.47 1999/03/03 22:38:49 hubertf Exp $ +# $NetBSD: mk.conf.example,v 1.48 1999/03/30 09:46:27 agc Exp $ # # Sample /etc/mk.conf file, which can be used to set specific values @@ -116,6 +116,10 @@ # Possible: set, not set # Default: not set +#EXTRACT_USING_PAX= yes # Use pax(1) to extract archives, rather than + # GNU tar. + # Possible: defined, not defined + # Default: not defined -- cgit v1.2.3