fix(zed): License fetching (#4445) (#4469)

* fix(zed): License macro shouldn't have brackets around it

* fix: Unmacro the command I guess

* fix(zed-nightly): Weird merge bug???



---------


(cherry picked from commit 1af19fdf9d)

Signed-off-by: Gilver <rockgrub@disroot.org>
Signed-off-by: RockGrub <RockGrub@users.noreply.github.com>
This commit is contained in:
Gilver
2025-04-28 10:14:50 -05:00
committed by GitHub
parent 077665765d
commit 5d2e86e43e
3 changed files with 42 additions and 51 deletions
+14 -17
View File
@@ -13,24 +13,9 @@
%global rustflags_debuginfo 0
# Zed needs a special approach to fetch the dep licenses
%global zed_license_online %{shrink: \
%{__cargo} tree \
-Z avoid-dev-deps \
--workspace \
--edges no-build,no-dev,no-proc-macro \
--target all \
%{__cargo_parse_opts %{-n} %{-a} %{-f:-f%{-f*}}} \
--prefix none \
--format "{l}: {p}" \
| sed -e "s: ($(pwd)[^)]*)::g" -e "s: / :/:g" -e "/\/.*:/{s/\// OR /}" \
| sed -e '/.*(\*).*/d' -e '/^: pet/ s/./MIT&/' \
| sort -u \
}\
Name: zed-nightly
Version: %ver^%commit_date.%shortcommit
Release: 1%?dist
Release: 2%?dist
Summary: Zed is a high-performance, multiplayer code editor
SourceLicense: AGPL-3.0-only AND Apache-2.0 AND GPL-3.0-or-later
License: ((Apache-2.0 OR MIT) AND BSD-3-Clause) AND ((MIT OR Apache-2.0) AND Unicode-3.0) AND (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 AND ISC) AND AGPL.3.0-only AND AGPL-3.0-or-later AND (Apache-2.0 OR BSL-1.0 OR MIT) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR ISC OR MIT) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception) AND Apache-2.0 AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR MIT OR Apache-2.0) AND BSD-2-Clause AND (CC0-1.0 OR Apache-2.0 OR Apache-2.0 WITH LLVM-exception) AND (CC0-1.0 OR Apache-2.0) AND (CC0-1.0 OR MIT-0 OR Apache-2.0) AND CC0-1.0 AND GPL-3.0-or-later AND (ISC AND (Apache-2.0 OR ISC) AND OpenSSL) AND (ISC AND (Apache-2.0 OR ISC)) AND ISC AND (MIT AND (MIT OR Apache-2.0)) AND (MIT AND BSD-3-Clause) AND (MIT OR Apache-2.0 OR CC0-1.0) AND (MIT OR Apache-2.0 OR NCSA) AND (MIT OR Apache-2.0 OR Zlib) AND (MIT OR Apache-2.0) AND (MIT OR Zlib OR Apache-2.0) AND MIT AND MPL-2.0 AND Unicode-3.0 AND (Unlicense OR MIT) AND (Zlib OR Apache-2.0 OR MIT) AND Zlib
@@ -104,7 +89,19 @@ install -Dm644 crates/zed/resources/app-icon-nightly.png %{buildroot}%{_datadir}
install -Dm644 %app_id.metainfo.xml %{buildroot}%{_metainfodir}/%app_id.metainfo.xml
# The license generation script doesn't generate licenses for ALL compiled dependencies, just direct deps of Zed, and it does not "group" licenses
%{zed_license_online} > LICENSE.dependencies
# Zed also needs a special approach to fetch the dep licenses
%{__cargo} tree \
-Z avoid-dev-deps \
--workspace \
--edges no-build,no-dev,no-proc-macro \
--target all \
%{__cargo_parse_opts %{-n} %{-a} %{-f:-f%{-f*}}} \
--prefix none \
--format "{l}: {p}" \
| sed -e "s: ($(pwd)[^)]*)::g" -e "s: / :/:g" -e "/\/.*:/{s/\// OR /}" \
| sed -e '/.*(\*).*/d' -e '/^: pet/ s/./MIT&/' \
| sort -u \
> LICENSE.dependencies
mv assets/icons/LICENSES LICENSE.icons
mv assets/themes/LICENSES LICENSE.themes
mv assets/fonts/plex-mono/license.txt LICENSE.fonts
+13 -16
View File
@@ -9,21 +9,6 @@
%global rustflags_debuginfo 0
# Zed needs a special approach to fetch the dep licenses
%global zed_license_online %{shrink: \
%{__cargo} tree \
-Z avoid-dev-deps \
--workspace \
--edges no-build,no-dev,no-proc-macro \
--target all \
%{__cargo_parse_opts %{-n} %{-a} %{-f:-f%{-f*}}} \
--prefix none \
--format "{l}: {p}" \
| sed -e "s: ($(pwd)[^)]*)::g" -e "s: / :/:g" -e "/\/.*:/{s/\// OR /}" \
| sed -e '/.*(\*).*/d' -e '/^: pet/ s/./MIT&/' \
| sort -u \
}\
Name: zed-preview
Version: %(echo %ver | sed 's/-/~/')
Release: pre2%?dist
@@ -100,7 +85,19 @@ install -Dm644 crates/zed/resources/app-icon-preview.png %{buildroot}%{_datadir}
install -Dm644 %app_id.metainfo.xml %{buildroot}%{_metainfodir}/%app_id.metainfo.xml
# The license generation script doesn't generate licenses for ALL compiled dependencies, just direct deps of Zed, and it does not "group" licenses
%{zed_license_online} > LICENSE.dependencies
# Zed also needs a special approach to fetch the dep licenses
%{__cargo} tree \
-Z avoid-dev-deps \
--workspace \
--edges no-build,no-dev,no-proc-macro \
--target all \
%{__cargo_parse_opts %{-n} %{-a} %{-f:-f%{-f*}}} \
--prefix none \
--format "{l}: {p}" \
| sed -e "s: ($(pwd)[^)]*)::g" -e "s: / :/:g" -e "/\/.*:/{s/\// OR /}" \
| sed -e '/.*(\*).*/d' -e '/^: pet/ s/./MIT&/' \
| sort -u \
> LICENSE.dependencies
mv assets/icons/LICENSES LICENSE.icons
mv assets/themes/LICENSES LICENSE.themes
mv assets/fonts/plex-mono/license.txt LICENSE.fonts
+15 -18
View File
@@ -8,24 +8,9 @@
%global rustflags_debuginfo 0
# Zed needs a special approach to fetch the dep licenses
%global zed_license_online %{shrink: \
%{__cargo} tree \
-Z avoid-dev-deps \
--workspace \
--edges no-build,no-dev,no-proc-macro \
--target all \
%{__cargo_parse_opts %{-n} %{-a} %{-f:-f%{-f*}}} \
--prefix none \
--format "{l}: {p}" \
| sed -e "s: ($(pwd)[^)]*)::g" -e "s: / :/:g" -e "/\/.*:/{s/\// OR /}" \
| sed -e '/.*(\*).*/d' -e '/^: pet/ s/./MIT&/' \
| sort -u \
}\
Name: zed
Version: 0.182.11
Release: 1%?dist
Version: 0.183.11
Release: 2%?dist
Summary: Zed is a high-performance, multiplayer code editor
SourceLicense: AGPL-3.0-only AND Apache-2.0 AND GPL-3.0-or-later
License: ((Apache-2.0 OR MIT) AND BSD-3-Clause) AND ((MIT OR Apache-2.0) AND Unicode-3.0) AND (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 AND ISC) AND AGPL.3.0-only AND AGPL-3.0-or-later AND (Apache-2.0 OR BSL-1.0 OR MIT) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR ISC OR MIT) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception) AND Apache-2.0 AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR MIT OR Apache-2.0) AND BSD-2-Clause AND (CC0-1.0 OR Apache-2.0 OR Apache-2.0 WITH LLVM-exception) AND (CC0-1.0 OR Apache-2.0) AND (CC0-1.0 OR MIT-0 OR Apache-2.0) AND CC0-1.0 AND GPL-3.0-or-later AND (ISC AND (Apache-2.0 OR ISC) AND OpenSSL) AND (ISC AND (Apache-2.0 OR ISC)) AND ISC AND (MIT AND (MIT OR Apache-2.0)) AND (MIT AND BSD-3-Clause) AND (MIT OR Apache-2.0 OR CC0-1.0) AND (MIT OR Apache-2.0 OR NCSA) AND (MIT OR Apache-2.0 OR Zlib) AND (MIT OR Apache-2.0) AND (MIT OR Zlib OR Apache-2.0) AND MIT AND MPL-2.0 AND Unicode-3.0 AND (Unlicense OR MIT) AND (Zlib OR Apache-2.0 OR MIT) AND Zlib
@@ -100,7 +85,19 @@ install -Dm644 crates/zed/resources/app-icon.png %{buildroot}%{_datadir}/pixmaps
install -Dm644 %app_id.metainfo.xml %{buildroot}%{_metainfodir}/%app_id.metainfo.xml
# The license generation script doesn't generate licenses for ALL compiled dependencies, just direct deps of Zed, and it does not "group" licenses
%{zed_license_online} > LICENSE.dependencies
# Zed also needs a special approach to fetch the dep licenses
%{__cargo} tree \
-Z avoid-dev-deps \
--workspace \
--edges no-build,no-dev,no-proc-macro \
--target all \
%{__cargo_parse_opts %{-n} %{-a} %{-f:-f%{-f*}}} \
--prefix none \
--format "{l}: {p}" \
| sed -e "s: ($(pwd)[^)]*)::g" -e "s: / :/:g" -e "/\/.*:/{s/\// OR /}" \
| sed -e '/.*(\*).*/d' -e '/^: pet/ s/./MIT&/' \
| sort -u \
> LICENSE.dependencies
mv assets/icons/LICENSES LICENSE.icons
mv assets/themes/LICENSES LICENSE.themes
mv assets/fonts/plex-mono/license.txt LICENSE.fonts