[Pkg-clamav-devel] Bug#1034789: clamav-freshclam: does not respect debconf settings

Xabier Oneca xoneca at certiorem.com
Mon Apr 24 15:15:33 BST 2023


Package: clamav-freshclam
Version: 0.103.8+dfsg-0+deb10u1
Severity: normal
Tags: patch d-i

Dear Maintainer,

I've tried preseeding the package with the autoupdate_freshclam template
question:

  clamav clamav-freshclam-freshclam/autoupdate_freshclam string manual

But the Systemd service always gets enabled.

The package has SysV and Systemd services. The SysV type is handled correctly,
but the Systemd one is left always enabled by default, whether it is set as
manual or not.


-- System Information:
Debian Release: 10.13
  APT prefers oldstable-updates
  APT policy: (500, 'oldstable-updates'), (500, 'stable'), (500, 'oldstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-23-amd64 (SMP w/2 CPU cores)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8),
LANGUAGE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

*** honor-debconf-autoupdate.patch
Honor debconf autoupdate config for Systemd service

When debconf clamav-freshclam/autoupdate_freshclam config var is set to
"manual", the Systemd daemon must be disabled.

Index: b/DEBIAN/postinst
===================================================================
--- a/DEBIAN/postinst
+++ b/DEBIAN/postinst
@@ -631,6 +631,7 @@ then
     echo "Starting database update: "
     invoke-rc.d clamav-freshclam no-daemon || true
     update-rc.d -f clamav-freshclam disable > /dev/null 2>&1 || true
+    deb-systemd-helper disable 'clamav-freshclam.service' >/dev/null || true
   fi



More information about the Pkg-clamav-devel mailing list