File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -636,12 +636,18 @@ def bc_build_rpm(ctx):
636636 topdir = (
637637 pathlib .Path (ctx .cli .homedir ) / ctx .cli .build_dir / "rpmbuild"
638638 )
639+ rpmbuild_args = [
640+ 'rpmbuild' ,
641+ '--rebuild' ,
642+ f'-D_topdir { topdir } ' ,
643+ ] + list (ctx .cli .rpmbuild_arg ) + [str (srpm_path )]
644+ rpmbuild_cmd = ' ' .join (shlex .quote (cmd ) for cmd in rpmbuild_args )
639645 cmd = _container_cmd (
640646 ctx ,
641647 [
642648 "bash" ,
643649 "-c" ,
644- f"set -x; mkdir -p { topdir } && rpmbuild --rebuild -D'_topdir { topdir } ' { srpm_path } " ,
650+ f"set -x; mkdir -p { topdir } && { rpmbuild_cmd } " ,
645651 ],
646652 )
647653 with ctx .user_command ():
@@ -855,6 +861,12 @@ def parse_cli(build_step_names):
855861 " git checkout. Use any source RPM available."
856862 ),
857863 )
864+ parser .add_argument (
865+ "--rpmbuild-arg" ,
866+ '-R' ,
867+ action = "append" ,
868+ help = "Pass this extra argument to rpmbuild" ,
869+ )
858870 parser .add_argument (
859871 "--ceph-version" ,
860872 help = "Rather than infer the Ceph version, use this value" ,
You can’t perform that action at this time.
0 commit comments