[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#1050001: Unwinding directory aliasing



On Sun, 20 Aug 2023 at 19:26:34 +0200, Adam Borowski wrote:
> On Fri, Aug 18, 2023 at 02:39:48PM +0100, Simon McVittie wrote:
> > we would still potentially have other issues triggered by
> > the directories being distinct from one another (like the one discussed
> > by the tech committee in #911225, which was exactly a regression caused
> > by having moved a library in the traditional Debian way).
> 
> Such a move would be 100% safe as dpkg has full knowledge of the filesystem
> layout.  The regression in #911225 applies only to usrmerge-aliased layout.

No, #911225 only affected *non*-aliased systems. It happened before the
usrmerge package was widely used, and appears to have been triggered by
moving GLib from /lib into /usr/lib in the way proposed in #1050001.

On systems where /lib and /usr/lib were aliased, it would have been a
non-issue, because ldconfig would compare the two library versions (with
strverscmp() or equivalent) in the single aliased directory, and make
the SONAME symlink point to the newer version number. (Probably it would
redundantly do that twice, once for the alias and once for the canonical
directory; but that's harmless, as long as it gets the right answer both
times, which it should, because the version comparison is deterministic.)

On systems where those directories were not aliased, ldconfig created
a SONAME symlink in each of /lib/MULTIARCH and /usr/lib/MULTIARCH
separately, and then stored the one in /lib/MULTIARCH in ld.so.cache (even
though it pointed to an older library) because /lib/MULTIARCH appears in
ld.so.conf.d with a higher precedence than /usr/lib/MULTIARCH, leading to
unintended use of an older library version.

We were never able to figure out why dpkg's full knowledge of the
filesystem layout didn't ensure that the older GLib was removed from
/lib/MULTIARCH on the bug reporters' systems, the same way it was
correctly removed for the majority of Debian users, but the absence of
aliasing in older releases clearly didn't protect us from that failure
mode.

    smcv


Reply to: