summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJeremie Courreges-Anglas <jca@cvs.openbsd.org>2024-04-16 23:09:36 +0000
committerJeremie Courreges-Anglas <jca@cvs.openbsd.org>2024-04-16 23:09:36 +0000
commit20a712f8321dd5127faac91703214bba18d32ebc (patch)
tree8838f6b2d3fe00b4f4ffa89892c2daf7d81121cd /bin
parentdeb161def57ff2244ad3e689b4e228823cd66df6 (diff)
Switch tar(1) write default format to 'pax'
Lets us store longer file names, link names, finer grained timestamps, larger archive member files, etc; at the expense of larger uncompressed archives and less widespread support across the ecosystem. If you're unhappy with the new defaults, you can use -F ustar. Or you can help fix bugs / find a better middle ground. Prodding from various including job@ and deraadt@ ok sthen@ caspar@ millert@
Diffstat (limited to 'bin')
-rw-r--r--bin/pax/options.c5
-rw-r--r--bin/pax/tar.14
2 files changed, 5 insertions, 4 deletions
diff --git a/bin/pax/options.c b/bin/pax/options.c
index 10cafec30a8..54c6b3050ec 100644
--- a/bin/pax/options.c
+++ b/bin/pax/options.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: options.c,v 1.111 2024/04/16 19:04:11 jca Exp $ */
+/* $OpenBSD: options.c,v 1.112 2024/04/16 23:09:35 jca Exp $ */
/* $NetBSD: options.c,v 1.6 1996/03/26 23:54:18 mrg Exp $ */
/*-
@@ -237,10 +237,11 @@ FSUB fsub[] = {
#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 F_TAR 5 /* default write format when called as tar: ustar */
# define DEFLT 5 /* default write format when called as pax: ustar */
#else
+# define F_TAR 10 /* default write format when called as tar: ustar */
# define DEFLT 10 /* default write format when called as pax: pax */
#endif
diff --git a/bin/pax/tar.1 b/bin/pax/tar.1
index df7bd807d9d..9e4906a8375 100644
--- a/bin/pax/tar.1
+++ b/bin/pax/tar.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: tar.1,v 1.66 2024/04/16 19:04:11 jca Exp $
+.\" $OpenBSD: tar.1,v 1.67 2024/04/16 23:09:35 jca Exp $
.\"
.\" Copyright (c) 1996 SigmaSoft, Th. Lockert
.\" All rights reserved.
@@ -144,7 +144,7 @@ from the directory.
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"