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
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.
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.
Fixing version
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
(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.
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
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.
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