public inbox for pmg-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pmg-devel] [PATCH installer] pmg: ensure clamav-freshclam is enabled
@ 2025-09-17 16:22 Stoiko Ivanov
  2025-09-18 13:32 ` [pmg-devel] applied: [pve-devel] " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Stoiko Ivanov @ 2025-09-17 16:22 UTC (permalink / raw)
  To: pve-devel, pmg-devel

This follows pmg-api commit:
cb8e149c ("d/postinst: ensure that clamav-freshclam is enabled")

the postinst invocation in pmg-api is not effective with the message:
```
/usr/sbin/policy-rc.d returned 101, not running enable clamav-freshclam
```

so enable it explicitly by creating the symlink.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
one alternative that might work as well would be to use
`systemctl` proper in pmg-api's postinst, instead of deb-systemd-invoke -
however I'm not sure about the effects this might have outside of our
installer (deb-systemd-invoke was created for running in maintscripts)

 Proxmox/Install.pm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Proxmox/Install.pm b/Proxmox/Install.pm
index fb23f7f..2ebd376 100644
--- a/Proxmox/Install.pm
+++ b/Proxmox/Install.pm
@@ -1351,6 +1351,13 @@ _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
+            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";
+
         }
 
         if ($iso_env->{product} eq 'pve') {
-- 
2.39.5



_______________________________________________
pmg-devel mailing list
pmg-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel


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

end of thread, other threads:[~2025-09-18 13:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-17 16:22 [pmg-devel] [PATCH installer] pmg: ensure clamav-freshclam is enabled Stoiko Ivanov
2025-09-18 13:32 ` [pmg-devel] applied: [pve-devel] " 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