Skip to content

Update CPack RPM creation parameters for CentOS9

This MR fixes the CPack RPM creation problems in CentOS9 builds as discussed in ATLINFR-4631

  1. From from https://stackoverflow.com/questions/21288374/shipping-so-and-binaries-while-building-rpm-package to prevent error Arch dependent binaries in noarch package that always seems to happen in CentOS9:
%define _unpackaged_files_terminate_build 0
%define _binaries_in_noarch_packages_terminate_build 0
  1. As discussed in ATLINFR-4538 - prevent RPM to rewrite the she-bang line for python script:
%undefine __brp_mangle_shebangs
  1. set the compression algorithm xz (the default in CentOS7/8) and not use zstd as used in CentOS9 (see https://sft.its.cern.ch/jira/browse/SPI-2194):
%define _source_payload w2.xzdio
%define _binary_payload w2.xzdio

I've tested this patch on CentOS7 and CentOS9 and it produces reasonable AthenaExternals_23.0.4_x86_64-centos7-gcc11-opt.rpm files and compared them with and without the patch with https://github.com/lvc/pkgdiff. I've not tried to install these RPMs. This MR is not urgent - please have a look and test the code if possible before we'd put it into production.

Tagging @nstyles, @rhauser, @simmons, @boeriu, @akraszna for info and feedback.

Merge request reports