aboutsummaryrefslogtreecommitdiff
path: root/gnu/build
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/build')
-rw-r--r--gnu/build/file-systems.scm23
-rw-r--r--gnu/build/linux-boot.scm2
-rw-r--r--gnu/build/linux-modules.scm2
-rw-r--r--gnu/build/vm.scm1
4 files changed, 9 insertions, 19 deletions
diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm
index fe98df95d5..0cb84b8aad 100644
--- a/gnu/build/file-systems.scm
+++ b/gnu/build/file-systems.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016, 2017 David Craven <david@craven.ch>
+;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -47,12 +48,7 @@
mount-flags->bit-mask
check-file-system
- mount-file-system)
- #:re-export (mount
- umount
- MS_BIND
- MS_MOVE
- MS_RDONLY))
+ mount-file-system))
;;; Commentary:
;;;
@@ -61,13 +57,6 @@
;;;
;;; Code:
-;; 'mount' is already defined in the statically linked Guile used for initial
-;; RAM disks, in which case the bindings in (guix build syscalls) do not work
-;; (the FFI bindings do not work there). Override them in that case.
-(when (module-defined? the-scm-module 'mount)
- (set! mount (@ (guile) mount))
- (set! umount (@ (guile) umount)))
-
(define (bind-mount source target)
"Bind-mount SOURCE at TARGET."
(mount source target "" MS_BIND))
@@ -576,10 +565,6 @@ corresponds to the symbols listed in FLAGS."
(()
0))))
-(define (regular-file? file-name)
- "Return #t if FILE-NAME is a regular file."
- (eq? (stat:type (stat file-name)) 'regular))
-
(define* (mount-file-system spec #:key (root "/root"))
"Mount the file system described by SPEC under ROOT. SPEC must have the
form:
@@ -619,9 +604,9 @@ run a file system check."
(check-file-system source type))
;; Create the mount point. Most of the time this is a directory, but
- ;; in the case of a bind mount, a regular file may be needed.
+ ;; in the case of a bind mount, a regular file or socket may be needed.
(if (and (= MS_BIND (logand flags MS_BIND))
- (regular-file? source))
+ (not (file-is-directory? source)))
(unless (file-exists? mount-point)
(mkdir-p (dirname mount-point))
(call-with-output-file mount-point (const #t)))
diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm
index c34a3f7c18..360ef3faed 100644
--- a/gnu/build/linux-boot.scm
+++ b/gnu/build/linux-boot.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -26,6 +27,7 @@
#:use-module (ice-9 match)
#:use-module (ice-9 ftw)
#:use-module (guix build utils)
+ #:use-module (guix build syscalls)
#:use-module (gnu build linux-modules)
#:use-module (gnu build file-systems)
#:export (mount-essential-file-systems
diff --git a/gnu/build/linux-modules.scm b/gnu/build/linux-modules.scm
index d7feb3a080..5ca7bf8e38 100644
--- a/gnu/build/linux-modules.scm
+++ b/gnu/build/linux-modules.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -18,6 +19,7 @@
(define-module (gnu build linux-modules)
#:use-module (guix elf)
+ #:use-module (guix build syscalls)
#:use-module (rnrs io ports)
#:use-module (rnrs bytevectors)
#:use-module (srfi srfi-1)
diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm
index 60ee18ebe0..44a3000eb1 100644
--- a/gnu/build/vm.scm
+++ b/gnu/build/vm.scm
@@ -21,6 +21,7 @@
(define-module (gnu build vm)
#:use-module (guix build utils)
#:use-module (guix build store-copy)
+ #:use-module (guix build syscalls)
#:use-module (gnu build linux-boot)
#:use-module (gnu build install)
#:use-module (guix records)