[tbb-commits] [Git][tpo/applications/tor-browser-build][main] Bug 40860: Improve the transition from the old fontconfig file to the new one

Pier Angelo Vendrame (@pierov) git at gitlab.torproject.org
Mon May 22 08:34:50 UTC 2023



Pier Angelo Vendrame pushed to branch main at The Tor Project / Applications / tor-browser-build


Commits:
c78f6080 by Pier Angelo Vendrame at 2023-05-17T19:15:20+02:00
Bug 40860: Improve the transition from the old fontconfig file to the new one

- - - - -


2 changed files:

- projects/browser/RelativeLink/start-browser
- projects/browser/build


Changes:

=====================================
projects/browser/RelativeLink/start-browser
=====================================
@@ -340,6 +340,15 @@ setControlPortPasswd ${TOR_CONTROL_PASSWD:='"secret"'}
 # Set up custom bundled fonts. See fonts-conf(5).
 export FONTCONFIG_PATH="${HOME}/fontconfig"
 export FONTCONFIG_FILE="fonts.conf"
+[% # tor-browser#41776: We cannot make the updater remove this file.
+   # So, let's remove it on this script, since we know that at this point the
+   # browser will not need it anymore.
+   # Remove once we do a watershed release.
+ -%]
+[% IF c("var/tor-browser") -%]
+# Old fontconfig directory, not needed anymore
+rm -Rf "${HOME}/TorBrowser/Data/fontconfig"
+[% END -%]
 
 # Avoid overwriting user's dconf values. Fixes #27903.
 export GSETTINGS_BACKEND=memory


=====================================
projects/browser/build
=====================================
@@ -222,6 +222,15 @@ for tbdir in "${TBDIRS[@]}"
 do
   [% IF c("var/linux") -%]
     mv Bundle-Data/linux/Data/fontconfig "$tbdir/"
+    [% IF c("var/tor-browser") -%]
+      # tor-browser#41776: We cannot remove the old fontconfig file with the
+      # updater. So, let's keep it for the mar generation, but remove it from
+      # new packages.
+      # Remove once we do a watershed release.
+      oldfontconfig="$tbdir/TorBrowser/Data/fontconfig"
+      mkdir -p $oldfontconfig
+      cp "$tbdir/fontconfig/fonts.conf" "$oldfontconfig/"
+    [% END -%]
   [% END -%]
 
   mkdir -p "$tbdir/$DOCSPATH"
@@ -357,6 +366,12 @@ cd $distdir
 [% END -%]
 
 [% IF c("var/linux") %]
+  [% IF c("var/tor-browser") %]
+    # We need the old fontconfig files only when updating from old installations
+    # that include it, but do not add it to new packages!
+    # Remove once we do a watershed release.
+    rm -rf "$TBDIR/TorBrowser/Data/fontconfig"
+  [% END -%]
   [% c('tar', {
         tar_src => [ '$PKG_DIR' ],
         tar_args => '-cJf $OUTDIR/' _ c("var/project-name") _ '-' _ c("var/mar_osname") _ '-' _ c("var/torbrowser_version") _ '_${PKG_LOCALE}.tar.xz',



View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/c78f6080f9e50e929197920938ca2efc004da4d2

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/c78f6080f9e50e929197920938ca2efc004da4d2
You're receiving this email because of your account on gitlab.torproject.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tbb-commits/attachments/20230522/4ae7c134/attachment-0001.htm>


More information about the tbb-commits mailing list