summaryrefslogtreecommitdiff
path: root/guix
AgeCommit message (Collapse)Author
2014-01-25derivations: Add #:local-build? parameter for derivations.Ludovic Courtès
* guix/derivations.scm (derivation): Add #:local-build? parameter and honor it. (build-expression->derivation): Likewise. * doc/guix.texi (Derivations): Update documentation of these procedures.
2014-01-25profiles: Remove misleading message.Ludovic Courtès
Fixes <http://bugs.gnu.org/16484>. Reported by Andreas Enge <andreas@enge.fr>. * guix/profiles.scm (profile-derivation)[builder]: Remove "building profile '~a' with ~a packages" message.
2014-01-24Add 'guix offload' as a daemon build hook.Ludovic Courtès
* 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.
2014-01-24store: Add 'topologically-sorted'.Ludovic Courtès
* guix/store.scm (topologically-sorted): New procedure. * tests/store.scm ("topologically-sorted, one item", "topologically-sorted, several items", "topologically-sorted, more difficult"): New tests.
2014-01-24nar: Add 'restore-file-set', for use by build hooks.Ludovic Courtès
* guix/nar.scm (&nar-invalid-hash-error, &nar-signature-error): New condition types. (&nar-error): Add 'file' and 'port' fields. (&nar-read-error): Remove 'port' and 'file' fields. (lock-store-file, unlock-store-file, finalize-store-file, temporary-store-directory, restore-file-set): New procedures. * tests/nar.scm (%seed): New variable. (random-text): New procedure. ("restore-file-set (signed, valid)", "restore-file-set (missing signature)", "restore-file-set (corrupt)"): New tests. * po/Makevars (XGETTEXT_OPTIONS): Add '--keyword=message'.nar fixes * po/POTFILES.in: Add guix/nar.scm.
2014-01-24store: Add 'with-store' convenience macro.Ludovic Courtès
* guix/store.scm (with-store): New macro.
2014-01-24hash: Add 'open-sha256-input-port', for Guile > 2.0.9.Ludovic Courtès
* guix/hash.scm (open-sha256-input-port): New procedure. * tests/hash.scm (supports-unbuffered-cbip?): New procedure. ("open-sha256-input-port, empty", "open-sha256-input-port, hello", "open-sha256-input-port, hello, one two", "open-sha256-input-port, hello, read from wrapped port"): New tests.
2014-01-24pki: Factorize signature manipulation procedures.Ludovic Courtès
* guix/pki.scm (signature-subject, signature-signed-data, valid-signature?): New procedures. * guix/scripts/authenticate.scm (guix-authenticate): Adjust to use them.
2014-01-24utils: Add 'fcntl-flock'.Ludovic Courtès
* guix/utils.scm (%struct-flock, F_SETLKW, F_xxLCK): New variables. (fcntl-flock): New procedure. * tests/utils.scm ("fcntl-flock"): New test.
2014-01-24store: Add 'register-path' procedure.Ludovic Courtès
* guix/store.scm (register-path): New procedure. * tests/store.scm ("register-path"): New test. * guix/config.scm.in (%guix-register-program): New variable. * configure.ac: Compute and substitute 'guix_sbindir'. Compute 'guix_prefix'. * pre-inst-env.in: Define 'GUIX_REGISTER'.
2014-01-24store: Add comments for the %stderr constants.Ludovic Courtès
* guix/store.scm (process-stderr): Add comments for the various constants, to help when stracing.
2014-01-24ui: Filter out internal commands from '--help'.Ludovic Courtès
* guix/ui.scm (show-guix-help)[internal?]: New procedure. Use it to filter out internal commands reported by '--help'.
2014-01-22licenses: Add GNU FDL 1.3+.Ludovic Courtès
* guix/licenses.scm (fdl1.3+): New variable.
2014-01-18Update 'nix-upstream' sub-module; adjust build system, doc, and substituter.Ludovic Courtès
* nix-upstream: Update sub-module. * daemon.am (libutil_a_SOURCES): Add affinity.cc. (libutil_headers): Add affinity.hh. (libexec_PROGRAMS, nix_setuid_helper_SOURCES, nix_setuid_helper_CPPFLAGS, nix_setuid_helper_LDADD): Remove. * doc/guix.texi (Setting Up the Daemon): Remove paragraph about 'nix-setuid-helper'. * guix/scripts/substitute-binary.scm (guix-substitute-binary): Exit 0 when %CACHE-URL has an HTTP scheme and looking up its host fails. Always print a newline to stdout when starting.
2014-01-18linux-initrd: Make /dev/{null,zero} world-writable.Ludovic Courtès
Reported by zerwas on #guix. * guix/build/linux-initrd.scm (make-essential-device-nodes): Make /dev/null and /dev/zero world-writable.
2014-01-17ui: Update copyright year in '--version' output.Ludovic Courtès
* guix/ui.scm (show-version-and-exit): Increment copyright year.
2014-01-13guix package: Gracefully handle EPIPE on '--search'.Ludovic Courtès
* guix/scripts/package.scm (guix-package): Wrap body of 'search' in 'leave-on-EPIPE'.
2014-01-13ui: Don't use hyphens in 'package->recutils' output.Ludovic Courtès
* guix/ui.scm (package->recutils): Rename recutils field from 'home-page' to 'homepage'.
2014-01-08config: '%store-directory' always honors $NIX_STORE_DIR.Ludovic Courtès
* guix/config.scm.in (%store-directory): Honor $NIX_STORE_DIR. * guix/store.scm (%store-prefix): Use %store-directory directly.
2014-01-08config: '%state-directory' always honors $NIX_STATE_DIR.Ludovic Courtès
* guix/config.scm.in (%state-directory): Honor $NIX_STATE_DIR. * guix/scripts/package.scm (%profile-directory): Use %state-directory directly. * guix/store.scm (%default-socket-path, log-file): Likewise.
2014-01-08store: Fix 'log-file' to support uncompressed logs.Ludovic Courtès
* guix/store.scm (log-file): Report the file without '.bz2' if it exists.
2014-01-06archive: Add '--missing'.Ludovic Courtès
* guix/scripts/archive.scm (show-help, %options): Add '--missing'. (guix-archive)[lines]: New procedure. Use it to honor '--missing'. * tests/guix-archive.sh: Add tests. * doc/guix.texi (Invoking guix archive): Document '--missing'.
2014-01-05archive: Make sure $sysconfdir/guix exists.Ludovic Courtès
* guix/pki.scm (ensure-acl): Make sure the directory of %ACL-FILE exists. * guix/scripts/archive.scm (generate-key-pair): Likewise for %PUBLIC-KEY-FILE.
2014-01-05guix build: Add '--no-build-hook'.Ludovic Courtès
* guix/scripts/build.scm (%default-options): Add 'build-hook?' pair. (show-help, %options): Add --no-build-hook. (guix-build): Pass the 'build-hook?' value to 'set-build-options'. * doc/guix.texi (Invoking guix build): Document '--no-build-hook'.
2014-01-04guix package: Gracefully deal with EPIPE on stdout for --list-*.Ludovic Courtès
* guix/scripts/package.scm (leave-on-EPIPE): New macro. (guix-package): Use it for 'list-installed', 'list-available', and '--list-generations'. * tests/guix-package.sh: Add test.
2013-12-30archive: Add '--authorize'.Ludovic Courtès
* guix/scripts/archive.scm (authorize-key): New procedure. (guix-archive): Call it when OPTS contains 'authorize-key'. * tests/guix-archive.sh: Add test with invalid public key. * guix/pki.scm: Export '%acl-file'. * doc/guix.texi (Invoking guix archive): Make it clear that '--import' works only with authorized keys. Document '--authorize'.
2013-12-30archive: Add '--generate-key'.Ludovic Courtès
* guix/pk-crypto.scm (error-source, error-string): New procedures. * guix/pki.scm (%private-key-file): New variable. * guix/scripts/archive.scm (show-help): Document '--generate-key'. (%options): Add "generate-key". (generate-key-pair): New procedure. (guix-archive): Call 'generate-key' when OPTS contains a 'generate-key' pair. * doc/guix.texi (Setting Up the Daemon): Suggest generating a key pair. (Invoking guix archive): Document '--generate-key'.
2013-12-30pk-crypto: Fix 'canonical-sexp->sexp' for atoms.Ludovic Courtès
* guix/pk-crypto.scm (canonical-sexp->sexp): Add hack to extract an atom's buffer. * tests/pk-crypto.scm ("sexp->canonical-sexp->sexp"): Add sample.
2013-12-30pk-crypto: Work around Libgcrypt bug <https://bugs.g10code.com/gnupg/issue1594>.Ludovic Courtès
* guix/pk-crypto.scm (canonical-sexp-fold): Call 'nth-data' before 'nth' to work around <https://bugs.g10code.com/gnupg/issue1594>. * tests/pk-crypto.scm ("https://bugs.g10code.com/gnupg/issue1594"): New test.
2013-12-30authenticate: Consistently use 'leave' for fatal error reporting.Ludovic Courtès
* guix/scripts/authenticate.scm (guix-authenticate): Replace all uses of 'format' + 'exit' with 'leave'.
2013-12-29authenticate: Disallow imports signed with unauthorized keys.Ludovic Courtès
* guix/scripts/authenticate.scm (signature-sexp): Remove. (guix-authenticate): Upon '-verify', check whether the signature's public key passes 'authorized-key?'.
2013-12-29Add (guix pki).Ludovic Courtès
* guix/pki.scm, tests/pki.scm: New files. * Makefile.am (MODULES): Add 'guix/pki.scm'. (SCM_TESTS): Add 'tests/pki.scm'.
2013-12-29config: Export '%config-directory'.Ludovic Courtès
* configure.ac: Define and substitute 'guix_sysconfdir'. * guix/config.scm.in (%config-directory): New variable.
2013-12-29Move 'with-atomic-file-output' to (guix utils).Ludovic Courtès
* guix/scripts/substitute-binary.scm (with-atomic-file-output): Move to... * guix/utils.scm (with-atomic-file-output): ... here.
2013-12-29pk-crypto: Add canonical-sexp to sexp conversion procedures.Ludovic Courtès
* guix/pk-crypto.scm (canonical-sexp-fold, canonical-sexp->sexp, sexp->canonical-sexp): New procedures. * tests/pk-crypto.scm ("canonical-sexp->sexp", "sexp->canonical-sexp->sexp"): New tests.
2013-12-29pk-crypto: Add 'canonical-sexp-length' and related procedures.Ludovic Courtès
* guix/pk-crypto.scm (canonical-sexp-length, canonical-sexp-null?, canonical-sexp-list?): New procedures. * tests/pk-crypto.scm ("canonical-sexp-length", "canonical-sexp-list?"): New tests.
2013-12-29pk-crypto: 'canonical-sexp-nth-data' returns a symbol for "tokens".Ludovic Courtès
* guix/pk-crypto.scm (token-string?): New procedure. (canonical-sexp-nth-data): Return a symbol when the element is a "token", and a bytevector otherwise. (latin1-string->bytevector): Remove. (hash-data->bytevector): Adjust accordingly. * tests/pk-crypto.scm ("canonical-sexp-nth"): Adjust accordingly. Add octet string example.
2013-12-29authenticate: Store the public key as part of the signature.Ludovic Courtès
* guix/scripts/authenticate.scm (signature-sexp): New procedure. (guix-authenticate): Use it to produce the signature. Adjust verification code accordingly. * tests/store.scm ("import corrupt path"): Adjust test accordingly.
2013-12-29pk-crypto: Rename 'gcry-sexp' to 'canonical-sexp'.Ludovic Courtès
* guix/pk-crypto.scm: Rename procedures, variables, etc. from 'gcry-sexp' to 'canonical-sexp'. Add comment with references. * guix/scripts/authenticate.scm, tests/pk-crypto.scm: Adjust accordingly.
2013-12-22Add 'guix archive'.Ludovic Courtès
* guix/scripts/archive.scm, tests/guix-archive.sh: New files. * Makefile.am (MODULES): Add 'archive.scm'. (SH_TESTS): Add 'guix-archive.sh'. * doc/guix.texi (Invoking guix archive): New section. * guix/scripts/build.scm: Export 'derivation-from-expression'. * guix/scripts/package.scm: Export 'specification->package+output'.
2013-12-21guix build: Improve procedural decomposition.Ludovic Courtès
* guix/scripts/build.scm (%store): Remove. (derivation-from-expression): Add 'store' parameter. Adjust caller accordingly. (register-root): New procedure, formerly within 'guix-build'. (options->derivations): New procedure, formerly inline within 'guix-build'. (guix-build): Adjust accordingly.
2013-12-21Factorize package search between 'guix package' and 'guix build'.Ludovic Courtès
* guix/scripts/package.scm (newest-available-packages): Remove. (find-best-packages-by-name): Move to... * gnu/packages.scm (find-best-packages-by-name): ... here. (find-newest-available-packages): Memoize. * guix/scripts/build.scm (specification->package): New procedure, formerly called 'find-package' within 'guix-build'. (guix-build): Adjust accordingly.
2013-12-20daemon: Implement signed archive import/export.Ludovic Courtès
* 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.
2013-12-20pk-crypto: Add a few sexp utility procedures.Ludovic Courtès
* guix/pk-crypto.scm (gcry-sexp-car, gcry-sexp-cdr, gcry-sexp-nth, gcry-sexp-nth-data, dereference-size_t, latin1-string->bytevector, hash-data->bytevector): New procedures. * tests/pk-crypto.scm ("gcry-sexp-car + cdr", "gcry-sexp-nth", "gcry-sexp-nth-data", "bytevector->hash-data->bytevector"): New tests.
2013-12-20Add (guix pk-crypto).Ludovic Courtès
* guix/pk-crypto.scm, tests/pk-crypto.scm: New files. * Makefile.am (MODULES, SCM_TESTS): Add them.
2013-12-16pull: Move build code to (guix build pull).Ludovic Courtès
* guix/build/pull.scm: New file. * Makefile.am (MODULES): Add it. * guix/scripts/pull.scm (unpack): Use it.
2013-12-15gnu: gtk+: enable introspection.Cyril Roelandt
* gnu/packages/gtk.scm (atk, gdk-pixbuf, gtk+, pango): enable introspection * guix/build/gnome.scm: New file.
2013-12-14guix package: allow multiple arguments after -i, -r, and -u.Mark H Weaver
* guix/scripts/package.scm (%options): Adapt option processors to accept and return a second seed value: 'arg-handler', which handles bare arguments (if not false). The install, remove, and upgrade option processors return an arg-handler that repeat the same operation. All other option processors return #f as the arg-handler. Make the arguments to install and remove optional. The upgrade option processor deletes (upgrade . #f) from the alist before adding a new entry. (guix-package): Procedures passed to 'args-fold*' accept the new seed value 'arg-handler'. The 'operand-proc' uses 'arg-handler' (if not false). * doc/guix.texi (Invoking guix package): Update docs. * tests/guix-package.sh: Add test.
2013-12-14pull: Compile guix/ files before gnu/ files.Ludovic Courtès
* guix/scripts/pull.scm (unpack)[builder]: Build files under guix/ before files under gnu/.
2013-12-14pull: Compile files in parallel.Ludovic Courtès
* guix/scripts/pull.scm (unpack)[builder](compile-file*): Remove. (call-with-process, p-for-each): New procedures. Use them to compile files in parallel.