Age | Commit message (Expand) | Author |
2014-02-06 | daemon: Add '--gc-keep-outputs' and '--gc-keep-derivations'....* nix/nix-daemon/guix-daemon.cc (GUIX_OPT_GC_KEEP_OUTPUTS,
GUIX_OPT_GC_KEEP_DERIVATIONS): New macros.
(options): Add 'gc-keep-outputs' and 'gc-keep-derivations'.
(string_to_bool): New function.
(parse_opt): Honor GUIX_OPT_GC_KEEP_DERIVATIONS and
GUIX_OPT_GC_KEEP_OUTPUTS.
* doc/guix.texi (Invoking guix-daemon): Document --gc-keep-outputs and
--gc-keep-derivations.
| Ludovic Courtès |
2014-01-24 | Add 'guix offload' as a daemon build hook....* nix/nix-daemon/guix-daemon.cc (GUIX_OPT_NO_BUILD_HOOK): New macro.
(options): Add '--no-build-hook'.
(parse_opt): Handle it.
(main)[HAVE_DAEMON_OFFLOAD_HOOK]: Set 'useBuildHook' by default.
Set $NIX_BUILD_HOOK to our offload hook unless otherwise specified.
[!HAVE_DAEMON_OFFLOAD_HOOK]: Clear 'useBuildHook'.
* pre-inst-env.in: Set and export NIX_BUILD_HOOK.
* nix/scripts/offload.in, guix/scripts/offload.scm: New files.
* guix/ui.scm (show-guix-help)[internal?]: Add "offload".
* config-daemon.ac: Call 'GUIX_CHECK_UNBUFFERED_CBIP'.
Instantiate 'nix/scripts/offload'. Set 'BUILD_DAEMON_OFFLOAD'
conditional, and optionally define 'HAVE_DEAMON_OFFLOAD_HOOK' cpp
macro.
* daemon.am (nodist_pkglibexec_SCRIPTS)[BUILD_DAEMON_OFFLOAD]: Add it.
* Makefile.am (MODULES)[BUILD_DAEMON_OFFLOAD]: Add
'guix/scripts/offload.scm'.
(EXTRA_DIST)[!BUILD_DAEMON_OFFLOAD]: Likewise.
* m4/guix.m4 (GUIX_CHECK_UNBUFFERED_CBIP): New macro.
* doc/guix.texi (Setting Up the Daemon): Move most of the body to...
(Build Environment Setup): ... this. New subsection.
(Daemon Offload Setup): New subsection.
| Ludovic Courtès |
2014-01-24 | guix-register: Support registration in the current store, without '--prefix'....* nix/guix-register/guix-register.cc (register_validity): Leave
'info.path' unmodified when PREFIX is empty.
(main): Call 'settings.processEnvironment' early on.
Leave 'settings.nixStore' unmodified when PREFIX is empty.
| Ludovic Courtès |
2013-12-20 | daemon: Implement signed archive import/export....* guix/scripts/authenticate.scm, nix/scripts/guix-authenticate.in,
tests/signing-key.pub, tests/signing-key.sec: New files.
* po/POTFILES.in: Add 'guix/scripts/authenticate.scm'.
* guix/store.scm (dump-port): New procedure.
(process-stderr): Add 'user-port' optional parameter. Handle
the %STDERR-WRITE and %STDERR-READ cases as expected.
(import-paths, export-path, export-paths): New procedures.
* tests/store.scm ("export/import several paths", "import corrupt
path"): New tests.
* Makefile.am (MODULES): Add 'guix/scripts/authenticate.scm'.
(EXTRA_DIST): Add 'tests/signing-key.{pub,sec}'.
* daemon.am (libstore_a_CPPFLAGS)[-DNIX_CONF_DIR]: Change 'NIX_CONF_DIR'
to .../guix. Change 'OPENSSL_PATH' to 'guix-authenticate'.
* config-daemon.ac: Instantiate 'nix/scripts/guix-authenticate'.
* nix/nix-daemon/guix-daemon.cc (main): Augment $PATH to include
'settings.nixLibexecDir'.
* test-env.in: Export 'NIX_CONF_DIR' and 'NIX_LIBEXEC_DIR'. Populate
$NIX_CONF_DIR.
| Ludovic Courtès |
2013-12-19 | sync-with-upstream: Work around limitation of dash....Reported by Andreas Enge <andreas@enge.fr>.
* nix/sync-with-upstream: Expand use of {cc,hh}, to placate dash.
| Ludovic Courtès |
2013-12-19 | daemon: Fix 'HashSink::currentHash()'....Before that, calls to 'HashSink::currentHash()' would eventually lead to
a segfault because the underlying gcrypt handle has been closed. (Note
that this method is only used via 'importPaths' and 'exportPath', though.)
* nix/libutil/gcrypt-hash.hh (struct guix_hash_context): Add a
constructor and a copy constructor; move out of 'extern "C"'.
* nix/libutil/gcrypt-hash.cc (guix_hash_final): Clear 'md_handle' upon
exit.
* nix/sync-with-upstream (top_srcdir): Change hash.{cc,hh} to read
'struct Ctx' instead of 'union Ctx'.
| Ludovic Courtès |
2013-12-19 | daemon: Add libgcrypt call to state that the initialization is over....* nix/nix-daemon/guix-daemon.cc (main): Add 'gcry_control' call.
| Ludovic Courtès |
2013-10-29 | list-runtime-roots: List files referenced by environment variables....Inspired by <https://github.com/NixOS/nix/compare/772b70952f75...4ddd077bfa9a>.
* nix/scripts/list-runtime-roots.in (%store-directory): New variable.
(proc-environ-roots): New procedure.
(<top-level>): Use it.
| Ludovic Courtès |
2013-10-10 | daemon: Set the umask to 022 when starting....* nix/nix-daemon/guix-daemon.cc (main): Add 'umask' call.
* test-env.in: Remove use of 'umask'.
| Ludovic Courtès |
2013-09-24 | guix-register: Allow the initial directory creation to proceed....This fixes a bug whereby 'guix-register' would bail out when trying to
create NIX_STORE_DIR/.links when NIX_STORE_DIR is read-only.
* nix/guix-register/guix-register.cc (parse_opt): Initialize
'settings.nixStore' to PREFIX + NIX_STORE_DIR.
(main): Change 'settings.nixStore' once the 'LocalStore' has been
instantiated.
| Ludovic Courtès |
2013-09-23 | guix-register: Expect closures to refer to the original store....* nix/guix-register/guix-register.cc (prefix): New variable.
(parse_opt): Use it.
(register_validity): Change 'info.path' to the final store name.
Hash the final under its real path.
* tests/guix-register.sh: Adjust the contents of $closure accordingly.
Rename 'NIX_LOCALSTATE_DIR' to 'NIX_STATE_DIR'. Don't try to call
'valid-path?'. Add test using 'sqlite3'.
| Ludovic Courtès |
2013-09-23 | Add 'guix-register'....* nix/guix-register/guix-register.cc, tests/guix-register.sh: New
files.
* Makefile.am (SH_TESTS)[BUILD_DAEMON]: Add tests/guix-register.sh.
* daemon.am (sbin_PROGRAMS, guix_register_SOURCES,
guix_register_CPPFLAGS, guix_register_LDADD): New variables.
* test-env.in: Export 'storedir', 'prefix', 'datarootdir', 'datadir',
and 'localstatedir'.
| Ludovic Courtès |
2013-09-12 | daemon: Use 'int' instead of the internal 'gcry_md_algo_t' type....Fixes compilation with the forthcoming libgcrypt 1.6.x.
Reported by Matthias Wachs <wachs@net.in.tum.de>
and NIIBE Yutaka <gniibe@fsij.org>.
* nix/libutil/gcrypt-hash.cc (guix_hash_init, guix_hash_final): Use
'int' as the type of the 'algo' parameter.
* nix/libutil/gcrypt-hash.hh: Update declarations accordingly.
| Ludovic Courtès |
2013-07-04 | daemon: Make argp usage compatible with libc on GNU/Hurd....* nix/nix-daemon/guix-daemon.cc (parse_opt): Cast return value to
`error_t' for the sake of GNU/Hurd.
Reported by Matthew Lien <bluet@bluet.org> at
<http://lists.gnu.org/archive/html/bug-guix/2013-07/msg00002.html>.
| Ludovic Courtès |
2013-06-18 | build: Fix `sync-with-upstream'....* nix/sync-with-upstream: Remove schema.sql.hh.
| Ludovic Courtès |
2013-04-18 | daemon: Add `--no-substitutes'....Suggested by Mark H. Weaver.
* nix/nix-daemon/guix-daemon.cc (GUIX_OPT_NO_SUBSTITUTES): New macro.
(options): Add `--no-substitutes'.
(parse_opt): Add `GUIX_OPT_NO_SUBSTITUTES' case.
(main): Leave `settings.substituters' empty when
`settings.useSubstitutes' is false.
| Ludovic Courtès |
2013-04-18 | daemon: Really enable the substituter by default....* nix/nix-daemon/guix-daemon.cc (main): Really enable the substituter by
default. Reported by Mark H. Weaver.
| Ludovic Courtès |
2013-04-03 | Add preliminary binary substituter....* guix/scripts/substitute-binary.scm: New file.
* Makefile.am (MODULES): Add it.
* nix/scripts/substitute-binary.in: New file.
* config-daemon.ac: Produce nix/scripts/substitute-binary.
* daemon.am (nodist_pkglibexec_SCRIPTS): Add
nix/scripts/substitute-binary.
* guix/store.scm (substitutable-path-info): Use the
`query-substitutable-path-infos' RPC.
* nix/nix-daemon/guix-daemon.cc (main): Honor `NIX_SUBSTITUTERS'.
* pre-inst-env.in: Set `NIX_SUBSTITUTERS'.
* test-env.in: Leave `NIX_SUBSTITUTERS' unchanged. Set
`GUIX_BINARY_SUBSTITUTE_URL, and create
$NIX_STATE_DIR/substituter-data.
Run `guix-daemon' within `./pre-inst-env'.
* tests/store.scm ("substitute query"): New test.
| Ludovic Courtès |
2013-02-19 | daemon: Add `--listen'....* nix/nix-daemon/guix-daemon.cc (GUIX_OPT_LISTEN): New macro.
(options): Add `--listen'.
(parse_opt): Handle it.
* doc/guix.texi (Invoking guix-daemon): Mention it.
| Ludovic Courtès |
2013-01-11 | Merge branch 'core-updates'...Conflicts:
guix/build/union.scm
| Ludovic Courtès |
2013-01-09 | daemon: Fix warning message when running as root without a build user group....* nix/nix-daemon/guix-daemon.cc (main): Fix warning message when running
as root without `--build-users-group'.
| Ludovic Courtès |
2013-01-09 | guix-daemon: Rename `--build-cores' for consistency with `guix-build'....* nix/nix-daemon/guix-daemon.cc (options): Change `--build-cores' to
`--cores', and `-C' to `-c'.
(parse_opt): Adjust accordingly.
| Ludovic Courtès |
2013-01-06 | Update a few more license headers....* distro/packages/openssl.scm, m4/guix.m4, nix/sync-with-upstream:
Update headers.
| Ludovic Courtès |
2013-01-06 | Update license headers....Change all license headers, except guix/build/* and ld-wrapper.scm, with
this code:
(use-modules (guix build utils)
(srfi srfi-1))
(fluid-set! %default-port-encoding "UTF-8")
(substitute* (remove (lambda (f)
(or (string-contains f ".tar.")
(string-contains f ".git/")
(string-contains f ".so")
(string-suffix? ".o" f)
(string-suffix? ".a" f)
(string-suffix? ".go" f)
(string-suffix? ".pdf" f)
(string-suffix? ".png" f)
(string-suffix? ".info" f)
(equal? (basename f) "guix-daemon")
(equal? (basename f) "nix-setuid-helper")
(string-contains f "nix-upstream/")
(string-contains f "distro/packages/bootstrap/")))
(find-files "." "\\.[a-z]+$"))
(("^([[:graph:]]+) This file is part of Guix." _ comment-start)
(string-append comment-start " This file is part of GNU Guix."))
(("^([[:graph:]]+) Guix --- Nix package management.*" _ comment-start)
(string-append comment-start
" GNU Guix --- Functional package management for GNU\n"))
(("^([[:graph:]]+) Guix is " _ comment-start)
(string-append comment-start " GNU Guix is "))
(("^([[:graph:]]+) along with Guix." _ comment-start)
(string-append comment-start " along with GNU Guix."))
(("^([[:graph:]]+) Copyright \\(C\\)" _ comment-start)
(string-append comment-start " Copyright ©")))
Change headers using C-style comments manually.
| Ludovic Courtès |
2013-01-02 | daemon: Show the chroot contents upon `--debug'....* nix/nix-daemon/guix-daemon.cc (main)[HAVE_CHROOT]: Display the
contents of `settings.dirsInChroot' at `lvlDebug'.
| Ludovic Courtès |
2013-01-02 | daemon: Properly initialize libgcrypt....* nix/nix-daemon/guix-daemon.cc (main): Call `gcry_check_version'.
| Ludovic Courtès |
2012-12-16 | daemon: Gracefully handle Nix errors....* nix/nix-daemon/guix-daemon.cc (main): Run Nix code in an exception
handler; gracefully print error messages, and exit with EXIT_FAILURE.
| Ludovic Courtès |
2012-12-16 | daemon: Warn against running as root without `--build-users-group'....* nix/nix-daemon/guix-daemon.cc (main): Recommend using
`--build-users-group' when running as root without a build users
group.
| Ludovic Courtès |
2012-12-16 | daemon: Add `--chroot-directory'....* nix/nix-daemon/guix-daemon.cc (GUIX_OPT_CHROOT_DIR): New macro.
(options): Add `--chroot-directory'.
(parse_opt): Handle it.
| Ludovic Courtès |
2012-12-15 | daemon: Add `--debug' option....* nix/nix-daemon/guix-daemon.cc (GUIX_OPT_DEBUG): New macro.
(options): Add `--debug'.
(parse_opt): Set `verbosity' upon GUIX_OPT_DEBUG.
| Ludovic Courtès |
2012-12-14 | daemon: Disable use of substitutes for now....* nix/nix-daemon/guix-daemon.cc (main): Set `settings.useSubstitutes' to
false, and `settings.substituters' to the empty list.
| Ludovic Courtès |
2012-12-14 | build: Avoid brace expansion in `nix/sync-with-upstream'....* nix/sync-with-upstream: Avoid brace expansion, for the sake of Dash.
| Andreas Enge |
2012-12-06 | daemon: Add more options....* nix/nix-daemon/guix-daemon.cc (GUIX_OPT_BUILD_USERS_GROUP,
GUIX_OPT_CACHE_FAILURES, GUIX_OPT_LOSE_LOGS,
GUIX_OPT_DISABLE_STORE_OPTIMIZATION, GUIX_OPT_IMPERSONATE_LINUX_26):
New macros.
(options)["build-users-group", "cache-failures", "lose-logs",
"disable-store-optimization", "impersonate-linux-2.6"]: New options.
(parse_opt): Handle them.
| Ludovic Courtès |
2012-12-05 | daemon: Add `list-runtime-roots' script....* nix/scripts/list-runtime-roots.in: New file.
* config-daemon.ac: Add `AC_CONFIG_FILES' invocation for it.
* daemon.am (nodist_pkglibexec_SCRIPTS): New variable.
(AM_TESTS_ENVIRONMENT): Define `top_builddir'.
* tests/guix-daemon.sh: Export `NIX_ROOT_FINDER'.
* nix/sync-with-upstream: Substitute the path to the root finder in
libstore/gc.cc.
| Ludovic Courtès |
2012-12-05 | daemon: Disable use of chroots when support is lacking....* nix/nix-daemon/guix-daemon.cc (options)[!HAVE_CHROOT]: Mention that
`--disable-chroot' has no effect.
(main)[!HAVE_CHROOT]: Set `useChroot' to false.
| Ludovic Courtès |
2012-12-04 | daemon: Fix typo in libgcrypt bindings....* nix/libutil/md5.h (MD5_Final): Pass RESBUF as the first argument to
`guix_hash_final'.
* nix/libutil/sha1.h (SHA1_Final): Likewise.
* nix/libutil/sha256.h (SHA256_Final): Likewise.
| Ludovic Courtès |
2012-12-03 | build: Add `bootstrap' and `sync-with-upstream' scripts....* bootstrap, nix/sync-with-upstream: New files.
* Makefile.am (EXTRA_DIST): Add `bootstrap'.
* daemon.am (EXTRA_DIST): Add `nix/sync-with-upstream'.
| Ludovic Courtès |
2012-12-03 | build: Include a copy of Nix's libstore and daemon; build it....* configure.ac: Call `AC_USE_SYSTEM_EXTENSIONS', and
`GUIX_SYSTEM_TYPE'. Add `--with-store-dir' option, and substitute
`storedir'. Include `config-daemon.ac'.
* config-daemon.ac: New file.
* Makefile.am [BUILD_DAEMON]: Include `daemon.am'.
* daemon.am: New file.
* m4/guix.m4 (GUIX_SYSTEM_TYPE): New macro.
* nix/libutil/gcrypt-hash.cc, nix/libutil/gcrypt-hash.hh,
nix/libutil/md5.h, nix/libutil/sha1.h, nix/libutil/sha256.h,
nix/nix-daemon/guix-daemon.cc, nix/nix-daemon/shared.hh: New files.
| Ludovic Courtès |