add missing leap workaround in scriptlet
related: #RHEL-40657
This commit is contained in:
parent
457d2d7eff
commit
5088b36637
46
dovecot.spec
46
dovecot.spec
@ -6,7 +6,7 @@ Name: dovecot
|
|||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: 2.3.21
|
Version: 2.3.21
|
||||||
%global prever %{nil}
|
%global prever %{nil}
|
||||||
Release: 8%{?dist}
|
Release: 9%{?dist}
|
||||||
#dovecot itself is MIT, a few sources are PD, pigeonhole is LGPLv2
|
#dovecot itself is MIT, a few sources are PD, pigeonhole is LGPLv2
|
||||||
License: MIT AND LGPL-2.1-only
|
License: MIT AND LGPL-2.1-only
|
||||||
|
|
||||||
@ -306,11 +306,16 @@ getent group dovenull >/dev/null || groupadd -r dovenull
|
|||||||
getent passwd dovenull >/dev/null || \
|
getent passwd dovenull >/dev/null || \
|
||||||
useradd -r -g dovenull -d /usr/libexec/dovecot -s /sbin/nologin -c "Dovecot's unauthorized user" dovenull
|
useradd -r -g dovenull -d /usr/libexec/dovecot -s /sbin/nologin -c "Dovecot's unauthorized user" dovenull
|
||||||
|
|
||||||
# do not let dovecot run during upgrade rhbz#134325
|
if [ -z "$LEAPP_IPU_IN_PROGRESS" ]
|
||||||
if [ "$1" = "2" ]; then
|
then
|
||||||
rm -f %restart_flag
|
# during LEAPP upgrade, services are not running anyway
|
||||||
/bin/systemctl is-active %{name}.service >/dev/null 2>&1 && touch %restart_flag ||:
|
|
||||||
/bin/systemctl stop %{name}.service >/dev/null 2>&1
|
# do not let dovecot run during upgrade rhbz#134325
|
||||||
|
if [ "$1" = "2" ]; then
|
||||||
|
rm -f %restart_flag
|
||||||
|
/bin/systemctl is-active %{name}.service >/dev/null 2>&1 && touch %restart_flag ||:
|
||||||
|
/bin/systemctl stop %{name}.service >/dev/null 2>&1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%post
|
%post
|
||||||
@ -333,19 +338,29 @@ if [ $1 = 0 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
if [ -z "$LEAPP_IPU_IN_PROGRESS" ]
|
||||||
|
then
|
||||||
|
# during LEAPP upgrade, services are not running anyway
|
||||||
|
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||||
|
|
||||||
if [ "$1" -ge "1" -a -e %restart_flag ]; then
|
if [ "$1" -ge "1" -a -e %restart_flag ]; then
|
||||||
/bin/systemctl start dovecot.service >/dev/null 2>&1 || :
|
/bin/systemctl start dovecot.service >/dev/null 2>&1 || :
|
||||||
rm -f %restart_flag
|
rm -f %restart_flag
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%posttrans
|
%posttrans
|
||||||
# dovecot should be started again in %%postun, but it's not executed on reinstall
|
|
||||||
# if it was already started, restart_flag won't be here, so it's ok to test it again
|
if [ -z "$LEAPP_IPU_IN_PROGRESS" ]
|
||||||
if [ -e %restart_flag ]; then
|
then
|
||||||
|
# during LEAPP upgrade, services are not running anyway
|
||||||
|
|
||||||
|
# dovecot should be started again in %%postun, but it's not executed on reinstall
|
||||||
|
# if it was already started, restart_flag won't be here, so it's ok to test it again
|
||||||
|
if [ -e %restart_flag ]; then
|
||||||
/bin/systemctl start dovecot.service >/dev/null 2>&1 || :
|
/bin/systemctl start dovecot.service >/dev/null 2>&1 || :
|
||||||
rm -f %restart_flag
|
rm -f %restart_flag
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%check
|
%check
|
||||||
@ -504,6 +519,9 @@ make check
|
|||||||
%{_libdir}/%{name}/dict/libdriver_pgsql.so
|
%{_libdir}/%{name}/dict/libdriver_pgsql.so
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jun 13 2024 Michal Hlavinka <mhlavink@redhat.com> - 1:2.3.21-9
|
||||||
|
- do not run during systemd commands during leap upgrade
|
||||||
|
|
||||||
* Tue Jun 11 2024 Michal Hlavinka <mhlavink@redhat.com> - 1:2.3.21-8
|
* Tue Jun 11 2024 Michal Hlavinka <mhlavink@redhat.com> - 1:2.3.21-8
|
||||||
- drop dependency on libstemmer (#RHEL-40657)
|
- drop dependency on libstemmer (#RHEL-40657)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user