Commit graph

860 commits

Author SHA1 Message Date
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
Mathieu Othacehe
328a4c5bf1
linux-initrd: Use native gzip.
* gnu/system/linux-initrd.scm (expression->initrd): Pass native gzip to
build-initrd procedure.
2019-09-04 17:56:13 +02:00
Ludovic Courtès
c85ccf60bf
linux-modules: Define and use a module name database.
Fixes <https://bugs.gnu.org/34902>.
Reported by Julien Lepiller <julien@lepiller.eu>.

* gnu/build/linux-modules.scm (module-formal-name): New procedure.
(load-linux-modules-from-directory)[lookup-module]: Remove.
[module-name->file-name]: New variable.  Use it.
(module-name->file-name/guess, module-name-lookup)
(write-module-name-database): New procedures.
* gnu/system/linux-initrd.scm (flat-linux-module-directory): Call
'write-module-name-database'.
2019-08-16 23:00:27 +02:00
Ludovic Courtès
81c3dc3224
maint: Switch to Guile-JSON 3.x.
Guile-JSON 3.x is incompatible with Guile-JSON 1.x, which we relied on
until now: it maps JSON dictionaries to alists (instead of hash tables),
and JSON arrays to vectors (instead of lists).  This commit is about
adjusting all the existing code to this new mapping.

* m4/guix.m4 (GUIX_CHECK_GUILE_JSON): New macro.
* configure.ac: Use it.
* doc/guix.texi (Requirements): Mention the Guile-JSON version.
* guix/git-download.scm (git-fetch)[guile-json]: Use GUILE-JSON-3.
* guix/import/cpan.scm (string->license): Expect vectors instead of
lists.
(module->dist-name): Use 'json-fetch' instead of 'json-fetch-alist'.
(cpan-fetch): Likewise.
* guix/import/crate.scm (crate-fetch): Likewise, and call 'vector->list'
for DEPS.
* guix/import/gem.scm (rubygems-fetch): Likewise.
* guix/import/json.scm (json-fetch-alist): Remove.
* guix/import/pypi.scm (pypi-fetch): Use 'json-fetch' instead of
'json-fetch-alist'.
(latest-source-release, latest-wheel-release): Call 'vector->list' on
RELEASES.
* guix/import/stackage.scm (stackage-lts-info-fetch): Use 'json-fetch'
instead of 'json-fetch-alist'.
(lts-package-version): Use 'vector->list'.
* guix/import/utils.scm (hash-table->alist): Remove.
(alist->package): Pass 'vector->list' on the inputs fields, and default
to the empty vector.
* guix/scripts/import/json.scm (guix-import-json): Remove call to
'hash-table->alist'.
* guix/swh.scm (define-json-reader): Expect pair? or null? instead of
hash-table?.
[extract-field]: Use 'assoc-ref' instead of 'hash-ref'.
(json->branches): Use 'map' instead of 'hash-map->list'.
(json->checksums): Likewise.
(json->directory-entries, origin-visits): Call 'vector->list' on the
result of 'json->scm'.
* tests/import-utils.scm ("alist->package with dependencies"): New test.
* gnu/installer.scm (build-compiled-file)[builder]: Use GUILE-JSON-3.
* gnu/installer.scm (installer-program)[installer-builder]: Likewise.
* gnu/installer/locale.scm (iso639->iso639-languages): Use 'assoc-ref'
instead of 'hash-ref', and pass vectors through 'vector->list'.
(iso3166->iso3166-territories): Likewise.
* gnu/system/vm.scm (system-docker-image)[build]: Use GUILE-JSON-3.
* guix/docker.scm (manifest, config): Adjust for Guile-JSON 3.
* guix/scripts/pack.scm (docker-image)[build]: Use GUILE-JSON-3.
* guix/import/github.scm (fetch-releases-or-tags): Update docstring.
(latest-released-version): Use 'assoc-ref' instead of 'hash-ref'.  Pass
the result of 'fetch-releases-or-tags' to 'vector->list'.
* guix/import/launchpad.scm (latest-released-version): Likewise.
2019-07-25 00:16:41 +02:00
Ludovic Courtès
bacfec8611
linux-container: Add 'eval/container'.
* gnu/system/linux-container.scm (eval/container): New procedure.
* tests/containers.scm ("eval/container, exit status")
("eval/container, writable user mapping"): New tests.
2019-07-19 11:53:47 +02:00
Ludovic Courtès
b41c7beb0b
file-systems: Use 'no-atime' for %IMMUTABLE-STORE.
* gnu/system/file-systems.scm (%immutable-store): Add 'no-atime'.
2019-07-19 11:53:47 +02:00
Tobias Geerinckx-Rice
3a8bfebed9
etc: Remove hydra.gnu.org.pub key.
* etc/substitutes/hydra.gnu.org.pub: Delete file.
* guix/self.scm (miscellaneous-files): Don't install it.
* Makefile.am (dist_pkgdata_DATA): Remove it.
* gnu/services/base.scm (%default-authorized-guix-keys): Likewise.
(hydra-key-authorization): Rename to…
(substitute-key-authorization): …this.  Adjust only call site.
2019-06-29 14:27:22 +02:00
Mathieu Othacehe
fdbf4447bc
linux-initrd: Fix cross compilation.
* gnu/system/linux-initrd.scm (default-initrd-modules): Check system name
against %current-target-system first in case we are cross-compiling.
2019-06-25 21:38:42 +02:00
Arun Isaac
b84c4cda04
linux-container: Remove networking service when network is shared with host.
* gnu/system/linux-container.scm (dummy-networking-service-type): New
variable.
(containerized-operating-system): If network is shared with host, replace
static-networking-service-type with dummy-networking-service-type.
2019-06-19 00:19:47 +05:30
Ludovic Courtès
ed504cafa2
vm: 'system-docker-image' builds in a UTF-8 locale.
Fixes <https://bugs.gnu.org/36215>.
Reported by Björn Höfling <bjoern.hoefling@bjoernhoefling.de>.

This is a followup to 9c941364bf.

* gnu/system/vm.scm (system-docker-image)[build]: Set GUIX_LOCPATH and
call 'setlocale'.
2019-06-17 12:36:13 +02:00
Ludovic Courtès
15ec93a783
Add (gnu build locale).
* gnu/build/locale.scm: New file.
* gnu/local.mk (MODULES_NOT_COMPILED): Add it.
* gnu/installer/locale.scm (normalize-codeset): Remove.
* gnu/system/locale.scm (localedef-command): Remove.
(single-locale-directory): Use (gnu build locale).
(glibc-supported-locales)[build]: Likewise, and remove
'read-supported-locales'.
2019-06-07 21:50:18 +02:00
Arun Isaac
d2928fa63f
linux-container: Check if nscd run directory exists when container is run.
* gnu/system/linux-container.scm (containerized-operating-system):
(container-script): Check for existence of the host nscd run directory in the
container script. This check should be run when the container is started, not
when the container script is created.
[network-mappings]: Delete variable.
[nscd-run-directory, nscd-mapping]: New variables.
2019-05-25 11:06:22 +05:30
Ludovic Courtès
99f47b53f7
Merge branch 'version-1.0.1' 2019-05-20 11:48:57 +02:00
Danny Milosavljevic
1d86b05618
vm: Create installation media with MBR and HFS only, no GPT.
* gnu/build/vm.scm (make-iso9660-image): Accept XORRISO,
GRUB-MKRESCUE-ENVIRONMENT.
* gnu/system/vm.scm (iso9660-image): Pass XORRISO; accept
GRUB-MKRESCUE-ENVIRONMENT.
(system-disk-image): Pass GRUB-MKRESCUE-ENVIRONMENT.
* gnu/packages/patches/xorriso-no-mbr-in-inner-efi.patch: New file.
* gnu/packages/patches/xorriso-no-partition-table-in-inner-efi.patch: New
file.
* gnu/local.mk (dist_patch_DATA): Add them.
* gnu/packages/cdrom.scm (xorriso)[source]: Add patches.
[arguments]<#:phases>[install-frontends]:
Add phase.
2019-05-18 18:35:37 +02:00
Ludovic Courtès
9c64080dce
vm-image: Remove ModemManager.
This is a followup to 36f5d78d4a.

* gnu/system/examples/vm-image.tmpl (services): Remove
MODEM-MANAGER-SERVICE-TYPE.
2019-05-16 14:42:40 +02:00
Ludovic Courtès
fc0680929d
vm-image: Remove 'network-manager-applet' from system profile.
This is a followup to 05d907ac6f.

* gnu/system/examples/vm-image.tmpl (services): Remove
'network-manager-applet'.
2019-05-16 14:37:23 +02:00
Ludovic Courtès
247649d42e
vm: 'system-docker-image' provides an entry point.
This simplifies use of images created with 'guix system docker-image'.

* gnu/system/vm.scm (system-docker-image)[boot-program]: New variable.
[os]: Add it to the GC roots.
[build]: Pass #:entry-point to 'build-docker-image'.
* gnu/tests/docker.scm (run-docker-system-test): New procedure.
(%test-docker-system): New variable.
* doc/guix.texi (Invoking guix system): Remove GUIX_NEW_SYSTEM hack and
'--entrypoint' from the example.  Mention 'docker create', 'docker
start', and 'docker exec'.
2019-05-15 16:36:21 +02:00
Ludovic Courtès
3f9bed04f0
linux-container: Compute essential services for THIS-OPERATING-SYSTEM.
Previously, the 'essential-services' would correspond to the initial,
non-containerized OS.  Thus, all the file systems removed in
'container-essential-services' would actually still be there because the
essential services would be computed on the non-containerized OS.

This is a followup to 69cae3d335.

* gnu/system/linux-container.scm (container-essential-services): Call
'operating-system-default-essential-services' to get the baseline
services.
(containerized-operating-system): Pass THIS-OPERATING-SYSTEM, not OS, to
'container-essential-services'.
Add a dummy root file system to 'file-systems'.
(container-script)[mountable-file-system?]: New procedure.
Use it.
2019-05-15 16:36:21 +02:00
Ludovic Courtès
6edd5c546c
linux-container: Do not add %CONTAINER-FILE-SYSTEMS to Docker image OSes.
Previously, 'guix system docker-image' would end up providing an OS that
would try to mount all of %CONTAINER-FILE-SYSTEMS as well as /gnu/store,
which is bound to fail in unprivileged Docker.

This patch makes it so that 'guix system container' still gets those
file systems, but 'guix system docker-image' doesn't.

* gnu/system/linux-container.scm (containerized-operating-system): Add
 #:extra-file-systems parameter and honor it.  Do not include
 %STORE-MAPPING and SHARED-NETWORK-FILE-MAPPINGS.
(container-script): Add %STORE-MAPPING and optionally NETWORK-MAPPINGS
to MAPPINGS and pass #:extra-file-systems.
2019-05-15 16:36:21 +02:00
Maxim Cournoyer
d03de6be0a
vm: Auto-detect if inputs should be registered.
The default value of the argument REGISTER-CLOSURE? of the ISO9660-IMAGE,
QEMU-IMAGE and SYSTEM-DOCKER-IMAGE procedures can be computed automatically,
since the operating-system definition is available in its context.  When the
operating-system definition does not contain the GUIX-SERVICE-TYPE, do not
register the closure in the database of Guix, as it takes time and doesn't
serve a purpose.

* gnu/system/vm.scm (has-guix-service-type): Add predicate.
(iso9660-image)[register-closures?]: Use it to compute the argument's default
value.
(qemu-image)[register-closures?]: Likewise, and update docstring.
(system-docker-image)[register-closures?]: Likewise.
(system-disk-image): Do not explicit a value for the REGISTER-CLOSURES?
argument of the ISO9660-IMAGE and QEMU-IMAGE procedure calls, so that its
default value is used instead.
* guix/scripts/system.scm (system-derivation-for-action): Do not explicit a
value for the REGISTER-CLOSURES? argument of the SYSTEM-DOCKER-IMAGE
procedure call, so that its default value is used instead.
2019-05-13 22:59:09 -04:00
Ludovic Courtès
1be065c478
locale: Add 'glibc-supported-locales'.
* gnu/system/locale.scm (glibc-supported-locales): New procedure.
2019-05-13 23:46:08 +02:00
Arun Isaac
b33454ae0b
linux-container: Support container network sharing.
* gnu/system/linux-container.scm (container-essential-services): If network is
to be shared with the host, remove network configuration files from etc
service.
(containerized-operating-system): If network is to be shared with the host,
remove nscd service and map host's /var/run/nscd if it exists.
(container-script): If network is to be shared with the host, do not create
network namespace.
* guix/scripts/system.scm (system-derivation-for-action): Add
#:container-shared-network? argument.
(perform-action): Add #:container-shared-network? argument.
(show-help): Add "-N, --network" help information.
(%options): Add network option.
(process-action): Call perform-action with #container-shared-network? argument.
* doc/guix.texi (Invoking guix system): Document the "-N, --network" option.

Co-authored-by: Christopher Baines <mail@cbaines.net>
2019-05-14 02:54:58 +05:30
Ludovic Courtès
7059cfc823
install: Add node name in Russian.
* gnu/system/install.scm (%installation-node-names): Add "ru".
2019-05-13 10:50:27 +02:00
Ludovic Courtès
76ae10a1f4
linux-container: Improve filtering of unnecessary file systems.
* gnu/system/linux-container.scm (containerized-operating-system)[user-file-systems]:
Add trailing slash for the "/dev/" and "/sys/" prefixes.
2019-05-10 23:29:18 +02:00
Ludovic Courtès
af55ca481d
system: pam: Add #:login-uid? parameter to 'unix-pam-service'.
* gnu/system/pam.scm (unix-pam-service): Add #:login-uid? parameter.  In
then 'session' field, add "pam_loginuid.so" as required when LOGIN-UID?
is true.
2019-05-09 12:11:36 +02:00
Ludovic Courtès
6c5790a2fa
uuid: 'fat-uuid->string' preserves leading zeros.
Fixes <https://bugs.gnu.org/35582>.
Reported by sirgazil <sirgazil@zoho.com>.

Previously, leading zeros would be removed, leading to an "invalid"
UUID:

  (uuid->string (uuid "00CA-050E" 'fat32))
  ⇒ "CA-50E"
  (string->uuid "CA-50E" 'fat32)
  ⇒ #f

* gnu/system/uuid.scm (fat-uuid->string): Pad digits with zeros.
* tests/uuid.scm ("uuid, FAT32, leading zeros preserved"): New test.
2019-05-07 12:18:44 +02:00
Ludovic Courtès
9c941364bf
vm: Build ISOs and VM images in a UTF-8 environment.
Fixes a bug whereby building an image containing non-ASCII file names
would fail due to improper decoding of file names.

* gnu/system/vm.scm (iso9660-image, qemu-image): Set GUIX_LOCPATH and
call 'setlocale' in the build environment.
2019-05-01 21:11:22 +02:00
Ludovic Courtès
4c13ccbf39
vm-image: Add 'label' field.
* gnu/system/examples/vm-image.tmpl (label): New field.
2019-05-01 09:33:54 +02:00
Ludovic Courtès
a4ae05fb8b
vm-image: Add 'nss-certs' to the global package set.
* gnu/system/examples/vm-image.tmpl (packages): Add NSS-CERTS.
2019-04-28 22:57:06 +02:00
Ludovic Courtès
6e0521eeed
vm-image: Allow for password-less sudo.
* gnu/system/examples/vm-image.tmpl (sudoers-file): New field.
2019-04-27 15:08:18 +02:00
Ludovic Courtès
ff587e0fc0
vm-image: Mention 'info guix' in the MOTD.
* gnu/system/examples/vm-image.tmpl (vm-image-motd): Mention 'info guix'.
2019-04-27 15:08:18 +02:00
Ludovic Courtès
5df29aad3b
vm-image: Add a font to the global profile.
* gnu/system/examples/vm-image.tmpl (packages): Add FONT-BITSTREAM-VERA,
for use by xfce-terminal, IceCat, etc.
2019-04-27 15:08:17 +02:00
Ludovic Courtès
ea2acfe98a
doc: Update bit about SSH in the VM.
* doc/guix.texi (Running Guix in a VM): Remove mentions of 'lsh-server';
mention 'openssh-service-type' and add a cross-reference.
* gnu/system/examples/vm-image.tmpl (services): Add a commented-out line
for 'openssh-service-type'.
2019-04-27 15:08:17 +02:00
Ludovic Courtès
d7b05620a9
vm-image: Remove NetworkManager & co. and add the DHCP client.
* gnu/system/examples/vm-image.tmpl (services): Remove wpa-supplicant,
cups-pk-helper, and NetworkManager.  Add DHCP-CLIENT-SERVICE-TYPE.
2019-04-26 18:24:55 +02:00
Ludovic Courtès
1ac6c33cae
vm-image: Use the actual file name of the current file.
* gnu/system/examples/vm-image.tmpl (this-file): Use 'basename' and
'current-source-location'.
2019-04-26 16:47:11 +02:00
Ludovic Courtès
538b99f31f
system: Provide a new VM image configuration.
* gnu/system/examples/vm-image.tmpl: Rewrite.
* doc/guix.texi (Running Guix in a VM): Adjust accordingly.
2019-04-26 14:19:36 +02:00
Ludovic Courtès
5be7aecd14
vm: 'system-disk-image' no longer requires the OS to define the "/" file system.
Previously 'guix system disk-image' would fail if the OS didn't define a
"/" file system, even though it actually overrides that file system.

* gnu/system/vm.scm (system-disk-image)[root-uuid]: Turn into a
procedure.
Call 'root-uuid' on a variant of OS with a "/" file system and inherit
from that.
2019-04-25 00:45:35 +02:00
Ludovic Courtès
55111549e8
install: Add node name in Castellano.
* gnu/system/install.scm (%installation-node-names): Add "es".
2019-04-25 00:45:34 +02:00
Ludovic Courtès
86b8869fff
linux-container: Remove '%containerized-shepherd-service' hack.
This hack worked around a defect in the Shepherd 0.5.0 and is no longer
needed.

* gnu/services/shepherd.scm (%containerized-shepherd-service): Remove.
* gnu/system/linux-container.scm (container-essential-services): Don't
use it.
2019-04-23 16:38:12 +02:00
Ludovic Courtès
051b279fd0
services: account: Make 'user-homes' a one-shot service.
* gnu/system/shadow.scm (account-shepherd-service): Add 'one-shot?'
field.  Return #t from 'start'.
2019-04-23 16:38:12 +02:00
Ludovic Courtès
519177ad41
install: Pass "quiet" to the kernel.
This is a followup to 5582aa8e31.

* gnu/system/install.scm (installation-os)[kernel-arguments]: Add "quiet".
2019-04-23 00:40:50 +02:00
Ludovic Courtès
7859191210
install: Pass "modprobe.blacklist=radeon".
* gnu/system/install.scm (installation-os)[kernel-arguments]: New field.
2019-04-21 00:51:18 +02:00
Ludovic Courtès
0134ebc55b
install: Provide a meaningful label.
* gnu/system/install.scm (installation-os)[label]: New field.
2019-04-15 12:24:14 +02:00
Ludovic Courtès
66ec389580
vm: Do not mount /xchg with "cache=loose".
Fixes <https://bugs.gnu.org/33639>.

* gnu/system/vm.scm (%linux-vm-file-systems): Remove "cache=loose" for /xchg.
(system-docker-image): Remove 'sync' call, now unneeded, and which was
probably insufficient.
2019-04-14 17:42:08 +02:00
Ludovic Courtès
13fd0a3087
install: Use a font with more glyphs on tty2.
* gnu/system/install.scm (%installation-services): For
'console-font-service-type', use LatGrkCyr-8x16 on tty2.
2019-04-12 17:56:23 +02:00
Ludovic Courtès
c7dc604253
installer: Choosing a locale opens the translated manual on tty2.
Suggested by Florian Pelz.

* gnu/system/install.scm (%installation-node-names): New variable.
(log-to-info): Expect the chosen locale as an argument.  Compute the
language, Info file name, and node name.  Install the locale.
(documentation-shepherd-service): Add 'locale' parameter to the 'start'
action and honor it.  Set GUIX_LOCPATH and TERM as environment variables
for the process.
* gnu/installer.scm (apply-locale): Use (gnu services herd).  Call
'stop-service' and 'start-service' with the chosen locale.
2019-04-12 17:56:23 +02:00
Ludovic Courtès
126d4c12ce
install: Add standalone documentation service.
* gnu/system/install.scm (log-to-info): Add 'tty' and 'user'
parameters.  Open the tty and change UIDs/GIDs.
(documentation-shepherd-service): New procedure.
(%documentation-users, documentation-service-type): New variables.
(%installation-services): Use it instead of 'mingetty-service'.
2019-04-12 17:56:23 +02:00
Ludovic Courtès
5c32857f91
doc: Adjust desktop instructions for GDM.
* gnu/system/examples/desktop.tmpl: Adjust comment that referred to SLiM.
2019-04-10 12:40:58 +02:00
Ludovic Courtès
5a663d87eb
install: Tweak motd.
* gnu/system/install.scm (%installation-services): Tweak motd.
2019-04-07 22:23:51 +02:00
Ludovic Courtès
6fb6dd13b5
install: Remove "GuixSD".
* gnu/system/install.scm (%installation-services): Remove "Guix System
Distribution" from motd.
2019-04-07 22:23:51 +02:00
Ludovic Courtès
305a732a0a
services: xorg: Add 'set-xorg-configuration'.
* gnu/services/xorg.scm (gdm-service-type)[compose, extend]: New fields.
(set-xorg-configuration): New procedure.
* doc/guix.texi (Keyboard Layout): Use it.
(X Window): Document it.
* gnu/system/examples/desktop.tmpl: Add 'keyboard-layout' fields.
2019-04-05 15:39:35 +02:00
Timothy Sample
df2a96167f
gnu: Add example system configuration for asus-c201.
* gnu/system/examples/asus-c201.tmpl: New file.
* Makefile.am (EXAMPLES): Add it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2019-04-03 18:21:43 +02:00
Ludovic Courtès
971e6560eb
system: Fix typo in desktop example.
The typo was introduced in 391e0d65d7.

* gnu/system/examples/desktop.tmpl: Use XFCE-DESKTOP-SERVICE-TYPE, not
XFCE-DESKTOP-SERVICE.
2019-03-28 23:06:59 +01:00
Ludovic Courtès
45c0d1d790
vm: Ask QEMU for more RAM in the VM that makes ISO9660 images.
* gnu/system/vm.scm (iso9660-image): Pass #:memory-size to
'expression->derivation-in-linux-vm'.
2019-03-27 11:54:06 +01:00
Ludovic Courtès
391e0d65d7
services: Deprecate 'xfce-desktop-service'.
* gnu/services/desktop.scm (xfce-desktop-service-type)[default-value]
[description]: New fields.
(xfce-desktop-service): Deprecate.
* gnu/system/examples/desktop.tmpl: Use the (service …) form.
* gnu/installer/services.scm (%desktop-environments): Add TODO comment.
* doc/guix.texi (Desktop Services): Adjust accordingly, and fix spelling
of "Xfce" throughout.
2019-03-27 11:54:06 +01:00
Ludovic Courtès
ee05cc7fe3
services: Deprecate 'gnome-desktop-service'.
* gnu/services/desktop.scm (gnome-desktop-service-type)[default-value]:
New field.
(gnome-desktop-service): Deprecate.
* gnu/installer/services.scm (%desktop-environments): Use the (service …)
form for GNOME.
* gnu/system/examples/desktop.tmpl: Likewise.
* doc/guix.texi (Desktop Services): Adjust accordingly.
2019-03-27 11:54:06 +01:00
Ludovic Courtès
69cae3d335
system: Add 'essential-services' field to <operating-system>.
* gnu/system.scm (<operating-system>)[essential-services]: New field.
(operating-system-directory-base-entries): Remove #:container? keyword
and keep only the not-container branch.
(essential-services): Likewise.
(operating-system-services): Likewise, and call
'operating-system-essential-services' instead of 'essential-services'.
(operating-system-activation-script): Remove #:container?.
(operating-system-boot-script): Likewise.
(operating-system-derivation): Likewise.
* gnu/system/linux-container.scm (container-essential-services): New procedure.
(containerized-operating-system): Use it and set the
'essential-services' field.
(container-script): Remove call to 'operating-system-derivation'.
* gnu/system/vm.scm (system-docker-image): Likewise.
* doc/guix.texi (operating-system Reference): Document 'essential-services'.
2019-03-25 23:37:06 +01:00
Ludovic Courtès
cf848cc0a1
accounts: Add default value for the 'home-directory' field of <user-account>.
* gnu/system/accounts.scm (<user-account>)[home-directory]: Mark as
thunked and add a default value.
(default-home-directory): New procedure.
* doc/guix.texi (User Accounts): Remove 'home-directory' from example.
* gnu/system/examples/bare-bones.tmpl: Likewise.
* gnu/system/examples/beaglebone-black.tmpl: Likewise.
* gnu/system/examples/desktop.tmpl: Likewise.
* gnu/system/examples/docker-image.tmpl: Likewise.
* gnu/system/examples/lightweight-desktop.tmpl: Likewise.
* gnu/system/install.scm (installation-os): Likewise.
* gnu/tests.scm (%simple-os): Likewise.
* gnu/tests/install.scm (%minimal-os, %minimal-os-on-vda):
(%separate-home-os, %encrypted-root-os, %btrfs-root-os): Likewise.
* tests/accounts.scm ("allocate-passwd")
("allocate-passwd with previous state"): Likewise.
2019-03-25 23:37:06 +01:00
Ludovic Courtès
ae7a316b9d
system: Initialize console keyboard layout in the initrd.
Partially fixes <https://bugs.gnu.org/25453>.

* gnu/system.scm (<operating-system>)[keyboard-layout]: New field.
(operating-system-initrd-file): Pass #:keyboard-layout to MAKE-INITRD.
* gnu/system/linux-initrd.scm (raw-initrd): Add #:keyboard-layout.
Pass #:keymap-file to 'boot-system'.
(base-initrd): Add #:keyboard-layout.
[helper-packages]: Add LOADKEYS-STATIC when KEYBOARD-LAYOUT is true.
Pass #:keyboard-layout to 'raw-initrd'.
* gnu/build/linux-boot.scm (boot-system): Add #:keymap-file and honor
it.
* doc/guix.texi (operating-system Reference): Document the
'keyboard-layout' field.
(Initial RAM Disk): Update 'raw-initrd' and 'base-initrd' documentation.
2019-03-24 23:06:12 +01:00
Ludovic Courtès
132823c2ac
vm: 'virtualized-operating-system' inherits from the user's bootloader config.
* gnu/system/vm.scm (virtualized-operating-system): Inherit from the
bootloader of OS.
2019-03-24 23:06:11 +01:00
Ludovic Courtès
db1e2522f6
Add (gnu system keyboard).
* gnu/system/keyboard.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* gnu.scm (%public-modules): Add it.
2019-03-24 23:06:11 +01:00
Ludovic Courtès
0dc7d298a3
vm: 'system-docker-image' calls 'sync' before rebooting.
Previously we could end up silently building truncated tarballs.

* gnu/system/vm.scm (system-docker-image)[build]: Add call to 'sync'.
2019-03-22 22:49:35 +01:00
Ludovic Courtès
e6c46ec42e
vm: 'expression->derivation-in-linux-vm' leads to a kernel panic upon failure.
Partially fixes <https://bugs.gnu.org/34276>.
Reported by Tobias Geerinckx-Rice <me@tobias.gr>.

* gnu/system/vm.scm (expression->derivation-in-linux-vm)[loader]: Call
'exit' when USER-BUILDER exits with a non-zero code.
2019-03-17 16:30:00 +01:00
Ludovic Courtès
b94c80ff5d
linux-container: 'containerized-operating-system' removes "useless" services.
Fixes <https://bugs.gnu.org/34211>.
Reported by Efraim Flashner <efraim@flashner.co.il>.

* gnu/system/linux-container.scm (containerized-operating-system)
[useless-services]: New variable.
Add 'services' field.
2019-03-13 23:12:44 +01:00
Ludovic Courtès
4cd386afae
linux-modules: Factorize 'missing-modules'.
* gnu/build/linux-modules.scm (missing-modules): New procedure.
* gnu/system/mapped-devices.scm (check-device-initrd-modules): Use it.
2019-03-13 23:12:43 +01:00
Ludovic Courtès
59e8044588
Remove traces of "GuixSD".
* gnu/bootloader/extlinux.scm (extlinux-configuration-file): Remove
mentions of "GuixSD".
* gnu/bootloader/grub.scm (install-grub-efi): Likewise.
* gnu/build/vm.scm (make-iso9660-image): Change default #:volume-id to
"Guix_image".
(initialize-hard-disk): Search for the "Guix_image" label.
* gnu/ci.scm (system-test-jobs, tarball-jobs): Remove "GuixSD".
* gnu/installer/newt/welcome.scm (run-welcome-page): Likewise.
* gnu/packages/audio.scm (supercollider)[description]: Likewise.
* gnu/packages/curl.scm (curl): Likewise.
* gnu/packages/emacs.scm (emacs): Likewise.
* gnu/packages/gnome.scm (network-manager): Likewise.
* gnu/packages/julia.scm (julia): Likewise.
* gnu/packages/linux.scm (alsa-plugins): Likewise.
(powertop, wireless-regdb): Likewise.
* gnu/packages/package-management.scm (guix): Likewise.
* gnu/packages/polkit.scm (polkit): Likewise.
* gnu/packages/tex.scm (texlive-bin): Likewise.
* gnu/services/base.scm (file-systems->fstab): Likewise.
* gnu/services/cups.scm (%cups-activation): Likewise.
* gnu/services/mail.scm (%dovecot-activation): Likewise.
* gnu/services/messaging.scm (prosody-configuration)[log]: Likewise.
* gnu/system/examples/vm-image.tmpl (vm-image-motd): Likewise.
* gnu/system/install.scm (installation-os)[file-systems]: Change root
file system label to "Guix_image".
* gnu/system/mapped-devices.scm (check-device-initrd-modules):
Remove "GuixSD".
* gnu/system/vm.scm (system-docker-image): Likewise.
(system-disk-image)[root-label]: Change to "Guix_image".
* gnu/tests/install.scm (run-install): Remove "GuixSD".
* guix/modules.scm (guix-module-name?): Likewise.
* nix/libstore/optimise-store.cc: Likewise.
2019-03-13 23:12:43 +01:00
Ludovic Courtès
0ae735bcc8
activation: Build account databases with (gnu build accounts).
* gnu/build/activation.scm (enumerate, current-users, current-groups)
(add-group, add-user, modify-user, ensure-user): Remove.
(activate-users+groups)[touch, activate-user]: Remove.
[make-home-directory]: New procedure.
Rewrite in terms of 'user+group-databases', 'write-group', etc.
* gnu/build/install.scm (directives): Remove "/root".
* gnu/system/shadow.scm (account-activation): Remove (setenv "PATH" ...)
expression, which is now unneeded.
2019-03-07 20:05:09 +01:00
Ludovic Courtès
6061d01512
activation: Operate on <user-account> and <user-group> records.
* gnu/system/accounts.scm (sexp->user-group, sexp->user-account): New
procedures.
* gnu/system/shadow.scm (account-activation): Call them in the arguments
to 'activate-users+groups'.
(account-shepherd-service): Likewise.
* gnu/build/activation.scm (activate-users+groups): Expect a list of
<user-account> and a list of <user-group>.  Replace uses of 'match' on
tuples with calls to record accessors.
(activate-user-home): Likewise.
2019-03-07 20:05:09 +01:00
Ludovic Courtès
f6f67b87c0
system: Add (gnu system accounts).
The (gnu system accounts) module is meant to be used both on the build-
and on the host-side.

* gnu/system/shadow.scm <top level>: Call 'default-shell'.
(<user-account>, <user-group>): Move to...
* gnu/system/accounts.scm: ... here.  New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add system/accounts.scm.
2019-03-07 20:04:02 +01:00
Ludovic Courtès
910d0121a8
pack, vm: Fix incorrect use of 'package-transitive-propagated-inputs'.
In practice the error was not triggered because
'package-transitive-propagated-inputs' currently returns the empty list
for these two packages.

* guix/scripts/pack.scm (gcrypt-sqlite3&co): Remove labels from the
result.
* gnu/system/vm.scm (gcrypt-sqlite3&co): Likewise.
2019-02-11 23:23:28 +01:00
Pierre Neidhardt
9ce09a7698
install: Use (gnu package certs) module for the nss-certs package.
* gnu/system/install.scm: Use (gnu package certs).
2019-02-10 15:30:35 +01:00
Pierre Neidhardt
0b767e3d5b
install: Add nss-certs to the image.
* gnu/system/install.scm (installation-os)[packages]: Add nss-certs.
2019-02-10 15:17:37 +01:00
Pierre Neidhardt
907dd32720
gnu: Replace all cons* with beginner-friendly (append (list ...)).
* gnu/system/examples/bare-bones.tmpl (services): Do it.
* gnu/system/examples/beaglebone.tmpl (packages): Do it.
(services): Do it.
* gnu/system/examples/desktop.tmpl (packages): Do it.
(services): Do it.
* gnu/system/examples/lightweight-desktop.tmpl (file-systems): Do it.
(packages): Do it.
* gnu/system/examples/vm-image.tmpl (packages): Do it.
2019-01-23 18:01:16 +01:00
Pierre Neidhardt
ece2fd1218
gnu: Fix missing EFI entry in "desktop" example.
* gnu/system/examples/desktop.tmpl (file-systems): Add
EFI file-system.
2019-01-23 18:01:16 +01:00
Ludovic Courtès
323f250da7
vm: Remove unnecessary import.
* gnu/system/vm.scm: Remove unnecessary (guix scripts pack) import.
2019-01-22 23:04:05 +01:00
Efraim Flashner
7194745a16
services: Use guix-service-type.
* gnu/services/base.scm (%base-services): Replace guix-service with
guix-service-type.
* gnu/system/examples/docker-image.tmpl (services): Same.
2019-01-20 16:11:00 +02:00
Mathieu Othacehe
a49d633c0c
installer: Move everything to the build side.
* gnu/installer.scm: Rename to ...
* gnu/installer/record.scm: ... this.
* gnu/installer/build-installer.scm: Move everything to the build side and
rename to gnu/installer.scm.
* gnu/installer/newt.scm: Remove all the gexps and add depencies to newt
modules as this code will only be used on the build side by now.
* gnu/local.mk (GNU_SYSTEM_MODULES): Adapt it,
(dist_installer_DATA): New rule to install installer's aux-files.
* gnu/system/install.scm (%installation-services): Use only
'installer-program' from (gnu installer). The installer is now choosen on the
build side.
* guix/self.scm (*system-modules*): Restore previous behaviour and add all
installer files to #:extra-files field of the scheme-node.
* po/guix/POTFILES.in: Adapt it.
2019-01-17 14:04:21 +01:00
Mathieu Othacehe
a79617468e
gnu: installer: Launch the installer as kmscon login-program.
Source /etc/environment just before starting the installer. The login program
is supposed to load the environment variables of this file through PAM, but as
we replace it by the installer, they are no longer available. This is mostly
useful for the LANG environment variable.

* gnu/installer/build-installer.scm (installer-program-launcher): New exported
procedure.
* gnu/system/install.scm (%installation-services): Restore most of the origin
code. kmscon is only started on TTY1, and the graphical installer is the
login-program.
2019-01-17 14:04:21 +01:00
Mathieu Othacehe
d0f3a672dc
gnu: Add graphical installer support.
* configure.ac: Require that guile-newt is available.
* gnu/installer.scm: New file.
* gnu/installer/aux-files/logo.txt: New file.
* gnu/installer/build-installer.scm: New file.
* gnu/installer/connman.scm: New file.
* gnu/installer/keymap.scm: New file.
* gnu/installer/locale.scm: New file.
* gnu/installer/newt.scm: New file.
* gnu/installer/newt/ethernet.scm: New file.
* gnu/installer/newt/hostname.scm: New file.
* gnu/installer/newt/keymap.scm: New file.
* gnu/installer/newt/locale.scm: New file.
* gnu/installer/newt/menu.scm: New file.
* gnu/installer/newt/network.scm: New file.
* gnu/installer/newt/page.scm: New file.
* gnu/installer/newt/timezone.scm: New file.
* gnu/installer/newt/user.scm: New file.
* gnu/installer/newt/utils.scm: New file.
* gnu/installer/newt/welcome.scm: New file.
* gnu/installer/newt/wifi.scm: New file.
* gnu/installer/steps.scm: New file.
* gnu/installer/timezone.scm: New file.
* gnu/installer/utils.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add previous files.
* gnu/system.scm: Export %root-account.
* gnu/system/install.scm (%installation-services): Use kmscon instead of linux
VT for all tty.
(installation-os)[users]: Add the graphical installer as shell of the root
account.
[packages]: Add font related packages.
* po/guix/POTFILES.in: Add installer files.
2019-01-17 14:04:20 +01:00
Ludovic Courtès
5c215c9e47
install: Avoid deprecated 'gpm-service' procedure.
* gnu/system/install.scm (%installation-services): Use the 'service'
form instead of 'gpm-service'.
2019-01-16 14:07:37 +01:00
Ludovic Courtès
84a2de36a1
services: Deprecate a few more service procedures.
These procedures were already either undocumented (and de facto
deprecated) or documented as deprecated or redundant.

* gnu/services/base.scm (guix-service, guix-publish-service): Mark as
deprecated.
* gnu/services/mcron.scm (mcron-service): Likewise.
* gnu/services/networking.scm (tor-service): Likewise.
* doc/guix.texi (Scheduled Job Execution): Remove 'mcron-service' and
adjust example.
(Networking Services): Remove 'tor-service'.
* gnu/tests/base.scm (%mcron-os): Use 'mcron-service-type' instead of
'mcron-service'.
* gnu/tests/networking.scm (%tor-os): Use 'tor-service-type' instead of
'tor-service'.
* tests/guix-system.sh: Likewise.
2019-01-11 12:14:38 +01:00
Efraim Flashner
3c515b2225
doc: Example vm-image doesn't need firmware.
* gnu/system/examples/vm-image.tmpl (firmware): New field, explicitly
empty list.
2018-12-24 11:14:29 +02:00
Ludovic Courtès
0bc02becca
Remove most references to hydra.gnu.org.
* Makefile.am (assert-binaries-available): Don't mention hydra.gnu.org
in comment.
* build-aux/check-available-binaries.scm: Likewise.
* build-aux/check-final-inputs-self-contained.scm: Likewise.
* doc/guix.texi (SUBSTITUTE-SERVER): New variable.
Use it throughout instead of "mirror.hydra.gnu.org".
* doc/contributing.texi (Submitting Patches): Likewise.
* gnu/services/base.scm (hydra-key-authorization)
(guix-activation): Remove mentions of "hydra.gnu.org" in comments and
messages.
* gnu/system/install.scm (%installation-services): Likewise.
* guix/scripts/size.scm (guix-size): Likewise.
2018-12-04 10:57:56 +01:00
Laura Lazzati
b9914c4794
doc: Fix "desktop" OS config example.
* gnu/system/examples/desktop.tmpl (file-systems): Add
'file-system-label' call in 'device' field.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2018-12-03 14:27:24 +01:00
Ludovic Courtès
0c17f72070
services: openssh: Install OpenSSH in the system profile.
This ensures one can scp to or from the GuixSD machine that uses the
service.

* gnu/services/ssh.scm (openssh-service-type)[extensions]: Add
PROFILE-SERVICE-TYPE extension.
* gnu/system/examples/bare-bones.tmpl <packages>: Remove OPENSSH.
* doc/guix.texi (Using the Configuration System): Adjust accordingly.
2018-11-26 11:10:20 +01:00
Vagrant Cascadian
74e35e8c94
gnu: Add u-boot-pinebook.
* gnu/packages/patches/u-boot-pinebook-a64-update-dts.patch: New file.
* gnu/packages/patches/u-boot-pinebook-syscon-node.patch: New file.
* gnu/packages/patches/u-boot-pinebook-mmc-calibration.patch: New file.
* gnu/packages/patches/u-boot-pinebook-video-bridge.patch: New file.
* gnu/packages/patches/u-boot-pinebook-r_i2c-controller.patch: New file.
* gnu/packages/patches/u-boot-pinebook-dts.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add them.
* gnu/packages/bootloaders.scm (u-boot-pinebook): New exported variable.
* gnu/bootloader/u-boot.scm (u-boot-pinebook-bootloader): New exported
variable.
* gnu/system/install.scm (pinebook-installation-os): New exported variable.
2018-11-22 21:59:05 +01:00
Ludovic Courtès
d422cbb3d6
linux-initrd: 'expression->initrd' returns the complete file name.
Previously 'expression->initrd' would return the directory that contains
the 'initrd' file; now it returns the complete file name for that file.

* gnu/system/linux-initrd.scm (expression->initrd)[builder]: Change
output file name to "initrd.cpio.gz".  Tail-call 'file-append' to return
the complete file name.
* gnu/system.scm (operating-system-initrd-file): Remove 'file-append'
call.
* gnu/build/linux-initrd.scm (write-cpio-archive): Check whether OUTPUT
already has the ".gz" suffix; rename if before invoking GZIP if it does,
and otherwise after.
* gnu/system/vm.scm (expression->derivation-in-linux-vm)[builder]: Do
not append "/initrd" to #$initrd.
2018-11-21 23:26:59 +01:00
Ludovic Courtès
8bff7dc2ad
vm: Remove explicit calls to 'operating-system-derivation'.
* gnu/system/vm.scm (iso9660-image): Change 'os-drv' to 'os' and remove
call to 'operating-system-derivation'.
(system-qemu-image): Likewise.
(system-qemu-image/shared-store): Likewise.
2018-11-18 23:37:45 +01:00
Ludovic Courtès
9782c82217
system: De-monadify 'operating-system-bootcfg'.
* gnu/system.scm (operating-system-bootcfg): Remove 'mlet*' and
'lower-object' call.
* gnu/system/vm.scm (system-disk-image)
(system-qemu-image/shared-store): Adjust accordingly.
* guix/scripts/system.scm (perform-action): Add 'lower-object' call for
BOOTCFG.
2018-11-18 23:37:45 +01:00
Ludovic Courtès
e34ae75dc1
linux-initrd: Return file-like objects instead of monadic values.
This is an incompatible change visible to users via the 'initrd' field
of 'operating-system'.  However, assuming the user's 'initrd' value
tail-calls to 'raw-initrd' or 'base-initrd', the switch to non-monadic
style is invisible.

* gnu/system/linux-initrd.scm (expression->initrd): Use 'computed-file'
instead of 'gexp->derivation'.
(raw-initrd, base-initrd): Adjust docstring to mention non-monadic
return.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Adjust
accordingly.
* gnu/system.scm (operating-system-directory-base-entries)
(operating-system-initrd-file)
(operating-system-boot-parameters): Adjust accordingly.
* doc/guix.texi (operating-system Reference)
(Initial RAM Disk): Update.
2018-11-18 23:37:44 +01:00
Ludovic Courtès
a7ef45d9de
system: Simplify kernel argument handling.
* gnu/system.scm (bootable-kernel-arguments): Remove 'kernel-arguments'
parameter and return only the base list of kernel arguments.  Rename
'system.drv' to 'system'.
(operating-system-kernel-arguments): Adjust accordingly and remove
'system.drv' parameter.
(read-boot-parameters-file): Adjust accordingly.  Remove 'if params'
since dominating code assumed PARAMS is always true.
(operating-system-boot-parameters): Remove 'system.drv' parameter; add
 #:system-kernel-arguments? instead and honor it.
(operating-system-bootcfg): Adjust accordingly.
(operating-system-boot-parameters-file): Likewise.
* gnu/system/vm.scm (system-qemu-image/shared-store-script): Remove
'os-drv' variable.  Adjust call to 'operating-system-kernel-arguments'.
2018-11-18 23:37:44 +01:00
Chris Marusich
2f4d43584c
system: Rename .zlogin to .zprofile.
Reported by Meiyo Peng <meiyo.peng@gmail.com>.

* gnu/system/shadow.scm (default-skeletons): Rename zlogin to zprofile.
2018-10-19 00:45:20 -07: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
Ludovic Courtès
fce2254711
vm: Use "cache=loose" for all 9p mounts.
This significantly improves read throughput when running things like
"guix hash -r ...".

* gnu/system/vm.scm (%linux-vm-file-systems): Add 'flags' for "store".
Add "cache=loose" to every file system.
2018-09-23 23:34:17 +02:00
Ludovic Courtès
b5460d95e9
vm: Disable deduplication for 'guix system vm-image'.
* gnu/system/vm.scm (qemu-image): Pass #:deduplicate? #f to
'root-partition-initializer'.
2018-09-23 23:34:17 +02:00
Ludovic Courtès
88600acc93
system: Mention '--skip-checks' in initrd diagnostics.
* gnu/system/mapped-devices.scm (check-device-initrd-modules): Add note
about '--skip-checks'.
2018-09-23 23:34:16 +02:00
Danny Milosavljevic
e830c9d0b0
gnu: Rename "banana-pi" to "bananapi".
* gnu/bootloader/u-boot.scm (u-boot-banana-pi-m2-ultra-bootloader): Rename
to...
(u-boot-bananapi-m2-ultra-bootloader): ...this.
* gnu/packages/bootloaders.scm (u-boot-banana-pi-m2-ultra): Rename to...
(u-boot-bananapi-m2-ultra): ...this.
* gnu/system/install.scm (banana-pi-m2-ultra-installation-os): Rename to...
(bananapi-m2-ultra-installation-os): ...this.
2018-09-14 21:31:24 +02:00
Ludovic Courtès
1540075c79
vm: Make UUID computation really deterministic.
Fixes <https://bugs.gnu.org/32652>.

* gnu/system/vm.scm (operating-system-uuid)[service-name,
file-system-digest]: New procedures.
Map these over services and file systems and hash the result.
* tests/guix-system.sh: Add test.
2018-09-07 11:40:05 +02:00
Ludovic Courtès
ca71942445
Switch to Guile-Gcrypt.
This removes (guix hash) and (guix pk-crypto), which now live as part of
Guile-Gcrypt (version 0.1.0.)

* guix/gcrypt.scm, guix/hash.scm, guix/pk-crypto.scm,
tests/hash.scm, tests/pk-crypto.scm: Remove.
* configure.ac: Test for Guile-Gcrypt.  Remove LIBGCRYPT and
LIBGCRYPT_LIBDIR assignments.
* m4/guix.m4 (GUIX_ASSERT_LIBGCRYPT_USABLE): Remove.
* README: Add Guile-Gcrypt to the dependencies; move libgcrypt as
"required unless --disable-daemon".
* doc/guix.texi (Requirements): Likewise.
* gnu/packages/bash.scm, guix/derivations.scm, guix/docker.scm,
guix/git.scm, guix/http-client.scm, guix/import/cpan.scm,
guix/import/cran.scm, guix/import/crate.scm, guix/import/elpa.scm,
guix/import/gnu.scm, guix/import/hackage.scm,
guix/import/texlive.scm, guix/import/utils.scm, guix/nar.scm,
guix/pki.scm, guix/scripts/archive.scm,
guix/scripts/authenticate.scm, guix/scripts/download.scm,
guix/scripts/hash.scm, guix/scripts/pack.scm,
guix/scripts/publish.scm, guix/scripts/refresh.scm,
guix/scripts/substitute.scm, guix/store.scm,
guix/store/deduplication.scm, guix/tests.scm, tests/base32.scm,
tests/builders.scm, tests/challenge.scm, tests/cpan.scm,
tests/crate.scm, tests/derivations.scm, tests/gem.scm,
tests/nar.scm, tests/opam.scm, tests/pki.scm,
tests/publish.scm, tests/pypi.scm, tests/store-deduplication.scm,
tests/store.scm, tests/substitute.scm: Adjust imports.
* gnu/system/vm.scm: Likewise.
(guile-sqlite3&co): Rename to...
(gcrypt-sqlite3&co): ... this.  Add GUILE-GCRYPT.
(expression->derivation-in-linux-vm)[config]: Remove.
(iso9660-image)[config]: Remove.
(qemu-image)[config]: Remove.
(system-docker-image)[config]: Remove.
* guix/scripts/pack.scm: Adjust imports.
(guile-sqlite3&co): Rename to...
(gcrypt-sqlite3&co): ... this.  Add GUILE-GCRYPT.
(self-contained-tarball)[build]: Call 'make-config.scm' without
 #:libgcrypt argument.
(squashfs-image)[libgcrypt]: Remove.
[build]: Call 'make-config.scm' without #:libgcrypt.
(docker-image)[config, json]: Remove.
[build]: Add GUILE-GCRYPT to the extensions  Remove (guix config) from
the imported modules.
* guix/self.scm (specification->package): Remove "libgcrypt", add
"guile-gcrypt".
(compiled-guix): Remove #:libgcrypt.
[guile-gcrypt]: New variable.
[dependencies]: Add it.
[*core-modules*]: Remove #:libgcrypt from 'make-config.scm' call.
Add #:extensions.
[*config*]: Remove #:libgcrypt from 'make-config.scm' call.
(%dependency-variables): Remove %libgcrypt.
(make-config.scm): Remove #:libgcrypt.
* build-aux/build-self.scm (guile-gcrypt): New variable.
(make-config.scm): Remove #:libgcrypt.
(build-program)[fake-gcrypt-hash]: New variable.
Add (gcrypt hash) to the imported modules.  Adjust load path
assignments.
* gnu/packages/package-management.scm (guix)[propagated-inputs]: Add
GUILE-GCRYPT.
[arguments]: In 'wrap-program' phase, add GUILE-GCRYPT to the search
path.
2018-09-04 17:25:11 +02:00
Ludovic Courtès
99b78ba498
linux-initrd: Report only missing modules, not all needed modules.
Previously the warning would list all the required modules rather than
just those that are missing.

* gnu/system/mapped-devices.scm (check-device-initrd-modules): Compute
'missing' and report it.
2018-07-29 18:50:28 +02:00
Ludovic Courtès
fcd068e984
linux-initrd: Try several file names when looking up modules.
Fixes <https://bugs.gnu.org/31714>.
Reported by Tonton <tonton@riseup.net>.

* gnu/build/linux-modules.scm (find-module-file): New procedure.
* gnu/system/linux-initrd.scm (flat-linux-module-directory)[build-exp]:
Remove 'lookup' procedure and use 'find-module-file' instead.
* gnu/system/mapped-devices.scm (check-device-initrd-modules): Add
comment.
2018-07-29 18:50:28 +02:00
Ludovic Courtès
d2a1cf45f7
linux-initrd: Improve check of initrd modules.
Previously we would not strip the ".ko" suffix if present.

* gnu/build/linux-modules.scm (file-name->module-name): Export.
* gnu/system/mapped-devices.scm (check-device-initrd-modules): Use
'file-name->module-name' instead of 'normalize-module-name'.
2018-07-29 18:50:28 +02:00
Ludovic Courtès
10df28d74d
system: '.guile' skeleton now recommends 'guile-colorized'.
* gnu/system/shadow.scm (default-skeletons)[".guile"]: Recommend
'guile-colorized'.
2018-07-23 12:25:31 +02:00
Ludovic Courtès
264967c883
install: Add service for the loopback device.
Lack of a loopback device prevented the system from building starting
from commit 363c946b36.

* gnu/system/install.scm (%installation-services): Add
'static-networking-service-type' instance for 'lo'.
2018-07-20 18:03:11 +02:00
Ludovic Courtès
fc0e663f78
doc: Improve UEFI/BIOS bootloader documentation.
Partly fixes <https://bugs.gnu.org/30312>.

* doc/guix.texi (Preparing for Installation): Add note on how to choose
between UEFI and BIOS.
(Using the Configuration System)[Bootloader]: New subsubsection.
(Bootloader Configuration): Expound on the bootloader type and target.
* gnu/system/examples/desktop.tmpl: Switch to UEFI.
* gnu/system/examples/bare-bones.tmpl: Explicitly mention "legacy" and
"BIOS" in the comments.
2018-07-05 11:44:46 +02:00
Ludovic Courtès
9fd877247d
system: Default .bashrc uses '--color=auto' for grep and ls.
Reported by Tobias Geerinckx-Rice <me@tobias.gr>
and Björn Höfling <bjoern.hoefling@bjoernhoefling.de>.

* gnu/system/shadow.scm (default-skeletons)["bashrc"]: Use
'--color=auto' instead of '--color'.
2018-07-04 21:52:23 +02:00
Danny Milosavljevic
4ce4fc5010
system: Add os-with-u-boot.
* gnu/system/install.scm (os-with-u-boot): New procedure.
* gnu/packages/bootloaders.scm (make-u-boot-package): Export.
* doc/guix.texi (Building the Installation Image for ARM Boards): New
subsection.
2018-06-15 14:16:37 +02:00
Ludovic Courtès
411959bef3
linux-initrd: Module check correctly handles hyphen vs. underscore.
Fixes <https://bugs.gnu.org/31714>.
Reported by Vagrant Cascadian <vagrant@debian.org>
and Florian Pelz <pelzflorian@pelzflorian.de>.

* gnu/system/mapped-devices.scm (check-device-initrd-modules): Pass
LINUX-MODULES through 'normalize-module-name'.
* gnu/build/linux-modules.scm (normalize-module-name): Export.
2018-06-14 23:34:59 +02:00
Ludovic Courtès
c45477d2a1
install: Use (guix store database) instead of 'guix-register'.
* gnu/build/install.scm (register-closure): Add #:reset-timestamps? and
and #:schema; honor them.  Rewrite in terms of 'register-path'.
(populate-single-profile-directory): Add #:schema and honor it.  Make
/var/guix/profiles and /var/guix/gcroots.
* gnu/build/vm.scm (root-partition-initializer): Pass
 #:reset-timestamps? to 'register-closure'.
* gnu/system/vm.scm (not-config?): New procedure.
(guile-sqlite3&co): New variable.
(expression->derivation-in-linux-vm)[config]: New variable.
[builder]: Use 'with-extensions'.
(iso9660-image)[schema, config]: New variables.
Wrap build expression in 'with-extensions'; add 'sql-schema' call.
Remove GUIX from INPUTS.
(qemu-image)[schema, config]: New variables.
Wrap body in 'with-extensions'.
(system-docker-image)[not-config?]: Remove.
[config]: Use 'make-config.scm'.
[schema]: New variable.
[build]: Use 'with-extensions'.  Add call to 'sql-schema'.  Remove GUIX
from INPUTS.
* gnu/system/file-systems.scm (%store-prefix): Check whether
'%store-prefix' is defined.
* guix/scripts/pack.scm (self-contained-tarball)[not-config?]
[libgcrypt, schema]: New variables.
[build]: Wrap in 'with-extensions'.  Adjust imported module list to use
'make-config.scm' for (guix config).
2018-06-14 11:16:59 +02:00
Ludovic Courtès
be43c08b17
vm: 'expression->derivation-in-linux-vm' code can now use dlopen.
* gnu/system/vm.scm (expression->derivation-in-linux-vm)
[user-builder]: Define in non-monadic style as 'program-file'.
[loader]: Likewise, and 'execl' USER-BUILDER instead of loading it.
(system-docker-image): Pass BUILD as the second
argument to 'expression->derivation-in-linux-vm'.
(make-iso9660-image, qemu-image): Remove call to 'reboot'.
2018-06-14 11:16:59 +02:00
Ludovic Courtès
6892f0a247
store-copy: 'read-reference-graph' returns a list of records.
The previous implementation of 'read-reference-graph' was good enough
for many use cases, but it discarded the graph structure, which is
useful information in some cases.

* guix/build/store-copy.scm (<store-info>): New record type.
(read-reference-graph): Rewrite to return a list of <store-info>.
(closure-size, populate-store): Adjust accordingly.
* gnu/services/base.scm (references-file): Adjust accordingly.
* gnu/system/vm.scm (system-docker-image): Likewise.
* guix/scripts/pack.scm (squashfs-image, docker-image): Likewise.
* tests/gexp.scm ("gexp->derivation #:references-graphs"): Likewise.
2018-06-14 11:16:58 +02:00
Ludovic Courtès
b19950a184
system: Default .bashrc now sources /etc/bashrc.
This is a followup to commit 1382bde93c,
which disabled automatic sourcing of /etc/bashrc by interactive shell.
The noticeable effect of the change would be that Bash completion would
only work in login shells.

* gnu/system/shadow.scm (default-skeletons)["bashrc"]: Source
/etc/bashrc.
2018-06-11 18:23:24 +02:00
Ludovic Courtès
fb126314f8
vm: 'iso9660-image' uses a local /tmp.
Fixes <https://bugs.gnu.org/31752>.
Regression introduced in commit 8c9bf2946a.

* gnu/system/vm.scm (iso9660-image): Pass #:file-systems to
'expression->derivation-in-linux-vm'.
2018-06-08 15:23:39 +02:00
Ludovic Courtès
50e53c1c67
vm: 'expression->derivation-in-linux-vm' takes a #:file-systems parameter.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Add
 #:file-systems and use it instead of %LINUX-VM-FILE-SYSTEMS.
2018-06-08 15:23:39 +02:00
Ludovic Courtès
9f160a0d3c
vm: Use 'with-extensions'.
* gnu/system/vm.scm (system-docker-image)[build]: Use
'with-extensions'.  Remove 'add-to-load-path' calls.
2018-06-01 15:21:28 +02:00
Ludovic Courtès
201f2c8769
vm: Remove unneeded dependency on Guile-JSON.
Fixes <https://bugs.gnu.org/31581>.
Reported by Leo Famulari <leo@famulari.name>.

* gnu/system/vm.scm: Remove unneeded (guix docker) import.
2018-05-29 18:29:36 +02:00
Vagrant Cascadian
6fe1657705
system: Add u-boot-puma-rk3399.
* gnu/packages/bootloaders.scm (u-boot-puma-rk3399): New variable.
(make-u-boot-package)[arguments]: Add '.rksd' files to the files installed
during custom 'install phase.
* gnu/bootloader/u-boot.scm (u-boot-puma-rk3399-bootloader):
New exported variable.
* gnu/system/install.scm (rk3399-puma-installation-os):
New exported variable.
* gnu/packages/firmware.scm (arm-trusted-firmware-puma-rk3399): New variable.
(rk3399-cortex-m0): New variable.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2018-05-29 10:46:13 +02:00
Ludovic Courtès
9ceeca0880
system: Remove uses of the 'title' field of <file-system>.
* gnu/system/install.scm (installation-os): Remove uses of the 'title'
field of 'file-system'; use 'file-system-label' as appropriate.
* gnu/system/vm.scm (system-disk-image, system-qemu-image): Likewise.
* gnu/tests.scm (%simple-os): Likewise.
* gnu/tests/install.scm (%minimal-os, %minimal-extlinux-os)
(%minimal-os-on-vda, %separate-home-os, %separate-store-os)
(%raid-root-os, %encrypted-root-os, %btrfs-root-os): Likewise.
* gnu/build/shepherd.scm (default-mounts)[tmpfs]: Likewise.
* tests/guix-system.sh: Likewise.
* tests/system.scm (%root-fs): Likewise.
("operating-system-boot-mapped-devices, implicit dependency"): Likewise.
2018-05-28 13:24:19 +02:00
Ludovic Courtès
a5acc17a3c
file-systems: Remove 'title' field and add <file-system-label>.
The 'title' field was easily overlooked and was an endless source of
confusion.  Now, the value of the 'device' field is self-contained.

* gnu/system/file-systems.scm (<file-system>): Change constructor name
to '%file-system'.
[title]: Remove.
(<file-system-label>): New record type with printer.
(report-deprecation, device-expression)
(process-file-system-declaration, file-system): New macros.
(file-system-title): New procedure.
(file-system->spec, spec->file-system): Adjust to handle
<file-system-label>.
* gnu/system.scm (bootable-kernel-arguments): Add case for
'file-system-label?'.
(read-boot-parameters): Likewise.
(mapped-device-user): Avoid 'file-system-title'.
(fs->boot-device): Remove.
(operating-system-boot-parameters): Use 'file-system-device' instead of
'fs->boot-device'.
(device->sexp): Add case for 'file-system-label?'.
* gnu/bootloader/grub.scm (grub-root-search): Add case for
'file-system-label?'.
* gnu/system/examples/bare-bones.tmpl,
gnu/system/examples/beaglebone-black.tmpl,
gnu/system/examples/lightweight-desktop.tmpl,
gnu/system/examples/vm-image.tmpl: Remove uses of 'title'.
* gnu/system/vm.scm (virtualized-operating-system): Remove uses of
'file-system-title'.
* guix/scripts/system.scm (check-file-system-availability): Likewise,
and adjust fix-it hint.
(check-initrd-modules)[file-system-/dev]: Likewise.
* gnu/build/file-systems.scm (canonicalize-device-spec): Remove 'title'
parameter.
[canonical-title]: Remove.
Match on SPEC's type rather than on CANONICAL-TITLE.
(mount-file-system): Adjust caller.
* gnu/build/linux-boot.scm (boot-system): Interpret ROOT here.
* gnu/services/base.scm (file-system->fstab-entry): Remove use of
'file-system-title'.
* doc/guix.texi (File Systems): Remove documentation of the 'title'
field.  Rewrite documentation of 'device' and document
'file-system-label'.
2018-05-28 13:24:11 +02:00
Ludovic Courtès
56f9d442e0
vm: Use a deterministic file system UUID in shared-store VMs.
* gnu/system/vm.scm (system-qemu-image/shared-store): Pass
 #:file-system-uuid to 'qemu-image'.
2018-05-23 10:21:02 +02:00
Ludovic Courtès
d282388789
linux-initrd: Enable "virtio-rng".
Fixes <https://bugs.gnu.org/31268>.

* gnu/system/linux-initrd.scm (default-initrd-modules)[virtio-modules]:
Add "virtio-rng".
2018-05-23 10:21:02 +02:00
Ludovic Courtès
263c9941a1
uuid: 'uuid' returns #f when 'string->uuid' returns #f.
* gnu/system/uuid.scm (uuid): When STR is not a literal, return #f when
'string->uuid' returns #f.
* tests/uuid.scm ("uuid, dynamic value"): New test.
2018-05-19 00:14:52 +02:00
Ludovic Courtès
a48d345041
file-systems: Do not export <file-system>.
* gnu/system/file-systems.scm (<file-system>): Do not export.
* gnu/system.scm (operating-system-root-file-system): Use an accessor
instead of 'match'.
2018-05-19 00:14:52 +02:00
Vagrant Cascadian
9f7d666566
system: Add u-boot-pine64-plus installer.
* gnu/bootloader/u-boot.scm (u-boot-pine64-plus-bootloader):
New exported variable.
* gnu/system/install.scm (pine64-plus-installation-os):
New exported variable.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2018-05-18 20:21:30 +02:00
Vagrant Cascadian
1b960787e2
system: Add u-boot-novena installer.
* gnu/packages/bootloaders.scm (u-boot-novena):
  New variable.
* gnu/bootloader/u-boot.scm (u-boot-novena-bootloader):
  New exported variable.
* gnu/system/install.scm (novena-installation-os):
  New exported variable.
2018-05-11 12:25:43 +02:00
Vagrant Cascadian
fd5536e32b
system: Add wandboard installer.
* gnu/bootloader/u-boot.scm (u-boot-wandboard-bootloader):
  New exported variable.
* gnu/system/install.scm (wandboard-installation-os):
  New exported variable.
2018-05-11 12:25:25 +02:00
Vagrant Cascadian
07ca90458f
system: Add mx6cuboxi installer.
* gnu/bootloader/u-boot.scm (u-boot-mx6cuboxi-bootloader):
  New exported variable.
* gnu/system/install.scm (mx6cuboxi-installation-os):
  New exported variable.
2018-05-11 12:25:25 +02:00
Ludovic Courtès
df1eaffc36
file-systems: Expound '%pseudo-file-system-types'.
Reported by Tobias Geerinckx-Rice <me@tobias.gr>.

* gnu/system/file-systems.scm (%pseudo-file-system-types): Add
"debugfs", "efivarfs", "hugetlbfs", "overlay", and "securityfs".
2018-04-29 17:55:08 +02:00
Ludovic Courtès
6ddb59607b
guix system: Report wrong file system 'device' fields.
Previously, if you wrote (device "my-label") without (title 'label),
you'd get:

  guix system: error: stat: No such file or directory: "my-label"

Now you get a proper error and a hint.

Reported by Pierre-Antoine Rouby.

* guix/scripts/system.scm (check-file-system-availability)[literal]: New
variable.  Loop over LITERAL.
* gnu/system/file-systems.scm (%pseudo-file-system-types): New variable.
* guix/ui.scm (display-hint): Make public.
2018-04-27 18:45:02 +02:00
Ludovic Courtès
76a77ccaed
system: Add default '.nanorc' with syntax highlighting.
* gnu/system/shadow.scm (default-skeletons): Add ".nanorc".
2018-04-04 23:14:35 +02:00
Ludovic Courtès
f7a5cf7a2d
nss: Remove '%compat' from the defaults.
* gnu/system/nss.scm (%compat): Add comment.
(<name-service-switch>)[group, password, shadow]: Remove %COMPAT from
the default value.
2018-03-27 23:26:15 +02:00
Chris Marusich
a335f6fcc9
system: Add "guix system docker-image" command.
* gnu/system/vm.scm (system-docker-image): New procedure.
* guix/scripts/system.scm (system-derivation-for-action): Add a case for
  docker-image, and in that case, call system-docker-image.
  (show-help): Document docker-image.
  (guix-system): Parse arguments for docker-image.
* doc/guix.texi (Invoking guix system): Document "guix system
  docker-image".
* gnu/system/examples/docker-image.tmpl: New file.
2018-03-24 03:04:11 +01:00
Chris Marusich
8c9bf2946a
gnu: When building in a VM, share a temporary directory.
* gnu/build/vm.scm (load-in-linux-vm): Make a shared temporary directory
  available in the VM.
* gnu/system/vm.scm (%linux-vm-file-systems): Add a corresponding entry.
2018-03-24 03:04:10 +01:00
Ludovic Courtès
248db51c7e
vm: Display a backtrace upon error by default.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Pass
 #:on-error to 'base-initrd'.
2018-03-18 22:34:40 +01:00
Mark H Weaver
3e5783e292
linux-initrd: Autoload known-module-aliases, again.
Fixes a regression introduced in 8ab10c19d7.

* gnu/system/mapped-devices.scm: Autoload 'known-module-aliases'.
2018-03-15 23:08:02 -04:00
Ludovic Courtès
8ab10c19d7
linux-initrd: Move 'check-device-initrd-modules' elsewhere.
This mostly reverts ca23693d28, which
introduced a circular dependency between (gnu system linux-initrd)
and (gnu system mapped-devices).

Reported by Eric Bavier.

* gnu/system/linux-initrd.scm (check-device-initrd-modules): Move to...
* gnu/system/mapped-devices.scm (check-device-initrd-modules): ... here.
* po/guix/POTFILES.in: Adjust accordingly.
2018-03-15 23:46:16 +01:00
Ludovic Courtès
bb3062ad62
services: Add 'virtual-terminal'.
Fixes <https://bugs.gnu.org/30505>.
Suggested by Danny Milosavljevic <dannym@scratchpost.org>.

* gnu/services/base.scm (unicode-start): Remove.
(virtual-terminal-service-type): New variable.
(console-font-shepherd-services): Remove 'modules'; remove call to
'unicode-start'.  Add 'virtual-terminal' to 'requirement'.
(mingetty-shepherd-service, kmscon-service-type): Likewise.
(%base-services): Add 'virtual-terminal-service-type'.
* gnu/system/install.scm (%installation-services): Likewise.
2018-03-15 11:37:18 +01:00
Danny Milosavljevic
0803ddf267
linux-initrd: Autoload known-module-aliases.
* gnu/system/linux-initrd.scm: Autoload known-module-aliases.
2018-03-10 09:23:00 +01:00
Ludovic Courtès
8d5c14edf5
linux-initrd: Skip initrd module check when 'modules.alias' can't be found.
Fixes <https://bugs.gnu.org/30760>.
Reported by Tomáš Čech <sleep_walker@gnu.org>.

* gnu/system/linux-initrd.scm (check-device-initrd-modules): Call
'known-module-aliases' and catch 'system-error around it.  Pass it to
'matching-modules'.
2018-03-10 00:15:59 +01:00
Ludovic Courtès
dffc5ab5e4
vm: Use 9p mount tags below 32 chars.
Fixes <https://bugs.gnu.org/30667>.
Reported by Björn Höfling <bjoern.hoefling@bjoernhoefling.de>.

* gnu/system/vm.scm (file-system->mount-tag): Use 'sha1' to compute the
tag.
2018-03-08 11:56:20 +01:00
Ludovic Courtès
abfbdafd0e
linux-initrd: Add a hint for the missing module error.
* gnu/system/linux-initrd.scm (check-device-initrd-modules): Add a
'&fix-hint'.
2018-03-07 11:22:42 +01:00
Ludovic Courtès
ca23693d28
linux-initrd: Factorize 'check-device-initrd-modules'.
* gnu/system/mapped-devices.scm (check-device-initrd-modules): Move to...
* gnu/system/linux-initrd.scm (check-device-initrd-modules): ... here.
New procedure.
* po/guix/POTFILES.in: Add it.
* guix/scripts/system.scm (check-initrd-modules)[check-device]: Remove.
Use 'check-device-initrd-modules' instead.
2018-03-07 11:22:42 +01:00
Ludovic Courtès
6c4458172d
services: file-systems: Include 'user-file-systems' service.
Previously the KNOWN-FS value used in 'essential-services' would be
incomplete: it would lack all the file systems provided by services that
extend 'file-system-service-type' (/sys/fs/cgroup,
/proc/sys/fs/binfmt_misc, etc.)  Consequently, upon shutdown,
'user-processes' would unmount these file systems before their
corresponding service had been stopped; when their corresponding (e.g.,
'file-system-/proc/sys/fs/binfmt_misc') was stopped, its 'umount' call
would fail.

This was harmless in practice, but this patch makes sure things work as
intended and file systems are unmounted in the right order.

* gnu/services/base.scm (file-system-shepherd-services): Instantiate
'user-file-systems' Shepherd service from here.
(user-unmount-service-type, user-unmount-service): Remove.
* gnu/system.scm (essential-services): Remove call to 'user-unmount-service'.
* gnu/system/install.scm (cow-store-service-type): Adjust comment.
2018-03-07 11:22:42 +01:00
Ludovic Courtès
eac026e5c8
linux-initrd: Add virtio modules to '%base-initrd-modules'.
Fixes a regression in installation tests, whereby 'guix system init'
would report that virtio modules are missing for the target devices.
In practice virtio modules were always available since 'base-initrd' was
always called with #:virtio? #t.  This commit simply moves them to
'%base-initrd-modules' so that 'guix system' knows they're available.

Reported by Danny Milosavljevic <dannym@scratchpost.org> at
<https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30629#112>.

* gnu/system/linux-initrd.scm (default-initrd-modules): Add virtio
modules.
(base-initrd): Remove #:virtio? and 'virtio-modules'.
* gnu/system/vm.scm (expression->derivation-in-linux-vm)
(system-qemu-image, virtualized-operating-system): Remove uses of
 #:virtio?.
* doc/guix.texi (Initial RAM Disk): Update 'base-initrd' doc.
2018-03-03 09:41:21 +01:00
Ludovic Courtès
f850e0da8e
system: beaglebone-black: Use 'initrd-modules'.
* gnu/system/examples/beaglebone-black.tmpl: Use 'initrd-modules'
instead of 'initrd'.
2018-03-03 09:41:21 +01:00
Ludovic Courtès
5a3716aebf
vm: Add missing modules to the 'expression->derivation-in-linux-vm' initrd.
Fixes a regression introduced in
bc499b113a, whereby the default initrd
used by 'expression->derivation-in-linux-vm' would lack all the usual
modules: virtio, nls_iso8859-1, etc.

* gnu/system/vm.scm (expression->derivation-in-linux-vm): Pass
 #:linux-modules to 'base-initrd'.
2018-03-03 09:41:21 +01:00
Ludovic Courtès
3cb3a4e6e5
linux-initrd: 'file-system-modules' returns the right module list.
Fixes a bug whereby, for an "iso9660" file system, it would return
'("iso9660" "isofs"), i.e., both the key and the value.

Reported by Danny Milosavljevic <dannym@scratchpost.org>
at <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30629#115>.

* gnu/system/linux-initrd.scm (lookup-procedure): 'vhash-assoc' returns
a key/value pair; match it.
2018-03-03 09:41:21 +01:00
Ludovic Courtès
424cea8083
guix system: Check for the lack of modules in the initrd.
* guix/scripts/system.scm (check-mapped-devices): Take an OS instead of
a list of <mapped-device>.  Pass #:needed-for-boot? and #:initrd-modules
to CHECK.
(check-initrd-modules): New procedure.
(perform-action): Move 'check-mapped-devices' call first.  Add call to
'check-initrd-modules'.
* gnu/system/mapped-devices.scm (check-device-initrd-modules): New
procedure.
(check-luks-device): Add #:initrd-modules and #:needed-for-boot?.  Use
them to call 'check-device-initrd-modules'.
2018-03-02 13:53:15 +01:00
Ludovic Courtès
bc499b113a
system: Add 'initrd-modules' field.
* gnu/system.scm (<operating-system>)[initrd-modules]: New field.
(operating-system-initrd-file): Pass #:linux-modules to 'make-initrd'.
* gnu/system/linux-initrd.scm (default-initrd-modules): New procedure.
(%base-initrd-modules): New macro.
(base-initrd): Add #:linux-modules and honor it.
* gnu/system/install.scm (embedded-installation-os): Use
'initrd-modules' instead of 'initrd'.
* gnu/tests/install.scm (%raid-root-os): Likewise.
* doc/guix.texi (operating-system Reference): Add 'initrd-modules'.
(Initial RAM Disk): Document it.  Adjust example to not use
 #:extra-modules.
2018-03-02 13:53:10 +01:00
Ludovic Courtès
615a89e310
linux-initrd: Separate file system module logic.
* gnu/system/linux-initrd.scm (vhash, lookup-procedure): New macros.
(file-system-type-modules, file-system-modules): New procedures.
(base-initrd)[cifs-modules, virtio-9p-modules]: Remove.
[file-system-type-predicate]: Remove.
Use 'file-system-modules' instead of 'find' +
'file-system-type-predicate'.
2018-03-02 13:46:45 +01:00
Mark H Weaver
150062f190
Merge branch 'master' into core-updates 2018-02-16 13:14:26 -05:00
Danny Milosavljevic
5a9902c8ac
services: agetty: Add agetty instance to base services. Make its tty optional.
* gnu/services/base.scm (%base-services): Instantiate agetty-service.
(default-serial-port): New variable.
(agetty-shepherd-service): Make tty optional, default to the above.
* doc/guix.texi (agetty-configuration): Update "tty" documentation.
* gnu/system/install.scm (agetty-default-service): Delete variable.
(embedded-installation-os): Remove agetty-default-service instance.
Add "console" kernel-argument.
2018-02-15 12:05:21 +01:00
Marius Bakke
bee7bb315c
Merge branch 'master' into core-updates 2018-02-01 13:18:47 +01:00
Mark H Weaver
e0e10e2f58
gnu: linux-libre: NVME core support is now built-in.
* gnu/system/linux-initrd.scm (base-initrd)[linux-modules]: Remove "nvme".
* gnu/packages/aux-files/linux-libre/4.1-i686.conf,
gnu/packages/aux-files/linux-libre/4.1-x86_64.conf,
gnu/packages/aux-files/linux-libre/4.4-i686.conf,
gnu/packages/aux-files/linux-libre/4.4-x86_64.conf: Set CONFIG_BLK_DEV_NVME=y.
* gnu/packages/aux-files/linux-libre/4.9-i686.conf,
gnu/packages/aux-files/linux-libre/4.9-x86_64.conf,
gnu/packages/aux-files/linux-libre/4.14-arm.conf,
gnu/packages/aux-files/linux-libre/4.14-i686.conf,
gnu/packages/aux-files/linux-libre/4.14-x86_64.conf: Set CONFIG_BLK_DEV_NVME=y
and CONFIG_NVME_CORE=y.
2018-01-30 03:51:11 -05:00
Mark H Weaver
6d5a65de7f
system: Put locales where libc will find them.
* gnu/system/locale.scm (localedef-command, single-locale-directory): Use only
the major+minor part of the libc version number in the locale directory name.
2018-01-24 11:18:49 -05:00
Mark H Weaver
a102d359a6
Merge branch 'master' into core-updates 2018-01-23 17:01:07 -05:00
Danny Milosavljevic
0db22b32ce
system: Rename a20-olinuxino-lime-sd-installation-os.
* gnu/system/install.scm (a20-olinuxino-lime-sd-installation-os): Rename to...
(a20-olinuxino-lime-installation-os): ...this.
2018-01-23 12:01:11 +01:00
Danny Milosavljevic
c55c698594
system: Add A20 OLinuXino LIME installer.
* gnu/bootloader/u-boot.scm (u-boot-a20-olinuxino-lime-bootloader):
New exported variable.
* gnu/packages/bootloaders.scm (u-boot-a20-olinuxino-lime):
New exported variable.
* gnu/system/install.scm (a20-olinuxino-lime-installation-os):
New exported variable.
2018-01-22 22:53:08 +01:00
Ludovic Courtès
30875d07ef
doc: No longer mention Wicd in OS examples.
* gnu/system/examples/desktop.tmpl,
gnu/system/examples/lightweight-desktop.tmpl: Mention NetworkManager
instead of Wicd.
2018-01-21 00:24:03 +01:00
Danny Milosavljevic
84ee33787e
system: Add Nintendo NES Classic Edition installer.
* gnu/bootloader/u-boot.scm (u-boot-nintendo-nes-classic-edition-bootloader):
New exported variable.
* gnu/packages/bootloaders.scm (u-boot-nintendo-nes-classic-edition):
New exported variable.
* gnu/system/install.scm (nintendo-nes-classic-edition-installation-os):
New exported variable.
2018-01-20 22:50:56 +01:00
Danny Milosavljevic
fccdc8c839
system: Factor out embedded-installation-os.
* gnu/system/install.scm (embedded-installation-os): New variable.
(beaglebone-black-installation-os): Use it.
(a20-olinuxino-lime2-emmc-installation-os): Use it.
(a20-olinuxino-micro-installation-os): Use it.
(banana-pi-m2-ultra-installation-os): Use it.
2018-01-20 22:50:56 +01:00
Danny Milosavljevic
8bac66deab
system: Factor out agetty-default-service.
* gnu/system/install.scm (agetty-default-service): New variable.
(beaglebone-black-installation-os): Use it.
(a20-olinuxino-lime2-emmc-installation-os): Use it.
(a20-olinuxino-micro-installation-os): Use it.
(banana-pi-m2-ultra-installation-os): Use it.
2018-01-20 22:50:55 +01:00
Danny Milosavljevic
a7bb327e3c
system: Add A20 OLinuXino MICRO installer.
* gnu/bootloader/u-boot.scm (u-boot-a20-olinuxino-micro-bootloader): New
exported variable.
* gnu/packages/bootloaders.scm (u-boot-a20-olinuxino-micro): New exported
variable.
* gnu/system/install.scm (a20-olinuxino-micro-installation-os): New exported
variable.
2018-01-20 22:50:55 +01:00
Danny Milosavljevic
4b9e9abb36
system: Add A20 OLinuXino LIME2 installer.
* gnu/bootloader/u-boot.scm (u-boot-a20-olinuxino-lime2-bootloader): New
exported variable.
* gnu/packages/bootloaders.scm (u-boot-a20-olinuxino-lime2): New exported
variable.
* gnu/system/install.scm (a20-olinuxino-lime2-emmc-installation-os): New exported
variable.
2018-01-20 22:50:55 +01:00
Danny Milosavljevic
30aeb846d7
system: Add Banana Pi M2 Ultra installer.
* gnu/bootloader/u-boot.scm (u-boot-banana-pi-m2-ultra-bootloader): New
exported variable.
(install-allwinner-u-boot): New variable.
(u-boot-allwinner-bootloader): New variable.
* gnu/packages/bootloaders.scm (u-boot-banana-pi-m2-ultra): New exported
variable.
* gnu/system/install.scm (banana-pi-m2-ultra-installation-os): New exported
variable.
2018-01-20 20:33:10 +01:00
Mark H Weaver
e074a655dd
Merge branch 'master' into core-updates 2018-01-19 23:59:20 -05:00
Tobias Geerinckx-Rice
162a137400
gnu: Consistently Write ‘file system(s)’.
It is the GNU way.

* doc/guix.texi (Build Systems, DNS Services): Write ‘file system(s)’.
* gnu/build/vm.scm (create-ext-file-system, create-fat-file-system):
Likewise.
* gnu/packages/backup.scm (dirvish, rsnapshot)[description]: Likewise.
* gnu/packages/check.scm (python-testpath)[description]: Likewise.
* gnu/packages/disk.scm (pydf)[description]: Likewise.
* gnu/packages/file-systems.scm (disorderfs)[synopsis, description]: Likewise.
(glusterfs)[description]: Likewise.
* gnu/packages/haskell.scm (ghc-directory, ghc-system-fileio-bootstrap)
(ghc-system-fileio)[synopsis]: Likewise.
(ghc-fsnotify)[description]: Likewise.
* gnu/packages/linux.scm (proot)[description]: Likewise.
(jmtpfs)[synopsis, description]: Likewise.
* gnu/packages/mate.scm (caja, caja-extensions)[description]: Likewise.
* gnu/packages/storage.scm (ceph)[description]: Likewise.
* gnu/packages/sync.scm (lsyncd)[description]: Likewise.
* gnu/packages/syncthing.scm (syncthing)[synopsis]: Likewise.
(go-github-com-zillode-notify)[description]: Likewise.
* gnu/services/nfs.scm (pipefs-service-type): Likewise.
* guix/scripts/system.scm (perform-action): Likewise.
2018-01-19 17:28:31 +01:00
Leo Famulari
4adb40bffc
Merge branch 'master' into core-updates 2018-01-11 14:22:50 -08:00
Ludovic Courtès
b0de7fdba6
system: Extend .gdbinit to authorize extensions from /gnu/store/*/lib.
* gnu/system/shadow.scm (default-skeletons)["gdbinit"]: Add 'auto-load
safe-path' statement.
2018-01-09 23:39:02 +01:00
Ludovic Courtès
aeed74f370
linux-boot: Add #:on-error for initrd error handling.
Suggested by Danny Milosavljevic <dannym@scratchpost.org>
in <https://bugs.gnu.org/29922>.

* gnu/build/linux-boot.scm (boot-system): Add #:on-error parameter and
pass it to 'call-with-error-handling'.
* gnu/system/linux-initrd.scm (raw-initrd): Add #:on-error and pass it.
(base-initrd): Likewise.
2018-01-08 23:44:07 +01:00
Ludovic Courtès
61b94b8c32
vm: 'vm-image' images refer to the root file system by UUID.
This avoids the hard-coded "/dev/sda1", which only made sense when the
image is run with "qemu-system-x86_64 -hda", not when it's passed to
Xen, etc.

Reported by Andreas Enge <andreas@enge.fr>.

* gnu/system/vm.scm (system-qemu-image): Define 'root-uuid', use it as
the 'device' field for "/", and pass it to 'qemu-image'.
2018-01-07 15:09:05 +01:00
Efraim Flashner
23de2e1d5f
Merge remote-tracking branch 'origin/master' into core-updates 2017-12-31 14:10:25 +02:00
Mathieu Othacehe
2cf5f4c144
file-systems: Move %control-groups from %base-file-systems to
%elogind-file-systems.

* gnu/system/file-systems.scm (%base-file-systems): Move %control-groups from
here, to ...
(%elogind-file-systems): ... here.
2017-12-22 15:03:10 +01:00
Mathieu Othacehe
c729225b0f
file-systems: Do not mount hugetlb cgroup filesystem.
On ARM32 without LPAE support, hugetlb control group is not supported.
As it is not needed by elogind, remove it for all platforms.

* gnu/system/file-systems.scm (%control-groups): Remove hugetlb from control
  groups platforms.
2017-12-22 15:03:10 +01:00
Ludovic Courtès
42ff7d3be6
mapped-devices: 'luks-device-mapping' checks its source device.
* gnu/system/mapped-devices.scm (check-luks-device): New procedure.
(luks-device-mapping)[check]: New field.
2017-12-22 09:48:38 +01:00
Ludovic Courtès
4ca90ff597
mapped-devices: Add 'location' and 'check' fields.
* gnu/system/mapped-devices.scm (<mapped-device>)[location]: New field.
(<mapped-device-type>)[check]: New field.
2017-12-22 09:48:36 +01:00
Mathieu Othacehe
a468f89743
system: examples: Add missing initrd to beaglebone-black.tmpl.
* gnu/system/examples/beaglebone-black.tmpl (operating-system): Add the
  initrd with "omap_hsmmc" as an extra-module.
2017-12-22 08:49:57 +01:00
Marius Bakke
32cd878be0
Merge branch 'master' into core-updates 2017-12-19 01:42:40 +01:00
Mathieu Othacehe
9f1e39d1fc
system: examples: Add a template for BeagleBone Black.
* gnu/system/examples/beaglebone-black.tmpl: New file.
* Makefile.am (EXAMPLES): Add it.
* gnu/system/install.scm (/etc/configuration-files): Add it.
2017-12-18 15:28:14 +01:00
Leo Famulari
2ca712bdba
vm: Pass the host's /dev/urandom to the guest at /dev/hwrng.
* gnu/build/vm.scm (load-in-linux-vm): Use QEMU's virtio-rng-pci.
* gnu/system/vm.scm (common-qemu-options): Likewise.
2017-12-18 00:39:40 -05:00
Christopher Baines
e0d96774dd
gnu: system: vm: Use loose cache for 9p file system.
This improves the performance of the shared store for operations involving
lots of files, e.g. searching through the store.

* gnu/system/vm.scm (mapping->file-system): Add cache=loose to options.
2017-12-17 20:46:40 +00:00
Mathieu Othacehe
ceb3952764
system: Add BeagleBone Black installer.
* gnu/bootloader/u-boot.scm (u-boot-beaglebone-black-bootloader): New exported
  bootloader.
* gnu/system/install.scm (beaglebone-black-installation-os): New exported variable.
2017-12-15 12:15:15 +01:00
Mathieu Othacehe
e224820386
bootloader: Factorize write-file-on-device.
* gnu/bootloader/extlinux.scm (install-extlinux): Factorize bootloader
writing in a new procedure write-file-on-device defined in (gnu build
bootloader).
* gnu/build/bootloader.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add new file.
* gnu/system/vm.scm (qemu-img): Adapt to import and use (gnu build bootloader)
module during derivation building.
* gnu/scripts/system.scm (bootloader-installer-derivation): Ditto.
2017-12-15 11:52:38 +01:00
Mathieu Othacehe
acf54bca22
vm: Adapt qemu command to ARM.
* gnu/build/vm.scm (load-in-linux-vm): New argument #:target-arm32.
Use it to adapt command for qemu-system-arm.  This implies to choose a
machine ("virt"), use the correct console port "ttyAMA0", disable KVM use
that is buggy on some ARM boards (Odroid XU4 for example) and use user mode
network stack instead of NIC. Gather all those options in a new variable
"arch-specific-flags".
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Pass
to load-in-linux-vm "#:target-arm32?" argument.
2017-12-15 11:44:29 +01:00
Ludovic Courtès
2ba2c98d8a
gnu: guile: Move Readline support to a separate 'guile-readline' package.
This reduces the closure of Guile from 131 MiB to 116 MiB and removes
extra readline/ncurses builds from the bootstrap path.

* gnu/packages/guile.scm (guile-2.0)[inputs]: Remove READLINE.
(make-guile-readline): New procedure.
(guile-readline): New variable.
* gnu/system/shadow.scm (default-skeletons): Adjust '.guile' so that it
gracefully deals with missing (ice-9 readline).
2017-12-08 18:18:59 +01:00
Ludovic Courtès
5a2f019c7d
Merge branch 'version-0.14.0' 2017-12-07 17:16:05 +01:00
Tobias Geerinckx-Rice
fdfdecdb7e
gnu, doc, tests: Use ‘bootloader-configuration’ everywhere.
* doc/guix.texi (Proceeding with the Installation): Replace the old-style
‘grub-configuration’ with the newer ‘bootloader-configuration’ syntax.
* gnu/system/examples/vm-image.tmpl: Likewise.
* gnu/system/install.scm (installation-os): Likewise.
* gnu/tests.scm (%simple-os): Likewise.
* gnu/tests/install.scm (%minimal-os, %minimal-os-on-vda, %separate-home-os)
(%separate-store-os, %raid-root-os, %encrypted-root-os, %btrfs-root-os):
Likewise.
* gnu/tests/nfs.scm (%base-os): Likewise.
* tests/guix-system.scm (OS_BASE, make_user_config): Likewise.
* tests/system.scm (%os, %os-with-mapped-device): Likewise.
2017-12-06 15:02:24 +01:00
Ludovic Courtès
aab322d909
install: Don't start sshd by default.
Reported by Christopher Baines <mail@cbaines.net>
at <https://lists.gnu.org/archive/html/guix-devel/2017-12/msg00058.html>.

* gnu/services/ssh.scm (<openssh-configuration>)[%auto-start?]: New
field.
(openssh-shepherd-service): Honor it.
* gnu/system/install.scm (%installation-services): Set '%auto-start?' to
 #f for openssh-service-type.
2017-12-04 23:31:15 +01:00
Mathieu Othacehe
4307397b5e
bootloader: extlinux: Stop using dd binary.
* gnu/bootloader/extlinux.scm (dd): Remove it,
(install-extlinux): replace dd call by Guile I/O procedures.
* gnu/system/vm.scm (qemu-image): Add (ice-9 binary-ports) to used-modules
list to provide "get-bytevector-n" and "put-bytevector".
* guix/scripts/system.scm (bootloader-installer-derivation): Ditto.
2017-12-04 18:26:59 +01:00
Ludovic Courtès
8638362f13
install: Add colors in 'motd' and 'issue'.
* gnu/system/install.scm (%installation-services)[motd]: Add colors.
[services]: Use the "lat9u-16" font.
(%issue): Add colors.
2017-12-03 19:12:16 +01:00
Ludovic Courtès
af4a761e97
install: Add the prerequisites of 'profile-derivation' as GC roots.
* gnu/system/install.scm (%installation-services): Add
GLIBC-UTF8-LOCALES, TEXINFO, and GUILE-FINAL as GC roots.
2017-12-03 19:12:16 +01:00
Ludovic Courtès
bf57e1c708
uuid: Fix typo in comment.
* gnu/system/uuid.scm: Fix typo in comment.
2017-12-02 23:13:20 +01:00
Mathieu Othacehe
04bbd07218
system: vm: Fix typo in comment.
* gnu/system/vm.scm (qemu-image): Fix typo targetting -> targeting.
2017-12-02 13:58:05 +01:00
Mathieu Othacehe
00e39b2ea4
system: vm: Do not add EFI partition on ARM system.
* gnu/system/vm.scm (qemu-img): Do not add EFI partition if we are targetting
  ARM.

UEFI support on u-boot is still experimental, so do not add EFI partition on
ARM for now.
2017-12-01 13:55:49 +01:00
Ludovic Courtès
f00515b483
vm: Filter out file systems that refer to UUIDs or labels.
* gnu/system/vm.scm (virtualized-operating-system)[user-file-systems]:
Filter out things that refer to file system UUIDs or labels.
2017-11-30 18:14:57 +01:00
Mathieu Othacehe
b8e7781122
vm: Use os-defined initrd intead of base-initrd.
* gnu/system/vm.scm (system-disk-image, system-qemu-image,
  virtualized-operating-system): Replace base-initrd by
  (operating-system-initrd os).

The system produced were always using base-initrd even if the user had
defined a custom initrd based on raw-initrd in the os declaration.
2017-11-26 13:50:37 +01:00
Tobias Geerinckx-Rice
795ec760e4
install: Fix typo.
* gnu/system/install.scm (installation-os): Fix typo in comment.
2017-11-11 05:17:59 +01:00
Hartmut Goebel
d9565f7d87
install: Use overlayfs instead of unionfs.
I dediced to keep adding /tmp as tmpfs since I was not able to trigger bug
while still using unionfs, so I could not verify whether this mount is still
needed with overlayfs.  Mapping /tmp to tmpfs does not harm, so we are on the
save side.

* gnu/system/install.scm (make-cow-store): Mount /gnu/store without additional
  read-only bind-mount, since in overlayfs the "lower" level is always
  read-only. Add work-dir required by overlayfs. No need to sleep anymore
  since now using the mount syscall. [unionfs]: Remove now unused function.
  (%installation-services): Update comment.
  (installation-os)[file-systems]: Update comment.
2017-11-08 18:23:06 +01:00
Hartmut Goebel
c828969036
build: Use overlayfs instead of unionfs.
Overlayfs is part of the kernel, while unionfs needs FUSE.  This also reduces
the size of the initrd by ca. 4.3% (487K).

* gnu/build/linux-boot.scm (mount-root-file-system): Remove optional parameter
  "unionfs"; mount using overlayfs instead of unionfs; new directory layout
  requied by overlayfs; update documentation.
  [mark-as-not-killable]: Remove now unused function

* gnu/system/linux-initrd.scm (file-system-packages): Remove now unused
  packages "unionfs-fuse/static" and thus unused related 'if'.
  (linux-modules): Replace "fuse" by "overlay".
2017-11-08 18:23:05 +01:00
Mathieu Othacehe
b1a3079347
system: vm: Use 2^32 - 1 as hash size.
* gnu/system/vm.scm (operating-system-uuid): Use 2^32 - 1 instead of
  2^32 as hash size.

On some 32 bit system (ARM for example), 2^32 exceeds hash max
size (ULONG_MAX = 2^32 - 1).
2017-11-06 20:02:25 +01:00