Control: tag -1 + patch
Control: severity -1 important

On Thu, Mar 10, 2016 at 07:55:51PM +0100, Guido Günther wrote:
> On Sat, Aug 15, 2015 at 06:32:25PM +0200, Guido De Rosa wrote:
> [..snip..]
> > [Suggested solution / approach]
> > 
> > I guess the issue can be easily fixed by adding the gemspec file taken
> > from the original gem
> 
> 
> Did you check that this works? If so, could you provide a tested patch?

I have one, attached.

This is actually a requirement for the vagrant-libvirt vagrant plugin to
work correctly, so I am taking the liberty of raising the severity to
important again.

It would be very nice if this could be fixed sooner rather than later. I
can also NMU if you are OK with it.

Thanks
diff -Nru ruby-libvirt-0.6.0/debian/changelog ruby-libvirt-0.6.0/debian/changelog
--- ruby-libvirt-0.6.0/debian/changelog	2016-03-10 16:04:32.000000000 -0300
+++ ruby-libvirt-0.6.0/debian/changelog	2016-04-17 14:36:34.000000000 -0300
@@ -1,3 +1,16 @@
+ruby-libvirt (0.6.0-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * debian/rules: remove manual test run in favor of gem2deb's own mechanism
+    for running tests, avoiding building the C extension twice on every Debian
+    build.
+    * This also gives us autopkgtest support almost for free; so add
+      `Testsuite: autopkgtest` in debian/control
+  * debian/rules: call debian/gemspec.rake to build a gemspec during the build
+    (Closes: #795603)
+
+ -- Antonio Terceiro <terce...@debian.org>  Sun, 17 Apr 2016 14:04:22 -0300
+
 ruby-libvirt (0.6.0-1) unstable; urgency=medium
 
   * [dc7846f] New upstream version 0.6.0
diff -Nru ruby-libvirt-0.6.0/debian/control ruby-libvirt-0.6.0/debian/control
--- ruby-libvirt-0.6.0/debian/control	2016-03-10 16:03:34.000000000 -0300
+++ ruby-libvirt-0.6.0/debian/control	2016-04-17 14:38:15.000000000 -0300
@@ -7,11 +7,12 @@
 # for the tests
  rake,
  libvirt-daemon
-Standards-Version: 3.9.6
-Vcs-Git: git://anonscm.debian.org/git/pkg-libvirt/ruby-libvirt.git
-Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-libvirt/ruby-libvirt.git;a=summary
+Standards-Version: 3.9.7
+Vcs-Git: https://anonscm.debian.org/git/pkg-libvirt/ruby-libvirt.git
+Vcs-Browser: https://anonscm.debian.org/cgit/pkg-libvirt/ruby-libvirt.git
 Homepage: http://libvirt.org/ruby/
 XS-Ruby-Versions: all
+Testsuite: autopkgtest
 
 Package: ruby-libvirt
 Architecture: any
diff -Nru ruby-libvirt-0.6.0/debian/gemspec.rake ruby-libvirt-0.6.0/debian/gemspec.rake
--- ruby-libvirt-0.6.0/debian/gemspec.rake	1969-12-31 21:00:00.000000000 -0300
+++ ruby-libvirt-0.6.0/debian/gemspec.rake	2016-04-17 14:26:33.000000000 -0300
@@ -0,0 +1,8 @@
+load 'Rakefile'
+
+gemspec = "ruby-libvirt-#{PKG_VERSION}.gemspec"
+
+task :gemspec => gemspec
+file gemspec do |t|
+  File.open(t.name, 'w') { |f| f.write(SPEC.to_ruby) }
+end
diff -Nru ruby-libvirt-0.6.0/debian/ruby-tests.rake ruby-libvirt-0.6.0/debian/ruby-tests.rake
--- ruby-libvirt-0.6.0/debian/ruby-tests.rake	1969-12-31 21:00:00.000000000 -0300
+++ ruby-libvirt-0.6.0/debian/ruby-tests.rake	2016-04-17 14:34:18.000000000 -0300
@@ -0,0 +1,12 @@
+topdir = File.dirname(File.dirname(__FILE__))
+ENV['XDG_RUNTIME_DIR'] = topdir
+ENV['XDG_CONFIG_HOME'] = topdir
+ENV['LIBVIRT_DEFAULT_URI'] = 'test:///default'
+ENV['RUBY_LIBVIRT_TEST_URI'] = 'test:///default'
+
+require 'gem2deb/rake/testtask'
+Gem2Deb::Rake::TestTask.new do |t|
+  t.test_files = [ 'tests/test_nodedevice.rb',
+                   'tests/test_open.rb',
+                   'tests/test_stream.rb' ]
+end
diff -Nru ruby-libvirt-0.6.0/debian/rules ruby-libvirt-0.6.0/debian/rules
--- ruby-libvirt-0.6.0/debian/rules	2016-02-04 14:26:48.000000000 -0200
+++ ruby-libvirt-0.6.0/debian/rules	2016-04-17 14:05:26.000000000 -0300
@@ -4,8 +4,10 @@
 %:
 	dh $@ --buildsystem=ruby --with ruby
 
-override_dh_auto_test:
-	XDG_RUNTIME_DIR=$(CURDIR) \
-	XDG_CONFIG_HOME=$(CURDIR) \
-	LIBVIRT_DEFAULT_URI=test:///default \
-	RUBY_LIBVIRT_TEST_URI=test:///default rake test
+override_dh_auto_install:
+	rake -f debian/gemspec.rake gemspec
+	dh_auto_install
+
+override_dh_auto_clean:
+	$(RM) *.gemspec
+	dh_auto_clean
diff -Nru ruby-libvirt-0.6.0/debian/tests/control ruby-libvirt-0.6.0/debian/tests/control
--- ruby-libvirt-0.6.0/debian/tests/control	1969-12-31 21:00:00.000000000 -0300
+++ ruby-libvirt-0.6.0/debian/tests/control	2016-04-17 14:22:51.000000000 -0300
@@ -0,0 +1,2 @@
+Test-Command: rake -f debian/gemspec.rake gemspec && gem2deb-test-runner --autopkgtest --check-dependencies 2>&1
+Depends: @, libvirt-dev,pkg-config,rake,libvirt-daemon, gem2deb-test-runner

Attachment: signature.asc
Description: PGP signature

Reply via email to