Skip to content

FOP-2854: Allow to override CreationDate#65

Open
bmwiedemann wants to merge 3 commits into
apache:mainfrom
bmwiedemann:date
Open

FOP-2854: Allow to override CreationDate#65
bmwiedemann wants to merge 3 commits into
apache:mainfrom
bmwiedemann:date

Conversation

@bmwiedemann

@bmwiedemann bmwiedemann commented Dec 23, 2020

Copy link
Copy Markdown

Allow to override build date with SOURCE_DATE_EPOCH
in order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.

This patch was done while working on reproducible builds for openSUSE.

Note: probably only a partial fix towards reproducible pdf output / https://issues.apache.org/jira/browse/FOP-2854

@infosuitemka

infosuitemka commented Dec 23, 2020 via email

Copy link
Copy Markdown

@bmwiedemann

Copy link
Copy Markdown
Author

Hi, I would still like to see this reviewed/tested/merged
Anything I can help?

@Simulant87

Copy link
Copy Markdown

This repository seems to be a mirror of the original SVN repository only. So it is unlikely that PRs are accepted here. You can find more information onhow to contribute on the development page: https://xmlgraphics.apache.org/fop/dev/

@infosuitemka

infosuitemka commented Dec 10, 2021 via email

Copy link
Copy Markdown

@bmwiedemann

Copy link
Copy Markdown
Author

Thanks @Simulant87 - I now filed https://issues.apache.org/jira/browse/FOP-3040

@infosuitemka

infosuitemka commented Dec 11, 2021 via email

Copy link
Copy Markdown

@kpcyrd

kpcyrd commented Jan 22, 2025

Copy link
Copy Markdown

@infosuitemka hi! are you back in the office?

@t-8ch

t-8ch commented Jan 24, 2025

Copy link
Copy Markdown

I have opened a similar PR at #87, which IMO is a bit cleaner.

@jayaddison

Copy link
Copy Markdown

@simonsteiner1984 is this something you could help with reviewing? (a pull request #87 is open to resolve this)

@jayaddison

Copy link
Copy Markdown

@simonsteiner1984 is this something you could help with reviewing? (a pull request #87 is open to resolve this)

Apologies; I misunderstood this to be an issue thread, with a pull request available to resolve it. Now I understand that both are pull requests, so two options are available. I don't have any personal preference between the two.

@simonsteiner1984

Copy link
Copy Markdown
Contributor

You can use the fop api to override dates, bug is set to wont fix

@t-8ch

t-8ch commented Mar 1, 2025

Copy link
Copy Markdown

You can use the fop api to override dates, bug is set to wont fix

Not all parts of fop respect the overridden date.

@simonsteiner1984

Copy link
Copy Markdown
Contributor

We wouldnt use env variables, for passing params to fop

@simonsteiner1984

Copy link
Copy Markdown
Contributor

Normally we set xmp data from fo file

@simonsteiner1984

Copy link
Copy Markdown
Contributor

Maybe can be done via https://xmlgraphics.apache.org/fop/2.10/metadata.html

@t-8ch

t-8ch commented Mar 1, 2025

Copy link
Copy Markdown

Normally we set xmp data from fo file

The xmp data itself yes, but the xmp data timestamp is always the current date.
(Same for the file ID). See the first two commits of #87 .

@jayaddison

Copy link
Copy Markdown

As @t-8ch notes, although many metadata timestamps can be specified at document build-time, xmp:CreateDate is currently an exception to that.

My interest in this bug stems from investigating reproducibility of PDF documentation for Debian's pam package - the only source of variance in recent builds appears to be the xmp:CreateDate in the included PDF files.

Comment thread fop-core/src/main/java/org/apache/fop/pdf/PDFDocument.java Outdated
Allow to override build date with SOURCE_DATE_EPOCH
in order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.

This patch was done while working on reproducible builds for openSUSE.
for reproducible builds
@jayaddison

Copy link
Copy Markdown

@simonsteiner1984 Happy New Year to you. Please could you reconsider this pull request, when you find some time?

For some documents it would enable assurance of integrity following rebuilds using straightforward methods like cmp before.pdf after.pdf, instead of manual or process-intensive techniques such as, for example, line-by-line document comparison, or extraction and inspection of PDF content using other utilities.

Similarly for these documents, the ability to rebuild at a fixed point-in-time could enable more reliable/stable hashes for the purposes of archiving and indexing.

Thank you,
James

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants