guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

43/107: gnu: Add fuse3.


From: guix-commits
Subject: 43/107: gnu: Add fuse3.
Date: Tue, 12 May 2020 10:53:17 -0400 (EDT)

kkebreau pushed a commit to branch wip-gnome3.36
in repository guix.

commit 7f6d0c9fb05dd8da767ab4da09a197f189ca245c
Author: Kei Kebreau <address@hidden>
AuthorDate: Sun Apr 19 12:25:46 2020 -0400

    gnu: Add fuse3.
    
    * gnu/packages/linux.scm (fuse3): New variable.
---
 gnu/packages/linux.scm | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 2900904..420c0ac 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -43,6 +43,7 @@
 ;;; Copyright © 2020 Chris Marusich <address@hidden>
 ;;; Copyright © 2020 Vincent Legoll <address@hidden>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <address@hidden>
+;;; Copyright © 2020 Kei Kebreau <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2598,6 +2599,67 @@ user-space processes.")
     (license (list license:lgpl2.1                ;library
                    license:gpl2+))))              ;command-line utilities
 
+(define-public fuse3
+  (package (inherit fuse)
+    (name "fuse3")
+    (version "3.9.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append 
"https://github.com/libfuse/libfuse/releases/";
+                                  "download/fuse-" version
+                                  "/fuse-" version ".tar.xz"))
+              (sha256
+               (base32
+                "0ig6kgw8bplgi24fkkfnk90bhvhhm4r2b0pb1dxmp8vbqvbczbqv"))))
+    (build-system meson-build-system)
+    (native-inputs
+     `(("python-pytest" ,python-pytest)
+       ("which" ,which)))
+    (arguments
+     `(#:tests? #f            ; all tests are skipped in the build environment
+       ,@(substitute-keyword-arguments (package-arguments fuse)
+           ((#:configure-flags _)
+            ``(,(string-append "-Dudevrulesdir="
+                               (assoc-ref %outputs "out")
+                               "/lib/udev/rules.d")
+               ;; Don't set owner and setuid bits on installed files
+               "-Duseroot=false"))
+           ((#:phases phases)
+            ;; The old 'set-file-names phase does not work for fuse3, and 
should
+            ;; be placed directly after the 'unpack phase to work with the
+            ;; meson-build-system.
+            `(modify-phases (alist-delete 'set-file-names ,phases)
+               (add-after 'unpack 'pre-configure
+                 (lambda* (#:key inputs outputs #: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"
+                     (("/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")))
+                   (substitute* "test/util.py"
+                     (("'which'") (string-append "'" (which "which") "'")))
+                   (substitute* "util/install_helper.sh"
+                     (("\\$\\{DESTDIR\\}/etc/init.d")
+                      (string-append (assoc-ref outputs "out") "/etc/init.d")))
+
+                   ;; 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/meson.build"
+                     (("-DFUSERMOUNT_DIR=[[:graph:]]+")
+                      "-DFUSERMOUNT_DIR=\"/var/empty\"'"))
+                   (setenv "MOUNT_FUSE_PATH"
+                           (string-append (assoc-ref outputs "out") "/sbin"))
+
+                   #t))
+               (replace 'check
+                 (lambda _
+                   (invoke "python3" "-m" "pytest" "test/"))))))))))
+
 (define-public unionfs-fuse
   (package
     (name "unionfs-fuse")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]