Debian Bug report logs - #1035365
lombok: reproducible-builds: build timestamps in files inside of .jar

Package: src:lombok; Maintainer for src:lombok is Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>;

Reported by: Vagrant Cascadian <vagrant@reproducible-builds.org>

Date: Tue, 2 May 2023 00:15:02 UTC

Severity: normal

Tags: patch

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, reproducible-bugs@lists.alioth.debian.org, Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>:
Bug#1035365; Package src:lombok. (Tue, 02 May 2023 00:15:04 GMT) (full text, mbox, link).


Acknowledgement sent to Vagrant Cascadian <vagrant@reproducible-builds.org>:
New Bug report received and forwarded. Copy sent to reproducible-bugs@lists.alioth.debian.org, Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>. (Tue, 02 May 2023 00:15:04 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Vagrant Cascadian <vagrant@reproducible-builds.org>
To: submit@bugs.debian.org
Subject: lombok: reproducible-builds: build timestamps in files inside of .jar
Date: Mon, 01 May 2023 17:13:46 -0700
[Message part 1 (text/plain, inline)]
Source: lombok
Severity: normal
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps timezone
X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org

The build timestamp is embedded in various files inside
/usr/share/java/lombok-1.18.24.jar:

  https://tests.reproducible-builds.org/debian/rb-pkg/bookworm/amd64/diffoscope-results/lombok.html

  META-INF/services/lombok.core.LombokApp

  #·Thu,·25·Apr·2024·11:27:09·-1200
  vs.
  #·Sat,·25·Mar·2023·07:05:45·+1400

The attached patch fixes this by removing the code in
SpiProcessorPersistence.java which adds the build timestamp.

If a date is for some reason necessary to embed in these files, another
option might be to use the SOURCE_DATE_EPOCH environment variable:

  https://reproducible-builds.org/docs/source-date-epoch/


Unfortunately, there may be other non-deterministic issues which prevent
lombok from building reproducibly, but applying this patch should
significantly reduce the noise generated from timestamps.


Thanks for maintaining lombok!


live well,
  vagrant
[0001-src-spiProcessor-lombok-spi-SpiProcessorPersistence..patch (text/x-diff, inline)]
From 9e2381870db66336dee2ac7b1ad6ef00f131cdac Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Mon, 1 May 2023 16:27:59 -0700
Subject: [PATCH 1/3] src/spiProcessor/lombok/spi/SpiProcessorPersistence.java:
 Avoid embedding the build timestamp.

https://reproducible-builds.org/docs/timestamps/
---
 src/spiProcessor/lombok/spi/SpiProcessorPersistence.java | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/spiProcessor/lombok/spi/SpiProcessorPersistence.java b/src/spiProcessor/lombok/spi/SpiProcessorPersistence.java
index 794473a..2d91b02 100644
--- a/src/spiProcessor/lombok/spi/SpiProcessorPersistence.java
+++ b/src/spiProcessor/lombok/spi/SpiProcessorPersistence.java
@@ -141,7 +141,6 @@ class SpiProcessorPersistence {
 		FileObject output = filer.createResource(StandardLocation.CLASS_OUTPUT, "", path + serviceName);
 		Writer writer = output.openWriter();
 		writer.write("# Generated by " + name + "\n");
-		writer.write("# " + new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss Z", Locale.US).format(new Date()) + "\n");
 		writer.write(value);
 		writer.close();
 	}
-- 
2.39.2

[signature.asc (application/pgp-signature, inline)]

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Aug 19 14:57:17 2023; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.