Skip to content

Add dual-license notice (corrected fork) #678

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AkarshSahlot
Copy link

Changes I have done:

This PR updates the LICENSE file inside p4c to explicitly:

  1. State that p4c is primarily apache2.0 licensed
  2. List all gpl2 only files(with full license text)
  3. Add warnings about license incompatibility
  4. Include SPDX identifier (Apache-2.0 WITH GPL-2.0-only-exception) so that users doesn't get confuse project as pure Apache, ignoring GPL restrictions.

Previously Behavior:

The repository only listed Apache-2.0 in the top-level LICENSE file, which make users think it's purely apache
gpl2-only files existed but were not clearly documented , which has a risk of:

  • Unintentional license violations when combining code
  • Misrepresentation of the project’s licensing (GitHub’s API showed only Apache-2.0)

Why This Important for us to do:

Prevents accidental mixing of incompatible licenses.

Increased Transparency, Users/tools can now identify GPL-2.0-only files at a glance.

Now it follows spdx standards for multi-license projects.
Verification

All listed GPL files exist (./backends/ebpf/tests/ptf/*.py)

License texts are verbatim from official sources
Compliance notes
warn against static linking/binary distribution

I verified them locally

This small addition solves big legal/automation headaches!


/cc @jafingerhut
Could you please review this license clarification?
Fixes #666

@AkarshSahlot AkarshSahlot force-pushed the fix-license-666-corrected branch from 4f8b55b to 8f45340 Compare April 1, 2025 17:31
@jafingerhut
Copy link
Collaborator

Same comments as here: p4lang/p4c#5212 (comment)

@AkarshSahlot
Copy link
Author

Will wait for it

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

Successfully merging this pull request may close these issues.

What should top-level LICENSE file contain if most files are Apache-2.0, but a few are GPL-2.0-only ?
2 participants