[DRE-commits] [ruby-dalli] 05/08: make memcache run under fakeroot when running tests

Antonio Terceiro terceiro at moszumanska.debian.org
Thu Oct 29 21:29:51 UTC 2015


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

terceiro pushed a commit to branch master
in repository ruby-dalli.

commit 9c816d79150711f657ec8a7cbd1879a9aa5bd721
Author: Antonio Terceiro <terceiro at debian.org>
Date:   Thu Oct 29 19:15:15 2015 -0200

    make memcache run under fakeroot when running tests
---
 debian/changelog                                   |  3 ++-
 debian/control                                     |  3 ++-
 .../0001-test-suite-run-as-current-user.patch      | 23 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 4 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index b9c20b5..92181cf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ ruby-dalli (2.7.4-1) UNRELEASED; urgency=low
   * Initial packaging
 
   [ Antonio Terceiro ]
-  * Closes: #nnnnnn
+  * debian/patches/0001-test-suite-run-as-current-user.patch: make memcache
+    run under fakeroot when running tests
 
  -- Antonio Terceiro <terceiro at debian.org>  Thu, 29 Oct 2015 18:49:14 -0200
diff --git a/debian/control b/debian/control
index c8aae3c..c1ac0ed 100644
--- a/debian/control
+++ b/debian/control
@@ -5,7 +5,8 @@ Maintainer: Debian Ruby Extras Maintainers <pkg-ruby-extras-maintainers at lists.al
 Uploaders: Cédric Boutillier <cedric.boutillier at gmail.com>,
            Antonio Terceiro <terceiro at debian.org>,
 Build-Depends: debhelper (>= 9~),
-               gem2deb
+               gem2deb,
+               memcached,
 Standards-Version: 3.9.6
 Vcs-Git: git://anonscm.debian.org/pkg-ruby-extras/ruby-dalli.git
 Vcs-Browser: https://anonscm.debian.org/cgit/pkg-ruby-extras/ruby-dalli.git
diff --git a/debian/patches/0001-test-suite-run-as-current-user.patch b/debian/patches/0001-test-suite-run-as-current-user.patch
new file mode 100644
index 0000000..38624d7
--- /dev/null
+++ b/debian/patches/0001-test-suite-run-as-current-user.patch
@@ -0,0 +1,23 @@
+From: Antonio Terceiro <terceiro at debian.org>
+Date: Thu, 29 Oct 2015 19:12:58 -0200
+Subject: test suite: run as current user
+
+Because it's run under fakeroot, memcached thinks that it's being run as
+root, and refuses to do so.
+---
+ test/memcached_mock.rb | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/memcached_mock.rb b/test/memcached_mock.rb
+index 3d466cb..f7ae422 100644
+--- a/test/memcached_mock.rb
++++ b/test/memcached_mock.rb
+@@ -158,7 +158,7 @@ module MemcachedMock
+         port = port.to_i
+       end
+ 
+-      cmd = "#{Memcached.path}memcached #{args} #{port_socket_arg} #{port}"
++      cmd = "#{Memcached.path}memcached -u #{ENV['USER']} #{args} #{port_socket_arg} #{port}"
+ 
+       $started[port] ||= begin
+         pid = IO.popen(cmd).pid
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..e64726d
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-test-suite-run-as-current-user.patch

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



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