Commit Graph

2036 Commits

Author SHA1 Message Date
Ludovic Courtès
7adf9b8469 derivations: Move grafts to (guix grafts).
* guix/derivations.scm (<graft>, graft-derivation, %graft?)
(set-grafting): Move to...
* guix/grafts.scm: ... here.  New file.
* guix/gexp.scm, guix/packages.scm, tests/packages.scm,
guix/scripts/build.scm: Use it.
* Makefile.am (MODULES): Add it.
(SCM_TESTS): Add tests/grafts.scm.
* tests/derivations.scm ("graft-derivation"): Move to...
* tests/grafts.scm: ... here.  New file.
2016-02-22 22:11:37 +01:00
Leo Famulari
0db71dd2d1 licenses: Add repoze license.
* guix/licenses.scm (repoze): New variable.
2016-02-22 00:40:25 -05:00
Ludovic Courtès
95001d4b46 download: Add 'url-fetch/tarbomb'.
Suggested by Federico Beffa.
Fixes <http://bugs.gnu.org/22676>.
Reported by Danny Milosavljevic <dannym@scratchpost.org>.

* gnu/packages/engineering.scm (broken-tarball-fetch): Remove.
(fastcap)[source](method): Use URL-FETCH/TARBOMB instead.
* gnu/packages/scheme.scm (broken-tarball-fetch): Remove.
(scmutils)[source](method): Use URL-FETCH/TARBOMB instead.
* guix/download.scm (url-fetch/tarbomb): New procedure, renamed from
'broken-tarball-fetch'.
2016-02-22 00:36:24 +01:00
Ben Woodcroft
fbc5b815cc import: gem: Add updater.
* guix/import/gem.scm (guix-package->gem-name,
  gem-package?, latest-release): New procedures.
  (%gem-updater): New variable.
  (rubygems-fetch): Wrap body in
  'call-with-output-file' and 'with-error-to-port'.
* guix/scripts/refresh.scm (%updaters): Add %GEM-UPDATER.
* doc/guix.texi (Invoking guix refresh): Mention RubyGems.
2016-02-20 20:46:10 +10:00
Rene Saavedra
a10bf13915 licenses: Add CC-BY-SA and CC-BY.
* guix/licenses.scm (cc-by-sa2.0, cc-by2.0): New variables.

Signed-off-by: Alex Kost <alezost@gmail.com>
2016-02-18 11:59:03 +03:00
Jan Nieuwenhuizen
d29f647077 licenses: Add tcl/tk license.
* guix/licenses.scm (tcl/tk): New variable.

Signed-off-by: Leo Famulari <leo@famulari.name>
2016-02-12 17:25:39 -05:00
David Thompson
779aa003fb scripts: environment: Build environments as profiles.
Fixes <http://bugs.gnu.org/19816>.

* guix/scripts/environment.scm (evaluate-input-search-paths)
(build-inputs): Delete.
(evaluate-profile-search-paths, strip-input-name)
(package-or-package+output?, package-environment-inputs)
(build-environment, inputs->profile-derivations): New procedures.
(create-environment, show-search-paths, launch-environment)
(launch-environment/container): Replace 'inputs' argument
with 'profile' argument.
(package+propagated-inputs): Strip off names off of input tuples.
(options/resolve-packages): Handle input tuples that specify an output
in expressions.
(guix-environment): Convert inputs into a profile to use in the
environment.  Remove non-package inputs such as origins from
environment inputs.
* doc/guix.texi ("invoking guix environment"): Document package+output
tuples for --expression option.
* tests/guix-environment.sh: Update tests.
* tests/guix-environment-container.sh: Likewise.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2016-02-12 22:02:06 +01:00
Ludovic Courtès
e5f04c2dde profiles: Add #:system argument to profile-derivation.
Suggested by David Thompson <davet@gnu.org>.

* guix/profiles.scm (profile-derivation): Add #:system parameter and
honor it.
2016-02-12 21:54:25 +01:00
Ludovic Courtès
98a7b528d6 store: Add monadic access to '%current-system'.
* guix/store.scm (current-system, set-current-system): New procedures.
* tests/store.scm ("current-system"): New test.
2016-02-12 21:54:25 +01:00
Ludovic Courtès
f2e4805b7e Add (guix build bournish) and use it in the initrd.
* guix/build/bournish.scm: New file.
* Makefile.am (MODULES): Add it.
* gnu/system/linux-initrd.scm (base-initrd): Add (guix build bournish)
and use it.
2016-02-08 23:46:46 +01:00
Ludovic Courtès
1be83341f6 build-system/python: Honor the 'python2-variant' property of packages.
Fixes <http://bugs.gnu.org/22437>.
Reported by Leo Famulari <leo@famulari.name> and others.

* guix/build-system/python.scm (package-with-explicit-python): Add
  #:variant-property and honor it.
(strip-python2-variant): New procedure.
2016-02-07 23:46:01 +01:00
Ludovic Courtès
1d6b7d5847 guix system: Simply warn if we cannot talk to the shepherd.
Before that 'open-connection' would return #f, and thus
'current-services' would return a single #f value when its continuation
expects two.

Reported by calher on #guix.

* gnu/services/herd.scm (open-connection): Rethrow system-error
exceptions.
(with-shepherd): Expect CONNECTION to always be true; remove useless
'dynamic-wind'.
* guix/scripts/system.scm (warn-on-system-error): New macro.
(upgrade-shepherd-services): Wrap body in 'warn-on-system-error'.
2016-02-05 14:01:46 +01:00
Fabian Harfert
ca9eb4898b licenses: Add the fdl1.1+.
* guix/licenses.scm (fdl1.1+): New variable.
2016-02-04 18:31:17 -05:00
Ludovic Courtès
240b57f0ca guix system: 'reconfigure' loads and starts new services.
Partly fixes <http://bugs.gnu.org/22039>.

* gnu/services/herd.scm: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
* gnu/services/shepherd.scm (shepherd-service-canonical-name): New
procedure.
(shepherd-service-file): Export.
* guix/scripts/system.scm (upgrade-shepherd-services): New procedure.
(switch-to-system): Use it.
* guix/ui.scm (info): New procedure.
* doc/guix.texi (Invoking guix system): Mention system services.
2016-02-03 22:28:28 +01:00
Ludovic Courtès
a220b262db syscalls: 'all-network-interface-names' accepts non-alphanumeric characters.
This fixes interfaces with a dash or other characters being ignored.
Suggested by Jookia <166291@gmail.com>.

* guix/build/syscalls.scm (%interface-line): Use [[:graph:]] instead
of [[:alnum:]].
2016-02-03 11:21:11 +01:00
Leo Famulari
aaa49e8c21 licenses: Add the Unlicense.
* guix/licenses.scm (unlicense): New variable.
2016-02-02 14:49:26 -05:00
Ludovic Courtès
47c0f92c37 guix build: Add '--with-input'.
* guix/scripts/build.scm (transform-package-inputs): New procedure.
(%transformations): Add it.
(%transformation-options, show-transformation-options-help): Add
--with-input.
* tests/scripts-build.scm ("options->transformation, with-input"):
("options->transformation, with-input, no matches"): New tests.
* tests/guix-build.sh: Add tests.
* doc/guix.texi (Package Transformation Options): Document it.
2016-02-01 08:59:13 +01:00
Ludovic Courtès
f0907d97d4 build-system/python: Use 'ensure-keyword-arguments'.
* guix/build-system/python.scm (package-with-explicit-python): Use
'ensure-keyword-arguments'.
2016-02-01 08:59:13 +01:00
Ludovic Courtès
b8638f0347 guix package: Support package transformation options.
* guix/scripts/package.scm (show-help): Call
'show-transformation-options-help'.
(%options): Append %TRANSFORMATION-OPTIONS.
(process-actions)[transform, transform-entry]: New procedures.
* doc/guix.texi (Invoking guix package): Mention package
transformations.
(Package Transformation Options): Mention 'guix package'.
2016-02-01 08:59:13 +01:00
Ludovic Courtès
88ad6deda6 guix build: Separate transformation options.
* guix/scripts/build.scm (%transformation-options): New variable.
(show-transformation-options-help): New procedure.
(show-help): Remove '--with-source' documentation and add
'show-transformation-options-help' call.
(%options): Remove "with-source" and append %TRANSFORMATION-OPTIONS.
* doc/guix.texi (Package Transformation Options): New node.  Document
'--with-source', moved from...
(Additional Build Options): ... here.
2016-02-01 08:59:13 +01:00
Ludovic Courtès
629a064f32 guix build: Transformations operate on single objects.
* guix/scripts/build.scm (transform-package-source): Return a procedure
that expects a single object rather than a list of packages.
(options->transformation): Rewrite to precompute the list of applicable
transformations and to return a procedure that expects a single object
rather than a list of objects.
(options->derivations): Adjust accordingly.
* tests/scripts-build.scm: New file.
* Makefile.am (SCM_TESTS): Add it.
2016-02-01 08:59:13 +01:00
David Thompson
921d9dc7f4 license: Add giftware.
* guix/licenses.scm (giftware): New variable.
2016-01-31 15:34:58 -05:00
Alex Kost
710fa231f0 guix system: Rename 'dmd-graph' to 'shepherd-graph'.
* doc/images/dmd-graph.dot: Rename to...
* doc/images/shepherd-graph.dot: ... this.
* doc.am (DOT_FILES): Adjust accordingly.
* guix/scripts/system.scm (dmd-service-node-label)
  (dmd-service-node-type, export-dmd-graph): Rename to...
  (shepherd-service-node-label, shepherd-service-node-type)
  (export-shepherd-graph): ... this.
  (show-help, process-action, process-command): Rename 'dmd-graph' to
  'shepherd-graph'.
* emacs/guix-command.el (guix-command-additional-execute-arguments)
  (guix-command-special-executors): Likewise.
* doc/guix.texi: Likewise.
* doc/emacs.texi (Emacs Popup Interface): Likewise.
2016-01-29 20:21:54 +03:00
Alex Kost
d4053c710b services: Rename 'dmd' services to 'shepherd'.
* gnu/services/shepherd.scm (dmd-root-service-type, %dmd-root-service)
  (dmd-service-type, <dmd-service>, dmd-service, dmd-service?)
  (make-dmd-service, dmd-service-documentation, dmd-service-provision)
  (dmd-service-requirement, dmd-service-respawn, dmd-service-start)
  (dmd-service-stop, dmd-service-auto-start?, dmd-service-modules)
  (dmd-service-imported-modules, dmd-service-file-name, dmd-service-file)
  (dmd-service-back-edges): Rename to...
  (shepherd-root-service-type, %shepherd-root-service, shepherd-service-type)
  (<shepherd-service>, shepherd-service, shepherd-service?)
  (make-shepherd-service, shepherd-service-documentation)
  (shepherd-service-provision, shepherd-service-requirement)
  (shepherd-service-respawn, shepherd-service-start)
  (shepherd-service-stop, shepherd-service-auto-start?)
  (shepherd-service-modules, shepherd-service-imported-modules)
  (shepherd-service-file-name, shepherd-service-file)
  (shepherd-service-back-edges): ...this
* gnu/services.scm: Adjust comments.
* gnu/services/avahi.scm (avahi-dmd-service): Rename to...
  (avahi-shepherd-service): ... this.
* gnu/services/base.scm (%root-file-system-dmd-service)
  (file-system->dmd-service-name, mapped-device->dmd-service-name)
  (dependency->dmd-service-name, file-system-dmd-service)
  (mingetty-dmd-service, nscd-dmd-service, guix-dmd-service)
  (guix-publish-dmd-service, udev-dmd-service, gpm-dmd-service): Rename to...
  (%root-file-system-shepherd-service)
  (file-system->shepherd-service-name, mapped-device->shepherd-service-name)
  (dependency->shepherd-service-name, file-system-shepherd-service)
  (mingetty-shepherd-service, nscd-shepherd-service, guix-shepherd-service)
  (guix-publish-shepherd-service, udev-shepherd-service)
  (gpm-shepherd-service): ... this.
* gnu/services/databases.scm (postgresql-dmd-service): Rename to...
  (postgresql-shepherd-service): ... this.
* gnu/services/desktop.scm (upower-dmd-service, elogind-dmd-service):
  Rename to...
  (upower-shepherd-service, elogind-shepherd-service): ... this.
* gnu/services/dbus.scm (dbus-dmd-service): Rename to...
  (dbus-shepherd-service): ... this.
* gnu/services/lirc.scm (lirc-dmd-service): Rename to...
  (lirc-shepherd-service): ... this.
* gnu/services/mail.scm (dovecot-dmd-service): Rename to...
  (dovecot-shepherd-service): ... this.
* gnu/services/networking.scm (ntp-dmd-service, tor-dmd-service)
  (bitlbee-dmd-service, wicd-dmd-service, network-manager-dmd-service): Rename to...
  (dbus-shepherd-service): ... this.
* gnu/services/ssh.scm (lsh-dmd-service): Rename to...
  (lsh-shepherd-service): ... this.
* gnu/services/web.scm (nginx-dmd-service): Rename to...
  (nginx-shepherd-service): ... this.
* gnu/services/xorg.scm (slim-dmd-service): Rename to...
  (slim-shepherd-service): ... this.
* gnu/system.scm (essential-services): Use '%shepherd-root-service'.
* gnu/system/install.scm (cow-store-service-type): Adjust accordingly.
* guix/scripts/system.scm (dmd-service-node-label, dmd-service-node-type)
  (export-dmd-graph): Likewise.
* tests/guix-system.sh: Likewise.
* tests/services.scm ("dmd-service-back-edges"): Rename to...
  ("shepherd-service-back-edges"): Adjust accordingly.
* doc/guix.texi: Likewise.
* doc/images/service-graph.dot: Use 'shepherd' service name.
2016-01-29 20:21:53 +03:00
Alex Kost
0190c1c02f Rename (gnu services dmd) to (gnu services shepherd).
* gnu/services/dmd.scm: Rename to...
* gnu/services/shepherd.scm: ... this.
* gnu/system.scm: Use it.
* gnu/system/install.scm: Likewise.
* gnu/services/xorg.scm: Likewise.
* gnu/services/web.scm: Likewise.
* gnu/services/ssh.scm: Likewise.
* gnu/services/networking.scm: Likewise.
* gnu/services/mail.scm: Likewise.
* gnu/services/lirc.scm: Likewise.
* gnu/services/desktop.scm: Likewise.
* gnu/services/dbus.scm: Likewise.
* gnu/services/databases.scm: Likewise.
* gnu/services/base.scm: Likewise.
* gnu/services/avahi.scm: Likewise.
* guix/scripts/system.scm: Likewise.
* tests/services.scm: Likewise.
* tests/guix-system.sh: Likewise.
* doc/guix.texi (Shepherd Services): Adjust accordingly.
* gnu-system.am (GNU_SYSTEM_MODULES): Likewise.
* po/guix/POTFILES.in: Likewise.
2016-01-29 20:21:53 +03:00
Mathieu Lirzin
74e667d149 packages: Use '@' in package record printers.
* guix/packages.scm <package>: Use '@' in record printer.
* guix/import/cabal.scm <cabal-package>: Likewise
* guix/import/elpa.scm <elpa-package>: Likewise.
* tests/packages.scm: Adapt to it.
2016-01-28 16:31:38 +01:00
Mathieu Lirzin
f3044a4b7b lint: Rewrite 'check-patch-file-names'.
* guix/scripts/lint.scm (check-patch-file-names): Improve clarity by
reversing the logic.
2016-01-28 16:31:38 +01:00
Mathieu Lirzin
90ca918668 lint: Remove an unneeded clause in 'check-patch-file-names'.
* guix/scripts/lint.scm (check-patch-file-names): Don't check if patches
start with the package full name since matching the package name (which
is a prefix of the full name) is sufficient.
2016-01-28 16:31:38 +01:00
Mark H Weaver
412bee5e29 Merge branch 'master' into core-updates 2016-01-24 21:04:54 -05:00
Eric Bavier
ea4a0e81cb gnu: licenses: Add Mozilla Public License 1.0.
* guix/licenses.scm (mpl1.0): New variable.
2016-01-20 22:06:27 -06:00
Ben Woodcroft
e88d5fa9eb import: gem: Beautify only the description, not the synopsis.
* guix/import/gem.scm (make-gem-sexp): Add synopsis argument.
(gem->guix-package): Pass unbeautified synopsis to make-gem-sexp.
* tests/gem.scm: Adapt it.
2016-01-20 21:52:52 +10:00
Ricardo Wurmus
d0bd632f89 import: Add Bioconductor importer and updater.
* guix/import/cran.scm (%bioconductor-updater,
latest-bioconductor-release, bioconductor-package?): New procedures.
(cran->guix-package): Support repositories other than CRAN.
(%bioconductor-url, %bioconductor-svn-url): New variables.
(description->package): Update signature to distinguish between packages
from different repositories.
(latest-release): Rename procedure ...
(latest-cran-release): ... to this.
(cran-package?): Do not assume all R packages are available on CRAN.
* tests/cran.scm: Update tests.
* guix/scripts/import/cran.scm: Add "--archive" option and default to
CRAN.
* guix/scripts/refresh.scm (%updaters): Add "%bioconductor-updater".
* doc/guix.texi: Document Bioconductor importer and updater.
2016-01-20 12:41:28 +01:00
Eric Bavier
252ddedd4b build-system/haskell: Fix package.conf parsing.
* guix/build/haskell-build-system.scm (register)[conf-depends]: Properly
  react to EOF while reading GHC package conf files.
2016-01-19 18:01:07 -06:00
Ludovic Courtès
f495301902 guix build: Add '--keep-going'.
* guix/scripts/build.scm (show-build-options-help)
(%standard-build-options): Add --keep-going.
* guix/scripts/build.scm (set-build-options-from-command-line): Honor
it.
* doc/guix.texi (Invoking guix build): Document it.
2016-01-19 21:59:58 +01:00
Mark H Weaver
afe9f40949 Merge branch 'master' into core-updates 2016-01-19 00:18:37 -05:00
Alex Kost
b8300494c0 Move <boot-parameters> to (gnu system).
* guix/scripts/system.scm (previous-grub-entries)
  (display-system-generation): Use accessors instead of matching
  <boot-parameters>.
  (boot-parameters, boot-parameters?, boot-parameters-label)
  (boot-parameters-root-device, boot-parameters-kernel)
  (boot-parameters-kernel-arguments, read-boot-parameters): Move to...
* gnu/system.scm: ... here. Export them.
2016-01-16 13:02:21 +03:00
Ben Woodcroft
869cda545d import: gem: Beautify description field.
* guix/import/gem.scm (gem->guix-package): Use 'beautify-description'.
2016-01-14 19:44:40 +10:00
Ben Woodcroft
2028a2c960 import: cran: Move beautify-description to utils module.
* guix/import/cran.scm (beautify-description): Move from here...
* guix/import/utils.scm: ... to here.
2016-01-14 19:44:36 +10:00
Ludovic Courtès
8c986ab120 Merge branch 'master' into core-updates 2016-01-13 18:18:48 +01:00
Ludovic Courtès
b8a35309f8 build-system/gnu: 'dist-package' can be passed the phases.
* guix/build-system/gnu.scm (dist-package): Add #:phases parameter and
honor it.
2016-01-13 17:43:21 +01:00
Ludovic Courtès
8c9ef2c3a2 monad-repl: Close connection when leaving the monad REPL.
* guix/monad-repl.scm (store-monad-language): Add 'store' parameter and
use it.  Remove call to 'open-connection'.
(enter-store-monad): Use 'with-store' and pass the store to
'store-monad-language.
2016-01-13 17:43:21 +01:00
Ben Woodcroft
761e7042f6 ruby: Abstract out path to GEM_HOME.
Previously paths to the GEM_HOME of certain Ruby packages were
hard-coded, so packages failed to build when Ruby was updated to 2.3.0.

* guix/build/ruby-build-system.scm (gem-home): New procedure.
* gnu/packages/ruby.scm (ruby-metaclass, ruby-instantiator,
ruby-introspection, ruby-mocha, ruby-minitest-tu-shim): Use it.
2016-01-11 21:58:55 +10:00
Ludovic Courtès
17ad0a2714 build-system/python: 'pypi-uri' takes an optional file name extension.
Suggested by swedebugia <swedebugia@riseup.net>.

* guix/build-system/python.scm (pypi-uri): Add 'extension' parameter and
use it.
2016-01-08 19:06:26 +01:00
Ricardo Wurmus
34a75d35bb import: Rename "cran-fetch" to "fetch-description".
* guix/import/cran.scm (cran-fetch): Rename procedure ...
(fetch-description): ... to this.
2016-01-07 17:18:04 +01:00
Ricardo Wurmus
d1c116089b import: Add package->upstream-name procedure.
* guix/import/cran.scm (package->upstream-name): New procedure.
2016-01-07 17:18:02 +01:00
Ludovic Courtès
d4aaf95401 build-system/gnu: Make 'package-with-explicit-inputs' idempotent.
* guix/build-system/gnu.scm (package-with-explicit-inputs): Use
  'ensure-keyword-arguments' instead of appending to ARGS.
* gnu/packages/commencement.scm (static-bash-for-glibc): Add missing
  #:guile argument.
2016-01-06 23:08:22 +01:00
Ludovic Courtès
6071122b71 utils: Add 'ensure-keyword-arguments'.
* guix/utils.scm (delkw, ensure-keyword-arguments): New procedures.
* tests/utils.scm ("ensure-keyword-arguments"): New test.
2016-01-06 23:08:22 +01:00
Ludovic Courtès
793a43f409 http-client: Work around <http://bugs.gnu.org/22273>.
* guix/http-client.scm (read-header-line): New procedure.  Use it.
2016-01-06 23:08:22 +01:00
Ludovic Courtès
1c63dafce6 http-client: Fix erroneous comment.
* guix/http-client.scm: Fix Guile version number in comment for Guile
commit 5a10e41.
2016-01-06 23:08:22 +01:00
Ludovic Courtès
f888c0b120 lint: cve: Catch host name lookup errors.
* guix/scripts/lint.scm (package-vulnerabilities): Catch
'getaddrinfo-error'.
2016-01-06 15:54:12 +01:00
Ben Woodcroft
7266848ace build: ruby: Remove cached gem after install.
The .gem file stored in GEM_HOME after install is both redundant and an
archive that stores timestamped files which makes builds
non-deterministic, so delete it after 'gem install'.

* guix/build/ruby-build-system.scm (install): Remove cached gem after
  install.
2016-01-06 12:42:41 +01:00
Taylan Ulrich Bayırlı/Kammer
f07041f7d2 build: pull: Compile .scm files in one process.
* guix/build/pull.scm (call-with-process, report-build-progress)
(p-for-each): Remove.
(build-guix): Load and compile files in one process.
2016-01-05 23:30:30 +01:00
Ludovic Courtès
0beb65b450 build-system/gnu: Add 'set-SOURCE-DATE-EPOCH' phase.
This phase is inherited by other build systems, which ensures
'SOURCE_DATE_EPOCH' is always set in practice.

* guix/build/python-build-system.scm (set-SOURCE-DATE-EPOCH): Remove.
(%standard-phases): Don't add it.
* guix/build/gnu-build-system.scm (set-SOURCE-DATE-EPOCH): New
procedure.
(%standard-phases): Add it.
(gnu-build): Remove 'setenv' call for "SOURCE_DATE_EPOCH".
2016-01-05 15:52:42 +01:00
Ludovic Courtès
db5a94445f guix package: Allow multiple '--search' flags.
* guix/scripts/package.scm (find-packages-by-description): Change 'rx'
parameter to 'regexps'.
[matches-all?, matches-one?]: New procedures.
Use them.
(process-query): Collect regexps from all 'search' queries, and pass
them to 'find-packages-by-description'.
* tests/guix-package.sh: Add tests.
* doc/guix.texi (Invoking guix package): Document it.
2016-01-05 00:28:42 +01:00
Ludovic Courtès
d28ef43937 ui: Update copyright year in '--version' output.
* guix/ui.scm (show-version-and-exit): Increment copyright year.
2016-01-05 00:28:42 +01:00
Ludovic Courtès
35a6dabcf1 git-download: Correctly implement recursive checkouts.
Previously, the 'git checkout' invocation would remove sub-modules that
had been initialized by 'git clone --recursive'.

* guix/build/git.scm (git-fetch): Never use "git clone --recursive".
Invoke "git submodule update --init --recursive" after "git checkout".
Remove '.git' directories as the last step.
2016-01-05 00:28:42 +01:00
Ludovic Courtès
53334dd6e9 Merge branch 'master' into core-updates 2016-01-03 14:53:03 +01:00
Ludovic Courtès
51385362f7 graph: %BAG-WITH-ORIGINS-NODE-TYPE includes the origin's guile.
Before that it would include #f for most origins since that the default
value of 'origin-patch-guile'.

* guix/scripts/graph.scm (bag-node-edges): When 'origin-patch-guile'
returns #f, use (default-guile).
* tests/graph.scm ("bag DAG, including origins"): Check for an edge from
O to (default-guile).
2016-01-02 22:25:41 +01:00
Ludovic Courtès
f88282af38 graph: %BAG-EMERGED-NODE-TYPE filters out origins.
Fixes <http://bugs.gnu.org/22280>.
Reported by Leo Famulari <leo@famulari.name>.

* guix/scripts/graph.scm (%bag-emerged-node-type)[edges]: Mimic
%BAG-NODE-TYPE.  This is a followup to 38b92da.
2016-01-02 22:25:41 +01:00
Ludovic Courtès
7165a91c7d build-system/gnu: Use the long option name for deterministic archives.
This is a followup to 3eb34c6.

* guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Use
"--enable-deterministic-archives" instead of "-D" to work around
Binutils bug <https://sourceware.org/bugzilla/show_bug.cgi?id=17671>.
* guix/build/gnu-build-system.scm (strip): Likewise.
2016-01-01 00:49:05 +01:00
Ricardo Wurmus
b7fa2f9321 licenses: Add CC BY SA 3.0.
* guix/licenses.scm (cc-by-sa3.0): New variable.
2015-12-30 20:41:33 +01:00
Ludovic Courtès
223d793903 guix build: Augment %PATCH-PATH when -L is passed.
Fixes <http://bugs.gnu.org/22259>.
Reported by Nikolay Merinov <nikolay.merinov@member.fsf.org>.

* guix/scripts/build.scm (%standard-build-options) <-L>: Augment
%PATCH-PATH.
* tests/guix-package.sh: Add test.
2015-12-30 18:15:54 +01:00
Leo Famulari
38fa30eb95 guix package: Fix typo in comment.
* guix/scripts/package.scm: Fix typo.
2015-12-25 23:36:42 -05:00
Ricardo Wurmus
12d38e8d43 build: Add bioconductor-uri procedure.
* guix/build-system/r.scm (bioconductor-uri): New procedure.
2015-12-21 22:32:01 +01:00
Ricardo Wurmus
be036757bd import: Drop empty list items.
* guix/import/cran.scm (listify): Remove empty strings from result list.
2015-12-21 15:24:54 +01:00
Ricardo Wurmus
0cb5bc2cff http-client: Support basic authentication.
* guix/http-client.scm (http-fetch): Add Authorization header to request
  when the URI contains userinfo.
2015-12-21 15:24:44 +01:00
Ludovic Courtès
c5b303c57f lint: The CPE name of GRUB is "grub2".
Reported by Leo Famulari.

* guix/scripts/lint.scm (package-name->cpe-name): Add "grub".
2015-12-20 22:34:22 +01:00
Ludovic Courtès
ccda8f7d7f profiles: Honor search paths of propagated inputs.
Fixes <http://bugs.gnu.org/22073>.
Reported by Federico Beffa <beffa@ieee.org>.

* guix/profiles.scm (package->manifest-entry): Use
'package-transitive-native-search-paths' when computing
'search-paths' field.
* tests/profiles.scm ("package->manifest-entry, search paths"): New test.
2015-12-20 22:34:22 +01:00
Ludovic Courtès
aa8e051532 packages: Add 'package-transitive-native-search-paths'.
* guix/packages.scm (package-transitive-native-search-paths): New
procedure.
* tests/packages.scm ("package-transitive-native-search-paths"): New
test.
2015-12-20 22:34:22 +01:00
Ludovic Courtès
3eb34c631a build-system/gnu: Always pass "-D" to strip/objcopy.
* guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Add "-D" to
  #:strip-flags.
* guix/build/gnu-build-system.scm (strip): Likewise.  Also pass "-D" to
  OBJCOPY-COMMAND.
2015-12-18 23:58:51 +01:00
Ludovic Courtès
9d3994f700 gexp: 'local-file' resolves relative file names.
* guix/gexp.scm (<local-file>): Rename constructor to '%%local-file'.
Add 'absolute' field.
(%local-file, extract-directory, absolute-file-name): New procedures.
(current-source-directory): New macro.
(local-file): Adjust call to '%local-file'.
(local-file-absolute-file-name): New procedure.
(local-file-compiler): Force the 'absolute' field.
* tests/guix-system.sh: Test whether 'local-file' canonicalization
works.
* doc/guix.texi (G-Expressions): Adjust.
2015-12-14 19:57:42 +01:00
Ludovic Courtès
4fef1e850e profiles: Silence Info installation.
* guix/profiles.scm (info-dir-file)[build]: Pass --silent to
'install-info'.
2015-12-14 19:57:42 +01:00
Ludovic Courtès
20464dde13 guix build: Gracefully handle type errors in -e and -f.
* guix/scripts/build.scm (options->things-to-build)[validate-type]: New
procedure.
[ensure-list]: Use it.
2015-12-13 21:13:16 +01:00
Ludovic Courtès
ee2a7e3fd2 guix build: Remove dead code.
* guix/scripts/build.scm (options->things-to-build): Remove unused
'match' clause.
2015-12-13 21:04:56 +01:00
Ludovic Courtès
e82e55e58c Merge branch 'master' into core-updates 2015-12-12 11:48:46 +01:00
Ricardo Wurmus
0f6b9e9828 import: cran: Parse DESCRIPTION instead of HTML.
* guix/import/cran.scm (description->alist, listify,
  beautify-description, description->package): New procedures.
(table-datum, downloads->url, nodes->text, cran-sxml->sexp): Remove
proceduces.
(latest-release): Use parsed DESCRIPTION instead of SXML.
* tests/cran.scm: Rewrite to match importer.
2015-12-11 15:35:07 +01:00
Ricardo Wurmus
b6a222757b import: cran: Match more license strings.
* guix/import/cran.scm (string->license): Match more license strings to
  license symbols.
2015-12-11 15:35:07 +01:00
Ludovic Courtès
873d0ff2cd gnu-maintenance: Really find the latest GNOME releases.
Reported by Efraim Flashner <efraim@flashner.co.il>
at <https://lists.gnu.org/archive/html/guix-devel/2015-12/msg00202.html>.

* guix/gnu-maintenance.scm (latest-ftp-release): Call KEEP-FILE? on
directories too.
(latest-gnome-release)[even-minor-version?]: Protect again MINOR being
false; change pattern to match VERSION with two or more numbers.  Remove
use of 'version-major+minor'.
[even-numbered-tarball?]: Rename to...
[even-numbered?]: ... this.  Use 'package-name->name+version'.  When
VERSION is #f, check NAME.
2015-12-09 22:18:47 +01:00
Ludovic Courtès
a8d65643fb guix build: Add '--check'.
* guix/derivations.scm (build-derivations): Add optional 'mode'
parameter.
* guix/scripts/build.scm (%default-options): Add 'build-mode'.
(show-help, %options): Add '--check'.
(guix-build): Honor 'build-mode' key of OPTS.  Pass it to
'show-what-to-build' and 'build-derivations'.
* doc/guix.texi (Invoking guix build): Document it.
(Substitutes): Mention it.
2015-12-09 14:29:41 +01:00
Ludovic Courtès
58c08df054 derivations: Determine what's built in 'check' mode.
* guix/derivations.scm (substitution-oracle): Add #:mode parameter and
honor it.
(derivation-prerequisites-to-build): Likewise.
[derivation-built?]: Take it into account.
* guix/ui.scm (show-what-to-build): Add #:mode parameter.  Pass it to
'substitute-oracle' and 'derivations-prerequisites-to-build'.
* tests/derivations.scm ("derivation-prerequisites-to-build in 'check'
mode"): New test.
2015-12-09 14:29:41 +01:00
Ludovic Courtès
5b74fe065b guix build: Add '--rounds'.
* guix/scripts/build.scm (show-build-options-help)
(%standard-build-options): Add --rounds.
(set-build-options-from-command-line): Honor it.
* doc/guix.texi (Invoking guix build): Document it.
* doc/contributing.texi (Submitting Patches): Mention it.
2015-12-08 23:58:12 +01:00
Ludovic Courtès
2fba87ac7c store: Allow clients to request multiple builds.
* guix/store.scm (set-build-options): Add #:rounds parameter and honor it.
* tests/store.scm ("build multiple times"): New test.
2015-12-08 23:58:12 +01:00
Ludovic Courtès
c499125704 gnu-maintenance: Exclude development releases from GNOME update candidates.
Suggested by Efraim Flashner <efraim@flashner.co.il>.

* guix/gnu-maintenance.scm (latest-ftp-release): Add #:keep-file?
parameter and honor it.
(latest-gnome-release)[%not-dot]: New variable.
[even-minor-version?, even-numbered-tarball?]: New procedures.
Pass EVEN-NUMBERED-TARBALL? as #:keep-file? argument.
2015-12-08 16:09:33 +01:00
Ludovic Courtès
6efa6f7645 gnu-maintenance: ftp.gnome.org does not provide signatures.
* guix/gnu-maintenance.scm (latest-ftp-release): Add #:file->signature
parameter.  Honor it.
(latest-gnome-release): Pass #:file->signature.
* guix/upstream.scm (coalesce-sources): Keep 'signature-urls' as #f
unless both sources provide it.
2015-12-07 23:57:20 +01:00
Ludovic Courtès
e80c0f85ba gnu-maintenance: Add GNOME updater.
* guix/gnu-maintenance.scm (ftp-server/directory)[quirks]: Remove glib.
(false-if-ftp-error): New macro.
(latest-release*): Use it.
(non-emacs-gnu-package?): Rename to...
(pure-gnu-package?): ... this.  Add call to 'gnome-package?'.
(%gnu-updater): Adjust accordingly.
(gnome-package?, latest-gnome-release): New procedures.
(%gnome-updater): New variable.
* guix/scripts/refresh.scm (%updaters): Add %GNOME-UPDATER.
* doc/guix.texi (Invoking guix refresh): Mention it.
2015-12-07 23:32:01 +01:00
Ludovic Courtès
e946f2ec92 gnu-maintenance: Generalize 'latest-ftp-release'.
* guix/gnu-maintenance.scm (latest-release): Rename to...
(latest-ftp-release): ... this.  Add #:server and #:directory
parameters.
(latest-release): New procedure.
2015-12-07 23:32:01 +01:00
Ludovic Courtès
fba607b129 refresh: Bail out when asked for a nonexistent updater.
* guix/scripts/refresh.scm (lookup-updater): Call 'leave' when 'find'
returns #f.
2015-12-07 23:32:01 +01:00
Ludovic Courtès
e3cc793e7c gnu-maintenance: Do not look for releases in "w32" sub-directories.
* guix/gnu-maintenance.scm (latest-release): Filter out "w32"
directories.
2015-12-07 23:32:01 +01:00
Ludovic Courtès
202440e07a gnu-maintenance: Add tests for 'release-file?'.
* tests/gnu-maintenance.scm: New file.
* Makefile.am (SCM_TESTS): Add it.
* guix/gnu-maintenance.scm (release-file?): Export.
2015-12-07 23:32:01 +01:00
Ludovic Courtès
fa04a04f18 gnu-maintenance: Properly handle TeXmacs.
* guix/gnu-maintenance.scm (ftp-server/directory): Add comment.
(release-file?): Use 'string-ci=?' instead of 'equal?' when comparing
project names.
2015-12-07 23:32:01 +01:00
Ludovic Courtès
f00dccf441 gnu-maintenance: Adjust tarball regexp for IceCat tarballs.
* guix/gnu-maintenance.scm (%tarball-rx): Tweak to match IceCat tarball
patterns.
2015-12-07 23:32:01 +01:00
Ludovic Courtès
b6124f00b8 gnu-maintenance: Fix URLs returned by 'latest-release' for deep trees.
With this, (latest-release "gcc") returns an <upstream-source> with URL:

  ftp://ftp.gnu.org/gnu/gcc/gcc-5.3.0/gcc-5.3.0.tar.gz

Previous it would omit "gcc-5.3.0/" from the URL.

Fixes a regression introduced in 0a7c5a0.

* guix/gnu-maintenance.scm (latest-release)[file->url, file->source]:
Add 'directory' parameter.  Update users.
2015-12-07 23:32:01 +01:00
Mathieu Lirzin
cd08fe4259 edit: Don't assume that an emacs daemon is running.
* guix/scripts/edit.scm (%editor): Use Emacs as a default value.
2015-12-06 17:23:25 +01:00
Mathieu Lirzin
b16dbd1311 edit: Allow command line arguments in $VISUAL and $EDITOR.
* guix/scripts/edit.scm (guix-edit): Fix the assumption that %editor is
a one word command.
2015-12-06 17:23:21 +01:00
Ludovic Courtès
2aacd9179c profiles: Silence GTK+ icon cache creation.
Suggested by Ricardo Wurmus <rekado@elephly.net>.

* guix/profiles.scm (gtk-icon-themes)[build]: Pass --quiet to
'gtk-update-icon-cache'.
2015-12-04 23:12:02 +01:00
Ludovic Courtès
4bddf74ef2 profiles: Silence GTK+ icon theme union.
Suggested by Ricardo Wurmus <rekado@elephly.net>.

* guix/profiles.scm (gtk-icon-themes)[build]: Pass 'union-build' a
  #:log-port argument.
2015-12-04 23:12:02 +01:00
Ludovic Courtès
2734cbb895 store: 'build-things' now supports older daemon protocols.
This is a followup to d203d3d.

* guix/store.scm (build-things): Add 'build/old'.  Use it when STORE's
minor version is less than 15.
2015-12-04 11:34:18 +02:00
Ludovic Courtès
07e70f4846 store: Add mode parameter to 'build-paths'.
* guix/store.scm (%protocol-version): Set minor to 15.
(build-mode): New enumerate type.
(build-things): Add 'mode' parameter; pass it to the RPC.
* tests/store.scm ("build-things, check mode"): New check.
2015-12-03 19:09:53 +02:00
Ludovic Courtès
d203d3d4cb store: Update to the new daemon protocol.
* guix/store.scm (%protocol-version): Set minor to 14.
(open-connection): Add 'cpu-affinity' parameter and honor it.
2015-12-03 19:09:53 +02:00
Ludovic Courtès
85dce718cb import: pypi: Updater silently ignores packages without source.
Reported by Andreas Enge <andreas@enge.fr>
at <https://lists.gnu.org/archive/html/guix-devel/2015-11/msg00764.html>.

* guix/import/pypi.scm (&missing-source-error): New error type.
(latest-source-release): Raise it instead of using 'error'.
(pypi->guix-package): Guard against it and use 'leave' to report the
error.
(latest-release): Guard against it and return #f when caught.
2015-12-01 23:18:48 +01:00
Ludovic Courtès
64ec0e2912 guix build: Modularize transformation handling.
* guix/scripts/build.scm (options/resolve-packages): Remove.
(options->things-to-build, transform-package-source): New procedure.
(%transformations): New variable.
(options->transformation): New procedure.
(options->derivations): Rewrite to use 'options->things-to-build' and
'options->transformation'.
2015-12-01 00:02:54 +02:00
Ludovic Courtès
27b91d7851 guix package: Refactor 'options->installable'.
* guix/scripts/package.scm (options->upgrade-predicate)
(store-item->manifest-entry): New procedures.
* guix/scripts/package.scm (options->installable): Use them.  Remove the
'packages-to-upgrade' and 'packages-to-install' variables by getting rid
of a level of indirection.
2015-12-01 00:02:54 +02:00
Ludovic Courtès
6e37017506 guix package: Move 'process-actions' out of sight.
* guix/scripts/package.scm (process-actions): New procedure, moved
from...
(guix-package): ... here.  Adjust accordingly.
2015-12-01 00:02:54 +02:00
Ludovic Courtès
590558953b guix package: Formalize the list of actions.
* guix/scripts/package.scm (roll-back-action, switch-generation-action)
(delete-generations-action, manifest-action): New procedures.
(%actions): New variable.
* guix/scripts/package.scm (guix-package)[process-action]: Rewrite to
traverse %ACTIONS.
2015-12-01 00:02:54 +02:00
Ludovic Courtès
d1ac5c0775 guix package: Move 'build-and-use-profile' out of sight.
* guix/scripts/package.scm (build-and-use-profile): New procedure.
Adapted and moved from...
(guix-package)[process-actions]: ... here.  Adjust call sites.
2015-12-01 00:02:54 +02:00
Ludovic Courtès
2cc10077f3 guix package: Move a couple of procedures out of sight.
* guix/scripts/package.scm (ensure-default-profile, process-query): New
procedures, moved from...
(guix-package): ... here.
2015-12-01 00:02:54 +02:00
Ludovic Courtès
0993f94267 guix package: Remove unnecessary use of (%store).
* guix/scripts/package.scm (delete-matching-generations): Use STORE
instead of (%store).
2015-12-01 00:02:54 +02:00
Ludovic Courtès
a665996f58 gnu: python: Set SOURCE_DATE_EPOCH to 1 instead of 0.
* gnu/packages/python.scm (python-2)[arguments]: Set SOURCE_DATE_EPOCH
  to 1 to match what the daemon does.
* guix/build/python-build-system.scm (set-SOURCE-DATE-EPOCH): Likewise.
2015-11-29 22:59:28 +01:00
Ludovic Courtès
dedc832070 gnu: python-2: Honor 'SOURCE_DATE_EPOCH'.
* gnu/packages/patches/python-2.7-source-date-epoch.patch: New file.
* gnu/packages/python.scm (python-2)[source]: Use it.
  [arguments]: Set SOURCE_DATE_EPOCH in 'patch-lib-shells' phase.
* guix/build/python-build-system.scm (set-SOURCE-DATE-EPOCH): New
  procedure.
  (%standard-phases): Add it.
* gnu-system.am (dist_patch_DATA): Add patch.
2015-11-29 22:59:28 +01:00
Ludovic Courtès
26059753ae refresh: Check updater availability at run time.
This is a followup to b68d2db, which added a check for updaters at
macro-expansion time.  The problem is that, when running 'guix pull',
Guile-JSON is found, so the PyPi updater (say) is added to %UPDATERS,
but then at run time Guile-JSON might be missing.

Reported by orbea on #guix.

* guix/scripts/refresh.scm (maybe-updater): Rewrite as 'syntax-rules'.
Produce code that checks conditions at run time.
(list-updaters): Update docstring.
2015-11-29 22:56:29 +01:00
Ludovic Courtès
25d188ce12 http-client: 'http-fetch' converts strings to URIs.
* guix/http-client.scm (http-fetch): Use 'string->uri' if URI is a
string.  Fixes a regression introduced in 8a5063f.
2015-11-29 17:46:11 +01:00
Ludovic Courtès
841cb43c6b guix build: Factorize build log query.
* guix/scripts/build.scm (show-build-log): New procedure.
(guix-build): New variable 'items'.  Use it and 'show-build-log'.
2015-11-29 17:42:01 +01:00
Ludovic Courtès
471cdfdb19 environment: Set build options early on.
This fixes a bug whereby some options, such as #:substitute-urls, would
be passed to the daemon too late to have an effect.

* guix/scripts/environment.scm (build-inputs): Remove call to
'set-build-options-from-command-line*'.
(guix-environment): Add call to 'set-build-options-from-command-line' as
early as possible.
2015-11-28 21:53:51 +01:00
Ludovic Courtès
4e70fe4d0e lint: Do not report already-patched vulnerabilities.
* guix/scripts/lint.scm (patch-file-name): New procedure.
(check-vulnerabilities): Use it to filter out patched vulnerabilities.
* tests/lint.scm ("cve: one patched vulnerability"): New test.
2015-11-28 16:15:31 +01:00
Ludovic Courtès
ae4427e3f3 substitute: Warn upon store prefix mismatches.
Suggested by Hynek Urban <hynek.urban@gmail.com>.

* guix/scripts/substitute.scm (fetch-narinfos): Move body to...
[do-fetch]: ... here.  New procedure.
Emit a warning when CACHE-INFO's prefix does not match.
2015-11-28 00:02:23 +01:00
Ludovic Courtès
5432734b00 lint: Add "cve" checker.
Fixes <http://bugs.gnu.org/21289>.

* guix/scripts/lint.scm (package-name->cpe-name, package-vulnerabilities)
(check-vulnerabilities): New procedures.
* guix/scripts/lint.scm (%checkers): Add "cve" checker.
* tests/lint.scm ("cve", "cve: one vulnerability"): New tests.
* doc/guix.texi (Invoking guix lint): Mention it.
2015-11-26 23:04:19 +01:00
Ludovic Courtès
0eef755130 Add (guix cve).
* guix/cve.scm, tests/cve-sample.xml, tests/cve.scm: New files.
* Makefile.am (MODULES): Add guix/cve.scm.
(SCM_TESTS): Add tests/cve.scm.
(EXTRA_DIST): Add tests/cve-sample.scm.
2015-11-26 22:35:01 +01:00
Ludovic Courtès
8a5063f777 http-client: 'http-fetch' and 'http-fetch/cached' support HTTPS.
* guix/http-client.scm (http-fetch): Use 'open-connection-for-uri', to
support HTTPS.
2015-11-26 21:07:25 +01:00
Federico Beffa
d8c66da7c1 import: hackage: Assume current 'ghc' package version.
* guix/scripts/import/hackage.scm (%default-options): Do it.
  (ghc-default-version): New variable.
2015-11-26 18:17:23 +01:00
Federico Beffa
96018e21e7 import: hackage: Handle CRLF end of line style.
* guix/import/hackage.scm (hackage-fetch, hackage->guix-package): Use
  'canonical-newline-port'.
2015-11-26 18:17:23 +01:00
Federico Beffa
c8be6f0d4a utils: Add 'canonical-newline-port'.
* guix/utils.scm (canonical-newline-port): New procedure.
* tests/utils.scm ("canonical-newline-port"): New test.
2015-11-26 18:17:23 +01:00
Federico Beffa
94abc84887 import: hackage: Make parsing of tests and fields more flexible.
* guix/import/cabal.scm (is-test): Allow spaces between keyword and
  parentheses.
  (is-id): Add argument 'port'.  Allow spaces between keyword and column.
  (lex-word): Adjust call to 'is-id'.
2015-11-26 18:17:23 +01:00
Federico Beffa
876fd23ab6 import: hackage: Make it resilient to missing final newline.
* guix/import/cabal.scm (peek-next-line-indent): Check for missing final
  newline.
2015-11-26 18:17:23 +01:00
Federico Beffa
9be54eb1b1 import: hackage: Imporve parsing of tests.
* guix/import/cabal.scm (lex-word): Add support for tests with no spaces.
  (impl): Rewrite.
2015-11-26 18:17:23 +01:00
Federico Beffa
7716f55c83 import: hackage: Add recognition of 'true' and 'false' symbols.
* guix/import/cabal.scm (is-true, is-false, lex-true, lex-false): New procedures.
  (lex-word): Use them.
  (make-cabal-parser): Add TRUE and FALSE tokens.
  (eval): Add entries for 'true and 'false symbols.
2015-11-26 18:17:22 +01:00
Ludovic Courtès
851b6f6283 gexp: Build text derivations locally.
* guix/gexp.scm (gexp->file): Pass #:substitutable? #f.
(text-file*): Likewise, and #:local-build? #t.
2015-11-25 11:59:54 +01:00
Ludovic Courtès
cc3de1da41 guix package: Reduce startup time by ~50%.
As measured with:

  time sh -c 'for i in `seq 1 10` ; do guix package --search-paths ; done'

On my machine, when running:

  strace -o ,,s guix package --search-paths

the number returned by:

  grep -E '^(open|l?stat).*\.go' ,,s | wc -l

drops from 1610 to 837.

* guix/scripts/package.scm: Remove two unnecessary #:use-module forms.
Autoload (gnu packages ...) modules.
2015-11-24 18:19:25 +01:00
Ludovic Courtès
38b92daa81 graph: Add '%bag-with-origins-node-type'.
* guix/scripts/graph.scm (bag-node-edges): Remove 'filter' call.  Add
case for 'origin'.
(%bag-node-type)[edges]: Add filtering here.
(%bag-with-origins-node-type): New variable.
(%node-types): Add it.
* tests/graph.scm ("bag DAG, including origins"): New test.
* tests/guix-graph.sh: Add 'bag-with-origins'.
* doc/guix.texi (Invoking guix graph): Document it.
2015-11-23 23:34:15 +01:00
Ludovic Courtès
2d7fc7daf1 refresh: Add '--expression'.
* guix/scripts/refresh.scm (%options, show-help): Add --expression.
(guix-refresh): Honor it.
* doc/guix.texi (Invoking guix refresh): Document it.
2015-11-23 17:48:35 +01:00
Ludovic Courtès
86cdfc451b guix download: Fail when more than one URL is passed.
* guix/scripts/download.scm (guix-download)[parse-option]: Call 'leave'
when passed an extra argument.
* tests/guix-download.sh: Add test.
2015-11-23 17:48:35 +01:00
Ludovic Courtès
71ae18ee52 guix download: Gracefully handle missing arguments.
Fixes <http://bugs.gnu.org/21991>.
Reported by Jan Synáček <jan.synacek@gmail.com>.

* guix/scripts/download.scm (guix-download): Call 'leave' when OPTS does
not contain an 'argument' key.
2015-11-23 17:48:35 +01:00
Ludovic Courtès
862d2479f6 ftp-client: Default port for 'ftp-open' is now "ftp".
* guix/ftp-client.scm (ftp-open): Change default #:port to "ftp".
* guix/scripts/lint.scm (probe-uri): Remove 'port' parameter to
'ftp-open'.
2015-11-22 14:35:28 +01:00
Ludovic Courtès
d6d33984df ftp-client: Fix off-by-one when trying addresses in 'ftp-open'.
* guix/ftp-client.scm (ftp-open): Change to use 'match' instead of
car/cdr, and fix off-by-one (was '(null? addresses)' instead of
'(null? (cdr addresses))'.)
2015-11-22 14:16:36 +01:00
Ludovic Courtès
82e64fc14e environment: Correctly handle abnormal exits.
Fixes <http://bugs.gnu.org/21958>.

* guix/scripts/environment.scm (status->exit-code): New procedure.
(exit/status, primitive-exit/status): Use it.
* tests/guix-environment-container.sh: Add test.
2015-11-21 22:26:13 +01:00
Ludovic Courtès
a51cbecb44 refresh: Rewrite '--list-dependent' in terms of (guix graph).
* guix/scripts/refresh.scm (all-packages, list-dependents): New
procedures.
(guix-refresh): Use it.
2015-11-21 16:27:34 +01:00
Ludovic Courtès
923d846c4d graph: Add procedures to query a node's edges.
* guix/graph.scm (%node-edges, node-edges, node-back-edges)
(node-transitive-edges): New procedures.
* tests/graph.scm ("node-edges")
("node-transitive-edges + node-back-edges"): New tests.
2015-11-21 16:26:43 +01:00
Ludovic Courtès
8fb583714f Add (guix graph).
* guix/scripts/graph.scm (<node-type>, <graph-backend>, emit-prologue)
(emit-epilogue, emit-node, emit-edge, %graphviz-backend, export-graph):
Move to...
* guix/graph.scm: ... here.  New file.
* guix/scripts/system.scm, tests/graph.scm: Use it.
* Makefile.am (MODULES): Add it.
2015-11-21 16:26:43 +01:00
Ludovic Courtès
b7f4677999 ftp-client: Restrict to TCP/IP connections.
Fixes <http://bugs.gnu.org/21925>.
Regression introduced in 279ec1d.
Reported by Chris Marusich <cmmarusich@gmail.com>.

* guix/ftp-client.scm (ftp-open): Restrict sockets to
  SOCK_STREAM/IPPROTO_IP.
2015-11-17 09:44:52 +01:00
Ludovic Courtès
333c376c45 graft: Graft files in parallel.
* guix/build/graft.scm (rewrite-directory): Use 'n-par-for-each' instead
  of 'for-each'.
2015-11-16 14:22:58 +01:00
Ludovic Courtès
9c88f655e6 graft: Graft files in a deterministic order.
* guix/build/graft.scm (rewrite-directory)[rewrite-leaf]: Change to take
  a single parameter.  Add call to 'lstat'.  Factorize result of
  'destination'.
  Use 'find-files' instead of 'file-system-fold'.
2015-11-16 14:22:58 +01:00
Alex Kost
f7dbeb376b build-system/gnu: Set 'SOURCE_DATE_EPOCH'.
Suggested by Ludovic Courtès <ludo@gnu.org>.

* guix/build/gnu-build-system.scm (gnu-build): Set SOURCE_DATE_EPOCH for
  deterministic builds.
2015-11-14 21:59:37 +03:00
Ludovic Courtès
bd7e1ffae6 lint: Have connections time out after 3 seconds.
* guix/scripts/lint.scm (probe-uri): Add #:timeout parameter.  Pass it
  to 'open-connection-for-uri' and 'ftp-open'.
  (validate-uri): Pass #:timeout 3 to 'probe-uri'.
2015-11-12 23:47:01 +01:00
Ludovic Courtès
1b9aefa394 download: Always use AI_ADDRCONFIG when resolving host names.
* guix/build/download.scm (open-socket-for-uri): Always pass
  AI_ADDRCONFIG to 'getaddrinfo' as recommended in the fine Guile
  manual.
* guix/ftp-client.scm (ftp-open): Ditto.
2015-11-12 23:47:01 +01:00
Ludovic Courtès
60fd51222f download: Add timeout parameter for connections.
* guix/build/download.scm (ensure-uri): New procedure.
(current-http-proxy): New variable.
(open-socket-for-uri): Copy from Guile commit aaea5b2, but add #:timeout
parameter and use 'connect*' instead of 'connect'.
(open-connection-for-uri): Add #:timeout parameter and pass it to
'open-socket-for-uri'.
2015-11-12 23:47:00 +01:00
Ludovic Courtès
4856700698 ftp-client: Add timeout parameter to 'ftp-open'.
* guix/ftp-client.scm (catch-EINPROGRESS): New macro.
(connect*): New procedure.
(ftp-open): Add #:timeout parameter.  Use 'connect*' instead of
'connect' and pass it TIMEOUT.
2015-11-12 23:47:00 +01:00
Ludovic Courtès
279ec1df20 ftp-client: Restrict to TCP connections.
* guix/ftp-client.scm (ftp-open): Force SOCK_STREAM as the socket type
  to avoid calling 'connect' on a datagram socket.
2015-11-12 23:47:00 +01:00
Ludovic Courtès
3a96d7c3dd guix gc: Error out when extra arguments are passed.
Fixes <http://bugs.gnu.org/21817>.
Reported by Petter Berntsen <petter@mykolab.ch>.

* guix/scripts/gc.scm (guix-gc)[assert-no-extra-arguments]: New
  procedure.
  Use it for actions 'collect-garbage', 'optimize', and 'verify'.
* tests/guix-gc.sh: Add tests.
2015-11-11 23:29:20 +01:00
Ludovic Courtès
6237b9fa39 edit: Honor $VISUAL.
Suggested by Andreas Enge <andreas@enge.fr>.

* guix/scripts/edit.scm (%editor): Honor 'VISUAL' before 'EDITOR'.
  (show-help): Adjust accordingly.
* doc/guix.texi (Invoking guix edit): Likewise.
2015-11-11 23:29:20 +01:00
Ludovic Courtès
14649b8cdb refresh: Avoid non-literal format string.
Reported by Mathieu Lirzin <mthl@gnu.org>.

* guix/scripts/refresh.scm (guix-refresh): Rewrite 'list-dependent?'
  report to avoid nested 'N_' calls.
2015-11-11 22:10:21 +01:00
Ludovic Courtès
2ab5fdc4b4 ui: 'guix help COMMAND' is like 'guix COMMAND --help'.
* guix/ui.scm (run-guix): Add ("help" COMMAND) case.
2015-11-11 00:37:51 +01:00