Commit graph

1240 commits

Author SHA1 Message Date
Maxim Cournoyer
a7db92d9b3
Revert "Update Maxim's email address."
This reverts commit d0d87a744d. Oops! This
caused a world rebuild.

Change-Id: I25fff644b2b61d0ee93d69b457b04c72b5b74d15
2025-09-18 12:07:31 +09:00
Maxim Cournoyer
d0d87a744d
Update Maxim's email address.
The change was automated via:

  git grep -l maxim.cournoyer@gmail.com |
    xargs sed -i 's/maxim.cournoyer@gmail.com/maxim@guixotic.coop/g'

* .mailmap: New entry.

Change-Id: Iaa88b1e51c94159c49138fb43910badb990eb169
2025-09-18 08:05:19 +09:00
Ludovic Courtès
b71c347e3c
file-systems: Use ‘no-suid’ and ’no-dev’ for /tmp in the live system.
* gnu/system/file-systems.scm (%base-live-file-systems): Add ‘flags’.

Change-Id: I873d9cddd4d7c495d7e2daad0d8528c085a96841
2025-09-17 11:55:14 +02:00
Ludovic Courtès
d72eef9c91
services: cuirass: Add more configuration fields.
* gnu/services/cuirass.scm (<cuirass-configuration>)[parallel-evaluations]
[evaluation-ttl, web-threads]: New fields.
(cuirass-shepherd-service): Honor them.
* doc/guix.texi (Continuous Integration): Document them.

Change-Id: I33485b978d2a37ee93230b1d425731e6cb3b80e4
2025-09-05 17:25:39 +02:00
Yelninei
4b03c71022
system: image: hurd: Fix typo.
* gnu/system/images/hurd.scm: Fix typo in exported variable.

Change-Id: I4f7ef293978953aa494c3db4cf66a1f5f89037b4
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-08-30 23:52:09 +02:00
Maxim Cournoyer
af9e540b71
gnu: nss-certs: Relocate to (gnu packages nss).
This is made so that the source can be shared without introducing module
circular dependencies.

* gnu/packages/certs.scm (nss-certs)
(nss-certs-for-test): Move to...
* gnu/packages/nss.scm: ... here.

Adjust the module imports via:

  git grep -l '(gnu packages certs)' |
  xargs sed 's/(gnu packages certs)/(gnu packages nss)/' -i

Change-Id: I56d7bc52ddcdffbced8a162e8db8ea5071b0cb0f
2025-08-17 22:34:42 +02:00
Gabriel Wicki
aea73f5b74
gnu: system: Replace deprecated dhcp client service.
* gnu/system/examples/asus-c201.tmpl,
  gnu/system/examples/bare-bones.tmpl,
  gnu/system/examples/beaglebone-black.tmpl,
  gnu/system/examples/raspberry-pi-64-nfs-root.tmpl,
  gnu/system/examples/raspberry-pi-64.tmpl,
  gnu/system/examples/vm-image.tmpl
  gnu/system/images/orangepi-r1-plus-lts-rk3328.scm,
  gnu/system/images/pine64.scm,
  gnu/system/images/rock64.scm,
  gnu/system/images/unmatched.scm,
  gnu/system/images/visionfive2.scm,
  gnu/system/linux-container.scm (services): Replace
dhcp-client-service-type with its replacement dhcpcd-service-type.

Change-Id: Ib1f31d0a95dfa8ee64cf8c10d617ee53c8637b26
2025-07-24 18:46:06 +02:00
Janneke Nieuwenhuizen
db4223a32b
system: examples: devel-hurd64: Fix typo.
Suggested by yelninei via IRC.

* gnu/system/examples/devel-hurd.tmpl: Fix typo in comment.

Change-Id: I4256f530bda30a8792c7dcce3f3bf21780dce6ca
2025-07-18 21:03:52 +02:00
Ludovic Courtès
55a36c48cf
locale: Upgrade ‘%default-locale-libcs’.
This matches the libc users will usually be upgrading from.

* gnu/system/locale.scm (%default-locale-libcs): Replace ‘glibc-2.35’
with ‘glibc-2.39’.

Change-Id: I21c291054cd0948ced2f17e951e97f6db7116688
2025-07-18 20:17:51 +02:00
Ludovic Courtès
14c8728f0d
mapped-devices: luks: Adjust to support extra arguments.
Fixes <https://issues.guix.gnu.org/70826>.

When using ‘luks-device-mapping-with-options’, procedures such as
‘operating-system-boot-mapped-devices’ would fail to identify LUKS
mapped devices because they would check whether the mapped device type
is ‘eq?’ to ‘luks-device-mapping’.

This addresses that by ensuring mapped devices are always of the
‘luks-device-mapping’ type, even when different options are used.

* gnu/system/mapped-devices.scm (close-luks-device): Add #:rest.
(luks-device-mapping-with-options): Deprecate.
* gnu/tests/install.scm (%encrypted-home-os-key-file): Update
accordingly.
* doc/guix.texi (Mapped Devices): Document use of the ‘arguments’ field
of ‘luks-device-mapping’.  Remove ‘luks-device-mapping-with-options’
documentation.
(Bootloader Configuration): Update example with key file in extra
initrd.

Change-Id: I5442908cb8ef4e3891dbb053cccf5e42b895486f
Reported-by: Tadhg McDonald-Jensen <tadhgmister@gmail.com>
2025-07-18 00:57:31 +02:00
Ludovic Courtès
62bf9a7cc7
mapped-devices: Add ‘arguments’ field.
Fixes <https://issues.guix.gnu.org/70826>.

This allows users to specify extra arguments specific to the underlying
mapped device type.

* gnu/system/mapped-devices.scm (<mapped-device>)[arguments]: New field.
(device-mapping-service-type): Honor it.
* guix/scripts/system.scm (check-mapped-devices): Likewise.
* gnu/system/linux-initrd.scm (raw-initrd): Likewise.
* doc/guix.texi (Mapped Devices): Document it.

Reported-by: 45mg <45mg.writes@gmail.com>
Change-Id: Idef5a3e68535c412f13bae9a92c81c49053d4f4a
2025-07-18 00:57:25 +02:00
Janneke Nieuwenhuizen
1ef5cd24a6
system: examples: devel-hurd64: Remove new Linux-specific dependency.
* gnu/system/examples/devel-hurd.tmpl (guix-packages): Also remove
slirp4netns; it is a Linux-specific dependency that does not build for the
Hurd.

Change-Id: I5bca0f44b32d09dd4baa86a6d47d33133a4339c6
2025-07-17 21:22:10 +02:00
Hilton Chain
3ddadfc0fb
gnu: Add %dummy-linux-kernel-for-container.
* gnu/packages/linux.scm (%dummy-linux-kernel-for-container): New variable.
* gnu/system/linux-container.scm (containerized-operating-system): Use it.

Change-Id: Ica49a0cd0b8ae4a78ba5fca879ae73f94e64474a
2025-06-28 22:50:50 +08:00
Hilton Chain
d9ea94dc44
system: skeleton-directory: Create parent directory for target.
This allows specifying the following skeleton, for example:
--8<---------------cut here---------------start------------->8---
`((".config/test.txt" ,[...])
--8<---------------cut here---------------end--------------->8---

* gnu/system/shadow.scm (skeleton-directory): Create parent directory for
target.

Change-Id: I49649000bd6cdab9060f057b47a5122b17027f10
2025-06-27 00:42:15 +08:00
Yelninei
85b5c0c7c2
system: Add zstd to ‘%base-packages/hurd’.
Followup to 3f33cb0314.

* gnu/system/hurd.scm (%base-packages/hurd): Add ‘zstd’.

Change-Id: I101ae815b31b1e4f0aae6222fcf2271e8e0043b1
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-06-20 17:59:02 +02:00
Mazin AlHaddad
1a09cd1882
system: Adjust return value of bashrc.
Fixes a regression introduced in c743d646ee.

Without this, the fish shell integration is broken, and PATH does not include
~/.config/guix/current/bin.

* gnu/system/shadow.scm (%default-bashrc): Fix return value.

Change-Id: I54170caeef7ae541a4901743fcdcbfb353fa09d4
Signed-off-by: Hilton Chain <hako@ultrarare.space>
Modified-by: Hilton Chain <hako@ultrarare.space>
2025-06-12 20:17:49 +08:00
Ludovic Courtès
ed5988f0d2
linux-container: ‘containerized-operating-system’ provides ‘loopback’ service.
Fixes #420.

Previously, in systems produced by ‘guix system container’, the
‘loopback’ Shepherd service would fail to start with EEXIST, because the
“lo” interface already exists in the container.  This commit provides a
fake ‘loopback’ Shepherd service that does nothing.

* gnu/system/linux-container.scm (dummy-networking-service-type): Change
to honor its configuration value.
(containerized-operating-system)[services-to-drop]: Add
‘static-networking-service-type’ in the non-‘shared-network?’ case.
[services-to-add]: Add ‘dummy-networking-service-type’ for loopback in
the non-‘shared-network?’ case.

Reported-by: Antonio Carlos Padoan Junior <acpadoanjr@yahoo.com.br>
Change-Id: I326b5f3b5e08f67b6613c186497c44b1e887b02e
2025-06-04 17:01:23 +02:00
Ludovic Courtès
871f09b6f7
install: Adjust for (package-source guix) not being a <channel>.
Fixes guix/guix#422.

* gnu/system/install.scm (%installation-services)[guix-package-commit]:
New procedure.
<guix-configuration>: Use it instead of ‘channel-commit’.

Change-Id: I6ed5bc3f21a375e639fabfcbcdaf70b6347d1c5c
2025-06-04 16:45:08 +02:00
Maxim Cournoyer
c743d646ee
system: Factorize bashrc default configuration.
This factorizes out the remaining bashrc bits from /etc/skel/.bashrc to a the
template used for both /etc/bashrc on Guix System and ~/.bashrc for
home-bash-service-type.

Rationale: The use of /etc/skel introduce state: the file is only copied
originally when the user account is created, and never (automatically)
refreshed again.

* gnu/system.scm (operating-system-etc-service):
<profile>: Guard against souring /etc/bashrc in non-interactive, SSH case.
<bashrc>: Use %default-bashrc, having migrated the remaining definitions to...
* gnu/system/shadow.scm (%default-bashrc): ... here.  Factorize aliases to...
* gnu/services.scm (%default-bash-aliases): ... here.
(%default-bashrc-d-aliases): New variable.
(%default-etc-bashrc-d-files): Include it in the default configuration.
* gnu/services/base.scm (%base-services): Register etc-bashrc-d-service-type.
* gnu/home/services/shells.scm (add-bash-configuration): Do not set PS1, now
part of %default-bashrc.
(home-bash-configuration) [guix-defaults?]: Update doc.
[aliases]: Set %default-bash-aliases as the default value.  Update doc.
* doc/guix.texi (Shells Home Services): Update documentation.
(Service Reference): Update example.

Change-Id: I340c614983a78fd20a9c4a9705e7fc542ae9b513
2025-05-26 13:43:03 +09:00
Maxim Cournoyer
2345e87c35
gnu: bash: Define the SYS_BASHRC macro.
This causes Bash to treat /etc/bashrc as a startup file, removing the need to
source /etc/bashrc from ~/.bashrc.

* gnu/packages/bash.scm (bash-fixed): New package, with added SYS_BASHRC
define.
(bash) [replacement]: Use it.
* gnu/system/shadow.scm (%default-bashrc): Do not source /etc/bashrc, now done
implicitly.

Change-Id: I5b0afd7d81653ef19c482e5501efdf7e50ef37c0
2025-05-26 13:43:03 +09:00
Yelninei
8f852885de
system: hurd: Use the regular gnumach as default kernel.
* gnu/system/hurd.scm (%hurd-default-operating-system-kernel,
%hurd64-default-operating-system-kernel): Set to gnumach.

Change-Id: I7d5515c95e2994e2f0c4ae3a43afe4e6575a53ed
2025-05-24 09:03:37 +02:00
Ludovic Courtès
3b6e499d5e
maint: Change main repository URL to git.guix.gnu.org.
Throughout, replace “https://git.savannah.gnu.org/git/guix.git” by
“https://git.guix.gnu.org/guix.git”.

Change-Id: Ieb82464f92a806b85c79e629f952e68c39323740
2025-05-23 11:19:07 +02:00
Maxim Cournoyer
c5265b90b0
system: Add sgx group to %base-groups.
* gnu/system/shadow.scm (%base-groups): Add 'sgx' group.

Fixes: <https://issues.guix.gnu.org/70278>
Change-Id: I4f9e3c7751ac11f0c7a4283390223778511494f8
2025-05-14 22:10:44 +09:00
Ludovic Courtès
437bb9ece5
linux-container: Do not attempt to lock mounts for ‘guix system container’.
Fixes <https://issues.guix.gnu.org/78356>.

* gnu/system/linux-container.scm (container-script): Pass #:lock-mounts? #f
to ‘call-with-container’.

Reported-by: Rutherther <rutherther@ditigal.xyz>
Change-Id: Ie670868147f32baf2c2a94c9c7b1636bc84d0a0a
2025-05-12 10:40:02 +02:00
Ludovic Courtès
94c9e53fa4
install: Do not leak local checkout URL.
Fixes <https://issues.guix.gnu.org/67707>.

Previously ‘guix describe’ in the installation image would show the
URL of the local checkout that was used to build the image.  It now
shows the default URL.

* gnu/system/install.scm (%installation-services): Change channel of
‘guix’ package to inherit from ‘%default-guix-channel’.

Change-Id: If848b5a6166904e982e0f9a0780f3e3f53bdfc28
2025-05-06 00:16:33 +02:00
Ludovic Courtès
a391394a22
linux-container: Support having a read-only root file system.
Until now, the read-only file system set up by ‘call-with-container’
would always be writable.  With this change, it can be made read-only.
With this patch, only ‘least-authority-wrapper’ switches to a read-only
root file system.

* gnu/build/linux-container.scm (remount-read-only): New procedure.
(mount-file-systems): Add #:writable-root? and #:populate-file-system
and honor them.
(run-container): Likewise.
(call-with-container): Likewise.
* gnu/system/linux-container.scm (container-script): Pass #:writable-root?
to ‘call-with-container’.
(eval/container): Add #:populate-file-system and #:writable-root? and
honor them.
* guix/scripts/environment.scm (launch-environment/container):
Pass #:writable-root? to ‘call-with-container’.
* guix/scripts/home.scm (spawn-home-container): Likewise.
* tests/containers.scm ("call-with-container, mnt namespace, read-only root")
("call-with-container, mnt namespace, writable root"): New tests.

Change-Id: I603e2fd08851338b737bb16c8af3f765e2538906
2025-05-05 14:33:59 +02:00
Ludovic Courtès
d4c3b31b86
linux-container: Add #:mounts to ‘eval/container’.
* gnu/system/linux-container.scm (eval/container): Add #:mounts
parameter and honor it.

Change-Id: I1d5970f53a3d67db93e937e392f9bf36e75d1573
2025-05-05 14:33:59 +02:00
Leo Famulari
8f885a2bb3
vm: Account for an upstream change in the name of the Cirrus kernel module.
* gnu/system/vm.scm (virtualized-operating-system): Choose the module name based
on the kernel version

Change-Id: I77d70fa44a8d5d2412ae0aaa645fa67146b76432
2025-04-27 02:29:41 -04:00
Ludovic Courtès
da741d8931
services: account: Create /var/guix/profiles/per-user/$USER.
* gnu/system/shadow.scm (account-shepherd-service): Create
/var/guix/profiles/per-user/$USER in ‘user-homes’ service.

Change-Id: I22e66e8a34d63686df9bae64c68df65c8889e72a
2025-04-20 18:50:51 +02:00
Feng Shu
2934de1447
gnu: Fix guix system vm --share argument error.
* gnu/system/vm.scm (common-qemu-options): Fix guix system vm --share argument error.

Change-Id: I4182e2dbe1b54e6eec2fb6ca53f9345f6d396f14
Signed-off-by: Danny Milosavljevic <dannym@friendly-machines.com>
2025-04-10 01:30:38 +02:00
Zheng Junjie
0770929dde
images: visionfive2: Add support for booting from nvme.
* gnu/system/images/visionfive2.scm (visionfive2-barebones-os):
[initrd-modules]: Add mmc_block, clk-starfive-jh7110-aon,
clk-starfive-jh7110-stg, phy-jh7110-dphy-tx, pcie_starfive and nvme.

Change-Id: I1d7ced9bad7e94045ab1caa2315871cd56ca50f4
2025-04-08 14:58:19 +08:00
Zheng Junjie
082923279c
linux-initrd: Add mmc_block.
This module is required when booting from MMC block device.

* gnu/system/linux-initrd.scm (default-initrd-modules): Add mmc_block.

Change-Id: I91474a62e9d7b5be07e89f657fd59d37d061b127
2025-04-08 14:57:23 +08:00
Sören Tempel
7aa855b05b
mapped-devices/luks: Add support for --allow-discards.
* gnu/system/mapped-devices.scm (open-luks-device): Support opening
LUKS devices with the --allow-discards option.
* gnu/system/mapped-devices.scm (luks-device-mapping-with-options):
Pass through the allow-discards? keyword argument.
* doc/guix.texi (Mapped Devices): Update documentation for the
luks-device-mapping-with-options procedure.

Co-authored-by: Sisiutl <sisiutl@egregore.fun>
Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Change-Id: Iff82d7d548486f028d19f6aa35dd30ca194f57cc
2025-03-22 22:53:13 +09:00
Ludovic Courtès
5b4ae0b5c2
install: Use ‘shepherd-system-log-service-type’.
This is a followup to d0510dcd82, which
wrongfully assumed that this was already the case.

* gnu/system/install.scm (%installation-services): Replace
‘syslog-service-type’ by ‘shepherd-system-log-service-type’.

Change-Id: I349454b8d005c67d2c6d6b5475f74d16c9006006
2025-03-10 18:22:55 +01:00
Ludovic Courtès
5d66d005bd
vm: Export ‘file-system->mount-tag’ and ‘common-qemu-options’.
* gnu/system/vm.scm (file-system->mount-tag, common-qemu-options):
Export.

Change-Id: I7228e5c02f07f8c8633a64c86d9c81aa3cb2e8b7
2025-03-05 20:34:03 +01:00
Ludovic Courtès
9939677d15
vm: ‘common-qemu-options’ splits command-line tokens.
The result returned so far by ‘common-qemu-options’ assumed that it
would be passed to a shell.  This is the case when using
‘system-qemu-image/shared-store-script’ but possibly not in other cases.

* gnu/system/vm.scm (common-qemu-options): Add #:image-format.
[virtfs-option]: Return a list of strings instead of a single
"-virtfs xyz" string.  Update caller to use ‘append-map’.
Separate "-drive" string.

Change-Id: Ib07c27e2c4b2d222d7db2c612bb045d330bc7f68
2025-03-05 20:34:03 +01:00
Hilton Chain
2bb8ecbfbf
Revert "file-systems: %base-file-systems: Add tmpfs /run."
This reverts commit e88018be70.  Since this
change breaks current dbus-service-type, it would be better to wait
https://issues.guix.gnu.org/73494 finished.
2025-03-05 14:45:15 +08:00
Hilton Chain
e88018be70
file-systems: %base-file-systems: Add tmpfs /run.
* gnu/system/file-systems (%runtime-variable-data): New variable.
(%base-file-systems): Add it.
* doc/guix.texi (File Systems): Document it.
* gnu/services.scm (cleanup-gexp): Adjust accordingly.

Change-Id: I3a95e49d396fbb2577026aefc247cfe996c5f267
Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2025-03-05 14:23:42 +09:00
Florian Pelz
7790e32556
system: default-skeleton-home-config: Include %base-home-services.
* gnu/system/shadow.scm (%default-skeleton-home-config): Follow
the news entry’s instructions to add %base-home-services.

Fixes: <https://issues.guix.gnu.org/75897>
Change-Id: Ieef976f9375791502e6156a978a032fbd4c2324d
2025-02-25 15:45:36 +01:00
Efraim Flashner
66daf46b41
gnu: Fix some misspellings.
Change-Id: I316652aff7418af4b8e83bea24638b1513f8aa97
2025-02-19 11:21:47 +02:00
Andreas Enge
9a41ec5762
gnu: guix-configuration: Add a chroot? parameter.
The parameter should take the values #t, #f or 'default.
In a container environment, 'default amounts to #f, otherwise it
amounts to #t.

* gnu/services/base.scm (guix-configuration)<chroot?>: New field.
(guix-shepherd-service): If chroot? is #f, add "--disable-chroot".
If it is #t or 'default, do nothing.
* gnu/system/linux-container.scm (containerized-operating-system):
If chroot? is 'default, replace it by #f.
* doc/guix.texi: Document the parameter.

Change-Id: I8b9c3f46ad8650fa6ed4acee947b4ae5d002d03d
2025-02-17 14:57:55 +01:00
Maxim Cournoyer
5074871043
build: marionette: Make it possible to reboot VM during tests.
* gnu/build/marionette.scm (make-marionette): Add 'reconnect=1' socket
parameter.
* gnu/system/vm.scm (common-qemu-options): Remove '-no-reboot' option.

Change-Id: I5e100543ddddba0aea3ebe4e2f5cb8b0261c0d73
2025-02-13 00:07:21 +09:00
Maxim Cournoyer
b78794f96d
system/vm: Fix virtual-machine bug.
The virtual-machine syntax would not accept a single operating-system field,
which was puzzling.

* gnu/system/vm.scm (virtual-machine): Add a pattern matching a single literal
'operating-system' field and value.

Change-Id: If207fd71df3a3f763b2e63229eafa82f63e80773
2025-02-13 00:07:21 +09:00
Yarl Baudig
41e192c922
gnu: pinebook-pro-image-type: augment partition offset.
* gnu/system/images/pinebook-pro.scm: augment partition offset
to make room for the bootloader.

Change-Id: I91a3758243a13960165d40b94efe017e6e059a22
Signed-off-by: Danny Milosavljevic <dannym@friendly-machines.com>
2025-01-01 13:38:27 +01:00
Janneke Nieuwenhuizen
d32a5f6eed
system: examples: Fix typo in bare-hurd.tmpl.
* gnu/system/examples/bare-hurd.tmpl: Add missing line-continuation backslash.

Change-Id: Ib918cff3ca96f2a199869e876b6a75fedb09c983
2024-12-18 21:31:43 +01:00
Giacomo Leidi
3eb720bd0b
system: pam: Export pam records predicates.
* gnu/system/pam.scm: Export pam-service-name?, pam-entry? and pam-limits-entry?.

Change-Id: I609acfcaae85b4969dc385b72b307e470f5a246e
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-12-18 18:32:40 +01:00
Giacomo Leidi
a1ecd7f56c
system: Add /etc/subuid and /etc/subgid support.
This commit adds a Guix System service to handle allocation of subuid
and subgid requests.  Users that don't care can just add themselves as a
subid-range and don't need to specify anything but their user name.
Users that care about specific ranges, such as possibly LXD, can specify
a start and a count.

* doc/guix.texi (Miscellaneous Services): Document it.
* gnu/build/activation.scm (activate-subuids+subgids): New variable.
* gnu/local.mk: Add gnu/tests/shadow.scm.
* gnu/system/accounts.scm (sexp->subid-range): New variable.
* gnu/system/shadow.scm (%root-subid): New variable;
(subids-configuration): new record;
(subid-range->gexp): new variable;
(assert-valid-subids): new variable;
(delete-duplicate-ranges): new variable;
(subids-activation): new variable;
(subids-extension): new record;
(append-subid-ranges): new variable;
(subids-extension-merge): new variable;
(subids-service-type): new variable.
* gnu/tests/shadow.scm (subids): New system test.

Change-Id: I3755e1c75771220c74fe8ae5de1a7d90f2376635
Signed-off-by: Giacomo Leidi <goodoldpaul@autistici.org>
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-12-18 18:32:40 +01:00
Giacomo Leidi
337037d22c
accounts: Add /etc/subid and /etc/subgid allocation logic.
This commit adds allocation logic for subid ranges. Subid ranges are
ranges of contiguous subids that are mapped to a user in the host
system. This patch implements a flexible allocation algorithm allowing
users that do not want (or need) to specify details of the subid ranges
that they are requesting to avoid doing so, while upholding requests of
users that need to have specific ranges.

* gnu/build/accounts.scm (%subordinate-id-min): New variable;
(%subordinate-id-max): new variable;
(%subordinate-id-count): new variable;
(subordinate-id?): new variable;
(&subordinate-id-error): new variable;
(&subordinate-id-overflow-error): new variable;
(&illegal-subid-range-error): new variable;
(&specific-subid-range-expected-error): new variable;
(&generic-subid-range-expected-error): new variable;
(within-interval?): new variable;
(allocate-unused-range): new variable;
(allocate-generic-range): new variable;
(allocate-specific-range): new variable;
(reserve-subids): new variable;
(range->entry): new variable;
(entry->range): new variable;
(allocate-subids): new variable;
(subuid+subgid-databases): new variable.

* gnu/system/accounts.scm (subid-range-end): New variable;
(subid-range-has-start?): new variable;
(subid-range-less): new variable.

* test/accounts.scm: Test them.

Change-Id: I8de1fd7cfe508b9c76408064d6f498471da0752d
Co-Authored-By: Ludovic Courtès <ludo@gnu.org>
Signed-off-by: Giacomo Leidi <goodoldpaul@autistici.org>
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-12-18 18:32:40 +01:00
Giacomo Leidi
58f430f69e
accounts: Add /etc/subuid and /etc/subgid support.
This commit adds a new record type, <subid-entry> and serializers
and deserializers for it in (gnu build accounts).  Each instance of this
record represents one line in either /etc/subuid or /etc/subgid.  Since
Shadow uses the same representation for both files, it should be ok if
we do it as well.

This commit adds also <subid-range>, a user facing representation of
<subid-entry>. It is supposed to be usable directly in OS configurations.

* gnu/build/accounts.scm (subid-entry): New record;
(write-subgid): add serializer for subgids;
(write-subuid): add serializer for subuids;
(read-subgid): add serializer for subgids;
(read-subuid): add serializer for subuids.
* gnu/system/accounts.scm (subid-range): New record.
* test/accounts.scm: Test them.

Change-Id: I6b037e40e354c069bf556412bb5b626bd3ea1b2c
Signed-off-by: Giacomo Leidi <goodoldpaul@autistici.org>
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-12-18 18:32:40 +01:00
Janneke Nieuwenhuizen
7c1199828b
system: examples: Update instructions in {bare,devel}-hurd64.tmpl.
* gnu/system/examples/bare-hurd64.tmpl: Remove --machine q35, there seems to
be no longer any need for this.  Mention that there is no login prompt.
* gnu/system/examples/devel-hurd64.tmpl: Likewise.

Change-Id: Ib918cff3ca96f2a199869e876b6a75fedb09c983
2024-12-18 17:00:13 +01:00