Bazel rules for creating packages of many types (zip, tar, deb, rpm, ...) https://bazelbuild.github.io/rules_pkg/
Go to file
aiuto 6a44f01087
Revert compatibility_level back to 1 so we can push to BCR. (#877)
* Revert compatibility_level back to 1 so we can push to BCR.

See https://github.com/bazelbuild/bazel-central-registry/issues/2232
for discussion.

* update version#
2024-07-09 14:22:24 -04:00
.bazelci Update to new stardoc so we can work with bzlmod. (#853) 2024-04-16 22:17:21 -04:00
.bcr Don't load cc toolchain from rules_cc (#779) 2023-11-07 11:28:30 -05:00
.github/workflows trying scorecard update one more time (#841) 2024-04-02 11:48:37 -04:00
deb_packages remove the obsolete deb_packages code. (#547) 2022-03-07 10:41:02 -05:00
distro chore: buildifier format all files (#775) 2023-11-06 13:29:07 -05:00
doc_build Update to new stardoc so we can work with bzlmod. (#853) 2024-04-16 22:17:21 -04:00
docs Revert compatibility_level back to 1 so we can push to BCR. (#877) 2024-07-09 14:22:24 -04:00
examples Add support for generating debuginfo RPMs (#842) 2024-04-24 16:03:11 -04:00
pkg Add AlmaLinux 9.3 debuginfo support (#874) 2024-06-30 22:05:23 -04:00
tests Support duplicate paths in tar archives (#850) 2024-05-29 16:51:36 -04:00
toolchains Add AlmaLinux 9.3 debuginfo support (#874) 2024-06-30 22:05:23 -04:00
.bazelignore Add .bazelignore to skip examples, deb_packages subdirectories (#457) 2021-11-04 16:01:56 -04:00
.gitignore use runfiles from rules_python (#768) 2023-10-28 11:14:40 -04:00
.pre-commit-config.yaml chore: add a pre-commit hook config (#774) 2023-11-06 13:21:34 -05:00
AUTHORS Correct mistakes in a recent push. (#449) 2021-11-04 14:38:00 -04:00
BUILD chore: buildifier format all files (#775) 2023-11-06 13:29:07 -05:00
CHANGELOG.md Update changelog and version numbers. (#819) 2024-02-08 17:46:43 -05:00
CODEOWNERS Update CODEOWNERS (#791) 2023-12-01 14:56:01 -05:00
CONTRIBUTING.md html != md 2020-07-14 20:18:47 -04:00
CONTRIBUTORS Start a developer docs page (#413) 2021-09-01 21:42:29 -04:00
LICENSE
MODULE.bazel Revert compatibility_level back to 1 so we can push to BCR. (#877) 2024-07-09 14:22:24 -04:00
README.md Get bzlmod working in CI (#766) 2023-10-31 09:23:37 -04:00
WORKSPACE bump platforms to latest. The hope is that this fixes what is going wrong in the integration test 2024-04-15 22:54:25 -04:00
WORKSPACE.bzlmod CI fixes (#784) 2023-11-22 09:33:50 -05:00
deps.bzl Fix some lint warnings. (#519) 2022-02-03 21:38:56 -05:00
developers.md pkg_zip: Some unicode file handling fixes and basic tests (#641) 2023-02-13 23:25:09 -05:00
mappings.bzl Temporarily restore //mappings.bzl and //pkg.bzl (#817) 2024-02-08 15:43:00 -05:00
patching.md Replace reference to bazel-dev with GitHub Discussions. 2023-04-21 13:10:11 +00:00
pkg.bzl Temporarily restore //mappings.bzl and //pkg.bzl (#817) 2024-02-08 15:43:00 -05:00
version.bzl Revert compatibility_level back to 1 so we can push to BCR. (#877) 2024-07-09 14:22:24 -04:00

README.md

Bazel package building

Bazel rules for building tar, zip, deb, and rpm for packages.

For the latest version, see Releases (with WORKSPACE setup) / Documentation

Use rules-pkg-discuss@googlegroups.com for discussion.

CI: Build status

Basic rules

Package building rules

  • pkg - Rules for building packages of various types.
  • examples - Cookbook examples for using the rules.

As of Bazel 4.x, Bazel uses this rule set for packaging its distribution. Bazel still contains a limited version of pkg_tar but its feature set is frozen. Any new capabilities will be added here.

WORKSPACE setup

Sample, but see releases for the current release.

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "rules_pkg",
    urls = [
        "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.9.1/rules_pkg-0.9.1.tar.gz",
        "https://github.com/bazelbuild/rules_pkg/releases/download/0.9.1/rules_pkg-0.9.1.tar.gz",
    ],
    sha256 = "8f9ee2dc10c1ae514ee599a8b42ed99fa262b757058f65ad3c384289ff70c4b8",
)
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
rules_pkg_dependencies()

To use pkg_rpm(), you must provide a copy of rpmbuild. You can use the system installed rpmbuild with this stanza.

load("@rules_pkg//toolchains/rpm:rpmbuild_configure.bzl", "find_system_rpmbuild")

find_system_rpmbuild(
    name = "rules_pkg_rpmbuild",
    verbose = False,
)

MODULE.bazel setup

bazel_dep(name = "rules_pkg", version = "0.0.10")

To use pkg_rpm(), you must provide a copy of rpmbuild. You can use the system installed rpmbuild with this stanza.

find_rpm = use_extension("//toolchains/rpm:rpmbuild_configure.bzl", "find_system_rpmbuild_bzlmod")
use_repo(find_rpm, "rules_pkg_rpmbuild")
register_toolchains("@rules_pkg_rpmbuild//:all")

For developers

We hold an engineering status meeting on the first Monday of every month at 10am USA East coast time. Add to calendar / meeting notes