[Bug 296952] [ports-mgmt/pkg] Reports readonly database for non-root user.
- Reply: bugzilla-noreply_a_freebsd.org: "maintainer-feedback requested: [Bug 296952] [ports-mgmt/pkg] Reports readonly database for non-root user."
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 296952] [ports-mgmt/pkg] Reports readonly database for non-root user."
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 21 Jul 2026 10:43:51 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=296952
Bug ID: 296952
Summary: [ports-mgmt/pkg] Reports readonly database for
non-root user.
Product: Ports & Packages
Version: Latest
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: Individual Port(s)
Assignee: pkg@FreeBSD.org
Reporter: peterj@FreeBSD.org
Flags: maintainer-feedback?(pkg@FreeBSD.org)
Assignee: pkg@FreeBSD.org
After upgrading from pkg 2.7.5 to 2.8.0, pkg now typically reports an error
when run as non-root:
server% pkg -d info
DBG(1)[16393]> (config) pkg initialized
DBG(1)[16393]> (config) loading repositories in /etc/pkg/
DBG(1)[16393]> (config) loading /etc/pkg//FreeBSD.conf
DBG(1)[16393]> (config) parsing key 'FreeBSD'
DBG(1)[16393]> (config) parsing repository object FreeBSD
DBG(1)[16393]> (config) parsing key 'FreeBSD-kmods'
DBG(1)[16393]> (config) parsing repository object FreeBSD-kmods
DBG(1)[16393]> (config) loading repositories in /usr/local/etc/pkg/repos/
pkg: sqlite error while executing INSERT OR REPLACE INTO packages( origin,
name, version, comment, desc, message, arch, maintainer, www, prefix, flatsize,
automatic, licenselogic, time, manifestdigest, dep_formula, vital)VALUES( ?1,
?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9, ?10, ?11, ?12, ?13, NOW(), ?14, ?15, ?16 ) in
file pkgdb.c:100: attempt to write a readonly database
server%
If I run "pkg info" as root, it's then usable as non-root until a pkg write
operation is performed. This seems to be defined by the presence or otherwise
of the "-shm" and "-wal" files but I don't understand why read operations are
sometimes attempting to write to the database. In any case, this is a major
regression and breaks tooling that expects to use options like "pkg info" as a
normal user.
I've rebuilt and reinstalled pkg in case there was a build issue and have
reproduced the issue on 2 different systems.
--
You are receiving this mail because:
You are the assignee for the bug.