diff options
-rw-r--r-- | opendkim-systemd-service-simple.patch (renamed from systemd-delay-pid-check.patch) | 15 | ||||
-rw-r--r-- | opendkim.spec | 9 | ||||
-rw-r--r-- | opendkim.sysconfig | 2 |
3 files changed, 17 insertions, 9 deletions
diff --git a/systemd-delay-pid-check.patch b/opendkim-systemd-service-simple.patch index 3faff94..930c7b9 100644 --- a/systemd-delay-pid-check.patch +++ b/opendkim-systemd-service-simple.patch @@ -1,11 +1,16 @@ diff -urNp OpenDKIM-2.11.0-Beta2.orig/contrib/systemd/opendkim.service.in OpenDKIM-2.11.0-Beta2/contrib/systemd/opendkim.service.in --- OpenDKIM-2.11.0-Beta2.orig/contrib/systemd/opendkim.service.in 2018-11-14 18:47:38.000000000 -0600 -+++ OpenDKIM-2.11.0-Beta2/contrib/systemd/opendkim.service.in 2022-02-19 22:42:05.470694880 -0600 -@@ -12,6 +12,7 @@ Type=forking - PIDFile=@localstatedir@/run/opendkim/opendkim.pid ++++ OpenDKIM-2.11.0-Beta2/contrib/systemd/opendkim.service.in 2022-05-24 07:32:47.264885433 -0500 +@@ -8,10 +8,9 @@ Documentation=man:opendkim(8) man:opendk + After=network.target nss-lookup.target syslog.target + + [Service] +-Type=forking +-PIDFile=@localstatedir@/run/opendkim/opendkim.pid ++Type=simple EnvironmentFile=-@sysconfdir@/sysconfig/opendkim - ExecStart=@sbindir@/opendkim $OPTIONS -+ExecStartPost=/bin/sleep 1 +-ExecStart=@sbindir@/opendkim $OPTIONS ++ExecStart=@sbindir@/opendkim -f $OPTIONS ExecReload=/bin/kill -USR1 $MAINPID User=opendkim Group=opendkim diff --git a/opendkim.spec b/opendkim.spec index 14e4258..069de5f 100644 --- a/opendkim.spec +++ b/opendkim.spec @@ -6,7 +6,7 @@ Summary: A DomainKeys Identified Mail (DKIM) milter to sign and/or verify mail Name: opendkim Version: 2.11.0 -Release: 0.28%{?dist} +Release: 0.29%{?dist} License: BSD and Sendmail URL: http://%{name}.org/ Source0: https://github.com/trusteddomainproject/OpenDKIM/archive/%{full_version}.tar.gz @@ -21,8 +21,8 @@ Source6: README.fedora Patch0: 0001-support-for-lua-5.3.patch # https://github.com/trusteddomainproject/OpenDKIM/pull/136 Patch1: opendkim-2.11.0-comment-separator.patch -# https://bugzilla.redhat.com/show_bug.cgi?id=2056209 -Patch2: systemd-delay-pid-check.patch +# systemd service type=simple +Patch2: opendkim-systemd-service-simple.patch # Required for all versions Requires: lib%{name}%{?_isa} = %{version}-%{release} @@ -210,6 +210,9 @@ exit 0 %{_libdir}/pkgconfig/*.pc %changelog +* Tue May249 2022 Matt Domsch <mdomsch@fedoraproject.org> 2.11.0-0.29 +- Use systemd service type=simple rather than forking, avoids PID race + * Sat Feb 19 2022 Matt Domsch <mdomsch@fedoraproject.org> 2.11.0-0.28 - Make systemd delay a second before checking for the PID file. BZ#2056209 diff --git a/opendkim.sysconfig b/opendkim.sysconfig index 3202bf6..befdb7e 100644 --- a/opendkim.sysconfig +++ b/opendkim.sysconfig @@ -1,5 +1,5 @@ # Set the necessary startup options -OPTIONS="-x /etc/opendkim.conf -P /run/opendkim/opendkim.pid" +OPTIONS="-x /etc/opendkim.conf" # Set the default DKIM selector DKIM_SELECTOR=default |