[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

bazel-built binaries vs Debian packages



I have two hats: I am both the upstream maintainer for a program, and the Debian packager for it.

With my upstream hat on, I want to use bazel as it's a complex program and a pig to build. With my packager hat on, trying to actually package it fills me with fear because bazel seems to hate distro packages. I'm wondering if anyone here has thought about this and has any strategies for working around the issues.

The problem is that bazel loves vendored source. If, for example, you want to use the standard bazel protobuf rules, it will download and compile a copy of the protobuf library and embed the result into your binary, either statically or via a bundled DLL. This is, of course, not necessarily the same as the system-installed library and so the result violates the Debian packaging rules. It is possible to force bazel to link against the system libraries but this sort of thing is considered a bazel anti-pattern, it's hard, and of course with my upstream hat on I don't want to do it as I don't want to have to tailor my build system around Debian's needs.

So, what should I do? I've asked on the bazel list and received very little interest (https://groups.google.com/g/bazel-discuss/c/gj4KGcuVyoc?pli=1). As bazel takeup increases I expect this to be a growing problem, so it's not just me. Has anyone thought of this?


Reply to: