Initial commit

This commit is contained in:
silvan 2011-04-27 21:50:52 +02:00
commit 45aed8c11e
53 changed files with 22929 additions and 0 deletions

6
AUTHORS Normal file
View File

@ -0,0 +1,6 @@
Silvan Calarco <silvan.calarco@mambasoft.it>
- Main Developer and maintainerm packaging and releases
Davide Madrisan <davide.madrisan@gmail.com>
- Porting to rpmlib >= 4.1.0
- Patches, Fixes, Code cleanups

346
COPYING Normal file
View File

@ -0,0 +1,346 @@
NOTE! The GPL below is copyrighted by the Free Software Foundation, but
the instance of code that it refers to (the kde programs) are copyrighted
by the authors who actually wrote it.
---------------------------------------------------------------------------
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, 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 or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
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 give any other recipients of the Program a copy of this License
along with the Program.
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 Program or any portion
of it, thus forming a work based on the Program, 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) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
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 Program, 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 Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) 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; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, 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 executable. However, as a
special exception, the source code 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.
If distribution of executable or 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 counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program 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.
5. 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 Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program 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 to
this License.
7. 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 Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program 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 Program.
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.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program 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.
9. The Free Software Foundation may publish revised and/or new versions
of the 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 Program
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 Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, 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
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "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 PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. 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 PROGRAM 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 PROGRAM (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 PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), 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 Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. 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 program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
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 of the License, 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
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

476
ChangeLog Normal file
View File

@ -0,0 +1,476 @@
Changes in version 1.1.3
Mon Feb 7 2011 Silvan Calarco <silvan.calarco@mambasoft.it>
- fixed a crash evaluating missing versioned requirements by cycling numproviders inside numersions cicle
Changes in version 1.1.2
Fri Jan 7 2011 Silvan Calarco <silvan.calarco@mambasoft.it>
- fixed build requirements warnings in small html indexes (in SRPMS HTML pages it is still broken)
- handleObsoletePackages: the maximum number of providers has been raised from 100 to 256
Changes in version 1.1.1
Wed Dec 31 2010 Silvan Calarco <silvan.calarco@mambasoft.it>
- added checkVersionWithFlags function and use it where a version comparing is needed
Changes in version 1.1.0
Wed Dec 29 2010 Silvan Calarco <silvan.calarco@mambasoft.it>
- ported to rpm 5.2.x (breaks compatibility with 4.4.9)
- created a Require structure in struct header[Source]List which contains require data and resolved requirements
- HTML: add version information for requirements, provides and obsoletes
- check version is specified when evaluating Obsoletes
Changes in version 1.0.7.1
Sat Sep 04 2010 Silvan Calarco <silvan.calarco@mambasoft.it>
- reports: specify package arch in "fails to provide" warning message
Changes in version 1.0.7
Thu Aug 19 2010 Silvan Calarco <silvan.calarco@mambasoft.it>
- reports: added support for per-arch SRPMS index file with links in recent file list
Changes in version 1.0.6
Mon Aug 13 2010 Silvan Calarco <silvan.calarco@mambasoft.it>
- reports: replace alt_repository number with name in srcpkglist add pkglist
Changes in version 1.0.5
Mon Aug 12 2010 Silvan Calarco <silvan.calarco@mambasoft.it>
- reports: add repository tag field in builds-<arch>.sh
Changes in version 1.0.4
Mon Aug 10 2010 Silvan Calarco <silvan.calarco@mambasoft.it>
- genpkglist:
* move out of loop to create list only for default arch
- genhtml:
* moved packages includes under /packages subdir of html_dir
* moved group direcotries under /groups subdir of html_dir with legacy cleanup code
- fix components in smart channel file by adding all archs
- the options --genpkglist and --gensrcpkglist now create multiple-arch files in the repository_dir
instead of printing to standard output
- moved all printed messages to stderr
Changes in version 1.0.3
Mon Aug 09 2010 Silvan Calarco <silvan.calarco@mambasoft.it>
- headerlist.c:
* fix a segmentation fault due to missing source header by skipping binary packages missing source
before allocating requires and other data
Changes in version 1.0.2
Sat Jun 05 2010 Silvan Calarco <silvan.calarco@mambasoft.it>
- report:
* html changelog improvements in look
Changes in version 1.0.1.1
Tue May 13 2010 Silvan Calarco <silvan.calarco@mambasoft.it>
- report:
* fix pkg_list in builds-$arch.sh (list only packages in repository)
Changes in version 1.0.1
Tue May 11 2010 Silvan Calarco <silvan.calarco@mambasoft.it>
- report:
* rename builds-$arch file to builds-$arch.sh
* added builds-$arch file for makefile processing purpose
Changes in version 1.0
Mon May 10 2010 Silvan Calarco <silvan.calarco@mambasoft.it>
- report: fixed sources-$arch file generation; added associations between all provides and their sources
Changes in version 0.9.9.7
Tue Apt 13 2010 Silvan Calarco <silvan.calarco@mambasoft.it>
- report: remove obsoleted entries brom builddeps file as they duplicate the provided list
- report: fixed maintainers statistics
Changes in version 0.9.9.6
Tue Mar 30 2010 Silvan Calarco <silvan.calarco@mambasoft.it>
- reports: added Changelog page creation
- rpmfunction:
* added rpminit function to call rpmReadConfigFiles as required with signed packages
* call rpmTsCreate only once in rpminit instead of everytime getHeader is called
Changes in version 0.9.9.5
Wed Mar 19 2010 Silvan Calarco <silvan.calarco@mambasoft.it>
- changes to provided list management and dependecy resolution to support multiple architectures
Changes in version 0.9.9.4
Wed Mar 17 2010 Silvan Calarco <silvan.calarco@mambasoft.it>
- modify logging messages to be repository limited and to contain repository information
- html pages: added list of parent repositories in repositories index page
Changes in version 0.9.9.3
Tue Mar 16 2010 Silvan Calarco <silvan.calarco@mambasoft.it>
- distromatic.conf:
* repositories are now configured with the PARENT = <tag> directive
* ALT_REPOSITORY_DIR tag removed
- specify package architecture in some console output messages
Changes in version 0.9.9.2
Mon Mar 15 2010 Silvan Calarco <silvan.calarco@mambasoft.it>
- reports:
* fixed arch field for noarch packages in builds-* files
Changes in version 0.9.9.1
Sat Mar 13 2010 Silvan Calarco <silvan.calarco@mambasoft.it>
- added multiple architectures support to statistics
Changes in version 0.9.9
Wed Mar 10 2010 Silvan Calarco <silvan.calarco@mambasoft.it>
- more work on multiple architecture repositories support:
* headerlist is a vector differentiated for each arch
* main html reports and data tables updated for multi arch support
Changes in version 0.9.8.1
Thu Feb 11 2010 Silvan Calarco <silvan.calarco@mambasoft.it>
- completed support for multiple build provides
- added --debug (-d) option and LOG_DEBUG messages support
Changes in version 0.9.8
Tue Feb 09 2010 Silvan Calarco <silvan.calarco@mambasoft.it>
- added support for multiple providers in file tree structure
Changes in version 0.9.7.2
Fri Jan 15 2010 Silvan Calarco <silvan.calarco@mambasoft.it>
- reports:
* added a more advanced support for package warnings
Changes in version 0.9.7.1
Sun Jan 10 2010 Silvan Calarco <silvan.calarco@mambasoft.it>
- reports:
* added creation of global channel file for smart (downloadable and python)
Changes in version 0.9.7
Tue Jan 05 2010 Silvan Calarco <silvan.calarco@mambasoft.it>
- reports:
* better organization for index of packages
* added initial support for apt: url link for package installation from web page
* added creation of Smart Package Manager channel file
Changes in version 0.9.6
Mon Dec 08 2009 Silvan Calarco <silvan.calarco@mambasoft.it>
- reports:
* add stats for maintainers with zero packages but changes
* generate package statistics limited to packages in the given repositories
Changes in version 0.9.5
Mon May 10 2009 Silvan Calarco <silvan.calarco@mambasoft.it>
- gendatatables: add full provides list in deps table
Changes in version 0.9.4.1
Mon Apr 19 2009 Silvan Calarco <silvan.calarco@mambasoft.it>
- fixed a segfault with --genpkglist
Changes in version 0.9.4
Mon Apr 10 2009 Silvan Calarco <silvan.calarco@mambasoft.it>
- switch to flat repository model (e.g. SRPMS.base and RPMS.i586 instead of SRPMS and RPMS/i586)
- genhtml: added spec entry with showfile link
- genhtml: added showfile link to patches
Changes in version 0.9.3
Mon Apr 06 2009 Silvan Calarco <silvan.calarco@mambasoft.it>
- add epoch and release fields in pkglist and srcpkglist
Changes in version 0.9.2
Mon Dec 01 2008 Silvan Calarco <silvan.calarco@mambasoft.it>
- fixed build requirements output in package pages: remove build requirements from source and add to
binary packages
Changes in version 0.9.1
Mon Nov 03 2008 Silvan Calarco <silvan.calarco@mambasoft.it>
- added build requirements management
Changes in version 0.9.0
Wed Oct 20 2008 Silvan Calarco <silvan.calarco@mambasoft.it>
- distromatic.c: consider epoch=0 for requirements with no epoch specified
- headerlist.c: added function getPkgNameFromFile to fix a problem when findSourcePackage is called more than
once
- reports.c: fix deps output when a package is required more than once
- pkglist and srcpkglist: add altrepository information to output
Changes in version 0.8.100
Wed Oct 08 2008 Silvan Calarco <silvan.calarco@mambasoft.it>
- distromatic.c: added support for requirement version check
Changes in version 0.8.99
Wed Oct 08 2008 Silvan Calarco <silvan.calarco@mambasoft.it>
- distromatic.c: fix a segmentation fault on certain arch configurations (sent by Davide Madrisan)
- distromatic.c: make a message disappear in quiet mode
Changes in version 0.8.98
Fri Sep 27 2008 Silvan Calarco <silvan.calarco@mambasoft.it>
- reports.c: add size information in recent files statistics
- reports.c: add year for packages that have a date before current year
- reports.c: add package icon and update package icon to html reports
Changes in version 0.8.97
Fri Sep 05 2008 Silvan Calarco <silvan.calarco@mambasoft.it>
- added support for multiple alternate repositories
- reports.c: display epoch in version if != 0
Changes in version 0.8.96
Fri Sep 05 2008 Silvan Calarco <silvan.calarco@mambasoft.it>
- added support for Epoch in version checking
Changes in version 0.8.95
Thu Jul 24 2008 Silvan Calarco <silvan.calarco@mambasoft.it>
- reports.c: move package statistics on top of recent packages list
- reports.c: added and used cleanHTMLfiles function to cleanup .inc files
before recreating
- removed support for postnuke and rename php dir into html
- reports.c: initial support for warnings management
- make a couple of warning messages more readable
Changes in version 0.8.94
Thu Jul 18 2008 Silvan Calarco <silvan.calarco@mambasoft.it>
- fixed segmentation fault with empty repositories
- fixed segmentation fault in print_contents_subtree
Changes in version 0.8.93
Thu Feb 21 2008 Silvan Calarco <silvan.calarco@mambasoft.it>
- fix another missing include with rpm 4.4.9 for rpmcmpver (rpmfunctions.c)
Changes in version 0.8.92
Thu Feb 21 2008 Silvan Calarco <silvan.calarco@mambasoft.it>
- handle executable() type requirements by skipping them
- fix a missing include with rpm 4.4.9 for function rpmcmpver
Changes in version 0.8.91
Thu Oct 11 2007 Silvan Calarco <silvan.calarco@mambasoft.it>
- configuration: fix parsing for DOWNLOAD_URL variable (don't treat '=' as
a separator for value token)
- configuration: added variable DOWNLOAD_DIR for APT file
Changes in version 0.8.90
Wed Sep 19 2007 Silvan Calarco <silvan.calarco@mambasoft.it>
- reports: remove header line in _recent.inc and _oldest.inc files
- reports: increment to 100 the entries for _oldest.inc
- functions: replace strip_spaces() with strip_separators()
- configuration: the ARCH tag has been replaced with ARCHS and now allows
a list of architectures to be specified
Changes in version 0.8.1
Sun Aug 27 2007 Silvan Calarco <silvan.calarco@mambasoft.it>
- gendatatables: fixed a segfault in printContentsSubtree with filetree
entries without provider
Changes in version 0.8.0
Fri Jul 10 2007 Silvan Calarco <silvan.calarco@mambasoft.it>
- data-tables: put all packages in builds-* file, added alt_repository flag
to determine wheter a package is in the alternate repository or upstream
- reports: print_datatables moved from distromatic.c to reports.c
- file listing implemented as a tree structure (fileTree), changed all internal
code to fit the new structure.
Code is now faster at solving dependencies and uses less memory though it
takes a little longer at creating the file structure
- gendatatables: option --data-tables name changed to --gendatatables
- gendatatables: added creation of contentsfile for each repository
- genhtml: added favicon support
Changes in version 0.7.4
Thu Jul 05 2007 Silvan Calarco <silvan.calarco@mambasoft.it>
- functions: implemented and added the scansdir function that works
like scandir but also performs a file stat() to determine the
file type when readdir() returns DT_UNKNOWN. This makes also
distromatic more portable because external scandir library is no
longer required
- all compilation warnings have been removed by cleaning up/fixing the code
Changes in version 0.7.3
Tue Jul 03 2007 Silvan Calarco <silvan.calarco@mambasoft.it>
- data-tables: added buildtime information in build database script file
- reports: added sources and patches filename in source package page
- getsrcpkglist: added sources filenames in output
- reports: tables use css class pkgpage, removed valign entries
Changes in version 0.7.2
Thu Jun 14 2007 Silvan Calarco <silvan.calarco@mambasoft.it>
- data-tables: fix a wrong series of ; in deps-i586 file
Changes in version 0.7.1
Mon Jun 11 2007 Silvan Calarco <silvan.calarco@mambasoft.it>
- reports: added support for maintainers
- configuration: added maintainers section with aliases configuration
- reports: open new window on external URL links
- operation deps-table obsoleted and renamed to data-tables
- data-tables: added creation of a build database script file
Changes in version 0.7.0
Mon May 21 2007 Silvan Calarco <silvan.calarco@mambasoft.it>
- reports: added support for groups
- reports: add release information in changelog
- configuration: add ARCH tag for specifying default and repository architecture
- reports: fix noarch packages download link
Changes in version 0.6.9
Sat May 19 2007 Silvan Calarco <silvan.calarco@mambasoft.it>
- sources genhtml.* renamed to reports.*
- reports: minor layout fixes to repository HTML index
- reports: added oldest builds report (_oldest.inc)
- reposts: _stats.inc renamed to _recent.inc
Changes in version 0.6.8
Mon Apr 16 2007 Silvan Calarco <silvan.calarco@mambasoft.it>
- add warnings instead of aborting when corrupted package headers are found
Changes in version 0.6.7
Tue Apr 10 2007 Silvan Calarco <silvan.calarco@mambasoft.it>
- make sorting packages by name case unsensitive
- genhtml: add alphabetic anchors in all packages index
Changes in version 0.6.6
Tue Mar 20 2007 Silvan Calarco <silvan.calarco@mambasoft.it>
- fixed a segmentation fault when a source rpm is in a binary repository
- removed YUM .hdr files support
- print warning where non-rpm or non-srpm files are found in repositories
Changes in version 0.6.5
Fri Mar 09 2007 Silvan Calarco <silvan.calarco@mambasoft.it>
- added -c options to allow a non-default configuration specification
- removed obsolete -d option (specify repository dir)
Changes in version 0.6.4
Sun Feb 25 2007 Silvan Calarco <silvan.calarco@mambasoft.it>
- add support for multiple operation during the same execution
- deps-table: add creation of virtual dependencies file
- make global use of snprintf instead of strncpy/strncat
Changes in version 0.6.3
Wed Feb 21 2007 Silvan Calarco <silvan.calarco@mambasoft.it>
- genhtml: add month/day date before package name
- genhtml: rise to 10 the number of packages generated in statistics
- genhtml: minor web page fixes
Changes in version 0.6.2
Thu Feb 09 2007 Silvan Calarco <silvan.calarco@mambasoft.it>
- headerlist.c: error handling code uses errno and the new log function
instead of perror
- move install of distromatic from sbin to bin directory
- code cleanup for may warning messages
- genhtml: remove an extra space in package index pages
Changes in version 0.6.1
Tue Feb 07 2007 Silvan Calarco <silvan.calarco@mambasoft.it>
- fixed a segmentation fault during SRPM scan for deps-table
- cleanup of some warings introduced in 0.6
- added log function with support for filtering repeated messages
Changes in version 0.6
Mon Feb 06 2007 Silvan Calarco <silvan.calarco@mambasoft.it>
- process RPM main and alternate repository at the same time instead of
performing two scans with packages overriding; this fixes some problems in
the providers list
Changes in version 0.5.2
Mon Jan 15 2007 Silvan Calarco <silvan.calarco@mambasoft.it>
- genhtml: fixed a segfault when writing RPM requirements;
- genhtml: add link to provider packages in Requires section
Changes in version 0.5.1
Wed Nov 01 2006 Silvan Calarco <silvan.calarco@mambasoft.it>
- add index support for searches on the requiredList resulting in a much
faster execution
- print program execution time before exiting
Changes in version 0.5
Fri Oct 27 2006 Silvan Calarco <silvan.calarco@mambasoft.it>
- rewritten dependencies handling, now handled by a single list (provideList)
instead of a list for each header
- deps-table: manage multiple providing packages using variables to define
the dependency
- deps-table and genhtml: print unresolved dependencies as 'package(unresolved)'
- genhtml: show multiple providing packages adequately
- new obsoletes handling support, when multiple packages are providing a
provideList element obsoleted packages are checked and removed
- genhtml: add print of package obsoletes list
- fixed _index.inc file creation for with multiple repositories
- genhtml: add group field in packages pages
- distromatic.conf: add per-repository "description" field
- TODO: recursive dependencies resolution doesn't work anymore because it
has to be migrated to use provideList in place of requireList; then
requireList is to be removed
Changes in version 0.4.5
Thu Oct 26 2006 Silvan Calarco <silvan.calarco@mambasoft.it>
- deps-table: now writes table to command line provided file name
- added --quiet option for quiet mode operation on video
Changes in version 0.4.4
Mon Oct 16 2006 Silvan Calarco <silvan.calarco@mambasoft.it>
- genhtml: add rss 2.0 support
a file called recent.rss is created in the distromatic
output dir for the selected (with -t option) (alt)repository
- add URL_ADDRESS and URL_DIR configuration options
- bugfix: remove an incorrect warning about missing SRPM packages when an
alternative repository is being scanned
- genhtml: increment stats packages number from 5 to 6 (TODO: should become
a configuration parameter)
Changes in version 0.4.3
Fri Jul 07 2006 Silvan Calarco <silvan.calarco@mambasoft.it>
- genhtml: add substitution for newlines
- genhtml: apply htmlclean to summary and descrition too
- genhtml: align on top packages field names
- genhtml: added initial support for download link
Changes in version 0.4.2
Thu Jul 06 2006 Silvan Calarco <silvan.calarco@mambasoft.it>
- _stats.inc: fix bug in ordering by build date
- genhtml: perform special entities substitution for full HTML 4.01 compliance
and correct content displaying
- fix inclusion of packages whose name contains a plus ('+') (Apache only fix)
Changes in version 0.4.1
Mon Jul 02 2006 Silvan Calarco <silvan.calarco@mambasoft.it>
- Added support for displaying pages with Apache and SSI module enabled
- _stats.inc: remove a wrong occurence of </font>
- generate W3C HTML 4.01 compliant pages
- added PREFIX_URL in default configuration section to handle differences
between PostNuke and Apache output pages
- fix broken links to main repository packages from alternate repositories
- avoid duplicates packages that are both in main and alternate repositories;
prefer alternate repository package
Changes in version 0.4.0
Sat Jun 10 2006 Davide Madrisan <davide.madrisan(a)qilinux.it>
- Makefile reworked to improve the build system.
- Updated copyright messages in all the source files.
- Added all the missing function prototypes.
- Fixed the gcc warning messages about undeclared glibc functions used in the
source code.
- Source files reindented with `indent -kr -hnl -i5 -lps -nut -psl -sc'.
- Added support for rpmlib >= 4.1.0.
- Added the autotool stuff to automatically generate a configure file.
- Added a check (code stolen from apt) in configure.ac to detect the version of
the rpm tool installed in the system at build time.
- Added a shell script `bootstrap.sh' usefull to create the files needed to
build distromatic from the CVS files.
- Makefile modified to make use of the autodiscovery features provided by the
new configure stript.
- Source files moved to the subdir `src'; header files moved to `src/include'.
PHP files for PostNuke moved to the subdir 'php'.
- Modified a few variable names that shadowed global declarations of glibc
symbols declared in string.h and time.h headers.
- Added the file `AUTHORS'.
- Fixed a segmentation fault error in `headerGetStringEntry()'.
- Fixed the initialization of `arch' using the default architecture to avoid a
flaw in distromatic when finding for local repository directories.
- Added the automake stuff.
- Added in configure.ac a check for GNU libc compatible malloc.
- Command line option parser in distromatic.c rewritten using the POSIX library
function getopt.
- Added the command line options `--help' and `--version'.
- Removed the command `-r' because recursion is automatically set according to
the command selected by the user.
- Cleaned up the code a bit by making some global symbols (mostly function
calls) static. Removed the unused function 'getPackageInfo()'.
- Free the memory allocated by `scandir()' in `headerlist.c' (as shown in the
example code provided by its manual page).
- Fixed a segmentation fault error in `findSourcePackage()' occurring when the
call to `strrchr()' returns a NULL pointer.
- Modified formatting of data printed by `printChangelogSince()' to better
display multiline changelog messages.
- Made better checks for needed header files and libraries in `configure.ac'.
- Created the target `dist-rpm' in the top-level `Makefile.am' makefile: the
- Fixed the algorithm used to parse the configuration file wich caused a
segmentation fault error if the last tag was selected.
--------------------------------------------------------------------------------

36
Makefile.am Normal file
View File

@ -0,0 +1,36 @@
# This file is part of `distromatic', the QiLinux RPM tool for the distribution
# Copyright (C) 2006 by Davide Madrisan <davide.madrisan@gmail.com>
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of version 2 of the GNU General Public License as published by the
# Free Software Foundation.
#
# 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.
# 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.
# auxdir = @ac_aux_dir@
auxdir = config
AUTOMAKE_OPTIONS = 1.8 dist-bzip2 foreign nostdinc no-dist-gzip
ACLOCAL_AMFLAGS = -I $(auxdir)
SUBDIRS = $(auxdir) html src
EXTRA_DIST = AUTHORS COPYING ChangeLog VERSION distromatic.conf
install-data-local:
$(mkdir_p) $(DESTDIR)$(sysconfdir)
$(INSTALL_DATA) $(srcdir)/distromatic.conf $(DESTDIR)${sysconfdir}/distromatic.conf
dist-rpm: dist-bzip2
@rpm_sourcedir=`rpm --eval=%{_sourcedir} 2>/dev/null`;\
[ -d "$$rpm_sourcedir" ] || \
{ echo "directory not found: $$rpm_sourcedir" 1>&2; exit 1; };\
mv -f $(distdir).tar.bz2 $$rpm_sourcedir || exit 1; \
echo "Created tarball \`$$rpm_sourcedir/$(distdir).tar.bz2'."

708
Makefile.in Normal file
View File

@ -0,0 +1,708 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
# This file is part of `distromatic', the QiLinux RPM tool for the distribution
# Copyright (C) 2006 by Davide Madrisan <davide.madrisan@gmail.com>
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of version 2 of the GNU General Public License as published by the
# Free Software Foundation.
#
# 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.
# 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.
VPATH = @srcdir@
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 = .
DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \
ChangeLog
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/VERSION $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/include/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-dvi-recursive install-exec-recursive \
install-html-recursive install-info-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
distdir dist dist-all distcheck
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
{ test ! -d "$(distdir)" \
|| { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr "$(distdir)"; }; }
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
sed_rest='s,^[^/]*/*,,'; \
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
sed_butlast='s,/*[^/]*$$,,'; \
while test -n "$$dir1"; do \
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
if test "$$first" != "."; then \
if test "$$first" = ".."; then \
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
else \
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
if test "$$first2" = "$$first"; then \
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
else \
dir2="../$$dir2"; \
fi; \
dir0="$$dir0"/"$$first"; \
fi; \
fi; \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \
reldir="$$dir2"
GZIP_ENV = --best
DIST_ARCHIVES = $(distdir).tar.bz2
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFAULT_ARCH = @DEFAULT_ARCH@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
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@
RPMLIBS = @RPMLIBS@
RPM_PATH = @RPM_PATH@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
U = @U@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_aux_dir = @ac_aux_dir@
ac_ct_CC = @ac_ct_CC@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
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@
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@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
# auxdir = @ac_aux_dir@
auxdir = config
AUTOMAKE_OPTIONS = 1.8 dist-bzip2 foreign nostdinc no-dist-gzip
ACLOCAL_AMFLAGS = -I $(auxdir)
SUBDIRS = $(auxdir) html src
EXTRA_DIST = AUTHORS COPYING ChangeLog VERSION distromatic.conf
all: all-recursive
.SUFFIXES:
am--refresh:
@:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
$(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: $(am__configure_deps)
$(am__cd) $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
$(RECURSIVE_CLEAN_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
@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
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
dir1=$$subdir; dir2="$(top_distdir)"; \
$(am__relativize); \
new_top_distdir=$$reldir; \
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$new_top_distdir" \
distdir="$$new_distdir" \
am__remove_distdir=: \
am__skip_length_check=: \
am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
done
-test -n "$(am__skip_mode_fix)" \
|| find "$(distdir)" -type d ! -perm -755 \
-exec chmod u+rwx,go+rx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
dist-lzma: distdir
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
$(am__remove_distdir)
dist-xz: distdir
tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
$(am__remove_distdir)
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
dist-shar: distdir
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
$(am__remove_distdir)
dist dist-all: distdir
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lzma*) \
lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/_build
mkdir $(distdir)/_inst
chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
&& chmod -R a-w "$$dc_install_base" \
&& ({ \
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
} || { rm -rf "$$dc_destdir"; exit 1; }) \
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist \
&& rm -rf $(DIST_ARCHIVES) \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
&& cd "$$am__cwd" \
|| exit 1
$(am__remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck:
@$(am__cd) '$(distuninstallcheck_dir)' \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
fi ; \
$(distuninstallcheck_listfiles) ; \
exit 1; } >&2
distcleancheck: distclean
@if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
check: check-recursive
all-am: Makefile
installdirs: installdirs-recursive
installdirs-am:
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
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-recursive
clean-am: clean-generic mostlyclean-am
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
html-am:
info: info-recursive
info-am:
install-data-am: install-data-local
install-dvi: install-dvi-recursive
install-dvi-am:
install-exec-am:
install-html: install-html-recursive
install-html-am:
install-info: install-info-recursive
install-info-am:
install-man:
install-pdf: install-pdf-recursive
install-pdf-am:
install-ps: install-ps-recursive
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am:
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
install-am install-strip tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am am--refresh check check-am clean clean-generic \
ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \
distclean distclean-generic distclean-tags distcleancheck \
distdir distuninstallcheck dvi dvi-am html html-am info \
info-am install install-am install-data install-data-am \
install-data-local 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 installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
install-data-local:
$(mkdir_p) $(DESTDIR)$(sysconfdir)
$(INSTALL_DATA) $(srcdir)/distromatic.conf $(DESTDIR)${sysconfdir}/distromatic.conf
dist-rpm: dist-bzip2
@rpm_sourcedir=`rpm --eval=%{_sourcedir} 2>/dev/null`;\
[ -d "$$rpm_sourcedir" ] || \
{ echo "directory not found: $$rpm_sourcedir" 1>&2; exit 1; };\
mv -f $(distdir).tar.bz2 $$rpm_sourcedir || exit 1; \
echo "Created tarball \`$$rpm_sourcedir/$(distdir).tar.bz2'."
# 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:

4
VERSION Normal file
View File

@ -0,0 +1,4 @@
VERSION = 1.1.3

1012
aclocal.m4 vendored Normal file

File diff suppressed because it is too large Load Diff

18
config/Makefile.am Normal file
View File

@ -0,0 +1,18 @@
# This file is part of `distromatic', the QiLinux RPM tool for the distribution
# Copyright (C) 2006 by Davide Madrisan <davide.madrisan@gmail.com>
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of version 2 of the GNU General Public License as published by the
# Free Software Foundation.
#
# 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.
# 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.
EXTRA_DIST = \
bootstrap.sh config.guess config.sub depcomp install-sh missing

353
config/Makefile.in Normal file
View File

@ -0,0 +1,353 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
# This file is part of `distromatic', the QiLinux RPM tool for the distribution
# Copyright (C) 2006 by Davide Madrisan <davide.madrisan@gmail.com>
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of version 2 of the GNU General Public License as published by the
# Free Software Foundation.
#
# 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.
# 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.
VPATH = @srcdir@
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 = config
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in compile \
config.guess config.sub depcomp install-sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/VERSION $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/include/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFAULT_ARCH = @DEFAULT_ARCH@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
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@
RPMLIBS = @RPMLIBS@
RPM_PATH = @RPM_PATH@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
U = @U@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_aux_dir = @ac_aux_dir@
ac_ct_CC = @ac_ct_CC@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
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@
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@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = \
bootstrap.sh config.guess config.sub depcomp install-sh missing
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(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 config/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign config/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: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
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
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:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
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 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
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am:
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic distclean \
distclean-generic 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 pdf pdf-am ps ps-am uninstall uninstall-am
# 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:

56
config/bootstrap.sh Executable file
View File

@ -0,0 +1,56 @@
#!/bin/bash
# bootstrap.sh -- Use this script to create generated files from the CVS dist
# This file is part of `distromatic', the QiLinux RPM tool for the distribution
# Copyright (C) 2006 by Davide Madrisan <davide.madrisan@gmail.com>
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of version 2 of the GNU General Public License as published by the
# Free Software Foundation.
#
# 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.
# 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.
if expr a : '\(a\)' >/dev/null 2>&1; then
as_expr=expr
else
as_expr=false
fi
if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
as_basename=basename
else
as_basename=false
fi
as_me=`$as_basename "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)$' \| \
: '\(.\)' 2>/dev/null ||
echo X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
/^X\/\(\/\/\)$/{ s//\1/; q; }
/^X\/\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
ac_aux_dir=config
test -f ./$ac_aux_dir/$as_me ||
{ echo "$as_me: error: run me from the package root folder" >&2
{ (exit 1); exit 1; }; }
set -x
aclocal -I $ac_aux_dir || exit 1
autoheader || exit 1
automake --gnu --add-missing --copy -Wobsolete -Woverride || exit 1
autoconf --warnings=all

142
config/compile Executable file
View File

@ -0,0 +1,142 @@
#! /bin/sh
# Wrapper for compilers which do not understand `-c -o'.
scriptversion=2005-05-14.22
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
case $1 in
'')
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
Wrapper for compilers which do not understand `-c -o'.
Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
right script to run: please start by reading the file `INSTALL'.
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "compile $scriptversion"
exit $?
;;
esac
ofile=
cfile=
eat=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as `compile cc -o foo foo.c'.
# So we strip `-o arg' only if arg is an object.
eat=1
case $2 in
*.o | *.obj)
ofile=$2
;;
*)
set x "$@" -o "$2"
shift
;;
esac
;;
*.c)
cfile=$1
set x "$@" "$1"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -z "$ofile" || test -z "$cfile"; then
# If no `-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# `.c' file was seen then we are probably linking. That is also
# ok.
exec "$@"
fi
# Name of file we expect compiler to create.
cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
# Create the lock directory.
# Note: use `[/.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
while true; do
if mkdir "$lockdir" >/dev/null 2>&1; then
break
fi
sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir '$lockdir'; exit 1" 1 2 15
# Run the compile.
"$@"
ret=$?
if test -f "$cofile"; then
mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
mv "${cofile}bj" "$ofile"
fi
rmdir "$lockdir"
exit $ret
# 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-end: "$"
# End:

1400
config/config.guess vendored Executable file

File diff suppressed because it is too large Load Diff

1469
config/config.sub vendored Executable file

File diff suppressed because it is too large Load Diff

530
config/depcomp Executable file
View File

@ -0,0 +1,530 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2005-07-09.11
# Copyright (C) 1999, 2000, 2003, 2004, 2005 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, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# 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 outputing dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "depcomp $scriptversion"
exit $?
;;
esac
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
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.
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
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 ' ' '
' < "$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.
## 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"
;;
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 ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
' ' ' >> $depfile
echo >> $depfile
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$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"
;;
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.
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
tmpdepfile="$stripped.u"
if test "$libtool" = yes; then
"$@" -Wc,-M
else
"$@" -M
fi
stat=$?
if test -f "$tmpdepfile"; then :
else
stripped=`echo "$stripped" | sed 's,^.*/,,'`
tmpdepfile="$stripped.u"
fi
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
if test -f "$tmpdepfile"; then
outname="$stripped.o"
# 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,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
sed -e "s,^$outname: \(.*\)$,\1:," < "$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 understands `-MD -MF file'. However on
# icc -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 ... \
# ...
"$@" -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 "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
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 mecanism 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 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"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
#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 $1 != '--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:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
' < "$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 $1 != '--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
cleared=no
for arg in "$@"; do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
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.
-*|$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"
cat < "$tmpdepfile" > "$depfile"
sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \
## 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 $1 != '--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, regardless of -o,
# because we must use -o when running libtool.
"$@" || exit $?
IFS=" "
for arg
do
case "$arg" in
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
shift
;;
*)
set fnord "$@" "$arg"
shift
shift
;;
esac
done
"$@" -E |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
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-end: "$"
# End:

276
config/install-sh Executable file
View File

@ -0,0 +1,276 @@
#!/bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5 (mit/util/scripts/install.sh).
#
# Copyright 1991 by the Massachusetts Institute of Technology
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in advertising or
# publicity pertaining to distribution of the software without specific,
# written prior permission. M.I.T. makes no representations about the
# suitability of this software for any purpose. It is provided "as is"
# without express or implied warranty.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd=$cpprog
shift
continue;;
-d) dir_arg=true
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd=$stripprog
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "$0: no input file specified" >&2
exit 1
else
:
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d "$dst" ]; then
instcmd=:
chmodcmd=""
else
instcmd=$mkdirprog
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f "$src" ] || [ -d "$src" ]
then
:
else
echo "$0: $src does not exist" >&2
exit 1
fi
if [ x"$dst" = x ]
then
echo "$0: no destination specified" >&2
exit 1
else
:
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d "$dst" ]
then
dst=$dst/`basename "$src"`
else
:
fi
fi
## this sed command emulates the dirname command
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-$defaultIFS}"
oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS=$oIFS
pathcomp=''
while [ $# -ne 0 ] ; do
pathcomp=$pathcomp$1
shift
if [ ! -d "$pathcomp" ] ;
then
$mkdirprog "$pathcomp"
else
:
fi
pathcomp=$pathcomp/
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd "$dst" &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
else
# If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ]
then
dstfile=`basename "$dst"`
else
dstfile=`basename "$dst" $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
then
dstfile=`basename "$dst"`
else
:
fi
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/#inst.$$#
rmtmp=$dstdir/#rm.$$#
# Trap to clean up temp files at exit.
trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
# Move or copy the file name to the temp name
$doit $instcmd "$src" "$dsttmp" &&
# and set any options; do chmod last to preserve setuid bits
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
# Now remove or move aside any old file at destination location. We try this
# two ways since rm can't unlink itself on some systems and the destination
# file might be busy for other reasons. In this case, the final cleanup
# might fail but the new file should still install successfully.
{
if [ -f "$dstdir/$dstfile" ]
then
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
$doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
{
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
(exit 1); exit
}
else
:
fi
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
fi &&
# The final little trick to "correctly" pass the exit status to the exit trap.
{
(exit 0); exit
}

336
config/missing Executable file
View File

@ -0,0 +1,336 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
if test $# -eq 0; then
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
fi
run=:
# In the cases where this matters, `missing' is being run in the
# srcdir already.
if test -f configure.ac; then
configure_ac=configure.ac
else
configure_ac=configure.in
fi
case "$1" in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
--run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing 0.4 - GNU automake"
;;
-*)
echo 1>&2 "$0: Unknown \`$1' option"
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
;;
aclocal*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
case "$f" in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
esac
done
touch $touch_files
;;
automake*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |
sed 's/\.am$/.in/' |
while read f; do touch "$f"; done
;;
autom4te)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is needed, and you do not seem to have it handy on your
system. You might have modified some files without having the
proper tools for further handling them.
You can get \`$1Help2man' as part of \`Autoconf' from any GNU
archive site."
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo "#! /bin/sh"
echo "# Created by GNU Automake missing as a replacement of"
echo "# $ $@"
echo "exit 0"
chmod +x $file
exit 1
fi
;;
bison|yacc)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if [ ! -f y.tab.h ]; then
echo >y.tab.h
fi
if [ ! -f y.tab.c ]; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
lex|flex)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if [ ! -f lex.yy.c ]; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
help2man)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
fi
if [ -f "$file" ]; then
touch $file
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
exit 1
fi
;;
makeinfo)
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
# We have makeinfo, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
fi
touch $file
;;
tar)
shift
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
fi
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
# messages.
if (gnutar --version > /dev/null 2>&1); then
gnutar "$@" && exit 0
fi
if (gtar --version > /dev/null 2>&1); then
gtar "$@" && exit 0
fi
firstarg="$1"
if shift; then
case "$firstarg" in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
case "$firstarg" in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
;;
esac
fi
echo 1>&2 "\
WARNING: I can't seem to be able to run \`tar' with the given arguments.
You may want to install GNU tar or Free paxutils, or check the
command line arguments."
exit 1
;;
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and you do not seem to have it handy on your
system. You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequirements for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
;;
esac
exit 0

7000
configure vendored Executable file

File diff suppressed because it is too large Load Diff

253
configure.ac Normal file
View File

@ -0,0 +1,253 @@
dnl QiLinux RPM tool for the distribution
dnl
dnl Copyright 2006 (C) Davide Madrisan <davide.madrisan@gmail.com>
dnl Copyright 2007 (C) Silvan Calarco <silvan.calarco@mambasoft.it>
dnl
dnl This program is free software; you can redistribute it and/or modify it under
dnl the terms of version 2 of the GNU General Public License as published by the
dnl Free Software Foundation.
dnl
dnl This program is distributed in the hope that it will be useful, but WITHOUT
dnl ANY WARRANTY, to the extent permitted by law; without even the implied
dnl warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
dnl See the GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License along with
dnl this program; if not, write to the Free Software Foundation, Inc.,
dnl 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
dnl Process this file with autoconf to produce a configure script.
dnl Initialization
dnl ------------------------------------------------------------
m4_define(PROG_NAME, [distromatic])
m4_define(PROG_BUGREPORT, [silvan.calarco@mambasoft.it])
m4_define(PROG_VERSION,dnl
regexp(m4_include(VERSION),[.*=[ \t]*\([.0-9A-Za-z]+\)],[\1]))
AC_PREREQ(2.59)
AC_INIT([PROG_NAME],[PROG_VERSION],[PROG_BUGREPORT],[PROG_NAME])
AC_CONFIG_SRCDIR(src/distromatic.c)
AC_CONFIG_HEADERS(src/include/config.h:src/include/config.h.in)
AC_COPYRIGHT(dnl
[Copyright 2006 by Davide Madrisan <davide.madrisan@gmail.com>
])
dnl set `ac_aux_dir' = 'config'
dnl ------------------------------------------------------------
AC_CONFIG_AUX_DIR(config)
AC_SUBST(ac_aux_dir)
dnl Just to display the version number of this program
dnl ------------------------------------------------------------
AC_MSG_CHECKING([for PROG_NAME version])
AC_MSG_RESULT([PROG_VERSION])
dnl Set and display default target architecture
dnl ------------------------------------------------------------
AC_MSG_CHECKING([for the default target architecture])
DEFAULT_ARCH="i586"
AC_SUBST(DEFAULT_ARCH)
AC_MSG_RESULT([$DEFAULT_ARCH])
dnl Compute the canonical build-system type variable, `build' and
dnl its three individual parts `build_cpu', `build_vendor', `build_os'
dnl ------------------------------------------------------------
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE([1.7 foreign dist-bzip2 nostdinc])
AC_REVISION($Revision: 1.4 $)
dnl Determine a C compiler to use. Define `CFLAGS', `EXEEXT', `OBJEXT'
dnl Define `CFLAGS' to `-g -O2' for the GNU C compiler, or `-g' for
dnl other compilers.
dnl If the C compiler is not in ANSI C mode by default, try to add an
dnl option to output variable `CC' to make it so.
dnl ------------------------------------------------------------
AC_PROG_CC
if test "x$ac_cv_prog_cc_stdc" = xno; then
AC_MSG_ERROR([$CC is not an ANSI C compiler.])
fi
AM_PROG_CC_C_O
AC_ISC_POSIX
#AC_PROG_GCC_TRADITIONAL
#CFLAGS+=-O1
SUPPORTED_CFLAGS=
dnl cc_TRY_CFLAGS (CFLAGS, [ACTION-IF-WORKS], [ACTION-IF-FAILS])
dnl ------------------------------------------------------------
dnl Checks if $CC supports a given set of CFLAGS.
dnl If supported, the current CFLAGS is appended to SUPPORTED_CFLAGS
AC_DEFUN([cc_TRY_CFLAGS],
[AC_MSG_CHECKING([whether compiler accepts $1])
ac_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $1"
AC_COMPILE_IFELSE(
[[int x;]],
[ac_cv_try_cflags_ok=yes
SUPPORTED_CFLAGS="$SUPPORTED_CFLAGS $1"],
[ac_cv_try_cflags_ok=no])
CFLAGS="$ac_save_CFLAGS"
AC_MSG_RESULT([$ac_cv_try_cflags_ok])
if test x"$ac_cv_try_cflags_ok" = x"yes"; then
ifelse([$2],[],[:],[$2])
else
ifelse([$3],[],[:],[$3])
fi
])[]dnl @end [cc_TRY_CFLAGS]
cc_TRY_CFLAGS([-Wall])
cc_TRY_CFLAGS([-W])
cc_TRY_CFLAGS([-Wmissing-prototypes])
cc_TRY_CFLAGS([-Wstrict-prototypes])
cc_TRY_CFLAGS([-Wshadow])
#cc_TRY_CFLAGS([-Wunreachable-code])
AC_SUBST([CFLAGS], ["$CFLAGS $SUPPORTED_CFLAGS"])
dnl Check to see if function prototypes are understood by the compiler.
dnl This test must precede tests of compiler characteristics like that
dnl for the inline keyword, since it may change the degree to which the
dnl compiler supports such features.
dnl ------------------------------------------------------------
AM_C_PROTOTYPES
dnl Check if C the compiler does not fully support the ANSI C qualifier
dnl `const'.
dnl ------------------------------------------------------------
AC_C_CONST
AC_LANG([C])
dnl Define `WORDS_BIGENDIAN' if a big-endian architecture is found
dnl AC_C_BIGENDIAN ([ACTION-IF-TRUE], [ACTION-IF-FALSE], [ACTION-IF-UNKNOWN])
dnl The default for ACTION-IF-TRUE is to define `WORDS_BIGENDIAN'.
dnl The default for ACTION-IF-FALSE is to do nothing.
dnl And finally, the default for ACTION-IF-UNKNOWN is to abort configure and tell
dnl the installer which variable he should preset to bypass this test.
dnl ------------------------------------------------------------
AC_C_BIGENDIAN
dnl Check for standard header files
dnl ------------------------------------------------------------
AC_HEADER_STDC
AC_HEADER_TIME
dnl Check for library functions for portability issues
dnl ------------------------------------------------------------
AC_CHECK_DECLS([getopt])
dnl If the `malloc' works correctly (`malloc (0)' returns a valid pointer),
dnl define `HAVE_MALLOC'
AC_CHECK_FUNCS([memcpy strchr])
AC_FUNC_MALLOC
dnl Check for needed header files, libraries and tools
dnl ------------------------------------------------------------
AC_CHECK_HEADERS(dirent.h ndir.h sys/ndir.h, break)
AC_CHECK_HEADERS(errno.h)
dnl Check for zlib library and header files
AC_CHECK_HEADER([zlib.h],
AC_DEFINE(HAVE_ZLIB_H,1,
[Define to 1 if you have the <zlib.h> header file.]),
[AC_MSG_ERROR([Can't find zlib.h in your system])])
AC_CHECK_LIB(z,gzopen, [ZLIB="-lz"],
[AC_MSG_ERROR([Can't find libz library in your system])])
LIBS="$LIBS $ZLIB"
dnl Check for rpm tool and needed libraries
AC_PATH_PROG(RPM_PATH,rpm,none)
if test "$RPM_PATH" = "none"; then
AC_MSG_ERROR([RPM executable was not found in your system])
else
AC_DEFINE_UNQUOTED([HAVE_RPM],1,[Define if RPM backend is available])
dnl Check for RPM version
AC_MSG_CHECKING(for RPM version)
RPM_VERSION_RAW=`LANG= LC_ALL= $RPM_PATH --version | sed 's/^.* //'`
RPM_VERSION_MAJOR=`echo $RPM_VERSION_RAW | cut -d. -f1`
RPM_VERSION_MINOR=`echo $RPM_VERSION_RAW | cut -d. -f2`
RPM_VERSION_MICRO=`echo $RPM_VERSION_RAW | cut -d. -f3`
if test -z "$RPM_VERSION_MAJOR" -o -z "$RPM_VERSION_MINOR"; then
AC_MSG_ERROR([can't parse RPM version])
fi
if test -z "$RPM_VERSION_MICRO"; then
RPM_VERSION_MICRO=0
fi
AC_DEFINE_UNQUOTED([RPM_VERSION_MAJOR],$RPM_VERSION_MAJOR,[RPM major version])
AC_DEFINE_UNQUOTED([RPM_VERSION_MINOR],$RPM_VERSION_MINOR,[RPM minor version])
AC_DEFINE_UNQUOTED([RPM_VERSION_MICRO],$RPM_VERSION_MICRO,[RPM micro version])
AC_DEFINE_UNQUOTED([RPM_VERSION],
[((RPM_VERSION_MAJOR<<16)|(RPM_VERSION_MINOR<<8)|RPM_VERSION_MICRO)],
[Define to the RPM version])
AC_DEFINE_UNQUOTED([RPM_VERSION_RAW],"$RPM_VERSION_RAW",[RPM raw version])
AC_MSG_RESULT($RPM_VERSION_RAW)
dnl Check for RPM libraries and headers
AC_CHECK_LIB(bz2,BZ2_bzopen, [],
[AC_MSG_ERROR([Can't find libbz2 library in your system])])
AC_CHECK_LIB(z,gzopen, [],
[AC_MSG_ERROR([Can't find libz library in your system])])
AC_CHECK_HEADERS(db1/db.h)
CPPFLAGS="$CPPFLAGS -I/usr/include/rpm"
AC_CHECK_HEADER(rpm/rpmlib.h, [],
[AC_MSG_ERROR([Can't find rpmlib.h in your system])])
if test $RPM_VERSION_MAJOR -lt 4; then
RPMLIBS="-lrpm -lz -lbz2 -lpopt"
else
AC_CHECK_LIB(rpmdb,rpmdbOpen,
[RPMDBLIBS="-lrpmdb"],
[RPMDBLIBS="-ldb-3.1"],
[-lrpm -lrpmio -lz -lbz2 -lpopt])
RPMLIBS="-lrpm $RPMDBLIBS -lrpmio -lz -lbz2 -lpopt"
fi
AC_MSG_CHECKING(for RPM libraries)
AC_MSG_RESULT($RPMLIBS)
AC_SUBST(RPMLIBS)
fi
LIBS="$LIBS $RPMLIBS"
dnl Check for libiberty' library and header files
AC_CHECK_HEADERS([libiberty.h], [],
[AC_MSG_ERROR([Can't find libiberty.h in your system,]
[check http://www.gnu.org/software/binutils/binutils.html for libiberty])])
AC_CHECK_LIB(iberty, freeargv,
[LIBS="$LIBS -liberty /usr/lib/libiberty.a"
AC_DEFINE(HAVE_LIBIBERTY,1,
[Define to 1 if you have the `libiberty' library (-liberty).])],
[AC_MSG_ERROR([Can't find libiberty in your system,]
[check http://www.gnu.org/software/binutils/binutils.html for libiberty])])
dnl Set the default `prefix' variable to `/usr'
dnl ------------------------------------------------------------
#AC_PREFIX_DEFAULT([/usr])
dnl Generate the output files
dnl ------------------------------------------------------------
AC_CONFIG_FILES([Makefile]
[config/Makefile]
[html/Makefile]
[html/index.php]
[html/index.postnuke.php]
[html/index.html]
[src/Makefile]
[src/include/Makefile]
[src/include/globaldefs.h]
[src/missing/Makefile])
AC_OUTPUT
cat <<_EOF
Good - your configure finished. Start make now.
_EOF
dnl configure.ac ends here

62
distromatic.conf Normal file
View File

@ -0,0 +1,62 @@
#
# Sample configuration file for distromatic
#
# Copyright (c) 2004-2007 by Silvan Calarco <silvan.calarco@mambasoft.it>
# Copyright (c) 2006 by Davide Madrisan <davide.madrisan@gmail.com>
#[defaults]
#HTML_BASEDIR = /var/www/html/distromatic/
#DISTRIBUTION_NAME = openmamba
#
# URL_ADDRESS:
# the website address eg.:
# URL_ADDRESS="www.openmamba.org"
#
#URL_ADDRESS="www.openmamba.org"
#
# URL_PREFIX:
# a prefix string to be appended before any internal link
# for PostNuke you can just uncomment the following:
#
# URL_PREFIX="<? echo($BASEURL) ?>&amp;"
#
# for Apache with SSI use the following:
URL_PREFIX="/distromatic/index.html?"
#
# URL_DIR:
# the directory to be used to reach distromatic HTML dir from outside
# e.g.
# URL_DIR="/pub/openmambadistromatic"
#
#
# ARCHS:
# the list of architectures to consider by default for repository
# (default: ARCHS=i586)
#
#ARCHS = i586
#[maintainers]
# put maintainer list with aliases here
#silvan="Silvan Calarco <silvan.calarco@mambasoft.it>" "Silvan <silvan@example.com>"
#[devel]
#DESCRIPTION = "openmamba development repository"
#REPOSITORY_DIR = /var/ftp/pub/openmamba/devel/
#DOWNLOAD_PREFIX="http://www.example.org/pub/openmamba/devel/"
#ARCHS = i586 ppc
#[devel-contrib]
#DESCRIPTION = "openmamba development contributions"
#REPOSITORY_DIR = /var/ftp/pub/openmamnba/devel/
#ALT_REPOSITORY_DIR = /var/ftp/pub/openmamba/devel-contrib/
#DOWNLOAD_PREFIX = "http://www.example.org/pub/openmamba/devel-contrib/"
#ARCHS = i586
#[stable/1.0]
#DESCRIPTION = "openmamba 1.0 stable repository"
#REPOSITORY_DIR = /var/ftp/pub/openmamba/stable/1.0/
#[stable/1.0/updates]
#DESCRIPTION = "openmamba 1.0 updates repository"
#REPOSITORY_DIR = /var/ftp/pub/openmamba/stable/1.0/
#ALT_REPOSITORY_DIR = /var/ftp/pub/openmamba/stable/1.0/updates/

11
html/Makefile.am Normal file
View File

@ -0,0 +1,11 @@
EXTRA_DIST = index.php.in index.postnuke.php.in index.html.in feed-icon.png warning-icon.png pkg.png pkgup.png
htmldir = $(localstatedir)/www/html
install-data-local:
$(mkdir_p) $(DESTDIR)$(htmldir)/distromatic
$(INSTALL_DATA) $(srcdir)/index.html $(DESTDIR)${htmldir}/distromatic/index.html
$(INSTALL_DATA) $(srcdir)/feed-icon.png $(DESTDIR)${htmldir}/distromatic/feed-icon.png
$(INSTALL_DATA) $(srcdir)/warning-icon.png $(DESTDIR)${htmldir}/distromatic/warning-icon.png
$(INSTALL_DATA) $(srcdir)/pkg.png $(DESTDIR)${htmldir}/distromatic/pkg.png
$(INSTALL_DATA) $(srcdir)/pkgup.png $(DESTDIR)${htmldir}/distromatic/pkgup.png

351
html/Makefile.in Normal file
View File

@ -0,0 +1,351 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
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 = html
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/index.html.in $(srcdir)/index.php.in \
$(srcdir)/index.postnuke.php.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/VERSION $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/include/config.h
CONFIG_CLEAN_FILES = index.php index.postnuke.php index.html
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFAULT_ARCH = @DEFAULT_ARCH@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
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@
RPMLIBS = @RPMLIBS@
RPM_PATH = @RPM_PATH@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
U = @U@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_aux_dir = @ac_aux_dir@
ac_ct_CC = @ac_ct_CC@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
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@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = $(localstatedir)/www/html
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = index.php.in index.postnuke.php.in index.html.in feed-icon.png warning-icon.png pkg.png pkgup.png
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(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 html/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign html/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: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
index.php: $(top_builddir)/config.status $(srcdir)/index.php.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
index.postnuke.php: $(top_builddir)/config.status $(srcdir)/index.postnuke.php.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
index.html: $(top_builddir)/config.status $(srcdir)/index.html.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
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
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:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
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 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-data-local
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
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am:
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic distclean \
distclean-generic distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am \
install-data-local 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 pdf \
pdf-am ps ps-am uninstall uninstall-am
install-data-local:
$(mkdir_p) $(DESTDIR)$(htmldir)/distromatic
$(INSTALL_DATA) $(srcdir)/index.html $(DESTDIR)${htmldir}/distromatic/index.html
$(INSTALL_DATA) $(srcdir)/feed-icon.png $(DESTDIR)${htmldir}/distromatic/feed-icon.png
$(INSTALL_DATA) $(srcdir)/warning-icon.png $(DESTDIR)${htmldir}/distromatic/warning-icon.png
$(INSTALL_DATA) $(srcdir)/pkg.png $(DESTDIR)${htmldir}/distromatic/pkg.png
$(INSTALL_DATA) $(srcdir)/pkgup.png $(DESTDIR)${htmldir}/distromatic/pkgup.png
# 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:

BIN
html/feed-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

85
html/index.html.in Normal file
View File

@ -0,0 +1,85 @@
<!--#if expr="$QUERY_STRING = /tag=([a-zA-Z0-9\-+_\.]+)/" -->
<!--#set var="tag" value="$1" -->
<!--#set var="includefile" value="/pub/openmamba/distromatic/${tag}/_index.inc" -->
<!--#set var="title" value="List of all packages in the $tag repository" -->
<!--#set var="description" value="List of all RPM packages in the openmamba $tag repository" -->
<!--#if expr="$QUERY_STRING = /pkg=([a-zA-Z0-9\-+_\.]+)/" -->
<!--#set var="pkg" value="$1" -->
<!--#if expr="$pkg != _index" -->
<!--#set var="includefile" value="/pub/openmamba/distromatic/${tag}/${pkg}.inc" -->
<!--#set var="title" value="$pkg RPM package information ($tag repository)" -->
<!--#set var="description" value="openmamba $tag repository: $pkg RPM package information and download" -->
<!--#endif -->
<!--#endif -->
<!--#if expr="$QUERY_STRING = /maintainer=([a-zA-Z0-9\-+_\.:]+)/" -->
<!--#set var="maintainer" value="$1" -->
<!--#if expr="$maintainer = _index" -->
<!--#set var="includefile" value="/pub/openmamba/distromatic/${tag}/_maintainers.inc" -->
<!--#set var="title" value="List of all maintainers in the $tag repository" -->
<!--#set var="description" value="List of all maintainers in the $tag repository" -->
<!--#else -->
<!--#set var="includefile" value="/pub/openmamba/distromatic/${tag}/maintainers/${maintainer}.inc" -->
<!--#set var="title" value="Packages maintained by ${maintainer} in the $tag repository" -->
<!--#set var="description" value="Packages maintained by ${maintainer} in the $tag repository" -->
<!--#endif -->
<!--#endif -->
<!--#if expr="$QUERY_STRING = /group=([a-zA-Z0-9\-+_\.:]+)/" -->
<!--#set var="group" value="$1" -->
<!--#if expr="$group = _index" -->
<!--#set var="includefile" value="/pub/openmamba/distromatic/${tag}/_groups.inc" -->
<!--#set var="title" value="List of all groups for the $tag repository" -->
<!--#set var="description" value="List of all groups for the $tag repository" -->
<!--#else -->
<!--#set var="includefile" value="/pub/openmamba/distromatic/${tag}/${group}/_index.inc" -->
<!--#set var="title" value="Packages of $group group in the $tag repository" -->
<!--#set var="description" value="Packages of $group group in the $tag repository" -->
<!--#endif -->
<!--#endif -->
<!--#else -->
<!--#set var="includefile" value="/pub/openmamba/distromatic/_index.inc" -->
<!--#set var="title" value="Index of all available repositories" -->
<!--#set var="description" value="Index of all available repositories" -->
<!--#endif -->
<!--#include virtual="/header.html" -->
<table width="100%"><tr><td>
<br>
<!--#if expr="$tag != ''" -->
[<a href="index.html">repositories</a>]
<!--#if expr="$group != _index" -->
[<a href="index.html?tag=<!--#echo var=tag -->&amp;group=_index"><!--#echo var=tag --> groups</a>]
<!--#endif -->
<!--#if expr="$pkg != '_index'" -->
[<a href="index.html?tag=<!--#echo var=tag -->&amp;pkg=_index"><!--#echo var=tag --> packages</a>]
<!--#endif -->
<!--#if expr="$maintainer != _index" -->
[<a href="index.html?tag=<!--#echo var=tag -->&amp;maintainer=_index"><!--#echo var=tag --> maintainers</a>]
<!--#endif -->
<!--#endif -->
<br>
<br>
<table border=0><tr>
<td valign=top width="100%">
<!--#include virtual=${includefile} -->
</td>
<td valign=top>
<!--#include virtual="/verticalbanner.html" -->
</td></tr></table>
<br><font size=-1>
<!--#if expr="$tag != ''" -->
[<a href="index.html">repositories</a>]
<!--#if expr="$group != _index" -->
[<a href="index.html?tag=<!--#echo var=tag -->&amp;group=_index"><!--#echo var=tag --> groups</a>]
<!--#endif -->
<!--#if expr="$pkg != '_index'" -->
[<a href="index.html?tag=<!--#echo var=tag -->&amp;pkg=_index"><!--#echo var=tag --> packages</a>]
<!--#endif -->
<!--#if expr="$maintainer != _index" -->
[<a href="index.html?tag=<!--#echo var=tag -->&amp;maintainer=_index"><!--#echo var=tag --> maintainers</a>]
<!--#endif -->
<!--#endif -->
<br>
<br>Automatically generated by <a href="index.html?tag=devel&pkg=distromatic">distromatic</a>.
<br>
</font>
</td></tr></table>
<!--#include virtual="/footer.html" -->

26
html/index.php.in Normal file
View File

@ -0,0 +1,26 @@
<?php $_GET = &$HTTP_GET_VARS; ?>
<html><br><font class="pn-title"><b>QiLinux packages list</b><br><br></font>
<?
$includename="index.inc";
if (isset($_GET[tag])) {
$includename=$_GET[tag];
if (isset($_GET[pkg])) {
$includename="$includename/$_GET[pkg].inc";
} else {
$includename="$includename/index.inc";
}
}
//echo "$includename";
include($includename);
?>
<br><font size=-1>
[<a href="?">index</a>]
<?
if (isset($_GET[tag]) && isset($_GET[pkg])) {
echo "[<a href=\"?tag=$_GET[tag]\">$_GET[tag]</a>]";
}
?>
<br>Automatically generated by Distromatic @PACKAGE_VERSION@, (C) 2004-2006 by Silvan Calarco and Davide Madrisan
</font></html>

View File

@ -0,0 +1,48 @@
<?php
if (!defined("LOADED_AS_MODULE")) {
die ("You can't access this file directly...");
}
/*
Credits to Edgar Miller -- http://www.bosna.de/ from his post on PHP-Nuke
( http://phpnuke.org/article.php?sid=2010&mode=nested&order=0&thold=0 )
Further Credits go to Djordjevic Nebojsa (nesh) for the fix for the fix
*/
$ModName = basename(dirname(__FILE__));
modules_get_language();
include("header.php");
?>
<?php $_GET = &$HTTP_GET_VARS; ?>
<html><h1>Distromatic repository for QiLinux</h1>
<?
$BASEURL="?op=modload&name=distromatic&file=index";
$includename="_index.inc";
if (isset($_GET[tag])) {
$includename=$_GET[tag];
if (isset($_GET[pkg])) {
$includename="$includename/$_GET[pkg].inc";
} else {
$includename="$includename/_index.inc";
}
}
//echo "$includename";
include($includename);
?>
<br><font size=-1>
[<a href="<? echo $BASEURL ?>">index</a>]
<?
if (isset($_GET[tag]) && isset($_GET[pkg])) {
echo "[<a href=\"",$BASEURL,"&tag=$_GET[tag]\">$_GET[tag]</a>]";
}
?>
<br><br>Automatically generated by Distromatic @PACKAGE_VERSION@ (C) 2004-2006 by Silvan Calarco and Davide Madrisan
</font></html>
<? include ("footer.php");
?>

BIN
html/pkg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 817 B

BIN
html/pkgup.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 767 B

BIN
html/warning-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 655 B

32
src/Makefile.am Normal file
View File

@ -0,0 +1,32 @@
# This file is part of `distromatic', a tool for RPM based repositories
# Copyright (C) 2006 by Davide Madrisan <davide.madrisan@gmail.com>
# Copyright (C) 2007 by Silvan Calarco <silvan.calarco@mambasoft.it>
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of version 2 of the GNU General Public License as published by the
# Free Software Foundation.
#
# 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.
# 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.
AM_CPPFLAGS = -I$(top_srcdir)/src/include -I$(top_builddir)/src/include
bin_PROGRAMS = distromatic
distromatic_SOURCES = \
buildtools.c \
changelog.c \
distromatic.c \
functions.c \
reports.c \
headerlist.c \
requirelist.c \
rpmfunctions.c
SUBDIRS = include missing

660
src/Makefile.in Normal file
View File

@ -0,0 +1,660 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
# This file is part of `distromatic', a tool for RPM based repositories
# Copyright (C) 2006 by Davide Madrisan <davide.madrisan@gmail.com>
# Copyright (C) 2007 by Silvan Calarco <silvan.calarco@mambasoft.it>
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of version 2 of the GNU General Public License as published by the
# Free Software Foundation.
#
# 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.
# 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.
VPATH = @srcdir@
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@
bin_PROGRAMS = distromatic$(EXEEXT)
subdir = src
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/VERSION $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/include/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
PROGRAMS = $(bin_PROGRAMS)
am_distromatic_OBJECTS = buildtools.$(OBJEXT) changelog.$(OBJEXT) \
distromatic.$(OBJEXT) functions.$(OBJEXT) reports.$(OBJEXT) \
headerlist.$(OBJEXT) requirelist.$(OBJEXT) \
rpmfunctions.$(OBJEXT)
distromatic_OBJECTS = $(am_distromatic_OBJECTS)
distromatic_LDADD = $(LDADD)
DEFAULT_INCLUDES =
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(distromatic_SOURCES)
DIST_SOURCES = $(distromatic_SOURCES)
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-dvi-recursive install-exec-recursive \
install-html-recursive install-info-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
distdir
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
sed_rest='s,^[^/]*/*,,'; \
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
sed_butlast='s,/*[^/]*$$,,'; \
while test -n "$$dir1"; do \
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
if test "$$first" != "."; then \
if test "$$first" = ".."; then \
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
else \
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
if test "$$first2" = "$$first"; then \
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
else \
dir2="../$$dir2"; \
fi; \
dir0="$$dir0"/"$$first"; \
fi; \
fi; \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \
reldir="$$dir2"
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFAULT_ARCH = @DEFAULT_ARCH@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
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@
RPMLIBS = @RPMLIBS@
RPM_PATH = @RPM_PATH@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
U = @U@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_aux_dir = @ac_aux_dir@
ac_ct_CC = @ac_ct_CC@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
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@
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@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = -I$(top_srcdir)/src/include -I$(top_builddir)/src/include
distromatic_SOURCES = \
buildtools.c \
changelog.c \
distromatic.c \
functions.c \
reports.c \
headerlist.c \
requirelist.c \
rpmfunctions.c
SUBDIRS = include missing
all: all-recursive
.SUFFIXES:
.SUFFIXES: .c .o .obj
$(srcdir)/Makefile.in: $(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 src/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign src/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: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p; \
then echo "$$p"; echo "$$p"; else :; fi; \
done | \
sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
if ($$2 == $$4) files[d] = files[d] " " $$1; \
else { print "f", $$3 "/" $$4, $$1; } } \
END { for (d in files) print "f", d, files[d] }' | \
while read type dir files; do \
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
test -z "$$files" || { \
echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
$(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
} \
; done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-e 's/$$/$(EXEEXT)/' `; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(bindir)" && rm -f $$files
clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
distromatic$(EXEEXT): $(distromatic_OBJECTS) $(distromatic_DEPENDENCIES)
@rm -f distromatic$(EXEEXT)
$(LINK) $(distromatic_OBJECTS) $(distromatic_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buildtools.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/changelog.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/distromatic.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/functions.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/headerlist.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reports.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/requirelist.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rpmfunctions.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
$(RECURSIVE_CLEAN_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
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
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
dir1=$$subdir; dir2="$(top_distdir)"; \
$(am__relativize); \
new_top_distdir=$$reldir; \
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$new_top_distdir" \
distdir="$$new_distdir" \
am__remove_distdir=: \
am__skip_length_check=: \
am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-recursive
all-am: Makefile $(PROGRAMS)
installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(bindir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
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-recursive
clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
distclean: distclean-recursive
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
html-am:
info: info-recursive
info-am:
install-data-am:
install-dvi: install-dvi-recursive
install-dvi-am:
install-exec-am: install-binPROGRAMS
install-html: install-html-recursive
install-html-am:
install-info: install-info-recursive
install-info-am:
install-man:
install-pdf: install-pdf-recursive
install-pdf-am:
install-ps: install-ps-recursive
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-compile mostlyclean-generic
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am: uninstall-binPROGRAMS
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
install-am install-strip tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am check check-am clean clean-binPROGRAMS \
clean-generic ctags ctags-recursive distclean \
distclean-compile distclean-generic distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
install-binPROGRAMS 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 \
installdirs-am maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \
ps ps-am tags tags-recursive uninstall uninstall-am \
uninstall-binPROGRAMS
# 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:

135
src/buildtools.c Normal file
View File

@ -0,0 +1,135 @@
/*
* distromatic - tool for RPM based repositories
*
* Copyright (C) 2004-2006 by Silvan Calarco <silvan.calarco@mambasoft.it>
* Copyright (C) 2006 by Davide Madrisan <davide.madrisan@gmail.com>
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of version 2 of the GNU General Public License as published by the
* Free Software Foundation.
*
* 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.
* 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.
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#if HAVE_STRING_H
# if !STDC_HEADERS && HAVE_MEMORY_H
# include <memory.h>
# endif
# include <string.h>
#endif
#if HAVE_STRINGS_H
# include <strings.h>
#endif
#ifndef BUILDTOOLS_H
# include "buildtools.h"
#endif
#ifndef DISTROMATIC_H
# include "distromatic.h"
#endif
int
generateBuildInfo(struct configTag *configtag, int arch)
{
char foutname[1024], fsourcesname[1024], fdir[1024];
FILE *fout, *fsources;
int i, j;
struct headerSourceList *currheadersourcelist;
struct headerList *currchild;
strncpy(fdir, configtag->repository_source_dir, 1024);
strncpy(fsourcesname, fdir, 1024);
strncat(fsourcesname, "buildinfo/sources.dat", 1024);
if ((fsources = fopen(fsourcesname, "w")) == NULL) {
perror(fsourcesname);
return 1;
}
currheadersourcelist = configtag->headersourcelist;
while (currheadersourcelist) {
strncpy(foutname, fdir, 1024);
strncat(foutname, "buildinfo/", 1024);
strncat(foutname, currheadersourcelist->name, 1024);
strncat(foutname, ".info", 1024);
if ((fout = fopen(foutname, "w")) == NULL) {
perror(foutname);
return 1;
}
fprintf(fout, "SRPM_NAME=%s\n", currheadersourcelist->name);
fprintf(fout, "SRPM_FILENAME=%s-%s-%s.src.rpm\n",
currheadersourcelist->name,
currheadersourcelist->version,
currheadersourcelist->release);
fprintf(fout, "SRPM_VERSION=%s\n",
currheadersourcelist->version);
fprintf(fout, "SRPM_RELEASE=%s\n",
currheadersourcelist->release);
fprintf(fout, "SRPM_URL=%s\n", currheadersourcelist->url);
/* if (currheadersourcelist->url) {
* fprintf(fout,"SRPM_URL=%s\n",currheadersourcelist->url); */
i = 0;
while (currheadersourcelist->source
&& currheadersourcelist->source[i]) {
i++;
}
j = i;
for (i = i - 1; i >= 0; i--) {
fprintf(fout, "SRPM_SOURCE[%d]=%s\n", j - i - 1,
currheadersourcelist->source[i]);
fprintf(fsources, "%s %s %s\n", currheadersourcelist->name,
currheadersourcelist->version,
currheadersourcelist->source[i]);
}
i = 0;
while (currheadersourcelist->patch
&& currheadersourcelist->patch[i]) {
fprintf(fout, "SRPM_PATCH[%d]=%s\n", i,
currheadersourcelist->patch[i]);
i++;
}
currchild = currheadersourcelist->firstchild[arch];
i = 0;
while (currchild) {
fprintf(fout, "SRPM_TARGET[%d]=%s\n", i, currchild->name);
currchild = currchild->nextbrother;
i++;
}
/* list filenames */
for (i = 0; i < currheadersourcelist->filenamecount; i++) {
j = strlen((currheadersourcelist->basename)[i]) - 5;
if (j > 0
&& !strcmp(&((currheadersourcelist->basename)[i])[j],
".spec")) {
fprintf(fout, "SRPM_SPECFILE=%s\n",
(currheadersourcelist->basename)[i]);
break;
}
}
fclose(fout);
currheadersourcelist = currheadersourcelist->next;
}
fclose(fsources);
return 0;
}

297
src/changelog.c Normal file
View File

@ -0,0 +1,297 @@
/*
* distromatic - tool for RPM based repositories
*
* Copyright (C) 2004-2007 by Silvan Calarco <silvan.calarco@mambasoft.it>
* Copyright (C) 2006 by Davide Madrisan <davide.madrisan@gmail.com>
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of version 2 of the GNU General Public License as published by the
* Free Software Foundation.
*
* 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.
* 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.
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#else
# if HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
#endif
#if HAVE_STRING_H
# if !STDC_HEADERS && HAVE_MEMORY_H
# include <memory.h>
# endif
# include <string.h>
#endif
#if HAVE_STRINGS_H
# include <strings.h>
#endif
#include "distromatic.h"
#include "changelog.h"
#include "functions.h"
#if !HAVE_STRCHR
# define strchr index
#endif
static struct Packager *firstpackager = NULL;
static struct changeLogFull *firstchangelogfull = NULL;
static struct changeLogFull *currchangelogfull = NULL;
struct Packager *firstPackager() {
return firstpackager;
}
struct Packager *
getPackagerByName(char *name, int create)
{
int i, match=0;
struct Packager *newpackager,
*lastpackager = NULL,
*currpackager = NULL;
if (!name) {
return NULL;
}
currpackager = firstpackager;
while (currpackager && !match) {
if (!strcmp(name, currpackager->name)) match=1;
else {
i=0;
while (currpackager->alias[i] && !match) {
if (!strcmp(name, currpackager->alias[i])) match=1;
i++;
}
}
if (!match) {
lastpackager = currpackager;
currpackager = currpackager->next;
}
}
if (match) {
return currpackager;
}
else if ((!currpackager) && create) {
newpackager = malloc(sizeof(struct Packager));
newpackager->name = (char *) strdup(name);
for (i=0; i<PACKAGER_MAXALIASES; i++) newpackager->alias[i]=NULL;
newpackager->next = NULL;
newpackager->changes_count = 0;
newpackager->packages_count = 0;
newpackager->role = 0;
if (lastpackager)
lastpackager->next = newpackager;
if (!firstpackager)
firstpackager = newpackager;
return newpackager;
}
return NULL;
}
struct changeLog *
getPackageChangelog(Header h, struct headerSourceList* headersource)
{
int count, i;
struct changeLogFull *newchangelogfull, *prevchangelogfull;
struct changeLog *newchangelog,
*oldchangelog = NULL,
*firstchangelog = NULL;
struct Packager *currpackager = NULL;
char **changelogtext, **changelogrelease;
char *endp;
// long *changelogtime;
long *changelogtime;
char changelogname[255];
changelogtime = headerGetUIntArrayEntry(h, RPMTAG_CHANGELOGTIME, &count);
changelogrelease = headerGetStringArrayEntry(h, RPMTAG_CHANGELOGNAME, &count);
changelogtext = headerGetStringArrayEntry(h, RPMTAG_CHANGELOGTEXT, &count);
for (i = 0; i < count; i++) {
newchangelog = malloc(sizeof(struct changeLog));
if (oldchangelog) {
oldchangelog->next = newchangelog;
}
newchangelog->time = changelogtime[i];
strncpy(changelogname, changelogrelease[i], 255);
endp = strchr(changelogname, '>');
if (endp) {
endp[1] = '\0';
}
changelogrelease[i] = strrchr(changelogrelease[i], ' ')+1;
newchangelog->release = changelogrelease[i];
if ((currpackager = getPackagerByName(changelogname, 1))) {
newchangelog->pkg = currpackager;
} else {
newchangelog->pkg = NULL;
}
if (changelogtext[i]) {
newchangelog->text = (char *) strdup(changelogtext[i]);
} else {
newchangelog->text = NULL;
}
newchangelog->next = NULL;
if (!firstchangelog) {
firstchangelog = newchangelog;
}
oldchangelog = newchangelog;
newchangelogfull = malloc(sizeof(struct changeLogFull));
newchangelogfull->changelog = newchangelog;
newchangelogfull->source = headersource;
newchangelogfull->next = NULL;
currchangelogfull = firstchangelogfull;
prevchangelogfull = NULL;
while (currchangelogfull &&
(currchangelogfull->changelog->time > newchangelogfull->changelog->time)) {
prevchangelogfull = currchangelogfull;
currchangelogfull = currchangelogfull->next;
}
if(prevchangelogfull) {
prevchangelogfull->next = newchangelogfull;
} else {
firstchangelogfull = newchangelogfull;
}
newchangelogfull->next = currchangelogfull;
}
headersource->changelog = firstchangelog;
return firstchangelog;
}
int
printChangelogSince(FILE *fout, struct configTag *ct,
struct tm *sincetime, int html)
{
struct changeLogFull *changelogfull;
struct tm *changelogtime;
char strdate[16];
char buffer[PATH_MAX];
struct Packager *currpackager = firstpackager;
time_t simpletime = mktime(sincetime), lasttime = 0;
strftime((char *) &strdate, 16, "%a %h %d %Y", sincetime);
if (!html) {
fprintf(fout,"\nPackagers statistics (changelog since %s):\n\n",
(char *) &strdate);
/* FIXME: `packages_count' is never incremented, so its value is `0' */
fprintf(fout,"Summary (name, packages, updates)\n");
fprintf(fout,"---------------------------------\n");
while (currpackager) {
fprintf(fout,"%s %d, %d\n",
strcmp(currpackager->name, "") ?
currpackager->name : "(noname)",
currpackager->packages_count,
currpackager->changes_count);
currpackager = currpackager->next;
}
fprintf(fout,"\nDetails\n-------");
}
changelogfull = firstchangelogfull;
while (changelogfull) {
if ((changelogfull->changelog->time >= simpletime) &&
(changelogfull->source->altrepository == ct->repository_level)) {
changelogtime = localtime((time_t *) & changelogfull->changelog->time);
strftime((char *) &strdate, 16, "%a %h %d %Y", changelogtime);
if (!html) {
fprintf(fout,"\n[%s %s] ",
changelogfull->source->name,
changelogfull->changelog->release);
fprintf(fout,"%s %s\n%s\n", (char *) &strdate,
strcmp(changelogfull->changelog->pkg->name, "") ?
changelogfull->changelog->pkg->name : "(noname)",
changelogfull->changelog->text);
} else {
if (changelogfull->changelog->time != lasttime) {
if (lasttime) fprintf(fout,"<hr>");
fprintf(fout,"<p><h2>%s</h2>",(char *) &strdate);
lasttime=changelogfull->changelog->time;
}
fprintf(fout,"<p><a href=\"%stag=%s&amp;pkg=%s.source\">%s</a> %s - ",
ct->configdefaults->url_prefix,
ct->tag,
changelogfull->source->name,
changelogfull->source->name,
changelogfull->changelog->release);
if (strcmp(changelogfull->changelog->pkg->name, "")) {
if ((changelogfull->changelog->pkg->role & PACKAGER_ROLE_MAINTAINER) &&
(changelogfull->changelog->pkg->packages_count)) {
fprintf(fout,"<a href=\"%stag=%s&amp;maintainer=%s\">%s</a>",
ct->configdefaults->url_prefix,
ct->tag,
changelogfull->changelog->pkg->name,
changelogfull->changelog->pkg->name);
} else {
fprintf(fout,"%s",changelogfull->changelog->pkg->name);
}
} else {
fprintf(fout,"(noname)");
}
fprintf(fout,"<br>%s<br>\n",
htmlclean(changelogfull->changelog->text,buffer,PATH_MAX));
}
}
changelogfull = changelogfull->next;
// pkgchanged = 0;
// headersourcelist = headersourcelist->next;
}
fprintf(fout,"\n");
return 0;
}
int
printChangelog(struct changeLog *changelog)
{
printf("Changelog:\n");
while (changelog) {
struct tm *changelogtime;
char strdate[16];
changelogtime = localtime((time_t *) & changelog->time);
strftime((char *) &strdate, 16, "%a %h %d %Y", changelogtime);
printf("%s - %s\n%s\n", (char *) &strdate,
changelog->pkg->name ? changelog->pkg->name : "(noname)",
changelog->text);
changelog = changelog->next;
}
return 0;
}

1249
src/distromatic.c Normal file

File diff suppressed because it is too large Load Diff

314
src/functions.c Normal file
View File

@ -0,0 +1,314 @@
/*
* distromatic - tool for RPM based repositories
*
* Copyright (C) 2004-2007 by Silvan Calarco <silvan.calarco@mambasoft.it>
* Copyright (C) 2006 by Davide Madrisan <davide.madrisan@gmail.com>
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of version 2 of the GNU General Public License as published by the
* Free Software Foundation.
*
* 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.
* 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.
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#else
# if HAVE_STDLIB_H
# include <stdlib.h>
# endif
#endif
#include <stdio.h>
#include <sys/stat.h>
#include <dirent.h>
#if HAVE_STRING_H
# if !STDC_HEADERS && HAVE_MEMORY_H
# include <memory.h>
# endif
# include <string.h>
#endif
#if HAVE_STRINGS_H
# include <strings.h>
#endif
#ifdef HAVE_LIBIBERTY_H
# include <libiberty.h>
#endif
#ifndef FUNCTIONS_H
# include "functions.h"
#endif
/* Tell glibc's <time.h> to provide a prototype for strptime() */
#ifndef __USE_XOPEN
# define __USE_XOPEN
#endif
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#else
# if HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
#endif
static int debug_log = 0;
char **
dupnargv(char **argv, int count)
{
int argc;
char **copy;
if (argv == NULL)
return NULL;
/* the vector */
copy = (char **) malloc((count + 1) * sizeof(char *));
if (copy == NULL)
return NULL;
/* the strings */
for (argc = 0; argc < count; argc++) {
int len = strlen(argv[argc]);
copy[argc] = malloc(sizeof(char *) * (len + 1));
if (copy[argc] == NULL) {
freeargv(copy);
return NULL;
}
strcpy(copy[argc], argv[argc]);
}
copy[argc] = NULL;
return copy;
}
void *
memndup(void *memp, size_t size)
{
void *newp;
newp = malloc(size);
if (!newp)
return 0;
memcpy(newp, memp, size);
return newp;
}
void log_debug_set(int value) {
debug_log = value;
}
void logmsg(int level, const char *msg, ...) {
va_list ap;
static char oldmsg[1024] = "";
char newmsg[1024];
va_start(ap, msg);
vsnprintf((char*)&newmsg, 1024, msg, ap);
va_end(ap);
if (strncmp(newmsg,(char*)&oldmsg,1024) != 0) /* only log the same message once */
{
switch (level) {
case LOG_MARK:
fprintf(stderr,"Info: ******************************\n");
fprintf(stderr,"Info: %s\n",(char*)&newmsg);
fprintf(stderr,"Info: ******************************\n");
break;
case LOG_WARNING:
fprintf(stderr,"Warning: %s\n",(char*)&newmsg);
break;
case LOG_ERROR:
fprintf(stderr,"Error: %s\n",(char*)&newmsg);
break;
case LOG_DEBUG:
if (debug_log == 1) fprintf(stderr,"DEBUG: %s\n",(char*)&newmsg);
break;
default:
break;
}
strncpy(oldmsg,newmsg,1024);
}
}
char *
strip_separators(char *st, const char *sepstr)
{
if (st) {
int i, beg = -1, end = -1;
for (i = 0; st[i] != '\0'; i++) {
if (strchr(sepstr, st[i]) != NULL) {
continue;
}
else {
end = i;
if (beg < 0)
beg = i;
}
}
if (beg > 0)
st = memmove(st, (char *) &st[beg], end - beg + 1);
st[end - beg + 1] = '\0';
}
return st;
}
humanDate *
simpleTimeToTemplate(long calendartime, const char* template, humanDate * strdate)
{
struct tm *ltime;
ltime = localtime((time_t *) & calendartime);
strftime((char *) strdate, 16, template, ltime);
return strdate;
}
humanDate *
simpleTimeToHuman(long calendartime, humanDate * strdate)
{
simpleTimeToTemplate(calendartime, "%a %h %d %Y", strdate);
return strdate;
}
void
fprintf_depstable_filtered_var(FILE* f,char* st) {
int i;
for (i = 0; st[i] != '\0'; i++) {
switch (st[i]) {
case ':': fputc('_',f); break;
case '(': fputc('[',f); break;
case ')': fputc(']',f); break;
default: fputc(st[i],f); break;
}
}
}
char *humanSize(long long sbytes, sizeString *s) {
if (sbytes < 1024) {
snprintf((char *)s, SSSIZE, "%lld B", sbytes);
return (char *)s;
}
if ((sbytes / 1024) < 1024) {
snprintf((char *)s, SSSIZE, "%.2f KB", sbytes / 1024.0);
return (char*)s;
}
if ((sbytes / 1024 / 1024 ) < 1024) {
snprintf((char *)s, SSSIZE, "%.2f MB", sbytes / 1024.0 / 1024.0);
return (char*)s;
}
if ((sbytes / 1024 / 1024 / 1024 ) < 1024) {
snprintf((char *)s, SSSIZE, "%.2f GB", sbytes / 1024.0 / 1024.0 / 1024.0);
return (char*)s;
}
snprintf((char *)s, SSSIZE, "%.2f TB", sbytes / 1024.0 / 1024.0 / 1024.0 / 1024.0);
return (char*)s;
}
char *htmlclean(char *source,char *dest,unsigned int max)
{
unsigned int i=0,j=0;
char subst[10];
while (source[i] && i<max) {
switch (source[i]) {
case '<': strcpy(subst,"&lt;"); break;
case '>': strcpy(subst,"&gt;"); break;
case '&': strcpy(subst,"&amp;"); break;
case '"': strcpy(subst,"&quot;"); break;
case '\n': strcpy(subst,"<br>\n"); break;
default: subst[0]=source[i]; subst[1]='\0'; break;
}
if (j+strlen(subst)<max) {
strcpy((char*)&dest[j],subst);
j+=strlen(subst);
} else {
fprintf(stderr,"Warning: can't tidy HTML string due to limited buffer.\n");
return source;
}
i++;
}
return dest;
}
/*
scansdir is like scandir with the difference that it uses stat()
to get entry file types
*/
int scansdir(const char *dir, struct dirent ***namelist,
int (*sel)(const struct dirent *),
int (*compar)(const struct dirent **, const struct dirent **))
{
DIR *d;
char pn[PATH_MAX];
struct dirent *entry;
struct stat buf;
register int i=0;
int pe;
size_t entrysize;
if ((d=opendir(dir)) == NULL)
return(-1);
pe=strlen(dir);
memcpy(pn,dir,pe);
*namelist=NULL;
while ((entry=readdir(d)) != NULL)
{
if (entry->d_type == DT_UNKNOWN) {
strncpy(&pn[pe],entry->d_name,PATH_MAX-pe);
stat(pn,&buf);
if (S_ISREG(buf.st_mode)) entry->d_type |= DT_REG;
else if (S_ISDIR(buf.st_mode)) entry->d_type |= DT_DIR;
else if (S_ISFIFO(buf.st_mode)) entry->d_type |= DT_FIFO;
else if (S_ISSOCK(buf.st_mode)) entry->d_type |= DT_SOCK;
else if (S_ISCHR(buf.st_mode)) entry->d_type |= DT_CHR;
else if (S_ISBLK(buf.st_mode)) entry->d_type |= DT_BLK;
}
if (sel == NULL || (sel != NULL && (*sel)(entry)))
{
*namelist=(struct dirent **)realloc((void *)(*namelist),
(size_t)((i+1)*sizeof(struct dirent *)));
if (*namelist == NULL) return(-1);
entrysize=sizeof(struct dirent)-sizeof(entry->d_name)+strlen(entry->d_name)+1;
(*namelist)[i]=(struct dirent *)malloc(entrysize);
if ((*namelist)[i] == NULL) return(-1);
memcpy((*namelist)[i], entry, entrysize);
i++;
}
}
if (closedir(d)) return(-1);
// if (i == 0) return(-1);
if (compar != NULL)
qsort((void *)(*namelist), (size_t)i, sizeof(struct dirent *),
(__compar_fn_t) compar);
return(i);
}

1117
src/headerlist.c Normal file

File diff suppressed because it is too large Load Diff

27
src/include/Makefile.am Normal file
View File

@ -0,0 +1,27 @@
# This file is part of `distromatic', the tool for RPM based repositories
# Copyright (C) 2006 Davide Madrisan <davide.madrisan@gmail.com>
# Copyright (C) 2007 Silvan Calarco <silvan.calarco@mambasoft.it>
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of version 2 of the GNU General Public License as published by the
# Free Software Foundation.
#
# 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.
# 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.
EXTRA_DIST = \
buildtools.h \
changelog.h \
distromatic.h \
globaldefs.h.in \
functions.h \
reports.h \
headerlist.h \
requirelist.h \
rpmfunctions.h

383
src/include/Makefile.in Normal file
View File

@ -0,0 +1,383 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
# This file is part of `distromatic', the tool for RPM based repositories
# Copyright (C) 2006 Davide Madrisan <davide.madrisan@gmail.com>
# Copyright (C) 2007 Silvan Calarco <silvan.calarco@mambasoft.it>
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of version 2 of the GNU General Public License as published by the
# Free Software Foundation.
#
# 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.
# 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.
VPATH = @srcdir@
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 = src/include
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/config.h.in $(srcdir)/globaldefs.h.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/VERSION $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = globaldefs.h
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFAULT_ARCH = @DEFAULT_ARCH@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
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@
RPMLIBS = @RPMLIBS@
RPM_PATH = @RPM_PATH@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
U = @U@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_aux_dir = @ac_aux_dir@
ac_ct_CC = @ac_ct_CC@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
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@
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@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = \
buildtools.h \
changelog.h \
distromatic.h \
globaldefs.h.in \
functions.h \
reports.h \
headerlist.h \
requirelist.h \
rpmfunctions.h
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(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 src/include/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign src/include/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: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
config.h: stamp-h1
@if test ! -f $@; then \
rm -f stamp-h1; \
$(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
else :; fi
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status src/include/config.h
$(srcdir)/config.h.in: $(am__configure_deps)
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
rm -f stamp-h1
touch $@
distclean-hdr:
-rm -f config.h stamp-h1
globaldefs.h: $(top_builddir)/config.status $(srcdir)/globaldefs.h.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
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
check: check-am
all-am: Makefile config.h
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:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
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 mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-hdr
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
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am:
.MAKE: all install-am install-strip
.PHONY: all all-am check check-am clean clean-generic distclean \
distclean-generic distclean-hdr 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 pdf \
pdf-am ps ps-am uninstall uninstall-am
# 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:

17
src/include/buildtools.h Normal file
View File

@ -0,0 +1,17 @@
/*
* distromatic - tool for RPM based repositories
*
* Copyright (C) 2004-2010 by Silvan Calarco <silvan.calarco@mambasoft.it>
* Copyright (C) 2006 by Davide Madrisan <davide.madrisan@gmail.com>
*/
#ifndef BUILDTOOLS_H
#define BUILDTOOLS_H
#ifndef DISTROMATIC_H
# include "distromatic.h"
#endif
int generateBuildInfo(struct configTag *configtag, int arch);
#endif // BUILDTOOLS_H

71
src/include/changelog.h Normal file
View File

@ -0,0 +1,71 @@
/*
* distromatic - tool for RPM based repositories
*
* Copyright (C) 2004-2007 by Silvan Calarco <silvan.calarco@mambasoft.it>
* Copyright (C) 2006 by Davide Madrisan <davide.madrisan@gmail.com>
*/
#ifndef CHANGELOG_H
#define CHANGELOG_H
#ifndef RPMFUNCTIONS_H
# include "rpmfunctions.h"
#endif
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#else
# if HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
#endif
#define PACKAGER_MAXALIASES 5
#define PACKAGER_ROLE_MAINTAINER 1
struct changeLog {
long time;
struct Packager *pkg;
char *release;
char *text;
struct changeLog *next;
};
struct changeLogFull {
struct headerSourceList *source;
struct changeLog *changelog;
struct changeLogFull *next;
};
struct Packager {
char *name;
char *alias[PACKAGER_MAXALIASES];
int role;
int changes_count;
int packages_count;
struct Packager *next;
};
struct Packager *firstPackager(void);
long changelogTotal(void);
int printChangelog(struct changeLog *changelog);
int printChangelogSince(
FILE *fout,
struct configTag *ct,
// struct headerSourceList *headersourcelist,
struct tm *sincetime,
int html);
struct Packager *
getPackagerByName(char *name, int create);
struct changeLog *
getPackageChangelog(Header h, struct headerSourceList *headersourcelist);
#endif /* FUNCTIONS_H */

150
src/include/config.h.in Normal file
View File

@ -0,0 +1,150 @@
/* src/include/config.h.in. Generated from configure.ac by autoheader. */
/* Define if building universal (internal helper macro) */
#undef AC_APPLE_UNIVERSAL_BUILD
/* Define to 1 if you have the <db1/db.h> header file. */
#undef HAVE_DB1_DB_H
/* Define to 1 if you have the declaration of `getopt', and to 0 if you don't.
*/
#undef HAVE_DECL_GETOPT
/* Define to 1 if you have the <dirent.h> header file. */
#undef HAVE_DIRENT_H
/* Define to 1 if you have the <errno.h> header file. */
#undef HAVE_ERRNO_H
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the `bz2' library (-lbz2). */
#undef HAVE_LIBBZ2
/* Define to 1 if you have the `libiberty' library (-liberty). */
#undef HAVE_LIBIBERTY
/* Define to 1 if you have the <libiberty.h> header file. */
#undef HAVE_LIBIBERTY_H
/* Define to 1 if you have the `z' library (-lz). */
#undef HAVE_LIBZ
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
to 0 otherwise. */
#undef HAVE_MALLOC
/* Define to 1 if you have the `memcpy' function. */
#undef HAVE_MEMCPY
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <ndir.h> header file. */
#undef HAVE_NDIR_H
/* Define if RPM backend is available */
#undef HAVE_RPM
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the `strchr' function. */
#undef HAVE_STRCHR
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/ndir.h> header file. */
#undef HAVE_SYS_NDIR_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if you have the <zlib.h> header file. */
#undef HAVE_ZLIB_H
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
#undef NO_MINUS_C_MINUS_O
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if the C compiler supports function prototypes. */
#undef PROTOTYPES
/* Define to the RPM version */
#undef RPM_VERSION
/* RPM major version */
#undef RPM_VERSION_MAJOR
/* RPM micro version */
#undef RPM_VERSION_MICRO
/* RPM minor version */
#undef RPM_VERSION_MINOR
/* RPM raw version */
#undef RPM_VERSION_RAW
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
/* Version number of package */
#undef VERSION
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
# undef WORDS_BIGENDIAN
# endif
#endif
/* Define like PROTOTYPES; this can be used by system headers. */
#undef __PROTOTYPES
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
/* Define to rpl_malloc if the replacement function should be used. */
#undef malloc

44
src/include/distromatic.h Normal file
View File

@ -0,0 +1,44 @@
/*
* distromatic - tool for RPM based repositories
*
* Copyright (C) 2004-2007 by Silvan Calarco <silvan.calarco@mambasoft.it>
* Copyright (C) 2006 by Davide Madrisan <davide.madrisan@gmail.com>
*/
#ifndef DISTROMATIC_H
#define DISTROMATIC_H
#include "globaldefs.h"
#include "headerlist.h"
struct configDefaults {
char *html_basedir;
char *distribution_name;
char *url_address;
char *url_prefix;
char *url_dir;
char *arch[ARCHS_MAX];
};
struct configTag {
struct configDefaults *configdefaults;
char *tag;
char *description;
char *repository_dir;
char *repository_source_dir;
struct configTag *repository[ALT_REPS_MAX+1];
int repository_level;
char *html_dir;
char *download_prefix;
char *download_dir;
char *showfile_prefix;
char *arch[ARCHS_MAX];
struct headerList *headerlist[ARCHS_MAX];
struct headerSourceList *headersourcelist;
struct providedList *providedlist_idx[ARCHS_MAX][PROVIDEDLIST_IDX_SIZE];
struct fileTree *filetree[ARCHS_MAX];
struct headerStats stats;
struct configTag *next;
};
#endif

38
src/include/functions.h Normal file
View File

@ -0,0 +1,38 @@
/*
* distromatic - tool for RPM based repositories
*
* Copyright (C) 2004-2007 by Silvan Calarco <silvan.calarco@mambasoft.it>
* Copyright (C) 2006 by Davide Madrisan <davide.madrisan@gmail.com>
*/
#ifndef FUNCTIONS_H
#define FUNCTIONS_H
#define HDSIZE 16
#define SSSIZE 16
typedef char humanDate[HDSIZE];
typedef char sizeString[SSSIZE];
#define LOG_NORMAL 0
#define LOG_WARNING 1
#define LOG_ERROR 2
#define LOG_DEBUG 4
#define LOG_MARK 8
char **dupnargv(char **argv, int count);
void *memndup(void *memp, size_t size);
void log_debug_set(int value);
void logmsg(int level, const char *msg, ...);
char *strip_separators(char *st, const char *sepstr);
humanDate *
simpleTimeToTemplate(long calendartime, const char* template, humanDate * strdate);
humanDate *simpleTimeToHuman(long calendartime, humanDate * strdate);
char *humanSize(long long sbytes, sizeString *s);
void fprintf_depstable_filtered_var(FILE* f,char* st);
char *htmlclean(char *source,char *dest,unsigned int max);
int scansdir(const char *dir, struct dirent ***namelist,
int (*select)(const struct dirent *),
int (*compar)(const struct dirent **, const struct dirent **));
#endif /* FUNCTIONS_H */

View File

@ -0,0 +1,20 @@
/*
* globaldefs.h - global definitions for distromatic
*
* Copyright (C) 2010 by Silvan Calarco <silvan.calarco@mambasoft.it>
*/
#ifndef GLOBALDEFS_H
#define GLOBALDEFS_H
#define PROGRAMNAME "@PACKAGE_NAME@"
#define PROGRAMVERSION "@PACKAGE_VERSION@"
#define DEFAULT_CONFIGFILE "@sysconfdir@/@PACKAGE_NAME@.conf"
#define DEFAULT_ARCH "@DEFAULT_ARCH@"
#define ARCHS_MAX 5
#define CONF_REP_SECTION 0
#define CONF_DEFAULTS_SECTION 1
#define CONF_MAINTAINERS_SECTION 2
#endif

206
src/include/headerlist.h Normal file
View File

@ -0,0 +1,206 @@
/*
* distromatic - tool for RPM based repositories
*
* Copyright (C) 2004-2007 by Silvan Calarco <silvan.calarco@mambasoft.it>
* Copyright (C) 2006 by Davide Madrisan <davide.madrisan@gmail.com>
*/
#ifndef HEADERLIST_H
#define HEADERLIST_H
#define PROVIDEDLIST_IDX_SIZE 20
#include "globaldefs.h"
#ifndef RPMFUNCTIONS_H
# include "rpmfunctions.h"
#endif
#define GENHEADER_CHANGELOG 1
#define GENHEADER_BASE 2
#define GENHEADER_REQUIREMENTS 4
#define GENHEADER_STATS 8
#define ALT_REPS_MAX 10
struct providedList {
char *name;
long flags;
int numproviders;
struct headerList **provider;
int numbuildproviders;
struct headerList **buildprovider;
int numversions;
char **version;
int buildpriority;
struct providedList *next;
};
struct fileTree {
char *name;
struct fileTree *firstchild;
struct fileTree *next;
struct fileTree *parent;
int numproviders;
struct headerList **provider;
};
struct warningList {
char* text;
struct warningList *next;
};
struct Require {
char *name;
long flags;
char *version;
struct providedList *resolved;
};
struct headerList {
char *name;
long epoch;
char *version;
char *release;
char *summary;
char *group;
char *description;
char *sourcename;
char *arch;
long size;
char **obsoletename;
uint_32 *obsoleteflags;
char **obsoleteversion;
int obsoletecount;
char **providename;
uint_32 *provideflags;
char **provideversion;
int providecount;
int requirecount;
struct Require **require;
struct providedList **provided;
int filenamecount;
struct fileTree **file;
int recursed;
struct requireList *requirelist;
struct headerList *next, *nextbrother;
struct headerSourceList *sourceheader;
};
struct headerSourceList {
char *name;
long epoch;
char *version;
char *release;
char *summary;
struct Packager *packager;
char *group;
char *description;
char *url;
char *license;
char **source;
char **patch;
char *arch;
char *buildarchs;
char *excludearch;
int *dirindex;
long size;
char **dirname;
char **basename;
int filenamecount;
long buildtime;
int altrepository;
int updrepository;
int requirecount;
struct Require **require;
struct providedList **required;
//struct providedList **provided;
int providecount;
struct requireList *requirelist;
struct headerSourceList *next;
struct changeLog *changelog;
struct headerList *firstchild[ARCHS_MAX];
struct warningList *firstwarning;
};
struct headerStats {
int headercount[ARCHS_MAX], headersourcecount;
long long headersize[ARCHS_MAX], headersourcesize;
struct headerSourceList **headersourcelistvec;
struct headerList **headerlistvec[ARCHS_MAX];
long changelog_total;
};
struct headerSourceListIndex {
struct headerSourceList *headersourcelist;
};
struct headerList *findPackageByName(struct headerList *list, char *name);
struct headerSourceList *findSourcePackage(
struct headerSourceList *list,
char *name, char *version, char *release, int altrepository);
struct configTag;
int getPackageInfoIntoHeaderList(Header h, struct headerList *hl);
int getPackageInfoIntoHeaderSourceList(
Header h, struct headerSourceList *hl);
int compareSourceHeaderBuildDate(const void *prt1, const void *prt2);
int compareGroup(const void *ptr1, const void *ptr2);
int generateHeaderStats(
struct configTag *ct,
int arch);
int
generateHeaderSourceStats(struct configTag *ct);
struct providedList*
findOrCreateProvidedListEntry(struct providedList **idx,
char* findname, int create);
struct fileTree*
findOrCreateFileTreeBrother(struct fileTree* *first,char* findname);
struct fileTree*
findOrCreateFileTreeEntry(struct fileTree* *first,char* findname);
void
cleanProvidedListIndex(struct configTag *ct, int arch);
void
createProvidedListIndex(struct providedList* *idx);
int generateHeaderList(
struct configTag *ct,
int arch);
int generateSourceHeaderList(struct configTag *ct, int mode);
/*int generateSourceHeaderList(
struct headerSourceList **headersourcelist,
const char *scanpath, const char **altscanpath, int mode);*/
int
addToSourceHeaderList(
struct headerSourceList **headersourcelist,
struct configTag *ct,
int mode,
int altrepository);
int
addToHeaderList(struct configTag *ct,
const char *scanpath, /*int mode,*/
const char* scantag,
const char* altscanpath[ALT_REPS_MAX],
const char* altscantag[ALT_REPS_MAX],
int arch);
struct warningList* addWarning(struct headerSourceList *pkg,char* text);
int getPackageNameFromFile(char *name);
#endif /* HEADERLIST_H */

40
src/include/reports.h Normal file
View File

@ -0,0 +1,40 @@
/*
* distromatic - tool for RPM based repositories
*
* Copyright (C) 2004-2007 by Silvan Calarco <silvan.calarco@mambasoft.it>
* Copyright (C) 2006 by Davide Madrisan <davide.madrisan@gmail.com>
*/
#ifndef GENHTML_H
#define GENHTML_H
#ifndef DISTROMATIC_H
# include "distromatic.h"
#endif
#ifndef HEADERLIST_H
# include "headerlist.h"
#endif
int comparePackagers(const void *ptr1, const void *ptr2);
int generateMaintainersPages(struct configTag *configtag);
int printHTMLWarnings(FILE *fout,struct configTag *configtag, struct headerSourceList* pkg, int mode);
void printpkgicon(FILE *fout, struct configTag *configtag, struct headerSourceList *s, int descr );
int generateStats(struct configTag *configtag,int arch);
int cleanHTMLFilesInc(char* dir);
int cleanHTMLFiles(struct configTag *ct);
int generateHTMLFiles(struct configTag *configtag,int arch);
int generateHTML_SRPMSFiles(struct configTag *configtag);
int generateHTMLMainIndex(struct configTag *configtag);
char *groupdirname(char *group,char *dest,unsigned int max);
int write_RPM_HTML(struct configTag *ct,FILE *fout, struct headerList *currheaderlist);
int print_datatables(struct configTag *ct, int arch);
char *ftname(struct fileTree* ft, char* buf, unsigned int bufsize);
void print_contents_subtree(FILE *f,
struct fileTree* ft,
struct configTag* ct,
char* buf, int bufsize);
int get_pkg_icon(struct headerSourceList *h,char *buf,int bufsize);
int generatePkgList(struct configTag *ct, int arch);
int generateSrcPkgList(struct configTag *ct);
#endif // HEADERLIST_H

23
src/include/requirelist.h Normal file
View File

@ -0,0 +1,23 @@
/*
* distromatic - tool for RPM based repositories
*
* Copyright (C) 2004-2006 by Silvan Calarco <silvan.calarco@mambasoft.it>
* Copyright (C) 2006 by Davide Madrisan <davide.madrisan@gmail.com>
*/
#ifndef REQUIRELIST_H
#define REQUIRELIST_H
struct requireList {
struct headerList *header;
struct requireList *next;
};
struct requireList *mergeRequireLists(
struct requireList *base, struct requireList *insert);
struct requireList *recurseRequireList(struct headerList *headerlist);
int printRequireList(FILE *f, struct requireList *requirelist);
#endif /* REQUIRELIST_H */

View File

@ -0,0 +1,58 @@
/*
* distromatic - tool for RPM based repositories
*
* Copyright (C) 2004-2007 by Silvan Calarco <silvan.calarco@mambasoft.it>
* Copyright (C) 2006 by Davide Madrisan <davide.madrisan@gmail.com>
*/
#ifndef RPMFUNCTIONS_H
#define RPMFUNCTIONS_H
#ifndef H_RPMLIB
# include <rpm/rpmlib.h>
#endif
#include "headerlist.h"
#define HEADERS_BUFFER_SIZE 2000000
unsigned int checkVersionWithFlags(const char* cmp1, const uint_32 flags, const char* cmp2);
void rpminit(void);
//int myHeaderGetEntry(Header h, int_32 tag, int *type, void** p, int *c);
char *headerGetStringEntry(Header h, const int tag);
char **headerGetStringArrayEntry(Header h, const int tag, int* count);
long long headerGetUIntEntry(Header h, const int tag);
void *headerGetUIntArrayEntry(Header h, const int tag, int *count);
int getHeader(char *headerFile, Header * h);
int getPackageRequires(
Header h, char ***requirename, uint_32 **requireflags,
char ***requireversion, int *requirecount);
int getPackageProvides(
Header h, char ***providename, uint_32 **provideflags,
char ***provideversion, int *providecount);
int getPackageObsoletes(
Header h, char ***obsoletename, uint_32 **obsoleteflags,
char ***obsoleteversion, int *obsoletecount);
int getPackageFilenames(
Header h, int **dirindexes,
char ***dirnames, int *dirnamescount,
char ***basenames, int *filenamescount);
int rpmnamecmp(char *filename1, char *filename2, int checkver);
int scanrpmnamecmp(const struct dirent **f1, const struct dirent **f2);
char* printrpmversion(char *s, int bufsize, long epoch, char *version, char *release);
#endif // RPMFUNCTIONS_H

22
src/missing/Makefile.am Normal file
View File

@ -0,0 +1,22 @@
# This file is part of `distromatic', the QiLinux RPM tool for the distribution
# Copyright (C) 2006 by Davide Madrisan <davide.madrisan@gmail.com>
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of version 2 of the GNU General Public License as published by the
# Free Software Foundation.
#
# 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.
# 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.
# config.h is in `$(top_builddir)'
AM_CPPFLAGS = -I$(top_srcdir)/src/include \
-I$(top_builddir)/src/include \
-I$(top_builddir)
EXTRA_DIST = malloc.c

356
src/missing/Makefile.in Normal file
View File

@ -0,0 +1,356 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
# This file is part of `distromatic', the QiLinux RPM tool for the distribution
# Copyright (C) 2006 by Davide Madrisan <davide.madrisan@gmail.com>
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of version 2 of the GNU General Public License as published by the
# Free Software Foundation.
#
# 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.
# 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.
VPATH = @srcdir@
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 = src/missing
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/VERSION $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/include/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFAULT_ARCH = @DEFAULT_ARCH@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
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@
RPMLIBS = @RPMLIBS@
RPM_PATH = @RPM_PATH@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
U = @U@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_aux_dir = @ac_aux_dir@
ac_ct_CC = @ac_ct_CC@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
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@
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@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
# config.h is in `$(top_builddir)'
AM_CPPFLAGS = -I$(top_srcdir)/src/include \
-I$(top_builddir)/src/include \
-I$(top_builddir)
EXTRA_DIST = malloc.c
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(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 src/missing/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign src/missing/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: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
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
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:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
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 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
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am:
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic distclean \
distclean-generic 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 pdf pdf-am ps ps-am uninstall uninstall-am
# 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:

35
src/missing/malloc.c Normal file
View File

@ -0,0 +1,35 @@
/* This file is part of `distromatic', the QiLinux RPM tool for the distribution.
* Copyright (C) 2006 by Davide Madrisan <davide.madrisan@gmail.com>
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of version 2 of the GNU General Public License as published by the
* Free Software Foundation.
*
* 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.
* 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.
*/
#if HAVE_CONFIG_H
#include <config.h>
#endif
#undef malloc
#include <sys/types.h>
void *malloc(size_t size);
void *rpl_malloc(size_t size);
/* allocate an size-byte block of memory from the heap;
* if size is zero, allocate a 1-byte block
*/
void *
rpl_malloc(size_t size)
{
return malloc(size ? size : 1);
}

2111
src/reports.c Normal file

File diff suppressed because it is too large Load Diff

148
src/requirelist.c Normal file
View File

@ -0,0 +1,148 @@
/*
* distromatic - tool for RPM based repositories
*
* Copyright (C) 2004-2007 by Silvan Calarco <silvan.calarco@mambasoft.it>
* Copyright (C) 2006 by Davide Madrisan <davide.madrisan@gmail.com>
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of version 2 of the GNU General Public License as published by the
* Free Software Foundation.
*
* 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.
* 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.
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#else
# if HAVE_STDLIB_H
# include <stdlib.h>
# endif
#endif
#include <stdio.h>
#if HAVE_STRING_H
# if !STDC_HEADERS && HAVE_MEMORY_H
# include <memory.h>
# endif
# include <string.h>
#endif
#if HAVE_STRINGS_H
# include <strings.h>
#endif
#ifndef HEADERLIST_H
# include "headerlist.h"
#endif
#ifndef REQUIRELIST_H
# include "requirelist.h"
#endif
#if !HAVE_MEMCPY
# define memcpy(d, s, n) bcopy ((s), (d), (n))
#endif
struct requireList *
mergeRequireLists(struct requireList *base, struct requireList *insert)
{
struct requireList *currbase, *currinsert, *prevbase;
currinsert = insert;
currbase = base;
prevbase = NULL;
while (currinsert) {
while ((currinsert) &&
((!currbase) ||
((strcmp(currbase->header->name,
currinsert->header->name) > 0)))) {
if (!prevbase) {
base = malloc(sizeof(struct requireList));
memcpy(base, currinsert, sizeof(struct requireList));
base->next = currbase;
} else
if (strcmp(prevbase->header->name,
currinsert->header->name)) {
prevbase->next = malloc(sizeof(struct requireList));
memcpy(prevbase->next, currinsert,
sizeof(struct requireList));
prevbase->next->next = currbase;
}
currinsert = currinsert->next;
}
if (currbase) {
prevbase = currbase;
currbase = currbase->next;
}
}
return base;
}
struct requireList *
recurseRequireList(struct headerList *headerlist)
{
struct requireList *currrequirelist, *recrequirelist;
currrequirelist = headerlist->requirelist;
recrequirelist = NULL;
if (headerlist->recursed < 2) {
headerlist->recursed = 1;
while (currrequirelist) {
if (currrequirelist->header->recursed < 1) {
/* if (!strcmp(headerlist->name,"glibc")) {
* printf("glibc with %s\n",curre
* }
* currrequirelist->header->recursed+=1;
*
* printf("recursing %s %d from %s %d\n",
* currrequirelist->header->name,
* currrequirelist->header->recursed,
* headerlist->name,headerlist->recursed); */
recrequirelist =
recurseRequireList(currrequirelist->header);
headerlist->requirelist =
mergeRequireLists(headerlist->requirelist,
recrequirelist);
} else {
/* printf("merging %s %d from %s %d\n",
* currrequirelist->header->name,
* currrequirelist->header->recursed,
* headerlist->name,headerlist->recursed); */
headerlist->requirelist =
mergeRequireLists(headerlist->requirelist,
currrequirelist->header->
requirelist);
}
currrequirelist = currrequirelist->next;
}
}
return headerlist->requirelist;
}
int
printRequireList(FILE *f, struct requireList *requirelist)
{
while (requirelist) {
fprintf(f,"%s ", requirelist->header->name);
requirelist = requirelist->next;
}
return 0;
}

372
src/rpmfunctions.c Normal file
View File

@ -0,0 +1,372 @@
/*
* distromatic - tool for RPM based repositories
*
* Copyright (C) 2004-2006 by Silvan Calarco <silvan.calarco@mambasoft.it>
* Copyright (C) 2006 by Davide Madrisan <davide.madrisan@gmail.com>
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of version 2 of the GNU General Public License as published by the
* Free Software Foundation.
*
* 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.
* 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.
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#if HAVE_STRING_H
# if !STDC_HEADERS && HAVE_MEMORY_H
# include <memory.h>
# endif
# include <string.h>
#endif
#if HAVE_STRINGS_H
# include <strings.h>
#endif
#include <fcntl.h>
#ifndef H_RPMLIB
# include <rpm/rpmlib.h>
#endif
#if RPM_VERSION >= 0x040100
#include <rpm/rpmts.h>
#else
#define rpmReadPackageFile(a,b,c,d) rpmReadPackageHeader(b,d,0,NULL,NULL)
#endif
#if RPM_VERSION >= 0x040409
#ifndef H_RPMEVR
#include <rpm/rpmevr.h>
#endif
#endif
#include <zlib.h>
#include <libiberty.h>
#include "functions.h"
#ifndef RPMFUNCTIONS_H
# include "rpmfunctions.h"
#endif
/*
* static int getPackageInfo(
* Header h, char **name, char **version, char **release,
* char **summary); */
static rpmts ts;
unsigned int checkVersionWithFlags(const char* cmp1, uint_32 flags, const char* cmp2) {
struct EVR_s evr1, evr2;
int vercmp = 0;
rpmEVRparse(cmp1, &evr1);
rpmEVRparse(cmp2, &evr2);
if (strlen(evr1.F[RPMEVR_E]) && strlen(evr2.F[RPMEVR_E])) vercmp=rpmvercmp(evr1.F[RPMEVR_E], evr2.F[RPMEVR_E]);
else if (strlen(evr2.F[RPMEVR_E])) vercmp = -1;
else if (strlen(evr1.F[RPMEVR_E])) vercmp = 1;
if (!vercmp) vercmp=rpmvercmp(evr1.F[RPMEVR_V], evr2.F[RPMEVR_V]);
if (!vercmp && strlen(evr1.F[RPMEVR_R]) && strlen(evr2.F[RPMEVR_R])) vercmp=rpmvercmp(evr1.F[RPMEVR_R], evr2.F[RPMEVR_R]);
if ((vercmp == 0) && (flags & RPMSENSE_EQUAL)) return 1;
else if ((vercmp == 1) && (flags & RPMSENSE_LESS)) return 1;
else if ((vercmp == -1) && (flags & RPMSENSE_GREATER)) return 1;
return 0;
}
/*
* get header from a file descriptor of a YUM compressed header file */
int
getHeader(char *headerFile, Header * h)
{
char buffer[HEADERS_BUFFER_SIZE];
int len;
/* check if file is a compressed header or a RPM/SRPM */
if (!strcmp(&headerFile[strlen(headerFile) - 4], ".hdr")) {
gzFile gzIn;
gzIn = gzopen(headerFile, "r");
if (gzIn == NULL) {
return 1;
} /* can't gzopen file */
len = gzread(gzIn, buffer, HEADERS_BUFFER_SIZE);
gzclose(gzIn);
/* header file is bigger than buffer */
if (len >= HEADERS_BUFFER_SIZE) {
return 2;
}
*h = headerLoad(buffer);
} else {
FD_t fd;
fd = Fopen(headerFile, "r");
if (fd == NULL || Ferror(fd)) {
return 1;
}
int rc;
#if RPM_VERSION >= 0x040100
rc = rpmReadPackageFile(ts, fd, headerFile, h);
if (rc != RPMRC_OK && rc != RPMRC_NOTTRUSTED && rc != RPMRC_NOKEY) {
/* fprintf(stderr, "Error: Failed reading file %s", headerFile); */
#else
rc = rpmReadPackageHeader(fd, h, NULL, NULL, NULL);
if (rc != 0) {
#endif
return 1;
}
fdClose(fd);
}
return 0;
}
char *
headerGetStringEntry(Header h, const int tag)
{
char *st = NULL;
HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
he->tag = tag;
if (headerGet(h, he, 0) && he->t == RPM_STRING_TYPE && he->c == 1)
st = xstrdup(he->p.str);
else
st = NULL;
//printf(" headerGetStringEntry tag:%d st:%s\n", he->tag, st);
he->p.ptr = _free(he->p.ptr);
return st;
}
char **
headerGetStringArrayEntry(Header h, const int tag, int* count)
{
char **st;
HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
he->tag = tag;
if (headerGet(h, he, 0) && he->t == RPM_STRING_ARRAY_TYPE && he->c >= 1) {
*count = he->c;
st = dupnargv(he->p.ptr, he->c);
} else {
*count = 0;
st = NULL;
}
//unsigned int i;
//for (i=0; i < he->c; i++) {
//fprintf(stderr," headerGetStringArrayEntry tag:%d string %d/%d:%s\n", he->tag, i+1, he->c, st[i]);
//}
he->p.ptr = _free(he->p.ptr);
return st;
}
long long headerGetUIntEntry(Header h, const int tag) {
HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
unsigned long long ret = -1;
he->tag = tag;
if (headerGet(h, he, 0) && he->c == 1) {
switch (he->t) {
case RPM_UINT8_TYPE:
ret = *he->p.ui8p;
break;
case RPM_UINT16_TYPE:
ret = *he->p.ui16p;
break;
case RPM_UINT32_TYPE:
ret = *he->p.ui32p;
break;
case RPM_UINT64_TYPE:
ret = *he->p.ui64p;
break;
default:
ret = -1;
break;
}
}
//fprintf(stderr," headerGetUIntEntry tag:%d uint %lld\n", he->tag, ret);
he->p.ptr = _free(he->p.ptr);
return ret;
}
void *headerGetUIntArrayEntry(Header h, const int tag, int *count) {
HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
void *ret = NULL;
he->tag = tag;
if (headerGet(h, he, 0) && he->c >= 1) {
*count = he->c;
switch (he->t) {
case RPM_UINT8_TYPE:
ret = memndup(he->p.ui8p, he->c * sizeof(he->p.ui8p));
break;
case RPM_UINT16_TYPE:
ret = memndup(he->p.ui16p, he->c * sizeof(he->p.ui16p));
break;
case RPM_UINT32_TYPE:
ret = memndup(he->p.ui32p, he->c * sizeof(he->p.ui32p));
//int i;
//for (i=0; i<he->c; i++) {
// printf("%d ",((int_32 *)ret)[i]);
//}
break;
case RPM_UINT64_TYPE:
ret = memndup(he->p.ui64p, he->c * sizeof(he->p.ui64p));
break;
default:
ret = NULL;
break;
}
}
//unsigned int i;
//for (i=0; i < he->c; i++) {
//fprintf(stderr," headerGetUIntArrayEntry tag:%d value:%ld\n", he->tag, ((rpmuint32_t*)ret)[i]);
//}
he->p.ptr = _free(he->p.ptr);
return ret;
}
int
getPackageRequires(Header h, char ***requirename, uint_32 **requireflags,
char ***requireversion, int *requirecount)
{
*requirename = headerGetStringArrayEntry(h, RPMTAG_REQUIRENAME, requirecount);
*requireflags = headerGetUIntArrayEntry(h, RPMTAG_REQUIREFLAGS, requirecount);
*requireversion = headerGetStringArrayEntry(h, RPMTAG_REQUIREVERSION, requirecount);
return 0;
}
int
getPackageProvides(Header h, char ***providename, uint_32 **provideflags,
char ***provideversion, int *providecount)
{
*providename = headerGetStringArrayEntry(h, RPMTAG_PROVIDENAME, providecount);
*provideflags = headerGetUIntArrayEntry(h, RPMTAG_PROVIDEFLAGS, providecount);
*provideversion = headerGetStringArrayEntry(h, RPMTAG_PROVIDEVERSION, providecount);
return 0;
}
int
getPackageObsoletes(Header h, char ***obsoletename, uint_32 **obsoleteflags,
char ***obsoleteversion, int *obsoletecount)
{
*obsoletename = headerGetStringArrayEntry(h, RPMTAG_OBSOLETENAME, obsoletecount);
*obsoleteflags = headerGetUIntArrayEntry(h, RPMTAG_OBSOLETEFLAGS, obsoletecount);
*obsoleteversion = headerGetStringArrayEntry(h, RPMTAG_OBSOLETEVERSION, obsoletecount);
return 0;
}
int
getPackageFilenames(Header h, int **dirindexes,
char ***dirnames, int *dirnamescount,
char ***basenames, int *filenamescount)
{
int count;
/* note: I assume that basenamecount == dirindexescount */
*dirindexes = headerGetUIntArrayEntry(h, RPMTAG_DIRINDEXES, &count);
*dirnames = headerGetStringArrayEntry(h, RPMTAG_DIRNAMES, dirnamescount);
*basenames = headerGetStringArrayEntry(h, RPMTAG_BASENAMES, filenamescount);
return 0;
}
int rpmnamecmp(char *filename1, char *filename2, int checkver) {
int end1=0, end2=0, f, i;
char c1,c2;
f=0;
/* find name end position assuming a "name-version-release" scheme */
for (i = strlen(filename1)-1; (i > 0) && (f < 2); i--) {
if (filename1[i] == '-') {
f++;
end1=i-1;
}
}
f=0;
for (i = strlen(filename2)-1; (i > 0) && (f < 2); i--) {
if (filename2[i] == '-') {
f++;
end2=i-1;
}
}
/* make comparison, case insensitive */
for (i=0; (i <= end1) && (i <= end2); i++) {
c1=filename1[i];
c2=filename2[i];
if ((c1 >= 'A') && (c1 <= 'Z')) c1=c1+'a'-'A';
if ((c2 >= 'A') && (c2 <= 'Z')) c2=c2+'a'-'A';
if (c1 < c2) return -1;
else if (c1 > c2) return 1;
}
if (end1 < end2) return -1;
else if (end1 > end2) return 1;
/* same name, sort by version */
if (checkver)
i=rpmvercmp(&filename2[i+1],&filename1[i+1]) * -1;
else
i=0;
return i;
}
int scanrpmnamecmp(const struct dirent **f1, const struct dirent **f2) {
return rpmnamecmp((char*)(*f1)->d_name,(char*)(*f2)->d_name,1);
}
char* printrpmversion(char *s, int bufsize, long epoch, char *version, char *release) {
if (strcmp(release,"")) {
if (epoch)
snprintf(s,bufsize,"%ld:%s-%s",epoch,version,release);
else
snprintf(s,bufsize,"%s-%s",version,release);
} else {
if (epoch)
snprintf(s,bufsize,"%ld:%s",epoch,version);
else
snprintf(s,bufsize,"%s",version);
}
return s;
}
void rpminit() {
#if RPM_VERSION >= 0x040100
rpmReadConfigFiles(NULL, NULL);
ts = rpmtsCreate();
// rpmtsSetVSFlags(ts, (rpmVSFlags_e)-1);
#endif
}