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

Re: using spec file or patchelf for Debian packages to canonicalize ld path [was: Switching GLIBC_DYNAMIC_LINKER in Trixie]



On Mon, 8 May 2023 at 23:17, Luca Boccassi <bluca@debian.org> wrote:
>
> On Mon, 8 May 2023 at 23:08, Florian Weimer <fweimer@redhat.com> wrote:
> >
> > * Luca Boccassi:
> >
> > > But the more I think about it, the more I am convinced that the
> > > default option working best for Debian is the one that matches the
> > > project's choice of a filesystem layout. After all, this is
> > > configurable in the toolchain for a reason.
> >
> > It's not really configurable.  You need to use what's specified in the
> > psABI supplement, otherwise the binaries won't be interoperable with
> > other systems, effectively creating a Debian-specific ABI.
>
> The vast majority of distros today ship the loader in /usr/lib as /lib
> is just a symlink, so it would be interoperable. And anyway, the rest
> of the system is not really interoperable, is it? Packages compiled
> for Debian Trixie are going to be built against Trixie's glibc, they
> can't really be expected to _always_ work against _any_ other libc,
> no?
>
> > > On the 'how' question there's obviously some options - patching
> > > GLIBC_DYNAMIC_LINKER* defines, adding optional build time prefixes to
> > > them, or a ship a default spec file - so it's not too important I
> > > think, the main question is another one.
> >
> > There's no single place to patch this across the various toolchains and
> > architectures.
>
> In terms of 'how', wouldn't a spec file pulled in by default by our
> toolchain that sets -Wl,-dynamic-linker=... as needed suffice? AFAIK
> there are other distros doing this distro-wide, so there must be a
> workable way.

Given it seems there was some confusion on what the question was
about, renaming the thread. Some clarifications:

- the /lib -> /usr/lib symlinks is staying and will stay most likely forever
- no intention of changing non-Debian software, directly or indirectly
- non-Debian software should continue working

What is being asked is, in case Debian packages (a small subset, a
large subset, or all of them) starting from Trixie were to be built
with a canonicalized PT_INTERP, say by patching it post-facto with
patch-elf, or with a spec file that passed -dynamic-linker= only when
building via debhelper or so, or some other mechanism that does not
affect non-package builds, what would break? Which use cases that were
working before would suddenly stop working? What would explode? Will
my microwave catch on fire?

Kind regards,
Luca Boccassi


Reply to: