GNU bug report logs

#28510 crash: guix build -S foo --with-source=bla

PackageSource(s)Maintainer(s)
guix PTS Buildd Popcon
Full log

Message #19 received at 28510@debbugs.gnu.org (full text, mbox, reply):

Received: (at 28510) by debbugs.gnu.org; 20 Sep 2022 09:19:41 +0000
From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 20 05:19:41 2022
Received: from localhost ([127.0.0.1]:56083 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1oaZPp-0002t9-8L
	for submit@debbugs.gnu.org; Tue, 20 Sep 2022 05:19:41 -0400
Received: from jpoiret.xyz ([206.189.101.64]:60036)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dev@jpoiret.xyz>) id 1oaZPn-0002t0-D8
 for 28510@debbugs.gnu.org; Tue, 20 Sep 2022 05:19:40 -0400
Received: from authenticated-user (jpoiret.xyz [206.189.101.64])
 by jpoiret.xyz (Postfix) with ESMTPA id 2878C184BCF;
 Tue, 20 Sep 2022 09:19:36 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim;
 t=1663665576;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=was+lOdiCsW1NYT+V/FbuOX04brnrDwN29sZ00d6kqM=;
 b=gAMyn4F2kVI9J/u+Ykzm0dRO8RefsACRRcumJQwaTab29bZTLGapw6tzTC73N7wpDxGbII
 aKaDVuOrkzQJEBY5Is9JkE0XbV+kDReUsqXW/xVgeTpAwE/m2TbmK/y5l22yUj7n5Itv12
 4ysN0EO0SY192OBl2XGy1///ocd7ynyySHkX4TBnjMXMVhScpLVk0wwCx6IabaARrgAOhw
 5KGn+Ymn1bHeIERVHuY6Q+f/T+UqOFXXiRym0Svfu8roIMyNVJEwKA0+iEjDD6DC4runSM
 +6FqsDFJDJRS+9XxsML8ZJHASNT94jC/iGe5v6sSTyfkbAqjIp0Oc5+Ke5+TWA==
From: Josselin Poiret <dev@jpoiret.xyz>
To: Maxime Devos <maximedevos@telenet.be>, Jérémy
 Korwin-Zmijowski <jeremy@korwin-zmijowski.fr>, 28510@debbugs.gnu.org
Subject: Re: bug#28510: crash: guix build -S foo --with-source=bla
In-Reply-To: <229c1399-ce4b-b942-1bae-deea501f1c48@telenet.be>
References: <idjwp4uvqim.fsf@bimsb-sys02.mdc-berlin.net>
 <d566d759-38d7-849e-d067-35e207359210@korwin-zmijowski.fr>
 <229c1399-ce4b-b942-1bae-deea501f1c48@telenet.be>
Date: Tue, 20 Sep 2022 11:19:35 +0200
Message-ID: <87k05y2yjc.fsf@jpoiret.xyz>
MIME-Version: 1.0
Content-Type: text/plain
Authentication-Results: jpoiret.xyz;
 auth=pass smtp.auth=jpoiret@jpoiret.xyz smtp.mailfrom=dev@jpoiret.xyz
X-Spamd-Bar: /
X-Spam-Score: 2.0 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  Hi everyone, Maxime Devos <maximedevos@telenet.be> writes:
 > Here is a simpler reproducer for that error: > > file a.scm: > (use-modules
 (gnu packages) (guix packages) (guix gexp)) > (package > (inherit (specifica
 [...] Content analysis details:   (2.0 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches SPF record
 2.0 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
 [URI: jpoiret.xyz (xyz)]
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 0.0 FROM_SUSPICIOUS_NTLD   From abused NTLD
X-Debbugs-Envelope-To: 28510
X-BeenThere: debbugs-submit@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@debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit@debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request@debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request@debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
X-Spam-Score: 2.0 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  Hi everyone, Maxime Devos <maximedevos@telenet.be> writes:
    > Here is a simpler reproducer for that error: > > file a.scm: > (use-modules
    (gnu packages) (guix packages) (guix gexp)) > (package > (inherit (specifica
    [...] 
 
 Content analysis details:   (2.0 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches SPF record
  2.0 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
                             [URI: jpoiret.xyz (xyz)]
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
  1.0 BULK_RE_SUSP_NTLD      Precedence bulk and RE: from a suspicious TLD
  0.0 FROM_SUSPICIOUS_NTLD   From abused NTLD
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
Hi everyone,

Maxime Devos <maximedevos@telenet.be> writes:
> Here is a simpler reproducer for that error:
>
> file a.scm:
> (use-modules (gnu packages) (guix packages) (guix gexp))
> (package
>    (inherit (specification->package "hello"))
>    (source (local-file "a.scm")))
>
> guix build -f a.scm --source

The issue is that package-source-derivation in guix/packages.scm doesn't
actually always yield a derivation, since lower-object isn't guaranteed
to do that: here the gexp compiler for local-file only returns a string
denoting the file path of the interned store file.  `guix build` relies
on the (wrong) assumption that everything that it will build will end up
being a derivation in some way or another, so just calls
show-derivation-outputs on that, which then errors as above.

build-derivations, contrary to its name, can also pass simple file names
to build-things, and since the file will already be interned in the
store at that point, it won't need to do anything, and there won't be
any errors there.

The simple fix would be to add another band-aid cond at the
show-derivation-outputs call in build.scm, but it doesn't seem to be
enough in the long term.

What do people think?

-- 
Josselin Poiret




Send a report that this bug log contains spam.


debbugs.gnu.org maintainers <help-debbugs@gnu.org>. Last modified: Sun Dec 22 16:35:29 2024; Machine Name: wallace-server

GNU bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.