Relicense Zed source code under GPL (#57948)
## Summary This moves the remaining first-party AGPL surface to GPL, a less restrictive license for these components. Apache-2.0 components are unchanged. Changes: - Updates the `collab` crate from `AGPL-3.0-or-later` to `GPL-3.0-or-later` - Removes the root AGPL license file and first-party crate AGPL symlinks - Updates web, documentation, Flatpak, README, and terms references to reflect the GPL/Apache licensing split - Updates the open-source component example list in the terms and regenerates the RTF copy; no other terms changes are intended - Adds guardrails so first-party crates cannot declare AGPL licensing or carry `LICENSE-AGPL` files Release timing: preview during the week of June 1, 2026; stable during the week of June 8, 2026. ## Residual AGPL/Affero references - `LICENSE-GPL`: GPLv3's own compatibility clause; unchanged official license text. - `crates/json_schema_store/src/schemas/package.json`: generic npm package-license schema value, not Zed licensing. - `script/check-licenses`, `script/new-crate`, `script/licenses/zed-licenses.toml`: guardrails that reject or warn against reintroducing AGPL. ## Verification - `script/check-licenses` - `script/generate-licenses` - `script/generate-terms-rtf` - `script/new-crate license_probe_for_gpl`, then discarded generated crate - `script/new-crate license_probe_for_agpl agpl` fails as expected - `mdbook build docs` - `./script/clippy` - `git grep -n -I -E "AGPL|Affero"` - `git diff --check` Release Notes: - The `collab` crate, used to implement Zed's collaboration backend, is now licensed under the GPL instead of the AGPL. The AGPL license is no longer used in the zed repository.
This commit is contained in:
1 parent
2bba4e2220
commit
27c566c212
15 files changed
+49
-846
No files matched your search
+35
-37
@@ -2,8 +2,33 @@
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
AGPL_CRATES=("collab")
|
||||
RELEASE_CRATES=("cli" "remote_server" "zed")
|
||||
check_manifest_for_agpl () {
|
||||
local cargo_toml="$1"
|
||||
|
||||
if grep -Eiq '(agpl|affero)' "$cargo_toml"; then
|
||||
echo "Error: $cargo_toml references an AGPL license. First-party crates must use LICENSE-GPL or LICENSE-APACHE."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if grep -Eiq '^[[:space:]]*license-file[[:space:]]*=' "$cargo_toml"; then
|
||||
echo "Error: $cargo_toml uses license-file. First-party crates must declare LICENSE-GPL or LICENSE-APACHE via the license field and symlink."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
check_no_agpl_license_file () {
|
||||
if [[ -e "LICENSE-AGPL" || -L "LICENSE-AGPL" ]]; then
|
||||
echo "Error: LICENSE-AGPL exists. First-party code must use LICENSE-GPL or LICENSE-APACHE."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
while IFS= read -r -d '' license_file; do
|
||||
if [[ -e "$license_file" || -L "$license_file" ]]; then
|
||||
echo "Error: $license_file exists. First-party crates must use LICENSE-GPL or LICENSE-APACHE."
|
||||
exit 1
|
||||
fi
|
||||
done < <(git ls-files -z -- "*/LICENSE-AGPL")
|
||||
}
|
||||
|
||||
check_symlink_target () {
|
||||
local symlink_path="$1"
|
||||
@@ -32,21 +57,7 @@ check_symlink_target () {
|
||||
|
||||
check_license () {
|
||||
local dir="$1"
|
||||
local allowed_licenses=()
|
||||
|
||||
local is_agpl=false
|
||||
for agpl_crate in "${AGPL_CRATES[@]}"; do
|
||||
if [[ "$dir" == "crates/$agpl_crate" ]]; then
|
||||
is_agpl=true
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ "$is_agpl" == true ]]; then
|
||||
allowed_licenses=("LICENSE-AGPL")
|
||||
else
|
||||
allowed_licenses=("LICENSE-GPL" "LICENSE-APACHE")
|
||||
fi
|
||||
local allowed_licenses=("LICENSE-GPL" "LICENSE-APACHE")
|
||||
|
||||
for license in "${allowed_licenses[@]}"; do
|
||||
if [[ -L "$dir/$license" ]]; then
|
||||
@@ -58,31 +69,18 @@ check_license () {
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ "$is_agpl" == true ]]; then
|
||||
echo "Error: $dir does not contain a LICENSE-AGPL symlink"
|
||||
else
|
||||
echo "Error: $dir does not contain a LICENSE-GPL or LICENSE-APACHE symlink"
|
||||
fi
|
||||
echo "Error: $dir does not contain a LICENSE-GPL or LICENSE-APACHE symlink"
|
||||
exit 1
|
||||
}
|
||||
|
||||
git ls-files "**/*/Cargo.toml" | while read -r cargo_toml; do
|
||||
check_license "$(dirname "$cargo_toml")"
|
||||
done
|
||||
check_no_agpl_license_file
|
||||
|
||||
git ls-files -z -- "Cargo.toml" "**/Cargo.toml" | while IFS= read -r -d '' cargo_toml; do
|
||||
check_manifest_for_agpl "$cargo_toml"
|
||||
|
||||
# Make sure the AGPL server crates are included in the release tarball.
|
||||
for release_crate in "${RELEASE_CRATES[@]}"; do
|
||||
tree_output=$(cargo tree --package "$release_crate")
|
||||
for agpl_crate in "${AGPL_CRATES[@]}"; do
|
||||
# Look for lines that contain the crate name followed by " v" (version)
|
||||
# This matches patterns like "├── collab v0.44.0"
|
||||
if echo "$tree_output" | grep -E "(^|[^a-zA-Z_])${agpl_crate} v" > /dev/null; then
|
||||
echo "Error: crate '${agpl_crate}' is AGPL and is a dependency of crate '${release_crate}'." >&2
|
||||
echo "AGPL licensed code should not be used in the release distribution, only in servers." >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
if [[ "$cargo_toml" == */Cargo.toml ]]; then
|
||||
check_license "$(dirname "$cargo_toml")"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "check-licenses succeeded"
|
||||
@@ -1,16 +1,9 @@
|
||||
no-clearly-defined = true
|
||||
private = { ignore = true }
|
||||
# Licenses allowed in Zed's dependencies. AGPL should not be added to
|
||||
# this list as use of AGPL software is sometimes disallowed. When
|
||||
# adding to this list, please check the following open source license
|
||||
# policies:
|
||||
# Licenses allowed in Zed's dependencies. AGPL should not be added to this list.
|
||||
# When adding to this list, please check the following open source license policies:
|
||||
#
|
||||
# * https://opensource.google/documentation/reference/thirdparty/licenses
|
||||
#
|
||||
# The Zed project does have AGPL crates, but these are only involved
|
||||
# in servers and are not built into the binaries in the release
|
||||
# tarball. `script/check-licenses` checks that AGPL crates are not
|
||||
# involved in release binaries.
|
||||
accepted = [
|
||||
"Apache-2.0",
|
||||
"MIT",
|
||||
|
||||
+3
-3
@@ -18,13 +18,13 @@ fi
|
||||
|
||||
CRATE_NAME="$1"
|
||||
|
||||
LICENSE_FLAG=$(echo "${2}" | tr '[:upper:]' '[:lower:]')
|
||||
LICENSE_FLAG=$(echo "${2:-}" | tr '[:upper:]' '[:lower:]')
|
||||
if [[ "$LICENSE_FLAG" == *"apache"* ]]; then
|
||||
LICENSE_MODE="Apache-2.0"
|
||||
LICENSE_FILE="LICENSE-APACHE"
|
||||
elif [[ "$LICENSE_FLAG" == *"agpl"* ]]; then
|
||||
LICENSE_MODE="AGPL-3.0-or-later"
|
||||
LICENSE_FILE="LICENSE-AGPL"
|
||||
echo "Error: New first-party crates cannot use AGPL. Use GPL or Apache."
|
||||
exit 1
|
||||
else
|
||||
LICENSE_MODE="GPL-3.0-or-later"
|
||||
LICENSE_FILE="LICENSE-GPL"
|
||||
|
||||
@@ -54,7 +54,7 @@ Community Guidelines
|
||||
{\pard \ql \f0 \sa180 \li0 \fi0 Customer will not (and will not permit anyone else to), directly or indirectly, do any of the following: (a) provide access to, distribute, sell, or sublicense the Service to a third party; (b)\u160 ?seek to access non-public APIs associated with the Service; (c) copy any element of the Service; (d) interfere with the operation of the Service, circumvent any access restrictions, or conduct any security or vulnerability test of the Service; (e) transmit any viruses or other harmful materials to the Service or others;\u160 ?(f) take any action that risks harm to others or to the security, availability, or integrity of the Service except for the purposes of legitimate security or malware research; or (g) access or use the Service or Output in a manner that violates any applicable relevant local, state, federal or international laws, regulations, or conventions, including those related to data privacy or data transfer, international communications, or export of data (collectively, \u8220"{\b Laws}\u8221"), or the Terms.\u160 ?The Service incorporates functionality provided by third-party services, the use of which is subject to additional terms. Customer agrees that if Customer accesses or uses services, features or functionality in the Software or Service that are provided by a third party, Customer will comply with any applicable terms promulgated by that third party, including as set forth at {\field{\*\fldinst{HYPERLINK "/acceptable-use-policies"}}{\fldrslt{\ul
|
||||
https://zed.dev/acceptable-use-policies
|
||||
}}}
|
||||
\u160 ?(as may be updated from time to time). Customer further acknowledges that certain components of the Software or Service may be covered by open source licenses ("{\b Open Source Component}"), including but not limited to Apache License, Version 2.0, GNU General Public License v3.0, and the GNU Affero General Public License v3.0.\u160 ?To the extent required by such open source license for the applicable Open Source Component, the terms of such license will apply to such Open Source Component in lieu of the relevant provisions of these Terms. If such open\u160 ?source license prohibits any of the restrictions in these Terms, such restrictions will not apply to such Open Source Component. Zed shall provide Customer with a list of Open Source Components upon Customer's request.\par}
|
||||
\u160 ?(as may be updated from time to time). Customer further acknowledges that certain components of the Software or Service may be covered by open source licenses ("{\b Open Source Component}"), including but not limited to Apache License, Version 2.0 and GNU General Public License v3.0.\u160 ?To the extent required by such open source license for the applicable Open Source Component, the terms of such license will apply to such Open Source Component in lieu of the relevant provisions of these Terms. If such open\u160 ?source license prohibits any of the restrictions in these Terms, such restrictions will not apply to such Open Source Component. Zed shall provide Customer with a list of Open Source Components upon Customer's request.\par}
|
||||
{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 3. General Payment Terms\par}
|
||||
{\pard \ql \f0 \sa180 \li0 \fi0 Accessing certain features and tiers of the Service requires Customer\u160 ?to pay fees. Before Customer pays any fees, Customer will have an opportunity to review and accept the fees that Customer will be charged. Unless otherwise specifically provided for in these Terms, all fees are in U.S. Dollars and are non-refundable, except as required by law.\par}
|
||||
{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel2 \b \fs28 3.1. Price\par}
|
||||
|
||||
Reference in new issue
Block a user