fix network still not ready race condition (#871623)
This commit is contained in:
parent
c07c17e2c8
commit
238b8d2f24
11
dovecot-2.1.10-waitonline.patch
Normal file
11
dovecot-2.1.10-waitonline.patch
Normal file
@ -0,0 +1,11 @@
|
||||
diff -up dovecot-2.1.10/dovecot.service.in.waitonline dovecot-2.1.10/dovecot.service.in
|
||||
--- dovecot-2.1.10/dovecot.service.in.waitonline 2012-11-08 17:09:14.025772652 +0100
|
||||
+++ dovecot-2.1.10/dovecot.service.in 2012-11-08 17:10:06.472155786 +0100
|
||||
@@ -4,6 +4,7 @@ After=local-fs.target network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
+ExecStartPre=/usr/libexec/dovecot/prestartscript
|
||||
ExecStart=@sbindir@/dovecot -F
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
PrivateTmp=true
|
13
dovecot.spec
13
dovecot.spec
@ -3,7 +3,7 @@ Name: dovecot
|
||||
Epoch: 1
|
||||
Version: 2.1.10
|
||||
#global prever .rc6
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
#dovecot itself is MIT, a few sources are PD, pigeonhole is LGPLv2
|
||||
License: MIT and LGPLv2
|
||||
Group: System Environment/Daemons
|
||||
@ -31,6 +31,10 @@ Patch3: dovecot-1.0.rc7-mkcert-paths.patch
|
||||
Patch4: dovecot-2.1.10-reload.patch
|
||||
Patch5: dovecot-2.1-privatetmp.patch
|
||||
|
||||
#wait for network
|
||||
Patch6: dovecot-2.1.10-waitonline.patch
|
||||
Source15: prestartscript
|
||||
|
||||
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: openssl-devel, pam-devel, zlib-devel, bzip2-devel, libcap-devel
|
||||
BuildRequires: libtool, autoconf, automake, pkgconfig
|
||||
@ -124,6 +128,7 @@ This package provides the development files for dovecot.
|
||||
%patch3 -p1 -b .mkcert-paths
|
||||
%patch4 -p1 -b .reload
|
||||
%patch5 -p1 -b .privatetmp
|
||||
%patch6 -p1 -b .waitonline
|
||||
sed -i '/DEFAULT_INCLUDES *=/s|$| '"$(pkg-config --cflags libclucene-core)|" src/plugins/fts-lucene/Makefile.in
|
||||
|
||||
%build
|
||||
@ -200,6 +205,9 @@ install -p -D -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/dovecot
|
||||
#install man pages
|
||||
install -p -D -m 644 %{SOURCE14} $RPM_BUILD_ROOT%{_mandir}/man5/dovecot.conf.5
|
||||
|
||||
#install waitonline script
|
||||
install -p -D -m 755 %{SOURCE15} $RPM_BUILD_ROOT%{_libexecdir}/dovecot/prestartscript
|
||||
|
||||
# generate ghost .pem files
|
||||
mkdir -p $RPM_BUILD_ROOT%{ssldir}/certs
|
||||
mkdir -p $RPM_BUILD_ROOT%{ssldir}/private
|
||||
@ -464,6 +472,9 @@ make check
|
||||
%{_libdir}/%{name}/dict/libdriver_pgsql.so
|
||||
|
||||
%changelog
|
||||
* Thu Nov 08 2012 Michal Hlavinka <mhlavink@redhat.com> - 1:2.1.10-3
|
||||
- fix network still not ready race condition (#871623)
|
||||
|
||||
* Fri Nov 02 2012 Michal Hlavinka <mhlavink@redhat.com> - 1:2.1.10-2
|
||||
- add reload command to service file
|
||||
|
||||
|
3
prestartscript
Executable file
3
prestartscript
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
/bin/systemctl -q is-enabled NetworkManager.service && /usr/bin/nm-online -q --timeout 30 ||:
|
||||
|
Loading…
Reference in New Issue
Block a user