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

RFE: Clean up Ruby generated .gemspec file in %clean #1799

Closed
pvalena opened this issue Oct 18, 2021 · 1 comment · Fixed by #2076
Closed

RFE: Clean up Ruby generated .gemspec file in %clean #1799

pvalena opened this issue Oct 18, 2021 · 1 comment · Fixed by #2076
Assignees
Labels

Comments

@pvalena
Copy link
Contributor

pvalena commented Oct 18, 2021

Ruby %setup unpacks .gem file (SOURCE0), and also generates .gemspec file (from the .gem file) which is needed for gem build:
https://src.fedoraproject.org/rpms/rubygem-rails/blob/rawhide/f/rubygem-rails.spec#_37

It's generated in the same folder as the unpacked source (to avoid name collision), but it's never removed in %clean section.

Is it possible to remove it as well?

Also discussed here: https://src.fedoraproject.org/rpms/rubygem-contracts/pull-request/1#comment-87699

@pmatilai pmatilai added the bug label May 16, 2022
@ffesti ffesti self-assigned this May 23, 2022
@ffesti
Copy link
Contributor

ffesti commented May 24, 2022

OK, after a bit of digging: rpmuncompress does indeed create a .rpmspec file beside the buildSubdir when invoked by %setup on an gem file.
For some reason the the buildSubdir is not deleted by default unless you pass --clean to rpmbuild executing the RPMBUILD_RMBUILD action. So one would expect that the .rpmspec file is not deleted by default either. One could expect that --clean should delete it though - which it currently doesn't.

ffesti added a commit to ffesti/rpm that referenced this issue May 24, 2022
The file is created by %setup for Ruby gems and should be deleted together
with the buildSubdir on RPMBUILD_RMBUILD (After rebuilds or when --clean
is passed).

Resolves: rpm-software-management#1799
pmatilai pushed a commit that referenced this issue May 25, 2022
The file is created by %setup for Ruby gems and should be deleted together
with the buildSubdir on RPMBUILD_RMBUILD (After rebuilds or when --clean
is passed).

Resolves: #1799
pmatilai pushed a commit to pmatilai/rpm that referenced this issue Jun 28, 2022
The file is created by %setup for Ruby gems and should be deleted together
with the buildSubdir on RPMBUILD_RMBUILD (After rebuilds or when --clean
is passed).

Resolves: rpm-software-management#1799
(cherry picked from commit 6f9cc38)
pmatilai pushed a commit that referenced this issue Jun 28, 2022
The file is created by %setup for Ruby gems and should be deleted together
with the buildSubdir on RPMBUILD_RMBUILD (After rebuilds or when --clean
is passed).

Resolves: #1799
(cherry picked from commit 6f9cc38)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants