summaryrefslogtreecommitdiff
path: root/gnu/build/file-systems.scm
AgeCommit message (Expand)Author
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