Bug 2053368

Summary: installing dovecot-pgsql via kickstart fails on Error in POSTIN scriptlet
Product: Red Hat Enterprise Linux 9 Reporter: Jiri Jaburek <jjaburek>
Component: dovecotAssignee: Michal Hlavinka <mhlavink>
Status: CLOSED ERRATA QA Contact: Evgeny Fedin <efedin>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0CC: efedin
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dovecot-2.3.16-6.el9 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-15 10:36:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jiri Jaburek 2022-02-11 05:49:47 UTC
Description of problem:

When installing RHEL using an Anaconda kickstart, putting just dovecot inside %packages seems to work fine. However when adding dovecot-pgsql, the installation process aborts with


Error

The following error occurred while installing the payload. This is a fatal error
and installation will be aborted.

DNF error: Error in POSTIN scriptlet in rpm package dovecot

Press ENTER to exit:


Dovecot seems to be the only package in RHEL's BaseOS + AppStream that does this.

I haven't been able to figure out what exactly is the relation to dovecot-pgsql, the package doesn't seem to have any postinstall scripts and even the one in dovecot should have succeeded.

The only thing I can think of is the last line of dovecot's postinstall scriptlet failing:

  [ -x /sbin/restorecon ] && /sbin/restorecon -R /run/dovecot

If this doesn't find executable /sbin/restorecon, the entire shell fails with non-zero. Regardless of whether this fixes the issue, I'd probably suggest using if/fi, or at least the '|| :' syntax from earlier in the same script.

In fact, the line probably shouldn't exist at all, not only is /run transient (tmpfs), but Anaconda does a global restorecon before reboot + the runtime SELinux policy takes care of context transitions.


Version-Release number of selected component (if applicable):
dovecot-2.3.16-1.el9

Comment 7 errata-xmlrpc 2022-11-15 10:36:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: dovecot security and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:8208