<feed xmlns='http://www.w3.org/2005/Atom'>
<title>guix/nix/nix-daemon, branch koszko</title>
<subtitle>Wojtek's customized Guix</subtitle>
<id>https://git.koszko.org/guix/atom?h=koszko</id>
<link rel='self' href='https://git.koszko.org/guix/atom?h=koszko'/>
<link rel='alternate' type='text/html' href='https://git.koszko.org/guix/'/>
<updated>2025-04-14T15:33:11Z</updated>
<entry>
<title>daemon: Catch SIGINT, SIGTERM, and SIGHUP for proper termination.</title>
<updated>2025-04-14T15:33:11Z</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2025-04-11T21:29:51Z</published>
<link rel='alternate' type='text/html' href='https://git.koszko.org/guix/commit/?id=dd947985522886f9de6fdfdde3f0601e42219da5'/>
<id>urn:sha1:dd947985522886f9de6fdfdde3f0601e42219da5</id>
<content type='text'>
Previously the daemon would not install handlers for these signals.  It
would thus terminate abruptly when receiving them, without properly
closing the SQLite database.

Consequently, the database’s WAL file, which is normally deleted by the
last client closing the database (via ‘sqlite3_close’), would not be
deleted when the guix-daemon process is terminated; instead, it would
persist and possibly keep growing beyond reason.

This patch fixes that.

* nix/nix-daemon/nix-daemon.cc (handleSignal, setTerminationSignalHandler):
New functions.
(processConnection): Call it.

Reported-by: Christopher Baines &lt;mail@cbaines.net&gt;
Change-Id: I07e510a1242e92b6a629d60eb840e029c0f921be
</content>
</entry>
<entry>
<title>daemon: Implement ‘substitute-urls’ RPC.</title>
<updated>2023-12-11T22:18:53Z</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2023-11-10T20:37:28Z</published>
<link rel='alternate' type='text/html' href='https://git.koszko.org/guix/commit/?id=1e47148f46e31eb99ce8ec7bc12232cf50d0ebec'/>
<id>urn:sha1:1e47148f46e31eb99ce8ec7bc12232cf50d0ebec</id>
<content type='text'>
* nix/libstore/worker-protocol.hh (PROTOCOL_VERSION): Bump.
(WorkerOp): Add ‘wopSubstituteURLs’.
* nix/nix-daemon/nix-daemon.cc (performOp): Implement it.
* guix/store.scm (%protocol-version): Bump.
(operation-id): Add ‘substitute-urls’.
(substitute-urls): New procedure.
* tests/store.scm ("substitute-urls, default")
("substitute-urls, client-specified URLs")
("substitute-urls, disabled"): New tests.

Change-Id: I2c0119500c3a1eecfa5ebf32463ffb0f173161de
</content>
</entry>
<entry>
<title>daemon: Support systemd-style socket activation.</title>
<updated>2022-04-14T12:48:20Z</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2022-04-09T09:02:33Z</published>
<link rel='alternate' type='text/html' href='https://git.koszko.org/guix/commit/?id=5f74169e8e03e64a15499866c6a6de9f38d36f2d'/>
<id>urn:sha1:5f74169e8e03e64a15499866c6a6de9f38d36f2d</id>
<content type='text'>
* nix/nix-daemon/guix-daemon.cc (SD_LISTEN_FDS_START): New macro.
(systemd_activation_sockets): New function.
(main): Use it.  Remove obsolete 'printMsg' call.
* doc/guix.texi (Invoking guix-daemon): Document socket activation.
</content>
</entry>
<entry>
<title>daemon: Remove dead code.</title>
<updated>2021-04-03T20:08:33Z</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2021-04-03T19:35:51Z</published>
<link rel='alternate' type='text/html' href='https://git.koszko.org/guix/commit/?id=222fff253c6c6a3d1def16ed90723d7f2c4f9b89'/>
<id>urn:sha1:222fff253c6c6a3d1def16ed90723d7f2c4f9b89</id>
<content type='text'>
Reported by Noisytoot on #guix.

* nix/nix-daemon/shared.hh (showManPage): Remove.
* nix/nix-daemon/nix-daemon.cc (printHelp, programId): Remove.
</content>
</entry>
<entry>
<title>daemon: Correctly handle '--discover' with no value.</title>
<updated>2021-03-17T11:03:23Z</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2021-03-16T21:34:57Z</published>
<link rel='alternate' type='text/html' href='https://git.koszko.org/guix/commit/?id=bc3896db25c788c181c7bcd65754e7cd378e9d9f'/>
<id>urn:sha1:bc3896db25c788c181c7bcd65754e7cd378e9d9f</id>
<content type='text'>
Previously, we'd get:

  $ guix-daemon --discover
  error: basic_string::_M_construct null not valid

* nix/nix-daemon/guix-daemon.cc (parse_opt): Change second argument to
'settings.set' to properly handle case where ARG is NULL.
</content>
</entry>
<entry>
<title>Use substitute servers on the local network.</title>
<updated>2020-11-29T14:08:26Z</updated>
<author>
<name>Mathieu Othacehe</name>
<email>othacehe@gnu.org</email>
</author>
<published>2020-11-24T13:05:21Z</published>
<link rel='alternate' type='text/html' href='https://git.koszko.org/guix/commit/?id=79f9dee3c4c0e6d21066f142116a537207ae7ba4'/>
<id>urn:sha1:79f9dee3c4c0e6d21066f142116a537207ae7ba4</id>
<content type='text'>
* guix/scripts/discover.scm: New file.
* Makefile.am (MODULES): Add it.
* nix/nix-daemon/guix-daemon.cc (options): Add "discover" option,
(parse-opt): parse it,
(main): start "guix discover" process when the option is set.
* guix/scripts/substitute.scm (%local-substitute-urls): New variable,
(substitute-urls): add it.
* gnu/services/base.scm (&lt;guix-configuration&gt;): Add "discover?"
field,
(guix-shepherd-service): honor it.
* doc/guix.texi (Invoking guix-daemon): Document "discover" option,
(Base Services): ditto.
</content>
</entry>
<entry>
<title>guix build, daemon: Rename "--no-build-hook" to "--no-offload".</title>
<updated>2019-11-25T23:16:36Z</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2019-11-21T14:14:33Z</published>
<link rel='alternate' type='text/html' href='https://git.koszko.org/guix/commit/?id=dc209d5a5ddba4320c9a4f893d6df4b70f3685a0'/>
<id>urn:sha1:dc209d5a5ddba4320c9a4f893d6df4b70f3685a0</id>
<content type='text'>
This is a followup to bc69ea2d605810cc32e13ed03d5848b8dc358b61.

* guix/scripts/build.scm (show-build-options-help): Rename
"--no-build-hook" to "--no-offload".
(%standard-build-options): Likewise, and warn when "--no-build-hook" is
passed.
* nix/nix-daemon/guix-daemon.cc (options): Add "--no-offload" and mark
"--no-build-hook" as hidden.
* guix/scripts/offload.scm: Adjust comment.
* doc/guix.texi (Invoking guix-daemon, Common Build Options): Replace
"--no-build-hook" with "--no-offload".
* etc/completion/fish/guix.fish, etc/completion/zsh/_guix: Adjust
accordingly.
</content>
</entry>
<entry>
<title>daemon: Make 'profiles/per-user' non-world-writable.</title>
<updated>2019-10-16T20:53:40Z</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2019-10-16T09:51:42Z</published>
<link rel='alternate' type='text/html' href='https://git.koszko.org/guix/commit/?id=81c580c8664bfeeb767e2c47ea343004e88223c7'/>
<id>urn:sha1:81c580c8664bfeeb767e2c47ea343004e88223c7</id>
<content type='text'>
Fixes &lt;https://bugs.gnu.org/37744&gt;.
Reported at &lt;https://www.openwall.com/lists/oss-security/2019/10/09/4&gt;.

Based on Nix commit 5a303093dcae1e5ce9212616ef18f2ca51020b0d
by Eelco Dolstra &lt;edolstra@gmail.com&gt;.

* nix/libstore/local-store.cc (LocalStore::LocalStore): Set 'perUserDir'
to #o755 instead of #o1777.
(LocalStore::createUser): New function.
* nix/libstore/local-store.hh (LocalStore): Add it.
* nix/libstore/store-api.hh (StoreAPI): Add it.
* nix/nix-daemon/nix-daemon.cc (performOp): In 'wopSetOptions', add
condition to handle "user-name" property and honor it.
(processConnection): Add 'userId' parameter.  Call 'store-&gt;createUser'
when userId is not -1.
* guix/profiles.scm (ensure-profile-directory): Note that this is now
handled by the daemon.
* guix/store.scm (current-user-name): New procedure.
(set-build-options): Add #:user-name parameter and pass it to the daemon.
* tests/guix-daemon.sh: Test the creation of 'profiles/per-user' when
listening on a TCP socket.
* tests/store.scm ("profiles/per-user exists and is not writable")
("profiles/per-user/$USER exists"): New tests.
</content>
</entry>
<entry>
<title>daemon: Include 'config.h' in 'nix-daemon.cc'.</title>
<updated>2019-09-17T03:54:58Z</updated>
<author>
<name>Timothy Sample</name>
<email>samplet@ngyro.com</email>
</author>
<published>2019-09-12T04:50:54Z</published>
<link rel='alternate' type='text/html' href='https://git.koszko.org/guix/commit/?id=82c4ad9646aa65f96a809d089f318680126d8b39'/>
<id>urn:sha1:82c4ad9646aa65f96a809d089f318680126d8b39</id>
<content type='text'>
* nix/nix-daemon/nix-daemon.cc: Include 'config.h'.
</content>
</entry>
<entry>
<title>daemon: Run 'guix substitute' directly and assume a single substituter.</title>
<updated>2019-09-08T09:49:24Z</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2019-09-04T09:04:44Z</published>
<link rel='alternate' type='text/html' href='https://git.koszko.org/guix/commit/?id=f6919ebdc6b0ce0286814cc6ab0564b1a4c67f5f'/>
<id>urn:sha1:f6919ebdc6b0ce0286814cc6ab0564b1a4c67f5f</id>
<content type='text'>
The daemon had a mechanism that allows it to handle a list of
substituters and try them sequentially; this removes it.

* nix/scripts/substitute.in: Remove.
* nix/local.mk (nodist_pkglibexec_SCRIPTS): Remove.
* config-daemon.ac: Don't output 'nix/scripts/substitute'.
* nix/libstore/build.cc (SubstitutionGoal)[subs, sub, hasSubstitute]:
Remove.
[tryNext]: Make private.
(SubstitutionGoal::SubstitutionGoal, SubstitutionGoal::init): Remove now
unneeded initializers.
(SubstitutionGoal::tryNext): Adjust to assume a single substituter: call
'amDone' upfront when we couldn't find substitutes.
(SubstitutionGoal::tryToRun): Adjust to run 'guix substitute' via
'settings.guixProgram'.
(SubstitutionGoal::finished): Call 'amDone(ecFailed)' upon failure
instead of setting 'state' to 'tryNext'.
* nix/libstore/globals.hh (Settings)[substituters]: Remove.
* nix/libstore/local-store.cc (LocalStore::~LocalStore): Adjust to
handle a single substituter.
(LocalStore::startSubstituter): Remove 'path' parameter.  Adjust to
invoke 'settings.guixProgram'.  Don't refer to 'run.program', which no
longer exists.
(LocalStore::querySubstitutablePaths): Adjust for 'runningSubstituters'
being a singleton instead of a list.
(LocalStore::querySubstitutablePathInfos): Likewise, and remove
'substituter' parameter.
* nix/libstore/local-store.hh (RunningSubstituter)[program]: Remove.
(LocalStore)[runningSubstituters]: Remove.
[runningSubstituter]: New field.
[querySubstitutablePathInfos]: Remove 'substituter' parameter.
[startSubstituter]: Remove 'substituter' parameter.
* nix/nix-daemon/guix-daemon.cc (main): Remove references to
'settings.substituters'.
* nix/nix-daemon/nix-daemon.cc (performOp): Ignore the user's
"build-use-substitutes" value when 'settings.useSubstitutes' is false.
</content>
</entry>
</feed>
