Date: Tue, 21 Jul 2026 10:43:51 +0000 From: bugzilla-noreply@freebsd.org To: pkg@FreeBSD.org Subject: maintainer-feedback requested: [Bug 296952] [ports-mgmt/pkg] Reports readonly database for non-root user. Message-ID: <bug-296952-32340-smBldwk8QS@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-296952-32340@https.bugs.freebsd.org/bugzilla/>
index | next in thread | previous in thread | raw e-mail
Bugzilla Automation <bugzilla@FreeBSD.org> has asked freebsd-pkg (Nobody) <pkg@FreeBSD.org> for maintainer-feedback: Bug 296952: [ports-mgmt/pkg] Reports readonly database for non-root user. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=296952 --- Description --- 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.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-296952-32340-smBldwk8QS>
