[DRE-commits] [ruby-dalli] 07/08: memcached patch: fix for clean environment
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 b677980529bbe00c717bce28550a063c8bbc7e1f
Author: Antonio Terceiro <terceiro at debian.org>
Date: Thu Oct 29 19:20:52 2015 -0200
memcached patch: fix for clean environment
---
debian/patches/0001-test-suite-run-as-current-user.patch | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/debian/patches/0001-test-suite-run-as-current-user.patch b/debian/patches/0001-test-suite-run-as-current-user.patch
index 38624d7..0493e71 100644
--- a/debian/patches/0001-test-suite-run-as-current-user.patch
+++ b/debian/patches/0001-test-suite-run-as-current-user.patch
@@ -5,19 +5,24 @@ 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(-)
+ test/memcached_mock.rb | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/test/memcached_mock.rb b/test/memcached_mock.rb
-index 3d466cb..f7ae422 100644
+index 3d466cb..0ba0f6f 100644
--- a/test/memcached_mock.rb
+++ b/test/memcached_mock.rb
-@@ -158,7 +158,7 @@ module MemcachedMock
+@@ -1,3 +1,4 @@
++require 'etc'
+ require "socket"
+ require "tempfile"
+
+@@ -158,7 +159,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}"
++ cmd = "#{Memcached.path}memcached -u #{Etc.getpwuid.name} #{args} #{port_socket_arg} #{port}"
$started[port] ||= begin
pid = IO.popen(cmd).pid
--
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