* [bug#41128] SpaceFM
@ 2020-05-07 20:04 Raghav Gururajan
2020-05-08 14:13 ` bug#41128: Pushed Danny Milosavljevic
0 siblings, 1 reply; 2+ messages in thread
From: Raghav Gururajan @ 2020-05-07 20:04 UTC (permalink / raw)
To: 41128; +Cc: dannym
[-- Attachment #1: Type: text/plain, Size: 99 bytes --]
Hello Guix!
Please find the attached patch-set to fix spacefm, once in for all. :-)
Regards,
RG.
[-- Attachment #2: 0001-gnu-Add-fsarchiver.patch --]
[-- Type: application/octet-stream, Size: 1877 bytes --]
From a537ca7c8e24ce159aa992086eb90a6658a51e49 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <raghavgururajan@disroot.org>
Date: Wed, 6 May 2020 15:26:10 -0400
Subject: [PATCH 1/4] gnu: Add fsarchiver.
* gnu/packages/disk.scm (fsarchiver): New variable.
---
gnu/packages/disk.scm | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm
index 484126a3ea..8cc86aa01b 100644
--- a/gnu/packages/disk.scm
+++ b/gnu/packages/disk.scm
@@ -86,6 +86,42 @@
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages))
+(define-public fsarchiver
+ (package
+ (name "fsarchiver")
+ (version "0.8.5")
+ (source
+ (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://github.com/fdupoux/fsarchiver.git")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1rvwq5v3rl14bqxjm1ibfapyicf0sa44nw7451v10kx39lp56ylp"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("pkg-config" ,pkg-config)))
+ (inputs
+ `(("bzip2" ,bzip2)
+ ("e2fsprogs" ,e2fsprogs)
+ ("libgcrypt" ,libgcrypt)
+ ("lz4" ,lz4)
+ ("lzo" ,lzo)
+ ("util-linux" ,util-linux)
+ ("xz" ,xz)
+ ("zlib" ,zlib)
+ ("zstd:lib" ,zstd "lib")))
+ (synopsis "Filesystem Backup/Deployment Tool")
+ (description "FSArchiver allows you to save the contents of a file-system to
+a compressed archive file. The file-system can be restored on a partition which
+has a different size and it can be restored on a different file-system.")
+ (home-page "http://www.fsarchiver.org/")
+ (license license:gpl2+)))
+
(define-public udevil
(package
(name "udevil")
--
2.26.2
[-- Attachment #3: 0002-gnu-Add-gphotofs.patch --]
[-- Type: application/octet-stream, Size: 1965 bytes --]
From 92984d9e6c616a72ee6e41913f17713122f81a04 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <raghavgururajan@disroot.org>
Date: Thu, 7 May 2020 11:01:37 -0400
Subject: [PATCH 2/4] gnu: Add gphotofs.
* gnu/packages/file-systems.scm (gphotofs): New variable.
---
gnu/packages/file-systems.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm
index ce1155c755..0ff8f3efff 100644
--- a/gnu/packages/file-systems.scm
+++ b/gnu/packages/file-systems.scm
@@ -48,6 +48,7 @@
#:use-module (gnu packages linux)
#:use-module (gnu packages nfs)
#:use-module (gnu packages onc-rpc)
+ #:use-module (gnu packages photo)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages readline)
@@ -56,6 +57,33 @@
#:use-module (gnu packages valgrind)
#:use-module (gnu packages xml))
+(define-public gphotofs
+ (package
+ (name "gphotofs")
+ (version "0.5.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append "mirror://sourceforge/gphoto/gphotofs/" version
+ "/gphotofs-0.5.tar.gz"))
+ (sha256
+ (base32
+ "04slwhr6ap9xcc27wphk22ad8yn79ngyy5z10lxams3k5liahvc2"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (inputs
+ `(("fuse" ,fuse)
+ ("glib" ,glib)
+ ("libgphoto2" ,libgphoto2)))
+ (synopsis "Virtual filesystem for libgphoto2 using FUSE")
+ (description "GPhotoFS is a FUSE filesystem module to mount your camera as a
+filesystem on Linux. This allow using your camera with any tool able to read
+from a mounted filesystem.")
+ (home-page "http://www.gphoto.org/proj/gphotofs/")
+ (license license:gpl2+)))
+
(define-public bcachefs-tools
(let ((commit "ab2f1ec24f5307b0cf1e3c4ad19bf350d9f54d9f")
(revision "0"))
--
2.26.2
[-- Attachment #4: 0003-gnu-ktsuss-Revert-to-default-Su.patch --]
[-- Type: application/octet-stream, Size: 1373 bytes --]
From bff62aa984d45912e2b4c9a7ba23fa48c670b189 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <raghavgururajan@disroot.org>
Date: Thu, 7 May 2020 11:31:02 -0400
Subject: [PATCH 3/4] gnu: ktsuss: Revert to default Su.
* gnu/packages/admin.scm (ktsuss): Use Su instead of Sudo; for
compatiblity with SpaceFM.
[arguments]: Remove sudo from configure-flags.
[arguments]: Remove sudopath from phases.
---
gnu/packages/admin.scm | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index cb3de79713..2feafa8ceb 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -146,17 +146,13 @@
(file-name (git-file-name name version))))
(build-system glib-or-gtk-build-system)
(arguments
- `(#:configure-flags
- (list "--enable-sudo=yes")
- #:phases
+ `(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-file-names
(lambda _
(substitute* "configure.ac"
(("supath=`which su 2>/dev/null`")
- "supath=/run/setuid-programs/su")
- (("sudopath=`which sudo 2>/dev/null`")
- "sudopath=/run/setuid-programs/sudo"))
+ "supath=/run/setuid-programs/su"))
#t)))))
(native-inputs
`(("autoconf" ,autoconf)
--
2.26.2
[-- Attachment #5: 0004-gnu-Fix-SpaceFM.patch --]
[-- Type: application/octet-stream, Size: 9743 bytes --]
From 1135140e68ee7e7d742a913e0d021d5ae3994c04 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <raghavgururajan@disroot.org>
Date: Thu, 7 May 2020 15:51:43 -0400
Subject: [PATCH 4/4] gnu: Fix SpaceFM.
* gnu/packages/lxde.scm (spacefm): Update package definition.
[source]: Change from url-fetch to git-fetch.
[inputs]: Add btrfs-progs, coreutils, e2fsprogs, fsarchiver,
gphotofs, ntfs-3g and procps.
[arguments]: Add phases to patch bin-dirs, share-dirs, mime-dirs,
setuid-progs and spacefm-conf. Remove phase 'patch-source-files.
[arguments]: Add configure-flag for preferable-sudo.
---
gnu/packages/lxde.scm | 129 +++++++++++++++++++++++++++++++++---------
1 file changed, 102 insertions(+), 27 deletions(-)
diff --git a/gnu/packages/lxde.scm b/gnu/packages/lxde.scm
index a52e403106..38dcd0e8ed 100644
--- a/gnu/packages/lxde.scm
+++ b/gnu/packages/lxde.scm
@@ -29,6 +29,7 @@
#:use-module (gnu packages)
#:use-module (gnu packages admin)
#:use-module (gnu packages autotools)
+ #:use-module (gnu packages base)
#:use-module (gnu packages bash)
#:use-module (gnu packages disk)
#:use-module (gnu packages docbook)
@@ -56,6 +57,7 @@
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix utils))
@@ -250,25 +252,26 @@ with freedesktop.org standard.")
(package
(name "spacefm")
(version "1.0.6")
- (source (origin
- (method url-fetch)
- (uri (string-append
- "https://github.com/IgnorantGuru/spacefm/archive/"
- version ".tar.gz"))
- (sha256
- (base32
- "1jg7xfyr7kihjnalxp8wxyb9qjk8hqf5l36rp3s0lvkpmpyakppy"))
- (modules '((guix build utils)))
- (snippet
- '(begin
- (substitute* "src/main.c"
- (("#include <sys/types\\.h>" all)
- ;; Add missing include for 'major' and 'minor' with glibc
- ;; >= 2.28.
- (string-append all "\n"
- "#include <sys/sysmacros.h>\n")))
- #t))
- (file-name (string-append name "-" version ".tar.gz"))))
+ (source
+ (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://github.com/IgnorantGuru/spacefm.git")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "193mdcv73cfc2bnm4bzmnf1wmkzgj1ya64y0lgyxn3ww36ghcsx9"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ (substitute* "src/main.c"
+ (("#include <sys/types\\.h>" all)
+ ;; Add missing include for 'major' and 'minor' with glibc
+ ;; >= 2.28.
+ (string-append all "\n"
+ "#include <sys/sysmacros.h>\n")))
+ #t))))
(build-system glib-or-gtk-build-system)
(native-inputs
`(("desktop-file-utils" ,desktop-file-utils)
@@ -278,20 +281,27 @@ with freedesktop.org standard.")
("pkg-config" ,pkg-config)))
(inputs
`(("bash" ,bash)
+ ("btrfs-progs" ,btrfs-progs)
("cairo" ,cairo)
+ ("coreutils" ,coreutils)
("curlftpfs" ,curlftpfs)
+ ("e2fsprogs" ,e2fsprogs)
("eudev" ,eudev)
("fakeroot" ,fakeroot)
("ffmpegthumbnailer" ,ffmpegthumbnailer)
+ ("fsarchiver" ,fsarchiver)
("fuseiso" ,fuseiso)
("glib" ,glib)
+ ("gphotofs" ,gphotofs)
("gtk+" ,gtk+)
("ifuse" ,ifuse)
("jmtpfs" ,jmtpfs)
("ktsuss" ,ktsuss)
("libx11" ,libx11)
("lsof" ,lsof)
+ ("ntfs-3g" ,ntfs-3g)
("pango" ,pango)
+ ("procps" ,procps)
("shared-mime-info" ,shared-mime-info)
("startup-notification" ,startup-notification)
("udevil" ,udevil)
@@ -300,23 +310,88 @@ with freedesktop.org standard.")
(arguments
`(#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'patch-source-files
+ (add-after 'unpack 'patch-bin-dirs
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let* ((bash (assoc-ref inputs "bash"))
+ (coreutils (assoc-ref inputs "coreutils"))
+ (util-linux (assoc-ref inputs "util-linux"))
+ (procps (assoc-ref inputs "procps"))
+ (e2fsprogs (assoc-ref inputs "e2fsprogs"))
+ (btrfs-progs (assoc-ref inputs "btrfs-progs"))
+ (ntfs-3g (assoc-ref inputs "ntfs-3g"))
+ (lsof (assoc-ref inputs "lsof"))
+ (fsarchiver (assoc-ref inputs "fsarchiver"))
+ (ktsuss (assoc-ref inputs "ktsuss")))
+ (with-directory-excursion "src"
+ (substitute* '("ptk/ptk-file-task.c" "ptk/ptk-handler.h"
+ "ptk/ptk-location-view.c" "spacefm-auth"
+ "spacefm-auth.bash" "vfs/vfs-file-task.c"
+ "settings.c" "../data/ui/prefdlg.ui"
+ "../data/ui/prefdlg2.ui")
+ (("/bin/sh" file) (string-append bash file))
+ (("/bin/bash" file) (string-append bash file))
+ (("/bin/kill" file) (string-append coreutils file))
+ (("/bin/ls" file) (string-append coreutils file))
+ (("/usr(/bin/sha256sum)" _ file) (string-append coreutils file))
+ (("/usr(/bin/sha512sum)" _ file) (string-append coreutils file))
+ (("/sbin/fsck" file) (string-append util-linux file))
+ (("/sbin/mkfs" file) (string-append util-linux file))
+ (("/sbin/mkswap" file) (string-append util-linux file))
+ (("/bin/ps" file) (string-append procps file))
+ (("/sbin/tune2fs" file) (string-append e2fsprogs file))
+ (("/sbin/btrfs") (string-append btrfs-progs "/bin/btrfs"))
+ (("/sbin/ntfslabel" file) (string-append ntfs-3g file))
+ (("/usr(/bin/lsof)" _ file) (string-append lsof file))
+ (("(/usr)?/(sbin|bin)/fsarchiver") (string-append fsarchiver
+ "/sbin/fsarchiver"))
+ (("/usr(/bin/ktsuss)" _ file) (string-append ktsuss file))))
+ #t)))
+ (add-after 'patch-bin-dirs 'patch-share-dirs
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (share (string-append out "/share")))
+ (with-directory-excursion "src"
+ (substitute* '("main-window.c" "settings.c"
+ "ptk/ptk-app-chooser.c")
+ (("/usr(/local)?/share") share)))
+ #t)))
+ (add-after 'patch-share-dirs 'patch-mime-dirs
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let* ((mime (string-append (assoc-ref inputs "shared-mime-info")
+ "/share/mime")))
+ (with-directory-excursion "src"
+ (substitute* '("mime-type/mime-type.c" "ptk/ptk-file-menu.c")
+ (("/usr(/local)?/share/mime") mime)))
+ #t)))
+ (add-after 'patch-mime-dirs 'patch-setuid-progs
+ (lambda _
+ (let* ((su "/run/setuid-programs/su")
+ (mount "/run/setuid-programs/mount")
+ (umount "/run/setuid-programs/umount")
+ (udevil "/run/setuid-programs/udevil"))
+ (with-directory-excursion "src"
+ (substitute* '("settings.c" "settings.h" "vfs/vfs-file-task.c"
+ "vfs/vfs-volume-hal.c" "../data/ui/prefdlg.ui"
+ "../data/ui/prefdlg2.ui")
+ (("(/usr)?/bin/su") su)
+ (("/(bin|sbin)/mount") mount)
+ (("/(bin|sbin)/umount") umount)
+ (("/usr/bin/udevil") udevil)))
+ #t)))
+ (add-after 'patch-setuid-progs 'patch-spacefm-conf
(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")
+ "terminal_su=/run/setuid-programs/su")
(("#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-preferable-sudo="
+ (assoc-ref %build-inputs "ktsuss")
+ "/bin/ktsuss")
(string-append "--with-bash-path="
(assoc-ref %build-inputs "bash")
"/bin/bash")
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#41128: Pushed
2020-05-07 20:04 [bug#41128] SpaceFM Raghav Gururajan
@ 2020-05-08 14:13 ` Danny Milosavljevic
0 siblings, 0 replies; 2+ messages in thread
From: Danny Milosavljevic @ 2020-05-08 14:13 UTC (permalink / raw)
To: 41128-done
[-- Attachment #1: Type: text/plain, Size: 281 bytes --]
Hi,
pushed changes to guix master as commits a54f373e6ec940e08b3fc95f2b5938429001976d,
4c88ae7b0331a7d671321a345eacc2bdb7595ee5, a632eeb86cea83957cae69e58e2120cbce598723,
7ee215dea9226518911774f35130323d602a8ba9 with small changes to the commit message,
and added comments.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-08 14:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-07 20:04 [bug#41128] SpaceFM Raghav Gururajan
2020-05-08 14:13 ` bug#41128: Pushed Danny Milosavljevic
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).