~ruther/guix-local

ref: a5f92ca04f017d2cd7d83ec0fe6a186cccf0ec9d guix-local/nix d---------
8ecc3c6c — Ludovic Courtès 9 years ago
daemon: Allow fixed-output derivation builds with TMPDIR set.

Fixes <http://bugs.gnu.org/25242>.
Reported by Leo Famulari <leo@famulari.name>.
The regression was introduced in 94d92c7796a3dd50c27d532315f7d497ac99f08e.

* nix/libstore/build.cc (DerivationGoal::startBuilder): Set 'useChroot'
as a function 'of isBuiltin(drv)'.
(DerivationGoal::runChild): Use 'useChroot' instead of
'useChroot && !isBuiltin(drv)'.
a81771f1 — Ludovic Courtès 9 years ago
build: Delete all the .service and .conf files upon 'make clean'.

* nix/local.mk (CLEANFILES): Define to add $(nodist_systemdservice_DATA)
and $(nodist_upstartjob_DATA).
b20644ed — Ludovic Courtès 9 years ago
build: Delete all the .service and .conf files upon 'make clean'.

* nix/local.mk (CLEANFILES): Define to add $(nodist_systemdservice_DATA)
and $(nodist_upstartjob_DATA).
5a5fc61f — Ludovic Courtès 9 years ago
build: Fix .service and .conf targets for VPATH builds.

* nix/local.mk (etc/guix-%.service, etc/guix-%.conf): Use "$<", not
"$(srcdir)/$<".
fa54f44b — Ludovic Courtès 9 years ago
build: Add 'guix-publish.*.in' to the distribution.

This is a followup to 332d7903f52c2bf3741b04ac2d01cd9018b70800.

* nix/local.mk (EXTRA_DIST): Add 'guix-service.publish.in' and
'guix-publish.conf.in'.
f80b4d2c — Ludovic Courtès 9 years ago
Merge remote-tracking branch 'origin/master' into staging
2608e409 — Hartmut Goebel 9 years ago
daemon: Set ownership of kept build directories to the calling user.

Fixes <http://bugs.gnu.org/15890>.

* nix/libstore/globals.hh (Settings) Add clientUid and clientGid.
* nix/nix-daemon/nix-daemon.cc (daemonLoop] Store UID and GID of the
  caller in settings.
* nix/libstore/build.cc (_chown): New function.
  (DerivationGoal::deleteTmpDir): Use it, change ownership of build
  directory if it is kept and the new owner is not root.
638ccde1 — Ludovic Courtès 9 years ago
daemon: Fix invalid Boost format string.

* nix/libstore/optimise-store.cc (LocalStore::optimisePath_): Use %3%
instead of %m, the latter being an invalid Boost format specifier.
a351fc83 — Marius Bakke 9 years ago
Merge branch 'master' into staging
9a8f9f84 — Ludovic Courtès 9 years ago
daemon: Buffer data sent to clients by the 'export-path' RPC.

Before that we'd have STDERR_WRITE round trips for very small amounts of
data, ranging from a few bytes for the metadata of nars to the size of
one file being exported.

With this change, something like:

  guix archive --export /gnu/store/5rrsbaghh5ix1vjcicsl60gsxilhjnf2-coreutils-8.25 | dd of=/dev/null

reports a throughput of 35 MB/s instead of 25 MB/s before.

* nix/nix-daemon/nix-daemon.cc (TunnelSink): Inherit from 'BufferedSink'
rather than 'Sink'.  Rename 'operator ()' to 'write'.
(performOp) <wopExportPath>: Add 'sink.flush' call.
8a7cbc88 — Marius Bakke 9 years ago
Merge branch 'master' into staging
de32aa74 — Leo Famulari 9 years ago
Merge branch 'master' into python-build-system
332d7903 — Hartmut Goebel 9 years ago
Add system start-up files for "guix publish".

* .gitignore: add etc/guix-publish.conf and /etc/guix-publish.service.
* etc/guix-publish.conf.in: New file.
* etc/guix-publish.service.in: New file.
* nix/local.mk (etc/guix-%.service, etc/guix-%.conf): Generalized former
  build-rules for by using patterns.
  (nodist_systemdservice_DATA): Add etc/guix-publish.service, update
  comment.
  (nodist_upstartjob_DATA): Add etc/guix-publish.conf, update comment.
* doc/guix.texi (Invoking guix publish): Add description for enabling
  "guix publish" on host distros using the new files.
2ac7d546 — Leo Famulari 9 years ago
Merge branch 'master' into staging
f9aefa2d — Ludovic Courtès 9 years ago
daemon: Add 'built-in-builders' RPC.

* nix/libstore/builtins.cc (builtinBuilderNames): New function.
* nix/libstore/builtins.hh (builtinBuilderNames): New declaration.
* nix/libstore/worker-protocol.hh (PROTOCOL_VERSION): Bump to 0x160.
(WorkerOp)[wopBuiltinBuilders]: New value.
* nix/nix-daemon/nix-daemon.cc (performOp): Handle it.
* guix/store.scm (operation-id)[built-in-builders]: New value.
* guix/store.scm (read-arg): Add 'string-list'.
(built-in-builders): New procedure.
* tests/derivations.scm ("built-in-builders"): New test.
94d92c77 — Ludovic Courtès 10 years ago
daemon: Add "builtin:download" derivation builder.

This ensures that 1) the derivation doesn't change when Guix changes;
2) the derivation closure doesn't contain Guix and its dependencies; 3)
we don't have to rely on ugly chroot hacks.

Adapted from Nix commit 0a2bee307b20411f5b0dda0c662b1f9bb9e0e131.

* nix/libstore/build.cc (DerivationGoal::runChild): Add special case for
'isBuiltin(drv)'.  Disable chroot when 'isBuiltin(drv)'.
* nix/libstore/builtins.cc, nix/libstore/builtins.hh,
nix/scripts/download.in, guix/scripts/perform-download.scm: New files.
* guix/ui.scm (show-guix-help)[internal?]: Add 'perform-download'.
* nix/local.mk (libstore_a_SOURCES): Add builtins.cc.
(libstore_headers): Add builtins.hh.
(nodist_pkglibexec_SCRIPTS): Add 'scripts/download'.
* config-daemon.ac: Emit 'scripts/download'.
* Makefile.am (MODULES): Add 'guix/scripts/perform-download.scm'.
* tests/derivations.scm ("unknown built-in builder")
("'download' built-in builder")
("'download' built-in builder, invalid hash")
("'download' built-in builder, not found")
("'download' built-in builder, not fixed-output"): New tests.

Co-authored-by: Eelco Dolstra <eelco.dolstra@logicblox.com>
062c7e43 — Leo Famulari 9 years ago
Merge branch 'master' into core-updates
12b6c951 — Ludovic Courtès 9 years ago
daemon: Do not error out when deduplication fails due to ENOSPC.

This solves a problem whereby if /gnu/store/.links had enough entries,
ext4's directory index would be full, leading to link(2) returning
ENOSPC.

* nix/libstore/optimise-store.cc (LocalStore::optimisePath_): Upon
ENOSPC from link(2), print a message and return instead of throwing a
'SysError'.
b1fd0ab7 — Eelco Dolstra 10 years ago
daemon: Improve the SQLite wrapper API.

In particular, this eliminates a bunch of boilerplate code.

Also integrates these Nix commits:

  80da7a6 Probably fix SQLITE_BUSY errors
  37a337b throwSQLiteError(): Check for SIGINT so we don't loop forever

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
7bed5d91 — Eelco Dolstra 10 years ago
daemon: Factor out SQLite handling.

* nix/libstore/local-store.cc: Move SQLite code to...
* nix/libstore/sqlite.cc, nix/libstore/sqlite.hh: ... here.  New files.
* nix/local.mk (libstore_a_SOURCES): Add sqlite.cc.
(libstore_headers): Add sqlite.hh.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
Next