Releases: bazelbuild/rules_pkg
1.2.0
New Features
- pkg_deb: add support for md5sums control file
- pkg_deb: Allow for variables in the package name
- pkg_deb: Overridable
debuginfotype - pkg_install: Add destdir_flag to pick up destdir from a bazel-skylib.string_flag().
- pkg_install: support for symlinks
- pkg_mklink: support raw symlinks from declare_symlink() (Bazel 8+ only)
- pkg_rpm: "data" attribute to provide files for rpmbuild b
- pkg_tar: Conditionally preserve file mtime
- pkg_tar: Support compression_level when using xz
- pkg_zip: support synlinks
Incompatible Changes
MODULE.bazel setup
bazel_dep(name = "rules_pkg", version = "1.2.0")
WORKSPACE setup
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/1.2.0/rules_pkg-1.2.0.tar.gz",
"https://github.com/bazelbuild/rules_pkg/releases/download/1.2.0/rules_pkg-1.2.0.tar.gz",
],
sha256 = "b5c9184a23bb0bcff241981fd9d9e2a97638a1374c9953bb1808836ce711f990",
)
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
rules_pkg_dependencies()
Using the rules
See the source.
What's Changed
- feat: support raw symlinks from declare_symlink() by @rickeylev in #930
- pkg_tar: Fix #948: Don't add duplicate directory members to tar file when a symlink with the same path exists by @nickguletskii in #949
- Conditionally preserve file permissions when archiving through pkg_tar by @ronodnn in #951
- Use rules_shell in tests by @keith in #957
- Use DefaultInfo directly by @keith in #958
- [CI Fix] Stop trying the rpm debuginfo tests by @aiuto in #961
- Remove incompatible_use_toolchain_transition again, now that it has been removed from bazel by @mostynb in #963
- Add pkg_rpm() "data" attribute to provide files for rpmbuild by @wade-arista in #964
- Expose extension for Git toolchain by @guw in #967
- pkg_deb: add support for md5sums control file by @adam-azarchs in #960
- Add Alma 9 rpmbuild + bazel environment for examples by @wade-arista in #969
- Overridable
debuginfotype by @nicbadiu in #945 - Convert the compression level to a string before calling Args.add() by @EdSchouten in #975
- 📦 Conditionally preserve file mtime when archiving through pkg_tar by @ronodnn in #974
- update codeowners by @aiuto in #978
- bump version to 1.2 by @aiuto in #977
- Implement pkg_install(symlink) by @aiuto in #979
- Fix Windows file locking issue in
pkg_installby @rdesgroppes in #983 - Make
pkg_installwork without "runfiles" (Windows default) by @rdesgroppes in #984 - Implement pkg_install(symlink) also for pkg_zip by @adrianimboden in #982
- Document pkg_tar.extension's compression options. by @dougthor42 in #973
- Strip internal test fake repository for MODULE.bazel in distribution. by @aiuto in #976
- test with latest instead of rolling by @aiuto in #986
- Update pkg_deb to use ctx.action.args() for building the command line. by @aiuto in #714
- Allow for variables in the package name of pkg_deb by @AtoZdevelopment in #985
- Support compression_level when using xz by @mathukumillia in #988
- Fix distro packaging test by @aiuto in #989
- Add pkg_install.destdir_flag. by @aiuto in #990
- Generate docs for pkg_install by @aiuto in #992
- Create pre-release tests that run as a github workflow. by @aiuto in #991
New Contributors
- @rickeylev made their first contribution in #930
- @nickguletskii made their first contribution in #949
- @ronodnn made their first contribution in #951
- @keith made their first contribution in #957
- @mostynb made their first contribution in #963
- @rdesgroppes made their first contribution in #983
- @adrianimboden made their first contribution in #982
- @dougthor42 made their first contribution in #973
- @AtoZdevelopment made their first contribution in #985
- @mathukumillia made their first contribution in #988
Full Changelog: 1.1.0...1.2.0
v1.1.0
New Features
- pkg_dep: Add the
multi_archoption in make_deb.py in order to add theMulti-Archfield in debian control file. (#937) - pkg_rpm: Generic
debuginfoRPM platform support (#942) - pkg_rpm: fix sub-RPM post_scriptlet and add %postun support (#934)
- install: Add --wipe_destdir option (#894)
- pkg_tar: Make compression_level configurable for .tar.gz (#888)
- pkg_install: Add destdir attr & read rel paths. (#886)
- pkg_install: Support TreeArtifacts. (#885)
Incompatible Changes
None that we know of.
Change Log
- Modify the rich_structure example to set include_runfiles (#906)
- Fix installing an installed running process (#941)
tar_writer.py: address duplicate dir warning regression (#900)- Add the
multi_archoption in make_deb.py in order to add theMulti-Archfield in debian control file. (#937) - Generic
debuginfoRPM platform support (#942) - rpm: fix sub-RPM post_scriptlet and add %postun support (#934)
- Syntax highlight the readme as starlark (#939)
- rpm: Consume group info for sub RPMs (#931)
- ci: Check pre-commit hooks in CI (#922)
- fix: Avoid else after return in mappings bzl (#923)
- Add pre-commit hooks to format trailing whitespaces (#924)
- Pre commit autoupdate and format files (#913)
- Allow some common rule args in verify_archive_test (#917)
- ci: Bump Ubuntu version in CI from 18 to 22 (#912)
- Fix check_must_contain_regex in verify_archive.bzl (#910)
- Delete deb_packages directory (#903)
- install: Add --wipe_destdir option (#894)
- Load py_binary from rules_python (#895)
- make_rpm: suppress unconditional debug prints (#892)
- pkg_install: modify log levels & print destdir by default. (#891)
- Make compression_level configurable for .tar.gz (#888)
- rpm: Refine prefix matching for sub RPMs to reduce fragility (#879)
- pkg_install: Add destdir attr & read rel paths. (#886)
- pkg_install: Support TreeArtifacts. (#885)
- Add support for repo mapping (#878)
Thanks to all the contributors to this release: Andrea Nardelli,
Chris Bachhuber, Dahan Gong, Eric Wieser, Ivo List, Luis Padron,
Markus Hofbauer, Mateusz Krakowiak, Michael Kelly, Mike Kelly,
Nic, Peter Collingbourne, Thomas Lam, Tony Aiuto, Yun Peng,
jacky8hyf, hcw-g, njlr, Peter Woodman, wade-arista
MODULE.bazel setup
bazel_dep(name = "rules_pkg", version = "1.1.0")
WORKSPACE setup
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/1.1.0/rules_pkg-1.1.0.tar.gz",
"https://github.com/bazelbuild/rules_pkg/releases/download/1.1.0/rules_pkg-1.1.0.tar.gz",
],
sha256 = "b7215c636f22c1849f1c3142c72f4b954bb12bb8dcf3cbe229ae6e69cc6479db",
)
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
rules_pkg_dependencies()
Using the rules
See the source.
1.0.1
This is the same as the 1.0.0 release, but with the compatibility level set back to 1 to work around bazelbuild/bazel-central-registry#2232
MODULE.bazel setup
bazel_dep(name = "rules_pkg", version = "1.0.1")
WORKSPACE setup
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/1.0.1/rules_pkg-1.0.1.tar.gz",
"https://github.com/bazelbuild/rules_pkg/releases/download/1.0.1/rules_pkg-1.0.1.tar.gz",
],
sha256 = "d20c951960ed77cb7b341c2a59488534e494d5ad1d30c4818c736d57772a9fef",
)
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
rules_pkg_dependencies()
1.0.0
New Features
- Support duplicate paths in tar archives (#850)
- pkg_rpm
- Add support for generating debuginfo RPMs (#842)
- Add support for "Epoch" attributes in RPMs (#858)
- Add pkg_sub_rpm rule for RPM subpackages (#824)
- Enable pkg_rpm and pkg_subrpm to create empty RPMs (#859)
- Add conflicts and obsoletes to sub RPMs (#851)
- Add %posttrans scriptlet to RPM package (#799)
- Add support for
Obsoletestag in RPM definition (#778)
Incompatible Changes
- Append workspace name to the runfiles directory name for
pkg_files(#864) - Update to new stardoc so we can work with bzlmod. (#853)
Not really incompatible by itself, but it does mean that development of
rules_pkg itself without bzlmod is now unsupported. - Various fixes and improvements to pkg_rpm have probably broken someone's
workflow. YMMV - Lots of bug fixes have made undefined behavior explicit. This also probably
breaks someone's workflow. YMMV - Bzlmod compatibility level 2, so you may have to explicitly upgrade.
MODULE.bazel setup
bazel_dep(name = "rules_pkg", version = "1.0.0")
WORKSPACE setup
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_pkg",
urls = [
"https://github.com/bazelbuild/rules_pkg/releases/download/1.0.0/rules_pkg-1.0.0.tar.gz",
],
sha256 = "cad05f864a32799f6f9022891de91ac78f30e0fa07dc68abac92a628121b5b11",
)
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
rules_pkg_dependencies()
Using the rules
See the source.
What's Changed (in a little more detail)
- Provide more examples for pkg_rpm() by @kellyma2 in #823
- fix: remove unused glob patterns by @dieortin in #825
- Add pkg_sub_rpm rule for RPM subpackages by @kellyma2 in #824
- lint nits by @aiuto in #831
- Remove expand_yml.py. by @aiuto in #837
- Add support for no parent directory inference (#832) by @eejayes in #834
- Stop using datetime.utcfromtimestamp() by @aiuto in #838
- update scorecard workflow to newer nodejs setup by @aiuto in #839
- Update scorecard.yml to new checkout and analysis actions. by @aiuto in #840
- Improve handling of sub rpms. by @aiuto in #833
- use sys.exit() instead of exit() by @aiuto in #844
- trying scorecard update one more time by @aiuto in #841
- Indirect .files_to_run and .default_runfiles through DefaultInfo. by @lberki in #848
- rpm: Add conflicts and obsoletes to sub RPMs by @kellyma2 in #851
- Force stardoc integration test to run with bazel 7.0.0 by @aiuto in #852
- Start removing licenses(notice) and replacing with license() by @aiuto in #742
- Update to new stardoc so we can work with bzlmod. by @aiuto in #853
- create empty MODULE.bazel files in examples so bazel does not complain by @aiuto in #855
- pkg_tar: if symlink starts with ./, keep it absolute by @aiuto in #854
- Enable pkg_rpm and pkg_subrpm to create empty RPMs by @kellyma2 in #859
- Append the workspace name to the runfiles directory name by @EdSchouten in #856
- Add support for generating debuginfo RPMs by @kellyma2 in #842
- Add support for "Epoch" attributes in RPMs by @TvdW in #858
- fix: Not all runfiles are single files by @ewianda in #860
- Exclude release from filename when using release_file by @kellyma2 in #863
- Append workspace name to the runfiles directory name for
pkg_filesby @sitaktif in #864 - Support duplicate file paths in tar archives by @eejayes in #850
- 1.0 release by @aiuto in #869
New Contributors
- @eejayes made their first contribution in #834
- @EdSchouten made their first contribution in #856
- @TvdW made their first contribution in #858
- @ewianda made their first contribution in #860
- @sitaktif made their first contribution in #864
Full Changelog: 0.10.1...1.0.0
0.10.1
Release 0.10.1
This is a bug fix release.
Bug Fixes
* Temporarily restore //mappings.bzl and //pkg.bzl (#817)
* Fix RPM package release and version files expansion (#816)
* Apply tar remap_paths to runfiles full paths (#812)
* Use raw string for docstring that contains a backslash (for Python 3.12) (#815)
Thanks to: Alex Bozhenko, Chuck Grindel, Diego Ortin, and Tomasz Wojno
MODULE.bazel setup
bazel_dep(name = "rules_pkg", version = "0.10.1")
WORKSPACE setup
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_pkg",
urls = [
"https://github.com/bazelbuild/rules_pkg/releases/download/0.10.1/rules_pkg-0.10.1.tar.gz",
],
sha256 = "d250924a2ecc5176808fc4c25d5cf5e9e79e6346d79d5ab1c493e289e722d1d0",
)
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
rules_pkg_dependencies()
Using the rules
See the docs.
0.10.0
New Features
- Allow $(var) substitution in filenames (#620)
- Rough prototype of
@sinceprocessing. (#617) - First cut at runfiles support in pkg_* rules (#605)
- Allow substitution of user-defined variables in RPM preamble (#787)
- Add %posttrans scriptlet to RPM package (#799)
- Allow additional RPM macro defines (#794)
- Bring tar runfiles up to feature parity with pkg_files.runfiles. (#754)
- Add support for
Obsoletestag in RPM definition (#778) - pkg_deb: allow data.tar.zst (#761)
- Add support for failing on file conflicts. (#683)
- Make pkg_zip compression configurable (#737)
- Append changelog to RPM spec file (#726)
- Add basic include_runfiles to pkg_files. (#724)
- Add changelog attribute to pkg_deb (#725)
- Add support for setting uid/gid from pkg_attributes (#671)
Bug Fixes
- Explicitly set the FILE bit in zip external attributes. (#802)
- Explicitly set
%{_builddir}macro (#792) - Only inject pre and post scriptlets when provided (#788)
- Don't load cc toolchain from rules_cc (#779)
- doc: Fixup external manual references (#777)
- Get bzlmod working in CI (#766)
- use runfiles from rules_python (#768)
- When pkg_tar.prefix_dir == base of symlink path, don't double-dip. (#749)
- add imports to fix bazel --noexperimental_python_import_all_repositories flag (#630)
- Align pkg_rpm returned files with other rules (#692)
- fix(pkg_tar): properly normalize paths for empty files (#760)
- Document that package_dir also uses package_variables (#747)
- Fix handling paths with whitepsaces (#733)
- Fix python 3.6, doesn't support compresslevel
- Use Gzip compress level 6 (#720)
- write debian Date field in UTC rather than local time (#712)
- [pkg_deb] Fix multiline fields in changes file (#691)
Incompatible Changes
- Remove PackageArtifactsInfo. (#752)
Thanks to: Adam Azarchs, Alex Eagle, August Karlstedt, Austin Schuh, Adrian Vogelsgesang, flode, Florian Scheibner, Ignas Kaziukėnas, Jean-Hadrien Chabran, Matt, Mike Kelly, Paul Draper, Sam Schwebach, Tomasz Wojno, Vertexwahn
MODULE.bazel setup
bazel_dep(name = "rules_pkg", version = "0.10.0")
WORKSPACE setup
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.10.0/rules_pkg-0.10.0.tar.gz",
"https://github.com/bazelbuild/rules_pkg/releases/download/0.10.0/rules_pkg-0.10.0.tar.gz",
],
sha256 = "e93b7309591cabd68828a1bcddade1c158954d323be2205063e718763627682a",
)
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
rules_pkg_dependencies()
Using the rules
See the source.
0.9.1
Re-release of 0.9.0 to correct a mismatch of artifacts between github.com and mirro.bazel.build
WORKSPACE setup
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()
Using the rules
See the docs
0.9.0
New Features
- verify_archive rule to do e2e tests on built archives. (#644)
Incompatible Changes
- Genericize package manifest system and interface (#660)
** Bug Fixes **
- pkg_tar should not prefix tree artifacts with ./ (#681)
- pkg_tar, pkg_zip: improve support for long paths on Windows (#672)
Thanks to
Tomasz Wojno, Clint Harrison, Qingyu Sui, Ryan Beasley.
WORKSPACE setup
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.0/rules_pkg-0.9.0.tar.gz",
"https://github.com/bazelbuild/rules_pkg/releases/download/0.9.0/rules_pkg-0.9.0.tar.gz",
],
sha256 = "335632735e625d408870ec3e361e192e99ef7462315caa887417f4d88c4c8fb8",
)
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
rules_pkg_dependencies()
Using the rules
See the source.
0.8.1
New Features
- Expose tar manifest as an output (#643)
- Support license attribute in pkg_deb (#651)
- Add support for the txz extension in pkg_tar (#653) (#654)
Fixes
- Explicitly store implicit parent directories in zip files (#640)
- Remove unnecessary
to_list()calls (#639) - Apply package_dir to pkg_mklink (#637)
Thanks to
Alex Eagle, Nils Semmelrock, Doug Rabson, Fabian Meumertzheim
WORKSPACE setup
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.8.1/rules_pkg-0.8.1.tar.gz",
"https://github.com/bazelbuild/rules_pkg/releases/download/0.8.1/rules_pkg-0.8.1.tar.gz",
],
sha256 = "8c20f74bca25d2d442b327ae26768c02cf3c99e93fad0381f32be9aab1967675",
)
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
rules_pkg_dependencies()
Using the rules
0.8.0
Pre Bazelcon push of tiny updates
New Features
- Allow $(var) substitution in filenames (#620)
- Allow $(var) substitution in filenames and include everything in ctx.var in the substitution dictionary.
Fixes #20
- Allow $(var) substitution in filenames and include everything in ctx.var in the substitution dictionary.
- Basic bzlmod setup
- CI runs for both traditional and bzlmod
- Shows it working for one example
- Has only runtime deps
- rpm and git toolchains not done yet
- Rough prototype of
@sinceprocessing. (#617) - First cut at runfiles support in pkg_* rules (#605)
Bug Fixes
- Fix config_setting visibility failure when using
--incompatible_config_setting_private_default_visibility - Cosmetic. Improve the error messageing for duplicate files in check_dest. (#616)
- Adjust tar tests to have a test case for #297 (#618)
- Do not warn if the origin paths are the same. (#615)
WORKSPACE setup
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.8.0/rules_pkg-0.8.0.tar.gz",
"https://github.com/bazelbuild/rules_pkg/releases/download/0.8.0/rules_pkg-0.8.0.tar.gz",
],
sha256 = "eea0f59c28a9241156a47d7a8e32db9122f3d50b505fae0f33de6ce4d9b61834",
)
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
rules_pkg_dependencies()
Using the rules
See the source.