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

Bug#845414: cdebconf: makes debian-installer FTBFS due to libdebconf.so issues (binutils)



Control: clone 845414 -1
Control: reassign -1 mklibs-copy 0.1.42
Control: retitle -1 mklibs-copy: add support for RUNPATH (for newer binutils)
Control: severity -1 important
Control: tags -1 patch pending
Control: block 845414 by -1

Cyril Brulebois <kibi@debian.org> (2016-11-23):
> As expected, libdebconf.so didn't change too much: nm -D and objdump -x
> don't show any differences before/after. But binaries depending on it do
> change; let's look at /usr/lib/cdebconf/debconf for example (still from the
> cdebconf package):
> | (sid-amd64-devel)kibi@wodi:~/debian-installer/packages$ diff -u /tmp/debconf.objdump.{ok,ko}
> | --- /tmp/debconf.objdump.ok	2016-11-23 08:09:37.715596978 +0100
> | +++ /tmp/debconf.objdump.ko	2016-11-23 08:09:42.735672870 +0100
> | @@ -29,7 +29,7 @@
> |    NEEDED               libpthread.so.0
> |    NEEDED               libdebconf.so
> |    NEEDED               libc.so.6
> | -  RPATH                /usr/lib/cdebconf
> | +  RUNPATH              /usr/lib/cdebconf
> |    INIT                 0x0000000000000f58
> |    FINI                 0x0000000000001d94
> |    INIT_ARRAY           0x0000000000202da8
> 
> Let's see if I can do something with mklibs to account for this change.

It seems it's sufficient to teach mklibs-copy that it can handle RPATH and
RUNPATH in the same way. I've successfully tested a patch that implements
this change, mixing both old and new binaries.

I've managed to build netboot and netboot-gtk images (fetching udebs from
testing to avoid the X11 transition, but pulling cdebconf udebs from sid),
and everything seems to work as intended: build time is OK, and run time
shows cdebconf starting properly (text or gtk).

I think I'll upload mklibs with that patch soon, and I'll probably close
the cdebconf bug report only when that mklibs update reaches testing. With
a little chance, the X11 transition won't last too long, and daily builds
might confirm things are looking good everywhere.

Patch attached for reference.


KiBi.
From 184905b0e534d68400834c1bc4d0d3808c5ab650 Mon Sep 17 00:00:00 2001
From: Cyril Brulebois <kibi@debian.org>
Date: Wed, 23 Nov 2016 08:25:29 +0100
Subject: [PATCH] Add support for DT_RUNPATH in addition to DT_RPATH.

Main reasons to do so include:
 - according to the elf.h header, the latter is deprecated.
 - new versions of binutils generate DT_RUNPATH entries instead of
   DT_RPATH ones, as detailed in cdebconf's #845414.
---
 debian/changelog            | 10 ++++++++++
 src/mklibs-readelf/elf.cpp  |  1 +
 src/mklibs-readelf/main.cpp |  1 +
 3 files changed, 12 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index b90315d..8af9465 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+mklibs (0.1.43) UNRELEASED; urgency=medium
+
+  * Add support for DT_RUNPATH in addition to DT_RPATH. Main reasons to
+    do so include:
+     - according to the elf.h header, the latter is deprecated.
+     - new versions of binutils generate DT_RUNPATH entries instead of
+       DT_RPATH ones, as detailed in cdebconf's #845414.
+
+ -- Cyril Brulebois <kibi@debian.org>  Wed, 23 Nov 2016 08:21:57 +0100
+
 mklibs (0.1.42) unstable; urgency=high
 
   * mklibs-readelf: Initialize section_DYNAMIC and section_DYNSYM to
diff --git a/src/mklibs-readelf/elf.cpp b/src/mklibs-readelf/elf.cpp
index b8baa9f..0e4c0f3 100644
--- a/src/mklibs-readelf/elf.cpp
+++ b/src/mklibs-readelf/elf.cpp
@@ -419,6 +419,7 @@ dynamic_data<_class, _data>::dynamic_data (Dyn *dyn) throw ()
     case DT_NEEDED:
     case DT_SONAME:
     case DT_RPATH:
+    case DT_RUNPATH:
       this->is_string = true;
       break;
     default:
diff --git a/src/mklibs-readelf/main.cpp b/src/mklibs-readelf/main.cpp
index 2444c39..5eace3b 100644
--- a/src/mklibs-readelf/main.cpp
+++ b/src/mklibs-readelf/main.cpp
@@ -147,6 +147,7 @@ static void process (command cmd, const char *filename)
       break;
     case COMMAND_PRINT_RPATH:
       process_dynamics (file, DT_RPATH);
+      process_dynamics (file, DT_RUNPATH);
       break;
     case COMMAND_PRINT_SONAME:
       process_dynamics (file, DT_SONAME);
-- 
2.10.2

Attachment: signature.asc
Description: Digital signature


Reply to: