Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for SOURCE_DATE_EPOCH in quickbook #11

Closed
mhekkel opened this issue Sep 4, 2021 · 1 comment
Closed

support for SOURCE_DATE_EPOCH in quickbook #11

mhekkel opened this issue Sep 4, 2021 · 1 comment

Comments

@mhekkel
Copy link

mhekkel commented Sep 4, 2021

I'm a happy user of boostbook and quickbook to generate the documentation for my software. This software is also part of Debian and there I run into the problem that my packages are not reproducible, due to the fact that quickbook writes out the current date as a last-revised string.
The solution to this is really very simple, patch quickbook to pick up the value of the environment variable SOURCE_DATE_EPOCH and use that instead of time() as the last-revised date.

The patch might look like this:

diff tools/quickbook/src/quickbook.cpp tools/quickbook/src/quickbook-n.cpp
469c469,473
<             time_t t = std::time(0);
---
>             time_t t;
>                       if (getenv("SOURCE_DATE_EPOCH"))
>                               t = strtol(getenv("SOURCE_DATE_EPOCH"), nullptr, 10);
>                       else
>                               t = std::time(0);

More information on reproducible builds can be found at https://reproducible-builds.org/ and https://wiki.debian.org/ReproducibleBuilds/Howto

Hope this can be fixed.

-maarten

@mclow mclow transferred this issue from boostorg/boost Sep 5, 2021
@mhekkel
Copy link
Author

mhekkel commented Sep 7, 2021

Sorry, wrong project. Should have been quickbook of course.
Submitted a pull request at boostorg/quickbook#12

@mhekkel mhekkel closed this as completed Sep 7, 2021
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

No branches or pull requests

1 participant