On 2023 Sep 13 (Wed) at 23:06:51 +0200 (+0200), Caspar Schutijser wrote: :On Thu, Sep 07, 2023 at 11:35:12AM +0200, Caspar Schutijser wrote: :> Hi ports@, :> :> Below is a diff that makes Tor Browser work on aarch64. Tested on :> aarch64 and amd64. :> :> Comments or OKs? : :Ping. New diff (rebased on recent changes by landry@) below. :
I'm cool with adding tor-browser to aarch64, and ports-wise this looks fine to me. I've not tested the diff or spent actual thought on it, though :). :> If you're interested in the details you can read on; otherwise, just :> skip the part below and go right to the diff. :> :> A user previously proposed this already, but I assumed that :> Tor Browser was carrying some local patches for NSPR and thus we needed :> the version of NSPR bundled with Tor Browser. However, that turns out :> not to be the case: :> :> $ git clone https://gitlab.torproject.org/tpo/applications/tor-browser.git :> $ cd tor-browser :> $ git diff FIREFOX_102_15_0esr_BUILD1..tor-browser-102.15.0esr-12.5-1-build2 nsprpub/ :> :> I checked for a few older releases as well, and I didn't see any patches :> there either. So we don't need the bundled NSPR there. Which is great :> because the bundled NSPR does not compile on aarch64, even with the :> patches from devel/nspr integrated. :> :> Note that we can't do the same for e.g. NSS, because if you run this :> you'll see that Tor Browser does indeed have some patches for NSS: :> $ git diff FIREFOX_102_15_0esr_BUILD1..tor-browser-102.15.0esr-12.5-1-build2 security/nss :> :> Caspar : :Index: meta/tor-browser/Makefile :=================================================================== :RCS file: /cvs/ports/meta/tor-browser/Makefile,v :retrieving revision 1.73 :diff -u -p -r1.73 Makefile :--- meta/tor-browser/Makefile 6 Sep 2023 09:42:28 -0000 1.73 :+++ meta/tor-browser/Makefile 13 Sep 2023 15:58:15 -0000 :@@ -3,7 +3,7 @@ COMMENT= Tor Browser meta package : MAINTAINER= Caspar Schutijser <cas...@schutijser.com> : : PKGNAME= tor-browser-12.5.3 :-ONLY_FOR_ARCHS = amd64 :+ONLY_FOR_ARCHS = aarch64 amd64 : : RUN_DEPENDS= www/tor-browser/browser>=12.5.3 \ : www/tor-browser/noscript>=11.4.26 \ :Index: www/tor-browser/Makefile.inc :=================================================================== :RCS file: /cvs/ports/www/tor-browser/Makefile.inc,v :retrieving revision 1.70 :diff -u -p -r1.70 Makefile.inc :--- www/tor-browser/Makefile.inc 6 Sep 2023 09:42:28 -0000 1.70 :+++ www/tor-browser/Makefile.inc 13 Sep 2023 15:58:15 -0000 :@@ -7,7 +7,7 @@ TB_VERSION = 12.5.3 : TB_PREFIX = tb : : # keep meta/tor-browser in sync :-ONLY_FOR_ARCHS ?= amd64 :+ONLY_FOR_ARCHS ?= aarch64 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.117 :diff -u -p -r1.117 Makefile :--- www/tor-browser/browser/Makefile 13 Sep 2023 06:15:48 -0000 1.117 :+++ www/tor-browser/browser/Makefile 13 Sep 2023 15:58:15 -0000 :@@ -7,7 +7,7 @@ COMMENT = modified version of Firefox E : MOZILLA_VERSION = ${TB_VERSION} : MOZILLA_PROJECT = ${BROWSER_NAME} : MOZILLA_CODENAME = browser :-REVISION = 0 :+REVISION = 1 : : EXTRACT_SUFX = .tar.xz : :@@ -23,7 +23,7 @@ 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 ipcclientcerts :+MOZILLA_LIBS += mozsqlite3 ipcclientcerts : : # mozilla public license for the browser : PERMIT_PACKAGE= Yes :@@ -37,8 +37,7 @@ MODPY_RUNDEP = No : : COMPILER = ports-clang : :-# tor-browser needs built-in nss, sqlite :-MOZILLA_USE_BUNDLED_NSPR = Yes :+# tor-browser needs built-in nss : MOZILLA_USE_BUNDLED_NSS = Yes : # 63 requires node because why not #1483595 : BUILD_DEPENDS += lang/node :Index: www/tor-browser/browser/pkg/PLIST :=================================================================== :RCS file: /cvs/ports/www/tor-browser/browser/pkg/PLIST,v :retrieving revision 1.18 :diff -u -p -r1.18 PLIST :--- www/tor-browser/browser/pkg/PLIST 6 Sep 2023 09:42:29 -0000 1.18 :+++ www/tor-browser/browser/pkg/PLIST 13 Sep 2023 15:58:15 -0000 :@@ -203,12 +203,9 @@ lib/${BROWSER_NAME}/fonts/TwemojiMozilla : @lib lib/${BROWSER_NAME}/libmozavutil.so.${LIBmozavutil_VERSION} : @lib lib/${BROWSER_NAME}/libmozgtk.so.${LIBmozgtk_VERSION} : @lib lib/${BROWSER_NAME}/libmozsqlite3.so.${LIBmozsqlite3_VERSION} :-@lib lib/${BROWSER_NAME}/libnspr4.so.${LIBnspr4_VERSION} : @lib lib/${BROWSER_NAME}/libnss3.so.${LIBnss3_VERSION} : @lib lib/${BROWSER_NAME}/libnssckbi.so.${LIBnssckbi_VERSION} : @lib lib/${BROWSER_NAME}/libnssutil3.so.${LIBnssutil3_VERSION} :-@lib lib/${BROWSER_NAME}/libplc4.so.${LIBplc4_VERSION} :-@lib lib/${BROWSER_NAME}/libplds4.so.${LIBplds4_VERSION} : @lib lib/${BROWSER_NAME}/libsmime3.so.${LIBsmime3_VERSION} : @lib lib/${BROWSER_NAME}/libsoftokn3.so.${LIBsoftokn3_VERSION} : @lib lib/${BROWSER_NAME}/libssl3.so.${LIBssl3_VERSION} : -- Q: How many DEC repairmen does it take to fix a flat? A: Five; four to hold the car up and one to swap tires.