Bazel: tools/build_defs/pkg:pkg_rpm silently depends on rpmbuild

Created on 10 Nov 2017  路  6Comments  路  Source: bazelbuild/bazel

Please provide the following information. The more we know about your system and use case, the more easily and likely we can help.

Description of the problem / feature request / question:

The pkg_rpm seems to shell out to rpmbuild which is not entirely surprising, however I do not see this documented anywhere and the resulting errors are not obvious (see: https://github.com/kubernetes/test-infra/issues/5429)

If possible, provide a minimal example to reproduce the problem:

Build a target using pkg_rpm on a system without rpmbuild installed.

Environment info

  • Operating System: Debian Jessie... Any OS without rpmbuild installed

  • Bazel version (output of bazel info release): release 0.7.0

  • If bazel info release returns "development version" or "(@non-git)", please tell us what source tree you compiled Bazel from; git commit hash is appreciated (git rev-parse HEAD):

Have you found anything relevant by searching the web?

Anything else, information or logs or outputs that would be helpful?

https://github.com/bazelbuild/bazel/blob/9135b7bfc4245e16bd6599e22dce0ba077e0d10a/tools/build_defs/pkg/make_rpm.py#L170-L184

See: https://github.com/kubernetes/test-infra/issues/5429, https://github.com/kubernetes/kubernetes/issues/55437

P2 bug

All 6 comments

FYI @ixdy

/cc @katre fyi

We could probably add a check on whether rpmbuild exists and give a better error if it doesn't.

@MarkusTeufelberger might be worth addressing this in some way if pkg_rpm gets imported into rules_pkg.

I can look into a better error report.

What result would you expect if you try to build an rpm file without having rpmbuild installed?

What result would you expect if you try to build an rpm file without having rpmbuild installed?

Probably just a note that rpmbuild appears to be missing and needs to be installed? In our use case people are blindly building the repo without necessarily knowing that RPMs are one of the artifacts.

Was this page helpful?
0 / 5 - 0 ratings