GNU logs - #53406, boring messages


Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#53406: union-build incorrectly handles grafts
Resent-From: John Kehayias <john.kehayias@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Fri, 21 Jan 2022 06:50:02 +0000
Resent-Message-ID: <handler.53406.B.16427477545077 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 53406
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: 
To: 53406 <at> debbugs.gnu.org
X-Debbugs-Original-To: "bug-guix@HIDDEN" <bug-guix@HIDDEN>
Reply-To: John Kehayias <john.kehayias@HIDDEN>
Received: via spool by submit <at> 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 <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nAnjP-0001Jf-D2
	for submit <at> 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 <john.kehayias@HIDDEN>) id 1nAnjK-0001JT-8E
 for submit <at> 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 <john.kehayias@HIDDEN>)
 id 1nAnjJ-0006gv-4Q
 for bug-guix@HIDDEN; 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 <john.kehayias@HIDDEN>)
 id 1nAnjE-0003vh-Rd
 for bug-guix@HIDDEN; 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==
From: John Kehayias <john.kehayias@HIDDEN>
Message-ID: <qb5FfnNru71KLpoam6DFtOq9W760IINWc1JT8EiB72076ZcVyxELMaZ5eNs_FySDi8W16xDWcw0hQkNG0wSs21T6XmrAkB-QNwG-RHzY3do=@protonmail.com>
MIME-Version: 1.0
Content-Type: multipart/mixed;
 boundary="b1_crfdlnRpcNssz3PIPCQ2mGhCaBpv5BWXe4AR8MgDnQ"
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
Received-SPF: pass client-ip=185.70.43.22;
 envelope-from=john.kehayias@HIDDEN; 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-Spam-Score: -0.1 (/)
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 (/)

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

Ozs7IEd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ChndWl4IGJ1aWxkIHVuaW9uKSkK
ICAgICAgICAgKG1hdGNoICVidWlsZC1pbnB1dHMKICAgICAgICAgICAoKChfIC4gZGlyZWN0b3Jp
ZXMpIC4uLikKICAgICAgICAgICAgKHVuaW9uLWJ1aWxkIChhc3NvYy1yZWYgJW91dHB1dHMgIm91
dCIpCiAgICAgICAgICAgICAgICAgICAgICAgICBkaXJlY3RvcmllcykKICAgICAgICAgICAgKGZv
cm1hdCAjdCAiXG4gZGlyZWN0b3JpZXM6IH5hXG4iIGRpcmVjdG9yaWVzKQogICAgICAgICAgICAj
dCkpKSkpCiAgICAoaG9tZS1wYWdlICNmKQogICAgKHN5bm9wc2lzICJMaWJyYXJpZXMgdXNlZCBm
b3IgRkhTIikKICAgIChkZXNjcmlwdGlvbiAiTGlicmFyaWVzIG5lZWRlZCB0byBidWlsZCBhIGd1
aXggY29udGFpbmVyIEZIUy4iKQogICAgKGxpY2Vuc2UgI2YpKSkKCiAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAKOyhmaHMtdW5pb24gKGxpc3QgZm9udGNvbmZpZykpCjso
ZmhzLXVuaW9uIChsaXN0IGZvbnRjb25maWcpICM6c3lzdGVtICJpNjg2LWxpbnV4IikKCihmaHMt
dW5pb24gKGxpc3QgYXByLXV0aWwpKQo=

--b1_crfdlnRpcNssz3PIPCQ2mGhCaBpv5BWXe4AR8MgDnQ--





Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: John Kehayias <john.kehayias@HIDDEN>
Subject: bug#53406: Acknowledgement (union-build incorrectly handles grafts)
Message-ID: <handler.53406.B.16427477545077.ack <at> debbugs.gnu.org>
References: <qb5FfnNru71KLpoam6DFtOq9W760IINWc1JT8EiB72076ZcVyxELMaZ5eNs_FySDi8W16xDWcw0hQkNG0wSs21T6XmrAkB-QNwG-RHzY3do=@protonmail.com>
X-Gnu-PR-Message: ack 53406
X-Gnu-PR-Package: guix
Reply-To: 53406 <at> debbugs.gnu.org
Date: Fri, 21 Jan 2022 06:50:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-guix@HIDDEN

If you wish to submit further information on this problem, please
send it to 53406 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
53406: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D53406
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#53406: union-build incorrectly handles grafts
References: <qb5FfnNru71KLpoam6DFtOq9W760IINWc1JT8EiB72076ZcVyxELMaZ5eNs_FySDi8W16xDWcw0hQkNG0wSs21T6XmrAkB-QNwG-RHzY3do=@protonmail.com>
In-Reply-To: <qb5FfnNru71KLpoam6DFtOq9W760IINWc1JT8EiB72076ZcVyxELMaZ5eNs_FySDi8W16xDWcw0hQkNG0wSs21T6XmrAkB-QNwG-RHzY3do=@protonmail.com>
Resent-From: John Kehayias <john.kehayias@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Fri, 21 Jan 2022 06:56:02 +0000
Resent-Message-ID: <handler.53406.B53406.16427481085723 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 53406
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: 
To: "53406 <at> debbugs.gnu.org" <53406 <at> debbugs.gnu.org>
Reply-To: John Kehayias <john.kehayias@HIDDEN>
Received: via spool by 53406-submit <at> debbugs.gnu.org id=B53406.16427481085723
          (code B ref 53406); Fri, 21 Jan 2022 06:56:02 +0000
Received: (at 53406) by debbugs.gnu.org; 21 Jan 2022 06:55:08 +0000
Received: from localhost ([127.0.0.1]:60047 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nAnpE-0001UF-0s
	for submit <at> debbugs.gnu.org; Fri, 21 Jan 2022 01:55:08 -0500
Received: from mail-40134.protonmail.ch ([185.70.40.134]:37861)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <john.kehayias@HIDDEN>) id 1nAnpC-0001TW-Ef
 for 53406 <at> debbugs.gnu.org; Fri, 21 Jan 2022 01:55:07 -0500
Date: Fri, 21 Jan 2022 06:54:57 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail2; t=1642748099;
 bh=H+Utp5MvnKRTwjui2DNA99jpdhj9ummiBMEoF2kdiQY=;
 h=Date:To:From:Reply-To:Subject:Message-ID:From:To:Cc;
 b=CcAVJ81FqXUUrnG7Se4G1SnQWPdj+UeWDQoVHcSrFyf4udA2h3y4MTtY6JAONubS8
 +gSxzGga8WCkKLm/Pb5fE91MuDIfReuk0pKokOvL09HqwkANysjhfHR/9bvXv01pcb
 gQbT5AR8SQT9AUL++ElkFFADJ+etsjUab5ZakBYyJlBnxYcA5H8PuVTTr89ul9OTJM
 sW5USrxwMuzzm5D8/XD5J6kZxaUJBMGQW/cf9sTZ/UwDptYgcnlGZEauxshTv85up1
 cYO13eHuef0nLcBTMKSNCFZskhngRHGOT5vI39ngU0ioHxikGkbgd50JlovGOWyQgo
 w3WvP0yIQoDmw==
From: John Kehayias <john.kehayias@HIDDEN>
Message-ID: <_yV8VwaAQw22nEoGIlm6a7oqlUMtT8nqReMHaxvyjLlwSqLgP5dkF0ro1t88lH9WtZt1jZv7zZXvlK2dkf46dSfbQnolV8IcbGcAl3vH8g4=@protonmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
X-Spam-Score: 0.0 (/)
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 (-)

Oh, and in the share/doc directory of the union:

lrwxrwxrwx 1 root root 71 Dec 31  1969 expat -> /gnu/store/2q8wwhd3prib0swk=
y68rbx9hl0xxs6hf-expat-2.4.3/share/doc/expat/
lrwxrwxrwx 1 root root 77 Dec 31  1969 expat-2.4.1 -> /gnu/store/2q8wwhd3pr=
ib0swky68rbx9hl0xxs6hf-expat-2.4.3/share/doc/expat-2.4.1

Second link broken, first link correct, both to the replacement (2.4.3 vers=
ion) store directory.




Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#53406: union-build incorrectly handles grafts
Resent-From: John Kehayias <john.kehayias@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Sat, 22 Jan 2022 16:57:02 +0000
Resent-Message-ID: <handler.53406.B53406.16428706021175 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 53406
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: 
To: "53406 <at> debbugs.gnu.org" <53406 <at> debbugs.gnu.org>
Reply-To: John Kehayias <john.kehayias@HIDDEN>
Received: via spool by 53406-submit <at> debbugs.gnu.org id=B53406.16428706021175
          (code B ref 53406); Sat, 22 Jan 2022 16:57:02 +0000
Received: (at 53406) by debbugs.gnu.org; 22 Jan 2022 16:56:42 +0000
Received: from localhost ([127.0.0.1]:37778 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nBJgw-0000It-2G
	for submit <at> debbugs.gnu.org; Sat, 22 Jan 2022 11:56:42 -0500
Received: from mail-4322.protonmail.ch ([185.70.43.22]:58847)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <john.kehayias@HIDDEN>) id 1nBJgu-0000Ia-Hu
 for 53406 <at> debbugs.gnu.org; Sat, 22 Jan 2022 11:56:41 -0500
Date: Sat, 22 Jan 2022 16:56:31 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail2; t=1642870593;
 bh=+G+j4dIeOuyYJiuzXVv3A0g8L0AZ/lHSFxSKzy1cLTM=;
 h=Date:To:From:Reply-To:Subject:Message-ID:In-Reply-To:References:
 From:To:Cc;
 b=RHvNZvKstBPhpgBVS89BSBJVSX3MnhyTXM5nCxOgMKYdUCT/c4DEdifLENfHvwEMM
 A7rYirb5rPy8n+0gnLYSW5nPtCMJoAu/L2zM2Waj53GzUFgKLtML20ylbvjfFKnh61
 f6Wyyhl4ctmyQVbccc0uhEq21Hb1Jqb1NImOdTU6/69++5ugFtmmhcURIq9P/oaegH
 nxr9+FcDnp8tVxL6Y8fwqWnWixPaapVcJ69DA2Cn4lByh7sAU5EXisGsrO3QXfJN1F
 OKGRU1uNsnCzWTzCo+aXXb6in/3u3GLu/2EddY63cWjlAFmO+xP1NwvYBAOh/VYXkZ
 83Wg/U/vDAy4A==
From: John Kehayias <john.kehayias@HIDDEN>
Message-ID: <BYeMc6gGtnBoJyRsELEncbxb7IahCy3bBt_4jqcu7ElDUIP6rJ8JlCLQJCbWf_1rWk5EmUrCkJ1S-ktN91yxhJngftOzJSeMPRo2JpMxPag=@protonmail.com>
In-Reply-To: <_yV8VwaAQw22nEoGIlm6a7oqlUMtT8nqReMHaxvyjLlwSqLgP5dkF0ro1t88lH9WtZt1jZv7zZXvlK2dkf46dSfbQnolV8IcbGcAl3vH8g4=@protonmail.com>
References: <_yV8VwaAQw22nEoGIlm6a7oqlUMtT8nqReMHaxvyjLlwSqLgP5dkF0ro1t88lH9WtZt1jZv7zZXvlK2dkf46dSfbQnolV8IcbGcAl3vH8g4=@protonmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
X-Spam-Score: 0.0 (/)
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 (-)

I haven't had the chance to see what is happening inside union-build yet, b=
ut did confirm that propagating expat/fixed instead of expat does not have =
the same problem.

I tried with

(define fontconfig-fixed
  (package
    (inherit fontconfig)
    (propagated-inputs
     (modify-inputs (package-propagated-inputs fontconfig)
       (replace "expat" (@@ (gnu packages xml) expat/fixed))))))

and then (fhs-union (list fontconfig-fixed)) did not have any broken links =
trying to go to the wrong version. Using this also works around my original=
 problem of a multi-arch union build having collisions (so that seems to st=
em from whatever is happening here).




Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#53406: union-build incorrectly handles grafts
Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Mon, 24 Jan 2022 14:19:02 +0000
Resent-Message-ID: <handler.53406.B53406.164303393422725 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 53406
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: 
To: John Kehayias <john.kehayias@HIDDEN>
Cc: 53406 <at> debbugs.gnu.org
Received: via spool by 53406-submit <at> debbugs.gnu.org id=B53406.164303393422725
          (code B ref 53406); Mon, 24 Jan 2022 14:19:02 +0000
Received: (at 53406) by debbugs.gnu.org; 24 Jan 2022 14:18:54 +0000
Received: from localhost ([127.0.0.1]:42663 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nC0BJ-0005uR-OO
	for submit <at> debbugs.gnu.org; Mon, 24 Jan 2022 09:18:54 -0500
Received: from hera.aquilenet.fr ([185.233.100.1]:49168)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1nC0BH-0005uB-Ej
 for 53406 <at> debbugs.gnu.org; Mon, 24 Jan 2022 09:18:53 -0500
Received: from localhost (localhost [127.0.0.1])
 by hera.aquilenet.fr (Postfix) with ESMTP id D2BEE2FE;
 Mon, 24 Jan 2022 15:18:44 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at aquilenet.fr
Received: from hera.aquilenet.fr ([127.0.0.1])
 by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id Gtxcu_X0z0SL; Mon, 24 Jan 2022 15:18:43 +0100 (CET)
Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201])
 by hera.aquilenet.fr (Postfix) with ESMTPSA id 5E6D78B;
 Mon, 24 Jan 2022 15:18:43 +0100 (CET)
From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
References: <qb5FfnNru71KLpoam6DFtOq9W760IINWc1JT8EiB72076ZcVyxELMaZ5eNs_FySDi8W16xDWcw0hQkNG0wSs21T6XmrAkB-QNwG-RHzY3do=@protonmail.com>
Date: Mon, 24 Jan 2022 15:18:42 +0100
In-Reply-To: <qb5FfnNru71KLpoam6DFtOq9W760IINWc1JT8EiB72076ZcVyxELMaZ5eNs_FySDi8W16xDWcw0hQkNG0wSs21T6XmrAkB-QNwG-RHzY3do=@protonmail.com>
 (John Kehayias's message of "Fri, 21 Jan 2022 06:48:38 +0000")
Message-ID: <878rv5ushp.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spamd-Bar: /
Authentication-Results: hera.aquilenet.fr;
	none
X-Rspamd-Server: hera
X-Rspamd-Queue-Id: D2BEE2FE
X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[];
 RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[];
 TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[protonmail.com];
 TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain];
 RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[protonmail.com];
 FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+];
 RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[];
 MID_RHS_MATCH_FROM(0.00)[]
X-Spam-Score: 1.0 (+)
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 (/)

Hi,

John Kehayias <john.kehayias@HIDDEN> skribis:

> If I run the attached file with guix build -f graft-test.scm and look at =
libexpat 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/a3ixqfx1cfjgbz5gb925fv7=
dwy2h55gs-fhs-union-0.0/lib/libexpat.la -> /gnu/store/2q8wwhd3prib0swky68rb=
x9hl0xxs6hf-expat-2.4.3/lib/libexpat.la*
> lrwxrwxrwx 1 root root 71 Dec 31  1969 /gnu/store/a3ixqfx1cfjgbz5gb925fv7=
dwy2h55gs-fhs-union-0.0/lib/libexpat.so -> /gnu/store/2q8wwhd3prib0swky68rb=
x9hl0xxs6hf-expat-2.4.3/lib/libexpat.so*
> lrwxrwxrwx 1 root root 73 Dec 31  1969 /gnu/store/a3ixqfx1cfjgbz5gb925fv7=
dwy2h55gs-fhs-union-0.0/lib/libexpat.so.1 -> /gnu/store/2q8wwhd3prib0swky68=
rbx9hl0xxs6hf-expat-2.4.3/lib/libexpat.so.1*
> lrwxrwxrwx 1 root root 77 Dec 31  1969 /gnu/store/a3ixqfx1cfjgbz5gb925fv7=
dwy2h55gs-fhs-union-0.0/lib/libexpat.so.1.8.1 -> /gnu/store/2q8wwhd3prib0sw=
ky68rbx9hl0xxs6hf-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, =
the replacement) it has
>
> -r-xr-xr-x 1 root root  961 Dec 31  1969 /gnu/store/2q8wwhd3prib0swky68rb=
x9hl0xxs6hf-expat-2.4.3/lib/libexpat.la*
> lrwxrwxrwx 1 root root   17 Dec 31  1969 /gnu/store/2q8wwhd3prib0swky68rb=
x9hl0xxs6hf-expat-2.4.3/lib/libexpat.so -> libexpat.so.1.8.3*
> lrwxrwxrwx 1 root root   17 Dec 31  1969 /gnu/store/2q8wwhd3prib0swky68rb=
x9hl0xxs6hf-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/2q8wwhd3prib0swky68rb=
x9hl0xxs6hf-expat-2.4.3/lib/libexpat.so.1.8.3*
>
> This is why the last link from the union-build package is broken, it trie=
s to point to libexpat.so.1.8.1 (the previous version, but in the newer ver=
sion's directory).

Grafting is a pretty basic process: in this case it replaces occurrences
of /gnu/store/=E2=80=A6-expat-2.4.1 with /gnu/store/=E2=80=A6-expat-2.4.3, =
nothing more.
It cannot guess that libexpat.so.1.8.1 was renamed to libexpat.so.1.8.3
or anything like that.

Is it a problem?  Normally no, because users of shared libraries don=E2=80=
=99t
refer to libraries by their fully-qualified name:

--8<---------------cut here---------------start------------->8---
$ objdump -x $(guix build dbus-glib)/bin/dbus-binding-tool|grep NEED.*expat
  NEEDED               libexpat.so.1
$ objdump -x  $(guix build dbus-glib)/bin/dbus-binding-tool|grep RUNPATH
  RUNPATH              /gnu/store/wwmxxlmlhwljn39z0gsj6iai3zk67a2g-dbus-gli=
b-0.110/lib:/gnu/store/5s6iz5f777rh23q4kv8gvqrsyy61cbjh-dbus-1.12.20/lib:/g=
nu/store/s0w7szfsajdy6cnrz2w7z4h5spyl4aaj-expat-2.4.1/lib:/gnu/store/2fk1gz=
2s7ppdicynscra9b19byrrr866-glibc-2.33/lib:/gnu/store/90lbavffg0csrf208nw0ay=
j1bz5knl47-gcc-10.3.0-lib/lib:/gnu/store/qqs98rxwjrji6aaf6dqwp7q4m545g2sn-g=
lib-2.70.0/lib:/gnu/store/90lbavffg0csrf208nw0ayj1bz5knl47-gcc-10.3.0-lib/l=
ib/gcc/x86_64-unknown-linux-gnu/10.3.0/../../..
--8<---------------cut here---------------end--------------->8---

Likewise, =E2=80=98etc/ld.so.cache=E2=80=99 contains a reference to =E2=80=
=98libexpat.so.1=E2=80=99, not
to =E2=80=98libexpat.so.1.8.1=E2=80=99.

Does that make sense?  Or am I overlooking something?

Thanks,
Ludo=E2=80=99.




Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#53406: union-build incorrectly handles grafts
Resent-From: John Kehayias <john.kehayias@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Tue, 25 Jan 2022 03:24:02 +0000
Resent-Message-ID: <handler.53406.B53406.164308098317479 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 53406
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: 
To: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Cc: 53406 <at> debbugs.gnu.org
Reply-To: John Kehayias <john.kehayias@HIDDEN>
Received: via spool by 53406-submit <at> debbugs.gnu.org id=B53406.164308098317479
          (code B ref 53406); Tue, 25 Jan 2022 03:24:02 +0000
Received: (at 53406) by debbugs.gnu.org; 25 Jan 2022 03:23:03 +0000
Received: from localhost ([127.0.0.1]:46497 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nCCQ5-0004XC-Bg
	for submit <at> debbugs.gnu.org; Mon, 24 Jan 2022 22:23:03 -0500
Received: from mail-4322.protonmail.ch ([185.70.43.22]:26213)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <john.kehayias@HIDDEN>) id 1nCCQ0-0004Wx-Uo
 for 53406 <at> debbugs.gnu.org; Mon, 24 Jan 2022 22:22:56 -0500
Date: Tue, 25 Jan 2022 03:22:44 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail2; t=1643080965;
 bh=c+cJuA84v9pAyxm9kRhFnVHPeWwsuW8axwE/pBTAvQA=;
 h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To:
 References:From:To:Cc;
 b=xUTl/xsw/iUWwOFcK41ZgKMjgFbXEKxp002MnZ1j4fxrY0EQvYnJBwvGjktw+ESVC
 ac519uRmfEBC1yedKY/yKEETFXNbLQsSm+oj899hl+YcftmvJZjjUIiOhoqxRrkZnO
 HKVrIwvQoa3XqJRotO5q0ETwxYGo2SC5AoRUdcukTNmLsYZlRRMfZWxV9/jijFI3JA
 GU0/LVSAdi2jgz/OZWgzKFObofULFnSMUBzm4sTrvcseTvY6XOp0NIiWCaU0FhKhE+
 pr8lt3uSQsxAAMsDjdjFfa3T1k1VhbRoFywXlSMx39jJWCMjbkwPrucin3QETRdqQ8
 BR111jrwuWPGA==
From: John Kehayias <john.kehayias@HIDDEN>
Message-ID: <tJNGA4veM58kh6qICZ8iQbbn0ygA7e2p04ebczPbuFjiYeYTaOsgVXEOKQVK2PQHwYbS7OPekQZV5DvcvmDyAoeaP4sO3La7gjNjIKCEsnM=@protonmail.com>
In-Reply-To: <878rv5ushp.fsf@HIDDEN>
References: <qb5FfnNru71KLpoam6DFtOq9W760IINWc1JT8EiB72076ZcVyxELMaZ5eNs_FySDi8W16xDWcw0hQkNG0wSs21T6XmrAkB-QNwG-RHzY3do=@protonmail.com>
 <878rv5ushp.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed;
 boundary="b1_hzGkhNMlchRq0mtQZRmqN67CjV1Rly5LI1bLHcO4d84"
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
X-Spam-Score: 0.0 (/)
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 (-)

This is a multi-part message in MIME format.

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

Hi Ludo=E2=80=99,

Thanks for explaining!

=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original Me=
ssage =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90

On Monday, January 24th, 2022 at 9:18 AM, Ludovic Court=C3=A8s wrote:

>
> Grafting is a pretty basic process: in this case it replaces occurrences
> of /gnu/store/=E2=80=A6-expat-2.4.1 with /gnu/store/=E2=80=A6-expat-2.4.3=
, nothing more.
> It cannot guess that libexpat.so.1.8.1 was renamed to libexpat.so.1.8.3
> or anything like that.
>
> Is it a problem? Normally no, because users of shared libraries don=
=E2=80=99t
> refer to libraries by their fully-qualified name:
>
> --8<---------------cut here---------------start------------->8---
> $ objdump -x $(guix build dbus-glib)/bin/dbus-binding-tool|grep NEED.*exp=
at
> NEEDED libexpat.so.1
> $ objdump -x $(guix build dbus-glib)/bin/dbus-binding-tool|grep RUNPATH
> RUNPATH /gnu/store/wwmxxlmlhwljn39z0gsj6iai3zk67a2g-dbus-glib-0.110/lib:/=
gnu/store/5s6iz5f777rh23q4kv8gvqrsyy61cbjh-dbus-1.12.20/lib:/gnu/store/s0w7=
szfsajdy6cnrz2w7z4h5spyl4aaj-expat-2.4.1/lib:/gnu/store/2fk1gz2s7ppdicynscr=
a9b19byrrr866-glibc-2.33/lib:/gnu/store/90lbavffg0csrf208nw0ayj1bz5knl47-gc=
c-10.3.0-lib/lib:/gnu/store/qqs98rxwjrji6aaf6dqwp7q4m545g2sn-glib-2.70.0/li=
b:/gnu/store/90lbavffg0csrf208nw0ayj1bz5knl47-gcc-10.3.0-lib/lib/gcc/x86_64=
-unknown-linux-gnu/10.3.0/../../..
> --8<---------------cut here---------------end--------------->8---
>
> Likewise, =E2=80=98etc/ld.so.cache=E2=80=99 contains a reference to =
=E2=80=98libexpat.so.1=E2=80=99, not
> to =E2=80=98libexpat.so.1.8.1=E2=80=99.
>

(Your example output was not of a grafted libexpat in the RUNPATH, but poin=
t taken; I see the newer expat version on my (grafted) dbus-glib).

> Does that make sense? Or am I overlooking something?
>

Yes, that makes sense, thank you for clarifying. So this is the currently e=
xpected behavior. Ideally grafting would be smarter to maybe avoid this (mi=
ssing changes in e.g. version number)? But I would guess this is not someth=
ing that would be expected to cause a problem for the vast majority of case=
s, as you explain, and adds complexity to the process.

I'm glad to hear it all works! But...

Perhaps I was too hasty in noting this "problem" which like I said was not =
the error I originally encountered. I was using a package that constructs b=
oth the 64- and 32-bit libraries to put in a container (say, a /lib32 and /=
lib64 or something similar to an FHS environment). A collision was happenin=
g between a file and directory, one being a good symlink and the other brok=
en, rather than a "real" mismatch in file vs directory. Anyway, going back =
to that what I see is that one link is broken for the above reasons, but th=
e good one is good because it is to the *ungrafted* library store path. I d=
on't know now if these 2 things are connected other than one led me to the =
other, but I turn now to what demonstrates my original problem.

I don't know why this happens or if it is something in this building proces=
s that is not correct, but I did come up with a minimal example (attached).=
 The code is a bit odd in its stripped down form, though hopefully is clear=
 in what way this would be used to do something useful (again, like an FHS =
environment or other container). Apologies for the old style and lack of ge=
xps which I'm finally getting used to. The example package just tries to ma=
ke a dummy package that has, for illustration, a "/lib64" and "/lib32" whic=
h link to the respective union-build inputs (of a single library for simpli=
city). I don't think the actual package being made matters so much, or how =
it is constructed, but that two inputs are union-builds of the same library=
 (x86_64 and i686) which should have a graft of expat. Just my guess though=
.

Doing:

ls -la $(guix build -f graft-test.scm)/lib64/lib/libexpat*
lrwxrwxrwx 1 root root 71 Dec 31  1969 /gnu/store/qbh16hfdv8pnfw01k6izbs3jk=
ji6i978-test-pkg-0.0/lib64/lib/libexpat.la -> /gnu/store/2q8wwhd3prib0swky6=
8rbx9hl0xxs6hf-expat-2.4.3/lib/libexpat.la*
lrwxrwxrwx 1 root root 71 Dec 31  1969 /gnu/store/qbh16hfdv8pnfw01k6izbs3jk=
ji6i978-test-pkg-0.0/lib64/lib/libexpat.so -> /gnu/store/2q8wwhd3prib0swky6=
8rbx9hl0xxs6hf-expat-2.4.3/lib/libexpat.so*
lrwxrwxrwx 1 root root 73 Dec 31  1969 /gnu/store/qbh16hfdv8pnfw01k6izbs3jk=
ji6i978-test-pkg-0.0/lib64/lib/libexpat.so.1 -> /gnu/store/2q8wwhd3prib0swk=
y68rbx9hl0xxs6hf-expat-2.4.3/lib/libexpat.so.1*
lrwxrwxrwx 1 root root 77 Dec 31  1969 /gnu/store/qbh16hfdv8pnfw01k6izbs3jk=
ji6i978-test-pkg-0.0/lib64/lib/libexpat.so.1.8.1 -> /gnu/store/2q8wwhd3prib=
0swky68rbx9hl0xxs6hf-expat-2.4.3/lib/libexpat.so.1.8.1

is what we saw already: libexpat is the newer (replacement, 2.4.3) version,=
 with the full version symlink broken since the version number is wrong. Li=
kewise in other pieces that have the version number, like share/doc. Okay, =
that's expected. But now, in the i686-linux union-build input:

ls -la $(guix build -f graft-test.scm)/lib32/lib/libexpat*
lrwxrwxrwx 1 root root 71 Dec 31  1969 /gnu/store/qbh16hfdv8pnfw01k6izbs3jk=
ji6i978-test-pkg-0.0/lib32/lib/libexpat.la -> /gnu/store/b0jns3vzhhpna7lim8=
bc3dr0payzx5yy-expat-2.4.1/lib/libexpat.la*
lrwxrwxrwx 1 root root 71 Dec 31  1969 /gnu/store/qbh16hfdv8pnfw01k6izbs3jk=
ji6i978-test-pkg-0.0/lib32/lib/libexpat.so -> /gnu/store/b0jns3vzhhpna7lim8=
bc3dr0payzx5yy-expat-2.4.1/lib/libexpat.so*
lrwxrwxrwx 1 root root 73 Dec 31  1969 /gnu/store/qbh16hfdv8pnfw01k6izbs3jk=
ji6i978-test-pkg-0.0/lib32/lib/libexpat.so.1 -> /gnu/store/b0jns3vzhhpna7li=
m8bc3dr0payzx5yy-expat-2.4.1/lib/libexpat.so.1*
lrwxrwxrwx 1 root root 77 Dec 31  1969 /gnu/store/qbh16hfdv8pnfw01k6izbs3jk=
ji6i978-test-pkg-0.0/lib32/lib/libexpat.so.1.8.1 -> /gnu/store/b0jns3vzhhpn=
a7lim8bc3dr0payzx5yy-expat-2.4.1/lib/libexpat.so.1.8.1*

all the links are good and to the original (version 2.4.1) expat. In other =
words, the constructed union64 and union32 inputs (in the sample code) do n=
ot both get grafted, even though doing just the fhs-union command on it's o=
wn (not building both for another package) does graft for either architectu=
re. At least that seems like the most obvious difference between the earlie=
r example and this new one.

Why? Does the grafting just happen "once" somehow and misses the "same" inp=
ut again (but built for different system)? Is this expected or just a weird=
/wrong way to do this kind of build which is causing this? I'm not sure if =
this is just with union-build or if it would happen just with inputs of the=
 same library but different architectures. I didn't know how to do that qui=
ckly off hand, so I haven't tried it yet.

Thanks for taking the time to look and explain, much appreciated!

John
--b1_hzGkhNMlchRq0mtQZRmqN67CjV1Rly5LI1bLHcO4d84
Content-Type: text/x-scheme; name=graft-test.scm
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=graft-test.scm

Ozs7IEdOVSBHdWl4IC0tLSBGdW5jdGlvbmFsIHBhY2thZ2UgbWFuYWdlbWVudCBmb3IgR05VCjs7
OyBDb3B5cmlnaHQgwqkgMjAyMCBwa2lsbC05Cjs7OyBDb3B5cmlnaHQgwqkgMjAyMCwgMjAyMSBp
c29uIDxpc29uQGFpcm1haWwuY2M+Cjs7OyBDb3B5cmlnaHQgwqkgMjAyMSBwaW5lYXBwbGVzCjs7
OyBDb3B5cmlnaHQgwqkgMjAyMSBKZWFuLUJhcHRpc3RlIFZvbGF0aWVyIDxqYnZAcG0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kZXIKICAgICAgICAgKGJlZ2luCiAgICAgICAgICAgKHVzZS1tb2R1bGVzIChn
dWl4IGJ1aWxkIHV0aWxzKSkKICAgICAgICAgICAobGV0KiAoKG91dCAoYXNzb2MtcmVmICVvdXRw
dXRzICJvdXQiKSkKICAgICAgICAgICAgICAgICAgKGxpYjY0LXRhcmdldCAoYXNzb2MtcmVmICVi
dWlsZC1pbnB1dHMgImZocy11bmlvbi02NCIpKQogICAgICAgICAgICAgICAgICAobGliNjQtZGVz
dCAoc3RyaW5nLWFwcGVuZCBvdXQgIi9saWI2NCIpKQogICAgICAgICAgICAgICAgICAobGliMzIt
dGFyZ2V0IChhc3NvYy1yZWYgJWJ1aWxkLWlucHV0cyAiZmhzLXVuaW9uLTMyIikpCiAgICAgICAg
ICAgICAgICAgIChsaWIzMi1kZXN0IChzdHJpbmctYXBwZW5kIG91dCAiL2xpYjMyIikpKQogICAg
ICAgICAgICAgKGZvcm1hdCAjdCAiXG51bmlvbjY0OiB+YVxudW5pb24zMjogfmFcbiIgbGliNjQt
dGFyZ2V0IGxpYjMyLXRhcmdldCkKICAgICAgICAgICAgIChta2Rpci1wIChzdHJpbmctYXBwZW5k
IG91dCAiL2JpbiIpKSA7IGR1bW15IGRpciBuZWVkZWQgdG8gYnVpbGQKICAgICAgICAgICAgIChz
eW1saW5rIGxpYjY0LXRhcmdldCBsaWI2NC1kZXN0KQogICAgICAgICAgICAgKHN5bWxpbmsgbGli
MzItdGFyZ2V0IGxpYjMyLWRlc3QpKSkpKQogICAgICAoaG9tZS1wYWdlICNmKQogICAgICAoc3lu
b3BzaXMgI2YpCiAgICAgIChkZXNjcmlwdGlvbiAjZikKICAgICAgKGxpY2Vuc2UgI2YpKSkpCgo7
KGZocy11bmlvbiAobGlzdCBmb250Y29uZmlnLWZpeGVkKSkKOyhmaHMtdW5pb24gKGxpc3QgZm9u
dGNvbmZpZykgIzpzeXN0ZW0gImk2ODYtbGludXgiKQo7KGZocy11bmlvbiAobGlzdCBmb250Y29u
ZmlnKSkKOyhmaHMtdW5pb24gKGxpc3QgYXByLXV0aWwpKQoKKGNvbnRhaW5lci1wYWNrYWdlIGAo
KCJhcHItdXRpbCIgLGFwci11dGlsKSkpCg==

--b1_hzGkhNMlchRq0mtQZRmqN67CjV1Rly5LI1bLHcO4d84--





Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#53406: union-build incorrectly handles grafts
Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Tue, 25 Jan 2022 13:48:02 +0000
Resent-Message-ID: <handler.53406.B53406.164311847322265 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 53406
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: 
To: John Kehayias <john.kehayias@HIDDEN>
Cc: 53406 <at> debbugs.gnu.org
Received: via spool by 53406-submit <at> debbugs.gnu.org id=B53406.164311847322265
          (code B ref 53406); Tue, 25 Jan 2022 13:48:02 +0000
Received: (at 53406) by debbugs.gnu.org; 25 Jan 2022 13:47:53 +0000
Received: from localhost ([127.0.0.1]:47469 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nCMAr-0005n2-8X
	for submit <at> debbugs.gnu.org; Tue, 25 Jan 2022 08:47:53 -0500
Received: from hera.aquilenet.fr ([185.233.100.1]:56364)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1nCMAo-0005m6-Df
 for 53406 <at> debbugs.gnu.org; Tue, 25 Jan 2022 08:47:51 -0500
Received: from localhost (localhost [127.0.0.1])
 by hera.aquilenet.fr (Postfix) with ESMTP id E66BB1E8;
 Tue, 25 Jan 2022 14:47:43 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at aquilenet.fr
Received: from hera.aquilenet.fr ([127.0.0.1])
 by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id WZnu94PIBy87; Tue, 25 Jan 2022 14:47:42 +0100 (CET)
Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201])
 by hera.aquilenet.fr (Postfix) with ESMTPSA id 313D78B;
 Tue, 25 Jan 2022 14:47:42 +0100 (CET)
From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
References: <qb5FfnNru71KLpoam6DFtOq9W760IINWc1JT8EiB72076ZcVyxELMaZ5eNs_FySDi8W16xDWcw0hQkNG0wSs21T6XmrAkB-QNwG-RHzY3do=@protonmail.com>
 <878rv5ushp.fsf@HIDDEN>
 <tJNGA4veM58kh6qICZ8iQbbn0ygA7e2p04ebczPbuFjiYeYTaOsgVXEOKQVK2PQHwYbS7OPekQZV5DvcvmDyAoeaP4sO3La7gjNjIKCEsnM=@protonmail.com>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 6 =?UTF-8?Q?Pluvi=C3=B4se?= an 230 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: Tue, 25 Jan 2022 14:47:41 +0100
In-Reply-To: <tJNGA4veM58kh6qICZ8iQbbn0ygA7e2p04ebczPbuFjiYeYTaOsgVXEOKQVK2PQHwYbS7OPekQZV5DvcvmDyAoeaP4sO3La7gjNjIKCEsnM=@protonmail.com>
 (John Kehayias's message of "Tue, 25 Jan 2022 03:22:44 +0000")
Message-ID: <87bl00lyf6.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spamd-Bar: /
Authentication-Results: hera.aquilenet.fr;
	none
X-Rspamd-Server: hera
X-Rspamd-Queue-Id: E66BB1E8
X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[];
 RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[];
 TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[protonmail.com];
 TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain];
 RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[protonmail.com];
 FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+];
 RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[];
 MID_RHS_MATCH_FROM(0.00)[]
X-Spam-Score: 1.0 (+)
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 (/)

Hi John,

John Kehayias <john.kehayias@HIDDEN> skribis:

> Yes, that makes sense, thank you for clarifying. So this is the currently=
 expected behavior. Ideally grafting would be smarter to maybe avoid this (=
missing changes in e.g. version number)? But I would guess this is not some=
thing that would be expected to cause a problem for the vast majority of ca=
ses, as you explain, and adds complexity to the process.

I don=E2=80=99t think it can be smarter; grafting is just text substitution=
, it
knows nothing about the files it=E2=80=99s fiddling with (with the exceptio=
n of
debugging sections in ELF files).

> Perhaps I was too hasty in noting this "problem" which like I said was no=
t the error I originally encountered. I was using a package that constructs=
 both the 64- and 32-bit libraries to put in a container (say, a /lib32 and=
 /lib64 or something similar to an FHS environment). A collision was happen=
ing between a file and directory, one being a good symlink and the other br=
oken, rather than a "real" mismatch in file vs directory. Anyway, going bac=
k to that what I see is that one link is broken for the above reasons, but =
the good one is good because it is to the *ungrafted* library store path. I=
 don't know now if these 2 things are connected other than one led me to th=
e other, but I turn now to what demonstrates my original problem.
>
> I don't know why this happens or if it is something in this building proc=
ess that is not correct, but I did come up with a minimal example (attached=
). The code is a bit odd in its stripped down form, though hopefully is cle=
ar in what way this would be used to do something useful (again, like an FH=
S environment or other container). Apologies for the old style and lack of =
gexps which I'm finally getting used to. The example package just tries to =
make a dummy package that has, for illustration, a "/lib64" and "/lib32" wh=
ich link to the respective union-build inputs (of a single library for simp=
licity). I don't think the actual package being made matters so much, or ho=
w it is constructed, but that two inputs are union-builds of the same libra=
ry (x86_64 and i686) which should have a graft of expat. Just my guess thou=
gh.
>
> Doing:
>
> ls -la $(guix build -f graft-test.scm)/lib64/lib/libexpat*
> lrwxrwxrwx 1 root root 71 Dec 31  1969 /gnu/store/qbh16hfdv8pnfw01k6izbs3=
jkji6i978-test-pkg-0.0/lib64/lib/libexpat.la -> /gnu/store/2q8wwhd3prib0swk=
y68rbx9hl0xxs6hf-expat-2.4.3/lib/libexpat.la*
> lrwxrwxrwx 1 root root 71 Dec 31  1969 /gnu/store/qbh16hfdv8pnfw01k6izbs3=
jkji6i978-test-pkg-0.0/lib64/lib/libexpat.so -> /gnu/store/2q8wwhd3prib0swk=
y68rbx9hl0xxs6hf-expat-2.4.3/lib/libexpat.so*
> lrwxrwxrwx 1 root root 73 Dec 31  1969 /gnu/store/qbh16hfdv8pnfw01k6izbs3=
jkji6i978-test-pkg-0.0/lib64/lib/libexpat.so.1 -> /gnu/store/2q8wwhd3prib0s=
wky68rbx9hl0xxs6hf-expat-2.4.3/lib/libexpat.so.1*
> lrwxrwxrwx 1 root root 77 Dec 31  1969 /gnu/store/qbh16hfdv8pnfw01k6izbs3=
jkji6i978-test-pkg-0.0/lib64/lib/libexpat.so.1.8.1 -> /gnu/store/2q8wwhd3pr=
ib0swky68rbx9hl0xxs6hf-expat-2.4.3/lib/libexpat.so.1.8.1
>
> is what we saw already: libexpat is the newer (replacement, 2.4.3) versio=
n, with the full version symlink broken since the version number is wrong. =
Likewise in other pieces that have the version number, like share/doc. Okay=
, that's expected. But now, in the i686-linux union-build input:
>
> ls -la $(guix build -f graft-test.scm)/lib32/lib/libexpat*
> lrwxrwxrwx 1 root root 71 Dec 31  1969 /gnu/store/qbh16hfdv8pnfw01k6izbs3=
jkji6i978-test-pkg-0.0/lib32/lib/libexpat.la -> /gnu/store/b0jns3vzhhpna7li=
m8bc3dr0payzx5yy-expat-2.4.1/lib/libexpat.la*
> lrwxrwxrwx 1 root root 71 Dec 31  1969 /gnu/store/qbh16hfdv8pnfw01k6izbs3=
jkji6i978-test-pkg-0.0/lib32/lib/libexpat.so -> /gnu/store/b0jns3vzhhpna7li=
m8bc3dr0payzx5yy-expat-2.4.1/lib/libexpat.so*
> lrwxrwxrwx 1 root root 73 Dec 31  1969 /gnu/store/qbh16hfdv8pnfw01k6izbs3=
jkji6i978-test-pkg-0.0/lib32/lib/libexpat.so.1 -> /gnu/store/b0jns3vzhhpna7=
lim8bc3dr0payzx5yy-expat-2.4.1/lib/libexpat.so.1*
> lrwxrwxrwx 1 root root 77 Dec 31  1969 /gnu/store/qbh16hfdv8pnfw01k6izbs3=
jkji6i978-test-pkg-0.0/lib32/lib/libexpat.so.1.8.1 -> /gnu/store/b0jns3vzhh=
pna7lim8bc3dr0payzx5yy-expat-2.4.1/lib/libexpat.so.1.8.1*
>
> all the links are good and to the original (version 2.4.1) expat. In othe=
r words, the constructed union64 and union32 inputs (in the sample code) do=
 not both get grafted, even though doing just the fhs-union command on it's=
 own (not building both for another package) does graft for either architec=
ture. At least that seems like the most obvious difference between the earl=
ier example and this new one.
>
> Why? Does the grafting just happen "once" somehow and misses the "same" i=
nput again (but built for different system)? Is this expected or just a wei=
rd/wrong way to do this kind of build which is causing this? I'm not sure i=
f this is just with union-build or if it would happen just with inputs of t=
he same library but different architectures. I didn't know how to do that q=
uickly off hand, so I haven't tried it yet.

Woow, it=E2=80=99s a sophisticated example.  :-)

I don=E2=80=99t actually have the Expat replacement we=E2=80=99re talking a=
bout so I
can=E2=80=99t easily test.

At first sight I=E2=80=99d say it should work (both lib32 and lib64 should =
refer
to the Expat replacement), but it could be that something somewhere
assumes all the packages are built for the system.  That would need more
investigation work in (guix packages) in (guix grafts).

Thanks,
Ludo=E2=80=99.




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


Received: (at control) by debbugs.gnu.org; 15 Oct 2023 19:58:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 15 15:58:16 2023
Received: from localhost ([127.0.0.1]:54161 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qs7Fg-0002oE-Cw
	for submit <at> debbugs.gnu.org; Sun, 15 Oct 2023 15:58:16 -0400
Received: from mail-40131.protonmail.ch ([185.70.40.131]:50171)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <john.kehayias@HIDDEN>) id 1qs7Fd-0002nz-7b
 for control <at> debbugs.gnu.org; Sun, 15 Oct 2023 15:58:14 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail3; t=1697399862; x=1697659062;
 bh=rbu45k1vrS7MNaKy2wY8/Gvp+HONmKj2Qt8Z5F7vwNw=;
 h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date:
 Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector;
 b=sDulnrRVDT3jSceG+w7pDbVZr+tyjFhbCbbFIbx0s6zGAdh87DIBlBwoTH5ozs9kX
 +fccJ2x/iAw3b2lYBjD6l7gJCf7omtfogSYXjDEFuIuZx9Qge1foTha7B9/TdwtCZ3
 V3Q+HDXrPAq4BHbUCdSvxsZG9GXwT4Ksg5XHNIxQS1MsV2h55LYZcLvDrFRwdwZVoh
 QC/rakjXR4FGZdj4qMZ9Wer4VHGkwDvpyxU6mHnNbv4fbGU5jJjeK0aMKb/k7unFfe
 D4e1U/85Kh2mtueOKFlQuvuXPvIHCmSIACuS/LFvGWWfXtmA1IARW9DYTbMvRYjzbe
 sMwoXJNzwCPEw==
Date: Sun, 15 Oct 2023 19:57:31 +0000
To: control <at> debbugs.gnu.org
From: John Kehayias <john.kehayias@HIDDEN>
Subject: (No Subject)
Message-ID: <878r83bqvs.fsf@HIDDEN>
Feedback-ID: 7805494:user:proton
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
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: retitle 53406 "grafts fail with different architecture
 inputs?" thanks 
 Content analysis details:   (2.0 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 2.0 SLIGHTLY_BAD_SUBJECT   Subject contains something slightly spammy
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (john.kehayias[at]protonmail.com)
 0.0 RCVD_IN_MSPIKE_H5      RBL: Excellent reputation (+5)
 [185.70.40.131 listed in wl.mailspike.net]
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
X-Debbugs-Envelope-To: control
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 (+)

retitle 53406 "grafts fail with different architecture inputs?"
thanks






Last modified: Sun, 15 Oct 2023 20:00:01 UTC

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