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

Bug#988084: unblock: ruby-rugged/1.1.0+ds-4



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package ruby-rugged

Version 1.1.0+ds-3 in testing was trying to access internet during tests
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=987650

As indicated in the bug report, Ubuntu had a patch for that issue
https://git.launchpad.net/~usd-import-team/ubuntu/+source/ruby-rugged/tree/debian/patches/ubuntu-skip-network-tests.patch?id=2f18d60418e71d96ef34c5627370752f94933da6
(I just removed the part where they modified test/remote_test.rb which
is run in Debian only for autopkgtest)

[ Reason ]
Migrating this new version would fix an FTBFS bug caused by those test
failures when the building environment has no access to the internet.
(*and* the internet must not be accessed during build!)

[ Impact ]

[ Tests ]
Five tests from the testsuite are thus now skipped during the build.


[ Risks ]
The code of the library itself has not changed. So risks are (close to)
zero.

[ Checklist ]
  [x] all changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in testing

unblock ruby-rugged/1.1.0+ds-4
diff -Nru ruby-rugged-1.1.0+ds/debian/changelog ruby-rugged-1.1.0+ds/debian/changelog
--- ruby-rugged-1.1.0+ds/debian/changelog	2021-02-03 10:09:43.000000000 +0100
+++ ruby-rugged-1.1.0+ds/debian/changelog	2021-05-04 15:27:51.000000000 +0200
@@ -1,3 +1,12 @@
+ruby-rugged (1.1.0+ds-4) unstable; urgency=high
+
+  * Add patch to really prevent network access in tests (Closes: #987650)
+    Thanks Olivier Tilloy <olivier.tilloy@canonical.com> for the initial
+    patch, adapted here.
+  * Remove duplicate build-dependency on gem2deb
+
+ -- Cédric Boutillier <boutil@debian.org>  Tue, 04 May 2021 15:27:51 +0200
+
 ruby-rugged (1.1.0+ds-3) unstable; urgency=medium
 
   * Enable remote tests only for autopkgtest (Closes: #980258)
diff -Nru ruby-rugged-1.1.0+ds/debian/control ruby-rugged-1.1.0+ds/debian/control
--- ruby-rugged-1.1.0+ds/debian/control	2021-02-03 10:09:43.000000000 +0100
+++ ruby-rugged-1.1.0+ds/debian/control	2021-05-04 15:27:51.000000000 +0200
@@ -8,7 +8,6 @@
 Build-Depends: debhelper-compat (= 13),
                gem2deb (>= 1),
                cmake,
-               gem2deb (>= 1.0~),
                git,
                libgit2-dev (>= 1.1~),
                libgit2-fixtures,
diff -Nru ruby-rugged-1.1.0+ds/debian/patches/series ruby-rugged-1.1.0+ds/debian/patches/series
--- ruby-rugged-1.1.0+ds/debian/patches/series	2021-02-03 10:09:43.000000000 +0100
+++ ruby-rugged-1.1.0+ds/debian/patches/series	2021-05-04 15:27:51.000000000 +0200
@@ -3,3 +3,4 @@
 dont-try-to-build-libgit2.patch
 libgit2-fixtures-path.patch
 disable-test-global-config.patch
+skip-network-tests.patch
diff -Nru ruby-rugged-1.1.0+ds/debian/patches/skip-network-tests.patch ruby-rugged-1.1.0+ds/debian/patches/skip-network-tests.patch
--- ruby-rugged-1.1.0+ds/debian/patches/skip-network-tests.patch	1970-01-01 01:00:00.000000000 +0100
+++ ruby-rugged-1.1.0+ds/debian/patches/skip-network-tests.patch	2021-05-04 15:27:51.000000000 +0200
@@ -0,0 +1,53 @@
+Description: skip unit tests that require network access,
+ because Launchpad builders and autopkgtests run in a restricted environment.
+ (This is a trimmed version of Ubuntu patch, letting autopkgtests access the
+ Internet)
+Author: Olivier Tilloy <olivier.tilloy@canonical.com>
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=987650
+Origin: https://git.launchpad.net/~usd-import-team/ubuntu/+source/ruby-rugged/tree/debian/patches/ubuntu-skip-network-tests.patch?id=2f18d60418e71d96ef34c5627370752f94933da6
+Reviewed-By: Cédric Boutillier <boutil@debian.org>
+
+--- a/test/online/ls_test.rb
++++ b/test/online/ls_test.rb
+@@ -7,6 +7,7 @@ class OnlineLsTest < Rugged::OnlineTestC
+ 
+   if Rugged.features.include?(:https)
+     def test_ls_over_https
++      skip "this test requires network access"
+       remote = @repo.remotes.create("origin", "https://github.com/libgit2/TestGitRepository.git";)
+ 
+       assert_equal [
+--- a/test/online/fetch_test.rb
++++ b/test/online/fetch_test.rb
+@@ -15,6 +15,7 @@ class OnlineFetchTest < Rugged::OnlineTe
+ 
+   if Rugged.features.include?(:https)
+     def test_fetch_over_https
++      skip "this test requires network access"
+       @repo.remotes.create("origin", "https://github.com/libgit2/TestGitRepository.git";)
+ 
+       @repo.fetch("origin")
+@@ -30,6 +31,7 @@ class OnlineFetchTest < Rugged::OnlineTe
+     end
+ 
+     def test_fetch_over_https_with_certificate_callback
++      skip "this test requires network access"
+       @repo.remotes.create("origin", "https://github.com/libgit2/TestGitRepository.git";)
+ 
+       args = {}
+@@ -46,6 +48,7 @@ class OnlineFetchTest < Rugged::OnlineTe
+     end
+ 
+     def test_fetch_over_https_with_certificate_callback_fail
++      skip "this test requires network access"
+       @repo.remotes.create("origin", "https://github.com/libgit2/TestGitRepository.git";)
+ 
+       exception = assert_raises Rugged::HTTPError do
+@@ -59,6 +62,7 @@ class OnlineFetchTest < Rugged::OnlineTe
+     end
+ 
+     def test_fetch_over_https_with_certificate_callback_exception
++      skip "this test requires network access"
+       @repo.remotes.create("origin", "https://github.com/libgit2/TestGitRepository.git";)
+ 
+       exception = assert_raises RuntimeError do
diff -Nru ruby-rugged-1.1.0+ds/debian/changelog ruby-rugged-1.1.0+ds/debian/changelog
--- ruby-rugged-1.1.0+ds/debian/changelog	2021-02-03 10:09:43.000000000 +0100
+++ ruby-rugged-1.1.0+ds/debian/changelog	2021-05-04 15:27:51.000000000 +0200
@@ -1,3 +1,12 @@
+ruby-rugged (1.1.0+ds-4) unstable; urgency=high
+
+  * Add patch to really prevent network access in tests (Closes: #987650)
+    Thanks Olivier Tilloy <olivier.tilloy@canonical.com> for the initial
+    patch, adapted here.
+  * Remove duplicate build-dependency on gem2deb
+
+ -- Cédric Boutillier <boutil@debian.org>  Tue, 04 May 2021 15:27:51 +0200
+
 ruby-rugged (1.1.0+ds-3) unstable; urgency=medium
 
   * Enable remote tests only for autopkgtest (Closes: #980258)
diff -Nru ruby-rugged-1.1.0+ds/debian/control ruby-rugged-1.1.0+ds/debian/control
--- ruby-rugged-1.1.0+ds/debian/control	2021-02-03 10:09:43.000000000 +0100
+++ ruby-rugged-1.1.0+ds/debian/control	2021-05-04 15:27:51.000000000 +0200
@@ -8,7 +8,6 @@
 Build-Depends: debhelper-compat (= 13),
                gem2deb (>= 1),
                cmake,
-               gem2deb (>= 1.0~),
                git,
                libgit2-dev (>= 1.1~),
                libgit2-fixtures,
diff -Nru ruby-rugged-1.1.0+ds/debian/patches/series ruby-rugged-1.1.0+ds/debian/patches/series
--- ruby-rugged-1.1.0+ds/debian/patches/series	2021-02-03 10:09:43.000000000 +0100
+++ ruby-rugged-1.1.0+ds/debian/patches/series	2021-05-04 15:27:51.000000000 +0200
@@ -3,3 +3,4 @@
 dont-try-to-build-libgit2.patch
 libgit2-fixtures-path.patch
 disable-test-global-config.patch
+skip-network-tests.patch
diff -Nru ruby-rugged-1.1.0+ds/debian/patches/skip-network-tests.patch ruby-rugged-1.1.0+ds/debian/patches/skip-network-tests.patch
--- ruby-rugged-1.1.0+ds/debian/patches/skip-network-tests.patch	1970-01-01 01:00:00.000000000 +0100
+++ ruby-rugged-1.1.0+ds/debian/patches/skip-network-tests.patch	2021-05-04 15:27:51.000000000 +0200
@@ -0,0 +1,53 @@
+Description: skip unit tests that require network access,
+ because Launchpad builders and autopkgtests run in a restricted environment.
+ (This is a trimmed version of Ubuntu patch, letting autopkgtests access the
+ Internet)
+Author: Olivier Tilloy <olivier.tilloy@canonical.com>
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=987650
+Origin: https://git.launchpad.net/~usd-import-team/ubuntu/+source/ruby-rugged/tree/debian/patches/ubuntu-skip-network-tests.patch?id=2f18d60418e71d96ef34c5627370752f94933da6
+Reviewed-By: Cédric Boutillier <boutil@debian.org>
+
+--- a/test/online/ls_test.rb
++++ b/test/online/ls_test.rb
+@@ -7,6 +7,7 @@ class OnlineLsTest < Rugged::OnlineTestC
+ 
+   if Rugged.features.include?(:https)
+     def test_ls_over_https
++      skip "this test requires network access"
+       remote = @repo.remotes.create("origin", "https://github.com/libgit2/TestGitRepository.git";)
+ 
+       assert_equal [
+--- a/test/online/fetch_test.rb
++++ b/test/online/fetch_test.rb
+@@ -15,6 +15,7 @@ class OnlineFetchTest < Rugged::OnlineTe
+ 
+   if Rugged.features.include?(:https)
+     def test_fetch_over_https
++      skip "this test requires network access"
+       @repo.remotes.create("origin", "https://github.com/libgit2/TestGitRepository.git";)
+ 
+       @repo.fetch("origin")
+@@ -30,6 +31,7 @@ class OnlineFetchTest < Rugged::OnlineTe
+     end
+ 
+     def test_fetch_over_https_with_certificate_callback
++      skip "this test requires network access"
+       @repo.remotes.create("origin", "https://github.com/libgit2/TestGitRepository.git";)
+ 
+       args = {}
+@@ -46,6 +48,7 @@ class OnlineFetchTest < Rugged::OnlineTe
+     end
+ 
+     def test_fetch_over_https_with_certificate_callback_fail
++      skip "this test requires network access"
+       @repo.remotes.create("origin", "https://github.com/libgit2/TestGitRepository.git";)
+ 
+       exception = assert_raises Rugged::HTTPError do
+@@ -59,6 +62,7 @@ class OnlineFetchTest < Rugged::OnlineTe
+     end
+ 
+     def test_fetch_over_https_with_certificate_callback_exception
++      skip "this test requires network access"
+       @repo.remotes.create("origin", "https://github.com/libgit2/TestGitRepository.git";)
+ 
+       exception = assert_raises RuntimeError do

Attachment: signature.asc
Description: PGP signature


Reply to: