Commit graph

1027 commits

Author SHA1 Message Date
Mathieu Othacehe
f292d4719d
image: Add 'target' support.
* gnu/image.scm (<image>)[target]: New field,
(image-target): new public method.
* gnu/system/image.scm (hurd-disk-image): Set "i586-pc-gnu" as image 'target'
field,
(maybe-with-target): new procedure,
(system-image): honor image 'target' field using the above procedure.
2020-06-13 15:20:52 +02:00
Jan (janneke) Nieuwenhuizen
7ca533c723
image: Make 'find-image' non-monadic.
* gnu/system/image.scm (find-image): Make non-monadic.  Add 'target'
parameter.
* gnu/tests/install.scm (run-install): Update caller,
passing (%current-target-system).
* guix/scripts/system.scm (perform-action): Likewise.
2020-06-13 15:03:55 +02:00
Jan (janneke) Nieuwenhuizen
60fdd9e389
system: hurd: Remove 'cross-hurd-image' hack.
The initial

    guix build -f gnu/system/hurd.scm

hack has been superseded by regular guix system (cross) build.

* gnu/system/hurd.scm (compile-manifest, cross-hurd-image): Remove.
2020-06-13 09:11:47 +02:00
Jan (janneke) Nieuwenhuizen
edbc067138
system: bare-hurd.tmpl: Add openssh-sans-x client and service.
* gnu/system/examples/bare-hurd.tmpl (%hurd-os)[packages]: Add openssh-sans-x.
[services]: Add openssh-service.  Add example usage.
2020-06-13 09:11:47 +02:00
Mathieu Othacehe
fd1e885236
system: image: Do not produce an HFS tree when building an ISO.
Use "mbr_only" mode to make sure that no HFS+ tree are generated.

* gnu/system/image.scm (system-image): Set MKRESCUE_SED_MODE to "mbr_only".
2020-06-12 17:21:18 +02:00
Royce Strange
23567138f8
system: vm: Add missing imported module.
* gnu/system/vm.scm (qemu-image): Import missing (gnu build hurd-boot) module.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2020-06-09 01:31:16 -04:00
Jan (janneke) Nieuwenhuizen
b37c544196
hurd-boot: Further cleanup of "rc".
* gnu/packages/hurd.scm (hurd-rc-script): Move implementation to ...
* gnu/build/hurd-boot.scm (boot-hurd-system): ...here, new file.
* gnu/build/linux-boot.scm (make-hurd-device-nodes): Move there likewise.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
2020-06-08 14:26:14 +02:00
Jan (janneke) Nieuwenhuizen
11e4200fee
system: hurd: Populate services.
* gnu/system/hurd.scm (%base-services/hurd): Add hurd-console-service,
hurd-getty-services, guix-service.  Also add sylog and loopback, needed for
...
* gnu/system.scm (hurd-default-essential-services): ... add
%shepherd-root-service with dependencies: %boot-service, %activation-service,
user-processes, root-file-system-service, file-system-service,
pam-root-service.
2020-06-08 14:26:14 +02:00
Jan (janneke) Nieuwenhuizen
59bcffa314
system: examples: Add bare-hurd.tmpl.
* gnu/system/hurd.scm (%hurd-def%hurd-default-operating-system-kernel,
%hurd-default-operating-system): New exported variables.
* gnu/system/examples/bare-hurd.tmpl: New file.
* Makefile.am (EXAMPLES): Add it.
* tests/guix-system.sh: Add --target=i586-pc-gnu when testing it.
2020-06-08 13:51:19 +02:00
Mathieu Othacehe
c77b92859f
image: Add Hurd support.
* gnu/system/image.scm (hurd-disk-image): New exported variable,
(root-offset, root-label): new variables,
(esp-partition, root-partition): adapt accordingly,
(find-image): add Hurd support.
2020-06-08 13:51:18 +02:00
Mathieu Othacehe
0dddaa7b01
system: bare-bones: Remove dependency to X libraries.
Use "openssh-sans-x" to prevent the inclusion of X libraries to the bare-bones
system closure.

* gnu/system/examples/bare-bones.tmpl (operating-system)[services]: Use
openssh-sans-x instead of openssh.
2020-06-08 11:03:11 +02:00
Mathieu Othacehe
ea5d9bf991
system: install: Add default libcs to gc-roots.
During the installation, it may be needed to build locales that are not
covered by glibc-utf8-locales. Make sure that the libraries required to build
locales are available.

This is a follow-up of 0eed771275.

* gnu/system/install.scm (installation-os)[services]: Add
%default-locale-libcs to gc-root-service-type.
2020-06-08 10:52:53 +02:00
Ludovic Courtès
e768e4e97f
vm: Shared-store script runs the native QEMU and Bash.
* gnu/system/vm.scm (system-qemu-image/shared-store-script): Use #+ for
QEMU and BASH.
2020-06-06 23:28:49 +02:00
Ludovic Courtès
60f759f06d
vm: <virtual-machine> compiler honors system and target.
* gnu/system/vm.scm (system-qemu-image/shared-store): Add #:system
and #:target.  Pass it down.
(system-qemu-image/shared-store-script): Likewise.
(virtual-machine-compiler): Likewise.
2020-06-06 23:28:49 +02:00
Ludovic Courtès
52c1b90a5a
vm: 'qemu-image' preserves the cross-compilation target of the OS.
* gnu/system/vm.scm (qemu-image)[preserve-target, inputs*]: New variables.
In gexp, use INPUTS* instead of INPUTS.  Wrap OS and BOOTCFG-DRV in
'preserve-target'.  Pass INPUTS* instead of INPUTS as the #:references-graphs.
2020-06-06 23:28:49 +02:00
Ludovic Courtès
96cb3f8a29
vm: 'qemu-image' uses the native partitioning tools and bootloader.
* gnu/system/vm.scm (qemu-image): Use #+ for Parted, the bootloader, etc.
2020-06-06 23:28:49 +02:00
Ludovic Courtès
b347723445
vm: 'expression->derivation-in-linux-vm' always returns a native build.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Remove #:target.
[builder]: Use #+.  Don't pass #:target-arm32? and #:target-aarch64? to
'load-in-linux-vm'.
Pass #:target #f to 'gexp->derivation'.
(qemu-image): Adjust accordingly.
* gnu/build/vm.scm (load-in-linux-vm): Remove #:target-aarch64?
and #:target-arm32?.  Define them as local variables.
2020-06-06 23:28:49 +02:00
Mathieu Othacehe
e3f0155c41
image: Do not use VM to create disk-images.
Now that installing Grub on raw disk-images is supported, we do not need to
rely on (gnu system vm) module.

* gnu/system/image.scm (make-system-image): Rename to ...
(system-image): ... this, and remove the compatibility wrapper.
(find-image): Turn to a monadic procedure. This will become useful when
introducing Hurd support, to be able to detect the target system.
* gnu/ci.scm (qemu-jobs): Use lower-object now that system-image returns a
file-like object.
* gnu/tests/install.scm (run-install): Ditto.
* guix/scripts/system.scm (system-derivation-for-action): Add a 'base-image'
argument,
(perform-action): adapt accordingly.
2020-05-29 09:12:11 +02:00
Mathieu Othacehe
b7b45372e7
image: Add a post-MBR gap to the default image.
The generic 'efi-disk-image' needs to be bootable on systems without EFI. To
do that, GRUB is installed in the post-MBR gap. Make sure that the first
partition starts with an offset, to make this gap large enough for GRUB.

* gnu/system/image.scm (root-offset, root-label): New variables,
(esp-partition): use 'root-offset' as the partition offset,
(root-partition): use 'root-label' as the partition label.
2020-05-29 09:10:27 +02:00
Mathieu Othacehe
749381051d
system: image: Fix image-with-os.
* gnu/system/image.scm (image-with-os): Do not reorder partitions, as we want
them to be created according to definition order.
2020-05-29 08:43:36 +02:00
Mathieu Othacehe
05f37c16a3
image: Use grub-efi to install the EFI bootloader.
* gnu/build/image.scm (initialize-efi-partition): Rename bootloader-package
argument to grub-efi.
* gnu/system/image.scm (system-disk-image): Adapt accordingly to pass
grub-efi package.
2020-05-29 08:43:20 +02:00
Mathieu Othacehe
7d4ecda63c
system: image: Correct genimage configuration file indentation.
* gnu/system/image.scm (system-disk-image): Fix genimage configuration file
indentation.
2020-05-29 08:40:03 +02:00
Mathieu Othacehe
9c1adb2400
image: Add bootloader installation support.
* gnu/build/image.scm (initialize-root-partition): Add bootloader-package and
bootloader-installer arguments. Run the bootloader-installer if defined.
* gnu/system/image.scm (system-disk-image): Adapt the partition initializer
call accordingly.
2020-05-29 08:40:03 +02:00
Mathieu Othacehe
7feefb3b82
bootloader: Add 'disk-image-installer'.
* gnu/bootloader.scm (<bootloader>)[disk-image-installer]: New field,
(bootloader-disk-image-installer): export it.
* gnu/bootloader/grub.scm (install-grub-disk-image): New procedure ...
(grub-bootloader): ... used as "disk-image-installer" here.
(grub-efi-bootloader): set "disk-image-installer" to #f.
* gnu/system/image.scm (root-partition?, find-root-partition): Move to
"Helpers" section.
(root-partition-index): New procedure.
(system-disk-image): Honor disk-image-installer, and
use it to install the bootloader directly on the disk-image, if supported.
2020-05-29 08:37:13 +02:00
Ludovic Courtès
c041c360b7
system: hurd: Remove custom <manifest> gexp compiler.
This is superseded by <profile>, which was added in
ef674a24c5.

* gnu/system/hurd.scm (compile-manifest): Remove.
(cross-hurd-image)[system-profile]: Define using 'profile'.
2020-05-28 00:55:00 +02:00
Mathieu Othacehe
bd3716f6fe
image: Add partition file-system options support.
* gnu/image.scm (<partition>)[file-system-options]: New field,
(partition-file-system-options): new exported procedure.
* gnu/system/image.scm (partition->gexp): Adapt accordingly.
* gnu/build/image.scm (sexp->partition): Also adapt accordingly,
(make-ext-image): and pass file-system options to mke2fs.
2020-05-26 17:16:42 +02:00
Mathieu Othacehe
1dd7b87f10
image: Set offset default to zero.
* gnu/image.scm (<partition>)[offset]: Set to zero by default.
* gnu/system/image.scm (system-disk-image): Adapt accordingly.
2020-05-26 13:06:37 +02:00
Mathieu Othacehe
1dbd0005a1
system: image: Fix disk-image cross-compilation.
* gnu/system/image.scm (system-disk-image): Use the native version of the
helper packages (e2fsprogs, dosfstools, mtools, genimage, coreutils and
findutils).
2020-05-26 10:00:08 +02:00
Mathieu Othacehe
1b4fa7851b
image: Add partition offset support.
* gnu/image.scm (partition-offset): New procedure,
(<partition>)[offset]: new field.
* gnu/system/image.scm (system-disk-image): Apply the partition offset.
2020-05-26 09:57:06 +02:00
Maxim Cournoyer
b460ba7992
bootloader: grub: Allow booting from a Btrfs subvolume.
* gnu/bootloader/grub.scm (strip-mount-point): Remove procedure.
(normalize-file): Add procedure.
(grub-configuration-file): New BTRFS-SUBVOLUME-FILE-NAME parameter.  When
defined, prepend its value to the kernel and initrd file names, using the
NORMALIZE-FILE procedure.  Adjust the call to EYE-CANDY to pass the
BTRFS-SUBVOLUME-FILE-NAME argument.  Normalize the KEYMAP file as well.
(eye-candy): Add a BTRFS-SUBVOLUME-FILE-NAME parameter, and use it, along with
the NORMALIZE-FILE procedure, to normalize the FONT-FILE and IMAGE nested
variables.  Adjust doc.
* gnu/bootloader/depthcharge.scm (depthcharge-configuration-file): Adapt.
* gnu/bootloader/extlinux.scm (extlinux-configuration-file): Likewise.
* gnu/system/file-systems.scm (btrfs-subvolume?)
(btrfs-store-subvolume-file-name): New procedures.
* gnu/system.scm (operating-system-bootcfg): Specify the Btrfs
subvolume file name the store resides on to the
`operating-system-bootcfg' procedure, using the new
BTRFS-SUBVOLUME-FILE-NAME argument.
* doc/guix.texi (File Systems): Add a Btrfs subsection to document the use of
subvolumes.
* gnu/tests/install.scm (%btrfs-root-on-subvolume-os)
(%btrfs-root-on-subvolume-os-source)
(%btrfs-root-on-subvolume-installation-script)
(%test-btrfs-root-on-subvolume-os): New variables.
2020-05-20 08:30:35 -04:00
Maxim Cournoyer
fa35fb58c8
file-systems: Add helpers for parsing the options string into an alist.
* gnu/system/file-systems.scm (file-system-options->alist)
(alist->file-system-options): New procedures.
* tests/file-systems.scm: New tests.
* doc/guix.texi (File Systems): Add note about the newly added procedures.
2020-05-20 08:30:34 -04:00
Ludovic Courtès
12adffd43e
linux-initrd: Silence Guile warnings.
Previously, since the switch to Guile 3, we'd see this warning repeated
several times at boot time:

  WARNING: …: imported module (guix build utils) overrides core binding `delete'

* gnu/system/linux-initrd.scm (raw-initrd): In gexp, #:hide 'delete'
from (guix build utils).  Wrap 'boot-system' in 'parameterize'.
2020-05-16 00:34:41 +02:00
Ludovic Courtès
502f609d05
vm: Use 'let-system'.
* gnu/system/vm.scm (expression->derivation-in-linux-vm)[check]: New macro.
[builder]: Use 'let-system' and 'check' instead of referencing
'%current-system' and '%current-target-system'.
2020-05-16 00:34:41 +02:00
Ludovic Courtès
4daa7a85b4
locale: Use the native gzip and libc when building locales.
This fixes system cross-compilation.

* gnu/system/locale.scm (single-locale-directory)[build]: Use the native
GZIP and LIBC.
2020-05-15 00:01:39 +02:00
Marius Bakke
4bdf4182fe
Merge branch 'core-updates' 2020-05-08 21:40:51 +02:00
Ludovic Courtès
dd0804c67e
services: Add descriptions.
* gnu/services/dbus.scm (polkit-service-type)[description]: New field.
* gnu/services/dict.scm (dicod-service-type)[description]: New field.
* gnu/services/dns.scm (knot-service-type)[description]: New field.
* gnu/services/networking.scm (dhcpd-service-type)[description]: New field.
* gnu/services/shepherd.scm (shepherd-root-service-type)[description]:
New field.
* gnu/services/xorg.scm (slim-service-type)[description]: New field.
(screen-locker-service-type)[description]: New field.
* gnu/system/pam.scm (pam-root-service-type)[description]: New field.
* gnu/system/shadow.scm (account-service-type)[description]: New field.
2020-05-08 16:30:50 +02:00
Ludovic Courtès
d6c43d7bc1
guix system: 'docker-image' honors '--network'.
* gnu/system/vm.scm (system-docker-image): Add #:shared-network? and
pass it to 'containerized-operating-system'.
(qemu-image):
* guix/scripts/system.scm (system-derivation-for-action): Pass
 #:shared-network? to 'system-docker-image'.
* doc/guix.texi (Invoking guix system): Document it.
2020-05-07 12:55:14 +02:00
Marius Bakke
87a40d7203
Merge branch 'master' into core-updates 2020-05-05 20:43:21 +02:00
Mathieu Othacehe
77f5296236
vm: Remove obsolete procedures.
* gnu/build/vm.scm (install-efi, make-iso9660-image): Remove those procedures
that are now implemented in (gnu build image) module,
(initialize-hard-disk): remove efi support.
* gnu/system/vm.scm (iso9660-image): Remove it,
(qemu-image): adapt it to remove ISO9660 support.
2020-05-05 16:13:55 +02:00
Mathieu Othacehe
f19cf27c2b
image: Add a new API.
Raw disk-images and ISO9660 images are created in a Qemu virtual machine. This
is quite fragile, very slow, and almost unusable without KVM.

For all these reasons, add support for host image generation. This implies the
use new image generation mechanisms.

- Raw disk images: images of partitions are created using tools such as mke2fs
  and mkdosfs depending on the partition file-system type. The partition
  images are then assembled into a final image using genimage.

- ISO9660 images: the ISO root directory is populated within the store. GNU
  xorriso is then called on that directory, in the exact same way as this is
  done in (gnu build vm) module.

Those mechanisms are built upon the new (gnu image) module.

* gnu/image.scm: New file.
* gnu/system/image.scm: New file.
* gnu/build/image: New file.
* gnu/local.mk: Add them.
* gnu/system/vm.scm (system-disk-image): Rename to system-disk-image-in-vm.
* gnu/ci.scm (qemu-jobs): Adapt to new API.
* gnu/tests/install.scm (run-install): Ditto.
* guix/scripts/system.scm (system-derivation-for-action): Ditto.
2020-05-05 16:13:53 +02:00
Mathieu Othacehe
78fbf2bd70
system: vm: Move operating-system-uuid.
* gnu/system/vm.scm (operating-system-uuid): Move to ...
* gnu/system.scm: ... here.
2020-05-05 16:08:32 +02:00
Danny Milosavljevic
33eab4a10d
linux-initrd: Provide fsck for F2FS.
* gnu/system/linux-initrd.scm (file-system-packages): Add F2FS fsck.
2020-05-03 23:04:59 +02:00
Danny Milosavljevic
f8a0065ae3
install: Add f2fs-tools to the installation image.
* gnu/system/install.scm (installation-os)[packages]: Add f2fs-tools.
2020-05-03 20:35:50 +02:00
Ludovic Courtès
0eed771275
locale: Add glibc 2.29 to '%default-locale-libcs'.
This eases transition for anyone reconfiguring and still having profiles
with packages using the former libc.

* gnu/system/locale.scm (%default-locale-libcs): Add GLIBC-2.29.
2020-05-03 17:25:28 +02:00
Marius Bakke
50e6c1bf2e
Merge branch 'master' into core-updates 2020-05-02 17:31:28 +02:00
raingloom
27efeef306
linux-initrd: Add initial support for F2FS.
* gnu/system/linux-initrd.scm (file-system-type-modules): Add f2fs module.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2020-05-02 10:54:39 +02:00
Marius Bakke
57833803b4
gnu: linux-initrd: Use Guile 3.0.
* gnu/system/linux-initrd.scm (expression->initrd): Change from
%GUILE-STATIC-STRIPPED to %GUILE-3.0-STATIC-STRIPPED.
2020-05-01 22:06:34 +02:00
Florian Pelz
73ddcab607
Revert "install: Pass "modprobe.blacklist=radeon"."
This reverts commit 7859191210, which is no longer
needed since uvesafb was added in 557e6820a7.
2020-05-01 08:26:07 +00:00
Jan (janneke) Nieuwenhuizen
3eb4b466fc
system: hurd: Add /etc/group.
This allows download to run.

* gnu/system/hurd.scm (cross-hurd-image): Add /etc/group with guixbuilder.
2020-05-01 08:52:53 +02:00
Efraim Flashner
9b0c047c53
system: hurd: Add less, which to %base-packages/hurd.
* gnu/system/hurd.scm (%base-packages/hurd): Add less, which.
2020-05-01 08:52:52 +02:00
Marius Bakke
8bf8cd9b85
Merge branch 'master' into core-updates
Conflicts:
	gnu/local.mk
	gnu/packages/backup.scm
	gnu/packages/emacs-xyz.scm
	gnu/packages/guile.scm
	gnu/packages/lisp.scm
	gnu/packages/openldap.scm
	gnu/packages/package-management.scm
	gnu/packages/web.scm
	gnu/packages/xorg.scm
2020-04-30 23:47:49 +02:00
Jakub Kądziołka
2ef4d273d1
file-systems: mount the PID cgroup filesystem.
* gnu/system/file-systems.scm (%control-groups): Add "pids".
* gnu/services/docker.scm (docker-shepherd-service): Resolve a TODO.

This has allowed me to make a specific configuration of nsjail work.
2020-04-27 14:14:47 +02:00
Ludovic Courtès
0e5c2d5e14
services: system: Initial entries are non-monadic.
* gnu/system.scm (operating-system-directory-base-entries): Return a
regular, non-monadic value.
* gnu/services.scm (system-derivation): Adjust accordingly.
* gnu/system/linux-container.scm (container-essential-services): Likewise.
2020-04-26 22:49:49 +02:00
Marius Bakke
f589cbc4dc
Merge branch 'master' into core-updates 2020-04-26 13:48:06 +02:00
Marius Bakke
796b387bc2
vm: Remove unused import.
* gnu/system/vm.scm: Do not import (gnu packages make-bootstrap).
2020-04-26 11:27:06 +02:00
Marius Bakke
030f6f489f
Merge branch 'master' into core-updates
Conflicts:
	etc/news.scm
	gnu/local.mk
	gnu/packages/bootloaders.scm
	gnu/packages/linphone.scm
	gnu/packages/linux.scm
	gnu/packages/tls.scm
	gnu/system.scm
2020-04-23 13:33:09 +02:00
Florian Pelz
80dbad1814
installer: Rename uvesafb shepherd service to maybe-uvesafb.
Because the installer's uvesafb service loads uvesafb only on some machines.

This is a follow-up to commit 0ad60b2a89.

* gnu/system/install.scm (uvesafb-shepherd-service): Adjust provision and
description fields.
2020-04-20 19:24:21 +00:00
Marius Bakke
7abe35febe
Merge branch 'master' into core-updates 2020-04-19 16:53:01 +02:00
Marius Bakke
9a749af467
installer: Add GC root for Guile 3.0.
* gnu/system/install.scm (%installation-services)[gc-root-service-type]: Add
GC root for GUILE-3.0 instead of GUILE-2.2.
2020-04-19 15:50:49 +02:00
Ludovic Courtès
1e7281108b
services: account: Have 'user-processes' depend on 'user-homes'.
Until now, 'user-homes' happened to start right after 'user-processes'
and before services that depend on a home directory but the dependency
was not explicit.  This addresses it.

* gnu/system/shadow.scm (account-service-type): Extend
USER-PROCESSES-SERVICE-TYPE.
2020-04-17 23:18:32 +02:00
Marius Bakke
bd21acf6c3
Merge branch 'master' into core-updates 2020-04-15 19:26:55 +02:00
Ludovic Courtès
b4440de133
Merge branch 'version-1.1.0' 2020-04-15 16:09:18 +02:00
Florian Pelz
0ad60b2a89
installer: Only load uvesafb kernel module when needed.
This is a follow-up to commit 557e6820a7.

* gnu/system/install.scm (uvesafb-shepherd-service): Check
that /dev/fb0 is not already present.
2020-04-14 13:05:57 +00:00
Florian Pelz
557e6820a7
installer: Load uvesafb kernel module.
Fixes <https://bugs.gnu.org/40538>.

Machines without Kernel Mode Setting (those with many old and current AMD
GPUs, SiS GPUs, …) need uvesafb to show the GUI installer.  Some may also need
a kernel parameter like nomodeset or vga=793, but we leave that for the user
to specify in GRUB.

* gnu/system/install.scm (uvesafb-shepherd-service): New procedure.
(uvesafb-service-type): New variable.
(%installation-services): Add it.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2020-04-11 22:59:35 +02:00
Ludovic Courtès
5084fd3854
system: hurd: Add guile-candy.
* gnu/system/hurd.scm (%base-packages/hurd): Add GUILE-COLORIZED and
GUILE-READLINE.
(cross-hurd-image)[hurd-directives]: Add /root/.guile.
2020-04-11 21:03:05 +02:00
Jan (janneke) Nieuwenhuizen
db047a482c
system: hurd: Add net-base and inetutils, and /etc/{services,protocols}.
This fixes

    In procedure getaddrinfo: Servname not supported for ai_socktype

* gnu/system/hurd.scm (%base-packages/hurd): Add net-base, inetutils.
(cross-hurd-image): Add /etc/{services,protocols} from net-base.
2020-04-11 21:02:45 +02:00
Ludovic Courtès
c621269404
system: hurd: Create a proper profile.
* gnu/system/hurd.scm (compile-manifest): New procedure.
(cross-hurd-image)[for-hurd, hurd-os]: Remove.
[cross-built, cross-built-entry]: New procedures.
[system-profile]: New variable.
[grub.cfg]: Use 'cross-built'.
[profile]: Rename to...
[etc-profile]: ... this, and adjust accordingly.
[hurd-directives]: Create /run/current-system/profile and /etc/profile.
Adjust arguments to 'qemu-image'.
2020-04-11 21:01:32 +02:00
Jan (janneke) Nieuwenhuizen
da987ece8f
system: hurd: Add root profile.
* gnu/system/hurd.scm (%base-packages/hurd): New variable.
(cross-hurd-image)[for-hurd]: New function.
(cross-hurd-image)[hurd-os]: Use them.
(cross-hurd-image)[profile]: Hack'y .profile for root, only setting PATH.
2020-04-11 21:01:09 +02:00
Ludovic Courtès
5fbf4f85e1
system: hurd: Create /etc/{hostname,motd,login} and /root.
* gnu/system/hurd.scm (cross-hurd-image): Add /etc/{hostname,motd,login}
and /root.
2020-04-11 21:01:09 +02:00
Jan (janneke) Nieuwenhuizen
fe1f9646b4
system: hurd: Add "/bin/sh" symlink.
This allows login.c to succeed for root.

* gnu/system/hurd.scm (cross-hurd-image): Link /bin/sh to full the full bash.
2020-04-11 21:01:09 +02:00
Jan (janneke) Nieuwenhuizen
6598c6149b
system: hurd: Add /etc/{passwd,shadow}.
* gnu/system/hurd.scm: Generate hard-coded /etc/{passwd,shadow},
allows running chown in MAKEDEV and loggin in.
2020-04-11 21:01:09 +02:00
Jan (janneke) Nieuwenhuizen
cd4faab563
system: hurd: Add ttys symlink in "/etc/ttys".
* gnu/packages/hurd.scm (hurd): Substitute /libexec/.
* gnu/system/hurd.scm (cross-hurd-image): Add symlink /etc/ttys =>
<hurd>/etc/ttys.
2020-04-11 21:01:09 +02:00
Jan (janneke) Nieuwenhuizen
379d0f5184
system: hurd: Add "/etc/fstab".
This allows running

    mount -o remount,rw /

successfully.

* gnu/system/hurd.scm (cross-hurd-image): Create a hard coded fstab and add it
to hurd-os.
2020-04-11 21:01:09 +02:00
Ludovic Courtès
a9f7993ea7
Add (gnu system hurd).
* gnu/system/hurd.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
2020-04-11 21:01:01 +02:00
Ludovic Courtès
cd45d656f1
vm: Make the device node procedure a parameter.
* gnu/build/vm.scm (root-partition-initializer): Add #:make-device-nodes
parameter and use it.
* gnu/system/vm.scm (qemu-image): Add #:device-node parameter.  Pass
 #:make-device-nodes to 'root-partition-initializer'.
2020-04-11 20:59:40 +02:00
Ludovic Courtès
4d1ff68d73
vm: 'qemu-image' can pass options to the 'mkfs' command.
* gnu/build/vm.scm (<partition>)[file-system-options]: New field.
(create-ext-file-system, create-fat-file-system)
(format-partition): Add #:options and honor it.
(initialize-partition): Pass #:options to 'format-partition'.
* gnu/system/vm.scm (qemu-image): Add #:file-system-options and use it
for the root partition.
2020-04-11 19:22:25 +02:00
Ludovic Courtès
82782d8cec
vm: 'qemu-image' accepts a list of extra populate directives.
* gnu/build/vm.scm (root-partition-initializer): Add #:extra-directives
parameter and pass it to 'populate-root-file-system'.
* gnu/system/vm.scm (qemu-image): Add #:extra-directives parameter and
pass it to 'root-partition-initializer'.
2020-04-11 19:22:25 +02:00
Marius Bakke
bdb90df764
Merge branch 'master' into core-updates 2020-04-11 00:10:23 +02:00
Marius Bakke
5379392731
vm: Use virtio network driver.
This fixes a regression introduced in 8e53fe2b91
where 'guix system vm' would no longer be using virtio.

* gnu/system/vm.scm (common-qemu-options): Add "-nic user,model=virtio-net-pci".
2020-04-10 20:20:11 +02:00
Ludovic Courtès
74f01059cb
vm: 'system-disk-image' honors #:substitutable? for ISO9660 images.
This is a followup to a328f66a9e.

* gnu/system/vm.scm (iso9660-image): Add #:substitutable? and pass it to
'expression->derivation-in-linux-vm'.
(system-disk-image): Pass #:substitutable? to 'iso9660-image'.
2020-04-10 16:06:23 +02:00
Ludovic Courtès
76026b5f51
vm: 'system-disk-image' honors #:substitutable? for ISO9660 images.
This is a followup to a328f66a9e.

* gnu/system/vm.scm (iso9660-image): Add #:substitutable? and pass it to
'expression->derivation-in-linux-vm'.
(system-disk-image): Pass #:substitutable? to 'iso9660-image'.
2020-04-10 16:02:51 +02:00
Marius Bakke
2778302399
Merge branch 'master' into core-updates
Conflicts:
	etc/news.scm
	gnu/local.mk
	gnu/packages/check.scm
	gnu/packages/cross-base.scm
	gnu/packages/gimp.scm
	gnu/packages/java.scm
	gnu/packages/mail.scm
	gnu/packages/sdl.scm
	gnu/packages/texinfo.scm
	gnu/packages/tls.scm
	gnu/packages/version-control.scm
2020-04-08 13:00:50 +02:00
Ludovic Courtès
a328f66a9e
vm: Allow images to be marked as non-substitutable.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Add
 #:substitutable? parameter.  Pass it to 'gexp->derivation'.
(qemu-image): Add #:substitutable? and pass it to
'expression->derivation-in-linux-vm'.
(system-disk-image): Add #:substitutable? and pass it to 'qemu-image'.
2020-04-08 12:42:41 +02:00
Ludovic Courtès
2729cb406d
system: Allow for comma-separated keyboard layouts.
Reported by Florian Pelz <pelzflorian@pelzflorian.de>.

* gnu/bootloader/grub.scm (keyboard-layout-file): Replace commas with
hyphens in the first argument to 'computed-file'.
* gnu/system/keyboard.scm (keyboard-layout->console-keymap): Likewise.
* doc/guix.texi (Keyboard Layout): Add example.
2020-04-06 00:14:13 +02:00
Ludovic Courtès
c7af968717
system: Add xterm to lightweight-desktop example.
That makes ratpoison more usable, for instance.

* gnu/system/examples/lightweight-desktop.tmpl (packages): Add XTERM.
2020-04-02 11:48:25 +02:00
Efraim Flashner
f12bd0bedd
system: Move nanorc to XDG_CONFIG_HOME.
* gnu/system/shadow.scm (skeleton-directory): Move .nanorc to
.config/nano/nanorc.
2020-04-01 07:50:48 +03:00
Leo Famulari
49d20d51e9
Revert "system: Move nanorc to XDG_CONFIG_HOME."
This reverts commit bd71818df3.

This changed caused system reconfiguration to fail like this:

------
building /gnu/store/y1x8asbzw624ywgkpin35p1i4bqnyfy2-skel.drv...
Backtrace:
           4 (primitive-load "/gnu/store/2x7d0jsbgf2ndb5fsk0nj07rhsx?")
In ice-9/eval.scm:
    619:8  3 (_ #f)
In ice-9/boot-9.scm:
   260:13  2 (for-each #<procedure 7ffff6ad8100 at ice-9/eval.scm:3?> ?)
In guix/build/utils.scm:
   343:27  1 (_ "/gnu/store/ajrgkj1s9vdcq00drn703f4zj9dvfrsv-nanorc" ?)
In unknown file:
           0 (copy-file "/gnu/store/ajrgkj1s9vdcq00drn703f4zj9dvfrs?" ?)

ERROR: In procedure copy-file:
In procedure copy-file: No such file or directory
`/gnu/store/v1grsca743phw41lyf63dzmh9nz5jlpn-bash_profile' -> `.bash_profile'
`/gnu/store/xdsaw0mj6axj427hyi6ysrnsxi21n7d5-bashrc' -> `.bashrc'
`/gnu/store/6i0b236dyar78zc5k5hrj5dv3vr4zb9w-zprofile' -> `.zprofile'
`/gnu/store/ajrgkj1s9vdcq00drn703f4zj9dvfrsv-nanorc' -> `.config/nano/nanorc'
builder for `/gnu/store/y1x8asbzw624ywgkpin35p1i4bqnyfy2-skel.drv' failed with exit code 1
------
2020-03-30 16:02:38 -04:00
Efraim Flashner
bd71818df3
system: Move nanorc to XDG_CONFIG_HOME.
* gnu/system/shadow.scm (default-skeletons): Move .nanorc to
.config/nano/nanorc.
2020-03-30 15:40:30 +03:00
Marius Bakke
ae0badf5bb
Merge branch 'master' into core-updates
Conflicts:
	gnu/packages/admin.scm
	gnu/packages/commencement.scm
	gnu/packages/guile.scm
	gnu/packages/linux.scm
	gnu/packages/package-management.scm
	gnu/packages/pulseaudio.scm
	gnu/packages/web.scm
2020-03-30 12:17:33 +02:00
Marius Bakke
18af687037
Merge branch 'master' into core-updates
Conflicts:
	gnu/packages/icu4c.scm
	gnu/packages/man.scm
	gnu/packages/python-xyz.scm
	guix/scripts/environment.scm
	guix/scripts/pack.scm
	guix/scripts/package.scm
	guix/scripts/pull.scm
	guix/store.scm
2020-03-27 00:12:15 +01:00
Ludovic Courtès
be6520e6a5
vm: Distinguish between success and failure of the guest code.
Fixes <https://bugs.gnu.org/34276>.
Reported by Tobias Geerinckx-Rice <me@tobias.gr>.

* gnu/system/vm.scm (expression->derivation-in-linux-vm)[loader]:
Produce '/xchg/.exit-status' file upon success.
* gnu/build/vm.scm (load-in-linux-vm): Check for 'xchg/.exit-status'
once QEMU has completed and respond accordingly.
2020-03-26 23:45:41 +01:00
Vagrant Cascadian
37f8c50cdc
gnu: linux-libre-arm-veyron: Deprecate package.
* gnu/packages/linux (linux-libre-arm-veyron): Mark as deprecated package.
  (kernel-config-veyron): Remove obsolete function.
* gnu/system/examples/asus-c201.tmpl: Update to use linux-libre-arm-generic.
* gnu/packages/aux-files/linux-libre/5.4-arm-veyron.conf: Delete file.
* Makefile.am (AUX_FILES): Update accordingly.
2020-03-22 20:55:37 -07:00
Marius Bakke
d19b14c834
Merge branch 'master' into core-updates 2020-03-21 22:16:02 +01:00
Jan Nieuwenhuizen
ac75bd0102
gnu: system: Remove guile-wm from skeleton.
* gnu/system/shadow.scm (default-skeletons): Remove guile-wm (especially as a
dependency).
2020-03-19 12:14:19 +01:00
Marius Bakke
50b99c90c8
Merge branch 'master' into core-updates 2020-03-10 20:50:02 +01:00
Ludovic Courtès
09844816c7
vm: Compute UUIDs truly deterministically.
This is a followup to 1540075c79.
The mistake had no effect on prior Guile versions but it's visible since
Guile 3.0.1 and the fix for <https://bugs.gnu.org/39634>.

* gnu/system/vm.scm (operating-system-uuid): Hash a list of
'file-system-digest' values, not the 'file-system-type' procedure.
2020-03-10 18:16:39 +01:00
Marius Bakke
ebb7cf9e21
Merge branch 'master' into core-updates 2020-03-04 23:16:17 +01:00
Maxim Cournoyer
99e676db43
file-systems: Add a 'file-system-device->string' procedure.
* gnu/system/file-systems.scm (file-system-device->string): New procedure.
* gnu/system.scm (bootable-kernel-arguments): Use it.
* gnu/system/vm.scm (operating-system-uuid): Likewise.
* guix/scripts/system.scm (display-system-generation): Likewise.
2020-03-02 23:24:47 -05:00
Mathieu Othacehe
f30d84d32d
system: locale: Remove canonical-package call.
This is a follow-up of dfc8ccbf5d. Building
locales using the same glibc as the one programs are linked against is
enough.

* gnu/system/locale.scm (%default-locale-libcs): Use the plain glibc package.
2020-02-12 11:09:11 +01:00
Mathieu Othacehe
dfc8ccbf5d
system: Stop using canonical-package.
Usage of canonical-package outside of thunked fields breaks cross-compilation,
see: https://lists.gnu.org/archive/html/guix-devel/2019-12/msg00410.html.

* gnu/installer.scm (installer-program): Remove canonical-package.
* gnu/services/base.scm (<nscd-cache>): Ditto,
(%base-services): ditto.
* gnu/services/xorg.scm: Remove useless canonical-package import.
* gnu/system.scm (%base-packages): Remove canonical-package.
* gnu/system/install.scm (%installation-services): Ditto,
(installation-os): ditto.
* gnu/system/locale.scm (single-locale-directory): Ditto.
2020-02-11 13:54:45 +01:00
Efraim Flashner
c27710859c
system: linux-container: Recommend guix container.
* gnu/system/linux-container.scm (container-script)[script]: Recommend
using 'guix container' to get a shell inside the running container.
2020-01-06 12:20:21 +02:00
Tobias Geerinckx-Rice
b24f561c5e
install: Add jfsutils to the installation image.
* gnu/system/install.scm (installation-os)[packages]: Add jfsutils.
2020-01-03 13:54:14 +01:00
Tobias Geerinckx-Rice
c7b5cfb014
linux-initrd: Add support for JFS.
* gnu/system/linux-initrd.scm (file-system-packages): Add jfs_fsck/static.
(file-system-type-modules): Add ‘jfs’ module.
2020-01-03 13:54:13 +01:00
Tobias Geerinckx-Rice
43c4d27cdf
uuid: Add support for JFS.
* gnu/system/uuid.scm (string->jfs-uuid): New procedure.
(%uuid-parsers, %uuid-printers): Add ‘jfs’ file system type.
2020-01-03 13:54:13 +01:00
Marius Bakke
8e53fe2b91
gnu: Remove uses of deprecated Qemu network configuration.
* gnu/build/vm.scm (load-in-linux-vm): Move Qemu network configuration from
ARCH-SPECIFIC-FLAGS to the Qemu command line.  Use the "-nic" option of Qemu
instead of "-device" and "-net".
* gnu/system/vm.scm (common-qemu-options): Do not add a '-net' command.
(virtual-machine-compiler): Use "-nic user,..." instead of "-net".
* doc/guix.texi (Installing Guix in a VM, Invoking guix system, Running Guix
in a VM): Do the same for examples.
2019-12-18 22:36:37 +01:00
Ludovic Courtès
362bcdb1b0
system: Remove custom 'config-file service from "vm-image.tmpl".
This example is broken since commit
99c45877a9 (wrong file name passed to
'local-file'), and its functionality is superseded by the upcoming
'provenance-service-type'.

* gnu/system/examples/vm-image.tmpl (this-file): Remove.
<services>: Remove 'config-file service.
2019-12-07 00:59:56 +01:00
Ludovic Courtès
33d1c970c3
install: Pass 'local-file' literal strings for proper resolution.
This is a followup to 99c45877a9, which
introduced a regression: "guix system build gnu/system/install.scm"
would fail to find the .tmpl files.

* gnu/system/install.scm (/etc/configuration-files)[file]: Remove.
[directory]: Use 'local-file' with a literal string.
2019-12-01 23:36:52 +01:00
Mathieu Othacehe
d4ddf22d54
system: vm: Support cross-compilation.
* gnu/system.scm (system-linux-image-file-name): Add support for cross-built
systems. Remove system argument that was ignored,
(operating-system-kernel-file): adapt by removing ignored os argument.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Add target
argument and turn inputs into native-inputs. Pass target to qemu-command
and gexp->derivation calls.
(iso9660-image): Add target argument and pass it to
expression->derivation-in-linux-vm. Remove qemu from inputs as it
is not necessary.
(qemu-image): Add target argument, also remove qemu from inputs. Pass
target argument to expression->derivation-in-linux-vm call.
2019-12-01 16:51:40 +01:00
Mathieu Othacehe
1ee72bb55b
system: vm: Add arm64 support.
* gnu/build/vm.scm (load-in-linux-vm): Add target-arm64? argument and use it
to pass correct arguments to qemu.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Pass the new
target-arm64? argument added above. Do not add ESP partition on all ARM
targets. Do not pass grub-efi package to initialize-hard-disk on ARM targets.
2019-11-22 16:33:43 +01:00
Maxim Cournoyer
67ed544212
vm: Honor the VOLATILE? parameter when producing a system disk image.
* gnu/system/vm.scm (system-disk-image): Honor the VOLATILE? parameter instead
of hard coding its value to #t.

Reported-by: Jelle Licht <jlicht@fsfe.org>
2019-11-18 14:07:12 +09:00
Ludovic Courtès
625bdf09d3
file-systems: Mount /var/run/nscd read-write in containers.
Fixes <https://bugs.gnu.org/37967>.
Reported by Ivan Vilata i Balaguer <ivan@selidor.net>.

* gnu/system/file-systems.scm (%network-file-mappings): Set 'writable?'
to #true for /var/run/nscd.
2019-11-04 23:35:32 +01:00
Vagrant Cascadian
545ff7b784
gnu: Add u-boot-firefly-rk3399.
* gnu/packages/bootloaders (u-boot-firefly-rk3399): New variable.
* gnu/bootloader/u-boot (install-firefly-rk3399-u-boot): New variable.
  (u-boot-firefly-rk3399-bootloader): New variable.
* gnu/system/install (define firefly-rk3399-installation-os): New variable.
2019-10-18 15:48:18 -07:00
Vagrant Cascadian
2fce14af24
gnu: Add u-boot-rock64-rk3328.
* gnu/packages/bootloaders (u-boot-rock64-rk3328): New variable.
* gnu/bootloader/u-boot (install-rock64-rk3328-u-boot): New variable.
  (u-boot-rock64-rk3328-bootloader): New variable.
* gnu/system/install (define rock64-installation-os): New variable.
2019-10-18 13:32:25 -07:00
Caliph Nomble
fa7470189e
gnu: Add u-boot-rockpro64-rk3399
* gnu/packages/bootloaders.scm (u-boot-rockpro64-rk3399): New exported
  variable.
  (u-boot-2019.10): New variable.
* gnu/bootloader/u-boot.scm (u-boot-rockpro64-rk3399-bootloader): New exported
  variable.
  (install-rockpro64-rk3399-u-boot): New variable.
* gnu/system/install.scm (rockpro64-installation-os): New exported variable.

Adjusted-by: Vagrant Cascadian <vagrant@debian.org>
Signed-off-by: Caliph Nomble <nomble@palism.com>
Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
2019-10-18 13:32:09 -07:00
Ludovic Courtès
96b35998e6
linux-container: 'eval/container' correctly passes -L and -C flags.
This fixes a type error.

* gnu/system/linux-container.scm (eval/container): Use 'append-map', not
'map'.
* tests/containers.scm ("eval/container, non-empty load path"): New test.
2019-09-18 23:08:28 +02:00
Ludovic Courtès
d236cd16a7
linux-container: "run-container" scripts shows the container's PID.
* gnu/build/linux-container.scm (call-with-container): Add
 #:process-spawned-hook and honor it.
* gnu/system/linux-container.scm (container-script)[script]:
Define 'explain' and pass it as #:process-spawned-hook'.
2019-09-12 23:07:43 +02:00
Ludovic Courtès
da966a7a3d
linux-container: Exclude more services when sharing networking with the host.
* gnu/system/linux-container.scm (containerized-operating-system)[useless-services]:
Add more services to the list when SHARED-NETWORK? is true.
2019-09-12 23:07:42 +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
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