From 234d5964dbeac668efb41d86ac7b649c187d0fa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cern=C3=BD?= Date: Thu, 2 Jan 2025 14:36:35 +0100 Subject: [PATCH] Change the default value of environment Change the default value of the `environment` header to `any`. Using `any` does not modify the built content therefore this PR won't modify the existing SCE checks unless we add the `environment` header explicitly. --- docs/manual/developer/06_contributing_with_content.md | 2 +- ssg/build_sce.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/manual/developer/06_contributing_with_content.md b/docs/manual/developer/06_contributing_with_content.md index 11af2c115d5..ab5c430c7e9 100644 --- a/docs/manual/developer/06_contributing_with_content.md +++ b/docs/manual/developer/06_contributing_with_content.md @@ -826,7 +826,7 @@ are unique to SCE: `rule.yml`, are added as a top-level OR-operator `` with the results of this ``. - `environment`: can be `normal`, `bootc`, `any`. - The default value that is used when this key is not set is `normal`. + The default value that is used when this key is not set is `any`. This key specifies the environment in which the SCE check can run in. This way you can restrict some SCE checks to run or not run in Image mode. If set to `bootc`, the SCE check code will be modified to not run outside of the bootable image build process. diff --git a/ssg/build_sce.py b/ssg/build_sce.py index 71f14007207..bd2c0afe0b6 100644 --- a/ssg/build_sce.py +++ b/ssg/build_sce.py @@ -74,7 +74,7 @@ def _set_metadata_default_values(metadata): metadata['platform'] = metadata['platform'].split(',') if "environment" not in metadata: - metadata["environment"] = "normal" + metadata["environment"] = "any" environment_options = ["normal", "bootc", "any"] if metadata["environment"] not in environment_options: raise RuntimeError(