1
Fork 0
mirror of https://https.git.savannah.gnu.org/git/guix.git/ synced 2025-07-14 02:50:45 +02:00

gnu: go-github-com-hanwen-go-fuse-v2: Find fusermount.

It was proposed in #71795 on <2024-06-27>.

Go-fuse requires the setuid version of Fusermount.  Relying on PATH is
not acceptable in all situations, especially not when mounts are
executed automatically as part of PAM.

* gnu/packages/golang-xyz.scm (go-github-com-hanwen-go-fuse-v2)
[arguments] <phases>: Add 'fix-paths to adjust path to setuid version of
Fusermount.
[inputs]: Add fuse.

Co-authored-by: Felix Lechner <felix.lechner@lease-up.com>
Change-Id: I56a8265857c6b31dfe74ad3bad3927842c8c9f05
This commit is contained in:
Sharlatan Hellseher 2025-02-18 16:43:43 +00:00
parent 80fb23971f
commit eb0898c165
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -35,7 +35,7 @@
;;; Copyright © 2022 Leo Nikkilä <hello@lnikki.la>
;;; Copyright © 2022 kiasoc5 <kiasoc5@disroot.org>
;;; Copyright © 2023 Benjamin <benjamin@uvy.fr>
;;; Copyright © 2023 Felix Lechner <felix.lechner@lease-up.com>
;;; Copyright © 2023, 2024 Felix Lechner <felix.lechner@lease-up.com>
;;; Copyright © 2023 Fries <fries1234@protonmail.com>
;;; Copyright © 2023 Hilton Chain <hako@ultrarare.space>
;;; Copyright © 2023 Katherine Cox-Buday <cox.katherine.e@gmail.com>
@ -6906,7 +6906,16 @@ provides a buffered io.Writer that is flushed at a timed interval.")
(add-after 'unpack 'remove-benchmark
(lambda* (#:key tests? import-path #:allow-other-keys)
(with-directory-excursion (string-append "src/" import-path)
(delete-file-recursively "benchmark"))))))))
(delete-file-recursively "benchmark"))))
(add-after 'unpack 'fix-paths
(lambda* (#:key import-path #:allow-other-keys)
(with-directory-excursion (string-append "src/" import-path)
(let* ((fusermount3 "/run/setuid-programs/fusermount3"))
(substitute* "fuse/mount_linux.go"
(("bin, err := fusermountBinary[(][)]")
(format #f "bin, err := ~s, nil" fusermount3)))))))))))
(inputs
(list fuse))
(propagated-inputs
(list go-github-com-kylelemons-godebug
go-github-com-moby-sys-mountinfo