%define clamav_usr %{name} %define clamav_grp %{name} %define clamav_uid 65035 %define clamav_gid 65035 %define libname lib%{name} Name: clamav Version: 1.4.0 Release: 2mamba Summary: Clam AntiVirus is a GPL anti-virus toolkit for UNIX Group: Applications/Security Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: https://www.clamav.net/ Source0: http://www.clamav.net/downloads/production/clamav-%{version}.tar.gz Source1: clamav-tmpfiles Source2: %{name}-clamd.logrotate Source4: %{name}-freshclam.logrotate Patch0: %{name}-1.3.1-config.patch Patch1: %{name}-1.4.0-freshclam_config.patch License: GPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel BuildRequires: libbzip2-devel BuildRequires: libcurl-devel BuildRequires: libgcc BuildRequires: libjson-c-devel BuildRequires: libmspack-devel BuildRequires: libncurses-devel BuildRequires: libopenssl-devel BuildRequires: libpcre2-devel BuildRequires: libstdc++6-devel BuildRequires: libsystemd-devel BuildRequires: libxml2-devel BuildRequires: libz-devel ## AUTOBUILDREQ-END BuildRequires: bash BuildRequires: ldconfig BuildRequires: pwdutils BuildRequires: libmilter-devel Requires: bzip2 Requires: gzip Requires: tar Requires: unzip Requires(pre): %{libname} = %{?epoch:%epoch:}%{version}-%{release} Requires(pre): /usr/sbin/groupadd Requires(pre): /usr/sbin/useradd Provides: user(clamav) Provides: group(clamav) %systemd_requires %description Clam AntiVirus is a GPL anti-virus toolkit for UNIX. The main purpose of this software is the integration with mail servers (attachment scanning). This package provides a command line scanner, and a tool for automatic updating via Internet. %package -n clamd Summary: The Clam AntiVirus Daemon Group: System/Servers Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} %description -n clamd Clam AntiVirus is a GPL anti-virus toolkit for UNIX. The main purpose of this software is the integration with mail servers (attachment scanning). This package provides the multi-threaded Clam AntiVirus Daemon. %package -n %{libname} Summary: Shared libraries for %{name} Group: System/Libraries %description -n %{libname} Clam AntiVirus is a GPL anti-virus toolkit for UNIX. The main purpose of this software is the integration with mail servers (attachment scanning). This package contains the shared libraries for %{name}. %package -n %{libname}-devel Summary: Development library and header files for the %{name} library Group: Development/Libraries Requires: %{libname} = %{?epoch:%epoch:}%{version}-%{release} %description -n %{libname}-devel Clam AntiVirus is a GPL anti-virus toolkit for UNIX. The main purpose of this software is the integration with mail servers (attachment scanning). This package contains the static %{libname} library and its header files. %debug_package %prep %setup -q #%define _default_patch_fuzz 2 %patch 0 -p1 %patch 1 -p1 #cp %{SOURCE5} database/daily.cvd %build %cmake -d build \ -DAPP_CONFIG_DIRECTORY=%{_sysconfdir} \ -DDATABASE_DIRECTORY=%{_localstatedir}/lib/clamav \ -DENABLE_EXTERNAL_MSPACK=ON #export SENDMAIL="%{_libdir}/sendmail" %make %install [ "%{buildroot}" != / ] && rm -rf %{buildroot} %makeinstall -C build # log files stuff install -d %{buildroot}%{_var}/log/%{name} touch %{buildroot}%{_var}/log/%{name}/clamd.log touch %{buildroot}%{_var}/log/%{name}/freshclam.log # install needed initscripts and logrotate files install -D -m644 %{S:1} %{buildroot}%{_tmpfilesdir}/clamav.conf install -D -m644 %{S:2} %{buildroot}%{_sysconfdir}/logrotate.d/clamd install -D -m644 %{S:4} %{buildroot}%{_sysconfdir}/logrotate.d/freshclam install -d %{buildroot}%{_var}/lib/%{name} mv %{buildroot}%{_sysconfdir}/clamd.conf.sample %{buildroot}%{_sysconfdir}/clamd.conf mv %{buildroot}%{_sysconfdir}/freshclam.conf.sample %{buildroot}%{_sysconfdir}/freshclam.conf mv %{buildroot}%{_sysconfdir}/clamav-milter.conf.sample %{buildroot}%{_sysconfdir}/clamav-milter.conf ##install -d %{buildroot}%{_unitdir} #install -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/clamd.service #install -m 0644 %{SOURCE7} %{buildroot}%{_unitdir}/freshclamd.service install -d %{buildroot}%{_prefix}/lib/tmpfiles.d cat > %{buildroot}%{_prefix}/lib/tmpfiles.d/clamav.conf << _EOF d /run/clamav 711 %{clamav_usr} %{clamav_grp} _EOF %clean [ "%{buildroot}" != / ] && rm -rf %{buildroot} %pre /usr/sbin/groupadd %{clamav_grp} -g %{clamav_gid} &>/dev/null /usr/sbin/useradd %{clamav_usr} -c "Clam AntiVirus" -s /bin/false \ -u %{clamav_uid} -g %{clamav_grp} &>/dev/null %tmpfiles_create_package clamav %{SOURCE1} : %post %systemd_post clamav-freshclam #if [ $1 -ge 1 ]; then # # Workaround: remove /0 file created by error in initscript # [ -e /0 ] && rm -f /0 #fi : %preun %systemd_preun clamav-freshclam if [ $1 -eq 0 ]; then # erase /usr/sbin/userdel %{clamav_usr} 2>/dev/null fi : %postun %systemd_postun_with_restart clamav-freshclam : %post -n clamd %systemd_post clamav-daemon.socket : %preun -n clamd %systemd_preun clamav-daemon.socket : %postun -n clamd %systemd_postun_with_restart clamav-daemon.socket : %post -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig %files %defattr(-,root,root) %config(noreplace) %{_sysconfdir}/freshclam.conf %config(noreplace) %{_sysconfdir}/clamav-milter.conf %config(noreplace) %{_sysconfdir}/logrotate.d/freshclam %{_bindir}/clambc %{_bindir}/clamconf %{_bindir}/clamdscan %{_bindir}/clamscan %{_bindir}/clamsubmit %{_bindir}/freshclam %{_bindir}/sigtool %{_sbindir}/clamav-milter %{_tmpfilesdir}/clamav.conf %{_sbindir}/clamonacc %{_unitdir}/clamav-clamonacc.service %{_unitdir}/clamav-freshclam.service %{_unitdir}/clamav-freshclam-once.service %{_unitdir}/clamav-freshclam-once.timer %dir %attr(0755,%{clamav_usr},%{clamav_grp}) %{_var}/lib/%{name} %dir %attr(0755,%{clamav_usr},%{clamav_grp}) %{_var}/log/%{name} %ghost %attr(0644,%{clamav_usr},%{clamav_grp}) %{_var}/log/%{name}/freshclam.log %{_mandir}/man1/clamconf.* %{_mandir}/man1/clamdscan.* %{_mandir}/man1/clamscan.* %{_mandir}/man1/clamsubmit.1* %{_mandir}/man1/clambc.1.gz %{_mandir}/man1/freshclam.* %{_mandir}/man1/sigtool.* %{_mandir}/man5/clamav-milter.conf.* %{_mandir}/man5/clamd.conf.* %{_mandir}/man5/freshclam.conf.* %{_mandir}/man8/clamav-milter.* %{_mandir}/man8/clamonacc.8* %doc COPYING %files -n clamd %defattr(-,root,root) %config(noreplace) %{_sysconfdir}/clamd.conf %config(noreplace) %{_sysconfdir}/logrotate.d/clamd %{_sbindir}/clamd %{_bindir}/clamdtop %{_unitdir}/clamav-daemon.service %{_unitdir}/clamav-daemon.socket %ghost %attr(0644,%{clamav_usr},%{clamav_grp}) %{_var}/log/%{name}/clamd.log %{_mandir}/man1/clamdtop.* %{_mandir}/man8/clamd.* %files -n %{libname} %defattr(-,root,root) %{_libdir}/libclamav.so.* %{_libdir}/libclamunrar.so.* %{_libdir}/libclamunrar_iface.so.* %{_libdir}/libfreshclam.so.* %files -n %{libname}-devel %defattr(-,root,root) %{_bindir}/clamav-config %{_includedir}/*.h %{_libdir}/libclamav.so %{_libdir}/libclamav_rust.a %{_libdir}/libclamunrar.so %{_libdir}/libclamunrar_iface.so %{_libdir}/libfreshclam.so %{_libdir}/pkgconfig/*.pc %dir %{_docdir}/ClamAV %dir %{_docdir}/ClamAV/html %{_docdir}/ClamAV/html/* #% doc BUGS ChangeLog NEWS README %changelog * Tue Sep 03 2024 Silvan Calarco 1.4.0-2mamba - provide user and group clamav * Thu Aug 22 2024 Automatic Build System 1.4.0-1mamba - automatic version update by autodist * Thu May 02 2024 Silvan Calarco 1.3.1-2mamba - rebuilt with -DDATABASE_DIRECTORY and ENABLE_EXTERNAL_MS_PACK - conf: fix socket file to /run/clamav/clamd.ctl * Thu Apr 18 2024 Automatic Build System 1.3.1-1mamba - automatic version update by autodist * Thu Feb 08 2024 Automatic Build System 1.3.0-1mamba - automatic version update by autodist * Thu Oct 26 2023 Automatic Build System 1.2.1-1mamba - automatic version update by autodist * Sun Sep 10 2023 Automatic Build System 1.2.0-1mamba - automatic version update by autodist * Thu Aug 17 2023 Automatic Build System 1.1.1-1mamba - automatic version update by autodist * Tue May 02 2023 Automatic Build System 1.1.0-1mamba - automatic version update by autodist * Thu Feb 16 2023 Automatic Build System 1.0.1-1mamba - automatic version update by autodist * Wed Feb 01 2023 Automatic Build System 1.0.0-1mamba - automatic version update by autodist * Sun Nov 21 2021 Silvan Calarco 0.104.1-1mamba - update to 0.104.1 * Tue Jun 22 2021 Automatic Build System 0.103.3-1mamba - automatic version update by autodist * Thu Apr 08 2021 Automatic Build System 0.103.2-1mamba - automatic version update by autodist * Thu Feb 04 2021 Automatic Build System 0.103.1-1mamba - automatic version update by autodist * Wed Oct 07 2020 Automatic Build System 0.103.0-1mamba - automatic version update by autodist * Thu Jul 23 2020 Automatic Build System 0.102.4-1mamba - automatic version update by autodist * Wed May 13 2020 Automatic Build System 0.102.3-1mamba - automatic version update by autodist * Thu Feb 13 2020 Automatic Build System 0.102.2-1mamba - automatic version update by autodist * Tue Sep 10 2019 Automatic Build System 0.101.4-1mamba - automatic version update by autodist * Wed Aug 07 2019 Automatic Build System 0.101.3-1mamba - automatic version update by autodist * Thu Mar 28 2019 Automatic Build System 0.101.2-1mamba - automatic version update by autodist * Thu Jan 10 2019 Automatic Build System 0.101.1-1mamba - automatic version update by autodist * Wed Dec 19 2018 Automatic Build System 0.101.0-1mamba - automatic version update by autodist * Sun Oct 07 2018 Automatic Build System 0.100.2-1mamba - automatic version update by autodist * Tue Jul 31 2018 Automatic Build System 0.100.1-1mamba - automatic version update by autodist * Sat Jun 23 2018 Silvan Calarco 0.100.0-1mamba - update to 0.100.0 * Wed May 04 2016 Silvan Calarco 0.99.2-1mamba - update to 0.99.2 * Thu Mar 03 2016 Automatic Build System 0.99.1-1mamba - automatic version update by autodist * Sun Dec 13 2015 Silvan Calarco 0.99-1mamba - update to 0.99 * Wed Apr 29 2015 Automatic Build System 0.98.7-1mamba - automatic version update by autodist * Thu Jan 29 2015 Automatic Build System 0.98.6-1mamba - automatic version update by autodist * Wed Nov 19 2014 Automatic Build System 0.98.5-1mamba - automatic version update by autodist * Thu Jul 24 2014 Silvan Calarco 0.98.4-4mamba - move socket file and pid from /var/run/clamav to /run/clamav - systemd switch * Thu Jul 24 2014 Silvan Calarco 0.98.4-3mamba - rebuilt with correct dbdir (--with-dbdir=%{_localstatedir}/lib/clamav/) - make /var/lib/clamav world readable to work with amavis * Thu Jul 24 2014 Silvan Calarco 0.98.4-2mamba - rebuilt with correct dbdir (--with-dbdir=/var/lib/clamav) * Tue Jun 17 2014 Automatic Build System 0.98.4-1mamba - automatic version update by autodist * Sun May 11 2014 Automatic Build System 0.98.3-1mamba - automatic version update by autodist * Wed Jan 15 2014 Automatic Build System 0.98.1-1mamba - automatic version update by autodist * Wed Oct 30 2013 Silvan Calarco 0.98-2mamba - initscript: fix to avoid creating a /0 file in root directory * Fri Sep 27 2013 Automatic Build System 0.98-1mamba - automatic version update by autodist * Wed Apr 24 2013 Automatic Build System 0.97.8-1mamba - automatic version update by autodist * Sat Apr 13 2013 Silvan Calarco 0.97.7-2mamba - freshclam initscript: fix pidfile argument for systemd to correctly detect it is running * Thu Mar 14 2013 Automatic Build System 0.97.7-1mamba - automatic version update by autodist * Fri Oct 12 2012 Automatic Build System 0.97.6-1mamba - automatic version update by autodist * Mon Aug 13 2012 Automatic Build System 0.97.5-1mamba - automatic version update by autodist * Mon May 14 2012 Ercole 'ercolinux' Carpanetto 0.97.4-1mamba - update to 0.97.4 * Thu Apr 28 2011 Silvan Calarco 0.97-1mamba - update to 0.97 * Tue Dec 07 2010 Silvan Calarco 0.96.5-1mamba - update to 0.96.5 * Wed Jun 02 2010 Automatic Build System 0.96.1-1mamba - automatic update by autodist * Mon Jul 06 2009 Silvan Calarco 0.95.2-1mamba - update to 0.95.2 * Thu Jan 29 2009 Silvan Calarco 0.94.2-2mamba - added patch for freshclam.conf to fix initscript startup * Mon Dec 22 2008 Silvan Calarco 0.94.2-1mamba - automatic update by autodist * Sat Jul 12 2008 Silvan Calarco 0.93.3-2mamba - clamav: added PreReq for libclamav to fix freshclam restart on upgrade * Sat Jul 12 2008 gil 0.93.3-1mamba - update to 0.93.3 * Mon Feb 11 2008 Silvan Calarco 0.92-1mamba - update to 0.92 * Tue May 08 2007 Aleph0 0.90.2-1mamba - update to 0.90.2 - fixes the security issues: CVE-2007-0897, CVE-2007-0898, and CVE-2007-1997 - update configuration file patch - update initscripts * Wed Oct 18 2006 Davide Madrisan 0.88.5-2qilnx - fixed static requirements for clamd and libclamv-devel packages * Wed Oct 18 2006 Davide Madrisan 0.88.5-1qilnx - update to version 0.88.5 by autospec * Wed Aug 30 2006 Davide Madrisan 0.88.4-1qilnx - update to version 0.88.4 by autospec - also fixes a security flaw (bugtraq#221) * Tue May 09 2006 Davide Madrisan 0.88.2-1qilnx - update to version 0.88.2 by autospec * Mon Apr 10 2006 Davide Madrisan 0.88.1-1qilnx - update to version 0.88.1 by autospec - this version fixes the vulnerabilities CVE-2006-16[14,15,30] and other bugs * Mon Jan 16 2006 Davide Madrisan 0.88-1qilnx - update to version 0.88 by autospec - also fixes CVE-2006-0162 (qibug#110) * Mon Nov 07 2005 Davide Madrisan 0.87.1-1qilnx - update to version 0.87.1 by autospec - this release fixes two security issues discovered by iDEFENSE (see bug#64) * Tue Sep 27 2005 Davide Madrisan 0.87-2qilnx - fixed %%preun scriptlet for clamd - %%post scriptlet: run freshclam - initscripts updated * Fri Sep 23 2005 Davide Madrisan 0.87-1qilnx - package created by autospec