Download raw body.
www/librewolf: speed improvements
DO NOT MERGE YET - please see guidance below:
I just tested it now with that done. SEe new version of patch attached.
DO NOT merge this patch, nor the other one, because:
LibreWolf 154.0.1-3 is already on the dist server, so merging this *now*
might cause that LibreWolf version to be duplicated on the dist/pkg repo.
Therefore, I recommend only merging this in one patch that also updates
LibreWolf, the next time LibreWolf is updated upstream past 154.0.1-3.
Please note:
I'm also currently adding multi-language support to the port.
DO NOT MERGE YET! SEE ABOVE!
also:
FFDIST/FFVERSION are still needed, because I use those to manually
create the proper path for the mozilla PGO data even though the project
name is LibreWolf in this context. Otherwise, the path to the PGO data
would be wrong when building it for LibreWolf.
Please note: the new version of the patch, as above, removes DIST_SUBDIR
in the librewolf port, which makes it default to what's specified in
www/mozilla as fallback. That is "mozilla".
Am 31.08.26 um 16:04 schrieb landry@openbsd.org:
> Le Mon, Aug 31, 2026 at 03:17:37PM +0100, Leah Rowe a écrit :
>> i think the most sensible solution to avoid duplicating profdata archives on
>> openbsd's servers is:
>>
>> make DIST_SUBDIR be mozilla
>>
>> that means librewolf and firefox pkg tarballs would exist under mozilla/ on
>> the openbsd pkg server
>>
>> what do you think of that?
> i dont mind having lw source tarballs under mozilla/, after all that's
> also where tor-browser port puts them. and that'd allow sharing the
> profdata distfiles between the ports..
--
Company director, Minifree Ltd
Registered in England, No. 9361826 | VAT No. GB202190462
Registered Office: 19 Hilton Road, Canvey Island, Essex SS8 9QA, UK
From 474fde6ec154f0ff7660c67c9605e35ae42847ed Mon Sep 17 00:00:00 2001
From: Leah Rowe <leah@libreboot.org>
Date: Sun, 30 Aug 2026 20:51:18 +0100
Subject: [PATCH 1/1] www/librewolf: enable speed optimisations
use firefox PGO data, matched to the corresponding firefox
version (154.0.1) matching librewolf 154.0.1-3.
although librewolf doesn't provide PGO data, the two codebases
are so similar that using PGO for speed optimisation will work
on areas of the code that remain untouched by librewolf, which
is most of the code.
i've re-added the rust simd build option, which is fine so long
as you keep both librewolf and rustc/cargo up to date in the ports
system. i initially removed this option during development of the
port, and i was often using older versions of librewolf or its
libraries, which includes rust libraries, which sometimes caused
build errors that removing this option mitigated. for regular ports
maintenance, it is best that this option remains enabled as it
enables a nice performance boost for users in certain workloads.
MERGE NOTE:
DIST_SUBDIR is changed to mozilla, so now librewolf shares the same
subdir as firefox. This avoids duplicating identical copies of
mozilla PGO data on the openbsd dist server.
However, because this is using LibreWolf 154.0.1-3, the latest
version and currently cached on OpenBSD dist server, I recommend
that this patch *ONLY* be merged inside the same patch that is
next committed to update the LibreWolf version.
This way, we avoid any duplication. This means that there will
forever by a stale librewolf/ directory on the dist server. I tested
it with this change, and it works fine. LibreWolf tarballs now
download into mozilla/ on the dist server.
Signed-off-by: Leah Rowe <leah@libreboot.org>
---
www/librewolf/Makefile | 10 ++++++++--
www/librewolf/distinfo | 6 ++++--
www/librewolf/patches/patch-mozconfig | 12 ++++--------
www/mozilla/mozilla.port.mk | 2 +-
4 files changed, 17 insertions(+), 13 deletions(-)
diff --git a/www/librewolf/Makefile b/www/librewolf/Makefile
index ba70810ef68..c81ee6e014c 100644
--- a/www/librewolf/Makefile
+++ b/www/librewolf/Makefile
@@ -15,12 +15,19 @@ ONLY_FOR_ARCHS = amd64 aarch64 riscv64
# librewolf-149.0.2-2 (upstream) becomes librewolf-149.0.2pl2 (patch level 2)
MOZILLA_DIST_VERSION = 154.0.1-3
MOZILLA_VERSION = ${MOZILLA_DIST_VERSION:C/-([0-9]+)$/pl\1/}
-REVISION = 0
+REVISION = 1
MOZILLA_PROJECT = librewolf
MOZILLA_CODENAME = browser
MAINTAINER = Leah Rowe <leah@libreboot.org>
+# LibreWolf doesn't provide PGO data, but we use the data
+# provided by FireFox releases, re-using the OpenBSD distfile
+MOZILLA_PROFDATA_TASKID = bR-VI2yqTky87DcaKP4BRQ
+FFVERSION = ${MOZILLA_DIST_VERSION:C/-([0-9]+)$//}
+FFDIST = firefox-${FFVERSION}.source
+DISTFILES.profdata = ${FFDIST}-profdata.tar.xz{profdata.tar.xz}
+
HOMEPAGE = https://librewolf.net/
SO_VERSION = 3.0
# Bump minor ver if shlibs deleted in components dir to avoid pkg_add -r issues
@@ -32,7 +39,6 @@ CATEGORIES = www
MOZSITE = https://librewolf.dev/api/packages/librewolf/generic
SITES = ${MOZSITE}/librewolf-source/${MOZILLA_DIST_VERSION}/
EXTRACT_SUFX = .tar.gz
-DIST_SUBDIR = librewolf
# mozilla public license
PERMIT_PACKAGE= Yes
diff --git a/www/librewolf/distinfo b/www/librewolf/distinfo
index a9b3cc0a0e6..bdfaaaff163 100644
--- a/www/librewolf/distinfo
+++ b/www/librewolf/distinfo
@@ -1,2 +1,4 @@
-SHA256 (librewolf/librewolf-154.0.1-3.source.tar.gz) = /ubKrDD5r/bf2P6GjOhDYCsDwwcmCchv9/xsF8OXpsw=
-SIZE (librewolf/librewolf-154.0.1-3.source.tar.gz) = 1175015645
+SHA256 (mozilla/firefox-154.0.1.source-profdata.tar.xz) = BrlSCR20VLpGVd9ypwbr2A44WUherRdCu9EpR4ZJPT8=
+SHA256 (mozilla/librewolf-154.0.1-3.source.tar.gz) = /ubKrDD5r/bf2P6GjOhDYCsDwwcmCchv9/xsF8OXpsw=
+SIZE (mozilla/firefox-154.0.1.source-profdata.tar.xz) = 18840512
+SIZE (mozilla/librewolf-154.0.1-3.source.tar.gz) = 1175015645
diff --git a/www/librewolf/patches/patch-mozconfig b/www/librewolf/patches/patch-mozconfig
index 011bd84fadf..51454968286 100644
--- a/www/librewolf/patches/patch-mozconfig
+++ b/www/librewolf/patches/patch-mozconfig
@@ -10,7 +10,7 @@ restored on re-builds, matching what was produced by this patch.
Index: mozconfig
--- mozconfig.orig
+++ mozconfig
-@@ -1,20 +1,29 @@
+@@ -1,9 +1,16 @@
+# %%VARIABLE%% is replaced with a string set by the
+# OpenBSD port Makefile at build time. In addition to
+# these changes, the LibreWolf OpenBSD port Makefile
@@ -29,12 +29,8 @@ Index: mozconfig
ac_add_options --disable-updater
ac_add_options --disable-cargo-incremental
ac_add_options --enable-hardening
- ac_add_options --enable-stl-hardening
- ac_add_options --enable-optimize
- ac_add_options --enable-release
--ac_add_options --enable-rust-simd
-+# Rust SIMD option causes build errors on OpenBSD:
-+# ac_add_options --enable-rust-simd
+@@ -13,8 +20,9 @@
+ ac_add_options --enable-rust-simd
# allow replacing malloc manually, will not affect regular systems
# not compatible with ac_add_options --disable-jemalloc, which only works when preloading custom malloc
-ac_add_options --enable-replace-malloc
@@ -45,7 +41,7 @@ Index: mozconfig
ac_add_options --with-app-name=librewolf
ac_add_options --with-branding=browser/branding/librewolf
-@@ -33,7 +42,19 @@
+@@ -33,7 +41,19 @@
export CFLAGS="-ftrivial-auto-var-init=zero -fwrapv -Wno-backend-plugin $CFLAGS"
export CXXFLAGS="-ftrivial-auto-var-init=zero -fwrapv -Wno-backend-plugin $CXXFLAGS"
diff --git a/www/mozilla/mozilla.port.mk b/www/mozilla/mozilla.port.mk
index b583e5af521..68e7bc78668 100644
--- a/www/mozilla/mozilla.port.mk
+++ b/www/mozilla/mozilla.port.mk
@@ -53,7 +53,7 @@ EXTRACT_SUFX ?= .tar.xz
DIST_SUBDIR ?= mozilla
.if defined(MOZILLA_PROFDATA_TASKID)
-DISTFILES.profdata = ${DISTNAME}-profdata${EXTRACT_SUFX}{profdata${EXTRACT_SUFX}}
+DISTFILES.profdata ?= ${DISTNAME}-profdata${EXTRACT_SUFX}{profdata${EXTRACT_SUFX}}
SITES.profdata = https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/${MOZILLA_PROFDATA_TASKID}/runs/0/artifacts/public/build/
.if ${MACHINE_ARCH:Mamd64}
CONFIGURE_ARGS += --enable-profile-use
--
2.55.0
www/librewolf: speed improvements