From: Jeremie Courreges-Anglas Subject: Switch tar(1) to use pax as default write format (Was: Re: tar(1) write format selection) To: tech@openbsd.org Cc: millert@openbsd.org Date: Tue, 16 Apr 2024 13:16:17 +0200 On Mon, Apr 15, 2024 at 07:48:22PM +0200, Jeremie Courreges-Anglas wrote: > > One drawback of switching tar(1) to use 'pax' write format by default > is that tar(1) doesn't give the user a generic way to specify a format > (-o and -O suck). So the diff below uses -F for that. GNU tar uses > -H (already used) and FreeBSD/NetBSD tar use --format and we don't > want long options. I'd like to move fast and switch the default in tar(1) as soon as tar(1) provides the user with an option to go back to ustar if really needed. I hope people are fine with that. The diff below is stacked on the previous. Reviews and oks welcome for both. Index: options.c =================================================================== --- options.c.orig 2024-04-16 00:22:04.099000958 +0100 +++ options.c 2024-04-16 00:22:52.969076981 +0100 @@ -237,11 +237,10 @@ #define F_ACPIO 1 /* format when called as cpio -c */ #define F_CPIO 3 /* format when called as cpio */ #define F_OTAR 4 /* format when called as tar -o */ -#define F_TAR 5 /* format when called as tar */ #ifdef SMALL -# define DEFLT 5 /* default write format when called as pax: ustar */ +# define F_TAR 5 /* format when called as tar: ustar */ #else -# define DEFLT 10 /* default write format when called as pax: pax */ +# define F_TAR 10 /* format when called as tar: pax */ #endif /* Index: tar.1 =================================================================== --- tar.1.orig 2024-04-16 00:21:27.659000112 +0100 +++ tar.1 2024-04-16 00:22:04.108999959 +0100 @@ -144,7 +144,7 @@ Stop after the first error. .It Fl F Ar format Specify the output archive format, with the default format being -.Cm ustar . +.Cm pax . .Nm currently supports the following formats: .Bl -tag -width "sv4cpio" -- jca