From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 14 11:06:56 2022 Received: (at submit) by debbugs.gnu.org; 14 Jan 2022 16:06:56 +0000 Received: from localhost ([127.0.0.1]:37899 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8P6L-00056y-LY for submit@debbugs.gnu.org; Fri, 14 Jan 2022 11:06:56 -0500 Received: from lists.gnu.org ([209.51.188.17]:41920) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8NDA-0007KY-RJ for submit@debbugs.gnu.org; Fri, 14 Jan 2022 09:05:50 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47174) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n8NCm-0002VG-96 for guix-patches@gnu.org; Fri, 14 Jan 2022 09:05:28 -0500 Received: from mout02.posteo.de ([185.67.36.66]:47001) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n8NCk-0002Cz-2t for guix-patches@gnu.org; Fri, 14 Jan 2022 09:05:23 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 01327240101 for ; Fri, 14 Jan 2022 15:05:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1642169119; bh=wXlovOjJByS64NzXEz7uXWvyn9dyYhehZu3JVF67zVU=; h=From:To:Subject:Date:From; b=F3YNYwOZppWSVRLnRMDsZ96mdD//Mc51u7B/P7qJV/2D8vvPPzEyKr7FC90YKVHGp 0swgZFV8TYEUp/d95kcBcKYDW4ZXT3tMo6Oazy57Hg/QXMwx61NP6+lL3GD5V7t/gH rmGGPyoxXsyyrkEem1JOvzSoBw5pRpwH0hZIj0AQ44glp1Hy0mO4VXDXGfrW0wIEme D5VMgdCbb8ySkQfzPHfMzHm+ZaD36B9IUDLwfOw2k0LB44jCZvZb0FYPzZjwklrXMw AFUYtzfzz8pAZQ9yF4UuJ9TuzpCYp60rGQa9+F65YqOenbcwSRfrp4f9HZNqFFvfTE dApGSaPsbnrxQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Jb33L2y3Vz9rxP for ; Fri, 14 Jan 2022 15:05:18 +0100 (CET) From: florhizome To: guix-patches@gnu.org Subject: [PATCH] gnu: foot: expose terminfo dirs via native-search-paths Date: Fri, 14 Jan 2022 14:02:54 +0000 Message-Id: <811cc55626870dbf37af3418e8effe191948541a.1642168254.git.florhizome@posteo.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=185.67.36.66; envelope-from=florhizome@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 14 Jan 2022 11:06:52 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi all, I noticed foot did not behave normally whenever content would overflow it's current dimensions. when I installed alacritty in the same profile, this was fixed. Turned out, alacritty's declaration has a native-search-path field entry that fixed foot! Why not just search-paths, I can't tell. This might apply to further terminal emulators (kitty had problems starting emacs in some contexts for me but I would need to test that more), but for now, just foot! * gnu/packages/terminals.scm (foot) [native-search-paths]: Add search-path-specification for terminfo dirs --- gnu/packages/terminals.scm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm index a4fe97776d..1eb54dac80 100644 --- a/gnu/packages/terminals.scm +++ b/gnu/packages/terminals.scm @@ -849,6 +849,10 @@ (define-public foot pkg-config scdoc wayland-protocols)) (inputs (list fcft libxkbcommon wayland)) + (native-search-paths + (list (search-path-specification + (variable "TERMINFO_DIRS") + (files '("share/terminfo"))))) (synopsis "Wayland-native terminal emulator") (description "@command{foot} is a terminal emulator for systems using the Wayland -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 14 14:03:03 2022 Received: (at 53257) by debbugs.gnu.org; 14 Jan 2022 19:03:03 +0000 Received: from localhost ([127.0.0.1]:38155 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8Rqo-0001xI-OD for submit@debbugs.gnu.org; Fri, 14 Jan 2022 14:03:03 -0500 Received: from laurent.telenet-ops.be ([195.130.137.89]:60446) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8Rql-0001wn-JS for 53257@debbugs.gnu.org; Fri, 14 Jan 2022 14:03:00 -0500 Received: from [172.20.10.5] ([188.188.180.33]) by laurent.telenet-ops.be with bizsmtp id ij2w2600Q0je1N401j2x5e; Fri, 14 Jan 2022 20:02:57 +0100 Message-ID: <070637a9bb8fc9a51bd39b0a2666ede537bdc949.camel@telenet.be> Subject: Re: [bug#53257] [PATCH] gnu: foot: expose terminfo dirs via native-search-paths From: Maxime Devos To: florhizome , 53257@debbugs.gnu.org Date: Fri, 14 Jan 2022 19:02:52 +0000 In-Reply-To: <811cc55626870dbf37af3418e8effe191948541a.1642168254.git.florhizome@posteo.net> References: <811cc55626870dbf37af3418e8effe191948541a.1642168254.git.florhizome@posteo.net> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-+9chgN8dQ3dfM3L9Rfsi" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1642186977; bh=OCVftGruTCxPv0aSsGgSBgjfOBaF3F+K28xrzbbLw9k=; h=Subject:From:To:Date:In-Reply-To:References; b=eIcJDCxLBFgkPj/rgPWDCMJ1MkMgdrSLFOdO0m4loyoDWIB+//prNj8nEHOCeQ32G NscQKt9vE1TWVR+SsBsdfoMtz3zdii+M9TCRU2Qyiwpv7hpcPJIP580ix4zS0Bp/tZ +6jFninGzJcpU1loKW4weJr7CAeDW3Lnb7amqYCMNArZL0iSBa/BfcEO6HKn5xZR6c mTb8vug7xC7ywRFIhRPTW/GzEepu2L45ukiFt+aac9gp63c0ri4pLQ5xyIMx+w8NJI GXexBh9+/vP39E5wng2pYforcmABXuXfU18d+ZeV+jcQSanocyIcoPkec12uttXfJo kw2tmzSLc1BxQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 53257 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-+9chgN8dQ3dfM3L9Rfsi Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable florhizome schreef op vr 14-01-2022 om 14:02 [+0000]: > Hi all, > I noticed foot did not behave normally whenever content would overflow it= 's current dimensions. > when I installed alacritty in the same profile, this was fixed. Turned ou= t, alacritty's > declaration has a native-search-path field entry that fixed foot! Why not= just search-paths, > I can't tell. This might apply to further terminal emulators (kitty had p= roblems starting emacs > in some contexts for me but I would need to test that more), but for now,= just foot!=20 >=20 Canonically, search path are set in =E2=80=98consumers=E2=80=99, not =E2=80= =98producers=E2=80=99 (though setting it in =E2=80=98producers=E2=80=99 sometimes works). Here, =E2=80=98consumer=E2=80=99 =3D ncurses, maybe screen (why doesn't screen ha= ve a native- search-paths? An oversight?), and =E2=80=98producer=E2=80=99 =3D some term= inal emulator. What application were you running in foot that leaded to an overrun? Maybe we should add TERMINFO_DIRS to the native-search-paths of the application. Basically all applications using ncurses need it, I think? The following seems relevant: though personally that doesn't seem a bug to me. Were you running emacs in the terminal? If so, maybe TERMINFO_DIRS need to be added to 'emacs'? Greetings, Maxime. --=-+9chgN8dQ3dfM3L9Rfsi Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYeHI3BccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7ju5AP4qneUKB6FE3vhkawqDnGE0Vpqk yWrgG8lX5bWeDTTihQD/YGyNzgGLdRald1PtkzkTmCeH/OR3tjC/IvII1U0EXAQ= =vud5 -----END PGP SIGNATURE----- --=-+9chgN8dQ3dfM3L9Rfsi-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 14 19:48:28 2022 Received: (at 53257) by debbugs.gnu.org; 15 Jan 2022 00:48:28 +0000 Received: from localhost ([127.0.0.1]:38590 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8XF5-0005RE-Gd for submit@debbugs.gnu.org; Fri, 14 Jan 2022 19:48:28 -0500 Received: from mout01.posteo.de ([185.67.36.65]:52127) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8VT4-0002Fb-Bn for 53257@debbugs.gnu.org; Fri, 14 Jan 2022 17:54:50 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id C4E96240026 for <53257@debbugs.gnu.org>; Fri, 14 Jan 2022 23:54:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1642200879; bh=pZsX/sX18E8eNS8vQCbSyjPEs00HqZF9XjDEPlZp+VI=; h=From:To:Subject:Date:From; b=rhVYvjNpxgcbP3tu19mX3FKeaOrzwobZXc/+wztUFoBnbKYFnkOiJF5nZOqVCFkZD MoYygjxQRVwaYlAJxGRNqLJDYC0eaV9u6TMLnNRGSB5qFgDg5NDGq4+arBwtjcZ5Bp HVNPF1Junurbw/9lyQGqOMJ/pFHUj9NPUho7iy1aCR32ArQ5Skf4CAlFETevOzl64V jX7mTtVCuk4kWeD50e/81awkl6XVKrqGEhGoBB6p5rfkq/xas8UlfQOT037pXGUzmJ w3zQdFJlOsDadnfrwnULh+GoTb4pArt1zq5T27+2rO+6GLA62gSze5lyOWDQoFol0O DTfYXMODnD9WA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4JbGp70MKLz6tn9 for <53257@debbugs.gnu.org>; Fri, 14 Jan 2022 23:54:38 +0100 (CET) From: Florian To: 53257@debbugs.gnu.org Subject: Re: [bug#53257] [PATCH] gnu: foot: expose terminfo dirs via native-search-paths In-Reply-To: <070637a9bb8fc9a51bd39b0a2666ede537bdc949.camel@telenet.be> References: <811cc55626870dbf37af3418e8effe191948541a.1642168254.git.florhizome@posteo.net> <070637a9bb8fc9a51bd39b0a2666ede537bdc949.camel@telenet.be> Date: Fri, 14 Jan 2022 22:52:28 +0000 Message-ID: <87sftqlykz.fsf@tp-x230-guix.mail-host-address-is-not-set> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 53257 X-Mailman-Approved-At: Fri, 14 Jan 2022 19:48:26 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Maxime, I understand this kinda differently so far: We want to expose the path where foot installs it's terminfo via TERMINFO_DIRS, so that every program running in that Terminal can look it up. foot without the patch emits the following env vars inside it's process: ~ $ env | grep TERM COLORTERM=3Dtruecolor TERM=3Dfoot-direct (i configured it to use foot-direct, and not foot-xterm, which is the other terminfo it installs, bc that should give me more colors in emacs) now what happens is that neither foot nor programs running from it seem to know what foot-direct is. As I tried to describe, foot renders problematic stuff, whenever the text it displays reaches it's borders, simply a long line does it, but also looking up manpages (i would get a WARNING: terminal is not fully functional Press RETRUN to continue when typing "git send-email --help" f.e. Comparing to kitty: Running in kitty: COLORTERM=3Dtruecolor TERMINFO=3D/gnu/store/zhmzdniycjykb6igrx4avs9vsn4ngk5q-kitty-0.20.3/lib/kit= ty/terminfo TERM=3Dxterm-kitty So, kitty exposes the exact path to it's terminfo files within it's process. so, we are fine, most of the time. But when i try to edit a file with elevated right's, emacs complains: ~ $ sudo emacs -nw .config/guix/home.scm=20 Passwort:=20 emacs: Terminal type xterm-kitty is not defined. If that is not the actual type of terminal you have, use the Bourne shell command 'TERM=3D...; export TERM' (C-shell: 'setenv TERM ...') to specify the correct type. It may be necessary to do 'unset TERMINFO' (C-shell: 'unsetenv TERMINFO') as well. an interesting example with guix shell and nano: ~ $ guix shell nano -- nano ./.config/guix/home.scm Folgende Ableitung wird erstellt: /gnu/store/azcaj49div66k43afiiiq6njsjk8s5iv-profile.drv Zertifikatsb=C3=BCndel der Zertifikatsautorit=C3=A4ten wird erstellt =E2=80= =A6 Liste der Emacs-Unterverzeichnisse wird erzeugt =E2=80=A6 Schriftartenverzeichnis wird erstellt =E2=80=A6 Verzeichnis von Info-Handb=C3=BCchern wird erstellt =E2=80=A6 Profil mit 1 Paket wird erstellt =E2=80=A6 ~ $ guix shell nano --pure -- nano ./.config/guix/home.scm Error opening terminal: xterm-kitty. (so, the first one worked, the second not.) kitty works as long as i "preserve context" i would say, without understanding in depth what happens. So, to me it seems setting search-paths should make sense whenever you want to expose a path in the store directory of a certain package, but you cannot be sure to which package (otherwise, a wrapper would make sense, and that's where your definiton of producer and consumer applies better i think as it would be a much directer and clearer definition. ). In= gnu guix we would want to take advantage of that rather more then less i think, but it's poorly documented. By my understanding, if emacs installs a terminfo file, yes, we could set it's search-path field similar to alacritty. But it most definitely makes sense for any terminal emulator that defines an own TERMINFO variable and ships a terminfo file with that (and so a TERMINFO_DIR that we want to expose to the environment).=20 Now what i don't understand is when I would set search-paths, but not native-search-paths --- as i said, in this example search-paths would make more sense to me, if I understood the two fields right.=20 Greetings, Florian. Maxime Devos writes: > florhizome schreef op vr 14-01-2022 om 14:02 [+0000]: >> Hi all, >> I noticed foot did not behave normally whenever content would overflow i= t's current dimensions. >> when I installed alacritty in the same profile, this was fixed. Turned o= ut, alacritty's >> declaration has a native-search-path field entry that fixed foot! Why no= t just search-paths, >> I can't tell. This might apply to further terminal emulators (kitty had = problems starting emacs >> in some contexts for me but I would need to test that more), but for now= , just foot!=20 >>=20 > > Canonically, search path are set in =E2=80=98consumers=E2=80=99, not =E2= =80=98producers=E2=80=99 > (though setting it in =E2=80=98producers=E2=80=99 sometimes works). Here, > =E2=80=98consumer=E2=80=99 =3D ncurses, maybe screen (why doesn't screen = have a native- > search-paths? An oversight?), and =E2=80=98producer=E2=80=99 =3D some te= rminal emulator. > > What application were you running in foot that leaded to an overrun? > Maybe we should add TERMINFO_DIRS to the native-search-paths of the > application. Basically all applications using ncurses need it, I > think? > > The following seems relevant: > > though personally that doesn't seem a bug to me. > > Were you running emacs in the terminal? If so, maybe TERMINFO_DIRS > need to be added to 'emacs'? > > Greetings, > Maxime. From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 15 06:45:25 2022 Received: (at 53257) by debbugs.gnu.org; 15 Jan 2022 11:45:25 +0000 Received: from localhost ([127.0.0.1]:39279 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8hUr-0006AM-3j for submit@debbugs.gnu.org; Sat, 15 Jan 2022 06:45:25 -0500 Received: from michel.telenet-ops.be ([195.130.137.88]:57540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8hUo-0006A8-KC for 53257@debbugs.gnu.org; Sat, 15 Jan 2022 06:45:23 -0500 Received: from [172.20.10.5] ([188.188.185.222]) by michel.telenet-ops.be with bizsmtp id izlL260024oKcDo06zlLzB; Sat, 15 Jan 2022 12:45:21 +0100 Message-ID: Subject: Re: [bug#53257] [PATCH] gnu: foot: expose terminfo dirs via native-search-paths From: Maxime Devos To: Florian , 53257@debbugs.gnu.org Date: Sat, 15 Jan 2022 12:45:15 +0100 In-Reply-To: <87sftqlykz.fsf@tp-x230-guix.mail-host-address-is-not-set> References: <811cc55626870dbf37af3418e8effe191948541a.1642168254.git.florhizome@posteo.net> <070637a9bb8fc9a51bd39b0a2666ede537bdc949.camel@telenet.be> <87sftqlykz.fsf@tp-x230-guix.mail-host-address-is-not-set> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-b3NwDnPKAP3RSESljyC1" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1642247121; bh=YrSLO2S2dH/GjSSFTXMOuZJ4Gmpl1YtbY/sF381QOMo=; h=Subject:From:To:Date:In-Reply-To:References; b=dvntMU5JpOWccTODw4fB7pMUjlUKDY8u5ERTmW/09cZ4JnC4RCH7zTw5TiKcv23xz tXBZ2DQG1qpsrSWtk8/LaTfAAR8gj3tdXlUdh4PEbJcVaE+fdAq6pxRVwoszKLSb2i g9NPLwYVfuNN3tyUi56wrWlIiEXTbDaAwJHsJHTZmyzjaMsX4/VjhWlhJbgfxfY4Bj mr/Cj8NW5QykTS2jTex9BZyG4DIRBsRyWwYUu4cAvdmb7NtPo8IaBqpUykextc6kx+ RU0q5EFdSHRNc6FL+OSE7E0YZYbWxofGOqo7dAdUaARD/dtjXUF79TzK25SPwS9QjW BA/EDHMiICOkg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 53257 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-b3NwDnPKAP3RSESljyC1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Florian schreef op vr 14-01-2022 om 22:52 [+0000]: > Now what i don't understand is when I would set search-paths, but not > native-search-paths --- as i said, in this example search-paths would > make more sense to me, if I understood the two fields right.=20 I don't see what this has to do with your example, since you aren't cross-compiling. There's only a difference between 'search-paths' and 'native-search-paths' when cross-compiling: When a cross-compiler 'cross-gcc' and a native compiler 'gcc' are in the native-inputs of some package, a C library 'x' is in the native-inputs and a C library 'y' is in the (non-native) inputs, then: * The native-search-path LIBRARY_PATH of 'gcc' is set to: /gnu/store/[...]-x/include (the cross-compiled 'y' library is ignored!) * The (non-native) search-path CROSS_LIBRARY_PATH of 'cross-gcc' is set to: /gnu/store/[...]-y/include (the native (not cross-compiled) 'x' library is ignored!) Packages that don't cross-compile anything usually only have native-search-paths and AFAIK this works. Greetings, Maxime. --=-b3NwDnPKAP3RSESljyC1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYeKzyxccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7lW8AP9nAcdhqOrgYWstgHzfBxYWY7yb 3pAEUtCO9NQpSWnqNQD/TJ3AFU/mc4yj4MDv4LhI5q+lzjDglVIk5GPdy9OKmAw= =mv49 -----END PGP SIGNATURE----- --=-b3NwDnPKAP3RSESljyC1-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 15 06:48:28 2022 Received: (at 53257) by debbugs.gnu.org; 15 Jan 2022 11:48:28 +0000 Received: from localhost ([127.0.0.1]:39288 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8hXn-0006Jd-Ro for submit@debbugs.gnu.org; Sat, 15 Jan 2022 06:48:27 -0500 Received: from laurent.telenet-ops.be ([195.130.137.89]:36298) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8hXl-0006JS-NX for 53257@debbugs.gnu.org; Sat, 15 Jan 2022 06:48:26 -0500 Received: from [172.20.10.5] ([188.188.185.222]) by laurent.telenet-ops.be with bizsmtp id izoP2600C4oKcDo01zoP1t; Sat, 15 Jan 2022 12:48:24 +0100 Message-ID: <561e6b02ad2e38d27252c5265ce5063c7866dfdf.camel@telenet.be> Subject: Re: [bug#53257] [PATCH] gnu: foot: expose terminfo dirs via native-search-paths From: Maxime Devos To: Florian , 53257@debbugs.gnu.org Date: Sat, 15 Jan 2022 12:48:23 +0100 In-Reply-To: <87sftqlykz.fsf@tp-x230-guix.mail-host-address-is-not-set> References: <811cc55626870dbf37af3418e8effe191948541a.1642168254.git.florhizome@posteo.net> <070637a9bb8fc9a51bd39b0a2666ede537bdc949.camel@telenet.be> <87sftqlykz.fsf@tp-x230-guix.mail-host-address-is-not-set> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-pslFE9nBobLTM+nN1Ryi" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1642247304; bh=wIoD2mzcbVxmklwCm0DzRUiGxzx7Jd2u3ga/SMHr0wY=; h=Subject:From:To:Date:In-Reply-To:References; b=fKIQrDivrvJp+F8MPQMXSNYeK2WtJZ+iziUihj1wrRDER82DWgihDUAoMdvongRvT QmR8EgGY6BdiPIGdYxm0onCNonllevkkmd/7fXIwrz42Pv8caYGoL7zCTsopKPT9qV EgnUcEPuziqykkz28Yidv3WYQHUeT0WbBBK0rAUGt2Zb0yWYdP/ufah90peDfZcrON ieJTQomHEydvPM72KnjOLkqKAvJghvSWmT1j+Um8hLiHsoZx+cG7cfR9TfmU9DsrAD yJiNlO29nOCO+le9mKTBhhQTf99XV2kBxAFyn8wAqQeER4aUvcGggEhXIh5Hcnq/SS xf3qICyvF1k/g== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 53257 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-pslFE9nBobLTM+nN1Ryi Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Florian schreef op vr 14-01-2022 om 22:52 [+0000]: > By my understanding, if emacs installs a terminfo file, yes, we could > set it's search-path field similar to alacritty. What I suggested, is that emacs would have a search-path because it can be used _inside_ a terminal as a terminal application,and hence might be a =E2=80=98consumer=E2=80=99 of TERMINFO_DIR. That said, from your examples it seems a good idea to (also?) include TERMINFO_DIR in the producer -- I'll send a separate mail for that. --=-pslFE9nBobLTM+nN1Ryi Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYeK0hxccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7muMAP0Vi5Vv0JX/GUnQcwnpMXmvb7cz D8GitQ1bMp8K+a/kQgD7Bg+8QteH+TwHABpgJyFyKa7A+V1LfyxPk+2eAA8mQA0= =hvxx -----END PGP SIGNATURE----- --=-pslFE9nBobLTM+nN1Ryi-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 15 07:30:39 2022 Received: (at 53257) by debbugs.gnu.org; 15 Jan 2022 12:30:39 +0000 Received: from localhost ([127.0.0.1]:39315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8iCc-00087I-Mx for submit@debbugs.gnu.org; Sat, 15 Jan 2022 07:30:39 -0500 Received: from laurent.telenet-ops.be ([195.130.137.89]:58922) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8iCa-00083S-PB for 53257@debbugs.gnu.org; Sat, 15 Jan 2022 07:30:38 -0500 Received: from [172.20.10.5] ([188.188.185.222]) by laurent.telenet-ops.be with bizsmtp id j0WZ2600M4oKcDo010Wa1N; Sat, 15 Jan 2022 13:30:34 +0100 Message-ID: <148b10e3686b511178ce6fc019d3c0e42868cc45.camel@telenet.be> Subject: Re: [bug#53257] [PATCH] gnu: foot: expose terminfo dirs via native-search-paths From: Maxime Devos To: Florian , 53257@debbugs.gnu.org Date: Sat, 15 Jan 2022 13:30:29 +0100 In-Reply-To: <87sftqlykz.fsf@tp-x230-guix.mail-host-address-is-not-set> References: <811cc55626870dbf37af3418e8effe191948541a.1642168254.git.florhizome@posteo.net> <070637a9bb8fc9a51bd39b0a2666ede537bdc949.camel@telenet.be> <87sftqlykz.fsf@tp-x230-guix.mail-host-address-is-not-set> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-ZH/pNa/jmMO59enDITbm" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1642249834; bh=4XTld6CveIKCapAFTQ8ZKFjzb853DW62/NxZUYdnFN8=; h=Subject:From:To:Date:In-Reply-To:References; b=Z0vPRAzJlx3KeVWhTCEZZ3MrYmgx1jwW4OnsvpcudO4uIcm2CR+A7oMRMjK5aU3KE XNzK2NX0GXgBDUoSUNZELK5Ri2jeteox+Ca4/kMU/AoLVWgaUkNeGrrVFiqUlZUB4B BCInD7hVQWYLizrp5YgY0Tx+bMvxI5eSy+WPkMrcofKYSXse+/kaMdTvUXoy6Gik8L aiBBmpVjTjccKVirc6K4otzJgYVkspenuBBU54UE2dyKUJDv0+33UYyCGgL6QPE82M KpNhDgQu3aQoTfn7kyE6DFR6CsGsaQqtWkwxW3XV6ZqyFGv1O4j9w2b6kW3+Uo6h06 b//D9k2dH5vug== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 53257 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-ZH/pNa/jmMO59enDITbm Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Florian schreef op vr 14-01-2022 om 22:52 [+0000]: > [...] I think the basic idea here is that the following should work: $ guix shell --pure some-terminal-emulator -- some-terminal-emulator # e.g., kitty # from inside the terminal: (e.g. nano) $ ~/.config/guix/current/bin/guix shell some-terminal-app -- some-terminal-= app # Variation: run under sudo This works for kitty+nano, as you note, because kitty sets TERMINFO. It also works for kitty+'emacs -nw'. However, in some combinations things = won't work: An example you noted is kitty+sudo+'emacs -nw'. This doesn't work for me e= ither. This seems to be caused by 'sudo' clearing too much. As I understand it, t= his is only an illustrative counter-example, and not something that setting 'native-search-paths' could fix? This patch is about 'foot', so I tried running foot+nano, but that failed b= ecause I don't use wayland. Anyway, there seem to be a few options here: 1. patch the source code of 'foot' to set "TERMINFO_DIRS" or "TERMINFO" appropriately (I'm not sure about the exact difference) (or use wrap-pr= ogram in 'foot'). The benefit of this above adding search paths, is that running 'foot' directly from the store could work (somewhat niche though). It would need to be investigated whether this works for your use case o= f setting 'foot-direct' instead of 'foot-xterm'. 2. modify 'nano', 'emacs', ... to add a "TERMINFO_DIRS" search path. A benefit of this approach above adding it to terminal emulators, is that this how search paths are supposed to be used AFAIK (adding an INFOPATH, LIBRARY_PATH, CROSS_LIBRARY_PATH, CPATH, ... search path to every C library that has 'info' documentation is rather cumbersome, instead INFOPATH =E2=80=98belongs=E2=80=99 to info r= eaders, LIBRARY_PATH etc. to compilers, ...). A downside is that setting it here can be =E2=80=98too late=E2=80=99. E.g., in the "guix shell terminal" then "guix shell editor" example, the editor and terminal application are in separate profiles so guix doesn't set TERMINFO_DIRS 3. Like (2), but add it to the terminal apps instead. My order of preference: (1) > (3) > (2). Here, (3) would be a lot easier than (1) but almost as good, so maybe we could do (3) first and leave (1) for later? AFAICT It's not only 'foot' that is affected, should we do (3) for all term= inal emulators that don't do (1) like kitty? Greetings, Maxime --=-ZH/pNa/jmMO59enDITbm Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYeK+ZRccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7hA1AP9Fyx3ZIEl+LAkrZfXOuKIrEKcF q6MG1j2MND4DbAgIgwD9FIxhmK9jNNmJUXXTilhAsd/akYd7CmlNioRHf0Xq1gs= =1YfM -----END PGP SIGNATURE----- --=-ZH/pNa/jmMO59enDITbm-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 15 09:24:37 2022 Received: (at 53257) by debbugs.gnu.org; 15 Jan 2022 14:24:37 +0000 Received: from localhost ([127.0.0.1]:39574 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8jyv-0002m0-1P for submit@debbugs.gnu.org; Sat, 15 Jan 2022 09:24:37 -0500 Received: from andre.telenet-ops.be ([195.130.132.53]:33636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8jys-0002lq-6U for 53257@debbugs.gnu.org; Sat, 15 Jan 2022 09:24:35 -0500 Received: from [172.20.10.5] ([188.188.185.222]) by andre.telenet-ops.be with bizsmtp id j2QX260084oKcDo012QXcZ; Sat, 15 Jan 2022 15:24:32 +0100 Message-ID: <9b79749f1902ca64bc0a544a697b4109920592f5.camel@telenet.be> Subject: Re: [bug#53257] [PATCH] gnu: foot: expose terminfo dirs via native-search-paths From: Maxime Devos To: Florian , 53257@debbugs.gnu.org Date: Sat, 15 Jan 2022 15:24:26 +0100 In-Reply-To: <87sftqlykz.fsf@tp-x230-guix.mail-host-address-is-not-set> References: <811cc55626870dbf37af3418e8effe191948541a.1642168254.git.florhizome@posteo.net> <070637a9bb8fc9a51bd39b0a2666ede537bdc949.camel@telenet.be> <87sftqlykz.fsf@tp-x230-guix.mail-host-address-is-not-set> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-IOERiflEZGcVWcziBuLi" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1642256672; bh=E89B5jaBP4UgHSDGc4x3Ofi5yzqoQIeH65o9k3rssaY=; h=Subject:From:To:Date:In-Reply-To:References; b=IwbN7UnKuaKvKw1N0df1AbPXkdXYjZfcn9G8UMdVkH2ergsNSrrSxqnWiYlpUK78Q TOzbrS+liwVvpnWMbMivms1Eulkv+PvTl2T5IhYI+iXKtOKNGwI8+W/mK/O04RrgY2 WyLgXzO3KmcFX3Kj4qSO5KYwLWwqLp9tVLM/dEbjelBk9RYe+2EFN7R+PkhMgvv0bj NqJqpvMyN6vgawzeqyE3WroUv+H8UYaHWDjfSjXWzI/IEchp06lHVRzglVs8LQmR/O PHZL+x6PRmBipS7cruAnuEMD33aUkScvPTz9f5lLkMbdC1yHgWk7MkvMbCqzkWAyGI 204ikVoryvLQQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 53257 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-IOERiflEZGcVWcziBuLi Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Florian schreef op vr 14-01-2022 om 22:52 [+0000]: > [...] I think the basic idea here is that the following should work: $ guix shell --pure some-terminal-emulator -- some-terminal-emulator # e.g., kitty # from inside the terminal: (e.g. nano) $ ~/.config/guix/current/bin/guix shell some-terminal-app -- some-terminal-= app # Variation: run under sudo This works for kitty+nano, as you note, because kitty sets TERMINFO. It also works for kitty+'emacs -nw'. However, in some combinations things = won't work: An example you noted is kitty+sudo+'emacs -nw'. This doesn't work for me e= ither. This seems to be caused by 'sudo' clearing too much. As I understand it, t= his is only an illustrative counter-example, and not something that setting 'native-search-paths' could fix? This patch is about 'foot', so I tried running foot+nano, but that failed b= ecause I don't use wayland. Anyway, there are a few options here: 1. patch the source code of 'foot' to set "TERMINFO_DIRS" or "TERMINFO" appropriately (I'm not sure about the exact difference) (or use wrap-pr= ogram in 'foot'). The benefit of this above adding search paths, is that running 'foot' directly from the store could work (somewhat niche though). It would need to be investigated whether this works for your use case o= f setting 'foot-direct' instead of 'foot-xterm'. 2. modify 'nano', 'emacs', ... to add a "TERMINFO_DIRS" search path. A benefit of this approach above adding it to terminal emulators, is that this how search paths are supposed to be used AFAIK (adding an INFOPATH, LIBRARY_PATH, CROSS_LIBRARY_PATH, CPATH, ... search path to every C library that has 'info' documentation is rather cumbersome, instead INFOPATH =E2=80=98belongs=E2=80=99 to info r= eaders, LIBRARY_PATH etc. to compilers, ...). A downside is that setting it here can be =E2=80=98too late=E2=80=99. E.g., in the "guix shell terminal" then "guix shell editor" example, the editor and terminal application are in separate profiles so guix doesn't set TERMINFO_DIRS 3. Like (2), but add it to the terminal apps instead. My order of preference: (1) > (3) > (2). Here, (3) would be a lot easier than (1) but almost as good, so maybe we could do (3) first and leave (1) for later? AFAICT It's not only 'foot' that is affected, should we do (3) for all term= inal emulators that don't do (1) like kitty? Greetings, Maxime --=-IOERiflEZGcVWcziBuLi Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYeLZGhccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7rf7AP9rWn8cu9kuB/9HRSly/yuJBGvz dvxHhoASBz+XC8dRHwD/a/a2M90tI688afFkL2cUxqBCPlPqUDhkqNmVJ/mJewM= =gZZJ -----END PGP SIGNATURE----- --=-IOERiflEZGcVWcziBuLi-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 15 10:38:29 2022 Received: (at 53257) by debbugs.gnu.org; 15 Jan 2022 15:38:29 +0000 Received: from localhost ([127.0.0.1]:41535 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8l8O-0005Ga-UV for submit@debbugs.gnu.org; Sat, 15 Jan 2022 10:38:29 -0500 Received: from michel.telenet-ops.be ([195.130.137.88]:59430) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8l8K-0005GM-Au for 53257@debbugs.gnu.org; Sat, 15 Jan 2022 10:38:26 -0500 Received: from [172.20.10.5] ([188.188.185.222]) by michel.telenet-ops.be with bizsmtp id j3eM260094oKcDo063eNqF; Sat, 15 Jan 2022 16:38:22 +0100 Message-ID: <1e090a31fe948da151e1d246a0c16002f4a44f34.camel@telenet.be> Subject: Re: [bug#53257] [PATCH] gnu: foot: expose terminfo dirs via native-search-paths From: Maxime Devos To: Florian , 53257@debbugs.gnu.org Date: Sat, 15 Jan 2022 16:38:17 +0100 In-Reply-To: <87o84dm3fs.fsf@tp-x230-guix.mail-host-address-is-not-set> References: <811cc55626870dbf37af3418e8effe191948541a.1642168254.git.florhizome@posteo.net> <070637a9bb8fc9a51bd39b0a2666ede537bdc949.camel@telenet.be> <87sftqlykz.fsf@tp-x230-guix.mail-host-address-is-not-set> <148b10e3686b511178ce6fc019d3c0e42868cc45.camel@telenet.be> <87o84dm3fs.fsf@tp-x230-guix.mail-host-address-is-not-set> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-n5U8QvBEAuLP81CHOK2s" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1642261102; bh=qoiNYPUlRFUwP3gm823E9C0bxA2DFSJJ4DQGNq1waVs=; h=Subject:From:To:Date:In-Reply-To:References; b=M/aCGxtK37tfLBbbEOCUJif0aeBH1RY72B0v9gpOCSxF5BbsTT0+vcQT8EQo36Q8Y T5xupVC7JzRDGG9peg4jdQWZbmalKqD3x3cmvuSTGO7FAZi3En3gQOz5hF8aVXgD7h x2kZK5soVqp9358OmT66PUXSMpLloZfFx3/iGIy7qylKEQdjuRJCNcrlx6Xyj4jQIf 6RuZiDpbspMlkaAXPnLzk3xksxRBUyKYl/ZIrdxZjBsuwLOt6a9MRMLRmSfljEQYS0 uPr7fHyB41kjO0GjZsnNmVBmWdVTKtDKLN189lIp/QiR/+JsX4S5gkkcspEqIfaUPM 7lTm2he4gqr3Q== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 53257 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-n5U8QvBEAuLP81CHOK2s Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Florian schreef op za 15-01-2022 om 15:19 [+0000]: > Have you tried to add a search path to emacs or nano? I don't, but I presume it would work -- at least 'ncurses' has a TERMINFO_DIRS native-search-path, 'info-reader' and 'emacs' have an INFOPATH ... =20 > I kinda doubt this would do much; neither nano or emacs ship a terminfo > for kitty, or for foot. What I think could work is wrapping nano and > emacs and every terminal application that has problems to add a path > derived from generically set env vars to point to the places where It doesn't matter that nano and emacs don't ship terminfo files -- if a package in the profile (or build environment) has some search path, then the search path is set with corresponding directories from _every_ package (*), irrespective of whether they have that search path. So as long as 'nano/emacs/vi/...' and 'kitty/foot/gnome-terminal- emulator/...' are in the _same_ profile, the environment variable of the search path is set. They aren't always in the same profile though,=20 (*) with some restrictions w.r.t. cross-compilation, native-search- path/search-path, native-inputs/inputs ... Greetings, Maxime. --=-n5U8QvBEAuLP81CHOK2s Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYeLqaRccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7uMOAQD0WSZg4/8x9oFepLmdvfF1es// 2QEwShEUMl1sI0502QEAyhLvZaZdrY5MbFTM1J7LjZu1y+RxcQEukPYkDxksNwg= =CaV1 -----END PGP SIGNATURE----- --=-n5U8QvBEAuLP81CHOK2s-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 15 10:46:39 2022 Received: (at 53257) by debbugs.gnu.org; 15 Jan 2022 15:46:39 +0000 Received: from localhost ([127.0.0.1]:41540 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8lGI-0005TT-P1 for submit@debbugs.gnu.org; Sat, 15 Jan 2022 10:46:39 -0500 Received: from baptiste.telenet-ops.be ([195.130.132.51]:45434) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8lGF-0005TJ-8c for 53257@debbugs.gnu.org; Sat, 15 Jan 2022 10:46:38 -0500 Received: from [172.20.10.5] ([188.188.185.222]) by baptiste.telenet-ops.be with bizsmtp id j3mY2600L4oKcDo013mZWk; Sat, 15 Jan 2022 16:46:33 +0100 Message-ID: <9e0df655bf546badc95300032d4c4b815a68ba68.camel@telenet.be> Subject: Re: [bug#53257] [PATCH] gnu: foot: expose terminfo dirs via native-search-paths From: Maxime Devos To: Florian , 53257@debbugs.gnu.org Date: Sat, 15 Jan 2022 16:46:32 +0100 In-Reply-To: <87o84dm3fs.fsf@tp-x230-guix.mail-host-address-is-not-set> References: <811cc55626870dbf37af3418e8effe191948541a.1642168254.git.florhizome@posteo.net> <070637a9bb8fc9a51bd39b0a2666ede537bdc949.camel@telenet.be> <87sftqlykz.fsf@tp-x230-guix.mail-host-address-is-not-set> <148b10e3686b511178ce6fc019d3c0e42868cc45.camel@telenet.be> <87o84dm3fs.fsf@tp-x230-guix.mail-host-address-is-not-set> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-FFI8IdEDqEac4RbxmHH/" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1642261593; bh=DqqlKJiINj0JUfo8npvpR0sbWSMW8gbprWLG+Po7yEU=; h=Subject:From:To:Date:In-Reply-To:References; b=BIpTE5q+82RRCasQM/DtzRVSItnqqpk7y5FGmQwCsgn09kmseO3pvYboVKlu/bZGZ C8tClIdXlDyY3IzNhRxw86b4Z2PSAPdVJYfRIz/79mSBPt14hLp0rlbPKHL72Mb7cu Jkxi9UVKiziMWfqxLWOb1jhWSX1s9EFc5vt6wsvcusJqup9B069WWOTG0jWI9Kh3Na h74YrhrC/6l94aA14ZuAQ/ev49TqD5EB1wb2AJofrGdGd8Jvh3V2GREaR23bHa65uC 5ZP+iomtNC8M6IV2pBi96bDxT2jm+mPmSx50AcDuBWGb01Gqwd++CA6+SlE+xE6qwh qH2MKuccGplQQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 53257 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-FFI8IdEDqEac4RbxmHH/ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Florian schreef op za 15-01-2022 om 15:19 [+0000]: > [...] > As I see major problems f.e. with QT applications, that seem related to > not setting search paths, a proposal of mine for the future would be to i= mprove/ > actually introduce good documentation to the search-patch > variables (and their relationship to profiles and propagated inputs) About documentation, you might be interested in . > but > maybe simplify setting a search-path correspanding to a more distinct > group of programs. I could imagine this as something like a search-path > "type", working out like this: > (package > ... > (native-search-paths > (list > (search-path-specification > (type terminal-emulator)) > ...) > ) > at first this would just be the same as the code added to foot, but it > could be refined (people might be able to see overlaps, and integrate > some filtering or other optimization for a specific group. Also you could= maybe eventually say "install a > package but without these search-paths"). For groups like qt plugins, > it could maybe be included in the qt-wrap functionalities to look for > the paths where plugins are installed and add the corresponding search pa= ths automatically. Not sure what you mean here, when building a package it is unknown what plug-ins will be used in advance. The point of search paths is having some kind of extensibility, setting the search path environment variables in qt-wrap would undo that. Greetings, Maxime. --=-FFI8IdEDqEac4RbxmHH/ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYeLsWBccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7sPNAQCXecDLOAz3d4MV/7BC0/wv2gwM KqR+IKjN3yGsX01+2AD/WKhKRhjQSr9lkG4KzjZU8MUMDtOnWtGyDn1D/sG9+AU= =I8BS -----END PGP SIGNATURE----- --=-FFI8IdEDqEac4RbxmHH/-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 15 10:46:51 2022 Received: (at 53257) by debbugs.gnu.org; 15 Jan 2022 15:46:51 +0000 Received: from localhost ([127.0.0.1]:41544 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8lGV-0005UO-1t for submit@debbugs.gnu.org; Sat, 15 Jan 2022 10:46:51 -0500 Received: from xavier.telenet-ops.be ([195.130.132.52]:53516) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8lGS-0005UE-RU for 53257@debbugs.gnu.org; Sat, 15 Jan 2022 10:46:50 -0500 Received: from [172.20.10.5] ([188.188.185.222]) by xavier.telenet-ops.be with bizsmtp id j3ml2600H4oKcDo013mmUb; Sat, 15 Jan 2022 16:46:46 +0100 Message-ID: Subject: Re: [bug#53257] [PATCH] gnu: foot: expose terminfo dirs via native-search-paths From: Maxime Devos To: Florian , 53257@debbugs.gnu.org Date: Sat, 15 Jan 2022 16:46:45 +0100 In-Reply-To: <87o84dm3fs.fsf@tp-x230-guix.mail-host-address-is-not-set> References: <811cc55626870dbf37af3418e8effe191948541a.1642168254.git.florhizome@posteo.net> <070637a9bb8fc9a51bd39b0a2666ede537bdc949.camel@telenet.be> <87sftqlykz.fsf@tp-x230-guix.mail-host-address-is-not-set> <148b10e3686b511178ce6fc019d3c0e42868cc45.camel@telenet.be> <87o84dm3fs.fsf@tp-x230-guix.mail-host-address-is-not-set> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-xP4OtEedlv6kWygCXE0W" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1642261606; bh=sqaL0kbiGjaHAsxzEePDn8g1tLkRZRD5bNEd+yG9ruE=; h=Subject:From:To:Date:In-Reply-To:References; b=NUm8YyfLmnt38y3AkxqB6kKKN5j6UyunqyWVUIZi6KPh/SjYByUJUEv81yIu7FMt3 CFldgSem89ziqMxZ9qvMlgaJLjmA05iotBy/O07UbZ5qPG3RmK0n1vPTdtQJrJMLHS giGFhhrsF8+L1o7xsB6nKWljy6GHEI53PjzxF2MrJduTNGlKYwkSqfWFV0w7y1AGNY GA5i2E69G02Dt3HBk2e3BIBHEp1n1bcQWzCSb6OGUtpQd0XGF+gpSB5ooGEb9ZVgZO 68kP7bqto9ZXvUe5th+tQesXQtdE78294cbnDCWHQqR127qfDo/wg5lCp2cd+cs0GM IB0cKBrXZxEbg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 53257 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-xP4OtEedlv6kWygCXE0W Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Florian schreef op za 15-01-2022 om 15:19 [+0000]: > [...] > As I see major problems f.e. with QT applications, that seem related to > not setting search paths, a proposal of mine for the future would be to i= mprove/ > actually introduce good documentation to the search-patch > variables (and their relationship to profiles and propagated inputs) About documentation, you might be interested in . > but > maybe simplify setting a search-path correspanding to a more distinct > group of programs. I could imagine this as something like a search-path > "type", working out like this: > (package > ... > (native-search-paths > (list > (search-path-specification > (type terminal-emulator)) > ...) > ) > at first this would just be the same as the code added to foot, but it > could be refined (people might be able to see overlaps, and integrate > some filtering or other optimization for a specific group. Also you could= maybe eventually say "install a > package but without these search-paths"). For groups like qt plugins, > it could maybe be included in the qt-wrap functionalities to look for > the paths where plugins are installed and add the corresponding search pa= ths automatically. Not sure what you mean here, when building a package it is unknown what plug-ins will be used in advance. The point of search paths is having some kind of extensibility, setting the search path environment variables in qt-wrap would undo that. Greetings, Maxime. --=-xP4OtEedlv6kWygCXE0W Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYeLsZRccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7lC7AP0fJiWus99UjrcOwKKPEQg/Gf0L mII2f//0HQFq446DSAEAkrLcb6olLy5OZzyikkkzmkkyzzNdUy2CjSPmc3GlbQc= =HH7O -----END PGP SIGNATURE----- --=-xP4OtEedlv6kWygCXE0W-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 15 12:45:39 2022 Received: (at 53257) by debbugs.gnu.org; 15 Jan 2022 17:45:39 +0000 Received: from localhost ([127.0.0.1]:41663 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8n7S-00010a-Ay for submit@debbugs.gnu.org; Sat, 15 Jan 2022 12:45:39 -0500 Received: from mout01.posteo.de ([185.67.36.65]:34013) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8ksc-0004q7-72 for 53257@debbugs.gnu.org; Sat, 15 Jan 2022 10:22:13 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 093B4240026 for <53257@debbugs.gnu.org>; Sat, 15 Jan 2022 16:22:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1642260124; bh=uy3k0bchADvIsES9BWouTdyqQc+9Zjump+vBkvq3SQ8=; h=From:To:Subject:Date:From; b=gnnwIVOZi/oY9S/327FxfB+tWr106CaoJezv4Zgh+Of9cmeFdutZOi0jtnNig0d3U e8RWWJh3d5nqLZV6Ge8lPLtEE6SWP24TLeyLPwTRgoijYcgomRLaxrA2xBIMYhdkPd PI/SzkF/AE86MgatFgV3i9Lh1q681s7P7AIORdbrAF45dEtwLDKDi5Keo2iEL1MNWW vMJdi+AEceVFBgkStq5agVvkM9iakYsVxBJ8QscSF4k8c0w+Wxqd8Buan98mxwFF6o qB27T1h5k5XO5T/b/6ZOn1Mni4ySwddz5JXFl1h3WmSXpYGqodWWJ8ExEJb9fq1nr0 xOA7Zh3k6z2ew== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4JbhjQ4gxsz9rxb; Sat, 15 Jan 2022 16:22:02 +0100 (CET) From: Florian To: Maxime Devos , 53257@debbugs.gnu.org Subject: Re: [bug#53257] [PATCH] gnu: foot: expose terminfo dirs via native-search-paths In-Reply-To: <148b10e3686b511178ce6fc019d3c0e42868cc45.camel@telenet.be> References: <811cc55626870dbf37af3418e8effe191948541a.1642168254.git.florhizome@posteo.net> <070637a9bb8fc9a51bd39b0a2666ede537bdc949.camel@telenet.be> <87sftqlykz.fsf@tp-x230-guix.mail-host-address-is-not-set> <148b10e3686b511178ce6fc019d3c0e42868cc45.camel@telenet.be> Date: Sat, 15 Jan 2022 15:19:51 +0000 Message-ID: <87o84dm3fs.fsf@tp-x230-guix.mail-host-address-is-not-set> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 53257 X-Mailman-Approved-At: Sat, 15 Jan 2022 12:45:36 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hey Maxime, the comment about native-search-paths vs search-paths was just for better understanding.I thought they work like native inputs vs inputs, but it seems like it's quite the opposite. If my understanding holds, setting TERMINFO_DIRS with native-search-paths could help all terminals that have a non-generic terminfo (not each would). But i couldn't tell you which ones those are. As I see major problems f.e. with QT applications, that seem related to not setting search paths, a proposal of mine for the future would be to imp= rove/ actually introduce good documentation to the search-patch variables (and their relationship to profiles and propagated inputs) but maybe simplify setting a search-path correspanding to a more distinct group of programs. I could imagine this as something like a search-path "type", working out like this: (package ... (native-search-paths (list (search-path-specification (type terminal-emulator)) ...) ) at first this would just be the same as the code added to foot, but it could be refined (people might be able to see overlaps, and integrate some filtering or other optimization for a specific group. Also you could m= aybe eventually say "install a package but without these search-paths"). For groups like qt plugins, it could maybe be included in the qt-wrap functionalities to look for the paths where plugins are installed and add the corresponding search path= s automatically. Have you tried to add a search path to emacs or nano? I kinda doubt this would do much; neither nano or emacs ship a terminfo for kitty, or for foot. What I think could work is wrapping nano and emacs and every terminal application that has problems to add a path derived from generically set env vars to point to the places where terminfo files might be installed a la TERMINFO_DIRS=3D$TERMINFO_DIRS:$XDG_DATA_DIRS/ this could actually be helpful on foreign distros, but i don't know if apps don't already trythis by themselves. So, to get more specific on what to do: Of your suggestions I would say why not do 3 for foot immediately like my patch suggests, it fixes the most immediate problems in a comprehensible and by that easily revertible w= ay. I don't think 2 helps much, maybe still misunderstanding things. For 1) I don't know if I could do this, and I'm not really motivated. It also doesn't really clash with 3. There also might be usecases like programs that need info about installed terminfos without being run from the respective terminal emulator, where having the env var in the shell could come handy, esp for usecases like guix on a foreign distro. but i'm not sure if these exist here.=20=20=20 I also remember reading, when researching the problem with kitty sudo emacs, possibilites for preserving chosen environment variables when switch= ing between different contexts, which should help. oh, and i just set foot-direct recently, when i was investigating this. the problems have stuck with me. Maxime Devos writes: > Florian schreef op vr 14-01-2022 om 22:52 [+0000]: >> [...] > > I think the basic idea here is that the following should work: > > $ guix shell --pure some-terminal-emulator -- some-terminal-emulator > # e.g., kitty > # from inside the terminal: (e.g. nano) > $ ~/.config/guix/current/bin/guix shell some-terminal-app -- some-termina= l-app > # Variation: run under sudo > > This works for kitty+nano, as you note, because kitty sets TERMINFO. > It also works for kitty+'emacs -nw'. However, in some combinations thing= s won't work: > > An example you noted is kitty+sudo+'emacs -nw'. This doesn't work for me= either. > This seems to be caused by 'sudo' clearing too much. As I understand it,= this is > only an illustrative counter-example, and not something that setting > 'native-search-paths' could fix? > > This patch is about 'foot', so I tried running foot+nano, but that failed= because > I don't use wayland. Anyway, there seem to be a few options here: > > 1. patch the source code of 'foot' to set "TERMINFO_DIRS" or "TERMINFO" > appropriately (I'm not sure about the exact difference) (or use wrap-= program > in 'foot'). > > The benefit of this above adding search paths, is that running 'foot' > directly from the store could work (somewhat niche though). > > It would need to be investigated whether this works for your use case= of > setting 'foot-direct' instead of 'foot-xterm'. > > 2. modify 'nano', 'emacs', ... to add a "TERMINFO_DIRS" search path. > > A benefit of this approach above adding it to terminal emulators, > is that this how search paths are supposed to be used AFAIK > (adding an INFOPATH, LIBRARY_PATH, CROSS_LIBRARY_PATH, CPATH, ... > search path to every C library that has 'info' documentation is > rather cumbersome, instead INFOPATH =E2=80=98belongs=E2=80=99 to info= readers, > LIBRARY_PATH etc. to compilers, ...). > > A downside is that setting it here can be =E2=80=98too late=E2=80=99. > E.g., in the "guix shell terminal" then "guix shell editor" > example, the editor and terminal application are in separate profiles > so guix doesn't set TERMINFO_DIRS > > 3. Like (2), but add it to the terminal apps instead. > > My order of preference: (1) > (3) > (2). > Here, (3) would be a lot easier than (1) but almost as good, > so maybe we could do (3) first and leave (1) for later? > > AFAICT It's not only 'foot' that is affected, should we do (3) for all te= rminal > emulators that don't do (1) like kitty? > > Greetings, > Maxime From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 15 13:51:14 2022 Received: (at 53257) by debbugs.gnu.org; 15 Jan 2022 18:51:14 +0000 Received: from localhost ([127.0.0.1]:41735 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8o8w-0004RX-7F for submit@debbugs.gnu.org; Sat, 15 Jan 2022 13:51:14 -0500 Received: from mout02.posteo.de ([185.67.36.66]:46197) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8o6q-0004My-V6 for 53257@debbugs.gnu.org; Sat, 15 Jan 2022 13:49:08 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 9F87C240101 for <53257@debbugs.gnu.org>; Sat, 15 Jan 2022 19:48:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1642272538; bh=Xiq2xWllJcYx5NksmqM7ly8psRMwj3MblIBMGu2ot38=; h=From:To:Subject:Date:From; b=X90ZMp4yVW7r6eKRZ/kmRtIyYJ+/CgBkRvfUIHSCJK3fgqgDSZjtJyvEJuWBtWf+z 7aY8nUdTh023DD9TRXCOyyMh5KMDT9HjPCIJBs2jyjqr/5Ll8FHUgqR7oQ6hk3tkXT YjuHGXbMdGZ/wTs6BlS4yAAYd9HYpEaHrr31cxKpr/VWrxbW6AD8h8V4JI4SbOXkW+ NJWtcl3YQZNAGE2QnWTVb5EbNHlwoFPO+oYk44jGK3sQYJWqqv5NQqCybcYS/FkbMp NuQH39CiWTwT7h3RWeU0laNrdTEjo05FwWz0SSoFVWSJIWx6rJnnI2bgkF1i5fLWr2 FEuUsZ/CTo5XQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4JbnJ94ryZz6tmQ; Sat, 15 Jan 2022 19:48:57 +0100 (CET) From: Florian To: Maxime Devos , 53257@debbugs.gnu.org Subject: Re: [bug#53257] [PATCH] gnu: foot: expose terminfo dirs via native-search-paths In-Reply-To: <1e090a31fe948da151e1d246a0c16002f4a44f34.camel@telenet.be> Date: Sat, 15 Jan 2022 18:46:46 +0000 Message-ID: <87czksalbd.fsf@tp-x230-guix.mail-host-address-is-not-set> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 53257 X-Mailman-Approved-At: Sat, 15 Jan 2022 13:51:13 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello Maxime, to me, the functionality of search-paths seemed exactly communicating paths *beyond* a single profile. It would make more sense to set them with the package that installs the decisive files to me, at least as a thumb-of-rule. Your examples don't really counter that, though, i think ;) In other words, what next? > So as long as 'nano/emacs/vi/...' and 'kitty/foot/gnome-terminal- > emulator/...' are in the _same_ profile, the environment variable > of the search path is set. Maxime Devos writes: > Florian schreef op za 15-01-2022 om 15:19 [+0000]: >> Have you tried to add a search path to emacs or nano? > > I don't, but I presume it would work -- at least 'ncurses' has a > TERMINFO_DIRS native-search-path, 'info-reader' and 'emacs' have an > INFOPATH ... > >> I kinda doubt this would do much; neither nano or emacs ship a terminfo >> for kitty, or for foot. What I think could work is wrapping nano and >> emacs and every terminal application that has problems to add a path >> derived from generically set env vars to point to the places where > > It doesn't matter that nano and emacs don't ship terminfo files -- > if a package in the profile (or build environment) has some search > path, then the search path is set with corresponding directories from > _every_ package (*), irrespective of whether they have that search > path. > > So as long as 'nano/emacs/vi/...' and 'kitty/foot/gnome-terminal- > emulator/...' are in the _same_ profile, the environment variable > of the search path is set. > > They aren't always in the same profile though, > > (*) with some restrictions w.r.t. cross-compilation, native-search- > path/search-path, native-inputs/inputs ... > > Greetings, > Maxime. From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 23 16:27:07 2022 Received: (at 53257) by debbugs.gnu.org; 23 Jan 2022 21:27:07 +0000 Received: from localhost ([127.0.0.1]:41420 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nBkOB-0000K7-2j for submit@debbugs.gnu.org; Sun, 23 Jan 2022 16:27:07 -0500 Received: from laurent.telenet-ops.be ([195.130.137.89]:49780) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nBkO8-0000Jy-NI for 53257@debbugs.gnu.org; Sun, 23 Jan 2022 16:27:05 -0500 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by laurent.telenet-ops.be with bizsmtp id mMT3260034UW6Th01MT3JW; Sun, 23 Jan 2022 22:27:03 +0100 Message-ID: Subject: Re: [bug#53257] [PATCH] gnu: foot: expose terminfo dirs via native-search-paths From: Maxime Devos To: Florian , 53257@debbugs.gnu.org Date: Sun, 23 Jan 2022 22:26:58 +0100 In-Reply-To: <87czksalbd.fsf@tp-x230-guix.mail-host-address-is-not-set> References: <87czksalbd.fsf@tp-x230-guix.mail-host-address-is-not-set> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-R91NbeSe7f/GtQ0gJd6z" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1642973223; bh=4tAm64oX78Tqgkp2lD7PwG9WqZVrssMmS5KaJ9ADWIw=; h=Subject:From:To:Date:In-Reply-To:References; b=F3ZVbxskl1Gh0za3xivj7tTcy8PaUFBM1SCukPOhfXAyRKmeh0KnjVkcSnxbZQOuR d5GrIOGFeuinQ4Qtjx80A2bjEbWlJzL1q4lvi6wwkb8INHl6AX+X1DDR/wj10DOr2h cYt7yRijqxSk//vjRT5JDH4IXQGr52LQicquk1pbMqwhxQAAL+paGVuMyPYYuEWbMd 1Wvi3hXaPXT5YpCd/alFzGE27HD2ORrnbA5oBBZp0XWpg/c0JEdG+gV5GtvC5gVjwg +420X6awftwXi+gbRCFuPpR0bIZMlJJqFz0KihdfRraMYJgFXu8hiTPzTaEAi4calT /JRECy9UMpQeQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 53257 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-R91NbeSe7f/GtQ0gJd6z Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Florian schreef op za 15-01-2022 om 18:46 [+0000]: > to me, the functionality of search-paths seemed exactly communicating > paths *beyond* a single profile.=C2=A0 Search paths can be used for that (though that's rather fragile), but I don't quite see what this has to do with foot, which can be patched or wrapped to set TERMINFO_DIR or TERMINFO_DIRS as appropriate. > It would make more sense to set > them with the package that installs the decisive files to me, at least > as a thumb-of-rule. Your examples don't really counter that, though, i > think ;) It would seem to me that adding: * LIBRARY_PATH, CROSS_LIBRARY_PATH, C_INCLUDE_PATH, etc. to every C library package * INFOPATH to every package with an info manual * MANPATH to every package with man pages * EMACSLOADPATH to every emacs package * GUILE_LOAD_PATH / GUILE_LOAD_COMPILED_PATH to every Guile library or package with Guile bindings * GUIX_PYTHONPATH to every Python package or package with Python bindings * PKG_CONFIG_PATH to every package with pkg-config files * GI_TYPELIB_PATH for ... I'm not sure exactly * similar things for R, Haskell, Minetest, OCaml, Tcl, Lua, Coq ... would be rather tedious and it easy to=C2=A0forget. How about keeping things simple and not creating much more work, by instead adding these search paths to consumers * GCC for LIBRARY_PATH etc. * info-reader and emacs for INFOPATH * man-db for MANPATH * emacs for EMACSLOADPATH * guile for GUILE_LOAD_PATH / GUILE_LOAD_COMPILED_PATH * etc. like we're doing currently? The number of packages in the list below is much smaller than the number of packages in the list above > In other words, what next? https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D22138 would help, but doesn't address the cross-profile issue.=C2=A0 If 22138 is considered notabug, then > 2. modify 'nano', 'emacs', ... to add a "TERMINFO_DIRS" search path. >=20 > A benefit of this approach above adding it to terminal emulators, > is that this how search paths are supposed to be used AFAIK > (adding an INFOPATH, LIBRARY_PATH, CROSS_LIBRARY_PATH, CPATH, ... > search path to every C library that has 'info' documentation is > rather cumbersome, instead INFOPATH =E2=80=98belongs=E2=80=99 to info= readers, > LIBRARY_PATH etc. to compilers, ...). >=20 > A downside is that setting it here can be =E2=80=98too late=E2=80=99. > E.g., in the "guix shell terminal" then "guix shell editor" > example, the editor and terminal application are in separate > profiles > so guix doesn't set TERMINFO_DIRS >=20 For addressing the cross-profile issue: > 1. patch the source code of 'foot' to set "TERMINFO_DIRS" or > "TERMINFO" > appropriately (I'm not sure about the exact difference) (or use > wrap-program > in 'foot'). >=20 > The benefit of this above adding search paths, is that running > 'foot' > directly from the store could work (somewhat niche though). >=20 > It would need to be investigated whether this works for your use > case of > setting 'foot-direct' instead of 'foot-xterm'. >=20 There was some terminal emulator setting TERMINFO_DIR (!=3D TERMINFO_DIRS) I think, maybe that would be worth investigating as well. Greetings, Maxime. --=-R91NbeSe7f/GtQ0gJd6z Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYe3IIhccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7iGlAP43px2VRT6E1iNfpyfys+MHA39g JQEHK7QrnkVcxAp5QQEAqZXEj+9W+lhROnqDxbfAXLEO5TKQ8SkVgtGSlDMAdAA= =tgop -----END PGP SIGNATURE----- --=-R91NbeSe7f/GtQ0gJd6z-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 28 17:34:26 2022 Received: (at 53257) by debbugs.gnu.org; 28 Jan 2022 22:34:26 +0000 Received: from localhost ([127.0.0.1]:60672 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nDZp4-0003Ee-Cj for submit@debbugs.gnu.org; Fri, 28 Jan 2022 17:34:26 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:36386) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nDZp2-0003EP-Ny for 53257@debbugs.gnu.org; Fri, 28 Jan 2022 17:34:25 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 2F7B7338; Fri, 28 Jan 2022 23:34:18 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vKIYRyQuEXW2; Fri, 28 Jan 2022 23:34:17 +0100 (CET) Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 8116E16C; Fri, 28 Jan 2022 23:34:16 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxime Devos Subject: Re: bug#53257: [PATCH] gnu: foot: expose terminfo dirs via native-search-paths References: <811cc55626870dbf37af3418e8effe191948541a.1642168254.git.florhizome@posteo.net> <070637a9bb8fc9a51bd39b0a2666ede537bdc949.camel@telenet.be> <87sftqlykz.fsf@tp-x230-guix.mail-host-address-is-not-set> <9b79749f1902ca64bc0a544a697b4109920592f5.camel@telenet.be> Date: Fri, 28 Jan 2022 23:34:15 +0100 In-Reply-To: <9b79749f1902ca64bc0a544a697b4109920592f5.camel@telenet.be> (Maxime Devos's message of "Sat, 15 Jan 2022 15:24:26 +0100") Message-ID: <87v8y3bic8.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / Authentication-Results: hera.aquilenet.fr; none X-Rspamd-Server: hera X-Rspamd-Queue-Id: 2F7B7338 X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 53257 Cc: Florian , 53257@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hi, Maxime Devos skribis: > This patch is about 'foot', so I tried running foot+nano, but that failed= because > I don't use wayland. Anyway, there are a few options here: An option we=E2=80=99ve used before, in fact to work around , is to define certain variables globally; on Guix System, you=E2=80=99ll see this in /etc/profile: --8<---------------cut here---------------start------------->8--- # Allow Hunspell-based applications (IceCat, LibreOffice, etc.) to # find dictionaries. export DICPATH=3D\ "$HOME/.guix-profile/share/hunspell\ :/run/current-system/profile/share/hunspell" # Allow GStreamer-based applications to find plugins. export GST_PLUGIN_PATH=3D\ "$HOME/.guix-profile/lib/gstreamer-1.0" --8<---------------cut here---------------end--------------->8--- We should probably do the same for =E2=80=98TERMINFO_DIRS=E2=80=99. WDYT? (Of course that that doesn=E2=80=99t help on foreign distros, but maybe =E2=80=98TERMINFO_DIRS=E2=80=99 is already set there?) Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 28 17:34:37 2022 Received: (at control) by debbugs.gnu.org; 28 Jan 2022 22:34:37 +0000 Received: from localhost ([127.0.0.1]:60675 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nDZpF-0003F4-KN for submit@debbugs.gnu.org; Fri, 28 Jan 2022 17:34:37 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:36408) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nDZpE-0003Es-Mb for control@debbugs.gnu.org; Fri, 28 Jan 2022 17:34:37 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 4AC55338 for ; Fri, 28 Jan 2022 23:34:31 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 02K4Cag2fCre for ; Fri, 28 Jan 2022 23:34:30 +0100 (CET) Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201]) by hera.aquilenet.fr (Postfix) with ESMTPSA id B373016C for ; Fri, 28 Jan 2022 23:34:30 +0100 (CET) Date: Fri, 28 Jan 2022 23:34:30 +0100 Message-Id: <87tudnbibt.fsf@gnu.org> To: control@debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: control message for bug #53257 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spamd-Bar: / Authentication-Results: hera.aquilenet.fr; none X-Rspamd-Server: hera X-Rspamd-Queue-Id: 4AC55338 X-Spamd-Result: default: False [0.61 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[control@debbugs.gnu.org]; RCPT_COUNT_ONE(0.00)[1]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; R_MIXED_CHARSET(0.71)[subject]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) retitle 53257 Setting TERMINFO_DIRS quit From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 08 07:46:58 2022 Received: (at 53257) by debbugs.gnu.org; 8 Feb 2022 12:46:58 +0000 Received: from localhost ([127.0.0.1]:45774 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHPta-0002Fi-DY for submit@debbugs.gnu.org; Tue, 08 Feb 2022 07:46:58 -0500 Received: from laurent.telenet-ops.be ([195.130.137.89]:32882) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHPtY-0002FZ-1O for 53257@debbugs.gnu.org; Tue, 08 Feb 2022 07:46:57 -0500 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by laurent.telenet-ops.be with bizsmtp id scmt2600l4UW6Th01cmuTx; Tue, 08 Feb 2022 13:46:54 +0100 Message-ID: <9da3ea19616015d650aa709f45d39d9d3e99b8e1.camel@telenet.be> Subject: Re: bug#53257: [PATCH] gnu: foot: expose terminfo dirs via native-search-paths From: Maxime Devos To: Ludovic =?ISO-8859-1?Q?Court=E8s?= Date: Tue, 08 Feb 2022 13:46:47 +0100 In-Reply-To: <87v8y3bic8.fsf_-_@gnu.org> References: <811cc55626870dbf37af3418e8effe191948541a.1642168254.git.florhizome@posteo.net> <070637a9bb8fc9a51bd39b0a2666ede537bdc949.camel@telenet.be> <87sftqlykz.fsf@tp-x230-guix.mail-host-address-is-not-set> <9b79749f1902ca64bc0a544a697b4109920592f5.camel@telenet.be> <87v8y3bic8.fsf_-_@gnu.org> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-vliZrMrwYjX1lQqylVh4" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1644324414; bh=wDJFKco0kf5DV6GTWuVsBY3H7ZhIb1VeEJ7Qbass4EM=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=mJHd4CldmbPHoQpTZku818hl0xWQSBNi9/k+Hs3fqTjlOXMsXnUsjzMSO2mB9THJz iEQosyzkBeus7MeCI6ODJIYqPWtEbO2hNYpPPZJjL04h//bjYDsWhDQV6IzD6Sruvw S5OHe381BjU/fIwJEZbHUELrdmQFBTcir+uvJUQWrl/XIDlT2PfwF7znY/UIqoQOQR rOOrTmvJbURTTEQ7QKGnHsuRNAf1g+NRa5Ihgk7Ia6omBaa408GCjS3sftEaJHzdqf z8c5CuA94E4HUot/vQmqYN0HXEiB7iCNSkZ88ABSa2PJ95buHM3e6Uxf7yAH6+ugnv 73T4ec9MltnVQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 53257 Cc: Florian , 53257@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-vliZrMrwYjX1lQqylVh4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s schreef op vr 28-01-2022 om 23:34 [+0100]: > Hi, >=20 > Maxime Devos skribis: >=20 > > This patch is about 'foot', so I tried running foot+nano, but that fail= ed because > > I don't use wayland.=C2=A0 Anyway, there are a few options here: >=20 > An option we=E2=80=99ve used before, in fact to work around > , is to define certain variables > globally; on Guix System, you=E2=80=99ll see this in /etc/profile: >=20 > --8<---------------cut here---------------start------------->8--- > # Allow Hunspell-based applications (IceCat, LibreOffice, etc.) to > # find dictionaries. > export DICPATH=3D\ > "$HOME/.guix-profile/share/hunspell\ > :/run/current-system/profile/share/hunspell" >=20 > # Allow GStreamer-based applications to find plugins. > export GST_PLUGIN_PATH=3D\ > "$HOME/.guix-profile/lib/gstreamer-1.0" > --8<---------------cut here---------------end--------------->8--- >=20 > We should probably do the same for =E2=80=98TERMINFO_DIRS=E2=80=99. > > WDYT? IIUC, that only works if 'foot' is installed in in the system profile, and not if it is installed in the user profile.=C2=A0 Unlike, say, 'gnome-terminal', 'foot' doesn't seem like something that would be in the system profile. The variable would need to be added to $GUIX_PROFILE/etc/profile instead. ... (me notices .guix-profile in the example above) ... Ok, this could work with things in the user profile, but it's a rather ad-hoc solution and won't work with "guix shell", so I would prefer adding it to 'etc/profile'. One option is to modify 'build-etc/profile' to always add 'TERMINFO_DIRS' (and maybe DICPATH, GUIX_LOCPATH and SSL_CERT_DIR/FILE?) to the list of search paths. > (Of course that that doesn=E2=80=99t help on foreign distros, but maybe > =E2=80=98TERMINFO_DIRS=E2=80=99 is already set there?) I'm currently on Debian+Guix. $TERMINFO_DIRS is not set here. Even if it was, I doubt you'd find the files for 'foot' in there unless 'foot' is installed with the foreign distro's installer -- AFAICT, 'foot' is not present in ncurses' terminfos. If I do "grep -RF foot /usr/share/terminfo/", I don't find any results. I do find results for 'kitty' though, which makes it odd that some previous tests I did with 'kitty' failed ... Greetings, Maxime --=-vliZrMrwYjX1lQqylVh4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYgJmNxccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7l5BAP0YHQOCyhORue5UAqrhKUZb9f39 m5O0XFa2jR9cCegahQEAnDLBh+Rt/UGsWahDHg01hQ8DmAGvoqY+bFu8u7fmegc= =kmN8 -----END PGP SIGNATURE----- --=-vliZrMrwYjX1lQqylVh4-- From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 10 15:30:48 2022 Received: (at 53257) by debbugs.gnu.org; 10 Feb 2022 20:30:48 +0000 Received: from localhost ([127.0.0.1]:57272 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIG5Y-0002rK-5M for submit@debbugs.gnu.org; Thu, 10 Feb 2022 15:30:48 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:38412) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIG5X-0002r5-DC for 53257@debbugs.gnu.org; Thu, 10 Feb 2022 15:30:47 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id E3E2F761; Thu, 10 Feb 2022 21:30:41 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rEDU3Xmcminy; Thu, 10 Feb 2022 21:30:40 +0100 (CET) Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 58A6F39F; Thu, 10 Feb 2022 21:30:40 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxime Devos Subject: Re: bug#53257: [PATCH] gnu: foot: expose terminfo dirs via native-search-paths References: <811cc55626870dbf37af3418e8effe191948541a.1642168254.git.florhizome@posteo.net> <070637a9bb8fc9a51bd39b0a2666ede537bdc949.camel@telenet.be> <87sftqlykz.fsf@tp-x230-guix.mail-host-address-is-not-set> <9b79749f1902ca64bc0a544a697b4109920592f5.camel@telenet.be> <87v8y3bic8.fsf_-_@gnu.org> <9da3ea19616015d650aa709f45d39d9d3e99b8e1.camel@telenet.be> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 22 =?utf-8?Q?Pluvi=C3=B4se?= an 230 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 10 Feb 2022 21:30:39 +0100 In-Reply-To: <9da3ea19616015d650aa709f45d39d9d3e99b8e1.camel@telenet.be> (Maxime Devos's message of "Tue, 08 Feb 2022 13:46:47 +0100") Message-ID: <87czju5us0.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / Authentication-Results: hera.aquilenet.fr; none X-Rspamd-Server: hera X-Rspamd-Queue-Id: E3E2F761 X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 53257 Cc: Florian , 53257@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hi Maxime, Maxime Devos skribis: > Ludovic Court=C3=A8s schreef op vr 28-01-2022 om 23:34 [+0100]: [...] >> An option we=E2=80=99ve used before, in fact to work around >> , is to define certain variables >> globally; on Guix System, you=E2=80=99ll see this in /etc/profile: >>=20 >> --8<---------------cut here---------------start------------->8--- >> # Allow Hunspell-based applications (IceCat, LibreOffice, etc.) to >> # find dictionaries. >> export DICPATH=3D\ >> "$HOME/.guix-profile/share/hunspell\ >> :/run/current-system/profile/share/hunspell" >>=20 >> # Allow GStreamer-based applications to find plugins. >> export GST_PLUGIN_PATH=3D\ >> "$HOME/.guix-profile/lib/gstreamer-1.0" >> --8<---------------cut here---------------end--------------->8--- >>=20 >> We should probably do the same for =E2=80=98TERMINFO_DIRS=E2=80=99. [...] > Ok, this could work with things in the user profile, but it's a rather > ad-hoc solution and won't work with "guix shell", so I would prefer > adding it to 'etc/profile'. Yeah; like I wrote, it=E2=80=99s a workaround, but it solves the most common issues. > One option is to modify 'build-etc/profile' to always add > 'TERMINFO_DIRS' (and maybe DICPATH, GUIX_LOCPATH and > SSL_CERT_DIR/FILE?) to the list of search paths. That=E2=80=99s not appealing to me; the way I see it, that=E2=80=99s going = a bit too far in the direction of dismissing per-package search paths in favor of hard-coded lists of search paths. >> (Of course that that doesn=E2=80=99t help on foreign distros, but maybe >> =E2=80=98TERMINFO_DIRS=E2=80=99 is already set there?) > > I'm currently on Debian+Guix. $TERMINFO_DIRS is not set here. > Even if it was, I doubt you'd find the files for 'foot' in there > unless 'foot' is installed with the foreign distro's installer > -- AFAICT, 'foot' is not present in ncurses' terminfos. Oh wait, I just realized that =E2=80=98foot=E2=80=99 comes with its own ter= minfo files. In that case, the solution would be to wrap it so that it systematically adds itself to TERMINFO_DIRS. That=E2=80=99s the go-to solution in such situations. WDYT? Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 10 16:45:52 2022 Received: (at 53257) by debbugs.gnu.org; 10 Feb 2022 21:45:52 +0000 Received: from localhost ([127.0.0.1]:57390 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIHGC-0007HU-18 for submit@debbugs.gnu.org; Thu, 10 Feb 2022 16:45:52 -0500 Received: from andre.telenet-ops.be ([195.130.132.53]:43006) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIHG8-0007HH-DM for 53257@debbugs.gnu.org; Thu, 10 Feb 2022 16:45:50 -0500 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by andre.telenet-ops.be with bizsmtp id tZlm260044UW6Th01ZlmhA; Thu, 10 Feb 2022 22:45:46 +0100 Message-ID: <2709cf8810279fd6c22fc6927d1854b7e29460fe.camel@telenet.be> Subject: Re: bug#53257: [PATCH] gnu: foot: expose terminfo dirs via native-search-paths From: Maxime Devos To: Ludovic =?ISO-8859-1?Q?Court=E8s?= Date: Thu, 10 Feb 2022 22:45:37 +0100 In-Reply-To: <87czju5us0.fsf@gnu.org> References: <811cc55626870dbf37af3418e8effe191948541a.1642168254.git.florhizome@posteo.net> <070637a9bb8fc9a51bd39b0a2666ede537bdc949.camel@telenet.be> <87sftqlykz.fsf@tp-x230-guix.mail-host-address-is-not-set> <9b79749f1902ca64bc0a544a697b4109920592f5.camel@telenet.be> <87v8y3bic8.fsf_-_@gnu.org> <9da3ea19616015d650aa709f45d39d9d3e99b8e1.camel@telenet.be> <87czju5us0.fsf@gnu.org> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-mcJfi3DNVlYp3hVjj3hT" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1644529546; bh=SLi/wC2gTCyEvZ+Ddi7Flnd1vMiaST3jLUhKyyJRHZU=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=M9gy1ImtoGkKEsTH5okFq/UYIfpFNiGe1knK2IvsT0cSNKaglu4qIdpZqS1DjY249 eh4u5lWN4D6Sxc/bnXbPakIEWRVW9zjFjTtsFhPBttuixZeqQWX83TFn0K7HG8oXK3 IYd5nN8EIKAssUJbnoI2KgUA2/IQo5JYn7J4p+1BnKE+hN0loPm2rEN1e8i8/v8dLq OnIma3weA+aoLgtgSKmbzYOeFVy0AKy6Oobc9ybMCSpftTnf/zn9TSbUPCgPZ96R7J F0cF5MsccuIPPME4srA9DFwCiIkBFaIXOQ9XS5HP9mFZr2thQ4Hp8GTF+eq+LLLl8U bRrAZgjSKg9ew== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 53257 Cc: Florian , 53257@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-mcJfi3DNVlYp3hVjj3hT Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s schreef op do 10-02-2022 om 21:30 [+0100]: > Oh wait, I just realized that =E2=80=98foot=E2=80=99 comes with its own t= erminfo files. >=20 > In that case, the solution would be to wrap it so that it systematically > adds itself to TERMINFO_DIRS.=C2=A0 That=E2=80=99s the go-to solution in = such > situations. >=20 > WDYT? That would be (a suboption of) option (1) I suggested: 1. patch the source code of 'foot' to set "TERMINFO_DIRS" or "TERMINFO" [...] (or use wrap-program in 'foot'). There is no disagreement from me here. Greetings, Maxime. --=-mcJfi3DNVlYp3hVjj3hT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYgWHgRccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7hlBAQCaKA5QsUVJWO85OLqRd1OTLezD 4un91auNDlmXLpheqQEA6sG3/EcZNNXjqGl2WQmzJRPcNvxVtWgfcUY0qDoWQQc= =mmpF -----END PGP SIGNATURE----- --=-mcJfi3DNVlYp3hVjj3hT-- From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 12 16:49:18 2022 Received: (at 53257) by debbugs.gnu.org; 12 Feb 2022 21:49:18 +0000 Received: from localhost ([127.0.0.1]:35836 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJ0Gc-0001T9-5g for submit@debbugs.gnu.org; Sat, 12 Feb 2022 16:49:18 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:35146) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJ0Ga-0001Sv-P5 for 53257@debbugs.gnu.org; Sat, 12 Feb 2022 16:49:17 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 21CB2491; Sat, 12 Feb 2022 22:49:10 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id o8UZ21OSmwFj; Sat, 12 Feb 2022 22:49:09 +0100 (CET) Received: from ribbon (unknown [IPv6:2a01:e0a:1d:7270:af76:b9b:ca24:c465]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 2D7D563; Sat, 12 Feb 2022 22:49:09 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxime Devos Subject: Re: bug#53257: [PATCH] gnu: foot: expose terminfo dirs via native-search-paths References: <811cc55626870dbf37af3418e8effe191948541a.1642168254.git.florhizome@posteo.net> <070637a9bb8fc9a51bd39b0a2666ede537bdc949.camel@telenet.be> <87sftqlykz.fsf@tp-x230-guix.mail-host-address-is-not-set> <9b79749f1902ca64bc0a544a697b4109920592f5.camel@telenet.be> <87v8y3bic8.fsf_-_@gnu.org> <9da3ea19616015d650aa709f45d39d9d3e99b8e1.camel@telenet.be> <87czju5us0.fsf@gnu.org> <2709cf8810279fd6c22fc6927d1854b7e29460fe.camel@telenet.be> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 24 =?utf-8?Q?Pluvi=C3=B4se?= an 230 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sat, 12 Feb 2022 22:49:08 +0100 In-Reply-To: <2709cf8810279fd6c22fc6927d1854b7e29460fe.camel@telenet.be> (Maxime Devos's message of "Thu, 10 Feb 2022 22:45:37 +0100") Message-ID: <87bkzb21t7.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / Authentication-Results: hera.aquilenet.fr; none X-Rspamd-Server: hera X-Rspamd-Queue-Id: 21CB2491 X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 53257 Cc: Florian , 53257@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hi, Maxime Devos skribis: > Ludovic Court=C3=A8s schreef op do 10-02-2022 om 21:30 [+0100]: >> Oh wait, I just realized that =E2=80=98foot=E2=80=99 comes with its own = terminfo files. >>=20 >> In that case, the solution would be to wrap it so that it systematically >> adds itself to TERMINFO_DIRS.=C2=A0 That=E2=80=99s the go-to solution in= such >> situations. >>=20 >> WDYT? > > That would be (a suboption of) option (1) I suggested: > > 1. patch the source code of 'foot' to set "TERMINFO_DIRS" or > "TERMINFO" [...] (or use wrap-program in 'foot'). Perfect, sorry for overlooking it. Florian, do you want to give it a try? You need to look at =E2=80=98wrap-program=E2=80=99. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 27 13:32:50 2022 Received: (at 53257) by debbugs.gnu.org; 27 Feb 2022 18:32:50 +0000 Received: from localhost ([127.0.0.1]:59193 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOOLi-0003u5-CK for submit@debbugs.gnu.org; Sun, 27 Feb 2022 13:32:50 -0500 Received: from mail-ed1-f45.google.com ([209.85.208.45]:44630) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOOLg-0003tr-IR for 53257@debbugs.gnu.org; Sun, 27 Feb 2022 13:32:49 -0500 Received: by mail-ed1-f45.google.com with SMTP id x5so14516404edd.11 for <53257@debbugs.gnu.org>; Sun, 27 Feb 2022 10:32:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/T8Jx+6TE87ZLCN509xCG4OplMh/cJoDPPoM4RBOrkI=; b=LYdkrCJOlMwvDMEgg9AGpxcP1IPwcFumdsKay/NK+UrJxQ/+NE6jGZd4+f+NoNxzEU 7/SYT3KirshtWhpoOOXfnd7mfrSLHEIpNNYR5KjMxiAaWG0wKe1REW70KigiZ0/Fbh3d aEJQIFMemGA2vuIC64tgWcp1Juqp9Zxbp/tMoJV3rkj1PB3Ddow1ZPNhvoe0QrbzA1A/ p5fahH/XeewjbUzGK7DYDvemLWlttoMSAALExihPXe0kHZF/0PWaWrF57Usod0mAzkcR p6v7olpOT3X+RnREaPiSmn68J9zsDIjFXrU38KJxDkl7zvwpkOmt3sYUHXG1Mzcf2OW5 nm7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/T8Jx+6TE87ZLCN509xCG4OplMh/cJoDPPoM4RBOrkI=; b=wxiZq52AcrQT2k2WjR16PKOiX3dnZRgQ7arsJmWQmCobtFqdjskWpSNH5DHRxCpUtP o9lmFFq0+fbotdZHhKb08GYvgS6sdbPlzw4goktSbGyDLRrTL2LwebvbNU7wgCEoj782 n/PTVvt6/YHa7AIkNQG+5JCBGke5jLeq/C7BVlmlQc99i+Pt1Hm5sQQDhsbJWAuN7rUq rB8VzsyLNcG/xC1WV4+oIhwrSwYDZ4cfpW5jkq5NxE0NUHf8UkAkxU7Qs7Um/Z1nj2KJ ba/iaKU/4kCnMXYUS1nIdXk83Q2WG2UxrwHPvcIVB9XsjHRq8lm94xjIGVHu+aIsxUwP o6Xw== X-Gm-Message-State: AOAM530fS/TPnAo0aRfqi355AYGZ3FBX7N+fZpgDAXDSqj13ibotsH0s uzie/DaFVO1JAeE73uyrKD+2cFf3WBM= X-Google-Smtp-Source: ABdhPJyMKrcW6UuFppj4KN7QgOQZ2IhCE3WTkojD4D23SWOXQxbN0GTYDX5hvQJH0TGu82ZSsvJvvg== X-Received: by 2002:a05:6402:90b:b0:412:a7cc:f5f9 with SMTP id g11-20020a056402090b00b00412a7ccf5f9mr15947655edz.136.1645986762255; Sun, 27 Feb 2022 10:32:42 -0800 (PST) Received: from localhost.localdomain ([51.154.70.17]) by smtp.gmail.com with ESMTPSA id q10-20020aa7cc0a000000b0040f826f09fdsm5035175edt.81.2022.02.27.10.32.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Feb 2022 10:32:41 -0800 (PST) From: Kevin Boulain To: 53257@debbugs.gnu.org Subject: [PATCH] gnu: foot: Wrap the program to expose TERMINFO_DIRS Date: Sun, 27 Feb 2022 19:34:15 +0100 Message-Id: <20220227183415.12487-1-kevinboulain@gmail.com> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 53257 Cc: Kevin Boulain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) As discussed in https://issues.guix.gnu.org/53257, it appears the preferred way to expose TERMINFO_DIRS to programs running under a terminal is to wrap the terminal with a script that sets TERMINFO_DIRS before exec'ing it. This is less invasive than unconditionally setting TERMINFO_DIRS in the profile (via native-search-paths) as this particular environment variable is only necessary when running the terminal itself. * gnu/packages/terminals.scm (foot): Export TERMINFO_DIRS. Tested: ./pre-inst-env guix install foot cat "$(which foot)" #!/gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8/bin/bash export TERMINFO_DIRS="/gnu/store/6dwhps0cgzk0z7c3q2q596l52ibzdl5c-foot-1.11.0/share/terminfo${TERMINFO_DIRS:+:}$TERMINFO_DIRS" exec -a "$0" "/gnu/store/6dwhps0cgzk0z7c3q2q596l52ibzdl5c-foot-1.11.0/bin/.foot-real" "$@" --- gnu/packages/terminals.scm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm index 06fa341472..65553ac295 100644 --- a/gnu/packages/terminals.scm +++ b/gnu/packages/terminals.scm @@ -852,7 +852,19 @@ (define-public foot ;; also to address a GCC 10 issue when doing PGO builds. #:build-type "release" ;; Enable LTO as recommended by INSTALL.md. - #:configure-flags '("-Db_lto=true"))) + #:configure-flags '("-Db_lto=true") + ;; Ensure the terminfo database is available to programs spawned under + ;; the terminal. + #:phases + (modify-phases %standard-phases + (add-after 'install 'wrap-program + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out"))) + ;; footclient executes programs under the server process, + ;; there is no need to wrap it too. + (wrap-program (string-append out "/bin/foot") + `("TERMINFO_DIRS" ":" prefix + (,(string-append out "/share/terminfo")))))))))) (native-inputs (list ncurses ;for 'tic' pkg-config scdoc wayland-protocols)) -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 27 13:42:36 2022 Received: (at 53257) by debbugs.gnu.org; 27 Feb 2022 18:42:37 +0000 Received: from localhost ([127.0.0.1]:59202 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOOVA-00047d-J3 for submit@debbugs.gnu.org; Sun, 27 Feb 2022 13:42:36 -0500 Received: from mail-lj1-f175.google.com ([209.85.208.175]:39877) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOOV9-00047Q-0M for 53257@debbugs.gnu.org; Sun, 27 Feb 2022 13:42:35 -0500 Received: by mail-lj1-f175.google.com with SMTP id bn33so14529376ljb.6 for <53257@debbugs.gnu.org>; Sun, 27 Feb 2022 10:42:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=xwx+JbP+dNvHpleylJp94YW2WfPI9bsJhvvjHYzXfWU=; b=d9WzTNhHGCZPku2ro8w7wae5of/h9eD9eoo0ORcyhonGutnEdhFlaaUSl/fClGcOjK XGPNPuaKdHspmeylUxe8255pyIa5sAEelGASy3fTOTdEACDVrFXmqFWiMbWlAKrl02M+ 2ufpRB0bq59shAx9iGT6hhvNNUqAbkE1Zx6acBOPPUce6VtX8DMaeRYFeJRIx6h7LjXN gZbxhHssBVa8rqq0bWmFL28Rp9DMKQC/t7ADfbdh791X+ereCSS6GuYZElthM6i6qldR r5Ux5vgIF0zt5ykefrbzZcltQ6U51v1r1o+OVhmx9HqBcG/3mMx2ooTrM4guhP6vwdSy Nulw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=xwx+JbP+dNvHpleylJp94YW2WfPI9bsJhvvjHYzXfWU=; b=avXymJfa+BvmskTi72skAQGgEV4WpAOoz363IyTvJU5qZtko0HWxm4wglzg9TK1hQ1 4ddY3Ouf031IS4PsDazkZz81l1yxELz3kJeCIig7TMWhrPSggR0k1pMQGXw/7+NHWx75 pd+d5Tu6dJlQbFRr+kKjTGHBrIDOF0/3Ha8jV3bPhDKVNomJ++WdWQvlJtIvvdK4HRlf uaBoAwM9w+KmLaYFOPProNaU4cfaMhtj70v79gorUoyU/ZP+8c9YIobJBm2bj7Pq3Pzr 9v+484oorf/1NGLc/qfjbw2rzzZW0JAu2/ZPP4Rhglsx7+BtVL5g526Cbz1IefUMETSo MSNQ== X-Gm-Message-State: AOAM532yLIVVOjEnlTV3E6ABPNr//dyNNSWnUSAqca6DznbCvyM8eYfs szv0qkaqsZpT5osKha3c8rqJtKU2gz2go9jhtgGmoeudnjM= X-Google-Smtp-Source: ABdhPJxO9ZtunZdWSvemfLCW6Wop3bKasL90udUmt0WcToYDQrbrad2nI/1/Sl30j2hs+Onukaq2R+YMsSG59dCBSLg= X-Received: by 2002:a05:651c:14f:b0:23d:8a2a:456d with SMTP id c15-20020a05651c014f00b0023d8a2a456dmr12250425ljd.196.1645987348440; Sun, 27 Feb 2022 10:42:28 -0800 (PST) MIME-Version: 1.0 References: <20220227183415.12487-1-kevinboulain@gmail.com> In-Reply-To: <20220227183415.12487-1-kevinboulain@gmail.com> From: Kevin Boulain Date: Sun, 27 Feb 2022 19:41:52 +0100 Message-ID: Subject: Re: [PATCH] gnu: foot: Wrap the program to expose TERMINFO_DIRS To: 53257@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 53257 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) I hope you don't mind, I went ahead and used wrap-program as discussed (I was encountering this issue and had a very similar patch as the OP's). Did I get the idea that was discussed in this thread right? If yes, should I send another patch to fix the other terminals (e.g.: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/terminals.scm?id=85a5110de79f4fe9fd822ede3915654ee699d6c5#n220)? On Sun, 27 Feb 2022 at 19:32, Kevin Boulain wrote: > > As discussed in https://issues.guix.gnu.org/53257, it appears the > preferred way to expose TERMINFO_DIRS to programs running under a > terminal is to wrap the terminal with a script that sets TERMINFO_DIRS > before exec'ing it. > This is less invasive than unconditionally setting TERMINFO_DIRS in the > profile (via native-search-paths) as this particular environment > variable is only necessary when running the terminal itself. > > * gnu/packages/terminals.scm (foot): Export TERMINFO_DIRS. > > Tested: > ./pre-inst-env guix install foot > cat "$(which foot)" > #!/gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8/bin/bash > export TERMINFO_DIRS="/gnu/store/6dwhps0cgzk0z7c3q2q596l52ibzdl5c-foot-1.11.0/share/terminfo${TERMINFO_DIRS:+:}$TERMINFO_DIRS" > exec -a "$0" "/gnu/store/6dwhps0cgzk0z7c3q2q596l52ibzdl5c-foot-1.11.0/bin/.foot-real" "$@" > --- > gnu/packages/terminals.scm | 14 +++++++++++++- > 1 file changed, 13 insertions(+), 1 deletion(-) > > diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm > index 06fa341472..65553ac295 100644 > --- a/gnu/packages/terminals.scm > +++ b/gnu/packages/terminals.scm > @@ -852,7 +852,19 @@ (define-public foot > ;; also to address a GCC 10 issue when doing PGO builds. > #:build-type "release" > ;; Enable LTO as recommended by INSTALL.md. > - #:configure-flags '("-Db_lto=true"))) > + #:configure-flags '("-Db_lto=true") > + ;; Ensure the terminfo database is available to programs spawned under > + ;; the terminal. > + #:phases > + (modify-phases %standard-phases > + (add-after 'install 'wrap-program > + (lambda* (#:key inputs outputs #:allow-other-keys) > + (let* ((out (assoc-ref outputs "out"))) > + ;; footclient executes programs under the server process, > + ;; there is no need to wrap it too. > + (wrap-program (string-append out "/bin/foot") > + `("TERMINFO_DIRS" ":" prefix > + (,(string-append out "/share/terminfo")))))))))) > (native-inputs > (list ncurses ;for 'tic' > pkg-config scdoc wayland-protocols)) > -- > 2.34.0 > From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 27 14:22:38 2022 Received: (at 53257) by debbugs.gnu.org; 27 Feb 2022 19:22:38 +0000 Received: from localhost ([127.0.0.1]:59233 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOP7u-00055g-Cm for submit@debbugs.gnu.org; Sun, 27 Feb 2022 14:22:38 -0500 Received: from albert.telenet-ops.be ([195.130.137.90]:52820) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOP7s-00055V-7o for 53257@debbugs.gnu.org; Sun, 27 Feb 2022 14:22:37 -0500 Received: from [192.168.158.254] ([178.119.10.153]) by albert.telenet-ops.be with bizsmtp id 0KNa2700A3J72EA06KNa4n; Sun, 27 Feb 2022 20:22:34 +0100 Message-ID: <8372c3d084580f785710cdc8c0ebdcb92f45ee51.camel@telenet.be> Subject: Re: [bug#53257] [PATCH] gnu: foot: Wrap the program to expose TERMINFO_DIRS From: Maxime Devos To: Kevin Boulain , 53257@debbugs.gnu.org Date: Sun, 27 Feb 2022 20:22:28 +0100 In-Reply-To: <20220227183415.12487-1-kevinboulain@gmail.com> References: <811cc55626870dbf37af3418e8effe191948541a.1642168254.git.florhizome@posteo.net> <20220227183415.12487-1-kevinboulain@gmail.com> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-EAFwVf5ZUdtVvOhWbpan" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1645989754; bh=d+5lH8fNXj0WM2EZKLQtKlXGnYj4bXFlP3JJZPzfKz0=; h=Subject:From:To:Date:In-Reply-To:References; b=QiBOF9ogXmYXVNKqicB9lLryXzfWo+NS+LSRjgbYlfalqqjXQJpXK1vbtlsJlYGeQ 7vp/cPhNq1191eXbFQxkWI2R4Rn7QwUaxSUlZjn58MaFgakjMgMECVdFRbuuZe8MwD z9XyUMuyPToK6pPxSFlBWflOXpvi5wJpsXuXRcAnMS+cP1YkUk+na7AOX2Kq+9v2bX bVr8JcBo/oSu7br4PMQg9orAkJCDdNgIPE4mHu2msbHmL+tfxf1CDHordwfwslsO8u LisDQts65melL3r/U1Di0oCuvwMLD5zW3HEfun1WWOH66py63jxDXJAz3Qm74AQnsE 7r8umEbrzW8hg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 53257 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-EAFwVf5ZUdtVvOhWbpan Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Kevin Boulain schreef op zo 27-02-2022 om 19:34 [+0100]: > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (modify-phases %standard-phases > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (add-after 'install 'wr= ap-program > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (lambda* (#= :key inputs outputs #:allow-other-keys) > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= (let* ((out (assoc-ref outputs "out"))) > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 ;; footclient executes programs under the server process, > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 ;; there is no need to wrap it too. > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 (wrap-program (string-append out "/bin/foot") > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 `("TERMINFO_DIRS" ":" prefix > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (,(string-append out "/share/terminfo")))= ))))))) You'll need to add 'bash-minimal' to 'inputs', such that this works even when cross-compiling. I think "./pre-inst-env guix lint foot" would warn about this. Also, this can be simplified a bit, to ,#(modify-phases %standard-phases (add-after 'install 'wrap-program (lambda _ (let ((out #$output)) ;; footclient executes programs under the server process, ;; there is no need to wrap it too. (wrap-program (string-append out "/bin/foot") `("TERMINFO_DIRS" ":" prefix (,(string-append out "/share/terminfo"))))))= )))) or, reducing the whitespace: ,#(modify-phases %standard-phases (add-after 'install 'wrap-program (lambda _ (define out #$output) ;; footclient executes programs under the server process, ;; there is no need to wrap it too. (wrap-program (string-append out "/bin/foot") `("TERMINFO_DIRS" ":" prefix (,(string-append out "/share/terminfo"))))))))= ) (you'll need to add (guix gexp) to the list of imports to do this) YMMV on whether this is an improvement. I hope you don't mind, I went ahead and used wrap-program as discussed (I was encountering this issue and had a very similar patch as the OP's). Did I get the idea that was discussed in this thread right? Yes, this was the idea, though to be 100% sure it would need to be tested (= by running "guix shell --pure foot -- foot" and then running ~/.guix-profile/bin/SOME-NCURSES-APP in the terminal, or something like tha= t. If yes, should I send another patch to fix the other terminals (e.g.: =20 https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/terminals.scm?= id=3D85a5110de79f4fe9fd822ede3915654ee699d6c5#n220 )? That would be nice, but keep in mind that this might not be needed for every terminal app -- some apps set TERMINFODIR automatically (I forgot= which) and hence don't need any wrapping. Greetings, Maxime. --=-EAFwVf5ZUdtVvOhWbpan Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYhvPdBccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7uILAP43efpOmGnn55IIB5ewDfQhbc6O sqSZxucVPw6IJs19rQD/TNRVgYgX5upMdRy6JXUr3tAolWqdbn9iu9LrY9pRJAg= =Oiz0 -----END PGP SIGNATURE----- --=-EAFwVf5ZUdtVvOhWbpan-- From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 28 15:30:27 2022 Received: (at 53257) by debbugs.gnu.org; 28 Feb 2022 20:30:27 +0000 Received: from localhost ([127.0.0.1]:34856 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOmf4-0004go-QX for submit@debbugs.gnu.org; Mon, 28 Feb 2022 15:30:27 -0500 Received: from mail-lf1-f43.google.com ([209.85.167.43]:43872) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOmf3-0004gW-5m for 53257@debbugs.gnu.org; Mon, 28 Feb 2022 15:30:26 -0500 Received: by mail-lf1-f43.google.com with SMTP id g39so23329245lfv.10 for <53257@debbugs.gnu.org>; Mon, 28 Feb 2022 12:30:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9+swH/ksGPLBgZx6eTa1sbvER3eHKRINCxUzkxyrbWI=; b=V7uQA07qQ47cwuIGsu4BFyEpy8Cc5IzUEeogntcprWjlfzXo+mIk2cuA479v21q9R6 xm+lOhva3MUdc3Ocv8B/gxX5Uuz/skvYfMYaklJ5JV5P4knwtK8DwcWt/zKb7UhduOxT RxR3uaRhwh0clQ0HAIG+Y/bCa49Fpkiu1U3M+/ZHlvUEoGidIlMRuJ+lUuew4wn9zVyn E31AXtD8DKfWe1GvBVn8gXz+uS3k6g4O3/4ykvYmJv+0NiFEFIagOdZn5b23p3fvYmsA yuSOv1F+zyVareohHJQ+w3sTnKlAtVyHe8rpBOlNL4+JhHpaBmSfKA6rqSC88yIlogBx XzJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9+swH/ksGPLBgZx6eTa1sbvER3eHKRINCxUzkxyrbWI=; b=g535Q6rl3VaSc4hA/1jjoUSs8Tz96VorW8L/NjSiJF1jOohgAQkX2Z02vYmQJVd4Y4 qopIfoKzT6Zhzq+W3VP/agvqF38PGnw7O/xRCV+DsA7pdSGQwaMTSn0T7bI64HUXthw+ 89IN240hBu6UttZowDmSo5E1Ila6dWzfjEy49hVb4rzyCyvCGO1kjBIMjo8noqgleD1m JyBMoCfB5yguowvQdFtiO4bmXAEDBzreAYFg6axtZgMPa/oSVyUziRcIhJz3D9/WZQUZ Wd5C32PiDrseyz+DPO9PZ1prxrMUVBVGBlrpH66ctTAVCuQ0OemyJJzb5xvNmQf4aAhN CfZw== X-Gm-Message-State: AOAM531pO23JTuFJQYXIYZWoK9ynKfZdTn4IdiRPDkN5biWvCs1UTA+/ 87So9EwYGTwCDWnL7TEzOxOD6WSopPZPOMWRrno= X-Google-Smtp-Source: ABdhPJzktc+Rw9zb6OZY4rYMHdj6QNyiHByFjkM//P6MyIzIpQTIFzL1JKel3jEMTzhGrxN+Y0tcPaIr282S7oMWoi8= X-Received: by 2002:ac2:4895:0:b0:443:ddce:e795 with SMTP id x21-20020ac24895000000b00443ddcee795mr13338412lfc.572.1646080218952; Mon, 28 Feb 2022 12:30:18 -0800 (PST) MIME-Version: 1.0 References: <811cc55626870dbf37af3418e8effe191948541a.1642168254.git.florhizome@posteo.net> <20220227183415.12487-1-kevinboulain@gmail.com> <8372c3d084580f785710cdc8c0ebdcb92f45ee51.camel@telenet.be> In-Reply-To: <8372c3d084580f785710cdc8c0ebdcb92f45ee51.camel@telenet.be> From: Kevin Boulain Date: Mon, 28 Feb 2022 21:29:42 +0100 Message-ID: Subject: Re: [bug#53257] [PATCH] gnu: foot: Wrap the program to expose TERMINFO_DIRS To: Maxime Devos Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 53257 Cc: 53257@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Thank you, I'll send a follow-up patch to resolve the concerns (that's greatly appreciated, I'm new at both Guix and Scheme). I did test it with an ncurses program so I can confirm it works (no complaints about an unknown terminal anymore). I only have a single concern about this approach: native-search-paths made the terminfo database somewhat 'global' (as long the shell sourced the Guix profile) and it made stuff like SSH less awkward: by installing foot on both the client and the server, ncurses applications could 'just work'. Now, by making the terminfo database only visible inside the terminal itself, SSH is pretty much never guaranteed to work seamlessly (however, foot appears to be compatible with xterm so it's not that much of an issue: https://codeberg.org/dnkl/foot/src/branch/master/INSTALL.md#terminfo). I agree this has always been a pain point with ncurses programs and the proper solution would be to upstream the terminal's description to terminfo so it's easily available everywhere (or people can always install it manually), but I prefer following the recommendations of the maintainers here :) On Sun, 27 Feb 2022 at 20:22, Maxime Devos wrote: > > Kevin Boulain schreef op zo 27-02-2022 om 19:34 [+0100]: > > + (modify-phases %standard-phases > > + (add-after 'install 'wrap-program > > + (lambda* (#:key inputs outputs #:allow-other-keys) > > + (let* ((out (assoc-ref outputs "out"))) > > + ;; footclient executes programs under the server process, > > + ;; there is no need to wrap it too. > > + (wrap-program (string-append out "/bin/foot") > > + `("TERMINFO_DIRS" ":" prefix > > + (,(string-append out "/share/terminfo")))))))))) > > > You'll need to add 'bash-minimal' to 'inputs', such that this works > even when cross-compiling. I think "./pre-inst-env guix lint foot" > would warn about this. > > Also, this can be simplified a bit, to > > ,#(modify-phases %standard-phases > (add-after 'install 'wrap-program > (lambda _ > (let ((out #$output)) > ;; footclient executes programs under the server process, > ;; there is no need to wrap it too. > (wrap-program (string-append out "/bin/foot") > `("TERMINFO_DIRS" ":" prefix > (,(string-append out "/share/terminfo")))))))))) > > or, reducing the whitespace: > > > ,#(modify-phases %standard-phases > (add-after 'install 'wrap-program > (lambda _ > (define out #$output) > ;; footclient executes programs under the server process, > ;; there is no need to wrap it too. > (wrap-program (string-append out "/bin/foot") > `("TERMINFO_DIRS" ":" prefix > (,(string-append out "/share/terminfo"))))))))) > > (you'll need to add (guix gexp) to the list of imports to do this) > > YMMV on whether this is an improvement. > > I hope you don't mind, I went ahead and used wrap-program as > discussed (I was encountering this issue and had a very similar patch > as the OP's). Did I get the idea that was discussed in this thread > right? > > Yes, this was the idea, though to be 100% sure it would need to be tested (by running "guix shell --pure foot -- foot" and then running > ~/.guix-profile/bin/SOME-NCURSES-APP in the terminal, or something like that. > > If yes, should I send another patch to fix the other terminals > (e.g.: > > https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/terminals.scm?id=85a5110de79f4fe9fd822ede3915654ee699d6c5#n220 > )? > > That would be nice, but keep in mind that this might not be needed > for every terminal app -- some apps set TERMINFODIR automatically (I forgot which) and hence don't need any wrapping. > > Greetings, > Maxime. From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 01 14:26:36 2022 Received: (at 53257) by debbugs.gnu.org; 1 Mar 2022 19:26:36 +0000 Received: from localhost ([127.0.0.1]:38316 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nP88q-0006G3-87 for submit@debbugs.gnu.org; Tue, 01 Mar 2022 14:26:36 -0500 Received: from mail-ed1-f43.google.com ([209.85.208.43]:41643) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nP88o-0006Fr-Oc for 53257@debbugs.gnu.org; Tue, 01 Mar 2022 14:26:35 -0500 Received: by mail-ed1-f43.google.com with SMTP id w3so23345217edu.8 for <53257@debbugs.gnu.org>; Tue, 01 Mar 2022 11:26:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=V04gPdONKOGnMN9zZU6dfSxB9k1Tr863N+VZqL5tw0s=; b=CWQjCoNixfseeS81Uug4TLm0UHPOzkOc5PP8g/pUJENcQrcw3ekSVAXcIvrB0Ior3x EuAi22hF4PoWphhghZWM7kMQkwnmbSOYKqKI+Jcgu3QMlvP8D39v3sxWFXbKFa+f7I4G 2FdwUyjlFPR4wo8KhEpbCUsJpEdE9hQ/HTrwL9g5/AZOIQ08C38JWOTh4vtq0XA3H/c6 8cTsbwHvLodkwSd1F9d66VvuD5eYsQx23CXeW9n+yzoqBAnhW4ck5hRC4nJWnMCbu5nr 5CX68A5P2OnPi/c65iC/mBSHskgjV+73aKKDUjPT9IIXCNm7LzY2oUTdLgmaRloLxfwm RXag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=V04gPdONKOGnMN9zZU6dfSxB9k1Tr863N+VZqL5tw0s=; b=i1vlQ+42piYGI5S9755Z8WzWJ/L6UHAFIrjt4+0Rfw5H7ySL4wrM2dlyRycGo9VhyV K6mLh8LChiCayywSQRAXSl9LO9JAxvqhA7pXcfU13XgaJIya5gbwG25Rj2hC0sJwu8DZ fEAOHKewZ4UiIHaGFFMUs5FDulmEOPw9obU+LpqyRM2YH3H+FoU3YT1703+rKhi4gdrd TL4ZR1r53+RIUR5er4iIHbIKQJC9/3AXpZcOVBLWRzqVsmjxFXA2pj+Et+VOYLC/Z3Jc YNHSoOhBALv24PPU9mIHFFU8kXn6VaSAE96cNjCIvhfX7bcPCIYnFf3KwbVGGPj8DTpp qmFg== X-Gm-Message-State: AOAM531d8Ipz0fUwHb3WOT8cGtVKeVqq1ACbM6mQ5GiKTzlONpR0pQKU DFhxCPGpVMGLIfgk6fLGoZH6Un7wLAk= X-Google-Smtp-Source: ABdhPJxdLI9emhll7AS5OelLjizHKkPIpckfddzSbVUs3dT60WF71GJjNl+1pWdEPz+ajkl62WAQhw== X-Received: by 2002:a50:ed0c:0:b0:410:bbf:ec14 with SMTP id j12-20020a50ed0c000000b004100bbfec14mr25471745eds.116.1646162788472; Tue, 01 Mar 2022 11:26:28 -0800 (PST) Received: from localhost.localdomain ([51.154.70.17]) by smtp.gmail.com with ESMTPSA id vj23-20020a170907131700b006d583aff7easm5531499ejb.125.2022.03.01.11.26.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Mar 2022 11:26:27 -0800 (PST) From: Kevin Boulain To: 53257@debbugs.gnu.org Subject: [PATCH] gnu: foot: Wrap the program to expose TERMINFO_DIRS Date: Tue, 1 Mar 2022 20:28:08 +0100 Message-Id: <20220301192808.14411-1-kevinboulain@gmail.com> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 53257 Cc: Kevin Boulain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) As discussed in https://issues.guix.gnu.org/53257, it appears the preferred way to expose TERMINFO_DIRS to programs running under a terminal is to wrap the terminal with a script that sets TERMINFO_DIRS before exec'ing it. This is less invasive than unconditionally setting TERMINFO_DIRS in the profile (via native-search-paths) as this particular environment variable is only necessary when running the terminal itself. * gnu/packages/terminals.scm (foot): Export TERMINFO_DIRS. --- gnu/packages/terminals.scm | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm index 06fa341472..558b91fa24 100644 --- a/gnu/packages/terminals.scm +++ b/gnu/packages/terminals.scm @@ -48,6 +48,7 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages terminals) + #:use-module (guix gexp) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system cargo) #:use-module (guix build-system cmake) @@ -63,6 +64,7 @@ (define-module (gnu packages terminals) #:use-module (gnu packages) #:use-module (gnu packages autotools) #:use-module (gnu packages base) + #:use-module (gnu packages bash) #:use-module (gnu packages check) #:use-module (gnu packages cmake) #:use-module (gnu packages compression) @@ -852,12 +854,24 @@ (define-public foot ;; also to address a GCC 10 issue when doing PGO builds. #:build-type "release" ;; Enable LTO as recommended by INSTALL.md. - #:configure-flags '("-Db_lto=true"))) + #:configure-flags '("-Db_lto=true") + ;; Ensure the terminfo database is available to programs spawned under + ;; the terminal. + #:phases + ,#~(modify-phases %standard-phases + (add-after 'install 'wrap-program + (lambda _ + (let ((out #$output)) + ;; footclient executes programs under the server process, + ;; there is no need to wrap it too. + (wrap-program (string-append out "/bin/foot") + `("TERMINFO_DIRS" ":" prefix + (,(string-append out "/share/terminfo")))))))))) (native-inputs (list ncurses ;for 'tic' pkg-config scdoc wayland-protocols)) (inputs - (list fcft libxkbcommon wayland)) + (list bash-minimal fcft libxkbcommon wayland)) (synopsis "Wayland-native terminal emulator") (description "@command{foot} is a terminal emulator for systems using the Wayland -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 01 14:35:12 2022 Received: (at 53257) by debbugs.gnu.org; 1 Mar 2022 19:35:12 +0000 Received: from localhost ([127.0.0.1]:38330 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nP8HA-0006V4-Fe for submit@debbugs.gnu.org; Tue, 01 Mar 2022 14:35:12 -0500 Received: from mail-lf1-f45.google.com ([209.85.167.45]:34412) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nP8H8-0006Uo-Fr for 53257@debbugs.gnu.org; Tue, 01 Mar 2022 14:35:11 -0500 Received: by mail-lf1-f45.google.com with SMTP id y24so28658293lfg.1 for <53257@debbugs.gnu.org>; Tue, 01 Mar 2022 11:35:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Modz3QtDhZAhTOTtW+OrI/HXkwrC/2El7w1XpoydZos=; b=kAcZ6xRWOPNdk93Y0s0XZN/VGgv/XvMN+rbLN5maCkmZQJyLvvinFWOQRZhxvFxHdo RKAVpLI6gNrFBePbE8oyy1zFBGOy2jmBB5DJULgoOfS/AD/VzSnig7B2fmO7nvWA87ty gAm3/lrqkAZ2/E2WDcO95bcguvnJqBmZythWXyKUhvUk1gUkLyV4NfaRnZLAtlx1rI91 4ip7/Y4H+wHB1TBe/Jcg52rGMsvv7W1B6OwHQhdq5YTRv1rukutweUfc5BkJYo2Vtth5 CtYaEH8618TaUpMBWWeVUQvzm/ZD7Caa6c61v0pw8vlGM9qYTJNh9gyTCycuW2TmeRKC oZMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Modz3QtDhZAhTOTtW+OrI/HXkwrC/2El7w1XpoydZos=; b=vl/bFgg2oo1syCk/x39NPS3TnzI13LNwgqzyMgfAC/4UEiQQOOpLPgHB/vbG+p5FX0 1aRTnrZxzfKpw5izzTne56/K46PQ5uH97svnnSq1owpCzh2FJBVUykMoKFTcyNO6iXZq 3lGNpPsBR8sQqbEF4jyfDHv3EdJcgHWXiTrh9Gl8E4C+in62VZjPZB4l/YJlL2dAsbEs 95TlzC8dm59+2veUof/6hq0PrtXAkyFqhGK6caFSS/+bamDRSzLceUW3CuWDWQDz4jFY hDO9sEAnIrYpgi8eFM867EKOQFFmaq+NIPzYhLiVoAp6ANn/0eDfkmXSKLQsy9SnyJEP 38Pw== X-Gm-Message-State: AOAM531GA8VRTP7MNAmfeKSGD27ctJWr1Uo8ATHCTudDI+QTGspWSssr 3GxMYLrWzlYSCYUk4+goRvNqGYxiOQGgjnRHGaY= X-Google-Smtp-Source: ABdhPJzJG8qg+TZZLhtp4i+d+kJPZ0DpkkL8C6lRgk76N556UbBAugHO/PcoHPJTPSDGdBWSCpiC4Rd2jrvExQeVrKw= X-Received: by 2002:a19:385a:0:b0:443:98eb:97be with SMTP id d26-20020a19385a000000b0044398eb97bemr16776007lfj.459.1646163303445; Tue, 01 Mar 2022 11:35:03 -0800 (PST) MIME-Version: 1.0 References: <811cc55626870dbf37af3418e8effe191948541a.1642168254.git.florhizome@posteo.net> <20220227183415.12487-1-kevinboulain@gmail.com> <8372c3d084580f785710cdc8c0ebdcb92f45ee51.camel@telenet.be> In-Reply-To: <8372c3d084580f785710cdc8c0ebdcb92f45ee51.camel@telenet.be> From: Kevin Boulain Date: Tue, 1 Mar 2022 20:34:26 +0100 Message-ID: Subject: Re: [bug#53257] [PATCH] gnu: foot: Wrap the program to expose TERMINFO_DIRS To: Maxime Devos Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 53257 Cc: 53257@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > You'll need to add 'bash-minimal' to 'inputs', such that this works > even when cross-compiling. I think "./pre-inst-env guix lint foot" > would warn about this. It does warn about it, I only ran './pre-inst-env guix style foot' (but I limited the reformatting to my changes), my bad. > Also, this can be simplified a bit, to [...] Yup, thanks! > Yes, this was the idea, though to be 100% sure it would need to be tested (by running "guix shell --pure foot -- foot" and then running > ~/.guix-profile/bin/SOME-NCURSES-APP in the terminal, or something like that. I confirm it works (for example tput doesn't complain anymore and I can start emacs -nw). From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 19 01:28:15 2022 Received: (at 53257) by debbugs.gnu.org; 19 Jun 2022 05:28:15 +0000 Received: from localhost ([127.0.0.1]:50433 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o2nTq-0007M4-Qv for submit@debbugs.gnu.org; Sun, 19 Jun 2022 01:28:14 -0400 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:33741) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o2nTn-0007Lo-Jy for 53257@debbugs.gnu.org; Sun, 19 Jun 2022 01:28:13 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 56EEF32005BC; Sun, 19 Jun 2022 01:28:05 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Sun, 19 Jun 2022 01:28:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= tom-fitzhenry.me.uk; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1655616484; x= 1655702884; bh=5ot9sGk48TKvsdfMW7xmCNFOgSsPbjDUaloebV9JXT8=; b=q HEyJRK4Ij23NfCHSm8qp5SHCm+prQJ6mz9GnV8lIc7YNHqkaIwJ8ukGyM4XUz2rF FccHHD3cQXKVSB4MT+5QHkJm8JZbEazSJmT3wB8yUDQnPGg8qKXXvApBdZkjldV6 vGl8hx9VTxawGwwjhHhL+Q+9ZuUcto5ZwD3RtWUK9SoUFPBhfxo0AgR0AYq2vY2g o4LZrw/K8vgwjU7WgasJNwq/yT8STJdO+6PNegyNezhxs4YIvFOPeGadpVKMvNbs 9DKVlyDN4UVewjsDHZ+UaWi9MZm4fldwDiXc1EJKwSStjRladhWOCV4IGI3j0jZt 4stLen4LAWGRxp6a2jzwA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1655616484; x=1655702884; bh=5ot9sGk48TKvsdfMW7xmCNFOgSsP bjDUaloebV9JXT8=; b=ShZGZzXW96gE/W3K7QZzdTPJQTKXGX5DWxq2wimvpU6i uuD+qD37pSko0ZKqqz5vJ6+pQgzQTYRrgvqLiRwaV5x7n0Ra+uv7+xPArvqzKcGj p3ye9gv99bbj6uKe+dbups2/qjwCpXFRRgpAeuNGwiZ48OdKmb+ay+fILPYorWPR juQ3DOANFl8PhqkfuPl94WxoCiveGkEGUOGO9BpPgzesyRtlU0rkUHNCk19e+h+H VyIZ+xiT5FcqOCoTGw1FB+RT3ULfofW9yryp9kiKIzHmgcy/dbwRHOmD9ljGGl1z wzD3uoWCdvnLRyALDH3Rzo227zAP2Ug1EvkUA03I5g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedruddvkedgleefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufhffjgfkfgggtgesthdtredttdertdenucfhrhhomhepvfhomhcu hfhithiihhgvnhhrhicuoehtohhmsehtohhmqdhfihhtiihhvghnrhihrdhmvgdruhhkqe enucggtffrrghtthgvrhhnpeejvefgheeiueetveejhffhhfefheejvdeugedtvddvffej vedtudegffekvdduleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehtohhmsehtohhmqdhfihhtiihhvghnrhihrdhmvgdruhhk X-ME-Proxy: Feedback-ID: iefc945ae:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 19 Jun 2022 01:28:03 -0400 (EDT) From: Tom Fitzhenry To: Kevin Boulain Subject: Re: [bug#53257] [PATCH] gnu: foot: Wrap the program to expose TERMINFO_DIRS References: <811cc55626870dbf37af3418e8effe191948541a.1642168254.git.florhizome@posteo.net> <20220301192808.14411-1-kevinboulain@gmail.com> Date: Sun, 19 Jun 2022 15:27:43 +1000 In-Reply-To: <20220301192808.14411-1-kevinboulain@gmail.com> (Kevin Boulain's message of "Tue, 1 Mar 2022 20:28:08 +0100") Message-ID: <87mte9dxyo.fsf@tom-fitzhenry.me.uk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 53257 Cc: 53257@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Tested on my aarch64 machine. foot is now able to open curses programs without needing to manually set TERM. Thanks! This patch doesn't cleanly apply against master, but does cleanly apply against commit deaa322963bc06b820e82d5945e6c496ac6bedf1 "guix: Index the man-db database via man pages names.", which then cleanly cherry-picks onto master.