Commit graph

1096 commits

Author SHA1 Message Date
Thiago Jung Bauermann a75deb8844
system: image: Define correct docker image arch when cross building
Cross-building a docker image with:

  $ guix system image --image-type=docker --target=aarch64-linux-gnu os.scm

results in an image where the architecture declared in its config.json is
the host architecture rather than the target one.  The binaries are
correctly cross-compiled, so the image can be loaded and used despite the
warning message shown by docker:

  $ docker load -i vcal7bvsqcijchifhqdvprpd1niqh8sk-docker-image.tar.gz
  Loaded image: guix:latest
  $ docker create guix:latest
  WARNING: The requested image's platform (linux/amd64) does not match the
  detected host platform (linux/arm64/v8) and no specific platform was
  requested
  40f06aa869ed690489c4a3824a7f7721bd4bf453b85f25ac7199266939fe2fba
  $ echo $?
  0

This is fixed by passing the correct triplet to the build-docker-image
function.

* gnu/system/image.scm (system-docker-image) Add ‘image-target’ variable.
[builder]: Pass ‘#:system’ argument to ‘build-docker-image’.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2022-11-04 08:46:11 +01:00
Tobias Geerinckx-Rice 19f3dbcb4d
system: Support bare-bones serial console.
* gnu/system/examples/bare-bones.tmpl (operating-system):
Add a ttyS0 console to kernel-arguments.
2022-10-23 02:00:06 +02:00
Ricardo Wurmus 9c97647446
system: Use a valid license as the dummy license.
* gnu/system/images/wsl2.scm (dummy-package)[license]: Do not use #F.
2022-10-13 17:41:59 +02:00
Maxim Cournoyer 990a4822f1
Merge branch 'staging' into core-updates
Conflicts resolved in:
	gnu/local.mk
	gnu/packages/cran.scm
	gnu/packages/gnome.scm
	gnu/packages/gtk.scm
	gnu/packages/icu4c.scm
	gnu/packages/java.scm
	gnu/packages/machine-learning.scm
	gnu/packages/tex.scm
2022-09-27 15:59:30 -04:00
Hilton Chain f15a141cf3
file-systems: Add cgroup2 to %pseudo-file-system-types.
* gnu/system/file-systems.scm (%pseudo-file-system-types): Add cgroup2.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-09-26 23:29:38 +02:00
Mathieu Othacehe 2784fcf14d
system: images: Add a TODO comment.
* gnu/system/image.scm (system-tarball-image): Add it.
2022-09-25 09:27:35 +02:00
Alex Griffin c8112f3bd9
system: images: Add wsl2 module.
* gnu/system/images/wsl2.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* doc/guix.texi ("System Images"): Document it.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2022-09-24 14:49:09 +02:00
Alex Griffin 233cf9f036
system: image: Add wsl2 support.
* gnu/image.scm (<image>)[format]: Add wsl2 support.
* gnu/system/image.scm (wsl2-image, wsl2-image-type): New variables.
(image->root-file-system): Add wsl2 image support.
(system-image): Ditto.
2022-09-24 14:49:09 +02:00
Alex Griffin 8757c3f293
system: image: Add tarball support.
* gnu/image.scm (<image>)[fields]: Add tarball to the supported formats.
* gnu/system/image.scm (tarball-image, tarball-image-type): New variables.
(system-tarball-image): New procedure.
(image->root-file-system): Add tarball image support.
(system-image): Ditto.
* doc/guix.texi ("System Images"): Document it.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2022-09-24 14:49:09 +02:00
Mathieu Othacehe 08a7eb187f
platforms: x86: Rename Hurd hurd to i586-gnu.
* guix/platforms/x86.scm (hurd): Rename it to ...
(i586-gnu): ... this variable.
* gnu/system/images/hurd.scm (hurd-disk-image, hurd-barebones-disk-image,
hurd-barebones-qcow2-image): Adapt those.
2022-09-24 14:49:07 +02:00
Mathieu Othacehe c009c286a2
image: Make the operating-system field mandatory.
Make the operating-system field mandatory as creating an image without it
makes no sense. Introduce a new macro, image-without-os for the specific cases
where the image is only created to be inherited from afterwards.

* gnu/image.scm (<image>)[operating-system]: Make it mandatory.
* gnu/system/image.scm (image-without-os): New macro.
(efi-disk-image, efi32-disk-image, iso9660-image, docker-image,
raw-with-offset-disk-image): Use it.
* gnu/system/images/hurd.scm (hurd-disk-image): Ditto.
2022-09-24 14:20:36 +02:00
Marius Bakke 7e0f2728a4
Merge branch 'staging' into core-updates 2022-09-16 19:11:43 +02:00
Antero Mejr d0376f6718
system: install: Do not load amdgpu in the installer image.
* gnu/system/install.scm (installation-os): Add amdgpu to
modprobe.blacklist.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2022-09-16 10:14:39 +02:00
Marius Bakke 884548b476
Merge branch 'staging' into core-updates 2022-09-08 21:12:52 +02:00
Mathieu Othacehe e917f1242c
system: images: Define the platform in image-types.
Running the following command where my-pine.scm contains an operating-system
declaration:

guix system image --image-type=pine64-raw my-pine.scm

returns:

guix system: error: package linux-libre-arm64-generic@5.18.19 does not support
x86_64-linux

That's because there's no platform defined in the pine64-raw image-type, hence
the guix system image tries to build the image for the host architecture.

* gnu/system/images/novena.scm (novena-image-type): Use the armv7-linux platform.
* gnu/system/images/pine64.scm (pine64-image-type): Use the aarch64-linux platform.
* gnu/system/images/pinebook-pro.scm (pinebook-pro-image-type): Use the aarch64-linux platform.
* gnu/system/images/rock64.scm (rock64-image-type): Use the aarch64-linux platform.
2022-09-07 14:24:53 +02:00
Mathieu Othacehe 08b8f85e08
system: image: Update my copyright.
* gnu/system/image.scm: Update it.
2022-09-07 14:24:52 +02:00
Mathieu Othacehe 310212e23e
system: image: Remove an unused variable.
* gnu/system/image.scm (sytem-image): Remove it.
2022-09-07 14:24:52 +02:00
Marius Bakke 77eb3008e3
Merge branch 'staging' into core-updates 2022-08-11 23:36:10 +02:00
Oleg Pykhalov 4b49487838
gnu: system: file-systems: Add shared flag.
* gnu/build/file-systems.scm (mount-flags->bit-mask, mount-file-system):
Handle shared flag.
* gnu/system/file-systems.scm (invalid-file-system-flags): Add shared to known
flags.
* guix/build/syscalls.scm (MS_SHARED): New variable.
* doc/guix.texi (File Systems): Document shared flag.
2022-08-10 07:12:25 +03:00
Ricardo Wurmus 26af06b66b
linux-container: container-script: Parse command line options.
* gnu/system/linux-container.scm (container-script): Accept command line
options to bind mount host directories into the container.
* doc/guix.texi (Invoking guix system): Document options.
2022-08-09 20:32:13 +02:00
Ludovic Courtès fdafd40432
maint: Use a pretty version string in ISO and VM images.
* gnu/system/examples/vm-image.tmpl: Use the 'GUIX_DISPLAYED_VERSION'
environment variable in 'label'.
* gnu/system/install.scm (%installation-os): Likewise.
* Makefile.am (release): Set 'GUIX_DISPLAYED_VERSION'.
2022-08-09 15:16:06 +02:00
Ludovic Courtès 95a03aa5c5
system: install: Always use 'current-guix'.
Fixes <https://issues.guix.gnu.org/53210>.
Reported by Mathieu Othacehe <othacehe@gnu.org>.

* gnu/system/install.scm (%installation-services): Set 'guix' to
use (current-guix) in 'guix-configuration'.
* gnu/system/examples/vm-image.tmpl: Likewise.
* gnu/tests/install.scm (operating-system-with-current-guix): Remove.
(run-install, installation-os-for-gui-tests): Remove its uses.
* Makefile.am (release): Remove intermediate use of
'update-guix-package.scm' and subsequent 'git commit' invocation.
2022-08-09 15:16:06 +02:00
Marius Bakke 9044b086dd
Merge branch 'staging' into core-updates 2022-07-22 01:09:14 +02:00
Ludovic Courtès 05a759ab36
image: Raise an error when an image lacks a bootable partition.
* gnu/system/image.scm (find-root-partition): Raise an error when 'find'
returns #f.
2022-07-01 12:10:28 +02:00
Ludovic Courtès ed19bc87e4
image: Avoid use of the deprecated 'gpt' option of genimage.
* gnu/system/image.scm (system-disk-image)[genimage-type-options]: Use
'partition-table-type' instead of the deprecated 'gpt' option.
2022-07-01 12:10:28 +02:00
Ludovic Courtès 9f530ef38a
image: Add default value for partition initializer.
Previously, the default value would lead to a wrong-type-to-apply crash.

* gnu/system/image.scm (system-disk-image)[image-builder]: When
'partition-initializer' returns #f, fall back to
INITIALIZE-ROOT-PARTITION.
* gnu/tests/base.scm (run-root-unmount-test)[test-image]: Remove
'initializer' field of partition.
* gnu/image.scm (<partition>)[initializer]: Add comment.
2022-07-01 12:10:28 +02:00
Ludovic Courtès e871c3a857
image: 'system-image' throws when given an incorrect image format.
Previously 'system-image' would return *unspecified* in that case,
leading to a wrong-type-arg error crash down the road.

* gnu/system/image.scm (system-image): Add 'else' clause.
2022-07-01 12:10:28 +02:00
Marius Bakke 2a7648774f
Merge branch 'master' into core-updates 2022-06-27 19:23:48 +02:00
Denis 'GNUtoo' Carikli 62c86c8391
image: Add support for 32bit UEFI.
* gnu/bootloader/grub.scm (grub-efi32-bootloader): New variable.
(install-grub-efi32): New variable.
* gnu/build/bootloader.scm (install-efi): Add a 'targets' keyword
argument.
(install-efi-loader): Likewise.
* gnu/build/image.scm (initialize-efi32-partition): New procedure.
* gnu/packages/bootloaders.scm (grub-efi32): New variable.
* gnu/system/image.scm (esp32-partition): New variable
(efi32-disk-image): New variable.
(efi32-raw-image-type): New variable.
(system-disk-image)[partition-image]: Set '#:grub-efi32' when
calling the partition initializer.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2022-06-24 10:21:06 +02:00
Ludovic Courtès 8c3e9da13a
Merge branch 'master' into core-updates 2022-06-08 14:46:24 +02:00
Josselin Poiret 0aa4311790
gnu: install: Add uvesafb service only on targets that support v86d.
Fixes <https://issues.guix.gnu.org/55806>.

* gnu/system/install.scm (%installation-services): Refactor into a
procedure, so that it can capture the system it's installing for.
Conditionally add uvesafb-service-type based on whether v86d is
supported by the target architecture.
(installation-os)[services]: Use the %installation-service procedure.
(uvesafb-shepherd-service): Remove %host-type checks.

Signed-off-by: Florian Pelz <pelzflorian@pelzflorian.de>
2022-06-07 11:49:18 +02:00
Maxim Cournoyer edac21bfc7
gnu: Remove wicd.
The last release is from 2017, stuck on Python 2.

* gnu/packages/wicd.scm: Delete file.
* gnu/packages/patches/wicd-bitrate-none-fix.patch: Delete file.
* gnu/packages/patches/wicd-get-selected-profile-fix.patch: Likewise.
* gnu/packages/patches/wicd-urwid-1.3.patch: Likewise.
* gnu/packages/patches/wicd-wpa2-ttls.patch: Likewise.
* gnu/local.mk: De-register them.
* gnu/services/networking.scm: Remove wicd service...
* doc/guix.texi: ... and its documentation.
* gnu/system/linux-container.scm (containerized-operating-system)
<services-to-drop>: Remove wicd-service-type.
2022-05-31 14:53:42 -04:00
Pavel Shlyak 8b680b00d4
image: Add fat32 support.
* gnu/build/image.scm (make-vfat-image): Pass fs-bits as an argument and force
1kb logical sector size only if "ESP" flag is set.
(make-partition-image): Add "fat32" partition type, support explicit "fat16"
type with vfat alias.
* gnu/system/image.scm (partition->dos-type partition): Return file system IDs
for "fat16" and "fat32" partitions.
(partition->gpt-type partition): Ditto.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2022-05-31 14:51:13 +02:00
Efraim Flashner be43625159
images: hurd: Adjust module imports.
Follow-up to a9dcd60bc1.

* gnu/system/images/hurd.scm: Adjust module imports to changes in code
structure.
2022-05-25 14:47:36 +03:00
Josselin Poiret dab819d5c4
Move (gnu platform) and (gnu platforms ...) to guix/.
* gnu/platform.scm:
* gnu/platforms/arm.scm:
* gnu/platforms/hurd.scm:
* gnu/platforms/mips.scm:
* gnu/platforms/powerpc.scm:
* gnu/platforms/riscv.scm:
* gnu/platforms/s390.scm:
* gnu/platforms/x86.scm: Move to guix/.

* Makefile.am:
* doc/guix.texi (Porting to a New Platform):
* etc/release-manifest.scm:
* gnu/ci.scm:
* gnu/image.scm:
* gnu/local.mk:
* gnu/packages/bioinformatics.scm:
* gnu/packages/bootstrap.scm:
* gnu/packages/cross-base.scm:
* gnu/packages/instrumentation.scm:
* gnu/packages/linux.scm:
* gnu/system/image.scm:
* gnu/system/images/hurd.scm:
* gnu/system/images/novena.scm:
* gnu/system/images/pine64.scm:
* gnu/system/images/pinebook-pro.scm:
* gnu/system/images/rock64.scm:
* guix/scripts/build.scm:
* guix/scripts/system.scm:
* guix/self.scm: Update (gnu platform...) to (guix platform...).

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2022-05-25 09:27:25 +02:00
Pavel Shlyak bb662d71e6
image: Add bootable flag support.
* gnu/build/image.scm (sexp->partition): Add flags support.
* gnu/system/image.scm (partition->gexp): Ditto.
(system-disk-image): Set the genimage bootable flag if it is part of the
partition flags.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2022-05-23 09:17:12 +02:00
Pavel Shlyak 6e99c020b8
system: image: Support GPT vfat partitions.
* gnu/system/image.scm (system-disk-image): Support them.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2022-05-23 09:17:12 +02:00
Pavel Shlyak 76139eb253
system: image: Support MBR vfat partitions.
* gnu/system/image.scm (system-disk-image): Support them.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2022-05-23 09:17:12 +02:00
Mathieu Othacehe db3193f55b
system: image: Tweak error message.
* gnu/system/image.scm (system-disk-image): Tweak it.
2022-05-23 09:17:08 +02:00
Mathieu Othacehe 17e3b7d28f
system: image: Fix indentation.
* gnu/system/image.scm: Fix it.
2022-05-23 09:16:09 +02:00
Ludovic Courtès 9a5d686923
services: Add more description fields.
* gnu/services.scm (simple-service): Add 'description' field.
* gnu/services/base.scm (udev-rules-service): Likewise.
* gnu/system/install.scm (configuration-template-service-type): Likewise.
* gnu/tests.scm (marionette-service-type): Likewise.
2022-05-18 22:29:54 +02:00
Ludovic Courtès eaebc7f2b7
file-systems: Avoid load-time warnings when attempting to load (guix store).
This makes sure warnings like "incompatible bytecode version" don't go
through when looking for (guix store).

* gnu/system/file-systems.scm (%store-prefix): Parameterize
'current-warning-port' around 'resolve-module' call.
2022-05-01 21:30:34 +02:00
Ludovic Courtès 931f13840b
mapped-devices: Ensure 'cryptsetup open' gets a tty.
Fixes <https://issues.guix.gnu.org/54770>.
Regression introduced in 400c9ed3d7.

Previously, for an encrypted /home (say), "cryptsetup open" would be
invoked by shepherd, with /dev/null as its standard input.  It would
thus run in non-interactive mode and, instead of asking for a
passphrase, fail with:

  Nothing to read on input.

This change ensures it runs in interactive mode.

* gnu/build/file-systems.scm (system*/console, system*/tty): New
procedures.
* gnu/system/mapped-devices.scm (open-luks-device): Use 'system*/tty'
instead of 'system*'.
2022-04-08 18:14:35 +02:00
Ludovic Courtès df473496ed
system: hurd: Fix bogus 'initrd-modules' field.
Reported by kitzman on #guix.

* gnu/system/hurd.scm (%hurd-default-operating-system)[initrd-modules]:
Set to the empty list.
2022-04-08 18:14:35 +02:00
Maxim Cournoyer a9429c8f22
Merge branch 'staging' into core-updates. 2022-03-21 23:39:43 -04:00
Ludovic Courtès cff9fee82a
linux-container: Add #:guest-uid and #:guest-gid to 'eval/container'.
* gnu/system/linux-container.scm (eval/container): Add #:guest-uid
and #:guest-gid and honor them.
2022-03-19 18:26:00 +01:00
Ludovic Courtès c77544b387
linux-container: 'eval/container' honors #:namespaces.
* gnu/system/linux-container.scm (eval/container): Pass #:namespaces to
'call-with-container'.
2022-03-19 18:26:00 +01:00
Mathieu Othacehe 2543cb4854
images: novena: Fix build.
* gnu/system/images/novena.scm (novena-barebones-os)[kernel]: Use the
linux-libre-arm-generic kernel.
[initrd-modules]: Do not specify any modules as sdhci-esdhc-imx, ahci_imx and
i2c-dev are built-in in the arm-generic kernel.
2022-03-15 13:14:29 +01:00
Ludovic Courtès a208a4e923
system: hurd: Move the Shepherd before the Hurd in %BASE-PACKAGES/HURD.
* gnu/system/hurd.scm (%base-packages/hurd): Move SHEPHERD before HURD.
2022-03-09 23:38:18 +01:00
Maxim Cournoyer 0dc019e19a
initrd: Use non-hyphenated kernel command-line parameter names.
This is to make it less surprising, given the common convention sets forth by
the kernel Linux command-line parameters.

* gnu/build/linux-boot.scm (boot-system): Rename '--load', '--repl', '--root'
and '--system' to 'gnu.load', 'gnu.repl', 'root' and 'gnu.system',
respectively.  Adjust doc.
(find-long-option): Adjust doc.
* gnu/installer/parted.scm (installer-root-partition-path): Adjust accordingly.
* gnu/system.scm (bootable-kernel-arguments): Add a VERSION argument and
update doc.  Use VERSION to conditionally return old style vs new style initrd
arguments.
(%boot-parameters-version): Increment to 1.
(operating-system-boot-parameters): Adjust doc.
(operating-system-boot-parameters-file): Likewise.
* gnu/system/linux-initrd.scm (raw-initrd, base-initrd): Likewise.
* doc/guix.texi: Adjust doc.
* gnu/build/activation.scm (boot-time-system): Adjust accordingly.
* gnu/build/hurd-boot.scm (boot-hurd-system): Likewise.
* gnu/packages/commencement.scm (%final-inputs-riscv64): Adjust comment.
2022-03-01 10:30:17 -05:00
Josselin Poiret 0055a803e2
system: Add helper file-system-mount-point-predicate.
* gnu/system/file-systems.scm (file-system-mount-point-predicate): Add
it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-02-15 10:14:14 +01:00
Andrew Tropin f172118ca4
gnu: linux-pam: Change path to unix_chkpwd helper.
* gnu/packages/patches/linux-pam-unix_chkpwd.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/linux.scm (linux-pam): Use it.
* gnu/system/pam.scm (pam-root-service-type): Add unix_chkpwd to setuid.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2022-02-10 23:37:10 +01:00
Leo Famulari fd6cfbc05a
Revert kernel modules changes to support the Coreboot framebuffer
These changes broke the creation of the 'linux-modules-database' for all kernel
series besides 5.15, 5.4, and 5.10, like this:

------
gnu/build/linux-modules.scm:257:5: kernel module not found "framebuffer_coreboot" "/gnu/store/yff45fr6q93mw44zdql9ffr95zcvwxcn-linux-libre-4.9.299/lib/modules"
------

We should support the coreboot framebuffer, but we need to test that change more
completely before deploying it.

This effectively reverts the following commits:
1dfe8c3721 "gnu: linux-libre: Build simplefb into all x86{,_64} kernels."
bc09e7ab56 "gnu: linux-libre: Support the Coreboot framebuffer."

Fixes <https://issues.guix.gnu.org/52667> "System reconfiguration fails to build
linux-modules.drv".
2022-02-09 01:38:51 -05:00
Mathieu Othacehe 9d0d4b331d
system: locale: Use only the current glibc.
* gnu/system/locale.scm (%default-locale-libcs): Remove glibc-2.31.
2022-01-14 14:29:20 +01:00
Mathieu Othacehe 0233583aa4
system: vm: Change the writable image name.
* gnu/system/vm.scm (system-qemu-image/shared-store-script): Change it.
2022-01-14 12:26:07 +01:00
Chris Marusich 79260c8695
services: Consistently use SDDM rather than GDM on non-x86_64.
This is a follow-up to 49599fab56.

Fixes: <https://issues.guix.gnu.org/52908>.

* gnu/services/xorg.scm (set-xorg-configuration)[login-manager-service-type]:
When the current system or target system begins with the string "x86_64", use
gdm-service-type as before; otherwise, use sddm-service-type.
* gnu/system/examples/vm-image.tmpl (services): Add sddm-service-type to the
list of service types to remove.
2022-01-06 18:54:59 -08:00
Mathieu Othacehe 5d2b8b0ee3
system: vm: Restore default RAM size to 512MB.
* gnu/system/vm.scm (system-qemu-image/shared-store-script): Restore it.
2022-01-06 10:43:14 +01:00
Ricardo Wurmus 0fea9aec59
doc: Only use GDM and GNOME on x86_64.
* gnu/system/examples/desktop.tmpl: Only use gnome-desktop-service-type and
the default login manager in set-xorg-configuration when the target system is
x86_64.
2022-01-05 21:46:41 +01:00
Ludovic Courtès 671e6a8180
system: Allow 'chfn' to change the user's full name.
Fixes <https://issues.guix.gnu.org/52539>.
Reported by Jacob First <jacob.first@member.fsf.org>.

* gnu/build/accounts.scm (allocate-passwd): Add comment as to why
'real-name' is taken from PREVIOUS.  Add (not system?) to the
condition.
* gnu/system.scm (operating-system-etc-service) <login.defs>: Add
"CHFN_RESTRICT".
* gnu/system.scm (%setuid-programs): Add "chfn".
* gnu/system/pam.scm (base-pam-services): Add "chfn".
* doc/guix.texi (User Accounts): Document it.
2022-01-01 15:10:12 +01:00
Tobias Geerinckx-Rice 1dfe8c3721
gnu: linux-libre: Build simplefb into all x86{,_64} kernels.
This attempts to mitigate <https://issues.guix.gnu.org/52667>.

It makes linux-libre@5.15 consistent with older versions which do not
support a modular simplefb, allowing a single %base-initrd-modules
simple list for all of them.

Unlike CONFIG_FB_SIMPLE=m, CONFIG_FB_SIMPLE=y conflicts with
CONFIG_DRM_SIMPLEDRM, so the latter is now disabled.  Let us hope it is
not missed.

* gnu/packages/aux-files/linux-libre/5.15-i686.conf,
gnu/packages/aux-files/linux-libre/5.15-x86_64.conf:
Unset CONFIG_DRM_SIMPLEDRM to build in CONFIG_FB_SIMPLE=y.
* gnu/system/linux-initrd.scm (default-initrd-modules):
Remove "simplefb".
2021-12-25 07:20:00 +01:00
Mathieu Othacehe 05a9d1f378
Remove VM generation dead-code.
This code duplicates the (gnu system image) and (gnu build image) code. Using
VM for image generation is not needed, not portable and really slow. Remove
all the VM image generation code to make sure that only the image API is used.

* gnu/build/vm.scm: Remove it. Move the qemu-command procedure to ...
* gnu/build/marionette.scm: ... here.
* gnu/local.mk (GNU_SYSTEM_MODULES): Adapt it.
* tests/modules.scm: Ditto.
* gnu/tests/install.scm: Ditto.
* gnu/system/vm.scm: Adapt it and remove expression->derivation-in-linux-vm,
qemu-img, system-qemu-image/shared-store and system-docker-image procedures.
* doc/guix.texi (G-Expressions): Adapt it.
2021-12-23 10:54:00 +01:00
Mathieu Othacehe da92479674
system: vm: Use the image API to generate QEMU images.
Also add a volatile? argument to the virtual-machine record. When volatile? is
true generate a QEMU script that mounts an overlay on top of a read only
storage. When volatile? is false, use a persistent, read-write storage.

* gnu/system/vm.scm (common-qemu-options): Add a rw-image? argument to use a
persistent storage.
(system-qemu-image/shared-store-script): Add a volatile? argument and honor
it. Use the image API to build the QEMU image.
(<virtual-machine>)[volatile?]: New field.
(virtual-machine-compiler): Pass the volatile? argument to the
system-qemu-image/shared-store-script procedure.
2021-12-23 10:54:00 +01:00
Mathieu Othacehe 59912117d4
system: image: Add docker support.
* gnu/system/image.scm (docker-image, docker-image-type): New variables.
(system-docker-image): New procedure.
(image->root-file-system): Add docker image support.
(system-image): Ditto.
2021-12-23 10:54:00 +01:00
Denis 'GNUtoo' Carikli 9c42d1fa00
doc: Add group configuration example
* gnu/system/examples/desktop.tmpl: Add group configuration example.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-12-19 23:39:55 +01:00
Tobias Geerinckx-Rice via Guix-patches via bc09e7ab56
gnu: linux-libre: Support the Coreboot framebuffer.
Without this, the kernel cannot write to the display until the
full-featured driver module (often i915) is loaded from the root file
system.

If the root file system is encrypted, the initrd's passphrase prompt
won't make it to the screen, and the fully responsive system will appear
frozen whilst waiting for user input.

* gnu/packages/aux-files/linux-libre/4.4-i686.conf,
gnu/packages/aux-files/linux-libre/4.4-x86_64.conf,
gnu/packages/aux-files/linux-libre/4.14-i686.conf,
gnu/packages/aux-files/linux-libre/4.14-x86_64.conf,
gnu/packages/aux-files/linux-libre/4.19-i686.conf,
gnu/packages/aux-files/linux-libre/4.19-x86_64.conf,
gnu/packages/aux-files/linux-libre/5.4-i686.conf,
gnu/packages/aux-files/linux-libre/5.4-x86_64.conf,
gnu/packages/aux-files/linux-libre/5.10-i686.conf,
gnu/packages/aux-files/linux-libre/5.10-x86_64.conf,
gnu/packages/aux-files/linux-libre/5.15-i686.conf,
gnu/packages/aux-files/linux-libre/5.15-x86_64.conf:
Mark simple framebuffers as generic system ones and enable ‘Google’
firmware drivers to enable Coreboot table support and its dependent
framebuffer driver module.
* gnu/system/linux-initrd.scm (default-initrd-modules):
Add the framebuffer_coreboot and simplefb modules on x86 systems.
2021-12-16 12:53:52 -05:00
Ludovic Courtès 1052ae5f03
Merge branch 'master' into core-updates-frozen 2021-12-13 11:49:15 +01:00
Ludovic Courtès 5967aee398
services: Define '%loopback-static-networking'.
* gnu/services/base.scm (%loopback-static-networking): New variable.
(%base-services): Use it.
* gnu/system/hurd.scm (%base-services/hurd): Use it.
* gnu/system/install.scm (%installation-services): Use it.
* doc/guix.texi (Networking Setup): Document it.
2021-12-12 23:20:50 +01:00
Ludovic Courtès 1644f4f1f8
services: Define '%qemu-static-networking'.
* gnu/services/base.scm (%qemu-static-networking): New variable.
* gnu/system/hurd.scm (%base-services/hurd): Use it.
* doc/guix.texi (Networking Setup): Document it.
2021-12-12 23:20:49 +01:00
Ludovic Courtès 223f1b1eb3
services: static-networking: Change interface to mimic netlink.
* gnu/services/base.scm (<static-networking>)[interface, ip, netmask]
[gateway]: Remove.
[addresses, links, routes]: New fields.
[requirement]: Default to '(udev).
(<network-address>, <network-link>, <network-route>): New record types.
(ensure-no-separate-netmask, %ensure-no-separate-netmask): Remove.
(ipv6-address?, cidr->netmask, ip+netmask->cidr)
(network-set-up/hurd, network-tear-down/hurd)
(network-set-up/linux, network-tear-down/linux)
(static-networking->hurd-pfinet-options): New procedures.
(static-networking-shepherd-service): New procedure.
(static-networking-shepherd-services): Rewrite in terms of the above.
(static-networking-service): Deprecate.  Adjust to new
'static-networking' API.
(%base-services): Likewise.
* gnu/system/install.scm (%installation-services): Likewise.
* gnu/system/hurd.scm (%base-services/hurd): Likewise, and separate
'loopback' from 'networking'.
* gnu/build/hurd-boot.scm (set-hurd-device-translators): Remove
"servers/socket/2".
* gnu/tests/networking.scm (run-openvswitch-test)["networking has
started on ovs0"]: Check for 'networking instead of 'networking-ovs0,
which is no longer provided.
* doc/guix.texi (Networking Setup): Document the new interface.  Remove
documentation of 'static-networking-service'.
(Virtualization Services): Change Ganeti example to use the new
interface.
2021-12-12 23:20:49 +01:00
Ricardo Wurmus 9bc0f45df5
Merge remote-tracking branch 'origin/master' into core-updates-frozen 2021-12-05 19:17:41 +01:00
Mathieu Othacehe 3354e41c1e
system: vm: Remove the vga argument.
* gnu/system/vm.scm (common-qemu-options): Remove the "-vga std" argument that
is the default since QEMU 2.2.

Suggested-by: Attila Lendvai <attila@lendvai.name>
2021-12-03 14:25:57 +01:00
Attila Lendvai b42bfbdfe5
guix system vm: Add --no-graphic CLI argument.
It configures QEMU to use the tty it was started in for IO (as opposed to
opening a separate graphical window).  This enables copy-pasting and
scrollback.  Exit QEMU with C-a x.

* gnu/system/vm.scm (system-qemu-image/shared-store-script): Also add the
'-nographic' QEMU argument when called with #:graphic? #false.
* guix/scripts/system.scm (system-derivation-for-action): Propagate
the #:graphic? keyword arg.
(perform-action): Add and propagate the #:graphic? keyword arg.
(show-help): Add --no-graphic CLI arg.
(%options): Process the new --no-graphic CLI arg.
(process-action): Feed in the CLI arg through the #:graphic? keyword arg.
* doc/guix.texi (Invoking guix system): Add example to combine guix system and
invoking the vm start script into one command.  Split the description of the
various options into separate paragraphs.  Add a paragraph to describe
--no-graphic.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2021-12-03 14:18:32 +01:00
Josselin Poiret adce91a3ec
gnu: system: Add LUKS2 support for the root file system.
* gnu/bootloader/grub.scm (grub-configuration-file): Add 'insmod
luks2'.
* gnu/system/mapped-devices.scm (open-luks-device): Create
'/run/cryptsetup/' directory.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-12-01 17:51:37 +01:00
Ludovic Courtès b15e543d30
Merge branch 'master' into core-updates-frozen 2021-11-23 11:29:38 +01:00
Josselin Poiret 9685c0637d
doc: Add new Swap Space section.
* doc/guix.texi (operating-system Reference): Update swap-devices.
* doc/guix.texi (Swap Space): Add it.
* gnu/system/examples/desktop.tmpl: Add swap-devices example.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-11-23 10:24:28 +01:00
Josselin Poiret 0831dfab75
system: Add swap flags.
* gnu/system/file-systems.scm (swap-space)[priority, discard?]: Add
them.
* guix/build/syscalls.scm (SWAP_FLAG_PREFER, SWAP_FLAG_PRIO_MASK,
SWAP_FLAG_PRIO_SHIFT, SWAP_FLAG_DISCARD): Add them.
* gnu/build/file-systems.scm (swap-space->flags-bit-mask): Add it.
* gnu/services/base.scm (swap-service-type): Use it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-11-23 10:24:27 +01:00
Josselin Poiret 133a61ae26
system: Rework swap space support, add dependencies.
* gnu/system/file-systems.scm (swap-space): Add it.
* gnu/system.scm (operating-system)[swap-devices]: Update comment.
* gnu/services/base.scm (swap-space->shepherd-service-name,
swap-deprecated->shepherd-service-name, swap->shepherd-service-name):
Add them.
* gnu/services/base.scm (swap-service-type, swap-service): Use the new
records.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-11-23 10:24:27 +01:00
Ludovic Courtès aaf210888c
vm: <virtual-machine> defaults to using 'qemu-minimal'.
'qemu-minimal' is enough for system tests, which is the main (only?) use
of <virtual-machine>.

* gnu/system/vm.scm (<virtual-machine>)[qemu]: Default to QEMU-MINIMAL.
2021-11-20 23:11:44 +01:00
Ludovic Courtès 3a317f7476
Merge branch 'master' into core-updates-frozen 2021-11-17 23:43:14 +01:00
Ryan Sundberg 096a2bf8c5
image: Support generating GPT images via partition-table-type.
* gnu/image.scm (<image>)[partition-table-type]: New field.
* gnu/system/image.scm: Implement partition-table-type logic for
genimage.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2021-11-12 12:06:58 +00:00
Efraim Flashner 1c94392a13
Merge remote-tracking branch 'origin/master' into core-updates-frozen 2021-11-08 09:06:14 +02:00
Ludovic Courtès 5eb5c0789f
file-systems: Validate the 'flags' field.
Fixes <https://issues.guix.gnu.org/51425>.
Reported by Jonathan Brielmaier <jonathan.brielmaier@web.de>.

* gnu/system/file-systems.scm (invalid-file-system-flags)
(%validate-file-system-flags): New procedures.
(validate-file-system-flags): New macro.
(<file-system>)[flags]: Add 'sanitize' property.
2021-11-07 23:10:41 +01:00
Mathieu Othacehe e486b2b674
Merge remote-tracking branch 'signed/master' into core-updates 2021-10-18 14:37:26 +00:00
Ludovic Courtès d1053f8969
system: hurd: Add 'info-reader' to %BASE-PACKAGES/HURD.
* gnu/system/hurd.scm (%base-packages/hurd): Add INFO-READER.
2021-10-18 10:00:50 +02:00
Ludovic Courtès f513afa37f
system: image: Ensure Hurd images are cross-compiled if needed.
Fixes regression introduced in d5073fd113,
whereby childhurd dependencies such as 'hurd' would erroneously be
attempted to build natively on x86_64-linux.

* gnu/system/images/hurd.scm (hurd-disk-image)[platform]: New field.
2021-10-18 10:00:50 +02:00
Marius Bakke 0f77e50139
Merge branch 'master' into core-updates-frozen 2021-10-14 00:01:12 +02:00
Tobias Geerinckx-Rice ec46a5338d
linux-initrd: Support checking NTFS volumes on boot.
* gnu/system/linux-initrd.scm (file-system-packages): Add ntfsfix/static
when needed.
2021-10-13 01:20:19 +02:00
Mathieu Othacehe a1eca979fb
Merge remote-tracking branch 'origin/master' into core-updates-frozen. 2021-10-12 17:46:23 +00:00
Mathieu Othacehe d5073fd113
gnu: Add platform support.
* gnu/platform.scm: New file.
* gnu/platforms/arm.scm: Ditto.
* gnu/platforms/hurd.scm: Ditto.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add them.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2021-10-11 12:05:39 +00:00
Tobias Geerinckx-Rice 69f37702df
file-systems: Fix <file-system> skip-check-if-clean? default.
Let this be a warning against—even cautiously and deliberately—using
double negatives.  You shall stare, but you shall not see.

* gnu/system/file-systems.scm (<file-system>): Fix the default
skip-check-if-clean? value to match the documentation and the intention.
2021-09-24 21:11:19 +02:00
Tobias Geerinckx-Rice cd19c920b7
linux-initrd: Support XFS.
* gnu/system/linux-initrd.scm (file-system-packages):
Add xfs_repair/static when needed.
(file-system-type-modules): Add ‘xfs’ module when needed.
2021-09-23 18:17:17 +02:00
Tobias Geerinckx-Rice 90604348e1
uuid: Support XFS.
* gnu/system/uuid.scm (string->xfs-uuid): New procedure.
(%uuid-parsers, %uuid-printers): Add ‘xfs’ file system type.
2021-09-23 18:17:17 +02:00
Tobias Geerinckx-Rice 15489291d9
linux-initrd: Include only the single ‘bcachefs’ binary.
* gnu/system/linux-initrd.scm (file-system-packages): Substitute
bcachefs/static for bcachefs-tools/static.
2021-09-23 18:17:16 +02:00
Tobias Geerinckx-Rice 68b219b9f4
gnu: Don't abuse check-btrfs-file-system to scan.
It was never guaranteed to be run for non-root file systems.  It was for
root file systems only due to a bug now fixed.

* gnu/build/file-systems.scm (check-btrfs-file-system): Don't invoke
‘btrfs device scan’ here.
* gnu/system/linux-initrd.scm (raw-initrd): Do so here if any btrfs file
systems are present.
2021-09-23 18:17:16 +02:00
Tobias Geerinckx-Rice 602994847b
file-systems: Support forced checks & repairs.
* gnu/build/file-systems.scm (check-ext2-file-system)
(check-bcachefs-file-system, check-btrfs-file-system)
(check-fat-file-system, check-jfs-file-system, check-f2fs-file-system)
(check-ntfs-file-system, check-file-system): Take and honour new FORCE?
and REPAIR arguments.  Update the docstring.  Adjust all callers.
* gnu/system/file-systems.scm <file-system>: Add new SKIP-CHECK-IF-CLEAN?
and REPAIR fields.
(file-system->spec, spec->file-system): Adjust accordingly.
* gnu/build/linux-boot.scm (mount-root-file-system): Take new
SKIP-CHECK-IF-CLEAN? and REPAIR keyword arguments.  Thread them through
to CHECK-FILE-SYSTEM.
* doc/guix.texi (File Systems): Document both new <file-system> options.
2021-09-23 18:17:15 +02:00
Ludovic Courtès d9dfbf886d
Merge branch 'master' into core-updates-frozen 2021-09-07 14:19:08 +02:00
Marius Bakke b029be2ee0
Merge branch 'master' into core-updates-frozen
Conflicts:
	gnu/packages/bioinformatics.scm
	gnu/packages/cmake.scm
	gnu/packages/curl.scm
	gnu/packages/emacs-xyz.scm
	gnu/packages/gpodder.scm
	gnu/packages/music.scm
	gnu/packages/patches/glibc-bootstrap-system.patch
	gnu/packages/python-xyz.scm
	gnu/packages/shells.scm
	gnu/packages/statistics.scm
2021-07-29 22:34:57 +02:00
Christopher Lemmer Webber 45235e67e4
system: Add (gnu system setuid).
I flubbed and somehow when including the patch series, this got dropped.
Oops... should fix things again.

* gnu/system/setuid.scm: New file.
2021-07-29 13:09:48 -04:00
Maxim Cournoyer da4e409483
Migrate to the new 'targets' field of bootloader-configuration.
The old 'target' field is deprecated; adjust the sources to use the new
'targets' one instead.

* doc/guix-cookbook.texi<target>: Replace by 'targets'.
* gnu/bootloader/grub.scm: Likewise.
* gnu/installer/parted.scm: Likewise.
* gnu/machine/digital-ocean.scm: Likewise.
* gnu/system/examples/asus-c201.tmpl: Likewise
* gnu/system/examples/bare-bones.tmpl: Likewise
* gnu/system/examples/bare-hurd.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/examples/vm-image.tmpl: Likewise
* gnu/system/examples/yggdrasil.tmpl: Likewise
* gnu/system/hurd.scm: Likewise
* gnu/system/images/hurd.scm: Likewise
* gnu/system/images/novena.scm: Likewise
* gnu/system/images/pine64.scm: Likewise
* gnu/system/images/pinebook-pro.scm: Likewise
* gnu/system/images/rock64.scm: Likewise
* gnu/system/install.scm: Likewise
* gnu/system/vm.scm: Likewise
* gnu/tests.scm: Likewise
* gnu/tests/ganeti.scm: Likewise
* gnu/tests/install.scm: Likewise
* gnu/tests/nfs.scm: Likewise
* gnu/tests/telephony.scm: Likewise
* tests/boot-parameters.scm: Likewise
* tests/system.scm: Likewise
2021-08-29 01:05:26 -04:00
Mathieu Othacehe 1dbed7e098
images: pinebook-pro: Fix the agetty baud rate.
* gnu/system/images/pinebook-pro.scm (pinebook-pro-barebones-os): Fix the
agetty baud rate.
2021-08-28 17:47:12 +02:00