guix-mirrors/guix
Ludovic Courtès 7445776b7e
gc: Open a connection to the daemon only when strictly necessary.
Fixes guix/guix#1901.

Previously, ‘guix gc --list-busy’ (which is invoked by ‘guix-daemon’) would
open a connection to the daemon, which in turn attempts to create
/var/guix/profiles/per-user/$USER.  However, when ‘guix-daemon‘ is running as
an unprivileged user, creating that directory fails with EPERM.  Because of
this, garbage collection would always fail when running the unprivileged
daemon on Guix System.

* guix/scripts/gc.scm (guix-gc): Remove upfront call to ‘open-connection’.
Instead, use ‘with-store’ only for operations that require it.

Change-Id: I1fbfd97cf7ba9e3087f7287b4776ea2f6623400d
2025-09-18 12:14:34 +02:00
..
build Revert "Update Maxim's email address." 2025-09-18 12:07:31 +09:00
build-system Reapply "Update Maxim's email address." 2025-09-18 13:44:12 +09:00
import Reapply "Update Maxim's email address." 2025-09-18 13:44:12 +09:00
platforms guix: Add loongarch platform. 2025-01-25 01:05:22 +08:00
scripts gc: Open a connection to the daemon only when strictly necessary. 2025-09-18 12:14:34 +02:00
store
tests
android-repo-download.scm
avahi.scm
base16.scm
base32.scm
base64.scm
build-system.scm build-system: Introduce @* macro for lazy module resolution. 2025-09-04 12:19:55 +02:00
bzr-download.scm Reapply "Update Maxim's email address." 2025-09-18 13:44:12 +09:00
cache.scm cache: Remove unused import. 2025-04-14 17:31:49 +02:00
channels.scm maint: Change main repository URL to git.guix.gnu.org. 2025-05-23 11:19:07 +02:00
ci.scm
colors.scm
combinators.scm
config.scm.in
cpio.scm
cpu.scm guix: cpu: Recognize CPUs through GCC-15. 2025-08-06 12:02:52 +03:00
cve.scm cve: Upgrade to JSON 2.0 feeds. 2025-08-31 12:39:24 +02:00
cvs-download.scm
d3.v3.js
deprecation.scm
derivations.scm derivations: Fix indentation. 2025-02-22 23:55:24 +09:00
describe.scm ui: Search channels for guix extensions 2025-03-08 17:40:58 +01:00
diagnostics.scm
discovery.scm
docker.scm Reapply "Update Maxim's email address." 2025-09-18 13:44:12 +09:00
download.scm download: Remove unreachable mirror URL. 2025-04-03 22:28:10 +09:00
elf.scm
ftp-client.scm
gexp.scm Reapply "Update Maxim's email address." 2025-09-18 13:44:12 +09:00
git-authenticate.scm git-authenticate: Print a clear error message for malformed keys. 2025-08-23 16:57:21 +02:00
git-download.scm Reapply "Update Maxim's email address." 2025-09-18 13:44:12 +09:00
git.scm git: Move ‘core.autocrlf’ settings. 2025-06-16 23:11:10 +02:00
glob.scm
gnu-maintenance.scm Reapply "Update Maxim's email address." 2025-09-18 13:44:12 +09:00
gnupg.scm Reapply "Update Maxim's email address." 2025-09-18 13:44:12 +09:00
grafts.scm grafts: Allow file-like objects in the ‘replacement’ field of <graft>. 2025-01-28 14:56:14 +01:00
graph.js
graph.scm
hash.scm
hg-download.scm gnu: mercurial: Add package and rename former to mercurial/pinned. 2025-08-31 12:21:12 +02:00
http-client.scm guix: Avoid ‘fdatasync’ call for caches and regular files. 2025-04-14 17:31:50 +02:00
i18n.scm
inferior.scm inferior: Add #:verify-certificate? to ‘cached-channel-instance’. 2024-12-25 23:51:10 +01:00
ipfs.scm
least-authority.scm least-authority: Export default preserved environment variables. 2025-04-19 21:13:21 +09:00
licenses.scm licenses: Add CERN Open Hardware Licence. 2025-08-03 10:58:14 +02:00
lint.scm guix: lint: Add codespell hints. 2025-09-08 10:03:38 +03:00
man-db.scm Reapply "Update Maxim's email address." 2025-09-18 13:44:12 +09:00
memoization.scm
modules.scm
monad-repl.scm
monads.scm gexp: ‘with-parameters’ properly handles ‘%graft?’. 2025-03-05 00:28:49 +01:00
nar.scm
narinfo.scm
openpgp.scm
packages.scm Reapply "Update Maxim's email address." 2025-09-18 13:44:12 +09:00
pki.scm pki: Always make /etc/guix/acl world-readable. 2025-07-16 23:50:38 +02:00
platform.scm
profiles.scm Reapply "Update Maxim's email address." 2025-09-18 13:44:12 +09:00
profiling.scm
progress.scm
quirks.scm
read-print.scm read-print: Attempt to indent package arguments less. 2025-02-09 01:00:00 +01:00
records.scm records: Remove unneed autoload. 2025-07-01 17:46:01 +08:00
remote.scm remote: Do not double-quote the repl-command. 2024-12-12 12:52:08 +01:00
repl.scm
rpm.scm Reapply "Update Maxim's email address." 2025-09-18 13:44:12 +09:00
scripts.scm
search-paths.scm Reapply "Update Maxim's email address." 2025-09-18 13:44:12 +09:00
self.scm self: Install systemd ‘.service’ files. 2025-04-20 17:58:11 +02:00
serialization.scm
sets.scm
ssh.scm pki: Always make /etc/guix/acl world-readable. 2025-07-16 23:50:38 +02:00
status.scm Reapply "Update Maxim's email address." 2025-09-18 13:44:12 +09:00
store.scm gexp: ‘with-parameters’ properly handles ‘%graft?’. 2025-03-05 00:28:49 +01:00
substitutes.scm guix: Avoid ‘fdatasync’ call for caches and regular files. 2025-04-14 17:31:50 +02:00
svn-download.scm gnu: subversion: Add package and rename former to subversion/pinned. 2025-08-31 12:21:09 +02:00
swh.scm swh: Catch swh-error when downloading from SWH Vault. 2025-07-17 16:41:28 +02:00
tests.scm tests: Reduce build timeout to 3 minutes for Scheme tests. 2025-09-03 12:34:13 +02:00
transformations.scm gnu: go-1.23: Add aarch64 micro-architecture compiler support. 2025-08-06 12:02:52 +03:00
ui.scm Reapply "Update Maxim's email address." 2025-09-18 13:44:12 +09:00
upstream.scm upstream: Do not update to same version. 2025-04-27 13:01:48 +01:00
utils.scm Reapply "Update Maxim's email address." 2025-09-18 13:44:12 +09:00
workers.scm