Skip to content

licenses: composite licenses #283706

Closed

Description

@Atemu

Issue description

Most FOSS projects have a single license and that can easily be mapped to meta.license. However, some projects have multiple licenses which apply to the entire source, parts of it or a mix of both. All of these rather different cases are currently represented by a simple list of licenses. This makes the actual terms of the package's "composite" license unclear at a package level as it is dependant on how you interpret this list.

Interpreting this list incorrectly can lead to copyright infringement.
Let's take i.e. license = [ unfreeRedistributable gpl3Plus ]. If you constructed a composite license out of these by combining all listed licenses' redistributable attributes using AND, you would assume it to be redistributable because both are redistributable on their own. In actuality however, you cannot redistribute the resulting package because the GPLv3 only allows redistribution of its code when its terms are followed for the entire code-base but you cannot do that because some parts are unfree.

Thus, we need explicit composite licenses with clear rules as a new type of license. These would have the same attributes as a single regular license and provide the same outside interface (free and distributable) but also have attributes specific to the composite licenses such as the list of licenses they're composed of.

Additionally, for these licenses to work properly, we must also track whether individual licenses are compatible with other licenses. For now, I think the most important license compatibilities are GPL and unfree.


I propose the following composite licenses:

The dual license

Some projects are licensed simultaneously under two (or more) licenses. Since the user could choose any one of the licenses at will, the composite license inherits the attributes of the license offering the most freedom and/or compatibility (i.e. unfree, GPL).
The individual license can be incompatible with another.

Example to showcase this license's features: Dual-license of bsdOriginal and gpl3Only.
If you combined this dual-license with a GPL license, it would act like the gpl3Only, ignoring the bsdOriginal's GPL-incompatibility.
If you combined it with a GPL-incompatible license however, it would act like bsdOriginal, making it compatible.

(Better name suggestions for incorporating the possibility of n>2 welcome.)

The partial license

Some projects have a primary license but also have parts of their code-base dual-licensed together with other licenses.

This usually stems from once having had a different license and switching it or incorporating permissively-licensed code.
A good recent example is Canonical's LXC which switched from asl20 to lgpl21Plus. Only the parts from after the license change are exclusively lgpl21Plus, the rest remain available under asl20 too.
These licenses must be compatible with another because otherwise the upstream wouldn't be able to distribute the code. (If that is the case, we should probably abstain from packaging.)

This license acts exactly like the primary license but with a note that some parts are also available under the secondary licenses which is often a requirement for "upgrading" licenses.

Open questions:

  • What about relicensing from GPL-incompatible to GPL-compatible? Is that even possible? In that case, the composite couldn't be GPL-compatible?
  • Are all compatible licenses direct "upgrades" or do some "upgrades" require some terms exclusive to the previous license to still be followed which could make them incompatible with others which would be compatible with the new license?

The pessimistic license

This license can be made up of any number of licenses and assumes the worst out of all of them. How rude. :(

One of the licenses is unfree? The entire license becomes unfree.
One of the licenses is non-redistributable? The entire license becomes non-redistributable
One of the licenses isn't GPL-compatible? The entire license becomes GPL-incompatible.
etc.

In case of doubt, it also assumes the worst. If it's unknown whether one of its licenses is GPL-compatible, it assumes it's not and will become GPL-incompatible. It will also mark itself as non-redistributable if any of its licenses aren't inter-compatible.

Some projects have multiple licenses that apply to separate parts of the code-base which necessitates a license like this. Additionally, this license may be applicable in composition with other projects/dependencies (seen in i.e. ffmpeg but also for #106471).

For practical reasons, this license should probably be the default interpretation when meta.license is a list of licenses. If you meant something different, you would now be able to explicitly use a different composite license.
Explicitly using this license would be preferred but not required.

(Less depressing name suggestions welcome.)


Is there any other case of composite licenses you can think of that is not covered by these three or would be better covered by a slight variation of one of them?

Activity

  1. added
    9.needs: community feedback
    1.severity: legal
    on Jan 25, 2024
  2. 7c6f434c commented on Jan 25, 2024

    @7c6f434c
    Member

    Hm, I guess dual in general is what GPL calls «at the option of the user». Pessimistic reminds me the «portions copyright» notices.

    If things are truly composable, the partial example you give is «portions licensed» [ («at the option of user» [‘old license’, ‘new license’]) ‘new license’].

    If upstream has enough control over the project, it might distribute things under incompatible licenses by the way. It might even make sense, as in «this combo of portion licenses is how you can make use of the whole package, but if you need to copy just a couple of functions, you can have them under another license not compatible with the entire project».

    And «at the option of user» lets Hydra operators as the intermediate users to «downcast» and receive the specified portion of the package under only one of the options provided before redistributing, so the complexity can usually be kept in check if things get too long.

  3. added a commit that references this issue on Apr 7, 2024
  4. emilazy commented on Sep 15, 2024

    @emilazy
    Member

    We should just encode full SPDX expressions, like basically every other distro is moving to. The lack of OR right now is particularly annoying. Then we can implement logic based on evaluating those, right? Someone may have even written down algorithms for that.

    The partial case is just A OR (A AND B).

  5. added
    2.status: stale
    on Jul 4, 2025
  6. jopejoe1 commented on Dec 6, 2025

    @jopejoe1
    Member

    Did some work on this in #468378

  7. removed
    2.status: stale
    on Dec 6, 2025
  8. jopejoe1 commented on Apr 20, 2026

    @jopejoe1
    Member

    We now have composite licenses with #468378 being merged.

  9. linked a pull request that will close this issuelib.licenses: add compound licenses #468378on Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    1.severity: legal9.needs: community feedback

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions