[bug#37302,0/7] Remove the daemon's libexec helpers
mbox series

Message ID 20190904101935.16003-1-ludo@gnu.org
Headers show
Series
  • Remove the daemon's libexec helpers
Related show

Message

Ludovic Courtès Sept. 4, 2019, 10:19 a.m. UTC
Hello Guix!

These patches change the daemon so that it invokes ‘guix substitute’,
‘guix authenticate’, etc. directly, instead of invoking the shell
trampolines under libexec/.

This simplifies things a bit, gets rid of the extra Bash invocation,
which in turn makes sure that we don’t get locale warnings from
Bash, should that happen.  :-)

Initially the libexec trampolines were created primarily so that the
C++ code would remain as close as possible to upstream Nix.  The cost
of this strategy have come to outweigh the benefits, so here we go!

The next step will be to adjust the ‘guix’ and ‘guix-daemon’ packages
accordingly.

Feedback welcome!

Ludo’.

Ludovic Courtès (7):
  daemon: Invoke 'guix gc --list-busy' instead of 'list-runtime-roots'.
  daemon: Run 'guix authenticate' directly.
  daemon: Run 'guix perform-download' directly.
  daemon: Run 'guix offload' directly.
  daemon: Run 'guix substitute' directly and assume a single
    substituter.
  daemon: Remove 'NIX_LIBEXEC_DIR'.
  etc: Remove references to libexec/guix* from SELinux policy.

 build-aux/pre-inst-env.in         |  14 +--
 config-daemon.ac                  |  11 ---
 doc/guix.texi                     |   4 +
 etc/guix-daemon.cil.in            |   4 -
 guix/scripts/gc.scm               |  15 +++
 guix/store/roots.scm              | 129 +++++++++++++++++++++++++-
 nix/libstore/build.cc             |  63 +++++--------
 nix/libstore/builtins.cc          |   4 +-
 nix/libstore/gc.cc                |  11 +--
 nix/libstore/globals.cc           |   2 +-
 nix/libstore/globals.hh           |  11 +--
 nix/libstore/local-store.cc       | 102 ++++++++++++---------
 nix/libstore/local-store.hh       |  12 +--
 nix/local.mk                      |  16 ----
 nix/nix-daemon/guix-daemon.cc     |  20 +---
 nix/nix-daemon/nix-daemon.cc      |  16 +++-
 nix/scripts/authenticate.in       |  11 ---
 nix/scripts/download.in           |  11 ---
 nix/scripts/list-runtime-roots.in | 147 ------------------------------
 nix/scripts/offload.in            |  11 ---
 nix/scripts/substitute.in         |  11 ---
 21 files changed, 260 insertions(+), 365 deletions(-)
 delete mode 100644 nix/scripts/authenticate.in
 delete mode 100644 nix/scripts/download.in
 delete mode 100644 nix/scripts/list-runtime-roots.in
 delete mode 100644 nix/scripts/offload.in
 delete mode 100644 nix/scripts/substitute.in

Comments

Ludovic Courtès Sept. 8, 2019, 10:03 a.m. UTC | #1
Ludovic Courtès <ludo@gnu.org> skribis:

>   daemon: Invoke 'guix gc --list-busy' instead of 'list-runtime-roots'.
>   daemon: Run 'guix authenticate' directly.
>   daemon: Run 'guix perform-download' directly.
>   daemon: Run 'guix offload' directly.
>   daemon: Run 'guix substitute' directly and assume a single
>     substituter.
>   daemon: Remove 'NIX_LIBEXEC_DIR'.
>   etc: Remove references to libexec/guix* from SELinux policy.

Pushed at cc98b00857e29074de96a6ed60e325cdfffaea1a.

Now to adjust ‘guix-daemon’ accordingly…

Ludo’.