Convention for multi-distro compilation
When compiling mhvtl for centos7 or alma9 we generate the same rpm file: mhvtl-utils-1.7-1.x86_64.rpm
.
Nothing tells target distribution from this filename.
We should use Dist Tag
to allow one spec file to build rpms for multiple distributions: https://fedoraproject.org/wiki/Packaging:DistTag.
Evaluating this is as simple as running rpm --eval '%{dist}'
.
On alma9 base docker image provided by linuxsoft:
[root@06d690474760 x86_64]# rpm --eval '%{dist}'
.el9
But then looking in linuxsoft: http://linuxsoft.cern.ch/cern/alma/9/CERN/x86_64/Packages/e/epel-release-9-2.al9.cern.noarch.rpm
they use al9
!!!
On linuxsoft cc7-base
:
[root@4e70ee1546b2 rpmbuild]# rpm --eval '%{dist}'
.el7.cern
Where to publish rpms for different distributions?
Similarly we need to answer this: as we support more than one distribution, we need to provide rpms directory trees for each of them.
We need to sort out theses details: the directory structure is already in place for cta public rpms:
https://cta-public-repo.web.cern.ch/cta-5/el-7/
is CC7 for cta-5 and we have cta and cta-dependencies sub-folders here.
We need a alma9 one see linuxsoft structure: http://linuxsoft.cern.ch/cern/alma/9/
but al9
/el9
issue must be understood...