[PATCH rdma-core 2/4] cbuild: allow envs to pass custom options to rpmbuild

Nicolas Morey-Chaisemartin
2017-11-08T14:31:24Z

buildlib/cbuild | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/buildlib/cbuild b/buildlib/cbuild
index e6a64e8a..eb5349de 100755
--- a/buildlib/cbuild
+++ b/buildlib/cbuild
@@ -474,7 +474,8 @@ os.symlink({tarfn!r},os.path.join("SOURCES",tarfn));
tarfn=tarfn,
tspec_file=tspec_file);

- bopts = ["-bb",tspec_file];
+ extra_opts = getattr(env,"rpmbuild_options", [])
+ bopts = ["-bb",tspec_file] + extra_opts;

print >> F,'os.execlp("rpmbuild","rpmbuild",%s)'%(
",".join(repr(I) for I in bopts));