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 4LTjDvgqA2YLhwAA62LTzQ:P1 (envelope-from ) for ; Tue, 26 Mar 2024 21:07:20 +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 4LTjDvgqA2YLhwAA62LTzQ (envelope-from ) for ; Tue, 26 Mar 2024 21:07:20 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail3 header.b=Dwr3agOu; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1711483640; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=Yk9RfNDgIm782LHmIhixmS8fXl9pTReum09Y3iTMprw=; b=ql8LeOkV/B4TSG4bHArVOh+00P1f65M6Kw25VEgb3N31Us15Vxm2TUYOxwOMdU4xlldLCU z8DpSX3+XfNs+VexJk+m9D/WFHFzWgumMVgcQswN/7o8TrKmeupneh8LMtCT6LFh6aa6hh T2WW7edOxQt0XkMf4CgMNnFtDNqzxpAGFHx0CuTtBi7NgiicZa3Gog7n8e9zzB/scs3GLt 2k6tb7Ib1t+iEdKR0bB52MrrTcHPBsvVI9Y5ooH2bKsG64aWlZsfbCOjYBYwrCyd2xNlU+ p7tM4MFwJbahovS9lJrDVZrVmKxKn2s6W0Aitn3h7DK3BXMAHeqrL0OKcdCCfw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail3 header.b=Dwr3agOu; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1711483640; a=rsa-sha256; cv=none; b=ManGg+xGFACuCEW78X/0UbSSQZMxntM0gvDhz0V/UGU/cyt29qQ0dOi2jZ0j5WaBOlQnqo OF55Kf4wkoaOF/RMQ2Gp0z69edxKSJBsSwybQnRRQ4cBjlBQ63ntj7wQvIVPluwgdn9EvX 9JqmvxuBSnjQeH64XkC+cOs+bntJZU3E38CdGsfk9HwjS+/x55c3cKGvUkXKxq72LURW6W 2qAlD4dg+rbQcybgf6i2tXJObsorouFdAghntdNLe923Tu31frWkRrDnFsPGNpOLPUkpiV FFOx16IEKCJKV21dhST69OZcLw8pry3S/eBmY8XR8xQSsC6w3MJsLEVq7eTm3w== 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 9B7402057B for ; Tue, 26 Mar 2024 21:07:19 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpD4a-0002nT-1E; Tue, 26 Mar 2024 16:07:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rpD4Y-0002nI-SM for guix-patches@gnu.org; Tue, 26 Mar 2024 16:07:02 -0400 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 1rpD4Y-0005dg-IL for guix-patches@gnu.org; Tue, 26 Mar 2024 16:07:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rpD4Y-0004U5-5i for guix-patches@gnu.org; Tue, 26 Mar 2024 16:07:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70001] [PATCH] gnu: reprotest: Add missing propogated inputs Resent-From: Skyler Ferris Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 26 Mar 2024 20:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70001 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Vagrant Cascadian , 70001@debbugs.gnu.org Received: via spool by 70001-submit@debbugs.gnu.org id=B70001.171148361417221 (code B ref 70001); Tue, 26 Mar 2024 20:07:02 +0000 Received: (at 70001) by debbugs.gnu.org; 26 Mar 2024 20:06:54 +0000 Received: from localhost ([127.0.0.1]:35148 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rpD4P-0004Tg-SI for submit@debbugs.gnu.org; Tue, 26 Mar 2024 16:06:54 -0400 Received: from mail-40131.protonmail.ch ([185.70.40.131]:21577) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rpD4N-0004T1-W3 for 70001@debbugs.gnu.org; Tue, 26 Mar 2024 16:06:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1711483605; x=1711742805; bh=Yk9RfNDgIm782LHmIhixmS8fXl9pTReum09Y3iTMprw=; h=Date:To:From:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=Dwr3agOulsZ/0Y0DwalKQzhCb+EnzEYmkPuF3kNzOBZ/Jl9UDaIk5AvezmIO1Armr zZ9Hr8GvFHl/7GEF1iuCgYLAO7gKp2ghjtuoz/qFT6VjFmmXw70VzjxoNCvAF88pwf jMwFHSfHMFf+qDvkAOVr6pRtBw4ENLZvbKIT5AEP5vuRnTQNUbCWJ4UzMkkbcYZLWd PXWOw4ehL+mAMMw17Ztj/nrZK4i7Pg08hNUHe1gL/+Cp14uXwHr/wA+B7Jfbf24bRL Ui1JOXioIyhy19uikCkRd5z4AekfLU9tocstQYImZDbRrE7YyeiTQk/dS4CeXBXVnS zry7/XZhIBLJA== Date: Tue, 26 Mar 2024 20:06:41 +0000 Message-ID: <79373a3d-4e2c-44b0-9593-97374eaba7fa@protonmail.com> In-Reply-To: <9c3327ac-c6a3-4324-b832-7b51463ae13e@protonmail.com> References: <7893aa6e-886b-4e74-999f-886a8ea0166b@protonmail.com> <87a5mlttrh.fsf@wireframe> <9c3327ac-c6a3-4324-b832-7b51463ae13e@protonmail.com> Feedback-ID: 40635331:user:proton 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: , Reply-to: Skyler Ferris X-ACL-Warn: , Skyler Ferris via Guix-patches From: Skyler Ferris via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: 9B7402057B X-Spam-Score: -6.84 X-Migadu-Spam-Score: -6.84 X-Migadu-Scanner: mx10.migadu.com X-TUID: a6ohq3E/msjk Hi again, sorry, it seems like some of my paragraphs and code blocks got=20 squashed into one giant paragraph somehow. I'm going to try this again,=20 hopefully it works this time. This is the text beneath the "Most of the=20 proposed inputs..." quote: I remember running into this before and it has been a pain point for me=20 because it is not clear what the optional dependencies are. I know that=20 package managers like apt have the ability to recommend packages which=20 are optional dependencies, but the problem that I run into is that if=20 I'm looking at a configuration (manifest, operating-system spec, etc)=20 it's not clear to me which items are included as "invisible=20 dependencies" of other packages and which ones are being included for=20 their own sake. So I would like to propose using a different technique=20 which I believe addresses both of our concerns. Basically, the technique is to embed absolute paths into the python=20 code. For example, I tried adding this phase to reprotest (it would need=20 some polishing before actual submission, for reasons mentioned later in=20 this email): ```scheme (add-after 'adjust-locales 'set-taskset-path =C2=A0 (lambda _ =C2=A0=C2=A0=C2=A0 (define (quote-surround str) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (string-append "'" str "'")) =C2=A0=C2=A0=C2=A0 (let ((util-linux #$(this-package-input "util-linux"))) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (when util-linux =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (substitute* "reprotest/build.p= y" =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (("'taskset'") =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (quote-surrou= nd (string-append util-linux "/bin/taskset"))) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (("setarch") =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (string-appen= d util-linux "/bin/setarch"))))))) ``` This let me run the num_cpus test from a pure shell without adding=20 util-linux to my explicit inputs. Running taskset from the shell=20 resulted in a "command not found" error so the package was not added to=20 the profile. Additionally, I built a `guix pack` with only reprotest as=20 an input, and util-linux was present. I built a pack with the current=20 version of the package and util-linux was not present. So it seems that=20 even though Guix sees the hash and is aware of it as a run-time=20 dependency, it does not automatically add the package to the profile,=20 addressing both of our concerns. If a user does not want an optional dependency then they can delete the=20 input like so (or replace it for a different version, if so desired): ```scheme (use-modules (guix packages) (gnu packages diffoscope)) (package =C2=A0=C2=A0 =C2=A0(inherit reprotest) =C2=A0=C2=A0 =C2=A0(inputs (modify-inputs (package-inputs reprotest) =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 (delete "util-linux")))) ``` Unfortunately I do not see a way to remove an input using the with-input=20 option in options->transformation procedure or the analogous=20 --with-input command-line flag. If we do go this route then I will look=20 at adding "#f" as a valid value for the with-input transformation to=20 support this case, but that will be handled in a separate issue. We could default to not including optional dependencies, but I don't=20 think that this would be the most useful thing to do. I would expect=20 that most people want all tests to work and that removing the inputs is=20 a niche interest. It seems likely that "all of the tests work out of the=20 box" is closer to what most people are currently experiencing because=20 all of the packages which I added to the propagated inputs, with the=20 exception of libfaketime and diffoscope, is in the %base-packages=20 variable that Guix recommends people use (and the "normal" diff command=20 is provided by %base-packages as well, so the lack of diffoscope would=20 not cause a problem for users with the default configuration). If we do=20 decide to exclude optional dependencies by default then I will look at=20 adding an "add-input" option to the available transformations.