Skip to content

Commit e2fc074

Browse files
authored
fix(license): restore the MIT disclaimer, credit third-party components, ship the file (#1437)
## Description Yes, it needed updating, on three counts. **1. The MIT text was incomplete.** The final paragraph was missing, so the grant carried no warranty disclaimer and no limitation of liability. The all-caps block further down belongs to ExecuTorch's BSD notice and is scoped to ExecuTorch. Restored the standard paragraph. **2. The third-party list predates the rewrite.** It has not been touched since #506. Only ExecuTorch is credited, but shipped binaries also link: | Component | License | Where | | --- | --- | --- | | pffft / FFTPACK | BSD 3-Clause | `legacy/cpp/pfft`, compiled on both platforms | | OpenCV 4.11 | Apache-2.0 | vision pipelines, multimodal LLMs | | KleidiCV | Apache-2.0 | OpenCV Arm HAL, Android | | ada | MIT | `legacy/cpp/ada` | | phonemis | MIT | text-to-speech frontend | | MLX | MIT | MLX backend, iOS | pffft and the Apache-2.0 components require the notice to be reproduced in binary redistributions, which is what an app built on this library is. Every license identifier and copyright line above was taken from the upstream source, not inferred. **3. No published package shipped a license at all.** npm only packs a `LICENSE` that sits in the package directory, and ours lives at the repo root, so every tarball went out with `"license": "MIT"` in the manifest and no license text. Verified with `npm pack --dry-run`: 0 matches before, `21.8kB LICENSE` after. `create-package.sh` now copies it in for the pack and removes it again; the three satellite packages get their own plain MIT copy. Left the copyright year at 2024, which is the year of first publication and does not need bumping. The third-party section is a judgment call about what has to be credited, so it is worth a second opinion before merging. ### Introduces a breaking change? - [ ] Yes - [x] No ### Type of change - [x] Bug fix (change which fixes an issue) - [ ] New feature (change which adds functionality) - [ ] Documentation update (improves or adds clarity to existing documentation) - [ ] Other (chores, tests, code style improvements etc.) ### Tested on - [ ] iOS - [ ] Android ### Testing instructions ``` cd packages/react-native-executorch cp ../../LICENSE LICENSE && npm pack --dry-run --ignore-scripts | grep LICENSE && rm LICENSE ``` ### Checklist - [x] I have performed a self-review of my code - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have updated the documentation accordingly - [x] My changes generate no new warnings
1 parent 290ba93 commit e2fc074

6 files changed

Lines changed: 453 additions & 3 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,6 @@ Makefile
112112
.claude
113113
skills-lock.json
114114

115+
116+
# copied in by scripts/create-package.sh so npm packs it, removed again after
117+
packages/react-native-executorch/LICENSE

LICENSE

Lines changed: 376 additions & 1 deletion
Large diffs are not rendered by default.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Software Mansion
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Software Mansion
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Software Mansion
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

packages/react-native-executorch/scripts/create-package.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,19 @@ git -C "$(git rev-parse --show-toplevel)" submodule update --init --recursive \
1717
# `!scripts/build*` which npm-packlist honors and re-includes those files
1818
# despite our exclusion rules. Restore on exit so the working tree stays clean.
1919
PHONEMIS_DIR="third-party/common/phonemis"
20-
restore_phonemis() {
20+
21+
# npm only picks up a LICENSE that sits in the package directory, and ours
22+
# lives at the repo root, so the published tarball carried no license text at
23+
# all. Several of the notices it now reproduces (ExecuTorch, pffft, OpenCV)
24+
# require that in a redistribution. Copy it in for the pack and drop it again
25+
# so the working tree stays clean.
26+
cp "$(git rev-parse --show-toplevel)/LICENSE" LICENSE
27+
28+
cleanup() {
2129
git -C "$PHONEMIS_DIR" checkout -- data test scripts requirements.txt 2>/dev/null || true
30+
rm -f LICENSE
2231
}
23-
trap restore_phonemis EXIT
32+
trap cleanup EXIT
2433
rm -rf "$PHONEMIS_DIR/data" "$PHONEMIS_DIR/test" "$PHONEMIS_DIR/scripts"
2534
rm -f "$PHONEMIS_DIR/requirements.txt"
2635

0 commit comments

Comments
 (0)