summaryrefslogtreecommitdiff
path: root/gnu/build
AgeCommit message (Collapse)Author
2022-05-23image: Add bootable flag support.Pavel Shlyak
* 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-22marionette: Add #:address parameter to 'wait-for-tcp-port'.Ludovic Courtès
* gnu/build/marionette.scm (wait-for-tcp-port): Add #:address parameter. Honor it, and improve error reporting in the 'failure case.
2022-05-01Add (guix least-authority).Ludovic Courtès
* guix/least-authority.scm: New file. * Makefile.am (MODULES): Add it. * gnu/build/shepherd.scm (default-mounts): Make public.
2022-05-01linux-container: Add #:child-is-pid1? parameter to 'call-with-container'.Ludovic Courtès
* gnu/build/linux-container.scm (wait-child-process) (status->exit-status): New procedures. (call-with-container): Add #:child-is-pid1? parameter and honor it. [thunk*]: New variable. Pass it to 'run-container'.
2022-05-01linux-container: Ensure signal-handling asyncs get a chance to run.Ludovic Courtès
Previously we could enter the blocking 'waitpid' call and miss an opportunity to run the signal handler async. * gnu/build/linux-container.scm (call-with-container) [periodically-schedule-asyncs]: New procedure. [install-signal-handlers]: Call it.
2022-05-01linux-container: 'call-with-container' relays SIGTERM and SIGINT.Ludovic Courtès
* gnu/build/linux-container.scm (call-with-container): Add #:relayed-signals. [install-signal-handlers]: New procedure. Call it.
2022-04-12shepherd: Add #:supplementary-groups.Leo Nikkilä
To support the argument introduced in Shepherd 0.9.0 when defining container-bound services. * gnu/build/shepherd.scm (exec-command*) (make-forkexec-constructor/container): Add '#:supplementary-groups'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-04-11shepherd: 'fork+exec-command/container' always returns a PID.Ludovic Courtès
Fixes a regression introduced in 938448bf40fc77092859352d2243e2d0c236375f whereby 'fork+exec-command/container' would return #t, then used as the running value of the 'guix-daemon' service in the installer. Upon installation completion, stopping the 'guix-daemon' service would fail with wrong-type-arg because that #t would be passed to the 'stop' method in lieu of a PID. * gnu/build/shepherd.scm (fork+exec-command/container): Return a PID rather than #t.
2022-04-11shepherd: 'exec-command*' has a valid default #:directory.Ludovic Courtès
Fixes a regression introduced in 938448bf40fc77092859352d2243e2d0c236375f where 'exec-command*' could get #:directory #f, in particular when called by 'fork+exec-command/container'. * gnu/build/shepherd.scm (exec-command*): Add default value for #:directory.
2022-04-08file-systems: Invoke fsck tools with 'system*/tty'.Ludovic Courtès
This ensures those programs, if invoked by shepherd (where standard input is /dev/null), can still interact with the user if needed. * gnu/build/file-systems.scm (check-ext2-file-system) (check-bcachefs-file-system, check-btrfs-file-system): (check-fat-file-system, check-jfs-file-system): (check-f2fs-file-system, check-ntfs-file-system): (check-xfs-file-system): Use 'system*/tty' instead of 'system*'.
2022-04-08mapped-devices: Ensure 'cryptsetup open' gets a tty.Ludovic Courtès
Fixes <https://issues.guix.gnu.org/54770>. Regression introduced in 400c9ed3d779308e56038305d40cd93acb496180. 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-07secret-service: Allow cooperative scheduling when Fibers is used.Ludovic Courtès
This lets the 'childhurd' service start in the background, letting shepherd perform other tasks in the meantime, including serving clients (such as the 'herd' command). * gnu/build/secret-service.scm (with-modules): New macro. (wait-for-readable-fd): Add cooperative implementation when Fibers is in use. (secret-service-send-secrets): Define 'sleep' so that it cooperates when Fibers is in use.
2022-04-07secret-service: Abstract 'wait-for-readable-fd'.Ludovic Courtès
* gnu/build/secret-service.scm (wait-for-readable-fd): New procedure. (secret-service-send-secrets): Use it instead of 'select'.
2022-04-07shepherd: Adjust 'fork+exec-command/container' for the Shepherd 0.9.Ludovic Courtès
* gnu/build/shepherd.scm (exec-command*): New procedure, with code formerly... (make-forkexec-constructor/container): ... here. Use it. (fork+exec-command/container): Use 'fork+exec-command' only when CONTAINER-SUPPORT? is false or PID is the current process.
2022-03-01initrd: Honor rootfstype and rootflags command-line parameters.Maxim Cournoyer
* gnu/build/linux-boot.scm (boot-system): Honor rootfstype and rootflags arguments. Update doc. Error out in case there is insufficient information with regard to the root file system. Restore the behavior of inferring the root device from the root file system from the operating system in case the root argument is not provided. * doc/guix.texi (Initial RAM Disk): Document the new command-line parameters.
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-02-17build: linux-boot: Expound docstring of the 'boot-system' procedure.Maxim Cournoyer
* gnu/build/linux-boot.scm (boot-system): Document the Linux command-line parameters it understands and split a long string over two lines.
2022-02-07build: image: Account for fixed-size file system structures.Tobias Geerinckx-Rice
Workaround for <https://issues.guix.gnu.org/53194>. * gnu/build/image.scm (estimate-partition-size): Enforce a 1-MiB minimum. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2022-01-05linux-container: Handle CLONE_NEWCGROUP and use it by default.Ryan Sundberg
Adds low-level support for launching Linux containers with cgroup namespaces. * gnu/build/linux-container.scm (%namespaces): Add 'cgroup. (namespaces->bit-mask): Handle it. * guix/build/syscalls.scm (CLONE_NEWCGROUP): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
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-23Remove VM generation dead-code.Mathieu Othacehe
This code duplicates the (gnu system image) and (gnu build image) code. Using VM for image generation is not needed, not portable and really slow. Remove all the VM image generation code to make sure that only the image API is used. * gnu/build/vm.scm: Remove it. Move the qemu-command procedure to ... * gnu/build/marionette.scm: ... here. * gnu/local.mk (GNU_SYSTEM_MODULES): Adapt it. * tests/modules.scm: Ditto. * gnu/tests/install.scm: Ditto. * gnu/system/vm.scm: Adapt it and remove expression->derivation-in-linux-vm, qemu-img, system-qemu-image/shared-store and system-docker-image procedures. * doc/guix.texi (G-Expressions): Adapt it.
2021-12-23build: image: Add optional closure copy support.Mathieu Othacehe
* gnu/build/image.scm (initialize-root-partition): Add a closure-copy? argument and honor it.
2021-12-23chromium-extension: Avoid another usage of the store-mapped /tmp.Marius Bakke
* gnu/build/chromium-extension.scm (make-crx): Use a Chromium profile relative to the build directory instead of /tmp. While here, remove obsolete comment.
2021-12-16chromium-extension: Build .crx files in a deterministic fashion.Marius Bakke
* gnu/build/chromium-extension.scm (make-crx): Pass #:keep-mtime? #t to COPY-RECURSIVELY. Remove defunct FAKETIME workaround. While at it, pack the extension in the scratch working directory instead of the transient store-mapped /tmp.
2021-12-16chromium-extension: Avoid usage of gcrypt at evaluation time.Marius Bakke
* gnu/build/chromium-extension.scm (make-signing-key): Wrap builder in with-extensions, and compute the seed checksum at build time.
2021-12-16chromium-extension: Reduce imported-modules scope.Marius Bakke
* gnu/build/chromium-extension.scm (make-crx): Delay with-imported-modules until the builder code. (crx->chromium-json): Remove needless define* while at it.
2021-12-16chromium-extension: Simplify builder code.Marius Bakke
* gnu/build/chromium-extension.scm (chromium-json->profile-object): Remove variable. (file-sha256): New variable. (make-chromium-extension): Rename OUTPUT parameter to prevent conflict. Adjust other variable names for clarity. [inputs]: Clear. [arguments]: Inline and simplify the final transformation with a gexp.
2021-12-16linux-modules: Ignore EINVAL in ‘modprobe’ mode.Tobias Geerinckx-Rice via Guix-patches via
Loading the framebuffer-coreboot module simply fails with EINVAL on a non-Corebooted system. Crashing the system with a kernel panic is not a reasonable reaction to loading valid modules on unsupported hardware. The kernel should log an error, which the user is expected to see. Bogus module names will still be fatally reported by linux-modules.drv. * gnu/build/linux-modules.scm (load-linux-module*): Ignore EINVAL errors when operating recursively.
2021-12-13Merge branch 'master' into core-updates-frozenLudovic Courtès
2021-12-12services: static-networking: Change interface to mimic netlink.Ludovic Courtès
* gnu/services/base.scm (<static-networking>)[interface, ip, netmask] [gateway]: Remove. [addresses, links, routes]: New fields. [requirement]: Default to '(udev). (<network-address>, <network-link>, <network-route>): New record types. (ensure-no-separate-netmask, %ensure-no-separate-netmask): Remove. (ipv6-address?, cidr->netmask, ip+netmask->cidr) (network-set-up/hurd, network-tear-down/hurd) (network-set-up/linux, network-tear-down/linux) (static-networking->hurd-pfinet-options): New procedures. (static-networking-shepherd-service): New procedure. (static-networking-shepherd-services): Rewrite in terms of the above. (static-networking-service): Deprecate. Adjust to new 'static-networking' API. (%base-services): Likewise. * gnu/system/install.scm (%installation-services): Likewise. * gnu/system/hurd.scm (%base-services/hurd): Likewise, and separate 'loopback' from 'networking'. * gnu/build/hurd-boot.scm (set-hurd-device-translators): Remove "servers/socket/2". * gnu/tests/networking.scm (run-openvswitch-test)["networking has started on ovs0"]: Check for 'networking instead of 'networking-ovs0, which is no longer provided. * doc/guix.texi (Networking Setup): Document the new interface. Remove documentation of 'static-networking-service'. (Virtualization Services): Change Ganeti example to use the new interface.
2021-12-12services: secret-service: Turn into a Shepherd service.Ludovic Courtès
* gnu/services/virtualization.scm (secret-service-activation): Remove. (secret-service-shepherd-services): New procedure. (secret-service-type)[extensions]: Remove ACTIVATION-SERVICE-TYPE extension. Add SHEPHERD-ROOT-SERVICE-TYPE and USER-PROCESSES-SERVICE-TYPE extensions. * gnu/build/secret-service.scm (delete-file*): New procedure. (secret-service-receive-secrets): Use it.
2021-11-23Merge branch 'master' into core-updates-frozenLudovic Courtès
2021-11-23system: Add swap flags.Josselin Poiret
* gnu/system/file-systems.scm (swap-space)[priority, discard?]: Add them. * guix/build/syscalls.scm (SWAP_FLAG_PREFER, SWAP_FLAG_PRIO_MASK, SWAP_FLAG_PRIO_SHIFT, SWAP_FLAG_DISCARD): Add them. * gnu/build/file-systems.scm (swap-space->flags-bit-mask): Add it. * gnu/services/base.scm (swap-service-type): Use it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-11-17Merge branch 'master' into core-updates-frozenLudovic Courtès
2021-11-12build: bootloader: Add GPT support.Mathieu Othacehe
* gnu/build/bootloader.scm (install-efi-loader): Add GPT support.
2021-10-18Merge remote-tracking branch 'signed/master' into core-updatesMathieu Othacehe
2021-10-18hurd-boot: Set pfinet on the right node for AF_INET6.Ludovic Courtès
* gnu/build/hurd-boot.scm (set-hurd-device-translators): Fix /servers file name for AF_INET6.
2021-10-12Merge remote-tracking branch 'origin/master' into core-updates-frozen.Mathieu Othacehe
2021-09-28file-systems: Prefer low-memory mode of ‘btrfs check’.Tobias Geerinckx-Rice
* gnu/build/file-systems.scm (check-btrfs-file-system): Add ‘--mode lowmem’ arguments when supported. Reported by Noisytoot on #guix.
2021-09-26marionette: Print a line when a test succeeds.Ludovic Courtès
* gnu/build/marionette.scm (system-test-runner): Add call to 'test-runner-on-test-end!'.
2021-09-26marionette: 'system-test-runner' can create output directory.Ludovic Courtès
* gnu/build/marionette.scm (system-test-runner): Take optional 'log-directory' parameter. Add 'test-begin' handler and honor LOG-DIRECTORY.
2021-09-26marionette: 'system-test-runner' dumps test log upon failure.Ludovic Courtès
* gnu/build/marionette.scm (system-test-runner): In 'test-end' handler, when SUCCESS? is false, dump log content to the current error port.
2021-09-25tests: Adjust to SRFI-64 as found in Guile 3.0.7.Ludovic Courtès
In Guile 3.0.7, 'test-runner-current' is set to #f upon 'test-end'. Consequently, the previous strategy, where we'd call 'test-runner-current' after 'test-end', no longer works. Instead, set the test runner in each test right before 'test-begin'. * gnu/build/marionette.scm (system-test-runner): New procedure. * gnu/tests/audio.scm (run-mpd-test): Replace (exit (= ...)) idiom by (test-runner-current (system-test-runner)). * gnu/tests/base.scm (run-basic-test) (run-cleanup-test, run-mcron-test, run-nss-mdns-test): Likewise. * gnu/tests/ci.scm (run-laminar-test): Likewise. * gnu/tests/cups.scm (run-cups-test): Likewise. * gnu/tests/databases.scm (run-memcached-test) (run-postgresql-test, run-mysql-test): Likewise. * gnu/tests/desktop.scm (run-elogind-test): Likewise. * gnu/tests/dict.scm (run-dicod-test): Likewise. * gnu/tests/docker.scm (run-docker-test): Likewise. (run-docker-system-test): Likewise. * gnu/tests/file-sharing.scm (run-transmission-daemon-test): Likewise. * gnu/tests/ganeti.scm (run-ganeti-test): Likewise. * gnu/tests/guix.scm (run-guix-build-coordinator-test): Likewise. (run-guix-data-service-test): Likewise. * gnu/tests/ldap.scm (run-ldap-test): Likewise. * gnu/tests/linux-modules.scm (run-loadable-kernel-modules-test-base): Likewise. * gnu/tests/mail.scm (run-opensmtpd-test) (run-exim-test, run-dovecot-test, run-getmail-test): Likewise. * gnu/tests/messaging.scm (run-xmpp-test) (run-bitlbee-test, run-quassel-test): Likewise. * gnu/tests/monitoring.scm (run-prometheus-node-exporter-server-test) (run-zabbix-server-test): Likewise. * gnu/tests/networking.scm (run-inetd-test, run-openvswitch-test) (run-dhcpd-test, run-tor-test, run-iptables-test, run-ipfs-test): Likewise. * gnu/tests/nfs.scm (run-nfs-test) (run-nfs-server-test, run-nfs-root-fs-test): Likewise. * gnu/tests/package-management.scm (run-nix-test): Likewise. * gnu/tests/reconfigure.scm (run-switch-to-system-test) (run-upgrade-services-test, run-install-bootloader-test): Likewise. * gnu/tests/rsync.scm (run-rsync-test): Likewise. * gnu/tests/security-token.scm (run-pcscd-test): Likewise. * gnu/tests/singularity.scm (run-singularity-test): Likewise. * gnu/tests/ssh.scm (run-ssh-test): Likewise. * gnu/tests/telephony.scm (run-jami-test): Likewise. * gnu/tests/version-control.scm (run-cgit-test): Likewise. (run-git-http-test, run-gitolite-test, run-gitile-test): Likewise. * gnu/tests/virtualization.scm (run-libvirt-test, run-childhurd-test): Likewise. * gnu/tests/web.scm (run-webserver-test, run-php-fpm-test) (run-hpcguix-web-server-test, run-tailon-test, run-patchwork-test): Likewise.
2021-09-23file-systems: Add support for XFS.Tobias Geerinckx-Rice
* gnu/build/file-systems.scm (%xfs-endianness): New syntax. (xfs-superblock?, read-xfs-superblock, xfs-superblock-uuid) (xfs-superblock-volume-name, check-xfs-file-system): New procedures. (%partition-label-readers, %partition-uuid-readers, check-file-system): Register them. * doc/guix.texi (Keyboard Layout and Networking and Partitioning): Note XFS support.
2021-09-23file-systems: Add file system to *-SUPERBLOCK-VOLUME-NAME docstrings.Tobias Geerinckx-Rice
* gnu/build/file-systems.scm (ext2-superblock-volume-name) (bcachefs-superblock-volume-name, btrfs-superblock-volume-name) (fat32-superblock-volume-name, fat16-superblock-volume-name) (iso9660-superblock-volume-name, jfs-superblock-volume-name) (f2fs-superblock-volume-name): Mention the file system type in the docstring for consistency with the other superblock procedures.
2021-09-23syscalls: Deduplicate device number conversion.Tobias Geerinckx-Rice
* guix/cpio.scm (device-number, device->major+minor): Move to, and subsequently import from, … * guix/build/syscalls.scm (device-number, device-number->major+minor): …here. Note the slight name change. (mounts): Replace 16-bit open code with a DEVICE-NUMBER call. * gnu/build/linux-boot.scm (device-number): Remove duplicate 16-bit implementation in favour of the one above. (resume-if-hibernated): Reuse DEVICE-NUMBER->MAJOR+MINOR.
2021-09-23gnu: Don't abuse check-btrfs-file-system to scan.Tobias Geerinckx-Rice
It was never guaranteed to be run for non-root file systems. It was for root file systems only due to a bug now fixed. * gnu/build/file-systems.scm (check-btrfs-file-system): Don't invoke ‘btrfs device scan’ here. * gnu/system/linux-initrd.scm (raw-initrd): Do so here if any btrfs file systems are present.
2021-09-23linux-boot: Honour fsck.mode & fsck.repair.Tobias Geerinckx-Rice
* gnu/build/linux-boot.scm (boot-system): Honour ‘fsck.mode=’ and ‘fsck.repair=’ kernel command line options. * doc/guix.texi (Initial RAM Disk): Document both.
2021-09-23file-systems: Support forced checks & repairs.Tobias Geerinckx-Rice
* gnu/build/file-systems.scm (check-ext2-file-system) (check-bcachefs-file-system, check-btrfs-file-system) (check-fat-file-system, check-jfs-file-system, check-f2fs-file-system) (check-ntfs-file-system, check-file-system): Take and honour new FORCE? and REPAIR arguments. Update the docstring. Adjust all callers. * gnu/system/file-systems.scm <file-system>: Add new SKIP-CHECK-IF-CLEAN? and REPAIR fields. (file-system->spec, spec->file-system): Adjust accordingly. * gnu/build/linux-boot.scm (mount-root-file-system): Take new SKIP-CHECK-IF-CLEAN? and REPAIR keyword arguments. Thread them through to CHECK-FILE-SYSTEM. * doc/guix.texi (File Systems): Document both new <file-system> options.
2021-09-17Merge branch 'master' into core-updates-frozenMarius Bakke
Conflicts: gnu/packages/bioinformatics.scm gnu/packages/chez.scm gnu/packages/docbook.scm gnu/packages/ebook.scm gnu/packages/gnome.scm gnu/packages/linux.scm gnu/packages/networking.scm gnu/packages/python-web.scm gnu/packages/python-xyz.scm gnu/packages/tex.scm gnu/packages/version-control.scm gnu/packages/xml.scm guix/build-system/dune.scm guix/build-system/go.scm guix/build-system/linux-module.scm guix/packages.scm