debian-forge-composer/internal
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
..
artifact artifact: this represents the artifacts a manifest exports 2022-07-22 16:04:07 +02:00
auth go.mod: Update openshift-online/ocm-sdk-go 2022-05-19 22:18:42 +02:00
blueprint blueprint/customizations: oscap config 2022-08-04 18:19:06 +02:00
boot Move GetRedHatRelease() and GetHostDistroName() to common package 2022-06-10 14:48:18 +01:00
client distro/*: allow /boot to be customized 2022-08-08 18:05:05 +02:00
cloud remove cloud cleaner 2022-07-01 17:47:44 +02:00
cloudapi cloudapi: support container embedding 2022-08-04 14:37:12 +02:00
common worker/osbuild: use os-release to determine host OS 2022-08-25 08:25:35 +01:00
container job/osbuild: move utility the container package 2022-08-01 21:50:03 +01:00
crypt crypt: add automatic darwin support 2020-07-17 07:48:22 +02:00
disk disk/partition_table: extract customization application into method 2022-08-08 18:05:05 +02:00
distro distro: add oscap packages to image 2022-08-23 18:06:15 +02:00
distroregistry distro: rename rhel90 -> rhel9 2022-08-17 11:59:39 +02:00
dnfjson dnfjson: Add the search support to the Solver 2022-08-23 22:47:46 +01:00
environment environment: encapsulate the environment images are deployed to 2022-07-07 12:00:56 +01:00
image image: introduce image kinds for Fedora 2022-07-22 16:04:07 +02:00
jobqueue jobqueue: store an expiry date 2022-07-13 17:26:04 +02:00
jsondb test: use T.TempDir to create temporary test directory 2022-04-05 09:27:43 +02:00
manifest distro: add oscap packages to image 2022-08-23 18:06:15 +02:00
mocks mocks/dnfjson: Add mock support for the search command 2022-08-23 22:47:46 +01:00
osbuild osbuild: new stage oscap remediation 2022-08-04 18:19:06 +02:00
oscap oscap: add oscap package 2022-08-04 18:19:06 +02:00
ostree ostree: add new CommitSource type 2022-06-15 20:13:47 +02:00
platform platform: include image format 2022-07-22 16:04:07 +02:00
prometheus metrics: build jobs arch label 2022-07-27 13:37:14 +02:00
reporegistry reporegistry: remove unused ReposByArch() function 2022-03-09 23:22:06 +00:00
rhsm internal/rhsm: implement fallback to the previous mechanism 2021-08-09 12:40:23 +02:00
rpmmd Rename osbuild2 package to osbuild 2022-07-14 16:54:00 +02:00
runner runner: introduce runner abstraction 2022-07-12 08:19:57 +01:00
store distro: add containers arg to ImageType.Manifest 2022-07-21 13:32:07 +02:00
target worker: Remove ellipsis operator from clienterrors.Error 2022-08-03 13:51:52 +02:00
test cloudapi: run all Koji compose unit tests 2022-06-10 14:48:18 +01:00
upload worker/osbuild: stop handling VMDK stream-optimized conversion 2022-07-01 18:55:01 +01:00
weldr api_test: Use badpackage1 request for FetchError request 2022-08-23 22:47:46 +01:00
worker cloudapi: support container embedding 2022-08-04 14:37:12 +02:00
workload workload: introduce abstraction to encapsulate image workloads 2022-07-07 12:00:56 +01:00
tools.go go: vendor the oapi-codegen cmd 2021-02-01 15:32:58 +01:00