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:
parent
9d2332c9ee
commit
fc964cbf4e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=286010
@ -210,6 +210,7 @@ and 0644 instead of file mode from the members named by arguments
|
|||||||
.Ar .
|
.Ar .
|
||||||
This ensures that checksums on the resulting archives are reproducible
|
This ensures that checksums on the resulting archives are reproducible
|
||||||
when member contents are identical.
|
when member contents are identical.
|
||||||
|
This option is enabled by default.
|
||||||
If multiple
|
If multiple
|
||||||
.Fl D
|
.Fl D
|
||||||
and
|
and
|
||||||
|
@ -104,6 +104,8 @@ main(int argc, char **argv)
|
|||||||
|
|
||||||
bsdar = &bsdar_storage;
|
bsdar = &bsdar_storage;
|
||||||
memset(bsdar, 0, sizeof(*bsdar));
|
memset(bsdar, 0, sizeof(*bsdar));
|
||||||
|
/* Enable deterministic mode by default. */
|
||||||
|
bsdar->options |= AR_D;
|
||||||
|
|
||||||
if ((bsdar->progname = getprogname()) == NULL)
|
if ((bsdar->progname = getprogname()) == NULL)
|
||||||
bsdar->progname = "ar";
|
bsdar->progname = "ar";
|
||||||
|
Loading…
Reference in New Issue
Block a user