enable disabled autodep patch

This commit is contained in:
root 2012-08-03 14:15:43 +04:00
parent f990799500
commit 380a67506d
1577 changed files with 991277 additions and 1 deletions

1282
rpm-5.4.9/ABOUT-NLS Normal file

File diff suppressed because it is too large Load diff

7118
rpm-5.4.9/CHANGES Normal file

File diff suppressed because it is too large Load diff

510
rpm-5.4.9/COPYING.LIB Normal file
View file

@ -0,0 +1,510 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations
below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it
becomes a de-facto standard. To achieve this, non-free programs must
be allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control
compilation and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at least
three years, to give the same user the materials specified in
Subsection 6a, above, for a charge no more than the cost of
performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply, and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License
may add an explicit geographical distribution limitation excluding those
countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms
of the ordinary General Public License).
To apply these terms, attach the following notices to the library.
It is safest to attach them to the start of each source file to most
effectively convey the exclusion of warranty; and each file should
have at least the "copyright" line and a pointer to where the full
notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or
your school, if any, to sign a "copyright disclaimer" for the library,
if necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James
Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

41
rpm-5.4.9/CREDITS Normal file
View file

@ -0,0 +1,41 @@
Work on RPM was done primarily by:
Erik Troan
Marc Ewing
Significant code, ideas, or porting help have been contributed by:
Stuart Anderson
Ed Bailey
Donnie Barnes
Nikita Borisov
Till Bubeck
Kit Cosper
Kristof Depraetere
Alex deVries
Karl Eichwalder
Ralf S. Engelschall
Fred Fish
David Fox
Joseph L. Hartmann, Jr
Mark Hatle
Jeff Johnson
Michael K. Johnson
Eugene Kanter
Toshio Kuratomi
Hermann Lauer
Elliot Lee
Benedict Lofstedt
Jared Mauch
Nigel Metheringham
Horacio Rodriguez Montero
Tim Mooney
Eric Mumpower
Michael Nyquisk
Steve Sanbeg
Tyson Sawyer
Christopher Seawood
Johnie Stafford
Gary Thomas
Bob Tanner
Karsten Weiss

1489
rpm-5.4.9/Doxyfile.in Normal file

File diff suppressed because it is too large Load diff

44
rpm-5.4.9/Doxyheader Normal file
View file

@ -0,0 +1,44 @@
/** \defgroup rpmts RPM Transaction Set API (RPMTS)
*/
/** \defgroup rpmte RPM Transaction Element API (RPMTE)
*/
/** \defgroup rpmds RPM Dependency Set API (RPMDS)
*/
/** \defgroup rpmio Internally shared I/O code (RPMIO)
*/
/** \defgroup python PYTHON API.
*/
/** \defgroup py_c PYTHON-C Language Bindings.
*/
/** \defgroup rpmcli RPMCLI.
*/
/** \defgroup rpmbuild RPMBUILD.
*/
/** \defgroup rpmrc RPMRC.
*/
/** \defgroup rpmfi RPMFI File Info API.
*/
/** \defgroup rpmgi RPMGI Generalized Iterator API.
*/
/** \defgroup lead LEAD.
*/
/** \defgroup signature SIGNATURE.
*/
/** \defgroup header HEADER.
*/
/** \defgroup payload PAYLOAD.
*/
/** \defgroup rpmdb RPMDB Database API.
*/
/** \defgroup dbi RPMDBI DataBase Index Element API.
*/
/** \defgroup db3 Berkeley DB API.
*/
/** \defgroup rpmlua RPMLUA Embedded Lua.
*/
/** \defgroup rpmrpc RPMRPC.
*/
/** \defgroup rpmpgp RPMPGP.
*/
/** \defgroup rb_c Ruby Bindings
*/

462
rpm-5.4.9/INSTALL Normal file
View file

@ -0,0 +1,462 @@
REQUIREMENTS
============
Development-Time
----------------
--------------- --------- --------------- -------------------------------------
Component Component Version Version Component
Name Type Minimum Used URL
--------------- --------- ------- ------- -------------------------------------
CVS mandatory 1.12 1.12.13 http://www.nongnu.org/cvs/
Perl mandatory 5.8.0 5.10.1 http://www.perl.com/
GNU m4 [0] mandatory 1.4.0 1.4.13 http://www.gnu.org/software/m4/
GNU autoconf mandatory 2.59b 2.63 http://www.gnu.org/software/autoconf/
GNU automake mandatory 1.8 1.11.1 http://www.gnu.org/software/automake/
GNU libtool mandatory 1.5 2.2.6a http://www.gnu.org/software/libtool/
GNU gettext mandatory 0.16 0.17 http://www.gnu.org/software/gettext/
GNU make mandatory - - http://www.gnu.org/software/make/
GNU bash optional - - http://www.gnu.org/software/bash/
--------------- --------- ------- ------- -------------------------------------
Build-Time
----------
--------------- --------- --------------- -------------------------------------
Component Component Version Version Component
Name Type Minimum Used URL
--------------- --------- ------- ------- -------------------------------------
ISO C Compiler mandatory - - e.g. http://gcc.gnu.org/
POSIX make mandatory - - e.g. http://www.gnu.org/software/make/
Perl mandatory 5.8.0 5.10.1 http://www.perl.com/
POPT mandatory 1.15 1.16 http://rpm5.org/files/popt/
BeeCrypt mandatory 4.2.0 4.2.1 http://beecrypt.sourceforge.net/
Libtasn.1 mandatory - 2.7 http://www.gnu.org/software/libtasn1/
Neon mandatory 0.27.0 0.29.4 http://www.webdav.org/neon/
PCRE mandatory 7.0 8.10 http://www.pcre.org/
Mozilla NSS optional 3.11 3.12.8 http://www.mozilla.org/projects/security/pki/nss/
OpenSSL optional 0.9.8 1.0.0a http://www.openssl.org/
Berkeley-DB [1] optional 5.1.19 5.1.19 http://www.oracle.com/database/berkeley-db.html
SQLite [1] optional 3.3 3.7.0.1 http://www.sqlite.org/
Lua [2] optional 5.1 5.1.4 http://www.lua.org/
ZLib optional 1.2 1.2.3 http://www.zlib.net/
Bzip2 optional 1.0 1.0.5 http://www.bzip.org/
XZ Utils [3] optional 4.999.9 4.999.9 http://tukaani.org/xz/
File/magic [4] optional 4.00 5.03 ftp://ftp.astron.com/pub/file/
GNU gettext optional 0.18 0.18 http://www.gnu.org/software/gettext/
GNU iconv optional 1.11 1.11 http://www.gnu.org/software/libiconv/
OSSP uuid optional 1.6.0 1.6.2 http://www.ossp.org/pkg/lib/uuid/
XAR [5] optional 1.5.2 1.5.2 http://code.google.com/p/xar/
DMalloc optional 5 5.5.2 http://dmalloc.com/
Electric Fence optional 2.1 2.1.13 http://perens.com/FreeSoftware/ElectricFence/
Linux KeyUtils optional 1.2 1.2 http://people.redhat.com/~dhowells/keyutils/
System libelf optional - - e.g. http://www.mr511.de/software/english.html
CPUInfo optional r143 r143 https://launchpad.net/cpuinfo
--------------- --------- ------- ------- -------------------------------------
[0] m4: NOTICE: Do not use GNU m4 1.4.10, it breaks GNU autoconf.
[1] db/sqlite: Berkeley-DB used by RPM.
Building RPM against anything _EXCEPT_ db-5.1.19
external Berkeley-DB is not officially supported
(but any version of Berkeley-DB since db-4.5.20 will "work").
[2] lua: Modified Lua copy bundled with RPM.
Building RPM against stock external Lua not recommended
as it reduces its RPM-specific functionality.
[3] xz: XZ Utils copy is bundled with RPM because there is no
"official" XZ release and too many variants in the wild.
[4] file: File/magic copy can bundled with RPM to control for magic
strings used in *.rpm tag content.
Building RPM against stock external File/magic supported, too.
NOTICE: File 4.24 is unportable because uses asprintf(3)
without fallbacks.
[5] xar: Modified XAR copy bundled with RPM.
Building RPM against stock external XAR currently still not recommended.
The 1.5 and 1.5.1 releases of XAR needs some patching, before they work.
Run-Time
--------
--------------- --------- --------------- -------------------------------------
Component Component Version Version Component
Name Type Minimum Used URL
--------------- --------- ------- ------- -------------------------------------
GNU zip optional - - http://www.gzip.org/
Bzip2 optional - - http://www.bzip.org/
XZ optional 4.999.9 4.999.9 http://tukaani.org/xz/
GNU tar optional - - http://www.gnu.org/software/tar/
GNU cpio optional - - http://www.gnu.org/software/cpio/
UnZip optional - - http://www.info-zip.org/UnZip.html
GnuPG optional - - http://www.gnupg.org/
--------------- --------- ------- ------- -------------------------------------
PROCEDURE
=========
Development-Time
----------------
$ ./devtool jbj|standalone
Build-Time
----------
$ ./configure --prefix=<prefix> [...]
$ make
$ make install [DESTDIR=...]
Run-Time
--------
$ <prefix>/bin/rpm --initdb
$ <prefix>/bin/rpm --rebuild foo.src.rpm
$ <prefix>/bin/rpm -Uvh /path/to/binary/package/foo.*.rpm
$ <prefix>/bin/rpm -qa
$ <prefix>/bin/rpm -e foo
Application Build-Time
----------------------
CPPFLAGS = `pkg-config rpm --cflags-only-I`
CFLAGS = `pkg-config rpm --cflags-only-other`
LDFLAGS = `pkg-config rpm --libs-only-other`
LIBS = `pkg-config rpm --libs-only-l`
BUILDING RPM ON A CLUSTER OF SERVERS
====================================
Assume you have...
- a cluster of time-synchronized Unix servers
(usually of different Unix flavors to make sense in this context),
- each server allowing you to login under your personal account and
access your central home directory (usually via NFS) and
- each server providing you the full set of development tools,
...then you can build RPM in parallel on an arbitrary number of servers
in this cluster by using the following procedure:
1. Build Environment Preparation:
On a single arbitrary server of the cluster prepare the RPM source
tree at least once.
server1$ cd ~/work
server1$ cvs -d rpm-cvs@rpm5.org:/v/rpm/cvs co rpm
server1$ cd rpm
server1$ . devtool.bashrc
server1$ devtool checkout
server1$ devtool autogen
2. Platform Preparation:
on every(!) server of the cluster prepare its platform-specific
environment (includes building local copies of all third-party
libraries).
serverN$ cd ~/work/rpm
serverN$ . devtool.bashrc
serverN$ devtool setup-platform
serverN$ devtool standalone prepare
serverN$ devtool standalone configure
3. Development:
now you can develop RPM on any number of servers of the cluster in
parallel.
serverN$ cd ~/work/rpm
serverN$ . devtool.bashrc
serverN$ cd {build,lib,rpmdb,rpmio,misc,...}
serverN$ vi *.c
serverN$ devtool make
4. Test-Drive:
on an arbitrary server of the cluster you can test-drive RPM via:
serverN$ cd ~/work/rpm
serverN$ . devtool.bashrc
serverN$ devtool make install
serverN$ /tmp/rpm/bin/rpm [...]
LIBRARY ISSUES
==============
RPM is a rather comphrehensive tool with both internal dependencies and
optional external dependencies. The current internal structure is (in
partly dependency order from top to bottom):
RPM Executables: rpm
(stage 0) rpmbuild
RPM Libraries: librpmconstant
(stage 1) librpmbuild
librpm
librpmdb
librpmio
librpmmisc
Third-Party Libraries: libpopt (mandatory)
(stage 2) libbeecrypt (mandatory)
libdb (mandatory)
libpcre (mandatory)
libsqlite3 (optional)
liblua (optional)
libz (optional)
libbz2 (optional)
liblzma (optional)
libintl (optional)
libiconv (optional)
libxar (optional)
libdmalloc (optional)
libefence (optional)
libkeyutils (optional)
libelf (optional)
libneon (optional)
Third-Party Libraries: libxml2 (required by libxar)
(stage 3) libz (required by libxar)
libexpat (required by libneon)
libssl (required by libneon)
libcrypto (required by libssl)
System Libraries: libc (required by all)
(stage 4) libm (required by some)
[...]
The most important aspects to notice are: librpmbuild requires mainly
librpm, librpm in turn requires both librpmdb and librpmio, and all
librpm* require librpmmisc. Additionally; librpmmisc is a container for
the internal local copies of third-party libraries, and librpmconstant
provides RPM API constants (usually to language bindings). Finally,
notice that the set of third-party libraries at stage 2 can be dynamically
chosen at build-time and are not a fixed set.
Unfortunately, there are many link-time approaches to handle these
internal and external dependencies. The currently implemented approach
is a portable compromise balancing the following particular issues:
- Dynamic/Static Libraries:
librpmXXX can be built and installed statically (librpmXXX.a) or
dynamically (librpmXXX.so). This is handled by GNU libtool and
controlled by Autoconf options --{enable,disable}-{shared,static}.
- Installed/Uninstalled Libraries:
libfoo can be in an installed (after "make install") or uninstalled
(just after "make") state. Both are supported by GNU libtool but in
totally different ways. GNU libtool especially treats the linking of a
library against an uninstalled one specially by _copying_ all objects
of the dependency library into the to be be built library.
- Regular/Convenience Libraries:
GNU libtool knows a special "convenience" library. These are
uninstalled libfoo.la's which are linked into another (still
uninstalled) libbar.la.
- Library Type Combinations:
GNU libtool knows how to handle all situations caused by _combinding_
the different types of libraries: installed/uninstalled,
static/dynamic and regular/convinience. And in RPM nearly _ALL_ of
those combinations actually occur under various Autoconf options.
Although the processing abstracted, the resulting libraries have
different characteristics and affects how RPM-based applications are
able to link about the RPM libraries.
- External Dependencies:
librpmXXX and librpmYYY usually depend on the _same_ third-party
library libfoo. Although GNU libtool handles this seamlessly, one can
easily end up with multiple copies of a code in the same RPM-based
application.
- Non-Fixed Third-Party Libraries:
RPM supports to be built against a non-fixed set of third-party
libraries, ranging from _none_ at all to half a dozen ones.
Especially, the cases of "none" and "some" have to taken into account.
- Transitive Dependencies:
libfoo usually has dependencies to other third-party libraries and
those dependencies can be even just optional. For instance libneon
can optionally depend on OpenSSL's libssl and libcrypto and the W3C
libxml.
- Internal Modified Local Copies:
because of optional but RPM-specific modifications, some third-party
libraries are even provided as internal copies in the RPM source
tree. Those libraries have to be handled specially as they are built
together with RPM. This means that for instance one cannot test-link
against them during configure-time.
- Dependency Encoding:
there are multiple ways an inter-library dependency can be encoded:
directly in an ELF librpmXXX.so as DT_NEEDED (not available
everywhere), indirectly via "dependency_libs" in librpmXXX.la, via
"Libs:" in rpm.pc, or either via a _FULL INCLUDED COPY_ of all objects
or not at all in case of librpmXXX.a, etc.
Before complaining that the currently implemented library approach
of RPM is not "standard", doesn't "just work" as expected for your
particular situation, etc please first make sure you understood that
it is balanced compromise in order to portably take care of all of
the above issues at once. So, if you want to change the current
implementation please at least make sure that the above issues are still
taken care of and especially test it under _different_ Unix flavors.
DEBUGGING
=========
Memory Allocation Debugging with DMalloc
----------------------------------------
1. Install DMalloc into /path/to/dmalloc
2. Build RPM with at least:
$ ./configure [...]
--prefix=/tmp/rpm \
--with-dmalloc=/path/to/dmalloc
[...]
$ make
$ make install
3. Enable dmalloc debugging with:
$ . .dmalloc.bashrc
$ dmalloc -l dmalloc.log
$ dmalloc debug3
4. Run RPM:
$ /tmp/rpm/bin/rpm [...]
5. Inspect the results:
(notice that some used functions like gethostbyname(3) or dirname(3)
from the vendor libc inherently leak memory because of their API
style and because libc isn't DMalloc instrumented you will often see
some memory leaks reported without any source location -- just be not
confused)
$ vi dmalloc.log
OS DEPENDENCIES
===============
Under Red Hat Linux all libraries (in fact all files distributed with
the OS) are under RPM control and this section is not an issue.
RPM will need to be informed of all the dependencies which were
satisfied before RPM was installed. Typically this only refers to
libraries that are installed by the OS, but may include other
libraries and packages which are availible at the time RPM is
installed and will not under RPM control. Another common example of
libraries which may need dependency provisions are precompiled
libraries which are installed by the OS package manager during system
build time. The list of dependencies you will wish to load into RPM
will depend on exactly how you bootstrap RPM onto your system and what
parts of the sytem you put into packages as well as on the specific OS
you are using.
The script vpkg-provides.sh can be used to generate a package which
will satisfy the dependencies on your system. To run it you will need
to create a specfile header for this empty package and run the progam
with:
--spec_header '/path/to/os-base-header.spec
and if you wish to ensure that some directories are not traversed you
can use the option:
--ignore_dirs 'egrep|pattern|of|paths|to|ignore
By default the generated rpm will include a %verifyscript to verify
checksum of all files traversed has not changed. This additional
check can be surpressed with:
--noverify
The result of running the script will be a specfile which will create
a package continging all the dependencies found on the system. There
will be one provides line for each depednecy. The package will contain
none of the actual OS library files as it is assumed they are already
on your system and managed by other means. Here is a example
(truncated) of the provides lines used by one user of Digital Unix. (I
have put several provides on the same line for brevity)
provides: /bin/sh /usr/bin/ksh /usr/bin/csh
provides: libc.so.osf.1 libm.so.osf.1 libcurses.so.xpg4 libdb.so.osf.1
provides: libX11.so libXaw.so.6.0 libXext.so libXm.so.motif1.2 libXmu.so
provides: libdnet_stub.so.osf.1 libsecurity.so.osf.1 libpthread.so.osf.1
provides: libexc.so.osf.1 libmach.so.osf.1 libdps.so libdpstk.so
rpmfilename:
-----------
If you plan on packaging for more then one OS you may want to edit
/etc/rpm/macros or /usr/lib/rpm/macros and change the line which has
rpmfilename to something which includes both the %{_target_os} and
%{_target_cpu}. This will cause the name of the generated rpm files
to the operating system name as well as the architecture which the rpm
runs under. The line to change looks like:
%_rpmfilename %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
you may wish to include both the %{_target_os} and %{_target_cpu} in
the final base name, so that it's easier to distinguish between what
package is appropriate for a particular arch-os-version combo. We
suggest:
%_rpmfilename %%{_target_platform/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{_target_platform}.rpm
There is no %{_target_os_version} tag, so if you need to also
distinguish between RPMs for certain versions of the OS, you can
hard-code the version in the macros on the build machine, so that
.rpm files are generated with the version as part of the filename.
For example when one user builds RPMs for Digital Unix 4.0b and 4.0d,
optimization is important and he will build one set of RPMs for the
EV4 processor and another set for the EV56 processor. He specifies
both the OS version (if it's important, as it is for a few packages)
and the processor version by default by setting a special rpmfilename:
on the particular build machine.
The "rpmfilename: "tag on one machine (Digital Unix 4.0d, EV56 PWS 433)
looks like:
rpmfilename: %{_target_os}/4.0d/%{_target_cpu}/%{name}-%{version}-%{release}.%{_target_os}-%{_target_cpu}ev56.rpm
For package `foo-1.1', at build time that would translate into:
osf1/4.0d/alpha/foo-1.1-1.osf1-alphaev56.rpm
The hyphen between the %{_target_cpu} and ev56 is left out for compatibility
with GNU Config.guess and because `alphaev56' looks more "normal" to
people with an alpha than alpha-ev56 for someone on an Intel Pentium
Pro would want `i586pro' over `i586-pro', but it does make parsing
this filename by other programs a bit more difficult.
GPG
------------
To use the signing features of rpm, you will need to configure certain
rpm macros.
Here's what I use for gpg:
/etc/rpm/macros for per-system (or ~/.rpmmacros for per-user) configuration
%_signature gpg
%_gpg_name Jeff Johnson (ARS N3NPQ) <jbj@redhat.com>
%_gpg_path /home/jbj/.gnupg
(Note: Both pgp/pgp5 can be used with RPM just noone has tried in >8 years.)

148
rpm-5.4.9/INSTALL.developer Normal file
View file

@ -0,0 +1,148 @@
These are brief notes for those are @rpm5.org developers or for who want
to try the latest RPM5 version under development.
They were originally written by the Maintainer via private comunication,
but I thought might be useful to a wider audience.
Any error or omission are of course only my fault.
Elia
**********************************
Here's a quick and terse howto check-out and build RPM from CVS.
Because of the number of configure parameters and the fact
that RPM uses external <-> internal copies of several
sources, the mechanism is a bit more complex than
just doing a cvs checkout and running ./autogen.sh
0) Get the configgery in place (feel free to change to taste).
The transport is ssh with all the usual rulles. I tend
to add this "stuff" in ~/.bashrc
export MALLOC_CHECK_=3
# http://udrepper.livejournal.com/11429.html
export MALLOC_PERTURB_=$(($RANDOM % 255 + 1))
# http://mah.everybody.org/docs/ssh
SSHAGENT="/usr/bin/ssh-agent"
if [ -z "$SSH_AUTH_SOCK" -a -x "$SSHAGENT" ]; then
eval `$SSHAGENT -s`
trap "kill $SSH_AGENT_PID" 0
fi
and someplace I'm setting CVS_RSH=ssh.
1) Get the sources.
I tend to use these cvs options in ~/.cvsrc (because I can never remeber):
$ cat ~/.cvsrc
cvs -q -z3
diff -puw
rdiff -u
update -Pd
A checkout of cvs HEAD then looks like this (I work in a "wdj" sandbox)
cvs -d :ext:rpm-cvs@rpm5.org:/v/rpm/cvs get -d wdj rpm
Branch names look like "rpm-5_2", so the equivalent check out for rpm-5.2.x code is
cvs -d :ext:rpm-cvs@rpm5.org:/v/rpm/cvs get -d wdj52 -r rpm-5_2 rpm
You can see all the tags any time you wish by doing
cd wdj # <-- top of checkout
cvs status -v INSTALL
2) Use devtool to check out internal sources and configure:
Examine devtool.conf (and feel free to add stanzas as you want).
I build RPM using a maximally configured set of options like
./devtool jbj
which checks out 4-5 other trees, and sets about running ./configure
The other approach commonly used with devtool is the "standalone"
target. Ralf & Anders usually use that. I would likely be using "standalone"
too, just my RPM habits are peculier to me as a developer, there's lots that
is right with the "standalone" devtool target stanza.
3) Type "make".
On a clear day with a stiff wind, the make will succeed ;-)
More seriously, most build breakage can be fixed by adjusting
AutoFu options passed to configure.
Hint: Because of the complexity of RPM's configuration, there's
a few configuration dependencies that would be (imho) too painful
to track through Makefile's precisely. Specifically, watch out
for the misc/* "kitchen sink". The -lrpmmisc library is not always
rebuilt when the AutoFu changes. So one sometimes has to do
make -C misc clean
before new configuration takes effect. The 3rd time the issue
bites you the fix will be obvious ;-)
Another hint: RPM has loader maps to control for symbols exposed
in libraries. If you find yourself wondering why a symbol that
you *know* is present cannot be found, well, examine the libfoo.vers
loader map. Alternatively, just disable loader maps using AutoFu.
**********************************
HOWTO use multiple version of rpm
I tend to have multiple versions of both rpm and distro
packaging lying around always, and need to flip between
versions/distros at a dead-run.
So I work in tree's like /X, /Y, /Z.
I have private configuration as (say) /X/macros:
================================================
%_topdir /X
%_ntopdir %{_topdir}/%{name}
%_builddir %{_ntopdir}
%_sourcedir %{_ntopdir}
%_specdir %{_ntopdir}
%_rpmdir %{_ntopdir}
%_srcrpmdir %{_ntopdir}
%_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
%_tmppath %{_topdir}/tmp
================================================
I have a wrapper in ~/bin/xxxrpm to reconfigure:
================================================
#!/bin/sh
macros="/usr/lib/rpm/macros:/usr/lib/rpm/%{_target}/macros:/etc/rpm/macros.specspo:/etc/rpm/macros.sqlite:/etc/rpm/macros.cdb:/etc/rpm/macros:/etc/rpm/%{_target}/macros:~/.rpmmacros:/X/macros"
case $1 in
-b*) rpm=/usr/bin/rpmbuild;;
*) rpm=/usr/bin/rpm;;
esac
exec $vg $rpm --macros ${macros} $*
================================================
When I need to use a different version of rpm, or
add valgrind/time/strace/whatever, I edit the ~/bin/xxxrpm wrapper.
Similarly if/when I need to adjust to different macros to
be loaded, I edit the macros path.
In each tree, packages are installed/built into /X/%{name}.
So my packaging workflow goes something like:
xxxrpm -i foo*.src.rpm
cd /X/foo
xxxrpm -ba foo.spec
rpm -Uvh *.i386.rpm
cd ..
rm -rf foo
I find having everything in one directory far more
convenient than having to chdir all over the place
just to build a package.

290
rpm-5.4.9/Makefile.am Normal file
View file

@ -0,0 +1,290 @@
# Top level Makefile for rpm
AUTOMAKE_OPTIONS = 1.4 foreign
ACLOCAL_AMFLAGS = -I m4
LINT = splint
MCCABE = pmccabe
EXTRA_DIST = CHANGES CREDITS Doxyheader INSTALL INSTALL.developer cpuinfo.yaml \
autodeps autogen.sh \
syck js \
lua \
ruby \
macros \
perl \
pubkeys/JBJ-GPG-KEY \
rpm.magic rpmqv.c \
python \
tests/arbitrarytag-1.0-1.src.rpm \
tests/cudf-test-1-0.src.rpm \
tests/devtool-sanity-1.0-1.src.rpm \
tests/dir2symlink-1-1.src.rpm \
tests/edos-test-1-0.src.rpm \
tests/probes-test-1-0.src.rpm \
tests/simplestRPMv3-1.0-2.aix5.3.noarch.rpm \
tests/triggers-D-1.0-1.src.rpm \
tests/triggers-DP-1.0-1.src.rpm \
tests/triggers-F-1.0-1.src.rpm \
tests/triggers-FP-1.0-1.src.rpm \
tests/triggers-N-1.0-1.src.rpm \
tests/triggers-NA-1.0-1.src.rpm \
tests/triggers-P-1.0-1.src.rpm
SUBDIRS =
if USE_NLS
SUBDIRS += \
po
endif
SUBDIRS += \
@WITH_DB_SUBDIR@ \
@WITH_ZLIB_SUBDIR@ \
@WITH_PCRE_SUBDIR@ \
@WITH_POPT_SUBDIR@ \
@WITH_LUA_SUBDIR@ \
@WITH_BEECRYPT_SUBDIR@ \
@WITH_NEON_SUBDIR@ \
@WITH_SPIDERMONKEY_SUBDIR@ \
@WITH_GPSEE_SUBDIR@ \
@WITH_LIBGIT2_SUBDIR@ \
@WITH_FILE_SUBDIR@ \
@WITH_BASH_SUBDIR@ \
@WITH_RC_SUBDIR@ \
@WITH_SYCK_SUBDIR@ \
@WITH_XAR_SUBDIR@ \
@WITH_XZ_SUBDIR@ \
misc \
rpmio \
rpmdb \
lib \
build \
rpmconstant \
@WITH_JS_SUBDIR@ \
@WITH_RUBY_SUBDIR@ \
@WITH_PYTHON_SUBDIR@ \
@WITH_PERL_SUBDIR@ \
@WITH_PERL_URPM_SUBDIR@ \
tools \
scripts \
doc \
. \
tests
AM_CPPFLAGS = \
-I$(srcdir) \
-I$(top_srcdir) \
-I$(top_srcdir)/build \
-I$(top_srcdir)/lib \
-I$(top_builddir)/lib \
-I$(top_srcdir)/rpmdb \
-I$(top_srcdir)/rpmio \
-I$(top_srcdir)/misc \
@WITH_DB_CPPFLAGS@ \
@WITH_ZLIB_CPPFLAGS@ \
@WITH_LUA_CPPFLAGS@ \
@WITH_FILE_CPPFLAGS@ \
@WITH_PCRE_CPPFLAGS@ \
@WITH_POPT_CPPFLAGS@ \
@WITH_XAR_CPPFLAGS@ \
@WITH_XZ_CPPFLAGS@
AM_CFLAGS = $(OPENMP_CFLAGS)
myLDADD = \
$(top_builddir)/build/librpmbuild.la \
$(top_builddir)/lib/librpm.la \
$(top_builddir)/rpmdb/librpmdb.la \
$(top_builddir)/rpmio/librpmio.la \
$(top_builddir)/misc/librpmmisc.la \
@LTLIBINTL@
bin_PROGRAMS = rpm rpmbuild
install-exec-hook:
if WITH_PATH_VERSIONED
-for p in $(bin_PROGRAMS); do \
mv $(DESTDIR)$(bindir)/$${p}$(EXEEXT) \
$(DESTDIR)$(bindir)/$${p}-$(VERSION)$(EXEEXT); \
done
endif
pkgdatadir = @USRLIBRPM@
pkgdata_DATA = rpmpopt macros/macros macros/macros.rpmbuild cpuinfo.yaml
pkgbindir = $(pkgdatadir)/bin
pkgbin_SCRIPTS = install-sh mkinstalldirs
pkgcfgdir = $(pkgdatadir)/macros.d
pkgcfg_DATA = \
macros/cmake macros/gstreamer macros/java macros/kernel macros/libtool \
macros/mandriva macros/mono macros/perl macros/pkgconfig macros/php \
macros/python macros/ruby macros/selinux macros/tcl
noinst_HEADERS = build.h debug.h system.h
rpm_SOURCES = $(top_srcdir)/build.c
rpm_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS)
rpm_LDADD = rpm.o $(myLDADD)
rpm.o: $(top_srcdir)/rpmqv.c
$(COMPILE) -DIAM_RPMBT -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMK -DIAM_RPMQV -o $@ -c $(top_srcdir)/rpmqv.c
rpmbuild_SOURCES = $(top_srcdir)/build.c
rpmbuild_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS)
rpmbuild_LDADD = rpmbuild.o $(myLDADD)
rpmbuild.o: $(top_srcdir)/rpmqv.c
$(COMPILE) -DIAM_RPMBT -o $@ -c $(top_srcdir)/rpmqv.c
.PHONY: splint
splint:
splint \
-load build/rpmbuild.lcd \
-load lib/rpmlib.lcd \
-load rpmdb/rpmdb.lcd \
-load rpmio/rpmio.lcd \
-load popt/popt.lcd \
$(DEFS) $(INCLUDES) rpmqv.c $(rpmbuild_SOURCES)
.PHONY: lint
lint:
$(LINT) -Dlint $(DEFS) $(INCLUDES) rpmqv.c $(rpmbuild_SOURCES) \
`make -s sources -C build` \
`make -s sources -C lib` \
`make -s sources -C rpmdb` \
`make -s sources -C rpmio` \
`make -s sources -C file/src`
.PHONY: mccabe
mccabe:
@$(MCCABE) rpmqv.c $(rpmbuild_SOURCES) \
`make -s sources -C build` \
`make -s sources -C lib` \
`make -s sources -C rpmdb` \
`make -s sources -C rpmio` | sort -nr | head -n 30
.PHONY: updatepo
updatepo:
rsync -Lrtvz translationproject.org::tp/latest/rpm/ po
CVSTAG = r$(subst .,-,$(VERSION))
pkgsrcdir = @PKGSRCDIR@
DBPATH = @DBPATH@
install-data-local:
@$(MKDIR_P) $(DESTDIR)$(DBPATH)
@$(MKDIR_P) $(DESTDIR)$(varprefix)/spool/repackage
@for dir in BUILD RPMS SOURCES SPECS SRPMS; do\
$(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/$$dir;\
done
@case "@host_cpu@" in \
*86) $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/i386 ;\
$(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/i486 ;\
$(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/i586 ;\
$(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/i686 ;\
$(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/athlon ;\
$(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/pentium3 ;\
$(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/pentium4 ;;\
armv3l) $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/armv3l ;;\
armv4b) $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/armv4b ;;\
armv4l) $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/armv3l ;\
$(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/armv4l ;;\
armv5teb) $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/armv4b ;\
$(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/armv5teb ;;\
armv5tel) $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/armv3l ;\
$(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/armv4l ;\
$(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/armv5tel ;;\
alpha*) $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/alpha ;\
$(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/alphaev6 ;;\
sparc*) $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/sparc ;\
$(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/sparcv8 ;\
$(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/sparcv9 ;\
$(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/sparc64 ;;\
ia64*) $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/ia64 ;;\
s390*) $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/s390 ;;\
mipsel*) $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/mipsel ;;\
mips*) $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/mips ;;\
powerpc*) $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/ppc ;\
$(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/ppciseries ;\
$(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/ppcpseries ;\
$(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/ppc64 ;\
$(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/ppc64iseries ;\
$(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/ppc64pseries ;;\
*) $(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/@host_cpu@ ;;\
esac
$(MKDIR_P) $(DESTDIR)$(pkgsrcdir)/RPMS/noarch
check-local:
.PHONY: tar
tar:
rm -rf /tmp/rpm-$(VERSION)
$(MAKE) DESTDIR=/tmp/rpm-$(VERSION) install
cd /tmp/rpm-$(VERSION) ; tar cvf /tmp/rpm-$(VERSION).tar .
.PHONY: noconfig
noconfig:
find . -name "Makefile" -exec rm {} \;
rm -f *gz *rpm config.*
.PHONY: archive
archive:
@cvs -d `cat CVS/Root` diff 2>&1 > /dev/null || { \
echo " " ; \
echo "==> Please resolve differences between the repository and" ; \
echo "==> your rpm check out before tagging." ; \
echo " " ; \
cvs -n up ; \
echo " " ; \
exit 1 ; \
}
@cvs -d `cat CVS/Root` -Q tag -F $(CVSTAG) .
@make dist
@echo " "
@echo "The final archive is ./rpm-$(VERSION).tar.gz."
.PHONY: nextsrpm
nextsrpm: all archive
@sudo ./rpm -ta rpm-$(VERSION).tar.gz
.PHONY: doxygen
doxygen @WITH_APIDOCS_TARGET@: Doxyfile rpmpopt macros/macros
rm -rf $@
mkdir -p $@
- [ X"@__DOXYGEN@" != Xno ] && @__DOXYGEN@
.PHONY: lcov-reset # run lcov from scratch, always
lcov-reset:
make lcov-run
make lcov-report
# run lcov from scratch if the dir is not there
lcov:
make lcov-reset
.PHONY: lcov-run # reset run coverage tests
lcov-run:
@-rm -rf lcov
find . -name "*.gcda" -exec rm {} \;
make check
.PHONY: lcov-report # generate report based on current coverage data
lcov-report:
mkdir lcov
-lcov -d rpmio -d rpmdb -d lib -d build -d tools -d . --capture --output-file lcov/lcov.info
lcov -l lcov/lcov.info | grep -v "`cd $(top_srcdir) && pwd`" | cut -d: -f1 > lcov/remove
lcov -r lcov/lcov.info `cat lcov/remove` > lcov/lcov.cleaned.info
rm lcov/remove
mv lcov/lcov.cleaned.info lcov/lcov.info
genhtml -t "$(PACKAGE_STRING)" -o lcov lcov/lcov.info
.PHONY: lcov-upload
lcov-upload: lcov
mkdir -p /var/ftp/pub/jbj/rpm-$(VERSION)-lcov
tar -C lcov -cf - . | (cd /var/ftp/pub/jbj/rpm-$(VERSION)-lcov; tar xf -)
# rsync -rvz -e ssh --delete lcov/* ???
cscope:
cscope -b -R
cref: ctags cscope

1667
rpm-5.4.9/Makefile.in Normal file

File diff suppressed because it is too large Load diff

207
rpm-5.4.9/NEWS Normal file
View file

@ -0,0 +1,207 @@
NEWS
====
This is a list of the major changes between RPM 4 and RPM 5.
For more details please see the CHANGES file.
New in RPM 5.3
--------------
o New Features:
- All packages produced by rpmbuild now have a DSA pubkey/signature
New in RPM 5.1
--------------
o Major Bufixes:
- .spec: fix PGP clearsign signature() verification by correctly skipping RFC2440 "dash-escapes"
- macro: permit %{lua:...} to recurse.
- macro: fix line-continuation handling in macro definition parsing
- macro: fix macro option/argument parsing (again), this time by using POPT_CONTEXT_POSIXMEHARDER
o New Features:
- "rpmrepo"
- "rpmdigest"
- "rpmgrep"
- "rpmmtree"
- ":sqlescape" for use in SQL statements generated by --qf.
- ":utf8" for use with ":cdata" format
- ":cdata" to permit strings to be included in XML CDATA.
- .spec: verify(N) = E:V-R, verify(*) and verify(/path) runtime dependency probes
- CLI new RPM CLI options --noautoreq/--noautoprov
- CLI: "+N-V-R.A" path-to-repository expansions with -i/-U
- CLI: "-N-V-R.A" erasure args within install/upgrade transactions
- CLI: proof-of-concept "rpmbuild --lsb" implementation
- build: new Autoconf option --with-path-rpmlua and RPM CLI option --rpmlua for configuring RPM Lua init script path
- macro: OSSP uuid support via RPM Lua functions uuid.generate() and uuid.describe()
- macro: new "%{uuid:[<version>[, <ns>, <data>]]}" for generating UUIDs of version 1, 3, 4 or 5
- macro: new %{getenv:<name>} to lookup environment variables
- macro: new %{shrink:<body>} macro for removing leading+trailing and removing intermediate whitespaces
- macro: new RPM Lua function posix.glob(<pattern>)
- macro: new RPM Lua function rpm.realpath(<path>) to complement RPM macro %{realpath:<path>}
- macro: new RPM Lua function rpm.sleep()
- macro: new RPM Lua function rpm.slurp() for slurping in the whole content of a file or an URL
- macro: new RPM Lua function util.textwrap() for auto-wrapping junks of larger text messages
- macro: unconditionally provide RPM Lua functions posix.{setenv,unsetenv}
- rpmdb: new tags ORIGIN{TID,TIME} which record the first INSTALL{TID,TIME} of a package
- rpmlib: function rpmuuidMake() for generating UUIDs of version 1, 3, 4 or 5
- rpmlib: permit opt-in network access using %_rpmgio macro.
- rpmlib: support for CPIO, TAR and AR payloads
- API: RPM 4 compatibility layer <rpm/rpm4compat.h>
- macro: permit %{___NVRA} to parameterize the displayed NVRA while installing.
o Upgrades:
- macro: upgraded from Lua 5.1.2 to 5.1.3
- macro: upgraded RPM Lua extension lrexlib from ancient version 1.1x to version 2.2
- build: upgraded build environment to use GNU libtool 2.2.2
o Incompatibilities:
- rpmdb: use "struct timeval" timestamp for INSTALL{TID,TIME} and ORIGIN{TID,TIME}
o Portability:
- build: QNX platform support
New in RPM 5.0
--------------
o Project Environment:
The official RPM code base was relocated from rpm.org to rpm5.org
and a completely new project environment was established around it,
including anonymous repository browsing access, new mailing lists,
etc.
o Source Tree:
The RPM source tree was cleaned up by pruning many old and obsolete
files, removing dangling symbolic links, relocating sub-directories
and fixing timestamps and other versioning meta-data which got
broken over 10 years of RPM development.
o Build Environment:
The Automake/Autoconf/Libtool-based build environment of RPM was
completely revamped. Especially the Autoconf parts were finally
cleaned up from the ground up, including basing the use of all
third-party libraries on a new sophisticated Autoconf macro
"RPM_CHECK_LIB". As a result most third-party libraries now can be
linked externally, too.
o Development Environment:
For being able to build RPM under arbitrary Unix platforms despite
the fact that RPM needs a larger number of third-party libraries,
the "devtool" environment and its "standalone" script is provided.
This allows RPM developers to build RPM from scratch under arbitrary
Unix platforms in a rather self-contained environment.
o Greatly Improved Portability:
RPM 5 was ported to all major Unix platforms as of 2007, including
BSD, Linux and Solaris flavors. It was successfully built (with the
above "devtool" "standalone") on at least the following particular
Unix platforms (including Mac OS X "Darwin" and Windows "Cygwin"):
ix86-freebsd6.2-gcc4.2.0
ix86-freebsd6.2-gcc4.3.0s20070713
ix86-freebsd6.2-gcc3.4
amd64-freebsd6.2-gcc4.1.2
ix86-freebsd7.0-gcc4.1.2
ia64-freebsd6.2-gcc4.1.2
ix86-fedora7-gcc4.2.0
ix86-fedora7-sunstudio12
ix86-fedora7-icc10.0
ix86-debian3.1-gcc4.1.2
ix86-debian4.0-gcc4.2.0
ix86-rhel4-gcc4.1.2
ix86-solaris9-gcc4.1.2
sparc64-solaris8-gcc4.1.2
sparc64-solaris9-gcc4.1.2
sparc64-solaris10-gcc4.1.2
amd64-solaris10-gcc4.1.2
ppc-macosx10.4-gcc4.0.1
ix86-macosx10.4-gcc4.0.1
ppc-aix5.3-gcc3.3.2
ix86-cygwin_nt5.1-gcc3.4.4
o Mac OS X Cross Development:
RPM 5 can now be built for all recent versions of Mac OS X, with
detection of Python.framework and with Universal Binary support
(both PowerPC and Intel architectures in a single binary file). The
Mac OS X version will install in /usr/local and /var/local. It will
work with the following versions of the OS and/or SDK, using the
above devtool and with the target name quoted below:
Mac OS X 10.x "macosx" - build native version
Mac OS X 10.3 "panther" - PowerPC (MacOSX10.3.9.sdk)
Mac OS X 10.4 "tiger" - PowerPC and Intel (MacOSX10.4u.sdk)
Mac OS X 10.5 "leopard" - PowerPC and Intel (MacOSX10.5.sdk)
o Source Code Cleanups:
The RPM source base was completely cleaned up. As a result RPM now
builds fully warnings-free under all major Unix platforms with GCC.
Additionally, RPM now can be built without problems with the Sun
Studio and Intel C/C++ compilers, too.
o Third-Party Library Upgrades:
RPM now is able to build against the latest versions of all
third-party libraries. Additionally, the internal copies of
third-party libraries were also upgraded to the latest versions,
including Berkeley-DB 4.6.21, Lua 5.1.2, XAR 1.5.2, etc.
o RPM Database:
The RPM database (RPMDB) now out-of-the-box supports both
Berkeley-DB and SQLite. The SQLite support was greatly improved, but
nevertheless inherently still lacks some features of the Berkeley-DB
RPMDB. Nevertheless, one can build RPM with an SQLite-only
RPMDB, too. But this is not officially supported. It is just an
experimental developer feature.
o Compression:
The RPM packages support both Bzip2 and LZMA payloads, in addition
to the default Gzip compression format. Support for LZMA_Alone with
rpmio was added, with the lzma syntax upgraded to newer LZMA Utils.
o "rpmrc" and Platform Detections:
Support for the old "rpmrc" (which was used mainly for architecture
mappings, etc) was completely removed. Everything is now configured
through RPM "macros" only. Additionally, the internal C-based
platform detections were completely removed, too.
o XAR Format Support:
Initial support for the XML Archive (XAR) file format was added
to RPM. The initial implementation establishes a wrapper archive
format for mapping the 4 sections used in *.rpm package file (Lead,
Signature, Header and Payload) to files with the same name in a XAR
archive wrapper. A wrapper archive to carry package sections is
already used by Apple Leopard *.pkg (using XAR) and Debian *.deb
packages (using AR), rpm-5.0 now has a well defined representation
of *.rpm packages in a wrapper archive format. Establishing a direct
mapping between rpm tags and XAR attributes/properties in XML in
order to fully use the extensibility of an XAR archive will be
attempted for RPM 5.1.
o Removed RPMv3 Package Format Support:
The support for the old RPMv3 (LSB) package format was removed to
cleanup and simplify the code base. RPM 5 now supports RPMv4 package
format only.
o Additional Specification Features:
A larger set of additional features or provided for use in package
specifications (.spec): new tag "Class" for quality assurance
based classification, new section "%track" for vcheck(1) based
upstream vendor source version tracking, new section "%sanitycheck"
for sanity checking the run-time of a package by performing
run-time tests, etc. Additionally, RPM can be configured via
macro %{_arbitrary_tags_arbitrary_tags} to support so-called
"arbitrary tags" -- this allows one to attach custom information
with an RPM package. Finally, the macro processor now supports the
"%{@<name>:<separator>}" syntax for expanding all values from the
macro stack of a macro <name> by concatenating the values with
<separator>.
o Additional Command Line Interface (CLI) Features:
The CLI supports additional options, including "-bt" for executing
the new "%track" section (the step logically coming before "-bp"),
"--undefine '<macroname>'" for reversing the effect of "--define
'<macroname> <macrovalue>'", etc.
o Application Programming Interface (API) Changes:
There were various RPM C API changes. See CHANGES file for more
details.

22
rpm-5.4.9/README Normal file
View file

@ -0,0 +1,22 @@
This is RPM, the RPM Package Manager.
The latest releases are always available at:
http://rpm5.org/files/rpm/
Additional RPM documentation (papers, slides, HOWTOs) as well as
mailing lists for users and developers can be found at:
http://rpm5.org/
The RPM Package Manager was originally written in 1997 by:
Erik Troan <ewt@redhat.com>
Marc Ewing <marc@redhat.com>
See the CREDITS file for a list of folks who have helped out
tremendously.
RPM may be distributed under the terms of the LGPL 2.1 license (see the
file COPYING.LIB for details).

162
rpm-5.4.9/TODO Normal file
View file

@ -0,0 +1,162 @@
TODO
====
KNOWN PENDING ISSUES
--------------------
This is the list of known pending issues which still *HAVE* to be
resolved during release engineering. Please do not just list any
*CANDO* items.
- jbj: make a complete pass through rpm.org check-ins and make sure they
have exactly zero "features" that are not already in rpm-5.0. With
full attribution of course ...
- jbj: finish Requires: sanitycheck(N) = E:V-R runtime probe.
- jbj: finish BuildRequires: vcheck(N) = E:V-R runtime probe.
- jbj: write up added featlets/bugtures in %docdir notes.
- jbj: handle SourceN: foo-V-R.src.rpm unpacking.
- jbj: fix (or at least document) the /sbin/ldconfig optimization flaw.
- jbj: finish --trust with --import (or punt to 5.1).
- jbj: add build script templates for install scriptlets (or punt to 5.1).
- jbj: change RPM_I18NSTRING_TYPE wiring to use arbitrary tag.
- jbj: markReplacedFiles() subtly rewrites header back into rpmdb
with altered RPMTAG_FILESTATES data. get/del/add sequence
is needed instead.
- jbj: VSFlags (and --nodigest/--nosignature) is now global rather than
persistently per-transaction. That means its no longer possible to
have two transactions, one which verifies signatures while the other
does not. Per-transaction VSFlags never made much sense imho, but
some may care. Establishing a end-user, not a per-application or
per-transaction, package integrity/security policy is the only
rational end-point.
- jbj: there's a buildroot compatibility issue that needs to be addressed
in (at least) doco. The problem is common to rpm-4_5 and HEAD.
Issue at
http://qa.mandriva.com/show_bug.cgi?id=34705
- jbj: Heh, --import has *always* used the wrong data type for
Summary/Description/Group. The header that carries the pubkey
lacks RPMTAG_ARCH/RPMTAG_OS as well. Re-importing all pubkeys is
one solution, but perhaps a "just works" slam-dunk hack is needed
during --rebuildb, or with header extensions. When this issue is
resolved, then rpm can/should use implicit, rather than explicit, data
types for tag data.
- jbj: add libTomCrypt signature verification.
- jbj: add per-implementation crypto hashes.
- jbj: add per-implementation symmetric ciphers.
- jbj: permit per-file encryption with password caching through keyutils.
- jbj: generalize the Leopard XAR format to ar (as in *.deb), tar, and cpio.
- afb: add read-only support for 070707 cpio so we can piggy-back on pkg
- jbj: eliminate the oddball *.src.rpm paths, nuke rpmInstallSourcePackage.
- jbj: VPATH-like generalization to fold-in splitted-source-directory patch.
- jbj: add per file RPMTAG_ENTROPY a la Shannon to start making the choice
of compression scheme computible.
- jbj: explicitly compute sums of header and package sizes to help
distro maintainers understand their cdrom/dvd and memory footprint
needs.
- jbj: split rpmtsRun() into 2 pieces, moving the file resolution
computation into its own method.
- jbj: redesign the bleeping callback, which is good for nothing but pushing
script kiddie progress bars across the screen.
- jbj: arbitrary "%foo -p /bar" scriptlets as pair'ed RPMTAG_{FOO,FOOPROG}.
- jbj: arbitrary triggers, like scriptlets, but with a condition check too.
- jbj: the hash *ahem* algorithm at rpmdb/fprint.c:186 fpHashFunction() is
pathetic. FYI, the fingerprint hash is in the top 10 pigs when
profiling rpm installs, so better has immediate performance benefits.
rpmio/lookup3.c is possibly better. The other important usage case
is restructuring the multi-level add package "provides" lookup in
lib/rpmal.c (but that likely needs to be thrown into a Berkeley DB
table to minimize memory footprint).
- jbj: using qsort to insure that nearly sorted lists of join keys in
an rpmdb remain sorted is stoopid: quicksort on nearly sorted lists
is slower than alternative implementations like mergesort.
- jbj: eliminate internal --initdb (useless) and --verifydb (peculier
to Berkeley DB and adequately/equivalently achievable with db_verify).
- jbj: NSS has many memory leaks that are not free'd by NSS_Shutdown().
- jbj: this leak needs fixing somewhen:
==3436== 12 bytes in 1 blocks are definitely lost in loss record 3 of 9
==3436== at 0x4805525: malloc (vg_replace_malloc.c:149)
==3436== by 0x4934365: argvSplit (argv.c:207)
==3436== by 0x48F89F9: tagLoadATags (tagname.c:31)
==3436== by 0x48F969E: _tagValue (tagname.c:361)
==3436== by 0x48F9805: tagValue (tagname.c:403)
==3436== by 0x48878F9: rpmdsSysinfo (rpmds.c:1600)
==3436== by 0x48A5BDE: rpmtsCreate (rpmts.c:1302)
==3436== by 0x3EFA: main (rpmqv.c:540)
- jbj: eliminate %patch-as-macro-in-C implementation.
- jbj: convert unused syntax (like Disttag:/Repotag:/Cvsid:) to arbitrary tags
- jbj: convert %prep/%build/%install/%check/%clean to arbitrary srpm tags.
- jbj: use devtool.sh as a model for an arbitrary state machine that
runs arbitrary scripts in deterministic order, checking error codes.
Rewrite rpmbuild.c accordingly.
- jbj: hmmm, arbitrary Foo: (except for Class:) ends up in binary *.rpm's,
while %foo (like %track) ends up in *.src.rpm's. I'll pretend that's
a feature until a means to more precisely specify arbitrary tag
copying into binary/source rpm's is devised.
- jbj: rpm --help using popt-1.13 with non-utf8 needs some work.
POPT_fprintf using iconv(3) is the common element so far.
- jbj: MacPorts is going to universal binaries (the Mac OS X equivalent
of multilib) with a "fat" arch in *.rpm packages. Better can be done,
including insturmenting running lipo(1) automagically during install.
- jbj: build/build.c doScript() was a crack-soaked proof-of-concept build
system script invoker with macro templates that I threw together on
a Saturday afternoon in November, 1999. Noone has ever bothered to
rewrite the goop sadly, far better could and should be done.
- jbj: users continually expect the ability to create "noarch" subpkgs even
though rpm has only a single build (and arch is a constant for that build).
Permitting noarch subpkgs is no more complicated than applying an
explict sanity check that, indeed, the subpkg contents are "noarch".
- jbj: both --yaml and --xml are in need of QA regression tests.
2 of 1300 packages fail to YAML load correctly. One of the
failure cases was irregular white space in %description,
the other case involved RPM_I18NSTRING_TYPE.
- jbj: XOR operator needed, such that Requires: LSB ^ !LSB has valid
truth table
- jbj: RFE: capture arbitrary 'defines' from the ENV, and the invocation
command line, each to end up in binary *.rpm's to show more of build
time options
- jbj: rewrite pgpReadPkts to return array of clearsign'd segments instead.
- jbj: teach argvSplit about escaped seperator characters.
- jasonc: spec file parser: one cannot represent a "odd" file path in a
Provides such as:
Provides: /path/with spaces/and,commas/foo.bar
currently because both spaces and commas can be used to indicate
multiple provides entries (Mac OS X is great at finding these types of
"problems")
- rse: XAR 1.5.2 doesn't build under Solaris 10 as <fts.h> and the
BSD4.4 fts(3) API is completely missing there.
- jbj: "make dist" no workie with XAR internal. layering in automake is
preferred way forward.
- jbj: /usr/lib64 is reported not expanded into rpm.pc pkgconfig fle and
___init.py___.
- jbj: distributing per-platform configuration needs to be done. At a minimum,
the cpu-os.macros.tar.gz file needs distributing with the rpm tarball.
- jbj: verify whether RPMv3 installs (or not).
- jbj: use txar to convert RPMv3 -> rpmv4 (headerReload needs adding).
- jbj: configure --parentdirs/--noparentdirs win persistent run-time macro
and stop discussing in public.
- jbj: permit building w/o changelogs. instead use a header extension to
pull changelogs from a URL, with a default of
file:///usr/share/doc/N-V/Changelog
Use YAML for extra credit.
- jbj: verify(...) probe likely needs to supply _SOME_ information for
failure cases, at least with -vv.
- jbj: verify(...) with prelinking likely needs more "stuff" in QVA_t:
D: rpmdb: read h# 512 Header V3 DSA signature: OK, key ID 1ac70ce6
prelink: Couldn't write file to standard output: Broken pipe
- jbj: handle +bing -bang =boom args within rpmgi.c.
RPM 5.2 ROADMAP ISSUES
----------------------
- jbj: drill in "+foo" ports-like find the real store by prefixing
secret sauce path. Its wired into --install/--upggrade only to
minimize risk. a small refactoring moves same to rpmgi ...
where it becomes available for --query, so rpm -qT --aid +bash
has a prayer of constructing the minimal transaction to install bash.
- jbj: ever better would be to add "=bash" token to construct (and
loop check) the minimal transaction to install bash using headers
from rpmdb. -- added as a aide to memory per IRC thread

832
rpm-5.4.9/acinclude.m4 Normal file
View file

@ -0,0 +1,832 @@
dnl ##
dnl ## acinclude.m4 -- manually provided local Autoconf macros
dnl ##
dnl ##
dnl ## NAME:
dnl ## AC_MSG_TITLE -- Display a configuration title
dnl ##
dnl ## USAGE:
dnl ## AC_MSG_TITLE(<name>, <version>)
dnl ##
AC_DEFUN([AC_MSG_TITLE],[
_AS_ECHO([Configuring $1, Version $2])
])
dnl ##
dnl ## NAME:
dnl ## AC_MSG_HEADER -- Display a configuration header
dnl ##
dnl ## USAGE:
dnl ## AC_MSG_HEADER(<text>)
dnl ##
AC_DEFUN([AC_MSG_HEADER],[
_AS_ECHO([])
_AS_ECHO([=== $1 ===])
])
dnl ##
dnl ## NAME:
dnl ## AC_MSG_VERBOSE -- Display a message under --verbose
dnl ##
dnl ## USAGE:
dnl ## AC_MSG_VERBOSE(<text>)
dnl ##
AC_DEFUN([AC_MSG_VERBOSE], [
if test ".$verbose" = .yes; then
_AS_ECHO([$1])
fi
])
dnl ##
dnl ## NAME:
dnl ## RPM_CHECK_LIB -- Check for third-party libraries
dnl ##
dnl ## COPYRIGHT
dnl ## Copyright (c) 2007 Ralf S. Engelschall <rse@engelschall.com>
dnl ##
dnl ## DESCRIPTION:
dnl ## This is a rather complex Autoconf macro for sophisticated
dnl ## checking the availability of third-party libraries and
dnl ## extending the build environment for correctly building
dnl ## against it.
dnl ##
dnl ## It especially supports the following particular features:
dnl ## - is aware of old-style [lib]<libname>-config style scripts
dnl ## - is aware of new-style pkg-config(1) [lib]<libname>.pc configuration files
dnl ## - searches under standard sub-directories "include", "lib", etc.
dnl ## - searches under arbitrary sub-areas of a tree like ".libs", etc.
dnl ## - searches in standard system locations (implicitly)
dnl ## - supports searching for function in multiple libraries
dnl ## - supports searching for multiple headers
dnl ## - supports multiple search locations (fallbacks!)
dnl ##
dnl ## USAGE:
dnl ## - configure.in:
dnl ## RPM_CHECK_LIB(
dnl ## <lib-real-name>, -- [$1] e.g. GNU bzip2
dnl ## <lib-tag-name>, -- [$2] e.g. bzip2
dnl ## <lib-link-name>, -- [$3] e.g. bz2
dnl ## <lib-function-name>, -- [$4] e.g. BZ2_bzlibVersion
dnl ## <lib-header-filename>, -- [$5] e.g. bzlib.h
dnl ## <with-arg-default>[, -- [$6] e.g. yes,external:internal:none
dnl ## <internal-subdir>[, -- [$7] e.g. lib/bzip2:include:src
dnl ## <action-success>[, -- [$8] e.g. AC_DEFINE(USE_BZIP2, 1, [...])
dnl ## <action-failure> -- [$9] e.g. AC_MSG_ERROR([...])
dnl ## ]]])
dnl ##
dnl ## - Makefile.in:
dnl ## top_srcdir = @top_srcdir@
dnl ## srcdir = @srcdir@
dnl ## WITH_<LIB-TAG-NAME> = @WITH_<LIB-TAG-NAME>@
dnl ## WITH_<LIB-TAG-NAME>_SUBDIR = @WITH_<LIB-TAG-NAME>_SUBDIR@
dnl ## CPPFLAGS = @CPPFLAGS@
dnl ## CFLAGS = @CFLAGS@
dnl ## LDFLAGS = @LDFLAGS@
dnl ## LIBS = @LIBS@
dnl ##
dnl ## - CLI:
dnl ## $ ./configure \
dnl ## --with-<lib-tag-name>[=<with-arg>]
dnl ## [...]
dnl ##
dnl ## SYNTAX:
dnl ## <with-arg> ::= <with-arg-mode> | <with-arg-location>
dnl ## <with-arg-default> ::= <with-arg-mode> "," <with-arg-location>
dnl ## <with-arg-mode> ::= "yes" | "no"
dnl ## <with-arg-location> ::= <with-arg-location> ":" <with-arg-location>
dnl ## | <directory-path>
dnl ## | "system"
dnl ## | "external"
dnl ## | "internal"
dnl ## | "none"
dnl ## <directory-path> ::= [...] /* valid arg for test(1) option "-d" */
dnl ##
dnl ##
dnl # public API macro
AC_DEFUN([RPM_CHECK_LIB], [
dnl ##
dnl ## PROLOG
dnl ##
dnl # parse <with-arg-default> into default enable mode and default locations
m4_define([__rcl_default_enable], [m4_substr([$6], 0, m4_index([$6], [,]))])
m4_define([__rcl_default_locations], [m4_substr([$6], m4_eval(m4_index([$6], [,]) + 1))])
dnl # provide defaults
if test ".${with_$2+set}" != .set; then
dnl # initialize to default enable mode
with_$2="__rcl_default_enable"
AC_MSG_VERBOSE([++ assuming --with-$2=$with_$2])
fi
if test ".${with_$2}" = .yes; then
dnl # map simple "--with-foo=yes" to an enabled default location path
with_$2="__rcl_default_locations"
AC_MSG_VERBOSE([++ mapping --with-$2=yes to --with-$2="$with_$2"])
fi
dnl ##
dnl ## HANDLING
dnl ##
__rcl_result_hint=""
__rcl_location_$2=""
__rcl_location_last=""
m4_if([$7],,, [
WITH_[]m4_translit([$2],[a-z],[A-Z])[]_SUBDIR=""
WITH_[]m4_translit([$2],[a-z],[A-Z])[]_CPPFLAGS=""
WITH_[]m4_translit([$2],[a-z],[A-Z])[]_LDFLAGS=""
WITH_[]m4_translit([$2],[a-z],[A-Z])[]_LIBS=""
])
AC_ARG_WITH($2,
AS_HELP_STRING([--with-$2=ARG], [build with $1 library (__rcl_default_enable) (location path: "__rcl_default_locations")]), [dnl
if test ".${with_$2}" != .no; then
dnl # iterate over location path specification for searching purposes
__rcl_IFS="${IFS}"; IFS=":"
for __rcl_location in ${with_$2}; do
IFS="${__rcl_IFS}"
__rcl_location_last="${__rcl_location}"
AC_MSG_VERBOSE([++ searching location: ${__rcl_location}])
if test ".${__rcl_location}" = .none; then
dnl # no operation in loop, ignore failure later, too.
AC_MSG_VERBOSE([-- no operation])
m4_if([$7],,, [ elif test ".${__rcl_location}" = .internal; then
dnl # optional support for <internal-subdir> feature
m4_define([__rcl_subdir],
[m4_if(m4_index([$7], [:]), -1, [$7],
m4_substr([$7], 0, m4_index([$7], [:])))])
if test -d ${srcdir}/__rcl_subdir; then
AC_MSG_VERBOSE([-- activating local sub-directory: __rcl_subdir])
if test -f ${srcdir}/__rcl_subdir/configure; then
AC_CONFIG_SUBDIRS(__rcl_subdir)
fi
dnl # NOTICE: an internal copy of the third-party library is a tricky thing
dnl # because for the following two major reasons we cannot just extend
dnl # CPPFLAGS, LDFLAGS and LIBS in this case:
dnl # 1. at _this_ "configure" time at least the library file (libfoo.a)
dnl # is still not existing, so extending LIBS with "-lfoo" would cause
dnl # following Autoconf checks to fail.
dnl # 2. even deferring the extension of LIBS doesn't work, because although
dnl # this works around the problem under (1), it will fail if more than
dnl # one internal third-party library exists: LIBS would contains "-lfoo
dnl # -lbar" and if build "foo", "bar" usually still isn't built (or vice
dnl # versa). Hence, the linking of programs (tools, tests, etc) in "foo"
dnl # would fail.
dnl # 3. information in at least LDFLAGS and LIBS is usually passed-through
dnl # to applications via xxx-config(1) scripts or pkg-config(1)
dnl # specifications. As the path to the internal copy is usually just a
dnl # temporary path, this will break there, too.
dnl # So, internal copies of third-party libraries inherently have to be
dnl # handled explicitly by the build environment and for this we can only
dnl # provide the necessary information in dedicated per-library variables.
WITH_]m4_translit([$2],[a-z],[A-Z])[_SUBDIR="__rcl_subdir"
__rcl_location_$2=internal
AC_MSG_VERBOSE([++ post-adjustments for --with-$2 (${__rcl_location_$2})])
__rcl_dirs_inc=`echo '$7' | sed -e 's/^[[^:]]*://' -e 's/:[[^:]]*[$]//'`
__rcl_dirs_lib=`echo '$7' | sed -e 's/^[[^:]]*:[[^:]]*://'`
__rcl_srcdir="\[$](top_srcdir)/\[$](WITH_[]m4_translit([$2],[a-z],[A-Z])[]_SUBDIR)"
__rcl_builddir="\[$](top_builddir)/\[$](WITH_[]m4_translit([$2],[a-z],[A-Z])[]_SUBDIR)"
__rcl_firstlib="m4_if(m4_index([$3], [ ]), -1, [$3], m4_substr([$3], 0, m4_index([$3], [ ])))"
if test ".${__rcl_dirs_inc}" != ".$7"; then
__rcl_IFS="${IFS}"; IFS=","
for __rcl_dir in ${__rcl_dirs_inc}; do
IFS="${__rcl_IFS}"
test ".${__rcl_dir}" = . && continue
AC_MSG_VERBOSE([-- extending WITH_[]m4_translit([$2],[a-z],[A-Z])[]_CPPFLAGS: -I${__rcl_srcdir}/${__rcl_dir}])
WITH_[]m4_translit([$2],[a-z],[A-Z])[]_CPPFLAGS="${WITH_[]m4_translit([$2],[a-z],[A-Z])[]_CPPFLAGS} -I${__rcl_srcdir}/${__rcl_dir}"
AC_MSG_VERBOSE([-- extending WITH_[]m4_translit([$2],[a-z],[A-Z])[]_CPPFLAGS: -I${__rcl_builddir}/${__rcl_dir}])
WITH_[]m4_translit([$2],[a-z],[A-Z])[]_CPPFLAGS="${WITH_[]m4_translit([$2],[a-z],[A-Z])[]_CPPFLAGS} -I${__rcl_builddir}/${__rcl_dir}"
done
IFS="${__rcl_IFS}"
fi
AC_MSG_VERBOSE([-- extending WITH_[]m4_translit([$2],[a-z],[A-Z])[]_CPPFLAGS: -I${__rcl_srcdir}])
WITH_[]m4_translit([$2],[a-z],[A-Z])[]_CPPFLAGS="${WITH_[]m4_translit([$2],[a-z],[A-Z])[]_CPPFLAGS} -I${__rcl_srcdir}"
AC_MSG_VERBOSE([-- extending WITH_[]m4_translit([$2],[a-z],[A-Z])[]_CPPFLAGS: -I${__rcl_builddir}])
WITH_[]m4_translit([$2],[a-z],[A-Z])[]_CPPFLAGS="${WITH_[]m4_translit([$2],[a-z],[A-Z])[]_CPPFLAGS} -I${__rcl_builddir}"
if test ".${__rcl_dirs_lib}" != ".$7"; then
__rcl_IFS="${IFS}"; IFS=","
for __rcl_dir in ${__rcl_dirs_lib}; do
IFS="${__rcl_IFS}"
test ".${__rcl_dir}" = . && continue
AC_MSG_VERBOSE([-- extending WITH_[]m4_translit([$2],[a-z],[A-Z])[]_LDFLAGS: -L${__rcl_builddir}/${__rcl_dir}])
WITH_[]m4_translit([$2],[a-z],[A-Z])[]_LDFLAGS="${WITH_[]m4_translit([$2],[a-z],[A-Z])[]_LDFLAGS} -L${__rcl_builddir}/${__rcl_dir}"
done
IFS="${__rcl_IFS}"
fi
AC_MSG_VERBOSE([-- extending WITH_[]m4_translit([$2],[a-z],[A-Z])[]_LDFLAGS: -L${__rcl_builddir}])
WITH_[]m4_translit([$2],[a-z],[A-Z])[]_LDFLAGS="${WITH_[]m4_translit([$2],[a-z],[A-Z])[]_LDFLAGS} -L${__rcl_builddir}"
AC_MSG_VERBOSE([-- extending WITH_[]m4_translit([$2],[a-z],[A-Z])[]_LIBS: -l${__rcl_firstlib}])
WITH_[]m4_translit([$2],[a-z],[A-Z])[]_LIBS="${WITH_[]m4_translit([$2],[a-z],[A-Z])[]_LIBS} -l${__rcl_firstlib}"
__rcl_result_hint="internal: sub-directory __rcl_subdir"
break
else
AC_MSG_VERBOSE([-- skipping not existing local sub-directory: __rcl_subdir])
fi
])
elif test ".${__rcl_location}" = .external; then
dnl # detection of library in arbitrary external location
if (pkg-config --exists $2 || pkg-config --exists lib$2) 2>/dev/null; then
dnl # via pkg-config(1) script in PATH
m4_define([__rcl_query_pkgconfig], [
__rcl_flags=""
for __rcl_query in $][2; do
if test ".$__rcl_flags" != .; then
__rcl_flags="${__rcl_flags} `($][1 $__rcl_query) 2>/dev/null`"
else
__rcl_flags="`($][1 $__rcl_query) 2>/dev/null`"
fi
done
if test ".${__rcl_flags}" != .; then
AC_MSG_VERBOSE(-- extending $][3: ${__rcl_flags})
$][3="${$][3} ${__rcl_flags}"
fi
])
if (pkg-config --exists $2) 2>/dev/null; then
__rcl_query_pkgconfig([pkg-config $2], [--cflags-only-other], [CFLAGS])
__rcl_query_pkgconfig([pkg-config $2], [--cflags-only-I], [CPPFLAGS])
__rcl_query_pkgconfig([pkg-config $2], [--libs-only-L --libs-only-other], [LDFLAGS])
__rcl_query_pkgconfig([pkg-config $2], [--libs-only-l], [LIBS])
__rcl_result_hint="external: via pkg-config $2"
else
__rcl_query_pkgconfig([pkg-config lib$2], [--cflags-only-other], [CFLAGS])
__rcl_query_pkgconfig([pkg-config lib$2], [--cflags-only-I], [CPPFLAGS])
__rcl_query_pkgconfig([pkg-config lib$2], [--libs-only-L --libs-only-other], [LDFLAGS])
__rcl_query_pkgconfig([pkg-config lib$2], [--libs-only-l], [LIBS])
__rcl_result_hint="external: via pkg-config lib$2"
fi
break
elif test ".`($2-config --version; lib$2-config --version) 2>/dev/null`" != .; then
dnl # via config script in PATH
m4_define([__rcl_query_config], [
__rcl_flags="`($][1 $][2) 2>/dev/null`"
if test ".${__rcl_flags}" != .; then
AC_MSG_VERBOSE(-- extending $][3: ${__rcl_flags})
$][3="${$][3} ${__rcl_flags}"
fi
])
if test ".`($2-config --version) 2>/dev/null`" != .; then
__rcl_query_config([$2-config], [--cppflags], [CPPFLAGS])
__rcl_query_config([$2-config], [--cflags], [CFLAGS])
__rcl_query_config([$2-config], [--ldflags], [LDFLAGS])
__rcl_query_config([$2-config], [--libs], [LIBS])
__rcl_result_hint="external: via $2-config"
else
__rcl_query_config([lib$2-config], [--cppflags], [CPPFLAGS])
__rcl_query_config([lib$2-config], [--cflags], [CFLAGS])
__rcl_query_config([lib$2-config], [--ldflags], [LDFLAGS])
__rcl_query_config([lib$2-config], [--libs], [LIBS])
__rcl_result_hint="external: via lib$2-config"
fi
break
elif test ".${__rcl_found}" = .no; then
dnl # via implicit flags attribution of previous checks or
dnl # in standard system locations (usually /usr/include and /usr/lib)
__rcl_found_hdr=no
__rcl_found_lib=no
AC_PREPROC_IFELSE([AC_LANG_SOURCE([@%:@include <$5>])], [ __rcl_found_hdr=yes ])
m4_foreach_w([__rcl_lib], [$3], [
__rcl_safe_LIBS="${LIBS}"
LIBS="-l[]m4_defn([__rcl_lib]) ${LIBS}"
AC_LINK_IFELSE([AC_LANG_CALL([], [$4])], [ __rcl_found_lib=yes ])
LIBS="${__rcl_safe_LIBS}"
])
if test ".${__rcl_found_hdr}:${__rcl_found_lib}" = ".yes:yes"; then
__rcl_result_hint="external: implicit or default location"
break
fi
fi
elif test ".${__rcl_location}" = .system; then
dnl # detection of library in external locations controlled
dnl # by explicit build flags or in standard system locations
dnl # (usually /usr/include and /usr/lib)
__rcl_found_hdr=no
__rcl_found_lib=no
AC_PREPROC_IFELSE([AC_LANG_SOURCE([@%:@include <$5>])], [ __rcl_found_hdr=yes ])
m4_foreach_w([__rcl_lib], [$3], [
__rcl_safe_LIBS="${LIBS}"
LIBS="-l[]m4_defn([__rcl_lib]) ${LIBS}"
AC_LINK_IFELSE([AC_LANG_CALL([], [$4])], [ __rcl_found_lib=yes ])
LIBS="${__rcl_safe_LIBS}"
])
if test ".${__rcl_found_hdr}:${__rcl_found_lib}" = ".yes:yes"; then
__rcl_result_hint="system: explicitly controlled or system location"
break
fi
elif test -d "${__rcl_location}"; then
dnl # detection of library in particular external location
__rcl_found=no
dnl # via config script
for __rcl_dir in ${__rcl_location}/bin ${__rcl_location}; do
if test -f "${__rcl_dir}/$2-config" && test ! -f "${__rcl_dir}/$2-config.in"; then
if test ".`(${__rcl_dir}/$2-config --version) 2>/dev/null`" != .; then
__rcl_query_config([${__rcl_dir}/$2-config], [--cppflags], [CPPFLAGS])
__rcl_query_config([${__rcl_dir}/$2-config], [--cflags], [CFLAGS])
__rcl_query_config([${__rcl_dir}/$2-config], [--ldflags], [LDFLAGS])
__rcl_query_config([${__rcl_dir}/$2-config], [--libs], [LIBS])
__rcl_result_hint="external: via ${__rcl_dir}/$2-config"
__rcl_found=yes
break
fi
elif test -f "${__rcl_dir}/lib$2-config" && test ! -f "${__rcl_dir}/lib$2-config.in"; then
if test ".`(${__rcl_dir}/lib$2-config --version) 2>/dev/null`" != .; then
__rcl_query_config([${__rcl_dir}/lib$2-config], [--cppflags], [CPPFLAGS])
__rcl_query_config([${__rcl_dir}/lib$2-config], [--cflags], [CFLAGS])
__rcl_query_config([${__rcl_dir}/lib$2-config], [--ldflags], [LDFLAGS])
__rcl_query_config([${__rcl_dir}/lib$2-config], [--libs], [LIBS])
__rcl_result_hint="external: via ${__rcl_dir}/lib$2-config"
__rcl_found=yes
break
fi
fi
done
dnl # via pkg-config(1) script
if test ".${__rcl_found}" = .no; then
for __rcl_dir in ${__rcl_location}/bin ${__rcl_location}; do
if test -f "${__rcl_dir}/pkg-config"; then
if (${__rcl_dir}/pkg-config --exists $2) 2>/dev/null; then
__rcl_query_pkgconfig([${__rcl_dir}/pkg-config $2], [--cflags-only-other], [CFLAGS])
__rcl_query_pkgconfig([${__rcl_dir}/pkg-config $2], [--cflags-only-I], [CPPFLAGS])
__rcl_query_pkgconfig([${__rcl_dir}/pkg-config $2], [--libs-only-L --libs-only-other], [LDFLAGS])
__rcl_query_pkgconfig([${__rcl_dir}/pkg-config $2], [--libs-only-l], [LIBS])
__rcl_result_hint="external: via ${__rcl_dir}/pkg-config $2"
__rcl_found=yes
break
elif (${__rcl_dir}/pkg-config --exists lib$2) 2>/dev/null; then
__rcl_query_pkgconfig([${__rcl_dir}/pkg-config lib$2], [--cflags-only-other], [CFLAGS])
__rcl_query_pkgconfig([${__rcl_dir}/pkg-config lib$2], [--cflags-only-I], [CPPFLAGS])
__rcl_query_pkgconfig([${__rcl_dir}/pkg-config lib$2], [--libs-only-L --libs-only-other], [LDFLAGS])
__rcl_query_pkgconfig([${__rcl_dir}/pkg-config lib$2], [--libs-only-l], [LIBS])
__rcl_result_hint="external: via ${__rcl_dir}/pkg-config lib$2"
__rcl_found=yes
break
fi
fi
done
fi
dnl # in standard sub-areas
if test ".${__rcl_found}" = .no; then
for __rcl_dir in ${__rcl_location}/include/$2 ${__rcl_location}/include ${__rcl_location}; do
if test -f "${__rcl_dir}/$5"; then
if test ".${__rcl_dir}" != "./usr/include"; then
AC_MSG_VERBOSE([-- extending CPPFLAGS: -I${__rcl_dir}])
CPPFLAGS="${CPPFLAGS} -I${__rcl_dir}"
fi
__rcl_found=yes
break
fi
done
if test ".${__rcl_found}" = .yes; then
__rcl_found=no
for __rcl_dir in ${__rcl_location}/lib/$2 ${__rcl_location}/lib ${__rcl_location}; do
m4_foreach_w([__rcl_lib], [$3], [
if test -f "${__rcl_dir}/lib[]m4_defn([__rcl_lib]).la" && \
test -d "${__rcl_dir}/.libs"; then
if test ".${__rcl_dir}" != "./usr/lib"; then
AC_MSG_VERBOSE([-- extending LDFLAGS: -L${__rcl_dir}])
AC_MSG_VERBOSE([-- extending LDFLAGS: -L${__rcl_dir}/.libs])
LDFLAGS="${LDFLAGS} -L${__rcl_dir} -L${__rcl_dir}/.libs"
fi
__rcl_found=yes
break
fi
if test -f "${__rcl_dir}/lib[]m4_defn([__rcl_lib]).a" || \
test -f "${__rcl_dir}/lib[]m4_defn([__rcl_lib]).so" || \
test -f "${__rcl_dir}/lib[]m4_defn([__rcl_lib]).sl" || \
test -f "${__rcl_dir}/lib[]m4_defn([__rcl_lib]).dylib"; then
if test ".${__rcl_dir}" != "./usr/lib"; then
AC_MSG_VERBOSE([-- extending LDFLAGS: -L${__rcl_dir}])
LDFLAGS="${LDFLAGS} -L${__rcl_dir}"
fi
__rcl_found=yes
break
fi
])
done
fi
if test ".${__rcl_found}" = .yes; then
__rcl_result_hint="external: directory ${__rcl_location}"
fi
fi
dnl # in any sub-area
if test ".${__rcl_found}" = .no; then
for __rcl_file in _ `find ${__rcl_location} -name "$5" -type f -print 2>/dev/null`; do
test .${__rcl_file} = ._ && continue
__rcl_dir=`echo ${__rcl_file} | sed -e 's;[[^/]]*[$];;' -e 's;\(.\)/[$];\1;'`
if test ".${__rcl_dir}" != "./usr/include"; then
AC_MSG_VERBOSE([-- extending CPPFLAGS: -I${__rcl_dir}])
CPPFLAGS="${CPPFLAGS} -I${__rcl_dir}"
fi
__rcl_found=yes
break
done
if test ".${__rcl_found}" = .yes; then
__rcl_found=no
m4_foreach_w([__rcl_lib], [$3], [
for __rcl_file in _ `find ${__rcl_location} -name "lib[]m4_defn([__rcl_lib]).*" -type f -print 2>/dev/null | \
egrep '\.(a|so|sl|dylib)$'`; do
test .${__rcl_file} = ._ && continue
__rcl_dir=`echo ${__rcl_file} | sed -e 's;[[^/]]*[$];;' -e 's;\(.\)/[$];\1;'`
if test ".${__rcl_dir}" != "./usr/lib"; then
AC_MSG_VERBOSE([-- extending LDFLAGS: -L${__rcl_dir}])
LDFLAGS="${LDFLAGS} -L${__rcl_dir}"
fi
__rcl_found=yes
break
done
])
fi
if test ".${__rcl_found}" = .yes; then
__rcl_result_hint="external: tree ${__rcl_location}"
fi
fi
if test ".${__rcl_found}" = .yes; then
break
fi
else
AC_MSG_ERROR([Unknown location specification $__rcl_location])
fi
done
IFS="${__rcl_IFS}"
dnl # check for actual availability of library
m4_if([$7],,, [ if test ".${__rcl_location_last}" = .internal; then
dnl # special case: still not existing "internal" library
dnl # cannot be checked (and usually has not to be checked anyway)
with_$2=yes
if test ".${__rcl_location_$2}" != .internal; then
AC_MSG_ERROR([unable to find internal $1 library])
fi
else ])
dnl # regular case: use standard Autoconf facilities
dnl # and try to make sure both header and library is found
__rcl_found=yes
dnl # check for C header (in set of optionally multiple possibilities)
AC_CHECK_HEADERS([$5], [], [ __rcl_found=no ])
dnl # check for C library (in set of optionally multiple possibilities)
__rcl_found_lib=no
m4_foreach_w([__rcl_lib], [$3], [
AC_CHECK_LIB(m4_defn([__rcl_lib]), [$4])
dnl # manually check for success (do not use third argument to AC_CHECK_LIB
dnl # here as this would no longer set the LIBS variable (the default action)
test ".${m4_translit(ac_cv_lib_[]m4_defn([__rcl_lib])_$4,[.-,],[___])}" = .yes && __rcl_found_lib=yes
])
test ".${__rcl_found_lib}" = .no && __rcl_found="no"
dnl # determine final results
with_$2=${__rcl_found}
m4_if([$7],,, [ fi ])
if test ".${with_$2}" = .yes && test ".${__rcl_result_hint}" = .; then
dnl # was not found explicitly via searching above, but
dnl # implicitly in standard location or via extended
dnl # flags from previous searches
__rcl_result_hint="external: implicitly"
fi
fi
])
dnl ##
dnl ## EPILOG
dnl ##
dnl # provide results
if test ".${with_$2}" = .yes; then
AC_DEFINE([WITH_]m4_translit([$2],[a-z],[A-Z]), 1, [Define as 1 if building with $1 library])
fi
[WITH_]m4_translit([$2],[a-z],[A-Z])="${with_$2}"
AC_SUBST([WITH_]m4_translit([$2],[a-z],[A-Z]))
m4_if([$7],,, [
AC_SUBST([WITH_]m4_translit([$2],[a-z],[A-Z])[_SUBDIR])
AC_SUBST([WITH_]m4_translit([$2],[a-z],[A-Z])[_CPPFLAGS])
AC_SUBST([WITH_]m4_translit([$2],[a-z],[A-Z])[_LDFLAGS])
AC_SUBST([WITH_]m4_translit([$2],[a-z],[A-Z])[_LIBS])
])
dnl # report results
AC_MSG_CHECKING(whether to build with $1 library)
__rcl_msg="${with_$2}"
if test ".${with_$2}" = .yes && test ".${__rcl_result_hint}" != .; then
__rcl_msg="${__rcl_msg} (${__rcl_result_hint})"
fi
AC_MSG_RESULT([${__rcl_msg}])
dnl # perform actions
RPM_CHECK_LIB_LOCATION="${__rcl_location_last}"
if test ".${with_$2}" = .yes; then
AC_DEFINE([WITH_]m4_translit([$2],[a-z],[A-Z]), 1, [Define as 1 if building with $1 library])
dnl # support optional <action-success>
AC_MSG_VERBOSE([++ executing success action])
m4_if([$8],, :, [$8])
else
dnl # support optional <action-failure>
AC_MSG_VERBOSE([++ executing failure action])
m4_if([$9],, [
if test ".${RPM_CHECK_LIB_LOCATION}" != . && \
test ".${RPM_CHECK_LIB_LOCATION}" != .none; then
AC_MSG_ERROR([unable to find usable $1 library])
fi
], [$9])
fi
${as_unset} RPM_CHECK_LIB_LOCATION
])
dnl ##
dnl ## NAME:
dnl ## AC_CHECK_VA_COPY -- Check for C99 va_copy
dnl ##
dnl ## COPYRIGHT
dnl ## Copyright (c) 2006 Ralf S. Engelschall <rse@engelschall.com>
dnl ##
dnl ## DESCRIPTION:
dnl ## This macro checks for C99 va_copy() implementation and
dnl ## provides fallback implementation if neccessary. Notice: this
dnl ## check is rather complex because first because we really have
dnl ## to try various possible implementations in sequence and
dnl ## second, we cannot define a macro in config.h with parameters
dnl ## directly.
dnl ##
dnl ## USAGE:
dnl ## configure.in:
dnl ## AC_CHECK_VA_COPY
dnl ## foo.c:
dnl ## #include "config.h"
dnl ## [...]
dnl ## va_copy(d,s)
dnl ##
dnl # test program for va_copy() implementation
changequote(<<,>>)
m4_define(__va_copy_test, <<[
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#define DO_VA_COPY(d, s) $1
void test(char *str, ...)
{
va_list ap, ap2;
int i;
va_start(ap, str);
DO_VA_COPY(ap2, ap);
for (i = 1; i <= 9; i++) {
int k = (int)va_arg(ap, int);
if (k != i)
abort();
}
DO_VA_COPY(ap, ap2);
for (i = 1; i <= 9; i++) {
int k = (int)va_arg(ap, int);
if (k != i)
abort();
}
va_end(ap);
}
int main(int argc, char *argv[])
{
test("test", 1, 2, 3, 4, 5, 6, 7, 8, 9);
exit(0);
}
]>>)
changequote([,])
dnl # test driver for va_copy() implementation
m4_define(__va_copy_check, [
AH_VERBATIM($1,
[/* Predefined possible va_copy() implementation (id: $1) */
#define __VA_COPY_USE_$1(d, s) $2])
if test ".$ac_cv_va_copy" = .; then
AC_RUN_IFELSE([AC_LANG_SOURCE(AC_LANG_SOURCE([[__va_copy_test($2)]]))],[ac_cv_va_copy="$1"],[],[])
fi
])
dnl # Autoconf check for va_copy() implementation checking
AC_DEFUN([AC_CHECK_VA_COPY],[
dnl # provide Autoconf display check message
AC_MSG_CHECKING(for va_copy() function)
dnl # check for various implementations in priorized sequence
AC_CACHE_VAL(ac_cv_va_copy, [
ac_cv_va_copy=""
dnl # 1. check for standardized C99 macro
__va_copy_check(C99, [va_copy((d), (s))])
dnl # 2. check for alternative/deprecated GCC macro
__va_copy_check(GCM, [VA_COPY((d), (s))])
dnl # 3. check for internal GCC macro (high-level define)
__va_copy_check(GCH, [__va_copy((d), (s))])
dnl # 4. check for internal GCC macro (built-in function)
__va_copy_check(GCB, [__builtin_va_copy((d), (s))])
dnl # 5. check for assignment approach (assuming va_list is a struct)
__va_copy_check(ASS, [do { (d) = (s); } while (0)])
dnl # 6. check for assignment approach (assuming va_list is a pointer)
__va_copy_check(ASP, [do { *(d) = *(s); } while (0)])
dnl # 7. check for memory copying approach (assuming va_list is a struct)
__va_copy_check(CPS, [memcpy((void *)&(d), (void *)&(s), sizeof((s)))])
dnl # 8. check for memory copying approach (assuming va_list is a pointer)
__va_copy_check(CPP, [memcpy((void *)(d), (void *)(s), sizeof(*(s)))])
if test ".$ac_cv_va_copy" = .; then
AC_MSG_ERROR([no working implementation found])
fi
])
dnl # optionally activate the fallback implementation
if test ".$ac_cv_va_copy" = ".C99"; then
AC_DEFINE(HAVE_VA_COPY, 1, [Define if va_copy() macro exists (and no fallback implementation is required)])
fi
dnl # declare which fallback implementation to actually use
AC_DEFINE_UNQUOTED([__VA_COPY_USE], [__VA_COPY_USE_$ac_cv_va_copy],
[Define to id of used va_copy() implementation])
dnl # provide activation hook for fallback implementation
AH_VERBATIM([__VA_COPY_ACTIVATION],
[/* Optional va_copy() implementation activation */
#ifndef HAVE_VA_COPY
#define va_copy(d, s) __VA_COPY_USE(d, s)
#endif
])
dnl # provide Autoconf display result message
if test ".$ac_cv_va_copy" = ".C99"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no (using fallback implementation)])
fi
])
dnl ##
dnl ## NAME:
dnl ## AC_CHECK_STATFS -- Check for "struct statfs" and friends
dnl ##
AC_DEFUN([AC_CHECK_STATFS], [
dnl # 1. search for struct statfs
AC_MSG_CHECKING(for struct statfs)
found_struct_statfs=no
if test ".$found_struct_statfs" = .no; then
dnl # Solaris 2.6+ wants to use "statvfs"
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <sys/statvfs.h>
]], [[
struct statvfs sfs;
]])
], [
AC_MSG_RESULT(in <sys/statvfs.h>)
AC_DEFINE(STATFS_IN_SYS_STATVFS, 1, [statfs in <sys/statvfs.h> (for Solaris 2.6+ systems)])
found_struct_statfs=yes
], [])
fi
if test ".$found_struct_statfs" = .no; then
dnl # Linux: first try including <sys/vfs.h>
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <sys/vfs.h>
]], [[
struct statfs sfs;
]])
],[
AC_MSG_RESULT(in <sys/vfs.h>)
AC_DEFINE(STATFS_IN_SYS_VFS, 1, [statfs in <sys/vfs.h> (for Linux systems)])
found_struct_statfs=yes
], [])
fi
if test ".$found_struct_statfs" = .no; then
dnl # ...next try including <sys/mount.h>
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#include <sys/mount.h>
]], [[
struct statfs sfs;
]])
],[
AC_MSG_RESULT(in <sys/mount.h>)
AC_DEFINE(STATFS_IN_SYS_MOUNT, 1, [statfs in <sys/mount.h> (for Digital Unix 4.0D systems)])
found_struct_statfs=yes
], [])
fi
if test ".$found_struct_statfs" = Xno; then
dnl ...still no joy. Try <sys/statfs.h>
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <sys/statfs.h>
]], [[
struct statfs sfs;
]])
], [
AC_MSG_RESULT(in <sys/statfs.h>)
AC_DEFINE(STATFS_IN_SYS_STATFS, 1, [statfs in <sys/statfs.h> (for IRIX 6.4 systems)])
found_struct_statfs=yes
], [])
fi
if test ".$found_struct_statfs" = .no; then
dnl # ...no luck. Warn the user of impending doom.
AC_MSG_RESULT([not found])
AC_MSG_WARN([struct statfs not found])
fi
dnl # 2. search for f_bavail member of struct statfs
if test ".$found_struct_statfs" = .yes; then
AC_MSG_CHECKING(for f_bavail member in struct statfs)
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#if STATFS_IN_SYS_STATVFS
#include <sys/statvfs.h>
typedef struct statvfs STATFS_t;
#else
typedef struct statfs STATFS_t;
#if STATFS_IN_SYS_VFS
#include <sys/vfs.h>
#elif STATFS_IN_SYS_MOUNT
#include <sys/mouht.h>
#elif STATFS_IN_SYS_STATFS
#include <sys/statfs.h>
#endif
#endif
]], [[
STATFS_t sfs;
sfs.f_bavail = 0;
]])
],[
AC_MSG_RESULT(yes)
AC_DEFINE(STATFS_HAS_F_BAVAIL, 1, [Define if struct statfs has the f_bavail member])
],[
AC_MSG_RESULT(no)
])
fi
dnl # 3. check to see if we have the 4-argument variant of statfs(2)
if test ".$found_struct_statfs" = .yes; then
AC_MSG_CHECKING([if statfs(2) requires 4 arguments])
AC_RUN_IFELSE([
AC_LANG_SOURCE([[
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef STATFS_IN_SYS_VFS
#include <sys/vfs.h>
#elif STATFS_IN_SYS_MOUNT
#include <sys/mouht.h>
#elif STATFS_IN_SYS_STATFS
#include <sys/statfs.h>
#endif
main() {
struct statfs sfs;
exit (statfs(".", &sfs, sizeof(sfs), 0));
}
]])
], [
AC_MSG_RESULT(yes)
AC_DEFINE(STAT_STATFS4, 1, [Define if statfs() takes 4 arguments])
], [
AC_MSG_RESULT(no)
], [
AC_MSG_RESULT(no)
])
fi
])
dnl ##
dnl ## NAME:
dnl ## AC_CPP_FUNC
dnl ##
dnl ## Checks to see if ISO C99 CPP variable __func__ works.
dnl ## If not, perhaps __FUNCTION__ works instead.
dnl ## If not, we'll just define __func__ to "".
dnl ##
dnl ## Needed for the test support code; this was found at
dnl ## http://lists.gnu.org/archive/html/bug-autoconf/2002-07/msg00028.html
dnl
AC_DEFUN([AC_CPP_FUNC],
[AC_REQUIRE([AC_PROG_CC_STDC])dnl
AC_CACHE_CHECK([for an ANSI C99-conforming __func__], ac_cv_cpp_func,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
[[char *foo = __func__;]])],
[ac_cv_cpp_func=yes],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
[[char *foo = __FUNCTION__;]])],
[ac_cv_cpp_func=__FUNCTION__],
[ac_cv_cpp_func=no])])])
if test $ac_cv_cpp_func = __FUNCTION__; then
AC_DEFINE(__func__,__FUNCTION__,
[Define to __FUNCTION__ or "" if `__func__' does not conform to
ANSI C.])
elif test $ac_cv_cpp_func = no; then
AC_DEFINE(__func__,"",
[Define to __FUNCTION__ or "" if `__func__' does not conform to
ANSI C.])
fi
])# AC_CPP_FUNC

1045
rpm-5.4.9/aclocal.m4 vendored Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,78 @@
#! /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 RPM 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
rpm-5.4.9/autodeps/aix.req Executable file
View file

@ -0,0 +1,171 @@
#! /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 RPM 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

View file

@ -0,0 +1,189 @@
#! /usr/bin/ksh
# Current Maintainer: Tim Mooney <mooney@golem.phys.ndsu.NoDak.edu>
#
# Original Author: Ralph Goers(rgoer@Candle.Com)
# Borrowed heavily from H10 version created by Tim Mooney.
# This file is distributed under the terms of the GNU Public License
#
# find-provides is part of RPM, the RPM 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

View file

@ -0,0 +1,99 @@
#! /usr/bin/ksh
#
# Current Maintainer: Tim Mooney <mooney@golem.phys.ndsu.NoDak.edu>
# Original Author: Ralph Goers(rgoer@Candle.Com)
#
# This file is distributed under the terms of the GNU Public License
#
# find-requires is part of RPM, the RPM 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

View file

@ -0,0 +1,3 @@
#!/bin/sh
cat > /dev/null

View file

@ -0,0 +1,3 @@
#!/bin/sh
cat > /dev/null

View file

@ -0,0 +1,21 @@
#!/bin/bash
# ----------------------------------------------------------
# find-provides for Darwin/MacOSX
# ----------------------------------------------------------
# This script reads filenames from STDIN and outputs any relevant provides
# information that needs to be included in the package.
filelist=$(sed -n -e '/\.dylib/p' -e '/\.so/p' -e '/\.bundle/p' -e '/\.jnilib/p' | sort | uniq | xargs file -L 2>/dev/null | grep "Mach-O.*" | cut -d: -f1)
for f in $filelist; do
libname=$(basename $f | sed -e 's;\..*;;')
soname=$(otool -l $f | grep $libname | awk '/ name/ {print $2}')
if [ "$soname" != "" ]; then
if [ ! -L $f ]; then
basename $soname
fi
else
echo ${f##*/}
fi
done | sort -u

View file

@ -0,0 +1,26 @@
#!/bin/sh
# ----------------------------------------------------------------
# find-requires for Darwin/MacOSX
# ----------------------------------------------------------------
ulimit -c 0
filelist=`sed "s/['\"]/\\\&/g"`
exelist=`echo $filelist | xargs file | fgrep Mach-O | cut -d: -f1 `
scriptlist=`echo $filelist | xargs file | egrep ":.* (commands|script) " | cut -d: -f1 `
for f in $exelist; do
if [ -x $f ]; then
otool -L $f \
| awk '/^\t/ { print }' \
| sed -n -e '/ (compatibility version .* current version .*)/p' \
| sed -e 's/ (compatibility version .* current version .*)//'
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/^\#\![ ]*//' \
| sed -n -e '/^\/bin/!p' | sed -n -e '/^\/usr\/bin/!p' | uniq \
| cut -d" " -f1
fi
done

View file

@ -0,0 +1,9 @@
#!/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

View file

@ -0,0 +1,22 @@
#!/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

View file

@ -0,0 +1,9 @@
#!/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

View file

@ -0,0 +1,46 @@
#!/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

View file

@ -0,0 +1,175 @@
#! /usr/bin/ksh
# Original Author: Tim Mooney <mooney@golem.phys.ndsu.NoDak.edu>
# $Id: hpux.prov,v 1.8 2001/09/15 13:49:11 jbj Exp $
#
# 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

126
rpm-5.4.9/autodeps/hpux.req Normal file
View file

@ -0,0 +1,126 @@
#! /usr/bin/ksh
# Original Author: Tim Mooney <mooney@golem.phys.ndsu.NoDak.edu>
# $Id: hpux.req,v 1.7 2001/09/15 13:49:11 jbj Exp $
#
# 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

View file

@ -0,0 +1,201 @@
#! /usr/bin/ksh
# Original Author: Tim Mooney <mooney@golem.phys.ndsu.NoDak.edu>
# $Id: irix6.prov,v 1.7 2001/09/15 13:49:11 jbj Exp $
#
# 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

View file

@ -0,0 +1,164 @@
#! /usr/bin/ksh
# Original Author: Tim Mooney <mooney@golem.phys.ndsu.NoDak.edu>
# $Id: irix6.req,v 1.7 2001/09/15 13:49:11 jbj Exp $
#
# 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

View file

@ -0,0 +1,70 @@
#!/bin/bash
OBJDUMP="${OBJDUMP:-objdump}"
usrlibrpm="${usrlibrpm:-/usr/lib/rpm}"
# This script reads filenames from STDIN and outputs any relevant provides
# information that needs to be included in the package.
filelist=`sed "s/['\"]/\\\&/g"`
solist=$(echo $filelist | grep "\\.so" | grep -v "^/lib/ld.so" | \
xargs file -L 2>/dev/null | grep "ELF.*shared object" | cut -d: -f1)
pythonlist=
tcllist=
rubygemlist=$(echo "$filelist"| egrep "\.gemspec$")
#
# --- Alpha does not mark 64bit dependencies
case `uname -m` in
alpha*) mark64="" ;;
*) mark64="()(64bit)" ;;
esac
#
# --- Library sonames and weak symbol versions (from glibc).
for f in $solist; do
soname=$($OBJDUMP -p $f | awk '/SONAME/ {print $2}')
lib64=`if file -L $f 2>/dev/null | \
grep "ELF 64-bit" >/dev/null; then echo "$mark64"; fi`
if [ "$soname" != "" ]; then
if [ ! -L $f ]; then
echo $soname$lib64
$OBJDUMP -p $f | awk '
BEGIN { START=0 ; }
/Version definitions:/ { START=1; }
/^[0-9]/ && (START==1) { print $4; }
/^$/ { START=0; }
' | \
grep -v $soname | \
while read symbol ; do
echo "$soname($symbol)`echo $lib64 | sed 's/()//'`"
done
fi
else
echo ${f##*/}$lib64
fi
done | sort -u
#
# --- Perl modules.
[ -x "$usrlibrpm/perl.prov" ] &&
echo $filelist | tr '[:blank:]' \\n | grep '\.pm$' | "$usrlibrpm/perl.prov" | sort -u
#
# --- Python modules.
[ -x "$usrlibrpm/python.prov" -a -n "$pythonlist" ] &&
echo $pythonlist | tr '[:blank:]' \\n | "$usrlibrpm/python.prov" | sort -u
#
# --- Tcl modules.
[ -x "$usrlibrpm/tcl.prov" -a -n "$tcllist" ] &&
echo $tcllist | tr '[:blank:]' \\n | "$usrlibrpm/tcl.prov" | sort -u
#
# --- Ruby gems.
[ -x "$usrlibrpm/rubygems.rb" -a -n "$rubygemlist" ] &&
echo $rubygemlist | tr '[:blank:]' \\n | "$usrlibrpm/rubygems.rb" --provides | sort -u
exit 0

View file

@ -0,0 +1,143 @@
#!/bin/bash
OBJDUMP="${OBJDUMP:-objdump}"
usrlibrpm="${usrlibrpm:-/usr/lib/rpm}"
#
# Auto-generate requirements for executables (both ELF and a.out) and library
# sonames, script interpreters, and perl modules.
#
ulimit -c 0
#
# --- Set needed to 0 for traditional find-requires behavior.
needed=1
if [ X"$1" = Xldd ]; then
needed=0
elif [ X"$1" = Xobjdump ]; then
needed=1
fi
#
# --- Grab the file manifest and classify files.
#filelist=`sed "s/['\"]/\\\&/g"`
filelist=`sed "s/[]['\"*?{}]/\\\\\&/g"`
exelist=`echo $filelist | xargs -r file | egrep -v ":.* (commands|script) " | \
grep ":.*executable" | cut -d: -f1`
scriptlist=`echo $filelist | xargs -r file | \
egrep ":.* (commands|script) " | cut -d: -f1`
liblist=`echo $filelist | xargs -r file | \
grep ":.*shared object" | cut -d : -f1`
interplist=
perllist=
pythonlist=
tcllist=
rubygemlist=`echo "$filelist"| egrep "\.gemspec$"`
#
# --- Alpha does not mark 64bit dependencies
case `uname -m` in
alpha*) mark64="" ;;
*) mark64="()(64bit)" ;;
esac
if [ "$needed" -eq 0 ]; then
#
# --- Executable dependency sonames.
for f in $exelist; do
[ -r $f -a -x $f ] || continue
lib64=`if file -L $f 2>/dev/null | \
grep "ELF 64-bit" >/dev/null; then echo "$mark64"; fi`
ldd $f | awk '/=>/ {
if ($1 !~ /libNoVersion.so/ && $1 !~ /4[um]lib.so/ && $1 !~ /libredhat-kernel.so/) {
gsub(/'\''"/,"\\&",$1);
printf "%s'$lib64'\n", $1
}
}'
done | xargs -r -n 1 basename | sort -u
#
# --- Library dependency sonames.
for f in $liblist; do
[ -r $f ] || continue
lib64=`if file -L $f 2>/dev/null | \
grep "ELF 64-bit" >/dev/null; then echo "$mark64"; fi`
ldd $f | awk '/=>/ {
if ($1 !~ /libNoVersion.so/ && $1 !~ /4[um]lib.so/ && $1 !~ /libredhat-kernel.so/) {
gsub(/'\''"/,"\\&",$1);
printf "%s'$lib64'\n", $1
}
}'
done | xargs -r -n 1 basename | sort -u
fi
#
# --- Script interpreters.
for f in $scriptlist; do
[ -r $f -a -x $f ] || continue
interp=`head -n 1 $f | sed -e 's/^\#\![ ]*//' | cut -d" " -f1`
interplist="$interplist $interp"
case $interp in
*/perl) perllist="$perllist $f" ;;
esac
done
[ -n "$interplist" ] && { echo "$interplist" | tr '[:blank:]' \\n | sort -u ; }
#
# --- Add perl module files to perllist.
for f in $filelist; do
[ -r $f -a "${f%.pm}" != "${f}" ] && perllist="$perllist $f"
done
#
# --- Weak symbol versions (from glibc).
[ -n "$mark64" ] && mark64="(64bit)"
for f in $liblist $exelist ; do
[ -r $f ] || continue
lib64=`if file -L $f 2>/dev/null | \
grep "ELF 64-bit" >/dev/null; then echo "$mark64"; fi`
$OBJDUMP -p $f | awk 'BEGIN { START=0; LIBNAME=""; needed='$needed'; }
/^$/ { START=0; }
/^Dynamic Section:$/ { START=1; }
(START==1) && /NEEDED/ {
if (needed) {
if ("'$lib64'" != "") {
sub(/$/, "()'$lib64'", $2) ;
}
print $2 ;
}
}
/^Version References:$/ { START=2; }
(START==2) && /required from/ {
sub(/:/, "", $3);
LIBNAME=$3;
}
(START==2) && (LIBNAME!="") && ($4!="") {
print LIBNAME "(" $4 ")'$lib64'";
}
'
done | sort -u
#
# --- Perl modules.
[ -x "$usrlibrpm/perl.req" -a -n "$perllist" ] && \
echo $perllist | tr '[:blank:]' \\n | "$usrlibrpm/perl.req" | sort -u
#
# --- Python modules.
[ -x "$usrlibrpm/python.req" -a -n "$pythonlist" ] && \
echo $pythonlist | tr '[:blank:]' \\n | "$usrlibrpm/python.req" | sort -u
#
# --- Tcl modules.
[ -x "$usrlibrpm/tcl.req" -a -n "$tcllist" ] && \
echo $tcllist | tr '[:blank:]' \\n | "$usrlibrpm/tcl.req" | sort -u
#
# --- Ruby gems
[ -x "$usrlibrpm/rubygems.rb" -a -n "$rubygemlist" ] &&
echo $rubygemlist | tr '[:blank:]' \\n | "$usrlibrpm/rubygems.rb" --requires | sort -u
exit 0

View file

@ -0,0 +1,5 @@
#!/bin/sh
#
# No shared libs on MiNT yet, sigh.
echo > /dev/null

View file

@ -0,0 +1,5 @@
#!/bin/sh
#
# No shared libs on MiNT yet, sigh.
echo > /dev/null

3
rpm-5.4.9/autodeps/none Normal file
View file

@ -0,0 +1,3 @@
#!/bin/sh
cat > /dev/null

View file

@ -0,0 +1,9 @@
#!/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

View file

@ -0,0 +1,22 @@
#!/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

188
rpm-5.4.9/autodeps/osf.prov Normal file
View file

@ -0,0 +1,188 @@
#! /usr/bin/ksh
# Original Author: Tim Mooney <mooney@golem.phys.ndsu.NoDak.edu>
# $Id: osf.prov,v 1.7 2000/10/31 20:47:23 mooney Exp $
#
# This file is distributed under the terms of the GNU Public License
#
# 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

142
rpm-5.4.9/autodeps/osf.req Normal file
View file

@ -0,0 +1,142 @@
#! /usr/bin/ksh
# Original Author: Tim Mooney <mooney@golem.phys.ndsu.NoDak.edu>
# $Id: osf.req,v 1.9 2001/09/15 13:49:11 jbj Exp $
#
# 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

View file

@ -0,0 +1,14 @@
#!/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

View file

@ -0,0 +1,16 @@
#!/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

80
rpm-5.4.9/autogen.sh Executable file
View file

@ -0,0 +1,80 @@
#!/bin/sh
# configure the requirements
AMV="automake (GNU automake) 1.12"
ACV="autoconf (GNU Autoconf) 2.69"
LTV="libtoolize (GNU libtool) 2.4"
GTT="gettextize (GNU gettext-tools) 0.18.1.1"
USAGE="
To build RPM from plain CVS sources the following
installed developer tools are mandatory:
$AMV
$ACV
$LTV
$GTT
"
# wrapper for running GNU libtool's libtoolize(1)
libtoolize () {
_libtoolize=`which glibtoolize 2>/dev/null`
_libtoolize_args="$*"
case "$_libtoolize" in
/* ) ;;
* ) _libtoolize=`which libtoolize 2>/dev/null`
case "$_libtoolize" in
/* ) ;;
* ) _libtoolize="libtoolize" ;;
esac
;;
esac
_libtoolize_version="`$_libtoolize --version | sed -e '1q' | sed -e 's;^[^0-9]*;;'`"
case "$_libtoolize_version" in
1.* ) _libtoolize_args=`echo "X$_libtoolize_args" | sed -e 's;^X;;' -e 's;--quiet;;' -e 's;--install;;'` ;;
esac
eval $_libtoolize $_libtoolize_args
}
# requirements sanity check
[ "`automake --version | head -1`" != "$AMV" ] && echo "$USAGE" # && exit 1
[ "`autoconf --version | head -1`" != "$ACV" ] && echo "$USAGE" # && exit 1
[ "`libtoolize --version | head -1`" != "$LTV" ] && echo "$USAGE" # && exit 1
[ "`gettextize --version | head -1 | sed -e 's;^.*/\\(gettextize\\);\\1;'`" != "$GTT" ] && echo "$USAGE" # && exit 1
for dir in bash beecrypt file gpsee libgit2 neon pcre popt rc syck xar xz; do
[ -d $dir ] || continue
echo "===> $dir"
case $dir in
libgit2)
( cd $dir && cmake . &&
echo "check: test" >> Makefile &&
echo "distclean: clean" >> Makefile
)
;;
*)
( cd $dir && sh ./autogen.sh --noconfigure "$@" )
;;
esac
echo "<=== $dir"
done
echo "===> rpm"
rm -rf autom4te.cache || true
echo "---> generate files via GNU libtool (libtoolize)"
libtoolize --quiet --copy --force --install
echo "---> generate files via GNU gettext (autopoint)"
po_dir=./po
LANG=C
ls "$po_dir"/*.po 2>/dev/null |
sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS"
autopoint --force
echo "---> generate files via GNU autoconf (aclocal, autoheader)"
rm -f aclocal.m4
aclocal -I m4
autoheader -I m4
echo "---> generate files via GNU automake (automake)"
automake -Wall -Wno-override -a -c
echo "---> generate files via GNU autoconf (autoconf)"
autoconf -I m4
echo "<=== rpm"

369
rpm-5.4.9/build.c Normal file
View file

@ -0,0 +1,369 @@
/** \ingroup rpmcli
* Parse spec file and build package.
*/
#include "system.h"
#include <rpmio.h>
#include <rpmiotypes.h>
#include <rpmcb.h>
#include <rpmurl.h>
#include <rpmtypes.h>
#include <rpmtag.h>
#include <rpmbuild.h>
#include "rpmps.h"
#include "rpmte.h"
#include "rpmts.h"
#include "build.h"
#include <rpmcli.h>
#include "debug.h"
/*@access rpmts @*/ /* XXX compared with NULL @*/
/*@access rpmdb @*/ /* XXX compared with NULL @*/
/*@access FD_t @*/ /* XXX compared with NULL @*/
#ifdef __cplusplus
#define QVA_ISSET(_qvaflags, _FLAG) ((_qvaflags) & (VERIFY_##_FLAG))
#define VSF_ISSET(_vsflags, _FLAG) ((_vsflags) & (RPMVSF_##_FLAG))
#define VSF_SET(_vsflags, _FLAG) \
(*((unsigned *)&(_vsflags)) |= (RPMVSF_##_FLAG))
#define VSF_CLR(_vsflags, _FLAG) \
(*((unsigned *)&(_vsflags)) &= ~(RPMVSF_##_FLAG))
#else /* __cplusplus */
#define QVA_ISSET(_qvaflags, _FLAG) ((_qvaflags) & (VERIFY_##_FLAG))
#define VSF_ISSET(_vsflags, _FLAG) ((_vsflags) & (RPMVSF_##_FLAG))
#define VSF_SET(_vsflags, _FLAG) (_vsflags) |= (RPMVSF_##_FLAG)
#define VSF_CLR(_vsflags, _FLAG) (_vsflags) &= ~(RPMVSF_##_FLAG)
#endif /* __cplusplus */
/**
*/
static int checkSpec(rpmts ts, Header h)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies ts, h, rpmGlobalMacroContext, fileSystem, internalState @*/
{
int rc;
if (!headerIsEntry(h, RPMTAG_REQUIRENAME)
&& !headerIsEntry(h, RPMTAG_CONFLICTNAME))
return 0;
rc = rpmtsAddInstallElement(ts, h, NULL, 0, NULL);
rc = rpmcliInstallProblems(ts, _("Failed build dependencies"), rpmtsCheck(ts));
/* XXX nuke the added package. */
rpmtsClean(ts);
return rc;
}
/*
* Kurwa, durni ameryka?ce sobe zawsze my?l?, ?e ca?y ?wiat mówi po
* angielsku...
*/
/* XXX this is still a dumb test but at least it's i18n aware */
/**
*/
static int isSpecFile(const char * specfile)
/*@globals h_errno, fileSystem, internalState @*/
/*@modifies fileSystem, internalState @*/
{
char buf[256];
const char * s;
FD_t fd;
int count;
int checking;
fd = Fopen(specfile, "r");
if (fd == NULL || Ferror(fd)) {
rpmlog(RPMLOG_ERR, _("Unable to open spec file %s: %s\n"),
specfile, Fstrerror(fd));
return 0;
}
count = Fread(buf, sizeof(buf[0]), sizeof(buf), fd);
(void) Fclose(fd);
checking = 1;
for (s = buf; count--; s++) {
switch (*s) {
case '\r':
case '\n':
checking = 1;
/*@switchbreak@*/ break;
case ':':
checking = 0;
/*@switchbreak@*/ break;
/*@-boundsread@*/
default:
if (checking && !(isprint(*s) || isspace(*s))) return 0;
/*@switchbreak@*/ break;
/*@=boundsread@*/
}
}
return 1;
}
/**
*/
/*@-boundswrite@*/
static int buildForTarget(rpmts ts, BTA_t ba)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/
{
const char * passPhrase = ba->passPhrase;
const char * cookie = ba->cookie;
int buildAmount = ba->buildAmount;
const char * specFile = NULL;
const char * specURL = NULL;
int specut;
const char * s;
char * se;
const char * arg = ba->specFile;
size_t nb = strlen(arg) + BUFSIZ;
char * buf = (char *) alloca(nb);
Spec spec = NULL;
int verify = ((ba->buildAmount & RPMBUILD_TRACK) ? 0 : 1);
int xx;
int rc;
if (ba->buildMode == 't') {
static const char * sfpats[] = { "Specfile", "\\*.spec", NULL };
static const char _specfn[] = "%{mkstemp:%{_specdir}/rpm-spec.XXXXXX}";
char * tmpSpecFile = (char *) rpmGetPath(_specfn, NULL);
FILE *fp;
int bingo = 0;
int i;
for (i = 0; sfpats[i]; i++) {
se = rpmExpand("%{uncompress: %{u2p:", arg, "}}",
" | %{__tar} -xOvf - %{?__tar_wildcards} ", sfpats[i],
" 2>&1 > '", tmpSpecFile, "'", NULL);
fp = popen(se, "r");
se = _free(se);
if (fp== NULL)
continue;
s = fgets(buf, nb - 1, fp);
xx = pclose(fp);
if (!s || !*s || strstr(s, ": Not found in archive"))
continue;
bingo = 1;
break;
}
if (!bingo) {
rpmlog(RPMLOG_ERR, _("Failed to read spec file from %s\n"), arg);
xx = Unlink(tmpSpecFile);
tmpSpecFile = _free(tmpSpecFile);
return 1;
}
s = se = basename(buf);
se += strlen(se);
while (--se > s && strchr("\r\n", *se) != NULL)
*se = '\0';
specURL = rpmGetPath("%{_specdir}/", s, NULL);
specut = urlPath(specURL, &specFile);
xx = Rename(tmpSpecFile, specFile);
if (xx) {
rpmlog(RPMLOG_ERR, _("Failed to rename %s to %s: %m\n"),
tmpSpecFile, s);
(void) Unlink(tmpSpecFile);
}
tmpSpecFile = _free(tmpSpecFile);
if (xx)
return 1;
se = buf; *se = '\0';
se = stpcpy(se, "_sourcedir ");
(void) urlPath(arg, &s);
if (*s != '/') {
if (getcwd(se, nb - sizeof("_sourcedir ")) != NULL)
se += strlen(se);
else
se = stpcpy(se, ".");
} else
se = stpcpy(se, dirname(strcpy(se, s)));
while (se > buf && se[-1] == '/')
*se-- = '0';
rpmCleanPath(buf + sizeof("_sourcedir ") - 1);
rpmDefineMacro(NULL, buf, RMIL_TARBALL);
} else {
specut = urlPath(arg, &s);
se = buf; *se = '\0';
if (*s != '/') {
if (getcwd(se, nb - sizeof("_sourcedir ")) != NULL)
se += strlen(se);
else
se = stpcpy(se, ".");
*se++ = '/';
se += strlen(strcpy(se,strcpy(se, s)));
} else
se = stpcpy(se, s);
specURL = rpmGetPath(buf, NULL);
specut = urlPath(specURL, &specFile);
}
if (specut != URL_IS_DASH) {
struct stat sb;
if (Stat(specURL, &sb) < 0) {
rpmlog(RPMLOG_ERR, _("failed to stat %s: %m\n"), specURL);
rc = 1;
goto exit;
}
if (! S_ISREG(sb.st_mode)) {
rpmlog(RPMLOG_ERR, _("File %s is not a regular file.\n"),
specURL);
rc = 1;
goto exit;
}
/* Try to verify that the file is actually a specfile */
if (!isSpecFile(specURL)) {
rpmlog(RPMLOG_ERR,
_("File %s does not appear to be a specfile.\n"), specURL);
rc = 1;
goto exit;
}
}
/* Parse the spec file */
#define _anyarch(_f) \
(((_f)&(RPMBUILD_PREP|RPMBUILD_BUILD|RPMBUILD_INSTALL|RPMBUILD_PACKAGEBINARY)) == 0)
if (parseSpec(ts, specURL, ba->rootdir, 0, passPhrase,
cookie, _anyarch(buildAmount), 0, verify))
{
rc = 1;
goto exit;
}
#undef _anyarch
if ((spec = rpmtsSetSpec(ts, NULL)) == NULL) {
rc = 1;
goto exit;
}
/* Assemble source header from parsed components */
xx = initSourceHeader(spec, NULL);
/* Check build prerequisites */
if (!ba->noDeps && checkSpec(ts, spec->sourceHeader)) {
rc = 1;
goto exit;
}
if (buildSpec(ts, spec, buildAmount, ba->noBuild)) {
rc = 1;
goto exit;
}
if (ba->buildMode == 't')
(void) Unlink(specURL);
rc = 0;
exit:
spec = freeSpec(spec);
specURL = _free(specURL);
return rc;
}
/*@=boundswrite@*/
int build(rpmts ts, BTA_t ba, const char * rcfile)
{
const char *t, *te;
int rc = 0;
const char * targets = rpmcliTargets;
char *target;
#define buildCleanMask (RPMBUILD_RMSOURCE|RPMBUILD_RMSPEC)
int cleanFlags = ba->buildAmount & buildCleanMask;
rpmVSFlags vsflags, ovsflags;
int nbuilds = 0;
vsflags = (rpmVSFlags) rpmExpandNumeric("%{?_vsflags_build}");
vsflags = (rpmVSFlags) 0; /* XXX FIXME: ignore default disablers. */
#if defined(SUPPORT_NOSIGNATURES)
if (!QVA_ISSET(ba->qva_flags, DIGEST)) {
VSF_SET(vsflags, NOSHA1HEADER);
VSF_SET(vsflags, NOMD5HEADER);
VSF_SET(vsflags, NOSHA1);
VSF_SET(vsflags, NOMD5);
}
if (!QVA_ISSET(ba->qva_flags, SIGNATURE)) {
VSF_SET(vsflags, NODSAHEADER);
VSF_SET(vsflags, NORSAHEADER);
VSF_SET(vsflags, NODSA);
VSF_SET(vsflags, NORSA);
}
if (!QVA_ISSET(ba->qva_flags, HDRCHK)) {
VSF_SET(vsflags, NOHDRCHK);
}
VSF_CLR(vsflags, NEEDPAYLOAD); /* XXX needed? */
#endif
ovsflags = rpmtsSetVSFlags(ts, vsflags);
if (targets == NULL) {
rc = buildForTarget(ts, ba);
nbuilds++;
goto exit;
}
/* parse up the build operators */
printf(_("Building target platforms: %s\n"), targets);
ba->buildAmount &= ~buildCleanMask;
for (t = targets; *t != '\0'; t = te) {
/* Parse out next target platform. */
if ((te = strchr(t, ',')) == NULL)
te = t + strlen(t);
target = (char *) alloca(te-t+1);
strncpy(target, t, (te-t));
target[te-t] = '\0';
if (*te != '\0')
te++;
else /* XXX Perform clean-up after last target build. */
ba->buildAmount |= cleanFlags;
rpmlog(RPMLOG_DEBUG, _(" target platform: %s\n"), target);
/* Read in configuration for target. */
if (t != targets) {
rpmFreeMacros(NULL);
rpmFreeRpmrc();
(void) rpmReadConfigFiles(rcfile, target);
}
rc = buildForTarget(ts, ba);
nbuilds++;
if (rc)
break;
}
exit:
/* Restore original configuration. */
if (nbuilds > 1) {
t = targets;
if ((te = strchr(t, ',')) == NULL)
te = t + strlen(t);
target = (char *) alloca(te-t+1);
strncpy(target, t, (te-t));
target[te-t] = '\0';
if (*te != '\0')
te++;
rpmFreeMacros(NULL);
rpmFreeRpmrc();
(void) rpmReadConfigFiles(rcfile, target);
}
vsflags = rpmtsSetVSFlags(ts, ovsflags);
return rc;
}

19
rpm-5.4.9/build.h Normal file
View file

@ -0,0 +1,19 @@
#ifndef H_BUILD
#define H_BUILD
#ifdef __cplusplus
extern "C" {
#endif
int build(rpmts ts, BTA_t ba, /*@null@*/ const char * rcfile)
/*@globals rpmGlobalMacroContext, rpmCLIMacroContext,
h_errno, fileSystem, internalState @*/
/*@modifies ts, ba->buildAmount, rpmGlobalMacroContext, rpmCLIMacroContext,
fileSystem, internalState @*/;
#ifdef __cplusplus
}
#endif
#endif

126
rpm-5.4.9/build/Makefile.am Normal file
View file

@ -0,0 +1,126 @@
# Makefile for rpmbuild library.
AUTOMAKE_OPTIONS = 1.4 foreign
LINT = splint
MCCABE = pmccabe
EXTRA_DIST = librpmbuild.vers
SUBDIRS = auto # tests
AM_CPPFLAGS = \
-I$(srcdir) \
-I$(top_srcdir) \
-I$(top_srcdir)/build \
-I$(top_srcdir)/lib \
-I$(top_builddir)/lib \
-I$(top_srcdir)/rpmdb \
-I$(top_srcdir)/rpmio \
-I$(top_srcdir)/misc \
@WITH_DB_CPPFLAGS@ \
@WITH_FILE_CPPFLAGS@ \
@WITH_LUA_CPPFLAGS@ \
@WITH_PCRE_CPPFLAGS@ \
@WITH_POPT_CPPFLAGS@ \
@WITH_XAR_CPPFLAGS@ \
@WITH_ZLIB_CPPFLAGS@
AM_CFLAGS = $(OPENMP_CFLAGS)
pkgincdir = $(pkgincludedir)$(WITH_PATH_VERSIONED_SUFFIX)
pkginc_HEADERS = rpmbuild.h rpmspec.h
noinst_HEADERS = buildio.h
usrlibdir = $(libdir)
usrlib_LTLIBRARIES = librpmbuild.la
librpmbuild_la_SOURCES = \
build.c expression.c files.c misc.c names.c pack.c \
parseBuildInstallClean.c parseChangelog.c parseDescription.c \
parseFiles.c parsePreamble.c parsePrep.c parseReqs.c parseScript.c \
parseSpec.c poptBT.c reqprov.c spec.c
librpmbuild_la_LDFLAGS = -release $(LT_CURRENT).$(LT_REVISION)
if HAVE_LD_VERSION_SCRIPT
librpmbuild_la_LDFLAGS += -Wl,@LD_VERSION_SCRIPT_FLAG@,@top_srcdir@/build/librpmbuild.vers
endif
librpmbuild_la_LIBADD =
if ENABLE_BUILD_INTLIBDEP
librpmbuild_la_LIBADD += \
$(top_builddir)/lib/librpm.la \
$(top_builddir)/rpmdb/librpmdb.la \
$(top_builddir)/rpmio/librpmio.la \
$(top_builddir)/misc/librpmmisc.la
endif
if ENABLE_BUILD_MAXEXTLIBDEP
librpmbuild_la_LDFLAGS += $(LDFLAGS)
librpmbuild_la_LIBADD += $(LIBS)
endif
librpmbuild.la: $(librpmbuild_la_OBJECTS) $(librpmbuild_la_DEPENDENCIES)
$(librpmbuild_la_LINK) -rpath $(usrlibdir) $(librpmbuild_la_OBJECTS) $(librpmbuild_la_LIBADD)
install-data-hook:
if !ENABLE_BUILD_LAFILES
-for l in $(usrlib_LTLIBRARIES); do \
rm -f $(DESTDIR)$(usrlibdir)/$${l}; \
done
endif
if WITH_PATH_VERSIONED
-for l in $(usrlib_LTLIBRARIES); do \
base=`echo "$${l}" | sed -e 's;\.la$$;;'`; \
if [ -f $(DESTDIR)$(usrlibdir)/$${base}.a ]; then \
mv $(DESTDIR)$(usrlibdir)/$${base}.a \
$(DESTDIR)$(usrlibdir)/$${base}-$(VERSION).a; \
fi; \
done
endif
check-local:
clean-local:
rm -f *.o # .created $(FILELOBJS)
#BUILT_SOURCES = rpmbuild.lcd
rpmbuild.lcd: Makefile.am ${librpmbuild_la_SOURCES} ${pkginc_HEADERS} ${noinst_HEADERS}
-lclint ${DEFS} ${INCLUDES} ${librpmbuild_la_SOURCES} -dump $@ 2>/dev/null
.PHONY: sources
sources:
@echo $(librpmbuild_la_SOURCES:%=build/%)
.PHONY: lint
lint:
$(LINT) ${DEFS} ${INCLUDES} ${librpmbuild_la_SOURCES}
.PHONY: mccabe
mccabe:
$(MCCABE) $(librpmbuild_la_SOURCES) | sort -n -r | head -n 20
.PHONY: lcov-reset # run lcov from scratch, always
lcov-reset:
make lcov-run
make lcov-report
.PHONY: lcov # run lcov from scratch if the dir is not there
lcov:
make lcov-reset
.PHONY: lcov-run # reset run coverage tests
lcov-run:
@-rm -rf lcov
find . -name "*.gcda" -exec rm {} \;
make check
.PHONY: lcov-report # generate report based on current coverage data
lcov-report:
mkdir lcov
lcov --directory . --capture --output-file lcov/lcov.info
lcov -l lcov/lcov.info | grep -v "`cd $(top_srcdir) && pwd`" | cut -d: -f1 > lcov/remove
lcov -r lcov/lcov.info `cat lcov/remove` > lcov/lcov.cleaned.info
rm lcov/remove
mv lcov/lcov.cleaned.info lcov/lcov.info
genhtml -t "$(PACKAGE_STRING)" -o lcov lcov/lcov.info
#.PHONY: lcov-upload
#lcov-upload: lcov
# rsync -rvz -e ssh --delete lcov/* ???

1197
rpm-5.4.9/build/Makefile.in Normal file

File diff suppressed because it is too large Load diff

40
rpm-5.4.9/build/TODO Normal file
View file

@ -0,0 +1,40 @@
>I just found an odd little bug in rpm 2.5, when there is something like
>
>%doc readme
>
>in the %files list, then if readme doesn't exit, rpm will just put an empty
>doc directory in the package.
option to %setup to *not* do chown/chgrp/chmod
> Most of my spec files have empty Distribution: and Vendor: tag because I
> really don't care. Now, empty tags are frowned upon. So, I try to comment
> out the lines and get a funny error message:
>
> Distribution field must be present in package: solaris2.6
> Vendor field must be present in package: solaris2.6
>
> This happens to be my value of 'Build Os' which gets into the error message!
posix %attr
some /foo/*/*.foo entries don't get matches
detect multiple summary/description entries
verify langs
remove prefix stuff from files.c (not used anymore)
i18n strings
=====================================================================
triggers
custom find-requires, find-provides
messages (normal, verbose, debug)
deprecate require_distribution, require_icon, require_vendor
deprecate RPMVAR_ROOT, and the RPMVAR_REQUIRE* stuff above

View file

@ -0,0 +1,22 @@
AUTOMAKE_OPTIONS = 1.4 foreign
EXTRA_DIST = types desc
# http://forge.ispras.ru/projects/abi-compliance-checker
ABITEST = @abs_top_srcdir@/scripts/abi-check/abi-compliance-checker.pl
# http://forge.ispras.ru/projects/api-sanity-autotest
AUTOTEST = @abs_top_srcdir@/scripts/api-sanity-checker.pl
TDIRS = descriptors_storage header_compile_errors test_results tests
desc.xml: desc
cp $< $@
clean-local:
rm -rf $(TDIRS) desc.xml
check-local: desc.xml
-[ -d tests ] && ${AUTOTEST} -l build -d desc.xml -clean
-${AUTOTEST} -l build -d desc.xml -st types -td test_data \
-gen -splint-specs -build -run

View file

@ -0,0 +1,738 @@
# Makefile.in generated by automake 1.11.4 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__make_dryrun = \
{ \
am__dry=no; \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
esac; \
test $$am__dry = yes; \
}
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = build/auto
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/desc.in $(srcdir)/types.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = desc types
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILDROOTDIR_MACRO = @BUILDROOTDIR_MACRO@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DBAPI = @DBAPI@
DBLIBOBJS = @DBLIBOBJS@
DBLIBSRCS = @DBLIBSRCS@
DBPATH = @DBPATH@
DBPATH_MACRO = @DBPATH_MACRO@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DISTRO_MACROS = @DISTRO_MACROS@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
FIXPERMS = @FIXPERMS@
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@
GPSEE_MODULES_PATH = @GPSEE_MODULES_PATH@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLLIBS = @INTLLIBS@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LDFLAGS_STATIC = @LDFLAGS_STATIC@
LD_VERSION_SCRIPT_FLAG = @LD_VERSION_SCRIPT_FLAG@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBTOOLIZE = @LIBTOOLIZE@
LIPO = @LIPO@
LN_S = @LN_S@
LOCALEDIR = @LOCALEDIR@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
LT_AGE = @LT_AGE@
LT_CURRENT = @LT_CURRENT@
LT_REVISION = @LT_REVISION@
MACROFILES = @MACROFILES@
MAGIC_MACRO = @MAGIC_MACRO@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
NCPUS_COMMAND = @NCPUS_COMMAND@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPENMP_CFLAGS = @OPENMP_CFLAGS@
OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PERL_INSTALLDIRS = @PERL_INSTALLDIRS@
PERL_URPM_INSTALLDIRS = @PERL_URPM_INSTALLDIRS@
PKGSRCDIR = @PKGSRCDIR@
PKGSRCDIR_MACRO = @PKGSRCDIR_MACRO@
POSUB = @POSUB@
PYTHON = @PYTHON@
PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
PYTHON_PREFIX = @PYTHON_PREFIX@
PYTHON_VERSION = @PYTHON_VERSION@
RANLIB = @RANLIB@
ROOT_GROUP = @ROOT_GROUP@
RPMCANONARCH = @RPMCANONARCH@
RPMCANONCOLOR = @RPMCANONCOLOR@
RPMCANONGNU = @RPMCANONGNU@
RPMCANONOS = @RPMCANONOS@
RPMCANONVENDOR = @RPMCANONVENDOR@
RPMGID = @RPMGID@
RPMGROUP = @RPMGROUP@
RPMLUAFILES = @RPMLUAFILES@
RPMPOPTFILES = @RPMPOPTFILES@
RPMUID = @RPMUID@
RPMUSER = @RPMUSER@
RPM_TIMESTAMP = @RPM_TIMESTAMP@
RPM_VENDOR = @RPM_VENDOR@
RPM_VERSION = @RPM_VERSION@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
SYSCONFIGDIR = @SYSCONFIGDIR@
USE_NLS = @USE_NLS@
USRLIBRPM = @USRLIBRPM@
VERSION = @VERSION@
WITH_ACL = @WITH_ACL@
WITH_APIDOCS = @WITH_APIDOCS@
WITH_APIDOCS_TARGET = @WITH_APIDOCS_TARGET@
WITH_APR = @WITH_APR@
WITH_ATERM = @WITH_ATERM@
WITH_ATTR = @WITH_ATTR@
WITH_AUGEAS = @WITH_AUGEAS@
WITH_AUGEAS_AUGTOOL = @WITH_AUGEAS_AUGTOOL@
WITH_BASH = @WITH_BASH@
WITH_BASH_CPPFLAGS = @WITH_BASH_CPPFLAGS@
WITH_BASH_LDFLAGS = @WITH_BASH_LDFLAGS@
WITH_BASH_LIBS = @WITH_BASH_LIBS@
WITH_BASH_SUBDIR = @WITH_BASH_SUBDIR@
WITH_BEECRYPT = @WITH_BEECRYPT@
WITH_BEECRYPT_CPPFLAGS = @WITH_BEECRYPT_CPPFLAGS@
WITH_BEECRYPT_LDFLAGS = @WITH_BEECRYPT_LDFLAGS@
WITH_BEECRYPT_LIBS = @WITH_BEECRYPT_LIBS@
WITH_BEECRYPT_SUBDIR = @WITH_BEECRYPT_SUBDIR@
WITH_BZIP2 = @WITH_BZIP2@
WITH_CPUINFO = @WITH_CPUINFO@
WITH_CUDF = @WITH_CUDF@
WITH_CUDF_CUDFTOOL = @WITH_CUDF_CUDFTOOL@
WITH_DB = @WITH_DB@
WITH_DBSQL = @WITH_DBSQL@
WITH_DBSQL_CPPFLAGS = @WITH_DBSQL_CPPFLAGS@
WITH_DBSQL_LDFLAGS = @WITH_DBSQL_LDFLAGS@
WITH_DBSQL_LIBS = @WITH_DBSQL_LIBS@
WITH_DBSQL_SUBDIR = @WITH_DBSQL_SUBDIR@
WITH_DB_CPPFLAGS = @WITH_DB_CPPFLAGS@
WITH_DB_LDFLAGS = @WITH_DB_LDFLAGS@
WITH_DB_LIBS = @WITH_DB_LIBS@
WITH_DB_SUBDIR = @WITH_DB_SUBDIR@
WITH_DMALLOC = @WITH_DMALLOC@
WITH_EFENCE = @WITH_EFENCE@
WITH_EXPAT = @WITH_EXPAT@
WITH_FICL = @WITH_FICL@
WITH_FICL_CPPFLAGS = @WITH_FICL_CPPFLAGS@
WITH_FICL_LDFLAGS = @WITH_FICL_LDFLAGS@
WITH_FICL_LIBS = @WITH_FICL_LIBS@
WITH_FICL_SUBDIR = @WITH_FICL_SUBDIR@
WITH_FILE = @WITH_FILE@
WITH_FILE_CPPFLAGS = @WITH_FILE_CPPFLAGS@
WITH_FILE_LDFLAGS = @WITH_FILE_LDFLAGS@
WITH_FILE_LIBS = @WITH_FILE_LIBS@
WITH_FILE_SUBDIR = @WITH_FILE_SUBDIR@
WITH_GCRYPT = @WITH_GCRYPT@
WITH_GNUTLS = @WITH_GNUTLS@
WITH_GPSEE = @WITH_GPSEE@
WITH_GPSEE_CPPFLAGS = @WITH_GPSEE_CPPFLAGS@
WITH_GPSEE_LDFLAGS = @WITH_GPSEE_LDFLAGS@
WITH_GPSEE_LIBS = @WITH_GPSEE_LIBS@
WITH_GPSEE_SUBDIR = @WITH_GPSEE_SUBDIR@
WITH_JS_SUBDIR = @WITH_JS_SUBDIR@
WITH_KEYUTILS = @WITH_KEYUTILS@
WITH_KEYUTILS_RPMKEY = @WITH_KEYUTILS_RPMKEY@
WITH_LIBELF_DEBUGEDIT = @WITH_LIBELF_DEBUGEDIT@
WITH_LIBGIT2 = @WITH_LIBGIT2@
WITH_LIBGIT2_CPPFLAGS = @WITH_LIBGIT2_CPPFLAGS@
WITH_LIBGIT2_LDFLAGS = @WITH_LIBGIT2_LDFLAGS@
WITH_LIBGIT2_LIBS = @WITH_LIBGIT2_LIBS@
WITH_LIBGIT2_SUBDIR = @WITH_LIBGIT2_SUBDIR@
WITH_LIBTASN1 = @WITH_LIBTASN1@
WITH_LUA = @WITH_LUA@
WITH_LUA_CPPFLAGS = @WITH_LUA_CPPFLAGS@
WITH_LUA_LDFLAGS = @WITH_LUA_LDFLAGS@
WITH_LUA_LIBS = @WITH_LUA_LIBS@
WITH_LUA_SUBDIR = @WITH_LUA_SUBDIR@
WITH_LUA_SUBDIR_DEF = @WITH_LUA_SUBDIR_DEF@
WITH_LUA_SUBDIR_LIB = @WITH_LUA_SUBDIR_LIB@
WITH_MOZJS185 = @WITH_MOZJS185@
WITH_MOZJS185_CPPFLAGS = @WITH_MOZJS185_CPPFLAGS@
WITH_MOZJS185_LDFLAGS = @WITH_MOZJS185_LDFLAGS@
WITH_MOZJS185_LIBS = @WITH_MOZJS185_LIBS@
WITH_MOZJS185_SUBDIR = @WITH_MOZJS185_SUBDIR@
WITH_NEON = @WITH_NEON@
WITH_NEON_CPPFLAGS = @WITH_NEON_CPPFLAGS@
WITH_NEON_LDFLAGS = @WITH_NEON_LDFLAGS@
WITH_NEON_LIBS = @WITH_NEON_LIBS@
WITH_NEON_SUBDIR = @WITH_NEON_SUBDIR@
WITH_NIX = @WITH_NIX@
WITH_NSS = @WITH_NSS@
WITH_OPENSSL = @WITH_OPENSSL@
WITH_PAKCHOIS = @WITH_PAKCHOIS@
WITH_PATH_VERSIONED = @WITH_PATH_VERSIONED@
WITH_PATH_VERSIONED_SUFFIX = @WITH_PATH_VERSIONED_SUFFIX@
WITH_PCRE = @WITH_PCRE@
WITH_PCRE_CPPFLAGS = @WITH_PCRE_CPPFLAGS@
WITH_PCRE_LDFLAGS = @WITH_PCRE_LDFLAGS@
WITH_PCRE_LIBS = @WITH_PCRE_LIBS@
WITH_PCRE_SUBDIR = @WITH_PCRE_SUBDIR@
WITH_PERLEMBED = @WITH_PERLEMBED@
WITH_PERL_LIBS = @WITH_PERL_LIBS@
WITH_PERL_SUBDIR = @WITH_PERL_SUBDIR@
WITH_PERL_SUBPACKAGE = @WITH_PERL_SUBPACKAGE@
WITH_PERL_URPM_LIBS = @WITH_PERL_URPM_LIBS@
WITH_PERL_URPM_SUBDIR = @WITH_PERL_URPM_SUBDIR@
WITH_PERL_URPM_SUBPACKAGE = @WITH_PERL_URPM_SUBPACKAGE@
WITH_POPT = @WITH_POPT@
WITH_POPT_CPPFLAGS = @WITH_POPT_CPPFLAGS@
WITH_POPT_LDFLAGS = @WITH_POPT_LDFLAGS@
WITH_POPT_LIBS = @WITH_POPT_LIBS@
WITH_POPT_SUBDIR = @WITH_POPT_SUBDIR@
WITH_PYTHONEMBED = @WITH_PYTHONEMBED@
WITH_PYTHON_INCDIR = @WITH_PYTHON_INCDIR@
WITH_PYTHON_SUBDIR = @WITH_PYTHON_SUBDIR@
WITH_PYTHON_SUBPACKAGE = @WITH_PYTHON_SUBPACKAGE@
WITH_RC = @WITH_RC@
WITH_RC_CPPFLAGS = @WITH_RC_CPPFLAGS@
WITH_RC_LDFLAGS = @WITH_RC_LDFLAGS@
WITH_RC_LIBS = @WITH_RC_LIBS@
WITH_RC_SUBDIR = @WITH_RC_SUBDIR@
WITH_READLINE = @WITH_READLINE@
WITH_RUBY = @WITH_RUBY@
WITH_RUBY_CPPFLAGS = @WITH_RUBY_CPPFLAGS@
WITH_RUBY_SUBDIR = @WITH_RUBY_SUBDIR@
WITH_RUBY_VENDORARCHDIR = @WITH_RUBY_VENDORARCHDIR@
WITH_SELINUX = @WITH_SELINUX@
WITH_SEMANAGE = @WITH_SEMANAGE@
WITH_SEMANAGE_SEMODULE = @WITH_SEMANAGE_SEMODULE@
WITH_SEPOL = @WITH_SEPOL@
WITH_SPIDERMONKEY_SUBDIR = @WITH_SPIDERMONKEY_SUBDIR@
WITH_SQLITE = @WITH_SQLITE@
WITH_SQLITE_CPPFLAGS = @WITH_SQLITE_CPPFLAGS@
WITH_SQLITE_LDFLAGS = @WITH_SQLITE_LDFLAGS@
WITH_SQLITE_LIBS = @WITH_SQLITE_LIBS@
WITH_SQLITE_SUBDIR = @WITH_SQLITE_SUBDIR@
WITH_SQUIRREL = @WITH_SQUIRREL@
WITH_SUBVERSION = @WITH_SUBVERSION@
WITH_SYCK = @WITH_SYCK@
WITH_SYCK_CPPFLAGS = @WITH_SYCK_CPPFLAGS@
WITH_SYCK_LDFLAGS = @WITH_SYCK_LDFLAGS@
WITH_SYCK_LIBS = @WITH_SYCK_LIBS@
WITH_SYCK_SUBDIR = @WITH_SYCK_SUBDIR@
WITH_TCL = @WITH_TCL@
WITH_TCL_SUBDIR = @WITH_TCL_SUBDIR@
WITH_TOMCRYPT = @WITH_TOMCRYPT@
WITH_TPM = @WITH_TPM@
WITH_UNIXODBC = @WITH_UNIXODBC@
WITH_UUID = @WITH_UUID@
WITH_XAR = @WITH_XAR@
WITH_XAR_CPPFLAGS = @WITH_XAR_CPPFLAGS@
WITH_XAR_LDFLAGS = @WITH_XAR_LDFLAGS@
WITH_XAR_LIBS = @WITH_XAR_LIBS@
WITH_XAR_SUBDIR = @WITH_XAR_SUBDIR@
WITH_XZ = @WITH_XZ@
WITH_XZ_CPPFLAGS = @WITH_XZ_CPPFLAGS@
WITH_XZ_LDFLAGS = @WITH_XZ_LDFLAGS@
WITH_XZ_LIBS = @WITH_XZ_LIBS@
WITH_XZ_SUBDIR = @WITH_XZ_SUBDIR@
WITH_ZLIB = @WITH_ZLIB@
WITH_ZLIB_CPPFLAGS = @WITH_ZLIB_CPPFLAGS@
WITH_ZLIB_LDFLAGS = @WITH_ZLIB_LDFLAGS@
WITH_ZLIB_LIBS = @WITH_ZLIB_LIBS@
WITH_ZLIB_SUBDIR = @WITH_ZLIB_SUBDIR@
XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
YACC = @YACC@
YFLAGS = @YFLAGS@
__BASH = @__BASH@
__BZIP2 = @__BZIP2@
__CAT = @__CAT@
__CHATTR = @__CHATTR@
__CHGRP = @__CHGRP@
__CHGRP_RHF = @__CHGRP_RHF@
__CHMOD = @__CHMOD@
__CHOWN = @__CHOWN@
__CHOWN_RHF = @__CHOWN_RHF@
__CMAKE = @__CMAKE@
__CPIO = @__CPIO@
__CURL = @__CURL@
__CVS = @__CVS@
__DBSQL = @__DBSQL@
__DB_ARCHIVE = @__DB_ARCHIVE@
__DB_CHECKPOINT = @__DB_CHECKPOINT@
__DB_DEADLOCK = @__DB_DEADLOCK@
__DB_DUMP = @__DB_DUMP@
__DB_HOTBACKUP = @__DB_HOTBACKUP@
__DB_LOAD = @__DB_LOAD@
__DB_LOG_VERIFY = @__DB_LOG_VERIFY@
__DB_PRINTLOG = @__DB_PRINTLOG@
__DB_RECOVER = @__DB_RECOVER@
__DB_REPLICATE = @__DB_REPLICATE@
__DB_SQL_CODEGEN = @__DB_SQL_CODEGEN@
__DB_STAT = @__DB_STAT@
__DB_TUNER = @__DB_TUNER@
__DB_UPGRADE = @__DB_UPGRADE@
__DB_VERIFY = @__DB_VERIFY@
__DIFF = @__DIFF@
__DITTO = @__DITTO@
__DOXYGEN = @__DOXYGEN@
__FILE = @__FILE@
__GIT = @__GIT@
__GPG = @__GPG@
__GSR = @__GSR@
__GST_INSPECT = @__GST_INSPECT@
__GZIP = @__GZIP@
__HG = @__HG@
__ID = @__ID@
__ID_U = @__ID_U@
__INSTALL = @__INSTALL@
__INSTALL_INFO = @__INSTALL_INFO@
__LD = @__LD@
__LDCONFIG = @__LDCONFIG@
__LN = @__LN@
__LRZIP = @__LRZIP@
__LSATTR = @__LSATTR@
__LZIP = @__LZIP@
__LZMA = @__LZMA@
__LZOP = @__LZOP@
__MAKE = @__MAKE@
__MKDIR = @__MKDIR@
__MKDIR_P = @__MKDIR_P@
__MODINFO = @__MODINFO@
__MONGO = @__MONGO@
__MV = @__MV@
__NM = @__NM@
__OBJCOPY = @__OBJCOPY@
__OBJDUMP = @__OBJDUMP@
__PATCH = @__PATCH@
__PAX = @__PAX@
__PERL = @__PERL@
__PGP = @__PGP@
__PHP = @__PHP@
__PYTHON = @__PYTHON@
__RM = @__RM@
__RMDIR = @__RMDIR@
__RSH = @__RSH@
__RUBY = @__RUBY@
__SED = @__SED@
__SH = @__SH@
__SQLITE3 = @__SQLITE3@
__SSH = @__SSH@
__STRIP = @__STRIP@
__SVN = @__SVN@
__TAR = @__TAR@
__TCLSH = @__TCLSH@
__UNZIP = @__UNZIP@
__XZ = @__XZ@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
autorelocate_dcolor = @autorelocate_dcolor@
autorelocate_path = @autorelocate_path@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
exeext = @exeext@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
libext = @libext@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
objext = @objext@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
pkgpyexecdir = @pkgpyexecdir@
pkgpythondir = @pkgpythondir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
pyexecdir = @pyexecdir@
pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
shlibext = @shlibext@
srcdir = @srcdir@
subdirs = @subdirs@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
testdir = @testdir@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
usrprefix = @usrprefix@
varprefix = @varprefix@
AUTOMAKE_OPTIONS = 1.4 foreign
EXTRA_DIST = types desc
# http://forge.ispras.ru/projects/abi-compliance-checker
ABITEST = @abs_top_srcdir@/scripts/abi-check/abi-compliance-checker.pl
# http://forge.ispras.ru/projects/api-sanity-autotest
AUTOTEST = @abs_top_srcdir@/scripts/api-sanity-checker.pl
TDIRS = descriptors_storage header_compile_errors test_results tests
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign build/auto/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign build/auto/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
desc: $(top_builddir)/config.status $(srcdir)/desc.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
types: $(top_builddir)/config.status $(srcdir)/types.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) check-local
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool clean-local mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am:
.MAKE: check-am install-am install-strip
.PHONY: all all-am check check-am check-local clean clean-generic \
clean-libtool clean-local distclean distclean-generic \
distclean-libtool distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
uninstall uninstall-am
desc.xml: desc
cp $< $@
clean-local:
rm -rf $(TDIRS) desc.xml
check-local: desc.xml
-[ -d tests ] && ${AUTOTEST} -l build -d desc.xml -clean
-${AUTOTEST} -l build -d desc.xml -st types -td test_data \
-gen -splint-specs -build -run
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

97
rpm-5.4.9/build/auto/desc Normal file
View file

@ -0,0 +1,97 @@
<version>
5.4.9
</version>
<headers>
buildio.h
rpmbuild.h
rpmspec.h
</headers>
<libs>
/home/mdawkins/wdj54/build/.libs/librpmbuild.so
</libs>
<include_paths>
</include_paths>
<add_include_paths>
/home/mdawkins/wdj54/build
/home/mdawkins/wdj54/lib
/home/mdawkins/wdj54/rpmdb
/home/mdawkins/wdj54/rpmio
</add_include_paths>
<gcc_options>
-O2 -g -frecord-gcc-switches -Wstrict-aliasing=2 -pipe -Wformat -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fPIC -DPIC -Wall -W -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -Wno-unused-parameter -Wformat-security -g3 -fno-delete-null-pointer-checks -D_FORTIFY_SOURCE=2 -fstack-protector -fexceptions -fexceptions -Wno-missing-field-initializers -D_GNU_SOURCE -D_REENTRANT
</gcc_options>
<include_preamble>
stdint.h
stdio.h
stdlib.h
string.h
assert.h
rpmiotypes.h
rpmio.h
rpmtypes.h
rpmevr.h
rpmtag.h
</include_preamble>
<defines>
</defines>
<skip_types>
</skip_types>
<skip_symbols>
</skip_symbols>
<skip_constants>
</skip_constants>
<skip_headers>
/usr/include/rpm/*.h
</skip_headers>
<skip_libs>
/usr/lib64/libdb.so
/usr/lib64/libsqlite3.so
</skip_libs>
<search_headers>
</search_headers>
<search_libs>
</search_libs>
<tools>
</tools>
<cross_prefix>
</cross_prefix>
<!-- undocumented? -->
<libs_depend>
/home/mdawkins/wdj54/lib/.libs/librpm.so
/home/mdawkins/wdj54/rpmdb/.libs/librpmdb.so
/home/mdawkins/wdj54/rpmio/.libs/librpmio.so
/home/mdawkins/wdj54/misc/.libs/librpmmisc.so
</libs_depend>
<opaque_types>
</opaque_types>
<skip_interfaces>
</skip_interfaces>
<libgroup>
</libgroup>
<out_params>
</out_params>
<skip_warnings>
</skip_warnings>

View file

@ -0,0 +1,97 @@
<version>
@VERSION@
</version>
<headers>
buildio.h
rpmbuild.h
rpmspec.h
</headers>
<libs>
@abs_top_builddir@/build/.libs/librpmbuild.@shlibext@
</libs>
<include_paths>
</include_paths>
<add_include_paths>
@abs_top_srcdir@/build
@abs_top_srcdir@/lib
@abs_top_srcdir@/rpmdb
@abs_top_srcdir@/rpmio
</add_include_paths>
<gcc_options>
@CFLAGS@
</gcc_options>
<include_preamble>
stdint.h
stdio.h
stdlib.h
string.h
assert.h
rpmiotypes.h
rpmio.h
rpmtypes.h
rpmevr.h
rpmtag.h
</include_preamble>
<defines>
</defines>
<skip_types>
</skip_types>
<skip_symbols>
</skip_symbols>
<skip_constants>
</skip_constants>
<skip_headers>
@prefix@/include/rpm/*.h
</skip_headers>
<skip_libs>
@prefix@/lib64/libdb.@shlibext@
@prefix@/lib64/libsqlite3.@shlibext@
</skip_libs>
<search_headers>
</search_headers>
<search_libs>
</search_libs>
<tools>
</tools>
<cross_prefix>
</cross_prefix>
<!-- undocumented? -->
<libs_depend>
@abs_top_builddir@/lib/.libs/librpm.@shlibext@
@abs_top_builddir@/rpmdb/.libs/librpmdb.@shlibext@
@abs_top_builddir@/rpmio/.libs/librpmio.@shlibext@
@abs_top_builddir@/misc/.libs/librpmmisc.@shlibext@
</libs_depend>
<opaque_types>
</opaque_types>
<skip_interfaces>
</skip_interfaces>
<libgroup>
</libgroup>
<out_params>
</out_params>
<skip_warnings>
</skip_warnings>

289
rpm-5.4.9/build/auto/types Normal file
View file

@ -0,0 +1,289 @@
<?xml version="1.0" encoding="UTF-8"?>
<collection>
<spec_type>
<kind> common_env </kind>
<global_code>
#include <rpmcli.h> /* XXX rpmioItem */
#include <poptALL.h>
#include <assert.h>
static struct poptOption optionsTable[] = {
{ NULL, '\0', POPT_ARG_INCLUDE_TABLE, rpmcliAllPoptTable, 0,
"Common options for all rpmio executables:", NULL },
POPT_AUTOHELP
POPT_TABLEEND
};
</global_code>
<init_code>
poptContext con = rpmcliInit(argc, argv, optionsTable);
</init_code>
<final_code>
con = rpmcliFini(con);
</final_code>
</spec_type>
<!-- rpmio/rpmhash.h XXX DELETE?
<spec_type>
<kind> common_param </kind>
<data_type> hashTable </data_type>
<value> NULL </value>
<global_code>
#include <rpmio.h> /* XXX rpmioItem */
</global_code>
<init_code>
$0 = htCreate(1000, 0, 1, NULL, NULL);
</init_code>
<final_code>
#ifdef NOTYET /* XXX double free here */
$0 = htFree($0);
#endif
</final_code>
</spec_type>
-->
<!-- rpmio/rpmio.h -->
<spec_type>
<kind> common_param </kind>
<data_type> mode_t </data_type>
<value> 0700 </value>
</spec_type>
<spec_type>
<kind> normal </kind>
<data_type> void * </data_type>
<value> &__pglob </value>
<global_code>
#include <glob.h>
static glob_t __pglob;
</global_code>
<init_code>
(void) Glob("*", 0, Glob_error, $0);
</init_code>
<associating>
<interfaces> Globfree </interfaces>
<links> param1 </links>
</associating>
</spec_type>
<spec_type>
<kind> normal </kind>
<data_type> char * </data_type>
<value> NULL </value>
<associating>
<interfaces> Realpath </interfaces>
<links> param2 </links>
</associating>
</spec_type>
<!-- rpmio/rpmiotypes.h -->
<spec_type>
<kind> common_param </kind>
<data_type> DIGEST_CTX </data_type>
<value> NULL </value>
<global_code>
#include <rpmio.h> /* XXX rpmioItem */
static pgpHashAlgo _algo = PGPHASHALGO_MD5;
static rpmDigestFlags _flags = RPMDIGEST_NONE;
</global_code>
<init_code>
$0 = rpmDigestInit(_algo, _flags);
</init_code>
<final_code>
(void) rpmDigestFinal($0, NULL, NULL, 0);
</final_code>
</spec_type>
<spec_type>
<kind> normal </kind>
<data_type> DIGEST_CTX </data_type>
<value> NULL </value>
<global_code>
#include <rpmio.h> /* XXX rpmioItem */
static pgpHashAlgo _algo = PGPHASHALGO_MD5;
static rpmDigestFlags _flags = RPMDIGEST_NONE;
</global_code>
<init_code>
$0 = rpmDigestInit(_algo, _flags);
</init_code>
<associating>
<interfaces> rpmDigestFinal </interfaces>
<links> param1 </links>
</associating>
</spec_type>
<spec_type>
<kind> normal </kind>
<data_type> const char * </data_type>
<value> NULL </value>
<init_code>
$0 = strdup("foo");
</init_code>
<associating>
<interfaces> xstrtolocale </interfaces>
<links> param1 </links>
</associating>
</spec_type>
<spec_type>
<kind> normal </kind>
<data_type> rpmioP </data_type>
<value> NULL </value>
<init_code>
(void) rpmioParse(&$0, "bing bang boom");
</init_code>
<associating>
<interfaces> rpmioPFree </interfaces>
<links> param1 </links>
</associating>
</spec_type>
<!-- rpmio/rpmsw.h -->
<spec_type>
<kind> common_param </kind>
<data_type> rpmsw </data_type>
<value> NULL </value>
<global_code>
#include <rpmio.h> /* XXX rpmioItem */
</global_code>
<init_code>
$0 = calloc(1, sizeof(*$0));
</init_code>
<final_code>
if ($0)
free($0);
</final_code>
</spec_type>
<!-- rpmio/yarn.h -->
<spec_type>
<kind> common_param </kind>
<data_type> yarnThread </data_type>
<value> NULL </value>
<global_code>
static unsigned int _seconds = 10;
static void _snooze (void * _uip) {
unsigned int * uip = _uip;
if (uip)
sleep(*uip);
}
</global_code>
<init_code>
$0 = yarnLaunch(_snooze, &_seconds);
</init_code>
</spec_type>
<!-- rpmdb/rpmtag.h -->
<spec_type>
<kind> common_param </kind>
<data_type> Header </data_type>
<value> headerNew() </value>
</spec_type>
<spec_type>
<kind> common_param </kind>
<data_type> HE_t </data_type>
<value> &_he </value>
<global_code>
static struct _HE_s _he = { .tag = RPMTAG_NVRA };
</global_code>
</spec_type>
<!-- lib/rpmfi.h -->
<spec_type>
<kind> common_param </kind>
<data_type> rpmfi </data_type>
<value> NULL </value>
<global_code>
#include <rpmfi.h>
#include <rpmts.h>
static rpmts _ts;
static Header _h;
</global_code>
<init_code>
if (_ts == NULL) _ts = rpmtsCreate();
if (_h == NULL) _h = headerNew();
$0 = rpmfiNew(_ts, _h, RPMTAG_BASENAMES, 0);
</init_code>
<final_code>
$0 = rpmfiFree($0);
if (_h) _h = headerFree(_h);
if (_ts) _ts = rpmtsFree(_ts);
</final_code>
</spec_type>
<!-- lib/rpmps.h -->
<spec_type>
<kind> common_param </kind>
<data_type> rpmps </data_type>
<value> NULL </value>
<global_code>
#include <rpmps.h>
</global_code>
<init_code>
$0 = rpmpsCreate();
rpmpsAppend($0, 2, "pkg-1.2-3", NULL, "/dn/", "bn", "alt-4.5-6", 789UL);
</init_code>
<final_code>
$0 = rpmpsFree($0);
</final_code>
</spec_type>
<spec_type>
<kind> common_param </kind>
<data_type> rpmProblem </data_type>
<value> NULL </value>
<global_code>
#include <rpmps.h>
static rpmps _ps;
</global_code>
<init_code>
if (_ps == NULL) _ps = rpmpsCreate();
rpmpsAppend(_ps, 2, "pkg-1.2-3", NULL, "/dn/", "bn", "alt-4.5-6", 789UL);
$0 = rpmpsGetProblem(_ps, 0);
</init_code>
<final_code>
if (_ps) _ps = rpmpsFree(_ps);
</final_code>
</spec_type>
<spec_type>
<kind> common_param </kind>
<data_type> fnpyKey </data_type>
<value> NULL </value>
<init_code>
$0 = (fnpyKey) "fnpyKey";
</init_code>
</spec_type>
<!-- buildio.h -->
<!-- rpmbuild.h -->
<!-- rpmspec.h -->
<spec_type>
<kind> common_param </kind>
<data_type> Spec </data_type>
<value> newSpec() </value>
</spec_type>
<spec_type>
<kind> common_param </kind>
<data_type> Package </data_type>
<value> newPackage(_spec) </value>
<global_code>
static Spec _spec;
</global_code>
<init_code>
if (_spec == NULL) _spec = newSpec();
$0 = newPackage(_spec);
</init_code>
<final_code>
$0 = freePackage($0);
if (_spec) _spec = freeSpec(_spec);
</final_code>
</spec_type>
<spec_type>
<kind> normal </kind>
<data_type> rpmTag </data_type>
<value> RPMTAG_SOURCE </value>
<associating>
<interfaces> addSource </interfaces>
<links> param4 </links>
</associating>
</spec_type>
</collection>

View file

@ -0,0 +1,289 @@
<?xml version="1.0" encoding="UTF-8"?>
<collection>
<spec_type>
<kind> common_env </kind>
<global_code>
#include <rpmcli.h> /* XXX rpmioItem */
#include <poptALL.h>
#include <assert.h>
static struct poptOption optionsTable[] = {
{ NULL, '\0', POPT_ARG_INCLUDE_TABLE, rpmcliAllPoptTable, 0,
"Common options for all rpmio executables:", NULL },
POPT_AUTOHELP
POPT_TABLEEND
};
</global_code>
<init_code>
poptContext con = rpmcliInit(argc, argv, optionsTable);
</init_code>
<final_code>
con = rpmcliFini(con);
</final_code>
</spec_type>
<!-- rpmio/rpmhash.h XXX DELETE?
<spec_type>
<kind> common_param </kind>
<data_type> hashTable </data_type>
<value> NULL </value>
<global_code>
#include <rpmio.h> /* XXX rpmioItem */
</global_code>
<init_code>
$0 = htCreate(1000, 0, 1, NULL, NULL);
</init_code>
<final_code>
#ifdef NOTYET /* XXX double free here */
$0 = htFree($0);
#endif
</final_code>
</spec_type>
-->
<!-- rpmio/rpmio.h -->
<spec_type>
<kind> common_param </kind>
<data_type> mode_t </data_type>
<value> 0700 </value>
</spec_type>
<spec_type>
<kind> normal </kind>
<data_type> void * </data_type>
<value> &__pglob </value>
<global_code>
#include <glob.h>
static glob_t __pglob;
</global_code>
<init_code>
(void) Glob("*", 0, Glob_error, $0);
</init_code>
<associating>
<interfaces> Globfree </interfaces>
<links> param1 </links>
</associating>
</spec_type>
<spec_type>
<kind> normal </kind>
<data_type> char * </data_type>
<value> NULL </value>
<associating>
<interfaces> Realpath </interfaces>
<links> param2 </links>
</associating>
</spec_type>
<!-- rpmio/rpmiotypes.h -->
<spec_type>
<kind> common_param </kind>
<data_type> DIGEST_CTX </data_type>
<value> NULL </value>
<global_code>
#include <rpmio.h> /* XXX rpmioItem */
static pgpHashAlgo _algo = PGPHASHALGO_MD5;
static rpmDigestFlags _flags = RPMDIGEST_NONE;
</global_code>
<init_code>
$0 = rpmDigestInit(_algo, _flags);
</init_code>
<final_code>
(void) rpmDigestFinal($0, NULL, NULL, 0);
</final_code>
</spec_type>
<spec_type>
<kind> normal </kind>
<data_type> DIGEST_CTX </data_type>
<value> NULL </value>
<global_code>
#include <rpmio.h> /* XXX rpmioItem */
static pgpHashAlgo _algo = PGPHASHALGO_MD5;
static rpmDigestFlags _flags = RPMDIGEST_NONE;
</global_code>
<init_code>
$0 = rpmDigestInit(_algo, _flags);
</init_code>
<associating>
<interfaces> rpmDigestFinal </interfaces>
<links> param1 </links>
</associating>
</spec_type>
<spec_type>
<kind> normal </kind>
<data_type> const char * </data_type>
<value> NULL </value>
<init_code>
$0 = strdup("foo");
</init_code>
<associating>
<interfaces> xstrtolocale </interfaces>
<links> param1 </links>
</associating>
</spec_type>
<spec_type>
<kind> normal </kind>
<data_type> rpmioP </data_type>
<value> NULL </value>
<init_code>
(void) rpmioParse(&$0, "bing bang boom");
</init_code>
<associating>
<interfaces> rpmioPFree </interfaces>
<links> param1 </links>
</associating>
</spec_type>
<!-- rpmio/rpmsw.h -->
<spec_type>
<kind> common_param </kind>
<data_type> rpmsw </data_type>
<value> NULL </value>
<global_code>
#include <rpmio.h> /* XXX rpmioItem */
</global_code>
<init_code>
$0 = calloc(1, sizeof(*$0));
</init_code>
<final_code>
if ($0)
free($0);
</final_code>
</spec_type>
<!-- rpmio/yarn.h -->
<spec_type>
<kind> common_param </kind>
<data_type> yarnThread </data_type>
<value> NULL </value>
<global_code>
static unsigned int _seconds = 10;
static void _snooze (void * _uip) {
unsigned int * uip = _uip;
if (uip)
sleep(*uip);
}
</global_code>
<init_code>
$0 = yarnLaunch(_snooze, &_seconds);
</init_code>
</spec_type>
<!-- rpmdb/rpmtag.h -->
<spec_type>
<kind> common_param </kind>
<data_type> Header </data_type>
<value> headerNew() </value>
</spec_type>
<spec_type>
<kind> common_param </kind>
<data_type> HE_t </data_type>
<value> &_he </value>
<global_code>
static struct _HE_s _he = { .tag = RPMTAG_NVRA };
</global_code>
</spec_type>
<!-- lib/rpmfi.h -->
<spec_type>
<kind> common_param </kind>
<data_type> rpmfi </data_type>
<value> NULL </value>
<global_code>
#include <rpmfi.h>
#include <rpmts.h>
static rpmts _ts;
static Header _h;
</global_code>
<init_code>
if (_ts == NULL) _ts = rpmtsCreate();
if (_h == NULL) _h = headerNew();
$0 = rpmfiNew(_ts, _h, RPMTAG_BASENAMES, 0);
</init_code>
<final_code>
$0 = rpmfiFree($0);
if (_h) _h = headerFree(_h);
if (_ts) _ts = rpmtsFree(_ts);
</final_code>
</spec_type>
<!-- lib/rpmps.h -->
<spec_type>
<kind> common_param </kind>
<data_type> rpmps </data_type>
<value> NULL </value>
<global_code>
#include <rpmps.h>
</global_code>
<init_code>
$0 = rpmpsCreate();
rpmpsAppend($0, 2, "pkg-1.2-3", NULL, "/dn/", "bn", "alt-4.5-6", 789UL);
</init_code>
<final_code>
$0 = rpmpsFree($0);
</final_code>
</spec_type>
<spec_type>
<kind> common_param </kind>
<data_type> rpmProblem </data_type>
<value> NULL </value>
<global_code>
#include <rpmps.h>
static rpmps _ps;
</global_code>
<init_code>
if (_ps == NULL) _ps = rpmpsCreate();
rpmpsAppend(_ps, 2, "pkg-1.2-3", NULL, "/dn/", "bn", "alt-4.5-6", 789UL);
$0 = rpmpsGetProblem(_ps, 0);
</init_code>
<final_code>
if (_ps) _ps = rpmpsFree(_ps);
</final_code>
</spec_type>
<spec_type>
<kind> common_param </kind>
<data_type> fnpyKey </data_type>
<value> NULL </value>
<init_code>
$0 = (fnpyKey) "fnpyKey";
</init_code>
</spec_type>
<!-- buildio.h -->
<!-- rpmbuild.h -->
<!-- rpmspec.h -->
<spec_type>
<kind> common_param </kind>
<data_type> Spec </data_type>
<value> newSpec() </value>
</spec_type>
<spec_type>
<kind> common_param </kind>
<data_type> Package </data_type>
<value> newPackage(_spec) </value>
<global_code>
static Spec _spec;
</global_code>
<init_code>
if (_spec == NULL) _spec = newSpec();
$0 = newPackage(_spec);
</init_code>
<final_code>
$0 = freePackage($0);
if (_spec) _spec = freeSpec(_spec);
</final_code>
</spec_type>
<spec_type>
<kind> normal </kind>
<data_type> rpmTag </data_type>
<value> RPMTAG_SOURCE </value>
<associating>
<interfaces> addSource </interfaces>
<links> param4 </links>
</associating>
</spec_type>
</collection>

442
rpm-5.4.9/build/build.c Normal file
View file

@ -0,0 +1,442 @@
/** \ingroup rpmbuild
* \file build/build.c
* Top-level build dispatcher.
*/
#include "system.h"
#define _RPMBC_INTERNAL
#include <rpmio_internal.h> /* XXX fdGetFp */
#include <rpmcb.h>
#include <rpmsq.h>
#define _RPMTAG_INTERNAL
#include <rpmbuild.h>
#include "signature.h" /* XXX rpmTempFile */
#include "debug.h"
/**
*/
#if defined(RPM_VENDOR_OPENPKG) /* splitted-source-directory */
const char * getSourceDir(rpmfileAttrs attr, const char *filename)
#else
const char * getSourceDir(rpmfileAttrs attr)
#endif
{
const char * dir = NULL;
#if defined(RPM_VENDOR_OPENPKG) /* splitted-source-directory */
const char *fn;
/* support splitted source directories, i.e., source files which
are alternatively placed into the .spec directory and picked
up from there, too. */
if (attr & (RPMFILE_SOURCE|RPMFILE_PATCH|RPMFILE_ICON) && filename != NULL)
{
fn = rpmGetPath("%{_specdir}/", filename, NULL);
if (access(fn, F_OK) == 0)
dir = "%{_specdir}/";
fn = _free(fn);
}
if (dir != NULL) {
} else
#endif
if (attr & RPMFILE_SOURCE)
dir = "%{_sourcedir}/";
else if (attr & RPMFILE_PATCH)
dir = "%{_patchdir}/";
else if (attr & RPMFILE_ICON)
dir = "%{_icondir}/";
return dir;
}
/*@access urlinfo @*/ /* XXX compared with NULL */
/*@access FD_t @*/
/**
*/
static void doRmSource(Spec spec)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies rpmGlobalMacroContext, fileSystem, internalState @*/
{
struct Source *sp;
int rc;
#if 0
rc = Unlink(spec->specFile);
#endif
for (sp = spec->sources; sp != NULL; sp = sp->next) {
const char *dn, *fn;
if (sp->flags & RPMFILE_GHOST)
continue;
#if defined(RPM_VENDOR_OPENPKG) /* splitted-source-directory */
if (! (dn = getSourceDir(sp->flags, sp->source)))
#else
if (! (dn = getSourceDir(sp->flags)))
#endif
continue;
fn = rpmGenPath(NULL, dn, sp->source);
rc = Unlink(fn);
fn = _free(fn);
}
}
/*
* @todo Single use by %%doc in files.c prevents static.
*/
rpmRC doScript(Spec spec, int what, const char *name, rpmiob iob, int test)
{
const char * rootURL = spec->rootURL;
const char * rootDir;
const char * scriptName = NULL;
const char * buildDirURL = rpmGenPath(rootURL, "%{_builddir}", "");
const char * buildScript;
const char * buildCmd = NULL;
const char * buildTemplate = NULL;
const char * buildPost = NULL;
const char * mTemplate = NULL;
const char * mCmd = NULL;
const char * mPost = NULL;
int argc = 0;
const char **argv = NULL;
FILE * fp = NULL;
urlinfo u = NULL;
rpmop op = NULL;
int ix = -1;
FD_t fd;
FD_t xfd;
int status;
rpmRC rc;
size_t i;
switch (what) {
case RPMBUILD_PREP:
name = "%prep";
iob = spec->prep;
op = memset(alloca(sizeof(*op)), 0, sizeof(*op));
ix = RPMSCRIPT_PREP;
mTemplate = "%{__spec_prep_template}";
mPost = "%{__spec_prep_post}";
mCmd = "%{__spec_prep_cmd}";
break;
case RPMBUILD_BUILD:
name = "%build";
iob = spec->build;
op = memset(alloca(sizeof(*op)), 0, sizeof(*op));
ix = RPMSCRIPT_BUILD;
mTemplate = "%{__spec_build_template}";
mPost = "%{__spec_build_post}";
mCmd = "%{__spec_build_cmd}";
break;
case RPMBUILD_INSTALL:
name = "%install";
iob = spec->install;
op = memset(alloca(sizeof(*op)), 0, sizeof(*op));
ix = RPMSCRIPT_INSTALL;
mTemplate = "%{__spec_install_template}";
mPost = "%{__spec_install_post}";
mCmd = "%{__spec_install_cmd}";
break;
case RPMBUILD_CHECK:
name = "%check";
iob = spec->check;
op = memset(alloca(sizeof(*op)), 0, sizeof(*op));
ix = RPMSCRIPT_CHECK;
mTemplate = "%{__spec_check_template}";
mPost = "%{__spec_check_post}";
mCmd = "%{__spec_check_cmd}";
break;
case RPMBUILD_CLEAN:
name = "%clean";
iob = spec->clean;
mTemplate = "%{__spec_clean_template}";
mPost = "%{__spec_clean_post}";
mCmd = "%{__spec_clean_cmd}";
break;
case RPMBUILD_RMBUILD:
name = "--clean";
mTemplate = "%{__spec_clean_template}";
mPost = "%{__spec_clean_post}";
mCmd = "%{__spec_clean_cmd}";
break;
/* support "%track" script/section */
case RPMBUILD_TRACK:
name = "%track";
iob = NULL;
if (spec->foo)
for (i = 0; i < spec->nfoo; i++) {
if (spec->foo[i].str == NULL || spec->foo[i].iob == NULL)
continue;
if (xstrcasecmp(spec->foo[i].str, "track"))
continue;
iob = spec->foo[i].iob;
/*@loopbreak@*/ break;
}
mTemplate = "%{__spec_track_template}";
mPost = "%{__spec_track_post}";
mCmd = "%{__spec_track_cmd}";
break;
case RPMBUILD_STRINGBUF:
default:
mTemplate = "%{___build_template}";
mPost = "%{___build_post}";
mCmd = "%{___build_cmd}";
break;
}
assert(name != NULL);
if ((what != RPMBUILD_RMBUILD) && iob == NULL) {
rc = RPMRC_OK;
goto exit;
}
if (rpmTempFile(rootURL, &scriptName, &fd) || fd == NULL || Ferror(fd)) {
rpmlog(RPMLOG_ERR, _("Unable to open temp file.\n"));
rc = RPMRC_FAIL;
goto exit;
}
if (fdGetFp(fd) == NULL)
xfd = Fdopen(fd, "w.fpio");
else
xfd = fd;
/*@-type@*/ /* FIX: cast? */
if ((fp = fdGetFp(xfd)) == NULL) {
rc = RPMRC_FAIL;
goto exit;
}
/*@=type@*/
(void) urlPath(rootURL, &rootDir);
if (*rootDir == '\0') rootDir = "/";
(void) urlPath(scriptName, &buildScript);
buildTemplate = rpmExpand(mTemplate, NULL);
buildPost = rpmExpand(mPost, NULL);
(void) fputs(buildTemplate, fp);
/* support "%track" script/section */
if (what != RPMBUILD_PREP && what != RPMBUILD_RMBUILD && spec->buildSubdir && what != RPMBUILD_TRACK)
fprintf(fp, "cd '%s'\n", spec->buildSubdir);
if (what == RPMBUILD_RMBUILD) {
if (spec->buildSubdir)
fprintf(fp, "rm -rf '%s'\n", spec->buildSubdir);
} else if (iob != NULL)
fprintf(fp, "%s", rpmiobStr(iob));
(void) fputs(buildPost, fp);
(void) Fclose(xfd);
if (test) {
rc = RPMRC_OK;
goto exit;
}
if (buildDirURL && buildDirURL[0] != '/' &&
(urlSplit(buildDirURL, &u) != 0)) {
rc = RPMRC_FAIL;
goto exit;
}
switch (urlType(u)) {
case URL_IS_HTTPS:
case URL_IS_HTTP:
case URL_IS_FTP:
addMacro(spec->macros, "_remsh", NULL, "%{__remsh}", RMIL_SPEC);
addMacro(spec->macros, "_remhost", NULL, u->host, RMIL_SPEC);
if (strcmp(rootDir, "/"))
addMacro(spec->macros, "_remroot", NULL, rootDir, RMIL_SPEC);
break;
case URL_IS_UNKNOWN:
case URL_IS_DASH:
case URL_IS_PATH:
case URL_IS_HKP:
case URL_IS_MONGO: /* XXX FIXME */
default:
break;
}
buildCmd = rpmExpand(mCmd, " ", buildScript, NULL);
(void) poptParseArgvString(buildCmd, &argc, &argv);
if (what != RPMBUILD_TRACK) /* support "%track" script/section */
rpmlog(RPMLOG_NOTICE, _("Executing(%s): %s\n"), name, buildCmd);
/* Run the script with a stopwatch. */
if (op != NULL)
(void) rpmswEnter(op, 0);
status = rpmsqExecve(argv);
if (ix >= 0 && ix < RPMSCRIPT_MAX)
spec->sstates[ix] =
(RPMSCRIPT_STATE_EXEC | RPMSCRIPT_STATE_REAPED) | (status & 0xffff);
if (!WIFEXITED(status) || WEXITSTATUS(status)) {
rpmlog(RPMLOG_ERR, _("Bad exit status from %s (%s)\n"),
scriptName, name);
rc = RPMRC_FAIL;
} else
rc = RPMRC_OK;
if (op != NULL) {
static unsigned int scale = 1000;
(void) rpmswExit(op, 0);
if (ix >= 0 && ix < RPMSCRIPT_MAX)
spec->smetrics[ix] += op->usecs / scale;
}
exit:
if (scriptName) {
#if defined(RPM_VENDOR_OPENPKG) /* always-remove-tempfiles */
/* Unconditionally remove temporary files ("rpm-tmp.XXXXX") which
were generated for the executed scripts. In OpenPKG we run the
scripts in debug mode ("set -x") anyway, so we never need to
see the whole generated script -- not even if it breaks. Instead
we would just have temporary files staying around forever. */
#else
if (rc == RPMRC_OK)
#endif
(void) Unlink(scriptName);
scriptName = _free(scriptName);
}
switch (urlType(u)) {
case URL_IS_HTTPS:
case URL_IS_HTTP:
case URL_IS_FTP:
delMacro(spec->macros, "_remsh");
delMacro(spec->macros, "_remhost");
if (strcmp(rootDir, "/"))
delMacro(spec->macros, "_remroot");
break;
case URL_IS_UNKNOWN:
case URL_IS_DASH:
case URL_IS_PATH:
case URL_IS_HKP:
case URL_IS_MONGO: /* XXX FIXME */
default:
break;
}
argv = _free(argv);
buildCmd = _free(buildCmd);
buildTemplate = _free(buildTemplate);
buildPost = _free(buildPost);
buildDirURL = _free(buildDirURL);
return rc;
}
rpmRC buildSpec(rpmts ts, Spec spec, int what, int test)
{
rpmRC rc = RPMRC_OK;
/* Generate a keypair lazily. */
if (spec->dig == NULL)
spec->dig = pgpDigNew(RPMVSF_DEFAULT, PGPPUBKEYALGO_DSA);
if (!spec->recursing && spec->BACount) {
int x;
/* When iterating over BANames, do the source */
/* packaging on the first run, and skip RMSOURCE altogether */
if (spec->BASpecs != NULL)
for (x = 0; x < spec->BACount; x++) {
if ((rc = buildSpec(ts, spec->BASpecs[x],
(what & ~RPMBUILD_RMSOURCE) |
(x ? 0 : (what & RPMBUILD_PACKAGESOURCE)),
test))) {
goto exit;
}
}
} else {
/* support "%track" script/section */
if ((what & RPMBUILD_TRACK) &&
(rc = doScript(spec, RPMBUILD_TRACK, NULL, NULL, test)))
goto exit;
if ((what & RPMBUILD_PREP) &&
(rc = doScript(spec, RPMBUILD_PREP, NULL, NULL, test)))
goto exit;
if ((what & RPMBUILD_BUILD) &&
(rc = doScript(spec, RPMBUILD_BUILD, NULL, NULL, test)))
goto exit;
if ((what & RPMBUILD_INSTALL) &&
(rc = doScript(spec, RPMBUILD_INSTALL, NULL, NULL, test)))
goto exit;
if ((what & RPMBUILD_CHECK) &&
(rc = doScript(spec, RPMBUILD_CHECK, NULL, NULL, test)))
goto exit;
if ((what & RPMBUILD_PACKAGESOURCE) &&
(rc = processSourceFiles(spec)))
goto exit;
if (((what & RPMBUILD_INSTALL) || (what & RPMBUILD_PACKAGEBINARY) ||
(what & RPMBUILD_FILECHECK)) &&
(rc = processBinaryFiles(spec, what & RPMBUILD_INSTALL, test)))
goto exit;
if (((what & RPMBUILD_PACKAGESOURCE) && !test) &&
(rc = packageSources(spec)))
return rc;
if (((what & RPMBUILD_PACKAGEBINARY) && !test) &&
(rc = packageBinaries(spec)))
goto exit;
if ((what & RPMBUILD_CLEAN) &&
(rc = doScript(spec, RPMBUILD_CLEAN, NULL, NULL, test)))
goto exit;
if ((what & RPMBUILD_RMBUILD) &&
(rc = doScript(spec, RPMBUILD_RMBUILD, NULL, NULL, test)))
goto exit;
}
if (what & RPMBUILD_RMSOURCE)
doRmSource(spec);
if (what & RPMBUILD_RMSPEC)
(void) Unlink(spec->specFile);
#if defined(RPM_VENDOR_OPENPKG) /* auto-remove-source-directories */
/* In OpenPKG we use per-package %{_sourcedir} and %{_specdir}
definitions (macros have trailing ".../%{name}"). On removal of
source(s) and .spec file, this per-package directory would be kept
(usually <prefix>/RPM/SRC/<name>/), because RPM does not know about
this OpenPKG convention. So, let RPM try(!) to remove the two
directories (if they are empty) and just ignore removal failures
(if they are still not empty). */
if (what & RPMBUILD_RMSOURCE) {
const char *pn;
pn = rpmGetPath("%{_sourcedir}", NULL);
Rmdir(pn); /* ignore error, it is ok if it fails (usually with ENOTEMPTY) */
pn = _free(pn);
}
if (what & RPMBUILD_RMSPEC) {
const char *pn;
pn = rpmGetPath("%{_specdir}", NULL);
Rmdir(pn); /* ignore error, it is ok if it fails (usually with ENOTEMPTY) */
pn = _free(pn);
}
#endif
exit:
if (rc != RPMRC_OK && rpmlogGetNrecs() > 0) {
rpmlog(RPMLOG_NOTICE, _("\n\nRPM build errors:\n"));
rpmlogPrint(NULL);
}
return rc;
}

79
rpm-5.4.9/build/buildio.h Normal file
View file

@ -0,0 +1,79 @@
#ifndef _H_BUILDIO_
#define _H_BUILDIO_
/** \ingroup rpmbuild
* \file build/buildio.h
* Routines to read and write packages.
* @deprecated this information will move elsewhere eventually.
* @todo Eliminate, merge into rpmlib.
*/
#include "rpmbuild.h"
/**
*/
typedef /*@abstract@*/ struct cpioSourceArchive_s {
rpmuint32_t cpioArchiveSize;
/*@relnull@*/
FD_t cpioFdIn;
/*@refcounted@*/ /*@relnull@*/
rpmfi fi;
/*@only@*/
struct rpmlead * lead; /* XXX FIXME: exorcize lead/arch/os */
} * CSA_t;
#ifdef __cplusplus
extern "C" {
#endif
#if defined(DEAD)
/**
* Read rpm package components from file.
* @param fileName file name of package (or NULL to use stdin)
* @retval specp spec structure to carry package header (or NULL)
* @retval lead package lead
* @retval sigs package signature
* @param csa
* @return 0 on success
*/
/*@unused@*/ int readRPM(/*@null@*/ const char * fileName,
/*@out@*/ Spec * specp,
/*@out@*/ void * l,
/*@out@*/ Header * sigs,
CSA_t csa)
/*@globals rpmGlobalMacroContext, h_errno,
fileSystem, internalState @*/
/*@modifies *specp, *lead, *sigs, csa, csa->cpioFdIn,
rpmGlobalMacroContext, fileSystem, internalState @*/;
#endif
/**
* Write rpm package to file.
*
* @warning The first argument (header) is now passed by reference in order to
* return a reloaded contiguous header to the caller.
*
* @retval *hdrp header to write (final header is returned).
* @retval *pkgidp header+payload MD5 of package (NULL to disable).
* @param fileName file name of package
* @param csa
* @param passPhrase
* @retval cookie generated cookie (i.e build host/time)
* @param _dig DSA keypair for auto-signing (or NULL)
* @return RPMRC_OK on success
*/
rpmRC writeRPM(Header * hdrp, /*@null@*/ unsigned char ** pkgidp,
const char * fileName,
CSA_t csa,
/*@null@*/ char * passPhrase,
/*@out@*/ const char ** cookie, void * _dig)
/*@globals rpmGlobalMacroContext, h_errno,
fileSystem, internalState @*/
/*@modifies *hdrp, *pkgidp, *cookie, csa, csa->cpioArchiveSize,
rpmGlobalMacroContext, fileSystem, internalState @*/;
#ifdef __cplusplus
}
#endif
#endif /* _H_BUILDIO_ */

View file

@ -0,0 +1,773 @@
/** \ingroup rpmbuild
* \file build/expression.c
* Simple logical expression parser.
* This module implements a basic expression parser with support for
* integer and string datatypes. For ease of programming, we use the
* top-down "recursive descent" method of parsing. While a
* table-driven bottom-up parser might be faster, it does not really
* matter for the expressions we will be parsing.
*
* Copyright (C) 1998 Tom Dyas <tdyas@eden.rutgers.edu>
* This work is provided under the GPL or LGPL at your choice.
*/
#include "system.h"
#include <rpmio.h>
#include <rpmiotypes.h>
#include <rpmlog.h>
#include <rpmbuild.h>
#include "debug.h"
/* #define DEBUG_PARSER 1 */
#ifdef DEBUG_PARSER
#include <stdio.h>
#define DEBUG(x) do { x ; } while (0)
#else
#define DEBUG(x)
#endif
/**
* Encapsulation of a "value"
*/
typedef struct _value {
enum { VALUE_TYPE_INTEGER, VALUE_TYPE_STRING } type;
union {
const char *s;
int i;
} data;
} *Value;
/**
*/
static Value valueMakeInteger(int i)
/*@*/
{
Value v;
v = (Value) xmalloc(sizeof(*v));
v->type = VALUE_TYPE_INTEGER;
v->data.i = i;
return v;
}
/**
*/
static Value valueMakeString(/*@only@*/ const char *s)
/*@*/
{
Value v;
v = (Value) xmalloc(sizeof(*v));
v->type = VALUE_TYPE_STRING;
v->data.s = s;
return v;
}
/**
*/
static void valueFree( /*@only@*/ Value v)
/*@modifies v @*/
{
if (v) {
if (v->type == VALUE_TYPE_STRING)
v->data.s = _free(v->data.s);
v = _free(v);
}
}
#ifdef DEBUG_PARSER
static void valueDump(const char *msg, Value v, FILE *fp)
/*@*/
{
if (msg)
fprintf(fp, "%s ", msg);
if (v) {
if (v->type == VALUE_TYPE_INTEGER)
fprintf(fp, "INTEGER %d\n", v->data.i);
else
fprintf(fp, "STRING '%s'\n", v->data.s);
} else
fprintf(fp, "NULL\n");
}
#endif
#define valueIsInteger(v) ((v)->type == VALUE_TYPE_INTEGER)
#define valueIsString(v) ((v)->type == VALUE_TYPE_STRING)
#define valueSameType(v1,v2) ((v1)->type == (v2)->type)
/**
* Parser state.
*/
typedef struct _parseState {
/*@owned@*/
char *str; /*!< expression string */
/*@dependent@*/
char *p; /*!< current position in expression string */
int nextToken; /*!< current lookahead token */
/*@relnull@*/
Value tokenValue; /*!< valid when TOK_INTEGER or TOK_STRING */
Spec spec; /*!< spec file that we are parsing inside of */
} *ParseState;
/**
* \name Parser tokens
*/
/*@{*/
#define TOK_EOF 1
#define TOK_INTEGER 2
#define TOK_STRING 3
#define TOK_IDENTIFIER 4
#define TOK_ADD 5
#define TOK_MINUS 6
#define TOK_MULTIPLY 7
#define TOK_DIVIDE 8
#define TOK_OPEN_P 9
#define TOK_CLOSE_P 10
#define TOK_EQ 11
#define TOK_NEQ 12
#define TOK_LT 13
#define TOK_LE 14
#define TOK_GT 15
#define TOK_GE 16
#define TOK_NOT 17
#define TOK_LOGICAL_AND 18
#define TOK_LOGICAL_OR 19
/*@}*/
#define EXPRBUFSIZ BUFSIZ
#if defined(DEBUG_PARSER)
typedef struct exprTokTableEntry {
const char *name;
int val;
} ETTE_t;
ETTE_t exprTokTable[] = {
{ "EOF", TOK_EOF },
{ "I", TOK_INTEGER },
{ "S", TOK_STRING },
{ "ID", TOK_IDENTIFIER },
{ "+", TOK_ADD },
{ "-", TOK_MINUS },
{ "*", TOK_MULTIPLY },
{ "/", TOK_DIVIDE },
{ "( ", TOK_OPEN_P },
{ " )", TOK_CLOSE_P },
{ "==", TOK_EQ },
{ "!=", TOK_NEQ },
{ "<", TOK_LT },
{ "<=", TOK_LE },
{ ">", TOK_GT },
{ ">=", TOK_GE },
{ "!", TOK_NOT },
{ "&&", TOK_LOGICAL_AND },
{ "||", TOK_LOGICAL_OR },
{ NULL, 0 }
};
static const char *prToken(int val)
/*@*/
{
ETTE_t *et;
for (et = exprTokTable; et->name != NULL; et++) {
if (val == et->val)
return et->name;
}
return "???";
}
#endif /* DEBUG_PARSER */
/**
* @param state expression parser state
*/
static int rdToken(ParseState state)
/*@globals rpmGlobalMacroContext, h_errno, internalState @*/
/*@modifies state->nextToken, state->p, state->tokenValue,
rpmGlobalMacroContext, internalState @*/
{
int token;
Value v = NULL;
char *p = state->p;
/* Skip whitespace before the next token. */
while (*p && xisspace(*p)) p++;
switch (*p) {
case '\0':
token = TOK_EOF;
p--;
break;
case '+':
token = TOK_ADD;
break;
case '-':
token = TOK_MINUS;
break;
case '*':
token = TOK_MULTIPLY;
break;
case '/':
token = TOK_DIVIDE;
break;
case '(':
token = TOK_OPEN_P;
break;
case ')':
token = TOK_CLOSE_P;
break;
case '=':
if (p[1] == '=') {
token = TOK_EQ;
p++;
} else {
rpmlog(RPMLOG_ERR, _("syntax error while parsing ==\n"));
return -1;
}
break;
case '!':
if (p[1] == '=') {
token = TOK_NEQ;
p++;
} else
token = TOK_NOT;
break;
case '<':
if (p[1] == '=') {
token = TOK_LE;
p++;
} else
token = TOK_LT;
break;
case '>':
if (p[1] == '=') {
token = TOK_GE;
p++;
} else
token = TOK_GT;
break;
case '&':
if (p[1] == '&') {
token = TOK_LOGICAL_AND;
p++;
} else {
rpmlog(RPMLOG_ERR, _("syntax error while parsing &&\n"));
return -1;
}
break;
case '|':
if (p[1] == '|') {
token = TOK_LOGICAL_OR;
p++;
} else {
rpmlog(RPMLOG_ERR, _("syntax error while parsing ||\n"));
return -1;
}
break;
default:
if (xisdigit(*p)) {
char temp[EXPRBUFSIZ], *t = temp;
temp[0] = '\0';
while (*p && xisdigit(*p))
*t++ = *p++;
*t++ = '\0';
p--;
token = TOK_INTEGER;
v = valueMakeInteger(atoi(temp));
} else if (xisalpha(*p)) {
char temp[EXPRBUFSIZ], *t = temp;
temp[0] = '\0';
while (*p && (xisalnum(*p) || *p == '_'))
*t++ = *p++;
*t++ = '\0';
p--;
token = TOK_IDENTIFIER;
v = valueMakeString( xstrdup(temp) );
} else if (*p == '\"') {
char temp[EXPRBUFSIZ], *t = temp;
temp[0] = '\0';
p++;
while (*p && *p != '\"')
*t++ = *p++;
*t++ = '\0';
token = TOK_STRING;
v = valueMakeString( rpmExpand(temp, NULL) );
} else {
rpmlog(RPMLOG_ERR, _("parse error in expression\n"));
return -1;
}
}
state->p = p + 1;
state->nextToken = token;
state->tokenValue = v;
DEBUG(printf("rdToken: \"%s\" (%d)\n", prToken(token), token));
DEBUG(valueDump("rdToken:", state->tokenValue, stdout));
return 0;
}
/*@null@*/
static Value doLogical(ParseState state)
/*@globals rpmGlobalMacroContext, h_errno, internalState @*/
/*@modifies state->nextToken, state->p, state->tokenValue,
rpmGlobalMacroContext, internalState @*/;
/**
* @param state expression parser state
*/
/*@null@*/
static Value doPrimary(ParseState state)
/*@globals rpmGlobalMacroContext, h_errno, internalState @*/
/*@modifies state->nextToken, state->p, state->tokenValue,
rpmGlobalMacroContext, internalState @*/
{
Value v;
DEBUG(printf("doPrimary()\n"));
switch (state->nextToken) {
case TOK_OPEN_P:
if (rdToken(state))
return NULL;
v = doLogical(state);
if (state->nextToken != TOK_CLOSE_P) {
rpmlog(RPMLOG_ERR, _("unmatched (\n"));
return NULL;
}
if (rdToken(state))
return NULL;
break;
case TOK_INTEGER:
case TOK_STRING:
v = state->tokenValue;
if (rdToken(state))
return NULL;
break;
case TOK_IDENTIFIER: {
const char *name = state->tokenValue->data.s;
v = valueMakeString( rpmExpand(name, NULL) );
if (rdToken(state))
return NULL;
break;
}
case TOK_MINUS:
if (rdToken(state))
return NULL;
v = doPrimary(state);
if (v == NULL)
return NULL;
if (! valueIsInteger(v)) {
rpmlog(RPMLOG_ERR, _("- only on numbers\n"));
return NULL;
}
v = valueMakeInteger(- v->data.i);
break;
case TOK_NOT:
if (rdToken(state))
return NULL;
v = doPrimary(state);
if (v == NULL)
return NULL;
if (! valueIsInteger(v)) {
rpmlog(RPMLOG_ERR, _("! only on numbers\n"));
return NULL;
}
v = valueMakeInteger(! v->data.i);
break;
default:
return NULL;
/*@notreached@*/ break;
}
DEBUG(valueDump("doPrimary:", v, stdout));
return v;
}
/**
* @param state expression parser state
*/
/*@null@*/
static Value doMultiplyDivide(ParseState state)
/*@globals rpmGlobalMacroContext, h_errno, internalState @*/
/*@modifies state->nextToken, state->p, state->tokenValue,
rpmGlobalMacroContext, internalState @*/
{
Value v1, v2 = NULL;
DEBUG(printf("doMultiplyDivide()\n"));
v1 = doPrimary(state);
if (v1 == NULL)
return NULL;
while (state->nextToken == TOK_MULTIPLY
|| state->nextToken == TOK_DIVIDE)
{
int op = state->nextToken;
if (rdToken(state))
return NULL;
if (v2) valueFree(v2);
v2 = doPrimary(state);
if (v2 == NULL)
return NULL;
if (! valueSameType(v1, v2)) {
rpmlog(RPMLOG_ERR, _("types must match\n"));
return NULL;
}
if (valueIsInteger(v1)) {
int i1 = v1->data.i, i2 = v2->data.i;
valueFree(v1);
if (op == TOK_MULTIPLY)
v1 = valueMakeInteger(i1 * i2);
else
v1 = valueMakeInteger(i1 / i2);
} else {
rpmlog(RPMLOG_ERR, _("* / not suported for strings\n"));
return NULL;
}
}
if (v2) valueFree(v2);
return v1;
}
/**
* @param state expression parser state
*/
/*@null@*/
static Value doAddSubtract(ParseState state)
/*@globals rpmGlobalMacroContext, h_errno, internalState @*/
/*@modifies state->nextToken, state->p, state->tokenValue,
rpmGlobalMacroContext, internalState @*/
{
Value v1, v2 = NULL;
DEBUG(printf("doAddSubtract()\n"));
v1 = doMultiplyDivide(state);
if (v1 == NULL)
return NULL;
while (state->nextToken == TOK_ADD || state->nextToken == TOK_MINUS) {
int op = state->nextToken;
if (rdToken(state))
return NULL;
if (v2) valueFree(v2);
v2 = doMultiplyDivide(state);
if (v2 == NULL)
return NULL;
if (! valueSameType(v1, v2)) {
rpmlog(RPMLOG_ERR, _("types must match\n"));
return NULL;
}
if (valueIsInteger(v1)) {
int i1 = v1->data.i, i2 = v2->data.i;
valueFree(v1);
if (op == TOK_ADD)
v1 = valueMakeInteger(i1 + i2);
else
v1 = valueMakeInteger(i1 - i2);
} else {
char *copy;
if (op == TOK_MINUS) {
rpmlog(RPMLOG_ERR, _("- not suported for strings\n"));
return NULL;
}
copy = xmalloc(strlen(v1->data.s) + strlen(v2->data.s) + 1);
(void) stpcpy( stpcpy(copy, v1->data.s), v2->data.s);
valueFree(v1);
v1 = valueMakeString(copy);
}
}
if (v2) valueFree(v2);
return v1;
}
/**
* @param state expression parser state
*/
/*@null@*/
static Value doRelational(ParseState state)
/*@globals rpmGlobalMacroContext, h_errno, internalState @*/
/*@modifies state->nextToken, state->p, state->tokenValue,
rpmGlobalMacroContext, internalState @*/
{
Value v1, v2 = NULL;
DEBUG(printf("doRelational()\n"));
v1 = doAddSubtract(state);
if (v1 == NULL)
return NULL;
while (state->nextToken >= TOK_EQ && state->nextToken <= TOK_GE) {
int op = state->nextToken;
if (rdToken(state))
return NULL;
if (v2) valueFree(v2);
v2 = doAddSubtract(state);
if (v2 == NULL)
return NULL;
if (! valueSameType(v1, v2)) {
rpmlog(RPMLOG_ERR, _("types must match\n"));
return NULL;
}
if (valueIsInteger(v1)) {
int i1 = v1->data.i, i2 = v2->data.i, r = 0;
switch (op) {
case TOK_EQ:
r = (i1 == i2);
/*@switchbreak@*/ break;
case TOK_NEQ:
r = (i1 != i2);
/*@switchbreak@*/ break;
case TOK_LT:
r = (i1 < i2);
/*@switchbreak@*/ break;
case TOK_LE:
r = (i1 <= i2);
/*@switchbreak@*/ break;
case TOK_GT:
r = (i1 > i2);
/*@switchbreak@*/ break;
case TOK_GE:
r = (i1 >= i2);
/*@switchbreak@*/ break;
default:
/*@switchbreak@*/ break;
}
valueFree(v1);
v1 = valueMakeInteger(r);
} else {
const char * s1 = v1->data.s;
const char * s2 = v2->data.s;
int r = 0;
switch (op) {
case TOK_EQ:
r = (strcmp(s1,s2) == 0);
/*@switchbreak@*/ break;
case TOK_NEQ:
r = (strcmp(s1,s2) != 0);
/*@switchbreak@*/ break;
case TOK_LT:
r = (strcmp(s1,s2) < 0);
/*@switchbreak@*/ break;
case TOK_LE:
r = (strcmp(s1,s2) <= 0);
/*@switchbreak@*/ break;
case TOK_GT:
r = (strcmp(s1,s2) > 0);
/*@switchbreak@*/ break;
case TOK_GE:
r = (strcmp(s1,s2) >= 0);
/*@switchbreak@*/ break;
default:
/*@switchbreak@*/ break;
}
valueFree(v1);
v1 = valueMakeInteger(r);
}
}
if (v2) valueFree(v2);
return v1;
}
/**
* @param state expression parser state
*/
static Value doLogical(ParseState state)
/*@globals rpmGlobalMacroContext, h_errno @*/
/*@modifies state->nextToken, state->p, state->tokenValue,
rpmGlobalMacroContext @*/
{
Value v1, v2 = NULL;
DEBUG(printf("doLogical()\n"));
v1 = doRelational(state);
if (v1 == NULL)
return NULL;
while (state->nextToken == TOK_LOGICAL_AND
|| state->nextToken == TOK_LOGICAL_OR)
{
int op = state->nextToken;
if (rdToken(state))
return NULL;
if (v2) valueFree(v2);
v2 = doRelational(state);
if (v2 == NULL)
return NULL;
if (! valueSameType(v1, v2)) {
rpmlog(RPMLOG_ERR, _("types must match\n"));
return NULL;
}
if (valueIsInteger(v1)) {
int i1 = v1->data.i, i2 = v2->data.i;
valueFree(v1);
if (op == TOK_LOGICAL_AND)
v1 = valueMakeInteger(i1 && i2);
else
v1 = valueMakeInteger(i1 || i2);
} else {
rpmlog(RPMLOG_ERR, _("&& and || not suported for strings\n"));
return NULL;
}
}
if (v2) valueFree(v2);
return v1;
}
int parseExpressionBoolean(Spec spec, const char *expr)
{
struct _parseState state;
int result = -1;
Value v;
DEBUG(printf("parseExprBoolean(?, '%s')\n", expr));
/* Initialize the expression parser state. */
state.p = state.str = xstrdup(expr);
state.spec = spec;
state.nextToken = 0;
state.tokenValue = NULL;
(void) rdToken(&state);
/* Parse the expression. */
v = doLogical(&state);
if (!v) {
state.str = _free(state.str);
return -1;
}
/* If the next token is not TOK_EOF, we have a syntax error. */
if (state.nextToken != TOK_EOF) {
rpmlog(RPMLOG_ERR, _("syntax error in expression\n"));
state.str = _free(state.str);
return -1;
}
DEBUG(valueDump("parseExprBoolean:", v, stdout));
switch (v->type) {
case VALUE_TYPE_INTEGER:
result = v->data.i != 0;
break;
case VALUE_TYPE_STRING:
result = v->data.s[0] != '\0';
break;
default:
break;
}
state.str = _free(state.str);
valueFree(v);
return result;
}
char * parseExpressionString(Spec spec, const char *expr)
{
struct _parseState state;
char *result = NULL;
Value v;
DEBUG(printf("parseExprString(?, '%s')\n", expr));
/* Initialize the expression parser state. */
state.p = state.str = xstrdup(expr);
state.spec = spec;
state.nextToken = 0;
state.tokenValue = NULL;
(void) rdToken(&state);
/* Parse the expression. */
v = doLogical(&state);
if (!v) {
state.str = _free(state.str);
return NULL;
}
/* If the next token is not TOK_EOF, we have a syntax error. */
if (state.nextToken != TOK_EOF) {
rpmlog(RPMLOG_ERR, _("syntax error in expression\n"));
state.str = _free(state.str);
return NULL;
}
DEBUG(valueDump("parseExprString:", v, stdout));
switch (v->type) {
case VALUE_TYPE_INTEGER: {
char buf[128];
sprintf(buf, "%d", v->data.i);
result = xstrdup(buf);
} break;
case VALUE_TYPE_STRING:
result = xstrdup(v->data.s);
break;
default:
break;
}
state.str = _free(state.str);
valueFree(v);
return result;
}

3187
rpm-5.4.9/build/files.c Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,61 @@
LIBRPMBUILD_0
{
global:
addChangelogEntry;
addReqProv;
addSource;
buildHost;
buildSpec;
closeSpec;
doScript;
_fini;
freeNames;
freePackages;
getBuildTime;
getGidS;
getGname;
getGnameS;
getUidS;
getUname;
getUnameS;
handleComments;
_init;
initSourceHeader;
isPart;
lookupPackage;
newOpenFileInfo;
newPackage;
newSpec;
noLang;
packageBinaries;
packageSources;
parseBuildInstallClean;
parseChangelog;
parseDescription;
parseExpressionBoolean;
parseExpressionString;
parseFiles;
parseNoSource;
parseNum;
parsePreamble;
parsePrep;
parseRCPOT;
parseScript;
parseSpec;
_pkgPool;
processBinaryFiles;
processSourceFiles;
readLine;
readRPM;
rpmBTArgs;
rpmBuildPoptTable;
rpmlibNeedsFeature;
rpmspecQuery;
_specPool;
stashSt;
verifyAttrs;
virtualFileAttributes;
writeRPM;
local:
*;
};

20
rpm-5.4.9/build/misc.c Normal file
View file

@ -0,0 +1,20 @@
/** \ingroup rpmbuild
* \file build/misc.c
*/
#include "system.h"
#include <rpmio.h>
#include <rpmiotypes.h>
#include "rpmbuild.h"
#include "debug.h"
int parseNum(const char * line, rpmuint32_t * res)
{
char * s1 = NULL;
unsigned long rc;
if (line == NULL) return 1;
rc = strtoul(line, &s1, 10);
if (res) *res = rc;
return (((*s1) || (s1 == line) || (rc == ULONG_MAX)) ? 1 : 0);
}

228
rpm-5.4.9/build/names.c Normal file
View file

@ -0,0 +1,228 @@
/*@-mods@*/
/** \ingroup rpmbuild
* \file build/names.c
* Simple user/group name/id cache (plus hostname and buildtime)
*/
#include "system.h"
#include <rpmio.h>
#include <rpmiotypes.h>
#include <rpmlog.h>
#include "rpmbuild.h"
#include "debug.h"
typedef /*@owned@*/ /*@null@*/ const char * ugstr_t;
/*@unchecked@*/
static uid_t uids[1024];
/*@unchecked@*/
static ugstr_t unames[1024];
/*@unchecked@*/
static int uid_used = 0;
/*@unchecked@*/
static gid_t gids[1024];
/*@unchecked@*/
static ugstr_t gnames[1024];
/*@unchecked@*/
static int gid_used = 0;
void freeNames(void)
{
int x;
for (x = 0; x < uid_used; x++)
unames[x] = _free(unames[x]);
for (x = 0; x < gid_used; x++)
gnames[x] = _free(gnames[x]);
}
const char *getUname(uid_t uid)
/*@globals uid_used, uids, unames @*/
/*@modifies uid_used, uids, unames @*/
{
struct passwd *pw;
int x;
for (x = 0; x < uid_used; x++) {
if (unames[x] == NULL) continue;
if (uids[x] == uid)
return unames[x];
}
/* XXX - This is the other hard coded limit */
if (x == 1024)
rpmlog(RPMLOG_CRIT, _("getUname: too many uid's\n"));
if ((pw = getpwuid(uid)) == NULL)
return NULL;
uids[uid_used] = uid;
unames[uid_used] = xstrdup(pw->pw_name);
return unames[uid_used++];
}
const char *getUnameS(const char *uname)
/*@globals uid_used, uids, unames @*/
/*@modifies uid_used, uids, unames @*/
{
struct passwd *pw;
int x;
for (x = 0; x < uid_used; x++) {
if (unames[x] == NULL) continue;
if (!strcmp(unames[x],uname))
return unames[x];
}
/* XXX - This is the other hard coded limit */
if (x == 1024)
rpmlog(RPMLOG_CRIT, _("getUnameS: too many uid's\n"));
if ((pw = getpwnam(uname)) == NULL) {
uids[uid_used] = -1;
unames[uid_used] = xstrdup(uname);
} else {
uids[uid_used] = pw->pw_uid;
unames[uid_used] = xstrdup(pw->pw_name);
}
return unames[uid_used++];
}
uid_t getUidS(const char *uname)
/*@globals uid_used, uids, unames @*/
/*@modifies uid_used, uids, unames @*/
{
struct passwd *pw;
int x;
for (x = 0; x < uid_used; x++) {
if (unames[x] == NULL) continue;
if (!strcmp(unames[x],uname))
return uids[x];
}
/* XXX - This is the other hard coded limit */
if (x == 1024)
rpmlog(RPMLOG_CRIT, _("getUidS: too many uid's\n"));
if ((pw = getpwnam(uname)) == NULL) {
uids[uid_used] = -1;
unames[uid_used] = xstrdup(uname);
} else {
uids[uid_used] = pw->pw_uid;
unames[uid_used] = xstrdup(pw->pw_name);
}
return uids[uid_used++];
}
const char *getGname(gid_t gid)
/*@globals gid_used, gids, gnames @*/
/*@modifies gid_used, gids, gnames @*/
{
struct group *gr;
int x;
for (x = 0; x < gid_used; x++) {
if (gnames[x] == NULL) continue;
if (gids[x] == gid)
return gnames[x];
}
/* XXX - This is the other hard coded limit */
if (x == 1024)
rpmlog(RPMLOG_CRIT, _("getGname: too many gid's\n"));
if ((gr = getgrgid(gid)) == NULL)
return NULL;
gids[gid_used] = gid;
gnames[gid_used] = xstrdup(gr->gr_name);
return gnames[gid_used++];
}
const char *getGnameS(const char *gname)
/*@globals gid_used, gids, gnames @*/
/*@modifies gid_used, gids, gnames @*/
{
struct group *gr;
int x;
for (x = 0; x < gid_used; x++) {
if (gnames[x] == NULL) continue;
if (!strcmp(gnames[x], gname))
return gnames[x];
}
/* XXX - This is the other hard coded limit */
if (x == 1024)
rpmlog(RPMLOG_CRIT, _("getGnameS: too many gid's\n"));
if ((gr = getgrnam(gname)) == NULL) {
gids[gid_used] = -1;
gnames[gid_used] = xstrdup(gname);
} else {
gids[gid_used] = gr->gr_gid;
gnames[gid_used] = xstrdup(gr->gr_name);
}
return gnames[gid_used++];
}
gid_t getGidS(const char *gname)
/*@globals gid_used, gids, gnames @*/
/*@modifies gid_used, gids, gnames @*/
{
struct group *gr;
int x;
for (x = 0; x < gid_used; x++) {
if (gnames[x] == NULL) continue;
if (!strcmp(gnames[x], gname))
return gids[x];
}
/* XXX - This is the other hard coded limit */
if (x == 1024)
rpmlog(RPMLOG_CRIT, _("getGidS: too many gid's\n"));
if ((gr = getgrnam(gname)) == NULL) {
gids[gid_used] = -1;
gnames[gid_used] = xstrdup(gname);
} else {
gids[gid_used] = gr->gr_gid;
gnames[gid_used] = xstrdup(gr->gr_name);
}
return gids[gid_used++];
}
rpmuint32_t * getBuildTime(void)
{
static rpmuint32_t buildTime[1];
if (buildTime[0] == 0)
buildTime[0] = (rpmuint32_t) time(NULL);
return buildTime;
}
const char * buildHost(void)
{
static char hostname[1024];
static int oneshot = 0;
struct hostent *hbn;
if (! oneshot) {
(void) gethostname(hostname, sizeof(hostname));
/*@-unrecog -multithreaded @*/
/*@-globs@*/ /* FIX: h_errno access */
hbn = gethostbyname(hostname);
/*@=globs@*/
/*@=unrecog =multithreaded @*/
if (hbn)
strcpy(hostname, hbn->h_name);
else
rpmlog(RPMLOG_WARNING,
_("Could not canonicalize hostname: %s\n"), hostname);
oneshot = 1;
}
return(hostname);
}
/*@=mods@*/

1351
rpm-5.4.9/build/pack.c Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,91 @@
/** \ingroup rpmbuild
* \file build/parseBuildInstallClean.c
* Parse %build/%install/%clean section from spec file.
*/
#include "system.h"
#include <rpmio.h>
#include <rpmiotypes.h>
#include <rpmlog.h>
#define _RPMTAG_INTERNAL
#include "rpmbuild.h"
#include "debug.h"
int parseBuildInstallClean(Spec spec, rpmParseState parsePart)
{
rpmParseState nextPart;
rpmiob *iobp = NULL;
const char *name = NULL;
rpmRC rc;
switch (parsePart) {
case PART_BUILD:
iobp = &spec->build;
name = "build";
break;
case PART_INSTALL:
iobp = &spec->install;
name = "install";
break;
case PART_CHECK:
iobp = &spec->check;
name = "check";
break;
case PART_CLEAN:
iobp = &spec->clean;
name = "clean";
break;
case PART_ARBITRARY:
assert(spec->nfoo > 0);
iobp = &spec->foo[spec->nfoo-1].iob;
name = spec->foo[spec->nfoo-1].str;
break;
default:
rpmlog(RPMLOG_ERR, _("line %d: unknown specfile section\n"),
spec->lineNum);
return RPMRC_FAIL;
break;
}
if (*iobp != NULL) {
rpmlog(RPMLOG_ERR, _("line %d: second %%%s section\n"),
spec->lineNum, name);
return RPMRC_FAIL;
}
*iobp = rpmiobNew(0);
/* Make sure the buildroot is removed where needed. */
if (parsePart == PART_INSTALL) {
const char * s = rpmExpand("%{!?__spec_install_pre:%{?buildroot:%{__rm} -rf '%{buildroot}'\n%{__mkdir_p} '%{buildroot}'\n}}\n", NULL);
if (s && *s)
*iobp = rpmiobAppend(*iobp, s, 0);
s = _free(s);
} else if (parsePart == PART_CLEAN) {
const char * s = rpmExpand("%{?__spec_clean_body}%{!?__spec_clean_body:%{?buildroot:rm -rf '%{buildroot}'\n}}\n", NULL);
if (s && *s)
*iobp = rpmiobAppend(*iobp, s, 0);
s = _free(s);
#if !defined(RPM_VENDOR_OPENPKG) /* still-support-section-clean */
/* OpenPKG still wishes to use "%clean" script/section */
iobp = NULL; /* XXX skip %clean from spec file. */
#endif
}
/* There are no options to %build, %install, %check, or %clean */
if ((rc = readLine(spec, STRIP_NOTHING)) > 0)
return PART_NONE;
if (rc != RPMRC_OK)
return rc;
while ((nextPart = isPart(spec)) == PART_NONE) {
if (iobp)
*iobp = rpmiobAppend(*iobp, spec->line, 0);
if ((rc = readLine(spec, STRIP_NOTHING)) > 0)
return PART_NONE;
if (rc)
return rc;
}
return nextPart;
}

View file

@ -0,0 +1,303 @@
/** \ingroup rpmbuild
* \file build/parseChangelog.c
* Parse %changelog section from spec file.
*/
#include "system.h"
#include <rpmio.h>
#include <rpmiotypes.h>
#include <rpmlog.h>
#include "rpmbuild.h"
#include "debug.h"
#define mySKIPSPACE(s) { while (*(s) && isspace(*(s))) (s)++; }
#define mySKIPNONSPACE(s) { while (*(s) && !isspace(*(s))) (s)++; }
void addChangelogEntry(Header h, time_t time, const char *name, const char *text)
{
HE_t he = (HE_t) memset(alloca(sizeof(*he)), 0, sizeof(*he));
rpmuint32_t mytime = (rpmuint32_t)time; /* XXX convert to rpmuint32_t for header */
int xx;
he->tag = RPMTAG_CHANGELOGTIME;
he->t = RPM_UINT32_TYPE;
he->p.ui32p = &mytime;
he->c = 1;
he->append = 1;
xx = headerPut(h, he, 0);
he->append = 0;
he->tag = RPMTAG_CHANGELOGNAME;
he->t = RPM_STRING_ARRAY_TYPE;
he->p.argv = &name;
he->c = 1;
he->append = 1;
xx = headerPut(h, he, 0);
he->append = 0;
he->tag = RPMTAG_CHANGELOGTEXT;
he->t = RPM_STRING_ARRAY_TYPE;
he->p.argv = &text;
he->c = 1;
he->append = 1;
xx = headerPut(h, he, 0);
he->append = 0;
}
/**
* Parse date string to seconds.
* @param datestr date string (e.g. 'Wed Jan 1 1997')
* @retval secs secs since the unix epoch
* @return 0 on success, -1 on error
*/
static int dateToTimet(const char * datestr, /*@out@*/ time_t * secs)
/*@modifies *secs @*/
{
struct tm time;
time_t timezone_offset;
char * p, * pe, * q, ** idx;
char * date = strcpy(alloca(strlen(datestr) + 1), datestr);
/*@observer@*/ static char * days[] =
{ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", NULL };
/*@observer@*/ static char * months[] =
{ "Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec", NULL };
/*@observer@*/ static char lengths[] =
{ 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
memset(&time, 0, sizeof(time));
pe = date;
/* day of week */
p = pe; mySKIPSPACE(p);
if (*p == '\0') return -1;
pe = p; mySKIPNONSPACE(pe); if (*pe != '\0') *pe++ = '\0';
for (idx = days; *idx && strcmp(*idx, p); idx++)
{};
if (*idx == NULL) return -1;
/* month */
p = pe; mySKIPSPACE(p);
if (*p == '\0') return -1;
pe = p; mySKIPNONSPACE(pe); if (*pe != '\0') *pe++ = '\0';
for (idx = months; *idx && strcmp(*idx, p); idx++)
{};
if (*idx == NULL) return -1;
time.tm_mon = idx - months;
/* day */
p = pe; mySKIPSPACE(p);
if (*p == '\0') return -1;
pe = p; mySKIPNONSPACE(pe); if (*pe != '\0') *pe++ = '\0';
/* make this noon so the day is always right (as we make this UTC) */
time.tm_hour = 12;
time.tm_mday = strtol(p, &q, 10);
if (!(q && *q == '\0')) return -1;
if (time.tm_mday < 0 || time.tm_mday > lengths[time.tm_mon]) return -1;
/* year */
p = pe; mySKIPSPACE(p);
if (*p == '\0') return -1;
pe = p; mySKIPNONSPACE(pe); if (*pe != '\0') *pe++ = '\0';
time.tm_year = strtol(p, &q, 10);
if (!(q && *q == '\0')) return -1;
if (time.tm_year < 1990 || time.tm_year >= 3000) return -1;
time.tm_year -= 1900;
*secs = mktime(&time);
if (*secs == -1) return -1;
/* determine timezone offset */
/*@-nullpass@*/ /* gmtime(3) unlikely to return NULL soon. */
timezone_offset = mktime(gmtime(secs)) - *secs;
/*@=nullpass@*/
/* adjust to UTC */
*secs += timezone_offset;
return 0;
}
/*@-redecl@*/
extern time_t get_date(const char * p, void * now); /* XXX expedient lies */
/*@=redecl@*/
/**
* Add %changelog section to header.
* @param h header
* @param iob changelog strings
* @return RPMRC_OK on success
*/
static rpmRC addChangelog(Header h, rpmiob iob)
/*@globals rpmGlobalMacroContext, h_errno, internalState @*/
/*@modifies h, rpmGlobalMacroContext, internalState @*/
{
char * s = rpmiobStr(iob);
char * se;
char *date, *name, *text;
int i;
time_t time;
time_t lastTime = 0;
int nentries = 0;
static time_t last = 0;
static int oneshot = 0;
/* Determine changelog truncation criteria. */
if (!oneshot++) {
char * t = rpmExpand("%{?_changelog_truncate}", NULL);
char *te = NULL;
if (t && *t) {
long res = strtol(t, &te, 0);
if (res >= 0 && *te == '\0') {
last = res; /* truncate to no. of entries. */
} else {
/*@-moduncon@*/
res = (long)get_date (t, NULL);
/*@=moduncon@*/
/* XXX malformed date string silently ignored. */
if (res > 0) {
last = res; /* truncate to date. */
}
}
}
t = _free(t);
}
/* skip space */
mySKIPSPACE(s);
while (*s != '\0') {
if (*s != '*') {
rpmlog(RPMLOG_ERR,
_("%%changelog entries must start with *\n"));
return RPMRC_FAIL;
}
/* find end of line */
date = s;
while(*s && *s != '\n') s++;
if (! *s) {
rpmlog(RPMLOG_ERR, _("incomplete %%changelog entry\n"));
return RPMRC_FAIL;
}
/*@-modobserver@*/
*s = '\0';
/*@=modobserver@*/
text = s + 1;
/* 4 fields of date */
date++;
s = date;
for (i = 0; i < 4; i++) {
mySKIPSPACE(s);
mySKIPNONSPACE(s);
}
mySKIPSPACE(date);
if (dateToTimet(date, &time)) {
rpmlog(RPMLOG_ERR, _("bad date in %%changelog: %s\n"), date);
return RPMRC_FAIL;
}
if (lastTime && lastTime < time) {
rpmlog(RPMLOG_ERR,
_("%%changelog not in descending chronological order\n"));
return RPMRC_FAIL;
}
lastTime = time;
/* skip space to the name */
mySKIPSPACE(s);
if (! *s) {
rpmlog(RPMLOG_ERR, _("missing name in %%changelog\n"));
return RPMRC_FAIL;
}
/* name */
name = s;
while (*s != '\0') s++;
while (s > name && isspace(*s))
*s-- = '\0';
if (s == name) {
rpmlog(RPMLOG_ERR, _("missing name in %%changelog\n"));
return RPMRC_FAIL;
}
/* text */
mySKIPSPACE(text);
if (! *text) {
rpmlog(RPMLOG_ERR, _("no description in %%changelog\n"));
return RPMRC_FAIL;
}
/* find the next leading '*' (or eos) */
s = text;
do {
s++;
} while (*s && (*(s-1) != '\n' || *s != '*'));
se = s;
s--;
/* backup to end of description */
while ((s > text) && xisspace(*s))
*s-- = '\0';
/* Add entry if not truncated. */
nentries++;
if (last <= 0
|| (last < 1000 && nentries < (int)last)
|| (last > 1000 && time >= last))
addChangelogEntry(h, time, name, text);
s = se;
}
return 0;
}
int parseChangelog(Spec spec)
{
rpmParseState nextPart;
rpmiob iob = rpmiobNew(0);
rpmRC rc;
/* There are no options to %changelog */
if ((rc = readLine(spec, STRIP_COMMENTS)) > 0) {
iob = rpmiobFree(iob);
#if defined(RPM_VENDOR_MANDRIVA)
return (spec->clean == NULL) ? PART_CLEAN : PART_NONE;
#else
return PART_NONE;
#endif
}
if (rc != RPMRC_OK)
return rc;
while ((nextPart = isPart(spec)) == PART_NONE) {
const char * line;
line = xstrdup(spec->line);
line = xstrtolocale(line);
iob = rpmiobAppend(iob, spec->line, 0);
line = _free(line);
if ((rc = readLine(spec, STRIP_COMMENTS | STRIP_NOEXPAND)) > 0) {
#if defined(RPM_VENDOR_MANDRIVA)
nextPart = (spec->clean == NULL) ? PART_CLEAN : PART_NONE;
#else
nextPart = PART_NONE;
#endif
break;
}
if (rc != RPMRC_OK)
return rc;
}
rc = addChangelog(spec->packages->header, iob);
iob = rpmiobFree(iob);
return (rc != RPMRC_OK ? rc : (rpmRC)nextPart);
}

View file

@ -0,0 +1,150 @@
/** \ingroup rpmbuild
* \file build/parseDescription.c
* Parse %description section from spec file.
*/
#include "system.h"
#include <rpmio.h>
#include <rpmiotypes.h>
#include <rpmlog.h>
#include "rpmbuild.h"
#include "debug.h"
/*@-exportheadervar@*/
/*@unchecked@*/
extern int noLang;
/*@=exportheadervar@*/
/* These have to be global scope to make up for *stupid* compilers */
/*@unchecked@*/
/*@observer@*/ /*@null@*/ static const char *name = NULL;
/*@unchecked@*/
/*@observer@*/ /*@null@*/ static const char *lang = NULL;
/*@unchecked@*/
static struct poptOption optionsTable[] = {
{ NULL, 'n', POPT_ARG_STRING, &name, 0, NULL, NULL},
{ NULL, 'l', POPT_ARG_STRING, &lang, 0, NULL, NULL},
{ 0, 0, 0, 0, 0, NULL, NULL}
};
int parseDescription(Spec spec)
/*@globals name, lang @*/
/*@modifies name, lang @*/
{
HE_t he = (HE_t) memset(alloca(sizeof(*he)), 0, sizeof(*he));
rpmParseState nextPart = (rpmParseState) RPMRC_FAIL; /* assume error */
rpmiob iob = NULL;
int flag = PART_SUBNAME;
Package pkg;
int rc, argc;
int arg;
const char **argv = NULL;
poptContext optCon = NULL;
spectag t = NULL;
int xx;
{ char * se = strchr(spec->line, '#');
if (se) {
*se = '\0';
while (--se >= spec->line && strchr(" \t\n\r", *se) != NULL)
*se = '\0';
}
}
if ((rc = poptParseArgvString(spec->line, &argc, &argv))) {
rpmlog(RPMLOG_ERR, _("line %d: Error parsing %%description: %s\n"),
spec->lineNum, poptStrerror(rc));
goto exit;
}
name = NULL;
lang = RPMBUILD_DEFAULT_LANG;
optCon = poptGetContext(NULL, argc, argv, optionsTable, 0);
while ((arg = poptGetNextOpt(optCon)) > 0)
{;}
if (name != NULL)
flag = PART_NAME;
if (arg < -1) {
rpmlog(RPMLOG_ERR, _("line %d: Bad option %s: %s\n"),
spec->lineNum,
poptBadOption(optCon, POPT_BADOPTION_NOALIAS),
spec->line);
goto exit;
}
if (poptPeekArg(optCon)) {
if (name == NULL)
name = poptGetArg(optCon);
if (poptPeekArg(optCon)) {
rpmlog(RPMLOG_ERR, _("line %d: Too many names: %s\n"),
spec->lineNum, spec->line);
goto exit;
}
}
if (lookupPackage(spec, name, flag, &pkg) != RPMRC_OK) {
rpmlog(RPMLOG_ERR, _("line %d: Package does not exist: %s\n"),
spec->lineNum, spec->line);
goto exit;
}
/* Lose the inheirited %description (if present). */
if (spec->packages->header != pkg->header) {
he->tag = RPMTAG_DESCRIPTION;
xx = headerGet(pkg->header, he, 0);
he->p.ptr = _free(he->p.ptr);
if (xx && he->t == RPM_STRING_TYPE)
xx = headerDel(pkg->header, he, 0);
}
t = stashSt(spec, pkg->header, RPMTAG_DESCRIPTION, lang);
iob = rpmiobNew(0);
if ((rc = readLine(spec, STRIP_TRAILINGSPACE | STRIP_COMMENTS)) > 0) {
nextPart = PART_NONE;
goto exit;
}
if (rc < 0) {
nextPart = (rpmParseState) RPMRC_FAIL;
goto exit;
}
while ((nextPart = isPart(spec)) == PART_NONE) {
iob = rpmiobAppend(iob, spec->line, 1);
if (t) t->t_nlines++;
if ((rc = readLine(spec, STRIP_TRAILINGSPACE | STRIP_COMMENTS)) > 0) {
nextPart = PART_NONE;
break;
}
if (rc) {
nextPart = (rpmParseState) RPMRC_FAIL;
goto exit;
}
}
iob = rpmiobRTrim(iob);
if (!(noLang && strcmp(lang, RPMBUILD_DEFAULT_LANG))) {
#if defined(SUPPORT_I18NSTRING_TYPE)
const char * s = rpmiobStr(iob);
(void) headerAddI18NString(pkg->header, RPMTAG_DESCRIPTION, s, lang);
#else
if (!strcmp(lang, RPMBUILD_DEFAULT_LANG)) {
he->tag = RPMTAG_DESCRIPTION;
he->t = RPM_STRING_TYPE;
he->p.str = rpmiobStr(iob);
he->c = 1;
xx = headerPut(pkg->header, he, 0);
}
#endif
}
exit:
iob = rpmiobFree(iob);
argv = _free(argv);
optCon = poptFreeContext(optCon);
return nextPart;
}

View file

@ -0,0 +1,129 @@
/** \ingroup rpmbuild
* \file build/parseFiles.c
* Parse %files section from spec file.
*/
#include "system.h"
#include <rpmio.h>
#include <rpmiotypes.h>
#include <rpmlog.h>
#include "rpmbuild.h"
#include "debug.h"
/*@access poptContext @*/ /* compared with NULL */
/* These have to be global scope to make up for *stupid* compilers */
/*@unchecked@*/
/*@observer@*/ /*@null@*/ static const char *name = NULL;
/*@unchecked@*/
/*@observer@*/ /*@null@*/ static const char *file = NULL;
/*@unchecked@*/
static struct poptOption optionsTable[] = {
{ NULL, 'n', POPT_ARG_STRING, &name, 'n', NULL, NULL},
{ NULL, 'f', POPT_ARG_STRING, &file, 'f', NULL, NULL},
{ 0, 0, 0, 0, 0, NULL, NULL}
};
int parseFiles(Spec spec)
{
rpmParseState nextPart;
Package pkg;
int rc, argc;
int arg;
const char ** argv = NULL;
int flag = PART_SUBNAME;
poptContext optCon = NULL;
/*@-mods@*/
name = NULL;
file = NULL;
/*@=mods@*/
if ((rc = poptParseArgvString(spec->line, &argc, &argv))) {
rpmlog(RPMLOG_ERR, _("line %d: Error parsing %%files: %s\n"),
spec->lineNum, poptStrerror(rc));
rc = RPMRC_FAIL;
goto exit;
}
optCon = poptGetContext(NULL, argc, argv, optionsTable, 0);
while ((arg = poptGetNextOpt(optCon)) > 0) {
if (arg == 'n') {
flag = PART_NAME;
}
}
if (arg < -1) {
rpmlog(RPMLOG_ERR, _("line %d: Bad option %s: %s\n"),
spec->lineNum,
poptBadOption(optCon, POPT_BADOPTION_NOALIAS),
spec->line);
rc = RPMRC_FAIL;
goto exit;
}
if (poptPeekArg(optCon)) {
/*@-mods@*/
if (name == NULL)
name = poptGetArg(optCon);
/*@=mods@*/
if (poptPeekArg(optCon)) {
rpmlog(RPMLOG_ERR, _("line %d: Too many names: %s\n"),
spec->lineNum,
spec->line);
rc = RPMRC_FAIL;
goto exit;
}
}
if (lookupPackage(spec, name, flag, &pkg) != RPMRC_OK) {
rpmlog(RPMLOG_ERR, _("line %d: Package does not exist: %s\n"),
spec->lineNum, spec->line);
rc = RPMRC_FAIL;
goto exit;
}
if (pkg->fileList != NULL) {
rpmlog(RPMLOG_ERR, _("line %d: Second %%files list\n"),
spec->lineNum);
rc = RPMRC_FAIL;
goto exit;
}
if (file) {
/* XXX not necessary as readline has expanded already, but won't hurt. */
pkg->fileFile = rpmGetPath(file, NULL);
}
pkg->fileList = rpmiobNew(0);
if ((rc = readLine(spec, STRIP_COMMENTS)) > 0) {
nextPart = PART_NONE;
} else {
if (rc)
goto exit;
while ((nextPart = isPart(spec)) == PART_NONE) {
pkg->fileList = rpmiobAppend(pkg->fileList, spec->line, 0);
if ((rc = readLine(spec, STRIP_COMMENTS)) > 0) {
nextPart = PART_NONE;
break;
}
if (rc)
goto exit;
}
}
#if defined(RPM_VENDOR_MANDRIVA)
/* if no %clean section, add implicit */
rc = (nextPart == PART_NONE && spec->clean == NULL) ? PART_CLEAN : nextPart;
#else
rc = nextPart;
#endif
exit:
argv = _free(argv);
optCon = poptFreeContext(optCon);
return rc;
}

File diff suppressed because it is too large Load diff

955
rpm-5.4.9/build/parsePrep.c Normal file
View file

@ -0,0 +1,955 @@
/** \ingroup rpmbuild
* \file build/parsePrep.c
* Parse %prep section from spec file.
*/
#include "system.h"
#include <rpmio.h>
#include <rpmiotypes.h>
#include <argv.h>
#include <rpmcb.h>
#include <rpmurl.h>
#ifdef NOTYET
#include <rpmmg.h>
#endif
#include <rpmbuild.h>
#include "misc.h" /* XXX rpmMkdirPath */
#include "debug.h"
/* These have to be global to make up for stupid compilers */
/*@unchecked@*/
static int leaveDirs, skipDefaultAction;
/*@unchecked@*/
static int createDir, quietly;
/*@unchecked@*/ /*@observer@*/ /*@null@*/
static const char * dirName = NULL;
/*@unchecked@*/ /*@observer@*/
static struct poptOption optionsTable[] = {
{ NULL, 'a', POPT_ARG_STRING, NULL, 'a', NULL, NULL},
{ NULL, 'b', POPT_ARG_STRING, NULL, 'b', NULL, NULL},
{ NULL, 'c', 0, &createDir, 0, NULL, NULL},
{ NULL, 'D', 0, &leaveDirs, 0, NULL, NULL},
{ NULL, 'n', POPT_ARG_STRING, &dirName, 0, NULL, NULL},
{ NULL, 'T', 0, &skipDefaultAction, 0, NULL, NULL},
{ NULL, 'q', 0, &quietly, 0, NULL, NULL},
{ 0, 0, 0, 0, 0, NULL, NULL}
};
/**
* Check that file owner and group are known.
* @param urlfn file url
* @return RPMRC_OK on success
*/
static rpmRC checkOwners(const char * urlfn)
/*@globals h_errno, fileSystem, internalState @*/
/*@modifies fileSystem, internalState @*/
{
struct stat sb;
if (Lstat(urlfn, &sb)) {
rpmlog(RPMLOG_ERR, _("Bad source: %s: %s\n"),
urlfn, strerror(errno));
return RPMRC_FAIL;
}
if (!getUname(sb.st_uid) || !getGname(sb.st_gid)) {
rpmlog(RPMLOG_ERR, _("Bad owner/group: %s\n"), urlfn);
return RPMRC_FAIL;
}
return RPMRC_OK;
}
#ifndef DYING
/**
* Expand %patchN macro into %prep scriptlet.
* @param spec build info
* @param c patch index
* @param strip patch level (i.e. patch -p argument)
* @param db saved file suffix (i.e. patch --suffix argument)
* @param reverse include -R?
* @param removeEmpties include -E?
* @param fuzz include -F? (fuzz<0 means no)
* @param subdir sub-directory (i.e patch -d argument);
* @return expanded %patch macro (NULL on error)
*/
/*@observer@*/
static char *doPatch(Spec spec, rpmuint32_t c, int strip, const char *db,
int reverse, int removeEmpties, int fuzz, const char *subdir)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies rpmGlobalMacroContext, fileSystem, internalState @*/
{
const char *fn, *Lurlfn;
static char buf[BUFSIZ];
char args[BUFSIZ], *t = args;
struct Source *sp;
rpmCompressedMagic compressed = COMPRESSED_NOT;
int urltype;
const char *patch, *flags;
*t = '\0';
if (db)
t = stpcpy( stpcpy(t, "-b --suffix "), db);
#if defined(RPM_VENDOR_OPENPKG) /* always-backup-on-patching */
/* always create backup files in OpenPKG */
else
t = stpcpy(t, "-b --suffix .orig ");
#endif
if (subdir)
t = stpcpy( stpcpy(t, "-d "), subdir);
if (fuzz >= 0) {
t = stpcpy(t, "-F ");
sprintf(t, "%10.10d", fuzz);
t += strlen(t);
}
if (reverse)
t = stpcpy(t, " -R");
if (removeEmpties)
t = stpcpy(t, " -E");
for (sp = spec->sources; sp != NULL; sp = sp->next) {
if ((sp->flags & RPMFILE_PATCH) && (sp->num == c))
break;
}
if (sp == NULL) {
rpmlog(RPMLOG_ERR, _("No patch number %d\n"), c);
return NULL;
}
Lurlfn = rpmGenPath(NULL, "%{_patchdir}/", sp->source);
/* XXX On non-build parse's, file cannot be stat'd or read */
if (!spec->force && (isCompressed(Lurlfn, &compressed) || checkOwners(Lurlfn))) {
Lurlfn = _free(Lurlfn);
return NULL;
}
fn = NULL;
urltype = urlPath(Lurlfn, &fn);
switch (urltype) {
case URL_IS_HTTPS: /* XXX WRONG WRONG WRONG */
case URL_IS_HTTP: /* XXX WRONG WRONG WRONG */
case URL_IS_FTP: /* XXX WRONG WRONG WRONG */
case URL_IS_HKP: /* XXX WRONG WRONG WRONG */
case URL_IS_MONGO: /* XXX FIXME */
case URL_IS_PATH:
case URL_IS_UNKNOWN:
break;
case URL_IS_DASH:
Lurlfn = _free(Lurlfn);
return NULL;
/*@notreached@*/ break;
}
patch = rpmGetPath("%{__patch}", NULL);
if (strcmp(patch, "%{__patch}") == 0)
patch = xstrdup("patch");
flags = rpmExpand("%{?_default_patch_flags}%{!?_default_patch_flags:-s}", NULL);
if (compressed) {
const char *zipper;
switch (compressed) {
default:
case COMPRESSED_NOT: /* XXX can't happen */
case COMPRESSED_OTHER:
case COMPRESSED_ZIP: /* XXX wrong */
zipper = "%{__gzip}";
break;
case COMPRESSED_BZIP2:
zipper = "%{__bzip2}";
break;
case COMPRESSED_LZOP:
zipper = "%{__lzop}";
break;
case COMPRESSED_LZMA:
zipper = "%{__lzma}";
break;
case COMPRESSED_XZ:
zipper = "%{__xz}";
break;
}
zipper = rpmGetPath(zipper, NULL);
sprintf(buf,
"echo \"Patch #%d (%s):\"\n"
"%s -d < '%s' | %s -p%d %s %s\n"
"STATUS=$?\n"
"if [ $STATUS -ne 0 ]; then\n"
" exit $STATUS\n"
"fi",
c,
/*@-moduncon@*/
(const char *) basename((char *)fn),
/*@=moduncon@*/
zipper,
fn, patch, strip, args, flags);
zipper = _free(zipper);
} else {
sprintf(buf,
"echo \"Patch #%d (%s):\"\n"
"%s -p%d %s %s < '%s'", c,
/*@-moduncon@*/
(const char *) basename((char *)fn),
/*@=moduncon@*/
patch, strip, args, flags, fn);
}
patch = _free(patch);
flags = _free(flags);
Lurlfn = _free(Lurlfn);
return buf;
}
#endif
/**
* Expand %setup macro into %prep scriptlet.
* @param spec build info
* @param c source index
* @param quietly should -vv be omitted from tar?
* @return expanded %setup macro (NULL on error)
*/
/*@observer@*/
static const char *doUntar(Spec spec, rpmuint32_t c, int quietly)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies rpmGlobalMacroContext, fileSystem, internalState @*/
{
const char *fn, *Lurlfn;
static char buf[BUFSIZ];
char taropts[8];
char *t = NULL;
struct Source *sp;
rpmCompressedMagic compressed = COMPRESSED_NOT;
int urltype;
const char *tar;
int rubygem = 0;
for (sp = spec->sources; sp != NULL; sp = sp->next) {
if ((sp->flags & RPMFILE_SOURCE) && (sp->num == c)) {
break;
}
}
if (sp == NULL) {
rpmlog(RPMLOG_ERR, _("No source number %d\n"), c);
return NULL;
}
t = strrchr(sp->source, '.');
if(t && !strcasecmp(t, ".gem"))
rubygem = 1;
t = stpcpy(taropts, "-x");
/*@-internalglobs@*/ /* FIX: shrug */
if(rpmIsVerbose() && !quietly)
t = stpcpy(t, "vv");
if(rubygem)
t = stpcpy(t, "m");
t = stpcpy(t, "f");
/*@=internalglobs@*/
#if defined(RPM_VENDOR_OPENPKG) /* splitted-source-directory */
Lurlfn = rpmGenPath(NULL, getSourceDir(sp->flags, sp->source), sp->source);
#else
Lurlfn = rpmGenPath(NULL, getSourceDir(sp->flags), sp->source);
#endif
/* XXX On non-build parse's, file cannot be stat'd or read */
if (!spec->force && (isCompressed(Lurlfn, &compressed) || checkOwners(Lurlfn))) {
Lurlfn = _free(Lurlfn);
return NULL;
}
fn = NULL;
urltype = urlPath(Lurlfn, &fn);
switch (urltype) {
case URL_IS_HTTPS: /* XXX WRONG WRONG WRONG */
case URL_IS_HTTP: /* XXX WRONG WRONG WRONG */
case URL_IS_FTP: /* XXX WRONG WRONG WRONG */
case URL_IS_HKP: /* XXX WRONG WRONG WRONG */
case URL_IS_MONGO: /* XXX FIXME */
case URL_IS_PATH:
case URL_IS_UNKNOWN:
break;
case URL_IS_DASH:
Lurlfn = _free(Lurlfn);
return NULL;
/*@notreached@*/ break;
}
#ifdef NOTYET
{ rpmmg mg;
_rpmmg_debug = 1;
mg = rpmmgNew(NULL, 0);
t = (char *) rpmmgFile(mg, fn);
mg = rpmmgFree(mg);
fprintf(stderr, "==> %s: %s\n", fn, t);
t = _free(t);
_rpmmg_debug = 0;
}
#endif
tar = rpmGetPath("%{__tar}", NULL);
if (strcmp(tar, "%{__tar}") == 0)
tar = xstrdup("tar");
#if defined(RPM_VENDOR_ARK) /* use-gnu-tar-compression-detection */
/* We leave compression handling for all tar based files up to GNU tar */
if (compressed == COMPRESSED_ZIP)
#else
if (compressed != COMPRESSED_NOT)
#endif
{
const char *zipper;
int needtar = 1;
switch (compressed) {
case COMPRESSED_NOT: /* XXX can't happen */
case COMPRESSED_OTHER:
t = "%{__gzip} -dc";
break;
case COMPRESSED_BZIP2:
t = "%{__bzip2} -dc";
break;
case COMPRESSED_LZOP:
t = "%{__lzop} -dc";
break;
case COMPRESSED_LZMA:
t = "%{__lzma} -dc";
break;
case COMPRESSED_XZ:
t = "%{__xz} -dc";
break;
case COMPRESSED_LZIP:
t = "%{__lzip} -dc";
break;
case COMPRESSED_LRZIP:
t = "%{__lrzip} -dqo-";
break;
case COMPRESSED_ZIP:
#if defined(RPM_VENDOR_OPENPKG) /* use-bsdtar-for-zip-files */
t = "%{__bsdtar} -x -f";
#else
if (rpmIsVerbose() && !quietly)
t = "%{__unzip}";
else
t = "%{__unzip} -qq";
#endif
needtar = 0;
break;
}
zipper = rpmGetPath(t, NULL);
buf[0] = '\0';
t = stpcpy(buf, zipper);
zipper = _free(zipper);
*t++ = ' ';
*t++ = '\'';
t = stpcpy(t, fn);
*t++ = '\'';
if (needtar) {
t = stpcpy(t, " | ");
t = stpcpy(t, tar);
t = stpcpy(t, " ");
t = stpcpy(t, taropts);
t = stpcpy(t, " -");
}
t = stpcpy(t,
"\n"
"STATUS=$?\n"
"if [ $STATUS -ne 0 ]; then\n"
" exit $STATUS\n"
"fi");
} else {
buf[0] = '\0';
t = stpcpy(buf, tar);
t = stpcpy(t, " ");
t = stpcpy(t, taropts);
*t++ = ' ';
t = stpcpy(t, fn);
if(rubygem) {
t = stpcpy(t,
"\n"
"if [ -f data.tar.gz ]; then\n"
" tar ");
t = stpcpy(t, taropts);
t = stpcpy(t,
" data.tar.gz\n"
"fi");
}
}
tar = _free(tar);
Lurlfn = _free(Lurlfn);
return buf;
}
/**
* Parse %setup macro.
* @todo FIXME: Option -q broken when not immediately after %setup.
* @param spec build info
* @param line current line from spec file
* @return 0 on success
*/
static int doSetupMacro(Spec spec, const char * line)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies spec->buildSubdir, spec->macros, spec->prep,
spec->packages->header,
rpmGlobalMacroContext, fileSystem, internalState @*/
{
char buf[BUFSIZ];
rpmiob before = NULL;
rpmiob after = NULL;
poptContext optCon;
int argc;
const char ** argv;
int arg;
const char * optArg;
int rc;
rpmuint32_t num;
rpmRC ec = RPMRC_FAIL; /* XXX assume failure */
/*@-mods@*/
leaveDirs = skipDefaultAction = 0;
createDir = quietly = 0;
dirName = NULL;
/*@=mods@*/
if ((rc = poptParseArgvString(line, &argc, &argv))) {
rpmlog(RPMLOG_ERR, _("Error parsing %%setup: %s\n"),
poptStrerror(rc));
goto exit;
}
before = rpmiobNew(0);
after = rpmiobNew(0);
optCon = poptGetContext(NULL, argc, argv, optionsTable, 0);
while ((arg = poptGetNextOpt(optCon)) > 0) {
optArg = poptGetOptArg(optCon);
/* We only parse -a and -b here */
if (parseNum(optArg, &num)) {
rpmlog(RPMLOG_ERR, _("line %d: Bad arg to %%setup: %s\n"),
spec->lineNum, (optArg ? optArg : "???"));
optCon = poptFreeContext(optCon);
argv = _free(argv);
goto exit;
}
{ const char *chptr = doUntar(spec, num, quietly);
if (chptr == NULL)
goto exit;
(void) rpmiobAppend((arg == 'a' ? after : before), chptr, 1);
}
}
if (arg < -1) {
rpmlog(RPMLOG_ERR, _("line %d: Bad %%setup option %s: %s\n"),
spec->lineNum,
poptBadOption(optCon, POPT_BADOPTION_NOALIAS),
poptStrerror(arg));
optCon = poptFreeContext(optCon);
argv = _free(argv);
goto exit;
}
if (dirName) {
spec->buildSubdir = xstrdup(dirName);
} else {
const char *N, *V;
(void) headerNEVRA(spec->packages->header, &N, NULL, &V, NULL, NULL);
(void) snprintf(buf, sizeof(buf), "%s-%s", N, V);
buf[sizeof(buf)-1] = '\0';
N = _free(N);
V = _free(V);
spec->buildSubdir = xstrdup(buf);
}
addMacro(spec->macros, "buildsubdir", NULL, spec->buildSubdir, RMIL_SPEC);
optCon = poptFreeContext(optCon);
argv = _free(argv);
/* cd to the build dir */
{ const char * buildDirURL = rpmGenPath(spec->rootURL, "%{_builddir}", "");
const char *buildDir;
(void) urlPath(buildDirURL, &buildDir);
rc = rpmioMkpath(buildDir, 0755, -1, -1);
sprintf(buf, "cd '%s'", buildDir);
spec->prep = rpmiobAppend(spec->prep, buf, 1);
buildDirURL = _free(buildDirURL);
}
/* delete any old sources */
if (!leaveDirs) {
sprintf(buf, "rm -rf '%s'", spec->buildSubdir);
spec->prep = rpmiobAppend(spec->prep, buf, 1);
}
/* check if source is a ruby gem */
{ struct Source *sp;
for (sp = spec->sources; sp != NULL; sp = sp->next) {
if ((sp->flags & RPMFILE_SOURCE) && (sp->num == 0)) {
break;
}
}
if (sp != NULL) {
char *t = strrchr(sp->source, '.');
if(t && !strcasecmp(t, ".gem"))
createDir = 1;
}
}
/* if necessary, create and cd into the proper dir */
if (createDir) {
char *mkdir_p;
mkdir_p = rpmExpand("%{?__mkdir_p}%{!?__mkdir_p:mkdir -p}", NULL);
if (!mkdir_p)
mkdir_p = xstrdup("mkdir -p");
sprintf(buf, "%s '%s'\ncd '%s'",
mkdir_p, spec->buildSubdir, spec->buildSubdir);
mkdir_p = _free(mkdir_p);
spec->prep = rpmiobAppend(spec->prep, buf, 1);
}
/* do the default action */
if (!createDir && !skipDefaultAction) {
const char *chptr = doUntar(spec, 0, quietly);
if (chptr == NULL)
goto exit;
spec->prep = rpmiobAppend(spec->prep, chptr, 1);
}
spec->prep = rpmiobAppend(spec->prep, rpmiobStr(before), 0);
if (!createDir) {
sprintf(buf, "cd '%s'", spec->buildSubdir);
spec->prep = rpmiobAppend(spec->prep, buf, 1);
}
if (createDir && !skipDefaultAction) {
const char * chptr = doUntar(spec, 0, quietly);
if (chptr == NULL)
goto exit;
spec->prep = rpmiobAppend(spec->prep, chptr, 1);
}
spec->prep = rpmiobAppend(spec->prep, rpmiobStr(after), 0);
/* XXX FIXME: owner & group fixes were conditioned on !geteuid() */
/* Fix the owner, group, and permissions of the setup build tree */
{ /*@observer@*/ static const char *fixmacs[] =
{ "%{_fixowner}", "%{_fixgroup}", "%{_fixperms}", NULL };
const char ** fm;
for (fm = fixmacs; *fm; fm++) {
const char *fix;
fix = rpmExpand(*fm, " .", NULL);
if (fix && *fix != '%')
spec->prep = rpmiobAppend(spec->prep, fix, 1);
fix = _free(fix);
}
}
ec = RPMRC_OK;
exit:
before = rpmiobFree(before);
after = rpmiobFree(after);
return ec;
}
#ifndef DYING
/**
* Parse %patch line.
* @param spec build info
* @param line current line from spec file
* @return RPMRC_OK on success
*/
static rpmRC doPatchMacro(Spec spec, const char * line)
/*@globals rpmGlobalMacroContext, h_errno,
fileSystem, internalState @*/
/*@modifies spec->prep, rpmGlobalMacroContext,
fileSystem, internalState @*/
{
char *s;
char *opt_b;
char *opt_d;
rpmuint32_t opt_P, opt_p, opt_R, opt_E, opt_F;
char buf[BUFSIZ], *bp;
rpmuint32_t patch_nums[1024]; /* XXX - we can only handle 1024 patches! */
int patch_index, x;
memset(patch_nums, 0, sizeof(patch_nums));
opt_P = opt_p = opt_R = opt_E = 0;
opt_F = rpmExpandNumeric("%{?_default_patch_fuzz}%{!?_default_patch_fuzz:-1}");
opt_b = NULL;
opt_d = NULL;
patch_index = 0;
if (! strchr(" \t\n", line[6])) {
/* %patchN */
sprintf(buf, "%%patch -P %s", line + 6);
} else {
strcpy(buf, line);
}
/*@-internalglobs@*/ /* FIX: strtok has state */
for (bp = buf; (s = strtok(bp, " \t\n")) != NULL;) {
if (bp) { /* remove 1st token (%patch) */
bp = NULL;
continue;
}
if (!strcmp(s, "-P")) {
opt_P = 1;
} else if (!strcmp(s, "-R")) {
opt_R = 1;
} else if (!strcmp(s, "-E")) {
opt_E = 1;
} else if (!strcmp(s, "-b")) {
/* orig suffix */
opt_b = strtok(NULL, " \t\n");
if (! opt_b) {
rpmlog(RPMLOG_ERR,
_("line %d: Need arg to %%patch -b: %s\n"),
spec->lineNum, spec->line);
return RPMRC_FAIL;
}
} else if (!strcmp(s, "-z")) {
/* orig suffix */
opt_b = strtok(NULL, " \t\n");
if (! opt_b) {
rpmlog(RPMLOG_ERR,
_("line %d: Need arg to %%patch -z: %s\n"),
spec->lineNum, spec->line);
return RPMRC_FAIL;
}
} else if (!strcmp(s, "-F")) {
/* fuzz factor */
const char * fnum = (!strchr(" \t\n", s[2])
? s+2 : strtok(NULL, " \t\n"));
char * end = NULL;
opt_F = (fnum ? strtol(fnum, &end, 10) : 0);
if (! opt_F || *end) {
rpmlog(RPMLOG_ERR,
_("line %d: Bad arg to %%patch -F: %s\n"),
spec->lineNum, spec->line);
return RPMRC_FAIL;
}
} else if (!strcmp(s, "-d")) {
/* subdirectory */
opt_d = strtok(NULL, " \t\n");
if (! opt_d) {
rpmlog(RPMLOG_ERR,
_("line %d: Need arg to %%patch -d: %s\n"),
spec->lineNum, spec->line);
return RPMRC_FAIL;
}
} else if (!strncmp(s, "-p", sizeof("-p")-1)) {
/* unfortunately, we must support -pX */
if (! strchr(" \t\n", s[2])) {
s = s + 2;
} else {
s = strtok(NULL, " \t\n");
if (s == NULL) {
rpmlog(RPMLOG_ERR,
_("line %d: Need arg to %%patch -p: %s\n"),
spec->lineNum, spec->line);
return RPMRC_FAIL;
}
}
if (parseNum(s, &opt_p)) {
rpmlog(RPMLOG_ERR,
_("line %d: Bad arg to %%patch -p: %s\n"),
spec->lineNum, spec->line);
return RPMRC_FAIL;
}
} else {
/* Must be a patch num */
if (patch_index == 1024) {
rpmlog(RPMLOG_ERR, _("Too many patches!\n"));
return RPMRC_FAIL;
}
if (parseNum(s, &(patch_nums[patch_index]))) {
rpmlog(RPMLOG_ERR, _("line %d: Bad arg to %%patch: %s\n"),
spec->lineNum, spec->line);
return RPMRC_FAIL;
}
patch_index++;
}
}
/*@=internalglobs@*/
/* All args processed */
if (! opt_P) {
s = doPatch(spec, 0, opt_p, opt_b, opt_R, opt_E, opt_F, opt_d);
if (s == NULL)
return RPMRC_FAIL;
spec->prep = rpmiobAppend(spec->prep, s, 1);
}
for (x = 0; x < patch_index; x++) {
s = doPatch(spec, patch_nums[x], opt_p, opt_b, opt_R, opt_E, opt_F, opt_d);
if (s == NULL)
return RPMRC_FAIL;
spec->prep = rpmiobAppend(spec->prep, s, 1);
}
return RPMRC_OK;
}
#endif
static void prepFetchVerbose(/*@unused@*/ struct Source *sp,
/*@unused@*/ struct stat *st)
/*@globals internalState @*/
/*@modifies internalState @*/
{
char *buf;
size_t buf_len;
int xx;
int i;
if (!(rpmIsVerbose() && !quietly && (rpmBTArgs.buildAmount & RPMBUILD_FETCHSOURCE)))
return;
buf_len = 2*80;
if ((buf = (char *)malloc(buf_len)) == NULL)
return;
xx = snprintf(buf, buf_len, "%s%d:", (sp->flags & RPMFILE_SOURCE) ? "Source" : "Patch", sp->num);
for (i = (int)strlen(buf); i <= 11; i++)
buf[i] = ' ';
xx = snprintf(buf+i, buf_len-i, "%-52.52s", sp->source);
i = (int)strlen(buf);
if (st != NULL)
xx = snprintf(buf+i, buf_len-i, " %9lu Bytes\n", (unsigned long)st->st_size);
else
xx = snprintf(buf+i, buf_len-i, " ...MISSING\n");
rpmlog(RPMLOG_NOTICE, "%s", buf);
buf = _free(buf);
return;
}
/**
* Check that all sources/patches/icons exist locally, fetching if necessary.
*/
static int prepFetch(Spec spec)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies rpmGlobalMacroContext, fileSystem, internalState @*/
{
#if defined(RPM_VENDOR_OPENPKG) /* splitted-source-directory */
const char *Smacro;
#endif
const char *Lmacro, *Lurlfn = NULL;
const char *Rmacro, *Rurlfn = NULL;
struct Source *sp;
struct stat st;
rpmRC rpmrc;
int ec, rc;
char *cp;
/* XXX insure that %{_sourcedir} exists */
rpmrc = RPMRC_OK;
Lurlfn = rpmGenPath(NULL, "%{?_sourcedir}", NULL);
if (Lurlfn != NULL && *Lurlfn != '\0')
rpmrc = rpmMkdirPath(Lurlfn, "_sourcedir");
Lurlfn = _free(Lurlfn);
if (rpmrc != RPMRC_OK)
return -1;
/* XXX insure that %{_patchdir} exists */
rpmrc = RPMRC_OK;
Lurlfn = rpmGenPath(NULL, "%{?_patchdir}", NULL);
if (Lurlfn != NULL && *Lurlfn != '\0')
rpmrc = rpmMkdirPath(Lurlfn, "_patchdir");
Lurlfn = _free(Lurlfn);
if (rpmrc != RPMRC_OK)
return -1;
/* XXX insure that %{_icondir} exists */
rpmrc = RPMRC_OK;
Lurlfn = rpmGenPath(NULL, "%{?_icondir}", NULL);
if (Lurlfn != NULL && *Lurlfn != '\0')
rpmrc = rpmMkdirPath(Lurlfn, "_icondir");
Lurlfn = _free(Lurlfn);
if (rpmrc != RPMRC_OK)
return -1;
if (rpmIsVerbose() && !quietly && (rpmBTArgs.buildAmount & RPMBUILD_FETCHSOURCE))
rpmlog(RPMLOG_NOTICE, "Checking source and patch file(s):\n");
ec = 0;
for (sp = spec->sources; sp != NULL; sp = sp->next) {
#if defined(RPM_VENDOR_OPENPKG) /* splitted-source-directory */
Smacro = "%{?_specdir}/";
#endif
#if defined(RPM_VENDOR_OPENPKG) /* splitted-source-directory */
if (! (Lmacro = getSourceDir(sp->flags, sp->source)))
#else
if (! (Lmacro = getSourceDir(sp->flags)))
#endif
continue;
if (sp->flags & RPMFILE_SOURCE) {
Rmacro = "%{?_Rsourcedir}/";
} else
if (sp->flags & RPMFILE_PATCH) {
Rmacro = "%{?_Rpatchdir}/";
} else
if (sp->flags & RPMFILE_ICON) {
Rmacro = "%{?_Ricondir}/";
} else
continue;
#if defined(RPM_VENDOR_OPENPKG) /* splitted-source-directory */
/* support splitted source directories, i.e., source files which
are alternatively placed into the .spec directory and picked
up from there, too. */
Lurlfn = rpmGenPath(NULL, Smacro, sp->source);
rc = Lstat(Lurlfn, &st);
if (rc == 0) {
prepFetchVerbose(sp, &st);
goto bottom;
}
#endif
Lurlfn = rpmGenPath(NULL, Lmacro, sp->source);
rc = Lstat(Lurlfn, &st);
if (rc == 0) {
/*@-noeffect@*/
prepFetchVerbose(sp, &st);
/*@=noeffect@*/
goto bottom;
}
/*@-noeffect@*/
prepFetchVerbose(sp, NULL);
/*@=noeffect@*/
if (errno != ENOENT) {
ec++;
rpmlog(RPMLOG_ERR, _("Missing %s%d %s: %s\n"),
((sp->flags & RPMFILE_SOURCE) ? "Source" : "Patch"),
sp->num, sp->source, strerror(ENOENT));
goto bottom;
}
/* try to fetch via macro-controlled remote locations */
cp = rpmExpand(Rmacro, NULL);
if (cp != NULL && strcmp(cp, "/") != 0) {
cp = _free(cp);
Rurlfn = rpmGenPath(NULL, Rmacro, sp->source);
if (!(Rurlfn == NULL || Rurlfn[0] == '\0' || !strcmp(Rurlfn, "/") || !strcmp(Lurlfn, Rurlfn))) {
rpmlog(RPMLOG_NOTICE, _("Fetching(%s%d): %s\n"),
(sp->flags & RPMFILE_SOURCE) ? "Source" : "Patch", sp->num, Rurlfn);
rc = urlGetFile(Rurlfn, Lurlfn);
if (rc == 0)
goto bottom;
else {
rpmlog(RPMLOG_ERR, _("Fetching %s%d failed: %s\n"),
(sp->flags & RPMFILE_SOURCE) ? "Source" : "Patch", sp->num, ftpStrerror(rc));
ec++;
}
}
}
cp = _free(cp);
/* try to fetch from original location */
rpmlog(RPMLOG_NOTICE, _("Fetching(%s%d): %s\n"),
(sp->flags & RPMFILE_SOURCE) ? "Source" : "Patch", sp->num, sp->fullSource);
rc = urlGetFile(sp->fullSource, Lurlfn);
if (rc == 0)
goto bottom;
else {
rpmlog(RPMLOG_ERR, _("Fetching %s%d failed: %s\n"),
(sp->flags & RPMFILE_SOURCE) ? "Source" : "Patch", sp->num, ftpStrerror(rc));
ec++;
}
rpmlog(RPMLOG_ERR, _("Missing %s%d: %s: %s\n"),
((sp->flags & RPMFILE_SOURCE) ? "Source" : "Patch"),
sp->num, sp->source, strerror(ENOENT));
ec++;
bottom:
Lurlfn = _free(Lurlfn);
Rurlfn = _free(Rurlfn);
}
return ec;
}
int parsePrep(Spec spec, int verify)
{
rpmParseState nextPart;
int res, rc;
rpmiob iob;
ARGV_t saveLines = NULL;
ARGV_t lines;
const char * cp;
int xx;
if (spec->prep != NULL) {
rpmlog(RPMLOG_ERR, _("line %d: second %%prep\n"), spec->lineNum);
return RPMRC_FAIL;
}
spec->prep = rpmiobNew(0);
/* There are no options to %prep */
if ((rc = readLine(spec, STRIP_NOTHING)) > 0)
return PART_NONE;
if (rc)
return rc;
/* Check to make sure that all sources/patches are present. */
if (verify) {
rc = prepFetch(spec);
if (rc)
return RPMRC_FAIL;
}
iob = rpmiobNew(0);
while ((nextPart = isPart(spec)) == PART_NONE) {
/* Need to expand the macros inline. That way we */
/* can give good line number information on error. */
iob = rpmiobAppend(iob, spec->line, 0);
if ((rc = readLine(spec, STRIP_NOTHING)) > 0) {
nextPart = PART_NONE;
break;
}
if (rc)
return rc;
}
xx = argvSplit(&saveLines, rpmiobStr(iob), "\n");
/*@-usereleased@*/
for (lines = saveLines; *lines; lines++) {
res = 0;
for (cp = *lines; *cp == ' ' || *cp == '\t'; cp++)
{};
if (!strncmp(cp, "%setup", sizeof("%setup")-1)) {
res = doSetupMacro(spec, cp);
#ifndef DYING
} else if (! strncmp(cp, "%patch", sizeof("%patch")-1)) {
res = doPatchMacro(spec, cp);
#endif
} else {
spec->prep = rpmiobAppend(spec->prep, *lines, 1);
}
if (res && !spec->force) {
saveLines = argvFree(saveLines);
iob = rpmiobFree(iob);
return res;
}
}
/*@=usereleased@*/
saveLines = argvFree(saveLines);
iob = rpmiobFree(iob);
return nextPart;
}

204
rpm-5.4.9/build/parseReqs.c Normal file
View file

@ -0,0 +1,204 @@
/** \ingroup rpmbuild
* \file build/parseReqs.c
* Parse dependency tag from spec file or from auto-dependency generator.
*/
#include "system.h"
#include <rpmio.h>
#include <rpmiotypes.h>
#include <rpmlog.h>
#define _RPMEVR_INTERNAL
#include "rpmbuild.h"
#include "debug.h"
/*@access EVR_t @*/
#define SKIPWHITE(_x) {while(*(_x) && (xisspace(*_x) || *(_x) == ',')) (_x)++;}
#define SKIPNONWHITE(_x){while(*(_x) &&!(xisspace(*_x) || *(_x) == ',')) (_x)++;}
rpmRC parseRCPOT(Spec spec, Package pkg, const char *field, rpmTag tagN,
rpmuint32_t index, rpmsenseFlags tagflags)
{
EVR_t evr = alloca(sizeof(*evr));
const char *r, *re, *v, *ve;
char * N = NULL;
char * EVR = NULL;
rpmsenseFlags Flags;
Header h;
rpmRC rc = RPMRC_FAIL; /* assume failure */
int ix;
switch (tagN) {
case RPMTAG_PROVIDEFLAGS:
tagflags |= RPMSENSE_PROVIDES;
h = pkg->header;
break;
case RPMTAG_OBSOLETEFLAGS:
tagflags |= RPMSENSE_OBSOLETES;
h = pkg->header;
break;
case RPMTAG_CONFLICTFLAGS:
tagflags |= RPMSENSE_CONFLICTS;
h = pkg->header;
break;
case RPMTAG_BUILDCONFLICTS:
tagflags |= RPMSENSE_CONFLICTS;
h = spec->sourceHeader;
break;
case RPMTAG_PREREQ:
tagflags |= RPMSENSE_ANY;
h = pkg->header;
break;
case RPMTAG_TRIGGERPREIN:
tagflags |= RPMSENSE_TRIGGERPREIN;
h = pkg->header;
break;
case RPMTAG_TRIGGERIN:
tagflags |= RPMSENSE_TRIGGERIN;
h = pkg->header;
break;
case RPMTAG_TRIGGERPOSTUN:
tagflags |= RPMSENSE_TRIGGERPOSTUN;
h = pkg->header;
break;
case RPMTAG_TRIGGERUN:
tagflags |= RPMSENSE_TRIGGERUN;
h = pkg->header;
break;
case RPMTAG_BUILDSUGGESTS:
case RPMTAG_BUILDENHANCES:
tagflags |= RPMSENSE_MISSINGOK;
h = spec->sourceHeader;
break;
case RPMTAG_BUILDPREREQ:
case RPMTAG_BUILDREQUIRES:
tagflags |= RPMSENSE_ANY;
h = spec->sourceHeader;
break;
case RPMTAG_BUILDPROVIDES:
tagflags |= RPMSENSE_PROVIDES;
h = spec->sourceHeader;
break;
case RPMTAG_BUILDOBSOLETES:
tagflags |= RPMSENSE_OBSOLETES;
h = spec->sourceHeader;
break;
default:
case RPMTAG_REQUIREFLAGS:
tagflags |= RPMSENSE_ANY;
h = pkg->header;
break;
}
for (r = field; *r != '\0'; r = re) {
size_t nr;
SKIPWHITE(r);
if (*r == '\0')
break;
Flags = (tagflags & ~RPMSENSE_SENSEMASK);
re = r;
SKIPNONWHITE(re);
N = xmalloc((re-r) + 1);
strncpy(N, r, (re-r));
N[re-r] = '\0';
/* N must begin with alphanumeric, _, or /, or a macro. */
nr = strlen(N);
ix = 0;
if (N[ix] == '!')
ix++;
if (!(xisalnum(N[ix]) || N[ix] == '_' || N[ix] == '/'
|| (nr > 5 && N[ix] == '%' && N[ix+1] == '{' && N[nr-1] == '}')))
{
rpmlog(RPMLOG_ERR,
_("line %d: Dependency \"%s\" must begin with alpha-numeric, '_' or '/': %s\n"),
spec->lineNum, N, spec->line);
goto exit;
}
/* Parse EVR */
v = re;
SKIPWHITE(v);
ve = v;
SKIPNONWHITE(ve);
re = v; /* ==> next token (if no EVR found) starts here */
/* Check for possible logical operator */
if (ve > v) {
/*@-mods@*/
rpmsenseFlags F = rpmEVRflags(v, &ve);
/*@=mods@*/
if (F && r[0] == '/') {
rpmlog(RPMLOG_ERR,
_("line %d: Versioned file name not permitted: %s\n"),
spec->lineNum, spec->line);
goto exit;
}
if (F) {
/* now parse EVR */
v = ve;
SKIPWHITE(v);
ve = v;
SKIPNONWHITE(ve);
}
Flags &= ~RPMSENSE_SENSEMASK;
Flags |= F;
}
if (Flags & RPMSENSE_SENSEMASK) {
char * t;
EVR = t = xmalloc((ve-v) + 1);
nr = 0;
while (v < ve && *v != '\0')
switch ((int)*v) {
case '-': nr++; /*@fallthrough@*/
default: *t++ = *v++; break;
}
*t = '\0';
if (*EVR == '\0') {
rpmlog(RPMLOG_ERR, _("line %d: %s must be specified: %s\n"),
spec->lineNum, "EVR", spec->line);
goto exit;
}
if (nr > 1) {
rpmlog(RPMLOG_ERR, _("line %d: Illegal char '-' in %s: %s\n"),
spec->lineNum, "EVR", spec->line);
goto exit;
}
/* EVR must be parseable (or a macro). */
ix = 0;
nr = strlen(EVR);
if (!(nr > 3 && EVR[0] == '%' && EVR[1] == '{' && EVR[nr-1] == '}'))
{
memset(evr, 0, sizeof(*evr));
ix = rpmEVRparse(xstrdup(EVR), evr);
evr->str = _free(evr->str);
}
if (ix != 0) {
rpmlog(RPMLOG_ERR, _("line %d: %s does not parse: %s\n"),
spec->lineNum, "EVR", spec->line);
goto exit;
}
re = ve; /* ==> next token after EVR string starts here */
} else
EVR = NULL;
(void) addReqProv(spec, h, tagN, N, EVR, Flags, index);
N = _free(N);
EVR = _free(EVR);
}
rc = RPMRC_OK;
exit:
N = _free(N);
EVR = _free(EVR);
return rc;
}

View file

@ -0,0 +1,466 @@
/** \ingroup rpmbuild
* \file build/parseScript.c
* Parse install-time script section from spec file.
*/
#include "system.h"
#include <rpmio.h>
#include <rpmiotypes.h>
#include <rpmlog.h>
#define _RPMEVR_INTERNAL
#include "rpmbuild.h"
#include "debug.h"
#include <rpmlua.h>
/*@access poptContext @*/ /* compared with NULL */
/**
*/
static rpmuint32_t addTriggerIndex(Package pkg, const char *file,
const char *script, const char *prog)
/*@modifies pkg->triggerFiles @*/
{
struct TriggerFileEntry *tfe;
struct TriggerFileEntry *list = pkg->triggerFiles;
struct TriggerFileEntry *last = NULL;
rpmuint32_t index = 0;
while (list) {
last = list;
list = list->next;
}
if (last)
index = last->index + 1;
tfe = xcalloc(1, sizeof(*tfe));
tfe->fileName = (file) ? xstrdup(file) : NULL;
tfe->script = (script && *script != '\0') ? xstrdup(script) : NULL;
tfe->prog = xstrdup(prog);
tfe->index = index;
tfe->next = NULL;
if (last)
last->next = tfe;
else
pkg->triggerFiles = tfe;
return index;
}
/* these have to be global because of stupid compilers */
/*@unchecked@*/
/*@observer@*/ /*@null@*/ static const char *name = NULL;
/*@unchecked@*/
/*@observer@*/ /*@null@*/ static const char *prog = NULL;
/*@unchecked@*/
/*@observer@*/ /*@null@*/ static const char *file = NULL;
/*@unchecked@*/
static struct poptOption optionsTable[] = {
{ NULL, 'p', POPT_ARG_STRING, &prog, 'p', NULL, NULL},
{ NULL, 'n', POPT_ARG_STRING, &name, 'n', NULL, NULL},
{ NULL, 'f', POPT_ARG_STRING, &file, 'f', NULL, NULL},
{ 0, 0, 0, 0, 0, NULL, NULL}
};
/* %trigger is a strange combination of %pre and Requires: behavior */
/* We can handle it by parsing the args before "--" in parseScript. */
/* We then pass the remaining arguments to parseRCPOT, along with */
/* an index we just determined. */
int parseScript(Spec spec, int parsePart)
{
HE_t he = (HE_t) memset(alloca(sizeof(*he)), 0, sizeof(*he));
int xx;
/* There are a few options to scripts: */
/* <pkg> */
/* -n <pkg> */
/* -p <sh> */
/* -p "<sh> <args>..." */
/* -f <file> */
char *p;
const char **progArgv = NULL;
int progArgc;
char *partname = NULL;
rpmTag reqtag = 0;
rpmTag tag = 0;
rpmsenseFlags tagflags = 0;
rpmTag progtag = 0;
int flag = PART_SUBNAME;
Package pkg;
rpmiob iob = NULL;
rpmParseState nextPart;
char reqargs[BUFSIZ];
int argc;
int arg;
const char **argv = NULL;
poptContext optCon = NULL;
rpmRC rc;
reqargs[0] = '\0';
/*@-mods@*/
name = NULL;
prog = "/bin/sh";
file = NULL;
/*@=mods@*/
switch (parsePart) {
case PART_PRE:
tag = RPMTAG_PREIN;
tagflags = RPMSENSE_SCRIPT_PRE;
progtag = RPMTAG_PREINPROG;
partname = "%pre";
break;
case PART_POST:
tag = RPMTAG_POSTIN;
tagflags = RPMSENSE_SCRIPT_POST;
progtag = RPMTAG_POSTINPROG;
partname = "%post";
break;
case PART_PREUN:
tag = RPMTAG_PREUN;
tagflags = RPMSENSE_SCRIPT_PREUN;
progtag = RPMTAG_PREUNPROG;
partname = "%preun";
break;
case PART_POSTUN:
tag = RPMTAG_POSTUN;
tagflags = RPMSENSE_SCRIPT_POSTUN;
progtag = RPMTAG_POSTUNPROG;
partname = "%postun";
break;
case PART_PRETRANS:
tag = RPMTAG_PRETRANS;
tagflags = 0;
progtag = RPMTAG_PRETRANSPROG;
partname = "%pretrans";
break;
case PART_POSTTRANS:
tag = RPMTAG_POSTTRANS;
tagflags = 0;
progtag = RPMTAG_POSTTRANSPROG;
partname = "%posttrans";
break;
case PART_VERIFYSCRIPT:
tag = RPMTAG_VERIFYSCRIPT;
tagflags = RPMSENSE_SCRIPT_VERIFY;
progtag = RPMTAG_VERIFYSCRIPTPROG;
partname = "%verifyscript";
break;
case PART_TRIGGERPREIN:
tag = RPMTAG_TRIGGERSCRIPTS;
tagflags = 0;
reqtag = RPMTAG_TRIGGERPREIN;
progtag = RPMTAG_TRIGGERSCRIPTPROG;
partname = "%triggerprein";
break;
case PART_TRIGGERIN:
tag = RPMTAG_TRIGGERSCRIPTS;
tagflags = 0;
reqtag = RPMTAG_TRIGGERIN;
progtag = RPMTAG_TRIGGERSCRIPTPROG;
partname = "%triggerin";
break;
case PART_TRIGGERUN:
tag = RPMTAG_TRIGGERSCRIPTS;
tagflags = 0;
reqtag = RPMTAG_TRIGGERUN;
progtag = RPMTAG_TRIGGERSCRIPTPROG;
partname = "%triggerun";
break;
case PART_TRIGGERPOSTUN:
tag = RPMTAG_TRIGGERSCRIPTS;
tagflags = 0;
reqtag = RPMTAG_TRIGGERPOSTUN;
progtag = RPMTAG_TRIGGERSCRIPTPROG;
partname = "%triggerpostun";
break;
/* support "%sanitycheck" script/section */
case PART_SANITYCHECK:
tag = RPMTAG_SANITYCHECK;
tagflags = RPMSENSE_SCRIPT_SANITYCHECK;
progtag = RPMTAG_SANITYCHECKPROG;
partname = "%sanitycheck";
break;
}
if (tag == RPMTAG_TRIGGERSCRIPTS) {
/* break line into two */
p = strstr(spec->line, "--");
if (!p) {
rpmlog(RPMLOG_ERR, _("line %d: triggers must have --: %s\n"),
spec->lineNum, spec->line);
return RPMRC_FAIL;
}
*p = '\0';
strcpy(reqargs, p + 2);
}
if ((rc = poptParseArgvString(spec->line, &argc, &argv))) {
rpmlog(RPMLOG_ERR, _("line %d: Error parsing %s: %s\n"),
spec->lineNum, partname, poptStrerror(rc));
return RPMRC_FAIL;
}
optCon = poptGetContext(NULL, argc, argv, optionsTable, 0);
while ((arg = poptGetNextOpt(optCon)) > 0) {
switch (arg) {
case 'p':
if (prog[0] == '<') {
const char * s = prog;
while (s && s[1] && s[1] != '>')
s++;
if (s[1] != '>') {
rpmlog(RPMLOG_ERR,
_("line %d: embedded interpreter token must end "
"with \'>\': %s\n"), spec->lineNum, prog);
rc = RPMRC_FAIL;
goto exit;
}
} else if (prog[0] == '%') {
/* XXX check well-formed macro? */
} else if (prog[0] != '/') {
rpmlog(RPMLOG_ERR,
_("line %d: script program must begin "
"with \'/\': %s\n"), spec->lineNum, prog);
rc = RPMRC_FAIL;
goto exit;
}
/*@switchbreak@*/ break;
case 'n':
flag = PART_NAME;
/*@switchbreak@*/ break;
}
}
if (arg < -1) {
rpmlog(RPMLOG_ERR, _("line %d: Bad option %s: %s\n"),
spec->lineNum,
poptBadOption(optCon, POPT_BADOPTION_NOALIAS),
spec->line);
rc = RPMRC_FAIL;
goto exit;
}
if (poptPeekArg(optCon)) {
/*@-mods@*/
if (name == NULL)
name = poptGetArg(optCon);
/*@=mods@*/
if (poptPeekArg(optCon)) {
rpmlog(RPMLOG_ERR, _("line %d: Too many names: %s\n"),
spec->lineNum,
spec->line);
rc = RPMRC_FAIL;
goto exit;
}
}
if (lookupPackage(spec, name, flag, &pkg) != RPMRC_OK) {
rpmlog(RPMLOG_ERR, _("line %d: Package does not exist: %s\n"),
spec->lineNum, spec->line);
rc = RPMRC_FAIL;
goto exit;
}
if (tag != RPMTAG_TRIGGERSCRIPTS) {
if (headerIsEntry(pkg->header, progtag)) {
rpmlog(RPMLOG_ERR, _("line %d: Second %s\n"),
spec->lineNum, partname);
rc = RPMRC_FAIL;
goto exit;
}
}
if ((rc = poptParseArgvString(prog, &progArgc, &progArgv))) {
rpmlog(RPMLOG_ERR, _("line %d: Error parsing %s: %s\n"),
spec->lineNum, partname, poptStrerror(rc));
rc = RPMRC_FAIL;
goto exit;
}
iob = rpmiobNew(0);
if ((rc = readLine(spec, STRIP_NOTHING)) > 0) {
nextPart = PART_NONE;
} else {
if (rc)
goto exit;
while ((nextPart = isPart(spec)) == PART_NONE) {
iob = rpmiobAppend(iob, spec->line, 0);
if ((rc = readLine(spec, STRIP_NOTHING)) > 0) {
nextPart = PART_NONE;
break;
}
if (rc)
goto exit;
}
}
iob = rpmiobRTrim(iob);
p = rpmiobStr(iob);
#ifdef WITH_LUA
if (!strcmp(progArgv[0], "<lua>")) {
rpmlua lua = NULL; /* Global state. */
if (rpmluaCheckScript(lua, p, partname) != RPMRC_OK) {
rc = RPMRC_FAIL;
goto exit;
}
(void) rpmlibNeedsFeature(pkg->header,
"BuiltinLuaScripts", "4.2.2-1");
} else
#endif
#ifdef WITH_AUGEAS
if (!strcmp(progArgv[0], "<augeas>")) {
(void) rpmlibNeedsFeature(pkg->header,
"BuiltinAugeasScripts", "5.3-1");
} else
#endif
#ifdef WITH_FICL
if (!strcmp(progArgv[0], "<ficl>")) {
(void) rpmlibNeedsFeature(pkg->header,
"BuiltinFiclScripts", "5.2-1");
} else
#endif
#ifdef WITH_GPSEE
if (!strcmp(progArgv[0], "<js>")) {
(void) rpmlibNeedsFeature(pkg->header,
"BuiltinJavaScript", "5.2-1");
} else
#endif
#ifdef WITH_PERLEMBED
if (!strcmp(progArgv[0], "<perl>")) {
(void) rpmlibNeedsFeature(pkg->header,
"BuiltinPerlScripts", "5.2-1");
} else
#endif
#ifdef WITH_PYTHONEMBED
if (!strcmp(progArgv[0], "<python>")) {
(void) rpmlibNeedsFeature(pkg->header,
"BuiltinPythonScripts", "5.2-1");
} else
#endif
#ifdef WITH_RUBYEMBED
if (!strcmp(progArgv[0], "<ruby>")) {
(void) rpmlibNeedsFeature(pkg->header,
"BuiltinRubyScripts", "5.2-1");
} else
#endif
#ifdef WITH_SEMANAGE
if (!strcmp(progArgv[0], "<spook>")) {
(void) rpmlibNeedsFeature(pkg->header,
"BuiltinSpookScripts", "5.3-1");
} else
#endif
#ifdef WITH_SQLITE
if (!strcmp(progArgv[0], "<sql>")) {
(void) rpmlibNeedsFeature(pkg->header,
"BuiltinSqlScripts", "5.3-1");
} else
#endif
#ifdef WITH_SQUIRREL
if (!strcmp(progArgv[0], "<squirrel>")) {
(void) rpmlibNeedsFeature(pkg->header,
"BuiltinSquirrelScripts", "5.2-1");
} else
#endif
#ifdef WITH_TCL
if (!strcmp(progArgv[0], "<tcl>")) {
(void) rpmlibNeedsFeature(pkg->header,
"BuiltinTclScripts", "5.2-1");
} else
#endif
if (progArgv[0][0] == '<') {
rpmlog(RPMLOG_ERR,
_("line %d: unsupported internal script: %s\n"),
spec->lineNum, progArgv[0]);
rc = RPMRC_FAIL;
goto exit;
} else
if (!(rpmExpandNumeric("%{?_disable_shell_interpreter_deps}")
&& !strcmp(progArgv[0], "/bin/sh")))
{
(void) addReqProv(spec, pkg->header, RPMTAG_REQUIRENAME,
progArgv[0], NULL, (tagflags | RPMSENSE_INTERP), 0);
}
/* Trigger script insertion is always delayed in order to */
/* get the index right. */
if (tag == RPMTAG_TRIGGERSCRIPTS) {
/* Add file/index/prog triple to the trigger file list */
rpmuint32_t index = addTriggerIndex(pkg, file, p, progArgv[0]);
/* Generate the trigger tags */
if ((rc = parseRCPOT(spec, pkg, reqargs, reqtag, index, tagflags)))
goto exit;
} else {
if (progArgc == 1) {
he->tag = progtag;
he->t = RPM_STRING_TYPE;
he->p.str = *progArgv;
he->c = progArgc;
xx = headerPut(pkg->header, he, 0);
} else {
(void) rpmlibNeedsFeature(pkg->header,
"ScriptletInterpreterArgs", "4.0.3-1");
he->tag = progtag;
he->t = RPM_STRING_ARRAY_TYPE;
he->p.argv = progArgv;
he->c = progArgc;
xx = headerPut(pkg->header, he, 0);
}
if (*p != '\0') {
he->tag = tag;
he->t = RPM_STRING_TYPE;
he->p.str = p;
he->c = 1;
xx = headerPut(pkg->header, he, 0);
}
if (file) {
switch (parsePart) {
case PART_PRE:
pkg->preInFile = xstrdup(file);
break;
case PART_POST:
pkg->postInFile = xstrdup(file);
break;
case PART_PREUN:
pkg->preUnFile = xstrdup(file);
break;
case PART_POSTUN:
pkg->postUnFile = xstrdup(file);
break;
case PART_PRETRANS:
pkg->preTransFile = xstrdup(file);
break;
case PART_POSTTRANS:
pkg->postTransFile = xstrdup(file);
break;
case PART_VERIFYSCRIPT:
pkg->verifyFile = xstrdup(file);
break;
case PART_SANITYCHECK:
pkg->sanityCheckFile = xstrdup(file);
break;
}
}
}
rc = (rpmRC) nextPart;
exit:
iob = rpmiobFree(iob);
progArgv = _free(progArgv);
argv = _free(argv);
optCon = poptFreeContext(optCon);
return rc;
}

771
rpm-5.4.9/build/parseSpec.c Normal file
View file

@ -0,0 +1,771 @@
/** \ingroup rpmbuild
* \file build/parseSpec.c
* Top level dispatcher for spec file parsing.
*/
#include "system.h"
#include <rpmio_internal.h> /* XXX fdGetFp */
#include <rpmcb.h>
#include <argv.h>
#define _RPMTAG_INTERNAL /* XXX rpmTags->aTags */
#include <rpmbuild.h>
#include "rpmds.h"
#include "rpmts.h"
#include "debug.h"
/*@access headerTagIndices @*/
/*@access FD_t @*/ /* compared with NULL */
/**
*/
/*@unchecked@*/
static struct PartRec {
rpmParseState part;
size_t len;
/*@observer@*/ /*@null@*/
const char * token;
} partList[] = {
{ PART_PREAMBLE, 0, "%package"},
{ PART_PREP, 0, "%prep"},
{ PART_BUILD, 0, "%build"},
{ PART_INSTALL, 0, "%install"},
{ PART_CHECK, 0, "%check"},
{ PART_CLEAN, 0, "%clean"},
{ PART_PREUN, 0, "%preun"},
{ PART_POSTUN, 0, "%postun"},
{ PART_PRETRANS, 0, "%pretrans"},
{ PART_POSTTRANS, 0, "%posttrans"},
{ PART_PRE, 0, "%pre"},
{ PART_POST, 0, "%post"},
{ PART_FILES, 0, "%files"},
{ PART_CHANGELOG, 0, "%changelog"},
{ PART_DESCRIPTION, 0, "%description"},
{ PART_TRIGGERPOSTUN, 0, "%triggerpostun"},
{ PART_TRIGGERPREIN, 0, "%triggerprein"},
{ PART_TRIGGERUN, 0, "%triggerun"},
{ PART_TRIGGERIN, 0, "%triggerin"},
{ PART_TRIGGERIN, 0, "%trigger"},
{ PART_VERIFYSCRIPT, 0, "%verifyscript"},
{ PART_SANITYCHECK, 0, "%sanitycheck"}, /* support "%sanitycheck" scriptlet */
{0, 0, NULL}
};
/**
*/
static inline void initParts(struct PartRec *p)
/*@modifies p->len @*/
{
for (; p->token != NULL; p++)
p->len = strlen(p->token);
}
rpmParseState isPart(Spec spec)
{
const char * line = spec->line;
struct PartRec *p;
rpmParseState nextPart = PART_NONE; /* assume plain text */
if (partList[0].len == 0)
initParts(partList);
for (p = partList; p->token != NULL; p++) {
char c;
if (xstrncasecmp(line, p->token, p->len))
continue;
c = *(line + p->len);
if (c == '\0' || xisspace(c)) {
nextPart = p->part;
goto exit;
}
}
/* If %foo is not found explictly, check for an arbitrary %foo tag. */
if (line[0] == '%') {
ARGV_t aTags = NULL;
const char * s;
/*@-noeffect@*/
(void) tagName(0); /* XXX force arbitrary tags to be initialized. */
/*@=noeffect@*/
aTags = rpmTags->aTags;
if (aTags != NULL && aTags[0] != NULL) {
ARGV_t av;
s = tagCanonicalize(line+1); /* XXX +1 to skip leading '%' */
#if defined(RPM_VENDOR_OPENPKG) /* wildcard-matching-arbitrary-tagnames */
av = argvSearchLinear(aTags, s, argvFnmatchCasefold);
#else
av = argvSearch(aTags, s, argvStrcasecmp);
#endif
if (av != NULL) {
spec->foo = xrealloc(spec->foo, (spec->nfoo + 1) * sizeof(*spec->foo));
spec->foo[spec->nfoo].str = xstrdup(s);
spec->foo[spec->nfoo].tag = tagGenerate(s);
spec->foo[spec->nfoo].iob = NULL;
spec->nfoo++;
nextPart = PART_ARBITRARY;
}
s = _free(s);
}
}
exit:
return nextPart;
}
/**
*/
static int matchTok(const char *token, const char *line)
/*@*/
{
const char *b, *be = line;
size_t toklen = strlen(token);
int rc = 0;
while ( *(b = be) != '\0' ) {
SKIPSPACE(b);
be = b;
SKIPNONSPACE(be);
if (be == b)
break;
if (toklen != (size_t)(be-b) || xstrncasecmp(token, b, (be-b)))
continue;
rc = 1;
break;
}
return rc;
}
void handleComments(char *s)
{
SKIPSPACE(s);
if (*s == '#')
*s = '\0';
}
/**
*/
static void forceIncludeFile(Spec spec, const char * fileName)
/*@modifies spec->fileStack @*/
{
OFI_t * ofi;
ofi = newOpenFileInfo();
ofi->fileName = xstrdup(fileName);
ofi->next = spec->fileStack;
spec->fileStack = ofi;
}
/**
*/
static int restoreFirstChar(Spec spec)
/*@modifies spec->nextline, spec->nextpeekc @*/
{
/* Restore 1st char in (possible) next line */
if (spec->nextline != NULL && spec->nextpeekc != '\0') {
*spec->nextline = spec->nextpeekc;
spec->nextpeekc = '\0';
return 1;
}
return 0;
}
/**
*/
static int copyNextLineFromOFI(Spec spec, OFI_t * ofi, rpmStripFlags strip)
/*@globals rpmGlobalMacroContext, h_errno,
fileSystem, internalState @*/
/*@modifies spec->nextline, spec->lbuf, spec->lbufPtr,
ofi->readPtr,
rpmGlobalMacroContext, fileSystem, internalState @*/
{
char ch;
/* Expand next line from file into line buffer */
if (!(spec->nextline && *spec->nextline)) {
int pc = 0, bc = 0, nc = 0;
char *from, *to, *p;
to = spec->lbufPtr ? spec->lbufPtr : spec->lbuf;
from = ofi->readPtr;
ch = ' ';
while (from && *from && ch != '\n')
ch = *to++ = *from++;
/*@-mods@*/
spec->lbufPtr = to;
/*@=mods@*/
*to++ = '\0';
ofi->readPtr = from;
/* Check if we need another line before expanding the buffer. */
for (p = spec->lbuf; *p; p++) {
switch (*p) {
case '\\':
switch (*(p+1)) {
case '\n': p++, nc = 1; /*@innerbreak@*/ break;
case '\0': /*@innerbreak@*/ break;
default: p++; /*@innerbreak@*/ break;
}
/*@switchbreak@*/ break;
case '\n': nc = 0; /*@switchbreak@*/ break;
case '%':
switch (*(p+1)) {
case '{': p++, bc++; /*@innerbreak@*/ break;
case '(': p++, pc++; /*@innerbreak@*/ break;
case '%': p++; /*@innerbreak@*/ break;
}
/*@switchbreak@*/ break;
case '{': if (bc > 0) bc++; /*@switchbreak@*/ break;
case '}': if (bc > 0) bc--; /*@switchbreak@*/ break;
case '(': if (pc > 0) pc++; /*@switchbreak@*/ break;
case ')': if (pc > 0) pc--; /*@switchbreak@*/ break;
}
}
/* If it doesn't, ask for one more line. We need a better
* error code for this. */
if (pc || bc || nc ) {
/*@-observertrans -readonlytrans@*/
spec->nextline = "";
/*@=observertrans =readonlytrans@*/
return RPMRC_FAIL;
}
/*@-mods@*/
spec->lbufPtr = spec->lbuf;
/*@=mods@*/
/* Don't expand macros (eg. %define) in false branch of %if clause */
/* Also don't expand macros in %changelog if STRIP_NOEXPAND is set */
/* (first line is omitted, so %date macro will be expanded */
if (!(strip & STRIP_NOEXPAND)) {
if (spec->readStack->reading &&
expandMacros(spec, spec->macros, spec->lbuf, spec->lbuf_len)) {
rpmlog(RPMLOG_ERR, _("line %d: %s\n"),
spec->lineNum, spec->lbuf);
return RPMRC_FAIL;
}
}
spec->nextline = spec->lbuf;
}
return 0;
}
/**
*/
static int copyNextLineFinish(Spec spec, int strip)
/*@modifies spec->line, spec->nextline, spec->nextpeekc @*/
{
char *last;
char ch;
/* Find next line in expanded line buffer */
spec->line = last = spec->nextline;
ch = ' ';
while (*spec->nextline && ch != '\n') {
ch = *spec->nextline++;
if (!xisspace(ch))
last = spec->nextline;
}
/* Save 1st char of next line in order to terminate current line. */
if (*spec->nextline != '\0') {
spec->nextpeekc = *spec->nextline;
*spec->nextline = '\0';
}
if (strip & STRIP_COMMENTS)
handleComments(spec->line);
if (strip & STRIP_TRAILINGSPACE)
*last = '\0';
return 0;
}
/**
*/
static int readLineFromOFI(Spec spec, OFI_t *ofi)
/*@globals h_errno, fileSystem, internalState @*/
/*@modifies ofi, spec->fileStack, spec->lineNum, spec->sl,
fileSystem, internalState @*/
{
retry:
/* Make sure the current file is open */
if (ofi->fd == NULL) {
ofi->fd = Fopen(ofi->fileName, "r.fpio");
if (ofi->fd == NULL || Ferror(ofi->fd)) {
/* XXX Fstrerror */
rpmlog(RPMLOG_ERR, _("Unable to open %s: %s\n"),
ofi->fileName, Fstrerror(ofi->fd));
return RPMRC_FAIL;
}
spec->lineNum = ofi->lineNum = 0;
}
/* Make sure we have something in the read buffer */
if (!(ofi->readPtr && *(ofi->readPtr))) {
/*@-type@*/ /* FIX: cast? */
FILE * f = fdGetFp(ofi->fd);
/*@=type@*/
if (f == NULL || !fgets(ofi->readBuf, (int)sizeof(ofi->readBuf), f)) {
/* EOF */
if (spec->readStack->next) {
rpmlog(RPMLOG_ERR, _("Unclosed %%if\n"));
return RPMRC_FAIL;
}
/* remove this file from the stack */
spec->fileStack = ofi->next;
(void) Fclose(ofi->fd);
ofi->fileName = _free(ofi->fileName);
/*@-temptrans@*/
ofi = _free(ofi);
/*@=temptrans@*/
/* only on last file do we signal EOF to caller */
ofi = spec->fileStack;
if (ofi == NULL)
return 1;
/* otherwise, go back and try the read again. */
goto retry;
}
ofi->readPtr = ofi->readBuf;
ofi->lineNum++;
spec->lineNum = ofi->lineNum;
if (spec->sl) {
speclines sl = spec->sl;
if (sl->sl_nlines == sl->sl_nalloc) {
sl->sl_nalloc += 100;
sl->sl_lines = (char **) xrealloc(sl->sl_lines,
sl->sl_nalloc * sizeof(*(sl->sl_lines)));
}
sl->sl_lines[sl->sl_nlines++] = xstrdup(ofi->readBuf);
}
}
return 0;
}
int readLine(Spec spec, rpmStripFlags strip)
{
char *s;
int match;
struct ReadLevelEntry *rl;
OFI_t *ofi = spec->fileStack;
int rc;
if (ofi == NULL) /* XXX segfault avoidance */
return 1;
if (!restoreFirstChar(spec)) {
retry:
if ((rc = readLineFromOFI(spec, ofi)) != 0)
return rc;
/* Copy next file line into the spec line buffer */
if ((rc = copyNextLineFromOFI(spec, ofi, strip)) != 0) {
if (rc == RPMRC_FAIL)
goto retry;
return rc;
}
}
(void) copyNextLineFinish(spec, strip);
s = spec->line;
SKIPSPACE(s);
match = -1;
if (!(strip & STRIP_NOEXPAND)) {
if (!spec->readStack->reading && !strncmp("%if", s, sizeof("%if")-1)) {
match = 0;
} else if (! strncmp("%ifarch", s, sizeof("%ifarch")-1)) {
const char *arch = rpmExpand("%{_target_cpu}", NULL);
s += 7;
match = matchTok(arch, s);
arch = _free(arch);
} else if (! strncmp("%ifnarch", s, sizeof("%ifnarch")-1)) {
const char *arch = rpmExpand("%{_target_cpu}", NULL);
s += 8;
match = !matchTok(arch, s);
arch = _free(arch);
} else if (! strncmp("%ifos", s, sizeof("%ifos")-1)) {
const char *os = rpmExpand("%{_target_os}", NULL);
s += 5;
match = matchTok(os, s);
os = _free(os);
} else if (! strncmp("%ifnos", s, sizeof("%ifnos")-1)) {
const char *os = rpmExpand("%{_target_os}", NULL);
s += 6;
match = !matchTok(os, s);
os = _free(os);
} else if (! strncmp("%if", s, sizeof("%if")-1)) {
s += 3;
match = parseExpressionBoolean(spec, s);
if (match < 0) {
rpmlog(RPMLOG_ERR,
_("%s:%d: parseExpressionBoolean returns %d\n"),
ofi->fileName, ofi->lineNum, match);
return RPMRC_FAIL;
}
} else if (! strncmp("%else", s, sizeof("%else")-1)) {
s += 5;
if (! spec->readStack->next) {
/* Got an else with no %if ! */
rpmlog(RPMLOG_ERR,
_("%s:%d: Got a %%else with no %%if\n"),
ofi->fileName, ofi->lineNum);
return RPMRC_FAIL;
}
spec->readStack->reading =
spec->readStack->next->reading && ! spec->readStack->reading;
spec->line[0] = '\0';
} else if (! strncmp("%endif", s, sizeof("%endif")-1)) {
s += 6;
if (! spec->readStack->next) {
/* Got an end with no %if ! */
rpmlog(RPMLOG_ERR,
_("%s:%d: Got a %%endif with no %%if\n"),
ofi->fileName, ofi->lineNum);
return RPMRC_FAIL;
}
rl = spec->readStack;
spec->readStack = spec->readStack->next;
free(rl);
spec->line[0] = '\0';
} else if (spec->readStack->reading && ! strncmp("%include", s, sizeof("%include")-1)) {
char *fileName, *endFileName, *p;
s += 8;
fileName = s;
if (! xisspace(*fileName)) {
rpmlog(RPMLOG_ERR, _("malformed %%include statement\n"));
return RPMRC_FAIL;
}
SKIPSPACE(fileName);
endFileName = fileName;
SKIPNONSPACE(endFileName);
p = endFileName;
SKIPSPACE(p);
if (*p != '\0') {
rpmlog(RPMLOG_ERR, _("malformed %%include statement\n"));
return RPMRC_FAIL;
}
*endFileName = '\0';
forceIncludeFile(spec, fileName);
ofi = spec->fileStack;
goto retry;
}
}
if (match != -1) {
rl = xmalloc(sizeof(*rl));
rl->reading = spec->readStack->reading && match;
rl->next = spec->readStack;
spec->readStack = rl;
spec->line[0] = '\0';
}
if (! spec->readStack->reading) {
spec->line[0] = '\0';
}
/*@-compmempass@*/ /* FIX: spec->readStack->next should be dependent */
return 0;
/*@=compmempass@*/
}
void closeSpec(Spec spec)
{
OFI_t *ofi;
while (spec->fileStack) {
ofi = spec->fileStack;
spec->fileStack = spec->fileStack->next;
if (ofi->fd) (void) Fclose(ofi->fd);
ofi->fileName = _free(ofi->fileName);
ofi = _free(ofi);
}
}
/**
*/
static inline int genSourceRpmName(Spec spec)
/*@globals internalState @*/
/*@modifies spec->sourceRpmName, spec->packages->header,
internalState @*/
{
if (spec->sourceRpmName == NULL) {
const char *N, *V, *R;
char fileName[BUFSIZ];
(void) headerNEVRA(spec->packages->header, &N, NULL, &V, &R, NULL);
(void) snprintf(fileName, sizeof(fileName), "%s-%s-%s.%ssrc.rpm",
N, V, R, spec->noSource ? "no" : "");
fileName[sizeof(fileName)-1] = '\0';
N = _free(N);
V = _free(V);
R = _free(R);
spec->sourceRpmName = xstrdup(fileName);
}
return 0;
}
/*@-redecl@*/
/*@unchecked@*/
extern int noLang; /* XXX FIXME: pass as arg */
/*@=redecl@*/
/*@todo Skip parse recursion if os is not compatible. @*/
int parseSpec(rpmts ts, const char *specFile, const char *rootURL,
int recursing, const char *passPhrase,
const char *cookie, int anyarch, int force, int verify)
{
HE_t he = (HE_t) memset(alloca(sizeof(*he)), 0, sizeof(*he));
rpmParseState parsePart = PART_PREAMBLE;
int initialPackage = 1;
Package pkg;
Spec spec;
int xx;
/* Set up a new Spec structure with no packages. */
spec = newSpec();
/*
* Note: rpmGetPath should guarantee a "canonical" path. That means
* that the following pathologies should be weeded out:
* //bin//sh
* //usr//bin/
* /.././../usr/../bin//./sh (XXX FIXME: dots not handled yet)
*/
spec->specFile = rpmGetPath(specFile, NULL);
spec->fileStack = newOpenFileInfo();
spec->fileStack->fileName = xstrdup(spec->specFile);
spec->recursing = recursing;
spec->toplevel = (!recursing ? 1 : 0);
spec->anyarch = anyarch;
spec->force = force;
if (rootURL)
spec->rootURL = xstrdup(rootURL);
if (passPhrase)
spec->passPhrase = xstrdup(passPhrase);
if (cookie)
spec->cookie = xstrdup(cookie);
spec->timeCheck = rpmExpandNumeric("%{_timecheck}");
/* XXX %_docdir should be set somewhere else. */
addMacro(NULL, "_docdir", NULL, "%{_defaultdocdir}", RMIL_SPEC);
/* All the parse*() functions expect to have a line pre-read */
/* in the spec's line buffer. Except for parsePreamble(), */
/* which handles the initial entry into a spec file. */
/*@-infloops@*/ /* LCL: parsePart is modified @*/
while (parsePart > PART_NONE) {
int goterror = 0;
switch (parsePart) {
default:
goterror = 1;
/*@switchbreak@*/ break;
case PART_PREAMBLE:
parsePart = parsePreamble(spec, initialPackage);
initialPackage = 0;
/*@switchbreak@*/ break;
case PART_PREP:
parsePart = parsePrep(spec, verify);
/*@switchbreak@*/ break;
case PART_BUILD:
case PART_INSTALL:
case PART_CHECK:
case PART_CLEAN:
case PART_ARBITRARY:
parsePart = parseBuildInstallClean(spec, parsePart);
/*@switchbreak@*/ break;
case PART_CHANGELOG:
parsePart = parseChangelog(spec);
/*@switchbreak@*/ break;
case PART_DESCRIPTION:
parsePart = parseDescription(spec);
/*@switchbreak@*/ break;
case PART_PRE:
case PART_POST:
case PART_PREUN:
case PART_POSTUN:
case PART_PRETRANS:
case PART_POSTTRANS:
case PART_VERIFYSCRIPT:
case PART_SANITYCHECK:
case PART_TRIGGERPREIN:
case PART_TRIGGERIN:
case PART_TRIGGERUN:
case PART_TRIGGERPOSTUN:
parsePart = parseScript(spec, parsePart);
/*@switchbreak@*/ break;
case PART_FILES:
parsePart = parseFiles(spec);
/*@switchbreak@*/ break;
case PART_NONE: /* XXX avoid gcc whining */
case PART_LAST:
case PART_BUILDARCHITECTURES:
/*@switchbreak@*/ break;
}
if (goterror || parsePart >= PART_LAST) {
spec = freeSpec(spec);
return parsePart;
}
/* Detect whether BuildArch: is toplevel or within %package. */
if (spec->toplevel && parsePart != PART_BUILDARCHITECTURES)
spec->toplevel = 0;
/* Restart parse iff toplevel BuildArch: is encountered. */
if (spec->toplevel && parsePart == PART_BUILDARCHITECTURES) {
int index;
int x;
closeSpec(spec);
/* LCL: sizeof(spec->BASpecs[0]) -nullderef whine here */
spec->BASpecs = xcalloc(spec->BACount, sizeof(*spec->BASpecs));
index = 0;
if (spec->BANames != NULL)
for (x = 0; x < spec->BACount; x++) {
/* XXX DIEDIEDIE: filter irrelevant platforms here. */
/* XXX there's more to do than set the macro. */
addMacro(NULL, "_target_cpu", NULL, spec->BANames[x], RMIL_RPMRC);
spec->BASpecs[index] = NULL;
if (parseSpec(ts, specFile, spec->rootURL, 1,
passPhrase, cookie, anyarch, force, verify)
|| (spec->BASpecs[index] = rpmtsSetSpec(ts, NULL)) == NULL)
{
spec->BACount = index;
/*@-nullstate@*/
spec = freeSpec(spec);
return RPMRC_FAIL;
/*@=nullstate@*/
}
/* XXX there's more to do than delete the macro. */
delMacro(NULL, "_target_cpu");
index++;
}
spec->BACount = index;
if (! index) {
rpmlog(RPMLOG_ERR,
_("No compatible architectures found for build\n"));
/*@-nullstate@*/
spec = freeSpec(spec);
return RPMRC_FAIL;
/*@=nullstate@*/
}
/*
* Return the 1st child's fully parsed Spec structure.
* The restart of the parse when encountering BuildArch
* causes problems for "rpm -q --specfile". This is
* still a hack because there may be more than 1 arch
* specified (unlikely but possible.) There's also the
* further problem that the macro context, particularly
* %{_target_cpu}, disagrees with the info in the header.
*/
if (spec->BACount >= 1) {
Spec nspec = spec->BASpecs[0];
spec->BASpecs = _free(spec->BASpecs);
spec = freeSpec(spec);
spec = nspec;
}
(void) rpmtsSetSpec(ts, spec);
return 0;
}
}
/*@=infloops@*/ /* LCL: parsePart is modified @*/
/* Initialize source RPM name. */
(void) genSourceRpmName(spec);
/* Check for description in each package and add arch and os */
{
const char *platform = rpmExpand("%{_target_platform}", NULL);
const char *platformNoarch = NULL;
const char *arch = rpmExpand("%{_target_cpu}", NULL);
const char *os = rpmExpand("%{_target_os}", NULL);
for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
he->tag = RPMTAG_OS;
he->t = RPM_STRING_TYPE;
/* XXX todo: really need "noos" like pkg->noarch somewhen. */
he->p.str = os;
he->c = 1;
xx = headerPut(pkg->header, he, 0);
he->tag = RPMTAG_ARCH;
he->t = RPM_STRING_TYPE;
he->p.str = (pkg->noarch ? "noarch" : arch);
he->c = 1;
xx = headerPut(pkg->header, he, 0);
/*
* If "noarch" subpackages of different arch, we need
* to use a separate platform tag for these (mdvbz#61746).
*/
if(pkg->noarch && !platformNoarch && strcmp(arch, "noarch")) {
addMacro(NULL, "_target_cpu", NULL, "noarch", RMIL_RPMRC);
platformNoarch = rpmExpand("%{_target_platform}", NULL);
addMacro(NULL, "_target_cpu", NULL, arch, RMIL_RPMRC);
}
he->tag = RPMTAG_PLATFORM;
he->t = RPM_STRING_TYPE;
he->p.str = (pkg->noarch && platformNoarch ? platformNoarch : platform);
he->c = 1;
xx = headerPut(pkg->header, he, 0);
he->tag = RPMTAG_SOURCERPM;
he->t = RPM_STRING_TYPE;
he->p.str = spec->sourceRpmName;
he->c = 1;
xx = headerPut(pkg->header, he, 0);
if (!headerIsEntry(pkg->header, RPMTAG_DESCRIPTION)) {
he->tag = RPMTAG_NVRA;
xx = headerGet(pkg->header, he, 0);
rpmlog(RPMLOG_ERR, _("Package has no %%description: %s\n"),
he->p.str);
he->p.ptr = _free(he->p.ptr);
platform = _free(platform);
platformNoarch = _free(platformNoarch);
arch = _free(arch);
os = _free(os);
spec = freeSpec(spec);
return RPMRC_FAIL;
}
pkg->ds = rpmdsThis(pkg->header, RPMTAG_REQUIRENAME, RPMSENSE_EQUAL);
}
platform = _free(platform);
platformNoarch = _free(platformNoarch);
arch = _free(arch);
os = _free(os);
}
closeSpec(spec);
(void) rpmtsSetSpec(ts, spec);
return 0;
}

224
rpm-5.4.9/build/poptBT.c Normal file
View file

@ -0,0 +1,224 @@
/** \ingroup rpmcli
* \file build/poptBT.c
* Popt tables for build modes.
*/
#include "system.h"
#include <rpmio.h>
#include <rpmiotypes.h>
#include <rpmlog.h>
#include <rpmtypes.h>
#include <rpmtag.h>
#include <rpmbuild.h>
#include "build.h"
#include <rpmcli.h>
#include "debug.h"
/*@unchecked@*/
extern int _pkg_debug;
/*@unchecked@*/
extern int _spec_debug;
/*@unchecked@*/
struct rpmBuildArguments_s rpmBTArgs;
#define POPT_NOLANG -1012
#define POPT_REBUILD 0x4220
#define POPT_RECOMPILE 0x4320
#define POPT_BA 0x6261
#define POPT_BB 0x6262
#define POPT_BC 0x6263
#define POPT_BI 0x6269
#define POPT_BL 0x626c
#define POPT_BP 0x6270
#define POPT_BS 0x6273
#define POPT_BT 0x6274 /* support "%track" script/section */
#define POPT_BF 0x6266
#define POPT_TA 0x7461
#define POPT_TB 0x7462
#define POPT_TC 0x7463
#define POPT_TI 0x7469
#define POPT_TL 0x746c
#define POPT_TP 0x7470
#define POPT_TS 0x7473
/*@unchecked@*/
int _rpmbuildFlags = 3;
/*@-exportlocal@*/
/*@unchecked@*/
int noLang = 0;
/*@=exportlocal@*/
/**
*/
static void buildArgCallback( /*@unused@*/ poptContext con,
/*@unused@*/ enum poptCallbackReason reason,
const struct poptOption * opt,
/*@unused@*/ const char * arg,
/*@unused@*/ const void * data)
{
BTA_t rba = &rpmBTArgs;
switch (opt->val) {
case POPT_REBUILD:
case POPT_RECOMPILE:
case POPT_BA:
case POPT_BB:
case POPT_BC:
case POPT_BI:
case POPT_BL:
case POPT_BP:
case POPT_BS:
case POPT_BT: /* support "%track" script/section */
case POPT_BF:
case POPT_TA:
case POPT_TB:
case POPT_TC:
case POPT_TI:
case POPT_TL:
case POPT_TP:
case POPT_TS:
if (rba->buildMode == '\0' && rba->buildChar == '\0') {
rba->buildMode = (char)((((unsigned int)opt->val) >> 8) & 0xff);
rba->buildChar = (char)(opt->val & 0xff);
}
break;
case POPT_NOLANG: rba->noLang = 1; break;
case RPMCLI_POPT_NODIGEST:
rba->qva_flags |= VERIFY_DIGEST;
break;
case RPMCLI_POPT_NOSIGNATURE:
rba->qva_flags |= VERIFY_SIGNATURE;
break;
case RPMCLI_POPT_NOHDRCHK:
rba->qva_flags |= VERIFY_HDRCHK;
break;
case RPMCLI_POPT_NODEPS:
rba->noDeps = 1;
break;
}
}
/**
*/
/*@-bitwisesigned -compmempass @*/
/*@unchecked@*/
struct poptOption rpmBuildPoptTable[] = {
/*@-type@*/ /* FIX: cast? */
{ NULL, '\0', POPT_ARG_CALLBACK | POPT_CBFLAG_INC_DATA | POPT_CBFLAG_CONTINUE,
buildArgCallback, 0, NULL, NULL },
/*@=type@*/
{ "bp", 0, POPT_ARGFLAG_ONEDASH, NULL, POPT_BP,
N_("build through %prep (unpack sources and apply patches) from <specfile>"),
N_("<specfile>") },
{ "bc", 0, POPT_ARGFLAG_ONEDASH, NULL, POPT_BC,
N_("build through %build (%prep, then compile) from <specfile>"),
N_("<specfile>") },
{ "bi", 0, POPT_ARGFLAG_ONEDASH, NULL, POPT_BI,
N_("build through %install (%prep, %build, then install) from <specfile>"),
N_("<specfile>") },
{ "bl", 0, POPT_ARGFLAG_ONEDASH, NULL, POPT_BL,
N_("verify %files section from <specfile>"),
N_("<specfile>") },
{ "ba", 0, POPT_ARGFLAG_ONEDASH, NULL, POPT_BA,
N_("build source and binary packages from <specfile>"),
N_("<specfile>") },
{ "bb", 0, POPT_ARGFLAG_ONEDASH, NULL, POPT_BB,
N_("build binary package only from <specfile>"),
N_("<specfile>") },
{ "bs", 0, POPT_ARGFLAG_ONEDASH, NULL, POPT_BS,
N_("build source package only from <specfile>"),
N_("<specfile>") },
/* support "%track" script/section */
{ "bt", 0, POPT_ARGFLAG_ONEDASH, 0, POPT_BT,
N_("track versions of sources from <specfile>"),
N_("<specfile>") },
{ "bf", 0, POPT_ARGFLAG_ONEDASH, 0, POPT_BF,
N_("fetch missing source and patch files"),
N_("<specfile>") },
{ "tp", 0, POPT_ARGFLAG_ONEDASH, NULL, POPT_TP,
N_("build through %prep (unpack sources and apply patches) from <tarball>"),
N_("<tarball>") },
{ "tc", 0, POPT_ARGFLAG_ONEDASH, NULL, POPT_TC,
N_("build through %build (%prep, then compile) from <tarball>"),
N_("<tarball>") },
{ "ti", 0, POPT_ARGFLAG_ONEDASH, NULL, POPT_TI,
N_("build through %install (%prep, %build, then install) from <tarball>"),
N_("<tarball>") },
{ "tl", 0, POPT_ARGFLAG_ONEDASH|POPT_ARGFLAG_DOC_HIDDEN, NULL, POPT_TL,
N_("verify %files section from <tarball>"),
N_("<tarball>") },
{ "ta", 0, POPT_ARGFLAG_ONEDASH, NULL, POPT_TA,
N_("build source and binary packages from <tarball>"),
N_("<tarball>") },
{ "tb", 0, POPT_ARGFLAG_ONEDASH, NULL, POPT_TB,
N_("build binary package only from <tarball>"),
N_("<tarball>") },
{ "ts", 0, POPT_ARGFLAG_ONEDASH, NULL, POPT_TS,
N_("build source package only from <tarball>"),
N_("<tarball>") },
{ "rebuild", '\0', 0, NULL, POPT_REBUILD,
N_("build binary package from <source package>"),
N_("<source package>") },
{ "recompile", '\0', 0, NULL, POPT_RECOMPILE,
N_("build through %install (%prep, %build, then install) from <source package>"),
N_("<source package>") },
{ "clean", '\0', POPT_BIT_SET, &rpmBTArgs.buildAmount, RPMBUILD_RMBUILD,
N_("remove build tree when done"), NULL},
{ "nobuild", '\0', POPT_ARG_VAL, &rpmBTArgs.noBuild, 1,
N_("do not execute any stages of the build"), NULL },
{ "nodeps", '\0', 0, NULL, RPMCLI_POPT_NODEPS,
N_("do not verify build dependencies"), NULL },
{ "noautoprov", '\0', POPT_BIT_CLR|POPT_ARGFLAG_DOC_HIDDEN, &_rpmbuildFlags, 1,
N_("disable automagic Provides: extraction"), NULL },
{ "noautoreq", '\0', POPT_BIT_CLR|POPT_ARGFLAG_DOC_HIDDEN, &_rpmbuildFlags, 2,
N_("disable automagic Requires: extraction"), NULL },
{ "notinlsb", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN, &_rpmbuildFlags, 4,
N_("disable tags forbidden by LSB"), NULL },
{ "nodigest", '\0', POPT_ARGFLAG_DOC_HIDDEN, NULL, RPMCLI_POPT_NODIGEST,
N_("don't verify package digest(s)"), NULL },
{ "nohdrchk", '\0', POPT_ARGFLAG_DOC_HIDDEN, NULL, RPMCLI_POPT_NOHDRCHK,
N_("don't verify database header(s) when retrieved"), NULL },
{ "nosignature", '\0', POPT_ARGFLAG_DOC_HIDDEN, NULL, RPMCLI_POPT_NOSIGNATURE,
N_("don't verify package signature(s)"), NULL },
{ "pkgdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_pkg_debug, -1,
N_("Debug Package objects"), NULL},
{ "specdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_spec_debug, -1,
N_("Debug Spec objects"), NULL},
{ "nolang", '\0', POPT_ARGFLAG_DOC_HIDDEN, &noLang, POPT_NOLANG,
N_("do not accept i18n msgstr's from specfile"), NULL},
{ "rmsource", '\0', POPT_BIT_SET, &rpmBTArgs.buildAmount, RPMBUILD_RMSOURCE,
N_("remove sources when done"), NULL},
{ "rmspec", '\0', POPT_BIT_SET, &rpmBTArgs.buildAmount, RPMBUILD_RMSPEC,
N_("remove specfile when done"), NULL},
{ "short-circuit", '\0', POPT_ARG_VAL, &rpmBTArgs.shortCircuit, 1,
N_("skip straight to specified stage (only for c,i)"), NULL },
{ "sign", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &rpmBTArgs.sign, 1,
N_("generate PGP/GPG signature"), NULL },
{ "target", '\0', POPT_ARG_STRING, NULL, RPMCLI_POPT_TARGETPLATFORM,
N_("override target platform"), N_("CPU-VENDOR-OS") },
POPT_TABLEEND
};
/*@=bitwisesigned =compmempass @*/

218
rpm-5.4.9/build/reqprov.c Normal file
View file

@ -0,0 +1,218 @@
/** \ingroup rpmbuild
* \file build/reqprov.c
* Add dependency tags to package header(s).
*/
#include "system.h"
#include <rpmio.h>
#include <rpmiotypes.h>
#define _RPMEVR_INTERNAL
#include "rpmbuild.h"
#include "debug.h"
int addReqProv(/*@unused@*/ Spec spec, Header h,
/*@unused@*/ rpmTag tagN,
const char * N, const char * EVR, rpmsenseFlags Flags,
rpmuint32_t index)
{
HE_t he = (HE_t) memset(alloca(sizeof(*he)), 0, sizeof(*he));
const char ** names;
rpmTag nametag = 0;
rpmTag versiontag = 0;
rpmTag flagtag = 0;
rpmTag indextag = 0;
int len;
rpmsenseFlags extra = RPMSENSE_ANY;
int xx;
if (Flags & RPMSENSE_PROVIDES) {
nametag = RPMTAG_PROVIDENAME;
versiontag = RPMTAG_PROVIDEVERSION;
flagtag = RPMTAG_PROVIDEFLAGS;
extra = Flags & RPMSENSE_FIND_PROVIDES;
} else if (Flags & RPMSENSE_OBSOLETES) {
nametag = RPMTAG_OBSOLETENAME;
versiontag = RPMTAG_OBSOLETEVERSION;
flagtag = RPMTAG_OBSOLETEFLAGS;
} else if (Flags & RPMSENSE_CONFLICTS) {
nametag = RPMTAG_CONFLICTNAME;
versiontag = RPMTAG_CONFLICTVERSION;
flagtag = RPMTAG_CONFLICTFLAGS;
} else if (Flags & RPMSENSE_TRIGGER) {
nametag = RPMTAG_TRIGGERNAME;
versiontag = RPMTAG_TRIGGERVERSION;
flagtag = RPMTAG_TRIGGERFLAGS;
indextag = RPMTAG_TRIGGERINDEX;
extra = Flags & RPMSENSE_TRIGGER;
} else {
nametag = RPMTAG_REQUIRENAME;
versiontag = RPMTAG_REQUIREVERSION;
flagtag = RPMTAG_REQUIREFLAGS;
extra = Flags & _ALL_REQUIRES_MASK;
}
Flags = (Flags & RPMSENSE_SENSEMASK) | extra;
if (EVR == NULL)
EVR = "";
#if defined(RPM_VENDOR_MANDRIVA)
/* Check that provide isn't duplicate of package */
else if (nametag == RPMTAG_PROVIDENAME) {
const char *NEVR;
size_t len;
int duplicate;
len = strlen(N);
NEVR = headerSprintf(h, "%{NAME}-%|EPOCH?{%{EPOCH}:}|%{VERSION}-%{RELEASE}", NULL, NULL, NULL);
duplicate = !strncmp(NEVR, N, len) && !strcmp(NEVR+len+1, EVR);
_free(NEVR);
if (duplicate)
return 0;
}
#endif
/* Check for duplicate dependencies. */
he->tag = nametag;
xx = headerGet(h, he, 0);
names = he->p.argv;
len = he->c;
if (xx) {
const char ** versions = NULL;
rpmuint32_t * flags = NULL;
rpmuint32_t * indexes = NULL;
int duplicate = 0;
if (flagtag) {
he->tag = versiontag;
xx = headerGet(h, he, 0);
versions = he->p.argv;
he->tag = flagtag;
xx = headerGet(h, he, 0);
flags = he->p.ui32p;
}
if (indextag) {
he->tag = indextag;
xx = headerGet(h, he, 0);
indexes = he->p.ui32p;
}
while (len > 0) {
len--;
if (strcmp(names[len], N))
continue;
#if defined(RPM_VENDOR_MANDRIVA) /* filter-overlapping-dependencies */
/* XXX: Potential drawbacks? Need to study & discuess this one a
* bit further, leaving under #ifdef for now...
* TODO: auto-generated deps too
*/
if (flagtag && versions != NULL) {
int overlap;
if(*EVR && !*versions[len]) {
overlap = 1;
flags[len] = Flags;
he->tag = flagtag;
he->t = RPM_UINT32_TYPE;
he->p.argv = (void *) &Flags;
xx = headerMod(h, he, 0);
} else {
EVR_t lEVR = rpmEVRnew(RPMSENSE_ANY, 0),
rEVR = rpmEVRnew(RPMSENSE_ANY, 0);
rpmEVRparse(EVR, lEVR);
rpmEVRparse(versions[len], rEVR);
lEVR->Flags = Flags | RPMSENSE_EQUAL;
rEVR->Flags = flags[len] | RPMSENSE_EQUAL;
overlap = rpmEVRoverlap(lEVR, rEVR);
if (!overlap)
if (rpmEVRoverlap(rEVR, lEVR))
duplicate = 1;
lEVR = rpmEVRfree(lEVR);
rEVR = rpmEVRfree(rEVR);
}
if (overlap) {
versions[len] = EVR;
he->tag = versiontag;
he->t = RPM_STRING_ARRAY_TYPE;
he->p.argv = versions;
xx = headerMod(h, he, 0);
} else
continue;
}
#else
if (flagtag && versions != NULL &&
(strcmp(versions[len], EVR) || (rpmsenseFlags)flags[len] != Flags))
continue;
#endif
if (indextag && indexes != NULL && indexes[len] != index)
continue;
/* This is a duplicate dependency. */
duplicate = 1;
break;
}
/*@-usereleased@*/
names = _free(names);
versions = _free(versions);
flags = _free(flags);
indexes = _free(indexes);
/*@=usereleased@*/
if (duplicate)
return 0;
}
/* Add this dependency. */
he->tag = nametag;
he->t = RPM_STRING_ARRAY_TYPE;
he->p.argv = &N;
he->c = 1;
he->append = 1;
xx = headerPut(h, he, 0);
he->append = 0;
if (flagtag) {
he->tag = versiontag;
he->t = RPM_STRING_ARRAY_TYPE;
he->p.argv = &EVR;
he->c = 1;
he->append = 1;
xx = headerPut(h, he, 0);
he->append = 0;
he->tag = flagtag;
he->t = RPM_UINT32_TYPE;
he->p.ui32p = (void *) &Flags;
he->c = 1;
he->append = 1;
xx = headerPut(h, he, 0);
he->append = 0;
}
if (indextag) {
he->tag = indextag;
he->t = RPM_UINT32_TYPE;
he->p.ui32p = &index;
he->c = 1;
he->append = 1;
xx = headerPut(h, he, 0);
he->append = 0;
}
return 0;
}
int rpmlibNeedsFeature(Header h, const char * feature, const char * featureEVR)
{
char * reqname = alloca(sizeof("rpmlib()") + strlen(feature));
(void) stpcpy( stpcpy( stpcpy(reqname, "rpmlib("), feature), ")");
/* XXX 1st arg is unused */
return addReqProv(NULL, h, RPMTAG_REQUIRENAME, reqname, featureEVR,
RPMSENSE_RPMLIB|(RPMSENSE_LESS|RPMSENSE_EQUAL), 0);
}

598
rpm-5.4.9/build/rpmbuild.h Normal file
View file

@ -0,0 +1,598 @@
#ifndef _H_RPMBUILD_
#define _H_RPMBUILD_
/** \ingroup rpmbuild
* \file build/rpmbuild.h
* This is the *only* module users of librpmbuild should need to include.
*/
#include <rpmiotypes.h>
#include <rpmmacro.h>
#include <rpmtypes.h>
#include <rpmtag.h>
#include <rpmfi.h>
#include <rpmcli.h>
#include "rpmspec.h"
/** \ingroup rpmbuild
* Bit(s) to control buildSpec() operation.
*/
/*@-typeuse@*/
typedef enum rpmBuildFlags_e {
/*@-enummemuse@*/
RPMBUILD_NONE = 0,
/*@=enummemuse@*/
RPMBUILD_PREP = (1 << 0), /*!< Execute %%prep. */
RPMBUILD_BUILD = (1 << 1), /*!< Execute %%build. */
RPMBUILD_INSTALL = (1 << 2), /*!< Execute %%install. */
RPMBUILD_CHECK = (1 << 3), /*!< Execute %%check. */
RPMBUILD_CLEAN = (1 << 4), /*!< Execute %%clean. */
RPMBUILD_FILECHECK = (1 << 5), /*!< Check %%files manifest. */
RPMBUILD_PACKAGESOURCE = (1 << 6), /*!< Create source package. */
RPMBUILD_PACKAGEBINARY = (1 << 7), /*!< Create binary package(s). */
RPMBUILD_RMSOURCE = (1 << 8), /*!< Remove source(s) and patch(s). */
RPMBUILD_RMBUILD = (1 << 9), /*!< Remove build sub-tree. */
RPMBUILD_STRINGBUF = (1 << 10), /*!< only for doScript() */
RPMBUILD_TRACK = (1 << 11), /*!< Execute %%track. */
RPMBUILD_RMSPEC = (1 << 12), /*!< Remove spec file. */
RPMBUILD_FETCHSOURCE= (1 << 13) /*!< Fetch source(s) and patch(s). */
} rpmBuildFlags;
/*@=typeuse@*/
#define SKIPSPACE(s) { while (*(s) && xisspace(*(s))) (s)++; }
#define SKIPNONSPACE(s) { while (*(s) && !xisspace(*(s))) (s)++; }
#define PART_SUBNAME 0
#define PART_NAME 1
/** \ingroup rpmbuild
* Spec file parser states.
*/
#define PART_BASE 100
typedef enum rpmParseState_e {
PART_NONE = 0+PART_BASE, /*!< */
/* leave room for RPMRC_NOTFOUND returns. */
PART_PREAMBLE = 11+PART_BASE, /*!< */
PART_PREP = 12+PART_BASE, /*!< */
PART_BUILD = 13+PART_BASE, /*!< */
PART_INSTALL = 14+PART_BASE, /*!< */
PART_CHECK = 15+PART_BASE, /*!< */
PART_CLEAN = 16+PART_BASE, /*!< */
PART_FILES = 17+PART_BASE, /*!< */
PART_PRE = 18+PART_BASE, /*!< */
PART_POST = 19+PART_BASE, /*!< */
PART_PREUN = 20+PART_BASE, /*!< */
PART_POSTUN = 21+PART_BASE, /*!< */
PART_PRETRANS = 22+PART_BASE, /*!< */
PART_POSTTRANS = 23+PART_BASE, /*!< */
PART_DESCRIPTION = 24+PART_BASE, /*!< */
PART_CHANGELOG = 25+PART_BASE, /*!< */
PART_TRIGGERIN = 26+PART_BASE, /*!< */
PART_TRIGGERUN = 27+PART_BASE, /*!< */
PART_VERIFYSCRIPT = 28+PART_BASE, /*!< */
PART_BUILDARCHITECTURES= 29+PART_BASE,/*!< */
PART_TRIGGERPOSTUN = 30+PART_BASE, /*!< */
PART_TRIGGERPREIN = 31+PART_BASE, /*!< */
/* support "%sanitycheck" script */
PART_SANITYCHECK = 32+PART_BASE, /*!< */
PART_ARBITRARY = 33+PART_BASE, /*!< */
PART_LAST = 34+PART_BASE /*!< */
} rpmParseState;
/** \ingroup rpmbuild
* Spec file parser stripping flags.
*/
typedef enum rpmStripFlags_e {
STRIP_NOTHING = 0,
STRIP_TRAILINGSPACE = (1 << 0),
STRIP_COMMENTS = (1 << 1),
STRIP_NOEXPAND = (1 << 2)
} rpmStripFlags;
/*@unchecked@*/
extern int _rpmbuildFlags;
#ifdef __cplusplus
extern "C" {
#endif
/*@-redecl@*/
/** \ingroup rpmbuild
* Destroy uid/gid caches.
*/
void freeNames(void)
/*@globals internalState@*/
/*@modifies internalState */;
/** \ingroup rpmbuild
* Return cached user name from user id.
* @todo Implement using hash.
* @param uid user id
* @return cached user name
*/
extern /*@observer@*/ const char * getUname(uid_t uid)
/*@globals internalState @*/
/*@modifies internalState @*/;
/** \ingroup rpmbuild
* Return cached user name.
* @todo Implement using hash.
* @param uname user name
* @return cached user name
*/
extern /*@observer@*/ const char * getUnameS(const char * uname)
/*@globals internalState @*/
/*@modifies internalState @*/;
/** \ingroup rpmbuild
* Return cached user id.
* @todo Implement using hash.
* @param uname user name
* @return cached uid
*/
uid_t getUidS(const char * uname)
/*@globals internalState @*/
/*@modifies internalState @*/;
/** \ingroup rpmbuild
* Return cached group name from group id.
* @todo Implement using hash.
* @param gid group id
* @return cached group name
*/
extern /*@observer@*/ const char * getGname(gid_t gid)
/*@globals internalState @*/
/*@modifies internalState @*/;
/** \ingroup rpmbuild
* Return cached group name.
* @todo Implement using hash.
* @param gname group name
* @return cached group name
*/
extern /*@observer@*/ const char * getGnameS(const char * gname)
/*@globals internalState @*/
/*@modifies internalState @*/;
/** \ingroup rpmbuild
* Return cached group id.
* @todo Implement using hash.
* @param gname group name
* @return cached gid
*/
gid_t getGidS(const char * gname)
/*@globals internalState @*/
/*@modifies internalState @*/;
/** \ingroup rpmbuild
* Return build hostname.
* @return build hostname
*/
/*@observer@*/
extern const char * buildHost(void)
/*@*/;
/** \ingroup rpmbuild
* Return build time stamp.
* @return build time stamp
*/
/*@observer@*/
extern rpmuint32_t * getBuildTime(void)
/*@*/;
/** \ingroup rpmbuild
* Read next line from spec file.
* @param spec spec file control structure
* @param strip truncate comments?
* @return 0 on success, 1 on EOF, <0 on error
*/
int readLine(Spec spec, rpmStripFlags strip)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies spec->fileStack, spec->readStack, spec->line, spec->lineNum,
spec->lbufPtr,
spec->nextline, spec->nextpeekc, spec->lbuf, spec->sl,
rpmGlobalMacroContext, fileSystem, internalState @*/;
/** \ingroup rpmbuild
* Stop reading from spec file, freeing resources.
* @param spec spec file control structure
*/
void closeSpec(/*@partial@*/ Spec spec)
/*@globals fileSystem, internalState @*/
/*@modifies spec->fileStack, fileSystem, internalState @*/;
/** \ingroup rpmbuild
* Truncate comment lines.
* @param s skip white space, truncate line at '#'
*/
void handleComments(char * s)
/*@modifies s @*/;
/** \ingroup rpmbuild
* Check line for section separator, return next parser state.
* @param spec spec file control structure
* @return next parser state
*/
rpmParseState isPart(Spec spec)
/*@modifies spec->foo, spec->nfoo @*/;
/** \ingroup rpmbuild
* Parse a number.
* @param line from spec file
* @retval res pointer to int
* @return 0 on success, 1 on failure
*/
int parseNum(/*@null@*/ const char * line, /*@null@*/ /*@out@*/rpmuint32_t * res)
/*@modifies *res @*/;
/** \ingroup rpmbuild
* Add changelog entry to header.
* @todo addChangelogEntry should be static.
* @param h header
* @param time time of change
* @param name person who made the change
* @param text description of change
*/
void addChangelogEntry(Header h, time_t time, const char * name,
const char * text)
/*@modifies h @*/;
/** \ingroup rpmbuild
* Parse %%build/%%install/%%clean section(s) of a spec file.
* @param spec spec file control structure
* @param parsePart current rpmParseState
* @return >= 0 next rpmParseState, < 0 on error
*/
int parseBuildInstallClean(Spec spec, rpmParseState parsePart)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies spec->build, spec->install, spec->check, spec->clean,
spec->macros, spec->foo, spec->nfoo, spec->lbufPtr,
spec->fileStack, spec->readStack, spec->line, spec->lineNum,
spec->nextline, spec->nextpeekc, spec->lbuf, spec->sl,
rpmGlobalMacroContext, fileSystem, internalState @*/;
/** \ingroup rpmbuild
* Parse %%changelog section of a spec file.
* @param spec spec file control structure
* @return >= 0 next rpmParseState, < 0 on error
*/
int parseChangelog(Spec spec)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies spec->fileStack, spec->readStack, spec->line, spec->lineNum,
spec->foo, spec->nfoo, spec->lbufPtr,
spec->nextline, spec->nextpeekc, spec->lbuf, spec->sl,
spec->packages->header,
rpmGlobalMacroContext, fileSystem, internalState @*/;
/** \ingroup rpmbuild
* Parse %%description section of a spec file.
* @param spec spec file control structure
* @return >= 0 next rpmParseState, < 0 on error
*/
int parseDescription(Spec spec)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies spec->packages,
spec->foo, spec->nfoo, spec->lbufPtr,
spec->fileStack, spec->readStack, spec->line, spec->lineNum,
spec->nextline, spec->nextpeekc, spec->lbuf, spec->sl,
spec->st,
rpmGlobalMacroContext, fileSystem, internalState @*/;
/** \ingroup rpmbuild
* Parse %%files section of a spec file.
* @param spec spec file control structure
* @return >= 0 next rpmParseState, < 0 on error
*/
int parseFiles(Spec spec)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies spec->packages,
spec->foo, spec->nfoo, spec->lbufPtr,
spec->fileStack, spec->readStack, spec->line, spec->lineNum,
spec->nextline, spec->nextpeekc, spec->lbuf, spec->sl,
rpmGlobalMacroContext, fileSystem, internalState @*/;
/** \ingroup rpmbuild
* Parse tags from preamble of a spec file.
* @param spec spec file control structure
* @param initialPackage
* @return >= 0 next rpmParseState, < 0 on error
*/
int parsePreamble(Spec spec, int initialPackage)
/*@globals rpmGlobalMacroContext, h_errno,
fileSystem, internalState @*/
/*@modifies spec->packages,
spec->foo, spec->nfoo, spec->lbufPtr,
spec->fileStack, spec->readStack, spec->line, spec->lineNum,
spec->buildSubdir,
spec->macros, spec->st,
spec->sources, spec->numSources, spec->noSource,
spec->sourceHeader, spec->BANames, spec->BACount,
spec->nextline, spec->nextpeekc, spec->lbuf, spec->sl,
rpmGlobalMacroContext, fileSystem, internalState @*/;
/** \ingroup rpmbuild
* Parse %%prep section of a spec file.
* @param spec spec file control structure
* @param verify verify existence of sources/patches?
* @return >= 0 next rpmParseState, < 0 on error
*/
int parsePrep(Spec spec, int verify)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies spec->prep, spec->buildSubdir, spec->macros,
spec->foo, spec->nfoo, spec->lbufPtr,
spec->fileStack, spec->readStack, spec->line, spec->lineNum,
spec->nextline, spec->nextpeekc, spec->lbuf, spec->sl,
spec->packages->header,
rpmGlobalMacroContext, fileSystem, internalState @*/;
/** \ingroup rpmbuild
* Parse dependency relations from spec file and/or autogenerated output buffer.
* @param spec spec file control structure
* @param pkg package control structure
* @param field text to parse (e.g. "foo < 0:1.2-3, bar = 5:6.7")
* @param tagN tag, identifies type of dependency
* @param index (0 always)
* @param tagflags dependency flags already known from context
* @return RPMRC_OK on success
*/
rpmRC parseRCPOT(Spec spec, Package pkg, const char * field, rpmTag tagN,
rpmuint32_t index, rpmsenseFlags tagflags)
/*@globals internalState @*/
/*@modifies internalState @*/;
/** \ingroup rpmbuild
* Parse %%pre et al scriptlets from a spec file.
* @param spec spec file control structure
* @param parsePart current rpmParseState
* @return >= 0 next rpmParseState, < 0 on error
*/
int parseScript(Spec spec, int parsePart)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies spec->packages,
spec->foo, spec->nfoo, spec->lbufPtr,
spec->fileStack, spec->readStack, spec->line, spec->lineNum,
spec->nextline, spec->nextpeekc, spec->lbuf, spec->sl,
rpmGlobalMacroContext, fileSystem, internalState @*/;
/** \ingroup rpmbuild
* Evaluate boolean expression.
* @param spec spec file control structure
* @param expr expression to parse
* @return
*/
int parseExpressionBoolean(Spec spec, const char * expr)
/*@globals rpmGlobalMacroContext, h_errno, internalState @*/
/*@modifies rpmGlobalMacroContext, internalState @*/;
/** \ingroup rpmbuild
* Evaluate string expression.
* @param spec spec file control structure
* @param expr expression to parse
* @return
*/
/*@unused@*/ /*@null@*/
char * parseExpressionString(Spec spec, const char * expr)
/*@globals rpmGlobalMacroContext, h_errno, internalState @*/
/*@modifies rpmGlobalMacroContext, internalState @*/;
/** \ingroup rpmbuild
* Run a build script, assembled from spec file scriptlet section.
*
* @param spec spec file control structure
* @param what type of script
* @param name name of scriptlet section
* @param iob lines that compose script body
* @param test don't execute scripts or package if testing
* @return RPMRC_OK on success, RPMRC_FAIL on failure
*/
rpmRC doScript(Spec spec, int what, /*@null@*/ const char * name,
/*@null@*/ rpmiob iob, int test)
/*@globals rpmGlobalMacroContext, h_errno,
fileSystem, internalState @*/
/*@modifies spec->macros,
rpmGlobalMacroContext, fileSystem, internalState @*/;
/** \ingroup rpmbuild
* Find sub-package control structure by name.
* @param spec spec file control structure
* @param name (sub-)package name
* @param flag if PART_SUBNAME, then 1st package name is prepended
* @retval pkg package control structure
* @return RPMRC_OK on success
*/
rpmRC lookupPackage(Spec spec, /*@null@*/ const char * name, int flag,
/*@out@*/ Package * pkg)
/*@globals rpmGlobalMacroContext, h_errno, internalState @*/
/*@modifies spec->packages, *pkg, rpmGlobalMacroContext,
internalState @*/;
/** \ingroup rpmbuild
* Destroy all packages associated with spec file.
* @param packages package control structure chain
* @return NULL
*/
/*@null@*/
Package freePackages(/*@only@*/ /*@null@*/ Package packages)
/*@globals fileSystem @*/
/*@modifies packages, fileSystem @*/;
/** \ingroup rpmbuild
* Destroy a package control structure.
* @todo Rename to pkgFree.
* @param pkg package control structure
* @return NULL on last dereference
*/
/*@null@*/
Package freePackage(/*@killref@*/ /*@null@*/ Package pkg)
/*@globals fileSystem @*/
/*@modifies pkg, fileSystem @*/;
#define freePackage(_pkg) \
((Package)rpmioFreePoolItem((rpmioItem)(_pkg), __FUNCTION__, __FILE__, __LINE__))
/** \ingroup rpmbuild
* Create and initialize package control structure.
* @param spec spec file control structure
* @return package control structure
*/
/*@only@*/
Package newPackage(Spec spec)
/*@modifies spec->packages, spec->packages->next @*/;
/** \ingroup rpmbuild
* Add dependency to header, filtering duplicates.
* @param spec spec file control structure
* @param h header
* @param tagN tag, identifies type of dependency
* @param N (e.g. Requires: foo < 0:1.2-3, "foo")
* @param EVR (e.g. Requires: foo < 0:1.2-3, "0:1.2-3")
* @param Flags (e.g. Requires: foo < 0:1.2-3, both "Requires:" and "<")
* @param index (0 always)
* @return 0 always
*/
int addReqProv(/*@unused@*/Spec spec, Header h, rpmTag tagN,
const char * N, const char * EVR, rpmsenseFlags Flags,
rpmuint32_t index)
/*@globals internalState @*/
/*@modifies h, internalState @*/;
/**
* Append files (if any) to scriptlet tags.
* @param spec spec file control structure
* @param pkg package control structure
* @return RPMRC_OK on success
*/
rpmRC processScriptFiles(Spec spec, Package pkg)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies pkg->header, rpmGlobalMacroContext,
fileSystem, internalState @*/;
/**
* Retrofit an explicit Provides: N = E:V-R dependency into package headers.
* Up to rpm 3.0.4, packages implicitly provided their own name-version-release.
* @param h header
*/
void providePackageNVR(Header h)
/*@globals internalState @*/
/*@modifies h, internalState @*/;
/** \ingroup rpmbuild
* Add rpmlib feature dependency.
* @param h header
* @param feature rpm feature name (i.e. "rpmlib(Foo)" for feature Foo)
* @param featureEVR rpm feature epoch/version/release
* @return 0 always
*/
int rpmlibNeedsFeature(Header h, const char * feature, const char * featureEVR)
/*@globals internalState @*/
/*@modifies h, internalState @*/;
/** \ingroup rpmbuild
* Post-build processing for binary package(s).
* @param spec spec file control structure
* @param installSpecialDoc
* @param test don't execute scripts or package if testing
* @return RPMRC_OK on success
*/
rpmRC processBinaryFiles(Spec spec, int installSpecialDoc, int test)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies spec->macros, *spec->packages,
spec->packages->fi, spec->packages->fileList,
spec->packages->specialDoc, spec->packages->header,
rpmGlobalMacroContext, fileSystem, internalState @*/;
/** \ingroup rpmbuild
* Create and initialize header for source package.
* @param spec spec file control structure
* @retval *sfp srpm file list (may be NULL)
* @return 0 always
*/
int initSourceHeader(Spec spec, /*@null@*/ rpmiob *sfp)
/*@globals rpmGlobalMacroContext, h_errno, internalState @*/
/*@modifies spec->sourceHeader, spec->sourceHdrInit,
spec->BANames, *sfp,
spec->packages->header,
rpmGlobalMacroContext, internalState @*/;
/** \ingroup rpmbuild
* Post-build processing for source package.
* @param spec spec file control structure
* @return 0 on success
*/
int processSourceFiles(Spec spec)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies spec->sourceHeader, spec->sourceCpioList,
spec->BANames, spec->sourceHdrInit,
spec->packages->header,
rpmGlobalMacroContext, fileSystem, internalState @*/;
/** \ingroup rpmbuild
* Parse spec file into spec control structure.
* @param ts transaction set (spec file control in ts->spec)
* @param specFile
* @param rootURL
* @param recursing parse is recursive?
* @param passPhrase
* @param cookie
* @param anyarch
* @param force
* @param verify
* @return
*/
int parseSpec(rpmts ts, const char * specFile,
/*@null@*/ const char * rootURL,
int recursing,
/*@null@*/ const char * passPhrase,
/*@null@*/ const char * cookie,
int anyarch, int force, int verify)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
/** \ingroup rpmbuild
* Build stages state machine driver.
* @param ts transaction set
* @param spec spec file control structure
* @param what bit(s) to enable stages of build
* @param test don't execute scripts or package if testing
* @return RPMRC_OK on success
*/
rpmRC buildSpec(rpmts ts, Spec spec, int what, int test)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies spec->sourceHeader, spec->sourceCpioList, spec->cookie,
spec->sourceRpmName, spec->sourcePkgId, spec->sourceHdrInit,
spec->macros, spec->BASpecs,
spec->BANames, *spec->packages,
spec->packages->fi, spec->packages->fileList,
spec->packages->specialDoc, spec->packages->header,
rpmGlobalMacroContext, fileSystem, internalState @*/;
/** \ingroup rpmbuild
* Generate binary package(s).
* @param spec spec file control structure
* @return rpmRC on success
*/
rpmRC packageBinaries(Spec spec)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies spec->packages->header, spec->packages->fi,
spec->sourceRpmName, spec->cookie, spec->sourcePkgId,
rpmGlobalMacroContext, fileSystem, internalState @*/;
/** \ingroup rpmbuild
* Generate source package.
* @param spec spec file control structure
* @return RPMRC_OK on success
*/
rpmRC packageSources(Spec spec)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies spec->sourceHeader, spec->cookie, spec->sourceCpioList,
spec->sourceRpmName, spec->sourcePkgId, spec->packages->header,
rpmGlobalMacroContext, fileSystem, internalState @*/;
/*@=redecl@*/
#ifdef __cplusplus
}
#endif
#endif /* _H_RPMBUILD_ */

403
rpm-5.4.9/build/rpmspec.h Normal file
View file

@ -0,0 +1,403 @@
#ifndef _H_RPMSPEC_
#define _H_RPMSPEC_
/** \ingroup rpmbuild
* \file build/rpmspec.h
* The Spec and Package data structures used during build.
*/
#include <rpmevr.h>
#include <rpmfi.h> /* XXX rpmfi typedef */
#include <rpmcli.h> /* XXX QVA_t typedef */
/** \ingroup rpmbuild
*/
typedef /*@abstract@*/ /*@refcounted@*/ struct Package_s * Package;
/** \ingroup rpmbuild
*/
typedef struct Source * SpecSource;
/** \ingroup rpmbuild
*/
struct TriggerFileEntry {
int index;
/*@only@*/
char * fileName;
/*@only@*/
char * script;
/*@only@*/
char * prog;
/*@owned@*/
struct TriggerFileEntry * next;
};
#define RPMBUILD_DEFAULT_LANG "C"
/** \ingroup rpmbuild
*/
struct Source {
/*@owned@*/
const char * fullSource;
/*@dependent@*/ /*@relnull@*/
const char * source; /* Pointer into fullSource */
int flags;
rpmuint32_t num;
/*@owned@*/
struct Source * next;
};
/** \ingroup rpmbuild
*/
/*@-typeuse@*/
typedef struct ReadLevelEntry {
int reading;
/*@dependent@*/
struct ReadLevelEntry * next;
} RLE_t;
/*@=typeuse@*/
/** \ingroup rpmbuild
*/
typedef struct OpenFileInfo {
/*@only@*/
const char * fileName;
/*@relnull@*/
FD_t fd;
int lineNum;
char readBuf[BUFSIZ];
/*@dependent@*/
char * readPtr;
/*@owned@*/
struct OpenFileInfo * next;
} OFI_t;
/** \ingroup rpmbuild
*/
typedef struct spectag_s {
int t_tag;
int t_startx;
int t_nlines;
/*@only@*/
const char * t_lang;
/*@only@*/
const char * t_msgid;
} * spectag;
/** \ingroup rpmbuild
*/
typedef struct spectags_s {
/*@owned@*/
spectag st_t;
int st_nalloc;
int st_ntags;
} * spectags;
/** \ingroup rpmbuild
*/
typedef struct speclines_s {
/*@only@*/
char **sl_lines;
int sl_nalloc;
int sl_nlines;
} * speclines;
/** \ingroup rpmbuild
* The structure used to store values parsed from a spec file.
*/
struct Spec_s {
struct rpmioItem_s _item; /*!< usage mutex and pool identifier. */
/*@only@*/
const char * specFile; /*!< Name of the spec file. */
/*@only@*/
const char * buildSubdir;
/*@only@*/
const char * rootURL;
/*@owned@*/ /*@null@*/
speclines sl;
/*@owned@*/ /*@null@*/
spectags st;
/*@owned@*/
struct OpenFileInfo * fileStack;
/*@owned@*/
char *lbuf;
size_t lbuf_len;
/*@dependent@*/
char *lbufPtr;
char nextpeekc;
/*@dependent@*/
char * nextline;
/*@dependent@*/
char * line;
int lineNum;
/*@owned@*/
struct ReadLevelEntry * readStack;
/*@owned@*/ /*@null@*/
Spec * BASpecs;
/*@only@*/ /*@null@*/
const char ** BANames;
int BACount;
int recursing; /*!< parse is recursive? */
int toplevel;
int force;
int anyarch;
/*@null@*/
char * passPhrase;
int timeCheck;
/*@null@*/
const char * cookie;
/*@owned@*/
struct Source * sources;
int numSources;
int noSource;
/*@only@*/
const char * sourceRpmName;
/*@only@*/
unsigned char * sourcePkgId;
/*@refcounted@*/
Header sourceHeader;
/*@refcounted@*/
rpmfi fi;
int sourceHdrInit;
/*@dependent@*/ /*@null@*/
MacroContext macros;
rpmRC (*_parseRCPOT) (Spec spec, Package pkg, const char *field, rpmTag tagN,
rpmuint32_t index, rpmsenseFlags tagflags);
rpmuint32_t sstates[RPMSCRIPT_MAX]; /*!< scriptlet states. */
rpmuint32_t smetrics[RPMSCRIPT_MAX]; /*!< scriptlet time metrics. */
/*@only@*/
rpmiob prep; /*!< %prep scriptlet. */
/*@only@*/
rpmiob build; /*!< %build scriptlet. */
/*@only@*/
rpmiob install; /*!< %install scriptlet. */
/*@only@*/
rpmiob check; /*!< %check scriptlet. */
/*@only@*/
rpmiob clean; /*!< %clean scriptlet. */
size_t nfoo;
/*@only@*/ /*@relnull@*/
tagStore_t foo;
void * dig; /*!< Auto-signing keypair. */
Package packages; /*!< Package list. */
#if defined(__LCLINT__)
/*@refs@*/
int nrefs; /*!< (unused) keep splint happy */
#endif
};
/** \ingroup rpmbuild
* The structure used to store values for a package.
*/
struct Package_s {
struct rpmioItem_s _item; /*!< usage mutex and pool identifier. */
/*@refcounted@*/
Header header;
/*@refcounted@*/
rpmds ds; /*!< Requires: N = EVR */
/*@refcounted@*/
rpmfi fi;
int autoReq;
int autoProv;
int noarch;
/*@only@*/
const char * preInFile; /*!< %pre scriptlet. */
/*@only@*/
const char * postInFile; /*!< %post scriptlet. */
/*@only@*/
const char * preUnFile; /*!< %preun scriptlet. */
/*@only@*/
const char * postUnFile; /*!< %postun scriptlet. */
/*@only@*/
const char * preTransFile; /*!< %pretrans scriptlet. */
/*@only@*/
const char * postTransFile; /*!< %posttrans scriptlet. */
/*@only@*/
const char * verifyFile; /*!< %verifyscript scriptlet. */
/*@only@*/
const char * sanityCheckFile;/*!< %sanitycheck scriptlet. */
/*@only@*/
rpmiob specialDoc;
/*@only@*/
struct TriggerFileEntry * triggerFiles;
/*@only@*/
const char * fileFile;
/*@only@*/
rpmiob fileList; /* If NULL, package will not be written */
Package next;
#if defined(__LCLINT__)
/*@refs@*/
int nrefs; /*!< (unused) keep splint happy */
#endif
};
#ifdef __cplusplus
extern "C" {
#endif
/** \ingroup rpmbuild
* Destroy a spec file control structure.
* @todo Rename to specFree.
* @param spec spec file control structure
* @return NULL on last dereference
*/
/*@null@*/
Spec freeSpec(/*@killref@*/ /*@null@*/ Spec spec)
/*@globals fileSystem, internalState @*/
/*@modifies spec, fileSystem, internalState @*/;
#define freeSpec(_spec) \
((Spec)rpmioFreePoolItem((rpmioItem)(_spec), __FUNCTION__, __FILE__, __LINE__))
/** \ingroup rpmbuild
* Create and initialize Spec structure.
* @return spec spec file control structure
*/
/*@only@*/
Spec newSpec(void)
/*@globals rpmGlobalMacroContext, h_errno, internalState @*/
/*@modifies rpmGlobalMacroContext, internalState @*/;
/** \ingroup rpmbuild
* Function to query spec file(s).
* @param ts transaction set
* @param qva parsed query/verify options
* @param arg query argument
* @return 0 on success, else no. of failures
*/
int rpmspecQuery(rpmts ts, QVA_t qva, const char * arg)
/*@globals rpmCLIMacroContext,
rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies ts, qva, rpmCLIMacroContext, rpmGlobalMacroContext,
fileSystem, internalState @*/;
/** \ingroup rpmbuild
*/
struct OpenFileInfo * newOpenFileInfo(void)
/*@*/;
/** \ingroup rpmbuild
* stashSt.
* @param spec spec file control structure
* @param h header
* @param tag tag
* @param lang locale
* @return ptr to saved entry
*/
spectag stashSt(Spec spec, Header h, rpmTag tag, const char * lang)
/*@globals internalState @*/
/*@modifies spec->st, internalState @*/;
/** \ingroup rpmbuild
* addSource.
* @param spec spec file control structure
* @param pkg package control
* @param field field to parse
* @param tag tag
* @return 0 on success
*/
int addSource(Spec spec, Package pkg, const char * field, rpmTag tag)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies spec->sources, spec->numSources,
spec->st, spec->macros,
rpmGlobalMacroContext, fileSystem, internalState @*/;
/** \ingroup rpmbuild
* parseNoSource.
* @param spec spec file control structure
* @param field field to parse
* @param tag tag
* @return 0 on success
*/
int parseNoSource(Spec spec, const char * field, rpmTag tag)
/*@*/;
/** \ingroup rpmbuild
* Return the count of source set in specfile
* @param spec spec file control structure
* @return the count of source
*/
int SpecSourceCount(Spec spec)
/*@*/;
/** \ingroup rpmbuild
* Return a source control structure
* @param spec spec file control structure
* @param num the number of the wanted source (starting from 0)
* @return a SpecSource structure, NULL if not found
*/
SpecSource getSource(Spec spec, int num)
/*@*/;
/** \ingroup rpmbuild
* Return a ptr to the source file name
* @param source SpecSource control structure
* @return ptr to filename
*/
/*@exposed@*/
const char * specSourceName(SpecSource source)
/*@*/;
/** \ingroup rpmbuild
* Return a ptr to the full url of the source
* @param source SpecSource control structure
* @return ptr to url
*/
/*@exposed@*/
const char * specFullSourceName(SpecSource source)
/*@*/;
/** \ingroup rpmbuild
* Return the spec or source patch number
* @param source SpecSource control structure
* @return the number of the source
*/
int specSourceNum(SpecSource source)
/*@*/;
/** \ingroup rpmbuild
* Return flags set for the source
* @param source SpecSource control structure
* @return flags
*/
int specSourceFlags(SpecSource source)
/*@*/;
/** \ingroup rpmbuild
* Return the macro directory location from source file flags
* @param attr rpmfileAttrs from source
* @return string containings macros about location, NULL on failure
*/
/*@null@*/
#if defined(RPM_VENDOR_OPENPKG) /* splitted-source-directory */
const char * getSourceDir(rpmfileAttrs attr, const char *filename)
#else
const char * getSourceDir(rpmfileAttrs attr)
#endif
/*@*/;
#ifdef __cplusplus
}
#endif
#endif /* _H_SPEC_ */

1025
rpm-5.4.9/build/spec.c Normal file

File diff suppressed because it is too large Load diff

1522
rpm-5.4.9/config.guess vendored Executable file

File diff suppressed because it is too large Load diff

1513
rpm-5.4.9/config.h.in Normal file

File diff suppressed because it is too large Load diff

672
rpm-5.4.9/config.rpath Executable file
View file

@ -0,0 +1,672 @@
#! /bin/sh
# Output a system dependent set of variables, describing how to set the
# run time search path of shared libraries in an executable.
#
# Copyright 1996-2010 Free Software Foundation, Inc.
# Taken from GNU libtool, 2001
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# The first argument passed to this file is the canonical host specification,
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# or
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
# should be set by the caller.
#
# The set of defined variables is at the end of this script.
# Known limitations:
# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
# than 256 bytes, otherwise the compiler driver will dump core. The only
# known workaround is to choose shorter directory names for the build
# directory and/or the installation directory.
# All known linkers require a `.a' archive for static linking (except MSVC,
# which needs '.lib').
libext=a
shrext=.so
host="$1"
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
# Code taken from libtool.m4's _LT_CC_BASENAME.
for cc_temp in $CC""; do
case $cc_temp in
compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
\-*) ;;
*) break;;
esac
done
cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
# Code taken from libtool.m4's _LT_COMPILER_PIC.
wl=
if test "$GCC" = yes; then
wl='-Wl,'
else
case "$host_os" in
aix*)
wl='-Wl,'
;;
darwin*)
case $cc_basename in
xlc*)
wl='-Wl,'
;;
esac
;;
mingw* | cygwin* | pw32* | os2* | cegcc*)
;;
hpux9* | hpux10* | hpux11*)
wl='-Wl,'
;;
irix5* | irix6* | nonstopux*)
wl='-Wl,'
;;
newsos6)
;;
linux* | k*bsd*-gnu)
case $cc_basename in
ecc*)
wl='-Wl,'
;;
icc* | ifort*)
wl='-Wl,'
;;
lf95*)
wl='-Wl,'
;;
pgcc | pgf77 | pgf90)
wl='-Wl,'
;;
ccc*)
wl='-Wl,'
;;
como)
wl='-lopt='
;;
*)
case `$CC -V 2>&1 | sed 5q` in
*Sun\ C*)
wl='-Wl,'
;;
esac
;;
esac
;;
osf3* | osf4* | osf5*)
wl='-Wl,'
;;
rdos*)
;;
solaris*)
wl='-Wl,'
;;
sunos4*)
wl='-Qoption ld '
;;
sysv4 | sysv4.2uw2* | sysv4.3*)
wl='-Wl,'
;;
sysv4*MP*)
;;
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
wl='-Wl,'
;;
unicos*)
wl='-Wl,'
;;
uts4*)
;;
esac
fi
# Code taken from libtool.m4's _LT_LINKER_SHLIBS.
hardcode_libdir_flag_spec=
hardcode_libdir_separator=
hardcode_direct=no
hardcode_minus_L=no
case "$host_os" in
cygwin* | mingw* | pw32* | cegcc*)
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
if test "$GCC" != yes; then
with_gnu_ld=no
fi
;;
interix*)
# we just hope/assume this is gcc and not c89 (= MSVC++)
with_gnu_ld=yes
;;
openbsd*)
with_gnu_ld=no
;;
esac
ld_shlibs=yes
if test "$with_gnu_ld" = yes; then
# Set some defaults for GNU ld with shared library support. These
# are reset later if shared libraries are not supported. Putting them
# here allows them to be overridden if necessary.
# Unlike libtool, we use -rpath here, not --rpath, since the documented
# option of GNU ld is called -rpath, not --rpath.
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
case "$host_os" in
aix[3-9]*)
# On AIX/PPC, the GNU linker is very broken
if test "$host_cpu" != ia64; then
ld_shlibs=no
fi
;;
amigaos*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
# that the semantics of dynamic libraries on AmigaOS, at least up
# to version 4, is to share data among multiple programs linked
# with the same dynamic library. Since this doesn't match the
# behavior of shared libraries on other platforms, we cannot use
# them.
ld_shlibs=no
;;
beos*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
cygwin* | mingw* | pw32* | cegcc*)
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
interix[3-9]*)
hardcode_direct=no
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
;;
gnu* | linux* | k*bsd*-gnu)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
netbsd*)
;;
solaris*)
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
ld_shlibs=no
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
case `$LD -v 2>&1` in
*\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
ld_shlibs=no
;;
*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
else
ld_shlibs=no
fi
;;
esac
;;
sunos4*)
hardcode_direct=yes
;;
*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
esac
if test "$ld_shlibs" = no; then
hardcode_libdir_flag_spec=
fi
else
case "$host_os" in
aix3*)
# Note: this linker hardcodes the directories in LIBPATH if there
# are no directories specified by -L.
hardcode_minus_L=yes
if test "$GCC" = yes; then
# Neither direct hardcoding nor static linking is supported with a
# broken collect2.
hardcode_direct=unsupported
fi
;;
aix[4-9]*)
if test "$host_cpu" = ia64; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
aix_use_runtimelinking=no
else
aix_use_runtimelinking=no
# Test if we are trying to use run time linking or normal
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
# need to do runtime linking.
case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
for ld_flag in $LDFLAGS; do
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
aix_use_runtimelinking=yes
break
fi
done
;;
esac
fi
hardcode_direct=yes
hardcode_libdir_separator=':'
if test "$GCC" = yes; then
case $host_os in aix4.[012]|aix4.[012].*)
collect2name=`${CC} -print-prog-name=collect2`
if test -f "$collect2name" && \
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
:
else
# We have old collect2
hardcode_direct=unsupported
hardcode_minus_L=yes
hardcode_libdir_flag_spec='-L$libdir'
hardcode_libdir_separator=
fi
;;
esac
fi
# Begin _LT_AC_SYS_LIBPATH_AIX.
echo 'int main () { return 0; }' > conftest.c
${CC} ${LDFLAGS} conftest.c -o conftest
aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`
if test -z "$aix_libpath"; then
aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`
fi
if test -z "$aix_libpath"; then
aix_libpath="/usr/lib:/lib"
fi
rm -f conftest.c conftest
# End _LT_AC_SYS_LIBPATH_AIX.
if test "$aix_use_runtimelinking" = yes; then
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
else
if test "$host_cpu" = ia64; then
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
else
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
fi
fi
;;
amigaos*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
# see comment about different semantics on the GNU ld section
ld_shlibs=no
;;
bsdi[45]*)
;;
cygwin* | mingw* | pw32* | cegcc*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec=' '
libext=lib
;;
darwin* | rhapsody*)
hardcode_direct=no
if test "$GCC" = yes ; then
:
else
case $cc_basename in
xlc*)
;;
*)
ld_shlibs=no
;;
esac
fi
;;
dgux*)
hardcode_libdir_flag_spec='-L$libdir'
;;
freebsd1*)
ld_shlibs=no
;;
freebsd2.2*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
freebsd2*)
hardcode_direct=yes
hardcode_minus_L=yes
;;
freebsd* | dragonfly*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
hpux9*)
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
;;
hpux10*)
if test "$with_gnu_ld" = no; then
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
fi
;;
hpux11*)
if test "$with_gnu_ld" = no; then
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
case $host_cpu in
hppa*64*|ia64*)
hardcode_direct=no
;;
*)
hardcode_direct=yes
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
;;
esac
fi
;;
irix5* | irix6* | nonstopux*)
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
netbsd*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
newsos6)
hardcode_direct=yes
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
openbsd*)
if test -f /usr/libexec/ld.so; then
hardcode_direct=yes
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
else
case "$host_os" in
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
hardcode_libdir_flag_spec='-R$libdir'
;;
*)
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
;;
esac
fi
else
ld_shlibs=no
fi
;;
os2*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
;;
osf3*)
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
osf4* | osf5*)
if test "$GCC" = yes; then
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
else
# Both cc and cxx compiler support -rpath directly
hardcode_libdir_flag_spec='-rpath $libdir'
fi
hardcode_libdir_separator=:
;;
solaris*)
hardcode_libdir_flag_spec='-R$libdir'
;;
sunos4*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_direct=yes
hardcode_minus_L=yes
;;
sysv4)
case $host_vendor in
sni)
hardcode_direct=yes # is this really true???
;;
siemens)
hardcode_direct=no
;;
motorola)
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
;;
esac
;;
sysv4.3*)
;;
sysv4*MP*)
if test -d /usr/nec; then
ld_shlibs=yes
fi
;;
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
;;
sysv5* | sco3.2v5* | sco5v6*)
hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
hardcode_libdir_separator=':'
;;
uts4*)
hardcode_libdir_flag_spec='-L$libdir'
;;
*)
ld_shlibs=no
;;
esac
fi
# Check dynamic linker characteristics
# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER.
# Unlike libtool.m4, here we don't care about _all_ names of the library, but
# only about the one the linker finds when passed -lNAME. This is the last
# element of library_names_spec in libtool.m4, or possibly two of them if the
# linker has special search rules.
library_names_spec= # the last element of library_names_spec in libtool.m4
libname_spec='lib$name'
case "$host_os" in
aix3*)
library_names_spec='$libname.a'
;;
aix[4-9]*)
library_names_spec='$libname$shrext'
;;
amigaos*)
library_names_spec='$libname.a'
;;
beos*)
library_names_spec='$libname$shrext'
;;
bsdi[45]*)
library_names_spec='$libname$shrext'
;;
cygwin* | mingw* | pw32* | cegcc*)
shrext=.dll
library_names_spec='$libname.dll.a $libname.lib'
;;
darwin* | rhapsody*)
shrext=.dylib
library_names_spec='$libname$shrext'
;;
dgux*)
library_names_spec='$libname$shrext'
;;
freebsd1*)
;;
freebsd* | dragonfly*)
case "$host_os" in
freebsd[123]*)
library_names_spec='$libname$shrext$versuffix' ;;
*)
library_names_spec='$libname$shrext' ;;
esac
;;
gnu*)
library_names_spec='$libname$shrext'
;;
hpux9* | hpux10* | hpux11*)
case $host_cpu in
ia64*)
shrext=.so
;;
hppa*64*)
shrext=.sl
;;
*)
shrext=.sl
;;
esac
library_names_spec='$libname$shrext'
;;
interix[3-9]*)
library_names_spec='$libname$shrext'
;;
irix5* | irix6* | nonstopux*)
library_names_spec='$libname$shrext'
case "$host_os" in
irix5* | nonstopux*)
libsuff= shlibsuff=
;;
*)
case $LD in
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
*) libsuff= shlibsuff= ;;
esac
;;
esac
;;
linux*oldld* | linux*aout* | linux*coff*)
;;
linux* | k*bsd*-gnu)
library_names_spec='$libname$shrext'
;;
knetbsd*-gnu)
library_names_spec='$libname$shrext'
;;
netbsd*)
library_names_spec='$libname$shrext'
;;
newsos6)
library_names_spec='$libname$shrext'
;;
nto-qnx*)
library_names_spec='$libname$shrext'
;;
openbsd*)
library_names_spec='$libname$shrext$versuffix'
;;
os2*)
libname_spec='$name'
shrext=.dll
library_names_spec='$libname.a'
;;
osf3* | osf4* | osf5*)
library_names_spec='$libname$shrext'
;;
rdos*)
;;
solaris*)
library_names_spec='$libname$shrext'
;;
sunos4*)
library_names_spec='$libname$shrext$versuffix'
;;
sysv4 | sysv4.3*)
library_names_spec='$libname$shrext'
;;
sysv4*MP*)
library_names_spec='$libname$shrext'
;;
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
library_names_spec='$libname$shrext'
;;
uts4*)
library_names_spec='$libname$shrext'
;;
esac
sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
# How to pass a linker flag through the compiler.
wl="$escaped_wl"
# Static library suffix (normally "a").
libext="$libext"
# Shared library suffix (normally "so").
shlibext="$shlibext"
# Format of library name prefix.
libname_spec="$escaped_libname_spec"
# Library names that the linker finds when passed -lNAME.
library_names_spec="$escaped_library_names_spec"
# Flag to hardcode \$libdir into a binary during linking.
# This must work even if \$libdir does not exist.
hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
# Whether we need a single -rpath flag with a separated argument.
hardcode_libdir_separator="$hardcode_libdir_separator"
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
# resulting binary.
hardcode_direct="$hardcode_direct"
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
# resulting binary.
hardcode_minus_L="$hardcode_minus_L"
EOF

1766
rpm-5.4.9/config.sub vendored Executable file

File diff suppressed because it is too large Load diff

81309
rpm-5.4.9/configure vendored Executable file

File diff suppressed because it is too large Load diff

2500
rpm-5.4.9/configure.ac Normal file

File diff suppressed because it is too large Load diff

124
rpm-5.4.9/cpuinfo.yaml Normal file
View file

@ -0,0 +1,124 @@
---
cpuinfo:
- Family: cpuinfo([x86])
Priority:
- x86_64
- pentium4
- pentium3
- athlon
- pentium2
- i686
- geode
- i586
- i486
- i386
- fat
Arch:
- Name: fat
- Name: i386
- Name: i486
Extends: i386
Features:
- cpuinfo(ac)
- Name: i586
Extends: i486
Features:
- cpuinfo(tsc)
- Name: geode
Alias:
- k6-3
- k6-2
Extends: i586
Features:
- cpuinfo(3dnow)
- cpuinfo(mmx)
- Name: i686
Extends: i586
Features:
- cpuinfo(cmov)
- Name: pentium2
Extends: i686
Features:
- cpuinfo(mmx)
- Name: athlon
Extends: pentium2
Features:
- cpuinfo(3dnowext)
- Name: pentium3
Extends: pentium2
Features:
- cpuinfo(sse)
- Name: pentium4
Extends: pentium3
Features:
- cpuinfo(sse2)
- Name: x86_64
Alias:
- amd64
- ia32e
Features:
- cpuinfo(64bit)
- Family: cpuinfo([ppc])
Priority:
- ppc64
- ppc
- fat
Arch:
- Name: fat
- Name: ppc
- Name: ppc64
Extends: ppc
Features:
- cpuinfo(64bit)
- Family: cpuinfo([ia64])
Priority:
- ia64
Arch:
- Name: ia64
- Family: cpuinfo([mips])
Priority:
- mips64
- mips64el
- mips
- mipsel
Arch:
- Name: mips
Alias:
- mipseb
Features:
- cpuinfo(endian) == big
- Name: mips64
Alias:
- mips64eb
Extends: mips
Features:
- cpuinfo(64bit)
- Name: mipsel
Features:
- cpuinfo(endian) == little
- Name: mips64el
Extends: mipsel
Features:
- cpuinfo(64bit)

180
rpm-5.4.9/debug.h Normal file
View file

@ -0,0 +1,180 @@
/**
* To be included after all other includes.
*/
#ifndef H_DEBUG
#define H_DEBUG
#ifdef HAVE_ASSERT_H
#undef assert /* XXX <beecrypt/api.h> tries to retrofit an assert(x) macro */
#include <assert.h>
#endif
#ifdef __LCLINT__
#define ntohl(_x) (_x)
#define ntohs(_x) (_x)
#define htonl(_x) (_x)
#define htons(_x) (_x)
#endif
#if defined(_OPENMP)
#include <omp.h>
#endif
#ifdef WITH_DMALLOC
#include <dmalloc.h>
#endif
/* If using GCC, wrap __builtin_expect() (reduces overhead in lookup3.c) */
#if defined(__GNUC__) && (__GNUC__ > 2) && defined(__OPTIMIZE__)
# define UNLIKELY(value) __builtin_expect((value), 0)
#else
# define UNLIKELY(value) (value)
#endif
#if defined(WITH_VALGRIND) && defined(HAVE_VALGRIND_VALGRIND_H)
#include <valgrind/valgrind.h>
#include <valgrind/memcheck.h>
#include <valgrind/callgrind.h>
#include <valgrind/helgrind.h>
#include <valgrind/drd.h>
#if !defined(ANNOTATE_BENIGN_RACE_SIZED)
#define ANNOTATE_BENIGN_RACE_SIZED(_a, _b, _c)
#endif
static inline void * DRD_xmalloc(size_t nb)
{
void * ptr = xmalloc(nb);
ANNOTATE_BENIGN_RACE_SIZED(ptr, nb, __FUNCTION__); /* XXX tsan sanity. */
return ptr;
}
static inline void * DRD_xcalloc(size_t nmemb, size_t size)
{
size_t nb = nmemb * size;
void * ptr = DRD_xmalloc(nb);
memset(ptr, 0, nb);
return ptr;
}
static inline void * DRD_xrealloc(void * ptr, size_t size)
{
ptr = xrealloc(ptr, size);
ANNOTATE_BENIGN_RACE_SIZED(ptr, size, __FUNCTION__); /* XXX tsan sanity. */
return ptr;
}
static inline char * DRD_xstrdup(const char * s)
{
size_t nb = strlen(s) + 1;
char * t = (char *) DRD_xmalloc(nb);
return strcpy(t, s);
}
#else
/* XXX list most everything just to see the valgrind namespace. */
#define RUNNING_ON_VALGRIND (0)
#define VALGRIND_DISCARD_TRANSLATIONS(_qzz_addr,_qzz_len)
#define VALGRIND_MALLOCLIKE_BLOCK(addr, sizeB, rzB, is_zeroed)
#define VALGRIND_FREELIKE_BLOCK(addr, rzB)
#define VALGRIND_CREATE_MEMPOOL(pool, rzB, is_zeroed)
#define VALGRIND_DESTROY_MEMPOOL(pool)
#define VALGRIND_MEMPOOL_ALLOC(pool, addr, size)
#define VALGRIND_MEMPOOL_FREE(pool, addr)
#define VALGRIND_MEMPOOL_TRIM(pool, addr, size)
#define VALGRIND_MOVE_MEMPOOL(poolA, poolB)
#define VALGRIND_MEMPOOL_CHANGE(pool, addrA, addrB, size)
#define VALGRIND_MEMPOOL_EXISTS(pool) (0)
#define VALGRIND_MAKE_MEM_NOACCESS(_qzz_addr,_qzz_len)
#define VALGRIND_MAKE_MEM_UNDEFINED(_qzz_addr,_qzz_len)
#define VALGRIND_MAKE_MEM_DEFINED(_qzz_addr,_qzz_len)
#define VALGRIND_MAKE_MEM_DEFINED_IF_ADDRESSABLE(_qzz_addr,_qzz_len)
#define VALGRIND_CREATE_BLOCK(_qzz_addr,_qzz_len, _qzz_desc)
#define VALGRIND_DISCARD(_qzz_blkindex)
#define VALGRIND_CHECK_MEM_IS_ADDRESSABLE(_qzz_addr,_qzz_len)
#define VALGRIND_CHECK_MEM_IS_DEFINED(_qzz_addr,_qzz_len)
#define VALGRIND_CHECK_VALUE_IS_DEFINED(__lvalue)
#define VALGRIND_DO_LEAK_CHECK
#define VALGRIND_DO_QUICK_LEAK_CHECK
#define VALGRIND_COUNT_LEAKS(leaked, dubious, reachable, suppressed)
#define VALGRIND_COUNT_LEAK_BLOCKS(leaked, dubious, reachable, suppressed)
#define VALGRIND_GET_VBITS(zza,zzvbits,zznbytes)
#define VALGRIND_SET_VBITS(zza,zzvbits,zznbytes)
#define CALLGRIND_DUMP_STATS
#define CALLGRIND_DUMP_STATS_AT(pos_str)
#define CALLGRIND_ZERO_STATS
#define CALLGRIND_TOGGLE_COLLECT
#define CALLGRIND_START_INSTRUMENTATION
#define CALLGRIND_STOP_INSTRUMENTATION
#define VALGRIND_HG_MUTEX_INIT_POST(_mutex, _mbRec)
#define VALGRIND_HG_MUTEX_LOCK_PRE(_mutex, _isTryLock)
#define VALGRIND_HG_MUTEX_LOCK_POST(_mutex)
#define VALGRIND_HG_MUTEX_UNLOCK_PRE(_mutex)
#define VALGRIND_HG_MUTEX_UNLOCK_POST(_mutex)
#define VALGRIND_HG_MUTEX_DESTROY_PRE(_mutex)
#define VALGRIND_HG_SEM_INIT_POST(_sem, _value)
#define VALGRIND_HG_SEM_WAIT_POST(_sem)
#define VALGRIND_HG_SEM_POST_PRE(_sem)
#define VALGRIND_HG_SEM_DESTROY_PRE(_sem)
#define VALGRIND_HG_BARRIER_INIT_PRE(_bar, _count, _resizable)
#define VALGRIND_HG_BARRIER_WAIT_PRE(_bar)
#define VALGRIND_HG_BARRIER_RESIZE_PRE(_bar, _newcount)
#define VALGRIND_HG_BARRIER_DESTROY_PRE(_bar)
#define VALGRIND_HG_CLEAN_MEMORY(_qzz_start, _qzz_len)
#define VALGRIND_HG_CLEAN_MEMORY_HEAPBLOCK(_qzz_blockstart)
#define VALGRIND_HG_DISABLE_CHECKING(_qzz_start, _qzz_len)
#define VALGRIND_HG_ENABLE_CHECKING(_qzz_start, _qzz_len)
#define DRD_GET_VALGRIND_THREADID
#define DRD_GET_DRD_THREADID
#define DRD_IGNORE_VAR(x)
#define DRD_STOP_IGNORING_VAR(x)
#define DRD_TRACE_VAR(x)
#define ANNOTATE_HAPPENS_BEFORE(_obj)
#define ANNOTATE_HAPPENS_AFTER(_obj)
#define ANNOTATE_RWLOCK_CREATE(rwlock)
#define ANNOTATE_RWLOCK_DESTROY(rwlock)
#define ANNOTATE_RWLOCK_ACQUIRED(rwlock, is_w)
#define ANNOTATE_READERLOCK_ACQUIRED(rwlock)
#define ANNOTATE_WRITERLOCK_ACQUIRED(rwlock)
#define ANNOTATE_RWLOCK_RELEASED(rwlock, is_w)
#define ANNOTATE_READERLOCK_RELEASED(rwlock)
#define ANNOTATE_WRITERLOCK_RELEASED(rwlock)
#define ANNOTATE_BARRIER_INIT(barrier, count, reinitialization_allowed)
#define ANNOTATE_BARRIER_DESTROY(barrier)
#define ANNOTATE_BARRIER_WAIT_BEFORE(barrier)
#define ANNOTATE_BARRIER_WAIT_AFTER(barrier)
#define ANNOTATE_BENIGN_RACE(_a, _b)
#define ANNOTATE_BENIGN_RACE_SIZED(_a, _b, _c)
#define ANNOTATE_IGNORE_READS_BEGIN()
#define ANNOTATE_IGNORE_READS_END()
#define ANNOTATE_IGNORE_WRITES_BEGIN()
#define ANNOTATE_IGNORE_WRITES_END()
#define ANNOTATE_IGNORE_READS_AND_WRITES_BEGIN()
#define ANNOTATE_IGNORE_READS_AND_WRITES_END()
#define ANNOTATE_NEW_MEMORY(_addr, _size)
#define ANNOTATE_TRACE_MEMORY(_addr)
#define ANNOTATE_THREAD_NAME(_name)
#define DRD_xmalloc(_nb) xmalloc(_nb)
#define DRD_xcalloc(_nmemb, _size) xcalloc(_nmemb, _size)
#define DRD_xrealloc(_ptr, _size) xrealloc(_ptr, _size)
#define DRD_xstrdup(_str) xstrdup(_str)
#endif
#endif /* H_DEBUG */

708
rpm-5.4.9/depcomp Executable file
View file

@ -0,0 +1,708 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2012-03-27.16; # UTC
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
# 2011, 2012 Free Software Foundation, Inc.
# 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, see <http://www.gnu.org/licenses/>.
# 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.
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
case $1 in
'')
echo "$0: No command. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
Run PROGRAMS ARGS to compile a file, generating dependencies
as side-effects.
Environment variables:
depmode Dependency tracking mode.
source Source file read by 'PROGRAMS ARGS'.
object Object file output by 'PROGRAMS ARGS'.
DEPDIR directory where to store dependencies.
depfile Dependency file to output.
tmpdepfile Temporary file to use when outputting dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "depcomp $scriptversion"
exit $?
;;
esac
# A tabulation character.
tab=' '
# A newline character.
nl='
'
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
depfile=${depfile-`echo "$object" |
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
# here, because this file can only contain one case statement.
if test "$depmode" = hp; then
# HP compiler uses -M and no extra arg.
gccflag=-M
depmode=gcc
fi
if test "$depmode" = dashXmstdout; then
# This is just like dashmstdout with a different argument.
dashmflag=-xM
depmode=dashmstdout
fi
cygpath_u="cygpath -u -f -"
if test "$depmode" = msvcmsys; then
# This is just like msvisualcpp but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
cygpath_u='sed s,\\\\,/,g'
depmode=msvisualcpp
fi
if test "$depmode" = msvc7msys; then
# This is just like msvc7 but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
cygpath_u='sed s,\\\\,/,g'
depmode=msvc7
fi
if test "$depmode" = xlc; then
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations.
gccflag=-qmakedep=gcc,-MF
depmode=gcc
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
## the command line argument order; so add the flags where they
## appear in depend2.am. Note that the slowdown incurred here
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
for arg
do
case $arg in
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
*) set fnord "$@" "$arg" ;;
esac
shift # fnord
shift # $arg
done
"$@"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
mv "$tmpdepfile" "$depfile"
;;
gcc)
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
## -MM, not -M (despite what the docs say).
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
gccflag=-MD,
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
## The second -e expression handles DOS-style file names with drive letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the "deleted header file" problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
tr ' ' "$nl" < "$tmpdepfile" |
## Some versions of gcc put a space before the ':'. On the theory
## that the space means something, we add a space to the output as
## well. hp depmode also adds that space, but also prefixes the VPATH
## to the object. Take care to not repeat it in the output.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
| sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
sgi)
if test "$libtool" = yes; then
"$@" "-Wp,-MDupdate,$tmpdepfile"
else
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
# the IRIX cc adds comments like '#:fec' to the end of the
# dependency line.
tr ' ' "$nl" < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr "$nl" ' ' >> "$depfile"
echo >> "$depfile"
# The second pass generates a dummy entry for each header file.
tr ' ' "$nl" < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
xlc)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. In older versions, this file always lives in the
# current directory. Also, the AIX compiler puts '$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.u
tmpdepfile2=$base.u
tmpdepfile3=$dir.libs/$base.u
"$@" -Wc,-M
else
tmpdepfile1=$dir$base.u
tmpdepfile2=$dir$base.u
tmpdepfile3=$dir$base.u
"$@" -M
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
# Each line is of the form 'foo.o: dependent.h'.
# Do two passes, one to just change these to
# '$object: dependent.h' and one to simply 'dependent.h:'.
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
icc)
# Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'.
# However on
# $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c
# ICC 7.0 will fill foo.d with something like
# foo.o: sub/foo.c
# foo.o: sub/foo.h
# which is wrong. We want
# sub/foo.o: sub/foo.c
# sub/foo.o: sub/foo.h
# sub/foo.c:
# sub/foo.h:
# ICC 7.1 will output
# foo.o: sub/foo.c sub/foo.h
# and will wrap long lines using '\':
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
# tcc 0.9.26 (FIXME still under development at the moment of writing)
# will emit a similar output, but also prepend the continuation lines
# with horizontal tabulation characters.
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each line is of the form 'foo.o: dependent.h',
# or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'.
# Do two passes, one to just change these to
# '$object: dependent.h' and one to simply 'dependent.h:'.
sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \
< "$tmpdepfile" > "$depfile"
sed '
s/[ '"$tab"'][ '"$tab"']*/ /g
s/^ *//
s/ *\\*$//
s/^[^:]*: *//
/^$/d
/:$/d
s/$/ :/
' < "$tmpdepfile" >> "$depfile"
rm -f "$tmpdepfile"
;;
hp2)
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
# compilers, which have integrated preprocessors. The correct option
# to use with these is +Maked; it writes dependencies to a file named
# 'foo.d', which lands next to the object file, wherever that
# happens to be.
# Much of this is similar to the tru64 case; see comments there.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir.libs/$base.d
"$@" -Wc,+Maked
else
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir$base.d
"$@" +Maked
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
# Add 'dependent.h:' lines.
sed -ne '2,${
s/^ *//
s/ \\*$//
s/$/:/
p
}' "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile" "$tmpdepfile2"
;;
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in 'foo.d' instead, so we check for that too.
# Subdirectories are respected.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
# With Tru64 cc, shared objects can also be used to make a
# static library. This mechanism is used in libtool 1.4 series to
# handle both shared and static libraries in a single compilation.
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
#
# With libtool 1.5 this exception was removed, and libtool now
# generates 2 separate objects for the 2 libraries. These two
# compilations output dependencies in $dir.libs/$base.o.d and
# in $dir$base.o.d. We have to check for both files, because
# one of the two compilations can be disabled. We should prefer
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
# automatically cleaned when .libs/ is deleted, while ignoring
# the former would cause a distcleancheck panic.
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
tmpdepfile2=$dir$base.o.d # libtool 1.5
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
"$@" -Wc,-MD
else
tmpdepfile1=$dir$base.o.d
tmpdepfile2=$dir$base.d
tmpdepfile3=$dir$base.d
tmpdepfile4=$dir$base.d
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
msvc7)
if test "$libtool" = yes; then
showIncludes=-Wc,-showIncludes
else
showIncludes=-showIncludes
fi
"$@" $showIncludes > "$tmpdepfile"
stat=$?
grep -v '^Note: including file: ' "$tmpdepfile"
if test "$stat" = 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
# The first sed program below extracts the file names and escapes
# backslashes for cygpath. The second sed program outputs the file
# name when reading, but also accumulates all include files in the
# hold buffer in order to output them again at the end. This only
# works with sed implementations that can handle large buffers.
sed < "$tmpdepfile" -n '
/^Note: including file: *\(.*\)/ {
s//\1/
s/\\/\\\\/g
p
}' | $cygpath_u | sort -u | sed -n '
s/ /\\ /g
s/\(.*\)/'"$tab"'\1 \\/p
s/.\(.*\) \\/\1:/
H
$ {
s/.*/'"$tab"'/
G
p
}' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvc7msys)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# Remove '-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
test -z "$dashmflag" && dashmflag=-M
# Require at least two characters before searching for ':'
# in the target name. This is to cope with DOS-style filenames:
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
"$@" $dashmflag |
sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' "$nl" < "$tmpdepfile" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
dashXmstdout)
# This case only exists to satisfy depend.m4. It is never actually
# run, as this mode is specially recognized in the preamble.
exit 1
;;
makedepend)
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
cleared=no eat=no
for arg
do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
if test $eat = yes; then
eat=no
continue
fi
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
-arch)
eat=yes ;;
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
obj_suffix=`echo "$object" | sed 's/^.*\././'`
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
# makedepend may prepend the VPATH from the source file name to the object.
# No need to regex-escape $object, excess matching of '.' is harmless.
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
cpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# Remove '-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
"$@" -E |
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
IFS=" "
for arg
do
case "$arg" in
-o)
shift
;;
$object)
shift
;;
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
shift
;;
*)
set fnord "$@" "$arg"
shift
shift
;;
esac
done
"$@" -E 2>/dev/null |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
echo "$tab" >> "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvcmsys)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
none)
exec "$@"
;;
*)
echo "Unknown depmode $depmode" 1>&2
exit 1
;;
esac
exit 0
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

24
rpm-5.4.9/doc/Makefile.am Normal file
View file

@ -0,0 +1,24 @@
## Process this file with automake to produce Makefile.in
SUBDIRS = manual
if USE_NLS
SUBDIRS += fr ja ko pl ru sk
endif
man_MANS = gendiff.1 rpm.8 rpmbuild.8 rpmcache.8 rpmdeps.8 \
rpm2cpio.8 rpmconstant.8 rpmmtree.8 # rpmgraph.8
EXTRA_DIST = $(man_MANS)
install-data-hook:
if WITH_PATH_VERSIONED
-for p in $(man_MANS); do \
case "$$p" in \
*.1 ) mv $(DESTDIR)$(man1dir)/$${p} \
`echo "$(DESTDIR)$(man1dir)/$${p}" | sed 's/\.1$$/-$(VERSION).1/'` ;; \
*.8 ) mv $(DESTDIR)$(man8dir)/$${p} \
`echo "$(DESTDIR)$(man1dir)/$${p}" | sed 's/\.8$$/-$(VERSION).8/'` ;; \
esac; \
done
endif

1066
rpm-5.4.9/doc/Makefile.in Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,21 @@
## Process this file with automake to produce Makefile.in
@SET_MAKE@
man_MANS = rpm.8
mandir = @mandir@/fr
EXTRA_DIST = $(man_MANS)
install-data-hook:
if WITH_PATH_VERSIONED
-for p in $(man_MANS); do \
case "$$p" in \
*.1 ) mv $(DESTDIR)$(man1dir)/$${p} \
`echo "$(DESTDIR)$(man1dir)/$${p}" | sed 's/\.1$$/-$(VERSION).1/'` ;; \
*.8 ) mv $(DESTDIR)$(man8dir)/$${p} \
`echo "$(DESTDIR)$(man8dir)/$${p}" | sed 's/\.8$$/-$(VERSION).8/'` ;; \
esac; \
done
endif

View file

@ -0,0 +1,820 @@
# Makefile.in generated by automake 1.11.4 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__make_dryrun = \
{ \
am__dry=no; \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
esac; \
test $$am__dry = yes; \
}
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = doc/fr
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
man8dir = $(mandir)/man8
am__installdirs = "$(DESTDIR)$(man8dir)"
NROFF = nroff
MANS = $(man_MANS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILDROOTDIR_MACRO = @BUILDROOTDIR_MACRO@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DBAPI = @DBAPI@
DBLIBOBJS = @DBLIBOBJS@
DBLIBSRCS = @DBLIBSRCS@
DBPATH = @DBPATH@
DBPATH_MACRO = @DBPATH_MACRO@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DISTRO_MACROS = @DISTRO_MACROS@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
FIXPERMS = @FIXPERMS@
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@
GPSEE_MODULES_PATH = @GPSEE_MODULES_PATH@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLLIBS = @INTLLIBS@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LDFLAGS_STATIC = @LDFLAGS_STATIC@
LD_VERSION_SCRIPT_FLAG = @LD_VERSION_SCRIPT_FLAG@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBTOOLIZE = @LIBTOOLIZE@
LIPO = @LIPO@
LN_S = @LN_S@
LOCALEDIR = @LOCALEDIR@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
LT_AGE = @LT_AGE@
LT_CURRENT = @LT_CURRENT@
LT_REVISION = @LT_REVISION@
MACROFILES = @MACROFILES@
MAGIC_MACRO = @MAGIC_MACRO@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
NCPUS_COMMAND = @NCPUS_COMMAND@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPENMP_CFLAGS = @OPENMP_CFLAGS@
OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PERL_INSTALLDIRS = @PERL_INSTALLDIRS@
PERL_URPM_INSTALLDIRS = @PERL_URPM_INSTALLDIRS@
PKGSRCDIR = @PKGSRCDIR@
PKGSRCDIR_MACRO = @PKGSRCDIR_MACRO@
POSUB = @POSUB@
PYTHON = @PYTHON@
PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
PYTHON_PREFIX = @PYTHON_PREFIX@
PYTHON_VERSION = @PYTHON_VERSION@
RANLIB = @RANLIB@
ROOT_GROUP = @ROOT_GROUP@
RPMCANONARCH = @RPMCANONARCH@
RPMCANONCOLOR = @RPMCANONCOLOR@
RPMCANONGNU = @RPMCANONGNU@
RPMCANONOS = @RPMCANONOS@
RPMCANONVENDOR = @RPMCANONVENDOR@
RPMGID = @RPMGID@
RPMGROUP = @RPMGROUP@
RPMLUAFILES = @RPMLUAFILES@
RPMPOPTFILES = @RPMPOPTFILES@
RPMUID = @RPMUID@
RPMUSER = @RPMUSER@
RPM_TIMESTAMP = @RPM_TIMESTAMP@
RPM_VENDOR = @RPM_VENDOR@
RPM_VERSION = @RPM_VERSION@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
SYSCONFIGDIR = @SYSCONFIGDIR@
USE_NLS = @USE_NLS@
USRLIBRPM = @USRLIBRPM@
VERSION = @VERSION@
WITH_ACL = @WITH_ACL@
WITH_APIDOCS = @WITH_APIDOCS@
WITH_APIDOCS_TARGET = @WITH_APIDOCS_TARGET@
WITH_APR = @WITH_APR@
WITH_ATERM = @WITH_ATERM@
WITH_ATTR = @WITH_ATTR@
WITH_AUGEAS = @WITH_AUGEAS@
WITH_AUGEAS_AUGTOOL = @WITH_AUGEAS_AUGTOOL@
WITH_BASH = @WITH_BASH@
WITH_BASH_CPPFLAGS = @WITH_BASH_CPPFLAGS@
WITH_BASH_LDFLAGS = @WITH_BASH_LDFLAGS@
WITH_BASH_LIBS = @WITH_BASH_LIBS@
WITH_BASH_SUBDIR = @WITH_BASH_SUBDIR@
WITH_BEECRYPT = @WITH_BEECRYPT@
WITH_BEECRYPT_CPPFLAGS = @WITH_BEECRYPT_CPPFLAGS@
WITH_BEECRYPT_LDFLAGS = @WITH_BEECRYPT_LDFLAGS@
WITH_BEECRYPT_LIBS = @WITH_BEECRYPT_LIBS@
WITH_BEECRYPT_SUBDIR = @WITH_BEECRYPT_SUBDIR@
WITH_BZIP2 = @WITH_BZIP2@
WITH_CPUINFO = @WITH_CPUINFO@
WITH_CUDF = @WITH_CUDF@
WITH_CUDF_CUDFTOOL = @WITH_CUDF_CUDFTOOL@
WITH_DB = @WITH_DB@
WITH_DBSQL = @WITH_DBSQL@
WITH_DBSQL_CPPFLAGS = @WITH_DBSQL_CPPFLAGS@
WITH_DBSQL_LDFLAGS = @WITH_DBSQL_LDFLAGS@
WITH_DBSQL_LIBS = @WITH_DBSQL_LIBS@
WITH_DBSQL_SUBDIR = @WITH_DBSQL_SUBDIR@
WITH_DB_CPPFLAGS = @WITH_DB_CPPFLAGS@
WITH_DB_LDFLAGS = @WITH_DB_LDFLAGS@
WITH_DB_LIBS = @WITH_DB_LIBS@
WITH_DB_SUBDIR = @WITH_DB_SUBDIR@
WITH_DMALLOC = @WITH_DMALLOC@
WITH_EFENCE = @WITH_EFENCE@
WITH_EXPAT = @WITH_EXPAT@
WITH_FICL = @WITH_FICL@
WITH_FICL_CPPFLAGS = @WITH_FICL_CPPFLAGS@
WITH_FICL_LDFLAGS = @WITH_FICL_LDFLAGS@
WITH_FICL_LIBS = @WITH_FICL_LIBS@
WITH_FICL_SUBDIR = @WITH_FICL_SUBDIR@
WITH_FILE = @WITH_FILE@
WITH_FILE_CPPFLAGS = @WITH_FILE_CPPFLAGS@
WITH_FILE_LDFLAGS = @WITH_FILE_LDFLAGS@
WITH_FILE_LIBS = @WITH_FILE_LIBS@
WITH_FILE_SUBDIR = @WITH_FILE_SUBDIR@
WITH_GCRYPT = @WITH_GCRYPT@
WITH_GNUTLS = @WITH_GNUTLS@
WITH_GPSEE = @WITH_GPSEE@
WITH_GPSEE_CPPFLAGS = @WITH_GPSEE_CPPFLAGS@
WITH_GPSEE_LDFLAGS = @WITH_GPSEE_LDFLAGS@
WITH_GPSEE_LIBS = @WITH_GPSEE_LIBS@
WITH_GPSEE_SUBDIR = @WITH_GPSEE_SUBDIR@
WITH_JS_SUBDIR = @WITH_JS_SUBDIR@
WITH_KEYUTILS = @WITH_KEYUTILS@
WITH_KEYUTILS_RPMKEY = @WITH_KEYUTILS_RPMKEY@
WITH_LIBELF_DEBUGEDIT = @WITH_LIBELF_DEBUGEDIT@
WITH_LIBGIT2 = @WITH_LIBGIT2@
WITH_LIBGIT2_CPPFLAGS = @WITH_LIBGIT2_CPPFLAGS@
WITH_LIBGIT2_LDFLAGS = @WITH_LIBGIT2_LDFLAGS@
WITH_LIBGIT2_LIBS = @WITH_LIBGIT2_LIBS@
WITH_LIBGIT2_SUBDIR = @WITH_LIBGIT2_SUBDIR@
WITH_LIBTASN1 = @WITH_LIBTASN1@
WITH_LUA = @WITH_LUA@
WITH_LUA_CPPFLAGS = @WITH_LUA_CPPFLAGS@
WITH_LUA_LDFLAGS = @WITH_LUA_LDFLAGS@
WITH_LUA_LIBS = @WITH_LUA_LIBS@
WITH_LUA_SUBDIR = @WITH_LUA_SUBDIR@
WITH_LUA_SUBDIR_DEF = @WITH_LUA_SUBDIR_DEF@
WITH_LUA_SUBDIR_LIB = @WITH_LUA_SUBDIR_LIB@
WITH_MOZJS185 = @WITH_MOZJS185@
WITH_MOZJS185_CPPFLAGS = @WITH_MOZJS185_CPPFLAGS@
WITH_MOZJS185_LDFLAGS = @WITH_MOZJS185_LDFLAGS@
WITH_MOZJS185_LIBS = @WITH_MOZJS185_LIBS@
WITH_MOZJS185_SUBDIR = @WITH_MOZJS185_SUBDIR@
WITH_NEON = @WITH_NEON@
WITH_NEON_CPPFLAGS = @WITH_NEON_CPPFLAGS@
WITH_NEON_LDFLAGS = @WITH_NEON_LDFLAGS@
WITH_NEON_LIBS = @WITH_NEON_LIBS@
WITH_NEON_SUBDIR = @WITH_NEON_SUBDIR@
WITH_NIX = @WITH_NIX@
WITH_NSS = @WITH_NSS@
WITH_OPENSSL = @WITH_OPENSSL@
WITH_PAKCHOIS = @WITH_PAKCHOIS@
WITH_PATH_VERSIONED = @WITH_PATH_VERSIONED@
WITH_PATH_VERSIONED_SUFFIX = @WITH_PATH_VERSIONED_SUFFIX@
WITH_PCRE = @WITH_PCRE@
WITH_PCRE_CPPFLAGS = @WITH_PCRE_CPPFLAGS@
WITH_PCRE_LDFLAGS = @WITH_PCRE_LDFLAGS@
WITH_PCRE_LIBS = @WITH_PCRE_LIBS@
WITH_PCRE_SUBDIR = @WITH_PCRE_SUBDIR@
WITH_PERLEMBED = @WITH_PERLEMBED@
WITH_PERL_LIBS = @WITH_PERL_LIBS@
WITH_PERL_SUBDIR = @WITH_PERL_SUBDIR@
WITH_PERL_SUBPACKAGE = @WITH_PERL_SUBPACKAGE@
WITH_PERL_URPM_LIBS = @WITH_PERL_URPM_LIBS@
WITH_PERL_URPM_SUBDIR = @WITH_PERL_URPM_SUBDIR@
WITH_PERL_URPM_SUBPACKAGE = @WITH_PERL_URPM_SUBPACKAGE@
WITH_POPT = @WITH_POPT@
WITH_POPT_CPPFLAGS = @WITH_POPT_CPPFLAGS@
WITH_POPT_LDFLAGS = @WITH_POPT_LDFLAGS@
WITH_POPT_LIBS = @WITH_POPT_LIBS@
WITH_POPT_SUBDIR = @WITH_POPT_SUBDIR@
WITH_PYTHONEMBED = @WITH_PYTHONEMBED@
WITH_PYTHON_INCDIR = @WITH_PYTHON_INCDIR@
WITH_PYTHON_SUBDIR = @WITH_PYTHON_SUBDIR@
WITH_PYTHON_SUBPACKAGE = @WITH_PYTHON_SUBPACKAGE@
WITH_RC = @WITH_RC@
WITH_RC_CPPFLAGS = @WITH_RC_CPPFLAGS@
WITH_RC_LDFLAGS = @WITH_RC_LDFLAGS@
WITH_RC_LIBS = @WITH_RC_LIBS@
WITH_RC_SUBDIR = @WITH_RC_SUBDIR@
WITH_READLINE = @WITH_READLINE@
WITH_RUBY = @WITH_RUBY@
WITH_RUBY_CPPFLAGS = @WITH_RUBY_CPPFLAGS@
WITH_RUBY_SUBDIR = @WITH_RUBY_SUBDIR@
WITH_RUBY_VENDORARCHDIR = @WITH_RUBY_VENDORARCHDIR@
WITH_SELINUX = @WITH_SELINUX@
WITH_SEMANAGE = @WITH_SEMANAGE@
WITH_SEMANAGE_SEMODULE = @WITH_SEMANAGE_SEMODULE@
WITH_SEPOL = @WITH_SEPOL@
WITH_SPIDERMONKEY_SUBDIR = @WITH_SPIDERMONKEY_SUBDIR@
WITH_SQLITE = @WITH_SQLITE@
WITH_SQLITE_CPPFLAGS = @WITH_SQLITE_CPPFLAGS@
WITH_SQLITE_LDFLAGS = @WITH_SQLITE_LDFLAGS@
WITH_SQLITE_LIBS = @WITH_SQLITE_LIBS@
WITH_SQLITE_SUBDIR = @WITH_SQLITE_SUBDIR@
WITH_SQUIRREL = @WITH_SQUIRREL@
WITH_SUBVERSION = @WITH_SUBVERSION@
WITH_SYCK = @WITH_SYCK@
WITH_SYCK_CPPFLAGS = @WITH_SYCK_CPPFLAGS@
WITH_SYCK_LDFLAGS = @WITH_SYCK_LDFLAGS@
WITH_SYCK_LIBS = @WITH_SYCK_LIBS@
WITH_SYCK_SUBDIR = @WITH_SYCK_SUBDIR@
WITH_TCL = @WITH_TCL@
WITH_TCL_SUBDIR = @WITH_TCL_SUBDIR@
WITH_TOMCRYPT = @WITH_TOMCRYPT@
WITH_TPM = @WITH_TPM@
WITH_UNIXODBC = @WITH_UNIXODBC@
WITH_UUID = @WITH_UUID@
WITH_XAR = @WITH_XAR@
WITH_XAR_CPPFLAGS = @WITH_XAR_CPPFLAGS@
WITH_XAR_LDFLAGS = @WITH_XAR_LDFLAGS@
WITH_XAR_LIBS = @WITH_XAR_LIBS@
WITH_XAR_SUBDIR = @WITH_XAR_SUBDIR@
WITH_XZ = @WITH_XZ@
WITH_XZ_CPPFLAGS = @WITH_XZ_CPPFLAGS@
WITH_XZ_LDFLAGS = @WITH_XZ_LDFLAGS@
WITH_XZ_LIBS = @WITH_XZ_LIBS@
WITH_XZ_SUBDIR = @WITH_XZ_SUBDIR@
WITH_ZLIB = @WITH_ZLIB@
WITH_ZLIB_CPPFLAGS = @WITH_ZLIB_CPPFLAGS@
WITH_ZLIB_LDFLAGS = @WITH_ZLIB_LDFLAGS@
WITH_ZLIB_LIBS = @WITH_ZLIB_LIBS@
WITH_ZLIB_SUBDIR = @WITH_ZLIB_SUBDIR@
XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
YACC = @YACC@
YFLAGS = @YFLAGS@
__BASH = @__BASH@
__BZIP2 = @__BZIP2@
__CAT = @__CAT@
__CHATTR = @__CHATTR@
__CHGRP = @__CHGRP@
__CHGRP_RHF = @__CHGRP_RHF@
__CHMOD = @__CHMOD@
__CHOWN = @__CHOWN@
__CHOWN_RHF = @__CHOWN_RHF@
__CMAKE = @__CMAKE@
__CPIO = @__CPIO@
__CURL = @__CURL@
__CVS = @__CVS@
__DBSQL = @__DBSQL@
__DB_ARCHIVE = @__DB_ARCHIVE@
__DB_CHECKPOINT = @__DB_CHECKPOINT@
__DB_DEADLOCK = @__DB_DEADLOCK@
__DB_DUMP = @__DB_DUMP@
__DB_HOTBACKUP = @__DB_HOTBACKUP@
__DB_LOAD = @__DB_LOAD@
__DB_LOG_VERIFY = @__DB_LOG_VERIFY@
__DB_PRINTLOG = @__DB_PRINTLOG@
__DB_RECOVER = @__DB_RECOVER@
__DB_REPLICATE = @__DB_REPLICATE@
__DB_SQL_CODEGEN = @__DB_SQL_CODEGEN@
__DB_STAT = @__DB_STAT@
__DB_TUNER = @__DB_TUNER@
__DB_UPGRADE = @__DB_UPGRADE@
__DB_VERIFY = @__DB_VERIFY@
__DIFF = @__DIFF@
__DITTO = @__DITTO@
__DOXYGEN = @__DOXYGEN@
__FILE = @__FILE@
__GIT = @__GIT@
__GPG = @__GPG@
__GSR = @__GSR@
__GST_INSPECT = @__GST_INSPECT@
__GZIP = @__GZIP@
__HG = @__HG@
__ID = @__ID@
__ID_U = @__ID_U@
__INSTALL = @__INSTALL@
__INSTALL_INFO = @__INSTALL_INFO@
__LD = @__LD@
__LDCONFIG = @__LDCONFIG@
__LN = @__LN@
__LRZIP = @__LRZIP@
__LSATTR = @__LSATTR@
__LZIP = @__LZIP@
__LZMA = @__LZMA@
__LZOP = @__LZOP@
__MAKE = @__MAKE@
__MKDIR = @__MKDIR@
__MKDIR_P = @__MKDIR_P@
__MODINFO = @__MODINFO@
__MONGO = @__MONGO@
__MV = @__MV@
__NM = @__NM@
__OBJCOPY = @__OBJCOPY@
__OBJDUMP = @__OBJDUMP@
__PATCH = @__PATCH@
__PAX = @__PAX@
__PERL = @__PERL@
__PGP = @__PGP@
__PHP = @__PHP@
__PYTHON = @__PYTHON@
__RM = @__RM@
__RMDIR = @__RMDIR@
__RSH = @__RSH@
__RUBY = @__RUBY@
__SED = @__SED@
__SH = @__SH@
__SQLITE3 = @__SQLITE3@
__SSH = @__SSH@
__STRIP = @__STRIP@
__SVN = @__SVN@
__TAR = @__TAR@
__TCLSH = @__TCLSH@
__UNZIP = @__UNZIP@
__XZ = @__XZ@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
autorelocate_dcolor = @autorelocate_dcolor@
autorelocate_path = @autorelocate_path@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
exeext = @exeext@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
libext = @libext@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@/fr
mkdir_p = @mkdir_p@
objext = @objext@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
pkgpyexecdir = @pkgpyexecdir@
pkgpythondir = @pkgpythondir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
pyexecdir = @pyexecdir@
pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
shlibext = @shlibext@
srcdir = @srcdir@
subdirs = @subdirs@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
testdir = @testdir@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
usrprefix = @usrprefix@
varprefix = @varprefix@
man_MANS = rpm.8
EXTRA_DIST = $(man_MANS)
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/fr/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign doc/fr/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
install-man8: $(man_MANS)
@$(NORMAL_INSTALL)
@list1=''; \
list2='$(man_MANS)'; \
test -n "$(man8dir)" \
&& test -n "`echo $$list1$$list2`" \
|| exit 0; \
echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \
$(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \
{ for i in $$list1; do echo "$$i"; done; \
if test -n "$$list2"; then \
for i in $$list2; do echo "$$i"; done \
| sed -n '/\.8[a-z]*$$/p'; \
fi; \
} | while read p; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; echo "$$p"; \
done | \
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
sed 'N;N;s,\n, ,g' | { \
list=; while read file base inst; do \
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
fi; \
done; \
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
while read files; do \
test -z "$$files" || { \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
done; }
uninstall-man8:
@$(NORMAL_UNINSTALL)
@list=''; test -n "$(man8dir)" || exit 0; \
files=`{ for i in $$list; do echo "$$i"; done; \
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.8[a-z]*$$/p'; \
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir)
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@list='$(MANS)'; if test -n "$$list"; then \
list=`for p in $$list; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
if test -n "$$list" && \
grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
echo " typically \`make maintainer-clean' will remove them" >&2; \
exit 1; \
else :; fi; \
else :; fi
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(MANS)
installdirs:
for dir in "$(DESTDIR)$(man8dir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am: install-man
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-data-hook
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man: install-man8
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-man
uninstall-man: uninstall-man8
.MAKE: install-am install-data-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-data-hook install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-man8 install-pdf install-pdf-am install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
ps ps-am uninstall uninstall-am uninstall-man uninstall-man8
@SET_MAKE@
install-data-hook:
@WITH_PATH_VERSIONED_TRUE@ -for p in $(man_MANS); do \
@WITH_PATH_VERSIONED_TRUE@ case "$$p" in \
@WITH_PATH_VERSIONED_TRUE@ *.1 ) mv $(DESTDIR)$(man1dir)/$${p} \
@WITH_PATH_VERSIONED_TRUE@ `echo "$(DESTDIR)$(man1dir)/$${p}" | sed 's/\.1$$/-$(VERSION).1/'` ;; \
@WITH_PATH_VERSIONED_TRUE@ *.8 ) mv $(DESTDIR)$(man8dir)/$${p} \
@WITH_PATH_VERSIONED_TRUE@ `echo "$(DESTDIR)$(man8dir)/$${p}" | sed 's/\.8$$/-$(VERSION).8/'` ;; \
@WITH_PATH_VERSIONED_TRUE@ esac; \
@WITH_PATH_VERSIONED_TRUE@ done
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

462
rpm-5.4.9/doc/fr/rpm.8 Normal file
View file

@ -0,0 +1,462 @@
.\" Traduction 06/08/2000 par Frédéric Delanoy (fdelanoy@info.fundp.ac.be)
.\"
.\" rpm - Gestionnaire de Paquetages Red Hat
.TH RPM 8 "6 Août 2000" "Red Hat" "Manuel de l'administrateur Linux"
.SH NOM
rpm \- Gestionnaire de Paquetages Red Hat.
.SH SYNOPSIS
\fBrpm\fP [options]
.SH DESCRIPTION
\fBrpm\fP est un puissant \fIgestionnaire de paquetages\fP, qui peut être utilisé pour construire, installer, interroger, vérifier, mettre à jour, et désinstaller des paquetages de logicies individuels. Un \fIpaquetage\fP consiste en une archive de fichiers, et en de l'information sur ce paquetage, incluant le nom, la version et la description du paquetage.
Un des modes de base suivants doit être sélectionné :
\fIInitialiser Base De Données\fP, \fIReconstruire Base De Données\fP, \fIConstruire Paquetage\fP, \fIRecompiler Paquetage\fP, \fIConstruire Paquetage à partir Tarball\fP, \fIInterroger\fP, \fIMontrer Etiquettes de Requêtes\fP, \fIInstaller\fP, \fIRafraîchir\fP, \fIDésinstaller\fP, \fIVérifier\fP, \fIVérifier Signature\fP, \fIResigner\fP, \fIAjouter Signature\fP, \fIfixer propriétaires et groupes\fR et \fIMontrer Configuration\fP.
Maintenance de la Base De Données :
.br
.I "\fB rpm \-i [\-\-initdb]\fP"
.br
.I "\fB rpm \-i [\-\-rebuiddb]\fP"
Construction :
.br
.I "\fB rpm [\-b|t] [spec_paquetage]+\fP"
.br
.I "\fB rpm [\-\-rebuild] [source_rpm]+\fP"
.br
.I "\fB rpm [\-\-tarbuild] [source_tarrée]+\fP"
.br
Requêtes :
.br
.I "\fB rpm [\-\-query] [options_de_requête]\fP"
.br
.I "\fB rpm [\-\-querytags]\fP"
.br
Maintenir les paquetages installés :
.br
.I "\fB rpm [\-\-install] [options] [fichier_paquetage]+\fP"
.br
.I "\fB rpm [\-\-freshen|\-F] [options_installation] [fichier_paquetage]+\fP"
.br
.I "\fB rpm [\-\-uninstall|\-e] [options_désinstallation] [paquetage]+\fP"
.br
.I "\fB rpm [\-\-verify|\-V] [options_vérification] [paquetage]+\fP"
.br
Signatures:
.br
.I "\fB rpm [\-\-verify|\-V] [options_vérification] [paquetage]+\fP"
.br
.I "\fB rpm [\-\-resign] [fichier_paquetage]+\fP"
.br
.I "\fB rpm [\-\-addsign] [fichier_paquetage]+\fP"
.br
Divers :
.br
.I "\fB rpm [\-\-showrc]\fP"
.br
.I "\fB rpm [\-\-setperms] [paquetage]+\fP"
.br
.I "\fB rpm [\-\-setgids] [paquetage]+\fP"
.br
.SH OPTIONS GENERALES
Ces options peuvent être utilisées dans différents modes.
.IP "\fB\-vv\fP"
Afficher un tas d'horribles informations de déboggage.
.IP "\fB\-\-quiet\fP"
Afficher le moins possible ; normalement seuls les messages d'erreur seront affichés.
.IP "\fB\-\-help\fP"
Afficher un message d'utilisation plus long que d'habitude.
.IP "\fB\-\-version\fP"
Afficher une seule ligne contenant le numéro de version utilisé par \fBrpm\fP.
.IP "\fB\-\-rcfile \fI<liste_fichiers>\fP"
Chacun des fichiers dans la \fI<liste_fichiers>\fP séparés par des deux\-point est lu séquentiellement par \fBrpm\fP pour obtenir des informations de configuration. La \fI<liste_fichiers>\fP par défaut est \fB/usr/lib/rpm/rpmrc:/etc/rpmrc:~/.rpmrc\fP. Seul le premier fichier dans la liste doit exister, les tildes sont étendues à \fB$HOME\fP.
.IP "\fB\-\-root \fI<répertoire>\fP"
Utiliser le système "enraciné" dans \fI<répertoire>\fP pour toutes les opérations. Notez que cela signifie que la base de données sera lue ou modifiée dans \fI<répertoire>\fP et que chacun des scripts \fIpre\fP et \fIpost\fP seront lancés après un chroot() vers \fI<répertoire>\fP.
.IP "\fB\-\-dbpath \fI<chemin>\fP"
Utiliser la base de données RPM située dans \fI<chemin>\fP.
.IP "\fB\-\-justdb\fP"
Mettre à jour uniquement la base de données, pas le système de fichiers.
.IP "\fB\-\-ftpproxy \fI<hôte>\fP, \fB\-\-httpproxy \fI<hôte>\fP"
Utiliser \fI<hôte>\fP en tant qu'hôte proxy FTP ou HTTP. Voir \fBOPTIONS FTP/HTTP\fP.
.IP "\fB\-\-ftpport \fI<port>\fP, \fB\-\-httpport \fI<port>\fP"
Utiliser \fI<port>\fP comme port FTP ou HTTP sur l'hôte proxy. Voir \fBOPTIONS FTP/HTTP\fP.
.IP "\fB\-\-pipe \fI<cmd>\fP"
Envoyer la sortie de \fBrpm\fP à la commande \fI<cmd>\fP par l'intermédiaire d'un tube.
.SH OPTIONS D'INSTALLATION ET DE MISE A NIVEAU
La forme de la commande d'installation rpm est
.PP
\fBrpm \-i [options_installation] \fI<fichier_paquetage>+\fP
.PP
Ceci installe un nouveau paquetage. La forme générale d'une commande de mise à niveau rpm est
.PP
\fBrpm \-U [options_installation] \fI<fichier_paquetage>+\fP
.PP
Ceci met à jour ou installe le paquetage installé actuellement à la version du nouveau RPM. Ceci est la même chose que l'installation, sauf que les autres versions du paquetage sont supprimées du système.
.PP
\fBrpm [\-F|-\-rafraîchir] [options_installation] \fI<fichier_paquetage>+\fP
.PP
Ceci mettra à niveau les paquetages, mais uniquement si une version plus ancienne existe actuellement.
Le \fI<fichier_paquetage>\fP peut être spécifié par une URL ftp ou http, auquel cas le paquetage sera téléchargé avant d'être installé. Voir \fBOPTIONS FTP/HTTP\fP pour obtenir des informations sur le support intégré de ftp et http par RPM.
.PP
.IP "\fB\-\-force\fP"
Idem que \fB\-\-replacepkgs\fP, \fB\-\-replacefiles\fP, et \fB\-\-oldpaquetage\fP.
.IP "\fB\-h\fP, \fB\-\-hash\fP"
Afficher 50 marques de hachage quand l'archive du paquetage est déballée. A utiliser avec \fB\-v\fP pour un bel affichage.
.IP "\fB\-\-oldpackage\fP"
Permettre à une mise à niveau de remplacer un paquetage par un paquetage plus ancien.
.IP "\fB\-\-percent\fP"
Afficher les pourcentages quand les fichiers sont extraits de l'archive du paquetage, ceci dans le but de rendre RPM facile à lancer à partir d'autres outils.
.IP "\fB\-\-replacefiles\fP"
Installer les paquetages même s'ils remplacent des fichiers d'autres paquetages déjà installés.
.IP "\fB\-\-replacepkgs\fP"
Installer les paquetages même si certains d'entre eux sont déjà installés sur ce système.
.IP "\fB\-\-allfiles\fP"
Installer ou mettre à niveau tous les fichiers manquants du paquetage, même s'ils existent déjà.
.IP "\fB\-\-nodeps\fP"
Ne pas effectuer de vérification de dépendances avant d'installer ou de mettre à niveau un paquetage.
.IP "\fB\-\-noscripts\fP"
Ne pas exécuter les scripts de pré\- et post\- installation.
.IP "\fB\-\-notriggers\fP"
Ne pas exécuter les scripts qui sont déclenchés par l'installation de ce paquetage.
.IP "\fB\-\-ignoresize\fP"
Ne pas examiner les systèmes de fichiers montés pour vérifier qu'il y ait un espace disque suffisant avant d'installer ce paquetage.
.IP "\fB\-\-excludepath \fI<chemin>\fP"
Ne pas installer les fichiers dont les noms commencent par \fI<chemin>\fP.
.IP "\fB\-\-excludedocs\fP"
Ne pas installer de fichiers qui sont marqués comme documentation (ce qui inclut les pages de manuel et les documents texinfo).
.IP "\fB\-\-includedocs\fP"
Installer les fichiers de documentation. C'est le comportement par défaut.
.IP "\fB\-\-test\fP"
Ne pas installer le paquetage, uniquement le vérifier et rapporter les conflits potentiels.
.IP "\fB\-\-ignorearch\fP"
Ceci permet l'installation ou la mise à niveau même si l'architecture du binaire RPM et de l'hôte ne correspondent pas.
.IP "\fB\-\-ignoreos\fP"
Ceci permet l'installation ou la mise à niveau même si les systèmes d'exploitation du binaire RPM et de l'hôte ne correspondent pas.
.IP "\fB\-\-prefix \fI<chemin>\fP"
Ceci fixe le préfixe d'installation à \fI<chemin>\fP pour les paquetages relogeables.
.IP "\fB\-\-relocate \fI<ancien_chemin>\fB=\fI<nouveau_chemin>\fP"
Pour les paquetages relogeables, traduit les fichiers qui seraient mis dans \fI<oldchemin>\fP par \fI<newchemin>\fP.
.IP "\fB\-\-badreloc\fP"
A utiliser en conjonction avec \-\-relocate, ceci force le relogement même si le paquetage n'est pas relogeable.
.IP "\fB\-\-noorder\fP"
Ne pas réordonner les paquetages pour une installation. La liste des paquetages devrait normalement être réordonnée pour satisfaire aux dépendances.
.SH OPTIONS DE REQUETE
La forme générale d'une commande de requête rpm est
.PP
\fBrpm \-q [options_de_requête]\fP
.PP
Vous pouvez spécifier le format d'information de paquetage qui sera affiché. Pour cela, utilisez l'option \fB[\-\-queryformat|\-qf]\fP, suivie de la chaîne de caractères de format.
Les formats de requête sont des versions modifiées du formattage standard \fBprintf(3)\fP. Ce format est constitué de chaînes de caractères statiques (qui peuvent inclure les séquences d'échappement du C standard pour les sauts de lignes, les tabulations, et d'autres caractères spéciaux) et les formatteurs du type de ceux de \fBprintf(3)\fP. Comme \fBrpm\fP connaît déjà les types à afficher, le spécificateur de type doit néanmoins être omis, et remplacé par le nom de l'étiquette (tag) d'entête à afficher, enfermé dans des caractères \fB{}\fP. La partie \fBRPMTAG_\fP du nom de l'étiquette peut être omise.
Des formats de sortie alternatifs peuvent être requis en faisant suivre l'étiquette par \fB:\fItypetag\fR. Actuellement, les types suivants sont supportés : \fBoctal\fR, \fBdate\fR, \fBshescape\fR, \fBperms\fR, \fBfflags\fR, et \fBdepflags\fR.
Par exemple, pour afficher uniquement les noms des paquetages requis, vous pouvez utiliser \fB%{NOM}\fP comme chaîne de caractères de format. Pour afficher de l'information de nom et de distribution en deux colonnes, vous pouvez utiliser \fB%\-30{NOM}%{DISTRIBUTION}\fP.
\fBrpm\fP affichera une liste de toutes les étiquettes qu'il connaît quand il est invoqué avec l'argument \fB\-\-querytags\fP.
Il y a deux sous\-ensembles d'option pour les requêtes : la sélection de paquetages et la sélection d'information.
Options de sélection de paquetages :
.br
.IP "\fB\fI<nom_paquetage>\fP"
Interroger le paquetage intallé nommé \fI<nom_paquetage>\fP.
.IP "\fB\-a\fP, \fB\-\-all\fP"
Interroger tous les paquetages intallés.
.IP "\fB\-\-whatrequires \fI<capacité>\fP"
Interroger tous les paquetages qui ont besoin de \fI<capacité>\fP pour leur fonctionnement propre.
.IP "\fB\-\-whatprovides \fI<virtuel>\fP"
Interroger tous les paquetages qui fournissent la capacité \fI<virtuel>\fP.
.IP "\fB\-f \fI<fichier>\fP, \fB\-\-fichier \fI<fichier>\fP"
Interroger le paquetage possédant \fI<fichier>\fP.
.IP "\fB\-g \fI<groupe>\fP, \fB\-\-groupe \fI<groupe>\fP"
Interroger les paquetages dont le groupe est \fI<groupe>\fP.
.IP "\fB\-p \fI<fichier_paquetage>\fP"
Interroger un paquetage \fI<fichier_paquetage>\fP non installé . Le \fI<fichier_paquetage>\fP peut être spécifié comme une URL de type ftp ou http, auquel cas l'entête du paquetage sera téléchargée et interrogée. Voir \fBOPTIONS FTP/HTTP\fP pour obtenir de l'information sur le support intégré d'un client ftp et http par RPM.
.IP "\fB\-\-specfile \fI<fichier_de_specs>\fP"
Analyse syntaxiquement (parse) et interroge \fI<fichier_de_specs>\fP comme s'il était un paquetage. Bien que toutes les informations (p.ex. les listes de fichiers) ne soient pas disponibles, ce type d'interrogation permet à rpm d'être utilisé pour extraire de l'information de fichiers de spécifications sans avoir à écrire un parseur de fichiers de spécifications.
.IP "\fB\-\-querybynombre \fI<nombre>\fP"
Interroger la \fI<nombre>\fPième entrée de la base de données directement; ceci est utile à des fins de déboggage.
.IP "\fB\-\-triggeredby \fI<pkg>\fP"
Interroger les paquetages qui sont déclenchés par les paquetages \fI<pkg>\fP.
.P
Options de sélection d'information :
.br
.IP "\fB\-i\fP"
Afficher l'information du paquetage, incluant son nom, sa version, et sa description. Cette option utilisera \fB\-\-queryformat\fP s'il a été spécifié.
.IP "\fB\-R\fP, \fB\-\-requires\fP"
Lister les paquetages desquels dépend ce paquetage.
.IP "\fB\-\-provides\fP"
Lister les capacités que fournit ce paquetage.
.IP "\fB\-\-changelog\fP"
Lister les informations de modifications de ce paquetage.
.IP "\fB\-l\fP, \fB\-\-list\fP"
Lister les fichiers du paquetage.
.IP "\fB\-s\fP, \fB\-\-state\fP"
Afficher les \fIétats\fP des fichiers du paquetage (implique \fB\-l\fP). L'état de chaque fichier est soit \fInormal\fP, \fInon installé\fP, ou \fIremplacé\fP.
.IP "\fB\-d\fP, \fB\-\-docfiles\fP"
Lister uniquement les fichiers de documentation (implique \fB\-l\fP).
.IP "\fB\-c\fP, \fB\-\-configfiles\fP"
Lister uniquement les fichiers de configuration (implique \fB\-l\fP).
.IP "\fB\-\-scripts\fP"
Lister les scripts shell spécifiques au paquetage qui sont utilisés comme une partie des processus d'installation et de désinstallation, s'il y en a.
.IP "\fB\-\-triggers\fP, \fB\-\-triggerscripts\fP"
Afficher les scripts de déclenchement, s'il y en a, qui sont contenus dans le paquetage.
.IP "\fB\-\-dump\fP"
Afficher l'information du fichier comme suit : chemin taille mtime somme_md5 mode propriétaire groupe isconfig isdoc rdev symlink. Ceci doit être utilisé avec au moins une option parmi \fB\-l\fP, \fB\-c\fP, \fB\-d\fP.
.IP "\fB\-\-last\fP"
Ordonner le listing des paquetages par date d'installation de sorte que les derniers fichiers installés soient au sommet.
.IP "\fB\-\-filesbypkg\fP"
Lister tous les fichiers de chaque paquetage.
.IP "\fB\-\-triggerscripts\fP"
Montrer tous les scripts de déclenchement pour les paquetages sélectionnés.
.SH OPTIONS DE VERIFICATION
La forme générale d'une commande de vérification rpm est
.PP
\fBrpm \-V|\-y|\-\-verify [verify\-options]\fP
.PP
Vérifier un paquetage compare les informations sur les fichiers installés dans le paquetage avec les informations sur les fichiers obtenues à partir du paquetage original et conservées dans la base de données rpm. Entre autres choses, la vérification compare la taille, la somme MD5, les permissions, le propriétaire et les groupes de chaque fichier. Toutes les discordances sont affichées. Les options de spécification de paquetage sont les mêmes que pour l'interrogation de paquetages.
Les fichiers qui n'étaient pas installés en provenance du paquetage, par exemple les fichiers de documentation exclus à l'installation en utilisant l'option "\fB\-\-excludedocs\fP", sont ignorés silencieusement.
Options pouvant être utilisées en mode de vérification :
.IP "\fB\-\-nomd5\fP"
Ignore les erreurs de somme de contrôle MD5 pendant la vérification.
.IP "\fB\-\-nopgp\fP"
Ignore les erreurs de contrôle PGP pendant la vérification.
.IP "\fB\-\-nofiles\fP"
Ignore les fichiers manquants pendant la vérification.
Le format de sortie est constitué d'une chaîne de caractères de 8 caractère, d'un "\fBc\fP" éventuel dénottant un fichier de configuration, et ensuite du nom du fichier. Chacun des 8 caractères dénote le résultat d'une comparaison d'un attribut du fichier avec la valeur de cet attribut enregistré dans la base de données rpm. Un simple "\fB.\fP" (point) signifie que le test s'est bien passé. Les caractères suivants dénote l'échec à certains tests :
.IP "\fB5\fP"
Somme MD5
.IP "\fBS\fP"
Taille du fichier
.IP "\fBL\fP"
Lien symbolique
.IP "\fBT\fP"
Mtime
.IP "\fBD\fP"
Périphérique
.IP "\fBU\fP"
Utilisateur
.IP "\fBG\fP"
Groupe
.IP "\fBM\fP"
Mode (inclut les permissions et le type de fichier)
.SH VERIFICATION DE SIGNATURE
La forme générale d'une commande de vérification d'une signature rpm est
.PP
\fBrpm \-\-checksig \fI<fichier_paquetage>+\fP
.PP
Ceci vérifie la signature PGP du paquetage \fI<fichier_paquetage>\fP pour s'assurer de son intégrité et de son origine. Les informations de configurations de PGP sont lues à partir des fichiers de configuration. Voir la section sur les SIGNATURES PGP pour les détails.
.SH OPTIONS DE DESINSTALLATION
La forme générale d'une commande de désinstallation rpm est
.PP
\fB rpm \-e \fI<nom_paquetage>+\fP
.PP
.IP "\fB\-\-allmatches\fP"
Supprimer toutes les versions du paquetage auquel correspond \fI<nom_paquetage>\fR. Normalement, une erreur est émise si \fI<paquetage_nom>\fR correspond à de multiples paquetages.
.IP "\fB\-\-noscripts\fP"
Ne pas exécuter les scripts de pré\- et de post\- désinstallation.
.IP "\fB\-\-notriggers\fP"
Ne pas exécuter les scripts qui sont déclenchés par la suppression de ce paquetage.
.IP "\fB\-\-nodeps\fP"
Ne pas vérifier les dépendances avant de désinstaller les paquetages.
.IP "\fB\-\-test\fP"
Ne pas réellement désinstaller quoi que ce soit, juste effectuer un test pour voir si c'est possible. Utile en conjonction avec l'option \fB\-vv\fP.
.SH OPTIONS DE CONSTRUCTION
La forme générale d'une commande de construction rpm est
.PP
\fBrpm \-[b|t]\fIO\fP [options_de_construction] \fI<spec_paquetage>+\fP
.PP
L'argument utilisé est \fB-b\fR si un fichier de spécifications est utilisé pour construire le paquetage et \fB-t\fR si \fBRPM\fR devrait regarder à l'intérieur d'un fichier gzippé (ou tarré) pour obtenir le fichier de spécifications à utiliser. Après le premier argument, l'argument suivant (\fIO\fR) spécifie les étapes de construction et de mise en paquets à effectuer et est un argument parmi :
.IP "\fB\-bp\fP"
Exécute l'étape "%prep" du fichier de spécifications. Normalement, ceci implique de déballer les sources et d'appliquer tous les patchs.
.IP "\fB\-bl\fP"
Faire une "vérification de liste". La section "%files" du fichier de spécifications subit l'expansion des macros, et des vérifications sont effectuées pour vérifier que chaque fichier existe.
.IP "\fB\-bc\fP"
Effectuer l'étape "%build" du fichier de spécifications (après avoir effectué l'étape prep). Cela implique en général l'équivalent d'un "make".
.IP "\fB\-bi\fP"
Effectuer l'étape "%install" du fichier de spécifications (après avoir effectué les étapes prep et build). Cela implique en général l'équivalent d'un "make install".
.IP "\fB\-bb\fP"
Construire un paquetage binaire (après avoir effectué les étapes prep, build, et install).
.IP "\fB\-bs\fP"
Construire uniquement le paquetage source (après avoir effectué les étapes prep, build, et install).
.IP "\fB\-ba\fP"
Construire les paquetages paquetages binaires et sources (après avoir effectué les étapes prep, build, et install).
.PP
Les options suivantes peuvent également être utilisées :
.IP "\fB\-\-short\-circuit\fP"
Passer directement à l'étape spécifiée (çàd, passer toutes les étapes menant à l'étape spécifiée). Uniquement valide avec \fB\-bc\fP et \fB\-bi\fP.
.IP "\fB\-\-timecheck\fP"
Fixer l'âge de "timecheck" (0 pour le désactiver). Cette valeur peut également être configurée en définissant la macro "_timecheck". La valeur de timecheck exprime, en secondes, l'âge maximum d'un fichier en train d'être mis en paquetage. Des avertissements seront affichés pour tous les fichiers au\-delà de l'âge de timecheck.
.IP "\fB\-\-clean\fP"
Supprimer l'arbre de construction après que les paquetages aient été créés.
.IP "\fB\-\-rmsource\fP"
Supprimer les sources et le fichier de spécifications après la construction (peut également être utilisé seul, p.ex. "\fBrpm \-\-rmsource foo.spec\fP").
.IP "\fB\-\-test\fP"
N'exécuter aucune étape de construction. Utile pour tester en profondeur les fichiers de spécifications.
.IP "\fB\-\-sign\fP"
Incorpore une signature PGP dans le paquetage. Cette signature peut être utilisée pour vérifier l'intégrité et l'origine du paquetage. Voir la section sur les SIGNATURES PGP pour les détails de configuration.
.IP "\fB\-\-buildroot \fI<répertoire>\fP"
Pendant la construction du paquetage, surcharger l'étiquette de Construction de Racine avec le répertoire \fI<répertoire>\fP.
.IP "\fB\-\-target \fI<plate\-forme>\fP"
Pendant la construction du paquetage, interpréter \fI<plate\-forme>\fP comme \fBarch-vendor-os\fP et fixer les macros \fB_target\fP, \fB_target_arch\fP et \fB_target_os\fP en conséquence.
.IP "\fB\-\-buildarch \fI<arch>\fP"
Pendant la construction du paquetage, fixer l'architecture à \fI<arch>\fP. Cette option a été rendue obsolète par \fB\-\-target\fI dans RPM 3.0.
.IP "\fB\-\-buildos \fI<se>\fP"
Pendant la construction du paquetage, fixer l'architecture à \fI<os>\fP. Cette option a été rendue obsolète par \fB\-\-target\fI dans RPM 3.0.
.SH OPTIONS DE RECONSTRUCTION ET DE RECOMPILATION
Il y a deux autres façons d'invoquer une construction avec rpm:
.I "\fBrpm \-\-recompile \fI<fichier_paquetage_sources>+\fP"
.I "\fBrpm \-\-rebuild \fI<fichier_paquetage_sources>+\fP"
Quand il est invoqué de cette façon, \fBrpm\fP installe le paquetage de sources désigné, et effectue une préparation, une compilation et une installation. En plus, \fB\-\-rebuild\fP construit un nouveau paquetage bianire. Quand la construction est terminée, le répertoire de construction est supprimé (comme avec \fB\-\-clean\fP) et les sources ainsi que le fichier de spécifications du paquetage sont supprimés.
.SH SIGNATURE D'UN RPM EXISTANT
.I "\fBrpm \-\-resign \fI<fichier_paquetage_binaires>+\fP"
Cette option génère et insère de nouvelles signatures pour les paquetages spécifiés. Toute signature existante est supprimée.
.I "\fBrpm \-\-addsign \fI<fichier_paquetage_binaires>+\fP"
Cette option génère et concatène les nouvelles signatures des paquetages spécifiés à celles qui existaient déjà.
.SH SIGNATURES PGP
Pour utiliser la caractéristique des signatures, RPM doit être configuré pour lancer PGP, et il doit être capable de trouver un groupe de clés publiques (keyring) avec des clés publiques RPM à l'intérieur. Par défaut, RPM utilise les comportements par défaut de PGP pour trouver les keyrings (en utilisant PGPPATH). Si vos keyrings ne sont pas situées là où PGP s'attend à ce qu'elles soient, vous aurez besoin de configurer la macro
.IP "\fB_pgp_path\fP"
pour fournir la localisation des keyrings PGP à utiliser.
.PP
Si vous voulez être capable de signer les paquetages que vous avez créés vous\-même, vous devrez également créer votre propre paire clé publique/clé secrète (voir le manuel PGP). Vous devrez également configurer les macros suivantes :
.IP "\fB_signature\fP"
Le type de la signature. Actuellement, seule celle de pgp est supportée.
.IP "\fB_pgp_name\fP"
Le nom de l'"utilisateur" dont vous voulez utiliser la clé pour signer vos paquetages.
.PP
Pendant la construction de paquetages, vous ajouterez ensuite le signe \-\- à la ligne de commandes. On vous demandera votre phrase de passe, et votre paquetage sera construit et signé.
Par exemple, pour être capable d'utiliser PGP pour signer les paquetages en tant qu'utilisateur \fp"John Doe <jdoe@foo.com>"\fP à partir des key rings situées dans \fB/etc/rpm/.pgp\fP en utilisant l'exécutable \fB/usr/bin/pgp\fP, vous devriez inclure
.I "\fB%_signature pgp\fP"
.I "\fB%_pgp_path /etc/rpm/.pgp\fP"
.I "\fB%_pgp_name John Doe <jdoe@foo.com>\fP"
.I "\fB%_pgpbin /usr/bin/pgp\fP"
dans un fichier de configuration de macros. Utilisez \fB/etc/rpm/macros\fP pour une configuration par système et \fB~/.rpmmacros\fP pour une configuration par utilisateur.
.SH OPTIONS DE RECONSTRUCTION DE LA BASE DE DONNEES
La forme générale d'une commande de reconstruction d'une base de données rpm est
.PP
\fBrpm \-\-rebuiddb\fP
.PP
Pour reconstuire une nouvelle base de données, tapez :
.PP
\fBrpm \-\-initdb\fP
.PP
Les seules options pour ces modes sont \fB-\-dbchemin\fP et \fB-\-root\fP.
.SH SHOWRC
Lancer
.PP
\fBrpm \-\-showrc\fP
.PP
montrera les valeurs que va utiliser RPM pour toutes les options qui peuvent être fixées dans les fichiers \fIrpmrc\fP.
.SH OPTIONS FTP/HTTP
RPM inclut des simples clients FTP et HTTP pour simplifier l'installation et l'interrogation de paquetages qui sont disponibles sur internet. Les fichiers de paquetage pour l'installation, la mise à niveau et les opérations d'interrogation peuvent être spécifiés dans une URL du style ftp ou http :
.PP
\fBftp://<utilisateur>:<mot_de_passe>@nom_hôte:<port>/chemin/vers/paquetage.rpm\fP
.PP
Si la partie \fB:mot_de_passe\fP est omise, le mot de passe sera demandé (une seule fois par paire utilisateur/nom_hôte). Si l'utilisateur et le mot de passe sont omis, le ftp anonyme est utilisé. Dans tous les cas, des transferts ftp passifs (PASV) sont utilisés.
RPM permet d'utiliser les options suivantes avec les URLs ftp :
.IP "\fB\-\-ftpproxy \fI<nom_hôte>\fP"
L'hôte \fI<nom_hôte>\fP sera utilisé comme un serveur délégué (proxy) pour tous les transferts ftp, ce qui permet aux utilisateurs d'effectuer des connexions au travers des gardes\-barrière qui utilisent des systèmes de proxies. Cette option peut également être spécifiée en configurant la macro \fB_ftpproxy\fP.
.IP "\fB\-\-ftpport \fI<port>\fP"
Le port TCP numéro \fI<port>\fP à utiliser pour les connexions ftp sur le serveur proxy ftp au lieu du port par défaut. Cette option peut également être spécifiée en configurant la macro \fB_ftpport\fP.
.PP
RPM permet d'utiliser les options suivantes avec les URLs http :
.IP "\fB\-\-httpproxy \fI<nom_hôte>\fP"
L'hôte \fI<nom_hôte>\fP sera utilisé comme un serveur délégué (proxy) pour tous les transferts http. Cette option peut également être spécifiée en configurant la macro \fB_httpproxy\fP.
.IP "\fB\-\-httpport \fI<port>\fP"
Le port TCP numéro \fI<port>\fP à utiliser pour les connexions http sur le serveur proxy ftp au lieu du port par défaut. Cette option peut également être spécifiée en configurant la macro \fB_httpport\fP.
.PP
.SH FICHIERS
.nf
/usr/lib/rpm/rpmrc
/etc/rpmrc
~/.rpmrc
/usr/lib/rpm/macros
/etc/rpm/macros
~/.rpmmacros
/var/lib/rpm/conflictsindex.rpm
/var/lib/rpm/fileindex.rpm
/var/lib/rpm/groupindex.rpm
/var/lib/rpm/nameindex.rpm
/var/lib/rpm/packages.rpm
/var/lib/rpm/providesindex.rpm
/var/lib/rpm/requiredby.rpm
/var/lib/rpm/triggerindex.rpm
/tmp/rpm*
.fi
.El
.SH VOIR AUSSI
.IR glint (8)
,
.IR rpm2cpio (8)
,
.B http://www.rpm.org/
.nf
.SH AUTEURS
.nf
Marc Ewing <marc@redhat.com>
Jeff Johnson <jbj@redhat.com>
Erik Troan <ewt@redhat.com>
.fi
.SH TRADUCTION
Frédéric Delanoy, 2000.

45
rpm-5.4.9/doc/gendiff.1 Normal file
View file

@ -0,0 +1,45 @@
.TH GENDIFF 1 "Mon Jan 10 2000"
.UC 4
.SH NAME
gendiff \- utility to aid in error-free diff file generation
.SH SYNOPSIS
\fBgendiff\fR <directory> <diff-extension>
.SH DESCRIPTION
\fBgendiff\fR is a rather simple script which aids in generating a
diff file from a single directory. It takes a directory name and a
"diff-extension" as its only arguments. The diff extension should be
a unique sequence of characters added to the end of all original,
unmodified files. The output of the program is a diff file which may
be applied with the \fBpatch\fR program to recreate the changes.
.PP
The usual sequence of events for creating a diff is to create two
identical directories, make changes in one directory, and then use the
\fBdiff\fR utility to create a list of differences between the two.
Using gendiff eliminates the need for the extra, original and
unmodified directory copy. Instead, only the individual files that
are modified need to be saved.
.PP
Before editing a file, copy the file, appending the extension you have chosen
to the filename. I.e. if you were going to edit somefile.cpp and have chosen
the extension "fix", copy it to somefile.cpp.fix before editing it.
Then edit the first copy (somefile.cpp).
.PP
After editing all the files you need to edit in this fashion, enter the
directory one level above where your source code resides, and then type
.sp
.nf
$ gendiff somedirectory .fix > mydiff-fix.patch
.fi
.PP
You should redirect the output to a file (as illustrated) unless you want to
see the results on stdout.
.PD
.SH "SEE ALSO"
.BR diff (1),
.BR patch (1)
.SH AUTHOR
.nf
Marc Ewing <marc@redhat.com>
.fi

View file

@ -0,0 +1,21 @@
## Process this file with automake to produce Makefile.in
@SET_MAKE@
man_MANS = rpm.8 rpm2cpio.8 rpmbuild.8 rpmcache.8 rpmgraph.8
mandir = @mandir@/ja
EXTRA_DIST = $(man_MANS)
install-data-hook:
if WITH_PATH_VERSIONED
-for p in $(man_MANS); do \
case "$$p" in \
*.1 ) mv $(DESTDIR)$(man1dir)/$${p} \
`echo "$(DESTDIR)$(man1dir)/$${p}" | sed 's/\.1$$/-$(VERSION).1/'` ;; \
*.8 ) mv $(DESTDIR)$(man8dir)/$${p} \
`echo "$(DESTDIR)$(man8dir)/$${p}" | sed 's/\.8$$/-$(VERSION).8/'` ;; \
esac; \
done
endif

View file

@ -0,0 +1,820 @@
# Makefile.in generated by automake 1.11.4 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__make_dryrun = \
{ \
am__dry=no; \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
esac; \
test $$am__dry = yes; \
}
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = doc/ja
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
man8dir = $(mandir)/man8
am__installdirs = "$(DESTDIR)$(man8dir)"
NROFF = nroff
MANS = $(man_MANS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILDROOTDIR_MACRO = @BUILDROOTDIR_MACRO@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DBAPI = @DBAPI@
DBLIBOBJS = @DBLIBOBJS@
DBLIBSRCS = @DBLIBSRCS@
DBPATH = @DBPATH@
DBPATH_MACRO = @DBPATH_MACRO@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DISTRO_MACROS = @DISTRO_MACROS@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
FIXPERMS = @FIXPERMS@
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@
GPSEE_MODULES_PATH = @GPSEE_MODULES_PATH@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLLIBS = @INTLLIBS@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LDFLAGS_STATIC = @LDFLAGS_STATIC@
LD_VERSION_SCRIPT_FLAG = @LD_VERSION_SCRIPT_FLAG@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBTOOLIZE = @LIBTOOLIZE@
LIPO = @LIPO@
LN_S = @LN_S@
LOCALEDIR = @LOCALEDIR@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
LT_AGE = @LT_AGE@
LT_CURRENT = @LT_CURRENT@
LT_REVISION = @LT_REVISION@
MACROFILES = @MACROFILES@
MAGIC_MACRO = @MAGIC_MACRO@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
NCPUS_COMMAND = @NCPUS_COMMAND@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPENMP_CFLAGS = @OPENMP_CFLAGS@
OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PERL_INSTALLDIRS = @PERL_INSTALLDIRS@
PERL_URPM_INSTALLDIRS = @PERL_URPM_INSTALLDIRS@
PKGSRCDIR = @PKGSRCDIR@
PKGSRCDIR_MACRO = @PKGSRCDIR_MACRO@
POSUB = @POSUB@
PYTHON = @PYTHON@
PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
PYTHON_PREFIX = @PYTHON_PREFIX@
PYTHON_VERSION = @PYTHON_VERSION@
RANLIB = @RANLIB@
ROOT_GROUP = @ROOT_GROUP@
RPMCANONARCH = @RPMCANONARCH@
RPMCANONCOLOR = @RPMCANONCOLOR@
RPMCANONGNU = @RPMCANONGNU@
RPMCANONOS = @RPMCANONOS@
RPMCANONVENDOR = @RPMCANONVENDOR@
RPMGID = @RPMGID@
RPMGROUP = @RPMGROUP@
RPMLUAFILES = @RPMLUAFILES@
RPMPOPTFILES = @RPMPOPTFILES@
RPMUID = @RPMUID@
RPMUSER = @RPMUSER@
RPM_TIMESTAMP = @RPM_TIMESTAMP@
RPM_VENDOR = @RPM_VENDOR@
RPM_VERSION = @RPM_VERSION@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
SYSCONFIGDIR = @SYSCONFIGDIR@
USE_NLS = @USE_NLS@
USRLIBRPM = @USRLIBRPM@
VERSION = @VERSION@
WITH_ACL = @WITH_ACL@
WITH_APIDOCS = @WITH_APIDOCS@
WITH_APIDOCS_TARGET = @WITH_APIDOCS_TARGET@
WITH_APR = @WITH_APR@
WITH_ATERM = @WITH_ATERM@
WITH_ATTR = @WITH_ATTR@
WITH_AUGEAS = @WITH_AUGEAS@
WITH_AUGEAS_AUGTOOL = @WITH_AUGEAS_AUGTOOL@
WITH_BASH = @WITH_BASH@
WITH_BASH_CPPFLAGS = @WITH_BASH_CPPFLAGS@
WITH_BASH_LDFLAGS = @WITH_BASH_LDFLAGS@
WITH_BASH_LIBS = @WITH_BASH_LIBS@
WITH_BASH_SUBDIR = @WITH_BASH_SUBDIR@
WITH_BEECRYPT = @WITH_BEECRYPT@
WITH_BEECRYPT_CPPFLAGS = @WITH_BEECRYPT_CPPFLAGS@
WITH_BEECRYPT_LDFLAGS = @WITH_BEECRYPT_LDFLAGS@
WITH_BEECRYPT_LIBS = @WITH_BEECRYPT_LIBS@
WITH_BEECRYPT_SUBDIR = @WITH_BEECRYPT_SUBDIR@
WITH_BZIP2 = @WITH_BZIP2@
WITH_CPUINFO = @WITH_CPUINFO@
WITH_CUDF = @WITH_CUDF@
WITH_CUDF_CUDFTOOL = @WITH_CUDF_CUDFTOOL@
WITH_DB = @WITH_DB@
WITH_DBSQL = @WITH_DBSQL@
WITH_DBSQL_CPPFLAGS = @WITH_DBSQL_CPPFLAGS@
WITH_DBSQL_LDFLAGS = @WITH_DBSQL_LDFLAGS@
WITH_DBSQL_LIBS = @WITH_DBSQL_LIBS@
WITH_DBSQL_SUBDIR = @WITH_DBSQL_SUBDIR@
WITH_DB_CPPFLAGS = @WITH_DB_CPPFLAGS@
WITH_DB_LDFLAGS = @WITH_DB_LDFLAGS@
WITH_DB_LIBS = @WITH_DB_LIBS@
WITH_DB_SUBDIR = @WITH_DB_SUBDIR@
WITH_DMALLOC = @WITH_DMALLOC@
WITH_EFENCE = @WITH_EFENCE@
WITH_EXPAT = @WITH_EXPAT@
WITH_FICL = @WITH_FICL@
WITH_FICL_CPPFLAGS = @WITH_FICL_CPPFLAGS@
WITH_FICL_LDFLAGS = @WITH_FICL_LDFLAGS@
WITH_FICL_LIBS = @WITH_FICL_LIBS@
WITH_FICL_SUBDIR = @WITH_FICL_SUBDIR@
WITH_FILE = @WITH_FILE@
WITH_FILE_CPPFLAGS = @WITH_FILE_CPPFLAGS@
WITH_FILE_LDFLAGS = @WITH_FILE_LDFLAGS@
WITH_FILE_LIBS = @WITH_FILE_LIBS@
WITH_FILE_SUBDIR = @WITH_FILE_SUBDIR@
WITH_GCRYPT = @WITH_GCRYPT@
WITH_GNUTLS = @WITH_GNUTLS@
WITH_GPSEE = @WITH_GPSEE@
WITH_GPSEE_CPPFLAGS = @WITH_GPSEE_CPPFLAGS@
WITH_GPSEE_LDFLAGS = @WITH_GPSEE_LDFLAGS@
WITH_GPSEE_LIBS = @WITH_GPSEE_LIBS@
WITH_GPSEE_SUBDIR = @WITH_GPSEE_SUBDIR@
WITH_JS_SUBDIR = @WITH_JS_SUBDIR@
WITH_KEYUTILS = @WITH_KEYUTILS@
WITH_KEYUTILS_RPMKEY = @WITH_KEYUTILS_RPMKEY@
WITH_LIBELF_DEBUGEDIT = @WITH_LIBELF_DEBUGEDIT@
WITH_LIBGIT2 = @WITH_LIBGIT2@
WITH_LIBGIT2_CPPFLAGS = @WITH_LIBGIT2_CPPFLAGS@
WITH_LIBGIT2_LDFLAGS = @WITH_LIBGIT2_LDFLAGS@
WITH_LIBGIT2_LIBS = @WITH_LIBGIT2_LIBS@
WITH_LIBGIT2_SUBDIR = @WITH_LIBGIT2_SUBDIR@
WITH_LIBTASN1 = @WITH_LIBTASN1@
WITH_LUA = @WITH_LUA@
WITH_LUA_CPPFLAGS = @WITH_LUA_CPPFLAGS@
WITH_LUA_LDFLAGS = @WITH_LUA_LDFLAGS@
WITH_LUA_LIBS = @WITH_LUA_LIBS@
WITH_LUA_SUBDIR = @WITH_LUA_SUBDIR@
WITH_LUA_SUBDIR_DEF = @WITH_LUA_SUBDIR_DEF@
WITH_LUA_SUBDIR_LIB = @WITH_LUA_SUBDIR_LIB@
WITH_MOZJS185 = @WITH_MOZJS185@
WITH_MOZJS185_CPPFLAGS = @WITH_MOZJS185_CPPFLAGS@
WITH_MOZJS185_LDFLAGS = @WITH_MOZJS185_LDFLAGS@
WITH_MOZJS185_LIBS = @WITH_MOZJS185_LIBS@
WITH_MOZJS185_SUBDIR = @WITH_MOZJS185_SUBDIR@
WITH_NEON = @WITH_NEON@
WITH_NEON_CPPFLAGS = @WITH_NEON_CPPFLAGS@
WITH_NEON_LDFLAGS = @WITH_NEON_LDFLAGS@
WITH_NEON_LIBS = @WITH_NEON_LIBS@
WITH_NEON_SUBDIR = @WITH_NEON_SUBDIR@
WITH_NIX = @WITH_NIX@
WITH_NSS = @WITH_NSS@
WITH_OPENSSL = @WITH_OPENSSL@
WITH_PAKCHOIS = @WITH_PAKCHOIS@
WITH_PATH_VERSIONED = @WITH_PATH_VERSIONED@
WITH_PATH_VERSIONED_SUFFIX = @WITH_PATH_VERSIONED_SUFFIX@
WITH_PCRE = @WITH_PCRE@
WITH_PCRE_CPPFLAGS = @WITH_PCRE_CPPFLAGS@
WITH_PCRE_LDFLAGS = @WITH_PCRE_LDFLAGS@
WITH_PCRE_LIBS = @WITH_PCRE_LIBS@
WITH_PCRE_SUBDIR = @WITH_PCRE_SUBDIR@
WITH_PERLEMBED = @WITH_PERLEMBED@
WITH_PERL_LIBS = @WITH_PERL_LIBS@
WITH_PERL_SUBDIR = @WITH_PERL_SUBDIR@
WITH_PERL_SUBPACKAGE = @WITH_PERL_SUBPACKAGE@
WITH_PERL_URPM_LIBS = @WITH_PERL_URPM_LIBS@
WITH_PERL_URPM_SUBDIR = @WITH_PERL_URPM_SUBDIR@
WITH_PERL_URPM_SUBPACKAGE = @WITH_PERL_URPM_SUBPACKAGE@
WITH_POPT = @WITH_POPT@
WITH_POPT_CPPFLAGS = @WITH_POPT_CPPFLAGS@
WITH_POPT_LDFLAGS = @WITH_POPT_LDFLAGS@
WITH_POPT_LIBS = @WITH_POPT_LIBS@
WITH_POPT_SUBDIR = @WITH_POPT_SUBDIR@
WITH_PYTHONEMBED = @WITH_PYTHONEMBED@
WITH_PYTHON_INCDIR = @WITH_PYTHON_INCDIR@
WITH_PYTHON_SUBDIR = @WITH_PYTHON_SUBDIR@
WITH_PYTHON_SUBPACKAGE = @WITH_PYTHON_SUBPACKAGE@
WITH_RC = @WITH_RC@
WITH_RC_CPPFLAGS = @WITH_RC_CPPFLAGS@
WITH_RC_LDFLAGS = @WITH_RC_LDFLAGS@
WITH_RC_LIBS = @WITH_RC_LIBS@
WITH_RC_SUBDIR = @WITH_RC_SUBDIR@
WITH_READLINE = @WITH_READLINE@
WITH_RUBY = @WITH_RUBY@
WITH_RUBY_CPPFLAGS = @WITH_RUBY_CPPFLAGS@
WITH_RUBY_SUBDIR = @WITH_RUBY_SUBDIR@
WITH_RUBY_VENDORARCHDIR = @WITH_RUBY_VENDORARCHDIR@
WITH_SELINUX = @WITH_SELINUX@
WITH_SEMANAGE = @WITH_SEMANAGE@
WITH_SEMANAGE_SEMODULE = @WITH_SEMANAGE_SEMODULE@
WITH_SEPOL = @WITH_SEPOL@
WITH_SPIDERMONKEY_SUBDIR = @WITH_SPIDERMONKEY_SUBDIR@
WITH_SQLITE = @WITH_SQLITE@
WITH_SQLITE_CPPFLAGS = @WITH_SQLITE_CPPFLAGS@
WITH_SQLITE_LDFLAGS = @WITH_SQLITE_LDFLAGS@
WITH_SQLITE_LIBS = @WITH_SQLITE_LIBS@
WITH_SQLITE_SUBDIR = @WITH_SQLITE_SUBDIR@
WITH_SQUIRREL = @WITH_SQUIRREL@
WITH_SUBVERSION = @WITH_SUBVERSION@
WITH_SYCK = @WITH_SYCK@
WITH_SYCK_CPPFLAGS = @WITH_SYCK_CPPFLAGS@
WITH_SYCK_LDFLAGS = @WITH_SYCK_LDFLAGS@
WITH_SYCK_LIBS = @WITH_SYCK_LIBS@
WITH_SYCK_SUBDIR = @WITH_SYCK_SUBDIR@
WITH_TCL = @WITH_TCL@
WITH_TCL_SUBDIR = @WITH_TCL_SUBDIR@
WITH_TOMCRYPT = @WITH_TOMCRYPT@
WITH_TPM = @WITH_TPM@
WITH_UNIXODBC = @WITH_UNIXODBC@
WITH_UUID = @WITH_UUID@
WITH_XAR = @WITH_XAR@
WITH_XAR_CPPFLAGS = @WITH_XAR_CPPFLAGS@
WITH_XAR_LDFLAGS = @WITH_XAR_LDFLAGS@
WITH_XAR_LIBS = @WITH_XAR_LIBS@
WITH_XAR_SUBDIR = @WITH_XAR_SUBDIR@
WITH_XZ = @WITH_XZ@
WITH_XZ_CPPFLAGS = @WITH_XZ_CPPFLAGS@
WITH_XZ_LDFLAGS = @WITH_XZ_LDFLAGS@
WITH_XZ_LIBS = @WITH_XZ_LIBS@
WITH_XZ_SUBDIR = @WITH_XZ_SUBDIR@
WITH_ZLIB = @WITH_ZLIB@
WITH_ZLIB_CPPFLAGS = @WITH_ZLIB_CPPFLAGS@
WITH_ZLIB_LDFLAGS = @WITH_ZLIB_LDFLAGS@
WITH_ZLIB_LIBS = @WITH_ZLIB_LIBS@
WITH_ZLIB_SUBDIR = @WITH_ZLIB_SUBDIR@
XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
YACC = @YACC@
YFLAGS = @YFLAGS@
__BASH = @__BASH@
__BZIP2 = @__BZIP2@
__CAT = @__CAT@
__CHATTR = @__CHATTR@
__CHGRP = @__CHGRP@
__CHGRP_RHF = @__CHGRP_RHF@
__CHMOD = @__CHMOD@
__CHOWN = @__CHOWN@
__CHOWN_RHF = @__CHOWN_RHF@
__CMAKE = @__CMAKE@
__CPIO = @__CPIO@
__CURL = @__CURL@
__CVS = @__CVS@
__DBSQL = @__DBSQL@
__DB_ARCHIVE = @__DB_ARCHIVE@
__DB_CHECKPOINT = @__DB_CHECKPOINT@
__DB_DEADLOCK = @__DB_DEADLOCK@
__DB_DUMP = @__DB_DUMP@
__DB_HOTBACKUP = @__DB_HOTBACKUP@
__DB_LOAD = @__DB_LOAD@
__DB_LOG_VERIFY = @__DB_LOG_VERIFY@
__DB_PRINTLOG = @__DB_PRINTLOG@
__DB_RECOVER = @__DB_RECOVER@
__DB_REPLICATE = @__DB_REPLICATE@
__DB_SQL_CODEGEN = @__DB_SQL_CODEGEN@
__DB_STAT = @__DB_STAT@
__DB_TUNER = @__DB_TUNER@
__DB_UPGRADE = @__DB_UPGRADE@
__DB_VERIFY = @__DB_VERIFY@
__DIFF = @__DIFF@
__DITTO = @__DITTO@
__DOXYGEN = @__DOXYGEN@
__FILE = @__FILE@
__GIT = @__GIT@
__GPG = @__GPG@
__GSR = @__GSR@
__GST_INSPECT = @__GST_INSPECT@
__GZIP = @__GZIP@
__HG = @__HG@
__ID = @__ID@
__ID_U = @__ID_U@
__INSTALL = @__INSTALL@
__INSTALL_INFO = @__INSTALL_INFO@
__LD = @__LD@
__LDCONFIG = @__LDCONFIG@
__LN = @__LN@
__LRZIP = @__LRZIP@
__LSATTR = @__LSATTR@
__LZIP = @__LZIP@
__LZMA = @__LZMA@
__LZOP = @__LZOP@
__MAKE = @__MAKE@
__MKDIR = @__MKDIR@
__MKDIR_P = @__MKDIR_P@
__MODINFO = @__MODINFO@
__MONGO = @__MONGO@
__MV = @__MV@
__NM = @__NM@
__OBJCOPY = @__OBJCOPY@
__OBJDUMP = @__OBJDUMP@
__PATCH = @__PATCH@
__PAX = @__PAX@
__PERL = @__PERL@
__PGP = @__PGP@
__PHP = @__PHP@
__PYTHON = @__PYTHON@
__RM = @__RM@
__RMDIR = @__RMDIR@
__RSH = @__RSH@
__RUBY = @__RUBY@
__SED = @__SED@
__SH = @__SH@
__SQLITE3 = @__SQLITE3@
__SSH = @__SSH@
__STRIP = @__STRIP@
__SVN = @__SVN@
__TAR = @__TAR@
__TCLSH = @__TCLSH@
__UNZIP = @__UNZIP@
__XZ = @__XZ@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
autorelocate_dcolor = @autorelocate_dcolor@
autorelocate_path = @autorelocate_path@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
exeext = @exeext@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
libext = @libext@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@/ja
mkdir_p = @mkdir_p@
objext = @objext@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
pkgpyexecdir = @pkgpyexecdir@
pkgpythondir = @pkgpythondir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
pyexecdir = @pyexecdir@
pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
shlibext = @shlibext@
srcdir = @srcdir@
subdirs = @subdirs@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
testdir = @testdir@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
usrprefix = @usrprefix@
varprefix = @varprefix@
man_MANS = rpm.8 rpm2cpio.8 rpmbuild.8 rpmcache.8 rpmgraph.8
EXTRA_DIST = $(man_MANS)
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/ja/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign doc/ja/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
install-man8: $(man_MANS)
@$(NORMAL_INSTALL)
@list1=''; \
list2='$(man_MANS)'; \
test -n "$(man8dir)" \
&& test -n "`echo $$list1$$list2`" \
|| exit 0; \
echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \
$(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \
{ for i in $$list1; do echo "$$i"; done; \
if test -n "$$list2"; then \
for i in $$list2; do echo "$$i"; done \
| sed -n '/\.8[a-z]*$$/p'; \
fi; \
} | while read p; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; echo "$$p"; \
done | \
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
sed 'N;N;s,\n, ,g' | { \
list=; while read file base inst; do \
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
fi; \
done; \
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
while read files; do \
test -z "$$files" || { \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
done; }
uninstall-man8:
@$(NORMAL_UNINSTALL)
@list=''; test -n "$(man8dir)" || exit 0; \
files=`{ for i in $$list; do echo "$$i"; done; \
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.8[a-z]*$$/p'; \
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir)
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@list='$(MANS)'; if test -n "$$list"; then \
list=`for p in $$list; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
if test -n "$$list" && \
grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
echo " typically \`make maintainer-clean' will remove them" >&2; \
exit 1; \
else :; fi; \
else :; fi
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(MANS)
installdirs:
for dir in "$(DESTDIR)$(man8dir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am: install-man
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-data-hook
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man: install-man8
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-man
uninstall-man: uninstall-man8
.MAKE: install-am install-data-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-data-hook install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-man8 install-pdf install-pdf-am install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
ps ps-am uninstall uninstall-am uninstall-man uninstall-man8
@SET_MAKE@
install-data-hook:
@WITH_PATH_VERSIONED_TRUE@ -for p in $(man_MANS); do \
@WITH_PATH_VERSIONED_TRUE@ case "$$p" in \
@WITH_PATH_VERSIONED_TRUE@ *.1 ) mv $(DESTDIR)$(man1dir)/$${p} \
@WITH_PATH_VERSIONED_TRUE@ `echo "$(DESTDIR)$(man1dir)/$${p}" | sed 's/\.1$$/-$(VERSION).1/'` ;; \
@WITH_PATH_VERSIONED_TRUE@ *.8 ) mv $(DESTDIR)$(man8dir)/$${p} \
@WITH_PATH_VERSIONED_TRUE@ `echo "$(DESTDIR)$(man8dir)/$${p}" | sed 's/\.8$$/-$(VERSION).8/'` ;; \
@WITH_PATH_VERSIONED_TRUE@ esac; \
@WITH_PATH_VERSIONED_TRUE@ done
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

1232
rpm-5.4.9/doc/ja/rpm.8 Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,45 @@
.\" rpm2cpio - Converts Red Hat Package (RPM) to cpio archive
.\"
.\" 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.
.\"
.\" Japanese Version Copyright (C) 2003 System Design and Research
.\" Institute Co.,Ltd. All rights reserved.
.\"
.\" Translated 14 March 2003 by
.\" System Design and Research Institute Co.,Ltd. <info@sdri.co.jp>
.\"
.TH rpm2cpio 8 "11 January 2001" "Red Hat, Inc." "Red Hat Linux"
.SH 名前
rpm2cpio \- RPM (RPM Package Manager)パッケージから cpio アーカイブを
抽出する
.SH 書式
\fBrpm2cpio\fP [filename]
.SH 説明
.B rpm2cpio
は引数で指定される一つの .rpm ファイルを cpio アーカイブ形式に変換し、
標準出力に出力する。
引数に '\-' が指定された場合には、標準入力から rpm を読み込む。
.PP
.br
.B "rpm2cpio rpm-1.1-1.i386.rpm"
.br
.B "rpm2cpio \- < glint-1.0-1.i386.rpm"
.SH 関連項目
.IR rpm (8)
.SH 著者
.nf
Erik Troan <ewt@redhat.com>
.fi

315
rpm-5.4.9/doc/ja/rpmbuild.8 Normal file
View file

@ -0,0 +1,315 @@
.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng <steve@ggi-project.org>.
.\"
.\" 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.
.\"
.\" Japanese Version Copyright (C) 2003 System Design and Research
.\" Institute Co.,Ltd. All rights reserved.
.\"
.\" Translated 14 March 2003 by
.\" System Design and Research Institute Co.,Ltd. <info@sdri.co.jp>
.\"
.TH "RPMBUILD" "8" "09 June 2002" "Red Hat, Inc." "Red Hat Linux"
.SH 名前
rpmbuils \- RPM パッケージのビルド
.SH 書式
.SS パッケージのビルド:
\fBrpmbuild\fR {\fB-ba|-bb|-bp|-bc|-bi|-bl|-bs\fR} [\fBrpmbuild-options\fR] \fB\fISPECFILE\fB\fR\fI ...\fR
\fBrpmbuild\fR {\fB-ta|-tb|-tp|-tc|-ti|-tl|-ts\fR} [\fBrpmbuild-options\fR] \fB\fITARBALL\fB\fR\fI ...\fR
\fBrpmbuild\fR {\fB--rebuild|--recompile\fR} \fB\fISOURCEPKG\fB\fR\fI ...\fR
.SS その他:
\fBrpmbuild\fR \fB--showrc\fR
.SS rpmbuild のオプション
[\fB--buildroot \fIDIRECTORY\fB\fR] [\fB--clean\fR] [\fB--nobuild\fR]
[\fB--rmsource\fR] [\fB--rmspec\fR] [\fB--short-circuit\fR] [\fB--sign\fR]
[\fB--target \fIPLATFORM\fB\fR]
.SH 説明
.B rpmbuild
は、バイナリパッケージとソースパッケージの両方のビルド(作成)に利用される。
.B パッケージ
はファイルのアーカイブと、アーカイブされたファイルの
インストール・アンインストールに使われるメタデータから構成される。
メタデータは補助スクリプト、ファイル属性、
パッケージの説明に関する情報からなる。
.B パッケージ
には 2 種類あり、
インストールするためのソフトウェアをカプセル化するのに使われるバイナリ
パッケージと、バイナリパッケージを作成するのに必要なレシピとソースコード
からなるソースパッケージとがある。
.PP
次の基本モードからいずれか一つを選択しなければならない:
.BR パッケージのビルド "tar アーカイブからのパッケージのビルド"
.BR パッケージの再コンパイル 設定の表示
.SS 一般的なオプション
以下のオプションはすべてのモードで使用可能である。
.TP
.BR \-? ", " \-\-help
使い方を通常よりも詳しく表示する。
.TP
\fB\-\-version\fR
使用中の
.B rpm
のバージョン番号を 1 行で表示する。
.TP
\fB\-\-quiet\fR
表示をできるだけ少なくする。
通常は、エラーメッセージだけが表示される。
.TP
\fB\-v\fR
より多くの情報を表示する。
通常は、ルーチンの進捗メッセージが表示される。
.TP
\fB\-vv\fR
沢山の汚いデバッグ情報を表示する。
.TP
.BI \-\-rcfile " FILELIST"
.B rpm
は、コロン(`:')で区切られた
.I FILELIST
の各ファイルを設定情報として読み込む。
読み込みは
.I FILELIST
に指定された順番で行われる。
.I FILELIST
のデフォルトは
.IR /usr/lib/rpm/rpmrc : /usr/lib/rpm/redhat/rpmrc : ~/.rpmrc
である。
.TP
.BI \-\-pipe " CMD"
.B rpm
コマンドの出力を
.I CMD
へパイプする。
.TP
.BI \-\-dbpath " DIRECTORY"
データベースのパスとして、デフォルトの
.I /var/lib/rpm
ではなく
.I DIRECTORY
を使う。
.TP
.BI \-\-root " DIRECTORY"
.\" motoki: after 以下が will be used for 〜 にかかるのかが不明。
.\" motoki: will be run にだけかかるのだと思いますが・・・
すべての操作において、
.I DIRECTORY
をルートとしたファイルシステムを使う。
つまり、
.I DIRECTORY
内にあるデータベースが依存性のチェックに使用され、
.I DIRECTORY
に chroot(2) した後で、すべてのスクリプト
(例えば、パッケージインストール時の
.B %post
や、パッケージビルド時の
.B %prep
など) が実行される。
.SS ビルドオプション
rpm のビルド・コマンドの一般的な形式は以下の通りである:
.RS 0.2i
.PP
.B rpmbuild
.BI \-b STAGE |\-t STAGE
.RB "[ " rpmbuild\-options " ]"
.I "FILE ..."
.RE
.PP
パッケージのビルドに spec ファイルを使用するのであれば
.B \-b
を、
.B rpmbuild
が spec ファイルを使うために (圧縮されていることもある) tar ファイルの
内部から使用する spec ファイルを探すのであれば
.B \-t
を、それぞれ引数に指定する。
最初の引数の後ろにある、次の文字
.RI ( STAGE )
はビルドとパッケージ化の段階を指定するのに使われ、
以下のいずれかが指定される
(訳注: 以下のものは spec ファイル、すなわち \-b が指定された場合であり、
tar ファイルからビルドする場合は \-ta, \-tb, ... となる)。
.TP
\fB\-ba\fR
(%prep, %build, %install を実行した後に)
バイナリパッケージとソースパッケージをビルドする。
.TP
\fB\-bb\fR
(%prep, %build, %install を実行した後に)
バイナリパッケージをビルドする。
.TP
\fB\-bp\fR
spec ファイルから "%prep" 段階を実行する。
通常、ソースを展開しパッチを適用することを意味する。
.TP
\fB\-bc\fR
(%prep を実行した後に)
spec ファイルから "%build" 段階を実行する。
一般的には "make" と等価である。
.TP
\fB\-bi\fR
(%prep, %build を実行した後に)
spec ファイルから "%install" 段階を実行する。
一般的には "make install" と等価である。
.TP
\fB\-bl\fR
"list check" を実行する。
spec ファイルの "%files" セクションのマクロが展開され、
各ファイルが存在するかの検証をするためのチェックが行われる。
.TP
\fB\-bs\fR
ソースパッケージだけをビルドする。
.PP
さらに、以下のオプションが利用可能である:
.TP
.BI \-\-buildroot " DIRECTORY"
パッケージビルド時に BuildRoot タグを
.I DIRECTORY
ディレクトリに上書きする。
.TP
\fB\-\-clean\fR
パッケージが作成された後にビルドツリーを削除する。
.TP
\fB\-\-nobuild\fR
何のビルドも実行しない。spec ファイルの検査を行う場合に便利である。
.TP
\fB\-\-rmsource\fR
ビルド後にソースを削除する
(単独で使用してもよい。例: "\fBrpmbuild \-\-rmsource foo.spec\fR")。
.TP
\fB\-\-rmspec\fR
ビルド後に spec ファイルを削除する。
(単独で使用してもよい。例: "\fBrpmbuild \-\-rmspec foo.spec\fR")。
.TP
\fB\-\-short\-circuit\fR
指定された段階へ直接すすむ(すなわち、指定された段階までの全ての段階が
飛ばされる)。
.B \-bc
.B \-bi
(訳注:
.B \-tc
.BR \-ti も)
でのみ使用できる。
.TP
\fB\-\-sign\fR
パッケージに GPG 署名を埋め込む。
この署名は、パッケージの出所と完全性を検証するのに用いることができる。
設定の詳細については
.BR rpm (8)
の「GPG 署名」の節を参照のこと。
.TP
.BI \-\-target " PLATFORM"
パッケージビルド時に
.I PLATFORM
.B arch-vendor-os
と解釈し、それに応じてマクロ
.BR %_target ,
.BR %_target_arch ,
.B %_target_os
を設定する。
.SS ビルドと再コンパイルのオプション
rpm を使ってビルドするには、他にも 2 つのやり方がある。
.RS 0.2i
.PP
.BI "rpmbuild \-\-rebuild|\-\-recompile" " SOURCEPKG ..."
.RE
.PP
この方法で起動された場合、
.B rpmbuild
は指定されたソースパッケージをインストールし、
準備、コンパイル、インストールを行う。
さらに、
.B \-\-rebuild
の場合、新たなバイナリパッケージをビルドする。ビルドか完了したら
ビルドディレクトリは
.RB ( \-\-clean
を指定した場合と同様に)削除され、
パッケージのソースと spec ファイルも削除される。
.SS "SHOWRC"
コマンド
.RS .02i
.PP
.B "rpmbuild \-\-showrc"
.RE
.PP
.B rpmbuild
が使う設定ファイル、
.I rpmrc
.I macros
で現在セットされているオプションすべての値を表示する。
.SH ファイル
.SS "rpmrc の設定"
.nf
\fI/usr/lib/rpm/rpmrc\fR
\fI/usr/lib/rpm/redhat/rpmrc\fR
\fI/etc/rpmrc\fR
\fI~/.rpmrc\fR
.fi
.SS マクロの設定
.nf
\fI/usr/lib/rpm/macros\fR
\fI/usr/lib/rpm/redhat/macros\fR
\fI/etc/rpm/macros\fR
\fI~/.rpmmacros\fR
.fi
.SS データベース
.nf
\fI/var/lib/rpm/Basenames\fR
\fI/var/lib/rpm/Conflictname\fR
\fI/var/lib/rpm/Dirnames\fR
\fI/var/lib/rpm/Filemd5s\fR
\fI/var/lib/rpm/Group\fR
\fI/var/lib/rpm/Installtid\fR
\fI/var/lib/rpm/Name\fR
\fI/var/lib/rpm/Packages\fR
\fI/var/lib/rpm/Providename\fR
\fI/var/lib/rpm/Provideversion\fR
\fI/var/lib/rpm/Pubkeys\fR
\fI/var/lib/rpm/Removed\fR
\fI/var/lib/rpm/Requirename\fR
\fI/var/lib/rpm/Requireversion\fR
\fI/var/lib/rpm/Sha1header\fR
\fI/var/lib/rpm/Sigmd5\fR
\fI/var/lib/rpm/Triggername\fR
.fi
.SS 一時ファイル
\fI/var/tmp/rpm*\fR
.SH 関連項目
.BR popt (3),
.BR rpm2cpio (8),
.BR gendiff (1),
.BR rpm (8),
.nf
.UR http://www.rpm.org/
.B http://www.rpm.org/
.UE
.fi
.SH 著者
.nf
Marc Ewing <marc@redhat.com>
Jeff Johnson <jbj@redhat.com>
Erik Troan <ewt@redhat.com>
.fi

153
rpm-5.4.9/doc/ja/rpmcache.8 Normal file
View file

@ -0,0 +1,153 @@
.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng <steve@ggi-project.org>.
.\"
.\" 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.
.\"
.\" Japanese Version Copyright (C) 2003 System Design and Research
.\" Institute Co.,Ltd. All rights reserved.
.\"
.\" Translated 14 March 2003 by
.\" System Design and Research Institute Co.,Ltd. <info@sdri.co.jp>
.\"
.\"WORD: RFE 改善要求 (Request For Enhancement)
.\"
.TH "RPMCACHE" "8" "05 July 2002" "Red Hat, Inc." "Red Hat Linux"
.SH 名前
rpmcache \- RPM パッケージのへッダ情報をキャッシュする
.SH 書式
\fBrpmcache\fR [ \fB\fIPACKAGE_NAME\fB\fR\fI ...\fR ]
.SH 説明
.B rpmcache
はファイルツリーを歩きまわり(リモートの\fBFTP\fRかもしれない)、
.BR glob (7)
の式を使ってパスをフィルタリングし、rpm パッケージのへッダを読み込む。
最新の(すなわち同じパッケージ名のものに対し、
パッケージのエポック・バージョン・リリースを比較し、
それが同じであればビルド日付を使って比較した)パッケージのへッダーが
他のものと重複しなければ、rpm データベースにキャッシュされる。
不明な依存性を解消するパッケージの場所を提案するために、rpm データベースの
キャッシュを利用することができる。
.PP
.B rpmcache
固有のオプションはなく、
.B rpm
関連のツールで共通のオプションだけである。
現時点で何が実装されているかについては、
.B rpmcache
の使用方法のメッセージ(訳注: "rpmcache \-\-help")を参照のこと。
.PP
検索対象のファイルツリーの場所は rpm マクロを使って設定される。
最終的な場所は、独立した 5 つの要素を結合したものである。
.B rpmcache
を設定するのに使用されるマクロ名を以下に示す。
下記の表示順と同じ順番で各要素が結合されて、
検索されるファイルツリーの場所が生成される。
.TP
\fB%_bhpath\fR
"path"レベル。
検索されるファイルツリーのパス(または URL)の先頭部分。
.BR glob (7)
の式はここでは使えない。
.TP
\fB%_bhcoll\fR
"collection" レベル。
\fB%_bhpath\fR のサブディレクトリーにマッチする文字列(または
.BR glob (7)
式)。
.TP
\fB%_bhN\fR
"name" レベル。
\fB%_bhcoll\fR のサブディレクトリーにマッチする文字列(または
.BR glob (7)
式)。
Red Hat ビルドシステム内でのいずれかの特定のパッケージ名にマッチするよ
うな
.BR glob (7)
式を構成するために
.I PACKAGE_NAME
引数が使用される。
ほぼ確実に、Red Hat 以外の人間が使用することはないだろう。
.TP
\fB%_bhVR\fR
"version-release" レベル。
\fB%_bhN\fR のサブディレクトリーにマッチする文字列(または
.BR glob (7)
式)。
.TP
\fB%_bhA\fR
"arch" レベル。
\fB%_bhVR\fR のサブディレクトリーにマッチする文字列(または
.BR glob (7)
式)。
.PP
キャッシュデータベースの場所もまた、以下のマクロを使用して設定される。
.TP
\fB%_cache_dbpath\fR
キャッシュデータベースの場所。デフォルトは
.IR /var/spool/up2date/cache
.PP
キャッシュデータベースのフォーマットは rpm データベースのものと等しく、
コマンドラインの
.B rpm
から利用することができる。
例えば、パッケージのインストールに必要な依存性を満たすパッケージを
提案するためにキャッシュデータベースを利用するには、以下の設定が
.I /etc/rpm/macros
または
.I ~/.rpmmacros
に必要である。
.TP
\fB%_solve_dbpath\fR
依存性を解決する提案のために使用されるデータベースの場所。
.SS Red Hat beehive ツリーのための(最低限の)設定例
訳注: beehive は多分、Red Hat 内部の何らかの名前。
.PP
.nf
%_cache_dbpath /var/spool/up2date/cache
%_solve_dbpath %{_cache_dbpath}
%_bhpath file://localhost/mnt/redhat/beehive/comps/dist
%_bhcoll 7.3
%_bhN @(basesystem|bash|filesystem|glibc-common|glibc|ldconfig|libtermcap|mktemp|setup|termcap)
%_bhVR *
%_bhA @(i[3456]86|noarch)
.fi
.SS Red Hat FTP ツリーのための(最小)設定例
.nf
%_cache_dbpath /var/spool/up2date/cache
%_solve_dbpath %{_cache_dbpath}
%_bhpath ftp://localhost/mnt/dist
%_bhcoll @(7.3|7.2|7.1|7.0|6.2|6.1|6.0|5.2|5.1|5.0)
%_bhN @(%{_arch})
%_bhVR *
%_bhA @(i[3456]86|noarch)
.fi
.SH バグ
rpm-devel パッケージに対するバグ報告や改善要求は、bugzilla
.UR http://bugzilla.redhat.com/
http://bugzilla.redhat.com/
.UE
を使って欲しい。
.SH 関連項目
.BR rpm (8),
.BR glob (7),
.UR http://www.rpm.org/
.B http://www.rpm.org/
.UE
.SH 著者
Jeff Johnson <jbj@redhat.com>

View file

@ -0,0 +1,74 @@
.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng <steve@ggi-project.org>.
.\"
.\" 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.
.\"
.\" Japanese Version Copyright (C) 2003 System Design and Research
.\" Institute Co.,Ltd. All rights reserved.
.\"
.\" Translated 14 March 2003 by
.\" System Design and Research Institute Co.,Ltd. <info@sdri.co.jp>
.\"
.\"WORD: directed graph 有向グラフ
.\"WORD: patrial order 半順序
.\"WORD: topological sort トポロジカル・ソート
.\"
.TH "RPMGRAPH" "8" "30 June 2002" "Red Hat, Inc." "Red Hat Linux"
.SH 名前
rpmgraph \- RPM パッケージの依存グラフの表示
.SH 書式
.B rpmgraph
.I "PACKAGE_FILE ..."
.SH 説明
.B rpmgraph
はパッケージの依存グラフを生成するために
.I PACKAGE_FILE
を使用する。引数
.I PACKAGE_FILE
のそれぞれが読み込まれ、rpm のトランザクションへと追加される。
トランザクションの要素はトポロジカル・ソートを使って半順序関係を持つ。
半順序で順序付けされた要素は標準出力に表示される。
.PP
依存グラフのノードはパッケージ名で、有向グラフの辺は各ノードの親を示す。
親ノードの定義は、パッケージの依存関係を使って半順序関係で順序付けされた
パッケージの最後の先祖である。
これは、与えられたパッケージの親が、そのパッケージの最後の必要条件となる
ことを意味する。
.PP
出力は
.BR dot (1)
の有向グラフフォーマットで、
.B graphviz
パッケージに含まれるグラフエディター
.B dotty
を使って表示したり印刷したりできる。
.B rpmgraph
固有のオプションはなく、
.B rpm
関連ツールで共通のオプションだけである。
現時点で何が実装されているかについては、
.B rpmgraph
の使用方法のメッセージ(訳注: "rpmgraph \-\-help")を参照のこと。
.SH 関連項目
.BR dot "(1), " dotty "(1),"
.UR http://www.graphviz.org/
.B http://www.graphviz.org/
.UE
.SH 著者
Jeff Johnson <jbj@redhat.com>

View file

@ -0,0 +1,21 @@
## Process this file with automake to produce Makefile.in
@SET_MAKE@
man_MANS = rpm.8 rpm2cpio.8
mandir = @mandir@/ko
EXTRA_DIST = $(man_MANS)
install-data-hook:
if WITH_PATH_VERSIONED
-for p in $(man_MANS); do \
case "$$p" in \
*.1 ) mv $(DESTDIR)$(man1dir)/$${p} \
`echo "$(DESTDIR)$(man1dir)/$${p}" | sed 's/\.1$$/-$(VERSION).1/'` ;; \
*.8 ) mv $(DESTDIR)$(man8dir)/$${p} \
`echo "$(DESTDIR)$(man8dir)/$${p}" | sed 's/\.8$$/-$(VERSION).8/'` ;; \
esac; \
done
endif

View file

@ -0,0 +1,820 @@
# Makefile.in generated by automake 1.11.4 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__make_dryrun = \
{ \
am__dry=no; \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
esac; \
test $$am__dry = yes; \
}
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = doc/ko
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
man8dir = $(mandir)/man8
am__installdirs = "$(DESTDIR)$(man8dir)"
NROFF = nroff
MANS = $(man_MANS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILDROOTDIR_MACRO = @BUILDROOTDIR_MACRO@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DBAPI = @DBAPI@
DBLIBOBJS = @DBLIBOBJS@
DBLIBSRCS = @DBLIBSRCS@
DBPATH = @DBPATH@
DBPATH_MACRO = @DBPATH_MACRO@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DISTRO_MACROS = @DISTRO_MACROS@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
FIXPERMS = @FIXPERMS@
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@
GPSEE_MODULES_PATH = @GPSEE_MODULES_PATH@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLLIBS = @INTLLIBS@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LDFLAGS_STATIC = @LDFLAGS_STATIC@
LD_VERSION_SCRIPT_FLAG = @LD_VERSION_SCRIPT_FLAG@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBTOOLIZE = @LIBTOOLIZE@
LIPO = @LIPO@
LN_S = @LN_S@
LOCALEDIR = @LOCALEDIR@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
LT_AGE = @LT_AGE@
LT_CURRENT = @LT_CURRENT@
LT_REVISION = @LT_REVISION@
MACROFILES = @MACROFILES@
MAGIC_MACRO = @MAGIC_MACRO@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
NCPUS_COMMAND = @NCPUS_COMMAND@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPENMP_CFLAGS = @OPENMP_CFLAGS@
OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PERL_INSTALLDIRS = @PERL_INSTALLDIRS@
PERL_URPM_INSTALLDIRS = @PERL_URPM_INSTALLDIRS@
PKGSRCDIR = @PKGSRCDIR@
PKGSRCDIR_MACRO = @PKGSRCDIR_MACRO@
POSUB = @POSUB@
PYTHON = @PYTHON@
PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
PYTHON_PREFIX = @PYTHON_PREFIX@
PYTHON_VERSION = @PYTHON_VERSION@
RANLIB = @RANLIB@
ROOT_GROUP = @ROOT_GROUP@
RPMCANONARCH = @RPMCANONARCH@
RPMCANONCOLOR = @RPMCANONCOLOR@
RPMCANONGNU = @RPMCANONGNU@
RPMCANONOS = @RPMCANONOS@
RPMCANONVENDOR = @RPMCANONVENDOR@
RPMGID = @RPMGID@
RPMGROUP = @RPMGROUP@
RPMLUAFILES = @RPMLUAFILES@
RPMPOPTFILES = @RPMPOPTFILES@
RPMUID = @RPMUID@
RPMUSER = @RPMUSER@
RPM_TIMESTAMP = @RPM_TIMESTAMP@
RPM_VENDOR = @RPM_VENDOR@
RPM_VERSION = @RPM_VERSION@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
SYSCONFIGDIR = @SYSCONFIGDIR@
USE_NLS = @USE_NLS@
USRLIBRPM = @USRLIBRPM@
VERSION = @VERSION@
WITH_ACL = @WITH_ACL@
WITH_APIDOCS = @WITH_APIDOCS@
WITH_APIDOCS_TARGET = @WITH_APIDOCS_TARGET@
WITH_APR = @WITH_APR@
WITH_ATERM = @WITH_ATERM@
WITH_ATTR = @WITH_ATTR@
WITH_AUGEAS = @WITH_AUGEAS@
WITH_AUGEAS_AUGTOOL = @WITH_AUGEAS_AUGTOOL@
WITH_BASH = @WITH_BASH@
WITH_BASH_CPPFLAGS = @WITH_BASH_CPPFLAGS@
WITH_BASH_LDFLAGS = @WITH_BASH_LDFLAGS@
WITH_BASH_LIBS = @WITH_BASH_LIBS@
WITH_BASH_SUBDIR = @WITH_BASH_SUBDIR@
WITH_BEECRYPT = @WITH_BEECRYPT@
WITH_BEECRYPT_CPPFLAGS = @WITH_BEECRYPT_CPPFLAGS@
WITH_BEECRYPT_LDFLAGS = @WITH_BEECRYPT_LDFLAGS@
WITH_BEECRYPT_LIBS = @WITH_BEECRYPT_LIBS@
WITH_BEECRYPT_SUBDIR = @WITH_BEECRYPT_SUBDIR@
WITH_BZIP2 = @WITH_BZIP2@
WITH_CPUINFO = @WITH_CPUINFO@
WITH_CUDF = @WITH_CUDF@
WITH_CUDF_CUDFTOOL = @WITH_CUDF_CUDFTOOL@
WITH_DB = @WITH_DB@
WITH_DBSQL = @WITH_DBSQL@
WITH_DBSQL_CPPFLAGS = @WITH_DBSQL_CPPFLAGS@
WITH_DBSQL_LDFLAGS = @WITH_DBSQL_LDFLAGS@
WITH_DBSQL_LIBS = @WITH_DBSQL_LIBS@
WITH_DBSQL_SUBDIR = @WITH_DBSQL_SUBDIR@
WITH_DB_CPPFLAGS = @WITH_DB_CPPFLAGS@
WITH_DB_LDFLAGS = @WITH_DB_LDFLAGS@
WITH_DB_LIBS = @WITH_DB_LIBS@
WITH_DB_SUBDIR = @WITH_DB_SUBDIR@
WITH_DMALLOC = @WITH_DMALLOC@
WITH_EFENCE = @WITH_EFENCE@
WITH_EXPAT = @WITH_EXPAT@
WITH_FICL = @WITH_FICL@
WITH_FICL_CPPFLAGS = @WITH_FICL_CPPFLAGS@
WITH_FICL_LDFLAGS = @WITH_FICL_LDFLAGS@
WITH_FICL_LIBS = @WITH_FICL_LIBS@
WITH_FICL_SUBDIR = @WITH_FICL_SUBDIR@
WITH_FILE = @WITH_FILE@
WITH_FILE_CPPFLAGS = @WITH_FILE_CPPFLAGS@
WITH_FILE_LDFLAGS = @WITH_FILE_LDFLAGS@
WITH_FILE_LIBS = @WITH_FILE_LIBS@
WITH_FILE_SUBDIR = @WITH_FILE_SUBDIR@
WITH_GCRYPT = @WITH_GCRYPT@
WITH_GNUTLS = @WITH_GNUTLS@
WITH_GPSEE = @WITH_GPSEE@
WITH_GPSEE_CPPFLAGS = @WITH_GPSEE_CPPFLAGS@
WITH_GPSEE_LDFLAGS = @WITH_GPSEE_LDFLAGS@
WITH_GPSEE_LIBS = @WITH_GPSEE_LIBS@
WITH_GPSEE_SUBDIR = @WITH_GPSEE_SUBDIR@
WITH_JS_SUBDIR = @WITH_JS_SUBDIR@
WITH_KEYUTILS = @WITH_KEYUTILS@
WITH_KEYUTILS_RPMKEY = @WITH_KEYUTILS_RPMKEY@
WITH_LIBELF_DEBUGEDIT = @WITH_LIBELF_DEBUGEDIT@
WITH_LIBGIT2 = @WITH_LIBGIT2@
WITH_LIBGIT2_CPPFLAGS = @WITH_LIBGIT2_CPPFLAGS@
WITH_LIBGIT2_LDFLAGS = @WITH_LIBGIT2_LDFLAGS@
WITH_LIBGIT2_LIBS = @WITH_LIBGIT2_LIBS@
WITH_LIBGIT2_SUBDIR = @WITH_LIBGIT2_SUBDIR@
WITH_LIBTASN1 = @WITH_LIBTASN1@
WITH_LUA = @WITH_LUA@
WITH_LUA_CPPFLAGS = @WITH_LUA_CPPFLAGS@
WITH_LUA_LDFLAGS = @WITH_LUA_LDFLAGS@
WITH_LUA_LIBS = @WITH_LUA_LIBS@
WITH_LUA_SUBDIR = @WITH_LUA_SUBDIR@
WITH_LUA_SUBDIR_DEF = @WITH_LUA_SUBDIR_DEF@
WITH_LUA_SUBDIR_LIB = @WITH_LUA_SUBDIR_LIB@
WITH_MOZJS185 = @WITH_MOZJS185@
WITH_MOZJS185_CPPFLAGS = @WITH_MOZJS185_CPPFLAGS@
WITH_MOZJS185_LDFLAGS = @WITH_MOZJS185_LDFLAGS@
WITH_MOZJS185_LIBS = @WITH_MOZJS185_LIBS@
WITH_MOZJS185_SUBDIR = @WITH_MOZJS185_SUBDIR@
WITH_NEON = @WITH_NEON@
WITH_NEON_CPPFLAGS = @WITH_NEON_CPPFLAGS@
WITH_NEON_LDFLAGS = @WITH_NEON_LDFLAGS@
WITH_NEON_LIBS = @WITH_NEON_LIBS@
WITH_NEON_SUBDIR = @WITH_NEON_SUBDIR@
WITH_NIX = @WITH_NIX@
WITH_NSS = @WITH_NSS@
WITH_OPENSSL = @WITH_OPENSSL@
WITH_PAKCHOIS = @WITH_PAKCHOIS@
WITH_PATH_VERSIONED = @WITH_PATH_VERSIONED@
WITH_PATH_VERSIONED_SUFFIX = @WITH_PATH_VERSIONED_SUFFIX@
WITH_PCRE = @WITH_PCRE@
WITH_PCRE_CPPFLAGS = @WITH_PCRE_CPPFLAGS@
WITH_PCRE_LDFLAGS = @WITH_PCRE_LDFLAGS@
WITH_PCRE_LIBS = @WITH_PCRE_LIBS@
WITH_PCRE_SUBDIR = @WITH_PCRE_SUBDIR@
WITH_PERLEMBED = @WITH_PERLEMBED@
WITH_PERL_LIBS = @WITH_PERL_LIBS@
WITH_PERL_SUBDIR = @WITH_PERL_SUBDIR@
WITH_PERL_SUBPACKAGE = @WITH_PERL_SUBPACKAGE@
WITH_PERL_URPM_LIBS = @WITH_PERL_URPM_LIBS@
WITH_PERL_URPM_SUBDIR = @WITH_PERL_URPM_SUBDIR@
WITH_PERL_URPM_SUBPACKAGE = @WITH_PERL_URPM_SUBPACKAGE@
WITH_POPT = @WITH_POPT@
WITH_POPT_CPPFLAGS = @WITH_POPT_CPPFLAGS@
WITH_POPT_LDFLAGS = @WITH_POPT_LDFLAGS@
WITH_POPT_LIBS = @WITH_POPT_LIBS@
WITH_POPT_SUBDIR = @WITH_POPT_SUBDIR@
WITH_PYTHONEMBED = @WITH_PYTHONEMBED@
WITH_PYTHON_INCDIR = @WITH_PYTHON_INCDIR@
WITH_PYTHON_SUBDIR = @WITH_PYTHON_SUBDIR@
WITH_PYTHON_SUBPACKAGE = @WITH_PYTHON_SUBPACKAGE@
WITH_RC = @WITH_RC@
WITH_RC_CPPFLAGS = @WITH_RC_CPPFLAGS@
WITH_RC_LDFLAGS = @WITH_RC_LDFLAGS@
WITH_RC_LIBS = @WITH_RC_LIBS@
WITH_RC_SUBDIR = @WITH_RC_SUBDIR@
WITH_READLINE = @WITH_READLINE@
WITH_RUBY = @WITH_RUBY@
WITH_RUBY_CPPFLAGS = @WITH_RUBY_CPPFLAGS@
WITH_RUBY_SUBDIR = @WITH_RUBY_SUBDIR@
WITH_RUBY_VENDORARCHDIR = @WITH_RUBY_VENDORARCHDIR@
WITH_SELINUX = @WITH_SELINUX@
WITH_SEMANAGE = @WITH_SEMANAGE@
WITH_SEMANAGE_SEMODULE = @WITH_SEMANAGE_SEMODULE@
WITH_SEPOL = @WITH_SEPOL@
WITH_SPIDERMONKEY_SUBDIR = @WITH_SPIDERMONKEY_SUBDIR@
WITH_SQLITE = @WITH_SQLITE@
WITH_SQLITE_CPPFLAGS = @WITH_SQLITE_CPPFLAGS@
WITH_SQLITE_LDFLAGS = @WITH_SQLITE_LDFLAGS@
WITH_SQLITE_LIBS = @WITH_SQLITE_LIBS@
WITH_SQLITE_SUBDIR = @WITH_SQLITE_SUBDIR@
WITH_SQUIRREL = @WITH_SQUIRREL@
WITH_SUBVERSION = @WITH_SUBVERSION@
WITH_SYCK = @WITH_SYCK@
WITH_SYCK_CPPFLAGS = @WITH_SYCK_CPPFLAGS@
WITH_SYCK_LDFLAGS = @WITH_SYCK_LDFLAGS@
WITH_SYCK_LIBS = @WITH_SYCK_LIBS@
WITH_SYCK_SUBDIR = @WITH_SYCK_SUBDIR@
WITH_TCL = @WITH_TCL@
WITH_TCL_SUBDIR = @WITH_TCL_SUBDIR@
WITH_TOMCRYPT = @WITH_TOMCRYPT@
WITH_TPM = @WITH_TPM@
WITH_UNIXODBC = @WITH_UNIXODBC@
WITH_UUID = @WITH_UUID@
WITH_XAR = @WITH_XAR@
WITH_XAR_CPPFLAGS = @WITH_XAR_CPPFLAGS@
WITH_XAR_LDFLAGS = @WITH_XAR_LDFLAGS@
WITH_XAR_LIBS = @WITH_XAR_LIBS@
WITH_XAR_SUBDIR = @WITH_XAR_SUBDIR@
WITH_XZ = @WITH_XZ@
WITH_XZ_CPPFLAGS = @WITH_XZ_CPPFLAGS@
WITH_XZ_LDFLAGS = @WITH_XZ_LDFLAGS@
WITH_XZ_LIBS = @WITH_XZ_LIBS@
WITH_XZ_SUBDIR = @WITH_XZ_SUBDIR@
WITH_ZLIB = @WITH_ZLIB@
WITH_ZLIB_CPPFLAGS = @WITH_ZLIB_CPPFLAGS@
WITH_ZLIB_LDFLAGS = @WITH_ZLIB_LDFLAGS@
WITH_ZLIB_LIBS = @WITH_ZLIB_LIBS@
WITH_ZLIB_SUBDIR = @WITH_ZLIB_SUBDIR@
XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
YACC = @YACC@
YFLAGS = @YFLAGS@
__BASH = @__BASH@
__BZIP2 = @__BZIP2@
__CAT = @__CAT@
__CHATTR = @__CHATTR@
__CHGRP = @__CHGRP@
__CHGRP_RHF = @__CHGRP_RHF@
__CHMOD = @__CHMOD@
__CHOWN = @__CHOWN@
__CHOWN_RHF = @__CHOWN_RHF@
__CMAKE = @__CMAKE@
__CPIO = @__CPIO@
__CURL = @__CURL@
__CVS = @__CVS@
__DBSQL = @__DBSQL@
__DB_ARCHIVE = @__DB_ARCHIVE@
__DB_CHECKPOINT = @__DB_CHECKPOINT@
__DB_DEADLOCK = @__DB_DEADLOCK@
__DB_DUMP = @__DB_DUMP@
__DB_HOTBACKUP = @__DB_HOTBACKUP@
__DB_LOAD = @__DB_LOAD@
__DB_LOG_VERIFY = @__DB_LOG_VERIFY@
__DB_PRINTLOG = @__DB_PRINTLOG@
__DB_RECOVER = @__DB_RECOVER@
__DB_REPLICATE = @__DB_REPLICATE@
__DB_SQL_CODEGEN = @__DB_SQL_CODEGEN@
__DB_STAT = @__DB_STAT@
__DB_TUNER = @__DB_TUNER@
__DB_UPGRADE = @__DB_UPGRADE@
__DB_VERIFY = @__DB_VERIFY@
__DIFF = @__DIFF@
__DITTO = @__DITTO@
__DOXYGEN = @__DOXYGEN@
__FILE = @__FILE@
__GIT = @__GIT@
__GPG = @__GPG@
__GSR = @__GSR@
__GST_INSPECT = @__GST_INSPECT@
__GZIP = @__GZIP@
__HG = @__HG@
__ID = @__ID@
__ID_U = @__ID_U@
__INSTALL = @__INSTALL@
__INSTALL_INFO = @__INSTALL_INFO@
__LD = @__LD@
__LDCONFIG = @__LDCONFIG@
__LN = @__LN@
__LRZIP = @__LRZIP@
__LSATTR = @__LSATTR@
__LZIP = @__LZIP@
__LZMA = @__LZMA@
__LZOP = @__LZOP@
__MAKE = @__MAKE@
__MKDIR = @__MKDIR@
__MKDIR_P = @__MKDIR_P@
__MODINFO = @__MODINFO@
__MONGO = @__MONGO@
__MV = @__MV@
__NM = @__NM@
__OBJCOPY = @__OBJCOPY@
__OBJDUMP = @__OBJDUMP@
__PATCH = @__PATCH@
__PAX = @__PAX@
__PERL = @__PERL@
__PGP = @__PGP@
__PHP = @__PHP@
__PYTHON = @__PYTHON@
__RM = @__RM@
__RMDIR = @__RMDIR@
__RSH = @__RSH@
__RUBY = @__RUBY@
__SED = @__SED@
__SH = @__SH@
__SQLITE3 = @__SQLITE3@
__SSH = @__SSH@
__STRIP = @__STRIP@
__SVN = @__SVN@
__TAR = @__TAR@
__TCLSH = @__TCLSH@
__UNZIP = @__UNZIP@
__XZ = @__XZ@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
autorelocate_dcolor = @autorelocate_dcolor@
autorelocate_path = @autorelocate_path@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
exeext = @exeext@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
libext = @libext@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@/ko
mkdir_p = @mkdir_p@
objext = @objext@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
pkgpyexecdir = @pkgpyexecdir@
pkgpythondir = @pkgpythondir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
pyexecdir = @pyexecdir@
pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
shlibext = @shlibext@
srcdir = @srcdir@
subdirs = @subdirs@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
testdir = @testdir@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
usrprefix = @usrprefix@
varprefix = @varprefix@
man_MANS = rpm.8 rpm2cpio.8
EXTRA_DIST = $(man_MANS)
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/ko/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign doc/ko/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
install-man8: $(man_MANS)
@$(NORMAL_INSTALL)
@list1=''; \
list2='$(man_MANS)'; \
test -n "$(man8dir)" \
&& test -n "`echo $$list1$$list2`" \
|| exit 0; \
echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \
$(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \
{ for i in $$list1; do echo "$$i"; done; \
if test -n "$$list2"; then \
for i in $$list2; do echo "$$i"; done \
| sed -n '/\.8[a-z]*$$/p'; \
fi; \
} | while read p; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; echo "$$p"; \
done | \
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
sed 'N;N;s,\n, ,g' | { \
list=; while read file base inst; do \
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
fi; \
done; \
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
while read files; do \
test -z "$$files" || { \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
done; }
uninstall-man8:
@$(NORMAL_UNINSTALL)
@list=''; test -n "$(man8dir)" || exit 0; \
files=`{ for i in $$list; do echo "$$i"; done; \
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.8[a-z]*$$/p'; \
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir)
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@list='$(MANS)'; if test -n "$$list"; then \
list=`for p in $$list; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
if test -n "$$list" && \
grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
echo " typically \`make maintainer-clean' will remove them" >&2; \
exit 1; \
else :; fi; \
else :; fi
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(MANS)
installdirs:
for dir in "$(DESTDIR)$(man8dir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am: install-man
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-data-hook
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man: install-man8
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-man
uninstall-man: uninstall-man8
.MAKE: install-am install-data-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-data-hook install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-man8 install-pdf install-pdf-am install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
ps ps-am uninstall uninstall-am uninstall-man uninstall-man8
@SET_MAKE@
install-data-hook:
@WITH_PATH_VERSIONED_TRUE@ -for p in $(man_MANS); do \
@WITH_PATH_VERSIONED_TRUE@ case "$$p" in \
@WITH_PATH_VERSIONED_TRUE@ *.1 ) mv $(DESTDIR)$(man1dir)/$${p} \
@WITH_PATH_VERSIONED_TRUE@ `echo "$(DESTDIR)$(man1dir)/$${p}" | sed 's/\.1$$/-$(VERSION).1/'` ;; \
@WITH_PATH_VERSIONED_TRUE@ *.8 ) mv $(DESTDIR)$(man8dir)/$${p} \
@WITH_PATH_VERSIONED_TRUE@ `echo "$(DESTDIR)$(man8dir)/$${p}" | sed 's/\.8$$/-$(VERSION).8/'` ;; \
@WITH_PATH_VERSIONED_TRUE@ esac; \
@WITH_PATH_VERSIONED_TRUE@ done
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

Some files were not shown because too many files have changed in this diff Show more