[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1006289: marisa's autopkgtest regressed since rebuild for ruby3.0 as default



X-Debbugs-CC: kanashiro@debian.org terceiro@debian.org gunnarhj@debian.org

Hi all,

(see bottom)

在 2022-02-22星期二的 22:05 +0100,Paul Gevers写道:
> Source: marisa
> Version: 0.2.6-8
> Severity: serious
> X-Debbugs-Cc: kanashiro@debian.org, terceiro@debian.org
> 
> Dear maintainer,
> 
> As part of the ongoing transition from ruby2.7 as default ruby to
> ruby3.0 as default, your package got rebuild. In that rebuild it
> correctly picked up a dependency on libruby3.0, but as it also depends
> on ruby (unversioned) it seems to not be able to work in testing, as
> seen by the autopkgtest regression.
> 
> I don't know what the best way forward is, but I think the right
> version of ruby needs to be detected during build and included in
> ${misc:Depends} or something similar. I have included two ruby
> maintainers in the X-Debbugs-CC for advice.
> 
> Paul
> 
> https://ci.debian.net/data/autopkgtest/testing/amd64/m/marisa/19472910/log.gz
> 
> [...]
> 
> Setting up libruby3.0:amd64 (3.0.2-7) ...
> Setting up libruby2.7:amd64 (2.7.4-1+b1) ...
> Setting up ruby2.7 (2.7.4-1+b1) ...
> Setting up ruby (1:2.7.6) ...
> 
> [...]
> 
> autopkgtest [20:54:51]: test ruby: [-----------------------
> === ruby ===
> /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in
> `require': cannot load such file -- marisa (LoadError)
>         from
> /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in
> `require'
>         from bindings/ruby/sample.rb:1:in `<main>'
> autopkgtest [20:54:51]: test ruby: -----------------------]

Compared to
https://salsa.debian.org/input-method-team/marisa/-/merge_requests/1 ,
I am more into a more generic solution to avoid version hardcoding:

diff --git a/debian/control b/debian/control
index 39c36da..dec2dc7 100644
--- a/debian/control
+++ b/debian/control
@@ -95,7 +95,7 @@ Architecture: any
 Multi-Arch: foreign
 Depends:
  libmarisa0 (= ${binary:Version}),
- ruby,
+ ruby (>= ${ruby:Build-Version}),
  ${misc:Depends},
  ${shlibs:Depends},
 Description: Ruby bindings for MARISA
diff --git a/debian/rules b/debian/rules
index 20a945c..9acebb2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -79,3 +79,9 @@ override_dh_auto_install:
        rm $(CURDIR)/debian/libmarisa-perl$(PERL_VENDOR_ARCH)/sample.pl
        # install ruby modules
        cd bindings/ruby; make install DESTDIR=$(CURDIR)/debian/ruby-marisa
+
+# record minimum ruby version requirement
+# see https://bugs.debian.org/1006289
+override_dh_gencontrol:
+       dh_gencontrol -- \
+               -V"ruby:Build-Version=$$(dpkg-query -f='$${Version}' -W ruby)"

I will make an upload with this solution to see how things works. The testing
migration will unfortunately be blocked till ruby3.0 migrates, but that should
be the expected behavior. I really don't want to hack into marisa's (custom)
ruby building chain to support multiple ruby versions.

BTW: it would be great if Ruby could provide some similar substvar (or via
${ruby:Depends}), though it is not possible for now since ${ruby:Depends} is
currently from gem2deb and not for non-gem packages.

Thank you all for caring marisa package!

Best,
Boyuan Yang

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: