Commit Graph

3048 Commits (19fd7229bc668e5b34adc5357557aff3f62b9308)

Author SHA1 Message Date
Mathieu Othacehe 3241f7ff92
scripts: system: Adapt "switch-generation" to new bootloader API.
* guix/scripts/system.scm (reinstall-grub): Rename to
  reinstall-bootloader. Read boot-device and boot-type from parameters file to
  be able to restore the correct bootloader on specified device.
  Factorize bootloader installation code by calling install-bootloader.
 (system-bootloader-name): New procedure.
 (switch-to-system-generation): Adapt.
2017-05-16 14:41:02 +02:00
Mathieu Othacehe 1229d328fb
scripts: system: Adapt "init" to new bootloader API.
* guix/scripts/system.scm (install): Pass installer a new
argument. Rename other arguments.
Call install-bootloader instead of install-grub*.
(perform-action): Adapt.
2017-05-16 14:41:02 +02:00
Mathieu Othacehe 3042c5d8bb
scripts: system: Adapt "reconfigure" to new bootloader API.
* guix/scripts/system.scm (install-grub*): Rename to install-bootloader.  Use
keys to pass arguments.  Pass a new argument, "installer-drv" which is a script
in store dealing with bootloader-specific install actions.  Also call
"install-boot-config" to install the bootloader config file.

(install-bootloader-derivation): New procedure.  It returns a derivation that
builds a file containing "install-procedure" gexp.

(perform-action): Build install-proc derivation and call install-bootloader
with the resulting file.  Stop adding GRUB to PATH as bootloaders are called in
install-proc with direct store paths.
2017-05-16 14:41:01 +02:00
Mathieu Othacehe b09a8da4a2
bootloader: Add extlinux support.
* gnu/bootloader.scm: New file.
* gnu/bootloader/extlinux.scm: New file.
* gnu/bootloader/grub.scm: New file.
* gnu/local.mk: Build new files.
* gnu/system.scm: Adapt to new bootloader api.
* gnu/scripts/system.scm: Adapt to new bootloader api.
* gnu.scm: Remove (gnu system grub) and replace by (gnu bootloader) and (gnu
bootloader grub) modules.
* gnu/system/grub.scm: Moved content to gnu/bootloader/grub.scm.
* gnu/system/vm: Replace (gnu system grub) module by (gnu bootloader).
* gnu/tests.scm: Ditto.
* gnu/tests/nfs.scm: Ditto.
2017-05-16 14:41:01 +02:00
Ludovic Courtès ce92d269fe
ui: Disable Guile deprecation warnings by default.
* guix/ui.scm (initialize-guix): Call (debug-disable 'warn-deprecated)
when "GUILE_WARN_DEPRECATED" is not set.
2017-05-16 14:31:37 +02:00
Ludovic Courtès f411124321
utils: 'compressed-file?' matches ".lzma" files.
* guix/utils.scm (compressed-file?): Add "lzma" to the list.
2017-05-15 23:55:10 +02:00
Ricardo Wurmus 095494ed6c
licenses: Add EDL 1.0.
* guix/licenses.scm (edl1.0): New variable.
2017-05-15 22:33:17 +02:00
Ludovic Courtès 1812205cf5
bournish: 'ls' adjusts the column width depending on the entries.
* guix/build/bournish.scm (display-tabulated): Remove #:columns and
  #:column-width parameters.  Add #:terminal-width and #:column-gap.
  Compute COLUMN-WIDTH and COLUMNS.
2017-05-13 16:52:11 +02:00
Ludovic Courtès c7d1b061f5
bournish: 'ls' lists directory contents.
Suggested by Ricardo Wurmus.

* guix/build/bournish.scm (ls-command-implementation): When FILE is a
directory, list its contents rather than FILE itself.
2017-05-13 16:52:11 +02:00
Mathieu Othacehe 22fc581db3
import: pypi: Robustify latest-release.
* guix/import/pypi.scm (latest-release): Check if pypi-fetch has
  failed. If so return #f, else construct the <upstream-source>.
2017-05-13 12:40:20 +02:00
Mathieu Othacehe db427602d8
import: cran: Robustify cran-package?.
* guix/import/cran.scm (package->upstream-name): Return #f if url
  start and end index could not be determined.
  (cran-package?): Check if the upstream-name can be extracted from
  given package.
* tests/cran.scm: Add "r-minimal is not a cran package" to make sure that
  r-minimal is not detected as a cran package.

This fixes a failure of guix refresh on r-minimal because no
upsteam-name can be determined from ".../R-version.tar.gz" uri.
2017-05-13 12:40:20 +02:00
Ludovic Courtès e06ca952ed
scripts: Do not create the config directory.
This fixes runs of 'guix package' and 'guix system' tests in
environments where $HOME is read-only.

* guix/ui.scm (config-directory): Add #:ensure? parameter and honor it.
* guix/scripts.scm (warn-about-old-distro): Pass #:ensure? #f to
'config-directory'.
2017-05-13 00:03:46 +02:00
Ludovic Courtès 5db5dff53d
substitute: Honor 'Cache-Control' on 404 responses.
* guix/scripts/substitute.scm (cached-narinfo): When VALUE is #f, use
the TTL that is read instead of %NARINFO-NEGATIVE-TTL.
(cached-narinfo-expiration-time): Likewise.
2017-05-11 18:05:42 +02:00
Ludovic Courtès 24b21720f7
publish: Advertise a short TTL for "baking" 404s.
* guix/scripts/publish.scm (not-found): Add #:phrase and #:ttl
parameters and honor them.
* tests/publish.scm ("with cache"): Check the 'cache-control' header on
of the 404 response.
2017-05-11 18:05:42 +02:00
Roel Janssen 5899fafbfe
graph: Add Cypher backend.
* guix/graph.scm (%cypher-backend): New variable.
* doc/guix.texi: Add documentation for the Cypher backend of 'guix graph'.
2017-05-11 16:17:49 +02:00
Ludovic Courtès bc0e6c9312
scripts: Fix singular/plural message mismatch.
* guix/scripts.scm (warn-about-old-distro): Swap singular and plural
forms in 'N_' call.
2017-05-10 23:38:04 +02:00
Ben Woodcroft c6cfec42b0
build-system: Add package-with-ocaml4.01.
* guix/build-system/ocaml.scm (default-ocaml4.01, default-ocaml4.01-findlib,
package-with-explicit-ocaml, package-with-ocaml4.01,
strip-ocaml4.01-variant): New variables.
2017-05-10 22:13:54 +02:00
Ludovic Courtès 7fd952e052
scripts: Warn about old distro.
Fixes <http://bugs.gnu.org/25852>.
Suggested by Mark H Weaver <mhw@netris.org>.

* guix/scripts.scm (%distro-age-warning): New variable.
(warn-about-old-distro): New procedure.
* guix/scripts/package.scm (process-actions): Call
'warn-about-old-distro'.
* guix/scripts/system.scm (process-action): Likewise.
2017-05-10 22:09:08 +02:00
Ludovic Courtès 30d2397f73
ui: 'string->duration' correctly handles hours.
* guix/ui.scm (string->duration): Add missing '=>' for hours.
* tests/ui.scm ("duration, 2 hours"): New test.
2017-05-10 22:05:21 +02:00
Hartmut Goebel 59135f0d7e
guix: Add java-utils.
* guix/build/java-utils.scm: New file.
* guix/build-system/ant.scm: Use it.
* Makefile.am (MODULES): Add it.

Co-authored-by: Ricardo Wurmus <rekado@elephly.net>
2017-05-10 17:59:22 +02:00
Ricardo Wurmus 52a791f50f
ant-build-system: Add default "check" target.
* guix/build-system/ant.scm (ant-build): Change default test target to
"check"; add "test-dir" argument.
* guix/build/ant-build-system.scm (default-build.xml): Add "test-dir"
argument; add ant targets "compile-tests" and "check".
(configure): Add "test-dir" argument; pass it to "default-build.xml".
2017-05-10 17:59:22 +02:00
Hartmut Goebel 8df64f7384
ant-build-system: Allow specifying source directory.
* guix/build-system/ant.scm (ant-build),
guix/build/ant-build-system.scm (default-build.xml): Add parameter
source-dir.
* guix/build/ant-build-system.scm (configure): Pass source-dir on to
default-build.xml.
* doc/guix.texi (Build Systems): Document it.

Co-authored-by: Ricardo Wurmus <rekado@elephly.net>
2017-05-10 17:59:22 +02:00
Ludovic Courtès 07a0f68fa5
pull: Build package modules without optimizations on Guile 2.2.
* guix/build/pull.scm (%default-optimizations)
(%lightweight-optimizations): New variables.
(optimization-options): New procedure.  Taken from
build-aux/compile-all.scm.
(build-guix): Pass it to 'compile-file'.
2017-05-09 18:08:24 +02:00
Ludovic Courtès 838ba73d6e
pull: Build with the matching Guile major version.
Previously, 'guix pull' would always build with Guile 2.0.
Now it builds with the Guile that matches (effective-version).

* build-aux/build-self.scm (false-if-wrong-guile)
(package-for-current-guile): New procedures.
(guile-json, guile-ssh): Use it.
(guile-for-build): New procedure.
(build): Use (effective-version) instead of the hard-coded "/2.0".
Add (guix modules) closure to #:modules argument.  Pass
\#:guile-for-build argument to 'gexp->derivation'.
* guix/build/pull.scm (depends-on-guile-ssh?, all-scheme-files): New
procedures.
(build-guix): Show the output of (version).  Use the above procedures.
Filter out files that match 'depends-on-guile-ssh?' when (ssh session)
is missing.
2017-05-09 18:08:24 +02:00
Ludovic Courtès 402e98c524
pull: Use 'with-store'.
* guix/scripts/pull.scm (guix-pull): Remove call to 'open-connection'.
Use 'with-store' instead.
2017-05-09 18:08:24 +02:00
Ludovic Courtès 4902d3c4e0
pull: Honor the standard build options.
Reported by Niall Dooley <dooleyn@gmail.com>
in <https://lists.gnu.org/archive/html/help-guix/2017-05/msg00038.html>.

* guix/scripts/pull.scm (%options): Add --dry-run and all of
%STANDARD-BUILD-OPTIONS.
(show-help): Add call to 'show-build-options-help'.
(%default-options): Add 'system', 'substitutes?', 'graft?',
'max-silent-time', and 'verbosity'.
(guix-pull)[parse-options]: Remove.
Use 'parse-command-line' instead.  Honor --dry-run.
2017-05-09 18:08:24 +02:00
Ludovic Courtès ba2260dbbc
git-download: Fix 'git-predicate' file membership.
Previously, it the predicate would return #t for "m4/ChangeLog" if
"ChangeLog" (in the top-level directory) was in FILES.  This commit
fixes the ambiguity.

* guix/git-download.scm (git-predicate): Add 'inodes' variable.  Use it
to determine file membership.
2017-05-07 18:08:11 +02:00
Ludovic Courtès 950d51c9d9
store: Use 'TCP_NODELAY' when connecting to a daemon over PF_INET.
* guix/store.scm (open-inet-socket): Add 'cond-expand' form to define
'TCP_NODELAY' when needed.  Add call to 'setsockopt' after 'connect'.
2017-05-07 00:18:36 +02:00
Leo Famulari 40d728a87d
Revert "guix: git: Add new module."
This reverts commit a70b784708.

Commit a70b784708 caused `guix pull` to fail:

ERROR: In procedure scm-error:
ERROR: no code for module (git)
2017-05-05 20:12:57 -04:00
Mathieu Othacehe a70b784708
guix: git: Add new module.
* guix/git.scm: New file.
* configure.ac: Check for (guile git).
* Makefile.am: Build guix/git.scm if (guile git) is available.
2017-05-05 19:52:38 +02:00
Danny Milosavljevic 7e3f7acbe0
scripts: Remove profile-grub-entries.
* guix/scripts/system.scm (profile-grub-entries): Delete variable.
2017-05-05 15:03:48 +02:00
Danny Milosavljevic bf8b09169c
system: grub: Use boot-parameters instead of menu-entry where possible.
* gnu/system/grub.scm (boot-parameters->menu-entry): New variable.
(grub-configuration-file): Use boot-parameters
instead of menu-entry where possible.
* guix/scripts/system.scm (profile-boot-parameters): Update docstring.
(reinstall-grub): Use profile-boot-parameters.
(perform-action): Use profile-boot-parameters.
2017-05-05 15:03:48 +02:00
Danny Milosavljevic 0315abe608
scripts: Make boot-parameters label include generation number and time.
* guix/scripts/system.scm (system->boot-parameters): Make label include
generation number and time.
2017-05-05 15:03:47 +02:00
Danny Milosavljevic 9530e73b49
system: Introduce read-boot-parameters-file.
* gnu/system.scm (read-boot-parameters): Remove export.
(read-boot-parameters-file): New variable. Export it.
* guix/scripts/system.scm (profile-boot-parameters): Use
read-boot-parameters-file.
(profile-grub-entries): Use read-boot-parameters-file.
(reinstall-grub): Use read-boot-parameters-file.
(display-system-generation): Use read-boot-parameters-file.
2017-05-05 15:03:47 +02:00
Ludovic Courtès 396d12faea
store: Use 'write-bytevector' instead of hand-coded equivalent.
* guix/store.scm (process-stderr): Use 'write-bytevector' in the
%STDERR-READ case.
2017-05-04 18:05:05 +02:00
Ludovic Courtès cd041b268e
store: Add store path computation procedures.
* guix/derivations.scm (compressed-hash, store-path)
(output-path, fixed-output-path): Move to...
* guix/store.scm: ... here.
2017-05-04 18:05:05 +02:00
Tobias Geerinckx-Rice 74067fedce
environment: Correct typo.
* guix/scripts/environment.scm (create-environment): Fix typo.
2017-05-04 12:52:23 +02:00
Ludovic Courtès 634088a565
refresh: Use (guix discovery).
* guix/scripts/refresh.scm (maybe-updater, list-updaters): Remove.
(importer-modules): New procedure.
(%updaters): Define using 'fold-module-public-variables'.  Turn into a
promise and adjust users.
2017-05-03 23:50:15 +02:00
Ludovic Courtès cd903ef787
Add (guix discovery).
* guix/discovery.scm, tests/discovery.scm: New files.
* gnu/packages.scm (scheme-files, file-name->module-name)
(scheme-modules, all-package-modules): Remove.
(fold-packages): Rewrite in terms of 'fold-module-public-variables'.
* gnu/tests.scm: Use (guix discovery).
* Makefile.am (MODULES): Add guix/discovery.scm.
(SCM_TESTS): Add tests/discovery.scm.
2017-05-03 23:50:15 +02:00
Ludovic Courtès 69daee23af
ui: Rename '_' to 'G_'.
This avoids collisions with '_' when the latter is used as a 'match'
pattern for instance.  See
<https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>.

* guix/ui.scm: Rename '_' to 'G_'.
* po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly.
* build-aux/compile-all.scm (warnings): Remove 'format'.
* gnu/packages.scm,
gnu/services.scm,
gnu/services/shepherd.scm,
gnu/system.scm,
gnu/system/shadow.scm,
guix/gnupg.scm,
guix/http-client.scm,
guix/import/cpan.scm,
guix/import/elpa.scm,
guix/import/pypi.scm,
guix/nar.scm,
guix/scripts.scm,
guix/scripts/archive.scm,
guix/scripts/authenticate.scm,
guix/scripts/build.scm,
guix/scripts/challenge.scm,
guix/scripts/container.scm,
guix/scripts/container/exec.scm,
guix/scripts/copy.scm,
guix/scripts/download.scm,
guix/scripts/edit.scm,
guix/scripts/environment.scm,
guix/scripts/gc.scm,
guix/scripts/graph.scm,
guix/scripts/hash.scm,
guix/scripts/import.scm,
guix/scripts/import/cpan.scm,
guix/scripts/import/cran.scm,
guix/scripts/import/crate.scm,
guix/scripts/import/elpa.scm,
guix/scripts/import/gem.scm,
guix/scripts/import/gnu.scm,
guix/scripts/import/hackage.scm,
guix/scripts/import/nix.scm,
guix/scripts/import/pypi.scm,
guix/scripts/import/stackage.scm,
guix/scripts/lint.scm,
guix/scripts/offload.scm,
guix/scripts/pack.scm,
guix/scripts/package.scm,
guix/scripts/perform-download.scm,
guix/scripts/publish.scm,
guix/scripts/pull.scm,
guix/scripts/refresh.scm,
guix/scripts/size.scm,
guix/scripts/substitute.scm,
guix/scripts/system.scm,
guix/ssh.scm,
guix/upstream.scm: Use 'G_' instead of '_'.  Most of this change was
obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
2017-05-03 16:16:17 +02:00
Petter 2f3108ad03
gnu: Avoid circular dependencies by Perl license.
* guix/licenses.scm (perl-license): New variable.
* gnu/packages/bioinformatics.scm: Change (package-license perl) to perl-license.
* gnu/packages/compression.scm: Same.
* gnu/packages/databases.scm: Same.
* gnu/packages/gd.scm: Same.
* gnu/packages/language.scm: Same.
* gnu/packages/libevent.scm: Same.
* gnu/packages/mail.scm: Same.
* gnu/packages/messaging.scm: Same.
* gnu/packages/ncurses.scm: Same.
* gnu/packages/networking.scm: Same.
* gnu/packages/photo.scm: Same.
* gnu/packages/tcl.scm: Same.
* gnu/packages/tex.scm: Same.
* gnu/packages/tls.scm: Same.
* gnu/packages/web.scm: Same.
* gnu/packages/wm.scm: Same.
* gnu/packages/xml.scm: Same.
* gnu/packages/xorg.scm: Same.
* gnu/packages/zip.scm: Same.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-05-02 23:41:14 +02:00
Ludovic Courtès dcb95c1fc9
monads: Add a template and specialization mechanism for monadic procedures.
* guix/monads.scm (%templates, %template-instances): New variables.
(register-template!, register-template-instance!): New procedures.
(template-directory, define-template): New macro.
(foldm, sequence, anym): Define using 'define-template'.  Avoid replace
ellipses with dots.
(mapm): Likewise, but do not use 'foldm'.
* guix/store.scm: Add 'template-directory' invocation.
2017-05-02 23:41:13 +02:00
Ludovic Courtès 7b9ac883ea
download: Continue handshake upon TLS warning alerts.
This allows us to download from site such as
<https://fusionforge.int-evry.fr> where the server does not recognize
the server name passed via the 'server_name' extension.

* guix/build/download.scm (tls-wrap): Catch 'gnutls-error' around
'handshake'.  Upon ERROR/WARNING-ALERT-RECEIVED, print a message and
call 'handshake'.
2017-05-02 23:41:13 +02:00
Ludovic Courtès 756be979cb
licenses: Add CeCILL and CeCILL-B.
* guix/licenses.scm (cecill, cecill-b): New variables.
2017-05-02 23:41:13 +02:00
Ludovic Courtès 8a2105078b
substitute: Validate substitute URLs.
Reported by Maxim Cournoyer <maxim.cournoyer@gmail.com>
at <https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00548.html>.

* guix/scripts/substitute.scm (validate-uri): New procedure.
(guix-substitute): Use it.
2017-05-02 12:32:52 +02:00
Ludovic Courtès e723178a10
publish: Use a larger zlib buffer for compression with '--cache'.
* guix/scripts/publish.scm (bake-narinfo+nar): Pass #:buffer-size to
'call-with-gzip-output-port'.
2017-05-02 12:32:51 +02:00
Mark H Weaver bedba06426
Add package/inherit.
* guix/packages.scm (package/inherit): New public macro.
2017-05-02 04:19:09 -04:00
Clément Lassieur 3314396138
licenses: Add new meta-license fsdg-compatible.
* guix/licenses.scm (fsdg-compatible): New record with constructor.
2017-05-01 21:32:15 +02:00
Ludovic Courtès dff3189c7d
publish: Produce a "FileSize" narinfo field when possible.
* guix/scripts/publish.scm (narinfo-string): Add #:file-size parameter.
Produce a "FileSize" field when COMPRESSION is eq? to '%no-compression'
or when FILE-SIZE is true.
(bake-narinfo+nar): Pass #:file-size.
* tests/publish.scm ("/*.narinfo")
("/*.narinfo with properly encoded '+' sign")
("with cache"): Check for "FileSize".
2017-05-01 17:28:20 +02:00
Ludovic Courtès 6d1a5e5ffd
refresh: Report packages using the "@" syntax.
* guix/scripts/refresh.scm (list-dependents)[full-name]: New procedure.
Use 'full-name' instead of 'package-full-name'.
* doc/guix.texi (Invoking guix refresh): Adjust example accordingly.
2017-05-01 16:38:30 +02:00
Roel Janssen 7c3e4660a5
import: Update Bioconductor release to 3.5.
* guix/import/cran.scm: Change Bioconductor release to 3.5.
2017-04-28 11:02:26 +02:00
Ludovic Courtès 25a49294ca
cache: Work around 'time-monotonic' bug in Guile 2.2.2.
* guix/cache.scm (time-monotonic) [guile-2.2]: New variable.
* tests/cache.scm (time-monotonic) [guile-2.2]: Likewise.
* guix/build/download.scm (time-monotonic) [guile-2.2]: Adjust comment:
it's a 2.2.2 bug.
2017-04-22 14:42:15 +02:00
Ludovic Courtès 1fe958d62a
download: Work around Guile 2.2 bug with 'time-monotonic' objects.
* guix/build/download.scm (time-monotonic) [guile-2.2]: New variable.
2017-04-22 01:25:22 +02:00
Ludovic Courtès 9231ef12f2
derivations: Restore UTF-8 encoding of build scripts.
Reported by Mark H Weaver <mhw@netris.org>
at <https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00457.html>.

* guix/derivations.scm (build-expression->derivation): Use a string
output port for the expression.  This reverts part of
2dce88d5bb.
* tests/derivations.scm ("build-expression->derivation and builder
encoding"): New test.
2017-04-21 22:45:29 +02:00
Ludovic Courtès 285f63e805
store: Support 'ssh://' URIs in 'GUIX_DAEMON_SOCKET'.
This allows 'guix' commands to talk to a remote store over SSH.

* guix/store.scm (connect-to-daemon)[connect]: Call 'resolve-interface'
for unknown URI schemes.
* guix/store/ssh.scm: New file.
* Makefile.am (MODULES): Add it.
* doc/guix.texi (The Store): Document it.  Mark remote access as
experimental.
2017-04-21 19:17:36 +02:00
Ludovic Courtès e537833726
ssh: Decompose 'connect-to-remote-daemon'.
* guix/ssh.scm (remote-daemon-channel): New procedure.
(connect-to-remote-daemon): Implement in terms of it.
2017-04-21 19:17:36 +02:00
Ludovic Courtès 615c5298f7
ssh: Move 'open-ssh-session' to (guix ssh).
* guix/scripts/copy.scm (%compression, open-ssh-session): Move to...
* guix/ssh.scm: ... here.  Use '&message' conditions instead of calling
'leave'.
2017-04-21 19:17:34 +02:00
Ludovic Courtès ba97e454bf
offload: Avoid using '_' as a 'match' pattern.
* guix/scripts/offload.scm (host-key->type+key, machine-load)
(process-request, guix-offload): Do not use '_' as a 'match' pattern.
2017-04-21 17:23:37 +02:00
Ludovic Courtès 3dff90ce34
store: Add support for remote connections via 'guix://' URIs.
* guix/store.scm (open-inet-socket): New procedure.
(connect-to-daemon): Support the 'guix' URI scheme.
* doc/guix.texi (The Store): Document it.
2017-04-21 17:23:37 +02:00
Ludovic Courtès 3b5cd17a97
store: Add 'system-error-to-connection-error' macro.
* guix/store.scm (system-error-to-connection-error): New macro.
(open-unix-domain-socket): Use it instead of 'catch'.
2017-04-21 17:23:37 +02:00
Ludovic Courtès 1397b422e2
store: 'GUIX_DAEMON_SOCKET' can now be a URI.
* guix/store.scm (%daemon-socket-file): Rename to...
(%daemon-socket-uri): ... this.
(connect-to-daemon): New procedure.
(open-connection): Rename 'file' to 'uri'.  Use 'connect-to-daemon'
instead of 'open-unix-domain-socket'.
* guix/tests.scm (open-connection-for-tests): Rename 'file' to 'uri'.
* tests/guix-build.sh: Add tests.
* tests/store.scm ("open-connection with file:// URI"): New tests.
2017-04-21 17:23:37 +02:00
Ludovic Courtès 2dce88d5bb
derivations: Avoid string-to-bytevector conversions.
On Guile 2.2.1, this yields a 5% speedup on:

  guix build libreoffice xmonad certbot -n --no-substitutes --no-build-hook

* guix/derivations.scm (derivation->string): Rename to...
(derivation->bytevector): ... this.  Use 'open-bytevector-output-port'
instead of 'call-with-output-string'.
(derivation-hash): Remove string-to-bytevector conversion before
'sha256' call.
(build-expression->derivation): Use 'add-data-to-store' and an
bytevector port instead of a string port for the expression.
2017-04-20 23:35:55 +02:00
Ludovic Courtès e1bbc0e38d
publish: Add a handler for / and /index.html.
Suggested by Quiliro <quiliro@riseup.net>
in <https://bugs.gnu.org/26567>.

* guix/scripts/publish.scm (render-home-page): New procedure.
(make-request-handler): Handle it.
2017-04-19 23:43:51 +02:00
Ludovic Courtès 2363bdd707
gexp: 'gexp-modules' accepts plain Scheme objects.
* guix/gexp.scm (gexp-modules): Return '() when not (gexp? GEXP).
* tests/gexp.scm ("gexp-modules and literal Scheme object"): New test.
2017-04-19 17:51:39 +02:00
Ludovic Courtès d72b42064b
publish: Remove expired cache entries when '--ttl' is used.
* guix/scripts/publish.scm (narinfo-files): New procedure.
(render-narinfo/cached)[delete-file]: New procedure.  Add call to
'maybe-remove-expired-cache-entries'.
* doc/guix.texi (Invoking guix publish): Document the interation between
--cache and --ttl.
2017-04-18 23:19:30 +02:00
Ludovic Courtès 2ea2aac6e9
Add (guix cache) and use it in (guix scripts substitute).
* guix/cache.scm, tests/cache.scm: New files.
* Makefile.am (MODULES, SCM_TESTS): Add them.
* guix/scripts/substitute.scm (obsolete?): Remove.
(remove-expired-cached-narinfos): Rename to...
(cached-narinfo-expiration-time): ... this.  Remove the removal part and
only keep the expiration time part.
(narinfo-cache-directories): Add optional 'directory' parameter and
honor it.
(maybe-remove-expired-cached-narinfo): Remove.
(cached-narinfo-files): New procedure.
(guix-substitute): Use 'maybe-remove-expired-cache-entries' instead of
'maybe-remove-expired-cached-narinfo'.
2017-04-18 23:19:30 +02:00
Ludovic Courtès 00753f7038
publish: Add '--cache' and '--workers'.
Fixes <http://bugs.gnu.org/26201>.
Reported by <dian_cecht@zoho.com>.

These options allow nars to be "baked" off-line and cached instead of
being compressed on the fly.  As a side-effect, this allows us to
provide a 'Content-Length' header for nars.

* guix/scripts/publish.scm (show-help, %options): Add '--cache' and
'--workers'.
(%default-options): Add 'workers'.
(nar-cache-file, narinfo-cache-file, run-single-baker): New procedures.
(single-baker): New macro.
(render-narinfo/cached, bake-narinfo+nar)
(render-nar/cached): New procedures.
(make-request-handler): Add #:cache and #:pool parameters and honor
them.
(run-publish-server): Likewise.
(guix-publish): Honor '--cache' and '--workers'.
* tests/publish.scm ("with cache"): New test.
* doc/guix.texi (Invoking guix publish): Document it.
2017-04-18 23:18:41 +02:00
Ludovic Courtès 339a79fd6a
publish: Use 'sendfile' when possible.
* guix/scripts/publish.scm (http-write): In the
'application/octet-stream' case, use 'sendfile' when OUTPUT is a file
port.
2017-04-18 23:17:18 +02:00
Ludovic Courtès 905ae5276d
publish: Introduce 'actual-compression'.
* guix/scripts/publish.scm (actual-compression): New procedure.
(narinfo-string): Use it.
2017-04-18 23:17:18 +02:00
Ludovic Courtès 1563d6c79f
Add (guix workers).
* guix/workers.scm, tests/workers.scm: New files.
* Makefile.am (MODULES, SCM_TESTS): Add them.
* .dir-locals.el: Add rule for 'eventually'.
2017-04-18 23:17:17 +02:00
Ludovic Courtès e16c823f80
serialization: Remove Guile < 2.0.9 workaround.
* guix/serialization.scm (write-contents): Assume 'sendfile' is always
defined.
2017-04-17 23:31:28 +02:00
Ludovic Courtès 94df39cc08
records: Slight simplification.
* guix/records.scm (make-syntactic-constructor): Simplify 'find' expression.
2017-04-17 23:31:28 +02:00
Marius Bakke 7c7b802cce
download: Add netfilter mirror.
* guix/download.scm (%mirrors): Add mirrors for www.netfilter.org.
2017-04-17 23:05:46 +02:00
Mathieu Othacehe a9eadc06ac
scripts: system: Rename --no-grub option to --no-bootloader.
* guix/scripts/system.scm (%options, show-help): Adjust accordingly.
Keep "--no-grub" for compatibility reasons, but do not mention it in the help.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2017-04-17 17:41:54 +02:00
Ludovic Courtès 1730c5b509
lint: Avoid non-literal format strings.
Reported by Mathieu Othacehe <m.othacehe@gmail.com>
at <http://bugs.gnu.org/26498>.

* guix/scripts/lint.scm (warn-if-package-has-input): Rename to...
(package-input-intersection): ... this.  Remove 'linted' and 'message'
parameters.  Return a list of inputs.
(check-inputs-should-be-native): Adjust accordingly.
(check-inputs-should-not-be-an-input-at-all): Likewise.
2017-04-16 12:08:30 +02:00
Ludovic Courtès f816dba680
ui: Gracefully report '&message' conditions.
* guix/ui.scm (report-load-error, warn-about-load-error)
(read/eval): Add special-case for SRFI-35 &message conditions.
2017-04-16 00:48:07 +02:00
Ludovic Courtès efe7d19a9e
services: 'service-parameters' becomes 'service-value'.
* gnu/services.scm (<service>)[parameters]: Rename to...
[value]: ... this.
Change calls to 'service-parameters' to 'service-value'.
* gnu/system.scm, gnu/tests/base.scm,
guix/scripts/system.scm, tests/services.scm: Likewise.
* doc/guix.texi (Service Reference): Adjust accordingly.
2017-04-16 00:48:07 +02:00
Leo Famulari c8a3dea847
packages: Enable threaded compression of source tarballs.
This provides a ~2x speedup when using 4 threads.

* guix/packages.scm (patch-and-repack)[build]: Invoke xz with
'--threads=0' when re-packing tarballs.
2017-04-15 18:34:59 -04:00
Danny Milosavljevic 958a1fda9e
system: Make grub use <menu-entry> instead of <boot-parameters> again.
* gnu/system/grub.scm: Remove boot-parameters->menu-entry.
(grub-configuration): Don't use boot-parameters->menu-entry.
* gnu/system.scm (operating-system-bootcfg): Use menu-entry.
* guix/scripts/system.scm (reinstall-grub): Use profile-grub-entries.
(perform-action): Use profile-grub-entries.
2017-04-15 22:02:38 +02:00
Danny Milosavljevic abae042ea4
scripts: system: Introduce profile-boot-parameters.
* guix/scripts/system.scm (profile-boot-parameters): New variable.
(reinstall-grub): Use profile-boot-parameters.
(perform-action): Use profile-boot-parameters.

Follow-up to 2e58e05bb6.
2017-04-15 19:34:00 +02:00
Mathieu Othacehe e61519ab9c
scripts: system: Rename grub? and install-grub? to bootloader? and install-bootloader?.
* guix/scripts/system.scm (perform-action): Rename grub? to bootloader,
(%options): rename install-grub? to install-bootloader?,
(%default-options): ditto,
(process-action): reindent and rename grub? to bootloader?.
2017-04-15 15:22:47 +02:00
Mathieu Othacehe c76b3046f6
system: Rename operating-system-grub.cfg to operating-system-bootcfg.
* gnu/system.scm (operating-system-grub.cfg): Rename to...
(operating-system-bootcfg): ... this.
* gnu/system/vm.scm (system-disk-image): Use operating-system-bootcfg.
(system-qemu-image): Use operating-system-bootcfg.
(system-qemu-image/shared-store): Use operating-system-bootcfg.
* guix/scripts/system.scm (perform-action): Use operating-system-bootcfg.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2017-04-15 14:41:10 +02:00
Danny Milosavljevic 03daeaa70f
scripts: system: Back out operating-system-bootcfg change.
Follow-up to 475e2ce211.

* guix/scripts/system.scm (perform-action): Back out operating-system-bootcfg
change.
2017-04-15 14:41:10 +02:00
Danny Milosavljevic 475e2ce211
scripts: system: Move save-load-path-excursion and save-environment-excursion macros to the top.
* guix/scripts/system.scm (save-load-path-excursion,
save-environment-excursion): Move definitions to the top of the file.
It allows to use them in the whole file.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2017-04-15 13:28:25 +02:00
Mathieu Othacehe a41134b442
scripts: system: Move save-load-path-excursion and save-environment-excursion macros to the top.
* guix/scripts/system.scm (save-load-path-excursion,
save-environment-excursion): Move definitions to the top of the file.
It allows to use them in the whole file.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2017-04-15 12:33:56 +02:00
Mathieu Othacehe e60ee79040
build-system/cargo: Remove store reference.
* guix/build/cargo-build-system.scm (generate-checksums): Remove store
  reference from comment. This comment was matching
  assert-no-store-file-names regexp in Makefile.am.
  Also, edit procedure docstring to precise that DIR-NAME is a store
  directory.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-04-14 12:29:20 +02:00
Mathieu Othacehe 23e525e109
syscalls: Add load-linux-module.
* guix/build/syscalls.scm (load-linux-module): New procedure. Reimplemented
from guile-linux-syscalls.patch.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-04-11 11:13:26 +02:00
Mathieu Othacehe c5cd4fad09
syscalls: Use define-as-needed for network-interface syscalls.
* guix/build/syscalls.scm (network-interface-flags): Use define-as-needed macro
and remove from export list.
(set-network-interface-flags): Ditto.
(set-network-interface-address): Ditto.
(IFF_UP, IFF_BROADCAST and IFF_LOOPBACK): Ditto.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-04-11 11:13:25 +02:00
Mathieu Othacehe 7df4d3465d
syscalls: Use define-as-needed for mount and umount.
* guix/build/syscalls.scm (mount): Use define-as-needed macro
and remove from export list.
(umount): Ditto.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-04-11 11:13:25 +02:00
Mathieu Othacehe 8336df0668
syscalls: Add reboot.
* guix/build/syscalls.scm (define-as-needed): New macro.
(reboot): New procedure. Reimplemented from guile-linux-syscalls.patch.
(RB_AUTOBOOT, ..., RB_KEXEC): New flags copied from static Guile patch.

Co-Authored-By: Ludovic Courtès <ludo@gnu.org>
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-04-11 11:13:25 +02:00
Chris Marusich 8bc2183fe5
monads: Improve mlet, mlet*, and mbegin documentation.
* doc/guix.texi (The Store Monad) <mlet, mlet*, mbegin>: Clarify
their intended usage.
* guix/monads.scm (mbegin): Update docstring accordingly.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-04-08 14:40:51 +02:00
Chris Marusich 60a9fcb137
monads, doc: Improve mwhen and munless documentation.
* doc/guix.texi (The Store Monad) <mwhen, munless>: Document them.
* guix/monads.scm (mwhen, munless): Clarify their intended use.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-04-08 14:40:51 +02:00
Chris Marusich d922c8e4b7
monads: Use intent-revealing parameter names.
* guix/monads.scm (mwhen, munless): Rename parameters from 'exp0' and 'exp' to
  'mexp0' and 'mexp', respectively.  This makes it more obvious that these
  expressions must be monadic expressions.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-04-08 14:40:50 +02:00
Mathieu Othacehe f91fcd9c42
syscalls: Allow mount and umount use from static Guile.
* guix/build/syscalls.scm (mount): Use Guile core mount if called from
  static Guile, otherwise use FFI based mount implementation.
  (umount): Ditto.
  This allows to use (guix build syscalls) from a module independently
  of calling context.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-04-07 23:30:39 +02:00
Ludovic Courtès 5537f2d279
profiles: Slightly improve the instructions in 'etc/profile'.
* guix/build/profiles.scm (build-etc/profile): Fix typo in comment.
Add backslash in the generated shell comment.
2017-04-07 23:30:38 +02:00
Ludovic Courtès 83cfa0247b
pack: Add '--expression'.
* guix/scripts/pack.scm (%options, show-help): Add '--expression'.
(guix-pack)[maybe-package-argument]: New procedure.
Use it, and remove variable 'specs'.
* doc/guix.texi (Invoking guix pack): Document '--expression'.
2017-04-07 23:30:38 +02:00
Ludovic Courtès 9a3762a768
size: Avoid '_' as a pattern variable in 'match'.
* guix/scripts/size.scm (display-profile, profile->page-map): Don't use
'_' as a 'match' pattern variable.
2017-04-07 00:17:16 +02:00
Chris Marusich 5ea69d9a56
system: Support the --root option in 'guix system'.
Fixes <https://bugs.gnu.org/26271>.

* guix/scripts/system.scm (perform-action): Add #:gc-root parameter and
honor it.
(show-help): Document the --root option.
(%options): Add 'root'.
(process-action): Pass 'root' option to perform-action as #:gc-root.
* doc/guix.texi (Invoking guix system): Document '--root'.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-04-06 10:24:32 +02:00
Chris Marusich a09b45da6f
build: Add and export procedure 'register-root*'.
* guix/scripts/build.scm (register-root*): Add and export it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-04-06 10:11:26 +02:00
Ludovic Courtès 50f4ea18c4
environment: Deal with single-entry search paths.
This is a followup to fcd75bdbfa.

* guix/scripts/environment.scm (create-environment): Check whether
SEPARATOR is #f.
2017-04-05 22:50:21 +02:00
Maxim Cournoyer a0b87ef8ec
profiles: Generate database file for man pages.
The mandb database file (index.db) is used by the "apropos" (whatis) or
"man -k" commands.  This change introduces a profile hook to generate
such database file.

* guix/profiles.scm (manual-database): New procedure.
(%default-profile-hooks): Add it.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2017-04-05 22:45:41 +02:00
Ludovic Courtès 1618006d0b
build-system/python: 'package-with-explicit-python' uses 'package-mapping'.
* guix/build-system/python.scm (package-with-explicit-python)
[package-variant, cut?]: New procedures.
[transform]: Remove 'mlambdaq' form and input tuple handling.
Use 'package-mapping'.
2017-04-05 22:45:41 +02:00
Ludovic Courtès f37f2b83fa
packages: Add 'package-mapping' and base 'package-input-rewriting' on it.
* guix/packages.scm (package-mapping): New procedure.
(package-input-rewriting): Rewrite in terms of 'package-mapping'.
* tests/packages.scm ("package-mapping"): New test.
* doc/guix.texi (Defining Packages): Document it.
2017-04-05 22:45:41 +02:00
Ricardo Wurmus 5ae63362ae
import cran: Distinguish Bioconductor data packages.
* guix/import/cran.scm (bioconductor-package?): Exclude Bioconductor
data packages.
(bioconductor-data-package?): New procedure.
2017-04-05 18:38:51 +02:00
Leo Famulari b23c1a71be
download: Update the GnuPG mirror list.
* guix/download.scm (%mirrors) <gnupg>: Use HTTP for TU Wien mirror.
2017-04-05 07:07:35 -04:00
Chris Marusich 1c6b2d3f98
build: Export register-root procedure.
* guix/scripts/build.scm: Export register-root procedure.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-04-05 00:53:03 +02:00
Leo Famulari 6c17422eac
utils: Fix handling of shell arguments for xz compression.
Fixes test failures related to xz compression in tests/utils.scm.

This is a followup to commit 63102406f2.

* guix/utils.scm (decompressed-port, compressed-port, compressed-output-port):
Split each shell argument into its own list element.
2017-04-03 23:23:39 -04:00
Ludovic Courtès 76c486196f
packages: Catch invalid input errors for structs.
Reported by Thomas Sigurdsen <thomas.sigurdsen@gmail.com>
at <https://lists.gnu.org/archive/html/help-guix/2017-04/msg00007.html>.

* guix/packages.scm (expand-input): Add 'guard' form around call to
'package-source-derivation'.
* tests/packages.scm (dummy): New test.
2017-04-04 00:10:00 +02:00
Ludovic Courtès 3e43166ffc
gexp: 'lower-object' raises an exception when passed an invalid object.
* guix/gexp.scm (&gexp-error, &gexp-input-error): New error conditions.
(lower-object): Raise &gexp-input-error when 'lookup-compiler' returns #f.
* tests/gexp.scm ("lower-object & gexp-input-error?"): New test.
* guix/ui.scm (call-with-error-handling): Add case for 'gexp-input-error?'.
2017-04-04 00:10:00 +02:00
Ludovic Courtès 2a0d5de5a9
Merge branch 'core-updates' 2017-04-03 00:13:06 +02:00
Efraim Flashner 63102406f2
guix: Compress and decompress xz archives in parallel.
* guix/scripts/pack.scm (%compressors): Add flag '-T0' when calling "xz".
* guix/utils.scm (decompressed-port, compressed-port,
compressed-output-port): Same.
2017-04-02 14:42:20 +03:00
Tobias Geerinckx-Rice f264e838c0
substitute: Send ‘User-Agent’ header.
* guix/scripts/substitute.scm (narinfo-request): Pass ‘User-Agent’ #:headers
to ‘build-request’.
2017-03-31 15:33:16 +02:00
Marius Bakke 84157bb8bf
Merge branch 'master' into core-updates
Most conflicts are from 6fd52309b8.
2017-03-30 22:59:53 +02:00
Ludovic Courtès cdb3f734cf
packages: Remove "mips64el-linux" from '%hydra-supported-systems'.
* guix/packages.scm (%hydra-supported-systems): Remove "mips64el-linux".
2017-03-29 22:50:42 +02:00
Ludovic Courtès e1f02f92e9
Replace (compose not PROC) with simpler idioms.
* gnu/packages/bioinformatics.scm (python-pysam)[arguments] <check>:
Use (negate proc) instead of (compose not proc).
* guix/import/cran.scm (recursive-import): Likewise.
* guix/import/elpa.scm (filter-dependencies): Use 'remove' instead of
'(filter (compose not proc) ...)'.
2017-03-28 22:15:44 +02:00
Ricardo Wurmus 1a75083b0d
import cran: Print package stream in the expected order.
* guix/scripts/import/cran.scm (guix-import-cran): Reverse list of packages.
2017-03-28 15:54:10 +02:00
Ricardo Wurmus 2dca8b2d51
import cran: Automatically add gfortran and zlib when needed.
* guix/import/cran.scm (needs-fortran?, needs-zlib?): New procedures.
(description->package): Use them.
2017-03-28 15:37:47 +02:00
Ludovic Courtès 6dfd683dc7
download: Properly parse ftp:// URLs that lack user info.
Fixes a regression introduced in
a4f5423415.

Reported by Hartmut Goebel.

* guix/build/download.scm (ftp-fetch): Account for the case where
'uri-userinfo' returns #f.  Remove the case where it returns "" since
that cannot happen.
2017-03-28 13:30:09 +02:00
Ludovic Courtès bdb59b331b
derivations: Do not fetch narinfos for non-substitutable items.
This avoids connections to substitute servers for derivations that are
not substitutable anyway, such as profiles.

Reported by Andy Wingo.

* guix/derivations.scm (substitution-oracle): Skip derivations that do
not pass 'substitutable-derivation?'.
* tests/derivations.scm ("substitution-oracle and #:substitute? #f"):
New test.
2017-03-28 10:00:05 +02:00
Leo Famulari c17383f400
Merge branch 'master' into core-updates 2017-03-27 21:19:38 -04:00
Alex Kost 689db38e34
ui: Support Texinfo markup in package synopses.
* guix/ui.scm (package-field-string): New procedure.
(package-description-string): Use it.
(package-synopsis-string): New procedure.
(package->recutils): Use it.
* guix/scripts/lint.scm (check-synopsis-style)[check-texinfo-markup]:
New procedure.  Use it in checks.
* tests/lint.scm: Test it.
* gnu/packages/perl.scm (perl-try-tiny)[synopsis]: Adjust for the
Texinfo markup.
2017-03-27 10:55:16 +03:00
Huang Ying 0a5ce0d1df
profiles: Create fonts.dir/scale for all fonts directories.
* guix/profiles.scm (fonts-dir-file): Create fonts.dir/scale files for all
fonts directories.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-03-26 12:53:52 +02:00
Huang Ying addce19e2d
union: Add create-all-directories? parameter to 'union-build'.
* guix/build/union.scm (union-build): Add create-all-directories? keyword
parameter.
* tests/union.scm ("union-build #:create-all-directories? #t"): New test.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2017-03-26 12:53:48 +02:00
Efraim Flashner 0371b345e8
Merge remote-tracking branch 'origin/master' into core-updates 2017-03-23 14:53:33 +02:00
Ludovic Courtès 4bb5e0aeb3
publish: Add '--nar-path'.
* guix/scripts/publish.scm (show-help, %options): Add '--nar-path'.
(%default-options): Add 'nar-path'.
(guix-publish): Honor it.
2017-03-22 14:05:59 +01:00
Ludovic Courtès cdd7a7d210
publish: Make the nar URL prefix a parameter.
* guix/scripts/publish.scm (narinfo-string): Add #:nar-path and honor it.
(render-narinfo): Likewise.
(make-request-handler): Likewise.
(run-publish-server): Likewise.
* tests/publish.scm ("custom nar path"): New test.
2017-03-22 14:05:59 +01:00
Ludovic Courtès 46f58390cb
publish: Add '--public-key' and '--private-key'.
* guix/scripts/publish.scm (show-help, %options): Add --public-key and
--private-key.
* doc/guix.texi (Invoking guix publish): Document it.
2017-03-22 14:05:59 +01:00
Ludovic Courtès ab2a74e4db
publish: The public and private keys are now SRFI-39 parameters.
* guix/scripts/publish.scm (%default-options): Add 'public-key-file' and
'private-key-file'.
(lazy-read-file-sexp): Remove.
(%private-key, %public-key): Turn into SRFI-39 parameters.
(signed-string, render-narinfo): Adjust accordingly.
(guix-publish): Honor 'public-key-file' and 'private-key-file' from
OPTS.  Use 'parameterize'.
* guix/pk-crypto.scm (read-file-sexp): New procedure.
* tests/publish.scm: Initialize '%public-key' and '%private-key'.
2017-03-22 14:05:59 +01:00
Efraim Flashner 378de69c59
Merge remote-tracking branch 'origin/master' into core-updates 2017-03-22 12:57:37 +02:00
Roel Janssen a4f5423415
download: Handle username and password properties for FTP URIs.
* guix/build/download.scm (ftp-fetch): Process username and password from a URI.
2017-03-21 12:15:14 +01:00
Roel Janssen 193420a803
ftp-client: Allow custom username and password for FTP servers.
* guix/ftp-client.scm (ftp-open): Add username and password arguments.
2017-03-21 12:14:05 +01:00
Mark H Weaver d67f972bd7
download: Remove non-existent kernel mirror.
* guix/download.scm (%mirrors) <kernel.org>: Remove www.all.kernel.org.
2017-03-19 21:18:46 -04:00
Mark H Weaver f67337e23e
Merge branch 'master' into core-updates 2017-03-19 18:52:12 -04:00
Ludovic Courtès 4fd06a4dd1
http-client: Avoid name clash with 'open-connection-for-uri' in 2.2.0.
* guix/build/download.scm (open-connection-for-uri): Add note about
same-named binding in Guile 2.2.0.
* guix/http-client.scm: Use 'guix:open-connection-for-uri' for the
procedure coming from (guix build download).
* guix/scripts/lint.scm: Likewise.
* guix/scripts/substitute.scm: Likewise.
2017-03-18 00:39:50 +01:00
Ludovic Courtès 36626c556e
build: Require Guile >= 2.0.9.
* configure.ac: Bump requirement to 2.0.9.
* doc/guix.texi (Requirements): Adjust accordingly.
* README (Requirements): Likewise.
* build-aux/download.scm: Remove workaround for <http://bugs.gnu.org/13095>.
* guix/build/download.scm: Likewise.
(http-fetch)[post-2.0.7?]: Remove.  Remove conditional code for not
POST-2.0.7?.
* guix/http-client.scm:  Remove workaround for <http://bugs.gnu.org/13095>.
(http-fetch)[post-2.0.7?]: Remove.  Remove conditional code for not
POST-2.0.7?.
* guix/serialization.scm (read-latin1-string): Remove mention of 2.0.9.
* tests/nar.scm: Use (ice-9 control).
(let/ec): Remove.
2017-03-18 00:39:49 +01:00
Ludovic Courtès 5461115e8f
pack: Add '--target'.
* guix/scripts/pack.scm (self-contained-tarball): Add #:target.
(docker-image): Add #:target.
[build]: Pass it to 'build-docker-image'.
(%options, show-help): Add '--target'.
(guix-pack): Pass TARGET to 'profile-derivation' and to 'build-image'.
* guix/docker.scm (build-docker-image): Add #:system parameter and honor it.
* doc/guix.texi (Invoking guix pack): Document '--target'.
(Additional Build Options): Refer to the Autoconf manual instead of the
obsolete 'configure.info' for cross-compilation.
2017-03-18 00:38:41 +01:00
Ludovic Courtès 176febe377
profiles: Packages in a profile can be cross-compiled.
* guix/profiles.scm (profile-derivation): Add #:target parameter; pass
it to 'gexp->derivation'.
* tests/profiles.scm ("profile-derivation, cross-compilation"): New test.
2017-03-17 23:25:53 +01:00
Ludovic Courtès 48b444304e
pack: Move absolute file name to <compressor>.
* guix/scripts/pack.scm (<compressor>)[package]: Remove.
[command]: Document as being a gexp with an absolute file name.
(%compressors): Adjust accordingly.
(self-contained-tarball): Simplify PATH expression.  Move 'string-join'
for the compressor command on the build side.
(docker-image): Simplify PATH expression.
* tests/pack.scm (%gzip-compressor): Adjust accordingly.
2017-03-17 23:25:53 +01:00
Danny Milosavljevic 4ed64c534a
build/cargo-build-system: Make cargo-build-system install working packages.
* guix/build/cargo-build-system.scm (configure): Remove proprietary
dependencies. Add rust dependencies and configure Cargo to find them.
(build): Also build libraries, not just applications.
(file-sha256): New variable.
(generate-checksums): New variable. Export it.
(touch): New variable.
(install): Generate checksums so Cargo accepts the package.
2017-03-17 16:48:09 +01:00
Danny Milosavljevic 25fb58a3be
build-system/cargo (cargo-build): Add cargo-build-flags, remove configure-flags.
* guix/build-system/cargo.scm (cargo-build): Add cargo-build-flags,
remove configure-flags.
2017-03-17 16:48:08 +01:00
Ricardo Wurmus 2d7c4ae3ee
gnu: r: Rename to r-minimal.
* gnu/packages/statistics.scm (r): Rename to...
(r-minimal): ...this new variable.
(r-with-recommended-packages): Rename to...
(r): ...this.
* guix/build-system/r.scm (default-r): Reference r-minimal.
* gnu/packages/emacs.scm (emacs-ess)[inputs],
gnu/packages/machine-learning.scm (shogun)[inputs],
gnu/packages/python.scm (python-rpy2)[inputs],
gnu/packages/bioinformatics.scm (ribotaper)[inputs],
(couger)[propagated-inputs],
(roary)[inputs],
(rsem)[inputs],
(rcas-web)[inputs]: Change "r" to "r-minimal".
2017-03-17 10:14:02 +01:00
Ricardo Wurmus aeb64f3cb2
gnu: r: Do not build recommended packages.
* gnu/packages/statistics.scm (r)[arguments]: Rename phase
"build-recommended-packages-reproducibly" to "build-reproducibly"; add
configure flag "--without-recommended-packages".
* guix/import/cran.scm (default-r-packages): Remove recommended packages.
* gnu/packages/python.scm (python-rpy2)[inputs]: Add r-survival.
* gnu/packages/bioinformatics.scm (r-ape)[propagated-inputs]: Add r-lattice
and r-nlme.
(r-vegan)[propagated-inputs]: Add r-mass.
(r-genefilter)[propagated-inputs]: Add r-survival.
(r-grohmm)[propagated-inputs]: Add r-mass.
(r-bioccheck)[propagated-inputs]: Add r-codetools.
(r-summarizedexperiment)[propagated-inputs]: Add r-matrix.
(r-topgo)[propagated-inputs]: Add r-lattice.
(r-sva)[propagated-inputs]: Add r-mgcv.
(r-raremetals2)[propagated-inputs]: Add r-mass.
(r-vsn)[propagated-inputs]: Add r-lattice.
(r-pcamethods)[propagated-inputs]: Add r-mass.
* gnu/packages/bioinformatics.scm (r-ggplot2)[propagated-inputs]: Add r-mass.
(r-locfit)[propagated-inputs]: Add r-lattice.
(r-coda)[propagated-inputs]: Add r-lattice.
(r-irlba)[propagated-inputs]: Add r-matrix.
(r-glmnet)[propagated-inputs]: Add r-matrix.
(r-e1071)[propagated-inputs]: Add r-class.
(r-spams)[propagated-inputs]: Add r-lattice and r-matrix.
(r-hmisc)[propagated-inputs]: Add r-cluster, r-foreign, r-lattice, r-nnet, and
r-rpart.
(r-zoo)[propagated-inputs]: Add r-lattice.
(r-mixtools)[propagated-inputs]: Add r-boot and r-mass.
(r-flexmix)[propagated-inputs]: Add r-lattice and r-nnet.
(r-prabclus)[propagated-inputs]: Add r-mass.
(r-fpc)[propagated-inputs]: Add r-class, r-cluster, and r-mass.
(r-rcppeigen)[propagated-inputs]: Add r-matrix.
(r-matrixmodels)[propagated-inputs]: Add r-matrix.
(r-lme4)[propagated-inputs]: Add r-mass and r-nlme.
(r-pbkrtest)[propagated-inputs]: Add r-mass and r-matrix.
(r-car)[propagated-inputs]: Add r-mass, r-mgcv, and r-nnet.
(r-tclust)[propagated-inputs]: Add r-cluster.
2017-03-17 10:14:02 +01:00
Ludovic Courtès db3f2b61ad
pack: Allow for "-S /opt/foo=".
Reported by Andy Wingo.

* guix/scripts/pack.scm (%options): Use 'string-split' instead of
'string-tokenize'.
2017-03-16 22:50:15 +01:00
Ludovic Courtès 9e84ea3673
pack: Honor symlinks in the Docker back-end.
* guix/docker.scm (symlink-source, topmost-component): New procedures.
(build-docker-image): Add #:symlinks parameter and honor it.  Remove
hard-coded /bin symlink.
* guix/scripts/pack.scm (docker-image): Pass #:symlinks to
'build-docker-image'.
2017-03-16 22:50:15 +01:00
Ludovic Courtès 54241dc8e6
docker: Build images in a reproducible fashion.
* guix/docker.scm (%tar-determinism-options): New variable.
(build-docker-image): Use it on the two 'tar' invocations.
2017-03-16 22:50:15 +01:00
Ludovic Courtès 84dda5a9c0
pack: Use a fixed timestamp in Docker images.
* guix/docker.scm (build-docker-image): Add #:creation-time parameter.
Use SRFI-19 'date->string' instead of 'strftime' et al.
* guix/scripts/pack.scm (docker-image)[build]: Pass #:creation-time to
'build-docker-image'.
2017-03-16 22:50:15 +01:00
Ludovic Courtès b1edfbc37f
pack: Add '--format' option and Docker output support.
* guix/docker.scm: Remove dependency on (guix store) and (guix utils).
Use (guix build store-copy).  Load (json) lazily.
(build-docker-image): Remove #:system.  Add #:closure, #:compressor, and
'image' parameters.  Use 'uname' to determine the architecture.  Remove
use of 'call-with-temporary-directory'.  Use 'read-reference-graph' to
compute ITEMS.  Honor #:compressor.
* guix/scripts/pack.scm (docker-image): New procedure.
(%default-options): Add 'format'.
(%formats): New variable.
(%options, show-help): Add '--format'.
(guix-pack): Honor '--format'.
* guix/scripts/archive.scm: Remove '--format' option.  This reverts
commits 1545a012cb,
01445711db, and
03476a23ff.
* doc/guix.texi (Invoking guix pack): Document '--format'.
(Invoking guix archive): Remove documentation of '--format'.
2017-03-16 22:50:15 +01:00
Ludovic Courtès 2971f39c33
pack: Honor command-line options related to the store.
* guix/scripts/pack.scm (guix-pack): Call
'set-build-options-from-command-line'.
2017-03-16 22:50:15 +01:00
Ludovic Courtès 146db52a18
memoization: Micro-optimize code produced by 'define-cache-procedure'.
* guix/memoization.scm (%nothing): Remove.
(define-cache-procedure): Make '%nothing' a local variable, with a
literal list.
2017-03-16 22:50:15 +01:00
Ludovic Courtès d938a58bee
gexp: Add '=>' syntax to import computed modules.
* guix/gexp.scm (imported-files)[file-pair]: Add case for pairs where
the cdr is not a string.
(imported-modules): Support '=>' syntax in MODULES.
* tests/gexp.scm ("imported-files with file-like objects")
("gexp->derivation & with-imported-module & computed module"): New tests.
* doc/guix.texi (G-Expressions): Document '=>' syntax for
'with-imported-modules'.
2017-03-16 22:50:14 +01:00
Ludovic Courtès 4c0c4db070
utils: Move base16 procedures to (guix base16).
* guix/utils.scm (bytevector->base16-string, base16-string->bytevector):
Move to...
* guix/base16.scm: ... here.  New file.
* tests/utils.scm ("bytevector->base16-string->bytevector"): Move to...
* tests/base16.scm: ... here.  New file.
* Makefile.am (MODULES): Add guix/base16.scm.
(SCM_TESTS): Add tests/base16.scm.
* build-aux/download.scm, guix/derivations.scm,
guix/docker.scm, guix/import/snix.scm, guix/pk-crypto.scm,
guix/scripts/authenticate.scm, guix/scripts/download.scm,
guix/scripts/hash.scm, guix/store.scm, tests/hash.scm,
tests/pk-crypto.scm: Adjust imports accordingly.
2017-03-16 22:50:14 +01:00
Marius Bakke 4b7e5c1131
Merge branch 'master' into core-updates 2017-03-15 17:52:26 +01:00
Ludovic Courtès 70dfdd501a
syscalls: Adjust 'clone' to Guile 2.2.
Before that, something like:

  (call-with-container
    (lambda ()
      (match (primitive-fork)
        …)))

would hang in 'primitive-fork' as the child process (the one started in
the container) would try to pthread_join the finalization thread in
'stop_finalization_thread' in libguile, not knowing that this thread is
nonexistent.

* guix/build/syscalls.scm (%set-automatic-finalization-enabled?!): New
procedure.
(without-automatic-finalization): New macro.
(clone): Wrap PROC call in 'without-automatic-finalization'.
2017-03-15 15:19:53 +01:00
Ludovic Courtès 81a0f1cdf1
zlib: Don't rely on EBADF being ignored by 'fport_close'.
In 2.2, 'fport_close' no longer swallows EBADF and instead raises a
'system-error' for this.  This commit adjusts for 2.2.

* guix/zlib.scm (close-procedure): Remove.
(make-gzip-input-port): Use 'port->fdes' instead of 'fileno'.
Use 'gzclose' instead of 'close-procedure'.
(make-gzip-output-port): Likewise.
* tests/zlib.scm ("compression/decompression pipe"): Don't check whether
PARENT is closed using 'port-closed?'.  Instead, use 'seek' on the
underlying FD and check for EBADF.
2017-03-15 15:19:53 +01:00
Ludovic Courtès 850edd77f9
pack: Add unit test.
* guix/scripts/pack.scm (self-contained-tarball): Add #:tar option.
[build](tar-supports-sort?): New variable.  Use it.
* tests/pack.scm: New file.
* Makefile.am (SCM_TESTS): Add it.
2017-03-14 23:18:32 +01:00
Ludovic Courtès 36f213fb70
pack: Use maximum compression; use '-n' for gzip.
* guix/scripts/pack.scm (<compressor>)[tar-option]: Remove.
[command]: New field.
(%compressors): Provide complete commands.  Use '-9' or equivalent for
each compressor; use '-n' for gzip.
(self-contained-tarball)[build]: Adjust accordingly.
2017-03-14 23:18:32 +01:00
Ludovic Courtès 5895ec8aa2
pack: Add '--symlink'.
* guix/scripts/pack.scm (self-contained-tarball): Add #:symlinks
parameter.
[build](symlink->directives): New procedure
(directives): New variable.
Add call to 'evaluate-populate-directive'.  Pass the directories among
DIRECTIVES to 'tar'.
(%default-options): Add 'symlinks'.
(%options, show-help): Add '--symlink'.
(guix-pack): Honor it.
* gnu/build/install.scm (evaluate-populate-directive): Export.
* doc/guix.texi (Invoking guix pack): Document it.
2017-03-14 17:57:27 +01:00
Ludovic Courtès 6b63c43e06
pack: Add '--localstatedir' option.
* guix/scripts/pack.scm (self-contained-tarball): Add #:localstatedir?
parameter and honor it.
(%options, show-help): Add '--localstatedir'.
(guix-pack): Honor it.
* gnu/build/install.scm (populate-single-profile-directory): Add
 #:register? parameter and honor it.
* doc/guix.texi (Binary Installation): Use '--localstatedir' in
example.
(Invoking guix pack): Document it.
2017-03-14 17:57:27 +01:00
Ludovic Courtès 3b2dc9edcd
upstream: Avoid '_' as a pattern variable in 'match'.
* guix/upstream.scm (lookup-updater): Don't use '_' as a pattern
variable.
2017-03-14 11:19:21 +01:00
Efraim Flashner 3f9543aee1
Merge remote-tracking branch 'origin/master' into core-updates 2017-03-13 23:08:49 +02:00
Ludovic Courtès b111bceecc
download: Export '%x509-certificate-directory'.
* guix/build/download.scm (%x509-certificate-directory): Export, as
expected by (guix scripts pull) since commit
7e81d699de.
2017-03-13 21:52:38 +01:00
Marius Bakke 7e81d699de
pull: Default to HTTPS.
* guix/scripts/pull.scm (%snapshot-url): Use HTTPS.
(guix-pull): Authenticate against LE-CERTS when URL is from Savannah.
2017-03-12 19:39:32 +01:00
Ludovic Courtès 334c95306a
syscalls: Adjust 'define-bits' to macro literal semantics of 2.2.
* guix/build/syscalls.scm (define-bits): Do not define NAMES... as
top-level variables since that prevents literal matches in 2.2.
Instead, determine constant values at expansion time.
2017-03-12 17:47:25 +01:00
Ludovic Courtès 239c22663a
Add 'guix pack'.
* gnu/system/install.scm (self-contained-tarball): Move to...
* guix/scripts/pack.scm: ... here.  New file.
* doc/guix.texi (Binary Installation): Mention 'guix pack'.
(Invoking guix pack): New node.
* build-aux/make-binary-tarball.scm: Remove.
* Makefile.am (MODULES): Add guix/scripts/pack.scm.
(EXTRA_DIST): Remove build-aux/make-binary-tarball.scm.
(guix-binary.%.tar.xz): Rewrite using 'guix pack'.
* build-aux/hydra/gnu-system.scm (tarball-jobs): Adjust accordingly.
2017-03-12 17:47:25 +01:00
Ludovic Courtès e90e0fad1b
Merge branch 'master' into core-updates 2017-03-09 16:35:41 +01:00
Roel Janssen 64fc9f65f1
gexp: Expose functions to allow creating derivation builders.
* guix/gexp.scm: Add load-path-expression and gexp-modules to the public
  interface of the module.  See <http://bugs.gnu.org/26023>.
2017-03-09 12:39:05 +01:00
Ludovic Courtès 3104475148
utils: Use an idiom compatible with both 2.0 and 2.2.
Fixes a regression introduced in 7447aa36e1.
Reported by Ricardo Wurmus.

* guix/utils.scm: Revert 7447aa36e1.  Use
  #:prefix for (ice-9 iconv) to support both 2.0 and 2.2.
2017-03-09 09:48:33 +01:00
Ludovic Courtès 7447aa36e1
utils: Make sure to use the right 'bytevector->string'.
In Guile 2.2, (rnrs io ports) exports 'bytevector->string', which
conflicts with that of (ice-9 iconv).

* guix/utils.scm: Hide 'bytevector->string' from (rnrs io ports).
2017-03-08 23:42:53 +01:00
Ludovic Courtès 1062063a65
ui: Don't use '%default-port-encoding' to set the encoding of string ports.
* guix/ui.scm (right-arrow): Call 'set-port-encoding!' to set PORT's
encoding; remove use of 'with-fluids'.  This is for compatibility with
Guile 2.2 where the encoding of string ports is not influenced by
%DEFAULT-PORT-ENCODING.
* tests/ui.scm ("show-manifest-transaction"): Likewise.
2017-03-08 23:42:53 +01:00
Ludovic Courtès 30906825cb
ui: Avoid '_' as a pattern variable in 'match'.
* guix/ui.scm (fill-paragraph): Don't use '_' as a pattern variable
since that is shadowed by the top-level '_' binding on Guile 2.2.
(show-manifest-transaction): Likewise.
2017-03-08 23:42:53 +01:00
Ludovic Courtès 3f6d5b8a69
download: Update the Savannah mirror list.
* guix/download.scm (%mirrors) <savannah>: Remove centervenus.com, which
seems to be broken.  Add download-mirror.sv.gnu.org as a last resort.
2017-03-08 23:42:53 +01:00
Ludovic Courtès 6aa9d63c92
guix archive: Allow compilation with Guile 2.2.
* guix/scripts/archive.scm (export-from-store): Avoid shadowing the
top-level '_'.
2017-03-08 23:42:52 +01:00
Ludovic Courtès 6c5b56f9fa
gnu: bash: Use the bootstrap Guile in 'url-fetch/reset-patch-level'.
Fixes <http://bugs.gnu.org/25775>.
Reported by Sirgazil, Ricardo Wurmus, Andy Wingo, and others.

* guix/download.scm (in-band-download): Always use GUILE.  This reverts
9f05908fb1.
* gnu/packages/bash.scm (url-fetch/reset-patch-level): Remove #:guile.
Pass %BOOTSTRAP-GUILE as #:guile to 'url-fetch'.  Remove #:guile-for-build
argument in 'gexp->derivation' call.
2017-03-07 23:58:08 +01:00
Marius Bakke 3f98071ac5
Merge branch 'python-tests' 2017-03-03 16:55:43 +01:00
Danny Milosavljevic 7109e0fff8
build-system/cargo: Export %cargo-build-system-modules.
* guix/build-system/cargo.scm (%cargo-build-system-modules): Export.
2017-03-03 12:06:11 +01:00
Manolis Ragkousis 751702676e
guix: build: make-bootstrap: Copy "falloc.h" to the new system.
In glibc-2.25 a dependency on "linux/falloc.h" was added.
This also reverts commit 8f8f250bdc
which is no longer needed. This commit was not compatible with
the glibc version Hurd is using. See
<https://lists.gnu.org/archive/html/guix-devel/2017-02/msg01046.html>

* guix/build/make-bootstrap.scm (make-stripped-libc): Copy "falloc.h"
to the new system.
* gnu/packages/patches/glibc-bootstrap-system.patch: Remove part
that touches fcntl-linux.h.

Problem reported by Andreas Enge <andreas@enge.fr>.
2017-02-27 15:31:06 +02:00
Marius Bakke 8779987bba
Merge branch 'master' into python-tests 2017-02-27 12:42:22 +01:00
Leo Famulari 9f05908fb1
download: Provide a fall-back guile for older daemons.
Fixes <http://bugs.gnu.org/25775>.

* guix/download.scm (in-band-download): Use %bootstrap-guile as a
fall-back when using older daemons that do not have a built-in
downloader.

Written-by: Ricardo Wurmus <rekado@elephly.net>
2017-02-23 14:27:35 -05:00
Efraim Flashner d15432ca9e
Merge remote-tracking branch 'origin/master' into core-updates 2017-02-20 12:56:14 +02:00
Danny Milosavljevic 80345600fa
build: dub-build-system: Don't use "dub run" at all.
It doesn't make sense to run non-test executables (which is what "dub run"
would do).

The "check" function already invokes "dub test" and that's enough.

* guix/build/dub-build-system.scm (build): Remove "dub run" invocation.
2017-02-14 10:18:35 +01:00
Federico Beffa 57075ade97
import: stackage: Avoid using (guix ui) in importer code.
* guix/import/stackage.scm (stackage->guix-package, stackage-lts-info-fetch):
  Raise 'message' condition instead of using 'leave' from (guix ui).
* guix/scripts/import/stackage.scm (guix-import-stackage): Handle conditions.
2017-02-14 08:38:45 +01:00
Marius Bakke 424b1ae769
Merge branch 'master' into python-tests 2017-02-13 22:35:05 +01:00
Ludovic Courtès 768f0ac9dd
Merge branch 'master' into core-updates 2017-02-10 17:40:25 +01:00
Danny Milosavljevic 65e862d1a2
gnu: Add dub-build-system.
* guix/build-system/dub.scm: New file.
* guix/build/dub-build-system.scm: New file.
* Makefile.am (MODULES): Add them.
* doc/guix.texi: Add section for dub-build-system.
2017-02-10 16:21:50 +01:00
Mathieu Lirzin 6554be68b4
git-download: Add 'git-predicate'.
* guix/git-download.scm (git-predicate): New procedure.
* gnu/packages/package-management.scm (current-guix): Use it.
(make-git-predicate): Remove.
2017-02-09 13:56:54 -06:00
Federico Beffa a4824c60ef
import: hackage: Handle unknown packages gracefully.
* guix/import/hackage.scm (hackage-fetch): Add 'guard'.
2017-02-09 19:36:08 +01:00
Federico Beffa bc5844d149
import: Add stackage importer and updater.
* guix/import/stackage.scm: New file.
* guix/scripts/import/stackage.scm: New file.
* Makefile.am (MODULES): Add new files.
* guix/scripts/import.scm (importers): Add "stackage".
* guix/scripts/refresh.scm (%updaters): Add %stackage-updater.
* doc/guix.texi (Invoking 'guix import'): Document the importer.
  (Invoking 'guix refresh'): Add stackage to option --type valid values.
* guix/import/hackage.scm (guix-package->hackage-name, hackage-fetch,
  hackage-source-url, hackage-cabal-url, hackage-package?): Export them.
2017-02-09 19:36:08 +01:00
Federico Beffa 81e0bc1834
import: json: Explicitly ask for JSON data.
* guix/import/json.scm (json-fetch): Add #:headers to http-fetch call.
2017-02-09 19:36:04 +01:00
Ludovic Courtès 4eaac4b722
import: pypi: Correctly handle multiple-URL origins.
Fixes <https://bugs.gnu.org/25635>.
Reported by Sergei Trofimovich <slyfox@inbox.ru>.

* guix/import/pypi.scm (guix-package->pypi-name)[url->pypi-name]: New
procedure.
Rewrite body to match lists in addition to strings.
* tests/pypi.scm ("guix-package->pypi-name, several URLs"): New test.
2017-02-08 16:17:05 +01:00
Ying Huang 06d7d1190e
profiles: gtk-im-modules: Fix for gtk3.
Gtk+3 now have multiple outputs, so the gtk-query-immodules-3.0 should be find
in output "bin" instead of "out".

* guix/profiles.scm (gtk-im-modules): Pass the path of gtk-query-immodules-x.x
as 'query' argument to the 'build' procedure.

Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
2017-02-08 20:12:20 +08:00
Ludovic Courtès 7597478e2e
file-systems: Add '%network-configuration-files' and '%network-file-mappings'.
* gnu/system/file-systems.scm (%network-configuration-files)
(%network-file-mappings): New variables.
* guix/scripts/environment.scm (%network-configuration-files): Remove.
(launch-environment/container): Refer to '%network-file-mappings'
instead of calling 'filter-map'.
2017-02-07 00:08:10 +01:00
Ludovic Courtès d2a5e6982d
file-systems: Add 'file-system-mapping->bind-mount'.
* gnu/system/file-systems.scm (file-system-mapping->bind-mount): New
procedure.
* gnu/system/linux-container.scm (mapping->file-system): Remove.
(containerized-operating-system)[mapping->fs]: Use
'file-system-mapping->bind-mount' instead of 'mapping->file-system'.
* guix/scripts/environment.scm (launch-environment/container): Likewise.
2017-02-03 00:23:28 +01:00
Leo Famulari e8c83d04e1
Merge branch 'master' into core-updates 2017-02-02 10:52:24 -05:00
Ricardo Wurmus de643f0c15
build: r-build-system: Use deterministic built date.
Fixes <http://bugs.gnu.org/25598>.

* guix/build/r-build-system.scm (install): Pass "--built-timestamp" option to
make build deterministic.
2017-02-02 15:20:50 +01:00
Ludovic Courtès 93897a4538
download: Add GNOME mirror.
* guix/download.scm (%mirrors): Add "https://download.gnome.org".
2017-02-01 23:53:35 +01:00
Tobias Geerinckx-Rice 814b099a20
download: Add ‘url-fetch/zipbomb’.
From this suggestion by Ludovic Courtès:
<http://lists.gnu.org/archive/html/guix-devel/2016-09/msg01983.html>

* guix/download.scm (url-fetch/zipbomb): New procedure.
2017-02-01 15:53:33 +01:00
Tobias Geerinckx-Rice 58f91e4d03
download: url-fetch/tarball: Make ‘name’ truly optional.
* guix/download.scm (url-fetch/tarbomb): Fall back to ‘file-name’ if
‘name’ is #f, like the regular ‘url-fetch’ does.
* gnu/packages/bioinformatics.scm (muscle)[source]: Remove ‘file-name’.
* gnu/packages/engineering.scm (fastcap)[source]: Likewise.
* gnu/packages/scheme.scm (scmutils)[source]: Likewise.
2017-02-01 15:53:32 +01:00
Ludovic Courtès f1a892c96f
lint: Use the "@" syntax for versioned packages in warnings.
* guix/scripts/lint.scm (emit-warning): Use the "@" syntax.
2017-01-31 23:51:09 +01:00
Christopher Baines c003546b0c
environment: Fix setting writable? on networking related files
* guix/scripts/environment.scm (launch-environment/container): Include the
  file name in the call to string=? when deciding if the file should be
  writable.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-01-30 10:52:45 +01:00
Ludovic Courtès 0d268c5d70
store: Add 'add-data-to-store'.
* guix/serialization.scm (write-bytevector): New procedure.
(write-string): Rewrite in terms of 'write-bytevector'.
* guix/store.scm (write-arg): Add 'bytevector' case.
(add-data-to-store): New procedure, from former 'add-text-to-store'.
(add-text-to-store): Rewrite in terms of 'add-data-to-store'.
* tests/store.scm ("add-data-to-store"): New test.
2017-01-30 10:52:45 +01:00
Ludovic Courtès 86a6ff4bb0
build-system/python: 'package-with-explicit-python' uses 'eq?' memoization.
* guix/build-system/python.scm (package-with-explicit-python): Use
'mlambdaq' instead of 'mlambda'.  This does not change the <package>
graph and has no visible impact on performance.
2017-01-28 18:55:20 +01:00
Ludovic Courtès 3d520b5428
gnu-maintenance: 'gnu-package?' uses 'eq?' memoization.
* guix/gnu-maintenance.scm (gnu-package?): Use 'mlambdaq' instead of
'mlambda'.
2017-01-28 18:55:20 +01:00
Ludovic Courtès c9134e82fe
packages: Remove 'define-memoized/v' and use 'mlambdaq' instead.
* guix/packages.scm (define-memoized/v): Remove.
(package-transitive-supported-systems): Use 'mlambdaq' instead of
'define-memoized/v'.
(package-input-rewriting)[replace]: Likewise.
2017-01-28 18:55:20 +01:00
Ludovic Courtès 55b2d92145
Use 'mlambda' instead of 'memoize'.
* gnu/packages.scm (find-newest-available-packages): Use 'mlambda'
instead of (memoize (lambda ...) ...).
* gnu/packages/bootstrap.scm (package-with-bootstrap-guile): Likewise.
* guix/build-system/gnu.scm (package-with-explicit-inputs)[rewritten-input]:
Likewise.
* guix/build-system/python.scm (package-with-explicit-python)[transform]:
Likewise.
* guix/derivations.scm (derivation->string): Likewise.
* guix/gnu-maintenance.scm (gnu-package?): Likewise.
* guix/modules.scm (module-file-dependencies): Likewise.
* guix/scripts/graph.scm (standard-package-set): Likewise.
* guix/scripts/lint.scm (official-gnu-packages*): Likewise.
* guix/store.scm (store-regexp*): Likewise.
* guix/utils.scm (location): Likewise.
2017-01-28 18:55:20 +01:00
Ludovic Courtès f9704f179a
Add (guix memoization).
* guix/combinators.scm (memoize): Remove.
* guix/memoization.scm: New file.
* Makefile.am (MODULES): Add it.
* gnu/packages.scm, gnu/packages/bootstrap.scm,
guix/build-system/gnu.scm, guix/build-system/python.scm,
guix/derivations.scm, guix/gnu-maintenance.scm,
guix/import/cran.scm, guix/import/elpa.scm,
guix/modules.scm, guix/scripts/build.scm,
guix/scripts/graph.scm, guix/scripts/lint.scm,
guix/store.scm, guix/utils.scm: Adjust imports accordingly.
2017-01-28 18:55:20 +01:00
Ludovic Courtès 3b0fcc672d
packages: Add 'package-upstream-name' and use it.
* guix/packages.scm (package-upstream-name): New procedure.
* guix/gnu-maintenance.scm (gnu-package?, ftp-server/directory)
(latest-release*, latest-gnome-release)
(latest-kde-release): Use it instead of the inline expression.
2017-01-28 00:38:20 +01:00
Ludovic Courtès 21f4a7c116
import: github: Better tolerate unexpected file extensions.
* guix/import/github.scm (find-extension): Add ".tbz".
(updated-github-url): When 'find-extension' returns #f, use "" for EXT.
2017-01-28 00:38:20 +01:00
Ludovic Courtès 6715e1ff2e
gnu-maintenance: 'gnu-package?' ignores invalid URLs.
* guix/gnu-maintenance.scm (gnu-package?)[gnu-home-page?]: Add '>>'
threading macro and use it.
2017-01-28 00:38:20 +01:00
Ludovic Courtès 2e2cf9a3bd
gnu-maintenance: GNU updater handles gnu.org-hosted Emacs packages.
* guix/gnu-maintenance.scm (pure-gnu-package?): If an "emacs-" package
matches 'gnu-hosted?', return true.
(gnu-hosted?): New procedure.
2017-01-28 00:38:20 +01:00
Ludovic Courtès b03218d532
gnu-maintenance: Honor 'upstream-name' property in GNU updater.
* guix/gnu-maintenance.scm (gnu-package?): Honor the 'usptream-name'
property of PACKAGE.
(ftp-server/directory): Likewise.
2017-01-28 00:38:19 +01:00
Marius Bakke 5a64a79131
utils: Add helper method to make files writable.
* gnu/build/activation.scm (make-file-writable): Move this to ...
* guix/build/utils.scm (make-file-writable): ... here. Export it.
* guix/build/gnu-build-system.scm (strip): Use it.
2017-01-26 22:19:16 +01:00
Ludovic Courtès 1d636d6319
build-system/gnu: Add 'reset-gzip-timestamps' phase.
* guix/build/gnu-build-system.scm (reset-gzip-timestamps): New
procedure.
(%standard-phases): Add it.
2017-01-26 22:05:49 +01:00
Ludovic Courtès 95e7be9728
utils: Add 'gzip-file?' and 'reset-gzip-timestamp'.
* guix/build/utils.scm (%gzip-magic-bytes): New variable.
(gzip-file?, reset-gzip-timestamp): New procedures.
2017-01-26 21:58:37 +01:00
Ricardo Wurmus 0db2ff65e7
bournish: Extend 'rm' command.
* guix/build/bournish.scm (rm-command): New procedure.
(%commands): Use it.
* tests/bournish.scm: Add tests for "rm" and "rm -r".
2017-01-26 13:49:56 +01:00
Carlo Zancanaro 2f977d92d3
import: pypi: Don't add setuptools to propagated-inputs.
* guix/import/pypi.scm (compute-inputs): Don't add setuptools to the imported
  package's propagated-inputs.
2017-01-26 13:44:31 +01:00
Ludovic Courtès 0363474a0b
build-system/gnu: 'strip' phase now skips symlinks.
This avoids a situation where the "debug" output would contain separate
(and different) .debug files for "libfoo.so" and "libfoo.so.0.0", even
though "libfoo.so" is actually a symlink to "libfoo.so.0.0".

* guix/build/gnu-build-system.scm (strip): Remove 'file-exists?' call in
'for-each' lambda.  Pass a predicate to 'find-files' to restrict the
result to regular files.
2017-01-26 11:29:38 +01:00
Mathieu Othacehe db6afe387a
copy: Use userauth-public-key/auto! for ssh authentification.
* guix/scripts/copy.scm (open-ssh-session): Replace userauth-agent! by
  userauth-public-key/auto!. This way, if ssh-agent is not run,
  default ssh key (~/.ssh/id_rsa) will be used as a fallback.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-01-26 11:26:24 +01:00
Leo Famulari d123f2f991
Merge branch 'master' into core-updates 2017-01-25 12:42:39 -05:00
Christopher Baines 0ca575f3bb
container: Pass through TERM when calling exec.
* guix/scripts/container/exec.scm (guix-container-exec): Capture the value of
  the TERM environment variable, and pass it through to the container.  This
  means some applications now work where they did not before (e.g. htop), and
  others have more functionality, providing that the terminal was capable of
  enabling that functionality in the first place.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2017-01-25 14:27:31 +01:00
Ludovic Courtès 482fda2729
grafts: Do not pull derivation outputs not depended on.
Fixes <http://bugs.gnu.org/24886>.

Previously, the grafting derivation of, say, brdf-explorer would pull in
qt:doc even though brdf-explorer depends only on qt:out, not qt:doc.

* guix/grafts.scm (with-cache): Use 'vhash-assoc' and 'vhash-cons'
instead of 'vhash-assq' and 'vhash-consq'.
(cumulative-grafts): Pass #:outputs to 'graft-derivation/shallow'.  Use
OUTPUTS instead of (derivation-output-names drv).
(graft-derivation): Add #:outputs parameter; pass it to
'cumulative-grafts'.
* tests/grafts.scm (make-derivation-input): New variable.
("graft-derivation, replaced derivation has multiple outputs"): Make
sure P2:zzz is not part of the outputs of P3D.
("graft-derivation with #:outputs")
("graft-derivation, unused outputs not depended on"): New tests.
2017-01-25 11:04:25 +01:00
Ludovic Courtès fd7d1235f1
grafts: Shallow grafting can be performed on a subset of the outputs.
* guix/grafts.scm (graft-derivation/shallow): Add #:outputs parameter.
[outputs]: Rename to...
[output-pairs]: ... this.  Adjust 'build-expression->derivation' call
accordingly.
2017-01-24 23:09:06 +01:00
Ludovic Courtès 3483f004a9
syscalls: Export 'read-utmpx'.
* guix/build/syscalls.scm (read-utmpx-from-port): New procedure.
* tests/syscalls.scm ("read-utmpx, EOF")
("read-utmpx"): New tests.
2017-01-24 00:46:37 +01:00
Ludovic Courtès 58ea4d407c
Merge branch 'master' into core-updates 2017-01-23 22:33:10 +01:00
Ludovic Courtès fcd75bdbfa
search-paths: Allow specs with #f as their separator.
This adds support for single-entry search paths.
Fixes <http://bugs.gnu.org/25422>.
Reported by Leo Famulari <leo@famulari.name>.

* guix/search-paths.scm (<search-path-specification>)[separator]:
Document as string or #f.
(evaluate-search-paths): Add case for SEPARATOR as #f.
(environment-variable-definition): Handle SEPARATOR being #f.
* guix/build/utils.scm (list->search-path-as-string): Add case for
SEPARATOR as #f.
(search-path-as-string->list): Likewise.
* guix/build/profiles.scm (abstract-profile): Likewise.
* tests/search-paths.scm: New file.
* Makefile.am (SCM_TESTS): Add it.
* tests/packages.scm ("--search-paths with single-item search path"):
New test.
* gnu/packages/version-control.scm (git)[native-search-paths](separator):
New field.
2017-01-23 22:23:41 +01:00
Ludovic Courtès c5746f2399
guix package: Honor the order of profiles when -p appears multiple times.
* guix/scripts/package.scm (process-query): Reverse the order of
PROFILES.
* tests/guix-package-net.sh: Test it with '--search-paths'.
2017-01-23 22:21:23 +01:00
Ludovic Courtès ac080e296e
lint: Display PACKAGE@VERSION.
* guix/scripts/lint.scm (run-checkers): Remove 'name' variable.  Display
PACKAGE@VERSION instead of PACKAGE-VERSION.
2017-01-21 16:43:26 +01:00
Ludovic Courtès 150309726f
syscalls: Add utmpx procedures and data structure.
* guix/build/syscalls.scm (<utmpx-entry>): New record type.
(%utmpx): New C struct.
(login-type): New bits.
(setutxent, endutxent, getutxent, utmpx-entries): New procedures.
2017-01-19 23:21:25 +01:00
Ludovic Courtès 57f068bec5
syscalls: Extract 'bytes->string'.
* guix/build/syscalls.scm (bytes->string): New procedure.
(bytevector->string-list): Use it.
2017-01-19 23:20:57 +01:00
Mathieu OTHACEHE d18b79fed8
import: github: Catch HTTP 403 error during fetch.
* guix/import/github.scm (json-fetch*): Catch 403 HTTP error that may be
  raised if a github token has not been set.

Signed-off-by: Mathieu OTHACEHE <m.othacehe@gmail.com>
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-01-19 17:17:16 +01:00
Ludovic Courtès 840f38ba37
guix environment, build: Allow absolute file names with '--root'.
Reported by Chris Webber.

* guix/scripts/build.scm (register-root): If ROOT is absolute, keep it
as is.
* guix/scripts/environment.scm (register-gc-root): Likewise.
* tests/guix-environment.sh (expected): Add test.
2017-01-19 00:11:15 +01:00
Ludovic Courtès 0aeed5e310
grafts: Preserve the cache across recursive calls.
Before this commit, we'd lose the cache across recursive calls to
'cumulative-grafts', which isn't great performance-wise.

This bug was already present before
d38bc9a9f6.

* guix/grafts.scm (with-cache): In the miss case, call 'current-state'
after EXP has been evaluated.
2017-01-16 22:13:21 +01:00
Ludovic Courtès 90ad5c8836
grafts: Actually cache grafts during the derivation DAG traversal.
This fixes a regression introduced in
d38bc9a9f6 whereby the cache was
effectively disabled.

Reported by Thomas Danckaert <thomas.danckaert@gmail.com>.

* guix/grafts.scm (with-cache): In the cache miss case, wrap body in
'mbegin'.
2017-01-16 22:13:21 +01:00
Christopher Baines 849a1b8133
profiles: Export 'ca-certificate-bundle'.
* guix/profiles.scm: Export ca-certificate-bundle, such that it can be used in
other G-expressions.  This is useful where these G-expressions run programs
that require a ca-certificate-bundle, e.g. git.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-01-16 11:03:42 +01:00
Ludovic Courtès 6da5bb7b1b
guix build: Add '--repair'.
* guix/scripts/build.scm (show-help, %options): Add '--repair'.
* doc/guix.texi (Invoking guix gc): Mention 'guix build --repair'.
(Additional Build Options): Document it.
2017-01-15 22:47:25 +01:00
Ludovic Courtès d9da3a757d
guix build: Do not force 'build-cores', 'max-build-jobs', and 'max-silent-time'.
This lets the daemon use its own default settings unless otherwise
specified.

* guix/scripts/build.scm (set-build-options-from-command-line): Do not
provide default values for #:build-cores and #:max-build-jobs.
(%default-options): Remove 'max-silent-time'.
2017-01-15 15:43:22 +01:00
Ludovic Courtès deac976d3d
daemon: Client settings no longer override daemon settings.
Fixes <http://bugs.gnu.org/20217>.

* nix/libstore/worker-protocol.hh (PROTOCOL_VERSION): Bump to 0x161.
* nix/nix-daemon/nix-daemon.cc (performOp): "build-max-jobs",
"build-max-silent-time", and "build-cores" are no longer read upfront;
instead, read them from the key/value list at the end.
* nix/nix-daemon/guix-daemon.cc (main): Explicitly set
'settings.maxBuildJobs'.
* guix/store.scm (%protocol-version): Bump to #x161.
(set-build-options): #:max-build-jobs, #:max-silent-time, and
 #:build-cores now default to #f.  Adjust handshake to new protocol.
* tests/store.scm ("build-cores"): New test.
* tests/guix-daemon.sh: Add test for default "build-cores" value.
2017-01-15 15:43:22 +01:00
Ludovic Courtès 153b62957c
challenge: Add '--verbose'.
* guix/scripts/challenge.scm (summarize-report): Add #:verbose?
parameter.
[report-hashes]: New procedure.  Use it.
Honor VERBOSE? in the 'match case.
(show-help, %options): Add '--verbose'.
(guix-challenge): Honor it.
2017-01-14 00:57:51 +01:00
Ludovic Courtès 4d8e95097e
challenge: Return comparison reports instead of just discrepancies.
This makes it easier to distinguish between matches, mismatches, and the
various cases of inconclusive reports.

* guix/scripts/challenge.scm (<discrepancy>): Rename to...
(<comparison-report>): ... this.  Add 'result' field.
(comparison-report): New macro.
(comparison-report-predicate, comparison-report-mismatch?)
(comparison-report-match?)
(comparison-report-inconclusive?): New procedures.
(discrepancies): Rename to...
(compare-contents): ... this.  Change to return a list of
<comparison-report>.  Remove calls to 'warning'.
(summarize-discrepancy): Rename to...
(summarize-report): ... this.  Adjust to <comparison-report>.
(guix-challenge): Likewise.
* tests/challenge.scm ("no discrepancies")
("one discrepancy"): Adjust to new API.
("inconclusive: no substitutes")
("inconclusive: no local build"): New tests.
2017-01-14 00:57:51 +01:00
ng0 d8c8e423ed
licenses: Add wtfpl2.
* guix/licenses.scm (wtfpl2): New variable.

Signed-off-by: Leo Famulari <leo@famulari.name>
2017-01-13 14:13:01 -05:00
Ludovic Courtès 608a50b66c
http-client: Provide 'User-Agent' header by default.
* guix/http-client.scm (http-fetch): Add #:headers parameter and honor
it.  Rename 'auth-header' to 'headers'.
* guix/import/github.scm (json-fetch*): Add comment about required
User-Agent.
2017-01-13 18:24:19 +01:00
Ludovic Courtès 4cd5ec801b
import: github: Fix regression on the /releases retrieval.
Fixes a regression introduced in
62bd24db39, which introduced a call to
'hash-table->alist'.

* guix/import/github.scm (json-fetch*): New procedure.
(latest-released-version): Use it.
2017-01-13 18:24:19 +01:00
Ludovic Courtès 6d30b1b2ca
ui: Wrap 'canonicalize-path' for better error reporting.
Reported by Christopher Baines.

* guix/ui.scm (canonicalize-path): New procedure.
2017-01-13 18:24:19 +01:00
Ludovic Courtès e7ff05438f
ui: Factorize error-reporting wrapper code.
* guix/ui.scm (augmented-system-error-handler): New procedure.
(error-reporting-wrapper): New macro.
(symlink, copy-file): Define using 'error-reporting-wrapper'.
2017-01-13 18:24:19 +01:00
Leo Famulari cc0725914e
Merge branch 'master' into python-tests 2017-01-13 10:21:17 -05:00
Ludovic Courtès 4cdff6ae37
challenge: Use a warning when substitutes are lacking.
* guix/scripts/challenge.scm (discrepancies): Use 'warning' instead of
'leave'.
2017-01-12 23:28:45 +01:00
Ludovic Courtès 26ab00a0a9
perform-download: Add backward-compatible case.
This is meant to ease transition for people running an older guix-daemon
invoking a recent 'guix perform-download' with only one argument.

This is a followup to 9b5364a3af.

* guix/scripts/perform-download.scm (perform-download): Make 'output'
optional.  Bind 'output*' from DRV's "out" and honor it.
(guix-perform-download): Add clause with one argument.
2017-01-11 23:01:54 +01:00
Mathieu Lirzin dc673fa113
derivations: Make <derivation> record datatype immutable.
* guix/derivations.scm (<derivation>): Make it immutable.
(derivation): Use generic 'set-field' instead of ad-hoc functional setter.
2017-01-11 18:55:31 +01:00
Mathieu Lirzin 5c6a30c511
git download: Remove redundant argument in 'gexp->derivation' call.
* guix/git-download.scm (git-fetch): Call 'gexp->derivation' with only one
'#:local-build?' keyword argument.
2017-01-11 18:55:26 +01:00
Ludovic Courtès 9b5364a3af
daemon: Allow check builds of 'builtin:download' derivations.
Fixes <http://bugs.gnu.org/25089>.
Reported by Leo Famulari <leo@famulari.name>.

* nix/libstore/build.cc (DerivationGoal::runChild): In the 'isBuiltin'
case, check whether DRV's output is in 'redirectedOutputs', and pass an
'output' argument to the built-in builder.
(DerivationGoal::addHashRewrite): Add 'printMsg' call.
* nix/libstore/builtins.hh (derivationBuilder): Add 'output' parameter.
* nix/libstore/builtins.cc (builtinDownload): Likewise.
Add OUTPUT to ARGV.
* guix/scripts/perform-download.scm (perform-download): Add 'output'
parameter.
(guix-perform-download): Adjust 'match' clauses accordingly.
* tests/derivations.scm ("'download' built-in builder, check mode"): New
test.
2017-01-11 17:06:31 +01:00
Ludovic Courtès aa042770da
guix package: Fix version and output for 'guix package -i /gnu/store/…'.
* guix/utils.scm (package-name->name+version): Add optional 'delimiter'
parameter.
* guix/scripts/package.scm (store-item->manifest-entry): Pass #\- as the
delimiter for 'package-name->name+version'.  Use "out" instead of #f for
the 'output' field.
* tests/guix-package.sh: Add test.
2017-01-11 11:58:21 +01:00
Ludovic Courtès 1545a012cb
guix archive: Allow compilation in the absence of Guile-JSON.
Fixes <http://bugs.gnu.org/25409>.
Reported by Ben Woodcroft <b.woodcroft@uq.edu.au>.

* guix/scripts/archive.scm: Use 'module-autoload!' instead of #:use-module
to (guix docker).
2017-01-10 15:56:49 +01:00
Ludovic Courtès dd1141eba2
http-client: Improve error reporting.
* guix/http-client.scm (http-fetch): Change message in &message
condition to include URI, CODE, and the reason phrase.
2017-01-10 15:34:11 +01:00
Ludovic Courtès 01445711db
guix archive: '-f docker' supports package names as arguments.
This allows users to type:

  guix archive -f docker emacs

as was already the case for the 'nar' format.

Reported by David Thompson.

* guix/scripts/archive.scm (%default-options): Add 'format'.
(export-from-store): Dispatch based on the 'format' key in OPTS.
(guix-archive): Call 'export-from-store' in all cases when the 'export'
key is in OPTS.
2017-01-07 22:55:40 +01:00
Leo Famulari 74288230ea
Merge branch 'master' into core-updates 2017-01-06 17:14:41 -05:00
Ricardo Wurmus 03476a23ff
guix: Add Docker image export.
* guix/docker.scm: New file.
* Makefile.am (MODULES): Register it.
* guix/scripts/archive.scm (show-help, %options, guix-archive): Add
support for "--format".
* doc/guix.texi (Invoking guix archive): Document it.
2017-01-06 16:44:00 +01:00
Ludovic Courtès 76c31074c8
derivations: Share a cache between 'derivation' and 'read-derivation'.
This leads a 13% speedup on 'guix build libreoffice -d' and 18% on
'guix build gnome -d'.

* guix/derivations.scm (%derivation-cache): New variable.
(read-derivation): Use it instead of the private 'cache' variable.
(derivation): Populate %DERIVATION-CACHE before returning.
2017-01-05 23:45:39 +01:00
Ludovic Courtès 6d943e553d
derivations: Micro-optimize 'write-derivation'.
* guix/derivations.scm (write-derivation)[write-input]: Use 'display'
instead of 'write' for PATH.
Use 'simple-format' instead of 'format', and '~a' instead of '~s' for
SYSTEM and BUILDER.
2017-01-05 23:45:38 +01:00
Ludovic Courtès b96a0640a3
graph: Add '%reverse-package-node-type'.
* guix/scripts/graph.scm (%reverse-package-node-type): New variable.
(%node-types): Add it.
* tests/graph.scm ("reverse package DAG"): New test.
* doc/guix.texi (Invoking guix refresh): Add cross-reference to
"Invoking guix graph".
(Invoking guix graph): Document 'reverse-package'.
2017-01-04 16:18:53 +01:00
Ludovic Courtès d38bc9a9f6
grafts: Move caching to a new 'with-cache' macro.
* guix/grafts.scm (with-cache): New macro.
(cumulative-grafts)[return/cache]: Remove.
Use 'with-cache' instead.
2017-01-04 16:18:52 +01:00
Julien Lepiller e6876cb9dc
gnu: Add ocaml-build-system.
* guix/build/ocaml-build-system.scm: New file.
* guix/build-system/ocaml.scm: New file.
* Makefile.am (MODULES): Add them.
* gnu/packages/ocaml.scm (ocaml)[native-search-paths]: Adjuste OCAMLPATH.

Signed-off-by: David Craven <david@craven.ch>
2017-01-04 16:03:39 +01:00
David Craven ee17a9e06e
git-download: Add some helpers.
* guix/git-download.scm (git-version, git-file-name): New variables.
2017-01-04 11:44:07 +01:00
David Craven 3b7ccbe94c
build-system: cargo: Use correct cargo.
* gnu/packages/rust.scm (cargo-bootstrap): Make private.
* guix/build-system/cargo.scm (default-cargo): Use cargo.
2017-01-04 11:29:15 +01:00
Manolis Ragkousis 484437bd43
guix: build: make-bootstrap: Copy libpthread_nonshared.a to the new system.
* guix/build/make-bootstrap.scm (%libc-object-files-rx): Update regexp.
2017-01-03 16:00:43 +02:00
Ludovic Courtès d925cdc35f
ui: Keep the word "Copyright" untranslated.
Suggested by John Darrington <john@darrington.wattle.id.au>.

* guix/ui.scm (show-version-and-exit): Make "Copyright (C) 2017"
untranslatable, except "(C)" itself, like Gnulib's version-etc does.
2017-01-02 23:14:36 +01:00
Ludovic Courtès eeb05e87d3
guix hash: '-x' excludes '.git' even when it is a regular file.
* guix/scripts/hash.scm (guix-hash)[vcs-file?]: Add case for '.git'
regular files.
2017-01-02 15:23:21 +01:00
Ludovic Courtès 74d862e8a2
ui: It's 2017 now!
* guix/ui.scm (show-version-and-exit): Change year to 2017.
2017-01-01 23:38:52 +01:00
Ludovic Courtès a6e0ae4046
syscalls: 'terminal-columns' swallows ENOSYS.
* guix/build/syscalls.scm (terminal-columns): Catch ENOSYS.
2017-01-01 23:38:07 +01:00
Ludovic Courtès fef494d27d
gnu-maintenance: Update ViewVC URLs.
* guix/gnu-maintenance.scm (%gnumaint-base-url): Change "/gnumaint" to
"/womb/gnumaint".
(%package-list-url, %package-description-url): Adjust accordingly.
2017-01-01 23:30:30 +01:00
Ludovic Courtès 5e2e4a51f9
gexp: Support 'ungexp' forms in improper lists.
* guix/gexp.scm (gexp)[collect-escapes, substitute-references]: Replace
the (exp0 exp ...) patterns with (exp0 . exp) to match improper lists.
Adjust clause bodies accordingly.
* tests/gexp.scm ("one input package, dotted list"): New test.
2017-01-01 23:30:30 +01:00
Ludovic Courtès 4a6e889feb
gexp: Properly report substitution errors.
* guix/gexp.scm (gexp)[substitute-ungexp]: Wrap body in 'with-syntax'
and pass EXP as the last argument to 'syntax-error'.
[substitute-ungexp-splicing]: Pass EXP as the last argument to
'syntax-error'.
2017-01-01 23:30:30 +01:00
David Craven f1d136957d
build-system: cargo: Handle Cargo.lock file not present.
* guix/build-system/cargo.scm (cargo-build): Add src output.
  (private-keywords): Add #:outputs.
* guix/build/cargo-build-system.scm (configure): Use /share/rust-source
  when replacing inputs.
  (build, check): Don't do anything when there isn't a Cargo.lock file
  present.
  (install): Install sources to src output. When a Cargo.lock file is
  present use cargo install to install binaries to out.
* guix/import/crate.scm (make-crate-sexp): Importer uses the src output
  for crate inputs by default.
* guix/import/utils.scm (package-names->package-inputs, maybe-inputs,
  maybe-native-inputs): Take an optional output argument.
* tests/crate.scm (crate->guix-package test): Update.

Problem reported by Francisco Gómez García <espectalll@kydara.com>.
2017-01-01 18:20:52 +01:00
David Craven f53a5514e0
import: crate: Provide a default home-page value.
* guix/import/crate.scm (make-crate-sexp): Provide a default home-page
  value.
* tests/crate.scm (test-crate): Add repository field.

Problem reported by ng0 <ng0@libertad.pw>.
2017-01-01 18:12:06 +01:00
David Craven dc77498c1c
build-system: cargo: Make Cargo.toml writeable.
* guix/build/cargo-build-system.scm (configure): Make sure Cargo.toml
  is writeable before attempting modification.

Problem reported by Danny Milosavljevic <dannym@scratchpost.org>.
2017-01-01 18:11:57 +01:00
Ludovic Courtès f11c444d44
Add 'guix copy'.
* guix/scripts/copy.scm: New file.
* guix/scripts/archive.scm (options->derivations+files): Export.
* doc/guix.texi (Invoking guix copy): New node.
* Makefile.am (MODULES) [HAVE_GUILE_SSH]: Add guix/scripts/copy.scm.
* po/guix/POTFILES.in: Likewise.
2016-12-31 18:35:29 +01:00
Ludovic Courtès 13164a2102
ssh: 'retrieve-files' detects remote export failures.
* guix/ssh.scm (retrieve-files): Call 'lookahead-u8' and raise a
'&message' condition when it returns EOF.
2016-12-31 18:35:29 +01:00
Ludovic Courtès 23973e4fbf
ssh: 'send-files' returns the list of items sent.
* guix/ssh.scm (send-files): Return MISSING.
2016-12-31 18:35:29 +01:00
Ludovic Courtès e9629e8221
ssh: Allow transfers of complete closures.
* guix/ssh.scm (store-export-channel, send-files)
(file-retrieval-port, retrieve-files): Add #:recursive? parameter and
honor it.
2016-12-31 18:35:29 +01:00
Ludovic Courtès c0b2d08bf4
git-download: Use a single download script for all derivations.
That way, we have only one /gnu/store/…-git-download instead of one
/gnu/store/…-PACKAGE-checkout-builder for each package.

This is a followup to ced200328c.

* guix/git-download.scm (git-fetch)[build]: Get the URL, commit, and
recursive parameter using 'getenv'.  Pass #:script-name and #:env-vars
arguments to 'gexp->derivation'.
2016-12-31 18:35:29 +01:00
Ludovic Courtès 987a29ba43
Add (guix ssh) module.
* guix/scripts/offload.scm (connect-to-remote-daemon)
(store-import-channel, store-export-channel, send-files)
(retrieve-files): Move to (guix ssh).
(nonce): Add optional 'name' parameter and use it.
(retrieve-files*): New procedure.
(transfer-and-offload): Use it instead of 'retrieve-files', and add
first parameter to 'send-files'.
(assert-node-can-import): Likewise.
(assert-node-can-export): Use 'retrieve-files' instead of
'store-export-channel'.
* guix/ssh.scm: New file.
* configure.ac: Use 'GUIX_CHECK_GUILE_SSH' and define 'HAVE_GUILE_SSH'
Automake conditional.
* Makefile.am (MODULES) [HAVE_GUILE_SSH]: Add guix/ssh.scm.
2016-12-31 01:44:04 +01:00
Carlo Zancanaro 681a555b83
import: elpa: Import dependencies as propagated-inputs
* guix/import/elpa.scm (elpa-package->sexp): Import dependencies as
propagated-inputs.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2016-12-29 18:22:49 +01:00
Carlo Zancanaro 36225d4fef
import: elpa: Fix call-with-downloaded-file
* guix/import/elpa.scm (call-with-downloaded-file): Make function behaviour
match documentation string.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2016-12-29 18:22:49 +01:00
Ludovic Courtès 7c247809ef
guix build: '--with-source' overrides the 'replacement' of a package.
* guix/scripts/build.scm (package-with-source): Set 'replacement' to #f.
* tests/scripts-build.scm ("options->transformation, with-source,
replacement"): New test.
2016-12-21 23:48:14 +01:00
Ludovic Courtès 62bd24db39
import: github: Use 'json-fetch'.
* guix/import/github.scm (json-fetch*): Remove.
(latest-released-version): Adjust accordingly.
2016-12-20 19:14:41 +01:00
Ludovic Courtès f943c317fb
environment: Add '--root' option.
* guix/scripts/environment.scm (show-help, %options): Add --root.
(register-gc-root): New procedure.
(guix-environment): Call 'register-gc-root' when OPTS has a 'gc-root'
option.
* doc/guix.texi (Invoking guix environment): Document it.
* tests/guix-environment.sh: Add tests.
2016-12-20 19:14:41 +01:00
Marius Bakke 4cb7786eff
import: pypi: Match new 'pypi-uri' domain in updater.
* guix/import/pypi.scm (pypi-package?): Match pypi.io domain.
2016-12-20 12:57:26 +01:00
Ludovic Courtès d343a60f93
gexp: Slightly simplify 'gexp-inputs'.
* guix/gexp.scm (gexp-inputs)[add-reference-inputs]: Remove unneeded
'if' in the non-native nested gexp case.
2016-12-19 17:51:00 +01:00
Ludovic Courtès 5b14a7902c
gexp: Native inputs of nested gexps are properly accounted for.
Previously, 'gexp-native-inputs' would not return the native inputs of
nested gexps.  For example, this:

  (gexp-native-inputs #~(foo #$#~(bar #+coreutils)))

would return '().

* guix/gexp.scm (gexp-inputs)[add-reference-inputs]: In the
non-recursive cases, check whether N? and NATIVE? are the same, and act
accordingly.
[native-input?]: Remove.
Fold over all of (gexp-references exp).
* tests/gexp.scm ("ungexp + ungexp-native, nested, special mixture"):
New test.
* tests/gexp.scm ("input list splicing + ungexp-native-splicing"): Pass
 #:native? #t to 'gexp-input'.
2016-12-19 17:51:00 +01:00
Ricardo Wurmus fdbc84b056
import cran: Handle HTTP errors.
Fixes <http://bugs.gnu.org/23479>.

* guix/import/cran.scm (fetch-description): Return #f in case of HTTP
errors.
2016-12-17 19:13:42 +01:00
Ricardo Wurmus d68ba5f483
guix import: Print list of expressions.
* guix/scripts/import.scm (guix-import): Print list of expressions.
2016-12-17 19:13:41 +01:00
Ricardo Wurmus 64ce53eb5e
import cran: Add "recursive" option.
* guix/scripts/import/cran.scm: (%options): Add "recursive" option.
(guix-import-cran): Handle "recursive" option.
* doc/guix.texi (Invoking guix import): Document it.
2016-12-17 19:13:41 +01:00
Ricardo Wurmus 94e907b962
import cran: Add recursive importer.
* guix/import/cran.scm (recursive-import): New variable.
(cran->guix-package): Memoize the procedure.
2016-12-17 19:12:55 +01:00
Ricardo Wurmus b26abe4f14
import cran: Ignore default R packages.
* guix/import/cran.scm (default-r-packages): New variable.
(description->package): Drop default R packages from list of inputs.
2016-12-17 15:56:48 +01:00
Ricardo Wurmus ad68f7fa58
import cran: description->package: Also return package dependencies.
* guix/import/cran.scm (description->package): Return package
  dependencies in addition to generated package expression.
2016-12-17 15:56:48 +01:00
Ricardo Wurmus bfa0c752bc
import cran: Move guix-name to top-level.
* guix/import/cran.scm (guix-name): Move to top-level.
2016-12-17 15:56:48 +01:00
Ricardo Wurmus 2e5f32ce1b
import cran: Remove more invalid characters from package names.
* guix/import/cran.scm (guix-name): Replace period and underscore with
  dash; always prepend package names with "r-".
2016-12-17 15:56:47 +01:00
Ricardo Wurmus 576eda6d02
import cran: Handle BSD licenses with LICENSE file.
* guix/import/cran.scm (string->license): Add cases for BSD licenses
with LICENSE file.
2016-12-17 15:56:47 +01:00
Ricardo Wurmus 741d68c20d
import cran: Translate MIT to the Expat license.
* guix/import/cran.scm (string->license): Translate "MIT" license to
Expat license.
2016-12-17 15:56:47 +01:00
Ricardo Wurmus 13f54d081b
import cran: Do not use "or later" licenses by default.
* guix/import/cran.scm (string->license): Use exact license versions.
2016-12-17 15:56:39 +01:00
Ludovic Courtès a6562c7e20
profiles: Remove dependency on 'glibc-utf8-locales' for tests.
Commit 1af0860e8b added a mandatory
dependency on 'glibc-utf8-locales', which entails long rebuilds for
tests.

* guix/profiles.scm (profile-derivation): Add #:locales? parameter.
Add 'set-utf8-locale' variable.  Use it when LOCALES? is true.
(link-to-empty-profile): Pass #:locales? #f.
* guix/scripts/environment.scm (inputs->profile-derivation): Pass
  #:locales?.
* guix/scripts/package.scm (build-and-use-profile): Likewise.
* tests/packages.scm ("--search-paths with pattern"): Pass #:locales? #f.
* tests/profiles.scm ("profile-derivation")
("profile-derivation, inputs", "profile-manifest, search-paths")
("etc/profile", "etc/profile when etc/ already exists"):
("etc/profile when etc/ is a symlink"): Likewise.
2016-12-17 14:46:42 +01:00
Ludovic Courtès 1af0860e8b
profiles: Build profiles in a UTF-8 locale.
Fixes <http://bugs.gnu.org/25213>.
Reported by Christopher Baines <mail@cbaines.net>.

* guix/profiles.scm (profile-derivation)[glibc-utf8-locales]: New
variable.
[builder]: Use it to set 'LOCPATH'.
2016-12-16 18:01:08 +01:00
Ludovic Courtès 580deec5b4
download: Protect against dangling symlinks in $SSL_CERT_DIR.
Reported by Christopher Baines <mail@cbaines.net>
in <https://bugs.gnu.org/25213>.

* guix/build/download.scm (make-credendials-with-ca-trust-files): Check
whether FILE exists before calling
'set-certificate-credentials-x509-trust-file!'.
2016-12-16 18:00:01 +01:00
Ludovic Courtès 99ec0cb397
refresh: Make dependency on (guix import crates) weak.
Reported by Tobias Geerinckx-Rice <me@tobias.gr>.

* guix/scripts/refresh.scm: Do not explicitly import (guix import crates).
2016-12-16 17:38:39 +01:00
David Craven 6976c68158
upstream: Determine archive type correctly.
* guix/upstream.scm (package-update): Take the basename of the uri
  before trying to determine the extension.
2016-12-15 05:57:03 +01:00
Ricardo Wurmus 4d93f312f0
graph: Add d3js backend.
* d3.v3.js, graph.js: New files.
* Makefile.am (EXTRA_DIST): List them.
* guix/graph.scm (%d3js-backend): New variable.
(emit-d3js-prologue, emit-d3js-epilogue, emit-d3js-node,
emit-d3js-edge): New procedures.
(%graph-backends): Add %d3js-backend.
2016-12-14 21:58:32 +01:00
Ricardo Wurmus 642339dc3f
graph: Add "list-backend" and "backend" options.
* guix/graph.scm (%graph-backends): New variable.
* guix/scripts/graph.scm (lookup-backend, list-backends): New
procedures.
(%options): Add options for "backend" and "list-backends".
(show-help): Add help texts for "backend" and "list-backend" options.
(%default-options): Add "backend" default.
(guix-graph): Pass backend argument to "export-graph".
* doc/guix.texi (Invoking guix graph): Document the new options.
2016-12-14 21:57:37 +01:00
Ricardo Wurmus 51377437a1
graph: Backend must have name and description.
* guix/graph.scm (<graph-backend>): Add fields "name" and "description".
(%graphviz-backend): Provide values for name and description.
(export-graph): Ignore name and description when matching backends.
(graph-backend-name, graph-backend-description): New procedures.
* tests/graph.scm (make-recording-backend): Initialize name and
description fields of test graph-backend.
2016-12-14 21:43:06 +01:00
David Craven 8ac5298786
import: Add updater for rust crates.
* guix/import/crate.scm (crate-package?, latest-release,
  %crate-updater): New variables.
* guix/scripts/refresh.scm (%updaters): Add crate updater.
* doc/guix.texi: Add crate updater to table.
2016-12-14 16:30:42 +01:00
David Craven 3e0c036584
import: Add importer for rust crates.
* guix/import/crate.scm: New file.
* guix/scripts/import/crate.scm: New file.
* guix/scripts/import.scm (importers): Add crate importer.
* tests/crate.scm: New file.
* doc/guix.texi: Add crate importer to table.
* Makefile.am (MODULES, SCM_TESTS): Add files.
2016-12-14 16:30:42 +01:00
David Craven bb3f36ed4c
import: utils: Add some utilities.
* guix/import/utils.scm (maybe-inputs, maybe-native-inputs,
  package->definition): New variables.
2016-12-14 16:30:42 +01:00
David Craven 4b3cb7f4bc
build-system: Add cargo build system.
* guix/build-system/cargo.scm: New file.
* guix/build/cargo-build-system.scm: New file.
* Makefile.am (MODULES): Add files.
2016-12-14 16:30:42 +01:00
Ludovic Courtès af72a21a69
upstream: Use first url when it lacks an extension.
* guix/upstream.scm (package-update): Use a url from the list when it
  lacks an extension.
2016-12-14 14:20:50 +01:00
Marius Bakke e46a043ecd
build-system/python: Make sure 'check' returns failures.
* guix/build/python-build-system.scm (check): Wrap 'call-setuppy' in 'if' so
that it actually fails when the tests fail. Print informational message when
skipped.
2016-12-13 21:04:31 +01:00
Eric Bavier ff55fe5599
import: cpan: Add updater.
* guix/import/cpan.scm (module->dist-name): Fetch the field of interest.
(cpan-fetch): Accept release name rather than module name.
(fix-source-url): Rename to ...
(cpan-source-url): ... this.  Take metadata as parameter.
(package->upstream-name, cpan-version, cpan-package?, latest-release):
New procedures.
(cpan-module->sexp): Use cpan-version and cpan-source-url.
(%cpan-updater): New variable.
* guix/scripts/refresh.scm (%updaters): Add %CPAN-UPDATER.
2016-12-12 22:22:33 -06:00
Eric Bavier d391ad57d6
import: cpan: Move core-module? to top-level.
* guix/import/cpan.scm (cpan-module->sexp): Move local core-module?
procedure to ...
(core-module?): ... here.
2016-12-12 22:22:33 -06:00
Eric Bavier 63773200d7
import: json: Silence json-fetch output.
* guix/import/json.scm (json-fetch): Use http-fetch instead of url-fetch
to avoid writing to stdout and a temporary file for each invocation.
* guix/import/gem.scm (rubygems-fetch): Do not redirect json-fetch
output to /dev/null.
* guix/import/pypi.scm (pypi-fetch): Likewise.
2016-12-12 22:22:02 -06:00
Mark H Weaver d94691e0c2
Merge branch 'master' into staging 2016-12-10 23:03:57 -05:00
Ludovic Courtès 27991c97e6
offload: Allow testing machines that match a regexp.
* guix/scripts/offload.scm (check-machine-availability): Add 'pred'
parameter and honor it.
(guix-offload): for the "test" sub-command, accept an extra 'regexp'
parameter.  Pass a second argument to 'check-machine-availability'.
2016-12-09 23:12:06 +01:00
Ludovic Courtès 2b513387cd
offload: Test each machine only once.
* guix/scripts/offload.scm (check-machine-availability)[build-machine=?]:
New procedure.
Add call to 'delete-duplicates'.
2016-12-09 23:02:02 +01:00
Ludovic Courtès bd8345777f
offload: Do not read ~/.ssh/known_hosts.
* guix/scripts/offload.scm (open-ssh-session): Pass #:knownhosts to
'make-session'.
2016-12-09 23:02:01 +01:00
Ludovic Courtès f80b4d2ce0
Merge remote-tracking branch 'origin/master' into staging 2016-12-09 18:11:14 +01:00
Ludovic Courtès 13d5e8dae5
store: 'open-connection' no longer raises '&nar-error' for protocol errors.
* guix/store.scm (open-connection): Guard body against 'nar-error?' and
re-raise as '&nix-connection-error'.
* tests/store.scm ("connection handshake error"): New test.
2016-12-08 23:12:11 +01:00
Manolis Ragkousis f13f60cb26
gnu: make-bootstrap: Produce the correct %glibc-bootstrap-tarball for Hurd systems.
* gnu/packages/make-bootstrap.scm (%glibc-bootstrap-tarball): Make it a procedure.
  (%glibc-stripped): Make it a procedure and move the kernel specific part from
  here to ...
* guix/build/make-bootstrap.scm (make-stripped-libc): ... here. New file.
* Makefile.am (MODULES): Add it.
2016-12-07 12:59:02 +02:00
Jan Nieuwenhuizen cba36e6482
gnu: cross-base: Add i686-w64-mingw32 target.
* guix/utils.scm (mingw-target?): New function.
* gnu/packages/cross-base.scm (cross-gcc-snippet): New procedure
(cross-gcc): Use it.
(cross-gcc-arguments, cross-gcc-patches, cross-gcc): Support MinGW.
(native-libc, cross-newlib?): New functions.
(cross-libc): Use cross-newlib? to support MinGW.
(%gcc-include-paths, %gcc-cross-include-paths): New variables.
2016-12-07 10:23:16 +01:00
Ludovic Courtès 8d125cfc2e
offload: Increase the connection timeout.
* guix/scripts/offload.scm (open-ssh-session): Set #:timeout to 10.
2016-12-06 01:00:11 +01:00
Ludovic Courtès 0237d79717
offload: Send the build log to the right file descriptor.
This fixes a regression introduced in
21531add32 whereby the build log would no
longer be sent to FD 4, thereby leading the daemon to not see the build
log.

* guix/scripts/offload.scm (transfer-and-offload): Parameterize
CURRENT-BUILD-OUTPUT-PORT.
2016-12-06 00:50:08 +01:00
Ludovic Courtès e11c42f297
offload: Fix plural of some messages.
* guix/scripts/offload.scm (send-files): Use 'N_' for possibly plural
message.  Write "store item" instead of "store file".
(retrieve-files): Likewise.
2016-12-05 23:26:38 +01:00
Ludovic Courtès 1d48cf948c
offload: Make the compression methods configurable.
* guix/scripts/offload.scm (<build-machine>)[compression]
[compression-level]: New fields.
(open-ssh-session): Honor them.
* doc/guix.texi (Daemon Offload Setup): Document them.
2016-12-05 23:19:38 +01:00
Chris Marusich 067a2e2de9
guix system: If the new system generation already exists, overwrite it.
Fixes <http://bugs.gnu.org/25100>.

Before that, 'guix system reconfigure' would fail if the next generation
already existed.

* guix/scripts/system.scm (switch-to-system): Use 'switch-symlink'
instead of 'symlink'.
* doc/guix.texi (Using the Configuration System, Invoking guix system):
Document the behavior.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2016-12-05 23:19:37 +01:00
Tobias Geerinckx-Rice d8501b844b
refresh: Indicate that PACKAGE... is optional.
* guix/scripts/refresh.scm (show-help): Add brackets around PACKAGE.
2016-12-05 20:50:12 +01:00
Ludovic Courtès aebaee95cc
offload: Add "test" sub-command.
* guix/scripts/offload.scm (assert-node-repl, assert-node-has-guix)
(nonce, assert-node-can-import, assert-node-can-export)
(check-machine-availability): New procedures.
(%random-state): New variable.
(guix-offload): Add case for "test".
* doc/guix.texi (Daemon Offload Setup): Document it.  Remove obsolete
bit about remote invocation of 'guix build'.
2016-12-05 18:18:10 +01:00
Ludovic Courtès 42d07286f4
publish: Factorize 'content-length' addition.
* guix/scripts/publish.scm (with-content-length): New procedure.
(http-write) <application/octet-stream>: Use it.
2016-12-04 22:32:26 +01:00
Marius Bakke a351fc8369
Merge branch 'master' into staging 2016-12-04 17:41:36 +01:00
Ludovic Courtès 463fb7d0c8
offload: Do not abort when a machine is unreachable.
* guix/scripts/offload.scm (machine-load): Wrap 'open-ssh-session' call
in 'false-if-exception'; return +inf.0 if it returns #f.
2016-12-01 23:35:11 +01:00
Ludovic Courtès 74afca5dcf
offload: Gracefully report connection failures.
* guix/scripts/offload.scm (open-ssh-session): Check the return value of
'connect!'.  Call 'leave' when it's not 'ok.
2016-12-01 23:35:10 +01:00
Ludovic Courtès 6374633b92
store: Increase buffering for the '%stderr-write' upcall.
* guix/store.scm (process-stderr) <%stderr-write>: Pass #:buffer-size to
'dump-port'.
2016-12-01 23:35:10 +01:00
Ludovic Courtès 0b72475301
offload: Warn about the lack of zlib support.
* guix/scripts/offload.scm (guix-offload): Print a warning when
'zlib-support?' returns false.
2016-12-01 23:35:10 +01:00
Ludovic Courtès f3cf860635
offload: Remove redundant call to 'topologically-sorted' in 'send-file'.
* guix/scripts/offload.scm (send-files): Remove call to
'topologically-sorted'.
2016-12-01 23:35:10 +01:00
Marius Bakke 8a7cbc882a
Merge branch 'master' into staging 2016-11-30 18:24:32 +01:00
Ludovic Courtès 3676f89255
refresh: '--list-updaters' shows updater coverage.
* guix/scripts/refresh.scm (list-updaters-and-exit): Compute the
coverage ratio of each updater and print it.  Print the coverage ratio
for all the updaters.
* doc/guix.texi (Invoking guix refresh): Document it.
2016-11-30 17:35:21 +01:00
Ludovic Courtès 2fd370e816
gnu-maintenance: Add kernel.org updater.
* guix/gnu-maintenance.scm (latest-kernel.org-release): New procedure.
(%kernel.org-updater): New variable.
* guix/scripts/refresh.scm (%updaters): Add it.
2016-11-30 17:35:21 +01:00
Ludovic Courtès 8d5d06282e
upstream: Properly verify signatures of uncompressed tarballs.
* guix/upstream.scm (uncompressed-tarball): New procedure.
(download-tarball): Use it when the basename of SIGNATURE-URL doesn't
contain the basename of URL.
2016-11-30 17:35:21 +01:00
Ludovic Courtès 4e6230ec00
refresh: Honor the selected updaters when '-u' isn't given.
Fixes a regression introduced in
e9c72306fd.

* guix/scripts/refresh.scm (check-for-package-update): Add 'updaters'
parameter and honor it.
(guix-refresh): Pass UPDATERS to 'check-for-package-update'.
2016-11-30 17:35:21 +01:00
Ludovic Courtès 7632f7bc21
gnu-maintenance: Factorize URL prefix predicates.
* guix/gnu-maintenance.scm (url-prefix-predicate): New procedure.
(gnome-package?): Rewrite in terms of 'url-prefix-predicate'.
(kde-package?, xorg-package?): Remove.
(%kde-updater, %xorg-updater): Use 'url-prefix-predicate'.
2016-11-30 17:35:20 +01:00
Hartmut Goebel 3bf4280659
Merge branch 'master' into python-build-system 2016-11-29 18:47:16 +01:00
Ludovic Courtès 3e95d88d51
gnu-maintenance: 'latest-kde-release' honors 'upstream-name' properties.
* guix/gnu-maintenance.scm (latest-kde-release): Honor the
'upstream-name' property of PACKAGE.
2016-11-29 16:12:31 +01:00
Ludovic Courtès e9c72306fd
refresh: Warn about packages that lack an updater.
* guix/upstream.scm (package-update-path): Rename to...
(package-latest-release): ... this.  Remove 'version>?' check.
(package-latest-release*): New procedure.
(package-update): Use it.
* guix/scripts/refresh.scm (lookup-updater): Rename to...
(lookup-updater-by-name): ... this.
(warn-no-updater): New procedure.
(update-package): Add #:warn? parameter and honor it.
(check-for-package-update): New procedure.
(guix-refresh)[warn?]: New variable.
Replace inline code when UPDATE? is false with a call to
'check-for-package-update'.
Pass WARN? to 'check-for-package-update' and 'update-package'.
* doc/guix.texi (Invoking guix refresh): Document it.  Fix a couple of
typos.
2016-11-29 16:12:31 +01:00
Marius Bakke be12f4e275
build-system/perl: Don't create non-deterministic 'perllocal.pod' files.
* guix/build/perl-build-system.scm (configure): Add "NO_PERLLOCAL=1"
to Makefile.PL arguments.
2016-11-28 23:11:39 +01:00
Ludovic Courtès c062b1eb6c
pull: Set '%nix-instantiate' to a sensible value.
Reported by ng0 <ng0@libertad.pw>.
Fixes <http://bugs.gnu.org/25053>.

* guix/build/pull.scm (build-guix): Replace "@NIX_INSTANTIATE@" in
guix/config.scm with "nix-instantiate".
2016-11-28 22:58:18 +01:00
Ludovic Courtès 1cd1d8a7ea
offload: Call 'machine-load' only once per machine.
This fixes a longstanding issue where 'choose-build-machine' would make
on average O(N log(N)) calls to 'machine-load', plus an extra call for
the selected machine, instead of N calls.

* guix/scripts/offload.scm (machine-load): Add comment.
(machine-power-factor, machine-less-loaded-or-faster?): Remove.
(choose-build-machine)[machines+slots]: Rename to...
[machines+slots+loads]: ... this.
[undecorate]: Adjust accordingly.
[machine-less-loaded-or-faster?]: New procedure.
Remove extra 'machine-load' call in body.
2016-11-26 23:21:37 +01:00
Leo Famulari a282cdae10
Merge branch 'master' into core-updates 2016-11-26 16:21:47 -05:00