Commit Graph

5160 Commits

Author SHA1 Message Date
Christopher Baines 22b3a95f6e
build-system/maven: Make default-maven-plugins a procedure.
This allows compiling the module without the (gnu packages maven) module being
available.

* guix/build-system/maven.scm (%default-maven-plugins): Rename to
default-maven-plugins, and convert to a procedure.
* doc/guix.texi (maven-build-system): Update.
2020-07-17 09:45:19 +01:00
Julien Lepiller 55b90c9053
guix: Add maven-build-system.
* guix/build-system/maven.scm: New file.
* guix/build/maven-build-system.scm: New file.
* Makefile.am (MODULES): Add them.
* doc/guix.texi (Build Systems): Document the maven build system.
2020-07-17 04:21:22 +02:00
Julien Lepiller 3d3bc413b4
guix: java-utils: Add Maven-related phases.
* guix/build/maven/java.scm: New file.
* guix/build/maven/plugin.scm: New file.
* guix/build/maven/pom.scm: New file.
* Makefile.am (MODULES): Add them.
* guix/build-system/ant.scm (%ant-build-system-modules): Add them to the
build side.
* guix/build/java-utils.scm (generate-plugin.xml, install-pom-file)
(install-from-pom): New procedures.
2020-07-17 04:10:28 +02:00
Ludovic Courtès a168c3e4f8
ui: 'with-error-handling' does not unwind the stack.
Since a07d5e558b, we've been getting
useless backtraces upon unhandled errors, like this:

  Backtrace:
	     1 (primitive-load "/home/…/bin/guix")
  In guix/ui.scm:
    1953:12  0 (run-guix-command _ . _)

  guix/ui.scm:1953:12: In procedure run-guix-command:
  In procedure struct-vtable: Wrong type argument in position 1 (expecting struct): #f

This change finally gives us real backtraces back.

* guix/ui.scm (guard*): New macro.
(call-with-error-handling): Use it instead of 'guard'.
2020-07-15 01:36:24 +02:00
Ludovic Courtès b91a73a6a4
services: Add 'system-provenance' procedure.
* gnu/services.scm (sexp->channel, system-provenance): New procedures.
* guix/scripts/system.scm (sexp->channel): Remove.
(display-system-generation): Use 'system-provenance' instead of parsing
the "provenance" file right here.
2020-07-15 01:36:24 +02:00
Ludovic Courtès efb10f175f
packages: Ensure bags are insensitive to '%current-system'.
Fixes <https://bugs.gnu.org/42327>.
Reported by Jan Nieuwenhuizen <janneke@gnu.org>.

This is a followup to f52fbf7094.

* guix/packages.scm (bag-transitive-inputs, bag-transitive-build-inputs)
(bag-transitive-host-inputs, bag-transitive-target-inputs): Parameterize
%CURRENT-SYSTEM in addition to %CURRENT-TARGET-SYSTEM.
* tests/packages.scm ("package->bag, sensitivity to %current-system"):
New test.
2020-07-13 16:49:12 +02:00
Ludovic Courtès c10526672e
lint: source: Validate URLs of Git references.
Until now the 'source' checker would look at URL for 'url-fetch' origins
but not for 'git-fetch' origins.

* guix/lint.scm (check-source): Add case for 'git-reference?'.
* tests/lint.scm ("source, git-reference: 301 -> 200"): New test.
2020-07-12 22:41:51 +02:00
Jan (janneke) Nieuwenhuizen fdef0d85ce
scripts: Typo in args-fold*.
* guix/scripts.scm (args-fold*): Add missing 'args' parameter so that
the all parameter names match their value.
2020-07-12 10:07:59 +02:00
Jan (janneke) Nieuwenhuizen 4b9eecd322
image: Do not set journal_model=WAL for the Hurd.
This fixes <https://bugs.gnu.org/42151>.

* gnu/system/images/hurd.scm (hurd-initialize-root-partition): Use #:wal-mode #f
in call to ...
* gnu/build/image.scm (initialize-root-partition): ... this, add #:wal-mode?
parameter, pass it to ...
(register-closure): ... this, add #:wal-mode? parameter, pass it to ...
* guix/store/database.scm (with-database): ... this, add #:wal-mode?
parameter, pass it to ...
(call-with-database): ... this, add #:wal-mode? parameter; when
set to #f, do not set journal_model=WAL.
2020-07-11 16:34:01 +02:00
Ludovic Courtès a98712785e
Add 'guix git authenticate'.
* guix/scripts/git.scm, guix/scripts/git/authenticate.scm,
tests/guix-git-authenticate.sh: New files.
* Makefile.am (MODULES): Add the *.scm files.
(SH_TESTS): Add 'tests/guix-git-authenticate.sh'.
* doc/guix.texi (Channels)[Specifying Channel Authorizations]: Mention
'guix git authenticate'.
(Invoking guix git authenticate): New node.
* po/guix/POTFILES.in: Add 'guix/scripts/git.scm' and
'guix/scripts/git/authenticate.scm'.
2020-07-11 12:33:01 +02:00
Ludovic Courtès 69db2993b5
git: Add 'with-git-error-handling'.
* guix/scripts/pull.scm (report-git-error, with-git-error-handling):
Move to...
* guix/git.scm: ... here.
* guix/scripts/time-machine.scm: Adjust accordingly.
2020-07-11 11:51:56 +02:00
Ludovic Courtès 838f2bdfa8
git-authenticate: Factorize 'authenticate-repository'.
* guix/git-authenticate.scm (repository-cache-key)
(verify-introductory-commit, authenticate-repository): New procedures.
* guix/channels.scm (verify-introductory-commit): Remove.
(authenticate-channel): Rewrite in terms of 'authenticate-repository'.
2020-07-11 11:51:52 +02:00
Ludovic Courtès 8d49c80b69
download-nar: Hide colliding 'dump-port*' binding.
* guix/build/download-nar.scm: Hide 'dump-port*' from (guix
serialization).
2020-07-10 00:20:09 +02:00
Ludovic Courtès a055604e6f
cve: Fix typos in <cve> accessor.
* guix/cve.scm (<cve>)[references]: Rename accessor to 'cve-references'
and fix adjust exported name accordingly.
2020-07-10 00:11:00 +02:00
Ludovic Courtès a7696b9733
git-download: Don't verify X.509 certificate of SWH.
Fixes <https://bugs.gnu.org/42286>.

Regression introduced with the switch to Guile 3.0 in commit
b6bee63bed.

* guix/git-download.scm (git-fetch): Parameterize %VERIFY-SWH-CERTIFICATE.
2020-07-10 00:11:00 +02:00
Ludovic Courtès 722ad41c44
swh: Allow callers to disable X.509 certificate verification.
* guix/swh.scm (%verify-swh-certificate?): New parameter.
(http-get*, http-post*): New procedures.
(request-rate-limit-reached?): Use 'http-post*' instead of 'http-post'.
(update-rate-limit-reset-time!): Likewise.
(request-cooking): Likewise.
(call): Method defaults to 'http-get*' instead of 'http-get'.  Pass
 #:verify-certificate? to METHOD.
(vault-fetch): Likewise.
2020-07-10 00:11:00 +02:00
Ludovic Courtès d283bb960f
maint: Remove traces of "berlin.guixsd.org".
The guixsd.org domain is no longer advertised since before in 1.0.0
release in May 2019.

* etc/substitutes/berlin.guixsd.org.pub: Rename to...
* etc/substitutes/berlin.guix.gnu.org.pub: ... this.
* etc/substitutes/ci.guix.gnu.org.pub,
etc/substitutes/ci.guix.info.pub: Adjust accordingly.
* gnu/services/base.scm (%default-authorized-guix-keys): Likewise.
* guix/build/download-nar.scm (urls-for-item): Likewise.
* guix/self.scm (miscellaneous-files): Likewise.
* Makefile.am (dist_pkgdata_DATA): Likewise.
2020-07-10 00:11:00 +02:00
Arun Isaac 81a11883dc
weather: Print 0.0% correctly.
* guix/scripts/weather.scm (report-server-coverage): Report 0% coverage as
0.0%, not as .0%.
2020-07-05 16:13:37 +05:30
Arun Isaac a2daee843d
import: pypi: Handle 'null instead of #nil.
* guix/import/pypi.scm (non-empty-string-or-false): guile-json now returns
'null instead of #nil for null JSON values. Handle it.
2020-07-05 16:11:21 +05:30
Arun Isaac 9e85f652cb
discovery: Fix typo.
* guix/discovery.scm (fold-module-public-variables*): In the docstring,
replace (PROC MODULE SYMBOL VARIABLE) with (PROC MODULE SYMBOL VARIABLE
RESULT).
2020-07-05 16:07:59 +05:30
Tobias Geerinckx-Rice 5733ba7dd8
download: Replace misconfigured Apache mirror.
E.g. <http://apache.belnet.be/jakarta/oro/jakarta-oro-2.0.8.tar.gz>
redirects to a bogus 200 HTML page.

* guix/download.scm (%mirrors): Replace apache.belnet.be with
ftp.nluug.nl.
2020-07-05 08:23:35 +02:00
Arun Isaac 15c29a8a34
combinators: Fix typo.
* guix/combinators.scm (fold2): Replace "a two lists" with "two lists".
2020-07-05 03:15:08 +05:30
Ludovic Courtès f54cbc0e1b
import: Do not assume that 'package-source' returns an origin.
* guix/gnu-maintenance.scm (gnu-package?): Check whether
'package-source' returns an origin.
* guix/import/github.scm (updated-github-url): Likewise.
* guix/import/launchpad.scm (updated-launchpad-url): Likewise.
2020-07-03 23:53:31 +02:00
Ludovic Courtès 00290e7365
upstream: Define 'url-predicate' and use it.
* guix/upstream.scm (url-predicate): New procedure.
(url-prefix-predicate): Define in terms of 'url-predicate'.
* guix/import/cpan.scm (cpan-package?): Use 'url-predicate'.
* guix/import/cran.scm (cran-package?)
(bioconductor-package?)
(bioconductor-data-package?)
(bioconductor-experiment-package?): Likewise.
* guix/import/crate.scm (crate-package?): Likewise.
* guix/import/elpa.scm (package-from-gnu.org?): Likewise.
* guix/import/hackage.scm (hackage-package?): Likewise.
* guix/import/pypi.scm (pypi-package?): Likewise.
* guix/import/gem.scm (gem-package?): Use 'url-prefix-predicate'.
2020-07-03 23:53:31 +02:00
Ludovic Courtès 37c3e0bbaf
lint: Do not assume that a package's source is an origin.
* guix/lint.scm (check-source-file-name): Ensure ORIGIN is an origin.
(check-patch-file-names)[patches]: Likewise.
(check-source): Likewise.
2020-07-03 23:53:31 +02:00
Jan (janneke) Nieuwenhuizen 28febfafbb
guix system: "describe" displays multiboot info.
* guix/scripts/system.scm (display-system-generation): Display
multiboot-modules commands if set.
2020-07-03 09:28:16 +02:00
Ludovic Courtès 31522dfa19
Revert "ui: Use package-description-string."
This reverts commit bd03e99f66.

Reported by Ekaitz Zarraga <ekaitz@elenq.tech> at
<https://lists.gnu.org/archive/html/guix-devel/2020-06/msg00338.html>.

That commit broke would prevent "description: " from being taken into
account by the 'texi->plain-text' paragraph filling code.
2020-07-02 23:54:02 +02:00
Ludovic Courtès d774c7b121
channels: Dependencies listed in '.guix-channel' can have an introduction.
Suggested by Ricardo Wurmus and Simon Tournier.

* guix/channels.scm (sexp->channel-introduction): New procedure.
(read-channel-metadata): Use it.
(profile-channels)[sexp->channel-introduction]: Remove.
* tests/channels.scm ("latest-channel-instances, authenticate dependency"):
New test.
* doc/guix.texi (Channels)[Declaring Channel Dependencies]: Augment example.
2020-07-01 23:34:51 +02:00
Ludovic Courtès eb5cf39e66
services: provenance: Save channel introductions.
* gnu/services.scm (channel->code): Include CHANNEL's introduction, if
any, unless CHANNEL is the singleton %DEFAULT-CHANNELS.
(channel->sexp): Add comment.
* guix/scripts/system.scm (sexp->channel): Change pattern to allow for
extensibility.
2020-07-01 23:34:51 +02:00
Ludovic Courtès 6d39f0cb77
guix describe: Display channel introductions and add 'channels-sans-intro'.
* guix/scripts/describe.scm (%available-formats): Add "channels-sans-intro".
(channel->sexp): Add #:include-introduction?.  Emit CHANNEL's intro if
INCLUDE-INTRODUCTION? is true and CHANNEL has an introduction.
(channel->json): Include CHANNEL's introduction, if any.
(channel->recutils): Likewise.
(display-profile-info): Add 'channels-sans-intro' case.
* doc/guix.texi (Invoking guix describe): Add introduction in example.
Add 'channels-sans-intro' case.
2020-07-01 23:34:51 +02:00
Ludovic Courtès 471550c28c
channels: Save and interpret 'introduction' field in provenance data.
With this change, profiles created by 'guix pull' & co. include channel
introductions as part of the channel metadata of each manifest entry.

* guix/channels.scm (channel-instances->manifest)[instance->entry]: Add
'introduction' field when CHANNEL has an introduction.
(profile-channels)[sexp->channel-introduction]: New procedure.
Use it to initialize the 'introduction' field.
2020-07-01 23:34:51 +02:00
Ludovic Courtès 22a9699257
channels: Remove 'signature' from <channel-introduction>.
In the end signing the commit/key pair does not buy us much.  Someone
publishing a valid but different commit/key pair would effectively be
publishing a different channel, which could be a fork (made by a former
authorized developer) or simply a mirror.  In the latter case, there's
nothing to be gained by publishing a different commit/key pair.

* guix/channels.scm (<channel-introduction>)[signature]: Remove.
(make-channel-introduction): Adjust accordingly.
2020-07-01 23:34:51 +02:00
Ludovic Courtès 8b7d982e6a
channels: Make channel introductions public.
* guix/channels.scm (<channel-introduction>): Rename constructor to
'%make-channel-introduction'.
(make-channel-introduction): New procedure.
* tests/channels.scm ("authenticate-channel, wrong first commit signer")
("authenticate-channel, .guix-authorizations"): Use
'make-channel-introduction' without '@@' and without third argument.
* doc/guix.texi (Channels)[Channel Authentication, Specifying Channel
Authorizations]: New subsections.
2020-07-01 23:34:51 +02:00
Ludovic Courtès 6577682a6c
channels: Add 'openpgp-fingerprint->bytevector'.
* guix/channels.scm (openpgp-fingerprint->bytevector): New procedure.
(openpgp-fingerprint): New macro.
(%guix-channel-introduction): Use it.
2020-07-01 23:34:50 +02:00
Guillaume Le Vaillant cdf34eed33
guix: build: Fix asdf-build-system/ecl.
* guix/build/lisp-utils.scm (make-asd-file): Fix value of 'component?'
  parameter when using ECL.
2020-07-01 16:14:21 +02:00
Ludovic Courtès d2fde340ad
lint: Adjust 'swh-error exception handler.
* guix/lint.scm (check-archival): Change first clause to match only
'swh-error keys.
2020-06-30 00:18:28 +02:00
Ludovic Courtès cc6dd2981c
swh: Adjust for Guile-JSON 4.0 null handling.
* guix/swh.scm (string*): Add clause for 'null.
2020-06-30 00:18:28 +02:00
Ludovic Courtès 4f060bf2fe
pack: Dereference symlinks when looking for executables.
Fixes <https://bugs.gnu.org/42127>.
Reported by Andrius Štikonas <andrius@stikonas.eu>.

* guix/scripts/pack.scm (wrapped-package)[build]: Add trailing slash to
the arguments to 'find-files'.
2020-06-30 00:18:28 +02:00
zimoun b032d14ebd
build-system/r: bioconductor-uri: Fix archive URL.
* guix/build-system/r.scm (bioconductor-uri): Fix archive URL.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-06-30 00:18:27 +02:00
Marius Bakke fdbba544d8
Add more missing (ice-9 format) imports.
* gnu/machine/ssh.scm: Import (ice-9 format).
* guix/scripts/graph.scm: Likewise.
* guix/scripts/system/search.scm: Likewise.
* guix/remote.scm: Likewise.
2020-06-28 23:32:52 +02:00
Ludovic Courtès ead5c46147
channels: Error out when the 'guix' channel lacks an introduction.
* guix/channels.scm (latest-channel-instance): Raise an error instead of
warning when 'guix is unauthenticated.
* tests/channels.scm ("latest-channel-instances, missing introduction for 'guix'"):
New test.
2020-06-28 23:26:53 +02:00
Ludovic Courtès 1acc5e11be
processes: Write to $PAGER.
* guix/ui.scm (with-paginated-output-port): Export.
* guix/scripts/processes.scm (guix-processes): Use it instead of writing
directly to (current-output-port).
2020-06-28 23:26:53 +02:00
Ludovic Courtès 0505eda9c7
packages: Recognize SHA3 and BLAKE2s for 'content-hash'.
* guix/packages.scm (build-content-hash): Add 'sha3-256', 'sha3-512',
and 'blake2s-256'.
* tests/packages.scm ("package-source-derivation, origin, sha3-512"):
New test.
2020-06-27 23:42:20 +02:00
Ludovic Courtès 641631c1a2
store: Use '=' instead of 'eqv?'.
Fixes <https://bugs.gnu.org/42047>.
Reported by Jan Nieuwenhuizen <janneke@gnu.org>.

* guix/store.scm (open-connection): Use '=' instead of 'eqv?'.
This works around <https://bugs.gnu.org/42060> while also being more
accurate since the arguments are known to be integers.
2020-06-26 16:19:53 +02:00
Ludovic Courtès 6b2e91b1fc
challenge: Fix option indentation in '--help' output.
* guix/scripts/challenge.scm (show-help): Indent '--verbose' and
'--diff' correctly (high tech!).
2020-06-26 16:19:53 +02:00
Ludovic Courtès 25b267afed
Add more (ice-9 format) imports.
* guix/scripts/describe.scm: Add missing (ice-9 format).
* guix/scripts/system.scm: Likewise.
2020-06-26 16:19:53 +02:00
Ludovic Courtès 3b7145d821
deduplication: Leave the store permissions unchanged.
Suggested by Caleb Ristvedt <caleb.ristvedt@cune.org>.

* guix/store/deduplication.scm (call-with-writable-file): Call THUNK
directly when FILE is (%store-directory).
2020-06-25 12:29:23 +02:00
Ludovic Courtès 6b654a3332
deduplication: Fix default value of #:store in 'deduplicate'.
* guix/store/deduplication.scm (deduplicate): Change #:store default
value to (%store-directory).
2020-06-25 12:29:23 +02:00
Ludovic Courtès d52e16d3b6
deduplication: Use 'dynamic-wind' when changing permissions of the parent.
Suggested by Caleb Ristvedt <caleb.ristvedt@cune.org>.

* guix/store/deduplication.scm (call-with-writable-file): New procedure.
(with-writable-file): New macro.
(replace-with-link): Use it.
2020-06-25 12:29:22 +02:00
Ludovic Courtès 6f233040d3
openpgp: Use Libgcrypt's crc24 implementation.
This gives an 18% speedup on the wall-clock time of:

  guile -c '(use-modules (git) (guix git-authenticate)) (load-keyring-from-reference (repository-open ".") "keyring")'

* guix/openpgp.scm (crc24): Rewrite by calling out to 'bytevector-hash'.
2020-06-23 23:39:42 +02:00