[DRE-maint] Bug#591419: librmagick-ruby should not be installable with imagemagick

Nish Aravamudan nish.aravamudan at canonical.com
Mon Dec 5 08:18:07 UTC 2016


On 03.12.2016 [10:24:19 -0200], Antonio Terceiro wrote:
> On Fri, Dec 02, 2016 at 11:12:21AM -0800, Nishanth Aravamudan wrote:
> > Package: ruby-rmagick
> > Version: 2.15.4+dfsg-2
> > Followup-For: Bug #591419
> > User: ubuntu-devel at lists.ubuntu.com
> > Usertags: origin-ubuntu zesty ubuntu-patch
> > 
> > I think this should do what is expected. Basically, AIUI, there is a
> > more-than-ABI-specifiable (due to issues upstream and possibly in the
> > Debian package itself (cf.:
> > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=846385) dependency
> > between ruby-rmagick and the version of imagemagick compiled against. To
> > that end, add an overriding dependency at build-time.
> > 
> > I think what's actually needed currently in ruby-rmagick's case in
> > Debian is a rebuild against the bumped version of imagemagick; if that's
> > done, the autopkgtests would pass. But expressing this dependency
> > explicilty would have caught that and prevented imagemagick from
> > changing in Debian until ruby-rmagick had been rebuilt?
> > 
> > Comments more than welcome and appreciated.
> > 
> > Thanks!
> > -Nish
> > 
> > ## ---------------- REPLACE THIS WITH ACTUAL INFORMATION ---------------------
> > ## Please add all necessary information about why the change needed to go in
> > ## Ubuntu, quote policy, spec or any other background material and why it can
> > ## and should be used in Debian too.  If the patch is composed of multiple
> > ## independent pieces, please send them as separate bug reports.
> > ## ---------------- REPLACE THIS WITH ACTUAL INFORMATION ---------------------
> > 
> > 
> >   * d/{control,rules}: use a new substitution variable to specify the
> >     hard-dependency on the version of ImageMagick built against
> >     (Closes: #591419). Thanks to Adam Conrad for the shell code.
> > 
> > Thanks for considering the patch.
> > 
> > *** /tmp/tmp6FrTwc/ruby-rmagick_2.15.4+dfsg-2ubuntu1.debdiff
> > diff -Nru ruby-rmagick-2.15.4+dfsg/debian/control ruby-rmagick-2.15.4+dfsg/debian/control
> > --- ruby-rmagick-2.15.4+dfsg/debian/control	2016-08-16 07:29:37.000000000 -0700
> > +++ ruby-rmagick-2.15.4+dfsg/debian/control	2016-12-01 15:36:05.000000000 -0800
> > @@ -28,7 +28,8 @@
> >  XB-Ruby-Versions: ${ruby:Versions}
> >  Depends: ruby | ruby-interpreter,
> >           ${misc:Depends},
> > -         ${shlibs:Depends}
> > +         ${shlibs:Depends},
> > +         ${imagemagick:Depends}
> >  Description: ImageMagick API for Ruby
> >   RMagick is an interface between the Ruby programming language and the
> >   ImageMagick image processing library.
> > diff -Nru ruby-rmagick-2.15.4+dfsg/debian/rules ruby-rmagick-2.15.4+dfsg/debian/rules
> > --- ruby-rmagick-2.15.4+dfsg/debian/rules	2016-08-16 07:29:37.000000000 -0700
> > +++ ruby-rmagick-2.15.4+dfsg/debian/rules	2016-12-01 15:36:05.000000000 -0800
> > @@ -12,3 +12,11 @@
> >  	find debian/*/usr/share/doc/ruby-rmagick-doc/ \
> >  		-type f -executable -exec \
> >  		chmod -x '{}' ';'
> > +
> > +override_dh_gencontrol:
> > +	$(eval IMAGEMAGICK_DEP := \
> > +		$(shell find debian/ruby-rmagick/ -name RMagick2.so -exec ldd '{}' ';' | \
> > +		awk '/\/libMagickCore/ {print $$3}' | xargs dpkg -S | \
> > +		awk '{print $$1}' | sed 's/:$$//' | xargs dpkg-query -W \
> > +		-f='$${Package} (>= $${Version})'))
> > +	dh_gencontrol -- -Vimagemagick:Depends='$(IMAGEMAGICK_DEP)'
> 
> Hi, thanks for the patch.
> 
> However, I fail to see how this would fix the issue, since it won't help
> with the very problem that a new version of ImageMagick that has no
> SONAME bump breaks ruby-rmagick.

So you're right that it does not "fix" the issue of ImageMagick itself
-- given that is something (as you've responded in the other bug) that
src:imagemagick needs to fix.

> There is a new version of ruby-rmagick which claims support for
> ImageMagick 6.9, and apparently shifts the dependency from libmagickcore
> to libmagickwand ... this might be the correct fix.

However, what the above patch does is, at least for libMagickCore itself
(and that could be adjusted for libMagickWand as well) is ignore the ABI
values from the symbols file -- that's not entirely 'correct', but what
it means is that if the ABI is not correctly describing minimum version,
we will insert a dependency on the version of imagemagick actually used
to build the package at build-time. That does mean the dependency may be
strictly higher than it needs to be, but it also helps accurately
reflect that ruby-rmagick should be rebuilt (so it forces an imagemagick
transition of sorts on every version bump?). Although perhaps the shell
snippet should make the dependency strictly =  (rather than >=).

Thanks for the feedback!

-Nish

-- 
Nishanth Aravamudan
Ubuntu Server
Canonical Ltd



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