From patchwork Fri Jun 30 22:07:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ahmad Draidi X-Patchwork-Id: 51476 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 D867327BBE9; Fri, 30 Jun 2023 23:08:32 +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 5ACB527BBE2 for ; Fri, 30 Jun 2023 23:08:31 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qFMHe-0002fa-GD; Fri, 30 Jun 2023 18:08:06 -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 1qFMHa-0002dP-To for guix-patches@gnu.org; Fri, 30 Jun 2023 18:08:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qFMHa-0002CI-L3 for guix-patches@gnu.org; Fri, 30 Jun 2023 18:08:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qFMHa-000332-Hf for guix-patches@gnu.org; Fri, 30 Jun 2023 18:08:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64387] [PATCH 3/6] gnu: arcan: Fix paths handling. Resent-From: Ahmad Draidi Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 30 Jun 2023 22:08:02 +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 Received: via spool by 64387-submit@debbugs.gnu.org id=B64387.168816286811650 (code B ref 64387); Fri, 30 Jun 2023 22:08:02 +0000 Received: (at 64387) by debbugs.gnu.org; 30 Jun 2023 22:07:48 +0000 Received: from localhost ([127.0.0.1]:55928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFMHL-00031q-NX for submit@debbugs.gnu.org; Fri, 30 Jun 2023 18:07:48 -0400 Received: from rainycloud.ext.redscript.org ([103.105.48.212]:41370) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFMHI-00031O-Id for 64387@debbugs.gnu.org; Fri, 30 Jun 2023 18:07:44 -0400 Received: from localhost.localdomain (bba-92-97-100-179.alshamil.net.ae [92.97.100.179]) (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 3ACD23854; Fri, 30 Jun 2023 22:07:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redscript.org; s=mail1-rsa; t=1688162858; 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=hj6ebMp4hK66n+NySaoSYY8gJdTb1nxhHjaTXl8IMM8=; b=OXM9OWXUBuCzaNKmT2tVIa2zUBCXqzFzw/nAXoLC7vqRQKtJsYwVHS8bNlPT7nSKNzfhv8 2f2V4fUXbZevuRzlcZUGl6/WNlSVGavVSTcWvHJTN5tFWu0l3T25YspGvKm/K+qsqQlGxF Gac2R8WCrL6jWno0EsQsolQmbtcFOwM1fgfRwvSO72VUxdDnUA20FBy0MRDCg9es7TSc3C mJVlqHsWNbrAnVM3vbscBmzb/1jud3uldWFHU+pluNBG6hsXaBP8GAqgzx96i/US2fFB4v qBTDbiPkw/eoAbR5Ryrq1v+5Ytox2LTqBAQpABEAOjvCsxERyMU3Oe1epdyI1O3Jdjh6jn usqO159XFM3pBVsA4SgCxsX15nE8gp/ELyryIuQFAVg16hkSHNDSN35zCoEq9CQD7amaXD FqGbehrk1ZdIqyWMQ/pDTD+OlNtHf9aB213gVqAa4snT2+BIxUr/Hxe8GTYIO0DMeD8nla KtMYkupxMpsjOpJqEidQTXIfmCILxdB/aWgzT96egay4KU76NJ09zFlpJj74Fs5X65Ryql Koh+cu7MnEIYJv4ZNl6Ivljf/JHMzjvLt2Jwpl7yl/PQa3dshKi9y+plxL6xUWPsyjEoso laRdLDaIY8XdVoXdtF7hPBBRFi6xKnX7JdbDh8XV/zABKNp8a+A7I= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=redscript.org; s=mail1-ed25519; t=1688162858; 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=hj6ebMp4hK66n+NySaoSYY8gJdTb1nxhHjaTXl8IMM8=; b=4SaDPxRGfkVVXw0OiLNknsJtMPeq0bQpmb3jVVvhUrewEk3QxzoqslLKI9lKYu5ETDOXw9 fFIIidYl14zMwDCw== Date: Sat, 1 Jul 2023 02:07:08 +0400 Message-Id: <88537d4db68bd306c1f3efae8b6ed52290ca66e2.1688161433.git.a.r.draidi@redscript.org> X-Mailer: git-send-email 2.40.1 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)