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.
if os.getuid() == 0:
cmdline += [
- f"--workspace-dir={args.workspace_dir}",
+ "--workspace-dir=/var/tmp",
"--output-mode=600",
]
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",
if os.getuid() == 0:
cmdline += [
- f"--workspace-dir={args.workspace_dir}",
+ "--workspace-dir=/var/tmp",
"--package-cache-dir=/var",
"--cache-only=metadata",
]
: 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.
: 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