Skip to content

Create Debian packages #5285

Closed
Closed
@alexreinking

Description

@alexreinking

It would be nice for users of Debian and/or Ubuntu to simply run:

$ sudo apt install libhalide libhalide-dev libhalide-doc

However, the rules for getting a package upstreamed are stringent and there's a veritable book of package guidelines for Debian, here:

https://www.debian.org/doc/manuals/debmake-doc/

and Ubuntu extends it here:

https://packaging.ubuntu.com/html/index.html

However, PPAs are more "anything goes". I think the right strategy is to figure out deb packaging enough that we get an established user base on the PPA and then try to make the package conform to upstream guidelines, possibly with some help from maintainers.


Even with the flexible Ubuntu PPA rules, there are a few things that we do need to keep in mind to be good citizens:

  1. We should build and link against Ubuntu's own shared libraries. This just means LLVM.
  2. We need to split our library across three packages:
    a. libhalide which includes the .so [1] and the autoscheduler modules.
    b. libhalide-dev which includes most other things: .a, headers, tools, etc.
    c. libhalide-doc which includes the tutorials and the doxygen documentation.
  3. We need to list libjpeg-dev, libpng-dev as "recommended" packages of libhalide-dev
  4. We need to list libhalide as a dependency of libhalide-dev and libhalide-doc as a suggested package for libhalide-dev.
  5. libhalide-doc shouldn't have any dependencies.
  6. We need to package from inside a chroot with a minimal environment.

[1] I did an apt-file search for every .a in my /usr directory and of the 500+ static libs there, all but 47 were in the corresponding -dev package. The others were from liblld-10, which I'm nearly certain is mis-packaged; ocaml-nox, which I'm guessing needs them for linking; and valgrind, pristine-tar, and python3-numpy for unknown reasons.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions