tree: 5130b7e2f561b41082e469fd76b1555ed9b748fc
  1. local/
  2. BUILD
  3. README.md
  4. test_rpm.spec
  5. WORKSPACE
examples/rpm/prebuilt_rpmbuild/README.md

Using a prebuilt rpmbuild instead of the system one.

Summary

This example defines a rpmbuild toolchain in local that can be used by rules_pkg. This must be copied into place as local/rpmbuild_binary for use by register_toolchains().

The RPM itself is based on a user provided spec file.

To use

cp /usr/bin/rpmbuild local/rpmbuild_binary
bazel build :*
rpm2cpio bazel-bin/test-rpm.rpm | cpio -ivt
cat bazel-bin/content.txt