]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Make `{SYSEXT,CONFEXT}_SCOPE` configurable
authorMichael Ferrari <nekkodroid404@gmail.com>
Mon, 5 Aug 2024 08:53:45 +0000 (10:53 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 5 Aug 2024 11:50:18 +0000 (13:50 +0200)
By setting `SYSEXT_SCOPE` and `CONFEXT_SCOPE` environment variables the
values to write to the extension-release file can be configured.

mkosi/__init__.py
mkosi/resources/mkosi.md

index 3530c36c367b6a3f1b7a01d8efd86e88c60da329..b17ac2f7ea48142428b04bc366a11e50fee62764 100644 (file)
@@ -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")
index 0d7e540cb0de9f4f6c41743277b50b78b8c1837f..ab775a1c13c4ba1275d588ca71db0a873e6566da 100644 (file)
@@ -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`: