unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob b666a6d7e33711433bb29dcabc47af28dcdd6239 1191 bytes (raw)
name: packages/patches/durden-shadow-arcan.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
 
From 157524b7cb76c5044a27f4a9e373ee04a9da3c71 Mon Sep 17 00:00:00 2001
From: Ahmad Draidi <a.r.draidi@redscript.org>
Date: Tue, 9 Apr 2024 18:26:52 +0400
Subject: [PATCH] Use arcan from setuid-programs if available

---
 distr/durden | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/distr/durden b/distr/durden
index ab431ce..8672556 100755
--- a/distr/durden
+++ b/distr/durden
@@ -1,5 +1,11 @@
 #!/bin/sh
 
+if [ -n "$(command -v /run/setuid-programs/arcan 2>/dev/null)" ]; then
+	ARCAN_CMD="/run/setuid-programs/arcan"
+else
+	ARCAN_CMD="@ARCAN_STORE_PATH@"
+fi
+
 arcan_base=${HOME}/.arcan
 applname="$(basename $0)"
 distargs=""
@@ -98,11 +104,11 @@ while true; do
 	starttime=$(date +%s)
 
 	if [ -d "${arcan_logpath}" ]; then
-		if arcan ${distargs} -b "$applname" "$applname" "$@" >"${arcan_logpath}/${applname}_${starttime}.log" 2>&1; then
+		if "${ARCAN_CMD}" ${distargs} -b "$applname" "$applname" "$@" >"${arcan_logpath}/${applname}_${starttime}.log" 2>&1; then
 			exit
 		fi
 	else
-		if arcan ${distargs} -b "$applname" "$applname" "$@"; then
+		if "${ARCAN_CMD}" ${distargs} -b "$applname" "$applname" "$@"; then
 			exit
 		fi
 	fi
-- 
2.41.0


debug log:

solving b666a6d7e33711433bb29dcabc47af28dcdd6239 ...
found b666a6d7e33711433bb29dcabc47af28dcdd6239 in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

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).