Support additional rpm spec directives
There are some commonly used directives are currently missing from the rule.
BuildRequiresAutoReqProv: noand%global __requires_exclude_frometc (https://docs.fedoraproject.org/en-US/packaging-guidelines/AutoProvidesAndRequiresFiltering/)
For now, the only way is to use a custom spec template, but throwing arbitrary content to preamble_pieces would be nice.
https://github.com/bazelbuild/rules_pkg/blob/8c235607a015919328a03ead30996302e547a306/pkg/rpm_pfg.bzl#L512
Out of curiosity, what's the use case for BuildRequires in an RPM that (presumably) had its contents built by bazel?
Out of curiosity, what's the use case for BuildRequires in an RPM that (presumably) had its contents built by bazel?
For our case the package also contains a systemd service unit file, which needs to be loaded with systemctl. And there are macros for those script lets. In this case we need to add systemd-rpm-macros to BuildRequires to make sure the macros are resolved at build time instead of left as it in the final rpm.