[Pkg-ganeti-devel] [ganeti] 12/15: Fix logrotate broken by 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 94745895fdf905d3a61df227bc94e37249df5e60
Author: Apollon Oikonomopoulos <apoikos at gmail.com>
Date:   Thu Sep 19 12:19:36 2013 +0300

    Fix logrotate broken by user separation
    
    With user separation enabled, the logfile dir is group-writable by gnt-daemons,
    which makes current logrotate versions complain. We fix this by shipping our
    own logrotate snippet which uses "su root root". Also drop "root root" from the
    create statement in order to have the new files inherit the old file permissions.
---
 debian/ganeti.logrotate |   14 ++++++++++++++
 debian/rules            |    2 --
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/debian/ganeti.logrotate b/debian/ganeti.logrotate
new file mode 100644
index 0000000..5f8a089
--- /dev/null
+++ b/debian/ganeti.logrotate
@@ -0,0 +1,14 @@
+/var/log/ganeti/*.log {
+        weekly
+        missingok
+        rotate 52
+        notifempty
+        compress
+        delaycompress
+        create 640
+        sharedscripts
+        su root root
+        postrotate
+                /usr/lib/ganeti/daemon-util rotate-all-logs
+        endscript
+}
diff --git a/debian/rules b/debian/rules
index aae77eb..0e182d1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -29,7 +29,6 @@ override_dh_auto_clean:
 	rm -f debian/ganeti.init
 	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 \
@@ -52,7 +51,6 @@ override_dh_install-indep:
 	cp $(CURDIR)/doc/examples/ganeti.initd $(CURDIR)/debian/ganeti.init
 	cp $(CURDIR)/doc/examples/ganeti.cron $(CURDIR)/debian/ganeti.cron.d
 	cp $(CURDIR)/doc/examples/ganeti.default $(CURDIR)/debian/ganeti.default
-	cp $(CURDIR)/doc/examples/ganeti.logrotate $(CURDIR)/debian/ganeti.logrotate
 	
 	# Dummy Python module for the RAPI client
 	touch $(CURDIR)/debian/python-ganeti-rapi/usr/share/pyshared/ganeti/__init__.py

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