* gnu/bootloader.scm (menu-entry->sexp, sexp->menu-entry): Swap order in
match subprocedures.
* gnu/build/file-systems.scm (ext2-superblock-uuid,
linux-swap-superblock-uuid, bcachefs-superblock-external-uuid,
btrfs-superblock-uuid, exfat-superblock-uuid, fat32-superblock-uuid,
fat16-superblock-uuid, iso9660-superblock-uuid, jfs-superblock-uuid,
f2fs-superblock-uuid, luks-header-uuid, ntfs-superblock-uuid,
xfs-superblock-uuid): Wrap bytevector in uuid record.
* gnu/build/image.scm (make-iso9660-image): Take uuid as string.
* gnu/installer/parted.scm (user-partition->file-system): Do not provide
uuid-type.
* gnu/system/image.scm (system-iso9660-image): Convert uuid to string.
* gnu/system/uuid.scm (dce-uuid->string, iso9660-uuid->string): Do not
export.
Change-Id: I35435de0d808e66e17fd9b54247a7a11a93ecd62
* gnu/system/examples/asus-c201.tmpl (bootloader): Use new depthcharge
bootloader name scheme and update to new target system.
* gnu/system/examples/bare-bones.tmpl (bootloader),
gnu/system/examples/bare-hurd.tmpl (bootloader),
gnu/system/examples/beaglebone-black.tmpl (bootloader),
gnu/system/examples/desktop.tmpl (bootloader),
gnu/system/examples/lightweight-desktop.tmpl (bootloader),
gnu/system/examples/plasma.tmpl (bootloader): Use new target system.
* gnu/system/examples/docker-image.tmpl (bootloader): Delete.
* gnu/system/examples/vm-image.tmpl (bootloader): Use auto image target.
Change-Id: I3675f17ae9cd94cff99328762600fb4e491bc9f2
Less adding and more making it an actual bootloader rather than some
weirdly specified packages. The GRUB EFI bootloader can be recreated by
combining a Raspberry Pi bootloader with grub-efi.
* gnu/bootloader.scm (efi-bootloader-profile, efi-bootloader-chain):
Delete procedures.
* gnu/bootloader/u-boot.scm (rpi-config, install-rpi,
make-u-boot-rpi-bootloader): New procedures.
(u-boot-rpi-2-bootloader, u-boot-rpi-3-bootloader,
u-boot-rpi-4-bootloader, u-boot-rpi-bootloader): New variables.
* gnu/packages/bootloaders.scm (make-u-boot-bin-package): Delete
procedure.
(%u-boot-rpi-efi-description, %u-boot-rpi-efi-description-32-bit,
u-boot-rpi-2-efi, u-boot-rpi-3-32b-efi, u-boot-rpi-4-32b-efi,
u-boot-rpi-arm64-efi, u-boot-rpi-2-bin, u-boot-rpi-3_32b-bin,
u-boot-rpi-4_32b-bin, u-boot-rpi-arm64-bin, u-boot-rpi-2-efi-bin,
u-boot-rpi-3-32b-efi-bin, u-boot-rpi-4-32b-efi-bin,
u-boot-rpi-arm64-efi-bin): Delete variables.
* gnu/packages/raspberry-pi.scm (grub-efi-bootloader-chain-raspi-64):
Delete procedure.
* gnu/system/examples/raspberry-pi-64-nfs-root.tmpl (bootloader),
gnu/system/examples/raspberry-pi-64.tmpl (bootloader): Use new target
system.
Change-Id: I5139a0b00ec89189e8e7c84e06a7a3b7240259cd
Sorry this is a massive commit. It's kinda impossible to split it
without either completely breaking basic functionality or making a buggy
shim layer that's written just to be immediately removed.
But anyway, this is the real body of the bootloader subsystem update.
One of my favorite new things possible with this is easy generation of
disk images using arbitrary bootloaders, including ones that require one
or more data/install partitions, such as p-boot or depthcharge!
* gnu/build/image.scm (initialize-root-partition): Don't install
bootloader here.
(make-iso9660-image): Pull in grub.dir instead of a bootcfg.
* gnu/build/install.scm (install-boot-config): Delete procedure.
* gnu/machine/ssh.scm (deploy-managed-host, roll-back-managed-host): Use
new bootloader system.
(operating-system)[bootloader]: Use wrap-element sanitizer and support
multiple bootloaders.
(operating-system-bootcfg): Rename to...
(operating-system-bootmeta): ...this. Rewrite to return relevant
information instead of calling the config procedure directly.
(operating-system-boot-parameters): Support multiple bootloaders.
* gnu/system/boot.scm (read-boot-parameters): Support multiple
bootloaders.
* gnu/system/image.scm (root-partition-index): Delete procedure.
(system-disk-image, system-iso9960-image): Support new bootloader system.
(system-disk-image)[targets]: New subprocedure.
* guix/scripts/system.scm (install, install-bootloader-from-provenance,
perform-action): Support multiple bootloaders and work with new
bootloader system instead of bootcfgs.
(display-system-generation): Support multiple bootloaders.
* guix/scripts/system/reconfigure.scm (install-bootloader-program):
Rewrite to simply insert each bootloader's installer in the gexp
directly, instead of copying bootcfgs.
(install-bootloader): Work with new bootloader system. Just in case,
add install-bootloader.scm to the gc roots too.
Change-Id: I3654d160f7306bb45a78b82ea6b249ff4281f739
* gnu/bootloader.scm (efi-arch, install-efi): New procedures.
(%efi-supported-systems, lazy-efibootmgr): New variables.
(bootloader-configuration)[efi-removable?, 32bit?]: New fields.
(match-bootloader-configuration, match-menu-entry): New macros.
* gnu/build/bootloader.scm (install-efi-loader): Delete procedure.
(install-efi): Rewrite to support installation of any efi bootloader.
* gnu/build/image.scm (initialize-efi32-partition): Deprecate.
(initialize-efi-partitition): Only create EFI directory.
* gnu/image.scm (partition)[target]: New field in order to support
dynamic provision of image partitions as bootloader targets.
* gnu/system/image.scm (root-partition, esp-partition): Use target
field.
* gnu/system/image.scm (esp32-partition, efi32-disk-partition,
efi32-raw-image-type): Deprecate.
* doc/guix.texi (Creating System Images)[image Reference]<partition
Reference>: Add target field.
[Instantiate an Image]: Update examples and update formatting.
<efi32-disk-image, efi32-raw-image-type>: Delete.
<pinebook-pro-image-type, rock64-image-type>: Reword slightly.
Change-Id: I3654d160f7306bb45a78b82ea6b249ff4281f739
* gnu/bootloader.scm (menu-entry-device-subvol): Add and export field.
(normalize-file): Add procedure.
(device->sexp): Match device-subvol and include in S-expression.
(sexp->menu-entry): Try match device-subvol and include in menu-entry.
* gnu/system/boot.scm (boot-parameters->menu-entry): Add device-subvol
value to menu-entry.
Change-Id: I3654d160f7306bb45a78b82ea6b249ff4281f739
* gnu/system/boot.scm (<boot-alternative>): New record.
(boot-alternative->menu-entry): New procedure.
* gnu/machine/ssh.scm (machine->boot-alternatives): Return a
boot-alternative encapsulating previous return value.
(deploy-managed-host): Get menu-entries from boot-alternatives.
(roll-back-managed-host): Get parameters from boot-alternatives.
* guix/scripts/system.scm (generation->boot-parameters): Rename to...
(generation->boot-alternative): ...this. Return a boot-alternative
encapsulating previous return value.
(profile->boot-alternatives): Rename uses as above.
(reinstall-bootloader, perform-action): Get menu-entries from
boot-alternatives.
Change-Id: Iaef0b0a3fa9240ca8315a9699bcf4a7bfe908e33
* guix/scripts/system.scm (profile-boot-parameters): Rename time to
epoch to fit new procedure name.
(epoch->date-string): Move to...
* gnu/system/boot.scm (epoch->date-string): ...here.
* gnu/machine/ssh.scm (machine-boot-parameters): Rename time to epoch.
(machine-boot-parameters)[boot-parameters]: Use epoch->date-string.
Change-Id: I6a5f793567221f81edd7b2d8d9f0f3e801d1b113
* gnu/system/images/wsl2.scm (wsl-boot-program): Update privileged
program directory in a comment.
Change-Id: I65906cbfbcd17ff164837ad293dc4324314bfcf1
* gnu/system/privilege.scm (file-like->setuid-program): New public
procedure.
* gnu/system/setuid.scm: Re-export it for compatibility.
(file-like->setuid-program): Remove this old version.
* gnu/services/docker.scm (singularity-setuid-programs): Use it (again).
* gnu/services/desktop.scm (enlightenment-privileged-programs): Likewise.
Change-Id: I8e41144438677a15cdadb3063651dbc780715497
We expect users to use the generic STRING->FAT-UUID procedure.
This is consistent with how we already treat FAT32 vs FAT16.
It is not consistent with how we export 8 different aliases for
STRING->DCE-UUID, but I'm unconvinced that would be better.
* gnu/system/uuid.scm (%uuid-parsers, %uuid-printers):
Add the ‘exfat’ file system type.
Change-Id: Ia31482716e4395f9f10f794f49fb31c9f330a2e3
This is a followup to c9666c120b.
Fixes <https://issues.guix.gnu.org/73065>.
* gnu/system/locale.scm (glibc-supported-locales): Change XZ to ZSTD.
Change-Id: Ie3cb5d50648a0698ce5246591fb405e4eb690af5
* gnu/system/locale.scm (%default-locale-libcs): Stop checking for Hurd, since
we have the same libc now. Also add glibc-2.35 while the transition happens.
Change-Id: I1f4980d18184580f3a42a86ca244c8015df15269
Fixes a bug whereby Hurd systems would find themselves including
‘%default-privileged-programs’ in addition to ‘%setuid-programs/hurd’.
* gnu/system/hurd.scm (%hurd-default-operating-system)[privileged-programs]:
New field.
Change-Id: I5b6a55a8df7e6af697d22166e9f483f6dd816e64
* gnu/system/privilege.scm (<privileged-program>): Add a field
representing the program's POSIX capabilities.
(privileged-program-capabilities): New public procedure.
* doc/guix.texi (Privileged Programs): Document it.
* gnu/build/activation.scm (activate-privileged-programs): Take a LIBCAP
package argument providing setcap(8) to apply said capabilities.
* gnu/services.scm (privileged-program->activation-gexp): Pass said
package argument where supported. Include privileged-program-capabilities
in the compatibility hack.
* gnu/system/setuid.scm (setuid-program): Rewrite as syntax to create a
<privileged-program> record that is setuid by default.
(setuid-program?, setuid-program-program, setuid-program-setuid?)
(setuid-program-setgid?, setuid-program-user, setuid-program-group):
Alias their privileged-program equivalent.
Add a mechanism to only require mounting a subset of file-system entries
during early Shepherd initialization. Any file-system with additional Shepherd
service requirements (e.g. networking) is not required to provision
'file-systems.
* gnu/services/base.scm (file-system-shepherd-service): Splice
file-system-requirements into the Shepherd service requirement list.
(file-system-shepherd-services): Provision 'file-system only when file system
services without additional Shepherd requirements are started.
* gnu/system/file-systems.scm (file-system): Add shepherd-requirements field
to the file-system record. This field is used for adding additional Shepherd
requirements to a file-system Shepherd service.
* doc/guix.texi: Add documentation for file-system shepherd-requirements.
Change-Id: If0392db03d48e8820aa53df1df482c12ec72e1a5
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This brings the on disk size of the kernel from 164 MiB to 144 MiB, or about
12%.
* gnu/packages/linux.scm (default-extra-linux-options)
[version>=5.13]: Enable CONFIG_MODULE_COMPRESS_ZSTD, else
CONFIG_MODULE_COMPRESS_GZIP.
(make-linux-libre*) [phases] {set-environment}: Set ZSTD_CLEVEL environment
variable to 19.
[native-inputs]: Add zstd.
* gnu/build/linux-modules.scm (module-regex): Add .zst to regexp. Update doc.
(modinfo-section-contents): Extend support to Zstd compressed module.
(dot-ko): Register the 'zstd compression type.
(ensure-dot-ko, file-name->module-name, load-linux-module*)
(module-name->file-name/guess, write-module-name-database)
(write-module-alias-database, write-module-device-database): Update doc.
(module-name-lookup): Also consider zstd-compressed modules.
* gnu/installer.scm (installer-program): Add guile-zstd extension to gexp.
* gnu/system/linux-initrd.scm (flat-linux-module-directory): Likewise.
Decompress zstd-compressed modules for use in initrd.
* guix/profiles.scm (linux-module-database): Add guile-zstd extension to gexp.
Change-Id: Ide899dc5c58ea5033583b1a91a92c025fc8d901a
* gnu/system/image.scm: Switch Inversion logic, it allow we use customize
bootloader with gpt image.
Change-Id: I801327f6e826a37588b8f0f5246ca820e742f721
* gnu/system/file-systems.scm (%pseudo-file-system-types): Add "virtiofs"
to the list of pseudo file system types.
Change-Id: Ib1d99127e65f6543c592faec1c54bd0c5eae3ad7
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This reduces the default set of locales from 92 MiB to 28 MiB.
* gnu/system/locale.scm (%default-locale-definitions): Reduce to 10
locales.
Change-Id: I3c092604301d69db591957bcfd62a062c3ac5ab0
The transition from glibc 2.33 to 2.35 was done in
c919bfefd9 (one year ago), so we can
assume that the backward-compatible locales are no longer needed by
default.
This removes 92 MiB from the system closure.
* gnu/system/locale.scm (%default-locale-libcs): Remove GLIBC-2.33.
Change-Id: I85948bbe6b2d424f9f158eeafdb5543688c66c6b
Fixes a regression introduced in
8f8ec56052, whereby passing a “fake”
kernel package would no longer work.
Fixes <https://issues.guix.gnu.org/70239>.
* gnu/system/linux-initrd.scm (flat-linux-module-directory)[build-exp]:
Gracefully handle lack of “modules.builtin” file.
Reported-by: Tomas Volf <~@wolfsden.cz>
Change-Id: I3acf48123b20f0b6a3b9cc0bf22f76cec3e64361
Suggested by Zheng Junjie <zhengjunjie@iscas.ac.cn>.
* gnu/system/vm.scm (system-qemu-image/shared-store-script)[qemu-exec]:
Wrap first element in ‘with-parameters’.
Change-Id: Iab9905aaa7e80bad0372c1ee7c3ea88a89564f8f
Use #$ allow cross-compile to with support current system kernel.
e.g. linux-libre-riscv64-generic.
* gnu/system/vm.scm(system-qemu-image/shared-store-script)
(linux-image-startup-command): use #$ for kernel-arguments.
Change-Id: I9d2e7df296ce590b95cd30996b33f8ca692ac1b1
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* gnu/system/linux-initrd.scm (flat-linux-module-directory)
[build-exp]<builtin-modules,modules-to-lookup>: New variables.
<modules>: Use ‘modules-to-lookup’ to avoid looking up builtin modules.
Change-Id: I60fdae0211bb6632508b1c63582e013e78186cd1
Ordinary .guix-profile is searched already. Also this makes desktop
environments find packages installed in Guix Home.
* gnu/system/shadow.scm (%default-bash-profile): Add Home search paths.
* gnu/system/vm.scm (<virtual-machine>)[cpu-count]: New field.
(virtual-machine-compiler): Honor it.
Change-Id: I907a89365f32ac7a9981c4ae5f59cf6eb199c3cc