From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id WABqOMNYXmAlWQAAgWs5BA (envelope-from ) for ; Fri, 26 Mar 2021 22:57:23 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id KJU4MsNYXmDJIgAAbx9fmQ (envelope-from ) for ; Fri, 26 Mar 2021 21:57:23 +0000 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 87A4D11596 for ; Fri, 26 Mar 2021 22:57:23 +0100 (CET) Received: from localhost ([::1]:35090 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lPuSI-0005R7-NW for larch@yhetil.org; Fri, 26 Mar 2021 17:57:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55906) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lPuS2-0005Ow-GX for guix-devel@gnu.org; Fri, 26 Mar 2021 17:57:06 -0400 Received: from baptiste.telenet-ops.be ([2a02:1800:120:4::f00:13]:35446) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lPuRz-0000oP-SA for guix-devel@gnu.org; Fri, 26 Mar 2021 17:57:06 -0400 Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id l9wy240020mfAB4019wy93; Fri, 26 Mar 2021 22:56:58 +0100 Message-ID: Subject: Re: Specify runtime dependencies with propagated-inputs or wrapper scripts From: Maxime Devos To: =?ISO-8859-1?Q?L=E9o?= Le Bouter , guix-devel@gnu.org Date: Fri, 26 Mar 2021 22:56:45 +0100 In-Reply-To: <1e07eddcd0576658a2a02a952bdf569ba471f81a.camel@zaclys.net> References: <1e07eddcd0576658a2a02a952bdf569ba471f81a.camel@zaclys.net> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-ZoEagPHf1rAdIHGebGvo" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1616795818; bh=SQO+7ZqaWTjrzIxXglmv4ntjbeaTlpmKu1DRAibPcPE=; h=Subject:From:To:Date:In-Reply-To:References; b=vD3Zy3/Aya5iGTUr6nxMUCxozi1xoxpIff5AE3Osy49TvlnN6592jGuHm6J1h5Ckt CCuTrNkYnF20aRRZ1/qDI3IoyH9Jtb4ICK2EiEEhAbH0UWCZ7Pfu2E6EvQRlTdA9PQ hZ2bmbXvtmBGtFBsaq39UrgDZGV//4K6u4y8Wb07zIJ48LvlEndHwsksf1D+L1SYjy crqtmZmEQOiTZumTgunRWtRjgj4d6IvJ1JtTPe+0Ja/6Fb0dDD0Wi2uFXYZcmhWosC IJmjBB+QSLDbavWmGvz98fA6U9vtDyM5Y8P0WW4kFkdS6CWKvEazmMUA/xKMKeJ1ZW 4vwDUX61FHnkw== Received-SPF: pass client-ip=2a02:1800:120:4::f00:13; envelope-from=maximedevos@telenet.be; helo=baptiste.telenet-ops.be X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1616795843; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=SQO+7ZqaWTjrzIxXglmv4ntjbeaTlpmKu1DRAibPcPE=; b=tYY/c5kuufMa+vWpuCESimNtYQBDvvcymR9Im+24sBttQ4Gq+ftEFJVpc30sF/D63IwO68 iD7P1GwX3ic3xevwOtcc/ey1uKmfVnY8PIaEKO5Mpu4OVXBoIP5y0xFISReScoH2PomhZT ERAN0F/GNYfldJJBdF9TEgvyk9I1WJ4y3WAR57yPU8vR/LXVBth4SsfnUNxKuzmcWLwtpB du94L5eT0DqNUAoOEzCZ4xkqKo8cbseBVkTZ5MyNVyf8Q6SkTzynDNPZcHJU1tep0jug/J XAxYR+CFYHaGMQ8Rq0503wbXGBq7D5CWXcKQCM+NuTXoOmHd/2hAM9qCLl1cAw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1616795843; a=rsa-sha256; cv=none; b=c8lLGzWFHgBmEmplOeJa0vx0gFzpSfqjfTDjHtr7yREKvNvCgpNIfZ7n0by8XzbvmIs+IZ FUCgNp8Eyd/AACAWJMa1nMoLl4HphEt47Q64Bo9c/Ng8yCysLBamz47sZ92QpTKLOAXjJA AxYpEuAYWfVmc7tfuFPSs+bnQINY2dz4Kf7e5p1mvXac0qPSP+2bby5mTvPOxSKh2T2aId GK0N3TOhPQVvQGIqmLB+F52I6GGQYRXeBrO13XGOXPIGoTQR9OrvxAFtFkru/ySOKfeKoc fg4JxQsadHoUsPLKldZI20bA3yQY2v57+HzcJEBFcLZCP+UP0BBgXzgkO+qvTg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=telenet.be header.s=r21 header.b="vD3Zy3/A"; dmarc=pass (policy=none) header.from=telenet.be; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -5.22 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=telenet.be header.s=r21 header.b="vD3Zy3/A"; dmarc=pass (policy=none) header.from=telenet.be; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 87A4D11596 X-Spam-Score: -5.22 X-Migadu-Scanner: scn0.migadu.com X-TUID: 75EbwXCeShsX --=-ZoEagPHf1rAdIHGebGvo Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 2021-03-26 at 20:36 +0100, L=C3=A9o Le Bouter wrote: > Hello! >=20 > I often meet problems where some packages don't work out of the box > because they have some runtime dependencies like themes or third party > programs. >=20 > I solved these problems on occasion by making commits such as this:=20 > https://git.savannah.gnu.org/cgit/guix.git/commit/?id=3D00c1793ce8e2210e4= 8b18422ea3e76da10541874 > - which adds a wrapper script to "bin/chromium" and includes xdg-utils > in PATH variable. >=20 > It works but it's tedious to do for each and every binary in every > single package. >=20 > I see we also have a propagated-inputs field, which looks nice but for > some reason people advice against using it. For what reasons? One reason is incompatibility. Try "guix environment --ad-hoc pidgin eom", it will fail. (At least, it used to, due to both gtk+@2 and gtk+@3 being in a single profile, or perhaps I got the package names wrong.) Another reason is that you lose =E2=80=98scoping=E2=80=99 (not sure how to = name this). Consider each project to be like a Scheme module (M). (M) can export variables like: (define-module (kitties)) (define-public binaries `(("stuff" ,do-stuff) ("surf" ,search-kitties))) (define do-stuff ...) (define search-kitties ...) (define-public documentation `(("stuff" "TODO") ("surf" "In the beginning, there were kitties"))) [some library for adopting kittens] Assume there is a module (puppies) as well, that also has a "surf" binary. Now consider an adoption centre application (animal-adopt), that uses the "surf" binaries from both (kitties) and (puppies) for finding kitties and puppies. In Scheme-land, this works just fine, without ambiguity: (call-binary "surf" #:module '(kitties)) (call-binary "surf" #:module '(puppies)) However, this won't work if all binaries were in a single, global hash table, instead of being defined per-module (or package in Guix-speak). How could "animal-adopt" use both "kitties" and "puppies" if it were to add "kitties" and "puppies" to propagated-inputs? Also, if "animal-adopt" only has "kitties" as propagated-input, how could a user install both "animal-adopt" and "a-browser-simply-named-surf" in the= ir profile? > it is not as tedious as wrappers and I would really like to be able to sp= ecify > runtime dependencies of packages using it without problems. > I think we must find a solution to this runtime dependencies problem > that is better than wrapper scripts because they are very tedious to > create for every single binary in every single package. This seems a difficult problem. > Another recent example being that the caja package depends on dconf to > change it's settings, which is not installed by default when users use > window managers like sway. >=20 > Let's find a convenient solution here that would allow us to put an end > to these problems that affect many new users and remains obscure for > them that they would need to add additional packages in their > configuration (and which). In order to discover these kind of issues earlier, it would be interesting to create a "ambient-trouble" package, that has binaries named after the common culprits "xdg-config", "which", "cat" (for shell scripts actuall= y requiring "coreutils"), maybe some others, to be used like this: $ guix environment --ad-hoc software-to-test ambient-trouble $ AMBIENT_TROUBLE_LOG=3D$HOME/ambient-trouble.log software-to-test The fake "xdg-config", "which", "cat" ... would then write a line to $AMBIENT_TROUBLE_LOG and return 1 (failure). In the package guidelines we could recommend testing with "ambient-trouble". To find out current violations, =E2=80=98someone=E2=80=99 could install "ambient-trouble" in th= eir profile and see what breaks. Now I think of it, it should be sufficient to test with "guix environment --pure", but it clears out too many variables (e.g. DISPLAY is not unset, but XAUTHORITY is --- see %precious-variables in guix/scripts/environment.scm). Is there any reason why XAUTHORITY is unset but DISPLAY isn't? After all, "guix environment --pure" is not that pure that it removes process persona, removes the reference to the root & current working directory from the process ... I don't see why keeping the reference to the display server accessible would be any different from keeping standard input/output/error open. It's all I/O, the only (conceptual) difference is in representation (text/bytes or pixels). Greetings, Maxime. --=-ZoEagPHf1rAdIHGebGvo Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYIADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYF5YnhccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7sj0AQCtv+hl7Umsg2eI7Vn12g66i3RR gm1dXsPZagqiSex9xwD+KwsHoTrjiMhv+gAFTahxgx3HIg4t4FtK3u4qshec/gI= =TOvC -----END PGP SIGNATURE----- --=-ZoEagPHf1rAdIHGebGvo--