Thursday, December 08, 2022

UPDATE: Tor Browser 12.0 for 7.2-stable

And here is the diff for 7.2-stable. It's a big diff but it's
more or less the same as -current.

Caspar


Index: meta/tor-browser/Makefile
===================================================================
RCS file: /cvs/ports/meta/tor-browser/Makefile,v
retrieving revision 1.59.2.3
diff -u -p -r1.59.2.3 Makefile
--- meta/tor-browser/Makefile 24 Nov 2022 16:38:44 -0000 1.59.2.3
+++ meta/tor-browser/Makefile 8 Dec 2022 17:29:57 -0000
@@ -2,11 +2,11 @@ COMMENT= Tor Browser meta package

MAINTAINER= Caspar Schutijser <caspar@schutijser.com>

-PKGNAME= tor-browser-11.5.8
+PKGNAME= tor-browser-12.0
ONLY_FOR_ARCHS = amd64

-RUN_DEPENDS= www/tor-browser/browser>=11.5.8 \
- www/tor-browser/noscript>=11.4.12 \
+RUN_DEPENDS= www/tor-browser/browser>=12.0 \
+ www/tor-browser/noscript>=11.4.13 \
net/tor>=0.4.7.11

.include <bsd.port.mk>
Index: www/tor-browser/Makefile.inc
===================================================================
RCS file: /cvs/ports/www/tor-browser/Makefile.inc,v
retrieving revision 1.57.2.3
diff -u -p -r1.57.2.3 Makefile.inc
--- www/tor-browser/Makefile.inc 24 Nov 2022 16:38:44 -0000 1.57.2.3
+++ www/tor-browser/Makefile.inc 8 Dec 2022 17:29:57 -0000
@@ -3,8 +3,11 @@ HOMEPAGE ?= https://www.torproject.org
PERMIT_PACKAGE ?= Yes
CATEGORIES = www
BROWSER_NAME = tor-browser
-TB_VERSION = 11.5.8
+TB_VERSION = 12.0
TB_PREFIX = tb
+
+# keep meta/tor-browser in sync
+ONLY_FOR_ARCHS ?= amd64

SUBST_VARS += BROWSER_NAME TB_VERSION

Index: www/tor-browser/browser/Makefile
===================================================================
RCS file: /cvs/ports/www/tor-browser/browser/Makefile,v
retrieving revision 1.88.2.4
diff -u -p -r1.88.2.4 Makefile
--- www/tor-browser/browser/Makefile 24 Nov 2022 16:38:44 -0000 1.88.2.4
+++ www/tor-browser/browser/Makefile 8 Dec 2022 17:29:57 -0000
@@ -3,29 +3,26 @@
# Makefile when editing this one (ESR versions not always the same).

COMMENT = modified version of Firefox ESR for browsing over Tor
-ONLY_FOR_ARCHS = amd64

MOZILLA_VERSION = ${TB_VERSION}
MOZILLA_PROJECT = ${BROWSER_NAME}
MOZILLA_CODENAME = browser
-TL_VERSION = 0.2.37

EXTRACT_SUFX = .tar.xz
PATCHORIG = .pat.orig

-PKGNAME = ${TB_PREFIX}-browser-${TB_VERSION}
-DISTNAME = src-firefox-tor-browser-91.13.0esr-11.5-1-build8
+PKGNAME = ${TB_PREFIX}-browser-${TB_VERSION:S/a/alpha/}
+DISTNAME = src-firefox-tor-browser-102.5.0esr-12.0-2-build1

FIX_EXTRACT_PERMISSIONS = Yes
DISTFILES += ${DISTNAME}.tar.xz \
- src-tor-launcher-${TL_VERSION}.tar.xz \
- tor-browser-linux64-${TB_VERSION}_en-US.tar.xz
+ tor-browser-linux64-${TB_VERSION}_ALL.tar.xz

-SO_VERSION = 7.0
+SO_VERSION = 8.0
MOZILLA_LIBS = xul clearkey lgpllibs mozavcodec mozavutil mozgtk
MOZILLA_LIBS += freebl3 nss3 nssckbi
MOZILLA_LIBS += nssutil3 smime3 softokn3 ssl3
-MOZILLA_LIBS += nspr4 mozsqlite3 plc4 plds4
+MOZILLA_LIBS += nspr4 mozsqlite3 plc4 plds4 ipcclientcerts

# mozilla public license for the browser
PERMIT_PACKAGE= Yes
@@ -38,7 +35,6 @@ MODULES = www/mozilla lang/python
MODPY_RUNDEP = No

COMPILER = ports-clang
-MODCLANG_ARCHS = amd64 i386

# tor-browser needs built-in nss, sqlite
MOZILLA_USE_BUNDLED_NSPR = Yes
@@ -46,14 +42,16 @@ MOZILLA_USE_BUNDLED_NSS = Yes
# 63 requires node because why not #1483595
BUILD_DEPENDS += lang/node
# 63 requires cbindgen #1478813
-BUILD_DEPENDS += devel/cbindgen>=0.19.0
-#1670807
-BUILD_DEPENDS += devel/m4
+BUILD_DEPENDS += devel/cbindgen>=0.23.0
+# wasi
+BUILD_DEPENDS += lang/wasi-sdk/compiler-rt \
+ lang/wasi-sdk/libcxxabi \
+ lang/wasi-sdk/libcxx \
+ lang/wasi-libc

# uses pledge()
-# Extra: Xcomposite.4 Xdamage.4 Xfixes.6 gdk-x11-2.0.2400 gtk-x11-2.0.2400
-WANTLIB += X11-xcb Xt gthread-2.0 harfbuzz intl pangoft2-1.0
-WANTLIB += xcb xcb-shm ${COMPILER_LIBCXX}
+# Extra: Xcomposite.4 Xcursor.5 Xdamage.4 Xfixes.6 Xi.12 Xrender.6
+WANTLIB += Xrandr

# Regression tests are too hard to adapt to run here
NO_TEST = Yes
@@ -64,7 +62,6 @@ CONFIGURE_STYLE = simple
CONFIGURE_SCRIPT = ${MODPY_BIN} ${WRKSRC}/configure.py
CONFIGURE_ARGS += --prefix=${PREFIX}
MAKE_ENV += BUILD_VERBOSE_LOG="1" CARGOFLAGS="-j${MAKE_JOBS}"
-CONFIGURE_ENV += M4=/usr/local/bin/gm4

# app-name etc. for tor-browser
CONFIGURE_ARGS += --with-app-name=${BROWSER_NAME} \
@@ -77,26 +74,23 @@ MAKE_ENV += BUILD_OPT=1 \
NSS_ENABLE_ECC=1 \
XCFLAGS="-I${LOCALBASE}/include ${CFLAGS}"

-RUN_DEPENDS += net/tor>=0.4.7.10
+RUN_DEPENDS += net/tor>=0.4.7.11

CONFIGURE_ARGS += --enable-release #1386371
CONFIGURE_ARGS += --enable-sandbox
CONFIGURE_ARGS += --enable-forkserver
+CONFIGURE_ARGS += --with-wasi-sysroot=${LOCALBASE}/share/wasi-sysroot
CONFIGURE_ARGS += --enable-lto=thin
CONFIGURE_ARGS += --with-libclang-path=${LOCALBASE}/lib
-# remove post 96
-CONFIGURE_ARGS += --disable-necko-wifi

-# XXX badly formed debug in libxul ?
+# XXX badly formed debug
DWZ = :
#DEBUG_PACKAGES = ${BUILD_PACKAGES}
DEBUG_CONFIGURE_ARGS += --enable-debug-symbols \
--disable-install-strip

post-extract:
- mv ${WRKDIR}/tor-browser_en-US ${WRKSRC}
- mv ${WRKDIR}/tor-launcher-${TL_VERSION}/ \
- ${WRKSRC}/browser/extensions/tor-launcher
+ mv ${WRKDIR}/tor-browser ${WRKSRC}/tor-browser-linux64/

post-patch:
# hack config/baseconfig.mk to not use MOZ_APP_VERSION in a few places
@@ -105,12 +99,14 @@ post-patch:
# drop in sh front end to configure.py so CONFIGURE_STYLE=simple works
${SUBST_PROGRAM} ${FILESDIR}/configure ${WRKSRC}/configure
${SUBST_PROGRAM} ${FILESDIR}/configure ${WRKSRC}/js/src/configure
- ${SUBST_CMD} ${WRKSRC}/browser/extensions/tor-launcher/src/defaults/preferences/torlauncher-prefs.js
+ ${SUBST_CMD} ${WRKSRC}/browser/app/profile/000-tor-browser.js
# Not using a patch for this; patch context would contain UTF-8
sed -i 's/#ifdef XP_LINUX/#if defined(XP_LINUX) || defined(XP_OPENBSD)/' \
${WRKSRC}/browser/app/profile/000-tor-browser.js
ln -s ${WRKSRC}/mozconfig-linux-x86_64 ${WRKSRC}/.mozconfig

+ ${SUBST_CMD} ${WRKSRC}/xpcom/build/BinaryPath.h
+
BROWSER_DIR = ${PREFIX}/lib/${BROWSER_NAME}
TRUEBROWSER_DIR = ${TRUEPREFIX}/lib/${BROWSER_NAME}
BROWSER_CFG = ${BROWSER_DIR}/${BROWSER_NAME}.cfg
@@ -154,10 +150,10 @@ post-install:
# install fonts.conf and fonts
${INSTALL_DATA_DIR} ${BROWSER_DIR}/browser/fontconfig
${SUBST_DATA} \
- ${WRKSRC}/tor-browser_en-US/Browser/TorBrowser/Data/fontconfig/fonts.conf \
+ ${WRKSRC}/tor-browser-linux64/Browser/TorBrowser/Data/fontconfig/fonts.conf \
${BROWSER_DIR}/browser/fontconfig/fonts.conf
${INSTALL_DATA_DIR} ${BROWSER_DIR}/browser/fonts
- cp ${WRKSRC}/tor-browser_en-US/Browser/fonts/* \
+ cp ${WRKSRC}/tor-browser-linux64/Browser/fonts/* \
${BROWSER_DIR}/browser/fonts

# install wrapper script (remove symlink first)
@@ -165,8 +161,10 @@ post-install:
${SUBST_PROGRAM} ${FILESDIR}/${BROWSER_NAME} \
${PREFIX}/bin/${BROWSER_NAME}

-.for f in unveil.content unveil.gpu unveil.main unveil.rdd unveil.socket pledge.content pledge.gpu pledge.main pledge.rdd pledge.socket
- ${INSTALL_DATA} ${FILESDIR}/${f} ${BROWSER_DIR}/browser/defaults/preferences/
+.for f in unveil pledge
+.for t in content gpu main rdd socket utility utility-audioDecoder
+ ${INSTALL_DATA} ${FILESDIR}/${f}.${t} ${BROWSER_DIR}/browser/defaults/preferences/
+.endfor
.endfor

.include <bsd.port.mk>
Index: www/tor-browser/browser/distinfo
===================================================================
RCS file: /cvs/ports/www/tor-browser/browser/distinfo,v
retrieving revision 1.55.2.3
diff -u -p -r1.55.2.3 distinfo
--- www/tor-browser/browser/distinfo 24 Nov 2022 16:38:44 -0000 1.55.2.3
+++ www/tor-browser/browser/distinfo 8 Dec 2022 17:29:57 -0000
@@ -1,6 +1,4 @@
-SHA256 (mozilla/src-firefox-tor-browser-91.13.0esr-11.5-1-build8.tar.xz) = rR2Krm6C2/BsfPCv0oBd828wvh1o9E8LiFkFBrfflj8=
-SHA256 (mozilla/src-tor-launcher-0.2.37.tar.xz) = 91AWkxTFbRS5HFXz2pon3l0hHAYusYX559AIr1i2MTw=
-SHA256 (mozilla/tor-browser-linux64-11.5.8_en-US.tar.xz) = /KK9oTijk5dEziAwp5966NaM2V4k1mtBjTJq88Ct7N0=
-SIZE (mozilla/src-firefox-tor-browser-91.13.0esr-11.5-1-build8.tar.xz) = 414011200
-SIZE (mozilla/src-tor-launcher-0.2.37.tar.xz) = 261128
-SIZE (mozilla/tor-browser-linux64-11.5.8_en-US.tar.xz) = 113877448
+SHA256 (mozilla/src-firefox-tor-browser-102.5.0esr-12.0-2-build1.tar.xz) = 1lAT1yT2ACsBRz5800oRco3PXjOQu3FlAYwfQuQugtQ=
+SHA256 (mozilla/tor-browser-linux64-12.0_ALL.tar.xz) = hQzmAdgVusY+T1k3ZG0rSXFzviiyezCnUm67lGpFmHQ=
+SIZE (mozilla/src-firefox-tor-browser-102.5.0esr-12.0-2-build1.tar.xz) = 512766100
+SIZE (mozilla/tor-browser-linux64-12.0_ALL.tar.xz) = 105202872
Index: www/tor-browser/browser/files/pledge.content
===================================================================
RCS file: /cvs/ports/www/tor-browser/browser/files/pledge.content,v
retrieving revision 1.2
diff -u -p -r1.2 pledge.content
--- www/tor-browser/browser/files/pledge.content 9 Mar 2022 20:48:32 -0000 1.2
+++ www/tor-browser/browser/files/pledge.content 8 Dec 2022 17:29:57 -0000
@@ -9,5 +9,6 @@ unix
drm
ps
inet #dns.google does socket()
+dns #allows sndio forwarding on a fqdn
# only needed if using NIS of the profile is located on a NFS share
getpw
Index: www/tor-browser/browser/files/pledge.utility
===================================================================
RCS file: www/tor-browser/browser/files/pledge.utility
diff -N www/tor-browser/browser/files/pledge.utility
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ www/tor-browser/browser/files/pledge.utility 8 Dec 2022 17:29:57 -0000
@@ -0,0 +1,4 @@
+stdio
+recvfd
+sendfd
+unix
Index: www/tor-browser/browser/files/pledge.utility-audioDecoder
===================================================================
RCS file: www/tor-browser/browser/files/pledge.utility-audioDecoder
diff -N www/tor-browser/browser/files/pledge.utility-audioDecoder
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ www/tor-browser/browser/files/pledge.utility-audioDecoder 8 Dec 2022 17:29:57 -0000
@@ -0,0 +1,7 @@
+stdio
+tmppath
+rpath # gtk tries to access /usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
+recvfd
+sendfd
+prot_exec
+unix # getsockopt
Index: www/tor-browser/browser/files/unveil.content
===================================================================
RCS file: /cvs/ports/www/tor-browser/browser/files/unveil.content,v
retrieving revision 1.6
diff -u -p -r1.6 unveil.content
--- www/tor-browser/browser/files/unveil.content 9 Jun 2022 04:23:28 -0000 1.6
+++ www/tor-browser/browser/files/unveil.content 8 Dec 2022 17:29:57 -0000
@@ -1,4 +1,4 @@
-/dev/dri rw
+/dev/dri/card0 rw

/etc/fonts r
/etc/machine-id r
Index: www/tor-browser/browser/files/unveil.main
===================================================================
RCS file: /cvs/ports/www/tor-browser/browser/files/unveil.main,v
retrieving revision 1.5
diff -u -p -r1.5 unveil.main
--- www/tor-browser/browser/files/unveil.main 9 Mar 2022 20:48:32 -0000 1.5
+++ www/tor-browser/browser/files/unveil.main 8 Dec 2022 17:29:57 -0000
@@ -13,6 +13,7 @@
# normally "pledge dns" exempts this from unveil, but pledge might be disabled
/etc/resolv.conf r

+/usr/local/bin/tor rx
/usr/local/lib r
/usr/local/lib/tor-browser rx
/usr/local/share r
@@ -25,6 +26,7 @@

# printing
/usr/bin/lpr rx
+/var/run/cups/cups.sock rw

/etc/mailcap r
~/.mailcap r
@@ -54,6 +56,7 @@
$XDG_RUNTIME_DIR/dconf rwc
$XDG_CACHE_HOME/thumbnails rwc
$XDG_CONFIG_HOME/dconf rw
+$XDG_CONFIG_HOME/fcitx r
$XDG_CONFIG_HOME/fontconfig r
$XDG_CONFIG_HOME/gtk-3.0 r
$XDG_CONFIG_HOME/mimeapps.list r
Index: www/tor-browser/browser/files/unveil.utility
===================================================================
RCS file: www/tor-browser/browser/files/unveil.utility
diff -N www/tor-browser/browser/files/unveil.utility
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ www/tor-browser/browser/files/unveil.utility 8 Dec 2022 17:29:57 -0000
@@ -0,0 +1 @@
+# nothing
Index: www/tor-browser/browser/files/unveil.utility-audioDecoder
===================================================================
RCS file: www/tor-browser/browser/files/unveil.utility-audioDecoder
diff -N www/tor-browser/browser/files/unveil.utility-audioDecoder
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ www/tor-browser/browser/files/unveil.utility-audioDecoder 8 Dec 2022 17:29:57 -0000
@@ -0,0 +1,3 @@
+/usr/lib r
+/usr/local/lib r
+/tmp rwc
Index: www/tor-browser/browser/patches/patch-browser_app_profile_000-tor-browser_js
===================================================================
RCS file: www/tor-browser/browser/patches/patch-browser_app_profile_000-tor-browser_js
diff -N www/tor-browser/browser/patches/patch-browser_app_profile_000-tor-browser_js
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ www/tor-browser/browser/patches/patch-browser_app_profile_000-tor-browser_js 8 Dec 2022 17:29:57 -0000
@@ -0,0 +1,26 @@
+Set all path-related prefs to minimize patching of tl-util.jsm/tl-process.js
+
+Index: browser/app/profile/000-tor-browser.js
+--- browser/app/profile/000-tor-browser.js.orig
++++ browser/app/profile/000-tor-browser.js
+@@ -123,14 +123,17 @@ pref("extensions.torlauncher.socks_port_flags", "Exten
+ // The tor_path is relative to the application directory. On Linux and
+ // Windows this is the Browser/ directory that contains the firefox
+ // executables, and on Mac OS it is the TorBrowser.app directory.
+-pref("extensions.torlauncher.tor_path", "");
++pref("extensions.torlauncher.tor_path", "${LOCALBASE}/bin/tor");
++pref("extensions.torlauncher.torrc-defaults_path", "${LOCALBASE}/share/tor-browser/torrc-defaults");
++pref("extensions.torlauncher.geoip_path", "${LOCALBASE}/share/tor/geoip");
++pref("extensions.torlauncher.geoip6_path", "${LOCALBASE}/share/tor/geoip6");
+
+ // The torrc_path and tordatadir_path are relative to the data directory,
+ // which is TorBrowser-Data/ if it exists as a sibling of the application
+ // directory. If TorBrowser-Data/ does not exist, these paths are relative
+ // to the TorBrowser/ directory within the application directory.
+-pref("extensions.torlauncher.torrc_path", "");
+-pref("extensions.torlauncher.tordatadir_path", "");
++pref("extensions.torlauncher.torrc_path", "torrc");
++pref("extensions.torlauncher.tordatadir_path", "tor_data");
+
+ // BridgeDB-related preferences (used for Moat).
+ pref("extensions.torlauncher.bridgedb_front", "cdn.sstatic.net");
Index: www/tor-browser/browser/patches/patch-browser_config_mozconfigs_base-browser
===================================================================
RCS file: /cvs/ports/www/tor-browser/browser/patches/patch-browser_config_mozconfigs_base-browser,v
retrieving revision 1.1
diff -u -p -r1.1 patch-browser_config_mozconfigs_base-browser
--- www/tor-browser/browser/patches/patch-browser_config_mozconfigs_base-browser 29 Jul 2022 20:20:10 -0000 1.1
+++ www/tor-browser/browser/patches/patch-browser_config_mozconfigs_base-browser 8 Dec 2022 17:29:57 -0000
@@ -3,6 +3,10 @@ means we can not pass --disable-eme to c

Don't use --enable-rust-simd, fails to build.

+Remove $WASI_SYSROOT test, it breaks the build for us. Not sure if the test
+is relevant for us. Was added upstream in
+https://gitlab.torproject.org/tpo/applications/tor-browser/-/issues/41406
+
Index: browser/config/mozconfigs/base-browser
--- browser/config/mozconfigs/base-browser.orig
+++ browser/config/mozconfigs/base-browser
@@ -28,3 +32,11 @@ Index: browser/config/mozconfigs/base-br
ac_add_options --enable-proxy-bypass-protection
# See bugs #30575 and #32418: system policies are harmful either because they
# could allow proxy bypass, and override a number of other preferences we set
+@@ -37,7 +37,3 @@ ac_add_options --enable-base-browser
+
+ # Disable telemetry
+ ac_add_options MOZ_TELEMETRY_REPORTING=
+-
+-if test -z "$WASI_SYSROOT"; then
+- ac_add_options --without-wasm-sandboxed-libraries
+-fi
Index: www/tor-browser/browser/patches/patch-browser_extensions_tor-launcher_src_components_tl-process_js
===================================================================
RCS file: www/tor-browser/browser/patches/patch-browser_extensions_tor-launcher_src_components_tl-process_js
diff -N www/tor-browser/browser/patches/patch-browser_extensions_tor-launcher_src_components_tl-process_js
--- www/tor-browser/browser/patches/patch-browser_extensions_tor-launcher_src_components_tl-process_js 29 Jul 2022 20:20:10 -0000 1.8
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,36 +0,0 @@
-Let geoip/geoip6 file paths be set by prefs like everything else and let
-the new getTorFile() deal with it.
-
-Index: browser/extensions/tor-launcher/src/components/tl-process.js
---- browser/extensions/tor-launcher/src/components/tl-process.js.orig
-+++ browser/extensions/tor-launcher/src/components/tl-process.js
-@@ -386,6 +386,8 @@ TorProcessService.prototype =
- var torrcFile = TorLauncherUtil.getTorFile("torrc", true);
- var torrcDefaultsFile =
- TorLauncherUtil.getTorFile("torrc-defaults", false);
-+ var geoipFile = TorLauncherUtil.getTorFile("geoip", false);
-+ var geoip6File = TorLauncherUtil.getTorFile("geoip6", false);
- var hashedPassword = this.mProtocolSvc.TorGetPassword(true);
- var controlIPCFile = this.mProtocolSvc.TorGetControlIPCFile();
- var controlPort = this.mProtocolSvc.TorGetControlPort();
-@@ -413,19 +415,14 @@ TorProcessService.prototype =
- return;
- }
-
-- // The geoip and geoip6 files are in the same directory as torrc-defaults.
-- var geoipFile = torrcDefaultsFile.clone();
-- geoipFile.leafName = "geoip";
-
-- var geoip6File = torrcDefaultsFile.clone();
-- geoip6File.leafName = "geoip6";
--
- var args = [];
- if (torrcDefaultsFile)
- {
- args.push("--defaults-torrc");
- args.push(torrcDefaultsFile.path);
- }
-+ args.push("--ignore-missing-torrc");
- args.push("-f");
- args.push(torrcFile.path);
- args.push("DataDirectory");
Index: www/tor-browser/browser/patches/patch-browser_extensions_tor-launcher_src_defaults_preferences_torlauncher-prefs_js
===================================================================
RCS file: www/tor-browser/browser/patches/patch-browser_extensions_tor-launcher_src_defaults_preferences_torlauncher-prefs_js
diff -N www/tor-browser/browser/patches/patch-browser_extensions_tor-launcher_src_defaults_preferences_torlauncher-prefs_js
--- www/tor-browser/browser/patches/patch-browser_extensions_tor-launcher_src_defaults_preferences_torlauncher-prefs_js 9 Mar 2022 20:48:33 -0000 1.6
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,26 +0,0 @@
-Set all path-related prefs to minimize patching of tl-util.jsm/tl-process.js
-
-Index: browser/extensions/tor-launcher/src/defaults/preferences/torlauncher-prefs.js
---- browser/extensions/tor-launcher/src/defaults/preferences/torlauncher-prefs.js.orig
-+++ browser/extensions/tor-launcher/src/defaults/preferences/torlauncher-prefs.js
-@@ -44,14 +44,17 @@ pref("extensions.torlauncher.socks_port_flags", "Exten
- // The tor_path is relative to the application directory. On Linux and
- // Windows this is the Browser/ directory that contains the firefox
- // executables, and on Mac OS it is the TorBrowser.app directory.
--pref("extensions.torlauncher.tor_path", "");
-+pref("extensions.torlauncher.tor_path", "${LOCALBASE}/bin/tor");
-+pref("extensions.torlauncher.torrc-defaults_path", "${LOCALBASE}/share/tor-browser/torrc-defaults");
-+pref("extensions.torlauncher.geoip_path", "${LOCALBASE}/share/tor/geoip");
-+pref("extensions.torlauncher.geoip6_path", "${LOCALBASE}/share/tor/geoip6");
-
- // The torrc_path and tordatadir_path are relative to the data directory,
- // which is TorBrowser-Data/ if it exists as a sibling of the application
- // directory. If TorBrowser-Data/ does not exist, these paths are relative
- // to the TorBrowser/ directory within the application directory.
--pref("extensions.torlauncher.torrc_path", "");
--pref("extensions.torlauncher.tordatadir_path", "");
-+pref("extensions.torlauncher.torrc_path", "torrc");
-+pref("extensions.torlauncher.tordatadir_path", "tor_data");
-
- // BridgeDB-related preferences (used for Moat).
- pref("extensions.torlauncher.bridgedb_front", "cdn.sstatic.net");
Index: www/tor-browser/browser/patches/patch-browser_extensions_tor-launcher_src_modules_tl-util_jsm
===================================================================
RCS file: www/tor-browser/browser/patches/patch-browser_extensions_tor-launcher_src_modules_tl-util_jsm
diff -N www/tor-browser/browser/patches/patch-browser_extensions_tor-launcher_src_modules_tl-util_jsm
--- www/tor-browser/browser/patches/patch-browser_extensions_tor-launcher_src_modules_tl-util_jsm 9 Mar 2022 20:48:33 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-Force DataOutsideOfAppDir on OpenBSD since it will always be true
-(turned on in ../browser/patches/patch-patch-xpcom_io_TorFileUtils_cpp)
-
-Index: browser/extensions/tor-launcher/src/modules/tl-util.jsm
---- browser/extensions/tor-launcher/src/modules/tl-util.jsm.orig
-+++ browser/extensions/tor-launcher/src/modules/tl-util.jsm
-@@ -836,7 +836,7 @@ let TLUtilInternal = // Private
- mStringBundle : null,
- mOS : "",
- // mIsUserDataOutsideOfAppDir is true when TorBrowser-Data is used.
-- mIsUserDataOutsideOfAppDir: undefined, // Boolean (cached; access via
-+ mIsUserDataOutsideOfAppDir: true, // Boolean (cached; access via
- // this._isUserDataOutsideOfAppDir)
- mAppDir: null, // nsIFile (cached; access via this._appDir)
- mDataDir: null, // nsIFile (cached; access via this._dataDir)
Index: www/tor-browser/browser/patches/patch-config_makefiles_rust_mk
===================================================================
RCS file: /cvs/ports/www/tor-browser/browser/patches/patch-config_makefiles_rust_mk,v
retrieving revision 1.6
diff -u -p -r1.6 patch-config_makefiles_rust_mk
--- www/tor-browser/browser/patches/patch-config_makefiles_rust_mk 9 Mar 2022 20:48:33 -0000 1.6
+++ www/tor-browser/browser/patches/patch-config_makefiles_rust_mk 8 Dec 2022 17:29:57 -0000
@@ -1,15 +1,17 @@
use lto=thin to reduce memory pressure when building gkrust
https://bugzilla.mozilla.org/show_bug.cgi?id=1644409
+https://bugzilla.mozilla.org/show_bug.cgi?id=1640982

Index: config/makefiles/rust.mk
--- config/makefiles/rust.mk.orig
+++ config/makefiles/rust.mk
-@@ -70,7 +70,7 @@ ifndef MOZ_DEBUG_RUST
- # gkrust_gtest. And not when doing cross-language LTO.
- ifndef MOZ_LTO_RUST_CROSS
+@@ -90,7 +90,8 @@ ifndef rustflags_sancov
+ # Never enable when coverage is enabled to work around https://github.com/rust-lang/rust/issues/90045.
+ ifndef MOZ_CODE_COVERAGE
ifeq (,$(findstring gkrust_gtest,$(RUST_LIBRARY_FILE)))
-cargo_rustc_flags += -Clto
+cargo_rustc_flags += -Clto=thin
++export CARGO_PROFILE_RELEASE_LTO=thin
endif
# We need -Cembed-bitcode=yes for all crates when using -Clto.
RUSTFLAGS += -Cembed-bitcode=yes
Index: www/tor-browser/browser/patches/patch-gfx_webrender_bindings_webrender_ffi_h
===================================================================
RCS file: /cvs/ports/www/tor-browser/browser/patches/patch-gfx_webrender_bindings_webrender_ffi_h,v
retrieving revision 1.1
diff -u -p -r1.1 patch-gfx_webrender_bindings_webrender_ffi_h
--- www/tor-browser/browser/patches/patch-gfx_webrender_bindings_webrender_ffi_h 12 Jun 2022 20:21:41 -0000 1.1
+++ www/tor-browser/browser/patches/patch-gfx_webrender_bindings_webrender_ffi_h 8 Dec 2022 17:29:57 -0000
@@ -7,7 +7,7 @@ https://github.com/eqrion/cbindgen/issue
Index: gfx/webrender_bindings/webrender_ffi.h
--- gfx/webrender_bindings/webrender_ffi.h.orig
+++ gfx/webrender_bindings/webrender_ffi.h
-@@ -77,8 +77,6 @@ struct WrPipelineInfo;
+@@ -73,8 +73,6 @@ struct WrPipelineInfo;
struct WrPipelineIdAndEpoch;
using WrPipelineIdEpochs = nsTArray<WrPipelineIdAndEpoch>;

Index: www/tor-browser/browser/patches/patch-js_src_jit_ProcessExecutableMemory_h
===================================================================
RCS file: /cvs/ports/www/tor-browser/browser/patches/patch-js_src_jit_ProcessExecutableMemory_h,v
retrieving revision 1.5
diff -u -p -r1.5 patch-js_src_jit_ProcessExecutableMemory_h
--- www/tor-browser/browser/patches/patch-js_src_jit_ProcessExecutableMemory_h 9 Mar 2022 20:48:33 -0000 1.5
+++ www/tor-browser/browser/patches/patch-js_src_jit_ProcessExecutableMemory_h 8 Dec 2022 17:29:57 -0000
@@ -1,11 +1,16 @@
+https://bugzilla.mozilla.org/show_bug.cgi?id=1347139
+
Index: js/src/jit/ProcessExecutableMemory.h
--- js/src/jit/ProcessExecutableMemory.h.orig
+++ js/src/jit/ProcessExecutableMemory.h
-@@ -14,7 +14,7 @@ namespace jit {
+@@ -13,8 +13,9 @@ namespace js {
+ namespace jit {

// Limit on the number of bytes of executable memory to prevent JIT spraying
- // attacks.
+-// attacks.
-#if JS_BITS_PER_WORD == 32
++// attacks. Default datasize is 768Mb on OpenBSD, keep MaxCodeBytesPerProcess
++// low there otherwise the js engine hits ulimit quickly.
+#if JS_BITS_PER_WORD == 32 || defined(__OpenBSD__)
static const size_t MaxCodeBytesPerProcess = 140 * 1024 * 1024;
#else
Index: www/tor-browser/browser/patches/patch-toolkit_components_downloads_DownloadIntegration_jsm
===================================================================
RCS file: /cvs/ports/www/tor-browser/browser/patches/patch-toolkit_components_downloads_DownloadIntegration_jsm,v
retrieving revision 1.2
diff -u -p -r1.2 patch-toolkit_components_downloads_DownloadIntegration_jsm
--- www/tor-browser/browser/patches/patch-toolkit_components_downloads_DownloadIntegration_jsm 9 Mar 2022 20:48:33 -0000 1.2
+++ www/tor-browser/browser/patches/patch-toolkit_components_downloads_DownloadIntegration_jsm 8 Dec 2022 17:29:57 -0000
@@ -4,15 +4,15 @@ revert parts of https://hg.mozilla.org/m
Index: toolkit/components/downloads/DownloadIntegration.jsm
--- toolkit/components/downloads/DownloadIntegration.jsm.orig
+++ toolkit/components/downloads/DownloadIntegration.jsm
-@@ -68,6 +68,7 @@ ChromeUtils.defineModuleGetter(
+@@ -58,6 +58,7 @@ ChromeUtils.defineModuleGetter(
"NetUtil",
"resource://gre/modules/NetUtil.jsm"
);
+ChromeUtils.defineModuleGetter(this, "OS", "resource://gre/modules/osfile.jsm");
ChromeUtils.defineModuleGetter(
this,
- "CloudStorage",
-@@ -365,9 +366,7 @@ var DownloadIntegration = {
+ "Services",
+@@ -367,9 +368,7 @@ var DownloadIntegration = {
Ci.nsIFile
);
directoryPath = directory.path;
@@ -21,9 +21,9 @@ Index: toolkit/components/downloads/Down
- });
+ await OS.File.makeDir(directoryPath, { ignoreExisting: true });
} catch (ex) {
+ Cu.reportError(ex);
// Either the preference isn't set or the directory cannot be created.
- directoryPath = await this.getSystemDownloadsDirectory();
-@@ -943,8 +942,8 @@ var DownloadIntegration = {
+@@ -958,8 +957,8 @@ var DownloadIntegration = {
);

// Create the Downloads folder and ignore if it already exists.
Index: www/tor-browser/browser/patches/patch-toolkit_components_processtools_ProcInfo_linux_cpp
===================================================================
RCS file: www/tor-browser/browser/patches/patch-toolkit_components_processtools_ProcInfo_linux_cpp
diff -N www/tor-browser/browser/patches/patch-toolkit_components_processtools_ProcInfo_linux_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ www/tor-browser/browser/patches/patch-toolkit_components_processtools_ProcInfo_linux_cpp 8 Dec 2022 17:29:57 -0000
@@ -0,0 +1,122 @@
+about:processes for OpenBSD
+
+https://bugzilla.mozilla.org/show_bug.cgi?id=1772090
+
+Index: toolkit/components/processtools/ProcInfo_linux.cpp
+--- toolkit/components/processtools/ProcInfo_linux.cpp.orig
++++ toolkit/components/processtools/ProcInfo_linux.cpp
+@@ -13,6 +13,11 @@
+ #include "nsMemoryReporterManager.h"
+ #include "nsWhitespaceTokenizer.h"
+
++#ifdef __OpenBSD__
++#include <sys/types.h>
++#include <sys/sysctl.h>
++#include <cerrno>
++

No comments:

Post a Comment