diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2016-03-16 10:35:24 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2016-03-16 11:27:37 +0100 |
| commit | df061d079b50111280aa7209b3b3c4cf21fde218 (patch) | |
| tree | af9c1882dafae4c1f505dd3fdb87ea8fdc8a8ddb | |
| parent | 409e4ac6e3d86491901a9c0bb422b0415c906964 (diff) | |
build: Default to "https://mirror.hydra.gnu.org/" for substitutes.
* config-daemon.ac: Check for (gnutls) and define 'GUIX_SUBSTITUTE_URLS'.
* nix/nix-daemon/guix-daemon.cc (main): Use GUIX_SUBSTITUTE_URLS.
* guix/store.scm (%default-substitute-urls): Use 'https' when (gnutls)
is available.
* doc/guix.texi (Binary Installation): Mention mirrors
(Invoking guix-daemon): Mention mirror.hydra.gnu.org.
(Substitutes): Mention mirrors.
(Invoking guix archive): Show https URLs.
| -rw-r--r-- | config-daemon.ac | 14 | ||||
| -rw-r--r-- | doc/guix.texi | 16 | ||||
| -rw-r--r-- | guix/store.scm | 8 | ||||
| -rw-r--r-- | nix/nix-daemon/guix-daemon.cc | 4 |
4 files changed, 31 insertions, 11 deletions
diff --git a/config-daemon.ac b/config-daemon.ac index c74ec94d312..63174d62c79 100644 --- a/config-daemon.ac +++ b/config-daemon.ac | |||
| @@ -110,6 +110,20 @@ if test "x$guix_build_daemon" = "xyes"; then | |||
| 110 | dnl Check for <linux/fs.h> (for immutable file support). | 110 | dnl Check for <linux/fs.h> (for immutable file support). |
| 111 | AC_CHECK_HEADERS([linux/fs.h]) | 111 | AC_CHECK_HEADERS([linux/fs.h]) |
| 112 | 112 | ||
| 113 | dnl Determine the appropriate default list of substitute URLs. | ||
| 114 | GUILE_MODULE_AVAILABLE([have_gnutls], [(gnutls)]) | ||
| 115 | if test "x$have_gnutls" = "xyes"; then | ||
| 116 | guix_substitute_urls="https://mirror.hydra.gnu.org https://hydra.gnu.org" | ||
| 117 | else | ||
| 118 | AC_MSG_WARN([GnuTLS is missing, substitutes will be downloaded in the clear]) | ||
| 119 | guix_substitute_urls="http://mirror.hydra.gnu.org http://hydra.gnu.org" | ||
| 120 | fi | ||
| 121 | AC_MSG_CHECKING([for default substitute URLs]) | ||
| 122 | AC_MSG_RESULT([$guix_substitute_urls]) | ||
| 123 | |||
| 124 | AC_DEFINE_UNQUOTED([GUIX_SUBSTITUTE_URLS], ["$guix_substitute_urls"], | ||
| 125 | [Default list of substitute URLs used by 'guix-daemon'.]) | ||
| 126 | |||
| 113 | dnl Check whether the 'offload' build hook can be built (uses | 127 | dnl Check whether the 'offload' build hook can be built (uses |
| 114 | dnl 'restore-file-set', which requires unbuffered custom binary input | 128 | dnl 'restore-file-set', which requires unbuffered custom binary input |
| 115 | dnl ports from Guile >= 2.0.10.) | 129 | dnl ports from Guile >= 2.0.10.) |
diff --git a/doc/guix.texi b/doc/guix.texi index 438189fb34b..05ce7858d5d 100644 --- a/doc/guix.texi +++ b/doc/guix.texi | |||
| @@ -448,8 +448,8 @@ Directories,,, texinfo, GNU Texinfo}, for more details on changing the | |||
| 448 | Info search path.) | 448 | Info search path.) |
| 449 | 449 | ||
| 450 | @item | 450 | @item |
| 451 | To use substitutes from @code{hydra.gnu.org} (@pxref{Substitutes}), | 451 | To use substitutes from @code{hydra.gnu.org} or one of its mirrors |
| 452 | authorize them: | 452 | (@pxref{Substitutes}), authorize them: |
| 453 | 453 | ||
| 454 | @example | 454 | @example |
| 455 | # guix archive --authorize < ~root/.guix-profile/share/guix/hydra.gnu.org.pub | 455 | # guix archive --authorize < ~root/.guix-profile/share/guix/hydra.gnu.org.pub |
| @@ -912,8 +912,9 @@ remote procedure call (@pxref{The Store}). | |||
| 912 | @item --substitute-urls=@var{urls} | 912 | @item --substitute-urls=@var{urls} |
| 913 | @anchor{daemon-substitute-urls} | 913 | @anchor{daemon-substitute-urls} |
| 914 | Consider @var{urls} the default whitespace-separated list of substitute | 914 | Consider @var{urls} the default whitespace-separated list of substitute |
| 915 | source URLs. When this option is omitted, @indicateurl{http://hydra.gnu.org} | 915 | source URLs. When this option is omitted, |
| 916 | is used. | 916 | @indicateurl{https://mirror.hydra.gnu.org https://hydra.gnu.org} is used |
| 917 | (@code{mirror.hydra.gnu.org} is a mirror of @code{hydra.gnu.org}). | ||
| 917 | 918 | ||
| 918 | This means that substitutes may be downloaded from @var{urls}, as long | 919 | This means that substitutes may be downloaded from @var{urls}, as long |
| 919 | as they are signed by a trusted signature (@pxref{Substitutes}). | 920 | as they are signed by a trusted signature (@pxref{Substitutes}). |
| @@ -1730,7 +1731,8 @@ your system has unpatched security vulnerabilities. | |||
| 1730 | 1731 | ||
| 1731 | @cindex security | 1732 | @cindex security |
| 1732 | @cindex digital signatures | 1733 | @cindex digital signatures |
| 1733 | To allow Guix to download substitutes from @code{hydra.gnu.org}, you | 1734 | To allow Guix to download substitutes from @code{hydra.gnu.org} or a |
| 1735 | mirror thereof, you | ||
| 1734 | must add its public key to the access control list (ACL) of archive | 1736 | must add its public key to the access control list (ACL) of archive |
| 1735 | imports, using the @command{guix archive} command (@pxref{Invoking guix | 1737 | imports, using the @command{guix archive} command (@pxref{Invoking guix |
| 1736 | archive}). Doing so implies that you trust @code{hydra.gnu.org} to not | 1738 | archive}). Doing so implies that you trust @code{hydra.gnu.org} to not |
| @@ -2199,7 +2201,7 @@ served by @code{hydra.gnu.org} to @file{/tmp/emacs}: | |||
| 2199 | 2201 | ||
| 2200 | @example | 2202 | @example |
| 2201 | $ wget -O - \ | 2203 | $ wget -O - \ |
| 2202 | http://hydra.gnu.org/nar/@dots{}-emacs-24.5 \ | 2204 | https://hydra.gnu.org/nar/@dots{}-emacs-24.5 \ |
| 2203 | | bunzip2 | guix archive -x /tmp/emacs | 2205 | | bunzip2 | guix archive -x /tmp/emacs |
| 2204 | @end example | 2206 | @end example |
| 2205 | 2207 | ||
| @@ -4294,7 +4296,7 @@ but you are actually on an @code{x86_64} machine: | |||
| 4294 | 4296 | ||
| 4295 | @example | 4297 | @example |
| 4296 | $ guix build --log-file gdb -s mips64el-linux | 4298 | $ guix build --log-file gdb -s mips64el-linux |
| 4297 | http://hydra.gnu.org/log/@dots{}-gdb-7.10 | 4299 | https://hydra.gnu.org/log/@dots{}-gdb-7.10 |
| 4298 | @end example | 4300 | @end example |
| 4299 | 4301 | ||
| 4300 | You can freely access a huge library of build logs! | 4302 | You can freely access a huge library of build logs! |
diff --git a/guix/store.scm b/guix/store.scm index 01248738dc7..ae526285453 100644 --- a/guix/store.scm +++ b/guix/store.scm | |||
| @@ -504,8 +504,12 @@ encoding conversion errors." | |||
| 504 | (status k)))))))) | 504 | (status k)))))))) |
| 505 | 505 | ||
| 506 | (define %default-substitute-urls | 506 | (define %default-substitute-urls |
| 507 | ;; Default list of substituters. | 507 | ;; Default list of substituters. This is *not* the list used by |
| 508 | '("http://hydra.gnu.org")) | 508 | ;; 'guix-daemon', and few clients use it ('guix build --log-file' uses it.) |
| 509 | (map (if (false-if-exception (resolve-interface '(gnutls))) | ||
| 510 | (cut string-append "https://" <>) | ||
| 511 | (cut string-append "http://" <>)) | ||
| 512 | '("hydra.gnu.org"))) | ||
| 509 | 513 | ||
| 510 | (define* (set-build-options server | 514 | (define* (set-build-options server |
| 511 | #:key keep-failed? keep-going? fallback? | 515 | #:key keep-failed? keep-going? fallback? |
diff --git a/nix/nix-daemon/guix-daemon.cc b/nix/nix-daemon/guix-daemon.cc index 20a0732fcb3..d5d33a587af 100644 --- a/nix/nix-daemon/guix-daemon.cc +++ b/nix/nix-daemon/guix-daemon.cc | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* GNU Guix --- Functional package management for GNU | 1 | /* GNU Guix --- Functional package management for GNU |
| 2 | Copyright (C) 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> | 2 | Copyright (C) 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org> |
| 3 | 3 | ||
| 4 | This file is part of GNU Guix. | 4 | This file is part of GNU Guix. |
| 5 | 5 | ||
| @@ -327,7 +327,7 @@ main (int argc, char *argv[]) | |||
| 327 | settings.set ("build-use-substitutes", "true"); | 327 | settings.set ("build-use-substitutes", "true"); |
| 328 | 328 | ||
| 329 | /* Use our substitute server by default. */ | 329 | /* Use our substitute server by default. */ |
| 330 | settings.set ("substitute-urls", "http://hydra.gnu.org"); | 330 | settings.set ("substitute-urls", GUIX_SUBSTITUTE_URLS); |
| 331 | 331 | ||
| 332 | #ifdef HAVE_DAEMON_OFFLOAD_HOOK | 332 | #ifdef HAVE_DAEMON_OFFLOAD_HOOK |
| 333 | /* Use our build hook for distributed builds by default. */ | 333 | /* Use our build hook for distributed builds by default. */ |
