commit 579bc2897077119e38a7e1493bca6ec97a06a36a
parent b126c75ae8da6f2cb1d1ad6396bfc456bdba58ba
Author: parona <parona@protonmail.com>
Date: Wed, 24 Sep 2025 15:46:31 +0000
Avoid invalidating vendored crates
Firefox uses crates hosted on their own infrastructure with Firefox
names. Renaming that branding will invalidate the vendored crates.
So this change will try stop all of that in as minimal a way as possible,
unfortunately this still requires fine tuning firefox-on-glean /
icecat-on-glean as it's used in places outside of the obvious rust context.
Modified-by: Mark H Weaver <mhw@netris.org>
Signed-off-by: Mark H Weaver <mhw@netris.org>
Diffstat:
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/makeicecat b/makeicecat
@@ -623,7 +623,7 @@ apply_batch_branding()
{
find . -depth | grep -i fennec |
rename_files -e s/fennec/icecatmobile/g -e s/Fennec/IceCatMobile/g
- find . -depth | grep -i firefox |
+ find . -depth -not -iregex '.*/third_party/rust/.*' | grep -i firefox |
rename_files -e s/org.mozilla.firefox/org.gnu.icecat/g -e s/firefox/icecat/g -e s/Firefox/IceCat/g
echo "Running batch rebranding (this will take a while)"
@@ -664,7 +664,8 @@ s|https://www\\.mozilla\\.org/icecat/?utm_source=synceol|https://www.mozilla.org
s|www\\.gnu\\.org/software/gnuzilla/icecat-help|libreplanet.org/wiki/Group:IceCat/Help|g;
"
find . -type f -not -iregex '.*changelog.*' -not -iregex '.*copyright.*' \
- -not -iregex '.*third_party/rust.*' \
+ -not -iregex '.*/third_party/rust/.*' -not -name Cargo.lock \
+ -not -iregex '.*/\.cargo/.*' \
-execdir /bin/sed --follow-symlinks -i "${sed_script}" '{}' ';'
find l10n -type f -execdir /bin/sed --follow-symlinks -i "s/from GNU/from Mozilla/g" '{}' ';'
@@ -700,6 +701,11 @@ s/OpenSource/Free Software/g;
cp browser/components/migration/IceCatProfileMigrator.sys.mjs browser/components/migration/FirefoxProfileMigrator.sys.mjs
sed 's/IceCat/Firefox/g; s/icecat/firefox/g' -i browser/components/migration/FirefoxProfileMigrator.sys.mjs
+ # Don't mangle crate urls. This invalidates Cargo.lock and causes problems for fetching crates
+ find . -name Cargo.toml | xargs /bin/sed 's|github.com/IceCatGraphics|github.com/FirefoxGraphics|' -i
+ # Rename local crate that is used in different places. Otherwise you have to tangle it in moz.build as well.
+ find . -name Cargo.lock | xargs /bin/sed 's|firefox-on-glean|icecat-on-glean|' -i
+
# Sort the list of DevToolsModules, which becomes unsorted by our rebranding
sort_inner_list_in_file "DevToolsModules(" ")" devtools/client/netmonitor/src/connector/moz.build