* gnu/system.scm (operating-system-derivation)[boot-file-systems]: Keep "/".
* gnu/system/linux-initrd.scm (file-system->spec): Keep the 'check?'
flag.
(qemu-initrd)[helper-packages]: New variable. Pass it as #:to-copy.
<gexp>: Add 'set-path-environment-variable' call. Remove #:unionfs
argument for 'boot-system'.
* gnu/system/vm.scm (%linux-vm-file-systems): Add 'check?' field/
(virtualized-operating-system): Likewise for the "9p" file system.
* guix/build/linux-initrd.scm (mount-root-file-system): Change #:unionfs
default. Call 'check-file-system' before mounting ROOT, when
VOLATILE-ROOT? is false.
(check-file-system): New procedure.
(mount-file-system): Honor 'check?' element in list; add
'check-file-system' call.
(boot-system): Remove #:root-fs-type and #:unionfs parameters.
[root-mount-point?, root-fs-type]: New variables.
Call 'mount-file-system' on all MOUNTS but "/".
Fixes a regression introduced in 83bcd0b.
* gnu/system/vm.scm (system-qemu-image): Override the 'file-systems'
field of OS. Add #:file-system-type parameter and honor it.
* gnu/system.scm (<operating-system>)[initrd]: Default to
'qemu-initrd'.
(<file-system>): New record type.
(operating-system-root-file-system): New procedure.
(operating-system-derivation): Take the device name for GRUB from
'operating-system-root-file-system'. Pass the
'operating-system-initrd' procedure the list of boot file systems.
* gnu/system/linux-initrd.scm (file-system->spec): New procedure.
(qemu-initrd): Add 'file-systems' parameter, and remove #:mounts
parameter.
[file-system-type-predicate]: New procedure.
[linux-modules]: Use it.
Adjust #:mounts argument in 'boot-system' call.
(gnu-system-initrd): Remove.
* gnu/system/vm.scm (%linux-vm-file-systems): New variable.
(expression->derivation-in-linux-vm): Adjust call to 'qemu-initrd'.
(virtualized-operating-system): New procedure.
(system-qemu-image/shared-store-script)[initrd]: Remove. Use
'virtualized-operating-system'. Get the 'initrd' file from OS-DRV.
* guix/build/linux-initrd.scm (mount-qemu-smb-share, mount-qemu-9p):
Remove.
(MS_RDONLY, MS_BIND): New global variables.
(bind-mount): Remove local 'MS_BIND' definition.
(mount-root-file-system): New procedure, with code formerly in
'boot-system'.
(mount-file-system): New procedure.
(boot-system): Add #:root-fs-type parameter. Remove 'MS_RDONLY' local
variable. Use 'mount-root-file-system' and 'mount-file-system'.
* doc/guix.texi (Using the Configuration System): Add 'file-system'
declaration.
* gnu/system.scm (operating-system-boot-script): Use 'gexp->file'
instead of 'text-file*'.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Likewise.
(system-qemu-image/shared-store-script)[builder]: Turn into a gexp.
Use 'gexp->derivation' instead of 'derivation-expression'.
* gnu/system/vm.scm (system-qemu-image/shared-store-script): Move
'initrd' definition to the top-level. Have a single definition of
'initrd', 'image', and 'os-drv'.
* gnu/system/vm.scm (input->name+output): New procedure.
(expression->derivation-in-linux-vm): Use it for 'input-alist'.
(qemu-image)[input->name+derivation]: Remove. Use
'input->name+output' instead.
* gnu/system/vm.scm (system-qemu-image/shared-store-script): Change
#:qemu to default to QEMU. Change INITRD to use a 9p mount for the
store. Change command-line to use -virtfs.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Change #:qemu
to default to QEMU-HEADLESS. Use "-net nic,model=virtio". Remove
"-net user,smb=..." and add "-virtfs" options. Change default initrd
to include two 9p mounts.
* gnu/packages/gcc.scm (gcc-4.7): Change /nix/store in comment.
* gnu/system/vm.scm (operating-system-default-contents):
Use (%store-prefix) instead of "/nix/store".
* guix/derivations.scm (derivation-path->output-path,
derivation-path->output-paths): Change to /gnu/store in docstring.
* gnu/system/vm.scm (operating-system-default-contents): Populate
/run/current-system and create /bin/sh.
* gnu/system.scm (operating-system-profile-derivation,
operating-system-profile-directory): New procedures.
(operating-system-derivation): Use it.
* guix/build/linux-initrd.scm (make-essential-device-nodes): Rename
devices with major = 8 to /dev/sda*. Make /dev/vda* devices.
* gnu/system/vm.scm (qemu-image): Change '/dev/vda' to '/dev/sda'.
* gnu/system.scm (operating-system-derivation): Likewise.
* guix/build/linux-initrd.scm (boot-system): New procedure.
* gnu/system/linux-initrd.scm (qemu-initrd): Add keyword parameters
'guile-modules-in-chroot?' and 'mounts'. Change builder to simply
call 'boot-system'.
(gnu-system-initrd): Change to a simple call to 'qemu-initrd'.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Call
'qemu-initrd' with #:guile-modules-in-chroot?.
* gnu/packages/linux-initrd.scm: Remove.
* gnu/system/linux-initrd.scm: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Adjust accordingly.
* gnu/system.scm (<operating-system>): Change default 'initrd' value
to (gnu-system-initrd).
(operating-system-derivation): Bind 'operating-system-initrd'. Pass
'menu-entry' an initrd file name instead of a package.
* gnu/system/grub.scm (grub-configuration-file): Expect 'initrd' to be
file name.
* gnu/packages/version-control.scm, gnu/packages/vim.scm,
gnu/system.scm, gnu/system/dmd.scm, gnu/system/shadow.scm,
gnu/system/vm.scm: Change references to (gnu packages system) to (gnu
packages admin).
This is a followup to commit 4aeea89.
* gnu/system.scm (etc-directory): Add 'locale' and 'timezone'
parameters. Set 'LC_ALL', 'TZ', and 'TZDIR' in /etc/profile.
(operating-system-derivation): Adjust call accordingly.
* gnu/system/vm.scm (%demo-operating-system): Change locale to
'en_US.UTF-8'. Add TZDATA to 'packages'.
* gnu/system.scm (union): Allow (PACKAGE OUTPUT), (PACKAGE), and
PACKAGE.
(<operating-system>)[packages]: Make the default a list of package?
objects.
* gnu/system/vm.scm (%demo-operating-system): Likewise. Add a few
packages.
* gnu/system/shadow.scm (<user-account>)[inputs]: New field.
(passwd-file): Bind the 'shell' field of each account.
* gnu/system/vm.scm (%demo-operating-system): Remove 'shell' field.
* gnu/system/dmd.scm (guix-build-accounts): Store a monadic value in
'shell'. Add 'inputs' field.
* gnu/system.scm (operating-system-derivation): Remove 'shell' field for
'root' account. Add all the 'user-account-inputs' to EXTRAS.
* gnu/system/vm.scm (lower-inputs): Move to monads.scm.
(qemu-image): Don't add GRUB-CONFIGURATION to the INPUTS-TO-COPY.
(union, file-union, etc-directory): Move to gnu/system.scm.
(%demo-operating-system): New variable.
(system-qemu-image): Add 'os' parameter. Rewrite in terms of
'operating-system-derivation'.
* guix/monads.scm (lower-inputs): New procedure.
* gnu/system/grub.scm (grub-configuration-file): Change 'entries' to be
a plain list instead of a list of monadic values.
* gnu/system.scm: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
* gnu/system/shadow.scm (guix-build-accounts): Move to...
* gnu/system/dmd.scm (guix-build-accounts): ... here.
(<service>)[user-accounts, user-groups]: New fields.
(guix-service): New #:build-user-id and #:build-accounts parameters.
Use 'guix-build-accounts' and set the 'user-accounts' and
'user-groups' fields accordingly.
* gnu/system/vm.scm (system-qemu-image): Remove use of
'guix-build-accounts'. Augment ACCOUNTS and GROUPS from what SERVICES
demand.
* gnu/system/vm.scm (etc-directory): Remove 'resolv.conf'.
(system-qemu-image): Use 'static-networking-service' with
#:name-servers. Don't populate the image with /etc/resolv.conf.
* gnu/system/dmd.scm (static-networking-service): Add #:name-servers
parameter. Use it to populate /etc/resolv.conf.
* gnu/system/vm.scm (expression->derivation-in-linux-vm)[lower-inputs]:
Move to top-level...
(lower-inputs): ... here. New variable.
(file-union, etc-directory): New procedures.
(system-qemu-image): Use 'etc-directory'; remove redundant code, and
register the result of 'etc-directory' as a GC root.
* gnu/system/vm.scm (qemu-image): Change the store's mode to #o1775.
Support 'populate' clauses that specify a UID and GID.
(system-qemu-image): Make sure /nix/store has owner 'root' and group
'guixbuild'. Set the right owner for /home/guest. Create
/var/nix/profiles/per-user/{root,guest}.
* gnu/system/shadow.scm (guix-build-accounts): New procedure.
* gnu/system/vm.scm (system-qemu-image): Use it. Add the "guixbuild"
group.
* gnu/system/dmd.scm (guix-service): Add 'builder-group' parameter.
Pass 'guix-daemon' the '--build-users-group' option.
* gnu/system/vm.scm (system-qemu-image): Add a "guest" user and a
"users" user group. Make /home/guest. Add /etc/group. Update
/etc/issue to mention it.
* gnu/system/vm.scm (system-qemu-image): Use
'static-networking-service'. Add /etc/resolv.conf. Add Inetutils to
the profile.
* gnu/system/dmd.scm (static-networking-service): New procedure.
* gnu/system/dmd.scm (host-name-service): New procedure.
(mingetty-service): Require the 'host-name' service.
* gnu/system/vm.scm (system-qemu-image): Add the 'host-name' service.
Set PS1 in /etc/bashrc to something sensible.
* gnu/system/vm.scm (system-qemu-image): Build a 'motd' and an 'issue'
file. Pass 'unix-pam-service' that motd. Have /etc/issue point to
the 'issue' file.
* gnu/system/vm.scm (qemu-image): Add Guix as an input when
INITIALIZE-STORE?.
(union): New procedure.
(system-qemu-image): Use it. Build /etc/profile. Pass PROFILE among
#:inputs-to-copy instead of listing all the individual profiles.
Remove explicit 'build-derivations' call.
* gnu/system/vm.scm (expression->derivation-in-linux-vm)[input-alist]:
Add case for derivation? objects.
Same for #:inputs values.
(qemu-image)[input->name+derivation]: Likewise.
* guix/derivations.scm (derivation->output-path,
derivation->output-paths): New procedures.
(derivation-path->output-path): Use 'derivation->output-path'.
(derivation-path->output-paths): Use 'derivation->output-paths'.
(derivation): Accept 'derivation?' objects as inputs. Return a single
value.
(build-derivations): New procedure.
(compiled-modules): Use 'derivation->output-paths'.
(build-expression->derivation)[source-path]: Add case for when the
input matches 'derivation?'.
[prologue]: Accept 'derivation?' objects in INPUTS.
[mod-dir, go-dir]: Use 'derivation->output-path'.
* guix/download.scm (url-fetch): Adjust to the single-value return.
* guix/packages.scm (package-output): Use 'derivation->output-path'.
* guix/scripts/build.scm (guix-build): When the argument is
'derivation-path?', pass it through 'read-derivation'.
Use 'derivation-file-name' to print out the .drv file names, and to
register them. Use 'derivation->output-path' instead of
'derivation-path->output-path'.
* guix/scripts/package.scm (roll-back): Adjust to the single-value
return.
(guix-package): Use 'derivation->output-path'.
* guix/ui.scm (show-what-to-build): Adjust to deal with 'derivation?'
objects instead of .drv file names.
* gnu/system/grub.scm (grub-configuration-file): Use
'derivation->output-path' instead of 'derivation-path->output-path'.
* gnu/system/vm.scm (qemu-image, system-qemu-image): Likewise.
* tests/builders.scm, tests/derivations.scm, tests/packages.scm,
tests/store.scm, tests/union.scm: Adjust to the new calling
convention.
* doc/guix.texi (Defining Packages, The Store, Derivations): Adjust
accordingly.
* gnu/system/vm.scm (example2): Use 'pam-services->directory'. Change
POPULATE to create /etc/pam.d, /etc/login.defs, and /var/run. Change
BOOT to spawn syslogd; boot to Bash. Add inputs.
* gnu/system/vm.scm (/etc/passwd): Rename to...
(passwd-file): ... this. Add 'shadow?' keyword parameter. Change
format of ACCOUNTS, and fix CONTENTS.
(example2): Adjust accordingly. Create both /etc/shadow and
/etc/passwd, the latter being used by getpwnam(3) & co. when nscd is
not running.
* gnu/packages/grub.scm (<menu-entry>): New record type.
(grub-configuration-file): New procedure.
* gnu/system/vm.scm (qemu-image): Remove parameters 'linux',
'linux-arguments', and 'initrd'. Add 'grub-configuration' parameter.
Honor them, and remove grub.cfg generation code accordingly.
(example2): Use `grub-configuration-file', and adjust accordingly.
* gnu/system/vm.scm (qemu-image): Add 'populate' keyword parameter and
honor it; make it an input.
(/etc/shadow): New procedure.
(example2): Call it; build 'populate' script, and pass it to
'qemu-image'.
* gnu/system/vm.scm (qemu-image): Use (guix build linux-initrd). Remove
'mknod' calls; use 'make-essential-device-nodes' to populate /dev on
the target image.
* gnu/packages/linux-initrd.scm (qemu-initrd): When /root/dev exists,
don't call 'make-essential-device-nodes'.
* gnu/system/vm.scm (qemu-image): Add #:inputs-to-copy and
#:boot-expression parameters. Honor them. Append INPUTS-TO-COPY to
the #:inputs argument for `expression->derivation-in-linux-vm'.
(example2): Add #:boot-expression and #:inputs-to-copy arguments.
* gnu/packages/qemu.scm (qemu-kvm): Remove.
(qemu): Incorporate parts of QEMU-KVM that used to be inherited.
(qemu-kvm/smb-shares): Rename to...
(qemu/smb-shares): ... this.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Adjust
accordingly.