diff --git a/SPECS/dovecot.spec b/SPECS/dovecot.spec index 7aade21..26605a9 100644 --- a/SPECS/dovecot.spec +++ b/SPECS/dovecot.spec @@ -6,7 +6,7 @@ Name: dovecot Epoch: 1 Version: 2.3.16 %global prever %{nil} -Release: 7%{?dist} +Release: 8%{?dist} #dovecot itself is MIT, a few sources are PD, pigeonhole is LGPLv2 License: MIT and LGPLv2 @@ -275,11 +275,16 @@ popd #dovecot uid and gid are reserved, see /usr/share/doc/setup-*/uidgid %sysusers_create_compat %{SOURCE16} -# 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 +if [ -z "$LEAPP_IPU_IN_PROGRESS" ] +then + # during LEAPP upgrade, services are not running anyway + + # 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 %post @@ -302,19 +307,29 @@ if [ $1 = 0 ]; then fi %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 - /bin/systemctl start dovecot.service >/dev/null 2>&1 || : -rm -f %restart_flag + if [ "$1" -ge "1" -a -e %restart_flag ]; then + /bin/systemctl start dovecot.service >/dev/null 2>&1 || : + rm -f %restart_flag + fi fi %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 [ -e %restart_flag ]; then + +if [ -z "$LEAPP_IPU_IN_PROGRESS" ] +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 || : -rm -f %restart_flag + rm -f %restart_flag + fi fi %check @@ -468,6 +483,9 @@ make check %{_libdir}/%{name}/dict/libdriver_pgsql.so %changelog +* Tue Sep 13 2022 Michal Hlavinka - 1:2.3.16-8 +- do not run systemd commands during leapp upgrade (#2119385) + * Tue Jul 12 2022 Michal Hlavinka - 1:2.3.16-7 - fix possible privilege escalation when similar master and non-master passdbs are used (#2106232)