On Mon, Aug 9, 2021 at 1:50 pm, Antonio Terceiro <terce...@debian.org>
wrote:
On Mon, Aug 09, 2021 at 01:35:43AM +0530, Pirate Praveen wrote:
On Mon, Aug 9, 2021 at 12:12 am, Pirate Praveen
<prav...@onenetbeyond.org>
wrote:
> [copying debian-ruby list]
>
> On Sun, 08 Aug 2021 22:08:39 +0530 Akshay S Dinesh
> <aks...@learnlearn.in> wrote:
> > Package: ruby-google-protobuf
> > Version: 3.17.3-1
> > Severity: grave
> > Justification: renders package unusable
> >
> > Dear Maintainer,
> >
> > I was trying to install gitlab to reproduce #966653
> >
> > Installed ruby-google-protobuf from experimental
> >
> > The pg_query library was erroring at startup,
> > with failure to require 'google/protobuf'
> >
> > I tried to isolate it to debian by `gem install google-protobuf`
> >
> > It worked correctly with that.
> >
> > On comparing stable version
> >
http://ftp.debian.org/debian/pool/main/p/protobuf/ruby-google-protobuf_3.12.4-1_amd64.deb
> > with the experimental version
> >
http://ftp.debian.org/debian/pool/main/p/protobuf/ruby-google-protobuf_3.17.3-1_amd64.deb
> >
> > I could see that the latter lacks the
> ..../2.7.0/gems/lib/google/protobuf directory altogether
> >
> > The upstream gem at
> https://rubygems.org/downloads/google-protobuf-3.17.3.gem includes
> > this lib directory with lots of ruby files
> >
> > I'm suspecting that this folder is critical to the functioning
of this
> package
> >
>
> I think this is a problem with gem2deb not including the pure
ruby files
> along with the extention. I think we have seen such issues
before, but
> don't remember how we fixed it.
>
> Another possibility is that the rules is calling ruby build only
in
> override_dh_auto_build-arch.
Adding,
ruby/lib/google usr/lib/ruby/vendor_ruby
to debian/ruby-google-protobuf.install makes require
'google/protobuf' to
pass. This can be used as a workaround until we figure out why
gem2deb is
not installing these files even though gemspec includes them in
files.
protobuf is nothing like an usual Ruby package.
The top of debian/rules has this:
export DH_RUBY = --gem-install
export DH_RUBY_USE_DH_AUTO_INSTALL_DESTDIR =
debian/ruby-google-protobuf
export GEM2DEB_TEST_RUNNER = --check-dependencies
But this is completely misleading, since the part that seems to
actually
do the Ruby build does not use gem2deb at all, and looks like this:
ifeq (,$(filter noruby,$(DEB_BUILD_PROFILES)))
# Ruby build
cd ruby && rake package genproto
endif
So this has definitively nothing to do with gem2deb.
Well, I tried with
dh_auto_build -O--buildsystem=ruby -O--package=ruby-google-protobuf
after this rake command without any change
Also it has the following lines below it and
dh_auto_install -O--buildsystem=ruby -O--package=ruby-google-protobuf
--destdir=$(CURDIR)/debian/ruby-google-protobuf
and you can see in the build logs at
https://buildd.debian.org/status/fetch.php?pkg=protobuf&arch=amd64&ver=3.17.3-1&stamp=1624466935&raw=0
this looks to me pretty much gem2deb's doing.
dh_auto_install -O--buildsystem=ruby -O--package=ruby-google-protobuf
--destdir=/<<PKGBUILDDIR>>/debian/ruby-google-protobuf
dh_ruby --install /<<PKGBUILDDIR>>/debian/ruby-google-protobuf
dh_ruby --install
/usr/bin/ruby2.7 -S gem build --config-file /dev/null --verbose
/tmp/d20210623-865026-7jt4fj/gemspec
Failed to load /dev/null because it doesn't contain valid YAML hash
Successfully built RubyGem
Name: google-protobuf
Version: 3.17.3
File: google-protobuf-3.17.3.gem
/usr/bin/ruby2.7 -S gem install --config-file /dev/null --verbose
--local --verbose --no-document --ignore-dependencies --install-dir
/<<PKGBUILDDIR>>/debian/ruby-google-protobuf/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0
/tmp/d20210623-865026-7jt4fj/google-protobuf-3.17.3.gem
Failed to load /dev/null because it doesn't contain valid YAML hash
/<<PKGBUILDDIR>>/debian/ruby-google-protobuf/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/google-protobuf-3.17.3/ruby/ext/google/protobuf_c/convert.c
/<<PKGBUILDDIR>>/debian/ruby-google-protobuf/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/google-protobuf-3.17.3/ruby/ext/google/protobuf_c/convert.h
/<<PKGBUILDDIR>>/debian/ruby-google-protobuf/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/google-protobuf-3.17.3/ruby/ext/google/protobuf_c/defs.c
/<<PKGBUILDDIR>>/debian/ruby-google-protobuf/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/google-protobuf-3.17.3/ruby/ext/google/protobuf_c/defs.h
/<<PKGBUILDDIR>>/debian/ruby-google-protobuf/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/google-protobuf-3.17.3/ruby/ext/google/protobuf_c/extconf.rb
/<<PKGBUILDDIR>>/debian/ruby-google-protobuf/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/google-protobuf-3.17.3/ruby/ext/google/protobuf_c/map.c
/<<PKGBUILDDIR>>/debian/ruby-google-protobuf/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/google-protobuf-3.17.3/ruby/ext/google/protobuf_c/map.h
/<<PKGBUILDDIR>>/debian/ruby-google-protobuf/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/google-protobuf-3.17.3/ruby/ext/google/protobuf_c/message.c
/<<PKGBUILDDIR>>/debian/ruby-google-protobuf/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/google-protobuf-3.17.3/ruby/ext/google/protobuf_c/message.h
/<<PKGBUILDDIR>>/debian/ruby-google-protobuf/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/google-protobuf-3.17.3/ruby/ext/google/protobuf_c/protobuf.c
/<<PKGBUILDDIR>>/debian/ruby-google-protobuf/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/google-protobuf-3.17.3/ruby/ext/google/protobuf_c/protobuf.h
/<<PKGBUILDDIR>>/debian/ruby-google-protobuf/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/google-protobuf-3.17.3/ruby/ext/google/protobuf_c/repeated_field.c
/<<PKGBUILDDIR>>/debian/ruby-google-protobuf/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/google-protobuf-3.17.3/ruby/ext/google/protobuf_c/repeated_field.h
/<<PKGBUILDDIR>>/debian/ruby-google-protobuf/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/google-protobuf-3.17.3/ruby/ext/google/protobuf_c/ruby-upb.c
/<<PKGBUILDDIR>>/debian/ruby-google-protobuf/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/google-protobuf-3.17.3/ruby/ext/google/protobuf_c/ruby-upb.h
/<<PKGBUILDDIR>>/debian/ruby-google-protobuf/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/google-protobuf-3.17.3/ruby/ext/google/protobuf_c/third_party/wyhash/wyhash.h
/<<PKGBUILDDIR>>/debian/ruby-google-protobuf/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/google-protobuf-3.17.3/ruby/ext/google/protobuf_c/wrap_memcpy.c
Building native extensions. This could take a while...
current directory:
/<<PKGBUILDDIR>>/debian/ruby-google-protobuf/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/google-protobuf-3.17.3/ruby/ext/google/protobuf_c
["/usr/bin/ruby2.7", "-I", "/usr/lib/ruby/vendor_ruby", "-r",
"./siteconf20210623-865037-6gkltl.rb", "extconf.rb"]
checking for third_party/wyhash/wyhash.h in ../../../..... yes
creating Makefile
current directory:
/<<PKGBUILDDIR>>/debian/ruby-google-protobuf/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/google-protobuf-3.17.3/ruby/ext/google/protobuf_c
["make", "V=1", "CC=gcc -fdebug-prefix-map=/<<PKGBUILDDIR>>=.",
"CXX=g++ -fdebug-prefix-map=/<<PKGBUILDDIR>>=.", "DESTDIR=", "clean"]
make[2]: Entering directory
'/<<PKGBUILDDIR>>/debian/ruby-google-protobuf/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/google-protobuf-3.17.3/ruby/ext/google/protobuf_c'
rm -f
rm -f protobuf_c.so *.o *.bak mkmf.log .*.time
make[2]: Leaving directory
'/<<PKGBUILDDIR>>/debian/ruby-google-protobuf/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/google-protobuf-3.17.3/ruby/ext/google/protobuf_c'
current directory:
/<<PKGBUILDDIR>>/debian/ruby-google-protobuf/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/google-protobuf-3.17.3/ruby/ext/google/protobuf_c
["make", "V=1", "CC=gcc -fdebug-prefix-map=/<<PKGBUILDDIR>>=.",
"CXX=g++ -fdebug-prefix-map=/<<PKGBUILDDIR>>=.", "DESTDIR="]
make[2]: Entering directory
'/<<PKGBUILDDIR>>/debian/ruby-google-protobuf/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/google-protobuf-3.17.3/ruby/ext/google/protobuf_c'
gcc -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -I.
-I/usr/include/x86_64-linux-gnu/ruby-2.7.0
-I/usr/include/ruby-2.7.0/ruby/backward -I/usr/include/ruby-2.7.0 -I.
-Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -g -O2
-ffile-prefix-map=/build/ruby2.7-aN7IdK/ruby2.7-2.7.3=.
-fstack-protector-strong -Wformat -Werror=format-security -fPIC
-std=gnu99 -O3 -DNDEBUG -fvisibility=hidden -Wall -Wsign-compare
-Wno-declaration-after-statement -o convert.o -c convert.c
gcc -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -I.
-I/usr/include/x86_64-linux-gnu/ruby-2.7.0
-I/usr/include/ruby-2.7.0/ruby/backward -I/usr/include/ruby-2.7.0 -I.
-Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -g -O2
-ffile-prefix-map=/build/ruby2.7-aN7IdK/ruby2.7-2.7.3=.
-fstack-protector-strong -Wformat -Werror=format-security -fPIC
-std=gnu99 -O3 -DNDEBUG -fvisibility=hidden -Wall -Wsign-compare
-Wno-declaration-after-statement -o defs.o -c defs.c
gcc -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -I.
-I/usr/include/x86_64-linux-gnu/ruby-2.7.0
-I/usr/include/ruby-2.7.0/ruby/backward -I/usr/include/ruby-2.7.0 -I.
-Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -g -O2
-ffile-prefix-map=/build/ruby2.7-aN7IdK/ruby2.7-2.7.3=.
-fstack-protector-strong -Wformat -Werror=format-security -fPIC
-std=gnu99 -O3 -DNDEBUG -fvisibility=hidden -Wall -Wsign-compare
-Wno-declaration-after-statement -o map.o -c map.c
gcc -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -I.
-I/usr/include/x86_64-linux-gnu/ruby-2.7.0
-I/usr/include/ruby-2.7.0/ruby/backward -I/usr/include/ruby-2.7.0 -I.
-Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -g -O2
-ffile-prefix-map=/build/ruby2.7-aN7IdK/ruby2.7-2.7.3=.
-fstack-protector-strong -Wformat -Werror=format-security -fPIC
-std=gnu99 -O3 -DNDEBUG -fvisibility=hidden -Wall -Wsign-compare
-Wno-declaration-after-statement -o message.o -c message.c
gcc -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -I.
-I/usr/include/x86_64-linux-gnu/ruby-2.7.0
-I/usr/include/ruby-2.7.0/ruby/backward -I/usr/include/ruby-2.7.0 -I.
-Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -g -O2
-ffile-prefix-map=/build/ruby2.7-aN7IdK/ruby2.7-2.7.3=.
-fstack-protector-strong -Wformat -Werror=format-security -fPIC
-std=gnu99 -O3 -DNDEBUG -fvisibility=hidden -Wall -Wsign-compare
-Wno-declaration-after-statement -o protobuf.o -c protobuf.c
gcc -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -I.
-I/usr/include/x86_64-linux-gnu/ruby-2.7.0
-I/usr/include/ruby-2.7.0/ruby/backward -I/usr/include/ruby-2.7.0 -I.
-Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -g -O2
-ffile-prefix-map=/build/ruby2.7-aN7IdK/ruby2.7-2.7.3=.
-fstack-protector-strong -Wformat -Werror=format-security -fPIC
-std=gnu99 -O3 -DNDEBUG -fvisibility=hidden -Wall -Wsign-compare
-Wno-declaration-after-statement -o repeated_field.o -c
repeated_field.c
gcc -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -I.
-I/usr/include/x86_64-linux-gnu/ruby-2.7.0
-I/usr/include/ruby-2.7.0/ruby/backward -I/usr/include/ruby-2.7.0 -I.
-Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -g -O2
-ffile-prefix-map=/build/ruby2.7-aN7IdK/ruby2.7-2.7.3=.
-fstack-protector-strong -Wformat -Werror=format-security -fPIC
-std=gnu99 -O3 -DNDEBUG -fvisibility=hidden -Wall -Wsign-compare
-Wno-declaration-after-statement -o ruby-upb.o -c ruby-upb.c
ruby-upb.c: In function ‘upb_fielddef_default’:
ruby-upb.c:4558:14: warning: ‘ret.str_val.data’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
4558 | upb_msgval ret;
| ^~~
ruby-upb.c: In function ‘upb_msg_get’:
ruby-upb.c:4558:14: warning: ‘ret.str_val.data’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
gcc -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -I.
-I/usr/include/x86_64-linux-gnu/ruby-2.7.0
-I/usr/include/ruby-2.7.0/ruby/backward -I/usr/include/ruby-2.7.0 -I.
-Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -g -O2
-ffile-prefix-map=/build/ruby2.7-aN7IdK/ruby2.7-2.7.3=.
-fstack-protector-strong -Wformat -Werror=format-security -fPIC
-std=gnu99 -O3 -DNDEBUG -fvisibility=hidden -Wall -Wsign-compare
-Wno-declaration-after-statement -o wrap_memcpy.o -c wrap_memcpy.c
rm -f protobuf_c.so
gcc -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -shared -o protobuf_c.so
convert.o defs.o map.o message.o protobuf.o repeated_field.o ruby-upb.o
wrap_memcpy.o -L. -L/usr/lib/x86_64-linux-gnu -L. -Wl,-z,relro
-Wl,-z,now -fstack-protector-strong -rdynamic -Wl,-export-dynamic
-Wl,-wrap,memcpy -Wl,-z,relro -Wl,-z,now -lruby-2.7 -lm -lc
make[2]: Leaving directory
'/<<PKGBUILDDIR>>/debian/ruby-google-protobuf/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/google-protobuf-3.17.3/ruby/ext/google/protobuf_c'
current directory:
/<<PKGBUILDDIR>>/debian/ruby-google-protobuf/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/google-protobuf-3.17.3/ruby/ext/google/protobuf_c
["make", "V=1", "CC=gcc -fdebug-prefix-map=/<<PKGBUILDDIR>>=.",
"CXX=g++ -fdebug-prefix-map=/<<PKGBUILDDIR>>=.", "DESTDIR=", "install"]
make[2]: Entering directory
'/<<PKGBUILDDIR>>/debian/ruby-google-protobuf/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/google-protobuf-3.17.3/ruby/ext/google/protobuf_c'
/bin/mkdir -p . ./.gem.20210623-865037-1bbjc27/google
exit > .sitearchdir.-.google.time
/usr/bin/install -c -m 0755 protobuf_c.so
./.gem.20210623-865037-1bbjc27/google
make[2]: Leaving directory
'/<<PKGBUILDDIR>>/debian/ruby-google-protobuf/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/google-protobuf-3.17.3/ruby/ext/google/protobuf_c'
current directory:
/<<PKGBUILDDIR>>/debian/ruby-google-protobuf/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/google-protobuf-3.17.3/ruby/ext/google/protobuf_c
/usr/bin/ruby2.7 -I /usr/lib/ruby/vendor_ruby -r
./siteconf20210623-865037-6gkltl.rb extconf.rb
current directory:
/<<PKGBUILDDIR>>/debian/ruby-google-protobuf/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/google-protobuf-3.17.3/ruby/ext/google/protobuf_c
make V\=1 CC\=gcc\ -fdebug-prefix-map\=/<<PKGBUILDDIR>>\=. CXX\=g++\
-fdebug-prefix-map\=/<<PKGBUILDDIR>>\=. DESTDIR\= clean
current directory:
/<<PKGBUILDDIR>>/debian/ruby-google-protobuf/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/google-protobuf-3.17.3/ruby/ext/google/protobuf_c
make V\=1 CC\=gcc\ -fdebug-prefix-map\=/<<PKGBUILDDIR>>\=. CXX\=g++\
-fdebug-prefix-map\=/<<PKGBUILDDIR>>\=. DESTDIR\=
current directory:
/<<PKGBUILDDIR>>/debian/ruby-google-protobuf/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0/gems/google-protobuf-3.17.3/ruby/ext/google/protobuf_c
make V\=1 CC\=gcc\ -fdebug-prefix-map\=/<<PKGBUILDDIR>>\=. CXX\=g++\
-fdebug-prefix-map\=/<<PKGBUILDDIR>>\=. DESTDIR\= install
Successfully installed google-protobuf-3.17.3
1 gem installed
cd
/<<PKGBUILDDIR>>/debian/ruby-google-protobuf/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0
rm -rf bin
rm -rf build_info
rm -rf cache
rm -rf doc
find extensions -name mkmf.log -delete
find extensions -name gem_make.out -delete
cd gems/google-protobuf-3.17.3
rm -rf ruby/ext/google/protobuf_c
rm -f lib/google/protobuf_c.so
chmod 644
find lib/ -type d -empty -delete
cd -
cd -
/usr/bin/ruby2.7 /usr/bin/gem2deb-test-runner
┌──────────────────────────────────────────────────────────────────────────────┐
│ Checking Rubygems dependency resolution on ruby2.7
│
└──────────────────────────────────────────────────────────────────────────────┘
GEM_PATH=/<<PKGBUILDDIR>>/debian/ruby-google-protobuf/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0:/<<PKGBUILDDIR>>/debian/.debhelper/generated/_source/home/.local/share/gem/ruby/2.7.0:/var/lib/gems/2.7.0:/usr/local/lib/ruby/gems/2.7.0:/usr/lib/ruby/gems/2.7.0:/usr/lib/x86_64-linux-gnu/ruby/gems/2.7.0:/usr/share/rubygems-integration/2.7.0:/usr/share/rubygems-integration/all:/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0
ruby2.7 -e gem\ \"google-protobuf\"
┌──────────────────────────────────────────────────────────────────────────────┐
│ Run tests for ruby2.7: no test suite!
│
└──────────────────────────────────────────────────────────────────────────────┘
┌──────────────────────────────────────────────────────────────────────────────┐
│ dh_ruby --install finished
│
└──────────────────────────────────────────────────────────────────────────────┘