Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2041589

Summary: suppress openssl key generation output when installing rpm
Product: Red Hat Enterprise Linux 9 Reporter: Jiri Jaburek <jjaburek>
Component: postfixAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED ERRATA QA Contact: František Hrdina <fhrdina>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0CC: fhrdina
Target Milestone: rcKeywords: AutoVerified, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: postfix-3.5.9-19.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-15 10:42:07 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-01-17 18:50:23 UTC
Description of problem:

Installing postfix produces a notable amount of output due to key generation, shortened here for your convenience:

Running transaction
  Preparing        :                                                        1/1
  Running scriptlet: postfix-2:3.5.9-15.el9.x86_64                          1/1
  Installing       : postfix-2:3.5.9-15.el9.x86_64                          1/1
  Running scriptlet: postfix-2:3.5.9-15.el9.x86_64                          1/1
.....+..+.+...+.....................+.........+.....+.........+.+...........+.+
...+..+....+........+...+....+...........+...+....+..++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++*...++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++*..+.+..+.......+.....+.........+.......+.........
<snip>
  Verifying        : postfix-2:3.5.9-15.el9.x86_64                          1/1


This is caused by openssl genpkey not having its stderr redirected,

# Create self-signed SSL certificate
if [ ! -f /etc/pki/tls/private/postfix.key ]; then
  umask 077
  /usr/bin/openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:4096 -out /etc/pki/tls/private/postfix.key
fi

while the other openssl command does redirect it, though on a different line

  $req_cmd -noenc -copy_extensions none 2>/dev/null || $req_cmd
  chmod 644 /etc/pki/tls/certs/postfix.pem

Please suppress the output of the first command too, for consistency and usability of dnf/rpm.

There is nothing to be gained by having the output there - it is not printed gradually (to signal progress to the user), the whole text block is printed once the command finishes (possibly due to rpm(8) not giving tty access to scriptlets).


Version-Release number of selected component (if applicable):
postfix-3.5.9-15.el9

Comment 1 Jaroslav Škarvada 2022-01-20 23:26:37 UTC
It makes sense. Fixed in Fedora.

Regarding the:
$req_cmd -noenc -copy_extensions none 2>/dev/null || $req_cmd

This is for the openssl-3.0/1.1 compatibility and the stderr redirection in the first command was there not to confuse user in case of the openssl-1.1 where it fallbacks to the second command, but unfortunately it seems openssl writes its progress also to the stderr.

I think it's low priority, thus requesting for the 9.1.0.

Comment 12 errata-xmlrpc 2022-11-15 10:42:07 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 (postfix bug fix 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/RHBA-2022:8244