{"id":28551825,"url":"https://github.com/heroku/buildpacks-deb-packages","last_synced_at":"2025-07-03T17:30:52.108Z","repository":{"id":257951970,"uuid":"755270275","full_name":"heroku/buildpacks-deb-packages","owner":"heroku","description":"Heroku's `.deb` Packages Cloud Native Buildpack.","archived":false,"fork":false,"pushed_at":"2025-07-01T16:21:59.000Z","size":404,"stargazers_count":5,"open_issues_count":5,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-01T17:34:45.410Z","etag":null,"topics":["apt","cloud-native-buildpacks","debian-packages","heroku","heroku-languages"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/heroku.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-02-09T19:26:26.000Z","updated_at":"2025-07-01T16:22:02.000Z","dependencies_parsed_at":"2025-06-07T19:34:47.583Z","dependency_job_id":null,"html_url":"https://github.com/heroku/buildpacks-deb-packages","commit_stats":null,"previous_names":["heroku/buildpacks-deb-packages"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/heroku/buildpacks-deb-packages","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heroku%2Fbuildpacks-deb-packages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heroku%2Fbuildpacks-deb-packages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heroku%2Fbuildpacks-deb-packages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heroku%2Fbuildpacks-deb-packages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heroku","download_url":"https://codeload.github.com/heroku/buildpacks-deb-packages/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heroku%2Fbuildpacks-deb-packages/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263369453,"owners_count":23456303,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apt","cloud-native-buildpacks","debian-packages","heroku","heroku-languages"],"created_at":"2025-06-10T04:07:07.720Z","updated_at":"2025-07-03T17:30:52.103Z","avatar_url":"https://github.com/heroku.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Heroku's `.deb` Packages Buildpack\n\n[![CI][ci-badge]][ci-link] [![Registry][registry-badge]][registry-link]\n\n`heroku/deb-packages` is a [Heroku Cloud Native Buildpack][heroku-cnbs] that adds support for installing Debian\npackages required by an application that are not available in the build or run image used.\n\nSystem dependencies on Debian distributions like Ubuntu are described by `\u003cpackage-name\u003e.deb` files. These are\ntypically installed using CLI tools such as `apt` or `dpkg`. This buildpack implements logic to install packages\nfrom `.deb` files in a CNB-friendly manner that does not require root permissions or modifications to system files\nthat could invalidate how [CNB rebasing][cnb-rebase] functionality works.\n\n\u003e [!IMPORTANT]\n\u003e This is a [Cloud Native Buildpack][cnb], and is a component of the [Heroku Cloud Native Buildpacks][heroku-cnbs]\n\u003e project, which is in preview. If you are instead looking for the Heroku Apt Buildpack (for use on the Heroku\n\u003e platform), you may find it [here][classic-apt-buildpack].\n\nThis buildpack is compatible with the following environments:\n\n| OS    | Arch  | Distro Name | Distro Version |\n|-------|-------|-------------|----------------|\n| linux | amd64 | Ubuntu      | 24.04          |\n| linux | arm64 | Ubuntu      | 24.04          |\n| linux | amd64 | Ubuntu      | 22.04          |\n\n---\n\n## Usage\n\n\u003e [!NOTE]\n\u003e Before getting started, ensure you have the pack CLI installed. Installation instructions are\n\u003e available [here][pack-install].\n\nTo include this buildpack in your application:\n\n```shell\npack build my-app --builder heroku/builder:24 --buildpack heroku/deb-packages\n```\n\nAnd then run the image:\n\n```shell\ndocker run --rm -it my-app\n```\n\n## Configuration\n\n### `project.toml`\n\nThe configuration for this buildpack must be added to the project descriptor file (`project.toml`) at the root of your\nproject using the `com.heroku.buildpacks.deb-packages` table. The list of packages to install must be\nspecified there. See below for the [configuration schema](#schema) and an [example](#example).\n\n#### Example\n\n```toml\n# _.schema-version is required for the project descriptor\n[_]\nschema-version = \"0.2\"\n\n# buildpack configuration goes here\n[com.heroku.buildpacks.deb-packages]\ninstall = [\n    # string version of a dependency to install\n    \"package-name\",\n    # inline-table version of a dependency to install\n    { name = \"package-name\", skip_dependencies = true, force = true }\n]\n```\n\n#### Schema\n\n- `com.heroku.buildpacks.deb-packages` *__([table][toml-table], optional)__*\n\n  The root configuration for this buildpack.\n\n    - `install` *__([array][toml-array], optional)__*\n\n      A list of one or more packages to install. Each package can be specified in either of the following formats:\n\n        - *__([string][toml-string])__*\n\n          The name of the package to install.\n\n      \u003cp\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; \u003cem\u003e\u003cstrong\u003eOR\u003c/strong\u003e\u003c/em\u003e\u003c/p\u003e\n\n        - *__([inline-table][toml-inline-table])__*\n            - `name` *__([string][toml-string], required)__*\n\n              The name of the package to install.\n\n            - `skip_dependencies` *__([boolean][toml-boolean], optional, default = false)__*\n\n              If set to `true`, no attempt will be made to install any dependencies of the given package.\n\n            - `force` *__([boolean][toml-boolean], optional, default = false)__*\n\n              If set to `true`, the package will be installed even if it's already installed on the system.\n\n\u003e [!TIP]\n\u003e Users of the [heroku-community/apt][classic-apt-buildpack] can migrate their Aptfile to the above configuration by\n\u003e adding a `project.toml` file with:\n\u003e\n\u003e ```toml\n\u003e [_]\n\u003e schema-version = \"0.2\"\n\u003e\n\u003e [com.heroku.buildpacks.deb-packages]\n\u003e install = [\n\u003e   # copy the contents of your Aptfile here, e.g.;\n\u003e   # \"package-a\",\n\u003e   # \"package-b\",\n\u003e   # \"package-c\"\n\u003e ]\n\u003e ```\n\u003e\n\u003e If your Aptfile contains a package name that uses wildcards (e.g.; `mysql-*`) this must be replaced with the full list\n\u003e of matching package names.\n\n### Environment Variables\n\nThe following environment variables can be passed to the buildpack:\n\n| Name           | Value               | Default | Description                                                                                        |\n|----------------|---------------------|---------|----------------------------------------------------------------------------------------------------|\n| `BP_LOG_LEVEL` | `INFO`,\u003cbr\u003e `DEBUG` | `INFO`  | Configures the verbosity of buildpack output. The `DEBUG` level is a superset of the `INFO` level. |\n\n## How it works\n\n### Detection\n\nThis buildpack will pass detection if:\n\n- A `project.toml` file is found at the root of the application source directory containing configuration under the\n  `[com.heroku.buildpacks.deb-packages]` namespace.\n- An `Aptfile` is found. This will not be used by this buildpack but details for how to migrate away from\n  `Aptfile` configuration will be provided in the build phase if this file is present.\n\n### Build\n\n#### Step 1: Build the package index\n\nEach supported distro is configured to download from the\nfollowing [Ubuntu repositories][about-ubuntu-repositories]:\n\n- `main` - Canonical-supported free and open-source software.\n- `universe` - Community-maintained free and open-source software.\n\nThese repositories comply with the [Debian Repository Format][debian-repository-format] so\nbuilding the list of packages involves:\n\n- Downloading the [Release][release-file] file, validating its\n  OpenPGP signature, and caching this in a [layer][cnb-layer] available at `build`.\n- Finding and downloading the [Package Index][package-index-file] entry from the [Release][release-file] for the target\n  architecture and caching this in a [layer][cnb-layer] available at `build`.\n- Building an index of [Package Name][package-name-field] → ([Repository URI][debian-repository-uri],\n  [Binary Package][debian-binary-package]) entries that can be used to lookup information about any packages requested\n  for install.\n\n#### Step 2: Determine the packages to install\n\nFor each package requested for install declared in the [buildpack configuration](#configuration):\n\n- Lookup the [Binary Package][debian-binary-package] in the [Package Index](#step-1-build-the-package-index).\n- Check if the requested package is already installed on the system\n    - If it is already installed and the requested package is configured with `force = false`\n        - Skip the package\n- If the requested package is configured with `skip_dependencies = false`:\n    - Add the latest version of the requested package.\n    - Read the dependencies listed in the [Depends][binary-dependency-fields]\n      and [Pre-Depends][binary-dependency-fields]\n      from the [Binary Package][debian-binary-package].\n    - For each dependency:\n        - Recursively lookup the dependent package and follow the same steps outlined above until all transitive\n          dependencies are added.\n- If the requested package is configured with `skip_dependencies = true`:\n    - Add the latest version of the requested package.\n\n\u003e [!NOTE]\n\u003e This buildpack is not meant to be a replacement for a fully-featured dependency manager like Apt. The simplistic\n\u003e dependency resolution strategy described above is for convenience, not accuracy. Any extra dependencies added are\n\u003e reported to the user during the build process so, if they aren't correct, you should disable the dependency resolution\n\u003e on a per-package basis with [configuration](#configuration) and explicitly list out each package you need installed.\n\n#### Step 3: Install packages\n\nFor each package added after [determining the packages to install](#step-2-determine-the-packages-to-install):\n\n- Download the [Binary Package][debian-binary-package] from the repository that contains it as\n  a [Debian Archive][debian-archive].\n- Extract the contents of the `data.tar` entry from the [Debian Archive][debian-archive] into a [layer][cnb-layer]\n  available at `build` and `launch`.\n- Rewrite any [pkg-config][package-config-file] files to use a `prefix` set to the layer directory of the installed\n  package.\n- Configure the following [layer environment variables][cnb-environment] to be available at both `build` and `launch`:\n\n| Environment Variable | Appended Values                                                                                                  | Contents         |\n|----------------------|------------------------------------------------------------------------------------------------------------------|------------------|\n| `PATH`               | `/\u003clayer_dir\u003e/bin` \u003cbr\u003e `/\u003clayer_dir\u003e/usr/bin` \u003cbr\u003e `/\u003clayer_dir\u003e/usr/sbin`                                      | binaries         |\n| `LD_LIBRARY_PATH`    | `/\u003clayer_dir\u003e/usr/lib/\u003carch\u003e` \u003cbr\u003e `/\u003clayer_dir\u003e/usr/lib` \u003cbr\u003e `/\u003clayer_dir\u003e/lib/\u003carch\u003e` \u003cbr\u003e `/\u003clayer_dir\u003e/lib` | shared libraries |\n| `LIBRARY_PATH`       | Same as `LD_LIBRARY_PATH`                                                                                        | static libraries |\n| `INCLUDE_PATH`       | `/\u003clayer_dir\u003e/usr/include/\u003carch\u003e` \u003cbr\u003e `/\u003clayer_dir\u003e/usr/include`                                                | header files     |\n| `CPATH`              | Same as `INCLUDE_PATH`                                                                                           | header files     |\n| `CPPPATH`            | Same as `INCLUDE_PATH`                                                                                           | header files     |\n| `PKG_CONFIG_PATH`    | `/\u003clayer_dir\u003e/usr/lib/\u003carch\u003e/pkgconfig` \u003cbr\u003e `/\u003clayer_dir\u003e/usr/lib/pkgconfig`                                    | pc files         |\n\n## Contributing\n\nIssues and pull requests are welcome. See our [contributing guidelines](./CONTRIBUTING.md) if you would like to help.\n\n[about-ubuntu-repositories]: https://help.ubuntu.com/community/Repositories/Ubuntu\n\n[binary-dependency-fields]: https://www.debian.org/doc/debian-policy/ch-relationships.html#binary-dependencies-depends-recommends-suggests-enhances-pre-depends\n\n[ci-badge]: https://github.com/heroku/buildpacks-deb-packages/actions/workflows/ci.yml/badge.svg\n\n[ci-link]: https://github.com/heroku/buildpacks-deb-packages/actions/workflows/ci.yml\n\n[classic-apt-buildpack]: https://github.com/heroku/heroku-buildpack-apt\n\n[cnb]: https://buildpacks.io/\n\n[cnb-environment]: https://github.com/buildpacks/spec/blob/main/buildpack.md#environment\n\n[cnb-layer]: https://github.com/buildpacks/spec/blob/main/buildpack.md#layer-types\n\n[cnb-rebase]: https://buildpacks.io/docs/for-app-developers/concepts/rebase/\n\n[debian-archive]: https://www.man7.org/linux/man-pages/man5/deb.5.html\n\n[debian-binary-package]: https://www.debian.org/doc/debian-policy/ch-binary.html\n\n[debian-repository-format]: https://wiki.debian.org/DebianRepository/Format\n\n[debian-repository-uri]: https://wiki.debian.org/DebianRepository/Format#Overview\n\n[heroku-cnbs]: https://github.com/heroku/buildpacks\n\n[pack-install]: https://buildpacks.io/docs/for-platform-operators/how-to/integrate-ci/pack/\n\n[package-config-file]: https://manpages.ubuntu.com/manpages/noble/en/man5/pc.5.html\n\n[package-index-file]: https://wiki.debian.org/DebianRepository/Format#A.22Packages.22_Indices\n\n[package-name-field]: https://www.debian.org/doc/debian-policy/ch-controlfields.html#package\n\n[project-descriptor]: https://buildpacks.io/docs/reference/config/project-descriptor/\n\n[registry-badge]: https://img.shields.io/badge/dynamic/json?url=https://registry.buildpacks.io/api/v1/buildpacks/heroku/deb-packages\u0026label=version\u0026query=$.latest.version\u0026color=DF0A6B\u0026logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAACSVJREFUaAXtWQ1sFMcVnp/9ub3zHT7AOEkNOMYYp4CQQFBLpY1TN05DidI2NSTF0CBFQAOBNrTlp0a14sipSBxIG6UYHKCO2ka4SXD4SUuaCqmoJJFMCapBtcGYGqMkDgQ4++52Z2e3b87es+/s+wNHVSUPsnZv9s2b97335v0MCI2NMQ2MaeD/WgP4FqQnX//2K4tVWfa0X+9+q/N4dfgWeESXPPjUUd+cu+5cYmMcPvzawQOtrdVG9GMaLxkD+OZDex6WVeUgwhiZnH1g62bNX4+sPpLGXvEkdPNzLd93e9y/cCnabIQJCnz+2Q9rNs9tjCdM9ltK9nGkb5jYxYjIyDJDSCLSV0yFHCr/XsObvQH92X+8u/b0SGvi5zZUn1joc/u2qapajglB4XAfUlQPoqpyRzxtqt8ZA+AIcQnZEb6WZSKCMSZUfSTLg8vv/86e3b03AztO/u3p7pE2fvInfy70TpiwRVKU5YqqygbTEWL9lISaiDFujbQu2VzGAIYzs5HFDUQo8WKibMzy0Yr7Ht5Td/Nyd0NLS3VQ0FesOjDurtwvPaWp6gZVc080TR2FQn0xrAgxkWVkLD8aBQD9cti2hWwAQimdImHpJTplcmXppF11hcV3Z/n92RsVVbuHc4bCod4YwZ0fHACYCCyS4Rg1AM6+ts2R+JOpNF/Okl/PyvLC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DAgIc0vWl5BEakiijQTYmhkWpEVEBwOELgUt+y3QtysuXT21ahGoujSePl3/qpiRVK2wO3KY1ClyuJ8YHATcDPIyhQFud6JbfKr1vZz+xehd0a8e08GICKC318xzpejrpUQ3UAkaZK4yoGU/HduWts72hsPpyFnSpL2wjWlFNFfSoSWipqIWVYP1J27rwcCL839eF9PMgYpATiLJ01eOs2jaU+D03508cK/9iHUkm6F4LBI+hTlc9m0BSsVSufcCBkvzu7afSHpgrGPYxoY00BEA/8FOPrYBqYsE44AAAAASUVORK5CYII=\u0026labelColor=white\n\n[registry-link]: https://registry.buildpacks.io/buildpacks/heroku/deb-packages\n\n[release-file]: https://wiki.debian.org/DebianRepository/Format#A.22Release.22_files\n\n[toml-array]: https://toml.io/en/v1.0.0#array\n\n[toml-boolean]: https://toml.io/en/v1.0.0#boolean\n\n[toml-inline-table]: https://toml.io/en/v1.0.0#inline-table\n\n[toml-string]: https://toml.io/en/v1.0.0#string\n\n[toml-table]: https://toml.io/en/v1.0.0#table\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheroku%2Fbuildpacks-deb-packages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheroku%2Fbuildpacks-deb-packages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheroku%2Fbuildpacks-deb-packages/lists"}