Commit Graph

4307 Commits (b908fcd8c02c26b1e6cdc636b63306a01a21b994)

Author SHA1 Message Date
Ludovic Courtès b908fcd8c0
pack: '-R' honors the requested output.
Fixes <https://bugs.gnu.org/36925>.
Reported by Jesse Gibbons <jgibbons2357@gmail.com>.

* guix/scripts/pack.scm (wrapped-package): Add 'output*' parameter.
[build]: Define 'input' and 'target'; use them instead of #$package and
 #$output, respectively.
(wrapped-manifest-entry): New procedure.
(map-manifest-entries): Call PROC directly.
(guix-pack): Pass WRAPPED-MANIFEST-ENTRY to 'map-manifest-entries'.
2019-08-23 18:41:49 +02:00
Mark H Weaver 888e477bf8
Revert "import: utils: Add hash-ref*."
This reverts commit 8a3b11d1eb.
2019-08-22 14:24:37 -04:00
Mark H Weaver d020821c0b
Revert "import: cpan: Adapt for the change to guile-json version 3."
This reverts commit 01ce7af25a.
2019-08-22 14:24:11 -04:00
Christopher Baines 01ce7af25a
import: cpan: Adapt for the change to guile-json version 3.
In guile-json version 3, JSON objects are represented as hash tables, rather
than alists.

* guix/import/cpan.scm (string->license): Change the match expression to match
on lists, rather than vectors.
(module->dist-name, cpan-source-url, cpan-version): Change assoc-ref to
hash-ref.
(cpan-module->sexp): Change assoc-ref to hash-ref, and assoc-ref* to
hash-ref*.
* tests/cpan.scm ("source-url-http", "source-url-https"): Convert the alist to
a hash table.
2019-08-21 18:29:30 +01:00
Christopher Baines 8a3b11d1eb
import: utils: Add hash-ref*.
With the change to guile-json version 3, JSON objects are represented as hash
tables, rather than alists. The cpan importer uses assoc-ref* on a hash table,
so add an equivalent function for hash tables.

* guix/import/utils.scm (hash-ref*): New procedure.
2019-08-21 18:29:27 +01:00
Ludovic Courtès 0ea009db9d
upstream: Gracefully handle archive type changes.
Previously, if the currently used archive type (e.g., "bz2") was
unavailable for the new version, 'guix refresh -u' would crash instead
of updating to the archive with the new type.

* guix/upstream.scm (package-update/url-fetch): When URL is #f, pick the
first of URLS; likewise for SIGNATURE-URL.
2019-08-17 23:18:11 +02:00
Ludovic Courtès 4496ea74aa
refresh: Use the standard diagnostic procedures.
* guix/scripts/refresh.scm (warn-no-updater): Use 'warning' instead of
'format'.
(update-package): Use 'info' and 'warning' instead of 'format'.
2019-08-17 23:18:11 +02:00
Ludovic Courtès 8d64ef567f
import: gnome: Update for Guile-JSON 3.x.
This is a followup to 81c3dc3224.

* guix/import/gnome.scm (jsonish->upstream-source): Use 'assoc-ref'
instead of 'hash-ref'.
(latest-gnome-release): Match a vector containing an alist, not a hash
table.  Use 'fold' instead of 'hash-fold' over RELEASES.
2019-08-17 23:18:11 +02:00
Ludovic Courtès 23ab21fa9d
derivations: Fix typo in docstring.
* guix/derivations.scm (derivation-build-plan): Fix typo in the
docstring.
2019-08-17 19:26:10 +02:00
Ludovic Courtès 268896444b
derivations: Delete duplicate inputs when computing derivation hash.
Fixes <https://bugs.gnu.org/36777>.
Reported by Carl Dong <contact@carldong.me>.

* guix/derivations.scm (derivation/masked-inputs): Call
'delete-duplicates' on INPUTS.
* tests/derivations.scm ("derivation with duplicate fixed-output inputs"):
New test.
2019-08-16 23:00:26 +02:00
Ludovic Courtès a7c714d398
channels: Add 'profile-channels'.
* guix/channels.scm (profile-channels): New procedure.
* guix/scripts/describe.scm (display-profile-info)[channels]: Define in
terms of 'profile-channels'.
2019-08-16 23:00:26 +02:00
Ricardo Wurmus 5063deab08
import: cran: Support experiment and annotation packages.
* guix/import/cran.scm (%bioconductor-packages-list-url): Replace variable...
(bioconductor-packages-list-url): ...with this procedure.
(bioconductor-packages-list): Accept optional TYPE argument.
(latest-bioconductor-package-version): Same.
(fetch-description): Determine package type and use it in calls to
LATEST-BIOCONDUCTOR-PACKAGE-VERSION and BIOCONDUCTOR-URI.
(description->package): Pass package type to URI helper procedure; include
package type in annotation or experiment packages from Bioconducter.
2019-08-16 15:07:22 +02:00
Ricardo Wurmus c586f427b4
build-system/r: bioconductor-uri: Take optional package type.
* guix/build-system/r.scm (bioconductor-uri): Take optional TYPE argument to
return annotation or experiment URLs.
2019-08-16 15:07:22 +02:00
Jakob L. Kreuze 4cc5e5204b
machine: Use 'become-command'.
* gnu/machine/ssh.scm (managed-host-remote-eval): Pass an appropriate
'become-command' to 'remote-eval'.
* guix/ssh.scm (remote-authorize-signing-key): Add optional
'become-command' argument.
All callers changed.
2019-08-16 08:47:28 -04:00
Jakob L. Kreuze ddef146b89
remote: Resolve missing 'G_'.
* guix/remote.scm: Require (guix i18n).
2019-08-16 08:45:44 -04:00
Jakob L. Kreuze 5f32531770
remote: Use (%daemon-socket-uri) rather than hard-coded path.
* guix/remote.scm (remote-eval): Use (%daemon-socket-uri) as the default
value of 'socket-name' rather than hard-coded path.
2019-08-15 07:43:21 -04:00
Jakob L. Kreuze 3033d59ac9
machine: Automatically authorize the coordinator's signing key.
* guix/ssh.scm (remote-authorize-signing-key): New variable.
* gnu/machine/ssh.scm (deploy-managed-host): Authorize coordinator's
signing key before any invocations of 'remote-eval'.
(deploy-managed-host): Display an error if a signing key does not exist.
* doc/guix.texi (Invoking guix deploy): Remove section describing manual
signing key authorization.
(Invoking guix deploy): Add section describing the 'authorize?' field.
2019-08-15 07:43:13 -04:00
Jakob L. Kreuze 9c70c460a0
machine: Implement 'roll-back-machine'.
* gnu/machine.scm (roll-back-machine, &deploy-error, deploy-error?)
(deploy-error-should-roll-back)
(deploy-error-captured-args): New variable.
* gnu/machine/ssh.scm (roll-back-managed-host): New variable.
* guix/scripts/deploy.scm (guix-deploy): Roll-back systems when a
deployment fails.
2019-08-15 07:43:09 -04:00
Jakob L. Kreuze 5ea7537b9a
machine: Allow non-root users to deploy.
* doc/guix.texi (Invoking guix deploy): Add section describing
prerequisites for deploying as a non-root user.
* guix/remote.scm (remote-pipe-for-gexp): New optional 'become-command'
argument.
(%remote-eval): New optional 'become-command' argument.
(remote-eval): New 'become-command' keyword argument.
* guix/ssh.scm (remote-inferior): New optional 'become-command'
argument.
(inferior-remote-eval): New optional 'become-command' argument.
(remote-authorize-signing-key): New optional 'become-command' argument.
* gnu/machine/ssh.scm (machine-become-command): New variable.
(managed-host-remote-eval): Invoke 'remote-eval' with the
'#:become-command' keyword.
(deploy-managed-host): Invoke 'remote-authorize-signing-key' with the
'#:become-command' keyword.
2019-08-15 07:43:03 -04:00
Jakob L. Kreuze 03cbd94d48
remote: Remove '--system' argument.
* gnu/services.scm (activation-script): Return a <program-file> rather
than a <scheme-file>.
* gnu/deploy.scm (guix-deploy): Remove handling for '--system'.
(show-help): Remove documentation for '--system'.
(%default-options): Remove default setting for 'system'.
2019-08-14 15:38:13 -04:00
Jakob L. Kreuze 2c8e04f136
remote: Build derivations appropriate for the remote's
* gnu/machine/ssh.scm (machine-ssh-configuration): Add 'system' field.
(managed-host-remote-eval): Pass 'system' field to 'remote-eval'.
(machine-check-building-for-appropriate-system): New variable.
(check-deployment-sanity): Add call to
'machine-check-building-for-appropriate-system'.
* doc/guix.texi (Invoking guix deploy): Describe new 'system' field.
* guix/ssh.scm (remote-system): New variable.
* guix/remote.scm (remote-eval): Use result of 'remote-system' when
lowering the G-Expression.
(remote-eval): Add 'system' keyword argument.
(trampoline): Return a <program-file> rather than a <scheme-file>.
2019-08-14 15:38:09 -04:00
Marius Bakke 36f400f616
Merge branch 'master' into staging 2019-08-08 18:14:45 +02:00
Robert Vollmert e07f765558
import: hackage: Update list of ghc-included packages.
It turns out the list in the release notes is incomplete.
This updates the list from /gnu/store/<hash>-ghc-8.4.3/lib/ghc-8.4.3.

* guix/import/hackage.scm (ghc-standard-libraries): Update list.
2019-08-07 22:05:29 -04:00
Marius Bakke 8e7f97b9ff
Merge branch 'master' into staging 2019-08-08 00:35:37 +02:00
Ricardo Wurmus 9bd1333e58
Merge remote-tracking branch 'origin/master' into wip-texlive 2019-08-07 22:26:55 +02:00
Jakob L. Kreuze 55e238f2ab
deploy: Use all machine modules when loading deployment
* guix/scripts/deploy.scm (load-source-file): Enumerate and include all
submodules of (gnu machine) when loading the provided deployment
specification.
2019-08-07 16:05:58 -04:00
Jakob L. Kreuze 5f04e9f962
reconfigure: Fix GC root installation.
Fixes <https://bugs.gnu.org/36942>.
Reported by ison <ison@airmail.cc>.

guix/scripts/system/reconfigure.scm (install-bootloader-program): Switch
new symlink to the canonical bootloader configuration file.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2019-08-06 22:21:13 +02:00
Ricardo Wurmus 378d94e51b
Merge remote-tracking branch 'origin/master' into wip-texlive 2019-08-06 10:07:36 +02:00
Marius Bakke f35d313265
Merge branch 'master' into staging 2019-08-04 13:41:27 +02:00
Efraim Flashner ac6b78488f
build/cargo-build-system: Patch cargo checksums.
* guix/build/cargo-build-system.scm (generate-all-checksums): New
procedure.
(update-cargo-lock, patch-cargo-checksums): New phases.
(%standard-phases): Add 'update=cargo-lock after 'configure and
'patch-cargo-checksums after 'patch-generated-file-shebangs.
* doc/guix.texi (Build System)[cargo-build-system]: Mention how
Cargo.lock files are handled.
2019-08-04 11:53:27 +03:00
Jakob L. Kreuze 1db6f137d9
reconfigure: Reload all shepherd files when upgrading services.
Fixes <https://bugs.gnu.org/36878>.
Reported by Robert Vollmert <rob@vllmrt.net>.

* guix/scripts/system/reconfigure.scm (upgrade-shepherd-services): Load
all service files, rather than just those of services to be started.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2019-08-02 11:20:51 +02:00
Leo Famulari 0c3c597d2e
gnu: Update default Go compiler to Go 1.12.
* gnu/packages/golang.scm (go): Update to go-1.12.
* guix/build/go-build-system.scm (setup-go-environment): Set $GOCACHE.
2019-07-29 14:57:07 -04:00
Ludovic Courtès 2e8cabb8d6
gexp: 'program-file' honors the current system and cross-compilation target.
Fixes <https://bugs.gnu.org/36813>.
Reported by Jakob L. Kreuze <zerodaysfordays.sdf.org@sdf.org>.

* guix/gexp.scm (program-file-compiler): Pass #:system and #:target to
'gexp->script'.
(load-path-expression): Add #:system and #:target and honor them.
(gexp->script): Likewise.
* tests/gexp.scm ("program-file #:system"): New test.
* doc/guix.texi (G-Expressions): Adjust accordingly.
2019-07-26 23:50:12 +02:00
Ludovic Courtès 2cc5ec7f0d
gexp: 'compiled-modules' can cross-compile.
* guix/gexp.scm (compiled-modules): Add #:target and honor it.
2019-07-26 23:47:43 +02:00
Ludovic Courtès 548e0af4da
discovery: 'scheme-files' ignores hidden files.
* guix/discovery.scm (scheme-files)[dot-prefixed?]: New procedure.
Use it to exclude any file starting with ".".
2019-07-26 21:49:25 +02:00
Jakob L. Kreuze 5c8c8c4554
guix system: Reimplement 'reconfigure'.
* guix/scripts/system.scm (switch-to-system)
(upgrade-shepherd-services, install-bootloader): Delete variable.
(local-eval): New variable.
(install): Remove 'bootloader-installer' and 'bootcfg-file' parameters.
(install): Add 'bootloader' parameter.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2019-07-26 19:19:49 +02:00
Jakob L. Kreuze 5c793753b3
guix system: Add 'reconfigure' module.
* guix/scripts/system/reconfigure.scm: New file.
* Makefile.am (MODULES): Add it.
* guix/scripts/system.scm (bootloader-installer-script): Export variable.
* gnu/machine/ssh.scm (switch-to-system, upgrade-shepherd-services)
(install-bootloader): Delete variable.
* gnu/machine/ssh.scm (deploy-managed-host): Rewrite procedure.
* gnu/services/herd.scm (live-service): Export variable.
* gnu/services/herd.scm (live-service-canonical-name): New variable.
* tests/services.scm (live-service): Delete variable.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2019-07-26 19:19:49 +02:00
Ludovic Courtès 4d04bc50d2
guix build: '--with-commit' recognizes "v[0-9]" tags.
* guix/scripts/build.scm (transform-package-source-commit)[replace]:
Special case COMMIT that starts with "v[0-9]".
2019-07-26 11:21:36 +02:00
Ludovic Courtès 10a8c2bbc6
git: 'switch-to-ref' resolves tag targets.
* guix/git.scm (switch-to-ref): In the 'tag' case, resolve the target of
the tag.
* tests/guix-build-branch.sh: Adjust test accordingly.
2019-07-26 11:21:36 +02:00
Ludovic Courtès 177fecb57c
git: <git-checkout> allows tags in its 'commit' field.
Fixes <https://bugs.gnu.org/36371>.
Reported by Tobias Geerinckx-Rice <me@tobias.gr>.

* guix/git.scm (git-checkout-compiler): Pass 'tag-or-commit' to
'latest-repository-commit*'.
* doc/guix.texi (Package Transformation Options): Update '--with-commit'
documentation accordingly.
* tests/guix-build-branch.sh: Add test.
2019-07-26 11:21:36 +02:00
Ludovic Courtès c4c2449fea
git: 'update-cached-checkout' supports a 'tag-or-commit' type of ref.
* guix/git.scm (switch-to-ref)[obj]: Wrap in 'resolve' lambda.  Add
'tag-or-commit' case.
(update-cached-checkout): Document it.
2019-07-26 11:21:36 +02:00
Hartmut Goebel cbad3570db
guix: ant-build-system: Put dummy project-name into default build.xml.
Without this, ant reported error messages like
Target "tests" does not exist in the project "null".
Simple using the jar-name is a good compromise.

* guix/build/ant-build-system.scm (default-build.xml): Add attribute
  to sxml expression.
2019-07-25 10:21:45 +02:00
Hartmut Goebel a331623931
guix: ant-build-system: Use ant-task "jar" instead of executing "jar".
* guix/build/ant-build-system.scm (default-build.xml): Change XML for
  target "jar" to use ant-task "jar" instead of "exec".
2019-07-25 10:21:44 +02:00
Ludovic Courtès 81c3dc3224
maint: Switch to Guile-JSON 3.x.
Guile-JSON 3.x is incompatible with Guile-JSON 1.x, which we relied on
until now: it maps JSON dictionaries to alists (instead of hash tables),
and JSON arrays to vectors (instead of lists).  This commit is about
adjusting all the existing code to this new mapping.

* m4/guix.m4 (GUIX_CHECK_GUILE_JSON): New macro.
* configure.ac: Use it.
* doc/guix.texi (Requirements): Mention the Guile-JSON version.
* guix/git-download.scm (git-fetch)[guile-json]: Use GUILE-JSON-3.
* guix/import/cpan.scm (string->license): Expect vectors instead of
lists.
(module->dist-name): Use 'json-fetch' instead of 'json-fetch-alist'.
(cpan-fetch): Likewise.
* guix/import/crate.scm (crate-fetch): Likewise, and call 'vector->list'
for DEPS.
* guix/import/gem.scm (rubygems-fetch): Likewise.
* guix/import/json.scm (json-fetch-alist): Remove.
* guix/import/pypi.scm (pypi-fetch): Use 'json-fetch' instead of
'json-fetch-alist'.
(latest-source-release, latest-wheel-release): Call 'vector->list' on
RELEASES.
* guix/import/stackage.scm (stackage-lts-info-fetch): Use 'json-fetch'
instead of 'json-fetch-alist'.
(lts-package-version): Use 'vector->list'.
* guix/import/utils.scm (hash-table->alist): Remove.
(alist->package): Pass 'vector->list' on the inputs fields, and default
to the empty vector.
* guix/scripts/import/json.scm (guix-import-json): Remove call to
'hash-table->alist'.
* guix/swh.scm (define-json-reader): Expect pair? or null? instead of
hash-table?.
[extract-field]: Use 'assoc-ref' instead of 'hash-ref'.
(json->branches): Use 'map' instead of 'hash-map->list'.
(json->checksums): Likewise.
(json->directory-entries, origin-visits): Call 'vector->list' on the
result of 'json->scm'.
* tests/import-utils.scm ("alist->package with dependencies"): New test.
* gnu/installer.scm (build-compiled-file)[builder]: Use GUILE-JSON-3.
* gnu/installer.scm (installer-program)[installer-builder]: Likewise.
* gnu/installer/locale.scm (iso639->iso639-languages): Use 'assoc-ref'
instead of 'hash-ref', and pass vectors through 'vector->list'.
(iso3166->iso3166-territories): Likewise.
* gnu/system/vm.scm (system-docker-image)[build]: Use GUILE-JSON-3.
* guix/docker.scm (manifest, config): Adjust for Guile-JSON 3.
* guix/scripts/pack.scm (docker-image)[build]: Use GUILE-JSON-3.
* guix/import/github.scm (fetch-releases-or-tags): Update docstring.
(latest-released-version): Use 'assoc-ref' instead of 'hash-ref'.  Pass
the result of 'fetch-releases-or-tags' to 'vector->list'.
* guix/import/launchpad.scm (latest-released-version): Likewise.
2019-07-25 00:16:41 +02:00
宋文武 3c618b9894
deploy: Handle the '--system' command line option.
* guix/scripts/deploy.scm (show-help): Add help for '--system'.
(%options): Add '-s' and '--system'.
(guix-deploy): Parameterize %current-system.
2019-07-24 20:34:01 +08:00
宋文武 2fa23d8f5c
deploy: Honor '--no-grafts'.
* guix/scripts/deploy.scm (guix-deploy): Parameterize '%graft?'.
2019-07-24 20:34:01 +08:00
Ricardo Wurmus 2541379ee4
build-system/texlive: Add texlive-origin.
* guix/build-system/texlive.scm (texlive-origin): New procedure.
2019-07-23 21:43:24 +02:00
Ricardo Wurmus f97c9e4cfb
guix: Add svn-multi-reference.
* guix/svn-download.scm (<svn-multi-reference>): New record type.
(svn-multi-reference-url, svn-multi-reference-revision,
svn-multi-reference-locations, svn-multi-reference-user-name,
svn-multi-reference-password, svn-multi-fetch): New procedures.
2019-07-23 21:43:24 +02:00
Ricardo Wurmus 6d668a16be
build: svn-fetch: Use "svn export".
* guix/build/svn.scm (svn-fetch): Use "svn export" instead of "svn checkout"
because it does not include the .svn directory and allows us to fetch single
files.
2019-07-23 21:43:24 +02:00
Ludovic Courtès cd9f56ff5a
pack: Pass a list as the entry point for 'build-docker-image'.
* guix/scripts/pack.scm (docker-image)[build]: Pass a list as
 #:entry-point, not a string.
2019-07-22 11:53:40 +02:00