From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id KDdmJl9Sn2RFCQEASxT56A (envelope-from ) for ; Sat, 01 Jul 2023 00:08:31 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id oLF+JV9Sn2Tk6QAAG6o9tA (envelope-from ) for ; Sat, 01 Jul 2023 00:08:31 +0200 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 524CB17E39 for ; Sat, 1 Jul 2023 00:08:31 +0200 (CEST) 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 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-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1688162911; a=rsa-sha256; cv=none; b=BzlToBxr+0fTBnpo9pXR4GJt98DnBIZ6YYjlcM15I8AzWLocAWrsDozU8jxxpVXi56jY8l LWPHoZn3Oa7d95RtOD6EKQIhroe5lv2+FRdexidCxdEe3PtrdgXyxIZ5rASJ5dBfhL8bvd jYymLeBJWdaBv2H9l0tatqMuzKhcoTyNXQmU+wG4HUCZgZb/jIkNBqlQ1eMt61oLJz8I6d kUTmhlLutREmQt0V4ob3rCVGPcDXBR3y3IQ1rVEbRnMSIuMRr7nLUIIZQDCbSXVrlVh6Lw iYUKB3NKpa/Dzi0u9f+HPY4VXaKJqkvpKi/OMN0ArQr8fnz0fCd8ycippAYdVA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=redscript.org header.s=mail1-rsa header.b=OXM9OWXU; dkim=fail ("headers eddsa verify failed") header.d=redscript.org header.s=mail1-ed25519 header.b=4SaDPxRG; 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=1688162911; 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-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=hj6ebMp4hK66n+NySaoSYY8gJdTb1nxhHjaTXl8IMM8=; b=cQ2slcqFwIZYBHWDq5A5WTJa6O9c0lNeETojqe/14q49rEl66UJWV02hr8g0pFvGC0lwJm 0Z69W5Kcvnbzo5S3cabNuvJtPWYXXwyUk7ULwgVq+YpxBsHXTrmu7S2jdR6N9GMByeRpp/ GhNFGRHb88rQj5nPxeGaPGJObyKavHKQIam6x6JOrTsyqr92UnwajtsLwGpd2kUCbhL9QP J5jTA4eR+HfvXBp15REMTU+jN3UGwLlI0I9HIUchlKQSzzfHyR/iic1WoUxOWzYgnKIK0v IPJMx65ToJal1RNQIrXljxBJhpN6i8jl47KpsrDaOcFgCe1gQTGfqnikHuDhAw== Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=redscript.org header.s=mail1-rsa header.b=OXM9OWXU; dkim=fail ("headers eddsa verify failed") header.d=redscript.org header.s=mail1-ed25519 header.b=4SaDPxRG; 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" X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -3.06 X-Spam-Score: -3.06 X-Migadu-Queue-Id: 524CB17E39 X-TUID: Hy9DN0kJ6/t6 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) -- 2.40.1