Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Parse os-release to identify OS by ID_LIKE field
The /etc/os-release file has evolved over the years, with current documentation being at https://www.freedesktop.org/software/systemd/man/latest/os-release.html Part of this spec is to also look at /usr/lib/os-release as image based Linux distributions that can exist without anything in /etc may put the os-release file there. In the docs, Example 3 shows how to parse this file with shell. We can use that example and look at ID_LIKE to better determine if the OS is a Debian like system, or a Fedora like system, and differentiate between how RHEL / CentOS and friends are like Fedora and how non-RHEL, non-CentOS is also like Fedora. The practical end-outcome of this is that it will now correctly detect Amazon Linux 2023, pick 'dnf' as the package manager, and install the dependencies. Fixes: actions#2511 Signed-off-by: Stewart Smith <trawets@amazon.com>
- Loading branch information