From eb0898c16559f053adff99732bcd1bbb64b51494 Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Tue, 18 Feb 2025 16:43:43 +0000 Subject: [PATCH] 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] : Add 'fix-paths to adjust path to setuid version of Fusermount. [inputs]: Add fuse. Co-authored-by: Felix Lechner Change-Id: I56a8265857c6b31dfe74ad3bad3927842c8c9f05 --- gnu/packages/golang-xyz.scm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm index 537b6ad31db3fa285f640d20686974e2cde0ea01..31f5bacad87321a55914478064d536cc2db86b79 100644 --- a/gnu/packages/golang-xyz.scm +++ b/gnu/packages/golang-xyz.scm @@ -35,7 +35,7 @@ ;;; Copyright © 2022 Leo Nikkilä ;;; Copyright © 2022 kiasoc5 ;;; Copyright © 2023 Benjamin -;;; Copyright © 2023 Felix Lechner +;;; Copyright © 2023, 2024 Felix Lechner ;;; Copyright © 2023 Fries ;;; Copyright © 2023 Hilton Chain ;;; Copyright © 2023 Katherine Cox-Buday @@ -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