1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-29 12:03:03 +00:00

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
This commit is contained in:
Ed Maste 2015-07-29 13:36:17 +00:00
parent 9d2332c9ee
commit fc964cbf4e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=286010
2 changed files with 3 additions and 0 deletions

View File

@ -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

View File

@ -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";