Commit graph

427 commits

Author SHA1 Message Date
Ludovic Courtès 1708ed6e9d
marionette: 'wait-for' procedures no longer leak a port.
* gnu/build/marionette.scm (wait-for-tcp-port): Close SOCK upon
success.
(wait-for-unix-socket): Likewise.
2020-02-22 00:45:42 +01:00
Ludovic Courtès 89da127035
gnu: cross-base: Switch back to 'CROSS_C_INCLUDE_PATH' & co.
This is a followup to 2073b55e6b.

* gnu/build/cross-toolchain.scm (%gcc-include-paths): Switch back to
'C_INCLUDE_PATH' & co.
* gnu/packages/cross-base.scm (%gcc-include-paths): Likewise.
(cross-gcc-arguments): Remove 'treat-glibc-as-system-header' phase.
(cross-gcc)[native-inputs]: Reorder so that libc comes last.
[search-paths]: Add "include/c++" for 'CROSS_CPLUS_INCLUDE_PATH'.
* guix/build-system/gnu.scm (standard-cross-packages): Have "cross-gcc"
appear both for 'host and 'target.
2020-02-12 20:35:43 +01:00
kanichos@yandex.ru 83460433b9
activation: Check whether /proc/sys/kernel/modprobe exists.
* gnu/build/activation.scm (activate-modprobe): Check whether
/proc/sys/kernel/modprobe exists before writing to it.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2020-01-06 16:31:54 +01:00
David Trudgian 7aa28eb339
file-systems: Handle LUKS2 header.
* gnu/build/file-systems.scm (luks-superblock?): Handle LUKS2 header.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2020-01-05 11:14:00 +01:00
Tobias Geerinckx-Rice 1abbe7c64b
file-systems: Add support for JFS.
* gnu/build/file-systems.scm (%jfs-endianness): New syntax.
(jfs-superblock?, read-jfs-superblock, jfs-superblock-uuid)
(jfs-superblock-volume-name, check-jfs-file-system): New procedures.
(%partition-label-readers, %partition-uuid-readers, check-file-system):
Register them.
2020-01-03 13:54:13 +01:00
Ludovic Courtès 7c4e4bac87
activation: Keep going when failing to create one of the setuid programs.
Fixes <https://bugs.gnu.org/38800>.
Reported by Jakub Kądziołka <kuba@kadziolka.net>.

* gnu/build/activation.scm (activate-setuid-programs): Catch
'system-error' around 'make-setuid-program' calls.
2020-01-02 19:42:59 +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
Guillaume Le Vaillant 55e21617d6
linux-boot: Don't ignore flags when mounting root file system.
* gnu/build/linux-boot.scm (mount-root-file-system): Add the 'flags' keyword
  argument and use it when mounting the root file system.
  (boot-system): Pass the root file system flags to 'mount-root-file-system'.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2019-12-12 17:56:33 +01:00
Guillaume Le Vaillant 0dc5c85638
file-systems: Add support for 'strict-atime' and 'lazy-time' flags.
* guix/build/syscalls.scm (MS_LAZYTIME): New variable.
* gnu/build/file-systems.scm (mount-flags->bit-mask): Add match rules for
  'strict-atime' and 'lazy-time'.
* doc/guix.texi (File Systems): Add 'strict-atime' and 'lazy-time' to the list
  of supported flags.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2019-12-07 01:00:24 +01:00
Mathieu Othacehe c6d130630a
build: vm: Fix qemu-command procedure.
* gnu/build/vm.scm (qemu-command): When system is "armhf-linux", use "arm" as
qemu cpu prefix.
2019-12-01 16:52:30 +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
Mathieu Othacehe 2608417ab8
build: vm: Fix arm32 support.
* gnu/build/vm.scm (load-in-linux-vm): Disable qemu highmem support on ARM32
systems.
2019-11-22 16:33:43 +01:00
Guillaume Le Vaillant 900ef20b1d
linux-boot: Don't ignore options when mounting root file system.
Fixes <https://bugs.gnu.org/37977>.

* gnu/build/linux-boot.scm (mount-root-file-system): Add the 'options'
  keyword argument and use it when mounting the root file system.
  (boot-system): Pass the root file system options to
  'mount-root-file-system'.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2019-11-18 12:18:42 +01:00
Maxim Cournoyer c09903acae
linux-boot: Fix indentation.
* gnu/build/linux-boot.scm (boot-system): Re-indent.
2019-11-18 13:22:16 +09:00
Maxim Cournoyer d2ae8a25db
file-systems: Fix docstring.
* gnu/build/file-systems.scm (mount-file-system): Clean the documentation from
the no longer existing parameters (these are now encapsulated within a
<file-system> record).
2019-11-18 13:22:16 +09:00
Marius Bakke e7f62a41b2
Merge branch 'master' into core-updates 2019-09-27 19:11:27 +02:00
Ludovic Courtès 464caf72f9
shepherd: Ensure the log file has correct ownership.
* gnu/build/shepherd.scm (make-forkexec-constructor/container): Ensure
LOG-FILE has correct ownership.
2019-09-26 23:15:28 +02:00
Ludovic Courtès 0d3a4fc867
shepherd: 'make-forkexec-constructor/container' keeps the log file.
* gnu/build/shepherd.scm (make-forkexec-constructor/container): Don't
call 'clean-up' on LOG-FILE.  This mirrors Shepherd commit
6892f638c78a14fedd075f664432757bc015c140.
2019-09-26 23:15:28 +02:00
Maxim Cournoyer 41e03c4bee
linux-boot: Fix typo.
* gnu/build/linux-boot.scm (mount-root-file-system): Fix typo.
2019-09-25 12:18:25 +09:00
Maxim Cournoyer 91e633f043
build: initrd: Fix "write-cpio-archive" return value.
* gnu/build/linux-initrd.scm (write-cpio-archive): Really return OUTPUT on
success, even when compression is disabled.
2019-09-25 12:18:25 +09:00
Ludovic Courtès 9ff87bb996
Merge branch 'master' into core-updates 2019-09-17 16:27:15 +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 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
Mark H Weaver 0481289cbc
Merge branch 'master' into core-updates 2019-08-29 17:19:18 -04:00
David Thompson 07d7175406
gnu: mingw-w64: Update to 6.0.0.
* gnu/packages/mingw.scm (mingw-w64): Update to 6.0.0.
* gnu/packages/patches/mingw-w64-6.0.0-gcc.patch: New file.
* gnu/packages/patches/mingw-w64-5.0rc2-gcc-4.9.3.patch: Delete it.
* gnu/local.mk (dist_patch_DATA): Add new patch.  Delete old patch.
* gnu/build/cross-toolchain.scm (set-cross-path/mingw): Add additional
  autoconf-like substitutions.
2019-08-28 08:47:14 -04:00
Ludovic Courtès dd4e46edda
accounts: Delete duplicate entries.
When adding multiple instances of a service requiring some user
account/group, we could end up with multiple entries for that account or
group in /etc/passwd or /etc/group.

* gnu/build/accounts.scm (database-writer)[write-entries]: Add call to
'delete-duplicates'.
* tests/accounts.scm ("write-passwd with duplicate entry"): New test.
2019-08-28 00:27:14 +02:00
Mark H Weaver 893c2df00d
Merge branch 'master' into core-updates 2019-08-22 15:53:27 -04: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 e1a9a7f275
linux-modules: Add 'load-linux-modules-from-directory'.
* gnu/build/linux-modules.scm (load-linux-modules-from-directory): New
procedure.
* gnu/build/linux-boot.scm (boot-system)[lookup-module]: Remove.
Use 'load-linux-modules-from-directory' instead.
2019-08-16 23:00:27 +02:00
Ludovic Courtès 2a693b69ca
linux-modules: Add "modules.devname" writer.
* gnu/build/linux-modules.scm (aliases->device-tuple)
(write-module-device-database): New procedures.
(%not-dash): New variable.

Co-authored-by: Danny Milosavljevic <dannym@scratchpost.org>.
2019-08-16 23:00:27 +02:00
Danny Milosavljevic 4f8b9d1a6f
linux-modules: Add "modules.alias" writer.
* gnu/build/linux-modules.scm (write-module-alias-database): New
procedure.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2019-08-16 23:00:27 +02:00
Carl Dong 67dac6b892
gnu: mingw: Add x86_64 support.
This patch parameterizes previously hard-coded instances of
i686-w64-mingw32, adding support for x86_64-w64-mingw32.

* gnu/packages/mingw.scm (make-mingw-w64): New procedure.
(mingw-w64-i686, mingw-w64-x86_64): New variables.
(%mingw-triplet): Remove.
(mingw-w64): Update to point to 'mingw-w64-i686'.
* gnu/packages/cross-base.scm (cross-gcc): Use 'libc' keyword argument
if specified, instead of treating it as a boolean.
(native-libc): Return the correct mingw-w64 depending on machine
specified in target.
* gnu/packages/bootstrap.scm (glibc-dynamic-linker): Add "x86_64-mingw".
* gnu/build/cross-toolchain.scm (set-cross-path/mingw): Replace
hardcoded 'i686-w64-mingw32' instances with 'target' keyword argument.
(cross-gcc-build-phases): Update accordingly; use 'target-mingw?'
implementation of target checking and add commentary.
* gnu/ci.scm (%cross-targets): Add "x86_64-w64-mingw32".
2019-08-14 21:29:53 +02:00
Marius Bakke fb9a23a3f3
Merge branch 'master' into core-updates
Conflicts:
	gnu/local.mk
	gnu/packages/python-xyz.scm
	gnu/packages/xml.scm
	guix/gexp.scm
	po/guix/POTFILES.in
2019-07-12 01:03:53 +02:00
Ludovic Courtès 935e79af61
linux-container: Mount a new /dev/pts instance in the container.
Fixes <https://bugs.gnu.org/36463>.
Reported by Steffen Rytter Postas <nc@scalehost.eu>.

* gnu/build/linux-container.scm (mount-file-systems): When /dev/ptmx
exists on the host, explicitly mount a new instance of devpts and make
/dev/ptmx a symlink to /dev/pts/ptmx.
2019-07-06 00:26:58 +02:00
Ludovic Courtès 5cc1075a76
Merge branch 'master' into core-updates 2019-06-27 23:33:48 +02:00
Ludovic Courtès c25b44d640
accounts: Use 'fsync' instead of 'fdatasync'.
* gnu/build/accounts.scm (catch-ENOSYS): Remove.
(database-writer): Use 'fsync' instead of 'fdatasync'.
2019-06-27 11:14:40 +02:00
Ludovic Courtès 40c369b234
linux-container: Remove dependency on (guix utils).
Fixes a bug whereby derivations importing (gnu build linux-container),
such as the 'bitlbee' and 'tor' services, would depend on the
user's (guix config) file, which was pulled as a dependency of (guix
utils).  As a result, those derivations would vary from user to user.

* gnu/build/linux-container.scm (call-with-temporary-directory): New
procedure.
2019-06-23 19:53:03 +02:00
Ludovic Courtès 45d46223f9
utils: Add 'invoke/quiet'.
* gnu/build/bootloader.scm (G_): Remove.
(open-pipe-with-stderr, invoke/quiet): Move to...
* guix/build/utils.scm: ... here.  Use 'let-values' instead of
'define-values' because Guile 2.0 (the bootstrap Guile) doesn't know
about 'define-values'.
* po/guix/POTFILES.in: Remove gnu/build/bootloader.scm, and add
guix/build/utils.scm.
* tests/build-utils.scm: Remove import of (gnu build bootloader).
2019-06-17 16:13:36 +02:00
Ludovic Courtès d9bbfe042e
Merge branch 'master' into core-updates 2019-06-13 13:24:35 +02:00
Ludovic Courtès 0e6cee21a4
gnu: glibc-locales: Install symlinks using the normalized codeset.
Fixes <https://bugs.gnu.org/36076>.
Reported by Jack Hill <jackhill@jackhill.us>
and Giovanni Biscuolo <g@xelera.eu>

* gnu/build/locale.scm (locale->name+codeset): New file.
* gnu/packages/base.scm (make-glibc-locales): Add #:modules
and #:imported-modules.  Add a 'symlink-normalized-codesets' phase.
2019-06-07 21:50:18 +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
Ludovic Courtès d088d5c484
accounts: Call 'fdatasync' when writing databases.
* gnu/build/accounts.scm (catch-ENOSYS): New macro.
(database-writer): Call 'fdatasync'.
2019-06-05 23:10:37 +02:00
Ludovic Courtès ed8570dce3
accounts: Close database before renaming it.
Fixes <https://bugs.gnu.org/35996>.
Reported by Florian Pelz <pelzflorian@pelzflorian.de>.

* gnu/build/accounts.scm (database-writer): Move 'close-port' call
before 'rename-file'.
2019-06-05 23:10:37 +02:00
Ludovic Courtès d497b6ab39
activation: Lock /etc/.pwd.lock before accessing databases.
Suggested by Florian Pelz <pelzflorian@pelzflorian.de>
in <http://bugs.gnu.org/35996>.

* gnu/build/accounts.scm (%password-lock-file): New variable.
* gnu/build/activation.scm (activate-users+groups): Wrap calls to
'user+group-databases', 'write-group', etc. into 'with-file-lock'.
2019-06-05 23:10:36 +02:00
Danny Milosavljevic aa901521e4
linux-boot: Fix e2fsck warning.
* gnu/build/linux-boot.scm (boot-system): Fix e2fsck warning.
2019-06-03 18:08:56 +02:00
Marius Bakke 57df83e07d
Merge branch 'staging' into core-updates 2019-05-25 00:25:15 +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 604b167bf2
marionette: Add braces to the keystrokes.
* gnu/build/marionette.scm (%qwerty-us-keystrokes): Add braces.
2019-05-15 12:18:51 +02:00
Ludovic Courtès 78d6d5e8d9
shepherd: Include /etc/localtime in service containers.
Fixes a bug whereby Tor (for example) would emit syslog messages with a
UTC timestamp instead of local time.

* gnu/build/shepherd.scm (default-mounts): Add /etc/localtime to
MAPPINGS.
2019-05-03 17:47:29 +02:00
Marius Bakke 3b458d5462
Merge branch 'master' into core-updates 2019-05-01 23:11:41 +02:00
Christopher Baines 0534427551
vm: Pass -smp to QEMU to allow use of multiple cores.
* gnu/build/vm.scm (load-in-linux-vm): Pass (parallel-job-count) to QEMU with
-smp to allow using multiple cores.
2019-04-29 21:11:38 +01:00
rendaw 9d3053819d
file-systems: Support the 'no-atime' flag.
* guix/build/syscalls.scm (MS_NOATIME): New variable.
* gnu/build/file-systems.scm (mount-flags->bit-mask): Support it.
* doc/guix.texi (File Systems): Document it and add cross-references to
the relevant documentation.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2019-04-29 12:19:03 +02:00
Ludovic Courtès 504a0fc636
accounts: Always honor the configured user account shell.
Starting from commit 0ae735bcc8, Guix
System would preserve the user shell across reconfigure and reboot.
This was done so as to allow for the use of 'chsh'.

This proved to be a misguided decision.  This commit goes back to
considering user shells as config and not "state."

* gnu/build/accounts.scm (allocate-passwd): Do not use shell from
PREVIOUS.
2019-04-26 14:19:36 +02:00
Ludovic Courtès ecb33b87aa
vm: Adjust FAT serial number code to 32-bit Guile.
On 32-bit systems, 'string-hash' would raise an out-of-range exception
when the second argument was 2^32.

* gnu/build/vm.scm (make-iso9660-image): Pass 2^32 - 1 to 'string-hash'.
2019-04-25 00:45:35 +02:00
Ludovic Courtès 605815023c
vm: Use a fixed FAT serial number for 'efi.img' in ISO images.
Partly fixes <https://bugs.gnu.org/35283>.

* gnu/build/vm.scm (make-iso9660-image): Set the
'GRUB_FAT_SERIAL_NUMBER' environment variable.
2019-04-21 00:51:18 +02:00
Ludovic Courtès 6901b9248e
vm: Reset file timestamps of the EFI image in ISO images.
Partly fixes <https://bugs.gnu.org/35283>.

* gnu/build/vm.scm (make-iso9660-image): Set the 'SOURCE_DATE_EPOCH'
environment variable.
2019-04-21 00:51:18 +02:00
Ludovic Courtès 833480cc1f
vm: Reset file timestamps in ISO images.
Partly fixes <https://bugs.gnu.org/35283>.
Reported by Florian Pelz <pelzflorian@pelzflorian.de>.

* gnu/build/vm.scm (make-iso9660-image): Pass "-volume_date
all_file_dates =1".
2019-04-21 00:51:18 +02:00
Ludovic Courtès f6e3f0f9b1
vm: Remove Xorriso "-padding" option.
This is a followup to 66ec389580.
This reverts 178be030c0, which is no
longer needed.

* gnu/build/vm.scm (make-iso9660-image): Remove "-padding" option.
2019-04-14 23:40:53 +02:00
Ludovic Courtès af76c020bf
linux-container: Make the guest UID and GID a parameter.
* gnu/build/linux-container.scm (initialize-user-namespace): Add
 #:guest-uid and #:guest-gid parameters and honor them.
(run-container): Likewise.
(call-with-container): Likewise.
* tests/containers.scm ("call-with-container, user namespace, guest UID/GID"):
New test.
2019-04-02 18:15:37 +02: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
Marius Bakke 8c14f7f8a7
Merge branch 'staging' into core-updates 2019-03-23 23:16:55 +01:00
Ludovic Courtès f0cc5e7e1e
booloader: Add 'invoke/quiet'.
* gnu/build/bootloader.scm (G_): New macro.
(open-pipe-with-stderr, invoke/quiet): New procedures.
* tests/build-utils.scm ("invoke/quiet, success")
("invoke/quiet, failure")
("invoke/quiet, failure, message on stderr"): New tests.
* po/guix/POTFILES.in: Add bootloader.scm.
2019-03-16 18:15:13 +01:00
Marius Bakke 19008a22d1
Merge branch 'staging' into core-updates 2019-03-14 16:30:19 +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
Marius Bakke 96ab233df7
Merge branch 'staging' into core-updates 2019-03-10 18:47:02 +01:00
Ludovic Courtès d429878daf
activation: Shared system home directories are now 555 and root-owned.
Fixes <https://bugs.gnu.org/34788>.
Reported by Jack Hill <jackhill@jackhill.us>.

Regression introduced by the combination of
8bb76f3d44 and
0ae735bcc8ff7fdc89d67b492bdee9091ee19e86: /var/empty would be 700 and
owned by one of the system accounts (thus inaccessible to others), and
/var/run/dbus would be 700 as well, thereby preventing D-Bus clients
from connecting to the daemon.

* gnu/build/activation.scm (duplicates): New procedure.
(activate-users+groups)[system-accounts]: New variable.
Use it.  Make shared system account home directories #o555 and
root-owned.
* gnu/services/dbus.scm (dbus-activation): Make /var/run/dbus #o755.
* gnu/tests/base.scm (run-basic-test): Test the ownership and
permissions of /var/empty.
2019-03-08 23:21:59 +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 ec600e4544
Add (gnu build accounts).
* gnu/build/accounts.scm, tests/accounts.scm: New files.
* Makefile.am (SCM_TESTS): Add tests/accounts.scm.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add build/accounts.scm.
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
Danny Milosavljevic f347fb79df
linux-modules: module-soft-dependencies: Partition the result and return it as two lists.
* gnu/build/linux-modules.scm (module-soft-dependencies): Partition the
result and return it as two lists.
2019-03-05 13:43:34 +01:00
Marius Bakke b4d7689f92
Merge branch 'staging' into core-updates 2019-03-04 23:05:01 +01:00
Ludovic Courtès 8bb76f3d44
activation: Make home directories #o700 by default.
Until now they'd be #o755, except for /root, which is treated specially
in (gnu build install).

* gnu/build/activation.scm (activate-user-home): Chmod HOME to #o700.
Remove redundant 'unless system?'.
2019-03-04 15:22:58 +01:00
Marius Bakke b45a97ea84
gnu: GCC: Move cross-toolchain build fix to (gnu packages cross-base).
This makes sure it is inherited by packages using (cross-gcc ...).  This
commit is a followup to 01e8263feb.

* gnu/build/cross-toolchain.scm (cross-gcc-build-phases): Move
'treat-glibc-as-system-header' phase ...
* gnu/packages/cross-base.scm (cross-gcc-arguments): ... here.
2019-02-28 19:15:02 +01:00
Marius Bakke 01e8263feb
gnu: Use GCC 7 as the default compiler.
* gnu/packages/cross-base.scm (%gcc-cross-include-paths): Remove
CROSS_C_INCLUDE_PATH & co in favor of CROSS_CPATH.
* gnu/build/cross-toolchain.scm (%gcc-cross-include-paths): Likewise.
(cross-gcc-build-phases): Set CROSS_C_INCLUDE_PATH and
CROSS_CPLUS_INCLUDE_PATH when building the cross GCC.
* gnu/packages/commencement.scm (libstdc++): Add
"--disable-libstdcxx-dual-abi" to #:configure-flags.
(gcc-boot0)[arguments]: Add "--disable-libmpx"
to #:configure-flags.
(gcc-final): Add phase to set C_INCLUDE_PATH and CPLUS_INCLUDE_PATH before
building GCC.
(gcc-toolchain-5): Use MAKE-GCC-TOOLCHAIN.
(gcc-toolchain-7): Change to GCC-TOOLCHAIN.
* gnu/packages/gcc.scm (gcc): Change from GCC-5 to GCC-7.
(gfortran): Change to GFORTRAN-7.
(gcc-objc): Change to GCC-OBJC-7.
(gcc-objc++): Change to GCC-OBJC++-7.
* gnu/packages/rust.scm (rust-1.19.0)[native-search-paths]: Change from
C_INCLUDE_PATH & co to CPATH.
2019-02-09 21:53:41 +01:00
Danny Milosavljevic 519be98c35
linux-modules: module-soft-dependencies: Remove colon from section names.
Follow-up to 1a5f46621b.

* gnu/build/linux-modules.scm (module-soft-dependencies): Remove colon from
section names.
2019-01-25 18:24:00 +01:00
Danny Milosavljevic 1a5f46621b
linux-modules: Add module-soft-dependencies.
* gnu/build/linux-modules.scm (not-softdep-whitespace): New variable.
(module-soft-dependencies): New procedure.
2019-01-25 18:14:16 +01:00
Mathieu Othacehe 8ae7044f1d
file-systems: Add read-luks-partition-uuid.
Add a specific procedure to read luks partition uuid.

* gnu/build/file-systems.scm (luks-partition-field-reader): New procedure ...
(luks-partition-uuid-predicate): ... used here,
(read-luks-partition-uuid): new exported procedure.
2019-01-17 14:04:26 +01:00
Mathieu Othacehe 983abd2cf9
file-systems: Export read-partition-label and read-partition-uuid.
* gnu/build/file-systems.scm (read-partition-label): Export it,
(read-partition-uuid): ditto.
2019-01-17 14:04:22 +01:00
Ludovic Courtès a934e9fc1c
vm: Re-enable KVM on i386.
The workaround is apparently no longer needed with Linux-libre 4.19.2
in the host.

* gnu/build/vm.scm (load-in-linux-vm): Remove special case for
"qemu-system-i386", thereby re-enabling KVM.
2018-12-19 00:14:00 +01:00
Ludovic Courtès 5de5f81845
file-systems: Have the emergency REPL output to /dev/console.
This fixes a bug whereby all emergency REPL output would go to /dev/klog
and thus, each line would be prefixed by "[12324.432] shepherd[1]: ".

* gnu/build/file-systems.scm (check-file-system): Wrap 'start-repl' call
in 'with-output-to-file'.
2018-12-18 16:04:26 +01:00
Ludovic Courtès 6ea6e1476f
file-systems: Spawn a REPL only when interaction is possible.
Fixes <https://bugs.gnu.org/23697>.
Reported by Jan Nieuwenhuizen <janneke@gnu.org>.

* gnu/build/file-systems.scm (check-file-system): Call 'start-repl' only
if current-input-port passes 'isatty?'.
* gnu/services/shepherd.scm (shepherd-configuration-file): After
'for-each' expression, call 'redirect-port'.
* gnu/tests/base.scm (run-basic-test)["stdin is /dev/null"]: New test.
2018-12-18 16:04:26 +01:00
Ludovic Courtès 178be030c0
vm: Add padding in the ISO image.
Fixes <https://bugs.gnu.org/33639>.
Thanks to Ricardo Wurmus and Thomas Schmitt for their suggestions!

* gnu/build/vm.scm (make-iso9660-image): Pass "-padding 10m" to
xorriso.
2018-12-06 17:22:24 +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 b297934437
activation: Aways pass '-d HOME' to 'useradd'.
Fixes <https://bugs.gnu.org/33422>.
Reported by fps.

* gnu/build/activation.scm (add-user): Always pass "-d HOME" when HOME
is true.  Pass "--create-home" only when HOME, CREATE-HOME?, and SYSTEM?
are true.
(activate-users+groups): Pass #:create-home? create-home? to
'ensure-user'.
* gnu/tests/base.scm (run-basic-test)["accounts"]: Test 'passwd:dir' as
well.
2018-11-18 23:37:25 +01:00
Ludovic Courtès 970c9993f1
linux-initrd: Make sure 'build-initrd' can delete files.
Fixes <https://bugs.gnu.org/33297>.
Reported by Mark H Weaver <mhw@netris.org>.

This fixes a regression introduced in
72dc64f8f7, which made files read-only.

* gnu/build/linux-initrd.scm (build-initrd): Call 'make-file-writable'
on all the files under contents/.
2018-11-07 16:06:42 +01:00
Ludovic Courtès c5ce2db569
install: Add 'install-database-and-gc-roots'.
* gnu/build/install.scm (%root-profile): New variable.
(install-database-and-gc-roots): New procedure.
(populate-single-profile-directory): Replace inline code with a call to
'install-database-and-gc-roots'.
2018-11-06 23:21:24 +01:00
Ludovic Courtès b27ef1d46c
pack: Import (guix store database) only when '--localstatedir' is passed.
This is another way to address <https://bugs.gnu.org/32184>, which was
previously addressed in commit 19c924af4f.

* gnu/build/install.scm (register-closure): Move to...
* gnu/build/vm.scm (register-closure): ... here.  New procedure.
* guix/scripts/pack.scm (self-contained-tarball)[build]: Remove
now unneeded 'with-extensions' form and custom (guix config) module.
* tests/guix-pack.sh: Revert the strategy from
commit 19c924af4f.
* tests/pack.scm ("self-contained-tarball"): Likewise.
2018-11-06 23:21:23 +01:00
Ludovic Courtès ec4c81fe32
pack: Move store database creation to a separate derivation.
* guix/scripts/pack.scm (store-database): New procedure.
(self-contained-tarball): Use it when LOCALSTATEDIR? is true.
Remove 'schema' and add 'database'.
[build]: Pass DATABASE to 'populate-single-profile-directory'.
(squashfs-image): Remove #:deduplicate? parameter.
[build]: Remove (gnu build install) and (guix config) from the imported
modules.  Remove 'with-extensions'.
* gnu/build/install.scm (populate-single-profile-directory): Remove
 #:deduplicate?, #:register?, and #:schema; add #:database.  Remove call
to 'register-closure' and simply copy DATABASE instead.
2018-11-06 23:21:23 +01:00
Ludovic Courtès ab3c60ace3
install: Parameterize the profile name for 'populate-single-profile-directory'.
* gnu/build/install.scm (populate-single-profile-directory): Add
 #:profile-name.  Replace hard-coded occurrences of "guix-profile" with
PROFILE-NAME.  Make the symlink part under /root a function of
PROFILE-NAME.
2018-11-05 00:08:46 +01:00
Ludovic Courtès aff38cb199
install: Make /var/guix/…/guix-profile a relative symlink.
* gnu/build/install.scm (populate-single-profile-directory): Make
/var/guix/profiles/per-user/root/guix-profile a relative symlink.
2018-10-21 23:54:46 +02:00
Ludovic Courtès 4db7a9dc66
linux-modules: Raise an error when a kernel module cannot be found.
Previously we'd get an unhelpful backtrace like this:

  In gnu/build/linux-modules.scm:
     184:47  4 (recursive-module-dependencies _ #:lookup-module _)
      98:14  3 (module-dependencies _)
      85:18  2 (modinfo-section-contents _)
  In ice-9/ports.scm:
     439:11  1 (call-with-input-file #f #<procedure get-bytevector-al?> ?)
  In unknown file:
	     0 (open-file #f "r" #:encoding #f #:guess-encoding #f)

  ERROR: In procedure open-file:
  Wrong type (expecting string): #f
  builder for `/gnu/store/…-linux-modules.drv' failed with exit code 1

* gnu/build/linux-modules.scm (find-module-file): When MODULE cannot be
found, raise an error instead of returning #f.  This is more useful to
the user.
2018-08-29 23:32:01 +02:00
Chris Marusich cb29343940
marionette: Add wait-for-unix-socket.
* gnu/build/marionette.scm (wait-for-unix-socket): New variable.
2018-08-28 00:19:58 -07:00
Chris Marusich 4dd53a83b5
marionette: Add support for QEMU's "quit" command.
* gnu/build/marionette.scm (marionette-control): Don't wait for the
monitor prompt when the command was "quit".
2018-08-28 00:14:25 -07:00
Ludovic Courtès f43d2dcd80
linux-modules: Adjust 'section-contents' procedure.
* gnu/build/linux-modules.scm (section-contents): Honor SECTION as was
intended.
(modinfo-section-contents): Pass 'section-contents' a section, not a
section name.
2018-08-21 23:27:08 +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 42226063f6
vm: Disable KVM on i386.
* gnu/build/vm.scm (load-in-linux-vm): Disable KVM on i386.
2018-07-04 15:26:21 +02:00
Ludovic Courtès 88d4a9c2be
vm: 'make-iso9660-image' makes 'grub.cfg' a GC root.
* gnu/build/vm.scm (make-iso9660-image): Add call to
'register-bootcfg-root'.
2018-06-26 14:29:18 +02:00
Ludovic Courtès 718d44cc9f
vm: 'make-iso9660-image' no longer includes unreferenced store items.
Fixes <https://bugs.gnu.org/31757>.

* gnu/build/vm.scm (make-iso9660-image): Invoke 'grub-mkrescue' in
'open-pipe*'.  Use '-path-list -' instead of passing "gnu/store=…".
2018-06-26 14:27:57 +02:00
Ludovic Courtès a7751eeb57
vm: Don't try to modify the bind-mounted store.
Previously 'guix system disk-image --file-system-type=iso9660' would
fail because 'register-closure' would try to reset timestamps/ownership
on the bind-mounted store, which fails with EPERM.

* gnu/build/vm.scm (make-iso9660-image): Pass #:reset-timestamps? to
'register-closure'.
2018-06-26 14:27:57 +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 ea0a06cee2
Remove 'guix-register' and its traces.
* Makefile.am (SH_TESTS): Remove tests/guix-register.sh.
* build-aux/pre-inst-env.in (GUIX_REGISTER): Remove.
* gnu/build/install.scm (directives): Remove outdated comment.
* gnu/build/vm.scm (root-partition-initializer): Update comment.
* gnu/packages/package-management.scm (guix-register): Remove.
* guix/config.scm.in (%sbindir, %guix-register-program): Remove.
* guix/scripts/system.scm (install): Adjust docstring.
* guix/self.scm (make-config.scm): Remove #:guix.  Do not generate
%sbindir and %guix-register-program.
(specification->package): Remove "guix".
* nix/guix-register/guix-register.cc: Remove.
* nix/libstore/store-api.cc (decodeValidPathInfo): Remove.
* nix/libstore/store-api.hh (decodeValidPathInfo): Remove declaration.
* nix/local.mk (sbin_PROGRAMS, guix_register_SOURCES)
(guix_register_CPPFLAGS, guix_register_LDFLAGS): Remove.
* tests/guix-register.sh: Remove.
2018-06-14 11:17:00 +02:00
Ludovic Courtès eb9fe97495
database: Allow for deterministic database construction.
Fixes <https://bugs.gnu.org/21073>.

* guix/store/database.scm (sqlite-register): Add #:time.
(%epoch): New variable.
(register-items): Add #:registration-time.  Pass #:time to
'sqlite-register'.
* gnu/build/install.scm (register-closure): Pass #:registration-time.
2018-06-14 11:17:00 +02:00
Ludovic Courtès 078c2329c0
install: Use 'reset-timestamps' from (guix store database).
* gnu/build/install.scm (reset-timestamps): Remove.
* gnu/build/vm.scm: Use 'reset-timestamps' from (guix store database).
2018-06-14 11:17:00 +02:00
Ludovic Courtès 31a63be878
database: Add 'register-items'.
* guix/build/store-copy.scm (store-info): Export.
* guix/store/database.scm (register-items): New procedure.
(register-path): Implement in terms of 'register-items'.
* gnu/build/install.scm (register-closure): Use 'register-items' instead
of 'for-each' and 'register-path'.
2018-06-14 11:17:00 +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 a13c1bf4ca
Merge branch 'master' into core-updates 2018-06-01 23:41:40 +02:00
Ludovic Courtès 33d8a87104
bootloader: grub: Use 'with-extensions'.
* gnu/bootloader/grub.scm (svg->png): Use 'with-extensions'.  Remove
'add-to-load-path' calls.
* gnu/build/svg.scm: Use (rsvg) and (cairo) the normal way.  Remove
'module-autoload!' calls.
2018-06-01 15:21:28 +02:00
Ludovic Courtès 7a4e2eaab3
marionette: Add 'wait-for-tcp-port'.
* gnu/build/marionette.scm (wait-for-tcp-port): New procedure.
* gnu/tests/dict.scm (run-dicod-test)["connect inside"]: Use it instead
of the inline loop.
2018-06-01 13:50:26 +02:00
Ludovic Courtès 69a05eab35
file-systems: Always wait for devices to show up.
Previously, 'canonicalize-device-spec' would wait for devices when they
were specified as a label or UUID, but would not wait when the user
passed a "/dev" file name directly.  This could cause problems when
the /dev node takes a while to show up.

* gnu/build/file-systems.scm (canonicalize-device-spec): Add 'resolve'
call in the 'string?' case.
2018-05-31 18:13:08 +02:00
Mark H Weaver 82b695b834
Merge branch 'master' into core-updates 2018-05-28 20:45:37 -04: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
Mark H Weaver 1640f16e78
Merge branch 'master' into core-updates 2018-05-27 01:26:09 -04:00
Ludovic Courtès 98e0b1288f
vm: Pass "panic=1" to Linux.
* gnu/build/vm.scm (load-in-linux-vm): Always pass "panic=1" after '-append'.
2018-05-25 13:43:03 +02:00
Mark H Weaver 9d10a63402
Merge branch 'master' into core-updates 2018-05-24 02:34:08 -04:00
Ludovic Courtès 353df40102
vm: Print the label and UUID of partitions.
* gnu/build/vm.scm (create-ext-file-system): Print the label and UUID.
2018-05-23 10:21:02 +02:00
Marius Bakke 5576cfabf3
Merge branch 'master' into core-updates 2018-03-29 17:34:41 +02:00
Ludovic Courtès 82b71ac366
activation: Pass '-d HOME' to 'usermod'.
Fixes a bug whereby changes to user home directories in the OS config
would never be effective.

Reported by Pierre Neidhardt <ambrevar@gmail.com>.

* gnu/build/activation.scm (modify-user): Pass '-d HOME'.
2018-03-27 14:51:44 +02: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
Chris Marusich af81311b8c
vm: Allow control of deduplication in root-partition-initializer.
* gnu/build/vm.scm (root-partition-initializer): Add #:deduplicate?
  keyword argument.
2018-03-24 03:04:10 +01:00
Mark H Weaver 3e629738a3
gnu: cross-base: Use invoke in (gnu build cross-toolchain).
* gnu/build/cross-toolchain.scm (set-cross-path/mingw, install-strip): Use
invoke.
2018-03-23 04:41:53 -04:00
Ludovic Courtès 71e08fde28
glob: Add an extra glob pattern compilation stage.
* guix/glob.scm (compile-glob-pattern): Rename to...
(string->sglob): ... this.
(compile-sglob, string->compiled-sglob): New procedures.
(glob-match?): Replace '?, 'range, and 'set with a single clause.
* tests/glob.scm (test-compile-glob-pattern): Rename to...
(test-string->sglob): ... this.  Adjust accordingly.
(test-glob-match): Use 'string->compiled-sglob' instead of
'compile-glob-pattern'.
* gnu/build/linux-modules.scm (read-module-aliases): Use
'string->compiled-sglob' instead of 'compile-glob-pattern'.
2018-03-18 22:57:17 +01:00
Ludovic Courtès 675e81a082
linux-modules: 'load-linux-module*' honors BLACK-LIST in recursive calls.
* gnu/build/linux-modules.scm (load-linux-module*): Pass BLACK-LIST in
recursive call.
2018-03-18 22:35:27 +01:00
Ludovic Courtès a57df67b59
linux-modules: Add 'current-kernel-directory'.
* gnu/build/linux-modules.scm (current-kernel-directory): New procedure.
(current-alias-file): Use it.
2018-03-18 22:35:03 +01:00
Danny Milosavljevic 363be0c6db
vm: Pass "-append ..." only once.
* gnu/build/vm.scm (load-in-linux-vm): Pass "-append ..." only once.
2018-03-16 22:59:28 +01:00
Ludovic Courtès e1d0f2aa87
vm: Use 'invoke' instead of 'system*'.
* gnu/build/vm.scm (load-in-linux-vm, initialize-partition-table)
(create-ext-file-system, create-fat-file-system)
(install-efi, make-iso9660-image): Use 'invoke' instead
of (unless (zero? (system* ...)) (error ...)).
2018-03-15 23:46:15 +01:00
Danny Milosavljevic 8b2219d847
linux-modules: Add module-aliases.
* gnu/build/linux-modules.scm (module-aliases): New variable.
2018-03-03 23:40:02 +01:00
Ludovic Courtès 8661ad2743
linux-modules: Add 'device-module-aliases' and related procedures.
* gnu/build/linux-modules.scm (readlink*, stat->device-major)
(stat->device-minor): New procedures.
(%not-slash): New variable.
(read-uevent, device-module-aliases, read-module-aliases)
(current-alias-file, known-module-aliases, matching-modules): New
procedures.
2018-03-02 13:46:33 +01:00
Ludovic Courtès 3c14e7e6bb
linux-modules: Use 'load-linux-module/fd'.
This should be more efficient than loading the whole thing in user space.

* gnu/build/linux-modules.scm (load-linux-module*): Use
'load-linux-module/fd' instead of 'load-linux-module'.  Remove 'slurp'.
2018-02-28 22:47:48 +01:00
Ludovic Courtès 27a2c9c3e0
marionette: Use QEMU's "VM channel" mechanism.
* gnu/tests.scm (<marionette-configuration>)[device]: Default to
"/dev/virtio-ports/org.gnu.guix.port.0".
* gnu/tests.scm (marionette-shepherd-service): Remove (guix build
syscalls) from 'modules'.  Remove 'tcsetattr' call from 'start'.
* gnu/build/marionette.scm (make-marionette): Use "-virtserialport"
instead of "-virtconsole".
2018-02-19 22:04:11 +01:00
Christopher Baines 8db8bf921d
gnu: build: linux-boot: Remove bind-mount export.
bind-mount is not contained within this module.

* gnu/build/linux-boot.scm: Remove bind-mount export.
2018-02-06 17:19:28 +00:00
Danny Milosavljevic 015d0a8418
linux-boot: Add find-long-options.
* gnu/build/linux/boot.scm (find-long-options): New variable.
2018-02-01 00:11:10 +01:00
Tobias Geerinckx-Rice 162a137400
gnu: Consistently Write ‘file system(s)’.
It is the GNU way.

* doc/guix.texi (Build Systems, DNS Services): Write ‘file system(s)’.
* gnu/build/vm.scm (create-ext-file-system, create-fat-file-system):
Likewise.
* gnu/packages/backup.scm (dirvish, rsnapshot)[description]: Likewise.
* gnu/packages/check.scm (python-testpath)[description]: Likewise.
* gnu/packages/disk.scm (pydf)[description]: Likewise.
* gnu/packages/file-systems.scm (disorderfs)[synopsis, description]: Likewise.
(glusterfs)[description]: Likewise.
* gnu/packages/haskell.scm (ghc-directory, ghc-system-fileio-bootstrap)
(ghc-system-fileio)[synopsis]: Likewise.
(ghc-fsnotify)[description]: Likewise.
* gnu/packages/linux.scm (proot)[description]: Likewise.
(jmtpfs)[synopsis, description]: Likewise.
* gnu/packages/mate.scm (caja, caja-extensions)[description]: Likewise.
* gnu/packages/storage.scm (ceph)[description]: Likewise.
* gnu/packages/sync.scm (lsyncd)[description]: Likewise.
* gnu/packages/syncthing.scm (syncthing)[synopsis]: Likewise.
(go-github-com-zillode-notify)[description]: Likewise.
* gnu/services/nfs.scm (pipefs-service-type): Likewise.
* guix/scripts/system.scm (perform-action): Likewise.
2018-01-19 17:28:31 +01:00
Ludovic Courtès 95aa64bc48
linux-container: Work around EBADF errors upon exit.
Typically 'read-pid-file/container' would fail when starting services in
containers such as BitlBee.

* gnu/build/linux-container.scm (call-with-clean-exit): Use
'primitive-_exit' instead of 'primitive-exit'.
(container-excursion*): Close OUT.
2018-01-15 23:29:33 +01:00
Ludovic Courtès aeed74f370
linux-boot: Add #:on-error for initrd error handling.
Suggested by Danny Milosavljevic <dannym@scratchpost.org>
in <https://bugs.gnu.org/29922>.

* gnu/build/linux-boot.scm (boot-system): Add #:on-error parameter and
pass it to 'call-with-error-handling'.
* gnu/system/linux-initrd.scm (raw-initrd): Add #:on-error and pass it.
(base-initrd): Likewise.
2018-01-08 23:44:07 +01:00
Leo Famulari 2ca712bdba
vm: Pass the host's /dev/urandom to the guest at /dev/hwrng.
* gnu/build/vm.scm (load-in-linux-vm): Use QEMU's virtio-rng-pci.
* gnu/system/vm.scm (common-qemu-options): Likewise.
2017-12-18 00:39:40 -05:00
Danny Milosavljevic 97817e7f18
linux-boot: Add make-static-device-nodes.
* gnu/build/linux-boot.scm (make-static-device-nodes): New variable.
(<device-node>): New variable.
(read-static-device-nodes): New variable.
(report-system-error): New variable.
(catch-system-error): New variable.
(create-device-node): New variable.
(mkdir-p*): New variable.

Co-Authored-By: Ludovic Courtès <ludo@gnu.org>
2017-12-16 07:33:09 +01:00
Mathieu Othacehe e224820386
bootloader: Factorize write-file-on-device.
* gnu/bootloader/extlinux.scm (install-extlinux): Factorize bootloader
writing in a new procedure write-file-on-device defined in (gnu build
bootloader).
* gnu/build/bootloader.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add new file.
* gnu/system/vm.scm (qemu-img): Adapt to import and use (gnu build bootloader)
module during derivation building.
* gnu/scripts/system.scm (bootloader-installer-derivation): Ditto.
2017-12-15 11:52:38 +01:00
Mathieu Othacehe acf54bca22
vm: Adapt qemu command to ARM.
* gnu/build/vm.scm (load-in-linux-vm): New argument #:target-arm32.
Use it to adapt command for qemu-system-arm.  This implies to choose a
machine ("virt"), use the correct console port "ttyAMA0", disable KVM use
that is buggy on some ARM boards (Odroid XU4 for example) and use user mode
network stack instead of NIC. Gather all those options in a new variable
"arch-specific-flags".
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Pass
to load-in-linux-vm "#:target-arm32?" argument.
2017-12-15 11:44:29 +01:00
Mathieu Othacehe 7b307a21dd
vm: Use qemu drive device parameter.
* gnu/build/vm.scm (load-in-linux-vm): Use device parameter to define drive
  device.
2017-12-13 11:30:04 +01:00
Ludovic Courtès 22bf86a671
linux-boot: Remove unneeded import.
* gnu/build/linux-boot.scm: Remove unnecessary autoload of (system base
compile).
2017-12-02 23:13:21 +01:00
Ludovic Courtès 15c2ddc124
vm: ISO9660 images include /etc and other standard files.
* gnu/build/vm.scm (make-iso9660-image): Call
'populate-root-file-system' instead of a series of 'mkdir-p' calls.  Add
/etc to the arguments of xorriso.
2017-11-29 16:44:53 +01:00
Ludovic Courtès 748d4a84d1
linux-boot: Ensure /etc exists on the root file system.
Fixes a regression introduced in
c828969036 whereby /etc would no longer be
created as a result of calling 'mark-as-not-killable'.

This would affect ISO images because 'make-iso9660-image' does not
create /etc by default.  In particular, the ISO installation image as
created by the "iso-image-installer" test would fail to boot while
creating the /root/etc/mtab symlink:
<https://hydra.gnu.org/build/2352514/nixlog/9/raw>.

* gnu/build/linux-boot.scm (mount-root-file-system): Make sure /root/etc
exists.
2017-11-29 16:44:53 +01:00
Ludovic Courtès 0cb9c9d170
shepherd: Include /etc/group in service containers.
* gnu/build/shepherd.scm (default-mounts)[passwd]: Rename to...
[accounts]: ... this.  Add /etc/group.
2017-11-22 23:02:35 +01:00
Hartmut Goebel c828969036
build: Use overlayfs instead of unionfs.
Overlayfs is part of the kernel, while unionfs needs FUSE.  This also reduces
the size of the initrd by ca. 4.3% (487K).

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

* gnu/system/linux-initrd.scm (file-system-packages): Remove now unused
  packages "unionfs-fuse/static" and thus unused related 'if'.
  (linux-modules): Replace "fuse" by "overlay".
2017-11-08 18:23:05 +01:00
Ludovic Courtès 88235675fc
file-systems: Add support for FAT16.
* gnu/build/file-systems.scm (check-fat32-file-system): Rename to...
(check-fat-file-system): ... this.
(check-file-system): Adjust accordingly.
(fat16-superblock?, read-fat16-superblock)
(fat16-superblock-uuid, fat16-superblock-volume-name): New procedures.
(%partition-label-readers, %partition-uuid-readers): Add FAT16.
2017-10-11 11:12:33 +02:00
Ludovic Courtès 9976c76aab
file-systems: Preserve UUID types when serializing.
Reported by Roel Janssen <roel@gnu.org>
at <https://lists.gnu.org/archive/html/help-guix/2017-09/msg00094.html>.

* gnu/system/file-systems.scm (file-system->spec): When DEVICE is a
UUID, serialize it in a way that preserves its type.
(spec->file-system): Adjust accordingly.
* gnu/build/file-systems.scm (canonicalize-device-spec): Add case for
when SPEC is 'uuid?'.
2017-10-11 11:12:33 +02:00
Ludovic Courtès 1c65cca574
file-systems: 'mount-file-system' now takes a <file-system> object.
* gnu/build/file-systems.scm (mount-file-system): Rename 'spec' to 'fs'
and assume it's a <file-system>.
* gnu/build/linux-boot.scm (boot-system): Assume MOUNTS is a list of
<file-system> and adjust accordingly.
* gnu/build/linux-container.scm (mount-file-systems): Remove
'file-system->spec' call.
* gnu/services/base.scm (file-system-shepherd-service): Add
'spec->file-system' call.  Add (gnu system file-systems) to 'modules'.
* gnu/system/linux-initrd.scm (raw-initrd): Use (gnu system
file-systems).  Add 'spec->file-system' call for #:mounts.
2017-10-11 11:12:33 +02:00