Skip to content

bpo-30693: zip+tarfile: sort directory listing #2263

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

Merged
merged 2 commits into from
Jan 31, 2018

Conversation

bmwiedemann
Copy link
Contributor

@bmwiedemann bmwiedemann commented Jun 18, 2017

zipfile+tarfile: sort directory listing
to generate zip and tar archives in a more reproducible way

See also https://reproducible-builds.org/docs/stable-inputs/ on that topic.

I successfully tested this change on python-2.7.13

https://bugs.python.org/issue30693

bmwiedemann added a commit to bmwiedemann/obs-service-tar_scm that referenced this pull request Jun 18, 2017
bmwiedemann added a commit to bmwiedemann/obs-service-tar_scm that referenced this pull request Jun 19, 2017
to generate tar files in a reproducible way.

See https://reproducible-builds.org/ for why this matters.

In addition to this change,
to generate completely reproducible tarballs,
the build system also needs
python/cpython#2263
@bmwiedemann bmwiedemann changed the title bpo-30693: tarfile: sort directory listing bpo-30693: zip+tarfile: sort directory listing Jun 21, 2017
@bmwiedemann bmwiedemann force-pushed the tarfile branch 4 times, most recently from 51d3ad6 to b5551df Compare November 28, 2017 09:55
Copy link
Member

@bitdancer bitdancer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a news item and a doc update.

to generate tar files in a more reproducible way

See also https://reproducible-builds.org/docs/stable-inputs/ on that topic.
to generate zip files in a more reproducible way

See also https://reproducible-builds.org/docs/stable-inputs/ on that topic.
@bmwiedemann
Copy link
Contributor Author

updated docs to include a versionchanged as requested by one dev.
News entry was already there anyway.

@bmwiedemann
Copy link
Contributor Author

@brettcannon since you seem to be interested in this topic, I would really like to see the 1-line fix to tarfile.py merged

@vstinner vstinner merged commit 8452104 into python:master Jan 31, 2018
@bedevere-bot
Copy link

@vstinner: Please replace # with GH- in the commit message next time. Thanks!

ned-deily pushed a commit to ned-deily/cpython that referenced this pull request Jan 31, 2018
tarfile and zipfile now sort directory listing to generate tar and zip archives
in a more reproducible way.

See also https://reproducible-builds.org/docs/stable-inputs/ on that topic.
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.

5 participants