summaryrefslogtreecommitdiffstats
path: root/usr.bin/ar/ar.1
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2010-10-09 05:31:08 +0000
committerkientzle <kientzle@FreeBSD.org>2010-10-09 05:31:08 +0000
commit8ce8087ba56f15605e6ed0f895712ba21962ec78 (patch)
tree2553e2bcd168f62d37e7f3fd998d5ea9a1b01f29 /usr.bin/ar/ar.1
parent55194e796cd9e8eb27d9bb4ec9f07184e390d01a (diff)
downloadFreeBSD-src-8ce8087ba56f15605e6ed0f895712ba21962ec78.zip
FreeBSD-src-8ce8087ba56f15605e6ed0f895712ba21962ec78.tar.gz
Add -D (deterministic) option to ar.
When set, it forces all timestamps and owners to zero and modes to 0644. Useful for producing libraries that are bitwise identical across multiple build runs. Submitted by: Erik Cederstrand Reviewed by: Kai Wang
Diffstat (limited to 'usr.bin/ar/ar.1')
-rw-r--r--usr.bin/ar/ar.111
1 files changed, 11 insertions, 0 deletions
diff --git a/usr.bin/ar/ar.1 b/usr.bin/ar/ar.1
index 3a8b753..c64c7f6 100644
--- a/usr.bin/ar/ar.1
+++ b/usr.bin/ar/ar.1
@@ -62,6 +62,7 @@
.Op Fl a Ar position-after
.Op Fl b Ar position-before
.Op Fl c
+.Op Fl D
.Op Fl i Ar position-before
.Op Fl j
.Op Fl s
@@ -179,6 +180,16 @@ from the archive specified by argument
.Ar archive .
The archive's symbol table, if present, is updated to reflect
the new contents of the archive.
+.It Fl D
+When used in combination with the
+.Fl r
+or
+.Fl q
+option, insert 0's instead of the real mtime, uid and gid values
+and 0644 instead of file mode from the members named by arguments
+.Ar files ... .
+This ensures that checksums on the resulting archives are reproducible
+when member contents are identical.
.It Fl f
Synonymous with option
.Fl T .
OpenPOWER on IntegriCloud