Commit Graph

5117 Commits

Author SHA1 Message Date
Ludovic Courtès
053b10c3ef
channels: Add mechanism to patch checkouts of the 'guix channel.
* guix/channels.scm (<patch>): New record type.
(apply-patches): New procedure.
(latest-channel-instance)[dot-git?]: New procedure.
Use 'update-cached-checkout' and 'add-to-store' instead of
'latest-repository-commit'.  Call 'apply-patches' when CHANNEL is the
'guix channel.
(%patches): New variable.
* guix/git.scm (url+commit->name): Make public.
* tests/channels.scm ("latest-channel-instances includes channel dependencies")
("latest-channel-instances excludes duplicate channel dependencies"):
Mock 'update-cached-checkout' instead of 'latest-repository-commit'.
Wrap body in 'with-store' and pass the store to 'latest-channel-instances'.
2020-05-07 10:06:15 +02:00
Ludovic Courtès
4ba425060a
channels: Add 'latest-channel-instance'.
* guix/channels.scm (latest-channel-instance): New procedure.
(latest-channel-instances): Use it.
2020-05-07 10:06:15 +02:00
Jan (janneke) Nieuwenhuizen
598be42dfa
syscalls: Add ioctl flags for the Hurd.
Use

    #include <stdio.h>
    #include <net/if.h>
    #include <hurd/ioctl.h>

    int
    main ()
    {
      printf ("SIOCSIFFLAGS #x%x\n", SIOCSIFFLAGS);
      printf ("SIOCGIFADDR #x%x\n", SIOCGIFADDR);
      printf ("SIOCSIFADDR #x%x\n", SIOCSIFADDR);
      printf ("SIOCGIFNETMASK #x%x\n", SIOCGIFNETMASK);
      printf ("SIOCSIFNETMASK #x%x\n", SIOCSIFNETMASK);
    #if 0
      printf ("SIOCADDRT #x%x\n", SIOCADDRT);
      printf ("SIOCDELRT #x%x\n", SIOCDELRT);
    #endif
    }

to fill in some blanks.  Adding and removing route apparently not supported.

* guix/build/syscalls.scm (SIOCSIFFLAGS SIOCGIFADDR, SIOCSIFADDR,
SIOCGIFNETMASK, SIOCSIFNETMASK):
2020-05-07 07:11:03 +02:00
Marius Bakke
c263cfdcde
Merge branch 'master' into core-updates 2020-05-06 23:37:40 +02:00
Ludovic Courtès
86f5decd20
syscalls: 'define-c-struct' supports cross-compilation.
Reported by Jan (janneke) Nieuwenhuizen <janneke@gnu.org>.

Before that, we'd always use the 'sizeof' and 'alignof' value obtained
from the host at macro-expansion time.

* guix/build/syscalls.scm (sizeof*, alignof*): When the target word size
differs from the host word size, emit a call to 'sizeof'/'alignof'.
2020-05-05 23:45:56 +02:00
Marius Bakke
87a40d7203
Merge branch 'master' into core-updates 2020-05-05 20:43:21 +02:00
Mathieu Othacehe
f19cf27c2b
image: Add a new API.
Raw disk-images and ISO9660 images are created in a Qemu virtual machine. This
is quite fragile, very slow, and almost unusable without KVM.

For all these reasons, add support for host image generation. This implies the
use new image generation mechanisms.

- Raw disk images: images of partitions are created using tools such as mke2fs
  and mkdosfs depending on the partition file-system type. The partition
  images are then assembled into a final image using genimage.

- ISO9660 images: the ISO root directory is populated within the store. GNU
  xorriso is then called on that directory, in the exact same way as this is
  done in (gnu build vm) module.

Those mechanisms are built upon the new (gnu image) module.

* gnu/image.scm: New file.
* gnu/system/image.scm: New file.
* gnu/build/image: New file.
* gnu/local.mk: Add them.
* gnu/system/vm.scm (system-disk-image): Rename to system-disk-image-in-vm.
* gnu/ci.scm (qemu-jobs): Adapt to new API.
* gnu/tests/install.scm (run-install): Ditto.
* guix/scripts/system.scm (system-derivation-for-action): Ditto.
2020-05-05 16:13:53 +02:00
Mathieu Othacehe
fd1351ab0a
build: store-copy: Export file-size procedure.
* guix/build/store-copy.scm (file-size): Export it.
2020-05-05 16:08:32 +02:00
Ludovic Courtès
06735a57a9
openpgp: Add missing type predicate for '&openpgp-invalid-signature-error'.
Reported by brendyyn on #guix.  The mistake led to a macro expansion
error on Guile 2.2 but not on 3.0.2.

* guix/openpgp.scm (&openpgp-invalid-signature-error): Add missing type
predicate.
2020-05-04 10:51:39 +02:00
Ludovic Courtès
05d973eef2
openpgp: Raise error conditions instead of calling 'error'.
* guix/openpgp.scm (&openpgp-error, &openpgp-unrecognized-packet-error)
(&openpgp-invalid-signature-error): New error conditions.
(openpgp-hash-algorithm): Add 'signature-port' parameter.  Raise an
error condition instead of calling 'error'.
(parse-subpackets): Likewise.
(get-data): Raise instead of calling 'error'.
(get-openpgp-detached-signature/ascii): Likewise.
(get-signature): Likewise.
2020-05-04 09:56:13 +02:00
Ludovic Courtès
b835e158d5
openpgp: Add 'string->openpgp-packet'.
* guix/openpgp.scm (string->openpgp-packet): New procedure.
* tests/openpgp.scm ("verify-openpgp-signature, missing key")
("verify-openpgp-signature, good signatures")
("verify-openpgp-signature, bad signature"): Use it.
2020-05-04 09:56:13 +02:00
Ludovic Courtès
bd8126558d
openpgp: 'lookup-key-by-{id,fingerprint}' return the key first.
Previously, 'lookup-key-by-{id,fingerprint}' would always return the
list of packets where the primary key is first.  Thus, the caller would
need to use 'find' to actually find the requested key.

* guix/openpgp.scm (keyring-insert): Always add KEY to PACKETS.
(lookup-key-by-id, lookup-key-by-fingerprint): Change to return the key
as the first value.
(verify-openpgp-signature): Remove now unneeded call to 'find'.
* tests/openpgp.scm ("get-openpgp-keyring"): Adjust accordingly.
2020-05-04 09:56:13 +02:00
Ludovic Courtès
b45fa0a123
openpgp: 'verify-openpgp-signature' looks up by fingerprint when possible.
* guix/openpgp.scm (verify-openpgp-signature): Use
'lookup-key-by-fingerprint' when SIG contains a fingerprint.
Honor FINGERPRINT in the 'find' predicate.  Upon missing-key, return
FINGERPRINT if available.
* tests/openpgp.scm ("verify-openpgp-signature, missing key"): Adjust
expected value accordingly.
2020-05-04 09:56:12 +02:00
Ludovic Courtès
efe1f0122c
openpgp: Add 'lookup-key-by-fingerprint'.
* guix/openpgp.scm (<openpgp-keyring>)[table]: Rename to...
[ids]: ... this.
[fingerprints]: New field.
(keyring-insert, lookup-key-by-fingerprint): New procedures.
(%empty-keyring): Adjust.
(get-openpgp-keyring): Manipulate KEYRING instead of its vhash, use
'keyring-insert'.
* tests/openpgp.scm ("get-openpgp-keyring"): Test
'lookup-key-by-fingerprint'.
2020-05-04 09:56:12 +02:00
Ludovic Courtès
7b2b3a13cc
openpgp: Store the issuer key id and fingerprint in <openpgp-signature>.
* guix/openpgp.scm (<openpgp-signature>)[issuer, issuer-fingerprint]:
New fields.
(openpgp-signature-issuer, openpgp-signature-issuer-fingerprint): Remove.
(verify-openpgp-signature): Use 'openpgp-signature-issuer-key-id'.
(get-signature): Initialize 'issuer' and 'issuer-fingerprint'.
* tests/openpgp.scm ("get-openpgp-detached-signature/ascii"): Adjust
accordingly.
2020-05-04 09:56:12 +02:00
Ludovic Courtès
4459c7859c
openpgp: Decode the issuer-fingerprint signature subpacket.
* guix/openpgp.scm (SUBPACKET-ISSUER-FINGERPRINT): New variable.
(openpgp-signature-issuer-fingerprint): New procedure.
(key-id-matches-fingerprint?): New procedure.
(get-signature): Look for the 'issuer and 'issuer-fingerprint
subpackets.  Ensure the issuer key ID matches the fingerprint when both
are available.
(parse-subpackets): Handle SUBPACKET-ISSUER-FINGERPRINT.
* tests/openpgp.scm (%rsa-key-fingerprint)
(%dsa-key-fingerprint, %ed25519-key-fingerprint): New variables.
* tests/openpgp.scm ("get-openpgp-detached-signature/ascii"): Check the
result of 'openpgp-signature-issuer-fingerprint'.
2020-05-04 09:56:12 +02:00
Ludovic Courtès
43408e304f
Add (guix openpgp).
* guix/openpgp.scm, tests/openpgp.scm, tests/civodul.key,
tests/dsa.key, tests/ed25519.key, tests/rsa.key,
tests/ed25519.sec: New files.
* Makefile.am (MODULES): Add guix/openpgp.scm.
(SCM_TESTS): Add tests/openpgp.scm.
(EXTRA_DIST): Add tests/*.key and tests/ed25519.sec.
2020-05-04 09:56:12 +02:00
Marius Bakke
50e6c1bf2e
Merge branch 'master' into core-updates 2020-05-02 17:31:28 +02:00
Ludovic Courtès
69de98391d
profiles: Mark manual database as non-substitutable.
Fixes <https://bugs.gnu.org/40381>.
Reported by pkill9 <pkill9@runbox.com>.

* guix/profiles.scm (manual-database): Pass #:substitutable? #f.
2020-05-01 01:21:03 +02:00
Marius Bakke
8bf8cd9b85
Merge branch 'master' into core-updates
Conflicts:
	gnu/local.mk
	gnu/packages/backup.scm
	gnu/packages/emacs-xyz.scm
	gnu/packages/guile.scm
	gnu/packages/lisp.scm
	gnu/packages/openldap.scm
	gnu/packages/package-management.scm
	gnu/packages/web.scm
	gnu/packages/xorg.scm
2020-04-30 23:47:49 +02:00
Jakub Kądziołka
4035c3e352
Merge branch 'master' into staging 2020-04-29 11:08:42 +02:00
Raghav Gururajan
47f82b310e
guix: edit: Make nano the default editor.
* guix/scripts/edit.scm: Make nano the default editor.

Nano is sensible default, as it is installed by base system.
For development, user can set custom value for $EDITOR.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-04-27 23:29:40 +02:00
Ludovic Courtès
5fbc753ab5
import: crate: Gracefully handle non-existent crates.
Fixes <https://bugs.gnu.org/40891>.
Reported by Hartmut Goebel <h.goebel@crazy-compilers.com>.

* guix/import/crate.scm (crate->guix-package): Wrap value of
'version-number' and 'version*' in (and crate ...).
2020-04-27 23:29:40 +02:00
Ludovic Courtès
ccbc427f9a
channels: Use a declarative profile.
* guix/channels.scm (package-cache-file): Use 'profile' instead of
'profile-derivation'.
2020-04-26 22:49:49 +02:00
Ludovic Courtès
45c84c8f6f
pack: Use a declarative profile.
* guix/scripts/pack.scm (guix-pack): Use a declarative profile instead
of 'profile-derivation'.
2020-04-26 22:49:48 +02:00
Ludovic Courtès
ef674a24c5
profiles: Add lowerable <profile> record type.
* guix/profiles.scm (<profile>): New record type.
* tests/profiles.scm ("<profile>"): New test.
2020-04-26 22:49:48 +02:00
Christopher Baines
928dc1bb1c
substitute: Close port at the end of http-multiple-get.
* guix/scripts/substitute.scm (http-multiple-get): Add close-port call.
2020-04-26 19:37:25 +01:00
Christopher Baines
d5abb3049e
substitute: Make http-multiple-get batch size configurable.
* guix/scripts/substitute.scm (http-multiple-get): Add batch-size parameter.
2020-04-26 19:37:24 +01:00
Christopher Baines
121191f23a
substitute: Use the same port for multiple request batches.
In http-multiple-get.

* guix/scripts/substitute.scm (http-multiple-get): Switch port to p in one
occurrence.
2020-04-26 19:37:22 +01:00
Marius Bakke
c57d649de3
Merge branch 'master' into core-updates 2020-04-24 17:28:11 +02:00
Marius Bakke
962554ddcf
guix package: Export 'search-path-environment-variables'.
...because Emacs-Guix uses it.

* guix/scripts/package.scm (search-path-environment-variables): Export.
2020-04-24 15:15:50 +02:00
Mathieu Othacehe
1597613488
Revert "licenses: Export license record."
This reverts commit f0779922ff260df2404c90504986aa59553154fb. We do not want
to export the license record, see:
https://lists.gnu.org/archive/html/guix-commits/2020-04/msg01923.html.
2020-04-24 09:10:35 +02:00
Ludovic Courtès
12da5162e4
compile: Pre-load the compiler outside 'with-target'.
* guix/build/compile.scm (compile-files): Move call to 'compile' before
'with-target'.  Failing to do that, if the target has a different word
size than the host, the first call to 'compile-file' fails with:

  ice-9/eval.scm:293:34: In procedure load-thunk-from-memory: ELF file does not have native word size

while attempting loading 'language/spec.go'.
2020-04-23 23:59:22 +02:00
zimoun
f0779922ff
licenses: Export license record.
* guix/licenses.scm (<license>): Export it.

Signed-off-by: Mathieu Othacehe <m.othacehe@gmail.com>
2020-04-23 16:28:39 +02:00
Jakub Kądziołka
e84d9dcd5b
git-version: Raise a condition instead of an error.
* guix/git-download.scm (git-version): Replace ERROR with RAISE
  and CONDITION.

This is a follow-up to commit bbf6bc1acc9bbdebf7ee7b68c0fa091733a5f6e1.
2020-04-23 14:23:03 +02:00
Marius Bakke
030f6f489f
Merge branch 'master' into core-updates
Conflicts:
	etc/news.scm
	gnu/local.mk
	gnu/packages/bootloaders.scm
	gnu/packages/linphone.scm
	gnu/packages/linux.scm
	gnu/packages/tls.scm
	gnu/system.scm
2020-04-23 13:33:09 +02:00
Jakub Kądziołka
bbf6bc1acc
git-version: Handle invalid arguments gracefully
* guix/git-download.scm (git-version): Add a check for commit ID length.
2020-04-23 10:16:49 +02:00
Ludovic Courtès
416f7f4f14
profiles: Add #:name parameter to 'profile-derivation'.
* guix/profiles.scm (profile-derivation): Add #:name and pass it to
'gexp->derivation'.
2020-04-22 19:23:57 +02:00
Ludovic Courtès
34faf63ebc
gexp: Add 'load-path?' field to <scheme-file>.
* guix/gexp.scm (<scheme-file>)[load-path?]: New field.
(scheme-file): Add #:set-load-path? and honor it.
(scheme-file-compiler): Pass #:set-load-path? to 'gexp->file'.
* doc/guix.texi (G-Expressions): Document it.
2020-04-22 19:23:57 +02:00
Ludovic Courtès
e1e6491226
self: Build and install 'guix-cookbook.info' and its translations.
* guix/self.scm (translate-texi-manuals)[build]: Translate and install
guix-cookbook.texi.
(info-manual)[build]: Handle "guix-cookbook*.texi".
2020-04-21 23:52:19 +02:00
Ludovic Courtès
84c37e6368
self: translate-texi-manuals: Add 'available-translations'.
* guix/self.scm (translate-texi-manuals)[build](available-translations):
New procedure.
Use it rather than directly calling 'find-files' & co.
2020-04-21 23:52:19 +02:00
Ludovic Courtès
cc753650ec
self: translate-texi-manuals: Don't hardcode "guix.texi".
* guix/self.scm (translate-texi-manuals)[build](translate-texi): Add
'prefix' and #:extras parameters and honor them.  Adjust callers.
2020-04-21 23:52:19 +02:00
Ludovic Courtès
c8d8f6160e
packages: Recommend against the use of 'package-file'.
* guix/packages.scm (package-file): Recommend against its use in the
docstring.
* doc/guix.texi (The Store Monad): Likewise.
2020-04-21 00:06:40 +02:00
Julien Lepiller
fd546bbbee
syscalls: Fix Linux detection in 'readdir*'.
* guix/build/syscalls.scm (readdir*): Fix Linux detection for
`arm-unknown-linux-gnueabihf'.
2020-04-20 16:30:14 +02:00
Marius Bakke
7abe35febe
Merge branch 'master' into core-updates 2020-04-19 16:53:01 +02:00
Ludovic Courtès
3c91f00341
tests: Invoke 'git' with a custom '.gitconfig' and ignore the system config.
Fixes <https://bugs.gnu.org/37679>.
Reported by Gábor Boskovits <boskovits@gmail.com>.

* guix/tests/git.scm (call-with-environment-variables): New procedure.
(with-environment-variables): New macro.
(populate-git-repository)[git]: Wrap (git-command) invocation in
'call-with-temporary-directory' and 'with-environment-variables'.
2020-04-19 13:27:06 +02:00
Ludovic Courtès
04594054d6
status: Remove extra space before ellipsis.
Extra space was introduced in 8fa4ac5be4d5f8a1e62635842b16486832ff49f1.

* guix/status.scm (print-build-event): Remove extra space before
ellipsis.
2020-04-19 13:27:06 +02:00
Christopher Baines
cef392f393
guix: self: Use guile with libgc-7.
Rather than libgc version 8. This should avoid crashes that can occur,
particularly when loading data in to the Guix Data Service [1].

1: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=40525

* gnu/packages/guile.scm (guile-3.0/libgc-7): New variable.
* guix/self.scm (specification->package): Use guile-3.0/libgc-7 for guile.
2020-04-18 15:49:44 +01:00
Tobias Geerinckx-Rice
aa78c596c9
gnupg: Accept revoked keys.
I (nckx) have revoked all RSA subkeys, in favour of my older and
freshly-refreshed ECDSA ones.  This was merely a precaution: to my
knowledge all my RSA private keys have been carefully destroyed and
were never compromised.  This commit keeps ‘make authenticate’ happy.

* guix/gnupg.scm (revkeysig-rx): New variable for revoked keys.
(gnupg-verify): Parse it.
(gnupg-status-good-signature?): Accept it as ‘good’ for our purposes.
* build-aux/git-authenticate.scm (%committers): Clarify nckx's subkeys.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-04-17 23:36:47 +02:00
Vincent Legoll
694e10af63
ui: Fix typos, 80-col & grammar in comments & docstrings.
* guix/ui.scm (load*): Fix comment line length.
(leave-on-EPIPE): Fix typo in docstring.
(substitutable-info): Fix typo in comment.
(indented-string): Fix typo in docstring.
(%package-metrics): Fix typo in comment.
(run-guix): Fix grammar in docstring.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-04-17 23:18:32 +02:00
TomZ
8fa4ac5be4
status: Allow double-click select of URLs.
Various places while downloading or compiling guix prints
the source URL. This change makes the URL easier to use by
placing a space between the URL and the trailing dots.

Signed-off-by: Marius Bakke <mbakke@fastmail.com>
2020-04-17 17:03:05 +02:00
Ricardo Wurmus
3c0422b9be
import/print: Don't factorize URI if there's no version match.
* guix/import/print.scm (package->code): If FACTORIZE-URI returns just the
unmodified string use that as the URI.
2020-04-16 23:41:52 +02:00
Ricardo Wurmus
3fd4c4c839
import/utils: alist->package: Include arguments.
* guix/import/utils.scm (alist->package): Process arguments field in input
data and include it in the generated package.
2020-04-16 23:41:52 +02:00
Ricardo Wurmus
7cef499bb0
import/json: json->code: Handle files with more than one definition.
* guix/import/json.scm (json->code): Convert JSON arrays to lists of package
definitions.
(json->scheme-file): Write all expressions to the target file.
2020-04-16 23:41:52 +02:00
Ricardo Wurmus
3532fc39ff
import/utils: alist->package: Ignore known inputs.
* guix/import/utils.scm (alist->package): Accept optional list of known
inputs, which are excluded from the specification lookup.
* guix/import/print.scm (package->code)[package-lists->code]: Handle inputs
which are just symbols.
2020-04-16 23:41:52 +02:00
Ricardo Wurmus
86a3b540d0
import/print: package->code: Wrap S-expression in definition.
* guix/import/print.scm (package->code): Return a definition, not just a
package expression.
2020-04-16 23:41:52 +02:00
Ricardo Wurmus
c893432320
import/json: Use json->code.
* guix/import/json.scm (json->code): Export procedure.
* guix/scripts/import/json.scm (guix-import-json): Use json->code.
2020-04-16 23:41:52 +02:00
Ricardo Wurmus
4f353c485d
scripts/package: Handle JSON files.
* guix/scripts/package.scm (%options): Support loading from JSON files when
"install-from-file" is used.
2020-04-16 23:41:52 +02:00
Ricardo Wurmus
f87e563201
scripts/build: options->things-to-build: Handle .json files.
* guix/scripts/build.scm (options->things-to-build): Handle files that end on
.json.
2020-04-16 23:41:52 +02:00
Ricardo Wurmus
16dd764691
import/json: Add json->scheme-file.
* guix/import/json.scm (json->code, json->scheme-file): New procedures.
2020-04-16 23:41:52 +02:00
Ricardo Wurmus
6269dd567e
import/print: package->code: Wrap build system value in module reference.
* guix/import/print.scm (package->code): Return build system value with
corresponding module.
2020-04-16 23:41:52 +02:00
Ricardo Wurmus
1475d45112
import/print: Return license with prefix.
* guix/import/print.scm (license->code): Prepend license: prefix.
2020-04-16 23:41:49 +02:00
Ludovic Courtès
82d8959e5d
syscalls: 'readdir*' chooses between the Linux and Hurd code at run time.
Partly fixes <https://bugs.gnu.org/40574>.
Reported by Jan Nieuwenhuizen <janneke@gnu.org>.

Previously, we'd choose at expansion time whether to use the Hurd or the
Linux variant, taking the cross-compilation target into account.  This
would lead to the wrong decision when (guix build syscalls) is evaluated
while we're cross-compiling to GNU/Hurd.

This is a followup to 1ab9e483391f8b62b873833ea71cb0074efa03e7.

* guix/build/syscalls.scm (define-generic-identifier)
(read-dirent-header, %struct-dirent-header, sizeof-dirent-header):
Remove.
(readdir*): Rename to...
(readdir-procedure): ... this, and add parameters.
(readdir*): Define as a call to 'readdir-procedure' as a function of
%HOST-TYPE.
2020-04-16 18:33:21 +02:00
Marius Bakke
bd21acf6c3
Merge branch 'master' into core-updates 2020-04-15 19:26:55 +02:00
Ludovic Courtès
b4440de133
Merge branch 'version-1.1.0' 2020-04-15 16:09:18 +02:00
Ludovic Courtès
1ae7a9251b
weather: Delete duplicate entries coming from '--manifest'.
* guix/scripts/weather.scm (load-manifest): Call 'delete-duplicates'.
2020-04-14 16:01:05 +02:00
Marius Bakke
fc58cb5bd2
Merge branch 'master' into core-updates 2020-04-13 20:26:21 +02:00
Ludovic Courtès
b36217c54d
self: Prevent inlining of internal procedures used by 'doc/build.scm'.
This allows 'doc/build.scm' to keep using '@@' for these.  (This sets a
bad example, don't follow it.)

* guix/self.scm (prevent-inlining!): New macro.
<top level>: Use it for 'file-append*', 'translate-texi-manuals', and
'info-manual'.
2020-04-13 01:21:49 +02:00
nixo
93d5cea57e
build: julia-build-system: Update for new Julia version.
* guix/build/julia-build-system.scm (generate-load-path): Delete function.
(install): Don't set JULIA_LOAD_PATH.
(precompile): Set SOURCE_DATE_EPOCH. Update calculating the
JULIA_LOAD_PATH. Adjust the 'invoke-julia' command.
(check): Set SOURCE_DATE_EPOCH. Adjust JULIA_LOAD_PATH.

Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2020-04-12 16:15:47 +03:00
Ludovic Courtès
7fa6155b23
database: 'reset-timestamps' can optionally preserve permissions.
* guix/store/database.scm (reset-timestamps): Add
 #:preserve-permissions? and honor it.
2020-04-11 20:48:12 +02:00
Marius Bakke
bdb90df764
Merge branch 'master' into core-updates 2020-04-11 00:10:23 +02:00
Ludovic Courtès
92587f8ed6
lint: 'check-patch-file-names' restricts to shorter file names.
* guix/lint.scm (check-patch-file-names): Increase MARGIN.
2020-04-10 16:02:51 +02:00
Efraim Flashner
d95252baf9
lint: Check for inappropriate inputs in propagated-inputs too.
* guix/lint.scm (check-inputs-should-be-native): Also check the
propagated inputs of the package.
2020-04-10 00:45:59 +03:00
Diego Nicola Barbato
c1d81df93d
download: Use correct system and guile in 'url-fetch/tarbomb' and 'url-fetch/zipbomb'.
Fixes <https://bugs.gnu.org/40115>.

Previously the result of `guix build -s $system $package' would depend on the
system Guix was built for if $package or one of its dependencies used
'url-fetch/tarbomb' or 'url-fetch/zipbomb' as the origin method of its
source (e.g. `guix build -s i686-linux ffmpeg' on i686-linux would build a
different derivation than on x86_64-linux).

This patch fixes this by explicitly passing the correct system and guile to
'gexp->derivation'.

* guix/download.scm (url-fetch/tarbomb): Pass #:system system and
  #:guile-for-build guile to 'gexp->derivation', where guile is the derivation
  of guile for system.
  (url-fetch/zipbomb): Likewise.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-04-08 19:35:34 +02:00
Marius Bakke
2778302399
Merge branch 'master' into core-updates
Conflicts:
	etc/news.scm
	gnu/local.mk
	gnu/packages/check.scm
	gnu/packages/cross-base.scm
	gnu/packages/gimp.scm
	gnu/packages/java.scm
	gnu/packages/mail.scm
	gnu/packages/sdl.scm
	gnu/packages/texinfo.scm
	gnu/packages/tls.scm
	gnu/packages/version-control.scm
2020-04-08 13:00:50 +02:00
Jakub Kądziołka
3f3c9fdcd8
build-system/go: Allow providing additional build flags
* guix/build-system/go.scm (build-flags): New argument.
* guix/build/go-build-system.scm (build): Use apply to pass the
  additional arguments to invoke.
2020-04-08 12:24:42 +02:00
Ludovic Courtès
a05ad01122
records: Have ABI check work well for cross-compilation.
Reported by Jan (janneke) Nieuwenhuizen <janneke@gnu.org>.

* guix/records.scm (define-record-type*): Use
'target-most-positive-fixnum' on Guile 3 instead of 'most-positive-fixnum'.
2020-04-08 00:05:45 +02:00
Ludovic Courtès
041c3c22dc
compile: Run the load phase within 'with-target'.
* guix/build/compile.scm (compile-files)[build]: Remove 'with-target'.
Wrap body in 'with-target'.
2020-04-08 00:05:45 +02:00
Ludovic Courtès
93add9bf7d
reconfigure: Correctly re-throw SRFI-34 exceptions on Guile 3.
Previously, we'd just print an ugly backtrace when running on Guile 3
because the '%exception throw would not be caught anywhere.

Reported by Arne Babenhauserheide <arne_bab@web.de>
in <https://bugs.gnu.org/40496>.

* guix/scripts/system/reconfigure.scm (install-bootloader-program): In
'catch' handler, match '%exception and use 'raise-exception' instead of
'throw' to rethrow in that case.
2020-04-08 00:05:45 +02:00
Marius Bakke
1c86577d62
Revert "Allow double-click select of URL in status"
As discussed on #guix, this should wait until 1.1.0 is branched off to avoid
having to update translations.

This reverts commit 9f1b787120b1b81abffaf0fa13fdbdf4cca39f2d.
2020-04-07 22:09:14 +02:00
TomZ
9f1b787120
Allow double-click select of URL in status
Various places while downloading or compiling guix prints
the source URL. This change makes the URL easier to use by
placing a space between the URL and the trailing dots.

Signed-off-by: Marius Bakke <mbakke@fastmail.com>
2020-04-07 21:56:30 +02:00
Marius Bakke
9ac6d3785f
lint: 'm4' is a native input.
* guix/lint.scm (check-inputs-should-be-native): Add "m4".
2020-04-07 17:59:00 +02:00
Ludovic Courtès
42a87136f0
channels: Call 'build-self.scm' procedure with a trivial build handler.
Previously, "TESTS=installed-os guix build -m etc/system-tests.scm"
would repeat the "Computing Guix derivation" phase ~5 times due to the
fact that there were several call paths, within a build-accumulator,
leading to (package-derivation store guix).

* guix/channels.scm (with-trivial-build-handler): New procedure.
(build-from-source): Wrap 'build' call in 'with-trivial-build-handler'.
2020-04-06 23:56:24 +02:00
Carl Dong
b066c25026
gnu: Move PACKAGES-WITH-*PATCHES to (guix packages)
* gnu/packages/cross-base.scm (package-with-extra-patches,
package-with-patches): Move procedures from here...
* guix/packages.scm (package-with-extra-patches, package-with-patches):
...to here, and export.
2020-04-06 14:02:42 -04:00
Ludovic Courtès
376ba0ce57
store: 'with-store' uses 'with-exception-handler'.
This ensures the stack is not unwound before the exception is re-thrown,
as was the case since 8ed597f4a261fe188de82cd1f5daed83dba948eb, leading
to '&store-protocol-error' being uncaught by 'with-error-handling'
in (guix scripts build) & co.

* guix/store.scm (call-with-store): Define 'thunk'.  Add 'cond-expand'
to use 'with-exception-handler' on 'guile-3' and 'catch' otherwise.
2020-04-05 00:36:44 +02:00
Ludovic Courtès
8ed597f4a2
store: 'with-store' doesn't close the store upon abort.
Fixes <https://bugs.gnu.org/40428>.
Reported by Marius Bakke <mbakke@fastmail.com> and 白い熊.

Regression introduced with the first uses of 'with-build-handler' in
commit 62195b9a8fd6846117c5d7698842748300d13e31 and subsequent.

* guix/store.scm (call-with-store): Use 'catch #t' instead of
'dynamic-wind'.  This ensures STORE remains open when a non-local exit
other than an exception occurs, such as an abort to the build handler
prompt.
* tests/store.scm ("with-build-handler + with-store"): New test.
2020-04-04 18:52:35 +02:00
Ludovic Courtès
f7b5b8cd45
pack: Pass the cross-compilation target to 'run-with-store'.
This ensures '%current-target-system' is correctly bound upfront, which
some packages rely on.

* guix/scripts/pack.scm (guix-pack): Pass #:target to 'run-with-store'.
2020-04-03 23:06:43 +02:00
Ludovic Courtès
73bfb14f8f
guix system: Mention 'herd restart' when reconfigure completes.
* guix/scripts/system.scm (with-shepherd-error-handling): Use 'mbegin'
instead of 'begin'.
(perform-action): Print a message after 'upgrade-shepherd-services'.
That message had disappeared in commit
5c8c8c455420af27189d6045b3599fe6e27ad012.
2020-04-03 12:58:14 +02:00
Ludovic Courtès
4efbb079b5
guix system: Remove unused procedure.
This procedure was unused since
5c8c8c455420af27189d6045b3599fe6e27ad012.

* guix/scripts/system.scm (call-with-service-upgrade-info): Remove.
2020-04-03 12:58:14 +02:00
Ludovic Courtès
9fb3ff31c1
reconfigure: Silence Guile warnings.
Fixes <https://bugs.gnu.org/39301>.
Reported by strypsteen@posteo.net.

* guix/scripts/system/reconfigure.scm (switch-to-system)
(upgrade-shepherd-services, install-bootloader): Wrap 'primitive-load'
call in 'parameterize'.
2020-04-03 12:58:14 +02:00
Ludovic Courtès
00a1ebb84a
Revert "reconfigure: Run the effect scripts as separate processes."
This reverts commit 5517750344be05c91bc2979c1a0e2348a9ae902d.
That commit would remove all sorts of error checking when running those
programs.
2020-04-03 12:58:14 +02:00
Ludovic Courtès
5517750344
reconfigure: Run the effect scripts as separate processes.
Fixes <https://bugs.gnu.org/39301>.
Reported by strypsteen@posteo.net.

* guix/scripts/system/reconfigure.scm (switch-to-system)
(upgrade-shepherd-services, install-bootloader): Use 'system*' instead
of 'primitive-load'.
2020-04-02 23:15:12 +02:00
Ludovic Courtès
a6850f6827
guix system: Do not import the user's (guix config).
Previously, 'switch-to-system.drv' and 'install-bootloader.drv' would
depend on the user's (guix config) module.  This is no longer the case.

* guix/scripts/system/reconfigure.scm (not-config?): New procedure.
(switch-system-program): Do not import the user's (guix config).  Use
'make-config.scm' instead.
(install-bootloader-program): Likewise.
2020-04-02 23:15:11 +02:00
Ludovic Courtès
efa578ecae
git: Don't try to resolve tags with 'tag-lookup'.
Fixes <https://bugs.gnu.org/40377>.
Reported by Brice Waegeneire <brice@waegenei.re>.

* guix/git.scm (switch-to-ref): In the 'tag case, remove call to
'tag-lookup'.
2020-04-02 23:15:11 +02:00
Ludovic Courtès
3b4d7cdccc
bournish: Prevent inlining of run-time support procedures.
On Guile 3, those procedures could be inlined, leading to
unbound-variable errors:

  scheme@(guile-user)> ,bournish
  Welcome to Bournish, a minimal Bourne-like shell!
  To switch back, type `,L scheme'.
  bournish@(guile-user)> ls
  ice-9/boot-9.scm:1669:16: In procedure raise-exception:
  Unbound variable: ls-command-implementation

Reported by Ricardo Wurmus.

* guix/build/bournish.scm (define-command-runtime): New macro.
(ls-command-implementation, wc-command-implementation)
(wc-l-command-implementation, wc-c-command-implementation): Use it
instead of 'define'.
2020-04-02 16:07:08 +02:00
Ludovic Courtès
b34ead48dc
gexp: 'lower-references' uses 'mapm/accumulate-builds'.
* guix/gexp.scm (lower-references): Use 'mapm/accumulate-builds' instead
of 'mapm'.
2020-04-02 11:48:25 +02:00
Ludovic Courtès
2ad6eb0568
guix system: Use 'mapm/accumulate-builds'.
* guix/scripts/system.scm (perform-action): Use 'mapm/accumulate-builds'
instead of 'mapm'.
2020-04-02 11:48:24 +02:00
Ludovic Courtès
5c83dd1d64
ui: Clarify "dependencies changed".
Suggested by Leo Famulari <leo@famulari.name>.

* guix/ui.scm (show-manifest-transaction): Change to "dependencies or
package changed".
2020-04-02 11:48:24 +02:00
Ludovic Courtès
4b75a70600
grafts: Simplify access to store item references.
This is a followup to 710854304b1ab29332edcb76f3de532e0724c197.

This also slightly reduces the number of 'query-references' RPCs, for
instance from 176 to 166 from "guix build emacs -d".

* guix/grafts.scm (references-oracle): Remove.
(non-self-references): Remove 'references' parameter and add 'store'.
Add 'references*' procedure and use it instead of 'references'.  Adjust
caller accordingly.
(cumulative-grafts): Remove 'references' parameter and adjust caller
accordingly.
2020-04-02 00:06:26 +02:00
Arne Babenhauserheide
ef4b5f2fed
profiles: Compute manual database entries in parallel.
This provides a 36% speedup on an SSD and 4 cores for the 1.5K man pages
in the manual database derivation of:

  guix environment --ad-hoc jupyter python-ipython python-ipykernel

* guix/profiles.scm (manual-database)[build]: Add 'print-string',
'print', and 'compute-entry'.  Change 'compute-entries' to call
'compute-entry' in 'n-par-map'.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2020-03-31 14:55:42 +02:00
Ludovic Courtès
2c33901fb1
ci: Fix 'evaluation-spec' binding.
* guix/ci.scm (<evaluation>)[spec]: Add "specification", which is what
the JSON field is actually called.
2020-03-31 14:55:42 +02:00
Ludovic Courtès
a357849f5b
guix package: Do not misdiagnose upgrades when there are propagated inputs.
Fixes <https://bugs.gnu.org/35872>.
Reported by Andy Tai <atai@atai.org>.

* guix/profiles.scm (list=?, manifest-entry=?): New procedures.
* guix/scripts/package.scm (transaction-upgrade-entry): In the '=' case,
use 'manifest-entry=?' to determine whether it's an upgrade.
* tests/packages.scm ("transaction-upgrade-entry, zero upgrades,
propagated inputs"): New test.
2020-03-31 00:06:36 +02:00
Ludovic Courtès
1a9a373eb4
profiles: 'lower-manifest-entry' recurses on dependencies.
* guix/profiles.scm (lower-manifest-entry)[recurse]: New procedure.
Call it on dependencies and set the 'dependencies' field accordingly.
2020-03-31 00:06:36 +02:00
Ludovic Courtès
a187cc5628
guix package: 'transaction-upgrade-entry' swallows build requests.
Fixes a regression introduced in
131f50cdc9dbb7183023f4dae759876a9e700bef whereby the install/upgrade
message would not be displayed:

  $ guix upgrade -n
  2.1 MB would be downloaded:
     /gnu/store/…-something-1.2
     /gnu/store/…-its-dependency-2.3

This is because we'd directly abort from 'transaction-upgrade-entry' to
the build handler of 'build-notifier'.

* guix/scripts/package.scm (transaction-upgrade-entry): Call 'string=?'
expression in 'with-build-handler'.
* tests/packages.scm ("transaction-upgrade-entry, grafts"): New test.
2020-03-31 00:06:36 +02:00
Ludovic Courtès
190ddfe21e
guix package: 'transaction-upgrade-entry' uses 'lower-manifest-entry'.
* guix/profiles.scm (lower-manifest-entry): Export.
* guix/scripts/package.scm (transaction-upgrade-entry)[lower-manifest-entry*]
[upgrade]: New procedures.
Use 'lower-manifest-entry*' instead of 'package-derivation' to compute
the output file name of PKG.
2020-03-31 00:06:36 +02:00
Marius Bakke
ae0badf5bb
Merge branch 'master' into core-updates
Conflicts:
	gnu/packages/admin.scm
	gnu/packages/commencement.scm
	gnu/packages/guile.scm
	gnu/packages/linux.scm
	gnu/packages/package-management.scm
	gnu/packages/pulseaudio.scm
	gnu/packages/web.scm
2020-03-30 12:17:33 +02:00
Ludovic Courtès
5a17b9b673
build-system/gnu: Optimize the package graph.
With this change, the output of:

  guix graph -e '(@@ (gnu packages commencement) coreutils-final)' |grep 'label = ' | wc -l

drops from 76 nodes to 68 nodes, and the "add-data-to-store-cache" hit
rate for:

  guix build libreoffice -d --no-grafts

drops from 3.9% to 2.6%.

* guix/build-system/gnu.scm (package-with-explicit-inputs*)[cut?]:
Adjust condition to exclude packages with build systems other than
GNU-BUILD-SYSTEM, such as 'ld-wrapper-boot3'.
2020-03-29 23:14:28 +02:00
Ludovic Courtès
9f78552996
packages: 'package->bag' keys cache by replacement.
* guix/packages.scm (package->bag): When GRAFT? is true, use PACKAGE's
replacement as the cache key.  Remove GRAFT? from the list of
secondary cache keys.
2020-03-29 23:14:28 +02:00
Ludovic Courtès
18c8a4396b
deploy: Use 'map/accumulate-builds'.
* guix/scripts/deploy.scm (guix-deploy): Use 'map/accumulate-builds'
instead of 'for-each'.
2020-03-29 23:14:27 +02:00
Ludovic Courtès
d089b23335
deploy: Factorize machine deployment.
* guix/scripts/deploy.scm (deploy-machine*): New procedure.
(guix-deploy): Call it in 'for-each'.
2020-03-29 23:14:27 +02:00
Ludovic Courtès
033df23680
packages: Change 'guile-for-grafts' back to 2.0.
This reverts 2b6fe60599d52b449bbf531cfdc4dbf18a14eb2c, due to reports of
segfaults of Guile 3.0.2 during grafting.

* guix/packages.scm (guile-for-grafts): Change back to GUILE-2.0.
2020-03-29 15:35:47 +02:00
Ludovic Courtès
131f50cdc9
'--dry-run' no longer implies '--no-grafts'.
* guix/scripts/archive.scm (%options): "dry-run" option no longer adds
'graft? #f to RESULT.
* guix/scripts/environment.scm (%options): Likewise.
* guix/scripts/pack.scm (%options): Likewise.
* guix/scripts/package.scm (%options): Likewise.
* guix/scripts/pull.scm (%options): Likewise.
* guix/scripts/system.scm (%options): Likewise.
2020-03-29 15:32:18 +02:00
Ludovic Courtès
710854304b
grafts: Don't rely on substitute info for missing store items.
Fixes <https://bugs.gnu.org/22990>.

* guix/grafts.scm (references-oracle)[references*]: Remove call to
'substitution-oracle' and to 'references/substitutes'.  Use
'references/cached' and 'build-derivations' right away instead.
2020-03-29 15:32:17 +02:00
Ludovic Courtès
c70cf1a724
store: Add 'references/cached'.
* guix/store.scm (references/cached): New procedure.
2020-03-29 15:32:17 +02:00
Ludovic Courtès
25af35fa32
profiles: Use 'mapm/accumulate-builds'.
* guix/profiles.scm (check-for-collisions): Use 'mapm/accumulate-builds'
to lower manifest entries.  Call 'foldm' over the already-lowered entries.
(profile-derivation): Use 'mapm/accumulate-builds' instead of 'mapm'
when calling HOOKS.
2020-03-29 15:32:17 +02:00
Ludovic Courtès
584dfdac37
gexp: 'lower-inputs' uses 'mapm/accumulate-builds'.
This doesn't have an noticeable impact on the run time of
'guix system build desktop.tmp --no-grafts -d'.

* guix/gexp.scm (lower-inputs): Use 'mapm/accumulate-builds' instead of 'mapm'.
2020-03-29 15:32:17 +02:00
Ludovic Courtès
1213ea9bd9
guix build: Use 'map/accumulate-builds'.
* guix/scripts/build.scm (options->derivations): Use
'map/accumulate-builds' instead of 'append-map'.
2020-03-29 15:32:17 +02:00
Ludovic Courtès
c40bf5816c
store: Add 'map/accumulate-builds'.
* guix/store.scm (<unresolved>): New record type.
(build-accumulator, map/accumulate-builds, mapm/accumulate-builds): New
procedures.
* tests/store.scm ("map/accumulate-builds", "mapm/accumulate-builds"):
New tests.
2020-03-29 15:32:17 +02:00
Jakub Kądziołka
44fb8cf841
Merge branch 'master' into staging 2020-03-29 00:38:13 +01:00
Marius Bakke
388b432cea
deploy: Remove use of '~*' in format string.
...since 'msgfmt' fails to interpret it.  Reported by Vagrant Cascadian
in <https://lists.gnu.org/archive/html/guix-devel/2020-03/msg00340.html>.
See also <https://bugs.gnu.org/37505>.

* guix/scripts/deploy.scm (show-what-to-deploy): Use ~d instead of ~* when
displaying machines that will be deployed.
2020-03-28 15:55:13 +01:00
Ludovic Courtès
2b6fe60599
packages: Use Guile 3.0 for grafts.
* guix/packages.scm (guile-2.0): Rename to...
(guile-for-grafts): ... this, and adjust callers.  Refer to 'guile-3.0'
instead of 'guile-2.0'.
2020-03-27 19:09:30 +01:00
Marius Bakke
18af687037
Merge branch 'master' into core-updates
Conflicts:
	gnu/packages/icu4c.scm
	gnu/packages/man.scm
	gnu/packages/python-xyz.scm
	guix/scripts/environment.scm
	guix/scripts/pack.scm
	guix/scripts/package.scm
	guix/scripts/pull.scm
	guix/store.scm
2020-03-27 00:12:15 +01:00
Ludovic Courtès
260eae7893
status: Display synthetic information about profiles being built.
* guix/status.scm (print-build-event): Add 'profile case.
* guix/scripts/package.scm (build-and-use-profile): Remove now redundant
message.
2020-03-26 13:07:19 +01:00
Ludovic Courtès
e7570ec2da
profiles: 'profile-derivation' sets a 'type' property.
* guix/profiles.scm (profile-derivation): Pass #:properties to
'gexp->derivation'.
2020-03-26 13:07:19 +01:00
Efraim Flashner
6741f543e6
gnu: bootstrap: Add support for the Hurd.
On 3342a1182b15ec031f0ec6f602fd96c1dca3d4b0
   gnu: make-bootstrap: Use _IOLBF on Guile 2.0 only.

Run
    ./pre-inst-env guix build --target=i586-pc-gnu bootstrap-tarballs --verbosity=1

Producing

    /gnu/store/lhca65c997pvic5cfrpm0dasniwqlg2a-bootstrap-tarballs-0

With guix hash -rx /gnu/store/lhca65c997pvic5cfrpm0dasniwqlg2a-bootstrap-tarballs-0

    07jnq2by98f2a45k8wd2gj62iazvwfa4z7p3w3id4m1g0fdsvc3b

* gnu/packages/bootstrap.scm (%bootstrap-executables): Add entries for the
Hurd.
(bootstrap-executable-url): Use lilypond url for the Hurd.
(bootstrap-guile-url-path): Likewise.
(bootstrap-guile-hash): Add entry for the Hurd.
(%bootstrap-coreutils&co): Likewise.
(%bootstrap-binutils): Likewise.
(%bootstrap-glibc): Likewise.
(%bootstrap-gcc): Likewise.
* guix/packages.scm (%supported-systems): Add i586-gnu.

Co-authored-by: Jan Nieuwenhuizen <janneke@gnu.org>
2020-03-26 12:58:51 +01:00
Ricardo Wurmus
9e17989017
import/cran: Import missing module.
This is a follow-up to commit b005c240bb5e436ffe9d55c2dd75c9af85aa0fdd.

Reported-by: Ludovic Courtès <ludo@gnu.org>

* guix/import/cran.scm: Import (guix ui) module.
2020-03-25 16:28:57 +01:00
Ludovic Courtès
c74f19d758
environment: Use 'with-build-handler'.
* guix/scripts/environment.scm (build-environment): Remove.
(guix-environment): Wrap 'with-status-verbosity' in
'with-build-handler'.  Remove 'dry-run?' conditional.  Use
'built-derivations' instead of 'build-environment'.
2020-03-25 16:02:53 +01:00
Ludovic Courtès
2d5ee2c6e8
archive: Use 'with-build-handler'.
* guix/scripts/archive.scm (export-from-store): Remove call to
'show-what-to-build' and dry-run? condition.
(guix-archive): Wrap 'cond' in 'with-build-handler'.
2020-03-25 16:02:53 +01:00
Ricardo Wurmus
b005c240bb
import/cran: Support importing from Mercurial repositories.
* guix/import/cran.scm (download): Accept keyword #:method; add case for hg
method.
(fetch-description): Handle hg repository.
(description->package): Add cases for hg repositories and update call of
DOWNLOAD procedure.
(cran->guix-package): Retry importing from Bioconductor when hg import failed.
2020-03-25 09:40:05 +01:00
Christopher Baines
57e12aad6d
scripts: lint: Handle store connections for lint checkers.
Rather than individual checkers opening up a connection to the store for each
package to check, if any checker requires a store connection, open a
connection and pass it to all checkers that would use it. This makes running
the derivation checker much faster for multiple packages.

* guix/scripts/lint.scm (run-checkers): Add a #:store argument, and pass the
store to checkers if they require a store connection.
(guix-lint): Establish a store connection if any checker requires one, and
pass it through to run-checkers.
2020-03-24 19:47:46 +00:00
Christopher Baines
7826fbc02b
lint: Add a #:store argument to check-derivation
This can then be used to avoid opening up a store connection each time a
package needs checking.

* guix/lint.scm (check-derivation): Add a #:store argument, and pull the
handling of the store connection out of the try function.
2020-03-24 19:47:46 +00:00
Christopher Baines
d84ad6a24e
lint: Mark the derivation checker as requiring a store connection.
* guix/lint.scm (%local-checkers): Mark the derivation checker as requiring a
store connection.
2020-03-24 19:47:46 +00:00
Christopher Baines
3874dc5ef2
lint: Add a requires-store? field to the checker record.
This can then be used to mark checkers that require a store connection, which
will enable passing a connection in, avoiding the overhead of establishing a
connection inside the check function when it's run for lots of different
packages.

* guix/lint.scm (<lint-checker>): Add requires-store? to the record type.
2020-03-24 19:47:43 +00:00
Ludovic Courtès
637db76d7a
guix system: Fix mistaken 'guix pull' warning upon 'reconfigure'.
Fixes <https://bugs.gnu.org/38196>.
Reported by Florian Pelz <pelzflorian@pelzflorian.de>.

* guix/scripts/system.scm (maybe-suggest-running-guix-pull): Check
whether 'current-profile' returns true instead of checking for the
existence of ~root/.config/guix/current.  That way, "sudo guix system
reconfigure" no longer emits a warning in that case.
2020-03-24 18:54:41 +01:00
Ludovic Courtès
53c594cb3f
pack: Do not store extended attributes in squashfs images.
* guix/scripts/pack.scm (squashfs-image)[build](mksquashfs): Pass "-no-xattrs".
2020-03-24 16:56:19 +01:00
Ludovic Courtès
8465f1f680
ui: 'show-manifest-transaction' tabulates package lists for install/remove.
It also removes the store file name from the output.

* guix/ui.scm (show-manifest-transaction)[package-strings]: Rewrite to
use 'tabulate'.  Remove 'item' parameter and adjust callers.
2020-03-24 15:44:45 +01:00
Ludovic Courtès
3e5ab0a7a9
ui: 'show-manifest-transaction' tabulates upgraded package lists.
This also changes "1.0.0 → 1.0.0" to "(dependencies changed)", which is
probably less confusing.

* guix/ui.scm (tabulate): New procedure.
(show-manifest-transaction)[upgrade-string]: Rewrite to take lists of
names, versions, and outputs instead of single elements.  Use
'tabulate'.  Adjust callers accordingly.
2020-03-24 15:44:45 +01:00
Martin Becze
cf2b91aad0
import: crate: Deduplicate dependencies.
* guix/import/crate.scm (crate-version-dependencies): Deduplicate crate dependencies.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-03-24 15:44:45 +01:00
Arun Isaac
d13d28265f
licenses: Add QWT 1.0 license.
* guix/licenses.scm (qwt1.0): New variable.

Signed-off-by: Guillaume Le Vaillant <glv@posteo.net>
2020-03-24 11:42:41 +01:00
Arun Isaac
5d33e789c2
licenses: Add Open Government Licence for Public Sector Information.
* guix/licenses.scm (ogl-psi1.0): New variable.

Signed-off-by: Guillaume Le Vaillant <glv@posteo.net>
2020-03-24 11:42:40 +01:00
Jakub Kądziołka
927c251846
cargo-build-system: Accept a #:features argument
* guix/build/cargo-build-system.scm (build, install): Pass the features
  to cargo.
  (check): Remove indirection layer for consistency with build and
  install.
* guix/build-system/cargo.scm (cargo-build): New argument; pass it into
  the builder.
* gnu/packages/rust-apps.scm (ripgrep): Use the new argument instead of
  a custom phase.
2020-03-23 19:30:38 +01:00
Ludovic Courtès
1292372725
deploy: Write a message upon successful deployment.
* guix/scripts/deploy.scm (guix-deploy): Write message upon successful
deployment.
2020-03-23 10:48:17 +01:00
Ludovic Courtès
1bb248d0b1
deploy: Show what machines will be deployed.
* guix/scripts/deploy.scm (show-what-to-deploy): New procedure.
(guix-deploy): Call it.
2020-03-23 10:48:17 +01:00
Ludovic Courtès
7b322d3c4c
ui: Add 'indented-string'.
* guix/scripts/pull.scm (display-news-entry): Remove extra space in
format string for 'indented-string'.
(indented-string): Remove.
(display-new/upgraded-packages)[pretty]: Pass #:initial-indent? to
'indented-string'.
* guix/ui.scm (indented-string): New procedure.
2020-03-23 10:48:17 +01:00
Ludovic Courtès
8f53d73493
ssh: 'send-files' reports missing modules on the remote host.
Reported by Mikael Djurfeldt <mikael@djurfeldt.com>
in <https://bugs.gnu.org/40125>.

* guix/ssh.scm (send-files)[inferior-remote-eval*]: New procedure.
[missing]: Use it.  Add an explicit 'resolve-module' call.
(report-inferior-exception): New procedure.
2020-03-23 10:48:17 +01:00
Maxim Cournoyer
afc6b1c0b6
build: emacs-utils: Add an option to select scoping for batch eval.
In Emacs 27, --eval now evaluates using lexical scoping.  This change adds an
option to select dynamic scoping, by using a workaround proposed in
<https://bugs.gnu.org/39823>.

* guix/build/emacs-utils.scm (emacs-batch-eval): Add a DYNAMIC? keyword
argument.  Wrap the EXPR with a call to EVAL that makes use of the argument
to select the scoping mode.
(emacs-generate-autoloads): Use it.
2020-03-22 21:17:38 -04:00
Ludovic Courtès
9acacb71c9
Remove workaround for 'time-monotonic' in Guile 2.2.2.
This is a followup to e688c2df3924423b67892cc9939ca099c729d1cb.

* build-aux/hydra/evaluate.scm <top level>: Remove 'time-monotonic'
definition.
* guix/cache.scm: Likewise.
* guix/progress.scm: Likewise.
* guix/scripts/substitute.scm: Likewise.
* guix/scripts/weather.scm: Likewise.
* tests/cache.scm: Likewise.
2020-03-22 16:49:47 +01:00
Mathieu Othacehe
c086c5af1c
build-system: linux-module: Fix cross compilation.
* guix/build-system/linux-module.scm (default-kmod, default-gcc): Delete
procedures.
(system->arch): New procedure.
(make-linux-module-builder)[native-inputs]: Move linux...
[inputs]: ...to here.
(linux-module-build-cross): New procedure.
(linux-module-build): Add TARGET.  Pass TARGET and ARCH to build side.
(lower): Allow cross-compilation.  Move "linux" and "linux-module-builder"
to host-inputs.  Add target-inputs.  Call linux-module-build-cross if
TARGET is set, linux-module-build otherwise.
* guix/build/linux-module-build-system.scm (configure): Add ARCH argument.
(linux-module-build): Adjust comment.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2020-03-22 13:20:07 +01:00
Danny Milosavljevic
5c79f23863
system: Add kernel-loadable-modules to operating-system.
* gnu/system.scm (<operating-system>): Add kernel-loadable-modules.
(operating-system-directory-base-entries): Use it.
* doc/guix.texi (operating-system Reference): Document
KERNEL-LOADABLE-MODULES.
* gnu/build/linux-modules.scm (depmod): New procedure.
(make-linux-module-directory): New procedure.  Export it.
* guix/profiles.scm (linux-module-database): New procedure.  Export it.
* gnu/tests/linux-modules.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* gnu/packages/linux.scm (make-linux-libre*)[arguments]<#:phases>[install]:
Disable depmod.  Remove "build" and "source" symlinks.
[native-inputs]: Remove kmod.
2020-03-22 12:51:50 +01:00
Ludovic Courtès
91601790d0
packages: 'package-field-location' handles missing source properties.
This is a followup to f2b24f01f42c1bad3ddffd140194de1aec38a5f8.

* guix/packages.scm (package-field-location): Check whether
'source-properties->location' returns #f.  This fixes the case where
'source-properties' returns the empty list.
2020-03-22 12:42:52 +01:00
Ludovic Courtès
3e6f65be7a
copy: Use 'with-build-handler'.
* guix/scripts/copy.scm (send-to-remote-host): Remove explicit
'show-what-to-build' call.  Call 'build-derivations' unconditionally.
(guix-copy): Wrap 'with-status-verbosity' in 'with-build-handler'.
2020-03-22 12:42:52 +01:00
Ludovic Courtès
81c0b52bd6
copy: Actually implement '--dry-run'.
* guix/scripts/copy.scm (%options): Add '--dry-run'.
2020-03-22 12:42:52 +01:00
Ludovic Courtès
7473238f7d
copy: Factorize 'with-store' & co.
* guix/scripts/copy.scm (send-to-remote-host): Remove 'with-store' and
'set-build-options-from-command-line' call.  Add 'local' parameter.
(retrieve-from-remote-host): Likewise.
(guix-copy): Wrap 'with-status-verbosity' in 'with-store' and add call
to 'set-build-options-from-command-line'.
2020-03-22 12:42:52 +01:00
Ludovic Courtès
9b771305df
ui: 'build-notifier' invokes continuation when there's nothing to do.
* guix/ui.scm (build-notifier): Call CONTINUE when there's nothing to
build or download, even when DRY-RUN? is true.
2020-03-22 12:42:52 +01:00
Ludovic Courtès
883a1765a6
ui: 'show-what-to-build' returns two values, for builds and downloads.
* guix/ui.scm (show-what-to-build): Return two values.
2020-03-22 12:42:52 +01:00
Ludovic Courtès
bec3474107
ui: 'show-what-to-build' returns true when there are grafts to build.
* guix/ui.scm (show-what-to-build): Distinguish between 'build/full' and
'build'.  Return true whe 'build/full' is non-empty, thus taking grafts
into account.
2020-03-22 12:42:52 +01:00
Ludovic Courtès
a0f480d623
guix system: Use 'with-build-handler'.
* guix/scripts/system.scm (reinstall-bootloader): Remove call to
'show-what-to-build*'.
(perform-action): Call 'build-derivations' instead of 'maybe-build'.
(process-action): Wrap 'run-with-store' in 'with-build-handler'.
2020-03-22 12:42:51 +01:00
Ludovic Courtès
65ffb9388c
guix package, pull: Use 'with-build-handler'.
* guix/scripts/package.scm (build-and-use-profile): Remove #:dry-run?
and #:use-substitutes?.  Remove call to 'show-what-to-build' and
'dry-run?' special case.
(process-actions): Adjust accordingly.
(guix-package*): Wrap 'parameterize' in 'with-build-handler'.
* guix/scripts/pull.scm (build-and-install): Remove #:use-substitutes?
and #:dry-run? and adjust 'update-profile' call accordingly.  Remove
'dry-run?' conditional.
(guix-pull): Wrap body in 'with-build-handler'.
2020-03-22 12:42:51 +01:00
Ludovic Courtès
5f5e9a5cd6
pack: Use 'with-build-handler'.
* guix/scripts/pack.scm (guix-pack): Wrap 'parameterize' in
'with-build-handler'.  Remove explicit call to 'show-what-to-build'.
Call 'build-derivations' regardless of whether OPTS contains 'dry-run?'.
2020-03-22 12:42:51 +01:00
Ludovic Courtès
bdda46a67d
deploy: Use 'with-build-handler'.
Until now, 'guix deploy' would never display what is going to be built.

* guix/scripts/deploy.scm (guix-deploy): Wrap 'for-each' in
'with-build-handler'.
2020-03-22 12:42:51 +01:00
Ludovic Courtès
62195b9a8f
guix build: Use 'with-build-handler'.
Fixes <https://bugs.gnu.org/28310>.
Reported by Andreas Enge <andreas@enge.fr>.

* guix/scripts/build.scm (guix-build): Wrap 'parameterize' in
'with-build-handler'.  Remove explicit call to 'show-what-to-build'.
Call 'build-derivations' regardless of whether OPTS contains 'dry-run?'.
2020-03-22 12:42:51 +01:00
Ludovic Courtès
07ce23e011
ui: Add a notification build handler.
* guix/ui.scm (build-notifier): New variable.
2020-03-22 12:42:51 +01:00
Ludovic Courtès
041b340da4
store: Add 'with-build-handler'.
* guix/store.scm (current-build-prompt): New variable.
(call-with-build-handler, invoke-build-handler): New procedures.
(with-build-handler): New macro.
* tests/store.scm ("with-build-handler"): New test.
2020-03-22 12:42:51 +01:00
Ludovic Courtès
9a067fe7ee
syscalls: 'with-file-lock' re-grabs lock when reentering its dynamic extent.
* guix/build/syscalls.scm (call-with-file-lock)
(call-with-file-lock/no-wait): Initialize PORT in the 'dynamic-wind'
"in" handler.  This allows us to re-enter a captured continuation and
have the lock grabbed anew.
2020-03-22 12:42:51 +01:00
Ludovic Courtès
4a6ec23a97
download: Delete the output file upon failure.
This allows ENOSPC conditions to be properly reported as such rather
than as a hash mismatch due to the availability of a truncated file.

Fixes <https://bugs.gnu.org/39993>.
Reported by Maxim Cournoyer <maxim.cournoyer@gmail.com>.

* guix/build/download.scm (url-fetch): In the failure case, delete FILE.
2020-03-22 00:02:23 +01:00
Marius Bakke
d19b14c834
Merge branch 'master' into core-updates 2020-03-21 22:16:02 +01:00
Ludovic Courtès
f2b24f01f4
packages: 'package-field-location' preserves the original file name.
Fixes <https://bugs.gnu.org/39425>.
Reported by Alex ter Weele <alex.ter.weele@gmail.com>.

* guix/packages.scm (package-field-location): Remove 'with-fluids' for
'%file-port-name-canonicalization'.  Change the 'file' field of the
resulting location to FILE.
2020-03-20 23:59:31 +01:00
Brendan Tildesley
3e000955cd
guix: lint: Ad scdoc as a suggested native input.
* guix/lint.scm (check-inputs-should-be-native): Add scdoc.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2020-03-19 21:10:21 +01:00
Ludovic Courtès
892ca1d92f
guix package: Remove unneeded import.
This is a followup to 55e1dfa4dd189e010c541e3997b65434c702b4a5.

* guix/scripts/package.scm: Remove unneeded #:use-module.
2020-03-19 15:14:08 +01:00
Ludovic Courtès
1dca6aaafa
inferior: '&inferior-exception' includes a stack trace.
* guix/inferior.scm (port->inferior): Bump protocol to (0 1 1).
(&inferior-exception)[stack]: New field.
(read-repl-response): Recognize 'exception' form for protocol (0 1 1).
* tests/inferior.scm ("&inferior-exception"): Check the value returned
by 'inferior-exception-stack'.
2020-03-19 15:14:08 +01:00
Ludovic Courtès
2b0a370d00
repl: Return stack traces along with exceptions.
* guix/repl.scm (repl-prompt): New variable.
(stack->frames): New procedure.
(send-repl-response)[frame->sexp, handle-exception]: New procedure.
Pass HANDLE-EXCEPTION as a pre-unwind handler.
(machine-repl): Define 'tag'.  Bump protocol version to (0 1 1).
Wrap 'loop' call in 'call-with-prompt'.
2020-03-19 15:14:08 +01:00
Ludovic Courtès
ec0a866172
inferior: Adjust to protocol (0 1).
* guix/inferior.scm (port->inferior): For protocol (0 x ...), where x >= 1,
send the (() repl-version ...) form.
2020-03-19 15:14:08 +01:00
Ludovic Courtès
f06a26f5b5
repl: Allow clients to send their protocol version.
* guix/repl.scm (send-repl-response): Add #:version.
(machine-repl): Make 'loop' an internal define with a
'version' parameter.  Pass VERSION to 'send-repl-response'.
Send (0 1) as the protocol version.
If the first element read from INPUT matches (() repl-version _ ...),
interpret it as the client's protocol version.
2020-03-19 15:14:08 +01:00
Marius Bakke
c4d769d359
Merge branch 'master' into core-updates 2020-03-18 19:41:08 +01:00
Ludovic Courtès
39569dbb5f
profiles: 'profile-derivation' uses _IOLBF on Guile 2.0 only.
* guix/profiles.scm (profile-derivation)[builder]: Use _IOLBF on Guile
2.0 only.
2020-03-17 16:10:58 +01:00
Ludovic Courtès
b03753d8cc
tests: Fix compilation of 'gnu-make-for-tests'.
* guix/tests.scm (gnu-make-for-tests)[arguments]: Pass
"--disable-dependency-tracking" to #:configure-flags.
2020-03-17 15:49:06 +01:00
Ludovic Courtès
d8e98e853c
scripts: Refer to (default-guile) instead of 'guile-2.2'.
This is a followup to b6bee63bed4f013064c0d902e7c8b83ed7514ade.

* guix/scripts/environment.scm (guix-environment): Use (default-guile)
instead of (canonical-package guile-2.2) when parameterizing
'%guile-for-build'.
* guix/scripts/pack.scm (guix-pack): Likewise.
* guix/scripts/package.scm (guix-package*): Likewise.
* guix/scripts/pull.scm (guix-pull): Likewise.
2020-03-17 15:36:58 +01:00
Ludovic Courtès
2bc1a400ae
gexp: Change default Guile effective version to 3.0.
This is a followup to b6bee63bed4f013064c0d902e7c8b83ed7514ade.

* guix/gexp.scm (lower-gexp, gexp->derivation): #:effective-version
defaults to "3.0".
2020-03-17 15:32:36 +01:00
Ludovic Courtès
b6bee63bed
gnu: Default to Guile 3.0.
This patch changes three things:

  1. package derivations are built using Guile 3.0;

  2. 'gexp->derivation' defaults to Guile 3.0;

  3. "guile3.0-" packages are deprecated aliases for the regular
     package, which now depends on Guile 3.0; "guile2.2-" packages are
     introduced; "guile-next" is renamed to "guile".

* gnu/packages/guile.scm (guile-2.0/fixed): Remove.
(guile-3.0/fixed): New variable.
(package-for-guile-3.0): Remove.
(package-for-guile-2.2): New variable.
(define-deprecated-guile3.0-package): New macro.
(guile-3.0)[name]: Change to "guile".
(guile-json-3)[native-inputs, inputs]: New fields.
(guile2.2-json): New variable.
(guile3.0-json): Deprecate.
(guile-gdbm-ffi)[native-inputs]: Switch to GUILE-3.0.
(guile2.2-gdbm-ffi): New variable.
(guile3.0-gdbm-ffi): Deprecate.
(guile-sqlite3): Switch to GUILE-3.0.
(guile2.2-sqlite3): New variable.
(guile3.0-sqlite3): Deprecate.
(guile-bytestructures): Switch to GUILE-3.0.
(guile2.2-bytestructures): New variable.
(guile3.0-bytestructures): Deprecate.
(guile-git): Switch to GUILE-3.0.
(guile2.2-git): New variable.
(guile3.0-git): Deprecate.
(guile-2.2/bug-fix):
* gnu/packages/ci.scm (cuirass): Switch to GUILE-3.0.
* gnu/packages/emacs-xyz.scm (emacs-guix): Switch to GUILE-3.0.
* gnu/packages/gtk.scm (guile-cairo)[arguments]: New field.
Switch to GUILE-3.0.
(guile2.2-cairo): New variable.
(guile3.0-cairo): Deprecate.
(guile-rsvg): Switch to GUILE-3.0.
(guile2.2-cairo): New variable.
(guile3.0-cairo): Deprecate.
(guile-present): Switch to GUILE-3.0.
(guile2.2-present): New variable.
(guile3.0-present): Deprecate.
(guile-gnome)[propagated-inputs]: Use GUILE2.2-CAIRO and GUILE2.2-LIB.
* gnu/packages/guile-xyz.scm (guile-fibers)[arguments]: Add #:configure-flags.
Switch to GUILE-3.0.
(guile2.2-fibers): New variable.
(guile3.0-fibers): Deprecate.
(guile-syntax-highlight): Switch to GUILE-3.0.
(guile2.2-syntax-highlight): New variable.
(guile3.0-syntax-highlight): Deprecate.
(guile-colorized): Switch to GUILE-3.0.
(guile2.2-colorized): New variable.
(guile3.0-colorized): Deprecate.
(guile-pfds): Switch to GUILE-3.0.
(guile2.2-pfds): New variable.
(guile3.0-pfds): Deprecate.
(guile-simple-zmq): Switch to GUILE-3.0.
(guile2.2-simple-zmq): New variable.
(guile3.0-simple-zmq): Deprecate.
(guile-newt): Switch to GUILE-3.0.
(guile2.2-newt): New variable.
(guile3.0-newt): Deprecate.
(guile-parted): Switch to GUILE-3.0.
(guile2.2-parted): New variable.
(guile3.0-parted): Deprecate.
(guile-config): Switch to GUILE-3.0.
(guile2.2-config): New variable.
(guile3.0-config): Deprecate.
(guile-hall): Switch to GUILE-3.0.
(guile2.2-hall): New variable.
(guile3.0-hall): Deprecate.
(guile-ics): Switch to GUILE-3.0.
(guile2.2-ics): New variable.
(guile3.0-ics): Deprecate.
(guile-wisp)[arguments]: Add 'support-guile-3.0' phase.
Switch to GUILE-3.0.
(guile2.2-wisp): New variable.
(guile3.0-wisp): Deprecate.
(guile-lib): Switch to GUILE-3.0.
(guile2.2-lib): New variable.
(guile3.0-lib): Deprecate.
(guile-minikanren): Switch to GUILE-3.0.
(guile2.2-minikanren): New variable.
(guile3.0-minikanren): Deprecate.
(guile-irregex): Switch to GUILE-3.0.
(guile2.2-irregex): New variable.
(guile3.0-irregex): Deprecate.
(haunt): Switch to GUILE-3.0, and remove GUILE-READER.
(guile2.2-haunt): New variable.
(guile3.0-haunt): Deprecate.
(guile-commonmark): Switch to GUILE-3.0.
(guile2.2-commonmark): New variable.
(guile3.0-commonmark): Deprecate.
(mcron): Switch to GUILE-3.0.
(guile2.0-mcron): New variable.
(guile3.0-mcron): Deprecate.
(guile-picture-language): Switch to GUILE-3.0.
(guile2.2-picture-language): New variable.
(guile3.0-picture-language): Deprecate.
(guile-gi): Switch to GUILE-3.0.
(guile2.2-gi): New variable.
(guile3.0-gi): Deprecate.
(guile-hashing): Switch to GUILE-3.0.
(guile2.2-hashing): New variable.
(guile3.0-hashing): Deprecate.
* gnu/packages/package-management.scm (guix): Switch to GUILE-3.0.
(guile2.2-guix): New variable.
(guile3.0-guix): Deprecate.
(gwl): Replace "guile3.0-" with "guile-".
(guix-jupyter)[source]: Adjust for Guile 3.0.
Switch to GUILE-3.0.
* gnu/packages/ssh.scm (guile-ssh): Switch to GUILE-3.0.
(guile2.2-ssh): New variable.
(guile3.0-ssh): Deprecate.
* gnu/packages/admin.scm (shepherd): Switch to GUILE-3.0.
(guile2.2-shepherd): New variable.
(guile3.0-shepherd): Deprecate.
* gnu/packages/mail.scm (mailutils): Switch to GUILE-3.0.
(guile2.2-mailutils): New variable.
(guile3.0-mailutils): Deprecate.
* gnu/packages/plotutils.scm (guile-charting): Switch to GUILE-3.0.
(guile2.2-charting): New variable.
(guile3.0-charting): Deprecate.
* gnu/packages/version-control.scm (libgit2): Switch to GUILE-3.0.
* gnu/packages/vpn.scm (vpnc-scripts): Switch to GUILE-3.0.
* gnu/packages/web.scm (guix-data-service): Switch to GUILE-3.0.
(hpcguix-web): Switch to GUILE-3.0.
* guix/self.scm (specification->package): Refer to the "guile-" variants
instead of "guile3.0-".
* guix/gexp.scm (default-guile): Change to GUILE-3.0.
* build-aux/build-self.scm (build): #:guile-version defaults to "3.0".
* gnu/packages/commencement.scm (guile-final): Base on GUILE-3.0/FIXED.
2020-03-16 15:44:02 +01:00
Marius Bakke
961d2ee269
Merge branch 'master' into core-updates 2020-03-14 13:13:40 +01:00
Florian Pelz
771c5e155d
store: Fix many guix commands failing on some locales.
Partly fixes <https://bugs.gnu.org/39970>.

At least 'guix environment', 'guix install' and 'guix pull'
on 'az_AZ.utf8' and 'tr_TR.utf8' were affected.

* guix/store.scm (store-path-hash-part): Move base path detection to ...
(store-path-base): ... this new exported procedure.
(store-path-package-name): Use it instead of locale-dependent regexps.
(store-regexp*): Remove.
2020-03-14 07:09:14 +00:00
Mathieu Othacehe
8d003ca344
build-system: linux-module: Break some long lines.
* gnu/build/linux-modules.scm (make-linux-module-builder, lower): Break some
long commentary lines.
2020-03-17 16:51:14 +01:00
Julien Lepiller
06f0453ad2
guix: import: opam: Use a default repository.
* guix/import/opam.scm (opam->guix-package): Use a default value for
`repository`.
2020-03-17 00:06:23 +01:00
Ludovic Courtès
24fb0dc0ab
pack: Do not create a squashfs "recovery file".
Reported by Josh Marshall <Josh.Marshall@jax.org>.

* guix/scripts/pack.scm (squashfs-image)[build](mksquashfs): Always pass
"-no-recovery".
2020-03-13 17:33:38 +01:00
Ludovic Courtès
b829864d74
pack: Make bit-reproducible squashfs images.
Reported by Josh Marshall <Josh.Marshall@jax.org>.

* guix/scripts/pack.scm (squashfs-image)[build](mksquashfs): Always pass
"-all-time", "-mkfs-time", "-force-uid", and "-force-gid" to 'mksquashfs'.
2020-03-13 17:33:37 +01:00
Ludovic Courtès
b24ec85451
pack: Factorize 'mksquashfs' invocations.
* guix/scripts/pack.scm (squashfs-image)[build](mksquashfs): New
procedure.
Replace instances of (invoke "mksquashfs" ...) with (mksquashfs ...).
2020-03-13 17:33:37 +01:00
Ludovic Courtès
a0feabdfdb
weather: '--coverage' filters out non-package objects.
This is a followup to d37b5a1b58824dafbe6f32b1c183661c147c660c.

* guix/scripts/weather.scm (guix-weather): Filter PACKAGES passed to
'report-package-coverage'.
2020-03-13 17:33:37 +01:00
Ludovic Courtès
be764b47ad
weather: Exit with non-zero when coverage is below 100%.
* guix/scripts/weather.scm (report-server-coverage): Return the coverage ratio.
(guix-weather): Exit if and only if each server's coverage is 1.
2020-03-13 17:33:37 +01:00
Ludovic Courtès
2843fed0e9
weather: Allow for multiple '--manifest' options.
* guix/scripts/weather.scm (guix-weather)[package-list]: Account for all
the 'manifest entries in OPTS.
* doc/guix.texi (Invoking guix weather): Document it.
2020-03-12 18:32:16 +01:00
Ludovic Courtès
71bb485541
weather: Add '--display-missing'.
* guix/scripts/weather.scm (report-server-coverage): Add
 #:display-missing? and honor it.
(show-help, %options): Add "--display-missing".
(guix-weather): Pass #:display-missing? to 'report-server-coverage'.
* doc/guix.texi (Invoking guix weather): Document it.
2020-03-12 18:32:16 +01:00
Ludovic Courtès
cf2ac04f13
gexp: Add 'with-parameters'.
* guix/gexp.scm (<parameterized>): New record type.
(with-parameters): New macro.
(compile-parameterized): New gexp compiler.
* tests/gexp.scm ("with-parameters for %current-system")
("with-parameters for %current-target-system")
("with-parameters + file-append"): New tests.
* doc/guix.texi (G-Expressions): Document it.
2020-03-12 18:32:15 +01:00
Ludovic Courtès
f7537e30b8
inferior: Distinguish inferior exceptions.
This avoids ambiguities when looking at a backtrace where the exception
was actually thrown by an inferior in a very different context.

* guix/inferior.scm (&inferior-exception): New condition type.
(read-repl-response): Add optional 'inferior' parameter.  Raise
'&inferior-exception' instead of rethrowing to KEY when receiving an
'exception' message.
(read-inferior-response): Pass INFERIOR to 'read-repl-response'.
* tests/inferior.scm ("&inferior-exception"): New test.
2020-03-12 11:52:38 +01:00
Ludovic Courtès
c00ae79cca
import: cpan: Gracefully handle missing projects.
* guix/import/cpan.scm (cpan-fetch): Check whether 'json-fetch' returns #f.
2020-03-12 11:52:38 +01:00
Ludovic Courtès
2d0409a4a2
import: utils: Remove 'assoc-ref*'.
* guix/import/utils.scm (assoc-ref*): Remove.
2020-03-12 11:52:37 +01:00
Ludovic Courtès
7657e61d6b
import: pypi: Rewrite to use 'define-json-mapping'.
* guix/import/pypi.scm (non-empty-string-or-false): New procedure.
(<pypi-project>, <project-info>, <distribution>): New record types.
(pypi-fetch): Call 'json->pypi-project'.
(latest-source-release, latest-wheel-release): Use the new record
accessors instead of 'assoc-ref*'.
(pypi->guix-package, latest-release): Likewise.
* tests/pypi.scm (test-json): Add mandatory fields.
2020-03-12 11:52:37 +01:00
Ludovic Courtès
d8a822f462
download: Remove (web http) workarounds no longer relevant.
* guix/build/download.scm <top level>: Remove workarounds for
<https://bugs.gnu.org/23421> and for
<https://lists.gnu.org/archive/html/guix-devel/2017-11/msg00070.html>.
2020-03-11 18:42:09 +01:00
Ludovic Courtès
3c1ea8dcef
ui: Restore line wrapping for 'package->recutils'.
Fixes a regression introduced when switching to Guile 3.0.0 whereby
monkey-patching 'wrap*' wouldn't have any effects due to inlining.

* guix/ui.scm (%text-width): Define in terms of the '*line-width*' fluid
when it's defined.
<top level>: Set (@@ (texinfo plain-text) wrap*) only when
'*line-width*' is undefined.
2020-03-11 18:42:08 +01:00
Marius Bakke
50b99c90c8
Merge branch 'master' into core-updates 2020-03-10 20:50:02 +01:00
Tobias Geerinckx-Rice
df0bb509c2
download: Remove misbehaving kvin.lv mirror.
It issues bogus redirections instead of returning 404.

* guix/download.scm (%mirrors): Remove kvin.lv from CPAN.
2020-03-09 16:01:17 +01:00
Mathieu Othacehe
9a2f99f42f
gexp: Default to current target.
* guix/gexp.scm (lower-object): Set target argument to 'current by default and
look for the current target system at bind time if needed,
(gexp->file): ditto,
(gexp->script): ditto,
(lower-gexp): make sure lowered extensions are not cross-compiled.

* tests/gexp.scm: Add cross-compilation test-cases for gexp->script and
gexp->file with a target passed explicitely and with a default target.
2020-03-08 20:28:31 +01:00