Commit Graph

5 Commits

Author SHA1 Message Date
Panu Matilainen fe68483d1b Add switch to allow printing only soname dependencies to elfdeps helper 2011-01-13 10:14:25 +02:00
Alexey Gladkov d874afb5cd elfdeps: Fix version definitions processing
The elfdeps doesn't parse the whole .gnu.version_d section.
For example:

$ readelf -V /lib/libbz2.so.1 | grep -A3 .gnu.version_d
Version definition section '.gnu.version_d' contains 2 entries:
  Addr: 0x0000000000000884  Offset: 0x000884  Link: 4 (.dynstr)
  000000: Rev: 1  Flags: BASE   Index: 1  Cnt: 1  Name: libbz2.so.1
  0x001c: Rev: 1  Flags: none  Index: 2  Cnt: 1  Name: BZLIB_1.0

Before changes:

$ echo /lib/libbz2.so.1.0.6 | /usr/lib/rpm/elfdeps -P
libbz2.so.1

After changes:

$ echo /lib/libbz2.so.1.0.6 | /usr/lib/rpm/elfdeps -P
libbz2.so.1(BZLIB_1.0)
libbz2.so.1

Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
2010-10-28 13:25:38 +03:00
Panu Matilainen 40b275b4a7 Fix a few uninitialized variable cases found by clang-analyzer 2010-04-29 10:30:43 +03:00
Panu Matilainen 62a60d8716 Gah, stupid thinko in elfdeps
- for DSO's without a soname, we should be adding a *provide* of the
  basename, not require
- dumb regression from commit 87c237bebf
2010-02-25 15:16:39 +02:00
Panu Matilainen 87c237bebf Split elf dependency extraction out of librpmbuild to external helper
- Elf dependency extraction code code lifted from rpmfcELF() and refactored
  to saner pieces. Having it in separate executable also frees librpmbuild
  of libelf dependency, clean up the unnecessary linkage etc from
  autofoo
- This lets internal dependency generator for elf files be
  overridden without losing file coloring (which is required for
  correct multilib handling). It also permits non-native elf files
  (eg when cross-building) to be handled by providing a custom
  elf dependency helper
- On the flip side, this inevitably slows down builds somewhat as
  two fork-exec's are needed for every elf file, but unlike invoking
  something like the python interpreter, this is a slim helper...
- All dependency extractors of the internal dependency generator are now
  external helpers (how twisted is that, huh? :) and thus can be customized
  and filtered through %__foo_provides|requires macros
2010-02-10 11:20:51 +02:00