diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2014-09-16 08:51:39 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2014-09-16 08:51:39 +0000 |
commit | f8a29a245a28e38291a2221d0ecc0d75778f8572 (patch) | |
tree | 74b65d470de6eb22b89db95eb1696ea08ec6485f /usr.sbin/pkg_add | |
parent | b514373028be6b8cd7bf48ecdd96abf1ac07ce68 (diff) |
if a @ts annotation is detected, wipe tarball timestamp. Archives will
look as if all files were born in 1970. The useful side-effect is that
meta-data for content-identical files WILL be identical as well.
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/ArcCheck.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/ArcCheck.pm b/usr.sbin/pkg_add/OpenBSD/ArcCheck.pm index bcb9ce93382..fae3964d0f7 100644 --- a/usr.sbin/pkg_add/OpenBSD/ArcCheck.pm +++ b/usr.sbin/pkg_add/OpenBSD/ArcCheck.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: ArcCheck.pm,v 1.28 2014/09/09 09:40:23 espie Exp $ +# $OpenBSD: ArcCheck.pm,v 1.29 2014/09/16 08:51:38 espie Exp $ # # Copyright (c) 2005-2006 Marc Espie <espie@openbsd.org> # @@ -149,6 +149,9 @@ sub prepare_long if (defined $item->{group} || defined $item->{owner}) { $entry->{mode} &= ~(S_ISUID|S_ISGID); } + if (defined $item->{ts}) { + delete $entry->{mtime}; + } # likewise, we skip links on extractions, so hey, don't even care # about modes and stuff. if ($entry->isSymLink) { |