From 089681ce55499b31a023febf4c0d13845ff04fad Mon Sep 17 00:00:00 2001 From: ewt Date: Tue, 26 May 1998 13:28:48 +0000 Subject: [PATCH] various updates from Tim Mooney CVS patchset: 2134 CVS date: 1998/05/26 13:28:48 --- autodeps/hpux.prov | 7 ++++++- autodeps/hpux.req | 21 ++++++++++++++++++--- autodeps/osf.req | 51 ++++++++++++++++++++++++++++++++++++++++----------- 3 files changed, 64 insertions(+), 15 deletions(-) diff --git a/autodeps/hpux.prov b/autodeps/hpux.prov index c07b6b3..c7872a5 100644 --- a/autodeps/hpux.prov +++ b/autodeps/hpux.prov @@ -1,9 +1,11 @@ #! /usr/bin/ksh # Original Author: Tim Mooney (mooney@plains.nodak.edu) +# $Id: hpux.prov,v 1.2 1998/05/26 13:28:48 ewt Exp $ +# # This file is distributed under the terms of the GNU Public License # -# find-provides is part of RPM, the RedHat Package Manager. find-provides +# find-provides is part of RPM, the Red Hat Package Manager. find-provides # reads a list of full pathnames (in a package) on stdin, and outputs all # shared libraries provided by (contained in) the package. # @@ -32,6 +34,9 @@ # instruction page size: 4K # +PATH=/usr/bin:/usr/sbin:/usr/ccs/bin +export PATH + for f in `cat -` do chatr $f 2>/dev/null | awk ' diff --git a/autodeps/hpux.req b/autodeps/hpux.req index cacb35d..0b9d908 100644 --- a/autodeps/hpux.req +++ b/autodeps/hpux.req @@ -1,9 +1,11 @@ #! /usr/bin/ksh # Original Author: Tim Mooney (mooney@plains.nodak.edu) +# $Id: hpux.req,v 1.2 1998/05/26 13:28:48 ewt Exp $ +# # This file is distributed under the terms of the GNU Public License # -# find-requires is part of RPM, the RedHat Package Manager. find-requires +# find-requires is part of RPM, the Red Hat Package Manager. find-requires # reads a list of full pathnames (in a package) on stdin, and outputs all # shared libraries the package requires to run correctly. # @@ -31,16 +33,23 @@ # data page size: 4K # instruction page size: 4K +PATH=/usr/bin:/usr/sbin:/sbin:/usr/ccs/bin +export PATH + # # TVM: it might be better to re-write this so that `file' isn't used, since # it can all be done with `chatr' (note the second line of chatr output tells # whether it's a shared executable or not), but this works. # -filelist=`sed "s/['\"]/\\\&/g" | xargs file | grep executable | cut -d: -f1` +filelist=`sed "s/['\"]/\\\&/g" | xargs file | egrep '(executable|library)' \ + | cut -d: -f1` for f in $filelist do - chatr $f | awk ' + # uncomment the next line if debugging + # echo "### processing $f" + + chatr $f 2>/dev/null | awk ' # # For you non-awk-ers, no single quotes in comments -- the shell @@ -53,6 +62,10 @@ do RS = "\n"; } + # uncomment the next line for debugging information + #{ print NR, ": ", $0 } + + in_shlib_list == 1 && /dynamic[ ]+\// { # split the line on "/" and print out the last element @@ -70,3 +83,5 @@ do } ' # end of awk done | sort -u +#comment out the previous line and uncomment the next one if debugging. +#done diff --git a/autodeps/osf.req b/autodeps/osf.req index dae1124..dab9304 100644 --- a/autodeps/osf.req +++ b/autodeps/osf.req @@ -1,9 +1,11 @@ #! /usr/bin/ksh # Original Author: Tim Mooney (mooney@plains.nodak.edu) +# $Id: osf.req,v 1.2 1998/05/26 13:28:48 ewt Exp $ +# # This file is distributed under the terms of the GNU Public License # -# find-requires is part of RPM, the RedHat Package Manager. find-requires +# find-requires is part of RPM, the Red Hat Package Manager. find-requires # reads a list of full pathnames (in a package) on stdin, and outputs all # shared libraries the package requires to execute. # @@ -30,13 +32,26 @@ # libX11.so Dec 9 00:06:05 1997 0xaa1bf091 0 # libc.so Dec 8 18:41:11 1997 0x5e955f9b 0 osf.1 +PATH=/usr/bin:/usr/sbin:/sbin:/usr/ccs/bin +export PATH + +filelist=`cat -` +# +# Handle shell scripts first +# +for f in `echo $filelist | xargs file | grep 'shell script' | cut -d: -f 2 \ + | awk '{ print $1 }'` +do + print $f +done | sort -u + +# # TVM: it might be better to re-write this so that `file' isn't used, since -# it can all be done with `odump', but this works. +# it could all be done with `odump', but this works. # -filelist=`sed "s/['\"]/\\\&/g" | xargs file | grep executable | cut -d: -f1` -for f in $filelist +for f in `echo $filelist | xargs file | grep executable | cut -d: -f1` do odump -Dl $f 2>/dev/null | awk ' @@ -46,16 +61,27 @@ do # BEGIN { - seen_program_name = 0; + found_program_name = 0; FS = " "; RS = "\n"; - OFS="" + OFS=""; + # + # what character should be used to separate the soname from any + # version info? Using a . is actually a bad idea, since some + # free/3rd party libraries may be built so that the library + # soname may have version info in it too. If we use . as the + # separator, it may not be possible to tell where the soname + # ends and the internal version info begins. It might be + # better to use a - or a : here. If you do so, be sure to + # change this setting in find-provides, too. + # + soname_version_delimiter="."; } # uncomment the next line for debugging information - #{ print "Got input:", $0 } + #{ print "Saw input:", $0 } - seen_program_name == 1 && $0 !~ /^$/ { + found_program_name == 1 && $0 !~ /^$/ { # uncomment for debugging information #print "found shared library: $0" @@ -74,19 +100,22 @@ do # shared libraries should *not* be built with any version info # in the soname. That info should be in the version field # only. + # # If we used a separator character of a - or something else, # instead of a ., we would not have this problem. # - print fields[1], ".", fields[8] + print fields[1], soname_version_delimiter, fields[8] } } /^.*: *$/ { - seen_program_name = 1 + found_program_name = 1 # # uncomment the next line for debugging information - #print "found the program name: $1" + #print "found the program name: ", $1 } ' # end of awk done | sort -u +# comment out the previous line and uncomment the next when debugging +# done -- 2.7.4