LinuxCzar

Engineering Software, Linux, and Observability. The website of Jack Neely.    

Build Systems: Making RHEL5 Packages on RHEL6

In my cobbled together build system I’ve never been able to build RHEL 5 (much less RHEL 4) packages on my RHEL 6 host.  I knew this was because RHEL 6 uses newer file digest algorithms and compression algorithms in its version of RPM.  When Mock put together the RHEL 5 build chroot, the version of RPM there could not understand the source package built by the host.

The time came to stop working around this annoyance and fix it.  All one needs to do is define a couple extra defines when one calls RPM to assemble the source package.

--define "_source_filedigest_algorithm md5"
--define "_binary_filedigest_algorithm md5"

My make file simply checks if the dist I’m building for needs the use of these extra defines with the following code.

ifneq (, $(findstring $(DIST), "EL3 EL4 EL5"))
RPMDEFINES := $(RPMDEFINES) \
    --define "_source_filedigest_algorithm md5" \
    --define "_binary_filedigest_algorithm md5"
endif

 Previous  Up  Next


comments powered by Disqus