From 4beee71c4757b8fea0e79af418225444d6c55c01 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 3 Nov 2006 21:35:23 +0000 Subject: [PATCH 001/158] readd ... got lost somewhere --- AUTHORS | 3 + COPYING | 340 +++++ ChangeLog | 788 ++++++++++ INSTALL | 182 +++ Makefile.PL | 4 + Makefile.am | 62 + Makefile.in | 645 +++++++++ NEWS | 91 ++ README | 41 + THANKS | 29 + TODO | 12 + aclocal.m4 | 603 ++++++++ config.guess | 1500 +++++++++++++++++++ config.sub | 1616 +++++++++++++++++++++ configure | 3140 ++++++++++++++++++++++++++++++++++++++++ configure.ac | 236 +++ debian/README.Debian | 6 + debian/changelog | 6 + debian/compat | 1 + debian/control | 21 + debian/copyright | 31 + debian/cron.d.ex | 4 + debian/default | 10 + debian/dirs | 2 + debian/docs | 3 + debian/init.d | 84 ++ debian/postinst.ex | 41 + debian/postrm.ex | 39 + debian/preinst.ex | 37 + debian/prerm.ex | 40 + debian/rules | 99 ++ debian/watch | 12 + docs/Makefile.am | 40 + docs/Makefile.in | 374 +++++ docs/ps-watcher.8 | 743 ++++++++++ docs/ps-watcher.html | 764 ++++++++++ install-sh | 250 ++++ missing | 283 ++++ mkinstalldirs | 40 + post-configure.in | 80 + ps-watcher | 1298 +++++++++++++++++ ps-watcher.in.in | 1278 ++++++++++++++++ samples/README | 10 + samples/port-watch.ini | 13 + samples/sample.ini | 54 + samples/sample2.ini | 4 + samples/solaris.ini | 18 + tests/01.pod.t | 9 + tests/01.pod.t.in | 9 + tests/Makefile.am | 38 + tests/Makefile.in | 332 +++++ tests/args.cnf | 13 + tests/args.t | 38 + tests/args.t.in | 38 + tests/basic.cnf | 27 + tests/basic.cnf.in | 27 + tests/basic.t | 32 + tests/basic.t.in | 32 + tests/count.cnf | 12 + tests/count.t | 24 + tests/count.t.in | 24 + tests/driver | 48 + tests/full.cnf | 15 + tests/full.t | 34 + tests/full.t.in | 34 + tests/paction.cnf | 17 + tests/paction.t | 37 + touch.pl | 42 + 68 files changed, 15859 insertions(+) create mode 100644 AUTHORS create mode 100644 COPYING create mode 100644 ChangeLog create mode 100644 INSTALL create mode 100755 Makefile.PL create mode 100644 Makefile.am create mode 100644 Makefile.in create mode 100644 NEWS create mode 100644 README create mode 100644 THANKS create mode 100644 TODO create mode 100644 aclocal.m4 create mode 100755 config.guess create mode 100755 config.sub create mode 100755 configure create mode 100644 configure.ac create mode 100644 debian/README.Debian create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/cron.d.ex create mode 100644 debian/default create mode 100644 debian/dirs create mode 100644 debian/docs create mode 100644 debian/init.d create mode 100644 debian/postinst.ex create mode 100644 debian/postrm.ex create mode 100644 debian/preinst.ex create mode 100644 debian/prerm.ex create mode 100755 debian/rules create mode 100644 debian/watch create mode 100644 docs/Makefile.am create mode 100644 docs/Makefile.in create mode 100644 docs/ps-watcher.8 create mode 100644 docs/ps-watcher.html create mode 100755 install-sh create mode 100755 missing create mode 100755 mkinstalldirs create mode 100755 post-configure.in create mode 100755 ps-watcher create mode 100755 ps-watcher.in.in create mode 100644 samples/README create mode 100644 samples/port-watch.ini create mode 100644 samples/sample.ini create mode 100644 samples/sample2.ini create mode 100644 samples/solaris.ini create mode 100755 tests/01.pod.t create mode 100644 tests/01.pod.t.in create mode 100644 tests/Makefile.am create mode 100644 tests/Makefile.in create mode 100644 tests/args.cnf create mode 100755 tests/args.t create mode 100644 tests/args.t.in create mode 100644 tests/basic.cnf create mode 100644 tests/basic.cnf.in create mode 100755 tests/basic.t create mode 100755 tests/basic.t.in create mode 100644 tests/count.cnf create mode 100755 tests/count.t create mode 100644 tests/count.t.in create mode 100755 tests/driver create mode 100644 tests/full.cnf create mode 100755 tests/full.t create mode 100644 tests/full.t.in create mode 100644 tests/paction.cnf create mode 100644 tests/paction.t create mode 100755 touch.pl diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..938f37d --- /dev/null +++ b/AUTHORS @@ -0,0 +1,3 @@ +Rocky Bernstein + +# $Id: AUTHORS,v 1.2 2006/03/08 19:15:06 rockyb Exp $ diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..c4ac587 --- /dev/null +++ b/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + 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. + + + Copyright (C) 19yy + + 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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. + + , 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. diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..6cb206e --- /dev/null +++ b/ChangeLog @@ -0,0 +1,788 @@ +## +## autogenerated ChangeLog -- don't edit +## + +2006-03-10 Friday 19:33 Rocky Bernstein + + * NEWS: Last change before release + +2006-03-10 Friday 19:07 Rocky Bernstein + + * configure.ac, post-configure.in, ps-watcher.in.in, + tests/basic.t.in: Deal with time on netbsdelf and regression + tests. basic.t.in: generalize time handling - not just cygwin. + post-configure.in configure.ac: clean up a little. + +2006-03-10 Friday 13:12 Rocky Bernstein + + * tests/: args.t.in, basic.t.in, count.t.in, full.t.in: Run + ps-watcher in tests with configured Perl location. + +2006-03-10 Friday 12:47 Rocky Bernstein + + * tests/: full.cnf, full.t.in: Add a test and adjust for cygwin. + +2006-03-10 Friday 12:26 Rocky Bernstein + + * configure.ac, post-configure.in, ps-watcher.in.in, + tests/basic.t.in: Changes to make this work on more + architectures. configure.ac, post-configure.in: another attempt + to get invocation work eveywhere basic.t.in: test for cputime; + forgot ! + +2006-03-10 Friday 04:51 Rocky Bernstein + + * configure.ac: Darwin 8 is okay + +2006-03-10 Friday 04:50 Rocky Bernstein + + * configure.ac: Bug in running right Perl in post-configure + +2006-03-10 Friday 03:49 Rocky Bernstein + + * configure.ac, post-configure.in: Use PERL value specified more. + +2006-03-10 Friday 03:39 Rocky Bernstein + + * NEWS, configure.ac: Add configure option to specify Perl location + +2006-03-10 Friday 03:24 Rocky Bernstein + + * tests/args.t.in: typo: it's ok not okay. + +2006-03-10 Friday 03:21 Rocky Bernstein + + * configure.ac, ps-watcher.in.in, tests/args.t.in, + tests/basic.t.in, tests/full.t.in, tests/paction.t: Add minimal + cygwin support + +2006-03-09 Thursday 17:37 Rocky Bernstein + + * configure.ac, post-configure.in, tests/01.pod.t.in, + tests/Makefile.am: 01.pod.t.in: add POD testing routine + configure.ac: do chmod +x on perl-substituted files. + +2006-03-09 Thursday 16:46 Rocky Bernstein + + * NEWS, ps-watcher.in.in: Document security better. + +2006-03-08 Wednesday 22:52 Rocky Bernstein + + * configure.ac, ps-watcher.in.in, home-page/index.html: Get ready + for 1.06 release. + +2006-03-08 Wednesday 22:24 Rocky Bernstein + + * ps-watcher.in.in: Correction in getting signal name. + +2006-03-08 Wednesday 19:21 Rocky Bernstein + + * touch.pl: Reinstate since Makefile.am uses. + +2006-03-08 Wednesday 19:15 Rocky Bernstein + + * AUTHORS, Makefile.am, cvs2cl_usermap, post-configure.in, + ps-watcher.in.in, touch.pl: ps-watcher.in.in: Wasn't terminating + properly. Thanks to David G. Humes for noticing and fixing. + Modernize code a little bit + + *: rocky@panix.com -> rocky@cpan.org touch.pl: now handled inside + post-configure by Perl + +2006-02-03 Friday 02:23 Rocky Bernstein + + * ps-watcher.in.in: One more small typo. + +2006-02-03 Friday 02:15 Rocky Bernstein + + * post-configure.in, ps-watcher.in.in, home-page/index.html: Mostly + small changes: + + ps-watcher.in.in options are now stored in %opts. Some perlpod + grammar fixes. + + post-configure.in: Suggest "make && make check" (and not with + semicolon) + + home-page/index.html: Probably remove a W3C error. + +2006-01-17 Tuesday 10:00 Rocky Bernstein + + * home-page/index.html: Make valid HTML as per W3C. + +2005-10-12 Wednesday 01:14 Rocky Bernstein + + * ps-watcher.in.in, NEWS: Add BUGS section to manual to describe + common problems. + +2005-09-12 Monday 17:03 Rocky Bernstein + + * configure.ac: Now in 1.06cvs territory + +2005-09-12 Monday 17:03 Rocky Bernstein + + * ps-watcher.in.in: Guard against uninitialized variables + +2005-06-22 Wednesday 01:59 Rocky Bernstein + + * home-page/index.html: instead of ? + +2005-06-22 Wednesday 01:57 Rocky Bernstein + + * home-page/index.html: Correct grammar courtesy of Sir Monitor + Lizard, Ph. Mad. + +2005-05-17 Tuesday 22:00 Rocky Bernstein + + * NEWS: What's new. + +2005-05-17 Tuesday 09:56 Rocky Bernstein + + * configure.ac: NetBSD works like FreeBSD + +2005-05-17 Tuesday 09:52 Rocky Bernstein + + * COPYING, Makefile.am, NEWS, config.guess, config.sub, + configure.ac, missing, post-configure.in, docs/Makefile.am, + tests/Makefile.am: configure.ac: Darwin 7 is like Darwin5 & 6. + configure.ac, post-configure.in: check for at least perl 5.6 + + GPL address change. + +2005-04-09 Saturday 18:06 Rocky Bernstein + + * ps-watcher.in.in: Like this a tad better. + +2005-04-04 Monday 23:58 Rocky Bernstein + + * NEWS, ps-watcher.in.in: Note recent change. + +2005-04-04 Monday 23:53 Rocky Bernstein + + * THANKS: Add thanks to Iñaki Sánchez. + +2005-04-04 Monday 23:50 Rocky Bernstein + + * ps-watcher.in.in, tests/basic.cnf.in: Allow $ps_pat to be used in + action. Patch courtesy of Iñaki Sánchez. (i s a n c h e z at + unav dot es) + +2004-09-11 Saturday 13:29 Rocky Bernstein + + * docs/.cvsignore: More pod2htm stuff. + +2004-09-09 Thursday 10:58 Rocky Bernstein + + * NEWS, cvs2cl_header, cvs2cl_usermap: ChangeLog-creation + improvements. + +2004-09-07 Tuesday 13:51 Rocky Bernstein + + * Makefile.am, ps-watcher.in.in, docs/Makefile.am, + samples/port-watch.ini: Make distcheck works. Show how to use + $PROLOG to do a no-ps like thing such as watching a port (via + lsof). + +2004-05-26 Wednesday 13:46 Rocky Bernstein + + * ps-watcher.in.in: Small change. + +2004-05-26 Wednesday 13:42 Rocky Bernstein + + * Makefile.am, configure.ac, ps-watcher.in.in, docs/Makefile.am: + ps-watcher.in.in: smallish changes - call closelog on + termination, add prototype for pod_this(). + + docs/Makefile.am: ignore errors in building manual/html pages + + Makefile.am: target to create ChangeLog when building + distribution + + configure.ac: now in version 1.05 now. Allow maintainer mode (to + create ChangeLog) + +2004-02-15 Sunday 12:03 Rocky Bernstein + + * docs/Makefile.am: Set title to name without the .in. + +2004-01-18 Sunday 12:20 Rocky Bernstein + + * ps-watcher.in.in: Update copyright. + +2004-01-18 Sunday 11:49 Rocky Bernstein + + * ps-watcher.in.in: Improve documentation with respect to + perl-action. + +2004-01-15 Thursday 03:23 Rocky Bernstein + + * ps-watcher.in.in: perldoc fix. + +2004-01-15 Thursday 03:02 Rocky Bernstein + + * tests/paction.t: Regression test for $PROLOG, $EPILOG and + perl-action. + +2004-01-15 Thursday 03:00 Rocky Bernstein + + * configure.ac, ps-watcher.in.in, tests/Makefile.am, + tests/paction.cnf: Add $PROLOG, $EPILOG and perl-action sections. + Allows one to accumulate information over all processes and take + action on that. + +2004-01-10 Saturday 04:39 Rocky Bernstein + + * ps-watcher.in.in: Documentation enhancement, I think. + +2003-11-22 Saturday 12:31 Rocky Bernstein + + * ps-watcher.in.in: And another formatting change... + +2003-11-22 Saturday 12:27 Rocky Bernstein + + * ps-watcher.in.in: One more trivial typo.... + +2003-11-22 Saturday 12:26 Rocky Bernstein + + * ps-watcher.in.in: Documentation typo. + +2003-11-22 Saturday 12:01 Rocky Bernstein + + * NEWS, configure.ac: Get ready for new (minor) release. + +2003-11-21 Friday 02:36 Rocky Bernstein + + * ps-watcher.in.in, tests/basic.cnf.in, tests/basic.t.in: Add + first-trigger feature. + +2003-09-11 Thursday 03:17 Rocky Bernstein + + * NEWS: Get ready for a release. + +2003-09-10 Wednesday 07:30 Rocky Bernstein + + * ps-watcher.in.in: Fix example configuration as suggested in bug + #776229. + +2003-09-05 Friday 00:23 Rocky Bernstein + + * ps-watcher.in.in: More complicated trigger example suggested by + jason + +2003-09-03 Wednesday 02:04 Rocky Bernstein + + * ps-watcher.in.in: Add troubleshooting section + +2003-09-03 Wednesday 01:42 Rocky Bernstein + + * configure.ac, ps-watcher.in.in: Fixes for FreeBSD + +2003-08-31 Sunday 21:22 Rocky Bernstein + + * tests/basic.cnf.in: perhaps some processes use so little CPU that + the elapsed time will round to zero. Deal with it. + +2003-08-30 Saturday 20:49 Rocky Bernstein + + * ps-watcher.in.in: Update date. + +2003-08-29 Friday 10:49 Rocky Bernstein + + * configure.ac: Get ready for another release. + +2003-08-29 Friday 10:48 Rocky Bernstein + + * tests/: args.t.in, basic.t.in, count.t.in, full.t.in: Regression + tests need to deal with timestamped output. + +2003-08-29 Friday 10:47 Rocky Bernstein + + * ps-watcher.in.in: Add syslog-like timestamp to logfile output. + Problems with getting ps-output now appears only on debug output. + +2003-08-29 Friday 10:45 Rocky Bernstein + + * post-configure.in: Use -w (warning) on perl invocation + +2003-08-13 Wednesday 02:33 Rocky Bernstein + + * configure.ac: PS_CAN_RETURN_MULTIPLE_LINES not set on AIX which + broke it. + +2003-07-11 Friday 05:56 Rocky Bernstein + + * Makefile.am: Add sample files + +2003-07-11 Friday 05:47 Rocky Bernstein + + * configure.ac: typo + +2003-07-11 Friday 05:46 Rocky Bernstein + + * configure.ac: Get ready for 1.0 release. + +2003-07-11 Friday 05:43 Rocky Bernstein + + * Makefile.am, tests/Makefile.am, tests/args.t.in, + tests/count.t.in, tests/full.t.in: Make "make distcheck" work. + +2003-07-11 Friday 05:42 Rocky Bernstein + + * THANKS: Update as appropriate. + +2003-07-10 Thursday 12:20 Rocky Bernstein + + * configure.ac, post-configure.in: A tad better for making "make + distcheck" work: Use $srcdir in post-configure and arrange for + srcdir to be passed in. + +2003-07-10 Thursday 11:50 Rocky Bernstein + + * THANKS, TODO, config.cache, configure.ac, ps-watcher.in.in: Deal + with ps (e.g. Solaris's) which return more than one line for a + single pid. + +2003-07-10 Thursday 11:42 Rocky Bernstein + + * ps-watcher.in.in: Stupid mistake - comments are # not /* */. + +2003-05-19 Monday 16:33 Rocky Bernstein + + * configure.ac: Accomodate darwin6 + +2003-05-19 Monday 16:33 Rocky Bernstein + + * tests/args.t.in: Add one test of --nosyslog + +2003-05-19 Monday 15:58 Rocky Bernstein + + * configure.ac: Add AIX support. + +2003-05-16 Friday 00:12 Rocky Bernstein + + * README: IniConf is now called Config::IniFiles + +2003-03-06 Thursday 05:57 Rocky Bernstein + + * configure.ac: Failed full test. Need to add -x. + +2003-03-06 Thursday 05:48 Rocky Bernstein + + * tests/full.cnf: Don't assume first is pid 1! + +2003-03-06 Thursday 05:37 Rocky Bernstein + + * configure.ac, tests/Makefile.am, tests/.cvsignore, + tests/full.cnf, tests/full.t.in: Add test that we can trigger on + watching processes other than the ones under our account. + +2003-03-06 Thursday 03:54 Rocky Bernstein + + * Makefile.am, NEWS, config.guess, configure.ac, docs/Makefile.am, + tests/Makefile.am: Changes for Mac OS/X + +2003-03-04 Tuesday 18:01 Rocky Bernstein + + * aclocal.m4, docs/Makefile.am, tests/Makefile.in: Add more + automake conversion idioms + +2003-03-04 Tuesday 14:14 Rocky Bernstein + + * autogen.sh: Omitted running aclocal, autoconf, automake... + +2003-03-04 Tuesday 14:08 Rocky Bernstein + + * docs/: Makefile.am, Makefile.in: More automake conversion pains. + +2003-03-04 Tuesday 14:05 Rocky Bernstein + + * .cvsignore, MANIFEST: MANIFEST: not used in automake + +2003-03-04 Tuesday 14:03 Rocky Bernstein + + * NEWS, autogen.sh: autogen.sh: useful for CVS NEWS: what's been + happening? + +2003-03-04 Tuesday 13:59 Rocky Bernstein + + * Makefile.am, Makefile.in: More automake conversion work. + Makefile.am: forgot to add Makefile.PL. Makefile.in: superceded + by Makfile.am + +2003-03-04 Tuesday 13:55 Rocky Bernstein + + * AUTHORS, Makefile.am, Makefile.in, NEWS, aclocal.m4, version, + docs/Makefile.am, docs/Makefile.in, tests/Makefile.am, + tests/Makefile.in: Convert to use Makefile.am + +2003-03-04 Tuesday 02:53 Rocky Bernstein + + * configure.ac, ps-watcher.in.in, version, samples/sample.ini, + tests/args.cnf: Changes for BSD/OS. Also potentially a bug in + FreeBSD. + +2003-03-02 Sunday 16:35 Rocky Bernstein + + * ps-watcher.in.in: More small document changes. Make HTML come out + a tad better. + +2003-03-02 Sunday 15:28 Rocky Bernstein + + * ps-watcher.in.in: Update link for netwinder location! + +2003-03-01 Saturday 21:38 Rocky Bernstein + + * MANIFEST: Typo. + +2003-03-01 Saturday 21:37 Rocky Bernstein + + * NEWS: What's up. + +2003-03-01 Saturday 21:35 Rocky Bernstein + + * MANIFEST: Add Changelog + +2003-03-01 Saturday 21:23 Rocky Bernstein + + * samples/sample.ini: Add $args example. + +2003-03-01 Saturday 21:12 Rocky Bernstein + + * MANIFEST, configure.ac, ps-watcher.in.in: Add variables to + control what ps can do, e.g. can nuke header line, has custom + title (for nuking header line), what time variable we can test + on. + +2003-03-01 Saturday 21:09 Rocky Bernstein + + * tests/: .cvsignore, args.t.in, basic.cnf, basic.cnf.in: Don't + assume etime is a ps-variable. Thanks, FreeBSD. + +2003-03-01 Saturday 21:08 Rocky Bernstein + + * docs/Makefile.in: Cater to brain-dead make on FreeBSD. + +2003-02-28 Friday 16:45 Rocky Bernstein + + * MANIFEST, configure.ac: configure.ac: add freebsd4 check + MANIFEST: add args test files + +2003-02-28 Friday 13:37 Rocky Bernstein + + * config.sub: Update with more recent version of this. + +2003-02-28 Friday 12:34 Rocky Bernstein + + * tests/: .cvsignore, args.cnf, args.t.in: Add args regression + test. + +2003-02-28 Friday 12:33 Rocky Bernstein + + * configure.ac, ps-watcher.in.in, tests/Makefile.in, + tests/basic.cnf, tests/basic.t.in, tests/count.t.in: Add args + documentation and regression tests. count.t.in, basic.t.in: set + perl mode for emacs + +2003-02-27 Thursday 23:46 Rocky Bernstein + + * configure.ac, ps-watcher.in.in, version: Add $args variable to + test on entire command. Perpare to make into another version. + +2003-02-27 Thursday 21:21 Rocky Bernstein + + * configure.ac: Add args to the list of variables that are + accepted. + +2003-01-27 Monday 22:41 Rocky Bernstein + + * MANIFEST, configure.stamp, version: MANIFEST: configre.in -> + configure.ac Other files not sure about, but we'll try + initially... + +2003-01-27 Monday 22:37 Rocky Bernstein + + * configure.ac: Remove touch of stamp file. Dunno... + +2003-01-27 Monday 22:35 Rocky Bernstein + + * configure.ac: Bump version number. + +2003-01-27 Monday 22:34 Rocky Bernstein + + * Makefile.in, NEWS, configure.ac, configure.in, ps-watcher.in.in, + samples/sample.ini: Bug in running make dist. + + Small documentation bug in manual and HTML. Had @PROGRAM@ rather + than @PACKAGE@ so name of package was not in man/html. + + Give example where you want to match all processes except one. + + Print out errors in configuration file + + configure.in -> configure.ac (thanks, autoconf) + + Config::IniConf now gives a syntax error for empty section: []. + Change that. + +2002-10-03 Thursday 14:55 rocky + + * .cvsignore: Seems to be a new thing with autoconf. + +2002-10-03 Thursday 14:55 rocky + + * home-page/index.html: Changes to move to sourceforge project: + download/manpage locations changed. Add link to CVS! And add + sourceforge logo. + +2002-09-24 Tuesday 11:21 rocky + + * NEWS: Update as appropriate. + +2002-09-24 Tuesday 11:20 rocky + + * Makefile.in: Bug in running post-configure when doing a "make + dist". Add "perl" to command. + +2002-09-24 Tuesday 11:18 rocky + + * ps-watcher.in.in: Add example which shows excluding a process + from consideration. + +2002-09-24 Tuesday 11:00 rocky + + * .cvsignore: post-configure is derived. + +2002-09-24 Tuesday 10:59 rocky + + * post-configure.in: Things that need to be done after running + configure. In particular, rewrinte #!/bin/perl lines. + +2002-09-24 Tuesday 10:56 rocky + + * NEWS: Document small doc bug. Version is now 0.96 + +2002-09-24 Tuesday 10:54 rocky + + * ps-watcher.in.in: Document typo. Was using @PROGRAM@ instead of + @PACKAGE@. + +2002-02-06 Wednesday 04:55 rocky + + * MANIFEST: Now derived from post-configure.in + +2002-02-06 Wednesday 04:54 rocky + + * configure.in: Remove bsdstart -- space in it mess things up. + +2002-02-06 Wednesday 04:13 rocky + + * tests/basic.t.in: Turn into a derived file. + +2002-02-06 Wednesday 04:13 rocky + + * tests/: .cvsignore, count.t.in: .cvsignore: ignore derived tests + basic.t: is now derived count.t.in: new test + +2002-02-06 Wednesday 04:10 rocky + + * tests/count.cnf: count.cnf: test "none" and $count > 1 basic.cnf: + minor changes like cvs id line. + +2002-02-06 Wednesday 04:10 rocky + + * docs/Makefile.in: Makefile.in: migrating more to automake: use + @PACKAGE@ now. + +2002-02-06 Wednesday 04:09 rocky + + * Makefile.in, aclocal.m4, configure.in, missing, ps-watcher.in.in: + aclocal.m4 missing, Makefile: New files migrating more to + automake. ps-watcher.in.in: fix bug in "once" and "count > 1" + +2001-11-24 Saturday 19:03 rocky + + * home-page/index.html: Update location. + +2001-06-25 Monday 00:23 rocky + + * ps-watcher.in.in: Another example with count != 1 (syslogd) + changed to count > 4 (httpd). count != 1 may be confusing since + when count == 0 we don't trigger. + +2001-06-25 Monday 00:22 rocky + + * samples/sample.ini: Update to show occurs = none. syslogd + example was incorrect. Change to httpd. + +2001-06-25 Monday 00:20 rocky + + * tests/basic.cnf: Add test for when no matching process exists. + +2001-06-25 Monday 00:17 rocky + + * MANIFEST: Add NEWS + +2001-06-25 Monday 00:16 rocky + + * ps-watcher.in.in: Allow "occurs = none" to fire if no processes + exist. Update Copyright too. + +2001-05-31 Thursday 16:24 rocky + + * tests/basic.cnf: looks like [] is no longer valid. + +2000-09-02 Saturday 18:51 rocky + + * ps-watcher.in.in: Comment backtick problem + +2000-09-02 Saturday 18:43 rocky + + * ps-watcher.in.in: Hopefully this time we've fixed the backtick + problem in a process name. + + Improve description section of doc. + +2000-09-02 Saturday 04:07 rocky + + * ps-watcher.in.in: Add --doc option to print text documentation. + Escape backticks in process names + +2000-04-10 Monday 12:17 rocky + + * home-page/index.html: Initial cut. + +2000-04-09 Sunday 22:43 rocky + + * THANKS: Out of babblefish. + +2000-04-09 Sunday 22:25 rocky + + * THANKS: Correct from pecarry-speak. + +2000-04-09 Sunday 22:06 rocky + + * README: This time for sure? + +2000-04-09 Sunday 22:02 rocky + + * ps-watcher.in.in: Add blank line after =pod for brain-dead + Red-Hat 6.1's brain-deat pod2man program. + +2000-04-09 Sunday 21:58 rocky + + * README: Change invocation example. + +2000-04-09 Sunday 20:40 rocky + + * samples/README: Correct file names. Add Id line. + +2000-04-09 Sunday 20:39 rocky + + * samples/sample.ini: Add Id line. + +2000-04-09 Sunday 20:37 rocky + + * samples/README: Document what each sample does. + +2000-04-09 Sunday 20:37 rocky + + * docs/Makefile.in: Makefile.in: add uninstall. + +2000-04-09 Sunday 20:36 rocky + + * Makefile.in, ps-watcher.in.in: Makefile.in: add uninstall. + post-configure: remove Open3 module check ps-watcher.in.in: Lots + of doc changes. Usage on finding no config file. + +2000-04-09 Sunday 20:25 rocky + + * README: Add quick instructions. Correct mistakes. + +2000-04-09 Sunday 20:13 rocky + + * MANIFEST: Add samples readme. + +2000-03-27 Monday 01:54 rocky + + * tests/.cvsignore: Guess we gotta add this one too. + +2000-03-27 Monday 01:53 rocky + + * tests/: Makefile.in, basic.cnf, driver: Now have some basic + tests. + +2000-03-27 Monday 01:51 rocky + + * .cvsignore, MANIFEST, Makefile.in, ps-watcher.in.in: MANIFEST: + it's a Perl thing. But probably a good idea Makefile.in now uses + it ps-watcher.in.in: remove uninitialized variables in + elapsed2secs + +2000-03-22 Wednesday 07:11 rocky + + * samples/sample.ini: Simple first. + +2000-03-22 Wednesday 07:09 rocky + + * samples/sample.ini: Show off more features. + +2000-03-22 Wednesday 07:08 rocky + + * Makefile.in, TODO, configure.in, ps-watcher.in.in: Makefile.in: + Deal with .in.in TODO: remove done things. Add others + (regresssion tests) ps-watcher.in.in: Add signal handling and + stating configuration file As is usual lots of doc changes. + +2000-03-21 Tuesday 03:20 rocky + + * Makefile.PL: To aid perl to GNU factions. + +2000-03-21 Tuesday 03:17 rocky + + * samples/: sample2.ini, solaris.ini: sampl2.ini: change for Linux. + +2000-03-21 Tuesday 03:16 rocky + + * docs/Makefile.in: Don't need L<> warning any more. + +2000-03-21 Tuesday 03:15 rocky + + * TODO, config.cache, configure.in, ps-watcher.in.in: + post-configure with IniConf version 0.97. ps-watcher.in.in - + many small changes for Linux ps output one token max (no + command) if no ps output skip to next line (ignore terminated + processes) + +2000-03-21 Tuesday 02:23 rocky + + * Makefile.in: Make dist works. Get config.guess, config.sub and + @PROGRAM@.in.in + +2000-03-20 Monday 16:14 rocky + + * configure.in: Add Linux stuff and tests/Makefile + +2000-03-20 Monday 16:12 rocky + + * ps-watcher.in.in: Doc changes. + +2000-03-20 Monday 15:43 rocky + + * configure.in: Substitute in PROGRAM. + +2000-03-20 Monday 09:58 root + + * Makefile.in, README, configure.in, ANNOUNCE, COPYING, INSTALL, + THANKS, TODO, config.cache, config.guess, config.sub, install-sh, + mkinstalldirs, ps-watcher.in.in, touch.pl, docs/Makefile.in, + samples/sample.ini, samples/sample2.ini, samples/solaris.ini: + Imported sources + +2000-03-20 Monday 09:58 root + + * Makefile.in, README, configure.in, ANNOUNCE, COPYING, INSTALL, + THANKS, TODO, config.cache, config.guess, config.sub, install-sh, + mkinstalldirs, ps-watcher.in.in, touch.pl, docs/Makefile.in, + samples/sample.ini, samples/sample2.ini, samples/solaris.ini: + Initial revision + diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..b42a17a --- /dev/null +++ b/INSTALL @@ -0,0 +1,182 @@ +Basic Installation +================== + + These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, a file +`config.cache' that saves the results of its tests to speed up +reconfiguring, and a file `config.log' containing compiler output +(useful mainly for debugging `configure'). + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If at some point `config.cache' +contains results you don't want to keep, you may remove or edit it. + + The file `configure.in' is used to create `configure' by a program +called `autoconf'. You only need `configure.in' if you want to change +it or regenerate `configure' using a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes awhile. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. You can give `configure' +initial values for variables by setting them in the environment. Using +a Bourne-compatible shell, you can do that on the command line like +this: + CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure + +Or on systems that have the `env' program, you can do it like this: + env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not supports the `VPATH' +variable, you have to compile the package for one architecture at a time +in the source code directory. After you have installed the package for +one architecture, use `make distclean' before reconfiguring for another +architecture. + +Installation Names +================== + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=PATH' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + + There may be some features `configure' can not figure out +automatically, but needs to determine by the type of host the package +will run on. Usually `configure' can figure that out, but if it prints +a message saying it can not guess the host type, give it the +`--host=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name with three fields: + CPU-COMPANY-SYSTEM + +See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the host type. + + If you are building compiler tools for cross-compiling, you can also +use the `--target=TYPE' option to select the type of system they will +produce code for and the `--build=TYPE' option to select the type of +system on which you are compiling the package. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Operation Controls +================== + + `configure' recognizes the following options to control how it +operates. + +`--cache-file=FILE' + Use and save the results of the tests in FILE instead of + `./config.cache'. Set FILE to `/dev/null' to disable caching, for + debugging `configure'. + +`--help' + Print a summary of the options to `configure', and exit. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--version' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`configure' also accepts some other, not widely useful, options. diff --git a/Makefile.PL b/Makefile.PL new file mode 100755 index 0000000..a71d15e --- /dev/null +++ b/Makefile.PL @@ -0,0 +1,4 @@ +#/usr/bin/perl +print "Got'cha! This program uses ./configure.\n"; +print "Just a moment while I transfer your call...\n"; +exec "./configure"; diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..594bf1e --- /dev/null +++ b/Makefile.am @@ -0,0 +1,62 @@ +############################################################################## +# $Id: Makefile.am,v 1.12 2006/03/09 17:38:14 rockyb Exp $ +# Copyright (C) 2003, 2004, 2006 Rocky Bernstein +# 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., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301 USA +############################################################################## + +SUBDIRS = docs tests +noinst_SCRIPTS = post-configure.in touch.pl +EXTRA_DIST = post-configure.in ps-watcher.in.in ps-watcher \ + touch.pl Makefile.PL \ + samples/README samples/sample.ini samples/sample2.ini \ + samples/port-watch.ini samples/solaris.ini +bin_SCRIPTS = ps-watcher +PERL = @PERL@ + +DISTCLEANFILES = ps-watcher ps-watcher.stamp + + +# The keeps automake from substituting PS_VARS +PS_VARS = '' + +# Build all forms of documentation: manual-pages and HTML +test: + echo "Checking that things work.."; \ + (cd tests && $(PERL) ./driver) + +# A timestamp file is used to record whether or not we've created +# $(PROGRAM) from $(PROGRAM).in. During debugging if is often more +# convenient to modify $(PROGRAM) rather than $(PROGRAM).in. +$(PACKAGE).stamp: $(PACKAGE) + @cp -p $(PACKAGE) $(PACKAGE).in ; \ + $(srcdir)/touch.pl $@ + +# cvs2cl +MAINTAINERCLEANFILES = ChangeLog + +if MAINTAINER_MODE + +.PHONY: ChangeLog +ChangeLog: + $(CVS2CL) -W 450 --header $(srcdir)/cvs2cl_header --utc -w -I ChangeLog --usermap $(srcdir)/cvs2cl_usermap -P + +ACLOCAL_AMFLAGS=-I . + +endif + + + + diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 0000000..8272b6d --- /dev/null +++ b/Makefile.in @@ -0,0 +1,645 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 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@ + +############################################################################## +# $Id: Makefile.am,v 1.12 2006/03/09 17:38:14 rockyb Exp $ +# Copyright (C) 2003, 2004, 2006 Rocky Bernstein +# 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., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301 USA +############################################################################## + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = . +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +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@ +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/post-configure.in \ + $(srcdir)/ps-watcher.in.in $(top_srcdir)/configure AUTHORS \ + COPYING ChangeLog INSTALL NEWS THANKS TODO config.guess \ + config.sub install-sh missing mkinstalldirs +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(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 configure.status.lineno +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = post-configure ps-watcher.in ps-watcher +am__installdirs = "$(DESTDIR)$(bindir)" +binSCRIPT_INSTALL = $(INSTALL_SCRIPT) +SCRIPTS = $(bin_SCRIPTS) $(noinst_SCRIPTS) +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-exec-recursive install-info-recursive \ + install-recursive installcheck-recursive installdirs-recursive \ + pdf-recursive ps-recursive uninstall-info-recursive \ + uninstall-recursive +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); }; } +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CVS2CL = @CVS2CL@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PS = @PS@ +PS_ARGS = @PS_ARGS@ +PS_ARGS_FMT = @PS_ARGS_FMT@ +PS_CAN_RETURN_MULTIPLE_LINES = @PS_CAN_RETURN_MULTIPLE_LINES@ +PS_CUSTOM_HEADER = @PS_CUSTOM_HEADER@ +PS_FULLCMD_FMT = @PS_FULLCMD_FMT@ +PS_NO_NULL_HEADER = @PS_NO_NULL_HEADER@ +PS_PID_OPTS = @PS_PID_OPTS@ +PS_TIME_VAR = @PS_TIME_VAR@ + +# The keeps automake from substituting PS_VARS +PS_VARS = '' +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__leading_dot = @am__leading_dot@ +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@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +SUBDIRS = docs tests +noinst_SCRIPTS = post-configure.in touch.pl +EXTRA_DIST = post-configure.in ps-watcher.in.in ps-watcher \ + touch.pl Makefile.PL \ + samples/README samples/sample.ini samples/sample2.ini \ + samples/port-watch.ini samples/solaris.ini + +bin_SCRIPTS = ps-watcher +DISTCLEANFILES = ps-watcher ps-watcher.stamp + +# cvs2cl +MAINTAINERCLEANFILES = ChangeLog +@MAINTAINER_MODE_TRUE@ACLOCAL_AMFLAGS = -I . +all: all-recursive + +.SUFFIXES: +am--refresh: + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ + cd $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu 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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +post-configure: $(top_builddir)/config.status $(srcdir)/post-configure.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +ps-watcher.in: $(top_builddir)/config.status $(srcdir)/ps-watcher.in.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +ps-watcher: $(top_builddir)/config.status ps-watcher.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +install-binSCRIPTS: $(bin_SCRIPTS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" + @list='$(bin_SCRIPTS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f $$d$$p; then \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ + else :; fi; \ + done + +uninstall-binSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(bin_SCRIPTS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done +uninstall-info-am: + +# 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): + @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; \ + (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" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @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; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (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; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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 || \ + tags="$$tags $$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; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + 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; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + mkdir $(distdir) + $(mkdir_p) $(distdir)/. $(distdir)/samples $(distdir)/tests + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$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; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + distdir) \ + || exit 1; \ + fi; \ + done + -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -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 $(SHELL) $(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-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) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(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) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(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) + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && 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 + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' +distuninstallcheck: + @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 $(SCRIPTS) +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 -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +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 + +info: info-recursive + +info-am: + +install-data-am: + +install-exec-am: install-binSCRIPTS + +install-info: install-info-recursive + +install-man: + +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: uninstall-binSCRIPTS uninstall-info-am + +uninstall-info: uninstall-info-recursive + +.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ + check-am clean clean-generic clean-recursive ctags \ + ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \ + dist-tarZ dist-zip distcheck distclean distclean-generic \ + distclean-recursive distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-binSCRIPTS install-data \ + install-data-am install-exec install-exec-am install-info \ + install-info-am install-man install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic maintainer-clean-recursive \ + mostlyclean mostlyclean-generic mostlyclean-recursive pdf \ + pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ + uninstall-binSCRIPTS uninstall-info-am + + +# Build all forms of documentation: manual-pages and HTML +test: + echo "Checking that things work.."; \ + (cd tests && $(PERL) ./driver) + +# A timestamp file is used to record whether or not we've created +# $(PROGRAM) from $(PROGRAM).in. During debugging if is often more +# convenient to modify $(PROGRAM) rather than $(PROGRAM).in. +$(PACKAGE).stamp: $(PACKAGE) + @cp -p $(PACKAGE) $(PACKAGE).in ; \ + $(srcdir)/touch.pl $@ + +@MAINTAINER_MODE_TRUE@.PHONY: ChangeLog +@MAINTAINER_MODE_TRUE@ChangeLog: +@MAINTAINER_MODE_TRUE@ $(CVS2CL) -W 450 --header $(srcdir)/cvs2cl_header --utc -w -I ChangeLog --usermap $(srcdir)/cvs2cl_usermap -P +# 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: diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..f0d0709 --- /dev/null +++ b/NEWS @@ -0,0 +1,91 @@ +Changes from 1.05 to 1.06 (March 10, 2006) + +- Add minimal cygwin support; go over NetBSD and OpenBSD support + +- Add --path option to specify path used in running commands + +- ps-watcher wasn't terminating properly when given a signal. Thanks + to David G. Humes for noticing and fixing. + +- Modernize code a little bit. + +- Guard against unintialized variable conf_time + +- Add BUGS section to manual to describe common problems. + +- Add configure option to specify Perl location + + +Changes from 1.04 to 1.05 (May 18, 2005) + +- Allow $ps_pat to be used in an action. +- Show how to use PROLOG to do non-ps-like things such as watching a + port (via lsof). +- OS tweeks: NetBSD works like FreeBSD, Darwin 7 works. + +Changes from 1.03 to 1.04 (Jan 18, 2004) + +- Add $PROLOG, $EPILOG and perl-action sections. Allows one to + accumulate information over all processes and take action on that. + +- ps-variable order in GNU/Linux was changed to ensure that single-token + attributes don't get messed up by multiple-token attributes. + +Changes from 1.02 to 1.03 (Nov 22, 2003) + +- Add occurs=first-trigger to stop after first trigger rather than first + pattern match. + +Changes from 1.01 to 1.02 (Sept 10, 2003) + Small bug fixes/feature enhancements and documentation fixes. + +Changes from 1.0 to 1.01 (Aug 21, 2003) + +- Log output (not syslog) now contains timestamp, program and process name + +- Errors concerning getting ps information logged only at debug levels + +- Add -w to perl invocation. + +Changes from 0.99 to 1.0 (Jul 10, 2003) + Provision for ps returning multiple lines of output. (Solaris does this for + LWP processes) + make "make distcheck" work. + +Changes from 0.98 to 0.99: (May 19, 2003) + Add AIX support, accomodate Darwin6. + +Changes from 0.97 to 0.98: (Mar 5, 2003) + Works now on BSD/OS and Mac OS/X + Bug fix for FreeBSD. + Convert to use automake + +Changes from 0.96 to 0.97: (Mar 1, 2003) + Portablity fixes - Now runs on FreeBSD. + Tested on the sourceforge compile farm. + Add $args variable to be able to use full ps command. Useful for working + with scripts that list the interpreter rather than the script name. + +Changes from 0.95 to 0.96: + Bug in running make dist. + + Small documentation bug in manual and HTML. Had @PROGRAM@ rather than + @PACKAGE@ so name of package was not in man/html. + + Give example where you want to match all processes except one. + + Print out errors in configuration file + + configure.in -> configure.ac (thanks, autoconf) + + Config::IniConf now gives a syntax error for empty section: []. + Change that. + + +Changes 0.93 - 0.95 + +Make "occurs = none" mean to run if there are no matching ps processes. + +ps-watcher 0.93 -- first general release. + +$Id: NEWS,v 1.27 2006/03/10 19:33:59 rockyb Exp $ diff --git a/README b/README new file mode 100644 index 0000000..ddcecb9 --- /dev/null +++ b/README @@ -0,0 +1,41 @@ +This directory holds the distribution for ps-watcher, a program for +montoring a system via ps-like commands. + +Short instructions. Type: + cd ps-watcher-* + make + +If make fails you probably need to get IniConf. It it works then... + + ./ps-watcher --nosyslog --log --config ./samples/sample.ini + +Read the documentation to understand what you did. + +---- + +Documentation is in docs directory. + +All of the source code is covered by the GNU GENERAL PUBLIC +LICENSE. See COPYING for details on this. + +To use the program you will need Perl version 5.003 or greater +installed and the following modules: + + Sys::Syslog + File::Basename + Config::IniFiles + Getopt::Long + +The only one of these that is not part of the core Perl distribution +is Config::IniFiles which can be found at: + +http://www.cpan.org/modules/by-module/Config/ + +In order to run the program you'll need a configuration file to +use. Some samples configuration files can be found in the samples +directory. See the README in that directory for a description of +what the configuration files do. + +See INSTALL for generic GNU configure instructions. + +$Id: README,v 1.7 2003/05/16 00:12:59 rockyb Exp $ diff --git a/THANKS b/THANKS new file mode 100644 index 0000000..3243bdf --- /dev/null +++ b/THANKS @@ -0,0 +1,29 @@ +Thanks to various people I worked with at the Associated Press who +have made suggestions. + +This program uses Config::IniFiles (originally called IniConf). Thus +thanks are due to Scott Hutton. Rich Bowen (rbowen@rcbowen.com) now +maintains Config::IniFiles and incorporated my changes to the program that +allow regular expressions to be specified in "section" heads. + +Dave Humes - reporting regression between 1.04 and 1.05 in termination +code and why. + +James R Grinter suggested and provided code to allow the +program to fire when no matching processes (e.g. when a process that +should be running has died). + +Thanks to Jason Welsh for helping to track down +a Solaris problem where ps returned multiple lines of output. + +Thanks to Iñaki Sánchez for the patch that allows one to use $ps_pat in +the action statement. + +Musicological supervision by Stuart Frankel , +cutrate Ph.D. + +$Id: THANKS,v 1.8 2006/03/08 19:17:33 rockyb Exp $ + + + + diff --git a/TODO b/TODO new file mode 100644 index 0000000..6e5268b --- /dev/null +++ b/TODO @@ -0,0 +1,12 @@ +AIX and Linux ps allow custom output lines which means we can enclose +fields in quotes and thus allow variables which have embedded +blanks. Should make use of that. + +For now we only can handle one configuration file. Should allow many. + +Use IPC::Open3? -- it preserves STDERR and STDOUT. Backtick (`cmd`) +doesn't seem to. + +Add more regression tests. + +$Id: TODO,v 1.7 2003/07/10 11:50:21 rockyb Exp $ diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 0000000..bd3efda --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,603 @@ +# generated automatically by aclocal 1.9.6 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# 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. + +# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION so it can be traced. +# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], + [AM_AUTOMAKE_VERSION([1.9.6])]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 7 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE]) +AC_SUBST([$1_FALSE]) +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 12 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.58])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +# test to see if srcdir already configured +if test "`cd $srcdir && pwd`" != "`pwd`" && + test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_PROG_INSTALL_SH +AM_PROG_INSTALL_STRIP +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +]) +]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $1 | $1:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +install_sh=${install_sh-"$am_aux_dir/install-sh"} +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- +# From Jim Meyering + +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +AC_DEFUN([AM_MAINTAINER_MODE], +[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode is disabled by default + AC_ARG_ENABLE(maintainer-mode, +[ --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer], + USE_MAINTAINER_MODE=$enableval, + USE_MAINTAINER_MODE=no) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST(MAINT)dnl +] +) + +AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_MKDIR_P +# --------------- +# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. +# +# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories +# created by `make install' are always world readable, even if the +# installer happens to have an overly restrictive umask (e.g. 077). +# This was a mistake. There are at least two reasons why we must not +# use `-m 0755': +# - it causes special bits like SGID to be ignored, +# - it may be too restrictive (some setups expect 775 directories). +# +# Do not use -m 0755 and let people choose whatever they expect by +# setting umask. +# +# We cannot accept any implementation of `mkdir' that recognizes `-p'. +# Some implementations (such as Solaris 8's) are not thread-safe: if a +# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' +# concurrently, both version can detect that a/ is missing, but only +# one can create it and the other will error out. Consequently we +# restrict ourselves to GNU make (using the --version option ensures +# this.) +AC_DEFUN([AM_PROG_MKDIR_P], +[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + # We used to keeping the `.' as first argument, in order to + # allow $(mkdir_p) to be used without argument. As in + # $(mkdir_p) $(somedir) + # where $(somedir) is conditionally defined. However this is wrong + # for two reasons: + # 1. if the package is installed by a user who cannot write `.' + # make install will fail, + # 2. the above comment should most certainly read + # $(mkdir_p) $(DESTDIR)$(somedir) + # so it does not work when $(somedir) is undefined and + # $(DESTDIR) is not. + # To support the latter case, we have to write + # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), + # so the `.' trick is pointless. + mkdir_p='mkdir -p --' +else + # On NextStep and OpenStep, the `mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because `.' already + # exists. + for d in ./-p ./--version; + do + test -d $d && rmdir $d + done + # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. + if test -f "$ac_aux_dir/mkinstalldirs"; then + mkdir_p='$(mkinstalldirs)' + else + mkdir_p='$(install_sh) -d' + fi +fi +AC_SUBST([mkdir_p])]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + diff --git a/config.guess b/config.guess new file mode 100755 index 0000000..396482d --- /dev/null +++ b/config.guess @@ -0,0 +1,1500 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. + +timestamp='2006-07-02' + +# This file 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., 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 Per Bothner . +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[45]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep __LP64__ >/dev/null + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + case ${UNAME_MACHINE} in + pc98) + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + x86:Interix*:[3456]*) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + EM64T:Interix*:[3456]*) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit ;; + crisv32:Linux:*:*) + echo crisv32-axis-linux-gnu + exit ;; + frv:Linux:*:*) + echo frv-unknown-linux-gnu + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + mips:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit ;; + esac + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^LIBC/{ + s: ::g + p + }'`" + test x"${LIBC}" != x && { + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit + } + test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/config.sub b/config.sub new file mode 100755 index 0000000..fab0aa3 --- /dev/null +++ b/config.sub @@ -0,0 +1,1616 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. + +timestamp='2006-09-20' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file 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., 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. + + +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | mt \ + | msp430 \ + | nios | nios2 \ + | ns16k | ns32k \ + | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | score \ + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | z8k) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nios-* | nios2-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa-* \ + | ymp-* \ + | z8k-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16c) + basic_machine=cr16c-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -zvmoe) + os=-zvmoe + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/configure b/configure new file mode 100755 index 0000000..c895b65 --- /dev/null +++ b/configure @@ -0,0 +1,3140 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.59. +# +# Copyright (C) 2003 Free Software Foundation, Inc. +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi +DUALCASE=1; export DUALCASE # for MKS sh + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +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 + + +# Name of the executable. +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'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +exec 6>&1 + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_config_libobj_dir=. +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= + +ac_unique_file="ps-watcher.in.in" +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CVS2CL MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os LN_S PERL PS PS_ARGS PS_ARGS_FMT PS_FULLCMD_FMT PS_NO_NULL_HEADER PS_CAN_RETURN_MULTIPLE_LINES PS_CUSTOM_HEADER PS_PID_OPTS PS_TIME_VAR PS_VARS LIBOBJS LTLIBOBJS' +ac_subst_files='' + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +ac_prev= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_option in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; + + -enable-* | --enable-*) + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "enable_$ac_feature='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package| sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "with_$ac_package='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_confdir=`(dirname "$0") 2>/dev/null || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 + { (exit 1); exit 1; }; } + else + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } + fi +fi +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 + { (exit 1); exit 1; }; } +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures this package to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +_ACEOF + + cat <<_ACEOF +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data [PREFIX/share] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-perl set path to Perl + +_ACEOF +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + ac_popdir=`pwd` + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d $ac_dir || continue + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi + cd $ac_popdir + done +fi + +test -n "$ac_init_help" && exit 0 +if $ac_init_version; then + cat <<\_ACEOF + +Copyright (C) 2003 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit 0 +fi +exec 5>config.log +cat >&5 <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by $as_me, which was +generated by GNU Autoconf 2.59. Invocation command line was + + $ $0 $@ + +_ACEOF +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_sep= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +{ + (set) 2>&1 | + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) + sed -n \ + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; + *) + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------- ## +## Output files. ## +## ------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + sed "/^$/d" confdefs.h | sort + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status + ' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; + esac + fi +else + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + + + + + + + + + + + + + + +am__api_version="1.9" +ac_aux_dir= +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f $ac_dir/shtool; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 +echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} + { (exit 1); exit 1; }; } +fi +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done + + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL=$ac_install_sh + fi +fi +echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&5 +echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&2;} + { (exit 1); exit 1; }; } + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! +Check your system clock" >&5 +echo "$as_me: error: newly created file is older than distributed files! +Check your system clock" >&2;} + { (exit 1); exit 1; }; } +fi +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +test "$program_prefix" != NONE && + program_transform_name="s,^,$program_prefix,;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s,\$,$program_suffix,;$program_transform_name" +# Double any \ or $. echo might interpret backslashes. +# By default was `s,x,x', remove it if useless. +cat <<\_ACEOF >conftest.sed +s/[\\$]/&&/g;s/;s,x,x,$// +_ACEOF +program_transform_name=`echo $program_transform_name | sed -f conftest.sed` +rm conftest.sed + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + # We used to keeping the `.' as first argument, in order to + # allow $(mkdir_p) to be used without argument. As in + # $(mkdir_p) $(somedir) + # where $(somedir) is conditionally defined. However this is wrong + # for two reasons: + # 1. if the package is installed by a user who cannot write `.' + # make install will fail, + # 2. the above comment should most certainly read + # $(mkdir_p) $(DESTDIR)$(somedir) + # so it does not work when $(somedir) is undefined and + # $(DESTDIR) is not. + # To support the latter case, we have to write + # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), + # so the `.' trick is pointless. + mkdir_p='mkdir -p --' +else + # On NextStep and OpenStep, the `mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because `.' already + # exists. + for d in ./-p ./--version; + do + test -d $d && rmdir $d + done + # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. + if test -f "$ac_aux_dir/mkinstalldirs"; then + mkdir_p='$(mkinstalldirs)' + else + mkdir_p='$(install_sh) -d' + fi +fi + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$AWK" && break +done + +echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.make <<\_ACEOF +all: + @echo 'ac_maketemp="$(MAKE)"' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftest.make +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + SET_MAKE= +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +# test to see if srcdir already configured +if test "`cd $srcdir && pwd`" != "`pwd`" && + test -f $srcdir/config.status; then + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE=ps-watcher + VERSION=1.06 + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +install_sh=${install_sh-"$am_aux_dir/install-sh"} + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + STRIP=$ac_ct_STRIP +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + + + + + +CVS2CL=${CVS2CL-"${am_missing_run}cvs2cl"} + +echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 + # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then + enableval="$enable_maintainer_mode" + USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi; + echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 +echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6 + + +if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + +# Make sure we can run config.sub. +$ac_config_sub sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 +echo "$as_me: error: cannot run $ac_config_sub" >&2;} + { (exit 1); exit 1; }; } + +echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6 +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_build_alias=$build_alias +test -z "$ac_cv_build_alias" && + ac_cv_build_alias=`$ac_config_guess` +test -z "$ac_cv_build_alias" && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6 +build=$ac_cv_build +build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + +echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6 +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_host_alias=$host_alias +test -z "$ac_cv_host_alias" && + ac_cv_host_alias=$ac_cv_build_alias +ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6 +host=$ac_cv_host +host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done + + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL=$ac_install_sh + fi +fi +echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +echo "$as_me:$LINENO: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6 +fi + +echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.make <<\_ACEOF +all: + @echo 'ac_maketemp="$(MAKE)"' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftest.make +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + SET_MAKE= +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + SET_MAKE="MAKE=${MAKE-make}" +fi + + + +# Check whether --with-perl or --without-perl was given. +if test "${with_perl+set}" = set; then + withval="$with_perl" + PERL=$withval +fi; + +## We use a path for perl so the #! line in autoscan will work. +# Extract the first word of "perl", so it can be a program name with args. +set dummy perl; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PERL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PERL in + [\\/]* | ?:[\\/]*) + ac_cv_path_PERL="$PERL" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no" + ;; +esac +fi +PERL=$ac_cv_path_PERL + +if test -n "$PERL"; then + echo "$as_me:$LINENO: result: $PERL" >&5 +echo "${ECHO_T}$PERL" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + +if test "$PERL" = no; then + { { echo "$as_me:$LINENO: error: Pssst... you need perl in order to use this program.\ + Install it or put it in your path and try again." >&5 +echo "$as_me: error: Pssst... you need perl in order to use this program.\ + Install it or put it in your path and try again." >&2;} + { (exit 1); exit 1; }; } +fi + + +# Extract the first word of "ps", so it can be a program name with args. +set dummy ps; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PS in + [\\/]* | ?:[\\/]*) + ac_cv_path_PS="$PS" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PS="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_PS" && ac_cv_path_PS="no" + ;; +esac +fi +PS=$ac_cv_path_PS + +if test -n "$PS"; then + echo "$as_me:$LINENO: result: $PS" >&5 +echo "${ECHO_T}$PS" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + +## PS_ARGS gives how we get the command line for a given PID. Also see +## description for PS_VARS. + + + + + +## PS_NO_NULL_HEADER indicates that we can't get rid of the PS header line + + +## PS_CAN_RETURN_MULTIPLE_LINES indicates the ps on this OS can return +## multiple lines for a process. Solaris's ps does this for processes +## which have many lwp (light-weight processes). + + +## PS_CUSTOM_HEADER specifies whether we can put an = after the argument +## name to remove the header for that variable + + +## PS_PID_OPTS gives how to get the pid and command name needed for +##l first-level breakout. + + +## PS_TIME_VAR gives a variable that we can test time on + + +## PS_VAR gives a list of the PS variables we can query. +## However we must use only those variables that give output as a single +## token since these are parsed one token per variable. For example +## the arguments (args, or comm, or command) shouldn't be listed here. + + +## ======================================================================== +## Need a better way to figure out ps options and to know +## which ones don't have embeded blanks or to parse ps output. +## ======================================================================== +PS_ARGS_FMT='' +PS_FULLCMD_FMT='' +PS_TIME_VAR='' + +case "$host_os" in + aix* ) + PS_ARGS='-o args=' + PS_CAN_RETURN_MULTIPLE_LINES=0 + PS_CUSTOM_HEADER=1 + PS_NO_NULL_HEADER=0 + PS_PID_OPTS='-e -o pid= -o comm=' + PS_TIME_VAR='etime' + PS_VARS='user ruser group rgroup uid ruid gid rgid ppid \ +pgid pri cpu pcpu pmem vsz nice class scount thcount tid time \ +etime tty wchan bnd' + ;; + cygwin* ) + PS_ARGS='-l | cut -c 2-10,56-120' + PS_ARGS_FMT='$opts{ps_prog} -l |cut -c 2-10,56-120|egrep \"^[ \\t]*%d\"' + PS_FULLCMD_FMT='$opts{ps_prog} -l|cut -c 2-47,56-120|egrep \"^[ \\t]*%d\"' + PS_CAN_RETURN_MULTIPLE_LINES=0 + PS_CUSTOM_HEADER=0 + PS_NO_NULL_HEADER=1 + PS_PID_OPTS='-l | cut -c 2-10,56-120' + PS_VARS='pid ppid pgid winpid tty uid' + ;; + solaris* ) + PS_ARGS='-o args=' + PS_CAN_RETURN_MULTIPLE_LINES=1 + PS_CUSTOM_HEADER=1 + PS_NO_NULL_HEADER=0 + PS_PID_OPTS='-e -o pid= -o comm=' + PS_TIME_VAR='etime' + PS_VARS='user ruser group rgroup uid ruid gid rgid ppid \ +pgid sid pri pcpu pmem vsz rss osz nice class time \ +etime stime f s lwp nlwp psr tty addr wchan fname' + ;; + linux* ) + PS_ARGS='-www -o args=' + PS_CAN_RETURN_MULTIPLE_LINES=0 + PS_CUSTOM_HEADER=1 + PS_NO_NULL_HEADER=0 + PS_PID_OPTS='-e -o pid= -o cmd=' + # Make sure we put known single tokens at the beginning like uid. + PS_VARS='uid euid ruid gid egid rgid alarm blocked bsdtime c caught \ +cputime drs dsiz egroup eip esp etime euser f fgid \ +fgroup flag flags fname fsgid fsgroup fsuid fsuser fuid fuser \ +group ignored intpri lim longtname m_drs m_trs maj_flt majflt \ +min_flt minflt ni nice nwchan opri pagein pcpu pending pgid pgrp \ +pmem ppid pri rgroup rss rssize rsz ruser s sess session \ +sgi_p sgi_rss sgid sgroup sid sig sig_block sig_catch sig_ignore \ +sig_pend sigcatch sigignore sigmask stackp start start_stack start_time \ +stat state stime suid suser svgid svgroup svuid svuser sz time timeout \ +tmout tname tpgid trs trss tsiz tt tty tty4 tty8 uid_hack uname \ +user vsize vsz wchan' + PS_TIME_VAR='etime' + ;; + netbsdelf2* | openbsd* ) + PS_ARGS='-o args' + PS_CAN_RETURN_MULTIPLE_LINES=0 + PS_CUSTOM_HEADER=0 + PS_NO_NULL_HEADER=1 + PS_PID_OPTS='-a -x -o pid= -o ucomm=' + PS_VARS='acflag cpu f \ +inblk jobc ktrace ktracep lim login majflt minflt msgrcv \ +msgsnd nice nivcsw nsigs nswap nvcsw nwchan oublk p_ru \ +paddr pagein pid ppid pri re rgid rlink rss rsz \ +ruid ruser sess sig sigcatch sigignore sigmask sl start state \ +svgid svuid tdev time tpgid tsess tsiz tt tty ucomm uid upr user vsz \ +wchan xstat' + PS_TIME_VAR='cpu' + ;; + netbsd* | freebsd4* ) + PS_ARGS='-O command' + PS_CAN_RETURN_MULTIPLE_LINES=0 + PS_CUSTOM_HEADER=0 + PS_NO_NULL_HEADER=1 + PS_PID_OPTS='-a -x -o pid= -o ucomm=' + PS_VARS='acflag cpu cputime f \ +inblk jobc ktrace ktracep lim login majflt minflt msgrcv \ +msgsnd nice nivcsw nsigs nswap nvcsw nwchan oublk p_ru \ +paddr pagein pid ppid pri re rgid rlink rss rsz \ +rtprio ruid ruser sess sig sigcatch sigignore sigmask sl start state \ +svgid svuid tdev time tpgid tsess tsiz tt tty ucomm uid upr user vsz \ +wchan xstat' + PS_TIME_VAR='cputime' + ;; + bsdi4* ) + PS_ARGS='-www -o command' + PS_CAN_RETURN_MULTIPLE_LINES=0 + PS_CUSTOM_HEADER=0 + PS_NO_NULL_HEADER=1 + PS_PID_OPTS='-a -x -o pid= -o ucomm=' + PS_TIME_VAR='cputime' + PS_VARS='acflag cpu cputime f \ +inblk jobc ktrace ktracep lim login \ +nice nivcsw nsigs nswap nvcsw nwchan oublk p_ru \ +paddr pagein pid ppid pri re rgid rlink rss rsz \ +ruid ruser sess sig sigcatch sigignore sigmask sl start state \ +svgid svuid tdev time tpgid tsess tsiz tt tty ucomm uid upr user vsz \ +wchan xstat' + ;; + darwin5* | darwin6* | darwin7* | darwin8* ) + PS_PID_OPTS='-a -x -o pid= -o ucomm' + PS_VARS='acflag cpu cputime f \ +inblk jobc ktrace ktracep lim login \ +nice nivcsw nsigs nswap nvcsw nwchan oublk p_ru \ +paddr pagein pid ppid pri re rgid rss rsz \ +ruid ruser sess sig sigmask sl start state \ +svgid svuid tdev time tpgid tsess tsiz tt tty ucomm uid upr user vsz \ +wchan xstat' + PS_TIME_VAR='cputime' + PS_ARGS='-www -o command' + PS_NO_NULL_HEADER=1 + PS_CUSTOM_HEADER=0 + PS_CAN_RETURN_MULTIPLE_LINES=0 + ;; + * ) + echo "Don't know $host_os. Winging it." + PS_ARGS='' + PS_CAN_RETURN_MULTIPLE_LINES=0 + PS_CUSTOM_HEADER=0 + PS_NO_NULL_HEADER=1 + PS_PID_OPTS='-e -o pid= -o comm=' + PS_VARS='user ruser group rgroup uid ruid gid rgid ppid \ +pgid sid pri pcpu pmem vsz rss osz nice class time \ +etime stime tty addr wchan fname' + PS_TIME_VAR='etime' +esac + + ac_config_files="$ac_config_files post-configure" + + ac_config_files="$ac_config_files tests/01.pod.t" + + ac_config_files="$ac_config_files tests/args.t" + + ac_config_files="$ac_config_files tests/basic.t" + + ac_config_files="$ac_config_files tests/count.t" + + ac_config_files="$ac_config_files tests/full.t" + + ac_config_files="$ac_config_files ps-watcher.in" + + ac_config_files="$ac_config_files ps-watcher" + + + ac_config_files="$ac_config_files Makefile docs/Makefile tests/basic.cnf tests/Makefile" +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +{ + (set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} | + sed ' + t clear + : clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + cat confcache >$cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' +fi + +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +# +# If the first sed substitution is executed (which looks for macros that +# take arguments), then we branch to the quote section. Otherwise, +# look for a macro that doesn't take arguments. +cat >confdef2opt.sed <<\_ACEOF +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g +t quote +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g +t quote +d +: quote +s,[ `~#$^&*(){}\\|;'"<>?],\\&,g +s,\[,\\&,g +s,\],\\&,g +s,\$,$$,g +p +_ACEOF +# We use echo to avoid assuming a particular line-breaking character. +# The extra dot is to prevent the shell from consuming trailing +# line-breaks from the sub-command output. A line-break within +# single-quotes doesn't work because, if this script is created in a +# platform that uses two characters for line-breaks (e.g., DOS), tr +# would break. +ac_LF_and_DOT=`echo; echo .` +DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` +rm -f confdef2opt.sed + + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_i=`echo "$ac_i" | + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + # 2. Add them. + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi + +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi +DUALCASE=1; export DUALCASE # for MKS sh + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +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 + + +# Name of the executable. +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'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + +exec 6>&1 + +# Open the log real soon, to keep \$[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + +This file was extended by $as_me, which was +generated by GNU Autoconf 2.59. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 +_ACEOF + +# Files that config.status was made for. +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi + +cat >>$CONFIG_STATUS <<\_ACEOF + +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + +Configuration files: +$config_files + +Report bugs to ." +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +config.status +configured by $0, generated by GNU Autoconf 2.59, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2003 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." +srcdir=$srcdir +INSTALL="$INSTALL" +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_shift=: + ;; + -*) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; + esac + + case $ac_option in + # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF + + + + + +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_config_target in $ac_config_targets +do + case "$ac_config_target" in + # Handling of arguments. + "post-configure" ) CONFIG_FILES="$CONFIG_FILES post-configure" ;; + "tests/01.pod.t" ) CONFIG_FILES="$CONFIG_FILES tests/01.pod.t" ;; + "tests/args.t" ) CONFIG_FILES="$CONFIG_FILES tests/args.t" ;; + "tests/basic.t" ) CONFIG_FILES="$CONFIG_FILES tests/basic.t" ;; + "tests/count.t" ) CONFIG_FILES="$CONFIG_FILES tests/count.t" ;; + "tests/full.t" ) CONFIG_FILES="$CONFIG_FILES tests/full.t" ;; + "ps-watcher.in" ) CONFIG_FILES="$CONFIG_FILES ps-watcher.in" ;; + "ps-watcher" ) CONFIG_FILES="$CONFIG_FILES ps-watcher" ;; + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "docs/Makefile" ) CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; + "tests/basic.cnf" ) CONFIG_FILES="$CONFIG_FILES tests/basic.cnf" ;; + "tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason to put it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Create a temporary directory, and hook for its removal unless debugging. +$debug || +{ + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} + +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF + +# +# CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t +s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t +s,@INSTALL_DATA@,$INSTALL_DATA,;t t +s,@CYGPATH_W@,$CYGPATH_W,;t t +s,@PACKAGE@,$PACKAGE,;t t +s,@VERSION@,$VERSION,;t t +s,@ACLOCAL@,$ACLOCAL,;t t +s,@AUTOCONF@,$AUTOCONF,;t t +s,@AUTOMAKE@,$AUTOMAKE,;t t +s,@AUTOHEADER@,$AUTOHEADER,;t t +s,@MAKEINFO@,$MAKEINFO,;t t +s,@install_sh@,$install_sh,;t t +s,@STRIP@,$STRIP,;t t +s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t +s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t +s,@mkdir_p@,$mkdir_p,;t t +s,@AWK@,$AWK,;t t +s,@SET_MAKE@,$SET_MAKE,;t t +s,@am__leading_dot@,$am__leading_dot,;t t +s,@AMTAR@,$AMTAR,;t t +s,@am__tar@,$am__tar,;t t +s,@am__untar@,$am__untar,;t t +s,@CVS2CL@,$CVS2CL,;t t +s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t +s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t +s,@MAINT@,$MAINT,;t t +s,@build@,$build,;t t +s,@build_cpu@,$build_cpu,;t t +s,@build_vendor@,$build_vendor,;t t +s,@build_os@,$build_os,;t t +s,@host@,$host,;t t +s,@host_cpu@,$host_cpu,;t t +s,@host_vendor@,$host_vendor,;t t +s,@host_os@,$host_os,;t t +s,@LN_S@,$LN_S,;t t +s,@PERL@,$PERL,;t t +s,@PS@,$PS,;t t +s,@PS_ARGS@,$PS_ARGS,;t t +s,@PS_ARGS_FMT@,$PS_ARGS_FMT,;t t +s,@PS_FULLCMD_FMT@,$PS_FULLCMD_FMT,;t t +s,@PS_NO_NULL_HEADER@,$PS_NO_NULL_HEADER,;t t +s,@PS_CAN_RETURN_MULTIPLE_LINES@,$PS_CAN_RETURN_MULTIPLE_LINES,;t t +s,@PS_CUSTOM_HEADER@,$PS_CUSTOM_HEADER,;t t +s,@PS_PID_OPTS@,$PS_PID_OPTS,;t t +s,@PS_TIME_VAR@,$PS_TIME_VAR,;t t +s,@PS_VARS@,$PS_VARS,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@LTLIBOBJS@,$LTLIBOBJS,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat + fi +fi # test -n "$CONFIG_FILES" + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_builddir$INSTALL ;; + esac + + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +s,@INSTALL@,$ac_INSTALL,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi + + # Run the commands associated with the file. + case $ac_file in + post-configure ) chmod +x post-configure ;; + tests/01.pod.t ) chmod +x tests/01.pod.t ;; + tests/args.t ) chmod +x tests/args.t ;; + tests/basic.t ) chmod +x tests/basic.t ;; + tests/count.t ) chmod +x tests/count.t ;; + tests/full.t ) chmod +x tests/full.t ;; + ps-watcher ) ./post-configure $srcdir || exit 3 ;; + esac +done +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi + diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..256a632 --- /dev/null +++ b/configure.ac @@ -0,0 +1,236 @@ +dnl +dnl Require autoconf version 2.50 or greater +dnl +dnl Copyright (C) 2004, 2006 Rocky Bernstein +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +dnl 02110-1301 USA. + +dnl $Id: configure.ac,v 1.36 2006/03/10 19:07:05 rockyb Exp $ +dnl Process this file with autoconf to produce a configure script. + +AC_INIT(ps-watcher.in.in) +AM_INIT_AUTOMAKE(ps-watcher,1.06) + +AM_MISSING_PROG(CVS2CL, cvs2cl, $missing_dir) +AM_MAINTAINER_MODE +AC_CANONICAL_HOST + +AC_PREREQ(2.10)dnl dnl Minimum Autoconf version required. + +dnl ============================= +dnl Checks for programs. +dnl ============================= +AC_PROG_INSTALL +AC_PROG_LN_S +AC_PROG_MAKE_SET + +AC_ARG_WITH(perl, AC_HELP_STRING([--with-perl], + [set path to Perl]), PERL=$withval) + +## We use a path for perl so the #! line in autoscan will work. +AC_PATH_PROG(PERL, perl, no) + +if test "$PERL" = no; then + AC_MSG_ERROR(Pssst... you need perl in order to use this program.\ + Install it or put it in your path and try again.) +fi + +AC_SUBST(PERL)dnl + +AC_PATH_PROG(PS, ps, no) +AC_SUBST(PS)dnl + +## PS_ARGS gives how we get the command line for a given PID. Also see +## description for PS_VARS. +AC_SUBST(PS_ARGS) + +AC_SUBST(PS_ARGS_FMT) +AC_SUBST(PS_FULLCMD_FMT) + +## PS_NO_NULL_HEADER indicates that we can't get rid of the PS header line +AC_SUBST(PS_NO_NULL_HEADER) + +## PS_CAN_RETURN_MULTIPLE_LINES indicates the ps on this OS can return +## multiple lines for a process. Solaris's ps does this for processes +## which have many lwp (light-weight processes). +AC_SUBST(PS_CAN_RETURN_MULTIPLE_LINES) + +## PS_CUSTOM_HEADER specifies whether we can put an = after the argument +## name to remove the header for that variable +AC_SUBST(PS_CUSTOM_HEADER) + +## PS_PID_OPTS gives how to get the pid and command name needed for +##l first-level breakout. +AC_SUBST(PS_PID_OPTS) + +## PS_TIME_VAR gives a variable that we can test time on +AC_SUBST(PS_TIME_VAR) + +## PS_VAR gives a list of the PS variables we can query. +## However we must use only those variables that give output as a single +## token since these are parsed one token per variable. For example +## the arguments (args, or comm, or command) shouldn't be listed here. +AC_SUBST(PS_VARS) + +## ======================================================================== +## Need a better way to figure out ps options and to know +## which ones don't have embeded blanks or to parse ps output. +## ======================================================================== +PS_ARGS_FMT='' +PS_FULLCMD_FMT='' +PS_TIME_VAR='' + +case "$host_os" in + aix* ) + PS_ARGS='-o args=' + PS_CAN_RETURN_MULTIPLE_LINES=0 + PS_CUSTOM_HEADER=1 + PS_NO_NULL_HEADER=0 + PS_PID_OPTS='-e -o pid= -o comm=' + PS_TIME_VAR='etime' + PS_VARS='user ruser group rgroup uid ruid gid rgid ppid \ +pgid pri cpu pcpu pmem vsz nice class scount thcount tid time \ +etime tty wchan bnd' + ;; + cygwin* ) + PS_ARGS='-l | cut -c 2-10,56-120' + PS_ARGS_FMT=['$opts{ps_prog} -l |cut -c 2-10,56-120|egrep \"^[ \\t]*%d\"'] + PS_FULLCMD_FMT=['$opts{ps_prog} -l|cut -c 2-47,56-120|egrep \"^[ \\t]*%d\"'] + PS_CAN_RETURN_MULTIPLE_LINES=0 + PS_CUSTOM_HEADER=0 + PS_NO_NULL_HEADER=1 + PS_PID_OPTS='-l | cut -c 2-10,56-120' + PS_VARS='pid ppid pgid winpid tty uid' + ;; + solaris* ) + PS_ARGS='-o args=' + PS_CAN_RETURN_MULTIPLE_LINES=1 + PS_CUSTOM_HEADER=1 + PS_NO_NULL_HEADER=0 + PS_PID_OPTS='-e -o pid= -o comm=' + PS_TIME_VAR='etime' + PS_VARS='user ruser group rgroup uid ruid gid rgid ppid \ +pgid sid pri pcpu pmem vsz rss osz nice class time \ +etime stime f s lwp nlwp psr tty addr wchan fname' + ;; + linux* ) + PS_ARGS='-www -o args=' + PS_CAN_RETURN_MULTIPLE_LINES=0 + PS_CUSTOM_HEADER=1 + PS_NO_NULL_HEADER=0 + PS_PID_OPTS='-e -o pid= -o cmd=' + # Make sure we put known single tokens at the beginning like uid. + PS_VARS='uid euid ruid gid egid rgid alarm blocked bsdtime c caught \ +cputime drs dsiz egroup eip esp etime euser f fgid \ +fgroup flag flags fname fsgid fsgroup fsuid fsuser fuid fuser \ +group ignored intpri lim longtname m_drs m_trs maj_flt majflt \ +min_flt minflt ni nice nwchan opri pagein pcpu pending pgid pgrp \ +pmem ppid pri rgroup rss rssize rsz ruser s sess session \ +sgi_p sgi_rss sgid sgroup sid sig sig_block sig_catch sig_ignore \ +sig_pend sigcatch sigignore sigmask stackp start start_stack start_time \ +stat state stime suid suser svgid svgroup svuid svuser sz time timeout \ +tmout tname tpgid trs trss tsiz tt tty tty4 tty8 uid_hack uname \ +user vsize vsz wchan' + PS_TIME_VAR='etime' + ;; + netbsdelf2* | openbsd* ) + PS_ARGS='-o args' + PS_CAN_RETURN_MULTIPLE_LINES=0 + PS_CUSTOM_HEADER=0 + PS_NO_NULL_HEADER=1 + PS_PID_OPTS='-a -x -o pid= -o ucomm=' + PS_VARS='acflag cpu f \ +inblk jobc ktrace ktracep lim login majflt minflt msgrcv \ +msgsnd nice nivcsw nsigs nswap nvcsw nwchan oublk p_ru \ +paddr pagein pid ppid pri re rgid rlink rss rsz \ +ruid ruser sess sig sigcatch sigignore sigmask sl start state \ +svgid svuid tdev time tpgid tsess tsiz tt tty ucomm uid upr user vsz \ +wchan xstat' + PS_TIME_VAR='cpu' + ;; + netbsd* | freebsd4* ) + PS_ARGS='-O command' + PS_CAN_RETURN_MULTIPLE_LINES=0 + PS_CUSTOM_HEADER=0 + PS_NO_NULL_HEADER=1 + PS_PID_OPTS='-a -x -o pid= -o ucomm=' + PS_VARS='acflag cpu cputime f \ +inblk jobc ktrace ktracep lim login majflt minflt msgrcv \ +msgsnd nice nivcsw nsigs nswap nvcsw nwchan oublk p_ru \ +paddr pagein pid ppid pri re rgid rlink rss rsz \ +rtprio ruid ruser sess sig sigcatch sigignore sigmask sl start state \ +svgid svuid tdev time tpgid tsess tsiz tt tty ucomm uid upr user vsz \ +wchan xstat' + PS_TIME_VAR='cputime' + ;; + bsdi4* ) + PS_ARGS='-www -o command' + PS_CAN_RETURN_MULTIPLE_LINES=0 + PS_CUSTOM_HEADER=0 + PS_NO_NULL_HEADER=1 + PS_PID_OPTS='-a -x -o pid= -o ucomm=' + PS_TIME_VAR='cputime' + PS_VARS='acflag cpu cputime f \ +inblk jobc ktrace ktracep lim login \ +nice nivcsw nsigs nswap nvcsw nwchan oublk p_ru \ +paddr pagein pid ppid pri re rgid rlink rss rsz \ +ruid ruser sess sig sigcatch sigignore sigmask sl start state \ +svgid svuid tdev time tpgid tsess tsiz tt tty ucomm uid upr user vsz \ +wchan xstat' + ;; + darwin5* | darwin6* | darwin7* | darwin8* ) + PS_PID_OPTS='-a -x -o pid= -o ucomm' + PS_VARS='acflag cpu cputime f \ +inblk jobc ktrace ktracep lim login \ +nice nivcsw nsigs nswap nvcsw nwchan oublk p_ru \ +paddr pagein pid ppid pri re rgid rss rsz \ +ruid ruser sess sig sigmask sl start state \ +svgid svuid tdev time tpgid tsess tsiz tt tty ucomm uid upr user vsz \ +wchan xstat' + PS_TIME_VAR='cputime' + PS_ARGS='-www -o command' + PS_NO_NULL_HEADER=1 + PS_CUSTOM_HEADER=0 + PS_CAN_RETURN_MULTIPLE_LINES=0 + ;; + * ) + echo "Don't know $host_os. Winging it." + PS_ARGS='' + PS_CAN_RETURN_MULTIPLE_LINES=0 + PS_CUSTOM_HEADER=0 + PS_NO_NULL_HEADER=1 + PS_PID_OPTS='-e -o pid= -o comm=' + PS_VARS='user ruser group rgroup uid ruid gid rgid ppid \ +pgid sid pri pcpu pmem vsz rss osz nice class time \ +etime stime tty addr wchan fname' + PS_TIME_VAR='etime' +esac + +AC_CONFIG_FILES([post-configure], [chmod +x post-configure]) +AC_CONFIG_FILES([tests/01.pod.t], [chmod +x tests/01.pod.t]) +AC_CONFIG_FILES([tests/args.t], [chmod +x tests/args.t]) +AC_CONFIG_FILES([tests/basic.t], [chmod +x tests/basic.t]) +AC_CONFIG_FILES([tests/count.t], [chmod +x tests/count.t]) +AC_CONFIG_FILES([tests/full.t], [chmod +x tests/full.t]) +AC_CONFIG_FILES([ps-watcher.in]) +AC_CONFIG_FILES([ps-watcher], [./post-configure $srcdir || exit 3]) + +AC_OUTPUT([ + Makefile \ + docs/Makefile \ + tests/basic.cnf \ + tests/Makefile \ +]) diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 0000000..e9137a9 --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,6 @@ +ps-watcher for Debian +--------------------- + + + + -- Jan Wagner Fri, 3 Nov 2006 13:39:48 +0000 diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..be1192d --- /dev/null +++ b/debian/changelog @@ -0,0 +1,6 @@ +ps-watcher (1.06-1) unstable; urgency=low + + * Initial release (Closes: #nnnn) + + -- Jan Wagner Fri, 3 Nov 2006 13:39:48 +0000 + diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7ed6ff8 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +5 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..5e8ce13 --- /dev/null +++ b/debian/control @@ -0,0 +1,21 @@ +Source: ps-watcher +Section: admin +Priority: optional +Maintainer: Jan Wagner +Build-Depends: debhelper (>= 5), autotools-dev, libsys-syslog-perl +Build-Depends-Indep: libconfig-inifiles-perl, perl-modules +Standards-Version: 3.7.2 + +Package: ps-watcher +Architecture: all +Depends: ${perl:Depends} +Description: monitoring a system via ps-like commands + This program runs the ps command periodically and triggers commands on matches. + The match patterns are Perl regular expressions which can refer to the process + information via variables. + . + For example it can be used to ensure that a daemon is running, or is not + running too many times. It can also be used to determine when a process has + consumed too many resources, perhaps due to a memory leak. + . + Homepage: diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..acea04e --- /dev/null +++ b/debian/copyright @@ -0,0 +1,31 @@ +This package was debianized by Jan Wagner on +Fri, 3 Nov 2006 13:39:48 +0000. + +It was downloaded from + +Upstream Author: Rocky Bernstein + +Copyright: Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006 + Rocky Bernstein + +License: + + 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General Public License +can be found in /usr/share/common-licenses/GPL file. + +The Debian packaging is (C) 2006, Jan Wagner and +is licensed under the GPL, see `/usr/share/common-licenses/GPL'. diff --git a/debian/cron.d.ex b/debian/cron.d.ex new file mode 100644 index 0000000..7c5a1eb --- /dev/null +++ b/debian/cron.d.ex @@ -0,0 +1,4 @@ +# +# Regular cron jobs for the ps-watcher package +# +0 4 * * * root ps-watcher_maintenance diff --git a/debian/default b/debian/default new file mode 100644 index 0000000..4dcb8a9 --- /dev/null +++ b/debian/default @@ -0,0 +1,10 @@ +# Defaults for ps-watcher initscript +# sourced by /etc/init.d/ps-watcher +# installed at /etc/default/ps-watcher by the maintainer scripts + +# +# This is a POSIX shell fragment +# + +# Additional options that are passed to the Daemon. +DAEMON_OPTS="" diff --git a/debian/dirs b/debian/dirs new file mode 100644 index 0000000..ca882bb --- /dev/null +++ b/debian/dirs @@ -0,0 +1,2 @@ +usr/bin +usr/sbin diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..7fe608a --- /dev/null +++ b/debian/docs @@ -0,0 +1,3 @@ +NEWS +THANKS +TODO diff --git a/debian/init.d b/debian/init.d new file mode 100644 index 0000000..72d7f87 --- /dev/null +++ b/debian/init.d @@ -0,0 +1,84 @@ +#! /bin/sh +# +# skeleton example file to build /etc/init.d/ scripts. +# This file should be used to construct scripts for /etc/init.d. +# +# Written by Miquel van Smoorenburg . +# Modified for Debian +# by Ian Murdock . +# +# Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl +# /etc/init.d/ps-watcher: v1 2006/11/03 Jan Wagner + +### BEGIN INIT INFO +# Provides: ps-watcher +# Required-Start: $local_fs $network $remote_fs $syslog +# Required-Stop: $local_fs $network $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: start and stop the ps-watcher daemon +# Description: monitoring a system via ps-like commands +### END INIT INFO + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/bin/ps-watcher +NAME=ps-watcher +DESC=ps-watcher + +test -x $DAEMON || exit 0 + +# Include ps-watcher defaults if available +if [ -f /etc/default/ps-watcher ] ; then + . /etc/default/ps-watcher +fi + +set -e + +case "$1" in + start) + echo -n "Starting $DESC: " + start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ + --exec $DAEMON -- $DAEMON_OPTS + echo "$NAME." + ;; + stop) + echo -n "Stopping $DESC: " + start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ + --exec $DAEMON + echo "$NAME." + ;; + #reload) + # + # If the daemon can reload its config files on the fly + # for example by sending it SIGHUP, do it here. + # + # If the daemon responds to changes in its config file + # directly anyway, make this a do-nothing entry. + # + # echo "Reloading $DESC configuration files." + # start-stop-daemon --stop --signal 1 --quiet --pidfile \ + # /var/run/$NAME.pid --exec $DAEMON + #;; + restart|force-reload) + # + # If the "reload" option is implemented, move the "force-reload" + # option to the "reload" entry above. If not, "force-reload" is + # just the same as "restart". + # + echo -n "Restarting $DESC: " + start-stop-daemon --stop --quiet --pidfile \ + /var/run/$NAME.pid --exec $DAEMON + sleep 1 + start-stop-daemon --start --quiet --pidfile \ + /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS + echo "$NAME." + ;; + *) + N=/etc/init.d/$NAME + # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $N {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/debian/postinst.ex b/debian/postinst.ex new file mode 100644 index 0000000..6ea5c34 --- /dev/null +++ b/debian/postinst.ex @@ -0,0 +1,41 @@ +#!/bin/sh +# postinst script for ps-watcher +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/debian/postrm.ex b/debian/postrm.ex new file mode 100644 index 0000000..bb20d3c --- /dev/null +++ b/debian/postrm.ex @@ -0,0 +1,39 @@ +#!/bin/sh +# postrm script for ps-watcher +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/debian/preinst.ex b/debian/preinst.ex new file mode 100644 index 0000000..718d618 --- /dev/null +++ b/debian/preinst.ex @@ -0,0 +1,37 @@ +#!/bin/sh +# preinst script for ps-watcher +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `install' +# * `install' +# * `upgrade' +# * `abort-upgrade' +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + install|upgrade) + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/debian/prerm.ex b/debian/prerm.ex new file mode 100644 index 0000000..e3097f5 --- /dev/null +++ b/debian/prerm.ex @@ -0,0 +1,40 @@ +#!/bin/sh +# prerm script for ps-watcher +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + remove|upgrade|deconfigure) + ;; + + failed-upgrade) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..527793f --- /dev/null +++ b/debian/rules @@ -0,0 +1,99 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + + +# These are used for cross-compiling and for saving the configure script +# from having to guess our platform (since we know it already) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +config.status: configure + dh_testdir + # Add here commands to configure the package. + ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs" + + +build: build-stamp + +build-stamp: config.status + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + #docbook-to-man debian/ps-watcher.sgml > ps-watcher.1 + + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + # Add here commands to clean up after the build process. + -$(MAKE) clean +ifneq "$(wildcard /usr/share/misc/config.sub)" "" + cp -f /usr/share/misc/config.sub config.sub +endif +ifneq "$(wildcard /usr/share/misc/config.guess)" "" + cp -f /usr/share/misc/config.guess config.guess +endif + + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/ps-watcher. + $(MAKE) DESTDIR=$(CURDIR)/debian/ps-watcher install + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs ChangeLog + dh_installdocs + dh_installexamples samples/* +# dh_install +# dh_installdebconf +# dh_installlogrotate +# dh_installinit + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms + dh_perl + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..1d4b5b2 --- /dev/null +++ b/debian/watch @@ -0,0 +1,12 @@ +# Example watch control file for uscan +# Rename this file to "watch" and then you can run the "uscan" command +# to check for upstream updates and more. +# See uscan(1) for format + +# Compulsory line, this is a version 3 file +version=3 + +# Uncomment to find new files on sourceforge, for debscripts >= 2.9 +http://sf.net/ps-watcher/ps-watcher-(.*)\.tar\.gz + + diff --git a/docs/Makefile.am b/docs/Makefile.am new file mode 100644 index 0000000..8ea8713 --- /dev/null +++ b/docs/Makefile.am @@ -0,0 +1,40 @@ +############################################################################## +# $Id: Makefile.am,v 1.8 2005/05/17 09:53:00 rockyb Exp $ +# Copyright (C) 2003, 2004 Rocky Bernstein +# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +############################################################################## + +# Section 8 is system administration +EXT=8 +man8_MANS = $(PACKAGE).$(EXT) + +MOSTLYCLEANFILES = *~ $(man8_MANS) $(PACKAGE).html +EXTRA_DIST = $(man8_MANS) $(PACKAGE).html +DISTCLEANFILES = pod2htmi.tmp pod2htmd.tmp + +# The keeps automake from substituting PS_VARS +PS_VARS = '' + +# Files making up the documentation part of this package +DOCS = $(man_MANS) $(PACKAGE).html + +# THIS SHOULD BE THE FIRST TARGET! +all: $(DOCS) Makefile + +$(PACKAGE).html: ../$(PACKAGE).in + -pod2html --infile=../$(PACKAGE).in --outfile=$@ + +$(man8_MANS): ../$(PACKAGE).in + -pod2man --section=$(EXT) --name=$(PACKAGE) ../$(PACKAGE).in >$@ diff --git a/docs/Makefile.in b/docs/Makefile.in new file mode 100644 index 0000000..1bfbfc2 --- /dev/null +++ b/docs/Makefile.in @@ -0,0 +1,374 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 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@ + +############################################################################## +# $Id: Makefile.am,v 1.8 2005/05/17 09:53:00 rockyb Exp $ +# Copyright (C) 2003, 2004 Rocky Bernstein +# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +############################################################################## +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +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@ +subdir = docs +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +man8dir = $(mandir)/man8 +am__installdirs = "$(DESTDIR)$(man8dir)" +NROFF = nroff +MANS = $(man8_MANS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CVS2CL = @CVS2CL@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PS = @PS@ +PS_ARGS = @PS_ARGS@ +PS_ARGS_FMT = @PS_ARGS_FMT@ +PS_CAN_RETURN_MULTIPLE_LINES = @PS_CAN_RETURN_MULTIPLE_LINES@ +PS_CUSTOM_HEADER = @PS_CUSTOM_HEADER@ +PS_FULLCMD_FMT = @PS_FULLCMD_FMT@ +PS_NO_NULL_HEADER = @PS_NO_NULL_HEADER@ +PS_PID_OPTS = @PS_PID_OPTS@ +PS_TIME_VAR = @PS_TIME_VAR@ + +# The keeps automake from substituting PS_VARS +PS_VARS = '' +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__leading_dot = @am__leading_dot@ +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@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ + +# Section 8 is system administration +EXT = 8 +man8_MANS = $(PACKAGE).$(EXT) +MOSTLYCLEANFILES = *~ $(man8_MANS) $(PACKAGE).html +EXTRA_DIST = $(man8_MANS) $(PACKAGE).html +DISTCLEANFILES = pod2htmi.tmp pod2htmd.tmp + +# Files making up the documentation part of this package +DOCS = $(man_MANS) $(PACKAGE).html +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu docs/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +uninstall-info-am: +install-man8: $(man8_MANS) $(man_MANS) + @$(NORMAL_INSTALL) + test -z "$(man8dir)" || $(mkdir_p) "$(DESTDIR)$(man8dir)" + @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.8*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ + else file=$$i; fi; \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 8*) ;; \ + *) ext='8' ;; \ + esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst"; \ + done +uninstall-man8: + @$(NORMAL_UNINSTALL) + @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.8*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 8*) ;; \ + *) ext='8' ;; \ + esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " rm -f '$(DESTDIR)$(man8dir)/$$inst'"; \ + rm -f "$(DESTDIR)$(man8dir)/$$inst"; \ + done +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(MANS) +installdirs: + for dir in "$(DESTDIR)$(man8dir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(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: + -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +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 + +info: info-am + +info-am: + +install-data-am: install-man + +install-exec-am: + +install-info: install-info-am + +install-man: install-man8 + +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: uninstall-info-am uninstall-man + +uninstall-man: uninstall-man8 + +.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-exec \ + install-exec-am install-info install-info-am install-man \ + install-man8 install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ + uninstall-am uninstall-info-am uninstall-man uninstall-man8 + + +# THIS SHOULD BE THE FIRST TARGET! +all: $(DOCS) Makefile + +$(PACKAGE).html: ../$(PACKAGE).in + -pod2html --infile=../$(PACKAGE).in --outfile=$@ + +$(man8_MANS): ../$(PACKAGE).in + -pod2man --section=$(EXT) --name=$(PACKAGE) ../$(PACKAGE).in >$@ +# 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: diff --git a/docs/ps-watcher.8 b/docs/ps-watcher.8 new file mode 100644 index 0000000..bf6dd24 --- /dev/null +++ b/docs/ps-watcher.8 @@ -0,0 +1,743 @@ +.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sh \" Subsection heading +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. | will give a +.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to +.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' +.\" expand to `' in nroff, nothing in troff, for use with C<>. +.tr \(*W-|\(bv\*(Tr +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.\" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.hy 0 +.if n .na +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "ps-watcher 8" +.TH ps-watcher 8 "2006-03-10" "perl v5.8.8" "User Contributed Perl Documentation" +.SH "NAME" +ps\-watcher \- monitors various processes based on ps\-like information. +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +\&\fBps-watcher\fR [\fIoptions\fR...] + [\f(CW\*(C`\-\-config\*(C'\fR] \fIconfig-file\fR +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +Periodically a list of processes obtained via \f(CW\*(C`ps\*(C'\fR. More precisely +each item in the list contains the process name (just what's listed in +the \*(L"cmd\*(R" field, not the full command and arguments) and its process +id (pid). A configuration file specifies a list of Perl +regular-expression patterns to match the processes against. For each +match, a Perl expression specified for that pattern is evaluated. The +evaluated expression can refer to variables which are set by ps and +pertain to the matched process(es), for example the amount memory +consumed by the process, or the total elapsed time. Some other +variables are set by the program, such as the number of times the +process is running. If the Perl expression for a matched pattern +evaluates true, then an action can be run such as killing the program, +restarting it, or mailing an alert, or running some arbitrary Perl +code. +.PP +Some things you might want to watch a daemon or process for: +.IP "\(bu" 2 +check that it is running (hasn't died) +.IP "\(bu" 2 +ensure it is not running too many times +.IP "\(bu" 2 +isn't consuming too much memory (perhaps a memory leak), or I/O +.PP +Some actions you might want to take: +.IP "\(bu" 2 +restart a process +.IP "\(bu" 2 +kill off rampant processes +.IP "\(bu" 2 +send an alert about any of the conditions listed above +.PP +Depending on options specfied, this program can be run as a daemon, +run once (which is suitable as a \f(CW\*(C`cron\*(C'\fR job), or run not as a daemon +but still continuously (which may be handy in testing the program or +your configuration). +.Sh "\s-1OPTIONS\s0" +.IX Subsection "OPTIONS" +.IP "\-\-help" 4 +.IX Item "--help" +Print a usage message on standard error and exit with a return code +of 100. +.Sp +\&\& +.IP "\-\-doc" 4 +.IX Item "--doc" +Extact the full documentation that you are reading now, print it and +exit with a return code of 101. +.Sp +\&\& +.IP "\-\-version" 4 +.IX Item "--version" +Print the version release on standard output and exit with a return +code of 10. +.Sp +\&\& +.IP "\-\-debug \fInumber\fR" 4 +.IX Item "--debug number" +Give debugging output. The higher the number, the more the output. The +default is 0 = none. 2 is the most debugging output. +.IP "[\-\-config] \fIconfiguration file\fR" 4 +.IX Item "[--config] configuration file" +Specify configuration file. . +.Sp +See \*(L"\s-1CONFIGURATION\s0 \s-1FILE\s0 \s-1FORMAT\s0\*(R" below for information on the format +of the configuration file and \*(L"\s-1EXAMPLE\s0 \s-1CONFIGURATION\s0\*(R" for a complete +example of a configuration file. +.Sp +\&\& +.IP "\-\-log [\fIlog file\fR]" 4 +.IX Item "--log [log file]" +Send or don't send error and debugging output to a log file. If option +is given but no logfile is specified, then use \s-1STDERR\s0. The default is +no error log file. See also \-\-syslog below. +.Sp +\&\& +.IP "\-\-syslog | \-\-nosyslog" 4 +.IX Item "--syslog | --nosyslog" +Send or don't send error and debugging output to syslog. The default +is to syslog error and debug output. +.Sp +\&\& +.IP "\-\-daemon | \-\-nodaemon" 4 +.IX Item "--daemon | --nodaemon" +Run or don't as a daemon. +.Sp +\&\& +.IP "\-\-path \fIsearch-path\fR" 4 +.IX Item "--path search-path" +Specify the executable search path used in running commands. +.IP "\-\-ps\-prog \fIprogram\fR" 4 +.IX Item "--ps-prog program" +One can specify the command that gives ps information. By default, the +command is \fI/bin/ps\fR. +.Sp +\&\& +.IP "\-\-run | \-\-norun" 4 +.IX Item "--run | --norun" +do/don't run actions go through the motions as though we were going +to. This may be useful in debugging. +.Sp +\&\& +.IP "\-\-sleep \fIinterval in seconds\fR" 4 +.IX Item "--sleep interval in seconds" +It is expected that one might want to run ps-watcher over and over +again. In such instances one can specify the amount of time between +iterations with this option. +.Sp +If a negative number is specified the program is run only once. +.Sp +\&\& +.Sh "\s-1CONFIGURATION\s0 \s-1FILE\s0 \s-1MODIFICATION\s0 \s-1AND\s0 \s-1SIGNAL\s0 \s-1HANDLING\s0" +.IX Subsection "CONFIGURATION FILE MODIFICATION AND SIGNAL HANDLING" +Periodically ps-watcher checks to see if the configuration file +that it was run against has changed. If so, the program rereads the +configuration file. +.PP +More precisely, the checks are done after waking up from a slumber. +If the sleep interval is long (or if you are impatient), you can +probably force the program to wake up using a \s-1HUP\s0 signal. +.PP +At any time you can increase the level of debug output by sending a +\&\s-1USR1\s0 signal to the ps-watcher process. Similarly you can decrease the +level of debug output by sending the process a \s-1USR2\s0 signal. +.PP +It is recommended that you terminate ps-watcher via an \s-1INT\s0, \s-1TERM\s0, or \s-1QUIT\s0 +signal. +.SH "CONFIGURATION FILE FORMAT" +.IX Header "CONFIGURATION FILE FORMAT" +The format of a configuration file is a series of fully qualified +filenames enclosed in square brackets followed by a number of +parameter lines. Each parameter line has a parameter names followed by +an \*(L"equal\*(R" sign and finally value. That is: +.PP +.Vb 5 +\& # This is a comment line +\& ; So is this. +\& [process-pattern1] +\& parameter1 = value1 +\& parameter2 = value2 +.Ve +.PP +.Vb 3 +\& [process-pattern2] +\& parameter1 = value3 +\& parameter2 = value4 +.Ve +.PP +Comments start with # or ; and take effect to the end of the line. +.PP +This should be familiar to those who have worked with text-readible +Microsoft \f(CW\*(C`.INI\*(C'\fR files. +.PP +Note process patterns, (\fIprocess\-pattern1\fR and \fIprocess\-pattern2\fR +above) must be unique. If there are times when you may want to +refer to the same process, one can be creative to make these unique. +e.g. \fIcron\fR and \fI[c]ron\fR which refer to the same process even +though they \fIappear\fR to be different. +.PP +As quoted directly from the Config::IniFiles documentation: +.PP +Multiline or multivalued fields may also be defined ala \s-1UNIX\s0 +\&\*(L"here document\*(R" syntax: +.PP +.Vb 4 +\& Parameter=< 1000 +\& occurs = every +\& action = echo "Large program $command matches $ps_pat: $vsz KB" +.Ve +.Sp +.Vb 8 +\& # Fire if /usr/sbin/syslogd is not running. +\& # Since the program matches against the command names, not commands and +\& # arguments, something like: +\& # ps -ef | grep /usr/sbin/syslogd +\& # won't match the below. +\& [(/usr/sbin/)?syslogd] +\& occurs = none +\& action = /etc/init.d/syslogd start +.Ve +.IP "action" 4 +.IX Item "action" +This specifies the action, a command that gets run by the system +shell, when the trigger condition is evaluated to be true. +.Sp +Example: +.Sp +.Vb 1 +\& action = /etc/init.d/market_loader.init restart +.Ve +.IP "perl-action" 4 +.IX Item "perl-action" +This specifies Perl statements to be eval'd. This can be especially +useful in conjunction with \f(CW$PROLOG\fR and \f(CW$EPILOG\fR sections to make tests +across collections of process and do things which ps-watcher +would otherwise not be able to do. +.Sp +Example: +.Sp +.Vb 5 +\& # A Perl variable initialization. +\& # Since ps-watcher runs as a daemon it's a good idea +\& # to (re)initialize variables before each run. +\& [$PROLOG] +\& perl-action = $root_procs=0; +.Ve +.Sp +.Vb 4 +\& # Keep track of how many root processes we are running +\& [.*] +\& perl-action = $root_procs++ if $uid == 0 +\& occurs = every +.Ve +.Sp +.Vb 3 +\& # Show this count. +\& [$EPILOG] +\& action = echo "I counted $root_procs root processes" +.Ve +.Sh "\s-1EXPANDED\s0 \s-1VARIABLES\s0 \s-1IN\s0 \s-1TRIGGER/ACTION\s0 \s-1CLAUSES\s0" +.IX Subsection "EXPANDED VARIABLES IN TRIGGER/ACTION CLAUSES" +Any variables defined in the program can be used in pattern or +action parameters. For example, \f(CW$program\fR can be used to refer to +the name of this program ps\-watcher. +.PP +The following variables can be used in either the pattern or action +fields. +.IP "$action" 4 +.IX Item "$action" +A string containing the text of the action to run. +.Sp +\&\& +.IP "$perl_action" 4 +.IX Item "$perl_action" +A string containing the text of the perl_action to run. +.Sp +\&\& +.IP "$ps_pat" 4 +.IX Item "$ps_pat" +The Perl regular expression specified in the beginning of the section. +.Sp +\&\& +.IP "$command" 4 +.IX Item "$command" +The command that matched \f(CW$ps_pat\fR. +.Sp +The Perl regular expression specified in the beginning of the section. +Normally processes will not have funny characters in them. Just in +case, backticks in \f(CW$command\fR are escaped. +.Sp +Example: +.Sp +.Vb 2 +\& # List processes other than emacs (which is a known pig) that use lots +\& # of virtual memory +.Ve +.Sp +.Vb 3 +\& [.*] +\& trigger = $command !~ /emacs$/ && $vsz > 10 +\& action = echo \e"Looks like you have a big \e$command program: \e$vsz KB\e" +.Ve +.Sp +\&\& +.IP "$count" 4 +.IX Item "$count" +The number of times the pattern matched. Presumably the number of +processes of this class running. +.Sp +\&\& +.IP "$trigger" 4 +.IX Item "$trigger" +A string containing the text of the trigger. +.PP +A list of variables specific to this program or fields commonly found in +\&\f(CW\*(C`ps\*(C'\fR output is listed below followed by a description of the more +common ones. See also \f(CW\*(C`ps\*(C'\fR for a more complete +description of the meaning of the field. +.PP +.Vb 11 +\& uid euid ruid gid egid rgid alarm blocked bsdtime c caught +\&cputime drs dsiz egroup eip esp etime euser f fgid +\&fgroup flag flags fname fsgid fsgroup fsuid fsuser fuid fuser +\&group ignored intpri lim longtname m_drs m_trs maj_flt majflt +\&min_flt minflt ni nice nwchan opri pagein pcpu pending pgid pgrp +\&pmem ppid pri rgroup rss rssize rsz ruser s sess session +\&sgi_p sgi_rss sgid sgroup sid sig sig_block sig_catch sig_ignore +\&sig_pend sigcatch sigignore sigmask stackp start start_stack start_time +\&stat state stime suid suser svgid svgroup svuid svuser sz time timeout +\&tmout tname tpgid trs trss tsiz tt tty tty4 tty8 uid_hack uname +\&user vsize vsz wchan +.Ve +.PP +Beware though, in some situations ps can return multiple lines for a +single process and we will use just one of these in the trigger. In +particular, Solaris's \f(CW\*(C`ps\*(C'\fR will return a line for each \s-1LWP\s0 (light\-weight +process). So on Solaris, if a trigger uses variable lwp, it may or may +not match depending on which single line of the multiple \f(CW\*(C`ps\*(C'\fR lines is +used. +.PP +\&\& +.IP "$args" 4 +.IX Item "$args" +The command along with its command arguments. It is possible that this +is might get truncated at certain length (if ps does likewise as is +the case on Solaris). +.Sp +\&\& +.IP "$ppid" 4 +.IX Item "$ppid" +The parent process id. +.Sp +\&\& +.IP "$stime" 4 +.IX Item "$stime" +The start time of the process. +.Sp +\&\& +.IP "$etime" 4 +.IX Item "$etime" +The end time of the process. +.Sp +\&\& +.IP "$pmem" 4 +.IX Item "$pmem" +The process memory. +.Sp +\&\& +.IP "$pcpu" 4 +.IX Item "$pcpu" +The percent \s-1CPU\s0 utilization. +.Sp +\&\& +.IP "$tty" 4 +.IX Item "$tty" +The controlling tty. +.Sp +\&\& +.IP "$szv" 4 +.IX Item "$szv" +Virtual memory size of the process +.Sh "\s-1OTHER\s0 \s-1THINGS\s0 \s-1IN\s0 \s-1TRIGGER\s0 \s-1CLAUSES\s0" +.IX Subsection "OTHER THINGS IN TRIGGER CLAUSES" +To make testing against elapsed time easier, a function \f(CW\*(C`elapse2sec()\*(C'\fR +has been written to parse and convert elapsed time strings in the +format \f(CW\*(C`dd\-hh:mm:ss\*(C'\fR and a number of seconds. +.PP +Some constants for the number of seconds in a minute, hour, or day +have also been defined. These are referred to as \f(CW\*(C`MINS\*(C'\fR, \f(CW\*(C`HOURS\*(C'\fR, +and \f(CW\*(C`DAYS\*(C'\fR respectively and they have the expected definitions: +.PP +.Vb 3 +\& use constant MINS => 60; +\& use constant HOURS => 60*60; +\& use constant DAYS => HOURS * 24; +.Ve +.PP +Here is an example of the use of \f(CW\*(C`elapsed2sec()\*(C'\fR: +.PP +.Vb 7 +\& # Which processes have been running for more than 3 hours? +\& # Also note use of builtin-function elapsed2secs, variable $etime +\& # and builtin-function HOURS +\& [.] +\& trigger = elapsed2secs('$etime') > 1*DAYS +\& action = echo "$command has been running more than 1 day ($etime)" +\& occurs = every +.Ve +.PP +Please note the quotes around '$etime'. +.SH "EXAMPLE CONFIGURATION" +.IX Header "EXAMPLE CONFIGURATION" +.Vb 1 +\& # Comments start with # or ; and go to the end of the line. +.Ve +.PP +.Vb 4 +\& # The format for each entry is in Microsoft .INI form: +\& # [process-pattern] +\& # trigger = perl-expression +\& # action = program-and-arguments-to-run +.Ve +.PP +.Vb 3 +\& [httpd$] +\& trigger = $count < 4 +\& action = echo "$trigger fired -- You have $count httpd sessions." +.Ve +.PP +.Vb 3 +\& [.] +\& trigger = $vsz > 10 +\& action = echo "Looks like you have a big $command program: $vsz KB" +.Ve +.PP +.Vb 10 +\& # Unfortunately we have use a different pattern below. (Here we use +\& # ".?" instead of ".".) In effect the the two patterns mean +\& # test every process. +\& [.?] +\& trigger = elapsed2secs('$etime') > 2*MINS && $pcpu > 40 +\& occurs = every +\& action = </dev/null 2>&1`; \e$? >> 8 } +\& action = < and it download via + +.SH "AUTHOR" +.IX Header "AUTHOR" +Rocky Bernstein (rocky@cpan.org) +.SH "COPYRIGHT" +.IX Header "COPYRIGHT" +.Vb 6 +\& Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006 +\& Rocky Bernstein, email: rocky@cpan.org. +\& This program is free software; you can redistribute it and/or modify +\& it under the terms of the GNU General Public License as published by +\& the Free Software Foundation; either version 2 of the License, or +\& (at your option) any later version. +.Ve +.PP +.Vb 4 +\& 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. +.Ve +.PP +.Vb 3 +\& 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., 675 Mass Ave, Cambridge, MA 02139, USA. +.Ve diff --git a/docs/ps-watcher.html b/docs/ps-watcher.html new file mode 100644 index 0000000..59e4414 --- /dev/null +++ b/docs/ps-watcher.html @@ -0,0 +1,764 @@ + + + + +ps-watcher - monitors various processes based on ps-like information. + + + + + + +

+ + + + + +
+

+

+

NAME

+

ps-watcher - monitors various processes based on ps-like information.

+

+

+
+

SYNOPSIS

+

ps-watcher [options...] + [--config] config-file

+

+

+
+

DESCRIPTION

+

Periodically a list of processes obtained via ps. More precisely +each item in the list contains the process name (just what's listed in +the ``cmd'' field, not the full command and arguments) and its process +id (pid). A configuration file specifies a list of Perl +regular-expression patterns to match the processes against. For each +match, a Perl expression specified for that pattern is evaluated. The +evaluated expression can refer to variables which are set by ps and +pertain to the matched process(es), for example the amount memory +consumed by the process, or the total elapsed time. Some other +variables are set by the program, such as the number of times the +process is running. If the Perl expression for a matched pattern +evaluates true, then an action can be run such as killing the program, +restarting it, or mailing an alert, or running some arbitrary Perl +code.

+

Some things you might want to watch a daemon or process for:

+
    +
  • +

    check that it is running (hasn't died)

    +
  • +
  • +

    ensure it is not running too many times

    +
  • +
  • +

    isn't consuming too much memory (perhaps a memory leak), or I/O

    +
  • +
+

Some actions you might want to take:

+
    +
  • +

    restart a process

    +
  • +
  • +

    kill off rampant processes

    +
  • +
  • +

    send an alert about any of the conditions listed above

    +
  • +
+

Depending on options specfied, this program can be run as a daemon, +run once (which is suitable as a cron job), or run not as a daemon +but still continuously (which may be handy in testing the program or +your configuration).

+

+

+

OPTIONS

+
+
--help + +
+

Print a usage message on standard error and exit with a return code +of 100.

+
+
+

+
+ +
--doc + +
+

Extact the full documentation that you are reading now, print it and +exit with a return code of 101.

+
+
+

+
+ +
--version + +
+

Print the version release on standard output and exit with a return +code of 10.

+
+
+

+
+ +
--debug number + +
+

Give debugging output. The higher the number, the more the output. The +default is 0 = none. 2 is the most debugging output.

+
+ +
[--config] configuration file + +
+

Specify configuration file. .

+
+
+

See CONFIGURATION FILE FORMAT below for information on the format +of the configuration file and EXAMPLE CONFIGURATION for a complete +example of a configuration file.

+
+
+

+
+ +
--log [log file] + +
+

Send or don't send error and debugging output to a log file. If option +is given but no logfile is specified, then use STDERR. The default is +no error log file. See also --syslog below.

+
+
+

+
+ +
--syslog | --nosyslog + +
+

Send or don't send error and debugging output to syslog. The default +is to syslog error and debug output.

+
+
+

+
+ +
--daemon | --nodaemon + +
+

Run or don't as a daemon.

+
+
+

+
+ +
--path search-path + +
+

Specify the executable search path used in running commands.

+
+ +
--ps-prog program + +
+

One can specify the command that gives ps information. By default, the +command is /bin/ps.

+
+
+

+
+ +
--run | --norun + +
+

do/don't run actions go through the motions as though we were going +to. This may be useful in debugging.

+
+
+

+
+ +
--sleep interval in seconds + +
+

It is expected that one might want to run ps-watcher over and over +again. In such instances one can specify the amount of time between +iterations with this option.

+
+
+

If a negative number is specified the program is run only once.

+
+
+

+
+ +
+

+

+

CONFIGURATION FILE MODIFICATION AND SIGNAL HANDLING

+

Periodically ps-watcher checks to see if the configuration file +that it was run against has changed. If so, the program rereads the +configuration file.

+

More precisely, the checks are done after waking up from a slumber. +If the sleep interval is long (or if you are impatient), you can +probably force the program to wake up using a HUP signal.

+

At any time you can increase the level of debug output by sending a +USR1 signal to the ps-watcher process. Similarly you can decrease the +level of debug output by sending the process a USR2 signal.

+

It is recommended that you terminate ps-watcher via an INT, TERM, or QUIT +signal.

+

+

+
+

CONFIGURATION FILE FORMAT

+

The format of a configuration file is a series of fully qualified +filenames enclosed in square brackets followed by a number of +parameter lines. Each parameter line has a parameter names followed by +an ``equal'' sign and finally value. That is:

+
+ # This is a comment line
+ ; So is this.
+ [process-pattern1]
+  parameter1 = value1
+  parameter2 = value2
+
+ [process-pattern2]
+  parameter1 = value3
+  parameter2 = value4
+

Comments start with # or ; and take effect to the end of the line.

+

This should be familiar to those who have worked with text-readible +Microsoft .INI files.

+

Note process patterns, (process-pattern1 and process-pattern2 +above) must be unique. If there are times when you may want to +refer to the same process, one can be creative to make these unique. +e.g. cron and [c]ron which refer to the same process even +though they appear to be different.

+

As quoted directly from the Config::IniFiles documentation:

+

Multiline or multivalued fields may also be defined ala UNIX +``here document'' syntax:

+
+  Parameter=<<EOT
+  value/line 1
+  value/line 2
+  EOT
+

You may use any string you want in place of ``EOT''. Note +that what follows the ``<<'' and what appears at the end of +the text must match exactly, including any trailing +whitespace.

+

There are two special ``process patterns'': $PROLOG and $EPILOG, the +former should appear first and the latter last.

+

You can put perl code to initialize variables here and do cleanup +actions in these sections using ``perl-action.''

+

A description of parameters names, their meanings and potential values +follows.

+
+
trigger + +
+

This parameter specifies the condition on which a process action is +fired. The condition is evaluated with Perl eval() and should +therefore return something which is equivalent to ``true'' in a Perl +expression.

+
+
+

If no trigger is given in a section, true or 1 is assumed and +the action is unconditionally triggered.

+
+
+

Example:

+
+
+
+  # Match if httpd has not spawned enough (<4) times. NFS and databases
+  # daemons typically spawn child processes.  Since the program
+  # matches against the command names, not commands and arguments,
+  # something like: ps -ef | grep httpd won't match the below.
+  # If you want to match against the command with arguments, see
+  # the example with $args below.
+  [httpd$]
+  trigger = $count <= 4
+
+ +
occurs + +
+

This parameter specifies how many times an action should be performed +on processes matching the section trigger. Acceptable values are +``every'', ``first'', ``first-trigger'', and ``none''.

+
+
+

Setting the occurs value to ``none'' causes the the trigger to be +evaluated when there are no matching processes. Although one might +think ``$count == 0'' in the action expression would do the same thing, +currently as coded this does not work.

+
+
+

Setting the occurs value to ``first'' causes the process-pattern rule to +be finished after handling the first rule that matches, whether or not the +trigger evaluated to true.

+
+
+

Setting the occurs value to ``first-trigger'' causes the process-pattern +rule to be finished after handling the first rule that matches and +the trigger evaluates to true.

+
+
+

If the item parameter is not specified, ``first'' is assumed.

+
+
+

Examples:

+
+
+
+  [.]
+  occurs = first
+  action = echo "You have $count processes running"
+
+
+
+  # Note in the above since there is no trigger specified,
+  #   occurs = first
+  # is the same thing as 
+  #   occurs = first-trigger
+
+
+
+  [.?]
+  trigger = $vsz > 1000
+  occurs  = every
+  action  = echo "Large program $command matches $ps_pat: $vsz KB"
+
+
+
+  # Fire if /usr/sbin/syslogd is not running.
+  # Since the program matches against the command names, not commands and
+  # arguments, something like: 
+  #   ps -ef | grep /usr/sbin/syslogd
+  # won't match the below.
+  [(/usr/sbin/)?syslogd]
+  occurs = none
+  action = /etc/init.d/syslogd start
+
+ +
action + +
+

This specifies the action, a command that gets run by the system +shell, when the trigger condition is evaluated to be true.

+
+
+

Example:

+
+
+
+ action = /etc/init.d/market_loader.init restart
+
+ +
perl-action + +
+

This specifies Perl statements to be eval'd. This can be especially +useful in conjunction with $PROLOG and $EPILOG sections to make tests +across collections of process and do things which ps-watcher +would otherwise not be able to do.

+
+
+

Example:

+
+
+
+  # A Perl variable initialization.
+  # Since ps-watcher runs as a daemon it's a good idea
+  # to (re)initialize variables before each run.
+  [$PROLOG]
+    perl-action = $root_procs=0;
+
+
+
+  # Keep track of how many root processes we are running
+  [.*]
+    perl-action = $root_procs++ if $uid == 0
+    occurs  = every
+
+
+
+  # Show this count.
+  [$EPILOG]
+    action  = echo "I counted $root_procs root processes"
+
+ +
+

+

+

EXPANDED VARIABLES IN TRIGGER/ACTION CLAUSES

+

Any variables defined in the program can be used in pattern or +action parameters. For example, $program can be used to refer to +the name of this program ps-watcher.

+

The following variables can be used in either the pattern or action +fields.

+
+
$action + +
+

A string containing the text of the action to run.

+
+
+

+
+ +
$perl_action + +
+

A string containing the text of the perl_action to run.

+
+
+

+
+ +
$ps_pat + +
+

The Perl regular expression specified in the beginning of the section.

+
+
+

+
+ +
$command + +
+

The command that matched $ps_pat.

+
+
+

The Perl regular expression specified in the beginning of the section. +Normally processes will not have funny characters in them. Just in +case, backticks in $command are escaped.

+
+
+

Example:

+
+
+
+  # List processes other than emacs (which is a known pig) that use lots
+  # of virtual memory
+
+
+
+  [.*]
+  trigger = $command !~ /emacs$/ && $vsz > 10
+  action  = echo \"Looks like you have a big \$command program: \$vsz KB\"
+
+
+

+
+ +
$count + +
+

The number of times the pattern matched. Presumably the number of +processes of this class running.

+
+
+

+
+ +
$trigger + +
+

A string containing the text of the trigger.

+
+ +
+

A list of variables specific to this program or fields commonly found in +ps output is listed below followed by a description of the more +common ones. See also ps for a more complete +description of the meaning of the field.

+
+ uid euid ruid gid egid rgid alarm blocked bsdtime c caught 
+cputime drs dsiz egroup eip esp etime euser f fgid 
+fgroup flag flags fname fsgid fsgroup fsuid fsuser fuid fuser  
+group ignored intpri lim longtname m_drs m_trs maj_flt majflt 
+min_flt  minflt ni nice nwchan opri pagein pcpu pending pgid pgrp 
+pmem ppid pri rgroup rss rssize rsz ruser s sess session 
+sgi_p sgi_rss sgid sgroup sid sig sig_block sig_catch sig_ignore 
+sig_pend sigcatch sigignore sigmask stackp start start_stack start_time 
+stat state stime suid suser svgid svgroup svuid svuser sz time timeout 
+tmout tname tpgid trs trss tsiz tt tty tty4 tty8 uid_hack uname 
+user vsize vsz wchan
+

Beware though, in some situations ps can return multiple lines for a +single process and we will use just one of these in the trigger. In +particular, Solaris's ps will return a line for each LWP (light-weight +process). So on Solaris, if a trigger uses variable lwp, it may or may +not match depending on which single line of the multiple ps lines is +used.

+

+
+
$args + +
+

The command along with its command arguments. It is possible that this +is might get truncated at certain length (if ps does likewise as is +the case on Solaris).

+
+
+

+
+ +
$ppid + +
+

The parent process id.

+
+
+

+
+ +
$stime + +
+

The start time of the process.

+
+
+

+
+ +
$etime + +
+

The end time of the process.

+
+
+

+
+ +
$pmem + +
+

The process memory.

+
+
+

+
+ +
$pcpu + +
+

The percent CPU utilization.

+
+
+

+
+ +
$tty + +
+

The controlling tty.

+
+
+

+
+ +
$szv + +
+

Virtual memory size of the process

+
+ +
+

+

+

OTHER THINGS IN TRIGGER CLAUSES

+

To make testing against elapsed time easier, a function elapse2sec() +has been written to parse and convert elapsed time strings in the +format dd-hh:mm:ss and a number of seconds.

+

Some constants for the number of seconds in a minute, hour, or day +have also been defined. These are referred to as MINS, HOURS, +and DAYS respectively and they have the expected definitions:

+
+  use constant MINS   => 60;
+  use constant HOURS  => 60*60;
+  use constant DAYS   => HOURS * 24;
+

Here is an example of the use of elapsed2sec():

+
+  # Which processes have been running for more than 3 hours?
+  # Also note use of builtin-function elapsed2secs, variable $etime
+  # and builtin-function HOURS
+  [.]
+    trigger = elapsed2secs('$etime') > 1*DAYS
+    action  = echo "$command has been running more than 1 day ($etime)"
+    occurs  = every
+

Please note the quotes around '$etime'.

+

+

+
+

EXAMPLE CONFIGURATION

+
+  # Comments start with # or ; and go to the end of the line.
+
+  # The format for each entry is in Microsoft .INI form:
+  # [process-pattern]
+  # trigger = perl-expression
+  # action  = program-and-arguments-to-run
+
+  [httpd$]
+    trigger = $count < 4
+    action  = echo "$trigger fired -- You have $count httpd sessions."
+
+  [.]
+  trigger = $vsz > 10
+  action  = echo "Looks like you have a big $command program: $vsz KB"
+
+  # Unfortunately we have use a different pattern below. (Here we use
+  # ".?" instead of ".".) In effect the the two patterns mean
+  # test every process.
+  [.?]
+    trigger = elapsed2secs('$etime') > 2*MINS && $pcpu > 40
+    occurs  = every
+    action  = <<EOT
+     echo "$command used $pcpu% CPU for the last $etime seconds" | /bin/mail root
+     kill -TERM $pid
+  EOT
+
+  # Scripts don't show as the script name as the command name on some
+  # operating systems.  Rather the name of the interpreter is listed
+  # (e.g. bash or perl) Here's how you can match against a script.
+  # BSD/OS is an exception: it does give the script name rather than
+  # the interpreter name.
+  [/usr/bin/perl]
+    trigger = \$args !~ /ps-watcher/
+    occurs  = every
+    action  = echo "***found perl program ${pid}:\n $args"
+

+

+
+

Using $PROLOG for getting non-ps information

+

Here is an example to show how to use ps-watcher to do something not +really possible from ps: check to see if a port is active. We make +use of lsof to check port 3333 and the $PROLOG make sure it runs.

+
+  [$PROLOG]
+    occurs  = first
+    trigger = { \$x=`lsof -i :3333 >/dev/null 2>&1`; \$? >> 8 }
+    action  = <<EOT
+    put-your-favorite-command-here arg1 arg2 ...
+  EOT
+

+

+
+

SECURITY CONSIDERATIONS

+

Any daemon such as this one which is sufficiently flexible is a +security risk. The configuration file allows arbitrary commands to be +run. In particular if this daemon is run as root and the configuration +file is not protected so that it can't be modified, a bad person could +have their programs run as root.

+

There's nothing in the ps command or ps-watcher, that requires one to +run this daemon as root.

+

So as with all daemons, one needs to take usual security precautions +that a careful sysadmin/maintainer of a computer would. If you can run +any daemon as an unprivileged user (or with no privileges), do it! If +not, set the permissions on the configuration file and the directory +it lives in.

+

This program can also run chrooted and there is a --path option that +is available which can be used to set the executable search path. All +commands used by ps-watcher are fully qualified, and I generally give a +full execution path in my configuration file, so consider using the +option --path=''.

+

Commands that need to be run as root you can run via sudo. I often +run process accounting which tracks all commands run. Tripwire may be +useful to track changed configuration files.

+

+

+
+

TROUBLESHOOTING

+

To debug a configuration file the following options are useful:

+

ps-watcher --log --nodaemon --sleep -1 --debug 2 configuration-file

+

For even more information and control try running the above under the +perl debugger, e.g.

+

perl -d ps-watcher --log --nodaemon --sleep -1 --debug 2 configuration-file

+

+

+
+

BUGS

+

Well, some of these are not so much a bug in ps-watcher so much as a +challenge to getting ps-watcher to do what you want it to do.

+

One common problem people run in into is understanding exactly what +the process variables mean. The manual page ps(1) should be of +help, but I've found some of the descriptions either a bit vague or +just plain lacking.

+

Sometimes one will see this error message when debug tracing is turned on:

+
+  ** debug ** Something wrong getting ps variables
+

This just means that the process died betwee the time ps-watcher first +saw the existence of the process and the time that it queried +variables.

+

+

+
+

SEE ALSO

+

See also ps(1) and syslogd(8).

+

Another cool program doing ps-like things is xps. Well okay, it's +another program I distributed. It shows the process tree dynamically +updated using X Motif and tries to display the output ``attractively'' +but fast. You can the find the homepage at +http://motif-pstree.sourceforge.net and it download via +http://prdownloads.sourceforge.net/motif-pstree

+

+

+
+

AUTHOR

+

Rocky Bernstein (rocky@cpan.org)

+

+

+
+

COPYRIGHT

+
+  Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006
+  Rocky Bernstein, email: rocky@cpan.org.
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ + + + diff --git a/install-sh b/install-sh new file mode 100755 index 0000000..ebc6691 --- /dev/null +++ b/install-sh @@ -0,0 +1,250 @@ +#! /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 "install: no input file specified" + exit 1 +else + true +fi + +if [ x"$dir_arg" != x ]; then + dst=$src + src="" + + if [ -d $dst ]; then + instcmd=: + else + instcmd=mkdir + fi +else + +# Waiting for this to be detected by the "$instcmd $src $dsttmp" command +# might cause directories to be created, which would be especially bad +# if $src (and thus $dsttmp) contains '*'. + + if [ -f $src -o -d $src ] + then + true + else + echo "install: $src does not exist" + exit 1 + fi + + if [ x"$dst" = x ] + then + echo "install: no destination specified" + exit 1 + else + true + fi + +# If destination is a directory, append the input filename; if your system +# does not like double slashes in filenames, you may need to add some logic + + if [ -d $dst ] + then + dst="$dst"/`basename $src` + else + true + fi +fi + +## this sed command emulates the dirname command +dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + +# Make sure that the destination directory exists. +# this part is taken from Noah Friedman's mkinstalldirs script + +# Skip lots of stat calls in the usual case. +if [ ! -d "$dstdir" ]; then +defaultIFS=' +' +IFS="${IFS-${defaultIFS}}" + +oIFS="${IFS}" +# Some sh's can't handle IFS=/ for some reason. +IFS='%' +set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` +IFS="${oIFS}" + +pathcomp='' + +while [ $# -ne 0 ] ; do + pathcomp="${pathcomp}${1}" + shift + + if [ ! -d "${pathcomp}" ] ; + then + $mkdirprog "${pathcomp}" + else + true + fi + + pathcomp="${pathcomp}/" +done +fi + +if [ x"$dir_arg" != x ] +then + $doit $instcmd $dst && + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi +else + +# If we're going to rename the final executable, determine the name now. + + if [ x"$transformarg" = x ] + then + dstfile=`basename $dst` + else + dstfile=`basename $dst $transformbasename | + sed $transformarg`$transformbasename + fi + +# don't allow the sed command to completely eliminate the filename + + if [ x"$dstfile" = x ] + then + dstfile=`basename $dst` + else + true + fi + +# Make a temp file name in the proper directory. + + dsttmp=$dstdir/#inst.$$# + +# Move or copy the file name to the temp name + + $doit $instcmd $src $dsttmp && + + trap "rm -f ${dsttmp}" 0 && + +# and set any options; do chmod last to preserve setuid bits + +# If any of these fail, we abort the whole thing. If we want to +# ignore errors from any of these, just make sure not to ignore +# errors from the above "$doit $instcmd $src $dsttmp" command. + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && + +# Now rename the file to the real destination. + + $doit $rmcmd -f $dstdir/$dstfile && + $doit $mvcmd $dsttmp $dstdir/$dstfile + +fi && + + +exit 0 diff --git a/missing b/missing new file mode 100755 index 0000000..c72c059 --- /dev/null +++ b/missing @@ -0,0 +1,283 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. +# Copyright 1996, 1997, 1999, 2000 Free Software Foundation, Inc. +# Originally by Fran,cois Pinard , 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 +# 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. + +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.3 - GNU automake" + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + + aclocal) + 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) + 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) + 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) + 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 + ;; + + 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) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified a dependency of a manual page. You may need the + \`Help2man' package in order for those modifications to take + effect. You can get \`Help2man' from any GNU archive site." + + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + if test -z "$file"; then + file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` + fi + if [ -f "$file" ]; then + touch $file + else + test -z "$file" || exec >$file + echo ".ab help2man is required to generate this page" + exit 1 + fi + ;; + + makeinfo) + if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then + # We have makeinfo, but it failed. + exit 1 + fi + + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + if test -z "$file"; then + file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` + fi + touch $file + ;; + + tar) + shift + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + fi + + # We have already tried tar in the generic part. + # Look for gnutar/gtar before invocation to avoid ugly error + # messages. + if (gnutar --version > /dev/null 2>&1); then + gnutar ${1+"$@"} && exit 0 + fi + if (gtar --version > /dev/null 2>&1); then + gtar ${1+"$@"} && exit 0 + fi + firstarg="$1" + if shift; then + case "$firstarg" in + *o*) + firstarg=`echo "$firstarg" | sed s/o//` + tar "$firstarg" ${1+"$@"} && exit 0 + ;; + esac + case "$firstarg" in + *h*) + firstarg=`echo "$firstarg" | sed s/h//` + tar "$firstarg" ${1+"$@"} && exit 0 + ;; + esac + fi + + echo 1>&2 "\ +WARNING: I can't seem to be able to run \`tar' with the given arguments. + You may want to install GNU tar or Free paxutils, or check the + command line arguments." + exit 1 + ;; + + *) + echo 1>&2 "\ +WARNING: \`$1' is needed, and you do not seem to have it handy on your + system. You might have modified some files without having the + proper tools for further handling them. Check the \`README' file, + it often tells you about the needed prerequirements for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing \`$1' program." + exit 1 + ;; +esac + +exit 0 diff --git a/mkinstalldirs b/mkinstalldirs new file mode 100755 index 0000000..3889669 --- /dev/null +++ b/mkinstalldirs @@ -0,0 +1,40 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy +# Author: Noah Friedman +# Created: 1993-05-16 +# Public domain + +# $Id: mkinstalldirs,v 1.1.1.1 2000/03/20 09:58:55 root Exp $ + +errstatus=0 + +for file +do + set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + shift + + pathcomp= + for d + do + pathcomp="$pathcomp$d" + case "$pathcomp" in + -* ) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" 1>&2 + + mkdir "$pathcomp" || lasterr=$? + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + fi + fi + + pathcomp="$pathcomp/" + done +done + +exit $errstatus + +# mkinstalldirs ends here diff --git a/post-configure.in b/post-configure.in new file mode 100755 index 0000000..c221979 --- /dev/null +++ b/post-configure.in @@ -0,0 +1,80 @@ +#!@PERL@ -w +# -*- Perl -*- +# $Id: post-configure.in,v 1.10 2006/03/10 19:07:05 rockyb Exp $ +require 5.006; +sub touch_file($); + +$program='@PACKAGE@'; +# +# Do we have a version of perl that we can work with? +# +printf "You have of Perl %s\n", $]; + +# +# Do we have all the packages we need? +# +print "Checking to see that you have all library modules installed...\n"; +@needed_packages = ('Sys::Syslog', + # 'IPC::Open3', # -- to simultate `cmd` better + 'File::Basename', + 'Config::IniFiles', + 'Getopt::Long', + 'Pod::Text' + ); +foreach $package (@needed_packages) { + unless (eval "require $package") { + die "Need package \"$package\": $@"; + } + print " $package is installed\n"; +} + +# +# +# +print "Checking what to put after #! at the top of $program..."; +$startperl = `@PERL@ -V:startperl`; +if ($startperl =~ /^startperl=\'#!(.*)\'\;$/) { + $perlpath = $1; + print "$perlpath\n"; +} else { + $perlpath = ''; + print STDERR "\nCan't determine what to put after #! in $program\n"; + print STDERR "Change the top of the program or arrange for perl to\n"; + print STDERR "execute it.\n"; +} + +print "Rewriting $program.in into $program..."; +die "Cannot read $program.in: $!" if !open(INPUT, "<$program.in"); +die "Cannot write $program: $!" if !open(OUTPUT, ">$program"); +if (!$perlpath) { + print OUTPUT "# Customize this line, for example:\n#!/usr/bin/perl -w\n"; +} else { + print OUTPUT "#!$perlpath -w\n"; +} +@OUTPUT = ; +shift @OUTPUT; # Remove old 1st line. +print OUTPUT @OUTPUT; +print "\n"; +close(OUTPUT); +chmod 0755, $program; + +# Touch a timestamp to record that we've created this $program +# from $program.in. If we later modify $program (which is convenient +# during debugging), we will know to copy that back to $program.in, +# the version that get's checked into CVS. +touch_file("./${program}.stamp"); +exit; + +sub touch_file($) { + my $file_name = $_[0]; + if (-e $file_name) { + my $now = time(); + my $count = utime $now, $now, $file_name; + exit ($count != 1); + } else { + open(FILE, ">", $file_name) || die "Can't open $file_name: $!"; + close(FILE); + exit $?; + } +} + diff --git a/ps-watcher b/ps-watcher new file mode 100755 index 0000000..b95ed40 --- /dev/null +++ b/ps-watcher @@ -0,0 +1,1298 @@ +#!/usr/bin/perl -w +# -*- Perl -*- +use diagnostics; +my $vcid='$Id: ps-watcher.in.in,v 1.57 2006/03/10 19:07:05 rockyb Exp $ '; +# See usage subroutine or perlpod documentation below. + +# Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006 +# Rocky Bernstein, email: rocky@cpan.org +# +# This program is free software; you can +# redistribute it and/or modify it under the terms of the GNU General +# Public License as published by the Free Software Foundation; either +# version 2 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., 675 Mass Ave, Cambridge, MA 02139, USA. + +use vars qw($program $ps_cmd $ps_cmdfull $ps_fullcmd_fmt @ps_vars $ps_dvars + $0 $logopened $ps_args_fmt $args + $count $pid $command $ps_arg_opts $DEVNULL %opts + ); +use strict; +BEGIN { require 5.00503 } + +sub usage($) { + my ($full_help) = @_; + + print " +usage: + + $program [OPTIONS..] + +$program can be used to monitor various processes based on ps-like +information. + +options: + --help -- print this help and exit + --doc -- extract and print complete documentation and exit + --version -- show a CVS version string and exit + --debug *n* -- give debugging output. The higher the + number, the more the output + --run | --norun -- do/don't run actions + go through the motions as though we were going to + --log [*logfile*] -- Set a log file for this program. If option given + but no logfile, then use STDERR. Default is + no error log file. + --syslog | --nosyslog + -- send or don't send error output to syslog + Default is to send to syslog. + --config *cnf file* -- specify configuration file. + + --daemon | --nodaemon + -- do or don't become a daemon. Default daemonize. + --sleep *time* -- sleep interval between iterations. The default is + $opts{sleep_interval} seconds. + --path path -- executable search path to use in running commands + + --ps-prog *program* -- command that gets ps information. The default is: + $opts{ps_prog} + --ps-pids-opt *ps opts* + -- ps options that lists pids and commands. The + default is: $opts{ps_pid_opts} +"; + + if ($full_help) { + print " +General operation: + +Periodically a list of processes obtained via ps. More precisely +each item in the list contains the process name (just what's listed in +the \"command\" field, not the full command and arguments) and its +process id (pid). A configuration file specifies a list of Perl +regular-expression patterns to match the process names against. For +each match, a Perl expression specified for that pattern is +evaluated. The evaluated expression can refer to variables which are +set by ps and pertain to the matched process(es), for example the +amount memory consumed by the process, or the total elapsed time. Some +other variables are set by the program, such as the number of times +the process is running. If the Perl expression for a matched pattern +evaluates true, then an action can be run such as killing the program, +restarting it, or mailing an alert. + +This program can be used to ensure a daemon hasn't died or ensure it +is not running too many times. It might be used to determine when a +process has consumed too many resources (for example due to a memory +leak). + +The following variables can be used in patterns or actions: +\t". '$' . join("\n\t\$", @ps_vars) . +" + The following is a sample config file: + +# Comments start with # or ; and go to the end of the line. + +# The format for each entry is in Microsoft .INI form: +# [process-pattern] +# trigger = perl-expression +# action = program-and-arguments-to-run + +[httpd\$] + trigger = \$count < 4 + action = echo \"\$trigger fired -- You have \$count \$command sessions.\" + +[em?cs] +trigger = \$vsz > 10 +action = echo \"Looks like you have a big \$command program: \$vsz KB\" + +"; + } + exit 100; +} + +sub init(); +sub podthis(); +sub process_options(); +sub show_version(); +sub daemonize(); +sub eval_trigger_action($$$); +sub make_the_rounds($); +sub elapsed2secs($); +sub logger($); +sub debug_log($$); +sub gather_psinfo(); +sub read_config($); +sub check_config_file($); +sub run_trigger($$$); + +init(); +process_options(); + +# Unfurl the banner... +logger("Starting: $vcid"); + +my $cfg=read_config($opts{conf_file}); + +if (!defined($cfg)) { + for my $line (@Config::IniFiles::errors) { + logger($line); + } + exit 2; +} + +if ($opts{daemon}) { + daemonize(); +} + +install_handlers(); + +do { + make_the_rounds($cfg); + sleep $opts{sleep_interval} if $opts{sleep_interval} > 0; + check_config_file($opts{conf_file}); +} until ($opts{sleep_interval} < 0) ; +if ($opts{syslog}) { + use Sys::Syslog; + closelog; +} +exit 0; + +# Evaluates the trigger and if that's true also performs +# an action. 1 is returned if the action was performed, +# zero otherwise. +sub eval_trigger_action($$$) { + my ($trigger,$action,$perl_action) = @_; + my $etrigger=$trigger; + # It is a pain to predeclare all of the variables assigned + # by ps which is OS and ps specific. So we'll allow anything. + # Likewise, we'll allow it occur in $action. + no strict; + if ($trigger ne '1') { + $etrigger =~ s/"/\\"/g; + debug_log("trigger before substitution: $etrigger", 2); + $etrigger = eval qq/"$trigger"/; + } + debug_log("trigger after substitution: $etrigger", 2); + if (eval ($etrigger)) { + if (defined($perl_action)) { + debug_log("running Perl_action: $perl_action", 2); + eval($perl_action) if $opts{run}; + } + if (defined($action)) { + debug_log("action before substitution: $action", 2); + my $eaction=$action; + $eaction =~ s/"/\\"/g; + $eaction = eval qq/"$eaction"/; + debug_log("action after substitution: $eaction", 2); + my $output=`$eaction` if $opts{run}; + chomp($output); + logger($output) if $output; + } + return 1; + } + return 0; +} + +# Perform a round over the process_patterns comparing against the +# process info to see if anything's stirring. +sub make_the_rounds($) { + my $cfg = $_[0]; + my @ps_info=gather_psinfo(); + foreach our $ps_pat ($cfg->Sections()) { + debug_log("process pattern: /$ps_pat/", 1); + my @selected_ps; + my $in_prolog_epilog=0; + my $trigger = $cfg->val($ps_pat, 'trigger') || '1'; + my $action = $cfg->val($ps_pat, 'action'); + my $perl_action = $cfg->val($ps_pat, 'perl-action'); + my $occurs = $cfg->val($ps_pat, 'occurs') || "first"; + local $count; + if ($ps_pat =~ /^\$PROLOG/ || $ps_pat =~ /\$EPILOG/) { + # Set to run trigger below. + $count = @ps_info; + $in_prolog_epilog=1; + } else { + @selected_ps = grep(/$ps_pat/, @ps_info); + $count = @selected_ps; + debug_log("count for /$ps_pat/: $count", 2); + } + if ($in_prolog_epilog) { + # execute trigger + eval_trigger_action($trigger, $action, $perl_action); + } elsif ($occurs =~ /none/i) { + if ($count eq 0) { + # execute the trigger anyway + eval_trigger_action($trigger, $action, $perl_action); + } + } elsif ($count gt 0) { + TRIGGER: + foreach (@selected_ps) { + next if !/\s*(\d+)\s+(\S+)/; + local($pid, $command) = /\s*(\d+)\s+(\S+)/; + if ($pid !~ /\d+/) { + logger("Something wrong with ps format:\n$_"); + next; + } + + my $ps_fullcmd = sprintf $ps_fullcmd_fmt, $pid; + my @output = `$ps_fullcmd`; + my $output=''; + if (@output == 1) { + # Got one line of output - good. + $output=$output[0]; + # Make sure though we don't just have a title line. + # One of the fields should be just digits, e.g. ppid, uid, gud... + next if $output !~ m{\s+\d+\s+}; + } elsif (@output == 2 && 0) { + # Got two lines of output - we are running a ps where + # we can't remove the title line? + $output=$output[1]; + } elsif (@output > 1 && 0) { + # Got multiple lines of output - we are running a ps which can + # do so. For example Solaris does this for a process that has many + # LWPs (light-weight processes). + $output=$output[0]; + } else { + debug_log("Something wrong getting ps variables", 1); + next; + } + + local $args = ''; + if ($ps_arg_opts) { + my $ps_argscmd = sprintf $ps_args_fmt, $pid; + my @output = `$ps_argscmd`; + if (@output == 1) { + $args=$output[0]; + } elsif (@output == 2 && 0) { + $args=$output[1]; + } else { + debug_log("Something wrong with getting command arguments", 1); + } + } + + # Process may have disappeared. In this case we'll get no + # output. + next if !$output; + + # Add ' ' so split will junk first ps_dvars $junk. + $output = ' ' . $output; + my $perl_ps_assign = "$ps_dvars = split(/\\s+/, \$output)"; + { + # It is a pain to predeclare all of the variables assigned + # by ps which is OS and ps specific. So we'll allow anything. + # Likewise, we'll allow it occur in $action. + no strict; + + # Escape backticks so that we don't inadvertently run + # the program. For example there could be a process named + # `/tmp/evilcommand` (with backticks). Thanks to Randal + # Schwartz for noticing the problem. + # Not sure if there are other things to watch out for. + # Although the Perl Cookbook suggests how to make system, + # safe, it is silent about making eval safe. + $command =~ s/`/\\`/g; + + if (eval ($perl_ps_assign)) { + my $evaled = eval_trigger_action($trigger, $action, + $perl_action); + last TRIGGER if $evaled && $occurs eq 'first-trigger'; + last TRIGGER if $occurs eq 'first'; + } else { + logger("Something wrong with perl assignment: $perl_ps_assign"); + last TRIGGER; + } + } # no strict + } # foreach + } # if $count + } +} + +# Initailize various variables variously. +sub init() { + + use File::Basename; + $program = basename($0); # Who am I today, anyway? + + $DEVNULL = '/dev/null'; # And what do we do about non Unix? + + use constant MINS => 60; + use constant HOURS => 60*60; + use constant DAYS => HOURS * 24; + + $opts{debug} = 0; # no debugging + $opts{run} = 1; # run actions + $opts{syslog} = 1; # Log errors to syslog + $opts{logfile} = $DEVNULL; + $opts{daemon} = 1; # Run as daemon; + $opts{ps_prog} = '/bin/ps'; # Where is ps? + $opts{ps_pid_opts} = '-e -o pid= -o cmd='; # How do I get pids and commands? + + $ps_arg_opts = '-www -o args='; # How do I get full process command? + + # List of all the fields from ps we will be able to use. Don't need + # to list variables listed above. + @ps_vars = qw ( uid euid ruid gid egid rgid alarm blocked bsdtime c caught +cputime drs dsiz egroup eip esp etime euser f fgid +fgroup flag flags fname fsgid fsgroup fsuid fsuser fuid fuser +group ignored intpri lim longtname m_drs m_trs maj_flt majflt +min_flt minflt ni nice nwchan opri pagein pcpu pending pgid pgrp +pmem ppid pri rgroup rss rssize rsz ruser s sess session +sgi_p sgi_rss sgid sgroup sid sig sig_block sig_catch sig_ignore +sig_pend sigcatch sigignore sigmask stackp start start_stack start_time +stat state stime suid suser svgid svgroup svuid svuser sz time timeout +tmout tname tpgid trs trss tsiz tt tty tty4 tty8 uid_hack uname +user vsize vsz wchan +); + + # Convert the above into an argument list like + # ($junk, $user, ... ) + # The first argument ($junk) will be null and thrown out. + $ps_dvars = '($junk,$' . join(',$', @ps_vars) . ')'; + + $opts{sleep_interval} = 300; + +} + +# The bane of programming. +sub process_options() { + use Getopt::Long; + my(@opt_cf); + $Getopt::Long::autoabbrev = 1; + my($newstyle_config); + + my ($help, $long_help, $show_version); + + my $result = &GetOptions + ( + 'help' => \$help, + 'doc' => \$long_help, + 'version' => \$show_version, + 'config=s' => \$opts{conf_file}, + 'debug=i' => \$opts{debug}, + 'path=s' => \$ENV{PATH}, + 'ps-pid-opts=s'=> \$opts{ps_pid_opts}, + 'ps-prog=s' => \$opts{ps_prog}, + 'sleep=i' => \$opts{sleep_interval}, + 'log:s' => \$opts{logfile}, + 'syslog!' => \$opts{syslog}, + 'run!' => \$opts{run}, + 'daemon!' => \$opts{daemon}, + ); + + show_version() if $show_version; + usage(1) if $help; + podthis() if $long_help; + + # However specifying a configuration file is not. + # Nor can we deal with multiple configuration files or tolerate + # option-processing errors. + usage(0) if !$result; + + # The option-specifier "--config" is optional... + if (@ARGV && !defined($opts{conf_file})) { + $opts{conf_file} = shift(@ARGV); + } + + # However we do have to give exactly one configurtion file. + if (!defined($opts{conf_file}) || @ARGV != 0) { + print STDERR "$program: Please specify exactly one configuration file.\n"; + usage(0); + } + + $ps_cmd = "$opts{ps_prog} $opts{ps_pid_opts}"; + my $ps_vars; + if (1) { + $ps_vars = join('= -o ', @ps_vars) . '='; + } else { + $ps_vars = join(' -o ', @ps_vars); + } + + if ('') { + $ps_fullcmd_fmt = ""; + } else { + $ps_fullcmd_fmt = "$opts{ps_prog} -p %d -o $ps_vars"; + } + if ('') { + $ps_args_fmt = ""; + } else { + $ps_args_fmt = "$opts{ps_prog} -p %d $ps_arg_opts"; + } + + open STDIN, $DEVNULL or die "Can't read $DEVNULL: $!"; + open STDOUT, ">>$opts{logfile}" or die "Can't write to $opts{logfile}: $!" + if $opts{logfile} ne ''; + open STDERR, ">>$opts{logfile}" or die "Can't write to $opts{logfile}: $!" + if $opts{logfile} ne ''; +} + +# Signal handling.. +sub install_handlers { + $SIG{'QUIT'} = \&terminate; + $SIG{'TERM'} = \&terminate; + $SIG{'INT'} = \&terminate; + $SIG{'HUP'} = \&null_handler; + $SIG{'USR1'} = \&debug_up_handler; + $SIG{'USR2'} = \&debug_down_handler; +} + +# Used perhaps to break out of a deep sleep. +sub null_handler { + my($signo) = @_; + logger("Received signal: ${signo}"); +} + +# Increase verbosity of debugging. +sub debug_up_handler { + my($signo) = @_; + $opts{debug}++; + logger("Received signal: ${signo}. Increasing debugging to $opts{debug}."); +} + +# Decrease verbosity of debugging. +sub debug_down_handler { + my($signo) = @_; + $opts{debug}--; + logger("Received signal: ${signo}. Decreasing debugging to $opts{debug}."); +} + +# Signal handler to go down recording the signal. +sub terminate { + my($signo) = @_; + use Config; + if (defined $Config{sig_name}) { + my $i = 0; + my @signame; + my %sig; + foreach my $name (split(' ', $Config{sig_name})) { + $signame[$i] = $name; + $sig{$name} = $i; + $i++; + } + $signo = $sig{$signo} if exists($sig{$signo}); + if ($signo =~ m{\A\d+\Z} ) { + logger("Going down on $signame[$signo] (${signo}) signal. " . + "Have a nice day!"); + } + } else { + logger("Going down on signal ${signo}). Have a nice day!"); + } + + $signo = 15 if $signo !~ m{\A\d+\Z}; + if ($opts{syslog}) { + use Sys::Syslog; + closelog; + } + exit $signo; +}; + +# Utility function for parsing/converting elapsed time into seconds. +sub elapsed2secs($) { + $_ = $_[0]; + + # Handle formats like: + # 1-08:34:37 -- One day, 8 hours, 34 minutes, 37 seconds + # 20:40:34 -- 20 hours, 40 minutes, 34 seconds + # 0:00 -- 0 seconds. + + # 1-08:34.37 -- One day, 8 hours, 34 minutes, 37 seconds + # 20:40.34 -- 20 hours, 40 minutes, 34 seconds + # 5.03 -- 5 minutes, 3 seconds. + # 5 -- 5 seconds. + + # Some easy cases. + return -1 if !defined($_) || m{\A\s*\Z}; + return $_ if m{\A\d+\Z}; + + # Originally had as one pattern and optional + # arguments but i got compaints about using + # uninitialized variables even with "no diagonstics". Would rather + # switch than fight. + my $min_secs_pat = '(\d{1,2})[:.](\d\d)'; + if (m{ + (\d{1,2})- # The number of days. e.g. 1- or 19- or blank + (\d{1,2})[:.] # The number of hrs. e.g. 01: or 23: or blank + $min_secs_pat + }x) { + my ($days, $hours, $minutes, $secs) = ($1, $2, $3, $4); + return ($days*DAYS + $hours*HOURS + $minutes*MINS + $secs); + } elsif (m{ + (\d{1,2})[:.] # The number of hrs. e.g. 01: or 23: or blank + $min_secs_pat + }x) { + my ($hours, $minutes, $secs) = ($1, $2, $3); + return ($hours*HOURS + $minutes*MINS + $secs); + } elsif (m{$min_secs_pat}) { + my ($minutes, $secs) = ($1, $2); + return ($minutes*MINS + $secs); + } else { + logger("Error in converting $_ to seconds"); + return -1; + } +} + +# Return time and PID as string in a common format +sub timestring() { + my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = + localtime(time); + $mon++; + return sprintf( "%.2d/%.2d/%.2d %.2d:%.2d:%.2d %s[$$]", + $mon, $mday, $year%100, $hour, $min, $sec, $program); +} + +# log error to syslog and print to STDERR. +sub logger($) { + my($msg) = shift; + + if ($opts{syslog}) { + if (!$logopened) { + use Sys::Syslog; + $logopened++; + openlog($program,'cons,pid', 'err'); + } + syslog('info', $msg); + } + if (defined($opts{logfile}) && $opts{logfile} ne $DEVNULL) { + my $ts=timestring(); + print STDERR "$ts: $msg\n"; + } +} + +sub debug_log($$) { + my($msg, $level) = @_; + logger("** debug ** $msg") if $opts{debug} >= $level; +} + +sub gather_psinfo() { + my @output=`$ps_cmd`; + return @output; +} + +# Show the CVS version id string and quit. +sub show_version() { + print "$vcid +Copyright (C) 2000, 2002, 2003, 2004, 2006 Rocky Bernstein. +This is free software; see the source for copying conditions. +There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. +"; + exit 10; +} + + +sub daemonize() { + chdir '/' or die "Can't chdir to /: $!"; + defined(my $pid = fork) or die "Can't fork: $!"; + exit 0 if $pid; + use POSIX qw(setsid); + setsid() or die "Can't start a new session: $!"; + umask 0; +} + +# Time configuration file was last read. +my $conf_time; + +# Read a configuration file. +sub read_config($) { + use Config::IniFiles; + my($cf)=@_; + if (!-f $cf || !-r _ || -z _ || !-T _) { + logger("Unusable config file: <$cf>"); + return undef; + } + + # Save time we read the configuration file so we can check back + # later to see if it changed. + + my($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, + $atime, $mtime, $ctime) = stat $cf; + $conf_time = $mtime; + + return new Config::IniFiles( -file => $cf ); +} + +# Check to see if any configuration file has changed +# since the last time this routime was called. +# Updates global $conf_time. +sub check_config_file($) { + my ($conf_file) = @_; + my($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, + $atime, $mtime, $ctime) = stat $opts{conf_file}; + if ( defined($conf_time) && defined($mtime) && $conf_time < $mtime ) { + logger("Configuration file $conf_file modified; re-reading..."); + $cfg = read_config($conf_file); + } +} + +sub run_trigger($$$) { + my($trigger, $action, $count) = @_; + my $etrigger=$trigger; + if ($trigger ne '1') { + $etrigger =~ s/"/\\"/g; + debug_log("trigger before substitution: $etrigger", 2); + $etrigger = eval qq/"$trigger"/; + } + debug_log("trigger after substitution: $etrigger", 2); + if (eval ($etrigger)) { + debug_log("action before substitution: $action", 2); + my $eaction=$action; + $eaction =~ s/"/\\"/g; + $eaction = eval qq/"$eaction"/; + debug_log("action after substitution: $eaction", 2); + my $output=`$eaction` if $opts{run}; + chomp($output); + logger($output) if $output; + } +} + +sub podthis() { + use Pod::Text; + $^W = 0; + pod2text $0; + exit 101; +} + +#-------------------------------------------------- +=pod + +=head1 NAME + +ps-watcher - monitors various processes based on ps-like information. + + +=head1 SYNOPSIS + +B [I...] + [C<--config>] I + +=head1 DESCRIPTION + +Periodically a list of processes obtained via C. More precisely +each item in the list contains the process name (just what's listed in +the "cmd" field, not the full command and arguments) and its process +id (pid). A configuration file specifies a list of Perl +regular-expression patterns to match the processes against. For each +match, a Perl expression specified for that pattern is evaluated. The +evaluated expression can refer to variables which are set by ps and +pertain to the matched process(es), for example the amount memory +consumed by the process, or the total elapsed time. Some other +variables are set by the program, such as the number of times the +process is running. If the Perl expression for a matched pattern +evaluates true, then an action can be run such as killing the program, +restarting it, or mailing an alert, or running some arbitrary Perl +code. + +Some things you might want to watch a daemon or process for: + +=over 2 + +=item * + +check that it is running (hasn't died) + +=item * + +ensure it is not running too many times + +=item * + +isn't consuming too much memory (perhaps a memory leak), or I/O + +=back + +Some actions you might want to take: + +=over 2 + +=item * + +restart a process + +=item * + +kill off rampant processes + +=item * + +send an alert about any of the conditions listed above + +=back + +Depending on options specfied, this program can be run as a daemon, +run once (which is suitable as a C job), or run not as a daemon +but still continuously (which may be handy in testing the program or +your configuration). + +=head2 OPTIONS + +=over 4 + +=item --help + +Print a usage message on standard error and exit with a return code +of 100. + +Z<> + +=item --doc + +Extact the full documentation that you are reading now, print it and +exit with a return code of 101. + +Z<> + +=item --version + +Print the version release on standard output and exit with a return +code of 10. + +Z<> + +=item --debug I + +Give debugging output. The higher the number, the more the output. The +default is 0 = none. 2 is the most debugging output. + +=item [--config] I + +Specify configuration file. . + +See L below for information on the format +of the configuration file and L for a complete +example of a configuration file. + +Z<> + +=item --log [I] + +Send or don't send error and debugging output to a log file. If option +is given but no logfile is specified, then use STDERR. The default is +no error log file. See also --syslog below. + +Z<> + +=item --syslog | --nosyslog + +Send or don't send error and debugging output to syslog. The default +is to syslog error and debug output. + +Z<> + +=item --daemon | --nodaemon + +Run or don't as a daemon. + +Z<> + +=item --path I + +Specify the executable search path used in running commands. + +=item --ps-prog I + +One can specify the command that gives ps information. By default, the +command is F. + +Z<> + +=item --run | --norun + +do/don't run actions go through the motions as though we were going +to. This may be useful in debugging. + +Z<> + +=item --sleep I + +It is expected that one might want to run ps-watcher over and over +again. In such instances one can specify the amount of time between +iterations with this option. + +If a negative number is specified the program is run only once. + +Z<> + +=back + +=head2 CONFIGURATION FILE MODIFICATION AND SIGNAL HANDLING + +Periodically ps-watcher checks to see if the configuration file +that it was run against has changed. If so, the program rereads the +configuration file. + +More precisely, the checks are done after waking up from a slumber. +If the sleep interval is long (or if you are impatient), you can +probably force the program to wake up using a HUP signal. + +At any time you can increase the level of debug output by sending a +USR1 signal to the ps-watcher process. Similarly you can decrease the +level of debug output by sending the process a USR2 signal. + +It is recommended that you terminate ps-watcher via an INT, TERM, or QUIT +signal. + +=head1 CONFIGURATION FILE FORMAT + +The format of a configuration file is a series of fully qualified +filenames enclosed in square brackets followed by a number of +parameter lines. Each parameter line has a parameter names followed by +an "equal" sign and finally value. That is: + + # This is a comment line + ; So is this. + [process-pattern1] + parameter1 = value1 + parameter2 = value2 + + [process-pattern2] + parameter1 = value3 + parameter2 = value4 + +Comments start with # or ; and take effect to the end of the line. + +This should be familiar to those who have worked with text-readible +Microsoft C<.INI> files. + +Note process patterns, (F and F +above) must be unique. If there are times when you may want to +refer to the same process, one can be creative to make these unique. +e.g. F and F<[c]ron> which refer to the same process even +though they I to be different. + +As quoted directly from the Config::IniFiles documentation: + +Multiline or multivalued fields may also be defined ala UNIX +"here document" syntax: + + Parameter=< match exactly, including any trailing +whitespace. + +There are two special "process patterns": $PROLOG and $EPILOG, the +former should appear first and the latter last. + +You can put perl code to initialize variables here and do cleanup +actions in these sections using "perl-action." + +A description of parameters names, their meanings and potential values +follows. + +=over + +=item trigger + +This parameter specifies the condition on which a process action is +fired. The condition is evaluated with Perl eval() and should +therefore return something which is equivalent to "true" in a Perl +expression. + +If no trigger is given in a section, true or 1 is assumed and +the action is unconditionally triggered. + +Example: + + # Match if httpd has not spawned enough (<4) times. NFS and databases + # daemons typically spawn child processes. Since the program + # matches against the command names, not commands and arguments, + # something like: ps -ef | grep httpd won't match the below. + # If you want to match against the command with arguments, see + # the example with $args below. + [httpd$] + trigger = $count <= 4 + +=item occurs + +This parameter specifies how many times an action should be performed +on processes matching the section trigger. Acceptable values are +"every", "first", "first-trigger", and "none". + +Setting the occurs value to "none" causes the the trigger to be +evaluated when there are no matching processes. Although one might +think "$count == 0" in the action expression would do the same thing, +currently as coded this does not work. + +Setting the occurs value to "first" causes the process-pattern rule to +be finished after handling the first rule that matches, whether or not the +trigger evaluated to true. + +Setting the occurs value to "first-trigger" causes the process-pattern +rule to be finished after handling the first rule that matches I +the trigger evaluates to true. + +If the item parameter is not specified, "first" is assumed. + +Examples: + + [.] + occurs = first + action = echo "You have $count processes running" + + # Note in the above since there is no trigger specified, + # occurs = first + # is the same thing as + # occurs = first-trigger + + [.?] + trigger = $vsz > 1000 + occurs = every + action = echo "Large program $command matches $ps_pat: $vsz KB" + + # Fire if /usr/sbin/syslogd is not running. + # Since the program matches against the command names, not commands and + # arguments, something like: + # ps -ef | grep /usr/sbin/syslogd + # won't match the below. + [(/usr/sbin/)?syslogd] + occurs = none + action = /etc/init.d/syslogd start + +=item action + +This specifies the action, a command that gets run by the system +shell, when the trigger condition is evaluated to be true. + +Example: + + action = /etc/init.d/market_loader.init restart + +=item perl-action + +This specifies Perl statements to be eval'd. This can be especially +useful in conjunction with $PROLOG and $EPILOG sections to make tests +across collections of process and do things which ps-watcher +would otherwise not be able to do. + +Example: + + # A Perl variable initialization. + # Since ps-watcher runs as a daemon it's a good idea + # to (re)initialize variables before each run. + [$PROLOG] + perl-action = $root_procs=0; + + # Keep track of how many root processes we are running + [.*] + perl-action = $root_procs++ if $uid == 0 + occurs = every + + # Show this count. + [$EPILOG] + action = echo "I counted $root_procs root processes" + +=back + +=head2 EXPANDED VARIABLES IN TRIGGER/ACTION CLAUSES + +Any variables defined in the program can be used in pattern or +action parameters. For example, C<$program> can be used to refer to +the name of this program ps-watcher. + +The following variables can be used in either the pattern or action +fields. + +=over + +=item $action + +A string containing the text of the action to run. + +Z<> + +=item $perl_action + +A string containing the text of the perl_action to run. + +Z<> + +=item $ps_pat + +The Perl regular expression specified in the beginning of the section. + +Z<> + +=item $command + +The command that matched $ps_pat. + +The Perl regular expression specified in the beginning of the section. +Normally processes will not have funny characters in them. Just in +case, backticks in $command are escaped. + +Example: + + # List processes other than emacs (which is a known pig) that use lots + # of virtual memory + + [.*] + trigger = $command !~ /emacs$/ && $vsz > 10 + action = echo \"Looks like you have a big \$command program: \$vsz KB\" + +Z<> + +=item $count + +The number of times the pattern matched. Presumably the number of +processes of this class running. + +Z<> + +=item $trigger + +A string containing the text of the trigger. + +=back + +A list of variables specific to this program or fields commonly found in +C output is listed below followed by a description of the more +common ones. See also C for a more complete +description of the meaning of the field. + + uid euid ruid gid egid rgid alarm blocked bsdtime c caught +cputime drs dsiz egroup eip esp etime euser f fgid +fgroup flag flags fname fsgid fsgroup fsuid fsuser fuid fuser +group ignored intpri lim longtname m_drs m_trs maj_flt majflt +min_flt minflt ni nice nwchan opri pagein pcpu pending pgid pgrp +pmem ppid pri rgroup rss rssize rsz ruser s sess session +sgi_p sgi_rss sgid sgroup sid sig sig_block sig_catch sig_ignore +sig_pend sigcatch sigignore sigmask stackp start start_stack start_time +stat state stime suid suser svgid svgroup svuid svuser sz time timeout +tmout tname tpgid trs trss tsiz tt tty tty4 tty8 uid_hack uname +user vsize vsz wchan + +Beware though, in some situations ps can return multiple lines for a +single process and we will use just one of these in the trigger. In +particular, Solaris's C will return a line for each LWP (light-weight +process). So on Solaris, if a trigger uses variable lwp, it may or may +not match depending on which single line of the multiple C lines is +used. + +Z<> + +=over + +=item $args + +The command along with its command arguments. It is possible that this +is might get truncated at certain length (if ps does likewise as is +the case on Solaris). + +Z<> + +=item $ppid + +The parent process id. + +Z<> + +=item $stime + +The start time of the process. + +Z<> + +=item $etime + +The end time of the process. + +Z<> + +=item $pmem + +The process memory. + +Z<> + +=item $pcpu + +The percent CPU utilization. + +Z<> + +=item $tty + +The controlling tty. + +Z<> + +=item $szv + +Virtual memory size of the process + +=back + +=head2 OTHER THINGS IN TRIGGER CLAUSES + +To make testing against elapsed time easier, a function C +has been written to parse and convert elapsed time strings in the +format C and a number of seconds. + +Some constants for the number of seconds in a minute, hour, or day +have also been defined. These are referred to as C, C, +and C respectively and they have the expected definitions: + + use constant MINS => 60; + use constant HOURS => 60*60; + use constant DAYS => HOURS * 24; + +Here is an example of the use of C: + + # Which processes have been running for more than 3 hours? + # Also note use of builtin-function elapsed2secs, variable $etime + # and builtin-function HOURS + [.] + trigger = elapsed2secs('$etime') > 1*DAYS + action = echo "$command has been running more than 1 day ($etime)" + occurs = every + +Please note the quotes around '$etime'. + +=head1 EXAMPLE CONFIGURATION + + # Comments start with # or ; and go to the end of the line. + + # The format for each entry is in Microsoft .INI form: + # [process-pattern] + # trigger = perl-expression + # action = program-and-arguments-to-run + + [httpd$] + trigger = $count < 4 + action = echo "$trigger fired -- You have $count httpd sessions." + + [.] + trigger = $vsz > 10 + action = echo "Looks like you have a big $command program: $vsz KB" + + # Unfortunately we have use a different pattern below. (Here we use + # ".?" instead of ".".) In effect the the two patterns mean + # test every process. + [.?] + trigger = elapsed2secs('$etime') > 2*MINS && $pcpu > 40 + occurs = every + action = < is active. We make +use of lsof to check port 3333 and the $PROLOG make sure it runs. + + [$PROLOG] + occurs = first + trigger = { \$x=`lsof -i :3333 >/dev/null 2>&1`; \$? >> 8 } + action = < + +For even more information and control try running the above under the +perl debugger, e.g. + +perl -d ps-watcher --log --nodaemon --sleep -1 --debug 2 I + +=head1 BUGS + +Well, some of these are not so much a bug in ps-watcher so much as a +challenge to getting ps-watcher to do what you want it to do. + +One common problem people run in into is understanding exactly what +the process variables mean. The manual page L should be of +help, but I've found some of the descriptions either a bit vague or +just plain lacking. + +Sometimes one will see this error message when debug tracing is turned on: + + ** debug ** Something wrong getting ps variables + +This just means that the process died betwee the time ps-watcher first +saw the existence of the process and the time that it queried +variables. + +=head1 SEE ALSO + +See also L and L. + +Another cool program doing ps-like things is C. Well okay, it's +another program I distributed. It shows the process tree dynamically +updated using X Motif and tries to display the output "attractively" +but fast. You can the find the homepage at +L and it download via +L + +=head1 AUTHOR + +Rocky Bernstein (rocky@cpan.org) + +=head1 COPYRIGHT + + Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006 + Rocky Bernstein, email: rocky@cpan.org. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 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., 675 Mass Ave, Cambridge, MA 02139, USA. diff --git a/ps-watcher.in.in b/ps-watcher.in.in new file mode 100755 index 0000000..db12061 --- /dev/null +++ b/ps-watcher.in.in @@ -0,0 +1,1278 @@ +#!@PERL@ -w +# -*- Perl -*- +use diagnostics; +my $vcid='$Id: ps-watcher.in.in,v 1.57 2006/03/10 19:07:05 rockyb Exp $ '; +# See usage subroutine or perlpod documentation below. + +# Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006 +# Rocky Bernstein, email: rocky@cpan.org +# +# This program is free software; you can +# redistribute it and/or modify it under the terms of the GNU General +# Public License as published by the Free Software Foundation; either +# version 2 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., 675 Mass Ave, Cambridge, MA 02139, USA. + +use vars qw($program $ps_cmd $ps_cmdfull $ps_fullcmd_fmt @ps_vars $ps_dvars + $0 $logopened $ps_args_fmt $args + $count $pid $command $ps_arg_opts $DEVNULL %opts + ); +use strict; +BEGIN { require 5.00503 } + +sub usage($) { + my ($full_help) = @_; + + print " +usage: + + $program [OPTIONS..] + +$program can be used to monitor various processes based on ps-like +information. + +options: + --help -- print this help and exit + --doc -- extract and print complete documentation and exit + --version -- show a CVS version string and exit + --debug *n* -- give debugging output. The higher the + number, the more the output + --run | --norun -- do/don't run actions + go through the motions as though we were going to + --log [*logfile*] -- Set a log file for this program. If option given + but no logfile, then use STDERR. Default is + no error log file. + --syslog | --nosyslog + -- send or don't send error output to syslog + Default is to send to syslog. + --config *cnf file* -- specify configuration file. + + --daemon | --nodaemon + -- do or don't become a daemon. Default daemonize. + --sleep *time* -- sleep interval between iterations. The default is + $opts{sleep_interval} seconds. + --path path -- executable search path to use in running commands + + --ps-prog *program* -- command that gets ps information. The default is: + $opts{ps_prog} + --ps-pids-opt *ps opts* + -- ps options that lists pids and commands. The + default is: $opts{ps_pid_opts} +"; + + if ($full_help) { + print " +General operation: + +Periodically a list of processes obtained via ps. More precisely +each item in the list contains the process name (just what's listed in +the \"command\" field, not the full command and arguments) and its +process id (pid). A configuration file specifies a list of Perl +regular-expression patterns to match the process names against. For +each match, a Perl expression specified for that pattern is +evaluated. The evaluated expression can refer to variables which are +set by ps and pertain to the matched process(es), for example the +amount memory consumed by the process, or the total elapsed time. Some +other variables are set by the program, such as the number of times +the process is running. If the Perl expression for a matched pattern +evaluates true, then an action can be run such as killing the program, +restarting it, or mailing an alert. + +This program can be used to ensure a daemon hasn't died or ensure it +is not running too many times. It might be used to determine when a +process has consumed too many resources (for example due to a memory +leak). + +The following variables can be used in patterns or actions: +\t". '$' . join("\n\t\$", @ps_vars) . +" + The following is a sample config file: + +# Comments start with # or ; and go to the end of the line. + +# The format for each entry is in Microsoft .INI form: +# [process-pattern] +# trigger = perl-expression +# action = program-and-arguments-to-run + +[httpd\$] + trigger = \$count < 4 + action = echo \"\$trigger fired -- You have \$count \$command sessions.\" + +[em?cs] +trigger = \$vsz > 10 +action = echo \"Looks like you have a big \$command program: \$vsz KB\" + +"; + } + exit 100; +} + +sub init(); +sub podthis(); +sub process_options(); +sub show_version(); +sub daemonize(); +sub eval_trigger_action($$$); +sub make_the_rounds($); +sub elapsed2secs($); +sub logger($); +sub debug_log($$); +sub gather_psinfo(); +sub read_config($); +sub check_config_file($); +sub run_trigger($$$); + +init(); +process_options(); + +# Unfurl the banner... +logger("Starting: $vcid"); + +my $cfg=read_config($opts{conf_file}); + +if (!defined($cfg)) { + for my $line (@Config::IniFiles::errors) { + logger($line); + } + exit 2; +} + +if ($opts{daemon}) { + daemonize(); +} + +install_handlers(); + +do { + make_the_rounds($cfg); + sleep $opts{sleep_interval} if $opts{sleep_interval} > 0; + check_config_file($opts{conf_file}); +} until ($opts{sleep_interval} < 0) ; +if ($opts{syslog}) { + use Sys::Syslog; + closelog; +} +exit 0; + +# Evaluates the trigger and if that's true also performs +# an action. 1 is returned if the action was performed, +# zero otherwise. +sub eval_trigger_action($$$) { + my ($trigger,$action,$perl_action) = @_; + my $etrigger=$trigger; + # It is a pain to predeclare all of the variables assigned + # by ps which is OS and ps specific. So we'll allow anything. + # Likewise, we'll allow it occur in $action. + no strict; + if ($trigger ne '1') { + $etrigger =~ s/"/\\"/g; + debug_log("trigger before substitution: $etrigger", 2); + $etrigger = eval qq/"$trigger"/; + } + debug_log("trigger after substitution: $etrigger", 2); + if (eval ($etrigger)) { + if (defined($perl_action)) { + debug_log("running Perl_action: $perl_action", 2); + eval($perl_action) if $opts{run}; + } + if (defined($action)) { + debug_log("action before substitution: $action", 2); + my $eaction=$action; + $eaction =~ s/"/\\"/g; + $eaction = eval qq/"$eaction"/; + debug_log("action after substitution: $eaction", 2); + my $output=`$eaction` if $opts{run}; + chomp($output); + logger($output) if $output; + } + return 1; + } + return 0; +} + +# Perform a round over the process_patterns comparing against the +# process info to see if anything's stirring. +sub make_the_rounds($) { + my $cfg = $_[0]; + my @ps_info=gather_psinfo(); + foreach our $ps_pat ($cfg->Sections()) { + debug_log("process pattern: /$ps_pat/", 1); + my @selected_ps; + my $in_prolog_epilog=0; + my $trigger = $cfg->val($ps_pat, 'trigger') || '1'; + my $action = $cfg->val($ps_pat, 'action'); + my $perl_action = $cfg->val($ps_pat, 'perl-action'); + my $occurs = $cfg->val($ps_pat, 'occurs') || "first"; + local $count; + if ($ps_pat =~ /^\$PROLOG/ || $ps_pat =~ /\$EPILOG/) { + # Set to run trigger below. + $count = @ps_info; + $in_prolog_epilog=1; + } else { + @selected_ps = grep(/$ps_pat/, @ps_info); + $count = @selected_ps; + debug_log("count for /$ps_pat/: $count", 2); + } + if ($in_prolog_epilog) { + # execute trigger + eval_trigger_action($trigger, $action, $perl_action); + } elsif ($occurs =~ /none/i) { + if ($count eq 0) { + # execute the trigger anyway + eval_trigger_action($trigger, $action, $perl_action); + } + } elsif ($count gt 0) { + TRIGGER: + foreach (@selected_ps) { + next if !/\s*(\d+)\s+(\S+)/; + local($pid, $command) = /\s*(\d+)\s+(\S+)/; + if ($pid !~ /\d+/) { + logger("Something wrong with ps format:\n$_"); + next; + } + + my $ps_fullcmd = sprintf $ps_fullcmd_fmt, $pid; + my @output = `$ps_fullcmd`; + my $output=''; + if (@output == 1) { + # Got one line of output - good. + $output=$output[0]; + # Make sure though we don't just have a title line. + # One of the fields should be just digits, e.g. ppid, uid, gud... + next if $output !~ m{\s+\d+\s+}; + } elsif (@output == 2 && @PS_NO_NULL_HEADER@) { + # Got two lines of output - we are running a ps where + # we can't remove the title line? + $output=$output[1]; + } elsif (@output > 1 && @PS_CAN_RETURN_MULTIPLE_LINES@) { + # Got multiple lines of output - we are running a ps which can + # do so. For example Solaris does this for a process that has many + # LWPs (light-weight processes). + $output=$output[0]; + } else { + debug_log("Something wrong getting ps variables", 1); + next; + } + + local $args = ''; + if ($ps_arg_opts) { + my $ps_argscmd = sprintf $ps_args_fmt, $pid; + my @output = `$ps_argscmd`; + if (@output == 1) { + $args=$output[0]; + } elsif (@output == 2 && @PS_NO_NULL_HEADER@) { + $args=$output[1]; + } else { + debug_log("Something wrong with getting command arguments", 1); + } + } + + # Process may have disappeared. In this case we'll get no + # output. + next if !$output; + + # Add ' ' so split will junk first ps_dvars $junk. + $output = ' ' . $output; + my $perl_ps_assign = "$ps_dvars = split(/\\s+/, \$output)"; + { + # It is a pain to predeclare all of the variables assigned + # by ps which is OS and ps specific. So we'll allow anything. + # Likewise, we'll allow it occur in $action. + no strict; + + # Escape backticks so that we don't inadvertently run + # the program. For example there could be a process named + # `/tmp/evilcommand` (with backticks). Thanks to Randal + # Schwartz for noticing the problem. + # Not sure if there are other things to watch out for. + # Although the Perl Cookbook suggests how to make system, + # safe, it is silent about making eval safe. + $command =~ s/`/\\`/g; + + if (eval ($perl_ps_assign)) { + my $evaled = eval_trigger_action($trigger, $action, + $perl_action); + last TRIGGER if $evaled && $occurs eq 'first-trigger'; + last TRIGGER if $occurs eq 'first'; + } else { + logger("Something wrong with perl assignment: $perl_ps_assign"); + last TRIGGER; + } + } # no strict + } # foreach + } # if $count + } +} + +# Initailize various variables variously. +sub init() { + + use File::Basename; + $program = basename($0); # Who am I today, anyway? + + $DEVNULL = '/dev/null'; # And what do we do about non Unix? + + use constant MINS => 60; + use constant HOURS => 60*60; + use constant DAYS => HOURS * 24; + + $opts{debug} = 0; # no debugging + $opts{run} = 1; # run actions + $opts{syslog} = 1; # Log errors to syslog + $opts{logfile} = $DEVNULL; + $opts{daemon} = 1; # Run as daemon; + $opts{ps_prog} = '@PS@'; # Where is ps? + $opts{ps_pid_opts} = '@PS_PID_OPTS@'; # How do I get pids and commands? + + $ps_arg_opts = '@PS_ARGS@'; # How do I get full process command? + + # List of all the fields from ps we will be able to use. Don't need + # to list variables listed above. + @ps_vars = qw ( @PS_VARS@ +); + + # Convert the above into an argument list like + # ($junk, $user, ... ) + # The first argument ($junk) will be null and thrown out. + $ps_dvars = '($junk,$' . join(',$', @ps_vars) . ')'; + + $opts{sleep_interval} = 300; + +} + +# The bane of programming. +sub process_options() { + use Getopt::Long; + my(@opt_cf); + $Getopt::Long::autoabbrev = 1; + my($newstyle_config); + + my ($help, $long_help, $show_version); + + my $result = &GetOptions + ( + 'help' => \$help, + 'doc' => \$long_help, + 'version' => \$show_version, + 'config=s' => \$opts{conf_file}, + 'debug=i' => \$opts{debug}, + 'path=s' => \$ENV{PATH}, + 'ps-pid-opts=s'=> \$opts{ps_pid_opts}, + 'ps-prog=s' => \$opts{ps_prog}, + 'sleep=i' => \$opts{sleep_interval}, + 'log:s' => \$opts{logfile}, + 'syslog!' => \$opts{syslog}, + 'run!' => \$opts{run}, + 'daemon!' => \$opts{daemon}, + ); + + show_version() if $show_version; + usage(1) if $help; + podthis() if $long_help; + + # However specifying a configuration file is not. + # Nor can we deal with multiple configuration files or tolerate + # option-processing errors. + usage(0) if !$result; + + # The option-specifier "--config" is optional... + if (@ARGV && !defined($opts{conf_file})) { + $opts{conf_file} = shift(@ARGV); + } + + # However we do have to give exactly one configurtion file. + if (!defined($opts{conf_file}) || @ARGV != 0) { + print STDERR "$program: Please specify exactly one configuration file.\n"; + usage(0); + } + + $ps_cmd = "$opts{ps_prog} $opts{ps_pid_opts}"; + my $ps_vars; + if (@PS_CUSTOM_HEADER@) { + $ps_vars = join('= -o ', @ps_vars) . '='; + } else { + $ps_vars = join(' -o ', @ps_vars); + } + + if ('@PS_FULLCMD_FMT@') { + $ps_fullcmd_fmt = "@PS_FULLCMD_FMT@"; + } else { + $ps_fullcmd_fmt = "$opts{ps_prog} -p %d -o $ps_vars"; + } + if ('@PS_ARGS_FMT@') { + $ps_args_fmt = "@PS_ARGS_FMT@"; + } else { + $ps_args_fmt = "$opts{ps_prog} -p %d $ps_arg_opts"; + } + + open STDIN, $DEVNULL or die "Can't read $DEVNULL: $!"; + open STDOUT, ">>$opts{logfile}" or die "Can't write to $opts{logfile}: $!" + if $opts{logfile} ne ''; + open STDERR, ">>$opts{logfile}" or die "Can't write to $opts{logfile}: $!" + if $opts{logfile} ne ''; +} + +# Signal handling.. +sub install_handlers { + $SIG{'QUIT'} = \&terminate; + $SIG{'TERM'} = \&terminate; + $SIG{'INT'} = \&terminate; + $SIG{'HUP'} = \&null_handler; + $SIG{'USR1'} = \&debug_up_handler; + $SIG{'USR2'} = \&debug_down_handler; +} + +# Used perhaps to break out of a deep sleep. +sub null_handler { + my($signo) = @_; + logger("Received signal: ${signo}"); +} + +# Increase verbosity of debugging. +sub debug_up_handler { + my($signo) = @_; + $opts{debug}++; + logger("Received signal: ${signo}. Increasing debugging to $opts{debug}."); +} + +# Decrease verbosity of debugging. +sub debug_down_handler { + my($signo) = @_; + $opts{debug}--; + logger("Received signal: ${signo}. Decreasing debugging to $opts{debug}."); +} + +# Signal handler to go down recording the signal. +sub terminate { + my($signo) = @_; + use Config; + if (defined $Config{sig_name}) { + my $i = 0; + my @signame; + my %sig; + foreach my $name (split(' ', $Config{sig_name})) { + $signame[$i] = $name; + $sig{$name} = $i; + $i++; + } + $signo = $sig{$signo} if exists($sig{$signo}); + if ($signo =~ m{\A\d+\Z} ) { + logger("Going down on $signame[$signo] (${signo}) signal. " . + "Have a nice day!"); + } + } else { + logger("Going down on signal ${signo}). Have a nice day!"); + } + + $signo = 15 if $signo !~ m{\A\d+\Z}; + if ($opts{syslog}) { + use Sys::Syslog; + closelog; + } + exit $signo; +}; + +# Utility function for parsing/converting elapsed time into seconds. +sub elapsed2secs($) { + $_ = $_[0]; + + # Handle formats like: + # 1-08:34:37 -- One day, 8 hours, 34 minutes, 37 seconds + # 20:40:34 -- 20 hours, 40 minutes, 34 seconds + # 0:00 -- 0 seconds. + + # 1-08:34.37 -- One day, 8 hours, 34 minutes, 37 seconds + # 20:40.34 -- 20 hours, 40 minutes, 34 seconds + # 5.03 -- 5 minutes, 3 seconds. + # 5 -- 5 seconds. + + # Some easy cases. + return -1 if !defined($_) || m{\A\s*\Z}; + return $_ if m{\A\d+\Z}; + + # Originally had as one pattern and optional + # arguments but i got compaints about using + # uninitialized variables even with "no diagonstics". Would rather + # switch than fight. + my $min_secs_pat = '(\d{1,2})[:.](\d\d)'; + if (m{ + (\d{1,2})- # The number of days. e.g. 1- or 19- or blank + (\d{1,2})[:.] # The number of hrs. e.g. 01: or 23: or blank + $min_secs_pat + }x) { + my ($days, $hours, $minutes, $secs) = ($1, $2, $3, $4); + return ($days*DAYS + $hours*HOURS + $minutes*MINS + $secs); + } elsif (m{ + (\d{1,2})[:.] # The number of hrs. e.g. 01: or 23: or blank + $min_secs_pat + }x) { + my ($hours, $minutes, $secs) = ($1, $2, $3); + return ($hours*HOURS + $minutes*MINS + $secs); + } elsif (m{$min_secs_pat}) { + my ($minutes, $secs) = ($1, $2); + return ($minutes*MINS + $secs); + } else { + logger("Error in converting $_ to seconds"); + return -1; + } +} + +# Return time and PID as string in a common format +sub timestring() { + my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = + localtime(time); + $mon++; + return sprintf( "%.2d/%.2d/%.2d %.2d:%.2d:%.2d %s[$$]", + $mon, $mday, $year%100, $hour, $min, $sec, $program); +} + +# log error to syslog and print to STDERR. +sub logger($) { + my($msg) = shift; + + if ($opts{syslog}) { + if (!$logopened) { + use Sys::Syslog; + $logopened++; + openlog($program,'cons,pid', 'err'); + } + syslog('info', $msg); + } + if (defined($opts{logfile}) && $opts{logfile} ne $DEVNULL) { + my $ts=timestring(); + print STDERR "$ts: $msg\n"; + } +} + +sub debug_log($$) { + my($msg, $level) = @_; + logger("** debug ** $msg") if $opts{debug} >= $level; +} + +sub gather_psinfo() { + my @output=`$ps_cmd`; + return @output; +} + +# Show the CVS version id string and quit. +sub show_version() { + print "$vcid +Copyright (C) 2000, 2002, 2003, 2004, 2006 Rocky Bernstein. +This is free software; see the source for copying conditions. +There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. +"; + exit 10; +} + + +sub daemonize() { + chdir '/' or die "Can't chdir to /: $!"; + defined(my $pid = fork) or die "Can't fork: $!"; + exit 0 if $pid; + use POSIX qw(setsid); + setsid() or die "Can't start a new session: $!"; + umask 0; +} + +# Time configuration file was last read. +my $conf_time; + +# Read a configuration file. +sub read_config($) { + use Config::IniFiles; + my($cf)=@_; + if (!-f $cf || !-r _ || -z _ || !-T _) { + logger("Unusable config file: <$cf>"); + return undef; + } + + # Save time we read the configuration file so we can check back + # later to see if it changed. + + my($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, + $atime, $mtime, $ctime) = stat $cf; + $conf_time = $mtime; + + return new Config::IniFiles( -file => $cf ); +} + +# Check to see if any configuration file has changed +# since the last time this routime was called. +# Updates global $conf_time. +sub check_config_file($) { + my ($conf_file) = @_; + my($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, + $atime, $mtime, $ctime) = stat $opts{conf_file}; + if ( defined($conf_time) && defined($mtime) && $conf_time < $mtime ) { + logger("Configuration file $conf_file modified; re-reading..."); + $cfg = read_config($conf_file); + } +} + +sub run_trigger($$$) { + my($trigger, $action, $count) = @_; + my $etrigger=$trigger; + if ($trigger ne '1') { + $etrigger =~ s/"/\\"/g; + debug_log("trigger before substitution: $etrigger", 2); + $etrigger = eval qq/"$trigger"/; + } + debug_log("trigger after substitution: $etrigger", 2); + if (eval ($etrigger)) { + debug_log("action before substitution: $action", 2); + my $eaction=$action; + $eaction =~ s/"/\\"/g; + $eaction = eval qq/"$eaction"/; + debug_log("action after substitution: $eaction", 2); + my $output=`$eaction` if $opts{run}; + chomp($output); + logger($output) if $output; + } +} + +sub podthis() { + use Pod::Text; + $^W = 0; + pod2text $0; + exit 101; +} + +#-------------------------------------------------- +=pod + +=head1 NAME + +@PACKAGE@ - monitors various processes based on ps-like information. + + +=head1 SYNOPSIS + +B<@PACKAGE@> [I...] + [C<--config>] I + +=head1 DESCRIPTION + +Periodically a list of processes obtained via C. More precisely +each item in the list contains the process name (just what's listed in +the "cmd" field, not the full command and arguments) and its process +id (pid). A configuration file specifies a list of Perl +regular-expression patterns to match the processes against. For each +match, a Perl expression specified for that pattern is evaluated. The +evaluated expression can refer to variables which are set by ps and +pertain to the matched process(es), for example the amount memory +consumed by the process, or the total elapsed time. Some other +variables are set by the program, such as the number of times the +process is running. If the Perl expression for a matched pattern +evaluates true, then an action can be run such as killing the program, +restarting it, or mailing an alert, or running some arbitrary Perl +code. + +Some things you might want to watch a daemon or process for: + +=over 2 + +=item * + +check that it is running (hasn't died) + +=item * + +ensure it is not running too many times + +=item * + +isn't consuming too much memory (perhaps a memory leak), or I/O + +=back + +Some actions you might want to take: + +=over 2 + +=item * + +restart a process + +=item * + +kill off rampant processes + +=item * + +send an alert about any of the conditions listed above + +=back + +Depending on options specfied, this program can be run as a daemon, +run once (which is suitable as a C job), or run not as a daemon +but still continuously (which may be handy in testing the program or +your configuration). + +=head2 OPTIONS + +=over 4 + +=item --help + +Print a usage message on standard error and exit with a return code +of 100. + +Z<> + +=item --doc + +Extact the full documentation that you are reading now, print it and +exit with a return code of 101. + +Z<> + +=item --version + +Print the version release on standard output and exit with a return +code of 10. + +Z<> + +=item --debug I + +Give debugging output. The higher the number, the more the output. The +default is 0 = none. 2 is the most debugging output. + +=item [--config] I + +Specify configuration file. . + +See L below for information on the format +of the configuration file and L for a complete +example of a configuration file. + +Z<> + +=item --log [I] + +Send or don't send error and debugging output to a log file. If option +is given but no logfile is specified, then use STDERR. The default is +no error log file. See also --syslog below. + +Z<> + +=item --syslog | --nosyslog + +Send or don't send error and debugging output to syslog. The default +is to syslog error and debug output. + +Z<> + +=item --daemon | --nodaemon + +Run or don't as a daemon. + +Z<> + +=item --path I + +Specify the executable search path used in running commands. + +=item --ps-prog I + +One can specify the command that gives ps information. By default, the +command is F<@PS@>. + +Z<> + +=item --run | --norun + +do/don't run actions go through the motions as though we were going +to. This may be useful in debugging. + +Z<> + +=item --sleep I + +It is expected that one might want to run @PACKAGE@ over and over +again. In such instances one can specify the amount of time between +iterations with this option. + +If a negative number is specified the program is run only once. + +Z<> + +=back + +=head2 CONFIGURATION FILE MODIFICATION AND SIGNAL HANDLING + +Periodically @PACKAGE@ checks to see if the configuration file +that it was run against has changed. If so, the program rereads the +configuration file. + +More precisely, the checks are done after waking up from a slumber. +If the sleep interval is long (or if you are impatient), you can +probably force the program to wake up using a HUP signal. + +At any time you can increase the level of debug output by sending a +USR1 signal to the @PACKAGE@ process. Similarly you can decrease the +level of debug output by sending the process a USR2 signal. + +It is recommended that you terminate @PACKAGE@ via an INT, TERM, or QUIT +signal. + +=head1 CONFIGURATION FILE FORMAT + +The format of a configuration file is a series of fully qualified +filenames enclosed in square brackets followed by a number of +parameter lines. Each parameter line has a parameter names followed by +an "equal" sign and finally value. That is: + + # This is a comment line + ; So is this. + [process-pattern1] + parameter1 = value1 + parameter2 = value2 + + [process-pattern2] + parameter1 = value3 + parameter2 = value4 + +Comments start with # or ; and take effect to the end of the line. + +This should be familiar to those who have worked with text-readible +Microsoft C<.INI> files. + +Note process patterns, (F and F +above) must be unique. If there are times when you may want to +refer to the same process, one can be creative to make these unique. +e.g. F and F<[c]ron> which refer to the same process even +though they I to be different. + +As quoted directly from the Config::IniFiles documentation: + +Multiline or multivalued fields may also be defined ala UNIX +"here document" syntax: + + Parameter=< match exactly, including any trailing +whitespace. + +There are two special "process patterns": $PROLOG and $EPILOG, the +former should appear first and the latter last. + +You can put perl code to initialize variables here and do cleanup +actions in these sections using "perl-action." + +A description of parameters names, their meanings and potential values +follows. + +=over + +=item trigger + +This parameter specifies the condition on which a process action is +fired. The condition is evaluated with Perl eval() and should +therefore return something which is equivalent to "true" in a Perl +expression. + +If no trigger is given in a section, true or 1 is assumed and +the action is unconditionally triggered. + +Example: + + # Match if httpd has not spawned enough (<4) times. NFS and databases + # daemons typically spawn child processes. Since the program + # matches against the command names, not commands and arguments, + # something like: ps -ef | grep httpd won't match the below. + # If you want to match against the command with arguments, see + # the example with $args below. + [httpd$] + trigger = $count <= 4 + +=item occurs + +This parameter specifies how many times an action should be performed +on processes matching the section trigger. Acceptable values are +"every", "first", "first-trigger", and "none". + +Setting the occurs value to "none" causes the the trigger to be +evaluated when there are no matching processes. Although one might +think "$count == 0" in the action expression would do the same thing, +currently as coded this does not work. + +Setting the occurs value to "first" causes the process-pattern rule to +be finished after handling the first rule that matches, whether or not the +trigger evaluated to true. + +Setting the occurs value to "first-trigger" causes the process-pattern +rule to be finished after handling the first rule that matches I +the trigger evaluates to true. + +If the item parameter is not specified, "first" is assumed. + +Examples: + + [.] + occurs = first + action = echo "You have $count processes running" + + # Note in the above since there is no trigger specified, + # occurs = first + # is the same thing as + # occurs = first-trigger + + [.?] + trigger = $vsz > 1000 + occurs = every + action = echo "Large program $command matches $ps_pat: $vsz KB" + + # Fire if /usr/sbin/syslogd is not running. + # Since the program matches against the command names, not commands and + # arguments, something like: + # ps -ef | grep /usr/sbin/syslogd + # won't match the below. + [(/usr/sbin/)?syslogd] + occurs = none + action = /etc/init.d/syslogd start + +=item action + +This specifies the action, a command that gets run by the system +shell, when the trigger condition is evaluated to be true. + +Example: + + action = /etc/init.d/market_loader.init restart + +=item perl-action + +This specifies Perl statements to be eval'd. This can be especially +useful in conjunction with $PROLOG and $EPILOG sections to make tests +across collections of process and do things which @PACKAGE@ +would otherwise not be able to do. + +Example: + + # A Perl variable initialization. + # Since @PACKAGE@ runs as a daemon it's a good idea + # to (re)initialize variables before each run. + [$PROLOG] + perl-action = $root_procs=0; + + # Keep track of how many root processes we are running + [.*] + perl-action = $root_procs++ if $uid == 0 + occurs = every + + # Show this count. + [$EPILOG] + action = echo "I counted $root_procs root processes" + +=back + +=head2 EXPANDED VARIABLES IN TRIGGER/ACTION CLAUSES + +Any variables defined in the program can be used in pattern or +action parameters. For example, C<$program> can be used to refer to +the name of this program @PACKAGE@. + +The following variables can be used in either the pattern or action +fields. + +=over + +=item $action + +A string containing the text of the action to run. + +Z<> + +=item $perl_action + +A string containing the text of the perl_action to run. + +Z<> + +=item $ps_pat + +The Perl regular expression specified in the beginning of the section. + +Z<> + +=item $command + +The command that matched $ps_pat. + +The Perl regular expression specified in the beginning of the section. +Normally processes will not have funny characters in them. Just in +case, backticks in $command are escaped. + +Example: + + # List processes other than emacs (which is a known pig) that use lots + # of virtual memory + + [.*] + trigger = $command !~ /emacs$/ && $vsz > 10 + action = echo \"Looks like you have a big \$command program: \$vsz KB\" + +Z<> + +=item $count + +The number of times the pattern matched. Presumably the number of +processes of this class running. + +Z<> + +=item $trigger + +A string containing the text of the trigger. + +=back + +A list of variables specific to this program or fields commonly found in +C output is listed below followed by a description of the more +common ones. See also C for a more complete +description of the meaning of the field. + + @PS_VARS@ + +Beware though, in some situations ps can return multiple lines for a +single process and we will use just one of these in the trigger. In +particular, Solaris's C will return a line for each LWP (light-weight +process). So on Solaris, if a trigger uses variable lwp, it may or may +not match depending on which single line of the multiple C lines is +used. + +Z<> + +=over + +=item $args + +The command along with its command arguments. It is possible that this +is might get truncated at certain length (if ps does likewise as is +the case on Solaris). + +Z<> + +=item $ppid + +The parent process id. + +Z<> + +=item $stime + +The start time of the process. + +Z<> + +=item $etime + +The end time of the process. + +Z<> + +=item $pmem + +The process memory. + +Z<> + +=item $pcpu + +The percent CPU utilization. + +Z<> + +=item $tty + +The controlling tty. + +Z<> + +=item $szv + +Virtual memory size of the process + +=back + +=head2 OTHER THINGS IN TRIGGER CLAUSES + +To make testing against elapsed time easier, a function C +has been written to parse and convert elapsed time strings in the +format C and a number of seconds. + +Some constants for the number of seconds in a minute, hour, or day +have also been defined. These are referred to as C, C, +and C respectively and they have the expected definitions: + + use constant MINS => 60; + use constant HOURS => 60*60; + use constant DAYS => HOURS * 24; + +Here is an example of the use of C: + + # Which processes have been running for more than 3 hours? + # Also note use of builtin-function elapsed2secs, variable $etime + # and builtin-function HOURS + [.] + trigger = elapsed2secs('$etime') > 1*DAYS + action = echo "$command has been running more than 1 day ($etime)" + occurs = every + +Please note the quotes around '$etime'. + +=head1 EXAMPLE CONFIGURATION + + # Comments start with # or ; and go to the end of the line. + + # The format for each entry is in Microsoft .INI form: + # [process-pattern] + # trigger = perl-expression + # action = program-and-arguments-to-run + + [httpd$] + trigger = $count < 4 + action = echo "$trigger fired -- You have $count httpd sessions." + + [.] + trigger = $vsz > 10 + action = echo "Looks like you have a big $command program: $vsz KB" + + # Unfortunately we have use a different pattern below. (Here we use + # ".?" instead of ".".) In effect the the two patterns mean + # test every process. + [.?] + trigger = elapsed2secs('$etime') > 2*MINS && $pcpu > 40 + occurs = every + action = < is active. We make +use of lsof to check port 3333 and the $PROLOG make sure it runs. + + [$PROLOG] + occurs = first + trigger = { \$x=`lsof -i :3333 >/dev/null 2>&1`; \$? >> 8 } + action = < + +For even more information and control try running the above under the +perl debugger, e.g. + +perl -d @PACKAGE@ --log --nodaemon --sleep -1 --debug 2 I + +=head1 BUGS + +Well, some of these are not so much a bug in @PACKAGE@ so much as a +challenge to getting @PACKAGE@ to do what you want it to do. + +One common problem people run in into is understanding exactly what +the process variables mean. The manual page L should be of +help, but I've found some of the descriptions either a bit vague or +just plain lacking. + +Sometimes one will see this error message when debug tracing is turned on: + + ** debug ** Something wrong getting ps variables + +This just means that the process died betwee the time @PACKAGE@ first +saw the existence of the process and the time that it queried +variables. + +=head1 SEE ALSO + +See also L and L. + +Another cool program doing ps-like things is C. Well okay, it's +another program I distributed. It shows the process tree dynamically +updated using X Motif and tries to display the output "attractively" +but fast. You can the find the homepage at +L and it download via +L + +=head1 AUTHOR + +Rocky Bernstein (rocky@cpan.org) + +=head1 COPYRIGHT + + Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006 + Rocky Bernstein, email: rocky@cpan.org. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 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., 675 Mass Ave, Cambridge, MA 02139, USA. diff --git a/samples/README b/samples/README new file mode 100644 index 0000000..839bcb4 --- /dev/null +++ b/samples/README @@ -0,0 +1,10 @@ +sample.ini - you can use this as a template to make other configuration + files. It has lots of comments at the beginning to remind + you of what's allowed +sample2.ini - sample configuration file to alert when more than 10% + of a processes is in use. +solaris.ini - System processes that you might want to check on, customized + for Solaris. Checks that cron and syslogd are running, + and that no process uses more than 70% of the available CPU. + +$Id: README,v 1.2 2000/04/09 20:40:43 rocky Exp $ \ No newline at end of file diff --git a/samples/port-watch.ini b/samples/port-watch.ini new file mode 100644 index 0000000..7517ecb --- /dev/null +++ b/samples/port-watch.ini @@ -0,0 +1,13 @@ +# $Id: port-watch.ini,v 1.1 2004/09/07 13:51:08 rockyb Exp $ + +# Here is an example to show how to use ps-watcher to do something +# not really possible from ps: check to see if a *port* is active. +# We make use of lsof to check port 3333 and the $PROLOG make +# sure it runs. + +[$PROLOG] + occurs = first + trigger = { \$x=`lsof -i :3333 >/dev/null 2>&1`; \$? >> 8 } + action = < 1*DAYS + action = echo "$command has been running more than 1 day ($etime)" + occurs = every + +[^] + trigger = $vsz > 8000 + occurs = every + action = echo "Large program $command (pid $pid) matches /$ps_pat/: $vsz KB" + +# Scripts don't show as the script name as the command name on some +# operating systems. Rather the name of the interpreter is listed +# (e.g. bash or perl) Here's how you can match against a script. Note +# escaping $ in the trigger but not the action. + +# Note: BSD/OS on the other hand give the script name rather than the +# interpreter name. + +[/usr/bin/perl] + trigger = \$args !~ /ps-watcher/ + occurs = every + action = echo "***found perl program ${pid}:\n $args" + diff --git a/samples/sample2.ini b/samples/sample2.ini new file mode 100644 index 0000000..7725155 --- /dev/null +++ b/samples/sample2.ini @@ -0,0 +1,4 @@ +[.] + trigger = $pcpu > 10 + action = echo "$command using $pcpu% CPU" | /bin/mail root + diff --git a/samples/solaris.ini b/samples/solaris.ini new file mode 100644 index 0000000..9ddc74a --- /dev/null +++ b/samples/solaris.ini @@ -0,0 +1,18 @@ +# $Id: solaris.ini,v 1.3 2000/04/09 20:40:21 rocky Exp $ +# Processes one might want to monitor under Solaris + +[(/usr/sbin/)?cron] + trigger = $count=1 + action = echo "$command not running" | /usr/ucb/mail -s "$command down" root + +[(/usr/sbin/)?sylogd] + trigger = $count=1 + action = echo "$command not running" | /usr/ucb/mail -s "$command down" root + +[.] + trigger = $pcpu > 70 + occurs = every + action = < "Test::Pod 1.14 required for testing POD" if $@; +all_pod_files_ok(catfile($top_builddir, "ps-watcher")); diff --git a/tests/01.pod.t.in b/tests/01.pod.t.in new file mode 100644 index 0000000..b288d82 --- /dev/null +++ b/tests/01.pod.t.in @@ -0,0 +1,9 @@ +#!@PERL@ -w -T -*- Perl -*- +# $Id: 01.pod.t.in,v 1.1 2006/03/09 17:37:31 rockyb Exp $ +my $top_builddir = $ENV{top_builddir} ? $ENV{top_builddir} : '..'; + +use Test::More; +use File::Spec::Functions; +eval "use Test::Pod 1.14"; +plan skip_all => "Test::Pod 1.14 required for testing POD" if $@; +all_pod_files_ok(catfile($top_builddir, "@PACKAGE@")); diff --git a/tests/Makefile.am b/tests/Makefile.am new file mode 100644 index 0000000..e84499e --- /dev/null +++ b/tests/Makefile.am @@ -0,0 +1,38 @@ +############################################################################## +# $Id: Makefile.am,v 1.9 2006/03/09 17:37:31 rockyb Exp $ +# Copyright (C) 2003, 2004, 2006 Rocky Bernstein +# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +############################################################################## + +MOSTLYCLEANFILES = *~ + +# The keeps automake from substituting PS_VARS +PS_VARS = '' + +check_SCRIPTS = 01.pod.t args.t basic.t count.t full.t paction.t + +check_DATA = args.cnf basic.cnf \ + count.cnf full.cnf paction.cnf + +EXTRA_DIST = $(check_SCRIPTS) $(check_DATA) \ + 01.pod.t.in args.t.in basic.cnf.in count.t.in driver + +all: + +check: test + +test: + srcdir=$(srcdir); export srcdir; \ + $(PERL) $(srcdir)/driver diff --git a/tests/Makefile.in b/tests/Makefile.in new file mode 100644 index 0000000..4558c8c --- /dev/null +++ b/tests/Makefile.in @@ -0,0 +1,332 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 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@ + +############################################################################## +# $Id: Makefile.am,v 1.9 2006/03/09 17:37:31 rockyb Exp $ +# Copyright (C) 2003, 2004, 2006 Rocky Bernstein +# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +############################################################################## +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +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@ +subdir = tests +DIST_COMMON = $(srcdir)/01.pod.t.in $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/args.t.in \ + $(srcdir)/basic.cnf.in $(srcdir)/basic.t.in \ + $(srcdir)/count.t.in $(srcdir)/full.t.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_CLEAN_FILES = 01.pod.t args.t basic.t count.t full.t basic.cnf +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CVS2CL = @CVS2CL@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PS = @PS@ +PS_ARGS = @PS_ARGS@ +PS_ARGS_FMT = @PS_ARGS_FMT@ +PS_CAN_RETURN_MULTIPLE_LINES = @PS_CAN_RETURN_MULTIPLE_LINES@ +PS_CUSTOM_HEADER = @PS_CUSTOM_HEADER@ +PS_FULLCMD_FMT = @PS_FULLCMD_FMT@ +PS_NO_NULL_HEADER = @PS_NO_NULL_HEADER@ +PS_PID_OPTS = @PS_PID_OPTS@ +PS_TIME_VAR = @PS_TIME_VAR@ + +# The keeps automake from substituting PS_VARS +PS_VARS = '' +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__leading_dot = @am__leading_dot@ +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@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +MOSTLYCLEANFILES = *~ +check_SCRIPTS = 01.pod.t args.t basic.t count.t full.t paction.t +check_DATA = args.cnf basic.cnf \ + count.cnf full.cnf paction.cnf + +EXTRA_DIST = $(check_SCRIPTS) $(check_DATA) \ + 01.pod.t.in args.t.in basic.cnf.in count.t.in driver + +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu tests/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +01.pod.t: $(top_builddir)/config.status $(srcdir)/01.pod.t.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +args.t: $(top_builddir)/config.status $(srcdir)/args.t.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +basic.t: $(top_builddir)/config.status $(srcdir)/basic.t.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +count.t: $(top_builddir)/config.status $(srcdir)/count.t.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +full.t: $(top_builddir)/config.status $(srcdir)/full.t.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +basic.cnf: $(top_builddir)/config.status $(srcdir)/basic.cnf.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +uninstall-info-am: +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_SCRIPTS) $(check_DATA) +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: + -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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 + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-am + +install-man: + +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: uninstall-info-am + +.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-exec \ + install-exec-am install-info install-info-am install-man \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-info-am + + +all: + +check: test + +test: + srcdir=$(srcdir); export srcdir; \ + $(PERL) $(srcdir)/driver +# 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: diff --git a/tests/args.cnf b/tests/args.cnf new file mode 100644 index 0000000..2836a33 --- /dev/null +++ b/tests/args.cnf @@ -0,0 +1,13 @@ +# Scripts on some OS's don't show as the script name as the command name. +# Rather the name of the interpreter is listed (e.g. bash or perl) +# Here's how you can match against a script. +# Look for my processes: ps-watcher. +[perl] + trigger = \$args =~ /ps-watcher --log/ + action = echo "ok 1" + occurs = every +# On BSD/OS the name of the script rather than the interpreter is show. +[ps-watcher] + trigger = \$args =~ /ps-watcher --log/ + action = echo "ok 1" + occurs = every diff --git a/tests/args.t b/tests/args.t new file mode 100755 index 0000000..411ee8c --- /dev/null +++ b/tests/args.t @@ -0,0 +1,38 @@ +#!/usr/bin/perl -w +# $Id: args.t.in,v 1.8 2006/03/10 13:12:36 rockyb Exp $ +# Arg checks +use strict; +use Test::More; +use Config; + +if ('cygwin' eq $Config{osname}) { + plan( skip_all => "cygwin's ps is not powerful enough this test"); + exit 0; +} + +plan( tests => 2); + +my $test='args'; + +my $srcdir = $ENV{srcdir} ? $ENV{srcdir} : '.'; +my $cmd = "/usr/bin/perl ../ps-watcher --log --nosyslog --nodaemon " + . " --sleep -1 --config ${srcdir}/$test.cnf"; +my @output = `$cmd 2>&1`; + +# First line is Id line. This doesn't count in testing. +shift @output; + +my $count=0; +foreach (@output) { + if (/^.+:\s+.*ok/) { + s/.+:\s+//; + ok(1, "Saw first matching process"); + $count++; + last; + } +} +ok($count>0, "Saw more than one matching process"); + +#;;; Local Variables: *** +#;;; mode:perl *** +#;;; End: *** diff --git a/tests/args.t.in b/tests/args.t.in new file mode 100644 index 0000000..ecfb7f7 --- /dev/null +++ b/tests/args.t.in @@ -0,0 +1,38 @@ +#!@PERL@ -w +# $Id: args.t.in,v 1.8 2006/03/10 13:12:36 rockyb Exp $ +# Arg checks +use strict; +use Test::More; +use Config; + +if ('cygwin' eq $Config{osname}) { + plan( skip_all => "cygwin's ps is not powerful enough this test"); + exit 0; +} + +plan( tests => 2); + +my $test='args'; + +my $srcdir = $ENV{srcdir} ? $ENV{srcdir} : '.'; +my $cmd = "@PERL@ ../ps-watcher --log --nosyslog --nodaemon " + . " --sleep -1 --config ${srcdir}/$test.cnf"; +my @output = `$cmd 2>&1`; + +# First line is Id line. This doesn't count in testing. +shift @output; + +my $count=0; +foreach (@output) { + if (/^.+:\s+.*ok/) { + s/.+:\s+//; + ok(1, "Saw first matching process"); + $count++; + last; + } +} +ok($count>0, "Saw more than one matching process"); + +#;;; Local Variables: *** +#;;; mode:perl *** +#;;; End: *** diff --git a/tests/basic.cnf b/tests/basic.cnf new file mode 100644 index 0000000..ff0282d --- /dev/null +++ b/tests/basic.cnf @@ -0,0 +1,27 @@ +# $Id: basic.cnf.in,v 1.4 2005/04/04 23:50:58 rockyb Exp $ +# We gotta have at least two processes running. Like the OS +# and the ps-watcher program +[.] + trigger = $count > 1 + action = echo "ok 1" + occurs = first + +# Look for my processes +[perl] + action = echo "ok 2" || echo "$ps_pat" + +[.?] + trigger = elapsed2secs('$etime') >= 0 + action = echo "ok 3" + occurs = first + +# I'm assuming there is no process with just a single space. +[^ $] + action = echo "ok 4" + occurs = none + +# Test to see if first-trigger works. +[.*] + trigger = $pid == $$ + action = echo "ok 5" + occurs = first-trigger diff --git a/tests/basic.cnf.in b/tests/basic.cnf.in new file mode 100644 index 0000000..7ae0d2a --- /dev/null +++ b/tests/basic.cnf.in @@ -0,0 +1,27 @@ +# $Id: basic.cnf.in,v 1.4 2005/04/04 23:50:58 rockyb Exp $ +# We gotta have at least two processes running. Like the OS +# and the ps-watcher program +[.] + trigger = $count > 1 + action = echo "ok 1" + occurs = first + +# Look for my processes +[perl] + action = echo "ok 2" || echo "$ps_pat" + +[.?] + trigger = elapsed2secs('$@PS_TIME_VAR@') >= 0 + action = echo "ok 3" + occurs = first + +# I'm assuming there is no process with just a single space. +[^ $] + action = echo "ok 4" + occurs = none + +# Test to see if first-trigger works. +[.*] + trigger = $pid == $$ + action = echo "ok 5" + occurs = first-trigger diff --git a/tests/basic.t b/tests/basic.t new file mode 100755 index 0000000..52977bb --- /dev/null +++ b/tests/basic.t @@ -0,0 +1,32 @@ +#!/usr/bin/perl -w +# $Id: basic.t.in,v 1.8 2006/03/10 19:07:06 rockyb Exp $ +# Some basic checks +use strict; +use Test::More; + +if ( 'etime' ) { + plan( tests => 5); +} else { + plan( tests => 4 ); +} + +my $test='basic'; +my $cmd = "/usr/bin/perl ../ps-watcher --log --nosyslog --nodaemon " + . "--sleep -1 --config $test.cnf"; +my @output = `$cmd 2>&1`; + +# First line is Id line. This doesn't count in testing. +shift @output; + +my $i=1; +foreach (@output) { + s/.+:\s+//; + $i++ if (!'etime' && $i==3); + my $result = sprintf "ok %d", $i; + $i++; + ok($_ =~ m{$result}); +} + +#;;; Local Variables: *** +#;;; mode:perl *** +#;;; End: *** diff --git a/tests/basic.t.in b/tests/basic.t.in new file mode 100755 index 0000000..0f34386 --- /dev/null +++ b/tests/basic.t.in @@ -0,0 +1,32 @@ +#!@PERL@ -w +# $Id: basic.t.in,v 1.8 2006/03/10 19:07:06 rockyb Exp $ +# Some basic checks +use strict; +use Test::More; + +if ( '@PS_TIME_VAR@' ) { + plan( tests => 5); +} else { + plan( tests => 4 ); +} + +my $test='basic'; +my $cmd = "@PERL@ ../ps-watcher --log --nosyslog --nodaemon " + . "--sleep -1 --config $test.cnf"; +my @output = `$cmd 2>&1`; + +# First line is Id line. This doesn't count in testing. +shift @output; + +my $i=1; +foreach (@output) { + s/.+:\s+//; + $i++ if (!'@PS_TIME_VAR@' && $i==3); + my $result = sprintf "ok %d", $i; + $i++; + ok($_ =~ m{$result}); +} + +#;;; Local Variables: *** +#;;; mode:perl *** +#;;; End: *** diff --git a/tests/count.cnf b/tests/count.cnf new file mode 100644 index 0000000..4f09c64 --- /dev/null +++ b/tests/count.cnf @@ -0,0 +1,12 @@ +# $Id: count.cnf,v 1.1 2002/02/06 04:10:54 rocky Exp $ +# Test of count and none parameters + +# I'm assuming there can't be a processes with $ in the name +[fuxaduxa$] + occurs = none + action = echo "ok 1" + +# Look for my processes so there should be at least one. +[perl] + occurs = none + action = echo "not ok 2" diff --git a/tests/count.t b/tests/count.t new file mode 100755 index 0000000..f669bb7 --- /dev/null +++ b/tests/count.t @@ -0,0 +1,24 @@ +#!/usr/bin/perl -w +# $Id: count.t.in,v 1.5 2006/03/10 13:12:36 rockyb Exp $ +# Some count checks +use strict; + +my $test='count'; +print "1..2\n"; + +my $srcdir = $ENV{srcdir} ? $ENV{srcdir} : '.'; +my @output = `/usr/bin/perl ../ps-watcher --log --sleep -1 --nodaemon --config ${srcdir}/$test.cnf 2>&1`; + +# First line is Id line. This doesn't count in testing. +shift @output; + +my $count = @output; +foreach (@output) { + s/.+:\s+//; + print $_; +} +print "ok 2\n" unless $count == 2; + +#;;; Local Variables: *** +#;;; mode:perl *** +#;;; End: *** diff --git a/tests/count.t.in b/tests/count.t.in new file mode 100644 index 0000000..34897fd --- /dev/null +++ b/tests/count.t.in @@ -0,0 +1,24 @@ +#!@PERL@ -w +# $Id: count.t.in,v 1.5 2006/03/10 13:12:36 rockyb Exp $ +# Some count checks +use strict; + +my $test='count'; +print "1..2\n"; + +my $srcdir = $ENV{srcdir} ? $ENV{srcdir} : '.'; +my @output = `@PERL@ ../ps-watcher --log --sleep -1 --nodaemon --config ${srcdir}/$test.cnf 2>&1`; + +# First line is Id line. This doesn't count in testing. +shift @output; + +my $count = @output; +foreach (@output) { + s/.+:\s+//; + print $_; +} +print "ok 2\n" unless $count == 2; + +#;;; Local Variables: *** +#;;; mode:perl *** +#;;; End: *** diff --git a/tests/driver b/tests/driver new file mode 100755 index 0000000..45f7783 --- /dev/null +++ b/tests/driver @@ -0,0 +1,48 @@ +#!/usr/bin/perl -w +#$Id: driver,v 1.1 2000/03/27 01:53:24 rocky Exp $ +use strict; + +use File::Basename; +my $program = basename($0); # Who am I today, anyway? + +sub usage { + print " +usage: + + $program [test1 ... ] + $program --help + +Runs regresion tests (via Test::Harness). + +If no tests are specified all tests that match *.t in the +test directory are run. + +$program --help prints this help. +"; + + exit 100; +} + +use Test::Harness qw(&runtests $verbose); + +my $setup = 0; +process_options(); + +@ARGV = glob("*.t") if !@ARGV; +runtests @ARGV; +exit 0; + +# The bane of programming. +sub process_options { + use Getopt::Long; + $Getopt::Long::autoabbrev = 1; + my $help = 0; + + my $result = &GetOptions + ( + 'help' => \$help, + ); + usage unless $result; + usage if $help; +} + diff --git a/tests/full.cnf b/tests/full.cnf new file mode 100644 index 0000000..010abbc --- /dev/null +++ b/tests/full.cnf @@ -0,0 +1,15 @@ +# $Id: full.cnf,v 1.3 2006/03/10 12:47:37 rockyb Exp $ +# Test to see we can match on all of the processes, not +# just the ones for our account. + +# On a Unix-like system where there always is a pid 1 - init. +# On there is a ppid of 1. +[.] + occurs = first-trigger + trigger = $ppid == 1 + action = echo "ok 1" + +[.?] + occurs = every + trigger = $pid == 1 + action = echo "ok 2" diff --git a/tests/full.t b/tests/full.t new file mode 100755 index 0000000..fef2a32 --- /dev/null +++ b/tests/full.t @@ -0,0 +1,34 @@ +#!/usr/bin/perl -w +# $Id: full.t.in,v 1.6 2006/03/10 13:12:36 rockyb Exp $ +# Some count checks +use strict; +use Test::More; +use Config; + +if ('cygwin' eq $Config{osname}) { + plan( tests => 1); +} else { + plan( tests => 2); +} + +my $test='full'; + +my $srcdir = $ENV{srcdir} ? $ENV{srcdir} : '.'; +my @output = `/usr/bin/perl ../ps-watcher --log --sleep -1 --nodaemon --config ${srcdir}/$test.cnf 2>&1`; + +# First line is Id line. This doesn't count in testing. +shift @output; + +my $i=1; +foreach (@output) { + if (/^.+:\s+.*ok/) { + s/.+:\s+//; + my $result = sprintf "ok %d", $i; + $i++; + ok($_ =~ m{$result}); + } +} + +#;;; Local Variables: *** +#;;; mode:perl *** +#;;; End: *** diff --git a/tests/full.t.in b/tests/full.t.in new file mode 100644 index 0000000..8ad1c32 --- /dev/null +++ b/tests/full.t.in @@ -0,0 +1,34 @@ +#!@PERL@ -w +# $Id: full.t.in,v 1.6 2006/03/10 13:12:36 rockyb Exp $ +# Some count checks +use strict; +use Test::More; +use Config; + +if ('cygwin' eq $Config{osname}) { + plan( tests => 1); +} else { + plan( tests => 2); +} + +my $test='full'; + +my $srcdir = $ENV{srcdir} ? $ENV{srcdir} : '.'; +my @output = `@PERL@ ../ps-watcher --log --sleep -1 --nodaemon --config ${srcdir}/$test.cnf 2>&1`; + +# First line is Id line. This doesn't count in testing. +shift @output; + +my $i=1; +foreach (@output) { + if (/^.+:\s+.*ok/) { + s/.+:\s+//; + my $result = sprintf "ok %d", $i; + $i++; + ok($_ =~ m{$result}); + } +} + +#;;; Local Variables: *** +#;;; mode:perl *** +#;;; End: *** diff --git a/tests/paction.cnf b/tests/paction.cnf new file mode 100644 index 0000000..dd83e1f --- /dev/null +++ b/tests/paction.cnf @@ -0,0 +1,17 @@ +# $Id: paction.cnf,v 1.1 2004/01/15 03:00:32 rockyb Exp $ +# Test perl-action, prolog and epilog +# Rather the name of the interpreter is listed (e.g. bash or perl) +# Here's how you can match against a script. +# Look for my processes: ps-watcher. +[$PROLOG] + perl-action = $my_count=0; $root_procs=0; +[.*] + perl-action = $my_count++; $root_procs++ if $uid == 0 + occurs = every +[$EPILOG] + trigger = < 0 && $my_count < $count && + $root_procs > 0 && $my_count > $root_procs +EOT + action = echo "ok 1" + diff --git a/tests/paction.t b/tests/paction.t new file mode 100644 index 0000000..096ccf9 --- /dev/null +++ b/tests/paction.t @@ -0,0 +1,37 @@ +#!/usr/bin/perl -w +# $Id: paction.t,v 1.2 2006/03/10 03:21:12 rockyb Exp $ +# Arg paction-statement +use strict; +use Test::More; +use Config; + +if ('cygwin' eq $Config{osname}) { + plan( skip_all => "cygwin's ps is not powerful enough this test"); + exit 0; +} + +my $test='paction'; +print "1..2\n"; + +my $srcdir = $ENV{srcdir} ? $ENV{srcdir} : '.'; +my $cmd = "../ps-watcher --log --nosyslog --nodaemon " + . " --sleep -1 --config ${srcdir}/$test.cnf"; +my @output = `$cmd 2>&1`; + +# First line is Id line. This doesn't count in testing. +shift @output; + +my $count=0; +foreach (@output) { + if (/^.+:\s+.*ok/) { + s/.+:\s+//; + print $_; + $count++; + last; + } +} +print "ok 2\n" if $count>0; + +#;;; Local Variables: *** +#;;; mode:perl *** +#;;; End: *** diff --git a/touch.pl b/touch.pl new file mode 100755 index 0000000..b341830 --- /dev/null +++ b/touch.pl @@ -0,0 +1,42 @@ +#!/usr/bin/perl -w +my $vcid='$Id: touch.pl,v 1.4 2006/03/08 19:22:41 rockyb Exp $ '; +# Copyright (C) 1997-2006 R. Bernstein email: rocky@cpan.org +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 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., 675 Mass Ave, Cambridge, MA 02139, USA. +use strict; +use File::Basename; +my $program = basename($0); # Who am I today, anyway? + +if (@ARGV != 1) { + print " +usage: + $program *file* + + A perl implimentation of a minimal Unix touch command: creates file *file* + if it does not exist. In either case, the file is given a creation + time of the current time. +"; + exit 100; +} + +print "$ARGV[0]\n"; +if (-e $ARGV[0]) { + my $now = time(); + my $count = utime $now, $now, $ARGV[0]; + exit ($count != 1); +} else { + open(FILE, ">$ARGV[0]") || die "Can't open $ARGV[0]: $!"; + close(FILE); + exit $?; +} From 4191237ca8fd1169d8562f06d9426747e6401a32 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 3 Nov 2006 21:38:35 +0000 Subject: [PATCH 002/158] make init-script install --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index 527793f..cd9e2e7 100755 --- a/debian/rules +++ b/debian/rules @@ -82,7 +82,7 @@ binary-arch: build install # dh_install # dh_installdebconf # dh_installlogrotate -# dh_installinit + dh_installinit dh_installman dh_link dh_strip From b6b7899638dd3071732b123e494c8efac802dbbd Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 3 Nov 2006 21:44:36 +0000 Subject: [PATCH 003/158] ajust dh_installinit --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index cd9e2e7..99494ab 100755 --- a/debian/rules +++ b/debian/rules @@ -82,7 +82,7 @@ binary-arch: build install # dh_install # dh_installdebconf # dh_installlogrotate - dh_installinit + dh_installinit -- defaults 40 dh_installman dh_link dh_strip From 27e15cf3e6fcda1682d7ab9aa1e4c4bdd9b33093 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 3 Nov 2006 21:51:01 +0000 Subject: [PATCH 004/158] add bug nr of itp --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index be1192d..a493107 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,6 @@ ps-watcher (1.06-1) unstable; urgency=low - * Initial release (Closes: #nnnn) + * Initial release (Closes: #396953) -- Jan Wagner Fri, 3 Nov 2006 13:39:48 +0000 From 41651a2446574068104a121912765f5c53d10798 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 3 Nov 2006 22:25:10 +0000 Subject: [PATCH 005/158] remove unused stuff --- debian/cron.d.ex | 4 ---- debian/postinst.ex | 41 ----------------------------------------- debian/postrm.ex | 39 --------------------------------------- debian/preinst.ex | 37 ------------------------------------- debian/prerm.ex | 40 ---------------------------------------- 5 files changed, 161 deletions(-) delete mode 100644 debian/cron.d.ex delete mode 100644 debian/postinst.ex delete mode 100644 debian/postrm.ex delete mode 100644 debian/preinst.ex delete mode 100644 debian/prerm.ex diff --git a/debian/cron.d.ex b/debian/cron.d.ex deleted file mode 100644 index 7c5a1eb..0000000 --- a/debian/cron.d.ex +++ /dev/null @@ -1,4 +0,0 @@ -# -# Regular cron jobs for the ps-watcher package -# -0 4 * * * root ps-watcher_maintenance diff --git a/debian/postinst.ex b/debian/postinst.ex deleted file mode 100644 index 6ea5c34..0000000 --- a/debian/postinst.ex +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -# postinst script for ps-watcher -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `configure' -# * `abort-upgrade' -# * `abort-remove' `in-favour' -# -# * `abort-remove' -# * `abort-deconfigure' `in-favour' -# `removing' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - configure) - ;; - - abort-upgrade|abort-remove|abort-deconfigure) - ;; - - *) - echo "postinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 - - diff --git a/debian/postrm.ex b/debian/postrm.ex deleted file mode 100644 index bb20d3c..0000000 --- a/debian/postrm.ex +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -# postrm script for ps-watcher -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `remove' -# * `purge' -# * `upgrade' -# * `failed-upgrade' -# * `abort-install' -# * `abort-install' -# * `abort-upgrade' -# * `disappear' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) - ;; - - *) - echo "postrm called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 - - diff --git a/debian/preinst.ex b/debian/preinst.ex deleted file mode 100644 index 718d618..0000000 --- a/debian/preinst.ex +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh -# preinst script for ps-watcher -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `install' -# * `install' -# * `upgrade' -# * `abort-upgrade' -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - install|upgrade) - ;; - - abort-upgrade) - ;; - - *) - echo "preinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 - - diff --git a/debian/prerm.ex b/debian/prerm.ex deleted file mode 100644 index e3097f5..0000000 --- a/debian/prerm.ex +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh -# prerm script for ps-watcher -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `remove' -# * `upgrade' -# * `failed-upgrade' -# * `remove' `in-favour' -# * `deconfigure' `in-favour' -# `removing' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - remove|upgrade|deconfigure) - ;; - - failed-upgrade) - ;; - - *) - echo "prerm called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 - - From 9e824f218c151fd75a9f239e09fa90f0ac98a6c0 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sat, 4 Nov 2006 12:25:45 +0000 Subject: [PATCH 006/158] make daniel happy --- debian/README.Debian | 6 ------ debian/changelog | 1 - debian/default | 7 ++----- debian/dirs | 4 ++-- debian/init.d | 4 ---- debian/rules | 4 ---- debian/watch | 9 --------- 7 files changed, 4 insertions(+), 31 deletions(-) delete mode 100644 debian/README.Debian diff --git a/debian/README.Debian b/debian/README.Debian deleted file mode 100644 index e9137a9..0000000 --- a/debian/README.Debian +++ /dev/null @@ -1,6 +0,0 @@ -ps-watcher for Debian ---------------------- - - - - -- Jan Wagner Fri, 3 Nov 2006 13:39:48 +0000 diff --git a/debian/changelog b/debian/changelog index a493107..9a57371 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,4 +3,3 @@ ps-watcher (1.06-1) unstable; urgency=low * Initial release (Closes: #396953) -- Jan Wagner Fri, 3 Nov 2006 13:39:48 +0000 - diff --git a/debian/default b/debian/default index 4dcb8a9..e60f462 100644 --- a/debian/default +++ b/debian/default @@ -2,9 +2,6 @@ # sourced by /etc/init.d/ps-watcher # installed at /etc/default/ps-watcher by the maintainer scripts -# -# This is a POSIX shell fragment -# - # Additional options that are passed to the Daemon. -DAEMON_OPTS="" +# here: specify config file, daemon mode, check every 150 secs +DAEMON_OPTS="-c /etc/ps-watcher.conf --daemon --sleep 150"" diff --git a/debian/dirs b/debian/dirs index ca882bb..8ff5d20 100644 --- a/debian/dirs +++ b/debian/dirs @@ -1,2 +1,2 @@ -usr/bin -usr/sbin +#usr/bin +#usr/sbin diff --git a/debian/init.d b/debian/init.d index 72d7f87..fc56ddb 100644 --- a/debian/init.d +++ b/debian/init.d @@ -1,8 +1,4 @@ #! /bin/sh -# -# skeleton example file to build /etc/init.d/ scripts. -# This file should be used to construct scripts for /etc/init.d. -# # Written by Miquel van Smoorenburg . # Modified for Debian # by Ian Murdock . diff --git a/debian/rules b/debian/rules index 99494ab..503007e 100755 --- a/debian/rules +++ b/debian/rules @@ -37,7 +37,6 @@ build-stamp: config.status # Add here commands to compile the package. $(MAKE) - #docbook-to-man debian/ps-watcher.sgml > ps-watcher.1 touch $@ @@ -79,9 +78,6 @@ binary-arch: build install dh_installchangelogs ChangeLog dh_installdocs dh_installexamples samples/* -# dh_install -# dh_installdebconf -# dh_installlogrotate dh_installinit -- defaults 40 dh_installman dh_link diff --git a/debian/watch b/debian/watch index 1d4b5b2..cb529de 100644 --- a/debian/watch +++ b/debian/watch @@ -1,12 +1,3 @@ -# Example watch control file for uscan -# Rename this file to "watch" and then you can run the "uscan" command -# to check for upstream updates and more. -# See uscan(1) for format - -# Compulsory line, this is a version 3 file version=3 -# Uncomment to find new files on sourceforge, for debscripts >= 2.9 http://sf.net/ps-watcher/ps-watcher-(.*)\.tar\.gz - - From 725970179dd24bd39f2a92ebcd94ef843b337479 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sat, 4 Nov 2006 12:27:13 +0000 Subject: [PATCH 007/158] make denial happy --- debian/dirs | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 debian/dirs diff --git a/debian/dirs b/debian/dirs deleted file mode 100644 index 8ff5d20..0000000 --- a/debian/dirs +++ /dev/null @@ -1,2 +0,0 @@ -#usr/bin -#usr/sbin From ae74b6922f7fa2f0907bc06403c2f960db0e3882 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sat, 4 Nov 2006 17:20:16 +0000 Subject: [PATCH 008/158] make daniel happy --- debian/rules | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/debian/rules b/debian/rules index 503007e..9891fc0 100755 --- a/debian/rules +++ b/debian/rules @@ -1,21 +1,14 @@ #!/usr/bin/make -f -# -*- makefile -*- -# Sample debian/rules that uses debhelper. -# This file was originally written by Joey Hess and Craig Small. -# As a special exception, when this file is copied by dh-make into a -# dh-make output file, you may use that output file without restriction. -# This special exception was added by Craig Small in version 0.37 of dh-make. - +# written by Jan Wagner +# # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 - # These are used for cross-compiling and for saving the configure script # from having to guess our platform (since we know it already) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) - CFLAGS = -Wall -g ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) @@ -29,10 +22,9 @@ config.status: configure # Add here commands to configure the package. ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs" - build: build-stamp -build-stamp: config.status +build-stamp: config.status dh_testdir # Add here commands to compile the package. @@ -54,7 +46,6 @@ ifneq "$(wildcard /usr/share/misc/config.guess)" "" cp -f /usr/share/misc/config.guess config.guess endif - dh_clean install: build @@ -66,7 +57,6 @@ install: build # Add here commands to install the package into debian/ps-watcher. $(MAKE) DESTDIR=$(CURDIR)/debian/ps-watcher install - # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. @@ -79,7 +69,6 @@ binary-arch: build install dh_installdocs dh_installexamples samples/* dh_installinit -- defaults 40 - dh_installman dh_link dh_strip dh_compress From 7c23e0bc6cccac62ace901eb77260a2507829eca Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sat, 4 Nov 2006 17:33:15 +0000 Subject: [PATCH 009/158] make daniel happy --- debian/rules | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/debian/rules b/debian/rules index 9891fc0..3160b85 100755 --- a/debian/rules +++ b/debian/rules @@ -35,7 +35,7 @@ build-stamp: config.status clean: dh_testdir dh_testroot - rm -f build-stamp + rm -f build-stamp # Add here commands to clean up after the build process. -$(MAKE) clean @@ -46,12 +46,12 @@ ifneq "$(wildcard /usr/share/misc/config.guess)" "" cp -f /usr/share/misc/config.guess config.guess endif - dh_clean + dh_clean install: build dh_testdir dh_testroot - dh_clean -k + dh_clean -k dh_installdirs # Add here commands to install the package into debian/ps-watcher. @@ -66,8 +66,8 @@ binary-arch: build install dh_testdir dh_testroot dh_installchangelogs ChangeLog - dh_installdocs - dh_installexamples samples/* + dh_installdocs + dh_installexamples samples/* dh_installinit -- defaults 40 dh_link dh_strip From ee0f2391336df2c75fd8b7eced0e1be75bf8cefd Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sat, 4 Nov 2006 19:22:47 +0000 Subject: [PATCH 010/158] remove unused stuff --- debian/init.d | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/debian/init.d b/debian/init.d index fc56ddb..bccc624 100644 --- a/debian/init.d +++ b/debian/init.d @@ -1,6 +1,6 @@ #! /bin/sh # Written by Miquel van Smoorenburg . -# Modified for Debian +# Modified for Debian # by Ian Murdock . # # Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl @@ -13,7 +13,7 @@ # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: start and stop the ps-watcher daemon -# Description: monitoring a system via ps-like commands +# Description: monitoring a system via ps-like commands ### END INIT INFO PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin @@ -43,24 +43,7 @@ case "$1" in --exec $DAEMON echo "$NAME." ;; - #reload) - # - # If the daemon can reload its config files on the fly - # for example by sending it SIGHUP, do it here. - # - # If the daemon responds to changes in its config file - # directly anyway, make this a do-nothing entry. - # - # echo "Reloading $DESC configuration files." - # start-stop-daemon --stop --signal 1 --quiet --pidfile \ - # /var/run/$NAME.pid --exec $DAEMON - #;; restart|force-reload) - # - # If the "reload" option is implemented, move the "force-reload" - # option to the "reload" entry above. If not, "force-reload" is - # just the same as "restart". - # echo -n "Restarting $DESC: " start-stop-daemon --stop --quiet --pidfile \ /var/run/$NAME.pid --exec $DAEMON From a2ce371df56a6382285817e5d959e258ba656bf8 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sat, 4 Nov 2006 19:24:07 +0000 Subject: [PATCH 011/158] remove senseless whitespaces --- debian/changelog | 2 +- debian/control | 4 ++-- debian/copyright | 2 +- debian/default | 2 +- debian/docs | 4 ++-- debian/rules | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/debian/changelog b/debian/changelog index 9a57371..bad6b6a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,5 @@ ps-watcher (1.06-1) unstable; urgency=low - * Initial release (Closes: #396953) + * Initial release (Closes: #396953) -- Jan Wagner Fri, 3 Nov 2006 13:39:48 +0000 diff --git a/debian/control b/debian/control index 5e8ce13..97e30fe 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Build-Depends-Indep: libconfig-inifiles-perl, perl-modules Standards-Version: 3.7.2 Package: ps-watcher -Architecture: all +Architecture: all Depends: ${perl:Depends} Description: monitoring a system via ps-like commands This program runs the ps command periodically and triggers commands on matches. @@ -16,6 +16,6 @@ Description: monitoring a system via ps-like commands . For example it can be used to ensure that a daemon is running, or is not running too many times. It can also be used to determine when a process has - consumed too many resources, perhaps due to a memory leak. + consumed too many resources, perhaps due to a memory leak. . Homepage: diff --git a/debian/copyright b/debian/copyright index acea04e..b66dcc3 100644 --- a/debian/copyright +++ b/debian/copyright @@ -6,7 +6,7 @@ It was downloaded from Upstream Author: Rocky Bernstein Copyright: Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006 - Rocky Bernstein + Rocky Bernstein License: diff --git a/debian/default b/debian/default index e60f462..5facb1a 100644 --- a/debian/default +++ b/debian/default @@ -4,4 +4,4 @@ # Additional options that are passed to the Daemon. # here: specify config file, daemon mode, check every 150 secs -DAEMON_OPTS="-c /etc/ps-watcher.conf --daemon --sleep 150"" +DAEMON_OPTS="-c /etc/ps-watcher.conf --daemon --sleep 150" diff --git a/debian/docs b/debian/docs index 7fe608a..73fa71b 100644 --- a/debian/docs +++ b/debian/docs @@ -1,3 +1,3 @@ -NEWS -THANKS +NEWS +THANKS TODO diff --git a/debian/rules b/debian/rules index 3160b85..81aa4a8 100755 --- a/debian/rules +++ b/debian/rules @@ -81,4 +81,4 @@ binary-arch: build install dh_builddeb binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install +.PHONY: build clean binary-indep binary-arch binary install From 40bc40e2f48b7114d9c446d3bb97f837d5b5b584 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sat, 4 Nov 2006 19:56:37 +0000 Subject: [PATCH 012/158] make daniel happy --- debian/changelog | 4 ++-- debian/rules | 1 - debian/watch | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index bad6b6a..a40bda3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,5 @@ ps-watcher (1.06-1) unstable; urgency=low - * Initial release (Closes: #396953) + * Initial release (Closes: #396953). - -- Jan Wagner Fri, 3 Nov 2006 13:39:48 +0000 + -- Jan Wagner Fri, 3 Nov 2006 14:39:48 +0100 diff --git a/debian/rules b/debian/rules index 81aa4a8..cfaf1bc 100755 --- a/debian/rules +++ b/debian/rules @@ -23,7 +23,6 @@ config.status: configure ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs" build: build-stamp - build-stamp: config.status dh_testdir diff --git a/debian/watch b/debian/watch index cb529de..4f1512e 100644 --- a/debian/watch +++ b/debian/watch @@ -1,3 +1,2 @@ version=3 - http://sf.net/ps-watcher/ps-watcher-(.*)\.tar\.gz From 26b0497c99c4c2d1eda460fe6582e91fe7c00887 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sat, 4 Nov 2006 20:01:01 +0000 Subject: [PATCH 013/158] final fix --- debian/copyright | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/debian/copyright b/debian/copyright index b66dcc3..284f3f6 100644 --- a/debian/copyright +++ b/debian/copyright @@ -5,8 +5,7 @@ It was downloaded from Upstream Author: Rocky Bernstein -Copyright: Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006 - Rocky Bernstein +Copyright: (C) 2000-2006 Rocky Bernstein License: From e42dfa138a9a61da50535f13c7c4c48de5b29166 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sat, 4 Nov 2006 20:17:46 +0000 Subject: [PATCH 014/158] final fixes --- debian/copyright | 2 +- debian/rules | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/debian/copyright b/debian/copyright index 284f3f6..7cbb501 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,5 +1,5 @@ This package was debianized by Jan Wagner on -Fri, 3 Nov 2006 13:39:48 +0000. +Fri, 3 Nov 2006 14:39:48 +0100. It was downloaded from diff --git a/debian/rules b/debian/rules index cfaf1bc..d89592f 100755 --- a/debian/rules +++ b/debian/rules @@ -74,7 +74,6 @@ binary-arch: build install dh_fixperms dh_perl dh_installdeb - dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb From 1219badc1c507a5cb69aca44a09095ea77a37b21 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sat, 4 Nov 2006 20:20:15 +0000 Subject: [PATCH 015/158] remove CFLAGS --- debian/rules | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/debian/rules b/debian/rules index d89592f..71d81b6 100755 --- a/debian/rules +++ b/debian/rules @@ -4,23 +4,10 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -# These are used for cross-compiling and for saving the configure script -# from having to guess our platform (since we know it already) -DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) -DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) - -CFLAGS = -Wall -g - -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -O0 -else - CFLAGS += -O2 -endif - config.status: configure dh_testdir # Add here commands to configure the package. - ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs" + ./configure --prefix=/usr --mandir=\$${prefix}/share/man build: build-stamp build-stamp: config.status From afbfaf25751ce2df333646ef89a0bc3924c44c27 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sat, 4 Nov 2006 20:40:41 +0000 Subject: [PATCH 016/158] remove dh_strip from rules --- debian/changelog | 6 ++++++ debian/rules | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index a40bda3..8b8ae53 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ps-watcher (1.06-2) unstable; urgency=low + + * remove dh_strip from rules + + -- Sat, 4 Nov 2006 21:38:44 +0100 + ps-watcher (1.06-1) unstable; urgency=low * Initial release (Closes: #396953). diff --git a/debian/rules b/debian/rules index 71d81b6..8cf5517 100755 --- a/debian/rules +++ b/debian/rules @@ -56,7 +56,6 @@ binary-arch: build install dh_installexamples samples/* dh_installinit -- defaults 40 dh_link - dh_strip dh_compress dh_fixperms dh_perl From 8359c5ead79b7e3483bd4d87ce6555b482bb8286 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 9 Nov 2006 07:51:19 +0000 Subject: [PATCH 017/158] adjust deps --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 97e30fe..c619de8 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Standards-Version: 3.7.2 Package: ps-watcher Architecture: all -Depends: ${perl:Depends} +Depends: ${perl:Depends}, libconfig-inifiles-perl, libsys-syslog-perl Description: monitoring a system via ps-like commands This program runs the ps command periodically and triggers commands on matches. The match patterns are Perl regular expressions which can refer to the process From 6f07969451cc829e2b644172532b3d71cc7b8441 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 9 Nov 2006 07:51:37 +0000 Subject: [PATCH 018/158] aprove initscript --- debian/README.Debian | 17 +++++++++++++++++ debian/changelog | 4 +++- debian/default | 11 +++++++++-- debian/init.d | 36 +++++++++++++++++++++++++++++++----- 4 files changed, 60 insertions(+), 8 deletions(-) create mode 100644 debian/README.Debian diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 0000000..6c118fc --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,17 @@ +ps-watcher for Debian +--------------------- + +1. PROVIDE A CONFIGFILE +----------------------- + +Please provide a config file, usualy /etc/ps-watcher.conf. Examples are +located in /usr/share/doc/ps-watcher/examples/. + +2. AUTOMATIC STARTUP +-------------------- + +In order to avoid the startup of the daemon on an unconfigured machine, +automatic startup, on boot, is disabled by default. To enable it just edit the +file /etc/default/ps-watcher and set the "startup" variable to 1. + + -- Jan Wagner Wed, 8 Nov 2006 22:44:24 +0100 diff --git a/debian/changelog b/debian/changelog index 8b8ae53..4ca7517 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,10 @@ ps-watcher (1.06-2) unstable; urgency=low * remove dh_strip from rules + * adjust depencies (libconfig-inifiles-perl, libsys-syslog-perl) + * modifying initscript to prevent to start without config file - -- Sat, 4 Nov 2006 21:38:44 +0100 + -- Jan Wagner Sat, 4 Nov 2006 21:38:44 +0100 ps-watcher (1.06-1) unstable; urgency=low diff --git a/debian/default b/debian/default index 5facb1a..c68a508 100644 --- a/debian/default +++ b/debian/default @@ -2,6 +2,13 @@ # sourced by /etc/init.d/ps-watcher # installed at /etc/default/ps-watcher by the maintainer scripts +# prevent startup without configuration file +# set the below varible to 1 in order to allow ps-watcher to start +# startup=1 + +# Specify your configfile here +CONFIG="/etc/ps-watcher.conf" + # Additional options that are passed to the Daemon. -# here: specify config file, daemon mode, check every 150 secs -DAEMON_OPTS="-c /etc/ps-watcher.conf --daemon --sleep 150" +# here: check every 150 secs +DAEMON_OPTS="--sleep 150" diff --git a/debian/init.d b/debian/init.d index bccc624..e169955 100644 --- a/debian/init.d +++ b/debian/init.d @@ -30,11 +30,37 @@ fi set -e +not_configured () { + echo "#### WARNING ####" + echo "ps-watcher won't be started/stopped unless it is configured" + if [ "$1" != "stop" ] + then + echo "" + echo "Please pease provide a configfile!" + echo "See /usr/share/doc/ps-watcher/README.Debian.gz." + fi + echo "#################" + exit 0 +} + +# check if ps-watcher is configured or not +if [ -f "/etc/default/pswatcher" ] +then + . /etc/default/ps-watcher + if [ "$startup" != "1" ] || [ -f $CONFIG ] + then + not_configured + fi +else + not_configured +fi + + case "$1" in start) echo -n "Starting $DESC: " start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ - --exec $DAEMON -- $DAEMON_OPTS + --exec $DAEMON -- -c $CONFIG --daemon $DAEMON_OPTS echo "$NAME." ;; stop) @@ -45,11 +71,11 @@ case "$1" in ;; restart|force-reload) echo -n "Restarting $DESC: " - start-stop-daemon --stop --quiet --pidfile \ - /var/run/$NAME.pid --exec $DAEMON + start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ + --exec $DAEMON sleep 1 - start-stop-daemon --start --quiet --pidfile \ - /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS + start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ + --exec $DAEMON -- -c $CONFIG --daemon $DAEMON_OPTS echo "$NAME." ;; *) From d35c0315dda9503d3f26d7e954f531300950153e Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 9 Nov 2006 08:07:34 +0000 Subject: [PATCH 019/158] own postinst and prerm --- debian/changelog | 1 + debian/init.d | 2 +- debian/postinst | 18 ++++++++++++++++++ debian/prerm | 14 ++++++++++++++ 4 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 debian/postinst create mode 100644 debian/prerm diff --git a/debian/changelog b/debian/changelog index 4ca7517..c616aa5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ ps-watcher (1.06-2) unstable; urgency=low * remove dh_strip from rules * adjust depencies (libconfig-inifiles-perl, libsys-syslog-perl) * modifying initscript to prevent to start without config file + * provide own postinst and prerm scripts -- Jan Wagner Sat, 4 Nov 2006 21:38:44 +0100 diff --git a/debian/init.d b/debian/init.d index e169955..4f7194b 100644 --- a/debian/init.d +++ b/debian/init.d @@ -47,7 +47,7 @@ not_configured () { if [ -f "/etc/default/pswatcher" ] then . /etc/default/ps-watcher - if [ "$startup" != "1" ] || [ -f $CONFIG ] + if [ "$startup" != "1" ] || [ ! -f $CONFIG ] then not_configured fi diff --git a/debian/postinst b/debian/postinst new file mode 100644 index 0000000..a70b870 --- /dev/null +++ b/debian/postinst @@ -0,0 +1,18 @@ +#!/bin/sh +set -e +if [ -f "/etc/default/pswatcher" ] +then + . /etc/default/ps-watcher +fi + +if [ -x "/etc/init.d/ps-watcher" ]; then + update-rc.d ps-watcher defaults 40 >/dev/null + if [ "$startup" == "1" ] && [ -f $CONFIG ]; then + if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then + invoke-rc.d ps-watcher start || exit $? + else + /etc/init.d/ps-watcher start || exit $? + fi + fi +fi + diff --git a/debian/prerm b/debian/prerm new file mode 100644 index 0000000..06953aa --- /dev/null +++ b/debian/prerm @@ -0,0 +1,14 @@ +#!/bin/sh +set -e +if [ -f "/etc/default/pswatcher" ] +then + . /etc/default/ps-watcher +fi + +if [ -x "/etc/init.d/ps-watcher" ] && [ "$startup" == "1" ] && [ -f $CONFIG ]; then + if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then + invoke-rc.d ps-watcher stop || exit $? + else + /etc/init.d/ps-watcher stop || exit $? + fi +fi From cbd315a9a4a5743ab0cdd6c4cc893178ec676612 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 9 Nov 2006 08:13:34 +0000 Subject: [PATCH 020/158] fixies --- debian/postinst | 3 ++- debian/prerm | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/debian/postinst b/debian/postinst index a70b870..0321690 100644 --- a/debian/postinst +++ b/debian/postinst @@ -7,7 +7,7 @@ fi if [ -x "/etc/init.d/ps-watcher" ]; then update-rc.d ps-watcher defaults 40 >/dev/null - if [ "$startup" == "1" ] && [ -f $CONFIG ]; then + if [ "$startup" = "1" ] && [ -f $CONFIG ]; then if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then invoke-rc.d ps-watcher start || exit $? else @@ -16,3 +16,4 @@ if [ -x "/etc/init.d/ps-watcher" ]; then fi fi +#DEBHELPER# diff --git a/debian/prerm b/debian/prerm index 06953aa..e33c801 100644 --- a/debian/prerm +++ b/debian/prerm @@ -5,10 +5,12 @@ then . /etc/default/ps-watcher fi -if [ -x "/etc/init.d/ps-watcher" ] && [ "$startup" == "1" ] && [ -f $CONFIG ]; then +if [ -x "/etc/init.d/ps-watcher" ] && [ "$startup" = "1" ] && [ -f $CONFIG ]; then if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then invoke-rc.d ps-watcher stop || exit $? else /etc/init.d/ps-watcher stop || exit $? fi fi + +#DEBHELPER# From 24d768fda776012868745b34b8a0b0ad8adaf6ac Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 9 Nov 2006 08:14:51 +0000 Subject: [PATCH 021/158] fixies --- debian/postinst | 1 - 1 file changed, 1 deletion(-) diff --git a/debian/postinst b/debian/postinst index 0321690..0f2c6bb 100644 --- a/debian/postinst +++ b/debian/postinst @@ -6,7 +6,6 @@ then fi if [ -x "/etc/init.d/ps-watcher" ]; then - update-rc.d ps-watcher defaults 40 >/dev/null if [ "$startup" = "1" ] && [ -f $CONFIG ]; then if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then invoke-rc.d ps-watcher start || exit $? From f9dd6ccfb13a40f8f595deb46371b026de8e44c5 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 9 Nov 2006 13:08:29 +0000 Subject: [PATCH 022/158] released --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index c616aa5..e07b3da 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ps-watcher (1.06-3) UNRELEASED; urgency=low + + * NOT RELEASED YET + + -- Jan Wagner Thu, 9 Nov 2006 14:08:15 +0100 + ps-watcher (1.06-2) unstable; urgency=low * remove dh_strip from rules From 1e321fc09a8d79ebf057c450ede790fdf8146222 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 16 Nov 2006 11:30:30 +0000 Subject: [PATCH 023/158] changes --- debian/changelog | 6 +++--- debian/rules | 7 +++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index e07b3da..7ef8fc5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -ps-watcher (1.06-3) UNRELEASED; urgency=low +ps-watcher (1.06-3) unstable; urgency=low - * NOT RELEASED YET + * moved from binary-arch to binary-indep - -- Jan Wagner Thu, 9 Nov 2006 14:08:15 +0100 + -- Jan Wagner Thu, 9 Nov 2006 14:08:15 +0100 ps-watcher (1.06-2) unstable; urgency=low diff --git a/debian/rules b/debian/rules index 8cf5517..45bf57f 100755 --- a/debian/rules +++ b/debian/rules @@ -45,10 +45,6 @@ install: build # Build architecture-independent files here. binary-indep: build install -# We have nothing to do by default. - -# Build architecture-dependent files here. -binary-arch: build install dh_testdir dh_testroot dh_installchangelogs ChangeLog @@ -64,5 +60,8 @@ binary-arch: build install dh_md5sums dh_builddeb +# Build architecture-dependent files here. +binary-arch: build install + binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install From 02f361cb419ae2119a6155995b77b86bdcb15544 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 16 Nov 2006 12:31:12 +0000 Subject: [PATCH 024/158] some details about startup sequence --- debian/README.Debian | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/README.Debian b/debian/README.Debian index 6c118fc..a0dfc7b 100644 --- a/debian/README.Debian +++ b/debian/README.Debian @@ -14,4 +14,11 @@ In order to avoid the startup of the daemon on an unconfigured machine, automatic startup, on boot, is disabled by default. To enable it just edit the file /etc/default/ps-watcher and set the "startup" variable to 1. +3. POSITION IN STARTUP SCRIPTS +------------------------------ + +If you want to keep track on daemon (restart if not running any more), you +should start ps-watcher on startup after all daemons running and stop at first +on shutdown. You can use update-rc.d to updated the postition in start-scripts. + -- Jan Wagner Wed, 8 Nov 2006 22:44:24 +0100 From aa2dc95550edce83e648ff5d9e3c181dffd93148 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sun, 3 Dec 2006 20:36:21 +0000 Subject: [PATCH 025/158] move libsys-syslog-perl to Recommands --- debian/changelog | 7 +++++++ debian/control | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 7ef8fc5..641a1aa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +ps-watcher (1.06-4) unstable; urgency=low + + * moved libsys-syslog-perl from Depends to Recommands since Sys::Syslog is + also provided by perl + + -- Jan Wagner Tue, 28 Nov 2006 12:01:46 +0100 + ps-watcher (1.06-3) unstable; urgency=low * moved from binary-arch to binary-indep diff --git a/debian/control b/debian/control index c619de8..bbedd9e 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,8 @@ Standards-Version: 3.7.2 Package: ps-watcher Architecture: all -Depends: ${perl:Depends}, libconfig-inifiles-perl, libsys-syslog-perl +Depends: ${perl:Depends}, libconfig-inifiles-perl +Recommends: libsys-syslog-perl Description: monitoring a system via ps-like commands This program runs the ps command periodically and triggers commands on matches. The match patterns are Perl regular expressions which can refer to the process From 92d180b60bfd33ca064f39b29ca7248af7736d2e Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sun, 3 Dec 2006 20:38:42 +0000 Subject: [PATCH 026/158] and removed from builddeps --- debian/changelog | 4 ++-- debian/control | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 641a1aa..a646022 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,7 @@ ps-watcher (1.06-4) unstable; urgency=low - * moved libsys-syslog-perl from Depends to Recommands since Sys::Syslog is - also provided by perl + * moved libsys-syslog-perl from Depends to Recommands and removed from + Builddeps since Sys::Syslog is also provided by perl -- Jan Wagner Tue, 28 Nov 2006 12:01:46 +0100 diff --git a/debian/control b/debian/control index bbedd9e..eea3637 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: ps-watcher Section: admin Priority: optional Maintainer: Jan Wagner -Build-Depends: debhelper (>= 5), autotools-dev, libsys-syslog-perl +Build-Depends: debhelper (>= 5), autotools-dev Build-Depends-Indep: libconfig-inifiles-perl, perl-modules Standards-Version: 3.7.2 From 29a12681386019b311d6b81d0591a5c2f4576872 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sun, 3 Dec 2006 20:48:16 +0000 Subject: [PATCH 027/158] change urgency --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index a646022..9cbdc05 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -ps-watcher (1.06-4) unstable; urgency=low +ps-watcher (1.06-4) unstable; urgency=medium * moved libsys-syslog-perl from Depends to Recommands and removed from Builddeps since Sys::Syslog is also provided by perl From 88f9eeafa0601b5924293f228ada2a4d9cec9fa7 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sun, 28 Jan 2007 12:52:17 +0000 Subject: [PATCH 028/158] ajust year in copyright --- debian/copyright | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/copyright b/debian/copyright index 7cbb501..ec8f776 100644 --- a/debian/copyright +++ b/debian/copyright @@ -26,5 +26,5 @@ License: On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL file. -The Debian packaging is (C) 2006, Jan Wagner and +The Debian packaging is (C) 2006, 2007 Jan Wagner and is licensed under the GPL, see `/usr/share/common-licenses/GPL'. From 5b5a1097000cc23a1d540c6048a3bd3a5e28ee4e Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 8 Mar 2007 08:19:19 +0000 Subject: [PATCH 029/158] fix typo --- debian/init.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/init.d b/debian/init.d index 4f7194b..c10b4e8 100644 --- a/debian/init.d +++ b/debian/init.d @@ -44,7 +44,7 @@ not_configured () { } # check if ps-watcher is configured or not -if [ -f "/etc/default/pswatcher" ] +if [ -f "/etc/default/ps-watcher" ] then . /etc/default/ps-watcher if [ "$startup" != "1" ] || [ ! -f $CONFIG ] From 09f8c009bf929a782a5793a588c2aebce29fd2c9 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 8 Mar 2007 08:19:30 +0000 Subject: [PATCH 030/158] new revision --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 9cbdc05..f5c3db2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ps-watcher (1.06-5) unstable; urgency=medium + + * fix typo in init script which prevents from start + + -- Jan Wagner Wed, 28 Feb 2007 23:00:39 +0100 + ps-watcher (1.06-4) unstable; urgency=medium * moved libsys-syslog-perl from Depends to Recommands and removed from From f54be892ca4314c75c0768f6f979588d0f154d01 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 8 Mar 2007 10:26:35 +0000 Subject: [PATCH 031/158] fix debhelper scripts and revert other changes to -5 --- debian/changelog | 6 ++++++ debian/copyright | 2 +- debian/postinst | 5 ++--- debian/prerm | 4 +--- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index f5c3db2..90d03cb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ps-watcher (1.06-6) unstable; urgency=medium + + * fix prerm and postinst to prevent trouble when updating + + -- Jan Wagner Thu, 8 Mar 2007 09:20:58 +0100 + ps-watcher (1.06-5) unstable; urgency=medium * fix typo in init script which prevents from start diff --git a/debian/copyright b/debian/copyright index ec8f776..7cbb501 100644 --- a/debian/copyright +++ b/debian/copyright @@ -26,5 +26,5 @@ License: On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL file. -The Debian packaging is (C) 2006, 2007 Jan Wagner and +The Debian packaging is (C) 2006, Jan Wagner and is licensed under the GPL, see `/usr/share/common-licenses/GPL'. diff --git a/debian/postinst b/debian/postinst index 0f2c6bb..d9075c3 100644 --- a/debian/postinst +++ b/debian/postinst @@ -6,7 +6,8 @@ then fi if [ -x "/etc/init.d/ps-watcher" ]; then - if [ "$startup" = "1" ] && [ -f $CONFIG ]; then + update-rc.d ps-watcher defaults 40 >/dev/null + if [ "$startup" = "1" ] && [ -f "/etc/default/pswatcher" ]; then if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then invoke-rc.d ps-watcher start || exit $? else @@ -14,5 +15,3 @@ if [ -x "/etc/init.d/ps-watcher" ]; then fi fi fi - -#DEBHELPER# diff --git a/debian/prerm b/debian/prerm index e33c801..8d6f2dc 100644 --- a/debian/prerm +++ b/debian/prerm @@ -5,12 +5,10 @@ then . /etc/default/ps-watcher fi -if [ -x "/etc/init.d/ps-watcher" ] && [ "$startup" = "1" ] && [ -f $CONFIG ]; then +if [ -x "/etc/init.d/ps-watcher" ] && [ "$startup" = "1" ] && [ -f "/etc/default/pswatcher" ]; then if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then invoke-rc.d ps-watcher stop || exit $? else /etc/init.d/ps-watcher stop || exit $? fi fi - -#DEBHELPER# From 60e412165e0894c66a8a7bc2032cf35a7d7b38c4 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sat, 17 Mar 2007 21:55:41 +0000 Subject: [PATCH 032/158] fix package upgrade --- debian/changelog | 9 +++++++++ debian/copyright | 2 +- debian/init.d | 5 +++-- debian/postinst | 17 ----------------- debian/prerm | 17 ++++++----------- 5 files changed, 19 insertions(+), 31 deletions(-) delete mode 100644 debian/postinst diff --git a/debian/changelog b/debian/changelog index 90d03cb..a3ebeba 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +ps-watcher (1.06-7~unreleased.1) unstable; urgency=low + + * update copyright + * use native debhelper postinst script + * fix debhelper prerm script + * fix stop) in init script + + -- Jan Wagner Thu, 8 Mar 2007 11:26:57 +0100 + ps-watcher (1.06-6) unstable; urgency=medium * fix prerm and postinst to prevent trouble when updating diff --git a/debian/copyright b/debian/copyright index 7cbb501..014181f 100644 --- a/debian/copyright +++ b/debian/copyright @@ -26,5 +26,5 @@ License: On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL file. -The Debian packaging is (C) 2006, Jan Wagner and +The Debian packaging is (C) 2006-2007 Jan Wagner and is licensed under the GPL, see `/usr/share/common-licenses/GPL'. diff --git a/debian/init.d b/debian/init.d index c10b4e8..d3a3d2c 100644 --- a/debian/init.d +++ b/debian/init.d @@ -65,8 +65,9 @@ case "$1" in ;; stop) echo -n "Stopping $DESC: " - start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ - --exec $DAEMON + #start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ + # --exec $DAEMON + killall -9 $NAME echo "$NAME." ;; restart|force-reload) diff --git a/debian/postinst b/debian/postinst deleted file mode 100644 index d9075c3..0000000 --- a/debian/postinst +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -set -e -if [ -f "/etc/default/pswatcher" ] -then - . /etc/default/ps-watcher -fi - -if [ -x "/etc/init.d/ps-watcher" ]; then - update-rc.d ps-watcher defaults 40 >/dev/null - if [ "$startup" = "1" ] && [ -f "/etc/default/pswatcher" ]; then - if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then - invoke-rc.d ps-watcher start || exit $? - else - /etc/init.d/ps-watcher start || exit $? - fi - fi -fi diff --git a/debian/prerm b/debian/prerm index 8d6f2dc..7f0a70c 100644 --- a/debian/prerm +++ b/debian/prerm @@ -1,14 +1,9 @@ #!/bin/sh set -e -if [ -f "/etc/default/pswatcher" ] -then - . /etc/default/ps-watcher -fi - -if [ -x "/etc/init.d/ps-watcher" ] && [ "$startup" = "1" ] && [ -f "/etc/default/pswatcher" ]; then - if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then - invoke-rc.d ps-watcher stop || exit $? - else - /etc/init.d/ps-watcher stop || exit $? - fi +if [ -x "/etc/init.d/ps-watcher" ]; then +# if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then +# invoke-rc.d ps-watcher stop || true +# else + /etc/init.d/ps-watcher stop && true +# fi fi From 8c1a633017b3919c4bc84655d77e31c544367207 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 4 Jul 2007 19:24:33 +0000 Subject: [PATCH 033/158] drop and use debhelper instead --- debian/prerm | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 debian/prerm diff --git a/debian/prerm b/debian/prerm deleted file mode 100644 index 7f0a70c..0000000 --- a/debian/prerm +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -set -e -if [ -x "/etc/init.d/ps-watcher" ]; then -# if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then -# invoke-rc.d ps-watcher stop || true -# else - /etc/init.d/ps-watcher stop && true -# fi -fi From 5360efdfa73628bd7aaf6878e41c798a36516c9c Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 4 Jul 2007 19:28:02 +0000 Subject: [PATCH 034/158] generate pidfile in some ugly way and drop use of killall --- debian/init.d | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/init.d b/debian/init.d index d3a3d2c..7f8da5f 100644 --- a/debian/init.d +++ b/debian/init.d @@ -61,22 +61,23 @@ case "$1" in echo -n "Starting $DESC: " start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ --exec $DAEMON -- -c $CONFIG --daemon $DAEMON_OPTS + ps aux | grep $DAEMON | head -1 | awk '{ print $2 }' > /var/run/$NAME.pid echo "$NAME." ;; stop) echo -n "Stopping $DESC: " #start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ # --exec $DAEMON - killall -9 $NAME echo "$NAME." ;; restart|force-reload) echo -n "Restarting $DESC: " - start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ + start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ --exec $DAEMON sleep 1 start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ --exec $DAEMON -- -c $CONFIG --daemon $DAEMON_OPTS + ps aux | grep $DAEMON | head -1 | awk '{ print $2 }' > /var/run/$NAME.pid echo "$NAME." ;; *) From 7836491e0d660baea96e68edfdbfbdae9dd79f51 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 4 Jul 2007 19:28:27 +0000 Subject: [PATCH 035/158] update changelog --- debian/changelog | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index a3ebeba..1d80be0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,10 @@ -ps-watcher (1.06-7~unreleased.1) unstable; urgency=low +ps-watcher (1.06-7) unstable; urgency=low * update copyright - * use native debhelper postinst script - * fix debhelper prerm script - * fix stop) in init script + * use native debhelper postinst and prerm script + * make start-stop-daemon working instead of using kill - -- Jan Wagner Thu, 8 Mar 2007 11:26:57 +0100 + -- Jan Wagner Wed, 4 Jul 2007 12:26:57 +0200 ps-watcher (1.06-6) unstable; urgency=medium From 6bb457582f5e0d74b6f73c7a07753c25c27bb22c Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 4 Jul 2007 19:33:56 +0000 Subject: [PATCH 036/158] drop handling of upstream code --- AUTHORS | 3 - COPYING | 340 ----- ChangeLog | 788 ---------- INSTALL | 182 --- Makefile.PL | 4 - Makefile.am | 62 - Makefile.in | 645 --------- NEWS | 91 -- README | 41 - THANKS | 29 - TODO | 12 - aclocal.m4 | 603 -------- config.guess | 1500 ------------------- config.sub | 1616 --------------------- configure | 3140 ---------------------------------------- configure.ac | 236 --- docs/Makefile.am | 40 - docs/Makefile.in | 374 ----- docs/ps-watcher.8 | 743 ---------- docs/ps-watcher.html | 764 ---------- install-sh | 250 ---- missing | 283 ---- mkinstalldirs | 40 - post-configure.in | 80 - ps-watcher | 1298 ----------------- ps-watcher.in.in | 1278 ---------------- samples/README | 10 - samples/port-watch.ini | 13 - samples/sample.ini | 54 - samples/sample2.ini | 4 - samples/solaris.ini | 18 - tests/01.pod.t | 9 - tests/01.pod.t.in | 9 - tests/Makefile.am | 38 - tests/Makefile.in | 332 ----- tests/args.cnf | 13 - tests/args.t | 38 - tests/args.t.in | 38 - tests/basic.cnf | 27 - tests/basic.cnf.in | 27 - tests/basic.t | 32 - tests/basic.t.in | 32 - tests/count.cnf | 12 - tests/count.t | 24 - tests/count.t.in | 24 - tests/driver | 48 - tests/full.cnf | 15 - tests/full.t | 34 - tests/full.t.in | 34 - tests/paction.cnf | 17 - tests/paction.t | 37 - touch.pl | 42 - 52 files changed, 15423 deletions(-) delete mode 100644 AUTHORS delete mode 100644 COPYING delete mode 100644 ChangeLog delete mode 100644 INSTALL delete mode 100755 Makefile.PL delete mode 100644 Makefile.am delete mode 100644 Makefile.in delete mode 100644 NEWS delete mode 100644 README delete mode 100644 THANKS delete mode 100644 TODO delete mode 100644 aclocal.m4 delete mode 100755 config.guess delete mode 100755 config.sub delete mode 100755 configure delete mode 100644 configure.ac delete mode 100644 docs/Makefile.am delete mode 100644 docs/Makefile.in delete mode 100644 docs/ps-watcher.8 delete mode 100644 docs/ps-watcher.html delete mode 100755 install-sh delete mode 100755 missing delete mode 100755 mkinstalldirs delete mode 100755 post-configure.in delete mode 100755 ps-watcher delete mode 100755 ps-watcher.in.in delete mode 100644 samples/README delete mode 100644 samples/port-watch.ini delete mode 100644 samples/sample.ini delete mode 100644 samples/sample2.ini delete mode 100644 samples/solaris.ini delete mode 100755 tests/01.pod.t delete mode 100644 tests/01.pod.t.in delete mode 100644 tests/Makefile.am delete mode 100644 tests/Makefile.in delete mode 100644 tests/args.cnf delete mode 100755 tests/args.t delete mode 100644 tests/args.t.in delete mode 100644 tests/basic.cnf delete mode 100644 tests/basic.cnf.in delete mode 100755 tests/basic.t delete mode 100755 tests/basic.t.in delete mode 100644 tests/count.cnf delete mode 100755 tests/count.t delete mode 100644 tests/count.t.in delete mode 100755 tests/driver delete mode 100644 tests/full.cnf delete mode 100755 tests/full.t delete mode 100644 tests/full.t.in delete mode 100644 tests/paction.cnf delete mode 100644 tests/paction.t delete mode 100755 touch.pl diff --git a/AUTHORS b/AUTHORS deleted file mode 100644 index 938f37d..0000000 --- a/AUTHORS +++ /dev/null @@ -1,3 +0,0 @@ -Rocky Bernstein - -# $Id: AUTHORS,v 1.2 2006/03/08 19:15:06 rockyb Exp $ diff --git a/COPYING b/COPYING deleted file mode 100644 index c4ac587..0000000 --- a/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - 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. - - - Copyright (C) 19yy - - 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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. - - , 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. diff --git a/ChangeLog b/ChangeLog deleted file mode 100644 index 6cb206e..0000000 --- a/ChangeLog +++ /dev/null @@ -1,788 +0,0 @@ -## -## autogenerated ChangeLog -- don't edit -## - -2006-03-10 Friday 19:33 Rocky Bernstein - - * NEWS: Last change before release - -2006-03-10 Friday 19:07 Rocky Bernstein - - * configure.ac, post-configure.in, ps-watcher.in.in, - tests/basic.t.in: Deal with time on netbsdelf and regression - tests. basic.t.in: generalize time handling - not just cygwin. - post-configure.in configure.ac: clean up a little. - -2006-03-10 Friday 13:12 Rocky Bernstein - - * tests/: args.t.in, basic.t.in, count.t.in, full.t.in: Run - ps-watcher in tests with configured Perl location. - -2006-03-10 Friday 12:47 Rocky Bernstein - - * tests/: full.cnf, full.t.in: Add a test and adjust for cygwin. - -2006-03-10 Friday 12:26 Rocky Bernstein - - * configure.ac, post-configure.in, ps-watcher.in.in, - tests/basic.t.in: Changes to make this work on more - architectures. configure.ac, post-configure.in: another attempt - to get invocation work eveywhere basic.t.in: test for cputime; - forgot ! - -2006-03-10 Friday 04:51 Rocky Bernstein - - * configure.ac: Darwin 8 is okay - -2006-03-10 Friday 04:50 Rocky Bernstein - - * configure.ac: Bug in running right Perl in post-configure - -2006-03-10 Friday 03:49 Rocky Bernstein - - * configure.ac, post-configure.in: Use PERL value specified more. - -2006-03-10 Friday 03:39 Rocky Bernstein - - * NEWS, configure.ac: Add configure option to specify Perl location - -2006-03-10 Friday 03:24 Rocky Bernstein - - * tests/args.t.in: typo: it's ok not okay. - -2006-03-10 Friday 03:21 Rocky Bernstein - - * configure.ac, ps-watcher.in.in, tests/args.t.in, - tests/basic.t.in, tests/full.t.in, tests/paction.t: Add minimal - cygwin support - -2006-03-09 Thursday 17:37 Rocky Bernstein - - * configure.ac, post-configure.in, tests/01.pod.t.in, - tests/Makefile.am: 01.pod.t.in: add POD testing routine - configure.ac: do chmod +x on perl-substituted files. - -2006-03-09 Thursday 16:46 Rocky Bernstein - - * NEWS, ps-watcher.in.in: Document security better. - -2006-03-08 Wednesday 22:52 Rocky Bernstein - - * configure.ac, ps-watcher.in.in, home-page/index.html: Get ready - for 1.06 release. - -2006-03-08 Wednesday 22:24 Rocky Bernstein - - * ps-watcher.in.in: Correction in getting signal name. - -2006-03-08 Wednesday 19:21 Rocky Bernstein - - * touch.pl: Reinstate since Makefile.am uses. - -2006-03-08 Wednesday 19:15 Rocky Bernstein - - * AUTHORS, Makefile.am, cvs2cl_usermap, post-configure.in, - ps-watcher.in.in, touch.pl: ps-watcher.in.in: Wasn't terminating - properly. Thanks to David G. Humes for noticing and fixing. - Modernize code a little bit - - *: rocky@panix.com -> rocky@cpan.org touch.pl: now handled inside - post-configure by Perl - -2006-02-03 Friday 02:23 Rocky Bernstein - - * ps-watcher.in.in: One more small typo. - -2006-02-03 Friday 02:15 Rocky Bernstein - - * post-configure.in, ps-watcher.in.in, home-page/index.html: Mostly - small changes: - - ps-watcher.in.in options are now stored in %opts. Some perlpod - grammar fixes. - - post-configure.in: Suggest "make && make check" (and not with - semicolon) - - home-page/index.html: Probably remove a W3C error. - -2006-01-17 Tuesday 10:00 Rocky Bernstein - - * home-page/index.html: Make valid HTML as per W3C. - -2005-10-12 Wednesday 01:14 Rocky Bernstein - - * ps-watcher.in.in, NEWS: Add BUGS section to manual to describe - common problems. - -2005-09-12 Monday 17:03 Rocky Bernstein - - * configure.ac: Now in 1.06cvs territory - -2005-09-12 Monday 17:03 Rocky Bernstein - - * ps-watcher.in.in: Guard against uninitialized variables - -2005-06-22 Wednesday 01:59 Rocky Bernstein - - * home-page/index.html: instead of ? - -2005-06-22 Wednesday 01:57 Rocky Bernstein - - * home-page/index.html: Correct grammar courtesy of Sir Monitor - Lizard, Ph. Mad. - -2005-05-17 Tuesday 22:00 Rocky Bernstein - - * NEWS: What's new. - -2005-05-17 Tuesday 09:56 Rocky Bernstein - - * configure.ac: NetBSD works like FreeBSD - -2005-05-17 Tuesday 09:52 Rocky Bernstein - - * COPYING, Makefile.am, NEWS, config.guess, config.sub, - configure.ac, missing, post-configure.in, docs/Makefile.am, - tests/Makefile.am: configure.ac: Darwin 7 is like Darwin5 & 6. - configure.ac, post-configure.in: check for at least perl 5.6 - - GPL address change. - -2005-04-09 Saturday 18:06 Rocky Bernstein - - * ps-watcher.in.in: Like this a tad better. - -2005-04-04 Monday 23:58 Rocky Bernstein - - * NEWS, ps-watcher.in.in: Note recent change. - -2005-04-04 Monday 23:53 Rocky Bernstein - - * THANKS: Add thanks to Iñaki Sánchez. - -2005-04-04 Monday 23:50 Rocky Bernstein - - * ps-watcher.in.in, tests/basic.cnf.in: Allow $ps_pat to be used in - action. Patch courtesy of Iñaki Sánchez. (i s a n c h e z at - unav dot es) - -2004-09-11 Saturday 13:29 Rocky Bernstein - - * docs/.cvsignore: More pod2htm stuff. - -2004-09-09 Thursday 10:58 Rocky Bernstein - - * NEWS, cvs2cl_header, cvs2cl_usermap: ChangeLog-creation - improvements. - -2004-09-07 Tuesday 13:51 Rocky Bernstein - - * Makefile.am, ps-watcher.in.in, docs/Makefile.am, - samples/port-watch.ini: Make distcheck works. Show how to use - $PROLOG to do a no-ps like thing such as watching a port (via - lsof). - -2004-05-26 Wednesday 13:46 Rocky Bernstein - - * ps-watcher.in.in: Small change. - -2004-05-26 Wednesday 13:42 Rocky Bernstein - - * Makefile.am, configure.ac, ps-watcher.in.in, docs/Makefile.am: - ps-watcher.in.in: smallish changes - call closelog on - termination, add prototype for pod_this(). - - docs/Makefile.am: ignore errors in building manual/html pages - - Makefile.am: target to create ChangeLog when building - distribution - - configure.ac: now in version 1.05 now. Allow maintainer mode (to - create ChangeLog) - -2004-02-15 Sunday 12:03 Rocky Bernstein - - * docs/Makefile.am: Set title to name without the .in. - -2004-01-18 Sunday 12:20 Rocky Bernstein - - * ps-watcher.in.in: Update copyright. - -2004-01-18 Sunday 11:49 Rocky Bernstein - - * ps-watcher.in.in: Improve documentation with respect to - perl-action. - -2004-01-15 Thursday 03:23 Rocky Bernstein - - * ps-watcher.in.in: perldoc fix. - -2004-01-15 Thursday 03:02 Rocky Bernstein - - * tests/paction.t: Regression test for $PROLOG, $EPILOG and - perl-action. - -2004-01-15 Thursday 03:00 Rocky Bernstein - - * configure.ac, ps-watcher.in.in, tests/Makefile.am, - tests/paction.cnf: Add $PROLOG, $EPILOG and perl-action sections. - Allows one to accumulate information over all processes and take - action on that. - -2004-01-10 Saturday 04:39 Rocky Bernstein - - * ps-watcher.in.in: Documentation enhancement, I think. - -2003-11-22 Saturday 12:31 Rocky Bernstein - - * ps-watcher.in.in: And another formatting change... - -2003-11-22 Saturday 12:27 Rocky Bernstein - - * ps-watcher.in.in: One more trivial typo.... - -2003-11-22 Saturday 12:26 Rocky Bernstein - - * ps-watcher.in.in: Documentation typo. - -2003-11-22 Saturday 12:01 Rocky Bernstein - - * NEWS, configure.ac: Get ready for new (minor) release. - -2003-11-21 Friday 02:36 Rocky Bernstein - - * ps-watcher.in.in, tests/basic.cnf.in, tests/basic.t.in: Add - first-trigger feature. - -2003-09-11 Thursday 03:17 Rocky Bernstein - - * NEWS: Get ready for a release. - -2003-09-10 Wednesday 07:30 Rocky Bernstein - - * ps-watcher.in.in: Fix example configuration as suggested in bug - #776229. - -2003-09-05 Friday 00:23 Rocky Bernstein - - * ps-watcher.in.in: More complicated trigger example suggested by - jason - -2003-09-03 Wednesday 02:04 Rocky Bernstein - - * ps-watcher.in.in: Add troubleshooting section - -2003-09-03 Wednesday 01:42 Rocky Bernstein - - * configure.ac, ps-watcher.in.in: Fixes for FreeBSD - -2003-08-31 Sunday 21:22 Rocky Bernstein - - * tests/basic.cnf.in: perhaps some processes use so little CPU that - the elapsed time will round to zero. Deal with it. - -2003-08-30 Saturday 20:49 Rocky Bernstein - - * ps-watcher.in.in: Update date. - -2003-08-29 Friday 10:49 Rocky Bernstein - - * configure.ac: Get ready for another release. - -2003-08-29 Friday 10:48 Rocky Bernstein - - * tests/: args.t.in, basic.t.in, count.t.in, full.t.in: Regression - tests need to deal with timestamped output. - -2003-08-29 Friday 10:47 Rocky Bernstein - - * ps-watcher.in.in: Add syslog-like timestamp to logfile output. - Problems with getting ps-output now appears only on debug output. - -2003-08-29 Friday 10:45 Rocky Bernstein - - * post-configure.in: Use -w (warning) on perl invocation - -2003-08-13 Wednesday 02:33 Rocky Bernstein - - * configure.ac: PS_CAN_RETURN_MULTIPLE_LINES not set on AIX which - broke it. - -2003-07-11 Friday 05:56 Rocky Bernstein - - * Makefile.am: Add sample files - -2003-07-11 Friday 05:47 Rocky Bernstein - - * configure.ac: typo - -2003-07-11 Friday 05:46 Rocky Bernstein - - * configure.ac: Get ready for 1.0 release. - -2003-07-11 Friday 05:43 Rocky Bernstein - - * Makefile.am, tests/Makefile.am, tests/args.t.in, - tests/count.t.in, tests/full.t.in: Make "make distcheck" work. - -2003-07-11 Friday 05:42 Rocky Bernstein - - * THANKS: Update as appropriate. - -2003-07-10 Thursday 12:20 Rocky Bernstein - - * configure.ac, post-configure.in: A tad better for making "make - distcheck" work: Use $srcdir in post-configure and arrange for - srcdir to be passed in. - -2003-07-10 Thursday 11:50 Rocky Bernstein - - * THANKS, TODO, config.cache, configure.ac, ps-watcher.in.in: Deal - with ps (e.g. Solaris's) which return more than one line for a - single pid. - -2003-07-10 Thursday 11:42 Rocky Bernstein - - * ps-watcher.in.in: Stupid mistake - comments are # not /* */. - -2003-05-19 Monday 16:33 Rocky Bernstein - - * configure.ac: Accomodate darwin6 - -2003-05-19 Monday 16:33 Rocky Bernstein - - * tests/args.t.in: Add one test of --nosyslog - -2003-05-19 Monday 15:58 Rocky Bernstein - - * configure.ac: Add AIX support. - -2003-05-16 Friday 00:12 Rocky Bernstein - - * README: IniConf is now called Config::IniFiles - -2003-03-06 Thursday 05:57 Rocky Bernstein - - * configure.ac: Failed full test. Need to add -x. - -2003-03-06 Thursday 05:48 Rocky Bernstein - - * tests/full.cnf: Don't assume first is pid 1! - -2003-03-06 Thursday 05:37 Rocky Bernstein - - * configure.ac, tests/Makefile.am, tests/.cvsignore, - tests/full.cnf, tests/full.t.in: Add test that we can trigger on - watching processes other than the ones under our account. - -2003-03-06 Thursday 03:54 Rocky Bernstein - - * Makefile.am, NEWS, config.guess, configure.ac, docs/Makefile.am, - tests/Makefile.am: Changes for Mac OS/X - -2003-03-04 Tuesday 18:01 Rocky Bernstein - - * aclocal.m4, docs/Makefile.am, tests/Makefile.in: Add more - automake conversion idioms - -2003-03-04 Tuesday 14:14 Rocky Bernstein - - * autogen.sh: Omitted running aclocal, autoconf, automake... - -2003-03-04 Tuesday 14:08 Rocky Bernstein - - * docs/: Makefile.am, Makefile.in: More automake conversion pains. - -2003-03-04 Tuesday 14:05 Rocky Bernstein - - * .cvsignore, MANIFEST: MANIFEST: not used in automake - -2003-03-04 Tuesday 14:03 Rocky Bernstein - - * NEWS, autogen.sh: autogen.sh: useful for CVS NEWS: what's been - happening? - -2003-03-04 Tuesday 13:59 Rocky Bernstein - - * Makefile.am, Makefile.in: More automake conversion work. - Makefile.am: forgot to add Makefile.PL. Makefile.in: superceded - by Makfile.am - -2003-03-04 Tuesday 13:55 Rocky Bernstein - - * AUTHORS, Makefile.am, Makefile.in, NEWS, aclocal.m4, version, - docs/Makefile.am, docs/Makefile.in, tests/Makefile.am, - tests/Makefile.in: Convert to use Makefile.am - -2003-03-04 Tuesday 02:53 Rocky Bernstein - - * configure.ac, ps-watcher.in.in, version, samples/sample.ini, - tests/args.cnf: Changes for BSD/OS. Also potentially a bug in - FreeBSD. - -2003-03-02 Sunday 16:35 Rocky Bernstein - - * ps-watcher.in.in: More small document changes. Make HTML come out - a tad better. - -2003-03-02 Sunday 15:28 Rocky Bernstein - - * ps-watcher.in.in: Update link for netwinder location! - -2003-03-01 Saturday 21:38 Rocky Bernstein - - * MANIFEST: Typo. - -2003-03-01 Saturday 21:37 Rocky Bernstein - - * NEWS: What's up. - -2003-03-01 Saturday 21:35 Rocky Bernstein - - * MANIFEST: Add Changelog - -2003-03-01 Saturday 21:23 Rocky Bernstein - - * samples/sample.ini: Add $args example. - -2003-03-01 Saturday 21:12 Rocky Bernstein - - * MANIFEST, configure.ac, ps-watcher.in.in: Add variables to - control what ps can do, e.g. can nuke header line, has custom - title (for nuking header line), what time variable we can test - on. - -2003-03-01 Saturday 21:09 Rocky Bernstein - - * tests/: .cvsignore, args.t.in, basic.cnf, basic.cnf.in: Don't - assume etime is a ps-variable. Thanks, FreeBSD. - -2003-03-01 Saturday 21:08 Rocky Bernstein - - * docs/Makefile.in: Cater to brain-dead make on FreeBSD. - -2003-02-28 Friday 16:45 Rocky Bernstein - - * MANIFEST, configure.ac: configure.ac: add freebsd4 check - MANIFEST: add args test files - -2003-02-28 Friday 13:37 Rocky Bernstein - - * config.sub: Update with more recent version of this. - -2003-02-28 Friday 12:34 Rocky Bernstein - - * tests/: .cvsignore, args.cnf, args.t.in: Add args regression - test. - -2003-02-28 Friday 12:33 Rocky Bernstein - - * configure.ac, ps-watcher.in.in, tests/Makefile.in, - tests/basic.cnf, tests/basic.t.in, tests/count.t.in: Add args - documentation and regression tests. count.t.in, basic.t.in: set - perl mode for emacs - -2003-02-27 Thursday 23:46 Rocky Bernstein - - * configure.ac, ps-watcher.in.in, version: Add $args variable to - test on entire command. Perpare to make into another version. - -2003-02-27 Thursday 21:21 Rocky Bernstein - - * configure.ac: Add args to the list of variables that are - accepted. - -2003-01-27 Monday 22:41 Rocky Bernstein - - * MANIFEST, configure.stamp, version: MANIFEST: configre.in -> - configure.ac Other files not sure about, but we'll try - initially... - -2003-01-27 Monday 22:37 Rocky Bernstein - - * configure.ac: Remove touch of stamp file. Dunno... - -2003-01-27 Monday 22:35 Rocky Bernstein - - * configure.ac: Bump version number. - -2003-01-27 Monday 22:34 Rocky Bernstein - - * Makefile.in, NEWS, configure.ac, configure.in, ps-watcher.in.in, - samples/sample.ini: Bug in running make dist. - - Small documentation bug in manual and HTML. Had @PROGRAM@ rather - than @PACKAGE@ so name of package was not in man/html. - - Give example where you want to match all processes except one. - - Print out errors in configuration file - - configure.in -> configure.ac (thanks, autoconf) - - Config::IniConf now gives a syntax error for empty section: []. - Change that. - -2002-10-03 Thursday 14:55 rocky - - * .cvsignore: Seems to be a new thing with autoconf. - -2002-10-03 Thursday 14:55 rocky - - * home-page/index.html: Changes to move to sourceforge project: - download/manpage locations changed. Add link to CVS! And add - sourceforge logo. - -2002-09-24 Tuesday 11:21 rocky - - * NEWS: Update as appropriate. - -2002-09-24 Tuesday 11:20 rocky - - * Makefile.in: Bug in running post-configure when doing a "make - dist". Add "perl" to command. - -2002-09-24 Tuesday 11:18 rocky - - * ps-watcher.in.in: Add example which shows excluding a process - from consideration. - -2002-09-24 Tuesday 11:00 rocky - - * .cvsignore: post-configure is derived. - -2002-09-24 Tuesday 10:59 rocky - - * post-configure.in: Things that need to be done after running - configure. In particular, rewrinte #!/bin/perl lines. - -2002-09-24 Tuesday 10:56 rocky - - * NEWS: Document small doc bug. Version is now 0.96 - -2002-09-24 Tuesday 10:54 rocky - - * ps-watcher.in.in: Document typo. Was using @PROGRAM@ instead of - @PACKAGE@. - -2002-02-06 Wednesday 04:55 rocky - - * MANIFEST: Now derived from post-configure.in - -2002-02-06 Wednesday 04:54 rocky - - * configure.in: Remove bsdstart -- space in it mess things up. - -2002-02-06 Wednesday 04:13 rocky - - * tests/basic.t.in: Turn into a derived file. - -2002-02-06 Wednesday 04:13 rocky - - * tests/: .cvsignore, count.t.in: .cvsignore: ignore derived tests - basic.t: is now derived count.t.in: new test - -2002-02-06 Wednesday 04:10 rocky - - * tests/count.cnf: count.cnf: test "none" and $count > 1 basic.cnf: - minor changes like cvs id line. - -2002-02-06 Wednesday 04:10 rocky - - * docs/Makefile.in: Makefile.in: migrating more to automake: use - @PACKAGE@ now. - -2002-02-06 Wednesday 04:09 rocky - - * Makefile.in, aclocal.m4, configure.in, missing, ps-watcher.in.in: - aclocal.m4 missing, Makefile: New files migrating more to - automake. ps-watcher.in.in: fix bug in "once" and "count > 1" - -2001-11-24 Saturday 19:03 rocky - - * home-page/index.html: Update location. - -2001-06-25 Monday 00:23 rocky - - * ps-watcher.in.in: Another example with count != 1 (syslogd) - changed to count > 4 (httpd). count != 1 may be confusing since - when count == 0 we don't trigger. - -2001-06-25 Monday 00:22 rocky - - * samples/sample.ini: Update to show occurs = none. syslogd - example was incorrect. Change to httpd. - -2001-06-25 Monday 00:20 rocky - - * tests/basic.cnf: Add test for when no matching process exists. - -2001-06-25 Monday 00:17 rocky - - * MANIFEST: Add NEWS - -2001-06-25 Monday 00:16 rocky - - * ps-watcher.in.in: Allow "occurs = none" to fire if no processes - exist. Update Copyright too. - -2001-05-31 Thursday 16:24 rocky - - * tests/basic.cnf: looks like [] is no longer valid. - -2000-09-02 Saturday 18:51 rocky - - * ps-watcher.in.in: Comment backtick problem - -2000-09-02 Saturday 18:43 rocky - - * ps-watcher.in.in: Hopefully this time we've fixed the backtick - problem in a process name. - - Improve description section of doc. - -2000-09-02 Saturday 04:07 rocky - - * ps-watcher.in.in: Add --doc option to print text documentation. - Escape backticks in process names - -2000-04-10 Monday 12:17 rocky - - * home-page/index.html: Initial cut. - -2000-04-09 Sunday 22:43 rocky - - * THANKS: Out of babblefish. - -2000-04-09 Sunday 22:25 rocky - - * THANKS: Correct from pecarry-speak. - -2000-04-09 Sunday 22:06 rocky - - * README: This time for sure? - -2000-04-09 Sunday 22:02 rocky - - * ps-watcher.in.in: Add blank line after =pod for brain-dead - Red-Hat 6.1's brain-deat pod2man program. - -2000-04-09 Sunday 21:58 rocky - - * README: Change invocation example. - -2000-04-09 Sunday 20:40 rocky - - * samples/README: Correct file names. Add Id line. - -2000-04-09 Sunday 20:39 rocky - - * samples/sample.ini: Add Id line. - -2000-04-09 Sunday 20:37 rocky - - * samples/README: Document what each sample does. - -2000-04-09 Sunday 20:37 rocky - - * docs/Makefile.in: Makefile.in: add uninstall. - -2000-04-09 Sunday 20:36 rocky - - * Makefile.in, ps-watcher.in.in: Makefile.in: add uninstall. - post-configure: remove Open3 module check ps-watcher.in.in: Lots - of doc changes. Usage on finding no config file. - -2000-04-09 Sunday 20:25 rocky - - * README: Add quick instructions. Correct mistakes. - -2000-04-09 Sunday 20:13 rocky - - * MANIFEST: Add samples readme. - -2000-03-27 Monday 01:54 rocky - - * tests/.cvsignore: Guess we gotta add this one too. - -2000-03-27 Monday 01:53 rocky - - * tests/: Makefile.in, basic.cnf, driver: Now have some basic - tests. - -2000-03-27 Monday 01:51 rocky - - * .cvsignore, MANIFEST, Makefile.in, ps-watcher.in.in: MANIFEST: - it's a Perl thing. But probably a good idea Makefile.in now uses - it ps-watcher.in.in: remove uninitialized variables in - elapsed2secs - -2000-03-22 Wednesday 07:11 rocky - - * samples/sample.ini: Simple first. - -2000-03-22 Wednesday 07:09 rocky - - * samples/sample.ini: Show off more features. - -2000-03-22 Wednesday 07:08 rocky - - * Makefile.in, TODO, configure.in, ps-watcher.in.in: Makefile.in: - Deal with .in.in TODO: remove done things. Add others - (regresssion tests) ps-watcher.in.in: Add signal handling and - stating configuration file As is usual lots of doc changes. - -2000-03-21 Tuesday 03:20 rocky - - * Makefile.PL: To aid perl to GNU factions. - -2000-03-21 Tuesday 03:17 rocky - - * samples/: sample2.ini, solaris.ini: sampl2.ini: change for Linux. - -2000-03-21 Tuesday 03:16 rocky - - * docs/Makefile.in: Don't need L<> warning any more. - -2000-03-21 Tuesday 03:15 rocky - - * TODO, config.cache, configure.in, ps-watcher.in.in: - post-configure with IniConf version 0.97. ps-watcher.in.in - - many small changes for Linux ps output one token max (no - command) if no ps output skip to next line (ignore terminated - processes) - -2000-03-21 Tuesday 02:23 rocky - - * Makefile.in: Make dist works. Get config.guess, config.sub and - @PROGRAM@.in.in - -2000-03-20 Monday 16:14 rocky - - * configure.in: Add Linux stuff and tests/Makefile - -2000-03-20 Monday 16:12 rocky - - * ps-watcher.in.in: Doc changes. - -2000-03-20 Monday 15:43 rocky - - * configure.in: Substitute in PROGRAM. - -2000-03-20 Monday 09:58 root - - * Makefile.in, README, configure.in, ANNOUNCE, COPYING, INSTALL, - THANKS, TODO, config.cache, config.guess, config.sub, install-sh, - mkinstalldirs, ps-watcher.in.in, touch.pl, docs/Makefile.in, - samples/sample.ini, samples/sample2.ini, samples/solaris.ini: - Imported sources - -2000-03-20 Monday 09:58 root - - * Makefile.in, README, configure.in, ANNOUNCE, COPYING, INSTALL, - THANKS, TODO, config.cache, config.guess, config.sub, install-sh, - mkinstalldirs, ps-watcher.in.in, touch.pl, docs/Makefile.in, - samples/sample.ini, samples/sample2.ini, samples/solaris.ini: - Initial revision - diff --git a/INSTALL b/INSTALL deleted file mode 100644 index b42a17a..0000000 --- a/INSTALL +++ /dev/null @@ -1,182 +0,0 @@ -Basic Installation -================== - - These are generic installation instructions. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, a file -`config.cache' that saves the results of its tests to speed up -reconfiguring, and a file `config.log' containing compiler output -(useful mainly for debugging `configure'). - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If at some point `config.cache' -contains results you don't want to keep, you may remove or edit it. - - The file `configure.in' is used to create `configure' by a program -called `autoconf'. You only need `configure.in' if you want to change -it or regenerate `configure' using a newer version of `autoconf'. - -The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. - - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package. - - 4. Type `make install' to install the programs and any data files and - documentation. - - 5. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - -Compilers and Options -===================== - - Some systems require unusual options for compilation or linking that -the `configure' script does not know about. You can give `configure' -initial values for variables by setting them in the environment. Using -a Bourne-compatible shell, you can do that on the command line like -this: - CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure - -Or on systems that have the `env' program, you can do it like this: - env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure - -Compiling For Multiple Architectures -==================================== - - You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. - - If you have to use a `make' that does not supports the `VPATH' -variable, you have to compile the package for one architecture at a time -in the source code directory. After you have installed the package for -one architecture, use `make distclean' before reconfiguring for another -architecture. - -Installation Names -================== - - By default, `make install' will install the package's files in -`/usr/local/bin', `/usr/local/man', etc. You can specify an -installation prefix other than `/usr/local' by giving `configure' the -option `--prefix=PATH'. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -give `configure' the option `--exec-prefix=PATH', the package will use -PATH as the prefix for installing programs and libraries. -Documentation and other data files will still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=PATH' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - -Optional Features -================= - - Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - -Specifying the System Type -========================== - - There may be some features `configure' can not figure out -automatically, but needs to determine by the type of host the package -will run on. Usually `configure' can figure that out, but if it prints -a message saying it can not guess the host type, give it the -`--host=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name with three fields: - CPU-COMPANY-SYSTEM - -See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the host type. - - If you are building compiler tools for cross-compiling, you can also -use the `--target=TYPE' option to select the type of system they will -produce code for and the `--build=TYPE' option to select the type of -system on which you are compiling the package. - -Sharing Defaults -================ - - If you want to set default values for `configure' scripts to share, -you can create a site shell script called `config.site' that gives -default values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Operation Controls -================== - - `configure' recognizes the following options to control how it -operates. - -`--cache-file=FILE' - Use and save the results of the tests in FILE instead of - `./config.cache'. Set FILE to `/dev/null' to disable caching, for - debugging `configure'. - -`--help' - Print a summary of the options to `configure', and exit. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`--version' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`configure' also accepts some other, not widely useful, options. diff --git a/Makefile.PL b/Makefile.PL deleted file mode 100755 index a71d15e..0000000 --- a/Makefile.PL +++ /dev/null @@ -1,4 +0,0 @@ -#/usr/bin/perl -print "Got'cha! This program uses ./configure.\n"; -print "Just a moment while I transfer your call...\n"; -exec "./configure"; diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index 594bf1e..0000000 --- a/Makefile.am +++ /dev/null @@ -1,62 +0,0 @@ -############################################################################## -# $Id: Makefile.am,v 1.12 2006/03/09 17:38:14 rockyb Exp $ -# Copyright (C) 2003, 2004, 2006 Rocky Bernstein -# 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., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301 USA -############################################################################## - -SUBDIRS = docs tests -noinst_SCRIPTS = post-configure.in touch.pl -EXTRA_DIST = post-configure.in ps-watcher.in.in ps-watcher \ - touch.pl Makefile.PL \ - samples/README samples/sample.ini samples/sample2.ini \ - samples/port-watch.ini samples/solaris.ini -bin_SCRIPTS = ps-watcher -PERL = @PERL@ - -DISTCLEANFILES = ps-watcher ps-watcher.stamp - - -# The keeps automake from substituting PS_VARS -PS_VARS = '' - -# Build all forms of documentation: manual-pages and HTML -test: - echo "Checking that things work.."; \ - (cd tests && $(PERL) ./driver) - -# A timestamp file is used to record whether or not we've created -# $(PROGRAM) from $(PROGRAM).in. During debugging if is often more -# convenient to modify $(PROGRAM) rather than $(PROGRAM).in. -$(PACKAGE).stamp: $(PACKAGE) - @cp -p $(PACKAGE) $(PACKAGE).in ; \ - $(srcdir)/touch.pl $@ - -# cvs2cl -MAINTAINERCLEANFILES = ChangeLog - -if MAINTAINER_MODE - -.PHONY: ChangeLog -ChangeLog: - $(CVS2CL) -W 450 --header $(srcdir)/cvs2cl_header --utc -w -I ChangeLog --usermap $(srcdir)/cvs2cl_usermap -P - -ACLOCAL_AMFLAGS=-I . - -endif - - - - diff --git a/Makefile.in b/Makefile.in deleted file mode 100644 index 8272b6d..0000000 --- a/Makefile.in +++ /dev/null @@ -1,645 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 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@ - -############################################################################## -# $Id: Makefile.am,v 1.12 2006/03/09 17:38:14 rockyb Exp $ -# Copyright (C) 2003, 2004, 2006 Rocky Bernstein -# 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., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301 USA -############################################################################## - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = . -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -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@ -DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/post-configure.in \ - $(srcdir)/ps-watcher.in.in $(top_srcdir)/configure AUTHORS \ - COPYING ChangeLog INSTALL NEWS THANKS TODO config.guess \ - config.sub install-sh missing mkinstalldirs -subdir = . -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(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 configure.status.lineno -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_CLEAN_FILES = post-configure ps-watcher.in ps-watcher -am__installdirs = "$(DESTDIR)$(bindir)" -binSCRIPT_INSTALL = $(INSTALL_SCRIPT) -SCRIPTS = $(bin_SCRIPTS) $(noinst_SCRIPTS) -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-exec-recursive install-info-recursive \ - install-recursive installcheck-recursive installdirs-recursive \ - pdf-recursive ps-recursive uninstall-info-recursive \ - uninstall-recursive -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); }; } -DIST_ARCHIVES = $(distdir).tar.gz -GZIP_ENV = --best -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CVS2CL = @CVS2CL@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ -MAKEINFO = @MAKEINFO@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PERL = @PERL@ -PS = @PS@ -PS_ARGS = @PS_ARGS@ -PS_ARGS_FMT = @PS_ARGS_FMT@ -PS_CAN_RETURN_MULTIPLE_LINES = @PS_CAN_RETURN_MULTIPLE_LINES@ -PS_CUSTOM_HEADER = @PS_CUSTOM_HEADER@ -PS_FULLCMD_FMT = @PS_FULLCMD_FMT@ -PS_NO_NULL_HEADER = @PS_NO_NULL_HEADER@ -PS_PID_OPTS = @PS_PID_OPTS@ -PS_TIME_VAR = @PS_TIME_VAR@ - -# The keeps automake from substituting PS_VARS -PS_VARS = '' -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__leading_dot = @am__leading_dot@ -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@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -SUBDIRS = docs tests -noinst_SCRIPTS = post-configure.in touch.pl -EXTRA_DIST = post-configure.in ps-watcher.in.in ps-watcher \ - touch.pl Makefile.PL \ - samples/README samples/sample.ini samples/sample2.ini \ - samples/port-watch.ini samples/solaris.ini - -bin_SCRIPTS = ps-watcher -DISTCLEANFILES = ps-watcher ps-watcher.stamp - -# cvs2cl -MAINTAINERCLEANFILES = ChangeLog -@MAINTAINER_MODE_TRUE@ACLOCAL_AMFLAGS = -I . -all: all-recursive - -.SUFFIXES: -am--refresh: - @: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ - cd $(srcdir) && $(AUTOMAKE) --gnu \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu 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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -post-configure: $(top_builddir)/config.status $(srcdir)/post-configure.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -ps-watcher.in: $(top_builddir)/config.status $(srcdir)/ps-watcher.in.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -ps-watcher: $(top_builddir)/config.status ps-watcher.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -install-binSCRIPTS: $(bin_SCRIPTS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" - @list='$(bin_SCRIPTS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - if test -f $$d$$p; then \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ - else :; fi; \ - done - -uninstall-binSCRIPTS: - @$(NORMAL_UNINSTALL) - @list='$(bin_SCRIPTS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done -uninstall-info-am: - -# 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): - @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; \ - (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" - -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: - @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; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (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; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - 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 || \ - tags="$$tags $$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; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - 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; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - $(am__remove_distdir) - mkdir $(distdir) - $(mkdir_p) $(distdir)/. $(distdir)/samples $(distdir)/tests - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$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; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - distdir) \ - || exit 1; \ - fi; \ - done - -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -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 $(SHELL) $(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-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) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(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) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(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) - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && 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 - $(am__remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' -distuninstallcheck: - @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 $(SCRIPTS) -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 -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -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 - -info: info-recursive - -info-am: - -install-data-am: - -install-exec-am: install-binSCRIPTS - -install-info: install-info-recursive - -install-man: - -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: uninstall-binSCRIPTS uninstall-info-am - -uninstall-info: uninstall-info-recursive - -.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ - check-am clean clean-generic clean-recursive ctags \ - ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \ - dist-tarZ dist-zip distcheck distclean distclean-generic \ - distclean-recursive distclean-tags distcleancheck distdir \ - distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am install-binSCRIPTS install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic maintainer-clean-recursive \ - mostlyclean mostlyclean-generic mostlyclean-recursive pdf \ - pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ - uninstall-binSCRIPTS uninstall-info-am - - -# Build all forms of documentation: manual-pages and HTML -test: - echo "Checking that things work.."; \ - (cd tests && $(PERL) ./driver) - -# A timestamp file is used to record whether or not we've created -# $(PROGRAM) from $(PROGRAM).in. During debugging if is often more -# convenient to modify $(PROGRAM) rather than $(PROGRAM).in. -$(PACKAGE).stamp: $(PACKAGE) - @cp -p $(PACKAGE) $(PACKAGE).in ; \ - $(srcdir)/touch.pl $@ - -@MAINTAINER_MODE_TRUE@.PHONY: ChangeLog -@MAINTAINER_MODE_TRUE@ChangeLog: -@MAINTAINER_MODE_TRUE@ $(CVS2CL) -W 450 --header $(srcdir)/cvs2cl_header --utc -w -I ChangeLog --usermap $(srcdir)/cvs2cl_usermap -P -# 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: diff --git a/NEWS b/NEWS deleted file mode 100644 index f0d0709..0000000 --- a/NEWS +++ /dev/null @@ -1,91 +0,0 @@ -Changes from 1.05 to 1.06 (March 10, 2006) - -- Add minimal cygwin support; go over NetBSD and OpenBSD support - -- Add --path option to specify path used in running commands - -- ps-watcher wasn't terminating properly when given a signal. Thanks - to David G. Humes for noticing and fixing. - -- Modernize code a little bit. - -- Guard against unintialized variable conf_time - -- Add BUGS section to manual to describe common problems. - -- Add configure option to specify Perl location - - -Changes from 1.04 to 1.05 (May 18, 2005) - -- Allow $ps_pat to be used in an action. -- Show how to use PROLOG to do non-ps-like things such as watching a - port (via lsof). -- OS tweeks: NetBSD works like FreeBSD, Darwin 7 works. - -Changes from 1.03 to 1.04 (Jan 18, 2004) - -- Add $PROLOG, $EPILOG and perl-action sections. Allows one to - accumulate information over all processes and take action on that. - -- ps-variable order in GNU/Linux was changed to ensure that single-token - attributes don't get messed up by multiple-token attributes. - -Changes from 1.02 to 1.03 (Nov 22, 2003) - -- Add occurs=first-trigger to stop after first trigger rather than first - pattern match. - -Changes from 1.01 to 1.02 (Sept 10, 2003) - Small bug fixes/feature enhancements and documentation fixes. - -Changes from 1.0 to 1.01 (Aug 21, 2003) - -- Log output (not syslog) now contains timestamp, program and process name - -- Errors concerning getting ps information logged only at debug levels - -- Add -w to perl invocation. - -Changes from 0.99 to 1.0 (Jul 10, 2003) - Provision for ps returning multiple lines of output. (Solaris does this for - LWP processes) - make "make distcheck" work. - -Changes from 0.98 to 0.99: (May 19, 2003) - Add AIX support, accomodate Darwin6. - -Changes from 0.97 to 0.98: (Mar 5, 2003) - Works now on BSD/OS and Mac OS/X - Bug fix for FreeBSD. - Convert to use automake - -Changes from 0.96 to 0.97: (Mar 1, 2003) - Portablity fixes - Now runs on FreeBSD. - Tested on the sourceforge compile farm. - Add $args variable to be able to use full ps command. Useful for working - with scripts that list the interpreter rather than the script name. - -Changes from 0.95 to 0.96: - Bug in running make dist. - - Small documentation bug in manual and HTML. Had @PROGRAM@ rather than - @PACKAGE@ so name of package was not in man/html. - - Give example where you want to match all processes except one. - - Print out errors in configuration file - - configure.in -> configure.ac (thanks, autoconf) - - Config::IniConf now gives a syntax error for empty section: []. - Change that. - - -Changes 0.93 - 0.95 - -Make "occurs = none" mean to run if there are no matching ps processes. - -ps-watcher 0.93 -- first general release. - -$Id: NEWS,v 1.27 2006/03/10 19:33:59 rockyb Exp $ diff --git a/README b/README deleted file mode 100644 index ddcecb9..0000000 --- a/README +++ /dev/null @@ -1,41 +0,0 @@ -This directory holds the distribution for ps-watcher, a program for -montoring a system via ps-like commands. - -Short instructions. Type: - cd ps-watcher-* - make - -If make fails you probably need to get IniConf. It it works then... - - ./ps-watcher --nosyslog --log --config ./samples/sample.ini - -Read the documentation to understand what you did. - ----- - -Documentation is in docs directory. - -All of the source code is covered by the GNU GENERAL PUBLIC -LICENSE. See COPYING for details on this. - -To use the program you will need Perl version 5.003 or greater -installed and the following modules: - - Sys::Syslog - File::Basename - Config::IniFiles - Getopt::Long - -The only one of these that is not part of the core Perl distribution -is Config::IniFiles which can be found at: - -http://www.cpan.org/modules/by-module/Config/ - -In order to run the program you'll need a configuration file to -use. Some samples configuration files can be found in the samples -directory. See the README in that directory for a description of -what the configuration files do. - -See INSTALL for generic GNU configure instructions. - -$Id: README,v 1.7 2003/05/16 00:12:59 rockyb Exp $ diff --git a/THANKS b/THANKS deleted file mode 100644 index 3243bdf..0000000 --- a/THANKS +++ /dev/null @@ -1,29 +0,0 @@ -Thanks to various people I worked with at the Associated Press who -have made suggestions. - -This program uses Config::IniFiles (originally called IniConf). Thus -thanks are due to Scott Hutton. Rich Bowen (rbowen@rcbowen.com) now -maintains Config::IniFiles and incorporated my changes to the program that -allow regular expressions to be specified in "section" heads. - -Dave Humes - reporting regression between 1.04 and 1.05 in termination -code and why. - -James R Grinter suggested and provided code to allow the -program to fire when no matching processes (e.g. when a process that -should be running has died). - -Thanks to Jason Welsh for helping to track down -a Solaris problem where ps returned multiple lines of output. - -Thanks to Iñaki Sánchez for the patch that allows one to use $ps_pat in -the action statement. - -Musicological supervision by Stuart Frankel , -cutrate Ph.D. - -$Id: THANKS,v 1.8 2006/03/08 19:17:33 rockyb Exp $ - - - - diff --git a/TODO b/TODO deleted file mode 100644 index 6e5268b..0000000 --- a/TODO +++ /dev/null @@ -1,12 +0,0 @@ -AIX and Linux ps allow custom output lines which means we can enclose -fields in quotes and thus allow variables which have embedded -blanks. Should make use of that. - -For now we only can handle one configuration file. Should allow many. - -Use IPC::Open3? -- it preserves STDERR and STDOUT. Backtick (`cmd`) -doesn't seem to. - -Add more regression tests. - -$Id: TODO,v 1.7 2003/07/10 11:50:21 rockyb Exp $ diff --git a/aclocal.m4 b/aclocal.m4 deleted file mode 100644 index bd3efda..0000000 --- a/aclocal.m4 +++ /dev/null @@ -1,603 +0,0 @@ -# generated automatically by aclocal 1.9.6 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# 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. - -# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION so it can be traced. -# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], - [AM_AUTOMAKE_VERSION([1.9.6])]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 7 - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE]) -AC_SUBST([$1_FALSE]) -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# Do all the work for Automake. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 12 - -# This macro actually does too much. Some checks are only needed if -# your package does certain things. But this isn't really a big deal. - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.58])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -# test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) -AM_PROG_INSTALL_SH -AM_PROG_INSTALL_STRIP -AC_REQUIRE([AM_PROG_MKDIR_P])dnl -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl -]) -]) - - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $1 | $1:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -install_sh=${install_sh-"$am_aux_dir/install-sh"} -AC_SUBST(install_sh)]) - -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- -# From Jim Meyering - -# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 - -AC_DEFUN([AM_MAINTAINER_MODE], -[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) - dnl maintainer-mode is disabled by default - AC_ARG_ENABLE(maintainer-mode, -[ --enable-maintainer-mode enable make rules and dependencies not useful - (and sometimes confusing) to the casual installer], - USE_MAINTAINER_MODE=$enableval, - USE_MAINTAINER_MODE=no) - AC_MSG_RESULT([$USE_MAINTAINER_MODE]) - AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) - MAINT=$MAINTAINER_MODE_TRUE - AC_SUBST(MAINT)dnl -] -) - -AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) -fi -]) - -# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_MKDIR_P -# --------------- -# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. -# -# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories -# created by `make install' are always world readable, even if the -# installer happens to have an overly restrictive umask (e.g. 077). -# This was a mistake. There are at least two reasons why we must not -# use `-m 0755': -# - it causes special bits like SGID to be ignored, -# - it may be too restrictive (some setups expect 775 directories). -# -# Do not use -m 0755 and let people choose whatever they expect by -# setting umask. -# -# We cannot accept any implementation of `mkdir' that recognizes `-p'. -# Some implementations (such as Solaris 8's) are not thread-safe: if a -# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' -# concurrently, both version can detect that a/ is missing, but only -# one can create it and the other will error out. Consequently we -# restrict ourselves to GNU make (using the --version option ensures -# this.) -AC_DEFUN([AM_PROG_MKDIR_P], -[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - # We used to keeping the `.' as first argument, in order to - # allow $(mkdir_p) to be used without argument. As in - # $(mkdir_p) $(somedir) - # where $(somedir) is conditionally defined. However this is wrong - # for two reasons: - # 1. if the package is installed by a user who cannot write `.' - # make install will fail, - # 2. the above comment should most certainly read - # $(mkdir_p) $(DESTDIR)$(somedir) - # so it does not work when $(somedir) is undefined and - # $(DESTDIR) is not. - # To support the latter case, we have to write - # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), - # so the `.' trick is pointless. - mkdir_p='mkdir -p --' -else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - for d in ./-p ./--version; - do - test -d $d && rmdir $d - done - # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. - if test -f "$ac_aux_dir/mkinstalldirs"; then - mkdir_p='$(mkinstalldirs)' - else - mkdir_p='$(install_sh) -d' - fi -fi -AC_SUBST([mkdir_p])]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 3 - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# ------------------------------ -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) - -# _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT(yes)]) - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_STRIP -# --------------------- -# One issue with vendor `install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Check how to create a tarball. -*- Autoconf -*- - -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# _AM_PROG_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# Substitute a variable $(am__untar) that extract such -# a tarball read from stdin. -# $(am__untar) < result.tar -AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) -m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir - -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR - diff --git a/config.guess b/config.guess deleted file mode 100755 index 396482d..0000000 --- a/config.guess +++ /dev/null @@ -1,1500 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. - -timestamp='2006-07-02' - -# This file 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., 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 Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[45]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep __LP64__ >/dev/null - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - i*:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - x86:Interix*:[3456]*) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - EM64T:Interix*:[3456]*) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - arm*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/config.sub b/config.sub deleted file mode 100755 index fab0aa3..0000000 --- a/config.sub +++ /dev/null @@ -1,1616 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. - -timestamp='2006-09-20' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file 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., 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. - - -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) - os= - basic_machine=$1 - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64vr | mips64vrel \ - | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | mt \ - | msp430 \ - | nios | nios2 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | score \ - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ - | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tron-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa-* \ - | ymp-* \ - | z8k-*) - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16c) - basic_machine=cr16c-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/configure b/configure deleted file mode 100755 index c895b65..0000000 --- a/configure +++ /dev/null @@ -1,3140 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59. -# -# Copyright (C) 2003 Free Software Foundation, Inc. -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix -fi -DUALCASE=1; export DUALCASE # for MKS sh - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var - fi -done - -# Required to use basename. -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 - - -# Name of the executable. -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'` - - -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | - sed ' - N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, - t loop - s,-$,, - s,^['$as_cr_digits']*\n,, - ' >$as_me.lineno && - chmod +x $as_me.lineno || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno - # Exit status is that of the last command. - exit -} - - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac - -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.file - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_executable_p="test -f" - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - - -# Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -exec 6>&1 - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_config_libobj_dir=. -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} - -# Maximum number of lines to put in a shell here document. -# This variable seems obsolete. It should probably be removed, and -# only ac_max_sed_lines should be used. -: ${ac_max_here_lines=38} - -# Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= - -ac_unique_file="ps-watcher.in.in" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CVS2CL MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os LN_S PERL PS PS_ARGS PS_ARGS_FMT PS_FULLCMD_FMT PS_NO_NULL_HEADER PS_CAN_RETURN_MULTIPLE_LINES PS_CUSTOM_HEADER PS_PID_OPTS PS_TIME_VAR PS_VARS LIBOBJS LTLIBOBJS' -ac_subst_files='' - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' -includedir='${prefix}/include' -oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -ac_prev= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" - ac_prev= - continue - fi - - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_option in - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; - - -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "enable_$ac_feature='$ac_optarg'" ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "with_$ac_package='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/-/_/g'` - eval "with_$ac_package=no" ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) { echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$ac_envvar='$ac_optarg'" - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } -fi - -# Be sure to have absolute paths. -for ac_var in exec_prefix prefix -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_confdir=`(dirname "$0") 2>/dev/null || -$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 - { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } - fi -fi -(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 - { (exit 1); exit 1; }; } -srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -ac_env_build_alias_set=${build_alias+set} -ac_env_build_alias_value=$build_alias -ac_cv_env_build_alias_set=${build_alias+set} -ac_cv_env_build_alias_value=$build_alias -ac_env_host_alias_set=${host_alias+set} -ac_env_host_alias_value=$host_alias -ac_cv_env_host_alias_set=${host_alias+set} -ac_cv_env_host_alias_value=$host_alias -ac_env_target_alias_set=${target_alias+set} -ac_env_target_alias_value=$target_alias -ac_cv_env_target_alias_set=${target_alias+set} -ac_cv_env_target_alias_value=$target_alias - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures this package to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -_ACEOF - - cat <<_ACEOF -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - - cat <<\_ACEOF - -Optional Features: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-maintainer-mode enable make rules and dependencies not useful - (and sometimes confusing) to the casual installer - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-perl set path to Perl - -_ACEOF -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - ac_popdir=`pwd` - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d $ac_dir || continue - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi - -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_srcdir/configure.gnu; then - echo - $SHELL $ac_srcdir/configure.gnu --help=recursive - elif test -f $ac_srcdir/configure; then - echo - $SHELL $ac_srcdir/configure --help=recursive - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help - else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir - done -fi - -test -n "$ac_init_help" && exit 0 -if $ac_init_version; then - cat <<\_ACEOF - -Copyright (C) 2003 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit 0 -fi -exec 5>config.log -cat >&5 <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was - - $ $0 $@ - -_ACEOF -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -hostinfo = `(hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" -done - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_sep= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; - 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " - ;; - esac - done -done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - cat <<\_ASBOX -## ---------------- ## -## Cache variables. ## -## ---------------- ## -_ASBOX - echo - # The following way of writing the cache mishandles newlines in values, -{ - (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) - sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; - *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" - ;; - esac; -} - echo - - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" - done | sort - echo - - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" - done | sort - echo - fi - - if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## -## confdefs.h. ## -## ----------- ## -_ASBOX - echo - sed "/^$/d" confdefs.h | sort - echo - fi - test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status - ' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; - esac - fi -else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" - eval ac_new_val="\$ac_env_${ac_var}_value" - case $ac_old_set,$ac_new_set in - set,) - { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 -echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - - - - - - - - - - - - - - - - -am__api_version="1.9" -ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f $ac_dir/shtool; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 -echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} - { (exit 1); exit 1; }; } -fi -ac_config_guess="$SHELL $ac_aux_dir/config.guess" -ac_config_sub="$SHELL $ac_aux_dir/config.sub" -ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - done - done - ;; -esac -done - - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL=$ac_install_sh - fi -fi -echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6 - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -echo "$as_me:$LINENO: checking whether build environment is sane" >&5 -echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 -# Just in case -sleep 1 -echo timestamp > conftest.file -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&5 -echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&2;} - { (exit 1); exit 1; }; } - fi - - test "$2" = conftest.file - ) -then - # Ok. - : -else - { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! -Check your system clock" >&5 -echo "$as_me: error: newly created file is older than distributed files! -Check your system clock" >&2;} - { (exit 1); exit 1; }; } -fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -test "$program_prefix" != NONE && - program_transform_name="s,^,$program_prefix,;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s,\$,$program_suffix,;$program_transform_name" -# Double any \ or $. echo might interpret backslashes. -# By default was `s,x,x', remove it if useless. -cat <<\_ACEOF >conftest.sed -s/[\\$]/&&/g;s/;s,x,x,$// -_ACEOF -program_transform_name=`echo $program_transform_name | sed -f conftest.sed` -rm conftest.sed - -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` - -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 -echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} -fi - -if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - # We used to keeping the `.' as first argument, in order to - # allow $(mkdir_p) to be used without argument. As in - # $(mkdir_p) $(somedir) - # where $(somedir) is conditionally defined. However this is wrong - # for two reasons: - # 1. if the package is installed by a user who cannot write `.' - # make install will fail, - # 2. the above comment should most certainly read - # $(mkdir_p) $(DESTDIR)$(somedir) - # so it does not work when $(somedir) is undefined and - # $(DESTDIR) is not. - # To support the latter case, we have to write - # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), - # so the `.' trick is pointless. - mkdir_p='mkdir -p --' -else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - for d in ./-p ./--version; - do - test -d $d && rmdir $d - done - # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. - if test -f "$ac_aux_dir/mkinstalldirs"; then - mkdir_p='$(mkinstalldirs)' - else - mkdir_p='$(install_sh) -d' - fi -fi - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_AWK+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AWK="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - echo "$as_me:$LINENO: result: $AWK" >&5 -echo "${ECHO_T}$AWK" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$AWK" && break -done - -echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.make <<\_ACEOF -all: - @echo 'ac_maketemp="$(MAKE)"' -_ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` -if test -n "$ac_maketemp"; then - eval ac_cv_prog_make_${ac_make}_set=yes -else - eval ac_cv_prog_make_${ac_make}_set=no -fi -rm -f conftest.make -fi -if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - SET_MAKE= -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -# test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 -echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} - { (exit 1); exit 1; }; } -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE=ps-watcher - VERSION=1.06 - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -install_sh=${install_sh-"$am_aux_dir/install-sh"} - -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -echo "${ECHO_T}$ac_ct_STRIP" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - STRIP=$ac_ct_STRIP -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" - -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. - -AMTAR=${AMTAR-"${am_missing_run}tar"} - -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' - - - - - - - -CVS2CL=${CVS2CL-"${am_missing_run}cvs2cl"} - -echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 -echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 - # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. -if test "${enable_maintainer_mode+set}" = set; then - enableval="$enable_maintainer_mode" - USE_MAINTAINER_MODE=$enableval -else - USE_MAINTAINER_MODE=no -fi; - echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 -echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6 - - -if test $USE_MAINTAINER_MODE = yes; then - MAINTAINER_MODE_TRUE= - MAINTAINER_MODE_FALSE='#' -else - MAINTAINER_MODE_TRUE='#' - MAINTAINER_MODE_FALSE= -fi - - MAINT=$MAINTAINER_MODE_TRUE - - -# Make sure we can run config.sub. -$ac_config_sub sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 -echo "$as_me: error: cannot run $ac_config_sub" >&2;} - { (exit 1); exit 1; }; } - -echo "$as_me:$LINENO: checking build system type" >&5 -echo $ECHO_N "checking build system type... $ECHO_C" >&6 -if test "${ac_cv_build+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_build_alias=$build_alias -test -z "$ac_cv_build_alias" && - ac_cv_build_alias=`$ac_config_guess` -test -z "$ac_cv_build_alias" && - { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } -ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} - { (exit 1); exit 1; }; } - -fi -echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -echo "${ECHO_T}$ac_cv_build" >&6 -build=$ac_cv_build -build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - - -echo "$as_me:$LINENO: checking host system type" >&5 -echo $ECHO_N "checking host system type... $ECHO_C" >&6 -if test "${ac_cv_host+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_host_alias=$host_alias -test -z "$ac_cv_host_alias" && - ac_cv_host_alias=$ac_cv_build_alias -ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} - { (exit 1); exit 1; }; } - -fi -echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$ac_cv_host" >&6 -host=$ac_cv_host -host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - - - - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - done - done - ;; -esac -done - - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL=$ac_install_sh - fi -fi -echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6 - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -echo "$as_me:$LINENO: checking whether ln -s works" >&5 -echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else - echo "$as_me:$LINENO: result: no, using $LN_S" >&5 -echo "${ECHO_T}no, using $LN_S" >&6 -fi - -echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.make <<\_ACEOF -all: - @echo 'ac_maketemp="$(MAKE)"' -_ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` -if test -n "$ac_maketemp"; then - eval ac_cv_prog_make_${ac_make}_set=yes -else - eval ac_cv_prog_make_${ac_make}_set=no -fi -rm -f conftest.make -fi -if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - SET_MAKE= -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - SET_MAKE="MAKE=${MAKE-make}" -fi - - - -# Check whether --with-perl or --without-perl was given. -if test "${with_perl+set}" = set; then - withval="$with_perl" - PERL=$withval -fi; - -## We use a path for perl so the #! line in autoscan will work. -# Extract the first word of "perl", so it can be a program name with args. -set dummy perl; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PERL+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $PERL in - [\\/]* | ?:[\\/]*) - ac_cv_path_PERL="$PERL" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no" - ;; -esac -fi -PERL=$ac_cv_path_PERL - -if test -n "$PERL"; then - echo "$as_me:$LINENO: result: $PERL" >&5 -echo "${ECHO_T}$PERL" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - -if test "$PERL" = no; then - { { echo "$as_me:$LINENO: error: Pssst... you need perl in order to use this program.\ - Install it or put it in your path and try again." >&5 -echo "$as_me: error: Pssst... you need perl in order to use this program.\ - Install it or put it in your path and try again." >&2;} - { (exit 1); exit 1; }; } -fi - - -# Extract the first word of "ps", so it can be a program name with args. -set dummy ps; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PS+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $PS in - [\\/]* | ?:[\\/]*) - ac_cv_path_PS="$PS" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PS="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PS" && ac_cv_path_PS="no" - ;; -esac -fi -PS=$ac_cv_path_PS - -if test -n "$PS"; then - echo "$as_me:$LINENO: result: $PS" >&5 -echo "${ECHO_T}$PS" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - -## PS_ARGS gives how we get the command line for a given PID. Also see -## description for PS_VARS. - - - - - -## PS_NO_NULL_HEADER indicates that we can't get rid of the PS header line - - -## PS_CAN_RETURN_MULTIPLE_LINES indicates the ps on this OS can return -## multiple lines for a process. Solaris's ps does this for processes -## which have many lwp (light-weight processes). - - -## PS_CUSTOM_HEADER specifies whether we can put an = after the argument -## name to remove the header for that variable - - -## PS_PID_OPTS gives how to get the pid and command name needed for -##l first-level breakout. - - -## PS_TIME_VAR gives a variable that we can test time on - - -## PS_VAR gives a list of the PS variables we can query. -## However we must use only those variables that give output as a single -## token since these are parsed one token per variable. For example -## the arguments (args, or comm, or command) shouldn't be listed here. - - -## ======================================================================== -## Need a better way to figure out ps options and to know -## which ones don't have embeded blanks or to parse ps output. -## ======================================================================== -PS_ARGS_FMT='' -PS_FULLCMD_FMT='' -PS_TIME_VAR='' - -case "$host_os" in - aix* ) - PS_ARGS='-o args=' - PS_CAN_RETURN_MULTIPLE_LINES=0 - PS_CUSTOM_HEADER=1 - PS_NO_NULL_HEADER=0 - PS_PID_OPTS='-e -o pid= -o comm=' - PS_TIME_VAR='etime' - PS_VARS='user ruser group rgroup uid ruid gid rgid ppid \ -pgid pri cpu pcpu pmem vsz nice class scount thcount tid time \ -etime tty wchan bnd' - ;; - cygwin* ) - PS_ARGS='-l | cut -c 2-10,56-120' - PS_ARGS_FMT='$opts{ps_prog} -l |cut -c 2-10,56-120|egrep \"^[ \\t]*%d\"' - PS_FULLCMD_FMT='$opts{ps_prog} -l|cut -c 2-47,56-120|egrep \"^[ \\t]*%d\"' - PS_CAN_RETURN_MULTIPLE_LINES=0 - PS_CUSTOM_HEADER=0 - PS_NO_NULL_HEADER=1 - PS_PID_OPTS='-l | cut -c 2-10,56-120' - PS_VARS='pid ppid pgid winpid tty uid' - ;; - solaris* ) - PS_ARGS='-o args=' - PS_CAN_RETURN_MULTIPLE_LINES=1 - PS_CUSTOM_HEADER=1 - PS_NO_NULL_HEADER=0 - PS_PID_OPTS='-e -o pid= -o comm=' - PS_TIME_VAR='etime' - PS_VARS='user ruser group rgroup uid ruid gid rgid ppid \ -pgid sid pri pcpu pmem vsz rss osz nice class time \ -etime stime f s lwp nlwp psr tty addr wchan fname' - ;; - linux* ) - PS_ARGS='-www -o args=' - PS_CAN_RETURN_MULTIPLE_LINES=0 - PS_CUSTOM_HEADER=1 - PS_NO_NULL_HEADER=0 - PS_PID_OPTS='-e -o pid= -o cmd=' - # Make sure we put known single tokens at the beginning like uid. - PS_VARS='uid euid ruid gid egid rgid alarm blocked bsdtime c caught \ -cputime drs dsiz egroup eip esp etime euser f fgid \ -fgroup flag flags fname fsgid fsgroup fsuid fsuser fuid fuser \ -group ignored intpri lim longtname m_drs m_trs maj_flt majflt \ -min_flt minflt ni nice nwchan opri pagein pcpu pending pgid pgrp \ -pmem ppid pri rgroup rss rssize rsz ruser s sess session \ -sgi_p sgi_rss sgid sgroup sid sig sig_block sig_catch sig_ignore \ -sig_pend sigcatch sigignore sigmask stackp start start_stack start_time \ -stat state stime suid suser svgid svgroup svuid svuser sz time timeout \ -tmout tname tpgid trs trss tsiz tt tty tty4 tty8 uid_hack uname \ -user vsize vsz wchan' - PS_TIME_VAR='etime' - ;; - netbsdelf2* | openbsd* ) - PS_ARGS='-o args' - PS_CAN_RETURN_MULTIPLE_LINES=0 - PS_CUSTOM_HEADER=0 - PS_NO_NULL_HEADER=1 - PS_PID_OPTS='-a -x -o pid= -o ucomm=' - PS_VARS='acflag cpu f \ -inblk jobc ktrace ktracep lim login majflt minflt msgrcv \ -msgsnd nice nivcsw nsigs nswap nvcsw nwchan oublk p_ru \ -paddr pagein pid ppid pri re rgid rlink rss rsz \ -ruid ruser sess sig sigcatch sigignore sigmask sl start state \ -svgid svuid tdev time tpgid tsess tsiz tt tty ucomm uid upr user vsz \ -wchan xstat' - PS_TIME_VAR='cpu' - ;; - netbsd* | freebsd4* ) - PS_ARGS='-O command' - PS_CAN_RETURN_MULTIPLE_LINES=0 - PS_CUSTOM_HEADER=0 - PS_NO_NULL_HEADER=1 - PS_PID_OPTS='-a -x -o pid= -o ucomm=' - PS_VARS='acflag cpu cputime f \ -inblk jobc ktrace ktracep lim login majflt minflt msgrcv \ -msgsnd nice nivcsw nsigs nswap nvcsw nwchan oublk p_ru \ -paddr pagein pid ppid pri re rgid rlink rss rsz \ -rtprio ruid ruser sess sig sigcatch sigignore sigmask sl start state \ -svgid svuid tdev time tpgid tsess tsiz tt tty ucomm uid upr user vsz \ -wchan xstat' - PS_TIME_VAR='cputime' - ;; - bsdi4* ) - PS_ARGS='-www -o command' - PS_CAN_RETURN_MULTIPLE_LINES=0 - PS_CUSTOM_HEADER=0 - PS_NO_NULL_HEADER=1 - PS_PID_OPTS='-a -x -o pid= -o ucomm=' - PS_TIME_VAR='cputime' - PS_VARS='acflag cpu cputime f \ -inblk jobc ktrace ktracep lim login \ -nice nivcsw nsigs nswap nvcsw nwchan oublk p_ru \ -paddr pagein pid ppid pri re rgid rlink rss rsz \ -ruid ruser sess sig sigcatch sigignore sigmask sl start state \ -svgid svuid tdev time tpgid tsess tsiz tt tty ucomm uid upr user vsz \ -wchan xstat' - ;; - darwin5* | darwin6* | darwin7* | darwin8* ) - PS_PID_OPTS='-a -x -o pid= -o ucomm' - PS_VARS='acflag cpu cputime f \ -inblk jobc ktrace ktracep lim login \ -nice nivcsw nsigs nswap nvcsw nwchan oublk p_ru \ -paddr pagein pid ppid pri re rgid rss rsz \ -ruid ruser sess sig sigmask sl start state \ -svgid svuid tdev time tpgid tsess tsiz tt tty ucomm uid upr user vsz \ -wchan xstat' - PS_TIME_VAR='cputime' - PS_ARGS='-www -o command' - PS_NO_NULL_HEADER=1 - PS_CUSTOM_HEADER=0 - PS_CAN_RETURN_MULTIPLE_LINES=0 - ;; - * ) - echo "Don't know $host_os. Winging it." - PS_ARGS='' - PS_CAN_RETURN_MULTIPLE_LINES=0 - PS_CUSTOM_HEADER=0 - PS_NO_NULL_HEADER=1 - PS_PID_OPTS='-e -o pid= -o comm=' - PS_VARS='user ruser group rgroup uid ruid gid rgid ppid \ -pgid sid pri pcpu pmem vsz rss osz nice class time \ -etime stime tty addr wchan fname' - PS_TIME_VAR='etime' -esac - - ac_config_files="$ac_config_files post-configure" - - ac_config_files="$ac_config_files tests/01.pod.t" - - ac_config_files="$ac_config_files tests/args.t" - - ac_config_files="$ac_config_files tests/basic.t" - - ac_config_files="$ac_config_files tests/count.t" - - ac_config_files="$ac_config_files tests/full.t" - - ac_config_files="$ac_config_files ps-watcher.in" - - ac_config_files="$ac_config_files ps-watcher" - - - ac_config_files="$ac_config_files Makefile docs/Makefile tests/basic.cnf tests/Makefile" -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -{ - (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" - ;; - esac; -} | - sed ' - t clear - : clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" - cat confcache >$cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -# -# If the first sed substitution is executed (which looks for macros that -# take arguments), then we branch to the quote section. Otherwise, -# look for a macro that doesn't take arguments. -cat >confdef2opt.sed <<\_ACEOF -t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g -t quote -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g -t quote -d -: quote -s,[ `~#$^&*(){}\\|;'"<>?],\\&,g -s,\[,\\&,g -s,\],\\&,g -s,\$,$$,g -p -_ACEOF -# We use echo to avoid assuming a particular line-breaking character. -# The extra dot is to prevent the shell from consuming trailing -# line-breaks from the sub-command output. A line-break within -# single-quotes doesn't work because, if this script is created in a -# platform that uses two characters for line-breaks (e.g., DOS), tr -# would break. -ac_LF_and_DOT=`echo; echo .` -DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` -rm -f confdef2opt.sed - - -ac_libobjs= -ac_ltlibobjs= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_i=`echo "$ac_i" | - sed 's/\$U\././;s/\.o$//;s/\.obj$//'` - # 2. Add them. - ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - -if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi - -: ${CONFIG_STATUS=./config.status} -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix -fi -DUALCASE=1; export DUALCASE # for MKS sh - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var - fi -done - -# Required to use basename. -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 - - -# Name of the executable. -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'` - - -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | - sed ' - N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, - t loop - s,-$,, - s,^['$as_cr_digits']*\n,, - ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno - # Exit status is that of the last command. - exit -} - - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac - -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.file - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_executable_p="test -f" - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - -exec 6>&1 - -# Open the log real soon, to keep \$[0] and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - -This file was extended by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 -_ACEOF - -# Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi - -cat >>$CONFIG_STATUS <<\_ACEOF - -ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. - -Usage: $0 [OPTIONS] [FILE]... - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - -Configuration files: -$config_files - -Report bugs to ." -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF -ac_cs_version="\\ -config.status -configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" - -Copyright (C) 2003 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir -INSTALL="$INSTALL" -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` - ac_shift=: - ;; - -*) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; - esac - - case $ac_option in - # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" - ac_need_defaults=false;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; } ;; - - *) ac_config_targets="$ac_config_targets $1" ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion -fi - -_ACEOF - - - - - -cat >>$CONFIG_STATUS <<\_ACEOF -for ac_config_target in $ac_config_targets -do - case "$ac_config_target" in - # Handling of arguments. - "post-configure" ) CONFIG_FILES="$CONFIG_FILES post-configure" ;; - "tests/01.pod.t" ) CONFIG_FILES="$CONFIG_FILES tests/01.pod.t" ;; - "tests/args.t" ) CONFIG_FILES="$CONFIG_FILES tests/args.t" ;; - "tests/basic.t" ) CONFIG_FILES="$CONFIG_FILES tests/basic.t" ;; - "tests/count.t" ) CONFIG_FILES="$CONFIG_FILES tests/count.t" ;; - "tests/full.t" ) CONFIG_FILES="$CONFIG_FILES tests/full.t" ;; - "ps-watcher.in" ) CONFIG_FILES="$CONFIG_FILES ps-watcher.in" ;; - "ps-watcher" ) CONFIG_FILES="$CONFIG_FILES ps-watcher" ;; - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "docs/Makefile" ) CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; - "tests/basic.cnf" ) CONFIG_FILES="$CONFIG_FILES tests/basic.cnf" ;; - "tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; - esac -done - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. -$debug || -{ - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 -} - -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) -} || -{ - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} - -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF - -# -# CONFIG_FILES section. -# - -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s,@SHELL@,$SHELL,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s,@exec_prefix@,$exec_prefix,;t t -s,@prefix@,$prefix,;t t -s,@program_transform_name@,$program_transform_name,;t t -s,@bindir@,$bindir,;t t -s,@sbindir@,$sbindir,;t t -s,@libexecdir@,$libexecdir,;t t -s,@datadir@,$datadir,;t t -s,@sysconfdir@,$sysconfdir,;t t -s,@sharedstatedir@,$sharedstatedir,;t t -s,@localstatedir@,$localstatedir,;t t -s,@libdir@,$libdir,;t t -s,@includedir@,$includedir,;t t -s,@oldincludedir@,$oldincludedir,;t t -s,@infodir@,$infodir,;t t -s,@mandir@,$mandir,;t t -s,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;t t -s,@LIBS@,$LIBS,;t t -s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t -s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t -s,@INSTALL_DATA@,$INSTALL_DATA,;t t -s,@CYGPATH_W@,$CYGPATH_W,;t t -s,@PACKAGE@,$PACKAGE,;t t -s,@VERSION@,$VERSION,;t t -s,@ACLOCAL@,$ACLOCAL,;t t -s,@AUTOCONF@,$AUTOCONF,;t t -s,@AUTOMAKE@,$AUTOMAKE,;t t -s,@AUTOHEADER@,$AUTOHEADER,;t t -s,@MAKEINFO@,$MAKEINFO,;t t -s,@install_sh@,$install_sh,;t t -s,@STRIP@,$STRIP,;t t -s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t -s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t -s,@mkdir_p@,$mkdir_p,;t t -s,@AWK@,$AWK,;t t -s,@SET_MAKE@,$SET_MAKE,;t t -s,@am__leading_dot@,$am__leading_dot,;t t -s,@AMTAR@,$AMTAR,;t t -s,@am__tar@,$am__tar,;t t -s,@am__untar@,$am__untar,;t t -s,@CVS2CL@,$CVS2CL,;t t -s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t -s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t -s,@MAINT@,$MAINT,;t t -s,@build@,$build,;t t -s,@build_cpu@,$build_cpu,;t t -s,@build_vendor@,$build_vendor,;t t -s,@build_os@,$build_os,;t t -s,@host@,$host,;t t -s,@host_cpu@,$host_cpu,;t t -s,@host_vendor@,$host_vendor,;t t -s,@host_os@,$host_os,;t t -s,@LN_S@,$LN_S,;t t -s,@PERL@,$PERL,;t t -s,@PS@,$PS,;t t -s,@PS_ARGS@,$PS_ARGS,;t t -s,@PS_ARGS_FMT@,$PS_ARGS_FMT,;t t -s,@PS_FULLCMD_FMT@,$PS_FULLCMD_FMT,;t t -s,@PS_NO_NULL_HEADER@,$PS_NO_NULL_HEADER,;t t -s,@PS_CAN_RETURN_MULTIPLE_LINES@,$PS_CAN_RETURN_MULTIPLE_LINES,;t t -s,@PS_CUSTOM_HEADER@,$PS_CUSTOM_HEADER,;t t -s,@PS_PID_OPTS@,$PS_PID_OPTS,;t t -s,@PS_TIME_VAR@,$PS_TIME_VAR,;t t -s,@PS_VARS@,$PS_VARS,;t t -s,@LIBOBJS@,$LIBOBJS,;t t -s,@LTLIBOBJS@,$LTLIBOBJS,;t t -CEOF - -_ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat - fi -fi # test -n "$CONFIG_FILES" - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; - esac - - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi - -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_builddir$INSTALL ;; - esac - - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@abs_srcdir@,$ac_abs_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s,@builddir@,$ac_builddir,;t t -s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -s,@INSTALL@,$ac_INSTALL,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi - - # Run the commands associated with the file. - case $ac_file in - post-configure ) chmod +x post-configure ;; - tests/01.pod.t ) chmod +x tests/01.pod.t ;; - tests/args.t ) chmod +x tests/args.t ;; - tests/basic.t ) chmod +x tests/basic.t ;; - tests/count.t ) chmod +x tests/count.t ;; - tests/full.t ) chmod +x tests/full.t ;; - ps-watcher ) ./post-configure $srcdir || exit 3 ;; - esac -done -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF - -{ (exit 0); exit 0; } -_ACEOF -chmod +x $CONFIG_STATUS -ac_clean_files=$ac_clean_files_save - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } -fi - diff --git a/configure.ac b/configure.ac deleted file mode 100644 index 256a632..0000000 --- a/configure.ac +++ /dev/null @@ -1,236 +0,0 @@ -dnl -dnl Require autoconf version 2.50 or greater -dnl -dnl Copyright (C) 2004, 2006 Rocky Bernstein -dnl -dnl This program is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 2, or (at your option) -dnl any later version. -dnl -dnl This program is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -dnl GNU General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License -dnl along with this program; if not, write to the Free Software -dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -dnl 02110-1301 USA. - -dnl $Id: configure.ac,v 1.36 2006/03/10 19:07:05 rockyb Exp $ -dnl Process this file with autoconf to produce a configure script. - -AC_INIT(ps-watcher.in.in) -AM_INIT_AUTOMAKE(ps-watcher,1.06) - -AM_MISSING_PROG(CVS2CL, cvs2cl, $missing_dir) -AM_MAINTAINER_MODE -AC_CANONICAL_HOST - -AC_PREREQ(2.10)dnl dnl Minimum Autoconf version required. - -dnl ============================= -dnl Checks for programs. -dnl ============================= -AC_PROG_INSTALL -AC_PROG_LN_S -AC_PROG_MAKE_SET - -AC_ARG_WITH(perl, AC_HELP_STRING([--with-perl], - [set path to Perl]), PERL=$withval) - -## We use a path for perl so the #! line in autoscan will work. -AC_PATH_PROG(PERL, perl, no) - -if test "$PERL" = no; then - AC_MSG_ERROR(Pssst... you need perl in order to use this program.\ - Install it or put it in your path and try again.) -fi - -AC_SUBST(PERL)dnl - -AC_PATH_PROG(PS, ps, no) -AC_SUBST(PS)dnl - -## PS_ARGS gives how we get the command line for a given PID. Also see -## description for PS_VARS. -AC_SUBST(PS_ARGS) - -AC_SUBST(PS_ARGS_FMT) -AC_SUBST(PS_FULLCMD_FMT) - -## PS_NO_NULL_HEADER indicates that we can't get rid of the PS header line -AC_SUBST(PS_NO_NULL_HEADER) - -## PS_CAN_RETURN_MULTIPLE_LINES indicates the ps on this OS can return -## multiple lines for a process. Solaris's ps does this for processes -## which have many lwp (light-weight processes). -AC_SUBST(PS_CAN_RETURN_MULTIPLE_LINES) - -## PS_CUSTOM_HEADER specifies whether we can put an = after the argument -## name to remove the header for that variable -AC_SUBST(PS_CUSTOM_HEADER) - -## PS_PID_OPTS gives how to get the pid and command name needed for -##l first-level breakout. -AC_SUBST(PS_PID_OPTS) - -## PS_TIME_VAR gives a variable that we can test time on -AC_SUBST(PS_TIME_VAR) - -## PS_VAR gives a list of the PS variables we can query. -## However we must use only those variables that give output as a single -## token since these are parsed one token per variable. For example -## the arguments (args, or comm, or command) shouldn't be listed here. -AC_SUBST(PS_VARS) - -## ======================================================================== -## Need a better way to figure out ps options and to know -## which ones don't have embeded blanks or to parse ps output. -## ======================================================================== -PS_ARGS_FMT='' -PS_FULLCMD_FMT='' -PS_TIME_VAR='' - -case "$host_os" in - aix* ) - PS_ARGS='-o args=' - PS_CAN_RETURN_MULTIPLE_LINES=0 - PS_CUSTOM_HEADER=1 - PS_NO_NULL_HEADER=0 - PS_PID_OPTS='-e -o pid= -o comm=' - PS_TIME_VAR='etime' - PS_VARS='user ruser group rgroup uid ruid gid rgid ppid \ -pgid pri cpu pcpu pmem vsz nice class scount thcount tid time \ -etime tty wchan bnd' - ;; - cygwin* ) - PS_ARGS='-l | cut -c 2-10,56-120' - PS_ARGS_FMT=['$opts{ps_prog} -l |cut -c 2-10,56-120|egrep \"^[ \\t]*%d\"'] - PS_FULLCMD_FMT=['$opts{ps_prog} -l|cut -c 2-47,56-120|egrep \"^[ \\t]*%d\"'] - PS_CAN_RETURN_MULTIPLE_LINES=0 - PS_CUSTOM_HEADER=0 - PS_NO_NULL_HEADER=1 - PS_PID_OPTS='-l | cut -c 2-10,56-120' - PS_VARS='pid ppid pgid winpid tty uid' - ;; - solaris* ) - PS_ARGS='-o args=' - PS_CAN_RETURN_MULTIPLE_LINES=1 - PS_CUSTOM_HEADER=1 - PS_NO_NULL_HEADER=0 - PS_PID_OPTS='-e -o pid= -o comm=' - PS_TIME_VAR='etime' - PS_VARS='user ruser group rgroup uid ruid gid rgid ppid \ -pgid sid pri pcpu pmem vsz rss osz nice class time \ -etime stime f s lwp nlwp psr tty addr wchan fname' - ;; - linux* ) - PS_ARGS='-www -o args=' - PS_CAN_RETURN_MULTIPLE_LINES=0 - PS_CUSTOM_HEADER=1 - PS_NO_NULL_HEADER=0 - PS_PID_OPTS='-e -o pid= -o cmd=' - # Make sure we put known single tokens at the beginning like uid. - PS_VARS='uid euid ruid gid egid rgid alarm blocked bsdtime c caught \ -cputime drs dsiz egroup eip esp etime euser f fgid \ -fgroup flag flags fname fsgid fsgroup fsuid fsuser fuid fuser \ -group ignored intpri lim longtname m_drs m_trs maj_flt majflt \ -min_flt minflt ni nice nwchan opri pagein pcpu pending pgid pgrp \ -pmem ppid pri rgroup rss rssize rsz ruser s sess session \ -sgi_p sgi_rss sgid sgroup sid sig sig_block sig_catch sig_ignore \ -sig_pend sigcatch sigignore sigmask stackp start start_stack start_time \ -stat state stime suid suser svgid svgroup svuid svuser sz time timeout \ -tmout tname tpgid trs trss tsiz tt tty tty4 tty8 uid_hack uname \ -user vsize vsz wchan' - PS_TIME_VAR='etime' - ;; - netbsdelf2* | openbsd* ) - PS_ARGS='-o args' - PS_CAN_RETURN_MULTIPLE_LINES=0 - PS_CUSTOM_HEADER=0 - PS_NO_NULL_HEADER=1 - PS_PID_OPTS='-a -x -o pid= -o ucomm=' - PS_VARS='acflag cpu f \ -inblk jobc ktrace ktracep lim login majflt minflt msgrcv \ -msgsnd nice nivcsw nsigs nswap nvcsw nwchan oublk p_ru \ -paddr pagein pid ppid pri re rgid rlink rss rsz \ -ruid ruser sess sig sigcatch sigignore sigmask sl start state \ -svgid svuid tdev time tpgid tsess tsiz tt tty ucomm uid upr user vsz \ -wchan xstat' - PS_TIME_VAR='cpu' - ;; - netbsd* | freebsd4* ) - PS_ARGS='-O command' - PS_CAN_RETURN_MULTIPLE_LINES=0 - PS_CUSTOM_HEADER=0 - PS_NO_NULL_HEADER=1 - PS_PID_OPTS='-a -x -o pid= -o ucomm=' - PS_VARS='acflag cpu cputime f \ -inblk jobc ktrace ktracep lim login majflt minflt msgrcv \ -msgsnd nice nivcsw nsigs nswap nvcsw nwchan oublk p_ru \ -paddr pagein pid ppid pri re rgid rlink rss rsz \ -rtprio ruid ruser sess sig sigcatch sigignore sigmask sl start state \ -svgid svuid tdev time tpgid tsess tsiz tt tty ucomm uid upr user vsz \ -wchan xstat' - PS_TIME_VAR='cputime' - ;; - bsdi4* ) - PS_ARGS='-www -o command' - PS_CAN_RETURN_MULTIPLE_LINES=0 - PS_CUSTOM_HEADER=0 - PS_NO_NULL_HEADER=1 - PS_PID_OPTS='-a -x -o pid= -o ucomm=' - PS_TIME_VAR='cputime' - PS_VARS='acflag cpu cputime f \ -inblk jobc ktrace ktracep lim login \ -nice nivcsw nsigs nswap nvcsw nwchan oublk p_ru \ -paddr pagein pid ppid pri re rgid rlink rss rsz \ -ruid ruser sess sig sigcatch sigignore sigmask sl start state \ -svgid svuid tdev time tpgid tsess tsiz tt tty ucomm uid upr user vsz \ -wchan xstat' - ;; - darwin5* | darwin6* | darwin7* | darwin8* ) - PS_PID_OPTS='-a -x -o pid= -o ucomm' - PS_VARS='acflag cpu cputime f \ -inblk jobc ktrace ktracep lim login \ -nice nivcsw nsigs nswap nvcsw nwchan oublk p_ru \ -paddr pagein pid ppid pri re rgid rss rsz \ -ruid ruser sess sig sigmask sl start state \ -svgid svuid tdev time tpgid tsess tsiz tt tty ucomm uid upr user vsz \ -wchan xstat' - PS_TIME_VAR='cputime' - PS_ARGS='-www -o command' - PS_NO_NULL_HEADER=1 - PS_CUSTOM_HEADER=0 - PS_CAN_RETURN_MULTIPLE_LINES=0 - ;; - * ) - echo "Don't know $host_os. Winging it." - PS_ARGS='' - PS_CAN_RETURN_MULTIPLE_LINES=0 - PS_CUSTOM_HEADER=0 - PS_NO_NULL_HEADER=1 - PS_PID_OPTS='-e -o pid= -o comm=' - PS_VARS='user ruser group rgroup uid ruid gid rgid ppid \ -pgid sid pri pcpu pmem vsz rss osz nice class time \ -etime stime tty addr wchan fname' - PS_TIME_VAR='etime' -esac - -AC_CONFIG_FILES([post-configure], [chmod +x post-configure]) -AC_CONFIG_FILES([tests/01.pod.t], [chmod +x tests/01.pod.t]) -AC_CONFIG_FILES([tests/args.t], [chmod +x tests/args.t]) -AC_CONFIG_FILES([tests/basic.t], [chmod +x tests/basic.t]) -AC_CONFIG_FILES([tests/count.t], [chmod +x tests/count.t]) -AC_CONFIG_FILES([tests/full.t], [chmod +x tests/full.t]) -AC_CONFIG_FILES([ps-watcher.in]) -AC_CONFIG_FILES([ps-watcher], [./post-configure $srcdir || exit 3]) - -AC_OUTPUT([ - Makefile \ - docs/Makefile \ - tests/basic.cnf \ - tests/Makefile \ -]) diff --git a/docs/Makefile.am b/docs/Makefile.am deleted file mode 100644 index 8ea8713..0000000 --- a/docs/Makefile.am +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################## -# $Id: Makefile.am,v 1.8 2005/05/17 09:53:00 rockyb Exp $ -# Copyright (C) 2003, 2004 Rocky Bernstein -# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -############################################################################## - -# Section 8 is system administration -EXT=8 -man8_MANS = $(PACKAGE).$(EXT) - -MOSTLYCLEANFILES = *~ $(man8_MANS) $(PACKAGE).html -EXTRA_DIST = $(man8_MANS) $(PACKAGE).html -DISTCLEANFILES = pod2htmi.tmp pod2htmd.tmp - -# The keeps automake from substituting PS_VARS -PS_VARS = '' - -# Files making up the documentation part of this package -DOCS = $(man_MANS) $(PACKAGE).html - -# THIS SHOULD BE THE FIRST TARGET! -all: $(DOCS) Makefile - -$(PACKAGE).html: ../$(PACKAGE).in - -pod2html --infile=../$(PACKAGE).in --outfile=$@ - -$(man8_MANS): ../$(PACKAGE).in - -pod2man --section=$(EXT) --name=$(PACKAGE) ../$(PACKAGE).in >$@ diff --git a/docs/Makefile.in b/docs/Makefile.in deleted file mode 100644 index 1bfbfc2..0000000 --- a/docs/Makefile.in +++ /dev/null @@ -1,374 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 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@ - -############################################################################## -# $Id: Makefile.am,v 1.8 2005/05/17 09:53:00 rockyb Exp $ -# Copyright (C) 2003, 2004 Rocky Bernstein -# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -############################################################################## -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -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@ -subdir = docs -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -man8dir = $(mandir)/man8 -am__installdirs = "$(DESTDIR)$(man8dir)" -NROFF = nroff -MANS = $(man8_MANS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CVS2CL = @CVS2CL@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ -MAKEINFO = @MAKEINFO@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PERL = @PERL@ -PS = @PS@ -PS_ARGS = @PS_ARGS@ -PS_ARGS_FMT = @PS_ARGS_FMT@ -PS_CAN_RETURN_MULTIPLE_LINES = @PS_CAN_RETURN_MULTIPLE_LINES@ -PS_CUSTOM_HEADER = @PS_CUSTOM_HEADER@ -PS_FULLCMD_FMT = @PS_FULLCMD_FMT@ -PS_NO_NULL_HEADER = @PS_NO_NULL_HEADER@ -PS_PID_OPTS = @PS_PID_OPTS@ -PS_TIME_VAR = @PS_TIME_VAR@ - -# The keeps automake from substituting PS_VARS -PS_VARS = '' -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__leading_dot = @am__leading_dot@ -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@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ - -# Section 8 is system administration -EXT = 8 -man8_MANS = $(PACKAGE).$(EXT) -MOSTLYCLEANFILES = *~ $(man8_MANS) $(PACKAGE).html -EXTRA_DIST = $(man8_MANS) $(PACKAGE).html -DISTCLEANFILES = pod2htmi.tmp pod2htmd.tmp - -# Files making up the documentation part of this package -DOCS = $(man_MANS) $(PACKAGE).html -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu docs/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -uninstall-info-am: -install-man8: $(man8_MANS) $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man8dir)" || $(mkdir_p) "$(DESTDIR)$(man8dir)" - @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.8*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ - else file=$$i; fi; \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 8*) ;; \ - *) ext='8' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst"; \ - done -uninstall-man8: - @$(NORMAL_UNINSTALL) - @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.8*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 8*) ;; \ - *) ext='8' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " rm -f '$(DESTDIR)$(man8dir)/$$inst'"; \ - rm -f "$(DESTDIR)$(man8dir)/$$inst"; \ - done -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(MANS) -installdirs: - for dir in "$(DESTDIR)$(man8dir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(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: - -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) - -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 - -info: info-am - -info-am: - -install-data-am: install-man - -install-exec-am: - -install-info: install-info-am - -install-man: install-man8 - -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: uninstall-info-am uninstall-man - -uninstall-man: uninstall-man8 - -.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-exec \ - install-exec-am install-info install-info-am install-man \ - install-man8 install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ - uninstall-am uninstall-info-am uninstall-man uninstall-man8 - - -# THIS SHOULD BE THE FIRST TARGET! -all: $(DOCS) Makefile - -$(PACKAGE).html: ../$(PACKAGE).in - -pod2html --infile=../$(PACKAGE).in --outfile=$@ - -$(man8_MANS): ../$(PACKAGE).in - -pod2man --section=$(EXT) --name=$(PACKAGE) ../$(PACKAGE).in >$@ -# 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: diff --git a/docs/ps-watcher.8 b/docs/ps-watcher.8 deleted file mode 100644 index bf6dd24..0000000 --- a/docs/ps-watcher.8 +++ /dev/null @@ -1,743 +0,0 @@ -.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sh \" Subsection heading -.br -.if t .Sp -.ne 5 -.PP -\fB\\$1\fR -.PP -.. -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. | will give a -.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to -.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' -.\" expand to `' in nroff, nothing in troff, for use with C<>. -.tr \(*W-|\(bv\*(Tr -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -'br\} -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.if \nF \{\ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. nr % 0 -. rr F -.\} -.\" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.hy 0 -.if n .na -.\" -.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). -.\" Fear. Run. Save yourself. No user-serviceable parts. -. \" fudge factors for nroff and troff -.if n \{\ -. ds #H 0 -. ds #V .8m -. ds #F .3m -. ds #[ \f1 -. ds #] \fP -.\} -.if t \{\ -. ds #H ((1u-(\\\\n(.fu%2u))*.13m) -. ds #V .6m -. ds #F 0 -. ds #[ \& -. ds #] \& -.\} -. \" simple accents for nroff and troff -.if n \{\ -. ds ' \& -. ds ` \& -. ds ^ \& -. ds , \& -. ds ~ ~ -. ds / -.\} -.if t \{\ -. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" -. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' -. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' -. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' -. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' -. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' -.\} -. \" troff and (daisy-wheel) nroff accents -.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' -.ds 8 \h'\*(#H'\(*b\h'-\*(#H' -.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] -.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' -.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' -.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] -.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] -.ds ae a\h'-(\w'a'u*4/10)'e -.ds Ae A\h'-(\w'A'u*4/10)'E -. \" corrections for vroff -.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' -.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' -. \" for low resolution devices (crt and lpr) -.if \n(.H>23 .if \n(.V>19 \ -\{\ -. ds : e -. ds 8 ss -. ds o a -. ds d- d\h'-1'\(ga -. ds D- D\h'-1'\(hy -. ds th \o'bp' -. ds Th \o'LP' -. ds ae ae -. ds Ae AE -.\} -.rm #[ #] #H #V #F C -.\" ======================================================================== -.\" -.IX Title "ps-watcher 8" -.TH ps-watcher 8 "2006-03-10" "perl v5.8.8" "User Contributed Perl Documentation" -.SH "NAME" -ps\-watcher \- monitors various processes based on ps\-like information. -.SH "SYNOPSIS" -.IX Header "SYNOPSIS" -\&\fBps-watcher\fR [\fIoptions\fR...] - [\f(CW\*(C`\-\-config\*(C'\fR] \fIconfig-file\fR -.SH "DESCRIPTION" -.IX Header "DESCRIPTION" -Periodically a list of processes obtained via \f(CW\*(C`ps\*(C'\fR. More precisely -each item in the list contains the process name (just what's listed in -the \*(L"cmd\*(R" field, not the full command and arguments) and its process -id (pid). A configuration file specifies a list of Perl -regular-expression patterns to match the processes against. For each -match, a Perl expression specified for that pattern is evaluated. The -evaluated expression can refer to variables which are set by ps and -pertain to the matched process(es), for example the amount memory -consumed by the process, or the total elapsed time. Some other -variables are set by the program, such as the number of times the -process is running. If the Perl expression for a matched pattern -evaluates true, then an action can be run such as killing the program, -restarting it, or mailing an alert, or running some arbitrary Perl -code. -.PP -Some things you might want to watch a daemon or process for: -.IP "\(bu" 2 -check that it is running (hasn't died) -.IP "\(bu" 2 -ensure it is not running too many times -.IP "\(bu" 2 -isn't consuming too much memory (perhaps a memory leak), or I/O -.PP -Some actions you might want to take: -.IP "\(bu" 2 -restart a process -.IP "\(bu" 2 -kill off rampant processes -.IP "\(bu" 2 -send an alert about any of the conditions listed above -.PP -Depending on options specfied, this program can be run as a daemon, -run once (which is suitable as a \f(CW\*(C`cron\*(C'\fR job), or run not as a daemon -but still continuously (which may be handy in testing the program or -your configuration). -.Sh "\s-1OPTIONS\s0" -.IX Subsection "OPTIONS" -.IP "\-\-help" 4 -.IX Item "--help" -Print a usage message on standard error and exit with a return code -of 100. -.Sp -\&\& -.IP "\-\-doc" 4 -.IX Item "--doc" -Extact the full documentation that you are reading now, print it and -exit with a return code of 101. -.Sp -\&\& -.IP "\-\-version" 4 -.IX Item "--version" -Print the version release on standard output and exit with a return -code of 10. -.Sp -\&\& -.IP "\-\-debug \fInumber\fR" 4 -.IX Item "--debug number" -Give debugging output. The higher the number, the more the output. The -default is 0 = none. 2 is the most debugging output. -.IP "[\-\-config] \fIconfiguration file\fR" 4 -.IX Item "[--config] configuration file" -Specify configuration file. . -.Sp -See \*(L"\s-1CONFIGURATION\s0 \s-1FILE\s0 \s-1FORMAT\s0\*(R" below for information on the format -of the configuration file and \*(L"\s-1EXAMPLE\s0 \s-1CONFIGURATION\s0\*(R" for a complete -example of a configuration file. -.Sp -\&\& -.IP "\-\-log [\fIlog file\fR]" 4 -.IX Item "--log [log file]" -Send or don't send error and debugging output to a log file. If option -is given but no logfile is specified, then use \s-1STDERR\s0. The default is -no error log file. See also \-\-syslog below. -.Sp -\&\& -.IP "\-\-syslog | \-\-nosyslog" 4 -.IX Item "--syslog | --nosyslog" -Send or don't send error and debugging output to syslog. The default -is to syslog error and debug output. -.Sp -\&\& -.IP "\-\-daemon | \-\-nodaemon" 4 -.IX Item "--daemon | --nodaemon" -Run or don't as a daemon. -.Sp -\&\& -.IP "\-\-path \fIsearch-path\fR" 4 -.IX Item "--path search-path" -Specify the executable search path used in running commands. -.IP "\-\-ps\-prog \fIprogram\fR" 4 -.IX Item "--ps-prog program" -One can specify the command that gives ps information. By default, the -command is \fI/bin/ps\fR. -.Sp -\&\& -.IP "\-\-run | \-\-norun" 4 -.IX Item "--run | --norun" -do/don't run actions go through the motions as though we were going -to. This may be useful in debugging. -.Sp -\&\& -.IP "\-\-sleep \fIinterval in seconds\fR" 4 -.IX Item "--sleep interval in seconds" -It is expected that one might want to run ps-watcher over and over -again. In such instances one can specify the amount of time between -iterations with this option. -.Sp -If a negative number is specified the program is run only once. -.Sp -\&\& -.Sh "\s-1CONFIGURATION\s0 \s-1FILE\s0 \s-1MODIFICATION\s0 \s-1AND\s0 \s-1SIGNAL\s0 \s-1HANDLING\s0" -.IX Subsection "CONFIGURATION FILE MODIFICATION AND SIGNAL HANDLING" -Periodically ps-watcher checks to see if the configuration file -that it was run against has changed. If so, the program rereads the -configuration file. -.PP -More precisely, the checks are done after waking up from a slumber. -If the sleep interval is long (or if you are impatient), you can -probably force the program to wake up using a \s-1HUP\s0 signal. -.PP -At any time you can increase the level of debug output by sending a -\&\s-1USR1\s0 signal to the ps-watcher process. Similarly you can decrease the -level of debug output by sending the process a \s-1USR2\s0 signal. -.PP -It is recommended that you terminate ps-watcher via an \s-1INT\s0, \s-1TERM\s0, or \s-1QUIT\s0 -signal. -.SH "CONFIGURATION FILE FORMAT" -.IX Header "CONFIGURATION FILE FORMAT" -The format of a configuration file is a series of fully qualified -filenames enclosed in square brackets followed by a number of -parameter lines. Each parameter line has a parameter names followed by -an \*(L"equal\*(R" sign and finally value. That is: -.PP -.Vb 5 -\& # This is a comment line -\& ; So is this. -\& [process-pattern1] -\& parameter1 = value1 -\& parameter2 = value2 -.Ve -.PP -.Vb 3 -\& [process-pattern2] -\& parameter1 = value3 -\& parameter2 = value4 -.Ve -.PP -Comments start with # or ; and take effect to the end of the line. -.PP -This should be familiar to those who have worked with text-readible -Microsoft \f(CW\*(C`.INI\*(C'\fR files. -.PP -Note process patterns, (\fIprocess\-pattern1\fR and \fIprocess\-pattern2\fR -above) must be unique. If there are times when you may want to -refer to the same process, one can be creative to make these unique. -e.g. \fIcron\fR and \fI[c]ron\fR which refer to the same process even -though they \fIappear\fR to be different. -.PP -As quoted directly from the Config::IniFiles documentation: -.PP -Multiline or multivalued fields may also be defined ala \s-1UNIX\s0 -\&\*(L"here document\*(R" syntax: -.PP -.Vb 4 -\& Parameter=< 1000 -\& occurs = every -\& action = echo "Large program $command matches $ps_pat: $vsz KB" -.Ve -.Sp -.Vb 8 -\& # Fire if /usr/sbin/syslogd is not running. -\& # Since the program matches against the command names, not commands and -\& # arguments, something like: -\& # ps -ef | grep /usr/sbin/syslogd -\& # won't match the below. -\& [(/usr/sbin/)?syslogd] -\& occurs = none -\& action = /etc/init.d/syslogd start -.Ve -.IP "action" 4 -.IX Item "action" -This specifies the action, a command that gets run by the system -shell, when the trigger condition is evaluated to be true. -.Sp -Example: -.Sp -.Vb 1 -\& action = /etc/init.d/market_loader.init restart -.Ve -.IP "perl-action" 4 -.IX Item "perl-action" -This specifies Perl statements to be eval'd. This can be especially -useful in conjunction with \f(CW$PROLOG\fR and \f(CW$EPILOG\fR sections to make tests -across collections of process and do things which ps-watcher -would otherwise not be able to do. -.Sp -Example: -.Sp -.Vb 5 -\& # A Perl variable initialization. -\& # Since ps-watcher runs as a daemon it's a good idea -\& # to (re)initialize variables before each run. -\& [$PROLOG] -\& perl-action = $root_procs=0; -.Ve -.Sp -.Vb 4 -\& # Keep track of how many root processes we are running -\& [.*] -\& perl-action = $root_procs++ if $uid == 0 -\& occurs = every -.Ve -.Sp -.Vb 3 -\& # Show this count. -\& [$EPILOG] -\& action = echo "I counted $root_procs root processes" -.Ve -.Sh "\s-1EXPANDED\s0 \s-1VARIABLES\s0 \s-1IN\s0 \s-1TRIGGER/ACTION\s0 \s-1CLAUSES\s0" -.IX Subsection "EXPANDED VARIABLES IN TRIGGER/ACTION CLAUSES" -Any variables defined in the program can be used in pattern or -action parameters. For example, \f(CW$program\fR can be used to refer to -the name of this program ps\-watcher. -.PP -The following variables can be used in either the pattern or action -fields. -.IP "$action" 4 -.IX Item "$action" -A string containing the text of the action to run. -.Sp -\&\& -.IP "$perl_action" 4 -.IX Item "$perl_action" -A string containing the text of the perl_action to run. -.Sp -\&\& -.IP "$ps_pat" 4 -.IX Item "$ps_pat" -The Perl regular expression specified in the beginning of the section. -.Sp -\&\& -.IP "$command" 4 -.IX Item "$command" -The command that matched \f(CW$ps_pat\fR. -.Sp -The Perl regular expression specified in the beginning of the section. -Normally processes will not have funny characters in them. Just in -case, backticks in \f(CW$command\fR are escaped. -.Sp -Example: -.Sp -.Vb 2 -\& # List processes other than emacs (which is a known pig) that use lots -\& # of virtual memory -.Ve -.Sp -.Vb 3 -\& [.*] -\& trigger = $command !~ /emacs$/ && $vsz > 10 -\& action = echo \e"Looks like you have a big \e$command program: \e$vsz KB\e" -.Ve -.Sp -\&\& -.IP "$count" 4 -.IX Item "$count" -The number of times the pattern matched. Presumably the number of -processes of this class running. -.Sp -\&\& -.IP "$trigger" 4 -.IX Item "$trigger" -A string containing the text of the trigger. -.PP -A list of variables specific to this program or fields commonly found in -\&\f(CW\*(C`ps\*(C'\fR output is listed below followed by a description of the more -common ones. See also \f(CW\*(C`ps\*(C'\fR for a more complete -description of the meaning of the field. -.PP -.Vb 11 -\& uid euid ruid gid egid rgid alarm blocked bsdtime c caught -\&cputime drs dsiz egroup eip esp etime euser f fgid -\&fgroup flag flags fname fsgid fsgroup fsuid fsuser fuid fuser -\&group ignored intpri lim longtname m_drs m_trs maj_flt majflt -\&min_flt minflt ni nice nwchan opri pagein pcpu pending pgid pgrp -\&pmem ppid pri rgroup rss rssize rsz ruser s sess session -\&sgi_p sgi_rss sgid sgroup sid sig sig_block sig_catch sig_ignore -\&sig_pend sigcatch sigignore sigmask stackp start start_stack start_time -\&stat state stime suid suser svgid svgroup svuid svuser sz time timeout -\&tmout tname tpgid trs trss tsiz tt tty tty4 tty8 uid_hack uname -\&user vsize vsz wchan -.Ve -.PP -Beware though, in some situations ps can return multiple lines for a -single process and we will use just one of these in the trigger. In -particular, Solaris's \f(CW\*(C`ps\*(C'\fR will return a line for each \s-1LWP\s0 (light\-weight -process). So on Solaris, if a trigger uses variable lwp, it may or may -not match depending on which single line of the multiple \f(CW\*(C`ps\*(C'\fR lines is -used. -.PP -\&\& -.IP "$args" 4 -.IX Item "$args" -The command along with its command arguments. It is possible that this -is might get truncated at certain length (if ps does likewise as is -the case on Solaris). -.Sp -\&\& -.IP "$ppid" 4 -.IX Item "$ppid" -The parent process id. -.Sp -\&\& -.IP "$stime" 4 -.IX Item "$stime" -The start time of the process. -.Sp -\&\& -.IP "$etime" 4 -.IX Item "$etime" -The end time of the process. -.Sp -\&\& -.IP "$pmem" 4 -.IX Item "$pmem" -The process memory. -.Sp -\&\& -.IP "$pcpu" 4 -.IX Item "$pcpu" -The percent \s-1CPU\s0 utilization. -.Sp -\&\& -.IP "$tty" 4 -.IX Item "$tty" -The controlling tty. -.Sp -\&\& -.IP "$szv" 4 -.IX Item "$szv" -Virtual memory size of the process -.Sh "\s-1OTHER\s0 \s-1THINGS\s0 \s-1IN\s0 \s-1TRIGGER\s0 \s-1CLAUSES\s0" -.IX Subsection "OTHER THINGS IN TRIGGER CLAUSES" -To make testing against elapsed time easier, a function \f(CW\*(C`elapse2sec()\*(C'\fR -has been written to parse and convert elapsed time strings in the -format \f(CW\*(C`dd\-hh:mm:ss\*(C'\fR and a number of seconds. -.PP -Some constants for the number of seconds in a minute, hour, or day -have also been defined. These are referred to as \f(CW\*(C`MINS\*(C'\fR, \f(CW\*(C`HOURS\*(C'\fR, -and \f(CW\*(C`DAYS\*(C'\fR respectively and they have the expected definitions: -.PP -.Vb 3 -\& use constant MINS => 60; -\& use constant HOURS => 60*60; -\& use constant DAYS => HOURS * 24; -.Ve -.PP -Here is an example of the use of \f(CW\*(C`elapsed2sec()\*(C'\fR: -.PP -.Vb 7 -\& # Which processes have been running for more than 3 hours? -\& # Also note use of builtin-function elapsed2secs, variable $etime -\& # and builtin-function HOURS -\& [.] -\& trigger = elapsed2secs('$etime') > 1*DAYS -\& action = echo "$command has been running more than 1 day ($etime)" -\& occurs = every -.Ve -.PP -Please note the quotes around '$etime'. -.SH "EXAMPLE CONFIGURATION" -.IX Header "EXAMPLE CONFIGURATION" -.Vb 1 -\& # Comments start with # or ; and go to the end of the line. -.Ve -.PP -.Vb 4 -\& # The format for each entry is in Microsoft .INI form: -\& # [process-pattern] -\& # trigger = perl-expression -\& # action = program-and-arguments-to-run -.Ve -.PP -.Vb 3 -\& [httpd$] -\& trigger = $count < 4 -\& action = echo "$trigger fired -- You have $count httpd sessions." -.Ve -.PP -.Vb 3 -\& [.] -\& trigger = $vsz > 10 -\& action = echo "Looks like you have a big $command program: $vsz KB" -.Ve -.PP -.Vb 10 -\& # Unfortunately we have use a different pattern below. (Here we use -\& # ".?" instead of ".".) In effect the the two patterns mean -\& # test every process. -\& [.?] -\& trigger = elapsed2secs('$etime') > 2*MINS && $pcpu > 40 -\& occurs = every -\& action = </dev/null 2>&1`; \e$? >> 8 } -\& action = < and it download via - -.SH "AUTHOR" -.IX Header "AUTHOR" -Rocky Bernstein (rocky@cpan.org) -.SH "COPYRIGHT" -.IX Header "COPYRIGHT" -.Vb 6 -\& Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006 -\& Rocky Bernstein, email: rocky@cpan.org. -\& This program is free software; you can redistribute it and/or modify -\& it under the terms of the GNU General Public License as published by -\& the Free Software Foundation; either version 2 of the License, or -\& (at your option) any later version. -.Ve -.PP -.Vb 4 -\& 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. -.Ve -.PP -.Vb 3 -\& 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., 675 Mass Ave, Cambridge, MA 02139, USA. -.Ve diff --git a/docs/ps-watcher.html b/docs/ps-watcher.html deleted file mode 100644 index 59e4414..0000000 --- a/docs/ps-watcher.html +++ /dev/null @@ -1,764 +0,0 @@ - - - - -ps-watcher - monitors various processes based on ps-like information. - - - - - - -

- - - - - -
-

-

-

NAME

-

ps-watcher - monitors various processes based on ps-like information.

-

-

-
-

SYNOPSIS

-

ps-watcher [options...] - [--config] config-file

-

-

-
-

DESCRIPTION

-

Periodically a list of processes obtained via ps. More precisely -each item in the list contains the process name (just what's listed in -the ``cmd'' field, not the full command and arguments) and its process -id (pid). A configuration file specifies a list of Perl -regular-expression patterns to match the processes against. For each -match, a Perl expression specified for that pattern is evaluated. The -evaluated expression can refer to variables which are set by ps and -pertain to the matched process(es), for example the amount memory -consumed by the process, or the total elapsed time. Some other -variables are set by the program, such as the number of times the -process is running. If the Perl expression for a matched pattern -evaluates true, then an action can be run such as killing the program, -restarting it, or mailing an alert, or running some arbitrary Perl -code.

-

Some things you might want to watch a daemon or process for:

-
    -
  • -

    check that it is running (hasn't died)

    -
  • -
  • -

    ensure it is not running too many times

    -
  • -
  • -

    isn't consuming too much memory (perhaps a memory leak), or I/O

    -
  • -
-

Some actions you might want to take:

-
    -
  • -

    restart a process

    -
  • -
  • -

    kill off rampant processes

    -
  • -
  • -

    send an alert about any of the conditions listed above

    -
  • -
-

Depending on options specfied, this program can be run as a daemon, -run once (which is suitable as a cron job), or run not as a daemon -but still continuously (which may be handy in testing the program or -your configuration).

-

-

-

OPTIONS

-
-
--help - -
-

Print a usage message on standard error and exit with a return code -of 100.

-
-
-

-
- -
--doc - -
-

Extact the full documentation that you are reading now, print it and -exit with a return code of 101.

-
-
-

-
- -
--version - -
-

Print the version release on standard output and exit with a return -code of 10.

-
-
-

-
- -
--debug number - -
-

Give debugging output. The higher the number, the more the output. The -default is 0 = none. 2 is the most debugging output.

-
- -
[--config] configuration file - -
-

Specify configuration file. .

-
-
-

See CONFIGURATION FILE FORMAT below for information on the format -of the configuration file and EXAMPLE CONFIGURATION for a complete -example of a configuration file.

-
-
-

-
- -
--log [log file] - -
-

Send or don't send error and debugging output to a log file. If option -is given but no logfile is specified, then use STDERR. The default is -no error log file. See also --syslog below.

-
-
-

-
- -
--syslog | --nosyslog - -
-

Send or don't send error and debugging output to syslog. The default -is to syslog error and debug output.

-
-
-

-
- -
--daemon | --nodaemon - -
-

Run or don't as a daemon.

-
-
-

-
- -
--path search-path - -
-

Specify the executable search path used in running commands.

-
- -
--ps-prog program - -
-

One can specify the command that gives ps information. By default, the -command is /bin/ps.

-
-
-

-
- -
--run | --norun - -
-

do/don't run actions go through the motions as though we were going -to. This may be useful in debugging.

-
-
-

-
- -
--sleep interval in seconds - -
-

It is expected that one might want to run ps-watcher over and over -again. In such instances one can specify the amount of time between -iterations with this option.

-
-
-

If a negative number is specified the program is run only once.

-
-
-

-
- -
-

-

-

CONFIGURATION FILE MODIFICATION AND SIGNAL HANDLING

-

Periodically ps-watcher checks to see if the configuration file -that it was run against has changed. If so, the program rereads the -configuration file.

-

More precisely, the checks are done after waking up from a slumber. -If the sleep interval is long (or if you are impatient), you can -probably force the program to wake up using a HUP signal.

-

At any time you can increase the level of debug output by sending a -USR1 signal to the ps-watcher process. Similarly you can decrease the -level of debug output by sending the process a USR2 signal.

-

It is recommended that you terminate ps-watcher via an INT, TERM, or QUIT -signal.

-

-

-
-

CONFIGURATION FILE FORMAT

-

The format of a configuration file is a series of fully qualified -filenames enclosed in square brackets followed by a number of -parameter lines. Each parameter line has a parameter names followed by -an ``equal'' sign and finally value. That is:

-
- # This is a comment line
- ; So is this.
- [process-pattern1]
-  parameter1 = value1
-  parameter2 = value2
-
- [process-pattern2]
-  parameter1 = value3
-  parameter2 = value4
-

Comments start with # or ; and take effect to the end of the line.

-

This should be familiar to those who have worked with text-readible -Microsoft .INI files.

-

Note process patterns, (process-pattern1 and process-pattern2 -above) must be unique. If there are times when you may want to -refer to the same process, one can be creative to make these unique. -e.g. cron and [c]ron which refer to the same process even -though they appear to be different.

-

As quoted directly from the Config::IniFiles documentation:

-

Multiline or multivalued fields may also be defined ala UNIX -``here document'' syntax:

-
-  Parameter=<<EOT
-  value/line 1
-  value/line 2
-  EOT
-

You may use any string you want in place of ``EOT''. Note -that what follows the ``<<'' and what appears at the end of -the text must match exactly, including any trailing -whitespace.

-

There are two special ``process patterns'': $PROLOG and $EPILOG, the -former should appear first and the latter last.

-

You can put perl code to initialize variables here and do cleanup -actions in these sections using ``perl-action.''

-

A description of parameters names, their meanings and potential values -follows.

-
-
trigger - -
-

This parameter specifies the condition on which a process action is -fired. The condition is evaluated with Perl eval() and should -therefore return something which is equivalent to ``true'' in a Perl -expression.

-
-
-

If no trigger is given in a section, true or 1 is assumed and -the action is unconditionally triggered.

-
-
-

Example:

-
-
-
-  # Match if httpd has not spawned enough (<4) times. NFS and databases
-  # daemons typically spawn child processes.  Since the program
-  # matches against the command names, not commands and arguments,
-  # something like: ps -ef | grep httpd won't match the below.
-  # If you want to match against the command with arguments, see
-  # the example with $args below.
-  [httpd$]
-  trigger = $count <= 4
-
- -
occurs - -
-

This parameter specifies how many times an action should be performed -on processes matching the section trigger. Acceptable values are -``every'', ``first'', ``first-trigger'', and ``none''.

-
-
-

Setting the occurs value to ``none'' causes the the trigger to be -evaluated when there are no matching processes. Although one might -think ``$count == 0'' in the action expression would do the same thing, -currently as coded this does not work.

-
-
-

Setting the occurs value to ``first'' causes the process-pattern rule to -be finished after handling the first rule that matches, whether or not the -trigger evaluated to true.

-
-
-

Setting the occurs value to ``first-trigger'' causes the process-pattern -rule to be finished after handling the first rule that matches and -the trigger evaluates to true.

-
-
-

If the item parameter is not specified, ``first'' is assumed.

-
-
-

Examples:

-
-
-
-  [.]
-  occurs = first
-  action = echo "You have $count processes running"
-
-
-
-  # Note in the above since there is no trigger specified,
-  #   occurs = first
-  # is the same thing as 
-  #   occurs = first-trigger
-
-
-
-  [.?]
-  trigger = $vsz > 1000
-  occurs  = every
-  action  = echo "Large program $command matches $ps_pat: $vsz KB"
-
-
-
-  # Fire if /usr/sbin/syslogd is not running.
-  # Since the program matches against the command names, not commands and
-  # arguments, something like: 
-  #   ps -ef | grep /usr/sbin/syslogd
-  # won't match the below.
-  [(/usr/sbin/)?syslogd]
-  occurs = none
-  action = /etc/init.d/syslogd start
-
- -
action - -
-

This specifies the action, a command that gets run by the system -shell, when the trigger condition is evaluated to be true.

-
-
-

Example:

-
-
-
- action = /etc/init.d/market_loader.init restart
-
- -
perl-action - -
-

This specifies Perl statements to be eval'd. This can be especially -useful in conjunction with $PROLOG and $EPILOG sections to make tests -across collections of process and do things which ps-watcher -would otherwise not be able to do.

-
-
-

Example:

-
-
-
-  # A Perl variable initialization.
-  # Since ps-watcher runs as a daemon it's a good idea
-  # to (re)initialize variables before each run.
-  [$PROLOG]
-    perl-action = $root_procs=0;
-
-
-
-  # Keep track of how many root processes we are running
-  [.*]
-    perl-action = $root_procs++ if $uid == 0
-    occurs  = every
-
-
-
-  # Show this count.
-  [$EPILOG]
-    action  = echo "I counted $root_procs root processes"
-
- -
-

-

-

EXPANDED VARIABLES IN TRIGGER/ACTION CLAUSES

-

Any variables defined in the program can be used in pattern or -action parameters. For example, $program can be used to refer to -the name of this program ps-watcher.

-

The following variables can be used in either the pattern or action -fields.

-
-
$action - -
-

A string containing the text of the action to run.

-
-
-

-
- -
$perl_action - -
-

A string containing the text of the perl_action to run.

-
-
-

-
- -
$ps_pat - -
-

The Perl regular expression specified in the beginning of the section.

-
-
-

-
- -
$command - -
-

The command that matched $ps_pat.

-
-
-

The Perl regular expression specified in the beginning of the section. -Normally processes will not have funny characters in them. Just in -case, backticks in $command are escaped.

-
-
-

Example:

-
-
-
-  # List processes other than emacs (which is a known pig) that use lots
-  # of virtual memory
-
-
-
-  [.*]
-  trigger = $command !~ /emacs$/ && $vsz > 10
-  action  = echo \"Looks like you have a big \$command program: \$vsz KB\"
-
-
-

-
- -
$count - -
-

The number of times the pattern matched. Presumably the number of -processes of this class running.

-
-
-

-
- -
$trigger - -
-

A string containing the text of the trigger.

-
- -
-

A list of variables specific to this program or fields commonly found in -ps output is listed below followed by a description of the more -common ones. See also ps for a more complete -description of the meaning of the field.

-
- uid euid ruid gid egid rgid alarm blocked bsdtime c caught 
-cputime drs dsiz egroup eip esp etime euser f fgid 
-fgroup flag flags fname fsgid fsgroup fsuid fsuser fuid fuser  
-group ignored intpri lim longtname m_drs m_trs maj_flt majflt 
-min_flt  minflt ni nice nwchan opri pagein pcpu pending pgid pgrp 
-pmem ppid pri rgroup rss rssize rsz ruser s sess session 
-sgi_p sgi_rss sgid sgroup sid sig sig_block sig_catch sig_ignore 
-sig_pend sigcatch sigignore sigmask stackp start start_stack start_time 
-stat state stime suid suser svgid svgroup svuid svuser sz time timeout 
-tmout tname tpgid trs trss tsiz tt tty tty4 tty8 uid_hack uname 
-user vsize vsz wchan
-

Beware though, in some situations ps can return multiple lines for a -single process and we will use just one of these in the trigger. In -particular, Solaris's ps will return a line for each LWP (light-weight -process). So on Solaris, if a trigger uses variable lwp, it may or may -not match depending on which single line of the multiple ps lines is -used.

-

-
-
$args - -
-

The command along with its command arguments. It is possible that this -is might get truncated at certain length (if ps does likewise as is -the case on Solaris).

-
-
-

-
- -
$ppid - -
-

The parent process id.

-
-
-

-
- -
$stime - -
-

The start time of the process.

-
-
-

-
- -
$etime - -
-

The end time of the process.

-
-
-

-
- -
$pmem - -
-

The process memory.

-
-
-

-
- -
$pcpu - -
-

The percent CPU utilization.

-
-
-

-
- -
$tty - -
-

The controlling tty.

-
-
-

-
- -
$szv - -
-

Virtual memory size of the process

-
- -
-

-

-

OTHER THINGS IN TRIGGER CLAUSES

-

To make testing against elapsed time easier, a function elapse2sec() -has been written to parse and convert elapsed time strings in the -format dd-hh:mm:ss and a number of seconds.

-

Some constants for the number of seconds in a minute, hour, or day -have also been defined. These are referred to as MINS, HOURS, -and DAYS respectively and they have the expected definitions:

-
-  use constant MINS   => 60;
-  use constant HOURS  => 60*60;
-  use constant DAYS   => HOURS * 24;
-

Here is an example of the use of elapsed2sec():

-
-  # Which processes have been running for more than 3 hours?
-  # Also note use of builtin-function elapsed2secs, variable $etime
-  # and builtin-function HOURS
-  [.]
-    trigger = elapsed2secs('$etime') > 1*DAYS
-    action  = echo "$command has been running more than 1 day ($etime)"
-    occurs  = every
-

Please note the quotes around '$etime'.

-

-

-
-

EXAMPLE CONFIGURATION

-
-  # Comments start with # or ; and go to the end of the line.
-
-  # The format for each entry is in Microsoft .INI form:
-  # [process-pattern]
-  # trigger = perl-expression
-  # action  = program-and-arguments-to-run
-
-  [httpd$]
-    trigger = $count < 4
-    action  = echo "$trigger fired -- You have $count httpd sessions."
-
-  [.]
-  trigger = $vsz > 10
-  action  = echo "Looks like you have a big $command program: $vsz KB"
-
-  # Unfortunately we have use a different pattern below. (Here we use
-  # ".?" instead of ".".) In effect the the two patterns mean
-  # test every process.
-  [.?]
-    trigger = elapsed2secs('$etime') > 2*MINS && $pcpu > 40
-    occurs  = every
-    action  = <<EOT
-     echo "$command used $pcpu% CPU for the last $etime seconds" | /bin/mail root
-     kill -TERM $pid
-  EOT
-
-  # Scripts don't show as the script name as the command name on some
-  # operating systems.  Rather the name of the interpreter is listed
-  # (e.g. bash or perl) Here's how you can match against a script.
-  # BSD/OS is an exception: it does give the script name rather than
-  # the interpreter name.
-  [/usr/bin/perl]
-    trigger = \$args !~ /ps-watcher/
-    occurs  = every
-    action  = echo "***found perl program ${pid}:\n $args"
-

-

-
-

Using $PROLOG for getting non-ps information

-

Here is an example to show how to use ps-watcher to do something not -really possible from ps: check to see if a port is active. We make -use of lsof to check port 3333 and the $PROLOG make sure it runs.

-
-  [$PROLOG]
-    occurs  = first
-    trigger = { \$x=`lsof -i :3333 >/dev/null 2>&1`; \$? >> 8 }
-    action  = <<EOT
-    put-your-favorite-command-here arg1 arg2 ...
-  EOT
-

-

-
-

SECURITY CONSIDERATIONS

-

Any daemon such as this one which is sufficiently flexible is a -security risk. The configuration file allows arbitrary commands to be -run. In particular if this daemon is run as root and the configuration -file is not protected so that it can't be modified, a bad person could -have their programs run as root.

-

There's nothing in the ps command or ps-watcher, that requires one to -run this daemon as root.

-

So as with all daemons, one needs to take usual security precautions -that a careful sysadmin/maintainer of a computer would. If you can run -any daemon as an unprivileged user (or with no privileges), do it! If -not, set the permissions on the configuration file and the directory -it lives in.

-

This program can also run chrooted and there is a --path option that -is available which can be used to set the executable search path. All -commands used by ps-watcher are fully qualified, and I generally give a -full execution path in my configuration file, so consider using the -option --path=''.

-

Commands that need to be run as root you can run via sudo. I often -run process accounting which tracks all commands run. Tripwire may be -useful to track changed configuration files.

-

-

-
-

TROUBLESHOOTING

-

To debug a configuration file the following options are useful:

-

ps-watcher --log --nodaemon --sleep -1 --debug 2 configuration-file

-

For even more information and control try running the above under the -perl debugger, e.g.

-

perl -d ps-watcher --log --nodaemon --sleep -1 --debug 2 configuration-file

-

-

-
-

BUGS

-

Well, some of these are not so much a bug in ps-watcher so much as a -challenge to getting ps-watcher to do what you want it to do.

-

One common problem people run in into is understanding exactly what -the process variables mean. The manual page ps(1) should be of -help, but I've found some of the descriptions either a bit vague or -just plain lacking.

-

Sometimes one will see this error message when debug tracing is turned on:

-
-  ** debug ** Something wrong getting ps variables
-

This just means that the process died betwee the time ps-watcher first -saw the existence of the process and the time that it queried -variables.

-

-

-
-

SEE ALSO

-

See also ps(1) and syslogd(8).

-

Another cool program doing ps-like things is xps. Well okay, it's -another program I distributed. It shows the process tree dynamically -updated using X Motif and tries to display the output ``attractively'' -but fast. You can the find the homepage at -http://motif-pstree.sourceforge.net and it download via -http://prdownloads.sourceforge.net/motif-pstree

-

-

-
-

AUTHOR

-

Rocky Bernstein (rocky@cpan.org)

-

-

-
-

COPYRIGHT

-
-  Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006
-  Rocky Bernstein, email: rocky@cpan.org.
-  This program is free software; you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation; either version 2 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., 675 Mass Ave, Cambridge, MA 02139, USA.
- - - - diff --git a/install-sh b/install-sh deleted file mode 100755 index ebc6691..0000000 --- a/install-sh +++ /dev/null @@ -1,250 +0,0 @@ -#! /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 "install: no input file specified" - exit 1 -else - true -fi - -if [ x"$dir_arg" != x ]; then - dst=$src - src="" - - if [ -d $dst ]; then - instcmd=: - else - instcmd=mkdir - fi -else - -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. - - if [ -f $src -o -d $src ] - then - true - else - echo "install: $src does not exist" - exit 1 - fi - - if [ x"$dst" = x ] - then - echo "install: no destination specified" - exit 1 - else - true - fi - -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic - - if [ -d $dst ] - then - dst="$dst"/`basename $src` - else - true - fi -fi - -## this sed command emulates the dirname command -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` - -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script - -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' -' -IFS="${IFS-${defaultIFS}}" - -oIFS="${IFS}" -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" - -pathcomp='' - -while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" - shift - - if [ ! -d "${pathcomp}" ] ; - then - $mkdirprog "${pathcomp}" - else - true - fi - - pathcomp="${pathcomp}/" -done -fi - -if [ x"$dir_arg" != x ] -then - $doit $instcmd $dst && - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi -else - -# If we're going to rename the final executable, determine the name now. - - if [ x"$transformarg" = x ] - then - dstfile=`basename $dst` - else - dstfile=`basename $dst $transformbasename | - sed $transformarg`$transformbasename - fi - -# don't allow the sed command to completely eliminate the filename - - if [ x"$dstfile" = x ] - then - dstfile=`basename $dst` - else - true - fi - -# Make a temp file name in the proper directory. - - dsttmp=$dstdir/#inst.$$# - -# Move or copy the file name to the temp name - - $doit $instcmd $src $dsttmp && - - trap "rm -f ${dsttmp}" 0 && - -# and set any options; do chmod last to preserve setuid bits - -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && - -# Now rename the file to the real destination. - - $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile - -fi && - - -exit 0 diff --git a/missing b/missing deleted file mode 100755 index c72c059..0000000 --- a/missing +++ /dev/null @@ -1,283 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. -# Copyright 1996, 1997, 1999, 2000 Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 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 -# 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. - -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.3 - GNU automake" - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - - aclocal) - 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) - 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) - 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) - 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 - ;; - - 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) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` - fi - if [ -f "$file" ]; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit 1 - fi - ;; - - makeinfo) - if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then - # We have makeinfo, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` - fi - touch $file - ;; - - tar) - shift - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - fi - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar ${1+"$@"} && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar ${1+"$@"} && exit 0 - fi - firstarg="$1" - if shift; then - case "$firstarg" in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" ${1+"$@"} && exit 0 - ;; - esac - case "$firstarg" in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" ${1+"$@"} && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and you do not seem to have it handy on your - system. You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequirements for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 diff --git a/mkinstalldirs b/mkinstalldirs deleted file mode 100755 index 3889669..0000000 --- a/mkinstalldirs +++ /dev/null @@ -1,40 +0,0 @@ -#! /bin/sh -# mkinstalldirs --- make directory hierarchy -# Author: Noah Friedman -# Created: 1993-05-16 -# Public domain - -# $Id: mkinstalldirs,v 1.1.1.1 2000/03/20 09:58:55 root Exp $ - -errstatus=0 - -for file -do - set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` - shift - - pathcomp= - for d - do - pathcomp="$pathcomp$d" - case "$pathcomp" in - -* ) pathcomp=./$pathcomp ;; - esac - - if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" 1>&2 - - mkdir "$pathcomp" || lasterr=$? - - if test ! -d "$pathcomp"; then - errstatus=$lasterr - fi - fi - - pathcomp="$pathcomp/" - done -done - -exit $errstatus - -# mkinstalldirs ends here diff --git a/post-configure.in b/post-configure.in deleted file mode 100755 index c221979..0000000 --- a/post-configure.in +++ /dev/null @@ -1,80 +0,0 @@ -#!@PERL@ -w -# -*- Perl -*- -# $Id: post-configure.in,v 1.10 2006/03/10 19:07:05 rockyb Exp $ -require 5.006; -sub touch_file($); - -$program='@PACKAGE@'; -# -# Do we have a version of perl that we can work with? -# -printf "You have of Perl %s\n", $]; - -# -# Do we have all the packages we need? -# -print "Checking to see that you have all library modules installed...\n"; -@needed_packages = ('Sys::Syslog', - # 'IPC::Open3', # -- to simultate `cmd` better - 'File::Basename', - 'Config::IniFiles', - 'Getopt::Long', - 'Pod::Text' - ); -foreach $package (@needed_packages) { - unless (eval "require $package") { - die "Need package \"$package\": $@"; - } - print " $package is installed\n"; -} - -# -# -# -print "Checking what to put after #! at the top of $program..."; -$startperl = `@PERL@ -V:startperl`; -if ($startperl =~ /^startperl=\'#!(.*)\'\;$/) { - $perlpath = $1; - print "$perlpath\n"; -} else { - $perlpath = ''; - print STDERR "\nCan't determine what to put after #! in $program\n"; - print STDERR "Change the top of the program or arrange for perl to\n"; - print STDERR "execute it.\n"; -} - -print "Rewriting $program.in into $program..."; -die "Cannot read $program.in: $!" if !open(INPUT, "<$program.in"); -die "Cannot write $program: $!" if !open(OUTPUT, ">$program"); -if (!$perlpath) { - print OUTPUT "# Customize this line, for example:\n#!/usr/bin/perl -w\n"; -} else { - print OUTPUT "#!$perlpath -w\n"; -} -@OUTPUT = ; -shift @OUTPUT; # Remove old 1st line. -print OUTPUT @OUTPUT; -print "\n"; -close(OUTPUT); -chmod 0755, $program; - -# Touch a timestamp to record that we've created this $program -# from $program.in. If we later modify $program (which is convenient -# during debugging), we will know to copy that back to $program.in, -# the version that get's checked into CVS. -touch_file("./${program}.stamp"); -exit; - -sub touch_file($) { - my $file_name = $_[0]; - if (-e $file_name) { - my $now = time(); - my $count = utime $now, $now, $file_name; - exit ($count != 1); - } else { - open(FILE, ">", $file_name) || die "Can't open $file_name: $!"; - close(FILE); - exit $?; - } -} - diff --git a/ps-watcher b/ps-watcher deleted file mode 100755 index b95ed40..0000000 --- a/ps-watcher +++ /dev/null @@ -1,1298 +0,0 @@ -#!/usr/bin/perl -w -# -*- Perl -*- -use diagnostics; -my $vcid='$Id: ps-watcher.in.in,v 1.57 2006/03/10 19:07:05 rockyb Exp $ '; -# See usage subroutine or perlpod documentation below. - -# Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006 -# Rocky Bernstein, email: rocky@cpan.org -# -# This program is free software; you can -# redistribute it and/or modify it under the terms of the GNU General -# Public License as published by the Free Software Foundation; either -# version 2 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -use vars qw($program $ps_cmd $ps_cmdfull $ps_fullcmd_fmt @ps_vars $ps_dvars - $0 $logopened $ps_args_fmt $args - $count $pid $command $ps_arg_opts $DEVNULL %opts - ); -use strict; -BEGIN { require 5.00503 } - -sub usage($) { - my ($full_help) = @_; - - print " -usage: - - $program [OPTIONS..] - -$program can be used to monitor various processes based on ps-like -information. - -options: - --help -- print this help and exit - --doc -- extract and print complete documentation and exit - --version -- show a CVS version string and exit - --debug *n* -- give debugging output. The higher the - number, the more the output - --run | --norun -- do/don't run actions - go through the motions as though we were going to - --log [*logfile*] -- Set a log file for this program. If option given - but no logfile, then use STDERR. Default is - no error log file. - --syslog | --nosyslog - -- send or don't send error output to syslog - Default is to send to syslog. - --config *cnf file* -- specify configuration file. - - --daemon | --nodaemon - -- do or don't become a daemon. Default daemonize. - --sleep *time* -- sleep interval between iterations. The default is - $opts{sleep_interval} seconds. - --path path -- executable search path to use in running commands - - --ps-prog *program* -- command that gets ps information. The default is: - $opts{ps_prog} - --ps-pids-opt *ps opts* - -- ps options that lists pids and commands. The - default is: $opts{ps_pid_opts} -"; - - if ($full_help) { - print " -General operation: - -Periodically a list of processes obtained via ps. More precisely -each item in the list contains the process name (just what's listed in -the \"command\" field, not the full command and arguments) and its -process id (pid). A configuration file specifies a list of Perl -regular-expression patterns to match the process names against. For -each match, a Perl expression specified for that pattern is -evaluated. The evaluated expression can refer to variables which are -set by ps and pertain to the matched process(es), for example the -amount memory consumed by the process, or the total elapsed time. Some -other variables are set by the program, such as the number of times -the process is running. If the Perl expression for a matched pattern -evaluates true, then an action can be run such as killing the program, -restarting it, or mailing an alert. - -This program can be used to ensure a daemon hasn't died or ensure it -is not running too many times. It might be used to determine when a -process has consumed too many resources (for example due to a memory -leak). - -The following variables can be used in patterns or actions: -\t". '$' . join("\n\t\$", @ps_vars) . -" - The following is a sample config file: - -# Comments start with # or ; and go to the end of the line. - -# The format for each entry is in Microsoft .INI form: -# [process-pattern] -# trigger = perl-expression -# action = program-and-arguments-to-run - -[httpd\$] - trigger = \$count < 4 - action = echo \"\$trigger fired -- You have \$count \$command sessions.\" - -[em?cs] -trigger = \$vsz > 10 -action = echo \"Looks like you have a big \$command program: \$vsz KB\" - -"; - } - exit 100; -} - -sub init(); -sub podthis(); -sub process_options(); -sub show_version(); -sub daemonize(); -sub eval_trigger_action($$$); -sub make_the_rounds($); -sub elapsed2secs($); -sub logger($); -sub debug_log($$); -sub gather_psinfo(); -sub read_config($); -sub check_config_file($); -sub run_trigger($$$); - -init(); -process_options(); - -# Unfurl the banner... -logger("Starting: $vcid"); - -my $cfg=read_config($opts{conf_file}); - -if (!defined($cfg)) { - for my $line (@Config::IniFiles::errors) { - logger($line); - } - exit 2; -} - -if ($opts{daemon}) { - daemonize(); -} - -install_handlers(); - -do { - make_the_rounds($cfg); - sleep $opts{sleep_interval} if $opts{sleep_interval} > 0; - check_config_file($opts{conf_file}); -} until ($opts{sleep_interval} < 0) ; -if ($opts{syslog}) { - use Sys::Syslog; - closelog; -} -exit 0; - -# Evaluates the trigger and if that's true also performs -# an action. 1 is returned if the action was performed, -# zero otherwise. -sub eval_trigger_action($$$) { - my ($trigger,$action,$perl_action) = @_; - my $etrigger=$trigger; - # It is a pain to predeclare all of the variables assigned - # by ps which is OS and ps specific. So we'll allow anything. - # Likewise, we'll allow it occur in $action. - no strict; - if ($trigger ne '1') { - $etrigger =~ s/"/\\"/g; - debug_log("trigger before substitution: $etrigger", 2); - $etrigger = eval qq/"$trigger"/; - } - debug_log("trigger after substitution: $etrigger", 2); - if (eval ($etrigger)) { - if (defined($perl_action)) { - debug_log("running Perl_action: $perl_action", 2); - eval($perl_action) if $opts{run}; - } - if (defined($action)) { - debug_log("action before substitution: $action", 2); - my $eaction=$action; - $eaction =~ s/"/\\"/g; - $eaction = eval qq/"$eaction"/; - debug_log("action after substitution: $eaction", 2); - my $output=`$eaction` if $opts{run}; - chomp($output); - logger($output) if $output; - } - return 1; - } - return 0; -} - -# Perform a round over the process_patterns comparing against the -# process info to see if anything's stirring. -sub make_the_rounds($) { - my $cfg = $_[0]; - my @ps_info=gather_psinfo(); - foreach our $ps_pat ($cfg->Sections()) { - debug_log("process pattern: /$ps_pat/", 1); - my @selected_ps; - my $in_prolog_epilog=0; - my $trigger = $cfg->val($ps_pat, 'trigger') || '1'; - my $action = $cfg->val($ps_pat, 'action'); - my $perl_action = $cfg->val($ps_pat, 'perl-action'); - my $occurs = $cfg->val($ps_pat, 'occurs') || "first"; - local $count; - if ($ps_pat =~ /^\$PROLOG/ || $ps_pat =~ /\$EPILOG/) { - # Set to run trigger below. - $count = @ps_info; - $in_prolog_epilog=1; - } else { - @selected_ps = grep(/$ps_pat/, @ps_info); - $count = @selected_ps; - debug_log("count for /$ps_pat/: $count", 2); - } - if ($in_prolog_epilog) { - # execute trigger - eval_trigger_action($trigger, $action, $perl_action); - } elsif ($occurs =~ /none/i) { - if ($count eq 0) { - # execute the trigger anyway - eval_trigger_action($trigger, $action, $perl_action); - } - } elsif ($count gt 0) { - TRIGGER: - foreach (@selected_ps) { - next if !/\s*(\d+)\s+(\S+)/; - local($pid, $command) = /\s*(\d+)\s+(\S+)/; - if ($pid !~ /\d+/) { - logger("Something wrong with ps format:\n$_"); - next; - } - - my $ps_fullcmd = sprintf $ps_fullcmd_fmt, $pid; - my @output = `$ps_fullcmd`; - my $output=''; - if (@output == 1) { - # Got one line of output - good. - $output=$output[0]; - # Make sure though we don't just have a title line. - # One of the fields should be just digits, e.g. ppid, uid, gud... - next if $output !~ m{\s+\d+\s+}; - } elsif (@output == 2 && 0) { - # Got two lines of output - we are running a ps where - # we can't remove the title line? - $output=$output[1]; - } elsif (@output > 1 && 0) { - # Got multiple lines of output - we are running a ps which can - # do so. For example Solaris does this for a process that has many - # LWPs (light-weight processes). - $output=$output[0]; - } else { - debug_log("Something wrong getting ps variables", 1); - next; - } - - local $args = ''; - if ($ps_arg_opts) { - my $ps_argscmd = sprintf $ps_args_fmt, $pid; - my @output = `$ps_argscmd`; - if (@output == 1) { - $args=$output[0]; - } elsif (@output == 2 && 0) { - $args=$output[1]; - } else { - debug_log("Something wrong with getting command arguments", 1); - } - } - - # Process may have disappeared. In this case we'll get no - # output. - next if !$output; - - # Add ' ' so split will junk first ps_dvars $junk. - $output = ' ' . $output; - my $perl_ps_assign = "$ps_dvars = split(/\\s+/, \$output)"; - { - # It is a pain to predeclare all of the variables assigned - # by ps which is OS and ps specific. So we'll allow anything. - # Likewise, we'll allow it occur in $action. - no strict; - - # Escape backticks so that we don't inadvertently run - # the program. For example there could be a process named - # `/tmp/evilcommand` (with backticks). Thanks to Randal - # Schwartz for noticing the problem. - # Not sure if there are other things to watch out for. - # Although the Perl Cookbook suggests how to make system, - # safe, it is silent about making eval safe. - $command =~ s/`/\\`/g; - - if (eval ($perl_ps_assign)) { - my $evaled = eval_trigger_action($trigger, $action, - $perl_action); - last TRIGGER if $evaled && $occurs eq 'first-trigger'; - last TRIGGER if $occurs eq 'first'; - } else { - logger("Something wrong with perl assignment: $perl_ps_assign"); - last TRIGGER; - } - } # no strict - } # foreach - } # if $count - } -} - -# Initailize various variables variously. -sub init() { - - use File::Basename; - $program = basename($0); # Who am I today, anyway? - - $DEVNULL = '/dev/null'; # And what do we do about non Unix? - - use constant MINS => 60; - use constant HOURS => 60*60; - use constant DAYS => HOURS * 24; - - $opts{debug} = 0; # no debugging - $opts{run} = 1; # run actions - $opts{syslog} = 1; # Log errors to syslog - $opts{logfile} = $DEVNULL; - $opts{daemon} = 1; # Run as daemon; - $opts{ps_prog} = '/bin/ps'; # Where is ps? - $opts{ps_pid_opts} = '-e -o pid= -o cmd='; # How do I get pids and commands? - - $ps_arg_opts = '-www -o args='; # How do I get full process command? - - # List of all the fields from ps we will be able to use. Don't need - # to list variables listed above. - @ps_vars = qw ( uid euid ruid gid egid rgid alarm blocked bsdtime c caught -cputime drs dsiz egroup eip esp etime euser f fgid -fgroup flag flags fname fsgid fsgroup fsuid fsuser fuid fuser -group ignored intpri lim longtname m_drs m_trs maj_flt majflt -min_flt minflt ni nice nwchan opri pagein pcpu pending pgid pgrp -pmem ppid pri rgroup rss rssize rsz ruser s sess session -sgi_p sgi_rss sgid sgroup sid sig sig_block sig_catch sig_ignore -sig_pend sigcatch sigignore sigmask stackp start start_stack start_time -stat state stime suid suser svgid svgroup svuid svuser sz time timeout -tmout tname tpgid trs trss tsiz tt tty tty4 tty8 uid_hack uname -user vsize vsz wchan -); - - # Convert the above into an argument list like - # ($junk, $user, ... ) - # The first argument ($junk) will be null and thrown out. - $ps_dvars = '($junk,$' . join(',$', @ps_vars) . ')'; - - $opts{sleep_interval} = 300; - -} - -# The bane of programming. -sub process_options() { - use Getopt::Long; - my(@opt_cf); - $Getopt::Long::autoabbrev = 1; - my($newstyle_config); - - my ($help, $long_help, $show_version); - - my $result = &GetOptions - ( - 'help' => \$help, - 'doc' => \$long_help, - 'version' => \$show_version, - 'config=s' => \$opts{conf_file}, - 'debug=i' => \$opts{debug}, - 'path=s' => \$ENV{PATH}, - 'ps-pid-opts=s'=> \$opts{ps_pid_opts}, - 'ps-prog=s' => \$opts{ps_prog}, - 'sleep=i' => \$opts{sleep_interval}, - 'log:s' => \$opts{logfile}, - 'syslog!' => \$opts{syslog}, - 'run!' => \$opts{run}, - 'daemon!' => \$opts{daemon}, - ); - - show_version() if $show_version; - usage(1) if $help; - podthis() if $long_help; - - # However specifying a configuration file is not. - # Nor can we deal with multiple configuration files or tolerate - # option-processing errors. - usage(0) if !$result; - - # The option-specifier "--config" is optional... - if (@ARGV && !defined($opts{conf_file})) { - $opts{conf_file} = shift(@ARGV); - } - - # However we do have to give exactly one configurtion file. - if (!defined($opts{conf_file}) || @ARGV != 0) { - print STDERR "$program: Please specify exactly one configuration file.\n"; - usage(0); - } - - $ps_cmd = "$opts{ps_prog} $opts{ps_pid_opts}"; - my $ps_vars; - if (1) { - $ps_vars = join('= -o ', @ps_vars) . '='; - } else { - $ps_vars = join(' -o ', @ps_vars); - } - - if ('') { - $ps_fullcmd_fmt = ""; - } else { - $ps_fullcmd_fmt = "$opts{ps_prog} -p %d -o $ps_vars"; - } - if ('') { - $ps_args_fmt = ""; - } else { - $ps_args_fmt = "$opts{ps_prog} -p %d $ps_arg_opts"; - } - - open STDIN, $DEVNULL or die "Can't read $DEVNULL: $!"; - open STDOUT, ">>$opts{logfile}" or die "Can't write to $opts{logfile}: $!" - if $opts{logfile} ne ''; - open STDERR, ">>$opts{logfile}" or die "Can't write to $opts{logfile}: $!" - if $opts{logfile} ne ''; -} - -# Signal handling.. -sub install_handlers { - $SIG{'QUIT'} = \&terminate; - $SIG{'TERM'} = \&terminate; - $SIG{'INT'} = \&terminate; - $SIG{'HUP'} = \&null_handler; - $SIG{'USR1'} = \&debug_up_handler; - $SIG{'USR2'} = \&debug_down_handler; -} - -# Used perhaps to break out of a deep sleep. -sub null_handler { - my($signo) = @_; - logger("Received signal: ${signo}"); -} - -# Increase verbosity of debugging. -sub debug_up_handler { - my($signo) = @_; - $opts{debug}++; - logger("Received signal: ${signo}. Increasing debugging to $opts{debug}."); -} - -# Decrease verbosity of debugging. -sub debug_down_handler { - my($signo) = @_; - $opts{debug}--; - logger("Received signal: ${signo}. Decreasing debugging to $opts{debug}."); -} - -# Signal handler to go down recording the signal. -sub terminate { - my($signo) = @_; - use Config; - if (defined $Config{sig_name}) { - my $i = 0; - my @signame; - my %sig; - foreach my $name (split(' ', $Config{sig_name})) { - $signame[$i] = $name; - $sig{$name} = $i; - $i++; - } - $signo = $sig{$signo} if exists($sig{$signo}); - if ($signo =~ m{\A\d+\Z} ) { - logger("Going down on $signame[$signo] (${signo}) signal. " . - "Have a nice day!"); - } - } else { - logger("Going down on signal ${signo}). Have a nice day!"); - } - - $signo = 15 if $signo !~ m{\A\d+\Z}; - if ($opts{syslog}) { - use Sys::Syslog; - closelog; - } - exit $signo; -}; - -# Utility function for parsing/converting elapsed time into seconds. -sub elapsed2secs($) { - $_ = $_[0]; - - # Handle formats like: - # 1-08:34:37 -- One day, 8 hours, 34 minutes, 37 seconds - # 20:40:34 -- 20 hours, 40 minutes, 34 seconds - # 0:00 -- 0 seconds. - - # 1-08:34.37 -- One day, 8 hours, 34 minutes, 37 seconds - # 20:40.34 -- 20 hours, 40 minutes, 34 seconds - # 5.03 -- 5 minutes, 3 seconds. - # 5 -- 5 seconds. - - # Some easy cases. - return -1 if !defined($_) || m{\A\s*\Z}; - return $_ if m{\A\d+\Z}; - - # Originally had as one pattern and optional - # arguments but i got compaints about using - # uninitialized variables even with "no diagonstics". Would rather - # switch than fight. - my $min_secs_pat = '(\d{1,2})[:.](\d\d)'; - if (m{ - (\d{1,2})- # The number of days. e.g. 1- or 19- or blank - (\d{1,2})[:.] # The number of hrs. e.g. 01: or 23: or blank - $min_secs_pat - }x) { - my ($days, $hours, $minutes, $secs) = ($1, $2, $3, $4); - return ($days*DAYS + $hours*HOURS + $minutes*MINS + $secs); - } elsif (m{ - (\d{1,2})[:.] # The number of hrs. e.g. 01: or 23: or blank - $min_secs_pat - }x) { - my ($hours, $minutes, $secs) = ($1, $2, $3); - return ($hours*HOURS + $minutes*MINS + $secs); - } elsif (m{$min_secs_pat}) { - my ($minutes, $secs) = ($1, $2); - return ($minutes*MINS + $secs); - } else { - logger("Error in converting $_ to seconds"); - return -1; - } -} - -# Return time and PID as string in a common format -sub timestring() { - my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = - localtime(time); - $mon++; - return sprintf( "%.2d/%.2d/%.2d %.2d:%.2d:%.2d %s[$$]", - $mon, $mday, $year%100, $hour, $min, $sec, $program); -} - -# log error to syslog and print to STDERR. -sub logger($) { - my($msg) = shift; - - if ($opts{syslog}) { - if (!$logopened) { - use Sys::Syslog; - $logopened++; - openlog($program,'cons,pid', 'err'); - } - syslog('info', $msg); - } - if (defined($opts{logfile}) && $opts{logfile} ne $DEVNULL) { - my $ts=timestring(); - print STDERR "$ts: $msg\n"; - } -} - -sub debug_log($$) { - my($msg, $level) = @_; - logger("** debug ** $msg") if $opts{debug} >= $level; -} - -sub gather_psinfo() { - my @output=`$ps_cmd`; - return @output; -} - -# Show the CVS version id string and quit. -sub show_version() { - print "$vcid -Copyright (C) 2000, 2002, 2003, 2004, 2006 Rocky Bernstein. -This is free software; see the source for copying conditions. -There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. -"; - exit 10; -} - - -sub daemonize() { - chdir '/' or die "Can't chdir to /: $!"; - defined(my $pid = fork) or die "Can't fork: $!"; - exit 0 if $pid; - use POSIX qw(setsid); - setsid() or die "Can't start a new session: $!"; - umask 0; -} - -# Time configuration file was last read. -my $conf_time; - -# Read a configuration file. -sub read_config($) { - use Config::IniFiles; - my($cf)=@_; - if (!-f $cf || !-r _ || -z _ || !-T _) { - logger("Unusable config file: <$cf>"); - return undef; - } - - # Save time we read the configuration file so we can check back - # later to see if it changed. - - my($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, - $atime, $mtime, $ctime) = stat $cf; - $conf_time = $mtime; - - return new Config::IniFiles( -file => $cf ); -} - -# Check to see if any configuration file has changed -# since the last time this routime was called. -# Updates global $conf_time. -sub check_config_file($) { - my ($conf_file) = @_; - my($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, - $atime, $mtime, $ctime) = stat $opts{conf_file}; - if ( defined($conf_time) && defined($mtime) && $conf_time < $mtime ) { - logger("Configuration file $conf_file modified; re-reading..."); - $cfg = read_config($conf_file); - } -} - -sub run_trigger($$$) { - my($trigger, $action, $count) = @_; - my $etrigger=$trigger; - if ($trigger ne '1') { - $etrigger =~ s/"/\\"/g; - debug_log("trigger before substitution: $etrigger", 2); - $etrigger = eval qq/"$trigger"/; - } - debug_log("trigger after substitution: $etrigger", 2); - if (eval ($etrigger)) { - debug_log("action before substitution: $action", 2); - my $eaction=$action; - $eaction =~ s/"/\\"/g; - $eaction = eval qq/"$eaction"/; - debug_log("action after substitution: $eaction", 2); - my $output=`$eaction` if $opts{run}; - chomp($output); - logger($output) if $output; - } -} - -sub podthis() { - use Pod::Text; - $^W = 0; - pod2text $0; - exit 101; -} - -#-------------------------------------------------- -=pod - -=head1 NAME - -ps-watcher - monitors various processes based on ps-like information. - - -=head1 SYNOPSIS - -B [I...] - [C<--config>] I - -=head1 DESCRIPTION - -Periodically a list of processes obtained via C. More precisely -each item in the list contains the process name (just what's listed in -the "cmd" field, not the full command and arguments) and its process -id (pid). A configuration file specifies a list of Perl -regular-expression patterns to match the processes against. For each -match, a Perl expression specified for that pattern is evaluated. The -evaluated expression can refer to variables which are set by ps and -pertain to the matched process(es), for example the amount memory -consumed by the process, or the total elapsed time. Some other -variables are set by the program, such as the number of times the -process is running. If the Perl expression for a matched pattern -evaluates true, then an action can be run such as killing the program, -restarting it, or mailing an alert, or running some arbitrary Perl -code. - -Some things you might want to watch a daemon or process for: - -=over 2 - -=item * - -check that it is running (hasn't died) - -=item * - -ensure it is not running too many times - -=item * - -isn't consuming too much memory (perhaps a memory leak), or I/O - -=back - -Some actions you might want to take: - -=over 2 - -=item * - -restart a process - -=item * - -kill off rampant processes - -=item * - -send an alert about any of the conditions listed above - -=back - -Depending on options specfied, this program can be run as a daemon, -run once (which is suitable as a C job), or run not as a daemon -but still continuously (which may be handy in testing the program or -your configuration). - -=head2 OPTIONS - -=over 4 - -=item --help - -Print a usage message on standard error and exit with a return code -of 100. - -Z<> - -=item --doc - -Extact the full documentation that you are reading now, print it and -exit with a return code of 101. - -Z<> - -=item --version - -Print the version release on standard output and exit with a return -code of 10. - -Z<> - -=item --debug I - -Give debugging output. The higher the number, the more the output. The -default is 0 = none. 2 is the most debugging output. - -=item [--config] I - -Specify configuration file. . - -See L below for information on the format -of the configuration file and L for a complete -example of a configuration file. - -Z<> - -=item --log [I] - -Send or don't send error and debugging output to a log file. If option -is given but no logfile is specified, then use STDERR. The default is -no error log file. See also --syslog below. - -Z<> - -=item --syslog | --nosyslog - -Send or don't send error and debugging output to syslog. The default -is to syslog error and debug output. - -Z<> - -=item --daemon | --nodaemon - -Run or don't as a daemon. - -Z<> - -=item --path I - -Specify the executable search path used in running commands. - -=item --ps-prog I - -One can specify the command that gives ps information. By default, the -command is F. - -Z<> - -=item --run | --norun - -do/don't run actions go through the motions as though we were going -to. This may be useful in debugging. - -Z<> - -=item --sleep I - -It is expected that one might want to run ps-watcher over and over -again. In such instances one can specify the amount of time between -iterations with this option. - -If a negative number is specified the program is run only once. - -Z<> - -=back - -=head2 CONFIGURATION FILE MODIFICATION AND SIGNAL HANDLING - -Periodically ps-watcher checks to see if the configuration file -that it was run against has changed. If so, the program rereads the -configuration file. - -More precisely, the checks are done after waking up from a slumber. -If the sleep interval is long (or if you are impatient), you can -probably force the program to wake up using a HUP signal. - -At any time you can increase the level of debug output by sending a -USR1 signal to the ps-watcher process. Similarly you can decrease the -level of debug output by sending the process a USR2 signal. - -It is recommended that you terminate ps-watcher via an INT, TERM, or QUIT -signal. - -=head1 CONFIGURATION FILE FORMAT - -The format of a configuration file is a series of fully qualified -filenames enclosed in square brackets followed by a number of -parameter lines. Each parameter line has a parameter names followed by -an "equal" sign and finally value. That is: - - # This is a comment line - ; So is this. - [process-pattern1] - parameter1 = value1 - parameter2 = value2 - - [process-pattern2] - parameter1 = value3 - parameter2 = value4 - -Comments start with # or ; and take effect to the end of the line. - -This should be familiar to those who have worked with text-readible -Microsoft C<.INI> files. - -Note process patterns, (F and F -above) must be unique. If there are times when you may want to -refer to the same process, one can be creative to make these unique. -e.g. F and F<[c]ron> which refer to the same process even -though they I to be different. - -As quoted directly from the Config::IniFiles documentation: - -Multiline or multivalued fields may also be defined ala UNIX -"here document" syntax: - - Parameter=< match exactly, including any trailing -whitespace. - -There are two special "process patterns": $PROLOG and $EPILOG, the -former should appear first and the latter last. - -You can put perl code to initialize variables here and do cleanup -actions in these sections using "perl-action." - -A description of parameters names, their meanings and potential values -follows. - -=over - -=item trigger - -This parameter specifies the condition on which a process action is -fired. The condition is evaluated with Perl eval() and should -therefore return something which is equivalent to "true" in a Perl -expression. - -If no trigger is given in a section, true or 1 is assumed and -the action is unconditionally triggered. - -Example: - - # Match if httpd has not spawned enough (<4) times. NFS and databases - # daemons typically spawn child processes. Since the program - # matches against the command names, not commands and arguments, - # something like: ps -ef | grep httpd won't match the below. - # If you want to match against the command with arguments, see - # the example with $args below. - [httpd$] - trigger = $count <= 4 - -=item occurs - -This parameter specifies how many times an action should be performed -on processes matching the section trigger. Acceptable values are -"every", "first", "first-trigger", and "none". - -Setting the occurs value to "none" causes the the trigger to be -evaluated when there are no matching processes. Although one might -think "$count == 0" in the action expression would do the same thing, -currently as coded this does not work. - -Setting the occurs value to "first" causes the process-pattern rule to -be finished after handling the first rule that matches, whether or not the -trigger evaluated to true. - -Setting the occurs value to "first-trigger" causes the process-pattern -rule to be finished after handling the first rule that matches I -the trigger evaluates to true. - -If the item parameter is not specified, "first" is assumed. - -Examples: - - [.] - occurs = first - action = echo "You have $count processes running" - - # Note in the above since there is no trigger specified, - # occurs = first - # is the same thing as - # occurs = first-trigger - - [.?] - trigger = $vsz > 1000 - occurs = every - action = echo "Large program $command matches $ps_pat: $vsz KB" - - # Fire if /usr/sbin/syslogd is not running. - # Since the program matches against the command names, not commands and - # arguments, something like: - # ps -ef | grep /usr/sbin/syslogd - # won't match the below. - [(/usr/sbin/)?syslogd] - occurs = none - action = /etc/init.d/syslogd start - -=item action - -This specifies the action, a command that gets run by the system -shell, when the trigger condition is evaluated to be true. - -Example: - - action = /etc/init.d/market_loader.init restart - -=item perl-action - -This specifies Perl statements to be eval'd. This can be especially -useful in conjunction with $PROLOG and $EPILOG sections to make tests -across collections of process and do things which ps-watcher -would otherwise not be able to do. - -Example: - - # A Perl variable initialization. - # Since ps-watcher runs as a daemon it's a good idea - # to (re)initialize variables before each run. - [$PROLOG] - perl-action = $root_procs=0; - - # Keep track of how many root processes we are running - [.*] - perl-action = $root_procs++ if $uid == 0 - occurs = every - - # Show this count. - [$EPILOG] - action = echo "I counted $root_procs root processes" - -=back - -=head2 EXPANDED VARIABLES IN TRIGGER/ACTION CLAUSES - -Any variables defined in the program can be used in pattern or -action parameters. For example, C<$program> can be used to refer to -the name of this program ps-watcher. - -The following variables can be used in either the pattern or action -fields. - -=over - -=item $action - -A string containing the text of the action to run. - -Z<> - -=item $perl_action - -A string containing the text of the perl_action to run. - -Z<> - -=item $ps_pat - -The Perl regular expression specified in the beginning of the section. - -Z<> - -=item $command - -The command that matched $ps_pat. - -The Perl regular expression specified in the beginning of the section. -Normally processes will not have funny characters in them. Just in -case, backticks in $command are escaped. - -Example: - - # List processes other than emacs (which is a known pig) that use lots - # of virtual memory - - [.*] - trigger = $command !~ /emacs$/ && $vsz > 10 - action = echo \"Looks like you have a big \$command program: \$vsz KB\" - -Z<> - -=item $count - -The number of times the pattern matched. Presumably the number of -processes of this class running. - -Z<> - -=item $trigger - -A string containing the text of the trigger. - -=back - -A list of variables specific to this program or fields commonly found in -C output is listed below followed by a description of the more -common ones. See also C for a more complete -description of the meaning of the field. - - uid euid ruid gid egid rgid alarm blocked bsdtime c caught -cputime drs dsiz egroup eip esp etime euser f fgid -fgroup flag flags fname fsgid fsgroup fsuid fsuser fuid fuser -group ignored intpri lim longtname m_drs m_trs maj_flt majflt -min_flt minflt ni nice nwchan opri pagein pcpu pending pgid pgrp -pmem ppid pri rgroup rss rssize rsz ruser s sess session -sgi_p sgi_rss sgid sgroup sid sig sig_block sig_catch sig_ignore -sig_pend sigcatch sigignore sigmask stackp start start_stack start_time -stat state stime suid suser svgid svgroup svuid svuser sz time timeout -tmout tname tpgid trs trss tsiz tt tty tty4 tty8 uid_hack uname -user vsize vsz wchan - -Beware though, in some situations ps can return multiple lines for a -single process and we will use just one of these in the trigger. In -particular, Solaris's C will return a line for each LWP (light-weight -process). So on Solaris, if a trigger uses variable lwp, it may or may -not match depending on which single line of the multiple C lines is -used. - -Z<> - -=over - -=item $args - -The command along with its command arguments. It is possible that this -is might get truncated at certain length (if ps does likewise as is -the case on Solaris). - -Z<> - -=item $ppid - -The parent process id. - -Z<> - -=item $stime - -The start time of the process. - -Z<> - -=item $etime - -The end time of the process. - -Z<> - -=item $pmem - -The process memory. - -Z<> - -=item $pcpu - -The percent CPU utilization. - -Z<> - -=item $tty - -The controlling tty. - -Z<> - -=item $szv - -Virtual memory size of the process - -=back - -=head2 OTHER THINGS IN TRIGGER CLAUSES - -To make testing against elapsed time easier, a function C -has been written to parse and convert elapsed time strings in the -format C and a number of seconds. - -Some constants for the number of seconds in a minute, hour, or day -have also been defined. These are referred to as C, C, -and C respectively and they have the expected definitions: - - use constant MINS => 60; - use constant HOURS => 60*60; - use constant DAYS => HOURS * 24; - -Here is an example of the use of C: - - # Which processes have been running for more than 3 hours? - # Also note use of builtin-function elapsed2secs, variable $etime - # and builtin-function HOURS - [.] - trigger = elapsed2secs('$etime') > 1*DAYS - action = echo "$command has been running more than 1 day ($etime)" - occurs = every - -Please note the quotes around '$etime'. - -=head1 EXAMPLE CONFIGURATION - - # Comments start with # or ; and go to the end of the line. - - # The format for each entry is in Microsoft .INI form: - # [process-pattern] - # trigger = perl-expression - # action = program-and-arguments-to-run - - [httpd$] - trigger = $count < 4 - action = echo "$trigger fired -- You have $count httpd sessions." - - [.] - trigger = $vsz > 10 - action = echo "Looks like you have a big $command program: $vsz KB" - - # Unfortunately we have use a different pattern below. (Here we use - # ".?" instead of ".".) In effect the the two patterns mean - # test every process. - [.?] - trigger = elapsed2secs('$etime') > 2*MINS && $pcpu > 40 - occurs = every - action = < is active. We make -use of lsof to check port 3333 and the $PROLOG make sure it runs. - - [$PROLOG] - occurs = first - trigger = { \$x=`lsof -i :3333 >/dev/null 2>&1`; \$? >> 8 } - action = < - -For even more information and control try running the above under the -perl debugger, e.g. - -perl -d ps-watcher --log --nodaemon --sleep -1 --debug 2 I - -=head1 BUGS - -Well, some of these are not so much a bug in ps-watcher so much as a -challenge to getting ps-watcher to do what you want it to do. - -One common problem people run in into is understanding exactly what -the process variables mean. The manual page L should be of -help, but I've found some of the descriptions either a bit vague or -just plain lacking. - -Sometimes one will see this error message when debug tracing is turned on: - - ** debug ** Something wrong getting ps variables - -This just means that the process died betwee the time ps-watcher first -saw the existence of the process and the time that it queried -variables. - -=head1 SEE ALSO - -See also L and L. - -Another cool program doing ps-like things is C. Well okay, it's -another program I distributed. It shows the process tree dynamically -updated using X Motif and tries to display the output "attractively" -but fast. You can the find the homepage at -L and it download via -L - -=head1 AUTHOR - -Rocky Bernstein (rocky@cpan.org) - -=head1 COPYRIGHT - - Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006 - Rocky Bernstein, email: rocky@cpan.org. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 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., 675 Mass Ave, Cambridge, MA 02139, USA. diff --git a/ps-watcher.in.in b/ps-watcher.in.in deleted file mode 100755 index db12061..0000000 --- a/ps-watcher.in.in +++ /dev/null @@ -1,1278 +0,0 @@ -#!@PERL@ -w -# -*- Perl -*- -use diagnostics; -my $vcid='$Id: ps-watcher.in.in,v 1.57 2006/03/10 19:07:05 rockyb Exp $ '; -# See usage subroutine or perlpod documentation below. - -# Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006 -# Rocky Bernstein, email: rocky@cpan.org -# -# This program is free software; you can -# redistribute it and/or modify it under the terms of the GNU General -# Public License as published by the Free Software Foundation; either -# version 2 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -use vars qw($program $ps_cmd $ps_cmdfull $ps_fullcmd_fmt @ps_vars $ps_dvars - $0 $logopened $ps_args_fmt $args - $count $pid $command $ps_arg_opts $DEVNULL %opts - ); -use strict; -BEGIN { require 5.00503 } - -sub usage($) { - my ($full_help) = @_; - - print " -usage: - - $program [OPTIONS..] - -$program can be used to monitor various processes based on ps-like -information. - -options: - --help -- print this help and exit - --doc -- extract and print complete documentation and exit - --version -- show a CVS version string and exit - --debug *n* -- give debugging output. The higher the - number, the more the output - --run | --norun -- do/don't run actions - go through the motions as though we were going to - --log [*logfile*] -- Set a log file for this program. If option given - but no logfile, then use STDERR. Default is - no error log file. - --syslog | --nosyslog - -- send or don't send error output to syslog - Default is to send to syslog. - --config *cnf file* -- specify configuration file. - - --daemon | --nodaemon - -- do or don't become a daemon. Default daemonize. - --sleep *time* -- sleep interval between iterations. The default is - $opts{sleep_interval} seconds. - --path path -- executable search path to use in running commands - - --ps-prog *program* -- command that gets ps information. The default is: - $opts{ps_prog} - --ps-pids-opt *ps opts* - -- ps options that lists pids and commands. The - default is: $opts{ps_pid_opts} -"; - - if ($full_help) { - print " -General operation: - -Periodically a list of processes obtained via ps. More precisely -each item in the list contains the process name (just what's listed in -the \"command\" field, not the full command and arguments) and its -process id (pid). A configuration file specifies a list of Perl -regular-expression patterns to match the process names against. For -each match, a Perl expression specified for that pattern is -evaluated. The evaluated expression can refer to variables which are -set by ps and pertain to the matched process(es), for example the -amount memory consumed by the process, or the total elapsed time. Some -other variables are set by the program, such as the number of times -the process is running. If the Perl expression for a matched pattern -evaluates true, then an action can be run such as killing the program, -restarting it, or mailing an alert. - -This program can be used to ensure a daemon hasn't died or ensure it -is not running too many times. It might be used to determine when a -process has consumed too many resources (for example due to a memory -leak). - -The following variables can be used in patterns or actions: -\t". '$' . join("\n\t\$", @ps_vars) . -" - The following is a sample config file: - -# Comments start with # or ; and go to the end of the line. - -# The format for each entry is in Microsoft .INI form: -# [process-pattern] -# trigger = perl-expression -# action = program-and-arguments-to-run - -[httpd\$] - trigger = \$count < 4 - action = echo \"\$trigger fired -- You have \$count \$command sessions.\" - -[em?cs] -trigger = \$vsz > 10 -action = echo \"Looks like you have a big \$command program: \$vsz KB\" - -"; - } - exit 100; -} - -sub init(); -sub podthis(); -sub process_options(); -sub show_version(); -sub daemonize(); -sub eval_trigger_action($$$); -sub make_the_rounds($); -sub elapsed2secs($); -sub logger($); -sub debug_log($$); -sub gather_psinfo(); -sub read_config($); -sub check_config_file($); -sub run_trigger($$$); - -init(); -process_options(); - -# Unfurl the banner... -logger("Starting: $vcid"); - -my $cfg=read_config($opts{conf_file}); - -if (!defined($cfg)) { - for my $line (@Config::IniFiles::errors) { - logger($line); - } - exit 2; -} - -if ($opts{daemon}) { - daemonize(); -} - -install_handlers(); - -do { - make_the_rounds($cfg); - sleep $opts{sleep_interval} if $opts{sleep_interval} > 0; - check_config_file($opts{conf_file}); -} until ($opts{sleep_interval} < 0) ; -if ($opts{syslog}) { - use Sys::Syslog; - closelog; -} -exit 0; - -# Evaluates the trigger and if that's true also performs -# an action. 1 is returned if the action was performed, -# zero otherwise. -sub eval_trigger_action($$$) { - my ($trigger,$action,$perl_action) = @_; - my $etrigger=$trigger; - # It is a pain to predeclare all of the variables assigned - # by ps which is OS and ps specific. So we'll allow anything. - # Likewise, we'll allow it occur in $action. - no strict; - if ($trigger ne '1') { - $etrigger =~ s/"/\\"/g; - debug_log("trigger before substitution: $etrigger", 2); - $etrigger = eval qq/"$trigger"/; - } - debug_log("trigger after substitution: $etrigger", 2); - if (eval ($etrigger)) { - if (defined($perl_action)) { - debug_log("running Perl_action: $perl_action", 2); - eval($perl_action) if $opts{run}; - } - if (defined($action)) { - debug_log("action before substitution: $action", 2); - my $eaction=$action; - $eaction =~ s/"/\\"/g; - $eaction = eval qq/"$eaction"/; - debug_log("action after substitution: $eaction", 2); - my $output=`$eaction` if $opts{run}; - chomp($output); - logger($output) if $output; - } - return 1; - } - return 0; -} - -# Perform a round over the process_patterns comparing against the -# process info to see if anything's stirring. -sub make_the_rounds($) { - my $cfg = $_[0]; - my @ps_info=gather_psinfo(); - foreach our $ps_pat ($cfg->Sections()) { - debug_log("process pattern: /$ps_pat/", 1); - my @selected_ps; - my $in_prolog_epilog=0; - my $trigger = $cfg->val($ps_pat, 'trigger') || '1'; - my $action = $cfg->val($ps_pat, 'action'); - my $perl_action = $cfg->val($ps_pat, 'perl-action'); - my $occurs = $cfg->val($ps_pat, 'occurs') || "first"; - local $count; - if ($ps_pat =~ /^\$PROLOG/ || $ps_pat =~ /\$EPILOG/) { - # Set to run trigger below. - $count = @ps_info; - $in_prolog_epilog=1; - } else { - @selected_ps = grep(/$ps_pat/, @ps_info); - $count = @selected_ps; - debug_log("count for /$ps_pat/: $count", 2); - } - if ($in_prolog_epilog) { - # execute trigger - eval_trigger_action($trigger, $action, $perl_action); - } elsif ($occurs =~ /none/i) { - if ($count eq 0) { - # execute the trigger anyway - eval_trigger_action($trigger, $action, $perl_action); - } - } elsif ($count gt 0) { - TRIGGER: - foreach (@selected_ps) { - next if !/\s*(\d+)\s+(\S+)/; - local($pid, $command) = /\s*(\d+)\s+(\S+)/; - if ($pid !~ /\d+/) { - logger("Something wrong with ps format:\n$_"); - next; - } - - my $ps_fullcmd = sprintf $ps_fullcmd_fmt, $pid; - my @output = `$ps_fullcmd`; - my $output=''; - if (@output == 1) { - # Got one line of output - good. - $output=$output[0]; - # Make sure though we don't just have a title line. - # One of the fields should be just digits, e.g. ppid, uid, gud... - next if $output !~ m{\s+\d+\s+}; - } elsif (@output == 2 && @PS_NO_NULL_HEADER@) { - # Got two lines of output - we are running a ps where - # we can't remove the title line? - $output=$output[1]; - } elsif (@output > 1 && @PS_CAN_RETURN_MULTIPLE_LINES@) { - # Got multiple lines of output - we are running a ps which can - # do so. For example Solaris does this for a process that has many - # LWPs (light-weight processes). - $output=$output[0]; - } else { - debug_log("Something wrong getting ps variables", 1); - next; - } - - local $args = ''; - if ($ps_arg_opts) { - my $ps_argscmd = sprintf $ps_args_fmt, $pid; - my @output = `$ps_argscmd`; - if (@output == 1) { - $args=$output[0]; - } elsif (@output == 2 && @PS_NO_NULL_HEADER@) { - $args=$output[1]; - } else { - debug_log("Something wrong with getting command arguments", 1); - } - } - - # Process may have disappeared. In this case we'll get no - # output. - next if !$output; - - # Add ' ' so split will junk first ps_dvars $junk. - $output = ' ' . $output; - my $perl_ps_assign = "$ps_dvars = split(/\\s+/, \$output)"; - { - # It is a pain to predeclare all of the variables assigned - # by ps which is OS and ps specific. So we'll allow anything. - # Likewise, we'll allow it occur in $action. - no strict; - - # Escape backticks so that we don't inadvertently run - # the program. For example there could be a process named - # `/tmp/evilcommand` (with backticks). Thanks to Randal - # Schwartz for noticing the problem. - # Not sure if there are other things to watch out for. - # Although the Perl Cookbook suggests how to make system, - # safe, it is silent about making eval safe. - $command =~ s/`/\\`/g; - - if (eval ($perl_ps_assign)) { - my $evaled = eval_trigger_action($trigger, $action, - $perl_action); - last TRIGGER if $evaled && $occurs eq 'first-trigger'; - last TRIGGER if $occurs eq 'first'; - } else { - logger("Something wrong with perl assignment: $perl_ps_assign"); - last TRIGGER; - } - } # no strict - } # foreach - } # if $count - } -} - -# Initailize various variables variously. -sub init() { - - use File::Basename; - $program = basename($0); # Who am I today, anyway? - - $DEVNULL = '/dev/null'; # And what do we do about non Unix? - - use constant MINS => 60; - use constant HOURS => 60*60; - use constant DAYS => HOURS * 24; - - $opts{debug} = 0; # no debugging - $opts{run} = 1; # run actions - $opts{syslog} = 1; # Log errors to syslog - $opts{logfile} = $DEVNULL; - $opts{daemon} = 1; # Run as daemon; - $opts{ps_prog} = '@PS@'; # Where is ps? - $opts{ps_pid_opts} = '@PS_PID_OPTS@'; # How do I get pids and commands? - - $ps_arg_opts = '@PS_ARGS@'; # How do I get full process command? - - # List of all the fields from ps we will be able to use. Don't need - # to list variables listed above. - @ps_vars = qw ( @PS_VARS@ -); - - # Convert the above into an argument list like - # ($junk, $user, ... ) - # The first argument ($junk) will be null and thrown out. - $ps_dvars = '($junk,$' . join(',$', @ps_vars) . ')'; - - $opts{sleep_interval} = 300; - -} - -# The bane of programming. -sub process_options() { - use Getopt::Long; - my(@opt_cf); - $Getopt::Long::autoabbrev = 1; - my($newstyle_config); - - my ($help, $long_help, $show_version); - - my $result = &GetOptions - ( - 'help' => \$help, - 'doc' => \$long_help, - 'version' => \$show_version, - 'config=s' => \$opts{conf_file}, - 'debug=i' => \$opts{debug}, - 'path=s' => \$ENV{PATH}, - 'ps-pid-opts=s'=> \$opts{ps_pid_opts}, - 'ps-prog=s' => \$opts{ps_prog}, - 'sleep=i' => \$opts{sleep_interval}, - 'log:s' => \$opts{logfile}, - 'syslog!' => \$opts{syslog}, - 'run!' => \$opts{run}, - 'daemon!' => \$opts{daemon}, - ); - - show_version() if $show_version; - usage(1) if $help; - podthis() if $long_help; - - # However specifying a configuration file is not. - # Nor can we deal with multiple configuration files or tolerate - # option-processing errors. - usage(0) if !$result; - - # The option-specifier "--config" is optional... - if (@ARGV && !defined($opts{conf_file})) { - $opts{conf_file} = shift(@ARGV); - } - - # However we do have to give exactly one configurtion file. - if (!defined($opts{conf_file}) || @ARGV != 0) { - print STDERR "$program: Please specify exactly one configuration file.\n"; - usage(0); - } - - $ps_cmd = "$opts{ps_prog} $opts{ps_pid_opts}"; - my $ps_vars; - if (@PS_CUSTOM_HEADER@) { - $ps_vars = join('= -o ', @ps_vars) . '='; - } else { - $ps_vars = join(' -o ', @ps_vars); - } - - if ('@PS_FULLCMD_FMT@') { - $ps_fullcmd_fmt = "@PS_FULLCMD_FMT@"; - } else { - $ps_fullcmd_fmt = "$opts{ps_prog} -p %d -o $ps_vars"; - } - if ('@PS_ARGS_FMT@') { - $ps_args_fmt = "@PS_ARGS_FMT@"; - } else { - $ps_args_fmt = "$opts{ps_prog} -p %d $ps_arg_opts"; - } - - open STDIN, $DEVNULL or die "Can't read $DEVNULL: $!"; - open STDOUT, ">>$opts{logfile}" or die "Can't write to $opts{logfile}: $!" - if $opts{logfile} ne ''; - open STDERR, ">>$opts{logfile}" or die "Can't write to $opts{logfile}: $!" - if $opts{logfile} ne ''; -} - -# Signal handling.. -sub install_handlers { - $SIG{'QUIT'} = \&terminate; - $SIG{'TERM'} = \&terminate; - $SIG{'INT'} = \&terminate; - $SIG{'HUP'} = \&null_handler; - $SIG{'USR1'} = \&debug_up_handler; - $SIG{'USR2'} = \&debug_down_handler; -} - -# Used perhaps to break out of a deep sleep. -sub null_handler { - my($signo) = @_; - logger("Received signal: ${signo}"); -} - -# Increase verbosity of debugging. -sub debug_up_handler { - my($signo) = @_; - $opts{debug}++; - logger("Received signal: ${signo}. Increasing debugging to $opts{debug}."); -} - -# Decrease verbosity of debugging. -sub debug_down_handler { - my($signo) = @_; - $opts{debug}--; - logger("Received signal: ${signo}. Decreasing debugging to $opts{debug}."); -} - -# Signal handler to go down recording the signal. -sub terminate { - my($signo) = @_; - use Config; - if (defined $Config{sig_name}) { - my $i = 0; - my @signame; - my %sig; - foreach my $name (split(' ', $Config{sig_name})) { - $signame[$i] = $name; - $sig{$name} = $i; - $i++; - } - $signo = $sig{$signo} if exists($sig{$signo}); - if ($signo =~ m{\A\d+\Z} ) { - logger("Going down on $signame[$signo] (${signo}) signal. " . - "Have a nice day!"); - } - } else { - logger("Going down on signal ${signo}). Have a nice day!"); - } - - $signo = 15 if $signo !~ m{\A\d+\Z}; - if ($opts{syslog}) { - use Sys::Syslog; - closelog; - } - exit $signo; -}; - -# Utility function for parsing/converting elapsed time into seconds. -sub elapsed2secs($) { - $_ = $_[0]; - - # Handle formats like: - # 1-08:34:37 -- One day, 8 hours, 34 minutes, 37 seconds - # 20:40:34 -- 20 hours, 40 minutes, 34 seconds - # 0:00 -- 0 seconds. - - # 1-08:34.37 -- One day, 8 hours, 34 minutes, 37 seconds - # 20:40.34 -- 20 hours, 40 minutes, 34 seconds - # 5.03 -- 5 minutes, 3 seconds. - # 5 -- 5 seconds. - - # Some easy cases. - return -1 if !defined($_) || m{\A\s*\Z}; - return $_ if m{\A\d+\Z}; - - # Originally had as one pattern and optional - # arguments but i got compaints about using - # uninitialized variables even with "no diagonstics". Would rather - # switch than fight. - my $min_secs_pat = '(\d{1,2})[:.](\d\d)'; - if (m{ - (\d{1,2})- # The number of days. e.g. 1- or 19- or blank - (\d{1,2})[:.] # The number of hrs. e.g. 01: or 23: or blank - $min_secs_pat - }x) { - my ($days, $hours, $minutes, $secs) = ($1, $2, $3, $4); - return ($days*DAYS + $hours*HOURS + $minutes*MINS + $secs); - } elsif (m{ - (\d{1,2})[:.] # The number of hrs. e.g. 01: or 23: or blank - $min_secs_pat - }x) { - my ($hours, $minutes, $secs) = ($1, $2, $3); - return ($hours*HOURS + $minutes*MINS + $secs); - } elsif (m{$min_secs_pat}) { - my ($minutes, $secs) = ($1, $2); - return ($minutes*MINS + $secs); - } else { - logger("Error in converting $_ to seconds"); - return -1; - } -} - -# Return time and PID as string in a common format -sub timestring() { - my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = - localtime(time); - $mon++; - return sprintf( "%.2d/%.2d/%.2d %.2d:%.2d:%.2d %s[$$]", - $mon, $mday, $year%100, $hour, $min, $sec, $program); -} - -# log error to syslog and print to STDERR. -sub logger($) { - my($msg) = shift; - - if ($opts{syslog}) { - if (!$logopened) { - use Sys::Syslog; - $logopened++; - openlog($program,'cons,pid', 'err'); - } - syslog('info', $msg); - } - if (defined($opts{logfile}) && $opts{logfile} ne $DEVNULL) { - my $ts=timestring(); - print STDERR "$ts: $msg\n"; - } -} - -sub debug_log($$) { - my($msg, $level) = @_; - logger("** debug ** $msg") if $opts{debug} >= $level; -} - -sub gather_psinfo() { - my @output=`$ps_cmd`; - return @output; -} - -# Show the CVS version id string and quit. -sub show_version() { - print "$vcid -Copyright (C) 2000, 2002, 2003, 2004, 2006 Rocky Bernstein. -This is free software; see the source for copying conditions. -There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. -"; - exit 10; -} - - -sub daemonize() { - chdir '/' or die "Can't chdir to /: $!"; - defined(my $pid = fork) or die "Can't fork: $!"; - exit 0 if $pid; - use POSIX qw(setsid); - setsid() or die "Can't start a new session: $!"; - umask 0; -} - -# Time configuration file was last read. -my $conf_time; - -# Read a configuration file. -sub read_config($) { - use Config::IniFiles; - my($cf)=@_; - if (!-f $cf || !-r _ || -z _ || !-T _) { - logger("Unusable config file: <$cf>"); - return undef; - } - - # Save time we read the configuration file so we can check back - # later to see if it changed. - - my($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, - $atime, $mtime, $ctime) = stat $cf; - $conf_time = $mtime; - - return new Config::IniFiles( -file => $cf ); -} - -# Check to see if any configuration file has changed -# since the last time this routime was called. -# Updates global $conf_time. -sub check_config_file($) { - my ($conf_file) = @_; - my($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, - $atime, $mtime, $ctime) = stat $opts{conf_file}; - if ( defined($conf_time) && defined($mtime) && $conf_time < $mtime ) { - logger("Configuration file $conf_file modified; re-reading..."); - $cfg = read_config($conf_file); - } -} - -sub run_trigger($$$) { - my($trigger, $action, $count) = @_; - my $etrigger=$trigger; - if ($trigger ne '1') { - $etrigger =~ s/"/\\"/g; - debug_log("trigger before substitution: $etrigger", 2); - $etrigger = eval qq/"$trigger"/; - } - debug_log("trigger after substitution: $etrigger", 2); - if (eval ($etrigger)) { - debug_log("action before substitution: $action", 2); - my $eaction=$action; - $eaction =~ s/"/\\"/g; - $eaction = eval qq/"$eaction"/; - debug_log("action after substitution: $eaction", 2); - my $output=`$eaction` if $opts{run}; - chomp($output); - logger($output) if $output; - } -} - -sub podthis() { - use Pod::Text; - $^W = 0; - pod2text $0; - exit 101; -} - -#-------------------------------------------------- -=pod - -=head1 NAME - -@PACKAGE@ - monitors various processes based on ps-like information. - - -=head1 SYNOPSIS - -B<@PACKAGE@> [I...] - [C<--config>] I - -=head1 DESCRIPTION - -Periodically a list of processes obtained via C. More precisely -each item in the list contains the process name (just what's listed in -the "cmd" field, not the full command and arguments) and its process -id (pid). A configuration file specifies a list of Perl -regular-expression patterns to match the processes against. For each -match, a Perl expression specified for that pattern is evaluated. The -evaluated expression can refer to variables which are set by ps and -pertain to the matched process(es), for example the amount memory -consumed by the process, or the total elapsed time. Some other -variables are set by the program, such as the number of times the -process is running. If the Perl expression for a matched pattern -evaluates true, then an action can be run such as killing the program, -restarting it, or mailing an alert, or running some arbitrary Perl -code. - -Some things you might want to watch a daemon or process for: - -=over 2 - -=item * - -check that it is running (hasn't died) - -=item * - -ensure it is not running too many times - -=item * - -isn't consuming too much memory (perhaps a memory leak), or I/O - -=back - -Some actions you might want to take: - -=over 2 - -=item * - -restart a process - -=item * - -kill off rampant processes - -=item * - -send an alert about any of the conditions listed above - -=back - -Depending on options specfied, this program can be run as a daemon, -run once (which is suitable as a C job), or run not as a daemon -but still continuously (which may be handy in testing the program or -your configuration). - -=head2 OPTIONS - -=over 4 - -=item --help - -Print a usage message on standard error and exit with a return code -of 100. - -Z<> - -=item --doc - -Extact the full documentation that you are reading now, print it and -exit with a return code of 101. - -Z<> - -=item --version - -Print the version release on standard output and exit with a return -code of 10. - -Z<> - -=item --debug I - -Give debugging output. The higher the number, the more the output. The -default is 0 = none. 2 is the most debugging output. - -=item [--config] I - -Specify configuration file. . - -See L below for information on the format -of the configuration file and L for a complete -example of a configuration file. - -Z<> - -=item --log [I] - -Send or don't send error and debugging output to a log file. If option -is given but no logfile is specified, then use STDERR. The default is -no error log file. See also --syslog below. - -Z<> - -=item --syslog | --nosyslog - -Send or don't send error and debugging output to syslog. The default -is to syslog error and debug output. - -Z<> - -=item --daemon | --nodaemon - -Run or don't as a daemon. - -Z<> - -=item --path I - -Specify the executable search path used in running commands. - -=item --ps-prog I - -One can specify the command that gives ps information. By default, the -command is F<@PS@>. - -Z<> - -=item --run | --norun - -do/don't run actions go through the motions as though we were going -to. This may be useful in debugging. - -Z<> - -=item --sleep I - -It is expected that one might want to run @PACKAGE@ over and over -again. In such instances one can specify the amount of time between -iterations with this option. - -If a negative number is specified the program is run only once. - -Z<> - -=back - -=head2 CONFIGURATION FILE MODIFICATION AND SIGNAL HANDLING - -Periodically @PACKAGE@ checks to see if the configuration file -that it was run against has changed. If so, the program rereads the -configuration file. - -More precisely, the checks are done after waking up from a slumber. -If the sleep interval is long (or if you are impatient), you can -probably force the program to wake up using a HUP signal. - -At any time you can increase the level of debug output by sending a -USR1 signal to the @PACKAGE@ process. Similarly you can decrease the -level of debug output by sending the process a USR2 signal. - -It is recommended that you terminate @PACKAGE@ via an INT, TERM, or QUIT -signal. - -=head1 CONFIGURATION FILE FORMAT - -The format of a configuration file is a series of fully qualified -filenames enclosed in square brackets followed by a number of -parameter lines. Each parameter line has a parameter names followed by -an "equal" sign and finally value. That is: - - # This is a comment line - ; So is this. - [process-pattern1] - parameter1 = value1 - parameter2 = value2 - - [process-pattern2] - parameter1 = value3 - parameter2 = value4 - -Comments start with # or ; and take effect to the end of the line. - -This should be familiar to those who have worked with text-readible -Microsoft C<.INI> files. - -Note process patterns, (F and F -above) must be unique. If there are times when you may want to -refer to the same process, one can be creative to make these unique. -e.g. F and F<[c]ron> which refer to the same process even -though they I to be different. - -As quoted directly from the Config::IniFiles documentation: - -Multiline or multivalued fields may also be defined ala UNIX -"here document" syntax: - - Parameter=< match exactly, including any trailing -whitespace. - -There are two special "process patterns": $PROLOG and $EPILOG, the -former should appear first and the latter last. - -You can put perl code to initialize variables here and do cleanup -actions in these sections using "perl-action." - -A description of parameters names, their meanings and potential values -follows. - -=over - -=item trigger - -This parameter specifies the condition on which a process action is -fired. The condition is evaluated with Perl eval() and should -therefore return something which is equivalent to "true" in a Perl -expression. - -If no trigger is given in a section, true or 1 is assumed and -the action is unconditionally triggered. - -Example: - - # Match if httpd has not spawned enough (<4) times. NFS and databases - # daemons typically spawn child processes. Since the program - # matches against the command names, not commands and arguments, - # something like: ps -ef | grep httpd won't match the below. - # If you want to match against the command with arguments, see - # the example with $args below. - [httpd$] - trigger = $count <= 4 - -=item occurs - -This parameter specifies how many times an action should be performed -on processes matching the section trigger. Acceptable values are -"every", "first", "first-trigger", and "none". - -Setting the occurs value to "none" causes the the trigger to be -evaluated when there are no matching processes. Although one might -think "$count == 0" in the action expression would do the same thing, -currently as coded this does not work. - -Setting the occurs value to "first" causes the process-pattern rule to -be finished after handling the first rule that matches, whether or not the -trigger evaluated to true. - -Setting the occurs value to "first-trigger" causes the process-pattern -rule to be finished after handling the first rule that matches I -the trigger evaluates to true. - -If the item parameter is not specified, "first" is assumed. - -Examples: - - [.] - occurs = first - action = echo "You have $count processes running" - - # Note in the above since there is no trigger specified, - # occurs = first - # is the same thing as - # occurs = first-trigger - - [.?] - trigger = $vsz > 1000 - occurs = every - action = echo "Large program $command matches $ps_pat: $vsz KB" - - # Fire if /usr/sbin/syslogd is not running. - # Since the program matches against the command names, not commands and - # arguments, something like: - # ps -ef | grep /usr/sbin/syslogd - # won't match the below. - [(/usr/sbin/)?syslogd] - occurs = none - action = /etc/init.d/syslogd start - -=item action - -This specifies the action, a command that gets run by the system -shell, when the trigger condition is evaluated to be true. - -Example: - - action = /etc/init.d/market_loader.init restart - -=item perl-action - -This specifies Perl statements to be eval'd. This can be especially -useful in conjunction with $PROLOG and $EPILOG sections to make tests -across collections of process and do things which @PACKAGE@ -would otherwise not be able to do. - -Example: - - # A Perl variable initialization. - # Since @PACKAGE@ runs as a daemon it's a good idea - # to (re)initialize variables before each run. - [$PROLOG] - perl-action = $root_procs=0; - - # Keep track of how many root processes we are running - [.*] - perl-action = $root_procs++ if $uid == 0 - occurs = every - - # Show this count. - [$EPILOG] - action = echo "I counted $root_procs root processes" - -=back - -=head2 EXPANDED VARIABLES IN TRIGGER/ACTION CLAUSES - -Any variables defined in the program can be used in pattern or -action parameters. For example, C<$program> can be used to refer to -the name of this program @PACKAGE@. - -The following variables can be used in either the pattern or action -fields. - -=over - -=item $action - -A string containing the text of the action to run. - -Z<> - -=item $perl_action - -A string containing the text of the perl_action to run. - -Z<> - -=item $ps_pat - -The Perl regular expression specified in the beginning of the section. - -Z<> - -=item $command - -The command that matched $ps_pat. - -The Perl regular expression specified in the beginning of the section. -Normally processes will not have funny characters in them. Just in -case, backticks in $command are escaped. - -Example: - - # List processes other than emacs (which is a known pig) that use lots - # of virtual memory - - [.*] - trigger = $command !~ /emacs$/ && $vsz > 10 - action = echo \"Looks like you have a big \$command program: \$vsz KB\" - -Z<> - -=item $count - -The number of times the pattern matched. Presumably the number of -processes of this class running. - -Z<> - -=item $trigger - -A string containing the text of the trigger. - -=back - -A list of variables specific to this program or fields commonly found in -C output is listed below followed by a description of the more -common ones. See also C for a more complete -description of the meaning of the field. - - @PS_VARS@ - -Beware though, in some situations ps can return multiple lines for a -single process and we will use just one of these in the trigger. In -particular, Solaris's C will return a line for each LWP (light-weight -process). So on Solaris, if a trigger uses variable lwp, it may or may -not match depending on which single line of the multiple C lines is -used. - -Z<> - -=over - -=item $args - -The command along with its command arguments. It is possible that this -is might get truncated at certain length (if ps does likewise as is -the case on Solaris). - -Z<> - -=item $ppid - -The parent process id. - -Z<> - -=item $stime - -The start time of the process. - -Z<> - -=item $etime - -The end time of the process. - -Z<> - -=item $pmem - -The process memory. - -Z<> - -=item $pcpu - -The percent CPU utilization. - -Z<> - -=item $tty - -The controlling tty. - -Z<> - -=item $szv - -Virtual memory size of the process - -=back - -=head2 OTHER THINGS IN TRIGGER CLAUSES - -To make testing against elapsed time easier, a function C -has been written to parse and convert elapsed time strings in the -format C and a number of seconds. - -Some constants for the number of seconds in a minute, hour, or day -have also been defined. These are referred to as C, C, -and C respectively and they have the expected definitions: - - use constant MINS => 60; - use constant HOURS => 60*60; - use constant DAYS => HOURS * 24; - -Here is an example of the use of C: - - # Which processes have been running for more than 3 hours? - # Also note use of builtin-function elapsed2secs, variable $etime - # and builtin-function HOURS - [.] - trigger = elapsed2secs('$etime') > 1*DAYS - action = echo "$command has been running more than 1 day ($etime)" - occurs = every - -Please note the quotes around '$etime'. - -=head1 EXAMPLE CONFIGURATION - - # Comments start with # or ; and go to the end of the line. - - # The format for each entry is in Microsoft .INI form: - # [process-pattern] - # trigger = perl-expression - # action = program-and-arguments-to-run - - [httpd$] - trigger = $count < 4 - action = echo "$trigger fired -- You have $count httpd sessions." - - [.] - trigger = $vsz > 10 - action = echo "Looks like you have a big $command program: $vsz KB" - - # Unfortunately we have use a different pattern below. (Here we use - # ".?" instead of ".".) In effect the the two patterns mean - # test every process. - [.?] - trigger = elapsed2secs('$etime') > 2*MINS && $pcpu > 40 - occurs = every - action = < is active. We make -use of lsof to check port 3333 and the $PROLOG make sure it runs. - - [$PROLOG] - occurs = first - trigger = { \$x=`lsof -i :3333 >/dev/null 2>&1`; \$? >> 8 } - action = < - -For even more information and control try running the above under the -perl debugger, e.g. - -perl -d @PACKAGE@ --log --nodaemon --sleep -1 --debug 2 I - -=head1 BUGS - -Well, some of these are not so much a bug in @PACKAGE@ so much as a -challenge to getting @PACKAGE@ to do what you want it to do. - -One common problem people run in into is understanding exactly what -the process variables mean. The manual page L should be of -help, but I've found some of the descriptions either a bit vague or -just plain lacking. - -Sometimes one will see this error message when debug tracing is turned on: - - ** debug ** Something wrong getting ps variables - -This just means that the process died betwee the time @PACKAGE@ first -saw the existence of the process and the time that it queried -variables. - -=head1 SEE ALSO - -See also L and L. - -Another cool program doing ps-like things is C. Well okay, it's -another program I distributed. It shows the process tree dynamically -updated using X Motif and tries to display the output "attractively" -but fast. You can the find the homepage at -L and it download via -L - -=head1 AUTHOR - -Rocky Bernstein (rocky@cpan.org) - -=head1 COPYRIGHT - - Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006 - Rocky Bernstein, email: rocky@cpan.org. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 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., 675 Mass Ave, Cambridge, MA 02139, USA. diff --git a/samples/README b/samples/README deleted file mode 100644 index 839bcb4..0000000 --- a/samples/README +++ /dev/null @@ -1,10 +0,0 @@ -sample.ini - you can use this as a template to make other configuration - files. It has lots of comments at the beginning to remind - you of what's allowed -sample2.ini - sample configuration file to alert when more than 10% - of a processes is in use. -solaris.ini - System processes that you might want to check on, customized - for Solaris. Checks that cron and syslogd are running, - and that no process uses more than 70% of the available CPU. - -$Id: README,v 1.2 2000/04/09 20:40:43 rocky Exp $ \ No newline at end of file diff --git a/samples/port-watch.ini b/samples/port-watch.ini deleted file mode 100644 index 7517ecb..0000000 --- a/samples/port-watch.ini +++ /dev/null @@ -1,13 +0,0 @@ -# $Id: port-watch.ini,v 1.1 2004/09/07 13:51:08 rockyb Exp $ - -# Here is an example to show how to use ps-watcher to do something -# not really possible from ps: check to see if a *port* is active. -# We make use of lsof to check port 3333 and the $PROLOG make -# sure it runs. - -[$PROLOG] - occurs = first - trigger = { \$x=`lsof -i :3333 >/dev/null 2>&1`; \$? >> 8 } - action = < 1*DAYS - action = echo "$command has been running more than 1 day ($etime)" - occurs = every - -[^] - trigger = $vsz > 8000 - occurs = every - action = echo "Large program $command (pid $pid) matches /$ps_pat/: $vsz KB" - -# Scripts don't show as the script name as the command name on some -# operating systems. Rather the name of the interpreter is listed -# (e.g. bash or perl) Here's how you can match against a script. Note -# escaping $ in the trigger but not the action. - -# Note: BSD/OS on the other hand give the script name rather than the -# interpreter name. - -[/usr/bin/perl] - trigger = \$args !~ /ps-watcher/ - occurs = every - action = echo "***found perl program ${pid}:\n $args" - diff --git a/samples/sample2.ini b/samples/sample2.ini deleted file mode 100644 index 7725155..0000000 --- a/samples/sample2.ini +++ /dev/null @@ -1,4 +0,0 @@ -[.] - trigger = $pcpu > 10 - action = echo "$command using $pcpu% CPU" | /bin/mail root - diff --git a/samples/solaris.ini b/samples/solaris.ini deleted file mode 100644 index 9ddc74a..0000000 --- a/samples/solaris.ini +++ /dev/null @@ -1,18 +0,0 @@ -# $Id: solaris.ini,v 1.3 2000/04/09 20:40:21 rocky Exp $ -# Processes one might want to monitor under Solaris - -[(/usr/sbin/)?cron] - trigger = $count=1 - action = echo "$command not running" | /usr/ucb/mail -s "$command down" root - -[(/usr/sbin/)?sylogd] - trigger = $count=1 - action = echo "$command not running" | /usr/ucb/mail -s "$command down" root - -[.] - trigger = $pcpu > 70 - occurs = every - action = < "Test::Pod 1.14 required for testing POD" if $@; -all_pod_files_ok(catfile($top_builddir, "ps-watcher")); diff --git a/tests/01.pod.t.in b/tests/01.pod.t.in deleted file mode 100644 index b288d82..0000000 --- a/tests/01.pod.t.in +++ /dev/null @@ -1,9 +0,0 @@ -#!@PERL@ -w -T -*- Perl -*- -# $Id: 01.pod.t.in,v 1.1 2006/03/09 17:37:31 rockyb Exp $ -my $top_builddir = $ENV{top_builddir} ? $ENV{top_builddir} : '..'; - -use Test::More; -use File::Spec::Functions; -eval "use Test::Pod 1.14"; -plan skip_all => "Test::Pod 1.14 required for testing POD" if $@; -all_pod_files_ok(catfile($top_builddir, "@PACKAGE@")); diff --git a/tests/Makefile.am b/tests/Makefile.am deleted file mode 100644 index e84499e..0000000 --- a/tests/Makefile.am +++ /dev/null @@ -1,38 +0,0 @@ -############################################################################## -# $Id: Makefile.am,v 1.9 2006/03/09 17:37:31 rockyb Exp $ -# Copyright (C) 2003, 2004, 2006 Rocky Bernstein -# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -############################################################################## - -MOSTLYCLEANFILES = *~ - -# The keeps automake from substituting PS_VARS -PS_VARS = '' - -check_SCRIPTS = 01.pod.t args.t basic.t count.t full.t paction.t - -check_DATA = args.cnf basic.cnf \ - count.cnf full.cnf paction.cnf - -EXTRA_DIST = $(check_SCRIPTS) $(check_DATA) \ - 01.pod.t.in args.t.in basic.cnf.in count.t.in driver - -all: - -check: test - -test: - srcdir=$(srcdir); export srcdir; \ - $(PERL) $(srcdir)/driver diff --git a/tests/Makefile.in b/tests/Makefile.in deleted file mode 100644 index 4558c8c..0000000 --- a/tests/Makefile.in +++ /dev/null @@ -1,332 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 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@ - -############################################################################## -# $Id: Makefile.am,v 1.9 2006/03/09 17:37:31 rockyb Exp $ -# Copyright (C) 2003, 2004, 2006 Rocky Bernstein -# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -############################################################################## -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -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@ -subdir = tests -DIST_COMMON = $(srcdir)/01.pod.t.in $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/args.t.in \ - $(srcdir)/basic.cnf.in $(srcdir)/basic.t.in \ - $(srcdir)/count.t.in $(srcdir)/full.t.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_CLEAN_FILES = 01.pod.t args.t basic.t count.t full.t basic.cnf -SOURCES = -DIST_SOURCES = -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CVS2CL = @CVS2CL@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ -MAKEINFO = @MAKEINFO@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PERL = @PERL@ -PS = @PS@ -PS_ARGS = @PS_ARGS@ -PS_ARGS_FMT = @PS_ARGS_FMT@ -PS_CAN_RETURN_MULTIPLE_LINES = @PS_CAN_RETURN_MULTIPLE_LINES@ -PS_CUSTOM_HEADER = @PS_CUSTOM_HEADER@ -PS_FULLCMD_FMT = @PS_FULLCMD_FMT@ -PS_NO_NULL_HEADER = @PS_NO_NULL_HEADER@ -PS_PID_OPTS = @PS_PID_OPTS@ -PS_TIME_VAR = @PS_TIME_VAR@ - -# The keeps automake from substituting PS_VARS -PS_VARS = '' -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__leading_dot = @am__leading_dot@ -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@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -MOSTLYCLEANFILES = *~ -check_SCRIPTS = 01.pod.t args.t basic.t count.t full.t paction.t -check_DATA = args.cnf basic.cnf \ - count.cnf full.cnf paction.cnf - -EXTRA_DIST = $(check_SCRIPTS) $(check_DATA) \ - 01.pod.t.in args.t.in basic.cnf.in count.t.in driver - -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu tests/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -01.pod.t: $(top_builddir)/config.status $(srcdir)/01.pod.t.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -args.t: $(top_builddir)/config.status $(srcdir)/args.t.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -basic.t: $(top_builddir)/config.status $(srcdir)/basic.t.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -count.t: $(top_builddir)/config.status $(srcdir)/count.t.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -full.t: $(top_builddir)/config.status $(srcdir)/full.t.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -basic.cnf: $(top_builddir)/config.status $(srcdir)/basic.cnf.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -uninstall-info-am: -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_SCRIPTS) $(check_DATA) -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: - -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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 - -info: info-am - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-am - -install-man: - -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: uninstall-info-am - -.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-exec \ - install-exec-am install-info install-info-am install-man \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-info-am - - -all: - -check: test - -test: - srcdir=$(srcdir); export srcdir; \ - $(PERL) $(srcdir)/driver -# 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: diff --git a/tests/args.cnf b/tests/args.cnf deleted file mode 100644 index 2836a33..0000000 --- a/tests/args.cnf +++ /dev/null @@ -1,13 +0,0 @@ -# Scripts on some OS's don't show as the script name as the command name. -# Rather the name of the interpreter is listed (e.g. bash or perl) -# Here's how you can match against a script. -# Look for my processes: ps-watcher. -[perl] - trigger = \$args =~ /ps-watcher --log/ - action = echo "ok 1" - occurs = every -# On BSD/OS the name of the script rather than the interpreter is show. -[ps-watcher] - trigger = \$args =~ /ps-watcher --log/ - action = echo "ok 1" - occurs = every diff --git a/tests/args.t b/tests/args.t deleted file mode 100755 index 411ee8c..0000000 --- a/tests/args.t +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/perl -w -# $Id: args.t.in,v 1.8 2006/03/10 13:12:36 rockyb Exp $ -# Arg checks -use strict; -use Test::More; -use Config; - -if ('cygwin' eq $Config{osname}) { - plan( skip_all => "cygwin's ps is not powerful enough this test"); - exit 0; -} - -plan( tests => 2); - -my $test='args'; - -my $srcdir = $ENV{srcdir} ? $ENV{srcdir} : '.'; -my $cmd = "/usr/bin/perl ../ps-watcher --log --nosyslog --nodaemon " - . " --sleep -1 --config ${srcdir}/$test.cnf"; -my @output = `$cmd 2>&1`; - -# First line is Id line. This doesn't count in testing. -shift @output; - -my $count=0; -foreach (@output) { - if (/^.+:\s+.*ok/) { - s/.+:\s+//; - ok(1, "Saw first matching process"); - $count++; - last; - } -} -ok($count>0, "Saw more than one matching process"); - -#;;; Local Variables: *** -#;;; mode:perl *** -#;;; End: *** diff --git a/tests/args.t.in b/tests/args.t.in deleted file mode 100644 index ecfb7f7..0000000 --- a/tests/args.t.in +++ /dev/null @@ -1,38 +0,0 @@ -#!@PERL@ -w -# $Id: args.t.in,v 1.8 2006/03/10 13:12:36 rockyb Exp $ -# Arg checks -use strict; -use Test::More; -use Config; - -if ('cygwin' eq $Config{osname}) { - plan( skip_all => "cygwin's ps is not powerful enough this test"); - exit 0; -} - -plan( tests => 2); - -my $test='args'; - -my $srcdir = $ENV{srcdir} ? $ENV{srcdir} : '.'; -my $cmd = "@PERL@ ../ps-watcher --log --nosyslog --nodaemon " - . " --sleep -1 --config ${srcdir}/$test.cnf"; -my @output = `$cmd 2>&1`; - -# First line is Id line. This doesn't count in testing. -shift @output; - -my $count=0; -foreach (@output) { - if (/^.+:\s+.*ok/) { - s/.+:\s+//; - ok(1, "Saw first matching process"); - $count++; - last; - } -} -ok($count>0, "Saw more than one matching process"); - -#;;; Local Variables: *** -#;;; mode:perl *** -#;;; End: *** diff --git a/tests/basic.cnf b/tests/basic.cnf deleted file mode 100644 index ff0282d..0000000 --- a/tests/basic.cnf +++ /dev/null @@ -1,27 +0,0 @@ -# $Id: basic.cnf.in,v 1.4 2005/04/04 23:50:58 rockyb Exp $ -# We gotta have at least two processes running. Like the OS -# and the ps-watcher program -[.] - trigger = $count > 1 - action = echo "ok 1" - occurs = first - -# Look for my processes -[perl] - action = echo "ok 2" || echo "$ps_pat" - -[.?] - trigger = elapsed2secs('$etime') >= 0 - action = echo "ok 3" - occurs = first - -# I'm assuming there is no process with just a single space. -[^ $] - action = echo "ok 4" - occurs = none - -# Test to see if first-trigger works. -[.*] - trigger = $pid == $$ - action = echo "ok 5" - occurs = first-trigger diff --git a/tests/basic.cnf.in b/tests/basic.cnf.in deleted file mode 100644 index 7ae0d2a..0000000 --- a/tests/basic.cnf.in +++ /dev/null @@ -1,27 +0,0 @@ -# $Id: basic.cnf.in,v 1.4 2005/04/04 23:50:58 rockyb Exp $ -# We gotta have at least two processes running. Like the OS -# and the ps-watcher program -[.] - trigger = $count > 1 - action = echo "ok 1" - occurs = first - -# Look for my processes -[perl] - action = echo "ok 2" || echo "$ps_pat" - -[.?] - trigger = elapsed2secs('$@PS_TIME_VAR@') >= 0 - action = echo "ok 3" - occurs = first - -# I'm assuming there is no process with just a single space. -[^ $] - action = echo "ok 4" - occurs = none - -# Test to see if first-trigger works. -[.*] - trigger = $pid == $$ - action = echo "ok 5" - occurs = first-trigger diff --git a/tests/basic.t b/tests/basic.t deleted file mode 100755 index 52977bb..0000000 --- a/tests/basic.t +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/perl -w -# $Id: basic.t.in,v 1.8 2006/03/10 19:07:06 rockyb Exp $ -# Some basic checks -use strict; -use Test::More; - -if ( 'etime' ) { - plan( tests => 5); -} else { - plan( tests => 4 ); -} - -my $test='basic'; -my $cmd = "/usr/bin/perl ../ps-watcher --log --nosyslog --nodaemon " - . "--sleep -1 --config $test.cnf"; -my @output = `$cmd 2>&1`; - -# First line is Id line. This doesn't count in testing. -shift @output; - -my $i=1; -foreach (@output) { - s/.+:\s+//; - $i++ if (!'etime' && $i==3); - my $result = sprintf "ok %d", $i; - $i++; - ok($_ =~ m{$result}); -} - -#;;; Local Variables: *** -#;;; mode:perl *** -#;;; End: *** diff --git a/tests/basic.t.in b/tests/basic.t.in deleted file mode 100755 index 0f34386..0000000 --- a/tests/basic.t.in +++ /dev/null @@ -1,32 +0,0 @@ -#!@PERL@ -w -# $Id: basic.t.in,v 1.8 2006/03/10 19:07:06 rockyb Exp $ -# Some basic checks -use strict; -use Test::More; - -if ( '@PS_TIME_VAR@' ) { - plan( tests => 5); -} else { - plan( tests => 4 ); -} - -my $test='basic'; -my $cmd = "@PERL@ ../ps-watcher --log --nosyslog --nodaemon " - . "--sleep -1 --config $test.cnf"; -my @output = `$cmd 2>&1`; - -# First line is Id line. This doesn't count in testing. -shift @output; - -my $i=1; -foreach (@output) { - s/.+:\s+//; - $i++ if (!'@PS_TIME_VAR@' && $i==3); - my $result = sprintf "ok %d", $i; - $i++; - ok($_ =~ m{$result}); -} - -#;;; Local Variables: *** -#;;; mode:perl *** -#;;; End: *** diff --git a/tests/count.cnf b/tests/count.cnf deleted file mode 100644 index 4f09c64..0000000 --- a/tests/count.cnf +++ /dev/null @@ -1,12 +0,0 @@ -# $Id: count.cnf,v 1.1 2002/02/06 04:10:54 rocky Exp $ -# Test of count and none parameters - -# I'm assuming there can't be a processes with $ in the name -[fuxaduxa$] - occurs = none - action = echo "ok 1" - -# Look for my processes so there should be at least one. -[perl] - occurs = none - action = echo "not ok 2" diff --git a/tests/count.t b/tests/count.t deleted file mode 100755 index f669bb7..0000000 --- a/tests/count.t +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/perl -w -# $Id: count.t.in,v 1.5 2006/03/10 13:12:36 rockyb Exp $ -# Some count checks -use strict; - -my $test='count'; -print "1..2\n"; - -my $srcdir = $ENV{srcdir} ? $ENV{srcdir} : '.'; -my @output = `/usr/bin/perl ../ps-watcher --log --sleep -1 --nodaemon --config ${srcdir}/$test.cnf 2>&1`; - -# First line is Id line. This doesn't count in testing. -shift @output; - -my $count = @output; -foreach (@output) { - s/.+:\s+//; - print $_; -} -print "ok 2\n" unless $count == 2; - -#;;; Local Variables: *** -#;;; mode:perl *** -#;;; End: *** diff --git a/tests/count.t.in b/tests/count.t.in deleted file mode 100644 index 34897fd..0000000 --- a/tests/count.t.in +++ /dev/null @@ -1,24 +0,0 @@ -#!@PERL@ -w -# $Id: count.t.in,v 1.5 2006/03/10 13:12:36 rockyb Exp $ -# Some count checks -use strict; - -my $test='count'; -print "1..2\n"; - -my $srcdir = $ENV{srcdir} ? $ENV{srcdir} : '.'; -my @output = `@PERL@ ../ps-watcher --log --sleep -1 --nodaemon --config ${srcdir}/$test.cnf 2>&1`; - -# First line is Id line. This doesn't count in testing. -shift @output; - -my $count = @output; -foreach (@output) { - s/.+:\s+//; - print $_; -} -print "ok 2\n" unless $count == 2; - -#;;; Local Variables: *** -#;;; mode:perl *** -#;;; End: *** diff --git a/tests/driver b/tests/driver deleted file mode 100755 index 45f7783..0000000 --- a/tests/driver +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/perl -w -#$Id: driver,v 1.1 2000/03/27 01:53:24 rocky Exp $ -use strict; - -use File::Basename; -my $program = basename($0); # Who am I today, anyway? - -sub usage { - print " -usage: - - $program [test1 ... ] - $program --help - -Runs regresion tests (via Test::Harness). - -If no tests are specified all tests that match *.t in the -test directory are run. - -$program --help prints this help. -"; - - exit 100; -} - -use Test::Harness qw(&runtests $verbose); - -my $setup = 0; -process_options(); - -@ARGV = glob("*.t") if !@ARGV; -runtests @ARGV; -exit 0; - -# The bane of programming. -sub process_options { - use Getopt::Long; - $Getopt::Long::autoabbrev = 1; - my $help = 0; - - my $result = &GetOptions - ( - 'help' => \$help, - ); - usage unless $result; - usage if $help; -} - diff --git a/tests/full.cnf b/tests/full.cnf deleted file mode 100644 index 010abbc..0000000 --- a/tests/full.cnf +++ /dev/null @@ -1,15 +0,0 @@ -# $Id: full.cnf,v 1.3 2006/03/10 12:47:37 rockyb Exp $ -# Test to see we can match on all of the processes, not -# just the ones for our account. - -# On a Unix-like system where there always is a pid 1 - init. -# On there is a ppid of 1. -[.] - occurs = first-trigger - trigger = $ppid == 1 - action = echo "ok 1" - -[.?] - occurs = every - trigger = $pid == 1 - action = echo "ok 2" diff --git a/tests/full.t b/tests/full.t deleted file mode 100755 index fef2a32..0000000 --- a/tests/full.t +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/perl -w -# $Id: full.t.in,v 1.6 2006/03/10 13:12:36 rockyb Exp $ -# Some count checks -use strict; -use Test::More; -use Config; - -if ('cygwin' eq $Config{osname}) { - plan( tests => 1); -} else { - plan( tests => 2); -} - -my $test='full'; - -my $srcdir = $ENV{srcdir} ? $ENV{srcdir} : '.'; -my @output = `/usr/bin/perl ../ps-watcher --log --sleep -1 --nodaemon --config ${srcdir}/$test.cnf 2>&1`; - -# First line is Id line. This doesn't count in testing. -shift @output; - -my $i=1; -foreach (@output) { - if (/^.+:\s+.*ok/) { - s/.+:\s+//; - my $result = sprintf "ok %d", $i; - $i++; - ok($_ =~ m{$result}); - } -} - -#;;; Local Variables: *** -#;;; mode:perl *** -#;;; End: *** diff --git a/tests/full.t.in b/tests/full.t.in deleted file mode 100644 index 8ad1c32..0000000 --- a/tests/full.t.in +++ /dev/null @@ -1,34 +0,0 @@ -#!@PERL@ -w -# $Id: full.t.in,v 1.6 2006/03/10 13:12:36 rockyb Exp $ -# Some count checks -use strict; -use Test::More; -use Config; - -if ('cygwin' eq $Config{osname}) { - plan( tests => 1); -} else { - plan( tests => 2); -} - -my $test='full'; - -my $srcdir = $ENV{srcdir} ? $ENV{srcdir} : '.'; -my @output = `@PERL@ ../ps-watcher --log --sleep -1 --nodaemon --config ${srcdir}/$test.cnf 2>&1`; - -# First line is Id line. This doesn't count in testing. -shift @output; - -my $i=1; -foreach (@output) { - if (/^.+:\s+.*ok/) { - s/.+:\s+//; - my $result = sprintf "ok %d", $i; - $i++; - ok($_ =~ m{$result}); - } -} - -#;;; Local Variables: *** -#;;; mode:perl *** -#;;; End: *** diff --git a/tests/paction.cnf b/tests/paction.cnf deleted file mode 100644 index dd83e1f..0000000 --- a/tests/paction.cnf +++ /dev/null @@ -1,17 +0,0 @@ -# $Id: paction.cnf,v 1.1 2004/01/15 03:00:32 rockyb Exp $ -# Test perl-action, prolog and epilog -# Rather the name of the interpreter is listed (e.g. bash or perl) -# Here's how you can match against a script. -# Look for my processes: ps-watcher. -[$PROLOG] - perl-action = $my_count=0; $root_procs=0; -[.*] - perl-action = $my_count++; $root_procs++ if $uid == 0 - occurs = every -[$EPILOG] - trigger = < 0 && $my_count < $count && - $root_procs > 0 && $my_count > $root_procs -EOT - action = echo "ok 1" - diff --git a/tests/paction.t b/tests/paction.t deleted file mode 100644 index 096ccf9..0000000 --- a/tests/paction.t +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/perl -w -# $Id: paction.t,v 1.2 2006/03/10 03:21:12 rockyb Exp $ -# Arg paction-statement -use strict; -use Test::More; -use Config; - -if ('cygwin' eq $Config{osname}) { - plan( skip_all => "cygwin's ps is not powerful enough this test"); - exit 0; -} - -my $test='paction'; -print "1..2\n"; - -my $srcdir = $ENV{srcdir} ? $ENV{srcdir} : '.'; -my $cmd = "../ps-watcher --log --nosyslog --nodaemon " - . " --sleep -1 --config ${srcdir}/$test.cnf"; -my @output = `$cmd 2>&1`; - -# First line is Id line. This doesn't count in testing. -shift @output; - -my $count=0; -foreach (@output) { - if (/^.+:\s+.*ok/) { - s/.+:\s+//; - print $_; - $count++; - last; - } -} -print "ok 2\n" if $count>0; - -#;;; Local Variables: *** -#;;; mode:perl *** -#;;; End: *** diff --git a/touch.pl b/touch.pl deleted file mode 100755 index b341830..0000000 --- a/touch.pl +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/perl -w -my $vcid='$Id: touch.pl,v 1.4 2006/03/08 19:22:41 rockyb Exp $ '; -# Copyright (C) 1997-2006 R. Bernstein email: rocky@cpan.org -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 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., 675 Mass Ave, Cambridge, MA 02139, USA. -use strict; -use File::Basename; -my $program = basename($0); # Who am I today, anyway? - -if (@ARGV != 1) { - print " -usage: - $program *file* - - A perl implimentation of a minimal Unix touch command: creates file *file* - if it does not exist. In either case, the file is given a creation - time of the current time. -"; - exit 100; -} - -print "$ARGV[0]\n"; -if (-e $ARGV[0]) { - my $now = time(); - my $count = utime $now, $now, $ARGV[0]; - exit ($count != 1); -} else { - open(FILE, ">$ARGV[0]") || die "Can't open $ARGV[0]: $!"; - close(FILE); - exit $?; -} From 1e0f3e9ca425e711a352e18819f1ef45027bba2e Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 5 Jul 2007 09:03:08 +0000 Subject: [PATCH 037/158] provide upgrade path for versions where no (correct) pidfile was written --- debian/prerm | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 debian/prerm diff --git a/debian/prerm b/debian/prerm new file mode 100755 index 0000000..513e294 --- /dev/null +++ b/debian/prerm @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +# generate correct pid file, for versions where was non or incorrect +if [ "$1" = "upgrade" ] && [ "$2" ] && dpkg --compare-versions "$2" <= "1.06-6"; then + ps aux | grep /usr/bin/ps-watcher | head -1 | awk '{ print $2 }' > /var/run/ps-watcher.pid +fi +#DEBHELPER# From 1344d0b13383824b09a05a25ad010c4112ef4f89 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 5 Jul 2007 09:05:04 +0000 Subject: [PATCH 038/158] provide upgrade path for versions where no (correct) pidfile was written --- debian/changelog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 1d80be0..d3e7516 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,9 @@ ps-watcher (1.06-7) unstable; urgency=low * update copyright - * use native debhelper postinst and prerm script + * use native debhelper postinst script * make start-stop-daemon working instead of using kill + * providing upgrade path via prerm -- Jan Wagner Wed, 4 Jul 2007 12:26:57 +0200 From 7d8b6199ba0fb6acedc666c5c3afa821c2a3072a Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 6 Jul 2007 21:13:00 +0000 Subject: [PATCH 039/158] fix init script --- debian/init.d | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/init.d b/debian/init.d index 7f8da5f..4362fd4 100644 --- a/debian/init.d +++ b/debian/init.d @@ -66,8 +66,8 @@ case "$1" in ;; stop) echo -n "Stopping $DESC: " - #start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ - # --exec $DAEMON + start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ + --exec $DAEMON echo "$NAME." ;; restart|force-reload) From 1d902759cf33a4505b0de055eb3923a9c0991c12 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 6 Jul 2007 21:15:18 +0000 Subject: [PATCH 040/158] foo --- debian/preinst | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 debian/preinst diff --git a/debian/preinst b/debian/preinst new file mode 100755 index 0000000..513e294 --- /dev/null +++ b/debian/preinst @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +# generate correct pid file, for versions where was non or incorrect +if [ "$1" = "upgrade" ] && [ "$2" ] && dpkg --compare-versions "$2" <= "1.06-6"; then + ps aux | grep /usr/bin/ps-watcher | head -1 | awk '{ print $2 }' > /var/run/ps-watcher.pid +fi +#DEBHELPER# From 6174521123f206fb089b3f61f4e436d9fb4451a8 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 6 Jul 2007 21:16:07 +0000 Subject: [PATCH 041/158] use postinst instead of prerm --- debian/changelog | 4 ++-- debian/{preinst => postinst} | 0 debian/prerm | 8 -------- 3 files changed, 2 insertions(+), 10 deletions(-) rename debian/{preinst => postinst} (100%) delete mode 100755 debian/prerm diff --git a/debian/changelog b/debian/changelog index d3e7516..d6107fa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ ps-watcher (1.06-7) unstable; urgency=low * update copyright - * use native debhelper postinst script + * use native debhelper prerm script * make start-stop-daemon working instead of using kill - * providing upgrade path via prerm + * providing upgrade path via postinst -- Jan Wagner Wed, 4 Jul 2007 12:26:57 +0200 diff --git a/debian/preinst b/debian/postinst similarity index 100% rename from debian/preinst rename to debian/postinst diff --git a/debian/prerm b/debian/prerm deleted file mode 100755 index 513e294..0000000 --- a/debian/prerm +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -set -e - -# generate correct pid file, for versions where was non or incorrect -if [ "$1" = "upgrade" ] && [ "$2" ] && dpkg --compare-versions "$2" <= "1.06-6"; then - ps aux | grep /usr/bin/ps-watcher | head -1 | awk '{ print $2 }' > /var/run/ps-watcher.pid -fi -#DEBHELPER# From c2af72554c45604264c2d178930bbd8c099cac20 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 6 Jul 2007 21:18:24 +0000 Subject: [PATCH 042/158] preinst --- debian/changelog | 4 ++-- debian/{postinst => preinst} | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename debian/{postinst => preinst} (100%) diff --git a/debian/changelog b/debian/changelog index d6107fa..48b798d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ ps-watcher (1.06-7) unstable; urgency=low * update copyright - * use native debhelper prerm script + * use native debhelper prerm and postinst script * make start-stop-daemon working instead of using kill - * providing upgrade path via postinst + * providing upgrade path via preinst -- Jan Wagner Wed, 4 Jul 2007 12:26:57 +0200 diff --git a/debian/postinst b/debian/preinst similarity index 100% rename from debian/postinst rename to debian/preinst From 5a687c0f947f6b9989914b17ec3f5abe3dbbc593 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 8 Nov 2007 08:26:03 +0000 Subject: [PATCH 043/158] fix clean target --- debian/changelog | 6 ++++++ debian/rules | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 48b798d..e515e39 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ps-watcher (1.06-8) unstable; urgency=low + + * fix clean target in rules + + -- Jan Wagner Thu, 08 Nov 2007 09:25:25 +0100 + ps-watcher (1.06-7) unstable; urgency=low * update copyright diff --git a/debian/rules b/debian/rules index 45bf57f..ab70dfa 100755 --- a/debian/rules +++ b/debian/rules @@ -24,7 +24,7 @@ clean: rm -f build-stamp # Add here commands to clean up after the build process. - -$(MAKE) clean + [ ! -f Makefile ] || $(MAKE) clean ifneq "$(wildcard /usr/share/misc/config.sub)" "" cp -f /usr/share/misc/config.sub config.sub endif From 09b4e8a07b867bb403c58e3e136e03932b331ce4 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sun, 9 Dec 2007 22:14:30 +0000 Subject: [PATCH 044/158] update to standards 3.7.3, added Vcs- fields, moved Homepage --- debian/changelog | 7 +++++++ debian/control | 7 ++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index e515e39..8fc53d0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +ps-watcher (1.06-9) unstable; urgency=low + + * added Vcs- fields, moved Homepage into source header's field + * bump standards version to 3.7.3 + + -- Jan Wagner Sun, 09 Dec 2007 23:12:51 +0100 + ps-watcher (1.06-8) unstable; urgency=low * fix clean target in rules diff --git a/debian/control b/debian/control index eea3637..049c60c 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,10 @@ Priority: optional Maintainer: Jan Wagner Build-Depends: debhelper (>= 5), autotools-dev Build-Depends-Indep: libconfig-inifiles-perl, perl-modules -Standards-Version: 3.7.2 +Homepage: http://ps-watcher.sourceforge.net/ +Vcs-Browser: https://trac.cyconet.org/debian/browser/debian/ps-watcher +Vcs-Svn: https://trac.cyconet.org/svn/debian/ps-watcher +Standards-Version: 3.7.3 Package: ps-watcher Architecture: all @@ -18,5 +21,3 @@ Description: monitoring a system via ps-like commands For example it can be used to ensure that a daemon is running, or is not running too many times. It can also be used to determine when a process has consumed too many resources, perhaps due to a memory leak. - . - Homepage: From 72cbbca83beff476f55ca801d6e180542b64668c Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 2 Apr 2008 10:55:50 +0000 Subject: [PATCH 045/158] remove whitespaces from changelog and change Priority to extra --- debian/changelog | 9 ++++++--- debian/control | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8fc53d0..1bcd5a8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,13 +1,16 @@ ps-watcher (1.06-9) unstable; urgency=low * added Vcs- fields, moved Homepage into source header's field - * bump standards version to 3.7.3 + * bump standards version to 3.7.3 (no changes needed) + * change Priority to extra since libconfig-inifiles-perl is also extra and + we depend on it + * remove whitespaces trailing whitespaces from changelog -- Jan Wagner Sun, 09 Dec 2007 23:12:51 +0100 ps-watcher (1.06-8) unstable; urgency=low - * fix clean target in rules + * fix clean target in rules -- Jan Wagner Thu, 08 Nov 2007 09:25:25 +0100 @@ -48,7 +51,7 @@ ps-watcher (1.06-3) unstable; urgency=low ps-watcher (1.06-2) unstable; urgency=low * remove dh_strip from rules - * adjust depencies (libconfig-inifiles-perl, libsys-syslog-perl) + * adjust depencies (libconfig-inifiles-perl, libsys-syslog-perl) * modifying initscript to prevent to start without config file * provide own postinst and prerm scripts diff --git a/debian/control b/debian/control index 049c60c..3f23a84 100644 --- a/debian/control +++ b/debian/control @@ -1,6 +1,6 @@ Source: ps-watcher Section: admin -Priority: optional +Priority: extra Maintainer: Jan Wagner Build-Depends: debhelper (>= 5), autotools-dev Build-Depends-Indep: libconfig-inifiles-perl, perl-modules From e87dd33c7cf58f95ad1935b3660b55df2f722bec Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 2 Apr 2008 21:35:56 +0000 Subject: [PATCH 046/158] add pidfile patch --- debian/patches/00list | 1 + debian/patches/01_add_pidfile_support.dpatch | 108 +++++++++++++++++++ 2 files changed, 109 insertions(+) create mode 100644 debian/patches/00list create mode 100644 debian/patches/01_add_pidfile_support.dpatch diff --git a/debian/patches/00list b/debian/patches/00list new file mode 100644 index 0000000..4b77285 --- /dev/null +++ b/debian/patches/00list @@ -0,0 +1 @@ +01_add_pidfile_support.dpatch diff --git a/debian/patches/01_add_pidfile_support.dpatch b/debian/patches/01_add_pidfile_support.dpatch new file mode 100644 index 0000000..7167245 --- /dev/null +++ b/debian/patches/01_add_pidfile_support.dpatch @@ -0,0 +1,108 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 01_add_pidfile_support.dpatch by Jan Wagner +## with hints by Sebastian Harl and +## Alexander Wirt +## +## DP: add pidfile support to ps-watcher + + +--- ps-watcher-1.06/ps-watcher.in.in 2007-07-04 21:34:23.000000000 +0200 ++++ ps-watcher-1.06/ps-watcher.in.in 2008-04-02 18:16:45.000000000 +0200 +@@ -23,8 +23,11 @@ + + use vars qw($program $ps_cmd $ps_cmdfull $ps_fullcmd_fmt @ps_vars $ps_dvars + $0 $logopened $ps_args_fmt $args +- $count $pid $command $ps_arg_opts $DEVNULL %opts ++ $count $pid $command $ps_arg_opts $DEVNULL %opts $PIDFILE + ); ++ ++$PIDFILE = "/var/run/ps-watcher.pid"; ++ + use strict; + BEGIN { require 5.00503 } + +@@ -130,6 +133,7 @@ + sub read_config($); + sub check_config_file($); + sub run_trigger($$$); ++sub check_pid(); + + init(); + process_options(); +@@ -147,7 +151,12 @@ + } + + if ($opts{daemon}) { +- daemonize(); ++ if (! check_pid()) { ++ exit 1; ++ } ++ if (! daemonize()) { ++ exit 1; ++ } + } + + install_handlers(); +@@ -584,14 +593,62 @@ + exit 10; + } + ++sub check_pid() { ++ if (-f $PIDFILE) { ++ if (open(PID,$PIDFILE)) { ++ my $pid = ; ++ if (!close(PID)) { ++ logger("Unable to close file handle PID for file '$PIDFILE': $!"); ++ return; ++ } ++ if (-f "/proc/$pid/stat") { ++ if (open(FH,"/proc/$pid/stat")) { ++ my $line = ; ++ if (!close(FH)) { ++ logger("Unable to close file handle FH for file '/proc/$pid/stat': $!"); ++ return; ++ } ++ if ($line =~ /\d+[^(]*\((.*)\)\s*/) { ++ my $process = $1; ++ if ($process =~ /^$program$/) { ++ logger("$program already running at PID $pid; exiting."); ++ exit(0); ++ } ++ } ++ } else { ++ logger("Unable to open file handle FH for file '/proc/$pid/stat': $!"); ++ return; ++ } ++ } else { ++ logger("Removing stale PID file."); ++ unlink($PIDFILE); ++ } ++ }else{ ++ logger("Unable to open file handle PID for file '$PIDFILE': $!"); ++ return; ++ } ++ } ++ return 1; ++} + + sub daemonize() { + chdir '/' or die "Can't chdir to /: $!"; + defined(my $pid = fork) or die "Can't fork: $!"; + exit 0 if $pid; ++ if (open(FH,">$PIDFILE")) { ++ print FH $$; ++ if (!close(FH)) { ++ logger("Unable to close file handle FH for file '$PIDFILE': $!"); ++ return; ++ } ++ } else { ++ logger("Unable to open file handle FH for file '$PIDFILE': $!"); ++ return; ++ } + use POSIX qw(setsid); + setsid() or die "Can't start a new session: $!"; + umask 0; ++ return 1; + } + + # Time configuration file was last read. From bd1517fc2349b09de38437f40e8c36a59036cb05 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 2 Apr 2008 21:37:11 +0000 Subject: [PATCH 047/158] add dpatch infrastructure --- debian/control | 2 +- debian/rules | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/debian/control b/debian/control index 3f23a84..850af30 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: ps-watcher Section: admin Priority: extra Maintainer: Jan Wagner -Build-Depends: debhelper (>= 5), autotools-dev +Build-Depends: debhelper (>= 5), autotools-dev, dpatch Build-Depends-Indep: libconfig-inifiles-perl, perl-modules Homepage: http://ps-watcher.sourceforge.net/ Vcs-Browser: https://trac.cyconet.org/debian/browser/debian/ps-watcher diff --git a/debian/rules b/debian/rules index ab70dfa..de0c307 100755 --- a/debian/rules +++ b/debian/rules @@ -4,7 +4,9 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -config.status: configure +include /usr/share/dpatch/dpatch.make + +config.status: patch-stamp configure dh_testdir # Add here commands to configure the package. ./configure --prefix=/usr --mandir=\$${prefix}/share/man @@ -18,7 +20,7 @@ build-stamp: config.status touch $@ -clean: +clean: unpatch dh_testdir dh_testroot rm -f build-stamp From 6d3ebb24e857f7be3610b057253b5b83bbd77d27 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 2 Apr 2008 21:38:04 +0000 Subject: [PATCH 048/158] adjust init script since daemon supports writing pidfiles --- debian/changelog | 4 ++++ debian/init.d | 10 +++------- debian/preinst | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/debian/changelog b/debian/changelog index 1bcd5a8..119caca 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,10 @@ ps-watcher (1.06-9) unstable; urgency=low * change Priority to extra since libconfig-inifiles-perl is also extra and we depend on it * remove whitespaces trailing whitespaces from changelog + * add dpatch infrastructure + * add 01_add_pidfile_support.dpatch to implement writing pidfiles into the + daemon + * adjust init script since the daemon supports writing pidfiles -- Jan Wagner Sun, 09 Dec 2007 23:12:51 +0100 diff --git a/debian/init.d b/debian/init.d index 4362fd4..dfadeb5 100644 --- a/debian/init.d +++ b/debian/init.d @@ -61,28 +61,24 @@ case "$1" in echo -n "Starting $DESC: " start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ --exec $DAEMON -- -c $CONFIG --daemon $DAEMON_OPTS - ps aux | grep $DAEMON | head -1 | awk '{ print $2 }' > /var/run/$NAME.pid echo "$NAME." ;; stop) echo -n "Stopping $DESC: " - start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ - --exec $DAEMON + start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid echo "$NAME." ;; restart|force-reload) echo -n "Restarting $DESC: " - start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ - --exec $DAEMON + start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid sleep 1 start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ --exec $DAEMON -- -c $CONFIG --daemon $DAEMON_OPTS - ps aux | grep $DAEMON | head -1 | awk '{ print $2 }' > /var/run/$NAME.pid + /bin/pidof $DAEMON > /var/run/$NAME.pid echo "$NAME." ;; *) N=/etc/init.d/$NAME - # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 echo "Usage: $N {start|stop|restart|force-reload}" >&2 exit 1 ;; diff --git a/debian/preinst b/debian/preinst index 513e294..36daa0b 100755 --- a/debian/preinst +++ b/debian/preinst @@ -3,6 +3,6 @@ set -e # generate correct pid file, for versions where was non or incorrect if [ "$1" = "upgrade" ] && [ "$2" ] && dpkg --compare-versions "$2" <= "1.06-6"; then - ps aux | grep /usr/bin/ps-watcher | head -1 | awk '{ print $2 }' > /var/run/ps-watcher.pid + /bin/pidof ps-watcher > /var/run/ps-watcher.pid fi #DEBHELPER# From 9d3aeffac553979d9b8af377aa549be0de4d1b10 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 2 Apr 2008 22:01:32 +0000 Subject: [PATCH 049/158] add missing changelog entry --- debian/changelog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 119caca..2fcc592 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,8 +9,9 @@ ps-watcher (1.06-9) unstable; urgency=low * add 01_add_pidfile_support.dpatch to implement writing pidfiles into the daemon * adjust init script since the daemon supports writing pidfiles + * make use of pidof in preinst - -- Jan Wagner Sun, 09 Dec 2007 23:12:51 +0100 + -- Jan Wagner Thu, 03 Apr 2008 00:00:34 +0200 ps-watcher (1.06-8) unstable; urgency=low From 137520de054c6196dd123670cc3f9d33ca0e1831 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 2 Apr 2008 22:32:31 +0000 Subject: [PATCH 050/158] move copy of config.guess and and config.sub into config.status target --- debian/changelog | 3 ++- debian/rules | 13 ++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/debian/changelog b/debian/changelog index 2fcc592..8a9e1b8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,8 +10,9 @@ ps-watcher (1.06-9) unstable; urgency=low daemon * adjust init script since the daemon supports writing pidfiles * make use of pidof in preinst + * move copy of config.guess and and config.sub into config.status target - -- Jan Wagner Thu, 03 Apr 2008 00:00:34 +0200 + -- Jan Wagner Thu, 03 Apr 2008 00:23:39 +0200 ps-watcher (1.06-8) unstable; urgency=low diff --git a/debian/rules b/debian/rules index de0c307..33df5d5 100755 --- a/debian/rules +++ b/debian/rules @@ -8,6 +8,12 @@ include /usr/share/dpatch/dpatch.make config.status: patch-stamp configure dh_testdir +ifneq "$(wildcard /usr/share/misc/config.sub)" "" + cp -f /usr/share/misc/config.sub config.sub +endif +ifneq "$(wildcard /usr/share/misc/config.guess)" "" + cp -f /usr/share/misc/config.guess config.guess +endif # Add here commands to configure the package. ./configure --prefix=/usr --mandir=\$${prefix}/share/man @@ -27,13 +33,6 @@ clean: unpatch # Add here commands to clean up after the build process. [ ! -f Makefile ] || $(MAKE) clean -ifneq "$(wildcard /usr/share/misc/config.sub)" "" - cp -f /usr/share/misc/config.sub config.sub -endif -ifneq "$(wildcard /usr/share/misc/config.guess)" "" - cp -f /usr/share/misc/config.guess config.guess -endif - dh_clean install: build From be6a1368e2459264c4c6e074cb707ed640cde0f6 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Mon, 14 Apr 2008 21:36:55 +0000 Subject: [PATCH 051/158] bump copyright of packaging to 2008 --- debian/changelog | 6 ++++++ debian/copyright | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 8a9e1b8..e714bb1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ps-watcher (1.06-10) UNRELEASED; urgency=low + + * bump copyright of packaging to 2008 + + -- Jan Wagner Thu, 03 Apr 2008 10:29:21 +0200 + ps-watcher (1.06-9) unstable; urgency=low * added Vcs- fields, moved Homepage into source header's field diff --git a/debian/copyright b/debian/copyright index 014181f..5699952 100644 --- a/debian/copyright +++ b/debian/copyright @@ -26,5 +26,5 @@ License: On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL file. -The Debian packaging is (C) 2006-2007 Jan Wagner and +The Debian packaging is (C) 2006-2008 Jan Wagner and is licensed under the GPL, see `/usr/share/common-licenses/GPL'. From bea45a970309dabc65b78d0b5becb08c7c1bb7d6 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sat, 7 Jun 2008 10:02:29 +0000 Subject: [PATCH 052/158] Updating standards version to 3.8.0 --- debian/changelog | 3 ++- debian/control | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index e714bb1..b3cfdb0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,9 @@ ps-watcher (1.06-10) UNRELEASED; urgency=low * bump copyright of packaging to 2008 + * Updating standards version to 3.8.0, no changes needed - -- Jan Wagner Thu, 03 Apr 2008 10:29:21 +0200 + -- Jan Wagner Thu, 03 Apr 2008 10:29:21 +0200 ps-watcher (1.06-9) unstable; urgency=low diff --git a/debian/control b/debian/control index 850af30..78501e5 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Build-Depends-Indep: libconfig-inifiles-perl, perl-modules Homepage: http://ps-watcher.sourceforge.net/ Vcs-Browser: https://trac.cyconet.org/debian/browser/debian/ps-watcher Vcs-Svn: https://trac.cyconet.org/svn/debian/ps-watcher -Standards-Version: 3.7.3 +Standards-Version: 3.8.0 Package: ps-watcher Architecture: all From b1f9fae73c583a7797cd7612ef75953f368c1d14 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sun, 20 Jul 2008 11:43:51 +0000 Subject: [PATCH 053/158] machine-interpretable copyright --- debian/changelog | 1 + debian/copyright | 26 ++++++++++++++------------ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/debian/changelog b/debian/changelog index b3cfdb0..de3a6c1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ ps-watcher (1.06-10) UNRELEASED; urgency=low * bump copyright of packaging to 2008 * Updating standards version to 3.8.0, no changes needed + * implement machine-interpretable copyright file -- Jan Wagner Thu, 03 Apr 2008 10:29:21 +0200 diff --git a/debian/copyright b/debian/copyright index 5699952..7566d3a 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,14 +1,19 @@ -This package was debianized by Jan Wagner on -Fri, 3 Nov 2006 14:39:48 +0100. - -It was downloaded from - -Upstream Author: Rocky Bernstein +Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196 +Packaged-By: Jan Wagner +Packaged-Date: Fri, 3 Nov 2006 14:39:48 +0100 +Upstream-Name: ps-watcher +Upstream-Maintainer: Rocky Bernstein +Upstream-Source: http://ps-watcher.sf.net +Files: * Copyright: (C) 2000-2006 Rocky Bernstein +License: GPL-2+ -License: +Files: debian/* +Copyright: (C) 2006, 2008 Jan Wagner +License: GPL-2+ +License: GPL-2+ 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 @@ -23,8 +28,5 @@ License: along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -On Debian systems, the complete text of the GNU General Public License -can be found in /usr/share/common-licenses/GPL file. - -The Debian packaging is (C) 2006-2008 Jan Wagner and -is licensed under the GPL, see `/usr/share/common-licenses/GPL'. + On Debian systems, the complete text of the GNU General Public License can be + found in /usr/share/common-licenses/GPL-2 file. From 25b9c2fbb4bacd036f5668a756452839b14907ea Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sun, 20 Jul 2008 11:44:04 +0000 Subject: [PATCH 054/158] release --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index de3a6c1..a17a644 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,10 @@ -ps-watcher (1.06-10) UNRELEASED; urgency=low +ps-watcher (1.06-10) unstable; urgency=low * bump copyright of packaging to 2008 * Updating standards version to 3.8.0, no changes needed * implement machine-interpretable copyright file - -- Jan Wagner Thu, 03 Apr 2008 10:29:21 +0200 + -- Jan Wagner Sun, 20 Jul 2008 13:43:55 +0200 ps-watcher (1.06-9) unstable; urgency=low From 95e5324a902968b480a84d1509defc44726b154d Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sun, 20 Jul 2008 11:49:31 +0000 Subject: [PATCH 055/158] move autotools-dev to Build-Depends-Indep --- debian/changelog | 3 ++- debian/control | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index a17a644..13d287e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,8 +3,9 @@ ps-watcher (1.06-10) unstable; urgency=low * bump copyright of packaging to 2008 * Updating standards version to 3.8.0, no changes needed * implement machine-interpretable copyright file + * move autotools-dev to Build-Depends-Indep - -- Jan Wagner Sun, 20 Jul 2008 13:43:55 +0200 + -- Jan Wagner Sun, 20 Jul 2008 13:43:55 +0200 ps-watcher (1.06-9) unstable; urgency=low diff --git a/debian/control b/debian/control index 78501e5..186a1bf 100644 --- a/debian/control +++ b/debian/control @@ -2,8 +2,8 @@ Source: ps-watcher Section: admin Priority: extra Maintainer: Jan Wagner -Build-Depends: debhelper (>= 5), autotools-dev, dpatch -Build-Depends-Indep: libconfig-inifiles-perl, perl-modules +Build-Depends: debhelper (>= 5), dpatch +Build-Depends-Indep: autotools-dev, libconfig-inifiles-perl, perl-modules Homepage: http://ps-watcher.sourceforge.net/ Vcs-Browser: https://trac.cyconet.org/debian/browser/debian/ps-watcher Vcs-Svn: https://trac.cyconet.org/svn/debian/ps-watcher From c4b6006011b61bafb2c0d27dff11a0a0873fc483 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sun, 20 Jul 2008 12:35:52 +0000 Subject: [PATCH 056/158] some more improvements --- debian/changelog | 4 ++++ debian/control | 2 +- debian/rules | 3 ++- debian/source.lintian-overrides | 2 ++ 4 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 debian/source.lintian-overrides diff --git a/debian/changelog b/debian/changelog index 13d287e..d65282f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,10 @@ ps-watcher (1.06-10) unstable; urgency=low * Updating standards version to 3.8.0, no changes needed * implement machine-interpretable copyright file * move autotools-dev to Build-Depends-Indep + * cleanup rules a bit + * create lintian override for "outdated-autotools-helper-file", which we + copy over from autotools-dev + * add ${misc:Depends} to Depends -- Jan Wagner Sun, 20 Jul 2008 13:43:55 +0200 diff --git a/debian/control b/debian/control index 186a1bf..2a45362 100644 --- a/debian/control +++ b/debian/control @@ -11,7 +11,7 @@ Standards-Version: 3.8.0 Package: ps-watcher Architecture: all -Depends: ${perl:Depends}, libconfig-inifiles-perl +Depends: ${perl:Depends}, ${misc:Depends}, libconfig-inifiles-perl Recommends: libsys-syslog-perl Description: monitoring a system via ps-like commands This program runs the ps command periodically and triggers commands on matches. diff --git a/debian/rules b/debian/rules index 33df5d5..9fd48b9 100755 --- a/debian/rules +++ b/debian/rules @@ -30,6 +30,7 @@ clean: unpatch dh_testdir dh_testroot rm -f build-stamp + rm -f config.guess config.sub # Add here commands to clean up after the build process. [ ! -f Makefile ] || $(MAKE) clean @@ -62,7 +63,7 @@ binary-indep: build install dh_builddeb # Build architecture-dependent files here. -binary-arch: build install +binary-arch: binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install diff --git a/debian/source.lintian-overrides b/debian/source.lintian-overrides new file mode 100644 index 0000000..b912f83 --- /dev/null +++ b/debian/source.lintian-overrides @@ -0,0 +1,2 @@ +outdated-autotools-helper-file config.guess 2002-07-23 +outdated-autotools-helper-file config.sub 2001-08-13 From 7364475f62981f79c00abe5ccccbb2c5ace17120 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sun, 20 Jul 2008 13:47:05 +0000 Subject: [PATCH 057/158] new version --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index d65282f..5cdcecc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ps-watcher (1.06-11) UNRELEASED; urgency=low + + * NOT RELEASED YET + + -- Jan Wagner Sun, 20 Jul 2008 15:46:37 +0200 + ps-watcher (1.06-10) unstable; urgency=low * bump copyright of packaging to 2008 From 9aca40eb19f485b54683ee8703d9393b27b7e194 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 1 Oct 2008 09:08:17 +0000 Subject: [PATCH 058/158] removed use of pidof from init-script --- debian/changelog | 8 +++++--- debian/init.d | 1 - 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 5cdcecc..a02312d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,10 @@ -ps-watcher (1.06-11) UNRELEASED; urgency=low +ps-watcher (1.06-11) unstable; urgency=low - * NOT RELEASED YET + * removed use of pidof from restart|force-reload init-script target, + since daemon has pidfile support and it never worked anyways + (Closes: #500741) - -- Jan Wagner Sun, 20 Jul 2008 15:46:37 +0200 + -- Jan Wagner Wed, 01 Oct 2008 11:05:25 +0200 ps-watcher (1.06-10) unstable; urgency=low diff --git a/debian/init.d b/debian/init.d index dfadeb5..047debf 100644 --- a/debian/init.d +++ b/debian/init.d @@ -74,7 +74,6 @@ case "$1" in sleep 1 start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ --exec $DAEMON -- -c $CONFIG --daemon $DAEMON_OPTS - /bin/pidof $DAEMON > /var/run/$NAME.pid echo "$NAME." ;; *) From a8cf5121a67c915cc23627dc80e6f8b1de7ae7a7 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 19 Feb 2009 16:25:10 +0000 Subject: [PATCH 059/158] new release --- debian/changelog | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/debian/changelog b/debian/changelog index a02312d..fbe802b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +ps-watcher (1.07-1) unstable; urgency=low + + * new upstream release + - improve logfile handling + - new sample config file using perl-action + - minor typo fixes + + -- Jan Wagner Thu, 19 Feb 2009 17:24:47 +0100 + ps-watcher (1.06-11) unstable; urgency=low * removed use of pidof from restart|force-reload init-script target, From 4b9e10612f41a0ce6ab9ab770ca0045c94ddb862 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 19 Feb 2009 16:31:51 +0000 Subject: [PATCH 060/158] released --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index fbe802b..1d89b7c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ps-watcher (1.07-2) UNRELEASED; urgency=low + + * NOT RELEASED YET + + -- Jan Wagner Thu, 19 Feb 2009 17:31:31 +0100 + ps-watcher (1.07-1) unstable; urgency=low * new upstream release From dd87cc4560f4f7817743fccff9b0a974c292f841 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Mon, 16 Mar 2009 09:17:56 +0000 Subject: [PATCH 061/158] new upstream release --- debian/changelog | 7 +- debian/control | 2 +- debian/patches/00list | 1 - debian/patches/01_add_pidfile_support.dpatch | 108 ------------------- debian/rules | 6 +- 5 files changed, 8 insertions(+), 116 deletions(-) delete mode 100644 debian/patches/00list delete mode 100644 debian/patches/01_add_pidfile_support.dpatch diff --git a/debian/changelog b/debian/changelog index 1d89b7c..7ebf6aa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,9 @@ -ps-watcher (1.07-2) UNRELEASED; urgency=low +ps-watcher (1.08-1) UNRELEASED; urgency=low - * NOT RELEASED YET + * new upstream release + - pidfile support + - darwin support + * remove dpatch infrastructure -- Jan Wagner Thu, 19 Feb 2009 17:31:31 +0100 diff --git a/debian/control b/debian/control index 2a45362..a4efd6d 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: ps-watcher Section: admin Priority: extra Maintainer: Jan Wagner -Build-Depends: debhelper (>= 5), dpatch +Build-Depends: debhelper (>= 5) Build-Depends-Indep: autotools-dev, libconfig-inifiles-perl, perl-modules Homepage: http://ps-watcher.sourceforge.net/ Vcs-Browser: https://trac.cyconet.org/debian/browser/debian/ps-watcher diff --git a/debian/patches/00list b/debian/patches/00list deleted file mode 100644 index 4b77285..0000000 --- a/debian/patches/00list +++ /dev/null @@ -1 +0,0 @@ -01_add_pidfile_support.dpatch diff --git a/debian/patches/01_add_pidfile_support.dpatch b/debian/patches/01_add_pidfile_support.dpatch deleted file mode 100644 index 7167245..0000000 --- a/debian/patches/01_add_pidfile_support.dpatch +++ /dev/null @@ -1,108 +0,0 @@ -#!/bin/sh /usr/share/dpatch/dpatch-run -## 01_add_pidfile_support.dpatch by Jan Wagner -## with hints by Sebastian Harl and -## Alexander Wirt -## -## DP: add pidfile support to ps-watcher - - ---- ps-watcher-1.06/ps-watcher.in.in 2007-07-04 21:34:23.000000000 +0200 -+++ ps-watcher-1.06/ps-watcher.in.in 2008-04-02 18:16:45.000000000 +0200 -@@ -23,8 +23,11 @@ - - use vars qw($program $ps_cmd $ps_cmdfull $ps_fullcmd_fmt @ps_vars $ps_dvars - $0 $logopened $ps_args_fmt $args -- $count $pid $command $ps_arg_opts $DEVNULL %opts -+ $count $pid $command $ps_arg_opts $DEVNULL %opts $PIDFILE - ); -+ -+$PIDFILE = "/var/run/ps-watcher.pid"; -+ - use strict; - BEGIN { require 5.00503 } - -@@ -130,6 +133,7 @@ - sub read_config($); - sub check_config_file($); - sub run_trigger($$$); -+sub check_pid(); - - init(); - process_options(); -@@ -147,7 +151,12 @@ - } - - if ($opts{daemon}) { -- daemonize(); -+ if (! check_pid()) { -+ exit 1; -+ } -+ if (! daemonize()) { -+ exit 1; -+ } - } - - install_handlers(); -@@ -584,14 +593,62 @@ - exit 10; - } - -+sub check_pid() { -+ if (-f $PIDFILE) { -+ if (open(PID,$PIDFILE)) { -+ my $pid = ; -+ if (!close(PID)) { -+ logger("Unable to close file handle PID for file '$PIDFILE': $!"); -+ return; -+ } -+ if (-f "/proc/$pid/stat") { -+ if (open(FH,"/proc/$pid/stat")) { -+ my $line = ; -+ if (!close(FH)) { -+ logger("Unable to close file handle FH for file '/proc/$pid/stat': $!"); -+ return; -+ } -+ if ($line =~ /\d+[^(]*\((.*)\)\s*/) { -+ my $process = $1; -+ if ($process =~ /^$program$/) { -+ logger("$program already running at PID $pid; exiting."); -+ exit(0); -+ } -+ } -+ } else { -+ logger("Unable to open file handle FH for file '/proc/$pid/stat': $!"); -+ return; -+ } -+ } else { -+ logger("Removing stale PID file."); -+ unlink($PIDFILE); -+ } -+ }else{ -+ logger("Unable to open file handle PID for file '$PIDFILE': $!"); -+ return; -+ } -+ } -+ return 1; -+} - - sub daemonize() { - chdir '/' or die "Can't chdir to /: $!"; - defined(my $pid = fork) or die "Can't fork: $!"; - exit 0 if $pid; -+ if (open(FH,">$PIDFILE")) { -+ print FH $$; -+ if (!close(FH)) { -+ logger("Unable to close file handle FH for file '$PIDFILE': $!"); -+ return; -+ } -+ } else { -+ logger("Unable to open file handle FH for file '$PIDFILE': $!"); -+ return; -+ } - use POSIX qw(setsid); - setsid() or die "Can't start a new session: $!"; - umask 0; -+ return 1; - } - - # Time configuration file was last read. diff --git a/debian/rules b/debian/rules index 9fd48b9..0ddd3d5 100755 --- a/debian/rules +++ b/debian/rules @@ -4,9 +4,7 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -include /usr/share/dpatch/dpatch.make - -config.status: patch-stamp configure +config.status: configure dh_testdir ifneq "$(wildcard /usr/share/misc/config.sub)" "" cp -f /usr/share/misc/config.sub config.sub @@ -26,7 +24,7 @@ build-stamp: config.status touch $@ -clean: unpatch +clean: dh_testdir dh_testroot rm -f build-stamp From 817c8355980843c1f0e7561f1dd8840f97c0ed81 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 24 Jul 2009 17:21:00 +0000 Subject: [PATCH 062/158] move start and stop positions --- debian/NEWS | 10 ++++++++++ debian/changelog | 6 ++++-- debian/postinst | 21 +++++++++++++++++++++ debian/rules | 2 +- 4 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 debian/NEWS create mode 100644 debian/postinst diff --git a/debian/NEWS b/debian/NEWS new file mode 100644 index 0000000..65a664b --- /dev/null +++ b/debian/NEWS @@ -0,0 +1,10 @@ +ps-watcher (1.08-1) unstable; urgency=low + + * moved startup to the end of the boot process and terminating to the + beginning of the shutdown process + + If you modified the order of ps-watcher runlevel scripts for your own, this + adjustment will not happen automatically and you have to handle it for + yourself. + + -- Jan Wagner Fri, 24 Jul 2009 19:16:09 +0200 diff --git a/debian/changelog b/debian/changelog index 7ebf6aa..d326cd5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,13 @@ -ps-watcher (1.08-1) UNRELEASED; urgency=low +ps-watcher (1.08-1) unstable; urgency=low * new upstream release - pidfile support - darwin support * remove dpatch infrastructure + * moved initscritps to S99 and K01, thanks Tim Miller Dyck (Closes: #508189) + * created NEWS.Debian - -- Jan Wagner Thu, 19 Feb 2009 17:31:31 +0100 + -- Jan Wagner Fri, 24 Jul 2009 19:12:00 +0200 ps-watcher (1.07-1) unstable; urgency=low diff --git a/debian/postinst b/debian/postinst new file mode 100644 index 0000000..21a0a63 --- /dev/null +++ b/debian/postinst @@ -0,0 +1,21 @@ +#!/bin/sh + +set -e + +if [ "$1" != "configure" ]; then + exit 0 +fi + +if [ "$2" ] && dpkg --compare-versions "$2" lt "1.08-1"; then + if [ -e /etc/rc2.d/S40ps-watcher ] && \ + [ -e /etc/rc3.d/S40ps-watcher ] && \ + [ -e /etc/rc4.d/S40ps-watcher ] && \ + [ -e /etc/rc5.d/S40ps-watcher ] && \ + [ -e /etc/rc0.d/K40ps-watcher ] && \ + [ -e /etc/rc1.d/K40ps-watcher ] && \ + [ -e /etc/rc6.d/K40ps-watcher ]; then + update-rc.d -f ps-watcher remove >/dev/null + fi +fi + +#DEBHELPER# diff --git a/debian/rules b/debian/rules index 0ddd3d5..0f2b7a9 100755 --- a/debian/rules +++ b/debian/rules @@ -50,7 +50,7 @@ binary-indep: build install dh_installchangelogs ChangeLog dh_installdocs dh_installexamples samples/* - dh_installinit -- defaults 40 + dh_installinit -- defaults 99 01 dh_link dh_compress dh_fixperms From 6754ae782883292e3f85dd6d1ced0203186f02e6 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 24 Jul 2009 17:23:05 +0000 Subject: [PATCH 063/158] bump policy --- debian/changelog | 1 + debian/control | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index d326cd5..b893c69 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,7 @@ ps-watcher (1.08-1) unstable; urgency=low * remove dpatch infrastructure * moved initscritps to S99 and K01, thanks Tim Miller Dyck (Closes: #508189) * created NEWS.Debian + * bump standards version to 3.8.2 (no changes needed) -- Jan Wagner Fri, 24 Jul 2009 19:12:00 +0200 diff --git a/debian/control b/debian/control index a4efd6d..d0bfce4 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Build-Depends-Indep: autotools-dev, libconfig-inifiles-perl, perl-modules Homepage: http://ps-watcher.sourceforge.net/ Vcs-Browser: https://trac.cyconet.org/debian/browser/debian/ps-watcher Vcs-Svn: https://trac.cyconet.org/svn/debian/ps-watcher -Standards-Version: 3.8.0 +Standards-Version: 3.8.2 Package: ps-watcher Architecture: all From 5992785d5140b8de2c0bd0ff432eea0d5a0468fe Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 24 Jul 2009 17:29:11 +0000 Subject: [PATCH 064/158] remove path from pidof --- debian/changelog | 1 + debian/preinst | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index b893c69..ec62cc0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,7 @@ ps-watcher (1.08-1) unstable; urgency=low * moved initscritps to S99 and K01, thanks Tim Miller Dyck (Closes: #508189) * created NEWS.Debian * bump standards version to 3.8.2 (no changes needed) + * calling pidof in preinst without absolut path -- Jan Wagner Fri, 24 Jul 2009 19:12:00 +0200 diff --git a/debian/preinst b/debian/preinst index 36daa0b..0bb90a1 100755 --- a/debian/preinst +++ b/debian/preinst @@ -3,6 +3,6 @@ set -e # generate correct pid file, for versions where was non or incorrect if [ "$1" = "upgrade" ] && [ "$2" ] && dpkg --compare-versions "$2" <= "1.06-6"; then - /bin/pidof ps-watcher > /var/run/ps-watcher.pid + pidof ps-watcher > /var/run/ps-watcher.pid fi #DEBHELPER# From 8bd82d31a9836e2eaa32dc73db7ac1fcb1f8e9ea Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 24 Jul 2009 18:00:08 +0000 Subject: [PATCH 065/158] be smarter --- debian/postinst | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/debian/postinst b/debian/postinst index 21a0a63..e44e87a 100644 --- a/debian/postinst +++ b/debian/postinst @@ -2,11 +2,7 @@ set -e -if [ "$1" != "configure" ]; then - exit 0 -fi - -if [ "$2" ] && dpkg --compare-versions "$2" lt "1.08-1"; then +if [ "$1" = "configure" ] && [ "$2" ] && dpkg --compare-versions "$2" lt "1.08-1"; then if [ -e /etc/rc2.d/S40ps-watcher ] && \ [ -e /etc/rc3.d/S40ps-watcher ] && \ [ -e /etc/rc4.d/S40ps-watcher ] && \ From f0401d2e3544e79534d71a5098a14f2ad10721b9 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 24 Jul 2009 18:00:29 +0000 Subject: [PATCH 066/158] make lintian happy --- debian/changelog | 3 ++- debian/source.lintian-overrides | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index ec62cc0..3852368 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,7 +7,8 @@ ps-watcher (1.08-1) unstable; urgency=low * moved initscritps to S99 and K01, thanks Tim Miller Dyck (Closes: #508189) * created NEWS.Debian * bump standards version to 3.8.2 (no changes needed) - * calling pidof in preinst without absolut path + * calling pidof in preinst without absolute path + * adjust lintian overrides for config* files -- Jan Wagner Fri, 24 Jul 2009 19:12:00 +0200 diff --git a/debian/source.lintian-overrides b/debian/source.lintian-overrides index b912f83..01dd852 100644 --- a/debian/source.lintian-overrides +++ b/debian/source.lintian-overrides @@ -1,2 +1,3 @@ -outdated-autotools-helper-file config.guess 2002-07-23 -outdated-autotools-helper-file config.sub 2001-08-13 +# we copy the files over from autotools-dev +ps-watcher source: ancient-autotools-helper-file config.sub 2001-08-13 +ps-watcher source: ancient-autotools-helper-file config.guess 2002-07-23 From e88343e79b75523e837dbd2c144102469212e7ea Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sat, 25 Jul 2009 23:41:11 +0000 Subject: [PATCH 067/158] fixup copyright --- debian/changelog | 6 ++++++ debian/copyright | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3852368..9f33562 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ps-watcher (1.08-2) UNRELEASED; urgency=low + + * add "Copyright" to all copyrights in debian/copyright + + -- Jan Wagner Fri, 24 Jul 2009 20:15:50 +0200 + ps-watcher (1.08-1) unstable; urgency=low * new upstream release diff --git a/debian/copyright b/debian/copyright index 7566d3a..cf5da2f 100644 --- a/debian/copyright +++ b/debian/copyright @@ -6,11 +6,11 @@ Upstream-Maintainer: Rocky Bernstein Upstream-Source: http://ps-watcher.sf.net Files: * -Copyright: (C) 2000-2006 Rocky Bernstein +Copyright: Copyright (C) 2000-2006 Rocky Bernstein License: GPL-2+ Files: debian/* -Copyright: (C) 2006, 2008 Jan Wagner +Copyright: Copyright (C) 2006, 2008 Jan Wagner License: GPL-2+ License: GPL-2+ From 1247f08ec9de8391d8b88d8f2969d542d5114bc1 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Tue, 23 Feb 2010 15:46:31 +0000 Subject: [PATCH 068/158] * Bump Standards-Version to 3.8.4, no changes needed * Migrate Vcs-Fields over to scm.uncompleted.org * Add 1.0 to debian/source/format --- debian/changelog | 5 ++++- debian/control | 6 +++--- debian/source/format | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 debian/source/format diff --git a/debian/changelog b/debian/changelog index 9f33562..ba5766f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,9 @@ ps-watcher (1.08-2) UNRELEASED; urgency=low - * add "Copyright" to all copyrights in debian/copyright + * Add "Copyright" to all copyrights in debian/copyright + * Bump Standards-Version to 3.8.4, no changes needed + * Migrate Vcs-Fields over to scm.uncompleted.org + * Add 1.0 to debian/source/format -- Jan Wagner Fri, 24 Jul 2009 20:15:50 +0200 diff --git a/debian/control b/debian/control index d0bfce4..69d8f48 100644 --- a/debian/control +++ b/debian/control @@ -5,9 +5,9 @@ Maintainer: Jan Wagner Build-Depends: debhelper (>= 5) Build-Depends-Indep: autotools-dev, libconfig-inifiles-perl, perl-modules Homepage: http://ps-watcher.sourceforge.net/ -Vcs-Browser: https://trac.cyconet.org/debian/browser/debian/ps-watcher -Vcs-Svn: https://trac.cyconet.org/svn/debian/ps-watcher -Standards-Version: 3.8.2 +Vcs-Browser: https://scm.uncompleted.org/projects/debian/repository/show/ps-watcher +Vcs-Svn: https://scm.uncompleted.org/svn/debian/ps-watcher +Standards-Version: 3.8.4 Package: ps-watcher Architecture: all diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..d3827e7 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +1.0 From 13e3215b4ca806f5b8692b61843789925e8f11c9 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 10 Mar 2010 08:16:46 +0000 Subject: [PATCH 069/158] Add trailing trunk/ at Vcs-Svn-field --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 69d8f48..65c2821 100644 --- a/debian/control +++ b/debian/control @@ -6,7 +6,7 @@ Build-Depends: debhelper (>= 5) Build-Depends-Indep: autotools-dev, libconfig-inifiles-perl, perl-modules Homepage: http://ps-watcher.sourceforge.net/ Vcs-Browser: https://scm.uncompleted.org/projects/debian/repository/show/ps-watcher -Vcs-Svn: https://scm.uncompleted.org/svn/debian/ps-watcher +Vcs-Svn: https://scm.uncompleted.org/svn/debian/ps-watcher/trunk Standards-Version: 3.8.4 Package: ps-watcher From 16f0e23a66d1d6d47470bcc13f8e092e0353435a Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 10 Mar 2010 11:42:07 +0000 Subject: [PATCH 070/158] fixing #523405 --- debian/README.Debian | 2 +- debian/changelog | 1 + debian/init.d | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/README.Debian b/debian/README.Debian index a0dfc7b..9ee3fa9 100644 --- a/debian/README.Debian +++ b/debian/README.Debian @@ -4,7 +4,7 @@ ps-watcher for Debian 1. PROVIDE A CONFIGFILE ----------------------- -Please provide a config file, usualy /etc/ps-watcher.conf. Examples are +Please provide a config file, usually /etc/ps-watcher.conf. Examples are located in /usr/share/doc/ps-watcher/examples/. 2. AUTOMATIC STARTUP diff --git a/debian/changelog b/debian/changelog index ba5766f..52e4dd0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ ps-watcher (1.08-2) UNRELEASED; urgency=low * Bump Standards-Version to 3.8.4, no changes needed * Migrate Vcs-Fields over to scm.uncompleted.org * Add 1.0 to debian/source/format + * refer README.Debian* in initscript (Closes: #523405) -- Jan Wagner Fri, 24 Jul 2009 20:15:50 +0200 diff --git a/debian/init.d b/debian/init.d index 047debf..093cc77 100644 --- a/debian/init.d +++ b/debian/init.d @@ -37,7 +37,7 @@ not_configured () { then echo "" echo "Please pease provide a configfile!" - echo "See /usr/share/doc/ps-watcher/README.Debian.gz." + echo "See /usr/share/doc/ps-watcher/README.Debian*." fi echo "#################" exit 0 From 57b0f54dab993d0fd0f30823e09f2d6d7d32f914 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 10 Mar 2010 11:44:58 +0000 Subject: [PATCH 071/158] prepare release --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 52e4dd0..9896478 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -ps-watcher (1.08-2) UNRELEASED; urgency=low +ps-watcher (1.08-2) unstable; urgency=low * Add "Copyright" to all copyrights in debian/copyright * Bump Standards-Version to 3.8.4, no changes needed @@ -6,7 +6,7 @@ ps-watcher (1.08-2) UNRELEASED; urgency=low * Add 1.0 to debian/source/format * refer README.Debian* in initscript (Closes: #523405) - -- Jan Wagner Fri, 24 Jul 2009 20:15:50 +0200 + -- Jan Wagner Wed, 10 Mar 2010 12:44:44 +0100 ps-watcher (1.08-1) unstable; urgency=low From a87a8a38fa2e965aec70d9f8af47a0065f3ece82 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 10 Mar 2010 11:47:38 +0000 Subject: [PATCH 072/158] new changelog --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 9896478..73b8c7c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ps-watcher (1.08-3) UNRELEASED; urgency=low + + * NOT RELEASED YET + + -- Jan Wagner Wed, 10 Mar 2010 12:47:29 +0100 + ps-watcher (1.08-2) unstable; urgency=low * Add "Copyright" to all copyrights in debian/copyright From 8aa3e507ac56493e52c7aacc12b045798495e88c Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 28 Mar 2012 06:14:25 +0000 Subject: [PATCH 073/158] switch to packaging 3.0 and bump standards --- debian/changelog | 4 +++- debian/control | 4 ++-- debian/source/format | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 73b8c7c..6917ae6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ ps-watcher (1.08-3) UNRELEASED; urgency=low - * NOT RELEASED YET + * Bump Standards-Version to 3.9.3, no changes needed + * Raise debhelper version to 9 + * Switch packaging format to "3.0 (quilt)" -- Jan Wagner Wed, 10 Mar 2010 12:47:29 +0100 diff --git a/debian/control b/debian/control index 65c2821..085756f 100644 --- a/debian/control +++ b/debian/control @@ -2,12 +2,12 @@ Source: ps-watcher Section: admin Priority: extra Maintainer: Jan Wagner -Build-Depends: debhelper (>= 5) +Build-Depends: debhelper (>= 9) Build-Depends-Indep: autotools-dev, libconfig-inifiles-perl, perl-modules Homepage: http://ps-watcher.sourceforge.net/ Vcs-Browser: https://scm.uncompleted.org/projects/debian/repository/show/ps-watcher Vcs-Svn: https://scm.uncompleted.org/svn/debian/ps-watcher/trunk -Standards-Version: 3.8.4 +Standards-Version: 3.9.3 Package: ps-watcher Architecture: all diff --git a/debian/source/format b/debian/source/format index d3827e7..163aaf8 100644 --- a/debian/source/format +++ b/debian/source/format @@ -1 +1 @@ -1.0 +3.0 (quilt) From 5cf9d869f415cb33edeaca5d1a3909a696c6f0be Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 28 Mar 2012 06:22:26 +0000 Subject: [PATCH 074/158] add build-arch and build-indep targets --- debian/changelog | 1 + debian/rules | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 6917ae6..628a056 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ ps-watcher (1.08-3) UNRELEASED; urgency=low * Bump Standards-Version to 3.9.3, no changes needed * Raise debhelper version to 9 * Switch packaging format to "3.0 (quilt)" + * Add build-arch and build-indep targets to debian/rules -- Jan Wagner Wed, 10 Mar 2010 12:47:29 +0100 diff --git a/debian/rules b/debian/rules index 0f2b7a9..9122b01 100755 --- a/debian/rules +++ b/debian/rules @@ -15,7 +15,10 @@ endif # Add here commands to configure the package. ./configure --prefix=/usr --mandir=\$${prefix}/share/man -build: build-stamp +build: build-arch build-indep +build-arch: build-stamp +build-indep: build-stamp + build-stamp: config.status dh_testdir From f24ac4d4f7fecc7c7b1533ff674e7dd2de6c4642 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 28 Mar 2012 06:50:43 +0000 Subject: [PATCH 075/158] set ps_prog to "/bin/ps" --- debian/changelog | 2 ++ debian/patches/ps_binary | 15 +++++++++++++++ debian/patches/series | 1 + 3 files changed, 18 insertions(+) create mode 100644 debian/patches/ps_binary create mode 100644 debian/patches/series diff --git a/debian/changelog b/debian/changelog index 628a056..5a260e3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,8 @@ ps-watcher (1.08-3) UNRELEASED; urgency=low * Raise debhelper version to 9 * Switch packaging format to "3.0 (quilt)" * Add build-arch and build-indep targets to debian/rules + * Add patches/ps_binary to set ps_prog to "/bin/ps", thank to Gregory Davis + (Closes: 645791) -- Jan Wagner Wed, 10 Mar 2010 12:47:29 +0100 diff --git a/debian/patches/ps_binary b/debian/patches/ps_binary new file mode 100644 index 0000000..a5d1b8e --- /dev/null +++ b/debian/patches/ps_binary @@ -0,0 +1,15 @@ +From: Jan Wagner +Subject: Patch path of ps, so we don't need to have the binary installed on compiletime +Index: ps-watcher-1.08/ps-watcher.in.in +=================================================================== +--- ps-watcher-1.08.orig/ps-watcher.in.in 2012-03-28 08:37:45.000000000 +0200 ++++ ps-watcher-1.08/ps-watcher.in.in 2012-03-28 08:38:13.000000000 +0200 +@@ -339,7 +339,7 @@ + $opts{syslog} = 1; # Log errors to syslog + $opts{logfile} = $DEVNULL; + $opts{daemon} = 1; # Run as daemon; +- $opts{ps_prog} = '@PS@'; # Where is ps? ++ $opts{ps_prog} = '/bin/ps'; # Where is ps? + $opts{ps_pid_opts} = '@PS_PID_OPTS@'; # How do I get pids and commands? + + $ps_arg_opts = '@PS_ARGS@'; # How do I get full process command? diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..0d7b32d --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +ps_binary From df6e1606b3ab9120c852020e6190c0237ad6a904 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 28 Mar 2012 06:55:05 +0000 Subject: [PATCH 076/158] prepare release --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 5a260e3..a39ca91 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -ps-watcher (1.08-3) UNRELEASED; urgency=low +ps-watcher (1.08-3) unstable; urgency=low * Bump Standards-Version to 3.9.3, no changes needed * Raise debhelper version to 9 @@ -7,7 +7,7 @@ ps-watcher (1.08-3) UNRELEASED; urgency=low * Add patches/ps_binary to set ps_prog to "/bin/ps", thank to Gregory Davis (Closes: 645791) - -- Jan Wagner Wed, 10 Mar 2010 12:47:29 +0100 + -- Jan Wagner Wed, 28 Mar 2012 08:53:20 +0200 ps-watcher (1.08-2) unstable; urgency=low From 739b42c6adb59ae833d5ee8556e1f544d473697e Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 28 Mar 2012 06:55:27 +0000 Subject: [PATCH 077/158] new changelog --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index a39ca91..759ef41 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ps-watcher (1.08-4) UNRELEASED; urgency=low + + * NOT RELEASED YET + + -- Jan Wagner Wed, 28 Mar 2012 08:55:15 +0200 + ps-watcher (1.08-3) unstable; urgency=low * Bump Standards-Version to 3.9.3, no changes needed From 293d757eb6435721157b229a09eef2788f27dcb6 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 28 Mar 2012 17:35:40 +0000 Subject: [PATCH 078/158] Depend on procps --- debian/changelog | 7 ++++--- debian/control | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 759ef41..2a31894 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,9 @@ -ps-watcher (1.08-4) UNRELEASED; urgency=low +ps-watcher (1.08-4) unstable; urgency=low - * NOT RELEASED YET + * Depend on procps, cause we need /bin/ps, thanks to Cristian Ionescu-Idbohrn + (Closes: #666097) - -- Jan Wagner Wed, 28 Mar 2012 08:55:15 +0200 + -- Jan Wagner Wed, 28 Mar 2012 19:28:35 +0200 ps-watcher (1.08-3) unstable; urgency=low diff --git a/debian/control b/debian/control index 085756f..d123bab 100644 --- a/debian/control +++ b/debian/control @@ -11,7 +11,7 @@ Standards-Version: 3.9.3 Package: ps-watcher Architecture: all -Depends: ${perl:Depends}, ${misc:Depends}, libconfig-inifiles-perl +Depends: ${perl:Depends}, ${misc:Depends}, libconfig-inifiles-perl, procps Recommends: libsys-syslog-perl Description: monitoring a system via ps-like commands This program runs the ps command periodically and triggers commands on matches. From 600c2c7d4ef32a0783f1db617ecd4790f4870525 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 28 Mar 2012 17:36:00 +0000 Subject: [PATCH 079/158] new changelog --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 2a31894..1617683 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ps-watcher (1.08-5) UNRELEASED; urgency=low + + * NOT RELEASED YET + + -- Jan Wagner Wed, 28 Mar 2012 19:35:49 +0200 + ps-watcher (1.08-4) unstable; urgency=low * Depend on procps, cause we need /bin/ps, thanks to Cristian Ionescu-Idbohrn From e1c0a488fe550e5cc9b5b2cb1c54dbe45aa95357 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 29 Mar 2012 17:31:24 +0000 Subject: [PATCH 080/158] Fix comparation --- debian/changelog | 6 +++--- debian/preinst | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 1617683..4c1c520 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -ps-watcher (1.08-5) UNRELEASED; urgency=low +ps-watcher (1.08-5) unstable; urgency=low - * NOT RELEASED YET + * Fix comparation in preinst script, realy (Closes: #666097) - -- Jan Wagner Wed, 28 Mar 2012 19:35:49 +0200 + -- Jan Wagner Thu, 29 Mar 2012 11:56:23 +0200 ps-watcher (1.08-4) unstable; urgency=low diff --git a/debian/preinst b/debian/preinst index 0bb90a1..d2d6a81 100755 --- a/debian/preinst +++ b/debian/preinst @@ -2,7 +2,7 @@ set -e # generate correct pid file, for versions where was non or incorrect -if [ "$1" = "upgrade" ] && [ "$2" ] && dpkg --compare-versions "$2" <= "1.06-6"; then +if [ "$1" = "upgrade" ] && [ "$2" ] && dpkg --compare-versions "$2" le "1.06-6"; then pidof ps-watcher > /var/run/ps-watcher.pid fi #DEBHELPER# From a3087cfc851097cb9f02273b90e3139875dd3b42 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 29 Mar 2012 17:43:17 +0000 Subject: [PATCH 081/158] new changelog --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 4c1c520..37ef8b0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ps-watcher (1.08-6) UNRELEASED; urgency=low + + * NOT RELEASED YET + + -- Jan Wagner Thu, 29 Mar 2012 19:43:03 +0200 + ps-watcher (1.08-5) unstable; urgency=low * Fix comparation in preinst script, realy (Closes: #666097) From 9f9bacd9ea56482dff6ac4afd5bbec3500c6e866 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 8 Nov 2013 22:16:25 +0100 Subject: [PATCH 082/158] Add needed changes to patches/ps_binary --- debian/patches/ps_binary | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/debian/patches/ps_binary b/debian/patches/ps_binary index a5d1b8e..22b33da 100644 --- a/debian/patches/ps_binary +++ b/debian/patches/ps_binary @@ -13,3 +13,14 @@ Index: ps-watcher-1.08/ps-watcher.in.in $opts{ps_pid_opts} = '@PS_PID_OPTS@'; # How do I get pids and commands? $ps_arg_opts = '@PS_ARGS@'; # How do I get full process command? +--- a/ps-watcher ++++ b/ps-watcher +@@ -855,7 +855,7 @@ Specify the executable search path used in running commands. + =item --ps-prog I + + One can specify the command that gives ps information. By default, the +-command is F. ++command is F. + + Z<> + From 62ebac8c57876f08c870c2e4a3841f3890219d69 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 8 Nov 2013 22:22:24 +0100 Subject: [PATCH 083/158] Adjusting clean target in debian/rules to completely cleanup --- debian/rules | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index 9122b01..ead32cd 100755 --- a/debian/rules +++ b/debian/rules @@ -30,11 +30,18 @@ build-stamp: config.status clean: dh_testdir dh_testroot + # remove target stamps rm -f build-stamp + rm -f ps-watcher.stamp + # remove autoconf files rm -f config.guess config.sub # Add here commands to clean up after the build process. - [ ! -f Makefile ] || $(MAKE) clean + [ ! -f Makefile ] || $(MAKE) clean && find . -name Makefile -exec rm {} + + # clean files left behind make clean + rm -f config.* ps-watcher.in post-configure docs/pod2htmd.tmp + # delete modified (regenerated) files + rm -f docs/ps-watcher.8 docs/ps-watcher.html dh_clean install: build From dc0bca0b52d54be3a3152fbebfe11a10cf008f3c Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 8 Nov 2013 22:30:31 +0100 Subject: [PATCH 084/158] Updating standards version to 3.9.4, no changes needed --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index d123bab..11cf056 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Build-Depends-Indep: autotools-dev, libconfig-inifiles-perl, perl-modules Homepage: http://ps-watcher.sourceforge.net/ Vcs-Browser: https://scm.uncompleted.org/projects/debian/repository/show/ps-watcher Vcs-Svn: https://scm.uncompleted.org/svn/debian/ps-watcher/trunk -Standards-Version: 3.9.3 +Standards-Version: 3.9.4 Package: ps-watcher Architecture: all From 6f0b2fa64bf98043efed6de185a9eded4d00b55b Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 8 Nov 2013 22:32:29 +0100 Subject: [PATCH 085/158] Source init functions in init script --- debian/init.d | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/init.d b/debian/init.d index 093cc77..5305af6 100644 --- a/debian/init.d +++ b/debian/init.d @@ -23,6 +23,8 @@ DESC=ps-watcher test -x $DAEMON || exit 0 +. /lib/lsb/init-functions + # Include ps-watcher defaults if available if [ -f /etc/default/ps-watcher ] ; then . /etc/default/ps-watcher From e5bc30b3f0e44604eec3bea724927aed67e880c7 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 8 Nov 2013 22:47:15 +0100 Subject: [PATCH 086/158] Update debian/copyright to latest machine-readable format --- debian/copyright | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/debian/copyright b/debian/copyright index cf5da2f..6a708c0 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,16 +1,14 @@ -Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196 -Packaged-By: Jan Wagner -Packaged-Date: Fri, 3 Nov 2006 14:39:48 +0100 +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: ps-watcher -Upstream-Maintainer: Rocky Bernstein -Upstream-Source: http://ps-watcher.sf.net +Upstream-Contact: Rocky Bernstein +Source: http://ps-watcher.sf.net Files: * -Copyright: Copyright (C) 2000-2006 Rocky Bernstein +Copyright: Copyright (C) 2000-2008 Rocky Bernstein License: GPL-2+ Files: debian/* -Copyright: Copyright (C) 2006, 2008 Jan Wagner +Copyright: Copyright (C) 2006, 2013 Jan Wagner License: GPL-2+ License: GPL-2+ @@ -18,15 +16,15 @@ License: GPL-2+ 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - + . On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-2 file. From d7faae5a2ba4b3c66ca93758e4e69ac9be8ed55b Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sat, 9 Nov 2013 00:09:13 +0100 Subject: [PATCH 087/158] Update Vcs-headers --- debian/control | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index 11cf056..fdd9b79 100644 --- a/debian/control +++ b/debian/control @@ -5,8 +5,8 @@ Maintainer: Jan Wagner Build-Depends: debhelper (>= 9) Build-Depends-Indep: autotools-dev, libconfig-inifiles-perl, perl-modules Homepage: http://ps-watcher.sourceforge.net/ -Vcs-Browser: https://scm.uncompleted.org/projects/debian/repository/show/ps-watcher -Vcs-Svn: https://scm.uncompleted.org/svn/debian/ps-watcher/trunk +Vcs-Browser: http://git.debian.org/?p=pkg-perl/packages/ps-watcher.git +Vcs-Git: git://git.debian.org/git/pkg-perl/packages/ps-watcher.git Standards-Version: 3.9.4 Package: ps-watcher From b9b8758e6741c1fd89bf0b68b09e2905f4c4c6c1 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sat, 9 Nov 2013 17:41:40 +0100 Subject: [PATCH 088/158] Updating standards version to 3.9.5, no changes needed --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index fdd9b79..c93109c 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Build-Depends-Indep: autotools-dev, libconfig-inifiles-perl, perl-modules Homepage: http://ps-watcher.sourceforge.net/ Vcs-Browser: http://git.debian.org/?p=pkg-perl/packages/ps-watcher.git Vcs-Git: git://git.debian.org/git/pkg-perl/packages/ps-watcher.git -Standards-Version: 3.9.4 +Standards-Version: 3.9.5 Package: ps-watcher Architecture: all From a154d1ab702a9feda2bc8cf7f3c6641055627d38 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 19 Feb 2014 21:48:10 +0100 Subject: [PATCH 089/158] Remove ps-watcher binary when making clean --- debian/patches/ps_binary | 11 ----------- debian/rules | 2 ++ 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/debian/patches/ps_binary b/debian/patches/ps_binary index 22b33da..a5d1b8e 100644 --- a/debian/patches/ps_binary +++ b/debian/patches/ps_binary @@ -13,14 +13,3 @@ Index: ps-watcher-1.08/ps-watcher.in.in $opts{ps_pid_opts} = '@PS_PID_OPTS@'; # How do I get pids and commands? $ps_arg_opts = '@PS_ARGS@'; # How do I get full process command? ---- a/ps-watcher -+++ b/ps-watcher -@@ -855,7 +855,7 @@ Specify the executable search path used in running commands. - =item --ps-prog I - - One can specify the command that gives ps information. By default, the --command is F. -+command is F. - - Z<> - diff --git a/debian/rules b/debian/rules index ead32cd..75deaed 100755 --- a/debian/rules +++ b/debian/rules @@ -42,6 +42,8 @@ clean: rm -f config.* ps-watcher.in post-configure docs/pod2htmd.tmp # delete modified (regenerated) files rm -f docs/ps-watcher.8 docs/ps-watcher.html + # remove ps-watcher binary as this would we regenerated on building the package + rm -f ps-watcher dh_clean install: build From 9d9887c7699f89a33de08ccc4a265ebfd00c5af5 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 13 Feb 2014 22:39:38 +0100 Subject: [PATCH 090/158] travis-ci: Add travis-ci config --- .travis.yml | 15 +++++++++++++++ debian/source/options | 1 + 2 files changed, 16 insertions(+) create mode 100644 .travis.yml create mode 100644 debian/source/options diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..0465ac2 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,15 @@ +language: c + +install: + - sudo apt-get update -qq + - sudo apt-get install -qq --no-install-recommends devscripts libwww-perl + - uscan --force-download + - sudo apt-get purge -qq libwww-perl + - sudo apt-get autoremove -qq + - sudo apt-get install -qq --no-install-recommends debhelper autotools-dev libconfig-inifiles-perl perl-modules + +script: + - debuild -uc -us + +#notifications: +# email: false diff --git a/debian/source/options b/debian/source/options new file mode 100644 index 0000000..a729099 --- /dev/null +++ b/debian/source/options @@ -0,0 +1 @@ +extend-diff-ignore = '^\.travis' From 8ec3e395db15b559dd8f061854ab6908069f79d4 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sun, 16 Feb 2014 23:45:22 +0100 Subject: [PATCH 091/158] travcis-ci: Reorder and comment --- .travis.yml | 10 +++++++++- debian/source/options | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0465ac2..77f82ba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,22 @@ language: c -install: +before_install: + # update package list - sudo apt-get update -qq + # installneeded packages for uscan - sudo apt-get install -qq --no-install-recommends devscripts libwww-perl + # download original tarball - uscan --force-download + # remove packages needed for uscan - sudo apt-get purge -qq libwww-perl - sudo apt-get autoremove -qq + +install: + # install build dependencies - sudo apt-get install -qq --no-install-recommends debhelper autotools-dev libconfig-inifiles-perl perl-modules script: + # build the debian package - debuild -uc -us #notifications: diff --git a/debian/source/options b/debian/source/options index a729099..b5bc9e7 100644 --- a/debian/source/options +++ b/debian/source/options @@ -1 +1 @@ -extend-diff-ignore = '^\.travis' +extend-diff-ignore = '(^|/)(\.travis\.yml|\.git|\.gitgnore|config\.sub|config\.guess)' From 7fab3574103da373e6611887880ca50d1ae405d8 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Tue, 25 Feb 2014 14:06:45 +0100 Subject: [PATCH 092/158] travis-ci: Add lintian checks after build --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 77f82ba..1f83005 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,5 +19,9 @@ script: # build the debian package - debuild -uc -us +after_script: + # run lintian after build + - sudo apt-get install -qq --no-install-recommends lintian + - lintian --info --display-info --display-experimental --pedantic --show-overrides ../*.deb && lintian --info --display-info --display-experimental --pedantic --show-overrides ../*.dsc #notifications: # email: false From 84de0bcdc0f23a1160329145988be413fff8a4ff Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 27 Feb 2014 23:07:23 +0100 Subject: [PATCH 093/158] Remove asterisks from NEWS file --- debian/NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/NEWS b/debian/NEWS index 65a664b..2cb08b1 100644 --- a/debian/NEWS +++ b/debian/NEWS @@ -1,6 +1,6 @@ ps-watcher (1.08-1) unstable; urgency=low - * moved startup to the end of the boot process and terminating to the + moved startup to the end of the boot process and terminating to the beginning of the shutdown process If you modified the order of ps-watcher runlevel scripts for your own, this From a4f22b31e0c4d4ca9444aac0d39e88ba92f73338 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 27 Feb 2014 23:10:46 +0100 Subject: [PATCH 094/158] Update VCS-* fields to current canonical URIs --- debian/control | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index c93109c..a23b009 100644 --- a/debian/control +++ b/debian/control @@ -5,8 +5,8 @@ Maintainer: Jan Wagner Build-Depends: debhelper (>= 9) Build-Depends-Indep: autotools-dev, libconfig-inifiles-perl, perl-modules Homepage: http://ps-watcher.sourceforge.net/ -Vcs-Browser: http://git.debian.org/?p=pkg-perl/packages/ps-watcher.git -Vcs-Git: git://git.debian.org/git/pkg-perl/packages/ps-watcher.git +Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-perl/packages/ps-watcher.git +Vcs-Git: git://anonscm.debian.org/pkg-perl/packages/ps-watcher.git Standards-Version: 3.9.5 Package: ps-watcher From 1a95e5d75599b9bc4ba13b42ade294b499a560fd Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 27 Feb 2014 23:14:18 +0100 Subject: [PATCH 095/158] Remove obsolete lintian override file --- debian/source.lintian-overrides | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 debian/source.lintian-overrides diff --git a/debian/source.lintian-overrides b/debian/source.lintian-overrides deleted file mode 100644 index 01dd852..0000000 --- a/debian/source.lintian-overrides +++ /dev/null @@ -1,3 +0,0 @@ -# we copy the files over from autotools-dev -ps-watcher source: ancient-autotools-helper-file config.sub 2001-08-13 -ps-watcher source: ancient-autotools-helper-file config.guess 2002-07-23 From 056d7706409ba0e4f847820b97e39889774e9ffa Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sun, 2 Mar 2014 16:44:39 +0100 Subject: [PATCH 096/158] Prepare changelog for release --- debian/changelog | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 37ef8b0..91537ed 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,21 @@ -ps-watcher (1.08-6) UNRELEASED; urgency=low +ps-watcher (1.08-6) unstable; urgency=low - * NOT RELEASED YET + * [9f9bacd] Add needed changes to patches/ps_binary + * [62ebac8] Adjusting clean target in debian/rules to completely cleanup + * [dc0bca0] Updating standards version to 3.9.4, no changes needed + * [6f0b2fa] Source init functions in init script + * [e5bc30b] Update debian/copyright to latest machine-readable format + * [d7faae5] Update Vcs-headers + * [b9b8758] Updating standards version to 3.9.5, no changes needed + * [a154d1a] Remove ps-watcher binary when making clean + * [9d9887c] travis-ci: Add travis-ci config + * [8ec3e39] travis-ci: Reorder and comment + * [7fab357] travis-ci: Add lintian checks after build + * [84de0bc] Remove asterisks from NEWS file + * [a4f22b3] Update VCS-* fields to current canonical URIs + * [1a95e5d] Remove obsolete lintian override file - -- Jan Wagner Thu, 29 Mar 2012 19:43:03 +0200 + -- Jan Wagner Sun, 02 Mar 2014 16:42:19 +0100 ps-watcher (1.08-5) unstable; urgency=low From f2c794754f3a8254ed15027465f9b7940991d7f6 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sun, 9 Mar 2014 15:00:12 +0100 Subject: [PATCH 097/158] Update Vcs-headers to selfhosted VCS Conflicts: debian/control --- debian/control | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index a23b009..5d29ef8 100644 --- a/debian/control +++ b/debian/control @@ -5,8 +5,8 @@ Maintainer: Jan Wagner Build-Depends: debhelper (>= 9) Build-Depends-Indep: autotools-dev, libconfig-inifiles-perl, perl-modules Homepage: http://ps-watcher.sourceforge.net/ -Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-perl/packages/ps-watcher.git -Vcs-Git: git://anonscm.debian.org/pkg-perl/packages/ps-watcher.git +Vcs-Browser: https://gitlab.uncompleted.org/debian/ps-watcher +Vcs-Git: https://gitlab.uncompleted.org/debian/ps-watcher.git Standards-Version: 3.9.5 Package: ps-watcher From a36ddd64ca50ceac44d9f4bc8acba1501e5d4086 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sun, 9 Mar 2014 16:32:56 +0100 Subject: [PATCH 098/158] Ignore modifications of ps-watcher script --- debian/source/options | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/source/options b/debian/source/options index b5bc9e7..92ee60b 100644 --- a/debian/source/options +++ b/debian/source/options @@ -1 +1 @@ -extend-diff-ignore = '(^|/)(\.travis\.yml|\.git|\.gitgnore|config\.sub|config\.guess)' +extend-diff-ignore = '(^|/)(ps-watcher|\.travis\.yml|\.git|\.gitgnore|config\.sub|config\.guess)' From 9c24a6a862b1c425d17f3fc260a9012db4ebbed0 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Mon, 10 Mar 2014 00:42:45 +0100 Subject: [PATCH 099/158] Prepare changelog for release --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 91537ed..1396894 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +ps-watcher (1.08-7) unstable; urgency=medium + + * [f2c7947] Update Vcs-headers to selfhosted VCS + * [a36ddd6] Ignore modifications of ps-watcher script + + -- Jan Wagner Mon, 10 Mar 2014 00:40:49 +0100 + ps-watcher (1.08-6) unstable; urgency=low * [9f9bacd] Add needed changes to patches/ps_binary From bb3b349fb76d1d0beacf5b87c734813bbcec3555 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Mon, 13 Oct 2014 15:14:46 +0200 Subject: [PATCH 100/158] New changelog --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 1396894..01818e6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ps-watcher (1.08-8) UNRELEASED; urgency=medium + + * + + -- Jan Wagner Mon, 13 Oct 2014 15:14:36 +0200 + ps-watcher (1.08-7) unstable; urgency=medium * [f2c7947] Update Vcs-headers to selfhosted VCS From 0d63c8c880001b07f14e5f9712ada70e35e96264 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Mon, 13 Oct 2014 15:15:02 +0200 Subject: [PATCH 101/158] Bump Standards-Version to 3.9.6, no changes needed --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 5d29ef8..1af9be1 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Build-Depends-Indep: autotools-dev, libconfig-inifiles-perl, perl-modules Homepage: http://ps-watcher.sourceforge.net/ Vcs-Browser: https://gitlab.uncompleted.org/debian/ps-watcher Vcs-Git: https://gitlab.uncompleted.org/debian/ps-watcher.git -Standards-Version: 3.9.5 +Standards-Version: 3.9.6 Package: ps-watcher Architecture: all From cb6a23cab4f7fab87e97485a035c526904796aa4 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Tue, 10 Mar 2015 16:02:03 +0100 Subject: [PATCH 102/158] travis-ci: don't install build-deps manual --- .travis.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1f83005..ad9d570 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,8 +12,13 @@ before_install: - sudo apt-get autoremove -qq install: - # install build dependencies - - sudo apt-get install -qq --no-install-recommends debhelper autotools-dev libconfig-inifiles-perl perl-modules + # install packages needed for mk-build-deps + - sudo apt-get install -qq --no-install-recommends devscripts equivs + # pull build deps from debian/control + - sudo mk-build-deps -ir + # remove packages needed for mk-build-deps + - sudo apt-get purge -qq equivs + - sudo apt-get autoremove -qq script: # build the debian package From 97be2474f71bcd0a8b63e7911377457d4d2b4379 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Tue, 10 Mar 2015 16:02:19 +0100 Subject: [PATCH 103/158] travis-ci: build package with dpkg-buildpackage --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ad9d570..88c5dd6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,7 +22,7 @@ install: script: # build the debian package - - debuild -uc -us + - dpkg-buildpackage -uc -us after_script: # run lintian after build From 6f42c4c78c6c4d9bafe3422fa46975663d70692e Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 11 Mar 2015 09:24:08 +0100 Subject: [PATCH 104/158] travis-ci: install ca-certificates to get certs for uscan --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 88c5dd6..481aba9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,11 +4,11 @@ before_install: # update package list - sudo apt-get update -qq # installneeded packages for uscan - - sudo apt-get install -qq --no-install-recommends devscripts libwww-perl + - sudo apt-get install -qq --no-install-recommends devscripts libwww-perl ca-certificates # download original tarball - uscan --force-download # remove packages needed for uscan - - sudo apt-get purge -qq libwww-perl + - sudo apt-get purge -qq libwww-perl ca-certificates - sudo apt-get autoremove -qq install: From 4717c8d55aaa6c5b61f50ab6d82ab2ec7fc61507 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 11 Mar 2015 09:33:47 +0100 Subject: [PATCH 105/158] travis-ci: bypassing #687834 --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 481aba9..2c4c7f8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,8 +5,8 @@ before_install: - sudo apt-get update -qq # installneeded packages for uscan - sudo apt-get install -qq --no-install-recommends devscripts libwww-perl ca-certificates - # download original tarball - - uscan --force-download + # download original tarball (and bypassing #687834) + - PERL_LWP_SSL_VERIFY_HOSTNAME=0; uscan --force-download # remove packages needed for uscan - sudo apt-get purge -qq libwww-perl ca-certificates - sudo apt-get autoremove -qq From 730cbe8743579cd381cd50f706d111b0d4efd79d Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 11 Mar 2015 14:45:50 +0100 Subject: [PATCH 106/158] travis-ci: bypass certificate validation of uscan --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2c4c7f8..5c9be16 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,15 @@ language: c +# bypass broken certificate validation of uscan +env: PERL_LWP_SSL_VERIFY_HOSTNAME=0 + before_install: # update package list - sudo apt-get update -qq # installneeded packages for uscan - sudo apt-get install -qq --no-install-recommends devscripts libwww-perl ca-certificates # download original tarball (and bypassing #687834) - - PERL_LWP_SSL_VERIFY_HOSTNAME=0; uscan --force-download + - uscan --force-download # remove packages needed for uscan - sudo apt-get purge -qq libwww-perl ca-certificates - sudo apt-get autoremove -qq From 0ab833e3e98a3e21bfa20e997c8cb92e9baafd40 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sun, 15 Mar 2015 16:46:01 +0100 Subject: [PATCH 107/158] travis-ci: Initial support for uploading releases to github --- .travis.yml | 11 ++ debian/bin/github-release.sh | 189 +++++++++++++++++++++++++++++++++++ 2 files changed, 200 insertions(+) create mode 100755 debian/bin/github-release.sh diff --git a/.travis.yml b/.travis.yml index 5c9be16..ad8c23c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,5 +31,16 @@ after_script: # run lintian after build - sudo apt-get install -qq --no-install-recommends lintian - lintian --info --display-info --display-experimental --pedantic --show-overrides ../*.deb && lintian --info --display-info --display-experimental --pedantic --show-overrides ../*.dsc + +env: + global: + # travis encrypt -r waja/ps-watcher GITHUBTOKEN=XXXXXX (https://help.github.com/articles/creating-an-access-token-for-command-line-use / http://docs.travis-ci.com/user/encryption-keys/) + secure: "Y4mgj75S6GAvPK1Xri4fPUZXipvwRIYzN4sVIaVbrZqJ1LxhR+91fNwRXxy9bsyI3Bje2H9ZK/W6anGUkqrk8rmjR4vvrbQtR2WBnS4Bt4CpdQKlg/SU1e6rSnJas92GqFf8JSv1C3T2rRcv0bLjhxs4GFUxuXltxmJwkAbWHhI=" + +after_success: + - mkdir -p debian/build/release/ + - for FILE in $(dcmd ../*.changes); do cp ../$(basename $FILE) debian/build/release/; done + - debian/bin/github-release.sh "$TRAVIS_REPO_SLUG" "debian/`head -1 debian/changelog | awk -F'[()]' '{print $2}' | awk -F'+' '{print $1}'`" debian/build/release/* + #notifications: # email: false diff --git a/debian/bin/github-release.sh b/debian/bin/github-release.sh new file mode 100755 index 0000000..2542112 --- /dev/null +++ b/debian/bin/github-release.sh @@ -0,0 +1,189 @@ +#!/bin/bash + +# Copyright (c) 2014 Terry Burton +# +# https://github.com/terryburton/travis-github-release +# +# Permission is hereby granted, free of charge, to any +# person obtaining a copy of this software and associated +# documentation files (the "Software"), to deal in the +# Software without restriction, including without +# limitation the rights to use, copy, modify, merge, +# publish, distribute, sublicense, and/or sell copies of +# the Software, and to permit persons to whom the Software +# is furnished to do so, subject to the following +# conditions: +# +# The above copyright notice and this permission notice +# shall be included in all copies or substantial portions +# of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO +# THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +# PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF +# CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. + +# This script provides a simple continuous deployment +# solution that allows Travis CI to publish a new GitHub +# release and upload assets to it whenever an annotated or +# signed tag is pushed (git tag -a/-s; git push --tags). +# +# It is created as a temporary solution whilst we wait for +# Travis DPL to support GitHub: +# +# https://github.com/travis-ci/dpl +# +# Place this script somewhere in your project repository (perhaps by forking +# the github-travis-release repo and adding your fork as a git submodule) then +# put something like this to your .travis.yml: +# +# after_success: .travis/github-release.sh "$TRAVIS_REPO_SLUG" "`head -1 src/VERSION`" build/release/* +# +# The first argument is your repository in the format +# "username/repository", which Travis provides in the +# TRAVIS_REPO_SLUG environment variable. +# +# The second argument is the release version which as a +# sanity check should match the tag that you are releasing. +# You could pass "`git describe`" to satisfy this check. +# +# The remaining arguments are a list of asset files that you +# want to publish along with the release. +# +# The script requires that you create a GitHub OAuth access +# token to facilitate the upload: +# +# https://help.github.com/articles/creating-an-access-token-for-command-line-use +# +# You must pass this securely in the GITHUBTOKEN environment +# variable: +# +# http://docs.travis-ci.com/user/encryption-keys/ +# +# For testing purposes you can create a local convenience +# file in the script directory called GITHUBTOKEN that sets +# the GITHUBTOKEN environment variable. If you do so you MUST +# ensure that this doesn't get pushed to your repository, +# perhaps by adding it to a .gitignore file. +# +# Should you get stuck then look at a working example. This +# code is being used by Barcode Writer in Pure PostScript +# for automated deployment: +# +# https://github.com/terryburton/postscriptbarcode + +set -e + +REPO=$1 && shift +RELEASE=$1 && shift +RELEASEFILES=$@ + +if ! TAG=`git describe --exact-match --all 2>/dev/null`; then + echo "This commit is not a tag so not creating a release" + exit 0 +fi + +if [ "$TRAVIS" = "true" ] && [ -z "$TRAVIS_TAG" ]; then + echo "This build is not for the tag so not creating a release" + exit 0 +fi + +if [ "$TRAVIS" = "true" ] && [ "$TRAVIS_TAG" != "$RELEASE" ]; then + echo "Error: TRAVIS_TAG ($TRAVIS_TAG) does not match the indicated release ($RELEASE)" + exit 1 +fi + +TAG=`echo "$TAG" | sed 's/^tags\///'` +if [ "$TAG" != "$RELEASE" ]; then + echo "Error: The tag ($TAG) does not match the indicated release ($RELEASE)" + exit 1 +fi + +if [[ -z "$RELEASEFILES" ]]; then + echo "Error: No release files provided" + exit 1 +fi + +SCRIPTDIR=`dirname $0` +[ -e "$SCRIPTDIR/GITHUBTOKEN" ] && . "$SCRIPTDIR/GITHUBTOKEN" +if [[ -z "$GITHUBTOKEN" ]]; then + echo "Error: GITHUBTOKEN is not set" + exit 1 +fi + +echo "Creating GitHub release for $RELEASE" + +echo -n "Create draft release... " +JSON=$(cat < Date: Sun, 15 Mar 2015 17:12:00 +0100 Subject: [PATCH 108/158] travis-ci: Fix setting environment variables --- .travis.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index ad8c23c..2c6b137 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,5 @@ language: c -# bypass broken certificate validation of uscan -env: PERL_LWP_SSL_VERIFY_HOSTNAME=0 - before_install: # update package list - sudo apt-get update -qq @@ -34,8 +31,10 @@ after_script: env: global: + # bypass broken certificate validation of uscan + - PERL_LWP_SSL_VERIFY_HOSTNAME=0 # travis encrypt -r waja/ps-watcher GITHUBTOKEN=XXXXXX (https://help.github.com/articles/creating-an-access-token-for-command-line-use / http://docs.travis-ci.com/user/encryption-keys/) - secure: "Y4mgj75S6GAvPK1Xri4fPUZXipvwRIYzN4sVIaVbrZqJ1LxhR+91fNwRXxy9bsyI3Bje2H9ZK/W6anGUkqrk8rmjR4vvrbQtR2WBnS4Bt4CpdQKlg/SU1e6rSnJas92GqFf8JSv1C3T2rRcv0bLjhxs4GFUxuXltxmJwkAbWHhI=" + - secure: "Y4mgj75S6GAvPK1Xri4fPUZXipvwRIYzN4sVIaVbrZqJ1LxhR+91fNwRXxy9bsyI3Bje2H9ZK/W6anGUkqrk8rmjR4vvrbQtR2WBnS4Bt4CpdQKlg/SU1e6rSnJas92GqFf8JSv1C3T2rRcv0bLjhxs4GFUxuXltxmJwkAbWHhI=" after_success: - mkdir -p debian/build/release/ From f0203f7f52f69ae6f4a6f84374453c281dc53439 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Tue, 17 Mar 2015 00:02:39 +0100 Subject: [PATCH 109/158] Merging upstream changes of github-release.sh --- debian/bin/github-release.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/debian/bin/github-release.sh b/debian/bin/github-release.sh index 2542112..79da0c9 100755 --- a/debian/bin/github-release.sh +++ b/debian/bin/github-release.sh @@ -30,8 +30,8 @@ # This script provides a simple continuous deployment # solution that allows Travis CI to publish a new GitHub -# release and upload assets to it whenever an annotated or -# signed tag is pushed (git tag -a/-s; git push --tags). +# release and upload assets to it whenever a tag is pushed: +# git tag; git push --tags # # It is created as a temporary solution whilst we wait for # Travis DPL to support GitHub: @@ -83,7 +83,7 @@ REPO=$1 && shift RELEASE=$1 && shift RELEASEFILES=$@ -if ! TAG=`git describe --exact-match --all 2>/dev/null`; then +if ! TAG=`git describe --exact-match --tags 2>/dev/null`; then echo "This commit is not a tag so not creating a release" exit 0 fi @@ -98,7 +98,6 @@ if [ "$TRAVIS" = "true" ] && [ "$TRAVIS_TAG" != "$RELEASE" ]; then exit 1 fi -TAG=`echo "$TAG" | sed 's/^tags\///'` if [ "$TAG" != "$RELEASE" ]; then echo "Error: The tag ($TAG) does not match the indicated release ($RELEASE)" exit 1 From 14ced40700cc314d817e39bc79ef5737b10a2cd2 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 18 Mar 2015 21:32:42 +0100 Subject: [PATCH 110/158] Updating copyright and author of debian/bin/github-release.sh --- debian/copyright | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/debian/copyright b/debian/copyright index 6a708c0..35f309e 100644 --- a/debian/copyright +++ b/debian/copyright @@ -11,6 +11,30 @@ Files: debian/* Copyright: Copyright (C) 2006, 2013 Jan Wagner License: GPL-2+ +Files: debian/bin/github-release.sh +Copyright: Copyright (c) 2014 Terry Burton +License: Expat + +License: Expat + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + . + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + License: GPL-2+ 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 From 811040721f6af7807efaa60885795c60c6d90c67 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 20 Aug 2015 14:12:03 +0200 Subject: [PATCH 111/158] debian/control: reformating with warp-and-sort --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 1af9be1..bf80885 100644 --- a/debian/control +++ b/debian/control @@ -11,7 +11,7 @@ Standards-Version: 3.9.6 Package: ps-watcher Architecture: all -Depends: ${perl:Depends}, ${misc:Depends}, libconfig-inifiles-perl, procps +Depends: libconfig-inifiles-perl, procps, ${misc:Depends}, ${perl:Depends} Recommends: libsys-syslog-perl Description: monitoring a system via ps-like commands This program runs the ps command periodically and triggers commands on matches. From ec7e507d7b606c1847fe90a5a784cdb544573a8e Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 21 Aug 2015 11:16:49 +0200 Subject: [PATCH 112/158] travis-ci: grab actual used upstream version --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2c6b137..44c6ca9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ before_install: # installneeded packages for uscan - sudo apt-get install -qq --no-install-recommends devscripts libwww-perl ca-certificates # download original tarball (and bypassing #687834) - - uscan --force-download + - UVERSION=$(dpkg-parsechangelog | grep ^Version | cut -d' ' -f2 | cut -d'-' -f1); uscan --verbose --download-version ${UVERSION} --force-download # remove packages needed for uscan - sudo apt-get purge -qq libwww-perl ca-certificates - sudo apt-get autoremove -qq From bf74eadb21e37ab7bedf0099f98842e4d844e010 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Mon, 19 Oct 2015 16:19:41 +0200 Subject: [PATCH 113/158] travis-ci: Adding requried arguments for trusty --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 44c6ca9..f12a9fa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,5 @@ +sudo: required +dist: trusty language: c before_install: From c408d41ececf4ef56c5145ddda78268f33b909a8 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Mon, 19 Oct 2015 16:40:44 +0200 Subject: [PATCH 114/158] travis-ci: automatically install dependencies --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f12a9fa..8e3a20b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ install: # install packages needed for mk-build-deps - sudo apt-get install -qq --no-install-recommends devscripts equivs # pull build deps from debian/control - - sudo mk-build-deps -ir + - sudo mk-build-deps -ir -t "apt-get --yes --no-install-recommends" # remove packages needed for mk-build-deps - sudo apt-get purge -qq equivs - sudo apt-get autoremove -qq From e87e5a8c7973fe49f88f5d387489b1afb3aa7264 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Mon, 14 Nov 2016 00:42:04 +0100 Subject: [PATCH 115/158] d/control: Bump Standards-Version to 3.9.8, no changes needed --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index bf80885..e465812 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Build-Depends-Indep: autotools-dev, libconfig-inifiles-perl, perl-modules Homepage: http://ps-watcher.sourceforge.net/ Vcs-Browser: https://gitlab.uncompleted.org/debian/ps-watcher Vcs-Git: https://gitlab.uncompleted.org/debian/ps-watcher.git -Standards-Version: 3.9.6 +Standards-Version: 3.9.8 Package: ps-watcher Architecture: all From f37bba04a8904b3d441eb9e886ec8f5d5136324d Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Mon, 14 Nov 2016 00:42:34 +0100 Subject: [PATCH 116/158] d/control: Depend on lsb-base --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index e465812..b346e0d 100644 --- a/debian/control +++ b/debian/control @@ -11,7 +11,7 @@ Standards-Version: 3.9.8 Package: ps-watcher Architecture: all -Depends: libconfig-inifiles-perl, procps, ${misc:Depends}, ${perl:Depends} +Depends: libconfig-inifiles-perl, lsb-base, procps, ${misc:Depends}, ${perl:Depends} Recommends: libsys-syslog-perl Description: monitoring a system via ps-like commands This program runs the ps command periodically and triggers commands on matches. From e77e9ec3e745c78268bd17bdba873dfc417d750a Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Mon, 14 Nov 2016 00:45:38 +0100 Subject: [PATCH 117/158] d/rules: Use dh_prep instead of 'dh_clean -k' --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index 75deaed..04a1d53 100755 --- a/debian/rules +++ b/debian/rules @@ -49,7 +49,7 @@ clean: install: build dh_testdir dh_testroot - dh_clean -k + dh_prep dh_installdirs # Add here commands to install the package into debian/ps-watcher. From 5d47daa3b959d656666017a510ed25f6accf72b0 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Mon, 14 Nov 2016 00:51:04 +0100 Subject: [PATCH 118/158] d/control: Droping perl-modules build dep --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index b346e0d..363a3b4 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: admin Priority: extra Maintainer: Jan Wagner Build-Depends: debhelper (>= 9) -Build-Depends-Indep: autotools-dev, libconfig-inifiles-perl, perl-modules +Build-Depends-Indep: autotools-dev, libconfig-inifiles-perl Homepage: http://ps-watcher.sourceforge.net/ Vcs-Browser: https://gitlab.uncompleted.org/debian/ps-watcher Vcs-Git: https://gitlab.uncompleted.org/debian/ps-watcher.git From 3f09626ea0b94b1ba50bb675318a2cc3af6eecc7 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Mon, 14 Nov 2016 11:31:50 +0100 Subject: [PATCH 119/158] travis-ci: Make use of travis.d.n --- .travis.yml | 57 ++++++++++++++++------------------------------------- 1 file changed, 17 insertions(+), 40 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8e3a20b..5277855 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,47 +1,24 @@ sudo: required -dist: trusty -language: c - -before_install: - # update package list - - sudo apt-get update -qq - # installneeded packages for uscan - - sudo apt-get install -qq --no-install-recommends devscripts libwww-perl ca-certificates - # download original tarball (and bypassing #687834) - - UVERSION=$(dpkg-parsechangelog | grep ^Version | cut -d' ' -f2 | cut -d'-' -f1); uscan --verbose --download-version ${UVERSION} --force-download - # remove packages needed for uscan - - sudo apt-get purge -qq libwww-perl ca-certificates - - sudo apt-get autoremove -qq - -install: - # install packages needed for mk-build-deps - - sudo apt-get install -qq --no-install-recommends devscripts equivs - # pull build deps from debian/control - - sudo mk-build-deps -ir -t "apt-get --yes --no-install-recommends" - # remove packages needed for mk-build-deps - - sudo apt-get purge -qq equivs - - sudo apt-get autoremove -qq - -script: - # build the debian package - - dpkg-buildpackage -uc -us - -after_script: - # run lintian after build - - sudo apt-get install -qq --no-install-recommends lintian - - lintian --info --display-info --display-experimental --pedantic --show-overrides ../*.deb && lintian --info --display-info --display-experimental --pedantic --show-overrides ../*.dsc env: - global: - # bypass broken certificate validation of uscan - - PERL_LWP_SSL_VERIFY_HOSTNAME=0 - # travis encrypt -r waja/ps-watcher GITHUBTOKEN=XXXXXX (https://help.github.com/articles/creating-an-access-token-for-command-line-use / http://docs.travis-ci.com/user/encryption-keys/) - - secure: "Y4mgj75S6GAvPK1Xri4fPUZXipvwRIYzN4sVIaVbrZqJ1LxhR+91fNwRXxy9bsyI3Bje2H9ZK/W6anGUkqrk8rmjR4vvrbQtR2WBnS4Bt4CpdQKlg/SU1e6rSnJas92GqFf8JSv1C3T2rRcv0bLjhxs4GFUxuXltxmJwkAbWHhI=" + - TRAVIS_DEBIAN_DISTRIBUTION=unstable TRAVIS_DEBIAN_SECURITY_UPDATES=false + - TRAVIS_DEBIAN_DISTRIBUTION=testing -after_success: - - mkdir -p debian/build/release/ - - for FILE in $(dcmd ../*.changes); do cp ../$(basename $FILE) debian/build/release/; done - - debian/bin/github-release.sh "$TRAVIS_REPO_SLUG" "debian/`head -1 debian/changelog | awk -F'[()]' '{print $2}' | awk -F'+' '{print $1}'`" debian/build/release/* +services: + - docker + +script: + # build the debian package + - wget -O- http://travis.debian.net/script.sh | sh - + +after_script: + # run lintian after build + - sudo apt-get install -qq --no-install-recommends lintian + - lintian --info --display-info --display-experimental --pedantic --show-overrides ../*.deb && lintian --info --display-info --display-experimental --pedantic --show-overrides ../*.dsc #notifications: # email: false + +branches: + except: + - /^debian\/\d/ From 212f8e2c677dac9f289e717678f2616389199a5c Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 18 Nov 2016 17:42:45 +0100 Subject: [PATCH 120/158] travis-ci: Testing stable too and fetching all tags --- .travis.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5277855..38ab64d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,17 @@ sudo: required env: - - TRAVIS_DEBIAN_DISTRIBUTION=unstable TRAVIS_DEBIAN_SECURITY_UPDATES=false - - TRAVIS_DEBIAN_DISTRIBUTION=testing + - TRAVIS_DEBIAN_DISTRIBUTION=unstable TRAVIS_DEBIAN_MIRROR="http://httpredir.debian.org/debian/" TRAVIS_DEBIAN_SECURITY_UPDATES=false + - TRAVIS_DEBIAN_DISTRIBUTION=testing TRAVIS_DEBIAN_MIRROR="http://httpredir.debian.org/debian/" + - TRAVIS_DEBIAN_DISTRIBUTION=stable TRAVIS_DEBIAN_MIRROR="http://httpredir.debian.org/debian/" services: - docker +before_script: + # fetch all tags (not done due travis cloning with depth=50) + - git fetch --tags + script: # build the debian package - wget -O- http://travis.debian.net/script.sh | sh - From 0ba1b56b65ffbbe1b14cb748a9df7cb87c1adbbf Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 18 Nov 2016 18:03:27 +0100 Subject: [PATCH 121/158] travis-ci: Add my own trusty ppa for newer lintian --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 38ab64d..39c4c32 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,6 +18,8 @@ script: after_script: # run lintian after build + - sudo add-apt-repository -y ppa:waja/trusty-backports + - sudo apt-get update -qq - sudo apt-get install -qq --no-install-recommends lintian - lintian --info --display-info --display-experimental --pedantic --show-overrides ../*.deb && lintian --info --display-info --display-experimental --pedantic --show-overrides ../*.dsc From 1122c1269821dd664a2aa4bb6daa939c4326ac2e Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Mon, 5 Dec 2016 11:14:25 +0100 Subject: [PATCH 122/158] d/changelog: Prepare release --- debian/changelog | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 01818e6..161be86 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,28 @@ -ps-watcher (1.08-8) UNRELEASED; urgency=medium +ps-watcher (1.08-8) unstable; urgency=medium - * + * [0d63c8c] Bump Standards-Version to 3.9.6, no changes needed + * [cb6a23c] travis-ci: don't install build-deps manual + * [97be247] travis-ci: build package with dpkg-buildpackage + * [6f42c4c] travis-ci: install ca-certificates to get certs for uscan + * [4717c8d] travis-ci: bypassing #687834 + * [730cbe8] travis-ci: bypass certificate validation of uscan + * [0ab833e] travis-ci: Initial support for uploading releases to github + * [93f9a0b] travis-ci: Fix setting environment variables + * [f0203f7] Merging upstream changes of github-release.sh + * [14ced40] Updating copyright and author of debian/bin/github-release.sh + * [8110407] debian/control: reformating with warp-and-sort + * [ec7e507] travis-ci: grab actual used upstream version + * [bf74ead] travis-ci: Adding required arguments for trusty + * [c408d41] travis-ci: automatically install dependencies + * [e87e5a8] d/control: Bump Standards-Version to 3.9.8, no changes needed + * [f37bba0] d/control: Depend on lsb-base + * [e77e9ec] d/rules: Use dh_prep instead of 'dh_clean -k' + * [5d47daa] d/control: Droping perl-modules build dep + * [3f09626] travis-ci: Make use of travis.d.n + * [212f8e2] travis-ci: Testing stable too and fetching all tags + * [0ba1b56] travis-ci: Add my own trusty ppa for newer lintian - -- Jan Wagner Mon, 13 Oct 2014 15:14:36 +0200 + -- Jan Wagner Mon, 05 Dec 2016 11:22:36 +0100 ps-watcher (1.08-7) unstable; urgency=medium From 3914d47a2a91e7d8cbeb15a09a7ef81e4be135f8 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Mon, 5 Dec 2016 11:48:56 +0100 Subject: [PATCH 123/158] d/changelog: New changelog --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 161be86..d6f2fb2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ps-watcher (1.08-9) UNRELEASED; urgency=medium + + * + + -- Jan Wagner Mon, 05 Dec 2016 11:48:17 +0100 + ps-watcher (1.08-8) unstable; urgency=medium * [0d63c8c] Bump Standards-Version to 3.9.6, no changes needed From 93fe2e97b8ab2fabe06692d78f98cce2cd8475a3 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Mon, 5 Dec 2016 14:32:03 +0100 Subject: [PATCH 124/158] d/changelog: Add missing entry --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index d6f2fb2..37bf2f6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,6 @@ ps-watcher (1.08-9) UNRELEASED; urgency=medium - * + * UNRELEASED -- Jan Wagner Mon, 05 Dec 2016 11:48:17 +0100 From adb45ae11634b27bfbc8f1945de633e0c3d13854 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 8 Nov 2018 16:47:24 +0100 Subject: [PATCH 125/158] travis-ci: Use xenial image --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 39c4c32..fcf0af0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,4 @@ +dist: xenial sudo: required env: From 910f8b91face7985b6a18425f76198d6f40ab621 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 24 Jan 2019 08:14:22 +0100 Subject: [PATCH 126/158] d/control: Bump Standards-Version to 4.3.0, no changes needed --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 363a3b4..08cc438 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Build-Depends-Indep: autotools-dev, libconfig-inifiles-perl Homepage: http://ps-watcher.sourceforge.net/ Vcs-Browser: https://gitlab.uncompleted.org/debian/ps-watcher Vcs-Git: https://gitlab.uncompleted.org/debian/ps-watcher.git -Standards-Version: 3.9.8 +Standards-Version: 4.3.0 Package: ps-watcher Architecture: all From 14f90ddfbfa1c6944b7011a559b014a45e7514c3 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 24 Jan 2019 08:17:18 +0100 Subject: [PATCH 127/158] d/control: Priority extra is deprecated, using optional --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 08cc438..6fc48f4 100644 --- a/debian/control +++ b/debian/control @@ -1,6 +1,6 @@ Source: ps-watcher Section: admin -Priority: extra +Priority: optional Maintainer: Jan Wagner Build-Depends: debhelper (>= 9) Build-Depends-Indep: autotools-dev, libconfig-inifiles-perl From 92680969c0189c42c7b0a37077c8fd094cd01447 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 24 Jan 2019 08:19:22 +0100 Subject: [PATCH 128/158] Prepare release --- debian/changelog | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 37bf2f6..7833d31 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,10 @@ -ps-watcher (1.08-9) UNRELEASED; urgency=medium +ps-watcher (1.08-9) unstable; urgency=medium - * UNRELEASED + * [adb45ae] travis-ci: Use xenial image + * [910f8b9] d/control: Bump Standards-Version to 4.3.0, no changes needed + * [14f90dd] d/control: Priority extra is deprecated, using optional - -- Jan Wagner Mon, 05 Dec 2016 11:48:17 +0100 + -- Jan Wagner Thu, 24 Jan 2019 08:18:46 +0100 ps-watcher (1.08-8) unstable; urgency=medium From 88e095e7ae5f862b651dbaeb5899a446dd6c740b Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 24 Jan 2019 08:26:46 +0100 Subject: [PATCH 129/158] New changelog entry --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 7833d31..24c982c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ps-watcher (1.08-10) UNRELEASED; urgency=medium + + * + + -- Jan Wagner Thu, 24 Jan 2019 08:26:28 +0100 + ps-watcher (1.08-9) unstable; urgency=medium * [adb45ae] travis-ci: Use xenial image From ed0099b0b6f3338e99c914eedb20188b53ac2540 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Tue, 8 Dec 2020 22:49:05 +0100 Subject: [PATCH 130/158] Raising compat level to 9, debhelper is already on 9 (Closes: #965785) --- debian/compat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/compat b/debian/compat index 7ed6ff8..ec63514 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -5 +9 From 75383b3a617fb18d40614e3e941bde2647638da4 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Tue, 8 Dec 2020 22:54:40 +0100 Subject: [PATCH 131/158] Bump Standards-Version to 4.5.1.0, no changes needed --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 6fc48f4..9dbbf1d 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Build-Depends-Indep: autotools-dev, libconfig-inifiles-perl Homepage: http://ps-watcher.sourceforge.net/ Vcs-Browser: https://gitlab.uncompleted.org/debian/ps-watcher Vcs-Git: https://gitlab.uncompleted.org/debian/ps-watcher.git -Standards-Version: 4.3.0 +Standards-Version: 4.5.1.0 Package: ps-watcher Architecture: all From 559d2a8088e5018a813e54c9b56aab583b36a813 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sun, 27 Dec 2020 23:39:54 +0100 Subject: [PATCH 132/158] Adding Github CI --- .github/workflows/packaging_test.yml | 35 ++++++++++++++ .github/workflows/release.yml | 70 ++++++++++++++++++++++++++++ 2 files changed, 105 insertions(+) create mode 100644 .github/workflows/packaging_test.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/packaging_test.yml b/.github/workflows/packaging_test.yml new file mode 100644 index 0000000..f844a58 --- /dev/null +++ b/.github/workflows/packaging_test.yml @@ -0,0 +1,35 @@ +name: Packaging Test + +on: + push: + branches: + - $default-branch + - development + - master + # Run tests for any PRs + pull_request: + +env: + SOURCE_DIR: ./ + ARTIFACTS_DIR: debian/build/release/ + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + env: + DEBIAN_FRONTEND: "noninteractive" + - name: Remove github artefacts + run: | + rm -rf .git* + - name: Adjust distibution in changelog file + run: | + sed -i '0,/restricted/s//stable/' debian/changelog + - name: Build Debian package + uses: dawidd6/action-debian-package@v1 + with: + artifacts_directory: debian/build/release/ + - name: Debug + run: | + ls -la diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..49663cf --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,70 @@ +on: + push: + # Sequence of patterns matched against refs/tags + tags: + - 'debian/*' # Push events to matching debian/*, i.e. debian/1.0-2, debian/20.15.10, debian/23.20020326 + +name: Release Process + +env: + SOURCE_DIR: ./ + ARTIFACTS_DIR: debian/build/release/ + +jobs: + create-release: + name: Create Release + runs-on: ubuntu-latest + outputs: + release-id: ${{ steps.create_release.outputs.id }} + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Install needed packages + run: | + if [ $(dpkg -l | grep -c dpkg-dev) -ne 1 ]; then sudo apt-get update && sudo apt-get install -y dpkg-dev; fi + - name: Gather changelog + run: | + ls -la + dpkg-parsechangelog | tail -n +9 > debian.changelog + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + body_path: debian.changelog + draft: false + prerelease: false + + build: + name: Build and upload packages + needs: create-release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + env: + DEBIAN_FRONTEND: "noninteractive" + - name: Remove github artefacts + run: | + rm -rf .git* + - name: Adjust distibution in changelog file + run: | + sed -i '0,/restricted/s//stable/' debian/changelog + - name: Build Debian package + uses: dawidd6/action-debian-package@v1 + with: + artifacts_directory: debian/build/release/ +# - name: Build Debian package +# uses: pi-top/action-debian-package@v0.2.0 +# with: +# artifacts_directory: debian/build/release/ +# target_architectures: "amd64,i386" + - name: Upload the artifacts + uses: skx/github-action-publish-binaries@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + releaseId: ${{ needs.create-release.outputs.release-id }} + args: debian/build/release/* From 412e691155611098157113b05d66575d02fb7e5e Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Tue, 29 Dec 2020 18:43:18 +0100 Subject: [PATCH 133/158] d/control: Raise compat level to 12 --- debian/compat | 1 - debian/control | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 debian/compat diff --git a/debian/compat b/debian/compat deleted file mode 100644 index ec63514..0000000 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/debian/control b/debian/control index 9dbbf1d..2955346 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: ps-watcher Section: admin Priority: optional Maintainer: Jan Wagner -Build-Depends: debhelper (>= 9) +Build-Depends: debhelper-compat (= 12) Build-Depends-Indep: autotools-dev, libconfig-inifiles-perl Homepage: http://ps-watcher.sourceforge.net/ Vcs-Browser: https://gitlab.uncompleted.org/debian/ps-watcher From 1597e17c3c1fa85022a228fe34c91cd4fb36b9f0 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 6 Jan 2021 22:02:40 +0100 Subject: [PATCH 134/158] Prepare release --- debian/changelog | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 24c982c..29c1a97 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,19 @@ -ps-watcher (1.08-10) UNRELEASED; urgency=medium +ps-watcher (1.08-10) unstable; urgency=medium - * + * [ed0099b] Raising compat level to 9, debhelper is already on 9 + (Closes: #965785) + * [75383b3] Bump Standards-Version to 4.5.1.0, no changes needed + * [559d2a8] Adding Github CI + * [412e691] d/control: Raise compat level to 12 - -- Jan Wagner Thu, 24 Jan 2019 08:26:28 +0100 + -- Jan Wagner Wed, 06 Jan 2021 21:59:48 +0100 + +ps-watcher (1.08-9.1) unstable; urgency=medium + + * Non maintainer upload by the Reproducible Builds team. + * No source change upload to rebuild on buildd with .buildinfo files. + + -- Holger Levsen Wed, 06 Jan 2021 17:28:10 +0100 ps-watcher (1.08-9) unstable; urgency=medium From 2dfb8419d5090d854bc9df88fc3f8a2fd3dc2f5d Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 6 Jan 2021 22:04:52 +0100 Subject: [PATCH 135/158] New changelog --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 29c1a97..dde370f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ps-watcher (1.08-11) UNRELEASED; urgency=medium + + * NOT RELEASED YET + + -- Jan Wagner Wed, 06 Jan 2021 22:04:39 +0100 + ps-watcher (1.08-10) unstable; urgency=medium * [ed0099b] Raising compat level to 9, debhelper is already on 9 From 5f175a7e674f80fb43d482a2e9b571b0888fef86 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 4 Feb 2021 21:38:51 +0100 Subject: [PATCH 136/158] Use secure copyright file specification URI. Changes-By: lintian-brush Fixes: lintian: insecure-copyright-format-uri See-also: https://lintian.debian.org/tags/insecure-copyright-format-uri.html --- debian/copyright | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/copyright b/debian/copyright index 35f309e..94b99dd 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,4 +1,4 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: ps-watcher Upstream-Contact: Rocky Bernstein Source: http://ps-watcher.sf.net From 829bf29dc3295dc53ba6a6fcd54e17581394a91a Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 4 Feb 2021 21:39:01 +0100 Subject: [PATCH 137/158] Set upstream metadata fields: Repository. Changes-By: lintian-brush Fixes: lintian: upstream-metadata-file-is-missing See-also: https://lintian.debian.org/tags/upstream-metadata-file-is-missing.html --- debian/upstream/metadata | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 debian/upstream/metadata diff --git a/debian/upstream/metadata b/debian/upstream/metadata new file mode 100644 index 0000000..2edd8a9 --- /dev/null +++ b/debian/upstream/metadata @@ -0,0 +1,2 @@ +--- +Repository: https://git.code.sf.net/p/ps-watcher/code From c390306e93cd18e251a791621764a89e0ecc758b Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 5 Feb 2021 12:40:24 +0100 Subject: [PATCH 138/158] d/source/options: Adding .github to diff ignore --- debian/source/options | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/source/options b/debian/source/options index 92ee60b..dabf641 100644 --- a/debian/source/options +++ b/debian/source/options @@ -1 +1 @@ -extend-diff-ignore = '(^|/)(ps-watcher|\.travis\.yml|\.git|\.gitgnore|config\.sub|config\.guess)' +extend-diff-ignore = '(^|/)(ps-watcher|\.travis\.yml|\.git|\.github|\.gitgnore|config\.sub|config\.guess)' From 1c64860e1b8b8c60357126e49ae368b59da4368e Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 5 Feb 2021 13:23:54 +0100 Subject: [PATCH 139/158] Adding d/.gitlab-ci.yml --- debian/.gitlab-ci.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 debian/.gitlab-ci.yml diff --git a/debian/.gitlab-ci.yml b/debian/.gitlab-ci.yml new file mode 100644 index 0000000..62767c1 --- /dev/null +++ b/debian/.gitlab-ci.yml @@ -0,0 +1,14 @@ +include: + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml + +variables: + RELEASE: 'unstable' + SALSA_CI_DISABLE_APTLY: 0 + SALSA_CI_DISABLE_AUTOPKGTEST: 0 + SALSA_CI_DISABLE_BLHC: 0 + SALSA_CI_DISABLE_LINTIAN: 0 + SALSA_CI_DISABLE_PIUPARTS: 0 + SALSA_CI_DISABLE_REPROTEST: 0 + SALSA_CI_DISABLE_BUILD_PACKAGE_ALL: 0 + SALSA_CI_DISABLE_BUILD_PACKAGE_ANY: 0 From 21a8edf68d3821243575200216364b6e74be7952 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 16 Jul 2021 23:10:48 +0200 Subject: [PATCH 140/158] Adding Dependabot config --- .github/dependabot.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..b3fa1e0 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: "/" + schedule: + interval: daily + time: "04:00" + reviewers: + - "waja" + pull-request-branch-name: + separator: "-" + open-pull-requests-limit: 10 From b8ef5714ecdc46eeb71e1d7383fdd8f5a6007415 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 16 Jul 2021 23:31:16 +0200 Subject: [PATCH 141/158] Do not remove .git* anymore --- .github/workflows/packaging_test.yml | 3 --- .github/workflows/release.yml | 3 --- 2 files changed, 6 deletions(-) diff --git a/.github/workflows/packaging_test.yml b/.github/workflows/packaging_test.yml index f844a58..f915b53 100644 --- a/.github/workflows/packaging_test.yml +++ b/.github/workflows/packaging_test.yml @@ -20,9 +20,6 @@ jobs: - uses: actions/checkout@v2 env: DEBIAN_FRONTEND: "noninteractive" - - name: Remove github artefacts - run: | - rm -rf .git* - name: Adjust distibution in changelog file run: | sed -i '0,/restricted/s//stable/' debian/changelog diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 49663cf..4c6c31f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -46,9 +46,6 @@ jobs: - uses: actions/checkout@v2 env: DEBIAN_FRONTEND: "noninteractive" - - name: Remove github artefacts - run: | - rm -rf .git* - name: Adjust distibution in changelog file run: | sed -i '0,/restricted/s//stable/' debian/changelog From ec4e93abdad500d94782abc587af429267cf5317 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 21 Jul 2021 15:44:41 +0200 Subject: [PATCH 142/158] ci: pin action versions --- .github/workflows/packaging_test.yml | 2 +- .github/workflows/release.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/packaging_test.yml b/.github/workflows/packaging_test.yml index f915b53..507c150 100644 --- a/.github/workflows/packaging_test.yml +++ b/.github/workflows/packaging_test.yml @@ -24,7 +24,7 @@ jobs: run: | sed -i '0,/restricted/s//stable/' debian/changelog - name: Build Debian package - uses: dawidd6/action-debian-package@v1 + uses: dawidd6/action-debian-package@v1.4.0 with: artifacts_directory: debian/build/release/ - name: Debug diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4c6c31f..de5de2f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -50,7 +50,7 @@ jobs: run: | sed -i '0,/restricted/s//stable/' debian/changelog - name: Build Debian package - uses: dawidd6/action-debian-package@v1 + uses: dawidd6/action-debian-package@v1.4.0 with: artifacts_directory: debian/build/release/ # - name: Build Debian package @@ -59,7 +59,7 @@ jobs: # artifacts_directory: debian/build/release/ # target_architectures: "amd64,i386" - name: Upload the artifacts - uses: skx/github-action-publish-binaries@master + uses: skx/github-action-publish-binaries@release-0.15 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: From 05ad103568d5a8ccd9930b0c8a23d08a6e9b7c06 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Mar 2022 04:25:04 +0000 Subject: [PATCH 143/158] Bump actions/checkout from 2 to 3 Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/packaging_test.yml | 2 +- .github/workflows/release.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/packaging_test.yml b/.github/workflows/packaging_test.yml index f915b53..0097515 100644 --- a/.github/workflows/packaging_test.yml +++ b/.github/workflows/packaging_test.yml @@ -17,7 +17,7 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 env: DEBIAN_FRONTEND: "noninteractive" - name: Adjust distibution in changelog file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4c6c31f..c24b34f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,7 +18,7 @@ jobs: release-id: ${{ steps.create_release.outputs.id }} steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Install needed packages run: | if [ $(dpkg -l | grep -c dpkg-dev) -ne 1 ]; then sudo apt-get update && sudo apt-get install -y dpkg-dev; fi @@ -43,7 +43,7 @@ jobs: needs: create-release runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 env: DEBIAN_FRONTEND: "noninteractive" - name: Adjust distibution in changelog file From a32dc0d4de67d66c6c9ee553042c2f8363478f5a Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 20 Oct 2022 13:08:52 +0200 Subject: [PATCH 144/158] Updating build pipelines --- .github/workflows/packaging_test.yml | 6 +++++- .github/workflows/release.yml | 10 +++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/packaging_test.yml b/.github/workflows/packaging_test.yml index 507c150..17ee0cd 100644 --- a/.github/workflows/packaging_test.yml +++ b/.github/workflows/packaging_test.yml @@ -17,9 +17,12 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 env: DEBIAN_FRONTEND: "noninteractive" + - name: Remove github artefacts + run: | + rm -rf .github* - name: Adjust distibution in changelog file run: | sed -i '0,/restricted/s//stable/' debian/changelog @@ -27,6 +30,7 @@ jobs: uses: dawidd6/action-debian-package@v1.4.0 with: artifacts_directory: debian/build/release/ + os_distribution: testing - name: Debug run: | ls -la diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index de5de2f..855b57d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,7 +18,7 @@ jobs: release-id: ${{ steps.create_release.outputs.id }} steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Install needed packages run: | if [ $(dpkg -l | grep -c dpkg-dev) -ne 1 ]; then sudo apt-get update && sudo apt-get install -y dpkg-dev; fi @@ -43,9 +43,12 @@ jobs: needs: create-release runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 env: DEBIAN_FRONTEND: "noninteractive" + - name: Remove github artefacts + run: | + rm -rf .github* - name: Adjust distibution in changelog file run: | sed -i '0,/restricted/s//stable/' debian/changelog @@ -53,13 +56,14 @@ jobs: uses: dawidd6/action-debian-package@v1.4.0 with: artifacts_directory: debian/build/release/ + os_distribution: testing # - name: Build Debian package # uses: pi-top/action-debian-package@v0.2.0 # with: # artifacts_directory: debian/build/release/ # target_architectures: "amd64,i386" - name: Upload the artifacts - uses: skx/github-action-publish-binaries@release-0.15 + uses: skx/github-action-publish-binaries@release-2.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: From 02612c6f8764d4d4949021974ae60a6dcdcc9807 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 18 Jan 2023 12:34:33 +0000 Subject: [PATCH 145/158] Use secure URI in Homepage field. Changes-By: lintian-brush Fixes: lintian: homepage-field-uses-insecure-uri See-also: https://lintian.debian.org/tags/homepage-field-uses-insecure-uri.html --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 2955346..758c24d 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,7 @@ Priority: optional Maintainer: Jan Wagner Build-Depends: debhelper-compat (= 12) Build-Depends-Indep: autotools-dev, libconfig-inifiles-perl -Homepage: http://ps-watcher.sourceforge.net/ +Homepage: https://ps-watcher.sourceforge.net/ Vcs-Browser: https://gitlab.uncompleted.org/debian/ps-watcher Vcs-Git: https://gitlab.uncompleted.org/debian/ps-watcher.git Standards-Version: 4.5.1.0 From 7339857ddb95074cd0b95c2c9f07776531608308 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 18 Jan 2023 12:35:10 +0000 Subject: [PATCH 146/158] Bump Standards-Version to 4.6.2 --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 758c24d..4d52a65 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Build-Depends-Indep: autotools-dev, libconfig-inifiles-perl Homepage: https://ps-watcher.sourceforge.net/ Vcs-Browser: https://gitlab.uncompleted.org/debian/ps-watcher Vcs-Git: https://gitlab.uncompleted.org/debian/ps-watcher.git -Standards-Version: 4.5.1.0 +Standards-Version: 4.6.2 Package: ps-watcher Architecture: all From e427efab7ab9b1f5621abd8c0267f60f265c7a91 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 18 Jan 2023 12:35:46 +0000 Subject: [PATCH 147/158] Update watch file format version to 4. Changes-By: lintian-brush Fixes: lintian: older-debian-watch-file-standard See-also: https://lintian.debian.org/tags/older-debian-watch-file-standard.html --- debian/watch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/watch b/debian/watch index 4f1512e..acda956 100644 --- a/debian/watch +++ b/debian/watch @@ -1,2 +1,2 @@ -version=3 -http://sf.net/ps-watcher/ps-watcher-(.*)\.tar\.gz +version=4 +http://sf.net/ps-watcher ps-watcher-(.*)\.tar\.gz From 97dd2ee6dbc46c7c63ab8f3dfd558324d8086506 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 18 Jan 2023 14:22:55 +0000 Subject: [PATCH 148/158] Drop lsb-base, sysvinit-utils is essential --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 4d52a65..baeda68 100644 --- a/debian/control +++ b/debian/control @@ -11,7 +11,7 @@ Standards-Version: 4.6.2 Package: ps-watcher Architecture: all -Depends: libconfig-inifiles-perl, lsb-base, procps, ${misc:Depends}, ${perl:Depends} +Depends: libconfig-inifiles-perl, procps, ${misc:Depends}, ${perl:Depends} Recommends: libsys-syslog-perl Description: monitoring a system via ps-like commands This program runs the ps command periodically and triggers commands on matches. From 2fed3743b875de483fb0c5704644968a9614d7cf Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 18 Jan 2023 14:34:50 +0000 Subject: [PATCH 149/158] disable not working ci pipelines --- debian/.gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/.gitlab-ci.yml b/debian/.gitlab-ci.yml index 62767c1..0100fa0 100644 --- a/debian/.gitlab-ci.yml +++ b/debian/.gitlab-ci.yml @@ -5,10 +5,10 @@ include: variables: RELEASE: 'unstable' SALSA_CI_DISABLE_APTLY: 0 - SALSA_CI_DISABLE_AUTOPKGTEST: 0 + SALSA_CI_DISABLE_AUTOPKGTEST: 1 SALSA_CI_DISABLE_BLHC: 0 SALSA_CI_DISABLE_LINTIAN: 0 - SALSA_CI_DISABLE_PIUPARTS: 0 - SALSA_CI_DISABLE_REPROTEST: 0 + SALSA_CI_DISABLE_PIUPARTS: 1 + SALSA_CI_DISABLE_REPROTEST: 1 SALSA_CI_DISABLE_BUILD_PACKAGE_ALL: 0 SALSA_CI_DISABLE_BUILD_PACKAGE_ANY: 0 From a009193ed09c12d188c1880354d2f3806f5278bf Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Mon, 23 Jan 2023 09:17:27 +0000 Subject: [PATCH 150/158] Adding unitfile --- debian/rules | 1 + debian/service | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 debian/service diff --git a/debian/rules b/debian/rules index 04a1d53..e91305d 100755 --- a/debian/rules +++ b/debian/rules @@ -63,6 +63,7 @@ binary-indep: build install dh_installdocs dh_installexamples samples/* dh_installinit -- defaults 99 01 + dh_installsystemd --no-enable dh_link dh_compress dh_fixperms diff --git a/debian/service b/debian/service new file mode 100644 index 0000000..6d3f8e3 --- /dev/null +++ b/debian/service @@ -0,0 +1,14 @@ +[Unit] +Description=monitoring a system via ps-like commands + +[Service] +Environment=PIDFILE=/var/run/ps-watcher.pid +EnvironmentFile=-/etc/default/ps-watcher +ExecStart=/usr/sbin/ps-watcher -c $CONFIG --daemon $DAEMON_OPTS +ExecReload=/bin/kill -HUP $MAINPID +KillMode=process +Restart=on-failure +Type=notify + +[Install] +WantedBy=multi-user.target From 032d1f759061e0cf837d7b2c5179ffa6485b68be Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Mon, 23 Jan 2023 09:17:49 +0000 Subject: [PATCH 151/158] Set upstream metadata fields: Archive, Bug-Database. Changes-By: lintian-brush --- debian/upstream/metadata | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/upstream/metadata b/debian/upstream/metadata index 2edd8a9..081720f 100644 --- a/debian/upstream/metadata +++ b/debian/upstream/metadata @@ -1,2 +1,4 @@ --- +Archive: SourceForge +Bug-Database: http://sourceforge.net/tracker/?func=add&group_id=63944&atid=505723 Repository: https://git.code.sf.net/p/ps-watcher/code From ec1d2affe1b377fc88bc0fef5f274ed4b79877ff Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Mon, 23 Jan 2023 09:17:49 +0000 Subject: [PATCH 152/158] Set Rules-Requires-Root: no. Changes-By: lintian-brush Fixes: lintian: silent-on-rules-requiring-root See-also: https://lintian.debian.org/tags/silent-on-rules-requiring-root.html --- debian/control | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/control b/debian/control index baeda68..d662153 100644 --- a/debian/control +++ b/debian/control @@ -8,6 +8,7 @@ Homepage: https://ps-watcher.sourceforge.net/ Vcs-Browser: https://gitlab.uncompleted.org/debian/ps-watcher Vcs-Git: https://gitlab.uncompleted.org/debian/ps-watcher.git Standards-Version: 4.6.2 +Rules-Requires-Root: no Package: ps-watcher Architecture: all From ea639a6b57d731470c6b88108895755f17625759 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Mon, 23 Jan 2023 09:46:52 +0000 Subject: [PATCH 153/158] Bump debhelper from old 12 to 13. --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index d662153..5665dc1 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: ps-watcher Section: admin Priority: optional Maintainer: Jan Wagner -Build-Depends: debhelper-compat (= 12) +Build-Depends: debhelper-compat (= 13) Build-Depends-Indep: autotools-dev, libconfig-inifiles-perl Homepage: https://ps-watcher.sourceforge.net/ Vcs-Browser: https://gitlab.uncompleted.org/debian/ps-watcher From d6b6724967aa3a12d911d0f0d53d782e5802a902 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Mon, 23 Jan 2023 12:25:14 +0000 Subject: [PATCH 154/158] Prepare release --- debian/changelog | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index dde370f..02fb5f8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,20 @@ -ps-watcher (1.08-11) UNRELEASED; urgency=medium +ps-watcher (1.08-11) unstable; urgency=medium - * NOT RELEASED YET + * [5f175a7] Use secure copyright file specification URI. + * [829bf29] Set upstream metadata fields: Repository. + * [c390306] d/source/options: Adding .github to diff ignore + * [1c64860] Adding d/.gitlab-ci.yml + * [b8ef571] Do not remove .git* anymore + * [02612c6] Use secure URI in Homepage field. + * [7339857] Bump Standards-Version to 4.6.2 + * [e427efa] Update watch file format version to 4. + * [97dd2ee] Drop lsb-base, sysvinit-utils is essential + * [a009193] Adding unitfile + * [032d1f7] Set upstream metadata fields: Archive, Bug-Database. + * [ec1d2af] Set Rules-Requires-Root: no. + * [ea639a6] Bump debhelper from old 12 to 13. - -- Jan Wagner Wed, 06 Jan 2021 22:04:39 +0100 + -- Jan Wagner Mon, 23 Jan 2023 12:24:01 +0000 ps-watcher (1.08-10) unstable; urgency=medium From 65d65c41748b43f2626e16c321b040ed8a923ca8 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Mon, 23 Jan 2023 12:35:19 +0000 Subject: [PATCH 155/158] New changelog --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 02fb5f8..aff6f2b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ps-watcher (1.08-12) UNRELEASED; urgency=medium + + * + + -- Jan Wagner Mon, 23 Jan 2023 12:34:15 +0000 + ps-watcher (1.08-11) unstable; urgency=medium * [5f175a7] Use secure copyright file specification URI. From 1b91db0783875da28ed1d194d291c289a9c7d1a6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Jan 2023 04:05:07 +0000 Subject: [PATCH 156/158] build(deps): bump dawidd6/action-debian-package from 1.4.0 to 1.4.4 Bumps [dawidd6/action-debian-package](https://github.com/dawidd6/action-debian-package) from 1.4.0 to 1.4.4. - [Release notes](https://github.com/dawidd6/action-debian-package/releases) - [Commits](https://github.com/dawidd6/action-debian-package/compare/v1.4.0...v1.4.4) --- updated-dependencies: - dependency-name: dawidd6/action-debian-package dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/packaging_test.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/packaging_test.yml b/.github/workflows/packaging_test.yml index 17ee0cd..9dc4643 100644 --- a/.github/workflows/packaging_test.yml +++ b/.github/workflows/packaging_test.yml @@ -27,7 +27,7 @@ jobs: run: | sed -i '0,/restricted/s//stable/' debian/changelog - name: Build Debian package - uses: dawidd6/action-debian-package@v1.4.0 + uses: dawidd6/action-debian-package@v1.4.4 with: artifacts_directory: debian/build/release/ os_distribution: testing diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 855b57d..3ef907c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -53,7 +53,7 @@ jobs: run: | sed -i '0,/restricted/s//stable/' debian/changelog - name: Build Debian package - uses: dawidd6/action-debian-package@v1.4.0 + uses: dawidd6/action-debian-package@v1.4.4 with: artifacts_directory: debian/build/release/ os_distribution: testing From 16b8293653e26652c964c8a4b4f459d919ecd3d6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 Mar 2023 05:00:23 +0000 Subject: [PATCH 157/158] build(deps): bump dawidd6/action-debian-package from 1.4.4 to 1.5.0 Bumps [dawidd6/action-debian-package](https://github.com/dawidd6/action-debian-package) from 1.4.4 to 1.5.0. - [Release notes](https://github.com/dawidd6/action-debian-package/releases) - [Commits](https://github.com/dawidd6/action-debian-package/compare/v1.4.4...v1.5.0) --- updated-dependencies: - dependency-name: dawidd6/action-debian-package dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/packaging_test.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/packaging_test.yml b/.github/workflows/packaging_test.yml index 9dc4643..81cc8c9 100644 --- a/.github/workflows/packaging_test.yml +++ b/.github/workflows/packaging_test.yml @@ -27,7 +27,7 @@ jobs: run: | sed -i '0,/restricted/s//stable/' debian/changelog - name: Build Debian package - uses: dawidd6/action-debian-package@v1.4.4 + uses: dawidd6/action-debian-package@v1.5.0 with: artifacts_directory: debian/build/release/ os_distribution: testing diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3ef907c..3f3f765 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -53,7 +53,7 @@ jobs: run: | sed -i '0,/restricted/s//stable/' debian/changelog - name: Build Debian package - uses: dawidd6/action-debian-package@v1.4.4 + uses: dawidd6/action-debian-package@v1.5.0 with: artifacts_directory: debian/build/release/ os_distribution: testing From ce92cd06b46fc4e018be443506f1ed159c6324d6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Sep 2023 04:19:04 +0000 Subject: [PATCH 158/158] build(deps): bump actions/checkout from 3 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/packaging_test.yml | 2 +- .github/workflows/release.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/packaging_test.yml b/.github/workflows/packaging_test.yml index 81cc8c9..c478ef5 100644 --- a/.github/workflows/packaging_test.yml +++ b/.github/workflows/packaging_test.yml @@ -17,7 +17,7 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 env: DEBIAN_FRONTEND: "noninteractive" - name: Remove github artefacts diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3f3f765..f384f5e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,7 +18,7 @@ jobs: release-id: ${{ steps.create_release.outputs.id }} steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install needed packages run: | if [ $(dpkg -l | grep -c dpkg-dev) -ne 1 ]; then sudo apt-get update && sudo apt-get install -y dpkg-dev; fi @@ -43,7 +43,7 @@ jobs: needs: create-release runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 env: DEBIAN_FRONTEND: "noninteractive" - name: Remove github artefacts