me
/
guix
Archived
1
0
Fork 0
Commit Graph

4485 Commits (1760c970639d898e3ddec4185119a9bda8b663a6)

Author SHA1 Message Date
Ludovic Courtès f05f722657
reconfigure: Silence "shepherd: Evaluating ..." messages.
* guix/scripts/system/reconfigure.scm (upgrade-services-program):
Parameterize 'shepherd-message-port' to silent "Evaluating ..." messages.
2019-10-18 23:22:25 +02:00
Ludovic Courtès d7fcd9c565
lint: Comment out 'cve' checker.
* guix/lint.scm (%network-dependent-checkers): Comment out 'cve' checker.
2019-10-18 12:02:52 +02:00
Ludovic Courtès e6ea74d86c
pull: Call 'ensure-default-profile' after 'set-build-options'.
This is a followup to 81c580c866.

* guix/scripts/pull.scm (guix-pull): Move 'ensure-default-profile' call after
'set-build-options-from-command-line' call.  This ensures that the
'profiles/per-user/$USER' directory is created before
'ensure-default-profile' is called when 'GUIX_DAEMON_SOCKET' points to a
remote TCP daemon.
2019-10-18 12:02:52 +02:00
Guillaume Le Vaillant 5cace974a4
build-system/asdf: Fix package transform.
* guix/build-system/asdf.scm (package-with-build-system):
  [find-input-package]: New function.
  [rewrite]: Use it.
2019-10-18 11:09:44 +02:00
Ludovic Courtès 81c580c866
daemon: Make 'profiles/per-user' non-world-writable.
Fixes <https://bugs.gnu.org/37744>.
Reported at <https://www.openwall.com/lists/oss-security/2019/10/09/4>.

Based on Nix commit 5a303093dcae1e5ce9212616ef18f2ca51020b0d
by Eelco Dolstra <edolstra@gmail.com>.

* nix/libstore/local-store.cc (LocalStore::LocalStore): Set 'perUserDir'
to #o755 instead of #o1777.
(LocalStore::createUser): New function.
* nix/libstore/local-store.hh (LocalStore): Add it.
* nix/libstore/store-api.hh (StoreAPI): Add it.
* nix/nix-daemon/nix-daemon.cc (performOp): In 'wopSetOptions', add
condition to handle "user-name" property and honor it.
(processConnection): Add 'userId' parameter.  Call 'store->createUser'
when userId is not -1.
* guix/profiles.scm (ensure-profile-directory): Note that this is now
handled by the daemon.
* guix/store.scm (current-user-name): New procedure.
(set-build-options): Add #:user-name parameter and pass it to the daemon.
* tests/guix-daemon.sh: Test the creation of 'profiles/per-user' when
listening on a TCP socket.
* tests/store.scm ("profiles/per-user exists and is not writable")
("profiles/per-user/$USER exists"): New tests.
2019-10-16 22:53:40 +02:00
Christopher Baines ef0c265438
inferior: Set the error port when using older Guix versions.
This makes the behaviour more consistent.

* guix/inferior.scm (inferior-pipe): Wrap the second open-pipe* call with
with-error-to-port, to match the first call to open-pipe*.
2019-10-15 19:01:50 +01:00
Christopher Baines f0428c18f8
inferior: Allow controlling the inferior error port.
Previously, stderr for the inferior process would always be sent to /dev/null
because the current-output-port when the process is launched is a void
port. This change means that it's possible to pass in a different port to use.

* guix/inferior.scm (inferior-pipe): Take the error-port as an argument.
(open-inferior): Add new error-port keyword argument, with a default
of (%make-void-port "w").
2019-10-15 19:01:47 +01:00
Ludovic Courtès 81c5873ab7
ssh: Add a longer SSH timeout by default.
* guix/ssh.scm (open-ssh-session): Add #:timeout parameter, and add call
to 'session-set!' to honor it.
2019-10-15 13:56:41 +02:00
Ludovic Courtès 00d7321958
offload: Set a longer SSH session timeout.
Fixes <https://bugs.gnu.org/37762>.

* guix/scripts/offload.scm (open-ssh-session): Add 'max-silent-time'
parameter.  Add call to 'session-set!' before returning SESSION.
(transfer-and-offload): Pass MAX-SILENT-TIME to 'open-ssh-session'.
(%short-timeout): New variable.
(choose-build-machine): Pass %SHORT-TIMEOUT to 'open-ssh-session'.
(check-machine-availability): Likewise.
(check-machine-status): Likewise.
2019-10-15 13:56:41 +02:00
Mathieu Othacehe 396b05f04e
gexp: Use cross extensions when cross-compiling.
* guix/gexp.scm (load-path-expression): Use ungexp-splicing instead of
ungexp-native-splicing so that the cross extensions are used when target is
set.
2019-10-14 09:59:04 +02:00
Ludovic Courtès f618134e4c
build-system/gnu: 'package-with-explicit-inputs' uses 'package-mapping'.
* guix/build-system/gnu.scm (package-with-explicit-inputs): Rename to...
(package-with-explicit-inputs/deprecated): ... this.
(package-with-explicit-inputs*): New procedure.
(package-with-explicit-inputs): Define as a 'case-lambda*'.
2019-10-14 00:08:10 +02:00
Carl Dong e214a22007
gnu: Add nsis-x86_64 and nsis-i686.
* guix/build-system/scons.scm (scons-build): Add build-targets and
install-targets parameters.
* guix/build/scons-build-system.scm (build, install): Adjust
accordingly.
* doc/guix.texi (Build Systems): Document it.
* gnu/packages/installers.scm: New file,
(make-nsis): New procedure,
(nsis-x86_64, nsis-i686): New variables.
* gnu/packages/patches/nsis-env-passthru.patch: New file.
* gnu/local.mk (dist_patch_DATA, GNU_SYSTEM_MODULES): Adjust
accordingly.
2019-10-11 11:44:44 -04:00
Ricardo Wurmus e08902d3cb
Merge branch 'master' into core-updates 2019-10-06 22:02:20 +02:00
Ludovic Courtès 5e5f716794
syscalls: Add 'add-to-entropy-count'.
* guix/build/syscalls.scm (RNDADDTOENTCNT): New variable.
(add-to-entropy-count): New procedure.
* tests/syscalls.scm ("add-to-entropy-count"): New test.
2019-10-05 22:05:02 +02:00
Ludovic Courtès cdf9811d24
gexp: 'load-path-expression' produces an expression that deletes duplicates.
Fixes <https://bugs.gnu.org/37531>.

"herd eval root '(length %load-path)'" on a freshly-booted bare-bones
system now returns 8 instead of 119 before.

* guix/gexp.scm (load-path-expression): Rewrite expression to that it
deletes duplicates.
2019-10-03 23:48:59 +02:00
Ludovic Courtès 5a02f8e384
environment: '--container' honors '--preserve'.
* guix/scripts/environment.scm (launch-environment/container): Add
 #:white-list parameter and  honor it.
(guix-environment): Pass #:white-list to 'launch-environment/container'.
* tests/guix-environment-container.sh: Add test.
2019-10-03 23:48:59 +02:00
Ludovic Courtès 37c0d4580e
channels: Add quirk to build recent 'master' with Guile 2.2.4.
Fixes <https://bugs.gnu.org/37506>.
Reported by Marius Bakke <mbakke@fastmail.com>.

* guix/channels.scm (syscalls-reexports-local-variables?)
(guile-2.2.4, guile-for-source): New procedures.
(%quirks): New variable.
(build-from-source): Add calls to 'guile-for-source' and
'set-guile-for-build'.
2019-10-02 11:15:48 +02:00
Martin Becze ed661e38d8
import: crate: Add '--recursive'.
* guix/scripts/import/crate.scm (show-help, guix-import-crate): Add '--recursive'.
* doc/guix.texi (Invoking guix import): Mention '--recursive'.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2019-10-01 23:34:31 +02:00
Martin Becze f837293202
import: crate: Support recursive imports.
* guix/import/crate.scm (crate-recursive-import): New procedure.
(crate->guix-package): Return dependencies as a second value.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2019-10-01 23:34:30 +02:00
Konrad Hinsen 13169000f6
pull: Do not use '~*', which 'msgfmt' fails to interpret.
Really fixes <https://bugs.gnu.org/37505>.
This is a followup to f751b4646d3989d76dad9e33e39f9724c7c50be6.

* guix/scripts/pull.scm (display-channel-news): Remove second occurrence
of '~*' in a format string.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2019-10-01 23:34:30 +02:00
Christopher Baines 2cd599f005
inferior: Change to use the (guix repl) module.
Rather than (guix scripts repl), from which the machine-repl procedure was
removed in [1].

1: 92a4087bf4

* guix/inferior.scm (inferior-pipe): Load (guix repl) rather than (guix
scripts repl).
2019-10-01 19:01:20 +01:00
Ludovic Courtès 0cf2b6f2db
Merge branch 'master' into core-updates 2019-10-01 12:06:00 +02:00
Ludovic Courtès 43f7fd8783
pull: Do not use '~*', which 'msgfmt' fails to interpret.
Fixes <https://bugs.gnu.org/37505>.
Reported by Konrad Hinsen <konrad.hinsen@fastmail.net>.

* guix/scripts/pull.scm (display-channel-news): Use ~a instead of ~*
when reporting new channels.
2019-10-01 10:50:24 +02:00
Ludovic Courtès 8b4615ab54
ui: 'show-what-to-build' colorizes store file names.
* guix/ui.scm (colorize-store-file-name): New procedure.
(show-what-to-build)[colorize-store-item]: New variable.
Use it throughout.
2019-10-01 10:50:24 +02:00
Ludovic Courtès 7089f98ef1
syscalls: 'define-as-needed' does not re-export local variables.
Fixes <https://bugs.gnu.org/36723>.
Reported by Timothy Sample <samplet@ngyro.com>.

* guix/build/syscalls.scm (define-as-needed): Rewrite to use lower-level
module primitives; define VARIABLE only if it's not already defined to
avoid "re-exporting local variable" error.
2019-09-29 23:02:35 +02:00
Ludovic Courtès a3af06ad65
offload: Include the port number in the machine lock file name.
This is useful when a single machine appears several time, with
different port numbers.

* guix/scripts/offload.scm (machine-slot-file): Add MACHINE's port to
the file name.
2019-09-28 22:56:40 +02:00
Eric Bavier 21391f8c83
compile: Fix race condition on completion progress.
This prevent a race condition where multiple compilation threads could report
the same progress.

* guix/build/compile.scm (compile-files)<completed>: Rename to...
<progress>: ...this.  Increment in same mutex region as the compilation is
reported.
2019-09-27 23:00:16 -05:00
Marius Bakke e7f62a41b2
Merge branch 'master' into core-updates 2019-09-27 19:11:27 +02:00
Ludovic Courtès 8727e0304b
self: Mark trivial "-modules" derivations as non-substitutable.
The resulting nar takes ~500KiB and it's quicker to build it locally
than to download it.

* guix/self.scm (node-source+compiled): Pass #:options to
'computed-file'.
2019-09-26 23:15:28 +02:00
Hartmut Goebel dec845606d
guix download: Ensure destination file-name is valid in the store.
Avoid invalid store-file-name by explicitly passing the destination
name, replacing any character not allowed in the store-file-name by an
underscore.

Fixes <http://issues.guix.gnu.org/issue/26175>

* guix/scripts/download.scm (safe-naensure-valid-store-file-nameme):
  New function. (download-to-store*): Use it to generate a "safe"
  basename of URL.
2019-09-26 17:48:08 +02:00
Ludovic Courtès 3972dc5d43
guix package: Add '--list-profiles'.
* guix/scripts/package.scm (show-help, %options): Add '--list-profiles'.
(process-query): Honor it.
* tests/guix-package.sh: Add test.
2019-09-26 11:43:26 +02:00
Ludovic Courtès d26c290b7d
pull: Dim the commit ID when displaying news.
* guix/scripts/pull.scm (display-news-entry): Dim the commit line.
2019-09-25 15:46:48 +02:00
Ludovic Courtès 0876e9c116
colors: Add 'dim'.
* guix/colors.scm (coloring-procedure): New procedure.
(%highlight-color): Remove.
(highlight): Define in terms of 'coloring-procedure'.
(dim): New procedure.
2019-09-25 15:46:47 +02:00
Ludovic Courtès 11da634a6e
Merge branch 'master' into core-updates 2019-09-24 10:11:38 +02:00
Ludovic Courtès 7b3f56f5d7
pull: Use ~/.cache/guix/checkouts instead of ~/.cache/guix/pull.
Previously 'channel-news-for-commit' would use the former while 'guix
pull' would use the latter.  Consequently, the first 'guix pull -N'
would clone the repository anew.

* guix/scripts/pull.scm (guix-pull): Remove 'cache', and leave
%REPOSITORY-CACHE-DIRECTORY to its default value.
2019-09-23 23:41:19 +02:00
Ludovic Courtès 7b7e5b88fc
gexp: Remove unused procedure.
* guix/gexp.scm (syntax-location-string): Remove.
2019-09-23 23:41:19 +02:00
Ludovic Courtès 24ab804ce1
gexp: Catch and report non-self-quoting gexp inputs.
Previously we would, for example, generate build scripts in the store;
when trying to run them, we'd get a 'read' error due to the presence
of #<foo> syntax in there.

* guix/gexp.scm (gexp->sexp)[self-quoting?]: New procedure.
[reference->sexp]: Check whether the argument in a <gexp-input> box is
self-quoting.  Raise a '&gexp-input-error' condition if it's not.
* tests/gexp.scm ("lower-gexp, non-self-quoting input"): New test.
2019-09-23 23:41:19 +02:00
Ludovic Courtès 7abd5997f4
repl, marionette: 'self-quoting?' matches keywords.
* guix/repl.scm (self-quoting?): Add 'keyword?' and 'array?'; remove
'vector?' and 'bytevector?'.
* gnu/tests.scm (marionette-shepherd-service) <start>: Likewise.
<modules>: Remove (rnrs bytevector).
2019-09-23 23:41:19 +02:00
Ludovic Courtès 4f8c29a75c
show, search: Add '--load-path'.
* guix/scripts/search.scm (show-help, %options): Add -L/--load-path.
* guix/scripts/show.scm (show-help, %options): Add -L/--load-path.
2019-09-23 23:41:19 +02:00
Vagrant Cascadian 5da7a04abd
build: ruby-build-system: Fix typo.
* guix/build/ruby-build-system: Fix spelling of "invocation".
2019-09-23 12:08:13 -07:00
Vagrant Cascadian fa4867cc99
import: stackage: Fix typo.
* guix/import/stackage: Fix spelling of "version".
2019-09-23 12:06:46 -07:00
Vagrant Cascadian a130544d60
inferior: Fix typo.
* guix/inferior: Fix spelling of "specifications".
2019-09-23 12:03:00 -07:00
Vagrant Cascadian 7f69414927
lint: Fix typo.
* guix/lint: Fix spelling of "mentioning".
2019-09-23 12:00:03 -07:00
Vagrant Cascadian 77c2eafbbb
scripts: container: Fix typo.
* guix/scripts/container/exec (show-help): Fix spelling of COMMAND.
2019-09-23 11:56:40 -07:00
Ludovic Courtès b69ce8a872
deploy: Add '--verbosity' and properly interpret build log.
This is a followup to 91300526b7.

* guix/scripts/deploy.scm (show-help, %options): Add '--verbosity'.
(guix-deploy): Wrap 'with-store' in 'with-status-verbosity'.
2019-09-23 11:57:39 +02:00
Ludovic Courtès dabdd7d465
pull: Display news titles directly upon 'pull'.
* guix/scripts/pull.scm (display-profile-news): Return true when there's
more to display.
(display-news-entry-title): New procedure.
(display-news-entry): Use it.
(display-channel-specific-news): Return true when there's more to
display.
(display-channel-news-headlines): New procedure.
(build-and-install): Call it.  When 'display-channel-news-headlines' or
'display-profile-news' returns #t, print a hint to run "pull --news".
(display-new/upgraded-packages): Return true when there's more to display.
2019-09-23 10:38:44 +02:00
Ludovic Courtès 192ee02aeb
pull: '-l' displays channel news.
* guix/scripts/pull.scm (display-channel-news): Make 'previous' a
parameter.
(process-query)[list-generations]: Call 'display-channel-news'.
2019-09-23 10:38:44 +02:00
Ludovic Courtès 7faffdc2d5
pull: Display channel news.
* guix/scripts/pull.scm (display-news-entry)
(display-channel-specific-news): New procedures.
(display-channel-news): Call it.
(display-new/upgraded-packages): Adjust hint message.
* doc/guix.texi (Invoking guix pull): Mention it.
2019-09-23 10:38:44 +02:00
Ludovic Courtès a725504a3a
ui: Add 'current-message-language'.
* guix/ui.scm (%default-message-language): New variable.
(current-message-language): New procedure.
2019-09-23 10:38:44 +02:00
Ludovic Courtès 9719e8d37a
channels: Allow news entries to refer to a tag.
Suggested by Ricardo Wurmus <rekado@elephly.net>.

* guix/channels.scm (<channel-news-entry>)[tag]: New field.
(sexp->channel-news-entry): Accept either 'commit' or 'tag' in 'entry'
forms.
(resolve-channel-news-entry-tag): New procedure.
(channel-news-for-commit): Move 'with-repository' form one level
higher.  Call 'resolve-channel-news-entry-tag' on all the news entries.
* guix/tests/git.scm (populate-git-repository): Add clause for 'tag'.
* tests/channels.scm ("channel-news, one entry"): Create a tag and add
an entry with a tag.  Check that the tag is resolved and also visible in
the <channel-news-entry> record.
* doc/guix.texi (Channels): Mention tags in news entries.
2019-09-23 10:38:44 +02:00