all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Török Edwin" <edwin+ml-guix@etorok.net>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 24703@debbugs.gnu.org
Subject: bug#24703: Store references in 8-byte chunks in compiled code
Date: Thu, 20 Oct 2016 00:25:39 +0300	[thread overview]
Message-ID: <dadebcc5-5816-4760-0bd3-72c1af95e39c@etorok.net> (raw)
In-Reply-To: <87h98bdvng.fsf@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 <edwin+ml-guix@etorok.net> skribis:
> 
>> On 2016-10-16 22:04, Ludovic Courtès wrote:
>>> Mark H Weaver <mhw@netris.org> 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/<old-hash>-fontconfig-2.11.94 -> /gnu/store/<grafted-hash>-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/<new-hash>-fontconfig-2.11.94 on /gnu/store/<old-hash>-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/<old-hash>-fontconfig-2.11.94 -> /gnu/immutablestore/<new-hash>-fontconfig-2.11.94
/gnu/store/<new-hash>-fontconfig-2.11.94 -> /gnu/immutablestore/<new-hash>-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
> <http://git.savannah.gnu.org/cgit/guix.git/commit/?id=9d50da70608de32d9db0c29859caec6f2cddb95f>.

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,

  parent reply	other threads:[~2016-10-19 21:26 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-16  3:49 bug#24703: fontconfig keeps obfuscated reference to itself, not grafted Mark H Weaver
2016-10-16  4:26 ` Mark H Weaver
2016-10-16  5:00   ` Mark H Weaver
2016-10-16  6:24     ` bug#24703: Store references in 8-byte chunks in compiled code Mark H Weaver
2016-10-16  9:03       ` Mark H Weaver
2016-10-16  9:25       ` Mark H Weaver
2016-10-16 10:15         ` Mark H Weaver
2016-10-16 19:04         ` Ludovic Courtès
2016-10-17  7:46           ` bug#24703: " Török Edwin
2016-10-17  9:42             ` Mark H Weaver
2016-10-17 12:09             ` Ludovic Courtès
2016-10-18  3:36               ` Mark H Weaver
2016-10-18  8:59                 ` Ludovic Courtès
2016-10-31  6:35                   ` Mark H Weaver
2016-10-31 11:37                     ` Ludovic Courtès
2016-10-24 19:40                 ` Leo Famulari
2016-10-24 20:18                   ` Ludovic Courtès
2016-11-04 23:15                     ` Ludovic Courtès
2016-11-05 18:36                       ` Leo Famulari
2016-11-06 20:58                         ` Ludovic Courtès
2016-11-09 20:40                       ` Ludovic Courtès
2016-11-09 23:16                         ` Leo Famulari
2016-11-10  8:01                           ` Ludovic Courtès
2017-04-02 22:19                             ` Ludovic Courtès
2016-11-11 10:39                         ` Ludovic Courtès
2016-10-19 21:25               ` Török Edwin [this message]
2016-10-20 12:25                 ` Ludovic Courtès
2016-10-16 14:42 ` bug#24703: fontconfig keeps obfuscated reference to itself, not grafted Ludovic Courtès
2016-10-16 15:06   ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dadebcc5-5816-4760-0bd3-72c1af95e39c@etorok.net \
    --to=edwin+ml-guix@etorok.net \
    --cc=24703@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.