pkgdb: skip WAL journal mode on read-only databases
PRAGMA journal_mode = WAL requires write access to create the -wal and
-shm sidecar files. When pkg-static runs as an unprivileged user (e.g.
nobody during poudriere's package phase), the local database is opened
read-only and the WAL pragma fails with "attempt to write a readonly
database".
This caused actual-package-depends to fail silently, producing packages
with missing dependencies. For example, gmake was packaged without its
gettext-runtime dependency, leading to "libintl.so.8 not found" errors
when gmake was later installed as a build dependency.
Use sqlite3_db_readonly() to check the connection mode before attempting
to enable WAL, consistent with other read-only guards in pkgdb.c.
Fixes: a7ccf3c03e92 ("pkgdb: enable WAL journal mode for local databases")
Reported-by: https://github.com/freebsd/pkg/issues/2605
pkgdb: open read-only databases in immutable mode to fix WAL access
When pkg enables WAL journal mode on the local database (during a
write-access session), the mode is persisted in the database header.
Subsequent read-only opens (e.g. as nobody during poudriere's package
phase) fail because WAL requires -shm/-wal sidecar files which cannot
be created without write access, causing all queries to fail — including
read-only ones like PRAGMA user_version.
This caused actual-package-depends to fail silently, producing packages
with missing dependencies. For example, gmake was packaged without its
gettext-runtime dependency, leading to "libintl.so.8 not found" errors.
Fix by opening the database with sqlite3_open_v2() and immutable=1 URI
parameter when write access is not available. Immutable mode tells
SQLite to bypass WAL/SHM entirely and read directly from the main
database file, which contains all committed data after the last
writer's checkpoint.
pkgdb: open read-only databases in immutable mode to fix WAL access
When pkg enables WAL journal mode on the local database (during a
write-access session), the mode is persisted in the database header.
Subsequent read-only opens (e.g. as nobody during poudriere's package
phase) fail because WAL requires -shm/-wal sidecar files which cannot
be created without write access, causing all queries to fail — including
read-only ones like PRAGMA user_version.
This caused actual-package-depends to fail silently, producing packages
with missing dependencies. For example, gmake was packaged without its
gettext-runtime dependency, leading to "libintl.so.8 not found" errors.
Fix by opening the database with sqlite3_open_v2() and immutable=1 URI
parameter when write access is not available. Immutable mode tells
SQLite to bypass WAL/SHM entirely and read directly from the main
database file, which contains all committed data after the last
writer's checkpoint.
www/nginx-devel: Update to 1.29.5
Changes with nginx 1.29.5 04 Feb
2026
*) Security: an attacker might inject plain text data in the
response
from an SSL backend (CVE-2026-1642).
*) Bugfix: use-after-free might occur after switching to the next
gRPC
or HTTP/2 backend.
*) Bugfix: an invalid HTTP/2 request might be sent after switching
to
the next upstream.
*) Bugfix: a response with multiple ranges might be larger than the
source response.
[13 lines not shown]
www/nginx: Update to 1.28.2
Changes with nginx 1.28.2 04 Feb
2026
*) Security: an attacker might inject plain text data in the
response
from an SSL backend (CVE-2026-1642).
*) Bugfix: use-after-free might occur after switching to the next
gRPC
or HTTP/2 backend.
*) Bugfix: fixed warning when compiling with MSVC 2022 x86.
Changes with nginx 1.28.1 23 Dec
2025
*) Security: processing of a specially crafted login/password when
[37 lines not shown]
pkgdb: skip WAL journal mode on read-only databases
PRAGMA journal_mode = WAL requires write access to create the -wal and
-shm sidecar files. When pkg-static runs as an unprivileged user (e.g.
nobody during poudriere's package phase), the local database is opened
read-only and the WAL pragma fails with "attempt to write a readonly
database".
This caused actual-package-depends to fail silently, producing packages
with missing dependencies. For example, gmake was packaged without its
gettext-runtime dependency, leading to "libintl.so.8 not found" errors
when gmake was later installed as a build dependency.
Use sqlite3_db_readonly() to check the connection mode before attempting
to enable WAL, consistent with other read-only guards in pkgdb.c.
Fixes: a7ccf3c03e92 ("pkgdb: enable WAL journal mode for local databases")
Reported-by: https://github.com/freebsd/pkg/issues/2605