use 4 spaces instead of tabs
with vim :set expandtab ;set softtabstop=4 ;set ts=4 ;set sw=4 :retab
This commit is contained in:
parent
b63618be8b
commit
93754c1f34
504
clamav.spec
504
clamav.spec
@ -1,40 +1,40 @@
|
|||||||
#global prerelease rc1
|
#global prerelease rc1
|
||||||
|
|
||||||
## Fedora Extras specific customization below...
|
## Fedora Extras specific customization below...
|
||||||
%bcond_without fedora
|
%bcond_without fedora
|
||||||
%bcond_with upstart
|
%bcond_with upstart
|
||||||
%bcond_without systemd
|
%bcond_without systemd
|
||||||
%if 0%{?fedora} < 23
|
%if 0%{?fedora} < 23
|
||||||
%bcond_without sysv
|
%bcond_without sysv
|
||||||
%else
|
%else
|
||||||
%bcond_with sysv
|
%bcond_with sysv
|
||||||
%endif
|
%endif
|
||||||
%bcond_without tmpfiles
|
%bcond_without tmpfiles
|
||||||
%bcond_with unrar
|
%bcond_with unrar
|
||||||
%bcond_without noarch
|
%bcond_without noarch
|
||||||
%bcond_without bytecode
|
%bcond_without bytecode
|
||||||
##
|
##
|
||||||
|
|
||||||
%global _hardened_build 1
|
%global _hardened_build 1
|
||||||
|
|
||||||
%ifnarch s390 s390x
|
%ifnarch s390 s390x
|
||||||
%global have_ocaml 1
|
%global have_ocaml 1
|
||||||
%else
|
%else
|
||||||
%global have_ocaml 0
|
%global have_ocaml 0
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%global updateuser clamupdate
|
%global updateuser clamupdate
|
||||||
%global homedir %_var/lib/clamav
|
%global homedir %_var/lib/clamav
|
||||||
%global freshclamlog %_var/log/freshclam.log
|
%global freshclamlog %_var/log/freshclam.log
|
||||||
%global milteruser clamilt
|
%global milteruser clamilt
|
||||||
%global milterlog %_var/log/clamav-milter.log
|
%global milterlog %_var/log/clamav-milter.log
|
||||||
%global milterstatedir %_var/run/clamav-milter
|
%global milterstatedir %_var/run/clamav-milter
|
||||||
%global pkgdatadir %_datadir/%name
|
%global pkgdatadir %_datadir/%name
|
||||||
|
|
||||||
%global scanuser clamscan
|
%global scanuser clamscan
|
||||||
%global scanstatedir %_var/run/clamd.scan
|
%global scanstatedir %_var/run/clamd.scan
|
||||||
|
|
||||||
%{?with_noarch:%global noarch BuildArch: noarch}
|
%{?with_noarch:%global noarch BuildArch: noarch}
|
||||||
%{!?_unitdir:%global _unitdir /lib/systemd/system}
|
%{!?_unitdir:%global _unitdir /lib/systemd/system}
|
||||||
%{!?_initrddir:%global _initrddir /etc/rc.d/init.d}
|
%{!?_initrddir:%global _initrddir /etc/rc.d/init.d}
|
||||||
%{!?release_func:%global release_func() %%{?prerelease:0.}%1%%{?prerelease:.%%prerelease}%%{?dist}}
|
%{!?release_func:%global release_func() %%{?prerelease:0.}%1%%{?prerelease:.%%prerelease}%%{?dist}}
|
||||||
@ -42,9 +42,9 @@
|
|||||||
%nil}
|
%nil}
|
||||||
%{!?systemd_reqs:%global systemd_reqs \
|
%{!?systemd_reqs:%global systemd_reqs \
|
||||||
BuildRequires: systemd\
|
BuildRequires: systemd\
|
||||||
Requires(post): /bin/systemctl\
|
Requires(post): /bin/systemctl\
|
||||||
Requires(preun): /bin/systemctl\
|
Requires(preun): /bin/systemctl\
|
||||||
Requires(postun): /bin/systemctl\
|
Requires(postun): /bin/systemctl\
|
||||||
%nil}
|
%nil}
|
||||||
%{!?systemd_install:%global systemd_install()\
|
%{!?systemd_install:%global systemd_install()\
|
||||||
%post %1\
|
%post %1\
|
||||||
@ -56,248 +56,248 @@ Requires(postun): /bin/systemctl\
|
|||||||
%nil}
|
%nil}
|
||||||
|
|
||||||
|
|
||||||
Summary: End-user tools for the Clam Antivirus scanner
|
Summary: End-user tools for the Clam Antivirus scanner
|
||||||
Name: clamav
|
Name: clamav
|
||||||
Version: 0.99.2
|
Version: 0.99.2
|
||||||
Release: 13%{?dist}
|
Release: 13%{?dist}
|
||||||
License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
|
License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
|
||||||
Group: Applications/File
|
Group: Applications/File
|
||||||
URL: http://www.clamav.net
|
URL: http://www.clamav.net
|
||||||
%if 0%{?with_unrar:1}
|
%if 0%{?with_unrar:1}
|
||||||
Source0: http://download.sourceforge.net/sourceforge/clamav/%name-%version%{?prerelease}.tar.gz
|
Source0: http://download.sourceforge.net/sourceforge/clamav/%name-%version%{?prerelease}.tar.gz
|
||||||
Source999: http://download.sourceforge.net/sourceforge/clamav/%name-%version%{?prerelease}.tar.gz.sig
|
Source999: http://download.sourceforge.net/sourceforge/clamav/%name-%version%{?prerelease}.tar.gz.sig
|
||||||
%else
|
%else
|
||||||
# Unfortunately, clamav includes support for RAR v3, derived from GPL
|
# Unfortunately, clamav includes support for RAR v3, derived from GPL
|
||||||
# incompatible unrar from RARlabs. We have to pull this code out.
|
# incompatible unrar from RARlabs. We have to pull this code out.
|
||||||
# tarball was created by
|
# tarball was created by
|
||||||
# make clean-sources NAME=clamav VERSION=<version> TARBALL=clamav-<version>.tar.gz TARBALL_CLEAN=clamav-<version>-norar.tar.xz
|
# make clean-sources NAME=clamav VERSION=<version> TARBALL=clamav-<version>.tar.gz TARBALL_CLEAN=clamav-<version>-norar.tar.xz
|
||||||
Source0: %name-%version%{?prerelease}-norar.tar.xz
|
Source0: %name-%version%{?prerelease}-norar.tar.xz
|
||||||
%endif
|
%endif
|
||||||
# To download the *.cvd, go to http://www.clamav.net and use the links
|
# To download the *.cvd, go to http://www.clamav.net and use the links
|
||||||
# there (I renamed the files to add the -version suffix for verifying).
|
# there (I renamed the files to add the -version suffix for verifying).
|
||||||
Source10: http://db.local.clamav.net/main-57.cvd
|
Source10: http://db.local.clamav.net/main-57.cvd
|
||||||
Source11: http://db.local.clamav.net/daily-21723.cvd
|
Source11: http://db.local.clamav.net/daily-21723.cvd
|
||||||
%{?with_bytecode:Source12: http://db.local.clamav.net/bytecode-278.cvd}
|
%{?with_bytecode:Source12: http://db.local.clamav.net/bytecode-278.cvd}
|
||||||
|
|
||||||
Patch24: clamav-0.99-private.patch
|
Patch24: clamav-0.99-private.patch
|
||||||
Patch27: clamav-0.98-umask.patch
|
Patch27: clamav-0.98-umask.patch
|
||||||
# https://bugzilla.redhat.com/attachment.cgi?id=403775&action=diff&context=patch&collapsed=&headers=1&format=raw
|
# https://bugzilla.redhat.com/attachment.cgi?id=403775&action=diff&context=patch&collapsed=&headers=1&format=raw
|
||||||
Patch29: clamav-0.99.1-jitoff.patch
|
Patch29: clamav-0.99.1-jitoff.patch
|
||||||
# https://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/Intercept.cpp?r1=128086&r2=137567
|
# https://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/Intercept.cpp?r1=128086&r2=137567
|
||||||
Patch30: llvm-glibc.patch
|
Patch30: llvm-glibc.patch
|
||||||
Patch31: clamav-0.99.1-setsebool.patch
|
Patch31: clamav-0.99.1-setsebool.patch
|
||||||
Patch32: fa15aa98c7d5e1d8fc22e818ebd089f2e53ebe1d.diff
|
Patch32: fa15aa98c7d5e1d8fc22e818ebd089f2e53ebe1d.diff
|
||||||
Patch33: clamav-0.99.2-temp-cleanup.patch
|
Patch33: clamav-0.99.2-temp-cleanup.patch
|
||||||
|
|
||||||
BuildRequires: autoconf automake gettext-devel libtool libtool-ltdl-devel
|
BuildRequires: autoconf automake gettext-devel libtool libtool-ltdl-devel
|
||||||
BuildRequires: zlib-devel bzip2-devel gmp-devel curl-devel
|
BuildRequires: zlib-devel bzip2-devel gmp-devel curl-devel
|
||||||
BuildRequires: ncurses-devel openssl-devel libxml2-devel
|
BuildRequires: ncurses-devel openssl-devel libxml2-devel
|
||||||
BuildRequires: %_includedir/tcpd.h
|
BuildRequires: %_includedir/tcpd.h
|
||||||
%{?with_bytecode:BuildRequires: bc tcl groff graphviz}
|
%{?with_bytecode:BuildRequires: bc tcl groff graphviz}
|
||||||
%if %{have_ocaml}
|
%if %{have_ocaml}
|
||||||
%{?with_bytecode:BuildRequires: ocaml}
|
%{?with_bytecode:BuildRequires: ocaml}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Requires: clamav-lib = %version-%release
|
Requires: clamav-lib = %version-%release
|
||||||
Requires: data(clamav)
|
Requires: data(clamav)
|
||||||
|
|
||||||
%package filesystem
|
%package filesystem
|
||||||
Summary: Filesystem structure for clamav
|
Summary: Filesystem structure for clamav
|
||||||
Group: Applications/File
|
Group: Applications/File
|
||||||
Provides: user(%updateuser) = 4
|
Provides: user(%updateuser) = 4
|
||||||
Provides: group(%updateuser) = 4
|
Provides: group(%updateuser) = 4
|
||||||
Provides: group(virusgroup)
|
Provides: group(virusgroup)
|
||||||
# Prevent version mix
|
# Prevent version mix
|
||||||
Conflicts: %name < %version-%release
|
Conflicts: %name < %version-%release
|
||||||
Conflicts: %name > %version-%release
|
Conflicts: %name > %version-%release
|
||||||
Requires(pre): shadow-utils
|
Requires(pre): shadow-utils
|
||||||
%{?noarch}
|
%{?noarch}
|
||||||
|
|
||||||
%package lib
|
%package lib
|
||||||
Summary: Dynamic libraries for the Clam Antivirus scanner
|
Summary: Dynamic libraries for the Clam Antivirus scanner
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
Requires: data(clamav)
|
Requires: data(clamav)
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Header files and libraries for the Clam Antivirus scanner
|
Summary: Header files and libraries for the Clam Antivirus scanner
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
Source100: clamd-gen
|
Source100: clamd-gen
|
||||||
Requires: clamav-lib = %version-%release
|
Requires: clamav-lib = %version-%release
|
||||||
Requires: clamav-filesystem = %version-%release
|
Requires: clamav-filesystem = %version-%release
|
||||||
Requires: openssl-devel
|
Requires: openssl-devel
|
||||||
|
|
||||||
%package data
|
%package data
|
||||||
Summary: Virus signature data for the Clam Antivirus scanner
|
Summary: Virus signature data for the Clam Antivirus scanner
|
||||||
Group: Applications/File
|
Group: Applications/File
|
||||||
Requires: clamav-filesystem = %version-%release
|
Requires: clamav-filesystem = %version-%release
|
||||||
Requires: clamav-filesystem = %version-%release
|
Requires: clamav-filesystem = %version-%release
|
||||||
Provides: data(clamav) = full
|
Provides: data(clamav) = full
|
||||||
Conflicts: data(clamav) < full
|
Conflicts: data(clamav) < full
|
||||||
Conflicts: data(clamav) > full
|
Conflicts: data(clamav) > full
|
||||||
%{?noarch}
|
%{?noarch}
|
||||||
|
|
||||||
%package data-empty
|
%package data-empty
|
||||||
Summary: Empty data package for the Clam Antivirus scanner
|
Summary: Empty data package for the Clam Antivirus scanner
|
||||||
Group: Applications/File
|
Group: Applications/File
|
||||||
Provides: data(clamav) = empty
|
Provides: data(clamav) = empty
|
||||||
Conflicts: data(clamav) < empty
|
Conflicts: data(clamav) < empty
|
||||||
Conflicts: data(clamav) > empty
|
Conflicts: data(clamav) > empty
|
||||||
%{?noarch}
|
%{?noarch}
|
||||||
|
|
||||||
%package update
|
%package update
|
||||||
Summary: Auto-updater for the Clam Antivirus scanner data-files
|
Summary: Auto-updater for the Clam Antivirus scanner data-files
|
||||||
Group: Applications/File
|
Group: Applications/File
|
||||||
Source200: freshclam-sleep
|
Source200: freshclam-sleep
|
||||||
Source201: freshclam.sysconfig
|
Source201: freshclam.sysconfig
|
||||||
Source202: clamav-update.crond
|
Source202: clamav-update.crond
|
||||||
Source203: clamav-update.logrotate
|
Source203: clamav-update.logrotate
|
||||||
Requires: clamav-filesystem = %version-%release
|
Requires: clamav-filesystem = %version-%release
|
||||||
Requires: crontabs
|
Requires: crontabs
|
||||||
Requires: /etc/cron.d
|
Requires: /etc/cron.d
|
||||||
Requires(post): %__chown %__chmod
|
Requires(post): %__chown %__chmod
|
||||||
Requires(post): group(%updateuser)
|
Requires(post): group(%updateuser)
|
||||||
|
|
||||||
%package server
|
%package server
|
||||||
Summary: Clam Antivirus scanner server
|
Summary: Clam Antivirus scanner server
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
Source2: clamd.sysconfig
|
Source2: clamd.sysconfig
|
||||||
Source3: clamd.logrotate
|
Source3: clamd.logrotate
|
||||||
Source5: clamd-README
|
Source5: clamd-README
|
||||||
Source7: clamd.SERVICE.init
|
Source7: clamd.SERVICE.init
|
||||||
Source8: clamav-notify-servers
|
Source8: clamav-notify-servers
|
||||||
Requires: data(clamav)
|
Requires: data(clamav)
|
||||||
Requires: clamav-filesystem = %version-%release
|
Requires: clamav-filesystem = %version-%release
|
||||||
Requires: clamav-lib = %version-%release
|
Requires: clamav-lib = %version-%release
|
||||||
Requires: nc coreutils
|
Requires: nc coreutils
|
||||||
|
|
||||||
%if 0%{?with_sysv:1}
|
%if 0%{?with_sysv:1}
|
||||||
%package server-sysvinit
|
%package server-sysvinit
|
||||||
Summary: SysV initscripts for clamav server
|
Summary: SysV initscripts for clamav server
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
Provides: init(clamav-server) = sysv
|
Provides: init(clamav-server) = sysv
|
||||||
Requires: clamav-server = %version-%release
|
Requires: clamav-server = %version-%release
|
||||||
Requires: %_initrddir
|
Requires: %_initrddir
|
||||||
Provides: clamav-server-sysv = %version-%release
|
Provides: clamav-server-sysv = %version-%release
|
||||||
Obsoletes: clamav-server-sysv < %version-%release
|
Obsoletes: clamav-server-sysv < %version-%release
|
||||||
Source520: clamd-wrapper
|
Source520: clamd-wrapper
|
||||||
%{?noarch}
|
%{?noarch}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%package server-systemd
|
%package server-systemd
|
||||||
Summary: Systemd initscripts for clamav server
|
Summary: Systemd initscripts for clamav server
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
Provides: init(clamav-server) = systemd
|
Provides: init(clamav-server) = systemd
|
||||||
Requires: clamav-server = %version-%release
|
Requires: clamav-server = %version-%release
|
||||||
Source530: clamd@.service
|
Source530: clamd@.service
|
||||||
%{?systemd_reqs}
|
%{?systemd_reqs}
|
||||||
%{?noarch}
|
%{?noarch}
|
||||||
|
|
||||||
|
|
||||||
%package scanner
|
%package scanner
|
||||||
Summary: Clamav scanner daemon
|
Summary: Clamav scanner daemon
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
Requires: init(clamav-scanner)
|
Requires: init(clamav-scanner)
|
||||||
Provides: user(%scanuser) = 49
|
Provides: user(%scanuser) = 49
|
||||||
Provides: group(%scanuser) = 49
|
Provides: group(%scanuser) = 49
|
||||||
Requires: clamav-server = %version-%release
|
Requires: clamav-server = %version-%release
|
||||||
Requires(pre): shadow-utils
|
Requires(pre): shadow-utils
|
||||||
Requires(pre): group(virusgroup)
|
Requires(pre): group(virusgroup)
|
||||||
%{?noarch}
|
%{?noarch}
|
||||||
|
|
||||||
# Remove me after EOL of RHEL5
|
# Remove me after EOL of RHEL5
|
||||||
%if 0%{?with_sysv:1}
|
%if 0%{?with_sysv:1}
|
||||||
%package scanner-sysvinit
|
%package scanner-sysvinit
|
||||||
Summary: SysV initscripts for clamav scanner daemon
|
Summary: SysV initscripts for clamav scanner daemon
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
Provides: init(clamav-scanner) = sysv
|
Provides: init(clamav-scanner) = sysv
|
||||||
Requires: clamav-server-sysvinit = %version-%release
|
Requires: clamav-server-sysvinit = %version-%release
|
||||||
Requires: clamav-scanner = %version-%release
|
Requires: clamav-scanner = %version-%release
|
||||||
Requires: %_initrddir
|
Requires: %_initrddir
|
||||||
Requires(postun): initscripts
|
Requires(postun): initscripts
|
||||||
Requires(post): chkconfig
|
Requires(post): chkconfig
|
||||||
Requires(preun): chkconfig initscripts
|
Requires(preun): chkconfig initscripts
|
||||||
%{?noarch}
|
%{?noarch}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Remove me after EOL of RHEL6
|
# Remove me after EOL of RHEL6
|
||||||
%package scanner-upstart
|
%package scanner-upstart
|
||||||
Summary: Upstart initscripts for clamav scanner daemon
|
Summary: Upstart initscripts for clamav scanner daemon
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
Source410: clamd.scan.upstart
|
Source410: clamd.scan.upstart
|
||||||
Provides: init(clamav-scanner) = upstart
|
Provides: init(clamav-scanner) = upstart
|
||||||
Requires: clamav-scanner = %version-%release
|
Requires: clamav-scanner = %version-%release
|
||||||
Requires: /etc/init
|
Requires: /etc/init
|
||||||
Requires(post): /usr/bin/killall
|
Requires(post): /usr/bin/killall
|
||||||
Requires(preun): /sbin/initctl
|
Requires(preun): /sbin/initctl
|
||||||
%{?noarch}
|
%{?noarch}
|
||||||
|
|
||||||
%package scanner-systemd
|
%package scanner-systemd
|
||||||
Summary: Systemd initscripts for clamav scanner daemon
|
Summary: Systemd initscripts for clamav scanner daemon
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
Source430: clamd@scan.service
|
Source430: clamd@scan.service
|
||||||
Provides: init(clamav-scanner) = systemd
|
Provides: init(clamav-scanner) = systemd
|
||||||
Requires: clamav-scanner = %version-%release
|
Requires: clamav-scanner = %version-%release
|
||||||
Requires: clamav-server-systemd = %version-%release
|
Requires: clamav-server-systemd = %version-%release
|
||||||
%{?systemd_reqs}
|
%{?systemd_reqs}
|
||||||
%{?noarch}
|
%{?noarch}
|
||||||
|
|
||||||
%package milter
|
%package milter
|
||||||
Summary: Milter module for the Clam Antivirus scanner
|
Summary: Milter module for the Clam Antivirus scanner
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
Source300: README.fedora
|
Source300: README.fedora
|
||||||
Requires: init(clamav-milter)
|
Requires: init(clamav-milter)
|
||||||
BuildRequires: sendmail-devel
|
BuildRequires: sendmail-devel
|
||||||
Provides: user(%milteruser) = 5
|
Provides: user(%milteruser) = 5
|
||||||
Provides: group(%milteruser) = 5
|
Provides: group(%milteruser) = 5
|
||||||
Requires(post): coreutils
|
Requires(post): coreutils
|
||||||
Requires(pre): shadow-utils
|
Requires(pre): shadow-utils
|
||||||
Requires(pre): group(virusgroup)
|
Requires(pre): group(virusgroup)
|
||||||
|
|
||||||
Provides: milter(clamav) = sendmail
|
Provides: milter(clamav) = sendmail
|
||||||
Provides: milter(clamav) = postfix
|
Provides: milter(clamav) = postfix
|
||||||
|
|
||||||
Provides: clamav-milter-core = %version-%release
|
Provides: clamav-milter-core = %version-%release
|
||||||
Obsoletes: clamav-milter-core < %version-%release
|
Obsoletes: clamav-milter-core < %version-%release
|
||||||
Provides: clamav-milter-sendmail = %version-%release
|
Provides: clamav-milter-sendmail = %version-%release
|
||||||
Obsoletes: clamav-milter-sendmail < %version-%release
|
Obsoletes: clamav-milter-sendmail < %version-%release
|
||||||
|
|
||||||
# Remove me after EOL of RHEL5
|
# Remove me after EOL of RHEL5
|
||||||
%if 0%{?with_sysv:1}
|
%if 0%{?with_sysv:1}
|
||||||
%package milter-sysvinit
|
%package milter-sysvinit
|
||||||
Summary: SysV initscripts for the clamav sendmail-milter
|
Summary: SysV initscripts for the clamav sendmail-milter
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
Source320: clamav-milter.sysv
|
Source320: clamav-milter.sysv
|
||||||
Provides: init(clamav-milter) = sysvinit
|
Provides: init(clamav-milter) = sysvinit
|
||||||
Requires: clamav-milter = %version-%release
|
Requires: clamav-milter = %version-%release
|
||||||
Requires(post): user(%milteruser) clamav-milter
|
Requires(post): user(%milteruser) clamav-milter
|
||||||
Requires(preun): user(%milteruser) clamav-milter
|
Requires(preun): user(%milteruser) clamav-milter
|
||||||
Requires: %_initrddir
|
Requires: %_initrddir
|
||||||
Requires(postun): initscripts
|
Requires(postun): initscripts
|
||||||
Requires(post): chkconfig
|
Requires(post): chkconfig
|
||||||
Requires(preun): chkconfig initscripts
|
Requires(preun): chkconfig initscripts
|
||||||
Provides: clamav-milter-sysv = %version-%release
|
Provides: clamav-milter-sysv = %version-%release
|
||||||
Obsoletes: clamav-milter-sysv < %version-%release
|
Obsoletes: clamav-milter-sysv < %version-%release
|
||||||
%{?noarch}
|
%{?noarch}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Remove me after EOL of RHEL6
|
# Remove me after EOL of RHEL6
|
||||||
%package milter-upstart
|
%package milter-upstart
|
||||||
Summary: Upstart initscripts for the clamav sendmail-milter
|
Summary: Upstart initscripts for the clamav sendmail-milter
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
Source310: clamav-milter.upstart
|
Source310: clamav-milter.upstart
|
||||||
Provides: init(clamav-milter) = upstart
|
Provides: init(clamav-milter) = upstart
|
||||||
Requires: clamav-milter = %version-%release
|
Requires: clamav-milter = %version-%release
|
||||||
Requires: /etc/init
|
Requires: /etc/init
|
||||||
Requires(post): /usr/bin/killall
|
Requires(post): /usr/bin/killall
|
||||||
Requires(preun): /sbin/initctl
|
Requires(preun): /sbin/initctl
|
||||||
%{?noarch}
|
%{?noarch}
|
||||||
|
|
||||||
%package milter-systemd
|
%package milter-systemd
|
||||||
Summary: Systemd initscripts for the clamav sendmail-milter
|
Summary: Systemd initscripts for the clamav sendmail-milter
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
Source330: clamav-milter.systemd
|
Source330: clamav-milter.systemd
|
||||||
Provides: init(clamav-milter) = systemd
|
Provides: init(clamav-milter) = systemd
|
||||||
Requires: clamav-milter = %version-%release
|
Requires: clamav-milter = %version-%release
|
||||||
%{?systemd_reqs}
|
%{?systemd_reqs}
|
||||||
%{?noarch}
|
%{?noarch}
|
||||||
|
|
||||||
@ -456,28 +456,28 @@ export have_cv_ipv6=yes
|
|||||||
|
|
||||||
autoreconf -ivf
|
autoreconf -ivf
|
||||||
%configure \
|
%configure \
|
||||||
--disable-static \
|
--disable-static \
|
||||||
--disable-rpath \
|
--disable-rpath \
|
||||||
--disable-silent-rules \
|
--disable-silent-rules \
|
||||||
--disable-clamav \
|
--disable-clamav \
|
||||||
--with-user=%updateuser \
|
--with-user=%updateuser \
|
||||||
--with-group=%updateuser \
|
--with-group=%updateuser \
|
||||||
--with-libcurl=%{_prefix} \
|
--with-libcurl=%{_prefix} \
|
||||||
--with-dbdir=/var/lib/clamav \
|
--with-dbdir=/var/lib/clamav \
|
||||||
--enable-milter \
|
--enable-milter \
|
||||||
--enable-clamdtop \
|
--enable-clamdtop \
|
||||||
--disable-zlib-vcheck \
|
--disable-zlib-vcheck \
|
||||||
%{!?with_bytecode:--disable-llvm} \
|
%{!?with_bytecode:--disable-llvm} \
|
||||||
%{!?with_unrar:--disable-unrar}
|
%{!?with_unrar:--disable-unrar}
|
||||||
|
|
||||||
# TODO: check periodically that CLAMAVUSER is used for freshclam only
|
# TODO: check periodically that CLAMAVUSER is used for freshclam only
|
||||||
|
|
||||||
|
|
||||||
# build with --as-needed and disable rpath
|
# build with --as-needed and disable rpath
|
||||||
sed -i \
|
sed -i \
|
||||||
-e 's! -shared ! -Wl,--as-needed\0!g' \
|
-e 's! -shared ! -Wl,--as-needed\0!g' \
|
||||||
-e '/sys_lib_dlsearch_path_spec=\"\/lib \/usr\/lib /s!\"\/lib \/usr\/lib !/\"/%_lib /usr/%_lib !g' \
|
-e '/sys_lib_dlsearch_path_spec=\"\/lib \/usr\/lib /s!\"\/lib \/usr\/lib !/\"/%_lib /usr/%_lib !g' \
|
||||||
libtool
|
libtool
|
||||||
|
|
||||||
|
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
@ -490,55 +490,55 @@ rm -rf "$RPM_BUILD_ROOT" _doc*
|
|||||||
make DESTDIR="$RPM_BUILD_ROOT" install
|
make DESTDIR="$RPM_BUILD_ROOT" install
|
||||||
|
|
||||||
function smartsubst() {
|
function smartsubst() {
|
||||||
local tmp
|
local tmp
|
||||||
local regexp=$1
|
local regexp=$1
|
||||||
shift
|
shift
|
||||||
|
|
||||||
tmp=$(mktemp /tmp/%name-subst.XXXXXX)
|
tmp=$(mktemp /tmp/%name-subst.XXXXXX)
|
||||||
for i; do
|
for i; do
|
||||||
sed -e "$regexp" "$i" >$tmp
|
sed -e "$regexp" "$i" >$tmp
|
||||||
cmp -s $tmp "$i" || cat $tmp >"$i"
|
cmp -s $tmp "$i" || cat $tmp >"$i"
|
||||||
rm -f $tmp
|
rm -f $tmp
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
install -d -m 0755 \
|
install -d -m 0755 \
|
||||||
$RPM_BUILD_ROOT%_sysconfdir/{mail,clamd.d,logrotate.d} \
|
$RPM_BUILD_ROOT%_sysconfdir/{mail,clamd.d,logrotate.d} \
|
||||||
$RPM_BUILD_ROOT%_tmpfilesdir \
|
$RPM_BUILD_ROOT%_tmpfilesdir \
|
||||||
$RPM_BUILD_ROOT%_var/{log,run} \
|
$RPM_BUILD_ROOT%_var/{log,run} \
|
||||||
$RPM_BUILD_ROOT%milterstatedir \
|
$RPM_BUILD_ROOT%milterstatedir \
|
||||||
$RPM_BUILD_ROOT%pkgdatadir/template \
|
$RPM_BUILD_ROOT%pkgdatadir/template \
|
||||||
$RPM_BUILD_ROOT%_initrddir \
|
$RPM_BUILD_ROOT%_initrddir \
|
||||||
$RPM_BUILD_ROOT%homedir \
|
$RPM_BUILD_ROOT%homedir \
|
||||||
$RPM_BUILD_ROOT%scanstatedir
|
$RPM_BUILD_ROOT%scanstatedir
|
||||||
|
|
||||||
rm -f $RPM_BUILD_ROOT%_sysconfdir/clamd.conf.sample \
|
rm -f $RPM_BUILD_ROOT%_sysconfdir/clamd.conf.sample \
|
||||||
$RPM_BUILD_ROOT%_libdir/*.la
|
$RPM_BUILD_ROOT%_libdir/*.la
|
||||||
|
|
||||||
|
|
||||||
%{?with_bytecode:touch $RPM_BUILD_ROOT%homedir/bytecode.cld}
|
%{?with_bytecode:touch $RPM_BUILD_ROOT%homedir/bytecode.cld}
|
||||||
touch $RPM_BUILD_ROOT%homedir/{daily,main}.cld
|
touch $RPM_BUILD_ROOT%homedir/{daily,main}.cld
|
||||||
touch $RPM_BUILD_ROOT%homedir/mirrors.dat
|
touch $RPM_BUILD_ROOT%homedir/mirrors.dat
|
||||||
|
|
||||||
install -D -m 0644 -p %SOURCE10 $RPM_BUILD_ROOT%homedir/main.cvd
|
install -D -m 0644 -p %SOURCE10 $RPM_BUILD_ROOT%homedir/main.cvd
|
||||||
install -D -m 0644 -p %SOURCE11 $RPM_BUILD_ROOT%homedir/daily.cvd
|
install -D -m 0644 -p %SOURCE11 $RPM_BUILD_ROOT%homedir/daily.cvd
|
||||||
%{?with_bytecode:install -D -m 0644 -p %SOURCE12 $RPM_BUILD_ROOT%homedir/bytecode.cvd}
|
%{?with_bytecode:install -D -m 0644 -p %SOURCE12 $RPM_BUILD_ROOT%homedir/bytecode.cvd}
|
||||||
|
|
||||||
## prepare the server-files
|
## prepare the server-files
|
||||||
install -D -m 0644 -p %SOURCE2 _doc_server/clamd.sysconfig
|
install -D -m 0644 -p %SOURCE2 _doc_server/clamd.sysconfig
|
||||||
install -D -m 0644 -p %SOURCE3 _doc_server/clamd.logrotate
|
install -D -m 0644 -p %SOURCE3 _doc_server/clamd.logrotate
|
||||||
%if 0%{?with_sysv:1}
|
%if 0%{?with_sysv:1}
|
||||||
install -D -m 0755 -p %SOURCE7 _doc_server/clamd.init
|
install -D -m 0755 -p %SOURCE7 _doc_server/clamd.init
|
||||||
%endif
|
%endif
|
||||||
install -D -m 0644 -p %SOURCE5 _doc_server/README
|
install -D -m 0644 -p %SOURCE5 _doc_server/README
|
||||||
install -D -m 0644 -p etc/clamd.conf.sample _doc_server/clamd.conf
|
install -D -m 0644 -p etc/clamd.conf.sample _doc_server/clamd.conf
|
||||||
|
|
||||||
%if 0%{?with_sysv:1}
|
%if 0%{?with_sysv:1}
|
||||||
install -m 0644 -p %SOURCE520 $RPM_BUILD_ROOT%pkgdatadir/
|
install -m 0644 -p %SOURCE520 $RPM_BUILD_ROOT%pkgdatadir/
|
||||||
%endif
|
%endif
|
||||||
install -m 0755 -p %SOURCE100 $RPM_BUILD_ROOT%pkgdatadir/
|
install -m 0755 -p %SOURCE100 $RPM_BUILD_ROOT%pkgdatadir/
|
||||||
cp -pa _doc_server/* $RPM_BUILD_ROOT%pkgdatadir/template
|
cp -pa _doc_server/* $RPM_BUILD_ROOT%pkgdatadir/template
|
||||||
|
|
||||||
%if 0%{?with_sysv:1}
|
%if 0%{?with_sysv:1}
|
||||||
smartsubst 's!/usr/share/clamav!%pkgdatadir!g' $RPM_BUILD_ROOT%pkgdatadir/clamd-wrapper
|
smartsubst 's!/usr/share/clamav!%pkgdatadir!g' $RPM_BUILD_ROOT%pkgdatadir/clamd-wrapper
|
||||||
@ -547,18 +547,18 @@ 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
|
||||||
install -D -m 0755 -p %SOURCE8 $RPM_BUILD_ROOT%_sbindir/clamav-notify-servers
|
install -D -m 0755 -p %SOURCE8 $RPM_BUILD_ROOT%_sbindir/clamav-notify-servers
|
||||||
touch $RPM_BUILD_ROOT%freshclamlog
|
touch $RPM_BUILD_ROOT%freshclamlog
|
||||||
|
|
||||||
install -D -p -m 0755 %SOURCE200 $RPM_BUILD_ROOT%pkgdatadir/freshclam-sleep
|
install -D -p -m 0755 %SOURCE200 $RPM_BUILD_ROOT%pkgdatadir/freshclam-sleep
|
||||||
install -D -p -m 0644 %SOURCE201 $RPM_BUILD_ROOT%_sysconfdir/sysconfig/freshclam
|
install -D -p -m 0644 %SOURCE201 $RPM_BUILD_ROOT%_sysconfdir/sysconfig/freshclam
|
||||||
install -D -p -m 0600 %SOURCE202 $RPM_BUILD_ROOT%_sysconfdir/cron.d/clamav-update
|
install -D -p -m 0600 %SOURCE202 $RPM_BUILD_ROOT%_sysconfdir/cron.d/clamav-update
|
||||||
mv -f $RPM_BUILD_ROOT%_sysconfdir/freshclam.conf{.sample,}
|
mv -f $RPM_BUILD_ROOT%_sysconfdir/freshclam.conf{.sample,}
|
||||||
|
|
||||||
smartsubst 's!webmaster,clamav!webmaster,%updateuser!g;
|
smartsubst 's!webmaster,clamav!webmaster,%updateuser!g;
|
||||||
s!/usr/share/clamav!%pkgdatadir!g;
|
s!/usr/share/clamav!%pkgdatadir!g;
|
||||||
s!/usr/bin!%_bindir!g;
|
s!/usr/bin!%_bindir!g;
|
||||||
s!/usr/sbin!%_sbindir!g;' \
|
s!/usr/sbin!%_sbindir!g;' \
|
||||||
$RPM_BUILD_ROOT%_sysconfdir/cron.d/clamav-update \
|
$RPM_BUILD_ROOT%_sysconfdir/cron.d/clamav-update \
|
||||||
$RPM_BUILD_ROOT%pkgdatadir/freshclam-sleep
|
$RPM_BUILD_ROOT%pkgdatadir/freshclam-sleep
|
||||||
@ -620,7 +620,7 @@ rm $RPM_BUILD_ROOT%_unitdir/clamav-{daemon,freshclam}.*
|
|||||||
%if 0%{?with_sysv:1}
|
%if 0%{?with_sysv:1}
|
||||||
# keep clamd-wrapper in every case because it might be needed by other
|
# keep clamd-wrapper in every case because it might be needed by other
|
||||||
# packages
|
# packages
|
||||||
ln -s %pkgdatadir/clamd-wrapper $RPM_BUILD_ROOT%_initrddir/clamd-wrapper
|
ln -s %pkgdatadir/clamd-wrapper $RPM_BUILD_ROOT%_initrddir/clamd-wrapper
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
## ------------------------------------------------------------
|
## ------------------------------------------------------------
|
||||||
@ -686,10 +686,10 @@ test "$1" != "0" || /sbin/initctl -q stop clamd.scan || :
|
|||||||
|
|
||||||
%post update
|
%post update
|
||||||
test -e %freshclamlog || {
|
test -e %freshclamlog || {
|
||||||
touch %freshclamlog
|
touch %freshclamlog
|
||||||
%__chmod 0664 %freshclamlog
|
%__chmod 0664 %freshclamlog
|
||||||
%__chown root:%updateuser %freshclamlog
|
%__chown root:%updateuser %freshclamlog
|
||||||
! test -x /sbin/restorecon || /sbin/restorecon %freshclamlog
|
! test -x /sbin/restorecon || /sbin/restorecon %freshclamlog
|
||||||
}
|
}
|
||||||
|
|
||||||
%triggerin update -- %name-update < 0.97.3-1704
|
%triggerin update -- %name-update < 0.97.3-1704
|
||||||
@ -713,10 +713,10 @@ exit 0
|
|||||||
|
|
||||||
%post milter
|
%post milter
|
||||||
test -e %milterlog || {
|
test -e %milterlog || {
|
||||||
touch %milterlog
|
touch %milterlog
|
||||||
chmod 0620 %milterlog
|
chmod 0620 %milterlog
|
||||||
chown root:%milteruser %milterlog
|
chown root:%milteruser %milterlog
|
||||||
! test -x /sbin/restorecon || /sbin/restorecon %milterlog
|
! test -x /sbin/restorecon || /sbin/restorecon %milterlog
|
||||||
}
|
}
|
||||||
%{?with_systemd:/bin/systemd-tmpfiles --create %_tmpfilesdir/clamav-milter.conf || :}
|
%{?with_systemd:/bin/systemd-tmpfiles --create %_tmpfilesdir/clamav-milter.conf || :}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user