great removal
This commit is contained in:
parent
19e6de9d5e
commit
6795a36bb1
34
.cvsignore
34
.cvsignore
@ -1,34 +0,0 @@
|
||||
.deps
|
||||
.depend
|
||||
.depend-done
|
||||
.libs
|
||||
Doxyfile
|
||||
Makefile
|
||||
Makefile.in
|
||||
apidocs
|
||||
config.cache
|
||||
config.guess
|
||||
config.h
|
||||
config.h.in
|
||||
config.log
|
||||
config.status
|
||||
config.sub
|
||||
configure
|
||||
doxygen
|
||||
find-requires
|
||||
find-provides
|
||||
lib-rpmrc
|
||||
libtool
|
||||
ltconfig
|
||||
ltmain.sh
|
||||
macros
|
||||
platform
|
||||
rpm
|
||||
rpm[a-z]
|
||||
rpm2cpio
|
||||
rpmconvert
|
||||
rpmpopt
|
||||
rpmrc
|
||||
stamp-h
|
||||
stamp-h.in
|
||||
rpm-*.tar.gz
|
226
ABOUT-NLS
226
ABOUT-NLS
@ -1,226 +0,0 @@
|
||||
Notes on the Free Translation Project
|
||||
*************************************
|
||||
|
||||
Free software is going international! The Free Translation Project
|
||||
is a way to get maintainers of free software, translators, and users all
|
||||
together, so that will gradually become able to speak many languages.
|
||||
A few packages already provide translations for their messages.
|
||||
|
||||
If you found this `ABOUT-NLS' file inside a distribution, you may
|
||||
assume that the distributed package does use GNU `gettext' internally,
|
||||
itself available at your nearest GNU archive site. But you do *not*
|
||||
need to install GNU `gettext' prior to configuring, installing or using
|
||||
this package with messages translated.
|
||||
|
||||
Installers will find here some useful hints. These notes also
|
||||
explain how users should proceed for getting the programs to use the
|
||||
available translations. They tell how people wanting to contribute and
|
||||
work at translations should contact the appropriate team.
|
||||
|
||||
When reporting bugs in the `intl/' directory or bugs which may be
|
||||
related to internationalization, you should tell about the version of
|
||||
`gettext' which is used. The information can be found in the
|
||||
`intl/VERSION' file, in internationalized packages.
|
||||
|
||||
One advise in advance
|
||||
=====================
|
||||
|
||||
If you want to exploit the full power of internationalization, you
|
||||
should configure it using
|
||||
|
||||
./configure --with-included-gettext
|
||||
|
||||
to force usage of internationalizing routines provided within this
|
||||
package, despite the existence of internationalizing capabilities in the
|
||||
operating system where this package is being installed. So far, only
|
||||
the `gettext' implementation in the GNU C library version 2 provides as
|
||||
many features (such as locale alias or message inheritance) as the
|
||||
implementation here. It is also not possible to offer this additional
|
||||
functionality on top of a `catgets' implementation. Future versions of
|
||||
GNU `gettext' will very likely convey even more functionality. So it
|
||||
might be a good idea to change to GNU `gettext' as soon as possible.
|
||||
|
||||
So you need not provide this option if you are using GNU libc 2 or
|
||||
you have installed a recent copy of the GNU gettext package with the
|
||||
included `libintl'.
|
||||
|
||||
INSTALL Matters
|
||||
===============
|
||||
|
||||
Some packages are "localizable" when properly installed; the
|
||||
programs they contain can be made to speak your own native language.
|
||||
Most such packages use GNU `gettext'. Other packages have their own
|
||||
ways to internationalization, predating GNU `gettext'.
|
||||
|
||||
By default, this package will be installed to allow translation of
|
||||
messages. It will automatically detect whether the system provides
|
||||
usable `catgets' (if using this is selected by the installer) or
|
||||
`gettext' functions. If neither is available, the GNU `gettext' own
|
||||
library will be used. This library is wholly contained within this
|
||||
package, usually in the `intl/' subdirectory, so prior installation of
|
||||
the GNU `gettext' package is *not* required. Installers may use
|
||||
special options at configuration time for changing the default
|
||||
behaviour. The commands:
|
||||
|
||||
./configure --with-included-gettext
|
||||
./configure --with-catgets
|
||||
./configure --disable-nls
|
||||
|
||||
will respectively bypass any pre-existing `catgets' or `gettext' to use
|
||||
the internationalizing routines provided within this package, enable
|
||||
the use of the `catgets' functions (if found on the locale system), or
|
||||
else, *totally* disable translation of messages.
|
||||
|
||||
When you already have GNU `gettext' installed on your system and run
|
||||
configure without an option for your new package, `configure' will
|
||||
probably detect the previously built and installed `libintl.a' file and
|
||||
will decide to use this. This might be not what is desirable. You
|
||||
should use the more recent version of the GNU `gettext' library. I.e.
|
||||
if the file `intl/VERSION' shows that the library which comes with this
|
||||
package is more recent, you should use
|
||||
|
||||
./configure --with-included-gettext
|
||||
|
||||
to prevent auto-detection.
|
||||
|
||||
By default the configuration process will not test for the `catgets'
|
||||
function and therefore they will not be used. The reasons are already
|
||||
given above: the emulation on top of `catgets' cannot provide all the
|
||||
extensions provided by the GNU `gettext' library. If you nevertheless
|
||||
want to use the `catgets' functions use
|
||||
|
||||
./configure --with-catgets
|
||||
|
||||
to enable the test for `catgets' (this causes no harm if `catgets' is
|
||||
not available on your system). If you really select this option we
|
||||
would like to hear about the reasons because we cannot think of any
|
||||
good one ourself.
|
||||
|
||||
Internationalized packages have usually many `po/LL.po' files, where
|
||||
LL gives an ISO 639 two-letter code identifying the language. Unless
|
||||
translations have been forbidden at `configure' time by using the
|
||||
`--disable-nls' switch, all available translations are installed
|
||||
together with the package. However, the environment variable `LINGUAS'
|
||||
may be set, prior to configuration, to limit the installed set.
|
||||
`LINGUAS' should then contain a space separated list of two-letter
|
||||
codes, stating which languages are allowed.
|
||||
|
||||
Using This Package
|
||||
==================
|
||||
|
||||
As a user, if your language has been installed for this package, you
|
||||
only have to set the `LANG' environment variable to the appropriate
|
||||
ISO 639 `LL' two-letter code prior to using the programs in the
|
||||
package. For example, let's suppose that you speak German. At the
|
||||
shell prompt, merely execute `setenv LANG de' (in `csh'),
|
||||
`export LANG; LANG=de' (in `sh') or `export LANG=de' (in `bash'). This
|
||||
can be done from your `.login' or `.profile' file, once and for all.
|
||||
|
||||
An operating system might already offer message localization for
|
||||
many of its programs, while other programs have been installed locally
|
||||
with the full capabilities of GNU `gettext'. Just using `gettext'
|
||||
extended syntax for `LANG' would break proper localization of already
|
||||
available operating system programs. In this case, users should set
|
||||
both `LANGUAGE' and `LANG' variables in their environment, as programs
|
||||
using GNU `gettext' give preference to `LANGUAGE'. For example, some
|
||||
Swedish users would rather read translations in German than English for
|
||||
when Swedish is not available. This is easily accomplished by setting
|
||||
`LANGUAGE' to `sv:de' while leaving `LANG' to `sv'.
|
||||
|
||||
Translating Teams
|
||||
=================
|
||||
|
||||
For the Free Translation Project to be a success, we need interested
|
||||
people who like their own language and write it well, and who are also
|
||||
able to synergize with other translators speaking the same language.
|
||||
Each translation team has its own mailing list, courtesy of Linux
|
||||
International. You may reach your translation team at the address
|
||||
`LL@li.org', replacing LL by the two-letter ISO 639 code for your
|
||||
language. Language codes are *not* the same as the country codes given
|
||||
in ISO 3166. The following translation teams exist, as of December
|
||||
1997:
|
||||
|
||||
Chinese `zh', Czech `cs', Danish `da', Dutch `nl', English `en',
|
||||
Esperanto `eo', Finnish `fi', French `fr', German `de', Hungarian
|
||||
`hu', Irish `ga', Italian `it', Indonesian `id', Japanese `ja',
|
||||
Korean `ko', Latin `la', Norwegian `no', Persian `fa', Polish
|
||||
`pl', Portuguese `pt', Russian `ru', Slovenian `sl', Spanish `es',
|
||||
Swedish `sv', and Turkish `tr'.
|
||||
|
||||
For example, you may reach the Chinese translation team by writing to
|
||||
`zh@li.org'.
|
||||
|
||||
If you'd like to volunteer to *work* at translating messages, you
|
||||
should become a member of the translating team for your own language.
|
||||
The subscribing address is *not* the same as the list itself, it has
|
||||
`-request' appended. For example, speakers of Swedish can send a
|
||||
message to `sv-request@li.org', having this message body:
|
||||
|
||||
subscribe
|
||||
|
||||
Keep in mind that team members are expected to participate
|
||||
*actively* in translations, or at solving translational difficulties,
|
||||
rather than merely lurking around. If your team does not exist yet and
|
||||
you want to start one, or if you are unsure about what to do or how to
|
||||
get started, please write to `translation@iro.umontreal.ca' to reach the
|
||||
coordinator for all translator teams.
|
||||
|
||||
The English team is special. It works at improving and uniformizing
|
||||
the terminology in use. Proven linguistic skill are praised more than
|
||||
programming skill, here.
|
||||
|
||||
Available Packages
|
||||
==================
|
||||
|
||||
Languages are not equally supported in all packages. The following
|
||||
matrix shows the current state of internationalization, as of December
|
||||
1997. The matrix shows, in regard of each package, for which languages
|
||||
PO files have been submitted to translation coordination.
|
||||
|
||||
Ready PO files cs da de en es fi fr it ja ko nl no pl pt ru sl sv
|
||||
.----------------------------------------------------.
|
||||
bash | [] [] [] | 3
|
||||
bison | [] [] [] | 3
|
||||
clisp | [] [] [] [] | 4
|
||||
cpio | [] [] [] [] [] [] | 6
|
||||
diffutils | [] [] [] [] [] | 5
|
||||
enscript | [] [] [] [] [] [] | 6
|
||||
fileutils | [] [] [] [] [] [] [] [] [] [] | 10
|
||||
findutils | [] [] [] [] [] [] [] [] [] | 9
|
||||
flex | [] [] [] [] | 4
|
||||
gcal | [] [] [] [] [] | 5
|
||||
gettext | [] [] [] [] [] [] [] [] [] [] [] | 12
|
||||
grep | [] [] [] [] [] [] [] [] [] [] | 10
|
||||
hello | [] [] [] [] [] [] [] [] [] [] [] | 11
|
||||
id-utils | [] [] [] | 3
|
||||
indent | [] [] [] [] [] | 5
|
||||
libc | [] [] [] [] [] [] [] | 7
|
||||
m4 | [] [] [] [] [] [] | 6
|
||||
make | [] [] [] [] [] [] | 6
|
||||
music | [] [] | 2
|
||||
ptx | [] [] [] [] [] [] [] [] | 8
|
||||
recode | [] [] [] [] [] [] [] [] [] | 9
|
||||
sh-utils | [] [] [] [] [] [] [] [] | 8
|
||||
sharutils | [] [] [] [] [] [] | 6
|
||||
tar | [] [] [] [] [] [] [] [] [] [] [] | 11
|
||||
texinfo | [] [] [] | 3
|
||||
textutils | [] [] [] [] [] [] [] [] [] | 9
|
||||
wdiff | [] [] [] [] [] [] [] [] | 8
|
||||
`----------------------------------------------------'
|
||||
17 languages cs da de en es fi fr it ja ko nl no pl pt ru sl sv
|
||||
27 packages 6 4 25 1 18 1 26 2 1 12 20 9 19 7 4 7 17 179
|
||||
|
||||
Some counters in the preceding matrix are higher than the number of
|
||||
visible blocks let us expect. This is because a few extra PO files are
|
||||
used for implementing regional variants of languages, or language
|
||||
dialects.
|
||||
|
||||
For a PO file in the matrix above to be effective, the package to
|
||||
which it applies should also have been internationalized and
|
||||
distributed as such by its maintainer. There might be an observable
|
||||
lag between the mere existence a PO file and its wide availability in a
|
||||
distribution.
|
||||
|
||||
If December 1997 seems to be old, you may fetch a more recent copy
|
||||
of this `ABOUT-NLS' file on most GNU archive sites.
|
||||
|
14
Makefile.am
14
Makefile.am
@ -2,14 +2,13 @@
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.4 foreign
|
||||
|
||||
EXTRA_DIST = CHANGES CREDITS Doxyheader GROUPS README.amiga INSTALL \
|
||||
RPM-GPG-KEY RPM-PGP-KEY \
|
||||
autodeps/none autodeps/*.prov autodeps/*.req autogen.sh \
|
||||
config.site gendiff installplatform platform* \
|
||||
EXTRA_DIST = CHANGES CREDITS Doxyheader GROUPS INSTALL \
|
||||
autodeps/*.prov autodeps/*.req \
|
||||
gendiff installplatform platform* \
|
||||
po/*.in po/*.po po/rpm.pot \
|
||||
rpm.magic rpmpopt-$(VERSION) rpmqv.c rpm.c
|
||||
rpmpopt-$(VERSION) rpmqv.c
|
||||
|
||||
SUBDIRS = po rpmio rpmdb lib build @WITH_PYTHON_SUBDIR@ tools scripts tests doc .
|
||||
SUBDIRS = po rpmio rpmdb lib build @WITH_PYTHON_SUBDIR@ tools scripts doc .
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir)/build \
|
||||
@ -32,8 +31,7 @@ bin_SCRIPTS = gendiff
|
||||
pkglibdir = @RPMCONFIGDIR@
|
||||
pkglib_PROGRAMS = rpmb rpmd rpmi rpmk rpmq
|
||||
pkglib_DATA = rpmrc rpmpopt-$(VERSION) macros
|
||||
pkglib_SCRIPTS = find-provides find-requires mkinstalldirs \
|
||||
config.guess config.sub config.site
|
||||
pkglib_SCRIPTS = find-provides find-requires
|
||||
|
||||
rpmpopt-$(VERSION): rpmpopt
|
||||
cp rpmpopt $@
|
||||
|
56
README.amiga
56
README.amiga
@ -1,56 +0,0 @@
|
||||
This is the readme for RPM version 2.2.9, written by
|
||||
<Kristof.Depraetere@rug.ac.be>
|
||||
|
||||
1 Requirements.
|
||||
|
||||
First make sure you have at least IXEmul v45.0 installed.
|
||||
These packages are needed to be able to compile rpm:
|
||||
* gettext
|
||||
* gdbm
|
||||
* zlib
|
||||
|
||||
These extra packages are needed to run rpm:
|
||||
* cpio
|
||||
|
||||
2 Installation.
|
||||
|
||||
These are the things you'll have to do to install this package.
|
||||
|
||||
* cd <your-build-directory>
|
||||
* tar -xzvf rpm-2.2.9-src.tar.gz
|
||||
* cd rpm-2.2.9
|
||||
* configure --prefix=/gg
|
||||
* make
|
||||
* make install
|
||||
|
||||
Now it's time to edit the file "gg:lib/rpmrc" to correspond to your
|
||||
system setup. Change the following entry:
|
||||
* topdir: /place/to/store/RPM/packages
|
||||
Make sure <tmppath> points to a _harddisk_ directory (the ram disk doesn't
|
||||
allow the use of softlinks):
|
||||
* tmppath: /place/on/your/hard/disk
|
||||
Add the following entry:
|
||||
* builddir: /place/where/RPM/will/build/packages
|
||||
|
||||
It is recommended to let <topdir> and <builddir> point to two different
|
||||
partitions.
|
||||
|
||||
Now create the following directories in <topdir>:
|
||||
* RPMS
|
||||
* RPMS/m68k
|
||||
* SOURCES
|
||||
* SRPMS
|
||||
* SPECS
|
||||
|
||||
Create the "rpm" directory in "gg:lib".
|
||||
makedir gg:lib/rpm
|
||||
|
||||
Now it's time to initialise the rpm database with:
|
||||
rpm --initdb
|
||||
|
||||
3 Problems and bugs.
|
||||
|
||||
Please contact me <Kristof.Depraetere@rug.ac.be> if you experience
|
||||
any problems with or find bugs in this package.
|
||||
|
||||
Please remember: "A bug not know of is a bug not fixed".
|
34
RPM-GPG-KEY
34
RPM-GPG-KEY
@ -1,34 +0,0 @@
|
||||
The following public key can be used to verify RPM packages built and
|
||||
signed by Red Hat Software using `rpm -K' using the GNU GPG package.
|
||||
Questions about this key should be sent to security@redhat.com.
|
||||
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: GnuPG v1.0.0 (GNU/Linux)
|
||||
Comment: For info see http://www.gnupg.org
|
||||
|
||||
mQGiBDfqVDgRBADBKr3Bl6PO8BQ0H8sJoD6p9U7Yyl7pjtZqioviPwXP+DCWd4u8
|
||||
HQzcxAZ57m8ssA1LK1Fx93coJhDzM130+p5BG9mYSWShLabR3N1KXdXQYYcowTOM
|
||||
GxdwYRGr1Spw8QydLhjVfU1VSl4xt6bupPbWJbyjkg5Z3P7BlUOUJmrx3wCgobNV
|
||||
EDGaWYJcch5z5B1of/41G8kEAKii6q7Gu/vhXXnLS6m15oNnPVybyngiw/23dKjS
|
||||
ZVG7rKANEK2mxg1VB+vc/uUc4k49UxJJfCZg1gu1sPFV3GSa+Y/7jsiLktQvCiLP
|
||||
lncQt1dV+ENmHR5BdIDPWDzKBVbgWnSDnqQ6KrZ7T6AlZ74VMpjGxxkWU6vV2xsW
|
||||
XCLPA/9P/vtImA8CZN3jxGgtK5GGtDNJ/cMhhuv5tnfwFg4b/VGo2Jr8mhLUqoIb
|
||||
E6zeGAmZbUpdckDco8D5fiFmqTf5+++pCEpJLJkkzel/32N2w4qzPrcRMCiBURES
|
||||
PjCLd4Y5rPoU8E4kOHc/4BuHN903tiCsCPloCrWsQZ7UdxfQ5LQiUmVkIEhhdCwg
|
||||
SW5jIDxzZWN1cml0eUByZWRoYXQuY29tPohVBBMRAgAVBQI36lQ4AwsKAwMVAwID
|
||||
FgIBAheAAAoJECGRgM3bQqYOsBQAnRVtg7B25Hm11PHcpa8FpeddKiq2AJ9aO8sB
|
||||
XmLDmPOEFI75mpTrKYHF6rkCDQQ36lRyEAgAokgI2xJ+3bZsk8jRA8ORIX8DH05U
|
||||
lMH27qFYzLbT6npXwXYIOtVn0K2/iMDj+oEB1Aa2au4OnddYaLWp06v3d+XyS0t+
|
||||
5ab2ZfIQzdh7wCwxqRkzR+/H5TLYbMG+hvtTdylfqIX0WEfoOXMtWEGSVwyUsnM3
|
||||
Jy3LOi48rQQSCKtCAUdV20FoIGWhwnb/gHU1BnmES6UdQujFBE6EANqPhp0coYoI
|
||||
hHJ2oIO8ujQItvvNaU88j/s/izQv5e7MXOgVSjKe/WX3s2JtB/tW7utpy12wh1J+
|
||||
JsFdbLV/t8CozUTpJgx5mVA3RKlxjTA+On+1IEUWioB+iVfT7Ov/0kcAzwADBQf9
|
||||
E4SKCWRand8K0XloMYgmipxMhJNnWDMLkokvbMNTUoNpSfRoQJ9EheXDxwMpTPwK
|
||||
ti/PYrrL2J11P2ed0x7zm8v3gLrY0cue1iSba+8glY+p31ZPOr5ogaJw7ZARgoS8
|
||||
BwjyRymXQp+8Dete0TELKOL2/itDOPGHW07SsVWOR6cmX4VlRRcWB5KejaNvdrE5
|
||||
4XFtOd04NMgWI63uqZc4zkRa+kwEZtmbz3tHSdRCCE+Y7YVP6IUf/w6YPQFQriWY
|
||||
FiA6fD10eB+BlIUqIw80VgjsBKmCwvKkn4jg8kibXgj4/TzQSx77uYokw1EqQ2wk
|
||||
OZoaEtcubsNMquuLCMWijYhGBBgRAgAGBQI36lRyAAoJECGRgM3bQqYOhyYAnj7h
|
||||
VDY/FJAGqmtZpwVp9IlitW5tAJ4xQApr/jNFZCTksnI+4O1765F7tA==
|
||||
=3AHZ
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
49
RPM-PGP-KEY
49
RPM-PGP-KEY
@ -1,49 +0,0 @@
|
||||
The following public key can be used to verify RPM packages built and
|
||||
signed by Red Hat Software using `rpm -K'. If anyone cares to sign
|
||||
this key, please send the signed key to security@redhat.com.
|
||||
|
||||
Type bits/keyID Date User ID
|
||||
pub 1024/CBA29BF9 1996/02/20 Red Hat Software, Inc. <redhat@redhat.com>
|
||||
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: 2.6.2
|
||||
|
||||
mQCNAzEpXjUAAAEEAKG4/V9oUSiDc9wIge6Bmg6erDGCLzmFyioAho8kDIJSrcmi
|
||||
F9qTdPq+fj726pgW1iSb0Y7syZn9Y2lgQm5HkPODfNi8eWyTFSxbr8ygosLRClTP
|
||||
xqHVhtInGrfZNLoSpv1LdWOme0yOpOQJnghdOMzKXpgf5g84vaUg6PHLopv5AAUR
|
||||
tCpSZWQgSGF0IFNvZnR3YXJlLCBJbmMuIDxyZWRoYXRAcmVkaGF0LmNvbT6JAJUD
|
||||
BRAyA5tUoyDApfg4JKEBAUzSA/9QdcVsu955vVyZDk8uvOXWV0X3voT9B3aYMFvj
|
||||
UNHUD6F1VFruwQHVKbGJEq1o5MOA6OXKR3vJZStXEMF47TWXJfQaflgl8ywZTH5W
|
||||
+eMlKau6Nr0labUV3lmsAE4Vsgu8NCkzIrp2wNVbeW2ZAXtrKswV+refLquUhp7l
|
||||
wMpH9IkAdQMFEDGttkRNdXhbO1TgGQEBAGoC/j6C22PqXIyqZc6fG6J6Jl/T5kFG
|
||||
xH1pKIzua5WCDDugAgnuOJgywa4pegT4UqwEZiMTAlwT6dmG1CXgKB+5V7lnCjDc
|
||||
JZLni0iztoe08ig6fJrjNGXljf7KYXzgwBftQokAlQMFEDMQzo2MRVM9rfPulQEB
|
||||
pLoD/1/MWv3u0Paiu14XRvDrBaJ7BmG2/48bA5vKOzpvvoNRO95YS7ZEtqErXA7Y
|
||||
DRO8+C8f6PAILMk7kCk4lNMscS/ZRzu5+J8cv4ejsFvxgJBBU3Zgp8AWdWOpvZ0I
|
||||
wW//HoDUGhOxlEtymljIMFBkj4SysHWhCBUfA9Xy86kouTJQiQCVAwUQMxDOQ50a
|
||||
feTWLUSJAQFnYQQAkt9nhMTeioREB1DvJt+vsFyOj//o3ThqK5ySEP3dgj62iaQp
|
||||
JrBmAe5XZPw25C/TXAf+x27H8h2QbKgq49VtsElFexc6wO+uq85fAPDdyE+2XyNE
|
||||
njGZkY/TP2F/jTB0sAwJO+xFCHmSYkcBjzxK/2LMD+O7rwp2UCUhhl9QhhqJAJUD
|
||||
BRAx5na6pSDo8cuim/kBARmjA/4lDVnV2h9KiNabp9oE38wmGgu5m5XgUHW8L6du
|
||||
iQDnwO5IgXN2vDpKGxbgtwv6iYYmGd8IRQ66uJvOsxSv3OR7J7LkCHuI2b/s0AZn
|
||||
c79DZaJ2ChUCZlbNQBMeEdrFWif9NopY+d5+2tby1onu9XOFMMvomxL3NhctElYR
|
||||
HC8Xw4kAlQMFEDHmdTtURTdEKY1MpQEBEtEEAMZbp1ZFrjiHkj2aLFC1S8dGRbSH
|
||||
GUdnLP9qLPFgmWekp9E0o8ZztALGVdqPfPF3N/JJ+AL4IMrfojd7+eZKw36Mdvtg
|
||||
dPI+Oz4sxHDbDynZ2qspD9Om5yYuxuz/Xq+9nO2IlsAnEYw3ag3cxat0kvxpOPRe
|
||||
Yy+vFpgfDNizr3MgiQBVAwUQMXNMXCjtrosVMemRAQEDnwH7BsJrnnh91nI54LAK
|
||||
Gcq3pr8ld0PAtWJmNRGQvUlpEMXUSnu59j2P1ogPNjL3PqKdVxk5Jqgcr8TPQMf3
|
||||
V4fqXokAlQMFEDFy+8YiEmsRQ3LyzQEB+TwD/03QDslXLg5F3zj4zf0yI6ikT0be
|
||||
5OhZv2pnkb80qgdHzFRxBOYmSoueRKdQJASd8F9ue4b3bmf/Y7ikiY0DblvxcXB2
|
||||
sz1Pu8i2Zn9u8SKuxNIoVvM8/STRVkgPfvL5QjAWMHT9Wvg81XcI2yXJzrt/2f2g
|
||||
mNpWIvVOOT85rVPIiQCVAwUQMVPRlBlzviMjNHElAQG1nwP/fpVX6nKRWJCSFeB7
|
||||
leZ4lb+y1uMsMVv0n7agjJVw13SXaA267y7VWCBlnhsCemxEugqEIkI4lu/1mgtw
|
||||
WPWSE0BOIVjj0AA8zp2T0H3ZCCMbiFAFJ1P2Gq2rKr8QrOb/08oH1lEzyz0j/jKh
|
||||
qiXAxdlB1wojQB6yLbHvTIe3rZGJAHUDBRAxKetfzauiKSJ6LJEBAed/AvsEiGgj
|
||||
TQzhsZcUuRNrQpV0cDGH9Mpril7P7K7yFIzju8biB+Cu6nEknSOHlMLl8usObVlk
|
||||
d8Wf14soHC7SjItiGSKtI8JhauzBJPl6fDDeyHGsJKo9f9adKeBMCipCFOuJAJUD
|
||||
BRAxKeqWRHFTaIK/x+0BAY6eA/4m5X4gs1UwOUIRnljo9a0cVs6ITL554J9vSCYH
|
||||
Zzd87kFwdf5W1Vd82HIkRzcr6cp33E3IDkRzaQCMVw2me7HePP7+4Ry2q3EeZMbm
|
||||
NE++VzkxjikzpRb2+F5nGB2UdsElkgbXinswebiuOwOrocLbz6JFdDsJPcT5gVfi
|
||||
z15FuA==
|
||||
=02KW
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
@ -1,78 +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.
|
||||
#
|
||||
|
||||
find_prov_ia64()
|
||||
{
|
||||
# On AIX for IA64, use the file command to find shared modules
|
||||
#
|
||||
# Example file output:
|
||||
#
|
||||
#$file /usr/lib/ia64l32/libc.so
|
||||
#/usr/lib/ia64l32/libc.so: ELF 32-bit LSB version 1 AIX shared obj IA-64
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
# Search for shared objects - the file command on AIX for IA64 reports
|
||||
# shared objects
|
||||
sed -e "s/['\"]/\\\&/g" -e "s/$/\//g" | LANG=C xargs file | grep -e ":.*shared obj" | cut -d: -f1 | sed "s/\/$//g" | xargs -i basename {} | sort -u
|
||||
}
|
||||
|
||||
find_prov_power()
|
||||
{
|
||||
#
|
||||
# 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
|
||||
|
||||
#
|
||||
#
|
||||
|
||||
# Search executables, archives, and symlinks to those types for shared
|
||||
# objects
|
||||
sed -e "s/['\"]/\\\&/g" -e "s/$/\//g" | LANG=C xargs file | grep -e ":.*executable" -e ":.*archive" | cut -d: -f1 | sed "s/\/$//g" |
|
||||
|
||||
# Use the verbose version of dump to find the sharable objects
|
||||
while read f
|
||||
do
|
||||
LANG=C /usr/bin/dump -ov $f/ 2>/dev/null | egrep "^Flags.*SHROBJ|:$" |
|
||||
awk 'match($1,":$") { member=$1 }
|
||||
!match($1,":$") {print member} '
|
||||
done | sed -e 's/:$//' -e 's/\/\[/\(/g' -e 's/\]/)/g' | xargs -i basename {} |
|
||||
sort -u
|
||||
}
|
||||
|
||||
PATH=/usr/bin
|
||||
|
||||
machinetype=`uname -m`
|
||||
if [[ $machinetype = "ia64" ]]
|
||||
then
|
||||
find_prov_ia64
|
||||
else
|
||||
find_prov_power
|
||||
fi
|
||||
|
171
autodeps/aix.req
171
autodeps/aix.req
@ -1,171 +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.
|
||||
#
|
||||
|
||||
find_req_power ()
|
||||
{
|
||||
# On AIX Power, 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
|
||||
|
||||
#
|
||||
#
|
||||
|
||||
while read f
|
||||
do
|
||||
# Find the required symbols in executables and the required shells in
|
||||
# scripts
|
||||
LANG=C /usr/bin/file $f | /usr/bin/grep -q -e ":.*shell script"
|
||||
|
||||
if [ $? -ne 0 ] # Use dump to examine executables
|
||||
then
|
||||
LANG=C /usr/bin/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 {
|
||||
if ((fields[namevar] != ".") && (fields[namevar] != "..")) {
|
||||
print fields[namevar]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
in_file_strings == 1 && $1 == "0" {
|
||||
in_shlib_list = 1
|
||||
}
|
||||
|
||||
/\*Import File Strings\*/ {
|
||||
in_file_strings = 1
|
||||
}
|
||||
' # end of awk
|
||||
else # shell scripts
|
||||
if [ -x $f ]; then
|
||||
/usr/bin/head -1 $f | /usr/bin/sed -e 's/^\#\![ ]*//' | /usr/bin/cut -d" " -f1
|
||||
fi
|
||||
fi
|
||||
done | sort -u
|
||||
}
|
||||
|
||||
find_req_ia64 ()
|
||||
{
|
||||
# On AIX IA64, use `dump -Lv' to find the library dependencies
|
||||
# for an executable
|
||||
#
|
||||
# Example dump output:
|
||||
#
|
||||
#$dump -Lv /usr/bin/dump
|
||||
#
|
||||
#
|
||||
#/usr/bin/dump:
|
||||
#
|
||||
# **** DYNAMIC SECTION INFORMATION ****
|
||||
#[INDEX] Tag Value
|
||||
#
|
||||
#.dynamic:
|
||||
#[1] NEEDED libC.so.1
|
||||
#[2] NEEDED libelf.so
|
||||
#[3] NEEDED /usr/lib/ia64l32/libc.so.1
|
||||
#[4] INIT 0x1001d6c0
|
||||
#[5] FINI 0x1001d700
|
||||
#[6] HASH 0x1000011c
|
||||
#[7] STRTAB 0x10000914
|
||||
#[8] SYMTAB 0x10000364
|
||||
#[9] STRSZ 0x3dd
|
||||
#[10] SYMENT 0x10
|
||||
#[11] PLTGOT 0x20018994
|
||||
#[12] PLT_RESERVE 0x20018a00
|
||||
#[13] PLTSZ 0x1c0
|
||||
#[14] PLTREL REL
|
||||
#[15] JMPREL 0x100024bc
|
||||
#[16] REL 0x10000cf4
|
||||
#[17] RELSZ 0x17c8
|
||||
#[18] RELENT 0x8
|
||||
#
|
||||
#
|
||||
|
||||
while read f
|
||||
do
|
||||
# Find the required symbols in executables and the required shells in
|
||||
# scripts
|
||||
LANG=C /usr/bin/file $f | /usr/bin/grep -q -e ":.*shell script"
|
||||
|
||||
if [ $? -ne 0 ] # Use dump to examine executables
|
||||
then
|
||||
LANG=C /usr/bin/dump -Lv $f 2>/dev/null | \
|
||||
awk '$2=="NEEDED" {print $3}' | xargs -i basename {}
|
||||
|
||||
else # Extract the exec module from shell scripts
|
||||
if [ -x $f ]; then
|
||||
head -1 $f | sed -e 's/^\#\![ ]*//' | cut -d" " -f1
|
||||
fi
|
||||
fi
|
||||
done | sort -u
|
||||
}
|
||||
|
||||
machinetype=`uname -m`
|
||||
if [[ $machinetype = "ia64" ]]
|
||||
then
|
||||
/usr/bin/sed "s/['\"]/\\\&/g" | LANG=C /usr/bin/xargs /usr/bin/file | \
|
||||
/usr/bin/grep -e ":.*executable" -e ":.*archive" -e ":.*shell script" | /usr/bin/cut -d: -f1 |
|
||||
find_req_ia64
|
||||
else
|
||||
/usr/bin/sed "s/['\"]/\\\&/g" | LANG=C /usr/bin/xargs /usr/bin/file | \
|
||||
/usr/bin/grep -e ":.*executable" -e ":.*archive" -e ":.*shell script" | /usr/bin/cut -d: -f1 |
|
||||
find_req_power
|
||||
fi
|
||||
|
@ -1,189 +0,0 @@
|
||||
#! /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
|
@ -1,99 +0,0 @@
|
||||
#! /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
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
cat > /dev/null
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
cat > /dev/null
|
@ -1,9 +0,0 @@
|
||||
#!/bin/sh
|
||||
# ----------------------------------------------------------
|
||||
# find-provides for FreeBSD-2.2.x
|
||||
# ----------------------------------------------------------
|
||||
filelist=$(grep "\\.so" | grep -v "^/lib/ld.so" | xargs file -L 2>/dev/null | grep "FreeBSD.*shared" | cut -d: -f1)
|
||||
|
||||
for f in $filelist; do
|
||||
echo ${f##*/}
|
||||
done | sort -u
|
@ -1,22 +0,0 @@
|
||||
#!/bin/sh
|
||||
# ----------------------------------------------------------------
|
||||
# find-requires for FreeBSD-2.2.x
|
||||
# how do we know what is required by a.out shared libraries?
|
||||
# ----------------------------------------------------------------
|
||||
ulimit -c 0
|
||||
|
||||
filelist=`sed "s/['\"]/\\\&/g"`
|
||||
exelist=`echo $filelist | xargs file | fgrep executable | cut -d: -f1 `
|
||||
scriptlist=`echo $filelist | xargs file | egrep ":.* (commands|script) " | cut -d: -f1 `
|
||||
|
||||
for f in $exelist; do
|
||||
if [ -x $f ]; then
|
||||
ldd $f | /usr/bin/awk '/=>/&&!/not found/ { print $3 }'
|
||||
fi
|
||||
done | sort -u | sed "s/['\"]/\\\&/g" | xargs -n 1 basename | sort -u
|
||||
|
||||
for f in $scriptlist; do
|
||||
if [ -x $f ]; then
|
||||
head -1 $f | sed -e 's/^\#\![ ]*//' | cut -d" " -f1
|
||||
fi
|
||||
done | sort -u
|
@ -1,9 +0,0 @@
|
||||
#!/bin/sh
|
||||
# ----------------------------------------------------------
|
||||
# find-provides for FreeBSD >= 3.3
|
||||
# ----------------------------------------------------------
|
||||
filelist=$(grep "\\.so" | grep -v "^/lib/ld.so" | xargs file -L 2>/dev/null | grep "ELF.*shared" | cut -d: -f1)
|
||||
|
||||
for f in $filelist; do
|
||||
echo ${f##*/}
|
||||
done | sort -u
|
@ -1,46 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# note this works for both a.out and ELF executables
|
||||
# it also auto-generates requirment lines for shell scripts
|
||||
|
||||
ulimit -c 0
|
||||
|
||||
filelist=`sed "s/['\"]/\\\&/g"`
|
||||
exelist=`if test "x$filelist" != x; then echo $filelist | xargs file | grep ":.*executable" | cut -d: -f1; fi`
|
||||
scriptlist=`if test "x$filelist" != x; then echo $filelist | xargs file | egrep ":.* (commands|script) " | cut -d: -f1; fi`
|
||||
liblist=`if test "x$filelist" != x; then echo $filelist | xargs file | grep ":.*shared object" | cut -d : -f1; fi`
|
||||
|
||||
LDDLIST=`for f in $exelist; do
|
||||
if [ -x $f ]; then
|
||||
ldd $f | awk '/=>/ { print $1 }'
|
||||
fi
|
||||
done | sort -u | sed "s/['\"]/\\\&/g"`
|
||||
if test "x$LDDLIST" != x; then
|
||||
echo $LDDLIST | xargs -n 1 basename | grep -v 'libNoVersion.so' | sort -u
|
||||
fi
|
||||
|
||||
LDDLIST=`for f in $liblist; do
|
||||
ldd $f | awk '/=>/ { print $1 }'
|
||||
done | sort -u | sed "s/['\"]/\\\&/g"`
|
||||
if test "x$LDDLIST" != x; then
|
||||
echo $LDDLIST | xargs -n 1 basename | grep -v 'libNoVersion.so' | sort -u
|
||||
fi
|
||||
|
||||
for f in $scriptlist; do
|
||||
if [ -x $f ]; then
|
||||
head -1 $f | sed -e 's/^\#\![ ]*//' | cut -d" " -f1
|
||||
fi
|
||||
done | sort -u
|
||||
|
||||
for f in $liblist $exelist ; do
|
||||
objdump -p $f | awk '
|
||||
BEGIN { START=0; LIBNAME=""; }
|
||||
/Version References:/ { START=1; }
|
||||
/required from/ && (START==1) {
|
||||
sub(/:/, "", $3);
|
||||
LIBNAME=$3;
|
||||
}
|
||||
(START==1) && (LIBNAME!="") && ($4~/^GLIBC_*/) { print LIBNAME "(" $4 ")"; }
|
||||
/^$/ { START=0; }
|
||||
'
|
||||
done | sort -u
|
@ -1,174 +0,0 @@
|
||||
#! /usr/bin/ksh
|
||||
|
||||
# Original Author: Tim Mooney <mooney@golem.phys.ndsu.NoDak.edu>
|
||||
#
|
||||
# This file is distributed under the terms of the GNU Public License
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
#
|
||||
# On HP-UX, use `chatr' to find what libraries a package provides
|
||||
#
|
||||
# Example chatr output:
|
||||
#
|
||||
#$chatr /usr/lib/libc.sl
|
||||
#
|
||||
#/usr/lib/libc.sl:
|
||||
# shared library
|
||||
# shared library dynamic path search:
|
||||
# SHLIB_PATH disabled second
|
||||
# embedded path disabled first Not Defined
|
||||
# internal name:
|
||||
# libc.1
|
||||
# shared library list:
|
||||
# dynamic /usr/lib/libdld.1
|
||||
# static branch prediction disabled
|
||||
# kernel assisted branch predictionenabled
|
||||
# lazy swap allocationdisabled
|
||||
# text segment lockingdisabled
|
||||
# data segment lockingdisabled
|
||||
# data page size: 4K
|
||||
# instruction page size: 4K
|
||||
#
|
||||
|
||||
#
|
||||
# Implementation notes: some of the system libraries are built without an
|
||||
# `internal name' (HP-UX's equivalent to a SONAME), so I need to track what
|
||||
# chatr outputs as its first line. We'll use the basename of that line in
|
||||
# the event of no internal name.
|
||||
#
|
||||
|
||||
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.
|
||||
#
|
||||
IFS=""
|
||||
while read f
|
||||
do
|
||||
# It's possible that I should be testing to make sure that the file
|
||||
# we're trying isn't a symlink, and skipping it if it is, because of
|
||||
# the possible odd situation where we could have a link to a library
|
||||
# with no internal name. This would need more investigation, though.
|
||||
chatr $f 2>/dev/null \
|
||||
| awk '
|
||||
|
||||
BEGIN {
|
||||
FS = " ";
|
||||
RS = "\n";
|
||||
|
||||
# This flag signfies that we have seen the internal name:
|
||||
# marker. Once we see that, we set the flag to 1. The next
|
||||
# line we read should contain the library internal name, the
|
||||
# SOM equivalent of an soname. At that point we set the flag
|
||||
# found_internal_name to 1 and exit
|
||||
# the main body of the awk script, going through the END
|
||||
in_internal_name = 0;
|
||||
|
||||
#
|
||||
# We have seen the internal name: section (yet)?
|
||||
#
|
||||
found_internal_name = 0;
|
||||
|
||||
#
|
||||
# assume it is a shared library, until record 2 proves us wrong.
|
||||
#
|
||||
isa_shared_library = 1;
|
||||
}
|
||||
|
||||
# Uncomment the next line for some debugging info.
|
||||
#{ print NR , ":", $0 }
|
||||
|
||||
#
|
||||
# save the first line in case there is no internal name built
|
||||
# into this object.
|
||||
#
|
||||
NR == 1 {
|
||||
my_name = $0
|
||||
opened_something = 1;
|
||||
}
|
||||
|
||||
#
|
||||
# Check the second line (record). Clear the flag if it is not a
|
||||
# shared library.
|
||||
#
|
||||
NR == 2 && $0 !~ /^[ ]+shared library[ ]*$/ {
|
||||
# It is not a shared library. Bow out early
|
||||
isa_shared_library = 0;
|
||||
exit
|
||||
}
|
||||
|
||||
in_internal_name == 1 {
|
||||
|
||||
# We found the library internal name. If it does not contain
|
||||
# a path, print it. At least a couple of the system libraries
|
||||
# have a full path as the internal name (this is probably a bug).
|
||||
|
||||
if ( $0 ~ /\// ) {
|
||||
numfields = split($0, internal_name, "/")
|
||||
print internal_name[numfields]
|
||||
} else {
|
||||
print $1
|
||||
}
|
||||
|
||||
#
|
||||
# Set a flag for the EXIT section, to indicate that we found
|
||||
# an internal name
|
||||
#
|
||||
found_internal_name = 1;
|
||||
in_internal_name = 0
|
||||
exit
|
||||
}
|
||||
|
||||
#
|
||||
# we have hit the internal name section. Set the flag. The next
|
||||
# line should be what we are looking for.
|
||||
#
|
||||
/^ +internal name: *$/ {
|
||||
in_internal_name = 1
|
||||
}
|
||||
|
||||
END {
|
||||
# Uncomment the next line for debugging info
|
||||
#{ print "END: NR: ", NR }
|
||||
if ( (isa_shared_library == 0) || (NR < 2) ) {
|
||||
# both of these indicate error conditions, for which we
|
||||
# should not generate any output.
|
||||
exit;
|
||||
} else {
|
||||
if (found_internal_name == 1) {
|
||||
exit;
|
||||
} else {
|
||||
#
|
||||
# chop the : off the end of the line
|
||||
#
|
||||
colon = index(my_name, ":")
|
||||
colon = colon - 1
|
||||
temp = substr(my_name, 1, colon)
|
||||
#
|
||||
# get the basename
|
||||
#
|
||||
numfields = split(temp, basename, "/")
|
||||
# Uncomment the next line for debugging info
|
||||
#print "In END:", numfields, ":", temp
|
||||
print basename[numfields]
|
||||
exit
|
||||
}
|
||||
}
|
||||
}
|
||||
' # end of awk
|
||||
done | sort -u
|
||||
#comment out the previous line and uncomment the next line when debugging
|
||||
#done
|
@ -1,125 +0,0 @@
|
||||
#! /usr/bin/ksh
|
||||
|
||||
# Original Author: Tim Mooney <mooney@golem.phys.ndsu.NoDak.edu>
|
||||
#
|
||||
# This file is distributed under the terms of the GNU Public License
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# On HP-UX, use `chatr' to find the library dependencies for an executable
|
||||
#
|
||||
# Example chatr output:
|
||||
#
|
||||
#$chatr /usr/bin/chatr
|
||||
#/usr/bin/chatr:
|
||||
# shared executable
|
||||
# shared library dynamic path search:
|
||||
# SHLIB_PATH disabled second
|
||||
# embedded path disabled first Not Defined
|
||||
# internal name:
|
||||
# chatr
|
||||
# shared library list:
|
||||
# dynamic /usr/lib/libc.1
|
||||
# shared library binding:
|
||||
# deferred
|
||||
# static branch prediction disabled
|
||||
# kernel assisted branch predictionenabled
|
||||
# lazy swap allocationdisabled
|
||||
# text segment lockingdisabled
|
||||
# data segment lockingdisabled
|
||||
# data page size: 4K
|
||||
# instruction page size: 4K
|
||||
|
||||
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
|
||||
# uncomment the next line if debugging
|
||||
# echo "### processing $f"
|
||||
|
||||
#
|
||||
# Only run the file command once per file:
|
||||
#
|
||||
file_output=`file $f`
|
||||
|
||||
#
|
||||
# First, check to see if it's a script, and try figure out what
|
||||
# intpreter it requires. This is more work on HP-UX, since `file'
|
||||
# doesn't tell us what interpreter the script uses, or even if it
|
||||
# really is a script.
|
||||
#
|
||||
is_shell_script=`od -N 2 -t c $f 2>/dev/null | grep '0000000 # !'`
|
||||
if test X"$is_shell_script" != X ; then
|
||||
#
|
||||
# it's a shell script. Now figure out what interpreter it needs
|
||||
# Look at me! I'm good with sed. ;-)
|
||||
interp=`head -1 $f | sed -e 's/^#! \{0,1\}\([^ ]*\).*$/\1/'`
|
||||
if test X"$interp" != X ; then
|
||||
echo "$interp"
|
||||
#
|
||||
# We've found what we need for this file. Skip back to the
|
||||
# top of the loop. This saves me an `else' and another indent
|
||||
# level! ;-)
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# The `else' is implied here by the `continue' above
|
||||
#
|
||||
|
||||
#
|
||||
# Is it a shared library?
|
||||
#
|
||||
maybe_shared_lib=`echo "$file_output" | egrep '(executable|library)'`
|
||||
if test X"$maybe_shared_lib" != X ; then
|
||||
chatr $f 2>/dev/null \
|
||||
| awk '
|
||||
|
||||
#
|
||||
# For you non-awk-ers, no single quotes in comments -- the shell
|
||||
# sees them and things get hosed.
|
||||
#
|
||||
|
||||
BEGIN {
|
||||
in_shlib_list = 0;
|
||||
FS = " ";
|
||||
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
|
||||
numfields = split($0,fields,"/")
|
||||
print fields[numfields]
|
||||
|
||||
}
|
||||
|
||||
/^ +shared library list: *$/ {
|
||||
in_shlib_list = 1
|
||||
}
|
||||
|
||||
/^ +shared library binding: *$/ {
|
||||
exit
|
||||
}
|
||||
' # end of awk
|
||||
fi # end of shared library if.
|
||||
done | sort -u
|
||||
#comment out the previous line and uncomment the next one if debugging.
|
||||
#done
|
@ -1,200 +0,0 @@
|
||||
#! /usr/bin/ksh
|
||||
|
||||
# Original Author: Tim Mooney <mooney@golem.phys.ndsu.NoDak.edu>
|
||||
#
|
||||
# This file is distributed under the terms of the GNU Public License
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# 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
|
||||
#
|
||||
# Example `elfdump -L' output:
|
||||
#
|
||||
#$elfdump -L /usr/lib/libc.so
|
||||
#
|
||||
#
|
||||
#/usr/lib/libc.so:
|
||||
#
|
||||
# **** DYNAMIC SECTION INFORMATION ****
|
||||
#.dynamic :
|
||||
#[INDEX] Tag Value
|
||||
#[0] HASH 0xfa099d0
|
||||
#[1] STRTAB 0xfa0027c
|
||||
#[2] SYMTAB 0xfa10e3c
|
||||
#[3] STRSZ 0x9751
|
||||
#[4] SYMENT 0x10
|
||||
#[5] INIT 0
|
||||
#[6] FINI 0
|
||||
#[7] RLDVERS 0x1
|
||||
#[8] FLAGS 0x1411
|
||||
#[9] BASEADDR 0xfa00000
|
||||
#[10] LOCGOTNO 0x3c
|
||||
#[11] PROTECT 0x3c
|
||||
#[12] HIDDEN 0x12
|
||||
#[13] CNFLCTNO 0
|
||||
#[14] LBLISTNO 0
|
||||
#[15] SYMTABNO 0xd19
|
||||
#[16] UNREFEXT 0x8
|
||||
#[17] GOTSYM 0x8b3
|
||||
#[18] LOCAL 0x12
|
||||
#[19] LOCALPG 0x1
|
||||
#[20] LOCALPG 0x10
|
||||
#[21] PLTGOT 0xfb483b0
|
||||
#[22] RLDTXT_ADR0xfb6b580
|
||||
#[23] OPTIONS 0xfa000f4
|
||||
#[24] SONAME libc.so.1
|
||||
#[25] TIMSTAMP Jun 16 18:23:15 1997
|
||||
#[26] CHECKSUM 0x92321a0c
|
||||
#[27] IVERSION sgi1.0
|
||||
#[28] REL 0xfa1dfcc
|
||||
#[29] RELSZ 0x1988
|
||||
#[30] RELENT 0x8
|
||||
#[31] MSYM 0xfa1f954
|
||||
#[32] COMPCTSIZE0xc60c
|
||||
#No Library List Section in /usr/lib/libc.so
|
||||
#
|
||||
|
||||
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.
|
||||
#
|
||||
IFS=""
|
||||
while read f
|
||||
do
|
||||
#
|
||||
# If it's a shared library, run elfdump on it.
|
||||
#
|
||||
maybe_shared_lib=`file $f | egrep 'ELF.*dynamic lib'`
|
||||
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 = "";
|
||||
|
||||
found_soname = 0;
|
||||
found_iversion = 0;
|
||||
}
|
||||
|
||||
# Uncomment the next line for some debugging info.
|
||||
#{ print NR , ":", $0 }
|
||||
|
||||
/[ ]+SONAME .*[ ]*$/ {
|
||||
found_soname = 1;
|
||||
numfields = split($0, internal_name)
|
||||
if (numfields == 3) {
|
||||
soname = $3
|
||||
} else {
|
||||
#
|
||||
# Should never be here.
|
||||
#
|
||||
print "Really odd looking soname:", $0 | "cat 1>&2"
|
||||
exit
|
||||
}
|
||||
}
|
||||
|
||||
/[ ]+IVERSION .*[ ]*$/ {
|
||||
if (found_soname == 1) {
|
||||
numfields = split($0, iversion)
|
||||
if (numfields == 3) {
|
||||
version = $3
|
||||
#
|
||||
# handle libraries with multiple versions, like
|
||||
# 1.1:1.2. Since they really provide both versions,
|
||||
# we need to generate output for each version.
|
||||
#
|
||||
numfields = split(version, versions, ":")
|
||||
if (numfields > 1) {
|
||||
for (i = 1; i < numfields; i++) {
|
||||
print soname, "(", versions[i], ")"
|
||||
}
|
||||
#
|
||||
# let our END routine print out the *last* version
|
||||
# provided
|
||||
#
|
||||
version = versions[numfields]
|
||||
}
|
||||
#
|
||||
# stick a fork in us.
|
||||
#
|
||||
found_iversion = 1;
|
||||
exit
|
||||
} else {
|
||||
#
|
||||
# handle libraries with comments and other junk in
|
||||
# the version field. IRIX has a number of system libraries
|
||||
# with whitespace and other junk in the version field!
|
||||
#
|
||||
# we discard the whitespace and keep the identifier after
|
||||
# the # sign.
|
||||
#
|
||||
version = iversion[numfields]
|
||||
numfields = split(version, version_junk, "#")
|
||||
if (numfields > 1) {
|
||||
version = version_junk[numfields]
|
||||
found_iversion = 1;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
#
|
||||
# found an iversion without an soname. Is that possible?
|
||||
#
|
||||
print "Found version but no soname:", $0 | "cat 1>&2"
|
||||
exit
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# we could probably watch for some other token (like RELSZ)
|
||||
# that *generally* occurs later in the input than the stuff we watch
|
||||
# for, and exit if we see it, but it is just as easy to read all
|
||||
# the output, even after we have seen what we are looking for.
|
||||
#
|
||||
|
||||
END {
|
||||
# Uncomment the next line for debugging info
|
||||
#{ print "END: NR: ", NR }
|
||||
if ( (found_soname == 1) && (found_iversion == 1) ) {
|
||||
print soname, "(", version, ")"
|
||||
exit
|
||||
} else if ( (found_soname == 1) && (found_iversion == 0) ) {
|
||||
#
|
||||
# no library version information *BUT* any programs linked
|
||||
# against this library will pick up a dependency on version 0
|
||||
# of this library, so we output that.
|
||||
#
|
||||
print soname, "(", 0, ")"
|
||||
}
|
||||
# else do nothing
|
||||
}
|
||||
' # end of awk
|
||||
fi # end of the 'if test X"$maybe_shared_lib != X ; then' clause
|
||||
done | sort -u
|
||||
#comment out the previous line and uncomment the next line when debugging
|
||||
#done
|
@ -1,163 +0,0 @@
|
||||
#! /usr/bin/ksh
|
||||
|
||||
# Original Author: Tim Mooney <mooney@golem.phys.ndsu.NoDak.edu>
|
||||
#
|
||||
# This file is distributed under the terms of the GNU Public License
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# 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
|
||||
# than we really need.
|
||||
#
|
||||
# Example `elfdump -Dl' output:
|
||||
#
|
||||
#$elfdump -Dl /usr/bin/X11/xterm
|
||||
#
|
||||
#
|
||||
#
|
||||
#/usr/bin/X11/xterm:
|
||||
#
|
||||
# **** MIPS LIBLIST INFORMATION ****
|
||||
#.liblist :
|
||||
#[INDEX] Timestamp Checksum Flags Name Version
|
||||
#[1] Nov 23 15:39:02 1997 0x4da65893 ----- libXaw.so.2 sgi2.0
|
||||
#[2] Nov 23 15:39:02 1997 0x414eece6 ----- libXmu.so sgi1.0
|
||||
#[3] Nov 23 15:39:02 1997 0x6f314e69 ----- libXt.so sgi1.0
|
||||
#[4] Nov 23 15:39:02 1997 0xcbe81fff ----- libXext.so sgi1.0
|
||||
#[5] Nov 23 15:39:02 1997 0x89ae8e98 ----- libX11.so.1 sgi1.0
|
||||
#[6] Oct 27 01:00:29 1997 0x99b27890 ----- libcurses.so sgi1.0
|
||||
#[7] Jun 16 18:23:15 1997 0x92321a0c ----- libc.so.1 sgi1.0
|
||||
#
|
||||
|
||||
#
|
||||
# TVM: it might be better to re-write this so that `file' isn't used, since
|
||||
# it can all be done with `elfdump', but this works.
|
||||
#
|
||||
|
||||
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.
|
||||
#
|
||||
IFS=""
|
||||
while read f
|
||||
do
|
||||
|
||||
#
|
||||
# Uncomment the next line for additional debugging:
|
||||
#echo "read ->$f<-"
|
||||
|
||||
#
|
||||
# Only run file once per file:
|
||||
#
|
||||
file_output=`file $f`
|
||||
|
||||
#
|
||||
# Handle scripts first
|
||||
#
|
||||
is_shell_script=`echo "$file_output" | grep 'script text' | \
|
||||
cut -d: -f 2 | awk '{ print $1 }'`
|
||||
|
||||
#
|
||||
# If it's a script...
|
||||
#
|
||||
if test X"$is_shell_script" != X ; then
|
||||
echo "$is_shell_script"
|
||||
#
|
||||
# use `continue' to skip back up to the top of the loop. We've
|
||||
# already done as much as we need to, and this saves me from having
|
||||
# to have an else, and another indent level... ;-)
|
||||
#
|
||||
continue
|
||||
fi
|
||||
|
||||
#
|
||||
# the `else' is implied here, since we used `continue' in the test above
|
||||
#
|
||||
|
||||
#
|
||||
# It might be a shared library.
|
||||
#
|
||||
maybe_shared_lib=`echo "$file_output" | egrep 'executable|lib'`
|
||||
if test X"$maybe_shared_lib" != X ; then
|
||||
|
||||
elfdump -Dl $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 {
|
||||
found_column_headers = 0;
|
||||
FS = " ";
|
||||
RS = "\n";
|
||||
OFS="";
|
||||
}
|
||||
|
||||
# uncomment the next line for debugging information
|
||||
#{ print "Saw input:", $0 }
|
||||
|
||||
found_column_headers == 1 && $0 !~ /^$/ {
|
||||
|
||||
# get the library name (field 15) and the library version (field 16)
|
||||
# if present.
|
||||
numfields = split($0,fields)
|
||||
if (numfields == 8) {
|
||||
print fields[8]
|
||||
} else if (numfields == 9) {
|
||||
#
|
||||
print fields[8], "(", fields[9], ")"
|
||||
} else if (numfields > 9) {
|
||||
#
|
||||
# SGI has this annoying habit of putting comments, complete
|
||||
# with whitespace, in their library IVERSION field. Yuck.
|
||||
#
|
||||
# Handle libraries like this gracefully.
|
||||
#
|
||||
verfields = split(fields[NF], junk, "#")
|
||||
if (verfields == 2) {
|
||||
print fields[8], "(", junk[2], ")"
|
||||
} else if (verfields > 2) {
|
||||
print fields[8], "(", junk[verfields], ")"
|
||||
} else {
|
||||
print "Cannot find version:", fields[numfields] | "cat 2>&1"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/^\[INDEX\].Timestamp.*Checksum.*Flags.*Name.*Version$/ {
|
||||
# we better start paying attention now.
|
||||
found_column_headers = 1
|
||||
#
|
||||
# uncomment the next line for debugging information
|
||||
#print "found the column headers: ", $0
|
||||
}
|
||||
|
||||
' # end of awk
|
||||
fi
|
||||
done | sort -u
|
||||
# comment out the previous line and uncomment the next when debugging
|
||||
#done
|
@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# No shared libs on MiNT yet, sigh.
|
||||
|
||||
echo > /dev/null
|
@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# No shared libs on MiNT yet, sigh.
|
||||
|
||||
echo > /dev/null
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
cat > /dev/null
|
@ -1,9 +0,0 @@
|
||||
#!/bin/sh
|
||||
# ----------------------------------------------------------
|
||||
# find-provides for OpenBSD-2.5
|
||||
# ----------------------------------------------------------
|
||||
filelist=$(grep "\\.so" | grep -v "^/lib/ld.so" | xargs file -L 2>/dev/null | grep "OpenBSD.*shared" | cut -d: -f1)
|
||||
|
||||
for f in $filelist; do
|
||||
echo ${f##*/}
|
||||
done | sort -u
|
@ -1,22 +0,0 @@
|
||||
#!/bin/sh
|
||||
# ----------------------------------------------------------------
|
||||
# find-requires for OpenBSD-2.2.x
|
||||
# how do we know what is required by a.out shared libraries?
|
||||
# ----------------------------------------------------------------
|
||||
ulimit -c 0
|
||||
|
||||
filelist=`sed "s/['\"]/\\\&/g"`
|
||||
exelist=`echo $filelist | xargs file | fgrep executable | cut -d: -f1 `
|
||||
scriptlist=`echo $filelist | xargs file | egrep ":.* (commands|script) " | cut -d: -f1 `
|
||||
|
||||
for f in $exelist; do
|
||||
if [ -x $f ]; then
|
||||
ldd $f | /usr/bin/awk '/\=\>/&&!/not found/ { print $3 }'
|
||||
fi
|
||||
done | sort -u | sed "s/['\"]/\\\&/g" | xargs -n 1 basename | sort -u
|
||||
|
||||
for f in $scriptlist; do
|
||||
if [ -x $f ]; then
|
||||
head -1 $f | sed -e 's/^\#\![ ]*//' | cut -d" " -f1
|
||||
fi
|
||||
done | sort -u
|
@ -1,187 +0,0 @@
|
||||
#! /usr/bin/ksh
|
||||
|
||||
# Original Author: Tim Mooney <mooney@golem.phys.ndsu.NoDak.edu>
|
||||
#
|
||||
# This file is distributed under the terms of the GNU Public License
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
#
|
||||
# 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:
|
||||
#
|
||||
#$odump -D /usr/shlib/libc.so
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
# ***DYNAMIC SECTION***
|
||||
# Tag Value
|
||||
#
|
||||
#/usr/shlib/libc.so:
|
||||
# UNREFEXTNO: 14.
|
||||
# LOCAL_GOTNO: 521.
|
||||
# GOTSYM: 2205.
|
||||
# LOCAL_GOTNO: 1606.
|
||||
# GOTSYM: 3289.
|
||||
# SONAME: libc.so
|
||||
# TIME_STAMP: (0x34a82daa) Mon Dec 29 17:09:30 1997
|
||||
#
|
||||
# ICHECKSUM: 0x5e955f9b
|
||||
# IVERSION: osf.1
|
||||
# CONFLICTNO: 0.
|
||||
# RLD_VERSION: 2.
|
||||
# HASH: 0x000003ff800a82e0
|
||||
# STRTAB: 0x000003ff8008aad0
|
||||
# SYMTAB: 0x000003ff80094ab0
|
||||
# MSYM: 0x000003ff800842c0
|
||||
# STRSZ: 40922.
|
||||
# SYMENT: 24.
|
||||
# PLTGOT: 0x000003ffc008f240
|
||||
# SYMTABNO: 3330.
|
||||
# BASE_ADDRESS: 0x000003ff80080000
|
||||
# HIPAGENO: 0.
|
||||
# RELSZ: 15296.
|
||||
# RELENT: 16.
|
||||
# REL: 0x000003ff80080700
|
||||
# LIBLISTNO: 0.
|
||||
# INIT: 0x000003ff8019c520
|
||||
# FINI: 0x000003ff8019c570
|
||||
# FLAGS: 0x00000001
|
||||
#
|
||||
|
||||
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.
|
||||
#
|
||||
IFS=""
|
||||
while read f
|
||||
do
|
||||
|
||||
#
|
||||
# if it's a shared library, run odump on it.
|
||||
#
|
||||
maybe_shared_lib=`file $f | egrep 'COFF.*shared library'`
|
||||
if test X"$maybe_shared_lib" != X ; then
|
||||
odump -D $f 2>/dev/null | awk '
|
||||
|
||||
BEGIN {
|
||||
FS = " ";
|
||||
RS = "\n";
|
||||
OFS = "";
|
||||
|
||||
found_soname = 0;
|
||||
found_iversion = 0;
|
||||
|
||||
}
|
||||
|
||||
# Uncomment the next line for some debugging info.
|
||||
#{ print NR , ":", $0 }
|
||||
|
||||
/^[ ]+SONAME: .*[ ]*$/ {
|
||||
found_soname = 1;
|
||||
numfields = split($0, internal_name)
|
||||
if (numfields == 2) {
|
||||
soname = $2
|
||||
#
|
||||
# we should probably check to see if the soname ends with
|
||||
# a number (indicating that it contains versioning info,
|
||||
# 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/Tru64 Unix.
|
||||
#
|
||||
} else {
|
||||
#
|
||||
# Should never be here.
|
||||
#
|
||||
print "Really odd looking soname:", $0 | "cat 1>&2"
|
||||
exit
|
||||
}
|
||||
}
|
||||
|
||||
/^[ ]+IVERSION: .*[ ]*$/ {
|
||||
if (found_soname == 1) {
|
||||
numfields = split($0, iversion)
|
||||
if (numfields == 2) {
|
||||
version = $2
|
||||
#
|
||||
# handle libraries with multiple versions, like
|
||||
# 1.1:1.2. Since they really provide both versions,
|
||||
# we need to generate output for each version.
|
||||
#
|
||||
numfields = split(version, versions, ":")
|
||||
if (numfields > 1) {
|
||||
for (i = 1; i < numfields; i++) {
|
||||
print soname, "(", versions[i], ")"
|
||||
}
|
||||
#
|
||||
# let our END routine print out the *last* version
|
||||
# provided
|
||||
#
|
||||
version = versions[numfields]
|
||||
}
|
||||
#
|
||||
# stick a fork in us.
|
||||
#
|
||||
found_iversion = 1;
|
||||
exit
|
||||
} else {
|
||||
#
|
||||
# Should never be here.
|
||||
#
|
||||
print "Odd looking library version:", $0 | "cat 1>&2"
|
||||
exit
|
||||
}
|
||||
} else {
|
||||
#
|
||||
# found an iversion without an soname. Is that possible?
|
||||
#
|
||||
print "Found version but no soname:", $0 | "cat 1>&2"
|
||||
exit
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# we could probably watch for some other token (like RLD_VERSION)
|
||||
# that *generally* occurs later in the input than the stuff we watch
|
||||
# for, and exit if we see it, but it is just as easy to read all
|
||||
# the output, even after we have seen what we are looking for.
|
||||
#
|
||||
|
||||
END {
|
||||
# Uncomment the next line for debugging info
|
||||
#{ print "END: NR: ", NR }
|
||||
if ( (found_soname == 1) && (found_iversion == 1) ) {
|
||||
print soname, "(", version, ")"
|
||||
exit
|
||||
} else if (found_soname == 1) {
|
||||
#
|
||||
# no library version information
|
||||
#
|
||||
print soname
|
||||
}
|
||||
# else do nothing
|
||||
}
|
||||
' # end of awk
|
||||
fi
|
||||
done | sort -u
|
||||
#comment out the previous line and uncomment the next line when debugging
|
||||
#done
|
141
autodeps/osf.req
141
autodeps/osf.req
@ -1,141 +0,0 @@
|
||||
#! /usr/bin/ksh
|
||||
|
||||
# Original Author: Tim Mooney <mooney@golem.phys.ndsu.NoDak.edu>
|
||||
#
|
||||
# This file is distributed under the terms of the GNU Public License
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# 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:
|
||||
#
|
||||
#$odump -Dl /usr/bin/X11/xterm
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
# ***LIBRARY LIST SECTION***
|
||||
# Name Time-Stamp CheckSum Flags Version
|
||||
#/usr/bin/X11/xterm:
|
||||
# libXaw.so Dec 9 00:15:35 1997 0x285006d0 0 6.0
|
||||
# libXmu.so Dec 9 00:13:36 1997 0x3bf3a33d 0
|
||||
# libXt.so Dec 9 00:12:18 1997 0x10dd9a17 0
|
||||
# libSM.so Dec 9 00:08:11 1997 0xb64c7082 0
|
||||
# libICE.so Dec 9 00:07:52 1997 0x1199be32 0
|
||||
# libXext.so Dec 9 00:08:51 1997 0xafcb84d5 0
|
||||
# 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
|
||||
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
IFS=""
|
||||
while read f
|
||||
do
|
||||
|
||||
#
|
||||
# Uncomment the next line for addtional debugging:
|
||||
# echo "read ->$f<-"
|
||||
|
||||
#
|
||||
# Only run file once per file:
|
||||
#
|
||||
file_output=`file $f`
|
||||
|
||||
#
|
||||
# handle shell scripts first
|
||||
#
|
||||
is_shell_script=`echo "$file_output" | grep 'shell script' | \
|
||||
cut -d: -f 2 | awk '{ print $1 }'`
|
||||
|
||||
#
|
||||
# If it's a script...
|
||||
#
|
||||
if test X"$is_shell_script" != X ; then
|
||||
echo "$is_shell_script"
|
||||
#
|
||||
# use `continue' to skip back up to the top of the loop.
|
||||
# We have already done as much as we need to for this
|
||||
# file, and this saves me from having to have an else,
|
||||
# and another indent level... ;-)
|
||||
#
|
||||
continue
|
||||
fi
|
||||
|
||||
#
|
||||
# The `else' here is implied by the `continue' above...
|
||||
#
|
||||
|
||||
#
|
||||
# it might be a shared library.
|
||||
#
|
||||
|
||||
maybe_shared_lib=`echo "$file_output" | grep 'executable'`
|
||||
if test X"$maybe_shared_lib" != X ; then
|
||||
|
||||
odump -Dl $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 {
|
||||
found_program_name = 0;
|
||||
FS = " ";
|
||||
RS = "\n";
|
||||
OFS="";
|
||||
}
|
||||
|
||||
# uncomment the next line for debugging information
|
||||
#{ print "Saw input:", $0 }
|
||||
|
||||
found_program_name == 1 && $0 !~ /^$/ {
|
||||
|
||||
# uncomment for debugging information
|
||||
#print "found shared library: $0"
|
||||
|
||||
# get the library name (field 1) and the library version
|
||||
# (field 8) if present.
|
||||
numfields = split($0,fields)
|
||||
if (numfields == 7) {
|
||||
print fields[1]
|
||||
} else if (numfields == 8) {
|
||||
print fields[1], "(", fields[8], ")"
|
||||
}
|
||||
}
|
||||
|
||||
/^.*: *$/ {
|
||||
found_program_name = 1
|
||||
#
|
||||
# uncomment the next line for debugging information
|
||||
#print "found the program name: ", $1
|
||||
}
|
||||
|
||||
' # end of awk
|
||||
fi
|
||||
done | sort -u
|
||||
# comment out the previous line and uncomment the next when debugging
|
||||
# done
|
@ -1,14 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This script reads filenames from STDIN and outputs any relevant provides
|
||||
# information that needs to be included in the package.
|
||||
|
||||
PATH=/usr/bin:/usr/ccs/bin:/usr/sbin:/sbin
|
||||
export PATH
|
||||
|
||||
filelist=`grep "lib.*\\.so" | xargs /usr/ucb/file -L 2>/dev/null |\
|
||||
grep "ELF.*dynamic lib" | cut -d: -f1 | sort -u`
|
||||
for I in $filelist; do
|
||||
basename $I
|
||||
done
|
||||
|
@ -1,16 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# note this works for both a.out and ELF executables
|
||||
|
||||
PATH=/usr/bin:/usr/ccs/bin:/usr/sbin:/sbin
|
||||
export PATH
|
||||
|
||||
ulimit -c 0
|
||||
|
||||
filelist=`sed "s/['\"]/\\\&/g"`
|
||||
[ -z "$filelist" ] && exit #emulate -r option for xargs
|
||||
|
||||
for f in `echo $filelist | xargs file | fgrep executable | cut -d: -f1`; do
|
||||
ldd $f 2>/dev/null | awk '/\=\>/ { print $1 }'
|
||||
done | sort -u | sed "s/['\"]/\\\&/g" | xargs -n 1 basename | sort -u
|
||||
|
@ -1,7 +0,0 @@
|
||||
.deps
|
||||
.depend
|
||||
Makefile
|
||||
Makefile.in
|
||||
.libs
|
||||
*.la
|
||||
*.lo
|
133
config.site
133
config.site
@ -1,133 +0,0 @@
|
||||
ac_cv_sys_restartable_syscalls=yes
|
||||
ac_cv_func_setvbuf_reversed=no
|
||||
ac_cv_func_getpgrp_void=yes
|
||||
ac_cv_func_setpgrp_void=yes
|
||||
ac_cv_sizeof_long=4
|
||||
ac_cv_sizeof_long_long=8
|
||||
ac_cv_sizeof_int=4
|
||||
ac_cv_sizeof_short=2
|
||||
# This file is a shell script that caches the results of configure
|
||||
# tests run on this system so they can be shared between configure
|
||||
# scripts and configure runs. It is not useful on other systems.
|
||||
# If it contains results you don't want to keep, you may remove or edit it.
|
||||
#
|
||||
# By default, configure uses ./config.cache as the cache file,
|
||||
# creating it if it does not exist already. You can give configure
|
||||
# the --cache-file=FILE option to use a different cache file; that is
|
||||
# what configure does when it calls configure scripts in
|
||||
# subdirectories, so they share the cache.
|
||||
# Giving --cache-file=/dev/null disables caching, for debugging configure.
|
||||
# config.status only pays attention to the cache file if you give it the
|
||||
# --recheck option to rerun configure.
|
||||
#
|
||||
ac_cv_c_const=${ac_cv_c_const=yes}
|
||||
ac_cv_c_inline=${ac_cv_c_inline=inline}
|
||||
ac_cv_func_atexit=${ac_cv_func_atexit=yes}
|
||||
ac_cv_func_basename=${ac_cv_func_basename=yes}
|
||||
ac_cv_func_connect=${ac_cv_func_connect=yes}
|
||||
ac_cv_func_fchdir=${ac_cv_func_fchdir=yes}
|
||||
ac_cv_func_flock=${ac_cv_func_flock=yes}
|
||||
ac_cv_func_gethostbyname=${ac_cv_func_gethostbyname=yes}
|
||||
ac_cv_func_getpass=${ac_cv_func_getpass=yes}
|
||||
ac_cv_func_getpgrp_void=${ac_cv_func_getpgrp_void=yes}
|
||||
ac_cv_func_gettimeofday=${ac_cv_func_gettimeofday=yes}
|
||||
ac_cv_func_htons=${ac_cv_func_htons=yes}
|
||||
ac_cv_func_llseek=${ac_cv_func_llseek=yes}
|
||||
ac_cv_func_lockf=${ac_cv_func_lockf=yes}
|
||||
ac_cv_func_lseek64=${ac_cv_func_lseek64=yes}
|
||||
ac_cv_func_media_oldaliases=${ac_cv_func_media_oldaliases=no}
|
||||
ac_cv_func_memcpy=${ac_cv_func_memcpy=yes}
|
||||
ac_cv_func_memmove=${ac_cv_func_memmove=yes}
|
||||
ac_cv_func_memset=${ac_cv_func_memset=yes}
|
||||
ac_cv_func_on_exit=${ac_cv_func_on_exit=yes}
|
||||
ac_cv_func_random=${ac_cv_func_random=yes}
|
||||
ac_cv_func_remove=${ac_cv_func_remove=yes}
|
||||
ac_cv_func_seteuid=${ac_cv_func_seteuid=yes}
|
||||
ac_cv_func_setpgrp_void=${ac_cv_func_setpgrp_void=yes}
|
||||
ac_cv_func_setresuid=${ac_cv_func_setresuid=yes}
|
||||
ac_cv_func_setvbuf_reversed=${ac_cv_func_setvbuf_reversed=no}
|
||||
ac_cv_func_shmat=${ac_cv_func_shmat=yes}
|
||||
ac_cv_func_snprintf=${ac_cv_func_snprintf=yes}
|
||||
ac_cv_func_srandom=${ac_cv_func_srandom=yes}
|
||||
ac_cv_func_stat64=${ac_cv_func_stat64=yes}
|
||||
ac_cv_func_strcasecmp=${ac_cv_func_strcasecmp=yes}
|
||||
ac_cv_func_strchr=${ac_cv_func_strchr=yes}
|
||||
ac_cv_func_strcspn=${ac_cv_func_strcspn=yes}
|
||||
ac_cv_func_strdup=${ac_cv_func_strdup=yes}
|
||||
ac_cv_func_strerror=${ac_cv_func_strerror=yes}
|
||||
ac_cv_func_strncasecmp=${ac_cv_func_strncasecmp=yes}
|
||||
ac_cv_func_strpbrk=${ac_cv_func_strpbrk=yes}
|
||||
ac_cv_func_strrchr=${ac_cv_func_strrchr=yes}
|
||||
ac_cv_func_strspn=${ac_cv_func_strspn=yes}
|
||||
ac_cv_func_strtol=${ac_cv_func_strtol=yes}
|
||||
ac_cv_func_strtoul=${ac_cv_func_strtoul=yes}
|
||||
ac_cv_func_tcflush=${ac_cv_func_tcflush=yes}
|
||||
ac_cv_func_tcsetattr=${ac_cv_func_tcsetattr=yes}
|
||||
ac_cv_func_tzset=${ac_cv_func_tzset=yes}
|
||||
ac_cv_func_utimes=${ac_cv_func_utimes=yes}
|
||||
ac_cv_have_x=${ac_cv_have_x='have_x=yes ac_x_includes=/usr/X11R6/include ac_x_libraries=/usr/X11R6/lib'}
|
||||
ac_cv_header_arpa_inet_h=${ac_cv_header_arpa_inet_h=yes}
|
||||
ac_cv_header_fcntl_h=${ac_cv_header_fcntl_h=yes}
|
||||
ac_cv_header_getopt_h=${ac_cv_header_getopt_h=yes}
|
||||
ac_cv_header_libc_h=${ac_cv_header_libc_h=no}
|
||||
ac_cv_header_limits_h=${ac_cv_header_limits_h=yes}
|
||||
ac_cv_header_linux_unistd_h=${ac_cv_header_linux_unistd_h=yes}
|
||||
ac_cv_header_malloc_h=${ac_cv_header_malloc_h=yes}
|
||||
ac_cv_header_memory_h=${ac_cv_header_memory_h=yes}
|
||||
ac_cv_header_minix_config_h=${ac_cv_header_minix_config_h=no}
|
||||
ac_cv_header_mntent_h=${ac_cv_header_mntent_h=yes}
|
||||
ac_cv_header_netdb_h=${ac_cv_header_netdb_h=yes}
|
||||
ac_cv_header_netinet_in_h=${ac_cv_header_netinet_in_h=yes}
|
||||
ac_cv_header_sgtty_h=${ac_cv_header_sgtty_h=yes}
|
||||
ac_cv_header_signal_h=${ac_cv_header_signal_h=yes}
|
||||
ac_cv_header_stdc=${ac_cv_header_stdc=yes}
|
||||
ac_cv_header_stdlib_h=${ac_cv_header_stdlib_h=yes}
|
||||
ac_cv_header_string_h=${ac_cv_header_string_h=yes}
|
||||
ac_cv_header_strings_h=${ac_cv_header_strings_h=yes}
|
||||
ac_cv_header_sys_file_h=${ac_cv_header_sys_file_h=yes}
|
||||
ac_cv_header_sys_floppy_h=${ac_cv_header_sys_floppy_h=no}
|
||||
ac_cv_header_sys_ioctl_h=${ac_cv_header_sys_ioctl_h=yes}
|
||||
ac_cv_header_sys_param_h=${ac_cv_header_sys_param_h=yes}
|
||||
ac_cv_header_sys_signal_h=${ac_cv_header_sys_signal_h=yes}
|
||||
ac_cv_header_sys_socket_h=${ac_cv_header_sys_socket_h=yes}
|
||||
ac_cv_header_sys_stat_h=${ac_cv_header_sys_stat_h=yes}
|
||||
ac_cv_header_sys_sysmacros_h=${ac_cv_header_sys_sysmacros_h=yes}
|
||||
ac_cv_header_sys_time_h=${ac_cv_header_sys_time_h=yes}
|
||||
ac_cv_header_sys_wait_h=${ac_cv_header_sys_wait_h=yes}
|
||||
ac_cv_header_termio_h=${ac_cv_header_termio_h=yes}
|
||||
ac_cv_header_termios_h=${ac_cv_header_termios_h=yes}
|
||||
ac_cv_header_time=${ac_cv_header_time=yes}
|
||||
ac_cv_header_unistd_h=${ac_cv_header_unistd_h=yes}
|
||||
ac_cv_header_utime_h=${ac_cv_header_utime_h=yes}
|
||||
ac_cv_lib_ICE_IceConnectionNumber=${ac_cv_lib_ICE_IceConnectionNumber=no}
|
||||
ac_cv_lib_bsd_main=${ac_cv_lib_bsd_main=no}
|
||||
ac_cv_lib_cam_cam_open_device=${ac_cv_lib_cam_cam_open_device=no}
|
||||
ac_cv_lib_dnet_dnet_ntoa=${ac_cv_lib_dnet_dnet_ntoa=no}
|
||||
ac_cv_lib_dnet_stub_dnet_ntoa=${ac_cv_lib_dnet_stub_dnet_ntoa=no}
|
||||
ac_cv_lib_nsl_main=${ac_cv_lib_nsl_main=yes}
|
||||
ac_cv_lib_socket_main=${ac_cv_lib_socket_main=no}
|
||||
ac_cv_lib_sun_getpwnam=${ac_cv_lib_sun_getpwnam=no}
|
||||
ac_cv_path_INSTALL_INFO=${ac_cv_path_INSTALL_INFO=/sbin/install-info}
|
||||
ac_cv_path_install=${ac_cv_path_install='/usr/bin/install -c'}
|
||||
ac_cv_prog_CC=${ac_cv_prog_CC=sh-linux-gnu-gcc}
|
||||
ac_cv_prog_CPP=${ac_cv_prog_CPP='sh-linux-gnu-gcc -E'}
|
||||
ac_cv_prog_LN_S=${ac_cv_prog_LN_S='ln -s'}
|
||||
ac_cv_prog_cc_cross=${ac_cv_prog_cc_cross=yes}
|
||||
ac_cv_prog_cc_g=${ac_cv_prog_cc_g=yes}
|
||||
ac_cv_prog_cc_works=${ac_cv_prog_cc_works=yes}
|
||||
ac_cv_prog_gcc=${ac_cv_prog_gcc=yes}
|
||||
ac_cv_prog_gcc_traditional=${ac_cv_prog_gcc_traditional=no}
|
||||
ac_cv_sizeof_int=${ac_cv_sizeof_int=4}
|
||||
ac_cv_sizeof_long=${ac_cv_sizeof_long=4}
|
||||
ac_cv_sizeof_short=${ac_cv_sizeof_short=2}
|
||||
ac_cv_struct_tm=${ac_cv_struct_tm=time.h}
|
||||
ac_cv_sys_restartable_syscalls=${ac_cv_sys_restartable_syscalls=yes}
|
||||
ac_cv_type_signal=${ac_cv_type_signal=void}
|
||||
ac_cv_type_size_t=${ac_cv_type_size_t=yes}
|
||||
cf_cv_dcl_sys_errlist=${cf_cv_dcl_sys_errlist=yes}
|
||||
ice_cv_have_loff_t=${ice_cv_have_loff_t=yes}
|
||||
ice_cv_have_long_long=${ice_cv_have_long_long=yes}
|
||||
ice_cv_have_offset_t=${ice_cv_have_offset_t=no}
|
||||
mtools_cv_have_llseek_prototype=${mtools_cv_have_llseek_prototype=no}
|
||||
mtools_cv_have_lseek64_prototype=${mtools_cv_have_lseek64_prototype=yes}
|
||||
sfs_cv_off_t_64=${sfs_cv_off_t_64=no}
|
66
configure.in
66
configure.in
@ -128,32 +128,9 @@ dnl see if we have a mkdir that supports `-p'.
|
||||
dnl
|
||||
AC_PATH_PROGS(MKDIR, mkdir, mkdir)
|
||||
AC_MSG_CHECKING(if $MKDIR supports -p)
|
||||
rm -rf conftest
|
||||
$MKDIR -p conftest/a 2>/dev/null
|
||||
if test $? = 0 ; then
|
||||
rmdir conftest/a 2>/dev/null
|
||||
if test $? = 0 ; then
|
||||
:
|
||||
else
|
||||
MKDIR_P=0
|
||||
fi
|
||||
MKDIR_P="$MKDIR -p"
|
||||
AC_MSG_RESULT(yes)
|
||||
|
||||
rmdir conftest 2>/dev/null
|
||||
if test $? = 0 ; then
|
||||
MKDIR_P="$MKDIR -p"
|
||||
else
|
||||
MKDIR_P=0
|
||||
fi
|
||||
else
|
||||
MKDIR_P=0
|
||||
fi
|
||||
|
||||
if test X"$MKDIR_P" = X0 ; then
|
||||
AC_MSG_RESULT(no)
|
||||
MKDIR_P="`echo ${prefix}/lib/rpm/mkinstalldirs`"
|
||||
else
|
||||
AC_MSG_RESULT(yes)
|
||||
fi
|
||||
dnl
|
||||
dnl substitute this into config.h, so the C source picks it up.
|
||||
dnl
|
||||
@ -947,8 +924,6 @@ AC_OUTPUT([ Doxyfile Makefile rpmrc macros platform rpmpopt
|
||||
scripts/strip_files
|
||||
scripts/verify-elf
|
||||
scripts/posttrans-filetriggers
|
||||
tests/Makefile tests/rpmrc tests/macros tests/hello-test/Makefile
|
||||
po/Makefile.in
|
||||
doc/Makefile doc/manual/Makefile
|
||||
doc/ja/Makefile doc/pl/Makefile doc/ru/Makefile doc/sk/Makefile
|
||||
python/Makefile ],
|
||||
@ -956,38 +931,5 @@ AC_OUTPUT([ Doxyfile Makefile rpmrc macros platform rpmpopt
|
||||
]
|
||||
)
|
||||
|
||||
rm -f ./find-provides
|
||||
if test -f ${srcdir}/autodeps/${build_cpu}-${build_os_exact}.prov ; then
|
||||
echo "using ${srcdir}/autodeps/${build_cpu}-${build_os_exact}.prov for automatic provides generation"
|
||||
ln -s ${srcdir}/autodeps/${build_cpu}-${build_os_exact}.prov ./find-provides
|
||||
elif test -f ${srcdir}/autodeps/${build_os_exact}.prov ; then
|
||||
echo "using ${srcdir}/autodeps/${build_os_exact}.prov for automatic provides generation"
|
||||
ln -s ${srcdir}/autodeps/${build_os_exact}.prov ./find-provides
|
||||
elif test -f ${srcdir}/autodeps/${build_os_major}.prov ; then
|
||||
echo "using ${srcdir}/autodeps/${build_os_major}.prov for automatic provides generation"
|
||||
ln -s ${srcdir}/autodeps/${build_os_major}.prov ./find-provides
|
||||
elif test -f ${srcdir}/autodeps/${build_os_noversion}.prov ; then
|
||||
echo "using ${srcdir}/autodeps/${build_os_noversion}.prov for automatic provides generation"
|
||||
ln -s ${srcdir}/autodeps/${build_os_noversion}.prov ./find-provides
|
||||
else
|
||||
echo "*** no default provides information is available for ${build_os_noversion}"
|
||||
ln -s ${srcdir}/autodeps/none ./find-provides
|
||||
fi
|
||||
|
||||
rm -f ./find-requires
|
||||
if test -f ${srcdir}/autodeps/${build_cpu}-${build_os_exact}.req ; then
|
||||
echo "using ${srcdir}/autodeps/${build_cpu}-${build_os_exact}.req for automatic requires generation"
|
||||
ln -s ${srcdir}/autodeps/${build_cpu}-${build_os_exact}.req ./find-requires
|
||||
elif test -f ${srcdir}/autodeps/${build_os_exact}.req ; then
|
||||
echo "using ${srcdir}/autodeps/${build_os_exact}.req for automatic requires generation"
|
||||
ln -s ${srcdir}/autodeps/${build_os_exact}.req ./find-requires
|
||||
elif test -f ${srcdir}/autodeps/${build_os_major}.req ; then
|
||||
echo "using ${srcdir}/autodeps/${build_os_major}.req for automatic requires generation"
|
||||
ln -s ${srcdir}/autodeps/${build_os_major}.req ./find-requires
|
||||
elif test -f ${srcdir}/autodeps/${build_os_noversion}.req ; then
|
||||
echo "using ${srcdir}/autodeps/${build_os_noversion}.req for automatic requires generation"
|
||||
ln -s ${srcdir}/autodeps/${build_os_noversion}.req ./find-requires
|
||||
else
|
||||
echo "*** no default requires information is available for ${build_os_noversion}"
|
||||
ln -s ${srcdir}/autodeps/none ./find-requires
|
||||
fi
|
||||
ln -s ${srcdir}/autodeps/linux.prov ./find-provides
|
||||
ln -s ${srcdir}/autodeps/linux.req ./find-requires
|
||||
|
@ -1,2 +0,0 @@
|
||||
Makefile
|
||||
Makefile.in
|
@ -1,2 +0,0 @@
|
||||
Makefile
|
||||
Makefile.in
|
@ -1,2 +0,0 @@
|
||||
Makefile
|
||||
Makefile.in
|
@ -1,2 +0,0 @@
|
||||
Makefile
|
||||
Makefile.in
|
@ -1,2 +0,0 @@
|
||||
Makefile
|
||||
Makefile.in
|
@ -1,2 +0,0 @@
|
||||
Makefile
|
||||
Makefile.in
|
238
install-sh
238
install-sh
@ -1,238 +0,0 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# install - install a program, script, or datafile
|
||||
# This comes from X11R5.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
#
|
||||
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
|
||||
transformbasename=""
|
||||
transform_arg=""
|
||||
instcmd="$mvprog"
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=""
|
||||
dst=""
|
||||
dir_arg=""
|
||||
|
||||
while [ x"$1" != x ]; do
|
||||
case $1 in
|
||||
-c) instcmd="$cpprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd="$stripprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
*) if [ x"$src" = x ]
|
||||
then
|
||||
src=$1
|
||||
else
|
||||
# this colon is to work around a 386BSD /bin/sh bug
|
||||
:
|
||||
dst=$1
|
||||
fi
|
||||
shift
|
||||
continue;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ x"$src" = x ]
|
||||
then
|
||||
echo "install: no input file specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]; then
|
||||
dst=$src
|
||||
src=""
|
||||
|
||||
if [ -d $dst ]; then
|
||||
instcmd=:
|
||||
else
|
||||
instcmd=mkdir
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
|
||||
if [ -f $src -o -d $src ]
|
||||
then
|
||||
true
|
||||
else
|
||||
echo "install: $src does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "install: no destination specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
|
||||
if [ -d $dst ]
|
||||
then
|
||||
dst="$dst"/`basename $src`
|
||||
else
|
||||
true
|
||||
fi
|
||||
fi
|
||||
|
||||
## this sed command emulates the dirname command
|
||||
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if [ ! -d "$dstdir" ]; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-${defaultIFS}}"
|
||||
|
||||
oIFS="${IFS}"
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS="${oIFS}"
|
||||
|
||||
pathcomp=''
|
||||
|
||||
while [ $# -ne 0 ] ; do
|
||||
pathcomp="${pathcomp}${1}"
|
||||
shift
|
||||
|
||||
if [ ! -d "${pathcomp}" ] ;
|
||||
then
|
||||
$mkdirprog "${pathcomp}"
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
pathcomp="${pathcomp}/"
|
||||
done
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]
|
||||
then
|
||||
$doit $instcmd $dst &&
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
|
||||
else
|
||||
|
||||
# If we're going to rename the final executable, determine the name now.
|
||||
|
||||
if [ x"$transformarg" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
dstfile=`basename $dst $transformbasename |
|
||||
sed $transformarg`$transformbasename
|
||||
fi
|
||||
|
||||
# don't allow the sed command to completely eliminate the filename
|
||||
|
||||
if [ x"$dstfile" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# Make a temp file name in the proper directory.
|
||||
|
||||
dsttmp=$dstdir/#inst.$$#
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $instcmd $src $dsttmp &&
|
||||
|
||||
trap "rm -f ${dsttmp}" 0 &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits
|
||||
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
$doit $rmcmd -f $dstdir/$dstfile &&
|
||||
$doit $mvcmd $dsttmp $dstdir/$dstfile
|
||||
|
||||
fi &&
|
||||
|
||||
|
||||
exit 0
|
@ -1,9 +0,0 @@
|
||||
.deps
|
||||
.depend
|
||||
Makefile
|
||||
Makefile.in
|
||||
getdate.c
|
||||
tagtable.c
|
||||
.libs
|
||||
*.la
|
||||
*.lo
|
336
missing
336
missing
@ -1,336 +0,0 @@
|
||||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
# Copyright 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run=:
|
||||
|
||||
# In the cases where this matters, `missing' is being run in the
|
||||
# srcdir already.
|
||||
if test -f configure.ac; then
|
||||
configure_ac=configure.ac
|
||||
else
|
||||
configure_ac=configure.in
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
shift
|
||||
"$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case "$1" in
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
--run try to run the given command, and emulate it if it fails
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
help2man touch the output file
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing 0.4 - GNU automake"
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aclocal*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`${configure_ac}'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
;;
|
||||
|
||||
autoheader)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case "$f" in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
esac
|
||||
done
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print |
|
||||
sed 's/\.am$/.in/' |
|
||||
while read f; do touch "$f"; done
|
||||
;;
|
||||
|
||||
autom4te)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and you do not seem to have it handy on your
|
||||
system. You might have modified some files without having the
|
||||
proper tools for further handling them.
|
||||
You can get \`$1Help2man' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
|
||||
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo "#! /bin/sh"
|
||||
echo "# Created by GNU Automake missing as a replacement of"
|
||||
echo "# $ $@"
|
||||
echo "exit 0"
|
||||
chmod +x $file
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
bison|yacc)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f y.tab.h ]; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if [ ! -f y.tab.c ]; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex|flex)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f lex.yy.c ]; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
help2man)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a dependency of a manual page. You may need the
|
||||
\`Help2man' package in order for those modifications to take
|
||||
effect. You can get \`Help2man' from any GNU archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
|
||||
fi
|
||||
if [ -f "$file" ]; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo ".ab help2man is required to generate this page"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo)
|
||||
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
|
||||
# We have makeinfo, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
|
||||
fi
|
||||
touch $file
|
||||
;;
|
||||
|
||||
tar)
|
||||
shift
|
||||
if test -n "$run"; then
|
||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# We have already tried tar in the generic part.
|
||||
# Look for gnutar/gtar before invocation to avoid ugly error
|
||||
# messages.
|
||||
if (gnutar --version > /dev/null 2>&1); then
|
||||
gnutar ${1+"$@"} && exit 0
|
||||
fi
|
||||
if (gtar --version > /dev/null 2>&1); then
|
||||
gtar ${1+"$@"} && exit 0
|
||||
fi
|
||||
firstarg="$1"
|
||||
if shift; then
|
||||
case "$firstarg" in
|
||||
*o*)
|
||||
firstarg=`echo "$firstarg" | sed s/o//`
|
||||
tar "$firstarg" ${1+"$@"} && exit 0
|
||||
;;
|
||||
esac
|
||||
case "$firstarg" in
|
||||
*h*)
|
||||
firstarg=`echo "$firstarg" | sed s/h//`
|
||||
tar "$firstarg" ${1+"$@"} && exit 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
||||
You may want to install GNU tar or Free paxutils, or check the
|
||||
command line arguments."
|
||||
exit 1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and you do not seem to have it handy on your
|
||||
system. You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequirements for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
@ -1,39 +0,0 @@
|
||||
#! /bin/sh
|
||||
# mkinstalldirs --- make directory hierarchy
|
||||
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
# Created: 1993-05-16
|
||||
# Public domain
|
||||
|
||||
|
||||
errstatus=0
|
||||
|
||||
for file
|
||||
do
|
||||
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
|
||||
shift
|
||||
|
||||
pathcomp=
|
||||
for d
|
||||
do
|
||||
pathcomp="$pathcomp$d"
|
||||
case "$pathcomp" in
|
||||
-* ) pathcomp=./$pathcomp ;;
|
||||
esac
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp" 1>&2
|
||||
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
|
||||
pathcomp="$pathcomp/"
|
||||
done
|
||||
done
|
||||
|
||||
exit $errstatus
|
||||
|
||||
# mkinstalldirs ends here
|
@ -1,7 +0,0 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
POTFILES
|
||||
stamp-cat-id
|
||||
cat-id-tbl.c
|
||||
*.mo
|
||||
*.gmo
|
@ -1,260 +0,0 @@
|
||||
# Makefile for program source directory in GNU NLS utilities package.
|
||||
# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
|
||||
#
|
||||
# This file file be copied and used freely without restrictions. It can
|
||||
# be used in projects which are not available under the GNU Public License
|
||||
# but which still want to provide support for the GNU gettext functionality.
|
||||
# Please note that the actual code is *not* freely available.
|
||||
|
||||
PACKAGE = @PACKAGE@
|
||||
VERSION = @VERSION@
|
||||
|
||||
SHELL = /bin/sh
|
||||
@SET_MAKE@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
datadir = $(prefix)/@DATADIRNAME@
|
||||
localedir = $(datadir)/locale
|
||||
gnulocaledir = $(prefix)/share/locale
|
||||
gettextsrcdir = $(prefix)/share/gettext/po
|
||||
subdir = po
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@
|
||||
|
||||
CC = @CC@
|
||||
GENCAT = @GENCAT@
|
||||
GMSGFMT = PATH=../intl:$$PATH @GMSGFMT@
|
||||
MSGFMT = @MSGFMT@
|
||||
XGETTEXT = PATH=../intl:$$PATH @XGETTEXT@
|
||||
MSGMERGE = PATH=../intl:$$PATH msgmerge
|
||||
|
||||
DEFS = @DEFS@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
|
||||
INCLUDES = -I.. -I$(top_srcdir)/intl
|
||||
|
||||
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
|
||||
|
||||
SOURCES = cat-id-tbl.c
|
||||
POFILES = @POFILES@
|
||||
GMOFILES = @GMOFILES@
|
||||
DISTFILES = Makefile.in.in POTFILES.in $(PACKAGE).pot \
|
||||
stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES)
|
||||
|
||||
POTFILES = \
|
||||
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) $<
|
||||
|
||||
.po.pox:
|
||||
$(MAKE) $(PACKAGE).pot
|
||||
$(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
|
||||
|
||||
.po.mo:
|
||||
$(MSGFMT) -o $@ $<
|
||||
|
||||
.po.gmo:
|
||||
file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
|
||||
&& rm -f $$file && $(GMSGFMT) -o $$file $<
|
||||
|
||||
.po.cat:
|
||||
sed -f ../intl/po2msg.sed < $< > $*.msg \
|
||||
&& rm -f $@ && $(GENCAT) $@ $*.msg
|
||||
|
||||
|
||||
all: all-@USE_NLS@
|
||||
|
||||
all-yes: cat-id-tbl.c $(CATALOGS)
|
||||
all-no:
|
||||
|
||||
$(srcdir)/$(PACKAGE).pot: $(POTFILES)
|
||||
$(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
|
||||
--add-comments --keyword=_ --keyword=N_ --keyword=RPM_ \
|
||||
--files-from=$(srcdir)/POTFILES.in \
|
||||
&& test ! -f $(PACKAGE).po \
|
||||
|| ( rm -f $(srcdir)/$(PACKAGE).pot \
|
||||
&& mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot )
|
||||
|
||||
$(srcdir)/cat-id-tbl.c: stamp-cat-id; @:
|
||||
$(srcdir)/stamp-cat-id: $(PACKAGE).pot
|
||||
rm -f cat-id-tbl.tmp
|
||||
sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \
|
||||
| sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp
|
||||
if cmp -s cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; then \
|
||||
rm cat-id-tbl.tmp; \
|
||||
else \
|
||||
echo cat-id-tbl.c changed; \
|
||||
rm -f $(srcdir)/cat-id-tbl.c; \
|
||||
mv cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; \
|
||||
fi
|
||||
cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id
|
||||
|
||||
|
||||
install: install-exec install-data
|
||||
install-exec:
|
||||
install-data: install-data-@USE_NLS@
|
||||
install-data-no: all
|
||||
install-data-yes: all
|
||||
if test -x "$(MKINSTALLDIRS)"; then \
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
|
||||
else \
|
||||
$(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \
|
||||
fi
|
||||
@catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
case "$$cat" in \
|
||||
*.gmo) destdir=$(DESTDIR)$(gnulocaledir);; \
|
||||
*) destdir=$(DESTDIR)$(localedir);; \
|
||||
esac; \
|
||||
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
|
||||
dir=$$destdir/$$lang/LC_MESSAGES; \
|
||||
if test -r "$(MKINSTALLDIRS)"; then \
|
||||
$(MKINSTALLDIRS) $$dir; \
|
||||
else \
|
||||
$(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \
|
||||
fi; \
|
||||
if test -r $$cat; then \
|
||||
$(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
|
||||
echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
|
||||
else \
|
||||
$(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
|
||||
echo "installing $(srcdir)/$$cat as" \
|
||||
"$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
|
||||
fi; \
|
||||
if test -r $$cat.m; then \
|
||||
$(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
|
||||
echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
|
||||
else \
|
||||
if test -r $(srcdir)/$$cat.m ; then \
|
||||
$(INSTALL_DATA) $(srcdir)/$$cat.m \
|
||||
$$dir/$(PACKAGE)$(INSTOBJEXT).m; \
|
||||
echo "installing $(srcdir)/$$cat as" \
|
||||
"$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
|
||||
else \
|
||||
true; \
|
||||
fi; \
|
||||
fi; \
|
||||
done
|
||||
if test "$(PACKAGE)" = "gettext"; then \
|
||||
if test -x "$(MKINSTALLDIRS)"; then \
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \
|
||||
else \
|
||||
$(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \
|
||||
fi; \
|
||||
$(INSTALL_DATA) $(srcdir)/Makefile.in.in \
|
||||
$(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
|
||||
else \
|
||||
: ; \
|
||||
fi
|
||||
|
||||
# Define this as empty until I found a useful application.
|
||||
installcheck:
|
||||
|
||||
uninstall:
|
||||
catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
|
||||
rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
|
||||
rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
|
||||
done
|
||||
|
||||
check: all
|
||||
|
||||
cat-id-tbl.o: ../intl/libgettext.h
|
||||
|
||||
dvi info tags TAGS ID:
|
||||
|
||||
mostlyclean:
|
||||
rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp
|
||||
rm -fr *.o
|
||||
|
||||
clean: mostlyclean
|
||||
|
||||
distclean: clean
|
||||
rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
|
||||
|
||||
maintainer-clean: distclean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
rm -f $(GMOFILES)
|
||||
|
||||
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
dist distdir: update-po $(DISTFILES)
|
||||
dists="$(DISTFILES)"; \
|
||||
for file in $$dists; do \
|
||||
ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|
||||
|| cp -p $(srcdir)/$$file $(distdir); \
|
||||
done
|
||||
|
||||
update-po: Makefile
|
||||
$(MAKE) $(PACKAGE).pot
|
||||
PATH=`pwd`/../intl:$$PATH; \
|
||||
cd $(srcdir); \
|
||||
catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
|
||||
mv $$lang.po $$lang.old.po; \
|
||||
echo "$$lang:"; \
|
||||
if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \
|
||||
rm -f $$lang.old.po; \
|
||||
else \
|
||||
echo "msgmerge for $$cat failed!"; \
|
||||
rm -f $$lang.po; \
|
||||
mv $$lang.old.po $$lang.po; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
refresh-po: Makefile
|
||||
catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
|
||||
if $(MSGMERGE) $$lang.po $(PACKAGE).pot > $$lang.pot ; then \
|
||||
echo "$(MSGMERGE) of $$lang succeeded" ; \
|
||||
mv -f $$lang.pot $$lang.po ; \
|
||||
else \
|
||||
echo "$(MSGMERGE) of $$lang failed" ; \
|
||||
rm -f $$lang.pot ; \
|
||||
fi \
|
||||
done
|
||||
|
||||
POTFILES: POTFILES.in
|
||||
( if test 'x$(srcdir)' != 'x.'; then \
|
||||
posrcprefix='$(top_srcdir)/'; \
|
||||
else \
|
||||
posrcprefix="../"; \
|
||||
fi; \
|
||||
rm -f $@-t $@ \
|
||||
&& (sed -e '/^#/d' -e '/^[ ]*$$/d' \
|
||||
-e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
|
||||
| sed -e '$$s/\\$$//') > $@-t \
|
||||
&& chmod a-w $@-t \
|
||||
&& mv $@-t $@ )
|
||||
|
||||
Makefile: Makefile.in.in ../config.status POTFILES
|
||||
cd .. \
|
||||
&& CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
|
||||
$(SHELL) ./config.status
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make not to export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
@ -1,7 +0,0 @@
|
||||
.deps
|
||||
Makefile
|
||||
Makefile.in
|
||||
config.h.in
|
||||
.libs
|
||||
*.la
|
||||
*.lo
|
38
rpm-4_0.spec
38
rpm-4_0.spec
@ -18,7 +18,6 @@ Release: alt77.M40.25
|
||||
%def_with libelf
|
||||
%def_without apidocs
|
||||
%def_without db
|
||||
%def_without contrib
|
||||
%def_without build_topdir
|
||||
|
||||
# XXX enable at your own risk, CDB access to rpmdb isn't cooked yet.
|
||||
@ -130,13 +129,6 @@ License: GPL
|
||||
Group: System/Configuration/Packaging
|
||||
PreReq: %name = %version-%release
|
||||
|
||||
%package contrib
|
||||
Summary: Contributed scripts and executable programs which aren't currently used
|
||||
Summary(ru_RU.KOI8-R): æÁÊÌÙ, ÎÅ ÉÓÐÏÌØÚÕÅÍÙÅ × ÎÁÓÔÏÑÝÅÅ ×ÒÅÍÑ
|
||||
License: GPL
|
||||
Group: Development/Other
|
||||
PreReq: %name-build = %version-%release
|
||||
|
||||
%description
|
||||
The RPM Package Manager (RPM) is a powerful command line driven
|
||||
package management system capable of installing, uninstalling,
|
||||
@ -188,10 +180,6 @@ This package contains RPM package installation and build directory tree.
|
||||
%description static
|
||||
This package contains statically linked version of the RPM program.
|
||||
|
||||
%description contrib
|
||||
This package contains extra scripts and executable programs which arent
|
||||
currently used.
|
||||
|
||||
%if_with python
|
||||
%package -n python-module-rpm
|
||||
Version: %{rpm_version}_%__python_version
|
||||
@ -290,7 +278,7 @@ touch %buildroot%_localstatedir/%name/files-awaiting-filetriggers
|
||||
# Prepare documentation.
|
||||
bzip2 -9 CHANGES ||:
|
||||
mkdir -p %buildroot%_docdir/%name-%rpm_version
|
||||
install -p -m644 CHANGES* CREDITS README README.ALT* RPM-GPG-KEY RPM-PGP-KEY \
|
||||
install -p -m644 CHANGES* CREDITS README README.ALT* \
|
||||
%buildroot%_docdir/%name-%rpm_version/
|
||||
cp -a doc/manual %buildroot%_docdir/%name-%rpm_version/
|
||||
rm -f %buildroot%_docdir/%name-%rpm_version/manual/{Makefile*,buildroot}
|
||||
@ -448,7 +436,6 @@ fi
|
||||
%rpmattr %_rpmlibdir/brp-*
|
||||
%rpmattr %_rpmlibdir/*_files
|
||||
%rpmattr %_rpmlibdir/check-files
|
||||
%rpmattr %_rpmlibdir/convertrpmrc.sh
|
||||
%rpmattr %_rpmlibdir/ldd
|
||||
%rpmattr %_rpmlibdir/rpm2cpio.sh
|
||||
%rpmattr %_rpmlibdir/find-lang
|
||||
@ -456,14 +443,11 @@ fi
|
||||
%rpmattr %_rpmlibdir/find-provides
|
||||
%rpmattr %_rpmlibdir/find-requires
|
||||
%rpmattr %_rpmlibdir/fixup-*
|
||||
%rpmattr %_rpmlibdir/http.req
|
||||
%rpmattr %_rpmlibdir/files.*
|
||||
%rpmattr %_rpmlibdir/pam.*
|
||||
%rpmattr %_rpmlibdir/pkgconfig.*
|
||||
%rpmattr %_rpmlibdir/shell.*
|
||||
%rpmattr %_rpmlibdir/sql.*
|
||||
%rpmattr %_rpmlibdir/verify-elf
|
||||
%rpmattr %_rpmlibdir/Specfile.pm
|
||||
%rpmattr %_rpmlibdir/*.awk
|
||||
|
||||
%_mandir/man?/gendiff.*
|
||||
@ -489,26 +473,6 @@ fi
|
||||
%_bindir/rpm.static
|
||||
%_bindir/rpm2cpio.static
|
||||
|
||||
%if_with contrib
|
||||
%files contrib
|
||||
%rpmattr %dir %_rpmlibdir
|
||||
%rpmattr %_rpmlibdir/cpanflute*
|
||||
%rpmattr %_rpmlibdir/cross-build
|
||||
%rpmattr %_rpmlibdir/find-prov.pl
|
||||
%rpmattr %_rpmlibdir/find-provides.perl
|
||||
%rpmattr %_rpmlibdir/find-req.pl
|
||||
%rpmattr %_rpmlibdir/find-requires.perl
|
||||
%rpmattr %_rpmlibdir/get_magic.pl
|
||||
%rpmattr %_rpmlibdir/getpo.sh
|
||||
%rpmattr %_rpmlibdir/javadeps
|
||||
%rpmattr %_rpmlibdir/magic.*
|
||||
%rpmattr %_rpmlibdir/rpmdiff*
|
||||
%rpmattr %_rpmlibdir/trpm
|
||||
%rpmattr %_rpmlibdir/u_pkg.sh
|
||||
%rpmattr %_rpmlibdir/vpkg-provides.sh
|
||||
%rpmattr %_rpmlibdir/vpkg-provides2.sh
|
||||
%endif #with contrib
|
||||
|
||||
%changelog
|
||||
* Tue Sep 29 2009 Alexey Tourbin <at@altlinux.ru> 4.0.4-alt77.M40.25
|
||||
- build/parsePrep.c (doUntar): Remove "-L" option from "unzip" invocation
|
||||
|
21
rpm.magic
21
rpm.magic
@ -1,21 +0,0 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# RPM: file(1) magic for Red Hat Packages
|
||||
#
|
||||
0 beshort 0xedab
|
||||
>2 beshort 0xeedb RPM
|
||||
>>4 byte x v%d
|
||||
>>6 beshort 0 bin
|
||||
>>6 beshort 1 src
|
||||
>>8 beshort 1 i386
|
||||
>>8 beshort 2 Alpha
|
||||
>>8 beshort 3 Sparc
|
||||
>>8 beshort 4 MIPS big endian
|
||||
>>8 beshort 5 PowerPC
|
||||
>>8 beshort 6 68000
|
||||
>>8 beshort 7 SGI
|
||||
>>8 beshort 8 RS6000
|
||||
>>8 beshort 10 Sparc 64bit
|
||||
>>8 beshort 11 MIPS little endian
|
||||
>>8 beshort 12 ARM
|
||||
>>10 string x %s
|
@ -1,9 +0,0 @@
|
||||
.deps
|
||||
.depend
|
||||
.created
|
||||
Makefile
|
||||
Makefile.in
|
||||
.libs
|
||||
db3lobjs
|
||||
*.la
|
||||
*.lo
|
@ -1,11 +0,0 @@
|
||||
.created
|
||||
.deps
|
||||
.depend
|
||||
Makefile
|
||||
Makefile.in
|
||||
.libs
|
||||
*.la
|
||||
*.lo
|
||||
tdigest
|
||||
tkey
|
||||
trpmio
|
@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = 1.4 foreign
|
||||
|
||||
EXTRA_DIST = tdigest.c tficl.c tkey.c trpmio.c
|
||||
|
||||
EXTRA_PROGRAMS = tdigest tkey tring trpmio dumpasn1
|
||||
EXTRA_PROGRAMS = tdigest tkey tring trpmio
|
||||
|
||||
INCLUDES = -I. @INCPATH@
|
||||
|
||||
@ -37,8 +37,6 @@ tring_SOURCES = tring.c
|
||||
tring_LDFLAGS = -all-static
|
||||
tring_LDADD = librpmio.la @LIBPOPT@
|
||||
|
||||
dumpasn1_SOURCES = dumpasn1.c
|
||||
|
||||
.PHONY: sources
|
||||
sources:
|
||||
@echo $(librpmio_la_SOURCES:%=rpmio/%)
|
||||
|
1936
rpmio/dumpasn1.c
1936
rpmio/dumpasn1.c
File diff suppressed because it is too large
Load Diff
4973
rpmio/dumpasn1.cfg
4973
rpmio/dumpasn1.cfg
File diff suppressed because it is too large
Load Diff
@ -1,3 +0,0 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
brp-redhat
|
@ -6,16 +6,14 @@ EXTRA_DIST = \
|
||||
posttrans-filetriggers 0ldconfig.filetrigger \
|
||||
brp-adjust_libraries brp-alt brp-bytecompile_python \
|
||||
brp-cleanup brp-compress brp-fix-perms brp-fixup brp-strip brp-verify_elf \
|
||||
compress_files check-files convertrpmrc.sh cross-build \
|
||||
find-lang find-package find-prov.pl find-req.pl \
|
||||
cpanflute cpanflute2 Specfile.pm find-provides.perl find-requires.perl \
|
||||
compress_files check-files \
|
||||
find-lang find-package \
|
||||
fixup-binconfig fixup-pkgconfig fixup-libtool fixup-libraries \
|
||||
get_magic.pl getpo.sh http.req \
|
||||
functions files.req.list ldd magic.prov magic.req \
|
||||
pam.prov pam.req pkgconfig.prov pkgconfig.req perl.prov perl.req \
|
||||
rpmdiff rpmdiff.cgi rpm.daily rpm.log rpm.xinetd rpm2cpio.sh \
|
||||
shell.req shell.prov shlib.req.awk sql.prov sql.req strip_files \
|
||||
tcl.req trpm u_pkg.sh verify-elf vpkg-provides.sh vpkg-provides2.sh
|
||||
functions files.req.list ldd \
|
||||
pam.prov pam.req pkgconfig.prov pkgconfig.req \
|
||||
rpm2cpio.sh \
|
||||
shell.req shell.prov shlib.req.awk strip_files \
|
||||
verify-elf
|
||||
|
||||
installprefix = $(DESTDIR)
|
||||
|
||||
@ -26,13 +24,11 @@ config_SCRIPTS = \
|
||||
posttrans-filetriggers 0ldconfig.filetrigger \
|
||||
brp-adjust_libraries brp-alt brp-bytecompile_python \
|
||||
brp-cleanup brp-compress brp-fix-perms brp-fixup brp-strip brp-verify_elf \
|
||||
compress_files check-files convertrpmrc.sh cross-build \
|
||||
find-lang find-package find-prov.pl find-req.pl \
|
||||
cpanflute cpanflute2 Specfile.pm find-provides.perl find-requires.perl \
|
||||
compress_files check-files \
|
||||
find-lang find-package \
|
||||
fixup-binconfig fixup-pkgconfig fixup-libtool fixup-libraries \
|
||||
get_magic.pl getpo.sh http.req \
|
||||
functions files.req.list ldd magic.prov magic.req \
|
||||
pam.prov pam.req pkgconfig.prov pkgconfig.req perl.prov perl.req \
|
||||
rpmdiff rpmdiff.cgi rpm.daily rpm.log rpm.xinetd rpm2cpio.sh \
|
||||
shell.req shell.prov shlib.req.awk sql.prov sql.req strip_files \
|
||||
tcl.req trpm u_pkg.sh verify-elf vpkg-provides.sh vpkg-provides2.sh
|
||||
functions files.req.list ldd \
|
||||
pam.prov pam.req pkgconfig.prov pkgconfig.req \
|
||||
rpm2cpio.sh \
|
||||
shell.req shell.prov shlib.req.awk strip_files \
|
||||
verify-elf
|
||||
|
@ -1,193 +0,0 @@
|
||||
package RPM::Specfile;
|
||||
|
||||
use POSIX;
|
||||
|
||||
use strict;
|
||||
|
||||
use vars qw/$VERSION/;
|
||||
|
||||
$VERSION = '1.02';
|
||||
|
||||
sub new {
|
||||
my $class = shift;
|
||||
|
||||
my $self = bless { }, $class;
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
my @simple_accessors = qw/name version release epoch license group url description prep build clean install summary buildroot buildrequires file_param packager vendor distribution buildarch/;
|
||||
|
||||
foreach my $field (@simple_accessors) {
|
||||
my $sub = q {
|
||||
sub RPM::Specfile::[[field]] {
|
||||
my $self = shift;
|
||||
if (@_) {
|
||||
my $value = shift;
|
||||
$self->{__[[field]]__} = $value;
|
||||
}
|
||||
return $self->{__[[field]]__};
|
||||
}
|
||||
};
|
||||
|
||||
$sub =~ s/\[\[field\]\]/$field/g;
|
||||
eval $sub;
|
||||
|
||||
if ($@) {
|
||||
die $@;
|
||||
}
|
||||
}
|
||||
|
||||
my @array_accessors = qw/source patch changelog provide require file/;
|
||||
|
||||
foreach my $field (@array_accessors) {
|
||||
my $sub = q {
|
||||
sub RPM::Specfile::[[field]] {
|
||||
my $self = shift;
|
||||
$self->{__[[field]]__} ||= [ ];
|
||||
|
||||
if (@_) {
|
||||
my $index = shift;
|
||||
if (@_) {
|
||||
my $value = shift;
|
||||
$self->{__[[field]]__}->[$index] = $value;
|
||||
}
|
||||
return $self->{__[[field]]__}->[$index];
|
||||
}
|
||||
else {
|
||||
return @{$self->{__[[field]]__}};
|
||||
}
|
||||
}
|
||||
|
||||
sub RPM::Specfile::push_[[field]] {
|
||||
my $self = shift;
|
||||
my $entry = shift;
|
||||
|
||||
$self->{__[[field]]__} ||= [ ];
|
||||
push @{$self->{__[[field]]__}}, $entry;
|
||||
}
|
||||
|
||||
sub RPM::Specfile::clear_[[field]] {
|
||||
my $self = shift;
|
||||
my $entry = shift;
|
||||
|
||||
$self->{__[[field]]__} = [ ];
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
$sub =~ s/\[\[field\]\]/$field/g;
|
||||
eval $sub;
|
||||
|
||||
if ($@) {
|
||||
die $@;
|
||||
}
|
||||
}
|
||||
|
||||
sub add_changelog_entry {
|
||||
my $self = shift;
|
||||
my $who = shift;
|
||||
my $entry = shift;
|
||||
|
||||
my $output;
|
||||
$output .= strftime("* %a %b %d %Y $who\n", localtime time);
|
||||
$output .= "- $entry\n";
|
||||
|
||||
$self->push_changelog($output);
|
||||
}
|
||||
|
||||
sub generate_specfile {
|
||||
my $self = shift;
|
||||
|
||||
my $output;
|
||||
|
||||
my %defaults = ( buildroot => "%{_tmppath}/%{name}-root" );
|
||||
$self->$_($self->$_() || $defaults{$_}) foreach keys %defaults;
|
||||
|
||||
my %proper_names = ( url => "URL", buildroot => "BuildRoot", "buildrequires" => "BuildRequires" );
|
||||
|
||||
foreach my $tag (qw/name version release epoch packager vendor distribution summary license group url buildroot buildrequires buildarch/) {
|
||||
my $proper = $proper_names{$tag} || ucfirst $tag;
|
||||
|
||||
next unless defined $self->$tag();
|
||||
$output .= "$proper: " . $self->$tag() . "\n";
|
||||
}
|
||||
|
||||
my @reqs = $self->require;
|
||||
for my $i (0 .. $#reqs) {
|
||||
$output .= "Requires: $reqs[$i]\n";
|
||||
}
|
||||
|
||||
my @sources = $self->source;
|
||||
for my $i (0 .. $#sources) {
|
||||
$output .= "Source$i: $sources[$i]\n";
|
||||
}
|
||||
|
||||
my @patches = $self->patch;
|
||||
for my $i (0 .. $#patches) {
|
||||
$output .= "Patch$i: $patches[$i]\n";
|
||||
}
|
||||
|
||||
$output .= "\n";
|
||||
|
||||
foreach my $sect (qw/description prep build clean install/) {
|
||||
$output .= "%$sect\n";
|
||||
$output .= $self->$sect() . "\n";
|
||||
}
|
||||
|
||||
if ($self->file_param) {
|
||||
$output .= "%files " . $self->file_param . "\n";
|
||||
}
|
||||
else {
|
||||
$output .= "%files\n";
|
||||
}
|
||||
$output .= "$_\n" foreach $self->file;
|
||||
|
||||
$output .= "\n%changelog\n";
|
||||
$output .= "$_\n" foreach $self->changelog;
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
sub write_specfile {
|
||||
my $self = shift;
|
||||
my $dest = shift;
|
||||
|
||||
open FH, ">$dest"
|
||||
or die "Can't open $dest: $!";
|
||||
|
||||
print FH $self->generate_specfile;
|
||||
|
||||
close FH;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
# Below is stub documentation for your module. You better edit it!
|
||||
|
||||
=head1 NAME
|
||||
|
||||
RPM::Specfile - Perl extension for creating RPM Specfiles
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use RPM::Specfile;
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Simple module for creation of RPM Spec files
|
||||
|
||||
=head2 EXPORT
|
||||
|
||||
None by default.
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Chip Turner <cturner@redhat.com>
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<perl>.
|
||||
|
||||
=cut
|
@ -1,115 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Convert per-system configuration in /etc/rpmrc to macros in /etc/rpm/macros.
|
||||
#
|
||||
# prereq: awk coreutils mktemp
|
||||
#
|
||||
|
||||
RPMRC=$1
|
||||
[ -n "$RPMRC" ] || RPMRC=/etc/rpmrc
|
||||
MACROS=$2
|
||||
[ -n "$MACROS" ] || MACROS=/etc/rpm/macros
|
||||
# for testing
|
||||
#RPMRC=/tmp/rpmrc
|
||||
#MACROS=/tmp/macros
|
||||
|
||||
[ -f "$RPMRC" ] || exit 0
|
||||
|
||||
[ -f "$MACROS" ] && {
|
||||
echo "$MACROS already exists" 1>&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
DIRN="`dirname $MACROS`"
|
||||
[ -d "$DIRN" ] || mkdir -p "$DIRN"
|
||||
[ -d "$DIRN" ] || {
|
||||
echo "could not create directory $DIRN" 1>&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
TMP="$(mktemp -t rpmrc.XXXXXXXXXX)" || {
|
||||
echo could not create temp file 1>&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
exit_handler()
|
||||
{
|
||||
local rc=$?
|
||||
trap - EXIT
|
||||
rm -f -- "$TMP"
|
||||
exit $rc
|
||||
}
|
||||
|
||||
trap exit_handler SIGHUP SIGINT SIGTERM SIGQUIT SIGPIPE EXIT
|
||||
|
||||
awk 'BEGIN {
|
||||
macros="'"$MACROS"'"
|
||||
# direct translation except underscore prepended
|
||||
xlate["builddir"] = "_builddir"
|
||||
xlate["buildshell"] = "_buildshell"
|
||||
xlate["bzip2bin"] = "_bzip2bin"
|
||||
xlate["dbpath"] = "_dbpath"
|
||||
xlate["defaultdocdir"] = "_defaultdocdir"
|
||||
xlate["excludedocs"] = "_excludedocs"
|
||||
xlate["ftpport"] = "_ftpport"
|
||||
xlate["ftpproxy"] = "_ftpproxy"
|
||||
xlate["gzipbin"] = "_gzipbin"
|
||||
xlate["instchangelog"] = "_instchangelog"
|
||||
xlate["langpatt"] = "_langpatt"
|
||||
xlate["netsharedpath"] = "_netsharedpath"
|
||||
xlate["pgp_name"] = "_pgp_name"
|
||||
xlate["pgp_path"] = "_pgp_path"
|
||||
xlate["rpmdir"] = "_rpmdir"
|
||||
xlate["rpmfilename"] = "_rpmfilename"
|
||||
xlate["signature"] = "_signature"
|
||||
xlate["sourcedir"] = "_sourcedir"
|
||||
xlate["specdir"] = "_specdir"
|
||||
xlate["srcrpmdir"] = "_srcrpmdir"
|
||||
xlate["timecheck"] = "_timecheck"
|
||||
xlate["tmppath"] = "_tmppath"
|
||||
xlate["topdir"] = "_topdir"
|
||||
|
||||
# direct translation with no underscore at all
|
||||
xlate["buildroot"] = "buildroot"
|
||||
xlate["distribution"] = "distribution"
|
||||
xlate["packager"] = "packager"
|
||||
xlate["vendor"] = "vendor"
|
||||
|
||||
# simply remove
|
||||
xlate["messagelevel"] = ""
|
||||
xlate["require_distribution"] = ""
|
||||
xlate["require_icon"] = ""
|
||||
xlate["require_vendor"] = ""
|
||||
}
|
||||
|
||||
{
|
||||
for (str in xlate) {
|
||||
ms = "^" str ":"
|
||||
if (match($1, ms)) {
|
||||
if (xlate[str]) {
|
||||
sub(ms, "%" xlate[str] " ")
|
||||
print >> macros
|
||||
}
|
||||
# else get ignore and thus get rid of obsolete items
|
||||
next
|
||||
}
|
||||
if (match ($1, "^fixperms:")) {
|
||||
sub("^fixperms:", "%_fixperms chmod -R ")
|
||||
print >> macros
|
||||
next
|
||||
}
|
||||
}
|
||||
print
|
||||
next
|
||||
}
|
||||
' < $RPMRC > $TMP || {
|
||||
echo "could not convert $RPMRC entries to $MACROS entries" 1>&2
|
||||
exit 1
|
||||
}
|
||||
if [ -s $TMP ] ; then
|
||||
# don't mess with timestamp unless we have actually changed something
|
||||
cat $TMP > $RPMRC && rm -f $TMP
|
||||
[ -f $TMP ] && { echo "could not overwrite $RPMRC" 1>&2 ; exit 1 ; }
|
||||
fi
|
||||
|
||||
exit 0
|
@ -1,173 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
# need this for hostname()
|
||||
use File::Basename;
|
||||
use Sys::Hostname;
|
||||
use Getopt::Long;
|
||||
use strict;
|
||||
|
||||
my $MainDir = '/tmp/cpan';
|
||||
|
||||
# set default options, then get options
|
||||
my %options=();
|
||||
$options{'email'}=(getpwuid($<))[0] . "\@altlinux.com" ;
|
||||
GetOptions(\%options, "email=s", "n=s", "create") || exit 1;
|
||||
|
||||
my $InputFile = $ARGV[0];
|
||||
my $create = '';
|
||||
|
||||
if ($options{'create'}) {
|
||||
$create = '-c';
|
||||
}
|
||||
|
||||
my $tarball = basename($InputFile);
|
||||
$tarball =~ /(\S+)\-(\S+)\.tar\.gz/;
|
||||
my $clm_name=$1;
|
||||
my $clm_version=$2;
|
||||
|
||||
my $class = dirname($InputFile);
|
||||
$class =~ s/^\.\/[0-9][0-9]_//;
|
||||
if ($class ne '.') {
|
||||
$class = "($class)";
|
||||
} else {
|
||||
$class = "";
|
||||
}
|
||||
|
||||
# Change ::'s to -'s
|
||||
$clm_name =~ s/::/-/g;
|
||||
|
||||
my $clm_changelog = get_changelog();
|
||||
|
||||
# complain if either parameter is missing
|
||||
($clm_name eq "") && die "Module name not specified\n";
|
||||
($clm_version eq "") && die "Module version not specified\n";
|
||||
|
||||
# Create and Open file to create SPEC files.
|
||||
mkdir($MainDir, 0755);
|
||||
system("cp $InputFile $MainDir");
|
||||
my $filename = $clm_name . '.spec';
|
||||
open (FILE, "> $MainDir/$filename");
|
||||
|
||||
# Print the spec file. Lots of substitutions here.
|
||||
print FILE "Summary: $clm_name module for perl $class
|
||||
Name: perl-$clm_name
|
||||
Version: $clm_version
|
||||
Release: 7
|
||||
Copyright: distributable
|
||||
Group: Applications/CPAN
|
||||
Source0: $clm_name-$clm_version.tar.gz
|
||||
Url: http://www.cpan.org
|
||||
BuildRoot: %{_tmppath}/perl-$clm_name-buildroot/
|
||||
BuildRequires: perl >= 0:5.00503
|
||||
Requires: perl >= 0:5.00503
|
||||
|
||||
%description
|
||||
$clm_name module for perl
|
||||
|
||||
# Provide perl-specific find-{provides,requires}.
|
||||
%define __find_provides /usr/lib/rpm/find-provides.perl
|
||||
%define __find_requires /usr/lib/rpm/find-requires.perl
|
||||
|
||||
%prep
|
||||
%setup -q -n $clm_name-%{version} $create
|
||||
|
||||
%build
|
||||
CFLAGS=\"\$RPM_OPT_FLAGS\" perl Makefile.PL
|
||||
make
|
||||
|
||||
%clean
|
||||
rm -rf \$RPM_BUILD_ROOT
|
||||
|
||||
%install
|
||||
rm -rf \$RPM_BUILD_ROOT
|
||||
eval `perl '-V:installarchlib'`
|
||||
mkdir -p \$RPM_BUILD_ROOT/\$installarchlib
|
||||
make PREFIX=\$RPM_BUILD_ROOT/usr install
|
||||
|
||||
[ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress
|
||||
|
||||
find \$RPM_BUILD_ROOT/usr -type f -print | \
|
||||
sed \"s\@^\$RPM_BUILD_ROOT\@\@g\" | \
|
||||
grep -v perllocal.pod | \
|
||||
grep -v \"\\.packlist\" > $clm_name-$clm_version-filelist
|
||||
if [ \"\$(cat $clm_name-$clm_version-filelist)X\" = \"X\" ] ; then
|
||||
echo \"ERROR: EMPTY FILE LIST\"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
%files -f $clm_name-$clm_version-filelist
|
||||
%defattr(-,root,root)
|
||||
|
||||
%changelog
|
||||
* $clm_changelog
|
||||
- Spec file was autogenerated.
|
||||
";
|
||||
close(FILE);
|
||||
|
||||
# Now build the rpm
|
||||
create_rcfiles();
|
||||
|
||||
open (LOG, "> $MainDir/LogFile");
|
||||
build_rpm();
|
||||
close LOG;
|
||||
|
||||
sub cleanup {
|
||||
unlink "$MainDir/$filename";
|
||||
unlink "$MainDir/$tarball";
|
||||
}
|
||||
|
||||
sub build_rpm {
|
||||
my $retval;
|
||||
|
||||
# First, make sure it unpacks cleanely
|
||||
system("rpm --rcfile $MainDir/rpmrc -bp $MainDir/$filename");
|
||||
$retval = $? >> 8;
|
||||
if ($retval != 0) {
|
||||
print "RPM test unpacking failed!\n";
|
||||
print LOG "PREP failed: $filename\n";
|
||||
return;
|
||||
}
|
||||
|
||||
system("rpm --rcfile $MainDir/rpmrc -bs --rmsource --rmspec --clean $MainDir/$filename");
|
||||
$retval = $? >> 8;
|
||||
if ($retval != 0) {
|
||||
print "RPM building failed!\n";
|
||||
print LOG "SOURCE failed: $filename\n";
|
||||
return;
|
||||
}
|
||||
cleanup();
|
||||
}
|
||||
|
||||
sub create_rcfiles {
|
||||
open(MACROS, "> $MainDir/macros");
|
||||
print MACROS qq{
|
||||
%_topdir $MainDir
|
||||
%_builddir %{_topdir}/junk
|
||||
%_rpmdir %{_topdir}
|
||||
%_sourcedir %{_topdir}
|
||||
%_specdir %{_topdir}
|
||||
%_srcrpmdir %{_topdir}/temp
|
||||
};
|
||||
close(MACROS);
|
||||
|
||||
open(RPMRC, "> $MainDir/rpmrc");
|
||||
print RPMRC qq{
|
||||
include: /usr/lib/rpm/rpmrc
|
||||
macrofiles: /usr/lib/rpm/macros:$MainDir/macros
|
||||
};
|
||||
close(RPMRC);
|
||||
}
|
||||
|
||||
sub get_changelog {
|
||||
# generate the changelog entry from available system info
|
||||
my ($name);
|
||||
|
||||
$name = (getpwuid($<))[6];
|
||||
$name = (split(",", $name))[0];
|
||||
return ("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat")[(localtime)[6]] . " " .
|
||||
("Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
||||
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec")[(localtime)[4]] . " " .
|
||||
(localtime)[3] . " " . (1900+(localtime)[5]) . " " .
|
||||
$name . " <" . $options{'email'} . ">";
|
||||
}
|
||||
|
@ -1,160 +0,0 @@
|
||||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
|
||||
use Getopt::Long;
|
||||
use File::Basename;
|
||||
use File::Copy;
|
||||
use Archive::Tar;
|
||||
|
||||
use lib '/usr/lib/rpm';
|
||||
use Specfile;
|
||||
|
||||
my %options;
|
||||
|
||||
GetOptions(\%options, "outdir=s", "tmpdir=s", "email=s", "name=s", "create", "test", "epoch=n", "version=s", "release=s", "perlver=s", "patch=s", "noarch=s") or die_usage();
|
||||
|
||||
my $fullname = shift;
|
||||
|
||||
die_usage() unless $fullname;
|
||||
|
||||
my $tarball = basename($fullname);
|
||||
my $create = $options{create} || '';
|
||||
my $email = $options{email} || (getpwuid($<))[0] . '@altlinux.com';
|
||||
my $outdir = $options{outdir} || './';
|
||||
my $tmpdir = $options{tmpdir} || '/tmp';
|
||||
my $noarch = $options{noarch};
|
||||
|
||||
$tarball =~ /^(.+)\-([^-]+)\.tar\.gz$/;
|
||||
my $name = $options{name} || $1;
|
||||
my $ver = $options{version} || $2;
|
||||
|
||||
die "Module name/version not parsable from $tarball" unless $name and $ver;
|
||||
|
||||
$name =~ s/::/-/g;
|
||||
|
||||
copy($fullname, $tmpdir)
|
||||
or die "copy: $!";
|
||||
|
||||
$noarch = $options{noarch};
|
||||
|
||||
my $patchfile = '';
|
||||
if ($options{patch}) {
|
||||
copy($options{patch}, $tmpdir);
|
||||
$patchfile = $options{patch};
|
||||
}
|
||||
|
||||
my $spec = new RPM::Specfile;
|
||||
|
||||
my $perlver = "0:5.00503";
|
||||
if ($options{perlver} and $options{perlver} eq '5.6.1') {
|
||||
$perlver = "1:5.6.1";
|
||||
}
|
||||
|
||||
# some basic spec fields
|
||||
$spec->name("perl-$name");
|
||||
$spec->version($ver);
|
||||
$spec->release($options{release} || "8");
|
||||
$spec->epoch($options{epoch});
|
||||
$spec->summary("$name Perl module");
|
||||
$spec->description($spec->summary);
|
||||
$spec->group("Development/Libraries");
|
||||
$spec->license("distributable");
|
||||
$spec->buildrequires("perl >= $perlver");
|
||||
$spec->packager($email);
|
||||
$spec->add_changelog_entry($email, 'Specfile autogenerated');
|
||||
|
||||
$spec->buildarch('noarch') if $noarch;
|
||||
|
||||
# $spec->push_require(q|%(perl -MConfig -le 'if (defined $Config{useithreads}) { print "perl(:WITH_ITHREADS)" } else { print "perl(:WITHOUT_ITHREADS)" }')|);
|
||||
# $spec->push_require(q|%(perl -MConfig -le 'if (defined $Config{usethreads}) { print "perl(:WITH_THREADS)" } else { print "perl(:WITHOUT_THREADS)" }')|);
|
||||
# $spec->push_require(q|%(perl -MConfig -le 'if (defined $Config{uselargefiles}) { print "perl(:WITH_LARGEFILES)" } else { print "perl(:WITHOUT_LARGEFILES)" }')|);
|
||||
|
||||
$spec->push_source($tarball);
|
||||
$spec->push_patch(basename($patchfile))
|
||||
if $patchfile;
|
||||
|
||||
# make a URL that can actually possibly take you to the right place
|
||||
my $url_name = $name;
|
||||
$url_name =~ s/-/::/g;
|
||||
$url_name =~ s/([^a-zA-Z0-9])/sprintf "%%%x", ord $1/ge;
|
||||
$spec->url("http://search.cpan.org/search?mode=module&query=$url_name");
|
||||
|
||||
# now we get into the multiline tags. stolen mostly verbatim from
|
||||
# cpanflute1
|
||||
|
||||
my $patch = '';
|
||||
if ($patchfile) {
|
||||
$patch = "%patch0 -p1\n";
|
||||
}
|
||||
|
||||
$spec->prep("%setup -q -n $name-%{version} $create\n$patch");
|
||||
$spec->file_param("-f $name-$ver-filelist");
|
||||
$spec->push_file("%defattr(-,root,root)");
|
||||
|
||||
my $test_clause = '';
|
||||
$test_clause = "make test" if $options{test};
|
||||
|
||||
$spec->build(<<EOB);
|
||||
CFLAGS="\$RPM_OPT_FLAGS" perl Makefile.PL
|
||||
make
|
||||
$test_clause
|
||||
EOB
|
||||
|
||||
$spec->clean('rm -rf $RPM_BUILD_ROOT');
|
||||
my $inst = q{
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
eval `perl '-V:installarchlib'`
|
||||
mkdir -p $RPM_BUILD_ROOT/$installarchlib
|
||||
make PREFIX=$RPM_BUILD_ROOT/usr install
|
||||
|
||||
[ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress
|
||||
|
||||
find $RPM_BUILD_ROOT/usr -type f -print | \
|
||||
sed "s@^$RPM_BUILD_ROOT@@g" | \
|
||||
grep -v perllocal.pod | \
|
||||
grep -v "\.packlist" > $name-$ver-filelist
|
||||
if [ "$(cat $name-$ver-filelist)X" = "X" ] ; then
|
||||
echo "ERROR: EMPTY FILE LIST"
|
||||
exit -1
|
||||
fi
|
||||
};
|
||||
|
||||
$inst =~ s/\$name/$name/g;
|
||||
$inst =~ s/\$ver/$ver/g;
|
||||
|
||||
$spec->install($inst);
|
||||
|
||||
# write the spec file. create some macros.
|
||||
$spec->write_specfile("$tmpdir/perl-$name.spec");
|
||||
|
||||
open FH, ">$tmpdir/macros"
|
||||
or die "Can't create $tmpdir/macros: $!";
|
||||
|
||||
print FH qq{
|
||||
%_topdir $tmpdir
|
||||
%_builddir %{_topdir}
|
||||
%_rpmdir %{_topdir}
|
||||
%_sourcedir %{_topdir}
|
||||
%_specdir %{_topdir}
|
||||
%_srcrpmdir $outdir
|
||||
};
|
||||
|
||||
close FH;
|
||||
|
||||
open FH, ">$tmpdir/rpmrc"
|
||||
or die "Can't create $tmpdir/rpmrc: $!";
|
||||
|
||||
print FH qq{
|
||||
include: /usr/lib/rpm/rpmrc
|
||||
macrofiles: /usr/lib/rpm/macros:$tmpdir/macros
|
||||
};
|
||||
close FH;
|
||||
|
||||
# perform the build, die on error
|
||||
my $retval = system "rpm --rcfile $tmpdir/rpmrc -bs --rmsource --rmspec --clean $tmpdir/perl-$name.spec";
|
||||
$retval = $? >> 8;
|
||||
if ($retval != 0) {
|
||||
die "RPM building failed!\n";
|
||||
}
|
||||
|
||||
unlink "$tmpdir/rpmrc", "$tmpdir/macros";
|
@ -1,17 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Example script to cross-build for the platform "sh-linux-gnu".
|
||||
#
|
||||
#
|
||||
|
||||
SHMAKE='make CC=sh-linux-gnu-gcc CONFIG_SITE=/usr/lib/rpm/config.site RANLIB=sh-linux-gnu-ranlib LD=sh-linux-gnu-ld AS=sh-linux-gnu-as GAS=sh-linux-gnu-as STRIP=sh-linux-gnu-strip CC_FOR_BUILD=gcc OBJDUMP=sh-linux-gnu-objdump AR="sh-linux-gnu-ar" CXX=sh-linux-g++'
|
||||
|
||||
for pkg in $@ ; do
|
||||
echo $pkg
|
||||
if [ ! -r $pkg.log ]; then
|
||||
$SHMAKE RPMFILE=$pkg 2>&1 | tee $pkg.log
|
||||
if [ -r /usr/src/RPM/RPMS/sh/`echo $pkg | sed -e "s:/tmp/srpms/::" -e "s/.src.rpm/.sh.rpm/"` ]; then
|
||||
mv $pkg $pkg.log /tmp/srpms/done
|
||||
fi
|
||||
fi
|
||||
done
|
@ -1,223 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This script reads filenames from STDIN and outputs any relevant provides
|
||||
# information that needs to be included in the package.
|
||||
|
||||
PATH=/usr/bin:/usr/ccs/bin:/usr/sbin:/sbin:/usr/local/bin;
|
||||
export PATH;
|
||||
|
||||
javadeps_args='--provides --rpmformat --keywords --starprov'
|
||||
|
||||
|
||||
IGNORE_DEPS="@"
|
||||
BUILDROOT="/"
|
||||
|
||||
|
||||
|
||||
# Loop over all args
|
||||
|
||||
while :
|
||||
do
|
||||
|
||||
# Break out if there are no more args
|
||||
case $# in
|
||||
0)
|
||||
break
|
||||
;;
|
||||
esac
|
||||
|
||||
# Get the first arg, and shuffle
|
||||
option=$1
|
||||
shift
|
||||
|
||||
# Make all options have two hyphens
|
||||
orig_option=$option # Save original for error messages
|
||||
case $option in
|
||||
--*) ;;
|
||||
-*) option=-$option ;;
|
||||
esac
|
||||
|
||||
|
||||
case $option in
|
||||
--buildroot)
|
||||
BUILDROOT=$1
|
||||
shift
|
||||
;;
|
||||
--ignore_deps)
|
||||
IGNORE_DEPS=$1
|
||||
shift
|
||||
;;
|
||||
--help)
|
||||
echo $usage
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "$0: Unrecognized option: \"$orig_option\"; use --help for usage." >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
for file in `cat -`
|
||||
do
|
||||
|
||||
# this section is for processing based on the interpreter specified in
|
||||
# the '#!' line.
|
||||
|
||||
case `get_magic $file` in
|
||||
|
||||
bash)
|
||||
print_deps --identifier executable $file
|
||||
print_deps --identifier executable --basename $file
|
||||
;;
|
||||
|
||||
sh)
|
||||
print_deps --identifier executable $file
|
||||
print_deps --identifier executable --basename $file
|
||||
;;
|
||||
|
||||
perl)
|
||||
perl.prov $file;
|
||||
;;
|
||||
|
||||
wish)
|
||||
print_deps --identifier tcl $file
|
||||
print_deps --identifier tcl --basename $file
|
||||
;;
|
||||
|
||||
|
||||
esac
|
||||
|
||||
|
||||
# this section is for processing based on filename matching. It is
|
||||
# crude but needed as many library types have no easily identifiable
|
||||
# '#!' line
|
||||
|
||||
case $file in
|
||||
|
||||
# We can not count on finding a SONAME in third party Libraries though
|
||||
# they tend to include softlinks with the correct SONMAE name. We
|
||||
# must assume anything with a *\.so* and is of type 'dynamic lib' is a
|
||||
# library. This scriptlet works because 'file' follows soft links.
|
||||
|
||||
|
||||
*lib*.so*)
|
||||
/usr/ucb/file -L $file 2>/dev/null | \
|
||||
grep "ELF.*dynamic lib" | cut -d: -f1 | \
|
||||
xargs -n 1 basename | print_deps --identifier so;
|
||||
|
||||
# keep this for backward compatibility till we have converted
|
||||
# everything.
|
||||
|
||||
/usr/ucb/file -L $file 2>/dev/null | \
|
||||
grep "ELF.*dynamic lib" | cut -d: -f1 | \
|
||||
xargs -n 1 basename;
|
||||
;;
|
||||
|
||||
# Java jar files are just a special kind of zip files.
|
||||
# Sun OS 5.5.1 does not understand zip archives, it calls them 'data'
|
||||
# Sun OS 5.6 has this line in /etc/magic
|
||||
# 0 string PK\003\004 ZIP archive
|
||||
|
||||
*.jar)
|
||||
|
||||
unzip -p $file |\
|
||||
javadeps $javadeps_args -;
|
||||
|
||||
;;
|
||||
|
||||
# there are enough jar files out there with zip extensions that we
|
||||
# need to have a separate entry
|
||||
|
||||
*.zip)
|
||||
|
||||
unzip -p $file |\
|
||||
javadeps $javadeps_args -;
|
||||
|
||||
;;
|
||||
|
||||
# Java Class files
|
||||
# Sun OS 5.6 has this line in /etc/magic
|
||||
# 0 string \312\376\272\276 java class file
|
||||
|
||||
*.class)
|
||||
|
||||
javadeps $javadeps_args $file;
|
||||
|
||||
;;
|
||||
|
||||
|
||||
|
||||
# Perl libraries are hard to detect. Use file endings.
|
||||
|
||||
*.pl)
|
||||
|
||||
perl.prov $file;
|
||||
|
||||
# pl files are often required using the .pl extension
|
||||
# so provide that name as well
|
||||
|
||||
print_deps --identifier perl --basename $file
|
||||
;;
|
||||
|
||||
*.pm)
|
||||
|
||||
perl.prov $file;
|
||||
;;
|
||||
|
||||
*.ph)
|
||||
|
||||
# ph files do not use the package name inside the file.
|
||||
# perlmodlib documentation says:
|
||||
|
||||
# the .ph files made by h2ph will probably end up as
|
||||
# extension modules made by h2xs.
|
||||
|
||||
# so do not expend much effort on these.
|
||||
|
||||
print_deps --identifier perl --basename $file
|
||||
|
||||
;;
|
||||
|
||||
# tcl libraries are hard to detect. Use file endings.
|
||||
|
||||
*.tcl)
|
||||
|
||||
print_deps --identifier tcl $file
|
||||
print_deps --identifier tcl --basename $file
|
||||
;;
|
||||
|
||||
|
||||
|
||||
*)
|
||||
|
||||
# Dependencies for html documenets are a bit ill defined. Lets try
|
||||
# using file endings like the browsers do.
|
||||
# precise globbing is hard so I use egrep instead of the case statement.
|
||||
|
||||
hfile=`basename $file | egrep '\.((cgi)|(ps)|(pdf)|(png)|(jpg)|(gif)|(tiff)|(tif)|(xbm)|(html)|(htm)|(shtml)|(jhtml))$'`;
|
||||
|
||||
if [ "${hfile}" != "" ]
|
||||
then
|
||||
print_deps --identifier http --basename $file
|
||||
fi
|
||||
|
||||
# all files are candidates for being an executable. Let the
|
||||
# magic.prov script figure out what should be considered
|
||||
# execuables.
|
||||
|
||||
magic.prov --buildroot=$BUILDROOT $file
|
||||
|
||||
;;
|
||||
|
||||
|
||||
esac
|
||||
|
||||
done | sort -u | egrep -v \'$IGNORE_DEPS\'
|
||||
|
@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
exec /usr/lib/rpm/find-provides
|
||||
|
@ -1,211 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This script reads filenames from STDIN and outputs any relevant provides
|
||||
# information that needs to be included in the package.
|
||||
|
||||
PATH=/usr/bin:/usr/ccs/bin:/usr/sbin:/sbin:/usr/local/bin;
|
||||
export PATH;
|
||||
|
||||
javadeps_args='--requires --rpmformat --keywords'
|
||||
|
||||
ulimit -c 0;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
IGNORE_DEPS="@"
|
||||
BUILDROOT="/"
|
||||
|
||||
|
||||
|
||||
# Loop over all args
|
||||
|
||||
while :
|
||||
do
|
||||
|
||||
# Break out if there are no more args
|
||||
case $# in
|
||||
0)
|
||||
break
|
||||
;;
|
||||
esac
|
||||
|
||||
# Get the first arg, and shuffle
|
||||
option=$1
|
||||
shift
|
||||
|
||||
# Make all options have two hyphens
|
||||
orig_option=$option # Save original for error messages
|
||||
case $option in
|
||||
--*) ;;
|
||||
-*) option=-$option ;;
|
||||
esac
|
||||
|
||||
|
||||
case $option in
|
||||
--buildroot)
|
||||
BUILDROOT=$1
|
||||
shift
|
||||
;;
|
||||
--ignore_deps)
|
||||
IGNORE_DEPS=$1
|
||||
shift
|
||||
;;
|
||||
--help)
|
||||
echo $usage
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "$0: Unrecognized option: \"$orig_option\"; use --help for usage." >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
for file in `cat -`
|
||||
do
|
||||
|
||||
# this section is for processing based on the interpreter specified in
|
||||
# the '#!' line.
|
||||
|
||||
case `get_magic $file` in
|
||||
|
||||
bash)
|
||||
/usr/local/lib/rpm/bash --rpm-requires $file;
|
||||
;;
|
||||
|
||||
sh)
|
||||
/usr/local/lib/rpm/bash --rpm-requires $file;
|
||||
;;
|
||||
|
||||
perl)
|
||||
perl.req $file;
|
||||
;;
|
||||
|
||||
wish)
|
||||
tcl.req $file;
|
||||
;;
|
||||
|
||||
python)
|
||||
python.req $file;
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
|
||||
# this section is for processing based on filename matching. It is
|
||||
# crude but needed as many library types have no easily identifiable
|
||||
# '#!' line
|
||||
|
||||
case $file in
|
||||
|
||||
# Shared libraries can depend on other shared libraries.
|
||||
|
||||
*lib*.so*)
|
||||
|
||||
ldd $file 2>/dev/null | awk '/\=\>/ { print $1 }' \
|
||||
| print_deps --identifier so;
|
||||
|
||||
# keep this for backward compatibility till we have converted
|
||||
# everything.
|
||||
|
||||
ldd $file 2>/dev/null | awk '/\=\>/ { print $1 }';
|
||||
|
||||
;;
|
||||
|
||||
# Java jar files are just a special kind of zip files.
|
||||
# Sun OS 5.5.1 does not understand zip archives, it calls them 'data'
|
||||
# Sun OS 5.6 has this line in /etc/magic
|
||||
# 0 string PK\003\004 ZIP archive
|
||||
|
||||
*.jar)
|
||||
|
||||
unzip -p $file |\
|
||||
javadeps $javadeps_args -;
|
||||
|
||||
;;
|
||||
|
||||
# there are enough jar files out there with zip extensions that we
|
||||
# need to have a separate entry
|
||||
|
||||
*.zip)
|
||||
|
||||
unzip -p $file |\
|
||||
javadeps $javadeps_args -;
|
||||
|
||||
;;
|
||||
|
||||
# Java Class files
|
||||
# Sun OS 5.6 has this line in /etc/magic
|
||||
# 0 string \312\376\272\276 java class file
|
||||
|
||||
*.class)
|
||||
|
||||
javadeps $javadeps_args $file;
|
||||
|
||||
;;
|
||||
|
||||
|
||||
# Perl libraries are hard to detect. Need to also Look for #!*perl
|
||||
|
||||
*.pl)
|
||||
|
||||
perl.req $file;
|
||||
|
||||
;;
|
||||
|
||||
*.pm)
|
||||
|
||||
perl.req $file;
|
||||
|
||||
;;
|
||||
|
||||
|
||||
|
||||
# tcl libraries are hard to detect. Need to also Look for #!*wish #!*tclsh
|
||||
|
||||
*.tcl)
|
||||
|
||||
tcl.req $file;
|
||||
|
||||
;;
|
||||
|
||||
# python libraries are hard to detect. Need to also Look for #!*python
|
||||
|
||||
*.py)
|
||||
|
||||
python.req $file;
|
||||
|
||||
;;
|
||||
|
||||
# Binary executables can have any filename so let file tell us which
|
||||
# ones are binary filenames. Assume that users do not name ELF binary
|
||||
# files with names like runme.java
|
||||
|
||||
# Dependencies for html documenets are a bit ill defined. Lets try
|
||||
# extracting the basename of all strings within "'s
|
||||
# precise globbing is hard so I use egrep instead of the case statement.
|
||||
|
||||
*)
|
||||
|
||||
/usr/ucb/file -L $file 2>/dev/null | grep executable | cut -d: -f1 |\
|
||||
xargs ldd 2>/dev/null | awk '/\=\>/ { print $1 }' | xargs -n 1 basename;
|
||||
|
||||
echo $file | egrep '\.((cgi)|(ps)|(pdf)|(png)|(jpg)|(gif)|(tiff)|(tif)|(xbm)|(html)|(htm)|(shtml)|(jhtml))$' | xargs cat | httprequires
|
||||
|
||||
|
||||
# All files are candidates for being an executable. Let the
|
||||
# magic.req script figure out what should be considered
|
||||
# execuables.
|
||||
|
||||
magic.req $file
|
||||
|
||||
;;
|
||||
|
||||
|
||||
esac
|
||||
|
||||
done | sort -u | egrep -v \'$IGNORE_DEPS\'
|
||||
|
@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
exec /usr/lib/rpm/find-requires
|
||||
|
@ -1,115 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
# Given a filename on the command line or on stdin this script returns
|
||||
# the (single) interpreter that is required to run the executable. We
|
||||
# need this information to pick the best dependency parser for this
|
||||
# file.
|
||||
|
||||
# Usually this is extracted from the #! line of the file
|
||||
# but we also handle the various 'exec' tricks that people use to
|
||||
# start the interpreter via an intermediate shell.
|
||||
|
||||
|
||||
# These have all been seen on our system or are "recommended" in
|
||||
# various man pages.
|
||||
|
||||
# Examples:
|
||||
|
||||
# #!/bin/sh
|
||||
# # the next line restarts using wish \
|
||||
# exec wish "$0" "$@"
|
||||
|
||||
|
||||
# #!/bin/sh -- # -*- perl -*- -p
|
||||
# eval 'exec /usr/bin/perl -wS $0 ${1+"$@"}'
|
||||
# if $running_under_some_shell;
|
||||
|
||||
|
||||
# #!/bin/sh -- # -*- perl -*- -p
|
||||
# eval '(exit $?0)' && eval 'exec /usr/bin/perl -wS $0 ${1+"$@"}'
|
||||
|
||||
|
||||
# #!/bin/sh -- # -*- perl -*- -p
|
||||
# & eval 'exec /usr/bin/perl -wS $0 $argv:q'
|
||||
# if $running_under_some_shell;
|
||||
|
||||
|
||||
# #! /usr/bin/env python
|
||||
|
||||
|
||||
use File::Basename;
|
||||
|
||||
if ("@ARGV") {
|
||||
foreach (@ARGV) {
|
||||
process_file($_);
|
||||
}
|
||||
} else {
|
||||
|
||||
# notice we are passed a list of filenames NOT as common in unix the
|
||||
# contents of the file.
|
||||
|
||||
foreach (<>) {
|
||||
process_file($_);
|
||||
}
|
||||
}
|
||||
|
||||
foreach $prog (sort keys %require) {
|
||||
|
||||
$prog=basename($prog);
|
||||
|
||||
# ignore variable interpolation and any program whose name is made
|
||||
# up only of non word characters ('<', '&&', etc).
|
||||
|
||||
( ( $prog != /\$/ ) || ( $prog =~ /^\W+$/ ) ) &&
|
||||
next;
|
||||
|
||||
print "exectuable($prog)\n";
|
||||
|
||||
}
|
||||
|
||||
exit 0;
|
||||
|
||||
|
||||
sub process_file {
|
||||
|
||||
my ($file) = @_;
|
||||
chomp $file;
|
||||
|
||||
my ($version, $magic) = ();
|
||||
|
||||
(-f $file) || return ;
|
||||
|
||||
open(FILE, "<$file")||
|
||||
die("$0: Could not open file: '$file' : $!\n");
|
||||
|
||||
my $rc = sysread(FILE,$line,1000);
|
||||
|
||||
$rc =~ s/\#.*\n//g;
|
||||
|
||||
# Ignore all parameter substitution.
|
||||
# I have no hope of parsing something like:
|
||||
# exec ${SHELL:-/bin/sh}
|
||||
|
||||
$rc =~ s/\$\{.*\}//g;
|
||||
$rc =~ s/echo\s+.*[\n;]//g;
|
||||
|
||||
if ( ($rc > 1) && ($line =~ m/^\#\!\s*/) ) {
|
||||
|
||||
if ($line =~ m/\b(exec|env)\s+([\'\"\`\\]+)?([^ \t\n\r]+)/) {
|
||||
$require{$3} = 1;
|
||||
last;
|
||||
}
|
||||
|
||||
# strip off extra lines and any arguments
|
||||
if ($line =~ m/^\#\!\s*([^ \t\n\r]+)/) {
|
||||
$require{$1} = 1;
|
||||
last;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
close(FILE) ||
|
||||
die("$0: Could not close file: '$file' : $!\n");
|
||||
|
||||
return ;
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
|
||||
if [ -z "$1" ] ; then
|
||||
echo "Usage:"
|
||||
echo " $0 <rpm>..."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
while [ -n "$1" ] ; do
|
||||
|
||||
[ -f $1 ] || {
|
||||
echo "$1 could not be found (or is not a file)"
|
||||
shift
|
||||
continue
|
||||
}
|
||||
|
||||
desc=$(rpm -qp $1 --qf "%{DESCRIPTION}" | \
|
||||
sed -e 's/\"/\\\\\"/g' -e 's/^/\"/g' -e 's/$/\\\\n\"/g')
|
||||
|
||||
rpm -qp $1 --qf \
|
||||
"# ========================================================
|
||||
#: %{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}.rpm:1005 %{SOURCERPM}:1005
|
||||
msgid \"%{NAME}(Description)\"
|
||||
msgstr \"\"
|
||||
$desc
|
||||
|
||||
#: %{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}.rpm:1016 %{SOURCERPM}:1016
|
||||
msgid \"%{NAME}(Group)\"
|
||||
msgstr \"%{GROUP}\"
|
||||
|
||||
#: %{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}.rpm:1004 %{SOURCERPM}:1004
|
||||
msgid \"%{NAME}(Summary)\"
|
||||
msgstr \"%{SUMMARY}\"
|
||||
|
||||
"
|
||||
# go to the next file
|
||||
shift
|
||||
done
|
||||
|
165
scripts/http.req
165
scripts/http.req
@ -1,165 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
# This file can find requirements of html and jhtml files (cgi, gif,
|
||||
# java dependencies). It is a bit of a hack but it turns out to work
|
||||
# well. We track only dependencies between Relative URLs, absolute
|
||||
# URL's are assumed to be extenernal to the RPM system. We do not
|
||||
# parse the HTML but look through the set of strings (text surrounded
|
||||
# by quotes) for something which looks like a reference. This avoids
|
||||
# writing a full HTML parsers and tends to work really well. In this
|
||||
# manner we can track dependencies for: href, src, action and other
|
||||
# HTML tags which have not been invented yet.
|
||||
|
||||
|
||||
# The reference:
|
||||
#
|
||||
# href="http://www.perl.org/images/arrow.gif"
|
||||
#
|
||||
# does not create a dependency but the reference
|
||||
#
|
||||
# href="images/arrow.gif"
|
||||
#
|
||||
# will create a dependency.
|
||||
|
||||
# Additionally this program will find the requirements for sun jhtml
|
||||
# (html with embedded java) since jhtml is deprecated so is this part
|
||||
# of the code.
|
||||
|
||||
# These references create dependencies:
|
||||
|
||||
# <form action="signup.jhtml" method="POST">
|
||||
#
|
||||
# <img src="images/spacer.gif" width=1>
|
||||
#
|
||||
# <A HREF="signup.jhtml">
|
||||
#
|
||||
# adWidget.writeAd(out, "login.html", "expired");
|
||||
#
|
||||
# response.sendRedirect("http://"+request.getServerName()+"/mailcom/login.jhtml");
|
||||
|
||||
|
||||
# Notice how we look for strings WITH the proper ending. This is
|
||||
# because the java sometimes has really strange double quoting
|
||||
# conventions. Look at how splitting out the strings in this
|
||||
# fragment would get you the wrong text.
|
||||
|
||||
# <img src="`c.getImage("bhunterlogo.gif")`" width=217 >
|
||||
|
||||
# Ignore non relative references since these dependencies can not be
|
||||
# met. (ie, no package you install will ever provide
|
||||
# 'http://www.yahoo.com').
|
||||
|
||||
# I use basename since I have seen too many http references which
|
||||
# begin with '../' and I can not figure out where the document root
|
||||
# is for the webserver this would just kill the dependnecy tracking
|
||||
# mechanism.
|
||||
|
||||
|
||||
|
||||
use File::Basename;
|
||||
|
||||
# this is the pattern of extensions to call requirements
|
||||
|
||||
$DEPS_PAT = '\.((cgi)|(ps)|(pdf)|(png)|(jpg)|(gif)|(tiff)|(tif)|(xbm)|(html)|(htm)|(shtml)|(jhtml))'; #'
|
||||
|
||||
if ("@ARGV") {
|
||||
foreach (@ARGV) {
|
||||
process_file($_);
|
||||
}
|
||||
} else {
|
||||
|
||||
# notice we are passed a list of filenames NOT as common in unix the
|
||||
# contents of the file.
|
||||
|
||||
foreach (<>) {
|
||||
process_file($_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
foreach $key (sort keys %seen) {
|
||||
print "$key\n";
|
||||
}
|
||||
|
||||
|
||||
sub process_file {
|
||||
|
||||
my ($file) = @_;
|
||||
chomp $file;
|
||||
|
||||
open(FILE, "<$file")||
|
||||
die("$0: Could not open file: '$file' : $!\n");
|
||||
|
||||
# we have to suck in the whole file at once because too many people
|
||||
# split lines around <java></java> tags.
|
||||
|
||||
my (@file) = <FILE>;
|
||||
|
||||
$_= "@file";
|
||||
|
||||
# ignore line based comments ( careful although it has two slashes
|
||||
# 'http://www.yahoo.com' is not a comment! )
|
||||
|
||||
s!^\s*//.*$!!mg;
|
||||
s!//\s.*$!!mg;
|
||||
s!\s//.*$!!mg;
|
||||
|
||||
# ignore multi-line comments
|
||||
# (use non greedy operators)
|
||||
|
||||
s!/\*.*?\*/!!g;
|
||||
s/<!--.*?-->//g;
|
||||
|
||||
# Ignore non relative references since these dependencies can not be
|
||||
# met. (ie, no package you install will ever provide
|
||||
# 'http://www.yahoo.com').
|
||||
|
||||
# I use basename since I have seen too many http references which
|
||||
# begin with '../' and I can not figure out where the document root
|
||||
# is for the webserver this would just kill the dependnecy tracking
|
||||
# mechanism.
|
||||
|
||||
|
||||
# Notice how we look for strings WITH the proper ending. This is
|
||||
# because the java sometimes has really strange double quoting
|
||||
# conventions. Look at how splitting out the strings in this
|
||||
# fragment would get you the wrong text.
|
||||
|
||||
# <img src="`c.getImage("bhunterlogo.gif")`" width=217 >
|
||||
|
||||
while ( m{\"([^\"]+$DEPS_PAT)\"}g ) {
|
||||
my $string = $1;
|
||||
chomp $string;
|
||||
if ( $string !~ m!http://! ) {
|
||||
$string = basename($string);
|
||||
$string =~ s!\s+!!g;
|
||||
$seen{"http(${string})"} = 1;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
# This section is only for use with (Sun) jhtml dependencies, and
|
||||
# since jhtml is deprecated so is this code.
|
||||
|
||||
# java imports in jhtml (may have stars for leaf class)
|
||||
# these may span several lines
|
||||
|
||||
while ( m!<java type=((import)|(extends))>\s*([^<]+)\s*<!g ) {
|
||||
my $java_list = $4;
|
||||
$java_list =~ s/;/ /g;
|
||||
$java_list =~ s/\n+/ /g;
|
||||
$java_list =~ s/\s+/ /g;
|
||||
foreach $java_class ( split(/\s+/, $java_list) ) {
|
||||
$seen{"java(${java_class})"} = 1;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
close(FILE)||
|
||||
die("$0: Could not close file: '$file' : $!\n");
|
||||
|
||||
return ;
|
||||
}
|
1217
scripts/javadeps.c
1217
scripts/javadeps.c
File diff suppressed because it is too large
Load Diff
@ -1,167 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
use File::Basename;
|
||||
use Getopt::Long;
|
||||
|
||||
# this dependency analysis program is the only one which need to know
|
||||
# the RPM buildroot to do its work.
|
||||
|
||||
# Figuring out what files are really executables via magic numbers is
|
||||
# hard. Not only is every '#!' an executable of some type (with a
|
||||
# potentially infinite supply of interpreters) but there are thousands
|
||||
# of valid binary magic numbers for old OS's and old CPU types.
|
||||
|
||||
# Permissions do not always help discriminate binaries from the rest
|
||||
# of the files, on Solaris the shared libraries are marked as
|
||||
# 'executable'.
|
||||
|
||||
# -rwxr-xr-x 1 bin bin 1013248 Jul 1 1998 /lib/libc.so.1
|
||||
|
||||
# I would like to let the 'file' command take care of the magic
|
||||
# numbers for us. Alas! under linux file prints different kind of
|
||||
# messages for each interpreter, there is no common word 'script' to
|
||||
# look for.
|
||||
|
||||
# ' perl commands text'
|
||||
# ' Bourne shell script text'
|
||||
# ' a /usr/bin/wish -f script text'
|
||||
|
||||
# WORSE on solaris there are entries which say:
|
||||
|
||||
# ' current ar archive, not a dynamic executable or shared object'
|
||||
|
||||
# how do I grep for 'executable' when people put a 'not executable' in
|
||||
# there? I trim off everything after the first comma (if there is
|
||||
# one) and if the result has the string 'executable' in it then it may
|
||||
# be one.
|
||||
|
||||
|
||||
# so we must also do some magic number processing ourselves, and be
|
||||
# satisfied with 'good enough'.
|
||||
|
||||
# I look for files which have atleast one of the executable bits set
|
||||
# and are either labled 'executable' by the file command (see above
|
||||
# restriction) OR have a '#!' as their first two characters.
|
||||
|
||||
|
||||
$is_mode_executable=oct(111);
|
||||
|
||||
# set a known path
|
||||
|
||||
$ENV{'PATH'}= (
|
||||
':/usr/bin'.
|
||||
':/bin'.
|
||||
'');
|
||||
|
||||
# taint perl requires we clean up these bad environmental variables.
|
||||
|
||||
delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
|
||||
|
||||
$BUILDROOT = '';
|
||||
%option_linkage = (
|
||||
"buildroot" => \$BUILDROOT,
|
||||
);
|
||||
|
||||
if( !GetOptions (\%option_linkage, "buildroot=s") ) {
|
||||
die("Illegal options in \@ARGV: '@ARGV'\n");
|
||||
|
||||
}
|
||||
|
||||
if ($BUILDROOT == '/') {
|
||||
$BUILDROOT = '';
|
||||
}
|
||||
|
||||
if ("@ARGV") {
|
||||
foreach (@ARGV) {
|
||||
process_file($_);
|
||||
}
|
||||
} else {
|
||||
|
||||
# notice we are passed a list of filenames NOT as common in unix the
|
||||
# contents of the file.
|
||||
|
||||
foreach (<>) {
|
||||
process_file($_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
foreach $module (sort keys %provides) {
|
||||
print "executable($module)\n";
|
||||
}
|
||||
|
||||
exit 0;
|
||||
|
||||
|
||||
|
||||
|
||||
sub is_file_script {
|
||||
|
||||
my ($file) = @_;
|
||||
chomp $file;
|
||||
|
||||
my $out = 0;
|
||||
open(FILE, "<$file")||
|
||||
die("$0: Could not open file: '$file' : $!\n");
|
||||
|
||||
my $rc = sysread(FILE,$line,2);
|
||||
|
||||
if ( ($rc > 1) && ($line =~ m/^\#\!/) ) {
|
||||
$out = 1;
|
||||
}
|
||||
|
||||
close(FILE) ||
|
||||
die("$0: Could not close file: '$file' : $!\n");
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
|
||||
|
||||
sub is_file_binary_executable {
|
||||
my ($file) = @_;
|
||||
|
||||
$file_out=`file $file`;
|
||||
# trim off any extra descriptions.
|
||||
$file_out =~ s/\,.*$//;
|
||||
|
||||
my $out = 0;
|
||||
if ($file_out =~ m/executable/ ) {
|
||||
$out = 1;
|
||||
}
|
||||
return $out;
|
||||
}
|
||||
|
||||
|
||||
sub process_file {
|
||||
my ($file) = @_;
|
||||
chomp $file;
|
||||
|
||||
my $prov_name = $file;
|
||||
$prov_name =~ s!^$BUILDROOT!!;
|
||||
|
||||
# If its a link find the file it points to. Dead links do not
|
||||
# provide anything.
|
||||
|
||||
while (-l $file) {
|
||||
my $newfile = readlink($file);
|
||||
if ($newfile !~ m!^/!) {
|
||||
$newfile = dirname($file).'/'.$newfile;
|
||||
} else {
|
||||
$newfile = $BUILDROOT.$newfile;
|
||||
}
|
||||
$file = $newfile;
|
||||
}
|
||||
|
||||
(-f $file) || return ;
|
||||
( (stat($file))[2] & $is_mode_executable ) || return ;
|
||||
|
||||
is_file_script($file) ||
|
||||
is_file_binary_executable($file) ||
|
||||
return ;
|
||||
|
||||
$provides{$prov_name}=1;
|
||||
$provides{basename($prov_name)}=1;
|
||||
|
||||
return ;
|
||||
}
|
@ -1,143 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
# Given a list of filenames on the command line or on stdin this
|
||||
# script returns the interpreter that is required to run the
|
||||
# filenames. Usually this is extracted from the #! line of the file
|
||||
# but we also handle the various 'exec' tricks that people use to
|
||||
# start the interpreter via an intermediate shell.
|
||||
|
||||
# Also we want to convert:
|
||||
# /usr/local/bin/perl5.00404
|
||||
# /usr/local/bin/tclsh8.0
|
||||
# into dependencies with RPM version numbers.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# These have all been seen on our system or are "recommended" in
|
||||
# various man pages.
|
||||
|
||||
# Examples:
|
||||
|
||||
# #!/bin/sh
|
||||
# # the next line restarts using wish \
|
||||
# exec wish "$0" "$@"
|
||||
|
||||
|
||||
# #!/bin/sh -- # -*- perl -*- -p
|
||||
# eval 'exec /usr/bin/perl -wS $0 ${1+"$@"}'
|
||||
# if $running_under_some_shell;
|
||||
|
||||
|
||||
# #!/bin/sh -- # -*- perl -*- -p
|
||||
# eval '(exit $?0)' && eval 'exec /usr/bin/perl -wS $0 ${1+"$@"}'
|
||||
|
||||
|
||||
# #!/bin/sh -- # -*- perl -*- -p
|
||||
# & eval 'exec /usr/bin/perl -wS $0 $argv:q'
|
||||
# if $running_under_some_shell;
|
||||
|
||||
|
||||
# #! /usr/bin/env python
|
||||
|
||||
|
||||
use File::Basename;
|
||||
|
||||
if ("@ARGV") {
|
||||
foreach (@ARGV) {
|
||||
process_file($_);
|
||||
}
|
||||
} else {
|
||||
|
||||
# notice we are passed a list of filenames NOT as common in unix the
|
||||
# contents of the file.
|
||||
|
||||
foreach (<>) {
|
||||
process_file($_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
foreach $prog (sort keys %require) {
|
||||
|
||||
|
||||
# ignore variable interpolation and any program whose name is made
|
||||
# up only of non word characters ('<', '&&', etc).
|
||||
|
||||
( ( $prog != /\$/ ) || ( $prog =~ /^\W+$/ ) ) &&
|
||||
next;
|
||||
|
||||
# filenames of the form './miniperl' will be reported in canonical
|
||||
# manner 'miniperl'
|
||||
|
||||
$prog =~ s!^\./!!;
|
||||
|
||||
if ( $prog !~ /\$/ ) {
|
||||
print "exectuable($prog)\n";
|
||||
}
|
||||
|
||||
$prog=basename($prog);
|
||||
|
||||
if ( $prog !~ /\$/ ) {
|
||||
print "exectuable($prog)\n";
|
||||
|
||||
# get the correct version dependencies for magic numbers like:
|
||||
# /usr/local/bin/perl5.00404
|
||||
# /usr/local/bin/tclsh8.0
|
||||
# these are always PACKAGE versions since typical executables do not
|
||||
# have versions
|
||||
|
||||
my $version = "";
|
||||
if ($module =~ s/([.0-9]+)$//) {
|
||||
$version = "$1";
|
||||
print "$prog>=$version\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
exit 0;
|
||||
|
||||
|
||||
sub process_file {
|
||||
|
||||
my ($file) = @_;
|
||||
chomp $file;
|
||||
|
||||
my ($version, $magic) = ();
|
||||
|
||||
(-f $file) || return ;
|
||||
|
||||
open(FILE, "<$file")||
|
||||
die("$0: Could not open file: '$file' : $!\n");
|
||||
|
||||
my $rc = sysread(FILE,$line,1000);
|
||||
|
||||
$rc =~ s/\#.*\n//g;
|
||||
|
||||
# Ignore all parameter substitution.
|
||||
# I have no hope of parsing something like:
|
||||
# exec ${SHELL:-/bin/sh}
|
||||
$rc =~ s/\$\{.*\}//g;
|
||||
$rc =~ s/echo\s+.*[\n;]//g;
|
||||
|
||||
if ( ($rc > 1) && ($line =~ m/^\#\!\s*/) ) {
|
||||
|
||||
if ($line =~ m/\b(exec|env)\s+([\'\"\`\\]+)?([^ \t\n\r]+)/) {
|
||||
$require{$3} = 1;
|
||||
}
|
||||
|
||||
# strip off extra lines and any arguments
|
||||
if ($line =~ m/^\#\!\s*([^ \t\n\r]+)/) {
|
||||
$require{$1} = 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
close(FILE) ||
|
||||
die("$0: Could not close file: '$file' : $!\n");
|
||||
|
||||
return ;
|
||||
}
|
@ -1,119 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
use Safe;
|
||||
use strict;
|
||||
|
||||
# list of provides
|
||||
my %prov;
|
||||
|
||||
# fake paths should take precedence
|
||||
local $_ = $ENV{RPM_PERL_LIB_PATH};
|
||||
my @inc = map { "$ENV{RPM_BUILD_ROOT}$_" } split, @INC;
|
||||
|
||||
# begin
|
||||
process_file($_) foreach @ARGV ? @ARGV : <>;
|
||||
|
||||
sub process_file {
|
||||
my $fname = shift;
|
||||
chomp $fname;
|
||||
return unless $fname;
|
||||
|
||||
# check if we match any prefix
|
||||
# and take the longest...
|
||||
my ($prefix) = sort { length($b) <=> length($a) }
|
||||
grep { index($fname, $_) == 0 } @inc;
|
||||
return unless $prefix;
|
||||
my $basename = substr $fname, length $prefix;
|
||||
$basename =~ s/^\///;
|
||||
return unless $basename;
|
||||
|
||||
# provide *.p[lh]
|
||||
if ($fname =~ /\.p[lh]$/) {
|
||||
$prov{$basename} = undef;
|
||||
return;
|
||||
# only *.pm left
|
||||
} elsif ($basename =~ /\.pm$/) {
|
||||
$prov{$basename} = undef;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
# process *.pm
|
||||
my $in_package;
|
||||
my $re_mod = qr/\b(?!\d)\w+(?:::(?!\d)\w+)*/;
|
||||
my $re_ver = qr/\bv?[0-9]+(?:\.[0-9]+(?:_[0-9]+)?)*\b/;
|
||||
open(FILE, '<', $fname) || die;
|
||||
while (<FILE>) {
|
||||
/^=\w/ .. /^=cut/ and next;
|
||||
/^__(DATA|END)__$/ and last;
|
||||
# look for 'package' declaration that matches filename
|
||||
if (/^\s*package\s+($re_mod)\s*;/) {
|
||||
if ($basename eq package_filename($1)) {
|
||||
$in_package = $1;
|
||||
} else {
|
||||
undef $in_package;
|
||||
}
|
||||
# look for $VERSION
|
||||
} elsif ($in_package && m/\$(?:$in_package\::)?VERSION\s*=.*\d/) {
|
||||
$prov{$basename} = extract_version($_);
|
||||
last;
|
||||
}
|
||||
}
|
||||
close FILE;
|
||||
}
|
||||
|
||||
# end
|
||||
while (my ($k, $v) = each %prov) {
|
||||
if ($v) {
|
||||
print "perl($k) = $v\n";
|
||||
# provide an additional epoch 0 version converted using Perl's rules
|
||||
print "perl($k) = 0:" . old_version($1) . "\n"
|
||||
if $v =~ /^1:(.+)/;
|
||||
} else {
|
||||
print "perl($k)\n";
|
||||
}
|
||||
}
|
||||
|
||||
sub old_version {
|
||||
local $_ = shift;
|
||||
my $fpver = 0;
|
||||
my $ratio = 1;
|
||||
my @series = split(/\./, $1);
|
||||
for (@series) {
|
||||
$fpver += $_ * $ratio;
|
||||
$ratio *= 0.001;
|
||||
}
|
||||
my $fdigits = $#series * 3;
|
||||
return sprintf "%.${fdigits}f", $fpver;
|
||||
}
|
||||
|
||||
# XXX Mhz code?
|
||||
sub extract_version {
|
||||
my $line = shift;
|
||||
# Try to evaluate the assignment to get the value of $VERSION.
|
||||
# It is usually computed without using data external to the expression,
|
||||
# so we would have no problems.
|
||||
|
||||
# local $SIG{__WARN__} = sub { };
|
||||
|
||||
my $safe = new Safe;
|
||||
$safe->permit_only(qw(:base_core :base_mem :base_orig entereval
|
||||
grepstart grepwhile mapstart mapwhile));
|
||||
my $version = $safe->reval("$line");
|
||||
return undef if $@ || length($version) == 0;
|
||||
|
||||
if ($version =~ s/^\s*(\d[\d_]*(\.[\d_]*)?|\.[\d_]+)/$1/) {
|
||||
# plain old numeric version
|
||||
return '0:' . $version;
|
||||
} else {
|
||||
# Supposedly, a new style version evaluated as a string constant.
|
||||
# Return an epoch 1 version
|
||||
return sprintf "1:%vd", $version;
|
||||
}
|
||||
}
|
||||
|
||||
# copy-pasted from perl.req
|
||||
sub package_filename {
|
||||
my $package = shift;
|
||||
$package =~ s/::/\//g;
|
||||
return $package . '.pm';
|
||||
}
|
366
scripts/perl.req
366
scripts/perl.req
@ -1,366 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
=head1 NAME
|
||||
|
||||
perl.req - calculate the requirements for Perl sources
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
B<perl.req> --method=normal /path/to/Module.pm
|
||||
|
||||
echo /path/to/Module.pm | RPM_PERL_REQ_METHOD=normal B<perl.req>
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This Perl script is intended for automatic detection of modules the given Perl
|
||||
code depends on. It looks for common C<use>, C<require> and C<do> statements
|
||||
and extracts module and version requirements for RPM C<Requires:> clause.
|
||||
|
||||
Unlike earlier versions, this script uses B::Deparse (Perl compiler backend,
|
||||
see C<perldoc B::Deparse>) to re-format Perl code. This makes dependency
|
||||
extraction more accurate and simple, but this also has some tremendous
|
||||
implication: all Perl code should pass C<perl -c> syntax check, since the
|
||||
compile stage (see C<perldoc perlcompile>) happens for all the code that gets
|
||||
deparsed. This is a very strong requirement, but as we talk about packaging
|
||||
quality, this is considered good.
|
||||
|
||||
=head2 Invocation
|
||||
|
||||
=head2 Dependencies
|
||||
|
||||
For old-style perl libraries and C<*.ph> files, depndencies look like this:
|
||||
|
||||
perl(library.pl)
|
||||
perl(header.ph)
|
||||
|
||||
And for Perl5 modules like this:
|
||||
|
||||
perl(Some/Module.pm)
|
||||
|
||||
The latter differs from the original RedHat RPM style, in which module
|
||||
dependencies look like C<perl(Some::Module)>. The style was changed long ago,
|
||||
and I don't know the exact reason why. :)
|
||||
|
||||
=head2 Versioning
|
||||
|
||||
For old-style floating point versioning, versions look like this:
|
||||
|
||||
0:5.005003
|
||||
|
||||
And for new v-string style versioning:
|
||||
|
||||
1:5.8.1
|
||||
|
||||
Please note that RPM does not understand "decimal dot" in versions, so
|
||||
sometimes you may need to adjust the percision to fit the version in
|
||||
C<Provides:> clause.
|
||||
|
||||
=head2 Methods
|
||||
|
||||
The following three modes or "methods" are supported by this script:
|
||||
|
||||
=over
|
||||
|
||||
=item strict
|
||||
|
||||
In this mode, C<perl.req> goes straight and tries to extract all the
|
||||
dependencies that happen to be in the given perl code, including
|
||||
platform-specific dependencies, conditional ones, etc. This mode is useful for
|
||||
debugging, but in some cases it can produce too strong/overkill requirements of
|
||||
your package.
|
||||
|
||||
=item normal
|
||||
|
||||
This mode is recommended for default use. It tries to skip the dependencies
|
||||
that are too strong by the following criteria:
|
||||
|
||||
=over
|
||||
|
||||
=item file list
|
||||
|
||||
There's a simple file list in this script by which certain files are
|
||||
ignored. E.g., it will not look in files that match */demos/* or
|
||||
*/examples/* shell path.
|
||||
|
||||
=item package list
|
||||
|
||||
There's a list of modules to ignore in "normal" mode. They are mostly
|
||||
OS-specific modules like C<Win32::*> or C<VMS::*>. Modules that are used very
|
||||
often (like C<strict.pm>) are also ignored in order not to bloat RPM database.
|
||||
|
||||
=item $^O
|
||||
|
||||
Here we also ignore conditional blocks with C<$^O> variable involved (see
|
||||
C<perldoc perlvar>). This kind of code always does some OS-specific trickery
|
||||
(well, most of the times).
|
||||
|
||||
B<Not implemented yet.>
|
||||
|
||||
=item eval
|
||||
|
||||
Statements in C<eval> blocks are also ignored, since this is known to be a
|
||||
common technique to check the module availability safely.
|
||||
|
||||
=back
|
||||
|
||||
=item relaxed
|
||||
|
||||
This mode makes C<perl.req> fail-tolerant and even more relaxed:
|
||||
|
||||
=over
|
||||
|
||||
=item conditional dependencies
|
||||
|
||||
In "relaxed" mode, conditional dependencies (i.e. C<require> and C<do>
|
||||
statements enclosed in conditional block and this having indentation) are
|
||||
ignored -- B::Deparse makes it easy!
|
||||
|
||||
=item fail tolerance
|
||||
|
||||
When C<perl.req> cannot deparse the given perl code, it should usually fail.
|
||||
In turn, RPM should abort the package build process. Unfortunatelly it does
|
||||
not, which may result in packages with boroken dependencies. Only the latest
|
||||
releases (starting with rpm-4.0.4-alt21) of ALT RPM aborts the build process
|
||||
in such cases.
|
||||
|
||||
In "relaxed" mode, C<perl.req> will not fail if the deparse fails. But please
|
||||
note that some dependencies will be probably missed.
|
||||
|
||||
=back
|
||||
|
||||
=back
|
||||
|
||||
Since there's no default method, you have to specify the one with C<--method>
|
||||
command line argument. Alternatively, RPM_PERL_REQ_METHOD environement
|
||||
variable can be used to set the method. ALT RPM sets this variable to "normal"
|
||||
by default.
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Alexey Tourbin <at@altlinux.org>,
|
||||
based on an earlier version by Ken Estes <kestes@staff.mail.com>,
|
||||
with contributions from Mikhail Zabaluev <mhz@altlinux.org>.
|
||||
|
||||
=head1 COPYING
|
||||
|
||||
This program is intended to be an optional/alternative part of RPM package
|
||||
manager. You can redistribute it and/or modify it under the same terms as RPM
|
||||
itself. As of version 4.x, RPM code base is covered with GPL and
|
||||
(alternatively) LGPL licenses. Any questions regarding the licensing of RPM
|
||||
should be addressed to Erik Troan <ewt@redhat.com> and Jeff Johnson <jbj@redhat.com>.
|
||||
|
||||
=cut
|
||||
|
||||
use 5.8.0;
|
||||
use Getopt::Long;
|
||||
use strict;
|
||||
|
||||
GetOptions("debug" => \my $debug, "method=s" => \my $method);
|
||||
sub debug ($) {
|
||||
my $msg = shift;
|
||||
warn "$msg\n" if $debug;
|
||||
1;
|
||||
}
|
||||
if ($debug) {
|
||||
require IO::Handle;
|
||||
STDOUT->autoflush(1);
|
||||
STDERR->autoflush(1);
|
||||
debug "debug mode enabled";
|
||||
}
|
||||
$method ||= $ENV{RPM_PERL_REQ_METHOD};
|
||||
$method =~ s/\s//g;
|
||||
$method eq "strict" || $method eq "normal" || $method eq "relaxed" ||
|
||||
die "$0: strict, normal, relaxed methods supported\n";
|
||||
debug "method = $method";
|
||||
|
||||
my @ignore_files = (
|
||||
qr(/usr/share/doc/),
|
||||
qr(/[Dd]emos?/),
|
||||
qr(/examples?/),
|
||||
qr(\bVMS\b),
|
||||
);
|
||||
my @ignore_reqs = (
|
||||
qr(^Makefile\b),
|
||||
# OS-specific
|
||||
qr(^machine/ansi\b),
|
||||
qr(^sys/systeminfo\b),
|
||||
qr(^vmsish\b),
|
||||
qr(^MacPerl\b),
|
||||
qr(^Win32),
|
||||
qr(\bVMS\b),
|
||||
qr(^OS2\b),
|
||||
qr(^Mac\b),
|
||||
qr(^ExtUtils/XSSymSet\b),
|
||||
qr(^Convert/EBCDIC\b),
|
||||
# old names
|
||||
qr(^Digest/Perl/MD5\b),
|
||||
# qr(^Pod/PlainText\b),
|
||||
# wrong names
|
||||
qr(/\.),
|
||||
qr(\$),
|
||||
# so commonly used... just a database junk (guaranteed to be in perl-base)
|
||||
qr(^strict\.pm$),
|
||||
qr(^vars\.pm$),
|
||||
qr(^Exporter\.pm$),
|
||||
qr(^DynaLoader\.pm$),
|
||||
qr(^AutoLoader\.pm$),
|
||||
qr(^Carp\.pm$),
|
||||
);
|
||||
|
||||
# list of requires
|
||||
my %req;
|
||||
|
||||
if ($ENV{RPM_BUILD_ROOT} && open REQ, "$ENV{RPM_BUILD_ROOT}/.perl.req") {
|
||||
while (<REQ>) {
|
||||
while (s/perl\(([\w:]+)\)>=([\dv._]+)//) {
|
||||
$2
|
||||
and $req{package_filename($1)}{package_version($2)}++
|
||||
or $req{package_filename($1)} ||= undef;
|
||||
}
|
||||
}
|
||||
close REQ;
|
||||
unlink "$ENV{RPM_BUILD_ROOT}/.perl.req";
|
||||
}
|
||||
|
||||
# begin
|
||||
process_file($_) foreach @ARGV ? @ARGV : <>;
|
||||
|
||||
sub process_file {
|
||||
my $fname = shift;
|
||||
chomp $fname;
|
||||
return unless $fname;
|
||||
if ($method ne "strict") {
|
||||
foreach my $re (@ignore_files) {
|
||||
if ($fname =~ $re) {
|
||||
debug "file: $fname; matches: $re; skip";
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
debug "processing $fname";
|
||||
# skip "syntax OK" messages
|
||||
# use Fcntl;
|
||||
# fcntl(STDERR, F_SETFD, 1) if !$debug && $method eq 'relaxed';
|
||||
|
||||
# fake paths should take precedence
|
||||
local $_ = $ENV{RPM_PERL_LIB_PATH};
|
||||
my @inc = $ENV{RPM_BUILD_ROOT}
|
||||
? map { "-I$ENV{RPM_BUILD_ROOT}$_" } split, @INC
|
||||
: map { "-I$_" } split;
|
||||
# deparse
|
||||
open(PIPE, "-|", $^X, "-t", "-MO=Deparse", @inc, "--", $fname) || die;
|
||||
while (<PIPE>) {
|
||||
last if /^__(DATA|END)__/;
|
||||
process_line($_);
|
||||
}
|
||||
close(PIPE) or $method ne 'relaxed' and die "$fname: deparse failed.\n";
|
||||
}
|
||||
|
||||
# whether we are in BEGIN block
|
||||
my ($begin, $begin_indent);
|
||||
# whether we are in eval block
|
||||
my ($eval, $eval_indent);
|
||||
|
||||
sub process_line {
|
||||
my $line = shift;
|
||||
chomp $line;
|
||||
my $re_mod = qr/\b(?!\d)\w+(?:::(?!\d)\w+)*/;
|
||||
my $re_fna = qr/\w+(?:\/\w+)*\.p[lmh]/;
|
||||
my $re_ver = qr/\bv?[0-9]+(?:\.[0-9]+(?:_[0-9]+)?)*\b/;
|
||||
|
||||
if ($begin && $line =~ /^\Q$begin_indent}/) {
|
||||
debug "exit begin:$.: $line";
|
||||
$begin = 0;
|
||||
} elsif ($eval && $line =~ /^\Q$eval_indent}/) {
|
||||
debug "exit eval:$.: $line";
|
||||
$eval = 0;
|
||||
}
|
||||
again:
|
||||
if ($line =~ /^\s*(?:use|require) ($re_ver)/) {
|
||||
$req{"perl-base"}{package_version($1, '%.5f')}++;
|
||||
} elsif ($line =~ /^\s*use ($re_mod) ($re_ver)/) {
|
||||
$req{package_filename($1)}{package_version($2)}++;
|
||||
} elsif ($line =~ /^\s*use ($re_mod)/) {
|
||||
$req{package_filename($1)} ||= undef;
|
||||
} elsif ($line =~ /^\s*(?:require|do) '($re_fna)'/) {
|
||||
if ($eval && $method ne "strict") {
|
||||
debug "skip: $line (eval)";
|
||||
} else {
|
||||
$req{$1} ||= undef;
|
||||
}
|
||||
} elsif ($line =~ /^(\s*)require ($re_mod)( if\b| unless\b)?/) {
|
||||
if ($eval && $method ne "strict") {
|
||||
debug "skip: $line (eval)";
|
||||
} elsif ($begin) {
|
||||
$req{package_filename($2)} ||= undef;
|
||||
} elsif ($3 && $method eq "relaxed") {
|
||||
debug "skip: $line (conditional)";
|
||||
} elsif ($1 && $method eq "relaxed") {
|
||||
debug "skip: $line (indent)";
|
||||
} else {
|
||||
$req{package_filename($2)} ||= undef;
|
||||
}
|
||||
} elsif ($line =~ /'?($re_mod)'?->VERSION\(($re_ver)\)/) {
|
||||
exists $req{package_filename($1)} and
|
||||
$req{package_filename($1)}{package_version($2)}++;
|
||||
}
|
||||
if ($line =~ /^(\s*)sub [\w:]+\b(BEGIN|CHECK|INIT) {$/) {
|
||||
debug "enter begin:$.: $line";
|
||||
$begin = 1; $begin_indent = $1;
|
||||
} elsif ($line =~ /^(\s*)(.*)\beval {$/) {
|
||||
debug "enter eval:$.: $line";
|
||||
$eval = 1; $eval_indent = $1;
|
||||
}
|
||||
}
|
||||
|
||||
sub package_filename {
|
||||
my $package = shift;
|
||||
$package =~ s/::/\//g;
|
||||
return $package . '.pm';
|
||||
}
|
||||
|
||||
sub package_version {
|
||||
my ($version, $fmt) = (@_, '%s');
|
||||
$version =~ s/_//g;
|
||||
if ($version =~ s/^v(?=\d)// || $version =~ /\.\d+\./) {
|
||||
return "1:$version";
|
||||
} else {
|
||||
$version = sprintf($fmt, $version);
|
||||
return "0:$version";
|
||||
}
|
||||
}
|
||||
|
||||
# end
|
||||
req:
|
||||
foreach my $k (keys %req) {
|
||||
if ($method ne "strict") {
|
||||
foreach my $re (@ignore_reqs) {
|
||||
if ($k =~ $re) {
|
||||
debug "req: $k; matches: $re; skip";
|
||||
delete $req{$k};
|
||||
next req;
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach my $v (ref $req{$k} ? keys %{$req{$k}} : undef) {
|
||||
if ($k eq "perl-base") {
|
||||
# too old perl?
|
||||
if ($method ne "strict"
|
||||
&& ($v =~ /^0:/ && $' lt "5.006"
|
||||
|| $v =~ /^1:/ && $' lt "5.6.0")) {
|
||||
delete $req{$k}{$v};
|
||||
%{$req{$k}} && next;
|
||||
delete $req{$k};
|
||||
next req;
|
||||
} else {
|
||||
print "perl-base";
|
||||
}
|
||||
} else {
|
||||
print "perl($k)";
|
||||
}
|
||||
print " >= $v" if $v;
|
||||
print "\n";
|
||||
}
|
||||
}
|
||||
# nothing special?
|
||||
print "perl-base\n" unless %req;
|
@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
umask 077
|
||||
rpm -qa --qf '%{NAME}-%|SERIAL?{%{SERIAL}:}|%{VERSION}-%{RELEASE}.%{ARCH}.rpm\n' 2>&1 |
|
||||
LC_COLLATE=C sort >/var/log/rpmpkgs
|
@ -1,5 +0,0 @@
|
||||
/var/log/rpmpkgs {
|
||||
weekly
|
||||
notifempty
|
||||
missingok
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
# This is entirely speculative at the moment, caveat emptor.
|
||||
service rpmdb
|
||||
{
|
||||
disable = yes
|
||||
type = RPC
|
||||
rpc_number = 351457
|
||||
rpc_version = 1-1
|
||||
protocol = tcp
|
||||
socket_type = stream
|
||||
wait = no
|
||||
user = rpm
|
||||
group = rpm
|
||||
instances = 1
|
||||
server = /usr/bin/berkeley_db_svc
|
||||
server_args = -h /var/lib/rpm
|
||||
}
|
903
scripts/rpmdiff
903
scripts/rpmdiff
@ -1,903 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
# RPM (and it's source code) is covered under two separate licenses.
|
||||
|
||||
# The entire code base may be distributed under the terms of the GNU
|
||||
# General Public License (GPL), which appears immediately below.
|
||||
# Alternatively, all of the source code in the lib subdirectory of the
|
||||
# RPM source code distribution as well as any code derived from that
|
||||
# code may instead be distributed under the GNU Library General Public
|
||||
# License (LGPL), at the choice of the distributor. The complete text
|
||||
# of the LGPL appears at the bottom of this file.
|
||||
|
||||
# This alternatively is allowed to enable applications to be linked
|
||||
# against the RPM library (commonly called librpm) without forcing
|
||||
# such applications to be distributed under the GPL.
|
||||
|
||||
# Any questions regarding the licensing of RPM should be addressed to
|
||||
# Erik Troan <ewt@redhat.com>.
|
||||
|
||||
|
||||
# rpmdiff - a program for comparing two rpm files for differences.
|
||||
# Written by Ken Estes, Mail.com.
|
||||
|
||||
use Getopt::Long;
|
||||
|
||||
# much of this code comes from reading the book
|
||||
# "Maximum RPM" by Edward C. Bailey
|
||||
|
||||
|
||||
sub usage {
|
||||
|
||||
my $args = "[--".join("] [--", @ARGS)."]";
|
||||
my @default_args = map $RPMTAG->{$_}->{'arg'}, @DEFAULT_CMP;
|
||||
my $default_args = "--".join(" --", @default_args)."";
|
||||
|
||||
my $usage =<<EOF;
|
||||
|
||||
$0 [--version] [--help] [--cmpmode] [--all]
|
||||
$args
|
||||
old_rpm_file new_rpm_file
|
||||
|
||||
|
||||
Arguments
|
||||
|
||||
|
||||
--version Print version information for this program
|
||||
|
||||
--help Show this usage page
|
||||
|
||||
--cmpmode Do not send any information to stdout, instead
|
||||
exit with zero if the rpm files are identical and
|
||||
exit with 1 if there are differences.
|
||||
|
||||
--all Ensure that all possible comparisons will be performed.
|
||||
This argument should not be used with any CMP arguments.
|
||||
|
||||
|
||||
CMP Arguments
|
||||
|
||||
|
||||
Many of the options are designed to select which comparisons the user
|
||||
is interested in so that spurious differences can be ignored. If no
|
||||
CMP arguments are chosen then the default arguments are picked.
|
||||
|
||||
The CMP arguments are:
|
||||
$args
|
||||
|
||||
The default arguments are:
|
||||
$default_args
|
||||
|
||||
There are two methods of picking which comparisions will be performed.
|
||||
Any differences between the two files which are not in the list of
|
||||
performed comparisons will be ignored.
|
||||
|
||||
First arguments may be specified on the command line preceeded with a
|
||||
'--' as in '--md5' these arguments specify which comparisons will be
|
||||
performed. If a comparison is not mentioned on the command line it will
|
||||
not be performed.
|
||||
|
||||
Second arguments may be specified on the command line preceeded with a
|
||||
'--no' as in '--nomd5' these arguments specify which comparisons will
|
||||
not be performed. If a comparison is not mentioned on the command line
|
||||
it will be prefomed.
|
||||
|
||||
You can not mix the two types of arguments.
|
||||
|
||||
|
||||
Synopsis
|
||||
|
||||
|
||||
This script will compare old_rpm_file and new_rpm_file and print to
|
||||
standard out the differences between the two files. The output is
|
||||
designed to help isolate the changes which will occur when upgrading
|
||||
an installed package. The output looks like the output of 'rpm -V'.
|
||||
It is assumed that you have installed oldpackage and are thinking of
|
||||
upgrading to newpackage. The output is as if you ran 'rpm -Va' after
|
||||
installing the new package with cpio so that the rpm database was not
|
||||
up todate. Thus 'rpm -Va' will pick up the differences between the
|
||||
two pacakges.
|
||||
|
||||
|
||||
Additionally the RPM scripts (prein, postin, triggers, verify, etc)
|
||||
are compared and their results are displayed as if the scripts ended
|
||||
up as files in the filesystem.
|
||||
|
||||
Exit Code
|
||||
|
||||
|
||||
The if not run in cmpmode the program exists with the number of files
|
||||
which are different between the two packages, the exitcode will get no
|
||||
bigger than $MAX_EXIT.
|
||||
|
||||
If run in cmpmode then the program will exit with zero if the rpm
|
||||
files are identical and exit with 1 if there are differences.
|
||||
|
||||
|
||||
BUGS
|
||||
|
||||
|
||||
This program only parses the RPM file headers not the cpio payload
|
||||
inside the RPM file. In the rare case where an tag is defined in one
|
||||
RPM and not in another we charitably assume that the RPMs match on
|
||||
this tag. An example of this may be file uid/gid\'s. Currently rpm
|
||||
does not store this information in the header, it appears only in the
|
||||
cpio payload. If you were to compare two rpm files and one of them
|
||||
does not have the uid/gid\'s in the header then no difference in
|
||||
uid/gid will ever appear in the output regardless of what the RPMs
|
||||
actually contain.
|
||||
|
||||
The program only checks differences between files and scripts, any
|
||||
changes to dependencies, prefixes, or spec file header information are
|
||||
not checked.
|
||||
|
||||
There is no method provided to check changes in a files flags, this
|
||||
includes changes to the files documentation, MISSINGOK, NOREPLACE, or
|
||||
configuration status.
|
||||
|
||||
|
||||
Output Format
|
||||
|
||||
|
||||
The differences are sent to stdout. There is one line for each file
|
||||
which is different. The differences are encoded in a string using the
|
||||
following letters to represent the differerences and the following
|
||||
order to encode the information:
|
||||
|
||||
S is the file size
|
||||
|
||||
M is the file\'s mode
|
||||
|
||||
5 is the MD5 checksum of the file
|
||||
|
||||
D is the files major and monor numbers
|
||||
|
||||
L is the files symbolic link contents.
|
||||
|
||||
U is the owner of the file
|
||||
|
||||
G is the file\'s group
|
||||
|
||||
T is the modification time of the file
|
||||
|
||||
added indicates the file was added to the old version
|
||||
|
||||
missing indicates the file was deleted from the old version
|
||||
|
||||
Any attributes which match are denoted with a '.'.
|
||||
|
||||
|
||||
Output Example
|
||||
|
||||
|
||||
S.5..... PREIN
|
||||
.....UG. /bin/echo
|
||||
..5....T /usr/bin/grep
|
||||
S.5....T /etc/info-dir
|
||||
missing /usr/doc/dhcpcd-0.70/README
|
||||
.M...... /usr/lib/libpanel.so.4
|
||||
added /usr/lib/libmenu.so.4
|
||||
SM5....T /usr/info/dir
|
||||
|
||||
|
||||
Usage Example
|
||||
|
||||
|
||||
$0 --help
|
||||
$0 --version
|
||||
|
||||
$0 java-jdk-1.1.7-2.rpm java-jdk-1.1.7-3.rpm
|
||||
$0 --md5 java-jdk-1.1.7-2.rpm java-jdk-1.1.7-3.rpm
|
||||
$0 --nomd5 java-jdk-1.1.7-2.rpm java-jdk-1.1.7-3.rpm
|
||||
$0 --md5 --link --mtime java-jdk-1.1.7-2.rpm java-jdk-1.1.7-3.rpm
|
||||
$0 --all java-jdk-1.1.7-2.rpm java-jdk-1.1.7-3.rpm
|
||||
$0 --cmpmode java-jdk-1.1.7-2.rpm java-jdk-1.1.7-3.rpm
|
||||
$0 --cmpmode --md5 java-jdk-1.1.7-2.rpm java-jdk-1.1.7-3.rpm
|
||||
|
||||
|
||||
EOF
|
||||
|
||||
print $usage;
|
||||
exit 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
sub set_static_vars {
|
||||
|
||||
# This functions sets all the static variables which are often
|
||||
# configuration parameters. Since it only sets variables to static
|
||||
# quantites it can not fail at run time. Some of these variables are
|
||||
# adjusted by parse_args() but asside from that none of these
|
||||
# variables are ever written to. All global variables are defined here
|
||||
# so we have a list of them and a comment of what they are for.
|
||||
|
||||
|
||||
# The numerical indicies to the hash comes from ~rpm/lib/rpmlib.h
|
||||
# the index is the number of the tag as it appears in the rpmfile.
|
||||
|
||||
# tag_name: the name of the tag as it appears in rpmlib.h.
|
||||
|
||||
# all entries have a tag_name if an entry has one of the next three
|
||||
# fields it must have the rest. If a tag does not have the next three
|
||||
# fields we we will still gather data for it. This is for future
|
||||
# functionality as these fields look important, and for debugging.
|
||||
|
||||
|
||||
# diff_order: if the tag is used in the different output then this is
|
||||
# the order of the character differences.
|
||||
|
||||
# diff_char: if the tag is used in the different output then this is
|
||||
# the character which will appear when there is a
|
||||
# difference.
|
||||
|
||||
# arg: the name of the command line option to specify whether this tag
|
||||
# is used in the difference or not
|
||||
|
||||
# The scripts contained in the rpm (preinstall, postinstall) do not
|
||||
# have the comparison information that files have. Some of the
|
||||
# comparisons (md5, size) can be performed on scripts, using regular
|
||||
# perl functions, others (uid, modes, link) can not. We use
|
||||
# script_cmp to link the perl comparison function to the comparison
|
||||
# arguments and to the diff_char.
|
||||
|
||||
# script_cmp: the perl comparion function to perform if this
|
||||
# difference can be performed on the rpm scripts
|
||||
|
||||
# is_script: if defined this indicates that the datatype is a script
|
||||
# and we can use script_cmp on it. The data is stored as an array
|
||||
# containing a single string.
|
||||
|
||||
|
||||
# note: that although we may need to denote differences in the flags
|
||||
# this table may not be appropriate for that task.
|
||||
|
||||
|
||||
# The data from the RPM files is stored in $RPM0, $RPM1 they are HoL.
|
||||
# The hash is indexed with the same index as appears in $RPMTAG, the
|
||||
# other data is what ever comes out of the file. Most of the data we
|
||||
# want is stored as arrays of values (occasionally it is a scalar
|
||||
# value). We keep a hash to allow us to find the index number to use
|
||||
# in all arrays given the filename. Some information like the package
|
||||
# name and the posinstall script are stored, in the hash table as an
|
||||
# array which contains a single string.
|
||||
|
||||
|
||||
|
||||
|
||||
$RPMTAG = {
|
||||
1000 => {
|
||||
'tag_name' => 'NAME',
|
||||
},
|
||||
1001 => {
|
||||
'tag_name' => 'VERSION',
|
||||
},
|
||||
1002 => {
|
||||
'tag_name' => 'RELEASE',
|
||||
},
|
||||
1006 => {
|
||||
'tag_name' => 'BUILDTIME',
|
||||
},
|
||||
1027 => {
|
||||
'tag_name' => 'OLDFILENAMES',
|
||||
},
|
||||
1028 => {
|
||||
'tag_name' => 'FILESIZES',
|
||||
'diff_order' => 0,
|
||||
'diff_char' => 'S',
|
||||
'arg' => 'size',
|
||||
'script_cmp' => sub { return (length($_[0]) ne
|
||||
length($_[1])); },
|
||||
},
|
||||
1029 => {
|
||||
'tag_name' => 'FILESTATES',
|
||||
},
|
||||
1030 => {
|
||||
'tag_name' => 'FILEMODES',
|
||||
'diff_order' => 1,
|
||||
'diff_char' => 'M',
|
||||
'arg' => 'mode',
|
||||
},
|
||||
1033 => {
|
||||
'tag_name' => 'FILERDEVS',
|
||||
'diff_order' => 3,
|
||||
'diff_char' => 'D',
|
||||
'arg' => 'dev',
|
||||
},
|
||||
1034 => {
|
||||
'tag_name' => 'FILEMTIMES',
|
||||
'diff_order' => 7,
|
||||
'diff_char' => 'T',
|
||||
'arg' => 'mtime',
|
||||
},
|
||||
1035 => {
|
||||
'tag_name' => 'FILEMD5S',
|
||||
'diff_order' => 2,
|
||||
'diff_char' => '5',
|
||||
'arg' => 'md5',
|
||||
'script_cmp' => sub{ return ($_[0] ne
|
||||
$_[1]); },
|
||||
},
|
||||
1036 => {
|
||||
'tag_name' => 'FILELINKTOS',
|
||||
'diff_order' => 4,
|
||||
'diff_char' => 'L',
|
||||
'arg' => 'link',
|
||||
},
|
||||
1037 => {
|
||||
'tag_name' => 'FILEFLAGS',
|
||||
},
|
||||
1038 => {
|
||||
'tag_name' => 'ROOT',
|
||||
},
|
||||
1039 => {
|
||||
'tag_name' => 'FILEUSERNAME',
|
||||
'diff_order' => 5,
|
||||
'diff_char' => 'U',
|
||||
'arg' => 'user',
|
||||
},
|
||||
1040 => {
|
||||
'tag_name' => 'FILEGROUPNAME',
|
||||
'diff_order' => 6,
|
||||
'diff_char' => 'G',
|
||||
'arg' => 'group',
|
||||
},
|
||||
1098 => {
|
||||
'tag_name' => 'PREFIXES',
|
||||
},
|
||||
1099 => {
|
||||
'tag_name' => 'INSTPREFIXES',
|
||||
},
|
||||
|
||||
# support for differences of scripts
|
||||
|
||||
1023 => {
|
||||
'tag_name' => 'PREIN',
|
||||
'is_script' => 1,
|
||||
},
|
||||
1024 => {
|
||||
'tag_name' => 'POSTIN',
|
||||
'is_script' => 1,
|
||||
},
|
||||
1025 => {
|
||||
'tag_name' => 'PREUN',
|
||||
'is_script' => 1,
|
||||
},
|
||||
1026 => {
|
||||
'tag_name' => 'POSTUN',
|
||||
'is_script' => 1,
|
||||
},
|
||||
1079 => {
|
||||
'tag_name' => 'VERIFYSCRIPT',
|
||||
'is_script' => 1,
|
||||
},
|
||||
1065 => {
|
||||
'tag_name' => 'TRIGGERSCRIPTS',
|
||||
'is_script' => 1,
|
||||
},
|
||||
1091 => {
|
||||
'tag_name' => 'VERIFYSCRIPTPROG',
|
||||
'is_script' => 1,
|
||||
},
|
||||
1092 => {
|
||||
'tag_name' => 'TRIGGERSCRIPTPROG',
|
||||
'is_script' => 1,
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
# by default check these options, which are the "contents" of the
|
||||
# files.
|
||||
|
||||
@DEFAULT_CMP = ( 1028, 1035, 1036, );
|
||||
|
||||
|
||||
$RPM_FILE_MAGIC = chr(0xed).chr(0xab).chr(0xee).chr(0xdb);
|
||||
$RPM_HEADER_MAGIC = chr(0x8e).chr(0xad).chr(0xe8);
|
||||
|
||||
# we want the second header block, as the first header is the
|
||||
# signature block.
|
||||
|
||||
$HEADER_BLOCK_NUM = 2;
|
||||
|
||||
# number of bytes in the file to skip when looking for the first
|
||||
# header. Actually I think the lead is bigger then this like 96, but
|
||||
# I am sure this minimum value is correct.
|
||||
|
||||
$LEAD_LENGTH = 66;
|
||||
|
||||
$HEADER_RECORD_SIZE = 16;
|
||||
|
||||
# largest exit code we allow.
|
||||
|
||||
$MAX_EXIT = 250;
|
||||
|
||||
$NUM_DIFFERENCES = 0;
|
||||
|
||||
$RCS_REVISION = ' $Revision$ ';
|
||||
|
||||
# set a known path.
|
||||
|
||||
$ENV{'PATH'}= (
|
||||
'/opt/gnu/bin'.
|
||||
':/usr/local/bin'.
|
||||
':/usr/bin'.
|
||||
':/bin'.
|
||||
'');
|
||||
|
||||
# taint perl requires we clean up these bad environmental variables.
|
||||
|
||||
delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
|
||||
|
||||
|
||||
$VERSION = 'NONE';
|
||||
if ( $RCS_REVISION =~ m/([.0-9]+)/ ) {
|
||||
$VERSION = $1;
|
||||
}
|
||||
|
||||
return ;
|
||||
}
|
||||
|
||||
|
||||
sub parse_args{
|
||||
|
||||
my $arg_include = '';
|
||||
my $arg_exclude = '';
|
||||
my %arg_tags= ();
|
||||
|
||||
my @args_with_bang = ();
|
||||
my %arg2tag = ();
|
||||
|
||||
# find out what arguments are availible and build some
|
||||
# data structures to work with them.
|
||||
|
||||
foreach $tag (keys %$RPMTAG ) {
|
||||
my $arg = $RPMTAG->{$tag}->{'arg'};
|
||||
($arg) || next;
|
||||
push @ARGS, $arg;
|
||||
push @ALL_CMP_TAGS, $tag;
|
||||
push @args_with_bang, "$arg!";
|
||||
$arg2tag{$arg}=$tag;
|
||||
}
|
||||
|
||||
# sort the tags to determine the proper comparison order.
|
||||
# use the order stored in the RPMTAG table.
|
||||
# If this code is too confusing, look up
|
||||
# 'Schwartzian Transform' in perlfaq4 or an advanced perl book.
|
||||
|
||||
@ALL_CMP_TAGS = map { $_->[0] }
|
||||
sort{ $a->[1] <=> $b->[1] }
|
||||
map { [ $_, $RPMTAG->{$_}->{'diff_order'} ] }
|
||||
@ALL_CMP_TAGS;
|
||||
|
||||
$FILES_EQ_STRING = '.' x scalar(@ALL_CMP_TAGS);
|
||||
|
||||
if( !GetOptions("version", "help", "all", "cmpmode!", @args_with_bang) ) {
|
||||
print("Illegal options in \@ARGV: '@ARGV'\n");
|
||||
usage() ;
|
||||
exit 1 ;
|
||||
}
|
||||
|
||||
if($opt_version) {
|
||||
print "$0: Version: $VERSION\n";
|
||||
exit 0;
|
||||
}
|
||||
|
||||
if ($opt_help) {
|
||||
usage();
|
||||
}
|
||||
|
||||
if ($opt_all) {
|
||||
# all is just an exclude with nothing to exclude
|
||||
$arg_exclude = 1;
|
||||
}
|
||||
|
||||
# process each of the arguments derived from the $RPMTAG hash
|
||||
|
||||
foreach $arg (@ARGS) {
|
||||
my $arg_var = "opt_$arg";
|
||||
if (defined($$arg_var)) {
|
||||
$arg_tags{$arg2tag{$arg}} = 1;
|
||||
if ($$arg_var) {
|
||||
$arg_include = 1;
|
||||
} else {
|
||||
$arg_exclude = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
($arg_include) && ($arg_exclude) &&
|
||||
die("$0: Can not mix both include and exclude arguements ".
|
||||
"on the command line.\n");
|
||||
|
||||
if ($arg_include) {
|
||||
# check only the options listed
|
||||
foreach $tag (keys %arg_tags) {
|
||||
$CMP_TAGS{$tag} = 1;
|
||||
}
|
||||
} elsif ($arg_exclude) {
|
||||
# check everything but the options listed
|
||||
foreach $tag (@ALL_CMP_TAGS) {
|
||||
$CMP_TAGS{$tag} = 1;
|
||||
}
|
||||
foreach $tag (keys %arg_tags) {
|
||||
delete $CMP_TAGS{$tag};
|
||||
}
|
||||
} else {
|
||||
# check the default options
|
||||
foreach $tag (@DEFAULT_CMP) {
|
||||
$CMP_TAGS{$tag} = 1;
|
||||
}
|
||||
}
|
||||
|
||||
($#ARGV == 1) ||
|
||||
die("$0: Argument list must include two file names\n");
|
||||
|
||||
$RPMFILE0 = $ARGV[0];
|
||||
$RPMFILE1 = $ARGV[1];
|
||||
|
||||
( !(-f $RPMFILE0) || !(-r $RPMFILE0) ) &&
|
||||
die("$0: '$RPMFILE0' is not a readable file\n");
|
||||
|
||||
( !(-f $RPMFILE1) || !(-r $RPMFILE1) ) &&
|
||||
die("$0: '$RPMFILE1' is not a readable file\n");
|
||||
|
||||
$CMP_MODE = ($opt_cmpmode == 1);
|
||||
|
||||
return ;
|
||||
}
|
||||
|
||||
# read the rpmfile and extract the header information.
|
||||
|
||||
sub parse_rpm_headers {
|
||||
my ($filename) = @_;
|
||||
|
||||
my $file = '';
|
||||
my $out = {};
|
||||
|
||||
# read whole file into memory
|
||||
{
|
||||
open (RPMFILE, "<$filename")||
|
||||
die("$0: Could not open: $filename for reading. $!\n");
|
||||
|
||||
# not needed on unix but lets be very clear
|
||||
binmode (RPMFILE);
|
||||
|
||||
# slurp whole file
|
||||
my $old_irs = $/;
|
||||
undef $/;
|
||||
|
||||
$file = <RPMFILE>;
|
||||
|
||||
$/ = $old_irs;
|
||||
|
||||
close(RPMFILE)||
|
||||
die("$0: Could not close: $filename. $!\n");
|
||||
|
||||
$file =~ m/^$RPM_FILE_MAGIC/ ||
|
||||
die("$0: file: $filename is not an RPM file. ".
|
||||
"No magic number found.\n");
|
||||
}
|
||||
|
||||
# we want the second header block, as the first header is the
|
||||
# signature block.
|
||||
|
||||
my ($header_start, $store_start) = ($LEAD_LENGTH,0);
|
||||
my ($_version, $_reserved, $num_header_entries, $num_store_bytes) = ();
|
||||
|
||||
foreach $i (1 .. $HEADER_BLOCK_NUM) {
|
||||
|
||||
# find beginning of header,
|
||||
$header_start = index($file, $RPM_HEADER_MAGIC, $header_start);
|
||||
($header_start < 0) &&
|
||||
die("$0: file: $filename is not an RPM file. ".
|
||||
"No: $i, header found.\n");
|
||||
|
||||
$header_start += length($RPM_HEADER_MAGIC);
|
||||
|
||||
($_version, $_reserved, $num_header_entries, $num_store_bytes) =
|
||||
unpack("CNNN", substr($file, $header_start, 1+(4*3)));
|
||||
$header_start += 1+(4*3);
|
||||
|
||||
# find beginning of store
|
||||
$store_start = $header_start +
|
||||
($num_header_entries * $HEADER_RECORD_SIZE);
|
||||
|
||||
( ($store_start + $num_store_bytes) < length($file) ) ||
|
||||
die("$0: File Parse Error, file: $filename, ".
|
||||
"is not long enough to hold store.\n");
|
||||
}
|
||||
|
||||
# the header is just a list of information about data.
|
||||
# the data is stored in the store futher down the file.
|
||||
my $header_position = $header_start;
|
||||
foreach $i (0 .. $num_header_entries-1) {
|
||||
|
||||
my ($tag, $data_type, $offset, $data_count) =
|
||||
unpack("N4", substr($file, $header_position, $HEADER_RECORD_SIZE));
|
||||
$header_position += $HEADER_RECORD_SIZE;
|
||||
|
||||
(
|
||||
( ($tag < 100) || ($tag > 1200) ) ||
|
||||
( ($data_type < 0) || ($data_type > 10) ) ||
|
||||
($offset < 0)
|
||||
) && die("$0: Error parsing header in rpm file: $filename, ".
|
||||
"record number: $i.\n");
|
||||
|
||||
# we are only interested in the tags which are defined
|
||||
$RPMTAG->{$tag} || next;
|
||||
|
||||
foreach $j (0 .. $data_count-1) {
|
||||
my $value ='';
|
||||
if (0) {
|
||||
# dummy for aliging the code like a case statement
|
||||
} elsif ($data_type == 0) {
|
||||
# null
|
||||
$value = '';
|
||||
} elsif ($data_type == 1) {
|
||||
# char
|
||||
$value = substr($file, $store_start+$offset, 1);
|
||||
$offset += 1;
|
||||
} elsif ($data_type == 2) {
|
||||
# int8
|
||||
$value = ord(substr($file, $store_start+$offset, 1));
|
||||
$offset += 1;
|
||||
} elsif ($data_type == 3) {
|
||||
# int16
|
||||
$value = unpack("n", substr($file, $store_start+$offset, 2));
|
||||
$offset += 2;
|
||||
} elsif ($data_type == 4) {
|
||||
# int32
|
||||
$value = unpack("N", substr($file, $store_start+$offset, 4));
|
||||
$offset += 4;
|
||||
} elsif ($data_type == 5) {
|
||||
# int64
|
||||
# ---- These aren't supported by RPM (yet) */
|
||||
die("$0: int64 type found in rpm file: $filename, ".
|
||||
"record number: $i.\n");
|
||||
} elsif ($data_type == 6) {
|
||||
# string
|
||||
my $null_position = index ($file, "\0", $store_start+$offset);
|
||||
my $length = $null_position - ($store_start+$offset);
|
||||
$value = substr($file, $store_start+$offset, $length);
|
||||
$offset += $length;
|
||||
} elsif ($data_type == 7) {
|
||||
# bin
|
||||
# to properly support this I need to move it outside the $j
|
||||
# loop. However I do not need it.
|
||||
die("$0: Bin type found in rpm file: $filename, ".
|
||||
"record number: $i.\n");
|
||||
} elsif ($data_type == 8) {
|
||||
# string_array
|
||||
my $null_position = index ($file, "\0", $store_start+$offset);
|
||||
my $length = $null_position - ($store_start+$offset);
|
||||
$value = substr($file, $store_start+$offset, $length);
|
||||
$offset += $length+1
|
||||
} elsif ($data_type == 9) {
|
||||
# this is listed as both RPM_I18NSTRING_TYPE and RPM_MAX_TYPE
|
||||
# in file ~rpm/lib/header.h but I ignore it
|
||||
die("$0: I18NSTRING type found in rpm file: $filename, ".
|
||||
"record number: $i.\n");
|
||||
}
|
||||
|
||||
push @{$out->{$tag}}, $value;
|
||||
if ($RPMTAG->{$tag}->{"tag_name"} eq 'OLDFILENAMES') {
|
||||
$out->{'name2index'}->{$value} = $j;
|
||||
}
|
||||
} # foreach $j
|
||||
|
||||
} # foreach $i
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
|
||||
# traverse the datastructures to create a text representation of the
|
||||
# critical differences between rpmscripts. If we are running in
|
||||
# cmpmode and a difference is found exit early.
|
||||
|
||||
|
||||
sub format_script_differences {
|
||||
my ($rpm0, $rpm1) = @_;
|
||||
|
||||
my $out = '';;
|
||||
my %seen = ();
|
||||
|
||||
foreach $script ( sort (keys %$RPMTAG) ) {
|
||||
|
||||
($RPMTAG->{$script}->{'is_script'}) || next;
|
||||
|
||||
($rpm0->{$script} || $rpm1->{$script}) || next;
|
||||
|
||||
my $prefix='';
|
||||
|
||||
if ( ($rpm0->{$script}) && (!($rpm1->{$script})) ) {
|
||||
$prefix = 'missing ';
|
||||
} elsif ( (!($rpm0->{$script})) && ($rpm1->{$script}) ) {
|
||||
$prefix = 'added ';
|
||||
} else {
|
||||
my $diff_str = '';
|
||||
foreach $cmp_tag (@ALL_CMP_TAGS) {
|
||||
if ( !($CMP_TAGS{$cmp_tag}) ||
|
||||
!($RPMTAG->{$cmp_tag}->{'script_cmp'}) ){
|
||||
$diff_str .= '.';
|
||||
next;
|
||||
}
|
||||
|
||||
# In the rare case where an tag is defined in one RPM and not
|
||||
# in another we charitably assume that the RPMs match on this
|
||||
# tag. There is a warning in the stderr anyway.
|
||||
|
||||
if (
|
||||
($rpm0->{$cmp_tag}) &&
|
||||
($rpm1->{$cmp_tag}) &&
|
||||
|
||||
# use the anonymous comparison function (stored in the
|
||||
# table) to compare the two scripts
|
||||
|
||||
(&{$RPMTAG->{$cmp_tag}->{'script_cmp'}}
|
||||
($rpm0->{$script}->[0], $rpm1->{$script}->[0]))
|
||||
) {
|
||||
$diff_str .= $RPMTAG->{$cmp_tag}->{'diff_char'};
|
||||
} else {
|
||||
$diff_str .= '.';
|
||||
}
|
||||
|
||||
} # foreach $tag
|
||||
if ($diff_str ne $FILES_EQ_STRING) {
|
||||
$prefix = $diff_str;
|
||||
}
|
||||
}
|
||||
|
||||
($prefix) || next;
|
||||
|
||||
if ($CMP_MODE) {
|
||||
exit 1;
|
||||
}
|
||||
|
||||
($NUM_DIFFERENCES < $MAX_EXIT) &&
|
||||
$NUM_DIFFERENCES++;
|
||||
|
||||
$out .= "$prefix $RPMTAG->{$script}->{'tag_name'}\n";
|
||||
|
||||
} # foreach $filename
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
|
||||
|
||||
# traverse the datastructures to create a text representation of the
|
||||
# critical differences between file stored in the pacakge. If we are
|
||||
# running in cmpmode and a difference is found exit early.
|
||||
|
||||
|
||||
|
||||
sub format_file_differences {
|
||||
my ($rpm0, $rpm1) = @_;
|
||||
|
||||
my $out = '';;
|
||||
my %seen = ();
|
||||
|
||||
foreach $filename ( sort (
|
||||
(keys %{$rpm0->{'name2index'}}),
|
||||
(keys %{$rpm1->{'name2index'}})
|
||||
) ) {
|
||||
|
||||
$seen{$filename} && next;
|
||||
$seen{$filename} = 1;
|
||||
$index0 = $rpm0->{'name2index'}->{$filename};
|
||||
$index1 = $rpm1->{'name2index'}->{$filename};
|
||||
|
||||
my $prefix='';
|
||||
|
||||
if ( ($index0) && (!($index1)) ) {
|
||||
$prefix = 'missing ';
|
||||
} elsif ( (!($index0)) && ($index1) ) {
|
||||
$prefix = 'added ';
|
||||
} else {
|
||||
my $diff_str = '';
|
||||
foreach $cmp_tag (@ALL_CMP_TAGS) {
|
||||
if (!($CMP_TAGS{$cmp_tag})){
|
||||
$diff_str .= '.';
|
||||
next;
|
||||
}
|
||||
|
||||
# In the rare case where an tag is defined in one RPM and not
|
||||
# in another we charitably assume that the RPMs match on this
|
||||
# tag. There is a warning in the stderr anyway.
|
||||
|
||||
if (
|
||||
($rpm0->{$cmp_tag}->[$index0]) &&
|
||||
($rpm1->{$cmp_tag}->[$index1]) &&
|
||||
($rpm0->{$cmp_tag}->[$index0] ne
|
||||
$rpm1->{$cmp_tag}->[$index1])
|
||||
) {
|
||||
$diff_str .= $RPMTAG->{$cmp_tag}->{'diff_char'};
|
||||
} else {
|
||||
$diff_str .= '.';
|
||||
}
|
||||
|
||||
} # foreach $tag
|
||||
if ($diff_str ne $FILES_EQ_STRING) {
|
||||
$prefix = $diff_str;
|
||||
}
|
||||
}
|
||||
|
||||
($prefix) || next;
|
||||
|
||||
if ($CMP_MODE) {
|
||||
die 1;
|
||||
}
|
||||
|
||||
($NUM_DIFFERENCES < $MAX_EXIT) &&
|
||||
$NUM_DIFFERENCES++;
|
||||
|
||||
# this set of blanks would contain information from the flags, if
|
||||
# only I was not so lazy
|
||||
|
||||
$out .= "$prefix $filename\n";
|
||||
|
||||
} # foreach $filename
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
# warn user of a cmp that was requested can not be carried out due to
|
||||
# lack of data in the header of atleast one file.
|
||||
|
||||
sub data_missing_warnings {
|
||||
my ($rpm0, $rpm1) = @_;
|
||||
|
||||
my $out = '';;
|
||||
|
||||
foreach $cmp_tag (@ALL_CMP_TAGS) {
|
||||
if (!($CMP_TAGS{$cmp_tag})) {
|
||||
next;
|
||||
}
|
||||
|
||||
if ( ($CMP_TAGS{$cmp_tag}) &&
|
||||
(!$rpm0->{$cmp_tag})
|
||||
){
|
||||
$out .= ("Comparison: '$RPMTAG->{$cmp_tag}->{'arg'}' ".
|
||||
"specified, but data is not availible in ".
|
||||
"rpm: $RPMFILE0.\n");
|
||||
}
|
||||
if ( ($CMP_TAGS{$cmp_tag}) &&
|
||||
(!$rpm1->{$cmp_tag})
|
||||
){
|
||||
$out .= ("Comparison: '$RPMTAG->{$cmp_tag}->{'arg'}' ".
|
||||
"specified, but data is not availible in ".
|
||||
"rpm: $RPMFILE1.\n");
|
||||
}
|
||||
}
|
||||
return $out;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
# -------------- main --------------
|
||||
{
|
||||
set_static_vars();
|
||||
parse_args();
|
||||
$RPM0 = parse_rpm_headers($RPMFILE0);
|
||||
$RPM1 = parse_rpm_headers($RPMFILE1);
|
||||
|
||||
my $warnings = data_missing_warnings($RPM0, $RPM1);
|
||||
|
||||
# we must print warnings before running diff as we may exit early.
|
||||
|
||||
($warnings) &&
|
||||
warn($warnings);
|
||||
|
||||
my $header = "oldpkg $RPMFILE0\n"."newpkg $RPMFILE1\n"."\n\n";
|
||||
my $script_diffs = format_script_differences($RPM0, $RPM1);
|
||||
my $file_diffs = format_file_differences($RPM0, $RPM1);
|
||||
|
||||
($script_diffs || $file_diffs) &&
|
||||
print $header, $script_diffs, $file_diffs;
|
||||
|
||||
exit $NUM_DIFFERENCES;
|
||||
}
|
@ -1,590 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
# a web interface to 'cvs rdiff'. This script makes it easy to query
|
||||
# the tags which are created by the build script.
|
||||
|
||||
|
||||
use CGI ':standard';
|
||||
use File::Basename;
|
||||
use File::stat;
|
||||
use Data::Dumper;
|
||||
|
||||
# the big datastructures are:
|
||||
|
||||
# $RPM_FILE_BY_FQN{$fqn} is the full path rpm wich is discribed by the fqn
|
||||
|
||||
# keys %SORTED_RECENT_FQN is the set of all package names
|
||||
|
||||
# $SORTED_RECENT_FQN{$name} is an ordered list of the most recent
|
||||
# versions of this package
|
||||
|
||||
# for a short time there are these datastrutures but they are large
|
||||
# and expensive to save to disk.
|
||||
|
||||
|
||||
# An rpm_package is a hash of:
|
||||
# $package{'fqn'}="perl-5.00502-3"
|
||||
# $package{'rpm_file'}="$RPMS_DIR/".
|
||||
# "./sparc/perl-5.00502-3.solaris2.6-sparc.rpm"
|
||||
# $package{'srpm_file'}="$SRPMS_DIR/".
|
||||
# "./perl-5.00502-3.src.rpm"
|
||||
# $package{'name'}="perl"
|
||||
# $package{'version'}="5.00502"
|
||||
# $package{'release'}="3"
|
||||
|
||||
# fqn is "fully qualified name"
|
||||
|
||||
# while the $pkg structure exists we find the pkg we want by looking
|
||||
# it up in this structure. This will hold many more packages then the
|
||||
# web page ever knows about.
|
||||
# $BY_NAME{$name}{$version}{$release};
|
||||
|
||||
|
||||
sub usage {
|
||||
|
||||
# If they are asking for help then they are clueless so reset all
|
||||
# their parameters for them, in case they are in a bad state.
|
||||
|
||||
param(-name=>'Defaults', -value=>'on');
|
||||
my $rpmdiff_version = `rpmdiff --version`;
|
||||
|
||||
$usage =<<EOF;
|
||||
|
||||
$0 version: $VERSION
|
||||
$rpmdiff_version
|
||||
|
||||
This is a web interface into the rpmdiff command.
|
||||
|
||||
The user is requested to enter two different packages to diff after
|
||||
any one of the multiple submit buttons is pressed the difference will
|
||||
be the next webpage loaded. For convenience each package name is
|
||||
listed once (in alphabetical order) and below it is checkbox of the
|
||||
most recent $MAX_PICK_LIST versions of this package. Any pick list
|
||||
which is not actively picked by the user contains the string '(none)'.
|
||||
|
||||
The user should pick one package in the first column (this represents
|
||||
the "old package") and one package in the second column (this
|
||||
represents the "new package"). When the user wants to run the
|
||||
difference any 'submit' button can be pressed. The multiple submit
|
||||
buttons are listed only for convenience to reduce hunting for a button
|
||||
on the page.
|
||||
|
||||
Error reporting is very minimal and if an incorrect number of packages
|
||||
is picked then the main page is displayed again. It is suggested that
|
||||
the user hit the default button if any problems are encountered using
|
||||
the program.
|
||||
|
||||
Most users are only interested in differences in the contents of files
|
||||
and the contents of soft links. The defaults for the program reflect
|
||||
this interest. However sometimes users are also interested in changes
|
||||
in permissions or ownership. Alternatively it may happen that a user
|
||||
is only interested in the set of files whose size changes and changes
|
||||
to files which keep the same size should be ignored. To acomidate all
|
||||
possible uses we gave the user great flexibility in determining what
|
||||
set of changes are significant. There is a pick list at the top of
|
||||
the main screen which displays the current criterion for a difference
|
||||
to be displayed. A file which has changes made to properties which
|
||||
are not picked will not be considered different and will not be
|
||||
displayed. Of special note the options:
|
||||
|
||||
help will display the help screen for rpmdiff which contains an
|
||||
explanation of how to read the diff format.
|
||||
|
||||
all will require that all differences are considered important.
|
||||
This is the same as checking all the boxes of differences
|
||||
|
||||
version will display the version of rpmdiff that is being used by
|
||||
this webpage.
|
||||
|
||||
The organization of the pick list page keeps the total number of
|
||||
packages hidden from the user. The pick list page takes a long time
|
||||
to load because the number of choices is very large. To save time the
|
||||
set of package pick lists is not regenerated each time the page is
|
||||
loaded. There may have been new packages added to the package
|
||||
repository since the page was generated and these packages will not be
|
||||
displayed until the page is regenerated again. The page will never be
|
||||
more then one day old. If you need to use the latest contents of the
|
||||
package repository check the box at the bottom of the page marked
|
||||
"Flush Cache" this will increase the loading time of the page but
|
||||
ensure the freshness of the data.
|
||||
|
||||
EOF
|
||||
print pre($usage);
|
||||
|
||||
return ;
|
||||
}
|
||||
|
||||
|
||||
sub set_static_vars {
|
||||
|
||||
# This functions sets all the static variables which are often
|
||||
# configuration parameters. Since it only sets variables to static
|
||||
# quantites it can not fail at run time. Some of these variables are
|
||||
# adjusted by parse_args() but asside from that none of these
|
||||
# variables are ever written to. All global variables are defined here
|
||||
# so we have a list of them and a comment of what they are for.
|
||||
|
||||
|
||||
$ARCHIVE = "/devel/java_repository";
|
||||
$RCS_REVISION = ' $Revision$ ';
|
||||
|
||||
@ORIG_ARGV= @ARGV;
|
||||
|
||||
# The pattern for parsing fqn into ($name, $version, $release).
|
||||
# This is difficult to parse since some hyphens are significant and
|
||||
# others are not, some packages have alphabetic characters in the
|
||||
# version number.
|
||||
|
||||
$PACKAGE_PAT ='(.*)-([^-]+)-([^-]+).solaris2.6-\w*.rpm';
|
||||
|
||||
# packages which will end up in the picklists match this pattern
|
||||
|
||||
$PICKLIST_PAT = '/((htdocs)|(djava)|(devel))';
|
||||
|
||||
# only show the most recent packages
|
||||
|
||||
$MAX_PICK_LIST = 20;
|
||||
|
||||
# the list of allowable arguments to rpmdiff
|
||||
|
||||
@RPMDIFF_ARGS= qw(
|
||||
version help all
|
||||
size mode md5 dev link user group mtime
|
||||
);
|
||||
|
||||
@RPMDIFF_ARGS_DEFAULT = qw(size md5 link);
|
||||
|
||||
# the list of directories where rpms are stored
|
||||
@RPM_ARCHIVES = ('/net/master-mm/export/rpms/redhat',);
|
||||
|
||||
$CACHE_DIR = "/tmp/webtools";
|
||||
|
||||
# In an effort to make the cache update atomic we write to one file
|
||||
# name and only move it into the gobally known name when the whole
|
||||
# file is ready.
|
||||
|
||||
$TMP_CACHE_FILE= "$CACHE_DIR/rpmfiles.cache.$UID";
|
||||
$CACHE_FILE= "$CACHE_DIR/rpmfiles.cache";
|
||||
|
||||
# set a known path.
|
||||
|
||||
# the correct path has not been finalized yet, but this is close.
|
||||
|
||||
$ENV{'PATH'}= (
|
||||
'/usr/local/bin'.
|
||||
':/usr/bin'.
|
||||
':/bin'.
|
||||
':/usr/apache/cgibins/cgi-forms'.
|
||||
':/tmp'.
|
||||
'');
|
||||
|
||||
# taint perl requires we clean up these bad environmental
|
||||
# variables.
|
||||
|
||||
delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
|
||||
|
||||
return 1;
|
||||
} #set_static_vars
|
||||
|
||||
|
||||
|
||||
|
||||
sub get_env {
|
||||
|
||||
# this function sets variables similar to set_static variables. This
|
||||
# function may fail only if the OS is in a very strange state. after
|
||||
# we leave this function we should be all set up to give good error
|
||||
# handling, should things fail.
|
||||
|
||||
$| = 1;
|
||||
$PID = $$;
|
||||
$PROGRAM = basename($0);
|
||||
$TIME = time();
|
||||
$LOCALTIME = localtime($main::TIME);
|
||||
$START_TIME = $TIME;
|
||||
|
||||
{
|
||||
my ($sec,$min,$hour,$mday,$mon,
|
||||
$year,$wday,$yday,$isdst) =
|
||||
localtime(time());
|
||||
|
||||
# convert confusing perl time vars to what users expect
|
||||
|
||||
$year += 1900;
|
||||
$mon++;
|
||||
|
||||
$CVS_DATE_STR = sprintf("%02u/%02u/%02u", $mday, $mon, $year, );
|
||||
$TAG_DATE_STR = sprintf("%02u%02u%02u", $year, $mon, $mday, );
|
||||
$TIME_STR = sprintf("%02u%02u", $hour, $min);
|
||||
}
|
||||
# a unique id for cache file generation
|
||||
$UID = "$TAG_DATE_STR.$TIME_STR.$PID";
|
||||
$VERSION = 'NONE';
|
||||
if ( $RCS_REVISION =~ m/([.0-9]+)/ ) {
|
||||
$VERSION = $1;
|
||||
}
|
||||
|
||||
(-d $CACHE_DIR) ||
|
||||
mkdir($CACHE_DIR, 0664) ||
|
||||
die("Could not mkdir: $CACHE_DIR: $!\n");
|
||||
|
||||
return 1;
|
||||
} # get_env
|
||||
|
||||
|
||||
|
||||
sub parse_fqn {
|
||||
|
||||
# This is difficult to parse since some hyphens are significant and
|
||||
# others are not, some packages have alphabetic characters in the
|
||||
# version number.
|
||||
|
||||
# Also remember that the format of the file is dependent on how RPM
|
||||
# is configured so this may not be portable to all RPM users.
|
||||
|
||||
(!("@_" =~ m/^$PACKAGE_PAT$/)) &&
|
||||
die("rpm_package_name: '$@_' is not in a valid format");
|
||||
|
||||
return ($1, $2, $3);
|
||||
}
|
||||
|
||||
|
||||
sub new_rpm_package {
|
||||
|
||||
# An rpm_package is a hash of:
|
||||
# $package{'fqn'}="perl-5.00502-3"
|
||||
# $package{'rpm_file'}="$RPMS_DIR/".
|
||||
# "./sparc/perl-5.00502-3.solaris2.6-sparc.rpm"
|
||||
# $package{'srpm_file'}="$SRPMS_DIR/".
|
||||
# "./perl-5.00502-3.src.rpm"
|
||||
# $package{'name'}="perl"
|
||||
# $package{'version'}="5.00502"
|
||||
# $package{'release'}="3"
|
||||
|
||||
my ($rpm_file) = @_;
|
||||
my $error = '';
|
||||
my($name, $version, $release) = main::parse_fqn(basename($rpm_file));
|
||||
|
||||
my ($package) = ();
|
||||
|
||||
$package->{'fqn'}="$name-$version-$release";
|
||||
$package->{'name'}=$name;
|
||||
$package->{'version'}=$version;
|
||||
$package->{'release'}=$release;
|
||||
$package->{'rpm_file'}=$rpm_file;
|
||||
|
||||
# these are needed to do proper sorting of major/minor numbers in
|
||||
# the version of the package
|
||||
|
||||
$package->{'version_cmp'}=[split(/\./, $version)];
|
||||
$package->{'release_cmp'}=[split(/\./, $release)];
|
||||
|
||||
return $package;
|
||||
}
|
||||
|
||||
|
||||
sub get_recent_fqn {
|
||||
my ($name) =(@_);
|
||||
|
||||
my @out = ();
|
||||
|
||||
foreach $version ( keys %{ $BY_NAME{$name} }) {
|
||||
foreach $release ( keys %{ $BY_NAME{$name}{$version} }) {
|
||||
|
||||
push @out, $BY_NAME{$name}{$version}{$release};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
# the $BY_NAME datastructure is fairly good but the list can not be
|
||||
# sorted right. Sort again using the Schwartzian Transform as
|
||||
# discribed in perlfaq4
|
||||
|
||||
my @sorted = sort {
|
||||
|
||||
# compare the versions but make no assumptions
|
||||
# about how many elements there are
|
||||
|
||||
my $i=0;
|
||||
my @a_version = @{ $a->{'version_cmp'} };
|
||||
my @b_version = @{ $b->{'version_cmp'} };
|
||||
while (
|
||||
($#a_version > $i) &&
|
||||
($#b_version > $i) &&
|
||||
($a_version[$i] == $b_version[$i])
|
||||
) {
|
||||
$i++;
|
||||
}
|
||||
|
||||
my $j = 0;
|
||||
my @a_release = @{ $a->{'release_cmp'} };
|
||||
my @b_release = @{ $b->{'release_cmp'} };
|
||||
while (
|
||||
($#a_release > $j) &&
|
||||
($#b_release > $j) &&
|
||||
($a_release[$j] == $b_release[$j])
|
||||
) {
|
||||
$j++;
|
||||
}
|
||||
|
||||
return (
|
||||
($b_version[$i] <=> $a_version[$i])
|
||||
||
|
||||
($b_release[$j] <=> $a_release[$j])
|
||||
);
|
||||
}
|
||||
@out;
|
||||
|
||||
($#sorted > $MAX_PICK_LIST) &&
|
||||
(@sorted = @sorted[0 .. $MAX_PICK_LIST]);
|
||||
|
||||
# dumping data to disk is expensive so we only save the data we
|
||||
# need. Limit RPM_FILE_BY_FQN to only those packages which appear
|
||||
# in the picklist and this explains why we do not store the whole
|
||||
# pkg in a BY_FQN hash.
|
||||
|
||||
foreach $pkg (@sorted) {
|
||||
$RPM_FILE_BY_FQN{$pkg->{'fqn'}}=$pkg->{'rpm_file'}
|
||||
}
|
||||
|
||||
my @fqns = map { $_->{'fqn'} } @sorted;
|
||||
|
||||
return @fqns;
|
||||
}
|
||||
|
||||
|
||||
|
||||
sub parse_package_names {
|
||||
|
||||
$flush_cache = param("Flush Cache");
|
||||
if ( (!($flush_cache)) && (-e $CACHE_FILE) && ( -M $CACHE_FILE < 1 ) ) {
|
||||
my $st = stat($CACHE_FILE) ||
|
||||
die ("Could not stat: $CACHE_FILE: $!");
|
||||
$CACHE_LOCALTIME=localtime($st->mtime);
|
||||
require $CACHE_FILE;
|
||||
return ;
|
||||
}
|
||||
|
||||
$CACHE_LOCALTIME=$LOCALTIME;
|
||||
|
||||
foreach $archive (@RPM_ARCHIVES) {
|
||||
|
||||
open(FILES, "-|") ||
|
||||
exec("find", $archive, "-print") ||
|
||||
die("Could not run find. $!\n");
|
||||
|
||||
while ($filename = <FILES>) {
|
||||
|
||||
# we want only the binary rpm files of interest
|
||||
|
||||
($filename =~ m/\.rpm$/) || next;
|
||||
($filename =~ m/\.src\.rpm$/) && next;
|
||||
($filename =~ m/$PICKLIST_PAT/) || next;
|
||||
chomp $filename;
|
||||
|
||||
$pkg = new_rpm_package($filename);
|
||||
$BY_NAME{$pkg->{'name'}}{$pkg->{'version'}}{$pkg->{'release'}} = $pkg;
|
||||
|
||||
}
|
||||
|
||||
close(FILES) ||
|
||||
die("Could not close find. $!\n");
|
||||
|
||||
}
|
||||
|
||||
foreach $group (keys %BY_NAME) {
|
||||
$SORTED_RECENT_FQN{$group} = [get_recent_fqn($group)];
|
||||
|
||||
}
|
||||
|
||||
open(FILE, ">$TMP_CACHE_FILE") ||
|
||||
die("Could not open filename: '$TMP_CACHE_FILE': $!\n");
|
||||
|
||||
print FILE "# cache file created by $0\n";
|
||||
print FILE "# at $LOCALTIME\n\n";
|
||||
|
||||
print FILE Data::Dumper->Dump( [\%RPM_FILE_BY_FQN, \%SORTED_RECENT_FQN],
|
||||
["SAVED_FQN", "SAVED_SORTED",], );
|
||||
|
||||
print FILE "\n\n";
|
||||
print FILE '%RPM_FILE_BY_FQN = %{ $SAVED_FQN };'."\n";
|
||||
print FILE '%SORTED_RECENT_FQN = %{ $SAVED_SORTED };'."\n";
|
||||
print FILE "1;\n";
|
||||
|
||||
close(FILE) ||
|
||||
die("Could not close filename: '$TMP_CACHE_FILE': $!\n");
|
||||
|
||||
# In an effort to make the cache update atomic we write to one file
|
||||
# name and only move it into the gobally known name when the whole
|
||||
# file is ready.
|
||||
|
||||
(!(-e $CACHE_FILE)) ||
|
||||
unlink($CACHE_FILE) ||
|
||||
die("Could not unlink $CACHE_FILE: $!\n");
|
||||
|
||||
rename($TMP_CACHE_FILE, $CACHE_FILE) ||
|
||||
die("Could not rename ($TMP_CACHE_FILE, $CACHE_FILE): $!\n");
|
||||
|
||||
return ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sub print_pkg_picklists {
|
||||
|
||||
print start_form;
|
||||
# create a set of picklists for the packages based on the package names.
|
||||
|
||||
print h3("Choose the criterion for a difference"),
|
||||
checkbox_group(
|
||||
-name=>"rpmdiff arguments",
|
||||
-value=>[ @RPMDIFF_ARGS ],
|
||||
-default=>[ @RPMDIFF_ARGS_DEFAULT ],
|
||||
),p();
|
||||
|
||||
print h3("Choose one package in each column then hit any submit"),p();
|
||||
|
||||
my @rows = ();
|
||||
|
||||
foreach $name (sort keys %SORTED_RECENT_FQN) {
|
||||
|
||||
push @rows,
|
||||
# column A
|
||||
td(
|
||||
strong("$name "),
|
||||
p(),
|
||||
popup_menu(
|
||||
-name=>"old$name",
|
||||
-value=>[
|
||||
'(none)',
|
||||
@{ $SORTED_RECENT_FQN{$name} },
|
||||
],
|
||||
-default=>'(none)',
|
||||
),
|
||||
).
|
||||
# column B
|
||||
td(
|
||||
strong("$name "),
|
||||
p(),
|
||||
popup_menu(
|
||||
-name=>"new$name",
|
||||
-value=>[
|
||||
'(none)',
|
||||
@{ $SORTED_RECENT_FQN{$name} },
|
||||
],
|
||||
-default=>'(none)',
|
||||
),
|
||||
).
|
||||
td(
|
||||
defaults(-name=>'Defaults'),
|
||||
submit(-name=>'Submit'),
|
||||
).
|
||||
'';
|
||||
}
|
||||
|
||||
print table(Tr(\@rows));
|
||||
|
||||
my $footer_info=<<EOF;
|
||||
|
||||
Try 'rpmdiff --help' for information about what constitues a
|
||||
difference. The output of rpmdiff is exactly the same as the output
|
||||
of rpm verify, 'rpm -V'. The --help option documents the format of
|
||||
rpm verify and the format of rpmdiff and is a handy reference for this
|
||||
terse table. rpmdiff is included in the devel-build-tools package.
|
||||
|
||||
|
||||
This web interface is for taking differences in the binary code. To
|
||||
take differences of the binaries use <a href="cvs_tag_diff.cgi">'cvs tag diff'</a>.
|
||||
|
||||
EOF
|
||||
|
||||
print pre($footer_info);
|
||||
|
||||
print "This page generated with data cached at: $CACHE_LOCALTIME\n",p(),
|
||||
"The time is now: $LOCALTIME\n",p(),
|
||||
submit(-name=>"Flush Cache"),p(),
|
||||
submit(-name=>"Help Screen"),p();
|
||||
|
||||
print end_form;
|
||||
|
||||
return ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
sub print_diff {
|
||||
my($oldpkg_file, $newpkg_file, @args) = @_;
|
||||
|
||||
my $cmd = "rpmdiff @args $oldpkg_file $newpkg_file 2>&1";
|
||||
|
||||
my $result = "\n".qx{$cmd}."\n";
|
||||
print pre($result);
|
||||
|
||||
return ;
|
||||
}
|
||||
|
||||
|
||||
# Main
|
||||
{
|
||||
|
||||
set_static_vars();
|
||||
get_env();
|
||||
|
||||
parse_package_names();
|
||||
|
||||
my @picked_rpmdiff_args = param("rpmdiff arguments");
|
||||
@picked_rpmdiff_args = split(/\s+/,
|
||||
'--'.(join(" --", @picked_rpmdiff_args)));
|
||||
push @picked_rpmdiff_args, '--';
|
||||
|
||||
foreach $name (sort keys %SORTED_RECENT_FQN) {
|
||||
|
||||
if ( (param("old$name")) && (param("old$name") ne "(none)") ) {
|
||||
push @picked_oldpkg, param("old$name");
|
||||
}
|
||||
|
||||
if ( (param("new$name")) && (param("new$name") ne "(none)") ) {
|
||||
push @picked_newpkg, param("new$name");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
print (header.
|
||||
start_html(-title=>'rpmdiff'),
|
||||
h2("rpmdiff"));
|
||||
|
||||
if (param("Help Screen")) {
|
||||
|
||||
usage();
|
||||
|
||||
} elsif ( grep {/^(\-\-)((help)|(version))$/} @picked_rpmdiff_args ) {
|
||||
|
||||
print_diff(
|
||||
'/dev/null',
|
||||
'/dev/null',
|
||||
@picked_rpmdiff_args,
|
||||
);
|
||||
|
||||
} elsif (
|
||||
($#picked_oldpkg == 0) &&
|
||||
($#picked_newpkg == 0)
|
||||
) {
|
||||
|
||||
print_diff(
|
||||
$RPM_FILE_BY_FQN{$picked_oldpkg[0]},
|
||||
$RPM_FILE_BY_FQN{$picked_newpkg[0]},
|
||||
@picked_rpmdiff_args,
|
||||
);
|
||||
|
||||
} else {
|
||||
|
||||
print_pkg_picklists();
|
||||
|
||||
print end_html;
|
||||
print "\n\n\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
115
scripts/sql.prov
115
scripts/sql.prov
@ -1,115 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
# RPM and it's source code are covered under two separate licenses.
|
||||
|
||||
# The entire code base may be distributed under the terms of the GNU
|
||||
# General Public License (GPL), which appears immediately below.
|
||||
# Alternatively, all of the source code in the lib subdirectory of the
|
||||
# RPM source code distribution as well as any code derived from that
|
||||
# code may instead be distributed under the GNU Library General Public
|
||||
# License (LGPL), at the choice of the distributor. The complete text
|
||||
# of the LGPL appears at the bottom of this file.
|
||||
|
||||
# This alternatively is allowed to enable applications to be linked
|
||||
# against the RPM library (commonly called librpm) without forcing
|
||||
# such applications to be distributed under the GPL.
|
||||
|
||||
# Any questions regarding the licensing of RPM should be addressed to
|
||||
# marc@redhat.com and ewt@redhat.com.
|
||||
|
||||
|
||||
# sql.prov - a simple script to print the proper name for sql from
|
||||
# both the sepecification and body files.
|
||||
|
||||
|
||||
# by Ken Estes Mail.com kestes@staff.mail.com
|
||||
|
||||
if ("@ARGV") {
|
||||
foreach (@ARGV) {
|
||||
process_file($_);
|
||||
}
|
||||
} else {
|
||||
|
||||
# notice we are passed a list of filenames NOT as common in unix the
|
||||
# contents of the file.
|
||||
|
||||
foreach (<>) {
|
||||
process_file($_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
foreach $module (sort keys %require) {
|
||||
print "sql($module)\n";
|
||||
}
|
||||
|
||||
exit 0;
|
||||
|
||||
|
||||
|
||||
sub process_file {
|
||||
|
||||
my ($filename) = @_;
|
||||
chomp $filename;
|
||||
|
||||
open(FILE, "<$filename")||
|
||||
die("$0: Could not open file: '$filename' : $!\n");
|
||||
|
||||
my ($package, $version) = ();
|
||||
|
||||
my (@file) = <FILE>;
|
||||
|
||||
my ($file) = "@file";
|
||||
|
||||
close(FILE)||
|
||||
die("$0: Could not close file: '$file' : $!\n");
|
||||
|
||||
# skip the comments
|
||||
|
||||
$file =~ s!/\*(.*?)\*/!!gs;
|
||||
$file =~ s!\s*--(.*?)\n!\n!gm;
|
||||
|
||||
@file = split(/\n/, $file);
|
||||
|
||||
foreach (@file) {
|
||||
|
||||
# remove strings
|
||||
|
||||
s!\'[^\']*\'!!g;
|
||||
|
||||
|
||||
# not everyone puts the package name of the file as the first
|
||||
# package name so we report all namespaces as if they were
|
||||
# provided packages (really ugly).
|
||||
|
||||
if (m/\bpackage\s+(body\s*)?(\S+)\s+[ia]s/i) {
|
||||
$package=$2;
|
||||
$package=lc($package);
|
||||
$require{$package}=1;
|
||||
}
|
||||
|
||||
if (m/((procedure)|(function))\s+(\S+)\s*\(/i) {
|
||||
my $func = $4;
|
||||
$func = lc($func);
|
||||
if ($package) {
|
||||
$require{"$package.$func"}=1;
|
||||
} else {
|
||||
$require{$func}=1;
|
||||
}
|
||||
}
|
||||
|
||||
# Each keyword can appear multiple times. Don't
|
||||
# bother with datastructures to store these strings,
|
||||
# if we need to print it print it now.
|
||||
|
||||
if ( m/^\s*\$RPM_Provides\s*:=\s*["'](.*)['"]/i) {
|
||||
foreach $_ (spit(/\s+/, $1)) {
|
||||
print "$_\n";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return ;
|
||||
}
|
108
scripts/sql.req
108
scripts/sql.req
@ -1,108 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
# RPM and it's source code are covered under two separate licenses.
|
||||
|
||||
# The entire code base may be distributed under the terms of the GNU
|
||||
# General Public License (GPL), which appears immediately below.
|
||||
# Alternatively, all of the source code in the lib subdirectory of the
|
||||
# RPM source code distribution as well as any code derived from that
|
||||
# code may instead be distributed under the GNU Library General Public
|
||||
# License (LGPL), at the choice of the distributor. The complete text
|
||||
# of the LGPL appears at the bottom of this file.
|
||||
|
||||
# This alternatively is allowed to enable applications to be linked
|
||||
# against the RPM library (commonly called librpm) without forcing
|
||||
# such applications to be distributed under the GPL.
|
||||
|
||||
# Any questions regarding the licensing of RPM should be addressed to
|
||||
# marc@redhat.com and ewt@redhat.com.
|
||||
|
||||
|
||||
# sql.req - a simple script to print the uses of sql functions.
|
||||
|
||||
|
||||
# by Ken Estes Mail.com kestes@staff.mail.com
|
||||
|
||||
if ("@ARGV") {
|
||||
foreach (@ARGV) {
|
||||
process_file($_);
|
||||
}
|
||||
} else {
|
||||
|
||||
# notice we are passed a list of filenames NOT as common in unix the
|
||||
# contents of the file.
|
||||
|
||||
foreach (<>) {
|
||||
process_file($_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
foreach $module (sort keys %require) {
|
||||
print "sql($module)\n";
|
||||
}
|
||||
|
||||
exit 0;
|
||||
|
||||
|
||||
|
||||
sub process_file {
|
||||
|
||||
my ($filename) = @_;
|
||||
chomp $filename;
|
||||
|
||||
open(FILE, "<$filename")||
|
||||
die("$0: Could not open file: '$filename' : $!\n");
|
||||
|
||||
my ($package, $version) = ();
|
||||
|
||||
my (@file) = <FILE>;
|
||||
|
||||
my ($file) = "@file";
|
||||
|
||||
close(FILE)||
|
||||
die("$0: Could not close file: '$file' : $!\n");
|
||||
|
||||
# skip the comments
|
||||
|
||||
# Suck the whole file in to make removing /* */ (multiple lines
|
||||
# comments) comments easier
|
||||
|
||||
$file =~ s!/\*(.*?)\*/!!gs;
|
||||
$file =~ s!^\s*--(.*?)\n!\n!gm;
|
||||
|
||||
@file = split(/\n/, $file);
|
||||
|
||||
foreach (@file) {
|
||||
|
||||
# remove strings
|
||||
|
||||
s!\'[^\']*\'!!g;
|
||||
|
||||
|
||||
# we are interested in function names which have a dot in them and
|
||||
# are followed by an open parenthesis
|
||||
|
||||
foreach ( m/([a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)\s*\(/ ) {
|
||||
my $func = $_;
|
||||
$func=lc($func);
|
||||
$func =~ m/\.\./ &&
|
||||
next;
|
||||
$require{$func}=1;
|
||||
}
|
||||
|
||||
# Each keyword can appear multiple times. Don't
|
||||
# bother with datastructures to store these strings,
|
||||
# if we need to print it print it now.
|
||||
|
||||
if ( m/^\s*\$RPM_Provides\s*:=\s*["'](.*)['"]/i) {
|
||||
foreach $_ (spit(/\s+/, $1)) {
|
||||
print "$_\n";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return ;
|
||||
}
|
@ -1,98 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
# tcl.req - a simple makedepends like script for tcl.
|
||||
|
||||
# I plan to rewrite this in C so that perl is not required by RPM at
|
||||
# build time.
|
||||
|
||||
# by Ken Estes Mail.com kestes@staff.mail.com
|
||||
|
||||
use File::Basename;
|
||||
|
||||
if ("@ARGV") {
|
||||
foreach (@ARGV) {
|
||||
process_file($_);
|
||||
}
|
||||
} else {
|
||||
|
||||
# notice we are passed a list of filenames NOT as common in unix the
|
||||
# contents of the file.
|
||||
|
||||
foreach (<>) {
|
||||
process_file($_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
foreach $module (sort keys %require) {
|
||||
print "tcl($module)\n";
|
||||
}
|
||||
|
||||
exit 0;
|
||||
|
||||
|
||||
|
||||
sub process_file {
|
||||
|
||||
my ($file) = @_;
|
||||
chomp $file;
|
||||
|
||||
open(FILE, "<$file")||
|
||||
die("$0: Could not open file: '$file' : $!\n");
|
||||
|
||||
while (<FILE>) {
|
||||
|
||||
# Each keyword can appear multiple times. Don't
|
||||
# bother with datastructures to store these strings,
|
||||
# if we need to print it print it now.
|
||||
|
||||
if ( m/^\s*\$RPM_Requires\s*=\s*["'](.*)['"]/i) {
|
||||
foreach $_ (spit(/\s+/, $1)) {
|
||||
print "$_\n";
|
||||
}
|
||||
}
|
||||
|
||||
s/\#.*//;
|
||||
|
||||
# Each keyword can appear multiple times. Don't
|
||||
# bother with datastructures to store these strings,
|
||||
# if we need to print it print it now.
|
||||
|
||||
if ( m/^\s*\$RPM_Requires\s*=\s*["'](.*)['"]/i) {
|
||||
print "$_\n"
|
||||
foreach split /\s+/, $1;
|
||||
}
|
||||
|
||||
|
||||
# we wish to capture these source statements:
|
||||
|
||||
# source "$PATH/lib/util.tcl"
|
||||
# source "comconf.tcl"
|
||||
# if {[catch {source $env(CONTROL_PANEL_LIB_DIR)/bindings.tcl}] != 0} {
|
||||
|
||||
# quick check to see if the complex regexps could possibly match.
|
||||
# This should speed things up.
|
||||
|
||||
(m/source/) || next;
|
||||
|
||||
# note we include parethesis and '$' and '\' in the pattern
|
||||
if ( m!source\s+(['"])?([0-9A-Za-z/._\-\\\(\)\$]+)! ) {
|
||||
|
||||
my ($module) = $2;
|
||||
|
||||
# If there is some interpolation of variables,
|
||||
# see if taking the basename will give us the filename.
|
||||
|
||||
($module =~ m/\$/) &&
|
||||
($module = basename($module));
|
||||
|
||||
($module =~ m/\$/) ||
|
||||
($require{$module}=1);
|
||||
}
|
||||
}
|
||||
|
||||
close(FILE)||
|
||||
die("$0: Could not close file: '$file' : $!\n");
|
||||
|
||||
return ;
|
||||
}
|
265
scripts/trpm
265
scripts/trpm
@ -1,265 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
dbg= # echo
|
||||
|
||||
rpm=/bin/rpm
|
||||
#rpmi=mrpm
|
||||
rpmi=/bin/rpm
|
||||
#rpmi="strace -o xxx /bin/rpm"
|
||||
rpmb=/usr/bin/rpmbuild
|
||||
rpmq=/usr/bin/rpmquery
|
||||
rpmdb=/usr/bin/rpmdb
|
||||
|
||||
#rpm=/X/src/rpm402/rpm
|
||||
#rpmb=/X/src/rpm402/rpmb
|
||||
#rpmq=/X/src/rpm402/rpmq
|
||||
#rpmdb=/X/src/rpm402/rpmdb
|
||||
|
||||
#rpm=/X/src/rpm307/rpm
|
||||
#rpmb=$rpm
|
||||
#rpmq=$rpm
|
||||
#rpmdb=$rpm
|
||||
|
||||
dist=7.0
|
||||
type=min
|
||||
arch=`$rpm --eval '%{_arch}'`
|
||||
|
||||
top=`pwd`
|
||||
root=$top/$dist
|
||||
sudo=sudo
|
||||
justdb="--justdb --noscripts --notriggers --ignoresize"
|
||||
dmopts="-l dmalloc.log -i 100 low"
|
||||
db1=
|
||||
rc="--rcfile $top/rpmrc-$dist"
|
||||
sorted= # "| sort"
|
||||
|
||||
min0glob="
|
||||
basesystem-
|
||||
bash-[12]
|
||||
filesystem-
|
||||
glibc-common-
|
||||
glibc-2
|
||||
ldconfig-
|
||||
libtermcap-2
|
||||
mktemp-
|
||||
setup-
|
||||
termcap-
|
||||
"
|
||||
|
||||
min1glob="
|
||||
$min0glob
|
||||
bzip2-[01]
|
||||
bzip2-libs-
|
||||
chkconfig-
|
||||
db1-1
|
||||
db2-2
|
||||
db3-3
|
||||
dev-
|
||||
diffutils-
|
||||
e2fsprogs-1
|
||||
fileutils-
|
||||
findutils-
|
||||
gawk-
|
||||
gdb-
|
||||
gdbm-1
|
||||
grep-
|
||||
gzip-
|
||||
info-
|
||||
mount-
|
||||
ncurses-[45]
|
||||
procps-2
|
||||
psmisc-
|
||||
sed-
|
||||
shadow-utils-
|
||||
readline-[24]
|
||||
rmt-
|
||||
tar-
|
||||
textutils-
|
||||
vim-common-
|
||||
vim-minimal-
|
||||
zlib-1
|
||||
"
|
||||
|
||||
min2glob="
|
||||
$min1glob
|
||||
cpio-
|
||||
cracklib-
|
||||
glib-1
|
||||
logrotate-
|
||||
mingetty-
|
||||
popt-
|
||||
pwdb-
|
||||
slang-[01]
|
||||
which-
|
||||
words-
|
||||
"
|
||||
|
||||
baseglob="
|
||||
$min2glob
|
||||
ash-
|
||||
console-tools-
|
||||
gmp-[23]
|
||||
initscripts-
|
||||
iputils-
|
||||
iproute-
|
||||
kernel-2
|
||||
losetup-
|
||||
mkinitrd-
|
||||
modutils-
|
||||
pam-0
|
||||
pamconfig-
|
||||
sh-utils-
|
||||
sysklogd-
|
||||
util-linux-
|
||||
vixie-cron-
|
||||
rpm-[34]
|
||||
rpm-devel-[34]
|
||||
sash-
|
||||
SysVinit-
|
||||
"
|
||||
|
||||
develglob="
|
||||
$baseglob
|
||||
bzip2-devel-
|
||||
db1-devel-
|
||||
db2-devel-
|
||||
db3-devel-
|
||||
gdbm-devel-
|
||||
glibc-devel-
|
||||
gmp-devel-
|
||||
kernel-headers-
|
||||
ncurses-devel-
|
||||
readline-devel-[24]
|
||||
tcl-
|
||||
zlib-devel-
|
||||
"
|
||||
|
||||
buildglob="
|
||||
$develglob
|
||||
autoconf-
|
||||
automake-
|
||||
bash2-
|
||||
binutils-
|
||||
cpp-
|
||||
cvs-
|
||||
db3-utils-
|
||||
egcs-1
|
||||
egcs-c++-1
|
||||
gcc-2
|
||||
gcc-c++-2
|
||||
gettext-
|
||||
krb5-configs-
|
||||
krb5-libs-
|
||||
libstdc++-
|
||||
libtool-
|
||||
make-
|
||||
m4-
|
||||
openssl-0
|
||||
patch-
|
||||
perl-5
|
||||
python-1
|
||||
rpm-build-
|
||||
tcsh-
|
||||
"
|
||||
classes="min0 min1 min2 base devel build"
|
||||
notallpat="(kernel-[^2h])"
|
||||
|
||||
for cmd in $*
|
||||
do
|
||||
[ $# -eq 0 ] && break
|
||||
shift
|
||||
echo "******** args: $*"
|
||||
echo "=======> start $cmd `date`"
|
||||
case $cmd in
|
||||
debug) dbg=echo ;;
|
||||
dmalloc) eval `dmalloc -b $dmopts` ;;
|
||||
db1) db1="--define '%_dbapi 1'" ;;
|
||||
5.2|6.2|7.0|7.1|7.2)
|
||||
dist=$cmd
|
||||
root=$top/$dist
|
||||
rc="--rcfile $top/rpmrc-$dist $db1"
|
||||
$dbg mkdir -p $root/{dev,X/RPMS,X/SRPMS}
|
||||
[ -c $root/dev/null ] || $dbg $sudo mknod $root/dev/null c 1 3
|
||||
[ -f $top/rpmrc-$dist ] || cat << EOF > $top/rpmrc-$dist
|
||||
include: /usr/lib/rpm/rpmrc
|
||||
macrofiles: /usr/lib/rpm/macros:/usr/lib/rpm/%{_target}/macros:$top/macros:$top/macros-$dist-$arch
|
||||
EOF
|
||||
[ -f $top/macros-$dist-$arch ] || cat << EOF > $top/macros-$dist-$arch
|
||||
%_topdir $root/X
|
||||
EOF
|
||||
;;
|
||||
config)
|
||||
[ -f $top/macros ] || cat << EOF > $top/macros
|
||||
%_ntopdir %{_topdir}/%{name}-%{version}-%{release}
|
||||
%_builddir %{_ntopdir}
|
||||
%_sourcedir %{_ntopdir}
|
||||
%_specdir %{_ntopdir}
|
||||
%_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
|
||||
%_rpmdir %{_topdir}/RPMS
|
||||
%_srcrpmdir %{_topdir}/SRPMS
|
||||
%_tmppath %{_topdir}/tmp
|
||||
EOF
|
||||
;;
|
||||
manifest)
|
||||
rm -f *-$dist-$arch
|
||||
pkgs="/$dist/$arch"
|
||||
ls -1 ${pkgs}/*.rpm | egrep "(noarch|$arch).rpm" > list-$dist-$arch
|
||||
cat list-$dist-$arch | egrep -v $notallpat > all-$dist-$arch
|
||||
$dbg $rpmq $rc -qp --qf "/$dist/SRPMS/%{sourcerpm}\\n" \
|
||||
`cat all-$dist-$arch` | sort | uniq > all-$dist-$arch-srpms
|
||||
for l in $classes ; do
|
||||
glv='$'${l}glob
|
||||
glist="`eval echo $glv`"
|
||||
for g in $glist ; do
|
||||
ls -1 ${pkgs}/${g}*.rpm 2> /dev/null
|
||||
done | egrep "(noarch|$arch).rpm" $sorted > $l-$dist-$arch
|
||||
$dbg $rpmq $rc -qp --qf "/$dist/SRPMS/%{sourcerpm}\\n" \
|
||||
`cat $l-$dist-$arch` | sort | uniq > $l-$dist-$arch-srpms
|
||||
done
|
||||
;;
|
||||
clean)
|
||||
$dbg rm -f $top/{rpmrc-$dist,macros-$dist-$arch,macros}
|
||||
$dbg $sudo mv $root ${root}-$$ && $dbg $sudo rm -rf ${root}-$$
|
||||
;;
|
||||
--rebuild)
|
||||
for srpm in `cat $type-$dist-$arch-srpms` ; do
|
||||
$dbg $rpmb $rc $cmd $srpm
|
||||
done
|
||||
;;
|
||||
--initdb)
|
||||
$dbg $sudo mkdir -p $root/var/lib/rpm
|
||||
$dbg $sudo $rpmdb $rc --root $root --initdb
|
||||
;;
|
||||
--savedb)
|
||||
( $dbg cd $root/var/lib && $dbg $sudo tar czvf rpmdb.tar.gz rpm ; )
|
||||
;;
|
||||
--rebuilddb)
|
||||
$dbg $sudo $rpmdb $rc --root $root --rebuilddb -vv
|
||||
;;
|
||||
--justdb)
|
||||
[ -f $type-$dist-$arch ] || {
|
||||
echo $type-$dist-$arch not found
|
||||
exit 1
|
||||
}
|
||||
$dbg $sudo $rpmi $rc --root $root -Uv $justdb `cat $type-$dist-$arch`
|
||||
;;
|
||||
-U*|-F*)
|
||||
[ -f $type-$dist-$arch ] || {
|
||||
echo $type-$dist-$arch not found
|
||||
exit 1
|
||||
}
|
||||
$dbg $sudo $rpmi $rc --root $root $cmd $* `cat $type-$dist-$arch`
|
||||
set ""
|
||||
;;
|
||||
-[Vqei]*|--showrc)
|
||||
$dbg $sudo $rpm $rc --root $root $cmd
|
||||
;;
|
||||
chroot)
|
||||
$dbg $sudo touch $root/etc/mtab
|
||||
$dbg $sudo cp /etc/resolv.conf /etc/fstab $root/etc
|
||||
$dbg $sudo env HOME=/root chroot $root
|
||||
;;
|
||||
*) type=$cmd ;;
|
||||
esac
|
||||
done
|
||||
echo "=======> finish `date`"
|
@ -1,84 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# a universal interface to Unix OS package managment systems
|
||||
|
||||
# This script is not finished. It is a bunch of ideas for creating a
|
||||
# universal package manager using the OS package manager. I wish to
|
||||
# only use tools which are installed in the OS by default and be
|
||||
# portable to all OS package managers.
|
||||
|
||||
|
||||
PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb:/usr/bsd:$PATH"
|
||||
export PATH
|
||||
|
||||
|
||||
|
||||
osname=`uname -s`
|
||||
if test $? -ne 0 || test X$osname = X ; then
|
||||
echo "I can't determine what platform this is. Exiting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
# Set OS dependent defaults
|
||||
#
|
||||
|
||||
# note: that the "package name" which are returned by this script
|
||||
# should always include the version and release number.
|
||||
|
||||
case $osname in
|
||||
Linux)
|
||||
check_all_packages='rpm -Va'
|
||||
list_all_packages='rpm -qa'
|
||||
list_all_files='rpm -qla'
|
||||
list_all_files_in_package='rpm -ql $1'
|
||||
full_package_name='rpm -q $1'
|
||||
query_file='rpm -qf $1'
|
||||
;;
|
||||
SunOS)
|
||||
check_all_packages='/usr/sbin/pkgchk -n'
|
||||
list_all_files='/usr/sbin/pkgchk -l | /bin/egrep Pathname | /bin/awk "{print \$2}" '
|
||||
list_all_files_in_package='/usr/sbin/pkgchk -l $1 | /bin/egrep Pathname | /bin/awk "{print \$2}" '
|
||||
list_all_packages='/usr/bin/pkginfo -x | /bin/sed -e "/^[a-zA-Z]/ { N; /^\\n\$/d; s/ .*$//; }" '
|
||||
package_version='/usr/bin/pkginfo -x $1 | egrep -v "^[a-zA-Z]" | sed -e "s/(.*)//; s/\ \ *//" '
|
||||
query_file='/usr/sbin/pkgchk -l -p $1 | /bin/egrep -v "^[a-zA-Z]" | xargs /usr/bin/pkginfo -x | /bin/sed -e "/^[a-zA-Z]/ { N; /^\\n\$/d; s/\ .*\\n.*//; }" '
|
||||
;;
|
||||
OSF1)
|
||||
;;
|
||||
HP-UX)
|
||||
;;
|
||||
AIX)
|
||||
;;
|
||||
IRIX|IRIX64)
|
||||
;;
|
||||
*)
|
||||
echo "I haven't been configured yet to work on $osname."
|
||||
echo "email it to rpm-list@redhat.com, so that your OS"
|
||||
echo "will be supported by some future version of this script."
|
||||
echo ""
|
||||
echo "Thanks!"
|
||||
echo
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
|
||||
option=$1
|
||||
shift
|
||||
|
||||
# I would like to have the second $ actually interpolate so I could
|
||||
# drop the second eval. Anyone know how to do this?
|
||||
|
||||
if [ $option = 'print_cmd' ]; then
|
||||
option=$1
|
||||
shift
|
||||
eval echo $"$option"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
eval eval $"$option"
|
||||
|
||||
|
||||
|
@ -1,398 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Original Author: Tim Mooney (mooney@plains.NoDak.edu)
|
||||
# Improvements by: Ken Estes <kestes@staff.mail.com>
|
||||
#
|
||||
# This file is distributed under the terms of the GNU General Public License
|
||||
#
|
||||
|
||||
# vpkg-provides.sh is part of RPM, the Red Hat Package Manager.
|
||||
|
||||
# vpkg-provides.sh searches a list of directories (based on what OS
|
||||
# it's being executed on) for shared libraries and interpreter files
|
||||
# that have been installed by some packaging system other than RPM.
|
||||
# It then generates a spec file that can be used to build a "virtual
|
||||
# package" that provides all of these things without actually
|
||||
# installing any files. The spec file in effect tells rpm what it
|
||||
# needs to know about operating system files which are not under rpm
|
||||
# control. This makes it much easier to use RPM on non-Linux systems.
|
||||
|
||||
# By default the script also generates a %verifyscript (with hard
|
||||
# coded $shlib_dirs, $ignore_dirs values) which will check that the
|
||||
# checksum of each file in the directories searched has not changed
|
||||
# since the package was built.
|
||||
|
||||
# Comments: This script is a quick hack. A better solution is to use the
|
||||
# vendor's package management commands to actually query what's installed, and
|
||||
# build one or more spec files based on that. This is something
|
||||
# I intend to write, probably in perl, but the need for something like this
|
||||
# first effort was great, so I didn't want to wait until the better solution
|
||||
# was done.
|
||||
|
||||
# The complete specfile will be sent to stdout.
|
||||
|
||||
# you will need to create a spec_header for the virtual package. This
|
||||
# header will provide such specfile information as:
|
||||
#
|
||||
# Summary:
|
||||
# Name:
|
||||
# Version:
|
||||
# Release:
|
||||
# Copyright:
|
||||
# Group:
|
||||
# Source:
|
||||
|
||||
|
||||
# most of the command line arguments have defaults
|
||||
|
||||
usage="usage: $0 --spec_header '/path/to/os-base-header.spec' \n"
|
||||
usage="$usage\t[--find_provides '/path/to/find-provides']\n"
|
||||
usage="$usage\t[--shlib_dirs 'dirs:which:contain:shared:libs']\n"
|
||||
usage="$usage\t[--ignore_dirs 'egrep|pattern|of|paths|to|ignore']\n"
|
||||
|
||||
# these two should be unnessary as the regular dependency analysis
|
||||
# should take care of interpreters as well as shared libraries.
|
||||
|
||||
usage="$usage\t[--interp_dirs 'dirs:which:contain:interpreters']\n"
|
||||
usage="$usage\t[--interps 'files:to:assume:are:installed']\n"
|
||||
usage="$usage\t[--no_verify]\n"
|
||||
|
||||
|
||||
# this command may not be portable to all OS's, does something else
|
||||
# work? can this be set in the case $osname statement?
|
||||
|
||||
sum_cmd="xargs cksum"
|
||||
|
||||
date=`date`
|
||||
hostname=`uname -n`
|
||||
|
||||
# if some subdirectories of the system directories needs to be ignored
|
||||
# (eg /usr/local is a subdirectory of /usr but should not be part of
|
||||
# the virtual package) then call this script with ignore_dirs set to a
|
||||
# vaild egrep pattern which discribes the directories to ignored.
|
||||
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb:/usr/bsd
|
||||
export PATH
|
||||
|
||||
|
||||
#
|
||||
# The (OS independent) default values.
|
||||
#
|
||||
spec_header='/usr/lib/rpm/os-base-header.spec';
|
||||
interps="sh:csh:ksh:dtksh:wish:tclsh:perl:awk:gawk:nawk:oawk"
|
||||
find_provides='/usr/lib/rpm/find-provides';
|
||||
|
||||
# no file names begin with this character so it is a good default
|
||||
# for dirs to ignore.
|
||||
|
||||
ignore_dirs="@"
|
||||
|
||||
|
||||
osname=`uname -s`
|
||||
if test $? -ne 0 || test X$osname = X ; then
|
||||
echo "I can't determine what platform this is. Exiting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
# Set OS dependent defaults
|
||||
#
|
||||
case $osname in
|
||||
OSF1)
|
||||
shlib_dirs='/shlib:/usr/shlib:/usr/dt/lib:/usr/opt'
|
||||
interp_dirs='/bin:/usr/bin:/sbin:/usr/dt/bin:/usr/bin/posix'
|
||||
;;
|
||||
HP-UX)
|
||||
shlib_dirs='/usr/shlib:/usr/dt/lib:/opt'
|
||||
shlib_dirs="$shlib_dirs:/usr/bms:/usr/obam:/usr/sam"
|
||||
interp_dirs='/bin:/usr/bin:/sbin:/usr/dt/bin:/usr/bin/posix'
|
||||
;;
|
||||
AIX)
|
||||
shlib_dirs='/usr/lib:/usr/ccs/lib:/usr/dt/lib:/usr/lpp:/usr/opt'
|
||||
interp_dirs='/bin:/usr/bin:/sbin:/usr/dt/bin'
|
||||
;;
|
||||
SunOS)
|
||||
shlib_dirs='/etc/lib:/etc/vx:/opt:/usr/lib:/usr/ccs/lib:/usr/dt/lib'
|
||||
shlib_dirs="$shlib_dirs:/usr/4lib:/usr/openwin/lib:/usr/snadm/lib"
|
||||
shlib_dirs="$shlib_dirs:/usr/ucblib:/usr/xpg4/lib"
|
||||
interp_dirs='/bin:/usr/bin:/sbin:/usr/dt/bin:/usr/xpg4/bin'
|
||||
;;
|
||||
IRIX|IRIX64)
|
||||
shlib_dirs='/lib:/usr/lib:/usr/lib32:/usr/lib64'
|
||||
# Irix always makes me laugh...
|
||||
shlib_dirs="$shlib_dirs:/usr/ToolTalk:/usr/xfsm:/usr/SpeedShop"
|
||||
shlib_dirs="$shlib_dirs:/usr/sgitcl:/usr/SGImeeting:/usr/pcp/lib"
|
||||
shlib_dirs="$shlib_dirs:/usr/Motif-2.1"
|
||||
interp_dirs='/bin:/usr/bin:/sbin:/usr/sbin:/usr/dt/bin'
|
||||
;;
|
||||
*)
|
||||
echo "I'm sorry. I haven't been configured yet to work on $osname."
|
||||
echo "Please poke around your system and try figure out what directories"
|
||||
echo "I should be searching for shared libraries. Once you have this"
|
||||
echo "information, email it to rpm-list@redhat.com, so that your OS"
|
||||
echo "will be supported by some future version of this script."
|
||||
echo ""
|
||||
echo "Thanks!"
|
||||
echo
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
# allow the user to change defaults with the command line arguments.
|
||||
|
||||
# Loop over all args
|
||||
|
||||
while :
|
||||
do
|
||||
|
||||
# Break out if there are no more args
|
||||
case $# in
|
||||
0)
|
||||
break
|
||||
;;
|
||||
esac
|
||||
|
||||
# Get the first arg, and shuffle
|
||||
option=$1
|
||||
shift
|
||||
|
||||
# Make all options have two hyphens
|
||||
orig_option=$option # Save original for error messages
|
||||
case $option in
|
||||
--*) ;;
|
||||
-*) option=-$option ;;
|
||||
esac
|
||||
|
||||
|
||||
case $option in
|
||||
--spec_header)
|
||||
spec_header=$1
|
||||
shift
|
||||
;;
|
||||
--ignore_dirs)
|
||||
ignore_dirs=$1
|
||||
shift
|
||||
;;
|
||||
--find_provides)
|
||||
find_provides=$1
|
||||
shift
|
||||
;;
|
||||
--shlib_dirs)
|
||||
shlib_dirs=$1
|
||||
shift
|
||||
;;
|
||||
--interp_dirs)
|
||||
interp_dirs=$1
|
||||
shift
|
||||
;;
|
||||
--interps)
|
||||
interps=$1
|
||||
shift
|
||||
;;
|
||||
--no_verify)
|
||||
no_verify=1
|
||||
;;
|
||||
--help)
|
||||
echo $usage
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "$0: Unrecognized option: \"$orig_option\"; use --help for usage." >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
# consistancy checks on the arguments
|
||||
|
||||
if [ ! -f $spec_header ]; then
|
||||
echo "You must pass me the full path to the partial spec file"
|
||||
echo "as my first argument, since this file does not appear in the"
|
||||
echo "default location of $default_spec_header"
|
||||
echo
|
||||
echo $usage
|
||||
echo
|
||||
exit 9
|
||||
fi
|
||||
|
||||
|
||||
if [ ! -f $find_provides ]; then
|
||||
echo "You must pass me the full path to the find-provides script as my"
|
||||
echo "second argument, since find-provides does not appear in the"
|
||||
echo "default location of $default_find_provides"
|
||||
echo
|
||||
echo $usage
|
||||
echo
|
||||
exit 9
|
||||
fi
|
||||
|
||||
|
||||
|
||||
provides_tmp=/tmp/provides.$$
|
||||
if test -f $provides_tmp ; then
|
||||
echo "$provides_tmp already exists. Exiting."
|
||||
exit 11
|
||||
fi
|
||||
|
||||
#
|
||||
# iterate through all the directories in shlib_dirs, looking for shared
|
||||
# libraries
|
||||
#
|
||||
for d in `echo $shlib_dirs | sed -e 's/:/ /g'`
|
||||
do
|
||||
find $d -type f -print 2>/dev/null | egrep -v \'$ignore_dirs\' | $find_provides >> $provides_tmp
|
||||
done
|
||||
|
||||
sum_tmp=/tmp/sum.$$
|
||||
if test -f $sum_tmp ; then
|
||||
echo "$sum_tmp already exists. Exiting."
|
||||
exit 11
|
||||
fi
|
||||
|
||||
#
|
||||
# iterate through all the directories in shlib_dirs, record the sum
|
||||
#
|
||||
for d in `echo $shlib_dirs | sed -e 's/:/ /g'`
|
||||
do
|
||||
find $d -type f -print 2>/dev/null | egrep -v \'$ignore_dirs\' | $sum_cmd >> $sum_tmp
|
||||
done
|
||||
|
||||
|
||||
#
|
||||
# output the initial part of the spec file
|
||||
#
|
||||
cat $spec_header
|
||||
|
||||
#
|
||||
# output the 'Provides: ' part of the spec file
|
||||
#
|
||||
{
|
||||
#
|
||||
# Output the shared libraries
|
||||
#
|
||||
for f in `cat $provides_tmp | sort -u`
|
||||
do
|
||||
echo "Provides: $f"
|
||||
done
|
||||
|
||||
#
|
||||
# Output the available shell interpreters
|
||||
#
|
||||
for d in `echo $interp_dirs | sed -e 's/:/ /g'`
|
||||
do
|
||||
for f in `echo $interps | sed -e 's/:/ /g'`
|
||||
do
|
||||
if test -f $d/$f ; then
|
||||
echo "Provides: $d/$f"
|
||||
fi
|
||||
done
|
||||
done
|
||||
} | sed -e 's/%/%%/g'
|
||||
|
||||
#
|
||||
# Output the discription of the spec file
|
||||
#
|
||||
|
||||
cat <<_EIEIO_
|
||||
|
||||
|
||||
%description
|
||||
This is a virtual RPM package. It contains no actual files. It uses the
|
||||
\`Provides' token from RPM 3.x and later to list many of the shared libraries
|
||||
and interpreters that are part of the base operating system and associated
|
||||
OS packages for $osname.
|
||||
|
||||
This virtual package was constructed based on the vendor/system software
|
||||
installed on the '$osname' machine named '$hostname', as of the date
|
||||
'$date'.
|
||||
|
||||
Input to the script:
|
||||
|
||||
spec_header=$spec_header
|
||||
ignore_dirs=$ignore_dirs
|
||||
find_provides=$find_provides
|
||||
shlib_dirs=$shlib_dirs
|
||||
interp_dirs=$interp_dirs
|
||||
interps=$interps
|
||||
|
||||
_EIEIO_
|
||||
|
||||
#
|
||||
# Output the build sections of the spec file
|
||||
#
|
||||
|
||||
echo '%prep'
|
||||
echo '# nothing to do'
|
||||
echo '%build'
|
||||
echo '# nothing to do'
|
||||
echo '%install'
|
||||
echo '# nothing to do'
|
||||
echo '%clean'
|
||||
echo '# nothing to do'
|
||||
|
||||
if [ -z "${no_verify}" ]; then
|
||||
|
||||
#
|
||||
# Output the optional verify section of the spec file
|
||||
#
|
||||
|
||||
cat <<_EIEIO_
|
||||
|
||||
%verifyscript
|
||||
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb:/usr/bsd
|
||||
export PATH
|
||||
|
||||
sum_current_tmp=/tmp/rpm.sum.current.\$\$
|
||||
if test -f \$sum_current_tmp ; then
|
||||
echo "\$sum_current_tmp already exists. Exiting."
|
||||
exit 11
|
||||
fi
|
||||
|
||||
sum_package_tmp=/tmp/rpm.sum.package.\$\$
|
||||
if test -f \$sum_package_tmp ; then
|
||||
echo "\$sum_package_tmp already exists. Exiting."
|
||||
exit 11
|
||||
fi
|
||||
|
||||
for d in `echo $shlib_dirs | sed -e 's/:/ /g'`
|
||||
do
|
||||
find \$d -type f -print 2>/dev/null | egrep -v \'$ignore_dirs\' | $sum_cmd >> \$sum_current_tmp
|
||||
done
|
||||
|
||||
cat >\$sum_package_tmp <<_EOF_
|
||||
_EIEIO_
|
||||
|
||||
# the contents of the temporary file are hardcoded into the verify
|
||||
# script so that the file can be reproduced at verification time.
|
||||
|
||||
cat $sum_tmp | sed -e 's/%/%%/g'
|
||||
|
||||
cat <<_EIEIO_
|
||||
_EOF_
|
||||
|
||||
|
||||
cmp \$sum_package_tmp \$sum_current_tmp
|
||||
|
||||
if [ \$? -ne 0 ]; then
|
||||
echo"Differences found by: cmp \$sum_package_tmp \$sum_current_tmp"
|
||||
exit \$?
|
||||
fi
|
||||
|
||||
_EIEIO_
|
||||
|
||||
# end optional verify section
|
||||
fi
|
||||
|
||||
#
|
||||
# Output the files section of the spec file
|
||||
#
|
||||
|
||||
echo '%files'
|
||||
echo '# no files in a virtual package'
|
||||
|
||||
exit 0
|
@ -1,120 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This script is not finished. It is a bunch of ideas for using the
|
||||
# OS package manager to create a spec file of virtual dependencies for
|
||||
# each OS package. I wish to only use tools which are installed in
|
||||
# the OS by default.
|
||||
|
||||
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb:/usr/bsd
|
||||
export PATH
|
||||
|
||||
IGNORE_DIRS='@'
|
||||
|
||||
date=`date`
|
||||
hostname=`uname -n`
|
||||
osname=`uname -s`
|
||||
|
||||
# programs we run
|
||||
|
||||
find_provides=/usr/lib/rpm/find-provides
|
||||
find_requires=/usr/lib/rpm/find-requires
|
||||
#find_provides=/devel/kestes/vendorc/tools/solaris.prov
|
||||
#find_requires=/devel/kestes/vendorc/tools/solaris.req
|
||||
u_pkg=/devel/kestes/vendorc/rpm/scripts/u-pkg.sh
|
||||
|
||||
# where we write output
|
||||
spec_filedir=/tmp
|
||||
provides_tmp=/tmp/provides.$$
|
||||
requires_tmp=/tmp/requires.$$
|
||||
|
||||
|
||||
for pkg in `$u_pkg list_all_packages`
|
||||
do
|
||||
|
||||
# find OS pkg information
|
||||
|
||||
spec_filename=$spec_filedir/$pkg
|
||||
|
||||
veryify_cmd=`$u_pkg print_cmd package_version $pkg | sed -e "s/\\$1/$pkg/" `
|
||||
|
||||
pkg_version=`$u_pkg package_version $pkg `
|
||||
|
||||
|
||||
# find all the dependencies
|
||||
|
||||
$u_pkg list_all_files_in_package $pkg | egrep -v \'$IGNORE_DIRS\' | \
|
||||
$find_provides | sed -e 's/^/Provides: /' > $provides_tmp
|
||||
|
||||
$u_pkg list_all_files_in_package $pkg | egrep -v \'$IGNORE_DIRS\' | \
|
||||
$find_requires | sed -e 's/^/Requires: /' > $requires_tmp
|
||||
|
||||
# create the spec file
|
||||
|
||||
rm -f $spec_filename
|
||||
|
||||
echo >> $spec_filename
|
||||
|
||||
cat $provides_tmp | sort -u >> $spec_filename
|
||||
|
||||
echo >> $spec_filename
|
||||
|
||||
cat $requires_tmp | sort -u >> $spec_filename
|
||||
|
||||
echo >> $spec_filename
|
||||
|
||||
|
||||
# Output the rest of the spec file. It is a template stored in this
|
||||
# here file.
|
||||
|
||||
|
||||
cat >> $spec_filename <<_EIEIO_
|
||||
Name: vpkg-$pkg
|
||||
Version: $pkg_version
|
||||
|
||||
%description
|
||||
This is a virtual RPM package. It contains no actual files. It uses the
|
||||
\`Provides' token from RPM 3.x and later to list many of the shared libraries
|
||||
and interpreters that are part of the base operating system and associated
|
||||
subsets for $osname.
|
||||
|
||||
This virtual package was constructed based on the vendor/system software
|
||||
installed on the $osname machine named $hostname, as of the date
|
||||
$date. It is intended to supply dependency
|
||||
information about the OS package: $pkg, version: $pkg_version,
|
||||
|
||||
|
||||
%prep
|
||||
# nothing to do
|
||||
|
||||
%build
|
||||
# nothing to do
|
||||
|
||||
%install
|
||||
# nothing to do
|
||||
|
||||
%clean
|
||||
# nothing to do
|
||||
|
||||
|
||||
%verifyscript
|
||||
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb:/usr/bsd:/usr/local/bin
|
||||
export PATH
|
||||
|
||||
expected_version='$pkg_version'
|
||||
current_version=\`$veryify_cmd\`
|
||||
|
||||
if [ \$expected_version -ne \$current_version ]; then
|
||||
echo "RPM virtual package does not match OS pkg: $pkg" >&2
|
||||
echo "installed packge version: \$current_verion" >&2
|
||||
echo "expected package version: \$expected_version" >&2
|
||||
exit 9
|
||||
fi
|
||||
|
||||
%files
|
||||
|
||||
_EIEIO_
|
||||
|
||||
done
|
||||
|
@ -1,7 +0,0 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
rpmrc
|
||||
macros
|
||||
usr
|
||||
bin
|
||||
var
|
@ -1,21 +0,0 @@
|
||||
## Process this file with automake to produce Makefile.in.
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.4 foreign
|
||||
|
||||
EXTRA_DIST =
|
||||
SUBDIRS = hello-test
|
||||
|
||||
check-recursive: ./usr/ ./bin ./var
|
||||
|
||||
./usr ./bin ./var: ../rpm
|
||||
make -C .. DESTDIR=`pwd` install
|
||||
cp rpmrc macros ./$(pkglibdir)
|
||||
rm -f ./@GZIPBIN@
|
||||
if [ ! -d ./`dirname @GZIPBIN@` ] ; then mkdir -p ./`dirname @GZIPBIN@` ; fi
|
||||
ln -s @GZIPBIN@ ./@GZIPBIN@
|
||||
rm -f ./@BZIP2BIN@
|
||||
if [ ! -d ./`dirname @BZIP2BIN@` ] ; then mkdir -p ./`dirname @BZIP2BIN@` ; fi
|
||||
ln -s @BZIP2BIN@ ./@BZIP2BIN@
|
||||
|
||||
clean-local:
|
||||
rm -rf ./usr ./bin ./var
|
@ -1,3 +0,0 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
*.out
|
@ -1,22 +0,0 @@
|
||||
## Process this file with automake to produce Makefile.in.
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.4 foreign
|
||||
|
||||
all:
|
||||
|
||||
EXTRA_DIST = *.exp hello-1.0.tar.gz \
|
||||
initdb showrc querytags ba ckL ckH ckS ckC i qi e
|
||||
|
||||
noinst_SCRIPTS = initdb showrc querytags ba ckL ckH ckS ckC i qi e
|
||||
|
||||
TESTS_ENVIRONMENT = \
|
||||
rpm="${top_builddir}/rpm --rcfile ${top_builddir}/tests/$(pkglibdir)/rpmrc" \
|
||||
rpm2cpio="${top_builddir}/rpm2cpio" \
|
||||
rpmlead="${top_builddir}/tools/rpmlead" \
|
||||
rpmheader="${top_builddir}/tools/rpmheader" \
|
||||
rpmsignature="${top_builddir}/tools/rpmsignature" \
|
||||
rpmdump="${top_builddir}/tools/dump" \
|
||||
rpmdumpdb="${top_builddir}/tools/dumpdb" \
|
||||
myrpm='../usr/src/redhat/RPMS/*/hello-1.0-1.*.rpm'
|
||||
|
||||
TESTS = initdb showrc querytags ba ckL ckH ckS ckC i qi e
|
@ -1,16 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
DBG=echo
|
||||
|
||||
rpm=${rpm:=rpm}
|
||||
destdir="`pwd`"
|
||||
destdir="`dirname $destdir`"
|
||||
|
||||
cp hello-1.0.tar.gz ../usr/src/redhat/SOURCES
|
||||
zcat hello-1.0.tar.gz | tar xOf - \*.spec > ../usr/src/redhat/SPECS/hello.spec
|
||||
|
||||
${DBGX} $rpm -ba ../usr/src/redhat/SPECS/hello.spec 2>&1 | \
|
||||
sed -e "s,$destdir,,g" -e '/^make\[[0-9][0-9]*\]:/d' > $0.out
|
||||
|
||||
diff $0.out $0.exp || exit 1
|
||||
|
@ -1,52 +0,0 @@
|
||||
Executing: %prep
|
||||
+ umask 022
|
||||
+ cd /usr/src/redhat/BUILD
|
||||
+ cd /usr/src/redhat/BUILD
|
||||
+ rm -rf hello-1.0
|
||||
+ /bin/gzip -d
|
||||
+ tar -xf -
|
||||
+ STATUS=0
|
||||
+ [ 0 -ne 0 ]
|
||||
+ cd hello-1.0
|
||||
+ chmod -R a+rX,g-w,o-w .
|
||||
+ exit 0
|
||||
Executing: %build
|
||||
+ umask 022
|
||||
+ cd /usr/src/redhat/BUILD
|
||||
+ cd hello-1.0
|
||||
+ make
|
||||
cc hello.c -o hello
|
||||
+ exit 0
|
||||
Executing: %install
|
||||
+ umask 022
|
||||
+ cd /usr/src/redhat/BUILD
|
||||
+ cd hello-1.0
|
||||
+ rm -rf /var/tmp/hello-root
|
||||
+ mkdir -p /var/tmp/hello-root/usr/local/bin
|
||||
+ make DESTDIR=/var/tmp/hello-root install
|
||||
install -m 0755 hello /var/tmp/hello-root/usr/local/bin
|
||||
+ exit 0
|
||||
Processing files: hello
|
||||
Executing: %doc
|
||||
+ umask 022
|
||||
+ cd /usr/src/redhat/BUILD
|
||||
+ cd hello-1.0
|
||||
+ DOCDIR=/var/tmp/hello-root/usr/doc/hello-1.0
|
||||
+ export DOCDIR
|
||||
+ rm -rf /var/tmp/hello-root/usr/doc/hello-1.0
|
||||
+ /bin/mkdir -p /var/tmp/hello-root/usr/doc/hello-1.0
|
||||
+ cp -pr FAQ /var/tmp/hello-root/usr/doc/hello-1.0
|
||||
+ exit 0
|
||||
Finding provides...
|
||||
Finding requires...
|
||||
Provides: hi
|
||||
Prereqs: /bin/sh
|
||||
Requires: ld-linux.so.2 libc.so.6
|
||||
Wrote: /usr/src/redhat/SRPMS/hello-1.0-1.src.rpm
|
||||
Wrote: /usr/src/redhat/RPMS/sparc/hello-1.0-1.sparc.rpm
|
||||
Executing: %clean
|
||||
+ umask 022
|
||||
+ cd /usr/src/redhat/BUILD
|
||||
+ cd hello-1.0
|
||||
+ rm -rf /var/tmp/hello-root
|
||||
+ exit 0
|
@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
$rpm2cpio $myrpm | cpio -it > $0.out
|
||||
|
||||
diff $0.out $0.exp || exit 1
|
@ -1,3 +0,0 @@
|
||||
usr/doc/hello-1.0
|
||||
usr/doc/hello-1.0/FAQ
|
||||
usr/local/bin/hello
|
@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
$rpmheader $myrpm | $rpmdump > $0.out
|
||||
|
||||
diff $0.out $0.exp || exit 0
|
@ -1,143 +0,0 @@
|
||||
Entry count: 53
|
||||
|
||||
CT TAG TYPE OFSET COUNT
|
||||
Entry : 000 (100)(unknown) STRING_ARRAY_TYPE 0xffffffff 00000001
|
||||
Data: 000 C
|
||||
Entry : 001 (1000)RPMTAG_NAME STRING_TYPE 0xffffffff 00000001
|
||||
Data: 000 hello
|
||||
Entry : 002 (1001)RPMTAG_VERSION STRING_TYPE 0xffffffff 00000001
|
||||
Data: 000 1.0
|
||||
Entry : 003 (1002)RPMTAG_RELEASE STRING_TYPE 0xffffffff 00000001
|
||||
Data: 000 1
|
||||
Entry : 004 (1003)RPMTAG_EPOCH INT32_TYPE 0xffffffff 00000001
|
||||
Data: 000 0x00000001 (1)
|
||||
Entry : 005 (1004)RPMTAG_SUMMARY I18N_STRING_TYPE 0xffffffff 00000001
|
||||
Data: 000 hello -- hello, world rpm
|
||||
Entry : 006 (1005)RPMTAG_DESCRIPTION I18N_STRING_TYPE 0xffffffff 00000001
|
||||
Data: 000 Simple rpm demonstration.
|
||||
Entry : 007 (1006)RPMTAG_BUILDTIME INT32_TYPE 0xffffffff 00000001
|
||||
Data: 000 0x36e56b91 (921004945)
|
||||
Entry : 008 (1007)RPMTAG_BUILDHOST STRING_TYPE 0xffffffff 00000001
|
||||
Data: 000 sparc9.test.redhat.com
|
||||
Entry : 009 (1009)RPMTAG_SIZE INT32_TYPE 0xffffffff 00000001
|
||||
Data: 000 0x00007c67 (31847)
|
||||
Entry : 010 (1010)RPMTAG_DISTRIBUTION STRING_TYPE 0xffffffff 00000001
|
||||
Data: 000 RPM test suite.
|
||||
Entry : 011 (1011)RPMTAG_VENDOR STRING_TYPE 0xffffffff 00000001
|
||||
Data: 000 Red Hat Software
|
||||
Entry : 012 (1014)RPMTAG_LICENSE STRING_TYPE 0xffffffff 00000001
|
||||
Data: 000 GPL
|
||||
Entry : 013 (1015)RPMTAG_PACKAGER STRING_TYPE 0xffffffff 00000001
|
||||
Data: 000 Red Hat Software <bugs@redhat.com>
|
||||
Entry : 014 (1016)RPMTAG_GROUP I18N_STRING_TYPE 0xffffffff 00000001
|
||||
Data: 000 Utilities
|
||||
Entry : 015 (1020)RPMTAG_URL STRING_TYPE 0xffffffff 00000001
|
||||
Data: 000 http://www.redhat.com
|
||||
Entry : 016 (1021)RPMTAG_OS STRING_TYPE 0xffffffff 00000001
|
||||
Data: 000 Linux
|
||||
Entry : 017 (1022)RPMTAG_ARCH STRING_TYPE 0xffffffff 00000001
|
||||
Data: 000 sparc
|
||||
Entry : 018 (1027)RPMTAG_FILENAMES STRING_ARRAY_TYPE 0xffffffff 00000003
|
||||
Data: 000 /usr/doc/hello-1.0
|
||||
Data: 001 /usr/doc/hello-1.0/FAQ
|
||||
Data: 002 /usr/local/bin/hello
|
||||
Entry : 019 (1028)RPMTAG_FILESIZES INT32_TYPE 0xffffffff 00000003
|
||||
Data: 000 0x00000400 (1024)
|
||||
Data: 001 0x00000024 (36)
|
||||
Data: 002 0x00007843 (30787)
|
||||
Entry : 020 (1030)RPMTAG_FILEMODES INT16_TYPE 0xffffffff 00000003
|
||||
Data: 000 0x41ed (16877)
|
||||
Data: 001 0x81a4 (-32348)
|
||||
Data: 002 0x81e9 (-32279)
|
||||
Entry : 021 (1033)RPMTAG_FILERDEVS INT16_TYPE 0xffffffff 00000003
|
||||
Data: 000 0x0000 (0)
|
||||
Data: 001 0x0000 (0)
|
||||
Data: 002 0x0000 (0)
|
||||
Entry : 022 (1034)RPMTAG_FILEMTIMES INT32_TYPE 0xffffffff 00000003
|
||||
Data: 000 0x36e56b8b (921004939)
|
||||
Data: 001 0x362ca336 (908895030)
|
||||
Data: 002 0x36e56b8a (921004938)
|
||||
Entry : 023 (1035)RPMTAG_FILEMD5S STRING_ARRAY_TYPE 0xffffffff 00000003
|
||||
Data: 000
|
||||
Data: 001 33cccc1f055d73acaceed7d8204e99c7
|
||||
Data: 002 741e702cdf114c95a9e965fa8aa40864
|
||||
Entry : 024 (1036)RPMTAG_FILELINKTOS STRING_ARRAY_TYPE 0xffffffff 00000003
|
||||
Data: 000
|
||||
Data: 001
|
||||
Data: 002
|
||||
Entry : 025 (1037)RPMTAG_FILEFLAGS INT32_TYPE 0xffffffff 00000003
|
||||
Data: 000 0x00000000 (0)
|
||||
Data: 001 0x00000002 (2)
|
||||
Data: 002 0x00000000 (0)
|
||||
Entry : 026 (1039)RPMTAG_FILEUSERNAME STRING_ARRAY_TYPE 0xffffffff 00000003
|
||||
Data: 000 root
|
||||
Data: 001 root
|
||||
Data: 002 root
|
||||
Entry : 027 (1040)RPMTAG_FILEGROUPNAME STRING_ARRAY_TYPE 0xffffffff 00000003
|
||||
Data: 000 root
|
||||
Data: 001 root
|
||||
Data: 002 root
|
||||
Entry : 028 (1044)RPMTAG_SOURCERPM STRING_TYPE 0xffffffff 00000001
|
||||
Data: 000 hello-1.0-1.src.rpm
|
||||
Entry : 029 (1045)RPMTAG_FILEVERIFYFLAGS INT32_TYPE 0xffffffff 00000003
|
||||
Data: 000 0x00000000 (0)
|
||||
Data: 001 0x00000000 (0)
|
||||
Data: 002 0xffffffff (-1)
|
||||
Entry : 030 (1046)RPMTAG_ARCHIVESIZE INT32_TYPE 0xffffffff 00000001
|
||||
Data: 000 0x00007a6c (31340)
|
||||
Entry : 031 (1047)RPMTAG_PROVIDES STRING_ARRAY_TYPE 0xffffffff 00000001
|
||||
Data: 000 hi
|
||||
Entry : 032 (1048)RPMTAG_REQUIREFLAGS INT32_TYPE 0xffffffff 00000003
|
||||
Data: 000 0x00000040 (64)
|
||||
Data: 001 0x00000000 (0)
|
||||
Data: 002 0x00000000 (0)
|
||||
Entry : 033 (1049)RPMTAG_REQUIRENAME STRING_ARRAY_TYPE 0xffffffff 00000003
|
||||
Data: 000 /bin/sh
|
||||
Data: 001 ld-linux.so.2
|
||||
Data: 002 libc.so.6
|
||||
Entry : 034 (1050)RPMTAG_REQUIREVERSION STRING_ARRAY_TYPE 0xffffffff 00000003
|
||||
Data: 000
|
||||
Data: 001
|
||||
Data: 002
|
||||
Entry : 035 (1053)RPMTAG_CONFLICTFLAGS INT32_TYPE 0xffffffff 00000001
|
||||
Data: 000 0x00000000 (0)
|
||||
Entry : 036 (1054)RPMTAG_CONFLICTNAME STRING_ARRAY_TYPE 0xffffffff 00000001
|
||||
Data: 000 goodbye
|
||||
Entry : 037 (1055)RPMTAG_CONFLICTVERSION STRING_ARRAY_TYPE 0xffffffff 00000001
|
||||
Data: 000
|
||||
Entry : 038 (1064)RPMTAG_RPMVERSION STRING_TYPE 0xffffffff 00000001
|
||||
Data: 000 2.5.7
|
||||
Entry : 039 (1080)RPMTAG_CHANGELOGTIME INT32_TYPE 0xffffffff 00000001
|
||||
Data: 000 0x362cf9d0 (908917200)
|
||||
Entry : 040 (1081)RPMTAG_CHANGELOGNAME STRING_ARRAY_TYPE 0xffffffff 00000001
|
||||
Data: 000 Jeff Johnson <jbj@redhat.com>
|
||||
Entry : 041 (1082)RPMTAG_CHANGELOGTEXT STRING_ARRAY_TYPE 0xffffffff 00000001
|
||||
Data: 000 - create.
|
||||
Entry : 042 (1085)RPMTAG_PREINPROG STRING_TYPE 0xffffffff 00000001
|
||||
Data: 000 /bin/sh
|
||||
Entry : 043 (1086)RPMTAG_POSTINPROG STRING_TYPE 0xffffffff 00000001
|
||||
Data: 000 /bin/sh
|
||||
Entry : 044 (1087)RPMTAG_PREUNPROG STRING_TYPE 0xffffffff 00000001
|
||||
Data: 000 /bin/sh
|
||||
Entry : 045 (1088)RPMTAG_POSTUNPROG STRING_TYPE 0xffffffff 00000001
|
||||
Data: 000 /bin/sh
|
||||
Entry : 046 (1090)RPMTAG_OBSOLETES STRING_ARRAY_TYPE 0xffffffff 00000001
|
||||
Data: 000 howdy
|
||||
Entry : 047 (1094)RPMTAG_COOKIE STRING_TYPE 0xffffffff 00000001
|
||||
Data: 000 sparc9.test.redhat.com 921004945
|
||||
Entry : 048 (1095)RPMTAG_FILEDEVICES INT32_TYPE 0xffffffff 00000003
|
||||
Data: 000 0x00000801 (2049)
|
||||
Data: 001 0x00000801 (2049)
|
||||
Data: 002 0x00000801 (2049)
|
||||
Entry : 049 (1096)RPMTAG_FILEINODES INT32_TYPE 0xffffffff 00000003
|
||||
Data: 000 0x000410ab (266411)
|
||||
Data: 001 0x000410ac (266412)
|
||||
Data: 002 0x0004807b (295035)
|
||||
Entry : 050 (1097)RPMTAG_FILELANGS STRING_ARRAY_TYPE 0xffffffff 00000003
|
||||
Data: 000
|
||||
Data: 001
|
||||
Data: 002
|
||||
Entry : 051 (1098)RPMTAG_PREFIXES STRING_ARRAY_TYPE 0xffffffff 00000001
|
||||
Data: 000 /usr
|
||||
Entry : 052 (1105)RPMTAG_CAPABILITY INT32_TYPE 0xffffffff 00000001
|
||||
Data: 000 0x00000000 (0)
|
@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
$rpmlead $myrpm | od -c > $0.out
|
||||
|
||||
diff $0.out $0.exp || exit 1
|
@ -1,7 +0,0 @@
|
||||
0000000 355 253 356 333 003 \0 \0 \0 \0 003 h e l l o -
|
||||
0000020 1 . 0 - 1 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
|
||||
0000040 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
|
||||
*
|
||||
0000100 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 001 \0 005
|
||||
0000120 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
|
||||
0000140
|
@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
$rpmsignature $myrpm | $rpmdump > $0.out
|
||||
|
||||
diff $0.out $0.exp || exit 0
|
@ -1,8 +0,0 @@
|
||||
Entry count: 2
|
||||
|
||||
CT TAG TYPE OFSET COUNT
|
||||
Entry : 000 (1000)RPMTAG_NAME INT32_TYPE 0xffffffff 00000001
|
||||
Data: 000 0x000033ec (13292)
|
||||
Entry : 001 (1004)RPMTAG_SUMMARY BIN_TYPE 0xffffffff 00000016
|
||||
Data: 000 f0 a9 66 7d 8c f8 4d 0c
|
||||
Data: 008 1b c3 b6 c4 23 67 25 e6
|
@ -1,11 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
rpm=${rpm:=rpm}
|
||||
destdir="`pwd`"
|
||||
destdir="`dirname $destdir`"
|
||||
|
||||
$rpm -e -vv hello | \
|
||||
sed -e "s,$destdir,,g" > $0.out
|
||||
|
||||
diff $0.out $0.exp || exit 1
|
||||
|
@ -1,20 +0,0 @@
|
||||
D: counting packages to uninstall
|
||||
D: opening database in //var/lib/rpm/
|
||||
D: found 1 packages to uninstall
|
||||
D: uninstalling record number 24
|
||||
D: will remove files test = 0
|
||||
D: /hello-test/../usr/local/bin/hello - removing
|
||||
D: /hello-test/../usr/doc/hello-1.0/FAQ - removing
|
||||
D: /hello-test/../usr/doc/hello-1.0 - removing
|
||||
D: running postuninstall script (if any)
|
||||
D: removing database entry
|
||||
D: removing name index
|
||||
D: removing group index
|
||||
D: removing provides index for hi
|
||||
D: removing requiredby index for /bin/sh
|
||||
D: removing requiredby index for ld-linux.so.2
|
||||
D: removing requiredby index for libc.so.6
|
||||
D: removing conflict index for goodbye
|
||||
D: removing file index for /hello-test/../usr/doc/hello-1.0
|
||||
D: removing file index for /hello-test/../usr/doc/hello-1.0/FAQ
|
||||
D: removing file index for /hello-test/../usr/local/bin/hello
|
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user