Compare commits

..

11 commits

Author SHA1 Message Date
Gwyn Ciesla
1fb46f5754 Bump EVR 2025-12-04 16:45:08 -06:00
Benjamin A. Beasley
997040fb1e Allow hex-literal 1.0 2025-12-04 10:03:08 +00:00
Fedora Release Engineering
174d267d5a Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-23 18:20:35 +00:00
Gwyn Ciesla
602cb90586 1.4.3 2025-06-18 15:01:33 -05:00
Zbigniew Jędrzejewski-Szmek
a5a23da3f5 Add sysusers.d config file to allow rpm to create users/groups automatically 2025-02-11 14:09:03 +01:00
Orion Poplawski
6b6bb39959 Update to 1.4.2 2025-01-25 17:53:38 -07:00
Fedora Release Engineering
697a05510d Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-16 13:49:03 +00:00
Orion Poplawski
b08aa79384 Update to 1.4.1 2024-10-17 19:14:19 -06:00
Benjamin A. Beasley
b3e1a94723 Document licenses of statically linked Rust dependencies 2024-09-17 21:02:49 -04:00
Benjamin A. Beasley
e884e3dd1b Update the image crate dependency to 0.25, the current release 2024-09-17 21:02:49 -04:00
Miroslav Suchý
b782f49f67 Migrate to SPDX license
This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4

If there will be no comments in two weeks, I will merge this.
2024-09-12 17:56:45 +01:00

View file

@ -165,7 +165,6 @@ Summary: Filesystem structure for clamav
# Prevent version mix
Conflicts: %{name} < %{version}-%{release}
Conflicts: %{name} > %{version}-%{release}
Requires(pre): shadow-utils
BuildArch: noarch
%description filesystem
@ -299,7 +298,6 @@ Requires: data(clamav)
Requires: clamav-filesystem = %{version}-%{release}
Requires: clamav-lib = %{version}-%{release}
Requires: coreutils
Requires(pre): shadow-utils
# This is still used by clamsmtp and exim-clamav
Provides: clamav-server = %{version}-%{release}
Provides: clamav-scanner-systemd = %{version}-%{release}
@ -320,9 +318,9 @@ Summary: Milter module for the Clam Antivirus scanner
#Requires: clamd = %%{version}-%%{release}
#Requires: /usr/sbin/sendmail
Requires: clamav-filesystem = %{version}-%{release}
Requires(pre): shadow-utils
Provides: clamav-milter-systemd = %{version}-%{release}
Obsoletes: clamav-milter-systemd < %{version}-%{release}
Requires: group(clamscan)
%description milter
This package contains files which are needed to run the clamav-milter.
@ -356,6 +354,21 @@ install -p -m0644 %{SOURCE300} clamav-milter/
mkdir -p libclamunrar{,_iface}
%{!?with_unrar:touch libclamunrar/{Makefile.in,all,install}}
# Create sysusers.d config files
cat >clamav.sysusers.conf <<EOF
g virusgroup -
u clamupdate - 'Clamav database update user' %{homedir} -
m clamupdate virusgroup
EOF
cat >clamd.sysusers.conf <<EOF
u clamscan - 'Clamav scanner user' - -
m clamscan virusgroup
EOF
cat >clamav-milter.sysusers.conf <<EOF
u clamilt - 'Clamav milter user' %{_rundir}/clamav-milter -
m clamilt virusgroup
m clamilt clamscan
EOF
%if 0%{?fedora} || 0%{?rhel} >= 9
%generate_buildrequires
@ -365,7 +378,6 @@ cd libclamav_rust
%cargo_generate_buildrequires
%endif
%build
# add -Wl,--as-needed if not exist
export LDFLAGS=$(echo %{?__global_ldflags} | sed '/-Wl,--as-needed/!s/$/ -Wl,--as-needed/')
@ -483,17 +495,21 @@ install -m 0644 %SOURCE1 %{buildroot}%{_includedir}/clamav-types.h
# TODO: Evaluate using upstream's unit with clamav-daemon.socket
rm %{buildroot}%{_unitdir}/clamav-daemon.*
install -m0644 -D clamav.sysusers.conf %{buildroot}%{_sysusersdir}/clamav.conf
install -m0644 -D clamd.sysusers.conf %{buildroot}%{_sysusersdir}/clamd.conf
install -m0644 -D clamav-milter.sysusers.conf %{buildroot}%{_sysusersdir}/clamav-milter.conf
%check
%ifarch s390x
# Tests fail on s390x
# https://github.com/Cisco-Talos/clamav/issues/759
%ctest3 -- -E valgrind || :
%ctest3 -E valgrind || :
%else
%ctest3 -- -E valgrind
%ctest3 -E valgrind
%endif
# valgrind tests fail https://github.com/Cisco-Talos/clamav/issues/584
%ctest3 -- -R valgrind || :
%ctest3 -R valgrind || :
%post
@ -516,24 +532,6 @@ do
[ -f $f -a $f -nt $cvd ] && rm -f $cvd || :
done
%pre filesystem
getent group %{updateuser} >/dev/null || groupadd -r %{updateuser}
getent passwd %{updateuser} >/dev/null || \
useradd -r -g %{updateuser} -d %{homedir} -s /sbin/nologin \
-c "Clamav database update user" %{updateuser}
getent group virusgroup >/dev/null || groupadd -r virusgroup
usermod %{updateuser} -a -G virusgroup
exit 0
%pre -n clamd
getent group %{scanuser} >/dev/null || groupadd -r %{scanuser}
getent passwd %{scanuser} >/dev/null || \
useradd -r -g %{scanuser} -d / -s /sbin/nologin \
-c "Clamav scanner user" %{scanuser}
usermod %{scanuser} -a -G virusgroup
exit 0
%post -n clamd
# Point to the new service unit
[ -L /etc/systemd/system/multi-user.target.wants/clamd@scan.service ] &&
@ -546,19 +544,6 @@ exit 0
%postun -n clamd
%systemd_postun_with_restart clamd@scan.service
%triggerin milter -- clamav-scanner
# Add the milteruser to the scanuser group; this is required when
# milter and clamd communicate through local sockets
/usr/sbin/groupmems -g %{scanuser} -a %{milteruser} &>/dev/null || :
%pre milter
getent group %{milteruser} >/dev/null || groupadd -r %{milteruser}
getent passwd %{milteruser} >/dev/null || \
useradd -r -g %{milteruser} -d %{_rundir}/clamav-milter -s /sbin/nologin \
-c "Clamav Milter user" %{milteruser}
usermod %{milteruser} -a -G virusgroup
exit 0
%post milter
%systemd_post clamav-milter.service
@ -625,6 +610,7 @@ exit 0
%dir %{_sysconfdir}/clamd.d
# Used by both clamd, clamdscan, and clamonacc
%config(noreplace) %{_sysconfdir}/clamd.d/scan.conf
%{_sysusersdir}/clamav.conf
%files data
@ -664,6 +650,7 @@ exit 0
%{_sbindir}/clamd
%{_unitdir}/clamd@.service
%{_tmpfilesdir}/clamd.scan.conf
%{_sysusersdir}/clamd.conf
%files milter
@ -674,27 +661,34 @@ exit 0
%dir %{_sysconfdir}/mail
%config(noreplace) %{_sysconfdir}/mail/clamav-milter.conf
%{_tmpfilesdir}/clamav-milter.conf
%{_sysusersdir}/clamav-milter.conf
%changelog
* Thu Dec 04 2025 Gwyn Ciesla <gwync@protonmail.com> - 1.4.3-3
- Bump EVR, hex-literal patches.
* Mon Aug 25 2025 Gwyn Ciesla <gwync@protonmail.com> - 1.4.3-2
- Revert sysuser change
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Wed Jul 23 2025 Orion Poplawski <orion@nwra.com> - 1.4.1-1
* Wed Jun 18 2025 Gwyn Ciesla <gwync@protonmail.com> - 1.4.3-1
- 1.4.3
* Sat Feb 8 2025 Zbigniew Jedrzejewski-Szmek <zbyszek@in.waw.pl> - 1.4.2-2
- Add sysusers.d config files to allow rpm to create users/groups automatically
* Thu Jan 23 2025 Orion Poplawski <orion@nwra.com> - 1.4.2-1
- Update to 1.4.2
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Wed Sep 25 2024 Orion Poplawski <orion@nwra.com> - 1.4.1-1
- Update to 1.4.1
* Wed Jul 23 2025 Orion Poplawski <orion@nwra.com> - 1.0.9-2
* Sun Sep 15 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 1.0.7-2
- Update the image crate dependency to 0.25, the current release
* Wed Jun 18 2025 Gwyn Ciesla <gwync@protonmail.com> - 1.0.9-1
- Update to 1.0.9
* Sun Jan 26 2025 Orion Poplawski <orion@nwra.com> - 1.0.8-1
- Update to 1.0.8
* Thu Sep 05 2024 Yaakov Selkowitz <yselkowi@redhat.com> - 1.0.7-1
- Update to 1.0.7