Use but patch upstream's clamav-clamonacc.service
This commit is contained in:
parent
2deba75778
commit
a201bc2495
22
clamav-clamonacc-service.patch
Normal file
22
clamav-clamonacc-service.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
diff -up clamav-0.103.0/clamonacc/clamav-clamonacc.service.in.clamonacc-service clamav-0.103.0/clamonacc/clamav-clamonacc.service.in
|
||||||
|
--- clamav-0.103.0/clamonacc/clamav-clamonacc.service.in.clamonacc-service 2020-09-12 18:27:09.000000000 -0600
|
||||||
|
+++ clamav-0.103.0/clamonacc/clamav-clamonacc.service.in 2020-09-18 19:49:35.400152760 -0600
|
||||||
|
@@ -4,14 +4,14 @@
|
||||||
|
[Unit]
|
||||||
|
Description=ClamAV On-Access Scanner
|
||||||
|
Documentation=man:clamonacc(8) man:clamd.conf(5) https://www.clamav.net/documents
|
||||||
|
-Requires=clamav-daemon.service
|
||||||
|
-After=clamav-daemon.service syslog.target network.target
|
||||||
|
+Requires=clamd@scan.service
|
||||||
|
+After=clamd@scan.service syslog.target network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=root
|
||||||
|
-ExecStartPre=/bin/bash -c "while [ ! -S /run/clamav/clamd.ctl ]; do sleep 1; done"
|
||||||
|
-ExecStart=@prefix@/sbin/clamonacc -F --config-file=@APP_CONFIG_DIRECTORY@/clamd.conf --log=/var/log/clamav/clamonacc.log --move=/root/quarantine
|
||||||
|
+ExecStartPre=/bin/bash -c "while [ ! -S /run/clamd.scan/clamd.sock ]; do sleep 1; done"
|
||||||
|
+ExecStart=@prefix@/sbin/clamonacc -F --config-file=/etc/clamd/scan.conf --log=/var/log/clamav/clamonacc.log --move=/root/quarantine
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
22
clamav.spec
22
clamav.spec
@ -67,8 +67,6 @@ Source10: main-59.cvd
|
|||||||
Source11: daily-25931.cvd
|
Source11: daily-25931.cvd
|
||||||
#http://database.clamav.net/bytecode.cvd
|
#http://database.clamav.net/bytecode.cvd
|
||||||
Source12: bytecode-331.cvd
|
Source12: bytecode-331.cvd
|
||||||
#for clamonacc
|
|
||||||
Source100: clamonacc.service
|
|
||||||
#for update
|
#for update
|
||||||
Source200: freshclam-sleep
|
Source200: freshclam-sleep
|
||||||
Source201: freshclam.sysconfig
|
Source201: freshclam.sysconfig
|
||||||
@ -94,6 +92,8 @@ Patch3: clamav-curl.patch
|
|||||||
# Fix ck_assert_msg() call
|
# Fix ck_assert_msg() call
|
||||||
# https://github.com/Cisco-Talos/clamav-devel/pull/138
|
# https://github.com/Cisco-Talos/clamav-devel/pull/138
|
||||||
Patch4: clamav-check.patch
|
Patch4: clamav-check.patch
|
||||||
|
# Modify clamav-clamonacc.service for Fedora compatibility
|
||||||
|
Patch5: clamav-clamonacc-service.patch
|
||||||
|
|
||||||
BuildRequires: autoconf automake gettext-devel libtool libtool-ltdl-devel
|
BuildRequires: autoconf automake gettext-devel libtool libtool-ltdl-devel
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
@ -102,9 +102,9 @@ BuildRequires: curl-devel
|
|||||||
BuildRequires: gmp-devel
|
BuildRequires: gmp-devel
|
||||||
BuildRequires: json-c-devel
|
BuildRequires: json-c-devel
|
||||||
BuildRequires: libprelude-devel
|
BuildRequires: libprelude-devel
|
||||||
# libprelude-config --libs brings in gnutls
|
# libprelude-config --libs brings in gnutls, pcre
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1830473
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1830473
|
||||||
BuildRequires: gnutls-devel
|
BuildRequires: gnutls-devel pcre-devel
|
||||||
BuildRequires: libxml2-devel
|
BuildRequires: libxml2-devel
|
||||||
BuildRequires: ncurses-devel
|
BuildRequires: ncurses-devel
|
||||||
BuildRequires: openssl-devel
|
BuildRequires: openssl-devel
|
||||||
@ -257,6 +257,7 @@ This package contains files which are needed to run the clamav-milter.
|
|||||||
# Patch to use older libcurl
|
# Patch to use older libcurl
|
||||||
%{?el7:%patch3 -p1 -b .curl}
|
%{?el7:%patch3 -p1 -b .curl}
|
||||||
%patch4 -p1 -b .check
|
%patch4 -p1 -b .check
|
||||||
|
%patch5 -p1 -b .clamonacc-service
|
||||||
|
|
||||||
install -p -m0644 %SOURCE300 clamav-milter/
|
install -p -m0644 %SOURCE300 clamav-milter/
|
||||||
|
|
||||||
@ -329,9 +330,10 @@ install -D -m 0644 -p %SOURCE5 _doc_server/README
|
|||||||
## Fixup URL for EPEL
|
## Fixup URL for EPEL
|
||||||
%{?epel:sed -i -e s/product=Fedora/product=Fedora%20EPEL/ _doc_server/README}
|
%{?epel:sed -i -e s/product=Fedora/product=Fedora%20EPEL/ _doc_server/README}
|
||||||
|
|
||||||
install -D -p -m 0644 %SOURCE100 $RPM_BUILD_ROOT%_unitdir/clamonacc.service
|
## For compatibility with 0.102.2-7
|
||||||
|
ln -s clamav-clamonacc.service $RPM_BUILD_ROOT%_unitdir/clamonacc.service
|
||||||
|
|
||||||
install -D -p -m 0644 %SOURCE530 $RPM_BUILD_ROOT%_unitdir/clamd@.service
|
install -D -p -m 0644 %SOURCE530 $RPM_BUILD_ROOT%_unitdir/clamd@.service
|
||||||
|
|
||||||
## prepare the update-files
|
## prepare the update-files
|
||||||
install -D -m 0644 -p %SOURCE203 $RPM_BUILD_ROOT%_sysconfdir/logrotate.d/clamav-update
|
install -D -m 0644 -p %SOURCE203 $RPM_BUILD_ROOT%_sysconfdir/logrotate.d/clamav-update
|
||||||
@ -423,13 +425,13 @@ make check
|
|||||||
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%systemd_post clamonacc.service
|
%systemd_post clamav-clamonacc.service
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
%systemd_preun clamonacc.service
|
%systemd_preun clamav-clamonacc.service
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%systemd_postun_with_restart clamonacc.service
|
%systemd_postun_with_restart clamav-clamonacc.service
|
||||||
|
|
||||||
|
|
||||||
%pre filesystem
|
%pre filesystem
|
||||||
@ -534,9 +536,11 @@ fi
|
|||||||
%_sbindir/clamonacc
|
%_sbindir/clamonacc
|
||||||
%endif
|
%endif
|
||||||
%_mandir/man[15]/*
|
%_mandir/man[15]/*
|
||||||
|
%_mandir/man8/clamonacc.8*
|
||||||
%exclude %_mandir/*/freshclam*
|
%exclude %_mandir/*/freshclam*
|
||||||
%exclude %_mandir/man5/clamd.conf.5*
|
%exclude %_mandir/man5/clamd.conf.5*
|
||||||
%_unitdir/clamonacc.service
|
%_unitdir/clamonacc.service
|
||||||
|
%_unitdir/clamav-clamonacc.service
|
||||||
|
|
||||||
|
|
||||||
%files lib
|
%files lib
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=Clam AntiVirus userspace daemon for OnAccess Scanning
|
|
||||||
Documentation=man:clamd(8) man:clamd.conf(5) https://www.clamav.net/documents/
|
|
||||||
ConditionPathExists=/etc/clamd.d/scan.conf
|
|
||||||
After=clamd@scan.service
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
ExecStart=/usr/sbin/clamonacc --foreground
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
Loading…
Reference in New Issue
Block a user