summaryrefslogtreecommitdiff
path: root/guix/scripts
Commit message (Collapse)AuthorAge
* profiles: Produce a top-level Info 'dir' file.Ludovic Courtès2014-08-23
| | | | | | | | | | | | Fixes <http://bugs.gnu.org/18305>. Reported by Brandon Invergo <brandon@gnu.org>. * guix/profiles.scm (manifest-inputs, info-dir-file): New procedures. (profile-derivation): Use them. Add #:info-dir? parameter and honor it. * guix/scripts/package.scm (guix-package): Call 'profile-derivation' with #:info-dir? #f when the 'bootstrap? option is set. * tests/profiles.scm ("profile-derivation"): Pass #:info-dir? #f.
* Move 'check-package-freshness' from 'guix package' to 'packages'.Alex Kost2014-08-20
| | | | | | | | * guix/scripts/package.scm (%sigint-prompt, call-with-sigint-handler) (waiting, ftp-open*, check-package-freshness): Move to... * gnu/packages.scm: ... here. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* guix package: Use 'manifest-transaction'.Alex Kost2014-08-19
| | | | | | | | * guix/scripts/package.scm (guix-package)[process-actions]: Use 'manifest-transaction' instead of the equivalent code. (show-what-to-remove/install): Remove. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* guix package: Remove leftover internal procedure.Ludovic Courtès2014-08-12
| | | | | | | Reported by Alex Kost <alezost@gmail.com>. * guix/scripts/package.scm (guix-package)[process-actions]: Remove 'same-package?'.
* guix package: Use 'manifest-add'.Ludovic Courtès2014-08-12
| | | | | * guix/scripts/package.scm (guix-package)[process-actions]: Use 'manifest-add' instead of the equivalent code.
* guix package: Remove dead code and unused variables.Ludovic Courtès2014-08-11
| | | | | | | | | | Suggested by Alex Kost <alezost@gmail.com>. * guix/scripts/package.scm (options->installable)[deduplicate]: Remove. [packages-to-upgrade]: Remove unused variable 'newest'. (roll-back): Remove unused variable 'manifest'. (guix-package): Remove unused variables 'guile-missing?', 'verbose?', and 'packages'.
* profiles: Add 'package->manifest-entry'.Ludovic Courtès2014-07-26
| | | | | | | | | | | | | Suggested by Alex Kost <alezost@gmail.com>. * guix/scripts/package.scm (options->installable)[package->manifest-entry]: Move to (guix profiles). [package->manifest-entry*]: New procedure. Use it. * guix/profiles.scm (package->manifest-entry): New procedure. * tests/profiles.scm (guile-for-build): New variable. Call '%guile-for-build'. ("profile-derivation"): New test.
* profiles: Get rid of the 'inputs' field of 'manifest-entry'.Ludovic Courtès2014-07-26
| | | | | | | | | * guix/profiles.scm (<manifest-entry>)[inputs]: Remove. (profile-derivation): Rely on 'item' and 'deps' instead of 'inputs'. Adjust 'builder' accordingly. * guix/scripts/package.scm (options->installable)[package->manifest-entry]: Remove 'inputs' field. Change 'dependencies' field to contain packages.
* profiles: Switch to gexps.Ludovic Courtès2014-07-26
| | | | | | | | | | | | | | | | | | | | | | * guix/profiles.scm (<manifest-entry>)[path]: Rename to... [item]: ... this. Update users. (manifest->sexp): Rename to... (manifest->gexp): ... this. Return a gexp. (lower-input): Remove. (profile-derivation): Remove 'store' parameter, and turn into a monadic procedure. [inputs]: New variable. [builder]: Turn into a gexp. Replace call to 'build-expression->derivation' with call to 'gexp->derivation'. * guix/scripts/package.scm (link-to-empty-profile): Adjust call to 'profile-derivation', and wrap it in 'run-with-store'. (show-what-to-remove/install): Rename 'path' to 'item'. Check whether ITEM is a package, and return its output path if it is. (input->name+path): Remove. (options->installable): Set 'item' to P. (guix-package): Adjust call to 'profile-derivation'. * tests/profiles.scm (guile-2.0.9): Change 'path' to 'item'.
* profiles: Do away with 'manifest=?'.Ludovic Courtès2014-07-26
| | | | | | | | * guix/profiles.scm (manifest=?): Remove. * guix/scripts/package.scm (readlink*): New procedure. (guix-package)[process-actions]: Use 'readlink*' and compare the profile to be built, PROF, with PROFILE to determine whether there's nothing to be done.
* guix system: Protect against changes to $PATH when activating the system.Ludovic Courtès2014-07-23
| | | | | | | | Partly fixes <http://bugs.gnu.org/18082>. Reported by Mark H Weaver <mhw@netris.org>. * guix/scripts/system.scm (save-environment-excursion): New macro. (switch-to-system): Wrap 'primitive-load' call in it.
* guix system: Fix type error in 'reconfigure'.Ludovic Courtès2014-07-23
| | | | | | | | Partly fixes <http://bugs.gnu.org/18082>. Reported by Mark H Weaver <mhw@netris.org>. * guix/scripts/system.scm (perform-action) <reconfigure>: Pass the output file name of GRUB.CFG to 'install-grub'.
* guix package: add a "show" option.Cyril Roelandt2014-07-21
| | | | | | * doc/guix.texi: Update the documentation. * guix/scripts/package.scm: Add a "show" option. * tests/guix-package.sh: Add a test for the "show" option.
* guix refresh: Use (ice-9 format).Ludovic Courtès2014-07-20
| | | | * guix/scripts/refresh.scm: Use (ice-9 format).
* guix system: Factorize 'copy-closure'.Ludovic Courtès2014-07-20
| | | | | | | * guix/scripts/system.scm (copy-closure): Rename to... (copy-item): ... this. (copy-closure): New procedure. (install): Use it, and remove redundant code.
* guix: refresh: Add --list-dependent option.Eric Bavier2014-07-20
| | | | | | | | | * guix/packages.scm (package-direct-inputs): New procedure. * gnu/packages.scm (vhash-refq, package-direct-dependents) (package-transitive-dependents, package-covering-dependents): New procedures. * guix/scripts/refresh.scm (%options, show-help, guix-refresh): Add --list-dependent option. * doc/guix.texi (Invoking guix refresh): Document '--list-dependent' option.
* guix system: init: Always use /var/guix as the target state directory.Ludovic Courtès2014-07-18
| | | | | | | | Fixes <http://bugs.gnu.org/18049>. Reported by Marek Benc <merkur32@gmail.com>. * guix/scripts/system.scm (copy-closure): Pass #:state-directory to 'register-path'.
* guix: refresh: Correctly identify invalid package names.Eric Bavier2014-07-15
| | | | | * guix/scripts/refresh.scm (guix-refresh): Check for null list returned by find-packages-by-name rather than #f.
* guix system: reconfigure: Always use "/" as GRUB's target file system.Ludovic Courtès2014-07-14
| | | | | | * guix/scripts/system.scm (perform-action) <reconfigure>: Wrap 'install-grub' call in 'false-if-exception'. Always use "/" as the target.
* guix system: Fix return value for 'reconfigure'.Ludovic Courtès2014-07-13
| | | | | * guix/scripts/system.scm (perform-action) <reconfigure>: Add missing 'return' expression.
* guix system: Convert to monadic style.Ludovic Courtès2014-07-13
| | | | | | | | | | | * guix/scripts/system.scm (references*, topologically-sorted*, show-what-to-build*): New procedures. (copy-closure): Turn into a monadic procedure. (install): Likewise, and adjust parameter list. (switch-to-system): Likewise. (system-derivation-for-action, grub.cfg, maybe-build, perform-action): New procedures. (guix-system): Use them.
* guix system: Add '--system' option.Ludovic Courtès2014-07-08
| | | | | | | | | | * guix/scripts/system.scm (switch-to-system): Add #:system parameter; pass it to 'run-with-store'. (%options): Add '--system'. (guix-system): Pass the 'system' option to 'run-with-store', 'package-derivation', and 'switch-to-system' calls. * doc/guix.texi (Invoking guix system): Document '--system' and '--image-size'.
* guix package: Try $LOGNAME in addition to $USER.Taylan Ulrich Bayirli/Kammer2014-07-05
| | | | | | | | | | | | Fixes <http://bugs.gnu.org/17946>. Notoriously, cron jobs may set LOGNAME only and not USER. See e.g. crontab(5) under Debian 7 (wheezy). * guix/scripts/package.scm (%profile-directory) (guix-package): Also try LOGNAME if USER is unset. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* guix package: Do the right thing for '-p ~/.guix-profile'.Ludovic Courtès2014-07-05
| | | | | | | | | Fixes <http://bugs.gnu.org/17939>. Reported by Taylan Ulrich Bayirli/Kammer <taylanbayirli@gmail.com>. * guix/scripts/package.scm (canonicalize-profile): New procedure. (%options): Use it for --profile. * tests/guix-package.sh: Add test.
* system: Install /var/guix/profiles/system-1-link on new systems.Ludovic Courtès2014-06-27
| | | | | | | | | | | | | | | | * guix/build/install.scm (directives): Add /var/guix/profiles/system. (populate-root-file-system): Add 'system' parameter. Create /var/guix/profiles/system-1-link. * guix/scripts/system.scm (install): Pass OS-DIR to 'populate-root-file-system'. * guix/build/vm.scm (initialize-root-partition): Add #:system-directory parameter, and pass it to 'populate-root-file-system'. (initialize-hard-disk): Add #:system-directory parameter, and pass it to 'initialize-root-partition'. * gnu/system/vm.scm (qemu-image): Add #:os-derivation parameter and pass it to 'initialize-hard-disk'. (system-disk-image, system-qemu-image, system-qemu-image/shared-store): Pass #:os-derivation to 'qemu-image.
* guix system: Add 'reconfigure' action.Ludovic Courtès2014-06-27
| | | | | | | | | | * guix/scripts/system.scm (%system-profile): New variable. (switch-to-system, previous-grub-entries): New procedures. (unless-file-not-found): New macro. (show-help): Add 'reconfigure'. (guix-system): Handle it. * gnu/system.scm: Export 'operating-system-activation-script'. * doc/guix.texi (Invoking guix system): Document it.
* guix {system,offload}: Improve reporting of syntax errors.Ludovic Courtès2014-06-27
| | | | | | | | | * guix/scripts/system.scm (read-operating-system) <catch handler>: Add case for 'syntax-error'. Correct message for default case. * guix/scripts/offload.scm (build-machines) <catch handler>: Add case for 'syntax-error'. * tests/guix-system.sh: New file. * Makefile.am (SH_TESTS): Add it.
* guix system: Gracefully handle 'install-grub' errors.Ludovic Courtès2014-06-24
| | | | | * guix/scripts/system.scm (install): Wrap 'install-grub' call in 'false-if-exception'. This is a followup to 641f9a2a.
* Merge branch 'core-updates'Ludovic Courtès2014-06-20
|\
| * substitute-binary: Warn about uninitialized ACL.Ludovic Courtès2014-06-19
| | | | | | | | | | | | | | * guix/scripts/substitute-binary.scm (guix-substitute-binary): Call 'check-acl-initialized'. (check-acl-initialized): Don't rely on 'equal?' to compare keys. Instead, convert keys to strings.
| * guix system: 'init' makes sure the target store directory exists.Ludovic Courtès2014-06-19
| | | | | | | | | | * guix/scripts/system.scm (install): Before calling 'copy-closure', make sure directory (%store-prefix) under TARGET exists.
* | substitute-binary: Avoid the term "narinfo" in user messages.Ludovic Courtès2014-06-17
|/ | | | | * guix/scripts/substitute-binary.scm (assert-valid-narinfo): Change message to avoid the term "narinfo".
* guix build: Allow gexps to be passed to '-e'.Ludovic Courtès2014-06-14
| | | | | | | | | | | | | | | | | * guix/ui.scm (%guix-user-module): New variable. (read/eval): Pass it as the second argument to 'eval'. * guix/scripts/build.scm (options/resolve-packages): Add case for 'gexp?'. * tests/guix-build.sh: Add tests. * doc/guix.texi (Invoking guix build): Document '-e gexp'. guxi build: Allow gexps to be passed to '-e'. * guix/ui.scm (%guix-user-module): New variable. (read/eval): Pass it as the second argument to 'eval'. * guix/scripts/build.scm (options/resolve-packages): Add case for 'gexp?'. * tests/guix-build.sh: Add tests. * doc/guix.texi (Invoking guix build): Document '-e gexp'.
* Separate package description translations from string translations.Ludovic Courtès2014-06-13
| | | | | | | | | | | | | | | | * po/packages/LINGUAS, po/packages/Makevars, po/packages/POTFILES.in: New files. * po/guix/Makevars (DOMAIN): Change to "guix". (XGETTEXT_OPTIONS): Remove "--keyword=synopsis --keyword=description". * po/guix/POTFILES.in: Remove gnu/packages/*.scm. * configure.ac: Change to gettext 0.18.3. Produce po/packages/Makefile.in. * Makefile.am (SUBDIRS): Add po/packages. * guix/ui.scm (%package-text-domain): New variable. (P_): New procedure. (package->recutils): Use 'P_' instead of '_'. * guix/scripts/package.scm (find-packages-by-description): Use 'P_' instead of 'gettext'.
* guix build: Only 'guix build' sets #:print-build-trace.Ludovic Courtès2014-06-09
| | | | | | | | | This makes 'guix package' et al. slightly less verbose, by not emitting "@ substituter-started" lines and similar. * guix/scripts/build.scm (set-build-options-from-command-line): Pass #:print-build-trace. (%default-options): Add 'print-build-trace?'.
* guix system: Add 'disk-image' action.Ludovic Courtès2014-05-22
| | | | | | | | * guix/scripts/system.scm (show-help): Add 'disk-image'. (guix-system)[parse-options]: Support 'disk-image' action. [option-arguments]: Likewise. Handle the 'disk-image' action. * doc/guix.texi (Invoking guix system): Document 'disk-image'.
* guix system: Check whether we are installing to /.Ludovic Courtès2014-05-19
| | | | * guix/scripts/system.scm (install): Check whether TARGET is / and warn.
* guix system: Factorize out closure copy.Ludovic Courtès2014-05-19
| | | | | * guix/scripts/system.scm (copy-closure): New procedure. (install): Use it.
* guix system: 'guix system init' installs GRUB by default.Ludovic Courtès2014-05-19
| | | | | | | | | | | * guix/scripts/system.scm (install): Add #:grub?, #:grub.cfg, and #:device parameters; honor them. (show-help): Document '--no-grub'. (%options): Add '--no-grub'. (%default-options): Add 'install-grub?'. (guix-system): Honor 'install-grub?' option from OPTS. Adjust 'install' call accordingly. * doc/guix.texi (Invoking guix system): Document '--no-grub'.
* guix system: Add 'init' sub-command.Ludovic Courtès2014-05-18
| | | | | | | | | * guix/scripts/system.scm (install): New procedure. (guix-system)[parse-option]: Remove check for extraneous arguments. [match-pair, option-arguments]: New procedures. Use 'option-arguments'. Honor 'init'. (show-help): Document 'init'. * doc/guix.texi (Invoking guix system): Document 'init'.
* guix system: Add 'build' action.Ludovic Courtès2014-05-16
| | | | | | * guix/scripts/system.scm (show-help): Document 'build' action. (guix-system): Honor 'build' action. * doc/guix.texi (Invoking guix system): Add 'build' action.
* authenticate: Add compatibility hack for Guile 2.0.5.Ludovic Courtès2014-05-16
| | | | | * guix/scripts/authenticate.scm (%default-port-conversion-strategy): New variable. Reported by Andreas Enge <andreas@enge.fr>.
* pk-crypto: Add pretty-printer to 'gcry-error' exceptions.Ludovic Courtès2014-04-22
| | | | | | | | | | | | | * guix/pk-crypto.scm (string->canonical-sexp, sign, generate-key): Pass the procedure name as the first argument to 'throw'. (gcrypt-error-printer): New procedure. <top level>: Add call to 'set-exception-printer!'. * guix/nar.scm (restore-one-item): Add 'proc' parameter to 'catch' handler for 'gcry-error. * guix/scripts/archive.scm (%options, generate-key-pair, authorize-key): Likewise. * guix/scripts/substitute-binary.scm (narinfo-signature->canonical-sexp): Likewise.
* authenticate: Allow signatures with binary data to be written to stdout.Ludovic Courtès2014-04-22
| | | | | | | | | | | | Fixes <http://bugs.gnu.org/17312>. * guix/scripts/authenticate.scm (guix-authenticate): Add calls to 'set-port-encoding!' and 'set-port-conversion-strategy!'. Wrap body in 'with-fluids' form that sets '%default-port-encoding' and '%default-port-conversion-strategy'. * tests/guix-authenticate.sh: Add test. * tests/pk-crypto.scm ("hash corrupt due to restrictive locale encoding"): Add reference to bug.
* offload: '{send,receive}-files' wait for completion of the transfer.Ludovic Courtès2014-04-14
| | | | | | | | | | | | | | | | | | Fixes situations where the remote 'guix build' is invoked before the .drv has been completely copied, as reported at <https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00174.html>. In some cases 'send-files' would return before the other end is done importing the files, and so the subsequent 'guix build' invocation would just miss the .drv file it refers to. * guix/utils.scm (call-with-decompressed-port): Don't close PORT. (call-with-compressed-output-port): Likewise. * tests/utils.scm ("compressed-output-port + decompressed-port"): Adjust accordingly. * guix/scripts/offload.scm (send-files): Add explicit (close-pipe pipe) call. (retrieve-files): Likewise.
* offload: Better synchronize with remote invocation of 'guix archive --missing'.Ludovic Courtès2014-04-14
| | | | | * guix/scripts/offload.scm (send-files)[missing-files]: Call 'waitpid' after reading all of MISSING.
* guix system: Add 'vm-image' action and '--image-size' option.Ludovic Courtès2014-04-09
| | | | | | | | | * guix/scripts/system.scm (%options): Add --image-size. (%default-options): Add 'image-size'. (guix-system)[parse-options]: Handle the 'vm-image' action. Honor them. (show-help): Update accordingly. * doc/guix.texi (Invoking guix system): Add 'vm-image'.
* ui: Add 'size->number'.Ludovic Courtès2014-04-08
| | | | | | | | * guix/scripts/gc.scm (size->number): Remove. * guix/ui.scm (size->number): New procedure. * tests/ui.scm ("size->number, bytes", "size->number, MiB", "size->number, GiB", "size->number, 1.2GiB", "size->number, invalid unit"): New tests.
* offload: Remove all the GC roots in case of multiple-output derivations.Ludovic Courtès2014-04-08
| | | | | | | | | * guix/scripts/offload.scm (remove-gc-root): Rename to... (remove-gc-roots): ... this. [builder]: Use 'scandir' and remove all the files starting with %GC-ROOT-FILE. (transfer-and-offload): Adjust to renaming; remove 'false-if-exception' wraps.
* offload: Bail out when failing to register a GC root on the build machine.Ludovic Courtès2014-04-08
| | | | | * guix/scripts/offload.scm (register-gc-root): Call 'leave' when 'close-pipe' returns non-zero.