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

cleanup_for_epub3 prevents reproducible builds #97

Closed
slonopotamus opened this issue Jan 26, 2020 · 4 comments
Closed

cleanup_for_epub3 prevents reproducible builds #97

slonopotamus opened this issue Jan 26, 2020 · 4 comments
Assignees

Comments

@slonopotamus
Copy link
Contributor

slonopotamus commented Jan 26, 2020

Currently, it is impossible to create two byte-to-byte identical EPUB files via gepub because it unconditionally sets modified time to current time when user calls generate_epub_stream or generate_epub.

Please, add an option to disable this behavior, so that gepub user can explicitly set modified date to a fixed timestamp. Alternative way: only update modified date in cleanup_for_epub3 if it wasn't set explicitly.

More info about reproducible builds concept is available on https://reproducible-builds.org/

@slonopotamus
Copy link
Contributor Author

slonopotamus commented Feb 7, 2020

After a bit more thinking, possibly what you did is not as good. Now, last modified will not update if you load existing epub, modify it and save back. Right? Seems like, we actually need an option to say whether to update last modified date or not.

@slonopotamus
Copy link
Contributor Author

@skoji what do you think?

@skoji
Copy link
Owner

skoji commented Feb 8, 2020

Now, last modified will not update if you load existing epub, modify it and save back. Right?

Yes, that’s right. Original behavior is intended to prevent that case.

But the original behavior also made book.lastmodified= meaningless.

@skoji
Copy link
Owner

skoji commented Feb 9, 2020

OK I'm going to change on parsed EPUB:

Update lastmodified on save even if parsed lastmodified exists, unless client explicitly sets lastmodified.

slonopotamus added a commit to slonopotamus/gepub that referenced this issue Feb 10, 2020
slonopotamus added a commit to slonopotamus/gepub that referenced this issue Feb 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants