From c91109a0f44015383ef7ce934edae37ecd778e79 Mon Sep 17 00:00:00 2001 From: Benjamin Davini Date: Thu, 18 May 2023 13:04:12 -0700 Subject: [PATCH] Expose additional rpmbuild arguments to pkg_rpm --- pkg/rpm_pfg.bzl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/rpm_pfg.bzl b/pkg/rpm_pfg.bzl index b1734b6d..cda33382 100644 --- a/pkg/rpm_pfg.bzl +++ b/pkg/rpm_pfg.bzl @@ -630,6 +630,8 @@ def _pkg_rpm_impl(ctx): #### Remaining setup additional_rpmbuild_args = [] + if ctx.attr.rpmbuild_args: + additional_rpmbuild_args.extend(ctx.attr.rpmbuild_args) if ctx.attr.binary_payload_compression: additional_rpmbuild_args.extend([ "--define", @@ -1001,6 +1003,9 @@ pkg_rpm = rule( "rpmbuild_path": attr.string( doc = """Path to a `rpmbuild` binary. Deprecated in favor of the rpmbuild toolchain""", ), + "rpmbuild_args": attr.string_list( + doc = """Additional arguments to pass to rpmbuild (such as `--rpmrc=path/to/rpmrc`)""", + ), # Implicit dependencies. "_make_rpm": attr.label( default = Label("//pkg:make_rpm"),