Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1099148

Summary: client-config RPM does not install on RHEL-5
Product: Red Hat Update Infrastructure for Cloud Providers Reporter: John Matthews <jmatthew>
Component: RHUAAssignee: Patrick Creech <pcreech>
Status: CLOSED ERRATA QA Contact: Radek Bíba <rbiba>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.1.3CC: bizhang, bkearney, brian, cduryee, dgao, igulina, jboutaud, pcreech, ssato, tsanders
Target Milestone: ---   
Target Release: 3.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-01 22:08:12 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 John Matthews 2014-05-19 14:54:41 UTC
Description of problem:

If the RHUA has the RPM 'redhat-rpm-config-9.0.3-42.el6' present then client-config RPMs created will not be installed on RHEL-5.


After 'redhat-rpm-config' has been installed on RHEL-6
RHUA generates a client config RPM such as:
$ rpm -qpR rhel5client-2.0-1.noarch.rpm 
/bin/sh  
config(rhel5client) = 2.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PartialHardlinkSets) <= 4.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
yum  
rpmlib(PayloadIsXz) <= 5.2-1


Prior to install of 'redhat-rpm-config', client-config RPM has requires of:
$ rpm -qpR rhel5client-2.0-1.noarch.rpm 
/bin/sh  
config(rhel5client) = 2.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
yum  


Actual results:

# rpm -Uvh rhel5client-2.0-1.noarch.rpm 
error: Failed dependencies:
	rpmlib(FileDigests) <= 4.6.0-1 is needed by rhel5client-2.0-1.noarch
	rpmlib(PayloadIsXz) <= 5.2-1 is needed by rhel5client-2.0-1.noarch



Expected results:


Additional info:

We found a workaround is possible by setting rpmmacros
We created the below file, /etc/rpm/macros.rhel5compat

cat /etc/rpm/macros.rhel5compat 
#https://access.redhat.com/site/solutions/41415
#Intended to be placed at:  /etc/rpm/macros.rhel5compat

%_binary_payload w9.gzdio
%_source_payload w9.gzdio

%_source_filedigest_algorithm 1
%_binary_filedigest_algorithm 1

%_default_patch_fuzz 2



Resulting client RPM looks like below:

$ rpm -qpR rhel5client-2.0-1.noarch.rpm 
/bin/sh  
config(rhel5client) = 2.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PartialHardlinkSets) <= 4.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
yum  


This installed on RHEL 5.10

Comment 2 John Matthews 2014-05-19 16:48:24 UTC
Reason this is showing up is that the redhat-rpm-config package installs the file '/usr/lib/rpm/redhat/macros' which contains macros that result in RPMs not compatible with RHEL5.


$ rpm -qf /usr/lib/rpm/redhat/macros 
redhat-rpm-config-9.0.3-42.el6.noarch


cat /usr/lib/rpm/redhat/macros
<snip>
# Use SHA-256 for FILEDIGESTS instead of default MD5
%_source_filedigest_algorithm 8
%_binary_filedigest_algorithm 8

# Use XZ compression for binary payloads
%_binary_payload w2.xzdio
<snip>


The change to SHA-256 and use of XZ for compression are the issues we have seen.

Comment 5 Jerome Boutaud 2016-03-28 18:27:33 UTC
Yes, RHEL 5 is supported in RHUI 3 until RHEL 5 goes EOL. 
The core use case is that a RHEL 5 client will need to be able to get update from RHUI 3 when the partner migrates to RHUI 3.

Comment 6 Patrick Creech 2016-03-30 14:46:43 UTC
Fixing version

Comment 7 Radek Bíba 2016-08-29 12:17:58 UTC
I can still reproduce the problem with RHUI 3. The generated package has the following dependencies:

# rpm -qpR rhel5client-2.0/build/RPMS/noarch/rhel5client-2.0-1.noarch.rpm 
/bin/sh  
config(rhel5client) = 2.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
yum  
rpmlib(PayloadIsXz) <= 5.2-1

And, as expected, the package won't install on RHEL 5:

# rpm -ihv --test /tmp/rhel5client-2.0-1.noarch.rpm 
error: Failed dependencies:
	rpmlib(FileDigests) <= 4.6.0-1 is needed by rhel5client-2.0-1.noarch
	rpmlib(PayloadIsXz) <= 5.2-1 is needed by rhel5client-2.0-1.noarch

Comment 8 Radek Bíba 2016-10-26 12:26:30 UTC
(In reply to Radek Bíba from comment #7)
> I can still reproduce the problem with RHUI 3.

Just to be clear: with RHUI 3 on both RHEL 6 and 7.

Comment 11 Patrick Creech 2016-11-15 13:50:05 UTC
The fix we ended up going with was to set the following macros in the template spec file at /etc/rhui/templates/rh-client-config.spec for the client rpm that gets built

%global _binary_payload    w9.gzdio
%global _binary_filedigest_algorithm   1

This allows the rpm that is built to be built in a way that can be installed on RHEL5-RHEL7

Comment 12 Radek Bíba 2016-11-16 14:16:00 UTC
Confirmed. Here's what the custom rpm requires now:

# rpm -qpR /tmp/rhui-5-1.noarch.rpm 
/bin/sh  
config(rhui) = 5-1
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
yum  

It can be installed on RHEL 5:

# rpm -ihv /tmp/rhui-5-1.noarch.rpm
Preparing...                ########################################### [100%]
   1:rhui                   ########################################### [100%]
enabled = 0

(The "enabled = 0" thing in the output is already tracked in a separate bug.)

And the configuration (using RHEL HA for RHEL 5 in the cert) works:

# yum repolist enabled
Loaded plugins: fastestmirror, security
Determining fastest mirrors
rhui-rhel-ha-for-rhel-5-server-rhui-rpms                 | 2.0 kB     00:00     
rhui-rhel-ha-for-rhel-5-server-rhui-rpms/primary         |  37 kB     00:00     
rhui-rhel-ha-for-rhel-5-server-rhui-rpms                                223/223
repo id                                  repo name                        status
rhui-rhel-ha-for-rhel-5-server-rhui-rpms Red Hat Enterprise Linux High Av 223
repolist: 223

Everything is also fine with a config RPM built on RHEL 6. Also, a config RPM built with the extra flags can be installed on RHEL 6 and 7. Marking as VERIFIED.

Comment 14 errata-xmlrpc 2017-03-01 22:08:12 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-2017:0367