Skip to content

Make archives reproducible#54

Open
stertooy wants to merge 5 commits intogap-actions:mainfrom
stertooy:reproducible
Open

Make archives reproducible#54
stertooy wants to merge 5 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
description: "Body text for the new GitHub release that will appear on the package's GitHub Releases page"
required: false
default: "Release of ${{ github.event.repository.name }}"
affix:
Copy link
Member

Choose a reason for hiding this comment

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

@stertooy I think we could replace affix with two different timestamps, for example?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The idea is not to have any affix at all for end users, to keep things as simple as possible.

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.

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