Skip to content

[INFRA-6259] feat: implement reproducible zip#10

Merged
ajaxbits merged 6 commits intoBrandonLWhite:mainfrom
ajaxbits:INFRA-6259-impl-repro-zipfile
May 1, 2025
Merged

[INFRA-6259] feat: implement reproducible zip#10
ajaxbits merged 6 commits intoBrandonLWhite:mainfrom
ajaxbits:INFRA-6259-impl-repro-zipfile

Conversation

@ajaxbits
Copy link
Collaborator

@ajaxbits ajaxbits commented Apr 30, 2025

Alters the zip method to reset all file permissions and timestamps of the files to be zipped, prior to zipping.

The file modification time respects $SOURCE_DATE_EPOC (according to the reproducible builds spec), and defaults to 1/1/1980. The file permissions are also updated to 644, to enforce standardization.

More information on reproducible builds for zip files can be found here.

@ajaxbits ajaxbits changed the title [INFRA-6259] feat: impl repro zipfile [INFRA-6259] feat: implement reproducible Zipfile Apr 30, 2025
@ajaxbits ajaxbits marked this pull request as ready for review April 30, 2025 18:31
@ajaxbits ajaxbits marked this pull request as draft April 30, 2025 18:33
@ajaxbits ajaxbits force-pushed the INFRA-6259-impl-repro-zipfile branch from d211495 to 8ad98bf Compare April 30, 2025 18:52
@ajaxbits ajaxbits marked this pull request as ready for review April 30, 2025 18:53
Copy link
Owner

@BrandonLWhite BrandonLWhite left a comment

Choose a reason for hiding this comment

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

See if you can simplify by using ZipFile.open()

Also, the nested-zip case needs to be handled too. It doesn't have to be in this PR if you prefer to get the basic case working first.

@ajaxbits ajaxbits changed the title [INFRA-6259] feat: implement reproducible Zipfile [INFRA-6259] feat: implement reproducible zip May 1, 2025
@ajaxbits ajaxbits force-pushed the INFRA-6259-impl-repro-zipfile branch from 1fce111 to e5ae625 Compare May 1, 2025 16:48
Copy link
Owner

@BrandonLWhite BrandonLWhite left a comment

Choose a reason for hiding this comment

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

Just one issue in the test asserts then good to go.

@ajaxbits ajaxbits merged commit 4715faf into BrandonLWhite:main May 1, 2025
1 check passed
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.

2 participants