commit 686306deae0a8e80d2dbd28349316a3c90983224
Author: Elan Ruusamäe <[email protected]>
Date:   Wed Oct 28 22:05:51 2015 +0200

    package new irc log files, ensure log files are immutable

 eventum.logrotate |  5 +++--
 eventum.spec      | 18 +++++++++++-------
 2 files changed, 14 insertions(+), 9 deletions(-)
---
diff --git a/eventum.spec b/eventum.spec
index 0cb8eb2..bb1aefd 100644
--- a/eventum.spec
+++ b/eventum.spec
@@ -2,7 +2,7 @@
 # Conditional build:
 %bcond_with    order   # with experimental order patch
 
-%define                rel             1.10
+%define                rel             1.13
 %define                subver  305
 %define                githash b67258d
 %define                php_min_version 5.3.3
@@ -587,11 +587,15 @@ rm -rf $RPM_BUILD_ROOT
 %addusertogroup http %{name}
 
 %post
-# greate empty ghost files
-for a in cli.log errors.log irc_bot.log login_attempts.log; do
-       if [ ! -f /var/log/%{name}/$a ]; then
-               install -m 0620 -o root -g eventum /dev/null /var/log/%{name}/$a
-       fi
+# create empty ghost files
+# these permissions ensure the logs are write only
+for a in \
+       errors.log login_attempts.log \
+       cli.log \
+       irc_bot_error.log irc_bot_smartirc.log \
+; do
+       test -f /var/log/%{name}/$a && continue
+       install -m 0620 -o root -g http /dev/null /var/log/%{name}/$a
 done
 
 # run database update if configured
@@ -684,7 +688,7 @@ done
 %attr(660,root,http) %config(noreplace) %verify(not md5 mtime size) 
%{_webappdir}/setup.php
 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) 
%{_webappdir}/htpasswd
 
-%dir %attr(731,root,http) /var/log/%{name}
+%dir %attr(711,root,http) /var/log/%{name}
 %attr(620,root,http) %ghost /var/log/%{name}/*
 %dir %attr(750,root,root) /var/log/archive/%{name}
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) 
/etc/logrotate.d/%{name}
diff --git a/eventum.logrotate b/eventum.logrotate
index 2539e5d..521c687 100644
--- a/eventum.logrotate
+++ b/eventum.logrotate
@@ -1,10 +1,11 @@
 /var/log/eventum/errors.log
-/var/log/eventum/irc_bot.log
+/var/log/eventum/irc_bot_error.log
+/var/log/eventum/irc_bot_smartirc.log
 {
        su root http
        monthly
        notifempty
        rotate 52
-       create 620 root eventum
+       create 620 root http
        olddir /var/log/archive/eventum
 }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/eventum.git/commitdiff/5132bae6ebb741d7a84058c449d38e65e93330a0

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to