summaryrefslogtreecommitdiff
path: root/gnu/build/file-systems.scm
AgeCommit message (Expand)Author
2017-07-03build: Allow specifying volume-uuid with make-iso9660-image....* gnu/build/file-systems.scm (iso9660-uuid->string): Export. * gnu/build/vm.scm (make-iso9660-image): Add volume-uuid. Danny Milosavljevic
2017-07-02file-systems: iso9660-uuid->string: Use "-" as separator in the result....* gnu/build/file-systems.scm (iso9660-uuid->string): Use "-" as separator in the result. Danny Milosavljevic
2017-06-11file-systems: Handle EIO error in 'ENOENT-safe' as well....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> Adam Van Ymeren
2017-06-10file-systems: Provide string->ext*-uuid, string->btrfs-uuid....* gnu/build/file-systems.scm (string->ext2-uuid, string->ext3-uuid, string->ext4-uuid, string->btrfs-uuid): New variables. Export them. Danny Milosavljevic
2017-06-09file-systems: Provide string->iso9660-uuid....* gnu/build/file-systems.scm (string->iso9660-uuid): New variable. Export it. Co-authored-by: Ludovic Courtès <ludo@gnu.org> Danny Milosavljevic
2017-06-07file-systems: Use creation time if modification time is unset for ISO9660....* gnu/build/file-systems.scm (iso9660-superblock-uuid): Modify. Danny Milosavljevic
2017-06-03file-systems: Improve error handling in the iso9660 case - fixes boot problem....* gnu/build/file-systems.scm (read-iso9660-superblock): Modify. Danny Milosavljevic
2017-05-31file-systems: Improve error reporting....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. Danny Milosavljevic
2017-05-31gnu: build: Improve comments....* gnu/build/file-systems.scm (iso9660-superblock-volume-name): Add clarifying comment. Danny Milosavljevic
2017-05-27gnu: build: Improve docstrings....* gnu/build/file-systems.scm (iso9660-superblock?, read-iso9660-superblock, iso9660-superblock-uuid): Improve docstrings. Danny Milosavljevic
2017-05-03gnu: build: file-systems: Add ISO-9660....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. Danny Milosavljevic
2017-04-13file-systems: Allow for bind-mounts of named sockets....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)). Ludovic Courtès
2017-04-11build: Fix compilation warnings....* 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> Mathieu Othacehe
2017-03-01file-systems: Add FAT32 support....* 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. David Craven
2017-01-31file-systems: Do not read superblocks past the end of a device....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. Ludovic Courtès
2017-01-10system: Add btrfs file system support....* 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>. David Craven
2017-01-10file-systems: Refactor file-system predicates....* 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. David Craven
2017-01-10file-systems: Refactor check-file-system....* gnu/build/file-systems.scm (check-file-system): Use file-system type specific checker. (check-ext2-file-system): New variable. David Craven
2017-01-06file-systems: Refactor file system detection logic....* 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. David Craven
2016-11-29gnu: Allow nfs file systems to be automatically mounted....* gnu/build/file-systems.scm (mount-file-system): Append target addr= when mounting nfs filesystems. John Darrington
2016-11-06gnu: build: file-system: Change url of LUKS specification....* gnu/build/file-system.scm: Change url of LUKS specification. Signed-off-by: Efraim Flashner <efraim@flashner.co.il> ng0
2016-10-27file-systems: 'disk-partitions' detected partitions from mapped devices....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. Ludovic Courtès
2016-09-05file-systems: Always use (guix build syscalls)....* 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'. Ludovic Courtès
2016-04-17file-systems: Add 'find-partition-by-luks-uuid'....* 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. Ludovic Courtès
2016-04-17file-systems: Separate ENOENT catching from ext2 superblock reads....* gnu/build/file-systems.scm (ENOENT-safe): New procedure. (read-ext2-superblock*): Rewrite in terms of it. Ludovic Courtès
2016-02-08file-systems: Spawn a Bournish REPL upon fsck failure....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. Ludovic Courtès
2016-01-01system: Allow the root file system to be named by UUID....* 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. Ludovic Courtès
2016-01-01file-systems: Move 'string->uuid' to the build side....* gnu/system/file-systems.scm (%uuid-rx, string->uuid): Move to... * gnu/build/file-systems.scm (%uuid-rx, string->uuid): ... here. New variables. Ludovic Courtès
2015-10-17file-systems: Do not truncate mount points that already exist....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. Ludovic Courtès
2015-08-08build: file-systems: Allow for bind mounting regular files....* 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. David Thompson
2015-07-14file-systems: Implement partition lookup by UUID....* 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. Ludovic Courtès
2015-07-14file-systems: Use (guix build syscalls) at build time if needed....* gnu/build/file-systems.scm: Wrap 'module-use!' statement in 'eval-when'. Ludovic Courtès
2015-07-09build: file-systems: Import (guix build syscalls) for non-static Guiles....* 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. David Thompson
2015-06-19gnu: Make 'mount' interface in static Guile consistent with Guix API....Rather than expecting a pointer, the version of 'mount' in guile-static-stripped now takes a string for the 'options' argument, just like the 'mount' procedure in (guix build syscalls). * gnu/packages/patches/guile-linux-syscalls.patch (mount): Expect a string or #f for 'options' argument. * gnu/build/file-systems.scm (mount-file-system): Use new 'mount' interface. David Thompson
2015-04-20file-systems: Use a second 'mount' call for read-only bind mounts....* gnu/build/file-systems.scm (MS_REMOUNT): New constant. (mount-file-system): Add 'flags' local variable. When FLAGS has MS_BIND & MS_RDONLY, call 'mount' with MS_REMOUNT. * gnu/services/base.scm (file-system-service) <start>: Likewise. Ludovic Courtès
2015-01-05linux-boot: Make /etc/mtab a symlink to /proc/self/mounts....Fixes <http://bugs.gnu.org/19491>. * gnu/build/linux-boot.scm (mount-root-file-system): Make /root/etc/mtab a symlink to /proc/self/mounts. * gnu/build/file-systems.scm (mount-file-system): Don't update /etc/mtab. * guix/build/syscalls.scm (mount, umount): Have #:update-mtab? default to #f. 宋文武
2014-11-20file-systems: Always write the options field in /etc/mtab....* gnu/build/file-systems.scm (mount-file-system): When OPTIONS is false, write "rw" to /etc/mtab. This fixes a bug whereby 'remove-from-mtab' in (guix syscalls) would otherwise raise a 'match-error' because of the missing field. This affected file systems mounted from the initrd, such as devtmpfs, which has options == #f. Ludovic Courtès
2014-09-19linux-boot: Ask fsck for a progress bar....* gnu/build/file-systems.scm (check-file-system): Pass '-C 0' to FSCK. Suggested by Mark H. Weaver. Ludovic Courtès
2014-09-03Move part of (gnu build linux-boot) to (gnu build file-systems)....* gnu/build/linux-boot.scm (%ext2-endianness, %ext2-sblock-magic, %ext2-sblock-creator-os, %ext2-sblock-uuid, %ext2-sblock-volume-name, read-ext2-superblock, ext2-superblock-uuid, ext2-superblock-volume-name, disk-partitions, partition-label-predicate, find-partition-by-label, canonicalize-device-spec, MS_RDONLY, MS_NOSUID, MS_NODEV, MS_NOEXEC, MS_BIND, MS_MOVE, bind-mount, check-file-system, mount-flags->bit-mask, mount-file-system): Move to... * gnu/build/file-systems.scm: ... here. New file. * gnu-system.am (GNU_SYSTEM_MODULES): Add it. * gnu/services/base.scm: Use (gnu build file-systems). * gnu/services/dmd.scm (dmd-configuration-file): Likewise. * gnu/system.scm (operating-system-activation-script): Likewise. * gnu/system/linux-initrd.scm (base-initrd): Likewise. * gnu/system/vm.scm (expression->derivation-in-linux-vm): Likewise. Ludovic Courtès