Accepting request 559954 from home:jengelh:branches:server:mail
- Replace %__-type macro indirections. Replace xargs rm by built in -delete of find(1). - Run ldconfig directly via %post -p. - Check for users in %pre before creating them, and do not suppress errors about it. OBS-URL: https://build.opensuse.org/request/show/559954 OBS-URL: https://build.opensuse.org/package/show/server:mail/dovecot23?expand=0&rev=3
This commit is contained in:
parent
61e5cd10da
commit
4ea5f55590
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Dec 25 22:39:53 UTC 2017 - jengelh@inai.de
|
||||||
|
|
||||||
|
- Replace %__-type macro indirections.
|
||||||
|
Replace xargs rm by built in -delete of find(1).
|
||||||
|
- Run ldconfig directly via %post -p.
|
||||||
|
- Check for users in %pre before creating them, and do not suppress
|
||||||
|
errors about it.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Dec 25 18:47:35 UTC 2017 - mrueckert@suse.de
|
Mon Dec 25 18:47:35 UTC 2017 - mrueckert@suse.de
|
||||||
|
|
||||||
|
@ -316,9 +316,9 @@ dovecot tree.
|
|||||||
pushd %{dovecot_pigeonhole_source_dir}
|
pushd %{dovecot_pigeonhole_source_dir}
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
popd
|
popd
|
||||||
%{__gzip} -9v ChangeLog
|
gzip -9v ChangeLog
|
||||||
# Fix plugins dir.
|
# Fix plugins dir.
|
||||||
%{__sed} -i 's|#mail_plugin_dir = /usr/lib/dovecot|mail_plugin_dir = %{_libdir}/dovecot/modules|' doc/example-config/conf.d/10-mail.conf
|
sed -i 's|#mail_plugin_dir = /usr/lib/dovecot|mail_plugin_dir = %{_libdir}/dovecot/modules|' doc/example-config/conf.d/10-mail.conf
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="%{optflags}"
|
export CFLAGS="%{optflags}"
|
||||||
@ -389,11 +389,11 @@ make -C %{dovecot_pigeonhole_source_dir} test
|
|||||||
%makeinstall -C %{dovecot_pigeonhole_source_dir} sieve_docdir=%{dovecot_pigeonhole_docdir}
|
%makeinstall -C %{dovecot_pigeonhole_source_dir} sieve_docdir=%{dovecot_pigeonhole_docdir}
|
||||||
|
|
||||||
# clean up unused files, as much as I would like to use -delete ... the old find on sles9 doesnt support it
|
# clean up unused files, as much as I would like to use -delete ... the old find on sles9 doesnt support it
|
||||||
find %{buildroot}%{_libdir}/%{pkg_name}/ -type f -name \*.la -print0 | xargs -r0 rm -fv
|
find %{buildroot}%{_libdir}/%{pkg_name}/ -type f \
|
||||||
find %{buildroot}%{_libdir}/%{pkg_name}/ -type f -name \*.a -print0 | xargs -r0 rm -fv
|
'(' -name \*.la -o -name \*.a ')' -print -delete
|
||||||
|
|
||||||
# create /var directories
|
# create /var directories
|
||||||
%{__install} -m 0755 -Dd \
|
install -m 0755 -Dd \
|
||||||
%{buildroot}%{_var}/run/%{pkg_name}/login/ \
|
%{buildroot}%{_var}/run/%{pkg_name}/login/ \
|
||||||
%{buildroot}%{_var}/lib/%{pkg_name}/
|
%{buildroot}%{_var}/lib/%{pkg_name}/
|
||||||
|
|
||||||
@ -414,7 +414,7 @@ ln -sv \
|
|||||||
popd
|
popd
|
||||||
|
|
||||||
# additional docs for the main package
|
# additional docs for the main package
|
||||||
%{__install} -m 0644 \
|
install -m 0644 \
|
||||||
AUTHORS ChangeLog* COPYING* NEWS TODO README* \
|
AUTHORS ChangeLog* COPYING* NEWS TODO README* \
|
||||||
%if %{with solr}
|
%if %{with solr}
|
||||||
doc/*.xml \
|
doc/*.xml \
|
||||||
@ -422,9 +422,9 @@ popd
|
|||||||
%{buildroot}%{_docdir}/%{pkg_name}/
|
%{buildroot}%{_docdir}/%{pkg_name}/
|
||||||
|
|
||||||
# install sieve docs
|
# install sieve docs
|
||||||
%{__install} -m 0755 -Dd %{buildroot}%{dovecot_pigeonhole_docdir}
|
install -m 0755 -Dd %{buildroot}%{dovecot_pigeonhole_docdir}
|
||||||
pushd %{dovecot_pigeonhole_source_dir}
|
pushd %{dovecot_pigeonhole_source_dir}
|
||||||
%__sed -i 's/\r$//' doc/rfc/*
|
sed -i 's/\r$//' doc/rfc/*
|
||||||
cp -av AUTHORS COPYING* INSTALL NEWS README TODO \
|
cp -av AUTHORS COPYING* INSTALL NEWS README TODO \
|
||||||
examples/ doc/rfc/ doc/devel \
|
examples/ doc/rfc/ doc/devel \
|
||||||
%{buildroot}%{dovecot_pigeonhole_docdir}/
|
%{buildroot}%{dovecot_pigeonhole_docdir}/
|
||||||
@ -446,9 +446,13 @@ rm %{buildroot}%{_sysconfdir}/%{pkg_name}/README
|
|||||||
|
|
||||||
%pre
|
%pre
|
||||||
test -n "$FIRST_ARG" || FIRST_ARG=$1
|
test -n "$FIRST_ARG" || FIRST_ARG=$1
|
||||||
/usr/sbin/groupadd -r %{pkg_name} >/dev/null 2>&1 || :
|
getent group %{pkg_name} >/dev/null || /usr/sbin/groupadd -r %{pkg_name}
|
||||||
/usr/sbin/useradd -g %{pkg_name} -s /bin/false -r -c "User for Dovecot imapd" -d %{_var}/run/%{pkg_name} %{pkg_name} >/dev/null 2>&1 || :
|
getent passwd %{pkg_name} >/dev/null || \
|
||||||
/usr/sbin/useradd -g %{pkg_name} -s /bin/false -r -c "User for Dovecot login" -d %{_var}/run/%{pkg_name} dovenull >/dev/null 2>&1 || :
|
/usr/sbin/useradd -g %{pkg_name} -s /bin/false -r \
|
||||||
|
-c "User for Dovecot imapd" -d %{_var}/run/%{pkg_name} %{pkg_name}
|
||||||
|
getent passwd dovenull >/dev/null || \
|
||||||
|
/usr/sbin/useradd -g %{pkg_name} -s /bin/false -r \
|
||||||
|
-c "User for Dovecot login" -d %{_var}/run/%{pkg_name} dovenull
|
||||||
# do not let dovecot run during upgrade rhbz#134325
|
# do not let dovecot run during upgrade rhbz#134325
|
||||||
if [ "$FIRST_ARG" -ge "1" ]; then
|
if [ "$FIRST_ARG" -ge "1" ]; then
|
||||||
rm -f %restart_flag
|
rm -f %restart_flag
|
||||||
@ -469,8 +473,7 @@ if [ "$FIRST_ARG" -ge "1" ]; then
|
|||||||
%endif
|
%endif
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%post
|
%post -p /sbin/ldconfig
|
||||||
/sbin/ldconfig
|
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
test -n "$FIRST_ARG" || FIRST_ARG=$1
|
test -n "$FIRST_ARG" || FIRST_ARG=$1
|
||||||
|
Loading…
Reference in New Issue
Block a user