From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?T=C3=B6r=C3=B6k?= Edwin Subject: bug#24703: Store references in 8-byte chunks in compiled code Date: Thu, 20 Oct 2016 00:25:39 +0300 Message-ID: References: <87mvi5lzqu.fsf@netris.org> <87inssncln.fsf@netris.org> <8737jwnb1c.fsf@netris.org> <87r37gstf6.fsf_-_@netris.org> <87d1j0sl1l.fsf@netris.org> <87a8e4glot.fsf@gnu.org> <8f2024ad-13c1-d4b1-1541-c2a5bddcb403@etorok.net> <87h98bdvng.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42308) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwyNB-0004V0-KE for bug-guix@gnu.org; Wed, 19 Oct 2016 17:26:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bwyN8-0006Rg-F5 for bug-guix@gnu.org; Wed, 19 Oct 2016 17:26:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:33908) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bwyN8-0006Rb-Bm for bug-guix@gnu.org; Wed, 19 Oct 2016 17:26:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87h98bdvng.fsf@gnu.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 24703@debbugs.gnu.org On 2016-10-17 12:42, Mark H Weaver wrote: > > Here's how to recover, for now: > > guix build --no-grafts -e '(@@ (gnu packages fontutils) fontconfig/fixed)' Thanks! On 2016-10-17 15:09, Ludovic Courtès wrote: > Török Edwin skribis: > >> On 2016-10-16 22:04, Ludovic Courtès wrote: >>> Mark H Weaver skribis: >>> >>>> When grafting, how will we achieve confidence that we've found the >>>> correct occurrence of the last character? I think we will have to give >>>> up our recently added feature of being able to change the version number >>>> of grafts. >>> >>> Wait, don’t jump to the conclusions. :-) >> >> I've just encountered the same problem with fontconfig (after installing GuixSD, running guix pull and guix system reconfigure, --no-grafts was required). >> Would it be possible for the grafts to keep a symlink (somehow registered to be part of the grafted fontconfig so that guix gc doesn't remove it) instead of patching the binaries? >> /gnu/store/-fontconfig-2.11.94 -> /gnu/store/-fontconfig-2.11.94 > > We could use a self symlink I'm new here [*] and I'd like to understand what solutions would be possible, could you please explain how the self symlink would work? I was thinking about bind mounts (the list of needed bind mounts would be maintained as a derivation, and initialized from initrd maybe?): /gnu/store/-fontconfig-2.11.94 on /gnu/store/-fontconfig-2.11.94 or equivalently another layer of symlinks (where /gnu/store is the mutable symlink graft location, and /gnu/immutablestore is the real destination): /gnu/store/-fontconfig-2.11.94 -> /gnu/immutablestore/-fontconfig-2.11.94 /gnu/store/-fontconfig-2.11.94 -> /gnu/immutablestore/-fontconfig-2.11.94 However bit worried of what happens to running applications: they might end up loading libs/data from both old-hash and new-hash, but it wouldn't be worse than what happens on a traditional distribution when you upgrade say libc, you need to restart things using it eventually. > or we could use something like > . IMHO binary rewriting should be a last resort, it is too low-level and depends on the compiler/version to get it right. [*] I've briefly tried NixOS and GuixSD in the past, but I'm using Debian and Gentoo as my main OS. IIUC what the current grafting process does is that it reads all files of packages that depend on X from the store, and writes them under a new hash with all references to hash of X replaced by hash of X-fixed, a bit like patchELF except strings remain same size. Best regards,