Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Produce license compliant binary distributions #718

Open
schneems opened this issue Nov 2, 2023 · 2 comments
Open

Produce license compliant binary distributions #718

schneems opened this issue Nov 2, 2023 · 2 comments

Comments

@schneems
Copy link
Contributor

schneems commented Nov 2, 2023

Expected

I expect that libcnb produces binaries that comply with its own license

Actual

Per our license https://github.com/heroku/libcnb.rs/blob/a9759eef8e356f6396f1df8b16afe591645251d5/LICENSE, section two says:

  1. Redistributions in binary form must reproduce the above copyright notice,
    this list of conditions and the following disclaimer in the documentation
    and/or other materials provided with the distribution.

This can be accomplished by either having the license in the binary, or along side of it (a text file that it ships with). AFAIK this isn't happening.

Sketches

To accommodate it, we should either intern the license string in the Rust code and ensure it doesn't get compiled away or obfsucated (like a string literal in a C source file), or produce a compliant text file alongside of the binaries and ensure that our release automation includes this file in our distribution.

@edmorley
Copy link
Member

edmorley commented Nov 2, 2023

Shipping the buildpack's LICENSE file in the packaged .cnb and OCI image seem like the best approach to me.

The assembling of libcnb.rs powered component buildpacks occurs here:

pub fn assemble_buildpack_directory(

For composite buildpacks the buildpack.toml and package.toml are assembled here:
https://github.com/heroku/libcnb.rs/blob/414b9f774132c956a8868bc0dff09cba2d011f36/libcnb-package/src/package.rs#L119C1-L119C1

@edmorley edmorley changed the title Produce license compliant binaries Produce license compliant binary distributions Nov 2, 2023
@edmorley
Copy link
Member

So the licence wording actually says "Redistributions" not "Distributions". I tried searching for the definition of that term but didn't find anything. To me, "redistributions" would be someone else shipping your own buildpack, not yourself, since the canonical distribution would be a "distribution" not a "redistribution".

Another issue - we don't actually know what licence the end buildpack is using, or the location of their licence file (in the case of some of our own CNBs, they are in a monorepo layout with the licence in the root of the repo).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants