Bug 1666244

Summary: scriptlet can fail if hostname is not installed
Product: Red Hat Enterprise Linux 8 Reporter: Petr Sklenar <psklenar>
Component: postfixAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED ERRATA QA Contact: Patrik Moško <pmosko>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.0CC: jskarvad, pmosko, thozza
Target Milestone: rcKeywords: Regression
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: postfix-3.3.1-11.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-28 16:47:16 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:
Attachments:
Description Flags
Proposed fix none

Description Petr Sklenar 2019-01-15 10:30:50 UTC
Description of problem:
scriptlet can fail if hostname is not installed

Version-Release number of selected component (if applicable):
postfix-3.3.1-8.el8.x86_64

How reproducible:
always

Steps to Reproduce:
1. remove hostname and yum install ...
or
1. yum install --installroot /tmp/mastambugu postfix

Actual results:
  Running scriptlet: postfix-2:3.3.1-8.el8.x86_64                       188/205
  Installing       : postfix-2:3.3.1-8.el8.x86_64                       188/205
  Running scriptlet: postfix-2:3.3.1-8.el8.x86_64                       188/205
/var/tmp/rpm-tmp.QAYfr0: line 47: hostname: command not found

Expected results:
no install failure in minimum installation

Additional info:
rhel7 does not use 'hostname' cmd:
postfix-2.10.1-7.el7.x86_64: rpm -q --scripts postfix | grep hostname
===> adding regression

Comment 1 Jaroslav Škarvada 2019-08-23 13:54:34 UTC
Fix is simple, just by adding requirements.

Comment 3 Jaroslav Škarvada 2019-09-25 11:36:49 UTC
Created attachment 1618980 [details]
Proposed fix

Comment 8 errata-xmlrpc 2020-04-28 16:47:16 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, 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-2020:1816