Commit graph

1194 commits

Author SHA1 Message Date
Herman Rimm
3bb77e73e1
gnu: Merge uuid and label into device.
Change-Id: If035bf0b1ee01bc93f638d04ed19df500ef4bc04
2024-10-08 10:36:41 -04:00
Herman Rimm
5b7b514e4d
gnu: build: file-systems: Add find-uuid procedure.
* gnu/build/file-systems.scm (block-devices, uuids, find-uuid): Add
procedures.
* gnu/system/uuid.scm (file-system->uuid-type): Add procedure.

Change-Id: I8b4f3ad9fe5138d5c09ce24ded70fa53364550dc
2024-10-08 10:36:40 -04:00
Herman Rimm
92ecc0adfa
gnu: build: file-systems: Return uuid records.
* 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
2024-10-08 10:36:40 -04:00
Lilah Tascheter
40e19b3be0
gnu: system: Update examples.
* 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
2024-10-08 10:36:39 -04:00
Lilah Tascheter
e2e20d4002
gnu: tests: Update tests to new targets system.
* gnu/services/virtualization.scm
(%virtual-build-machine-operating-system): Remove bootloader.
(%hurd-vm-operating-system): Remove targets.
* gnu/system/hurd.scm (%hurd-default-operating-system): Remove targets.
* gnu/system/images/wsl2.scm (dummy-bootloader): Delete variable.
(wsl-os)[bootloader]: Don't provide field.
* gnu/system/vm.scm (virtualized-operating-system): Don't provide
bootloader.
* gnu/tests.scm (%simple-os), gnu/tests/ganeti.scm (%ganeti-os),
gnu/tests/image.scm (%simple-efi-os), gnu/tests/nfs.scm (%base-os),
gnu/tests/telephony.scm (make-jami-os), gnu/tests/vnc.scm (%xvnc-os):
Update bootloader targets.
* 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, %lvm-separate-home-os,
%encrypted-home-os, %encrypted-home-os-key-file,
%encrypted-root-not-boot-os, %btrfs-root-os-source,
%btrfs-raid-root-os-source, %btrfs-root-on-subvolume-os,
%btrfs-raid10-root-os, %jfs-root-os, %f2fs-root-os, %xfs-root-os):
Update bootloader targets.
(%btrfs-raid10-root-os): Use multiple bootloaders.

Change-Id: I3d66a839a9b2a73b8b65946950728b1e0155ca1e
2024-10-08 10:36:39 -04:00
Lilah Tascheter
d43e1a34ad
gnu: bootloader: Add Raspberry Pi bootloader.
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
2024-10-08 10:36:39 -04:00
Lilah Tascheter
e12dd189e8
gnu: bootloader: u-boot: Rewrite completely.
* gnu/bootloader/u-boot.scm (u-boot-bootloader): Delete variable.
(make-install-u-boot): Add procedure.
(define-u-bootloader): Add macro.
(u-boot-*-bootloader): Use define-u-bootloader.
(install-*u-boot): Remove variables.
* gnu/system/install.scm (os-with-u-boot): Remove procedure.
* doc/guix.texi (System Installation)[Building the Installation Image]:
Use beaglebone as the example.

Change-Id: I3654d160f7306bb45a78b82ea6b249ff4281f739
2024-10-08 10:36:39 -04:00
Herman Rimm
a95413d299
gnu: system: image: Reduce subprocedure indentation.
* gnu/system/image.scm (system-disk-image): Reduce indentation.

Change-Id: I9cf59d3a61d0c6e7e90009e62661f74f774f090a
2024-10-08 10:36:38 -04:00
Lilah Tascheter
689cca0c75
gnu: Core bootloader changes.
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
2024-10-08 10:36:38 -04:00
Lilah Tascheter
d09d96bccc
gnu: bootloader: Update bootloader-configuration targets field.
* gnu/bootloader.scm (warn-update-targets): New procedure.
(bootloader-configuration)[targets]: Use warn-update-targets sanitizer.
* gnu/installer/parted.scm (bootloader-configuration): Use new target
field format.
* gnu/system/images/hurd.scm (hurd-barebones-os)[bootloader],
gnu/system/images/novena.scm (novena-barebones-os)[bootloader],
gnu/system/images/orangepi-r1-plus-lts-rk3328.scm
(orangepi-r1-plus-lts-rk3328-barebones-os)[bootloader],
gnu/system/images/pine64.scm (pine64-barebones-os)[bootloader],
gnu/system/images/pinebook-pro.scm
(pinebook-pro-barebones-os)[bootloader],
gnu/system/images/rock64.scm (rock64-barebones-os)[bootloader],
gnu/system/images/unmatched.scm (unmatched-barebones-os)[bootloader],
gnu/system/images/visionfive2.scm
(visionfive2-barebones-os)[bootloader]: Use new target format.
* gnu/system/install.scm (installation-os)[bootloader]: Use new format.
(embedded-installation-os): Use new format and adjust description.
(beaglebone-black-installation-os, a20-olinuxino-lime-installation-os,
a20-olinuxino-lime2-emmc-installation-os,
a20-olinuxino-micro-installation-os, bananapi-m2-ultra-installation-os,
firefly-rk3399-installation-os, mx6cuboxi-installation-os,
novena-installation-os, nintendo-nes-classic-edition-installation-os,
orangepi-r1-plus-lts-rk3328-installation-os, pine64-plus-installation-os,
pinebook-installation-os, rock64-installation-os,
rockpro64-installation-os, rk3399-puma-installation-os,
wandboard-installation-os): Don't guess block device.

Change-Id: I3654d160f7306bb45a78b82ea6b249ff4281f739
2024-10-08 10:36:38 -04:00
Lilah Tascheter
79fe92ae16
gnu: bootloader: Install any bootloader to ESP.
* 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
2024-10-08 10:36:37 -04:00
Lilah Tascheter
b52e2a33f8
gnu: bootloader: Add device-subvol field to menu-entry record.
* 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
2024-10-08 10:36:37 -04:00
Lilah Tascheter
9ba07f90f2
gnu: system: Remove useless boot parameters.
* gnu/system.scm (operating-system-boot-parameters,
operating-system-boot-parameters-file): Delete bootloader-menu-entries.
* gnu/system/boot.scm (boot-parameters)[bootloader-menu-entries]: Delete
field.
(read-boot-parameters): Don't read bootloader-menu-entries.
* tests/boot-parameters.scm (%grub-boot-parameters,
test-read-boot-parameters, test-read-boot-parameters): Don't include
bootloader-menu-entries.
("read, bootloader-menu-entries, default value"): Delete test.

Change-Id: I46d9cff4604dbfcf654b0820fdb77e72aecffbb4
2024-10-08 10:36:36 -04:00
Felix Lechner
a1de2abd8e
Encapsulate <boot-parameters> to retain generation, system-path and epoch.
* 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
2024-10-08 10:36:35 -04:00
Felix Lechner
5ec2223c71
Offer a uniform decorated-boot-label and use it.
* gnu/system/boot.scm (decorated-boot-label): New procedure.
* gnu/machine/ssh.scm (machine-boot-parameters): Use
  decorated-boot-label.
* guix/scripts/system.scm
  (profile-boot-parameters)[system->boot-parameters]: Use
  decorated-boot-label.

Change-Id: Id348c3047df2353f76b1bad0eb2a3e0fa17e474c
2024-10-08 10:36:35 -04:00
Felix Lechner
42d65fe2eb
Move epoch->date-string to gnu/system/boot.scm and use it elsewhere.
* 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
2024-10-08 10:36:34 -04:00
Felix Lechner
b452d525d6
Move <boot-parameters> record to a separate file.
Required to avoid a missing dependency error on build-side.

* gnu/system.scm (<boot-parameters>): Move this record, and...
  (system-linux-image-file-name, %boot-parameters-version,
  bootable-kernel-arguments, ensure-not-/dev, read-boot-parameters,
  read-boot-parameters-file, boot-parameters->menu-entry):
  ...these procedures, to...

* gnu/system/boot.scm: ...this new file.

* gnu/machine/ssh.scm, gnu/system.scm, guix/scripts/system.scm,
  tests/boot-parameters.scm: Use new module above.

* gnu/local.mk (GNU_SYSTEM_MODULES): Add new module above.

* gnu/machine/ssh.scm (machine-boot-parameters): Don't private-import
  bootable-kernel-arguments.

Change-Id: I50cca8d2187879cd351b8e9332e1e114ca5096ae
2024-10-08 10:36:34 -04:00
Tobias Geerinckx-Rice
7eddfea4a0
images: wsl2: Update comment.
* gnu/system/images/wsl2.scm (wsl-boot-program): Update privileged
program directory in a comment.

Change-Id: I65906cbfbcd17ff164837ad293dc4324314bfcf1
2024-09-08 02:00:00 +02:00
Tobias Geerinckx-Rice
0dd8e4c351
privilege: Add file-like->setuid-program helper.
* 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
2024-09-08 02:00:00 +02:00
Tobias Geerinckx-Rice
876c343bbf
uuid: Add support for exFAT.
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
2024-09-01 02:00:00 +02:00
Ludovic Courtès
9d17cda3d9
system: locale: ‘glibc-supported-locales’ uses zstd instead of xz.
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
2024-09-09 17:17:55 +02:00
Josselin Poiret
ede5ae459b
gnu: %default-locale-libcs: Add glibc-2.35 and generalize for Hurd.
* 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
2024-08-31 10:45:04 +02:00
Ludovic Courtès
ce40b1c655
install: Set ‘privileged-programs’ rather than ‘setuid-programs’.
* gnu/system/install.scm (installation-os)[setuid-programs]: Remove.
[privileged-programs]: New field.

Change-Id: I5c93f282f5ec790f13ac076e0ab0f6d59d92d59d
2024-08-19 16:41:07 +02:00
Ludovic Courtès
b51990057c
system: hurd: Empty default ‘privileged-programs’ list.
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
2024-08-19 16:36:44 +02:00
Tobias Geerinckx-Rice
71f0676a29
privilege: Add POSIX capabilities(7) support.
* 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.
2024-08-11 02:00:00 +02:00
Tobias Geerinckx-Rice
9099f8bdcc
system: (gnu system setuid) wraps (gnu system privilege).
* 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.
2024-08-11 02:00:00 +02:00
Tobias Geerinckx-Rice
39471f2627
system: Add (gnu system privilege).
* gnu/system/privilege.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
2024-08-11 02:00:00 +02:00
Richard Sent
579df5bc80
services: base: Add optional delayed mount of file-systems
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>
2024-06-04 12:08:34 +02:00
Maxim Cournoyer
afacfa33ec
gnu: linux-libre: Enable Zstd compression of kernel modules.
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
2024-05-29 22:01:23 -04:00
Lars-Dominik Braun
ed5bf620ea
mapped-devices: lvm: Add missing module import.
Tested with (locally fixed) lvm-separate-home-os system test.

* gnu/system/mapped-devices.scm (lvm-device-mapping): Add SRFI-1 to
modules.

Change-Id: I8c155b47c29004bdc59057391dfba94ce33bdbc2
2024-05-27 19:30:22 +02:00
Zheng Junjie
327a1f0779
system: images: Add visionfive2 module.
* gnu/system/images/visionfive2.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.

Change-Id: I8831f1148bcddb0d604e1174034fca85cd2887a1
2024-05-22 11:15:30 +08:00
Zheng Junjie
e5078ff321
image: Raise error when use both grub-efi* bootloader and not gpt image.
* gnu/system/image.scm: Switch Inversion logic, it allow we use customize
bootloader with gpt image.

Change-Id: I801327f6e826a37588b8f0f5246ca820e742f721
2024-05-22 11:15:29 +08:00
Massimo Zaniboni
efbdfe1900
file-systems: Add "virtiofs" to the list of pseudo file system types.
* 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>
2024-05-13 16:31:34 +02:00
Ludovic Courtès
5f89f45e74
linux-initrd: Further strip the static Guile.
‘guile-static-initrd’ weighs in at 46 MiB, compared to 54 MiB for
‘guile-static-stripped’ (15% reduction).

* gnu/packages/make-bootstrap.scm (make-guile-static-stripped): Add
‘directories-to-remove’ parameter and honor it.
(%guile-static-initrd): New variable.
* gnu/system/linux-initrd.scm (expression->initrd): Default to
‘%guile-static-initrd’.
* doc/guix.texi (Initial RAM Disk): Adjust accordingly.

Change-Id: I2baf06fed7a3698433e7c83b1d7726054a8c746e
2024-04-29 22:52:08 +02:00
Ludovic Courtès
6228a2b8ba
locale: Shrink ‘%default-locale-definitions’ from 34 to 10 locales.
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
2024-04-29 22:52:08 +02:00
Ludovic Courtès
0575933ac2
system: Remove ‘glibc-2.33’ from ‘%default-locale-libcs’.
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
2024-04-29 22:44:06 +02:00
Maxim Cournoyer
65e8472a4b
system: Remove nss-certs from OS templates, adjust doc.
This is a follow-up to commit 86afaadb51 ("system: Add 'nss-certs' to
%base-packages-networking.")

* doc/guix-cookbook.texi (Running Guix on a Linode Server): Remove nss-certs
from operating system's packages field.
(Running Guix on a Kimsufi Server): Likewise.
* doc/guix.texi (Using the Configuration System): Likewise.
(X.509 Certificates): Adjust to mention nss-certs *is* part of %base-packages.
* gnu/installer/services.scm (%system-services): Remove recommendation to
install nss-certs.
* gnu/system/examples/bare-bones.tmpl (host-name): Remove obsolete comments.
* gnu/system/examples/desktop.tmpl (packages): Remove nss-certs.
* gnu/system/examples/lightweight-desktop.tmpl (packages): Likewise.
* gnu/system/examples/plasma.tmpl (packages): Likewise.
* gnu/system/examples/raspberry-pi-64-nfs-root.tmpl (packages): Likewise.
* gnu/system/examples/raspberry-pi-64.tmpl (packages): Likewise.
* gnu/system/examples/vm-image.tmpl (packages): Likewise.
* gnu/system/images/orangepi-r1-plus-lts-rk3328.scm (packages): Likewise.
* gnu/system/images/pine64.scm (packages): Likewise.
* gnu/system/install.scm (installation-os) [packages]: Likewise.

Change-Id: If09123a69b987178bcb0aab61c4570c14fc1286f
2024-04-18 10:43:06 -04:00
Ludovic Courtès
9f1ef20114
linux-initrd: Gracefully handle lack of “modules.builtin” file.
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
2024-04-17 12:13:01 +02:00
Ludovic Courtès
d33965908d
vm: Always use a native emulator in ‘guix system vm’.
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
2024-04-17 12:13:01 +02:00
Ludovic Courtès
49f82fca41
mapped-devices: luks: Specify modules needed at the top-level.
Fixes <https://issues.guix.gnu.org/70266>.

* gnu/system/mapped-devices.scm (luks-device-mapping)[modules]: New
field.
(open-luks-device): Remove non-top-level ‘use-modules’ form.
* gnu/system/linux-initrd.scm (raw-initrd): Remove modules that were
added specifically for ‘luks-device-mapping’.

Change-Id: I4253c3dd5e3cbcee41ec84fd57227abd428d1bd6
2024-04-08 00:17:57 +02:00
Ludovic Courtès
6062339156
mapped-devices: <mapped-device-type> can specify modules to import.
* gnu/system/mapped-devices.scm (<mapped-device-type>)[modules]: New
field.
(device-mapping-service-type): Honor it.
* gnu/system/linux-initrd.scm (raw-initrd): Likewise.

Change-Id: Icc702cb6f281741975e33203f87fbc1ffa9856da
2024-04-08 00:13:25 +02:00
Zheng Junjie
16c7130835
vm: If not the same local architecture, don't enable kvm.
* gnu/system/vm.scm (common-qemu-options): Add target keyword.

Change-Id: Ic9bf18cf60ac5ce623289df31ea050a22c6e604e
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-03-31 22:28:11 +02:00
Zheng Junjie
e6241de15a
vm: add arguments to use virt machine type for qemu-riscv64.
* gnu/system/vm.scm (system-qemu-image/shared-store-script): When target
riscv64, add arguments to set qemu virt machine type.

Change-Id: I974c82fdd2d5bfc01caff9e6411db38e472b5cd4
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-03-31 22:28:01 +02:00
Zheng Junjie
88a300852f
linux-initrd: don't add hid-apple module for riscv64-linux.
* gnu/system/linux-initrd.scm(default-initrd-modules): when target-riscv64,
don't add hid-apple module.

Change-Id: I633468421db0cb1ebd61e0603021fa1c79038473
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-03-31 22:27:48 +02:00
Zheng Junjie
ad9832f82e
vm: When target riscv64-linux, use u-boot-qemu-riscv64-bootloader.
* gnu/system/vm.scm (virtualized-operating-system) When target riscv64-linux,
use u-boot-qemu-riscv64-bootloader. Add system, target keyword.

Change-Id: I22d64d00670a705e4b81427e44a83d504598b536
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-03-31 22:27:02 +02:00
Zheng Junjie
a5deb90fd4
vm: use #$ for kernel-arguments.
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>
2024-03-31 22:26:27 +02:00
Hilton Chain
8f8ec56052
linux-initrd: Avoid looking up builtin modules.
* 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
2024-03-09 09:21:19 +08:00
Florian Pelz
bc6840316c
system: default-bash-profile: Add Guix Home search paths as well.
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.
2024-02-28 16:55:20 +01:00
Ludovic Courtès
9edbb2d7a4
services: Add ‘virtual-build-machine’ service.
* gnu/services/virtualization.scm (<virtual-build-machine>): New record type.
(%build-vm-ssh-port, %build-vm-secrets-port, %x86-64-intel-cpu-models):
New variables.
(qemu-cpu-model-for-date, virtual-build-machine-ssh-port)
(virtual-build-machine-secrets-port): New procedures.
(%minimal-vm-syslog-config, %virtual-build-machine-operating-system):
New variables.
(virtual-build-machine-default-image):
(virtual-build-machine-account-name)
(virtual-build-machine-accounts)
(build-vm-shepherd-services)
(initialize-build-vm-substitutes)
(build-vm-activation)
(virtual-build-machine-offloading-ssh-key)
(virtual-build-machine-activation)
(virtual-build-machine-secret-root)
(check-vm-availability)
(build-vm-guix-extension): New procedures.
(initialize-hurd-vm-substitutes): Remove.
(hurd-vm-activation): Rewrite in terms of ‘build-vm-activation’.
* gnu/system/vm.scm (linux-image-startup-command): New procedure.
(operating-system-for-image): Export.
* gnu/tests/virtualization.scm (run-command-over-ssh): New procedure,
extracted from…
(run-childhurd-test): … here.
[test]: Adjust accordingly.
(%build-vm-os): New variable.
(run-build-vm-test): New procedure.
(%test-build-vm): New variable.
* doc/guix.texi (Virtualization Services)[Virtual Build Machines]: New
section.
(Build Environment Setup): Add cross-reference.

Change-Id: I0a47652a583062314020325aedb654f11cb2499c
2024-02-10 23:21:07 +01:00
Ludovic Courtès
b0a5c0742f
vm: Add ‘cpu-count’ field to <virtual-machine>.
* gnu/system/vm.scm (<virtual-machine>)[cpu-count]: New field.
(virtual-machine-compiler): Honor it.

Change-Id: I907a89365f32ac7a9981c4ae5f59cf6eb199c3cc
2024-02-10 22:59:52 +01:00