Skip to content

Make archives reproducible#54

Merged
fingolfin merged 8 commits intogap-actions:mainfrom
stertooy:reproducible
Mar 12, 2026
Merged

Make archives reproducible#54
fingolfin merged 8 commits intogap-actions:mainfrom
stertooy:reproducible

Conversation

@stertooy
Copy link
Contributor

@stertooy stertooy commented Mar 2, 2026

As suggested in #50.

The three supported formats, .tar.gz, .tar.bz2 and .zip should now always be reproducible archives. This is also tested by running this action twice, and then comparing the sha256 checksums of both archives.

Unfortunately, I had to add an extra input to be able to properly test this. I recommend leaving it undocumented, since it server no purpose for end users.

I've set SOURCE_DATE_EPOCH to the package release date as specified inPackageInfo.g.

@stertooy
Copy link
Contributor Author

stertooy commented Mar 3, 2026

Weird thing I noticed: the sha256sum of ActionTestOldDocPackage is not the same between multiple runs. It appears this is because a .dvi file is created during the creation of the manual, but this file is not removed afterwards.

@limakzi
Copy link
Member

limakzi commented Mar 3, 2026

@stertooy Isn't it like DVI file contains timestamp in a comment?
And more-over, documentation might have timestamp too?

@stertooy
Copy link
Contributor Author

stertooy commented Mar 3, 2026

@limakzi It's very likely that a creation date timestamp somewhere in the .dvi or in its metadata causes this, yes. But the .dvi file shouldn't be in the release archives anyway, since it's only used as an intermediate step in producing the documentation.

This doesn't happen in the PDF's because the build-pkg-docs action sets SOURCE_DATE_EPOCH to 0.

@stertooy stertooy changed the title Make archives created with tar more reproducible Make archives reproducible Mar 4, 2026
@stertooy stertooy marked this pull request as ready for review March 4, 2026 23:13
action.yml Outdated
if: ${{ inputs.dry-run == 'true' }}
shell: bash
run: echo "${{ inputs.body-text }}" > $RUNNER_TEMP/Release_text_for_${PKGNAME}_${VERSION}.md
run: echo "${{ inputs.body-text }}" > $RUNNER_TEMP/Release_text_for_${PKGNAME}_${VERSION}${{ inputs.affix }}.md
Copy link
Member

Choose a reason for hiding this comment

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

@stertooy Why not?

Suggested change
run: echo "${{ inputs.body-text }}" > $RUNNER_TEMP/Release_text_for_${PKGNAME}_${VERSION}${{ inputs.affix }}.md
run: echo "${{ inputs.body-text }}" > $RUNNER_TEMP/Release_text_for_${PKGNAME}_${VERSION}_${{ inputs.affix }}.md

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Again, this is because the affix input is expected to be empty, except during the CI tests in this repo. The CI script will put either "-1" or "-2" in the affix input, so an extra underscore isn't needed I think.

Copy link
Member

Choose a reason for hiding this comment

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

Makes sense

Copy link
Member

@fingolfin fingolfin left a comment

Choose a reason for hiding this comment

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

Looks good to me, great work!

@fingolfin
Copy link
Member

I don't think we should ship the manual.dvi, it just wastes space, so if it helps, just delete it?

stertooy and others added 2 commits March 11, 2026 14:06
Co-authored-by: Max Horn <max@quendi.de>
@stertooy
Copy link
Contributor Author

I don't think we should ship the manual.dvi, it just wastes space, so if it helps, just delete it?

No longer a problem since gap-actions/build-pkg-docs#42 was merged :)

@stertooy
Copy link
Contributor Author

stertooy commented Mar 11, 2026

CI tests currently fail due to the bug described in #59. Once #60 is merged, they should (hopefully) pass again.

Edit: fixed again now that #60 is merged.

@fingolfin fingolfin requested a review from limakzi March 12, 2026 11:38
Copy link
Member

@limakzi limakzi left a comment

Choose a reason for hiding this comment

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

LGTM!

@fingolfin fingolfin merged commit 714c04b into gap-actions:main Mar 12, 2026
7 checks 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.

3 participants