Hello,

The commit below from 2014-09-16 must have broken the snapshot time
detection on http://ports.su/ , which must have been broken since
2014-09-21.

Is there a cross-platform way to best get it back from the package file?

I see that the timestamps are now embedded within "+CONTENTS", and
both "+CONTENTS" and "+DESC" themselves have the correct timestamps,
too, just not "share/sqlports-compact".

>From the reversing as per below, it seems like there are 4 sources for
two timestamps:

2014-09-18T08:47Z
+DESC
+CONTENTS /@ts

2014-09-18T12:17Z
+CONTENTS
+CONTENTS /signify:

I guess the easiest way would be to fix the date with the snippet as
follows; or is there a better way?

%sh -c 'touch -d $(env TZ=GMT date -r $(stat -f"%m" +CONTENTS)
+%FT%TZ) share/sqlports-compact'

Cheers,
Constantine.



      538 Sep 15 12:29 2014-09-20/+CONTENTS
     3936 Sep 14 07:49 2014-09-20/+DESC
  36918272 Sep 14 07:49 2014-09-20/share/sqlports-compact

      553 Sep 19 05:17 2014-09-21/+CONTENTS
     3936 Sep 18 01:47 2014-09-21/+DESC
  37057536 Dec 31  1969 2014-09-21/share/sqlports-compact



--- 2014-09-20/+CONTENTS        Mon Sep 15 12:29:20 2014
+++ 2014-09-21/+CONTENTS        Fri Sep 19 05:17:22 2014
@@ -1,7 +1,7 @@
 @comment $OpenBSD: PLIST-compact,v 1.2 2009/12/01 18:27:46 espie Exp $
 @name sqlports-compact-4.2
 @signer openbsd-56-pkg
-@digital-signature
signify:2014-09-15T19:29:20Z:RWSPEf7Vpp2j0NzTldW+gbzVKDKUDBNV8yr4qbGsLA1j4qi41qVwdNxzzy5+d4Z6ocIuxOXLGAZkL1rZzO9bIXt8vpm6ia6vxg8=
+@digital-signature
signify:2014-09-19T12:17:22Z:RWSPEf7Vpp2j0KKBEBZR4Q/ZNEDFC509xrP2LO6eVXgEzctauBidBAZl4/pMWVqfoG9JXABPiI+wlfZobwoZTxZikYLrX5HXRg0=
 @option always-update
 @comment pkgpath=databases/sqlports,-compact cdrom=yes ftp=yes
 @arch amd64
@@ -10,5 +10,6 @@
 @size 3936
 @cwd /usr/local
 share/sqlports-compact
-@sha E+dRAH5CB2qQd2ZPSRUgGL4uUKYd9WiQDjWkt9lpkP8=
-@size 36918272
+@sha QJrtFZ+Kp8m9as8c6iYSqUjytHlIvopDki/vTw7enlE=
+@size 37057536
+@ts 1411030040



% cat 2014-09-21/+CONTENTS
@comment $OpenBSD: PLIST-compact,v 1.2 2009/12/01 18:27:46 espie Exp $
@name sqlports-compact-4.2
@signer openbsd-56-pkg
@digital-signature
signify:2014-09-19T12:17:22Z:RWSPEf7Vpp2j0KKBEBZR4Q/ZNEDFC509xrP2LO6eVXgEzctauBidBAZl4/pMWVqfoG9JXABPiI+wlfZobwoZTxZikYLrX5HXRg0=
@option always-update
@comment pkgpath=databases/sqlports,-compact cdrom=yes ftp=yes
@arch amd64
+DESC
@sha NdJMzcyumfz+I9nbW0P/qfHc1CT7KcZcGIaCiolyRZo=
@size 3936
@cwd /usr/local
share/sqlports-compact
@sha QJrtFZ+Kp8m9as8c6iYSqUjytHlIvopDki/vTw7enlE=
@size 37057536
@ts 1411030040



% date -r 1411030040
Thu Sep 18 01:47:20 PDT 2014

% env TZ=GMT date -r 1411030040
Thu Sep 18 08:47:20 GMT 2014



% sh -c 'touch -d $(env TZ=GMT date -r $(stat -f"%m" +CONTENTS)
+%FT%TZ) share/sqlports-compact'

% stat share/sqlports-compact
... 37057536 "Sep 19 05:17:22 2014" "Sep 19 05:17:22 2014" "Mar 13
12:49:33 2015" 16384 72416 0 share/sqlports-compact



On 16 September 2014 at 01:51, Marc Espie <es...@cvs.openbsd.org> wrote:
> CVSROOT:        /cvs
> Module name:    src
> Changes by:     es...@cvs.openbsd.org   2014/09/16 02:51:38
>
> Modified files:
>         usr.sbin/pkg_add/OpenBSD: ArcCheck.pm
>
> Log message:
> 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.
>

Reply via email to