summary refs log tree commit diff
path: root/gnu/system.scm
AgeCommit message (Collapse)Author
2022-07-14gnu: system: Add fusermount3 to setuid-programs.Maxim Cournoyer
Fixes <https://issues.guix.gnu.org/47716>. * gnu/system.scm (%setuid-programs): Add /bin/fusermount3 from the fuse-3 package. Reported-by: raingloom <raingloom@riseup.net>
2022-06-15system: <operating-system> compiler truly honors the 'system' argument.Ludovic Courtès
Fixes <https://issues.guix.gnu.org/55951>. * gnu/system.scm (operating-system-compiler): Parameterize '%current-system' and '%current-target-system' before calling 'operating-system-derivation'. * tests/system.scm ("lower-object, %current-system sensitivity"): New test.
2022-06-06system: Fix typo, add doc.Maxim Cournoyer
* gnu/system.scm (operating-system-kernel-arguments): Fix typo in doc. (boot-parameters->menu-entry): Add doc.
2022-05-21system: Improve warning when using LUKS mapped devices without UUIDs.Maxim Cournoyer
This corrects two problems with the previous mapped devices warning: 1. It wasn't clear how to correct the situation. 2. The output would be repeated multiple times, as many times as the procedure is called during a system reconfigure. * gnu/system.scm (operating-system-bootloader-crypto-devices): Memoize procedure. Include the mapped devices source location information in the warnings. Add a hint to help users fix the warning.
2022-04-07services: shepherd: Default to version 0.9.Ludovic Courtès
* gnu/services/shepherd.scm (scm->go): Define 'shepherd&co' and pass it to 'with-extensions'. (shepherd-configuration-file): Call 'start-in-the-background' when it is defined. (<shepherd-configuration>)[shepherd]: Default to SHEPHERD-0.9. * gnu/system.scm (hurd-default-essential-services): Use SHEPHERD-0.8.
2022-03-21system: Use 'shadow-with-man-pages' in %BASE-PACKAGES-UTILS.Ludovic Courtès
* gnu/system.scm (%base-packages-utils): Replace SHADOW with SHADOW-WITH-MAN-PAGES.
2022-03-16system: Improve 'read-boot-parameters' incompatibility diagnostic.Ludovic Courtès
Previously, when reading an incompatible "parameters" file, 'guix system' would print a warning and then crash with a wrong-type-arg backtrace because code expects 'read-boot-parameters' to always return a <boot-parameters> record. * gnu/system.scm (read-boot-parameters): Upon incompatibility, raise an error instead of returning #f. Also raise a '&fix-hint' condition. * tests/boot-parameters.scm ("read, construction, mandatory fields"): Define 'test-read-boot-parameters' as a macro; expect 'formatted-message?' exceptions rather than #f returns.
2022-03-07system: Set kernel name for riscv64-linux.Efraim Flashner
* gnu/system.scm (system-linux-image-file-name): Add option for riscv64.
2022-03-01initrd: Use non-hyphenated kernel command-line parameter names.Maxim Cournoyer
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-01system: Streamline operating-system-boot-parameters-file a bit.Maxim Cournoyer
* gnu/system.scm (operating-system-boot-parameters-file) [SYSTEM-KERNEL-ARGUMENTS?]: Remove unused argument (it had no callers) and adjust doc, moving the self-referential tip to... * gnu/system.scm (operating-system-boot-parameters): ... here, reworded for clarity. Suggested-by: Ludovic Courtès <ludo@gnu.org>
2022-03-01system: Add a version field to the <boot-parameters> record.Maxim Cournoyer
This version field exposes the (already present) version information of a boot parameters file. * gnu/system.scm (%boot-parameters-version): New variable. (<boot-parameters>)[version]: New field. (read-boot-parameters): Use it. (operating-system-boot-parameters-file): Likewise. * tests/boot-parameters.scm (test-read-boot-parameters): Use %boot-parameters-version as the default version value in the template.
2022-01-01system: Allow 'chfn' to change the user's full name.Ludovic Courtès
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.
2021-12-08system: Mark 'services' field as thunked.Ludovic Courtès
This allows us to make services dependent on (%current-system), for example. * gnu/system.scm (<operating-system>)[services]: Mark as thunked.
2021-11-23Merge branch 'master' into core-updates-frozenLudovic Courtès
2021-11-23system: Filter out boot dependencies from swap-space.Josselin Poiret
* gnu/systems.scm (swap-services): Filter them. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-11-23system: Warn about swap-devices format changeJosselin Poiret
* gnu/system.scm (warn-swap-devices-change, %warn-swap-devices-change): Add them. * gnu/system.scm (operating-system) [swap-devices]: Use it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-11-23system: Rework swap space support, add dependencies.Josselin Poiret
* 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-17gnu: system: Improve location of some configuration warnings.Josselin Poiret
* gnu/bootloader.scm (%warn-target-field-deprecation): Remove it. * gnu/bootloader.scm (warn-target-field-deprecation): Use define-with-syntax-properties. * gnu/system.scm (ensure-setuid-program-list): Ditto. Also rename the 'location' variable to 'properties'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-10-12Merge remote-tracking branch 'origin/master' into core-updates-frozen.Mathieu Othacehe
2021-10-02system: Introduce the os-release file.Mathieu Othacehe
* gnu/system.scm (os-release): New procedure. (operating-system-etc-service): Use it.
2021-10-02system: Add guix-icons to the base packages.Mathieu Othacehe
* gnu/system.scm (%base-packages-artwork): New variable. (%base-packages): Add it.
2021-09-23system: Add xfsprogs to base packages.Tobias Geerinckx-Rice
This makes them available in the Guix System installer. * gnu/system.scm (%base-packages-disk-utilities): Add xfsprogs.
2021-09-14system: Add trailing newline to /etc/timezone.Ludovic Courtès
Fixes <https://issues.guix.gnu.org/50523>. Reported by meedstrom@teknik.io. * gnu/system.scm (operating-system-etc-service): Add trailing newline to "timezone" contents.
2021-08-12system: Accept gexps in 'setuid-programs'.Ludovic Courtès
Commit a7ac19851baab3fbcc40c4b2cf5b00a6ac9cd2f3 led configs such as the following one, which were previously valid, to be rejected: (operating-system ;; ... (setuid-programs (cons #~(string-append #$wireshark "/bin/dumpcap") %setuid-programs))) They are now accepted again. Reported by wonko on #guix. * gnu/system.scm (%ensure-setuid-program-list): Handle the case where PROGRAM is not a file-like.
2021-08-12system: Handle 'setuid-programs' deprecation handling as a field sanitizer.Ludovic Courtès
Previously, evaluating an OS configuration with a childhurd (for instance) would produce tens of lines like: guix system: warning: representing setuid programs with '#<file-append #<package shadow@4.8.1 gnu/packages/admin.scm:798 7ff97f6f7640> "/bin/passwd">' is deprecated; use 'setuid-program' instead Now, it prints this one line: gnu/system/hurd.scm:105:2: warning: representing setuid programs with file-like objects is deprecated; use 'setuid-program' instead This change also means that extensions of 'setuid-program-service-type' now have to provide a list of <setuid-program>, so it's stricter in this sense. * gnu/services.scm (setuid-program-file-like-deprecated): Remove. (setuid-program-service-type)[extend]: Remove 'setuid-program-file-like-deprecated' call. Assume CONFIG and EXTENSIONS are already lists of <setuid-program> records. * gnu/system.scm (<operating-system>)[setuid-programs]: Add 'sanitize' property. Change accessor name from '%operating-system-setuid-programs' to 'operating-system-setuid-programs'. (operating-system-default-essential-services) (hurd-default-essential-services): Adjust accordingly. (ensure-setuid-program-list): New macro. (%ensure-setuid-program-list): New procedure, based on 'setuid-program-file-like-deprecated'.
2021-07-29services: Migrate to <setuid-program>.Brice Waegeneire
* gnu/services/dbus.scm (dbus-setuid-programs, polkit-setuid-programs): Return setuid-programs. * gnu/services/desktop.scm (enlightenment-setuid-programs): Return setuid-programs. (%desktop-services)[mount-setuid-helpers]: Use setuid-programs. * gnu/services/docker.scm (singularity-setuid-programs): Return setuid-programs. * gnu/services/xorg.scm(screen-locker-setuid-programs): Return setuid-programs. * gnu/system.scm (%setuid-programs): Return setuid-programs. * doc/guix.texi (Setuid Programs, operating-system Reference): Replace 'list of G-expressions' with 'list of <setuid-program>'.
2021-07-29services: setuid: More configurable setuid support.Chris Lemmer-Webber
New record <setuid-program> with fields for setting the specific user and group, as well as specifically selecting the setuid and setgid bits, for a program within the setuid-program-service. * gnu/services.scm (setuid-program-file-like-deprecated): New function. (setuid-program-service-type): Make use of setuid-program->activation-gexp. Adjust the extend property to handle <setuid-program>. * gnu/build/activation.scm (activate-setuid-programs): Update to expect a <setuid-record> list for each program entry. * gnu/system.scm: (operating-system-setuid-programs): Renamed to %operating-system-setuid-programs and replace it with new procedure. (operating-system-default-essential-services, hurd-default-essential-services): Replace operating-system-setuid-programs with %operating-system-setuid-programs. * gnu/system/setuid.scm: New file. * doc/guix.texi (Setuid Programs): Document <setuid-program>. Co-authored-by: Brice Waegeneire <brice@waegenei.re>
2021-07-09system: Provide mg instead of zile.Mathieu Othacehe
Since the update to the 2.6.2 release, the closure size of zile has increased. Switch to mg which is lighter. * gnu/system.scm (%base-packages-interactive): Replace zile by mg. * doc/guix.texi (Proceeding with the Installation, Using the Configuration System): Adapt those sections.
2021-05-11Merge branch 'version-1.3.0'Maxim Cournoyer
2021-05-11gnu: Allow services to install kernel-loadable modules.raid5atemyhomework
* gnu/system.scm (operating-system-directory-base-entries): Remove code to handle generation of "kernel" for linux-libre kernels. (operating-system-default-essential-services): Instantiate linux-builder-service-type. (package-for-kernel): Move ... * gnu/services.scm: ... to here. (linux-builder-service-type): New variable. (linux-builder-configuration): New type. (linux-loadable-module-service-type): New variable. * gnu/tests/linux-modules.scm (run-loadable-kernel-modules-test): Move code to ... (run-loadable-kernel-modules-test-base): ... new procedure here. (run-loadable-kernel-modules-service-test): New procedure. (%test-loadable-kernel-modules-service-0): New variable. (%test-loadable-kernel-modules-service-1): New variable. (%test-loadable-kernel-modules-service-2): New variable. * doc/guix.texi: Document linux-loadable-module-service-type. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2021-05-07system: Add wget to %base-packages-networking. v1.3.0rc2Maxim Cournoyer
Fixes <https://issues.guix.gnu.org/43530>. Wget is typically included with most GNU/Linux distributions. It adds about ~3 MiB to the system size. * gnu/system.scm (%base-packages-networking): Add the wget package.
2021-01-30services: shepherd: Allow custom 'shepherd' package.Maxime Devos
* gnu/services/shepherd.scm (<shepherd-configuration>): New record. (shepherd-boot-gexp, shepherd-root-service-type): Use it. (scm->go, shepherd-configuration-file): Allow passing custom shepherd package. * gnu/system.scm (operating-system-shepherd-service-names): Use the new record. * guix/scripts/system.scm (export-shepherd-graph): Adjust accordingly. * doc/guix.texi (Shepherd Services). Document it. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2021-01-22system: Fix typo in docstring.Ludovic Courtès
* gnu/system.scm (operating-system-etc-service): Fix typo.
2020-12-21system: Allow separated /boot and encrypted root.Miguel Ángel Arruga Vivas
* gnu/bootloader/grub.scm (grub-configuration-file): New parameter store-crypto-devices. [crypto-devices]: New helper function. [builder]: Use crypto-devices. * gnu/machine/ssh.scm (roll-back-managed-host): Use boot-parameters-store-crypto-devices to provide its contents to the bootloader configuration generation process. * gnu/tests/install.scm (%encrypted-root-not-boot-os, %encrypted-root-not-boot-os): New os declaration. (%encrypted-root-not-boot-installation-script): New script, whose contents were initially taken from %encrypted-root-installation-script. (%test-encrypted-root-not-boot-os): New test. * gnu/system.scm (define-module): Export operating-system-bootoader-crypto-devices and boot-parameters-store-crypto-devices. (<boot-parameters>): Add field store-crypto-devices. (read-boot-parameters): Parse store-crypto-devices field. [uuid-sexp->uuid]: New helper function extracted from device-sexp->device. (operating-system-bootloader-crypto-devices): New function. (operating-system-bootcfg): Use operating-system-bootloader-crypto-devices to provide its contents to the bootloader configuration generation process. (operating-system-boot-parameters): Add store-crypto-devices to the generated boot-parameters. (operating-system-boot-parameters-file): Likewise to the file with the serialized structure. * guix/scripts/system.scm (reinstall-bootloader): Use boot-parameters-store-crypto-devices to provide its contents to the bootloader configuration generation process. * tests/boot-parameters.scm (%default-store-crypto-devices): New variable. (%grub-boot-parameters, test-read-boot-parameters): Use %default-store-crypto-devices. (tests store-crypto-devices): New tests.
2020-11-26mapped-devices: Allow target to be list of strings.Mikhail Tsykalov
* gnu/system/mapped-devices.scm (<mapped-device>): Rename constructor to %mapped-device. [target]: Remove field. [targets]: New field. Adjust users. (mapped-device-compatibility-helper, mapped-device): New macros. (mapped-device-target): New deprecated procedure. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-11-02system: Change comment wording.Miguel Ángel Arruga Vivas
* gnu/system.scm (<boot-parameters>)<Comment>: Substitute path with file name.
2020-11-01system: Add store-directory-prefix to boot-parameters.Miguel Ángel Arruga Vivas
Fixes <http://issues.guix.gnu.org/44196> * gnu/machine/ssh.scm (roll-back-managed-host): Use boot-parameters-store-directory-prefix. * gnu/system.scm (define-module): Export boot-parameters-store-directory-prefix. (<boot-parameters>)[store-directory-prefix]: New field. It is used to generate the correct paths when /gnu/store is installed on a btrfs subvolume whose name doesn't match the final runtime path, as the bootloader doesn't have knowledge about the final mounting points. [boot-parameters-store-directory-prefix]: New accessor. (read-boot-parameters): Read directory-prefix from store field. (operating-system-boot-parameters-file): Add directory-prefix to store field. * guix/scripts/system.scm (reinstall-bootloader): Use boot-parameters-store-directory-prefix. * test/boot-parameters.scm (%default-btrfs-subvolume, %default-store-directory-prefix): New variables. (%grub-boot-parameters): Use %default-store-directory-prefix. (%default-operating-system): Use %default-btrfs-subvolume. (test-boot-parameters): Add directory-prefix. (test optional fields): Add test for directory-prefix. (test os store-directory-prefix): New test.
2020-10-18system: Provide locale information to the bootloader.Miguel Ángel Arruga Vivas
* gnu/machine/ssh.scm (roll-back-managed-host): Use locale information from boot-parameters. * gnu/system.scm (operating-system-bootcfg): Provide locale information to the bootloader. * guix/system/script.scm (reinstall-bootloader): Use locale information from boot-parameters.
2020-10-18system: Add locale to boot-parameters.Miguel Ángel Arruga Vivas
* gnu/system.scm (define-module)[export]: Add boot-parameters-locale. (<boot-parameters>)[locale]: New field. [boot-parameters-locale]: New accessor. (read-boot-parameters): Read locale field. (operating-system-boot-parameters): Provide operating-system locale to boot-parameters record. (opeating-system-boot-parameters-file): Likewise. * Makefile.am (SCM_TESTS): Add tests/boot-parameters.scm. * tests/boot-parameters.scm: New test file.
2020-10-15install: Deduplicate packages with %base-package sets.Efraim Flashner
* gnu/system.scm (%base-packages-interactive): Add nvi. * gnu/system/install.scm (installation-os)[packages]: Remove parted, gptfdisk, ddrescue, cryptsetup, mdadm, dosfstools, btrfs-progs, f2fs-tools, jfstools, openssh, wireless-tools, iw, wpa-supplicant-minimal, iproute, bash-completion, nvi. Add %base-packages-disk-utilities.
2020-10-15system: Add %base-packages-disk-utilities.Efraim Flashner
* gnu/system.scm (%base-packages-disk-utilities): New variable.
2020-10-09system: hurd: Add PAM support with shadow and sudo.Jan (janneke) Nieuwenhuizen
* gnu/system.scm (hurd-default-essential-services): Add setuid-program-service-type. * gnu/system/hurd.scm (%base-packages/hurd): Add shadow, sudo. (%setuid-programs/hurd): New variable. (%hurd-default-operating-system)[setuid-program]: Use it. [pam-services, sudoers-file]: Remove overrides; enabling regular defaults. * gnu/system/examples/bare-hurd.tmpl (%hurd-os)[users]: New field. [services]: Do not disable PAM in SSH.
2020-10-08system: Include 'guile-3.0-latest' in '%base-packages'.Ludovic Courtès
* gnu/system.scm (%base-packages-utils): Change GUILE-3.0 to GUILE-3.0-LATEST.
2020-09-07linux-boot: Handle nfs-root device strings.Stefan
* gnu/build/linux-boot.scm (device-string->file-system-device): Support nfs-root "device" strings. * gnu/build/file-systems.scm (canonicalize-device-spec): Support nfs-root "device" strings. * gnu/machine/ssh.scm (machine-check-file-system-availability): Avoid checking of NFS file systems. * gnu/system.scm (read-boot-parameters, device-sexp->device): Support nfs-root "device" strings. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2020-08-24system: Validate sudoers file when building the system.Ludovic Courtès
Suggested by pkill9 <pkill9@runbox.com>. * gnu/system.scm (validated-sudoers-file): New procedure. (operating-system-etc-service): Use it.
2020-07-29system: 'operating-system-with-provenance' uses the OS location info.Ludovic Courtès
This allows 'guix deploy' to save the config file when it's available. * gnu/system.scm (operating-system-configuration-file): New procedure. (operating-system-with-provenance): 'config-file' defaults to the value returned by 'operating-system-configuration-file'.
2020-07-25Use 'formatted-message' instead of '&message' where appropriate.Ludovic Courtès
* gnu.scm (%try-use-modules): Use 'formatted-message' instead of '&message'. * gnu/machine/digital-ocean.scm (maybe-raise-unsupported-configuration-error): Likewise. * gnu/machine/ssh.scm (machine-check-file-system-availability): Likewise. (machine-check-building-for-appropriate-system): Likewise. (deploy-managed-host): Likewise. (maybe-raise-unsupported-configuration-error): Likewise. * gnu/packages.scm (search-patch): Likewise. * gnu/services.scm (%service-with-default-value): Likewise. (files->etc-directory): Likewise. (fold-services): Likewise. * gnu/system.scm (locale-name->definition*): Likewise. * gnu/system/mapped-devices.scm (check-device-initrd-modules): Likewise. (check-luks-device): Likewise. * guix/channels.scm (latest-channel-instance): Likewise. * guix/cve.scm (json->cve-items): Likewise. * guix/git-authenticate.scm (commit-signing-key): Likewise. (commit-authorized-keys): Likewise. (authenticate-commit): Likewise. (verify-introductory-commit): Likewise. * guix/remote.scm (remote-pipe-for-gexp): Likewise. * guix/scripts/graph.scm (assert-package): Likewise. * guix/scripts/offload.scm (private-key-from-file*): Likewise. * guix/ssh.scm (authenticate-server*): Likewise. (open-ssh-session): Likewise. (remote-inferior): Likewise. * guix/ui.scm (matching-generations): Likewise. * guix/upstream.scm (package-update): Likewise. * tests/channels.scm ("latest-channel-instances, missing introduction for 'guix'"): Catch 'formatted-message?'. ("authenticate-channel, wrong first commit signer"): Likewise. * tests/lint.scm ("patches: not found"): Adjust message string. * tests/packages.scm ("patch not found yields a run-time error"): Catch 'formatted-message?'. * guix/lint.scm (check-patch-file-names): Handle 'formatted-message?'. (check-derivation): Ditto.
2020-07-25utils: Move <location> and '&error-location' to (guix diagnostics).Ludovic Courtès
* guix/utils.scm (<location>, source-properties->location) (location->source-properties, &error-location): Move to... * guix/diagnostics.scm: ... here. * gnu.scm: Adjust imports accordingly. * gnu/machine.scm: Likewise. * gnu/system.scm: Likewise. * gnu/tests.scm: Likewise. * guix/inferior.scm: Likewise. * tests/channels.scm: Likewise. * tests/packages.scm: Likewise.
2020-07-15system: 'operating-system-root-file-system' raises upon missing root.Ludovic Courtès
* gnu/system.scm (operating-system-root-file-system): Raise when 'find' returns #f.
2020-07-15system: Add 'location' field to <operating-system>.Ludovic Courtès
This allows error messages to include source location info. * gnu/system.scm (<operating-system>)[location]: New field.