Your message dated Thu, 31 Dec 2020 20:33:44 +0000
with message-id <e1kv4dk-0007ho...@fasolo.debian.org>
and subject line Bug#978499: fixed in fop 1:2.5-3
has caused the Debian Bug report #978499,
regarding fop: reproducible builds: Support using SOURCE_DATE_EPOCH for 
timestamps in PDF files
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
978499: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=978499
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: fop
Severity: normal
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: timestamps toolchain
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

Several packages use fop to generate PDF files in Debian packages, but
the resulting PDF files have embedding timestamp information in the
CreationDate of the PDF:

  
https://tests.reproducible-builds.org/debian/issues/unstable/timestamps_in_pdf_generated_by_apache_fop_issue.html


For example, in xorg-docs:

  
https://tests.reproducible-builds.org/debian/rb-pkg/bullseye/amd64/diffoscope-results/xorg-docs.html

  /usr/share/doc/xorg-docs/xlfd/xlfd.pdf.gz
  
  CreationDate:·"D:20201225182038-12'00'"
  vs.
  CreationDate:·"D:20220129025203+14'00'"


The attached patch fixes this by adding support for the
SOURCE_DATE_EPOCH environment variable to fop, which embeds the
specified timestamp rather than the current time:

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


Thanks for maintaining fop!


live well,
  vagrant
From 25826ea9c86d01a8392cf593b9aa93c72b469b19 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Mon, 28 Dec 2020 02:48:21 +0000
Subject: [PATCH] PDFInfo.java: Support SOURCE_DATE_EPOCH environment variable.

https://reproducible-builds.org/docs/source-date-epoch/
---
 fop-core/src/main/java/org/apache/fop/pdf/PDFInfo.java | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/fop-core/src/main/java/org/apache/fop/pdf/PDFInfo.java b/fop-core/src/main/java/org/apache/fop/pdf/PDFInfo.java
index 3aa5d97..79f3f42 100644
--- a/fop-core/src/main/java/org/apache/fop/pdf/PDFInfo.java
+++ b/fop-core/src/main/java/org/apache/fop/pdf/PDFInfo.java
@@ -305,7 +305,14 @@ public class PDFInfo extends PDFObject {
      * @return the requested String representation
      */
     protected static String formatDateTime(final Date time) {
-        return formatDateTime(time, TimeZone.getDefault());
+        // https://reproducible-builds.org/docs/source-date-epoch/
+        String source_date_epoch = System.getenv("SOURCE_DATE_EPOCH");
+        if (source_date_epoch != null) {
+            Long sourcedate = (1000 * Long.parseLong(source_date_epoch));
+            return formatDateTime(new Date(sourcedate), TimeZone.getTimeZone("Etc/UTC"));
+        } else {
+            return formatDateTime(time, TimeZone.getDefault());
+        }
     }
 
     /**
-- 
2.20.1

Attachment: signature.asc
Description: PGP signature


--- End Message ---
--- Begin Message ---
Source: fop
Source-Version: 1:2.5-3
Done: tony mancill <tmanc...@debian.org>

We believe that the bug you reported is fixed in the latest version of
fop, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 978...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
tony mancill <tmanc...@debian.org> (supplier of updated fop package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Thu, 31 Dec 2020 11:24:15 -0800
Source: fop
Architecture: source
Version: 1:2.5-3
Distribution: unstable
Urgency: medium
Maintainer: Debian Java Maintainers 
<pkg-java-maintain...@lists.alioth.debian.org>
Changed-By: tony mancill <tmanc...@debian.org>
Closes: 978499
Changes:
 fop (1:2.5-3) unstable; urgency=medium
 .
   * Team upload
   * Update SOURCE_DATE_EPOCH patch (Closes: #978499)
     - Conditionally use SOURCE_DATA_EPOCH in PDFInfo, PDFMetadata,
       PDFRenderingUtil, and FileIDGenerator classes.
     - Add try/catch logic for unparsable SOURCE_DATE_EPOCH
Checksums-Sha1:
 6c0d7b2a53925ae258cb52b6f7bd93440df4386b 2609 fop_2.5-3.dsc
 70db744862904cbea3b06bb6b0a4f2373b8a89db 873596 fop_2.5-3.debian.tar.xz
 5835a83c20010debb44e333aba90943581837811 13663 fop_2.5-3_amd64.buildinfo
Checksums-Sha256:
 7efd4de14cd7fadc44fd3c1af50df90511264886a24b5e7fb1d3142053c42fc6 2609 
fop_2.5-3.dsc
 afcb36fb9ccd573d2bcfc326297b856e6020dc8b2d889c5e470fa81f8a604c05 873596 
fop_2.5-3.debian.tar.xz
 03b8dfe873c297ad0c79800a6d9a08aef4d56daa37a3da999351bc03dbae54e9 13663 
fop_2.5-3_amd64.buildinfo
Files:
 6794819efc8fbcbd1ca78d8fcbb9078a 2609 text optional fop_2.5-3.dsc
 de3f6fd4d44b0f9fad92f5b48238ca53 873596 text optional fop_2.5-3.debian.tar.xz
 391237548a556c657c413cf1cd47d4eb 13663 text optional fop_2.5-3_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJIBAEBCgAyFiEE5Qr9Va3SequXFjqLIdIFiZdLPpYFAl/uMR8UHHRtYW5jaWxs
QGRlYmlhbi5vcmcACgkQIdIFiZdLPpZzUBAAlBfyxJLp/Lvx7yUzEeH0h3NCp7ip
u80RL/3Vwf8ADubGLofPGsT97yoPLENkwqDJFGRUnUR6Ijo2knvOO/QLIq5CTIPU
RH/r0ALVJ6VVvLrO2E5t7B+J151RIS9TqeVGjBB9drAEEvbFdSM4MoqW+sfJsJHB
7WEBCk9GnCTVcLaKLs+uih7mNL66c77rUXZRX8dXiyWrlliSssOcMdSqX/x3k4Hh
jBunIugAJK6JHuR//Zcm8pV95pmgdgEuCpSL7YaY/tPZFUHlvUv63OZASaWfp18E
cje4aOzcBPhqKvSLethqlgdnoeeg2XdmRA03RewcKVSA5LrtWFx1G50mLT+SDfvB
rRH3/ikpFfuScVHn/nfWGjNsjLd7osjUuzT+rylVVj3+F8HNuOgydDJj1wMFs0LI
uVAU3Quh7GVMcEyNgEk5bnBAuH6D24cjVecW5YH8OX0UpUHLD89oMEmCI8XAY89d
fbkKmECJBRNpc3RCARkgqotp4qjqje3IrfVxoOJHKnWhXFHuTurq/yQFQdBZPzE1
d2xC4CWWZpejnOn+2QQNvL2blfvp5nL2PbZiFnLOeW8Q/WP44oPhDe1n1zrWOHAP
7G84EsO/lLUK2yrwDFn7O7M9cD5BeuUZ0y87nn54y/BMpWlJZyWh2HR9oFf91G9g
3X4ceMuEnu8ZzIg=
=FReh
-----END PGP SIGNATURE-----

--- End Message ---
__
This is the maintainer address of Debian's Java team
<https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-java-maintainers>.
 Please use
debian-j...@lists.debian.org for discussions and questions.

Reply via email to