Skip to content

move rules_pkg out of Bazel #8857

Closed
Closed

Description

@aiuto

//tools/build_defs/pkg:{pkg_deb, pkg_rpm, pkg_tar} are being pulled out of Bazel core and moved to https://github.com/bazelbuild/rules_pkg/tree/master/pkg. Users should migrate to the new versions.

Migration:

  1. Add WORKSPACE stanza as specified in a rule_pkg release
    https://github.com/bazelbuild/rules_pkg/releases

  2. Replace instances of

    load("//tools/build_defs/pkg:pkg.bzl", "pkg_tar", "pkg_deb")
    load("//tools/build_defs/pkg:rpm.bzl", "pkg_rpm")
    

    with

    load("@rules_pkg//:pkg.bzl", "pkg_tar", "pkg_deb")
    load("@rules_pkg//:rpm.bzl", "pkg_rpm")
    

    One line solution (for some users)

    find . -name 'BUILD' -o -name '*.bzl' | xargs sed -i -e '/^load/s#//tools/build_defs/pkg:#@rules_pkg//:#'
    

Expected timeline:

  • The bazelbuild/rules_pkg repository is available for use now. Issues against packaging rules are being transferred to that repository and will be addressed there.
  • Flag to be released in Bazel 0.29.
  • Enabled by default in next Bazel incompatible flag flip release after 0.29
  • //tools/build_defs/pkg/... removed from Bazel by EOY 2019

Activity

  1. added
    incompatible-change
    on Jul 10, 2019
  2. added this to the rules_package milestone on Jul 10, 2019
  3. self-assigned this
    on Jul 10, 2019
  4. added
    P2
    team-Rules-Server
    on Jul 10, 2019
  5. added and removed
    P2
    on Jul 19, 2019
  6. added
    untriaged
    and removed
    untriaged
    on Jul 24, 2019
  7. added
    P1
    and removed
    untriaged
    on Jul 25, 2019
  8. 64 remaining items

  9. added a commit that references this issue on Mar 2, 2021
  10. added a commit that references this issue on Apr 6, 2021
  11. aiuto commented on Apr 14, 2021

    @aiuto
    Author

    Closing this out.

  12. added a commit that references this issue on Mar 2, 2022
  13. added a commit that references this issue on Mar 3, 2022
  14. janpfeifer commented on Dec 24, 2022

    @janpfeifer

    For pkg_tar use instead:

    load("@rules_pkg//pkg:tar.bzl", "pkg_tar")

  15. sspathare97 commented on Mar 23, 2023

    @sspathare97
    Contributor

    For pkg_tar use instead:

    load("@rules_pkg//pkg:tar.bzl", "pkg_tar")

    Aren't they the same thing? pkg:pkg.bzl and pkg:tar.bzl

  16. aiuto commented on Mar 24, 2023

    @aiuto
    Author

    No. They are different files. pkg.bzl is going to disappear shortly and you must use pkg/tar.bzl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2incompatible-changeteam-Rules-Servertype: process

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions