Commit graph

1037 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
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
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
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
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
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
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
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
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
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