Skip to content

Commit fbb14ac

Browse files
authored
chore: dual license with a CLA, like Zayit (#139)
SeforimLibrary is part of Zayit's open core: add Zayit's CLA (signed once through the CLA Assistant bot), the DCO sign-off check, a CONTRIBUTING guide, and License/Contributing sections in the README. Drop the stale HebMorph entry from .gitmodules, which nothing uses. Signed-off-by: Elie Gambache <elyahou.hadass@gmail.com>
1 parent 4f07145 commit fbb14ac

6 files changed

Lines changed: 257 additions & 3 deletions

File tree

‎.github/workflows/cla.yaml‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CLA
2+
3+
# Every contributor signs CLA.md once, by commenting on a pull request; the signatures are kept on the cla-signatures
4+
# branch (CLA Assistant Lite).
5+
on:
6+
issue_comment:
7+
types: [created]
8+
pull_request_target:
9+
types: [opened, closed, synchronize]
10+
11+
permissions:
12+
actions: write
13+
contents: write
14+
pull-requests: write
15+
statuses: write
16+
17+
jobs:
18+
cla:
19+
name: Check CLA signature
20+
runs-on: ubuntu-latest
21+
steps:
22+
- if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
23+
uses: contributor-assistant/github-action@v2.6.1
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
with:
27+
path-to-document: https://github.com/kdroidFilter/SeforimLibrary/blob/master/CLA.md
28+
path-to-signatures: signatures/version1/cla.json
29+
branch: cla-signatures
30+
allowlist: kdroidFilter,dependabot[bot],github-actions[bot]

‎.github/workflows/dco.yaml‎

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: DCO
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
jobs:
8+
dco-check:
9+
name: Check DCO sign-off
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Verify Signed-off-by on all PR commits
13+
uses: actions/github-script@v7
14+
with:
15+
script: |
16+
const { owner, repo } = context.repo;
17+
const prNumber = context.payload.pull_request.number;
18+
19+
const commits = await github.paginate(
20+
github.rest.pulls.listCommits,
21+
{ owner, repo, pull_number: prNumber, per_page: 100 }
22+
);
23+
24+
const signOffRegex = /^Signed-off-by: .+ <.+@.+>$/m;
25+
const failures = [];
26+
27+
for (const c of commits) {
28+
const message = c.commit.message || "";
29+
if (!signOffRegex.test(message)) {
30+
failures.push(`${c.sha.substring(0, 7)} — ${message.split("\n")[0]}`);
31+
}
32+
}
33+
34+
if (failures.length > 0) {
35+
core.setFailed(
36+
"The following commits are missing a 'Signed-off-by' line " +
37+
"(see CONTRIBUTING.md, use `git commit -s`):\n\n" +
38+
failures.map((f) => ` - ${f}`).join("\n")
39+
);
40+
} else {
41+
core.info(`All ${commits.length} commit(s) are signed off.`);
42+
}

‎.gitmodules‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
[submodule "HebMorph"]
2-
path = HebMorph
3-
url = https://github.com/kdroidFilter/HebMorph.git
41
[submodule "SeforimMagicIndexer"]
52
path = SeforimMagicIndexer
63
url = https://github.com/kdroidFilter/SeforimMagicIndexer

‎CLA.md‎

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Zayit Individual Contributor License Agreement
2+
3+
Version 1.0
4+
5+
Thank you for contributing to Zayit (the "Project"), maintained by Elie Gambache (the "Maintainer"). The Project
6+
includes this repository, SeforimLibrary, and the other repositories of Zayit. This Contributor
7+
License Agreement ("Agreement") states the terms under which you ("You") contribute to the Project. It does not
8+
transfer your copyright: You keep it, and You may use your Contributions for any other purpose.
9+
10+
Sign it once by commenting on your first pull request as the CLA bot asks; it then covers all your Contributions.
11+
12+
## 1. Definitions
13+
14+
- **"Contribution"**: any original work of authorship, including code, documentation, translations and data, and any
15+
modification of the Project, that You submit to the Project in any form (pull request, patch, issue, email...).
16+
- **"Submit"**: any form of electronic, verbal or written communication sent to the Project or the Maintainer for
17+
inclusion in the Project.
18+
19+
## 2. Copyright license
20+
21+
You grant the Maintainer, and any recipient of software distributed by the Maintainer, a perpetual, worldwide,
22+
non-exclusive, no-charge, royalty-free, irrevocable license to reproduce, prepare derivative works of, publicly
23+
display, publicly perform, sublicense and distribute your Contributions and such derivative works, **under any license
24+
terms, including proprietary terms**, in addition to the GNU AGPL v3 (with its §7(b) attribution term) under which the
25+
Project is published.
26+
27+
This lets the Maintainer distribute the Project's official builds together with proprietary modules (see "Open core"
28+
in [Zayit's README](https://github.com/kdroidFilter/Zayit#open-core)) and change the Project's license in the future.
29+
30+
## 3. Patent license
31+
32+
You grant the Maintainer, and any recipient of software distributed by the Maintainer, a perpetual, worldwide,
33+
non-exclusive, no-charge, royalty-free, irrevocable patent license to make, have made, use, offer to sell, sell,
34+
import and otherwise transfer your Contributions, where such license applies only to the patent claims licensable by
35+
You that are necessarily infringed by your Contribution alone or by its combination with the Project.
36+
37+
## 4. Your representations
38+
39+
You represent that:
40+
41+
- each Contribution is your original creation, or You have the right to Submit it under this Agreement (and You
42+
identify in it any third-party work and its license);
43+
- if your employer has rights to intellectual property You create, You have received permission to make the
44+
Contribution on its behalf, or your employer has waived such rights;
45+
- to your knowledge, your Contribution does not infringe any third party's rights.
46+
47+
## 5. The Project's commitment
48+
49+
The Maintainer will keep publishing the Project's core under an open source license. Your Contribution may be part of
50+
the official builds, which can include proprietary modules.
51+
52+
## 6. No warranty
53+
54+
Unless required by applicable law or agreed in writing, You provide your Contributions "AS IS", without warranties or
55+
conditions of any kind. You are not expected to provide support for your Contributions.
56+
57+
## 7. Notice
58+
59+
You agree to notify the Maintainer of any facts or circumstances of which You become aware that would make these
60+
representations inaccurate in any respect.

‎CONTRIBUTING.md‎

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
# Contributing to SeforimLibrary
2+
3+
Thanks for your interest in contributing! SeforimLibrary is part of
4+
[Zayit](https://github.com/kdroidFilter/Zayit) and follows the same rules, which
5+
keep the project clean and legally clear.
6+
7+
## License of your contributions (inbound = outbound)
8+
9+
SeforimLibrary, like Zayit, is licensed under the **GNU AGPL v3** together with the **additional
10+
attribution term** under Section 7(b) of that license (the "Powered by the
11+
technologies that drive Zayit — https://zayitapp.com/" requirement). See
12+
[`LICENSE`](LICENSE) for the full text.
13+
14+
By submitting a contribution (pull request, patch, or any other form), you agree
15+
that your contribution is licensed under the same terms as the project, namely
16+
the GNU AGPL v3 **and** the additional attribution term under Section 7(b), and
17+
under the Contributor License Agreement below.
18+
19+
## Contributor License Agreement (CLA)
20+
21+
Zayit is **open core** (see "Open core" in
22+
[Zayit's README](https://github.com/kdroidFilter/Zayit#open-core)): its core,
23+
SeforimLibrary included, is free under the AGPL v3, and its official builds also
24+
include proprietary modules, such as the smart siddur. So that your contribution can be part of those builds,
25+
you sign the [Zayit Contributor License Agreement](CLA.md) once:
26+
27+
- You **keep the copyright** on your contribution — there is no copyright
28+
assignment.
29+
- You grant the maintainer a broad license on it, which allows distributing it
30+
under other terms too (including with proprietary modules), and a patent
31+
license.
32+
33+
On your first pull request, the CLA bot asks you to sign by commenting:
34+
35+
```
36+
I have read the CLA Document and I hereby sign the CLA
37+
```
38+
39+
Your signature covers all your later pull requests. A CI check blocks a pull
40+
request until all its authors have signed.
41+
42+
## Developer Certificate of Origin (DCO)
43+
44+
Every commit must also be signed off under the
45+
[Developer Certificate of Origin 1.1](https://developercertificate.org/). By
46+
signing off, you certify that you wrote the code or otherwise have the right to
47+
submit it under the project's license.
48+
49+
Add a sign-off line to each commit:
50+
51+
```
52+
Signed-off-by: Your Name <your.email@example.com>
53+
```
54+
55+
The easy way is to use the `-s` flag:
56+
57+
```bash
58+
git commit -s -m "Your message"
59+
```
60+
61+
To sign off the last commit you forgot to sign:
62+
63+
```bash
64+
git commit --amend -s --no-edit
65+
```
66+
67+
A CI check enforces that every commit in a pull request is signed off.
68+
69+
<details>
70+
<summary>Full text of the Developer Certificate of Origin 1.1</summary>
71+
72+
```
73+
Developer Certificate of Origin
74+
Version 1.1
75+
76+
By making a contribution to this project, I certify that:
77+
78+
(a) The contribution was created in whole or in part by me and I
79+
have the right to submit it under the open source license
80+
indicated in the file; or
81+
82+
(b) The contribution is based upon previous work that, to the best
83+
of my knowledge, is covered under an appropriate open source
84+
license and I have the right under that license to submit that
85+
work with modifications, whether created in whole or in part
86+
by me, under the same open source license (unless I am
87+
permitted to submit under a different license), as indicated
88+
in the file; or
89+
90+
(c) The contribution was provided directly to me by some other
91+
person who certified (a), (b) or (c) and I have not modified
92+
it.
93+
94+
(d) I understand and agree that this project and the contribution
95+
are public and that a record of the contribution (including all
96+
personal information I submit with it, including my sign-off) is
97+
maintained indefinitely and may be redistributed consistent with
98+
this project or the open source license(s) involved.
99+
```
100+
101+
</details>
102+
103+
## Code style
104+
105+
- Comments in code must be written in English.
106+
- Kotlin code must follow Kotlin conventions and idiomatic style.
107+
- Run the tests before opening a PR:
108+
109+
```bash
110+
./gradlew test
111+
```

‎README.MD‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,3 +155,17 @@ Outputs (by default): `build/seforim.db` + `build/catalog.pb`
155155

156156
- **sefariasqlite**: Sefaria direct importer
157157
- `SefariaDirectImporter` / `GenerateSefariaSqlite`: Sefaria export → SQLite
158+
159+
## Contributing
160+
161+
Please read [`CONTRIBUTING.md`](CONTRIBUTING.md) first. In short: contributions are licensed under the same terms as the project (AGPL v3 + the §7b attribution term), you keep your copyright, you sign the [CLA](CLA.md) once (the bot asks on your first pull request), and every commit must be signed off (`git commit -s`, DCO).
162+
163+
## License
164+
165+
SeforimLibrary is part of [Zayit](https://github.com/kdroidFilter/Zayit) and is published under the **[AGPL v3](LICENSE)**, with an additional attribution term (AGPL v3, §7b): any use, reproduction, modification, or distribution of this software, or of any work derived from it, must conspicuously display:
166+
167+
> Powered by the technologies that drive Zayit — https://zayitapp.com/
168+
169+
See the top of [`LICENSE`](LICENSE) for the full text.
170+
171+
Like Zayit, it is **open core**: the [CLA](CLA.md) also lets the maintainer distribute contributions under other terms, including in Zayit's official builds with their proprietary modules (see "Open core" in [Zayit's README](https://github.com/kdroidFilter/Zayit#open-core)).

0 commit comments

Comments
 (0)