Skip to content

Conversation

@StykMartin
Copy link
Contributor

GitHub archives are created with the repository name as a prefix.

For instance, requesting an archive from:

https://github.com/beaker-project/beaker/archive/beaker-28.3.tar.gz

results in a file named beaker-beaker-28.3.tar.gz, as indicated by the content-disposition header:

</snip>
< content-disposition: attachment; filename=beaker-beaker-28.3.tar.gz
</snip>

Although the Spectool and RPM toolchain store the file based on the requested path, resulting in beaker-28.3.tar.gz, the internal structure of the tarball reflects the original GitHub archive naming. This discrepancy can cause issues during the RPM build process.

This commit adjusts the %setup -n parameter in the spec file to align with the GitHub archive's internal structure, ensuring correct extraction and building.

The change has been manually tested in COPR and with rpmbuild/spectool.
We can't catch this problem in CI right now because of the way Packit works. Packit replaces both sources and the %setup macro.

GitHub archives are created with the repository name prefix.
This change ensures correct Source0 extraction during the RPM build.

Signed-off-by: Martin Styk <[email protected]>
@StykMartin StykMartin requested review from mdujava and p3ck January 3, 2024 00:41
@StykMartin StykMartin merged commit f38b518 into beaker-project:release-29 Jan 3, 2024
@StykMartin StykMartin deleted the wip/fix-broken-unpack branch January 3, 2024 01:10
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