Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpm, deb (maybe tar and zip) rules should be a new rule repo, not part of Bazel #8489

Closed
aiuto opened this issue May 29, 2019 · 11 comments
Closed
Assignees
Labels
P2 We'll consider working on this in future. (Assignee optional) team-Bazel General Bazel product/strategy issues
Milestone

Comments

@aiuto
Copy link
Contributor

aiuto commented May 29, 2019

The rules for building distribution packages have no need to be part of Bazel. They should be owned by the people who most need them.

Proposal: https://docs.google.com/document/d/1GAbAiW0nVbxGlwsdXhFIcn3owlZJkMJiXBt-ttA9z_k/edit#

TL;DR:

  • we will move the rules to a new repo
  • bazel team will continue to review PRs for a while
  • if you start making hight quality contributions we'll give you merge rights
@aiuto aiuto added P2 We'll consider working on this in future. (Assignee optional) team-Bazel General Bazel product/strategy issues labels May 29, 2019
@aiuto aiuto added this to the rules_package milestone May 29, 2019
@aiuto aiuto self-assigned this May 29, 2019
@MarkusTeufelberger
Copy link
Contributor

I'm more than happy to see these rules added in https://github.com/bazelbuild/rules_pkg (and I don't think a different repo should be created), if anyone is interested I can explain why that repo exists and what was the initial goal there.

@aiuto
Copy link
Contributor Author

aiuto commented May 29, 2019

rules_pkg is currently about fetching rpms rather than building them. So the concerns are actually different. That said, I am also not against having one repo provide both rules for using and building. That would allow a small set of people to understand both sides of the process to own the work.

@ixdy
Copy link
Contributor

ixdy commented May 29, 2019

I strongly agree that the rules for building packages should be moved out of the core repo. Making improvements to these rules has been challenging, since they're linked to bazel releases; breaking changes are especially problematic.

I also agree that rules_pkg seems like the right place. I was surprised when I discovered rules_pkg had nothing to do with building packages.

@aiuto
Copy link
Contributor Author

aiuto commented May 29, 2019

I'll leave this to age for a week so the rest of the community can chime in.
Unless I am convinced otherwise, I will start committing PRs on June 5 to move the code out.

  • The first round will just be to make it available.
  • The second round is to stop taking PRs against the internal Bazel code
  • The third is to move Bazel over to the new repo. The choices there belong to @philwo

FYI: @apt-itude @vmax @tmc @beasleyr-vmw @EdSchouten @ltekieli @gertvdijk @ash2k @roblg @XindaH @c4urself @mmikitka @pawelz @philsc

@nlopezgi
Copy link
Contributor

nlopezgi commented May 29, 2019

+1 to have them in a separate repo. For remote execution, the pkg_rpm rule is currently problematic as it expects rpmbuild to be installed in the exec environment. These rules should ideally use toolchain rules to define their tool dependencies and to ideally be made compatible with remot exec. Doing this would be much easier if they are in their own repo.
fyi @agoulti

@aiuto
Copy link
Contributor Author

aiuto commented May 29, 2019 via email

@MarkusTeufelberger
Copy link
Contributor

rules_pkg is currently about fetching rpms rather than building them. So the concerns are actually different.

I know, I wrote them. ;-)

My hopes were from the beginning that the existing ones get ported from bazel/bazel to bazel/pkg_rules eventually, but that requires some coordination effort, as you can see - so I only put in the fetching instead of copying over also the building rules initially.

It might be worth looking over the package building rules by the way to see if they could be improved (pkg_rpm is for example a very thin wrapper around rpmbuild and barely more than a shell script) so they also work on other platforms like Windows. After all, they are little more than compressed tarballs with a certain internal structure and some metadata files.

@c4urself
Copy link
Contributor

Agree, a recent break in make_deb.py has me wishing for a git_repository and commit to point to to keep things stable.

@nlopezgi
Copy link
Contributor

@aiuto
Happy to help in any way I can, particularly wrt how to define a toolchain that will pull the tools needed for pkg_rpm so that it works with remote exec

as for rules_docker, iirc, we do support pkg_deb in rules_docker, pkg_rpm, I think, is not currently supported for rules_docker (but should not be hard to add, we just haven't had the request from users to do this yet).

@aiuto
Copy link
Contributor Author

aiuto commented Jun 6, 2019

bazelbuild/rules_pkg#27

@aiuto
Copy link
Contributor Author

aiuto commented Jun 7, 2019

I am pleased to announce an initial release of the decoupled pkg_{deb, rpm, tar} rules.
https://github.com/bazelbuild/rules_pkg/releases/tag/0.1.0

With that, I am closing this issue. Future issues and PRs should be against that repository. Go forth and innovate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 We'll consider working on this in future. (Assignee optional) team-Bazel General Bazel product/strategy issues
Projects
None yet
Development

No branches or pull requests

5 participants