public inbox for pmg-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH installer/pmg-api v2 0/2] ensure clamav-daemon is enabled
@ 2026-06-09 10:45 Stoiko Ivanov
  2026-06-09 10:45 ` [PATCH pmg-api v2 1/2] d/postinst: ensure that " Stoiko Ivanov
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Stoiko Ivanov @ 2026-06-09 10:45 UTC (permalink / raw)
  To: pmg-devel

v1->v2:
* installer: fix copy-paste error and actually enable clamav-daemon (not
  freshclam twice) - thx @Christoph for spotting this!

v1:
https://lore.proxmox.com/pmg-devel/20260609100805.1631021-1-s.ivanov@proxmox.com/T/#t

pmg-api:

Stoiko Ivanov (1):
  d/postinst: ensure that clamav-daemon is enabled

 debian/postinst | 5 +++++
 1 file changed, 5 insertions(+)


pve-installer:

Stoiko Ivanov (1):
  pmg: ensure clamav-daemon is enabled

 Proxmox/Install.pm | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)


Summary over all repositories:
  2 files changed, 12 insertions(+), 2 deletions(-)

-- 
Generated by murpp 0.12.0




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH pmg-api v2 1/2] d/postinst: ensure that clamav-daemon is enabled
  2026-06-09 10:45 [PATCH installer/pmg-api v2 0/2] ensure clamav-daemon is enabled Stoiko Ivanov
@ 2026-06-09 10:45 ` Stoiko Ivanov
  2026-06-09 10:45 ` [PATCH installer v2 2/2] pmg: ensure " Stoiko Ivanov
  2026-06-09 12:06 ` applied: [PATCH installer/pmg-api v2 0/2] " Thomas Lamprecht
  2 siblings, 0 replies; 4+ messages in thread
From: Stoiko Ivanov @ 2026-06-09 10:45 UTC (permalink / raw)
  To: pmg-devel

Similar to:
 cb8e149 ("d/postinst: ensure that clamav-freshclam is enabled")

We recently packaged the version currently in debian testing, which
explicitly installs clamav-daemon, without enabling it,
while debian-upstream's experimental branch does enable it.

As there is quite a bit of back and forth - simply enable the service
unconditionally.

We might look into making it possible to keep clamav disabled (e.g. if
users are relying on avast only, or have a custom_check_script which
handles virus checking) - but that can be done independently.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
 debian/postinst | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/debian/postinst b/debian/postinst
index c7e05e7..ee218ab 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -145,6 +145,11 @@ case "$1" in
             deb-systemd-invoke enable clamav-freshclam.service >/dev/null 2>&1 || true
         fi
 
+        if ! systemctl --quiet is-enabled clamav-daemon.service ; then
+            echo "Enabling clamav-daemon as antivirus"
+            deb-systemd-invoke enable clamav-daemon.service >/dev/null 2>&1 || true
+        fi
+
         if test -n "$2" && dpkg --compare-versions "$2" 'lt' '8.2.0'; then
             old_score_location=/var/cache/pmg-scores.cf
             new_score_location=/etc/mail/spamassassin/pmg-scores.cf.new
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH installer v2 2/2] pmg: ensure clamav-daemon is enabled
  2026-06-09 10:45 [PATCH installer/pmg-api v2 0/2] ensure clamav-daemon is enabled Stoiko Ivanov
  2026-06-09 10:45 ` [PATCH pmg-api v2 1/2] d/postinst: ensure that " Stoiko Ivanov
@ 2026-06-09 10:45 ` Stoiko Ivanov
  2026-06-09 12:06 ` applied: [PATCH installer/pmg-api v2 0/2] " Thomas Lamprecht
  2 siblings, 0 replies; 4+ messages in thread
From: Stoiko Ivanov @ 2026-06-09 10:45 UTC (permalink / raw)
  To: pmg-devel

the version currently in debian testing (and backported by us)
installs the service without enabling it, the tag named
`debian-1.4.4` otoh enables it.
with the back and forth unconditionally enabling it in our installer
seems like a robust measure.

follows commit:
72480b2 ("pmg: ensure clamav-freshclam is enabled")

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
 Proxmox/Install.pm | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/Proxmox/Install.pm b/Proxmox/Install.pm
index 8fd51a9..5f748d6 100644
--- a/Proxmox/Install.pm
+++ b/Proxmox/Install.pm
@@ -1438,13 +1438,18 @@ _EOD
                 "$targetdir/etc/systemd/system/multi-user.target.wants/clamav-clamonacc.service"
                 or $!{ENOENT}
                 or warn "failed to disable clamav-clamonacc.service - $!\n";
-            # clamav-freshclam is not enabled automatically anymore in recent versions - so ensure
-            # it will start - see https://salsa.debian.org/clamav-team/clamav/-/merge_requests/7
+            # clamav daemons are not enabled automatically anymore in recent versions and the
+            # upstream maintainers do change that part comparatively often - so just ensure
+            # that the services are enabled here
             syscmd(
                 "ln -sf /lib/systemd/system/clamav-freshclam.service $targetdir/etc/systemd/system/multi-user.target.wants/clamav-freshclam.service"
                 ) == 0
                 || warn "failed to enable clamav-freshclam.service - $!\n";
 
+            syscmd(
+                "ln -sf /lib/systemd/system/clamav-daemon.service $targetdir/etc/systemd/system/multi-user.target.wants/clamav-daemon.service"
+                ) == 0
+                || warn "failed to enable clamav-daemon.service - $!\n";
         }
 
         if ($iso_env->{product} eq 'pve') {
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* applied: [PATCH installer/pmg-api v2 0/2] ensure clamav-daemon is enabled
  2026-06-09 10:45 [PATCH installer/pmg-api v2 0/2] ensure clamav-daemon is enabled Stoiko Ivanov
  2026-06-09 10:45 ` [PATCH pmg-api v2 1/2] d/postinst: ensure that " Stoiko Ivanov
  2026-06-09 10:45 ` [PATCH installer v2 2/2] pmg: ensure " Stoiko Ivanov
@ 2026-06-09 12:06 ` Thomas Lamprecht
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Lamprecht @ 2026-06-09 12:06 UTC (permalink / raw)
  To: pve-devel, pmg-devel, Stoiko Ivanov

On Tue, 09 Jun 2026 12:45:18 +0200, Stoiko Ivanov wrote:
> v1->v2:
> * installer: fix copy-paste error and actually enable clamav-daemon (not
>   freshclam twice) - thx @Christoph for spotting this!
> 
> v1:
> https://lore.proxmox.com/pmg-devel/20260609100805.1631021-1-s.ivanov@proxmox.com/T/#t
> 
> [...]

Applied, thanks!

[1/1] pmg: ensure clamav-daemon is enabled
      commit: c1ca167dfb8861c27c7bafea40cbfcb53448fdee




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-06-09 12:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-09 10:45 [PATCH installer/pmg-api v2 0/2] ensure clamav-daemon is enabled Stoiko Ivanov
2026-06-09 10:45 ` [PATCH pmg-api v2 1/2] d/postinst: ensure that " Stoiko Ivanov
2026-06-09 10:45 ` [PATCH installer v2 2/2] pmg: ensure " Stoiko Ivanov
2026-06-09 12:06 ` applied: [PATCH installer/pmg-api v2 0/2] " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal