From 8d38bb892d817914f97c01de0e407fe7b6c902f1 Mon Sep 17 00:00:00 2001 From: Brendan Reilly Date: Oct 15 2020 17:37:47 +0000 Subject: Add nomacboot option for spin-livemedia Fixes: https://pagure.io/koji/issue/2259 --- diff --git a/builder/kojid b/builder/kojid index a1f8162..fe46ef7 100755 --- a/builder/kojid +++ b/builder/kojid @@ -3553,7 +3553,7 @@ class LiveMediaTask(ImageTask): '--releasever', version, ]) - if arch == 'x86_64': + if arch == 'x86_64' and not opts.get('nomacboot'): cmd.append('--macboot') else: cmd.append('--nomacboot') diff --git a/cli/koji_cli/commands.py b/cli/koji_cli/commands.py index 0959fc6..b43745e 100644 --- a/cli/koji_cli/commands.py +++ b/cli/koji_cli/commands.py @@ -5701,6 +5701,8 @@ def handle_spin_livemedia(options, session, args): help=_('The URL to the SCM containing any custom lorax ' 'templates that are to be used to override the ' 'default templates.')) + parser.add_option('--nomacboot', action="store_true", + help=_("Pass the nomacboot option to livemedia-creator")) (task_options, args) = parser.parse_args(args) # Make sure the target and kickstart is specified. @@ -6083,7 +6085,7 @@ def _build_image(options, task_opts, session, args, img_type): 'format', 'install_tree_url', 'isoname', 'ksurl', 'ksversion', 'release', 'repo', 'scratch', 'skip_tag', 'specfile', 'vcpu', 'vmem', 'volid', 'optional_arches', - 'lorax_dir', 'lorax_url', + 'lorax_dir', 'lorax_url', 'nomacboot', ] for opt in passthru_opts: val = getattr(task_opts, opt, None) diff --git a/tests/test_cli/test_spin_commands.py b/tests/test_cli/test_spin_commands.py index 9a4ea1a..034387f 100644 --- a/tests/test_cli/test_spin_commands.py +++ b/tests/test_cli/test_spin_commands.py @@ -37,6 +37,7 @@ LIVEMEDIA_OPTIONS = { "install_tree_url": None, "lorax_dir": None, "lorax_url": None, + "nomacboot": False, "optional_arches": None, "volid": None, } @@ -422,6 +423,7 @@ Options: --lorax_url=URL The URL to the SCM containing any custom lorax templates that are to be used to override the default templates. + --nomacboot Pass the nomacboot option to livemedia-creator """ % (self.progname))