]> git.pld-linux.org Git - packages/eventum.git/commitdiff
package new irc log files, ensure log files are immutable
authorElan Ruusamäe <glen@delfi.ee>
Wed, 28 Oct 2015 20:05:51 +0000 (22:05 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Wed, 28 Oct 2015 20:07:43 +0000 (22:07 +0200)
eventum.logrotate
eventum.spec

index 2539e5d2d90cb777ed83358ff98c971b47b04cab..521c687997efec52b083c547d0f4ddc294508226 100644 (file)
@@ -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
 }
index 0cb8eb27fe41812382e77898606860ed566b639e..bb1aefdfd07f01fc8947d60d376f91487e34a0cd 100644 (file)
@@ -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}
This page took 0.054927 seconds and 4 git commands to generate.