From: Zack Cerza Date: Tue, 25 Feb 2025 16:15:32 +0000 (-0700) Subject: build-with-container.py: Add --rpmbuild-extra-args X-Git-Tag: v20.3.0~437^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F62016%2Fhead;p=ceph.git build-with-container.py: Add --rpmbuild-extra-args Signed-off-by: Zack Cerza --- diff --git a/src/script/build-with-container.py b/src/script/build-with-container.py index 2a0cb43818e..aee8658c98c 100755 --- a/src/script/build-with-container.py +++ b/src/script/build-with-container.py @@ -636,12 +636,18 @@ def bc_build_rpm(ctx): topdir = ( pathlib.Path(ctx.cli.homedir) / ctx.cli.build_dir / "rpmbuild" ) + rpmbuild_args = [ + 'rpmbuild', + '--rebuild', + f'-D_topdir {topdir}', + ] + list(ctx.cli.rpmbuild_arg) + [str(srpm_path)] + rpmbuild_cmd = ' '.join(shlex.quote(cmd) for cmd in rpmbuild_args) cmd = _container_cmd( ctx, [ "bash", "-c", - f"set -x; mkdir -p {topdir} && rpmbuild --rebuild -D'_topdir {topdir}' {srpm_path}", + f"set -x; mkdir -p {topdir} && {rpmbuild_cmd}", ], ) with ctx.user_command(): @@ -855,6 +861,12 @@ def parse_cli(build_step_names): " git checkout. Use any source RPM available." ), ) + parser.add_argument( + "--rpmbuild-arg", + '-R', + action="append", + help="Pass this extra argument to rpmbuild", + ) parser.add_argument( "--ceph-version", help="Rather than infer the Ceph version, use this value",