Article View: linux.debian.bugs.dist
Article #2849Bug#1152747: fop: reproducible builds: Improve use of SOURCE_DATE_EPOCH for timestamps in PDF files
From: Vagrant Cascadian
Date: Sun, 01 Nov 2026 01:10
Date: Sun, 01 Nov 2026 01:10
69 lines
4382 bytes
4382 bytes
--=-=-=
Content-Type: text/plain
Package: fop
Severity: normal
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps toolchain
X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org, tony mancill <tmancill@debian.org>
I think I found one of the remaining places where timestamps were
sneaking into CreateDate when using fop to generate PDFs.
If this sounds familiar, that is because this is a follow-up to the
original bug which partially fixed the issues:
https://bugs.debian.org/978499
It has been nagging at me in the 5 or so years since; I think I finally
identified where in the code needs to be adjusted!
This patch is more of a proof-of-concept than a real patch, although it
did appear to fix the one remaining issue for the pam and treeview
packages.
diff --git a/fop-core/src/main/java/org/apache/fop/render/intermediate/IFRenderer.java b/fop-core/src/main/java/org/apache/fop/render/intermediate/IFRenderer.java
index 84e4e3a..a4d8d7c 100644
--- a/fop-core/src/main/java/org/apache/fop/render/intermediate/IFRenderer.java
+++ b/fop-core/src/main/java/org/apache/fop/render/intermediate/IFRenderer.java
@@ -544,7 +544,8 @@ public class IFRenderer extends AbstractPathOrientedRenderer {
} else {
xmpBasic.setCreatorTool(Version.getVersion());
}
- xmpBasic.setMetadataDate(new java.util.Date());
+ final Long sourcedate = (1000 * Long.parseLong("1793491658"));
+ xmpBasic.setMetadataDate(new java.util.Date(sourcedate));
if (getUserAgent().getCreationDate() != null) {
xmpBasic.setCreateDate(getUserAgent().getCreationDate());
} else {
Obviously hard-coding this is the wrong way to fix this (well, it is
reproducible!), but adjusting it to use SOURCE_DATE_EPOCH like in the
earlier
debian/patches/0001-PDFInfo.java-Support-SOURCE_DATE_EPOCH-environment-v.patch
should hopefully do the trick? I struggle a bit with the Java code
necessary to pull this off myself, but at least identified *where* in
the code it needed to be fixed.
Other packages using fop to generate PDFs seem to mostly be working even
without this:
https://tests.reproducible-builds.org/debian/issues/unstable/timestamps_in_pdf_generated_by_apache_fop_issue.html
live well,
vagrant
--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"
-----BEGIN PGP SIGNATURE-----
iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCauaPyQAKCRDcUY/If5cW
qm04APsE9PviXSHURwBO9JTWhCNGFeRx9etEGHBu2FuYjEn2dgEAgF1Ga4nThesu
rFKhym+3iKHEnNDx2+S2bnX/FaLKqAA=
=Sy6t
-----END PGP SIGNATURE-----
--=-=-=--
Technical Details
Message-ID:
<NUsf7-96LB-3@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!3.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!news.servidellagleba.it!bofh.it!news.nic.it!robomodShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!3.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!news.servidellagleba.it!bofh.it!news.nic.it!robomod From: Vagrant Cascadian <vagrant@reproducible-builds.org> Newsgroups: linux.debian.bugs.dist Subject: Bug#1152747: fop: reproducible builds: Improve use of SOURCE_DATE_EPOCH for timestamps in PDF files Date: Sun, 01 Nov 2026 02:10:01 +0100 Message-ID: <NUsf7-96LB-3@gated-at.bofh.it> X-Original-To: submit@bugs.debian.org X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Sun Nov 1 01:05:11 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -1.45 Reply-To: Vagrant Cascadian <vagrant@reproducible-builds.org>, 1152747@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: reproducible-bugs@lists.alioth.debian.org, tmancill@debian.org, pkg-java-maintainers@lists.alioth.debian.org X-Debian-Pr-Message: report 1152747 X-Debian-Pr-Package: fop X-Debian-Pr-Keywords: patch X-Debian-Pr-Source: fop MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2000017 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 69 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Sat, 31 Oct 2026 18:03:05 -0700 X-Original-Message-ID: <87wlqx5po6.fsf@wireframe>