commit: 124e3a9de085193aaed33e1394db2c8bdecfcf2f
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 22 15:45:22 2020 +0000
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Wed Sep 23 03:23:24 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=124e3a9d
app-antivirus/clamav: update freshclamd.service for v0.103.0.
Our freshclam systemd service was wonky: by default, freshclam when
launched as root will drop privileges to the "clamav" user. Since our
systemd service is type=forking, it doesn't need to be launched as the
unprivileged user. And, since we're specifying a PID file, launching
as root means that the PID file directory (now /run) does not need to
be writable by the "clamav" user. All fixed in an -r1 of the service.
Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>
app-antivirus/clamav/clamav-0.103.0.ebuild | 3 ++-
app-antivirus/clamav/files/freshclamd.service-r1 | 10 ++++++++++
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/app-antivirus/clamav/clamav-0.103.0.ebuild
b/app-antivirus/clamav/clamav-0.103.0.ebuild
index f5e3d508cf5..4217bc62b77 100644
--- a/app-antivirus/clamav/clamav-0.103.0.ebuild
+++ b/app-antivirus/clamav/clamav-0.103.0.ebuild
@@ -129,7 +129,8 @@ src_install() {
dotmpfiles "${FILESDIR}/tmpfiles.d/clamav.conf"
systemd_newunit "${FILESDIR}/clamd_at.service"
"[email protected]"
systemd_dounit "${FILESDIR}/clamd.service"
- systemd_dounit "${FILESDIR}/freshclamd.service"
+ systemd_newunit "${FILESDIR}/freshclamd.service-r1" \
+ "freshclamd.service"
fi
insinto /etc/logrotate.d
diff --git a/app-antivirus/clamav/files/freshclamd.service-r1
b/app-antivirus/clamav/files/freshclamd.service-r1
new file mode 100644
index 00000000000..fa1e0139ddd
--- /dev/null
+++ b/app-antivirus/clamav/files/freshclamd.service-r1
@@ -0,0 +1,10 @@
+[Unit]
+Description=clamav updater
+
+[Service]
+Type=forking
+PIDFile=/run/freshclam.pid
+ExecStart=/usr/bin/freshclam -d -p /run/freshclam.pid
+
+[Install]
+WantedBy=multi-user.target