Skip to content

Commit

Permalink
Rename buildpack (#51)
Browse files Browse the repository at this point in the history
Renaming this buildpack from `Heroku Debian Packages` to `Heroku .deb Packages`
  • Loading branch information
colincasey authored Oct 9, 2024
1 parent 28498e8 commit 4e6757a
Show file tree
Hide file tree
Showing 11 changed files with 102 additions and 96 deletions.
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Contributing Guide For Heroku's Debian Packages Buildpack
# Contributing Guide For Heroku's `.deb` Packages Buildpack

This page lists the operational governance model of this project, as well as the recommendations and requirements for
how to best contribute to `heroku/buildpacks-debian-packages`. We strive to obey these as best as possible. As always,
how to best contribute to `heroku/buildpacks-deb-packages`. We strive to obey these as best as possible. As always,
thanks for contributing – we hope these guidelines make it easier and shed some light on our approach and processes.

# Governance Model
Expand All @@ -17,9 +17,9 @@ Use GitHub Issues page to submit issues, enhancement requests and discuss ideas.

### Bug Reports and Fixes

- If you find a bug, please search for it in the [Issues](https://github.com/heroku/buildpacks-debian-packages/issues),
- If you find a bug, please search for it in the [Issues](https://github.com/heroku/buildpacks-deb-packages/issues),
and if it isn't already tracked,
[create a new issue](https://github.com/heroku/buildpacks-debian-packages/issues/new). Fill out the "Bug Report"
[create a new issue](https://github.com/heroku/buildpacks-deb-packages/issues/new). Fill out the "Bug Report"
section of the issue template. Even if an Issue is closed, feel free to comment and add details, it will still
be reviewed.
- Issues that have already been identified as a bug (note: able to reproduce) will be labelled `bug`.
Expand All @@ -29,7 +29,7 @@ Use GitHub Issues page to submit issues, enhancement requests and discuss ideas.
### New Features

- If you'd like to add new functionality to this project, describe the problem you want to solve in
a [new Issue](https://github.com/heroku/buildpacks-debian-packages/issues/new).
a [new Issue](https://github.com/heroku/buildpacks-deb-packages/issues/new).
- Issues that have been identified as a feature request will be labelled `enhancement`.
- If you'd like to implement the new feature, please wait for feedback from the project
maintainers before spending too much time writing the code. In some cases, `enhancement`s may
Expand All @@ -42,7 +42,7 @@ Use GitHub Issues page to submit issues, enhancement requests and discuss ideas.
done, or you have any other change, we would be happy to hear about it!
- If it's a trivial change, go ahead and [send a Pull Request](#creating-a-pull-request) with the changes you have in
mind.
- If not, [open an Issue](https://github.com/heroku/buildpacks-debian-packages/issues/new) to discuss the idea first.
- If not, [open an Issue](https://github.com/heroku/buildpacks-deb-packages/issues/new) to discuss the idea first.

If you're new to our project and looking for some way to make your first contribution, look for
Issues labelled `good first contribution`.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "buildpacks-debian-packages"
name = "buildpacks-deb-packages"
edition = "2021"
rust-version = "1.76"

Expand Down
32 changes: 19 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# Heroku's Debian Packages Cloud Native Buildpack
# Heroku's `.deb` Packages Buildpack

[![CI][ci-badge]][ci-link] [![Registry][registry-badge]][registry-link]

`heroku/debian-packages` is a [Heroku Cloud Native Buildpack][heroku-cnbs] that adds support for installing Debian
packages required by an application that are not available in the build or run image used. It's roughly the equivalent
of `apt install {package}` for [Cloud Native Buildpacks][cnb].
`heroku/deb-packages` is a [Heroku Cloud Native Buildpack][heroku-cnbs] that adds support for installing Debian
packages required by an application that are not available in the build or run image used.

System dependencies on Debian distributions like Ubuntu are described by `<package-name>.deb` files. These are
typically installed using CLI tools such as `apt` or `dpkg`. This buildpack implements logic to install packages
from `.deb` files in a CNB-friendly manner that does not require root permissions or modifications to system files
that could invalidate how [CNB rebasing][cnb-rebase] functionality works.

> [!IMPORTANT]
> This is a [Cloud Native Buildpack][cnb], and is a component of the [Heroku Cloud Native Buildpacks][heroku-cnbs]
Expand All @@ -30,7 +34,7 @@ This buildpack is compatible with the following environments:
To include this buildpack in your application:

```shell
pack build my-app --builder heroku/builder:24 --buildpack heroku/debian-packages
pack build my-app --builder heroku/builder:24 --buildpack heroku/deb-packages
```

And then run the image:
Expand All @@ -42,7 +46,7 @@ docker run --rm -it my-app
## Configuration

The configuration for this buildpack must be added to the project descriptor file (`project.toml`) at the root of your
project using the `com.heroku.buildpacks.debian-packages` table. The list of packages to install must be
project using the `com.heroku.buildpacks.deb-packages` table. The list of packages to install must be
specified there. See below for the [configuration schema](#schema) and an [example](#example).

### Example
Expand All @@ -53,7 +57,7 @@ specified there. See below for the [configuration schema](#schema) and an [examp
schema-version = "0.2"

# buildpack configuration goes here
[com.heroku.buildpacks.debian-packages]
[com.heroku.buildpacks.deb-packages]
install = [
# string version of a dependency to install
"package-name",
Expand All @@ -64,7 +68,7 @@ install = [

### Schema

- `com.heroku.buildpacks.debian-packages` *__([table][toml-table], optional)__*
- `com.heroku.buildpacks.deb-packages` *__([table][toml-table], optional)__*

The root configuration for this buildpack.

Expand Down Expand Up @@ -95,7 +99,7 @@ install = [
> [_]
> schema-version = "0.2"
>
> [com.heroku.buildpacks.debian-packages]
> [com.heroku.buildpacks.deb-packages]
> install = [
> # copy the contents of your Aptfile here, e.g.;
> # "package-a",
Expand Down Expand Up @@ -188,9 +192,9 @@ Issues and pull requests are welcome. See our [contributing guidelines](./CONTRI
[binary-dependency-fields]: https://www.debian.org/doc/debian-policy/ch-relationships.html#binary-dependencies-depends-recommends-suggests-enhances-pre-depends
[ci-badge]: https://github.com/heroku/buildpacks-debian-packages/actions/workflows/ci.yml/badge.svg
[ci-badge]: https://github.com/heroku/buildpacks-deb-packages/actions/workflows/ci.yml/badge.svg
[ci-link]: https://github.com/heroku/buildpacks-debian-packages/actions/workflows/ci.yml
[ci-link]: https://github.com/heroku/buildpacks-deb-packages/actions/workflows/ci.yml
[classic-apt-buildpack]: https://github.com/heroku/heroku-buildpack-apt
Expand All @@ -200,6 +204,8 @@ Issues and pull requests are welcome. See our [contributing guidelines](./CONTRI
[cnb-layer]: https://github.com/buildpacks/spec/blob/main/buildpack.md#layer-types
[cnb-rebase]: https://buildpacks.io/docs/for-app-developers/concepts/rebase/
[debian-archive]: https://www.man7.org/linux/man-pages/man5/deb.5.html
[debian-binary-package]: https://www.debian.org/doc/debian-policy/ch-binary.html
Expand All @@ -220,9 +226,9 @@ Issues and pull requests are welcome. See our [contributing guidelines](./CONTRI
[project-descriptor]: https://buildpacks.io/docs/reference/config/project-descriptor/
[registry-badge]: https://img.shields.io/badge/dynamic/json?url=https://registry.buildpacks.io/api/v1/buildpacks/heroku/debian-packages&label=version&query=$.latest.version&color=DF0A6B&logo=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/PyvLCeQc/j9O4Q+88hQWY/j+0gCOI84ycD0oRNxnSAV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tysuXT21ahGoujSePl3/qpiRVK2wO3KY1ClyuJ8YHATcDPIyhQFud6JbfKr1vZz+xehd0a8e08GICKC318xzpejrpUQ3UAkaZK4yoGU/HduWts72hsPpyFnSpL2wjWlFNFfSoSWipqIWVYP1J27rwcCL839eF9PMgYpATiLJ01eOs2jaU+D03508cK/9iHUkm6F4LBI+hTlc9m0BSsVSufcCBkvzu7afSHpgrGPYxoY00BEA/8FOPrYBqYsE44AAAAASUVORK5CYII=&labelColor=white
[registry-badge]: https://img.shields.io/badge/dynamic/json?url=https://registry.buildpacks.io/api/v1/buildpacks/heroku/deb-packages&label=version&query=$.latest.version&color=DF0A6B&logo=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/n92RsVVbuHc4bCod4YwZ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lhcCvnfFCigUr6L0ucDA3KeR8iYO3U8y8M6+ZGBDAgIc0vWl5BEakiijQTYmhkWpEVEBwOELgUt+y3QtysuXT21ahGoujSePl3/qpiRVK2wO3KY1ClyuJ8YHATcDPIyhQFud6JbfKr1vZz+xehd0a8e08GICKC318xzpejrpUQ3UAkaZK4yoGU/HduWts72hsPpyFnSpL2wjWlFNFfSoSWipqIWVYP1J27rwcCL839eF9PMgYpATiLJ01eOs2jaU+D03508cK/9iHUkm6F4LBI+hTlc9m0BSsVSufcCBkvzu7afSHpgrGPYxoY00BEA/8FOPrYBqYsE44AAAAASUVORK5CYII=&labelColor=white
[registry-link]: https://registry.buildpacks.io/buildpacks/heroku/debian-packages
[registry-link]: https://registry.buildpacks.io/buildpacks/heroku/deb-packages
[release-file]: https://wiki.debian.org/DebianRepository/Format#A.22Release.22_files
Expand Down
12 changes: 6 additions & 6 deletions buildpack.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
api = "0.10"

[buildpack]
id = "heroku/debian-packages"
id = "heroku/deb-packages"
version = "0.0.1"
name = "Heroku Debian Packages Buildpack"
description = "Heroku's buildpack for installing Debian packages."
homepage = "https://github.com/heroku/buildpacks-debian-packages"
keywords = ["debian", "packages"]
name = "Heroku .deb Packages Buildpack"
description = "Heroku's buildpack for installing .deb system packages."
homepage = "https://github.com/heroku/buildpacks-deb-packages"
keywords = ["deb", "debian", "packages"]

[[buildpack.licenses]]
type = "Apache-2.0"
Expand All @@ -27,4 +27,4 @@ distros = [
]

[metadata.release]
image = { repository = "docker.io/heroku/buildpacks-debian-packages" }
image = { repository = "docker.io/heroku/buildpacks-deb-packages" }
14 changes: 7 additions & 7 deletions src/config/buildpack_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ impl FromStr for BuildpackConfig {
fn from_str(contents: &str) -> Result<Self, Self::Err> {
let doc = DocumentMut::from_str(contents).map_err(Self::Err::InvalidToml)?;

// the root config is the table named `[com.heroku.buildpacks.debian-packages]` in project.toml
// the root config is the table named `[com.heroku.buildpacks.deb-packages]` in project.toml
let root_config_item = doc
.get("com")
.and_then(|item| item.as_table_like())
.and_then(|com| com.get("heroku"))
.and_then(|item| item.as_table_like())
.and_then(|heroku| heroku.get("buildpacks"))
.and_then(|item| item.as_table_like())
.and_then(|buildpacks| buildpacks.get("debian-packages"));
.and_then(|buildpacks| buildpacks.get("deb-packages"));

match root_config_item {
None => Ok(BuildpackConfig::default()),
Expand Down Expand Up @@ -117,7 +117,7 @@ mod test {
[_]
schema-version = "0.2"
[com.heroku.buildpacks.debian-packages]
[com.heroku.buildpacks.deb-packages]
install = [
"package1",
{ name = "package2" },
Expand Down Expand Up @@ -153,7 +153,7 @@ install = [
[_]
schema-version = "0.2"
[com.heroku.buildpacks.debian-packages]
[com.heroku.buildpacks.deb-packages]
"#
.trim();
Expand All @@ -178,7 +178,7 @@ schema-version = "0.2"
[_]
schema-version = "0.2"
[com.heroku.buildpacks.debian-packages]
[com.heroku.buildpacks.deb-packages]
install = [
"not-a-package*",
]
Expand All @@ -196,7 +196,7 @@ install = [
[_]
schema-version = "0.2"
[com.heroku.buildpacks.debian-packages]
[com.heroku.buildpacks.deb-packages]
install = [
{ name = "not-a-package*" },
]
Expand All @@ -215,7 +215,7 @@ install = [
schema-version = "0.2"
[com.heroku.buildpacks]
debian-packages = ["wrong"]
deb-packages = ["wrong"]
"#
.trim();
Expand Down
Loading

0 comments on commit 4e6757a

Please sign in to comment.