Skip to content

chore: resolve the conflicting license declarations (Apache-2.0 source / GPL-3.0 packages) - #158

Open
lqh-watch wants to merge 2 commits into
masterfrom
fix_license
Open

lqh-watch wants to merge 2 commits into
masterfrom
fix_license

Conversation

@lqh-watch

Copy link
Copy Markdown
Collaborator

What

The repository declared three different licenses for itself, and the release packages shipped with no license text at all.

Where Before After
Root LICENSE GPL-2.0 Apache-2.0 (source)
13 files under src/common, src/component, src/transcoder LGPL-2.1 Apache-2.0
11 files with no header at all — Apache-2.0
Release packages (tar.gz / zip / dmg / layer) no license text GPL-3.0 + THIRD_PARTY_NOTICES.md

Why

5f28b6f changed the root LICENSE to GPL-2.0, but that commit touched only that one file — the README, every file header and the developer docs still said Apache-2.0. That
state is also the one option that cannot legally cover this project:

  • The packages link against a GPL-enabled FFmpeg — libx264/libx265 from BtbN's *-gpl-shared build, Homebrew ffmpeg@5 on macOS — so copyleft covers the combined
    binary.
  • Apache-2.0 is incompatible with GPLv2, and the Apache-2.0 files include work from outside contributors (no CLA/DCO has ever been in place, and the root LICENSE was
    Apache-2.0 when they contributed), so GPL-2.0 cannot absorb them either.
  • Qt's open-source options are LGPLv3/GPLv2, and LGPLv3 can only be upgraded to GPLv3, not downgraded to GPLv2.

All three constraints point the same way for the binaries — GPL-3.0 — while the source itself can stay Apache-2.0.

How

Source (0612a78)

  1. Restore the root LICENSE to the Apache-2.0 text used before 5f28b6f
  2. Replace the LGPL-2.1 header of 13 files with the standard Apache-2.0 header
  3. Add the missing header to main.cpp, transcoder_test.cpp, enhance_module.py and the 8 shell scripts under tool/ and src/resources
  4. Delete src/common/LICENSE and src/transcoder/LICENSE (the LGPL-2.1 texts)
  5. Update README, CLAUDE.md and .augment-guidelines to one consistent story
  6. Add .github/pre-commit/check_license_header.py so a new source file cannot land without a header

Packages (be3a35e)

  1. Add licenses/GPL-3.0.txt and THIRD_PARTY_NOTICES.md (bundled components, their licenses, and where to obtain the corresponding source)
  2. Bundle both plus LICENSE into the Linux tar.gz, the Windows zip, the macOS app (Contents/Resources) and the Linglong layer (share/licenses)
  3. Run the macOS step before the bundle is re-signed, so the added files are covered by the signature; the Linglong step drops the copy that arrives with the binary artifact
    to avoid a duplicate under bin/
  4. State the source/binary split in README.md / README_ZH.md
  5. Document the LGPL vs GPL FFmpeg trade-off in doc/CompileGuide.md
  6. Fix the repository URL in the DMG install instructions (it pointed at TSGU-OSC/OpenConverter, a different repository), and add a license note there for end users

Notes

  • The LGPL-2.1 headers came from the belief that calling the FFmpeg API makes a file a derivative work of FFmpeg. It does not — those files are the project's own code.
  • A binary you build yourself against an LGPL FFmpeg build contains no GPL code and stays under the Apache-2.0 terms.
  • This changes the terms of future packages only; versions already released keep the terms they were published with.

Testing

  • pre-commit run --files ... — all 11 hooks pass (including the new license-header hook)
  • bash -n on every shell script; YAML parse check on all workflows
  • Simulated the four packaging paths in a temp tree and verified where the license files land, plus that a re-run does not nest licenses/licenses

The repo carried three conflicting license states: root LICENSE = GPL-2.0
(changed in 5f28b6f), 73 files with an Apache-2.0 header, 13 files with an
LGPL-2.1 header.

GPL-2.0-only cannot cover this project: the Apache-2.0 files contributed by
outside contributors (no CLA was ever in place) cannot be relicensed to GPLv2,
Apache-2.0 is incompatible with GPLv2 anyway, and Qt's LGPLv3 option can only
be upgraded to GPLv3. The LGPL-2.1 headers were based on the mistaken belief
that calling the FFmpeg API makes a file a derivative work of FFmpeg.

The prebuilt binaries are a separate matter and keep a GPL-3.0 notice (next
commit).

[how]
1. Restore the root LICENSE to the Apache-2.0 text used before 5f28b6f
2. Replace the LGPL-2.1 header of 13 files with the standard Apache-2.0 header
3. Add the missing header to main.cpp, transcoder_test.cpp, enhance_module.py
   and the 8 shell scripts under tool/ and src/resources
4. Delete src/common/LICENSE and src/transcoder/LICENSE (LGPL-2.1 texts)
5. Update README, CLAUDE.md and .augment-guidelines
6. Add a pre-commit hook rejecting any source file without a header
The packages are built against a GPL-enabled FFmpeg (libx264/libx265) and the
LGPLv3 build of Qt, so each package as a whole is GPL-3.0 - but they shipped
with no license text at all and nothing told the recipient.

[how]
1. Add licenses/GPL-3.0.txt and THIRD_PARTY_NOTICES.md (bundled components,
   their licenses, and where to get the corresponding source)
2. Bundle both plus LICENSE into the Linux tar.gz, the Windows zip, the macOS
   app (Contents/Resources) and the Linglong layer (share/licenses)
3. Add the macOS step before the bundle is re-signed so the files are covered
   by the signature; the Linglong step drops the copy that arrives with the
   binary artifact to avoid a duplicate under bin/
4. State the source/binary license split in README.md and README_ZH.md
5. Document the LGPL vs GPL FFmpeg trade-off in doc/CompileGuide.md
6. Fix the repository URL in the DMG install instructions (it pointed at
   TSGU-OSC/OpenConverter, a different repository)
@lqh-watch
lqh-watch requested a review from Jimmy385898 October 10, 2026 02:11
@lqh-watch
lqh-watch enabled auto-merge (rebase) October 10, 2026 02:11
@sonarqubecloud

Copy link
Copy Markdown

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.

2 participants