diff options
author | Ahmad Draidi <a.r.draidi@redscript.org> | 2024-04-09 20:56:50 +0400 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2024-04-11 12:38:23 +0200 |
commit | 43719864cfdfdea0dcae451af519da629c5ddd86 (patch) | |
tree | 8a297216f4b421626a53b798df06dadab531a6f1 /gnu/packages/patches | |
parent | ce2d140c5b15a84fbff2b7f0e1fda12fe21a0f66 (diff) | |
download | guix-43719864cfdfdea0dcae451af519da629c5ddd86.tar.gz |
gnu: Add durden.
* gnu/packages/arcan.scm (durden): New variable. * gnu/packages/patches/durden-shadow-arcan.patch: New file. * gnu/local.mk: Register it. Change-Id: I3ea34563c74c227eed40f4ad50d23713c45ce70b Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/durden-shadow-arcan.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/gnu/packages/patches/durden-shadow-arcan.patch b/gnu/packages/patches/durden-shadow-arcan.patch new file mode 100644 index 0000000000..b666a6d7e3 --- /dev/null +++ b/gnu/packages/patches/durden-shadow-arcan.patch @@ -0,0 +1,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 + |