debian-forge-composer/cmd
Tomas Hozza af65baa6fe worker/osbuild: use os-release to determine host OS
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>
2022-08-25 08:25:35 +01:00
..
gen-manifests gen-manifests: minor output changes 2022-07-25 21:23:02 +02:00
mock-dnf-json mock-dnf-json: Add support for search command 2022-08-23 22:47:46 +01:00
osbuild-auth-tests internal: remove kojiapi 2022-07-19 16:00:52 +02:00
osbuild-composer internal: remove kojiapi 2022-07-19 16:00:52 +02:00
osbuild-composer-cli-tests gosec: G204 - Subproccess launched as function arg 2021-12-13 12:17:30 +02:00
osbuild-composer-dbjobqueue-tests jobqueue: Move jobqueue out of internal 2022-07-04 15:37:28 +02:00
osbuild-composer-image-definitions Tools: fetch image test case generation matrix from composer 2022-05-13 21:01:37 +03:00
osbuild-composer-manifest-tests Manifests test: ensure that every image type has test coverage 2022-05-13 21:01:37 +03:00
osbuild-dnf-json-tests distro/ImageType: let PackageSets depend on ImageOptions 2022-07-04 23:04:29 +01:00
osbuild-image-tests osbuild-image-tests: ignore LVM UUID 2022-07-12 13:28:36 +02:00
osbuild-koji koji: fix excessive logging & monitoring 2022-04-05 23:48:30 +02:00
osbuild-koji-tests gosec: G204 - Subproccess launched as function arg 2021-12-13 12:17:30 +02:00
osbuild-mock-openid-provider osbuild-mock-openid-provider: support client_credentials grant type 2022-08-05 16:15:24 +02:00
osbuild-package-sets distro/ImageType: let PackageSets depend on ImageOptions 2022-07-04 23:04:29 +01:00
osbuild-pipeline cmd/osbuild-pipeline: resolve blueprint container 2022-07-21 13:32:07 +02:00
osbuild-playground osbuild: add extraEnv argument to RunOSBuild 2022-07-25 21:21:44 +02:00
osbuild-service-maintenance osbuild-service-maintenance: Rely on the db's timezone in tests 2022-08-01 10:59:05 +02:00
osbuild-store-dump distro: add containers arg to ImageType.Manifest 2022-07-21 13:32:07 +02:00
osbuild-upload-aws osbuild-service-maintenance: Clean up expired images 2021-12-03 00:14:09 +00:00
osbuild-upload-azure azure: add an option to tag page blobs 2022-06-13 21:06:01 +02:00
osbuild-upload-container container/client: rework tls settings 2022-07-21 13:32:07 +02:00
osbuild-upload-gcp cmd/osbuild-upload-gcp: fix typo in skip-import's help string 2022-06-22 12:37:34 +02:00
osbuild-upload-generic-s3 Upload to HTTPS S3 - Support self signed certificate 2022-05-26 13:46:00 +03:00
osbuild-upload-oci Add support for OCI upload provider 2022-01-28 15:16:47 +01:00
osbuild-worker worker/osbuild: use os-release to determine host OS 2022-08-25 08:25:35 +01:00