CentOS 9 Release Detection, master branch (2022.05.16.)
Taught AtlasCMake and AtlasLCG how to parse /etc/os-release
in case the lsb_release
executable is not available.
This was needed to support CentOS 9, which does not provide lsb_release
anymore. As it is described/discussed in ATLINFR-4539 and ADHI-4882.
I made the logic here I believe a little more elegant than what @rhauser did in atlas-tdaq-software/tdaq-common-cmake@e7a91824. With this code if a given system does not provide the lsb_release
executable, the code will fall back on looking at the /etc/os-release
file if it exists. But the code will still use lsb_release
if it's available. I was also able to keep a lot of parsing logic, so that the output parsing for lsb_release
and /etc/os-release
could be shared. (I also prefer to use just native CMake commands as much as possible. Not requiring the build system to necessarily provide all the shell commands that the TDAQ code uses.)