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

gem2rpm fails for google-protobuf #97

Open
Hextremist opened this issue Apr 9, 2018 · 3 comments
Open

gem2rpm fails for google-protobuf #97

Hextremist opened this issue Apr 9, 2018 · 3 comments

Comments

@Hextremist
Copy link

Hextremist commented Apr 9, 2018

This is in fedora 27. Looks like gem2rpm makes some assumptions about the name of the gem file which is not right for this package.

$ cd ~/rpmbuild/SPECS
$ gem fetch google-protobuf
Fetching: google-protobuf-3.5.1.2-x86_64-linux.gem (100%)
Downloaded google-protobuf-3.5.1.2-x86_64-linux
$ gem2rpm google-protobuf-3.5.1.2-x86_64-linux.gem  >~/rpmbuild/SPECS/protobuf.spec
$ rpmbuild -bs ~/rpmbuild/SPECS/protobuf.spec
error: File /home/kjell/rpmbuild/SOURCES/google-protobuf-3.5.1.2.gem: No such file or directory
@voxik
Copy link
Member

voxik commented Apr 9, 2018

This is more or less RubyGems which makes some assumption and prefers platform specific version of gem. But for packaging, you should always do gem fetch google-protobug --platform=ruby for gems which provides platform specific versions of gems.

However, not sure if gem2rpm -f google-protobuf > ~/rpmbuild/SPECS/protobuf.spec (the -f param makes gem2rpm to fetch the package) is doing the right thing.

@Hextremist
Copy link
Author

Hextremist commented Apr 16, 2018

Hi,
You are right, and I am sorry :) -f seems to work fine. May I still suggest failing with an error message instead of generating a .spec file that does not work?

@voxik
Copy link
Member

voxik commented Apr 16, 2018

I don't target 100% success rate for gem2rpm. But this is definitely interesting case, so I'll keep this ticket open and will see what we can do about it.

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

No branches or pull requests

2 participants