Skip to content
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

Update -n parameter in %setup macro #201

Merged

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 p3ck and mdujava January 3, 2024 00:41
@StykMartin StykMartin merged commit f38b518 into beaker-project:release-29 Jan 3, 2024
13 checks passed
@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