Commit Graph

9 Commits

Author SHA1 Message Date
Alexey Tourbin
362a93334a lib.req: use CanonPath() to deal with RPATH like $ORIGIN/../lib 2008-07-07 02:23:34 +04:00
Alexey Tourbin
eb301af2f4 lib.req: do not optimize dependencies on standard ELF interpreter 2008-03-17 21:07:06 +03:00
Alexey Tourbin
17b1c6b296 lib.req: return early if there is no dynamic section, to stop ldd failures with klibc executables
(before this commit)
$ ./scripts/lib.req.in /lib/mkinitrd/udev/lib/udev/usb_id
/lib/klibc-LqkyBjjvuUwwxYg5B9IteGNsWsI.so
ldd: ERROR: /lib/mkinitrd/udev/lib/udev/usb_id: trace failed
$

(after this commit)
$ ./scripts/lib.req.in /lib/mkinitrd/udev/lib/udev/usb_id
/lib/klibc-LqkyBjjvuUwwxYg5B9IteGNsWsI.so
$
2008-02-19 00:43:21 +03:00
Alexey Tourbin
903c1810f3 lib.req: enabled ELF interp dependencies except for standard glibc's /lib*/ld-linux*.so.2 2008-02-18 22:31:29 +03:00
Alexey Tourbin
0585689562 lib.req: added a copyright holder 2008-01-16 02:42:11 +03:00
Alexey Tourbin
ea2fa9a0b1 lib.req: fixed file-level dependencies output
$ gcc test.c /usr/lib/perl5/vendor_perl/i386-linux/auto/Glib/Glib.so
$ objdump -p a.out |grep Glib
  NEEDED      /usr/lib/perl5/vendor_perl/i386-linux/auto/Glib/Glib.so
$ ldd a.out |grep Glib
        /usr/lib/perl5/vendor_perl/i386-linux/auto/Glib/Glib.so (0xb7ec0000)
$

(before previous commit)
$ /usr/lib/rpm/lib.req a.out
rtld(GNU_HASH)
libc.so.6(GLIBC_2.0)
lib.req: WARNING: /home/at/a.out: library /usr/lib/perl5/vendor_perl/i386-linux/auto/Glib/Glib.so not found
$

(before this commit)
$ ./scripts/lib.req.in a.out
rtld(GNU_HASH)
libc.so.6(GLIBC_2.0)
/usr/lib/perl5/vendor_perl/i386-linux/auto/Glib//usr/lib/perl5/vendor_perl/i386-linux/auto/Glib/Glib.so
$

(after this commit)
$ ./scripts/lib.req.in a.out
rtld(GNU_HASH)
libc.so.6(GLIBC_2.0)
/usr/lib/perl5/vendor_perl/i386-linux/auto/Glib/Glib.so
$
2008-01-16 02:42:01 +03:00
Alexey Tourbin
af1ce1840d lib.req: fixed awk script for ldd output
This now handles the case of relocated ld-linux.so.2:
	/lib/ld-linux.so.2 => /tmp/buildroot/lib/ld-linux.so.2

$ cd /tmp/buildroot
$ ii() {install -v -pD $1 .$1; }
$ ii /lib/ld-linux.so.2
$ ii /usr/lib/libmemusage.so
$

(old)
$ RPM_BUILD_ROOT=$PWD /usr/lib/rpm/lib.req ./usr/lib/libmemusage.so
libc.so.6(GLIBC_2.1.3)
libc.so.6(GLIBC_2.1)
libc.so.6(GLIBC_2.0)
lib.req: WARNING: /usr/lib/libmemusage.so: library ld-linux.so.2 not found
libdl.so.2(GLIBC_2.0)
$

(new)
$ RPM_BUILD_ROOT=$PWD ~/git.alt/rpm/scripts/lib.req.in ./usr/lib/libmemusage.so
libc.so.6(GLIBC_2.1.3)
libc.so.6(GLIBC_2.1)
libc.so.6(GLIBC_2.0)
ld-linux.so.2(GLIBC_2.3)
libdl.so.2(GLIBC_2.0)
$
2008-01-16 02:27:21 +03:00
Alexey Tourbin
3abcad0533 lib.req: do file-level dependencies for private libraries
Private libraries are the ones which have non-standard prefix.
We choose to produce file-level dependency (without braces) on
such private libraries in two cases: 1) either the library was
found under RPM_BUILD_ROOT; or 2) no versioned symbols are used
from the library (no versioned references).
2007-11-25 18:34:41 +03:00
Alexey Tourbin
f0ec810739 factored lib.req and lib.prov
Moved old code from find-requires and find-provides to lib.req and lib.prov.
For some reason, also a few python-related lines was removed.

Adapted lib.req and lib.prov to work without RPM_BUILD_ROOT.

In lib.prov, simplified RPM_FINDPROV_LIB_PATH handling (replaced
`lookup_path "$dir" "$PATH"' with `[ -z "${PATH##* $dir *}" ]').

Added lib.req.files and lib.prov.files.
2007-03-11 15:00:33 +03:00