Commit Graph

3652 Commits

Author SHA1 Message Date
Ludovic Courtès
a3b72a8f17
ci: Add procedures to access evaluations.
* guix/ci.scm (<checkout>, <evaluation>): New record types.
(latest-builds): Add #:evaluation and #:system and honor it.  Define
'option'.
(json->checkout, json->evaluation, latest-evaluations)
(evaluations-for-commit): New procedures.
2018-11-10 23:33:46 +01:00
Ludovic Courtès
5230dce154
gnu-maintenance: Base kernel.org updater on HTML directory listings.
Partially fixes <https://bugs.gnu.org/28159>.

The FTP server at ftp.free.fr had become unable to produce directory
listings, effectively making the updater dysfunctional.  Furthermore FTP
is considered obsolescent so HTTP + HTML looks more future-proof.

* guix/gnu-maintenance.scm (html->sxml, html-links)
(latest-html-release): New procedures.
(latest-kernel.org-release): Rewrite in terms of 'latest-html-release'.
2018-11-10 23:33:46 +01:00
Ludovic Courtès
bc1ff4aaba
gnu-maintenance: ".sign" and ".asc" files no longer match 'release-file?'.
* guix/gnu-maintenance.scm (release-file?): Exclude ".sign" and ".asc"
file in addition to ".sig".
2018-11-10 23:33:46 +01:00
Ludovic Courtès
ea68b3f652
pull: Add missing monadic 'return'.
Fixes a regression introduced in
5f7dd092ca where, upon completion, 'guix
pull' would fail (instead of printing the new/upgraded packages) with
ugly errors like:

  successfully built /gnu/store/…-profile.drv
  1 package in profile
  Backtrace:
  […]
  In guix/store.scm:
    1605:24  1 (run-with-store _ _ #:guile-for-build _ #:system _ # _)
  In unknown file:
	     0 (_ #<build-daemon 256.97 2476b40>)

  ERROR: Wrong type to apply: #t

Reported by thorwil on #guix.

* guix/scripts/pull.scm (build-and-install): Add missing 'return' when
DRY-RUN? is wrong.
2018-11-07 21:56:16 +01:00
Ludovic Courtès
72dc64f8f7
store-copy: Canonicalize the mtime and permissions of the store copy.
Fixes a bug whereby directories in the output of 'guix pack -f tarball'
would not be read-only.

* guix/build/store-copy.scm (reset-permissions): New procedure.
(populate-store): Pass #:keep-mtime? #t to 'copy-recursively'.  Call
'reset-permissions'.
* tests/pack.scm ("self-contained-tarball"): In CHECK, define
'canonical?' and use it to check that every file has an mtime of 1 and
is read-only.
* tests/guix-pack.sh: Invoke "chmod -Rf +w" before "rm -rf" in trap.
2018-11-06 23:21:24 +01:00
Ludovic Courtès
598a6b87cc
pack: Squashfs backend now honors '--localstatedir'.
* guix/scripts/pack.scm (squashfs-image)[database]: New variable.
[build]: Add (gnu build install) to the closure.  Call
'install-database-and-gc-roots' when DATABASE is true, and invoke
mksquashfs once more.
* tests/pack.scm ("squashfs-image + localstatedir"): New test.
2018-11-06 23:21:24 +01:00
Ludovic Courtès
f5a2fb1bfb
pack: Docker backend now honors '--localstatedir'.
* guix/docker.scm (build-docker-image): Add #:database parameter.
Create /var/guix/db, /var/guix/profiles, etc. when DATABASE is true.
* guix/scripts/pack.scm (docker-image): Export.  Remove #:deduplicate?
parameter.  Define 'database' and pass it to 'docker-image'.
* tests/pack.scm (test-assertm): Recompile the derivation of
%BOOTSTRAP-GUILE.
("docker-image + localstatedir"): New test.
2018-11-06 23:21:24 +01:00
Ludovic Courtès
b27ef1d46c
pack: Import (guix store database) only when '--localstatedir' is passed.
This is another way to address <https://bugs.gnu.org/32184>, which was
previously addressed in commit 19c924af4f.

* gnu/build/install.scm (register-closure): Move to...
* gnu/build/vm.scm (register-closure): ... here.  New procedure.
* guix/scripts/pack.scm (self-contained-tarball)[build]: Remove
now unneeded 'with-extensions' form and custom (guix config) module.
* tests/guix-pack.sh: Revert the strategy from
commit 19c924af4f.
* tests/pack.scm ("self-contained-tarball"): Likewise.
2018-11-06 23:21:23 +01:00
Ludovic Courtès
ec4c81fe32
pack: Move store database creation to a separate derivation.
* guix/scripts/pack.scm (store-database): New procedure.
(self-contained-tarball): Use it when LOCALSTATEDIR? is true.
Remove 'schema' and add 'database'.
[build]: Pass DATABASE to 'populate-single-profile-directory'.
(squashfs-image): Remove #:deduplicate? parameter.
[build]: Remove (gnu build install) and (guix config) from the imported
modules.  Remove 'with-extensions'.
* gnu/build/install.scm (populate-single-profile-directory): Remove
 #:deduplicate?, #:register?, and #:schema; add #:database.  Remove call
to 'register-closure' and simply copy DATABASE instead.
2018-11-06 23:21:23 +01:00
Ricardo Wurmus
9da4848632
guix: Update to Bioconductor 3.8.
* guix/import/cran.scm (%bioconductor-version): Update to 3.8.
* guix/build-system/r.scm (bioconductor-uri): Update archive URL.
2018-11-06 18:21:24 +01:00
Ludovic Courtès
e3744779aa
self: Install shell completion files.
* guix/self.scm (miscellaneous-files): New procedure.
(whole-package): Remove #:substitute-keys, add #:miscellany.
[build]: Remove code for SUBSTITUTE-KEYS and add code to copy MISCELLANY
to OUTPUT.
(compiled-guix): Adjust call to 'whole-package'.
2018-11-06 17:00:02 +01:00
Ludovic Courtès
6cf502d164
self: Rename 'sub-directory' to 'file-append*'.
* guix/self.scm (sub-directory): Rename to...
(file-append*): ... this.  Add #:recursive? parameter and pass it to
'local-file'.
(locale-data, info-manual, compiled-guix): Adjust accordingly.
2018-11-06 17:00:02 +01:00
Maxim Cournoyer
2e4d83398b
ssh: Honor the SOCKET-NAME argument of connect-to-remote-daemon.
* guix/ssh.scm (connect-to-remote-daemon): Pass the `socket-name' variable to
the `open-connection' call so that it is honored.
2018-11-05 21:28:59 -05:00
Ludovic Courtès
8d3beb3a44
self: Install substitute keys.
* guix/self.scm (whole-package): Add #:substitute-keys and honor it.
(compiled-guix): Pass #:substitute-keys to 'whole-package' when
PULL-VERSION is one.
2018-11-06 00:04:11 +01:00
Ludovic Courtès
cbe7387c04
self: Remove extra paren in manual version string.
* guix/self.scm (info-manual)[build]: Remove extra closing paren in
VERSION.
2018-11-06 00:04:11 +01:00
Ludovic Courtès
5f7dd092ca
pull: Make '--dry-run' behave as expected.
* guix/scripts/pull.scm (show-help): Document '--dry-run'.
(build-and-install): Add #:dry-run? parameter and honor it.
(guix-pull): Remove (assoc-ref opts 'dry-run?) condition.  Instead, pass
it as #:dry-run? to 'build-and-install'.
* doc/guix.texi (Invoking guix pull): Document '--dry-run'.  Move
'--verbose' to the bottom.
2018-11-06 00:04:11 +01:00
Maxim Cournoyer
2f18b7329d
git-download: Print a message when falling back to a full fetch.
Otherwise the user might believe that git-fetch stalled, observing the lack of
output following a 'fatal' git error message (see:
https://debbugs.gnu.org/33100).

* guix/build/git.scm (git-fetch): Print message when falling back to a full
fetch.
2018-10-28 22:17:17 -04:00
Ludovic Courtès
63eb2b899b
Add 'guix processes'.
* guix/scripts/processes.scm, tests/processes.scm: New files.
* Makefile.am (MODULES): Add the former.
(SCM_TESTS): Add the latter.
* po/guix/POTFILES.in: Add guix/scripts/processes.scm.
* doc/guix.texi (Invoking guix processes): New node.
(Invoking guix-daemon): Reference it.
2018-10-29 00:13:38 +01:00
Arun Isaac
69b0a847fb
import: hackage: Do not repeat inputs in native-inputs.
* guix/import/hackage.scm (hackage-module->sexp): Do not repeat inputs again
in native-inputs. native-inputs should only contain packages that are not
already listed in inputs.
2018-10-28 13:51:20 +05:30
Ludovic Courtès
932d160056
gexp: 'gexp-modules' now consistently deletes duplicates.
Fixes <https://bugs.gnu.org/32966>.
Reported by Clément Lassieur <clement@lassieur.org>.

* guix/gexp.scm (gexp-attribute): Add 'equal?' optional parameter; pass
it to 'delete-duplicates'.
(gexp-modules)[module=?]: New procedure.
Pass it to 'gexp-attribute'.
* tests/gexp.scm ("gexp-modules deletes duplicates"): New test.
2018-10-27 16:39:29 +02:00
Ludovic Courtès
003789e837
pack: Hide 'zip' colliding binding.
* guix/scripts/pack.scm: Hide 'zip' from (gnu packages compression).
2018-10-27 16:39:29 +02:00
Ludovic Courtès
46727e3a9d
pack: Remove unused variable.
* guix/scripts/pack.scm (self-contained-tarball)[libgcrypt]: Remove.
2018-10-27 16:39:29 +02:00
Ludovic Courtès
fdc4f665dc
profiles: Fix typo in exports.
* guix/profiles.scm (&profile-collistion-error): Fix typo in export list.
2018-10-26 20:05:21 +02:00
Ludovic Courtès
62a14bd26f
scripts: Suggest running 'guix gc' when we're short on disk space.
* guix/scripts.scm (%disk-space-warning): New variable.
(warn-about-disk-space): New procedure.
* guix/scripts/package.scm (build-and-use-profile): Use it.
* guix/scripts/system.scm (process-action): Likewise.
2018-10-23 01:04:39 +02:00
Ludovic Courtès
19c924af4f
tests: Run 'guix pack' tests using the external store.
Fixes <https://bugs.gnu.org/32184>.

* guix/tests.scm (call-with-external-store): New procedure.
(with-external-store): New macro.
* tests/pack.scm (%store): Remove.
(test-assertm): Add 'store' parameter.
("self-contained-tarball"): Wrap in 'with-external-store'.
* tests/guix-pack.sh: Connect to the external store, if possible, by
setting NIX_STORE_DIR and GUIX_DAEMON_SOCKET.  Remove most uses of
'--bootstrap'.
2018-10-19 18:28:57 +02:00
Ludovic Courtès
fbdb7b9526
pack: Fix "-C none -f tarball".
Fixes a regression introduced in
48b444304e whereby "guix pack -C none
hello" would fail with:

  ERROR: In procedure string-join:
  In procedure string-join: Wrong type argument in position 1: #f
  builder for `/gnu/store/…-tarball-pack.tar.drv' failed with exit code 1

* guix/scripts/pack.scm (self-contained-tarball): Adjust for when
'compressor-command' returns #f.
2018-10-19 18:28:57 +02:00
Leo Famulari
7277d06d8b
gnu: Use pypi.org.
<pypi.io> redirects to <pypi.org>.

* guix/build-system/python.scm (pypi-uri): Replace pypi.io with pypi.org.
* guix/import/pypi.scm (pypi-url?): Likewise.
* tests/pypi.scm: Likewise.
2018-10-18 23:46:33 -04:00
Ludovic Courtès
39d7fdce45
services: dhcp-client: Deprecate 'dhcp-client-service' procedure.
* gnu/services/networking.scm (dhcp-client-service-type): Add default
value.
* gnu/system/examples/bare-bones.tmpl: Use (service
dhcp-client-service-type) instead of (dhcp-client-service).
* gnu/system/examples/beaglebone-black.tmpl: Likewise.
* gnu/tests/base.scm (%avahi-os): Likewise.
* gnu/tests/databases.scm (%memcached-os): Likewise.
(%mongodb-os): Likewise.
* gnu/tests/dict.scm (%dicod-os): Likewise.
* gnu/tests/mail.scm (%opensmtpd-os): Likewise.
(%exim-os): Likewise.
(%dovecot-os): Likewise.
* gnu/tests/messaging.scm (run-xmpp-test): Likewise.
(run-bitlbee-test): Likewise.
* gnu/tests/monitoring.scm (%prometheus-node-exporter-os): Likewise.
* gnu/tests/networking.scm (%inetd-os): Likewise.
(run-iptables-test): Likewise.
* gnu/tests/nfs.scm (%base-os): Likewise.
* gnu/tests/rsync.scm (%rsync-os): Likewise.
* gnu/tests/ssh.scm (run-ssh-test): Likewise.
* gnu/tests/version-control.scm (%cgit-os): Likewise.
(%git-http-os): Likewise.
(%gitolite-os): Likewise.
* gnu/tests/virtualization.scm (%libvirt-os): Likewise.
* gnu/tests/web.scm (%httpd-os): Likewise.
(%nginx-os): Likewise.
(%varnish-os): Likewise.
(%php-fpm-os): Likewise.
(%hpcguix-web-os): Likewise.
(%tailon-os): Likewise.
* tests/guix-system.sh: Likewise.
* doc/guix.texi (Networking Services): Document
'dhcp-client-service-type' and remove 'dhcp-client-service'.
2018-10-18 01:12:22 +02:00
Pierre Neidhardt
c4d62443eb
import cran: Document "recursive" option.
* guix/scripts/import/cran.scm: (show-help): Document "recursive" option.
2018-10-17 13:06:25 +02:00
Eric Bavier
278f86a43f
ui: Fix port-buffering with guile@2.0.
* guix/status.scm (build-event-output-port)[guile@2.0]: Do not call 'setvbuf'
on custom binary port.
* tests/status.scm (current-build-output-port, UTF-8 + garbage)[guile@2.0]:
Use "?" in place of REPLACEMENT CHARACTER.
2018-10-16 17:12:09 -05:00
Danny Milosavljevic
ad0082afe0
import: json: Handle the error case.
* guix/import/json.scm (json-fetch-alist): Handle the error case.
2018-10-16 23:17:36 +02:00
Ludovic Courtès
f9a8fce10f
status: Build upon multiplexed build output.
This allows for more accurate status tracking and parsing of extended
build traces.

* guix/status.scm (multiplexed-output-supported?): New procedure.
(print-build-event): Don't print \r when PRINT-LOG? is true.
Adjust 'build-log' handling for when 'multiplexed-output-supported?'
returns true.
(bytevector-index, split-lines): New procedures.
(build-event-output-port)[%build-output-pid, %build-output]
[%build-output-left]: New variables.
[process-line]: Handle "@ build-output" traces.
[process-build-output]: New procedure.
[write!]: Add case for when %BUILD-OUTPUT-PID is true.  Use
'bytevector-index' rather than 'string-index'.
(compute-status): Add #:derivation-path->output-path.  Use it.
* tests/status.scm ("compute-status, multiplexed build output"):
New test.
("build-output-port, UTF-8")
("current-build-output-port, UTF-8 + garbage"): Adjust to new
'build-log' output.
* guix/scripts/build.scm (set-build-options-from-command-line):
Pass #:multiplexed-build-output?.
(%default-options): Add 'multiplexed-build-output?'.
* guix/scripts/environment.scm (%default-options): Likewise.
* guix/scripts/pack.scm (%default-options): Likewise.
* guix/scripts/package.scm (%default-options): Likewise.
* guix/scripts/pull.scm (%default-options): Likewise.
* guix/scripts/system.scm (%default-options): Likewise.
2018-10-15 23:06:55 +02:00
Ludovic Courtès
6ef61cc4c3
daemon: Support multiplexed build output.
This allows clients to tell whether output comes from the daemon or, if
it comes from a builder, from which builder it comes.  The latter is
particularly useful when MAX-BUILD-JOBS > 1.

* nix/libstore/build.cc (DerivationGoal::tryBuildHook)
(DerivationGoal::startBuilder): Print the child's PID in "@ build-started"
traces.
(DerivationGoal::handleChildOutput): Define 'prefix', pass it to
'writeToStderr'.
* nix/libstore/globals.cc (Settings:Settings): Initialize
'multiplexedBuildOutput'.
(Settings::update): Likewise.
* nix/libstore/globals.hh (Settings)[multiplexedBuildOutput]: New field.
Update 'printBuildTrace' documentation.
* nix/libstore/worker-protocol.hh (PROTOCOL_VERSION): Bump to 0.163.
* nix/nix-daemon/nix-daemon.cc (performOp) <wopSetOptions>: Special-case
"multiplexed-build-output" and remove "use-ssh-substituter".
* guix/store.scm (set-build-options): Add #:multiplexed-build-output?
and honor it.
(%protocol-version): Bump to #x163.
* tests/store.scm ("multiplexed-build-output"): New test.

fixlet
2018-10-15 22:40:35 +02:00
Ludovic Courtès
38a2f5eafb
status: Avoid "sucessfully built" messages when in quiet mode.
* guix/status.scm (print-build-event): Print "successfully built"
messages only when PRINT-LOG? is true, like we do for
'substituter-started' events.
2018-10-14 23:48:49 +02:00
Ludovic Courtès
e0caff9ed0
describe: Canonicalize the profile.
Fixes a regression introduced in
795d430d90 whereby 'guix describe' would
no longer display the generation number of ~/.config/guix/current.

* guix/scripts/describe.scm (guix-describe): Call 'canonicalize-profile'.
2018-10-14 23:48:49 +02:00
Ludovic Courtès
aa227b3be3
pull: Fix target of /var/guix/profiles/per-user/USER/current-guix.
This is a followup to 8155a20907.

* guix/scripts/pull.scm (migrate-generations): Compute the right target
for /var/guix/profiles/per-user/USER/current-guix.  Previously we'd
return "current-N-link" instead of "current-guix-N-link'.
2018-10-12 16:45:34 +02:00
Ludovic Courtès
8036b0942b
pull: Don't use rename(2) across potentially different devices.
Reported by Formbi on #guix.

* guix/scripts/pull.scm (migrate-generations): Use 'symlink' and
'delete-file' instead of 'rename-file'.  The latter could lead to EXDEV
when $HOME and /var were different partitions.
2018-10-12 15:18:41 +02:00
Ludovic Courtès
1c795c4fd2
profiles: 'user-friendly-profile' now recognizes ~/.config/guix/current.
* guix/profiles.scm (%known-shorthand-profiles): New variable.
(user-friendly-profile): Use it.
2018-10-12 00:13:14 +02:00
Ludovic Courtès
8155a20907
pull: Create /var/guix/profiles/per-user/USER/current-guix.
Previously the migration code would fail to create that file, so
~/.config/guix/current would be dangling.

* guix/scripts/pull.scm (migrate-generations): Create
/var/guix/profiles/per-user/USER/current-guix.
2018-10-12 00:13:14 +02:00
Ludovic Courtès
795d430d90
pull: Turn ~/.config/guix/current into a symlink to /var/guix/profiles.
This is more consistent with what 'guix package' does, more pleasant for
users (we no longer clobber ~/.config/guix), and more
cluster-friendly (since /var/guix/profiles is usually an NFS share
already.)

* guix/scripts/pull.scm (%current-profile, %user-profile-directory): New
variables.
(migrate-generations, ensure-default-profile): New procedures.
(guix-pull): Use %CURRENT-PROFILE by default.  Call
'ensure-default-profile'.
* doc/guix.texi (Invoking guix pull): Adjust 'guix package -p
~/.config/guix/current' example.
* guix/scripts.scm (warn-about-old-distro): Check %PROFILE-DIRECTORY
"/current-guix".
2018-10-11 18:29:11 +02:00
Ludovic Courtès
50c72ecd9e
profiles: Generalize 'canonicalize-profile'.
* guix/profiles.scm (canonicalize-profile): Rewrite to work with any
profile that lives under %PROFILE-DIRECTORY.
2018-10-11 18:29:11 +02:00
Ludovic Courtès
77dcfb4c02
profiles: Add 'ensure-profile-directory'.
* guix/scripts/package.scm (ensure-default-profile): Move
/var/guix/profiles/per-user handling to...
* guix/profiles.scm (ensure-profile-directory): ... here.  New
procedure.
* po/guix/POTFILES.in: Add 'guix/profiles.scm'.
2018-10-11 18:29:11 +02:00
Ludovic Courtès
099bb0175f
self: Use Guile 2.2 unconditionally for recent 'guix pull'.
Fixes <https://bugs.gnu.org/32929>.
Reported by Michael Bowcutt <mwb71@case.edu>.

* guix/self.scm (guix-derivation)[guile]: Use "2.2" when PULL-VERSION >= 1.
Likewise for the #:guile-version argument.
2018-10-10 14:54:18 +02:00
Ludovic Courtès
b33e191c86
guix build: '-f' accepts file-like objects.
* guix/scripts/build.scm (options->things-to-build)[validate-type]:
Check for 'file-like?'.
(options->derivations): Accept 'file-like?'.
* tests/guix-build.sh: Add a test with 'computed-file'.
* doc/guix.texi (Additional Build Options): Mention file-like objects.
2018-10-09 18:54:12 +02:00
Ludovic Courtès
88d9eccc11
profiles: Make Geiser happy.
* guix/profiles.scm (manual-database)[config.scm]: Use ungexp/quote
trick to placate Geiser, which otherwise thinks it's in (guix config).
2018-10-09 18:54:12 +02:00
Ludovic Courtès
e54aec7b8e
pull: '-l' now honors '-p'.
* guix/scripts/pull.scm (process-query): Add 'profile' parameter and
remove 'profile' local variable.
(guix-pull): Adjust caller.
2018-10-09 18:54:12 +02:00
Ludovic Courtès
fe17037b38
status: Gracefully handle invalid UTF-8 in build logs.
* guix/status.scm (maybe-utf8->string): New procedure.
(build-event-output-port): Use it in lieu of 'utf8->string'.
* tests/status.scm ("build-output-port, UTF-8")
("current-build-output-port, UTF-8 + garbage"): New tests.
2018-10-09 18:54:12 +02:00
Leo Famulari
68afb9dccf
build-system/glib-or-gtk: Build 'in-source' by default.
* guix/build-system/glib-or-gtk.scm (glib-or-gtk-build): Change to
'out-of-source? #f'.
* gnu/packages/audio.scm (audacity)[arguments]: Use the default 'out-of-source?'
setting.
* gnu/packages/libreoffice.scm (libreoffice): Likewise.
2018-10-07 16:13:51 -04:00
Ludovic Courtès
42384b517e
progress: Fix total size in "@ download-succeeded" traces.
Fixes a regression introduced in
1d0be47ab6 whereby the total size for
directories (coming from substitutes) would be 4KiB.  This led the
progress bar to go back to the start, typically.

* guix/progress.scm (progress-reporter/trace): Add 'total'.  In 'start',
initialize it.  Adjust 'report' to update it.  Adjust 'stop' to prefer
SIZE as the actual size and then TOTAL.  Do not use the size of FILE as
the total since that could be 4KiB when FILE is a directory.
2018-10-05 23:54:18 +02:00
Ludovic Courtès
1d0be47ab6
progress: Generate valid 'download-progress' traces when the size is unknown.
Fixes <https://bugs.gnu.org/32895>.
Reported by Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>.

* guix/progress.scm (progress-reporter/trace): In 'stop', make sure SIZE
is an integer.  Previously we'd generate a "@ download-progress" trace
with #f for the 'transferred' number when downloading files whose size
is not known in advance.
2018-10-04 10:24:34 +02:00