Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 627700 - app-antivirus/clamav - clamd.service: Service lacks both ExecStart= and ExecStop= setting. Refusing.
Summary: app-antivirus/clamav - clamd.service: Service lacks both ExecStart= and ExecS...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Antivirus Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-12 14:06 UTC by Francesco Turco
Modified: 2017-12-24 23:12 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge-info.txt,6.23 KB, text/plain)
2017-08-12 14:07 UTC, Francesco Turco
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Francesco Turco 2017-08-12 14:06:35 UTC
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
Comment 1 Francesco Turco 2017-08-12 14:07:48 UTC
Created attachment 488686 [details]
emerge --info
Comment 2 Francesco Turco 2017-08-12 14:09:04 UTC
$ 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
Comment 3 Dan Goodliffe 2017-12-04 19:47:35 UTC
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.
Comment 4 Mike Gilbert gentoo-dev 2017-12-24 22:41:26 UTC
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.
Comment 5 Larry the Git Cow gentoo-dev 2017-12-24 23:12:02 UTC
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(-)