-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add licenses
to .app
for rebar3_sbom
#1651
Comments
I'm not sure where that |
Lemme try to find that. I don't think it's Erlang/OTP -specific, but rather Hex.pm. On the other hand, https://hex.pm/packages/cowboy is identified as ISC, so I wonder where that information's obtained from. Edit: I can find it mentioned for |
Yes it's from the hex metadata. I don't use rebar3 so the hex metadata is given directly to hex. The .app file is generated by Erlang.mk from the Makefile (it's only pushed to the repo for rebar3 compatibility). If there's a need to add it then Erlang.mk must be modified to include it, which means there has to be a new Makefile variable. So having as more details as possible would help. Alternatively if it could take it from hex when fetching the package, problem solved? |
I wondered about this, but missed this "detail".
I understand, but this (adding for a specific use case) is probably "too specific" (?)
At the moment, the only details I have are those I linked to. 😢
I'm not sure it's not working on the local files, by looking at I'll check with the maintainers if they'd be Ok to read this from |
It's not a file for the hex metadata. It's an Erlang term given directly to hex_core. I meant getting it from hex.pm directly. But it's probably a different plugin altogether so no clear path there. Perhaps a better path would be to first have rebar3_sbom let you override the license of specific dependencies (so you could configure them manually for now), and then later do the changes in Erlang.mk if they can be useful. |
This I'm doing already, in the output, by opening an exception for lib.s without license (this is how I wouldn't mind tackling it directly from |
I think it would be best to just look at the license file like GitHub does to be honest. I'm not a fan of duplicating information. Ideally we wouldn't need to do it for hex either. Perhaps there could be a function in Erlang.mk that looks at the license file and detects the license, maybe using https://github.com/licensee/licensee/blob/main/docs/command-line-usage.md for the detection (and Here is another place where that information is duplicated, that might be better done differently: https://github.com/ninenines/cowboy/blob/master/doc/src/guide/introduction.asciidoc#license |
Yeah, I was thinking about automating it, too (I'm also not a fan of duplicating information), but, as you say, using an online tool to detect the license is most likely not cheap. I'll close this one, for now, and check what |
I don't think licensee is an online tool. It has a command line that just produces too much information so JSON works better as the output to get what we want. |
In the case of Erlang.mk the detection could be cached as well if necessary. Regardless of outcome please open a ticket in https://github.com/ninenines/erlang.mk for future reference. |
It's done in ninenines/erlang.mk#1001. Closing this one... Thanks. |
Hi 👋.
Would you accept a pull request adding
{licenses, ["ISC"]}
tocowboy
's.app
?This would allow for https://github.com/voltone/rebar3_sbom to identify this in CI, for license reporting purposes.
Asking before pull request'ing since I'm also interested in doing this for
ranch
andcowlib
😄Thanks.
The text was updated successfully, but these errors were encountered: