[DRE-maint] Bug#867599: gem2deb fails to install pure ruby part when a gem has both pure ruby and native libs

Pirate Praveen praveen at debian.org
Sat Jul 8 06:23:40 UTC 2017


On 07/08/2017 07:44 AM, Antonio Terceiro wrote:
> if the pure ruby libraries were not being installed, you would get a
> LoadError (i.e. a `require` statement failed), but that's not what is
> happening here.
For tests, the pure ruby libs are available in the source tree.

If I move the src/ruby/lib folder (I have locally installed ruby-grpc
deb), then it fails with `require': cannot load such file -- grpc
(LoadError)

$ mv src/ruby/lib/ src/ruby/lib.backup
pravi at nishumbha:~/forge/debian/git/pkg-ruby-extras/ruby-grpc$ RUBYLIB=.
GEM_PATH= ruby2.3 -S rake -f debian/ruby-tests.rake
/usr/bin/ruby2.3 /usr/bin/rspec --pattern
./src/ruby/spec/\*\*/\*_spec.rb --format documentation
/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require':
cannot load such file -- grpc (LoadError)
    from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in
`require'
    from
/home/pravi/forge/debian/git/pkg-ruby-extras/ruby-grpc/src/ruby/spec/call_credentials_spec.rb:30:in
`<top (required)>'
    from /usr/lib/ruby/vendor_ruby/rspec/core/configuration.rb:1435:in
`load'
    from /usr/lib/ruby/vendor_ruby/rspec/core/configuration.rb:1435:in
`block in load_spec_files'
    from /usr/lib/ruby/vendor_ruby/rspec/core/configuration.rb:1433:in
`each'
    from /usr/lib/ruby/vendor_ruby/rspec/core/configuration.rb:1433:in
`load_spec_files'
    from /usr/lib/ruby/vendor_ruby/rspec/core/runner.rb:100:in `setup'
    from /usr/lib/ruby/vendor_ruby/rspec/core/runner.rb:86:in `run'
    from /usr/lib/ruby/vendor_ruby/rspec/core/runner.rb:71:in `run'
    from /usr/lib/ruby/vendor_ruby/rspec/core/runner.rb:45:in `invoke'
    from /usr/bin/rspec:4:in `<main>'
/usr/bin/ruby2.3 /usr/bin/rspec --pattern
./src/ruby/spec/\*\*/\*_spec.rb --format documentation failed

> gem2deb does install the Ruby code even when there is a C extension, and
> there are several automated tests for that. If it didn't, we wouldn't
> be learning that this late in the game.
>
> I don't think this is a bug in gem2deb, but you can convince me
> otherwise.

I did open up the deb file in file-roller and I could see only

/usr/lib/x86_64-linux-gnu/ruby/vendor_ruby/2.3.0/grpc/grpc_c.so

Attaching the generated deb file for you to inspect.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ruby-grpc_1.3.2-1_amd64.deb
Type: application/vnd.debian.binary-package
Size: 308776 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-ruby-extras-maintainers/attachments/20170708/ad363d4e/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 862 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-ruby-extras-maintainers/attachments/20170708/ad363d4e/attachment-0001.sig>


More information about the Pkg-ruby-extras-maintainers mailing list