Commit Graph

2707 Commits (1c7a78f157062c796f6779da645be6212d6cd592)

Author SHA1 Message Date
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
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