From 8546f4da5b3677001dbda6b3a116f5bdc44ea5c0 Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Tue, 28 Apr 2020 02:29:36 -0400 Subject: gnu: udevil: Fix loading of setuid-programs. * gnu/packages/disk.scm (udevil)[arguments]<#:configure-flags>: Add "--with-mount-prog", "--with-umount-prog", "--with-losetup-prog", "--with-setfacl-prog". [arguments]<#:phases>[patch-udevil-reference]: New phase. Signed-off-by: Danny Milosavljevic --- gnu/packages/disk.scm | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'gnu/packages/disk.scm') diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm index b7d3b9d954..2b9ba8e38d 100644 --- a/gnu/packages/disk.scm +++ b/gnu/packages/disk.scm @@ -103,16 +103,34 @@ (build-system gnu-build-system) (arguments `(#:configure-flags - (list "--disable-systemd" - (string-append "--sysconfdir=" - (assoc-ref %outputs "out") - "/etc")) + (list + "--disable-systemd" + (string-append "--sysconfdir=" + (assoc-ref %outputs "out") + "/etc") + ;; udevil expects these programs to be run with uid set as root. + ;; user has to manually add these programs to setuid-programs. + ;; mount and umount are default setuid-programs in guix system. + "--with-mount-prog=/run/setuid-programs/mount" + "--with-umount-prog=/run/setuid-programs/umount" + "--with-losetup-prog=/run/setuid-programs/losetup" + "--with-setfacl-prog=/run/setuid-programs/setfacl") #:phases (modify-phases %standard-phases (add-after 'unpack 'remove-root-reference (lambda _ (substitute* "src/Makefile.in" (("-o root -g root") "")) + #t)) + (add-after 'unpack 'patch-udevil-reference + ;; udevil expects itself to be run with uid set as root. + ;; devmon also expects udevil to be run with uid set as root. + ;; user has to manually add udevil to setuid-programs. + (lambda _ + (substitute* "src/udevil.c" + (("/usr/bin/udevil") "/run/setuid-programs/udevil")) + (substitute* "src/devmon" + (("`which udevil 2>/dev/null`") "/run/setuid-programs/udevil")) #t))))) (native-inputs `(("intltool" ,intltool) -- cgit 1.4.1 From 7dfc7c5398c16bdf27acf260c71f905d13bb3a9c Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Fri, 1 May 2020 12:45:03 -0400 Subject: gnu: xfe: Fix configuration and icons. * gnu/packages/disk.scm (xfe)[arguments]<#:make-flags>: Remove BASH_COMPLETION_DIR. [arguments]<#:phases>[patch-xferc-path]: Remove phase. [arguments]<#:phases>[patch-xfe-paths]: New phase. Signed-off-by: Danny Milosavljevic --- gnu/packages/disk.scm | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) (limited to 'gnu/packages/disk.scm') diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm index 2b9ba8e38d..f557c57749 100644 --- a/gnu/packages/disk.scm +++ b/gnu/packages/disk.scm @@ -936,8 +936,7 @@ since they are better handled by external tools.") (method url-fetch) (uri (string-append "https://sourceforge.net/projects/xfe/files/xfe/" - version - "/xfe-" version ".tar.gz")) + version "/xfe-" version ".tar.gz")) (sha256 (base32 "1fl51k5jm2vrfc2g66agbikzirmp0yb0lqhmsssixfb4mky3hpzs")))) (build-system gnu-build-system) @@ -955,20 +954,32 @@ since they are better handled by external tools.") (arguments `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'patch-xferc-path + (add-after 'unpack 'patch-xfe-paths (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (xferc (string-append out "/share/xfe/xferc"))) + (let* + ((out (assoc-ref outputs "out")) + (share (string-append out "/share")) + (xferc (string-append out "/share/xfe/xferc")) + (xfe-theme (string-append out "/share/xfe/icons/xfe-theme"))) + ;; Correct path for xfe registry. + (substitute* "src/foxhacks.cpp" + (("/etc:/usr/share:/usr/local/share") share)) + ;; Correct path for xfe configuration. (substitute* "src/XFileExplorer.cpp" - (("/usr/share/xfe/xferc") xferc)) - #t)))) - #:make-flags - (let ((out (assoc-ref %outputs "out"))) - (list (string-append "BASH_COMPLETION_DIR=" out - "/share/bash-completion/completions"))))) + (("/usr/share/xfe/xferc") xferc) + (("/usr/local/share/xfe/xferc") xferc) + (("/opt/local/share/xfe/xferc") xferc)) + ;; Correct path for xfe icons. + (substitute* "src/xfedefs.h" + (((string-append + "~/.config/xfe/icons/xfe-theme:" + "/usr/local/share/xfe/icons/xfe-theme:" + "/usr/share/xfe/icons/xfe-theme")) + xfe-theme)) + #t)))))) (synopsis "File Manager for X-Based Graphical Systems") (description"XFE (X File Explorer) is a file manager for X. It is based on the popular but discontinued, X Win Commander. It aims to be the file manager of choice for all light thinking Unix addicts!") (home-page "http://roland65.free.fr/xfe/") - (license license:gpl2+))) + (license license:gpl2+))) \ No newline at end of file -- cgit 1.4.1 From 26e11cffb983604c813064343e41708b99072e4f Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Fri, 1 May 2020 22:19:43 +0200 Subject: gnu: xfe: Use a mirror:// URL. * gnu/packages/disk.scm (xfe)[source]: Use a mirror://sourceforge URL. --- gnu/packages/disk.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gnu/packages/disk.scm') diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm index f557c57749..484126a3ea 100644 --- a/gnu/packages/disk.scm +++ b/gnu/packages/disk.scm @@ -935,8 +935,8 @@ since they are better handled by external tools.") (origin (method url-fetch) (uri - (string-append "https://sourceforge.net/projects/xfe/files/xfe/" - version "/xfe-" version ".tar.gz")) + (string-append "mirror://sourceforge/xfe/xfe/" version "/" + "xfe-" version ".tar.gz")) (sha256 (base32 "1fl51k5jm2vrfc2g66agbikzirmp0yb0lqhmsssixfb4mky3hpzs")))) (build-system gnu-build-system) @@ -982,4 +982,4 @@ since they are better handled by external tools.") the popular but discontinued, X Win Commander. It aims to be the file manager of choice for all light thinking Unix addicts!") (home-page "http://roland65.free.fr/xfe/") - (license license:gpl2+))) \ No newline at end of file + (license license:gpl2+))) -- cgit 1.4.1