Bug 1099148 - client-config RPM does not install on RHEL-5
Summary: client-config RPM does not install on RHEL-5
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Update Infrastructure for Cloud Providers
Classification: Red Hat
Component: RHUA
Version: 2.1.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.0.0
Assignee: Patrick Creech
QA Contact: Radek Bíba
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-19 14:54 UTC by John Matthews
Modified: 2018-12-09 17:52 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-01 22:08:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0367 0 normal SHIPPED_LIVE Red Hat Update Infrastructure 3.0 Release 2017-03-02 03:05:22 UTC

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


Note You need to log in before you can comment on or make changes to this bug.