diff options
author | jbj <devnull@localhost> | 2000-12-02 16:52:14 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2000-12-02 16:52:14 +0000 |
commit | d7a40e754dc6b0ac07d2185bb5723384065feab5 (patch) | |
tree | a36b78f2871694273d994280c116565f1e9c067c | |
parent | 28625265e4cb2653f8994cebae1da6fce6919d9d (diff) | |
download | librpm-tizen-d7a40e754dc6b0ac07d2185bb5723384065feab5.tar.gz librpm-tizen-d7a40e754dc6b0ac07d2185bb5723384065feab5.tar.bz2 librpm-tizen-d7a40e754dc6b0ac07d2185bb5723384065feab5.zip |
- improved find-{requires,provides} for aix4/hpux/irix6/osf.
Tim Mooney<mooney@dogbert.cc.ndsu.NoDak.edu>
CVS patchset: 4300
CVS date: 2000/12/02 16:52:14
-rw-r--r-- | CHANGES | 2 | ||||
-rwxr-xr-x | autodeps/aix.req | 66 | ||||
-rw-r--r-- | autodeps/aix4.prov | 189 | ||||
-rw-r--r-- | autodeps/aix4.req | 99 | ||||
-rw-r--r-- | autodeps/hpux.prov | 12 | ||||
-rw-r--r-- | autodeps/hpux.req | 12 | ||||
-rw-r--r-- | autodeps/irix6.prov | 42 | ||||
-rw-r--r-- | autodeps/irix6.req | 35 | ||||
-rw-r--r-- | autodeps/osf.prov | 35 | ||||
-rw-r--r-- | autodeps/osf.req | 50 |
10 files changed, 391 insertions, 151 deletions
@@ -35,6 +35,8 @@ - hpux w/o -D_OPEN_SOURCE has not h_errno. - syntax to specify source of Requires: (PreReq: now legacy). - md5 sums are little endian (no swap) so big endian needs the swap. + - improved find-{requires,provides} for aix4/hpux/irix6/osf. + Tim Mooney<mooney@dogbert.cc.ndsu.NoDak.edu> 3.0.6 -> 4.0 - use DIRNAMES/BASENAMES/DIRINDICES not FILENAMES in packages and db. diff --git a/autodeps/aix.req b/autodeps/aix.req deleted file mode 100755 index 53ca70406..000000000 --- a/autodeps/aix.req +++ /dev/null @@ -1,66 +0,0 @@ -#! /usr/bin/ksh - -# Original Author: Ralph Goers(rgoer@Candle.Com) -# Borrowed heavily from Tim Mooney's HP version. -# This file is distributed under the terms of the GNU General Public License -# -# find-requires is part of RPM, the RedHat 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. -# -# On AIX, use `dump -H' to find the library dependencies for an executable -# -# Example dump output: -# -#$dump -H /usr/bin/dump -# -#/usr/bin/dump: -# -# ***Loader Section*** -# Loader Header Information -#VERSION# #SYMtableENT #RELOCent LENidSTR -#0x00000001 0x00000021 0x0000006c 0x0000002f -# -##IMPfilID OFFidSTR LENstrTBL OFFstrTBL -#0x00000002 0x00000848 0x00000049 0x00000877 -# -# -# ***Import File Strings*** -#INDEX PATH BASE MEMBER -#0 /usr/lib:/lib:/usr/lpp/xlC/lib -#1 libc.a shr.o - -# -# -filelist=`sed "s/['\"]/\\\&/g" | xargs file | grep -e executable -e archive | cut -d: -f1` - -for f in $filelist -do - dump -H $f | awk ' - - # - # For you non-awk-ers, no single quotes in comments -- the shell - # sees them and things get hosed. - # - - BEGIN { - in_shlib_list = 0; - in_file_strings = 0; - FS = " "; - RS = "\n"; - } - - in_shlib_list == 1 { - print $2 - } - - in_file_strings == 1 && $1 == "0" { - in_shlib_list = 1 - } - - /\*Import File Strings\*/ { - in_file_strings = 1 - } - - ' # end of awk -done | sort -u diff --git a/autodeps/aix4.prov b/autodeps/aix4.prov new file mode 100644 index 000000000..a7aa5fd54 --- /dev/null +++ b/autodeps/aix4.prov @@ -0,0 +1,189 @@ +#! /usr/bin/ksh + +# Current Maintainer: Tim Mooney <mooney@golem.phys.ndsu.NoDak.edu> +# +# Original Author: Ralph Goers(rgoer@Candle.Com) +# Borrowed heavily from H10 version created by Tim Mooney. +# This file is distributed under the terms of the GNU Public License +# +# find-provides is part of RPM, the RedHat 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. +# +# On AIX, use `dump -o' to find what the library provides, if anything. +# +# +# Ralph's comments: +# +# Executables are skipped because, by convention, shared libraries +# which are not dynamically loaded are packaged as archives. Also, +# it is impossible to tell the difference between an executable +# program and a dynamically loaded shared library. +# +# Because archives can contain any number of things, including +# apparently, multiple shared libraries, dependencies in archives +# will be specified as file[member]. Any member in an archive which +# has a loader section will be listed as provided. +# +# Tim's (subsequent) comments: +# +# Based on discussions on the rpm-list in mid-March of 2000, I've modified +# the copy of find-provides that Ralph provided me to use `dump -o' instead +# of `dump -H', and I've followed Brandon S. Allbery's suggestions and modified +# the awk script to look for a modtype of `RE', which is what constitutes a +# shared member of a library. Just like everything else on AIX, libraries are +# weird. :-| +# +# I've followed Ralph's convention of generating provides in the form of +# `filebasename(member-object)' *if* there is a member object, or just +# `filebasename' if there isn't (such as in the case of certain perl modules, +# locally built shared libraries, etc.). +# +# Example dump output: +# +#$dump -o /usr/lpp/X11/lib/R6/libX11.a +# +#/usr/lpp/X11/lib/R6/libX11.a[shr4.o]: +# +# ***Object Module Header*** +## Sections Symbol Ptr # Symbols Opt Hdr Len Flags +# 4 0x00126c28 14557 72 0x3002 +#Timestamp = 920377624 +#Magic = 0x1df +# +# ***Optional Header*** +#Tsize Dsize Bsize Tstart Dstart +#0x000bcc20 0x00024bd4 0x00000e0c 0x00000000 0x00000000 +# +#SNloader SNentry SNtext SNtoc SNdata +#0x0004 0x0000 0x0001 0x0002 0x0002 +# +#TXTalign DATAalign TOC vstamp entry +#0x0005 0x0003 0x00023d74 0x0001 0xffffffff +# +#maxSTACK maxDATA SNbss magic modtype +#0x00000000 0x00000000 0x0003 0x010b RE +# +#/usr/lpp/X11/lib/R6/libX11.a[shr4net.o]: +# +# ***Object Module Header*** +## Sections Symbol Ptr # Symbols Opt Hdr Len Flags +# 7 0x000006fb 22 72 0x3002 +#Timestamp = 774732998 +#Magic = 0x1df +# +# ***Optional Header*** +#Tsize Dsize Bsize Tstart Dstart +#0x00000084 0x00000088 0x00000000 0x00000200 0x00000000 +# +#SNloader SNentry SNtext SNtoc SNdata +#0x0007 0x0000 0x0002 0x0004 0x0004 +# +#TXTalign DATAalign TOC vstamp entry +#0x0002 0x0003 0x00000080 0x0001 0xffffffff +# +#maxSTACK maxDATA SNbss magic modtype +#0x00000000 0x00000000 0x0005 0x010b RE + +PATH=/usr/bin:/usr/ccs/bin +export PATH + +# +# TVM: Marc Stephenson (marc@austin.ibm.com) points out we run things +# like `file', et. al. and expect the output to be what we see in the +# C/POSIX locale. Make sure it is so. +# +LANG=C +export LANG + +# +# TVM: Because AIX libraries don't have the equivalent of a SONAME, if you do +# +# ln -s /usr/lib/libc.a /tmp/libmy_libc_link.a +# +# and then link your program with `-L/tmp -lmy_libc_link', that's the name +# that will be recorded as the BASE in the Import File Strings area. +# This means we need to include "symbolic link" in the list of files to check +# out. +# +filelist=`sed "s/['\"]/\\\&/g" | xargs file \ + | egrep 'archive|executable|symbolic link' | cut -d: -f1` + +for f in $filelist +do + # + # Uncomment the next line for some additional debugging info: + #echo "Checking $f" + dump -o $f 2>/dev/null | awk ' + + # TVM: be careful to not use any single quotes, even in comments, + # since this entire awk script is enclosed in single quotes. + + BEGIN { + FS = " "; + RS = "\n"; + # our flag to indicate we found a filename[membername] or + # filename. + found_file_or_member = 0 + # our flag to indicate we found the modtype tag. If so, + # we want to look for RE on the next line. + found_modtype = 0 + # + # number of times gsub substituted, used twice below + nsub = 0 + } + + # Uncomment the next line for some debugging info. + # { print NR , ":", $0 } + + found_modtype == 1 && found_file_or_member == 1 { + + if ( $0 ~ / RE/ ) { + # we have seen a filename, we have seen a modtype line, and now + # we know that the modtype is RE. Print out the member name. + # + # Note that member names generally look like foo[bar.o], and + # since the RPM standard has become to use parens, we will + # translate the [ and ] into ( and ) in the output stream. + # awk on AIX 4 has sub() and gsub(), so we can use them to do + # it. If this script is adapted for use on some other platform + # make sure that awk on that platform has sub/gsub. If not, + # you will need to postprocess the output stream (probably before + # the sort -u) with tr or sed. + nsub = gsub(/\[/, "(", member) + if ( nsub > 1 ) { + print "substituted too many times for [:", member | "cat 1>&2" + } + nsub = gsub(/\]/, ")", member) + if ( nsub > 1 ) { + print "substituted too many times for ]:", member | "cat 1>&2" + } + print member + } + # In any case, reset our flags to zero, to indicate we are done + # with this member, so we are ready to handle additional members + # if needed. + found_file_or_member = 0 + found_modtype = 0 + } + + found_file_or_member == 1 && /magic *modtype/ { + # we have seen a filename, and now we have seen the modtype + # line. Set the found_modtype flag. The next line of input + # will be caught by the rule above, and we will print out + # the member if the modtype is RE. + found_modtype = 1 + } + + /:$/ { + numfields = split($0,fields, "/") + # chop off the trailing colon + fieldlen = length(fields[numfields])-1 + member= substr(fields[numfields], 1, fieldlen) + # Set the flat to indicate we found a file or a file(member). + found_file_or_member = 1 + } + ' # end of awk +done | sort -u +#comment out the previous line and uncomment the next line when debugging +#done diff --git a/autodeps/aix4.req b/autodeps/aix4.req new file mode 100644 index 000000000..84fb49928 --- /dev/null +++ b/autodeps/aix4.req @@ -0,0 +1,99 @@ +#! /usr/bin/ksh +# +# Current Maintainer: Tim Mooney <mooney@golem.phys.ndsu.NoDak.edu> +# Original Author: Ralph Goers(rgoer@Candle.Com) +# +# This file is distributed under the terms of the GNU Public License +# +# find-requires is part of RPM, the RedHat 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. +# +# On AIX, use `dump -H' to find the library dependencies for an executable +# +# Example dump output: +# +#$dump -H /usr/bin/dump +# +#/usr/bin/dump: +# +# ***Loader Section*** +# Loader Header Information +#VERSION# #SYMtableENT #RELOCent LENidSTR +#0x00000001 0x00000021 0x0000006c 0x0000002f +# +##IMPfilID OFFidSTR LENstrTBL OFFstrTBL +#0x00000002 0x00000848 0x00000049 0x00000877 +# +# +# ***Import File Strings*** +#INDEX PATH BASE MEMBER +#0 /usr/lib:/lib:/usr/lpp/xlC/lib +#1 libc.a shr.o +# +# + +PATH=/usr/bin:/usr/ccs/bin +export PATH + +# +# TVM: Marc Stephenson (marc@austin.ibm.com) points out we run things +# like `file', et. al. and expect the output to be what we see in the +# C/POSIX locale. Make sure it is so. +# +LANG=C +export LANG + +filelist=`sed "s/['\"]/\\\&/g" | xargs file \ + | egrep '^.*:.*(executable |archive )' | cut -d: -f1` + +for f in $filelist +do + dump -H $f 2>/dev/null | awk ' + + # + # Since this entire awk script is enclosed in single quotes, + # you need to be careful to not use single quotes, even in awk + # comments, if you modify this script. + # + + BEGIN { + in_shlib_list = 0; + in_file_strings = 0; + FS = " "; + RS = "\n"; + } + + in_shlib_list == 1 && /^$/ { + in_shlib_list = 0; + in_file_strings = 0; + } + + in_shlib_list == 1 { + pos = index($2, "/") + numfields = split($0, fields, " ") + + if (pos == 0) { + namevar = 2 + } + else { + namevar = 3 + } + if (namevar < numfields) { + printf("%s(%s)\n", fields[namevar], fields[namevar+1]) + } + else { + print fields[namevar] + } + } + + in_file_strings == 1 && $1 == "0" { + in_shlib_list = 1 + } + + /\*Import File Strings\*/ { + in_file_strings = 1 + } + + ' # end of awk +done | sort -u diff --git a/autodeps/hpux.prov b/autodeps/hpux.prov index 4a2ee108d..2d3dc5a99 100644 --- a/autodeps/hpux.prov +++ b/autodeps/hpux.prov @@ -1,7 +1,7 @@ #! /usr/bin/ksh -# Original Author: Tim Mooney (mooney@plains.nodak.edu) -# $Id: hpux.prov,v 1.6 2000/03/02 20:21:10 jbj Exp $ +# Original Author: Tim Mooney <mooney@golem.phys.ndsu.NoDak.edu> +# $Id: hpux.prov,v 1.7 2000/12/02 16:52:14 jbj Exp $ # # This file is distributed under the terms of the GNU Public License # @@ -45,6 +45,14 @@ PATH=/usr/bin:/usr/sbin:/usr/ccs/bin export PATH # +# TVM: Marc Stephenson (marc@austin.ibm.com) points out we run things +# like `file', et. al. and expect the output to be what we see in the +# C/POSIX locale. Make sure it is so. +# +LANG=C +export LANG + +# # TVM: use `while read ...' instead of `for f in ...', because there may # be too many files to stuff into one shell variable. # diff --git a/autodeps/hpux.req b/autodeps/hpux.req index 8539d76e7..2ad149c17 100644 --- a/autodeps/hpux.req +++ b/autodeps/hpux.req @@ -1,7 +1,7 @@ #! /usr/bin/ksh -# Original Author: Tim Mooney (mooney@plains.nodak.edu) -# $Id: hpux.req,v 1.5 1999/09/30 00:22:15 jbj Exp $ +# Original Author: Tim Mooney <mooney@golem.phys.ndsu.NoDak.edu> +# $Id: hpux.req,v 1.6 2000/12/02 16:52:14 jbj Exp $ # # This file is distributed under the terms of the GNU Public License # @@ -36,6 +36,14 @@ PATH=/usr/bin:/usr/sbin:/sbin:/usr/ccs/bin export PATH +# +# TVM: Marc Stephenson (marc@austin.ibm.com) points out we run things +# like `file', et. al. and expect the output to be what we see in the +# C/POSIX locale. Make sure it is so. +# +LANG=C +export LANG + IFS="" while read f do diff --git a/autodeps/irix6.prov b/autodeps/irix6.prov index a3a3b36b5..bbcc98b86 100644 --- a/autodeps/irix6.prov +++ b/autodeps/irix6.prov @@ -1,7 +1,7 @@ #! /usr/bin/ksh -# Original Author: Tim Mooney (mooney@plains.nodak.edu) -# $Id: irix6.prov,v 1.5 1999/09/30 00:22:15 jbj Exp $ +# Original Author: Tim Mooney <mooney@golem.phys.ndsu.NoDak.edu> +# $Id: irix6.prov,v 1.6 2000/12/02 16:52:14 jbj Exp $ # # This file is distributed under the terms of the GNU Public License # @@ -9,13 +9,11 @@ # reads a list of full pathnames (in a package) on stdin, and outputs all # shared libraries provided by (contained in) the package. # -# NOTE: I use `:' as the delimiter (by default) between the library soname -# and any library version info. This is because IRIX libraries (even -# system libraries) have "version information" in both the soname and the -# internal version field, so it's important to be able to separate those -# fields. If we just used `.', we wouldn't know where the soname ends and -# the version infromation begins. -# +# NOTE: IRIX libraries (even system libraries) have "version information" +# in both the soname and the internal version field, so it's important to +# be able to separate the soname and internal version fields. As has +# become the case on other platforms, the soname/iversion delimiters have +# become the `(' and `)' characters. # # On IRIX, use `elfdump -L' to find what libraries a package provides # @@ -69,6 +67,14 @@ PATH=/usr/bin:/usr/sbin export PATH # +# TVM: Marc Stephenson (marc@austin.ibm.com) points out we run things +# like `file', et. al. and expect the output to be what we see in the +# C/POSIX locale. Make sure it is so. +# +LANG=C +export LANG + +# # Use `while read ...' instead of `for f in ...', because there may be too # many files to stuff into one shell variable. # @@ -82,17 +88,17 @@ do if test X"$maybe_shared_lib" != X ; then elfdump -L $f 2>/dev/null | awk ' + # + # Since this entire awk script is enclosed in single quotes, + # you need to be careful to not use single quotes, even in awk + # comments, if you modify this script. + # + BEGIN { FS = " "; RS = "\n"; OFS = ""; - # The character that should separate the soname from - # the version information. If you change this, you - # should also change the same variable in the IRIX - # find-requires script - soname_version_delimiter=":" - found_soname = 0; found_iversion = 0; } @@ -127,7 +133,7 @@ do numfields = split(version, versions, ":") if (numfields > 1) { for (i = 1; i < numfields; i++) { - print soname, soname_version_delimiter, versions[i] + print soname, "(", versions[i], ")" } # # let our END routine print out the *last* version @@ -176,7 +182,7 @@ do # Uncomment the next line for debugging info #{ print "END: NR: ", NR } if ( (found_soname == 1) && (found_iversion == 1) ) { - print soname, soname_version_delimiter, version + print soname, "(", version, ")" exit } else if ( (found_soname == 1) && (found_iversion == 0) ) { # @@ -184,7 +190,7 @@ do # against this library will pick up a dependency on version 0 # of this library, so we output that. # - print soname, soname_version_delimiter, 0 + print soname, "(", 0, ")" } # else do nothing } diff --git a/autodeps/irix6.req b/autodeps/irix6.req index cd280e869..a437862e3 100644 --- a/autodeps/irix6.req +++ b/autodeps/irix6.req @@ -1,7 +1,7 @@ #! /usr/bin/ksh -# Original Author: Tim Mooney (mooney@plains.nodak.edu) -# $Id: irix6.req,v 1.5 1999/09/30 00:22:15 jbj Exp $ +# Original Author: Tim Mooney <mooney@golem.phys.ndsu.NoDak.edu> +# $Id: irix6.req,v 1.6 2000/12/02 16:52:14 jbj Exp $ # # This file is distributed under the terms of the GNU Public License # @@ -9,12 +9,11 @@ # reads a list of full pathnames (in a package) on stdin, and outputs all # shared libraries the package requires to execute. # -# NOTE: I use `:' as the delimiter (by default) between the library soname -# and any library version info. This is because IRIX libraries (even -# system libraries) have "version information" in both the soname and the -# internal version field, so it's important to be able to separate those -# fields. If we just used `.', we wouldn't know where the soname ends and -# the version infromation begins. +# NOTE: IRIX libraries (even system libraries) have "version information" +# in both the soname and the internal version field, so it's important to +# be able to separate the soname and internal version fields. As has +# become the case on other platforms, the soname/iversion delimiters have +# become the `(' and `)' characters. # # On IRIX, use `elfdump -Dl' to find what libraries are required by # an executable. `elfdump -L' does what we need too, but it gives us more @@ -49,6 +48,14 @@ PATH=/usr/bin:/usr/sbin export PATH # +# TVM: Marc Stephenson (marc@austin.ibm.com) points out we run things +# like `file', et. al. and expect the output to be what we see in the +# C/POSIX locale. Make sure it is so. +# +LANG=C +export LANG + +# # TVM: switch to using `while read ...' instead of `for f in ...', because # packages with a large number of files could be too big for one shell # variable to hold. @@ -99,8 +106,9 @@ do | awk ' # - # For you non-awk-ers, no single quotes in comments -- the shell - # sees them and things get hosed. + # Since this entire awk script is enclosed in single quotes, + # you need to be careful to not use single quotes, even in awk + # comments, if you modify this script. # BEGIN { @@ -108,7 +116,6 @@ do FS = " "; RS = "\n"; OFS=""; - soname_version_delimiter=":"; } # uncomment the next line for debugging information @@ -123,7 +130,7 @@ do print fields[8] } else if (numfields == 9) { # - print fields[8], soname_version_delimiter, fields[9] + print fields[8], "(", fields[9], ")" } else if (numfields > 9) { # # SGI has this annoying habit of putting comments, complete @@ -133,9 +140,9 @@ do # verfields = split(fields[NF], junk, "#") if (verfields == 2) { - print fields[8], soname_version_delimiter, junk[2] + print fields[8], "(", junk[2], ")" } else if (verfields > 2) { - print fields[8], soname_version_delimiter, junk[verfields] + print fields[8], "(", junk[verfields], ")" } else { print "Cannot find version:", fields[numfields] | "cat 2>&1" } diff --git a/autodeps/osf.prov b/autodeps/osf.prov index 1f0bf2a56..3d7c57b6b 100644 --- a/autodeps/osf.prov +++ b/autodeps/osf.prov @@ -1,7 +1,7 @@ #! /usr/bin/ksh -# Original Author: Tim Mooney (mooney@plains.nodak.edu) -# $Id: osf.prov,v 1.4 1999/08/21 23:23:12 mooney Exp $ +# Original Author: Tim Mooney <mooney@golem.phys.ndsu.NoDak.edu> +# $Id: osf.prov,v 1.7 2000/10/31 20:47:23 mooney Exp $ # # This file is distributed under the terms of the GNU Public License # @@ -10,8 +10,10 @@ # shared libraries provided by (contained in) the package. # # -# On Digital Unix (OSF1), use `odump -D' to find what libraries a package -# provides +# On Digital/Tru64 Unix (OSF1), use `odump -D' to find what libraries a +# package provides. Note that Tru64 Unix 5.x and later come with `ldd', +# but sticking with `odump' works with versions of the OS back to at least +# 3.x, so it's the preferred method. # # Example `odump -D' output: # @@ -59,6 +61,14 @@ PATH=/usr/bin:/usr/sbin:/sbin:/usr/ccs/bin export PATH # +# TVM: Marc Stephenson (marc@austin.ibm.com) points out we run things +# like `file', et. al. and expect the output to be what we see in the +# C/POSIX locale. Make sure it is so. +# +LANG=C +export LANG + +# # Use `while read ...' instead of a `for f in ...', because there may # be too many files to stuff into one shell variable. # @@ -81,17 +91,6 @@ do found_soname = 0; found_iversion = 0; - # - # 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-requires, too. - # - soname_version_delimiter="."; } # Uncomment the next line for some debugging info. @@ -108,7 +107,7 @@ do # possibly in addition to the versioning info in the # versions field) and generate a warning here. Shared # libraries should not be built with version info in - # the soname on Digital Unix. + # the soname on Digital/Tru64 Unix. # } else { # @@ -132,7 +131,7 @@ do numfields = split(version, versions, ":") if (numfields > 1) { for (i = 1; i < numfields; i++) { - print soname, soname_version_delimiter, versions[i] + print soname, "(", versions[i], ")" } # # let our END routine print out the *last* version @@ -172,7 +171,7 @@ do # Uncomment the next line for debugging info #{ print "END: NR: ", NR } if ( (found_soname == 1) && (found_iversion == 1) ) { - print soname, soname_version_delimiter, version + print soname, "(", version, ")" exit } else if (found_soname == 1) { # diff --git a/autodeps/osf.req b/autodeps/osf.req index 73abf5c75..c25a4eaad 100644 --- a/autodeps/osf.req +++ b/autodeps/osf.req @@ -1,7 +1,7 @@ #! /usr/bin/ksh -# Original Author: Tim Mooney (mooney@plains.nodak.edu) -# $Id: osf.req,v 1.7 1999/09/30 00:22:15 jbj Exp $ +# Original Author: Tim Mooney <mooney@golem.phys.ndsu.NoDak.edu> +# $Id: osf.req,v 1.8 2000/12/02 16:52:14 jbj Exp $ # # This file is distributed under the terms of the GNU Public License # @@ -9,9 +9,11 @@ # reads a list of full pathnames (in a package) on stdin, and outputs all # shared libraries the package requires to execute. # -# On Digital Unix (OSF1), use `odump -Dl' to find the library dependencies -# for an executable. `odump -D' does most of what we need, but it doesn't -# give us library version information, so you must use `odump -Dl' +# On Digital/Tru64 Unix (OSF1), use `odump -Dl' to find the library +# dependencies for an executable. `odump -D' does most of what we need, +# but it doesn't give us library version information, so you must use +# `odump -Dl'. Note that Tru64 5.x and on have `ldd', but this works just +# as well, and works on older versions of the OS. # # Example `odump -Dl' output: # @@ -36,6 +38,14 @@ PATH=/usr/bin:/usr/sbin:/sbin:/usr/ccs/bin export PATH # +# TVM: Marc Stephenson (marc@austin.ibm.com) points out we run things +# like `file', et. al. and expect the output to be what we see in the +# C/POSIX locale. Make sure it is so. +# +LANG=C +export LANG + +# # TVM: switch to using `while read ...' instead of `for f in ...', because # packages with a large number of files could be too big for one shell variable # to hold. @@ -88,8 +98,9 @@ do | awk ' # - # For you non-awk-ers, no single quotes in comments -- the shell - # sees them and things get hosed. + # Since this entire awk script is enclosed in single quotes, + # you need to be careful to not use single quotes, even in awk + # comments, if you modify this script. # BEGIN { @@ -97,17 +108,6 @@ do FS = " "; RS = "\n"; 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 @@ -124,19 +124,7 @@ do if (numfields == 7) { print fields[1] } else if (numfields == 8) { - # - # Note that if a library contains a number as the last - # part of the soname *and* it contains version information, - # we have a problem because it is impossible to tell where - # the soname ends and the version info begins. Digital - # Unix 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], soname_version_delimiter, fields[8] + print fields[1], "(", fields[8], ")" } } |