Bug#1065440: tomcat10: /etc/cron.daily/tomcat10

2026-05-14 Thread Julien Savoie
I can confirm I've also been impacted by a similar issue.  The issue
concerns the script /etc/cron.daily/tomcat10 will try to rotate files
that are empty and have never been written to.

Specifically:
find /var/log/$NAME/ -name \*.$EXT -daystart -mtime +0 -print0 -maxdepth 1 \
  | xargs --no-run-if-empty -0 gzip -9 EXT=$EXT.gz

Adding a -size parameter, even a small one, could fix this:
find /var/log/$NAME/ -name \*.$EXT -daystart -mtime +0 -size +10c
-print0 -maxdepth 1 \

Because of how tomcat uses  a file may
never rotate until an event is triggered.  This means the script may
try to compress the same rarely used application.log file over and
over again even if  is defined.

This will trigger an error when gzip refuses to overwrite an existing file.

/etc/cron.daily/tomcat10:
gzip: /var/log/tomcat10/application.log.gz already exists;not overwritten



Bug#1065440: tomcat10: /etc/cron.daily/tomcat10 breaks tomcat's own deletion of old access logs

2024-03-04 Thread Jorge Moraleda
Package: tomcat10
Version: 10.1.6-1+deb12u1
Severity: normal
X-Debbugs-Cc: [email protected]

Dear Maintainer,

The tomcat10 package installs file '/etc/cron.daily/tomcat10' that encrypts
"old" logs in the '/var/log/tomcat10' directory. The problem is that this cron
jobs breaks the new mechanism that tomcat10 uses for deleting its own old log
files. In particular adding the option 'maxDays="2" in section  
pn  tomcat10-docs  
pn  tomcat10-examples  
pn  tomcat10-user  

-- Configuration Files:
/etc/tomcat10/policy.d/01system.policy [Errno 13] Permission denied: 
'/etc/tomcat10/policy.d/01system.policy'
/etc/tomcat10/policy.d/02debian.policy [Errno 13] Permission denied: 
'/etc/tomcat10/policy.d/02debian.policy'
/etc/tomcat10/policy.d/03catalina.policy [Errno 13] Permission denied: 
'/etc/tomcat10/policy.d/03catalina.policy'
/etc/tomcat10/policy.d/04webapps.policy [Errno 13] Permission denied: 
'/etc/tomcat10/policy.d/04webapps.policy'
/etc/tomcat10/policy.d/50local.policy [Errno 13] Permission denied: 
'/etc/tomcat10/policy.d/50local.policy'

-- no debconf information