From nobody Fri May 10 18:04:26 2024 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VbcGL6Yf8z5K98K; Fri, 10 May 2024 18:04:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VbcGL630pz4HNk; Fri, 10 May 2024 18:04:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715364266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E5axOXzP9cZFuFBA80g967w9s8MMuPAKBew/HbsTQ1Q=; b=IL2RULTBWx2lM2+2KAPi4Y75oVgt+X7h1phF6+TwOrJhZeQW7LMFfwL5mY4bFZx9Fle5/W YSEXDpe5c+i8VSnNSnd9UP1O8YWzlXhAADKBXZDys1goyIy0rL4uSmak53F1ZfDSP3LojQ ykQ18HMRHafh7Up+jzl0fN+o+2Bry6cv89eASbSpIC/t9NpDkjKYDQPVNNA3zFDqaA4n4z T3E0hN9vuKccf2ZChtochjaijG122TexjzFzloU9kdm8R67qeJxzRF48WPnPShZ83t7MtI kUbYVS5usODwRbNINxZJJE3Qbvqn0Bm3fWob1UNI6gwAsouy27E6UuAMrgaNBQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715364266; a=rsa-sha256; cv=none; b=CRR4PJXi9F1kwCs6ngDJY5hk88vpJDXTZ+AKiuLwfbHVwsZ67xi6RQ1uAZgdMnM2Mv/2wU Ddkat4Rmd8Ph0ncXSECgMbEjoD8ggrPdTx2wt3sOL7Si14JJzK67xb4tJOmIv0272LsLEa O/7pmuLzgIRKv8WTw+QebPdTzbuziWbIYKIBry3hNTRirnzF63wdkWHY+jUJZzsu8jSfI1 qSOLnTF8ESPGLcqdFJSgD9x07hJx87iJMS4+emCjTBAKESs9QQAzeUdhZj6R2dDWw24+os rkx/CAskw2cxW6OkJHCM9CDOg7BpFggw7KN48Ni0oo4yoK5q1uh0oIz04uHOTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715364266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E5axOXzP9cZFuFBA80g967w9s8MMuPAKBew/HbsTQ1Q=; b=hglBBv9WEGP7IqPC20mfASGPxdWlL/UDvzROjAJi/zKAN4vIAl74c2eHmcL2+7Qs8Byh0e Ru/Ir818uTTsc/tVAxk4Py42igDwh9ZGdN7wcCHlA8belu7nfo8PKz0+p9oeun+8lWqgb6 wp1zHGGBWq5NyySQtaBq3kohNWwtm9NupFJCL0nr7fQEAasmb06/ghWBI9Nq3jIooSXKvh m3w10HhxobiyxtVPcSiGKf4rJTrpVya7SO3TIQ2l5xTS9Ze5c6Lne6KeZjNYkaZyjo5WoE E4F8rVjvfVZBKHXIzhws5bBLfePwVkBHbWOdSEWHgv8TpyPJubc/HvdRk5fXxw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VbcGL5fTQznZS; Fri, 10 May 2024 18:04:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44AI4Qiv060062; Fri, 10 May 2024 18:04:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44AI4Qo7060059; Fri, 10 May 2024 18:04:26 GMT (envelope-from git) Date: Fri, 10 May 2024 18:04:26 GMT Message-Id: <202405101804.44AI4Qo7060059@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Fernando =?utf-8?Q?Apestegu=C3=ADa?= Subject: git: dc752ff57570 - main - www/tor-browser: Update to 13.5a7 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-all@freebsd.org Sender: owner-dev-commits-ports-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fernape X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dc752ff57570a2196cf0ba2d172e9e73db1373b9 Auto-Submitted: auto-generated The branch main has been updated by fernape: URL: https://cgit.FreeBSD.org/ports/commit/?id=dc752ff57570a2196cf0ba2d172e9e73db1373b9 commit dc752ff57570a2196cf0ba2d172e9e73db1373b9 Author: Martin Filla AuthorDate: 2024-05-09 08:06:55 +0000 Commit: Fernando ApesteguĂ­a CommitDate: 2024-05-10 18:04:13 +0000 www/tor-browser: Update to 13.5a7 ChangeLog: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/blob/main/projects/browser/Bundle-Data/Docs-TBB/ChangeLog.txt?ref_type=heads PR: 278851 Reported by: freebsd@sysctl.cz (maintainer) --- www/tor-browser/Makefile | 4 +- www/tor-browser/distinfo | 6 +- .../files/patch-dom_media_flac_FlacDecoder.cpp | 2 +- ...toolkit_components_processtools_procinfo__bsd.c | 104 +++++++++++++++++++++ ...lkit_components_tor-launcher_TorProcess.sys.mjs | 34 +++++++ ...lkit_components_tor-launcher_TorProcess_sys_mjs | 26 ------ 6 files changed, 144 insertions(+), 32 deletions(-) diff --git a/www/tor-browser/Makefile b/www/tor-browser/Makefile index a8c42904445f..40358f41ab31 100644 --- a/www/tor-browser/Makefile +++ b/www/tor-browser/Makefile @@ -1,11 +1,11 @@ PORTNAME= tor-browser -DISTVERSION= 13.0.14 +DISTVERSION= 13.5a7 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.10.0esr-13.0-1-build1 +DISTNAME= src-firefox-tor-browser-115.10.0esr-13.5-1-build2 DISTFILES= ${DISTNAME}.tar.xz \ manual_112141.zip:source1 \ firefox-tor-browser-13.0.1-build2-firefox-1l0n-out.tar:source2 diff --git a/www/tor-browser/distinfo b/www/tor-browser/distinfo index a0e748a76e5b..ea4c726915ec 100644 --- a/www/tor-browser/distinfo +++ b/www/tor-browser/distinfo @@ -1,6 +1,6 @@ -TIMESTAMP = 1713253525 -SHA256 (src-firefox-tor-browser-115.10.0esr-13.0-1-build1.tar.xz) = 5ce221443bd9dfbec37e92c263f0098572fb7c44a0236fbba98b02370eda11bf -SIZE (src-firefox-tor-browser-115.10.0esr-13.0-1-build1.tar.xz) = 551419804 +TIMESTAMP = 1715113596 +SHA256 (src-firefox-tor-browser-115.10.0esr-13.5-1-build2.tar.xz) = 4d6359dfd62d834eccef626dab721092924903cc9418049b0f07de3306575384 +SIZE (src-firefox-tor-browser-115.10.0esr-13.5-1-build2.tar.xz) = 552033160 SHA256 (manual_112141.zip) = f767bc5f655f1263623b7af588cfb045d3e41ee019dc7ecd713decc5c1a0ea9b SIZE (manual_112141.zip) = 26293073 SHA256 (firefox-tor-browser-13.0.1-build2-firefox-1l0n-out.tar) = bbd290cd134e3a114241077ba82582617ab6c5117ff2226381943c504bd09775 diff --git a/www/tor-browser/files/patch-dom_media_flac_FlacDecoder.cpp b/www/tor-browser/files/patch-dom_media_flac_FlacDecoder.cpp index 954b78f5bf37..6dc197d9455e 100644 --- a/www/tor-browser/files/patch-dom_media_flac_FlacDecoder.cpp +++ b/www/tor-browser/files/patch-dom_media_flac_FlacDecoder.cpp @@ -17,7 +17,7 @@ Enable FLAC on platforms without ffvpx like powerpc* +#elif defined(MOZ_FFMPEG) + RefPtr platform = new PDMFactory(); + return StaticPrefs::media_flac_enabled() && -+ platform->SupportsMimeType("audio/flac"_ns); ++ !platform->SupportsMimeType("audio/flac"_ns).isEmpty(); #else return false; #endif diff --git a/www/tor-browser/files/patch-toolkit_components_processtools_procinfo__bsd.c b/www/tor-browser/files/patch-toolkit_components_processtools_procinfo__bsd.c new file mode 100644 index 000000000000..e2e9a3cc88f4 --- /dev/null +++ b/www/tor-browser/files/patch-toolkit_components_processtools_procinfo__bsd.c @@ -0,0 +1,104 @@ +diff --git toolkit/components/processtools/ProcInfo_bsd.cpp toolkit/components/processtools/ProcInfo_bsd.cpp +index a6ff4881940c..f041ed5e50ce 100644 +--- toolkit/components/processtools/ProcInfo_bsd.cpp ++++ toolkit/components/processtools/ProcInfo_bsd.cpp +@@ -18,6 +18,9 @@ + #include + #include + #include ++#ifdef __FreeBSD__ ++#include ++#endif + + namespace mozilla { + +@@ -50,25 +53,39 @@ ProcInfoPromise::ResolveOrRejectValue GetProcInfoSync( + } + for (const auto& request : aRequests) { + size_t size; ++#ifdef __FreeBSD__ ++ int mib[4]; ++ int mibsize = 4; ++ mib[0] = CTL_KERN; ++ mib[1] = KERN_PROC; ++ mib[2] = KERN_PROC_PID | KERN_PROC_INC_THREAD; ++ mib[3] = request.pid; ++#else + int mib[6]; ++ int mibsize = 6; + mib[0] = CTL_KERN; + mib[1] = KERN_PROC; + mib[2] = KERN_PROC_PID | KERN_PROC_SHOW_THREADS; + mib[3] = request.pid; + mib[4] = sizeof(kinfo_proc); + mib[5] = 0; +- if (sysctl(mib, 6, nullptr, &size, nullptr, 0) == -1) { ++#endif ++ if (sysctl(mib, mibsize, nullptr, &size, nullptr, 0) == -1) { + // Can't get info for this process. Skip it. + continue; + } + ++#ifdef __FreeBSD__ ++ auto procs = MakeUniqueFallible(size / sizeof(kinfo_proc)); ++#else + mib[5] = size / sizeof(kinfo_proc); + auto procs = MakeUniqueFallible(mib[5]); ++#endif + if (!procs) { + result.SetReject(NS_ERROR_OUT_OF_MEMORY); + return result; + } +- if (sysctl(mib, 6, procs.get(), &size, nullptr, 0) == -1 && ++ if (sysctl(mib, mibsize, procs.get(), &size, nullptr, 0) == -1 && + errno != ENOMEM) { + continue; + } +@@ -84,19 +101,34 @@ ProcInfoPromise::ResolveOrRejectValue GetProcInfoSync( + bool found = false; + for (size_t i = 0; i < size / sizeof(kinfo_proc); i++) { + const auto& p = procs[i]; ++#ifdef __FreeBSD__ ++ if (i == 0) { ++#else + if (p.p_tid == -1) { ++#endif + // This is the process. + found = true; ++#ifdef __FreeBSD__ ++ info.cpuTime = uint64_t(p.ki_runtime) * 1'000u; ++ info.memory = (p.ki_tsize + p.ki_dsize + p.ki_ssize) * getpagesize(); ++#else + info.cpuTime = uint64_t(p.p_rtime_sec) * 1'000'000'000u + + uint64_t(p.p_rtime_usec) * 1'000u; + info.memory = + (p.p_vm_tsize + p.p_vm_dsize + p.p_vm_ssize) * getpagesize(); ++#endif ++ + } else { + // This is one of its threads. + ThreadInfo threadInfo; ++#ifdef __FreeBSD__ ++ threadInfo.tid = p.ki_tid; ++ threadInfo.cpuTime = uint64_t(p.ki_runtime) * 1'000u; ++#else + threadInfo.tid = p.p_tid; + threadInfo.cpuTime = uint64_t(p.p_rtime_sec) * 1'000'000'000u + + uint64_t(p.p_rtime_usec) * 1'000u; ++#endif + info.threads.AppendElement(threadInfo); + } + } +diff --git toolkit/components/processtools/moz.build toolkit/components/processtools/moz.build +index b7c164c1b0ac..a41dad52c343 100644 +--- toolkit/components/processtools/moz.build ++++ toolkit/components/processtools/moz.build +@@ -39,7 +39,7 @@ BROWSER_CHROME_MANIFESTS += ["tests/browser/browser.ini"] + # Platform-specific implementations of `ProcInfo`. + toolkit = CONFIG["MOZ_WIDGET_TOOLKIT"] + if toolkit == "gtk" or toolkit == "android": +- if CONFIG["OS_TARGET"] == "OpenBSD": ++ if CONFIG["OS_TARGET"] == "FreeBSD" or CONFIG["OS_TARGET"] == "OpenBSD": + UNIFIED_SOURCES += ["ProcInfo_bsd.cpp"] + else: + UNIFIED_SOURCES += ["ProcInfo_linux.cpp"] diff --git a/www/tor-browser/files/patch-toolkit_components_tor-launcher_TorProcess.sys.mjs b/www/tor-browser/files/patch-toolkit_components_tor-launcher_TorProcess.sys.mjs new file mode 100644 index 000000000000..247ead0c3c9a --- /dev/null +++ b/www/tor-browser/files/patch-toolkit_components_tor-launcher_TorProcess.sys.mjs @@ -0,0 +1,34 @@ +Let geoip/geoip6 file paths be set by prefs like everything else and let +the new getTorFile() deal with it. + +Index: toolkit/components/tor-launcher/TorProcess.sys.mjs +--- toolkit/components/tor-launcher/TorProcess.sys.mjs.orig 2024-04-22 21:47:56 UTC ++++ toolkit/components/tor-launcher/TorProcess.sys.mjs +@@ -216,6 +216,7 @@ export class TorProcess { + } + + this.#args = []; ++ this.#args.push("--ignore-missing-torrc"); + this.#args.push("-f", torrcFile.path); + this.#args.push("DataDirectory", this.#dataDir.path); + this.#args.push("ClientOnionAuthDir", onionAuthDir.path); +@@ -230,11 +231,15 @@ export class TorProcess { + // The geoip and geoip6 files are in the same directory as torrc-defaults. + // TODO: Change TorFile to return the generic path to these files to make + // them independent from the torrc-defaults. +- const geoipFile = torrcDefaultsFile.clone(); +- geoipFile.leafName = "geoip"; ++ // const geoipFile = torrcDefaultsFile.clone(); ++ // geoipFile.leafName = "geoip"; ++ // this.#args.push("GeoIPFile", geoipFile.path); ++ // const geoip6File = torrcDefaultsFile.clone(); ++ // geoip6File.leafName = "geoip6"; ++ // this.#args.push("GeoIPv6File", geoip6File.path); ++ const geoipFile = lazy.TorLauncherUtil.getTorFile("geoip", false); ++ const geoip6File = lazy.TorLauncherUtil.getTorFile("geoip6", false); + this.#args.push("GeoIPFile", geoipFile.path); +- const geoip6File = torrcDefaultsFile.clone(); +- geoip6File.leafName = "geoip6"; + this.#args.push("GeoIPv6File", geoip6File.path); + } else { + logger.warn( diff --git a/www/tor-browser/files/patch-toolkit_components_tor-launcher_TorProcess_sys_mjs b/www/tor-browser/files/patch-toolkit_components_tor-launcher_TorProcess_sys_mjs deleted file mode 100644 index ec2731f31d1f..000000000000 --- a/www/tor-browser/files/patch-toolkit_components_tor-launcher_TorProcess_sys_mjs +++ /dev/null @@ -1,26 +0,0 @@ -Let geoip/geoip6 file paths be set by prefs like everything else and let -the new getTorFile() deal with it. - -Index: toolkit/components/tor-launcher/TorProcess.sys.mjs ---- toolkit/components/tor-launcher/TorProcess.sys.mjs.orig -+++ toolkit/components/tor-launcher/TorProcess.sys.mjs -@@ -254,16 +254,14 @@ export class TorProcess { - "torrc-defaults", - false - ); -- // The geoip and geoip6 files are in the same directory as torrc-defaults. -- const geoipFile = torrcDefaultsFile.clone(); -- geoipFile.leafName = "geoip"; -- const geoip6File = torrcDefaultsFile.clone(); -- geoip6File.leafName = "geoip6"; -+ const geoipFile = lazy.TorLauncherUtil.getTorFile("geoip", false); -+ const geoip6File = lazy.TorLauncherUtil.getTorFile("geoip6", false); - - this.#args = []; - if (torrcDefaultsFile) { - this.#args.push("--defaults-torrc", torrcDefaultsFile.path); - } -+ this.#args.push("--ignore-missing-torrc"); - this.#args.push("-f", torrcFile.path); - this.#args.push("DataDirectory", this.#dataDir.path); - this.#args.push("ClientOnionAuthDir", onionAuthDir.path);