[Pkg-ganeti-devel] [ganeti] 02/03: postinst: fix job queue archive permissions

Apollon Oikonomopoulos apoikos-guest at alioth.debian.org
Thu Sep 19 12:10:29 UTC 2013


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

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

commit 45bf83a689f089798713d69763edce34be1683e2
Author: Apollon Oikonomopoulos <apoikos at gmail.com>
Date:   Thu Sep 19 13:08:37 2013 +0300

    postinst: fix job queue archive permissions
    
    ensure_dirs by default does not recursively change the job queue's archive
    directory permissions. As a result, when master runs as a non-root user, it
    fails to archive jobs during a watcher run.
    
    We fix this by calling ensure_dirs -f late in postinst, only if it seems we
    have to (as it may take a while).
---
 debian/ganeti.postinst.in |    8 ++++++++
 debian/rules              |    3 ++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/debian/ganeti.postinst.in b/debian/ganeti.postinst.in
index 4ed6b6c..7c2e5ca 100644
--- a/debian/ganeti.postinst.in
+++ b/debian/ganeti.postinst.in
@@ -49,4 +49,12 @@ esac
 
 #DEBHELPER#
 
+# Fix jobqueue archive permissions
+# This may take a while, so we only do this if necessary
+find /var/lib/ganeti/queue/archive -mindepth 1 -maxdepth 1 \
+		-type d -not -user "@GNTMASTERUSER@" | while read dirname; do
+	/usr/lib/ganeti/ensure-dirs --full-run
+	break
+done
+
 exit 0
diff --git a/debian/rules b/debian/rules
index 0e182d1..c98abab 100755
--- a/debian/rules
+++ b/debian/rules
@@ -41,7 +41,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 postinst "$(CURDIR)" | \
+		sed -f "$(CURDIR)/autotools/replace_vars.sed" >"$(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

-- 
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