From c1f538e78d3d84ce011817d18712e212fd437f0b Mon Sep 17 00:00:00 2001 From: Andriy Utkin Date: Tue, 3 Sep 2024 00:30:35 +0100 Subject: [PATCH 1/3] Fix log rotation See https://github.com/bluecherrydvr/bluecherry-apps/issues/596 --- debian/control.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/control.in b/debian/control.in index 2df4d69a..7ffe45e8 100644 --- a/debian/control.in +++ b/debian/control.in @@ -28,6 +28,8 @@ Depends: ${shlibs:Depends}, ssl-cert, ucf, curl, sysstat, i965-va-driver, cron, certbot, + rsyslog, + logrotate, # python3-pip, #focal php-sqlite3, php-gd, php-curl, php-mysql #jammy php-sqlite3, php-gd, php-curl, php-mysql From c7a09baa0678452cec91125042fa2c991339fcc8 Mon Sep 17 00:00:00 2001 From: Andriy Utkin Date: Tue, 3 Sep 2024 15:41:52 +0100 Subject: [PATCH 2/3] logrotate: drop "create" In Debian, even with rsyslog installed, there's no "syslog" user, and rsyslog runs as root. It is expected that rsyslog will create the file itself. There are no particular automated use of log files, so it doesn't matter for files to have "bluecherry" group and be readable for that group. --- debian/bluecherry.logrotate | 1 - 1 file changed, 1 deletion(-) diff --git a/debian/bluecherry.logrotate b/debian/bluecherry.logrotate index a6e361d3..751b73c3 100644 --- a/debian/bluecherry.logrotate +++ b/debian/bluecherry.logrotate @@ -6,7 +6,6 @@ notifempty delaycompress compress - create 640 syslog bluecherry postrotate reload rsyslog >/dev/null 2>&1 || true endscript From 81ed4d982128f55ee13ae7fa5c99d3e7d64d3ae9 Mon Sep 17 00:00:00 2001 From: Andriy Utkin Date: Wed, 4 Sep 2024 21:20:02 +0100 Subject: [PATCH 3/3] logrotate: change postrotate script Not clear how well the previous script worked. The replacement was picked up from /etc/logrotate.d/rsyslog on Ubuntu 22.04 , which boils down to sending SIGHUP to rsyslog, which is the classical way and is very likely to work. How broadly available is this command remains to be seen. --- debian/bluecherry.logrotate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/bluecherry.logrotate b/debian/bluecherry.logrotate index 751b73c3..d46c525a 100644 --- a/debian/bluecherry.logrotate +++ b/debian/bluecherry.logrotate @@ -7,6 +7,6 @@ delaycompress compress postrotate - reload rsyslog >/dev/null 2>&1 || true + /usr/lib/rsyslog/rsyslog-rotate endscript }