Bug#1085020: popularity-contest: logs are not logs and should be moved to lib
Package: popularity-contest
Version: 1.76
Severity: minor
Dear Maintainer,
/var/log/popularity-contest contains informations sent and not logs.
I think it could be moved to /var/lib/popularity-contest
If it should stay in /var/log I suggest to add savelog parameters
as some people would change the -c 7 coded.
i.e. I add this line in /etc/popularity-contest.conf
SAVELOG="-c 4 -l -d -D %Y%m%d"
Here is a patch for both points if needed
diff -Naur /etc/cron.daily/popularity-contest.orig /etc/cron.daily/popularity-contest
--- /etc/cron.daily/popularity-contest.orig 2021-11-03 16:43:39.000000000 +0100
+++ /etc/cron.daily/popularity-contest 2024-10-12 11:46:56.278668865 +0200
@@ -77,8 +77,8 @@
fi
POPCONVAR="/var/lib/popularity-contest"
-POPCONOLD="/var/log/popularity-contest"
-POPCONNEW="/var/log/popularity-contest.$$"
+POPCONOLD="/var/lib/popularity-contest/packages"
+POPCONNEW="/var/lib/popularity-contest/packages.$$"
POPCON="$POPCONNEW"
last_sub()
@@ -115,9 +115,11 @@
fi
# keep old logs
-cd /var/log
-umask 022
-savelog -c 7 popularity-contest >/dev/null
+if [ "x$SAVELOG" != "x" ]; then
+ cd /var/lib/popularity-contest
+ umask 022
+ savelog $SAVELOG packages >/dev/null
+fi
do_sendmail()
{
-- System Information:
Debian Release: 12.7
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 6.10.11-turing (SMP w/24 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages popularity-contest depends on:
ii debconf [debconf-2.0] 1.5.82
ii dpkg 1.21.22
Versions of packages popularity-contest recommends:
ii cron [cron-daemon] 3.0pl1-162
ii gpg 2.2.40-1.1
ii postfix [mail-transport-agent] 3.7.11-0+deb12u1
Versions of packages popularity-contest suggests:
ii anacron 2.3-36
pn tor <none>
pn torsocks <none>
-- Configuration Files:
/etc/cron.daily/popularity-contest changed [not included]
-- debconf information excluded
Reply to: