[neovim] 01/02: Set id/gid based on the user running the build.

James McCoy jamessan at debian.org
Sun Oct 9 00:36:28 UTC 2016


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

jamessan pushed a commit to branch debian/sid
in repository neovim.

commit 8011cd7e203ef7492dba700b485b8748b10013e2
Author: James McCoy <jamessan at debian.org>
Date:   Sat Oct 8 19:52:33 2016 -0400

    Set id/gid based on the user running the build.
    
    This should fix the test failures since libnss_wrapper doesn't mock
    getuid and family.
    
    Signed-off-by: James McCoy <jamessan at debian.org>
---
 debian/changelog | 7 +++++++
 debian/rules     | 7 +++++--
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 540d617..ba28fc0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+neovim (0.1.5-6) UNRELEASED; urgency=medium
+
+  * Fix test failures by setting id/gid properly in the passwd/group files
+    used by libnss_wrapper.
+
+ -- James McCoy <jamessan at debian.org>  Sat, 08 Oct 2016 20:16:50 -0400
+
 neovim (0.1.5-5) unstable; urgency=medium
 
   * Run Neovim's tests during the build
diff --git a/debian/rules b/debian/rules
index 01ec761..3d4f312 100755
--- a/debian/rules
+++ b/debian/rules
@@ -19,6 +19,9 @@ ifneq (,$(findstring ok installed,$(shell dpkg-query -W -f '$${Status}' luajit))
   UNITTEST = unittest
 endif
 
+ID = $(shell id | cut -d' ' -f 1 | egrep -o '[0-9]+')
+GID = $(shell id | cut -d' ' -f 2 | egrep -o '[0-9]+')
+
 %:
 	dh $@ --parallel
 
@@ -32,8 +35,8 @@ override_dh_install:
 	dh_install --fail-missing
 
 debian/passwd:
-	printf -- "$(USER):x:1000:1000:nvim test:$(CURDIR)/debian/fakehome:/bin/false\n" > debian/passwd
-	printf -- "users:x:1000\n" > debian/group
+	printf -- "$(USER):x:$(ID):$(GID):nvim test:$(CURDIR)/debian/fakehome:/bin/false\n" > debian/passwd
+	printf -- "users:x:$(GID):\n" > debian/group
 
 debian/fakehome:
 	mkdir -p debian/fakehome

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



More information about the pkg-vim-maintainers mailing list