Absolute Junction Points/Symlinks

Erich E. Hoover erich.e.hoover at gmail.com
Tue May 19 11:49:56 CDT 2020


On Tue, May 19, 2020 at 9:45 AM Zebediah Figura <z.figura12 at gmail.com> wrote:
>
> Fundamentally I guess we're trying to simultaneously satisfy the
> constraints of
>
> (1) make NT symlinks, regardless of type, behave like Unix symlinks, to
> any host filesystem utilities
>
> (2) make absolute symlinks still work when the prefix is moved, without
> any additional work
>
> Which, barring some brilliant idea, I think just isn't possible, not
> without rewriting how said host utilities work, either by preloading our
> own bits of glibc, or maybe introducing some mount-point-like API to the
> kernel.

Thanks Zeb, I think this is a nice, succinct summary of the situation.

> Personally, I think dropping constraint (2) is preferable to any hack
> involving preloading. Manually fixing up symlinks after a prefix move
> feels equivalent to manually prepending a wrapper before any filesystem
> operation, but it would have to be done far less often.

This is my feeling as well, but when everyone was chatting at WineConf
people didn't seem to like this idea.  Granted, this conversation
happened at the bar and I may be me misremembering the situation.

> I also think it makes more sense to drop constraint (2) than constraint
> (1). I suspect moving a prefix is very rare in practice (though to be
> sure I have done it myself a couple times), whereas accessing the Win32
> filesystem from outside is probably quite common. Additionally, it ends
> up being far less work to rely on host symlink resolution than to have
> to implement it ourselves.

I have done a lot of relocating prefixes for running automated builds,
and I personally wouldn't mind using a tool to backup/move prefixes,
but I cannot really speak for others.  As I mentioned, it doesn't seem
to me like it would be difficult to make it easy for such a tool to
operate - we would just need to add a minor tweak to the way the
symlink target is stored so that portion corresponding to the prefix
is obvious.  If we were feeling particularly kind then we could
distribute such a tool as a simple shell script without too much
trouble.

Best,
Erich



More information about the wine-devel mailing list