GNU bug report logs - #64861
[PATCH] guix: Add lint check for guix as propagated-input

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Karl Hallsby <karl@HIDDEN>; Keywords: patch; dated Tue, 25 Jul 2023 18:06:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 64861 <at> debbugs.gnu.org:


Received: (at 64861) by debbugs.gnu.org; 7 Sep 2023 15:19:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 07 11:19:11 2023
Received: from localhost ([127.0.0.1]:40977 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qeGml-0002AG-Ho
	for submit <at> debbugs.gnu.org; Thu, 07 Sep 2023 11:19:11 -0400
Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:40318)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1qeGmb-00028t-MV
 for 64861 <at> debbugs.gnu.org; Thu, 07 Sep 2023 11:19:02 -0400
Received: by mail-wr1-x42c.google.com with SMTP id
 ffacd0b85a97d-31c3f574ef8so199197f8f.1
 for <64861 <at> debbugs.gnu.org>; Thu, 07 Sep 2023 08:18:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1694099934; x=1694704734; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:message-id:date:references
 :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id
 :reply-to; bh=mQrGfRJDEOaj0RZO7CNjwG/UMQGCG1S2vLErrEszL/A=;
 b=rLDuoNVq2w1q+uuCgRV1zbl0J7qf4PVarGo7qScroefeR/Uoe2505yEJDJXea1clhs
 HqvzZRc6a5RgfD2Wh0n/Te5TBsDEZqeNtcOnZRlkhOczBNKLqoXifBS0A4fX81sdeOPg
 4SAy43AMyHCWTbt/WMxP54W+daqQ4zka2qBP/mV/6YKhJ6aiY7LnlRh/4gvHPw2oUEfn
 YoFQTAoPjtswHS7SCkwESohWLbHjiRs+ooZdvL8dxRiqpgu1w4HkNLb7NpBG1OBze6h2
 ztHWD/29lZV2U/5UXgAnO8kHjDteNDWWj3z5oKD9bc54igYBaks+b2Sz2bvQgFdOPgQA
 wTOw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1694099934; x=1694704734;
 h=content-transfer-encoding:mime-version: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=mQrGfRJDEOaj0RZO7CNjwG/UMQGCG1S2vLErrEszL/A=;
 b=R42Hc5JHAFugcJPvkbQ7tiwhEqhniMw5IOnniAy2xKWYcGhYBKy3P5OKmc4F2RwpQK
 M6XJVPJhqfsrtbO4rqOBKHwq1O7I3cagqNd1fuz0EPecQFt97xNgyp1lmG3dAewLu9ME
 SpKF+1UAfZkxuqRlpsGanQ/r0us4rcpeuKKQjizpFZ+x0X331eVO1I5ragKo0+xU7gvZ
 N/GY7YD+tee9XSkUEzTlguIrrgtRYsV3kodUJODK5MyhUGjZ06f68ybw897d2d11F/Eh
 ve5lLQAO/Xu4nbaxmqbIPU+w8W8BZkYoNExBNilLeNpX/nJGGCLWLPqIJE+UrQ/YNoFu
 1M0g==
X-Gm-Message-State: AOJu0YzM7YPs24aOWl+6yU6KHZWEBuK2ss5ut3eoLZoDPL5u2jGT473b
 zygPy4lNmM6gJUGLRmUTv7ru1y5HcQo=
X-Google-Smtp-Source: AGHT+IHwJeeEyBdHPbJxMjDtK2tKgCuba1/LnKeqRX6NoYLfx6SCO3xXBq3DJZVi/4KsvrvdAoOyCQ==
X-Received: by 2002:adf:f291:0:b0:316:ef5f:7d8f with SMTP id
 k17-20020adff291000000b00316ef5f7d8fmr14578904wro.3.1694099934151; 
 Thu, 07 Sep 2023 08:18:54 -0700 (PDT)
Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id
 cc11-20020a5d5c0b000000b0031f34a395e7sm17301385wrb.45.2023.09.07.08.18.53
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 07 Sep 2023 08:18:53 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Christopher Baines
 <mail@HIDDEN>
Subject: Re: [bug#64861] [PATCH] guix: Add lint check for guix as
 propagated-input
In-Reply-To: <87fs4dqvml.fsf_-_@HIDDEN>
References: <388dc9bec6dabc97092eb2009fed304c3f84c6fc.1690308209.git.karl@HIDDEN>
 <87pm4f7skl.fsf@HIDDEN> <87fs4dqvml.fsf_-_@HIDDEN>
Date: Thu, 07 Sep 2023 16:22:14 +0200
Message-ID: <87bkeekqqx.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 64861
Cc: Karl Hallsby <karl@HIDDEN>, 64861 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi,

On Sun, 20 Aug 2023 at 22:58, Ludovic Court=C3=A8s <ludo@HIDDEN> wrote:

> Maybe =E2=80=98guile-imanifest=E2=80=99 should be made a Guix extension, =
which Guix
> searches for in $GUIX_EXTENSIONS_PATH?

And probably renamed =E2=80=99guix-imanifest=E2=80=99?

Back to the submission, I think that the propagation of the package guix
means something is wrong.  From my point of view, there is two cases:

 1. The package uses the stable library API and thus it makes sense to
    rely on the package =E2=80=99guix=E2=80=99.  That=E2=80=99s the case fo=
r =E2=80=99gwl=E2=80=99,
    =E2=80=99guix-data-service=E2=80=99 for example.

 2. The aim of package is to collaborate with the current Guix and thus
    there is no point to have the package =E2=80=99guix=E2=80=99 as inputs.=
  Instead,
    the package must rely on GUIX_EXTENSIONS_PATH.  That=E2=80=99s the case=
 for
    =E2=80=99guix-modules=E2=80=99 or =E2=80=99guile-imanifest=E2=80=99 (so=
 that needs a fix ;-))

Therefore, I think this new checker makes sense.  WDYT?


About #1, IMHO, this is expected:

--8<---------------cut here---------------start------------->8---
$ guix shell -C gwl -- guix --version
guix shell: error: guix: command not found

        (define-public gwl
            (inputs
        [...]
               (list guix
--8<---------------cut here---------------end--------------->8---

and this is not expected:

--8<---------------cut here---------------start------------->8---
$ guix shell -C guix-data-service -- guix --version
guix (GNU Guix) 1.4.0-10.4dfdd82
Copyright (C) 2023 the Guix authors
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.htm=
l>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

        (define-public guix-data-service
        [...]
              (propagated-inputs
               (list guix
--8<---------------cut here---------------end--------------->8---


Cheers,
simon




Information forwarded to guix-patches@HIDDEN:
bug#64861; Package guix-patches. Full text available.

Message received at 64861 <at> debbugs.gnu.org:


Received: (at 64861) by debbugs.gnu.org; 20 Aug 2023 20:58:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 20 16:58:22 2023
Received: from localhost ([127.0.0.1]:54936 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qXpV8-00074A-84
	for submit <at> debbugs.gnu.org; Sun, 20 Aug 2023 16:58:22 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:39760)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1qXpV6-00073x-GR
 for 64861 <at> debbugs.gnu.org; Sun, 20 Aug 2023 16:58:21 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1qXpUz-0001qa-9C; Sun, 20 Aug 2023 16:58:13 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To:
 From; bh=+wktX6Zzw3ytO20Q3kNzbxWxzGuh9JD8Efkv6XAVcd8=; b=DvVj1Nd7BlILW45sBE6H
 /xuyAx5iEn7V/1DFplee1cSj8NvaBDfj9W7Pb+QY+P8fRN/J4DfTbu+VQuji6IxV30pJL3Tpdxm7H
 73MOgVfexFqHV9m2SFoXRwTah7GnksDtDH1eaQomPTYpUr+8+dC5ZYlaYR/vXmzcSjcbbQTM76CA/
 65Yrd4oRBzeiz12M075HiWQk4fZqaUh8q7YeSf+Vq7nO8B1EG+MNpGWGotYhicsQdSsmEoHjYa1V3
 6W9+xtRrwW1x0EnIZguxK0FunZc3hN7aVTM+iGaLMXBapn9r9a0bHLPR56mB8aJppeHusweKkl5iI
 AaeWVZs4gE9j2A==;
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Christopher Baines <mail@HIDDEN>
Subject: Re: bug#64861: [PATCH] guix: Add lint check for guix as
 propagated-input
References: <388dc9bec6dabc97092eb2009fed304c3f84c6fc.1690308209.git.karl@HIDDEN>
 <87pm4f7skl.fsf@HIDDEN>
Date: Sun, 20 Aug 2023 22:58:10 +0200
In-Reply-To: <87pm4f7skl.fsf@HIDDEN> (Christopher Baines's message of
 "Tue, 25 Jul 2023 19:26:01 +0100")
Message-ID: <87fs4dqvml.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
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: 64861
Cc: Karl Hallsby <karl@HIDDEN>, 64861 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi,

Christopher Baines <mail@HIDDEN> skribis:

> Using guile-imanifest breaks:
>
>   =E2=86=92 ./pre-inst-env guix environment --pure --ad-hoc guile guile-i=
manifest -- guile -c "(use-modules (imanifest))"
>   Backtrace:
>     ...
>
>   ice-9/boot-9.scm:3330:6: In procedure resolve-interface:
>   no code for module (guix profiles)

Maybe =E2=80=98guile-imanifest=E2=80=99 should be made a Guix extension, wh=
ich Guix
searches for in $GUIX_EXTENSIONS_PATH?

An example of that is =E2=80=98guix-modules=E2=80=99.

Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#64861; Package guix-patches. Full text available.

Message received at 64861 <at> debbugs.gnu.org:


Received: (at 64861) by debbugs.gnu.org; 25 Jul 2023 18:46:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 25 14:46:40 2023
Received: from localhost ([127.0.0.1]:46962 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qON3Q-0000pv-En
	for submit <at> debbugs.gnu.org; Tue, 25 Jul 2023 14:46:40 -0400
Received: from mail-oi1-x229.google.com ([2607:f8b0:4864:20::229]:52734)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <karl@HIDDEN>) id 1qON3N-0000ph-So
 for 64861 <at> debbugs.gnu.org; Tue, 25 Jul 2023 14:46:38 -0400
Received: by mail-oi1-x229.google.com with SMTP id
 5614622812f47-3a38953c928so4101398b6e.1
 for <64861 <at> debbugs.gnu.org>; Tue, 25 Jul 2023 11:46:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=hallsby.com; s=google; t=1690310792; x=1690915592;
 h=content-transfer-encoding:mime-version:message-id:in-reply-to:date
 :subject:cc:to:from:user-agent:references:from:to:cc:subject:date
 :message-id:reply-to;
 bh=WYSxOWVAvhjMcvL9br6gtfPi3bKC6S0z8KRrj0JoRAo=;
 b=ArQ86fNFL4xyRa7M5J5i6+qA0d5IFu1+Kk099D0puKOGdgK607xNO/+KtBOkv0tfE5
 I6NhVBNEG9nTt2h+uFcX/18oUpM0UwtD25Ti1pcVySP4wDWq5bUb7L2UTaCN1TByz+Cu
 19FEetSJOF8VicDcELvR/AhZ/8qZwEqTi6jLNxcuW9gc6z0hhrVQ6tJ1iKI+X4GaXGjV
 rB17VG7tYddjLBunhocB9Y7Jgwko0gs1MnNyhSsbsd9t/mi15pB616hhYf3md1y6tuaE
 ernE4gdQQ+7jbwP7efVIe+p95aLde6Z2guqQ8qmZHBSoipceLS0jvsoM85qTyxufneqk
 BWdw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1690310792; x=1690915592;
 h=content-transfer-encoding:mime-version:message-id:in-reply-to:date
 :subject:cc:to:from:user-agent:references:x-gm-message-state:from:to
 :cc:subject:date:message-id:reply-to;
 bh=WYSxOWVAvhjMcvL9br6gtfPi3bKC6S0z8KRrj0JoRAo=;
 b=CnM3rY0iZs8Pp4fCdK8/57tkB1OAn3Gd23+/tjaR8IfoTcFY+yFNpIKGc5yC8KNSDo
 D85mk/a7CeUu6Kodd0hHnN0WXc/9r7BP+en9R1G3mgXWQTXOMxZoW1lUTwSVBsZz54sc
 Q7W1hoghWD5C7zl9KN3PQztnwwSmN8ufQTuw7Ezx12MTjlf6zkUkqFvtIoC+CYbmh0z2
 Eh2VWtx/TxWI5efBu407GEOitULUkb/I9/I48B//KjuTlz4Vw3weGJdWp6WISsVmoPt5
 PIhZZ4hXzfgR1TrPvTIgamz+REnOKrTn2dc1OJThFog4102tfs7IXhUJmwHqP6sL4RJY
 iqYA==
X-Gm-Message-State: ABy/qLZXHxrmQEglNa9vfGeru8ThRkoWTEf+J7ySCmmoyYzCQZ6j6ss7
 qK6sE146YfeTE/WQCkYrN934q13zJhzdAvL3XsgGoA==
X-Google-Smtp-Source: APBJJlG/JASfHjo81DC8CLISa0PfO8mhS+agvW4IeteZy5Tc/p6AmqcV+lzbrf/twRLJooDZ7Yyj8Q==
X-Received: by 2002:a05:6808:1594:b0:3a5:a82f:2cd with SMTP id
 t20-20020a056808159400b003a5a82f02cdmr11539604oiw.8.1690310791782; 
 Tue, 25 Jul 2023 11:46:31 -0700 (PDT)
Received: from localhost (1459483-v115.1145-static.batvilaa.metronetinc.net.
 [192.69.181.148]) by smtp.gmail.com with ESMTPSA id
 s14-20020a0cb30e000000b006238b37fb05sm4567450qve.119.2023.07.25.11.46.31
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 25 Jul 2023 11:46:31 -0700 (PDT)
References: <388dc9bec6dabc97092eb2009fed304c3f84c6fc.1690308209.git.karl@HIDDEN>
 <87pm4f7skl.fsf@HIDDEN>
User-agent: mu4e 1.10.3; emacs 28.2
From: "Karl G. Hallsby" <karl@HIDDEN>
To: Christopher Baines <mail@HIDDEN>
Subject: Re: [bug#64861] [PATCH] guix: Add lint check for guix as
 propagated-input
Date: Tue, 25 Jul 2023 13:41:55 -0500
In-reply-to: <87pm4f7skl.fsf@HIDDEN>
Message-ID: <874jlr96d5.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 64861
Cc: 64861 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


Christopher Baines <mail@HIDDEN> writes:

> [[PGP Signed Part:Undecided]]
>
> Karl Hallsby <karl@HIDDEN> writes:
>
>> * guix/lint.scm (new check): Run lint check warning user if the provided
>> package uses guix as a propagated-input.
>>
>> Passing guix as a propagated-input is problematic when users install a p=
ackage
>> into their profiles. This can cause the guix propagated by the package t=
o be
>> used in preference of the real one in $HOME/.config/. It was first notic=
ed on
>> IRC with https://logs.guix.gnu.org/guix/2023-07-22.log#044534, and repro=
duced
>> with a different package https://logs.guix.gnu.org/guix/2023-07-25.log#0=
54737.
>> ---
>>  guix/lint.scm | 14 ++++++++++++++
>>  1 file changed, 14 insertions(+)
>
> I'm not sure this lint warning is helpful as in both cases mentioned in
> the IRC links you provided (guile-imanifest and guix-data-service),
> these packages provide Guile modules that depend on Guix, and therefore
> the guix package is expected in their propagated inputs.
>
> If you remove guix or make it a input instead of a propagated input,
> then this breaks using the package, for example, with this change:
>
>   modified   gnu/packages/guile-xyz.scm
>   @@ -2098,8 +2098,10 @@ (define-public guile-imanifest
>          (build-system guile-build-system)
>          (native-inputs
>           (list guile-3.0))
>   +      (inputs
>   +       (list guix))
>          (propagated-inputs
>   -       (list guile-readline guile-colorized guix))
>   +       (list guile-readline guile-colorized))
>          (home-page "https://sr.ht/~brown121407/guile-imanifest")
>          (synopsis "Interactive Guix manifests")
>          (description "This package provides functions to generate Guix m=
anifests
>
> Using guile-imanifest breaks:
>
>   =E2=86=92 ./pre-inst-env guix environment --pure --ad-hoc guile guile-i=
manifest -- guile -c "(use-modules (imanifest))"
>   Backtrace:
>     ...
>
>   ice-9/boot-9.scm:3330:6: In procedure resolve-interface:
>   no code for module (guix profiles)
>
>
> I think some other approach is needed to avoid people having problems
> with the guix package appearing in their users profile.
>
> [[End of PGP Signed Part]]

That makes sense. Though, this lint is just a warning, so if nothing
else, it should make people think if guix really needs to be propagated.
If this lint is not the solution, then a way to mark packages that are
not recommended to be installed like this would be nice.




Information forwarded to guix-patches@HIDDEN:
bug#64861; Package guix-patches. Full text available.

Message received at 64861 <at> debbugs.gnu.org:


Received: (at 64861) by debbugs.gnu.org; 25 Jul 2023 18:29:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 25 14:29:56 2023
Received: from localhost ([127.0.0.1]:46940 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qOMnD-0000QC-QZ
	for submit <at> debbugs.gnu.org; Tue, 25 Jul 2023 14:29:56 -0400
Received: from mira.cbaines.net
 ([2a01:7e00:e000:2f8:fd4d:b5c7:13fb:3d27]:35679)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1qOMnB-0000Q2-4g
 for 64861 <at> debbugs.gnu.org; Tue, 25 Jul 2023 14:29:54 -0400
Received: from localhost (unknown [IPv6:2a02:8010:68c1:0:54d1:d5d4:280e:f699])
 by mira.cbaines.net (Postfix) with ESMTPSA id BC62127BBE2;
 Tue, 25 Jul 2023 19:29:51 +0100 (BST)
Received: from felis (localhost [127.0.0.1])
 by localhost (OpenSMTPD) with ESMTP id 87cd695e;
 Tue, 25 Jul 2023 18:29:49 +0000 (UTC)
References: <388dc9bec6dabc97092eb2009fed304c3f84c6fc.1690308209.git.karl@HIDDEN>
User-agent: mu4e 1.10.5; emacs 28.2
From: Christopher Baines <mail@HIDDEN>
To: Karl Hallsby <karl@HIDDEN>
Subject: Re: [bug#64861] [PATCH] guix: Add lint check for guix as
 propagated-input
Date: Tue, 25 Jul 2023 19:26:01 +0100
In-reply-to: <388dc9bec6dabc97092eb2009fed304c3f84c6fc.1690308209.git.karl@HIDDEN>
Message-ID: <87pm4f7skl.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 64861
Cc: 64861 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable


Karl Hallsby <karl@HIDDEN> writes:

> * guix/lint.scm (new check): Run lint check warning user if the provided
> package uses guix as a propagated-input.
>
> Passing guix as a propagated-input is problematic when users install a pa=
ckage
> into their profiles. This can cause the guix propagated by the package to=
 be
> used in preference of the real one in $HOME/.config/. It was first notice=
d on
> IRC with https://logs.guix.gnu.org/guix/2023-07-22.log#044534, and reprod=
uced
> with a different package https://logs.guix.gnu.org/guix/2023-07-25.log#05=
4737.
> ---
>  guix/lint.scm | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)

I'm not sure this lint warning is helpful as in both cases mentioned in
the IRC links you provided (guile-imanifest and guix-data-service),
these packages provide Guile modules that depend on Guix, and therefore
the guix package is expected in their propagated inputs.

If you remove guix or make it a input instead of a propagated input,
then this breaks using the package, for example, with this change:

  modified   gnu/packages/guile-xyz.scm
  @@ -2098,8 +2098,10 @@ (define-public guile-imanifest
         (build-system guile-build-system)
         (native-inputs
          (list guile-3.0))
  +      (inputs
  +       (list guix))
         (propagated-inputs
  -       (list guile-readline guile-colorized guix))
  +       (list guile-readline guile-colorized))
         (home-page "https://sr.ht/~brown121407/guile-imanifest")
         (synopsis "Interactive Guix manifests")
         (description "This package provides functions to generate Guix man=
ifests

Using guile-imanifest breaks:

  =E2=86=92 ./pre-inst-env guix environment --pure --ad-hoc guile guile-ima=
nifest -- guile -c "(use-modules (imanifest))"
  Backtrace:
    ...

  ice-9/boot-9.scm:3330:6: In procedure resolve-interface:
  no code for module (guix profiles)


I think some other approach is needed to avoid people having problems
with the guix package appearing in their users profile.

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmTAFJpfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9XchPw/+IlvgRWwEQFH8HzbVdE1XmUYRQ94BsCu8
3QCq406XzvVdUXO94rmy4jqtEqQgZk9AR63Qa0dj8mx6YaNvWo/Hf0pyb2FihnID
g/Hu7M6jrI6sx0MUXJ0jRNRUDZgO2U4PrxokHtRzs8jsPOmTeuNSSWS1+lHwoQt5
1jk3vD4HxZ3dH5oKCdYOZ61WpOsL+0IUSI9vFsRh3mYF6I+tsQMBIY7WN9iOOCpy
YAaChBiNXuR3MpgWvi6f3QZCcrBv6DdQitmvP1YJqxazuNXOOa5mv5bId+fZ/yF1
Gs0hKk4rd7aDagspEKjcvzqbMWAcAAVnII08Y8w0I1hm9GxrbDEDRv70aZy410Tb
fuGVcBzOsLHJqiKGcvoh7MPoz29JmKrg1mu83Sd4UFL3vluLwtoSq35xHaYVtkzJ
Krr4p/FPgag39r80fZaDSWSQwzR+jEufCiEkOhVXKvvg2EqQeqUj4Fu0D26srDbd
oArse7NwoGHEv2s8qaB4o0u7vl0OxFq46qO++Xuf4/Zh3c90re2RYJofehIRNuY7
fIcpqiG7KT5IId7LbQsFVyP3yaLz2mbfzpqMYOBYp9hOrM92PSLDDP2vwQwF4DV+
0a4N/v/54+/hMH2MBL87EFFjL8qEMRojRTRhb1NlDF7/SQ0y7YYHef2PpI/3Sjta
Qq4dCatz01c=
=P4R2
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to guix-patches@HIDDEN:
bug#64861; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 25 Jul 2023 18:05:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 25 14:05:41 2023
Received: from localhost ([127.0.0.1]:46920 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qOMPl-0008JF-IR
	for submit <at> debbugs.gnu.org; Tue, 25 Jul 2023 14:05:41 -0400
Received: from lists.gnu.org ([2001:470:142::17]:42178)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <karl@HIDDEN>) id 1qOMPj-0008J2-Hm
 for submit <at> debbugs.gnu.org; Tue, 25 Jul 2023 14:05:40 -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 <karl@HIDDEN>) id 1qOMPc-00059a-BS
 for guix-patches@HIDDEN; Tue, 25 Jul 2023 14:05:33 -0400
Received: from mail-qk1-x72e.google.com ([2607:f8b0:4864:20::72e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <karl@HIDDEN>) id 1qOMPa-0001aU-KJ
 for guix-patches@HIDDEN; Tue, 25 Jul 2023 14:05:32 -0400
Received: by mail-qk1-x72e.google.com with SMTP id
 af79cd13be357-76c4890a220so166872885a.3
 for <guix-patches@HIDDEN>; Tue, 25 Jul 2023 11:05:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=hallsby.com; s=google; t=1690308328; x=1690913128;
 h=content-transfer-encoding:mime-version:message-id:date:subject:cc
 :to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=Us5bBGdVGqarFjcvlUCXkJvAX9reMuPbZJ8HYWet8+g=;
 b=RhXJvGQM2jRRwbybvbUf6qPOwoDi20FH5ARmvKHm8NSUrchs4twihStMptbjB6smwj
 Xr+s2Mf2wwVnhliJoadDER58tDBi7YBvaaqr/kJ+7s89J5eu4QJR1wPKjpwG5xZmaeYR
 O+vlHN6oWJtte+jkGuzijy1egJy6mxg+I9QDU3kY88wyTZd4Cuw1WwkGKOXb8kSz1/Kj
 XSflh8oW/lZE/k6xdkiRfQ6J5CevS783kLFehPbj+SF2MAnm3I2oJ84FEvMGdSBwkANe
 QOGSi49OnbzEqrS0CglgXacFYsh5xwFpYcT+ONsh0LItpdJx+HQp8pa35TogySKjAJNZ
 6pZg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1690308328; x=1690913128;
 h=content-transfer-encoding:mime-version:message-id:date:subject:cc
 :to:from:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=Us5bBGdVGqarFjcvlUCXkJvAX9reMuPbZJ8HYWet8+g=;
 b=hIvUNP6UJ5+UEmPtr1CJH3ob2T41ZX2ngM7cVGbt2C/rIvp3uGGlz2aM9npgOu2xtt
 Eh2dn5ZWYR2T1muNiyc7UXNXBNHoVzivjcq1dgSsMcM5OVBj3H9XWhpaphfPIbR68pWf
 NnlGEiGL2+r+BXkWqO1SO3k3HYs4TqaCCoVrTSRGnEr2si9pzyHSAg/ERWk9FY7NCEyb
 SfuiOdjgsN19SBmTcy/8VBaRm3jStUi/Op9aTyVA4Are0v07yW4jrpd1Rxo6csdYPxkl
 i+qQg+ScZRnncsq7EqfHzIo8GFG40JRHZBhhKE/l7pXX/Oj16y1ztzi0JcpKrEWO47td
 vR+Q==
X-Gm-Message-State: ABy/qLa/WKtXN3dVA9nCbBVpZv0YtwzSJKMWXjvq6HZCU7UjzJxNT+oo
 F7EzBpWi3hhJjqtnNA6NazlQGBYqYrOQdE3ipgnIpA==
X-Google-Smtp-Source: APBJJlFPL65ipNtupeeOTbJrTtH7T2S+XrgBb7iNnCehS9wRuc2kCVPw9s+5sQHfeBfS8KsM7h08Hg==
X-Received: by 2002:a05:620a:2a01:b0:765:5982:81da with SMTP id
 o1-20020a05620a2a0100b00765598281damr4662589qkp.47.1690308328387; 
 Tue, 25 Jul 2023 11:05:28 -0700 (PDT)
Received: from Karl-Desktop.raven
 (1459483-v115.1145-static.batvilaa.metronetinc.net. [192.69.181.148])
 by smtp.gmail.com with ESMTPSA id
 g28-20020a05620a13dc00b0076730d0b0b9sm3832433qkl.14.2023.07.25.11.05.27
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 25 Jul 2023 11:05:27 -0700 (PDT)
From: Karl Hallsby <karl@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH] guix: Add lint check for guix as propagated-input
Date: Tue, 25 Jul 2023 13:04:43 -0500
Message-Id: <388dc9bec6dabc97092eb2009fed304c3f84c6fc.1690308209.git.karl@HIDDEN>
X-Mailer: git-send-email 2.40.1
MIME-Version: 1.0
X-Debbugs-Cc: Christopher Baines <mail@HIDDEN>, Josselin Poiret <dev@HIDDEN>, Ludovic Courtès <ludo@HIDDEN>, Mathieu Othacehe <othacehe@HIDDEN>, Ricardo Wurmus <rekado@HIDDEN>, Simon Tournier <zimon.toutoune@HIDDEN>, Tobias Geerinckx-Rice <me@HIDDEN>
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=2607:f8b0:4864:20::72e;
 envelope-from=karl@HIDDEN; helo=mail-qk1-x72e.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 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_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
Cc: Karl Hallsby <karl@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

* guix/lint.scm (new check): Run lint check warning user if the provided
package uses guix as a propagated-input.

Passing guix as a propagated-input is problematic when users install a package
into their profiles. This can cause the guix propagated by the package to be
used in preference of the real one in $HOME/.config/. It was first noticed on
IRC with https://logs.guix.gnu.org/guix/2023-07-22.log#044534, and reproduced
with a different package https://logs.guix.gnu.org/guix/2023-07-25.log#054737.
---
 guix/lint.scm | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/guix/lint.scm b/guix/lint.scm
index d173563e51..5fae34ca22 100644
--- a/guix/lint.scm
+++ b/guix/lint.scm
@@ -575,6 +575,16 @@ (define (check-input-labels package)
                 (inputs ,package-inputs)
                 (propagated-inputs ,package-propagated-inputs))))
 
+(define (check-guix-propagated-inputs package)
+  (if (and (not (null? (package-propagated-inputs package)))
+           (not (memq (@ (gnu packages package-management) guix)
+                      (package-propagated-inputs package))))
+      (list
+       (make-warning package
+                     (G_ "are you sure guix should be a propagated-input?")
+                     #:field 'propagated-inputs))
+      '()))
+
 (define (report-wrap-program-error package wrapper-name)
   "Warn that \"bash-minimal\" is missing from 'inputs', while WRAPPER-NAME
 requires it."
@@ -1884,6 +1894,10 @@ (define %local-checkers
      (name        'input-labels)
      (description "Identify input labels that do not match package names")
      (check       check-input-labels))
+   (lint-checker
+     (name        'warn-guix-propagated-inputs)
+     (description "Emit warning if guix package is propagated-input")
+     (check       check-guix-propagated-inputs))
    (lint-checker
      (name        'wrapper-inputs)
      (description "Make sure 'wrap-program' can finds its interpreter.")

base-commit: 9ff1e7652a407b88a3eeeab6a67261f6fee40807
-- 
2.40.1





Acknowledgement sent to Karl Hallsby <karl@HIDDEN>:
New bug report received and forwarded. Copy sent to mail@HIDDEN, dev@HIDDEN, ludo@HIDDEN, othacehe@HIDDEN, rekado@HIDDEN, zimon.toutoune@HIDDEN, me@HIDDEN, guix-patches@HIDDEN. Full text available.
Report forwarded to mail@HIDDEN, dev@HIDDEN, ludo@HIDDEN, othacehe@HIDDEN, rekado@HIDDEN, zimon.toutoune@HIDDEN, me@HIDDEN, guix-patches@HIDDEN:
bug#64861; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 7 Sep 2023 15:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.