diff options
-rwxr-xr-x | find-provides.in | 12 | ||||
-rwxr-xr-x | find-requires.in | 38 |
2 files changed, 41 insertions, 9 deletions
diff --git a/find-provides.in b/find-provides.in index 23c9296..13eed22 100755 --- a/find-provides.in +++ b/find-provides.in @@ -5,7 +5,7 @@ filelist=`sed "s/['\"]/\\\&/g"` -solist=$(echo "$filelist" | egrep -v "^/lib/ld\.so|/usr/lib(64)?/gcj/" | egrep '(/usr(/X11R6)?)?/lib(64)?/.*\.so' | \ +solist=$(echo "$filelist" | egrep -v "^/lib/ld\.so|/usr/lib(32|64)?/gcj/" | egrep '(/usr(/X11R6)?)?/lib(32|64)?/.*\.so' | \ xargs file -L 2>/dev/null | grep "ELF.*shared object" | cut -d: -f1) pythonlist= tcllist= @@ -16,6 +16,7 @@ case `uname -m` in alpha*) mark64="" ;; *) mark64="()(64bit)" ;; esac +mark32="()(n32)" # # --- Library sonames and weak symbol versions (from glibc). @@ -24,6 +25,10 @@ for f in $solist; do lib64=`if file -L $f 2>/dev/null | \ grep "ELF 64-bit" >/dev/null; then echo "$mark64"; fi` + if [ "$lib64" != "$mark64" ]; then + lib64=`if file -L $f 2>/dev/null | \ + grep "MIPS, N32" >/dev/null; then echo "$mark32"; fi` + fi if [ "$soname" != "" ]; then if [ ! -L $f ]; then echo $soname$lib64 @@ -83,10 +88,13 @@ fi # # --- .so files. -for i in `echo $filelist | tr '[:blank:]' "\n" | egrep '(/usr(/X11R6)?)?/lib(|64)(/gcc(-lib)?/.+)?/[^/]+\.so$'`; do +for i in `echo $filelist | tr '[:blank:]' "\n" | egrep '(/usr(/X11R6)?)?/lib(|32|64)(/gcc(-lib)?/.+)?/[^/]+\.so$'`; do objd=`objdump -p ${i} | grep SONAME` [ -h ${i} -a -n "${objd}" ] && \ lib64=`if file -L $i 2>/dev/null | grep "ELF 64-bit" >/dev/null; then echo "(64bit)"; fi` && \ + if [ "$lib64" != "(64bit)" ]; then + lib64=`if file -L $i 2>/dev/null | grep "MIPS, N32" >/dev/null; then echo "(n32)"; fi` + fi && \ echo ${objd} | perl -p -e "s/.*SONAME\s+(\S+)\.so.*/devel(\1$lib64)/g" done | sort -u diff --git a/find-requires.in b/find-requires.in index 17ca82d..25f6314 100755 --- a/find-requires.in +++ b/find-requires.in @@ -29,7 +29,8 @@ RPM_ARCH=$2 if [ -n "$RPM_BUILD_ROOT" ]; then lib_path_64=$RPM_BUILD_ROOT/usr/X11R6/lib64:$RPM_BUILD_ROOT/usr/lib64:$RPM_BUILD_ROOT/lib64 lib_path_32=$RPM_BUILD_ROOT/usr/X11R6/lib:$RPM_BUILD_ROOT/usr/lib:$RPM_BUILD_ROOT/lib - LD_LIBRARY_PATH=$lib_path_64:$lib_path_32 + lib_path_n32=$RPM_BUILD_ROOT/usr/lib32:$RPM_BUILD_ROOT/lib32 + LD_LIBRARY_PATH=$lib_path_64:$lib_path_32:$lib_path_n32 export LD_LIBRARY_PATH fi @@ -42,7 +43,7 @@ exelist=`echo "$filelist" | xargs -r file | egrep -v ":.* (commands|script) " | grep ":.*executable" | cut -d: -f1` scriptlist=`echo "$filelist" | grep -v /usr/doc | grep -v /usr/share/doc | xargs -r file | \ egrep ":.* (commands|script) " | cut -d: -f1` -liblist=`echo "$filelist" | egrep -v "/usr/lib(64)?/gcj/" | xargs -r file | \ +liblist=`echo "$filelist" | egrep -v "/usr/lib(32|64)?/gcj/" | xargs -r file | \ grep ":.*shared object" | cut -d : -f1` ocamllist=`echo "$filelist" | xargs -r file | \ grep ":.*Objective caml interface file" | cut -d : -f1` @@ -61,6 +62,7 @@ case `uname -m` in alpha*) mark64="" ;; *) mark64="()(64bit)" ;; esac +mark32="()(n32)" if [ "$needed" -eq 0 ]; then # @@ -69,6 +71,10 @@ if [ "$needed" -eq 0 ]; then [ -r $f -a -x $f ] || continue lib64=`if file -L $f 2>/dev/null | \ grep "ELF 64-bit" >/dev/null; then echo "$mark64"; fi` + if [ "$lib64" != "$mark64" ]; then + lib64=`if file -L $f 2>/dev/null | \ + grep "MIPS, N32" >/dev/null; then echo "$mark32"; fi` + fi ldd $f | awk '/=>/ { if ($1 !~ /libNoVersion.so/ && $1 !~ /4[um]lib.so/) { gsub(/'\''"/,"\\&",$1); @@ -83,6 +89,10 @@ if [ "$needed" -eq 0 ]; then [ -r $f ] || continue lib64=`if file -L $f 2>/dev/null | \ grep "ELF 64-bit" >/dev/null; then echo "$mark64"; fi` + if [ "$lib64" != "$mark64" ]; then + lib64=`if file -L $f 2>/dev/null | \ + grep "MIPS, N32" >/dev/null; then echo "$mark32"; fi` + fi ldd $f | awk '/=>/ { if ($1 !~ /libNoVersion.so/ && $1 !~ /4[um]lib.so/) { gsub(/'\''"/,"\\&",$1); @@ -101,7 +111,7 @@ fi tmpdeplist= for f in $filelist; do - dep="`echo $f | sed -n -e "s@.*/usr/lib/perl5/\(vendor_perl/\|site_perl/\|\)\([.0-9]\{1,\}\).*\\$@perl-base >= $perlepoch\2@p" -e "s@.*/usr/\(lib\|lib64\)/python\([.0-9]\{1,\}\).*\\$@python-base >= \2@p"`" + dep="`echo $f | sed -n -e "s@.*/usr/lib/perl5/\(vendor_perl/\|site_perl/\|\)\([.0-9]\{1,\}\).*\\$@perl-base >= $perlepoch\2@p" -e "s@.*/usr/\(lib\|lib64|lib32\)/python\([.0-9]\{1,\}\).*\\$@python-base >= \2@p"`" if [[ -n $dep && -z `echo $uniqdeplist $tmpdeplist|grep "$dep"` ]]; then tmpdeplist+="$dep\n" fi @@ -141,10 +151,16 @@ done # # --- Weak symbol versions (from glibc). [ -n "$mark64" ] && mark64="(64bit)" +[ -n "$mark32" ] && mark32="(n32)" + for f in $liblist $exelist ; do [ -r $f ] || continue lib64=`if file -L $f 2>/dev/null | \ grep "ELF 64-bit" >/dev/null; then echo "$mark64"; fi` + if [ "$lib64" != "$mark64" ]; then + lib64=`if file -L $f 2>/dev/null | \ + grep "MIPS, N32" >/dev/null; then echo "$mark32"; fi` + fi objdump -p $f | awk 'BEGIN { START=0; LIBNAME=""; needed='$needed'; } /^$/ { START=0; } /^Dynamic Section:$/ { START=1; } @@ -192,6 +208,10 @@ if [ -n "$perllist" ]; then f=`perl -MConfig -e 'print $Config{archlib}'`/CORE/libperl.so lib64=`if file -L $f 2>/dev/null | \ grep "ELF 64-bit" >/dev/null; then echo "()$mark64"; fi` + if [ "$lib64" != "$mark64" ]; then + lib64=`if file -L $f 2>/dev/null | \ + grep "MIPS, N32" >/dev/null; then echo "()$mark32"; fi` + fi echo libperl.so$lib64 fi fi @@ -228,14 +248,18 @@ fi # # --- .so files. -for i in `echo $filelist | tr '[:blank:]' "\n" | egrep "(/usr(/X11R6)?)?/lib(|64)/[^/]+\.so$"`; do +for i in `echo $filelist | tr '[:blank:]' "\n" | egrep "(/usr(/X11R6)?)?/lib(|64|32)/[^/]+\.so$"`; do objd=`objdump -p ${i} | grep SONAME` lib64=`if file -L $i 2>/dev/null | grep "ELF 64-bit" >/dev/null; then echo "(64bit)"; fi` && \ + if [ "$lib64" != "(64bit)" ]; then + lib64=`if file -L $i 2>/dev/null | \ + grep "MIPS, N32" >/dev/null; then echo "(n32)"; fi` + fi && \ if [ -h ${i} -a -n "${objd}" ]; then if [ "$needed" -eq 0 ]; then ldd ${i} \ | grep -v "statically linked" \ - | grep -v "/\(lib\|lib64\)/\(ld\|ld64\|ld-linux.*\)\.so" \ + | grep -v "/\(lib\|lib64\|lib32\)/\(ld\|ld64\|ld-linux.*\)\.so" \ | perl -p -e "s/\s+(\S+)\.so.*/devel(\1$lib64)/g" else objdump -p $i | grep -v "\(ld\|ld64\|ld-linux.*\)\.so" \ @@ -250,11 +274,11 @@ for i in `echo $filelist | tr '[:blank:]' "\n" | egrep "(/usr(/X11R6)?)?/lib(|64 ' fi fi -done | egrep -v 'devel\(linux-gate|linux-vdso32|linux-vdso64|lib(c|pthread|rt)(\(64bit\))?\)' | sort -u +done | egrep -v 'devel\(linux-gate|linux-vdso32|linux-vdso64|lib(c|pthread|rt)(\((64bit|n32)\))?\)' | sort -u # # --- pkgconfig -echo $filelist | tr '[:blank:]' '\n' | egrep -q '/usr/(share|lib(64)?)/pkgconfig/.*\.pc' && echo pkgconfig +echo $filelist | tr '[:blank:]' '\n' | egrep -q '/usr/(share|lib(32|64)?)/pkgconfig/.*\.pc' && echo pkgconfig # # --- multiarch-utils |