Page MenuHomePhabricator

Allow Toolforge users to install apt packages in their buildpacks
Open, MediumPublic

Description

Some Python and npm libraries require C/C++ library dependencies (libfoo-dev) at install time to compile against. Because these are usually small, we've included in them in the relevant docker image upon request. But for buildpacks, we should be able to allow users to specify what packages they need in a manifest.

For now I think we should recommend (but not necessarily enforced) this be used just for straightforward library dependencies and not large tooling like tesseract, imagemagick, rsvg, etc. Those CLI tools would be better served by providing mixins for the run image.

Example for the ldap tool, which requires the python-ldap library:

service.template
backend: kubernetes
canonical: True
type: python3.7
apt_packages:
- libldap2-dev
- libsasl2-dev

Event Timeline

Andrew triaged this task as Medium priority.Dec 8 2020, 5:54 PM
Andrew added a subscriber: Andrew.

Can this be closed?

We currently have the functionality to install apt packages into a buildpack. What still needs to be done is creating a buildpack that reads a list of packages from the service.template YAML and then installs them using the install-packages script.