From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id sOgLFTqD6mHNBgEAgWs5BA (envelope-from ) for ; Fri, 21 Jan 2022 10:56:10 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id +GTMDTqD6mFuYQEAG6o9tA (envelope-from ) for ; Fri, 21 Jan 2022 10:56:10 +0100 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 A3CAD2BBAC for ; Fri, 21 Jan 2022 10:56:09 +0100 (CET) Received: from localhost ([::1]:42078 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nAqeO-0007Sj-RE for larch@yhetil.org; Fri, 21 Jan 2022 04:56:08 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60920) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nAnkJ-0006oh-Dh for bug-guix@gnu.org; Fri, 21 Jan 2022 01:50:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:38898) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nAnkI-00041T-A2 for bug-guix@gnu.org; Fri, 21 Jan 2022 01:50:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nAnkI-0001L8-4H for bug-guix@gnu.org; Fri, 21 Jan 2022 01:50:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#53406: union-build incorrectly handles grafts Resent-From: John Kehayias Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 21 Jan 2022 06:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 53406 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 53406@debbugs.gnu.org X-Debbugs-Original-To: "bug-guix@gnu.org" Received: via spool by submit@debbugs.gnu.org id=B.16427477545077 (code B ref -1); Fri, 21 Jan 2022 06:50:02 +0000 Received: (at submit) by debbugs.gnu.org; 21 Jan 2022 06:49:14 +0000 Received: from localhost ([127.0.0.1]:60034 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nAnjP-0001Jf-D2 for submit@debbugs.gnu.org; Fri, 21 Jan 2022 01:49:14 -0500 Received: from lists.gnu.org ([209.51.188.17]:48342) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nAnjK-0001JT-8E for submit@debbugs.gnu.org; Fri, 21 Jan 2022 01:49:05 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60698) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nAnjJ-0006gv-4Q for bug-guix@gnu.org; Fri, 21 Jan 2022 01:49:01 -0500 Received: from mail-4322.protonmail.ch ([185.70.43.22]:45017) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nAnjE-0003vh-Rd for bug-guix@gnu.org; Fri, 21 Jan 2022 01:49:00 -0500 Date: Fri, 21 Jan 2022 06:48:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail2; t=1642747720; bh=oQqkBL3N0SMPokUgGY65iUVw1tcE73C4pJT/n7++rtA=; h=Date:To:From:Reply-To:Subject:Message-ID:From:To:Cc; b=WeFJB1LwigczfTRLc55OxTrEagT2q4TdIuUJQuhnS9e1L4qOXQ+HPFIsN1SFplUSE jokrQubPLPixe6kIPjS/tZL+TxBLgOn2GlPEw1M9vccrIo5Eqe8nCBJLKgo2428ajL i/r1h+vTSI1UhREXoBt8weBe6kBgvYZpS+bg/Nwi3S85b2TUskt3FPuMHwnv4dOL8y V2bExKP/SeKCdgqATbAwsVxknEujTazaUC5iUr9PorpNJvlHGSHfXJeamJSd6q5uog YGcXsod9OhDeLApOgDHE47lRIBi0ak6NXPiq5e1kluZdqhl1iI45H258YxW+Xa9+34 bWHTf3VzPF5YA== Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="b1_crfdlnRpcNssz3PIPCQ2mGhCaBpv5BWXe4AR8MgDnQ" Received-SPF: pass client-ip=185.70.43.22; envelope-from=john.kehayias@protonmail.com; helo=mail-4322.protonmail.ch 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, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" Reply-to: John Kehayias X-ACL-Warn: , John Kehayias From: John Kehayias via Bug reports for GNU Guix X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1642758969; 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:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=oQqkBL3N0SMPokUgGY65iUVw1tcE73C4pJT/n7++rtA=; b=Wx4cLz9CfMmfR/Gfn14ePxg8PX2wK+jkU2vrACdXC1zPJ0IpjQCANLRyeIVG5j/7sL31/o vcnPCR5OIpVmHBo6MYVHAuHZz92t38DBRwgAz2S1h2c6FPMMNVPcaGq3/H4i76XvtZd3Ay rWOp0rwuwSrJ+g+TjsYQn4gDcJFlVzjU6dn+0T/+jqfkcxFODkaEnOwguoGsRl298dQk4z Rs5noiRzBPfk2I6wSp8W7LlXOhxxMVdOVS400SFQaH1NousAufBOzD56dkqc1sGHCmg+KT BryKFIqVkGTqLXYqiLp6iQYGEXDv2rVfHp9rzfulc25lYaR7h32xi6Vc5uY9JA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1642758969; a=rsa-sha256; cv=none; b=qVAa7+ZUKeSeVPE+imfYGMNmY7VGkYX78HshliKHx4Ewm+rrOCpbOcZBemHEIcJfTsLBdM 3ttzeYUtTWIsacbMcu8FdgN3JOEvtZuuN880rakDOZo/cFQvLMaKzrJtL/+wt/2zMXjzpY CIBuGLJq3GkM79SPLJo6W0C5C0igxBptNHddjtBOGQJWhrjUdiY5X2xa4qDCrXi9IJrX/S JJYgGUrM7jjwpdp8f+UL2jRQakQveZZAYZfXynTkBccYP28oHgk/l8LvesWXwyUgn+meWS wdVIiuY5rPHANq5qfxincyA6DCF/kOinT23Gm2m/T24Ff2NgiSiHK0+V5Sqdug== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail2 header.b=WeFJB1Lw; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.72 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail2 header.b=WeFJB1Lw; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: A3CAD2BBAC X-Spam-Score: -3.72 X-Migadu-Scanner: scn0.migadu.com X-TUID: obFfDWP7jSbg This is a multi-part message in MIME format. --b1_crfdlnRpcNssz3PIPCQ2mGhCaBpv5BWXe4AR8MgDnQ Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello Guix, Stumbled upon a mysterious problem today with grafts. Let me report what I = see and how to reproduce it: I'm attaching a minimal working example of the problem, namely using union-= build creates the wrong symlink when a package has a propagated input that = has a replacement. At least that seems to be the key ingredients. (Note the= code originally came from another channel, so I left the header intact. Th= e union-build looks the same as in e.g. python-pyqt+qscintilla though.) It looks like a link is made to a wrong (i.e. previous) version library. It= is pointing to the replacement package in the store, but trying to use the= previous name. If I run the attached file with guix build -f graft-test.scm and look at li= bexpat in the created package with, e.g. ls -la $(guix build -f graft-test.scm)/lib/libexpat* I get lrwxrwxrwx 1 root root 71 Dec 31 1969 /gnu/store/a3ixqfx1cfjgbz5gb925fv7dw= y2h55gs-fhs-union-0.0/lib/libexpat.la -> /gnu/store/2q8wwhd3prib0swky68rbx9= hl0xxs6hf-expat-2.4.3/lib/libexpat.la* lrwxrwxrwx 1 root root 71 Dec 31 1969 /gnu/store/a3ixqfx1cfjgbz5gb925fv7dw= y2h55gs-fhs-union-0.0/lib/libexpat.so -> /gnu/store/2q8wwhd3prib0swky68rbx9= hl0xxs6hf-expat-2.4.3/lib/libexpat.so* lrwxrwxrwx 1 root root 73 Dec 31 1969 /gnu/store/a3ixqfx1cfjgbz5gb925fv7dw= y2h55gs-fhs-union-0.0/lib/libexpat.so.1 -> /gnu/store/2q8wwhd3prib0swky68rb= x9hl0xxs6hf-expat-2.4.3/lib/libexpat.so.1* lrwxrwxrwx 1 root root 77 Dec 31 1969 /gnu/store/a3ixqfx1cfjgbz5gb925fv7dw= y2h55gs-fhs-union-0.0/lib/libexpat.so.1.8.1 -> /gnu/store/2q8wwhd3prib0swky= 68rbx9hl0xxs6hf-expat-2.4.3/lib/libexpat.so.1.8.1 Note that the last link is broken: looking at this expat library (2.4.3, th= e replacement) it has -r-xr-xr-x 1 root root 961 Dec 31 1969 /gnu/store/2q8wwhd3prib0swky68rbx9= hl0xxs6hf-expat-2.4.3/lib/libexpat.la* lrwxrwxrwx 1 root root 17 Dec 31 1969 /gnu/store/2q8wwhd3prib0swky68rbx9= hl0xxs6hf-expat-2.4.3/lib/libexpat.so -> libexpat.so.1.8.3* lrwxrwxrwx 1 root root 17 Dec 31 1969 /gnu/store/2q8wwhd3prib0swky68rbx9= hl0xxs6hf-expat-2.4.3/lib/libexpat.so.1 -> libexpat.so.1.8.3* -r-xr-xr-x 2 root root 191K Dec 31 1969 /gnu/store/2q8wwhd3prib0swky68rbx9= hl0xxs6hf-expat-2.4.3/lib/libexpat.so.1.8.3* This is why the last link from the union-build package is broken, it tries = to point to libexpat.so.1.8.1 (the previous version, but in the newer versi= on's directory). There are no error or warnings that I saw in building the package or in a p= rofile (e.g. guix shell). I put in an output in the builder to see what dir= ectories were passed to the union-build, giving me directories: (/gnu/store/d0xskl9xjb0z6miaf87xszi8iq6h8sqs-apr-util-1.6.1 /g= nu/store/iwcw80p8lkqsqbvchjvypvl06qlbjc3d-expat-2.4.1) So the original expat propagated-input store directory is passed to the bui= lder (as expected), but in the end it does use the replacement version. Jus= t with a version number gone wrong in a library link. I came across this actually when combining both x86_64 and i686 into a sing= le profile. There it would error on a conflict between file and directory, = but in the lib/cmake of expat, again something with different version numbe= rs appearing but between x86_64 and i686. I don't have an example of that h= andy right now, but it sent me in the direction of seeing why expat was com= ing up, when I came across this (I'm guessing leading to the problem I saw)= . In case it is relevant, I did notice other packages have had explicit repla= cements used in propagated inputs previously, like in https://git.savannah.= gnu.org/cgit/guix.git/commit/?id=3Dc5df560fd3762c0dbe99562f52223c73d445e597= expat is propagated by fontconfig and apr-util, possibly other places? A b= it tricky to search with the expat license and all. This was on commit: e415a73d2c11e43f4db3b797ed73ab6ebcc336e0 My original pr= oblem (conflict in x86_64 and i686 union) happened after the expat replacem= ent commit, 2045852b096131a714409aa0cc4fe17938f60b15 which was my first clu= e. I hope that is helpful in reproducing and finding out what is happening. So= mething to do with union-build I guess, but it is very late here right now = so I hope this all made sense. Happy to help investigate and debug. John --b1_crfdlnRpcNssz3PIPCQ2mGhCaBpv5BWXe4AR8MgDnQ Content-Type: text/x-scheme; name=graft-test.scm Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=graft-test.scm Ozs7IEdOVSBHdWl4IC0tLSBGdW5jdGlvbmFsIHBhY2thZ2UgbWFuYWdlbWVudCBmb3IgR05VCjs7 OyBDb3B5cmlnaHQgwqkgMjAyMCBwa2lsbC05Cjs7OyBDb3B5cmlnaHQgwqkgMjAyMCwgMjAyMSBp c29uIDxpc29uQGFpcm1haWwuY2M+Cjs7OyBDb3B5cmlnaHQgwqkgMjAyMSBwaW5lYXBwbGVzCjs7 OyBDb3B5cmlnaHQgwqkgMjAyMSBKZWFuLUJhcHRpc3RlIFZvbGF0aWVyIDxqYnZAcG0ubWU+Cjs7 OyBDb3B5cmlnaHQgwqkgMjAyMSBLb3pvIDxrb3pvZGV2QHJ1bmJveC5jb20+Cjs7OyBDb3B5cmln aHQgwqkgMjAyMSBKb2huIEtlaGF5aWFzIDxqb2huLmtlaGF5aWFzQHByb3Rvbm1haWwuY29tPgo7 OzsKOzs7IFRoaXMgZmlsZSBpcyBub3QgcGFydCBvZiBHTlUgR3VpeC4KOzs7Cjs7OyBHTlUgR3Vp eCBpcyBmcmVlIHNvZnR3YXJlO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b24gIjAuMCIpIChzeXN0ZW0gIng4Nl82NC1saW51eCIpKQogICJDcmVhdGUgYSBwYWNrYWdl IGhvdXNpbmcgdGhlIHVuaW9uIG9mIGlucHV0cy4iCiAgKHBhY2thZ2UKICAgIChuYW1lIG5hbWUp CiAgICAodmVyc2lvbiB2ZXJzaW9uKQogICAgKHNvdXJjZSAjZikKICAgIChpbnB1dHMgaW5wdXRz KQogICAgKGJ1aWxkLXN5c3RlbSB0cml2aWFsLWJ1aWxkLXN5c3RlbSkKICAgIChhcmd1bWVudHMK ICAgICBgKCM6c3lzdGVtICxzeXN0ZW0KICAgICAgICM6bW9kdWxlcyAoKGd1aXggYnVpbGQgdW5p b24pKQogICAgICAgIzpidWlsZGVyCiAgICAgICAoYmVnaW4KICAgICAgICAgKHVzZS1tb2R1bGVz IChpY2UtOSBtYXRjaCkKICAgICAgICAgICAgICAgICAgICAgIChndWl4IGJ1aWxkIHVuaW9uKSkK ICAgICAgICAgKG1hdGNoICVidWlsZC1pbnB1dHMKICAgICAgICAgICAoKChfIC4gZGlyZWN0b3Jp ZXMpIC4uLikKICAgICAgICAgICAgKHVuaW9uLWJ1aWxkIChhc3NvYy1yZWYgJW91dHB1dHMgIm91 dCIpCiAgICAgICAgICAgICAgICAgICAgICAgICBkaXJlY3RvcmllcykKICAgICAgICAgICAgKGZv cm1hdCAjdCAiXG4gZGlyZWN0b3JpZXM6IH5hXG4iIGRpcmVjdG9yaWVzKQogICAgICAgICAgICAj dCkpKSkpCiAgICAoaG9tZS1wYWdlICNmKQogICAgKHN5bm9wc2lzICJMaWJyYXJpZXMgdXNlZCBm b3IgRkhTIikKICAgIChkZXNjcmlwdGlvbiAiTGlicmFyaWVzIG5lZWRlZCB0byBidWlsZCBhIGd1 aXggY29udGFpbmVyIEZIUy4iKQogICAgKGxpY2Vuc2UgI2YpKSkKCiAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAKOyhmaHMtdW5pb24gKGxpc3QgZm9udGNvbmZpZykpCjso ZmhzLXVuaW9uIChsaXN0IGZvbnRjb25maWcpICM6c3lzdGVtICJpNjg2LWxpbnV4IikKCihmaHMt dW5pb24gKGxpc3QgYXByLXV0aWwpKQo= --b1_crfdlnRpcNssz3PIPCQ2mGhCaBpv5BWXe4AR8MgDnQ--