diff options
author | Matt Domsch <matt@domsch.com> | 2022-09-06 08:22:22 -0400 |
---|---|---|
committer | Matt Domsch <matt@domsch.com> | 2022-09-06 08:22:22 -0400 |
commit | 9ca62889a84f4abf33a92d87eb5c3992bfa03014 (patch) | |
tree | d3ea7d91d337313562f0d3078f66937422e5e107 /opendkim.spec | |
parent | f5642911f19a831382471c7319c71a295915be64 (diff) | |
download | opendkim_EL6-9ca62889a84f4abf33a92d87eb5c3992bfa03014.tar.gz |
use systemd RuntimeDirectory for socket file
Diffstat (limited to 'opendkim.spec')
-rw-r--r-- | opendkim.spec | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/opendkim.spec b/opendkim.spec index 8256e92..d8580cf 100644 --- a/opendkim.spec +++ b/opendkim.spec @@ -1,3 +1,10 @@ +%global systemd (0%{?fedora} >= 18) || (0%{?rhel} >= 7) +# F21+ and RHEL8+ have systemd 211+ which offers RuntimeDirectory +# use that instead of tmpfiles.d +%global systemd_runtimedir (0%{?fedora} >= 21) || (0%{?rhel} >= 8) +%global tmpfiles ((0%{?fedora} >= 15) || (0%{?rhel} == 7)) && !%{systemd_runtimedir} + + %global upname OpenDKIM %global bigname OPENDKIM @@ -114,10 +121,12 @@ install -m 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/%{name}/TrustedHosts cp %{SOURCE6} ./README.fedora +%if %{tmpfiles} install -p -d %{buildroot}/usr/lib/tmpfiles.d cat > %{buildroot}/usr/lib/tmpfiles.d/%{name}.conf <<'EOF' D %{_rundir}/%{name} 0750 %{name} %{name} - EOF +%endif rm -r %{buildroot}%{_prefix}/share/doc/%{name} rm %{buildroot}%{_libdir}/*.a @@ -166,7 +175,9 @@ exit 0 %doc %{name}/README contrib/lua/*.lua %doc README.fedora %config(noreplace) %{_sysconfdir}/%{name}.conf +%if %{tmpfiles} %config(noreplace) /usr/lib/tmpfiles.d/%{name}.conf +%endif %config(noreplace) %attr(0640,%{name},%{name}) %{_sysconfdir}/%{name}/SigningTable %config(noreplace) %attr(0640,%{name},%{name}) %{_sysconfdir}/%{name}/KeyTable %config(noreplace) %attr(0640,%{name},%{name}) %{_sysconfdir}/%{name}/TrustedHosts @@ -210,8 +221,9 @@ exit 0 %{_libdir}/pkgconfig/*.pc %changelog -* Mon Sep 5 2022 Matt Domsch <mdomsch@fedoraproject.org> 2.11.0-0.31 +* Mon Sep 5 2022 Matt Domsch <mdomsch@fedoraproject.org> 2.11.0-0.32 - fix systemd service type=simple patch to apply cleanly +- Use systemd RuntimeDirectory for socket file * Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.11.0-0.30 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild |