GNU bug report logs - #36544
'set-paths' should exclude 'source' from consideration

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; Reported by: Mark H Weaver <mhw@HIDDEN>; dated Sun, 7 Jul 2019 23:27:02 UTC; Maintainer for guix is bug-guix@HIDDEN.

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


Received: (at 36544) by debbugs.gnu.org; 11 Jul 2019 21:25:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 11 17:25:05 2019
Received: from localhost ([127.0.0.1]:38926 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hlgYr-0000B9-2N
	for submit <at> debbugs.gnu.org; Thu, 11 Jul 2019 17:25:05 -0400
Received: from eggs.gnu.org ([209.51.188.92]:37582)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1hlgYo-0000AZ-VA
 for 36544 <at> debbugs.gnu.org; Thu, 11 Jul 2019 17:25:03 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:44190)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1hlgYj-0004aU-K7; Thu, 11 Jul 2019 17:24:57 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=51590 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1hlgYj-0004WJ-3a; Thu, 11 Jul 2019 17:24:57 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Mark H Weaver <mhw@HIDDEN>
Subject: Re: bug#36544: 'set-paths' should exclude 'source' from consideration
References: <871rz1a0kr.fsf@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 23 Messidor an 227 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, 11 Jul 2019 23:24:55 +0200
Message-ID: <87sgrcnu1k.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 36544
Cc: 36544 <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 (---)

Hello,

Mark H Weaver <mhw@HIDDEN> skribis:

> The 'set-paths' phase in (guix build gnu-build-system) currently
> includes 'source' in the set of candidates for inclusion in the
> search-path variables.

Oh, that was certainly not intended.

> First of all, I think it's undesirable to include subdirectories of the
> source directory in these search paths.  However, if you think it's
> desirable, there's another problem: it's fragile.  It depends on:
>
>  (1) whether the source is a tarball or an unpacked checkout, and
>  (2) whether the subdirectories specified in the search-paths
>      (e.g. 'include') are within the top source directory.
>
> Currently, if you change the 'source' field of a package from a tarball
> to an (unpacked) VCS checkout, there *might* be additional components
> added to the environment variables, depending on the source tree layout.
>
> For example, this causes our 'linux-libre' package to fail to build if
> you substitute its 'source' field for a git checkout, as Chris Webber
> discovered here:
>
>   https://lists.gnu.org/archive/html/help-guix/2019-07/msg00058.html
>   https://lists.gnu.org/archive/html/help-guix/2019-07/msg00062.html
>
> Also, if any package depends on the current behavior, it will break if
> its 'source' is changed from a VCS checkout to a release tarball.

Indeed, that=E2=80=99s terrible.  I suppose we were just lucky not to hit s=
uch
issues before!

> To avoid this unexpected sensitivity on the source origin method, I
> suggest that we explicitly exclude 'source' from consideration within
> the 'set-paths' phase.  What do you think?

I agree.  We should do that in the next =E2=80=98core-updates=E2=80=99.

Ludo=E2=80=99.




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

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


Received: (at submit) by debbugs.gnu.org; 7 Jul 2019 23:26:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 07 19:26:45 2019
Received: from localhost ([127.0.0.1]:57556 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hkGYP-00059b-Ez
	for submit <at> debbugs.gnu.org; Sun, 07 Jul 2019 19:26:45 -0400
Received: from lists.gnu.org ([209.51.188.17]:41711)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mhw@HIDDEN>) id 1hkGYN-00059U-TT
 for submit <at> debbugs.gnu.org; Sun, 07 Jul 2019 19:26:44 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:37834)
 by lists.gnu.org with esmtp (Exim 4.86_2)
 (envelope-from <mhw@HIDDEN>) id 1hkGYM-0006oO-Oa
 for bug-guix@HIDDEN; Sun, 07 Jul 2019 19:26:43 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,URIBL_BLOCKED
 autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <mhw@HIDDEN>) id 1hkGYL-0001eb-L4
 for bug-guix@HIDDEN; Sun, 07 Jul 2019 19:26:42 -0400
Received: from world.peace.net ([64.112.178.59]:53214)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <mhw@HIDDEN>) id 1hkGYL-0001e6-Hm
 for bug-guix@HIDDEN; Sun, 07 Jul 2019 19:26:41 -0400
Received: from mhw by world.peace.net with esmtpsa
 (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89)
 (envelope-from <mhw@HIDDEN>)
 id 1hkGYJ-0006Oo-PP; Sun, 07 Jul 2019 19:26:39 -0400
From: Mark H Weaver <mhw@HIDDEN>
To: bug-guix@HIDDEN
Subject: 'set-paths' should exclude 'source' from consideration
Date: Sun, 07 Jul 2019 19:26:12 -0400
Message-ID: <871rz1a0kr.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 64.112.178.59
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
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: -2.3 (--)

The 'set-paths' phase in (guix build gnu-build-system) currently
includes 'source' in the set of candidates for inclusion in the
search-path variables.

First of all, I think it's undesirable to include subdirectories of the
source directory in these search paths.  However, if you think it's
desirable, there's another problem: it's fragile.  It depends on:

 (1) whether the source is a tarball or an unpacked checkout, and
 (2) whether the subdirectories specified in the search-paths
     (e.g. 'include') are within the top source directory.

Currently, if you change the 'source' field of a package from a tarball
to an (unpacked) VCS checkout, there *might* be additional components
added to the environment variables, depending on the source tree layout.

For example, this causes our 'linux-libre' package to fail to build if
you substitute its 'source' field for a git checkout, as Chris Webber
discovered here:

  https://lists.gnu.org/archive/html/help-guix/2019-07/msg00058.html
  https://lists.gnu.org/archive/html/help-guix/2019-07/msg00062.html

Also, if any package depends on the current behavior, it will break if
its 'source' is changed from a VCS checkout to a release tarball.

To avoid this unexpected sensitivity on the source origin method, I
suggest that we explicitly exclude 'source' from consideration within
the 'set-paths' phase.  What do you think?

Also, does anyone know of other procedures that do something similiar?

     Thanks,
       Mark




Acknowledgement sent to Mark H Weaver <mhw@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#36544; Package guix. 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, 11 Jul 2019 21:30:02 UTC

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