[Pkg-ganeti-devel] [ganeti] 09/15: Enable user separation

Apollon Oikonomopoulos apoikos-guest at alioth.debian.org
Tue Oct 1 14:09:59 UTC 2013


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

apoikos-guest pushed a commit to branch master
in repository ganeti.

commit fda8c695de01ca52326ca778056940fca9d142fd
Author: Apollon Oikonomopoulos <apoikos at gmail.com>
Date:   Tue Sep 17 16:36:07 2013 +0300

    Enable user separation
    
    Configure ganeti to use a separate user for each deamon. Also generate the
    relevant postinst/postrm scripts.
    
    ganeti now also depends on adduser for the postinst/postrm functionality.
---
 debian/control |    2 +-
 debian/rules   |   10 +++++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/debian/control b/debian/control
index 3861285..ebf72b2 100644
--- a/debian/control
+++ b/debian/control
@@ -30,7 +30,7 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, lvm2,
  openssl, python-simplejson, python-pyparsing, python-openssl,
  python-pyinotify, python-pycurl, python-paramiko, python-bitarray,
  python-ipaddr, socat, fping, ganeti-haskell (>= ${source:Version}),
- ganeti-haskell (<< ${source:Version}.1~)
+ ganeti-haskell (<< ${source:Version}.1~), adduser
 Recommends: drbd8-utils (>= 8.0.7), qemu-system-x86 |
  xen-linux-system-amd64 | xen-linux-system-686-pae,
  ganeti-instance-debootstrap, ndisc6
diff --git a/debian/rules b/debian/rules
index 974f5e4..5d1a450 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,6 +3,8 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+GNT_USERGROUP_PREFIX="gnt-"
+
 %:
 	dh $@ --with python2,sphinxdoc,bash_completion
 
@@ -15,7 +17,9 @@ override_dh_auto_configure:
 	  --with-iallocator-search-path=/usr/local/lib/ganeti/iallocators,/usr/lib/ganeti/iallocators \
 	  --with-os-search-path=/srv/ganeti/os,/usr/local/lib/ganeti/os,/usr/lib/ganeti/os,/usr/share/ganeti/os \
 	  --docdir=/usr/share/doc/ganeti \
-	  --enable-htools-rapi --enable-restricted-commands
+	  --enable-htools-rapi --enable-restricted-commands \
+	  --with-user-prefix=$(GNT_USERGROUP_PREFIX) \
+	  --with-group-prefix=$(GNT_USERGROUP_PREFIX)
 
 override_dh_auto_clean:
 	[ ! -f Makefile ] || $(MAKE) distclean
@@ -26,6 +30,8 @@ override_dh_auto_clean:
 	rm -f debian/ganeti.cron.d
 	rm -f debian/ganeti.default
 	rm -f debian/ganeti.logrotate
+	rm -f debian/ganeti.postinst
+	rm -f debian/ganeti.postrm
 	if [ -d doc/html.orig ]; then \
 		rm -rf doc/html; \
 		mv doc/html.orig doc/html; \
@@ -36,6 +42,8 @@ override_dh_auto_build:
 	dh_auto_build
 	mv doc/html doc/html.orig
 	$(MAKE) doc/html
+	$(CURDIR)/debian/genscript.py postinst "$(CURDIR)" >"$(CURDIR)/debian/ganeti.postinst"
+	$(CURDIR)/debian/genscript.py postrm "$(CURDIR)" >"$(CURDIR)/debian/ganeti.postrm"
 
 # Add missing bits to ganeti and python-ganeti-rapi. We do not use
 # override_dh_install (plain) because it will fail in binary-arch builds.

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



More information about the Pkg-ganeti-devel mailing list