From patchwork Thu Aug 10 18:16:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ahmad Draidi X-Patchwork-Id: 52727 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 6FCDD27BBEA; Thu, 10 Aug 2023 19:26:51 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 9102F27BBE2 for ; Thu, 10 Aug 2023 19:26:50 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qUAMT-0001lK-RX; Thu, 10 Aug 2023 14:26:18 -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 1qUAMR-0001iV-Bi for guix-patches@gnu.org; Thu, 10 Aug 2023 14:26:15 -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 1qUAMQ-0005Or-Dx; Thu, 10 Aug 2023 14:26:14 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qUAMF-0004Kp-LJ; Thu, 10 Aug 2023 14:26:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64387] [PATCH v2 3/6] gnu: arcan: Fix paths handling. Resent-From: Ahmad Draidi Original-Sender: "Debbugs-submit" Resent-CC: paren@disroot.org, guix@cbaines.net, ludo@gnu.org, othacehe@gnu.org, rg@raghavgururajan.name, rekado@elephly.net, zimon.toutoune@gmail.com, me@tobias.gr, jgart@dismail.de, guix-patches@gnu.org Resent-Date: Thu, 10 Aug 2023 18:26:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64387 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64387@debbugs.gnu.org Cc: Ahmad Draidi , paren@disroot.org, guix@cbaines.net, ludo@gnu.org, othacehe@gnu.org, rg@raghavgururajan.name, rekado@elephly.net, zimon.toutoune@gmail.com, me@tobias.gr, jgart@dismail.de X-Debbugs-Original-Xcc: paren@disroot.org, guix@cbaines.net, ludo@gnu.org, othacehe@gnu.org, rg@raghavgururajan.name, rekado@elephly.net, zimon.toutoune@gmail.com, me@tobias.gr, jgart@dismail.de Received: via spool by 64387-submit@debbugs.gnu.org id=B64387.169169195616593 (code B ref 64387); Thu, 10 Aug 2023 18:26:03 +0000 Received: (at 64387) by debbugs.gnu.org; 10 Aug 2023 18:25:56 +0000 Received: from localhost ([127.0.0.1]:44024 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUAM7-0004JY-IM for submit@debbugs.gnu.org; Thu, 10 Aug 2023 14:25:55 -0400 Received: from rainycloud.ext.redscript.org ([2402:28c0:4:1081::1]:57850) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUAM5-0004Ir-On for 64387@debbugs.gnu.org; Thu, 10 Aug 2023 14:25:54 -0400 Received: from localhost.localdomain (bba-2-51-85-87.alshamil.net.ae [2.51.85.87]) (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 BAAB421D7; Thu, 10 Aug 2023 18:25:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redscript.org; s=mail1-rsa; t=1691691948; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LQIItoTDslyJ9eN/MRKpELZLsnU6y8EJh3zTgY5D6Gc=; b=NKgCseQiqfHvGzlzNcCahA2+IYyUmuQYLDubHu2JGYEZZWIm6wlHX5LfQEFDz65LH5TXLH KxDTc5MjL9scmpHT1Di1318/lBMIBZl0pGeIlSBcBc+JMIdSqJmM78ngn9+VL/go9fmm0H h+zk6+m8NYRZDB8Z9ToS+eors6X4uSVHBmDZsBv9UFlM4YWSH3nmh05azzjhwPqrNXd6cZ lDXnh0kM0n+yA+P9g2fegBEAZUFFYZXfu4KWeeAsRIICRmOoeVNxjPlGZIFzXDDOH4o4ik o69k60qEooD/dC41XuRh9XbZEKSPWmv8WTZeu95tIa2qIOuqbW5jHE+uelGiZWNOXaWyW+ 4fta8JKLSQcohb3+i2ihdFxbNgdF2tgAaqmHlAezz9A0ag0vnYPeSy/wye5qcUO7PMfnRQ w+eG1HFFrN87u5NGtlyLhpE35sxhi0fjq7Jf6edy3I751A/IumRPDVTsger3urWM8GnRH3 nEONEgo6XBqO03fFSiBrMQFcU5Y31gP6EOWkjqSZ41auGY6qlDVMWJX6MIx8MH/5PGbMXi PQIsVOh2aklydjKtXiYHDTdTx2uwL4I6IbUnmCAlyZCq9l78zDOKhgc+rdiZBkXAUHMh2R fjogJ91GxKD9HseKsGuKCJoI8ETaKjb5csxMIn17ZW069Ruow6phA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=redscript.org; s=mail1-ed25519; t=1691691948; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LQIItoTDslyJ9eN/MRKpELZLsnU6y8EJh3zTgY5D6Gc=; b=twqTYqzGbiea7szcl/Mw0KdkV57m+jmkmh/hhBMRFimMt4my7+YDP6utgcDyGL24fKZ5/U VNzhxDZb6tIiGHAg== Date: Thu, 10 Aug 2023 22:16:35 +0400 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 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 X-Patchwork-Original-From: Ahmad Draidi via Guix-patches via From: Ahmad Draidi Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches This patch removes the wrapper and the propagated environment variables (through 'native-search-paths') and instead patches the paths inside the source code. This fixes path handling, which seems to be broken now. It also allows us to use 'setuid', which is required for some features, and lets the app use its internal path handling criteria, which some dependent apps expect. * gnu/packages/arcan.scm (arcan): Fix paths handling. [arguments]: Add 'patch-paths' phase. Remove 'wrap-program' phase. [native-search-paths]: Remove. --- gnu/packages/arcan.scm | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/gnu/packages/arcan.scm b/gnu/packages/arcan.scm index cfd72f6e55..159c6d2190 100644 --- a/gnu/packages/arcan.scm +++ b/gnu/packages/arcan.scm @@ -79,6 +79,11 @@ (define-public arcan "-DDISTR_TAG='Guix'") #:phases (modify-phases %standard-phases + (add-after 'unpack 'patch-paths + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "src/platform/posix/paths.c" + (("/usr/local") + (assoc-ref outputs "out"))))) ;; Normally, it tries to fetch patched openal with git ;; but copying files manually in the right place seems to work too. (add-after 'unpack 'prepare-static-openal @@ -94,30 +99,8 @@ (define-public arcan (add-before 'configure 'chdir (lambda _ (chdir "src") - #t)) - (add-after 'install 'wrap-program - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (wrap-program (string-append out "/bin/arcan") - `("ARCAN_RESOURCEPATH" ":" suffix - (,(string-append out "/share/arcan/resources"))) - `("ARCAN_STATEBASEPATH" ":" = - ("$HOME/.arcan/resources/savestates")) - `("ARCAN_STATEPATH" ":" = - ("$HOME/.arcan/resources/savestates")) - `("ARCAN_BINPATH" ":" = - (,(string-append out "/bin/arcan_frameserver"))))) #t))) #:tests? #f)) - (native-search-paths - (list (search-path-specification - (variable "ARCAN_APPLBASEPATH") - (separator #f) - (files '("share/arcan/appl"))) - (search-path-specification - (variable "ARCAN_SCRIPTPATH") - (separator #f) - (files '("share/arcan/scripts"))))) (inputs `(("bash-minimal" ,bash-minimal) ("espeak" ,espeak)