From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id CEFvKZB0FWZmNAAAe85BDQ:P1 (envelope-from ) for ; Tue, 09 Apr 2024 19:02:08 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id CEFvKZB0FWZmNAAAe85BDQ (envelope-from ) for ; Tue, 09 Apr 2024 19:02:08 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=redscript.org header.s=mail1-rsa header.b=qi14WS+w; dkim=fail ("headers eddsa verify failed") header.d=redscript.org header.s=mail1-ed25519 header.b=QY6rHgGc; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1712682128; a=rsa-sha256; cv=none; b=WzCONJJHX8T0mMMBBiYygcnBQ0DUxbmaJUQmO08ML5iHWZuaPlk7PIg5HjYrsukB/8WRoS 40KpkKKewrHXTvhwP4WqQ/ru8DZHq+zvTGC0LgcqqUzJKngYZNuYlyRgsJ5iOjpn18ApHZ LWofDDBPPhHglmEzaownnIzimoQei4398ruFcUbV3HKULThn3cid9vGtchSWM3pE7EqDK6 0JPSkVUo1k9+wngv9BWeQQXM36eVq8sMJtRkmSCM7X0xyTWfATCksdbxME1JPZ+A/mnYkH CfeFohVa76GYa8Ve5U9hAHT6Mipy7ylbTYX62OucWkIy4ldVyk8MAfbVCrnwog== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=redscript.org header.s=mail1-rsa header.b=qi14WS+w; dkim=fail ("headers eddsa verify failed") header.d=redscript.org header.s=mail1-ed25519 header.b=QY6rHgGc; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1712682128; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=30kkikrkh1No09b77KVBPc3wHnECQmy3qBjndSttW5U=; b=G3SX9UKHgeNuWccglFBqDhzYs4MNyyEpG4MoxN1ZTsp1gzvfOVZsOWgOGKuun7tC61//D/ 4ypipDG+Wg1FplinbwYW1rYEHK3f11EbTziyYB+Jr/n5oKj/tOIczpLsIR8nGa02MqwNcB m9eRB3FCZO4WTZBYVOWbQW7g8hmqup2GChy63Ngez3C/S6BqLnKgNgL92lgCtafOT/xF/d B/YU99EIazCKhPStud6DSUUpkCKdRso/fb7X0XigQOGv7mwVN/pW3kImysq84JTOMkwkm+ dGUP/e07I9CiG+/zTdx9HmT6w8oV8x+bhzb1PAiF2ruQvkTpwzEyvVACnaOirA== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 474357BAE9 for ; Tue, 9 Apr 2024 19:02:07 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ruErB-0000PH-R8; Tue, 09 Apr 2024 13:02:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ruEr5-0000Ot-WE for guix-patches@gnu.org; Tue, 09 Apr 2024 13:01:56 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ruEr5-0003TK-Lj for guix-patches@gnu.org; Tue, 09 Apr 2024 13:01:55 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ruErD-00026S-FY for guix-patches@gnu.org; Tue, 09 Apr 2024 13:02:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64348] [PATCH v5] gnu: Add durden. References: <3136090a794cd91a2500d3979236bfc3701f17d9.1688034098.git.a.r.draidi@redscript.org> In-Reply-To: <3136090a794cd91a2500d3979236bfc3701f17d9.1688034098.git.a.r.draidi@redscript.org> Resent-From: Ahmad Draidi Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 09 Apr 2024 17:02:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64348 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64348@debbugs.gnu.org Cc: Ahmad Draidi , liliana.prikler@gmail.com Received: via spool by 64348-submit@debbugs.gnu.org id=B64348.17126821118026 (code B ref 64348); Tue, 09 Apr 2024 17:02:03 +0000 Received: (at 64348) by debbugs.gnu.org; 9 Apr 2024 17:01:51 +0000 Received: from localhost ([127.0.0.1]:51333 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ruEr1-00025N-2z for submit@debbugs.gnu.org; Tue, 09 Apr 2024 13:01:51 -0400 Received: from rainycloud.ext.redscript.org ([103.105.48.212]:53926) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ruEqs-000245-PU for 64348@debbugs.gnu.org; Tue, 09 Apr 2024 13:01:49 -0400 Received: from localhost.localdomain (bba-92-98-21-134.alshamil.net.ae [92.98.21.134]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by rainycloud.ext.redscript.org (Postfix) with ESMTPSA id AE6A27AC4; Tue, 9 Apr 2024 17:01:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redscript.org; s=mail1-rsa; t=1712682087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=30kkikrkh1No09b77KVBPc3wHnECQmy3qBjndSttW5U=; b=qi14WS+wN+gH7wCNRdIBw2cNga5arJcyR4/XOTm8exuLB8t+K1DuuFx81Cb3JZpUVytHOW ExDiqGzoyqL+GLy3eBl+/wdVjt1/CCE5vTrMpplE/QiTypp4YAkYkgYq/kHJmHrAvwA1Pi wGa/ymP7zvcgNOcQ4zEdJG+TExBhHpUp/hKxc+IV4e2BzugBJAJ/QITQ0SWJ/DSag7jkuI EcPtACeJq8Br3bbv7qPvaNudFtQVxdxf4JgNlB7YJarIaiWy01+IN2qnlW3HvDzW5ERBX3 C0XhWI0+ftpH0/LvQSWCQokzY8n/lttIwYG+ppfXKnGOhivjJkfSwMP+XwnjC68JOzgMUs x4m5+WahMFqkzxg6/FkdchN0WOMVZZ0vx4VAqZhEP8YhsnCFuMULR70BXaNQ76k+flODOD wY6b6qnlEa8DySKJKDlRjIjjbkRhG+ao4eaVJ6DQTSbUCztUqpPMi9YaEHIMwi7+6qnBkj p3HcqPA+3ge7wKtBWlyJ+y5jjELwuQPaHdid8mTH1JdQwiWTgkQRsFxEyRVsXjhx6AF6SP sM4sgiQ3+2Uh+7K8dFYp5OE55eSdo8zq9nsEE1dRcP6TRplDJeNw3hpotcn99V64VTovqK Rk8y0UPrhp8K63Juvn4/lopYW7cblnc0Gzlqv2ZHce52d5AYiBNaQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=redscript.org; s=mail1-ed25519; t=1712682087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=30kkikrkh1No09b77KVBPc3wHnECQmy3qBjndSttW5U=; b=QY6rHgGcAp/E5xEES+jIRGjOdlVMkEzk5sRWjKJ09JWhz6KDFsc366P6n3Ybgl48XZ3Vps ktLrtuR1pg3H0YAg== Date: Tue, 9 Apr 2024 20:56:50 +0400 Message-ID: <4f910ecb7fbf3a9b0fb7e39314b3f7cbe80c92cc.1712681810.git.a.r.draidi@redscript.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Ahmad Draidi X-ACL-Warn: , Ahmad Draidi via Guix-patches From: Ahmad Draidi via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Spam-Score: -6.87 X-Migadu-Queue-Id: 474357BAE9 X-Migadu-Spam-Score: -6.87 X-Migadu-Scanner: mx10.migadu.com X-TUID: 8RZ6vhrr3zQT * gnu/packages/arcan.scm (durden): New variable. * gnu/packages/patches/durden-shadow-arcan.patch: New file. * gnu/local.mk: Register it. Change-Id: I3ea34563c74c227eed40f4ad50d23713c45ce70b --- Greetings, I tested this patch version using nested arcan (under wayland) and natively. Hopefully this is the last version. Thanks! v2 changes: Rebase to fix conflicts v3 changes: Update to commit matching Arcan 0.6.3 (68016) v4 changes: Hard-code coreutils and arcan paths in "durden" shell script v5 changes: Use set-uid arcan if available, otherwise use hard-coded from store gnu/local.mk | 1 + gnu/packages/arcan.scm | 73 ++++++++++++++++++- .../patches/durden-shadow-arcan.patch | 42 +++++++++++ 3 files changed, 115 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/durden-shadow-arcan.patch diff --git a/gnu/local.mk b/gnu/local.mk index 255bb870e9..81ea687b61 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1120,6 +1120,7 @@ dist_patch_DATA = \ %D%/packages/patches/dune-common-skip-failing-tests.patch \ %D%/packages/patches/dune-grid-add-missing-include-cassert.patch \ %D%/packages/patches/dune-istl-fix-solver-playground.patch \ + %D%/packages/patches/durden-shadow-arcan.patch \ %D%/packages/patches/dvd+rw-tools-add-include.patch \ %D%/packages/patches/dynaconf-unvendor-deps.patch \ %D%/packages/patches/dyninst-fix-glibc-compatibility.patch \ diff --git a/gnu/packages/arcan.scm b/gnu/packages/arcan.scm index c4dfa8da3e..f86e8206e5 100644 --- a/gnu/packages/arcan.scm +++ b/gnu/packages/arcan.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2019 L p R n d n ;;; Copyright © 2021 Guillaume Le Vaillant -;;; Copyright © 2023 Ahmad Draidi +;;; Copyright © 2023, 2024 Ahmad Draidi ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,6 +20,7 @@ (define-module (gnu packages arcan) #:use-module (guix build-system cmake) + #:use-module (guix build-system copy) #:use-module (guix build-system meson) #:use-module (guix build-system gnu) #:use-module (guix gexp) @@ -27,8 +28,10 @@ (define-module (gnu packages arcan) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix utils) + #:use-module (gnu packages) #:use-module (gnu packages audio) #:use-module (gnu packages autotools) + #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages compression) #:use-module (gnu packages databases) @@ -183,6 +186,74 @@ (define-public arcan-sdl "-DSTATIC_FREETYPE=off" "-DSHMIF_TUI_ACCEL=on"))))) (synopsis "Combined display server, multimedia framework and game engine (SDL)"))) +(define-public durden + ;; Match Arcan 0.6.3 + (let ((commit "a8938b9c835f55bedc2c42aec4ddc5c9739eb949") + (revision "1")) + (package + (name "durden") + (version (git-version "0.6.1" revision commit)) + (source + (origin + (method git-fetch) + (file-name (git-file-name name version)) + (uri (git-reference + (url "https://github.com/letoram/durden") + (commit commit))) + (sha256 + (base32 "1ybi6x2kwn597kjqycrqmlvp6z79yv2jfwzgx937wcckm55xlpvk")) + (patches (search-patches "durden-shadow-arcan.patch")))) + (build-system copy-build-system) + (arguments + (list + #:install-plan #~'(("durden/" "share/arcan/appl/durden/") + ("util/" "share/arcan/appl/durden/util/") + ("distr/durden" "bin/durden")) + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'patch-paths + (lambda* (#:key inputs outputs #:allow-other-keys) + (substitute* "distr/durden" + (("/usr/share/\\$applname") + (string-append (assoc-ref outputs "out") + "/share/arcan/appl")) + (("@ARCAN_STORE_PATH@") + (string-append (assoc-ref inputs "arcan") + "/bin/arcan")) + (("([\\([:blank:]]+)basename " _ separator) + (string-append separator + (assoc-ref inputs "coreutils") + "/bin/basename ")) + (("([\\([:blank:]]+)date " _ separator) + (string-append separator + (assoc-ref inputs "coreutils") + "/bin/date ")) + (("([\\([:blank:]]+)ln " _ separator) + (string-append separator + (assoc-ref inputs "coreutils") + "/bin/ln ")) + (("([\\([:blank:]]+)mkdir " _ separator) + (string-append separator + (assoc-ref inputs "coreutils") + "/bin/mkdir ")) + (("([\\([:blank:]]+)true; " _ separator) + (string-append separator + (assoc-ref inputs "coreutils") + "/bin/true; ")) + (("([\\([:blank:]]+)\\[ " _ separator) + (string-append separator + (assoc-ref inputs "coreutils") + "/bin/[ ")))))))) + (inputs (list arcan coreutils)) + (home-page "https://durden.arcan-fe.com/") + (synopsis "Desktop Environment for Arcan") + (description + "Durden is a desktop environment for the Arcan Display Server. +It serves both as a reference showcase on how to take advantage of some of the +features in Arcan, and as an entry to the advanced-user side of the desktop +environment spectrum.") + (license (list license:bsd-3 license:expat license:cc-by3.0 + license:cc-by4.0 license:asl2.0))))) + (define-public xarcan (package (name "xarcan") 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 +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 + base-commit: 6d0502f9c3608ffd6b3b3c9b603cb5d4ad14d8c9 -- 2.41.0