Currently, we can add a
LICENSE file for our charms. But a charm user can’t see the information about the license anywhere:
juju info charm-foo does not show it, CharmHub.io/charm-foo does not show it. The only way to get this information is to download the charm file and look for it.
I proposed to
charmcraft analyze identify the license (charmcraft#464) but the issue is closed for further discussion.
I know that GitHub and GitLab can identify the license used by looking at the repository and finding a
LICENSE file (on the right corner of the screenshot below):
I’d like to see something similar to that in Juju.
If Charmcraft could somehow identify the license and set it in the
manifest file, then CharmHub (GitHub issue charmhub.io#1100) and
juju info could then show that.
@sergiusens suggested SPDX, and that project has an interesting list of “short names” to uniquely identify each license, see SPDX License List. But adding yet another file to the charm code does not sound good to me, there’s already a lot of YAML files we need to keep track.
So, what would be other options to have the License shown to end users? Preferably in a way that charm authors don’t need to keep this information in many places (e.g. license file + metadata file, this could be error prone).