🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.debian.bugs.dist
3 messages
3 total messages Started by Rob Browning Wed, 25 Nov 2026 22:30
Bug#1155386: strip-nondeterminism: wrong result for .clj files and odd -T values
#6220
Author: Rob Browning
Date: Wed, 25 Nov 2026 22:30
36 lines
2862 bytes
Package: strip-nondeterminism
Version: 1.14.1-2

While packaging clojure 1.12.7, I happened to notice that the resulting
jar ran "time clojure -e ''" much more slowly than expected.  Looking
inside the jar, I saw that the .clj files had the same timestamps as
their corresponding .class files when they should have had an older
timestamp.

I wondered if this might be due to the 2s jar/zip timestamp granularity,
and so I tested it directly, using the sbuild's timestamp via

  strip-nondeterminism -T 1788559311 clojure.jar

This demonstrated the problem (.clj and .class files had the same
timestamps).  Then I tried 

  strip-nondeterminism -T 1788559310 clojure.jar

which worked correctly (.class files were newer than corresponding .clj
files).

Without fully understanding the context, I wondered if, given the 2s
granularity, this decrement isn't large enough:

https://salsa.debian.org/reproducible-builds/strip-nondeterminism/-/blob/763f4f83710b1a072e96a476f064203738d68522/lib/File/StripNondeterminism/handlers/jar.pm#L123

cf. https://bugs.debian.org/877418 

Thanks
-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4
Bug#1155386: strip-nondeterminism: wrong result for .clj files and odd -T values
#6237
Author: Chris Lamb
Date: Thu, 26 Nov 2026 00:40
31 lines
4074 bytes
Hi Rob,

> I wondered if this might be due to the 2s jar/zip timestamp granularity,
> and so I tested it directly, using the sbuild's timestamp via
> [..]

Nice investigation work. :)

And it seems like my 2017 comment in jar.pm was misleading. The ZIP
specification itself uses the MS-DOS timestamp format, so it is not
relevant whether the file is extracted to any filesystem (FAT/NTFS/ext4)
or not.

I'll push a fix now, correcting that comment also. I will release this
coming Friday.

Thanks for reminding me about the rather cute "$timestamp--;" fix. Having
to subtract 2 makes the whole fix even more of a weird quirk .

(Incidentally, should we be running this with .cljc files as well? The
current regex is only matching .clj.)


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby@debian.org 🍥 chris-lamb.co.uk
       `-
Bug#1155386: strip-nondeterminism: wrong result for .clj files and odd -T values
#6370
Author: Rob Browning
Date: Fri, 27 Nov 2026 00:20
17 lines
2415 bytes
"Chris Lamb" <lamby@debian.org> writes:

> I'll push a fix now, correcting that comment also. I will release this
> coming Friday.

Thanks for the quick fix.

> (Incidentally, should we be running this with .cljc files as well? The
> current regex is only matching .clj.)

Oh, right; I think that's probably correct.

-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads