summary refs log tree commit diff
diff options
context:
space:
mode:
authorRaghav Gururajan <raghavgururajan@disroot.org>2020-08-05 15:27:26 -0400
committerDanny Milosavljevic <dannym@scratchpost.org>2020-08-19 19:03:59 +0200
commit9d3010d24271f921e3dc23811c8b7852a2f0d4c8 (patch)
tree0641f23e09171889182f706181b317411fb449c8
parent3f18adb6aa659824ac58f1957175f5cea35c80b7 (diff)
downloadguix-9d3010d24271f921e3dc23811c8b7852a2f0d4c8.tar.gz
gnu: Add fuse@2.9.9.
* gnu/packages/linux.scm (fuse-legacy): New variable.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
-rw-r--r--gnu/packages/linux.scm62
1 files changed, 62 insertions, 0 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index bc286dd407..f56d159802 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -2802,6 +2802,68 @@ reference implementation for communicating with the FUSE kernel module.")
       ;; Others.
       license:gpl2+))))
 
+(define-public fuse-legacy
+  (package
+    (name "fuse")
+    (version "2.9.9")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/libfuse/libfuse/releases/"
+                                  "download/fuse-" version
+                                  "/fuse-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1ddlq6kzxilccgbvxjfx80jx6kamgw4sv49phks2zhlcc1frvrnh"))
+              (patches (search-patches "fuse-overlapping-headers.patch"))))
+    (build-system gnu-build-system)
+    (inputs `(("util-linux" ,util-linux)))
+    (arguments
+     '(#:configure-flags (list (string-append "MOUNT_FUSE_PATH="
+                                              (assoc-ref %outputs "out")
+                                              "/sbin")
+                               (string-append "INIT_D_PATH="
+                                              (assoc-ref %outputs "out")
+                                              "/etc/init.d")
+
+                               ;; The rule makes /dev/fuse 666.
+                               (string-append "UDEV_RULES_PATH="
+                                              (assoc-ref %outputs "out")
+                                              "/lib/udev/rules.d"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'set-file-names
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; libfuse calls out to mount(8) and umount(8).  Make sure
+             ;; it refers to the right ones.
+             (substitute* '("lib/mount_util.c" "util/mount_util.c")
+               (("/bin/(u?)mount" _ maybe-u)
+                (string-append (assoc-ref inputs "util-linux")
+                               "/bin/" maybe-u "mount")))
+             (substitute* '("util/mount.fuse.c")
+               (("/bin/sh")
+                (which "sh")))
+
+             ;; This hack leads libfuse to search for 'fusermount' in
+             ;; $PATH, where it may find a setuid-root binary, instead of
+             ;; trying solely $out/sbin/fusermount and failing because
+             ;; it's not setuid.
+             (substitute* "lib/Makefile"
+               (("-DFUSERMOUNT_DIR=[[:graph:]]+")
+                "-DFUSERMOUNT_DIR=\\\"/var/empty\\\""))
+             #t)))))
+    (supported-systems (delete "i586-gnu" %supported-systems))
+    (home-page "https://github.com/libfuse/libfuse")
+    (synopsis "Support file systems implemented in user space")
+    (description
+     "As a consequence of its monolithic design, file system code for Linux
+normally goes into the kernel itself---which is not only a robustness issue,
+but also an impediment to system extensibility.  FUSE, for \"file systems in
+user space\", is a kernel module and user-space library that tries to address
+part of this problem by allowing users to run file system implementations as
+user-space processes.")
+    (license (list license:lgpl2.1                ;library
+                   license:gpl2+))))              ;command-line utilities
+
 (define-public unionfs-fuse
   (package
     (name "unionfs-fuse")