2

Using bazel's built in pkg_deb rule, I've created a debian package.
I'd like to upload this deb file to my PPA, but I have found that to be challenging.

As far as I can tell, bazel creates "binary debian packages" which are not allowed for PPAs. Instead I must convert it to a "source debian package". Doing so is not obvious to me. The examples I've found online show very simple projects with a Makefile tailored to meet the needs of Ubuntu's launchpad. When you upload something to a PPA, I think it gets built in a sand-boxed environment (Part of this "reproducible builds" initiative I guess).

I'm looking for the simplest way to upload debian files built out of bazel. Since bazel abstracts a lot of the details of building through rules, its unclear to me whether I could convert this to some kind of Makefile-- or if there is a way I could avoid this entirely.

Does anyone have any experience building debs with bazel and uploading them to PPAs? Or more generically, taking a binary debian package and making it a source debian package to meet the requirements of PPAs?

I think I'll have to write a custom rule similar to what the bazel project is doing:
https://github.com/bazelbuild/bazel/blob/e67c961905792cd63950c6f6efc33275ad243c49/scripts/packages/debian/BUILD#L119, but it will be hard to come up with a compile command that makes sense.

Trevor Hickey
  • 36,288
  • 32
  • 162
  • 271

1 Answers1

0

A PPA can do whatever it wants, as there are no rules on what can go into a PPA. Debian's package repository has rules for upstream sources, which include no binary blobs. The ideal way to handle this is would be to have apt pull in Bazel when building from source, but as of mid 2020 Bazel can't be used in Debian upstream either.

Indolering
  • 3,058
  • 30
  • 45