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

Also delete .gemspec file in BUILD/ #2076

Merged
merged 1 commit into from
May 25, 2022

Conversation

ffesti
Copy link
Contributor

@ffesti ffesti commented 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: #1799

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
Copy link
Member

Actually, this begs the question: why are we unpacking the gem outside the actual build directory (buildsubdir) to begin with? It not only causes extra cleanup needs but also the actual build needs to refer to outside our build directory too, eg gem build ../foo-1.2.3.spec .

Of course changing that would be a compatibility break for ruby packages which expect the current layout so not to be changed lightly, but then this is "violating" our principle of everything under that one directory. @voxik , is there a specific reason for it to be this way or is this something we could look into changing in the future?

@ffesti
Copy link
Contributor Author

ffesti commented May 25, 2022

As mentioned in https://src.fedoraproject.org/rpms/rubygem-contracts/pull-request/1#comment-87699 the file otherwise clash with the one that might be shipped in the gem already.
I would argue that creating the gemspec file should actually be part of the %build process and not %prep and %setup should never have done such a thing. But it's probably too late for that now.

@pmatilai
Copy link
Member

Oh, I missed the original discussion on Fedora-side. In that case, okay.
This seems to also relate to what we've been occasionally discussing: placing an rpm-controlled extra directory between %_builddir and %buildsubdir, where the .gemspec file would not be so out of place. But that's a separate topic...

@pmatilai pmatilai merged commit 6f9cc38 into rpm-software-management:master May 25, 2022
@voxik
Copy link
Contributor

voxik commented May 25, 2022

the file otherwise clash with the one that might be shipped in the gem already

That is correct.

This seems to also relate to what we've been occasionally discussing: placing an rpm-controlled extra directory between %_builddir and %buildsubdir, where the .gemspec file would not be so out of place. But that's a separate topic...

That would be super useful. Is this tracked somewhere separately? Because there would be more to consider in the context of gems.

@pmatilai
Copy link
Member

pmatilai commented May 25, 2022

It is now 😅

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.

RFE: Clean up Ruby generated .gemspec file in %clean
3 participants