Bug 281551 - www/tor-browser: Update 13.5.a9 → 14.0.1
Summary: www/tor-browser: Update 13.5.a9 → 14.0.1
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Jesper Schmitz Mouridsen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-17 07:26 UTC by kaltheat
Modified: 2024-11-22 16:15 UTC (History)
6 users (show)

See Also:
bugzilla: maintainer-feedback? (freebsd)


Attachments
https://people.freebsd.org/~jsm/tor-browser14a6.diff (52 bytes, text/plain)
2024-09-27 21:01 UTC, Jesper Schmitz Mouridsen
no flags Details
0001-librewolf-update-to-126.patch.tar.bz2 (226.41 KB, patch)
2024-09-28 08:57 UTC, Martin Filla
freebsd: maintainer-approval+
Details | Diff
0001-www-tor-browser-update-to-14a6.patch.tar.gz (226.41 KB, application/gzip)
2024-09-28 08:58 UTC, Martin Filla
freebsd: maintainer-approval+
Details
14a7 with correct l10n files (224.16 KB, application/gzip)
2024-09-28 19:09 UTC, Jesper Schmitz Mouridsen
freebsd: maintainer-approval+
Details
0001-tor-browser-update-to-14a7.patch.tar.gz (221.43 KB, application/gzip)
2024-09-29 08:03 UTC, Martin Filla
freebsd: maintainer-approval+
Details
0001-tor-browser-update-to-14.0.patch.tar.gz (222.86 KB, application/gzip)
2024-10-24 09:18 UTC, Martin Filla
freebsd: maintainer-approval+
Details
default bridges and noscript support (2.12 KB, patch)
2024-10-25 00:58 UTC, deleted
no flags Details | Diff
Add snoflake bridges support (1.14 KB, patch)
2024-10-25 01:35 UTC, deleted
no flags Details | Diff
fix fonts permissions (1.29 KB, patch)
2024-10-25 03:41 UTC, deleted
no flags Details | Diff
updates to 14.0 (52 bytes, text/plain)
2024-10-26 18:24 UTC, Jesper Schmitz Mouridsen
no flags Details
update 14.0.1 (1.54 KB, patch)
2024-10-29 21:21 UTC, deleted
no flags Details | Diff
0001-tor-browser-update-to-14.0.patch.tar.gz (223.40 KB, application/gzip)
2024-10-30 12:12 UTC, Martin Filla
freebsd: maintainer-approval+
Details
0001-tor-browser-upadate-to-14.0.1.patch.tar.gz (223.40 KB, application/gzip)
2024-10-30 12:13 UTC, Martin Filla
freebsd: maintainer-approval+
Details
0001-tor-browser-update-to-14.0.1.patch.tar.gz (223.69 KB, application/gzip)
2024-10-31 09:17 UTC, Martin Filla
freebsd: maintainer-approval+
Details
0001-tor-browser-update-to-14.0.1.patch.tar.gz (224.18 KB, application/gzip)
2024-11-04 15:20 UTC, Martin Filla
no flags Details
fontconfig env patch (2.55 KB, patch)
2024-11-08 08:39 UTC, deleted
no flags Details | Diff
14.0.1 (52 bytes, patch)
2024-11-08 16:18 UTC, Jesper Schmitz Mouridsen
freebsd: maintainer-approval+
Details | Diff
updates to 14.0.1 (55 bytes, text/plain)
2024-11-09 14:07 UTC, Jesper Schmitz Mouridsen
freebsd: maintainer-approval+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kaltheat 2024-09-17 07:26:38 UTC
Hi,

current version in ports (13.5a9) is from June 11, 2024 and alpha[1],
current released version is 13.5.3 from September 4, 2024[2].

Any plans to upgrade?!

Regards
kaltheat

[1] https://blog.torproject.org/new-alpha-release-tor-browser-135a9/
[2] https://blog.torproject.org/new-release-tor-browser-1353/
Comment 1 Martin Filla 2024-09-17 10:22:31 UTC
we can update to 14.0a5
Comment 2 kaltheat 2024-09-21 08:15:21 UTC
Just out of curiosity: Why would you choose an alpha-version? In general, I would not choose it or only choose it, if it had an urgently needed feature that the stable version had not.
Comment 3 Martin Filla 2024-09-21 08:58:55 UTC
(In reply to kaltheat from comment #2)

The latest version has new fixes
https://blog.torproject.org/new-alpha-release-tor-browser-140a5/
Comment 4 Jesper Schmitz Mouridsen freebsd_committer freebsd_triage 2024-09-24 15:20:54 UTC
The current version is an alpha as well, the 14 is based on firefox 128..

I have an almost working patch, to upgrade to this, it only has some l10n issues.. 
i.e the main menu bar is not translated.
Comment 5 Jesper Schmitz Mouridsen freebsd_committer freebsd_triage 2024-09-27 21:01:34 UTC
Created attachment 253858 [details]
https://people.freebsd.org/~jsm/tor-browser14a6.diff

Please test this one. The alpha should soon turn into a release. I have set some env to handle the fonts the same way as in linux. It prob. should go into a pkg-message that if you do not execute from .desktop you are using system defaults fonts.. I have not diffed the omni.ja files with the linux version but I will do that when I get to it. I've read the tor-browser-build build configs to hopefully get the translation tags right.

Thanks.
Comment 6 Martin Filla 2024-09-28 08:57:35 UTC
Created attachment 253865 [details]
0001-librewolf-update-to-126.patch.tar.bz2

This is a tested patch for 14.0.a6

=======================<phase: deinstall      >============================
===== env: DEVELOPER_MODE=yes STRICT_DEPENDS=yes USER=root UID=0 GID=0
===>  Deinstalling for tor-browser
===>   Deinstalling tor-browser-14.0.a6
Updating database digests format: .......... done
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
	tor-browser: 14.0.a6

Number of packages to be removed: 1

The operation will free 338 MiB.
[133amd64-default] [1/1] Deinstalling tor-browser-14.0.a6...
[133amd64-default] [1/1] Deleting files for tor-browser-14.0.a6: .......... done
==> Running trigger: desktop-file-utils.ucl
Building cache database of MIME types
===========================================================================
=>> Checking for extra files and directories
[01:07:58] Installing from package
[133amd64-default] Installing tor-browser-14.0.a6...
[133amd64-default] Extracting tor-browser-14.0.a6: .......... done
==> Running trigger: desktop-file-utils.ucl
Building cache database of MIME types
[01:08:21] Cleaning up
===>  Cleaning for tor-browser-14.0.a6
[01:12:39] Deinstalling package
Updating database digests format: . done
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
	tor-browser: 14.0.a6

Number of packages to be removed: 1

The operation will free 338 MiB.
[133amd64-default] [1/1] Deinstalling tor-browser-14.0.a6...
[133amd64-default] [1/1] Deleting files for tor-browser-14.0.a6: .......... done
==> Running trigger: desktop-file-utils.ucl
Building cache database of MIME types
Comment 7 Martin Filla 2024-09-28 08:58:55 UTC
Created attachment 253866 [details]
0001-www-tor-browser-update-to-14a6.patch.tar.gz
Comment 8 Jesper Schmitz Mouridsen freebsd_committer freebsd_triage 2024-09-28 16:25:26 UTC
we can already switch to a7 since I got the l10n tag wrong..so hang on..
Comment 9 Jesper Schmitz Mouridsen freebsd_committer freebsd_triage 2024-09-28 19:09:42 UTC
Created attachment 253873 [details]
14a7 with correct l10n files
Comment 10 Martin Filla 2024-09-29 08:03:56 UTC
Created attachment 253885 [details]
0001-tor-browser-update-to-14a7.patch.tar.gz

Hi, i tested in poudirere

[133amd64-default] Installing tor-browser-14.0.a7...
[133amd64-default] Extracting tor-browser-14.0.a7: .......... done
==> Running trigger: desktop-file-utils.ucl
Building cache database of MIME types
[01:06:32] Cleaning up
===>  Cleaning for tor-browser-14.0.a7
[01:12:27] Deinstalling package
Updating database digests format: . done
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
	tor-browser: 14.0.a7

Number of packages to be removed: 1

The operation will free 330 MiB.
[133amd64-default] [1/1] Deinstalling tor-browser-14.0.a7...
[133amd64-default] [1/1] Deleting files for tor-browser-14.0.a7: .......... done
==> Running trigger: desktop-file-utils.ucl
Building cache database of MIME types
build of www/tor-browser | tor-browser-14.0.a7 ended at Sun Sep 29 02:21:23 CEST 2024
Comment 11 Jesper Schmitz Mouridsen freebsd_committer freebsd_triage 2024-09-29 13:25:17 UTC
from https://blog.torproject.org/new-alpha-release-tor-browser-140a7/ :

The current plan is to have another release-candidate build next week followed by the Tor Browser 14.0 release on October 14. 


 will update to and commit the released version in a couple of wweks, if their plan stays on schedule...

Also we should consider bundling noscript.
Comment 12 kaltheat 2024-10-23 11:54:09 UTC
Version 14.0 was released yesterday:

https://blog.torproject.org/new-release-tor-browser-140/
Comment 13 Martin Filla 2024-10-24 09:18:46 UTC
Created attachment 254478 [details]
0001-tor-browser-update-to-14.0.patch.tar.gz

Hi,
it is tested in poudriere.

==> Running trigger: desktop-file-utils.ucl
Building cache database of MIME types
===========================================================================
=>> Checking for extra files and directories
[01:02:17] Installing from package
[133amd64-default] Installing tor-browser-14.0...
[133amd64-default] Extracting tor-browser-14.0: .......... done
==> Running trigger: desktop-file-utils.ucl
Building cache database of MIME types
[01:02:23] Cleaning up
===>  Cleaning for tor-browser-14.0
[01:02:43] Deinstalling package
Updating database digests format: . done
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
	tor-browser: 14.0

Number of packages to be removed: 1

The operation will free 330 MiB.
[133amd64-default] [1/1] Deinstalling tor-browser-14.0...
[133amd64-default] [1/1] Deleting files for tor-browser-14.0: .......... done
==> Running trigger: desktop-file-utils.ucl
Building cache database of MIME types
build of www/tor-browser | tor-browser-14.0 ended at Thu Oct 24 11:12:07 CEST 2024
build time: 01:02:32
Comment 14 deleted freebsd_committer freebsd_triage 2024-10-25 00:58:42 UTC
Created attachment 254496 [details]
default bridges and noscript support

Good afternoon, patch for version 14.0 by Martin Filla this patch adds support for default bridges and the NoScript extension. I apologize for any errors. This is my first contribution. Thanks to all contributors.
Comment 15 deleted freebsd_committer freebsd_triage 2024-10-25 01:35:36 UTC
Created attachment 254497 [details]
Add snoflake bridges support

Patch for add snoflake bridges support.
Comment 16 deleted freebsd_committer freebsd_triage 2024-10-25 03:41:21 UTC
Created attachment 254500 [details]
fix  fonts permissions

fix comment #13 fonts permissions patch.
Comment 17 Jesper Schmitz Mouridsen freebsd_committer freebsd_triage 2024-10-26 18:24:55 UTC
Created attachment 254540 [details]
updates to 14.0

tries to include noscript, and sets FONT path in desktop file. I am not sure about the noscript settings, but at least it is bundled now.. So pkg-descr should be modified.. I did not in this patch. Thanks xkernelpanic for the hints and the fonts permission stuff.

I am not sure about the default prefs. with bridges.. I do not think linux does that..?
Comment 18 deleted freebsd_committer freebsd_triage 2024-10-26 20:44:48 UTC
(In reply to Jesper Schmitz Mouridsen from comment #17)
Hi, thanks for your work.
Yes, the Linux version has built-in bridges settings, they are really necessary to work with something like azure or snowflake bridges. 
Especially for users from censored countries, for snowflake it's not really bridges it's more like settings for the snowflake client, without them it doesn't work unless the user sets their own.
I haven't tried your latest patch but I remember when I modified the port for myself there was a problem.
By default the Linux version uses the Tinos font pre-installed with the browser. The port version does not.
I'm not sure about Noscript settings and its separate delivery because maybe TB modifies the extension or the versions may differ, this is important for browser fingerprinting and maintaining anonymity.
Comment 19 deleted freebsd_committer freebsd_triage 2024-10-26 20:59:26 UTC
(In reply to xkernelpanic from comment #18)
Just to clarify, TB has a button in the settings under the connection tab: select built-in bridges. 
On Linux there are built-in bridges for snowflke, obfs4, meek-azure.
I'm not sure, but it seems that Noscript settings are the same as on Linux in my patch (need to check).
Comment 20 deleted freebsd_committer freebsd_triage 2024-10-26 21:01:23 UTC
(In reply to xkernelpanic from comment #19)
At least in the Noscript GUI.
Comment 21 deleted freebsd_committer freebsd_triage 2024-10-26 21:57:07 UTC
I'm not sure I'm not a maintainer but wouldn't it be better and more stable maybe even easier to use the latest stable version of TB for the port? (not alpha) As far as I know the alpha version is highly experimental and not recommended for everyday use to maintain anonymity.
Or am I missing something?
Comment 22 Martin Filla 2024-10-28 14:30:06 UTC
Test in poudriere is ok.

(In reply to Jesper Schmitz Mouridsen from comment #17)
Updating database digests format: .......... done
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
	tor-browser: 14.0

Number of packages to be removed: 1

The operation will free 330 MiB.
[133amd64-default] [1/1] Deinstalling tor-browser-14.0...
[133amd64-default] [1/1] Deleting files for tor-browser-14.0: .......... done
==> Running trigger: desktop-file-utils.ucl
Building cache database of MIME types
===========================================================================
=>> Checking for extra files and directories
[01:05:45] Installing from package
[133amd64-default] Installing tor-browser-14.0...
[133amd64-default] Extracting tor-browser-14.0: .......... done
==> Running trigger: desktop-file-utils.ucl
Building cache database of MIME types
[01:06:01] Cleaning up
===>  Cleaning for tor-browser-14.0
[01:08:32] Deinstalling package
Updating database digests format: . done
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
	tor-browser: 14.0

Number of packages to be removed: 1

The operation will free 330 MiB.
[133amd64-default] [1/1] Deinstalling tor-browser-14.0...
[133amd64-default] [1/1] Deleting files for tor-browser-14.0: .......... done
==> Running trigger: desktop-file-utils.ucl
Building cache database of MIME types
build of www/tor-browser | tor-browser-14.0 ended at Mon Oct 28 13:54:46 CET 2024
Comment 23 deleted freebsd_committer freebsd_triage 2024-10-29 21:21:29 UTC
Created attachment 254624 [details]
update 14.0.1

(In reply to Jesper Schmitz Mouridsen from comment #17)
Hi.
New version: Tor Browser 14.0.1
https://blog.torproject.org/new-release-tor-browser-1401
I'm submitting a patch to upgrade, I don't have poudriere configured.
But it was tested on my PC on amd64 LLVM 18 14.1-RELEASE-p5
PS. i have not updated Noscript.
Comment 24 Martin Filla 2024-10-30 12:12:10 UTC
Created attachment 254638 [details]
0001-tor-browser-update-to-14.0.patch.tar.gz

===== env: DEVELOPER_MODE=yes STRICT_DEPENDS=yes USER=root UID=0 GID=0
===>  Deinstalling for tor-browser
===>   Deinstalling tor-browser-14.0.1
Updating database digests format: .......... done
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
	tor-browser: 14.0.1

Number of packages to be removed: 1

The operation will free 330 MiB.
[133amd64-default] [1/1] Deinstalling tor-browser-14.0.1...
[133amd64-default] [1/1] Deleting files for tor-browser-14.0.1: .......... done
==> Running trigger: desktop-file-utils.ucl
Building cache database of MIME types
===========================================================================
=>> Checking for extra files and directories
[01:01:31] Installing from package
[133amd64-default] Installing tor-browser-14.0.1...
[133amd64-default] Extracting tor-browser-14.0.1: .......... done
==> Running trigger: desktop-file-utils.ucl
Building cache database of MIME types
[01:01:38] Cleaning up
===>  Cleaning for tor-browser-14.0.1
[01:01:58] Deinstalling package
Updating database digests format: . done
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
	tor-browser: 14.0.1

Number of packages to be removed: 1

The operation will free 330 MiB.
[133amd64-default] [1/1] Deinstalling tor-browser-14.0.1...
Comment 25 Martin Filla 2024-10-30 12:13:23 UTC
Created attachment 254639 [details]
0001-tor-browser-upadate-to-14.0.1.patch.tar.gz
Comment 26 Martin Filla 2024-10-31 09:17:29 UTC
Created attachment 254789 [details]
0001-tor-browser-update-to-14.0.1.patch.tar.gz
Comment 27 Martin Filla 2024-11-04 15:20:18 UTC
Created attachment 254936 [details]
0001-tor-browser-update-to-14.0.1.patch.tar.gz
Comment 28 Craig Leres freebsd_committer freebsd_triage 2024-11-04 21:10:55 UTC
(In reply to Martin Filla from comment #27)
I tried that patchset against a 1b83c53 /usr/ports tree and the distfiles errors. I ran "make makesum" and it downloaded a bunch of stuff and updated distinfo. I tried again and got extract errors.

=======================<phase: extract        >============================
===== env: NO_DEPENDS=yes USER=root UID=0 GID=0
===>  License MPL20 accepted by the user
===> Fetching all distfiles required by tor-browser-13.5.a9_5 for building
===>  Extracting for tor-browser-13.5.a9_5
=> SHA256 Checksum OK for src-firefox-tor-browser-115.12.0esr-13.5-1-build2.tar.xz.
=> SHA256 Checksum OK for manual_112141.zip.
=> SHA256 Checksum OK for firefox-tor-browser-13.0.1-build2-firefox-1l0n-out.tar.
=> SHA256 Checksum OK for mozilla-l10n-firefox-l10n-eded3303744e8f5ca85f0d14710f198cd77fd23f_GH0.tar.gz.
=> SHA256 Checksum OK for tpo-translation-16446c485b3be4198a7e79bfcac6510784a18506_GL0.tar.gz.
=> SHA256 Checksum OK for tpo-translation-816fcde248e0e25c8ad921d25ec97a374a59ed94_GL0.tar.gz.
/bin/mv /wrkdirs/usr/ports/www/tor-browser/work/tor-browser /wrkdirs/usr/ports/www/tor-browser/work/firefox-tor-browser-115.12.0esr-13.5-1-build2/tor-browser-linux64/
mv: rename /wrkdirs/usr/ports/www/tor-browser/work/tor-browser to /wrkdirs/usr/ports/www/tor-browser/work/firefox-tor-browser-115.12.0esr-13.5-1-build2/tor-browser-linux64/: No such file or directory
*** Error code 1
Comment 29 Craig Leres freebsd_committer freebsd_triage 2024-11-04 21:12:34 UTC
Oops, I see now that the patch to Makefile failed, maybe I misunderstood what the patch is for?

./Makefile.rej
zinc 392 # cat Makefile.rej
@@ -1,15 +1,22 @@
 PORTNAME=      tor-browser
-DISTVERSION=   13.5a9
-PORTREVISION=  4
+DISTVERSION=   14.0.1
 CATEGORIES=    www net security wayland
 MASTER_SITES=  TOR \
                https://build-sources.tbb.torproject.org/:source1 \
-               LOCAL/jsm:source2
-MASTER_SITE_SUBDIR=    torbrowser/${DISTVERSION}
-DISTNAME=      src-firefox-tor-browser-115.12.0esr-13.5-1-build2
+               LOCAL/jsm:source2 \
+               https://secure.informaction.com/%SUBDIR%/:source3
+
 DISTFILES=     ${DISTNAME}.tar.xz \
-               manual_112141.zip:source1 \
-               firefox-tor-browser-13.0.1-build2-firefox-1l0n-out.tar:source2
+               manual_214072.zip:source1 \
+               fonts-3--4348e1.tar.zst:source2 \
+               noscript-11.4.42.xpi:source3 \
+               tor-browser-linux-x86_64-${DISTVERSION}.tar.xz \
+               tor-expert-bundle-linux-x86_64-${DISTVERSION}.tar.gz
+
+MASTER_SITE_SUBDIR=    torbrowser/${DISTVERSION}/:DEFAULT \
+                       download/releases/:source3
+
+DISTNAME=      src-firefox-tor-browser-128.4.0esr-14.0-1-build2
 MAINTAINER=    freebsd@sysctl.cz
 COMMENT=       Tor Browser for FreeBSD
 WWW=           https://www.torproject.org/
Comment 30 Martin Filla 2024-11-04 21:24:38 UTC
(In reply to Craig Leres from comment #28
badly applied patch. Did you apply "git apply file.patch" ?
Comment 31 Craig Leres freebsd_committer freebsd_triage 2024-11-04 22:00:40 UTC
(In reply to Martin Filla from comment #30)
Never heard of "git apply" before. But it seems to work the same as "patch -p1":

zinc 412 # git apply /tmp/0001-tor-browser-update-to-14.0.1.patch 
/tmp/0001-tor-browser-update-to-14.0.1.patch:771: trailing whitespace.
+
/tmp/0001-tor-browser-update-to-14.0.1.patch:843: trailing whitespace.
+       content/browser/manual/static/images/android-new-identity.png        (content/manual/static/images/android-new-identity.png) 
/tmp/0001-tor-browser-update-to-14.0.1.patch:845: trailing whitespace.
+       content/browser/manual/static/images/bridgemoji.png        (content/manual/static/images/bridgemoji.png) 
/tmp/0001-tor-browser-update-to-14.0.1.patch:924: trailing whitespace.
    
/tmp/0001-tor-browser-update-to-14.0.1.patch:1017: trailing whitespace.
 
error: patch failed: www/tor-browser/Makefile:1
error: www/tor-browser/Makefile: patch does not apply
Comment 32 deleted freebsd_committer freebsd_triage 2024-11-05 05:45:51 UTC
(In reply to Martin Filla from comment #27)
Hi. Thanks for applying the patches I posted. But wouldn't it be better to add jq as dep for default bridges to the port and copy Noscript from the Linux build as in my original patch, since Linux build is already in use?
Comment 33 deleted freebsd_committer freebsd_triage 2024-11-05 05:50:48 UTC
(In reply to Martin Fille from comment #27)
In your patch you are copying the Noscript extension twice, one from the jsm patch and the other from the Linux build, you have to choose one of the ways
Comment 34 deleted freebsd_committer freebsd_triage 2024-11-05 05:53:57 UTC
(In reply to Craig Leres from comment #31)
I did the same thing you did, for me the patch applied fine.
Comment 35 Craig Leres freebsd_committer freebsd_triage 2024-11-05 06:02:38 UTC
(In reply to xkernelpanic from comment #34)
(What is the git hash of your ports tree?)
Comment 36 deleted freebsd_committer freebsd_triage 2024-11-05 09:28:09 UTC
(In reply to Craig Leres from comment #35)
Sorry, I think I'm lying because it's wrong if the ports are clean (it works on my local branch but it's modified)
btw rej patch file looks easy to fix manually
Comment 37 deleted freebsd_committer freebsd_triage 2024-11-05 09:31:09 UTC
(In response to Craig Lehrer's comment from comment #35)
I think Martin can fix it (his own patch).
If you really need it, I think I can send you the fixed patch
(a simple fix for everything in *rej).
Comment 38 Jesper Schmitz Mouridsen freebsd_committer freebsd_triage 2024-11-06 16:46:38 UTC
(In reply to xkernelpanic from comment #14)
Can you please tell what you do wit the jq stuff, in my testing the built in bridges can be configured as long as torrc-defaults has the snowflake client setting. SO I do not see the need of the extra preconfiguration

Thansk
Comment 39 deleted freebsd_committer freebsd_triage 2024-11-06 20:02:40 UTC
(In reply to Jesper Schmitz Mouridsen from comment #38)
Hi. This is my old patch, it used to be required as the default bridge settings were missing. I have now done some testing and it seems that this patch is now not required TB contains the default bridge settings without the patch, maybe this happened after the 14.x update. In that case I apologize for the misinformation, I think in this case the patch is now useless. In any case, thanks for your work.
Comment 40 deleted freebsd_committer freebsd_triage 2024-11-06 20:19:24 UTC
(In reply to xkernelpanic from comment #39)
I think remove the jq and tor-expert-bundle-linux-x86_64* part from the Makefile. it will be ok
Comment 41 deleted freebsd_committer freebsd_triage 2024-11-06 20:23:12 UTC
(In reply to Jesper Schmitz Mouridsen from comment #38)
I am left with two questions/problems.
1. Noscript installation method, why not use the extension from the Linux version for the reasons described above?
2 . Apparently something is wrong with the font settings.
The Linux version uses the Tinos font from the bundle by default. (Checked on a clean profile.)
However the port uses Noto Serif for me, seems to be the same as regular Firefox I think the port is using system settings.
It is important to fix, I think, the second point to prevent spying and the unique browser fingerprint.
Thanks.
Comment 42 Jesper Schmitz Mouridsen freebsd_committer freebsd_triage 2024-11-06 20:43:18 UTC
(In reply to xkernelpanic from comment #41)
Try to launch with the desktop file from my patch, it should set fontconfig correctly to not use system fonts, we should put it in a pkg-message IMO. Or set the env accordingly when running. i.e 
env FONTCONFIG_PATH="/usr/local/lib/tor-browser/fontconfig/" FONTCONFIG_FILE="fonts.conf" /usr/local/lib/tor-browser/tor-browser

Thanks
Comment 43 deleted freebsd_committer freebsd_triage 2024-11-06 22:43:37 UTC
(In reply to Jesper Schmitz Mouridsen from comment #42)
Wow, I missed that in the patch. Now it works, but what if the user doesn't use the xdg desktop file?
I think it is better to write something posix sh wrapper to run TB with this env?
If you need i can try to send you a patch for that?
Because I don't know how to modify firefox TB binary directly without changing so much code for that.
And what about noscript?
Thank you for your awesome work.
Comment 44 deleted freebsd_committer freebsd_triage 2024-11-06 22:47:32 UTC
to Jesper Schmitz Mouridsen from comment #42)
Probably something like tor-browser-lauch or start-tor-browser.
The name start-tor-browser is used in Linux for the *.desktop wrapper, I think.(In reply
Comment 45 deleted freebsd_committer freebsd_triage 2024-11-06 22:53:24 UTC
(In reply to xkernelpanic from comment #44)
Usually the best solution is to patch the firefox binary to use that environment. I will try to find a solution in my spare time.
Comment 46 deleted freebsd_committer freebsd_triage 2024-11-07 20:12:16 UTC
for now, i use this:

#!/usr/bin/env sh
FONTCONFIG_PATH="/usr/local/lib/tor-browser/fontconfig/"
FONTCONFIG_FILE="fonts.conf"
export FONTCONFIG_PATH FONTCONFIG_FILE
exec /usr/local/lib/tor-browser/tor-browser "$@"

(don't use env, because then there would be no exec, so there would be an extra process)
Comment 47 Jesper Schmitz Mouridsen freebsd_committer freebsd_triage 2024-11-07 22:13:01 UTC
(In reply to xkernelpanic from comment #46)
How about: (yeah I know diff diffs are anoying to read)
What it does is to set
setenv("FONTCONFIG_PATH", "%%LOCALBASE%%/lib/tor-browser/fontconfig/", 1);
setenv("FONTCONFIG_FILE", "fonts.conf", 1);
and adds 
 ${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/browser/app/nsBrowserApp.cpp  to post-patch
to post-patch (we need that anyway if it got dropped by mistake)


diff --git a/www/tor-browser/Makefile b/www/tor-browser/Makefile
index e2bc372f8..86961c7b5 100644
--- a/www/tor-browser/Makefile
+++ b/www/tor-browser/Makefile
@@ -105,6 +105,7 @@ MOZ_OPTIONS+=       --with-wasi-sysroot=${LOCALBASE}/share/wasi-sysroot
 .endif
 post-patch:
        @${REINPLACE_CMD} 's|LOCALBASE|${LOCALBASE}|g' "${WRKSRC}/browser/app/profile/000-tor-browser.js"
+       ${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/browser/app/nsBrowserApp.cpp
        ${MKDIR} ${WRKSRC}/tmp-manual
        unzip -d ${WRKSRC}/tmp-manual ${DISTDIR}/manual_214072.zip
 pre-configure:
diff --git a/www/tor-browser/files/patch-browser-app-nsBrowserApp.cpp b/www/tor-browser/files/patch-browser-app-nsBrowserApp.cpp
index 3b9097714..35b248c34 100644
--- a/www/tor-browser/files/patch-browser-app-nsBrowserApp.cpp
+++ b/www/tor-browser/files/patch-browser-app-nsBrowserApp.cpp
@@ -1,13 +1,13 @@
-diff --git browser/app/nsBrowserApp.cpp browser/app/nsBrowserApp.cpp
-index 87c2e16..a41f1d9 100644
---- browser/app/nsBrowserApp.cpp
-+++ browser/app/nsBrowserApp.cpp
-@@ -337,6 +337,9 @@ int main(int argc, char* argv[], char* envp[]) {
-   }
- #endif
+--- browser/app/nsBrowserApp.cpp.orig  2024-10-21 21:51:41.000000000 +0200
++++ browser/app/nsBrowserApp.cpp       2024-11-07 21:47:05.301097000 +0100
+@@ -391,6 +391,11 @@
+   // Register an external module to report on otherwise uncatchable exceptions.
+   CrashReporter::RegisterRuntimeExceptionModule();
  
 +  setenv("MOZ_GMP_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0);
 +  setenv("MOZ_PLUGIN_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0);
++  setenv("FONTCONFIG_PATH", "%%LOCALBASE%%/lib/tor-browser/fontconfig/", 1);
++  setenv("FONTCONFIG_FILE", "fonts.conf", 1);
 +
  #ifdef HAS_DLL_BLOCKLIST
    DllBlocklist_Initialize(gBlocklistInitFlags);


test by https://browserleaks.com/fonts  and or procstat -e on a contentproc... We do not get the same fingerprint as the linux version... some fonts appears to be readable that are different from linux, but I am not sure. i would be nice to be identical to linux but probably not (easily) doable..
Comment 48 deleted freebsd_committer freebsd_triage 2024-11-08 01:02:35 UTC
(In reply to Jesper Schmitz Mouridsen from comment #47)
Hi. First I want to say thank you for your work.
To be honest I was thinking about this font imprinting and if your way works, I think it's pretty good. 
Considering the build system it is unlikely that we will get a perfect similar result because of the different versions of the OS components at least.
This is not an official port from Tor Project.
I think it is enough to specify it in pkg-descr, it is hardly possible to achieve a 1 in 1 build that can be repurposed.
Especially considering tor-browser build system on linux I'm not sure how even the official method will help to preserve the fingerprints.
In the current state I think port is perfect and as ready as it can be.
It remains to update pkg-descr and decide whether to ship noscript from linux or separately. I'm in favor of the first option

Translated with DeepL.com (free version)
Comment 49 deleted freebsd_committer freebsd_triage 2024-11-08 01:04:31 UTC
(In reply to xkernelpanic from comment #48)
I apologize for the translation my main language is German)
Comment 50 deleted freebsd_committer freebsd_triage 2024-11-08 08:39:33 UTC
Created attachment 255021 [details]
fontconfig env patch
Comment 51 Jesper Schmitz Mouridsen freebsd_committer freebsd_triage 2024-11-08 15:22:25 UTC
(In reply to max a davis from comment #48)
SHA256 (./Browser/distribution/extensions/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi) = fd2d420afd93829bb6fe30ec6f8ba926d3d54d7583b8bbd822053b8cd13c0472
$ sha256 /usr/local/lib/tor-browser/distribution/extensions/\{73a6fe31-595d-460b-a920-fcc0f8843232\}.xpi 
Browser/                   start-tor-browser.desktop 
$ sha256 /usr/local/lib/tor-browser/distribution/extensions/\{73a6fe31-595d-460b-a920-fcc0f8843232\}.xpi 
SHA256 (/usr/local/lib/tor-browser/distribution/extensions/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi) = fd2d420afd93829bb6fe30ec6f8ba926d3d54d7583b8bbd822053b8cd13c0472

So it is the correct xpi version, i.e no reason to fetch it from the linux version.
Comment 52 Jesper Schmitz Mouridsen freebsd_committer freebsd_triage 2024-11-08 16:18:36 UTC
Created attachment 255030 [details]
14.0.1

Update to 14.1

I removed the libwebrtc patches since webrtc is disabled in tor-browser..
Comment 53 Jesper Schmitz Mouridsen freebsd_committer freebsd_triage 2024-11-08 16:23:03 UTC
Just noted the manual is https://build-sources.tbb.torproject.org/manual_215922.zip for 14.1 according to tor-browser-build.
Comment 54 Jesper Schmitz Mouridsen freebsd_committer freebsd_triage 2024-11-08 16:29:34 UTC
and i forgot the snowflake config..
Comment 55 Jesper Schmitz Mouridsen freebsd_committer freebsd_triage 2024-11-09 14:07:22 UTC
Created attachment 255050 [details]
updates to 14.0.1

Snowflake,fix env for fonts, and fix firefox-l10n and tranlations hashes.(please remember to check those when updating)
font fingerprinting is identical on identical freebsd systems in my testing.
Comment 56 commit-hook freebsd_committer freebsd_triage 2024-11-12 15:08:56 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e1f70209b0eb5b5d6fb3b75f9dc257fc5c9a77b8

commit e1f70209b0eb5b5d6fb3b75f9dc257fc5c9a77b8
Author:     Jesper Schmitz Mouridsen <jsm@FreeBSD.org>
AuthorDate: 2024-11-12 14:51:06 +0000
Commit:     Jesper Schmitz Mouridsen <jsm@FreeBSD.org>
CommitDate: 2024-11-12 15:08:10 +0000

    www/tor-browser: Update to 14.0.1

    Remove webrtc patches since webrtc is disabled.

    PR:     281551
    Approved by:    Martin Filla <freebsd@sysctl.cz> (maintainer)
    Co-authored-by: Martin Filla <freebsd@sysctl.cz>

 www/tor-browser/Makefile                           |    94 +-
 www/tor-browser/distinfo                           |    26 +-
 www/tor-browser/files/fonts.conf.in (new)          |   182 +
 www/tor-browser/files/patch-addon-search           |    20 +-
 .../files/patch-browser-app-nsBrowserApp.cpp       |    16 +-
 www/tor-browser/files/patch-browser-base-jar.mn    |   345 +-
 www/tor-browser/files/patch-bug1427152 (gone)      |    10 -
 www/tor-browser/files/patch-bug1559213             |   104 +-
 www/tor-browser/files/patch-bug1628567 (gone)      |    32 -
 www/tor-browser/files/patch-bug1680982 (gone)      |   388 -
 www/tor-browser/files/patch-bug1841919 (gone)      |    75 -
 www/tor-browser/files/patch-bug1873379 (gone)      |    34 -
 www/tor-browser/files/patch-bug847568              |   100 +-
 .../patch-dom_media_flac_FlacDecoder.cpp (gone)    |    23 -
 .../files/patch-gfx_skia_skia_src_base_SkEndian.h  |    24 +-
 .../patch-gfx_skia_skia_src_core_SkCpu.cpp (gone)  |    32 -
 ...patch-gfx_skia_skia_src_core_SkRasterPipeline.h |    14 +-
 .../files/patch-libwebrtc-generated (gone)         | 95952 -------------------
 .../files/patch-libwebrtc-powerpc64 (gone)         |   264 -
 www/tor-browser/files/patch-llvm18 (gone)          |   199 -
 .../files/patch-mozglue_misc_SSE.h (new)           |    84 +
 www/tor-browser/files/patch-pipewire_init          |    33 +-
 ...patch-python_mozbuild_mozbuild_gn__processor.py |    17 +-
 www/tor-browser/files/patch-rust-1.78.0 (gone)     |  3582 -
 ...rd__party_libwebrtc_build_config_BUILDCONFIG.gn |   116 +-
 ...op__capture_linux_wayland__egl__dmabuf.cc (new) |    26 +
 .../files/patch-toolkit_xre_glxtest.cpp (gone)     |    17 -
 www/tor-browser/files/tor-browser.desktop.in       |     2 +-
 www/tor-browser/files/torrc-defaults.in            |     5 +
 www/tor-browser/pkg-descr                          |     3 +-
 30 files changed, 767 insertions(+), 101052 deletions(-)
Comment 57 commit-hook freebsd_committer freebsd_triage 2024-11-22 16:15:21 UTC
A commit in branch 2024Q4 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=540a0656dccfc68cf19f4f54b1e3ec62febaef37

commit 540a0656dccfc68cf19f4f54b1e3ec62febaef37
Author:     Jesper Schmitz Mouridsen <jsm@FreeBSD.org>
AuthorDate: 2024-11-12 14:51:06 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-11-22 16:11:56 +0000

    www/tor-browser: Update to 14.0.1

    Remove webrtc patches since webrtc is disabled.

    PR:     281551
    Approved by:    Martin Filla <freebsd@sysctl.cz> (maintainer)
    Co-authored-by: Martin Filla <freebsd@sysctl.cz>

    (cherry picked from commit e1f70209b0eb5b5d6fb3b75f9dc257fc5c9a77b8)

 www/tor-browser/Makefile                           |    94 +-
 www/tor-browser/distinfo                           |    26 +-
 www/tor-browser/files/fonts.conf.in (new)          |   182 +
 www/tor-browser/files/patch-addon-search           |    20 +-
 .../files/patch-browser-app-nsBrowserApp.cpp       |    16 +-
 www/tor-browser/files/patch-browser-base-jar.mn    |   345 +-
 www/tor-browser/files/patch-bug1427152 (gone)      |    10 -
 www/tor-browser/files/patch-bug1559213             |   104 +-
 www/tor-browser/files/patch-bug1628567 (gone)      |    32 -
 www/tor-browser/files/patch-bug1680982 (gone)      |   388 -
 www/tor-browser/files/patch-bug1841919 (gone)      |    75 -
 www/tor-browser/files/patch-bug1873379 (gone)      |    34 -
 www/tor-browser/files/patch-bug847568              |   100 +-
 .../patch-dom_media_flac_FlacDecoder.cpp (gone)    |    23 -
 .../files/patch-gfx_skia_skia_src_base_SkEndian.h  |    24 +-
 .../patch-gfx_skia_skia_src_core_SkCpu.cpp (gone)  |    32 -
 ...patch-gfx_skia_skia_src_core_SkRasterPipeline.h |    14 +-
 .../files/patch-libwebrtc-generated (gone)         | 95952 -------------------
 .../files/patch-libwebrtc-powerpc64 (gone)         |   264 -
 www/tor-browser/files/patch-llvm18 (gone)          |   199 -
 .../files/patch-mozglue_misc_SSE.h (new)           |    84 +
 www/tor-browser/files/patch-pipewire_init          |    33 +-
 ...patch-python_mozbuild_mozbuild_gn__processor.py |    17 +-
 www/tor-browser/files/patch-rust-1.78.0 (gone)     |  3582 -
 ...rd__party_libwebrtc_build_config_BUILDCONFIG.gn |   116 +-
 ...op__capture_linux_wayland__egl__dmabuf.cc (new) |    26 +
 .../files/patch-toolkit_xre_glxtest.cpp (gone)     |    17 -
 www/tor-browser/files/tor-browser.desktop.in       |     2 +-
 www/tor-browser/files/torrc-defaults.in            |     5 +
 www/tor-browser/pkg-descr                          |     3 +-
 30 files changed, 767 insertions(+), 101052 deletions(-)