Commit Graph

4901 Commits

Author SHA1 Message Date
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
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 9f1b787120.
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 8ed597f4a2, 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 62195b9a8f 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
5c8c8c4554.
2020-04-03 12:58:14 +02:00
Ludovic Courtès 4efbb079b5
guix system: Remove unused procedure.
This procedure was unused since
5c8c8c4554.

* 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 5517750344.
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 710854304b.

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
131f50cdc9 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 2b6fe60599, 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