summaryrefslogtreecommitdiffstats
path: root/opendkim.spec
diff options
context:
space:
mode:
Diffstat (limited to 'opendkim.spec')
-rw-r--r--opendkim.spec14
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