aboutsummaryrefslogtreecommitdiff
path: root/gnu/build
Commit message (Collapse)AuthorAge
* services: Add oci-service-type.Giacomo Leidi2025-08-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements a generalization of the oci-container-service-type, which consequently is made deprecated. The oci-service-type, in addition to all the features from the oci-container-service-type, can now provision OCI networks and volumes. It only handles OCI objects creation, the user is supposed to handle state once the objects are provsioned. It currently supports two different OCI runtimes: Docker and rootless Podman. Both runtimes are tested to make sure provisioned containers can connect to each other through provisioned networks and can read/write data with provisioned volumes. At last the Scheme API is thought to facilitate the implementation of a Guix Home service in the future. * gnu/build/oci-containers.scm: New file containg OCI runtime business logic used in OCI backed Shepherd services. oci-read-lines (oci-system*,oci-object-exists?,oci-object-service-available? oci-image-load,oci-log-verbose,oci-container-execlp,oci-object-create): New procedures. * gnu/local.mk: Add it. * gnu/services/containers.scm (list-of-oci-containers?, list-of-oci-networks?,list-of-oci-volumes?,%oci-supported-runtimes, oci-runtime?,oci-runtime-system-environment,oci-runtime-system-extra-arguments, oci-runtime-system-requirement,oci-runtime-cli,oci-runtime-system-cli, oci-runtime-home-cli,oci-runtime-name,oci-runtime-group, oci-container-shepherd-name,oci-networks-shepherd-name, oci-networks-home-shepherd-name,oci-volumes-shepherd-name, oci-volumes-home-shepherd-name,oci-container-configuration->options, oci-network-configuration->options,oci-volume-configuration->options, oci-container-shepherd-service,oci-objects-merge-lst,oci-extension-merge, oci-service-accounts,oci-service-profile,oci-service-subids, oci-configuration->shepherd-services,oci-configuration-extend): New procedures. (image-reference): Implement unambiguous naming convention, that paired with the new implementation for listing caches images with docker ls or podman ls, allows for more efficient image caching. (oci-container-configuration)[user,group]: Change default-type to maybe-string, since by default containers will run under the user and group declared in oci-configuration records. When unset the oci-service-type will derive their value from the OCI runtime state. [runtime,host-environment,environment,shepherd-actions,ports,extra-arguments]: define a predicate and use it as a type in the configuration. This way errors are reported with source location information. (lower-manifest): Defer to caller the logic of setting up an image tag. (lower-oci-image): Rename to load-oci-image-state. (oci-runtime-state): Intermediate representation of the OCI runtime details. It is supposed to be an internal API. (oci-state): Intermediate representation of the OCI provisioning state, such as containers and networks. It is supposed to be an internal API. (oci-container-invocation): Intermediate representation of the OCI runtime run command to start a container. It is supposed to be an internal API. (%oci-image-loader): Rename to oci-image-loader and use oci-runtime-state and (gnu build oci-containers). (oci-container-shepherd-service): Use oci-state and oci-runtime-state, add command-line action. (oci-network-configuration,oci-volume-configuration,oci-configuration, oci-extension): New record types. (oci-service-type): New service-type. * doc/guix.texi: Document it. * gnu/tests/containers.scm: Test it. * gnu/services/docker.scm: Deprecate the oci-container-service-type. Change-Id: I656b3db85832e42d53072fcbfb91d1226f39ef38 Modified-by: Maxim Cournoyer <maxim@guixotic.coop> Signed-off-by: Maxim Cournoyer <maxim@guixotic.coop>
* linux-container: Fix typo in docstring.cdr-shdr-wdr2025-07-12
| | | | | | | | * gnu/build/linux-container.scm (mount-file-systems): Fix typo in docstring. Change-Id: I973a65a6574078bc72fd9e1aa7424a68e2b21268 Signed-off-by: Danny Milosavljevic <dannym@friendly-machines.com>
* file-systems: Support UUIDs for FAT12.Quentin Vincent2025-06-16
| | | | | | | * gnu/build/file-systems.scm (fat16-superblock?): Support FAT12. Change-Id: Ia14899134e02bda54b0796efb0bc1c6f89e95c0d Signed-off-by: Danny Milosavljevic <dannym@friendly-machines.com>
* linux-container: Lock mounts by default.Ludovic Courtès2025-05-05
| | | | | | | | | | | | | | | | | | This makes it impossible to unmount or remount things from within ‘call-with-container’. * gnu/build/linux-container.scm (initialize-user-namespace): Add #:host-uid and #:host-gid. and honor them. (run-container): Add #:lock-mounts?. Honor it by calling ‘unshare’ followed by ‘initialize-user-namespace’. (call-with-container): Add #:lock-mounts? and pass it down. (container-excursion): Get the user namespace owning the PID namespace and join it, then join the remaining namespaces. * tests/containers.scm ("call-with-container, mnt namespace, locked mounts"): New test. ("container-excursion"): Pass #:lock-mounts? #f. Change-Id: I13be982aef99e68a653d472f0e595c81cfcfa392
* linux-container: Set up “lo” and generate /etc/hosts by default.Ludovic Courtès2025-05-05
| | | | | | | | | | | | * gnu/build/linux-container.scm (run-container): Add #:loopback-network? and honor it via #:populate-file-system. (call-with-container): Add #:loopback-network? and pass it to ‘run-container’. * guix/scripts/environment.scm (launch-environment/container): Remove call to ‘set-network-interface-up’ and remove generation of /etc/hosts. * guix/scripts/home.scm (spawn-home-container): Likewise. Change-Id: I5933a4e8dc6d8e19235a79696b62299d74d1ba21
* linux-container: Support having a read-only root file system.Ludovic Courtès2025-05-05
| | | | | | | | | | | | | | | | | | | | | | | | 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
* image: Create zstd-compressed qcow2 images.Maxim Cournoyer2025-04-30
| | | | | | | | | | | This should be about twice as fast as the default zlib compressor used for qcow2, and potentially multi-thread aware given some improvements to qemu-img in the future (zstd supports its but it's not currently used by QEMU). * gnu/build/image.scm (convert-disk-image): Specify 'compression_type=zstd' option. Change-Id: Ie9c66f0c13e789ec863c95a5e549f035b6a17bf9
* image: Honor parallel job count for the number of qemu-img co-routines used.Maxim Cournoyer2025-04-30
| | | | | | | | | | This doesn't seem to change anything currently (the default is 8). Perhaps useful in the future, for example if the compressor used by qemu-img starts honoring it. * gnu/build/image.scm (convert-disk-image): Specify the '-m' option. Change-Id: Ia288c85af8a0621d61cf6b9f0d3f73f5a3026d66
* activation: Fix ‘mkdir-p/perms’ on the Hurd.Ludovic Courtès2025-04-23
| | | | | | | | | | | | | | | | | | | | | | | Fixes <https://issues.guix.gnu.org/77992>. Fixes a bug whereby ‘mkdir-p/perms’ would throw an exception on the Hurd: In gnu/build/activation.scm: 97:20 1 (mkdir-p/perms _ #("ludo" "x" 1000 998 "Ludovic…" …) …) In unknown file: 0 (open "." 7340032 #<undefined>) ERROR: In procedure open: In procedure scm_fdes_to_port: requested file mode not available on fdes This, in turn, would cause ‘user-homes’ to fail to start on the Hurd since commit da741d89310efd0530351670d9c55ec2f952ab98. * gnu/build/activation.scm (mkdir-p/perms): Add O_RDONLY to ‘open-flags’. Reported-by: Yelninei <yelninei@tutamail.com> Change-Id: I74f90599338772ba4341067215b864273aa30b3e
* build: dbus-service: Quote body argument in 'with-retries' syntax.Maxim Cournoyer2025-04-14
| | | | | | | | | Otherwise the code would be evaluated instead of shown. * gnu/build/dbus-service.scm (with-retries): Quote the body data in the error message. Change-Id: I7a06f08327bdc7df70ae56a146855bc32ad3e63e
* build: bootloader: Add riscv64 case.Zheng Junjie2025-04-08
| | | | | | * gnu/build/bootloader.scm (install-efi): Add riscv64 case. Change-Id: I1c6c7949f0057f600817f09b5f52dca0644e3d88
* linux-container: ‘unprivileged-user-namespace-supported?’ returns #f on ↵Ludovic Courtès2025-03-26
| | | | | | | | | | | | non-Linux. Previously this procedure would return #t on non-Linux systems. * gnu/build/linux-container.scm (unprivileged-user-namespace-supported?): When USERNS-FILE doesn’t exist, return (user-namespace-supported?). Reported-by: Reepca Russelstein <reepca@russelstein.xyz> Change-Id: I92050338b8b68bc3bd87100317eba69fcdf14a0a
* build: marionette: Make it possible to reboot VM during tests.Maxim Cournoyer2025-02-13
| | | | | | | | * 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
* linux-container: Ignore EPERM when attempting to mount /sys.Ludovic Courtès2025-01-27
| | | | | | | | | | | | | | | | | | | | | | | Fixes <https://issues.guix.gnu.org/61690>. Until now, this would work: guix shell --no-cwd -CWP -- guix shell -C coreutils -- ls -R /home … but this would not: $ guix shell --no-cwd -CWPN -- guix shell -C coreutils -- ls -R /home guix shell: error: mount: mount "none" on "/tmp/guix-directory.Wnc2OI/sys": Operation not permitted This is annoying and hardly understandable. Since we already disable /sys mounts when sharing the global network namespace is asked (as in ‘guix shell -CN‘), for the very same reason, we can just as well disable /sys mounts anytime it fails with EPERM. * gnu/build/linux-container.scm (mount-file-systems): Silently ignore EPERM when attempting to mount /sys. Change-Id: If85b1d703ab58a98ea9873f4f8fed71a06b7aa63
* system: Add /etc/subuid and /etc/subgid support.Giacomo Leidi2024-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* accounts: Add /etc/subid and /etc/subgid allocation logic.Giacomo Leidi2024-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* accounts: Add /etc/subuid and /etc/subgid support.Giacomo Leidi2024-12-18
| | | | | | | | | | | | | | | | | | | | | | | 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>
* hurd-boot: Support second boot.Janneke Nieuwenhuizen2024-11-11
| | | | | | | * gnu/build/hurd-boot.scm (boot-hurd-system): Check for stale shepherd socket and remove it. Be chattier about /hurd symlink replacement. Change-Id: I5e528c131ebeadb7ebc9727336a0f9301af3e68e
* bootloader: grub: Remove hardcoded partition number for the Hurd.Janneke Nieuwenhuizen2024-11-11
| | | | | | | | | | | | | | | | This supports using another than the default DISK0 PART1 and using LABEL or UUID as root file-system specifier. It still defaults to DISK0 PART1 if the file-system cannot be found, i.e., lives only at the build side: A virtual machine/childhurd build. * gnu/build/file-systems.scm (%hurd-device-spec-regexp, %device-spec-regexp): New variables. (device-name->hurd-device-name, hurd-device-name->device-name, device-spec->device, device-spec->device-name): Use them in new procedures. * gnu/bootloader/grub.scm (make-grub-configuration): Use them to remove hardcoded partition number (root-index 1). Change-Id: I49fa93dacc09883dfb4d695402c5eac2e0e17286
* activation: Create directory with specified perms in ‘mkdir-p/perms’.Reepca Russelstein2024-11-03
| | | | | | | | | | | | | | | | | | | There is currently a window of time between when the desired directory is created and when its permissions are changed. During this time, its permissions are restricted only by the umask. Of course, in the "directory already exists" case, this doesn't matter, but if the directory has been specifically deleted ahead of time so that it is created afresh, this is an unnecessary window. We can avoid this by passing the caller-provided BITS to 'mkdirat' when attempting to create the last directory. * gnu/build/activation.scm (mkdir-p/perms): Create target directory with BITS permissions. Change-Id: I03d2c620872e86b6f591abe0f1c8317aa1245383 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* hurd-boot: Support system init: Create essential device nodes.Janneke Nieuwenhuizen2024-10-15
| | | | | | | | * gnu/build/hurd-boot.scm (make-hurd-device-nodes): Cater for existing directories (dev, servers). (set-hurd-device-translators): Remove /servers/socket/1, that is created by libexec/console-run. Cater for nonexistent /dev/console. (boot-hurd-system): Call make-hurd-device-nodes on initial run.
* image: Add support for btrfs.Roman Scherer2024-10-14
| | | | | | | | * gnu/build/image.scm (make-btrfs-image): New variable. * gnu/system/image.scm (system-disk-image): Support btrfs. Change-Id: I80a5b52ec478ce5927d6208e324cbb70282c647a Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* image: Use file system options in make-vfat-image.Roman Scherer2024-10-14
| | | | | | | * gnu/build/image.scm (make-vfat-image): Use file system options. Change-Id: I791aadd2803d1ef96fc79cf8910a74a0083d2b6e Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* file-systems: Add support for exFAT.Tobias Geerinckx-Rice2024-09-01
| | | | | | | | | | | | * gnu/build/file-systems.scm (%exfat-endianness): New syntax. (exfat-superblock?, exfat-bytes-per-sector-shift) (exfat-sectors-per-cluster-shift, exfat-root-directory-offset) (exfat-cluster-size, read-exfat-superblock+root-directory-cluster) (read-exfat-superblock, exfat-superblock-volume-name) (exfat-superblock-uuid, check-exfat-file-system): New procedures. (%partition-label-readers, %partition-uuid-readers): Register them. Change-Id: I08bd3147d2d67e5766c9381ae2159bc01530b814
* activation: Fix TOCTTOU in mkdir-p/perms.Maxime Devos2024-09-06
| | | | | | | | | | | | | Fixes <https://issues.guix.gnu.org/47584>. I removed the 'Based upon mkdir-p from (guix build utils)' comment because it's quite a bit different now. * gnu/build/activation.scm (verify-not-symbolic): Delete. (mkdir-p/perms): Rewrite in terms of 'openat'. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Change-Id: Id2f5bcbb903283afd45f6109190210d02eb383c7
* gnu: image: Reformat comments.Tobias Geerinckx-Rice2024-08-31
| | | | | | I wrote these to fit on their lines, so the pointless widows bug me. * gnu/build/image.scm (make-iso9660-image): M-q comments.
* privilege: Add POSIX capabilities(7) support.Tobias Geerinckx-Rice2024-08-11
| | | | | | | | | | | | * 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.
* build: Rename activate-setuid-programs.Tobias Geerinckx-Rice2024-08-11
| | | | | | | * gnu/build/activation.scm (activate-setuid-programs): Rename this… (activate-privileged-programs): …to this. Operate on a list of <privileged-program> records. * gnu/services.scm (setuid-program->activation-gexp): Adjust caller.
* services: setuid-program: Populate /run/privileged/bin.Tobias Geerinckx-Rice2024-08-11
| | | | | | | | | | | | | | Create /run/setuid-programs compatibility symlinks so that we can migrate all users (both package and human) piecemeal at our leisure. Apart from being symlinks, this should be a user-invisible change. * gnu/build/activation.scm (%privileged-program-directory): New variable. [activate-setuid-programs]: Put privileged copies in %PRIVILEGED-PROGRAM-DIRECTORY, with compatibility symlinks to each in %SETUID-DIRECTORY. * gnu/services.scm (setuid-program-service-type): Update docstring. * doc/guix.texi (Setuid Programs): Update @file{} name accordingly.
* file-systems: Allow specifying CIFS credentials in a file.vicvbcun2024-07-26
| | | | | | | | | | | | | As files in the store and /etc/fstab are world readable, specifying the password in the file-system record is suboptimal. To mitigate this, `mount.cifs' supports reading `username', `password' and `domain' options from a file named by the `credentials' or `cred' option. * gnu/build/file-systems.scm (mount-file-system): Read mount options from the file specified via the `credentials' or `cred' option if specified. Change-Id: I786c5da373fc26d45fe7a876c56a8c4854d18532 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* file-systems: Skip checking the cifs file-system type.Richard Sent2024-07-20
| | | | | | | * gnu/build/file-systems.scm (check-file-system)[check-procedure]: Add cifs. Change-Id: I891b18f03884ed45e92ac32556fe04b3087e20dd Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* file-systems: Add support for mounting CIFS file systemsRichard Sent2024-06-04
| | | | | | | | | | | | * gnu/build/file-systems (canonicalize-device-name): Do not attempt to resolve CIFS formatted device specifications. (mount-file-systems): Add mount-cifs nested function. * gnu/machine/ssh.scm (machine-check-file-system-availability): Skip checking for CIFS availability, similar to NFS. * guix/scripts/system.scm (check-file-system-availability): Likewise. Change-Id: I182e290eba64bbe5d1332815eb93bb68c01e0c3c Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* file-systems: Add host-to-ip nested functionRichard Sent2024-06-04
| | | | | | | | * gnu/build/file-systems (mount-file-system): Split out getaddrinfo logic into a dedicated function, (host-to-ip) Change-Id: I522d70a10651ca79533a4fc60b96b884243a3526 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* gnu: linux-libre: Enable Zstd compression of kernel modules.Maxim Cournoyer2024-05-29
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* linux-modules: Ignore nonexistent module files on boot.Hilton Chain2024-03-27
| | | | | | | | | | | This is a follow-up to 8f8ec56052766aa5105d672b77ad9eaca5c1ab3c, which only covers building initrd, while the booting code still tries to load nonexistent files for builtin modules. * gnu/build/linux-modules.scm (load-linux-modules-from-directory): Ignore nonexistent module files. Change-Id: I09ef207e82397e915e671c8464b92bcf90f03dcf
* services: activation: Ensure /run existence.Nicolas Graves2024-02-19
| | | | | | | | | * gnu/build/activation.scm (activation-script): Ensure /var/run existence. * gnu/build/install.scm (evaluate-populate-directive) [directives]: Remove directory /run. Change-Id: I19ca8e7605c0cff598ab89077a94e20390ba27b0 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* services: activation: Ensure /var/run existence.Nicolas Graves2024-02-19
| | | | | | | | | * gnu/services.scm (activation-script): Ensure /var/run existence. * gnu/build/install.scm (evaluate-populate-directive) [directives]: Remove directory /var/run. Change-Id: I5fb93d33b6b1f045f1e5ba206b9b0b74b5184260 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* file-systems: Recognize “none” as a valid device spec.Nicolas Graves2024-02-19
| | | | | | | | * gnu/build/file-systems (canonicalize-device-name): Fallback to tmpfs if spec is "none". Change-Id: Ia55c715d04c7611ba8c979f23f1ad4a8ed2e75b6 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* marionette: Add #:peek? to ‘wait-for-tcp-port?’.Ludovic Courtès2024-02-10
| | | | | | | * gnu/build/marionette.scm (wait-for-tcp-port): Add #:peek? parameter and honor it. Change-Id: Ie7515a5223299390ab8af6fe5aa3cf63ba5c8078
* services: secret-service: Make the endpoint configurable.Ludovic Courtès2024-02-10
| | | | | | | | | | | | | | | | | Until now, the secret service had a hard-coded TCP endpoint on port 1004. This change lets users specify arbitrary socket addresses. * gnu/build/secret-service.scm (socket-address->string): New procedure, taken from Shepherd. (secret-service-send-secrets): Replace ‘port’ by ‘address’ and adjust accordingly. (secret-service-receive-secrets): Likewise. * gnu/services/virtualization.scm (secret-service-shepherd-services): Likewise. (secret-service-operating-system): Add optional ‘address’ parameter and honor it. Adjust ‘start’ method accordingly. Change-Id: I87a9514f1c170dca756ce76083d7182c6ebf6578
* chromium-extension: Compute json at argument evaluation time.Josselin Poiret2023-12-27
| | | | | | | | | * gnu/build/chromium-extension.scm (make-chromium-extension): Make use of the make-signing-key procedure inside the argument field, making sure that it is not evaluated at file-load time. This would otherwise try to resolve gnutls when we can't guarantee it's defined because of dependency cycles. Change-Id: Ia7b13acfbca475c2df073e9a88fc8bb9264dd968
* shepherd: Remove ‘make-forkexec-constructor/container’.Ludovic Courtès2023-12-22
| | | | | | | | | This was superseded by ‘least-authority-wrapper’. * gnu/build/shepherd.scm (read-pid-file/container) (make-forkexec-constructor/container): Remove. Change-Id: I6acccdff2609a35807608f865a4d381146113a88
* gnu: cross-toolchain: Add set-cross-path for AVR.Jean-Pierre De Jesus DIAZ2023-12-11
| | | | | | | | | | * gnu/build/cross-toolchain.scm (set-cross-path/avr): New procedure. (cross-gcc-build-phases) [string-prefix? "avr"]: Return set-cross-path/avr procedure. Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech> Change-Id: I00bd39236ac2e31fef02164a7fffc8b56a166f0d Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
* gnu: cross-gcc: Enable multilib for AVR.Jean-Pierre De Jesus DIAZ2023-12-11
| | | | | | | | | | | * gnu/build/cross-toolchain.scm (patch-multilib-shebang): New procedure. * gnu/packages/avr.scm (make-avr-gcc): Remove uneeded phases and flags for multilib. * gnu/packages/cross-base (cross-gcc-arguments) <#:configure-flags> [target-avr?]: Remove --disable-multilib and add --enable-multilib. Change-Id: Id68d803057ac898f0a670f10487b08bf0891ab0b Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
* gnu: ‘make-icecat-extension’ inherits package location.Ludovic Courtès2023-12-10
| | | | | | | | | This is an improvement for the purposes of ‘guix edit’ & co. * gnu/build/icecat-extension.scm (make-icecat-extension): Add ‘location’ field. Change-Id: I896ae6823b3fe4ea013fa74e2c536f45664d8042
* linux-boot: Don't create /root before it's used.Tobias Geerinckx-Rice2023-11-19
| | | | | | * gnu/build/linux-boot.scm (boot-system): Postpone the MKDIR of /root. Change-Id: I589316a5ddf41cada02173ed4dd5b7df09b795e8
* gnu: icecat: Support Guix packaged extensions and native manifests.Clément Lassieur2023-10-23
| | | | | | | | | | | | | | | | | | | | * gnu/build/icecat-extension.scm: New file with a MAKE-ICECAT-EXTENSION procedure that makes sure the add-on directory is a symlink, so that Icecat can normalize it into a package store path. * gnu/local.mk (dist_patch_DATA): Register it, as well as new patches. * gnu/packages/browser-extensions.scm (ublock-origin)[properties]: Store the add-on ID so that it is accessible in MAKE-ICECAT-EXTENSION. [arguments]: Use the add-on ID as root directory. (ublock-origin/icecat): New procedure. * gnu/packages/gnuzilla.scm (icecat-minimal)[arguments]: Rewrite the unused 'apply-guix-specific-patches' phase so that it applies the following two patches. [native-search-paths]: New field. * gnu/packages/patches/icecat-compare-paths.patch: New patch that compares add-on paths (which are package store paths) to detect package changes. * gnu/packages/patches/icecat-use-system-wide-dir.patch: New patch that replaces "/usr/lib/mozilla" (the system-wide directory for extensions and native manifests) with "$ICECAT_SYSTEM_DIR".
* linux-modules: Fix module dependency loading.Tobias Geerinckx-Rice2023-10-15
| | | | | | * gnu/build/linux-modules.scm (dot-ko): Make COMPRESSION optional, as expected by callers RECURSIVE-MODULE-DEPENDENCIES and LOAD-LINUX-MODULE*.
* accounts: Fix typo in comment.Ludovic Courtès2023-10-12
| | | | * gnu/build/accounts.scm (passwd->shadow): Fix typo in comment.
* accounts: Ensure ‘last-change’ field of shadow entries is never zero.Ludovic Courtès2023-10-08
| | | | | * gnu/build/accounts.scm (passwd->shadow): Add ‘max’ call so NOW is greater than or equal to 1.