hi everyonei said i was being awol again for a week or two and that someone else should update librewolf
then i was reminded that the release is imminent of openbsd 8.0 so i quickly did an update patch myself
here it is attached. new librewolf 157 release, syncing with openbsd firefox 157
please if you can, merge this :) i'd hate for 8.0 to have ff 157 but lw 156 works fine -- Company director, Minifree Ltd Registered in England, No. 9361826 | VAT No. GB202190462 Registered Office: 19 Hilton Road, Canvey Island, Essex SS8 9QA, UK
From c611a7f1ac41f851f32b7585e0e766305e94d070 Mon Sep 17 00:00:00 2001 From: Leah Rowe <[email protected]> Date: Fri, 2 Oct 2026 11:55:46 +0100 Subject: [PATCH 1/1] update www/librewolf to v157.0-1 copied some recent patching from firefox too bumped REVISION the same, though librewolf wasn't in 7.9-stable so this is probably pointless and librewolf can therefore probably not specify REVISION at all in the first version in 8.0 Signed-off-by: Leah Rowe <[email protected]> --- www/librewolf/Makefile | 7 ++-- www/librewolf/distinfo | 8 ++--- .../patches/patch-js_src_gc_Memory_cpp | 36 +++++++++++++++++++ .../patches/patch-js_src_gc_Memory_h | 18 ++++++++++ .../patches/patch-js_src_wasm_WasmStacks_cpp | 14 ++++++++ 5 files changed, 76 insertions(+), 7 deletions(-) create mode 100644 www/librewolf/patches/patch-js_src_gc_Memory_cpp create mode 100644 www/librewolf/patches/patch-js_src_gc_Memory_h create mode 100644 www/librewolf/patches/patch-js_src_wasm_WasmStacks_cpp diff --git a/www/librewolf/Makefile b/www/librewolf/Makefile index 955e3451fe8..533b2f7f0c3 100644 --- a/www/librewolf/Makefile +++ b/www/librewolf/Makefile @@ -13,8 +13,9 @@ ONLY_FOR_ARCHS = amd64 aarch64 riscv64 # If upstream adds revision number -x, it will become plx in OpenBSD, e.g. # librewolf-149.0.2-2 (upstream) becomes librewolf-149.0.2pl2 (patch level 2) -MOZILLA_DIST_VERSION = 156.0-1 +MOZILLA_DIST_VERSION = 157.0-1 MOZILLA_VERSION = ${MOZILLA_DIST_VERSION:C/-([0-9]+)$/pl\1/} +REVISION = 0 MOZILLA_PROJECT = librewolf MOZILLA_CODENAME = browser @@ -22,13 +23,13 @@ MAINTAINER = Leah Rowe <[email protected]> # LibreWolf doesn't provide PGO data, but we use the data # provided by FireFox releases, re-using the OpenBSD distfile -MOZILLA_PROFDATA_TASKID = Me2JtPMLQAWskffbcfqabQ +MOZILLA_PROFDATA_TASKID = BnF3vh8WT4OW53JJ0ow3mQ 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 = 5.0 +SO_VERSION = 6.0 # Bump minor ver if shlibs deleted in components dir to avoid pkg_add -r issues MOZILLA_LIBS = mozavcodec mozavutil mozgtk mozinference mozwayland xul \ clearkey gkcodecs lgpllibs mozsqlite3 diff --git a/www/librewolf/distinfo b/www/librewolf/distinfo index f9524a72065..0fcbdf9217b 100644 --- a/www/librewolf/distinfo +++ b/www/librewolf/distinfo @@ -1,4 +1,4 @@ -SHA256 (mozilla/firefox-156.0.source-profdata.tar.xz) = AUK49GTBAr1s+gmczT2IEkb9SLT+b2TMQSv3Px9Sgok= -SHA256 (mozilla/librewolf-156.0-1.source.tar.gz) = Y9XWnE9Fjhomzgl0885DxGNF2RJFLBViFXFQ9xEX86k= -SIZE (mozilla/firefox-156.0.source-profdata.tar.xz) = 18922740 -SIZE (mozilla/librewolf-156.0-1.source.tar.gz) = 1170660313 +SHA256 (mozilla/firefox-157.0.source-profdata.tar.xz) = lwkzOiqkOrreLbO+tEnGwySn0Mb2+W4bNQBL39D/7/c= +SHA256 (mozilla/librewolf-157.0-1.source.tar.gz) = vqPMfFfz+4ko1YOgYDsPQBMLAvZi4DJ0Y0WlHg9V/7M= +SIZE (mozilla/firefox-157.0.source-profdata.tar.xz) = 18900828 +SIZE (mozilla/librewolf-157.0-1.source.tar.gz) = 1178691023 diff --git a/www/librewolf/patches/patch-js_src_gc_Memory_cpp b/www/librewolf/patches/patch-js_src_gc_Memory_cpp new file mode 100644 index 00000000000..ed8ff73cccc --- /dev/null +++ b/www/librewolf/patches/patch-js_src_gc_Memory_cpp @@ -0,0 +1,36 @@ +https://hg.mozilla.org/mozilla-central/rev/b3a14f8efa23 + +Index: js/src/gc/Memory.cpp +--- js/src/gc/Memory.cpp.orig ++++ js/src/gc/Memory.cpp +@@ -532,6 +532,30 @@ void MapStack(size_t stackSize) { + #endif + } + ++void* MapAlignedPagesAsStack(size_t length, size_t alignment, ++ StallAndRetry stallAndRetry) { ++ void* region = MapAlignedPages(length, alignment, stallAndRetry); ++ if (!region) { ++ return nullptr; ++ } ++ ++#ifdef __OpenBSD__ ++ // OpenBSD kills the process if the stack pointer points into memory not ++ // mapped with MAP_STACK. That flag can only be set at mmap() time, so remap ++ // the region in place. The pages are freshly mapped and untouched, so ++ // discarding their contents here is fine. ++ void* result = MozTaggedAnonymousMmap( ++ region, length, int(PageAccess::ReadWrite), ++ MAP_PRIVATE | MAP_ANON | MAP_FIXED | MAP_STACK, -1, 0, "js-gc-stack"); ++ if (result != region) { ++ UnmapPages(region, length); ++ return nullptr; ++ } ++#endif ++ ++ return region; ++} ++ + void CheckMemorySubsystemOnShutDown() { + MOZ_ASSERT(gMappedMemorySizeBytes == 0); + } diff --git a/www/librewolf/patches/patch-js_src_gc_Memory_h b/www/librewolf/patches/patch-js_src_gc_Memory_h new file mode 100644 index 00000000000..423697789b4 --- /dev/null +++ b/www/librewolf/patches/patch-js_src_gc_Memory_h @@ -0,0 +1,18 @@ +https://hg.mozilla.org/mozilla-central/rev/b3a14f8efa23 + +Index: js/src/gc/Memory.h +--- js/src/gc/Memory.h.orig ++++ js/src/gc/Memory.h +@@ -56,6 +56,12 @@ void UnmapPages(void* region, size_t length); + // the space that the stack may expand into. (Only on Linux fuzzing builds.) + void MapStack(size_t stackSize); + ++// Like MapAlignedPages, but the returned region is also usable as a call stack. ++// Some systems (notably OpenBSD) terminate the process if the stack pointer ++// points into memory that was not mapped with MAP_STACK. ++void* MapAlignedPagesAsStack(size_t length, size_t alignment, ++ StallAndRetry stallAndRetry = StallAndRetry::No); ++ + // We only decommit unused pages if the system page size is the same as the + // hardcoded page size for the build. + bool DecommitEnabled(); diff --git a/www/librewolf/patches/patch-js_src_wasm_WasmStacks_cpp b/www/librewolf/patches/patch-js_src_wasm_WasmStacks_cpp new file mode 100644 index 00000000000..81bbe151b4f --- /dev/null +++ b/www/librewolf/patches/patch-js_src_wasm_WasmStacks_cpp @@ -0,0 +1,14 @@ +https://hg.mozilla.org/mozilla-central/rev/b3a14f8efa23 + +Index: js/src/wasm/WasmStacks.cpp +--- js/src/wasm/WasmStacks.cpp.orig ++++ js/src/wasm/WasmStacks.cpp +@@ -874,7 +874,7 @@ ContStackArena::~ContStackArena() { + /* static */ + UniqueContStackArena ContStackArena::create(ContStackAllocator* owner) { + size_t arenaSize = owner->arenaSize(); +- void* arenaBase = gc::MapAlignedPages(arenaSize, ContStackAlignment); ++ void* arenaBase = gc::MapAlignedPagesAsStack(arenaSize, ContStackAlignment); + if (!arenaBase) { + return nullptr; + } -- 2.47.3
OpenPGP_0x5C654067D383B1FF.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature
