From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id WIHtKVz2rWXKVwEA62LTzQ:P1 (envelope-from ) for ; Mon, 22 Jan 2024 06:00:12 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id WIHtKVz2rWXKVwEA62LTzQ (envelope-from ) for ; Mon, 22 Jan 2024 06:00:12 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=dh99YcEz; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1705899612; a=rsa-sha256; cv=none; b=RZwjjid7raZxhRQC8ItaFF+4Buiu8he4RqZwZS71nj8j7NhYokhgVfVbpYjLwlovDdqgyr yK1wf4JLj/1KlrQGcQT6dreJE2FpVMxP/UYmVk6RhF46zDJYccy1k5lDE2aDAETu1BQB+H bu2wmYXckSpnnnzV4pdlgWq57tVwoOsxu73Gp24msakHt6Bd+avgU+vkjAfYaa5ybW9RP4 7rFI2uw2++yxppcOABnkFyLIpcfVQXytapWfB/BlCeXQK94TbeEJt1URh09f68nfv8Mqm4 VH+RccO3mFKyfgbe1n54Hfq2pQ8Sa+UDCq3GpUCP/SDHP+WZqijEbufdXJyqTg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=dh99YcEz; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1705899612; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=7KWZ8F+XS/QEPd/JWFG+LQonDdQRu6JQOk8UPkkWZQg=; b=S/KkFArfjYxwnOxlBSGTTK4vEwDDIi72i6VCNXGMFW6bGwmPSz/adkrxyWch8kjXL2Se1V nKebl4Z6okIOKp2AV8+Grjs9xXrySTigKz6ImbeRjQWXHWt+E3hZGnL1O2j9Jw8Z9y6Ux0 Je93AsVHUMRKxHCDomC/l5NP7FgFgpnCFR2Z0izVwxI0wioqrKhfWYe3sPV1gdGnOf0PKx M0cQ66YV+JvtgWUk+2LSqiBZmebPg38/n3v1cTOj5HPCnP+U8sfTLYB1IVkWV8fBxGQ2Xc OCPilwfXegXcZtg7eP64ZrZcq7uLzF1ZxSH+dZ9TVd4cao9g3Z8md4xWKAu6XQ== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 47BF4D81E for ; Mon, 22 Jan 2024 06:00:12 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rRmPg-0007B4-Sa; Mon, 22 Jan 2024 00:00:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rRmPf-0007AZ-DW for guix-patches@gnu.org; Sun, 21 Jan 2024 23:59:59 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rRmPf-0003W0-53 for guix-patches@gnu.org; Sun, 21 Jan 2024 23:59:59 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rRmPi-0005Ep-FN for guix-patches@gnu.org; Mon, 22 Jan 2024 00:00:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#48849] [PATCH core-updates]: Add #:sh argument to wrap-qt-program Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 22 Jan 2024 05:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48849 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch moreinfo To: M Cc: "48849@debbugs.gnu.org" <48849@debbugs.gnu.org> Received: via spool by 48849-submit@debbugs.gnu.org id=B48849.170589955419990 (code B ref 48849); Mon, 22 Jan 2024 05:00:02 +0000 Received: (at 48849) by debbugs.gnu.org; 22 Jan 2024 04:59:14 +0000 Received: from localhost ([127.0.0.1]:39667 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rRmOw-0005CM-BD for submit@debbugs.gnu.org; Sun, 21 Jan 2024 23:59:14 -0500 Received: from mail-qt1-x82f.google.com ([2607:f8b0:4864:20::82f]:42423) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rRmOt-0005C9-H2 for 48849@debbugs.gnu.org; Sun, 21 Jan 2024 23:59:13 -0500 Received: by mail-qt1-x82f.google.com with SMTP id d75a77b69052e-429915eefa5so19830271cf.1 for <48849@debbugs.gnu.org>; Sun, 21 Jan 2024 20:59:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705899541; x=1706504341; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7KWZ8F+XS/QEPd/JWFG+LQonDdQRu6JQOk8UPkkWZQg=; b=dh99YcEzyPo789FkdUWGDd/HmeHTUE0XQ2om2NlBmHeBiNgZpZTOSCt8ffTKsHexFY BqIT1nIEGpPJpxzVx7wJGuM0IlGlIjvghcEkeNzzKKkzNsw9rPeiZEa8ZL3SlZlr9xLr O3p5pJDc629N5Ym3Htcfwcftv9yRxD2j3GzqSAXSQ5+QS8HFOJtJKa9AhXRLNgJJWrq9 Nn8/1AR+FJP7WOuKjxAQdb7iB7DSSuEXGFgoajl3Z3PbN9tG6e7RKa9PAur8QMaBp6Rz INIASpcCG+UTNhnsB25MEySQ0cHy9cLNAL/VUFEv5wmXy6Pz5H7ctnwVy60GncTVw6Ti h9xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705899541; x=1706504341; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=7KWZ8F+XS/QEPd/JWFG+LQonDdQRu6JQOk8UPkkWZQg=; b=n/Sjne1nxIeHa/cNqPJ5ahyjRmBQxBvoDMPnFTlmctIunjc7hm9vgfjLDGE4RsZ1wI 2vWl56RaxwlUJ1Pqk0pq55x9Z5hBJfMYpApueZdSbyj3H34WavNZFfXHi3ezTPwSak2K wGgKQWQx5Rz6/0sTNkHxaE1ezgkzEcAIgddOp1Fp63UMzUDNTaHXSKqTaULN1eCfNxUl F2bvUIPULSjNhXIlmIvss68EHyC5bqz/WXXpTpl/tPcOaGXFjZoXyXdfZJVVeyVjfZmi GlWTL9Agc0cH9xUxDwpNtp0/4kjLoZF1Nh6ibQOA4DE+4zB9g20Q/m/S1CzhOZpFmfwr 6tPg== X-Gm-Message-State: AOJu0YzlCFTklx9L8gyhGwjxGb1N40k4J4TcJtMykJk3rfQRVCrTnfk4 1DjvLX5UWBO4e54BYUp+hamU7faw81z5naMfwc92Z0xHqPQTXbtV9ckPpUABAZ8= X-Google-Smtp-Source: AGHT+IGO3UMdQjq01Wz1J61Sf7IdYsnmCKqgrr7afL0E/rjn4rTzDshzOylMf1Q+2iiqeqZ5CMScaQ== X-Received: by 2002:a05:622a:38e:b0:42a:29c6:592c with SMTP id j14-20020a05622a038e00b0042a29c6592cmr5553744qtx.50.1705899541508; Sun, 21 Jan 2024 20:59:01 -0800 (PST) Received: from hurd (dsl-10-128-232.b2b2c.ca. [72.10.128.232]) by smtp.gmail.com with ESMTPSA id bs17-20020ac86f11000000b0042a0952805csm2180870qtb.3.2024.01.21.20.59.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Jan 2024 20:59:01 -0800 (PST) From: Maxim Cournoyer In-Reply-To: <20240121000457.dB4w2B0081cshW701B4xZR@laurent.telenet-ops.be> (M.'s message of "Sun, 21 Jan 2024 00:04:57 +0100") References: <678f5b29c1b5e2100bfde5b5121c57a9d2d2f3d8.camel@telenet.be> <87a5ozd4nh.fsf@gmail.com> <20240121000457.dB4w2B0081cshW701B4xZR@laurent.telenet-ops.be> Date: Sun, 21 Jan 2024 23:58:59 -0500 Message-ID: <87il3m3qwc.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx10.migadu.com X-Spam-Score: -5.57 X-Migadu-Queue-Id: 47BF4D81E X-Migadu-Spam-Score: -5.57 X-TUID: 14Iyru1HyWWm Hi Maxime, M writes: >>> Subject: [PATCH 1/8] qt-utils: Allow overriding the shell interpreter in >>> 'wrap-qt-program'. >>> >>> * guix/build/qt-utils.scm (wrap-qt-program): Introduce a #:sh keyword >>> argument and pass it to 'wrap-program'. >> >> If bash-minimal is added to inputs as we do for other packages making >> use of wrap-program, we don't need to do more, no? Why do we need to >> explicit the argument here? > > Post-hoc reason (for the first patch): wrap-program has #:sh argument, > wrap-qt-program doesn=E2=80=99t, which is inconsistent. Good point. > For the rest (to be clear I think the remaining patches can be removed): OK, good. > Right, technically we don=E2=80=99t. The reason is to make sure that it= =E2=80=99s the > bash from inputs instead of the bash native-inputs. Currently, at > first it gets the (wrong) native bash, and later on this is fixed up > by the patch-shebangs phase, IIRC. I see. > However, (IIRC) that behaviour is a bug =E2=80=93 patch-shebangs is for > /usr/bin/=E2=80=A6 -> /gnu/store/=E2=80=A6 stuff =E2=80=93 if the code = =E2=80=9Cmake install=E2=80=9D or the > like already set a proper /gnu/store/=E2=80=A6 shebang, why automatically > change it to something else? Presumably it set it to the right > interpreter, and now patch-shebangs might autocorrupt it. Ah! Interesting. I haven't seen any report for such bug. > Another problem: there might not even be a patch-shebangs phase, uses > of wrap-program, wrap-qt-program and the phase of the qt-build-system > that uses wrap-qt-program (IIRC there exists such a phase) should be > usable in isolation. Also, there is a hidden assumption that the uses > of wrap-program are _before_ the shebang patching, whereas it might be > run afterwards as wll. > > Instead, I think it=E2=80=99s better for the uses of =E2=80=98wrap-progra= m=E2=80=99 to directly set it to the _right_ bash. > That=E2=80=99s what the #:sh argument is for, but #:sh is set to by defau= lt > (which =E2=80=9Cbash=E2=80=9D), which is incorrect. Hence, #:sh needs to = be set > explicitly, and hence wrap-qt-program needs a #:sh argument or the > like to pass on to wrap-program. > > That said, I don=E2=80=99t think all this explicit #:sh is appropriate ei= ther > =E2=80=93 it would need to be repeated for every single package definition > refering to wrap-program, etc.. Instead, for the future, I=E2=80=99d prop= ose > to eliminate the argument list of phases, turning phase procedures in > phase thunks and stuffing the old arguments in parameter objects > instead. > > Then, the #:sh of =E2=80=98wrap-program=E2=80=99 could default to (search= -input-file > (inputs) =E2=80=9Cbin/inputs=E2=80=9D) =E2=80=93 automatically correct (w= ithout needing > patch-shebangs) both for native and cross-compilation, and when > cross-compiling without =E2=80=9Cbash=E2=80=9D in (implicit) inputs, it a= utomatically > errors out (instead of doing the wrong thing as done currently). > > The phases would also be a bit less verbose to write =E2=80=93 (lambda* (= #:key > this that #:allow-other-keys) (proc this) stuff =E2=80=A6) could become > (lambda () (proc) stuff =E2=80=A6). > > (The =E2=80=98procedure=E2=80=99 syntax (inputs) for parameter objects mi= ght not be > the best here, but that=E2=80=99s nothing some bikeshedding over the prec= ise > syntax can=E2=80=99t fix.) Thanks for sharing your perspective on this. It's an interesting idea that you are proposing, but it'd entail a massive effort to port the code base. Cheers! Enjoy whatever hack you are currently pursuing! --=20 Maxim