Skip to content

Provide a consistent environment for developers to validate rpmbuild changes, run examples #968

@wade-arista

Description

@wade-arista

It's nice to have a consistent starting point to investigate any issues related to rpmbuild since there isn't (currently) a self-contained rpmbuild toolchain within rules_pkg.

With a contrib/ Dockerfile, for example, we could do something like this:

[system_rpmbuild_bzlmod]$ ../../../contrib/alma9_rpmbuild_docker/run.sh
[+] Building 0.1s (9/9) FINISHED                                                                                                                                                                                                   
[devuser@fd4cc85e6e5a system_rpmbuild_bzlmod]$ bazel build test-rpm
Starting local Bazel server (8.3.1) and connecting to it...
INFO: Analyzed target //:test-rpm (80 packages loaded, 3318 targets configured).
INFO: Found 1 target...
Target //:test-rpm up-to-date:
  bazel-bin/test-rpm.rpm
  bazel-bin/test-rpm-all.rpm
  bazel-bin/test-rpm-1-0.all.rpm
INFO: Elapsed time: 5.007s, Critical Path: 0.06s
INFO: 1 process: 9 action cache hit, 1 internal.
INFO: Build completed successfully, 1 total action
[devuser@fd4cc85e6e5a system_rpmbuild_bzlmod]$ rpm -qlp bazel-bin/test-rpm.rpm
/BUILD
/MODULE.bazel
/README.md
/test_rpm.spec

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions