Author: tmancill Date: 2011-06-09 05:12:14 +0000 (Thu, 09 Jun 2011) New Revision: 13775
Added: trunk/tomcat6/debian/logrotate Modified: trunk/tomcat6/debian/changelog trunk/tomcat6/debian/rules trunk/tomcat6/debian/tomcat6.dirs trunk/tomcat6/debian/tomcat6.postinst Log: add logrotate script for catalina.out (Debian #607050) Modified: trunk/tomcat6/debian/changelog =================================================================== --- trunk/tomcat6/debian/changelog 2011-06-09 03:58:16 UTC (rev 13774) +++ trunk/tomcat6/debian/changelog 2011-06-09 05:12:14 UTC (rev 13775) @@ -3,8 +3,9 @@ * Team upload. * Add Italian debconf translation. Thanks to Dario Santamaria (Closes: #624376) + * Add logrotate for catalina.out (Closes: 607050) - -- tony mancill <tmanc...@debian.org> Thu, 28 Apr 2011 20:17:30 -0700 + -- tony mancill <tmanc...@debian.org> Wed, 08 Jun 2011 21:57:15 -0700 tomcat6 (6.0.32-3) unstable; urgency=low Added: trunk/tomcat6/debian/logrotate =================================================================== --- trunk/tomcat6/debian/logrotate (rev 0) +++ trunk/tomcat6/debian/logrotate 2011-06-09 05:12:14 UTC (rev 13775) @@ -0,0 +1,8 @@ +/var/log/tomcat6/catalina.out { + copytruncate + weekly + rotate 52 + compress + missingok + create 640 @@@TOMCAT6USER@@@ adm +} Modified: trunk/tomcat6/debian/rules =================================================================== --- trunk/tomcat6/debian/rules 2011-06-09 03:58:16 UTC (rev 13774) +++ trunk/tomcat6/debian/rules 2011-06-09 05:12:14 UTC (rev 13775) @@ -70,6 +70,7 @@ dh_testroot dh_prep dh_installdirs + cp debian/logrotate debian/tomcat6/etc/logrotate.d/tomcat6 binary-indep: build install dh_testdir Modified: trunk/tomcat6/debian/tomcat6.dirs =================================================================== --- trunk/tomcat6/debian/tomcat6.dirs 2011-06-09 03:58:16 UTC (rev 13774) +++ trunk/tomcat6/debian/tomcat6.dirs 2011-06-09 05:12:14 UTC (rev 13775) @@ -5,3 +5,4 @@ var/lib/tomcat6/shared/classes var/cache/tomcat6 etc/tomcat6/Catalina/localhost +etc/logrotate.d Modified: trunk/tomcat6/debian/tomcat6.postinst =================================================================== --- trunk/tomcat6/debian/tomcat6.postinst 2011-06-09 03:58:16 UTC (rev 13774) +++ trunk/tomcat6/debian/tomcat6.postinst 2011-06-09 05:12:14 UTC (rev 13775) @@ -35,6 +35,13 @@ fi chown -R $TOMCAT6_USER:adm /var/log/tomcat6 /var/cache/tomcat6 chmod 750 /var/log/tomcat6 /var/cache/tomcat6 + + # replace the TOMCAT6USER token in /etc/logrotate.d/tomcat6 if it still contains the token + LOGROTATE_TOKEN="@@@TOMCAT6USER@@@" + if grep -q "$LOGROTATE_TOKEN" /etc/logrotate.d/tomcat6 ; then + sed --in-place "s/$LOGROTATE_TOKEN/$TOMCAT6_USER/" /etc/logrotate.d/tomcat6 + fi + # configuration files should not be modifiable by tomcat6 user, as this can be a security issue # (an attacker may insert code in a webapp and have access to all tomcat configuration) # but those files should be readable by tomcat6, so we set the group to tomcat6 _______________________________________________ pkg-java-commits mailing list pkg-java-comm...@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits