Commit Graph

1389 Commits (aace6f6dba3a0e7dd46146f5c7947b11e1076e5d)

Author SHA1 Message Date
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 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
Marius Bakke e7f62a41b2
Merge branch 'master' into core-updates 2019-09-27 19:11:27 +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 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 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 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 961b95c985
pull: '--news' shows the list of channels added or removed.
* guix/scripts/pull.scm (display-channel, channel=?)
(display-channel-news, display-news): New procedures.
(process-query): Call 'display-news' instead of 'display-profile-news'.
2019-09-23 10:38:43 +02:00
Ludovic Courtès 660dbe6564
guix package: '--show' ignores deprecated packages.
* guix/scripts/package.scm (process-query) <'show>: Remove superseded
packages.
* tests/guix-package-aliases.sh: Add test.
2019-09-21 16:48:36 +02:00
zimoun aeb51370da
guix package: Add 'guix show' alias.
* guix/scripts/show.scm: New file.
* Makefile.am (MODULES): Add it.
* po/guix/POTFILES.in: Add it.
* tests/guix-package-aliases.sh: Add test.
* doc/guix.texi (Invoking guix package): Document it and use it in a example.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2019-09-21 16:48:36 +02:00
Konrad Hinsen da55110712
scripts: pull: Add options for generation management
* guix/scripts/pull.scm (%options) Add --roll-back, --switch-generation,
--delete-generations
(process-generation-change): New function
(guix-pull): Execute generation management operations

* doc/guix.texi: Document the generation management operations

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2019-09-18 23:08:29 +02:00
Ludovic Courtès ee25048e51
pull: Work around Ubuntu's 'sudo'.
Partly fixes <https://bugs.gnu.org/36785>.
Reported by Julien Lepiller <julien@lepiller.eu>.

* guix/scripts/pull.scm (ensure-default-profile): Do not call
'migrate-generations' when "SUDO_USER" is set.
2019-09-18 23:08:29 +02:00
Ludovic Courtès f9c0400392
guix package: "guix package -f FILE" ensures FILE returns a package.
* guix/scripts/package.scm (options->installable): Add clause for
'install option with a non-package object.
* tests/guix-package.sh: Add test.
2019-09-18 23:08:28 +02:00
Ludovic Courtès 9ff87bb996
Merge branch 'master' into core-updates 2019-09-17 16:27:15 +02:00
Ludovic Courtès 0074844366
pack: Provide a meaningful "repository name" for Docker.
Previously, images produced by 'guix pack -f docker' would always show
up as "profile" in the output of 'docker images'.  With this change,
'docker images' shows a name constructed from the packages found in the
image--e.g., "bash-coreutils-grep-sed".

* guix/docker.scm (canonicalize-repository-name): New procedure.
(generate-tag): Remove.
(manifest): Add optional 'tag' parameter and honor it.
(repositories): Likewise.
(build-docker-image): Add #:repository parameter and pass it to
'manifest' and 'repositories'.
* guix/scripts/pack.scm (docker-image)[build]: Compute 'tag' and pass it
as #:repository to 'build-docker-image'.
2019-09-16 10:25:31 +02:00
Ludovic Courtès 9bbaf2ae72
pack: Add packages in the order in which they appear on the command line.
* guix/scripts/pack.scm (guix-pack)[manifest-from-args](packages):
Reverse order of packages taken from OPTS.
2019-09-16 10:25:16 +02:00
Ludovic Courtès 5ccec77176
file-systems: Add /var/run/nscd to '%network-file-mappings'.
This allows containers created by "guix environment -CN" or by
"guix system container -N" to talk to the host nscd.

* gnu/system/file-systems.scm (%network-file-mappings): Add
"/var/run/nscd".
* gnu/build/shepherd.scm (default-mounts)[nscd-socket]: Remove.
* gnu/system/linux-container.scm (container-script)[nscd-run-directory]
[nscd-mapping, nscd-os, nscd-specs]: Remove.
[script]: Filter out from SPECS bind-mounts where the device does not
exist.
* guix/scripts/environment.scm (launch-environment/container)
[optional-mapping->fs]: New procedure.
[mappings]: Remove %NETWORK-FILE-MAPPINGS.
[file-systems]: Add %NETWORK-FILE-MAPPINGS here, filtered through
'optional-mapping->fs'.
2019-09-12 23:07:42 +02:00
Martin Becze fd63ecbe05
import: crate: Allow imports of a specific version.
* guix/import/crate.scm (crate->guix-package): Add optional 'version'
argument and honor it.
* guix/scripts/import/crate.scm (guix-import-crate): Assume the first
argument is a spec and destructure it with
'package-name->name+version'.  Pass both to 'crate->guix-package'.
* doc/guix.texi (Invoking guix import): Document it.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2019-09-10 00:34:40 +02:00
Ludovic Courtès 7c101c4c17
refresh: Distinguish between "no updater" and "failing updater".
Previously, something like "guix refresh texmacs" would report "no
updater".  Now, it reports that the 'gnu-ftp' updater failed to list
releases.

* guix/upstream.scm (lookup-updater): Use 'find' instead of 'any' to
return the <upstream-updater>.
(package-latest-release): Adjust accordingly.
* guix/scripts/refresh.scm (check-for-package-update): When
'package-latest-release' returns #f, distinguish between "no updater"
and "failing updater".
2019-09-10 00:34:40 +02:00
Ludovic Courtès 2e3e5d2198
daemon: Invoke 'guix gc --list-busy' instead of 'list-runtime-roots'.
* nix/scripts/list-runtime-roots.in: Remove.
* guix/store/roots.scm (%proc-directory): New variable.
(proc-file-roots, proc-exe-roots, proc-cwd-roots)
(proc-fd-roots, proc-maps-roots, proc-environ-roots)
(referenced-files, canonicalize-store-item, busy-store-items): New
procedures, taken from 'list-runtime-roots.in'.
* nix/libstore/globals.hh (Settings)[guixProgram]: New field.
* nix/libstore/globals.cc (Settings::processEnvironment): Initialize
'guixProgram'.
* nix/libstore/gc.cc (addAdditionalRoots): Drop code related to
'NIX_ROOT_FINDER'.  Run "guix gc --list-busy".
* nix/local.mk (nodist_pkglibexec_SCRIPTS): Remove
'scripts/list-runtime-roots'.
* config-daemon.ac: Don't output nix/scripts/list-runtime-roots.
* build-aux/pre-inst-env.in: Don't set 'NIX_ROOT_FINDER'.
Set 'GUIX'.
* doc/guix.texi (Invoking guix gc): Document '--list-busy'.
* guix/scripts/gc.scm (show-help, %options): Add "--list-busy".
(guix-gc)[list-busy]: New procedure.
Handle the 'list-busy' action.
2019-09-08 11:49:24 +02:00
Mark H Weaver 65542a8852
Merge branch 'master' into core-updates 2019-09-06 20:46:00 -04:00
Ludovic Courtès 91300526b7
deploy: Add missing store options.
* guix/scripts/deploy.scm (%default-options): Add missing options such
as 'print-build-trace?', etc.
2019-09-04 13:02:27 +02:00
Ludovic Courtès c3e59de9b1
guix system: Reinstalling the bootloader preserves extra menu entries.
Fixes <https://bugs.gnu.org/36876>.
Reported by Jesse Gibbons <jgibbons2357@gmail.com>.

Previously 'guix system delete-generations' or 'switch-generation' would
lose the extra bootloader menu entries specified in the current system's
configuration.  This fixes that.

* guix/scripts/system.scm (reinstall-bootloader): Turn PARAMS into a
single <boot-parameters>.  Adjust ENTRIES to include extra menu entries
specified in PARAMS.
2019-08-30 01:33:45 +02:00
Mark H Weaver 0481289cbc
Merge branch 'master' into core-updates 2019-08-29 17:19:18 -04:00
Ricardo Wurmus ad553ec4b1
import: cran: Add support for git repositories.
* guix/import/cran.scm (vcs-file?): New procedure.
(download): Support downloading from git.
(fetch-description): Add a clause for the 'git repository type.
(files-match-pattern?): New procedure.
(tarball-files-match-pattern?): Implement in terms of FILES-MATCH-PATTERN?.
(directory-needs-fortran?, directory-needs-zlib?,
directory-needs-pkg-config?): New procedures.
(needs-fortran?, needs-zlib?, needs-pkg-config?): Rename these procedures...
(tarball-needs-fortran?, tarball-needs-zlib?, tarball-needs-pkg-config?):
...to this, and use them.
(file-hash): New procedure.
(description->package): Handle the 'git repository type.
* guix/import/utils.scm (package->definition): Handle package expression
inside of a let.
* guix/scripts/import.scm (guix-import): Handle let expressions.
* doc/guix.texi (Invoking guix import): Document it.
2019-08-29 11:38:12 +02:00
Ricardo Wurmus 54ddd85220
import: cran: guix-import-cran: Use (guix import utils).
* guix/scripts/import/cran.scm (guix-import-cran): Use PACKAGE->DEFINITION
from (guix import utils) instead of custom procedure.
2019-08-29 08:06:54 +02:00
Ludovic Courtès dae950ca50
deploy: Do not quote error messages.
* guix/scripts/deploy.scm (guix-deploy): Do not quote the message.
2019-08-28 18:52:52 +02:00
Ludovic Courtès 8f67a76a54
lint: Log diagnostics with 'info', not 'warning'.
* guix/scripts/lint.scm (emit-warnings): Use 'info', not 'warning'.
This removes the unhelpful "warning:" prefix that commit
3d33c93cef introduced.
2019-08-28 18:52:51 +02:00
Ludovic Courtès 7979a287f8
pack: Create /tmp in Docker images.
Fixes <https://bugs.gnu.org/37161>.

* guix/scripts/pack.scm (docker-image)[build]: Add a 'directory' entry
for "/tmp" to DIRECTIVES.
* tests/pack.scm ("docker-image + localstatedir"): Test the presence of /tmp.
* gnu/tests/docker.scm (run-docker-test)["Load docker image and run
it"]: Test the presence and permission bits of "/tmp".
2019-08-27 12:20:44 +02:00
Ludovic Courtès 2b7c89f4fc
docker: Take a list of directives instead of a list of symlinks.
* guix/docker.scm (symlink-source, topmost-component): Remove.
(directive-file): New procedure.
(build-docker-image): Remove #:symlinks and add #:extra-files.
Make a sub-directory "extra" and call 'evaluate-populate-directive' for
EXTRA-FILES in that directory.
* guix/scripts/pack.scm (docker-image)[build](symlink->directives,
directives): New procedures.
Pass #:extra-files instead of #:symlinks to 'build-docker-image'.
2019-08-27 12:20:44 +02:00
Ludovic Courtès b908fcd8c0
pack: '-R' honors the requested output.
Fixes <https://bugs.gnu.org/36925>.
Reported by Jesse Gibbons <jgibbons2357@gmail.com>.

* guix/scripts/pack.scm (wrapped-package): Add 'output*' parameter.
[build]: Define 'input' and 'target'; use them instead of #$package and
 #$output, respectively.
(wrapped-manifest-entry): New procedure.
(map-manifest-entries): Call PROC directly.
(guix-pack): Pass WRAPPED-MANIFEST-ENTRY to 'map-manifest-entries'.
2019-08-23 18:41:49 +02:00
Mark H Weaver 893c2df00d
Merge branch 'master' into core-updates 2019-08-22 15:53:27 -04:00
Ludovic Courtès 4496ea74aa
refresh: Use the standard diagnostic procedures.
* guix/scripts/refresh.scm (warn-no-updater): Use 'warning' instead of
'format'.
(update-package): Use 'info' and 'warning' instead of 'format'.
2019-08-17 23:18:11 +02:00
Ludovic Courtès a7c714d398
channels: Add 'profile-channels'.
* guix/channels.scm (profile-channels): New procedure.
* guix/scripts/describe.scm (display-profile-info)[channels]: Define in
terms of 'profile-channels'.
2019-08-16 23:00:26 +02:00
Jakob L. Kreuze 9c70c460a0
machine: Implement 'roll-back-machine'.
* gnu/machine.scm (roll-back-machine, &deploy-error, deploy-error?)
(deploy-error-should-roll-back)
(deploy-error-captured-args): New variable.
* gnu/machine/ssh.scm (roll-back-managed-host): New variable.
* guix/scripts/deploy.scm (guix-deploy): Roll-back systems when a
deployment fails.
2019-08-15 07:43:09 -04:00
Jakob L. Kreuze 03cbd94d48
remote: Remove '--system' argument.
* gnu/services.scm (activation-script): Return a <program-file> rather
than a <scheme-file>.
* gnu/deploy.scm (guix-deploy): Remove handling for '--system'.
(show-help): Remove documentation for '--system'.
(%default-options): Remove default setting for 'system'.
2019-08-14 15:38:13 -04:00
Marius Bakke 462ad9f56b
Merge branch 'master' into core-updates 2019-08-13 20:42:06 +02:00
Jakob L. Kreuze 55e238f2ab
deploy: Use all machine modules when loading deployment
* guix/scripts/deploy.scm (load-source-file): Enumerate and include all
submodules of (gnu machine) when loading the provided deployment
specification.
2019-08-07 16:05:58 -04:00
Jakob L. Kreuze 5f04e9f962
reconfigure: Fix GC root installation.
Fixes <https://bugs.gnu.org/36942>.
Reported by ison <ison@airmail.cc>.

guix/scripts/system/reconfigure.scm (install-bootloader-program): Switch
new symlink to the canonical bootloader configuration file.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2019-08-06 22:21:13 +02:00
Jakob L. Kreuze 1db6f137d9
reconfigure: Reload all shepherd files when upgrading services.
Fixes <https://bugs.gnu.org/36878>.
Reported by Robert Vollmert <rob@vllmrt.net>.

* guix/scripts/system/reconfigure.scm (upgrade-shepherd-services): Load
all service files, rather than just those of services to be started.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2019-08-02 11:20:51 +02:00
Marius Bakke 6a2e54236e
Merge branch 'master' into core-updates 2019-07-31 14:28:56 +02:00
Jakob L. Kreuze 5c8c8c4554
guix system: Reimplement 'reconfigure'.
* guix/scripts/system.scm (switch-to-system)
(upgrade-shepherd-services, install-bootloader): Delete variable.
(local-eval): New variable.
(install): Remove 'bootloader-installer' and 'bootcfg-file' parameters.
(install): Add 'bootloader' parameter.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2019-07-26 19:19:49 +02:00