Commit Graph

2984 Commits

Author SHA1 Message Date
Marius Bakke c01ef97594
Merge branch 'master' into core-updates 2017-10-10 22:33:28 +02:00
Efraim Flashner 8b4af8284a
guix: mirrors: Add kde archive mirror.
* guix/download.scm (%mirrors)[kde]: Add kde-attic mirror.
2017-10-10 17:01:32 +03:00
Eric Bavier 7f0bb6540a
syscalls: clone: Define syscall-id for aarch64.
* guix/build/syscalls.scm (clone): Define syscall-id for aarch64 machines.
2017-10-09 18:55:18 -05:00
Ludovic Courtès 735f6b63d0
lint: Remove extra newline.
* guix/scripts/lint.scm (check-for-updates): Remove trailing "~%".
2017-10-09 23:17:49 +02:00
Efraim Flashner adf0c531a8
guix: lint: Add checker for new upstream versions.
* guix/scripts/lint.scm (check-for-updates): New procedure.
(%checkers): Add it.
* guix/scripts/refresh.scm (importer-modules, %updaters): Move
from here ...
* guix/upstream.scm: ... to here.
2017-10-09 14:05:17 +03:00
Oleg Pykhalov cca6941fee
pull: Add GUIX_PULL_URL environment variable.
* guix/scripts/pull.scm (%repository-url): Add GUIX_PULL_URL environment
  variable.
* doc/guix.texi (Invoking guix pull): Mention GUIX_PULL_URL.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-10-07 23:01:52 +02:00
Ludovic Courtès aba219af0f
pull: Honor 'parallel-job-count'.
* guix/build/pull.scm (build-guix): Use 'n-par-for-each' and honor
'parallel-job-count'.
2017-10-07 17:08:33 +02:00
Ludovic Courtès 1f3ea89871
store: Add missing import.
* guix/store.scm: Use (ice-9 format).
2017-10-07 17:08:32 +02:00
Ludovic Courtès eca16a3d1d
guix package: '--upgrade' no longer reverses package order.
Reported by Oleg Pykhalov <go.wigust@gmail.com>
at <https://lists.gnu.org/archive/html/help-guix/2017-10/msg00000.html>.

* guix/scripts/package.scm (options->installable)[upgraded]: Use
'fold-right' instead of 'fold'.
2017-10-07 17:08:32 +02:00
Ludovic Courtès e5788ebbe1
publish: Cache uncompressed nars as well.
Fixes <https://bugs.gnu.org/28664>.
Reported by Maxim Cournoyer <maxim.cournoyer@gmail.com>.

* guix/scripts/publish.scm (bake-narinfo+nar): When COMPRESSION is
'none, write NAR instead of doing nothing.
(make-request-handler): Use 'render-nar/cached' for /nar URLs with no
compression.
* tests/publish.scm ("with cache", "with cache, uncompressed"): Adjust
expected result accordingly.
2017-10-05 23:05:06 +02:00
Ludovic Courtès 9d80d0e95c
guix system: Error out when passed a wrong file system UUID/label.
* guix/scripts/system.scm (check-file-system-availability): New
procedure.
(perform-action): Use it.
2017-10-05 12:09:17 +02:00
Julien Lepiller f403d7abdf
guix: ant-build-system: Add #:test-include and #:test-exclude arguments.
* guix/build-system/ant.scm: Add #:test-include and #:test-exclude
arguments.
* guix/build/ant-build-system.scm: Generate test list from arguments.
* doc/guix.texi (Build Systems): Document it.
2017-10-03 21:38:23 +02:00
Julien Lepiller 8df1faa047
guix: ant-build-system: Add main-class support.
* guix/build-system/ant.scm: New #:main-class argument
* guix/build/ant-build-system.scm: Generate a manifest file with
additional properties.
* doc/guix.texi (Build Systems): Document it.
2017-10-03 21:37:47 +02:00
Efraim Flashner 64df08f0cf
Merge remote-tracking branch 'origin/master' into core-updates 2017-10-01 22:16:22 +03:00
Ricardo Wurmus 07f80c27fd
guix: Revert accidentally committed changes.
This is a follow-up to commit fb1db38547.

* guix/scripts/build.scm (lazy-util): Remove procedure.
(options->things-to-build): Remove special case for files with ".json"
extension.
2017-09-28 16:34:12 +02:00
Ricardo Wurmus fb1db38547
import: Add JSON importer.
* doc/guix.texi (Invoking guix import): Document it.
* guix/scripts/import/json.scm: New file.
* Makefile.am (MODULES): Add it.
* guix/scripts/import.scm (importers): Add json importer.
2017-09-28 13:10:11 +02:00
Ricardo Wurmus 5e892bc365
import: Add generic data to package converter.
* guix/import/utils.scm (build-system-modules, lookup-build-system-by-name,
specs->package-lists, source-spec->object, alist->package): New procedures.
* tests/import-utils.scm: Add tests for alist->package.
2017-09-28 13:10:11 +02:00
Ricardo Wurmus 68a91a183b
import: Add package->code.
* guix/import/print.scm: New file.
* tests/print.scm: New file.
* Makefile.am (SCM_TESTS): Add new test file.
(MODULES): Add print.scm.
2017-09-28 13:10:10 +02:00
Mohammed Sadiq ea1cd554cc
build-system: meson: Fix typo in variable name.
* guix/build-system/meson.scm (lower): fix typo in glib-or-gtk?.
2017-09-26 19:58:26 +02:00
Ludovic Courtès 06acf6b52f
http-client: Reset cache TTL upon 304 "Not Modified" responses.
* guix/http-client.scm (http-fetch/cached)[update-cache]: Add call to
'utime' in the 304 case.
2017-09-26 00:35:06 +02:00
Ludovic Courtès c1d8b3b3b5
upstream: Add new GNOME updater.
Partly fixes <https://bugs.gnu.org/28159>.
Reported by Hartmut Goebel <h.goebel@crazy-compilers.com>.

* guix/import/gnome.scm: New file.
* Makefile.am (MODULES): Add it.
* guix/gnu-maintenance.scm (latest-gnome-release)
(%gnome-updater): Remove.
2017-09-26 00:35:06 +02:00
Ludovic Courtès 97abc90733
upstream: Add 'url-prefix-predicate'.
* guix/gnu-maintenance.scm (url-prefix-predicate): Move to...
* guix/upstream.scm (url-prefix-predicate): ... here.
2017-09-26 00:35:06 +02:00
Arun Isaac 2374dee7bc
licenses: Add CC-Sampling+ 1.0.
* guix/licenses.scm (cc-sampling-plus-1.0): New variable.

Signed-off-by: Kei Kebreau <kkebreau@posteo.net>
2017-09-22 08:04:32 -04:00
宋文武 798648515b
download: Don't report the progress too fast.
* guix/utils.scm (<progress-reporter>): New record type.
(call-with-progress-reporter): New procedure.
* guix/build/download.scm (dump-port*, rate-limited, progress-reporter/file):
New procedures.
(ftp-fetch, http-fetch): Use 'dump-port*'.
(progress-proc): Remove procedure.
* guix/scripts/substitute.scm (progress-report-port): Rewrite in terms of
<progress-reporter>.
(process-substitution): Adjust accordingly.
2017-09-20 19:49:31 +08:00
Ludovic Courtès f1b65d0dd9
cve: Disable position recording while reading the CVE list.
* guix/cve.scm (fetch-vulnerabilities)[read*]: New procedure.
Use it in lieu of 'read'.
2017-09-19 23:58:25 +02:00
Ludovic Courtès 3ce1b9021a
http-client: 'http-client/cached' uses 'If-Modified-Since'.
* guix/http-client.scm (http-fetch/cached)[update-cache]: Add
'cache-port' parameter.  Check its mtime and compute 'if-modified-since'
header accordingly.  Guard 'http-get-error?' and honor 304.
Adjust callers of 'update-cache'.
* guix/gnu-maintenance.scm (ftp.gnu.org-files): Set #:ttl to 15m.
2017-09-19 12:19:15 +02:00
Ludovic Courtès 82781d871f
utils: 'current-source-directory' gracefully deals with lack of location info.
* guix/utils.scm (current-source-directory): Adjust for when
'syntax-source' returns #f.
2017-09-19 12:19:15 +02:00
宋文武 4220514b8f
substitute: Close the download port after substitution finished.
* guix/scripts/substitute.scm (progress-substitution): Call 'close-port'
after 'restore-file'.
2017-09-18 19:05:29 +08:00
Peter Mikkelsen 07c101e221
build-system: Add 'meson-build-system'.
* Makefile.am (MODULES): Add 'guix/build-system/meson.scm' and
'guix/build/meson-build-system.scm'.
* guix/build-system/meson.scm: New file.
* guix/build/meson-build-system.scm: New file.
* doc/guix.texi (Build Systems): Add 'meson-build-system'.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-09-16 18:07:00 +02:00
Ludovic Courtès 0649321d91
guix system: Add 'search' command.
* guix/scripts/system.scm (resolve-subcommand): New procedure.
(process-command): Handle 'search'.
(guix-system): Likewise.
(show-help): Augment.
* guix/scripts/system/search.scm: New file.
* po/guix/POTFILES.in: Add it.
* Makefile.am (MODULES): Add it.
* guix/ui.scm (%text-width): Export.
* doc/guix.texi (Invoking guix system): Document it.
(Service Types and Services): Mention 'guix system search'.
* tests/guix-system.sh: Test it.
2017-09-16 17:47:46 +02:00
Ludovic Courtès c7ae219e39
ui: Generalize relevance computation.
* guix/ui.scm (relevance, package-relevance): New procedures.
(%package-metrics): New variable.
* guix/scripts/package.scm (find-packages-by-description)[score]
[package-score]: Remove.  Use 'package-relevance' instead.
2017-09-16 17:47:45 +02:00
Ludovic Courtès c105653329
guix download: Honor mirrors when using '-o'.
Previously "guix download -o x mirror://gnu/…" would fail.

* guix/scripts/download.scm (download-to-file): Pass #:mirrors to
'url-fetch'.
2017-09-14 23:34:35 +02:00
Christopher Baines 01ef804d69
import: cpan: Replace '(package-license perl) with 'perl-license.
The perl-license definition is intended to avoid circular dependencies, so
use this as a default when importing packages from CPAN.

* guix/import/cpan.scm (string->license): Replace '(package-license perl) with
  'perl-license.
2017-09-12 23:15:36 +01:00
Ludovic Courtès 45bba47510
store: 'run-with-store' has a #:target parameter.
* guix/store.scm (run-with-store): Add #:target and honor it.
2017-09-12 23:56:33 +02:00
Ludovic Courtès fc2de6ce13
guix system: Pretty-print device UUIDs.
* guix/scripts/system.scm (display-system-generation): Check if
ROOT-DEVICE is a UUID and pretty-print it if it is.
2017-09-12 08:58:28 +02:00
Ludovic Courtès 4918e7fc22
download: Adjust main ftp.gnu.org mirror.
* guix/download.scm (%mirrors): Add missing "/gnu" in first mirror,
although that mirror would work even without it.  Use https instead of
http.
2017-09-11 11:51:50 +02:00
Ludovic Courtès 1b3ebae4f1
gnu-maintenance: Return all the latest tarballs, not just one.
* guix/gnu-maintenance.scm (latest-gnu-release): Return a list of
matching tarballs instead of just the first one.  This gives us .tar.gz,
.tar.xz, etc.
2017-09-11 11:51:39 +02:00
Ludovic Courtès e9f3811390
gnu-maintenance: Correctly compare versions.
* guix/gnu-maintenance.scm (latest-gnu-release): Add calls to
'sans-extension'.  This fixes version comparison, which could be fooled
with the ".tar.gz" extension.
2017-09-11 11:40:32 +02:00
Ludovic Courtès a9468b422b
substitute: Download from unauthorized sources that provide the right content.
This allows substitutes to be downloaded from unauthorized servers, as
long as they advertise the same hash and references as one of the
authorized servers.

* guix/scripts/substitute.scm (assert-valid-narinfo): Remove.
(valid-narinfo?): Add #:verbose?.  Handle each case of
'signature-case'.
(equivalent-narinfo?): New procedure.
(lookup-narinfos/diverse): Add 'authorized?' parameter and honor it.
[select-hit]: New procedure.
(lookup-narinfo): Add 'authorized?' parameter and pass it.
(process-query): Adjust callers accordingly.
(process-substitution): Remove call to 'assert-valid-narinfo'.  Check
whether 'lookup-narinfo' returns true and call 'leave' if not.
* tests/substitute.scm (%main-substitute-directory)
(%alternate-substitute-directory): New variables.
(call-with-narinfo): Make 'narinfo-directory' a parameter.  Call
'mkdir-p' to create it.  Change unwind handler to check whether
CACHE-DIRECTORY exists before deleting it.
(with-narinfo*): New macro.
("substitute, no signature")
("substitute, invalid hash")
("substitute, unauthorized key"): Change expected error message to "no
valid substitute".
("substitute, unauthorized narinfo comes first")
("substitute, unsigned narinfo comes first")
("substitute, first narinfo is unsigned and has wrong hash")
("substitute, first narinfo is unsigned and has wrong refs")
("substitute, unsigned narinfo comes first")
("substitute, two invalid narinfos"): New tests.
* doc/guix.texi (Substitutes): Explain the new behavior.
2017-09-11 11:10:21 +02:00
Ludovic Courtès 218f6eccaf
substitute: Make substitute URLs a SRFI-39 parameter.
* guix/scripts/substitute.scm (%cache-urls): Rename to...
(%default-substitute-urls): ... this.
(substitute-urls): New variable.
(guix-substitute): Use it instead of %CACHE-URLS.
* tests/substitute.scm: Likewise.
2017-09-11 11:10:21 +02:00
Ludovic Courtès fb25508856
size: Default to '--sort=self'.
* guix/scripts/size.scm (%default-options): Change default value for
'profile<?.
* doc/guix.texi (Invoking guix size): Adjust accordingly.
2017-09-07 13:57:42 +02:00
Tobias Geerinckx-Rice 57d2898772
Handle the same HTTP redirects everywhere.
* guix/build/download.scm (http-fetch): Complete the hard-coded list of HTTP
redirection status codes.
* guix/http-client.scm (http-fetch): Likewise.
* guix/scripts/lint.scm (probe-uri): Likewise.
2017-09-05 20:57:13 +02:00
Mathieu Othacehe 325ff6fe15
guix: Fix Guile current-processor-count deprecation warnings.
When current-processor-count is used without (ice-9 threads) being used, Guile
complains with the following warning:

Import (ice-9 threads) to have access to `current-processor-count'.

* guix/build/utils.scm: Use (ice-9 threads).
2017-09-05 19:41:31 +02:00
Mathieu Othacehe b100a70495
guix: Fix Guile current-processor-count deprecation warnings.
When current-processor-count is used without (ice-9 threads) being used, Guile
complains with the following warning:

Import (ice-9 threads) to have access to `current-processor-count'.

* guix/store.scm: Use (ice-9 threads).
2017-09-05 19:40:48 +02:00
Ludovic Courtès 100b216d8a
gnu-maintenance: GNU updater no longer relies on FTP access.
Partly fixes <https://bugs.gnu.org/28159>.
Suggested by Hartmut Goebel <h.goebel@crazy-compilers.com>.

* guix/gnu-maintenance.scm (%gnu-file-list-uri): New variable.
(ftp.gnu.org-files, latest-gnu-release): New procedures.
(%gnu-updater)[pred]: Change to GNU-HOSTED?.
[latest]: Change to LATEST-GNU-RELEASE.
(%gnu-ftp-updater): New variable.
2017-09-03 23:36:17 +02:00
Ludovic Courtès e3c83a7cd3
memoization: (mlambda () ...) allows for inner 'define'.
Previously (mlambda () (define foo 2) bar) would trigger a syntax error.

* guix/memoization.scm (%mlambda): In the zero-argument case, move
BODY... to a lambda to allow for inner 'define' and such.
2017-09-03 23:36:17 +02:00
Christopher Baines 4363767394
build: Fix helpful output for emacs-build-system install phase.
Detecting when no files were installed was broken when switching to use
cond. Test with (not (null? ...)) to fix this.

* guix/build/emacs-build-system.scm (install): Fix detecting when no files
  were installed.
2017-09-03 19:39:11 +01:00
Christopher Baines 81fe131e0f
build: emacs-build-system: Make the install phase more helpful.
Modify the install phase to detect when nothing has been installed, and error
if this happens. This is preferable to continuing, and allowing the next phase
to fail.

Also, when nothing can be found to be installed, print out each file that was
considered, along with the regular expressions that were used to include and
exclude it.

* gnu/build/emacs-build-system.scm (install-file?): Add additional error
  checking and logging.
2017-09-01 22:00:44 +01:00
Maxim Cournoyer fe55199542
scripts: Remove 'max-silent-time' from the default options.
Fixes <http://bugs.gnu.org/27157>.

Having a finite default `max-silent-time' value for scripts such as 'guix
environment' could lead to timeouts when building subtitutes; this was
undesirable.

This change also fixes client behavior to match the documentation, which
is that by default the daemon's settings are honored.

* guix/scripts/archive.scm (%default-options): Remove max-silent-time entry.
* guix/scripts/copy.scm (%default-options): Likewise.
* guix/scripts/environment.scm (%default-options): Likewise.
* guix/scripts/pack.scm (%default-options): Likewise.
* guix/scripts/package.scm (%default-options): Likewise.
* guix/scripts/pull.scm (%default-options): Likewise.
* guix/scripts/system.scm (%default-options): Likewise.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-09-01 10:29:39 +02:00
Ludovic Courtès 2e86c26478
download: Assume the "download" built-in builder is available.
This is a followup to 05ceb8dcaf.

* guix/download.scm (in-band-download): Remove.
(url-fetch): Call 'error' when BUILTINS lacks "download"; remove call to
'in-band-download'.
2017-08-28 23:15:35 +02:00