diff options
author | emaste <emaste@FreeBSD.org> | 2015-07-29 13:36:17 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2015-07-29 13:36:17 +0000 |
commit | 25c00d1c25dda00fa64be84a8ae9ce143a81398f (patch) | |
tree | db5c9584e48010e63ad3c8208e9c81b0f9f8852e /usr.bin/ar | |
parent | 0a5168e81f69b5fdc789ef0aae0eb78e3455bc62 (diff) | |
download | FreeBSD-src-25c00d1c25dda00fa64be84a8ae9ce143a81398f.zip FreeBSD-src-25c00d1c25dda00fa64be84a8ae9ce143a81398f.tar.gz |
ar: enable deterministic mode by default
Ar cannot handle UIDs with more than 6 digits, and storing the mtime,
uid, gid and mode provides little to negative value anyhow for ar's
uses. Turn on deterministic (-D) mode by default; it can be disabled by
the user with -U.
PR: 196929
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3190
Diffstat (limited to 'usr.bin/ar')
-rw-r--r-- | usr.bin/ar/ar.1 | 1 | ||||
-rw-r--r-- | usr.bin/ar/ar.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/usr.bin/ar/ar.1 b/usr.bin/ar/ar.1 index 02e99f1..6998c04 100644 --- a/usr.bin/ar/ar.1 +++ b/usr.bin/ar/ar.1 @@ -210,6 +210,7 @@ and 0644 instead of file mode from the members named by arguments .Ar . This ensures that checksums on the resulting archives are reproducible when member contents are identical. +This option is enabled by default. If multiple .Fl D and diff --git a/usr.bin/ar/ar.c b/usr.bin/ar/ar.c index 3d5e2b8..104d55c 100644 --- a/usr.bin/ar/ar.c +++ b/usr.bin/ar/ar.c @@ -104,6 +104,8 @@ main(int argc, char **argv) bsdar = &bsdar_storage; memset(bsdar, 0, sizeof(*bsdar)); + /* Enable deterministic mode by default. */ + bsdar->options |= AR_D; if ((bsdar->progname = getprogname()) == NULL) bsdar->progname = "ar"; |