Right now CentOS has to do manual override of the IPA platform in their spec file because we by default detect the platform from /etc/os-release content which has ID="centos" vs ID="rhel" on RHEL.
/etc/os-release
ID="centos"
ID="rhel"
I think it is beneficial to add a centos IPA platform module, to allow 'debranding' and other tuning in it. For newer CentOS 8 replacements (AlmaLinux and RockyLinux) this also would be useful as they would be able to add their own platform modules if interested.
centos
We also fall back to ID_LIKE. CentOS should have ID_LIKE=rhel fedora in /etc/os-release. The code in ipaplatform automatically selects rhel platform provider, since it is the first entry in ID_LIKE and ipaplatform.centos is not available. The flag./configure --with-ipaplatform overrides auto-detection.
ID_LIKE
ID_LIKE=rhel fedora
ipaplatform
rhel
ipaplatform.centos
./configure --with-ipaplatform
I can confirm as recently as 4.8.7 that the auto-detection selects centos as the platform, not rhel, and fails to build.
checking supported IPA platform... configure: error: IPA platform centos is not supported
To resolve this CentOS has had to use the configure flag to force rhel as the platform. That is a manual change that has to take place every time a new SRPM is exported to git.centos.org. Our goal is to not have to perform this manual modification and be able to rebuild the RHEL SRPM on CentOS as-is. It doesn't matter to me if we do that with a centos platform module, or by changing the auto-detection to select rhel when run on CentOS.
I see. That's a limitation of our configure script. It only checks ID and does not fall back to ID_LIKE.
configure
ID
PR https://github.com/freeipa/freeipa/pull/5516 should fix the issue for CentOS and Ubuntu platforms.
Metadata Update from @cheimes: - Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/5516
master:
ipa-4-9:
Metadata Update from @frenaud: - Issue close_status updated to: fixed - Issue status updated to: Closed (was: Open)