From 7efa6813a8875f4e2e744bbbf04a2544014a7416 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 7 Nov 2026 10:58:30 +0000 Subject: [PATCH 1/4] Contributor agreement: CONTRIBUTING.md and a sign-off check on pull requests Each contribution comes with the suite's contributor agreement (the one bbs, menu and brand already use): the contributor keeps the copyright and licenses it to the D-Modem Authors under the repository's licence and any other terms, commercial ones included. Each commit's Signed-off-by line says they agree. The new workflow checks for that line on every commit of a pull request, except pull requests from the owner, the organization's members and bots. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01B82eRSQaj3bYPQDZU4qf9U --- .github/workflows/contributor-agreement.yml | 62 +++++++++++++++++++++ CONTRIBUTING.md | 46 +++++++++++++++ README.md | 2 +- 3 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/contributor-agreement.yml create mode 100644 CONTRIBUTING.md diff --git a/.github/workflows/contributor-agreement.yml b/.github/workflows/contributor-agreement.yml new file mode 100644 index 0000000..d86d8d0 --- /dev/null +++ b/.github/workflows/contributor-agreement.yml @@ -0,0 +1,62 @@ +# The contributor agreement (CONTRIBUTING.md): every commit in a pull +# request carries a "Signed-off-by:" line with its author's email, which +# says the author agrees to it for that commit. Merge commits are +# skipped. Pull requests opened by the repository's owner or the D-Modem +# organization's members, and by bots, are not checked. +# +# pull_request_target, so that the check is the base branch's copy and a +# pull request can't change it. It reads the commits through the API and +# never checks out or runs the pull request's code. +name: Contributor agreement + +on: + pull_request_target: + types: [opened, synchronize, reopened] + +permissions: + pull-requests: read + +concurrency: + group: contributor-agreement-${{ github.event.pull_request.number }} + cancel-in-progress: true + +jobs: + sign-off: + runs-on: ubuntu-24.04 + timeout-minutes: 5 + steps: + - uses: actions/github-script@v8 + with: + script: | + const pr = context.payload.pull_request; + const exempt = ['OWNER', 'MEMBER']; + if (pr.user.type === 'Bot' || exempt.includes(pr.author_association)) { + core.info(`Opened by ${pr.user.login} (${pr.author_association}): not checked.`); + return; + } + const commits = await github.paginate(github.rest.pulls.listCommits, { + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: pr.number, + per_page: 100, + }); + const missing = []; + for (const c of commits) { + if (c.parents.length > 1) continue; + const email = (c.commit.author.email || '').toLowerCase(); + const signed = [...c.commit.message.matchAll(/^Signed-off-by:.*<([^>]+)>\s*$/gim)] + .some(m => m[1].trim().toLowerCase() === email); + if (!signed) { + missing.push(`${c.sha.slice(0, 7)} ${c.commit.message.split('\n')[0]} (author ${email})`); + } + } + if (missing.length) { + core.setFailed( + 'These commits have no "Signed-off-by:" line with their author\'s email, ' + + 'which says you agree to the contributor agreement in CONTRIBUTING.md:\n ' + + missing.join('\n ') + + '\n\nTo add it: git rebase --signoff ' + pr.base.ref + + ' (or git commit --amend -s for the last commit), then force-push.'); + } else { + core.info(`All ${commits.length} commits are signed off.`); + } diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..c452de4 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,46 @@ +# Contributing + +Contributions are welcome: issues, fixes and features alike. Before +sending a change, build it and run its tests ([docs/building.md](docs/building.md)). + +## The contributor agreement + +The app is offered under the AGPL-3.0 ([COPYING](COPYING)). So that the +D-Modem Authors can also offer it under other terms, commercial licenses +included, as they do the rest of D-Modem, each contribution comes with +this agreement. +By submitting a contribution (a pull request, a patch or +any other code or text meant for inclusion), you agree that: + +1. The contribution is your own original work, or you otherwise have + the right to submit it under these terms, and to your knowledge it + infringes no one's rights. If your employer has rights in what you + create, you have its permission to contribute, or it has waived those + rights. +2. You keep the copyright in your contribution. +3. You grant the D-Modem Authors, and those who receive the project from them, a + perpetual, worldwide, non-exclusive, no-charge, royalty-free, + irrevocable license to use, copy, modify, publicly display and + perform, sublicense and distribute your contribution and works based + on it, under the AGPL-3.0 and under any other terms, commercial + licenses included. +4. You grant the same parties a license, on the same terms, under any + patent claims of yours that your contribution would infringe, to + make, use, sell and otherwise transfer it as part of the project. +5. Your contribution is provided "as is", without warranties or + conditions of any kind. + +Please add this line to each commit you contribute (`git commit -s` +does it): + + Signed-off-by: Your Name + +It says that you agree to the above for that commit. A contribution +without it cannot be merged. + +A check on each pull request looks for that line, with the commit +author's email, on every commit. If it's missing, `git rebase --signoff +main` (or `git commit --amend -s` for the last commit) adds it; then +force-push. Pull requests from the D-Modem Authors themselves (the +repository's owner and the D-Modem organization's members) are not +checked. diff --git a/README.md b/README.md index 3d50ce0..b201cd2 100644 --- a/README.md +++ b/README.md @@ -52,4 +52,4 @@ the source layout. GNU Affero General Public License version 3 only ([COPYING](COPYING)), as D-Modem (see its LICENSING.md for the parts it fetches: libre is -BSD-3-Clause, Mbed TLS Apache-2.0). +BSD-3-Clause, Mbed TLS Apache-2.0). Contributions come with a contributor agreement ([CONTRIBUTING.md](CONTRIBUTING.md)). From dc27f3cd52cfa169d41270a5947ad99e6bb3a764 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 7 Nov 2026 11:01:35 +0000 Subject: [PATCH 2/4] Licence: AGPL-3.0-only, or a commercial licence from the D-Modem Authors The suite's licence, as D-Modem, bbs, menu and brand: the AGPL-3.0-only by default, and a commercial licence from the D-Modem Authors for uses that can't meet its terms (COMMERCIAL-LICENSE.md). The contributor agreement grants the licence for both. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01B82eRSQaj3bYPQDZU4qf9U --- COMMERCIAL-LICENSE.md | 44 +++++++++++++++++++++++++++++++++++++++++++ CONTRIBUTING.md | 7 +++---- README.md | 3 ++- 3 files changed, 49 insertions(+), 5 deletions(-) create mode 100644 COMMERCIAL-LICENSE.md diff --git a/COMMERCIAL-LICENSE.md b/COMMERCIAL-LICENSE.md new file mode 100644 index 0000000..c25e4e5 --- /dev/null +++ b/COMMERCIAL-LICENSE.md @@ -0,0 +1,44 @@ +# Commercial license + +The D-Modem app is Copyright (C) 2026 D-Modem Authors and is offered +under two licenses; you choose one. + +## The GNU Affero General Public License, version 3 (the default) + +[LICENSE](LICENSE), AGPL-3.0-only. Free of charge, for any purpose, +commercial ones included, on the AGPL's terms. In short: + +- If you distribute the D-Modem app, modified or not, you give the recipients + its complete source code under the AGPL. +- If you modify the D-Modem app and let people use it remotely (anyone using it + over a network), you offer those users + the complete source code of your modified version under the AGPL + (section 13). + +## A commercial license + +For those who cannot or will not meet the AGPL's terms, for example to: + +- ship the D-Modem app, or a modified version, inside a product whose source + you do not publish; +- run a modified version of the D-Modem app as a service without offering its source to + the people who use it; +- combine it with code under licenses that do not mix with the AGPL. + +A commercial license is granted by the D-Modem Authors, the copyright holders, +on terms agreed with you (scope, term and fee). + +Neo-Desktop () is the point of contact +for commercial licenses. + +**To ask for one**, contact Neo-Desktop, or open an issue at + titled "Commercial +license", saying who you are and roughly what you want to do. Keep +anything confidential out of the issue: a private channel follows from +there. + +Until a commercial license is signed, the AGPL is the only license you +have. + +This file explains the licensing; it is not itself a license or a +contract. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c452de4..423b3dc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,10 +5,9 @@ sending a change, build it and run its tests ([docs/building.md](docs/building.m ## The contributor agreement -The app is offered under the AGPL-3.0 ([COPYING](COPYING)). So that the -D-Modem Authors can also offer it under other terms, commercial licenses -included, as they do the rest of D-Modem, each contribution comes with -this agreement. +The app is offered under the AGPL-3.0 and, by the D-Modem Authors, under +commercial licenses ([COMMERCIAL-LICENSE.md](COMMERCIAL-LICENSE.md)). +For contributions to be part of both, each one comes with this agreement. By submitting a contribution (a pull request, a patch or any other code or text meant for inclusion), you agree that: diff --git a/README.md b/README.md index b201cd2..ba58618 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,7 @@ the source layout. ## Licence -GNU Affero General Public License version 3 only ([COPYING](COPYING)), as +GNU Affero General Public License version 3 only ([COPYING](COPYING)), or a +commercial licence from the D-Modem Authors ([COMMERCIAL-LICENSE.md](COMMERCIAL-LICENSE.md)), as D-Modem (see its LICENSING.md for the parts it fetches: libre is BSD-3-Clause, Mbed TLS Apache-2.0). Contributions come with a contributor agreement ([CONTRIBUTING.md](CONTRIBUTING.md)). From f927ca7ad0e9157bb107116f45b79d028eec513b Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 7 Nov 2026 11:10:39 +0000 Subject: [PATCH 3/4] Contributor agreement: copyright assigned to D-Modem Contributors now assign the copyright in their contributions to D-Modem (the D-Modem organization, its rights held by its owner on its behalf), with a licence back to them, and an exclusive licence where an assignment doesn't take effect. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01B82eRSQaj3bYPQDZU4qf9U --- CONTRIBUTING.md | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 423b3dc..fbc7543 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,16 +16,29 @@ any other code or text meant for inclusion), you agree that: infringes no one's rights. If your employer has rights in what you create, you have its permission to contribute, or it has waived those rights. -2. You keep the copyright in your contribution. -3. You grant the D-Modem Authors, and those who receive the project from them, a +2. You assign to D-Modem all copyright in your contribution, worldwide, + for the whole term of those rights. "D-Modem" here is the D-Modem + organization (), whose rights its owner, + Neo-Desktop, holds on its behalf; the "D-Modem Authors" in the + project's copyright notices are D-Modem in this sense. Where a right + can't be assigned (moral rights, for example), you waive it, or where + it can't be waived, you agree not to assert it against D-Modem or + those who receive the project from it. If the assignment is not + effective anywhere, you instead grant D-Modem there an exclusive, + perpetual, worldwide, no-charge, royalty-free, irrevocable license to + do anything the copyright holder could do with your contribution, + including licensing it to others. +3. D-Modem may license your contribution, and works based on it, under + the AGPL-3.0 and under any other terms, commercial licenses included. + It licenses your contribution back to you: a perpetual, worldwide, + non-exclusive, no-charge, royalty-free, irrevocable license to use, + copy, modify, publicly display and perform, sublicense and distribute + it, on any terms. +4. You grant D-Modem, and those who receive the project from it, a perpetual, worldwide, non-exclusive, no-charge, royalty-free, - irrevocable license to use, copy, modify, publicly display and - perform, sublicense and distribute your contribution and works based - on it, under the AGPL-3.0 and under any other terms, commercial - licenses included. -4. You grant the same parties a license, on the same terms, under any - patent claims of yours that your contribution would infringe, to - make, use, sell and otherwise transfer it as part of the project. + irrevocable license under any patent claims of yours that your + contribution would infringe, to make, use, sell and otherwise + transfer it as part of the project. 5. Your contribution is provided "as is", without warranties or conditions of any kind. From 9b46e86a9cbf5803ba67ddd3e106adc1c98937a3 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 8 Nov 2026 11:42:17 +0000 Subject: [PATCH 4/4] Contributor agreement check: Claude's commits on this repository's branches are exempt As bbs: commits by Claude (noreply@anthropic.com) on a branch of the repository itself are not checked; on a fork's pull request they still are. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01B82eRSQaj3bYPQDZU4qf9U --- .github/workflows/contributor-agreement.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/contributor-agreement.yml b/.github/workflows/contributor-agreement.yml index d86d8d0..d4d6479 100644 --- a/.github/workflows/contributor-agreement.yml +++ b/.github/workflows/contributor-agreement.yml @@ -2,7 +2,10 @@ # request carries a "Signed-off-by:" line with its author's email, which # says the author agrees to it for that commit. Merge commits are # skipped. Pull requests opened by the repository's owner or the D-Modem -# organization's members, and by bots, are not checked. +# organization's members, and by bots, are not checked. Nor are commits +# by Claude (noreply@anthropic.com) on a branch of this repository: only +# those who can push here can put them there, and the owner takes them in +# by merging (a fork's commits with that email are still checked). # # pull_request_target, so that the check is the base branch's copy and a # pull request can't change it. It reads the commits through the API and @@ -40,10 +43,13 @@ jobs: pull_number: pr.number, per_page: 100, }); + const sameRepo = pr.head.repo && pr.head.repo.full_name === pr.base.repo.full_name; + const exemptAuthors = ['noreply@anthropic.com']; const missing = []; for (const c of commits) { if (c.parents.length > 1) continue; const email = (c.commit.author.email || '').toLowerCase(); + if (sameRepo && exemptAuthors.includes(email)) continue; const signed = [...c.commit.message.matchAll(/^Signed-off-by:.*<([^>]+)>\s*$/gim)] .some(m => m[1].trim().toLowerCase() === email); if (!signed) {