gnu: spacefm: Fix privilege and disk management.

DoneSubmitted by Raghav Gururajan.
Details
2 participants
  • Danny Milosavljevic
  • Raghav Gururajan
Owner
unassigned
Severity
normal
R
R
Raghav Gururajan wrote on 30 Apr 2020 15:46
(address . guix-patches@gnu.org)
20200430094639.3d0c9786.raghavgururajan@disroot.org
From 3bad3e31dd0076e6ad87ee4e2045acd744768601 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <raghavgururajan@disroot.org>
Date: Thu, 30 Apr 2020 09:44:32 -0400
Subject: [PATCH] gnu: spacefm: Fix privilege and disk management.

Patched references to sudo, ktsuss and udevil; to load them correctly.

* gnu/packages/lxde.scm (spacefm): Fix privilege and disk management.
---
gnu/packages/lxde.scm | 34 +++++++++++++++++++++++++++-------
1 file changed, 27 insertions(+), 7 deletions(-)

Toggle diff (68 lines)
diff --git a/gnu/packages/lxde.scm b/gnu/packages/lxde.scm
index 9de96a21cb..a52e403106 100644
--- a/gnu/packages/lxde.scm
+++ b/gnu/packages/lxde.scm
@@ -27,6 +27,7 @@
 
 (define-module (gnu packages lxde)
   #:use-module (gnu packages)
+  #:use-module (gnu packages admin)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages disk)
@@ -279,7 +280,6 @@ with freedesktop.org standard.")
      `(("bash" ,bash)
        ("cairo" ,cairo)
        ("curlftpfs" ,curlftpfs)
-       ("dbus" ,dbus)
        ("eudev" ,eudev)
        ("fakeroot" ,fakeroot)
        ("ffmpegthumbnailer" ,ffmpegthumbnailer)
@@ -288,6 +288,7 @@ with freedesktop.org standard.")
        ("gtk+" ,gtk+)
        ("ifuse" ,ifuse)
        ("jmtpfs" ,jmtpfs)
+       ("ktsuss" ,ktsuss)
        ("libx11" ,libx11)
        ("lsof" ,lsof)
        ("pango" ,pango)
@@ -297,12 +298,31 @@ with freedesktop.org standard.")
        ("util-linux" ,util-linux)
        ("wget" ,wget)))
     (arguments
-     `(#:configure-flags (list (string-append "--with-bash-path="
-                                              (assoc-ref %build-inputs "bash")
-                                              "/bin/bash")
-                               (string-append "--sysconfdir="
-                                              (assoc-ref %outputs "out")
-                                              "/etc"))))
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-source-files
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; Patch config file to load programs correctly.
+             (substitute* "etc/spacefm.conf"
+               (("#terminal_su=/bin/su")
+                "terminal_su=/run/setuid-programs/sudo")
+               (("#graphical_su=/usr/bin/gksu")
+                (string-append "graphical_su="
+                               (string-append (assoc-ref inputs "ktsuss")
+                                              "/bin/ktsuss"))))
+             ;; SpaceFM expects udevil to have uid set to root.
+             ;; User has to manually add udevil to setuid-programs.
+             (substitute* "src/settings.c"
+               (("/usr/bin/udevil")
+                "/run/setuid-programs/udevil"))
+             #t)))
+       #:configure-flags (list
+                          (string-append "--with-bash-path="
+                                         (assoc-ref %build-inputs "bash")
+                                         "/bin/bash")
+                          (string-append "--sysconfdir="
+                                         (assoc-ref %outputs "out")
+                                         "/etc"))))
     (home-page "https://ignorantguru.github.io/spacefm/")
     (synopsis "Multi-panel tabbed file manager")
     (description "SpaceFM is a graphical, multi-panel, tabbed file manager
-- 
2.26.2
D
D
Danny Milosavljevic wrote on 1 May 2020 14:15
(name . Raghav Gururajan)(address . raghavgururajan@disroot.org)(address . 40982-done@debbugs.gnu.org)
20200501141542.0de51856@scratchpost.org
Pushed to guix master as commit 53e8b852e90ec91e66172ad49f019955d7137eb1
with changes to commit message (to use our convention of change metdata logging).

Ignored src/vfs/vfs-file-task.c /usr/bin/sudo since it is not used.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl6sEu4ACgkQ5xo1VCww
uqWPoAf9Gh4Hq5WZ1L6iEOXTnsprUhG1AMDz8TytpMyjS8Bi0Kjq1sMIbA4sWUhy
iwOmfJg8dpIksJRihVqqSZnyCfuVBuFEsRIfIdhR3RRAIH/zJLXfwOQ9GAXz8drr
N5EaFFBmTaV3Ii19FVInJrx9fyrZTy4Gjp1Ns7kWp/lcNk6Gd/+DjIn1FrFc1R3W
Yx7zNyT02QH2MHGG/ISKLRWVaw2fj9NBx/gwIH1BV+EwxQP17WWNGcYmusnPy0K2
dSC+eBNQD7+QJKj7CCmi2MSoGG6THFOJKVUEKmJ5o1QMlgORJNdiAfXGdtk2L4x6
k6WB8LK25wtMf8mPK0KDI3WdQQdxMw==
=Bqib
-----END PGP SIGNATURE-----


Closed
?
Your comment

This issue is archived.

To comment on this conversation send email to 40982@debbugs.gnu.org