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

Nishanth Aravamudan nish.aravamudan at canonical.com
Fri Dec 2 19:12:21 UTC 2016


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)'


-- System Information:
Debian Release: stretch/sid
  APT prefers yakkety-updates
  APT policy: (500, 'yakkety-updates'), (500, 'yakkety-security'), (500, 'yakkety'), (100, 'yakkety-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.8.0-27-generic (SMP w/4 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

-- 
Nishanth Aravamudan
Ubuntu Server
Canonical Ltd



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