From: Antonio Alvarez Feijoo Date: Fri, 21 Feb 2025 09:48:39 +0000 (+0100) Subject: Add --debug-sandbox option to mkosi-initrd and mkosi-addon X-Git-Tag: v26~359 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c0eac7d79549fc8fdf5a5c62dc41600af84c8ea7;p=thirdparty%2Fmkosi.git Add --debug-sandbox option to mkosi-initrd and mkosi-addon --- diff --git a/mkosi/addon.py b/mkosi/addon.py index 9f2786bb8..9c188e236 100644 --- a/mkosi/addon.py +++ b/mkosi/addon.py @@ -61,6 +61,8 @@ def main() -> None: cmdline += ["--debug"] if args.debug_shell: cmdline += ["--debug-shell"] + if args.debug_sandbox: + cmdline += ["--debug-sandbox"] if os.getuid() == 0: cmdline += [ diff --git a/mkosi/initrd.py b/mkosi/initrd.py index fec447548..a4305a173 100644 --- a/mkosi/initrd.py +++ b/mkosi/initrd.py @@ -165,6 +165,12 @@ def initrd_common_args(parser: argparse.ArgumentParser) -> None: action="store_true", default=False, ) + parser.add_argument( + "--debug-sandbox", + help="Run mkosi-sandbox with strace", + action="store_true", + default=False, + ) parser.add_argument( "-D", "--show-documentation", @@ -268,6 +274,8 @@ def main() -> None: cmdline += ["--debug"] if args.debug_shell: cmdline += ["--debug-shell"] + if args.debug_sandbox: + cmdline += ["--debug-sandbox"] if os.getuid() == 0: cmdline += [ diff --git a/mkosi/resources/man/mkosi-addon.1.md b/mkosi/resources/man/mkosi-addon.1.md index 7e5572a3d..f1417a377 100644 --- a/mkosi/resources/man/mkosi-addon.1.md +++ b/mkosi/resources/man/mkosi-addon.1.md @@ -13,11 +13,11 @@ using mkosi # DESCRIPTION -`mkosi-addon` is a wrapper on top of `mkosi` to simplify the generation of PE -addons containing customizations for unified kernel images specific to the +**mkosi-addon** is a wrapper on top of **mkosi** to simplify the generation of +PE addons containing customizations for unified kernel images specific to the running or local system. Will include entries in `/etc/crypttab` marked with -`x-initrd.attach`, and `/etc/kernel/cmdline`. Kernel modules and firmwares for the -running hardware can be included if a local configuration with the option +`x-initrd.attach`, and `/etc/kernel/cmdline`. Kernel modules and firmwares for +the running hardware can be included if a local configuration with the option `KernelModulesIncludeHost=` is provided. # OPTIONS @@ -40,6 +40,9 @@ running hardware can be included if a local configuration with the option `--debug-shell=` : Spawn debug shell in sandbox if a sandboxed command fails. +`--debug-sandbox` +: Run **mkosi-sandbox** with **strace**. + `--version` : Show package version. diff --git a/mkosi/resources/man/mkosi-initrd.1.md b/mkosi/resources/man/mkosi-initrd.1.md index 2a1c17f2e..de9d0364c 100644 --- a/mkosi/resources/man/mkosi-initrd.1.md +++ b/mkosi/resources/man/mkosi-initrd.1.md @@ -13,7 +13,7 @@ using mkosi # DESCRIPTION -`mkosi-initrd` is wrapper on top of `mkosi` to simplify the generation of +**mkosi-initrd** is wrapper on top of **mkosi** to simplify the generation of initrds and Unified Kernel Images for the current running system. # OPTIONS @@ -46,6 +46,9 @@ initrds and Unified Kernel Images for the current running system. `--debug-shell=` : Spawn debug shell in sandbox if a sandboxed command fails. +`--debug-sandbox` +: Run **mkosi-sandbox** with **strace**. + `--version` : Show package version.