[Pkg-libvirt-commits] [ruby-libvirt] 04/05: Drop patches applied upstream

Guido Guenther agx at moszumanska.debian.org
Tue Jan 13 07:45:44 UTC 2015


This is an automated email from the git hooks/post-receive script.

agx pushed a commit to annotated tag debian/0.5.2-1
in repository ruby-libvirt.

commit a0420a3a4f7a7e22025fe8b53f5de19b66d8ad95
Author: Guido Günther <agx at sigxcpu.org>
Date:   Mon Jan 12 08:20:21 2015 +0100

    Drop patches applied upstream
    
        0001-Don-t-free-more-entries-than-we-retrieved.patch
        0002-Allow-to-set-URI-via-environment-variable.patch
---
 ...Don-t-free-more-entries-than-we-retrieved.patch |  86 ----------
 ...Allow-to-set-URI-via-environment-variable.patch | 183 ---------------------
 ...Don-t-run-tests-that-require-qemu-system.patch} |   2 +-
 debian/patches/series                              |   4 +-
 4 files changed, 2 insertions(+), 273 deletions(-)

diff --git a/debian/patches/0001-Don-t-free-more-entries-than-we-retrieved.patch b/debian/patches/0001-Don-t-free-more-entries-than-we-retrieved.patch
deleted file mode 100644
index 1fa276d..0000000
--- a/debian/patches/0001-Don-t-free-more-entries-than-we-retrieved.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-From: =?utf-8?q?Guido_G=C3=BCnther?= <agx at sigxcpu.org>
-Date: Tue, 7 Jan 2014 20:06:26 +0100
-Subject: Don't free more entries than we retrieved
-
-The vir*List* functions return the number of fetched entries. We mustn't
-free more, otherwise we'll crash like
-
- #0  0xb779d424 in __kernel_vsyscall ()
- #1  0xb733981f in __GI_raise (sig=sig at entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
- #2  0xb733ccd3 in __GI_abort () at abort.c:90
- #3  0xb7376275 in __libc_message (do_abort=do_abort at entry=2, fmt=fmt at entry=0xb74767d0 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/unix/sysv/linux/libc_fatal.c:199
- #4  0xb7380e52 in malloc_printerr (action=<optimized out>, str=<optimized out>, ptr=0xb7087000) at malloc.c:4923
- #5  0xb7381b90 in _int_free (av=0xb74b7440 <main_arena>, p=0xb7086ff8, have_lock=0) at malloc.c:3779
- #6  0xb75c059f in ruby_xfree () from /usr/lib/libruby-1.9.1.so.1.9
- #7  0xb7076448 in ruby_libvirt_generate_list () from /usr/lib/ruby/vendor_ruby/1.9.1/i486-linux/_libvirt.so
-...
-
-since we're trying to free random addresses.
----
- ext/libvirt/connect.c    | 4 ++--
- ext/libvirt/domain.c     | 2 +-
- ext/libvirt/nodedevice.c | 2 +-
- ext/libvirt/storage.c    | 2 +-
- 4 files changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/ext/libvirt/connect.c b/ext/libvirt/connect.c
-index 36cac20..1af64a1 100644
---- a/ext/libvirt/connect.c
-+++ b/ext/libvirt/connect.c
-@@ -67,7 +67,7 @@
-         names = alloca(sizeof(char *) * num);                           \
-         r = virConnectList##objs(ruby_libvirt_connect_get(c), names, num); \
-         ruby_libvirt_raise_error_if(r < 0, e_RetrieveError, "virConnectList" # objs, ruby_libvirt_connect_get(c)); \
--        return ruby_libvirt_generate_list(num, names);                  \
-+        return ruby_libvirt_generate_list(r < 0 ? 0 : r, names);        \
-     } while(0)
- 
- static VALUE c_connect;
-@@ -1508,7 +1508,7 @@ static VALUE libvirt_connect_list_nodedevices(int argc, VALUE *argv, VALUE c)
-     ruby_libvirt_raise_error_if(r < 0, e_RetrieveError, "virNodeListDevices",
-                                 ruby_libvirt_connect_get(c));
- 
--    return ruby_libvirt_generate_list(num, names);
-+    return ruby_libvirt_generate_list(r < 0 ? 0 : r, names);
- }
- 
- /*
-diff --git a/ext/libvirt/domain.c b/ext/libvirt/domain.c
-index ddce2d8..bc46753 100644
---- a/ext/libvirt/domain.c
-+++ b/ext/libvirt/domain.c
-@@ -1532,7 +1532,7 @@ static VALUE libvirt_domain_list_snapshots(int argc, VALUE *argv, VALUE d)
-                                 "virDomainSnapshotListNames",
-                                 ruby_libvirt_connect_get(d));
- 
--    return ruby_libvirt_generate_list(num, names);
-+    return ruby_libvirt_generate_list(r < 0 ? 0 : r, names);
- }
- 
- /*
-diff --git a/ext/libvirt/nodedevice.c b/ext/libvirt/nodedevice.c
-index 98b3715..041cda2 100644
---- a/ext/libvirt/nodedevice.c
-+++ b/ext/libvirt/nodedevice.c
-@@ -124,7 +124,7 @@ static VALUE libvirt_nodedevice_list_caps(VALUE c)
-                                 "virNodeDeviceListCaps",
-                                 ruby_libvirt_connect_get(c));
- 
--    return ruby_libvirt_generate_list(num, names);
-+    return ruby_libvirt_generate_list(r < 0 ? 0 : r, names);
- }
- 
- /*
-diff --git a/ext/libvirt/storage.c b/ext/libvirt/storage.c
-index 4b96d2e..008410a 100644
---- a/ext/libvirt/storage.c
-+++ b/ext/libvirt/storage.c
-@@ -340,7 +340,7 @@ static VALUE libvirt_storage_pool_list_volumes(VALUE p)
-                                 "virStoragePoolListVolumes",
-                                 ruby_libvirt_connect_get(p));
- 
--    return ruby_libvirt_generate_list(num, names);
-+    return ruby_libvirt_generate_list(r < 0 ? 0 : r, names);
- }
- 
- /*
diff --git a/debian/patches/0002-Allow-to-set-URI-via-environment-variable.patch b/debian/patches/0002-Allow-to-set-URI-via-environment-variable.patch
deleted file mode 100644
index 82923fb..0000000
--- a/debian/patches/0002-Allow-to-set-URI-via-environment-variable.patch
+++ /dev/null
@@ -1,183 +0,0 @@
-From: =?utf-8?q?Guido_G=C3=BCnther?= <agx at sigxcpu.org>
-Date: Tue, 7 Jan 2014 21:35:39 +0100
-Subject: Allow to set URI via environment variable
-
-This allows us to run tests with the destdriver like:
-
-  RUBY_LIBVIRT_TEST_URI=test:///default \
-  RUBYLIB=lib/:ext/libvirt/ \
-  ruby tests/test_open.rb
----
- tests/test_nodedevice.rb |  2 +-
- tests/test_open.rb       | 36 ++++++++++++++++++------------------
- tests/test_stream.rb     |  2 +-
- tests/test_utils.rb      |  2 ++
- 4 files changed, 22 insertions(+), 20 deletions(-)
-
-diff --git a/tests/test_nodedevice.rb b/tests/test_nodedevice.rb
-index 7da1a5f..50a1304 100644
---- a/tests/test_nodedevice.rb
-+++ b/tests/test_nodedevice.rb
-@@ -9,7 +9,7 @@ require 'test_utils.rb'
- 
- set_test_object("nodedevice")
- 
--conn = Libvirt::open("qemu:///system")
-+conn = Libvirt::open(URI)
- 
- # TESTGROUP: nodedevice.name
- testnode = conn.lookup_nodedevice_by_name(conn.list_nodedevices[0])
-diff --git a/tests/test_open.rb b/tests/test_open.rb
-index 17baa93..c67eaab 100644
---- a/tests/test_open.rb
-+++ b/tests/test_open.rb
-@@ -21,49 +21,49 @@ expect_success(Libvirt, "nil arg", "version", nil) {|x| x.class == Array and x.l
- expect_success(Libvirt, "Test arg", "version", "Test") {|x| x.class == Array and x.length == 2}
- 
- # TESTGROUP: Libvirt::open
--expect_too_many_args(Libvirt, "open", "qemu:///system", 1)
-+expect_too_many_args(Libvirt, "open", URI, 1)
- expect_connect_error("open", "foo:///system")
- conn = expect_success(Libvirt, "no args", "open") {|x| x.class == Libvirt::Connect }
- conn.close
--conn = expect_success(Libvirt, "qemu:///system", "open", "qemu:///system") {|x| x.class == Libvirt::Connect }
-+conn = expect_success(Libvirt, URI, "open", URI) {|x| x.class == Libvirt::Connect }
- conn.close
- conn = expect_success(Libvirt, "nil arg", "open", nil) {|x| x.class == Libvirt::Connect }
- conn.close
- 
- # TESTGROUP: Libvirt::open_read_only
--expect_too_many_args(Libvirt, "open_read_only", "qemu:///system", 1)
-+expect_too_many_args(Libvirt, "open_read_only", URI, 1)
- expect_connect_error("open_read_only", "foo:///system")
- conn = expect_success(Libvirt, "no args", "open_read_only") {|x| x.class == Libvirt::Connect }
- conn.close
--conn = expect_success(Libvirt, "qemu:///system", "open_read_only", "qemu:///system") {|x| x.class == Libvirt::Connect }
-+conn = expect_success(Libvirt, URI, "open_read_only", URI) {|x| x.class == Libvirt::Connect }
- conn.close
- conn = expect_success(Libvirt, "nil arg", "open_read_only", nil) {|x| x.class == Libvirt::Connect }
- conn.close
- 
- # TESTGROUP: Libvirt::open_auth
--expect_too_many_args(Libvirt, "open_auth", "qemu:///system", [], "hello there", 1, 2)
-+expect_too_many_args(Libvirt, "open_auth", URI, [], "hello there", 1, 2)
- expect_connect_error("open_auth", "foo:///system")
- expect_invalid_arg_type(Libvirt, "open_auth", 1)
--expect_invalid_arg_type(Libvirt, "open_auth", "qemu:///system", [], "hello", "foo")
-+expect_invalid_arg_type(Libvirt, "open_auth", URI, [], "hello", "foo")
- 
- conn = expect_success(Libvirt, "no args", "open_auth")  {|x| x.class == Libvirt::Connect }
- conn.close
- 
--conn = expect_success(Libvirt, "uri arg", "open_auth", "qemu:///system") {|x| x.class == Libvirt::Connect }
-+conn = expect_success(Libvirt, "uri arg", "open_auth", URI) {|x| x.class == Libvirt::Connect }
- conn.close
- 
--conn = expect_success(Libvirt, "uri and empty cred args", "open_auth", "qemu:///system", []) {|x| x.class == Libvirt::Connect }
-+conn = expect_success(Libvirt, "uri and empty cred args", "open_auth", URI, []) {|x| x.class == Libvirt::Connect }
- conn.close
- 
--conn = expect_success(Libvirt, "uri and full cred args", "open_auth", "qemu:///system", [Libvirt::CRED_AUTHNAME, Libvirt::CRED_PASSPHRASE]) {|x| x.class == Libvirt::Connect }
-+conn = expect_success(Libvirt, "uri and full cred args", "open_auth", URI, [Libvirt::CRED_AUTHNAME, Libvirt::CRED_PASSPHRASE]) {|x| x.class == Libvirt::Connect }
- conn.close
- 
--conn = expect_success(Libvirt, "uri, full cred, and user args", "open_auth", "qemu:///system", [Libvirt::CRED_AUTHNAME, Libvirt::CRED_PASSPHRASE], "hello") {|x| x.class == Libvirt::Connect }
-+conn = expect_success(Libvirt, "uri, full cred, and user args", "open_auth", URI, [Libvirt::CRED_AUTHNAME, Libvirt::CRED_PASSPHRASE], "hello") {|x| x.class == Libvirt::Connect }
- conn.close
- 
- # equivalent to expect_invalid_arg_type
- begin
--  conn = Libvirt::open_auth("qemu:///system", {}) do |cred|
-+  conn = Libvirt::open_auth(URI, {}) do |cred|
-   end
- rescue TypeError => e
-   puts_ok "#{$test_object}.open_auth invalid arg type threw #{TypeError.to_s}"
-@@ -73,7 +73,7 @@ end
- 
- # equivalent to expect_invalid_arg_type
- begin
--  conn = Libvirt::open_auth("qemu:///system", 1) do |cred|
-+  conn = Libvirt::open_auth(URI, 1) do |cred|
-   end
- rescue TypeError => e
-   puts_ok "#{$test_object}.open_auth invalid arg type threw #{TypeError.to_s}"
-@@ -83,7 +83,7 @@ end
- 
- # equivalent to expect_invalid_arg_type
- begin
--  conn = Libvirt::open_auth("qemu:///system", 'foo') do |cred|
-+  conn = Libvirt::open_auth(URI, 'foo') do |cred|
-   end
- rescue TypeError => e
-   puts_ok "#{$test_object}.open_auth invalid arg type threw #{TypeError.to_s}"
-@@ -93,7 +93,7 @@ end
- 
- # equivalent to "expect_success"
- begin
--  conn = Libvirt::open_auth("qemu:///system", [Libvirt::CRED_AUTHNAME, Libvirt::CRED_PASSPHRASE], "hello") do |cred|
-+  conn = Libvirt::open_auth(URI, [Libvirt::CRED_AUTHNAME, Libvirt::CRED_PASSPHRASE], "hello") do |cred|
-     if not cred["userdata"].nil?
-       puts "userdata is #{cred["userdata"]}"
-     end
-@@ -122,7 +122,7 @@ end
- 
- # equivalent to "expect_success"
- begin
--  conn = Libvirt::open_auth("qemu:///system") do |cred|
-+  conn = Libvirt::open_auth(URI) do |cred|
-   end
- 
-   puts_ok "Libvirt.open_auth uri, succeeded"
-@@ -135,7 +135,7 @@ end
- 
- # equivalent to "expect_success"
- begin
--  conn = Libvirt::open_auth("qemu:///system", [Libvirt::CRED_AUTHNAME, Libvirt::CRED_PASSPHRASE], "hello", Libvirt::CONNECT_RO) do |cred|
-+  conn = Libvirt::open_auth(URI, [Libvirt::CRED_AUTHNAME, Libvirt::CRED_PASSPHRASE], "hello", Libvirt::CONNECT_RO) do |cred|
-     if not cred["userdata"].nil?
-       puts "userdata is #{cred["userdata"]}"
-     end
-@@ -163,7 +163,7 @@ rescue => e
- end
- 
- # TESTGROUP: Libvirt::event_invoke_handle_callback
--conn = Libvirt::open("qemu:///system")
-+conn = Libvirt::open(URI)
- 
- expect_too_many_args(Libvirt, "event_invoke_handle_callback", 1, 2, 3, 4, 5)
- expect_too_few_args(Libvirt, "event_invoke_handle_callback")
-@@ -188,7 +188,7 @@ expect_invalid_arg_type(Libvirt, "event_invoke_handle_callback", 1, 1, 1, { "lib
- conn.close
- 
- # TESTGROUP: Libvirt::event_invoke_timeout_callback
--conn = Libvirt::open("qemu:///system")
-+conn = Libvirt::open(URI)
- 
- expect_too_many_args(Libvirt, "event_invoke_timeout_callback", 1, 2, 3)
- expect_too_few_args(Libvirt, "event_invoke_timeout_callback")
-diff --git a/tests/test_stream.rb b/tests/test_stream.rb
-index 07ec222..e272104 100644
---- a/tests/test_stream.rb
-+++ b/tests/test_stream.rb
-@@ -9,7 +9,7 @@ require 'test_utils.rb'
- 
- set_test_object("stream")
- 
--conn = Libvirt::open("qemu:///system")
-+conn = Libvirt::open(URI)
- 
- # TESTGROUP: stream.send
- st = conn.stream
-diff --git a/tests/test_utils.rb b/tests/test_utils.rb
-index 1bac1cc..519de27 100644
---- a/tests/test_utils.rb
-+++ b/tests/test_utils.rb
-@@ -2,6 +2,8 @@ $FAIL = 0
- $SUCCESS = 0
- $SKIPPED = 0
- 
-+URI = ENV['RUBY_LIBVIRT_TEST_URI'] || "qemu:///system"
-+
- $GUEST_BASE = '/var/lib/libvirt/images/ruby-libvirt-tester'
- $GUEST_DISK = $GUEST_BASE + '.qcow2'
- $GUEST_SAVE = $GUEST_BASE + '.save'
diff --git a/debian/patches/0003-Don-t-run-tests-that-require-qemu-system.patch b/debian/patches/Don-t-run-tests-that-require-qemu-system.patch
similarity index 97%
rename from debian/patches/0003-Don-t-run-tests-that-require-qemu-system.patch
rename to debian/patches/Don-t-run-tests-that-require-qemu-system.patch
index 0710f8b..82804b1 100644
--- a/debian/patches/0003-Don-t-run-tests-that-require-qemu-system.patch
+++ b/debian/patches/Don-t-run-tests-that-require-qemu-system.patch
@@ -8,7 +8,7 @@ We only want to run tests for now that work with the testdriver
  1 file changed, 3 insertions(+), 5 deletions(-)
 
 diff --git a/Rakefile b/Rakefile
-index 753a096..3a2b99b 100644
+index 4155f0e..015308a 100644
 --- a/Rakefile
 +++ b/Rakefile
 @@ -75,11 +75,9 @@ task :build => LIBVIRT_MODULE
diff --git a/debian/patches/series b/debian/patches/series
index cc73464..10e079c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1 @@
-0001-Don-t-free-more-entries-than-we-retrieved.patch
-0002-Allow-to-set-URI-via-environment-variable.patch
-0003-Don-t-run-tests-that-require-qemu-system.patch
+Don-t-run-tests-that-require-qemu-system.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/ruby-libvirt.git



More information about the Pkg-libvirt-commits mailing list