From a8d9902bbdc1e06a1dff9400d3167c4d8e323064 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Y=C3=BCce=20K=C3=BCr=C3=BCm?= Date: Wed, 17 Apr 2024 18:14:15 +0200 Subject: [PATCH] profiles: prpl: logrotate configuration is moved to tr181-syslog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove syslog-ng config option that creates a logrotate conf. This option was causing a duplicate config error in syslog. - Remove the script from base-files that adds logrotate cron job. - Add logrotate package. It was selected by the removed config options before. - Adapt logrotate test to include separated logs Signed-off-by: Yüce Kürüm Signed-off-by: Yüce Kürüm (cherry picked from commit c13ed76075b78604eb21213e1842465cea35f3ea) --- .gitlab/tests/cram/generic/logrotate.t | 5 +++++ .../files/etc/uci-defaults/16_prplos_cron_logrotate | 4 ---- profiles/prpl.yml | 3 +-- 3 files changed, 6 insertions(+), 6 deletions(-) delete mode 100644 package/base-files/files/etc/uci-defaults/16_prplos_cron_logrotate diff --git a/.gitlab/tests/cram/generic/logrotate.t b/.gitlab/tests/cram/generic/logrotate.t index 84a1f75f3c..3fd8505a6e 100644 --- a/.gitlab/tests/cram/generic/logrotate.t +++ b/.gitlab/tests/cram/generic/logrotate.t @@ -7,7 +7,12 @@ Check that logrotate is properly setup: $ R "/usr/sbin/logrotate /etc/logrotate.conf" $ R 'grep /var/log/messages /var/lib/logrotate.status | cut -d\" -f2' + /var/log/messages_wifi + /var/log/messages_lcm.log + /var/log/messages_syslog + /var/log/messages_dhcp /var/log/messages + /var/log/messages_firewall $ R "grep /usr/sbin/logrotate /etc/crontabs/root" */10 * * * * /usr/sbin/logrotate /etc/logrotate.conf diff --git a/package/base-files/files/etc/uci-defaults/16_prplos_cron_logrotate b/package/base-files/files/etc/uci-defaults/16_prplos_cron_logrotate deleted file mode 100644 index 8e3b5ea764..0000000000 --- a/package/base-files/files/etc/uci-defaults/16_prplos_cron_logrotate +++ /dev/null @@ -1,4 +0,0 @@ -grep -s -q /usr/sbin/logrotate /etc/crontabs/root && exit 0 -echo "# logrotate runs every 10 minutes" >> /etc/crontabs/root -echo "*/10 * * * * /usr/sbin/logrotate /etc/logrotate.conf" >> /etc/crontabs/root -exit 0 diff --git a/profiles/prpl.yml b/profiles/prpl.yml index 3a2cf68b61..789376c3dc 100644 --- a/profiles/prpl.yml +++ b/profiles/prpl.yml @@ -174,8 +174,7 @@ diffconfig: | CONFIG_PACKAGE_rpcd-mod-luci=y CONFIG_PACKAGE_ip-full=y CONFIG_PACKAGE_ip-bridge=y - CONFIG_SYSLOGNG_LOGROTATE=y - CONFIG_SYSLOGNG_LOGROTATE_MAXSIZE="5M" + CONFIG_PACKAGE_logrotate=y CONFIG_PACKAGE_mod-xpon-prpl-mock=m # CONFIG_PACKAGE_firewall4 is not set # CONFIG_PACKAGE_logd is not set