mbox series

[0/4] Add --disable-major-minor-libraries configure option

Message ID cover.1623237082.git.fweimer@redhat.com
Headers show
Series Add --disable-major-minor-libraries configure option | expand

Message

Florian Weimer June 9, 2021, 11:15 a.m. UTC
This is a repost of an older patch series.  RPM-based distributions tend
to have issues around glibc downgrades across major glibc versions
because RPM deletes removed files very later, after the transaction is
complete.  This can result in a broken system because if ldconfig runs
after the downgraded glibc has been unpacked, it will put the newer
glibc's DSOs in to the ld.so cache, which are generally incompatible
with the downgraded dynamic loader.

The name-based DSO recognition patch is new.  Originally, I went with a
fancy Python script to gather ld.so names, but then I saw that only two
new patterns are required for generic detection.  The patterns are quite
specific, so I wrote a _dl_is_dso function instead of a table.  I'm
attaching the Python script for posterity in case it is useful for
something else.

I fixed a cut-and-past error in elf/Makefile which broke targets like
aarch64-linux-gnu and s390x-gnu-linux, where $(inst_slibdir) and
$(inst_rtlddir) are distinct.

My preference would be to avoid the new configure option and just drop
the versions unconditionally, but I'm worried that it's difficult to
obtain consensus around that.  My patch rebased cleanly over 18 months
of development, so there seems to be little varience in these Makefile
parts, so I don't think we need new build-many-glibcs.py targets for
this configuration.  I'm going to switch Fedora rawhide to it, so we get
some regular testing of these configurations anyway.

Tested on i686-linux-gnu, x86_64-linux-gnu; built with
build-many-glibcs.py.  Both with and without
--disable-major-minor-libraries.

Thanks,
Florian


Florian Weimer (4):
  nptl_db: Install libthread_db under a regular implementation name
  Makerules: Remove lib-version, $(subdir-version)
  elf: Generalize name-based DSO recognition in ldconfig
  Add --disable-major-minor-libraries configure option

 INSTALL             | 10 ++++++++++
 Makefile            |  4 +++-
 Makerules           | 38 ++++++++++++++++++++++----------------
 config.make.in      |  1 +
 configure           | 15 +++++++++++++++
 configure.ac        |  7 +++++++
 elf/Makefile        | 10 ++++++++--
 elf/dl-is_dso.h     | 33 +++++++++++++++++++++++++++++++++
 elf/ldconfig.c      |  5 ++---
 elf/tst-dl-is_dso.c | 35 +++++++++++++++++++++++++++++++++++
 manual/install.texi |  9 +++++++++
 nptl_db/Makefile    |  2 --
 12 files changed, 145 insertions(+), 24 deletions(-)
 create mode 100644 elf/dl-is_dso.h
 create mode 100644 elf/tst-dl-is_dso.c