From: DaanDeMeyer Date: Fri, 22 Aug 2025 13:56:16 +0000 (+0200) Subject: Revert "mkosi-initrd: add --workspace-directory option" X-Git-Tag: v26~144^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3133dd59e48fbdf6aed0bd0465a3b711f8f5192;p=thirdparty%2Fmkosi.git Revert "mkosi-initrd: add --workspace-directory option" 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. --- diff --git a/mkosi/addon.py b/mkosi/addon.py index b7ea886bf..1ee734e1c 100644 --- a/mkosi/addon.py +++ b/mkosi/addon.py @@ -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", ] diff --git a/mkosi/initrd.py b/mkosi/initrd.py index a02590cf7..c01d3be09 100644 --- a/mkosi/initrd.py +++ b/mkosi/initrd.py @@ -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", ] diff --git a/mkosi/resources/man/mkosi-addon.1.md b/mkosi/resources/man/mkosi-addon.1.md index fb6504f17..9d000fb08 100644 --- a/mkosi/resources/man/mkosi-addon.1.md +++ b/mkosi/resources/man/mkosi-addon.1.md @@ -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. diff --git a/mkosi/resources/man/mkosi-initrd.1.md b/mkosi/resources/man/mkosi-initrd.1.md index da65464e6..4dd5d0518 100644 --- a/mkosi/resources/man/mkosi-initrd.1.md +++ b/mkosi/resources/man/mkosi-initrd.1.md @@ -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