use /run instead of /var/run (#1706372)

This commit is contained in:
Michal Hlavinka 2019-05-13 16:15:48 +02:00
parent 82caf4b446
commit b242522b1e
2 changed files with 14 additions and 11 deletions

View File

@ -5,7 +5,7 @@ Name: dovecot
Epoch: 1
Version: 2.3.6
%global prever %{nil}
Release: 1%{?dist}
Release: 2%{?dist}
#dovecot itself is MIT, a few sources are PD, pigeonhole is LGPLv2
License: MIT and LGPLv2
@ -87,7 +87,7 @@ BuildRequires: curl-devel expat-devel
BuildRequires: libcurl-devel expat-devel
%endif
%global restart_flag /var/run/%{name}/%{name}-restart-after-rpm-install
%global restart_flag /run/%{name}/%{name}-restart-after-rpm-install
%description
Dovecot is an IMAP server for Linux/UNIX-like systems, written with security
@ -241,7 +241,7 @@ install -p -D -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initddir}/dovecot
install -p -D -m 600 %{SOURCE9} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/dovecot
%endif
mkdir -p $RPM_BUILD_ROOT/var/run/dovecot/{login,empty,token-login}
mkdir -p $RPM_BUILD_ROOT/run/dovecot/{login,empty,token-login}
# Install dovecot configuration and dovecot-openssl.cnf
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dovecot/conf.d
@ -298,11 +298,11 @@ then
%endif
fi
install -d -m 0755 -g dovecot -d /var/run/dovecot
install -d -m 0755 -d /var/run/dovecot/empty
install -d -m 0750 -g dovenull -d /var/run/dovecot/login
install -d -m 0755 -g dovenull -d /var/run/dovecot/token-login
[ -x /sbin/restorecon ] && /sbin/restorecon -R /var/run/dovecot
install -d -m 0755 -g dovecot -d /run/dovecot
install -d -m 0755 -d /run/dovecot/empty
install -d -m 0750 -g dovenull -d /run/dovecot/login
install -d -m 0755 -g dovenull -d /run/dovecot/token-login
[ -x /sbin/restorecon ] && /sbin/restorecon -R /run/dovecot
%preun
if [ $1 = 0 ]; then
@ -313,7 +313,7 @@ if [ $1 = 0 ]; then
/sbin/service %{name} stop > /dev/null 2>&1
/sbin/chkconfig --del %{name}
%endif
rm -rf /var/run/dovecot
rm -rf /run/dovecot
fi
%postun
@ -436,7 +436,7 @@ make check
%{_libexecdir}/%{name}
%exclude %{_libexecdir}/%{name}/managesieve*
%ghost /var/run/dovecot
%ghost /run/dovecot
%attr(0750,dovecot,dovecot) /var/lib/dovecot
%{_datadir}/%{name}
@ -493,6 +493,9 @@ make check
%{_libdir}/%{name}/dict/libdriver_pgsql.so
%changelog
* Mon May 13 2019 Michal Hlavinka <mhlavink@redhat.com> - 1:2.3.6-2
- use /run instead of /var/run (#1706372)
* Thu May 02 2019 Michal Hlavinka <mhlavink@redhat.com> - 1:2.3.6-1
- dovecot updated to 2.3.6, pigeonhole updated to 0.5.6

View File

@ -1,2 +1,2 @@
d /var/run/dovecot 0755 root dovecot -
d /run/dovecot 0755 root dovecot -