summaryrefslogtreecommitdiff
path: root/gnu/build/file-systems.scm
AgeCommit message (Collapse)Author
2019-12-07file-systems: Add support for 'strict-atime' and 'lazy-time' flags.Guillaume Le Vaillant
* guix/build/syscalls.scm (MS_LAZYTIME): New variable. * gnu/build/file-systems.scm (mount-flags->bit-mask): Add match rules for 'strict-atime' and 'lazy-time'. * doc/guix.texi (File Systems): Add 'strict-atime' and 'lazy-time' to the list of supported flags. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2019-11-18file-systems: Fix docstring.Maxim Cournoyer
* gnu/build/file-systems.scm (mount-file-system): Clean the documentation from the no longer existing parameters (these are now encapsulated within a <file-system> record).
2019-04-29file-systems: Support the 'no-atime' flag.rendaw
* guix/build/syscalls.scm (MS_NOATIME): New variable. * gnu/build/file-systems.scm (mount-flags->bit-mask): Support it. * doc/guix.texi (File Systems): Document it and add cross-references to the relevant documentation. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2019-01-17file-systems: Add read-luks-partition-uuid.Mathieu Othacehe
Add a specific procedure to read luks partition uuid. * gnu/build/file-systems.scm (luks-partition-field-reader): New procedure ... (luks-partition-uuid-predicate): ... used here, (read-luks-partition-uuid): new exported procedure.
2019-01-17file-systems: Export read-partition-label and read-partition-uuid.Mathieu Othacehe
* gnu/build/file-systems.scm (read-partition-label): Export it, (read-partition-uuid): ditto.
2018-12-18file-systems: Have the emergency REPL output to /dev/console.Ludovic Courtès
This fixes a bug whereby all emergency REPL output would go to /dev/klog and thus, each line would be prefixed by "[12324.432] shepherd[1]: ". * gnu/build/file-systems.scm (check-file-system): Wrap 'start-repl' call in 'with-output-to-file'.
2018-12-18file-systems: Spawn a REPL only when interaction is possible.Ludovic Courtès
Fixes <https://bugs.gnu.org/23697>. Reported by Jan Nieuwenhuizen <janneke@gnu.org>. * gnu/build/file-systems.scm (check-file-system): Call 'start-repl' only if current-input-port passes 'isatty?'. * gnu/services/shepherd.scm (shepherd-configuration-file): After 'for-each' expression, call 'redirect-port'. * gnu/tests/base.scm (run-basic-test)["stdin is /dev/null"]: New test.
2018-05-31file-systems: Always wait for devices to show up.Ludovic Courtès
Previously, 'canonicalize-device-spec' would wait for devices when they were specified as a label or UUID, but would not wait when the user passed a "/dev" file name directly. This could cause problems when the /dev node takes a while to show up. * gnu/build/file-systems.scm (canonicalize-device-spec): Add 'resolve' call in the 'string?' case.
2018-05-28file-systems: Remove 'title' field and add <file-system-label>.Ludovic Courtès
The 'title' field was easily overlooked and was an endless source of confusion. Now, the value of the 'device' field is self-contained. * gnu/system/file-systems.scm (<file-system>): Change constructor name to '%file-system'. [title]: Remove. (<file-system-label>): New record type with printer. (report-deprecation, device-expression) (process-file-system-declaration, file-system): New macros. (file-system-title): New procedure. (file-system->spec, spec->file-system): Adjust to handle <file-system-label>. * gnu/system.scm (bootable-kernel-arguments): Add case for 'file-system-label?'. (read-boot-parameters): Likewise. (mapped-device-user): Avoid 'file-system-title'. (fs->boot-device): Remove. (operating-system-boot-parameters): Use 'file-system-device' instead of 'fs->boot-device'. (device->sexp): Add case for 'file-system-label?'. * gnu/bootloader/grub.scm (grub-root-search): Add case for 'file-system-label?'. * gnu/system/examples/bare-bones.tmpl, gnu/system/examples/beaglebone-black.tmpl, gnu/system/examples/lightweight-desktop.tmpl, gnu/system/examples/vm-image.tmpl: Remove uses of 'title'. * gnu/system/vm.scm (virtualized-operating-system): Remove uses of 'file-system-title'. * guix/scripts/system.scm (check-file-system-availability): Likewise, and adjust fix-it hint. (check-initrd-modules)[file-system-/dev]: Likewise. * gnu/build/file-systems.scm (canonicalize-device-spec): Remove 'title' parameter. [canonical-title]: Remove. Match on SPEC's type rather than on CANONICAL-TITLE. (mount-file-system): Adjust caller. * gnu/build/linux-boot.scm (boot-system): Interpret ROOT here. * gnu/services/base.scm (file-system->fstab-entry): Remove use of 'file-system-title'. * doc/guix.texi (File Systems): Remove documentation of the 'title' field. Rewrite documentation of 'device' and document 'file-system-label'.
2018-01-19gnu: Consistently Write ‘file system(s)’.Tobias Geerinckx-Rice
It is the GNU way. * doc/guix.texi (Build Systems, DNS Services): Write ‘file system(s)’. * gnu/build/vm.scm (create-ext-file-system, create-fat-file-system): Likewise. * gnu/packages/backup.scm (dirvish, rsnapshot)[description]: Likewise. * gnu/packages/check.scm (python-testpath)[description]: Likewise. * gnu/packages/disk.scm (pydf)[description]: Likewise. * gnu/packages/file-systems.scm (disorderfs)[synopsis, description]: Likewise. (glusterfs)[description]: Likewise. * gnu/packages/haskell.scm (ghc-directory, ghc-system-fileio-bootstrap) (ghc-system-fileio)[synopsis]: Likewise. (ghc-fsnotify)[description]: Likewise. * gnu/packages/linux.scm (proot)[description]: Likewise. (jmtpfs)[synopsis, description]: Likewise. * gnu/packages/mate.scm (caja, caja-extensions)[description]: Likewise. * gnu/packages/storage.scm (ceph)[description]: Likewise. * gnu/packages/sync.scm (lsyncd)[description]: Likewise. * gnu/packages/syncthing.scm (syncthing)[synopsis]: Likewise. (go-github-com-zillode-notify)[description]: Likewise. * gnu/services/nfs.scm (pipefs-service-type): Likewise. * guix/scripts/system.scm (perform-action): Likewise.
2017-10-11file-systems: Add support for FAT16.Ludovic Courtès
* gnu/build/file-systems.scm (check-fat32-file-system): Rename to... (check-fat-file-system): ... this. (check-file-system): Adjust accordingly. (fat16-superblock?, read-fat16-superblock) (fat16-superblock-uuid, fat16-superblock-volume-name): New procedures. (%partition-label-readers, %partition-uuid-readers): Add FAT16.
2017-10-11file-systems: Preserve UUID types when serializing.Ludovic Courtès
Reported by Roel Janssen <roel@gnu.org> at <https://lists.gnu.org/archive/html/help-guix/2017-09/msg00094.html>. * gnu/system/file-systems.scm (file-system->spec): When DEVICE is a UUID, serialize it in a way that preserves its type. (spec->file-system): Adjust accordingly. * gnu/build/file-systems.scm (canonicalize-device-spec): Add case for when SPEC is 'uuid?'.
2017-10-11file-systems: 'mount-file-system' now takes a <file-system> object.Ludovic Courtès
* gnu/build/file-systems.scm (mount-file-system): Rename 'spec' to 'fs' and assume it's a <file-system>. * gnu/build/linux-boot.scm (boot-system): Assume MOUNTS is a list of <file-system> and adjust accordingly. * gnu/build/linux-container.scm (mount-file-systems): Remove 'file-system->spec' call. * gnu/services/base.scm (file-system-shepherd-service): Add 'spec->file-system' call. Add (gnu system file-systems) to 'modules'. * gnu/system/linux-initrd.scm (raw-initrd): Use (gnu system file-systems). Add 'spec->file-system' call for #:mounts.
2017-10-05uuid: Add 'uuid=?' and use it.Ludovic Courtès
* gnu/system/uuid.scm (uuid=?): New procedure. * tests/uuid.scm ("uuid=?"): New test. * gnu/build/file-systems.scm (partition-uuid-predicate) (luks-partition-uuid-predicate): Use it instead of 'bytevector=?'.
2017-09-11file-systems: Introduce (gnu system uuid).Ludovic Courtès
* gnu/build/file-systems.scm (sub-bytevector) (latin1->string, %fat32-endianness, fat32-uuid->string) (%iso9660-uuid-rx, string->iso9660-uuid) (iso9660-uuid->string, %network-byte-order) (dce-uuid->string, %uuid-rx, string->dce-uuid) (string->ext2-uuid, string->ext3-uuid, string->ext4-uuid) (vhashq, %uuid-parsers, %uuid-printers, string->uuid) (uuid->string): Move to... * gnu/system/uuid.scm: ... here. New file. * gnu/system/file-systems.scm (uuid): Move to the above file. * gnu/system/vm.scm: Adjust accordingly. * gnu/local.mk (GNU_SYSTEM_MODULES): Add uuid.scm.
2017-09-11file-systems: Add UUID type dictionaries.Ludovic Courtès
* gnu/build/file-systems.scm (uuid->string): Rename to... (dce-uuid->string): ... this. (string->uuid): Rename to... (string->dce-uuid): ... this. (vhashq): New macro. (%uuid-parsers, %uuid-printers): New variables. (uuid->string, string->uuid): New procedures.
2017-08-05build: Allow mounting of entire disks.Danny Milosavljevic
* gnu/build/file-systems.scm (disk-partitions): Also return entire drives.
2017-07-03build: Allow specifying volume-uuid with make-iso9660-image.Danny Milosavljevic
* gnu/build/file-systems.scm (iso9660-uuid->string): Export. * gnu/build/vm.scm (make-iso9660-image): Add volume-uuid.
2017-07-02file-systems: iso9660-uuid->string: Use "-" as separator in the result.Danny Milosavljevic
* gnu/build/file-systems.scm (iso9660-uuid->string): Use "-" as separator in the result.
2017-06-11file-systems: Handle EIO error in 'ENOENT-safe' as well.Adam Van Ymeren
Trying to boot GuixSD when an audio CD is in the drive will die with an "input/output error" when trying to read the superblock from the cd drive. This patch catches and warns in this case rather than dying. * gnu/build/file-systems.scm (ENOENT-safe): Handle EIO. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-06-10file-systems: Provide string->ext*-uuid, string->btrfs-uuid.Danny Milosavljevic
* gnu/build/file-systems.scm (string->ext2-uuid, string->ext3-uuid, string->ext4-uuid, string->btrfs-uuid): New variables. Export them.
2017-06-09file-systems: Provide string->iso9660-uuid.Danny Milosavljevic
* gnu/build/file-systems.scm (string->iso9660-uuid): New variable. Export it. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2017-06-07file-systems: Use creation time if modification time is unset for ISO9660.Danny Milosavljevic
* gnu/build/file-systems.scm (iso9660-superblock-uuid): Modify.
2017-06-03file-systems: Improve error handling in the iso9660 case - fixes boot problem.Danny Milosavljevic
* gnu/build/file-systems.scm (read-iso9660-superblock): Modify.
2017-05-31file-systems: Improve error reporting.Danny Milosavljevic
Suggested by Chris Marusich <cmmarusich@gmail.com>. Fixes <https://bugs.gnu.org/27143>. * gnu/build/file-systems.scm (read-iso9660-primary-volume-descriptor): Improve error reporting.
2017-05-31gnu: build: Improve comments.Danny Milosavljevic
* gnu/build/file-systems.scm (iso9660-superblock-volume-name): Add clarifying comment.
2017-05-27gnu: build: Improve docstrings.Danny Milosavljevic
* gnu/build/file-systems.scm (iso9660-superblock?, read-iso9660-superblock, iso9660-superblock-uuid): Improve docstrings.
2017-05-03gnu: build: file-systems: Add ISO-9660.Danny Milosavljevic
Fixes <https://bugs.gnu.org/26751>. * gnu/build/file-systems.scm (iso9660-superblock?, read-iso9660-primary-volume-descriptor, read-iso9660-superblock, iso9660-superblock-uuid, iso9660-uuid->string, iso9660-superblock-volume-name): New variables. (%partition-label-readers): Add iso9660. (%partition-uuid-readers): Add iso9660.
2017-04-13file-systems: Allow for bind-mounts of named sockets.Ludovic Courtès
Previously a named socket such as /dev/log would fail the 'regular-file?' test and we'd end up mkdir'ing it. * gnu/build/file-systems.scm (regular-file?): Remove. (mount-file-system): Change (regular-file? source) to (not (file-is-directory? source)).
2017-04-11build: Fix compilation warnings.Mathieu Othacehe
* gnu/build/linux-boot.scm (define-module): Use (guix build syscalls). * gnu/build/linux-modules.scm (define-module): Ditto. * gnu/build/file-systems (define-module): Stop re-exporting mount, umount and MS_* flags as this is now safe to include (guix build syscalls) instead. (mount): Remove procedure. (umount): Ditto. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-03-01file-systems: Add FAT32 support.David Craven
* gnu/build/file-systems.scm (%fat32-endianness, fat32-superblock?, read-fat32-superblock, fat32-superblock-uuid, fat32-uuid->string, fat32-superblock-volume-name, check-fat32-file-system): New variables. (%partition-label-readers, %partition-uuid-readers, check-file-system): Add fat support. (latin1->string): New variable. (null-terminated-latin1->string): Use latin1->string.
2017-01-31file-systems: Do not read superblocks past the end of a device.Ludovic Courtès
Fixes <http://bugs.gnu.org/25573>. Reported by Alex Kost <alezost@gmail.com>. * gnu/build/file-systems.scm (seek*): New procedure. (read-superblock): Use it instead of 'seek' and ensure it returns OFFSET.
2017-01-10system: Add btrfs file system support.David Craven
* gnu/build/file-systems.scm (%btrfs-endianness, btrfs-superblock?, read-btrfs-superblock, btrfs-superblock-uuid, btrfs-superblock-volume-name, check-btrfs-file-system): New variables. (%paritition-label-readers, %partition-uuid-readers): Add btrfs readers. * gnu/system/linux-initrd.scm (linux-modules): Add btrfs modules when a btrfs file-system is used. * gnu/tests/install.scm (%btrfs-root-os %btrfs-root-os-source, %btrfs-root-installation-script, %test-btrfs-root-os): New system test. * doc/guix.texi: Adjust accordingly. Fixes <http://bugs.gnu.org/19280>.
2017-01-10file-systems: Refactor file-system predicates.David Craven
* gnu/build/file-systems.scm (partition-field-reader, read-partition-field, %partition-label-readers, %partition-uuid-readers, read-partition-label, read-partition-uuid): New variables. (partition-predicate, partition-label-predicate, partition-uuid-predicate, luks-partition-uuid-predicate): Use partition field readers. (find-partition): New variable. (find-partition-by-label, find-partition-by-uuid, find-partition-by-luks-uuid): Use find-partition-by.
2017-01-10file-systems: Refactor check-file-system.David Craven
* gnu/build/file-systems.scm (check-file-system): Use file-system type specific checker. (check-ext2-file-system): New variable.
2017-01-06file-systems: Refactor file system detection logic.David Craven
* gnu/build/file-systems.scm (read-superblock, null-terminated-latin1->string): New variables. (sub-bytevector): Move to general section. (ext2-superblock?, read-ext2-superblock): New variables. (ext2-superblock-uuid, ext2-superblock-volume-name): Use sub-bytevector and null-terminated-latin1->string. (%ext2-sblock-magic, %ext2-sblock-creator-os, %ext2-sblock-uuid, %ext2-sblock-volume-name): Inline constants. (luks-superblock?, read-luks-header): New variables. (%luks-header-size, %luks-magic): Inline. (partition-label-predicate, partition-uuid-predicate, luks-partition-uuid-predicate): Use new functions.
2016-11-29gnu: Allow nfs file systems to be automatically mounted.John Darrington
* gnu/build/file-systems.scm (mount-file-system): Append target addr= when mounting nfs filesystems.
2016-11-06gnu: build: file-system: Change url of LUKS specification.ng0
* gnu/build/file-system.scm: Change url of LUKS specification. Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2016-10-27file-systems: 'disk-partitions' detected partitions from mapped devices.Ludovic Courtès
Previously, partitions of mdadm- or cryptsetup-produced block devices would not be returned by 'disk-partitions'. * gnu/build/file-systems.scm (disk-partitions)[last-character]: New procedure. [partition?]: Add 'name' parameter and rewrite. Adjust caller. * gnu/build/file-systems.scm (ENOENT-safe): Silently ignore ENOMEDIUM.
2016-09-05file-systems: Always use (guix build syscalls).Ludovic Courtès
* gnu/build/file-systems.scm: Use (guix build syscalls) unconditionally. Override the 'mount' and 'umount' bindings when (guile) provides them. (MS_RDONLY, MS_NOSUID, MS_NODEV, MS_NOEXEC, MS_REMOUNT) (MS_BIND, MS_MOVE): Remove. * guix/build/syscalls.scm (%libc-errno-pointer): Add 'false-if-exception' around 'dynamic-func'.
2016-04-17file-systems: Add 'find-partition-by-luks-uuid'.Ludovic Courtès
* gnu/build/file-systems.scm (%luks-endianness, %luks-header-size): New macros. (%luks-magic): New variable. (sub-bytevector, read-luks-header, luks-header-uuid): New procedures. (partition-predicate): Add 'read' parameter; wrap it with 'ENOENT-safe'. Use it instead of 'read-ext2-superblock*'. (read-ext2-superblock*): Remove. (partition-label-predicate, partition-uuid-predicate): Pass 'read-ext2-superblock' as the first argument. (partition-luks-uuid-predicate): New variable. (find-partition-by-luks-uuid): New procedure.
2016-04-17file-systems: Separate ENOENT catching from ext2 superblock reads.Ludovic Courtès
* gnu/build/file-systems.scm (ENOENT-safe): New procedure. (read-ext2-superblock*): Rewrite in terms of it.
2016-02-08file-systems: Spawn a Bournish REPL upon fsck failure.Ludovic Courtès
Fixes <http://bugs.gnu.org/22588>. Reported by Mark H Weaver <mhw@netris.org>. * gnu/build/file-systems.scm (check-file-system): Pass %BOURNISH-LANGUAGE as the argument to 'start-repl'. * gnu/services.scm (activation-script): Add (guix build bournish). * gnu/services/base.scm (file-system-shepherd-service)[imported-modules]: Likewise. * gnu/system/linux-container.scm (container-script): Likewise. * gnu/system/vm.scm (expression->derivation-in-linux-vm): Likewise.
2016-01-01system: Allow the root file system to be named by UUID.Ludovic Courtès
* gnu/build/file-systems.scm (canonicalize-device-spec)[canonical-title]: Use 'string->uuid' to check whether SPEC is a UUID. When SPEC is a string and CANONICAL-TITLE is 'uuid, call 'string->uuid'. * gnu/system.scm (operating-system-grub.cfg): Add 'root-device' variable and use it for the "--root=" argument.
2016-01-01file-systems: Move 'string->uuid' to the build side.Ludovic Courtès
* gnu/system/file-systems.scm (%uuid-rx, string->uuid): Move to... * gnu/build/file-systems.scm (%uuid-rx, string->uuid): ... here. New variables.
2015-10-17file-systems: Do not truncate mount points that already exist.Ludovic Courtès
Reported by David Thompson <dthompson2@worcester.edu> at <https://lists.gnu.org/archive/html/guix-devel/2015-10/msg00284.html>. * gnu/build/file-systems.scm (mount-file-system): When SOURCE matches 'regular-file?', do not create MOUNT-POINT if it already exists. This fixes a bug whereby we would be truncating MOUNT-POINT if it already existed.
2015-08-08build: file-systems: Allow for bind mounting regular files.David Thompson
* gnu/build/file-systems.scm (regular-file?): New procedure. (mount-file-system): Create a regular file instead of a directory when bind mounting a regular file.
2015-07-14file-systems: Implement partition lookup by UUID.Ludovic Courtès
* gnu/build/file-systems.scm (read-ext2-superblock*, partition-predicate): New procedures. (partition-label-predicate): Rewrite in terms of 'partition-predicate'. (partition-uuid-predicate, find-partition-by-uuid, uuid->string): New procedures. (%network-byte-order): New macro. (canonicalize-device-spec)[canonical-title]: Check whether SPEC is a string. [resolve]: New procedure. Add 'uuid' case and use it.
2015-07-14file-systems: Use (guix build syscalls) at build time if needed.Ludovic Courtès
* gnu/build/file-systems.scm: Wrap 'module-use!' statement in 'eval-when'.
2015-07-09build: file-systems: Import (guix build syscalls) for non-static Guiles.David Thompson
* gnu/build/file-systems.scm: Import (guix build syscalls) when 'mount' is not defined. * gnu/system.scm (operating-system-activation-script): Include (guix build syscalls) module in derivation.