On Mon, Mar 30, 2026 at 11:27:07AM +0100, Stuart Henderson wrote:
> Is anyone able to test on armv7/powerpc please? I think that "make
> test" would be likely to pick up problems if there are any.
>
> | 2. The SIMD dispatchers now use `getauxval()` or `elf_aux_info()`, if
> | available, to detect support for Neon and AltiVec instructions on AArch32 and
> | PowerPC Linux, Android, and *BSD systems.
>
> Some of the other changes
> (https://github.com/libjpeg-turbo/libjpeg-turbo/releases/tag/3.1.4.1)
> would be nice to have before release, but not at the expense of breaking
> things on those archs if there are problems
Hi,
the port built without issues on armv7 and passed all tests:
100% tests passed, 0 tests failed out of 648
--
Matthieu Herrb
Tuesday, March 31, 2026
Re: UPDATE: sysutils/exfetch -> 1.6
diff --git sysutils/exfetch/Makefile sysutils/exfetch/Makefile
index ea446ebbd5a..8ae5ae1e960 100644
--- sysutils/exfetch/Makefile
+++ sysutils/exfetch/Makefile
@@ -1,12 +1,9 @@
COMMENT = shell-extensible fetching program
-DIST_TUPLE += codeberg izder456 exfetch 1.5.4 .
+DIST_TUPLE += codeberg izder456 exfetch 1.6 .
DIST_TUPLE += github schovi baked_file_system \
f4f658812c5b8b404437d8cf34b72a0eb5fe7701 \
lib/baked_file_system
-REVISION = 0
-
-WRKDIST = ${WRKDIR}/exfetch
CATEGORIES = sysutils
@@ -28,6 +25,8 @@ WANTLIB += pthread z
FAKE_FLAGS = PREFIX=${TRUEPREFIX} \
MANDIR=${TRUEPREFIX}/man/man1
+MAKE_FLAGS = DEBUG=on
+
DEBUG_PACKAGES = ${BUILD_PACKAGES}
.include <bsd.port.mk>
diff --git sysutils/exfetch/distinfo sysutils/exfetch/distinfo
index 10913892cd6..7c64dee11a6 100644
--- sysutils/exfetch/distinfo
+++ sysutils/exfetch/distinfo
@@ -1,4 +1,4 @@
-SHA256 (izder456-exfetch-1.5.4.tar.gz) = sBsrodgP/Ha2ijwKzXDe1OOBZO1+vO7+VtM0wFCImSo=
+SHA256 (izder456-exfetch-1.6.tar.gz) = Sgy9ta4gnPBwjM9/5dI9W5I6wa3Ywii3uSbiYDy32NE=
SHA256 (schovi-baked_file_system-f4f658812c5b8b404437d8cf34b72a0eb5fe7701.tar.gz) = tTPwhaL4SoA31VcKAO5Gj6WSUmMTbAaBgGoCQU6Cj8w=
-SIZE (izder456-exfetch-1.5.4.tar.gz) = 26260
+SIZE (izder456-exfetch-1.6.tar.gz) = 26888
SIZE (schovi-baked_file_system-f4f658812c5b8b404437d8cf34b72a0eb5fe7701.tar.gz) = 56332
diff --git sysutils/exfetch/patches/patch-Makefile sysutils/exfetch/patches/patch-Makefile
deleted file mode 100644
index 5f58b31ea7a..00000000000
--- sysutils/exfetch/patches/patch-Makefile
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: Makefile
---- Makefile.orig
-+++ Makefile
-@@ -29,7 +29,7 @@ $(BIN):
- if [ "$(HARDENING)" = "on" ]; then flags="$$flags --link-flags -Wl,-zrelro,-znow"; fi; \
- ascii_files="$$(find src/exfetch/ascii -type f -name '*.ascii' | xargs -n1 basename)"; \
- printf "Found ASCII files:\n$$ascii_files\n"; \
-- ASCII_FILES="$$ascii_files" shards --no-color -v build -s -t -p --production --release $$flags
-+ ASCII_FILES="$$ascii_files" shards --no-color -v build --debug -s -t -p --production --release $$flags
-
- run:
- @flags=""; \
On Fri, 27 Mar 2026 12:21:53 -0500
izzy Meyer <izder456@disroot.org> wrote:
> Hello ports@
>
> Here's a small update that drops the patch enabling debug packages
> for exfetch, and two smaller changes that don't really affect us on
> OpenBSD. I plan this will be the last update of this package before
> OpenBSD 7.9 reaches -release status.
>
> I added an optional MAKE_FLAG "DEBUG", that when set to "on" will
> enable crystal's --debug flag at build time. This simplifies the port
> quite a bit and avoids the need for patching the Makefile.
>
> Changelog:
> * Since(1.5.4)
>
> Misc Changes:
> - Added new DEBUG flag to optionally build
> with debug symbols
>
> Optimizations:
>
> Bugfixes:
> - Fix gpu detection normalization
>
> New features:
> - Added eopkg support in package count
>
> (copied bentley@ as he was the one who messaged me for an OK about the
> last commit on this port patching debug builds into the port to see
> his thoughts on the matter)
>
> OK?
>
> Thanks.
>
Here,s a new diff which additionally removes WRKDIST as this commit [1]
fixes that hack I used.
[1]
https://cvsweb.openbsd.org/annotate/ports/infrastructure/mk/bsd.port.mk,v?rev=1.1648&sort=File
Also, copied thfr@ as he was the one who authored the change to
bsd.port.mk to make sure I did this correctly.
OK for commit?
--
iz (she/her)
> i like to say mundane things,
> there are too many uninteresting things
> that go unnoticed.
izder456 (dot) neocities (dot) org
index ea446ebbd5a..8ae5ae1e960 100644
--- sysutils/exfetch/Makefile
+++ sysutils/exfetch/Makefile
@@ -1,12 +1,9 @@
COMMENT = shell-extensible fetching program
-DIST_TUPLE += codeberg izder456 exfetch 1.5.4 .
+DIST_TUPLE += codeberg izder456 exfetch 1.6 .
DIST_TUPLE += github schovi baked_file_system \
f4f658812c5b8b404437d8cf34b72a0eb5fe7701 \
lib/baked_file_system
-REVISION = 0
-
-WRKDIST = ${WRKDIR}/exfetch
CATEGORIES = sysutils
@@ -28,6 +25,8 @@ WANTLIB += pthread z
FAKE_FLAGS = PREFIX=${TRUEPREFIX} \
MANDIR=${TRUEPREFIX}/man/man1
+MAKE_FLAGS = DEBUG=on
+
DEBUG_PACKAGES = ${BUILD_PACKAGES}
.include <bsd.port.mk>
diff --git sysutils/exfetch/distinfo sysutils/exfetch/distinfo
index 10913892cd6..7c64dee11a6 100644
--- sysutils/exfetch/distinfo
+++ sysutils/exfetch/distinfo
@@ -1,4 +1,4 @@
-SHA256 (izder456-exfetch-1.5.4.tar.gz) = sBsrodgP/Ha2ijwKzXDe1OOBZO1+vO7+VtM0wFCImSo=
+SHA256 (izder456-exfetch-1.6.tar.gz) = Sgy9ta4gnPBwjM9/5dI9W5I6wa3Ywii3uSbiYDy32NE=
SHA256 (schovi-baked_file_system-f4f658812c5b8b404437d8cf34b72a0eb5fe7701.tar.gz) = tTPwhaL4SoA31VcKAO5Gj6WSUmMTbAaBgGoCQU6Cj8w=
-SIZE (izder456-exfetch-1.5.4.tar.gz) = 26260
+SIZE (izder456-exfetch-1.6.tar.gz) = 26888
SIZE (schovi-baked_file_system-f4f658812c5b8b404437d8cf34b72a0eb5fe7701.tar.gz) = 56332
diff --git sysutils/exfetch/patches/patch-Makefile sysutils/exfetch/patches/patch-Makefile
deleted file mode 100644
index 5f58b31ea7a..00000000000
--- sysutils/exfetch/patches/patch-Makefile
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: Makefile
---- Makefile.orig
-+++ Makefile
-@@ -29,7 +29,7 @@ $(BIN):
- if [ "$(HARDENING)" = "on" ]; then flags="$$flags --link-flags -Wl,-zrelro,-znow"; fi; \
- ascii_files="$$(find src/exfetch/ascii -type f -name '*.ascii' | xargs -n1 basename)"; \
- printf "Found ASCII files:\n$$ascii_files\n"; \
-- ASCII_FILES="$$ascii_files" shards --no-color -v build -s -t -p --production --release $$flags
-+ ASCII_FILES="$$ascii_files" shards --no-color -v build --debug -s -t -p --production --release $$flags
-
- run:
- @flags=""; \
On Fri, 27 Mar 2026 12:21:53 -0500
izzy Meyer <izder456@disroot.org> wrote:
> Hello ports@
>
> Here's a small update that drops the patch enabling debug packages
> for exfetch, and two smaller changes that don't really affect us on
> OpenBSD. I plan this will be the last update of this package before
> OpenBSD 7.9 reaches -release status.
>
> I added an optional MAKE_FLAG "DEBUG", that when set to "on" will
> enable crystal's --debug flag at build time. This simplifies the port
> quite a bit and avoids the need for patching the Makefile.
>
> Changelog:
> * Since(1.5.4)
>
> Misc Changes:
> - Added new DEBUG flag to optionally build
> with debug symbols
>
> Optimizations:
>
> Bugfixes:
> - Fix gpu detection normalization
>
> New features:
> - Added eopkg support in package count
>
> (copied bentley@ as he was the one who messaged me for an OK about the
> last commit on this port patching debug builds into the port to see
> his thoughts on the matter)
>
> OK?
>
> Thanks.
>
Here,s a new diff which additionally removes WRKDIST as this commit [1]
fixes that hack I used.
[1]
https://cvsweb.openbsd.org/annotate/ports/infrastructure/mk/bsd.port.mk,v?rev=1.1648&sort=File
Also, copied thfr@ as he was the one who authored the change to
bsd.port.mk to make sure I did this correctly.
OK for commit?
--
iz (she/her)
> i like to say mundane things,
> there are too many uninteresting things
> that go unnoticed.
izder456 (dot) neocities (dot) org
Fish Shell, understanding versioning ports vs packages
Would someone be so kind as to explain how package "progression" works?
I am currently (happily) automating OpenBSD builds with sitesXX.tgz and autoinstall.
I am trying to add Fish shell to this. (rsync the packages locally so I can build off net)
I've seen in the package directory at the mirror site, version 4.1.1 (september 2025)
/pub/OpenBSD/7.8/packages/amd64/
fish-4.1.1.tgz
(On a Linux box I have, its 4.2.0. And the current Fish release is 4.6.0)
In the CVS repository
https://cvsweb.openbsd.org/log/ports/shells/fish/main/pkg/PLIST,v?sort=File
It shows:
revision 1.9/ (Download) - annotate - Sun, 29 Mar 2026 11:33:29 UTC by volker
Changes since 1.8: +1 -0 (diff)
shells/fish/main: Update to 4.6.0
From Maintainer Florian Viehweger, thanks
So my "guess" is that this is the "ports" version?
Questions:
--------------------------------------------------------------------------How does an application get "promoted" to a new version in packages?
If I want to run the latest 4.6.0, is it "safe" to use the version in ports?
(assume I can just run make in the ports directory for it?)
Are all packages in the mirror held at the original version from that release date?
And its up to me the user to update with ports before the next OpenBSD release if I wish?
Thanks, sorry for the questions. Just eager to learn more on this topic.
I am currently (happily) automating OpenBSD builds with sitesXX.tgz and autoinstall.
I am trying to add Fish shell to this. (rsync the packages locally so I can build off net)
I've seen in the package directory at the mirror site, version 4.1.1 (september 2025)
/pub/OpenBSD/7.8/packages/amd64/
fish-4.1.1.tgz
(On a Linux box I have, its 4.2.0. And the current Fish release is 4.6.0)
In the CVS repository
https://cvsweb.openbsd.org/log/ports/shells/fish/main/pkg/PLIST,v?sort=File
It shows:
revision 1.9/ (Download) - annotate - Sun, 29 Mar 2026 11:33:29 UTC by volker
Changes since 1.8: +1 -0 (diff)
shells/fish/main: Update to 4.6.0
From Maintainer Florian Viehweger, thanks
So my "guess" is that this is the "ports" version?
Questions:
--------------------------------------------------------------------------How does an application get "promoted" to a new version in packages?
If I want to run the latest 4.6.0, is it "safe" to use the version in ports?
(assume I can just run make in the ports directory for it?)
Are all packages in the mirror held at the original version from that release date?
And its up to me the user to update with ports before the next OpenBSD release if I wish?
Thanks, sorry for the questions. Just eager to learn more on this topic.
games/solarus: update to 2.0.3 and take maintainer
Hi,
Please find below a diff to update games/solarus.
With this version, it can run the just released commercial game
"Tombwater" [1]. I've tried the latest version of
games/solarus/{roth,zsdx,zsxd} and they all work (limited testing for a
few minutes). The update below includes updates to the latest releases
of those, too.
The projects have all moved to Gitlab. solarus now only builds the CLI
(solarus-run). Not sure why, but I looked for any cmake knobs but there
doesn't seem to be anything to enable solarus-launcher now.
With offering to take MAINTAINER, I would want to question if we should
really keep solarus/{roth,zsdx,zsxd}, as they all use assets from the
original Zelda: A Link to the Past. They state in their licenses that
those belong to Nintendo and the assets are included under fair use
(see for example [2]). I would question the utility of this potential
liability with distributing said assets, as playing the games (and
several others) can be done easily by just downloading the .solarus
file from [3] and launching it something like this:
$ solarus-run zelda-roth-se-v1.2.1.solarus
So the alternative would be to delete solarus/{roth,zsdx,zsxd} and
possibly move games/solarus/solarus to games/solarus. Or we consider if
maybe roth, zsdx, and zsxd should not be PERMIT_PACKAGE=Yes ...? But
the build is really just one step of zipping up pre-existing content
into a zip archive ending in .solarus.
I'd be happy to share a new diff removing roth, zsdx, and zsxd if there
were a consensus...
[1] https://store.steampowered.com/app/3308200/Tombwater/
[2]
https://gitlab.com/solarus-games/games/zelda-roth-se/-/blob/dev/license.txt?ref_type=heads
[3] https://www.solarus-games.org/games/
Index: Makefile.inc
===================================================================
RCS file: /cvs/ports/games/solarus/Makefile.inc,v
diff -u -p -r1.5 Makefile.inc
--- Makefile.inc 11 Mar 2022 19:04:56 -0000 1.5
+++ Makefile.inc 31 Mar 2026 23:17:00 -0000
@@ -1,6 +1,8 @@
-# Issues with powerpc, working on it.
+# Issues with powerpc
NOT_FOR_ARCHS = powerpc
CATEGORIES ?= games x11
+
+MAINTAINER ?= Thomas Frohwein <thfr@openbsd.org>
NO_TEST = Yes
Index: roth/Makefile
===================================================================
RCS file: /cvs/ports/games/solarus/roth/Makefile,v
diff -u -p -r1.9 Makefile
--- roth/Makefile 13 Feb 2026 12:02:16 -0000 1.9
+++ roth/Makefile 31 Mar 2026 23:17:00 -0000
@@ -1,11 +1,11 @@
COMMENT = fan made Zelda game for Solarus engine
-GH_ACCOUNT= christopho
-GH_PROJECT= zelda_roth_se
-GH_TAGNAME= v1.1.0
-REVISION = 1
+V = 1.2.1
+H = 9e8e2247a6767269d0d48bb420dd163d9c8cc3b8
+PKGNAME = zelda_roth_se-${V}
+DIST_TUPLE = gitlab solarus-games/games zelda-roth-se v${V} .
-HOMEPAGE = https://www.solarus-games.org/en/games/the-legend-of-zelda-return-of-the-hylian-se
+HOMEPAGE = https://www.solarus-games.org/games/the-legend-of-zelda-return-of-the-hylian-se
# GPLv3+ and CC BY-SA 3.0
PERMIT_PACKAGE = Yes
@@ -14,7 +14,11 @@ MODULES = devel/cmake
BUILD_DEPENDS = archivers/zip
-RUN_DEPENDS = games/solarus/solarus>=1.5.0
+RUN_DEPENDS = games/solarus/solarus>=1.5.0 \
+ devel/desktop-file-utils \
+ x11/gtk+4,-guic
+
+WRKDIST = ${WRKDIR}/zelda-roth-se-v${V}-${H}
MODCMAKE_POLICY_VERSION_OVERRIDE = Yes
Index: roth/distinfo
===================================================================
RCS file: /cvs/ports/games/solarus/roth/distinfo,v
diff -u -p -r1.2 distinfo
--- roth/distinfo 11 Aug 2016 11:29:10 -0000 1.2
+++ roth/distinfo 31 Mar 2026 23:17:00 -0000
@@ -1,2 +1,2 @@
-SHA256 (zelda_roth_se-1.1.0.tar.gz) = mVVPlfvuCr5DFLZLuASPrWV+J5SDIGRRBgp0G+9ltUQ=
-SIZE (zelda_roth_se-1.1.0.tar.gz) = 6179623
+SHA256 (solarus-games/games-zelda-roth-se-v1.2.1.tar.gz) = yWyfvrECuUq0XRfPLf2NBQnq0mfGadBoCqzMxOsZjks=
+SIZE (solarus-games/games-zelda-roth-se-v1.2.1.tar.gz) = 6227691
Index: roth/patches/patch-CMakeLists_txt
===================================================================
RCS file: roth/patches/patch-CMakeLists_txt
diff -N roth/patches/patch-CMakeLists_txt
--- roth/patches/patch-CMakeLists_txt 11 Mar 2022 19:04:56 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-From 8dc14b86107d56b893fbaec765f9091a56e6d655 Mon Sep 17 00:00:00 2001
-From: Jasper Lievisse Adriaanse <jasper@humppa.nl>
-Date: Thu, 11 Aug 2016 13:37:51 +0200
-Subject: [PATCH] Fix 'bad $-escape' build error by escaping '$'
-
---- CMakeLists.txt.orig Wed Jul 27 21:54:33 2016
-+++ CMakeLists.txt Thu Aug 11 13:25:49 2016
-@@ -47,7 +47,7 @@ add_custom_target(${quest_name}_data
- add_custom_command(
- OUTPUT ${quest_name}
- COMMAND echo '\#!/bin/sh' > ${quest_name}
-- COMMAND echo 'solarus-run ${CMAKE_INSTALL_PREFIX}/share/solarus/${quest_name} $*' >> ${quest_name}
-+ COMMAND echo 'solarus-run ${CMAKE_INSTALL_PREFIX}/share/solarus/${quest_name} $$*' >> ${quest_name}
- )
- add_custom_target(${quest_name}_command
- ALL
Index: roth/pkg/PLIST
===================================================================
RCS file: /cvs/ports/games/solarus/roth/pkg/PLIST,v
diff -u -p -r1.2 PLIST
--- roth/pkg/PLIST 11 Mar 2022 19:04:56 -0000 1.2
+++ roth/pkg/PLIST 31 Mar 2026 23:17:00 -0000
@@ -1,4 +1,20 @@
bin/zelda_roth_se
+share/applications/zelda-roth-se.desktop
+share/icons/hicolor/1024x1024/
+share/icons/hicolor/1024x1024/apps/
+share/icons/hicolor/1024x1024/apps/zelda-roth-se.png
+share/icons/hicolor/128x128/apps/zelda-roth-se.png
+share/icons/hicolor/16x16/apps/zelda-roth-se.png
+share/icons/hicolor/24x24/apps/zelda-roth-se.png
+share/icons/hicolor/256x256/apps/zelda-roth-se.png
+share/icons/hicolor/32x32/apps/zelda-roth-se.png
+share/icons/hicolor/48x48/apps/zelda-roth-se.png
+share/icons/hicolor/512x512/apps/zelda-roth-se.png
+share/icons/hicolor/64x64/apps/zelda-roth-se.png
+share/pixmaps/
+share/pixmaps/zelda-roth-se.png
share/solarus/
share/solarus/zelda_roth_se/
share/solarus/zelda_roth_se/data.solarus
+@tag update-desktop-database
+@tag gtk-update-icon-cache %D/share/icons/hicolor
Index: solarus/Makefile
===================================================================
RCS file: /cvs/ports/games/solarus/solarus/Makefile,v
diff -u -p -r1.35 Makefile
--- solarus/Makefile 13 Feb 2026 12:02:16 -0000 1.35
+++ solarus/Makefile 31 Mar 2026 23:17:00 -0000
@@ -1,28 +1,26 @@
-V = 1.6.0
COMMENT = open-source Zelda-like 2D game engine
-DISTNAME = solarus-${V}-src
-PKGNAME = solarus-${V}
-REVISION = 5
-SHARED_LIBS += solarus 0.0 # 1.5
+V = 2.0.3
+H = d5e170be67a0119d73a502988e91bffcf04c3e06
+DIST_TUPLE = gitlab solarus-games solarus v${V} .
+
+SHARED_LIBS += solarus 1.0 # 2.0
HOMEPAGE = https://www.solarus-games.org/
# GPLv3+
PERMIT_PACKAGE = Yes
-WANTLIB += Qt5Core Qt5Gui Qt5Widgets SDL2 SDL2_image SDL2_ttf
+WANTLIB += SDL2 SDL2_image SDL2_ttf
WANTLIB += c luajit-5.1 m modplug ogg openal physfs pthread vorbis
-WANTLIB += vorbisfile GL GLU ${COMPILER_LIBCXX}
-
-SITES = https://www.solarus-games.org/downloads/solarus/
+WANTLIB += vorbisfile GL ${COMPILER_LIBCXX}
MODULES += devel/cmake \
- lang/lua \
- x11/qt5
+ lang/lua
COMPILER = base-clang ports-gcc
+# also in configure: glm, vorbisfile
LIB_DEPENDS = audio/libmodplug \
audio/libvorbis \
audio/openal \
@@ -33,7 +31,7 @@ LIB_DEPENDS = audio/libmodplug \
RUN_DEPENDS = devel/desktop-file-utils \
x11/gtk+4,-guic
-WRKDIST = ${WRKDIR}/solarus-${V}
+WRKDIST = ${WRKDIR}/solarus-v${V}-${H}
MODCMAKE_POLICY_VERSION_OVERRIDE = Yes
Index: solarus/distinfo
===================================================================
RCS file: /cvs/ports/games/solarus/solarus/distinfo,v
diff -u -p -r1.11 distinfo
--- solarus/distinfo 1 Apr 2019 05:54:31 -0000 1.11
+++ solarus/distinfo 31 Mar 2026 23:17:00 -0000
@@ -1,2 +1,2 @@
-SHA256 (solarus-1.6.0-src.tar.gz) = 2AD984j4YHMvLUDI3WNcNP0cRShX91v5s6Qh4+9e51E=
-SIZE (solarus-1.6.0-src.tar.gz) = 3982219
+SHA256 (solarus-games-solarus-v2.0.3.tar.gz) = 3J8gEJPpn31TIbJbSdmrueSchErL5AdC3ViOqFCprg8=
+SIZE (solarus-games-solarus-v2.0.3.tar.gz) = 70916189
Index: solarus/patches/patch-cmake_AddInstallTargets_cmake
===================================================================
RCS file: solarus/patches/patch-cmake_AddInstallTargets_cmake
diff -N solarus/patches/patch-cmake_AddInstallTargets_cmake
--- solarus/patches/patch-cmake_AddInstallTargets_cmake 11 Mar 2022 19:04:56 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-Index: cmake/AddInstallTargets.cmake
---- cmake/AddInstallTargets.cmake.orig
-+++ cmake/AddInstallTargets.cmake
-@@ -13,7 +13,7 @@ if(EXISTS '/usr/bin/apt')
- else()
- set(SOLARUS_EXECUTABLE_INSTALL_DESTINATION "bin" CACHE PATH "Binary install destination")
- endif()
--set(SOLARUS_MANUAL_INSTALL_DESTINATION "share/man" CACHE PATH "Manual install destination")
-+set(SOLARUS_MANUAL_INSTALL_DESTINATION "man" CACHE PATH "Manual install destination")
- set(SOLARUS_HEADERS_INSTALL_DESTINATION "include" CACHE PATH "Headers install destination")
-
- # Files to install with make install.
Index: solarus/pkg/PLIST
===================================================================
RCS file: /cvs/ports/games/solarus/solarus/pkg/PLIST,v
diff -u -p -r1.9 PLIST
--- solarus/pkg/PLIST 11 Mar 2022 19:04:56 -0000 1.9
+++ solarus/pkg/PLIST 31 Mar 2026 23:17:00 -0000
@@ -1,24 +1,34 @@
-@bin bin/solarus-launcher
@bin bin/solarus-run
include/solarus/
include/solarus/audio/
+include/solarus/audio/ALWrapper.h
include/solarus/audio/ItDecoder.h
include/solarus/audio/Music.h
+include/solarus/audio/MusicPtr.h
+include/solarus/audio/MusicSystem.h
include/solarus/audio/OggDecoder.h
include/solarus/audio/Sound.h
+include/solarus/audio/SoundBuffer.h
+include/solarus/audio/SoundPtr.h
include/solarus/audio/SpcDecoder.h
include/solarus/containers/
+include/solarus/containers/FreeList.h
include/solarus/containers/Grid.h
include/solarus/containers/Quadtree.h
include/solarus/containers/Quadtree.inl
+include/solarus/containers/VecMap.h
include/solarus/core/
include/solarus/core/Ability.h
include/solarus/core/AbilityInfo.h
include/solarus/core/AndroidConfig.h
include/solarus/core/AppleInterface.h
include/solarus/core/Arguments.h
+include/solarus/core/Command.h
include/solarus/core/CommandsEffects.h
include/solarus/core/Common.h
+include/solarus/core/Controls.h
+include/solarus/core/ControlsDispatcher.h
+include/solarus/core/ControlsPtr.h
include/solarus/core/CurrentQuest.h
include/solarus/core/Debug.h
include/solarus/core/Dialog.h
@@ -29,19 +39,26 @@ include/solarus/core/EnumInfo.inl
include/solarus/core/Equipment.h
include/solarus/core/EquipmentItem.h
include/solarus/core/EquipmentItemUsage.h
+include/solarus/core/FRectangle.h
+include/solarus/core/FRectangle.inl
+include/solarus/core/FlagSet.h
+include/solarus/core/FlagSet.inl
include/solarus/core/FontResource.h
include/solarus/core/Game.h
-include/solarus/core/GameCommand.h
-include/solarus/core/GameCommands.h
include/solarus/core/Geometry.h
include/solarus/core/InputEvent.h
+include/solarus/core/Joypad.h
include/solarus/core/Logger.h
include/solarus/core/MainLoop.h
include/solarus/core/Map.h
include/solarus/core/MapData.h
+include/solarus/core/MapPtr.h
+include/solarus/core/PerfCounter.h
+include/solarus/core/PerfCounter.inl
include/solarus/core/PixelBits.h
include/solarus/core/Point.h
include/solarus/core/Point.inl
+include/solarus/core/Profiler.h
include/solarus/core/QuestDatabase.h
include/solarus/core/QuestFiles.h
include/solarus/core/QuestProperties.h
@@ -52,6 +69,7 @@ include/solarus/core/ResourceProvider.h
include/solarus/core/ResourceType.h
include/solarus/core/Savegame.h
include/solarus/core/SavegameConverterV1.h
+include/solarus/core/SavegamePtr.h
include/solarus/core/Scale.h
include/solarus/core/Scale.inl
include/solarus/core/Settings.h
@@ -67,7 +85,6 @@ include/solarus/core/Transform.h
include/solarus/core/Transform.inl
include/solarus/core/Treasure.h
include/solarus/core/config.h
-include/solarus/core/config.h.in
include/solarus/entities/
include/solarus/entities/AnimatedTilePattern.h
include/solarus/entities/Arrow.h
@@ -150,6 +167,7 @@ include/solarus/graphics/ShaderData.h
include/solarus/graphics/ShaderPtr.h
include/solarus/graphics/SoftwarePixelFilter.h
include/solarus/graphics/SoftwareVideoMode.h
+include/solarus/graphics/SolarusGl.h
include/solarus/graphics/Sprite.h
include/solarus/graphics/SpriteAnimation.h
include/solarus/graphics/SpriteAnimationDirection.h
@@ -167,30 +185,16 @@ include/solarus/graphics/TransitionScrol
include/solarus/graphics/VertexArray.h
include/solarus/graphics/VertexArrayPtr.h
include/solarus/graphics/Video.h
+include/solarus/graphics/View.h
include/solarus/graphics/glrenderer/
include/solarus/graphics/glrenderer/GlRenderer.h
include/solarus/graphics/glrenderer/GlShader.h
include/solarus/graphics/glrenderer/GlTexture.h
-include/solarus/graphics/glrenderer/gles2funcs.h
+include/solarus/graphics/quest_icon.h
include/solarus/graphics/sdlrenderer/
include/solarus/graphics/sdlrenderer/SDLRenderer.h
include/solarus/graphics/sdlrenderer/SDLShader.h
include/solarus/graphics/sdlrenderer/SDLSurfaceImpl.h
-include/solarus/gui/
-include/solarus/gui/about_dialog.h
-include/solarus/gui/console.h
-include/solarus/gui/console_line_edit.h
-include/solarus/gui/gui_common.h
-include/solarus/gui/gui_tools.h
-include/solarus/gui/main_window.h
-include/solarus/gui/quest_runner.h
-include/solarus/gui/quests_item_delegate.h
-include/solarus/gui/quests_model.h
-include/solarus/gui/quests_view.h
-include/solarus/gui/settings.h
-include/solarus/gui/ui_about_dialog.h
-include/solarus/gui/ui_console.h
-include/solarus/gui/ui_main_window.h
include/solarus/hero/
include/solarus/hero/BackToSolidGroundState.h
include/solarus/hero/BoomerangState.h
@@ -225,6 +229,8 @@ include/solarus/hero/VictoryState.h
include/solarus/lua/
include/solarus/lua/ExportableToLua.h
include/solarus/lua/ExportableToLuaPtr.h
+include/solarus/lua/LuaBind.h
+include/solarus/lua/LuaBind.inl
include/solarus/lua/LuaContext.h
include/solarus/lua/LuaData.h
include/solarus/lua/LuaException.h
@@ -248,292 +254,15 @@ include/solarus/movements/RelativeMoveme
include/solarus/movements/StraightMovement.h
include/solarus/movements/TargetMovement.h
include/solarus/third_party/
-include/solarus/third_party/glm/
-include/solarus/third_party/glm/CMakeLists.txt
-include/solarus/third_party/glm/common.hpp
-include/solarus/third_party/glm/detail/
-include/solarus/third_party/glm/detail/_features.hpp
-include/solarus/third_party/glm/detail/_fixes.hpp
-include/solarus/third_party/glm/detail/_noise.hpp
-include/solarus/third_party/glm/detail/_swizzle.hpp
-include/solarus/third_party/glm/detail/_swizzle_func.hpp
-include/solarus/third_party/glm/detail/_vectorize.hpp
-include/solarus/third_party/glm/detail/dummy.cpp
-include/solarus/third_party/glm/detail/func_common.hpp
-include/solarus/third_party/glm/detail/func_common.inl
-include/solarus/third_party/glm/detail/func_exponential.hpp
-include/solarus/third_party/glm/detail/func_exponential.inl
-include/solarus/third_party/glm/detail/func_geometric.hpp
-include/solarus/third_party/glm/detail/func_geometric.inl
-include/solarus/third_party/glm/detail/func_integer.hpp
-include/solarus/third_party/glm/detail/func_integer.inl
-include/solarus/third_party/glm/detail/func_matrix.hpp
-include/solarus/third_party/glm/detail/func_matrix.inl
-include/solarus/third_party/glm/detail/func_packing.hpp
-include/solarus/third_party/glm/detail/func_packing.inl
-include/solarus/third_party/glm/detail/func_trigonometric.hpp
-include/solarus/third_party/glm/detail/func_trigonometric.inl
-include/solarus/third_party/glm/detail/func_vector_relational.hpp
-include/solarus/third_party/glm/detail/func_vector_relational.inl
-include/solarus/third_party/glm/detail/glm.cpp
-include/solarus/third_party/glm/detail/intrinsic_common.hpp
-include/solarus/third_party/glm/detail/intrinsic_common.inl
-include/solarus/third_party/glm/detail/intrinsic_exponential.hpp
-include/solarus/third_party/glm/detail/intrinsic_exponential.inl
-include/solarus/third_party/glm/detail/intrinsic_geometric.hpp
-include/solarus/third_party/glm/detail/intrinsic_geometric.inl
-include/solarus/third_party/glm/detail/intrinsic_integer.hpp
-include/solarus/third_party/glm/detail/intrinsic_integer.inl
-include/solarus/third_party/glm/detail/intrinsic_matrix.hpp
-include/solarus/third_party/glm/detail/intrinsic_matrix.inl
-include/solarus/third_party/glm/detail/intrinsic_trigonometric.hpp
-include/solarus/third_party/glm/detail/intrinsic_trigonometric.inl
-include/solarus/third_party/glm/detail/intrinsic_vector_relational.hpp
-include/solarus/third_party/glm/detail/intrinsic_vector_relational.inl
-include/solarus/third_party/glm/detail/precision.hpp
-include/solarus/third_party/glm/detail/setup.hpp
-include/solarus/third_party/glm/detail/type_float.hpp
-include/solarus/third_party/glm/detail/type_gentype.hpp
-include/solarus/third_party/glm/detail/type_gentype.inl
-include/solarus/third_party/glm/detail/type_half.hpp
-include/solarus/third_party/glm/detail/type_half.inl
-include/solarus/third_party/glm/detail/type_int.hpp
-include/solarus/third_party/glm/detail/type_mat.hpp
-include/solarus/third_party/glm/detail/type_mat.inl
-include/solarus/third_party/glm/detail/type_mat2x2.hpp
-include/solarus/third_party/glm/detail/type_mat2x2.inl
-include/solarus/third_party/glm/detail/type_mat2x3.hpp
-include/solarus/third_party/glm/detail/type_mat2x3.inl
-include/solarus/third_party/glm/detail/type_mat2x4.hpp
-include/solarus/third_party/glm/detail/type_mat2x4.inl
-include/solarus/third_party/glm/detail/type_mat3x2.hpp
-include/solarus/third_party/glm/detail/type_mat3x2.inl
-include/solarus/third_party/glm/detail/type_mat3x3.hpp
-include/solarus/third_party/glm/detail/type_mat3x3.inl
-include/solarus/third_party/glm/detail/type_mat3x4.hpp
-include/solarus/third_party/glm/detail/type_mat3x4.inl
-include/solarus/third_party/glm/detail/type_mat4x2.hpp
-include/solarus/third_party/glm/detail/type_mat4x2.inl
-include/solarus/third_party/glm/detail/type_mat4x3.hpp
-include/solarus/third_party/glm/detail/type_mat4x3.inl
-include/solarus/third_party/glm/detail/type_mat4x4.hpp
-include/solarus/third_party/glm/detail/type_mat4x4.inl
-include/solarus/third_party/glm/detail/type_vec.hpp
-include/solarus/third_party/glm/detail/type_vec.inl
-include/solarus/third_party/glm/detail/type_vec1.hpp
-include/solarus/third_party/glm/detail/type_vec1.inl
-include/solarus/third_party/glm/detail/type_vec2.hpp
-include/solarus/third_party/glm/detail/type_vec2.inl
-include/solarus/third_party/glm/detail/type_vec3.hpp
-include/solarus/third_party/glm/detail/type_vec3.inl
-include/solarus/third_party/glm/detail/type_vec4.hpp
-include/solarus/third_party/glm/detail/type_vec4.inl
-include/solarus/third_party/glm/detail/type_vec4_avx.inl
-include/solarus/third_party/glm/detail/type_vec4_avx2.inl
-include/solarus/third_party/glm/detail/type_vec4_sse2.inl
-include/solarus/third_party/glm/exponential.hpp
-include/solarus/third_party/glm/ext.hpp
-include/solarus/third_party/glm/fwd.hpp
-include/solarus/third_party/glm/geometric.hpp
-include/solarus/third_party/glm/glm.hpp
-include/solarus/third_party/glm/gtc/
-include/solarus/third_party/glm/gtc/bitfield.hpp
-include/solarus/third_party/glm/gtc/bitfield.inl
-include/solarus/third_party/glm/gtc/color_space.hpp
-include/solarus/third_party/glm/gtc/color_space.inl
-include/solarus/third_party/glm/gtc/constants.hpp
-include/solarus/third_party/glm/gtc/constants.inl
-include/solarus/third_party/glm/gtc/epsilon.hpp
-include/solarus/third_party/glm/gtc/epsilon.inl
-include/solarus/third_party/glm/gtc/integer.hpp
-include/solarus/third_party/glm/gtc/integer.inl
-include/solarus/third_party/glm/gtc/matrix_access.hpp
-include/solarus/third_party/glm/gtc/matrix_access.inl
-include/solarus/third_party/glm/gtc/matrix_integer.hpp
-include/solarus/third_party/glm/gtc/matrix_inverse.hpp
-include/solarus/third_party/glm/gtc/matrix_inverse.inl
-include/solarus/third_party/glm/gtc/matrix_transform.hpp
-include/solarus/third_party/glm/gtc/matrix_transform.inl
-include/solarus/third_party/glm/gtc/noise.hpp
-include/solarus/third_party/glm/gtc/noise.inl
-include/solarus/third_party/glm/gtc/packing.hpp
-include/solarus/third_party/glm/gtc/packing.inl
-include/solarus/third_party/glm/gtc/quaternion.hpp
-include/solarus/third_party/glm/gtc/quaternion.inl
-include/solarus/third_party/glm/gtc/random.hpp
-include/solarus/third_party/glm/gtc/random.inl
-include/solarus/third_party/glm/gtc/reciprocal.hpp
-include/solarus/third_party/glm/gtc/reciprocal.inl
-include/solarus/third_party/glm/gtc/round.hpp
-include/solarus/third_party/glm/gtc/round.inl
-include/solarus/third_party/glm/gtc/type_precision.hpp
-include/solarus/third_party/glm/gtc/type_precision.inl
-include/solarus/third_party/glm/gtc/type_ptr.hpp
-include/solarus/third_party/glm/gtc/type_ptr.inl
-include/solarus/third_party/glm/gtc/ulp.hpp
-include/solarus/third_party/glm/gtc/ulp.inl
-include/solarus/third_party/glm/gtc/vec1.hpp
-include/solarus/third_party/glm/gtc/vec1.inl
-include/solarus/third_party/glm/gtx/
-include/solarus/third_party/glm/gtx/associated_min_max.hpp
-include/solarus/third_party/glm/gtx/associated_min_max.inl
-include/solarus/third_party/glm/gtx/bit.hpp
-include/solarus/third_party/glm/gtx/bit.inl
-include/solarus/third_party/glm/gtx/closest_point.hpp
-include/solarus/third_party/glm/gtx/closest_point.inl
-include/solarus/third_party/glm/gtx/color_space.hpp
-include/solarus/third_party/glm/gtx/color_space.inl
-include/solarus/third_party/glm/gtx/color_space_YCoCg.hpp
-include/solarus/third_party/glm/gtx/color_space_YCoCg.inl
-include/solarus/third_party/glm/gtx/common.hpp
-include/solarus/third_party/glm/gtx/common.inl
-include/solarus/third_party/glm/gtx/compatibility.hpp
-include/solarus/third_party/glm/gtx/compatibility.inl
-include/solarus/third_party/glm/gtx/component_wise.hpp
-include/solarus/third_party/glm/gtx/component_wise.inl
-include/solarus/third_party/glm/gtx/dual_quaternion.hpp
-include/solarus/third_party/glm/gtx/dual_quaternion.inl
-include/solarus/third_party/glm/gtx/euler_angles.hpp
-include/solarus/third_party/glm/gtx/euler_angles.inl
-include/solarus/third_party/glm/gtx/extend.hpp
-include/solarus/third_party/glm/gtx/extend.inl
-include/solarus/third_party/glm/gtx/extented_min_max.hpp
-include/solarus/third_party/glm/gtx/extented_min_max.inl
-include/solarus/third_party/glm/gtx/fast_exponential.hpp
-include/solarus/third_party/glm/gtx/fast_exponential.inl
-include/solarus/third_party/glm/gtx/fast_square_root.hpp
-include/solarus/third_party/glm/gtx/fast_square_root.inl
-include/solarus/third_party/glm/gtx/fast_trigonometry.hpp
-include/solarus/third_party/glm/gtx/fast_trigonometry.inl
-include/solarus/third_party/glm/gtx/gradient_paint.hpp
-include/solarus/third_party/glm/gtx/gradient_paint.inl
-include/solarus/third_party/glm/gtx/handed_coordinate_space.hpp
-include/solarus/third_party/glm/gtx/handed_coordinate_space.inl
-include/solarus/third_party/glm/gtx/hash.hpp
-include/solarus/third_party/glm/gtx/hash.inl
-include/solarus/third_party/glm/gtx/integer.hpp
-include/solarus/third_party/glm/gtx/integer.inl
-include/solarus/third_party/glm/gtx/intersect.hpp
-include/solarus/third_party/glm/gtx/intersect.inl
-include/solarus/third_party/glm/gtx/io.hpp
-include/solarus/third_party/glm/gtx/io.inl
-include/solarus/third_party/glm/gtx/log_base.hpp
-include/solarus/third_party/glm/gtx/log_base.inl
-include/solarus/third_party/glm/gtx/matrix_cross_product.hpp
-include/solarus/third_party/glm/gtx/matrix_cross_product.inl
-include/solarus/third_party/glm/gtx/matrix_decompose.hpp
-include/solarus/third_party/glm/gtx/matrix_decompose.inl
-include/solarus/third_party/glm/gtx/matrix_interpolation.hpp
-include/solarus/third_party/glm/gtx/matrix_interpolation.inl
-include/solarus/third_party/glm/gtx/matrix_major_storage.hpp
-include/solarus/third_party/glm/gtx/matrix_major_storage.inl
-include/solarus/third_party/glm/gtx/matrix_operation.hpp
-include/solarus/third_party/glm/gtx/matrix_operation.inl
-include/solarus/third_party/glm/gtx/matrix_query.hpp
-include/solarus/third_party/glm/gtx/matrix_query.inl
-include/solarus/third_party/glm/gtx/matrix_transform_2d.hpp
-include/solarus/third_party/glm/gtx/matrix_transform_2d.inl
-include/solarus/third_party/glm/gtx/mixed_product.hpp
-include/solarus/third_party/glm/gtx/mixed_product.inl
-include/solarus/third_party/glm/gtx/norm.hpp
-include/solarus/third_party/glm/gtx/norm.inl
-include/solarus/third_party/glm/gtx/normal.hpp
-include/solarus/third_party/glm/gtx/normal.inl
-include/solarus/third_party/glm/gtx/normalize_dot.hpp
-include/solarus/third_party/glm/gtx/normalize_dot.inl
-include/solarus/third_party/glm/gtx/number_precision.hpp
-include/solarus/third_party/glm/gtx/number_precision.inl
-include/solarus/third_party/glm/gtx/optimum_pow.hpp
-include/solarus/third_party/glm/gtx/optimum_pow.inl
-include/solarus/third_party/glm/gtx/orthonormalize.hpp
-include/solarus/third_party/glm/gtx/orthonormalize.inl
-include/solarus/third_party/glm/gtx/perpendicular.hpp
-include/solarus/third_party/glm/gtx/perpendicular.inl
-include/solarus/third_party/glm/gtx/polar_coordinates.hpp
-include/solarus/third_party/glm/gtx/polar_coordinates.inl
-include/solarus/third_party/glm/gtx/projection.hpp
-include/solarus/third_party/glm/gtx/projection.inl
-include/solarus/third_party/glm/gtx/quaternion.hpp
-include/solarus/third_party/glm/gtx/quaternion.inl
-include/solarus/third_party/glm/gtx/range.hpp
-include/solarus/third_party/glm/gtx/raw_data.hpp
-include/solarus/third_party/glm/gtx/raw_data.inl
-include/solarus/third_party/glm/gtx/rotate_normalized_axis.hpp
-include/solarus/third_party/glm/gtx/rotate_normalized_axis.inl
-include/solarus/third_party/glm/gtx/rotate_vector.hpp
-include/solarus/third_party/glm/gtx/rotate_vector.inl
-include/solarus/third_party/glm/gtx/scalar_multiplication.hpp
-include/solarus/third_party/glm/gtx/scalar_relational.hpp
-include/solarus/third_party/glm/gtx/scalar_relational.inl
-include/solarus/third_party/glm/gtx/simd_mat4.hpp
-include/solarus/third_party/glm/gtx/simd_mat4.inl
-include/solarus/third_party/glm/gtx/simd_quat.hpp
-include/solarus/third_party/glm/gtx/simd_quat.inl
-include/solarus/third_party/glm/gtx/simd_vec4.hpp
-include/solarus/third_party/glm/gtx/simd_vec4.inl
-include/solarus/third_party/glm/gtx/spline.hpp
-include/solarus/third_party/glm/gtx/spline.inl
-include/solarus/third_party/glm/gtx/std_based_type.hpp
-include/solarus/third_party/glm/gtx/std_based_type.inl
-include/solarus/third_party/glm/gtx/string_cast.hpp
-include/solarus/third_party/glm/gtx/string_cast.inl
-include/solarus/third_party/glm/gtx/transform.hpp
-include/solarus/third_party/glm/gtx/transform.inl
-include/solarus/third_party/glm/gtx/transform2.hpp
-include/solarus/third_party/glm/gtx/transform2.inl
-include/solarus/third_party/glm/gtx/type_aligned.hpp
-include/solarus/third_party/glm/gtx/type_aligned.inl
-include/solarus/third_party/glm/gtx/vector_angle.hpp
-include/solarus/third_party/glm/gtx/vector_angle.inl
-include/solarus/third_party/glm/gtx/vector_query.hpp
-include/solarus/third_party/glm/gtx/vector_query.inl
-include/solarus/third_party/glm/gtx/wrap.hpp
-include/solarus/third_party/glm/gtx/wrap.inl
-include/solarus/third_party/glm/integer.hpp
-include/solarus/third_party/glm/mat2x2.hpp
-include/solarus/third_party/glm/mat2x3.hpp
-include/solarus/third_party/glm/mat2x4.hpp
-include/solarus/third_party/glm/mat3x2.hpp
-include/solarus/third_party/glm/mat3x3.hpp
-include/solarus/third_party/glm/mat3x4.hpp
-include/solarus/third_party/glm/mat4x2.hpp
-include/solarus/third_party/glm/mat4x3.hpp
-include/solarus/third_party/glm/mat4x4.hpp
-include/solarus/third_party/glm/matrix.hpp
-include/solarus/third_party/glm/packing.hpp
-include/solarus/third_party/glm/trigonometric.hpp
-include/solarus/third_party/glm/vec2.hpp
-include/solarus/third_party/glm/vec3.hpp
-include/solarus/third_party/glm/vec4.hpp
-include/solarus/third_party/glm/vector_relational.hpp
-include/solarus/third_party/hqx/
-include/solarus/third_party/hqx/common.h
-include/solarus/third_party/hqx/hqx.h
-include/solarus/third_party/snes_spc/
-include/solarus/third_party/snes_spc/SNES_SPC.h
-include/solarus/third_party/snes_spc/SPC_CPU.h
-include/solarus/third_party/snes_spc/SPC_DSP.h
-include/solarus/third_party/snes_spc/SPC_Filter.h
-include/solarus/third_party/snes_spc/blargg_common.h
-include/solarus/third_party/snes_spc/blargg_config.h
-include/solarus/third_party/snes_spc/blargg_endian.h
-include/solarus/third_party/snes_spc/blargg_source.h
-include/solarus/third_party/snes_spc/dsp.h
-include/solarus/third_party/snes_spc/spc.h
-lib/libsolarus-gui.so
+include/solarus/third_party/KHR/
+include/solarus/third_party/KHR/khrplatform.h
+include/solarus/third_party/glad/
+include/solarus/third_party/glad/glad.h
+include/solarus/third_party/hqx.h
+include/solarus/third_party/spc.h
@lib lib/libsolarus.so.${LIBsolarus_VERSION}
@man man/man6/solarus-run.6
-@man man/man6/solarus.6
-share/appdata/
-share/appdata/solarus.appdata.xml
-share/applications/solarus.desktop
-share/icons/hicolor/128x128/apps/solarus.png
-share/icons/hicolor/16x16/apps/solarus.png
-share/icons/hicolor/24x24/apps/solarus.png
-share/icons/hicolor/256x256/apps/solarus.png
-share/icons/hicolor/32x32/apps/solarus.png
-share/icons/hicolor/48x48/apps/solarus.png
-share/icons/hicolor/512x512/apps/solarus.png
-share/icons/hicolor/64x64/apps/solarus.png
@tag gtk-update-icon-cache %D/share/icons/hicolor
@tag update-desktop-database
+share/solarus/
+share/solarus/gamecontrollerdb.txt
Index: zsdx/Makefile
===================================================================
RCS file: /cvs/ports/games/solarus/zsdx/Makefile,v
diff -u -p -r1.16 Makefile
--- zsdx/Makefile 13 Feb 2026 12:02:16 -0000 1.16
+++ zsdx/Makefile 31 Mar 2026 23:17:00 -0000
@@ -1,12 +1,10 @@
COMMENT = fan made Zelda game for Solarus engine
-GH_ACCOUNT= christopho
-GH_PROJECT= zsdx
-GH_TAGNAME= ${GH_PROJECT}-1.11.0
-DISTNAME= ${GH_TAGNAME}
-REVISION = 1
+V = 1.12.3
+H = 9635bfc2ece38dd97e8fe015cc0bf0ce759214f0
+DIST_TUPLE = gitlab solarus-games/games zsdx v${V} .
-HOMEPAGE = https://www.solarus-games.org/en/games/the-legend-of-zelda-mystery-of-solarus-dx
+HOMEPAGE = https://www.solarus-games.org/games/the-legend-of-zelda-mystery-of-solarus-dx
# GPLv3+ and CC BY-SA 3.0
PERMIT_PACKAGE = Yes
@@ -17,6 +15,10 @@ BUILD_DEPENDS = archivers/zip
MODCMAKE_POLICY_VERSION_OVERRIDE = Yes
-RUN_DEPENDS = games/solarus/solarus>=1.5.0
+RUN_DEPENDS = games/solarus/solarus>=1.5.0 \
+ devel/desktop-file-utils \
+ x11/gtk+4,-guic
+
+WRKDIST = ${WRKDIR}/zsdx-v${V}-${H}
.include <bsd.port.mk>
Index: zsdx/distinfo
===================================================================
RCS file: /cvs/ports/games/solarus/zsdx/distinfo,v
diff -u -p -r1.6 distinfo
--- zsdx/distinfo 11 Aug 2016 11:29:36 -0000 1.6
+++ zsdx/distinfo 31 Mar 2026 23:17:00 -0000
@@ -1,2 +1,2 @@
-SHA256 (zsdx-1.11.0.tar.gz) = BaXSILvyQ5ydoucc2dEEJAh4Ej//W8cC4kBdbQcS8Nw=
-SIZE (zsdx-1.11.0.tar.gz) = 21813921
+SHA256 (solarus-games/games-zsdx-v1.12.3.tar.gz) = n6OULlo/LuVm/PTLQ0/VWhCxNhZTQgSiwFF/19tYG4E=
+SIZE (solarus-games/games-zsdx-v1.12.3.tar.gz) = 21124492
Index: zsdx/patches/patch-CMakeLists_txt
===================================================================
RCS file: zsdx/patches/patch-CMakeLists_txt
diff -N zsdx/patches/patch-CMakeLists_txt
--- zsdx/patches/patch-CMakeLists_txt 11 Mar 2022 19:04:56 -0000 1.5
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-From 8dc14b86107d56b893fbaec765f9091a56e6d655 Mon Sep 17 00:00:00 2001
-From: Jasper Lievisse Adriaanse <jasper@humppa.nl>
-Date: Thu, 11 Aug 2016 13:37:51 +0200
-Subject: [PATCH] Fix 'bad $-escape' build error by escaping '$'
-
---- CMakeLists.txt.orig Thu Aug 11 13:22:36 2016
-+++ CMakeLists.txt Thu Aug 11 13:22:42 2016
-@@ -57,7 +57,7 @@ add_custom_target(${quest_name}_data
- add_custom_command(
- OUTPUT ${quest_name}
- COMMAND echo '\#!/bin/sh' > ${quest_name}
-- COMMAND echo 'solarus-run ${SOLARUS_INSTALL_ABSOLUTE_DATADIR}/${quest_name} $*' >> ${quest_name}
-+ COMMAND echo 'solarus-run ${SOLARUS_INSTALL_ABSOLUTE_DATADIR}/${quest_name} $$*' >> ${quest_name}
- )
- add_custom_target(${quest_name}_command
- ALL
Index: zsdx/pkg/PLIST
===================================================================
RCS file: /cvs/ports/games/solarus/zsdx/pkg/PLIST,v
diff -u -p -r1.2 PLIST
--- zsdx/pkg/PLIST 11 Mar 2022 19:04:56 -0000 1.2
+++ zsdx/pkg/PLIST 31 Mar 2026 23:17:00 -0000
@@ -1,4 +1,20 @@
bin/zsdx
+share/applications/zsdx.desktop
+share/icons/hicolor/1024x1024/
+share/icons/hicolor/1024x1024/apps/
+share/icons/hicolor/1024x1024/apps/zsdx.png
+share/icons/hicolor/128x128/apps/zsdx.png
+share/icons/hicolor/16x16/apps/zsdx.png
+share/icons/hicolor/24x24/apps/zsdx.png
+share/icons/hicolor/256x256/apps/zsdx.png
+share/icons/hicolor/32x32/apps/zsdx.png
+share/icons/hicolor/48x48/apps/zsdx.png
+share/icons/hicolor/512x512/apps/zsdx.png
+share/icons/hicolor/64x64/apps/zsdx.png
+share/pixmaps/
+share/pixmaps/zsdx.png
share/solarus/
share/solarus/zsdx/
share/solarus/zsdx/data.solarus
+@tag update-desktop-database
+@tag gtk-update-icon-cache %D/share/icons/hicolor
Index: zsxd/Makefile
===================================================================
RCS file: /cvs/ports/games/solarus/zsxd/Makefile,v
diff -u -p -r1.16 Makefile
--- zsxd/Makefile 13 Feb 2026 12:02:16 -0000 1.16
+++ zsxd/Makefile 31 Mar 2026 23:17:00 -0000
@@ -1,12 +1,10 @@
COMMENT = fan made parody Zelda game for Solarus engine
-GH_ACCOUNT= christopho
-GH_PROJECT= zsxd
-GH_TAGNAME= ${GH_PROJECT}-1.11.0
-DISTNAME= ${GH_TAGNAME}
-REVISION = 1
+V = 1.12.2
+H = 823b6a116ef1ca5220fcd3bb79375b6937194b92
+DIST_TUPLE = gitlab solarus-games/games zsxd v${V} .
-HOMEPAGE = https://www.solarus-games.org/en/games/the-legend-of-zelda-mystery-of-solarus-xd
+HOMEPAGE = https://www.solarus-games.org/games/the-legend-of-zelda-mystery-of-solarus-xd
# GPLv3+ and CC BY-SA 3.0
PERMIT_PACKAGE = Yes
@@ -17,6 +15,10 @@ MODCMAKE_POLICY_VERSION_OVERRIDE = Yes
BUILD_DEPENDS = archivers/zip
-RUN_DEPENDS = games/solarus/solarus>=1.5.0
+RUN_DEPENDS = games/solarus/solarus>=1.5.0 \
+ devel/desktop-file-utils \
+ x11/gtk+4,-guic
+
+WRKDIST = ${WRKDIR}/zsxd-v${V}-${H}
.include <bsd.port.mk>
Index: zsxd/distinfo
===================================================================
RCS file: /cvs/ports/games/solarus/zsxd/distinfo,v
diff -u -p -r1.6 distinfo
--- zsxd/distinfo 11 Aug 2016 11:29:15 -0000 1.6
+++ zsxd/distinfo 31 Mar 2026 23:17:00 -0000
@@ -1,2 +1,2 @@
-SHA256 (zsxd-1.11.0.tar.gz) = TG50TsxbfhI/Xghe2ZPoI0y++ARtJxfRYSGitxHgzN4=
-SIZE (zsxd-1.11.0.tar.gz) = 4393467
+SHA256 (solarus-games/games-zsxd-v1.12.2.tar.gz) = iGZy8i2O6M6ctXO9seVZc42XUxWYfUN10DBTzbvzdRA=
+SIZE (solarus-games/games-zsxd-v1.12.2.tar.gz) = 4440642
Index: zsxd/patches/patch-CMakeLists_txt
===================================================================
RCS file: zsxd/patches/patch-CMakeLists_txt
diff -N zsxd/patches/patch-CMakeLists_txt
--- zsxd/patches/patch-CMakeLists_txt 11 Mar 2022 19:04:56 -0000 1.5
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-From 8dc14b86107d56b893fbaec765f9091a56e6d655 Mon Sep 17 00:00:00 2001
-From: Jasper Lievisse Adriaanse <jasper@humppa.nl>
-Date: Thu, 11 Aug 2016 13:37:51 +0200
-Subject: [PATCH] Fix 'bad $-escape' build error by escaping '$'
-
---- CMakeLists.txt.orig Thu Aug 11 13:22:36 2016
-+++ CMakeLists.txt Thu Aug 11 13:22:42 2016
-@@ -57,7 +57,7 @@ add_custom_target(${quest_name}_data
- add_custom_command(
- OUTPUT ${quest_name}
- COMMAND echo '\#!/bin/sh' > ${quest_name}
-- COMMAND echo 'solarus-run ${SOLARUS_INSTALL_ABSOLUTE_DATADIR}/${quest_name} $*' >> ${quest_name}
-+ COMMAND echo 'solarus-run ${SOLARUS_INSTALL_ABSOLUTE_DATADIR}/${quest_name} $$*' >> ${quest_name}
- )
- add_custom_target(${quest_name}_command
- ALL
Index: zsxd/pkg/PLIST
===================================================================
RCS file: /cvs/ports/games/solarus/zsxd/pkg/PLIST,v
diff -u -p -r1.2 PLIST
--- zsxd/pkg/PLIST 11 Mar 2022 19:04:56 -0000 1.2
+++ zsxd/pkg/PLIST 31 Mar 2026 23:17:00 -0000
@@ -1,4 +1,20 @@
bin/zsxd
+share/applications/zsxd.desktop
+share/icons/hicolor/1024x1024/
+share/icons/hicolor/1024x1024/apps/
+share/icons/hicolor/1024x1024/apps/zsxd.png
+share/icons/hicolor/128x128/apps/zsxd.png
+share/icons/hicolor/16x16/apps/zsxd.png
+share/icons/hicolor/24x24/apps/zsxd.png
+share/icons/hicolor/256x256/apps/zsxd.png
+share/icons/hicolor/32x32/apps/zsxd.png
+share/icons/hicolor/48x48/apps/zsxd.png
+share/icons/hicolor/512x512/apps/zsxd.png
+share/icons/hicolor/64x64/apps/zsxd.png
+share/pixmaps/
+share/pixmaps/zsxd.png
share/solarus/
share/solarus/zsxd/
share/solarus/zsxd/data.solarus
+@tag gtk-update-icon-cache %D/share/icons/hicolor
+@tag update-desktop-database
Please find below a diff to update games/solarus.
With this version, it can run the just released commercial game
"Tombwater" [1]. I've tried the latest version of
games/solarus/{roth,zsdx,zsxd} and they all work (limited testing for a
few minutes). The update below includes updates to the latest releases
of those, too.
The projects have all moved to Gitlab. solarus now only builds the CLI
(solarus-run). Not sure why, but I looked for any cmake knobs but there
doesn't seem to be anything to enable solarus-launcher now.
With offering to take MAINTAINER, I would want to question if we should
really keep solarus/{roth,zsdx,zsxd}, as they all use assets from the
original Zelda: A Link to the Past. They state in their licenses that
those belong to Nintendo and the assets are included under fair use
(see for example [2]). I would question the utility of this potential
liability with distributing said assets, as playing the games (and
several others) can be done easily by just downloading the .solarus
file from [3] and launching it something like this:
$ solarus-run zelda-roth-se-v1.2.1.solarus
So the alternative would be to delete solarus/{roth,zsdx,zsxd} and
possibly move games/solarus/solarus to games/solarus. Or we consider if
maybe roth, zsdx, and zsxd should not be PERMIT_PACKAGE=Yes ...? But
the build is really just one step of zipping up pre-existing content
into a zip archive ending in .solarus.
I'd be happy to share a new diff removing roth, zsdx, and zsxd if there
were a consensus...
[1] https://store.steampowered.com/app/3308200/Tombwater/
[2]
https://gitlab.com/solarus-games/games/zelda-roth-se/-/blob/dev/license.txt?ref_type=heads
[3] https://www.solarus-games.org/games/
Index: Makefile.inc
===================================================================
RCS file: /cvs/ports/games/solarus/Makefile.inc,v
diff -u -p -r1.5 Makefile.inc
--- Makefile.inc 11 Mar 2022 19:04:56 -0000 1.5
+++ Makefile.inc 31 Mar 2026 23:17:00 -0000
@@ -1,6 +1,8 @@
-# Issues with powerpc, working on it.
+# Issues with powerpc
NOT_FOR_ARCHS = powerpc
CATEGORIES ?= games x11
+
+MAINTAINER ?= Thomas Frohwein <thfr@openbsd.org>
NO_TEST = Yes
Index: roth/Makefile
===================================================================
RCS file: /cvs/ports/games/solarus/roth/Makefile,v
diff -u -p -r1.9 Makefile
--- roth/Makefile 13 Feb 2026 12:02:16 -0000 1.9
+++ roth/Makefile 31 Mar 2026 23:17:00 -0000
@@ -1,11 +1,11 @@
COMMENT = fan made Zelda game for Solarus engine
-GH_ACCOUNT= christopho
-GH_PROJECT= zelda_roth_se
-GH_TAGNAME= v1.1.0
-REVISION = 1
+V = 1.2.1
+H = 9e8e2247a6767269d0d48bb420dd163d9c8cc3b8
+PKGNAME = zelda_roth_se-${V}
+DIST_TUPLE = gitlab solarus-games/games zelda-roth-se v${V} .
-HOMEPAGE = https://www.solarus-games.org/en/games/the-legend-of-zelda-return-of-the-hylian-se
+HOMEPAGE = https://www.solarus-games.org/games/the-legend-of-zelda-return-of-the-hylian-se
# GPLv3+ and CC BY-SA 3.0
PERMIT_PACKAGE = Yes
@@ -14,7 +14,11 @@ MODULES = devel/cmake
BUILD_DEPENDS = archivers/zip
-RUN_DEPENDS = games/solarus/solarus>=1.5.0
+RUN_DEPENDS = games/solarus/solarus>=1.5.0 \
+ devel/desktop-file-utils \
+ x11/gtk+4,-guic
+
+WRKDIST = ${WRKDIR}/zelda-roth-se-v${V}-${H}
MODCMAKE_POLICY_VERSION_OVERRIDE = Yes
Index: roth/distinfo
===================================================================
RCS file: /cvs/ports/games/solarus/roth/distinfo,v
diff -u -p -r1.2 distinfo
--- roth/distinfo 11 Aug 2016 11:29:10 -0000 1.2
+++ roth/distinfo 31 Mar 2026 23:17:00 -0000
@@ -1,2 +1,2 @@
-SHA256 (zelda_roth_se-1.1.0.tar.gz) = mVVPlfvuCr5DFLZLuASPrWV+J5SDIGRRBgp0G+9ltUQ=
-SIZE (zelda_roth_se-1.1.0.tar.gz) = 6179623
+SHA256 (solarus-games/games-zelda-roth-se-v1.2.1.tar.gz) = yWyfvrECuUq0XRfPLf2NBQnq0mfGadBoCqzMxOsZjks=
+SIZE (solarus-games/games-zelda-roth-se-v1.2.1.tar.gz) = 6227691
Index: roth/patches/patch-CMakeLists_txt
===================================================================
RCS file: roth/patches/patch-CMakeLists_txt
diff -N roth/patches/patch-CMakeLists_txt
--- roth/patches/patch-CMakeLists_txt 11 Mar 2022 19:04:56 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-From 8dc14b86107d56b893fbaec765f9091a56e6d655 Mon Sep 17 00:00:00 2001
-From: Jasper Lievisse Adriaanse <jasper@humppa.nl>
-Date: Thu, 11 Aug 2016 13:37:51 +0200
-Subject: [PATCH] Fix 'bad $-escape' build error by escaping '$'
-
---- CMakeLists.txt.orig Wed Jul 27 21:54:33 2016
-+++ CMakeLists.txt Thu Aug 11 13:25:49 2016
-@@ -47,7 +47,7 @@ add_custom_target(${quest_name}_data
- add_custom_command(
- OUTPUT ${quest_name}
- COMMAND echo '\#!/bin/sh' > ${quest_name}
-- COMMAND echo 'solarus-run ${CMAKE_INSTALL_PREFIX}/share/solarus/${quest_name} $*' >> ${quest_name}
-+ COMMAND echo 'solarus-run ${CMAKE_INSTALL_PREFIX}/share/solarus/${quest_name} $$*' >> ${quest_name}
- )
- add_custom_target(${quest_name}_command
- ALL
Index: roth/pkg/PLIST
===================================================================
RCS file: /cvs/ports/games/solarus/roth/pkg/PLIST,v
diff -u -p -r1.2 PLIST
--- roth/pkg/PLIST 11 Mar 2022 19:04:56 -0000 1.2
+++ roth/pkg/PLIST 31 Mar 2026 23:17:00 -0000
@@ -1,4 +1,20 @@
bin/zelda_roth_se
+share/applications/zelda-roth-se.desktop
+share/icons/hicolor/1024x1024/
+share/icons/hicolor/1024x1024/apps/
+share/icons/hicolor/1024x1024/apps/zelda-roth-se.png
+share/icons/hicolor/128x128/apps/zelda-roth-se.png
+share/icons/hicolor/16x16/apps/zelda-roth-se.png
+share/icons/hicolor/24x24/apps/zelda-roth-se.png
+share/icons/hicolor/256x256/apps/zelda-roth-se.png
+share/icons/hicolor/32x32/apps/zelda-roth-se.png
+share/icons/hicolor/48x48/apps/zelda-roth-se.png
+share/icons/hicolor/512x512/apps/zelda-roth-se.png
+share/icons/hicolor/64x64/apps/zelda-roth-se.png
+share/pixmaps/
+share/pixmaps/zelda-roth-se.png
share/solarus/
share/solarus/zelda_roth_se/
share/solarus/zelda_roth_se/data.solarus
+@tag update-desktop-database
+@tag gtk-update-icon-cache %D/share/icons/hicolor
Index: solarus/Makefile
===================================================================
RCS file: /cvs/ports/games/solarus/solarus/Makefile,v
diff -u -p -r1.35 Makefile
--- solarus/Makefile 13 Feb 2026 12:02:16 -0000 1.35
+++ solarus/Makefile 31 Mar 2026 23:17:00 -0000
@@ -1,28 +1,26 @@
-V = 1.6.0
COMMENT = open-source Zelda-like 2D game engine
-DISTNAME = solarus-${V}-src
-PKGNAME = solarus-${V}
-REVISION = 5
-SHARED_LIBS += solarus 0.0 # 1.5
+V = 2.0.3
+H = d5e170be67a0119d73a502988e91bffcf04c3e06
+DIST_TUPLE = gitlab solarus-games solarus v${V} .
+
+SHARED_LIBS += solarus 1.0 # 2.0
HOMEPAGE = https://www.solarus-games.org/
# GPLv3+
PERMIT_PACKAGE = Yes
-WANTLIB += Qt5Core Qt5Gui Qt5Widgets SDL2 SDL2_image SDL2_ttf
+WANTLIB += SDL2 SDL2_image SDL2_ttf
WANTLIB += c luajit-5.1 m modplug ogg openal physfs pthread vorbis
-WANTLIB += vorbisfile GL GLU ${COMPILER_LIBCXX}
-
-SITES = https://www.solarus-games.org/downloads/solarus/
+WANTLIB += vorbisfile GL ${COMPILER_LIBCXX}
MODULES += devel/cmake \
- lang/lua \
- x11/qt5
+ lang/lua
COMPILER = base-clang ports-gcc
+# also in configure: glm, vorbisfile
LIB_DEPENDS = audio/libmodplug \
audio/libvorbis \
audio/openal \
@@ -33,7 +31,7 @@ LIB_DEPENDS = audio/libmodplug \
RUN_DEPENDS = devel/desktop-file-utils \
x11/gtk+4,-guic
-WRKDIST = ${WRKDIR}/solarus-${V}
+WRKDIST = ${WRKDIR}/solarus-v${V}-${H}
MODCMAKE_POLICY_VERSION_OVERRIDE = Yes
Index: solarus/distinfo
===================================================================
RCS file: /cvs/ports/games/solarus/solarus/distinfo,v
diff -u -p -r1.11 distinfo
--- solarus/distinfo 1 Apr 2019 05:54:31 -0000 1.11
+++ solarus/distinfo 31 Mar 2026 23:17:00 -0000
@@ -1,2 +1,2 @@
-SHA256 (solarus-1.6.0-src.tar.gz) = 2AD984j4YHMvLUDI3WNcNP0cRShX91v5s6Qh4+9e51E=
-SIZE (solarus-1.6.0-src.tar.gz) = 3982219
+SHA256 (solarus-games-solarus-v2.0.3.tar.gz) = 3J8gEJPpn31TIbJbSdmrueSchErL5AdC3ViOqFCprg8=
+SIZE (solarus-games-solarus-v2.0.3.tar.gz) = 70916189
Index: solarus/patches/patch-cmake_AddInstallTargets_cmake
===================================================================
RCS file: solarus/patches/patch-cmake_AddInstallTargets_cmake
diff -N solarus/patches/patch-cmake_AddInstallTargets_cmake
--- solarus/patches/patch-cmake_AddInstallTargets_cmake 11 Mar 2022 19:04:56 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-Index: cmake/AddInstallTargets.cmake
---- cmake/AddInstallTargets.cmake.orig
-+++ cmake/AddInstallTargets.cmake
-@@ -13,7 +13,7 @@ if(EXISTS '/usr/bin/apt')
- else()
- set(SOLARUS_EXECUTABLE_INSTALL_DESTINATION "bin" CACHE PATH "Binary install destination")
- endif()
--set(SOLARUS_MANUAL_INSTALL_DESTINATION "share/man" CACHE PATH "Manual install destination")
-+set(SOLARUS_MANUAL_INSTALL_DESTINATION "man" CACHE PATH "Manual install destination")
- set(SOLARUS_HEADERS_INSTALL_DESTINATION "include" CACHE PATH "Headers install destination")
-
- # Files to install with make install.
Index: solarus/pkg/PLIST
===================================================================
RCS file: /cvs/ports/games/solarus/solarus/pkg/PLIST,v
diff -u -p -r1.9 PLIST
--- solarus/pkg/PLIST 11 Mar 2022 19:04:56 -0000 1.9
+++ solarus/pkg/PLIST 31 Mar 2026 23:17:00 -0000
@@ -1,24 +1,34 @@
-@bin bin/solarus-launcher
@bin bin/solarus-run
include/solarus/
include/solarus/audio/
+include/solarus/audio/ALWrapper.h
include/solarus/audio/ItDecoder.h
include/solarus/audio/Music.h
+include/solarus/audio/MusicPtr.h
+include/solarus/audio/MusicSystem.h
include/solarus/audio/OggDecoder.h
include/solarus/audio/Sound.h
+include/solarus/audio/SoundBuffer.h
+include/solarus/audio/SoundPtr.h
include/solarus/audio/SpcDecoder.h
include/solarus/containers/
+include/solarus/containers/FreeList.h
include/solarus/containers/Grid.h
include/solarus/containers/Quadtree.h
include/solarus/containers/Quadtree.inl
+include/solarus/containers/VecMap.h
include/solarus/core/
include/solarus/core/Ability.h
include/solarus/core/AbilityInfo.h
include/solarus/core/AndroidConfig.h
include/solarus/core/AppleInterface.h
include/solarus/core/Arguments.h
+include/solarus/core/Command.h
include/solarus/core/CommandsEffects.h
include/solarus/core/Common.h
+include/solarus/core/Controls.h
+include/solarus/core/ControlsDispatcher.h
+include/solarus/core/ControlsPtr.h
include/solarus/core/CurrentQuest.h
include/solarus/core/Debug.h
include/solarus/core/Dialog.h
@@ -29,19 +39,26 @@ include/solarus/core/EnumInfo.inl
include/solarus/core/Equipment.h
include/solarus/core/EquipmentItem.h
include/solarus/core/EquipmentItemUsage.h
+include/solarus/core/FRectangle.h
+include/solarus/core/FRectangle.inl
+include/solarus/core/FlagSet.h
+include/solarus/core/FlagSet.inl
include/solarus/core/FontResource.h
include/solarus/core/Game.h
-include/solarus/core/GameCommand.h
-include/solarus/core/GameCommands.h
include/solarus/core/Geometry.h
include/solarus/core/InputEvent.h
+include/solarus/core/Joypad.h
include/solarus/core/Logger.h
include/solarus/core/MainLoop.h
include/solarus/core/Map.h
include/solarus/core/MapData.h
+include/solarus/core/MapPtr.h
+include/solarus/core/PerfCounter.h
+include/solarus/core/PerfCounter.inl
include/solarus/core/PixelBits.h
include/solarus/core/Point.h
include/solarus/core/Point.inl
+include/solarus/core/Profiler.h
include/solarus/core/QuestDatabase.h
include/solarus/core/QuestFiles.h
include/solarus/core/QuestProperties.h
@@ -52,6 +69,7 @@ include/solarus/core/ResourceProvider.h
include/solarus/core/ResourceType.h
include/solarus/core/Savegame.h
include/solarus/core/SavegameConverterV1.h
+include/solarus/core/SavegamePtr.h
include/solarus/core/Scale.h
include/solarus/core/Scale.inl
include/solarus/core/Settings.h
@@ -67,7 +85,6 @@ include/solarus/core/Transform.h
include/solarus/core/Transform.inl
include/solarus/core/Treasure.h
include/solarus/core/config.h
-include/solarus/core/config.h.in
include/solarus/entities/
include/solarus/entities/AnimatedTilePattern.h
include/solarus/entities/Arrow.h
@@ -150,6 +167,7 @@ include/solarus/graphics/ShaderData.h
include/solarus/graphics/ShaderPtr.h
include/solarus/graphics/SoftwarePixelFilter.h
include/solarus/graphics/SoftwareVideoMode.h
+include/solarus/graphics/SolarusGl.h
include/solarus/graphics/Sprite.h
include/solarus/graphics/SpriteAnimation.h
include/solarus/graphics/SpriteAnimationDirection.h
@@ -167,30 +185,16 @@ include/solarus/graphics/TransitionScrol
include/solarus/graphics/VertexArray.h
include/solarus/graphics/VertexArrayPtr.h
include/solarus/graphics/Video.h
+include/solarus/graphics/View.h
include/solarus/graphics/glrenderer/
include/solarus/graphics/glrenderer/GlRenderer.h
include/solarus/graphics/glrenderer/GlShader.h
include/solarus/graphics/glrenderer/GlTexture.h
-include/solarus/graphics/glrenderer/gles2funcs.h
+include/solarus/graphics/quest_icon.h
include/solarus/graphics/sdlrenderer/
include/solarus/graphics/sdlrenderer/SDLRenderer.h
include/solarus/graphics/sdlrenderer/SDLShader.h
include/solarus/graphics/sdlrenderer/SDLSurfaceImpl.h
-include/solarus/gui/
-include/solarus/gui/about_dialog.h
-include/solarus/gui/console.h
-include/solarus/gui/console_line_edit.h
-include/solarus/gui/gui_common.h
-include/solarus/gui/gui_tools.h
-include/solarus/gui/main_window.h
-include/solarus/gui/quest_runner.h
-include/solarus/gui/quests_item_delegate.h
-include/solarus/gui/quests_model.h
-include/solarus/gui/quests_view.h
-include/solarus/gui/settings.h
-include/solarus/gui/ui_about_dialog.h
-include/solarus/gui/ui_console.h
-include/solarus/gui/ui_main_window.h
include/solarus/hero/
include/solarus/hero/BackToSolidGroundState.h
include/solarus/hero/BoomerangState.h
@@ -225,6 +229,8 @@ include/solarus/hero/VictoryState.h
include/solarus/lua/
include/solarus/lua/ExportableToLua.h
include/solarus/lua/ExportableToLuaPtr.h
+include/solarus/lua/LuaBind.h
+include/solarus/lua/LuaBind.inl
include/solarus/lua/LuaContext.h
include/solarus/lua/LuaData.h
include/solarus/lua/LuaException.h
@@ -248,292 +254,15 @@ include/solarus/movements/RelativeMoveme
include/solarus/movements/StraightMovement.h
include/solarus/movements/TargetMovement.h
include/solarus/third_party/
-include/solarus/third_party/glm/
-include/solarus/third_party/glm/CMakeLists.txt
-include/solarus/third_party/glm/common.hpp
-include/solarus/third_party/glm/detail/
-include/solarus/third_party/glm/detail/_features.hpp
-include/solarus/third_party/glm/detail/_fixes.hpp
-include/solarus/third_party/glm/detail/_noise.hpp
-include/solarus/third_party/glm/detail/_swizzle.hpp
-include/solarus/third_party/glm/detail/_swizzle_func.hpp
-include/solarus/third_party/glm/detail/_vectorize.hpp
-include/solarus/third_party/glm/detail/dummy.cpp
-include/solarus/third_party/glm/detail/func_common.hpp
-include/solarus/third_party/glm/detail/func_common.inl
-include/solarus/third_party/glm/detail/func_exponential.hpp
-include/solarus/third_party/glm/detail/func_exponential.inl
-include/solarus/third_party/glm/detail/func_geometric.hpp
-include/solarus/third_party/glm/detail/func_geometric.inl
-include/solarus/third_party/glm/detail/func_integer.hpp
-include/solarus/third_party/glm/detail/func_integer.inl
-include/solarus/third_party/glm/detail/func_matrix.hpp
-include/solarus/third_party/glm/detail/func_matrix.inl
-include/solarus/third_party/glm/detail/func_packing.hpp
-include/solarus/third_party/glm/detail/func_packing.inl
-include/solarus/third_party/glm/detail/func_trigonometric.hpp
-include/solarus/third_party/glm/detail/func_trigonometric.inl
-include/solarus/third_party/glm/detail/func_vector_relational.hpp
-include/solarus/third_party/glm/detail/func_vector_relational.inl
-include/solarus/third_party/glm/detail/glm.cpp
-include/solarus/third_party/glm/detail/intrinsic_common.hpp
-include/solarus/third_party/glm/detail/intrinsic_common.inl
-include/solarus/third_party/glm/detail/intrinsic_exponential.hpp
-include/solarus/third_party/glm/detail/intrinsic_exponential.inl
-include/solarus/third_party/glm/detail/intrinsic_geometric.hpp
-include/solarus/third_party/glm/detail/intrinsic_geometric.inl
-include/solarus/third_party/glm/detail/intrinsic_integer.hpp
-include/solarus/third_party/glm/detail/intrinsic_integer.inl
-include/solarus/third_party/glm/detail/intrinsic_matrix.hpp
-include/solarus/third_party/glm/detail/intrinsic_matrix.inl
-include/solarus/third_party/glm/detail/intrinsic_trigonometric.hpp
-include/solarus/third_party/glm/detail/intrinsic_trigonometric.inl
-include/solarus/third_party/glm/detail/intrinsic_vector_relational.hpp
-include/solarus/third_party/glm/detail/intrinsic_vector_relational.inl
-include/solarus/third_party/glm/detail/precision.hpp
-include/solarus/third_party/glm/detail/setup.hpp
-include/solarus/third_party/glm/detail/type_float.hpp
-include/solarus/third_party/glm/detail/type_gentype.hpp
-include/solarus/third_party/glm/detail/type_gentype.inl
-include/solarus/third_party/glm/detail/type_half.hpp
-include/solarus/third_party/glm/detail/type_half.inl
-include/solarus/third_party/glm/detail/type_int.hpp
-include/solarus/third_party/glm/detail/type_mat.hpp
-include/solarus/third_party/glm/detail/type_mat.inl
-include/solarus/third_party/glm/detail/type_mat2x2.hpp
-include/solarus/third_party/glm/detail/type_mat2x2.inl
-include/solarus/third_party/glm/detail/type_mat2x3.hpp
-include/solarus/third_party/glm/detail/type_mat2x3.inl
-include/solarus/third_party/glm/detail/type_mat2x4.hpp
-include/solarus/third_party/glm/detail/type_mat2x4.inl
-include/solarus/third_party/glm/detail/type_mat3x2.hpp
-include/solarus/third_party/glm/detail/type_mat3x2.inl
-include/solarus/third_party/glm/detail/type_mat3x3.hpp
-include/solarus/third_party/glm/detail/type_mat3x3.inl
-include/solarus/third_party/glm/detail/type_mat3x4.hpp
-include/solarus/third_party/glm/detail/type_mat3x4.inl
-include/solarus/third_party/glm/detail/type_mat4x2.hpp
-include/solarus/third_party/glm/detail/type_mat4x2.inl
-include/solarus/third_party/glm/detail/type_mat4x3.hpp
-include/solarus/third_party/glm/detail/type_mat4x3.inl
-include/solarus/third_party/glm/detail/type_mat4x4.hpp
-include/solarus/third_party/glm/detail/type_mat4x4.inl
-include/solarus/third_party/glm/detail/type_vec.hpp
-include/solarus/third_party/glm/detail/type_vec.inl
-include/solarus/third_party/glm/detail/type_vec1.hpp
-include/solarus/third_party/glm/detail/type_vec1.inl
-include/solarus/third_party/glm/detail/type_vec2.hpp
-include/solarus/third_party/glm/detail/type_vec2.inl
-include/solarus/third_party/glm/detail/type_vec3.hpp
-include/solarus/third_party/glm/detail/type_vec3.inl
-include/solarus/third_party/glm/detail/type_vec4.hpp
-include/solarus/third_party/glm/detail/type_vec4.inl
-include/solarus/third_party/glm/detail/type_vec4_avx.inl
-include/solarus/third_party/glm/detail/type_vec4_avx2.inl
-include/solarus/third_party/glm/detail/type_vec4_sse2.inl
-include/solarus/third_party/glm/exponential.hpp
-include/solarus/third_party/glm/ext.hpp
-include/solarus/third_party/glm/fwd.hpp
-include/solarus/third_party/glm/geometric.hpp
-include/solarus/third_party/glm/glm.hpp
-include/solarus/third_party/glm/gtc/
-include/solarus/third_party/glm/gtc/bitfield.hpp
-include/solarus/third_party/glm/gtc/bitfield.inl
-include/solarus/third_party/glm/gtc/color_space.hpp
-include/solarus/third_party/glm/gtc/color_space.inl
-include/solarus/third_party/glm/gtc/constants.hpp
-include/solarus/third_party/glm/gtc/constants.inl
-include/solarus/third_party/glm/gtc/epsilon.hpp
-include/solarus/third_party/glm/gtc/epsilon.inl
-include/solarus/third_party/glm/gtc/integer.hpp
-include/solarus/third_party/glm/gtc/integer.inl
-include/solarus/third_party/glm/gtc/matrix_access.hpp
-include/solarus/third_party/glm/gtc/matrix_access.inl
-include/solarus/third_party/glm/gtc/matrix_integer.hpp
-include/solarus/third_party/glm/gtc/matrix_inverse.hpp
-include/solarus/third_party/glm/gtc/matrix_inverse.inl
-include/solarus/third_party/glm/gtc/matrix_transform.hpp
-include/solarus/third_party/glm/gtc/matrix_transform.inl
-include/solarus/third_party/glm/gtc/noise.hpp
-include/solarus/third_party/glm/gtc/noise.inl
-include/solarus/third_party/glm/gtc/packing.hpp
-include/solarus/third_party/glm/gtc/packing.inl
-include/solarus/third_party/glm/gtc/quaternion.hpp
-include/solarus/third_party/glm/gtc/quaternion.inl
-include/solarus/third_party/glm/gtc/random.hpp
-include/solarus/third_party/glm/gtc/random.inl
-include/solarus/third_party/glm/gtc/reciprocal.hpp
-include/solarus/third_party/glm/gtc/reciprocal.inl
-include/solarus/third_party/glm/gtc/round.hpp
-include/solarus/third_party/glm/gtc/round.inl
-include/solarus/third_party/glm/gtc/type_precision.hpp
-include/solarus/third_party/glm/gtc/type_precision.inl
-include/solarus/third_party/glm/gtc/type_ptr.hpp
-include/solarus/third_party/glm/gtc/type_ptr.inl
-include/solarus/third_party/glm/gtc/ulp.hpp
-include/solarus/third_party/glm/gtc/ulp.inl
-include/solarus/third_party/glm/gtc/vec1.hpp
-include/solarus/third_party/glm/gtc/vec1.inl
-include/solarus/third_party/glm/gtx/
-include/solarus/third_party/glm/gtx/associated_min_max.hpp
-include/solarus/third_party/glm/gtx/associated_min_max.inl
-include/solarus/third_party/glm/gtx/bit.hpp
-include/solarus/third_party/glm/gtx/bit.inl
-include/solarus/third_party/glm/gtx/closest_point.hpp
-include/solarus/third_party/glm/gtx/closest_point.inl
-include/solarus/third_party/glm/gtx/color_space.hpp
-include/solarus/third_party/glm/gtx/color_space.inl
-include/solarus/third_party/glm/gtx/color_space_YCoCg.hpp
-include/solarus/third_party/glm/gtx/color_space_YCoCg.inl
-include/solarus/third_party/glm/gtx/common.hpp
-include/solarus/third_party/glm/gtx/common.inl
-include/solarus/third_party/glm/gtx/compatibility.hpp
-include/solarus/third_party/glm/gtx/compatibility.inl
-include/solarus/third_party/glm/gtx/component_wise.hpp
-include/solarus/third_party/glm/gtx/component_wise.inl
-include/solarus/third_party/glm/gtx/dual_quaternion.hpp
-include/solarus/third_party/glm/gtx/dual_quaternion.inl
-include/solarus/third_party/glm/gtx/euler_angles.hpp
-include/solarus/third_party/glm/gtx/euler_angles.inl
-include/solarus/third_party/glm/gtx/extend.hpp
-include/solarus/third_party/glm/gtx/extend.inl
-include/solarus/third_party/glm/gtx/extented_min_max.hpp
-include/solarus/third_party/glm/gtx/extented_min_max.inl
-include/solarus/third_party/glm/gtx/fast_exponential.hpp
-include/solarus/third_party/glm/gtx/fast_exponential.inl
-include/solarus/third_party/glm/gtx/fast_square_root.hpp
-include/solarus/third_party/glm/gtx/fast_square_root.inl
-include/solarus/third_party/glm/gtx/fast_trigonometry.hpp
-include/solarus/third_party/glm/gtx/fast_trigonometry.inl
-include/solarus/third_party/glm/gtx/gradient_paint.hpp
-include/solarus/third_party/glm/gtx/gradient_paint.inl
-include/solarus/third_party/glm/gtx/handed_coordinate_space.hpp
-include/solarus/third_party/glm/gtx/handed_coordinate_space.inl
-include/solarus/third_party/glm/gtx/hash.hpp
-include/solarus/third_party/glm/gtx/hash.inl
-include/solarus/third_party/glm/gtx/integer.hpp
-include/solarus/third_party/glm/gtx/integer.inl
-include/solarus/third_party/glm/gtx/intersect.hpp
-include/solarus/third_party/glm/gtx/intersect.inl
-include/solarus/third_party/glm/gtx/io.hpp
-include/solarus/third_party/glm/gtx/io.inl
-include/solarus/third_party/glm/gtx/log_base.hpp
-include/solarus/third_party/glm/gtx/log_base.inl
-include/solarus/third_party/glm/gtx/matrix_cross_product.hpp
-include/solarus/third_party/glm/gtx/matrix_cross_product.inl
-include/solarus/third_party/glm/gtx/matrix_decompose.hpp
-include/solarus/third_party/glm/gtx/matrix_decompose.inl
-include/solarus/third_party/glm/gtx/matrix_interpolation.hpp
-include/solarus/third_party/glm/gtx/matrix_interpolation.inl
-include/solarus/third_party/glm/gtx/matrix_major_storage.hpp
-include/solarus/third_party/glm/gtx/matrix_major_storage.inl
-include/solarus/third_party/glm/gtx/matrix_operation.hpp
-include/solarus/third_party/glm/gtx/matrix_operation.inl
-include/solarus/third_party/glm/gtx/matrix_query.hpp
-include/solarus/third_party/glm/gtx/matrix_query.inl
-include/solarus/third_party/glm/gtx/matrix_transform_2d.hpp
-include/solarus/third_party/glm/gtx/matrix_transform_2d.inl
-include/solarus/third_party/glm/gtx/mixed_product.hpp
-include/solarus/third_party/glm/gtx/mixed_product.inl
-include/solarus/third_party/glm/gtx/norm.hpp
-include/solarus/third_party/glm/gtx/norm.inl
-include/solarus/third_party/glm/gtx/normal.hpp
-include/solarus/third_party/glm/gtx/normal.inl
-include/solarus/third_party/glm/gtx/normalize_dot.hpp
-include/solarus/third_party/glm/gtx/normalize_dot.inl
-include/solarus/third_party/glm/gtx/number_precision.hpp
-include/solarus/third_party/glm/gtx/number_precision.inl
-include/solarus/third_party/glm/gtx/optimum_pow.hpp
-include/solarus/third_party/glm/gtx/optimum_pow.inl
-include/solarus/third_party/glm/gtx/orthonormalize.hpp
-include/solarus/third_party/glm/gtx/orthonormalize.inl
-include/solarus/third_party/glm/gtx/perpendicular.hpp
-include/solarus/third_party/glm/gtx/perpendicular.inl
-include/solarus/third_party/glm/gtx/polar_coordinates.hpp
-include/solarus/third_party/glm/gtx/polar_coordinates.inl
-include/solarus/third_party/glm/gtx/projection.hpp
-include/solarus/third_party/glm/gtx/projection.inl
-include/solarus/third_party/glm/gtx/quaternion.hpp
-include/solarus/third_party/glm/gtx/quaternion.inl
-include/solarus/third_party/glm/gtx/range.hpp
-include/solarus/third_party/glm/gtx/raw_data.hpp
-include/solarus/third_party/glm/gtx/raw_data.inl
-include/solarus/third_party/glm/gtx/rotate_normalized_axis.hpp
-include/solarus/third_party/glm/gtx/rotate_normalized_axis.inl
-include/solarus/third_party/glm/gtx/rotate_vector.hpp
-include/solarus/third_party/glm/gtx/rotate_vector.inl
-include/solarus/third_party/glm/gtx/scalar_multiplication.hpp
-include/solarus/third_party/glm/gtx/scalar_relational.hpp
-include/solarus/third_party/glm/gtx/scalar_relational.inl
-include/solarus/third_party/glm/gtx/simd_mat4.hpp
-include/solarus/third_party/glm/gtx/simd_mat4.inl
-include/solarus/third_party/glm/gtx/simd_quat.hpp
-include/solarus/third_party/glm/gtx/simd_quat.inl
-include/solarus/third_party/glm/gtx/simd_vec4.hpp
-include/solarus/third_party/glm/gtx/simd_vec4.inl
-include/solarus/third_party/glm/gtx/spline.hpp
-include/solarus/third_party/glm/gtx/spline.inl
-include/solarus/third_party/glm/gtx/std_based_type.hpp
-include/solarus/third_party/glm/gtx/std_based_type.inl
-include/solarus/third_party/glm/gtx/string_cast.hpp
-include/solarus/third_party/glm/gtx/string_cast.inl
-include/solarus/third_party/glm/gtx/transform.hpp
-include/solarus/third_party/glm/gtx/transform.inl
-include/solarus/third_party/glm/gtx/transform2.hpp
-include/solarus/third_party/glm/gtx/transform2.inl
-include/solarus/third_party/glm/gtx/type_aligned.hpp
-include/solarus/third_party/glm/gtx/type_aligned.inl
-include/solarus/third_party/glm/gtx/vector_angle.hpp
-include/solarus/third_party/glm/gtx/vector_angle.inl
-include/solarus/third_party/glm/gtx/vector_query.hpp
-include/solarus/third_party/glm/gtx/vector_query.inl
-include/solarus/third_party/glm/gtx/wrap.hpp
-include/solarus/third_party/glm/gtx/wrap.inl
-include/solarus/third_party/glm/integer.hpp
-include/solarus/third_party/glm/mat2x2.hpp
-include/solarus/third_party/glm/mat2x3.hpp
-include/solarus/third_party/glm/mat2x4.hpp
-include/solarus/third_party/glm/mat3x2.hpp
-include/solarus/third_party/glm/mat3x3.hpp
-include/solarus/third_party/glm/mat3x4.hpp
-include/solarus/third_party/glm/mat4x2.hpp
-include/solarus/third_party/glm/mat4x3.hpp
-include/solarus/third_party/glm/mat4x4.hpp
-include/solarus/third_party/glm/matrix.hpp
-include/solarus/third_party/glm/packing.hpp
-include/solarus/third_party/glm/trigonometric.hpp
-include/solarus/third_party/glm/vec2.hpp
-include/solarus/third_party/glm/vec3.hpp
-include/solarus/third_party/glm/vec4.hpp
-include/solarus/third_party/glm/vector_relational.hpp
-include/solarus/third_party/hqx/
-include/solarus/third_party/hqx/common.h
-include/solarus/third_party/hqx/hqx.h
-include/solarus/third_party/snes_spc/
-include/solarus/third_party/snes_spc/SNES_SPC.h
-include/solarus/third_party/snes_spc/SPC_CPU.h
-include/solarus/third_party/snes_spc/SPC_DSP.h
-include/solarus/third_party/snes_spc/SPC_Filter.h
-include/solarus/third_party/snes_spc/blargg_common.h
-include/solarus/third_party/snes_spc/blargg_config.h
-include/solarus/third_party/snes_spc/blargg_endian.h
-include/solarus/third_party/snes_spc/blargg_source.h
-include/solarus/third_party/snes_spc/dsp.h
-include/solarus/third_party/snes_spc/spc.h
-lib/libsolarus-gui.so
+include/solarus/third_party/KHR/
+include/solarus/third_party/KHR/khrplatform.h
+include/solarus/third_party/glad/
+include/solarus/third_party/glad/glad.h
+include/solarus/third_party/hqx.h
+include/solarus/third_party/spc.h
@lib lib/libsolarus.so.${LIBsolarus_VERSION}
@man man/man6/solarus-run.6
-@man man/man6/solarus.6
-share/appdata/
-share/appdata/solarus.appdata.xml
-share/applications/solarus.desktop
-share/icons/hicolor/128x128/apps/solarus.png
-share/icons/hicolor/16x16/apps/solarus.png
-share/icons/hicolor/24x24/apps/solarus.png
-share/icons/hicolor/256x256/apps/solarus.png
-share/icons/hicolor/32x32/apps/solarus.png
-share/icons/hicolor/48x48/apps/solarus.png
-share/icons/hicolor/512x512/apps/solarus.png
-share/icons/hicolor/64x64/apps/solarus.png
@tag gtk-update-icon-cache %D/share/icons/hicolor
@tag update-desktop-database
+share/solarus/
+share/solarus/gamecontrollerdb.txt
Index: zsdx/Makefile
===================================================================
RCS file: /cvs/ports/games/solarus/zsdx/Makefile,v
diff -u -p -r1.16 Makefile
--- zsdx/Makefile 13 Feb 2026 12:02:16 -0000 1.16
+++ zsdx/Makefile 31 Mar 2026 23:17:00 -0000
@@ -1,12 +1,10 @@
COMMENT = fan made Zelda game for Solarus engine
-GH_ACCOUNT= christopho
-GH_PROJECT= zsdx
-GH_TAGNAME= ${GH_PROJECT}-1.11.0
-DISTNAME= ${GH_TAGNAME}
-REVISION = 1
+V = 1.12.3
+H = 9635bfc2ece38dd97e8fe015cc0bf0ce759214f0
+DIST_TUPLE = gitlab solarus-games/games zsdx v${V} .
-HOMEPAGE = https://www.solarus-games.org/en/games/the-legend-of-zelda-mystery-of-solarus-dx
+HOMEPAGE = https://www.solarus-games.org/games/the-legend-of-zelda-mystery-of-solarus-dx
# GPLv3+ and CC BY-SA 3.0
PERMIT_PACKAGE = Yes
@@ -17,6 +15,10 @@ BUILD_DEPENDS = archivers/zip
MODCMAKE_POLICY_VERSION_OVERRIDE = Yes
-RUN_DEPENDS = games/solarus/solarus>=1.5.0
+RUN_DEPENDS = games/solarus/solarus>=1.5.0 \
+ devel/desktop-file-utils \
+ x11/gtk+4,-guic
+
+WRKDIST = ${WRKDIR}/zsdx-v${V}-${H}
.include <bsd.port.mk>
Index: zsdx/distinfo
===================================================================
RCS file: /cvs/ports/games/solarus/zsdx/distinfo,v
diff -u -p -r1.6 distinfo
--- zsdx/distinfo 11 Aug 2016 11:29:36 -0000 1.6
+++ zsdx/distinfo 31 Mar 2026 23:17:00 -0000
@@ -1,2 +1,2 @@
-SHA256 (zsdx-1.11.0.tar.gz) = BaXSILvyQ5ydoucc2dEEJAh4Ej//W8cC4kBdbQcS8Nw=
-SIZE (zsdx-1.11.0.tar.gz) = 21813921
+SHA256 (solarus-games/games-zsdx-v1.12.3.tar.gz) = n6OULlo/LuVm/PTLQ0/VWhCxNhZTQgSiwFF/19tYG4E=
+SIZE (solarus-games/games-zsdx-v1.12.3.tar.gz) = 21124492
Index: zsdx/patches/patch-CMakeLists_txt
===================================================================
RCS file: zsdx/patches/patch-CMakeLists_txt
diff -N zsdx/patches/patch-CMakeLists_txt
--- zsdx/patches/patch-CMakeLists_txt 11 Mar 2022 19:04:56 -0000 1.5
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-From 8dc14b86107d56b893fbaec765f9091a56e6d655 Mon Sep 17 00:00:00 2001
-From: Jasper Lievisse Adriaanse <jasper@humppa.nl>
-Date: Thu, 11 Aug 2016 13:37:51 +0200
-Subject: [PATCH] Fix 'bad $-escape' build error by escaping '$'
-
---- CMakeLists.txt.orig Thu Aug 11 13:22:36 2016
-+++ CMakeLists.txt Thu Aug 11 13:22:42 2016
-@@ -57,7 +57,7 @@ add_custom_target(${quest_name}_data
- add_custom_command(
- OUTPUT ${quest_name}
- COMMAND echo '\#!/bin/sh' > ${quest_name}
-- COMMAND echo 'solarus-run ${SOLARUS_INSTALL_ABSOLUTE_DATADIR}/${quest_name} $*' >> ${quest_name}
-+ COMMAND echo 'solarus-run ${SOLARUS_INSTALL_ABSOLUTE_DATADIR}/${quest_name} $$*' >> ${quest_name}
- )
- add_custom_target(${quest_name}_command
- ALL
Index: zsdx/pkg/PLIST
===================================================================
RCS file: /cvs/ports/games/solarus/zsdx/pkg/PLIST,v
diff -u -p -r1.2 PLIST
--- zsdx/pkg/PLIST 11 Mar 2022 19:04:56 -0000 1.2
+++ zsdx/pkg/PLIST 31 Mar 2026 23:17:00 -0000
@@ -1,4 +1,20 @@
bin/zsdx
+share/applications/zsdx.desktop
+share/icons/hicolor/1024x1024/
+share/icons/hicolor/1024x1024/apps/
+share/icons/hicolor/1024x1024/apps/zsdx.png
+share/icons/hicolor/128x128/apps/zsdx.png
+share/icons/hicolor/16x16/apps/zsdx.png
+share/icons/hicolor/24x24/apps/zsdx.png
+share/icons/hicolor/256x256/apps/zsdx.png
+share/icons/hicolor/32x32/apps/zsdx.png
+share/icons/hicolor/48x48/apps/zsdx.png
+share/icons/hicolor/512x512/apps/zsdx.png
+share/icons/hicolor/64x64/apps/zsdx.png
+share/pixmaps/
+share/pixmaps/zsdx.png
share/solarus/
share/solarus/zsdx/
share/solarus/zsdx/data.solarus
+@tag update-desktop-database
+@tag gtk-update-icon-cache %D/share/icons/hicolor
Index: zsxd/Makefile
===================================================================
RCS file: /cvs/ports/games/solarus/zsxd/Makefile,v
diff -u -p -r1.16 Makefile
--- zsxd/Makefile 13 Feb 2026 12:02:16 -0000 1.16
+++ zsxd/Makefile 31 Mar 2026 23:17:00 -0000
@@ -1,12 +1,10 @@
COMMENT = fan made parody Zelda game for Solarus engine
-GH_ACCOUNT= christopho
-GH_PROJECT= zsxd
-GH_TAGNAME= ${GH_PROJECT}-1.11.0
-DISTNAME= ${GH_TAGNAME}
-REVISION = 1
+V = 1.12.2
+H = 823b6a116ef1ca5220fcd3bb79375b6937194b92
+DIST_TUPLE = gitlab solarus-games/games zsxd v${V} .
-HOMEPAGE = https://www.solarus-games.org/en/games/the-legend-of-zelda-mystery-of-solarus-xd
+HOMEPAGE = https://www.solarus-games.org/games/the-legend-of-zelda-mystery-of-solarus-xd
# GPLv3+ and CC BY-SA 3.0
PERMIT_PACKAGE = Yes
@@ -17,6 +15,10 @@ MODCMAKE_POLICY_VERSION_OVERRIDE = Yes
BUILD_DEPENDS = archivers/zip
-RUN_DEPENDS = games/solarus/solarus>=1.5.0
+RUN_DEPENDS = games/solarus/solarus>=1.5.0 \
+ devel/desktop-file-utils \
+ x11/gtk+4,-guic
+
+WRKDIST = ${WRKDIR}/zsxd-v${V}-${H}
.include <bsd.port.mk>
Index: zsxd/distinfo
===================================================================
RCS file: /cvs/ports/games/solarus/zsxd/distinfo,v
diff -u -p -r1.6 distinfo
--- zsxd/distinfo 11 Aug 2016 11:29:15 -0000 1.6
+++ zsxd/distinfo 31 Mar 2026 23:17:00 -0000
@@ -1,2 +1,2 @@
-SHA256 (zsxd-1.11.0.tar.gz) = TG50TsxbfhI/Xghe2ZPoI0y++ARtJxfRYSGitxHgzN4=
-SIZE (zsxd-1.11.0.tar.gz) = 4393467
+SHA256 (solarus-games/games-zsxd-v1.12.2.tar.gz) = iGZy8i2O6M6ctXO9seVZc42XUxWYfUN10DBTzbvzdRA=
+SIZE (solarus-games/games-zsxd-v1.12.2.tar.gz) = 4440642
Index: zsxd/patches/patch-CMakeLists_txt
===================================================================
RCS file: zsxd/patches/patch-CMakeLists_txt
diff -N zsxd/patches/patch-CMakeLists_txt
--- zsxd/patches/patch-CMakeLists_txt 11 Mar 2022 19:04:56 -0000 1.5
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-From 8dc14b86107d56b893fbaec765f9091a56e6d655 Mon Sep 17 00:00:00 2001
-From: Jasper Lievisse Adriaanse <jasper@humppa.nl>
-Date: Thu, 11 Aug 2016 13:37:51 +0200
-Subject: [PATCH] Fix 'bad $-escape' build error by escaping '$'
-
---- CMakeLists.txt.orig Thu Aug 11 13:22:36 2016
-+++ CMakeLists.txt Thu Aug 11 13:22:42 2016
-@@ -57,7 +57,7 @@ add_custom_target(${quest_name}_data
- add_custom_command(
- OUTPUT ${quest_name}
- COMMAND echo '\#!/bin/sh' > ${quest_name}
-- COMMAND echo 'solarus-run ${SOLARUS_INSTALL_ABSOLUTE_DATADIR}/${quest_name} $*' >> ${quest_name}
-+ COMMAND echo 'solarus-run ${SOLARUS_INSTALL_ABSOLUTE_DATADIR}/${quest_name} $$*' >> ${quest_name}
- )
- add_custom_target(${quest_name}_command
- ALL
Index: zsxd/pkg/PLIST
===================================================================
RCS file: /cvs/ports/games/solarus/zsxd/pkg/PLIST,v
diff -u -p -r1.2 PLIST
--- zsxd/pkg/PLIST 11 Mar 2022 19:04:56 -0000 1.2
+++ zsxd/pkg/PLIST 31 Mar 2026 23:17:00 -0000
@@ -1,4 +1,20 @@
bin/zsxd
+share/applications/zsxd.desktop
+share/icons/hicolor/1024x1024/
+share/icons/hicolor/1024x1024/apps/
+share/icons/hicolor/1024x1024/apps/zsxd.png
+share/icons/hicolor/128x128/apps/zsxd.png
+share/icons/hicolor/16x16/apps/zsxd.png
+share/icons/hicolor/24x24/apps/zsxd.png
+share/icons/hicolor/256x256/apps/zsxd.png
+share/icons/hicolor/32x32/apps/zsxd.png
+share/icons/hicolor/48x48/apps/zsxd.png
+share/icons/hicolor/512x512/apps/zsxd.png
+share/icons/hicolor/64x64/apps/zsxd.png
+share/pixmaps/
+share/pixmaps/zsxd.png
share/solarus/
share/solarus/zsxd/
share/solarus/zsxd/data.solarus
+@tag gtk-update-icon-cache %D/share/icons/hicolor
+@tag update-desktop-database
Re: [NEW] net/arti
On 2/11/26 8:30 PM, Andrew Kloet wrote:
> Here is a port for net/arti 2.0.0
>
> Arti is a complete rewrite of the C Tor codebase, and it is currently
> under active development. It is written in Rust, and it is designed to
> be modular, reusable, and easy to audit.
>
> There was previous effort to get a port made for Arti 1.0.0 in 2022 that
> was dropped:
> https://marc.info/?l=openbsd-ports&m=166222034813901&w=2
>
> OK?
On 3/23/26 3:47 PM, Andrew Kloet wrote:
> Port has been updated 2.0.0 -> 2.1.0
> Looking for feedback and testing.
>
> Andrew
Port has been updated with today's release 2.1.0 -> 2.2.0
Still looking for feedback, thanks :)
Andrew
> Here is a port for net/arti 2.0.0
>
> Arti is a complete rewrite of the C Tor codebase, and it is currently
> under active development. It is written in Rust, and it is designed to
> be modular, reusable, and easy to audit.
>
> There was previous effort to get a port made for Arti 1.0.0 in 2022 that
> was dropped:
> https://marc.info/?l=openbsd-ports&m=166222034813901&w=2
>
> OK?
On 3/23/26 3:47 PM, Andrew Kloet wrote:
> Port has been updated 2.0.0 -> 2.1.0
> Looking for feedback and testing.
>
> Andrew
Port has been updated with today's release 2.1.0 -> 2.2.0
Still looking for feedback, thanks :)
Andrew
Re: [new] www/thinproxy 0.1.1
On 3/23/26 2:45 AM, Renaud Allard wrote:
> Hello,
>
> Here is a port for thinproxy
>
> Thinproxy is a lightweight, asynchronous HTTP/HTTPS proxy written in C.
> It uses non-blocking I/O with poll(2) in a single-threaded event loop,
> has zero external dependencies, and compiles from a single source file.
> Features include HTTP request forwarding, HTTPS tunneling via CONNECT,
> access control lists, per-IP connection limits, SSRF protection by
> blocking private addresses, and asynchronous DNS resolution. On OpenBSD
> it uses pledge(2) and unveil(2) for additional security.
>
> It will also need its own user
> 906 _thinproxy _thinproxy www/thinproxy
>
> Only tested on amd64 so far
>
> Best Regards
Works well for me on amd64.
Just ought to remove the empty patches directory as per portcheck(1).
Andrew
> Hello,
>
> Here is a port for thinproxy
>
> Thinproxy is a lightweight, asynchronous HTTP/HTTPS proxy written in C.
> It uses non-blocking I/O with poll(2) in a single-threaded event loop,
> has zero external dependencies, and compiles from a single source file.
> Features include HTTP request forwarding, HTTPS tunneling via CONNECT,
> access control lists, per-IP connection limits, SSRF protection by
> blocking private addresses, and asynchronous DNS resolution. On OpenBSD
> it uses pledge(2) and unveil(2) for additional security.
>
> It will also need its own user
> 906 _thinproxy _thinproxy www/thinproxy
>
> Only tested on amd64 so far
>
> Best Regards
Works well for me on amd64.
Just ought to remove the empty patches directory as per portcheck(1).
Andrew
Re: NEW: Parsync-0.2.0
On Tue, Mar 31, 2026 at 07:11:11PM +0200, gonzalo wrote:
> Hello,
>
> parsync is a high-throughput, resumable sync tool for SSH remotes and
> local-to-local transfers, with parallel file transfers and optional block-delta
> sync.
>
> https://github.com/AlpinDale/parsync
>
> Someone interested on this in?
pretty cool indeed
>
> Cheers.-
>
> Hello,
>
> parsync is a high-throughput, resumable sync tool for SSH remotes and
> local-to-local transfers, with parallel file transfers and optional block-delta
> sync.
>
> https://github.com/AlpinDale/parsync
>
> Someone interested on this in?
pretty cool indeed
>
> Cheers.-
>
[UPDATE] www/minify 2.24.10 -> 2.24.11
Hello, ports.
A new version of minify that brings in a few fixes. Minifying tested on
today's amd64 snap. QP-encoded diff below the changelog. Someone please
commit if OK.
Changelog:
- CSS: Remove empty rulesets.
- JS: Fix variable declaration reodering.
- JS: Suppress checking for duplicate private members in classes.
- SVG: Add KeepNamespaces option.
Detailed changelog is available at
https://github.com/tdewolff/minify/releases/tag/v2.24.11
Index: Makefile
===================================================================
RCS file: /cvs/ports/www/minify/Makefile,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 Makefile
--- Makefile 11 Mar 2026 21:25:03 -0000 1.2
+++ Makefile 31 Mar 2026 16:40:31 -0000
@@ -1,7 +1,7 @@
COMMENT = minifiers for web formats
MODGO_MODNAME = github.com/tdewolff/minify/v2
-MODGO_VERSION = v2.24.10
+MODGO_VERSION = v2.24.11
DISTNAME = minify-${MODGO_VERSION}
Index: distinfo
===================================================================
RCS file: /cvs/ports/www/minify/distinfo,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 distinfo
--- distinfo 11 Mar 2026 21:25:03 -0000 1.2
+++ distinfo 31 Mar 2026 16:40:31 -0000
@@ -16,8 +16,8 @@ SHA256 (go_modules/github.com/pelletier/
SHA256 (go_modules/github.com/pelletier/go-toml/@v/v1.9.5.zip) = 3j3NpmDMgAzYbQMnOiWVbWf0Fuj8vk0gAaLLSgHmrGA=
SHA256 (go_modules/github.com/tdewolff/argp/@v/v0.0.0-20250430135133-0f54527d2b1e.mod) = 9SfO2vq5PZdraqmjMAL7HQuaSBfyXz6tkMpJHdaYF4c=
SHA256 (go_modules/github.com/tdewolff/argp/@v/v0.0.0-20250430135133-0f54527d2b1e.zip) = tM/G5oAEVcli+G9rY1j6FLanlJ9z/qYd7+ZzutfN2VQ=
-SHA256 (go_modules/github.com/tdewolff/parse/v2/@v/v2.8.10.mod) = tlUXEpe2E8ieC/CmkPkhYX1cO0d7gYccyz7mjPHCbV8=
-SHA256 (go_modules/github.com/tdewolff/parse/v2/@v/v2.8.10.zip) = I+zwYm2ipCW8VY/TtmxaxTNyWaOwSIm5moNCEajZ8aE=
+SHA256 (go_modules/github.com/tdewolff/parse/v2/@v/v2.8.11.mod) = tlUXEpe2E8ieC/CmkPkhYX1cO0d7gYccyz7mjPHCbV8=
+SHA256 (go_modules/github.com/tdewolff/parse/v2/@v/v2.8.11.zip) = CVx9Nj06+vZN9HXhfYCPieTN3NujUqfv7Le0vK71Mjg=
SHA256 (go_modules/github.com/tdewolff/test/@v/v1.0.11.mod) = 9EefOv0J+7kaIZNIpSIgfv+uc4muXaMR/YZv9IuGFus=
SHA256 (go_modules/github.com/tdewolff/test/@v/v1.0.11.zip) = /t2vBdFIMFJd7rKD7rpBEO4clOhNeVH/lSO+zyH2w00=
SHA256 (go_modules/golang.org/x/sys/@v/v0.13.0.mod) = 8DMzMJb+GY8xUd7tk/LeunTlC7/nc5E0BFvDt85KUCQ=
@@ -27,7 +27,7 @@ SHA256 (go_modules/gopkg.in/check.v1/@v/
SHA256 (go_modules/gopkg.in/check.v1/@v/v0.0.0-20161208181325-20d25e280405.zip) = ThgX+WTKNOVFuBr9oDJaXonPWN4uQT2CB8Cv3dD9wVw=
SHA256 (go_modules/gopkg.in/yaml.v3/@v/v3.0.1.mod) = IVeYYKIDBvz0OxvSNNH7oxlJnHdhG3HAX5vzupDauTk=
SHA256 (go_modules/gopkg.in/yaml.v3/@v/v3.0.1.zip) = qrj7xOYwDqCOav4crqGKIckMefSJ9SxT4vIEMfGpoBU=
-SHA256 (minify-v2.24.10.zip) = mZD9ZnpBYimBntJUYYsB8F2o5FVzsBYL+Plzv+OIXxQ=
+SHA256 (minify-v2.24.11.zip) = +daaq6OBPbpZq9j3aToG5EKgikSv0QTu1QJ59Yv0iH0=
SIZE (go_modules/filippo.io/edwards25519/@v/v1.1.0.mod) = 40
SIZE (go_modules/filippo.io/edwards25519/@v/v1.1.0.zip) = 55809
SIZE (go_modules/github.com/djherbis/atime/@v/v1.1.0.mod) = 42
@@ -46,8 +46,8 @@ SIZE (go_modules/github.com/pelletier/go
SIZE (go_modules/github.com/pelletier/go-toml/@v/v1.9.5.zip) = 127514
SIZE (go_modules/github.com/tdewolff/argp/@v/v0.0.0-20250430135133-0f54527d2b1e.mod) = 202
SIZE (go_modules/github.com/tdewolff/argp/@v/v0.0.0-20250430135133-0f54527d2b1e.zip) = 26151
-SIZE (go_modules/github.com/tdewolff/parse/v2/@v/v2.8.10.mod) = 87
-SIZE (go_modules/github.com/tdewolff/parse/v2/@v/v2.8.10.zip) = 149590
+SIZE (go_modules/github.com/tdewolff/parse/v2/@v/v2.8.11.mod) = 87
+SIZE (go_modules/github.com/tdewolff/parse/v2/@v/v2.8.11.zip) = 149620
SIZE (go_modules/github.com/tdewolff/test/@v/v1.0.11.mod) = 41
SIZE (go_modules/github.com/tdewolff/test/@v/v1.0.11.zip) = 4421
SIZE (go_modules/golang.org/x/sys/@v/v0.13.0.mod) = 33
@@ -57,4 +57,4 @@ SIZE (go_modules/gopkg.in/check.v1/@v/v0
SIZE (go_modules/gopkg.in/check.v1/@v/v0.0.0-20161208181325-20d25e280405.zip) = 39844
SIZE (go_modules/gopkg.in/yaml.v3/@v/v3.0.1.mod) = 95
SIZE (go_modules/gopkg.in/yaml.v3/@v/v3.0.1.zip) = 104623
-SIZE (minify-v2.24.10.zip) = 7885333
+SIZE (minify-v2.24.11.zip) = 7885766
Index: modules.inc
===================================================================
RCS file: /cvs/ports/www/minify/modules.inc,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 modules.inc
--- modules.inc 11 Mar 2026 21:25:03 -0000 1.2
+++ modules.inc 31 Mar 2026 16:40:31 -0000
@@ -8,7 +8,7 @@ MODGO_MODULES = \
github.com/mattn/go-sqlite3 v1.14.22 \
github.com/pelletier/go-toml v1.9.5 \
github.com/tdewolff/argp v0.0.0-20250430135133-0f54527d2b1e \
- github.com/tdewolff/parse/v2 v2.8.10 \
+ github.com/tdewolff/parse/v2 v2.8.11 \
github.com/tdewolff/test v1.0.11 \
golang.org/x/sys v0.37.0 \
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 \
A new version of minify that brings in a few fixes. Minifying tested on
today's amd64 snap. QP-encoded diff below the changelog. Someone please
commit if OK.
Changelog:
- CSS: Remove empty rulesets.
- JS: Fix variable declaration reodering.
- JS: Suppress checking for duplicate private members in classes.
- SVG: Add KeepNamespaces option.
Detailed changelog is available at
https://github.com/tdewolff/minify/releases/tag/v2.24.11
Index: Makefile
===================================================================
RCS file: /cvs/ports/www/minify/Makefile,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 Makefile
--- Makefile 11 Mar 2026 21:25:03 -0000 1.2
+++ Makefile 31 Mar 2026 16:40:31 -0000
@@ -1,7 +1,7 @@
COMMENT = minifiers for web formats
MODGO_MODNAME = github.com/tdewolff/minify/v2
-MODGO_VERSION = v2.24.10
+MODGO_VERSION = v2.24.11
DISTNAME = minify-${MODGO_VERSION}
Index: distinfo
===================================================================
RCS file: /cvs/ports/www/minify/distinfo,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 distinfo
--- distinfo 11 Mar 2026 21:25:03 -0000 1.2
+++ distinfo 31 Mar 2026 16:40:31 -0000
@@ -16,8 +16,8 @@ SHA256 (go_modules/github.com/pelletier/
SHA256 (go_modules/github.com/pelletier/go-toml/@v/v1.9.5.zip) = 3j3NpmDMgAzYbQMnOiWVbWf0Fuj8vk0gAaLLSgHmrGA=
SHA256 (go_modules/github.com/tdewolff/argp/@v/v0.0.0-20250430135133-0f54527d2b1e.mod) = 9SfO2vq5PZdraqmjMAL7HQuaSBfyXz6tkMpJHdaYF4c=
SHA256 (go_modules/github.com/tdewolff/argp/@v/v0.0.0-20250430135133-0f54527d2b1e.zip) = tM/G5oAEVcli+G9rY1j6FLanlJ9z/qYd7+ZzutfN2VQ=
-SHA256 (go_modules/github.com/tdewolff/parse/v2/@v/v2.8.10.mod) = tlUXEpe2E8ieC/CmkPkhYX1cO0d7gYccyz7mjPHCbV8=
-SHA256 (go_modules/github.com/tdewolff/parse/v2/@v/v2.8.10.zip) = I+zwYm2ipCW8VY/TtmxaxTNyWaOwSIm5moNCEajZ8aE=
+SHA256 (go_modules/github.com/tdewolff/parse/v2/@v/v2.8.11.mod) = tlUXEpe2E8ieC/CmkPkhYX1cO0d7gYccyz7mjPHCbV8=
+SHA256 (go_modules/github.com/tdewolff/parse/v2/@v/v2.8.11.zip) = CVx9Nj06+vZN9HXhfYCPieTN3NujUqfv7Le0vK71Mjg=
SHA256 (go_modules/github.com/tdewolff/test/@v/v1.0.11.mod) = 9EefOv0J+7kaIZNIpSIgfv+uc4muXaMR/YZv9IuGFus=
SHA256 (go_modules/github.com/tdewolff/test/@v/v1.0.11.zip) = /t2vBdFIMFJd7rKD7rpBEO4clOhNeVH/lSO+zyH2w00=
SHA256 (go_modules/golang.org/x/sys/@v/v0.13.0.mod) = 8DMzMJb+GY8xUd7tk/LeunTlC7/nc5E0BFvDt85KUCQ=
@@ -27,7 +27,7 @@ SHA256 (go_modules/gopkg.in/check.v1/@v/
SHA256 (go_modules/gopkg.in/check.v1/@v/v0.0.0-20161208181325-20d25e280405.zip) = ThgX+WTKNOVFuBr9oDJaXonPWN4uQT2CB8Cv3dD9wVw=
SHA256 (go_modules/gopkg.in/yaml.v3/@v/v3.0.1.mod) = IVeYYKIDBvz0OxvSNNH7oxlJnHdhG3HAX5vzupDauTk=
SHA256 (go_modules/gopkg.in/yaml.v3/@v/v3.0.1.zip) = qrj7xOYwDqCOav4crqGKIckMefSJ9SxT4vIEMfGpoBU=
-SHA256 (minify-v2.24.10.zip) = mZD9ZnpBYimBntJUYYsB8F2o5FVzsBYL+Plzv+OIXxQ=
+SHA256 (minify-v2.24.11.zip) = +daaq6OBPbpZq9j3aToG5EKgikSv0QTu1QJ59Yv0iH0=
SIZE (go_modules/filippo.io/edwards25519/@v/v1.1.0.mod) = 40
SIZE (go_modules/filippo.io/edwards25519/@v/v1.1.0.zip) = 55809
SIZE (go_modules/github.com/djherbis/atime/@v/v1.1.0.mod) = 42
@@ -46,8 +46,8 @@ SIZE (go_modules/github.com/pelletier/go
SIZE (go_modules/github.com/pelletier/go-toml/@v/v1.9.5.zip) = 127514
SIZE (go_modules/github.com/tdewolff/argp/@v/v0.0.0-20250430135133-0f54527d2b1e.mod) = 202
SIZE (go_modules/github.com/tdewolff/argp/@v/v0.0.0-20250430135133-0f54527d2b1e.zip) = 26151
-SIZE (go_modules/github.com/tdewolff/parse/v2/@v/v2.8.10.mod) = 87
-SIZE (go_modules/github.com/tdewolff/parse/v2/@v/v2.8.10.zip) = 149590
+SIZE (go_modules/github.com/tdewolff/parse/v2/@v/v2.8.11.mod) = 87
+SIZE (go_modules/github.com/tdewolff/parse/v2/@v/v2.8.11.zip) = 149620
SIZE (go_modules/github.com/tdewolff/test/@v/v1.0.11.mod) = 41
SIZE (go_modules/github.com/tdewolff/test/@v/v1.0.11.zip) = 4421
SIZE (go_modules/golang.org/x/sys/@v/v0.13.0.mod) = 33
@@ -57,4 +57,4 @@ SIZE (go_modules/gopkg.in/check.v1/@v/v0
SIZE (go_modules/gopkg.in/check.v1/@v/v0.0.0-20161208181325-20d25e280405.zip) = 39844
SIZE (go_modules/gopkg.in/yaml.v3/@v/v3.0.1.mod) = 95
SIZE (go_modules/gopkg.in/yaml.v3/@v/v3.0.1.zip) = 104623
-SIZE (minify-v2.24.10.zip) = 7885333
+SIZE (minify-v2.24.11.zip) = 7885766
Index: modules.inc
===================================================================
RCS file: /cvs/ports/www/minify/modules.inc,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 modules.inc
--- modules.inc 11 Mar 2026 21:25:03 -0000 1.2
+++ modules.inc 31 Mar 2026 16:40:31 -0000
@@ -8,7 +8,7 @@ MODGO_MODULES = \
github.com/mattn/go-sqlite3 v1.14.22 \
github.com/pelletier/go-toml v1.9.5 \
github.com/tdewolff/argp v0.0.0-20250430135133-0f54527d2b1e \
- github.com/tdewolff/parse/v2 v2.8.10 \
+ github.com/tdewolff/parse/v2 v2.8.11 \
github.com/tdewolff/test v1.0.11 \
golang.org/x/sys v0.37.0 \
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 \
NEW: Parsync-0.2.0
Hello,
parsync is a high-throughput, resumable sync tool for SSH remotes and
local-to-local transfers, with parallel file transfers and optional block-delta
sync.
https://github.com/AlpinDale/parsync
Someone interested on this in?
Cheers.-
parsync is a high-throughput, resumable sync tool for SSH remotes and
local-to-local transfers, with parallel file transfers and optional block-delta
sync.
https://github.com/AlpinDale/parsync
Someone interested on this in?
Cheers.-
Re: Update: prometheus to 3.5.1
On 2026-03-25 11:50, Claudio Jeker wrote:
> I spent the last few days improving the mmap_openbsd diff to also cover
> the chunks. This should fix a frequent panic like this one:
> panic: corruption in head chunk file
> /var/prometheus/chunks_head/001099: checksum mismatch expected:0,
> actual:d096d996
>
> I had to fiddle a lot in tsdb/chunks to make this work and the
> MmapWriter
> code had to be seriously adjusted so that performance did not tank.
> One of the main issues is mmap.resize which does munmap / mmap dances
> that
> very much show how horribly inefficent munmap is on OpenBSD. To prevent
> excess resize calls I preallocate the mmaps to the maximum size.
> Also the number of msync(2) calls has been reduced as much as possible
> since those trigger similarly inefficent code paths as munmap.
> In most cases there is no need to msync(2) since all mmaps use the same
> backing uvm_object and so the read-only mappings will see the changes
> without msync(2).
>
> This seems to be stable on my "production" system and the performance
> seems to be ok for my case.
> --
> :wq Claudio
I've been running with this patch (the first one from this thread) since
the last week and it is rock solid :)
Thanks for your work!
Best wishes,
Atanas
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/sysutils/prometheus/Makefile,v
> diff -u -p -r1.23 Makefile
> --- Makefile 25 Sep 2023 17:07:36 -0000 1.23
> +++ Makefile 23 Mar 2026 21:46:40 -0000
> @@ -1,6 +1,6 @@
> COMMENT = systems monitoring and alerting toolkit
>
> -V = 2.37.9
> +V = 3.5.1
> GH_ACCOUNT = prometheus
> GH_PROJECT = prometheus
> GH_TAGNAME = v${V}
> @@ -29,27 +29,20 @@ USE_GMAKE = Yes
> MODULES = lang/go
> MODGO_GOPATH = ${MODGO_WORKSPACE}
>
> -post-extract:
> - mv ${WRKDIR}/static/react ${WRKDIST}/web/ui/static/
> -
> # promu doesn't like the default PREFIX
> do-build:
> cd ${WRKSRC} && \
> ${MAKE_ENV} GOMAXPROCS=${MAKE_JOBS} PREFIX=. ${MAKE_PROGRAM} \
> + PREBUILT_ASSETS_STATIC_DIR=${WRKDIR}/static \
> PROMU="${LOCALBASE}/bin/promu -v" build
>
> do-install:
> ${INSTALL_DATA_DIR} ${WRKINST}/${SYSCONFDIR}/prometheus
> ${INSTALL_DATA_DIR} ${WRKINST}/${LOCALSTATEDIR}/prometheus
> ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/prometheus
> - ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/prometheus/consoles
> - ${INSTALL_DATA_DIR}
> ${PREFIX}/share/examples/prometheus/console_libraries
> + ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/prometheus
> ${INSTALL_PROGRAM} ${WRKSRC}/prometheus ${PREFIX}/bin
> ${INSTALL_PROGRAM} ${WRKSRC}/promtool ${PREFIX}/bin
> - ${INSTALL_DATA} ${WRKSRC}/consoles/* \
> - ${PREFIX}/share/examples/prometheus/consoles/
> - ${INSTALL_DATA} ${WRKSRC}/console_libraries/{menu.lib,prom.lib} \
> - ${PREFIX}/share/examples/prometheus/console_libraries
> ${INSTALL_DATA} ${WRKSRC}/documentation/examples/prometheus.yml \
> ${PREFIX}/share/examples/prometheus/prometheus.yml
> ${INSTALL_DATA} ${WRKSRC}/LICENSE ${PREFIX}/share/doc/prometheus/
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/sysutils/prometheus/distinfo,v
> diff -u -p -r1.12 distinfo
> --- distinfo 6 Sep 2023 10:28:49 -0000 1.12
> +++ distinfo 18 Mar 2026 16:33:34 -0000
> @@ -1,6 +1,6 @@
> -SHA256 (prometheus-2.37.9.tar.gz) =
> gSoQplOidWqzAzS9TPBmH5TepeWUw3LTPRNwQHRgpGo=
> -SHA256 (prometheus-vendor-2.37.9.tar.gz) =
> ea+tEdN2yBEMBYY78U6tPOLI7uorbEhNL3o5/JTxaPI=
> -SHA256 (prometheus-web-ui-2.37.9.tar.gz) =
> 2z6Ohg/dUEwQ5NxTn1wfxwVrKOPJGAWgSXNxb2lX4MA=
> -SIZE (prometheus-2.37.9.tar.gz) = 6048911
> -SIZE (prometheus-vendor-2.37.9.tar.gz) = 11758451
> -SIZE (prometheus-web-ui-2.37.9.tar.gz) = 2390133
> +SHA256 (prometheus-3.5.1.tar.gz) =
> rdZ3162GT87UPBS6CNooIT7+ibHje6WSnu9D1bgvaS8=
> +SHA256 (prometheus-vendor-3.5.1.tar.gz) =
> SfhHWwxq4/bzMvTfN9dn9IgxqNpXpzkL+0YczqKvp0E=
> +SHA256 (prometheus-web-ui-3.5.1.tar.gz) =
> 1Cvm4TYLCadGMAKBj6uviDRzawIm6S7guO0SUQwIsgY=
> +SIZE (prometheus-3.5.1.tar.gz) = 5129927
> +SIZE (prometheus-vendor-3.5.1.tar.gz) = 16523299
> +SIZE (prometheus-web-ui-3.5.1.tar.gz) = 3487629
> Index: patches/patch-Makefile
> ===================================================================
> RCS file: patches/patch-Makefile
> diff -N patches/patch-Makefile
> --- patches/patch-Makefile 28 Feb 2023 17:54:21 -0000 1.7
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,23 +0,0 @@
> -The react build is provided via extra distfile
> -
> -Index: Makefile
> ---- Makefile.orig
> -+++ Makefile
> -@@ -83,7 +83,7 @@ ui-lint:
> - cd $(UI_PATH) && npm run lint
> -
> - .PHONY: assets
> --assets: ui-install ui-build
> -+assets:
> -
> - .PHONY: assets-compress
> - assets-compress: assets
> -@@ -124,7 +124,7 @@ plugins/plugins.go: plugins.yml
> plugins/generate.go
> - plugins: plugins/plugins.go
> -
> - .PHONY: build
> --build: assets npm_licenses assets-compress common-build plugins
> -+build: assets-compress common-build plugins
> -
> - .PHONY: bench_tsdb
> - bench_tsdb: $(PROMU)
> Index: patches/patch-Makefile_common
> ===================================================================
> RCS file:
> /cvs/ports/sysutils/prometheus/patches/patch-Makefile_common,v
> diff -u -p -r1.7 patch-Makefile_common
> --- patches/patch-Makefile_common 28 Feb 2023 17:54:21 -0000 1.7
> +++ patches/patch-Makefile_common 18 Mar 2026 15:27:52 -0000
> @@ -3,7 +3,7 @@ Don't fetch promu form internet. This is
> Index: Makefile.common
> --- Makefile.common.orig
> +++ Makefile.common
> -@@ -232,11 +232,7 @@ common-docker-manifest:
> +@@ -247,11 +247,7 @@ common-docker-manifest:
> promu: $(PROMU)
>
> $(PROMU):
> @@ -14,5 +14,5 @@ Index: Makefile.common
> - rm -r $(PROMU_TMP)
> + @true
>
> - .PHONY: proto
> - proto:
> + .PHONY: common-proto
> + common-proto:
> Index: patches/patch-_promu_yml
> ===================================================================
> RCS file: /cvs/ports/sysutils/prometheus/patches/patch-_promu_yml,v
> diff -u -p -r1.6 patch-_promu_yml
> --- patches/patch-_promu_yml 6 Sep 2023 10:28:49 -0000 1.6
> +++ patches/patch-_promu_yml 18 Mar 2026 15:52:51 -0000
> @@ -3,12 +3,11 @@ Don't include user and hostname into bui
> Index: .promu.yml
> --- .promu.yml.orig
> +++ .promu.yml
> -@@ -16,13 +16,13 @@ build:
> +@@ -16,12 +16,13 @@ build:
> - builtinassets
> windows:
> - builtinassets
> -- flags: -a
> -+ flags: -v -a
> ++ flags: -v
> ldflags: |
> - -X github.com/prometheus/common/version.Version={{.Version}}
> - -X
> github.com/prometheus/common/version.Revision={{.Revision}}
> Index: patches/patch-mmap_openbsd
> ===================================================================
> RCS file: /cvs/ports/sysutils/prometheus/patches/patch-mmap_openbsd,v
> diff -u -p -r1.3 patch-mmap_openbsd
> --- patches/patch-mmap_openbsd 15 Jun 2023 08:52:07 -0000 1.3
> +++ patches/patch-mmap_openbsd 25 Mar 2026 09:38:59 -0000
> @@ -1,89 +1,106 @@
> -Diff from https://github.com/prometheus/prometheus/issues/8799
> +Diff from https://github.com/cjeker/prometheus/tree/mmap_openbsd_v351
> +Based on work from
> https://github.com/prometheus/prometheus/issues/8799
> and https://github.com/prometheus/prometheus/pull/9085
> to make tsdb only use mmap and work around missing UBC support.
>
> diff --git go.mod go.mod
> -index 39c3fcb5b..760b39a8b 100644
> +index 7a27951ac..eee4405dd 100644
> --- go.mod
> +++ go.mod
> -@@ -13,7 +13,6 @@ require (
> - github.com/dgryski/go-sip13 v0.0.0-20200911182023-62edffca9245
> - github.com/digitalocean/godo v1.81.0
> - github.com/docker/docker v20.10.24+incompatible
> -- github.com/edsrzf/mmap-go v1.1.0
> - github.com/envoyproxy/go-control-plane v0.10.3
> - github.com/envoyproxy/protoc-gen-validate v0.6.7
> - github.com/fsnotify/fsnotify v1.5.4
> +@@ -17,7 +17,6 @@ require (
> + github.com/dennwc/varint v1.0.0
> + github.com/digitalocean/godo v1.152.0
> + github.com/docker/docker v28.5.2+incompatible
> +- github.com/edsrzf/mmap-go v1.2.0
> + github.com/envoyproxy/go-control-plane/envoy v1.32.4
> + github.com/envoyproxy/protoc-gen-validate v1.2.1
> + github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb
> diff --git go.sum go.sum
> -index e7aee4a9b..6b323945d 100644
> +index 8ed834bcf..00ff455ac 100644
> --- go.sum
> +++ go.sum
> -@@ -202,8 +202,6 @@ github.com/eapache/go-resiliency v1.1.0/go.mod
> h1:kFI+JgMyC7bLPUVY133qvEBtVayf5m
> - github.com/eapache/go-xerial-snappy
> v0.0.0-20180814174437-776d5712da21/go.mod
> h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
> - github.com/eapache/queue v1.1.0/go.mod
> h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
> - github.com/edsrzf/mmap-go v1.0.0/go.mod
> h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
> --github.com/edsrzf/mmap-go v1.1.0
> h1:6EUwBLQ/Mcr1EYLE4Tn1VdW1A4ckqCQWZBw8Hr0kjpQ=
> --github.com/edsrzf/mmap-go v1.1.0/go.mod
> h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q=
> - github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod
> h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
> - github.com/emicklei/go-restful
> v0.0.0-20170410110728-ff4f55a20633/go.mod
> h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
> - github.com/emicklei/go-restful v2.9.5+incompatible/go.mod
> h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
> +@@ -122,8 +122,6 @@ github.com/docker/go-connections v0.4.0
> h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKoh
> + github.com/docker/go-connections v0.4.0/go.mod
> h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
> + github.com/docker/go-units v0.5.0
> h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
> + github.com/docker/go-units v0.5.0/go.mod
> h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
> +-github.com/edsrzf/mmap-go v1.2.0
> h1:hXLYlkbaPzt1SaQk+anYwKSRNhufIDCchSPkUD6dD84=
> +-github.com/edsrzf/mmap-go v1.2.0/go.mod
> h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q=
> + github.com/emicklei/go-restful/v3 v3.11.0
> h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g=
> + github.com/emicklei/go-restful/v3 v3.11.0/go.mod
> h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
> + github.com/envoyproxy/go-control-plane/envoy v1.32.4
> h1:jb83lalDRZSpPWW2Z7Mck/8kXZ5CQAFYVjQcdVIr83A=
> diff --git promql/query_logger.go promql/query_logger.go
> -index 716e7749b..8eb1afce0 100644
> +index c0a70b66d..8aac517e2 100644
> --- promql/query_logger.go
> +++ promql/query_logger.go
> -@@ -22,13 +22,13 @@ import (
> +@@ -26,11 +26,11 @@ import (
> "time"
> "unicode/utf8"
>
> - "github.com/edsrzf/mmap-go"
> - "github.com/go-kit/log"
> - "github.com/go-kit/log/level"
> + "github.com/prometheus/prometheus/tsdb/fileutil"
> )
>
> type ActiveQueryTracker struct {
> -- mmapedFile []byte
> +- mmappedFile []byte
> + mw *fileutil.MmapWriter
> getNextIndex chan int
> - logger log.Logger
> - maxConcurrent int
> -@@ -81,7 +81,7 @@ func logUnfinishedQueries(filename string, filesize
> int, logger log.Logger) {
> + logger *slog.Logger
> + closer io.Closer
> +@@ -87,12 +87,12 @@ func logUnfinishedQueries(filename string,
> filesize int, logger *slog.Logger) {
> + }
> +
> + type mmappedFile struct {
> +- f io.Closer
> +- m mmap.MMap
> ++ f io.Closer
> ++ mw *fileutil.MmapWriter
> + }
> +
> + func (f *mmappedFile) Close() error {
> +- err := f.m.Unmap()
> ++ err := f.mw.Close()
> + if err != nil {
> + err = fmt.Errorf("mmappedFile: unmapping: %w", err)
> }
> +@@ -103,7 +103,7 @@ func (f *mmappedFile) Close() error {
> + return err
> }
>
> --func getMMapedFile(filename string, filesize int, logger log.Logger)
> ([]byte, error) {
> -+func getMMapedFile(filename string, filesize int, logger log.Logger)
> (*fileutil.MmapWriter, error) {
> +-func getMMappedFile(filename string, filesize int, logger
> *slog.Logger) ([]byte, io.Closer, error) {
> ++func getMMappedFile(filename string, filesize int, logger
> *slog.Logger) (*fileutil.MmapWriter, io.Closer, error) {
> file, err := os.OpenFile(filename, os.O_CREATE|os.O_RDWR|os.O_TRUNC,
> 0o666)
> if err != nil {
> absPath, pathErr := filepath.Abs(filename)
> -@@ -92,19 +92,13 @@ func getMMapedFile(filename string, filesize int,
> logger log.Logger) ([]byte, er
> - return nil, err
> +@@ -114,21 +114,14 @@ func getMMappedFile(filename string, filesize
> int, logger *slog.Logger) ([]byte,
> + return nil, nil, err
> }
>
> - err = file.Truncate(int64(filesize))
> - if err != nil {
> -- level.Error(logger).Log("msg", "Error setting filesize.",
> "filesize", filesize, "err", err)
> -- return nil, err
> +- file.Close()
> +- logger.Error("Error setting filesize.", "filesize", filesize,
> "err", err)
> +- return nil, nil, err
> - }
> -
> - fileAsBytes, err := mmap.Map(file, mmap.RDWR, 0)
> + mw, err := fileutil.NewMmapWriterWithSize(file, filesize)
> if err != nil {
> - level.Error(logger).Log("msg", "Failed to mmap", "file", filename,
> "Attempted size", filesize, "err", err)
> - return nil, err
> + file.Close()
> + logger.Error("Failed to mmap", "file", filename, "Attempted size",
> filesize, "err", err)
> + return nil, nil, err
> }
>
> -- return fileAsBytes, err
> -+ return mw, err
> +- return fileAsBytes, &mmappedFile{f: file, m: fileAsBytes}, err
> ++ return mw, &mmappedFile{f: file, mw: mw}, err
> }
>
> - func NewActiveQueryTracker(localStoragePath string, maxConcurrent
> int, logger log.Logger) *ActiveQueryTracker {
> -@@ -116,14 +110,17 @@ func NewActiveQueryTracker(localStoragePath
> string, maxConcurrent int, logger lo
> + func NewActiveQueryTracker(localStoragePath string, maxConcurrent
> int, logger *slog.Logger) *ActiveQueryTracker {
> +@@ -140,15 +133,18 @@ func NewActiveQueryTracker(localStoragePath
> string, maxConcurrent int, logger *s
> filename, filesize := filepath.Join(localStoragePath,
> "queries.active"), 1+maxConcurrent*entrySize
> logUnfinishedQueries(filename, filesize, logger)
>
> -- fileAsBytes, err := getMMapedFile(filename, filesize, logger)
> -+ mw, err := getMMapedFile(filename, filesize, logger)
> +- fileAsBytes, closer, err := getMMappedFile(filename, filesize,
> logger)
> ++ mw, closer, err := getMMappedFile(filename, filesize, logger)
> if err != nil {
> panic("Unable to create mmap-ed active query log")
> }
> @@ -94,16 +111,19 @@ index 716e7749b..8eb1afce0 100644
> + panic("Unable to write mmap-ed active query log")
> + }
> activeQueryTracker := ActiveQueryTracker{
> -- mmapedFile: fileAsBytes,
> +- mmappedFile: fileAsBytes,
> + closer: closer,
> + mw: mw,
> getNextIndex: make(chan int, maxConcurrent),
> logger: logger,
> maxConcurrent: maxConcurrent,
> -@@ -180,19 +177,27 @@ func (tracker ActiveQueryTracker)
> GetMaxConcurrent() int {
> +@@ -205,19 +201,29 @@ func (tracker ActiveQueryTracker)
> GetMaxConcurrent() int {
> }
>
> func (tracker ActiveQueryTracker) Delete(insertIndex int) {
> -- copy(tracker.mmapedFile[insertIndex:], strings.Repeat("\x00",
> entrySize))
> +- copy(tracker.mmappedFile[insertIndex:], strings.Repeat("\x00",
> entrySize))
> ++ buf := tracker.mw.Bytes()
> ++ copy(buf[insertIndex:], strings.Repeat("\x00", entrySize))
> + _, err := tracker.mw.WriteAt([]byte(strings.Repeat("\x00",
> entrySize)), int64(insertIndex))
> + if err != nil {
> + panic("Unable to write mmap-ed active query log")
> @@ -114,7 +134,7 @@ index 716e7749b..8eb1afce0 100644
> func (tracker ActiveQueryTracker) Insert(ctx context.Context, query
> string) (int, error) {
> select {
> case i := <-tracker.getNextIndex:
> -- fileBytes := tracker.mmapedFile
> +- fileBytes := tracker.mmappedFile
> entry := newJSONEntry(query, tracker.logger)
> start, end := i, i+entrySize
>
> @@ -132,20 +152,20 @@ index 716e7749b..8eb1afce0 100644
> case <-ctx.Done():
> return 0, ctx.Err()
> diff --git promql/query_logger_test.go promql/query_logger_test.go
> -index ad76fb992..bd92b81af 100644
> +index eb06e513e..ef2f85cfd 100644
> --- promql/query_logger_test.go
> +++ promql/query_logger_test.go
> -@@ -19,13 +19,22 @@ import (
> - "testing"
> +@@ -21,12 +21,22 @@ import (
>
> "github.com/grafana/regexp"
> -+ "github.com/prometheus/prometheus/tsdb/fileutil"
> "github.com/stretchr/testify/require"
> ++
> ++ "github.com/prometheus/prometheus/tsdb/fileutil"
> )
>
> func TestQueryLogging(t *testing.T) {
> - fileAsBytes := make([]byte, 4096)
> -+ file, err := ioutil.TempFile("", "mmapedFile")
> ++ file, err := os.CreateTemp("", "mmapedFile")
> + require.NoError(t, err)
> +
> + filename := file.Name()
> @@ -155,12 +175,12 @@ index ad76fb992..bd92b81af 100644
> + require.NoError(t, err)
> +
> queryLogger := ActiveQueryTracker{
> -- mmapedFile: fileAsBytes,
> +- mmappedFile: fileAsBytes,
> + mw: mw,
> logger: nil,
> getNextIndex: make(chan int, 4),
> }
> -@@ -45,6 +54,7 @@ func TestQueryLogging(t *testing.T) {
> +@@ -46,6 +56,7 @@ func TestQueryLogging(t *testing.T) {
> `^{"query":"","timestamp_sec":\d+}\x00*,$`,
> `^{"query":"SpecialCharQuery{host=\\"2132132\\",
> id=123123}","timestamp_sec":\d+}\x00*,$`,
> }
> @@ -168,12 +188,12 @@ index ad76fb992..bd92b81af 100644
>
> // Check for inserts of queries.
> for i := 0; i < 4; i++ {
> -@@ -67,9 +77,17 @@ func TestQueryLogging(t *testing.T) {
> +@@ -68,9 +79,17 @@ func TestQueryLogging(t *testing.T) {
> }
>
> func TestIndexReuse(t *testing.T) {
> - queryBytes := make([]byte, 1+3*entrySize)
> -+ file, err := ioutil.TempFile("", "mmapedFile")
> ++ file, err := os.CreateTemp("", "mmapedFile")
> + require.NoError(t, err)
> +
> + filename := file.Name()
> @@ -183,12 +203,12 @@ index ad76fb992..bd92b81af 100644
> + require.NoError(t, err)
> +
> queryLogger := ActiveQueryTracker{
> -- mmapedFile: queryBytes,
> +- mmappedFile: queryBytes,
> + mw: mw,
> logger: nil,
> getNextIndex: make(chan int, 3),
> }
> -@@ -91,6 +109,7 @@ func TestIndexReuse(t *testing.T) {
> +@@ -92,6 +111,7 @@ func TestIndexReuse(t *testing.T) {
>
> `^{"query":"ThisShouldBeInsertedAtIndex2","timestamp_sec":\d+}\x00*,$`,
> `^{"query":"TestQuery3","timestamp_sec":\d+}\x00*,$`,
> }
> @@ -196,26 +216,367 @@ index ad76fb992..bd92b81af 100644
>
> // Check all bytes and verify new query was inserted at index 2
> for i := 0; i < 3; i++ {
> -@@ -110,10 +129,12 @@ func TestMMapFile(t *testing.T) {
> - filename := file.Name()
> - defer os.Remove(filename)
> +@@ -109,9 +129,10 @@ func TestMMapFile(t *testing.T) {
> + fpath := filepath.Join(dir, "mmappedFile")
> + const data = "ab"
>
> -- fileAsBytes, err := getMMapedFile(filename, 2, nil)
> -+ mw, err := getMMapedFile(filename, 2, nil)
> -+ require.NoError(t, err)
> -
> -+ fileAsBytes := mw.Bytes()
> -+ _, err = mw.Write([]byte("ab"))
> +- fileAsBytes, closer, err := getMMappedFile(fpath, 2, nil)
> ++ mw, closer, err := getMMappedFile(fpath, 2, nil)
> require.NoError(t, err)
> -- copy(fileAsBytes, "ab")
> +- copy(fileAsBytes, data)
> ++ buf := mw.Bytes()
> ++ copy(buf, data)
> + require.NoError(t, closer.Close())
> +
> + f, err := os.Open(fpath)
> +diff --git tsdb/chunks/chunks.go tsdb/chunks/chunks.go
> +index 034106238..9d9606512 100644
> +--- tsdb/chunks/chunks.go
> ++++ tsdb/chunks/chunks.go
> +@@ -280,7 +280,7 @@ func checkCRC32(data, sum []byte) error {
> + type Writer struct {
> + dirFile *os.File
> + files []*os.File
> +- wbuf fileutil.BufWriter
> ++ wbuf fileutil.MmapBufWriter
> + n int64
> + crc32 hash.Hash
> + buf [binary.MaxVarintLen32]byte
> +@@ -361,19 +361,18 @@ func (w *Writer) finalizeTail() error {
> + return nil
> + }
> +
> ++ off := int64(SegmentHeaderSize)
> ++
> + if w.wbuf != nil {
> +- if err := w.wbuf.Flush(); err != nil {
> ++ // As the file was pre-allocated, we truncate any superfluous zero
> bytes.
> ++ off = w.wbuf.Offset()
> ++ if err := w.wbuf.Close(); err != nil {
> + return err
> + }
> + }
> + if err := tf.Sync(); err != nil {
> + return err
> + }
> +- // As the file was pre-allocated, we truncate any superfluous zero
> bytes.
> +- off, err := tf.Seek(0, io.SeekCurrent)
> +- if err != nil {
> +- return err
> +- }
> + if err := tf.Truncate(off); err != nil {
> + return err
> + }
> +@@ -387,7 +386,7 @@ func (w *Writer) cut() error {
> + return err
> + }
> +
> +- n, f, _, err := cutSegmentFile(w.dirFile, MagicChunks,
> chunksFormatV1, w.segmentSize)
> ++ n, f, mw, _, err := cutSegmentFile(w.dirFile, MagicChunks,
> chunksFormatV1, w.segmentSize)
> + if err != nil {
> + return err
> + }
> +@@ -395,21 +394,11 @@ func (w *Writer) cut() error {
> +
> + w.files = append(w.files, f)
> + if w.wbuf != nil {
> +- if err := w.wbuf.Reset(f); err != nil {
> ++ if err := w.wbuf.Reset(mw); err != nil {
> + return err
> + }
> + } else {
> +- var (
> +- wbuf fileutil.BufWriter
> +- err error
> +- )
> +- size := 8 * 1024 * 1024
> +- if w.useUncachedIO {
> +- // Uncached IO is implemented using direct I/O for now.
> +- wbuf, err = fileutil.NewDirectIOWriter(f, size)
> +- } else {
> +- wbuf, err = fileutil.NewBufioWriterWithSeek(f, size)
> +- }
> ++ wbuf, err := fileutil.NewBufioMmapWriter(mw)
> + if err != nil {
> + return err
> + }
> +@@ -419,20 +408,22 @@ func (w *Writer) cut() error {
> + return nil
> + }
> +
> +-func cutSegmentFile(dirFile *os.File, magicNumber uint32,
> chunksFormat byte, allocSize int64) (headerSize int, newFile *os.File,
> seq int, returnErr error) {
> ++func cutSegmentFile(dirFile *os.File, magicNumber uint32,
> chunksFormat byte, allocSize int64) (headerSize int, newFile *os.File,
> newMw *fileutil.MmapWriter, seq int, returnErr error) {
> + p, seq, err := nextSequenceFile(dirFile.Name())
> + if err != nil {
> +- return 0, nil, 0, fmt.Errorf("next sequence file: %w", err)
> ++ return 0, nil, nil, 0, fmt.Errorf("next sequence file: %w", err)
> + }
> + ptmp := p + ".tmp"
> +- f, err := os.OpenFile(ptmp, os.O_WRONLY|os.O_CREATE, 0o666)
> ++ f, err := os.OpenFile(ptmp, os.O_RDWR|os.O_CREATE, 0o666)
> + if err != nil {
> +- return 0, nil, 0, fmt.Errorf("open temp file: %w", err)
> ++ return 0, nil, nil, 0, fmt.Errorf("open temp file: %w", err)
> + }
> ++ mw := fileutil.NewMmapWriter(f)
> + defer func() {
> + if returnErr != nil {
> + errs := tsdb_errors.NewMulti(returnErr)
> + if f != nil {
> ++ mw.Close()
> + errs.Add(f.Close())
> + }
> + // Calling RemoveAll on a non-existent file does not return error.
> +@@ -442,11 +433,11 @@ func cutSegmentFile(dirFile *os.File,
> magicNumber uint32, chunksFormat byte, all
> + }()
> + if allocSize > 0 {
> + if err = fileutil.Preallocate(f, allocSize, true); err != nil {
> +- return 0, nil, 0, fmt.Errorf("preallocate: %w", err)
> ++ return 0, nil, nil, 0, fmt.Errorf("preallocate: %w", err)
> + }
> + }
> + if err = dirFile.Sync(); err != nil {
> +- return 0, nil, 0, fmt.Errorf("sync directory: %w", err)
> ++ return 0, nil, nil, 0, fmt.Errorf("sync directory: %w", err)
> + }
> +
> + // Write header metadata for new file.
> +@@ -454,29 +445,35 @@ func cutSegmentFile(dirFile *os.File,
> magicNumber uint32, chunksFormat byte, all
> + binary.BigEndian.PutUint32(metab[:MagicChunksSize], magicNumber)
> + metab[4] = chunksFormat
> +
> +- n, err := f.Write(metab)
> ++ n, err := mw.Write(metab)
> + if err != nil {
> +- return 0, nil, 0, fmt.Errorf("write header: %w", err)
> ++ return 0, nil, nil, 0, fmt.Errorf("write header: %w", err)
> ++ }
> ++ if err := mw.Close(); err != nil {
> ++ return 0, nil, nil, 0, fmt.Errorf("close temp mmap: %w", err)
> + }
> ++ mw = nil
> + if err := f.Close(); err != nil {
> +- return 0, nil, 0, fmt.Errorf("close temp file: %w", err)
> ++ return 0, nil, nil, 0, fmt.Errorf("close temp file: %w", err)
> + }
> + f = nil
> +
> + if err := fileutil.Rename(ptmp, p); err != nil {
> +- return 0, nil, 0, fmt.Errorf("replace file: %w", err)
> ++ return 0, nil, nil, 0, fmt.Errorf("replace file: %w", err)
> + }
> +
> +- f, err = os.OpenFile(p, os.O_WRONLY, 0o666)
> ++ f, err = os.OpenFile(p, os.O_RDWR, 0o666)
> + if err != nil {
> +- return 0, nil, 0, fmt.Errorf("open final file: %w", err)
> ++ return 0, nil, nil, 0, fmt.Errorf("open final file: %w", err)
> + }
> ++ mw, err = fileutil.NewMmapWriterWithSize(f, int(allocSize))
> ++
> + // Skip header for further writes.
> + offset := int64(n)
> +- if _, err := f.Seek(offset, 0); err != nil {
> +- return 0, nil, 0, fmt.Errorf("seek to %d in final file: %w",
> offset, err)
> ++ if _, err := mw.Seek(offset, 0); err != nil {
> ++ return 0, nil, nil, 0, fmt.Errorf("seek to %d in final file: %w",
> offset, err)
> + }
> +- return n, f, seq, nil
> ++ return n, f, mw, seq, nil
> + }
> +
> + func (w *Writer) write(b []byte) error {
> +diff --git tsdb/chunks/head_chunks.go tsdb/chunks/head_chunks.go
> +index 876b42cb2..14fc84af3 100644
> +--- tsdb/chunks/head_chunks.go
> ++++ tsdb/chunks/head_chunks.go
> +@@ -61,6 +61,7 @@ const (
> + // MaxHeadChunkMetaSize is the max size of an mmapped chunks minus
> the chunks data.
> + // Max because the uvarint size can be smaller.
> + MaxHeadChunkMetaSize = SeriesRefSize + 2*MintMaxtSize +
> ChunkEncodingSize + MaxChunkLengthFieldSize + CRCSize
> ++ MinHeadChunkMetaSize = SeriesRefSize + 2*MintMaxtSize +
> ChunkEncodingSize + 1 + CRCSize
> + // MinWriteBufferSize is the minimum write buffer size allowed.
> + MinWriteBufferSize = 64 * 1024 // 64KB.
> + // MaxWriteBufferSize is the maximum write buffer size allowed.
> +@@ -191,14 +192,16 @@ func (f *chunkPos) bytesToWriteForChunk(chkLen
> uint64) uint64 {
> + // ChunkDiskMapper is for writing the Head block chunks to disk
> + // and access chunks via mmapped files.
> + type ChunkDiskMapper struct {
> ++ // needs to be correctly aligned
> ++ curFileOffset atomic.Uint64 // Bytes written in current open file.
> + // Writer.
> + dir *os.File
> + writeBufferSize int
> +
> +- curFile *os.File // File being written to.
> +- curFileSequence int // Index of current open file being
> appended to. 0 if no file is active.
> +- curFileOffset atomic.Uint64 // Bytes written in current open file.
> +- curFileMaxt int64 // Used for the size retention.
> ++ curFile *os.File // File being written to.
> ++ curMw *fileutil.MmapWriter
> ++ curFileSequence int // Index of current open file being appended
> to. 0 if no file is active.
> ++ curFileMaxt int64 // Used for the size retention.
> +
> + // The values in evtlPos represent the file position which will
> eventually be
> + // reached once the content of the write queue has been fully
> processed.
> +@@ -604,7 +607,7 @@ func (cdm *ChunkDiskMapper) cut() (seq, offset
> int, returnErr error) {
> + return 0, 0, err
> + }
> +
> +- offset, newFile, seq, err := cutSegmentFile(cdm.dir,
> MagicHeadChunks, headChunksFormatV1, HeadChunkFilePreallocationSize)
> ++ offset, newFile, newMw, seq, err := cutSegmentFile(cdm.dir,
> MagicHeadChunks, headChunksFormatV1, HeadChunkFilePreallocationSize)
> + if err != nil {
> + return 0, 0, err
> + }
> +@@ -613,6 +616,7 @@ func (cdm *ChunkDiskMapper) cut() (seq, offset
> int, returnErr error) {
> + // The file should not be closed if there is no error,
> + // its kept open in the ChunkDiskMapper.
> + if returnErr != nil {
> ++ returnErr = tsdb_errors.NewMulti(returnErr, newMw.Close()).Err()
> + returnErr = tsdb_errors.NewMulti(returnErr, newFile.Close()).Err()
> + }
> + }()
> +@@ -633,10 +637,11 @@ func (cdm *ChunkDiskMapper) cut() (seq, offset
> int, returnErr error) {
> + cdm.readPathMtx.Lock()
> + cdm.curFileSequence = seq
> + cdm.curFile = newFile
> ++ cdm.curMw = newMw
> + if cdm.chkWriter != nil {
> +- cdm.chkWriter.Reset(newFile)
> ++ cdm.chkWriter.Reset(cdm.curMw)
> + } else {
> +- cdm.chkWriter = bufio.NewWriterSize(newFile, cdm.writeBufferSize)
> ++ cdm.chkWriter = bufio.NewWriterSize(cdm.curMw, cdm.writeBufferSize)
> + }
> +
> + cdm.closers[cdm.curFileSequence] = mmapFile
> +@@ -659,10 +664,9 @@ func (cdm *ChunkDiskMapper) finalizeCurFile()
> error {
> + return err
> + }
>
> - f, err := os.Open(filename)
> +- if err := cdm.curFile.Sync(); err != nil {
> ++ if err := cdm.curMw.Close(); err != nil {
> + return err
> + }
> +-
> + return cdm.curFile.Close()
> + }
> +
> +@@ -774,7 +778,7 @@ func (cdm *ChunkDiskMapper) Chunk(ref
> ChunkDiskMapperRef) (chunkenc.Chunk, error
> + return nil, &CorruptionErr{
> + Dir: cdm.dir.Name(),
> + FileIndex: sgmIndex,
> +- Err: fmt.Errorf("head chunk file doesn't include enough
> bytes to read the chunk - required:%v, available:%v", chkDataEnd,
> mmapFile.byteSlice.Len()),
> ++ Err: fmt.Errorf("head chunk file doesn't Include enough
> bytes to read the chunk - required:%v, available:%v", chkDataEnd,
> mmapFile.byteSlice.Len()),
> + }
> + }
> +
> +@@ -834,7 +838,7 @@ func (cdm *ChunkDiskMapper) IterateAllChunks(f
> func(seriesRef HeadSeriesRef, chu
> + }
> + idx := HeadChunkFileHeaderSize
> + for idx < fileEnd {
> +- if fileEnd-idx < MaxHeadChunkMetaSize {
> ++ if fileEnd-idx < MinHeadChunkMetaSize {
> + // Check for all 0s which marks the end of the file.
> + allZeros := true
> + for _, b := range mmapFile.byteSlice.Range(idx, fileEnd) {
> +@@ -851,7 +855,7 @@ func (cdm *ChunkDiskMapper) IterateAllChunks(f
> func(seriesRef HeadSeriesRef, chu
> + Dir: cdm.dir.Name(),
> + FileIndex: segID,
> + Err: fmt.Errorf("head chunk file has some unread data, but
> doesn't include enough bytes to read the chunk header"+
> +- " - required:%v, available:%v, file:%d",
> idx+MaxHeadChunkMetaSize, fileEnd, segID),
> ++ " - required:%v, available:%v, file:%d cur %d",
> idx+MinHeadChunkMetaSize, fileEnd, segID, cdm.curFileSequence),
> + }
> + }
> + chunkRef := newChunkDiskMapperRef(uint64(segID), uint64(idx))
> +@@ -886,7 +890,7 @@ func (cdm *ChunkDiskMapper) IterateAllChunks(f
> func(seriesRef HeadSeriesRef, chu
> + return &CorruptionErr{
> + Dir: cdm.dir.Name(),
> + FileIndex: segID,
> +- Err: fmt.Errorf("head chunk file doesn't include enough
> bytes to read the chunk header - required:%v, available:%v, file:%d",
> idx+CRCSize, fileEnd, segID),
> ++ Err: fmt.Errorf("head chunk file doesn't include enough
> bytes to read the crc32 sum - required:%v, available:%v, hcf: %v, srs:
> %v, mms: %v, ces: %v, n: %v dataLen: %v, numSamples: %v, file:%d
> cur:%d", idx+CRCSize, fileEnd, HeadChunkFileHeaderSize, SeriesRefSize,
> MintMaxtSize, ChunkEncodingSize, n, dataLen, numSamples, segID,
> cdm.curFileSequence),
> + }
> + }
> +
> +diff --git tsdb/chunks/head_chunks_openbsd.go
> tsdb/chunks/head_chunks_openbsd.go
> +new file mode 100644
> +index 000000000..05e308427
> +--- /dev/null
> ++++ tsdb/chunks/head_chunks_openbsd.go
> +@@ -0,0 +1,18 @@
> ++// Copyright 2020 The Prometheus Authors
> ++// Licensed under the Apache License, Version 2.0 (the "License");
> ++// you may not use this file except in compliance with the License.
> ++// You may obtain a copy of the License at
> ++//
> ++// http://www.apache.org/licenses/LICENSE-2.0
> ++//
> ++// Unless required by applicable law or agreed to in writing,
> software
> ++// distributed under the License is distributed on an "AS IS" BASIS,
> ++// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> ++// See the License for the specific language governing permissions
> and
> ++// limitations under the License.
> ++
> ++package chunks
> ++
> ++// HeadChunkFilePreallocationSize is the size to which the m-map file
> should be preallocated when a new file is cut.
> ++// For OpenBSD use the MaxHeadChunkFileSize for performance reasons
> ++var HeadChunkFilePreallocationSize int64 = MaxHeadChunkFileSize
> +diff --git tsdb/chunks/head_chunks_other.go
> tsdb/chunks/head_chunks_other.go
> +index f30c5e55e..6e82d73f4 100644
> +--- tsdb/chunks/head_chunks_other.go
> ++++ tsdb/chunks/head_chunks_other.go
> +@@ -11,7 +11,7 @@
> + // See the License for the specific language governing permissions
> and
> + // limitations under the License.
> +
> +-//go:build !windows
> ++//go:build !windows && !openbsd
> +
> + package chunks
> +
> +diff --git tsdb/chunks/head_chunks_test.go
> tsdb/chunks/head_chunks_test.go
> +index 68742471e..a3dda8b0e 100644
> +--- tsdb/chunks/head_chunks_test.go
> ++++ tsdb/chunks/head_chunks_test.go
> +@@ -26,6 +26,7 @@ import (
> + "github.com/stretchr/testify/require"
> +
> + "github.com/prometheus/prometheus/tsdb/chunkenc"
> ++ "github.com/prometheus/prometheus/tsdb/fileutil"
> + )
> +
> + var writeQueueSize int
> +@@ -131,7 +132,7 @@ func
> TestChunkDiskMapper_WriteChunk_Chunk_IterateChunks(t *testing.T) {
> + require.Len(t, hrw.mmappedChunkFiles, 3, "expected 3 mmapped files,
> got %d", len(hrw.mmappedChunkFiles))
> + require.Len(t, hrw.closers, len(hrw.mmappedChunkFiles))
> +
> +- actualBytes, err := os.ReadFile(firstFileName)
> ++ actualBytes, err := mmapReadFile(firstFileName)
> require.NoError(t, err)
> +
> + // Check header of the segment file.
> +@@ -581,3 +582,15 @@ func createChunk(t *testing.T, idx int, hrw
> *ChunkDiskMapper) (seriesRef HeadSer
> + <-awaitCb
> + return
> + }
> ++
> ++func mmapReadFile(path string) ([]byte, error) {
> ++ var b []byte
> ++ m, err := fileutil.OpenMmapFile(path)
> ++ if err != nil {
> ++ return nil, err
> ++ }
> ++ bb := m.Bytes()
> ++ b = append(b, bb...)
> ++ m.Close()
> ++ return b, nil
> ++}
> diff --git tsdb/fileutil/mmap.go tsdb/fileutil/mmap.go
> -index 4dbca4f97..e1c522472 100644
> +index 782ff27ec..15590e2e3 100644
> --- tsdb/fileutil/mmap.go
> +++ tsdb/fileutil/mmap.go
> -@@ -20,8 +20,31 @@ import (
> +@@ -19,8 +19,31 @@ import (
> )
>
> type MmapFile struct {
> @@ -236,40 +597,36 @@ index 4dbca4f97..e1c522472 100644
> + if size <= 0 {
> + info, err := f.Stat()
> + if err != nil {
> -+ return nil, errors.Wrap(err, "stat")
> ++ return nil, fmt.Errorf("stat: %w", err)
> + }
> + size = int(info.Size())
> + }
> +
> + b, err := mmapRw(f, size)
> + if err != nil {
> -+ return nil, errors.Wrapf(err, "mmap, size %d", size)
> ++ return nil, fmt.Errorf("mmap, size %d: %w", size, err)
> + }
> + return &MmapFile{f: f, b: b, rw: true}, nil
> }
>
> func OpenMmapFile(path string) (*MmapFile, error) {
> -@@ -46,22 +69,53 @@ func OpenMmapFileWithSize(path string, size int)
> (mf *MmapFile, retErr error) {
> +@@ -45,22 +68,49 @@ func OpenMmapFileWithSize(path string, size int)
> (mf *MmapFile, retErr error) {
> size = int(info.Size())
> }
>
> - b, err := mmap(f, size)
> + b, err := mmapRo(f, size)
> if err != nil {
> - return nil, errors.Wrapf(err, "mmap, size %d", size)
> + return nil, fmt.Errorf("mmap, size %d: %w", size, err)
> }
> + return &MmapFile{f: f, b: b, closeFile: true}, nil
> +}
>
> - return &MmapFile{f: f, b: b}, nil
> +func (f *MmapFile) resize(size int) error {
> -+ err := f.Sync()
> ++ err := munmap(f.b)
> + if err != nil {
> -+ return errors.Wrap(err, "resize sync")
> -+ }
> -+ err = munmap(f.b)
> -+ if err != nil {
> -+ return errors.Wrap(err, "resize munmap")
> ++ return fmt.Errorf("resize munmap: %w", err)
> + }
> + var b []byte
> + if f.rw {
> @@ -278,7 +635,7 @@ index 4dbca4f97..e1c522472 100644
> + b, err = mmapRo(f.f, size)
> + }
> + if err != nil {
> -+ return errors.Wrap(err, "resize mmap")
> ++ return fmt.Errorf("resize mmap: %w", err)
> + }
> + f.b = b
> + return nil
> @@ -296,13 +653,13 @@ index 4dbca4f97..e1c522472 100644
>
> if err0 != nil {
> - return err0
> -+ return errors.Wrap(err0, "close sync")
> ++ return fmt.Errorf("close sync: %w", err0)
> + }
> + if err1 != nil {
> -+ return errors.Wrap(err1, "close munmap")
> ++ return fmt.Errorf("close munmap: %w", err1)
> + }
> + if err2 != nil {
> -+ return errors.Wrap(err2, "close file")
> ++ return fmt.Errorf("close file: %w", err2)
> }
> - return err1
> + return nil
> @@ -368,10 +725,10 @@ index 000000000..31fd98e6d
> + return nil
> +}
> diff --git tsdb/fileutil/mmap_unix.go tsdb/fileutil/mmap_unix.go
> -index 1fd7f48ff..c83a32011 100644
> +index 3d15e1a8c..9a7c62816 100644
> --- tsdb/fileutil/mmap_unix.go
> +++ tsdb/fileutil/mmap_unix.go
> -@@ -22,10 +22,14 @@ import (
> +@@ -21,10 +21,14 @@ import (
> "golang.org/x/sys/unix"
> )
>
> @@ -421,10 +778,10 @@ index b94226412..9caf36622 100644
> if h == 0 {
> diff --git tsdb/fileutil/writer.go tsdb/fileutil/writer.go
> new file mode 100644
> -index 000000000..86c1504e4
> +index 000000000..f50a2fa84
> --- /dev/null
> +++ tsdb/fileutil/writer.go
> -@@ -0,0 +1,156 @@
> +@@ -0,0 +1,203 @@
> +// Copyright 2021 The Prometheus Authors
> +// Licensed under the Apache License, Version 2.0 (the "License");
> +// you may not use this file except in compliance with the License.
> @@ -456,6 +813,50 @@ index 000000000..86c1504e4
> + rpos int
> +}
> +
> ++type MmapBufWriter interface {
> ++ Write([]byte) (int, error)
> ++ Close() error
> ++ Offset() int64
> ++ Reset(mw *MmapWriter) error
> ++}
> ++
> ++type mmapBufioWriter struct {
> ++ mw *MmapWriter
> ++}
> ++
> ++func (m *mmapBufioWriter) Write(b []byte) (int, error) {
> ++ return m.mw.Write(b)
> ++}
> ++
> ++func (m *mmapBufioWriter) Close() error {
> ++ return m.mw.Close()
> ++}
> ++
> ++func (m *mmapBufioWriter) Offset() int64 {
> ++ off, _ := m.mw.Seek(0, io.SeekCurrent)
> ++ return off
> ++}
> ++
> ++func (m *mmapBufioWriter) Reset(mw *MmapWriter) error {
> ++ if err := m.mw.Close(); err != nil {
> ++ return err
> ++ }
> ++ m.mw = mw
> ++ return nil
> ++}
> ++
> ++func NewBufioMmapWriter(mw *MmapWriter) (MmapBufWriter, error) {
> ++ if mw.mf == nil {
> ++ mf, err := OpenRwMmapFromFile(mw.f, 0)
> ++ if err != nil {
> ++ return nil, err
> ++ }
> ++ mw.mf = mf
> ++ mw.buf = mf.Bytes()
> ++ }
> ++ return &mmapBufioWriter{mw}, nil
> ++}
> ++
> +func NewMmapWriter(f *os.File) *MmapWriter {
> + return &MmapWriter{f: f}
> +}
> @@ -480,7 +881,9 @@ index 000000000..86c1504e4
> +func (mw *MmapWriter) Close() error {
> + mw.buf = nil
> + if mw.mf != nil {
> -+ return mw.mf.Close()
> ++ err := mw.mf.Close()
> ++ mw.mf = nil
> ++ return err
> + }
> + return nil
> +}
> @@ -513,20 +916,23 @@ index 000000000..86c1504e4
> +}
> +
> +func (mw *MmapWriter) Seek(offset int64, whence int) (ret int64, err
> error) {
> -+ var abs int
> ++ var abs int64
> ++ mw.Lock()
> ++ defer mw.Unlock()
> + switch whence {
> + case io.SeekStart:
> -+ abs = int(offset)
> ++ abs = offset
> ++ case io.SeekCurrent:
> ++ abs = int64(mw.wpos) + offset
> + default:
> + return 0, errors.New("invalid whence")
> + }
> + if abs < 0 {
> + return 0, errors.New("negative position")
> + }
> -+ mw.Lock()
> -+ defer mw.Unlock()
> -+ mw.rpos = abs
> -+ return offset, nil
> ++ mw.wpos = int(abs)
> ++ mw.rpos = int(abs)
> ++ return abs, nil
> +}
> +
> +func (mw *MmapWriter) Read(p []byte) (n int, err error) {
> @@ -544,12 +950,12 @@ index 000000000..86c1504e4
> + mw.Lock()
> + defer mw.Unlock()
> + if mw.mf == nil {
> -+ err = mw.mmap(len(p))
> ++ err = mw.mmap(mw.wpos + len(p))
> + if err != nil {
> + return
> + }
> + }
> -+ if len(p) > len(mw.buf)-mw.wpos {
> ++ if mw.wpos+len(p) > len(mw.buf) {
> + err = mw.resize(mw.wpos + len(p))
> + if err != nil {
> + return
> @@ -558,7 +964,6 @@ index 000000000..86c1504e4
> +
> + n = copy(mw.buf[mw.wpos:], p)
> + mw.wpos += n
> -+ err = mw.Sync()
> + return
> +}
> +
> @@ -578,14 +983,13 @@ index 000000000..86c1504e4
> + }
> + }
> + n = copy(mw.buf[pos:], p)
> -+ err = mw.Sync()
> + return
> +}
> diff --git tsdb/index/index.go tsdb/index/index.go
> -index 29295c45f..451c80582 100644
> +index edcb92a71..36ba9d291 100644
> --- tsdb/index/index.go
> +++ tsdb/index/index.go
> -@@ -257,6 +257,7 @@ func (w *Writer) addPadding(size int) error {
> +@@ -272,6 +272,7 @@ func (w *Writer) addPadding(size int) error {
> type FileWriter struct {
> f *os.File
> fbuf *bufio.Writer
> @@ -593,7 +997,7 @@ index 29295c45f..451c80582 100644
> pos uint64
> name string
> }
> -@@ -266,14 +267,20 @@ func NewFileWriter(name string) (*FileWriter,
> error) {
> +@@ -281,14 +282,20 @@ func NewFileWriter(name string) (*FileWriter,
> error) {
> if err != nil {
> return nil, err
> }
> @@ -615,7 +1019,7 @@ index 29295c45f..451c80582 100644
> func (fw *FileWriter) Pos() uint64 {
> return fw.pos
> }
> -@@ -304,7 +311,7 @@ func (fw *FileWriter) WriteAt(buf []byte, pos
> uint64) error {
> +@@ -319,7 +326,7 @@ func (fw *FileWriter) WriteAt(buf []byte, pos
> uint64) error {
> if err := fw.Flush(); err != nil {
> return err
> }
> @@ -624,7 +1028,7 @@ index 29295c45f..451c80582 100644
> return err
> }
>
> -@@ -326,7 +333,7 @@ func (fw *FileWriter) Close() error {
> +@@ -341,7 +348,7 @@ func (fw *FileWriter) Close() error {
> if err := fw.Flush(); err != nil {
> return err
> }
> @@ -633,7 +1037,7 @@ index 29295c45f..451c80582 100644
> return err
> }
> return fw.f.Close()
> -@@ -987,11 +994,11 @@ func (w *Writer) writePostings() error {
> +@@ -1026,11 +1033,11 @@ func (w *Writer) writePostings() error {
> if err := w.fP.Flush(); err != nil {
> return err
> }
> Index: pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/sysutils/prometheus/pkg/PLIST,v
> diff -u -p -r1.7 PLIST
> --- pkg/PLIST 8 Nov 2022 11:17:11 -0000 1.7
> +++ pkg/PLIST 18 Mar 2026 15:48:34 -0000
> @@ -8,17 +8,6 @@ share/doc/prometheus/
> share/doc/prometheus/LICENSE
> share/doc/prometheus/NOTICE
> share/examples/prometheus/
> -share/examples/prometheus/console_libraries/
> -share/examples/prometheus/console_libraries/menu.lib
> -share/examples/prometheus/console_libraries/prom.lib
> -share/examples/prometheus/consoles/
> -share/examples/prometheus/consoles/index.html.example
> -share/examples/prometheus/consoles/node-cpu.html
> -share/examples/prometheus/consoles/node-disk.html
> -share/examples/prometheus/consoles/node-overview.html
> -share/examples/prometheus/consoles/node.html
> -share/examples/prometheus/consoles/prometheus-overview.html
> -share/examples/prometheus/consoles/prometheus.html
> share/examples/prometheus/prometheus.yml
> @sample ${SYSCONFDIR}/prometheus/prometheus.yml
> @mode 0755
> I spent the last few days improving the mmap_openbsd diff to also cover
> the chunks. This should fix a frequent panic like this one:
> panic: corruption in head chunk file
> /var/prometheus/chunks_head/001099: checksum mismatch expected:0,
> actual:d096d996
>
> I had to fiddle a lot in tsdb/chunks to make this work and the
> MmapWriter
> code had to be seriously adjusted so that performance did not tank.
> One of the main issues is mmap.resize which does munmap / mmap dances
> that
> very much show how horribly inefficent munmap is on OpenBSD. To prevent
> excess resize calls I preallocate the mmaps to the maximum size.
> Also the number of msync(2) calls has been reduced as much as possible
> since those trigger similarly inefficent code paths as munmap.
> In most cases there is no need to msync(2) since all mmaps use the same
> backing uvm_object and so the read-only mappings will see the changes
> without msync(2).
>
> This seems to be stable on my "production" system and the performance
> seems to be ok for my case.
> --
> :wq Claudio
I've been running with this patch (the first one from this thread) since
the last week and it is rock solid :)
Thanks for your work!
Best wishes,
Atanas
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/sysutils/prometheus/Makefile,v
> diff -u -p -r1.23 Makefile
> --- Makefile 25 Sep 2023 17:07:36 -0000 1.23
> +++ Makefile 23 Mar 2026 21:46:40 -0000
> @@ -1,6 +1,6 @@
> COMMENT = systems monitoring and alerting toolkit
>
> -V = 2.37.9
> +V = 3.5.1
> GH_ACCOUNT = prometheus
> GH_PROJECT = prometheus
> GH_TAGNAME = v${V}
> @@ -29,27 +29,20 @@ USE_GMAKE = Yes
> MODULES = lang/go
> MODGO_GOPATH = ${MODGO_WORKSPACE}
>
> -post-extract:
> - mv ${WRKDIR}/static/react ${WRKDIST}/web/ui/static/
> -
> # promu doesn't like the default PREFIX
> do-build:
> cd ${WRKSRC} && \
> ${MAKE_ENV} GOMAXPROCS=${MAKE_JOBS} PREFIX=. ${MAKE_PROGRAM} \
> + PREBUILT_ASSETS_STATIC_DIR=${WRKDIR}/static \
> PROMU="${LOCALBASE}/bin/promu -v" build
>
> do-install:
> ${INSTALL_DATA_DIR} ${WRKINST}/${SYSCONFDIR}/prometheus
> ${INSTALL_DATA_DIR} ${WRKINST}/${LOCALSTATEDIR}/prometheus
> ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/prometheus
> - ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/prometheus/consoles
> - ${INSTALL_DATA_DIR}
> ${PREFIX}/share/examples/prometheus/console_libraries
> + ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/prometheus
> ${INSTALL_PROGRAM} ${WRKSRC}/prometheus ${PREFIX}/bin
> ${INSTALL_PROGRAM} ${WRKSRC}/promtool ${PREFIX}/bin
> - ${INSTALL_DATA} ${WRKSRC}/consoles/* \
> - ${PREFIX}/share/examples/prometheus/consoles/
> - ${INSTALL_DATA} ${WRKSRC}/console_libraries/{menu.lib,prom.lib} \
> - ${PREFIX}/share/examples/prometheus/console_libraries
> ${INSTALL_DATA} ${WRKSRC}/documentation/examples/prometheus.yml \
> ${PREFIX}/share/examples/prometheus/prometheus.yml
> ${INSTALL_DATA} ${WRKSRC}/LICENSE ${PREFIX}/share/doc/prometheus/
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/sysutils/prometheus/distinfo,v
> diff -u -p -r1.12 distinfo
> --- distinfo 6 Sep 2023 10:28:49 -0000 1.12
> +++ distinfo 18 Mar 2026 16:33:34 -0000
> @@ -1,6 +1,6 @@
> -SHA256 (prometheus-2.37.9.tar.gz) =
> gSoQplOidWqzAzS9TPBmH5TepeWUw3LTPRNwQHRgpGo=
> -SHA256 (prometheus-vendor-2.37.9.tar.gz) =
> ea+tEdN2yBEMBYY78U6tPOLI7uorbEhNL3o5/JTxaPI=
> -SHA256 (prometheus-web-ui-2.37.9.tar.gz) =
> 2z6Ohg/dUEwQ5NxTn1wfxwVrKOPJGAWgSXNxb2lX4MA=
> -SIZE (prometheus-2.37.9.tar.gz) = 6048911
> -SIZE (prometheus-vendor-2.37.9.tar.gz) = 11758451
> -SIZE (prometheus-web-ui-2.37.9.tar.gz) = 2390133
> +SHA256 (prometheus-3.5.1.tar.gz) =
> rdZ3162GT87UPBS6CNooIT7+ibHje6WSnu9D1bgvaS8=
> +SHA256 (prometheus-vendor-3.5.1.tar.gz) =
> SfhHWwxq4/bzMvTfN9dn9IgxqNpXpzkL+0YczqKvp0E=
> +SHA256 (prometheus-web-ui-3.5.1.tar.gz) =
> 1Cvm4TYLCadGMAKBj6uviDRzawIm6S7guO0SUQwIsgY=
> +SIZE (prometheus-3.5.1.tar.gz) = 5129927
> +SIZE (prometheus-vendor-3.5.1.tar.gz) = 16523299
> +SIZE (prometheus-web-ui-3.5.1.tar.gz) = 3487629
> Index: patches/patch-Makefile
> ===================================================================
> RCS file: patches/patch-Makefile
> diff -N patches/patch-Makefile
> --- patches/patch-Makefile 28 Feb 2023 17:54:21 -0000 1.7
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,23 +0,0 @@
> -The react build is provided via extra distfile
> -
> -Index: Makefile
> ---- Makefile.orig
> -+++ Makefile
> -@@ -83,7 +83,7 @@ ui-lint:
> - cd $(UI_PATH) && npm run lint
> -
> - .PHONY: assets
> --assets: ui-install ui-build
> -+assets:
> -
> - .PHONY: assets-compress
> - assets-compress: assets
> -@@ -124,7 +124,7 @@ plugins/plugins.go: plugins.yml
> plugins/generate.go
> - plugins: plugins/plugins.go
> -
> - .PHONY: build
> --build: assets npm_licenses assets-compress common-build plugins
> -+build: assets-compress common-build plugins
> -
> - .PHONY: bench_tsdb
> - bench_tsdb: $(PROMU)
> Index: patches/patch-Makefile_common
> ===================================================================
> RCS file:
> /cvs/ports/sysutils/prometheus/patches/patch-Makefile_common,v
> diff -u -p -r1.7 patch-Makefile_common
> --- patches/patch-Makefile_common 28 Feb 2023 17:54:21 -0000 1.7
> +++ patches/patch-Makefile_common 18 Mar 2026 15:27:52 -0000
> @@ -3,7 +3,7 @@ Don't fetch promu form internet. This is
> Index: Makefile.common
> --- Makefile.common.orig
> +++ Makefile.common
> -@@ -232,11 +232,7 @@ common-docker-manifest:
> +@@ -247,11 +247,7 @@ common-docker-manifest:
> promu: $(PROMU)
>
> $(PROMU):
> @@ -14,5 +14,5 @@ Index: Makefile.common
> - rm -r $(PROMU_TMP)
> + @true
>
> - .PHONY: proto
> - proto:
> + .PHONY: common-proto
> + common-proto:
> Index: patches/patch-_promu_yml
> ===================================================================
> RCS file: /cvs/ports/sysutils/prometheus/patches/patch-_promu_yml,v
> diff -u -p -r1.6 patch-_promu_yml
> --- patches/patch-_promu_yml 6 Sep 2023 10:28:49 -0000 1.6
> +++ patches/patch-_promu_yml 18 Mar 2026 15:52:51 -0000
> @@ -3,12 +3,11 @@ Don't include user and hostname into bui
> Index: .promu.yml
> --- .promu.yml.orig
> +++ .promu.yml
> -@@ -16,13 +16,13 @@ build:
> +@@ -16,12 +16,13 @@ build:
> - builtinassets
> windows:
> - builtinassets
> -- flags: -a
> -+ flags: -v -a
> ++ flags: -v
> ldflags: |
> - -X github.com/prometheus/common/version.Version={{.Version}}
> - -X
> github.com/prometheus/common/version.Revision={{.Revision}}
> Index: patches/patch-mmap_openbsd
> ===================================================================
> RCS file: /cvs/ports/sysutils/prometheus/patches/patch-mmap_openbsd,v
> diff -u -p -r1.3 patch-mmap_openbsd
> --- patches/patch-mmap_openbsd 15 Jun 2023 08:52:07 -0000 1.3
> +++ patches/patch-mmap_openbsd 25 Mar 2026 09:38:59 -0000
> @@ -1,89 +1,106 @@
> -Diff from https://github.com/prometheus/prometheus/issues/8799
> +Diff from https://github.com/cjeker/prometheus/tree/mmap_openbsd_v351
> +Based on work from
> https://github.com/prometheus/prometheus/issues/8799
> and https://github.com/prometheus/prometheus/pull/9085
> to make tsdb only use mmap and work around missing UBC support.
>
> diff --git go.mod go.mod
> -index 39c3fcb5b..760b39a8b 100644
> +index 7a27951ac..eee4405dd 100644
> --- go.mod
> +++ go.mod
> -@@ -13,7 +13,6 @@ require (
> - github.com/dgryski/go-sip13 v0.0.0-20200911182023-62edffca9245
> - github.com/digitalocean/godo v1.81.0
> - github.com/docker/docker v20.10.24+incompatible
> -- github.com/edsrzf/mmap-go v1.1.0
> - github.com/envoyproxy/go-control-plane v0.10.3
> - github.com/envoyproxy/protoc-gen-validate v0.6.7
> - github.com/fsnotify/fsnotify v1.5.4
> +@@ -17,7 +17,6 @@ require (
> + github.com/dennwc/varint v1.0.0
> + github.com/digitalocean/godo v1.152.0
> + github.com/docker/docker v28.5.2+incompatible
> +- github.com/edsrzf/mmap-go v1.2.0
> + github.com/envoyproxy/go-control-plane/envoy v1.32.4
> + github.com/envoyproxy/protoc-gen-validate v1.2.1
> + github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb
> diff --git go.sum go.sum
> -index e7aee4a9b..6b323945d 100644
> +index 8ed834bcf..00ff455ac 100644
> --- go.sum
> +++ go.sum
> -@@ -202,8 +202,6 @@ github.com/eapache/go-resiliency v1.1.0/go.mod
> h1:kFI+JgMyC7bLPUVY133qvEBtVayf5m
> - github.com/eapache/go-xerial-snappy
> v0.0.0-20180814174437-776d5712da21/go.mod
> h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
> - github.com/eapache/queue v1.1.0/go.mod
> h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
> - github.com/edsrzf/mmap-go v1.0.0/go.mod
> h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
> --github.com/edsrzf/mmap-go v1.1.0
> h1:6EUwBLQ/Mcr1EYLE4Tn1VdW1A4ckqCQWZBw8Hr0kjpQ=
> --github.com/edsrzf/mmap-go v1.1.0/go.mod
> h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q=
> - github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod
> h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
> - github.com/emicklei/go-restful
> v0.0.0-20170410110728-ff4f55a20633/go.mod
> h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
> - github.com/emicklei/go-restful v2.9.5+incompatible/go.mod
> h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
> +@@ -122,8 +122,6 @@ github.com/docker/go-connections v0.4.0
> h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKoh
> + github.com/docker/go-connections v0.4.0/go.mod
> h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
> + github.com/docker/go-units v0.5.0
> h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
> + github.com/docker/go-units v0.5.0/go.mod
> h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
> +-github.com/edsrzf/mmap-go v1.2.0
> h1:hXLYlkbaPzt1SaQk+anYwKSRNhufIDCchSPkUD6dD84=
> +-github.com/edsrzf/mmap-go v1.2.0/go.mod
> h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q=
> + github.com/emicklei/go-restful/v3 v3.11.0
> h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g=
> + github.com/emicklei/go-restful/v3 v3.11.0/go.mod
> h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
> + github.com/envoyproxy/go-control-plane/envoy v1.32.4
> h1:jb83lalDRZSpPWW2Z7Mck/8kXZ5CQAFYVjQcdVIr83A=
> diff --git promql/query_logger.go promql/query_logger.go
> -index 716e7749b..8eb1afce0 100644
> +index c0a70b66d..8aac517e2 100644
> --- promql/query_logger.go
> +++ promql/query_logger.go
> -@@ -22,13 +22,13 @@ import (
> +@@ -26,11 +26,11 @@ import (
> "time"
> "unicode/utf8"
>
> - "github.com/edsrzf/mmap-go"
> - "github.com/go-kit/log"
> - "github.com/go-kit/log/level"
> + "github.com/prometheus/prometheus/tsdb/fileutil"
> )
>
> type ActiveQueryTracker struct {
> -- mmapedFile []byte
> +- mmappedFile []byte
> + mw *fileutil.MmapWriter
> getNextIndex chan int
> - logger log.Logger
> - maxConcurrent int
> -@@ -81,7 +81,7 @@ func logUnfinishedQueries(filename string, filesize
> int, logger log.Logger) {
> + logger *slog.Logger
> + closer io.Closer
> +@@ -87,12 +87,12 @@ func logUnfinishedQueries(filename string,
> filesize int, logger *slog.Logger) {
> + }
> +
> + type mmappedFile struct {
> +- f io.Closer
> +- m mmap.MMap
> ++ f io.Closer
> ++ mw *fileutil.MmapWriter
> + }
> +
> + func (f *mmappedFile) Close() error {
> +- err := f.m.Unmap()
> ++ err := f.mw.Close()
> + if err != nil {
> + err = fmt.Errorf("mmappedFile: unmapping: %w", err)
> }
> +@@ -103,7 +103,7 @@ func (f *mmappedFile) Close() error {
> + return err
> }
>
> --func getMMapedFile(filename string, filesize int, logger log.Logger)
> ([]byte, error) {
> -+func getMMapedFile(filename string, filesize int, logger log.Logger)
> (*fileutil.MmapWriter, error) {
> +-func getMMappedFile(filename string, filesize int, logger
> *slog.Logger) ([]byte, io.Closer, error) {
> ++func getMMappedFile(filename string, filesize int, logger
> *slog.Logger) (*fileutil.MmapWriter, io.Closer, error) {
> file, err := os.OpenFile(filename, os.O_CREATE|os.O_RDWR|os.O_TRUNC,
> 0o666)
> if err != nil {
> absPath, pathErr := filepath.Abs(filename)
> -@@ -92,19 +92,13 @@ func getMMapedFile(filename string, filesize int,
> logger log.Logger) ([]byte, er
> - return nil, err
> +@@ -114,21 +114,14 @@ func getMMappedFile(filename string, filesize
> int, logger *slog.Logger) ([]byte,
> + return nil, nil, err
> }
>
> - err = file.Truncate(int64(filesize))
> - if err != nil {
> -- level.Error(logger).Log("msg", "Error setting filesize.",
> "filesize", filesize, "err", err)
> -- return nil, err
> +- file.Close()
> +- logger.Error("Error setting filesize.", "filesize", filesize,
> "err", err)
> +- return nil, nil, err
> - }
> -
> - fileAsBytes, err := mmap.Map(file, mmap.RDWR, 0)
> + mw, err := fileutil.NewMmapWriterWithSize(file, filesize)
> if err != nil {
> - level.Error(logger).Log("msg", "Failed to mmap", "file", filename,
> "Attempted size", filesize, "err", err)
> - return nil, err
> + file.Close()
> + logger.Error("Failed to mmap", "file", filename, "Attempted size",
> filesize, "err", err)
> + return nil, nil, err
> }
>
> -- return fileAsBytes, err
> -+ return mw, err
> +- return fileAsBytes, &mmappedFile{f: file, m: fileAsBytes}, err
> ++ return mw, &mmappedFile{f: file, mw: mw}, err
> }
>
> - func NewActiveQueryTracker(localStoragePath string, maxConcurrent
> int, logger log.Logger) *ActiveQueryTracker {
> -@@ -116,14 +110,17 @@ func NewActiveQueryTracker(localStoragePath
> string, maxConcurrent int, logger lo
> + func NewActiveQueryTracker(localStoragePath string, maxConcurrent
> int, logger *slog.Logger) *ActiveQueryTracker {
> +@@ -140,15 +133,18 @@ func NewActiveQueryTracker(localStoragePath
> string, maxConcurrent int, logger *s
> filename, filesize := filepath.Join(localStoragePath,
> "queries.active"), 1+maxConcurrent*entrySize
> logUnfinishedQueries(filename, filesize, logger)
>
> -- fileAsBytes, err := getMMapedFile(filename, filesize, logger)
> -+ mw, err := getMMapedFile(filename, filesize, logger)
> +- fileAsBytes, closer, err := getMMappedFile(filename, filesize,
> logger)
> ++ mw, closer, err := getMMappedFile(filename, filesize, logger)
> if err != nil {
> panic("Unable to create mmap-ed active query log")
> }
> @@ -94,16 +111,19 @@ index 716e7749b..8eb1afce0 100644
> + panic("Unable to write mmap-ed active query log")
> + }
> activeQueryTracker := ActiveQueryTracker{
> -- mmapedFile: fileAsBytes,
> +- mmappedFile: fileAsBytes,
> + closer: closer,
> + mw: mw,
> getNextIndex: make(chan int, maxConcurrent),
> logger: logger,
> maxConcurrent: maxConcurrent,
> -@@ -180,19 +177,27 @@ func (tracker ActiveQueryTracker)
> GetMaxConcurrent() int {
> +@@ -205,19 +201,29 @@ func (tracker ActiveQueryTracker)
> GetMaxConcurrent() int {
> }
>
> func (tracker ActiveQueryTracker) Delete(insertIndex int) {
> -- copy(tracker.mmapedFile[insertIndex:], strings.Repeat("\x00",
> entrySize))
> +- copy(tracker.mmappedFile[insertIndex:], strings.Repeat("\x00",
> entrySize))
> ++ buf := tracker.mw.Bytes()
> ++ copy(buf[insertIndex:], strings.Repeat("\x00", entrySize))
> + _, err := tracker.mw.WriteAt([]byte(strings.Repeat("\x00",
> entrySize)), int64(insertIndex))
> + if err != nil {
> + panic("Unable to write mmap-ed active query log")
> @@ -114,7 +134,7 @@ index 716e7749b..8eb1afce0 100644
> func (tracker ActiveQueryTracker) Insert(ctx context.Context, query
> string) (int, error) {
> select {
> case i := <-tracker.getNextIndex:
> -- fileBytes := tracker.mmapedFile
> +- fileBytes := tracker.mmappedFile
> entry := newJSONEntry(query, tracker.logger)
> start, end := i, i+entrySize
>
> @@ -132,20 +152,20 @@ index 716e7749b..8eb1afce0 100644
> case <-ctx.Done():
> return 0, ctx.Err()
> diff --git promql/query_logger_test.go promql/query_logger_test.go
> -index ad76fb992..bd92b81af 100644
> +index eb06e513e..ef2f85cfd 100644
> --- promql/query_logger_test.go
> +++ promql/query_logger_test.go
> -@@ -19,13 +19,22 @@ import (
> - "testing"
> +@@ -21,12 +21,22 @@ import (
>
> "github.com/grafana/regexp"
> -+ "github.com/prometheus/prometheus/tsdb/fileutil"
> "github.com/stretchr/testify/require"
> ++
> ++ "github.com/prometheus/prometheus/tsdb/fileutil"
> )
>
> func TestQueryLogging(t *testing.T) {
> - fileAsBytes := make([]byte, 4096)
> -+ file, err := ioutil.TempFile("", "mmapedFile")
> ++ file, err := os.CreateTemp("", "mmapedFile")
> + require.NoError(t, err)
> +
> + filename := file.Name()
> @@ -155,12 +175,12 @@ index ad76fb992..bd92b81af 100644
> + require.NoError(t, err)
> +
> queryLogger := ActiveQueryTracker{
> -- mmapedFile: fileAsBytes,
> +- mmappedFile: fileAsBytes,
> + mw: mw,
> logger: nil,
> getNextIndex: make(chan int, 4),
> }
> -@@ -45,6 +54,7 @@ func TestQueryLogging(t *testing.T) {
> +@@ -46,6 +56,7 @@ func TestQueryLogging(t *testing.T) {
> `^{"query":"","timestamp_sec":\d+}\x00*,$`,
> `^{"query":"SpecialCharQuery{host=\\"2132132\\",
> id=123123}","timestamp_sec":\d+}\x00*,$`,
> }
> @@ -168,12 +188,12 @@ index ad76fb992..bd92b81af 100644
>
> // Check for inserts of queries.
> for i := 0; i < 4; i++ {
> -@@ -67,9 +77,17 @@ func TestQueryLogging(t *testing.T) {
> +@@ -68,9 +79,17 @@ func TestQueryLogging(t *testing.T) {
> }
>
> func TestIndexReuse(t *testing.T) {
> - queryBytes := make([]byte, 1+3*entrySize)
> -+ file, err := ioutil.TempFile("", "mmapedFile")
> ++ file, err := os.CreateTemp("", "mmapedFile")
> + require.NoError(t, err)
> +
> + filename := file.Name()
> @@ -183,12 +203,12 @@ index ad76fb992..bd92b81af 100644
> + require.NoError(t, err)
> +
> queryLogger := ActiveQueryTracker{
> -- mmapedFile: queryBytes,
> +- mmappedFile: queryBytes,
> + mw: mw,
> logger: nil,
> getNextIndex: make(chan int, 3),
> }
> -@@ -91,6 +109,7 @@ func TestIndexReuse(t *testing.T) {
> +@@ -92,6 +111,7 @@ func TestIndexReuse(t *testing.T) {
>
> `^{"query":"ThisShouldBeInsertedAtIndex2","timestamp_sec":\d+}\x00*,$`,
> `^{"query":"TestQuery3","timestamp_sec":\d+}\x00*,$`,
> }
> @@ -196,26 +216,367 @@ index ad76fb992..bd92b81af 100644
>
> // Check all bytes and verify new query was inserted at index 2
> for i := 0; i < 3; i++ {
> -@@ -110,10 +129,12 @@ func TestMMapFile(t *testing.T) {
> - filename := file.Name()
> - defer os.Remove(filename)
> +@@ -109,9 +129,10 @@ func TestMMapFile(t *testing.T) {
> + fpath := filepath.Join(dir, "mmappedFile")
> + const data = "ab"
>
> -- fileAsBytes, err := getMMapedFile(filename, 2, nil)
> -+ mw, err := getMMapedFile(filename, 2, nil)
> -+ require.NoError(t, err)
> -
> -+ fileAsBytes := mw.Bytes()
> -+ _, err = mw.Write([]byte("ab"))
> +- fileAsBytes, closer, err := getMMappedFile(fpath, 2, nil)
> ++ mw, closer, err := getMMappedFile(fpath, 2, nil)
> require.NoError(t, err)
> -- copy(fileAsBytes, "ab")
> +- copy(fileAsBytes, data)
> ++ buf := mw.Bytes()
> ++ copy(buf, data)
> + require.NoError(t, closer.Close())
> +
> + f, err := os.Open(fpath)
> +diff --git tsdb/chunks/chunks.go tsdb/chunks/chunks.go
> +index 034106238..9d9606512 100644
> +--- tsdb/chunks/chunks.go
> ++++ tsdb/chunks/chunks.go
> +@@ -280,7 +280,7 @@ func checkCRC32(data, sum []byte) error {
> + type Writer struct {
> + dirFile *os.File
> + files []*os.File
> +- wbuf fileutil.BufWriter
> ++ wbuf fileutil.MmapBufWriter
> + n int64
> + crc32 hash.Hash
> + buf [binary.MaxVarintLen32]byte
> +@@ -361,19 +361,18 @@ func (w *Writer) finalizeTail() error {
> + return nil
> + }
> +
> ++ off := int64(SegmentHeaderSize)
> ++
> + if w.wbuf != nil {
> +- if err := w.wbuf.Flush(); err != nil {
> ++ // As the file was pre-allocated, we truncate any superfluous zero
> bytes.
> ++ off = w.wbuf.Offset()
> ++ if err := w.wbuf.Close(); err != nil {
> + return err
> + }
> + }
> + if err := tf.Sync(); err != nil {
> + return err
> + }
> +- // As the file was pre-allocated, we truncate any superfluous zero
> bytes.
> +- off, err := tf.Seek(0, io.SeekCurrent)
> +- if err != nil {
> +- return err
> +- }
> + if err := tf.Truncate(off); err != nil {
> + return err
> + }
> +@@ -387,7 +386,7 @@ func (w *Writer) cut() error {
> + return err
> + }
> +
> +- n, f, _, err := cutSegmentFile(w.dirFile, MagicChunks,
> chunksFormatV1, w.segmentSize)
> ++ n, f, mw, _, err := cutSegmentFile(w.dirFile, MagicChunks,
> chunksFormatV1, w.segmentSize)
> + if err != nil {
> + return err
> + }
> +@@ -395,21 +394,11 @@ func (w *Writer) cut() error {
> +
> + w.files = append(w.files, f)
> + if w.wbuf != nil {
> +- if err := w.wbuf.Reset(f); err != nil {
> ++ if err := w.wbuf.Reset(mw); err != nil {
> + return err
> + }
> + } else {
> +- var (
> +- wbuf fileutil.BufWriter
> +- err error
> +- )
> +- size := 8 * 1024 * 1024
> +- if w.useUncachedIO {
> +- // Uncached IO is implemented using direct I/O for now.
> +- wbuf, err = fileutil.NewDirectIOWriter(f, size)
> +- } else {
> +- wbuf, err = fileutil.NewBufioWriterWithSeek(f, size)
> +- }
> ++ wbuf, err := fileutil.NewBufioMmapWriter(mw)
> + if err != nil {
> + return err
> + }
> +@@ -419,20 +408,22 @@ func (w *Writer) cut() error {
> + return nil
> + }
> +
> +-func cutSegmentFile(dirFile *os.File, magicNumber uint32,
> chunksFormat byte, allocSize int64) (headerSize int, newFile *os.File,
> seq int, returnErr error) {
> ++func cutSegmentFile(dirFile *os.File, magicNumber uint32,
> chunksFormat byte, allocSize int64) (headerSize int, newFile *os.File,
> newMw *fileutil.MmapWriter, seq int, returnErr error) {
> + p, seq, err := nextSequenceFile(dirFile.Name())
> + if err != nil {
> +- return 0, nil, 0, fmt.Errorf("next sequence file: %w", err)
> ++ return 0, nil, nil, 0, fmt.Errorf("next sequence file: %w", err)
> + }
> + ptmp := p + ".tmp"
> +- f, err := os.OpenFile(ptmp, os.O_WRONLY|os.O_CREATE, 0o666)
> ++ f, err := os.OpenFile(ptmp, os.O_RDWR|os.O_CREATE, 0o666)
> + if err != nil {
> +- return 0, nil, 0, fmt.Errorf("open temp file: %w", err)
> ++ return 0, nil, nil, 0, fmt.Errorf("open temp file: %w", err)
> + }
> ++ mw := fileutil.NewMmapWriter(f)
> + defer func() {
> + if returnErr != nil {
> + errs := tsdb_errors.NewMulti(returnErr)
> + if f != nil {
> ++ mw.Close()
> + errs.Add(f.Close())
> + }
> + // Calling RemoveAll on a non-existent file does not return error.
> +@@ -442,11 +433,11 @@ func cutSegmentFile(dirFile *os.File,
> magicNumber uint32, chunksFormat byte, all
> + }()
> + if allocSize > 0 {
> + if err = fileutil.Preallocate(f, allocSize, true); err != nil {
> +- return 0, nil, 0, fmt.Errorf("preallocate: %w", err)
> ++ return 0, nil, nil, 0, fmt.Errorf("preallocate: %w", err)
> + }
> + }
> + if err = dirFile.Sync(); err != nil {
> +- return 0, nil, 0, fmt.Errorf("sync directory: %w", err)
> ++ return 0, nil, nil, 0, fmt.Errorf("sync directory: %w", err)
> + }
> +
> + // Write header metadata for new file.
> +@@ -454,29 +445,35 @@ func cutSegmentFile(dirFile *os.File,
> magicNumber uint32, chunksFormat byte, all
> + binary.BigEndian.PutUint32(metab[:MagicChunksSize], magicNumber)
> + metab[4] = chunksFormat
> +
> +- n, err := f.Write(metab)
> ++ n, err := mw.Write(metab)
> + if err != nil {
> +- return 0, nil, 0, fmt.Errorf("write header: %w", err)
> ++ return 0, nil, nil, 0, fmt.Errorf("write header: %w", err)
> ++ }
> ++ if err := mw.Close(); err != nil {
> ++ return 0, nil, nil, 0, fmt.Errorf("close temp mmap: %w", err)
> + }
> ++ mw = nil
> + if err := f.Close(); err != nil {
> +- return 0, nil, 0, fmt.Errorf("close temp file: %w", err)
> ++ return 0, nil, nil, 0, fmt.Errorf("close temp file: %w", err)
> + }
> + f = nil
> +
> + if err := fileutil.Rename(ptmp, p); err != nil {
> +- return 0, nil, 0, fmt.Errorf("replace file: %w", err)
> ++ return 0, nil, nil, 0, fmt.Errorf("replace file: %w", err)
> + }
> +
> +- f, err = os.OpenFile(p, os.O_WRONLY, 0o666)
> ++ f, err = os.OpenFile(p, os.O_RDWR, 0o666)
> + if err != nil {
> +- return 0, nil, 0, fmt.Errorf("open final file: %w", err)
> ++ return 0, nil, nil, 0, fmt.Errorf("open final file: %w", err)
> + }
> ++ mw, err = fileutil.NewMmapWriterWithSize(f, int(allocSize))
> ++
> + // Skip header for further writes.
> + offset := int64(n)
> +- if _, err := f.Seek(offset, 0); err != nil {
> +- return 0, nil, 0, fmt.Errorf("seek to %d in final file: %w",
> offset, err)
> ++ if _, err := mw.Seek(offset, 0); err != nil {
> ++ return 0, nil, nil, 0, fmt.Errorf("seek to %d in final file: %w",
> offset, err)
> + }
> +- return n, f, seq, nil
> ++ return n, f, mw, seq, nil
> + }
> +
> + func (w *Writer) write(b []byte) error {
> +diff --git tsdb/chunks/head_chunks.go tsdb/chunks/head_chunks.go
> +index 876b42cb2..14fc84af3 100644
> +--- tsdb/chunks/head_chunks.go
> ++++ tsdb/chunks/head_chunks.go
> +@@ -61,6 +61,7 @@ const (
> + // MaxHeadChunkMetaSize is the max size of an mmapped chunks minus
> the chunks data.
> + // Max because the uvarint size can be smaller.
> + MaxHeadChunkMetaSize = SeriesRefSize + 2*MintMaxtSize +
> ChunkEncodingSize + MaxChunkLengthFieldSize + CRCSize
> ++ MinHeadChunkMetaSize = SeriesRefSize + 2*MintMaxtSize +
> ChunkEncodingSize + 1 + CRCSize
> + // MinWriteBufferSize is the minimum write buffer size allowed.
> + MinWriteBufferSize = 64 * 1024 // 64KB.
> + // MaxWriteBufferSize is the maximum write buffer size allowed.
> +@@ -191,14 +192,16 @@ func (f *chunkPos) bytesToWriteForChunk(chkLen
> uint64) uint64 {
> + // ChunkDiskMapper is for writing the Head block chunks to disk
> + // and access chunks via mmapped files.
> + type ChunkDiskMapper struct {
> ++ // needs to be correctly aligned
> ++ curFileOffset atomic.Uint64 // Bytes written in current open file.
> + // Writer.
> + dir *os.File
> + writeBufferSize int
> +
> +- curFile *os.File // File being written to.
> +- curFileSequence int // Index of current open file being
> appended to. 0 if no file is active.
> +- curFileOffset atomic.Uint64 // Bytes written in current open file.
> +- curFileMaxt int64 // Used for the size retention.
> ++ curFile *os.File // File being written to.
> ++ curMw *fileutil.MmapWriter
> ++ curFileSequence int // Index of current open file being appended
> to. 0 if no file is active.
> ++ curFileMaxt int64 // Used for the size retention.
> +
> + // The values in evtlPos represent the file position which will
> eventually be
> + // reached once the content of the write queue has been fully
> processed.
> +@@ -604,7 +607,7 @@ func (cdm *ChunkDiskMapper) cut() (seq, offset
> int, returnErr error) {
> + return 0, 0, err
> + }
> +
> +- offset, newFile, seq, err := cutSegmentFile(cdm.dir,
> MagicHeadChunks, headChunksFormatV1, HeadChunkFilePreallocationSize)
> ++ offset, newFile, newMw, seq, err := cutSegmentFile(cdm.dir,
> MagicHeadChunks, headChunksFormatV1, HeadChunkFilePreallocationSize)
> + if err != nil {
> + return 0, 0, err
> + }
> +@@ -613,6 +616,7 @@ func (cdm *ChunkDiskMapper) cut() (seq, offset
> int, returnErr error) {
> + // The file should not be closed if there is no error,
> + // its kept open in the ChunkDiskMapper.
> + if returnErr != nil {
> ++ returnErr = tsdb_errors.NewMulti(returnErr, newMw.Close()).Err()
> + returnErr = tsdb_errors.NewMulti(returnErr, newFile.Close()).Err()
> + }
> + }()
> +@@ -633,10 +637,11 @@ func (cdm *ChunkDiskMapper) cut() (seq, offset
> int, returnErr error) {
> + cdm.readPathMtx.Lock()
> + cdm.curFileSequence = seq
> + cdm.curFile = newFile
> ++ cdm.curMw = newMw
> + if cdm.chkWriter != nil {
> +- cdm.chkWriter.Reset(newFile)
> ++ cdm.chkWriter.Reset(cdm.curMw)
> + } else {
> +- cdm.chkWriter = bufio.NewWriterSize(newFile, cdm.writeBufferSize)
> ++ cdm.chkWriter = bufio.NewWriterSize(cdm.curMw, cdm.writeBufferSize)
> + }
> +
> + cdm.closers[cdm.curFileSequence] = mmapFile
> +@@ -659,10 +664,9 @@ func (cdm *ChunkDiskMapper) finalizeCurFile()
> error {
> + return err
> + }
>
> - f, err := os.Open(filename)
> +- if err := cdm.curFile.Sync(); err != nil {
> ++ if err := cdm.curMw.Close(); err != nil {
> + return err
> + }
> +-
> + return cdm.curFile.Close()
> + }
> +
> +@@ -774,7 +778,7 @@ func (cdm *ChunkDiskMapper) Chunk(ref
> ChunkDiskMapperRef) (chunkenc.Chunk, error
> + return nil, &CorruptionErr{
> + Dir: cdm.dir.Name(),
> + FileIndex: sgmIndex,
> +- Err: fmt.Errorf("head chunk file doesn't include enough
> bytes to read the chunk - required:%v, available:%v", chkDataEnd,
> mmapFile.byteSlice.Len()),
> ++ Err: fmt.Errorf("head chunk file doesn't Include enough
> bytes to read the chunk - required:%v, available:%v", chkDataEnd,
> mmapFile.byteSlice.Len()),
> + }
> + }
> +
> +@@ -834,7 +838,7 @@ func (cdm *ChunkDiskMapper) IterateAllChunks(f
> func(seriesRef HeadSeriesRef, chu
> + }
> + idx := HeadChunkFileHeaderSize
> + for idx < fileEnd {
> +- if fileEnd-idx < MaxHeadChunkMetaSize {
> ++ if fileEnd-idx < MinHeadChunkMetaSize {
> + // Check for all 0s which marks the end of the file.
> + allZeros := true
> + for _, b := range mmapFile.byteSlice.Range(idx, fileEnd) {
> +@@ -851,7 +855,7 @@ func (cdm *ChunkDiskMapper) IterateAllChunks(f
> func(seriesRef HeadSeriesRef, chu
> + Dir: cdm.dir.Name(),
> + FileIndex: segID,
> + Err: fmt.Errorf("head chunk file has some unread data, but
> doesn't include enough bytes to read the chunk header"+
> +- " - required:%v, available:%v, file:%d",
> idx+MaxHeadChunkMetaSize, fileEnd, segID),
> ++ " - required:%v, available:%v, file:%d cur %d",
> idx+MinHeadChunkMetaSize, fileEnd, segID, cdm.curFileSequence),
> + }
> + }
> + chunkRef := newChunkDiskMapperRef(uint64(segID), uint64(idx))
> +@@ -886,7 +890,7 @@ func (cdm *ChunkDiskMapper) IterateAllChunks(f
> func(seriesRef HeadSeriesRef, chu
> + return &CorruptionErr{
> + Dir: cdm.dir.Name(),
> + FileIndex: segID,
> +- Err: fmt.Errorf("head chunk file doesn't include enough
> bytes to read the chunk header - required:%v, available:%v, file:%d",
> idx+CRCSize, fileEnd, segID),
> ++ Err: fmt.Errorf("head chunk file doesn't include enough
> bytes to read the crc32 sum - required:%v, available:%v, hcf: %v, srs:
> %v, mms: %v, ces: %v, n: %v dataLen: %v, numSamples: %v, file:%d
> cur:%d", idx+CRCSize, fileEnd, HeadChunkFileHeaderSize, SeriesRefSize,
> MintMaxtSize, ChunkEncodingSize, n, dataLen, numSamples, segID,
> cdm.curFileSequence),
> + }
> + }
> +
> +diff --git tsdb/chunks/head_chunks_openbsd.go
> tsdb/chunks/head_chunks_openbsd.go
> +new file mode 100644
> +index 000000000..05e308427
> +--- /dev/null
> ++++ tsdb/chunks/head_chunks_openbsd.go
> +@@ -0,0 +1,18 @@
> ++// Copyright 2020 The Prometheus Authors
> ++// Licensed under the Apache License, Version 2.0 (the "License");
> ++// you may not use this file except in compliance with the License.
> ++// You may obtain a copy of the License at
> ++//
> ++// http://www.apache.org/licenses/LICENSE-2.0
> ++//
> ++// Unless required by applicable law or agreed to in writing,
> software
> ++// distributed under the License is distributed on an "AS IS" BASIS,
> ++// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> ++// See the License for the specific language governing permissions
> and
> ++// limitations under the License.
> ++
> ++package chunks
> ++
> ++// HeadChunkFilePreallocationSize is the size to which the m-map file
> should be preallocated when a new file is cut.
> ++// For OpenBSD use the MaxHeadChunkFileSize for performance reasons
> ++var HeadChunkFilePreallocationSize int64 = MaxHeadChunkFileSize
> +diff --git tsdb/chunks/head_chunks_other.go
> tsdb/chunks/head_chunks_other.go
> +index f30c5e55e..6e82d73f4 100644
> +--- tsdb/chunks/head_chunks_other.go
> ++++ tsdb/chunks/head_chunks_other.go
> +@@ -11,7 +11,7 @@
> + // See the License for the specific language governing permissions
> and
> + // limitations under the License.
> +
> +-//go:build !windows
> ++//go:build !windows && !openbsd
> +
> + package chunks
> +
> +diff --git tsdb/chunks/head_chunks_test.go
> tsdb/chunks/head_chunks_test.go
> +index 68742471e..a3dda8b0e 100644
> +--- tsdb/chunks/head_chunks_test.go
> ++++ tsdb/chunks/head_chunks_test.go
> +@@ -26,6 +26,7 @@ import (
> + "github.com/stretchr/testify/require"
> +
> + "github.com/prometheus/prometheus/tsdb/chunkenc"
> ++ "github.com/prometheus/prometheus/tsdb/fileutil"
> + )
> +
> + var writeQueueSize int
> +@@ -131,7 +132,7 @@ func
> TestChunkDiskMapper_WriteChunk_Chunk_IterateChunks(t *testing.T) {
> + require.Len(t, hrw.mmappedChunkFiles, 3, "expected 3 mmapped files,
> got %d", len(hrw.mmappedChunkFiles))
> + require.Len(t, hrw.closers, len(hrw.mmappedChunkFiles))
> +
> +- actualBytes, err := os.ReadFile(firstFileName)
> ++ actualBytes, err := mmapReadFile(firstFileName)
> require.NoError(t, err)
> +
> + // Check header of the segment file.
> +@@ -581,3 +582,15 @@ func createChunk(t *testing.T, idx int, hrw
> *ChunkDiskMapper) (seriesRef HeadSer
> + <-awaitCb
> + return
> + }
> ++
> ++func mmapReadFile(path string) ([]byte, error) {
> ++ var b []byte
> ++ m, err := fileutil.OpenMmapFile(path)
> ++ if err != nil {
> ++ return nil, err
> ++ }
> ++ bb := m.Bytes()
> ++ b = append(b, bb...)
> ++ m.Close()
> ++ return b, nil
> ++}
> diff --git tsdb/fileutil/mmap.go tsdb/fileutil/mmap.go
> -index 4dbca4f97..e1c522472 100644
> +index 782ff27ec..15590e2e3 100644
> --- tsdb/fileutil/mmap.go
> +++ tsdb/fileutil/mmap.go
> -@@ -20,8 +20,31 @@ import (
> +@@ -19,8 +19,31 @@ import (
> )
>
> type MmapFile struct {
> @@ -236,40 +597,36 @@ index 4dbca4f97..e1c522472 100644
> + if size <= 0 {
> + info, err := f.Stat()
> + if err != nil {
> -+ return nil, errors.Wrap(err, "stat")
> ++ return nil, fmt.Errorf("stat: %w", err)
> + }
> + size = int(info.Size())
> + }
> +
> + b, err := mmapRw(f, size)
> + if err != nil {
> -+ return nil, errors.Wrapf(err, "mmap, size %d", size)
> ++ return nil, fmt.Errorf("mmap, size %d: %w", size, err)
> + }
> + return &MmapFile{f: f, b: b, rw: true}, nil
> }
>
> func OpenMmapFile(path string) (*MmapFile, error) {
> -@@ -46,22 +69,53 @@ func OpenMmapFileWithSize(path string, size int)
> (mf *MmapFile, retErr error) {
> +@@ -45,22 +68,49 @@ func OpenMmapFileWithSize(path string, size int)
> (mf *MmapFile, retErr error) {
> size = int(info.Size())
> }
>
> - b, err := mmap(f, size)
> + b, err := mmapRo(f, size)
> if err != nil {
> - return nil, errors.Wrapf(err, "mmap, size %d", size)
> + return nil, fmt.Errorf("mmap, size %d: %w", size, err)
> }
> + return &MmapFile{f: f, b: b, closeFile: true}, nil
> +}
>
> - return &MmapFile{f: f, b: b}, nil
> +func (f *MmapFile) resize(size int) error {
> -+ err := f.Sync()
> ++ err := munmap(f.b)
> + if err != nil {
> -+ return errors.Wrap(err, "resize sync")
> -+ }
> -+ err = munmap(f.b)
> -+ if err != nil {
> -+ return errors.Wrap(err, "resize munmap")
> ++ return fmt.Errorf("resize munmap: %w", err)
> + }
> + var b []byte
> + if f.rw {
> @@ -278,7 +635,7 @@ index 4dbca4f97..e1c522472 100644
> + b, err = mmapRo(f.f, size)
> + }
> + if err != nil {
> -+ return errors.Wrap(err, "resize mmap")
> ++ return fmt.Errorf("resize mmap: %w", err)
> + }
> + f.b = b
> + return nil
> @@ -296,13 +653,13 @@ index 4dbca4f97..e1c522472 100644
>
> if err0 != nil {
> - return err0
> -+ return errors.Wrap(err0, "close sync")
> ++ return fmt.Errorf("close sync: %w", err0)
> + }
> + if err1 != nil {
> -+ return errors.Wrap(err1, "close munmap")
> ++ return fmt.Errorf("close munmap: %w", err1)
> + }
> + if err2 != nil {
> -+ return errors.Wrap(err2, "close file")
> ++ return fmt.Errorf("close file: %w", err2)
> }
> - return err1
> + return nil
> @@ -368,10 +725,10 @@ index 000000000..31fd98e6d
> + return nil
> +}
> diff --git tsdb/fileutil/mmap_unix.go tsdb/fileutil/mmap_unix.go
> -index 1fd7f48ff..c83a32011 100644
> +index 3d15e1a8c..9a7c62816 100644
> --- tsdb/fileutil/mmap_unix.go
> +++ tsdb/fileutil/mmap_unix.go
> -@@ -22,10 +22,14 @@ import (
> +@@ -21,10 +21,14 @@ import (
> "golang.org/x/sys/unix"
> )
>
> @@ -421,10 +778,10 @@ index b94226412..9caf36622 100644
> if h == 0 {
> diff --git tsdb/fileutil/writer.go tsdb/fileutil/writer.go
> new file mode 100644
> -index 000000000..86c1504e4
> +index 000000000..f50a2fa84
> --- /dev/null
> +++ tsdb/fileutil/writer.go
> -@@ -0,0 +1,156 @@
> +@@ -0,0 +1,203 @@
> +// Copyright 2021 The Prometheus Authors
> +// Licensed under the Apache License, Version 2.0 (the "License");
> +// you may not use this file except in compliance with the License.
> @@ -456,6 +813,50 @@ index 000000000..86c1504e4
> + rpos int
> +}
> +
> ++type MmapBufWriter interface {
> ++ Write([]byte) (int, error)
> ++ Close() error
> ++ Offset() int64
> ++ Reset(mw *MmapWriter) error
> ++}
> ++
> ++type mmapBufioWriter struct {
> ++ mw *MmapWriter
> ++}
> ++
> ++func (m *mmapBufioWriter) Write(b []byte) (int, error) {
> ++ return m.mw.Write(b)
> ++}
> ++
> ++func (m *mmapBufioWriter) Close() error {
> ++ return m.mw.Close()
> ++}
> ++
> ++func (m *mmapBufioWriter) Offset() int64 {
> ++ off, _ := m.mw.Seek(0, io.SeekCurrent)
> ++ return off
> ++}
> ++
> ++func (m *mmapBufioWriter) Reset(mw *MmapWriter) error {
> ++ if err := m.mw.Close(); err != nil {
> ++ return err
> ++ }
> ++ m.mw = mw
> ++ return nil
> ++}
> ++
> ++func NewBufioMmapWriter(mw *MmapWriter) (MmapBufWriter, error) {
> ++ if mw.mf == nil {
> ++ mf, err := OpenRwMmapFromFile(mw.f, 0)
> ++ if err != nil {
> ++ return nil, err
> ++ }
> ++ mw.mf = mf
> ++ mw.buf = mf.Bytes()
> ++ }
> ++ return &mmapBufioWriter{mw}, nil
> ++}
> ++
> +func NewMmapWriter(f *os.File) *MmapWriter {
> + return &MmapWriter{f: f}
> +}
> @@ -480,7 +881,9 @@ index 000000000..86c1504e4
> +func (mw *MmapWriter) Close() error {
> + mw.buf = nil
> + if mw.mf != nil {
> -+ return mw.mf.Close()
> ++ err := mw.mf.Close()
> ++ mw.mf = nil
> ++ return err
> + }
> + return nil
> +}
> @@ -513,20 +916,23 @@ index 000000000..86c1504e4
> +}
> +
> +func (mw *MmapWriter) Seek(offset int64, whence int) (ret int64, err
> error) {
> -+ var abs int
> ++ var abs int64
> ++ mw.Lock()
> ++ defer mw.Unlock()
> + switch whence {
> + case io.SeekStart:
> -+ abs = int(offset)
> ++ abs = offset
> ++ case io.SeekCurrent:
> ++ abs = int64(mw.wpos) + offset
> + default:
> + return 0, errors.New("invalid whence")
> + }
> + if abs < 0 {
> + return 0, errors.New("negative position")
> + }
> -+ mw.Lock()
> -+ defer mw.Unlock()
> -+ mw.rpos = abs
> -+ return offset, nil
> ++ mw.wpos = int(abs)
> ++ mw.rpos = int(abs)
> ++ return abs, nil
> +}
> +
> +func (mw *MmapWriter) Read(p []byte) (n int, err error) {
> @@ -544,12 +950,12 @@ index 000000000..86c1504e4
> + mw.Lock()
> + defer mw.Unlock()
> + if mw.mf == nil {
> -+ err = mw.mmap(len(p))
> ++ err = mw.mmap(mw.wpos + len(p))
> + if err != nil {
> + return
> + }
> + }
> -+ if len(p) > len(mw.buf)-mw.wpos {
> ++ if mw.wpos+len(p) > len(mw.buf) {
> + err = mw.resize(mw.wpos + len(p))
> + if err != nil {
> + return
> @@ -558,7 +964,6 @@ index 000000000..86c1504e4
> +
> + n = copy(mw.buf[mw.wpos:], p)
> + mw.wpos += n
> -+ err = mw.Sync()
> + return
> +}
> +
> @@ -578,14 +983,13 @@ index 000000000..86c1504e4
> + }
> + }
> + n = copy(mw.buf[pos:], p)
> -+ err = mw.Sync()
> + return
> +}
> diff --git tsdb/index/index.go tsdb/index/index.go
> -index 29295c45f..451c80582 100644
> +index edcb92a71..36ba9d291 100644
> --- tsdb/index/index.go
> +++ tsdb/index/index.go
> -@@ -257,6 +257,7 @@ func (w *Writer) addPadding(size int) error {
> +@@ -272,6 +272,7 @@ func (w *Writer) addPadding(size int) error {
> type FileWriter struct {
> f *os.File
> fbuf *bufio.Writer
> @@ -593,7 +997,7 @@ index 29295c45f..451c80582 100644
> pos uint64
> name string
> }
> -@@ -266,14 +267,20 @@ func NewFileWriter(name string) (*FileWriter,
> error) {
> +@@ -281,14 +282,20 @@ func NewFileWriter(name string) (*FileWriter,
> error) {
> if err != nil {
> return nil, err
> }
> @@ -615,7 +1019,7 @@ index 29295c45f..451c80582 100644
> func (fw *FileWriter) Pos() uint64 {
> return fw.pos
> }
> -@@ -304,7 +311,7 @@ func (fw *FileWriter) WriteAt(buf []byte, pos
> uint64) error {
> +@@ -319,7 +326,7 @@ func (fw *FileWriter) WriteAt(buf []byte, pos
> uint64) error {
> if err := fw.Flush(); err != nil {
> return err
> }
> @@ -624,7 +1028,7 @@ index 29295c45f..451c80582 100644
> return err
> }
>
> -@@ -326,7 +333,7 @@ func (fw *FileWriter) Close() error {
> +@@ -341,7 +348,7 @@ func (fw *FileWriter) Close() error {
> if err := fw.Flush(); err != nil {
> return err
> }
> @@ -633,7 +1037,7 @@ index 29295c45f..451c80582 100644
> return err
> }
> return fw.f.Close()
> -@@ -987,11 +994,11 @@ func (w *Writer) writePostings() error {
> +@@ -1026,11 +1033,11 @@ func (w *Writer) writePostings() error {
> if err := w.fP.Flush(); err != nil {
> return err
> }
> Index: pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/sysutils/prometheus/pkg/PLIST,v
> diff -u -p -r1.7 PLIST
> --- pkg/PLIST 8 Nov 2022 11:17:11 -0000 1.7
> +++ pkg/PLIST 18 Mar 2026 15:48:34 -0000
> @@ -8,17 +8,6 @@ share/doc/prometheus/
> share/doc/prometheus/LICENSE
> share/doc/prometheus/NOTICE
> share/examples/prometheus/
> -share/examples/prometheus/console_libraries/
> -share/examples/prometheus/console_libraries/menu.lib
> -share/examples/prometheus/console_libraries/prom.lib
> -share/examples/prometheus/consoles/
> -share/examples/prometheus/consoles/index.html.example
> -share/examples/prometheus/consoles/node-cpu.html
> -share/examples/prometheus/consoles/node-disk.html
> -share/examples/prometheus/consoles/node-overview.html
> -share/examples/prometheus/consoles/node.html
> -share/examples/prometheus/consoles/prometheus-overview.html
> -share/examples/prometheus/consoles/prometheus.html
> share/examples/prometheus/prometheus.yml
> @sample ${SYSCONFDIR}/prometheus/prometheus.yml
> @mode 0755
Subscribe to:
Comments (Atom)