aboutsummaryrefslogtreecommitdiff
path: root/gnu/build
Commit message (Collapse)AuthorAge
* system: Add swap flags.Josselin Poiret2021-11-23
| | | | | | | | | | | * 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>
* build: bootloader: Add GPT support.Mathieu Othacehe2021-11-12
| | | | * gnu/build/bootloader.scm (install-efi-loader): Add GPT support.
* hurd-boot: Set pfinet on the right node for AF_INET6.Ludovic Courtès2021-10-18
| | | | | * gnu/build/hurd-boot.scm (set-hurd-device-translators): Fix /servers file name for AF_INET6.
* file-systems: Prefer low-memory mode of ‘btrfs check’.Tobias Geerinckx-Rice2021-09-28
| | | | | | | * gnu/build/file-systems.scm (check-btrfs-file-system): Add ‘--mode lowmem’ arguments when supported. Reported by Noisytoot on #guix.
* file-systems: Add support for XFS.Tobias Geerinckx-Rice2021-09-23
| | | | | | | | | | * 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.
* file-systems: Add file system to *-SUPERBLOCK-VOLUME-NAME docstrings.Tobias Geerinckx-Rice2021-09-23
| | | | | | | | | * 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.
* syscalls: Deduplicate device number conversion.Tobias Geerinckx-Rice2021-09-23
| | | | | | | | | | | * 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.
* gnu: Don't abuse check-btrfs-file-system to scan.Tobias Geerinckx-Rice2021-09-23
| | | | | | | | | | 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.
* linux-boot: Honour fsck.mode & fsck.repair.Tobias Geerinckx-Rice2021-09-23
| | | | | | * 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.
* file-systems: Support forced checks & repairs.Tobias Geerinckx-Rice2021-09-23
| | | | | | | | | | | | | | | * 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.
* linux-boot: Remove mummified comment.Tobias Geerinckx-Rice2021-09-12
| | | | | * gnu/build/linux-boot.scm (configure-qemu-networking): Delete 2014 comment about not doing something here.
* build/jami-service: Fix range ends in account-fingerprint-rx.Maxime Devos2021-08-30
| | | | | | | | | | | | This broke compilation of Guix with guile@3.0.2 with: In procedure make-regexp: Invalid range end The fix is to replace [0-9A-f] with [0-9A-Fa-f]. * gnu/build/jami-service.scm (account-fingerprint-rx): Correct regexp. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
* Update copyright/name notices for Christine Lemmer-Webber.Christopher Lemmer Webber2021-08-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/guix-cookbook.texi: Update copyright/name for Christine Lemmer-Webber. * gnu/build/image.scm: Likewise. * gnu/build/vm.scm: Likewise. * gnu/packages/admin.scm: Likewise. * gnu/packages/assembly.scm: Likewise. * gnu/packages/audio.scm: Likewise. * gnu/packages/backup.scm: Likewise. * gnu/packages/check.scm: Likewise. * gnu/packages/databases.scm: Likewise. * gnu/packages/emacs-xyz.scm: Likewise. * gnu/packages/finance.scm: Likewise. * gnu/packages/gnupg.scm: Likewise. * gnu/packages/guile-xyz.scm: Likewise. * gnu/packages/guile.scm: Likewise. * gnu/packages/haskell-xyz.scm: Likewise. * gnu/packages/linux.scm: Likewise. * gnu/packages/mail.scm: Likewise. * gnu/packages/password-utils.scm: Likewise. * gnu/packages/perl.scm: Likewise. * gnu/packages/python-web.scm: Likewise. * gnu/packages/python-xyz.scm: Likewise. * gnu/packages/python.scm: Likewise. * gnu/packages/sphinx.scm: Likewise. * gnu/packages/ssh.scm: Likewise. * gnu/packages/xdisorg.scm: Likewise. * gnu/services/networking.scm: Likewise. * gnu/system/vm.scm: Likewise.
* Reinstate "services: Add a service for Jami."Maxim Cournoyer2021-08-02
| | | | | | | | | | | | | This reverts commit 4673f817938d9d2b1b40a072ab2e0c44a32ccc97, which reverted commit 69dcc24c9f0cdfea674eb690e7755d26a25ced2b with the fix detailed below. Thanks to Christopher Baines for reporting the failure and proposing a fix. * guix/self.scm (compiled-guix) [*system-test-modules*]: Add the test data files via the 'extra-files' argument. * gnu/local.mk (dist_patch_DATA): Move the tests/data/jami-dummy-account.dat file to... * gnu/local.mk (MODULES_NOT_COMPILED): ... here.
* Revert "services: Add a service for Jami."Maxim Cournoyer2021-08-02
| | | | | This reverts commit 69dcc24c9f0cdfea674eb690e7755d26a25ced2b. It broke 'guix pull'.
* services: Add a service for Jami.Maxim Cournoyer2021-08-02
| | | | | | | | | | | | | | | | | | | | | | * gnu/services/telephony.scm (string-or-computed-file?) (string-list?, account-fingerprint-list?): New procedures. (maybe-string-list, maybe-account-fingerprint-list) (maybe-boolean, maybe-string, jami-account-list): New configuration field types. (serialize-string-list, serialize-boolean, serialize-string) (jami-account, jami-account->alist, jami-configuration) (jami-account-list?, jami-account-list-maybe): New procedures. (%jami-accounts): New variable. (jami-configuration->command-line-arguments): New procedure. (jami-dbus-session-activation, jami-shepherd-services): New procedures. (jami-service-type): New variable. * gnu/build/jami-service.scm: New file. * gnu/tests/data/jami-dummy-account.dat: Likewise. * gnu/tests/telephony.scm: Likewise. * gnu/local.mk (GNU_SYSTEM_MODULES): Register them. * Makefile.am (SCM_TESTS): Register the test file. (dist_patch_DATA): Register the new data file. * doc/guix.texi (Telephony Services): Document it.
* build: shepherd: Use autoload to lazily bind Shepherd modules.Maxim Cournoyer2021-08-02
| | | | | | | Instead of imperative module-autoload! directives. * gnu/build/shepherd.scm: Replace module-autoload! directives by autoload arguments for define-module.
* services: setuid: More configurable setuid support.Chris Lemmer-Webber2021-07-29
| | | | | | | | | | | | | | | | | | | | | | | 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>
* gnu: Respect ‘rootdelay’ kernel command-line argument.Tobias Geerinckx-Rice2021-06-16
| | | | | * gnu/build/linux-boot.scm (boot-system): Sleep for "rootdelay=SECONDS" when specified on the kernel command line.
* gnu: Respect the root file-system's CHECK? field.Tobias Geerinckx-Rice2021-05-23
| | | | | | | | * gnu/build/linux-boot.scm (mount-root-file-system): Take a new #:CHECK? keyword argument. Add it to the docstring. Conditionally call CHECK-FILE-SYSTEM. (boot-system): Adjust its only caller to pass the <file-system>'s CHECK? option through, if available.
* file-systems: Rewrite comment.Tobias Geerinckx-Rice2021-05-04
| | | | | * gnu/build/file-systems.scm (read-bcachefs-superblock): Make comment less damned negative.
* file-systems: Handle abnormal ‘bcachefs fsck’ exits.Tobias Geerinckx-Rice2021-05-04
| | | | * gnu/build/file-systems.scm (check-bcachefs-file-system): Handle a STATUS:EXIT-VAL of #F.
* file-systems: read-partition-{uuid,label} don't swallow ENOENT & co.Ludovic Courtès2021-04-23
| | | | | | | | | Previously, (read-partition-uuid "/does/not/exist") would return #f. With this change, a 'system-error exception is raised as expected. * gnu/build/file-systems.scm (ENOENT-safe): Clarify docstring. (partition-field-reader): Remove use of 'ENOENT-safe'. (partition-predicate): Wrap READER in 'ENOENT-safe'.
* image: Fix spelling of "evaluate"Vagrant Cascadian2021-04-21
| | | | * gnu/build/image.scm: Fix typo.
* activation: Do not dereference symlinks during home directory creation.Maxime Devos2021-04-03
| | | | | | | | | | | Fixes <https://bugs.gnu.org/47584>. * gnu/build/activation.scm (copy-account-skeletons): Do not chown the home directory; leave this to 'activate-user-home'. (activate-user-home): Only chown the home directory after the account skeletons have been copied. Co-authored-by: Ludovic Courtès <ludo@gnu.org>.
* file-systems: 'mount-file-system' preserves the right mount flags.Ludovic Courtès2021-03-10
| | | | | | | | | | | | Fixes <https://bugs.gnu.org/47007>. Reported by Jelle Licht <jlicht@fsfe.org>. Since commit dcb640f02b1f9590c3bd4301a22bf31bd60c56d4, we could end up applying the wrong mount flags because the (find ...) expression could pick the "wrong" mount point in the presence of bind mounts. * gnu/build/file-systems.scm (mount-file-system): Use 'statfs' to compute FLAGS whe FS is a bind mount.
* services: Prevent following symlinks during activation.Maxime Devos2021-03-10
| | | | | | | | | | | | | | | | | | | | This addresses a potential security issue, where a compromised service could trick the activation code in changing the permissions, owner and group of arbitrary files. However, this patch is currently only a partial fix, due to a TOCTTOU (time-of-check to time-of-use) race, which can be fixed once guile has bindings to openat and friends. Fixes: <https://lists.gnu.org/archive/html/guix-devel/2021-01/msg00388.html> * gnu/build/activation.scm: new procedure 'mkdir-p/perms'. * gnu/services/authentication.scm (%nslcd-activation, nslcd-service-type): use new procedure. * gnu/services/cups.scm (%cups-activation): likewise. * gnu/services/dbus.scm (dbus-activation): likewise. * gnu/services/dns.scm (knot-activation): likewise. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* file-systems: 'mount-file-system' preserves source flags for bind mounts.Ludovic Courtès2021-02-25
| | | | | | | Fixes <https://bugs.gnu.org/46292>. * gnu/build/file-systems.scm (mount-file-system): If FS is a bind mount, add its original mount flags to FLAGS.
* activation: Do not make setuid programs setgid-root [security].Ludovic Courtès2021-02-09
| | | | | | | | Fixes <https://bugs.gnu.org/46395>. Reported by Duncan Overbruck <mail@duncano.de>. * gnu/build/activation.scm (activate-setuid-programs): Change TARGET mode to not be setgid.
* linux-boot: Fix noresume argument parsing.Tobias Geerinckx-Rice2020-12-17
| | | | | * gnu/build/linux-boot.scm (boot-system): Check for "hibernate=noresume" in addition to "noresume".
* database: Remove #:deduplicate? from 'register-items'.Ludovic Courtès2020-12-15
| | | | | | | | | | | | It is now up to the caller to deduplicate store contents. * guix/store/database.scm (register-items): Remove #:deduplicate? parameter and call to 'deduplicate'. (register-path): Call 'deduplicate' when #:deduplicate? is true. * gnu/build/image.scm (register-closure): Adjust call accordingly. * gnu/build/vm.scm (register-closure): Likewise. * guix/nar.scm (finalize-store-file): Likewise. * guix/scripts/pack.scm (store-database): Likewise.
* image: 'register-closure' leaves it up to the caller to deduplicate.Ludovic Courtès2020-12-15
| | | | | | | | * gnu/build/image.scm (register-closure): Remove #:deduplicate? parameter and pass #:deduplicate? #f to 'register-items'. (initialize-root-partition): Adjust accordingly. * gnu/build/vm.scm (register-closure, root-partition-initializer): Likewise.
* store-copy: 'populate-store' can optionally deduplicate files.Ludovic Courtès2020-12-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now deduplication was performed as an additional pass after copying files, which involve re-traversing all the files that had just been copied. * guix/store/deduplication.scm (copy-file/deduplicate): New procedure. * tests/store-deduplication.scm ("copy-file/deduplicate"): New test. * guix/build/store-copy.scm (populate-store): Add #:deduplicate? parameter and honor it. * tests/gexp.scm ("gexp->derivation, store copy"): Pass #:deduplicate? #f to 'populate-store'. * gnu/build/image.scm (initialize-root-partition): Pass #:deduplicate? to 'populate-store'. Pass #:deduplicate? #f to 'register-closure'. * gnu/build/vm.scm (root-partition-initializer): Likewise. * gnu/build/install.scm (populate-single-profile-directory): Pass #:deduplicate? #f to 'populate-store'. * gnu/build/linux-initrd.scm (build-initrd): Likewise. * guix/scripts/pack.scm (self-contained-tarball)[import-module?]: New procedure. [build]: Pass it as an argument to 'source-module-closure'. * guix/scripts/pack.scm (squashfs-image)[build]: Wrap in 'with-extensions'. * gnu/system/linux-initrd.scm (expression->initrd)[import-module?]: New procedure. [builder]: Pass it to 'source-module-closure'. * gnu/system/install.scm (cow-store-service-type)[import-module?]: New procedure. Pass it to 'source-module-closure'.
* database: Remove #:reset-timestamps? from 'register-items'.Ludovic Courtès2020-12-15
| | | | | | | | | | | | | | The assumption now is that the caller took care of resetting timestamps and permissions. * guix/store/database.scm (register-items): Remove #:reset-timestamps? parameter and the call to 'reset-timestamps'. (register-path): Adjust accordingly and add call to 'reset-timestamps'. * gnu/build/image.scm (register-closure): Remove #:reset-timestamps? parameter to 'register-items'. * gnu/build/vm.scm (register-closure): Likewise. * guix/nar.scm (finalize-store-file): Adjust accordingly. * guix/scripts/pack.scm (store-database)[build]: Likewise.
* image: 'register-closure' assumes already-reset timestamps.Ludovic Courtès2020-12-15
| | | | | | | | * gnu/build/image.scm (register-closure): Remove #:reset-timestamps? parameter. Pass #:reset-timestamps? #f to 'register-items'. (initialize-root-partition): Adjust accordingly. * gnu/build/vm.scm (register-closure, root-partition-initializer): Likewise.
* store-copy: 'populate-store' resets timestamps.Ludovic Courtès2020-12-15
| | | | | | | | | | | | | | | | Until now, 'populate-store' would reset permissions but not timestamps, so callers would resort to going through an extra directory traversal to reset timestamps. * guix/build/store-copy.scm (reset-permissions): Remove. (copy-recursively): New procedure. (populate-store): Pass #:keep-permissions? to 'copy-recursively'. Remove call to 'reset-permissions'. * tests/gexp.scm ("gexp->derivation, store copy"): In BUILD-DRV, check whether 'populate-store' canonicalizes permissions and timestamps. * gnu/build/image.scm (initialize-root-partition): Pass #:reset-timestamps? #f to 'register-closure'. * gnu/build/vm.scm (root-partition-initializer): Likewise.
* Revert "linux-container: Correct test for unprivileged user namespace support."Marius Bakke2020-12-06
| | | | | | | This broke 'guix environment --container' on non-Debian distributions. Fixes <https://bugs.gnu.org/45066>. Reported by luhux <luhux@outlook.com>. This reverts commit 8bc5ca5160db3d82bd5b6b2b7ed80c96f42bd33e.
* file-systems: Fix ‘bcachefs fsck’ exit value logic.Tobias Geerinckx-Rice2020-12-06
| | | | | | | | Bit 1 means the target device was mounted read-only whilst checking. This should never happen in an initrd context but is not an error. * gnu/build/file-systems.scm (check-bcachefs-file-system): Ignore status bits that don't signal an error. Remove the 'reboot-required case.
* linux-container: Correct test for unprivileged user namespace support.Paul Garlick2020-12-03
| | | | | | | | Fixes <https://bugs.gnu.org/31977>. Reported by Paul Garlick <pgarlick@tourbillion-technology.com>. * gnu/build/linux-container.scm (unprivileged-user-namespace-supported?): Return #f when the 'userns-file' does not exist.
* linux-initrd: Remove unnecessary timestamp reset phase.Ludovic Courtès2020-11-21
| | | | | | * gnu/build/linux-initrd.scm (write-cpio-archive): Mention timestamps in docstring. (build-initrd): Remove unnecessary timestamp reset phase.
* Add (gnu build chromium-extension).Marius Bakke2020-11-08
| | | | | * gnu/build/chromium-extension.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Adjust accordingly.
* linux-boot: Resume from hibernation.Tobias Geerinckx-Rice2020-11-07
| | | | | * gnu/build/linux-boot.scm (resume-if-hibernated): New procedure. (boot-system): Call it.
* file-systems: Add support for bcachefs.Tobias Geerinckx-Rice2020-11-07
| | | | | | | | | * gnu/build/file-systems.scm (%bcachefs-endianness): New syntax. (bcachefs-superblock?, read-bcachefs-superblock) (bcachefs-superblock-external-uuid, bcachefs-superblock-volume-name) (check-bcachefs-file-system): New procedures. (%partition-label-readers, %partition-uuid-readers, check-file-system): Register them.
* shepherd: Remove dependency on (guix utils).Ludovic Courtès2020-11-05
| | | | | | | | | | | Since commit 8ce6f4dc2879919c12bc76a2f4b01200af97e019, importing this module in a gexp would pull in (guix config) from the host, thereby leading to non-reproducible derivations. Users in (gnu services ...) do not expect that so simply remove the (guix utils) dependency for now. * gnu/build/shepherd.scm (fork+exec-command/container)[strip-pid]: New procedure. Use it instead of 'strip-keyword-arguments'.
* image: Error out when passed an unsupported partition type.Ludovic Courtès2020-11-05
| | | | | | * gnu/build/image.scm (make-partition-image): Use 'raise' instead of 'format' when TYPE is not supported. (convert-disk-image): Remove unneeded 'begin'.
* system: reconfigure: Use the disk-installer if provided.Mathieu Othacehe2020-11-03
| | | | | | | | | | | Fixes: <https://issues.guix.gnu.org/44101>. * gnu/build/bootloader.scm (write-file-on-device): Pass 'no-fail flag instead of 'no-create. Use a latin-1 transcoder. * guix/scripts/system/reconfigure.scm (install-bootloader-program): Add a "disk-installer" argument and use it as a fallback. (install-bootloader): Adapt accordingly. * gnu/tests/reconfigure.scm (run-install-bootloader-test): Ditto.
* file-systems: Allow swap space lookup by UUID/label.Ludovic Courtès2020-10-30
| | | | | | | | | * gnu/build/file-systems.scm (%linux-swap-magic, %page-size): New variables. (linux-swap-superblock?, read-linux-swap-superblock) (linux-swap-superblock-uuid, linux-swap-superblock-volume-name): New procedures. (%partition-label-readers, %partition-uuid-readers): Add them.
* hurd-boot: Set /hurd/magic on /dev/fd.Ludovic Courtès2020-10-14
| | | | | * gnu/build/hurd-boot.scm (set-hurd-device-translators)[devices]: Add "/dev/fd".
* hurd-boot: Create /servers/crash.Ludovic Courtès2020-10-08
| | | | | * gnu/build/hurd-boot.scm (set-hurd-device-translators): Create /servers/crash.
* bootloader: Fix u-boot installation.Mathieu Othacehe2020-10-05
| | | | | | | | | | | | | This is a follow-up of f19cf27c2b9ff92e2c0fd931ef7fde39c376adaa. The bootloader installation must be done on the final disk-image, hence using "disk-image-installer" instead of "installer" callback. * gnu/bootloader/u-boot.scm: Turn all installer callbacks into disk-image-installer callbacks. * gnu/build/bootloader.scm (write-file-on-device): Open the output file with 'no-truncate and 'no-create options. * gnu/system/image.scm (with-imported-modules*): Add (gnu build bootloader) module.