Commit Graph

3264 Commits

Author SHA1 Message Date
Ludovic Courtès 85f4f7b790
zlib: Fix race condition when closing gzip ports.
Fixes <https://bugs.gnu.org/29335>.

* guix/zlib.scm (close-procedure): Remove.
(make-gzip-input-port): Do (dup (fileno port)) to get a file descriptor
for 'gzdopen'.  Close PORT before returning.  Use 'gzclose' as the
'close' procedure of the returned port.
(make-gzip-output-port): Likewise.
2017-11-19 23:09:01 +01:00
Ludovic Courtès 52d174d6d1
ssh: Use (guix i18n).
* guix/ssh.scm: Use (guix i18n) instead of (guix ui).
2017-11-19 23:09:01 +01:00
Marius Bakke 2dd12924cf
Merge branch 'master' into core-updates 2017-11-19 15:01:00 +01:00
Julien Lepiller 965ba54be0
licenses: Add cddl1.1.
* guix/licenses.scm (cddl1.1): New variable.
2017-11-18 11:29:36 +01:00
Ricardo Wurmus 82af2c2f0f
build-system: texlive: Only make a union of directories.
* guix/build/texlive-build-system.scm (configure): Filter the input
directories to ensure that source tarballs are excluded.
2017-11-18 11:18:42 +01:00
Leo Famulari d8e257113c
build-system/go: Don't let Go executables refer to the Go compiler.
* guix/build/go-build-system.scm (remove-store-reference, remove-go-references):
New procedures.
(%standard-phases): Add 'remove-go-references' phase.
* guix/build-system/go.scm (go-build): Add allow-go-reference? key.
2017-11-17 18:25:20 -05:00
Ludovic Courtès d5ce7bcfa2
workers: Display backtrace in pre-unwind handler.
* guix/workers.scm (worker-thunk): Add (const #f) as the 'catch'
handler, and move previous handler as pre-unwind handler.  Protect
against 'make-stack' returning #f.
2017-11-17 10:47:56 +01:00
Ludovic Courtès 232b3d3101
workers: 'pool-idle?' returns true only if the workers are idle.
Fixes <https://bugs.gnu.org/28779>.
Reported by Eric Bavier <bavier@cray.com>.

* guix/workers.scm (<pool>)[busy]: New field.
(worker-thunk): Add #:idle and #:busy and use them.
(make-pool): Pass #:busy and #:idle to 'worker-thunk'.  Pass a 'busy'
value to '%make-pool'.
* guix/workers.scm (pool-idle?): Check whether 'pool-busy' returns zero
and adjust docstring.
2017-11-17 10:10:30 +01:00
Ludovic Courtès 304a53f67a
ui: Add source file name to the package search metrics.
* guix/ui.scm (%package-metrics): Include 'package-location'.  Increase
score of the other fields.
2017-11-16 08:45:15 +01:00
Ludovic Courtès 7482b98120
cve: Use 'http-fetch/cached' instead of having custom caching.
That way CVE fetching benefits from 'If-Modified-Since' handling.

* guix/http-client.scm (http-fetch/cached): Add #:write-cache and
 #:cache-miss parameters and honor them.
* guix/cve.scm (%current-year-ttl, %past-year-ttl): Reduce.
(call-with-cve-port): Remove.
(write-cache): New procedure.
(fetch-vulnerabilities): Rewrite in terms of 'http-fetch/cached'.
2017-11-16 08:45:15 +01:00
Ludovic Courtès 866f37fb7e
download: Improve efficiency of 'write-request' over TLS.
This is another instance of <https://bugs.gnu.org/22966>.
The Microsoft-IIS/7.5 server at static.nvd.nist.gov would sometimes hang
when receiving our requests byte by byte.

* guix/build/download.scm (tls-wrap) [!guile-2.0]: Add 'setvbuf' call.
2017-11-16 08:45:14 +01:00
Ludovic Courtès 9f8605958e
download: Pass the timeout to 'ftp-retr'.
This ensures the timeout applies when connecting to the port returned by
PASV.

* guix/ftp-client.scm (ftp-list): Add #:timeout parameter.  Use
'connect*' instead of 'connect' and pass TIMEOUT.
(ftp-retr): Likewise.
* guix/build/download.scm (ftp-fetch): Pass TIMEOUT to 'ftp-retr'.
2017-11-14 23:46:53 +01:00
Leo Famulari 412716eff2
grafts: Clarify the status of the workaround for <http://bugs.gnu.org/24659>.
* guix/build/graft.scm (mkdir-p*): Annotate.
2017-11-14 16:38:02 -05:00
Leo Famulari d0b87779f0
download: Use HTTPS for the first ImageMagick mirror.
* guix/download.scm (%mirrors)[imagemagick]: Use HTTPS for <sunsite.icm.edu.pl>.
2017-11-12 17:50:01 -05:00
Leo Famulari ecc585711e
download: Try FTP servers last.
* guix/download.scm (%mirrors)[savannah, kernel.org, apache, xorg, imagemagick]:
Re-arrange so that FTP is last.
2017-11-12 17:50:01 -05:00
Ludovic Courtès b1488c7653
git: Check whether 'clone-init-options' is defined.
This is a followup to 195f0d05c3.

* guix/git.scm (clone*): Check whether 'clone-init-options' is defined
before using it.
2017-11-11 20:09:25 +01:00
Ludovic Courtès 65a19abf3f
download: Work around more bogus HTTP handling in Guile 2.2 <= 2.2.2.
Reported by Mark H Weaver <mhw@netris.org>
at <https://lists.gnu.org/archive/html/guix-devel/2017-11/msg00190.html>.

* guix/build/download.scm (guile-2.2) [write-request-line]: Backport
Guile commit 6ad28ae3bc6a6d9e95ab7d70510d12c97673a143.
2017-11-11 15:20:02 +01:00
Ludovic Courtès 59da6f04f4
download: Work around bogus HTTP handling in Guile 2.2 <= 2.2.2.
Reported by Konrad Hinsen <konrad.hinsen@fastmail.net>
at <https://lists.gnu.org/archive/html/guix-devel/2017-11/msg00070.html>.

* guix/build/download.scm (write-request-line) [guile-2.2]: New
procedure.
2017-11-10 23:11:52 +01:00
Ludovic Courtès 195f0d05c3
git: Work around wrong default argument of 'clone'.
Fixes <https://bugs.gnu.org/29238>.
Reported by Benjamin Andresen <benny@in-ulm.de>.

* guix/git.scm (clone*): Pass second argument to 'clone'.
2017-11-10 13:07:54 +01:00
Ludovic Courtès dc856223f5
ui: Add an 'unbound-variable' exception printer.
* guix/ui.scm (print-unbound-variable-error): New variable.
Use it as the 'unbound-variable' printer.
2017-11-09 23:54:47 +01:00
Ludovic Courtès a2985bb101
ui: Provide hints for unbound-variable errors.
* guix/ui.scm (known-variable-definition): New procedure.
(report-load-error): Handle 'unbound-variable'.
2017-11-09 23:54:47 +01:00
Ludovic Courtès 935542fbde
ui: Add 'display-hint'.
* guix/ui.scm (known-variable-definition): New procedure.
(report-load-error): Use it.
2017-11-09 23:54:47 +01:00
Ludovic Courtès a864d56302
build-system/gnu: Add 'install-license-files' phase.
Suggested by Dave Love <fx@gnu.org>.

* guix/build-system/gnu.scm (%license-file-regexp): New variable.
(gnu-build): Add #:license-file-regexp and use it.
(gnu-cross-build): Likewise.
* guix/build/gnu-build-system.scm (%license-file-regexp): New variable.
(install-license-files): New procedure.
(%standard-phases): Add it.
2017-11-08 22:43:56 +01:00
Ludovic Courtès 23735137eb
ui: Define and honor '&error-location' and '&fix-hint' conditions.
* guix/utils.scm (&error-location, &fix-hint): New condition types.
* guix/ui.scm (report-load-error): Handle them.
(call-with-error-handling): Honor '&error-location'.
2017-11-08 22:31:58 +01:00
Ludovic Courtès 37eed374d9
ui: Introduce (guix i18n).
* guix/ui.scm (G_, N_, _P, %gettext-domain, %package-text-domain): Move
to...
* guix/i18n.scm: ... here.  New file.
2017-11-08 22:31:58 +01:00
Ricardo Wurmus 25e51b1c45
guix: Add archive support for bioconductor-uri.
* guix/build-system/r.scm (bioconductor-uri): Also return the archive URL.
* guix/import/cran.scm (latest-bioconductor-release, fetch-description):
Adjust because bioconductor-uri now returns a list.
2017-11-07 08:14:09 +01:00
Ricardo Wurmus 27baf50956
import: cran: Use Bioconductor 3.6 helpers.
* guix/import/cran.scm (bioconductor-mirror-url): Remove procedure.
(fetch-description): Extract DESCRIPTION file from tarball for Bioconductor
packages.
(latest-bioconductor-release): Use latest-bioconductor-package-version.
2017-11-07 08:13:35 +01:00
Ricardo Wurmus 84dfdc5759
import: cran: Add support for Bioconductor 3.6.
* guix/import/cran.scm (%bioconductor-version,
%bioconductor-packages-list-url): New variables.
(bioconductor-packages-list, latest-bioconductor-package-version): New
procedures.
2017-11-07 08:13:34 +01:00
Ricardo Wurmus 6b46b04f91
import: utils: Add string helpers.
* guix/import/utils.scm (read-lines, chunk-lines): New procedures.
2017-11-07 08:07:51 +01:00
Ludovic Courtès 8e57e416c0
refresh: Account for hidden packages.
Suggested by Marius Bakke <mbakke@fastmail.com>
in <https://bugs.gnu.org/29177>.

* guix/scripts/refresh.scm (all-packages): Pass #:select? to
'fold-packages'.
2017-11-07 00:12:10 +01:00
Ludovic Courtès c9405c461b
compile: Fix VPATH builds.
Fixes <https://bugs.gnu.org/29091>.
Reported by Eric Bavier <bavier@cray.com>.

* guix/build/compile.scm (relative-file): New procedure.
(load-files): Use it before calling 'file-name->module-name'.
(compile-files): Likewise before calling 'scm->go'.
* guix/build/pull.scm (build-guix): Remove 'with-directory-excursion'
and file name hack from ce33c3af76.
Pass OUT to 'all-scheme-files'.
2017-11-07 00:12:10 +01:00
Ludovic Courtès 0ad5f80982
Fix ambiguous imports.
* gnu/packages/ocaml.scm: Hide 'zip' from (srfi srfi-1).
* guix/git.scm: Select 'mkdir-p' from (guix build utils).
2017-11-07 00:12:10 +01:00
nee 6692d8454a
guix: records: Add match-record.
* guix/records.scm: New syntax-rule.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-11-05 15:21:53 +01:00
Efraim Flashner 19b7bba1b5
Merge remote-tracking branch 'origin/master' into core-updates 2017-11-01 10:29:59 +02:00
Tobias Geerinckx-Rice 63ae4800de
download: Refresh the cpan.org mirror list.
* guix/download.scm (%mirrors)[cpan]: Update the list of CPAN mirrors (of
which several are dead) with a more-or-less geographically diverse selection.
2017-11-01 01:02:03 +01:00
Tobias Geerinckx-Rice b5c7574b2f
Revert "import: cpan: Use HTTPS for home pages."
This reverts commit 29f7bf59d5d4d4b848eaedc6766bb4e02cae20d3: HTTPS support
at search.cpan.org is unreliable, at best.  Don't rely on it.
2017-10-30 17:20:42 +01:00
Tobias Geerinckx-Rice 29f7bf59d5
import: cpan: Use HTTPS for home pages.
* guix/import/cpan.scm (cpan-home): Use HTTPS.
* tests/cpan.scm ("cpan->guix-package"): Expect it.
2017-10-29 17:32:35 +01:00
Tobias Geerinckx-Rice 6d176ad379
import: cpan: Actually use CPAN-HOME.
* guix/import/cpan.scm (cpan-module->sexp): Use the CPAN-HOME procedure.
2017-10-29 17:32:35 +01:00
Tobias Geerinckx-Rice 73f33b9379
import: cpan: Add trailing "/" to CPAN-HOME.
Prevent regression after commit e4bc172730.

* guix/import/cpan.scm (cpan-home): Add trailing "/".
2017-10-29 17:32:12 +01:00
Eric Bavier e4bc172730
import: cpan: Add trailing "/" on home-page.
This appeases 'guix lint', which otherwise complains about permanent
redirects.

* guix/import/cpan.scm (cpan-module->sexp): Add trailing "/" on home-page.
* tests/cpan.scm ("cpan->guix-package"): Adjust accordingly.
2017-10-28 18:20:59 -05:00
Eric Bavier 23055424f2
import: cpan: Propagate imported dependencies.
This is most often the need for perl module dependencies.

* guix/import/cpan.scm (cpan-module->sexp): 'inputs -> 'propagated-inputs.
* tests/cpan.scm ("cpan->guix-package"): Adjust accordingly.
2017-10-28 18:20:58 -05:00
Ludovic Courtès 34b1f339cd
graph: Remove mention of Graphviz from the summary line.
* guix/scripts/graph.scm (show-help): Remove mention of Graphviz from
the summary line.
2017-10-28 09:45:54 +02:00
Ludovic Courtès 0a2ce1ea0a
import: elpa: Do not abort when failing to download the archive.
* guix/import/elpa.scm (elpa-fetch-archive): Use 'http-fetch/cached'
directly instead of 'call-with-downloaded-file'.  This ensures we don't
just abort when networking access is lacking, which is required to allow
'guix refresh -c refresh' to proceed.
2017-10-28 09:45:54 +02:00
Ludovic Courtès 90297811a9
import: github: Gracefully handle multiple-URL origins.
* guix/import/github.scm (latest-release)[origin-github-uri]: New
procedure.  Use it.
2017-10-28 09:45:54 +02:00
Ludovic Courtès 6d6d193221
lint: 'refresh' gracefully handles lack of networking access.
* guix/scripts/lint.scm (check-for-updates): Wrap
'package-latest-release*' call in 'with-networking-fail-safe'.
2017-10-28 09:45:54 +02:00
Ludovic Courtès 4b879e0acf
lint: Extract network-related exception handling.
* guix/scripts/lint.scm (call-with-networking-fail-safe): New procedure.
(with-networking-fail-safe): New macro.
(current-vulnerabilities*): Rewrite in terms of 'with-networking-fail-safe'.
2017-10-28 09:45:54 +02:00
Ludovic Courtès a1ff7e1d8d
scripts: Factorize option parsing sans 'GUIX_BUILD_OPTIONS'.
* guix/scripts.scm (parse-command-line): Add #:build-options? parameter
and honor it.
* guix/scripts/challenge.scm (guix-challenge): Use 'parse-command-line'
with #:build-options? #f instead of 'args-fold*'.
* guix/scripts/gc.scm (guix-gc): Likewise.
* guix/scripts/graph.scm (guix-graph): Likewise.
* guix/scripts/hash.scm (guix-hash): Likewise.
* guix/scripts/lint.scm (guix-lint): Likewise.
* guix/scripts/refresh.scm (guix-refresh): Likewise.
* guix/scripts/size.scm (guix-size): Likewise.
* guix/scripts/weather.scm (guix-weather): Likewise.
2017-10-28 09:45:53 +02:00
Ludovic Courtès efff3dd4c9
scripts: Use 'args-fold*' for command that do not honor build flags.
Fixes <https://bugs.gnu.org/28984>.
Reported by Eric Bavier.

* guix/scripts/challenge.scm (guix-challenge): Use 'args-fold*' instead
of 'parse-command-line'.
* guix/scripts/size.scm (guix-size): Likewise.
* guix/scripts/weather.scm (guix-weather): Likewise.
2017-10-27 13:11:26 -07:00
Leo Famulari 552ee77250
build-system/go: Fix installation path of executable files.
* guix/build/go-build-system.scm (setup-environment): Set GOBIN correctly.
2017-10-26 12:14:33 -04:00
Ludovic Courtès bf7dfb1f07
challenge: Display an overall summary.
* guix/scripts/challenge.scm (summarize-report-list): New procedure.
(guix-challenge): Use it.
* doc/guix.texi (Invoking guix challenge): Adjust command output in
example.
2017-10-25 22:25:19 -07:00
Ludovic Courtès d213cc8c7f
substitute: Don't send more than 1000 requests in a row.
Fixes <https://bugs.gnu.org/28731>.
Reported by Jan Nieuwenhuizen <janneke@gnu.org>.

* guix/scripts/substitute.scm (at-most): New procedure.
(http-multiple-get): Use it to send at most 1000 requests at once.
2017-10-25 22:25:19 -07:00
Ludovic Courtès 44c6a87f53
guix package: '--list-available' does not show superseded packages.
* guix/scripts/package.scm (process-query) <'list-available>: Filter out
P if it matches 'package-superseded'.
2017-10-25 22:25:19 -07:00
Marius Bakke ca4fd41de8
Merge branch 'master' into core-updates 2017-10-24 22:00:23 +02:00
Leo Famulari c10851cf91
build-system/go: Parameterize installing the source code.
* guix/build-system/go.scm (go-build): Add install-source? key.
* guix/build/go-build-system.scm (install-source): Check if
install-source? is true.
2017-10-24 13:10:34 -04:00
Leo Famulari 1c37f839fb
build-system/go: Strip the Go binaries with the native tool.
* guix/build/go-build-system.scm (build): Tell the Go linker to strip some
symbol tables and debugging information.
2017-10-24 13:10:34 -04:00
Ludovic Courtès 2900665888
pull: Hide compilation warnings.
* guix/build/pull.scm (build-guix): Bind 'current-warning-port' to a
void port.
2017-10-23 17:08:51 -07:00
Ludovic Courtès ce33c3af76
pull: Add (guix build compile) to the mix.
Fixes <https://bugs.gnu.org/28956>.
Reported by Leo Famulari <leo@famulari.name>.

* build-aux/build-self.scm (build): Add (guix build compile) to
 #:modules.
* guix/build/pull.scm (build-guix): Wrap 'compile-files' call in
'with-directory-excursion'.  Strip "./" from FILES when passing it to
'compile-files'.
2017-10-23 17:08:50 -07:00
Ludovic Courtès d298c815e6
gexp: Add 'directory-union'.
* gnu/services.scm (directory-union): Move to...
* guix/gexp.scm (directory-union): ... here.  New procedure.
* doc/guix.texi (G-Expressions): Document it.
2017-10-22 22:09:00 -07:00
Ludovic Courtès dedb512f8f
gexp: Add 'file-union'.
* gnu/services.scm (file-union): Move to...
* guix/gexp.scm (file-union): ... here.  New procedure.
* doc/guix.texi (G-Expressions): Document it.
2017-10-22 22:09:00 -07:00
Ludovic Courtès 7a51c78c6e
discovery: Move 'file-name->module-name' to (guix modules).
* guix/discovery.scm (file-name->module-name): Move to...
* guix/modules.scm (file-name->module-name): ... here.
* guix/build/compile.scm: Use (guix modules) instead of (guix discovery).
2017-10-22 22:09:00 -07:00
Ludovic Courtès 2890ad332f
build: Factorize module compilation in (guix build compile).
* guix/build/compile.scm: New file.
* Makefile.am (MODULES): Add it.
* build-aux/compile-all.scm: Use it.
(warnings, file->module, load-module-file)
(%default-optimizations, %lightweight-optimizations)
(optimization-options, compile-file*): Remove.
<top level>: Use 'compile-files'.
* guix/build/pull.scm (%default-optimizations)
(%lightweight-optimizations, optimization-options): Remove.
(build-guix): Rewrite as a call to 'compile-files'.
* guix/discovery.scm (file-name->module-name): Export.
2017-10-22 22:09:00 -07:00
Marius Bakke 119a749db9
Merge branch 'master' into core-updates 2017-10-22 20:12:52 +02:00
Tobias Geerinckx-Rice 5713bbf157
Use HTTPS for bioconductor.org.
* doc/guix.texi (Invoking guix import, Invoking guix refresh): Use HTTPS for
bioconductor.org URLs.
* gnu/packages/bioinformatics.scm (r-annotate, r-geneplotter, r-genefilter)
(r-deseq2, r-dexseq, r-annotationforge, r-rbgl, r-gseabase, r-category)
(r-gostats, r-shortread, r-biocgenerics, r-biocinstaller, r-biocviews)
(r-biocstyle, r-bioccheck, r-s4vectors, r-iranges, r-genomeinfodbdata)
(r-genomeinfodb, r-xvector, r-genomicranges, r-biobase, r-annotationdbi)
(r-biomart, r-biocparallel, r-biostrings, r-rsamtools, r-delayedarray)
(r-summarizedexperiment, r-genomicalignments, r-rtracklayer)
(r-genomicfeatures, r-graph, r-topgo, r-bsgenome, r-impute, r-seqpattern)
(r-seqlogo, r-motifrg, r-bamsignals, r-mutationalpatterns, r-tximport)
(r-rhdf5, r-chipseq, r-sva, r-affy, r-vsn, r-mzid, r-msnid)
(r-interactivedisplaybase, r-annotationhub)[home-page]: Likewise.
* gnu/packages/bioinformatics.scm (r-txdb-hsapiens-ucsc-hg19-knowngene)
(r-go-db, r-bsgenome-hsapiens-1000genomes-hs37d5, r-org-hs-eg-db)
(r-org-ce-eg-db, r-org-dm-eg-db, r-org-mm-eg-db)
(r-bsgenome-hsapiens-ucsc-hg19, r-bsgenome-mmusculus-ucsc-mm9)
(r-bsgenome-mmusculus-ucsc-mm10, r-txdb-mmusculus-ucsc-mm10-knowngene)
(r-bsgenome-celegans-ucsc-ce6, r-bsgenome-celegans-ucsc-ce10)
(r-bsgenome-dmelanogaster-ucsc-dm3, r-copyhelper)[source, home-page]:
Likewise.
* gnu/packages/statistics.scm (r-rcurl)[source]: Likewise.
* guix/build-system/r.scm (bioconductor-uri): Likewise.
* guix/import/cran.scm (%cran-url, bioconductor-package?)
(bioconductor-data-package?, bioconductor-experiment-package?): Likewise.
2017-10-21 17:43:40 +02:00
Ludovic Courtès 37ce440dcf
download: Download a nar when a VCS checkout fails.
Fixes <https://bugs.gnu.org/28709>.

* guix/build/download-nar.scm: New file.
* Makefile.am (MODULES): Add it.
* guix/cvs-download.scm (cvs-fetch)[zlib, config.scm, modules]: New
variables.
[build]: Use MODULES.  Add call to 'download-nar'.
* guix/git-download.scm (git-fetch): Likewise.
* guix/hg-download.scm (hg-fetch): Likewise.
2017-10-19 23:21:49 +02:00
Ludovic Courtès 8c3488259e
Add (guix progress).
Among other things, this removes (guix utils), (guix ui), (guix config),
etc. from the closure of (guix build download), as was the case since
798648515b.

* guix/utils.scm (<progress-reporter>, call-with-progress-reporter):
Move to...
* guix/progress.scm: ... here.  New file.
* Makefile.am (MODULES): Add it.
* guix/build/download.scm (current-terminal-columns)
(nearest-exact-integer, duration->seconds, seconds->string)
(byte-count->string, progress-bar, string-pad-middle)
(rate-limited, progress-reporter/file, dump-port*)
(time-monotonic): Move to progress.scm.
* guix/scripts/download.scm: Adjust accordingly.
* guix/scripts/substitute.scm: Likewise.
2017-10-19 23:21:49 +02:00
Ludovic Courtès 347fa4aebf
download: Make 'http-fetch' public.
* guix/build/download.scm (http-fetch): Remove 'file' parameter.  Change
to return an input port and the content-length.  Make public.
(url-fetch): Adjust accordingly.
2017-10-19 23:21:49 +02:00
Ludovic Courtès b3ac341d4e
download: Remove old-Guile leftovers.
This is a followup to 36626c556e.

* guix/build/download.scm (http-fetch): Rename 'port-or-bv' to 'port'.
Assume (port? port) is always true, and remove other branch.
2017-10-19 23:21:49 +02:00
宋文武 5efa0e4d4f
guix: substitute: Report the last progress in the child process.
Fixes <https://bugs.gnu.org/28756>.

* guix/utils.scm (filtered-port): Close the 'input' port for the current
process, and close it upon exit in the child process.
* guix/scripts/substitute.scm (progress-substitution): Display "\n\n" after
the reporter has finished.
2017-10-17 19:00:35 +08:00
Thomas Danckaert 8cff2e7aed
Merge 'master' into core-updates 2017-10-16 19:52:30 +02:00
Christopher Baines 4cb036d604
emacs-build-system: Change how patch-el-files substitutes commands.
Previously the regex would match from /bin/ to a closing quote. However, this
is greedy, so will match up until the last ". This causes problems when there
are several quotes on the same line, for example:

org-effectiveness.el:
196:      (call-process "/bin/bash" nil t nil "-c" strplot)

Therefore, change . to \S so that it doesn't include whitespace
characters. Changing to a lazy quantifier would be an option, if that were
supported.

* guix/build/emacs-build-system.scm (patch-el-files): Change the regular
  expression used.
2017-10-15 19:02:44 +01:00
Christopher Baines dd2de28423
emacs-build-system: Handle missing programs when patching.
Previously the string-append here would error, which isn't useful as it
doesn't tell you which command couldn't be found. To make the error
actionable, catch it earlier, and explicitly error.

* guix/build/emacs-build-system.scm (patch-el-files): Handle (which cmd)
  returning #f.
2017-10-15 19:02:43 +01:00
Leo Famulari 91525b486c
build: Add the Go build system.
* guix/build-system/go.scm,
guix/build/go-build-system.scm: New files.
* Makefile.am (MODULES): Add new files.
* doc/guix.texi (Build Systems): Document the go-build-system.
2017-10-12 21:22:40 -04:00
Ludovic Courtès 61f28fe7e9
lint: 'home-page' checker reports permanent redirects.
* guix/scripts/lint.scm (probe-uri): Add special case for HTTP 301.
(validate-uri): Likewise.
* tests/lint.scm ("home-page: 301, invalid")
("home-page: 301 -> 200", "home-page: 301 -> 404")
("source: 301 -> 200", "source: 301 -> 404"): New tests.
2017-10-12 23:47:48 +02:00
Ludovic Courtès 6ea10db973
tests: Support multiple HTTP server instances.
* guix/tests/http.scm (%http-server-socket): Turn into...
(open-http-server-socket): ... this procedure.
(http-server-can-listen?): New procedure.
(http-write, %http-server-lock, %http-server-ready)
(http-open, stub-http-server): Move to 'call-with-http-server' body.
(call-with-http-server): Add #:headers parameter.
(with-http-server): Add an additional pattern with headers.
* tests/derivations.scm: Use (http-server-can-listen?) instead
of (force %http-server-socket).
* tests/lint.scm: Likewise.
2017-10-12 23:47:48 +02:00
Ludovic Courtès d8e89b1c79
offload: Reduce the number of calls to 'machine-load'.
Previously we would call 'machine-load' once per machine, which was very
costly when there were many machines.  Now we arrange to call it only
once on average (when all the machines have the same 'speed' value).

* guix/scripts/offload.scm (random-seed, shuffle): New procedures.
(choose-build-machine)[machines+slots+loads]: Rename to...
[machines+slots]: ... this.  Remove load from the tuples therein.
[undecorate]: Adjust accordingly.
[machine-less-loaded-or-faster?]: Remove.
[machine-faster?]: New procedure.
Sort MACHINES+SLOTS according to 'machine-faster?'.  Call
'machine-load?' as the last thing.
2017-10-12 17:51:41 +02:00
宋文武 abaee53c80
substitute: Close the progress port after substitute finished.
Fixes <https://bugs.gnu.org/28756>.

* guix/scripts/substitute.scm (progress-substitution):
Call '(close-port progress)'.
2017-10-12 22:31:22 +08:00
Ludovic Courtès 85a2b58987
zlib: Fix memory leak due to revealed ports not being GC'd.
Fixes <https://bugs.gnu.org/28784>.

This mostly reverts 81a0f1cdf1, which
introduced a regression: revealed ports are *never* GC'd (contrary to
what Guile's manual suggests).

In addition to the revert, 'close-procedure' now explicitly swallows
EBADF errors when 'close-port' is called.

* guix/zlib.scm (close-procedure): New procedure.
(make-gzip-input-port)[gzfile]: Use 'fileno' instead of 'port->fdes'.
Use 'close-procedure' instead of 'gzclose'.
(make-gzip-output-port): Likewise.
* tests/zlib.scm ("compression/decompression pipe"): Use 'port-closed?'
to determine whether PARENT has been closed.
2017-10-11 15:20:50 +02:00
Ludovic Courtès 90eaa9419a
import: cpan: Load (gnu packages perl) lazily.
* guix/import/cpan.scm: Remove dependency on (gnu packages perl).
(perl-package): New procedure.
(%corelist, core-module?): Use it instead of referring to 'perl'.
2017-10-10 23:12:04 +02:00
Ludovic Courtès b719ddbbbb
import: pypi: Remove unneeded import.
* guix/import/pypi.scm: Remove unneeded import.
2017-10-10 23:12:03 +02:00
Ludovic Courtès a6e22d8445
ui: Improve reporting of missing closing parentheses.
Suggested by Ricardo Wurmus.
Works around <https://bugs.gnu.org/28295>.

* guix/ui.scm (report-load-error): Add case for 'read-error'.
* tests/guix-system.sh: Test missing-closing-paren errors.
2017-10-10 23:12:03 +02:00
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
Marius Bakke 72e2815d18
Merge branch 'core-updates' 2017-08-26 15:15:49 +02:00
Mark H Weaver 05e172ca4e
download: Remove a SourceForge mirror that never returns 404.
* guix/download.scm (%mirrors)[sourceforge]: Remove
nbtelecom.dl.sourceforge.net, which never returns 404 responses.  This causes
download failures due to hash mismatch, effectively preventing secondary
source URLs from being queried.
2017-08-25 02:08:35 -04:00
Ludovic Courtès 94e86a6b67
graft: Correctly replace references near the end of the scan buffer.
Fixes <http://bugs.gnu.org/28212>.
Reported by Leo Famulari <leo@famulari.name>.

* guix/build/graft.scm (replace-store-references): When I >= END, check
whether WRITTEN > END and call 'get-bytevector-n!' when it is.
* tests/grafts.scm (buffer-size): New variable.
("replace-store-references, <http://bugs.gnu.org/28212>"): New test.
2017-08-24 23:55:51 +02:00
Ludovic Courtès 5e60bef980
Revert "graph: Provide access to the package record in the emit functions."
This reverts commit 5d7e854365, which
broke 'tests/graph.scm' and broke node types not related to <package>
objects, such as '%reference-node-type'.
2017-08-24 23:55:51 +02:00
Ludovic Courtès e4925e00ca
packages: Use Guile 2.0 for grafting.
Works around <https://bugs.gnu.org/28211>.
Reported by Marius Bakke <mbakke@fastmail.com>.

* guix/packages.scm (guile-2.0): New procedure.
(package-derivation, package-cross-derivation): Use it when computing
the #:guile argument to 'graft-derivation'.
2017-08-24 00:41:44 +02:00
Andy Wingo 045ebb3e58
gnu: bootloader: Deprecate "device" field in favor of "target".
* gnu/bootloader.scm (<bootloader-configuration>): Deprecate "device" field in
favor of "target" field.  This is mostly a renaming but also a generalization
to support UEFI targets being paths to a mounted partition instead of a device
name.
* gnu/system/examples/bare-bones.tmpl:
* gnu/system/examples/desktop.tmpl:
* gnu/system/examples/lightweight-desktop.tmpl:
* gnu/system/examples/vm-image.tmpl:
* gnu/system/install.scm:
* gnu/tests.scm:
* gnu/tests/install.scm:
* gnu/tests/nfs.scm:
* tests/system.scm: Adapt all invocations of bootloader-configuration.
* guix/scripts/system.scm (perform-action): Rename device argument to
bootloader-target.
(process-action): Adapt caller.
* doc/guix.texi (Proceeding with the Installation):
* doc/guix.texi (Bootloader Configuration): Update documentation.
2017-08-23 22:23:19 +02:00
Andy Wingo ba015ce9c0
gnu: scripts: Cleanup regarding "gnu system" bootloader devices.
* guix/scripts/system.scm (install-bootloader, install): Remove unused
"device" argument.
(reinstall-bootloader, perform-action): Adapt callers.
2017-08-23 22:23:06 +02:00
Marius Bakke 2718a9cd09
Merge branch 'master' into core-updates 2017-08-21 02:40:37 +02:00
宋文武 a02967d77a
guix download: Support retrieving local file without the URI scheme.
* guix/scripts/download.scm (guix-download): Treat the URL argument as a local
file path when it fails on 'string->uri'.  Call 'fetch' with the processed
'uri' instead of the original URL argument.
* tests/guix-download.sh: Adjust accordingly.
2017-08-20 20:55:45 +08:00
Ricardo Wurmus af735661f3
pack: Add "none" compressor.
* guix/scripts/pack.scm (%compressors): Add compressor "none"; prepend
extension with ".".
(self-contained-tarball, docker-image): Assume compressor extensions start
with period.
* doc/guix.texi (Invoking guix pack): Document it.
2017-08-19 17:59:42 +02:00
Mark H Weaver cc294bcee6
Merge branch 'master' into core-updates 2017-08-09 17:25:31 -04:00
Leo Famulari df851f5a91
download: Add the canonical GnuPG download site.
* guix/download.scm (%mirrors)<gnupg>: Add https://gnupg.org.
2017-08-09 16:01:36 -04:00
Ricardo Wurmus 32b7506c98
profiles: Only check file contents if the file exists.
* guix/profiles.scm (fonts-dir-file): Check that files exist before using
"empty-file?".
2017-08-09 14:46:48 +02:00
Mark H Weaver f167595ba1
Merge branch 'master' into core-updates 2017-08-06 00:23:20 -04:00
Ricardo Wurmus 88c8f247e5
build: Add minify build system.
* guix/build-system/minify.scm: New file.
* guix/build/minify-build-system: New file.
* Makefile.am (MODULES): Add new files.
* doc/guix.texi (Build Systems): Document minify-build-system.
2017-08-04 11:23:52 +02:00
Ludovic Courtès c53fc48144
pull: Honor '--no-grafts'.
* guix/scripts/pull.scm (guix-pull): Parameterize %GRAFT? as a function
of OPTS.
2017-08-02 00:04:00 +02:00
Ludovic Courtès 3085b50200
pull: Use the commit ID as the version string.
* guix/scripts/pull.scm (build-from-source): Add #:commit parameter.
Pass it to BUILD.
(build-and-install): Add #:commit and pass it to 'build-from-source'.
(guix-pull): Pass #:commit to 'build-and-install'.
2017-08-02 00:04:00 +02:00
Ludovic Courtès 59a1627518
pull: Fetch source code from Git.
* guix/scripts/pull.scm (%snapshot-url, with-environment-variable)
(with-PATH): Remove.
(ensure-guile-git!): New procedure.
(%repository-url): New variable.
(%default-options): Add 'repository-url' and 'ref'.
(show-help, %options): Add '--commit' and '--url'.
(temporary-directory, first-directory, interned-then-deleted)
(unpack): Remove.
(build-from-source): Rename 'tarball' to 'source'.  Remove call to
'unpack'.
(build-and-install): Rename 'tarball' to 'source'.
(honor-lets-encrypt-certificates!, report-git-error): New procedures.
(with-git-error-handling): New macro.
(guix-pull)[fetch-tarball]: Remove.
Wrap body in 'with-git-error-handling'.  Rewrite to use
'latest-repository-commit'.
* build-aux/build-self.scm (build): Print an error message and exit when
GUILE-GIT is #f.
* doc/guix.texi (Invoking guix pull): Mention Git.  Document '--commit'
and '--branch'.
2017-08-02 00:04:00 +02:00
Marius Bakke aa9780daf9
Merge branch 'master' into core-updates 2017-08-01 23:42:28 +02:00
Roel Janssen 5d7e854365
graph: Provide access to the package record in the emit functions.
* guix/graph.scm (export-graph): Pass the node to the emit functions, instead
  of the node's label.
2017-08-01 22:57:22 +02:00
Efraim Flashner a60667245f
guix package: Allow `guix package -u' to fuction as before.
This is a follow up to 6ddf97f81b

* guix/scripts/package.scm (%options) <"-u">: Only check for a flag when
there is an ARG after '-u'.
2017-08-01 23:02:26 +03:00
Ludovic Courtès 9081a776ea
lint: formatting: Detect sexp boundaries.
* guix/scripts/lint.scm (report-formatting-issues)[last-line]: Remove.
[sexp-last-line]: New procedure.
Use it.
2017-08-01 15:32:07 +02:00
Ludovic Courtès 6ddf97f81b
guix package: Warn when invoked with '-u -something'.
Fixes <https://bugs.gnu.org/27820>.
Reported by Hartmut Goebel <h.goebel@crazy-compilers.com>.

* guix/scripts/package.scm (%options) <"-u">: Emit a warning when ARG
starts with "-".
2017-07-31 22:22:27 +02:00
Ludovic Courtès 228a3982df
git-download: Remove call to 'canonicalize-path'.
* guix/git-download.scm (git-predicate): Remove call to
'canonicalize-path' since this could lead to discrepancies.  For
instance it broke 'make update-guix-package' since it passes a
non-canonical directory name.
2017-07-30 17:22:13 +02:00
Danny Milosavljevic 1975c754f4
bootloader: Use <menu-entry> for the bootloader side.
* gnu/bootloader.scm (menu-entry-device-mount-point): New variable.  Export it.
(<menu-entry>: New field "device".
* gnu/bootloader/grub.scm (grub-confgiuration-file): Handle <menu-entry>
entries.
* gnu/bootloader/extlinux.scm (extlinux-configuration-file): Handle
<menu-entry> entries.
* gnu/system.scm (menu->entry->boot-parameters): Delete variable.
(boot-parameters->menu-entry): New variable.  Export it.
(operating-system-bootcfg): Make OLD-ENTRIES a list of <menu-entry>.
* guix/script/system.scm (reinstall-bootloader): Fix bootcfg usage.
(perform-action): Fix bootcfg usage.
2017-07-28 21:56:18 +02:00
Ludovic Courtès f0e492f0a5
utils: Factorize XDG directory handling.
* guix/ui.scm (config-directory): Remove.
* guix/utils.scm (xdg-directory, config-directory): New procedures.
(cache-directory): Rewrite in terms of 'xdg-directory'.
* guix/scripts/substitute.scm (%narinfo-cache-directory): Pass #:ensure?
 #f to 'cache-directory'.
2017-07-28 18:09:43 +02:00
Marius Bakke e0b9e377f1
Merge branch 'master' into core-updates 2017-07-28 00:34:13 +02:00
Ludovic Courtès 952cf67cb1
weather: Show "-m" option in help message.
Reported by Alex Kost <alezost@gmail.com>.

* guix/scripts/weather.scm (show-help): Show "-m".
2017-07-27 11:47:50 +02:00
Christopher Baines f135b4ae83
git-download: Speed up 'git-predicate'.
Adjust 'git-predicate' to use data structures that perform better when used
with git repositories with a large number of files.

Previously when matching either a regular file or directory, 'git-predicate'
would search a list with a length equal to the number of files in the
repository. As a search operation happens for roughly every file in the
repository, this meant that the time taken to use 'git-predicate' to traverse
all the files in a repository was roughly exponential with respect to the
number of files in the repository.

Now, for matching regular files or symlinks, 'git-predicate' uses a vhash
using the inode value as the key. This should perform roughly in constant
amount of time, instead of linear with respect to the number of files in the
repository.

For matching directories, 'git-predicate' now uses a tree structure stored in
association lists. To check if a directory is in the tree, the tree is
traversed from the root. The time complexity of this depends on the shape of
the tree, but it should be an improvement on searching through the list of all
files.

* guix/git-download.scm (files->directory-tree, directory-in-tree?): New
procedures.
(git-predicate): Compute DIRECTORY-TREE.  Turn INODES into a vhash.
Adjust body of lambda accordingly.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2017-07-25 23:24:16 +02:00
Ludovic Courtès 84620dd0c4
offload: Fix potential file descriptor and memory leak.
The '%slots' list could grow indefinitely; in practice though,
guix-daemon is likely to restart 'guix offload' often enough.

* guix/scripts/offload.scm (%slots): Remove.
(choose-build-machine): Don't 'set!' %SLOTS.  Return the acquired slot
as a second value.
(process-request): Adjust accordingly.  Release the returned slot after
'transfer-and-offload'.
2017-07-25 23:24:16 +02:00
Ludovic Courtès 236cae0628
offload: Disconnect sessions created by 'machine-load'.
This fixes a memory leak that can be seen by running:

  (map (lambda _ (machine-load m)) (iota 1000))

* guix/scripts/offload.scm (machine-load): Add call to 'disconnect!'.
2017-07-25 23:24:15 +02:00
Ludovic Courtès 585347d7aa
Add 'guix weather'.
* guix/scripts/weather.scm: New file.
* Makefile.am (MODULES): Add it.
* doc/guix.texi (Substitutes, Invoking guix publish): Mention "guix
weather".
(Invoking guix weather): New node.

Co-authored-by: Ricardo Wurmus <rekado@elephly.net>
2017-07-25 12:15:43 +02:00
Ludovic Courtès e956ae16a4
import: cpan: Updater returns a list of URLs.
* guix/import/cpan.scm (latest-release): Return a list in the 'urls'
field of 'upstream-source'.
2017-07-24 17:35:26 +02:00
Leo Famulari 6c1a317e29
Merge branch 'master' into core-updates 2017-07-23 03:42:12 -04:00
Ludovic Courtès c95644f017
publish: Make the cache eviction policy less aggressive.
Suggested by Mark H Weaver <mhw@netris.org>.

* guix/scripts/publish.scm (nar-expiration-time): New procedure.
(render-narinfo/cached): Use it as the #:entry-expiration passed to
'maybe-remove-expired-cache-entries'.
2017-07-21 17:03:25 +02:00
Ludovic Courtès deac674ab4
publish: Avoid 'valid-path?' RPC for non-existent items.
* guix/scripts/publish.scm (render-narinfo/cached): Call 'file-exists?'
before calling 'valid-path?'.  This makes the 404 path slightly faster.
2017-07-21 17:03:25 +02:00
Ludovic Courtès 35eb77b09d
store: Rewrite 'store-path-hash-part' to not use regexps.
* guix/store.scm (store-path-hash-part): Rewrite without using a
regexp.  This speeds up 'guix substitute'.
2017-07-21 17:03:25 +02:00
Ludovic Courtès 33463986ba
publish: Remove 'regexp-exec' call from the hot path.
* guix/scripts/publish.scm (extract-narinfo-hash): Rewrite without
resorting to regexps.
2017-07-21 17:03:24 +02:00
Ludovic Courtès 0a94dc6396
base32: Export the base32 charsets.
* guix/base32.scm (%nix-base32-charset, %rfc4648-base32-charset): New
variables.
2017-07-21 17:03:24 +02:00
Ludovic Courtès 75a4d86f50
substitute: Avoid repeated calls to 'length'.
* guix/scripts/substitute.scm (fetch-narinfos)[update-progress!]: Move
'length' call outside of lambda.
2017-07-21 17:03:24 +02:00
Ludovic Courtès 3d3e93b3f9
substitute: Optimize hash-part-to-path conversion on non-200 responses.
Previously this operation was linear in the number of requests and
involved costly calls to 'string-contains'.

* guix/scripts/substitute.scm (fetch-narinfos)[hash-part->path]: New
procedure.
[handle-narinfo-response]: Use it for caching when CODE is not 200.
2017-07-21 17:03:24 +02:00
Ludovic Courtès 302d46e63f
gexp: Slightly improve error reporting for 'local-file'.
Reported by Ricardo Wurmus.

* guix/gexp.scm (local-file): Define using 'syntax-case' instead of
'syntax-rules'.  Explicitly handle the zero-argument case and the
use-as-an-identifier case.
2017-07-20 18:08:00 +02:00
Arun Isaac 41209a6f3a
licenses: Add MirOS license.
* guix/licenses.scm (miros): New variable.
2017-07-20 19:55:21 +05:30
Ludovic Courtès 561f4e4500
guix package: '-l' correctly handles zero-generation profiles.
* guix/scripts/package.scm (process-query) <'list-generations>: Properly
handle the case where 'profile-generations' returns the empty list.
2017-07-20 15:29:15 +02:00
Ludovic Courtès edbe07cd67
guix package: Trim trailing slashes from the profile name.
Fixes <https://bugs.gnu.org/25762>.
Reported by Ricardo Wurmus <rekado@elephly.net>.

* guix/scripts/package.scm (canonicalize-profile): Trim trailing slashes
from PROFILE.
2017-07-20 15:29:15 +02:00
Ludovic Courtès da03649640
profiles: Remove workaround for an old Guile 'scandir' bug.
* guix/profiles.scm (generation-numbers)[scandir]: Remove.
2017-07-20 11:57:13 +02:00
Tobias Geerinckx-Rice 644e5f17df
download: Add OpenBSD mirrors.
* guix/download.scm (%mirrors) <openbsd>: Add HTTPS OpenBSD mirrors.
* gnu/packages/ntp.scm (openntpd)[source]: Use them.
* gnu/packages/ssh.scm (openssh)[source]: Likewise.
* gnu/packages/tls.scm (libressl)[source]: Likewise.
2017-07-19 01:42:08 +02:00
Ludovic Courtès 5058bf5684
guix system: Use "image.iso" as the name of ISO images.
* guix/scripts/system.scm (system-derivation-for-action): Pass #:name to
'system-disk-image'.
2017-07-18 21:41:35 +02:00
Ludovic Courtès ef03d8dc37
syscalls: Delay resolution of "scm_set_automatic_finalization_enabled".
* guix/build/syscalls.scm (%set-automatic-finalization-enabled?!) [guile-2.2]:
Wrap in 'delay'.
2017-07-18 15:31:12 +02:00
Ludovic Courtès 578dfbe07b
gexp: 'ungexp-splicing' properly accounts for nested native inputs.
Previously, (gexp-native-inputs #~#$@(list #~#+foo)) would return '().

This is a followup to 5b14a7902c.

* guix/gexp.scm (gexp-inputs)[add-reference-inputs]: In the list case,
remove 'if' around 'fold-right'.  In 'map' lambda, always inherit N?.
* tests/gexp.scm ("gexp list splicing + ungexp-splicing"): New test.
2017-07-17 23:41:36 +02:00
Ludovic Courtès b547349d50
substitute: Work around Guile 2.2 'time-monotonic' bug.
Prior to this change, half of the cached narinfos would expire
immediately since they contained the number of nanoseconds instead of
the number of seconds as their date.

* guix/scripts/substitute.scm (time-monotonic) <guile-2.2>: Define, as a
workaround.
2017-07-12 21:56:17 +02:00
Ludovic Courtès a6c1fe8240
size: Add '--sort=KEY'.
* guix/scripts/size.scm (profile-closure<?, profile-self<?): New
procedures.
(display-profile): Add #:profile<? parameter and honor it.
(show-help, %options): Add '--sort'.
(%default-options): Add 'profile<?'.
(guix-size): Pass PROFILE<? to 'display-profile*'.
* doc/guix.texi (Invoking guix size): Document '--sort'.
2017-07-12 21:56:17 +02:00
Ludovic Courtès 1ac3a488ad
environment: Rationalize calls to 'set-build-options'.
Before this change '--substitute-urls' would be ignored.

* guix/scripts/environment.scm (build-environment): Remove redundant
call to 'set-build-options-from-command-line*'.
(guix-environment): Move 'set-build-options-from-command-line' right
after 'with-store'.
2017-07-12 21:56:17 +02:00
Danny Milosavljevic 0bc6fe323d
syscalls: Add network-interface-running?
* guix/build/syscalls.scm (network-interface-running?): New variable.
Export it.
* tests/syscalls.scm: Add test.

Co-authored-by: John Darrington <jmd@gnu.org>
2017-07-12 16:15:30 +02:00
Ludovic Courtès 0ca3d55686
store: Account for 'add-to-store' in RPC statistics.
* guix/store.scm (add-to-store): Add call to 'record-operation'.
2017-07-11 00:48:50 +02:00
Leo Famulari c8eb2b8c60
Merge branch 'master' into core-updates 2017-07-10 14:37:53 -04:00
Ludovic Courtès 1ab9e48339
syscalls: Adjust 'dirent64' struct for GNU/Hurd.
Reported by rennes@openmailbox.org.

* guix/build/syscalls.scm (file-type->symbol): New procedure.
(%struct-dirent-header): Rename to...
(%struct-dirent-header/linux): ... this.  Rename introduced bindings as
well.
(%struct-dirent-header/hurd): New C struct.
(define-generic-identifier): New macro.
(read-dirent-header, %struct-dirent-header, sizeof-dirent-header):
Define in terms of 'define-generic-identifier'.
2017-07-10 00:07:36 +02:00
Ricardo Wurmus bb3b35975c
build-system: texlive: Build union in configure phase.
This allows us to use texmf.cnf instead of having to set all required
environment variables manually.

* guix/build/texlive-build-system.scm (configure): New procedure.
(build): Simplify.
(%standard-phases): Add configure phase.
* guix/build-system/texlive.scm (texlive-build): Include (guix build union) in
modules.
(%texlive-build-system-modules): Likewise.
2017-07-09 17:07:27 +02:00
Ricardo Wurmus 1678be097b
build-system: texlive: Only build packages in the current directory.
* guix/build/texlive-build-system.scm (build): Use scandir instead of
find-files.
2017-07-09 17:07:27 +02:00
Ludovic Courtès 960c6ce96d
discovery: Recurse into directories pointed to by a symlink.
Reported by Christopher Baines <mail@cbaines.net>
and Alex Kost <alezost@gmail.com>
at <https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00290.html>.

* guix/discovery.scm (scheme-files): When ENTRY is a symlink that
doesn't end in '.scm', call 'stat' and recurse if it points to a
directory.
* tests/discovery.scm ("scheme-modules recurses in symlinks to
directories"): New test.
2017-07-03 23:51:23 +02:00
Ludovic Courtès cc1dfc202f
copy: Default to port 22.
Failing to do that, "%p" would be "0" when using "ProxyCommand"
in ~/.ssh/config.

* guix/scripts/copy.scm (send-to-remote-host): Default to port 22.
(retrieve-from-remote-host): Likewise.
2017-07-03 23:51:23 +02:00
Ludovic Courtès d5ec5ed719
packages: Mark 'replacement' as an "innate" field.
Suggested by Mark H Weaver
at <https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00355.html>.

* guix/packages.scm (<package>)[replacement]: Mark as "innate".
* gnu/packages/base.scm (glibc-2.25-patched, glibc-2.24)
(glibc-2.23, glibc-2.22, glibc-2.21, glibc-locales): Remove
'replacement' field, which was set to #f.
* gnu/packages/commencement.scm (perl-boot0): Likewise.
* gnu/packages/fontutils.scm (graphite2/fixed): Likewise.
* gnu/packages/ghostscript.scm (ghostscript/fixed): Likewise.
* gnu/packages/gnupg.scm (libgcrypt-1.7.8): Likewise.
* gnu/packages/guile.scm (guile-2.0/fixed, guile-2.2): Likewise.
* gnu/packages/icu4c.scm (icu4c/fixed): Likewise.
* gnu/packages/image.scm (libpng-apng): Likewise.
* gnu/packages/make-bootstrap.scm (%guile-static): Likewise.
* gnu/packages/pcre.scm (pcre/fixed): Likewise.
* gnu/packages/perl.scm (perl/fixed): Likewise.
* gnu/packages/ruby.scm (ruby-2.3, ruby-2.2, ruby-2.1)
(ruby-1.8): Likewise.
* gnu/packages/tls.scm (gnutls-3.5.13, gnutls/guile-2.2): Likewise.
* gnu/packages/xml.scm (expat-2.2.1): Likewise.
2017-07-03 23:51:22 +02:00
宋文武 85cfbd46ce
profiles: xdg-desktop-database: Run the hook when GLib is referenced.
This will pull the latest 'desktop-file-utils' package into the profile
closure, as the 'xdg-mime-database' hook already does.

* guix/profiles.scm (xdg-desktop-database): Run the hook when 'glib' is
referenced.
2017-07-03 23:27:04 +08:00
Danny Milosavljevic 3f4d8a7f66
guix system: Add "--file-system-type" option.
* guix/scripts/system.scm (process-action): Pass file-system-type to ...
(perform-action): ... here.  Add new keyword argument.  Pass new value to ...
(system-derivation-for-action): ... here.  Add new keyword argument.
Pass new value to system-disk-image.
* doc/guix.texi (disk-image): Document new option.
2017-07-03 16:33:46 +02:00
宋文武 dbde386ee3
ui: package->recutlis: Remove duplicated package names in dependencies.
* guix/ui.scm (package->recutils): Add call to 'delete-duplicates' in
'dependencies->recutils'.
2017-07-02 13:14:16 +08:00
Ludovic Courtès b2fde4800d
store: 'references/substitutes' really caches its result.
Until now the cache was always empty because 'for-each' was passed ITEMS
as its second argument, and ITEMS was the empty list at that point.

* guix/store.scm (references/substitutes): Add 'requested' variable.
Use it as second argument of 'for-each' in base case.
2017-07-02 00:41:12 +02:00
Ludovic Courtès 2633bd324b
store: 'references/substitutes' save an RPC is the trivial case.
* guix/store.scm (references/substitutes): Save a
'substitutable-path-info' call when MISSING is empty.
2017-07-02 00:41:12 +02:00
Mathieu Othacehe b02469d298
guix: git: Stop using libgit2-shutdown.
* guix/git.scm (with-libgit2): Stop calling (libgit2-shutdown) to prevent
segfaults when pointer finalizers are run.
2017-07-01 16:32:42 +02:00
Ludovic Courtès e0556f7695
Merge branch 'master' into core-updates 2017-06-30 11:41:57 +02:00
Ludovic Courtès a8ac4f081a
vm: Estimate the disk size by default.
* gnu/build/vm.scm (estimated-partition-size): New procedure.
* gnu/system/vm.scm (expression->derivation-in-linux-vm):
Change #:disk-image-size default to 'guess.
[builder]: When DISK-IMAGE-SIZE is 'guess, use
'estimated-partition-size' and compute and estimate of the image size.
(qemu-image): Likewise.
* guix/build/store-copy.scm (file-size, closure-size): New procedures.
* guix/scripts/system.scm (%default-options): Change 'image-size' to
'guess.
* doc/guix.texi (Building the Installation Image): Remove '--image-size'
flag from example.
(Invoking guix system): Document the image size estimate.
2017-06-30 00:16:50 +02:00
Leo Famulari 1024c8119c
Merge branch 'master' into core-updates 2017-06-29 18:02:17 -04:00
Ludovic Courtès 0040140d34
guix package: Allow '--rollback', after all.
* guix/scripts/package.scm (%options): Add "rollback" as an alias for
"roll-back".
2017-06-26 22:52:06 +02:00
Ludovic Courtès fc8fdcf56e
guix package: 'guix package -r PKG -u' does not upgrade PKG.
Fixes <http://bugs.gnu.org/27262>.
Reported by Mark H Weaver <mhw@netris.org>.

* guix/scripts/package.scm (transaction-upgrade-entry): Check if ENTRY
matches 'manifest-transaction-removal-candidate?' and return TRANSACTION
if it does.
(process-actions): Move 'options->removable' from step 2 to step 1.
2017-06-26 22:52:06 +02:00
Ludovic Courtès 6d382339de
profiles: Add 'manifest-transaction-removal-candidate?'.
* guix/profiles.scm (manifest-transaction-removal-candidate?): New
procedure.
* tests/profiles.scm ("manifest-transaction-removal-candidate?"): New
test.
2017-06-26 22:52:06 +02:00
Ludovic Courtès 94a400beba
import cran: Generate a valid 'license' field for "GPL".
Fixes <http://bugs.gnu.org/27294>.
Reported by Joshua Sierles <joshua@joshua.si>.

* guix/import/cran.scm (string->license) <"GPL">: Return a quoted list.
2017-06-26 22:52:06 +02:00
Mark H Weaver ed068b960e
Merge branch 'master' into core-updates 2017-06-26 00:00:58 -04:00
Ludovic Courtès a1b46bdc06
guix package: Warn about packages that no longer exist.
Fixes <http://bugs.gnu.org/27261>.
Reported by Mark H Weaver <mhw@netris.org>.

* guix/scripts/package.scm (transaction-upgrade-entry): Add call to
'warning' when NAME cannot be found in the package set.
2017-06-25 22:29:15 +02:00
Ludovic Courtès 4c228f9e54
refresh: Be more verbose when passed an explicit package list.
* guix/scripts/refresh.scm (check-for-package-update): Use
'version-compare' instead of 'version>?'.  When WARN? is true, print
something for the '=' and '<' cases.
2017-06-24 23:28:23 +02:00
Ludovic Courtès 5df1395a8d
store: Define a default port for TCP connections.
* guix/store.scm (%default-guix-port): New variable.
(connect-to-daemon)[connect]: Use it when (uri-port uri) is #f.
* doc/guix.texi (The Store): Mention the default port number.
2017-06-22 10:59:07 +02:00
Ludovic Courtès 7ae97a4c3f
store: Pass a socket type hint to 'getaddrinfo'.
* guix/store.scm (open-inet-socket): Pass hints in the 'getaddrinfo'
call.
2017-06-22 10:59:06 +02:00
Ludovic Courtès afd06f605b
environment: Disable profile collision checks.
Reported by Efraim Flashner.
This is a followup to a654dc4bcf.

* guix/profiles.scm (profile-derivation): Add #:allow-collisions? and
honor it.
* guix/scripts/environment.scm (inputs->profile-derivation): Pass
 #:allow-collisions? #f to 'profile-derivation'.
* tests/guix-environment.sh: Test "guix environment guix".
2017-06-21 16:53:22 +02:00
Ludovic Courtès 2e2b5ad7bb
profiles: Move 'manifest-entry-dependencies' user after definition.
Reported by Efraim Flashner.

* guix/profiles.scm (manifest-transitive-entries): Move after
<manifest-entry> definition.
2017-06-21 11:59:33 +02:00
Ludovic Courtès 8c9e90debf
guix package: '--search-paths' shows search paths from propagated inputs.
* guix/scripts/package.scm (process-query) <'search-paths>: Use
'manifest-transitive-entries' instead of 'manifest-entries'.
2017-06-21 11:05:53 +02:00
Ludovic Courtès a654dc4bcf
profiles: Catch and report collisions in the profile.
* guix/profiles.scm (&profile-collision-error): New error condition.
(manifest-transitive-entries, manifest-entry-lookup, lower-manifest-entry)
(check-for-collisions): New procedures.
(profile-derivation): Add call to 'check-for-collisions'.
* guix/ui.scm (call-with-error-handling): Handle '&profile-collision-error'.
* tests/profiles.scm ("collision", "collision of propagated inputs")
("no collision"): New tests.
2017-06-21 11:05:53 +02:00
Ludovic Courtès 81e3485c0d
guix package: Always upgrade packages that have propagated inputs.
* guix/scripts/package.scm (transaction-upgrade-entry): Always upgrade
packages that have propagated inputs.
2017-06-21 11:05:53 +02:00
Ludovic Courtès b3a00885c0
profiles: Manifest entries keep a reference to their parent entry.
* guix/profiles.scm (<manifest-entry>)[parent]: New field.
(package->manifest-entry): Add #:parent parameter.  Fill out the
'parent' field of <manifest-entry>; pass #:parent in recursive calls.
* guix/profiles.scm (sexp->manifest)[sexp->manifest-entry]: New
procedure.  Use it for version 3.
* tests/profiles.scm ("manifest-entry-parent"): New procedure.
("read-manifest")[entry->sexp]: Add 'manifest-entry-parent' to the
result.
2017-06-21 11:05:52 +02:00
Ludovic Courtès 55b4715fd4
profiles: Represent propagated inputs as manifest entries.
* guix/profiles.scm (package->manifest-entry): Turn DEPS into a list of
manifest entries.
(manifest->gexp)[entry->gexp]: Call 'entry->gexp' on DEPS.
Bump version to 3.
(sexp->manifest)[infer-dependency]: New procedure.
Use it for versions 1 and 2.  Parse version 3.
(manifest-inputs)[entry->gexp]: New procedure.
Adjust to 'dependencies' being a list of <manifest-entry>.
* tests/profiles.scm ("packages->manifest, propagated inputs")
("read-manifest"): New fields.
2017-06-21 11:05:52 +02:00
Arun Isaac 148585c240
gnu: Move contents of zip module into compression module.
* gnu/packages/zip.scm (zip, unzip, zziplib, perl-zip): Move to...
* gnu/packages/compression.scm: ...here.
* gnu/packages/zip.scm: Delete file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Unregister deleted file.
* po/packages/POTFILES.in: Unregister deleted file.
* gnu/packages/{audio, avr, bioinformatics, busybox, cdrom, ci, compression,
docbook, documentation, fonts, fpga, game-development, games, gl, gnome,
gnuzilla, graphics, guile, haskell, image, java, kodi, ldc, libreoffice,
markup, maths, mc, monitoring, music, php, pretty-print, python, scheme,
smalltalk, statistics, synergy, tex, textutils, video, web-browsers, xml,
zip}.scm, guix/build-system/{ant, font}.scm, guix/{download, packages}.scm:
Adapt module import.
2017-06-20 18:10:35 +05:30
Mark H Weaver 9815739e9b
Merge branch 'master' into core-updates 2017-06-20 00:25:59 -04:00
Ludovic Courtès e037e9dbec
store: Buffer RPC writes.
For a command like:

  guix build python2-numpy -n

this reduces the number of 'write' syscalls from 9.5K to 2.0K.

* guix/store.scm (<nix-server>)[buffer, flush]: New fields.
(open-connection): Adjust accordingly.  Call 'buffering-output-port' to
compute the two new fields.
(write-buffered-output, buffering-output-port): New procedures.
(operation): Write to (nix-server-output-port server).  Call
'write-buffered-output'.
2017-06-19 23:23:14 +02:00
Ricardo Wurmus 00f037ca44
build-system/texlive: Update to texlive-2017.1, revision 44591.
* guix/build-system/texlive.scm (%texlive-tag): Change to texlive-2017.1.
(%texlive-revision): Change to 44591.
2017-06-19 08:22:04 +02:00
Mark H Weaver 9d4385634d
Merge branch 'master' into core-updates 2017-06-18 02:36:51 -04:00
Ludovic Courtès d46c4423f4
discovery: 'scheme-files' returns '() for a non-accessible directory.
Fixes a regression introduced in
d27cc3bfaa.

Reported by Ricardo Wurmus <rekado@elephly.net>.

* guix/discovery.scm (scheme-files): Catch 'scandir*' system errors.
Return '() and optionally raise a warning upon 'system-error'.
* tests/discovery.scm ("scheme-modules, non-existent directory"): New
test.
2017-06-18 00:14:07 +02:00
Ludovic Courtès 3bacc655c5
syscalls: 'opendir*' error message shows the file name.
* guix/build/syscalls.scm (opendir*): Add NAME to the 'system-error'
message.
2017-06-18 00:14:07 +02:00
Ludovic Courtès f4453df9a5
store: Add an RPC counter.
* guix/store.scm (%rpc-calls): New variable.
(show-rpc-profile, record-operation): New procedures.
(operation): Add call to 'record-operation'.
* guix/ui.scm (run-guix-command): Wrap COMMAND-MAIN in 'dynamic-wind'.
Run EXIT-HOOK.
2017-06-16 17:08:22 +02:00
Ludovic Courtès d27cc3bfaa
discovery: Rewrite 'scheme-files' using 'scandir*'.
On a command like:

  guix environment --ad-hoc coreutils -- true

this reduces the number of 'stat' calls from 14.1K to 9.7K on my
setup (previously each getdents(2) call would be followed by one stat(2)
call per entry).

* guix/discovery.scm (scheme-files): Rewrite using 'scandir*'.
2017-06-16 17:08:22 +02:00
Ludovic Courtès fa73c19373
syscalls: Add 'scandir*'.
* guix/build/syscalls.scm (%struct-dirent-header): New C struct.
(string->pointer/utf-8, pointer->string/utf-8): New procedures.
(opendir*, closedir*, readdir*, scandir*): New procedures.
* tests/syscalls.scm ("scandir*, ENOENT")
("scandir*, ASCII file names", "scandir*, UTF-8 file names")
("scandir*, properties): New tests.
2017-06-16 17:08:22 +02:00
Ludovic Courtès cbee955901
ui: Remove the empty string from '%load-extensions'.
* guix/ui.scm (run-guix): Set %LOAD-EXTENSIONS.
2017-06-15 23:07:47 +02:00
Ludovic Courtès 7ebc6cf869
packages: Patches can be any lowerable object.
* guix/packages.scm (patch-and-repack)[instantiate-patch]: Replace
'origin?' with 'struct?'.
2017-06-15 23:07:47 +02:00
Ricardo Wurmus afbc94194e
guix: Add texlive importer.
* guix/import/texlive.scm: New file.
* guix/scripts/import/texlive.scm: New file.
* Makefile.am (MODULES): Add them.
* tests/texlive.scm: New file.
* Makefile.am (SCM_TESTS): Add it.
* guix/scripts/import.scm (importers): Add texlive importer.
* doc/guix.texi (Invoking guix import): Document it.
2017-06-15 17:03:19 +02:00
Ricardo Wurmus 205794c868
build-system: Add 'texlive-build-system'.
* guix/build-system/texlive.scm: New file.
* guix/build/texlive-build-system.scm: New file.
* Makefile.am (MODULES): Add them.
* doc/guix.texi (Build Systems): Document it.
* gnu/packages/tex.scm (%texlive-tag, %texlive-revision): Remove variables.
(texlife-ref): Remove procedure.
2017-06-15 17:03:16 +02:00
Ricardo Wurmus 942c4f812a
licenses: Add common TeX and LaTeX licenses.
* guix/licenses.scm (knuth, lppl, lppl1.0+, lppl1.2, lppl1.2+, lppl1.3,
lppl1.3+, lppl1.3a, lppl1.3a+, lppl1.3b, lppl1.3b+, lppl1.3c, lppl1.3c+): New
variables.
2017-06-15 17:03:14 +02:00
Ricardo Wurmus bef0db3769
guix: Add download-svn-to-store.
* guix/svn-download.scm (download-svn-to-store): New procedure.
2017-06-15 17:03:14 +02:00
Danny Milosavljevic d1e7ca2df8
import: pypi: Always use pypi.io URL with downcased package name.
* guix/import/pypi.scm (make-pypi-sexp): Always use pypi.io URL with
downcased package name.
2017-06-15 09:49:13 +02:00
Ludovic Courtès 4e863eb35f
guix package: '--search' sorts by relevance.
* guix/scripts/package.scm (find-packages-by-description): Rewrite to
compute a score based on the number of regexps matched and the number of
matches for each regexp.  Sort according to this score and return it as
a second value.
(process-query) <'search>: Capture the two return values of
'find-packages-by-description'.  Pass #:extra-fields to
'package->recutils'.
* doc/guix.texi (Invoking guix package): Mention relevance, give an
example.
2017-06-13 23:22:19 +02:00
Ludovic Courtès 4ee79f22f5
ui: 'package->recutils' takes #:extra-fields.
* guix/ui.scm (package->recutils): Add #:extra-fields and honor it.
2017-06-13 23:22:19 +02:00
Ludovic Courtès 015f17e8b9
derivations: Introduce 'read-derivation-from-file'.
This avoids the open/fstat/close syscalls upon a cache hit that we had
with the previous idiom:

  (call-with-input-file file read-derivation)

where caching happened in 'read-derivation' itself.

* guix/derivations.scm (%read-derivation): Rename to...
(read-derivation): ... this.
(read-derivation-from-file): New procedure.
(derivation-prerequisites, substitution-oracle)
(derivation-prerequisites-to-build):
(derivation-path->output-path, derivation-path->output-paths):
(derivation-path->base16-hash, map-derivation): Use
'read-derivation-from-file' instead of (call-with-input-file …
read-derivation).
* guix/grafts.scm (item->deriver): Likewise.
* guix/scripts/build.scm (log-url, options->things-to-build): Likewise.
* guix/scripts/graph.scm (file->derivation): Remove.
(derivation-dependencies, %derivation-node-type): Use
'read-derivation-from-file' instead.
* guix/scripts/offload.scm (guix-offload): Likewise.
* guix/scripts/perform-download.scm (guix-perform-download): Likewise.
* guix/scripts/publish.scm (load-derivation): Remove.
(narinfo-string): Use 'read-derivation-from-file'.
2017-06-12 17:53:51 +02:00
Ludovic Courtès b46712159c
store: Speed up 'add-to-store'.
* guix/store.scm (add-to-store): Remove 'lstat' call.
2017-06-12 17:53:51 +02:00
Ludovic Courtès 2ac6998063
build-system/gnu: Work around 'time-monotonic' bug in Guile 2.2.2.
Fixes <http://bugs.gnu.org/27303>.
Reported by Leo Famulari <leo@famulari.name>.

* guix/build/gnu-build-system.scm (time-monotonic) [guile-2.2]: Define.
2017-06-11 22:52:23 +02:00
Marius Bakke 5bace4c8ad
Merge branch 'master' into core-updates
Conflicts:
* gnu/packages/tls.scm (gnutls): Incorporated 3.5.13 graft (88e2511e21).
2017-06-11 02:07:06 +02:00
Mathieu Othacehe f96752e378
bootloader: Rename boot-name to bootloader-name.
* gnu/system (<boot-parameters>)[boot-name]: Rename field to...
[bootloader-name]: ... this.  Adjust users.
* gnu/scripts/system.scm: Adjust accordingly.
2017-06-10 18:32:11 +02:00
Marius Bakke ea45e2c500
Merge branch 'master' into core-updates 2017-06-10 02:57:50 +02:00
Mathieu Othacehe 6b7b3ca981
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-06-09 09:48:26 +02:00
Maxim Cournoyer df34f47894
build-system: emacs: Factorize include/exclude default arguments.
The `install' phase of the emacs-build-system contained default arguments
duplicated from the host side `emacs-build' procedure. This change factorizes
them so that:

1. They are not duplicated.
2. They can be reused and extended easily when defining emacs packages.

* guix/build/emacs-build-system.scm (%default-include, %default-exclude): New
  variables.
(install): Use %default-include and %default-exclude as default arguments.
* guix/build-system/emacs.scm: Use and re-export %default-include,
%default-exclude from (guix build emacs-build-system).
(emacs-build): Use %default-include and %default-exclude as default arguments.

Signed-off-by: Arun Isaac <arunisaac@systemreboot.net>
2017-06-08 19:45:27 +05:30
Leo Famulari c67d587f94
Merge branch 'master' into core-updates
This merge commit includes a fix for CVE-2017-6512 in Perl 5.26.0.
2017-06-07 12:11:55 -04:00
James Richardson 4679dd6967
import: cpan: Update CPAN importer to use MetaCPAN v1 API.
* guix/import/cpan.scm (module->dist-name, cpan-fetch): Use metacpan.org
URLs.
* tests/cpan.scm ("cpan->guix-package"): Adjust accordingly.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-06-07 15:06:34 +02:00
Ludovic Courtès de9d8f0e29
ssh: Improve error reporting when 'send-files' fails.
Fixes <http://bugs.gnu.org/26972>.

* guix/ssh.scm (store-import-channel)[import]: Add 'consume-input'
procedure.  Wrap body in 'catch' and 'guard'.  Use 'open-remote-pipe'
with OPEN_BOTH instead of 'open-remote-output-pipe'.
(send-files): After the 'channel-send-eof' call, do (read port).
Interpret the result sexp and raise an error condition if needed.
2017-06-04 23:00:32 +02:00
Leo Famulari 9f825cec1b
Merge branch 'master' into core-updates 2017-06-04 14:56:31 -04:00
Mathieu Othacehe 1335ac3141
scripts: refresh: Add -m manifest option.
* guix/scripts/refresh.scm (%options): Add -m option,
(show-help): document it,
(packages-from-manifest): new procedure,
(guix-refresh): use packages from manifest if specified, otherwise
keep the previous behaviour.
* doc/guix.texi (Invoking guix refresh): document new option.
2017-06-04 09:07:43 +02:00
Marius Bakke d0c45d2d82
Merge branch 'master' into core-updates
Conflicts:
	gnu/packages/image.scm
        (incorporated libtiff graft)
2017-06-03 17:51:21 +02:00