From aa438893590028393c2b3d92b1def29b5c7f5b7d Mon Sep 17 00:00:00 2001 From: Owen W. Taylor Date: Oct 14 2020 20:23:45 +0000 Subject: Add --signing-intent and --repo-url to 'flatpak-build' When flatpak-build was first added as a command, the signing-intent and repo-url parameters weren't implemented in OSBS for Flatpak builds; since then the Flatpak and non-Flatpak paths have been unified to a greater extent, making these options work. So move them to the code that is shared between build-container and build-flatpak. Signed-off-by: Owen W. Taylor --- diff --git a/pyrpkg/cli.py b/pyrpkg/cli.py index 8721b4e..1ecee86 100644 --- a/pyrpkg/cli.py +++ b/pyrpkg/cli.py @@ -1583,6 +1583,16 @@ class cliClient(object): help='Limit a scratch or a isolated build to an arch. May have multiple arches.') parser.add_argument( + '--repo-url', + metavar="URL", + help='URLs of yum repo files', + nargs='+') + + parser.add_argument( + '--signing-intent', + help='Signing intent of the ODCS composes.') + + parser.add_argument( '--skip-remote-rules-validation', action='store_true', default=False, @@ -1604,9 +1614,6 @@ class cliClient(object): # # --compose-id is implemented for Flatpaks as a side-effect of the internal # implementation, but it is unlikely to be useful to trigger through rpkg. - # --signing-intent is not implemented for Flatpaks, though it could be useful - # --repo-url makes no sense for flatpaks, since they must be built from a - # compose of a single module. self.container_build_parser.add_argument( '--compose-id', @@ -1616,14 +1623,6 @@ class cliClient(object): help='ODCS composes used. Cannot be used with --signing-intent', nargs='+') self.container_build_parser.add_argument( - '--signing-intent', - help='Signing intent of the ODCS composes.') - self.container_build_parser.add_argument( - '--repo-url', - metavar="URL", - help='URLs of yum repo files', - nargs='+') - self.container_build_parser.add_argument( '--replace-dependency', metavar="PKG_MANAGER:NAME:VERSION[:NEW_NAME]", help='Cachito dependency replacement', @@ -2036,17 +2035,17 @@ class cliClient(object): "koji_parent_build": self.args.koji_parent_build, "git_branch": self.cmd.branch_merge, "arches": self.args.arches, - "skip_build": self.args.skip_build} + "signing_intent": self.args.signing_intent, + "skip_build": self.args.skip_build, + "yum_repourls": self.args.repo_url} if not flatpak: if self.args.compose_ids and self.args.signing_intent: raise rpkgError("argument --compose-id: not allowed with argument" " --signing-intent") opts.update({ - "yum_repourls": self.args.repo_url, "dependency_replacements": self.args.replace_dependency, "compose_ids": self.args.compose_ids, - "signing_intent": self.args.signing_intent, }) if self.args.isolated and not self.args.build_release: diff --git a/tests/test_cli.py b/tests/test_cli.py index 3185e90..91dd524 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -306,7 +306,9 @@ class TestContainerBuildWithKoji(CliTestCase): 'koji_parent_build': None, 'git_branch': 'eng-rhel-7', 'arches': None, - 'skip_build': False + 'signing_intent': None, + 'skip_build': False, + 'yum_repourls': None }, kojiprofile='koji', build_client=utils.build_client,