I would like for a RHEL6 build machine to construct a RHEL5 compatible rpm using the maven rpm build plugin. I see how to modify the arch (amd64 vs i386) and os.name (linux vs. ...) but not RHEL5 vs. RHEL5.
Asked
Active
Viewed 1,696 times
1
-
1What do you believe you need to change to make your RPM RHEL5 compatible here? – Etan Reisner Jul 08 '15 at 20:22
-
The catalyst is the following error that occurs when I construct the rpm with RHEL6 but not with RHEL5. rpm -i /tmp/fts-app-0.0.0051-233583.noarch.rpm error: Failed dependencies: rpmlib(FileDigests) <= 4.6.0-1 is needed by fts-app-0.0.0051-233583.noarch rpmlib(PayloadIsXz) <= 5.2-1 is needed by fts-app-0.0.0051-233583.noarch – Foo Bar Jul 08 '15 at 21:42
-
I'm not sure, offhand, what `rpmlib(FileDigests)` is but the other is that RHEL6 introduced a new compression format available for rpms. See [this question](http://stackoverflow.com/q/9292243/258523) for how to control the payload compression type. – Etan Reisner Jul 09 '15 at 02:04
-
A quick look at the output from `rpm --showrc` makes it looks like you might be able to replace the value of `_dbi_tags` to get rid of the `Filedigests` stuff. I have `_dbi_tags Packages:Name:Basenames:Group:Requirename:Providename:Conflictname:Triggername:Dirnames:Requireversion:Provideversion:Installtid:Sigmd5:Sha1header:Filemd5s:Depends:Pubkeys` on CentOS 5 and `_dbi_tags Packages:Name:Basenames:Group:Requirename:Providename:Conflictname:Obsoletename:Triggername:Dirnames:Requireversion:Provideversion:Installtid:Sigmd5:Sha1header:Filedigests:Depends:Pubkeys` on CentOS 6. – Etan Reisner Jul 09 '15 at 02:06
-
1Um no. All rpmlib(...) tracking dependencies are added to deliberately poison packaging when a new and/or incompatible feature is added to rpm. The poisoning deliberately prevents attempting (in this case) creating XZ-compressed, SHA256 digested, packages built on RHEL6 but installed on RHEL5. – Jeff Johnson Jul 11 '15 at 15:15
1 Answers
1
Your best bet is to create a chroot (or perhaps run a VM or docker image, or use mock) that contains RHEL5 on the RHEL6 host, and use that for building packages.
There are specific ways to configure rpm to use ZLIB rather than XZ, and use MD5 rather than SHA256, as well as to change labeling of RHEL6 vs RHEL5.
There is no one magic switch to achieve building RHEL5 on RHEL6 (without using mock etc isolation) because RHEL5 and RHEL6 are distinct operating systems with different API's and versions which will block success for all but trivial packages.

Jeff Johnson
- 2,310
- 13
- 23