From: Michael Ferrari Date: Mon, 5 Aug 2024 08:53:45 +0000 (+0200) Subject: Make `{SYSEXT,CONFEXT}_SCOPE` configurable X-Git-Tag: v25~369 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a26c0f7e4e182cd383201bbb8d87dc63b7d92e25;p=thirdparty%2Fmkosi.git Make `{SYSEXT,CONFEXT}_SCOPE` configurable By setting `SYSEXT_SCOPE` and `CONFEXT_SCOPE` environment variables the values to write to the extension-release file can be configured. --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 3530c36c3..b17ac2f7e 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -300,7 +300,7 @@ def configure_extension_release(context: Context) -> None: f.write(f"{prefix}_VERSION_ID={context.config.image_version}\n") if f"{prefix}_SCOPE" not in extrelease: - f.write(f"{prefix}_SCOPE=initrd system portable\n") + f.write(f"{prefix}_SCOPE={context.config.environment.get(f'{prefix}_SCOPE', 'initrd system portable')}\n") if "ARCHITECTURE" not in extrelease: f.write(f"ARCHITECTURE={context.config.architecture}\n") diff --git a/mkosi/resources/mkosi.md b/mkosi/resources/mkosi.md index 0d7e540cb..ab775a1c1 100644 --- a/mkosi/resources/mkosi.md +++ b/mkosi/resources/mkosi.md @@ -2557,6 +2557,10 @@ repository. if the mirror is set to `https://mirror.net/centos-stream` mkosi will look for the epel repositories in `https://mirror.net/fedora/epel`. +* `SYSEXT_SCOPE` and `CONFEXT_SCOPE` can be used to override the default + value of the respecive `extension-release` file when building a sysext + or confext. By default the value is set to `initrd system portable`. + # EXAMPLES Create and run a raw *GPT* image with *ext4*, as `image.raw`: