Commit Graph

4383 Commits (dabdd7d4650da685a9bfe470abbc2ec066ff00b9)

Author SHA1 Message Date
Ludovic Courtès dabdd7d465
pull: Display news titles directly upon 'pull'.
* guix/scripts/pull.scm (display-profile-news): Return true when there's
more to display.
(display-news-entry-title): New procedure.
(display-news-entry): Use it.
(display-channel-specific-news): Return true when there's more to
display.
(display-channel-news-headlines): New procedure.
(build-and-install): Call it.  When 'display-channel-news-headlines' or
'display-profile-news' returns #t, print a hint to run "pull --news".
(display-new/upgraded-packages): Return true when there's more to display.
2019-09-23 10:38:44 +02:00
Ludovic Courtès 192ee02aeb
pull: '-l' displays channel news.
* guix/scripts/pull.scm (display-channel-news): Make 'previous' a
parameter.
(process-query)[list-generations]: Call 'display-channel-news'.
2019-09-23 10:38:44 +02:00
Ludovic Courtès 7faffdc2d5
pull: Display channel news.
* guix/scripts/pull.scm (display-news-entry)
(display-channel-specific-news): New procedures.
(display-channel-news): Call it.
(display-new/upgraded-packages): Adjust hint message.
* doc/guix.texi (Invoking guix pull): Mention it.
2019-09-23 10:38:44 +02:00
Ludovic Courtès a725504a3a
ui: Add 'current-message-language'.
* guix/ui.scm (%default-message-language): New variable.
(current-message-language): New procedure.
2019-09-23 10:38:44 +02:00
Ludovic Courtès 9719e8d37a
channels: Allow news entries to refer to a tag.
Suggested by Ricardo Wurmus <rekado@elephly.net>.

* guix/channels.scm (<channel-news-entry>)[tag]: New field.
(sexp->channel-news-entry): Accept either 'commit' or 'tag' in 'entry'
forms.
(resolve-channel-news-entry-tag): New procedure.
(channel-news-for-commit): Move 'with-repository' form one level
higher.  Call 'resolve-channel-news-entry-tag' on all the news entries.
* guix/tests/git.scm (populate-git-repository): Add clause for 'tag'.
* tests/channels.scm ("channel-news, one entry"): Create a tag and add
an entry with a tag.  Check that the tag is resolved and also visible in
the <channel-news-entry> record.
* doc/guix.texi (Channels): Mention tags in news entries.
2019-09-23 10:38:44 +02:00
Ludovic Courtès 8ba7fd3cd6
channels: Add support for a news file.
* guix/channels.scm (<channel-metadata>)[news-file]: New field.
(read-channel-metadata): Set the 'news-file' field.
(read-channel-metadata-from-source): Likewise.
(<channel-news>, <channel-news-entry>): New record types.
(sexp->channel-news-entry, read-channel-news)
(channel-news-for-commit): New procedures.
* guix/tests/git.scm (populate-git-repository): For 'add', allow
CONTENTS to be a procedure.
* tests/channels.scm ("channel-news, no news")
("channel-news, one entry"): New tests.
* doc/guix.texi (Channels): Document it.
2019-09-23 10:38:44 +02:00
Ludovic Courtès 873f6f1334
git: Add 'commit-difference'.
* guix/git.scm (commit-closure, commit-difference): New procedures.
* guix/tests/git.scm, tests/git.scm: New files.
* Makefile.am (dist_noinst_DATA): Add guix/tests/git.scm.
(SCM_TESTS): Add tests/git.scm.
2019-09-23 10:38:43 +02:00
Ludovic Courtès a78dcb3d59
git: 'update-cached-checkout' avoids network access when unnecessary.
* guix/git.scm (reference-available?): New procedure.
(update-cached-checkout): Avoid call to 'remote-fetch' when REPOSITORY
already contains REF.
2019-09-23 10:38:43 +02:00
Ludovic Courtès 961b95c985
pull: '--news' shows the list of channels added or removed.
* guix/scripts/pull.scm (display-channel, channel=?)
(display-channel-news, display-news): New procedures.
(process-query): Call 'display-news' instead of 'display-profile-news'.
2019-09-23 10:38:43 +02:00
Ludovic Courtès 660dbe6564
guix package: '--show' ignores deprecated packages.
* guix/scripts/package.scm (process-query) <'show>: Remove superseded
packages.
* tests/guix-package-aliases.sh: Add test.
2019-09-21 16:48:36 +02:00
zimoun aeb51370da
guix package: Add 'guix show' alias.
* guix/scripts/show.scm: New file.
* Makefile.am (MODULES): Add it.
* po/guix/POTFILES.in: Add it.
* tests/guix-package-aliases.sh: Add test.
* doc/guix.texi (Invoking guix package): Document it and use it in a example.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2019-09-21 16:48:36 +02:00
Ludovic Courtès 7150743522
inferior: Propagate '&store-protocol-error' error conditions.
Until now '&store-protocol-error' conditions raised in the inferior
would not be correctly propagated because SRFI-35 records lack a read
syntax.

Reported at <https://bugs.gnu.org/37449>
by Carl Dong <contact@carldong.me>.

* guix/inferior.scm (port->inferior): Import (srfi srfi-34) in the inferior.
(inferior-eval-with-store): Define 'error?' and 'error-message'.  Wrap
call to PROC in 'guard'.  Check the response of INFERIOR for a
'store-protocol-error' or a 'result' tag.
* tests/inferior.scm ("inferior-eval-with-store, &store-protocol-error"):
New test.
2019-09-21 16:48:36 +02:00
Efraim Flashner 3fd738f31b
import/github: Check for more version prefixes.
* guix/import/github.scm (latest-released-version): Allow the
version string to begin with the word 'version'.
2019-09-20 09:02:33 +03:00
zimoun d2cdef6560
ui: 'relevance' connects regexps with a logical and.
Fixes <https://bugs.gnu.org/36763>.
Previously, the logical and connecting the regexps did not output the expected
results (introduced in 8874faaaac).

* guix/ui.scm (relevance)
[score]: Change its arguments.
[regexp->score]: New procedure.
* tests/ui.scm ("package-relevance"): Add test.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2019-09-19 23:24:04 +02:00
Konrad Hinsen da55110712
scripts: pull: Add options for generation management
* guix/scripts/pull.scm (%options) Add --roll-back, --switch-generation,
--delete-generations
(process-generation-change): New function
(guix-pull): Execute generation management operations

* doc/guix.texi: Document the generation management operations

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2019-09-18 23:08:29 +02:00
Ludovic Courtès ee25048e51
pull: Work around Ubuntu's 'sudo'.
Partly fixes <https://bugs.gnu.org/36785>.
Reported by Julien Lepiller <julien@lepiller.eu>.

* guix/scripts/pull.scm (ensure-default-profile): Do not call
'migrate-generations' when "SUDO_USER" is set.
2019-09-18 23:08:29 +02:00
Ludovic Courtès 45fbc15a48
import: pypi: Refresher recognizes pythonhosted.org source URLs.
This is a followup to a537620054.
Since that commit, 'pypi-package?' would return false for most Python
packages, and thus "guix refresh python-xxx" would report that no
updaters apply to the package.

* guix/import/pypi.scm (pypi-package?)[pypi-url?]: Recognize
"files.pythonhosted.org" URLs.
2019-09-18 23:08:29 +02:00
Ludovic Courtès f9c0400392
guix package: "guix package -f FILE" ensures FILE returns a package.
* guix/scripts/package.scm (options->installable): Add clause for
'install option with a non-package object.
* tests/guix-package.sh: Add test.
2019-09-18 23:08:28 +02:00
Efraim Flashner 74e7465c9b
Revert "build-system/r: Use %bioconductor-version."
This reverts commit 41ca406fa5.

This commit breaks 'guix pull', as reported by Hao Chen.
2019-09-16 14:34:15 +03:00
Ricardo Wurmus 41ca406fa5
build-system/r: Use %bioconductor-version.
* guix/build-system/r.scm (bioconductor-uri): Use %bioconductor-version
instead of hard-coding the version string.
2019-09-16 12:26:25 +02:00
Ricardo Wurmus 76c0b60821
import/cran: Export %bioconductor-version.
* guix/import/cran.scm (%bioconductor-version): Export it.
2019-09-16 12:26:25 +02:00
Ludovic Courtès 0074844366
pack: Provide a meaningful "repository name" for Docker.
Previously, images produced by 'guix pack -f docker' would always show
up as "profile" in the output of 'docker images'.  With this change,
'docker images' shows a name constructed from the packages found in the
image--e.g., "bash-coreutils-grep-sed".

* guix/docker.scm (canonicalize-repository-name): New procedure.
(generate-tag): Remove.
(manifest): Add optional 'tag' parameter and honor it.
(repositories): Likewise.
(build-docker-image): Add #:repository parameter and pass it to
'manifest' and 'repositories'.
* guix/scripts/pack.scm (docker-image)[build]: Compute 'tag' and pass it
as #:repository to 'build-docker-image'.
2019-09-16 10:25:31 +02:00
Ludovic Courtès 9bbaf2ae72
pack: Add packages in the order in which they appear on the command line.
* guix/scripts/pack.scm (guix-pack)[manifest-from-args](packages):
Reverse order of packages taken from OPTS.
2019-09-16 10:25:16 +02:00
Ricardo Wurmus 6e377b8893
import/utils: beautify-description: Recognize more fragments.
* guix/import/utils.scm (beautify-description): Handle additional common
initial sentence fragments in descriptions.
2019-09-14 00:37:47 +02:00
Efraim Flashner 3af85f832d
build-system/cargo: Remove unused function.
* guix/build/cargo-build-system.scm (touch): Remove it.
2019-09-13 15:20:27 +03:00
Efraim Flashner 43ffa11fdc
build-system/cargo: Use 'strip-store-file-name'.
This is a follow-up to f58b2f38e4.

* guix/build/cargo-build-system.scm (configure): Use bespoke
'strip-store-file-name' function.
2019-09-13 15:20:16 +03:00
Ludovic Courtès 5ccec77176
file-systems: Add /var/run/nscd to '%network-file-mappings'.
This allows containers created by "guix environment -CN" or by
"guix system container -N" to talk to the host nscd.

* gnu/system/file-systems.scm (%network-file-mappings): Add
"/var/run/nscd".
* gnu/build/shepherd.scm (default-mounts)[nscd-socket]: Remove.
* gnu/system/linux-container.scm (container-script)[nscd-run-directory]
[nscd-mapping, nscd-os, nscd-specs]: Remove.
[script]: Filter out from SPECS bind-mounts where the device does not
exist.
* guix/scripts/environment.scm (launch-environment/container)
[optional-mapping->fs]: New procedure.
[mappings]: Remove %NETWORK-FILE-MAPPINGS.
[file-systems]: Add %NETWORK-FILE-MAPPINGS here, filtered through
'optional-mapping->fs'.
2019-09-12 23:07:42 +02:00
Efraim Flashner f58b2f38e4
build: cargo-build-system: Strip store hash from vendor-dir.
* guix/build/cargo-build-system.scm (configure): When copying the
sources into the vendor-dir strip off the hash before the package name.
2019-09-12 20:22:46 +03:00
Hartmut Goebel 4eb69bf0d3
import: KDE updater finds packages even in sub-directory.
Fixes <http://issues.guix.gnu.org/issue/30345> and
finally fixes <http://issues.guix.gnu.org/issue/25020>.

Formerly packages living in a path like
/stable/frameworks/5.60/portingAids/kross-5.60.0.tar.xz
have not been found.

* guix/import/kde.scm (uri->kde-path-pattern): New procedure.
  (latest-kde-release): Use pattern to search for file.
2019-09-10 19:04:06 +02:00
Hartmut Goebel d1dce0c363
upstream: Move KDE updater into a separate module.
As it was done for (guix import gnome).

* guix/import/kde.scm: New file.
* Makefile.am (MODULES): Add it.
* guix/gnu-maintenance.scm (%kde-updater) (%kde-file-list-uri)
  (download.kde.org-files) (latest-kde-release): Remove.
2019-09-10 19:04:06 +02:00
Hartmut Goebel 33f53947aa
gnu-maintenance: KDE updater no longer relies on FTP access.
Fetch the ls-lR.bz2 file list for download.kde.org, convert it into a list of
file paths and cache the list.

* guix/gnu-maintenance.scm (%kde-file-list-uri): New variable.
  (download.kde.org-files): New procedure.
  (latest-kde-release): Change to use DOWNLOAD.KDE.ORG-FILES and search
  for files in this list.
2019-09-10 19:04:06 +02:00
Hartmut Goebel da1027a705
guix: Rename and move sans-extension to tarball-sans-extension.
* guix/gnu-maintenance.scm (sans-extension): Move and rename to ...
* guix/utils.scm (tarball-sans-extension): ... here.
2019-09-10 19:04:05 +02:00
Martin Becze fd63ecbe05
import: crate: Allow imports of a specific version.
* guix/import/crate.scm (crate->guix-package): Add optional 'version'
argument and honor it.
* guix/scripts/import/crate.scm (guix-import-crate): Assume the first
argument is a spec and destructure it with
'package-name->name+version'.  Pass both to 'crate->guix-package'.
* doc/guix.texi (Invoking guix import): Document it.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2019-09-10 00:34:40 +02:00
Ludovic Courtès 7c101c4c17
refresh: Distinguish between "no updater" and "failing updater".
Previously, something like "guix refresh texmacs" would report "no
updater".  Now, it reports that the 'gnu-ftp' updater failed to list
releases.

* guix/upstream.scm (lookup-updater): Use 'find' instead of 'any' to
return the <upstream-updater>.
(package-latest-release): Adjust accordingly.
* guix/scripts/refresh.scm (check-for-package-update): When
'package-latest-release' returns #f, distinguish between "no updater"
and "failing updater".
2019-09-10 00:34:40 +02:00
Ludovic Courtès 36eef80d45
packages: 'package-field-location' really catches 'system-error.
This had been wrong since forever (i.e., 2013).

* guix/packages.scm (package-field-location): Catch 'system-error, not
'system.
2019-09-10 00:34:40 +02:00
Ludovic Courtès 982a94e97e
import: github: Fix incorrect no-release case.
This is a followup to 81c3dc3224.

Since that commit, when /releases returned an empty JSON array, we would
not fall back to /tags because of the incorrect match.

* guix/import/github.scm (fetch-releases-or-tags): Match the empty
vector instead of the empty list.
2019-09-08 14:43:41 +02:00
Ludovic Courtès 2e3e5d2198
daemon: Invoke 'guix gc --list-busy' instead of 'list-runtime-roots'.
* nix/scripts/list-runtime-roots.in: Remove.
* guix/store/roots.scm (%proc-directory): New variable.
(proc-file-roots, proc-exe-roots, proc-cwd-roots)
(proc-fd-roots, proc-maps-roots, proc-environ-roots)
(referenced-files, canonicalize-store-item, busy-store-items): New
procedures, taken from 'list-runtime-roots.in'.
* nix/libstore/globals.hh (Settings)[guixProgram]: New field.
* nix/libstore/globals.cc (Settings::processEnvironment): Initialize
'guixProgram'.
* nix/libstore/gc.cc (addAdditionalRoots): Drop code related to
'NIX_ROOT_FINDER'.  Run "guix gc --list-busy".
* nix/local.mk (nodist_pkglibexec_SCRIPTS): Remove
'scripts/list-runtime-roots'.
* config-daemon.ac: Don't output nix/scripts/list-runtime-roots.
* build-aux/pre-inst-env.in: Don't set 'NIX_ROOT_FINDER'.
Set 'GUIX'.
* doc/guix.texi (Invoking guix gc): Document '--list-busy'.
* guix/scripts/gc.scm (show-help, %options): Add "--list-busy".
(guix-gc)[list-busy]: New procedure.
Handle the 'list-busy' action.
2019-09-08 11:49:24 +02:00
Ludovic Courtès 67c2db17bc
download: Pass 'http_proxy' et al. to git, hg, etc.
This allows 'git-fetch' etc. origins to honor the proxy and locale of
the daemon.

* guix/bzr-download.scm (bzr-fetch): Pass #:leaked-env-vars to
'gexp->derivation'.
* guix/cvs-download.scm (cvs-fetch): Likewise.
* guix/git-download.scm (git-fetch): Likewise.
* guix/hg-download.scm (hg-fetch): Likewise.
* guix/svn-download.scm (svn-multi-fetch): Likewise.
2019-09-05 18:33:30 +02:00
Pierre Neidhardt 01e38cc426
build-system/asdf: Add option to compress programs.
* guix/build/lisp-utils.scm (build-program): Add `compress?' key argument.
(generate-executable-for-system): Same.
(generate-executable): Same.
2019-09-05 09:56:21 +02:00
Marius Bakke 56b1977a5d
build-system/julia: Avoid module cycles.
* guix/build-system/julia.scm: Remove unused imports.
(lower)[julia]: Default to (DEFAULT-JULIA).
2019-09-05 00:20:41 +02:00
Ricardo Wurmus 458b07ebe0
build-system/julia: Fix syntax error.
* guix/build-system/julia.scm: Fix invalid module reference.
2019-09-04 23:56:24 +02:00
Julien Lepiller b2f810fe93
import: opam: Use propagated-inputs instead of inputs.
* guix/import/opam.scm (opam->guix-package): Use propagated-inputs instead of inputs.
2019-09-04 23:08:16 +02:00
Julien Lepiller d3366a8ee8
import: opam: Remove initial "v" in some version numbers.
* guix/import/opam.scm (opam-fetch): Remove initial "v" in some version numbers.
2019-09-04 23:07:55 +02:00
nixo a44a535ebe
build: Add julia-build-system.
* guix/build/julia-build-system.scm: New file.
* guix/build-system/julia.scm: New file.
* Makefile.am (MODULES): Add them.
* doc/guix.texi (Build Systems): Document julia-build-system.

Signed-off-by: Julien Lepiller <julien@lepiller.eu>
2019-09-04 22:17:38 +02:00
Ludovic Courtès 191668bc97
import: crate: Correct interpretation of dual-licensing strings.
* guix/import/crate.scm (%dual-license-rx): New variable.
(crate->guix-package)[string->license]: Rewrite to match it.
* tests/crate.scm (test-crate): Adjust "license" field to current
practice.
2019-09-04 13:02:27 +02:00
Ludovic Courtès 2791870d09
import: crate: Separate crates.io API from actual conversion.
This provides a clean separation between bindings to the
https://crates.io/api/v1 API and actual conversion to Guix package
sexps.

As a side-effect, it fixes things like "guix import blake2-rfc", "guix
refresh -t crates", etc.

* guix/import/crate.scm (<crate>, <crate-version>, <crate-dependency>):
New record types.
(lookup-crate, crate-version-dependencies): New procedures.
(crate-fetch): Remove.
(crate->guix-package): Rewrite to use the new API.
(latest-release): Likewise.
* guix/build-system/cargo.scm (%crate-base-url): New variable.
* tests/crate.scm (test-crate): Update accordingly.

fixlet
2019-09-04 13:02:27 +02:00
Ludovic Courtès a85a74ce6c
ci: Use (guix json) and adjust for Guile-JSON 3.x.
This is in part a followup to 81c3dc3224.

* guix/ci.scm (<build>, <checkout>, <evaluation>): Define using
'define-json-mapping'.
(json->build, json->checkout, json->evaluation): Remove.
(queued-builds, latest-builds, latest-evaluations): Pass JSON arrays
through 'vector->list' to adjust for Guile-JSON 3.x.
(evaluations-for-commit): Fix typo to really export.
2019-09-04 13:02:27 +02:00
Ludovic Courtès 76073d29e1
Add (guix json).
* guix/swh.scm (define-json-reader, define-json-mapping): Move to...
* guix/json.scm: ... here.  New file.
* Makefile.am (MODULES): Add it.
2019-09-04 13:02:27 +02:00
Ludovic Courtès 91300526b7
deploy: Add missing store options.
* guix/scripts/deploy.scm (%default-options): Add missing options such
as 'print-build-trace?', etc.
2019-09-04 13:02:27 +02:00
Ludovic Courtès 55549c7b9b
lint: Add 'archival' checker.
* guix/lint.scm (check-archival): New procedure.
(%network-dependent-checkers): Add 'archival' checker.
* tests/lint.scm ("archival: missing content")
("archival: content available")
("archival: missing revision")
("archival: revision available")
("archival: rate limit reached"): New tests.
* doc/guix.texi (Invoking guix lint): Document it.
2019-09-02 15:25:01 +02:00