Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/pax Add the timestamp option to the pax front end.
details: https://anonhg.NetBSD.org/src/rev/a976467713a0
branches: trunk
changeset: 342382:a976467713a0
user: christos <christos%NetBSD.org@localhost>
date: Sat Dec 19 18:45:52 2015 +0000
description:
Add the timestamp option to the pax front end.
diffstat:
bin/pax/options.c | 14 ++++++++++++--
bin/pax/pax.1 | 17 +++++++++++++++--
2 files changed, 27 insertions(+), 4 deletions(-)
diffs (80 lines):
diff -r 0e6aa59fb4c2 -r a976467713a0 bin/pax/options.c
--- a/bin/pax/options.c Sat Dec 19 18:28:54 2015 +0000
+++ b/bin/pax/options.c Sat Dec 19 18:45:52 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: options.c,v 1.117 2015/12/19 18:28:54 christos Exp $ */
+/* $NetBSD: options.c,v 1.118 2015/12/19 18:45:52 christos Exp $ */
/*-
* Copyright (c) 1992 Keith Muller.
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)options.c 8.2 (Berkeley) 4/18/94";
#else
-__RCSID("$NetBSD: options.c,v 1.117 2015/12/19 18:28:54 christos Exp $");
+__RCSID("$NetBSD: options.c,v 1.118 2015/12/19 18:45:52 christos Exp $");
#endif
#endif /* not lint */
@@ -257,6 +257,8 @@
OPT_XZ },
{ "gnu", no_argument, 0,
OPT_GNU },
+ { "timestamp", required_argument, 0,
+ OPT_TIMESTAMP },
{ 0, 0, 0,
0 },
};
@@ -667,6 +669,14 @@
case OPT_GNU:
is_gnutar = 1;
break;
+#ifndef SMALL
+ case OPT_TIMESTAMP:
+ if (set_tstamp(optarg, &tst) == -1) {
+ tty_warn(1, "Invalid timestamp `%s'", optarg);
+ tar_usage();
+ }
+ break;
+#endif
case '?':
default:
pax_usage();
diff -r 0e6aa59fb4c2 -r a976467713a0 bin/pax/pax.1
--- a/bin/pax/pax.1 Sat Dec 19 18:28:54 2015 +0000
+++ b/bin/pax/pax.1 Sat Dec 19 18:45:52 2015 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: pax.1,v 1.65 2015/11/04 09:24:14 wiz Exp $
+.\" $NetBSD: pax.1,v 1.66 2015/12/19 18:45:52 christos Exp $
.\"
.\" Copyright (c) 1992 Keith Muller.
.\" Copyright (c) 1992, 1993
@@ -33,7 +33,7 @@
.\"
.\" @(#)pax.1 8.4 (Berkeley) 4/18/94
.\"
-.Dd November 3, 2015
+.Dd December 19, 2015
.Dt PAX 1
.Os
.Sh NAME
@@ -742,6 +742,19 @@
file pathname length, file size, link pathname length and the type of the file.
.It Fl Fl gnu
Recognize GNU tar extensions.
+.It Fl Fl timestamp Ar timestamp
+Store all modification times in the archive with the
+.Ar timestamp
+given instead of the actual modification time of the individual archive member
+so that repeatable builds are possible.
+The
+.Ar timestamp
+can be a
+.Pa pathname ,
+where the timestamps are derived from that file, a parseable date for
+.Xr parsedate 3
+(this option is not yet available in the tools build), or an integer value
+interpreted as the number of seconds from the Epoch.
.It Fl Fl xz
Use
.Xr xz 1
Home |
Main Index |
Thread Index |
Old Index