I can't start the clamd.service from app-antivirus/clamav-0.99.2-r1 anymore because of the following error message: # systemctl start clamd.service Failed to start clamd.service: Unit clamd.service is not loaded properly: Invalid argument. See system logs and 'systemctl status clamd.service' for details. # systemctl status clamd.service ● clamd.service - Generic ClamAV scanner daemon Loaded: error (Reason: Invalid argument) Active: inactive (dead) Aug 12 15:59:34 desktop systemd[1]: clamd.service: Service lacks both ExecStart= and ExecStop= setting. Refusing. Aug 12 15:59:39 desktop systemd[1]: clamd.service: Service lacks both ExecStart= and ExecStop= setting. Refusing. Aug 12 16:02:30 desktop systemd[1]: clamd.service: Service lacks both ExecStart= and ExecStop= setting. Refusing. Indeed in /usr/lib/systemd/system/clamd.service there are no ExecStart or ExecStop directives. There's an ExecStart directive in the referenced /usr/lib/systemd/system/clamd@.service (please notice the @ sign), but it seems it's not enough. I'm using sys-apps/systemd-234-r2
Created attachment 488686 [details] emerge --info
$ emerge -pv clamav systemd These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] app-antivirus/clamav-0.99.2-r1::gentoo USE="bzip2 iconv ipv6 -clamdtop -libressl -metadata-analysis-api -milter (-selinux) -static-libs (-uclibc)" 0 KiB [ebuild R ] sys-apps/systemd-234-r2:0/2::gentoo USE="acl cryptsetup curl gcrypt kmod lz4 lzma seccomp ssl -apparmor -audit -build -elfutils -gnuefi -http -idn -importd -libidn2 -nat -pam -policykit -qrcode (-selinux) -sysv-utils {-test} -vanilla -xkb" 0 KiB Total: 2 packages (2 reinstalls), Size of downloads: 0 KiB
I just stumbled across this... fresh installs of clamav (not old ones) Problem for me seems to be the systemd service files now get installed into /lib/systemd/system as opposed to the old ones in /usr/lib/systemd/system. The include points at /usr... which no longer works. I manually the change include in clamd.service and it works again. Not sure what caused the change of install location without digging around... but I've noticed a few things have had the service file locations moved.
clamd.service seems pretty broken to me. .include-ing clamd@.service can't possibly work right -- the %i placeholder in ExecStart would not evaluate correctly.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44d72fe2005c1dd48af8d44b12b8cf609db5468a commit 44d72fe2005c1dd48af8d44b12b8cf609db5468a Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2017-12-24 23:11:31 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2017-12-24 23:11:57 +0000 app-antivirus/clamav: fixup systemd units Closes: https://bugs.gentoo.org/627700 Closes: https://github.com/gentoo/gentoo/pull/6621 Package-Manager: Portage-2.3.19_p2, Repoman-2.3.6_p36 .../{clamav-0.99.2-r2.ebuild => clamav-0.99.2-r3.ebuild} | 0 app-antivirus/clamav/files/clamd.service | 11 ++++++++--- app-antivirus/clamav/files/clamd_at.service | 3 +++ 3 files changed, 11 insertions(+), 3 deletions(-)