Brew: Import license data from other sources such as GitHub and Debian

Created on 15 Sep 2020  路  9Comments  路  Source: Homebrew/brew

Feature suggestion

GitHub has a license API (https://docs.github.com/en/rest/reference/licenses), and the Debian Copyright file is machine readable. I suggest a Homebrew dev command that looks up the Debian package name in Repology, fetches the Debian copyright file, translates it to a Homebrew license_info DSL call, prints to the console, or optionally modifies the formula and opens a pull request.

A detailed description of the proposed feature

TBD

The motivation for the feature

Homebrew is in the process of adding license_info blocks to all formulae.

How the feature would be relevant to at least 90% of Homebrew users

This feature is primarily intended for developers.

What alternatives to the feature have been considered

Manually interpreting licenses and adding license_info to formulae.

help wanted

Most helpful comment

This looks like something I can work on! I have some context about Formula license. Let me get more context about this and I will ask if I have any questions.

All 9 comments

This looks like something I can work on! I have some context about Formula license. Let me get more context about this and I will ask if I have any questions.

Hi @sjackman, I dug around the docs, issues and PRs but can't seem to find any information about what a license_info block looks like. Could you link me to the relevant PR / issue so that I may get some context?

@jonchang The license DSL was mostly written by @lionellloh. I'm pretty sure license_info was a typo here from @sjackman and it should have been license. Does that make more sense if so @lionellloh?

The more detailed license blocks are new though, which is what the documentation goes into.

@jonchang I don't see any reference to license_info in that docs or in Homebrew/homebrew-core?

Yes, I was assuming that Shaun had made a typo.

Yes that answers my question, thanks!

Yes, a typo. Sorry for the confusion.

Was this page helpful?
0 / 5 - 0 ratings