When running an osbuild job, we read `/etc/redhat-release` to get the host OS name to attach as metadata to the job result. Only Fedora and RHEL ship this file, which makes the osbuild job always fail on other distributions. The main reason to report host OS back to the worker server is due to Koji composes and the koji-finalize job, which pushes it to Koji. The motivation is to have enough information to potentially re-instantiate / identify the original builder host OS. There are no specific requirements on the string. Modify the code to use `/etc/os-release` to determine the host OS. Fall back to using `linux` as the host OS, in case reading `os-release` fails, log the error and continue with the job. The `linux` fallback is suggested by the `os-release` spec [1] [1] https://www.freedesktop.org/software/systemd/man/os-release.html#ID= Co-authored-by: Achilleas Koutsou <achilleas@koutsou.net> |
||
|---|---|---|
| .. | ||
| constants.go | ||
| distro.go | ||
| distro_test.go | ||
| echo_logrus.go | ||
| helpers.go | ||
| helpers_test.go | ||
| operation_id.go | ||
| pointers.go | ||
| pointers_test.go | ||
| states.go | ||
| states_test.go | ||