]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Revert "mkosi-initrd: add --workspace-directory option"
authorDaanDeMeyer <daan.j.demeyer@gmail.com>
Fri, 22 Aug 2025 13:56:16 +0000 (15:56 +0200)
committerDaanDeMeyer <daan.j.demeyer@gmail.com>
Fri, 22 Aug 2025 13:56:16 +0000 (15:56 +0200)
https://github.com/systemd/mkosi/issues/3852 is better fixed
by not configuring --workspace-dir at all within mkosi-initrd.
This allows it to be changed via the config file as the CLI argument
won't override it anymore and the default value used when running as
root is /var/tmp anyway.

This reverts commit 60ef8b5c7476ea287bb6b78711cf9280011d22f0.

mkosi/addon.py
mkosi/initrd.py
mkosi/resources/man/mkosi-addon.1.md
mkosi/resources/man/mkosi-initrd.1.md

index b7ea886bfc736b44b135db65b0666cd8a2c2dafa..1ee734e1ce5562e3cc6cb4d8d8eea007a4cd25c9 100644 (file)
@@ -67,7 +67,7 @@ def main() -> None:
 
         if os.getuid() == 0:
             cmdline += [
-                f"--workspace-dir={args.workspace_dir}",
+                "--workspace-dir=/var/tmp",
                 "--output-mode=600",
             ]
 
index a02590cf7b92cf9e5322c5e50777d293dc60edc7..c01d3be091ab1d76ad20d6571feb8cb37fa52f54 100644 (file)
@@ -268,13 +268,6 @@ def initrd_common_args(parser: argparse.ArgumentParser) -> None:
         default=None,
         type=Path,
     )
-    parser.add_argument(
-        "--workspace-dir",
-        metavar="DIR",
-        help="Workspace directory",
-        default="/var/tmp",
-        type=Path,
-    )
     parser.add_argument(
         "--debug",
         help="Turn on debugging output",
@@ -381,7 +374,7 @@ def main() -> None:
 
         if os.getuid() == 0:
             cmdline += [
-                f"--workspace-dir={args.workspace_dir}",
+                "--workspace-dir=/var/tmp",
                 "--package-cache-dir=/var",
                 "--cache-only=metadata",
             ]
index fb6504f17f94fa913837c6dae5aad55c9f6835d0..9d000fb0864f04aa59586d5cbcc3b6437b32c15f 100644 (file)
@@ -34,10 +34,6 @@ the running hardware can be included if a local configuration with the option
 :   Path to a directory where to place all generated artifacts. Defaults to the
     current working directory.
 
-`--workspace-dir=`
-:   Path to a directory where to store data required temporarily while
-    building the image. Defaults to `/var/tmp`.
-
 `--debug`
 :   Enable additional debugging output.
 
index da65464e6bfd72782b242357c7c94fee307ef871..4dd5d0518974220397dd5a518e265c54e6404fbb 100644 (file)
@@ -35,10 +35,6 @@ initrds and Unified Kernel Images for the current running system.
 :   Path to a directory where to place all generated artifacts. Defaults to the
     current working directory.
 
-`--workspace-dir=`
-:   Path to a directory where to store data required temporarily while
-    building the image. Defaults to `/var/tmp`.
-
 `--generic`, `-g`
 :   Build a generic initrd without host-specific kernel modules, which should
     allow the local system to boot on different hardware, although it's tied to