From: Mark Huang Date: Fri, 30 Jul 2004 16:40:20 +0000 (+0000) Subject: util-vserver-0.29 X-Git-Tag: util-vserver-0_29~1 X-Git-Url: http://git.onelab.eu/?p=util-vserver.git;a=commitdiff_plain;h=96b9bc3416686cb4080beb8bda4283edaefafbe2 util-vserver-0.29 --- 96b9bc3416686cb4080beb8bda4283edaefafbe2 diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..db53813 --- /dev/null +++ b/AUTHORS @@ -0,0 +1 @@ +Enrico Scholz diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..d60c31a --- /dev/null +++ b/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year 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..80f7aa4 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,748 @@ +2004-02-11 22:06 Enrico Scholz + + * NEWS, configure.ac: version 0.29 + +2004-02-10 00:23 Enrico Scholz + + * configure.ac: version 0.28.91 + +2004-02-10 00:18 Enrico Scholz + + * Makefile.am, src/Makefile-files: remove src/setattr on 'clean' + (reported by Noèl Köthe) + +2004-02-09 23:55 Enrico Scholz + + * scripts/vserver-copy, src/vbuild.cc: further chattr "fixes" + +2004-02-06 23:28 Enrico Scholz + + * configure.ac: version 0.28.90 + +2004-02-06 23:20 Enrico Scholz + + * util-vserver.spec.in: require chattr set 't' attribute on + /vservers + +2004-02-06 23:20 Enrico Scholz + + * distrib/install-pre.sh, distrib/install-rh7.2, + distrib/install-rh7.3, scripts/vserver: when creating new vserver + topdirectories, call 'chattr -t' on them + +2004-02-05 04:52 Enrico Scholz + + * configure.ac, lib/syscall-legacy.hc, lib/vserver-internal.h, + m4/ensc_syscall.m4: backported ENSC_SYSCALL_TRADITIONAL from HEAD + version 0.28.1 + +2004-01-29 22:16 Enrico Scholz + + * scripts/vserver-copy: fixed copyright, it is still at Mark + Lawrence + +2004-01-28 12:04 Enrico Scholz + + * configure.ac: version 0.28 + +2004-01-26 19:23 Enrico Scholz + + * NEWS: version 0.27.91 + +2004-01-26 19:22 Enrico Scholz + + * configure.ac: version 0.27.91 use new ext2fs.h test + +2004-01-26 19:22 Enrico Scholz + + * src/ext2fs.h: updated to new ext2fs.h test + +2004-01-26 19:21 Enrico Scholz + + * m4/: ensc_cflags.m4, ensc_kerneldir.m4, ensc_uv_vrootdir.m4: + added missing quotes + +2004-01-26 19:20 Enrico Scholz + + * m4/ensc_e2fscheck.m4: initial checkin + +2004-01-26 19:20 Enrico Scholz + + * lib/syscall_kill-v11.hc: fixed warnings about missing initializer + +2004-01-26 19:19 Enrico Scholz + + * lib/: getversion.c, vserver.h: vc_get_version(): removed 'int + cat' parameter + +2004-01-22 21:38 Enrico Scholz + + * NEWS, configure.ac: version 0.27.90 + +2004-01-22 20:52 Enrico Scholz + + * scripts/vserver: call 'chkconfig' to fix initscripts *after* + generating the configuration (reported by DUCLOS Andre) + +2004-01-22 17:08 Enrico Scholz + + * scripts/vserver: allow to override start/stop commands (patch by + Erik Smit) + +2004-01-20 00:00 Enrico Scholz + + * scripts/vserver-copy: use an argument on 'mktemp' call + +2004-01-17 07:10 Enrico Scholz + + * scripts/vserver-copy: autodetect the mktemp/tempfile command + (reported by DUCLOS Andre) + +2004-01-17 07:05 Enrico Scholz + + * scripts/vserver: start programs with 'exec' on the 'suexec' (and + related) commands (patch by Alec Thomas) + +2004-01-07 17:24 Enrico Scholz + + * src/chcontext.c: backported from HEAD: * removed obsolete and + unused 'fakeinit' variable * fixed ctx-creation with fakeinit and + static ctx-id's; fakeinit requires a second call for ctx -2 to + take effect + +2004-01-07 17:22 Enrico Scholz + + * lib/vserver-internal.h: fixed handling of errors within + utilvserver_checkCompatVersion() to return real error-code but + not -EINVAL + +2003-12-30 20:38 Enrico Scholz + + * configure.ac: version 0.27 + +2003-12-30 15:22 Enrico Scholz + + * NEWS, configure.ac: version 0.26.90 + +2003-12-30 15:08 Enrico Scholz + + * configure.ac: * another s!sys_virtual_context!vserver! * test for + ext2fs.h headers with the C++ compiler; this will detect + problems with RH rawhide headers very early + (https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=112448) + +2003-12-30 15:07 Enrico Scholz + + * lib/vserver-internal.h: another s!sys_virtual_context!vserver! + +2003-12-30 15:06 Enrico Scholz + + * lib/syscall_kill-v11.hc: made it compilable with non-C99 + compilers + +2003-12-30 14:50 Enrico Scholz + + * scripts/vserver: added basic Slackware support (patch by Stephen + Pearce) + +2003-12-30 14:49 Enrico Scholz + + * src/vkill.c: * s!ctx_t!xid_t! * use native vc_ctx_kill() only + when legacy-API is disabled * fixed help-msg + +2003-12-30 14:45 Enrico Scholz + + * lib/syscall_rlimit.c, lib/vserver-internal.h, lib/vserver.h, + lib/getctx-compat.hc, lib/getctx-legacy.hc, lib/getctx.c, + lib/syscall-compat.hc, lib/syscall.c, lib/syscall_kill-v11.hc, + lib/syscall_kill.c, lib/syscall_rlimit-v11.hc, src/vlimit.c, + configure.ac, compat.h: s!ctx_t!xid_t! + +2003-12-26 01:16 Enrico Scholz + + * lib/: getversion-internal.hc, syscall-compat.hc, + syscall_kill-v11.hc, syscall_rlimit-v11.hc, vserver-internal.h: + s!sys_vserver!vserver! + +2003-12-23 17:54 Enrico Scholz + + * configure.ac: fixed '--enable-apis' by + s!supported_apis!enable_apis! + +2003-12-23 17:52 Enrico Scholz + + * scripts/vserver: mount /dev/pts with correct options + +2003-12-23 17:52 Enrico Scholz + + * lib/syscall-legacy.hc: use syscall(...) on __hppa__ too + +2003-12-03 01:11 Enrico Scholz + + * src/.cvsignore: added vkill + +2003-12-03 01:08 Enrico Scholz + + * Makefile.am: added 'legacydir' + +2003-12-03 01:08 Enrico Scholz + + * lib/getversion.c: vc_get_version(): fixed typo to avoid recursive + call + +2003-12-03 01:07 Enrico Scholz + + * src/Makefile-files: added vkill + +2003-12-03 01:07 Enrico Scholz + + * src/vkill.c: initial checkin + +2003-12-03 01:06 Enrico Scholz + + * scripts/Makefile-files: install vkill and vunify.sh into + LEGACYDIR + +2003-12-03 01:05 Enrico Scholz + + * scripts/: vunify.old.sh[DEAD], vunify.sh: renamved vunify.old.sh + to vunify.sh + +2003-11-29 00:26 Enrico Scholz + + * scripts/vps.subst: fixed behavior with multiple args (from Debian + patch) + +2003-11-29 00:25 Enrico Scholz + + * lib/: Makefile-files, syscall_kill-v11.hc, syscall_kill.c: added + syscall_kill* + +2003-11-29 00:22 Enrico Scholz + + * lib/virtual.h: updated + +2003-11-29 00:22 Enrico Scholz + + * lib/syscall.c: removed chrootsafe() code + +2003-11-29 00:22 Enrico Scholz + + * lib/syscall-legacy.hc: removed old, unused code removed + chrootsafe() code made it compilable with '-fPIC' + +2003-11-29 00:17 Enrico Scholz + + * lib/: syscall-compat.hc, getversion-internal.hc: + s!sys_virtual_context!sys_vserver! + +2003-11-29 00:14 Enrico Scholz + + * lib/syscall_rlimit-v11.hc: s!sys_virtual_context!sys_vserver! + +2003-11-29 00:12 Enrico Scholz + + * lib/vserver-internal.h: s!sys_virtual_context!sys_vserver! made + it compilable with '-fPIC' + +2003-11-29 00:11 Enrico Scholz + + * lib/vserver.h: removed vc_chrootsafe(); such an implementation + seems to be impossible... updated vc_new_s_context documentation + added vc_ctx_kill() prototype + doc + +2003-11-29 00:10 Enrico Scholz + + * tests/: Makefile-files, chrootsafe.cc[DEAD]: removed + chrootsafe.cc; such an implementation seems to be impossible... + +2003-11-29 00:08 Enrico Scholz + + * src/capchroot.c: use chroot() instead of vc_chrootsafe() + +2003-11-22 03:14 Enrico Scholz + + * NEWS, README, configure.ac: version 0.26 + +2003-11-22 03:02 Enrico Scholz + + * .cvsignore: updated + +2003-11-21 17:01 Enrico Scholz + + * src/ifspec.c: fixed uninitialized variables when ioctl() on the + given interfaces fails (thanks to Herbert Poetzl) + +2003-11-21 04:52 Enrico Scholz + + * configure.ac: version 0.25.90 + +2003-11-21 04:51 Enrico Scholz + + * .cvsignore: updated + +2003-11-20 01:46 Enrico Scholz + + * Makefile.am: - use internal lib/virtual.h on default (controlled + by '--disable-internal-headers' option) + +2003-11-20 01:45 Enrico Scholz + + * configure.ac: - added '--disable-internal-headers' option + +2003-11-19 01:22 Enrico Scholz + + * lib/syscall_rlimit-v11.hc: vc_get_rlimit_mask_v11: fill + calculated values into *lim + +2003-11-18 23:41 Enrico Scholz + + * NEWS, configure.ac: version 0.25 + +2003-11-18 23:38 Enrico Scholz + + * util-vserver.spec.in: added 'BuildRequires: e2fsprogs-devel' + +2003-11-18 23:37 Enrico Scholz + + * configure.ac: added checks for and + + +2003-11-18 23:36 Enrico Scholz + + * Makefile.am: remove '__user' which was added in 2.6 headers + +2003-11-18 23:30 Enrico Scholz + + * src/: vutil.cc, showattr.c, ext2fs.h, Makefile-files: use/added + "ext2fs.h" header to bypass problems of 2.6 kernel headers (no + __u64 with '--std=c99') + +2003-11-18 23:22 Enrico Scholz + + * sysv/vservers.subst: small cosmetical change + +2003-11-18 21:21 Enrico Scholz + + * lib/vserver-internal.h: - use VC_RANDCTX instead of VC_NOCTX - + use the conditionalized CTX_USER2KERNEL/CTX_KERNEL2USER + transformations + +2003-11-18 21:19 Enrico Scholz + + * lib/vserver.h: - removed C99 comments from copyright header; this + might be used by plain C89 programs also... - added VC_RANDCTX + constant - documented VC_* constants + +2003-11-18 21:18 Enrico Scholz + + * scripts/vserver: added basic gentoo support (thanks to Allen D. + Parker II) + +2003-11-18 00:54 Enrico Scholz + + * src/: .cvsignore, Makefile-files, ctxlimit.c[DEAD], vlimit.c: + renamed ctxlimit.* to vlimit.* + +2003-11-18 00:49 Enrico Scholz + + * THANKS: added Sam Vilain + +2003-11-18 00:40 Enrico Scholz + + * configure.ac: version 0.24.90 + +2003-11-18 00:13 Enrico Scholz + + * compat.h: made ctx_t and 'uint32_t' to fix kernel<->user + conflicts (-1 in user becomes 0x0000ffff in kernel which would + expect 0xffffffff) + +2003-11-18 00:12 Enrico Scholz + + * lib/vserver.h: added VC_SAMECTX identifier + +2003-11-18 00:11 Enrico Scholz + + * lib/vserver-internal.h: added CTX_USER2KERNEL() and + CTX_KERNEL2USER() macros to transform ctx from user into kernel + type and vice versa + +2003-11-18 00:11 Enrico Scholz + + * lib/: syscall-compat.hc, syscall_rlimit-v11.hc: use + CTX_USER2KERNEL() macro to transform ctx from user into kernel + type + +2003-11-17 23:02 Enrico Scholz + + * sysv/: rebootmgr.subst, vservers.subst: check existence of + cfg-file before starting the server + +2003-11-17 22:58 Enrico Scholz + + * scripts/vserver: set correct mode/permissions of /var/run/utmp + +2003-11-08 00:04 Enrico Scholz + + * lib/: Makefile-files, syscall_rlimit-v11.hc, syscall_rlimit.c: + added rlimit syscalls + +2003-11-07 23:02 Enrico Scholz + + * src/: .cvsignore, Makefile-files, ctxlimit.c: added ctxlimit + +2003-11-07 23:01 Enrico Scholz + + * src/setctxlimit.c[DEAD]: removed; obsoleted by ctxlimit tool + +2003-11-07 23:00 Enrico Scholz + + * lib/vserver.h: added limit stuff + +2003-11-07 22:59 Enrico Scholz + + * lib/vserver-internal.h, configure.ac: added V11 API + +2003-11-07 22:58 Enrico Scholz + + * lib/virtual.h: updated; has now the limit-stuff + +2003-11-07 20:16 Enrico Scholz + + * man/: vkill.8, setctxlimit.8, vdu.8: initial checkin (provided by + Sam Vilain) + +2003-11-04 01:17 Enrico Scholz + + * NEWS, configure.ac: version 0.24 + +2003-11-04 00:30 Enrico Scholz + + * .cvsignore: added linuxcaps.h + +2003-11-04 00:13 Enrico Scholz + + * Makefile.am: * enumerated all used m4-files * use/set CVS2CL* + flags * edit and remove statements (#include, + __u32) which may cause errors + +2003-11-04 00:11 Enrico Scholz + + * configure.ac: use ENSC_CHANGELOG + +2003-11-04 00:11 Enrico Scholz + + * m4/: changelog.am, ensc_changelog.m4: merged from HEAD + +2003-11-04 00:10 Enrico Scholz + + * m4/validate.am: updated from vserver-djinni + +2003-11-04 00:10 Enrico Scholz + + * src/vutil.cc: fixed format-string error + +2003-11-03 21:56 Enrico Scholz + + * util-vserver.spec.in: use '--enable-linuxconf' conflict with + future vserver-* versions + +2003-11-03 21:51 Enrico Scholz + + * NEWS, configure.ac: conditionalized built of linuxconf-module + version 0.23.97 + +2003-11-03 21:50 Enrico Scholz + + * lib/vserver-internal.h: ignore lower 8 bits of API-version + +2003-11-03 21:49 Enrico Scholz + + * Makefile.am, linuxconf/Makefile-files: conditionalized built of + linuxconf-module + +2003-10-30 16:23 Enrico Scholz + + * NEWS: version 0.23.96 + +2003-10-30 16:21 Enrico Scholz + + * configure.ac: set '-Wno-unused-parameter' use ENSC_UV_VROOTDIR + +2003-10-30 16:21 Enrico Scholz + + * m4/ensc_uv_vrootdir.m4: backported from HEAD + +2003-10-30 16:21 Enrico Scholz + + * util-vserver.spec.in: create and own /vservers + +2003-10-30 16:17 Enrico Scholz + + * distrib/: install-mdk8.2, install-post.sh, install-pre.sh, + install-rh7.2, install-rh7.3, install-rh8.0, install-rh9.0: use + customizable value for vserver-rootdir instead of hardcoded + '/vservers' import the global configuration file + (util-vserver-vars) + +2003-10-30 16:16 Enrico Scholz + + * scripts/Makefile-files, scripts/distrib-info, + scripts/util-vserver-vars.subst, scripts/vrpm, scripts/vserver, + scripts/vserver-copy, scripts/vservers.grabinfo.sh, + scripts/vunify.old.sh, src/Makefile-files, src/rebootmgr.c, + src/vunify.cc, sysv/Makefile-files, sysv/rebootmgr.subst: use + customizable value for vserver-rootdir instead of hardcoded + '/vservers' + +2003-10-30 16:12 Enrico Scholz + + * tests/: chrootsafe.cc, escaperoot.cc: do not declare unused + parameters anymore + +2003-10-30 15:25 Enrico Scholz + + * util-vserver.spec.in: provide/conflict with vserver-admin + +2003-10-30 15:24 Enrico Scholz + + * Makefile.am, m4/ensc_kerneldir.m4: backported ENSC_KERNEL_HEADERS + macro + +2003-10-30 15:23 Enrico Scholz + + * configure.ac: backported CFLAGS/CXXFLAGS settings backported + ENSC_KERNEL_HEADERS macro + +2003-10-30 02:47 Enrico Scholz + + * NEWS, configure.ac: version 0.23.95 + +2003-10-30 02:46 Enrico Scholz + + * .cvsignore: added util-vserver.spec + +2003-10-30 02:38 Enrico Scholz + + * util-vserver.spec.in, vserver.spec.in[DEAD], Makefile.am, + configure.ac: renamed vserver.spec.in to util-vserver.spec.in + +2003-10-30 02:36 Enrico Scholz + + * scripts/vserver: - reenabled the copy-all mode; can be disabled + by setting the $UTIL_VSERVER_AVOID_COPY environment variable - + use '-HS' ulimit switch for newly created vservers + +2003-10-30 02:34 Enrico Scholz + + * newvserver.defaults[DEAD], linuxconf/.cvsignore, + linuxconf/Makefile-files, linuxconf/newvserver.8, + linuxconf/newvserver.defaults, linuxconf/newvserver.subst, + man/newvserver.8[DEAD], man/Makefile-files, Makefile.am, + vserver.spec.in: revived linuxconf-files, but moved them into an + own directory + +2003-10-30 01:41 Enrico Scholz + + * scripts/.cvsignore: added auto-generated perl-scripts + +2003-10-30 01:39 Enrico Scholz + + * scripts/Makefile-files, Makefile.am: reorganized make-file to + cope with substituted perl-scripts + +2003-10-30 01:38 Enrico Scholz + + * scripts/: vkill[DEAD], vkill.subst, vps[DEAD], vps.subst: made + '/usr/sbin' path customizable; perl-scripts will be substituted + now + +2003-10-30 01:37 Enrico Scholz + + * src/Makefile-files: define SBINDIR on rebootmgr.c compilation + install 'setattr' program + +2003-10-30 01:36 Enrico Scholz + + * src/: chcontext.c, reducecap.c: remove CAP_OPENDEV added + CAP_QUOTACTL + +2003-10-30 01:33 Enrico Scholz + + * scripts/vpstree, scripts/vrpm, scripts/vserver-copy, + scripts/vsysvwrapper, scripts/vtop, src/rebootmgr.c: use + customizable paths for '/usr/sbin' + +2003-10-30 01:32 Enrico Scholz + + * scripts/rootshell: use customizable paths for '/usr/sbin' do not + log commands into /tmp/log anymore + +2003-10-30 01:31 Enrico Scholz + + * scripts/distrib-info: made it 'bash' use customizable paths for + '/usr/sbin' + +2003-10-30 01:30 Enrico Scholz + + * man/reducecap.8: removed CAP_OPENDEV; added CAP_QUOTACTL + +2003-10-21 19:26 Enrico Scholz + + * configure.ac: version 0.23.93 + +2003-10-21 18:58 Enrico Scholz + + * lib/checkversion.c: fixed stupid thinko (EAGAIN vs. EINVAL) + +2003-10-18 03:48 Enrico Scholz + + * lib/: getctx-legacy.hc, vserver.h: backported vc_X_getcctx() + changes from HEAD + +2003-10-18 03:40 Enrico Scholz + + * configure.ac: version 0.23.92 + +2003-10-18 03:34 Enrico Scholz + + * lib/checkversion.c: restored compatibility for case when old + syscall interface uses the new syscall-number + +2003-10-14 18:11 Enrico Scholz + + * lib/vserver.h: fixed vc_X_getcctx() + +2003-10-14 17:22 Enrico Scholz + + * lib/vserver.h: added some documentation added vc_X_getctx() + (pseudo-)syscall + +2003-10-14 17:21 Enrico Scholz + + * lib/vserver-internal.h: added macros from syscall.c added an + 'extern "C" {...}' block moved safechroot code into own file + +2003-10-14 17:20 Enrico Scholz + + * lib/syscall.c: moved macros into vserver-internal moved version + code into own files + +2003-10-14 17:20 Enrico Scholz + + * lib/: syscall-compat.hc, syscall-legacy.hc: include + "safechroot-internal.hc" + +2003-10-14 17:19 Enrico Scholz + + * lib/: checkversion.c, getctx-compat.hc, getctx-legacy.hc, + getctx.c, getversion-internal.hc, getversion.c, + safechroot-internal.hc, uint2str.c: initial checkin + +2003-10-14 17:18 Enrico Scholz + + * lib/Makefile-files: added lots of new files + +2003-10-14 15:54 Enrico Scholz + + * configure.ac: added check for existing sys_virtual_context() + function renamed '--enable-supported-api' switch to + '--enable-apis' + +2003-10-14 15:54 Enrico Scholz + + * lib/vserver-internal.h: added check for existing + sys_virtual_context() function + +2003-10-14 15:43 Enrico Scholz + + * lib/syscall.c: added 'vc_get_version(int)' added lots of + macro-magic to generalize the syscall-wrappers + +2003-10-14 15:42 Enrico Scholz + + * lib/vserver.h: added 'vc_get_version(int)' + +2003-10-14 04:55 Enrico Scholz + + * configure.ac: version 0.23.91 + +2003-10-14 04:54 Enrico Scholz + + * vserver.spec.in: merged with VERSION_0_23 branch + +2003-10-14 03:32 Enrico Scholz + + * lib/syscall-compat.hc: made it compilable with non-C99 compilers + +2003-10-14 03:31 Enrico Scholz + + * sysv/Makefile-files: fixed typo in sed invocation + +2003-10-14 03:15 Enrico Scholz + + * lib/virtual-inc.h[DEAD]: removed since solved by more general + 'linuxvirtual.h' + +2003-10-14 03:14 Enrico Scholz + + * lib/syscall.c: include "linuxvirtual.h" instead of "linux-inc.h" + +2003-10-14 03:13 Enrico Scholz + + * lib/syscall-legacy.hc: added missing chroot() call + +2003-10-14 03:13 Enrico Scholz + + * lib/Makefile-files: removed virtual-inc.h + +2003-10-14 03:12 Enrico Scholz + + * Makefile.am: generalized CLEANFILES variable added + 'linuxvirtual.h' to BUILT_SOURCES + +2003-10-14 02:45 Enrico Scholz + + * tests/chrootsafe.cc: use new API + +2003-10-14 02:42 Enrico Scholz + + * src/: capchroot.c, chbind.c, chcontext.c, rebootmgr.c, + reducecap.c, vserver-stat.c: use new API + +2003-10-14 02:36 Enrico Scholz + + * compat.h: merged with HEAD + +2003-10-14 02:32 Enrico Scholz + + * configure.ac: merged MS_MOVE/ctx_t code with HEAD added + --enable-supported-apis switch + +2003-10-14 02:30 Enrico Scholz + + * Makefile.am: added $(lib_XHDRS) and compat.h + +2003-10-14 02:28 Enrico Scholz + + * lib/Makefile-files: added lib_XHDRS with all the new files added + -D_GNU_SOURCE flag + +2003-10-14 02:20 Enrico Scholz + + * lib/: syscall-compat.hc, syscall-legacy.hc, virtual-inc.h, + virtual.h, vserver-internal.h: initial checkin + +2003-10-14 02:07 Enrico Scholz + + * lib/vserver.h: implemented new API + +2003-10-14 01:57 Enrico Scholz + + * lib/syscall.c: implemented new API + +2003-10-14 01:53 Enrico Scholz + + * src/Makefile-files: removed set_ctx_limit.c + diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..54caf7c --- /dev/null +++ b/INSTALL @@ -0,0 +1,229 @@ +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software +Foundation, Inc. + + This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +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, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. (Caching is +disabled by default to prevent problems with accidental use of stale +cache files.) + + 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 you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You only need +`configure.ac' 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. Run `./configure --help' +for details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + + *Note Defining Variables::, for more details. + +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 support 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' cannot figure out +automatically, but needs to determine by the type of machine the package +will run on. Usually, assuming the package is built to be run on the +_same_ architectures, `configure' can figure that out, but if it prints +a message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS KERNEL-OS + + 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 machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the `--target=TYPE' option to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +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. + +Defining Variables +================== + + Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +will cause the specified gcc to be used as the C compiler (unless it is +overridden in the site shell script). + +`configure' Invocation +====================== + + `configure' recognizes the following options to control how it +operates. + +`--help' +`-h' + Print a summary of the options to `configure', and exit. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--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. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..437c818 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,98 @@ +## $Id: Makefile.am,v 1.1.4.12 2004/02/09 23:18:59 ensc Exp $ + +# Copyright (C) 2003 Enrico Scholz +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# + +ACLOCAL_AMFLAGS = -I m4 + +CVS2CL_AMFLAGS = $(CVS2CL_TAG) -U cvsusers.map --show-dead +CVS2CL_ALLFLAGS := $(CVS2CL_AMFLAGS) $(CVS2CL_FLAGS) + +sysvdir = $(sysconfdir)/init.d +vservercfgdir = $(sysconfdir)/vservers +legacydir = $(pkglibdir)/legacy + +include_HEADERS = $(lib_HDRS) +noinst_HEADERS = $(src_HDRS) $(lib_XHDRS) compat.h + +lib_LIBRARIES = $(lib_lib_LIBS) + +pkglib_SCRIPTS = $(distrib_SCRPTS) $(scripts_SCRPTS) $(src_pkglib_SCRPTS) +pkglib_DATA = $(distrib_DAT) $(scriptscfg_DATA) +pkglib_PROGRAMS = $(src_pkglib_PRGS) + +legacy_SCRIPTS = $(scripts_LEGSCRPTS) + +sbin_SCRIPTS = $(scripts_PRGS) $(linuxconf_SCRPTS) +sbin_PROGRAMS = $(src_sbin_PRGS) +noinst_PROGRAMS = $(test_PRGS) + +sysv_SCRIPTS = $(sysv_SCRPTS) +sysconf_DATA = $(sysv_CFG) +vservercfg_DATA = $(linuxconf_cfg_DTA) + +BUILT_SOURCES = linuxcaps.h linuxvirtual.h + +man_MANS = $(man_DATMAN) $(linuxconf_DATMAN) + +m4_FILES = m4/ensc_cflags.m4 m4/ensc_kerneldir.m4 \ + m4/ensc_changelog.m4 m4/ensc_uv_vrootdir.m4 + +EXTRA_DIST = $(distrib_SCRPTS) $(distrib_DAT) \ + $(sysv_XTRAS) $(sysv_CFG) \ + $(doc_DAT) $(man_DATMAN) $(linuxconf_XTRAS) \ + $(scripts_SCRPTS) $(scripts_XTRAS) \ + $(m4_FILES) \ + util-vserver.spec THANKS + +AM_CPPFLAGS = -I $(top_srcdir)/lib -D VERSION=\"$(VERSION)\" -D PKGLIBDIR=\"$(pkglibdir)\" -D _GNU_SOURCE +AM_CFLAGS = -Wall -pedantic + +CLEANFILES = $(sysv_GENSCRPTS) $(scripts_GENSCRPTS) \ + $(linuxconf_GENFILES) $(src_GENFILES) \ + $(BUILT_SOURCES) + + +linuxcaps.h: ${kernelincludedir}/linux/capability.h Makefile + @rm -f $@ + echo '#include ' >$@.tmp + sed -e 's!^#include .*!!g;s!\<__u32\>!uint32_t!g;s!\<__user\>!!g;' $< >>$@.tmp + @-chmod --reference $< $@.tmp &>/dev/null + mv -f $@.tmp $@ + @chmod a-w $@ + +linuxvirtual.h: +if ENSC_ENABLE_INTERNAL_HEADERS + ln -sf '$(top_srcdir)/lib/virtual.h' '$@' +else + ln -sf '$(kernelincludedir)/linux/virtual.h' '$@' && test -e '$@' || \ + ln -sf '$(top_srcdir)/lib/virtual.h' '$@' +endif + +include $(top_srcdir)/lib/Makefile-files +include $(top_srcdir)/src/Makefile-files +include $(top_srcdir)/distrib/Makefile-files +include $(top_srcdir)/doc/Makefile-files +include $(top_srcdir)/man/Makefile-files +include $(top_srcdir)/scripts/Makefile-files +include $(top_srcdir)/tests/Makefile-files +include $(top_srcdir)/sysv/Makefile-files +include $(top_srcdir)/linuxconf/Makefile-files + +include $(top_srcdir)/m4/gpgsig.am +include $(top_srcdir)/m4/validate.am +include $(top_srcdir)/m4/changelog.am diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 0000000..7ab717f --- /dev/null +++ b/Makefile.in @@ -0,0 +1,2230 @@ +# Makefile.in generated by automake 1.8.2 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004 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@ + +# Copyright (C) 2003 Enrico Scholz +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# + + + + + +SOURCES = $(lib_libvserver_a_SOURCES) $(src_capchroot_SOURCES) $(src_chbind_SOURCES) $(src_chcontext_SOURCES) $(src_fakerunlevel_SOURCES) $(src_filetime_SOURCES) $(src_ifspec_SOURCES) $(src_listdevip_SOURCES) $(src_parserpmdump_SOURCES) $(src_readlink_SOURCES) $(src_rebootmgr_SOURCES) $(src_reducecap_SOURCES) $(src_showattr_SOURCES) $(src_showperm_SOURCES) $(src_vbuild_SOURCES) $(src_vcheck_SOURCES) $(src_vdu_SOURCES) $(src_vfiles_SOURCES) $(src_vkill_SOURCES) $(src_vlimit_SOURCES) $(src_vreboot_SOURCES) $(src_vserver_stat_SOURCES) $(src_vunify_SOURCES) $(tests_escaperoot_SOURCES) $(tests_forkbomb_SOURCES) $(tests_testipc_SOURCES) $(tests_testlimit_SOURCES) $(tests_testopenf_SOURCES) + +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 = : +pkglib_PROGRAMS = $(am__EXEEXT_2) +sbin_PROGRAMS = $(am__EXEEXT_3) +noinst_PROGRAMS = $(am__EXEEXT_1) +DIST_COMMON = README $(am__configure_deps) $(include_HEADERS) \ + $(noinst_HEADERS) $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/config.h.in $(srcdir)/util-vserver.spec.in \ + $(top_srcdir)/configure $(top_srcdir)/distrib/Makefile-files \ + $(top_srcdir)/doc/Makefile-files \ + $(top_srcdir)/lib/Makefile-files \ + $(top_srcdir)/linuxconf/Makefile-files \ + $(top_srcdir)/m4/changelog.am $(top_srcdir)/m4/gpgsig.am \ + $(top_srcdir)/m4/validate.am $(top_srcdir)/man/Makefile-files \ + $(top_srcdir)/scripts/Makefile-files \ + $(top_srcdir)/src/Makefile-files \ + $(top_srcdir)/sysv/Makefile-files \ + $(top_srcdir)/tests/Makefile-files AUTHORS COPYING ChangeLog \ + INSTALL NEWS THANKS compile depcomp install-sh missing \ + mkinstalldirs +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ensc_cflags.m4 \ + $(top_srcdir)/m4/ensc_changelog.m4 \ + $(top_srcdir)/m4/ensc_e2fscheck.m4 \ + $(top_srcdir)/m4/ensc_kerneldir.m4 \ + $(top_srcdir)/m4/ensc_syscall.m4 \ + $(top_srcdir)/m4/ensc_uv_vrootdir.m4 \ + $(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_HEADER = config.h +CONFIG_CLEAN_FILES = util-vserver.spec +AR = ar +ARFLAGS = cru +am__installdirs = $(DESTDIR)$(libdir) $(DESTDIR)$(pkglibdir) $(DESTDIR)$(sbindir) $(DESTDIR)$(legacydir) $(DESTDIR)$(pkglibdir) $(DESTDIR)$(sbindir) $(DESTDIR)$(sysvdir) $(DESTDIR)$(man8dir) $(DESTDIR)$(pkglibdir) $(DESTDIR)$(scriptscfgdir) $(DESTDIR)$(sysconfdir) $(DESTDIR)$(vservercfgdir) $(DESTDIR)$(includedir) +libLIBRARIES_INSTALL = $(INSTALL_DATA) +LIBRARIES = $(lib_LIBRARIES) +lib_libvserver_a_AR = $(AR) $(ARFLAGS) +lib_libvserver_a_LIBADD = +am__dirstamp = $(am__leading_dot)dirstamp +am__objects_1 = lib/lib_libvserver_a-syscall.$(OBJEXT) \ + lib/lib_libvserver_a-syscall_rlimit.$(OBJEXT) \ + lib/lib_libvserver_a-syscall_kill.$(OBJEXT) \ + lib/lib_libvserver_a-checkversion.$(OBJEXT) \ + lib/lib_libvserver_a-getctx.$(OBJEXT) \ + lib/lib_libvserver_a-getversion.$(OBJEXT) \ + lib/lib_libvserver_a-uint2str.$(OBJEXT) +am_lib_libvserver_a_OBJECTS = $(am__objects_1) +lib_libvserver_a_OBJECTS = $(am_lib_libvserver_a_OBJECTS) +am__EXEEXT_1 = tests/escaperoot$(EXEEXT) tests/forkbomb$(EXEEXT) \ + tests/testipc$(EXEEXT) tests/testlimit$(EXEEXT) \ + tests/testopenf$(EXEEXT) +am__EXEEXT_2 = src/capchroot$(EXEEXT) src/fakerunlevel$(EXEEXT) \ + src/filetime$(EXEEXT) src/ifspec$(EXEEXT) \ + src/listdevip$(EXEEXT) src/parserpmdump$(EXEEXT) \ + src/readlink$(EXEEXT) src/showattr$(EXEEXT) \ + src/showperm$(EXEEXT) src/vbuild$(EXEEXT) src/vcheck$(EXEEXT) \ + src/vreboot$(EXEEXT) src/vunify$(EXEEXT) +pkglibPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +am__EXEEXT_3 = src/chbind$(EXEEXT) src/chcontext$(EXEEXT) \ + src/rebootmgr$(EXEEXT) src/reducecap$(EXEEXT) \ + src/vlimit$(EXEEXT) src/vdu$(EXEEXT) src/vfiles$(EXEEXT) \ + src/vkill$(EXEEXT) src/vserver-stat$(EXEEXT) +sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(noinst_PROGRAMS) $(pkglib_PROGRAMS) $(sbin_PROGRAMS) +am_src_capchroot_OBJECTS = src/capchroot.$(OBJEXT) +src_capchroot_OBJECTS = $(am_src_capchroot_OBJECTS) +src_capchroot_DEPENDENCIES = lib/libvserver.a +am_src_chbind_OBJECTS = src/chbind.$(OBJEXT) +src_chbind_OBJECTS = $(am_src_chbind_OBJECTS) +src_chbind_DEPENDENCIES = lib/libvserver.a +am_src_chcontext_OBJECTS = src/chcontext.$(OBJEXT) +src_chcontext_OBJECTS = $(am_src_chcontext_OBJECTS) +src_chcontext_DEPENDENCIES = lib/libvserver.a +am_src_fakerunlevel_OBJECTS = src/fakerunlevel.$(OBJEXT) +src_fakerunlevel_OBJECTS = $(am_src_fakerunlevel_OBJECTS) +src_fakerunlevel_LDADD = $(LDADD) +am_src_filetime_OBJECTS = src/filetime.$(OBJEXT) +src_filetime_OBJECTS = $(am_src_filetime_OBJECTS) +src_filetime_LDADD = $(LDADD) +am_src_ifspec_OBJECTS = src/ifspec.$(OBJEXT) +src_ifspec_OBJECTS = $(am_src_ifspec_OBJECTS) +src_ifspec_LDADD = $(LDADD) +am_src_listdevip_OBJECTS = src/listdevip.$(OBJEXT) +src_listdevip_OBJECTS = $(am_src_listdevip_OBJECTS) +src_listdevip_LDADD = $(LDADD) +am_src_parserpmdump_OBJECTS = src/parserpmdump.$(OBJEXT) +src_parserpmdump_OBJECTS = $(am_src_parserpmdump_OBJECTS) +src_parserpmdump_LDADD = $(LDADD) +am_src_readlink_OBJECTS = src/readlink.$(OBJEXT) +src_readlink_OBJECTS = $(am_src_readlink_OBJECTS) +src_readlink_LDADD = $(LDADD) +am_src_rebootmgr_OBJECTS = src/src_rebootmgr-rebootmgr.$(OBJEXT) +src_rebootmgr_OBJECTS = $(am_src_rebootmgr_OBJECTS) +src_rebootmgr_LDADD = $(LDADD) +am_src_reducecap_OBJECTS = src/reducecap.$(OBJEXT) +src_reducecap_OBJECTS = $(am_src_reducecap_OBJECTS) +src_reducecap_DEPENDENCIES = lib/libvserver.a +am_src_showattr_OBJECTS = src/showattr.$(OBJEXT) +src_showattr_OBJECTS = $(am_src_showattr_OBJECTS) +src_showattr_LDADD = $(LDADD) +am_src_showperm_OBJECTS = src/showperm.$(OBJEXT) +src_showperm_OBJECTS = $(am_src_showperm_OBJECTS) +src_showperm_LDADD = $(LDADD) +am_src_vbuild_OBJECTS = src/vbuild.$(OBJEXT) src/vutil.$(OBJEXT) +src_vbuild_OBJECTS = $(am_src_vbuild_OBJECTS) +src_vbuild_LDADD = $(LDADD) +am_src_vcheck_OBJECTS = src/vcheck.$(OBJEXT) src/vutil.$(OBJEXT) +src_vcheck_OBJECTS = $(am_src_vcheck_OBJECTS) +src_vcheck_LDADD = $(LDADD) +am_src_vdu_OBJECTS = src/vdu.$(OBJEXT) +src_vdu_OBJECTS = $(am_src_vdu_OBJECTS) +src_vdu_LDADD = $(LDADD) +am_src_vfiles_OBJECTS = src/vfiles.$(OBJEXT) src/vutil.$(OBJEXT) +src_vfiles_OBJECTS = $(am_src_vfiles_OBJECTS) +src_vfiles_LDADD = $(LDADD) +am_src_vkill_OBJECTS = src/src_vkill-vkill.$(OBJEXT) +src_vkill_OBJECTS = $(am_src_vkill_OBJECTS) +src_vkill_DEPENDENCIES = lib/libvserver.a +am_src_vlimit_OBJECTS = src/vlimit.$(OBJEXT) +src_vlimit_OBJECTS = $(am_src_vlimit_OBJECTS) +src_vlimit_DEPENDENCIES = lib/libvserver.a +am_src_vreboot_OBJECTS = src/vreboot.$(OBJEXT) +src_vreboot_OBJECTS = $(am_src_vreboot_OBJECTS) +src_vreboot_LDADD = $(LDADD) +am_src_vserver_stat_OBJECTS = src/vserver-stat.$(OBJEXT) +src_vserver_stat_OBJECTS = $(am_src_vserver_stat_OBJECTS) +src_vserver_stat_DEPENDENCIES = lib/libvserver.a +am_src_vunify_OBJECTS = src/src_vunify-vunify.$(OBJEXT) \ + src/src_vunify-vutil.$(OBJEXT) +src_vunify_OBJECTS = $(am_src_vunify_OBJECTS) +src_vunify_LDADD = $(LDADD) +am_tests_escaperoot_OBJECTS = tests/escaperoot.$(OBJEXT) +tests_escaperoot_OBJECTS = $(am_tests_escaperoot_OBJECTS) +tests_escaperoot_LDADD = $(LDADD) +am_tests_forkbomb_OBJECTS = tests/forkbomb.$(OBJEXT) +tests_forkbomb_OBJECTS = $(am_tests_forkbomb_OBJECTS) +tests_forkbomb_LDADD = $(LDADD) +am_tests_testipc_OBJECTS = tests/testipc.$(OBJEXT) +tests_testipc_OBJECTS = $(am_tests_testipc_OBJECTS) +tests_testipc_LDADD = $(LDADD) +am_tests_testlimit_OBJECTS = tests/testlimit.$(OBJEXT) +tests_testlimit_OBJECTS = $(am_tests_testlimit_OBJECTS) +tests_testlimit_LDADD = $(LDADD) +am_tests_testopenf_OBJECTS = tests/testopenf.$(OBJEXT) +tests_testopenf_OBJECTS = $(am_tests_testopenf_OBJECTS) +tests_testopenf_LDADD = $(LDADD) +legacySCRIPT_INSTALL = $(INSTALL_SCRIPT) +pkglibSCRIPT_INSTALL = $(INSTALL_SCRIPT) +sbinSCRIPT_INSTALL = $(INSTALL_SCRIPT) +sysvSCRIPT_INSTALL = $(INSTALL_SCRIPT) +SCRIPTS = $(legacy_SCRIPTS) $(pkglib_SCRIPTS) $(sbin_SCRIPTS) \ + $(sysv_SCRIPTS) +DEFAULT_INCLUDES = -I. -I$(srcdir) -I. +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +@AMDEP_TRUE@DEP_FILES = \ +@AMDEP_TRUE@ lib/$(DEPDIR)/lib_libvserver_a-checkversion.Po \ +@AMDEP_TRUE@ lib/$(DEPDIR)/lib_libvserver_a-getctx.Po \ +@AMDEP_TRUE@ lib/$(DEPDIR)/lib_libvserver_a-getversion.Po \ +@AMDEP_TRUE@ lib/$(DEPDIR)/lib_libvserver_a-syscall.Po \ +@AMDEP_TRUE@ lib/$(DEPDIR)/lib_libvserver_a-syscall_kill.Po \ +@AMDEP_TRUE@ lib/$(DEPDIR)/lib_libvserver_a-syscall_rlimit.Po \ +@AMDEP_TRUE@ lib/$(DEPDIR)/lib_libvserver_a-uint2str.Po \ +@AMDEP_TRUE@ src/$(DEPDIR)/capchroot.Po src/$(DEPDIR)/chbind.Po \ +@AMDEP_TRUE@ src/$(DEPDIR)/chcontext.Po \ +@AMDEP_TRUE@ src/$(DEPDIR)/fakerunlevel.Po \ +@AMDEP_TRUE@ src/$(DEPDIR)/filetime.Po src/$(DEPDIR)/ifspec.Po \ +@AMDEP_TRUE@ src/$(DEPDIR)/listdevip.Po \ +@AMDEP_TRUE@ src/$(DEPDIR)/parserpmdump.Po \ +@AMDEP_TRUE@ src/$(DEPDIR)/readlink.Po \ +@AMDEP_TRUE@ src/$(DEPDIR)/reducecap.Po \ +@AMDEP_TRUE@ src/$(DEPDIR)/showattr.Po \ +@AMDEP_TRUE@ src/$(DEPDIR)/showperm.Po \ +@AMDEP_TRUE@ src/$(DEPDIR)/src_rebootmgr-rebootmgr.Po \ +@AMDEP_TRUE@ src/$(DEPDIR)/src_vkill-vkill.Po \ +@AMDEP_TRUE@ src/$(DEPDIR)/src_vunify-vunify.Po \ +@AMDEP_TRUE@ src/$(DEPDIR)/src_vunify-vutil.Po \ +@AMDEP_TRUE@ src/$(DEPDIR)/vbuild.Po src/$(DEPDIR)/vcheck.Po \ +@AMDEP_TRUE@ src/$(DEPDIR)/vdu.Po src/$(DEPDIR)/vfiles.Po \ +@AMDEP_TRUE@ src/$(DEPDIR)/vlimit.Po src/$(DEPDIR)/vreboot.Po \ +@AMDEP_TRUE@ src/$(DEPDIR)/vserver-stat.Po \ +@AMDEP_TRUE@ src/$(DEPDIR)/vutil.Po \ +@AMDEP_TRUE@ tests/$(DEPDIR)/escaperoot.Po \ +@AMDEP_TRUE@ tests/$(DEPDIR)/forkbomb.Po \ +@AMDEP_TRUE@ tests/$(DEPDIR)/testipc.Po \ +@AMDEP_TRUE@ tests/$(DEPDIR)/testlimit.Po \ +@AMDEP_TRUE@ tests/$(DEPDIR)/testopenf.Po +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ +SOURCES = $(lib_libvserver_a_SOURCES) $(src_capchroot_SOURCES) \ + $(src_chbind_SOURCES) $(src_chcontext_SOURCES) \ + $(src_fakerunlevel_SOURCES) $(src_filetime_SOURCES) \ + $(src_ifspec_SOURCES) $(src_listdevip_SOURCES) \ + $(src_parserpmdump_SOURCES) $(src_readlink_SOURCES) \ + $(src_rebootmgr_SOURCES) $(src_reducecap_SOURCES) \ + $(src_showattr_SOURCES) $(src_showperm_SOURCES) \ + $(src_vbuild_SOURCES) $(src_vcheck_SOURCES) $(src_vdu_SOURCES) \ + $(src_vfiles_SOURCES) $(src_vkill_SOURCES) \ + $(src_vlimit_SOURCES) $(src_vreboot_SOURCES) \ + $(src_vserver_stat_SOURCES) $(src_vunify_SOURCES) \ + $(tests_escaperoot_SOURCES) $(tests_forkbomb_SOURCES) \ + $(tests_testipc_SOURCES) $(tests_testlimit_SOURCES) \ + $(tests_testopenf_SOURCES) +DIST_SOURCES = $(lib_libvserver_a_SOURCES) $(src_capchroot_SOURCES) \ + $(src_chbind_SOURCES) $(src_chcontext_SOURCES) \ + $(src_fakerunlevel_SOURCES) $(src_filetime_SOURCES) \ + $(src_ifspec_SOURCES) $(src_listdevip_SOURCES) \ + $(src_parserpmdump_SOURCES) $(src_readlink_SOURCES) \ + $(src_rebootmgr_SOURCES) $(src_reducecap_SOURCES) \ + $(src_showattr_SOURCES) $(src_showperm_SOURCES) \ + $(src_vbuild_SOURCES) $(src_vcheck_SOURCES) $(src_vdu_SOURCES) \ + $(src_vfiles_SOURCES) $(src_vkill_SOURCES) \ + $(src_vlimit_SOURCES) $(src_vreboot_SOURCES) \ + $(src_vserver_stat_SOURCES) $(src_vunify_SOURCES) \ + $(tests_escaperoot_SOURCES) $(tests_forkbomb_SOURCES) \ + $(tests_testipc_SOURCES) $(tests_testlimit_SOURCES) \ + $(tests_testopenf_SOURCES) +man8dir = $(mandir)/man8 +NROFF = nroff +MANS = $(man_MANS) +pkglibDATA_INSTALL = $(INSTALL_DATA) +scriptscfgDATA_INSTALL = $(INSTALL_DATA) +sysconfDATA_INSTALL = $(INSTALL_DATA) +vservercfgDATA_INSTALL = $(INSTALL_DATA) +DATA = $(pkglib_DATA) $(scriptscfg_DATA) $(sysconf_DATA) \ + $(vservercfg_DATA) +includeHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(include_HEADERS) $(noinst_HEADERS) +ETAGS = etags +CTAGS = ctags +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 $(distdir).tar.bz2 +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPPFLAGS = @CPPFLAGS@ +CVS2CL = @CVS2CL@ +CVS2CL_TAG = @CVS2CL_TAG@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ENSC_ENABLE_INTERNAL_HEADERS_FALSE = @ENSC_ENABLE_INTERNAL_HEADERS_FALSE@ +ENSC_ENABLE_INTERNAL_HEADERS_TRUE = @ENSC_ENABLE_INTERNAL_HEADERS_TRUE@ +ENSC_ENABLE_LINUXCONF_FALSE = @ENSC_ENABLE_LINUXCONF_FALSE@ +ENSC_ENABLE_LINUXCONF_TRUE = @ENSC_ENABLE_LINUXCONF_TRUE@ +EXEEXT = @EXEEXT@ +HAVE_CVS2CL_FALSE = @HAVE_CVS2CL_FALSE@ +HAVE_CVS2CL_TRUE = @HAVE_CVS2CL_TRUE@ +HAVE_RCS2LOG_FALSE = @HAVE_RCS2LOG_FALSE@ +HAVE_RCS2LOG_TRUE = @HAVE_RCS2LOG_TRUE@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +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@ +OBJEXT = @OBJEXT@ +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@ +RANLIB = @RANLIB@ +RCS2LOG = @RCS2LOG@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +bindir = @bindir@ +build_alias = @build_alias@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host_alias = @host_alias@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +kernelincludedir = @kernelincludedir@ +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@ +vserverdir = @vserverdir@ +ACLOCAL_AMFLAGS = -I m4 +CVS2CL_AMFLAGS = $(CVS2CL_TAG) -U cvsusers.map --show-dead +CVS2CL_ALLFLAGS := $(CVS2CL_AMFLAGS) $(CVS2CL_FLAGS) +sysvdir = $(sysconfdir)/init.d +vservercfgdir = $(sysconfdir)/vservers +legacydir = $(pkglibdir)/legacy +include_HEADERS = $(lib_HDRS) +noinst_HEADERS = $(src_HDRS) $(lib_XHDRS) compat.h +lib_LIBRARIES = $(lib_lib_LIBS) +pkglib_SCRIPTS = $(distrib_SCRPTS) $(scripts_SCRPTS) $(src_pkglib_SCRPTS) +pkglib_DATA = $(distrib_DAT) $(scriptscfg_DATA) +legacy_SCRIPTS = $(scripts_LEGSCRPTS) +sbin_SCRIPTS = $(scripts_PRGS) $(linuxconf_SCRPTS) +sysv_SCRIPTS = $(sysv_SCRPTS) +sysconf_DATA = $(sysv_CFG) +vservercfg_DATA = $(linuxconf_cfg_DTA) +BUILT_SOURCES = linuxcaps.h linuxvirtual.h +man_MANS = $(man_DATMAN) $(linuxconf_DATMAN) +m4_FILES = m4/ensc_cflags.m4 m4/ensc_kerneldir.m4 \ + m4/ensc_changelog.m4 m4/ensc_uv_vrootdir.m4 + +EXTRA_DIST = $(distrib_SCRPTS) $(distrib_DAT) \ + $(sysv_XTRAS) $(sysv_CFG) \ + $(doc_DAT) $(man_DATMAN) $(linuxconf_XTRAS) \ + $(scripts_SCRPTS) $(scripts_XTRAS) \ + $(m4_FILES) \ + util-vserver.spec THANKS + +AM_CPPFLAGS = -I $(top_srcdir)/lib -D VERSION=\"$(VERSION)\" -D PKGLIBDIR=\"$(pkglibdir)\" -D _GNU_SOURCE +AM_CFLAGS = -Wall -pedantic +CLEANFILES = $(sysv_GENSCRPTS) $(scripts_GENSCRPTS) \ + $(linuxconf_GENFILES) $(src_GENFILES) \ + $(BUILT_SOURCES) + +lib_SRCS = lib/syscall.c \ + lib/syscall_rlimit.c \ + lib/syscall_kill.c \ + lib/checkversion.c \ + lib/getctx.c \ + lib/getversion.c \ + lib/uint2str.c + +lib_HDRS = lib/vserver.h +lib_XHDRS = lib/syscall-compat.hc \ + lib/syscall-legacy.hc \ + lib/syscall_rlimit-v11.hc \ + lib/syscall_kill-v11.hc \ + lib/getctx-compat.hc \ + lib/getctx-legacy.hc \ + lib/getversion-internal.hc \ + lib/safechroot-internal.hc \ + lib/virtual.h \ + lib/vserver-internal.h + +lib_lib_LIBS = lib/libvserver.a +lib_libvserver_a_SOURCES = $(lib_SRCS) +lib_libvserver_a_CPPFLAGS = -I$(kernelincludedir) -D_GNU_SOURCE +src_HDRS = src/vutil.h src/vutil.p \ + src/ext2fs.h + +src_pkglib_SCRPTS = src/setattr +src_pkglib_PRGS = src/capchroot \ + src/fakerunlevel \ + src/filetime \ + src/ifspec \ + src/listdevip \ + src/parserpmdump \ + src/readlink \ + src/showattr \ + src/showperm \ + src/vbuild \ + src/vcheck \ + src/vreboot \ + src/vunify + +src_sbin_PRGS = src/chbind \ + src/chcontext \ + src/rebootmgr \ + src/reducecap \ + src/vlimit \ + src/vdu \ + src/vfiles \ + src/vkill \ + src/vserver-stat + +src_GENFILES = src/setattr +src_capchroot_SOURCES = src/capchroot.c +src_capchroot_LDADD = lib/libvserver.a +src_chbind_SOURCES = src/chbind.c +src_chbind_LDADD = lib/libvserver.a +src_chcontext_SOURCES = src/chcontext.c +src_chcontext_LDADD = lib/libvserver.a +src_fakerunlevel_SOURCES = src/fakerunlevel.c +src_filetime_SOURCES = src/filetime.c +src_ifspec_SOURCES = src/ifspec.c +src_listdevip_SOURCES = src/listdevip.c +src_parserpmdump_SOURCES = src/parserpmdump.c +src_readlink_SOURCES = src/readlink.c +src_rebootmgr_SOURCES = src/rebootmgr.c +src_rebootmgr_CPPFLAGS = $(AM_CPPFLAGS) -DSBINDIR=\"$(sbindir)\" -DVROOTDIR=\"$(vserverdir)\" +src_reducecap_SOURCES = src/reducecap.c +src_reducecap_LDADD = lib/libvserver.a +src_vlimit_SOURCES = src/vlimit.c +src_vlimit_LDADD = lib/libvserver.a +src_vkill_SOURCES = src/vkill.c +src_vkill_LDADD = lib/libvserver.a +src_vkill_CPPFLAGS = $(AM_CPPFLAGS) -DLEGACYDIR=\"$(legacydir)\" +src_showattr_SOURCES = src/showattr.c +src_showperm_SOURCES = src/showperm.c +src_vbuild_SOURCES = src/vbuild.cc src/vutil.cc +src_vdu_SOURCES = src/vdu.c +src_vfiles_SOURCES = src/vfiles.cc src/vutil.cc +src_vreboot_SOURCES = src/vreboot.c +src_vserver_stat_SOURCES = src/vserver-stat.c +src_vserver_stat_LDADD = lib/libvserver.a +src_vunify_SOURCES = src/vunify.cc src/vutil.cc +src_vunify_CPPFLAGS = $(AM_CPPFLAGS) -DVROOTDIR=\"$(vserverdir)\" +src_vcheck_SOURCES = src/vcheck.cc src/vutil.cc +distrib_SCRPTS = distrib/install-mdk8.2 \ + distrib/install-post.sh \ + distrib/install-pre.sh \ + distrib/install-rh7.2 \ + distrib/install-rh7.3 \ + distrib/install-rh8.0 \ + distrib/install-rh9.0 \ + distrib/sample.sh + +distrib_DAT = distrib/mdk8.2-minimum \ + distrib/rh7.3-minimum \ + distrib/rh8.0-minimum \ + distrib/rh9.0-minimum \ + distrib/sample.conf + +doc_DAT = doc/FAQ.txt \ + doc/changelog.txt \ + doc/intro.txt + +man_DATMAN = man/chbind.8 \ + man/chcontext.8 \ + man/distrib-info.8 \ + man/rebootmgr.8 \ + man/reducecap.8 \ + man/vps.8 \ + man/vpstree.8 \ + man/vrpm.8 \ + man/vserver-copy.8 \ + man/vserver-stat.8 \ + man/vserver.8 \ + man/vtop.8 + +scriptscfgdir = $(sbindir) +scripts_src_SCRPTS = scripts/distrib-info \ + scripts/rootshell \ + scripts/save_s_context \ + scripts/vprofile \ + scripts/vserverkillall \ + scripts/vservers.grabinfo.sh \ + scripts/vsysvwrapper + +scripts_gen_SCRPTS = +scripts_src_LEGSCRPTS = scripts/vunify.sh +scripts_gen_LEGSCRPTS = scripts/vkill +scripts_src_PRGS = scripts/vpstree \ + scripts/vrpm \ + scripts/vserver \ + scripts/vserver-copy \ + scripts/vtop + +scripts_gen_PRGS = scripts/vps +scripts_PRGS = $(scripts_src_PRGS) $(scripts_gen_PRGS) +scripts_SCRPTS = $(scripts_src_SCRPTS) $(scripts_gen_SCRPTS) +scripts_LEGSCRPTS = $(scripts_src_LEGSCRPTS) $(scripts_gen_LEGSCRPTS) +scriptscfg_DATA = scripts/util-vserver-vars +scripts_XTRAS = scripts/util-vserver-vars.subst \ + scripts/vkill.subst \ + scripts/vps.subst \ + $(scripts_src_SCRPTS) $(scripts_src_PRGS) \ + $(scripts_src_LEGSCRPTS) + +scripts_GENSCRPTS = scripts/util-vserver-vars \ + $(scripts_gen_SCRPTS) $(scripts_gen_PRGS) \ + $(scripts_gen_LEGSCRPTS) + +test_PRGS = tests/escaperoot \ + tests/forkbomb \ + tests/testipc \ + tests/testlimit \ + tests/testopenf + +tests_escaperoot_SOURCES = tests/escaperoot.cc +tests_forkbomb_SOURCES = tests/forkbomb.cc +tests_testipc_SOURCES = tests/testipc.cc +tests_testlimit_SOURCES = tests/testlimit.cc +tests_testopenf_SOURCES = tests/testopenf.cc +sysv_XTRAS = sysv/rebootmgr.subst \ + sysv/v_gated.subst \ + sysv/v_httpd.subst \ + sysv/v_named.subst \ + sysv/v_portmap.subst \ + sysv/v_sendmail.subst \ + sysv/v_smb.subst \ + sysv/v_sshd.subst \ + sysv/v_xinetd.subst \ + sysv/vservers.subst + +sysv_GENSCRPTS = sysv/rebootmgr \ + sysv/v_gated \ + sysv/v_httpd \ + sysv/v_named \ + sysv/v_portmap \ + sysv/v_sendmail \ + sysv/v_smb \ + sysv/v_sshd \ + sysv/v_xinetd \ + sysv/vservers + +sysv_SCRPTS = $(sysv_GENSCRPTS) +sysv_CFG = sysv/vservers.conf +linuxconf_gen_SCRPTS = linuxconf/newvserver +linuxconf_src_DATMAN = linuxconf/newvserver.8 +linuxconf_cfg_src_DTA = linuxconf/newvserver.defaults +linuxconf_XTRAS = linuxconf/newvserver.subst \ + $(linuxconf_cfg_src_DTA) \ + $(linuxconf_src_DATMAN) + +linuxconf_GENFILES = $(linuxconf_gen_SCRPTS) +@ENSC_ENABLE_LINUXCONF_FALSE@linuxconf_DATMAN = +@ENSC_ENABLE_LINUXCONF_TRUE@linuxconf_DATMAN = $(linuxconf_src_DATMAN) +@ENSC_ENABLE_LINUXCONF_FALSE@linuxconf_SCRPTS = +@ENSC_ENABLE_LINUXCONF_TRUE@linuxconf_SCRPTS = $(linuxconf_gen_SCRPTS) +@ENSC_ENABLE_LINUXCONF_FALSE@linuxconf_cfg_DTA = +@ENSC_ENABLE_LINUXCONF_TRUE@linuxconf_cfg_DTA = $(linuxconf_cfg_src_DTA) +all: $(BUILT_SOURCES) config.h + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .c .cc .o .obj +am--refresh: + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/lib/Makefile-files $(top_srcdir)/src/Makefile-files $(top_srcdir)/distrib/Makefile-files $(top_srcdir)/doc/Makefile-files $(top_srcdir)/man/Makefile-files $(top_srcdir)/scripts/Makefile-files $(top_srcdir)/tests/Makefile-files $(top_srcdir)/sysv/Makefile-files $(top_srcdir)/linuxconf/Makefile-files $(top_srcdir)/m4/gpgsig.am $(top_srcdir)/m4/validate.am $(top_srcdir)/m4/changelog.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) + +config.h: stamp-h1 + @if test ! -f $@; then \ + rm -f stamp-h1; \ + $(MAKE) stamp-h1; \ + else :; fi + +stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status config.h +$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_srcdir) && $(AUTOHEADER) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 +util-vserver.spec: $(top_builddir)/config.status $(srcdir)/util-vserver.spec.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +install-libLIBRARIES: $(lib_LIBRARIES) + @$(NORMAL_INSTALL) + $(mkdir_p) $(DESTDIR)$(libdir) + @list='$(lib_LIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(libLIBRARIES_INSTALL) $$p $(DESTDIR)$(libdir)/$$f"; \ + $(libLIBRARIES_INSTALL) $$p $(DESTDIR)$(libdir)/$$f; \ + else :; fi; \ + done + @$(POST_INSTALL) + @list='$(lib_LIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + p="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(RANLIB) $(DESTDIR)$(libdir)/$$p"; \ + $(RANLIB) $(DESTDIR)$(libdir)/$$p; \ + else :; fi; \ + done + +uninstall-libLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LIBRARIES)'; for p in $$list; do \ + p="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " rm -f $(DESTDIR)$(libdir)/$$p"; \ + rm -f $(DESTDIR)$(libdir)/$$p; \ + done + +clean-libLIBRARIES: + -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES) +lib/$(am__dirstamp): + @$(mkdir_p) lib + @: > lib/$(am__dirstamp) +lib/$(DEPDIR)/$(am__dirstamp): + @$(mkdir_p) lib/$(DEPDIR) + @: > lib/$(DEPDIR)/$(am__dirstamp) +lib/lib_libvserver_a-syscall.$(OBJEXT): lib/$(am__dirstamp) \ + lib/$(DEPDIR)/$(am__dirstamp) +lib/lib_libvserver_a-syscall_rlimit.$(OBJEXT): lib/$(am__dirstamp) \ + lib/$(DEPDIR)/$(am__dirstamp) +lib/lib_libvserver_a-syscall_kill.$(OBJEXT): lib/$(am__dirstamp) \ + lib/$(DEPDIR)/$(am__dirstamp) +lib/lib_libvserver_a-checkversion.$(OBJEXT): lib/$(am__dirstamp) \ + lib/$(DEPDIR)/$(am__dirstamp) +lib/lib_libvserver_a-getctx.$(OBJEXT): lib/$(am__dirstamp) \ + lib/$(DEPDIR)/$(am__dirstamp) +lib/lib_libvserver_a-getversion.$(OBJEXT): lib/$(am__dirstamp) \ + lib/$(DEPDIR)/$(am__dirstamp) +lib/lib_libvserver_a-uint2str.$(OBJEXT): lib/$(am__dirstamp) \ + lib/$(DEPDIR)/$(am__dirstamp) +lib/libvserver.a: $(lib_libvserver_a_OBJECTS) $(lib_libvserver_a_DEPENDENCIES) lib/$(am__dirstamp) + -rm -f lib/libvserver.a + $(lib_libvserver_a_AR) lib/libvserver.a $(lib_libvserver_a_OBJECTS) $(lib_libvserver_a_LIBADD) + $(RANLIB) lib/libvserver.a + +clean-noinstPROGRAMS: + -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) +install-pkglibPROGRAMS: $(pkglib_PROGRAMS) + @$(NORMAL_INSTALL) + $(mkdir_p) $(DESTDIR)$(pkglibdir) + @list='$(pkglib_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(pkglibPROGRAMS_INSTALL) $$p $(DESTDIR)$(pkglibdir)/$$f"; \ + $(INSTALL_PROGRAM_ENV) $(pkglibPROGRAMS_INSTALL) $$p $(DESTDIR)$(pkglibdir)/$$f || exit 1; \ + else :; fi; \ + done + +uninstall-pkglibPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f $(DESTDIR)$(pkglibdir)/$$f"; \ + rm -f $(DESTDIR)$(pkglibdir)/$$f; \ + done + +clean-pkglibPROGRAMS: + -test -z "$(pkglib_PROGRAMS)" || rm -f $(pkglib_PROGRAMS) +install-sbinPROGRAMS: $(sbin_PROGRAMS) + @$(NORMAL_INSTALL) + $(mkdir_p) $(DESTDIR)$(sbindir) + @list='$(sbin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(sbinPROGRAMS_INSTALL) $$p $(DESTDIR)$(sbindir)/$$f"; \ + $(INSTALL_PROGRAM_ENV) $(sbinPROGRAMS_INSTALL) $$p $(DESTDIR)$(sbindir)/$$f || exit 1; \ + else :; fi; \ + done + +uninstall-sbinPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(sbin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f $(DESTDIR)$(sbindir)/$$f"; \ + rm -f $(DESTDIR)$(sbindir)/$$f; \ + done + +clean-sbinPROGRAMS: + -test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS) +src/$(am__dirstamp): + @$(mkdir_p) src + @: > src/$(am__dirstamp) +src/$(DEPDIR)/$(am__dirstamp): + @$(mkdir_p) src/$(DEPDIR) + @: > src/$(DEPDIR)/$(am__dirstamp) +src/capchroot.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/capchroot$(EXEEXT): $(src_capchroot_OBJECTS) $(src_capchroot_DEPENDENCIES) src/$(am__dirstamp) + @rm -f src/capchroot$(EXEEXT) + $(LINK) $(src_capchroot_LDFLAGS) $(src_capchroot_OBJECTS) $(src_capchroot_LDADD) $(LIBS) +src/chbind.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/chbind$(EXEEXT): $(src_chbind_OBJECTS) $(src_chbind_DEPENDENCIES) src/$(am__dirstamp) + @rm -f src/chbind$(EXEEXT) + $(LINK) $(src_chbind_LDFLAGS) $(src_chbind_OBJECTS) $(src_chbind_LDADD) $(LIBS) +src/chcontext.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/chcontext$(EXEEXT): $(src_chcontext_OBJECTS) $(src_chcontext_DEPENDENCIES) src/$(am__dirstamp) + @rm -f src/chcontext$(EXEEXT) + $(LINK) $(src_chcontext_LDFLAGS) $(src_chcontext_OBJECTS) $(src_chcontext_LDADD) $(LIBS) +src/fakerunlevel.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/fakerunlevel$(EXEEXT): $(src_fakerunlevel_OBJECTS) $(src_fakerunlevel_DEPENDENCIES) src/$(am__dirstamp) + @rm -f src/fakerunlevel$(EXEEXT) + $(LINK) $(src_fakerunlevel_LDFLAGS) $(src_fakerunlevel_OBJECTS) $(src_fakerunlevel_LDADD) $(LIBS) +src/filetime.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/filetime$(EXEEXT): $(src_filetime_OBJECTS) $(src_filetime_DEPENDENCIES) src/$(am__dirstamp) + @rm -f src/filetime$(EXEEXT) + $(LINK) $(src_filetime_LDFLAGS) $(src_filetime_OBJECTS) $(src_filetime_LDADD) $(LIBS) +src/ifspec.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/ifspec$(EXEEXT): $(src_ifspec_OBJECTS) $(src_ifspec_DEPENDENCIES) src/$(am__dirstamp) + @rm -f src/ifspec$(EXEEXT) + $(LINK) $(src_ifspec_LDFLAGS) $(src_ifspec_OBJECTS) $(src_ifspec_LDADD) $(LIBS) +src/listdevip.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/listdevip$(EXEEXT): $(src_listdevip_OBJECTS) $(src_listdevip_DEPENDENCIES) src/$(am__dirstamp) + @rm -f src/listdevip$(EXEEXT) + $(LINK) $(src_listdevip_LDFLAGS) $(src_listdevip_OBJECTS) $(src_listdevip_LDADD) $(LIBS) +src/parserpmdump.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/parserpmdump$(EXEEXT): $(src_parserpmdump_OBJECTS) $(src_parserpmdump_DEPENDENCIES) src/$(am__dirstamp) + @rm -f src/parserpmdump$(EXEEXT) + $(LINK) $(src_parserpmdump_LDFLAGS) $(src_parserpmdump_OBJECTS) $(src_parserpmdump_LDADD) $(LIBS) +src/readlink.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/readlink$(EXEEXT): $(src_readlink_OBJECTS) $(src_readlink_DEPENDENCIES) src/$(am__dirstamp) + @rm -f src/readlink$(EXEEXT) + $(LINK) $(src_readlink_LDFLAGS) $(src_readlink_OBJECTS) $(src_readlink_LDADD) $(LIBS) +src/src_rebootmgr-rebootmgr.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/rebootmgr$(EXEEXT): $(src_rebootmgr_OBJECTS) $(src_rebootmgr_DEPENDENCIES) src/$(am__dirstamp) + @rm -f src/rebootmgr$(EXEEXT) + $(LINK) $(src_rebootmgr_LDFLAGS) $(src_rebootmgr_OBJECTS) $(src_rebootmgr_LDADD) $(LIBS) +src/reducecap.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/reducecap$(EXEEXT): $(src_reducecap_OBJECTS) $(src_reducecap_DEPENDENCIES) src/$(am__dirstamp) + @rm -f src/reducecap$(EXEEXT) + $(LINK) $(src_reducecap_LDFLAGS) $(src_reducecap_OBJECTS) $(src_reducecap_LDADD) $(LIBS) +src/showattr.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/showattr$(EXEEXT): $(src_showattr_OBJECTS) $(src_showattr_DEPENDENCIES) src/$(am__dirstamp) + @rm -f src/showattr$(EXEEXT) + $(LINK) $(src_showattr_LDFLAGS) $(src_showattr_OBJECTS) $(src_showattr_LDADD) $(LIBS) +src/showperm.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/showperm$(EXEEXT): $(src_showperm_OBJECTS) $(src_showperm_DEPENDENCIES) src/$(am__dirstamp) + @rm -f src/showperm$(EXEEXT) + $(LINK) $(src_showperm_LDFLAGS) $(src_showperm_OBJECTS) $(src_showperm_LDADD) $(LIBS) +src/vbuild.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/vutil.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) +src/vbuild$(EXEEXT): $(src_vbuild_OBJECTS) $(src_vbuild_DEPENDENCIES) src/$(am__dirstamp) + @rm -f src/vbuild$(EXEEXT) + $(CXXLINK) $(src_vbuild_LDFLAGS) $(src_vbuild_OBJECTS) $(src_vbuild_LDADD) $(LIBS) +src/vcheck.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/vcheck$(EXEEXT): $(src_vcheck_OBJECTS) $(src_vcheck_DEPENDENCIES) src/$(am__dirstamp) + @rm -f src/vcheck$(EXEEXT) + $(CXXLINK) $(src_vcheck_LDFLAGS) $(src_vcheck_OBJECTS) $(src_vcheck_LDADD) $(LIBS) +src/vdu.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) +src/vdu$(EXEEXT): $(src_vdu_OBJECTS) $(src_vdu_DEPENDENCIES) src/$(am__dirstamp) + @rm -f src/vdu$(EXEEXT) + $(LINK) $(src_vdu_LDFLAGS) $(src_vdu_OBJECTS) $(src_vdu_LDADD) $(LIBS) +src/vfiles.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/vfiles$(EXEEXT): $(src_vfiles_OBJECTS) $(src_vfiles_DEPENDENCIES) src/$(am__dirstamp) + @rm -f src/vfiles$(EXEEXT) + $(CXXLINK) $(src_vfiles_LDFLAGS) $(src_vfiles_OBJECTS) $(src_vfiles_LDADD) $(LIBS) +src/src_vkill-vkill.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/vkill$(EXEEXT): $(src_vkill_OBJECTS) $(src_vkill_DEPENDENCIES) src/$(am__dirstamp) + @rm -f src/vkill$(EXEEXT) + $(LINK) $(src_vkill_LDFLAGS) $(src_vkill_OBJECTS) $(src_vkill_LDADD) $(LIBS) +src/vlimit.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/vlimit$(EXEEXT): $(src_vlimit_OBJECTS) $(src_vlimit_DEPENDENCIES) src/$(am__dirstamp) + @rm -f src/vlimit$(EXEEXT) + $(LINK) $(src_vlimit_LDFLAGS) $(src_vlimit_OBJECTS) $(src_vlimit_LDADD) $(LIBS) +src/vreboot.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/vreboot$(EXEEXT): $(src_vreboot_OBJECTS) $(src_vreboot_DEPENDENCIES) src/$(am__dirstamp) + @rm -f src/vreboot$(EXEEXT) + $(LINK) $(src_vreboot_LDFLAGS) $(src_vreboot_OBJECTS) $(src_vreboot_LDADD) $(LIBS) +src/vserver-stat.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/vserver-stat$(EXEEXT): $(src_vserver_stat_OBJECTS) $(src_vserver_stat_DEPENDENCIES) src/$(am__dirstamp) + @rm -f src/vserver-stat$(EXEEXT) + $(LINK) $(src_vserver_stat_LDFLAGS) $(src_vserver_stat_OBJECTS) $(src_vserver_stat_LDADD) $(LIBS) +src/src_vunify-vunify.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/src_vunify-vutil.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/vunify$(EXEEXT): $(src_vunify_OBJECTS) $(src_vunify_DEPENDENCIES) src/$(am__dirstamp) + @rm -f src/vunify$(EXEEXT) + $(CXXLINK) $(src_vunify_LDFLAGS) $(src_vunify_OBJECTS) $(src_vunify_LDADD) $(LIBS) +tests/$(am__dirstamp): + @$(mkdir_p) tests + @: > tests/$(am__dirstamp) +tests/$(DEPDIR)/$(am__dirstamp): + @$(mkdir_p) tests/$(DEPDIR) + @: > tests/$(DEPDIR)/$(am__dirstamp) +tests/escaperoot.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) +tests/escaperoot$(EXEEXT): $(tests_escaperoot_OBJECTS) $(tests_escaperoot_DEPENDENCIES) tests/$(am__dirstamp) + @rm -f tests/escaperoot$(EXEEXT) + $(CXXLINK) $(tests_escaperoot_LDFLAGS) $(tests_escaperoot_OBJECTS) $(tests_escaperoot_LDADD) $(LIBS) +tests/forkbomb.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) +tests/forkbomb$(EXEEXT): $(tests_forkbomb_OBJECTS) $(tests_forkbomb_DEPENDENCIES) tests/$(am__dirstamp) + @rm -f tests/forkbomb$(EXEEXT) + $(CXXLINK) $(tests_forkbomb_LDFLAGS) $(tests_forkbomb_OBJECTS) $(tests_forkbomb_LDADD) $(LIBS) +tests/testipc.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) +tests/testipc$(EXEEXT): $(tests_testipc_OBJECTS) $(tests_testipc_DEPENDENCIES) tests/$(am__dirstamp) + @rm -f tests/testipc$(EXEEXT) + $(CXXLINK) $(tests_testipc_LDFLAGS) $(tests_testipc_OBJECTS) $(tests_testipc_LDADD) $(LIBS) +tests/testlimit.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) +tests/testlimit$(EXEEXT): $(tests_testlimit_OBJECTS) $(tests_testlimit_DEPENDENCIES) tests/$(am__dirstamp) + @rm -f tests/testlimit$(EXEEXT) + $(CXXLINK) $(tests_testlimit_LDFLAGS) $(tests_testlimit_OBJECTS) $(tests_testlimit_LDADD) $(LIBS) +tests/testopenf.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) +tests/testopenf$(EXEEXT): $(tests_testopenf_OBJECTS) $(tests_testopenf_DEPENDENCIES) tests/$(am__dirstamp) + @rm -f tests/testopenf$(EXEEXT) + $(CXXLINK) $(tests_testopenf_LDFLAGS) $(tests_testopenf_OBJECTS) $(tests_testopenf_LDADD) $(LIBS) +install-legacySCRIPTS: $(legacy_SCRIPTS) + @$(NORMAL_INSTALL) + $(mkdir_p) $(DESTDIR)$(legacydir) + @list='$(legacy_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 " $(legacySCRIPT_INSTALL) $$d$$p $(DESTDIR)$(legacydir)/$$f"; \ + $(legacySCRIPT_INSTALL) $$d$$p $(DESTDIR)$(legacydir)/$$f; \ + else :; fi; \ + done + +uninstall-legacySCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(legacy_SCRIPTS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " rm -f $(DESTDIR)$(legacydir)/$$f"; \ + rm -f $(DESTDIR)$(legacydir)/$$f; \ + done +install-pkglibSCRIPTS: $(pkglib_SCRIPTS) + @$(NORMAL_INSTALL) + $(mkdir_p) $(DESTDIR)$(pkglibdir) + @list='$(pkglib_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 " $(pkglibSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(pkglibdir)/$$f"; \ + $(pkglibSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(pkglibdir)/$$f; \ + else :; fi; \ + done + +uninstall-pkglibSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_SCRIPTS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " rm -f $(DESTDIR)$(pkglibdir)/$$f"; \ + rm -f $(DESTDIR)$(pkglibdir)/$$f; \ + done +install-sbinSCRIPTS: $(sbin_SCRIPTS) + @$(NORMAL_INSTALL) + $(mkdir_p) $(DESTDIR)$(sbindir) + @list='$(sbin_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 " $(sbinSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(sbindir)/$$f"; \ + $(sbinSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(sbindir)/$$f; \ + else :; fi; \ + done + +uninstall-sbinSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(sbin_SCRIPTS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " rm -f $(DESTDIR)$(sbindir)/$$f"; \ + rm -f $(DESTDIR)$(sbindir)/$$f; \ + done +install-sysvSCRIPTS: $(sysv_SCRIPTS) + @$(NORMAL_INSTALL) + $(mkdir_p) $(DESTDIR)$(sysvdir) + @list='$(sysv_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 " $(sysvSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(sysvdir)/$$f"; \ + $(sysvSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(sysvdir)/$$f; \ + else :; fi; \ + done + +uninstall-sysvSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(sysv_SCRIPTS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " rm -f $(DESTDIR)$(sysvdir)/$$f"; \ + rm -f $(DESTDIR)$(sysvdir)/$$f; \ + done + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + -rm -f lib/lib_libvserver_a-checkversion.$(OBJEXT) + -rm -f lib/lib_libvserver_a-getctx.$(OBJEXT) + -rm -f lib/lib_libvserver_a-getversion.$(OBJEXT) + -rm -f lib/lib_libvserver_a-syscall.$(OBJEXT) + -rm -f lib/lib_libvserver_a-syscall_kill.$(OBJEXT) + -rm -f lib/lib_libvserver_a-syscall_rlimit.$(OBJEXT) + -rm -f lib/lib_libvserver_a-uint2str.$(OBJEXT) + -rm -f src/capchroot.$(OBJEXT) + -rm -f src/chbind.$(OBJEXT) + -rm -f src/chcontext.$(OBJEXT) + -rm -f src/fakerunlevel.$(OBJEXT) + -rm -f src/filetime.$(OBJEXT) + -rm -f src/ifspec.$(OBJEXT) + -rm -f src/listdevip.$(OBJEXT) + -rm -f src/parserpmdump.$(OBJEXT) + -rm -f src/readlink.$(OBJEXT) + -rm -f src/reducecap.$(OBJEXT) + -rm -f src/showattr.$(OBJEXT) + -rm -f src/showperm.$(OBJEXT) + -rm -f src/src_rebootmgr-rebootmgr.$(OBJEXT) + -rm -f src/src_vkill-vkill.$(OBJEXT) + -rm -f src/src_vunify-vunify.$(OBJEXT) + -rm -f src/src_vunify-vutil.$(OBJEXT) + -rm -f src/vbuild.$(OBJEXT) + -rm -f src/vcheck.$(OBJEXT) + -rm -f src/vdu.$(OBJEXT) + -rm -f src/vfiles.$(OBJEXT) + -rm -f src/vlimit.$(OBJEXT) + -rm -f src/vreboot.$(OBJEXT) + -rm -f src/vserver-stat.$(OBJEXT) + -rm -f src/vutil.$(OBJEXT) + -rm -f tests/escaperoot.$(OBJEXT) + -rm -f tests/forkbomb.$(OBJEXT) + -rm -f tests/testipc.$(OBJEXT) + -rm -f tests/testlimit.$(OBJEXT) + -rm -f tests/testopenf.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-checkversion.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-getctx.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-getversion.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_kill.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-syscall_rlimit.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@lib/$(DEPDIR)/lib_libvserver_a-uint2str.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/capchroot.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/chbind.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/chcontext.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/fakerunlevel.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/filetime.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/ifspec.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/listdevip.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/parserpmdump.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/readlink.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/reducecap.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/showattr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/showperm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/src_rebootmgr-rebootmgr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/src_vkill-vkill.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/src_vunify-vunify.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/src_vunify-vutil.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vbuild.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vcheck.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vdu.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vfiles.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vlimit.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vreboot.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vserver-stat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vutil.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/escaperoot.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/forkbomb.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/testipc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/testlimit.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/testopenf.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +lib/lib_libvserver_a-syscall.o: lib/syscall.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/lib_libvserver_a-syscall.o -MD -MP -MF "lib/$(DEPDIR)/lib_libvserver_a-syscall.Tpo" -c -o lib/lib_libvserver_a-syscall.o `test -f 'lib/syscall.c' || echo '$(srcdir)/'`lib/syscall.c; \ +@am__fastdepCC_TRUE@ then mv -f "lib/$(DEPDIR)/lib_libvserver_a-syscall.Tpo" "lib/$(DEPDIR)/lib_libvserver_a-syscall.Po"; else rm -f "lib/$(DEPDIR)/lib_libvserver_a-syscall.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/syscall.c' object='lib/lib_libvserver_a-syscall.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='lib/$(DEPDIR)/lib_libvserver_a-syscall.Po' tmpdepfile='lib/$(DEPDIR)/lib_libvserver_a-syscall.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvserver_a-syscall.o `test -f 'lib/syscall.c' || echo '$(srcdir)/'`lib/syscall.c + +lib/lib_libvserver_a-syscall.obj: lib/syscall.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/lib_libvserver_a-syscall.obj -MD -MP -MF "lib/$(DEPDIR)/lib_libvserver_a-syscall.Tpo" -c -o lib/lib_libvserver_a-syscall.obj `if test -f 'lib/syscall.c'; then $(CYGPATH_W) 'lib/syscall.c'; else $(CYGPATH_W) '$(srcdir)/lib/syscall.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "lib/$(DEPDIR)/lib_libvserver_a-syscall.Tpo" "lib/$(DEPDIR)/lib_libvserver_a-syscall.Po"; else rm -f "lib/$(DEPDIR)/lib_libvserver_a-syscall.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/syscall.c' object='lib/lib_libvserver_a-syscall.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='lib/$(DEPDIR)/lib_libvserver_a-syscall.Po' tmpdepfile='lib/$(DEPDIR)/lib_libvserver_a-syscall.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvserver_a-syscall.obj `if test -f 'lib/syscall.c'; then $(CYGPATH_W) 'lib/syscall.c'; else $(CYGPATH_W) '$(srcdir)/lib/syscall.c'; fi` + +lib/lib_libvserver_a-syscall_rlimit.o: lib/syscall_rlimit.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/lib_libvserver_a-syscall_rlimit.o -MD -MP -MF "lib/$(DEPDIR)/lib_libvserver_a-syscall_rlimit.Tpo" -c -o lib/lib_libvserver_a-syscall_rlimit.o `test -f 'lib/syscall_rlimit.c' || echo '$(srcdir)/'`lib/syscall_rlimit.c; \ +@am__fastdepCC_TRUE@ then mv -f "lib/$(DEPDIR)/lib_libvserver_a-syscall_rlimit.Tpo" "lib/$(DEPDIR)/lib_libvserver_a-syscall_rlimit.Po"; else rm -f "lib/$(DEPDIR)/lib_libvserver_a-syscall_rlimit.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/syscall_rlimit.c' object='lib/lib_libvserver_a-syscall_rlimit.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='lib/$(DEPDIR)/lib_libvserver_a-syscall_rlimit.Po' tmpdepfile='lib/$(DEPDIR)/lib_libvserver_a-syscall_rlimit.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvserver_a-syscall_rlimit.o `test -f 'lib/syscall_rlimit.c' || echo '$(srcdir)/'`lib/syscall_rlimit.c + +lib/lib_libvserver_a-syscall_rlimit.obj: lib/syscall_rlimit.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/lib_libvserver_a-syscall_rlimit.obj -MD -MP -MF "lib/$(DEPDIR)/lib_libvserver_a-syscall_rlimit.Tpo" -c -o lib/lib_libvserver_a-syscall_rlimit.obj `if test -f 'lib/syscall_rlimit.c'; then $(CYGPATH_W) 'lib/syscall_rlimit.c'; else $(CYGPATH_W) '$(srcdir)/lib/syscall_rlimit.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "lib/$(DEPDIR)/lib_libvserver_a-syscall_rlimit.Tpo" "lib/$(DEPDIR)/lib_libvserver_a-syscall_rlimit.Po"; else rm -f "lib/$(DEPDIR)/lib_libvserver_a-syscall_rlimit.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/syscall_rlimit.c' object='lib/lib_libvserver_a-syscall_rlimit.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='lib/$(DEPDIR)/lib_libvserver_a-syscall_rlimit.Po' tmpdepfile='lib/$(DEPDIR)/lib_libvserver_a-syscall_rlimit.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvserver_a-syscall_rlimit.obj `if test -f 'lib/syscall_rlimit.c'; then $(CYGPATH_W) 'lib/syscall_rlimit.c'; else $(CYGPATH_W) '$(srcdir)/lib/syscall_rlimit.c'; fi` + +lib/lib_libvserver_a-syscall_kill.o: lib/syscall_kill.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/lib_libvserver_a-syscall_kill.o -MD -MP -MF "lib/$(DEPDIR)/lib_libvserver_a-syscall_kill.Tpo" -c -o lib/lib_libvserver_a-syscall_kill.o `test -f 'lib/syscall_kill.c' || echo '$(srcdir)/'`lib/syscall_kill.c; \ +@am__fastdepCC_TRUE@ then mv -f "lib/$(DEPDIR)/lib_libvserver_a-syscall_kill.Tpo" "lib/$(DEPDIR)/lib_libvserver_a-syscall_kill.Po"; else rm -f "lib/$(DEPDIR)/lib_libvserver_a-syscall_kill.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/syscall_kill.c' object='lib/lib_libvserver_a-syscall_kill.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='lib/$(DEPDIR)/lib_libvserver_a-syscall_kill.Po' tmpdepfile='lib/$(DEPDIR)/lib_libvserver_a-syscall_kill.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvserver_a-syscall_kill.o `test -f 'lib/syscall_kill.c' || echo '$(srcdir)/'`lib/syscall_kill.c + +lib/lib_libvserver_a-syscall_kill.obj: lib/syscall_kill.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/lib_libvserver_a-syscall_kill.obj -MD -MP -MF "lib/$(DEPDIR)/lib_libvserver_a-syscall_kill.Tpo" -c -o lib/lib_libvserver_a-syscall_kill.obj `if test -f 'lib/syscall_kill.c'; then $(CYGPATH_W) 'lib/syscall_kill.c'; else $(CYGPATH_W) '$(srcdir)/lib/syscall_kill.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "lib/$(DEPDIR)/lib_libvserver_a-syscall_kill.Tpo" "lib/$(DEPDIR)/lib_libvserver_a-syscall_kill.Po"; else rm -f "lib/$(DEPDIR)/lib_libvserver_a-syscall_kill.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/syscall_kill.c' object='lib/lib_libvserver_a-syscall_kill.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='lib/$(DEPDIR)/lib_libvserver_a-syscall_kill.Po' tmpdepfile='lib/$(DEPDIR)/lib_libvserver_a-syscall_kill.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvserver_a-syscall_kill.obj `if test -f 'lib/syscall_kill.c'; then $(CYGPATH_W) 'lib/syscall_kill.c'; else $(CYGPATH_W) '$(srcdir)/lib/syscall_kill.c'; fi` + +lib/lib_libvserver_a-checkversion.o: lib/checkversion.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/lib_libvserver_a-checkversion.o -MD -MP -MF "lib/$(DEPDIR)/lib_libvserver_a-checkversion.Tpo" -c -o lib/lib_libvserver_a-checkversion.o `test -f 'lib/checkversion.c' || echo '$(srcdir)/'`lib/checkversion.c; \ +@am__fastdepCC_TRUE@ then mv -f "lib/$(DEPDIR)/lib_libvserver_a-checkversion.Tpo" "lib/$(DEPDIR)/lib_libvserver_a-checkversion.Po"; else rm -f "lib/$(DEPDIR)/lib_libvserver_a-checkversion.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/checkversion.c' object='lib/lib_libvserver_a-checkversion.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='lib/$(DEPDIR)/lib_libvserver_a-checkversion.Po' tmpdepfile='lib/$(DEPDIR)/lib_libvserver_a-checkversion.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvserver_a-checkversion.o `test -f 'lib/checkversion.c' || echo '$(srcdir)/'`lib/checkversion.c + +lib/lib_libvserver_a-checkversion.obj: lib/checkversion.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/lib_libvserver_a-checkversion.obj -MD -MP -MF "lib/$(DEPDIR)/lib_libvserver_a-checkversion.Tpo" -c -o lib/lib_libvserver_a-checkversion.obj `if test -f 'lib/checkversion.c'; then $(CYGPATH_W) 'lib/checkversion.c'; else $(CYGPATH_W) '$(srcdir)/lib/checkversion.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "lib/$(DEPDIR)/lib_libvserver_a-checkversion.Tpo" "lib/$(DEPDIR)/lib_libvserver_a-checkversion.Po"; else rm -f "lib/$(DEPDIR)/lib_libvserver_a-checkversion.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/checkversion.c' object='lib/lib_libvserver_a-checkversion.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='lib/$(DEPDIR)/lib_libvserver_a-checkversion.Po' tmpdepfile='lib/$(DEPDIR)/lib_libvserver_a-checkversion.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvserver_a-checkversion.obj `if test -f 'lib/checkversion.c'; then $(CYGPATH_W) 'lib/checkversion.c'; else $(CYGPATH_W) '$(srcdir)/lib/checkversion.c'; fi` + +lib/lib_libvserver_a-getctx.o: lib/getctx.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/lib_libvserver_a-getctx.o -MD -MP -MF "lib/$(DEPDIR)/lib_libvserver_a-getctx.Tpo" -c -o lib/lib_libvserver_a-getctx.o `test -f 'lib/getctx.c' || echo '$(srcdir)/'`lib/getctx.c; \ +@am__fastdepCC_TRUE@ then mv -f "lib/$(DEPDIR)/lib_libvserver_a-getctx.Tpo" "lib/$(DEPDIR)/lib_libvserver_a-getctx.Po"; else rm -f "lib/$(DEPDIR)/lib_libvserver_a-getctx.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/getctx.c' object='lib/lib_libvserver_a-getctx.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='lib/$(DEPDIR)/lib_libvserver_a-getctx.Po' tmpdepfile='lib/$(DEPDIR)/lib_libvserver_a-getctx.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvserver_a-getctx.o `test -f 'lib/getctx.c' || echo '$(srcdir)/'`lib/getctx.c + +lib/lib_libvserver_a-getctx.obj: lib/getctx.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/lib_libvserver_a-getctx.obj -MD -MP -MF "lib/$(DEPDIR)/lib_libvserver_a-getctx.Tpo" -c -o lib/lib_libvserver_a-getctx.obj `if test -f 'lib/getctx.c'; then $(CYGPATH_W) 'lib/getctx.c'; else $(CYGPATH_W) '$(srcdir)/lib/getctx.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "lib/$(DEPDIR)/lib_libvserver_a-getctx.Tpo" "lib/$(DEPDIR)/lib_libvserver_a-getctx.Po"; else rm -f "lib/$(DEPDIR)/lib_libvserver_a-getctx.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/getctx.c' object='lib/lib_libvserver_a-getctx.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='lib/$(DEPDIR)/lib_libvserver_a-getctx.Po' tmpdepfile='lib/$(DEPDIR)/lib_libvserver_a-getctx.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvserver_a-getctx.obj `if test -f 'lib/getctx.c'; then $(CYGPATH_W) 'lib/getctx.c'; else $(CYGPATH_W) '$(srcdir)/lib/getctx.c'; fi` + +lib/lib_libvserver_a-getversion.o: lib/getversion.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/lib_libvserver_a-getversion.o -MD -MP -MF "lib/$(DEPDIR)/lib_libvserver_a-getversion.Tpo" -c -o lib/lib_libvserver_a-getversion.o `test -f 'lib/getversion.c' || echo '$(srcdir)/'`lib/getversion.c; \ +@am__fastdepCC_TRUE@ then mv -f "lib/$(DEPDIR)/lib_libvserver_a-getversion.Tpo" "lib/$(DEPDIR)/lib_libvserver_a-getversion.Po"; else rm -f "lib/$(DEPDIR)/lib_libvserver_a-getversion.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/getversion.c' object='lib/lib_libvserver_a-getversion.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='lib/$(DEPDIR)/lib_libvserver_a-getversion.Po' tmpdepfile='lib/$(DEPDIR)/lib_libvserver_a-getversion.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvserver_a-getversion.o `test -f 'lib/getversion.c' || echo '$(srcdir)/'`lib/getversion.c + +lib/lib_libvserver_a-getversion.obj: lib/getversion.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/lib_libvserver_a-getversion.obj -MD -MP -MF "lib/$(DEPDIR)/lib_libvserver_a-getversion.Tpo" -c -o lib/lib_libvserver_a-getversion.obj `if test -f 'lib/getversion.c'; then $(CYGPATH_W) 'lib/getversion.c'; else $(CYGPATH_W) '$(srcdir)/lib/getversion.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "lib/$(DEPDIR)/lib_libvserver_a-getversion.Tpo" "lib/$(DEPDIR)/lib_libvserver_a-getversion.Po"; else rm -f "lib/$(DEPDIR)/lib_libvserver_a-getversion.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/getversion.c' object='lib/lib_libvserver_a-getversion.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='lib/$(DEPDIR)/lib_libvserver_a-getversion.Po' tmpdepfile='lib/$(DEPDIR)/lib_libvserver_a-getversion.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvserver_a-getversion.obj `if test -f 'lib/getversion.c'; then $(CYGPATH_W) 'lib/getversion.c'; else $(CYGPATH_W) '$(srcdir)/lib/getversion.c'; fi` + +lib/lib_libvserver_a-uint2str.o: lib/uint2str.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/lib_libvserver_a-uint2str.o -MD -MP -MF "lib/$(DEPDIR)/lib_libvserver_a-uint2str.Tpo" -c -o lib/lib_libvserver_a-uint2str.o `test -f 'lib/uint2str.c' || echo '$(srcdir)/'`lib/uint2str.c; \ +@am__fastdepCC_TRUE@ then mv -f "lib/$(DEPDIR)/lib_libvserver_a-uint2str.Tpo" "lib/$(DEPDIR)/lib_libvserver_a-uint2str.Po"; else rm -f "lib/$(DEPDIR)/lib_libvserver_a-uint2str.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/uint2str.c' object='lib/lib_libvserver_a-uint2str.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='lib/$(DEPDIR)/lib_libvserver_a-uint2str.Po' tmpdepfile='lib/$(DEPDIR)/lib_libvserver_a-uint2str.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvserver_a-uint2str.o `test -f 'lib/uint2str.c' || echo '$(srcdir)/'`lib/uint2str.c + +lib/lib_libvserver_a-uint2str.obj: lib/uint2str.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/lib_libvserver_a-uint2str.obj -MD -MP -MF "lib/$(DEPDIR)/lib_libvserver_a-uint2str.Tpo" -c -o lib/lib_libvserver_a-uint2str.obj `if test -f 'lib/uint2str.c'; then $(CYGPATH_W) 'lib/uint2str.c'; else $(CYGPATH_W) '$(srcdir)/lib/uint2str.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "lib/$(DEPDIR)/lib_libvserver_a-uint2str.Tpo" "lib/$(DEPDIR)/lib_libvserver_a-uint2str.Po"; else rm -f "lib/$(DEPDIR)/lib_libvserver_a-uint2str.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/uint2str.c' object='lib/lib_libvserver_a-uint2str.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='lib/$(DEPDIR)/lib_libvserver_a-uint2str.Po' tmpdepfile='lib/$(DEPDIR)/lib_libvserver_a-uint2str.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libvserver_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/lib_libvserver_a-uint2str.obj `if test -f 'lib/uint2str.c'; then $(CYGPATH_W) 'lib/uint2str.c'; else $(CYGPATH_W) '$(srcdir)/lib/uint2str.c'; fi` + +src/capchroot.o: src/capchroot.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/capchroot.o -MD -MP -MF "src/$(DEPDIR)/capchroot.Tpo" -c -o src/capchroot.o `test -f 'src/capchroot.c' || echo '$(srcdir)/'`src/capchroot.c; \ +@am__fastdepCC_TRUE@ then mv -f "src/$(DEPDIR)/capchroot.Tpo" "src/$(DEPDIR)/capchroot.Po"; else rm -f "src/$(DEPDIR)/capchroot.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/capchroot.c' object='src/capchroot.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='src/$(DEPDIR)/capchroot.Po' tmpdepfile='src/$(DEPDIR)/capchroot.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/capchroot.o `test -f 'src/capchroot.c' || echo '$(srcdir)/'`src/capchroot.c + +src/capchroot.obj: src/capchroot.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/capchroot.obj -MD -MP -MF "src/$(DEPDIR)/capchroot.Tpo" -c -o src/capchroot.obj `if test -f 'src/capchroot.c'; then $(CYGPATH_W) 'src/capchroot.c'; else $(CYGPATH_W) '$(srcdir)/src/capchroot.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "src/$(DEPDIR)/capchroot.Tpo" "src/$(DEPDIR)/capchroot.Po"; else rm -f "src/$(DEPDIR)/capchroot.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/capchroot.c' object='src/capchroot.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='src/$(DEPDIR)/capchroot.Po' tmpdepfile='src/$(DEPDIR)/capchroot.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/capchroot.obj `if test -f 'src/capchroot.c'; then $(CYGPATH_W) 'src/capchroot.c'; else $(CYGPATH_W) '$(srcdir)/src/capchroot.c'; fi` + +src/chbind.o: src/chbind.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/chbind.o -MD -MP -MF "src/$(DEPDIR)/chbind.Tpo" -c -o src/chbind.o `test -f 'src/chbind.c' || echo '$(srcdir)/'`src/chbind.c; \ +@am__fastdepCC_TRUE@ then mv -f "src/$(DEPDIR)/chbind.Tpo" "src/$(DEPDIR)/chbind.Po"; else rm -f "src/$(DEPDIR)/chbind.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/chbind.c' object='src/chbind.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='src/$(DEPDIR)/chbind.Po' tmpdepfile='src/$(DEPDIR)/chbind.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/chbind.o `test -f 'src/chbind.c' || echo '$(srcdir)/'`src/chbind.c + +src/chbind.obj: src/chbind.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/chbind.obj -MD -MP -MF "src/$(DEPDIR)/chbind.Tpo" -c -o src/chbind.obj `if test -f 'src/chbind.c'; then $(CYGPATH_W) 'src/chbind.c'; else $(CYGPATH_W) '$(srcdir)/src/chbind.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "src/$(DEPDIR)/chbind.Tpo" "src/$(DEPDIR)/chbind.Po"; else rm -f "src/$(DEPDIR)/chbind.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/chbind.c' object='src/chbind.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='src/$(DEPDIR)/chbind.Po' tmpdepfile='src/$(DEPDIR)/chbind.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/chbind.obj `if test -f 'src/chbind.c'; then $(CYGPATH_W) 'src/chbind.c'; else $(CYGPATH_W) '$(srcdir)/src/chbind.c'; fi` + +src/chcontext.o: src/chcontext.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/chcontext.o -MD -MP -MF "src/$(DEPDIR)/chcontext.Tpo" -c -o src/chcontext.o `test -f 'src/chcontext.c' || echo '$(srcdir)/'`src/chcontext.c; \ +@am__fastdepCC_TRUE@ then mv -f "src/$(DEPDIR)/chcontext.Tpo" "src/$(DEPDIR)/chcontext.Po"; else rm -f "src/$(DEPDIR)/chcontext.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/chcontext.c' object='src/chcontext.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='src/$(DEPDIR)/chcontext.Po' tmpdepfile='src/$(DEPDIR)/chcontext.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/chcontext.o `test -f 'src/chcontext.c' || echo '$(srcdir)/'`src/chcontext.c + +src/chcontext.obj: src/chcontext.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/chcontext.obj -MD -MP -MF "src/$(DEPDIR)/chcontext.Tpo" -c -o src/chcontext.obj `if test -f 'src/chcontext.c'; then $(CYGPATH_W) 'src/chcontext.c'; else $(CYGPATH_W) '$(srcdir)/src/chcontext.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "src/$(DEPDIR)/chcontext.Tpo" "src/$(DEPDIR)/chcontext.Po"; else rm -f "src/$(DEPDIR)/chcontext.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/chcontext.c' object='src/chcontext.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='src/$(DEPDIR)/chcontext.Po' tmpdepfile='src/$(DEPDIR)/chcontext.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/chcontext.obj `if test -f 'src/chcontext.c'; then $(CYGPATH_W) 'src/chcontext.c'; else $(CYGPATH_W) '$(srcdir)/src/chcontext.c'; fi` + +src/fakerunlevel.o: src/fakerunlevel.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/fakerunlevel.o -MD -MP -MF "src/$(DEPDIR)/fakerunlevel.Tpo" -c -o src/fakerunlevel.o `test -f 'src/fakerunlevel.c' || echo '$(srcdir)/'`src/fakerunlevel.c; \ +@am__fastdepCC_TRUE@ then mv -f "src/$(DEPDIR)/fakerunlevel.Tpo" "src/$(DEPDIR)/fakerunlevel.Po"; else rm -f "src/$(DEPDIR)/fakerunlevel.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/fakerunlevel.c' object='src/fakerunlevel.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='src/$(DEPDIR)/fakerunlevel.Po' tmpdepfile='src/$(DEPDIR)/fakerunlevel.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/fakerunlevel.o `test -f 'src/fakerunlevel.c' || echo '$(srcdir)/'`src/fakerunlevel.c + +src/fakerunlevel.obj: src/fakerunlevel.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/fakerunlevel.obj -MD -MP -MF "src/$(DEPDIR)/fakerunlevel.Tpo" -c -o src/fakerunlevel.obj `if test -f 'src/fakerunlevel.c'; then $(CYGPATH_W) 'src/fakerunlevel.c'; else $(CYGPATH_W) '$(srcdir)/src/fakerunlevel.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "src/$(DEPDIR)/fakerunlevel.Tpo" "src/$(DEPDIR)/fakerunlevel.Po"; else rm -f "src/$(DEPDIR)/fakerunlevel.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/fakerunlevel.c' object='src/fakerunlevel.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='src/$(DEPDIR)/fakerunlevel.Po' tmpdepfile='src/$(DEPDIR)/fakerunlevel.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/fakerunlevel.obj `if test -f 'src/fakerunlevel.c'; then $(CYGPATH_W) 'src/fakerunlevel.c'; else $(CYGPATH_W) '$(srcdir)/src/fakerunlevel.c'; fi` + +src/filetime.o: src/filetime.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/filetime.o -MD -MP -MF "src/$(DEPDIR)/filetime.Tpo" -c -o src/filetime.o `test -f 'src/filetime.c' || echo '$(srcdir)/'`src/filetime.c; \ +@am__fastdepCC_TRUE@ then mv -f "src/$(DEPDIR)/filetime.Tpo" "src/$(DEPDIR)/filetime.Po"; else rm -f "src/$(DEPDIR)/filetime.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/filetime.c' object='src/filetime.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='src/$(DEPDIR)/filetime.Po' tmpdepfile='src/$(DEPDIR)/filetime.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/filetime.o `test -f 'src/filetime.c' || echo '$(srcdir)/'`src/filetime.c + +src/filetime.obj: src/filetime.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/filetime.obj -MD -MP -MF "src/$(DEPDIR)/filetime.Tpo" -c -o src/filetime.obj `if test -f 'src/filetime.c'; then $(CYGPATH_W) 'src/filetime.c'; else $(CYGPATH_W) '$(srcdir)/src/filetime.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "src/$(DEPDIR)/filetime.Tpo" "src/$(DEPDIR)/filetime.Po"; else rm -f "src/$(DEPDIR)/filetime.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/filetime.c' object='src/filetime.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='src/$(DEPDIR)/filetime.Po' tmpdepfile='src/$(DEPDIR)/filetime.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/filetime.obj `if test -f 'src/filetime.c'; then $(CYGPATH_W) 'src/filetime.c'; else $(CYGPATH_W) '$(srcdir)/src/filetime.c'; fi` + +src/ifspec.o: src/ifspec.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/ifspec.o -MD -MP -MF "src/$(DEPDIR)/ifspec.Tpo" -c -o src/ifspec.o `test -f 'src/ifspec.c' || echo '$(srcdir)/'`src/ifspec.c; \ +@am__fastdepCC_TRUE@ then mv -f "src/$(DEPDIR)/ifspec.Tpo" "src/$(DEPDIR)/ifspec.Po"; else rm -f "src/$(DEPDIR)/ifspec.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/ifspec.c' object='src/ifspec.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='src/$(DEPDIR)/ifspec.Po' tmpdepfile='src/$(DEPDIR)/ifspec.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/ifspec.o `test -f 'src/ifspec.c' || echo '$(srcdir)/'`src/ifspec.c + +src/ifspec.obj: src/ifspec.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/ifspec.obj -MD -MP -MF "src/$(DEPDIR)/ifspec.Tpo" -c -o src/ifspec.obj `if test -f 'src/ifspec.c'; then $(CYGPATH_W) 'src/ifspec.c'; else $(CYGPATH_W) '$(srcdir)/src/ifspec.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "src/$(DEPDIR)/ifspec.Tpo" "src/$(DEPDIR)/ifspec.Po"; else rm -f "src/$(DEPDIR)/ifspec.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/ifspec.c' object='src/ifspec.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='src/$(DEPDIR)/ifspec.Po' tmpdepfile='src/$(DEPDIR)/ifspec.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/ifspec.obj `if test -f 'src/ifspec.c'; then $(CYGPATH_W) 'src/ifspec.c'; else $(CYGPATH_W) '$(srcdir)/src/ifspec.c'; fi` + +src/listdevip.o: src/listdevip.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/listdevip.o -MD -MP -MF "src/$(DEPDIR)/listdevip.Tpo" -c -o src/listdevip.o `test -f 'src/listdevip.c' || echo '$(srcdir)/'`src/listdevip.c; \ +@am__fastdepCC_TRUE@ then mv -f "src/$(DEPDIR)/listdevip.Tpo" "src/$(DEPDIR)/listdevip.Po"; else rm -f "src/$(DEPDIR)/listdevip.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/listdevip.c' object='src/listdevip.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='src/$(DEPDIR)/listdevip.Po' tmpdepfile='src/$(DEPDIR)/listdevip.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/listdevip.o `test -f 'src/listdevip.c' || echo '$(srcdir)/'`src/listdevip.c + +src/listdevip.obj: src/listdevip.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/listdevip.obj -MD -MP -MF "src/$(DEPDIR)/listdevip.Tpo" -c -o src/listdevip.obj `if test -f 'src/listdevip.c'; then $(CYGPATH_W) 'src/listdevip.c'; else $(CYGPATH_W) '$(srcdir)/src/listdevip.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "src/$(DEPDIR)/listdevip.Tpo" "src/$(DEPDIR)/listdevip.Po"; else rm -f "src/$(DEPDIR)/listdevip.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/listdevip.c' object='src/listdevip.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='src/$(DEPDIR)/listdevip.Po' tmpdepfile='src/$(DEPDIR)/listdevip.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/listdevip.obj `if test -f 'src/listdevip.c'; then $(CYGPATH_W) 'src/listdevip.c'; else $(CYGPATH_W) '$(srcdir)/src/listdevip.c'; fi` + +src/parserpmdump.o: src/parserpmdump.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/parserpmdump.o -MD -MP -MF "src/$(DEPDIR)/parserpmdump.Tpo" -c -o src/parserpmdump.o `test -f 'src/parserpmdump.c' || echo '$(srcdir)/'`src/parserpmdump.c; \ +@am__fastdepCC_TRUE@ then mv -f "src/$(DEPDIR)/parserpmdump.Tpo" "src/$(DEPDIR)/parserpmdump.Po"; else rm -f "src/$(DEPDIR)/parserpmdump.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/parserpmdump.c' object='src/parserpmdump.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='src/$(DEPDIR)/parserpmdump.Po' tmpdepfile='src/$(DEPDIR)/parserpmdump.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/parserpmdump.o `test -f 'src/parserpmdump.c' || echo '$(srcdir)/'`src/parserpmdump.c + +src/parserpmdump.obj: src/parserpmdump.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/parserpmdump.obj -MD -MP -MF "src/$(DEPDIR)/parserpmdump.Tpo" -c -o src/parserpmdump.obj `if test -f 'src/parserpmdump.c'; then $(CYGPATH_W) 'src/parserpmdump.c'; else $(CYGPATH_W) '$(srcdir)/src/parserpmdump.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "src/$(DEPDIR)/parserpmdump.Tpo" "src/$(DEPDIR)/parserpmdump.Po"; else rm -f "src/$(DEPDIR)/parserpmdump.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/parserpmdump.c' object='src/parserpmdump.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='src/$(DEPDIR)/parserpmdump.Po' tmpdepfile='src/$(DEPDIR)/parserpmdump.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/parserpmdump.obj `if test -f 'src/parserpmdump.c'; then $(CYGPATH_W) 'src/parserpmdump.c'; else $(CYGPATH_W) '$(srcdir)/src/parserpmdump.c'; fi` + +src/readlink.o: src/readlink.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/readlink.o -MD -MP -MF "src/$(DEPDIR)/readlink.Tpo" -c -o src/readlink.o `test -f 'src/readlink.c' || echo '$(srcdir)/'`src/readlink.c; \ +@am__fastdepCC_TRUE@ then mv -f "src/$(DEPDIR)/readlink.Tpo" "src/$(DEPDIR)/readlink.Po"; else rm -f "src/$(DEPDIR)/readlink.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/readlink.c' object='src/readlink.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='src/$(DEPDIR)/readlink.Po' tmpdepfile='src/$(DEPDIR)/readlink.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/readlink.o `test -f 'src/readlink.c' || echo '$(srcdir)/'`src/readlink.c + +src/readlink.obj: src/readlink.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/readlink.obj -MD -MP -MF "src/$(DEPDIR)/readlink.Tpo" -c -o src/readlink.obj `if test -f 'src/readlink.c'; then $(CYGPATH_W) 'src/readlink.c'; else $(CYGPATH_W) '$(srcdir)/src/readlink.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "src/$(DEPDIR)/readlink.Tpo" "src/$(DEPDIR)/readlink.Po"; else rm -f "src/$(DEPDIR)/readlink.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/readlink.c' object='src/readlink.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='src/$(DEPDIR)/readlink.Po' tmpdepfile='src/$(DEPDIR)/readlink.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/readlink.obj `if test -f 'src/readlink.c'; then $(CYGPATH_W) 'src/readlink.c'; else $(CYGPATH_W) '$(srcdir)/src/readlink.c'; fi` + +src/src_rebootmgr-rebootmgr.o: src/rebootmgr.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_rebootmgr_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/src_rebootmgr-rebootmgr.o -MD -MP -MF "src/$(DEPDIR)/src_rebootmgr-rebootmgr.Tpo" -c -o src/src_rebootmgr-rebootmgr.o `test -f 'src/rebootmgr.c' || echo '$(srcdir)/'`src/rebootmgr.c; \ +@am__fastdepCC_TRUE@ then mv -f "src/$(DEPDIR)/src_rebootmgr-rebootmgr.Tpo" "src/$(DEPDIR)/src_rebootmgr-rebootmgr.Po"; else rm -f "src/$(DEPDIR)/src_rebootmgr-rebootmgr.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/rebootmgr.c' object='src/src_rebootmgr-rebootmgr.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='src/$(DEPDIR)/src_rebootmgr-rebootmgr.Po' tmpdepfile='src/$(DEPDIR)/src_rebootmgr-rebootmgr.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_rebootmgr_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/src_rebootmgr-rebootmgr.o `test -f 'src/rebootmgr.c' || echo '$(srcdir)/'`src/rebootmgr.c + +src/src_rebootmgr-rebootmgr.obj: src/rebootmgr.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_rebootmgr_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/src_rebootmgr-rebootmgr.obj -MD -MP -MF "src/$(DEPDIR)/src_rebootmgr-rebootmgr.Tpo" -c -o src/src_rebootmgr-rebootmgr.obj `if test -f 'src/rebootmgr.c'; then $(CYGPATH_W) 'src/rebootmgr.c'; else $(CYGPATH_W) '$(srcdir)/src/rebootmgr.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "src/$(DEPDIR)/src_rebootmgr-rebootmgr.Tpo" "src/$(DEPDIR)/src_rebootmgr-rebootmgr.Po"; else rm -f "src/$(DEPDIR)/src_rebootmgr-rebootmgr.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/rebootmgr.c' object='src/src_rebootmgr-rebootmgr.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='src/$(DEPDIR)/src_rebootmgr-rebootmgr.Po' tmpdepfile='src/$(DEPDIR)/src_rebootmgr-rebootmgr.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_rebootmgr_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/src_rebootmgr-rebootmgr.obj `if test -f 'src/rebootmgr.c'; then $(CYGPATH_W) 'src/rebootmgr.c'; else $(CYGPATH_W) '$(srcdir)/src/rebootmgr.c'; fi` + +src/reducecap.o: src/reducecap.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/reducecap.o -MD -MP -MF "src/$(DEPDIR)/reducecap.Tpo" -c -o src/reducecap.o `test -f 'src/reducecap.c' || echo '$(srcdir)/'`src/reducecap.c; \ +@am__fastdepCC_TRUE@ then mv -f "src/$(DEPDIR)/reducecap.Tpo" "src/$(DEPDIR)/reducecap.Po"; else rm -f "src/$(DEPDIR)/reducecap.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/reducecap.c' object='src/reducecap.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='src/$(DEPDIR)/reducecap.Po' tmpdepfile='src/$(DEPDIR)/reducecap.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/reducecap.o `test -f 'src/reducecap.c' || echo '$(srcdir)/'`src/reducecap.c + +src/reducecap.obj: src/reducecap.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/reducecap.obj -MD -MP -MF "src/$(DEPDIR)/reducecap.Tpo" -c -o src/reducecap.obj `if test -f 'src/reducecap.c'; then $(CYGPATH_W) 'src/reducecap.c'; else $(CYGPATH_W) '$(srcdir)/src/reducecap.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "src/$(DEPDIR)/reducecap.Tpo" "src/$(DEPDIR)/reducecap.Po"; else rm -f "src/$(DEPDIR)/reducecap.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/reducecap.c' object='src/reducecap.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='src/$(DEPDIR)/reducecap.Po' tmpdepfile='src/$(DEPDIR)/reducecap.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/reducecap.obj `if test -f 'src/reducecap.c'; then $(CYGPATH_W) 'src/reducecap.c'; else $(CYGPATH_W) '$(srcdir)/src/reducecap.c'; fi` + +src/showattr.o: src/showattr.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/showattr.o -MD -MP -MF "src/$(DEPDIR)/showattr.Tpo" -c -o src/showattr.o `test -f 'src/showattr.c' || echo '$(srcdir)/'`src/showattr.c; \ +@am__fastdepCC_TRUE@ then mv -f "src/$(DEPDIR)/showattr.Tpo" "src/$(DEPDIR)/showattr.Po"; else rm -f "src/$(DEPDIR)/showattr.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/showattr.c' object='src/showattr.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='src/$(DEPDIR)/showattr.Po' tmpdepfile='src/$(DEPDIR)/showattr.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/showattr.o `test -f 'src/showattr.c' || echo '$(srcdir)/'`src/showattr.c + +src/showattr.obj: src/showattr.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/showattr.obj -MD -MP -MF "src/$(DEPDIR)/showattr.Tpo" -c -o src/showattr.obj `if test -f 'src/showattr.c'; then $(CYGPATH_W) 'src/showattr.c'; else $(CYGPATH_W) '$(srcdir)/src/showattr.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "src/$(DEPDIR)/showattr.Tpo" "src/$(DEPDIR)/showattr.Po"; else rm -f "src/$(DEPDIR)/showattr.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/showattr.c' object='src/showattr.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='src/$(DEPDIR)/showattr.Po' tmpdepfile='src/$(DEPDIR)/showattr.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/showattr.obj `if test -f 'src/showattr.c'; then $(CYGPATH_W) 'src/showattr.c'; else $(CYGPATH_W) '$(srcdir)/src/showattr.c'; fi` + +src/showperm.o: src/showperm.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/showperm.o -MD -MP -MF "src/$(DEPDIR)/showperm.Tpo" -c -o src/showperm.o `test -f 'src/showperm.c' || echo '$(srcdir)/'`src/showperm.c; \ +@am__fastdepCC_TRUE@ then mv -f "src/$(DEPDIR)/showperm.Tpo" "src/$(DEPDIR)/showperm.Po"; else rm -f "src/$(DEPDIR)/showperm.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/showperm.c' object='src/showperm.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='src/$(DEPDIR)/showperm.Po' tmpdepfile='src/$(DEPDIR)/showperm.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/showperm.o `test -f 'src/showperm.c' || echo '$(srcdir)/'`src/showperm.c + +src/showperm.obj: src/showperm.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/showperm.obj -MD -MP -MF "src/$(DEPDIR)/showperm.Tpo" -c -o src/showperm.obj `if test -f 'src/showperm.c'; then $(CYGPATH_W) 'src/showperm.c'; else $(CYGPATH_W) '$(srcdir)/src/showperm.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "src/$(DEPDIR)/showperm.Tpo" "src/$(DEPDIR)/showperm.Po"; else rm -f "src/$(DEPDIR)/showperm.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/showperm.c' object='src/showperm.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='src/$(DEPDIR)/showperm.Po' tmpdepfile='src/$(DEPDIR)/showperm.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/showperm.obj `if test -f 'src/showperm.c'; then $(CYGPATH_W) 'src/showperm.c'; else $(CYGPATH_W) '$(srcdir)/src/showperm.c'; fi` + +src/vdu.o: src/vdu.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/vdu.o -MD -MP -MF "src/$(DEPDIR)/vdu.Tpo" -c -o src/vdu.o `test -f 'src/vdu.c' || echo '$(srcdir)/'`src/vdu.c; \ +@am__fastdepCC_TRUE@ then mv -f "src/$(DEPDIR)/vdu.Tpo" "src/$(DEPDIR)/vdu.Po"; else rm -f "src/$(DEPDIR)/vdu.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/vdu.c' object='src/vdu.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='src/$(DEPDIR)/vdu.Po' tmpdepfile='src/$(DEPDIR)/vdu.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/vdu.o `test -f 'src/vdu.c' || echo '$(srcdir)/'`src/vdu.c + +src/vdu.obj: src/vdu.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/vdu.obj -MD -MP -MF "src/$(DEPDIR)/vdu.Tpo" -c -o src/vdu.obj `if test -f 'src/vdu.c'; then $(CYGPATH_W) 'src/vdu.c'; else $(CYGPATH_W) '$(srcdir)/src/vdu.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "src/$(DEPDIR)/vdu.Tpo" "src/$(DEPDIR)/vdu.Po"; else rm -f "src/$(DEPDIR)/vdu.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/vdu.c' object='src/vdu.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='src/$(DEPDIR)/vdu.Po' tmpdepfile='src/$(DEPDIR)/vdu.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/vdu.obj `if test -f 'src/vdu.c'; then $(CYGPATH_W) 'src/vdu.c'; else $(CYGPATH_W) '$(srcdir)/src/vdu.c'; fi` + +src/src_vkill-vkill.o: src/vkill.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_vkill_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/src_vkill-vkill.o -MD -MP -MF "src/$(DEPDIR)/src_vkill-vkill.Tpo" -c -o src/src_vkill-vkill.o `test -f 'src/vkill.c' || echo '$(srcdir)/'`src/vkill.c; \ +@am__fastdepCC_TRUE@ then mv -f "src/$(DEPDIR)/src_vkill-vkill.Tpo" "src/$(DEPDIR)/src_vkill-vkill.Po"; else rm -f "src/$(DEPDIR)/src_vkill-vkill.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/vkill.c' object='src/src_vkill-vkill.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='src/$(DEPDIR)/src_vkill-vkill.Po' tmpdepfile='src/$(DEPDIR)/src_vkill-vkill.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_vkill_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/src_vkill-vkill.o `test -f 'src/vkill.c' || echo '$(srcdir)/'`src/vkill.c + +src/src_vkill-vkill.obj: src/vkill.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_vkill_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/src_vkill-vkill.obj -MD -MP -MF "src/$(DEPDIR)/src_vkill-vkill.Tpo" -c -o src/src_vkill-vkill.obj `if test -f 'src/vkill.c'; then $(CYGPATH_W) 'src/vkill.c'; else $(CYGPATH_W) '$(srcdir)/src/vkill.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "src/$(DEPDIR)/src_vkill-vkill.Tpo" "src/$(DEPDIR)/src_vkill-vkill.Po"; else rm -f "src/$(DEPDIR)/src_vkill-vkill.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/vkill.c' object='src/src_vkill-vkill.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='src/$(DEPDIR)/src_vkill-vkill.Po' tmpdepfile='src/$(DEPDIR)/src_vkill-vkill.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_vkill_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/src_vkill-vkill.obj `if test -f 'src/vkill.c'; then $(CYGPATH_W) 'src/vkill.c'; else $(CYGPATH_W) '$(srcdir)/src/vkill.c'; fi` + +src/vlimit.o: src/vlimit.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/vlimit.o -MD -MP -MF "src/$(DEPDIR)/vlimit.Tpo" -c -o src/vlimit.o `test -f 'src/vlimit.c' || echo '$(srcdir)/'`src/vlimit.c; \ +@am__fastdepCC_TRUE@ then mv -f "src/$(DEPDIR)/vlimit.Tpo" "src/$(DEPDIR)/vlimit.Po"; else rm -f "src/$(DEPDIR)/vlimit.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/vlimit.c' object='src/vlimit.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='src/$(DEPDIR)/vlimit.Po' tmpdepfile='src/$(DEPDIR)/vlimit.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/vlimit.o `test -f 'src/vlimit.c' || echo '$(srcdir)/'`src/vlimit.c + +src/vlimit.obj: src/vlimit.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/vlimit.obj -MD -MP -MF "src/$(DEPDIR)/vlimit.Tpo" -c -o src/vlimit.obj `if test -f 'src/vlimit.c'; then $(CYGPATH_W) 'src/vlimit.c'; else $(CYGPATH_W) '$(srcdir)/src/vlimit.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "src/$(DEPDIR)/vlimit.Tpo" "src/$(DEPDIR)/vlimit.Po"; else rm -f "src/$(DEPDIR)/vlimit.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/vlimit.c' object='src/vlimit.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='src/$(DEPDIR)/vlimit.Po' tmpdepfile='src/$(DEPDIR)/vlimit.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/vlimit.obj `if test -f 'src/vlimit.c'; then $(CYGPATH_W) 'src/vlimit.c'; else $(CYGPATH_W) '$(srcdir)/src/vlimit.c'; fi` + +src/vreboot.o: src/vreboot.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/vreboot.o -MD -MP -MF "src/$(DEPDIR)/vreboot.Tpo" -c -o src/vreboot.o `test -f 'src/vreboot.c' || echo '$(srcdir)/'`src/vreboot.c; \ +@am__fastdepCC_TRUE@ then mv -f "src/$(DEPDIR)/vreboot.Tpo" "src/$(DEPDIR)/vreboot.Po"; else rm -f "src/$(DEPDIR)/vreboot.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/vreboot.c' object='src/vreboot.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='src/$(DEPDIR)/vreboot.Po' tmpdepfile='src/$(DEPDIR)/vreboot.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/vreboot.o `test -f 'src/vreboot.c' || echo '$(srcdir)/'`src/vreboot.c + +src/vreboot.obj: src/vreboot.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/vreboot.obj -MD -MP -MF "src/$(DEPDIR)/vreboot.Tpo" -c -o src/vreboot.obj `if test -f 'src/vreboot.c'; then $(CYGPATH_W) 'src/vreboot.c'; else $(CYGPATH_W) '$(srcdir)/src/vreboot.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "src/$(DEPDIR)/vreboot.Tpo" "src/$(DEPDIR)/vreboot.Po"; else rm -f "src/$(DEPDIR)/vreboot.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/vreboot.c' object='src/vreboot.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='src/$(DEPDIR)/vreboot.Po' tmpdepfile='src/$(DEPDIR)/vreboot.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/vreboot.obj `if test -f 'src/vreboot.c'; then $(CYGPATH_W) 'src/vreboot.c'; else $(CYGPATH_W) '$(srcdir)/src/vreboot.c'; fi` + +src/vserver-stat.o: src/vserver-stat.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/vserver-stat.o -MD -MP -MF "src/$(DEPDIR)/vserver-stat.Tpo" -c -o src/vserver-stat.o `test -f 'src/vserver-stat.c' || echo '$(srcdir)/'`src/vserver-stat.c; \ +@am__fastdepCC_TRUE@ then mv -f "src/$(DEPDIR)/vserver-stat.Tpo" "src/$(DEPDIR)/vserver-stat.Po"; else rm -f "src/$(DEPDIR)/vserver-stat.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/vserver-stat.c' object='src/vserver-stat.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='src/$(DEPDIR)/vserver-stat.Po' tmpdepfile='src/$(DEPDIR)/vserver-stat.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/vserver-stat.o `test -f 'src/vserver-stat.c' || echo '$(srcdir)/'`src/vserver-stat.c + +src/vserver-stat.obj: src/vserver-stat.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/vserver-stat.obj -MD -MP -MF "src/$(DEPDIR)/vserver-stat.Tpo" -c -o src/vserver-stat.obj `if test -f 'src/vserver-stat.c'; then $(CYGPATH_W) 'src/vserver-stat.c'; else $(CYGPATH_W) '$(srcdir)/src/vserver-stat.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "src/$(DEPDIR)/vserver-stat.Tpo" "src/$(DEPDIR)/vserver-stat.Po"; else rm -f "src/$(DEPDIR)/vserver-stat.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/vserver-stat.c' object='src/vserver-stat.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='src/$(DEPDIR)/vserver-stat.Po' tmpdepfile='src/$(DEPDIR)/vserver-stat.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/vserver-stat.obj `if test -f 'src/vserver-stat.c'; then $(CYGPATH_W) 'src/vserver-stat.c'; else $(CYGPATH_W) '$(srcdir)/src/vserver-stat.c'; fi` + +.cc.o: +@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cc.obj: +@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +src/vbuild.o: src/vbuild.cc +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/vbuild.o -MD -MP -MF "src/$(DEPDIR)/vbuild.Tpo" -c -o src/vbuild.o `test -f 'src/vbuild.cc' || echo '$(srcdir)/'`src/vbuild.cc; \ +@am__fastdepCXX_TRUE@ then mv -f "src/$(DEPDIR)/vbuild.Tpo" "src/$(DEPDIR)/vbuild.Po"; else rm -f "src/$(DEPDIR)/vbuild.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/vbuild.cc' object='src/vbuild.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='src/$(DEPDIR)/vbuild.Po' tmpdepfile='src/$(DEPDIR)/vbuild.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/vbuild.o `test -f 'src/vbuild.cc' || echo '$(srcdir)/'`src/vbuild.cc + +src/vbuild.obj: src/vbuild.cc +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/vbuild.obj -MD -MP -MF "src/$(DEPDIR)/vbuild.Tpo" -c -o src/vbuild.obj `if test -f 'src/vbuild.cc'; then $(CYGPATH_W) 'src/vbuild.cc'; else $(CYGPATH_W) '$(srcdir)/src/vbuild.cc'; fi`; \ +@am__fastdepCXX_TRUE@ then mv -f "src/$(DEPDIR)/vbuild.Tpo" "src/$(DEPDIR)/vbuild.Po"; else rm -f "src/$(DEPDIR)/vbuild.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/vbuild.cc' object='src/vbuild.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='src/$(DEPDIR)/vbuild.Po' tmpdepfile='src/$(DEPDIR)/vbuild.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/vbuild.obj `if test -f 'src/vbuild.cc'; then $(CYGPATH_W) 'src/vbuild.cc'; else $(CYGPATH_W) '$(srcdir)/src/vbuild.cc'; fi` + +src/vutil.o: src/vutil.cc +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/vutil.o -MD -MP -MF "src/$(DEPDIR)/vutil.Tpo" -c -o src/vutil.o `test -f 'src/vutil.cc' || echo '$(srcdir)/'`src/vutil.cc; \ +@am__fastdepCXX_TRUE@ then mv -f "src/$(DEPDIR)/vutil.Tpo" "src/$(DEPDIR)/vutil.Po"; else rm -f "src/$(DEPDIR)/vutil.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/vutil.cc' object='src/vutil.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='src/$(DEPDIR)/vutil.Po' tmpdepfile='src/$(DEPDIR)/vutil.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/vutil.o `test -f 'src/vutil.cc' || echo '$(srcdir)/'`src/vutil.cc + +src/vutil.obj: src/vutil.cc +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/vutil.obj -MD -MP -MF "src/$(DEPDIR)/vutil.Tpo" -c -o src/vutil.obj `if test -f 'src/vutil.cc'; then $(CYGPATH_W) 'src/vutil.cc'; else $(CYGPATH_W) '$(srcdir)/src/vutil.cc'; fi`; \ +@am__fastdepCXX_TRUE@ then mv -f "src/$(DEPDIR)/vutil.Tpo" "src/$(DEPDIR)/vutil.Po"; else rm -f "src/$(DEPDIR)/vutil.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/vutil.cc' object='src/vutil.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='src/$(DEPDIR)/vutil.Po' tmpdepfile='src/$(DEPDIR)/vutil.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/vutil.obj `if test -f 'src/vutil.cc'; then $(CYGPATH_W) 'src/vutil.cc'; else $(CYGPATH_W) '$(srcdir)/src/vutil.cc'; fi` + +src/vcheck.o: src/vcheck.cc +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/vcheck.o -MD -MP -MF "src/$(DEPDIR)/vcheck.Tpo" -c -o src/vcheck.o `test -f 'src/vcheck.cc' || echo '$(srcdir)/'`src/vcheck.cc; \ +@am__fastdepCXX_TRUE@ then mv -f "src/$(DEPDIR)/vcheck.Tpo" "src/$(DEPDIR)/vcheck.Po"; else rm -f "src/$(DEPDIR)/vcheck.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/vcheck.cc' object='src/vcheck.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='src/$(DEPDIR)/vcheck.Po' tmpdepfile='src/$(DEPDIR)/vcheck.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/vcheck.o `test -f 'src/vcheck.cc' || echo '$(srcdir)/'`src/vcheck.cc + +src/vcheck.obj: src/vcheck.cc +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/vcheck.obj -MD -MP -MF "src/$(DEPDIR)/vcheck.Tpo" -c -o src/vcheck.obj `if test -f 'src/vcheck.cc'; then $(CYGPATH_W) 'src/vcheck.cc'; else $(CYGPATH_W) '$(srcdir)/src/vcheck.cc'; fi`; \ +@am__fastdepCXX_TRUE@ then mv -f "src/$(DEPDIR)/vcheck.Tpo" "src/$(DEPDIR)/vcheck.Po"; else rm -f "src/$(DEPDIR)/vcheck.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/vcheck.cc' object='src/vcheck.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='src/$(DEPDIR)/vcheck.Po' tmpdepfile='src/$(DEPDIR)/vcheck.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/vcheck.obj `if test -f 'src/vcheck.cc'; then $(CYGPATH_W) 'src/vcheck.cc'; else $(CYGPATH_W) '$(srcdir)/src/vcheck.cc'; fi` + +src/vfiles.o: src/vfiles.cc +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/vfiles.o -MD -MP -MF "src/$(DEPDIR)/vfiles.Tpo" -c -o src/vfiles.o `test -f 'src/vfiles.cc' || echo '$(srcdir)/'`src/vfiles.cc; \ +@am__fastdepCXX_TRUE@ then mv -f "src/$(DEPDIR)/vfiles.Tpo" "src/$(DEPDIR)/vfiles.Po"; else rm -f "src/$(DEPDIR)/vfiles.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/vfiles.cc' object='src/vfiles.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='src/$(DEPDIR)/vfiles.Po' tmpdepfile='src/$(DEPDIR)/vfiles.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/vfiles.o `test -f 'src/vfiles.cc' || echo '$(srcdir)/'`src/vfiles.cc + +src/vfiles.obj: src/vfiles.cc +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/vfiles.obj -MD -MP -MF "src/$(DEPDIR)/vfiles.Tpo" -c -o src/vfiles.obj `if test -f 'src/vfiles.cc'; then $(CYGPATH_W) 'src/vfiles.cc'; else $(CYGPATH_W) '$(srcdir)/src/vfiles.cc'; fi`; \ +@am__fastdepCXX_TRUE@ then mv -f "src/$(DEPDIR)/vfiles.Tpo" "src/$(DEPDIR)/vfiles.Po"; else rm -f "src/$(DEPDIR)/vfiles.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/vfiles.cc' object='src/vfiles.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='src/$(DEPDIR)/vfiles.Po' tmpdepfile='src/$(DEPDIR)/vfiles.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/vfiles.obj `if test -f 'src/vfiles.cc'; then $(CYGPATH_W) 'src/vfiles.cc'; else $(CYGPATH_W) '$(srcdir)/src/vfiles.cc'; fi` + +src/src_vunify-vunify.o: src/vunify.cc +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_vunify_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/src_vunify-vunify.o -MD -MP -MF "src/$(DEPDIR)/src_vunify-vunify.Tpo" -c -o src/src_vunify-vunify.o `test -f 'src/vunify.cc' || echo '$(srcdir)/'`src/vunify.cc; \ +@am__fastdepCXX_TRUE@ then mv -f "src/$(DEPDIR)/src_vunify-vunify.Tpo" "src/$(DEPDIR)/src_vunify-vunify.Po"; else rm -f "src/$(DEPDIR)/src_vunify-vunify.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/vunify.cc' object='src/src_vunify-vunify.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='src/$(DEPDIR)/src_vunify-vunify.Po' tmpdepfile='src/$(DEPDIR)/src_vunify-vunify.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_vunify_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/src_vunify-vunify.o `test -f 'src/vunify.cc' || echo '$(srcdir)/'`src/vunify.cc + +src/src_vunify-vunify.obj: src/vunify.cc +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_vunify_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/src_vunify-vunify.obj -MD -MP -MF "src/$(DEPDIR)/src_vunify-vunify.Tpo" -c -o src/src_vunify-vunify.obj `if test -f 'src/vunify.cc'; then $(CYGPATH_W) 'src/vunify.cc'; else $(CYGPATH_W) '$(srcdir)/src/vunify.cc'; fi`; \ +@am__fastdepCXX_TRUE@ then mv -f "src/$(DEPDIR)/src_vunify-vunify.Tpo" "src/$(DEPDIR)/src_vunify-vunify.Po"; else rm -f "src/$(DEPDIR)/src_vunify-vunify.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/vunify.cc' object='src/src_vunify-vunify.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='src/$(DEPDIR)/src_vunify-vunify.Po' tmpdepfile='src/$(DEPDIR)/src_vunify-vunify.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_vunify_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/src_vunify-vunify.obj `if test -f 'src/vunify.cc'; then $(CYGPATH_W) 'src/vunify.cc'; else $(CYGPATH_W) '$(srcdir)/src/vunify.cc'; fi` + +src/src_vunify-vutil.o: src/vutil.cc +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_vunify_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/src_vunify-vutil.o -MD -MP -MF "src/$(DEPDIR)/src_vunify-vutil.Tpo" -c -o src/src_vunify-vutil.o `test -f 'src/vutil.cc' || echo '$(srcdir)/'`src/vutil.cc; \ +@am__fastdepCXX_TRUE@ then mv -f "src/$(DEPDIR)/src_vunify-vutil.Tpo" "src/$(DEPDIR)/src_vunify-vutil.Po"; else rm -f "src/$(DEPDIR)/src_vunify-vutil.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/vutil.cc' object='src/src_vunify-vutil.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='src/$(DEPDIR)/src_vunify-vutil.Po' tmpdepfile='src/$(DEPDIR)/src_vunify-vutil.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_vunify_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/src_vunify-vutil.o `test -f 'src/vutil.cc' || echo '$(srcdir)/'`src/vutil.cc + +src/src_vunify-vutil.obj: src/vutil.cc +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_vunify_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT src/src_vunify-vutil.obj -MD -MP -MF "src/$(DEPDIR)/src_vunify-vutil.Tpo" -c -o src/src_vunify-vutil.obj `if test -f 'src/vutil.cc'; then $(CYGPATH_W) 'src/vutil.cc'; else $(CYGPATH_W) '$(srcdir)/src/vutil.cc'; fi`; \ +@am__fastdepCXX_TRUE@ then mv -f "src/$(DEPDIR)/src_vunify-vutil.Tpo" "src/$(DEPDIR)/src_vunify-vutil.Po"; else rm -f "src/$(DEPDIR)/src_vunify-vutil.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='src/vutil.cc' object='src/src_vunify-vutil.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='src/$(DEPDIR)/src_vunify-vutil.Po' tmpdepfile='src/$(DEPDIR)/src_vunify-vutil.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_vunify_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o src/src_vunify-vutil.obj `if test -f 'src/vutil.cc'; then $(CYGPATH_W) 'src/vutil.cc'; else $(CYGPATH_W) '$(srcdir)/src/vutil.cc'; fi` + +tests/escaperoot.o: tests/escaperoot.cc +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tests/escaperoot.o -MD -MP -MF "tests/$(DEPDIR)/escaperoot.Tpo" -c -o tests/escaperoot.o `test -f 'tests/escaperoot.cc' || echo '$(srcdir)/'`tests/escaperoot.cc; \ +@am__fastdepCXX_TRUE@ then mv -f "tests/$(DEPDIR)/escaperoot.Tpo" "tests/$(DEPDIR)/escaperoot.Po"; else rm -f "tests/$(DEPDIR)/escaperoot.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='tests/escaperoot.cc' object='tests/escaperoot.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='tests/$(DEPDIR)/escaperoot.Po' tmpdepfile='tests/$(DEPDIR)/escaperoot.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tests/escaperoot.o `test -f 'tests/escaperoot.cc' || echo '$(srcdir)/'`tests/escaperoot.cc + +tests/escaperoot.obj: tests/escaperoot.cc +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tests/escaperoot.obj -MD -MP -MF "tests/$(DEPDIR)/escaperoot.Tpo" -c -o tests/escaperoot.obj `if test -f 'tests/escaperoot.cc'; then $(CYGPATH_W) 'tests/escaperoot.cc'; else $(CYGPATH_W) '$(srcdir)/tests/escaperoot.cc'; fi`; \ +@am__fastdepCXX_TRUE@ then mv -f "tests/$(DEPDIR)/escaperoot.Tpo" "tests/$(DEPDIR)/escaperoot.Po"; else rm -f "tests/$(DEPDIR)/escaperoot.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='tests/escaperoot.cc' object='tests/escaperoot.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='tests/$(DEPDIR)/escaperoot.Po' tmpdepfile='tests/$(DEPDIR)/escaperoot.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tests/escaperoot.obj `if test -f 'tests/escaperoot.cc'; then $(CYGPATH_W) 'tests/escaperoot.cc'; else $(CYGPATH_W) '$(srcdir)/tests/escaperoot.cc'; fi` + +tests/forkbomb.o: tests/forkbomb.cc +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tests/forkbomb.o -MD -MP -MF "tests/$(DEPDIR)/forkbomb.Tpo" -c -o tests/forkbomb.o `test -f 'tests/forkbomb.cc' || echo '$(srcdir)/'`tests/forkbomb.cc; \ +@am__fastdepCXX_TRUE@ then mv -f "tests/$(DEPDIR)/forkbomb.Tpo" "tests/$(DEPDIR)/forkbomb.Po"; else rm -f "tests/$(DEPDIR)/forkbomb.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='tests/forkbomb.cc' object='tests/forkbomb.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='tests/$(DEPDIR)/forkbomb.Po' tmpdepfile='tests/$(DEPDIR)/forkbomb.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tests/forkbomb.o `test -f 'tests/forkbomb.cc' || echo '$(srcdir)/'`tests/forkbomb.cc + +tests/forkbomb.obj: tests/forkbomb.cc +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tests/forkbomb.obj -MD -MP -MF "tests/$(DEPDIR)/forkbomb.Tpo" -c -o tests/forkbomb.obj `if test -f 'tests/forkbomb.cc'; then $(CYGPATH_W) 'tests/forkbomb.cc'; else $(CYGPATH_W) '$(srcdir)/tests/forkbomb.cc'; fi`; \ +@am__fastdepCXX_TRUE@ then mv -f "tests/$(DEPDIR)/forkbomb.Tpo" "tests/$(DEPDIR)/forkbomb.Po"; else rm -f "tests/$(DEPDIR)/forkbomb.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='tests/forkbomb.cc' object='tests/forkbomb.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='tests/$(DEPDIR)/forkbomb.Po' tmpdepfile='tests/$(DEPDIR)/forkbomb.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tests/forkbomb.obj `if test -f 'tests/forkbomb.cc'; then $(CYGPATH_W) 'tests/forkbomb.cc'; else $(CYGPATH_W) '$(srcdir)/tests/forkbomb.cc'; fi` + +tests/testipc.o: tests/testipc.cc +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tests/testipc.o -MD -MP -MF "tests/$(DEPDIR)/testipc.Tpo" -c -o tests/testipc.o `test -f 'tests/testipc.cc' || echo '$(srcdir)/'`tests/testipc.cc; \ +@am__fastdepCXX_TRUE@ then mv -f "tests/$(DEPDIR)/testipc.Tpo" "tests/$(DEPDIR)/testipc.Po"; else rm -f "tests/$(DEPDIR)/testipc.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='tests/testipc.cc' object='tests/testipc.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='tests/$(DEPDIR)/testipc.Po' tmpdepfile='tests/$(DEPDIR)/testipc.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tests/testipc.o `test -f 'tests/testipc.cc' || echo '$(srcdir)/'`tests/testipc.cc + +tests/testipc.obj: tests/testipc.cc +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tests/testipc.obj -MD -MP -MF "tests/$(DEPDIR)/testipc.Tpo" -c -o tests/testipc.obj `if test -f 'tests/testipc.cc'; then $(CYGPATH_W) 'tests/testipc.cc'; else $(CYGPATH_W) '$(srcdir)/tests/testipc.cc'; fi`; \ +@am__fastdepCXX_TRUE@ then mv -f "tests/$(DEPDIR)/testipc.Tpo" "tests/$(DEPDIR)/testipc.Po"; else rm -f "tests/$(DEPDIR)/testipc.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='tests/testipc.cc' object='tests/testipc.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='tests/$(DEPDIR)/testipc.Po' tmpdepfile='tests/$(DEPDIR)/testipc.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tests/testipc.obj `if test -f 'tests/testipc.cc'; then $(CYGPATH_W) 'tests/testipc.cc'; else $(CYGPATH_W) '$(srcdir)/tests/testipc.cc'; fi` + +tests/testlimit.o: tests/testlimit.cc +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tests/testlimit.o -MD -MP -MF "tests/$(DEPDIR)/testlimit.Tpo" -c -o tests/testlimit.o `test -f 'tests/testlimit.cc' || echo '$(srcdir)/'`tests/testlimit.cc; \ +@am__fastdepCXX_TRUE@ then mv -f "tests/$(DEPDIR)/testlimit.Tpo" "tests/$(DEPDIR)/testlimit.Po"; else rm -f "tests/$(DEPDIR)/testlimit.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='tests/testlimit.cc' object='tests/testlimit.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='tests/$(DEPDIR)/testlimit.Po' tmpdepfile='tests/$(DEPDIR)/testlimit.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tests/testlimit.o `test -f 'tests/testlimit.cc' || echo '$(srcdir)/'`tests/testlimit.cc + +tests/testlimit.obj: tests/testlimit.cc +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tests/testlimit.obj -MD -MP -MF "tests/$(DEPDIR)/testlimit.Tpo" -c -o tests/testlimit.obj `if test -f 'tests/testlimit.cc'; then $(CYGPATH_W) 'tests/testlimit.cc'; else $(CYGPATH_W) '$(srcdir)/tests/testlimit.cc'; fi`; \ +@am__fastdepCXX_TRUE@ then mv -f "tests/$(DEPDIR)/testlimit.Tpo" "tests/$(DEPDIR)/testlimit.Po"; else rm -f "tests/$(DEPDIR)/testlimit.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='tests/testlimit.cc' object='tests/testlimit.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='tests/$(DEPDIR)/testlimit.Po' tmpdepfile='tests/$(DEPDIR)/testlimit.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tests/testlimit.obj `if test -f 'tests/testlimit.cc'; then $(CYGPATH_W) 'tests/testlimit.cc'; else $(CYGPATH_W) '$(srcdir)/tests/testlimit.cc'; fi` + +tests/testopenf.o: tests/testopenf.cc +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tests/testopenf.o -MD -MP -MF "tests/$(DEPDIR)/testopenf.Tpo" -c -o tests/testopenf.o `test -f 'tests/testopenf.cc' || echo '$(srcdir)/'`tests/testopenf.cc; \ +@am__fastdepCXX_TRUE@ then mv -f "tests/$(DEPDIR)/testopenf.Tpo" "tests/$(DEPDIR)/testopenf.Po"; else rm -f "tests/$(DEPDIR)/testopenf.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='tests/testopenf.cc' object='tests/testopenf.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='tests/$(DEPDIR)/testopenf.Po' tmpdepfile='tests/$(DEPDIR)/testopenf.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tests/testopenf.o `test -f 'tests/testopenf.cc' || echo '$(srcdir)/'`tests/testopenf.cc + +tests/testopenf.obj: tests/testopenf.cc +@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tests/testopenf.obj -MD -MP -MF "tests/$(DEPDIR)/testopenf.Tpo" -c -o tests/testopenf.obj `if test -f 'tests/testopenf.cc'; then $(CYGPATH_W) 'tests/testopenf.cc'; else $(CYGPATH_W) '$(srcdir)/tests/testopenf.cc'; fi`; \ +@am__fastdepCXX_TRUE@ then mv -f "tests/$(DEPDIR)/testopenf.Tpo" "tests/$(DEPDIR)/testopenf.Po"; else rm -f "tests/$(DEPDIR)/testopenf.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='tests/testopenf.cc' object='tests/testopenf.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='tests/$(DEPDIR)/testopenf.Po' tmpdepfile='tests/$(DEPDIR)/testopenf.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tests/testopenf.obj `if test -f 'tests/testopenf.cc'; then $(CYGPATH_W) 'tests/testopenf.cc'; else $(CYGPATH_W) '$(srcdir)/tests/testopenf.cc'; fi` +uninstall-info-am: +install-man8: $(man8_MANS) $(man_MANS) + @$(NORMAL_INSTALL) + $(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 +install-pkglibDATA: $(pkglib_DATA) + @$(NORMAL_INSTALL) + $(mkdir_p) $(DESTDIR)$(pkglibdir) + @list='$(pkglib_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(pkglibDATA_INSTALL) $$d$$p $(DESTDIR)$(pkglibdir)/$$f"; \ + $(pkglibDATA_INSTALL) $$d$$p $(DESTDIR)$(pkglibdir)/$$f; \ + done + +uninstall-pkglibDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_DATA)'; for p in $$list; do \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " rm -f $(DESTDIR)$(pkglibdir)/$$f"; \ + rm -f $(DESTDIR)$(pkglibdir)/$$f; \ + done +install-scriptscfgDATA: $(scriptscfg_DATA) + @$(NORMAL_INSTALL) + $(mkdir_p) $(DESTDIR)$(scriptscfgdir) + @list='$(scriptscfg_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(scriptscfgDATA_INSTALL) $$d$$p $(DESTDIR)$(scriptscfgdir)/$$f"; \ + $(scriptscfgDATA_INSTALL) $$d$$p $(DESTDIR)$(scriptscfgdir)/$$f; \ + done + +uninstall-scriptscfgDATA: + @$(NORMAL_UNINSTALL) + @list='$(scriptscfg_DATA)'; for p in $$list; do \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " rm -f $(DESTDIR)$(scriptscfgdir)/$$f"; \ + rm -f $(DESTDIR)$(scriptscfgdir)/$$f; \ + done +install-sysconfDATA: $(sysconf_DATA) + @$(NORMAL_INSTALL) + $(mkdir_p) $(DESTDIR)$(sysconfdir) + @list='$(sysconf_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(sysconfDATA_INSTALL) $$d$$p $(DESTDIR)$(sysconfdir)/$$f"; \ + $(sysconfDATA_INSTALL) $$d$$p $(DESTDIR)$(sysconfdir)/$$f; \ + done + +uninstall-sysconfDATA: + @$(NORMAL_UNINSTALL) + @list='$(sysconf_DATA)'; for p in $$list; do \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " rm -f $(DESTDIR)$(sysconfdir)/$$f"; \ + rm -f $(DESTDIR)$(sysconfdir)/$$f; \ + done +install-vservercfgDATA: $(vservercfg_DATA) + @$(NORMAL_INSTALL) + $(mkdir_p) $(DESTDIR)$(vservercfgdir) + @list='$(vservercfg_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(vservercfgDATA_INSTALL) $$d$$p $(DESTDIR)$(vservercfgdir)/$$f"; \ + $(vservercfgDATA_INSTALL) $$d$$p $(DESTDIR)$(vservercfgdir)/$$f; \ + done + +uninstall-vservercfgDATA: + @$(NORMAL_UNINSTALL) + @list='$(vservercfg_DATA)'; for p in $$list; do \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " rm -f $(DESTDIR)$(vservercfgdir)/$$f"; \ + rm -f $(DESTDIR)$(vservercfgdir)/$$f; \ + done +install-includeHEADERS: $(include_HEADERS) + @$(NORMAL_INSTALL) + $(mkdir_p) $(DESTDIR)$(includedir) + @list='$(include_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f"; \ + $(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f; \ + done + +uninstall-includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_HEADERS)'; for p in $$list; do \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " rm -f $(DESTDIR)$(includedir)/$$f"; \ + rm -f $(DESTDIR)$(includedir)/$$f; \ + 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: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) config.h.in $(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 "$(ETAGS_ARGS)$$tags$$unique" \ + || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) config.h.in $(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)/distrib $(distdir)/doc $(distdir)/lib $(distdir)/linuxconf $(distdir)/m4 $(distdir)/man $(distdir)/scripts $(distdir)/src $(distdir)/sysv $(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 + -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 + $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) +dist-bzip2: distdir + $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-tarZ: distdir + $(AMTAR) chof - $(distdir) | 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 + $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(AMTAR) xf - ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.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 ../.. && $(mkdir_p) "$$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: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA) \ + $(HEADERS) config.h +installdirs: + $(mkdir_p) $(DESTDIR)$(libdir) $(DESTDIR)$(pkglibdir) $(DESTDIR)$(sbindir) $(DESTDIR)$(legacydir) $(DESTDIR)$(pkglibdir) $(DESTDIR)$(sbindir) $(DESTDIR)$(sysvdir) $(DESTDIR)$(man8dir) $(DESTDIR)$(pkglibdir) $(DESTDIR)$(scriptscfgdir) $(DESTDIR)$(sysconfdir) $(DESTDIR)$(vservercfgdir) $(DESTDIR)$(includedir) +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -rm -f $(CONFIG_CLEAN_FILES) + -rm -f tests/$(am__dirstamp) + -rm -f lib/$(am__dirstamp) + -rm -f src/$(am__dirstamp) + -rm -f tests/$(DEPDIR)/$(am__dirstamp) + -rm -f lib/$(DEPDIR)/$(am__dirstamp) + -rm -f src/$(DEPDIR)/$(am__dirstamp) + +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 "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +clean: clean-am + +clean-am: clean-generic clean-libLIBRARIES clean-noinstPROGRAMS \ + clean-pkglibPROGRAMS clean-sbinPROGRAMS mostlyclean-am + +distclean: distclean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf lib/$(DEPDIR) src/$(DEPDIR) tests/$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-hdr distclean-local distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-includeHEADERS install-legacySCRIPTS \ + install-man install-scriptscfgDATA install-sysvSCRIPTS \ + install-vservercfgDATA + +install-exec-am: install-libLIBRARIES install-pkglibDATA \ + install-pkglibPROGRAMS install-pkglibSCRIPTS \ + install-sbinPROGRAMS install-sbinSCRIPTS install-sysconfDATA + +install-info: install-info-am + +install-man: install-man8 + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -rf lib/$(DEPDIR) src/$(DEPDIR) tests/$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-includeHEADERS uninstall-info-am \ + uninstall-legacySCRIPTS uninstall-libLIBRARIES uninstall-man \ + uninstall-pkglibDATA uninstall-pkglibPROGRAMS \ + uninstall-pkglibSCRIPTS uninstall-sbinPROGRAMS \ + uninstall-sbinSCRIPTS uninstall-scriptscfgDATA \ + uninstall-sysconfDATA uninstall-sysvSCRIPTS \ + uninstall-vservercfgDATA + +uninstall-man: uninstall-man8 + +.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ + clean-generic clean-libLIBRARIES clean-noinstPROGRAMS \ + clean-pkglibPROGRAMS clean-sbinPROGRAMS ctags dist dist-all \ + dist-bzip2 dist-gzip dist-shar dist-tarZ dist-zip distcheck \ + distclean distclean-compile distclean-generic distclean-hdr \ + distclean-local distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-exec \ + install-exec-am install-includeHEADERS install-info \ + install-info-am install-legacySCRIPTS install-libLIBRARIES \ + install-man install-man8 install-pkglibDATA \ + install-pkglibPROGRAMS install-pkglibSCRIPTS \ + install-sbinPROGRAMS install-sbinSCRIPTS \ + install-scriptscfgDATA install-strip install-sysconfDATA \ + install-sysvSCRIPTS install-vservercfgDATA installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-includeHEADERS uninstall-info-am \ + uninstall-legacySCRIPTS uninstall-libLIBRARIES uninstall-man \ + uninstall-man8 uninstall-pkglibDATA uninstall-pkglibPROGRAMS \ + uninstall-pkglibSCRIPTS uninstall-sbinPROGRAMS \ + uninstall-sbinSCRIPTS uninstall-scriptscfgDATA \ + uninstall-sysconfDATA uninstall-sysvSCRIPTS \ + uninstall-vservercfgDATA + + +linuxcaps.h: ${kernelincludedir}/linux/capability.h Makefile + @rm -f $@ + echo '#include ' >$@.tmp + sed -e 's!^#include .*!!g;s!\<__u32\>!uint32_t!g;s!\<__user\>!!g;' $< >>$@.tmp + @-chmod --reference $< $@.tmp &>/dev/null + mv -f $@.tmp $@ + @chmod a-w $@ + +linuxvirtual.h: +@ENSC_ENABLE_INTERNAL_HEADERS_TRUE@ ln -sf '$(top_srcdir)/lib/virtual.h' '$@' +@ENSC_ENABLE_INTERNAL_HEADERS_FALSE@ ln -sf '$(kernelincludedir)/linux/virtual.h' '$@' && test -e '$@' || \ +@ENSC_ENABLE_INTERNAL_HEADERS_FALSE@ ln -sf '$(top_srcdir)/lib/virtual.h' '$@' + +#install-data-hook: $(DESTDIR)$(pkglibdir)/setattr + +#$(DESTDIR)$(pkglibdir)/setattr: +# ln -s showattr '$@' + +src/setattr$(EXEEXT): src/showattr$(EXEEXT) + @rm -f '$@' + ln -s showattr$(EXEEXT) '$@' + +scripts/%: scripts/%.subst + @mkdir -p $$(dirname '$@') + sed -e 's!@'PKGLIBDIR'@!$(pkglibdir)!g; \ + s!@'SBINDIR'@!$(sbindir)!g; \ + s!@'VSERVERDIR'@!$(vserverdir)!g' '$<' >'$@.tmp' + @-chmod --reference='$<' '$@.tmp' + @-rm -f '$@' + mv '$@.tmp' '$@' + @chmod a-w '$@' + +sysv/%: sysv/%.subst + @mkdir -p $$(dirname '$@') + sed -e 's!/usr/lib/util-vserver!$(pkglibdir)!g; \ + s!^USR_SBIN=/usr/sbin$$!USR_SBIN=$(sbindir)!g; \ + s!^VROOTDIR=/vservers$$!VROOTDIR=$(vserverdir)!g; \ + ' '$<' >'$@.tmp' + if cmp -s '$<' '$@.tmp'; then \ + cp -p '$<' '$@'; \ + else \ + mv -f '$@.tmp' '$@'; \ + fi + -rm -f '$@.tmp' + @chmod a-w '$@' + +@ENSC_ENABLE_LINUXCONF_TRUE@linuxconf/%: linuxconf/%.subst +@ENSC_ENABLE_LINUXCONF_TRUE@ @mkdir -p $$(dirname '$@') +@ENSC_ENABLE_LINUXCONF_TRUE@ sed -e 's!@'PKGLIBDIR'@!$(pkglibdir)!g; \ +@ENSC_ENABLE_LINUXCONF_TRUE@ s!@'SBINDIR'@!$(sbindir)!g' '$<' >'$@.tmp' +@ENSC_ENABLE_LINUXCONF_TRUE@ @-chmod --reference='$<' '$@.tmp' +@ENSC_ENABLE_LINUXCONF_TRUE@ @-rm -f '$@' +@ENSC_ENABLE_LINUXCONF_TRUE@ mv '$@.tmp' '$@' +@ENSC_ENABLE_LINUXCONF_TRUE@ @chmod a-w '$@' + +gpgsig: + gpg --armor --detach-sign $(distdir).tar.bz2 + +$(BUILT_SOURCES) config.h: .X$(subst /,_,$(sysconfdir))-up-to-date + +distclean-local: distclean-uptodate + +distclean-uptodate: + @rm -f .*-up-to-date + +.%-up-to-date: + @rm -f .*-up-to-date + @touch -t 197001020000 '$@' + @$(MAKE) -s clean $(BUILT_SOURCES) + +ChangeLog.sed: + test "$(srcdir)" != "." + +@HAVE_CVS2CL_TRUE@ChangeLog: Makefile +@HAVE_CVS2CL_TRUE@ if test "$(srcdir)" = "." -a -d CVS; then \ +@HAVE_CVS2CL_TRUE@ $(CVS2CL) $(CVS2CL_ALLFLAGS) -f $@; \ +@HAVE_CVS2CL_TRUE@ fi +@HAVE_CVS2CL_FALSE@@HAVE_RCS2LOG_TRUE@ChangeLog: ChangeLog.sed Makefile +@HAVE_CVS2CL_FALSE@@HAVE_RCS2LOG_TRUE@ if test "$(srcdir)" = "." -a -d CVS; then \ +@HAVE_CVS2CL_FALSE@@HAVE_RCS2LOG_TRUE@ $(RCS2LOG) -l 0 -c /dev/stdout | sed -f $< >$@; \ +@HAVE_CVS2CL_FALSE@@HAVE_RCS2LOG_TRUE@ fi + +.PHONY: ChangeLog +# 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..e1226c3 --- /dev/null +++ b/NEWS @@ -0,0 +1,132 @@ +Version 0.29 +============ + + - further compilation fixes + + - adapted the 'vserver ... build' command to the new barrier + mechanism + + + +Version 0.28 +============ + + - BUGFIX: fixed context creation when both fakeinit-flag and a + static context is wanted; previous versions ignored the fakeinit + flag in this situation + + - BUGFIX: vserver-copy: autodetect mktemp/tempfile (reported by + DUCLOS Andre) + + - FEATURE: allow to override start/stop commands of vservers + (patch by Erik Smit) + + - BUGFIX: call 'chkconfig' to fix initscripts *after* generating + the configuration (reported by DUCLOS Andre) + + - call programs with 'exec' on vserver's 'suexec' command (patch + by Alec Thomas) + + - improved e2fsprogs header detection + + - API-CHANGE: removed argument from vc_get_version() since the + only supported category is VC_CAT_COMPAT + + +Version 0.27 +============ + + - added new 'vkill' implementation which uses the syscall from + vserver 1.1.6+. + + - BUGFIX: fixed typo in vc_get_version() wrapper which caused an + infinite recursive call of this function; this should not have + affected any userspace program + + - BUGFIX: 'vps' accepts multiple arguments now (from Debian patch) + + - vc_ctx_kill() was added + + - chrootsafe() code was removed since such a functionality seems + to be impossible + + - use 'vserver' instead of 'virtual_context' as the syscall name; + this will fix problems with architectures where the syscall is not + at #273. + + - BUGFIX: fixed '--enable-apis' ./configure option; formerly, only + 'ALL' or none were possible + + - moved some old, unused programs/scripts into a seperate 'legacy'/ + directory + + - BUGFIX: /dev/pts will be mounted with correct options now + + - added support for Slackware's init-method (thanks to Stephen + Pearce for the patch) + + - API-CHANGE: followed kernel patches and renamed 'ctx_t' datatype + to 'xid_t'. + + +Version 0.26 +============ + + - BUGFIX: uninitialized variables in 'ifspec' were fixed and + error-messages will be given out when ioctl() on the requested + interface fails (thanks to Herbert Poetzl) + + - BUGFIX: fixed vc_get_rlimit_mask() to return the queried + values. This step was missing in 0.25 which returned the + error-code only. + + - use the shipped 'virtual.h' header on default instead of the + kernel version. The old Behavior can be restored with the + '--disable-internal-headers' ./configure option + + +Version 0.25 +============ + + - BUGFIX: this version fixes handling of ctx >= 32768 + + - experimental support for new resource-limit syscall was add + (vserver >= 1.1.3); the new 'vlimit' tool replaces 'setctxlimit' + + - some man-pages were added and init-scripts improved (taken from + Debian patches provided by Sam Vilain) + + - basic Gentoo support was added to the 'vserver' script (thanks to + "Allen D. Parker II") + + - compilation fixes for kernel 2.6 headers + + - set mode/owner of /var/run/utmp (owner is customizable through + $UTMP_GROUP) + + +Version 0.24 +============ + + - updated to new syscall API (patch c17h and later) + + - revived copy-all-mode for 'vserver ... build' (can be disabled + with $UTIL_VSERVER_AVOID_COPY) + + - use '-HS' ulimit switch for newly created vservers + + - added QUOTACTL capability, removed OPENDEV capability + + - location of vservers-rootdir can now be configured through a + '--with-vrootdir' configure switch; it defaults still to + '/vservers' + + - build of 'newvserver' linuxconf-module is conditionalized since + it is unsupported and will be dropped in future versions. To + enable it. call './configure' with '--enable-linuxconf'. + + +version 0.23.6 +============== + + - fixed '--level' option on 'vserver ... chkconfig' diff --git a/README b/README new file mode 100644 index 0000000..86b6e1d --- /dev/null +++ b/README @@ -0,0 +1,10 @@ +Build-Requirements: + + * at least gcc-2.95 (C and C++ frontends) + + * when using 2.6 kernel-headers, the 'e2fsprogs' headers are + required. RHL/Fedora Core ships them in the 'e2fsprogs-devel' + package, Mandrake in 'libext2fs2-devel'. + + Using these headers with kernel 2.4 will not hurt and can prevent + problems, so they are strongly recommended. diff --git a/THANKS b/THANKS new file mode 100644 index 0000000..707403f --- /dev/null +++ b/THANKS @@ -0,0 +1,11 @@ +I want to thank + +Jacques Gelinas , + who wrote and maintains the 'vserver' package on which util-vserver + is based on + +Sam Vilain, + for providing man-pages and patches used in the Debian package + + +all the other people, who contributed to the original 'vserver' package diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 0000000..604474e --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,979 @@ +# generated automatically by aclocal 1.8.2 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +# 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. + +# -*- Autoconf -*- +# Copyright (C) 2002, 2003 Free Software Foundation, Inc. +# Generated from amversion.in; do not edit by hand. + +# 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 + +# 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.8"]) + +# 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.8.2])]) + +# AM_AUX_DIR_EXPAND + +# Copyright (C) 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# 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 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 6 + +# 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])]) + +# serial 6 -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 +# Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "GCJ", or "OBJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + : > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # (even with -Werror). So we grep stderr for any message + # that says an option was ignored. + if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH]) +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +#serial 2 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # So let's grep whole file. + if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue + # Extract the definition of DEP_FILES from the Makefile without + # running `make'. + DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` + test -z "$DEPDIR" && continue + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n -e '/^U = / s///p' < "$mf"` + test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" + # We invoke sed twice because it is the simplest approach to + # changing $(DEPDIR) to its actual value in the expansion. + for file in `sed -n -e ' + /^DEP_FILES = .*\\\\$/ { + s/^DEP_FILES = // + :loop + s/\\\\$// + p + n + /\\\\$/ b loop + p + } + /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each `.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# 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. + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +# Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 11 + +# 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_MISSING_PROG(AMTAR, tar) +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([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]) + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. + +# Copyright (C) 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +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)]) + +# -*- Autoconf -*- +# Copyright (C) 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 1 + +# 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. +# From Jim Meyering + +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004 +# Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 3 + +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]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 2 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# serial 2 + +# AM_PROG_CC_C_O +# -------------- +# Like AC_PROG_CC_C_O, but changed for automake. + +# Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +AC_DEFUN([AM_PROG_CC_C_O], +[AC_REQUIRE([AC_PROG_CC_C_O])dnl +AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +# FIXME: we rely on the cache variable name because +# there is no other way. +set dummy $CC +ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` +if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +]) + +# -*- Autoconf -*- + + +# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 3 + +# 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 +]) + +# AM_PROG_MKDIR_P +# --------------- +# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. + +# Copyright (C) 2003, 2004 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# 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. +AC_DEFUN([AM_PROG_MKDIR_P], +[if mkdir -p -- . 2>/dev/null; then + # Keeping the `.' argument allows $(mkdir_p) to be used without + # argument. Indeed, we sometimes output rules like + # $(mkdir_p) $(somedir) + # where $(somedir) is conditionally defined. + # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more + # expensive solution, as it forces Make to start a sub-shell.) + 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 ./--; + 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 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 2 + +# _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. +# + +# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 3 + +# 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)]) + +# AM_PROG_INSTALL_STRIP + +# Copyright (C) 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# 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])]) + +m4_include([m4/ensc_cflags.m4]) +m4_include([m4/ensc_changelog.m4]) +m4_include([m4/ensc_e2fscheck.m4]) +m4_include([m4/ensc_kerneldir.m4]) +m4_include([m4/ensc_syscall.m4]) +m4_include([m4/ensc_uv_vrootdir.m4]) diff --git a/compat.h b/compat.h new file mode 100644 index 0000000..5b7291b --- /dev/null +++ b/compat.h @@ -0,0 +1,46 @@ +// $Id: compat.h,v 1.1.4.3 2003/12/30 13:47:56 ensc Exp $ --*- c++ -*-- + +// Copyright (C) 2003 Enrico Scholz +// +// 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; version 2 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +#ifndef H_UTIL_VSERVER_COMPAT_H +#define H_UTIL_VSERVER_COMPAT_H + +#if defined(__GNUC__) +# define UNUSED __attribute__((__unused__)) +# define NORETURN __attribute__((__noreturn__)) +# if __GNUC__ >= 3 +# define ALWAYSINLINE __attribute__((__always_inline__)) +# else +# define ALWAYSINLINE +# endif +#else +# define UNUSED +# define NORETURN +# define ALWAYSINLINE +#endif + +#if !defined(HAVE_DECL_MS_MOVE) || !(HAVE_DECL_MS_MOVE) + // from +# define MS_MOVE 8192 +#endif + +#ifndef HAVE_XID_T +#include +typedef uint32_t xid_t; +#endif + +#endif // H_UTIL_VSERVER_COMPAT_H diff --git a/compile b/compile new file mode 100755 index 0000000..a81e000 --- /dev/null +++ b/compile @@ -0,0 +1,136 @@ +#! /bin/sh +# Wrapper for compilers which do not understand `-c -o'. + +scriptversion=2003-11-09.00 + +# Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc. +# Written by Tom Tromey . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +case $1 in + '') + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand `-c -o'. +Remove `-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file `INSTALL'. + +Report bugs to . +EOF + exit 0 + ;; + -v | --v*) + echo "compile $scriptversion" + exit 0 + ;; +esac + + +prog=$1 +shift + +ofile= +cfile= +args= +while test $# -gt 0; do + case "$1" in + -o) + # configure might choose to run compile as `compile cc -o foo foo.c'. + # So we do something ugly here. + ofile=$2 + shift + case "$ofile" in + *.o | *.obj) + ;; + *) + args="$args -o $ofile" + ofile= + ;; + esac + ;; + *.c) + cfile=$1 + args="$args $1" + ;; + *) + args="$args $1" + ;; + esac + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no `-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # `.c' file was seen then we are probably linking. That is also + # ok. + exec "$prog" $args +fi + +# Name of file we expect compiler to create. +cofile=`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'` + +# Create the lock directory. +# Note: use `[/.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo $cofile | sed -e 's|[/.-]|_|g'`.d +while true; do + if mkdir $lockdir > /dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir $lockdir; exit 1" 1 2 15 + +# Run the compile. +"$prog" $args +status=$? + +if test -f "$cofile"; then + mv "$cofile" "$ofile" +fi + +rmdir $lockdir +exit $status + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/config.h.in b/config.h.in new file mode 100644 index 0000000..148b547 --- /dev/null +++ b/config.h.in @@ -0,0 +1,88 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* define when is usable */ +#undef ENSC_HAVE_EXT2FS_EXT2_FS_H + +/* define when is usable */ +#undef ENSC_HAVE_LINUX_EXT2_FS_H + +/* Define to 1 when the fast syscall(2) invocation does not work */ +#undef ENSC_SYSCALL_TRADITIONAL + +/* Define to 1 if you have the declaration of `MS_MOVE', and to 0 if you + don't. */ +#undef HAVE_DECL_MS_MOVE + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the `vserver' function. */ +#undef HAVE_VSERVER + +/* Define to 1 if the system has the type `xid_t'. */ +#undef HAVE_XID_T + +/* Define to 1 if your C compiler doesn't accept -c and -o together. */ +#undef NO_MINUS_C_MINUS_O + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Enable support for compatibily syscall API */ +#undef VC_ENABLE_API_COMPAT + +/* Enable support for old, /proc parsing API */ +#undef VC_ENABLE_API_LEGACY + +/* Enable support for API of vserver 1.1.x */ +#undef VC_ENABLE_API_V11 + +/* Version number of package */ +#undef VERSION + + +#if defined(__pic__) && defined(__i386) && !defined(ENSC_SYSCALL_TRADITIONAL) +# define ENSC_SYSCALL_TRADITIONAL 1 +#endif diff --git a/configure b/configure new file mode 100755 index 0000000..721baf7 --- /dev/null +++ b/configure @@ -0,0 +1,6885 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.59 for util-vserver 0.29. +# +# Report bugs to . +# +# 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='util-vserver' +PACKAGE_TARNAME='util-vserver' +PACKAGE_VERSION='0.29' +PACKAGE_STRING='util-vserver 0.29' +PACKAGE_BUGREPORT='enrico.scholz@informatik.tu-chemnitz.de' + +ac_unique_file="src/capchroot.c" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#else +# if HAVE_STDINT_H +# include +# endif +#endif +#if HAVE_UNISTD_H +# include +#endif" + +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 AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE LN_S RANLIB ac_ct_RANLIB kernelincludedir vserverdir CVS2CL_TAG CVS2CL HAVE_CVS2CL_TRUE HAVE_CVS2CL_FALSE RCS2LOG HAVE_RCS2LOG_TRUE HAVE_RCS2LOG_FALSE ENSC_ENABLE_LINUXCONF_TRUE ENSC_ENABLE_LINUXCONF_FALSE ENSC_ENABLE_INTERNAL_HEADERS_TRUE ENSC_ENABLE_INTERNAL_HEADERS_FALSE CXXCPP EGREP 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 +ac_env_CXX_set=${CXX+set} +ac_env_CXX_value=$CXX +ac_cv_env_CXX_set=${CXX+set} +ac_cv_env_CXX_value=$CXX +ac_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_env_CXXFLAGS_value=$CXXFLAGS +ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_cv_env_CXXFLAGS_value=$CXXFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_CXXCPP_set=${CXXCPP+set} +ac_env_CXXCPP_value=$CXXCPP +ac_cv_env_CXXCPP_set=${CXXCPP+set} +ac_cv_env_CXXCPP_value=$CXXCPP + +# +# 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 util-vserver 0.29 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 +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of util-vserver 0.29:";; + esac + 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 + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + --enable-linuxconf enable 'newvserver' linuxconf module (default: no) + --disable-internal-headers + use vserver specific headers from the kernel instead + of the shipped versions (default: no) + --enable-apis=APIS enable support for the given apis; possible values + are: legacy,compat,v11,ALL (default: ALL) + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-kerneldir=DIR assume kernelsources in DIR (default: + /lib/modules//build) + --with-vrootdir=DIR place vservers under DIR (default: /vservers) + --with-syscall=METHOD call syscall(2) with the specified METHOD; valid + values are 'fast', 'traditional' and 'auto' + (default: auto) + +Some influential environment variables: + CXX C++ compiler command + CXXFLAGS C++ compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory + CC C compiler command + CFLAGS C compiler flags + CXXCPP C++ preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to . +_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 +util-vserver configure 0.29 +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. +_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 util-vserver $as_me 0.29, 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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ac_config_headers="$ac_config_headers config.h" + + +am__api_version="1.8" +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 -- . 2>/dev/null; then + # Keeping the `.' argument allows $(mkdir_p) to be used without + # argument. Indeed, we sometimes output rules like + # $(mkdir_p) $(somedir) + # where $(somedir) is conditionally defined. + # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more + # expensive solution, as it forces Make to start a sub-shell.) + 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 ./--; + 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='util-vserver' + VERSION='0.29' + + +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"} + + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +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. + + + +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 + + + + +# Checks for programs. +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$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_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # 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_CXX="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC +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_ac_ct_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # 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_CXX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_CXX" && break +done +test -n "$ac_ct_CXX" || ac_ct_CXX="g++" + + CXX=$ac_ct_CXX +fi + + +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C++ compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +echo "$as_me:$LINENO: checking for C++ compiler default output file name" >&5 +echo $ECHO_N "checking for C++ compiler default output file name... $ECHO_C" >&6 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext + break;; + * ) + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C++ compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 + +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5 +echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C++ compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext + break;; + * ) break;; + esac +done +else + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 +GXX=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +CXXFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cxx_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_prog_cxx_g=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +#include +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +continue +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +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 +DEPDIR="${am__leading_dot}deps" + + ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi + + +echo "$as_me:$LINENO: result: $_am_result" >&5 +echo "${ECHO_T}$_am_result" >&6 +rm -f confinc confmf + +# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then + enableval="$enable_dependency_tracking" + +fi; +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi + + +if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + + +depcc="$CXX" am_compiler_list= + +echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + : > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # (even with -Werror). So we grep stderr for any message + # that says an option was ignored. + if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6 +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + + +if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +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 +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; 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_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # 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_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; 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_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # 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_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; 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_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # 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_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; 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_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # 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_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; 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_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +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 + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$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_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # 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_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl +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_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # 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_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_CC" && break +done + + CC=$ac_ct_CC +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_prog_cc_g=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_stdc=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std1 is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std1. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext +done +rm -f conftest.$ac_ext conftest.$ac_objext +CC=$ac_save_CC + +fi + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; + *) + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; +esac + +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +#include +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +continue +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +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 + +depcc="$CC" am_compiler_list= + +echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + : > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # (even with -Werror). So we grep stderr for any message + # that says an option was ignored. + if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + + +if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +# 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 + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; 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_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; 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_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # 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_RANLIB="ranlib" + 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_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + RANLIB=$ac_ct_RANLIB +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +if test "x$CC" != xcc; then + echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 +echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6 +else + echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 +echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6 +fi +set dummy $CC; ac_cc=`echo $2 | + sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` +if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +# Make sure it works both with $CC and with simple cc. +# We do the test twice because some compilers refuse to overwrite an +# existing .o file with -o, though they will create one. +ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5' +if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; +then + eval ac_cv_prog_cc_${ac_cc}_c_o=yes + if test "x$CC" != xcc; then + # Test first that cc exists at all. + if { ac_try='cc -c conftest.$ac_ext >&5' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5' + if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; + then + # cc works too. + : + else + # cc exists but doesn't like -o. + eval ac_cv_prog_cc_${ac_cc}_c_o=no + fi + fi + fi +else + eval ac_cv_prog_cc_${ac_cc}_c_o=no +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +cat >>confdefs.h <<\_ACEOF +#define NO_MINUS_C_MINUS_O 1 +_ACEOF + +fi + +# FIXME: we rely on the cache variable name because +# there is no other way. +set dummy $CC +ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` +if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi + + + + + + warn_flags="-Werror -W" + echo "$as_me:$LINENO: checking whether the C-compiler accepts ${warn_flags}" >&5 +echo $ECHO_N "checking whether the C-compiler accepts ${warn_flags}... $ECHO_C" >&6 + 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 + + old_CFLAGS="${CFLAGS}" + CFLAGS="$warn_flags" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +inline static void f(){} +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ensc_sys_compilerwarnflags_C=${warn_flags} +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ensc_sys_compilerwarnflags_C= +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + 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 + + CFLAGS="$old_CFLAGS" + + if test x"${ensc_sys_compilerwarnflags_C}" = x; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + fi + + + + + +echo 'void f(){}' > conftest.c + for i in -std=c99 -Wall -pedantic -W -Wno-unused-parameter + do + echo "$as_me:$LINENO: checking whether $CC accepts $i" >&5 +echo $ECHO_N "checking whether $CC accepts $i... $ECHO_C" >&6 + if test -z "`${CC} ${ensc_sys_compilerwarnflags_C} $i -c conftest.c 2>&1`" + then + CFLAGS="${CFLAGS} $i" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi + done + rm -f conftest.c conftest.o + + + + + warn_flags="-Werror -W" + echo "$as_me:$LINENO: checking whether the C++-compiler accepts ${warn_flags}" >&5 +echo $ECHO_N "checking whether the C++-compiler accepts ${warn_flags}... $ECHO_C" >&6 + ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + old_CFLAGS="${CXXFLAGS}" + CXXFLAGS="$warn_flags" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +inline static void f(){} +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ensc_sys_compilerwarnflags_CXX=${warn_flags} +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ensc_sys_compilerwarnflags_CXX= +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + 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 + + CXXFLAGS="$old_CFLAGS" + + if test x"${ensc_sys_compilerwarnflags_CXX}" = x; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + fi + + + + + + echo 'void f(){}' > conftest.cc + for i in -ansi -Wall -pedantic -W -fmessage-length=0 + do + echo "$as_me:$LINENO: checking whether $CXX accepts $i" >&5 +echo $ECHO_N "checking whether $CXX accepts $i... $ECHO_C" >&6 + if test -z "`${CXX} ${ensc_sys_compilerwarnflags_CXX} $i -c conftest.cc 2>&1`" + then + CXXFLAGS="${CXXFLAGS} $i" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi + done + rm -f conftest.cc conftest.o + + + + + echo "$as_me:$LINENO: checking for linux kernel dir" >&5 +echo $ECHO_N "checking for linux kernel dir... $ECHO_C" >&6 +if test "${ensc_cv_path_kerneldir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + +# Check whether --with-kerneldir or --without-kerneldir was given. +if test "${with_kerneldir+set}" = set; then + withval="$with_kerneldir" + case "$withval" in + yes|no) { { echo "$as_me:$LINENO: error: '$withval' is not a valid value for kerneldir" >&5 +echo "$as_me: error: '$withval' is not a valid value for kerneldir" >&2;} + { (exit 1); exit 1; }; };; + *) ensc_cv_path_kerneldir=$withval;; + esac +else + ensc_cv_path_kerneldir= + for i in /lib/modules/$(uname -r)/build /usr/src/linux /usr; do + test -e $i/include/linux/version.h && { ensc_cv_path_kerneldir=$i; break; } + done +fi; + +fi +echo "$as_me:$LINENO: result: $ensc_cv_path_kerneldir" >&5 +echo "${ECHO_T}$ensc_cv_path_kerneldir" >&6 + + test "$ensc_cv_path_kerneldir" -a -e "$ensc_cv_path_kerneldir"/include/linux/version.h || { + { { echo "$as_me:$LINENO: error: Can not find kernelsources" >&5 +echo "$as_me: error: Can not find kernelsources" >&2;} + { (exit 1); exit 1; }; } + } + + + + + echo "$as_me:$LINENO: checking for linux kernel headers" >&5 +echo $ECHO_N "checking for linux kernel headers... $ECHO_C" >&6 +if test "${ensc_cv_path_kernelheaders+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + ensc_cv_path_kernelheaders=$ensc_cv_path_kerneldir/include + +fi +echo "$as_me:$LINENO: result: $ensc_cv_path_kernelheaders" >&5 +echo "${ECHO_T}$ensc_cv_path_kernelheaders" >&6 + + kernelincludedir=$ensc_cv_path_kernelheaders + + + + echo "$as_me:$LINENO: checking which vserver-rootdir is to use" >&5 +echo $ECHO_N "checking which vserver-rootdir is to use... $ECHO_C" >&6 + +# Check whether --with-vrootdir or --without-vrootdir was given. +if test "${with_vrootdir+set}" = set; then + withval="$with_vrootdir" + case "$withval" in + yes|no) { { echo "$as_me:$LINENO: error: '$withval' is not a valid value for vrootdir" >&5 +echo "$as_me: error: '$withval' is not a valid value for vrootdir" >&2;} + { (exit 1); exit 1; }; };; + *) ensc_uv_path_vrootdir=$withval;; + esac +else + ensc_uv_path_vrootdir=/vservers +fi; + echo "$as_me:$LINENO: result: $ensc_uv_path_vrootdir" >&5 +echo "${ECHO_T}$ensc_uv_path_vrootdir" >&6 + + if test x"vserverdir" != x; then + vserverdir=$ensc_uv_path_vrootdir + + fi + + + if test x"SYSCALL_SWITCH" != x; then + CVS2CL_TAG='-F SYSCALL_SWITCH' + + fi + + for ac_prog in cvs2cl +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_CVS2CL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CVS2CL"; then + ac_cv_prog_CVS2CL="$CVS2CL" # 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_CVS2CL="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CVS2CL=$ac_cv_prog_CVS2CL +if test -n "$CVS2CL"; then + echo "$as_me:$LINENO: result: $CVS2CL" >&5 +echo "${ECHO_T}$CVS2CL" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$CVS2CL" && break +done + + + +if test x"$CVS2CL" != x; then + HAVE_CVS2CL_TRUE= + HAVE_CVS2CL_FALSE='#' +else + HAVE_CVS2CL_TRUE='#' + HAVE_CVS2CL_FALSE= +fi + + + for ac_prog in rcs2log +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_RCS2LOG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$RCS2LOG"; then + ac_cv_prog_RCS2LOG="$RCS2LOG" # 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_RCS2LOG="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +RCS2LOG=$ac_cv_prog_RCS2LOG +if test -n "$RCS2LOG"; then + echo "$as_me:$LINENO: result: $RCS2LOG" >&5 +echo "${ECHO_T}$RCS2LOG" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$RCS2LOG" && break +done + + + +if test x"$RCS2LOG" != x; then + HAVE_RCS2LOG_TRUE= + HAVE_RCS2LOG_FALSE='#' +else + HAVE_RCS2LOG_TRUE='#' + HAVE_RCS2LOG_FALSE= +fi + + + +echo "$as_me:$LINENO: checking whether to enable linuxconf modules" >&5 +echo $ECHO_N "checking whether to enable linuxconf modules... $ECHO_C" >&6 +# Check whether --enable-linuxconf or --disable-linuxconf was given. +if test "${enable_linuxconf+set}" = set; then + enableval="$enable_linuxconf" + case "$enableval" in + yes|no) ;; + *) { { echo "$as_me:$LINENO: error: '$i' is not a supported value for '--enable-linuxconf'" >&5 +echo "$as_me: error: '$i' is not a supported value for '--enable-linuxconf'" >&2;} + { (exit 1); exit 1; }; };; + esac +else + enable_linuxconf=no +fi; + + + +if test x"$enable_linuxconf" = xyes; then + ENSC_ENABLE_LINUXCONF_TRUE= + ENSC_ENABLE_LINUXCONF_FALSE='#' +else + ENSC_ENABLE_LINUXCONF_TRUE='#' + ENSC_ENABLE_LINUXCONF_FALSE= +fi + +echo "$as_me:$LINENO: result: $enable_linuxconf" >&5 +echo "${ECHO_T}$enable_linuxconf" >&6 + + +echo "$as_me:$LINENO: checking whether to use internal kernel headers" >&5 +echo $ECHO_N "checking whether to use internal kernel headers... $ECHO_C" >&6 +# Check whether --enable-internal-headers or --disable-internal-headers was given. +if test "${enable_internal_headers+set}" = set; then + enableval="$enable_internal_headers" + case "$enableval" in + yes|no) ;; + *) { { echo "$as_me:$LINENO: error: '$i' is not a supported value for '--disable-internal-headers'" >&5 +echo "$as_me: error: '$i' is not a supported value for '--disable-internal-headers'" >&2;} + { (exit 1); exit 1; }; };; + esac +else + enable_internal_headers=yes +fi; + + + +if test x"$enable_internal_headers" = xyes; then + ENSC_ENABLE_INTERNAL_HEADERS_TRUE= + ENSC_ENABLE_INTERNAL_HEADERS_FALSE='#' +else + ENSC_ENABLE_INTERNAL_HEADERS_TRUE='#' + ENSC_ENABLE_INTERNAL_HEADERS_FALSE= +fi + +echo "$as_me:$LINENO: result: $enable_internal_headers" >&5 +echo "${ECHO_T}$enable_internal_headers" >&6 + + +echo "$as_me:$LINENO: checking for supported APIs" >&5 +echo $ECHO_N "checking for supported APIs... $ECHO_C" >&6 +# Check whether --enable-apis or --disable-apis was given. +if test "${enable_apis+set}" = set; then + enableval="$enable_apis" + +else + enable_apis=ALL +fi; + +test x"$enable_apis" != xALL || enable_apis='legacy,compat,v11' +old_IFS=$IFS +IFS=,; +for i in $enable_apis; do + case "$i" in + compat) +cat >>confdefs.h <<\_ACEOF +#define VC_ENABLE_API_COMPAT 1 +_ACEOF +;; + legacy) +cat >>confdefs.h <<\_ACEOF +#define VC_ENABLE_API_LEGACY 1 +_ACEOF +;; + v11) +cat >>confdefs.h <<\_ACEOF +#define VC_ENABLE_API_V11 1 +_ACEOF +;; + *) { { echo "$as_me:$LINENO: error: '$i' is not a supported API" >&5 +echo "$as_me: error: '$i' is not a supported API" >&2;} + { (exit 1); exit 1; }; };; + esac +done +IFS=$old_IFS +echo "$as_me:$LINENO: result: $enable_apis" >&5 +echo "${ECHO_T}$enable_apis" >&6 + + + + echo "$as_me:$LINENO: checking for syscall(2) invocation method" >&5 +echo $ECHO_N "checking for syscall(2) invocation method... $ECHO_C" >&6 + +# Check whether --with-syscall or --without-syscall was given. +if test "${with_syscall+set}" = set; then + withval="$with_syscall" + +else + with_syscall=auto +fi; + echo "$as_me:$LINENO: result: $with_syscall" >&5 +echo "${ECHO_T}$with_syscall" >&6 + + case x"$with_syscall" in + xauto) + echo "$as_me:$LINENO: checking which syscall(2) invocation works" >&5 +echo $ECHO_N "checking which syscall(2) invocation works... $ECHO_C" >&6 +if test "${ensc_cv_test_syscall+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + old_CPPFLAGS=$CPPFLAGS + CPPFLAGS="-I$ensc_cv_path_kernelheaders" + 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 + + cat >conftest.$ac_ext <<_ACEOF + +#include +#include +#include +#define __NR_foo0 300 +#define __NR_foo1 301 +#define __NR_foo2 302 +#define __NR_foo3 303 +#define __NR_foo4 304 +#define __NR_foo5 305 +inline static _syscall0(int, foo0) +inline static _syscall1(int, foo1, int, a) +inline static _syscall2(int, foo2, int, a, int, b) +inline static _syscall3(int, foo3, int, a, int, b, int, c) +inline static _syscall4(int, foo4, int, a, int, b, int, c, int, d) +inline static _syscall5(int, foo5, int, a, int, b, int, c, int, d, int, e) + +int main() { + return foo0() || \ + foo1(1) || \ + foo2(1,2) || \ + foo3(1,2,3) || \ + foo4(1,2,3,4) || \ + foo5(1,2,3,4,5); +} + +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ensc_cv_test_syscall=fast +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ensc_cv_test_syscall=traditional +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + 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 + + CPPFLAGS=$old_CPPFLAGS + +fi +echo "$as_me:$LINENO: result: $ensc_cv_test_syscall" >&5 +echo "${ECHO_T}$ensc_cv_test_syscall" >&6 + with_syscall=$ensc_cv_test_syscall + ;; + xfast|xtraditional) + ;; + *) + { { echo "$as_me:$LINENO: error: '$with_syscall' is not a valid value for '--with-syscall'" >&5 +echo "$as_me: error: '$with_syscall' is not a valid value for '--with-syscall'" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + if test x"$with_syscall" = xtraditional; then + +cat >>confdefs.h <<\_ACEOF +#define ENSC_SYSCALL_TRADITIONAL 1 +_ACEOF + + fi + + + + +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 +echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6 +if test -z "$CXXCPP"; then + if test "${ac_cv_prog_CXXCPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CXXCPP=$CXXCPP + +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +echo "$as_me:$LINENO: result: $CXXCPP" >&5 +echo "${ECHO_T}$CXXCPP" >&6 +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep + + +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_stdc=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + exit(2); + exit (0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + echo "$as_me:$LINENO: checking for ext2fs-headers" >&5 +echo $ECHO_N "checking for ext2fs-headers... $ECHO_C" >&6 +if test "${ensc_cv_test_ext2fs_header+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + int main() { return 0; } +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ensc_cv_test_ext2fs_header=e2fsprogs +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + int main() { return 0; } +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ensc_cv_test_ext2fs_header=kernel +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + ensc_cv_test_ext2fs_header=none +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ensc_cv_test_ext2fs_header" >&5 +echo "${ECHO_T}$ensc_cv_test_ext2fs_header" >&6 + + case x"$ensc_cv_test_ext2fs_header" in + (xe2fsprogs) + if test "${ac_cv_header_ext2fs_ext2_fs_h+set}" = set; then + echo "$as_me:$LINENO: checking for ext2fs/ext2_fs.h" >&5 +echo $ECHO_N "checking for ext2fs/ext2_fs.h... $ECHO_C" >&6 +if test "${ac_cv_header_ext2fs_ext2_fs_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_ext2fs_ext2_fs_h" >&5 +echo "${ECHO_T}$ac_cv_header_ext2fs_ext2_fs_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking ext2fs/ext2_fs.h usability" >&5 +echo $ECHO_N "checking ext2fs/ext2_fs.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking ext2fs/ext2_fs.h presence" >&5 +echo $ECHO_N "checking ext2fs/ext2_fs.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: ext2fs/ext2_fs.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ext2fs/ext2_fs.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ext2fs/ext2_fs.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ext2fs/ext2_fs.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: ext2fs/ext2_fs.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ext2fs/ext2_fs.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ext2fs/ext2_fs.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ext2fs/ext2_fs.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ext2fs/ext2_fs.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ext2fs/ext2_fs.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ext2fs/ext2_fs.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ext2fs/ext2_fs.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ext2fs/ext2_fs.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ext2fs/ext2_fs.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ext2fs/ext2_fs.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ext2fs/ext2_fs.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------------------ ## +## Report this to enrico.scholz@informatik.tu-chemnitz.de ## +## ------------------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for ext2fs/ext2_fs.h" >&5 +echo $ECHO_N "checking for ext2fs/ext2_fs.h... $ECHO_C" >&6 +if test "${ac_cv_header_ext2fs_ext2_fs_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_ext2fs_ext2_fs_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_ext2fs_ext2_fs_h" >&5 +echo "${ECHO_T}$ac_cv_header_ext2fs_ext2_fs_h" >&6 + +fi +if test $ac_cv_header_ext2fs_ext2_fs_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define ENSC_HAVE_EXT2FS_EXT2_FS_H 1 +_ACEOF + +else + { { echo "$as_me:$LINENO: error: unexpected error while checkin for +See \`config.log' for more details." >&5 +echo "$as_me: error: unexpected error while checkin for +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + + + ;; + (xkernel) + if test "${ac_cv_header_linux_ext2_fs_h+set}" = set; then + echo "$as_me:$LINENO: checking for linux/ext2_fs.h" >&5 +echo $ECHO_N "checking for linux/ext2_fs.h... $ECHO_C" >&6 +if test "${ac_cv_header_linux_ext2_fs_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_linux_ext2_fs_h" >&5 +echo "${ECHO_T}$ac_cv_header_linux_ext2_fs_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking linux/ext2_fs.h usability" >&5 +echo $ECHO_N "checking linux/ext2_fs.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking linux/ext2_fs.h presence" >&5 +echo $ECHO_N "checking linux/ext2_fs.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: linux/ext2_fs.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: linux/ext2_fs.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/ext2_fs.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: linux/ext2_fs.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: linux/ext2_fs.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: linux/ext2_fs.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/ext2_fs.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: linux/ext2_fs.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/ext2_fs.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: linux/ext2_fs.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/ext2_fs.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: linux/ext2_fs.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/ext2_fs.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: linux/ext2_fs.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/ext2_fs.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: linux/ext2_fs.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------------------ ## +## Report this to enrico.scholz@informatik.tu-chemnitz.de ## +## ------------------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for linux/ext2_fs.h" >&5 +echo $ECHO_N "checking for linux/ext2_fs.h... $ECHO_C" >&6 +if test "${ac_cv_header_linux_ext2_fs_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_linux_ext2_fs_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_linux_ext2_fs_h" >&5 +echo "${ECHO_T}$ac_cv_header_linux_ext2_fs_h" >&6 + +fi +if test $ac_cv_header_linux_ext2_fs_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define ENSC_HAVE_LINUX_EXT2_FS_H 1 +_ACEOF + +else + { { echo "$as_me:$LINENO: error: unexpected error while checkin for +See \`config.log' for more details." >&5 +echo "$as_me: error: unexpected error while checkin for +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + + + ;; + (*) + { { echo "$as_me:$LINENO: error: +ext2fs headers were not found, or they are not usable. This can have +the following reasons: + +* you have neither the e2fsprogs nor the kernel headers installed + +* kernel headers are broken (e.g. these of linux 2.6 are known to be) + and you do not have e2fsprogs headers installed; please try to + install e2fsprogs-devel (for Red Hat) or e2fsprogs-dev (for Debian) + in this case + +* kernel headers are broken and your e2fsprogs headers are too old; + until version 1.27 (inclusive), they are using reserved C++ keywords + +* kernel headers are broken and your e2fsprogs headers are too new; + recent (January 2004) BK snapshots of e2fsprogs are unusable for + C++, for details and a solution see + https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=112448 + + +In the latter two cases you have the following options: +* fix the headers manually, or +* install a stable version of e2fsprogs (e.g. 1.34), or +* use good kernel headers (from linux 2.4.x) + +See \`config.log' for more details." >&5 +echo "$as_me: error: +ext2fs headers were not found, or they are not usable. This can have +the following reasons: + +* you have neither the e2fsprogs nor the kernel headers installed + +* kernel headers are broken (e.g. these of linux 2.6 are known to be) + and you do not have e2fsprogs headers installed; please try to + install e2fsprogs-devel (for Red Hat) or e2fsprogs-dev (for Debian) + in this case + +* kernel headers are broken and your e2fsprogs headers are too old; + until version 1.27 (inclusive), they are using reserved C++ keywords + +* kernel headers are broken and your e2fsprogs headers are too new; + recent (January 2004) BK snapshots of e2fsprogs are unusable for + C++, for details and a solution see + https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=112448 + + +In the latter two cases you have the following options: +* fix the headers manually, or +* install a stable version of e2fsprogs (e.g. 1.34), or +* use good kernel headers (from linux 2.4.x) + +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + ;; + esac + 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 + + + +for ac_func in vserver +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +echo "$as_me:$LINENO: checking whether MS_MOVE is declared" >&5 +echo $ECHO_N "checking whether MS_MOVE is declared... $ECHO_C" >&6 +if test "${ac_cv_have_decl_MS_MOVE+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +#ifndef MS_MOVE + char *p = (char *) MS_MOVE; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_decl_MS_MOVE=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_have_decl_MS_MOVE=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_have_decl_MS_MOVE" >&5 +echo "${ECHO_T}$ac_cv_have_decl_MS_MOVE" >&6 +if test $ac_cv_have_decl_MS_MOVE = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_MS_MOVE 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_MS_MOVE 0 +_ACEOF + + +fi + + +echo "$as_me:$LINENO: checking for xid_t" >&5 +echo $ECHO_N "checking for xid_t... $ECHO_C" >&6 +if test "${ac_cv_type_xid_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +if ((xid_t *) 0) + return 0; +if (sizeof (xid_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_xid_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_xid_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_xid_t" >&5 +echo "${ECHO_T}$ac_cv_type_xid_t" >&6 +if test $ac_cv_type_xid_t = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_XID_T 1 +_ACEOF + + +fi + + + ac_config_files="$ac_config_files util-vserver.spec 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 + +DEFS=-DHAVE_CONFIG_H + +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 +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_CVS2CL_TRUE}" && test -z "${HAVE_CVS2CL_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_CVS2CL\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_CVS2CL\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_RCS2LOG_TRUE}" && test -z "${HAVE_RCS2LOG_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_RCS2LOG\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_RCS2LOG\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${ENSC_ENABLE_LINUXCONF_TRUE}" && test -z "${ENSC_ENABLE_LINUXCONF_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"ENSC_ENABLE_LINUXCONF\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"ENSC_ENABLE_LINUXCONF\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${ENSC_ENABLE_INTERNAL_HEADERS_TRUE}" && test -z "${ENSC_ENABLE_INTERNAL_HEADERS_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"ENSC_ENABLE_INTERNAL_HEADERS\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"ENSC_ENABLE_INTERNAL_HEADERS\" 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 util-vserver $as_me 0.29, 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 + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to ." +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +util-vserver config.status 0.29 +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 +# +# INIT-COMMANDS section. +# + +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + +_ACEOF + + + +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_config_target in $ac_config_targets +do + case "$ac_config_target" in + # Handling of arguments. + "util-vserver.spec" ) CONFIG_FILES="$CONFIG_FILES util-vserver.spec" ;; + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + *) { { 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 + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +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,@AMTAR@,$AMTAR,;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,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t +s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t +s,@MAINT@,$MAINT,;t t +s,@CXX@,$CXX,;t t +s,@CXXFLAGS@,$CXXFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CXX@,$ac_ct_CXX,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@DEPDIR@,$DEPDIR,;t t +s,@am__include@,$am__include,;t t +s,@am__quote@,$am__quote,;t t +s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t +s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t +s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t +s,@CXXDEPMODE@,$CXXDEPMODE,;t t +s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t +s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@CCDEPMODE@,$CCDEPMODE,;t t +s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t +s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t +s,@LN_S@,$LN_S,;t t +s,@RANLIB@,$RANLIB,;t t +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t +s,@kernelincludedir@,$kernelincludedir,;t t +s,@vserverdir@,$vserverdir,;t t +s,@CVS2CL_TAG@,$CVS2CL_TAG,;t t +s,@CVS2CL@,$CVS2CL,;t t +s,@HAVE_CVS2CL_TRUE@,$HAVE_CVS2CL_TRUE,;t t +s,@HAVE_CVS2CL_FALSE@,$HAVE_CVS2CL_FALSE,;t t +s,@RCS2LOG@,$RCS2LOG,;t t +s,@HAVE_RCS2LOG_TRUE@,$HAVE_RCS2LOG_TRUE,;t t +s,@HAVE_RCS2LOG_FALSE@,$HAVE_RCS2LOG_FALSE,;t t +s,@ENSC_ENABLE_LINUXCONF_TRUE@,$ENSC_ENABLE_LINUXCONF_TRUE,;t t +s,@ENSC_ENABLE_LINUXCONF_FALSE@,$ENSC_ENABLE_LINUXCONF_FALSE,;t t +s,@ENSC_ENABLE_INTERNAL_HEADERS_TRUE@,$ENSC_ENABLE_INTERNAL_HEADERS_TRUE,;t t +s,@ENSC_ENABLE_INTERNAL_HEADERS_FALSE@,$ENSC_ENABLE_INTERNAL_HEADERS_FALSE,;t t +s,@CXXCPP@,$CXXCPP,;t t +s,@EGREP@,$EGREP,;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 + +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + +# +# CONFIG_HEADER section. +# + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='[ ].*$,\1#\2' +ac_dC=' ' +ac_dD=',;t' +# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='$,\1#\2define\3' +ac_uC=' ' +ac_uD=',;t' + +for ac_file in : $CONFIG_HEADERS; 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 + + test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + + # 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; }; } + # Do quote $f, to prevent DOS paths from being IFS'd. + 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; } + # Remove the trailing spaces. + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in + +_ACEOF + +# Transform confdefs.h into two sed scripts, `conftest.defines' and +# `conftest.undefs', that substitutes the proper values into +# config.h.in to produce config.h. The first handles `#define' +# templates, and the second `#undef' templates. +# And first: Protect against being on the right side of a sed subst in +# config.status. Protect against being in an unquoted here document +# in config.status. +rm -f conftest.defines conftest.undefs +# Using a here document instead of a string reduces the quoting nightmare. +# Putting comments in sed scripts is not portable. +# +# `end' is used to avoid that the second main sed command (meant for +# 0-ary CPP macros) applies to n-ary macro definitions. +# See the Autoconf documentation for `clear'. +cat >confdef2sed.sed <<\_ACEOF +s/[\\&,]/\\&/g +s,[\\$`],\\&,g +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp +t end +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +: end +_ACEOF +# If some macros were called several times there might be several times +# the same #defines, which is useless. Nevertheless, we may not want to +# sort them, since we want the *last* AC-DEFINE to be honored. +uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines +sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs +rm -f confdef2sed.sed + +# This sed command replaces #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +cat >>conftest.undefs <<\_ACEOF +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, +_ACEOF + +# Break up conftest.defines because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS +echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS +echo ' :' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.defines >/dev/null +do + # Write a limited-size here document to $tmp/defines.sed. + echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#define' lines. + echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/defines.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines +echo ' fi # grep' >>$CONFIG_STATUS +echo >>$CONFIG_STATUS + +# Break up conftest.undefs because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #undef templates' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.undefs >/dev/null +do + # Write a limited-size here document to $tmp/undefs.sed. + echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#undef' + echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/undefs.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail + rm -f conftest.undefs + mv conftest.tail conftest.undefs +done +rm -f conftest.undefs + +cat >>$CONFIG_STATUS <<\_ACEOF + # 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 + echo "/* Generated by configure. */" >$tmp/config.h + else + echo "/* $ac_file. Generated by configure. */" >$tmp/config.h + fi + cat $tmp/in >>$tmp/config.h + rm -f $tmp/in + if test x"$ac_file" != x-; then + if diff $ac_file $tmp/config.h >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + 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; }; }; } + + rm -f $ac_file + mv $tmp/config.h $ac_file + fi + else + cat $tmp/config.h + rm -f $tmp/config.h + fi +# Compute $ac_file's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $ac_file | $ac_file:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $ac_file" >`(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'`/stamp-h$_am_stamp_count +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + +# +# CONFIG_COMMANDS section. +# +for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue + ac_dest=`echo "$ac_file" | sed 's,:.*,,'` + ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_dir=`(dirname "$ac_dest") 2>/dev/null || +$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_dest" : 'X\(//\)[^/]' \| \ + X"$ac_dest" : 'X\(//\)$' \| \ + X"$ac_dest" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_dest" | + 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 + + + { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 +echo "$as_me: executing $ac_dest commands" >&6;} + case $ac_dest in + depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # So let's grep whole file. + if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then + dirpart=`(dirname "$mf") 2>/dev/null || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + else + continue + fi + grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue + # Extract the definition of DEP_FILES from the Makefile without + # running `make'. + DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` + test -z "$DEPDIR" && continue + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n -e '/^U = / s///p' < "$mf"` + test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" + # We invoke sed twice because it is the simplest approach to + # changing $(DEPDIR) to its actual value in the expansion. + for file in `sed -n -e ' + /^DEP_FILES = .*\\\\$/ { + s/^DEP_FILES = // + :loop + s/\\\\$// + p + n + /\\\\$/ b loop + p + } + /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`(dirname "$file") 2>/dev/null || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$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 $dirpart/$fdir + else + as_dir=$dirpart/$fdir + 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 $dirpart/$fdir" >&5 +echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} + { (exit 1); exit 1; }; }; } + + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done + ;; + 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..5091147 --- /dev/null +++ b/configure.ac @@ -0,0 +1,111 @@ +dnl $Id: configure.ac,v 1.1.2.1.2.31 2004/02/11 21:06:17 ensc Exp $ + +dnl Copyright (C) 2003 Enrico Scholz +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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +dnl +dnl +dnl As a special exception to the GNU General Public License, if you +dnl distribute this file as part of a program that contains a configuration +dnl script generated by Autoconf, you may include it under the same +dnl distribution terms that you use for the rest of that program. +dnl + +AC_PREREQ(2.57) + +AC_INIT(util-vserver, 0.29, enrico.scholz@informatik.tu-chemnitz.de) +AC_CONFIG_SRCDIR([src/capchroot.c]) +AC_CONFIG_HEADER([config.h]) + +AM_INIT_AUTOMAKE([gnu dist-bzip2 subdir-objects]) +AM_MAINTAINER_MODE + + +# Checks for programs. +AC_PROG_CXX +AC_PROG_CC +AC_PROG_INSTALL +AC_PROG_LN_S +AC_PROG_RANLIB +AM_PROG_CC_C_O + +ENSC_CHECK_CC_FLAG([-std=c99 -Wall -pedantic -W -Wno-unused-parameter]) +ENSC_CHECK_CXX_FLAG([-ansi -Wall -pedantic -W -fmessage-length=0]) + +AC_ARG_VAR(CC, [The C compiler]) +ENSC_KERNEL_HEADERS(kernelincludedir) +ENSC_UV_VROOTDIR(vserverdir) +ENSC_CHANGELOG([SYSCALL_SWITCH]) + +dnl Check whether to enable linuxconf +AC_MSG_CHECKING([whether to enable linuxconf modules]) +AC_ARG_ENABLE([linuxconf], + [AC_HELP_STRING([--enable-linuxconf], + [enable 'newvserver' linuxconf module (default: no)])], + [case "$enableval" in + yes|no) ;; + *) AC_MSG_ERROR(['$i' is not a supported value for '--enable-linuxconf']);; + esac], + [enable_linuxconf=no]) + +AM_CONDITIONAL(ENSC_ENABLE_LINUXCONF, [test x"$enable_linuxconf" = xyes]) +AC_MSG_RESULT($enable_linuxconf) + + +dnl Check whether to use external kernel headers +AC_MSG_CHECKING([whether to use internal kernel headers]) +AC_ARG_ENABLE([internal-headers], + [AC_HELP_STRING([--disable-internal-headers], + [use vserver specific headers from the kernel instead of the shipped versions (default: no)])], + [case "$enableval" in + yes|no) ;; + *) AC_MSG_ERROR(['$i' is not a supported value for '--disable-internal-headers']);; + esac], + [enable_internal_headers=yes]) + +AM_CONDITIONAL(ENSC_ENABLE_INTERNAL_HEADERS, [test x"$enable_internal_headers" = xyes]) +AC_MSG_RESULT([$enable_internal_headers]) + + +dnl Check for the APIs to be used +AC_MSG_CHECKING([for supported APIs]) +AC_ARG_ENABLE([apis], + [AC_HELP_STRING([--enable-apis=APIS], + [enable support for the given apis; possible values are: legacy,compat,v11,ALL (default: ALL)])], + [], + [enable_apis=ALL]) + +test x"$enable_apis" != xALL || enable_apis='legacy,compat,v11' +old_IFS=$IFS +IFS=,; +for i in $enable_apis; do + case "$i" in + compat) AC_DEFINE(VC_ENABLE_API_COMPAT, 1, [Enable support for compatibily syscall API]);; + legacy) AC_DEFINE(VC_ENABLE_API_LEGACY, 1, [Enable support for old, /proc parsing API]);; + v11) AC_DEFINE(VC_ENABLE_API_V11, 1, [Enable support for API of vserver 1.1.x]);; + *) AC_MSG_ERROR(['$i' is not a supported API]);; + esac +done +IFS=$old_IFS +AC_MSG_RESULT([$enable_apis]) + +ENSC_SYSCALL +ENSC_CHECK_EXT2FS_HEADER +AC_CHECK_FUNCS([vserver]) +AC_CHECK_DECLS(MS_MOVE,,,[#include ]) +AC_CHECK_TYPES(xid_t,,,[#include ]) + +AC_CONFIG_FILES([util-vserver.spec Makefile]) +AC_OUTPUT diff --git a/depcomp b/depcomp new file mode 100755 index 0000000..9e5522d --- /dev/null +++ b/depcomp @@ -0,0 +1,520 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2003-11-08.23 + +# Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Alexandre Oliva . + +case $1 in + '') + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by `PROGRAMS ARGS'. + object Object file output by `PROGRAMS ARGS'. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputing dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to . +EOF + exit 0 + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit 0 + ;; +esac + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi +# `libtool' can also be set to `yes' or `no'. + +if test -z "$depfile"; then + base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'` + dir=`echo "$object" | sed 's,/.*$,/,'` + if test "$dir" = "$object"; then + dir= + fi + # FIXME: should be _deps on DOS. + depfile="$dir.deps/$base" +fi + +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. + "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz +## The second -e expression handles DOS-style file names with drive letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the `deleted header file' problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. + tr ' ' ' +' < "$tmpdepfile" | +## Some versions of gcc put a space before the `:'. On the theory +## that the space means something, we add a space to the output as +## well. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like `#:fec' to the end of the + # dependency line. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ + tr ' +' ' ' >> $depfile + echo >> $depfile + + # The second pass generates a dummy entry for each header file. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> $depfile + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts `$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` + tmpdepfile="$stripped.u" + if test "$libtool" = yes; then + "$@" -Wc,-M + else + "$@" -M + fi + stat=$? + + if test -f "$tmpdepfile"; then : + else + stripped=`echo "$stripped" | sed 's,^.*/,,'` + tmpdepfile="$stripped.u" + fi + + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + + if test -f "$tmpdepfile"; then + outname="$stripped.o" + # Each line is of the form `foo.o: dependent.h'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" + sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +icc) + # Intel's C compiler understands `-MD -MF file'. However on + # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # ICC 7.0 will fill foo.d with something like + # foo.o: sub/foo.c + # foo.o: sub/foo.h + # which is wrong. We want: + # sub/foo.o: sub/foo.c + # sub/foo.o: sub/foo.h + # sub/foo.c: + # sub/foo.h: + # ICC 7.1 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using \ : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | + sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in `foo.d' instead, so we check for that too. + # Subdirectories are respected. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + + if test "$libtool" = yes; then + tmpdepfile1="$dir.libs/$base.lo.d" + tmpdepfile2="$dir.libs/$base.d" + "$@" -Wc,-MD + else + tmpdepfile1="$dir$base.o.d" + tmpdepfile2="$dir$base.d" + "$@" -MD + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + if test -f "$tmpdepfile1"; then + tmpdepfile="$tmpdepfile1" + else + tmpdepfile="$tmpdepfile2" + fi + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for `:' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + "$@" $dashmflag | + sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' ' +' < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no + for arg in "$@"; do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix="`echo $object | sed 's/^.*\././'`" + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' ' +' | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E | + sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + "$@" || exit $? + IFS=" " + for arg + do + case "$arg" in + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + echo " " >> "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/distrib/Makefile-files b/distrib/Makefile-files new file mode 100644 index 0000000..3c800d7 --- /dev/null +++ b/distrib/Makefile-files @@ -0,0 +1,33 @@ +## $Id: Makefile-files,v 1.1 2003/09/29 22:01:58 ensc Exp $ -*- makefile -*- + +## Copyright (C) 2003 Enrico Scholz +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2, or (at your option) +## any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +distrib_SCRPTS = distrib/install-mdk8.2 \ + distrib/install-post.sh \ + distrib/install-pre.sh \ + distrib/install-rh7.2 \ + distrib/install-rh7.3 \ + distrib/install-rh8.0 \ + distrib/install-rh9.0 \ + distrib/sample.sh + +distrib_DAT = distrib/mdk8.2-minimum \ + distrib/rh7.3-minimum \ + distrib/rh8.0-minimum \ + distrib/rh9.0-minimum \ + distrib/sample.conf + diff --git a/distrib/install-mdk8.2 b/distrib/install-mdk8.2 new file mode 100644 index 0000000..2688f47 --- /dev/null +++ b/distrib/install-mdk8.2 @@ -0,0 +1,69 @@ +#!/bin/sh +# $Id: install-mdk8.2,v 1.1.4.1 2003/10/30 15:17:33 ensc Exp $ --*- sh -*-- + +# Copyright (C) 2003 Enrico Scholz +# based on install-mdk8.2 by Jacques Gelinas +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +# This script creates a vserver from Mandrake 8.2 CD. Only +# the first CD is used and must be mounted in /mnt/cdrom. +# Specify the name of the vserver +# "install-mdk8.2 test" will create /vservers/test + +: ${UTIL_VSERVER_VARS:=$(dirname $0)/util-vserver-vars} +test -e "$UTIL_VSERVER_VARS" || { + echo "Can not find util-vserver installation; aborting..." + exit 1 +} +. "$UTIL_VSERVER_VARS" + +USR_LIB_VSERVER=$PKGLIBDIR + +if [ $# -lt 1 ] ; then + echo install-mdk8.2 vserver-id [ type ] + echo type minimum means, minimum package for a server + echo type large means, all packages on the first CD +elif [ -d $VROOTDIR/$1/var/lib/rpm ] ; then + echo $VROOTDIR/$1 already exist +elif [ ! -d /mnt/cdrom/Mandrake/RPMS ] ; then + echo No rpms in /mnt/cdrom/Mandrake/RPMS. Is the CD mounted \? +else + VROOT=$VROOTDIR/$1 + $USR_LIB_VSERVER/install-pre.sh $1 + mkdir -p $VROOT/proc + mount -t proc none $VROOT/proc + mkdir -p $VROOT/var/lib/rpm + rpm --root $VROOT --initdb + if [ "$2" = "minimum" ] ; then + echo `cat $USR_LIB_VSERVER/mdk8.2-minimum | wc -l` packages to install + cd /mnt/cdrom/Mandrake/RPMS + rpm --root $VROOT -Uvh `cat $USR_LIB_VSERVER/mdk8.2-minimum` + else + PKGS=`ls /mnt/cdrom/Mandrake/RPMS/*.i586.rpm | grep -v LPRng- \ + | grep -v lpr-` + + echo `(ls /mnt/cdrom/Mandrake/RPMS/*.noarch.rpm \ + ;echo $PKGS) | wc -w` packages to install + rpm --root $VROOT -Uvh \ + /mnt/cdrom/Mandrake/RPMS/*.noarch.rpm \ + $PKGS --nodeps + fi + $USR_LIB_VSERVER/install-post.sh $1 + umount $VROOT/proc +fi + + diff --git a/distrib/install-post.sh b/distrib/install-post.sh new file mode 100644 index 0000000..b1d1929 --- /dev/null +++ b/distrib/install-post.sh @@ -0,0 +1,78 @@ +#!/bin/sh + +# Copyright (C) 2003 Enrico Scholz +# based on distrib/install-post by Jacques Gelinas +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# Complete the installation of a vserver +: ${UTIL_VSERVER_VARS:=$(dirname $0)/util-vserver-vars} +test -e "$UTIL_VSERVER_VARS" || { + echo "Can not find util-vserver installation; aborting..." + exit 1 +} +. "$UTIL_VSERVER_VARS" + +USR_LIB_VSERVER=$PKGLIBDIR + +vserver_mknod() +{ + mknod $1 $2 $3 $4 + chmod $5 $1 +} + +if [ $# != 1 ] ; then + echo install-post.sh vserver +else + VROOT=$VROOTDIR/$1 + rm -fr $VROOT/dev + mkdir $VROOT/dev && chmod 755 $VROOT/dev + mkdir $VROOT/dev/pts + vserver_mknod $VROOT/dev/null c 1 3 666 + vserver_mknod $VROOT/dev/zero c 1 5 666 + vserver_mknod $VROOT/dev/full c 1 7 666 + vserver_mknod $VROOT/dev/random c 1 8 644 + vserver_mknod $VROOT/dev/urandom c 1 9 644 + vserver_mknod $VROOT/dev/tty c 5 0 666 + vserver_mknod $VROOT/dev/ptmx c 5 2 666 + test -f /etc/vservers/$1.conf || cp $USR_LIB_VSERVER/sample.conf /etc/vservers/$1.conf + test -f /etc/vservers/$1.sh || cp $USR_LIB_VSERVER/sample.sh /etc/vservers/$1.sh + echo NETWORKING=yes >$VROOT/etc/sysconfig/network + echo HOSTNAME=$1 >>$VROOT/etc/sysconfig/network + ( + cd $VROOT/etc/rc.d/init.d || cd $VROOT/etc/init.d + for serv in * + do + case $serv in + *.bak|*~|functions|killall|halt|single) + ;; + *) + $USR_LIB_VSERVER/capchroot $VROOTDIR/$1 /sbin/chkconfig --level 2345 $serv off + ;; + esac + done + rm -f $VROOT/etc/rc.d/rc6.d/S*reboot + ) + if [ ! -f $VROOT/etc/fstab ] ; then + echo /dev/hdv1 / ext2 defaults 1 1 >$VROOT/etc/fstab + echo /dev/hdv1 / ext2 rw 1 1 >$VROOT/etc/mtab + fi + cp -a $USR_LIB_VSERVER/vreboot $VROOT/sbin/. + ln -sf vreboot $VROOT/sbin/vhalt + if [ -x /etc/vservers/install-post.sh ]; then + /etc/vservers/install-post.sh $VROOT + fi +fi + diff --git a/distrib/install-pre.sh b/distrib/install-pre.sh new file mode 100644 index 0000000..ce0e26f --- /dev/null +++ b/distrib/install-pre.sh @@ -0,0 +1,54 @@ +#!/bin/sh + +# Copyright (C) 2003 Enrico Scholz +# based on distrib/install-pre by Jacques Gelinas +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +: ${UTIL_VSERVER_VARS:=$(dirname $0)/util-vserver-vars} +test -e "$UTIL_VSERVER_VARS" || { + echo "Can not find util-vserver installation; aborting..." + exit 1 +} +. "$UTIL_VSERVER_VARS" + +vserver_mknod() +{ + mknod $1 $2 $3 $4 + chmod $5 $1 +} + +if [ $# != 1 ] ; then + echo install-pre.sh vserver +else + mkdir -p /etc/vservers + mkdir -p $VROOTDIR 2>/dev/null + VROOT=$VROOTDIR/$1 + mkdir -p -m755 $VROOT + chattr -t $VROOT + rm -fr $VROOT/dev + mkdir -p $VROOT/dev && chmod 755 $VROOT/dev + mkdir $VROOT/dev/pts + vserver_mknod $VROOT/dev/null c 1 3 666 + vserver_mknod $VROOT/dev/zero c 1 5 666 + vserver_mknod $VROOT/dev/full c 1 7 666 + vserver_mknod $VROOT/dev/random c 1 8 644 + vserver_mknod $VROOT/dev/urandom c 1 9 644 + vserver_mknod $VROOT/dev/tty c 5 0 666 + vserver_mknod $VROOT/dev/ptmx c 5 2 666 + # We fake this device to help some package managers + touch $VROOT/dev/hdv1 +fi + diff --git a/distrib/install-rh7.2 b/distrib/install-rh7.2 new file mode 100644 index 0000000..e3bd461 --- /dev/null +++ b/distrib/install-rh7.2 @@ -0,0 +1,58 @@ +#!/bin/sh +# $Id: install-rh7.2,v 1.1.4.2 2004/02/06 22:20:29 ensc Exp $ --*- sh -*-- + +# Copyright (C) 2003 Enrico Scholz +# based on distrib/install-rh7.2 by Jacques Gelinas +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# This script creates a vserver from RedHat 7.2 CD. Only +# the first CD is used and must be mounted in /mnt/cdrom. +# Specify the name of the vserver +# "install-rh7.2 test" will create /vservers/test + +: ${UTIL_VSERVER_VARS:=$(dirname $0)/util-vserver-vars} +test -e "$UTIL_VSERVER_VARS" || { + echo "Can not find util-vserver installation; aborting..." + exit 1 +} +. "$UTIL_VSERVER_VARS" + +USR_LIB_VSERVER=$PKGLIBDIR + +if [ $# != 1 ] ; then + echo install-rh7.2 vserver-id +elif [ -d $VROOTDIR/$1/var/lib/rpm ] ; then + echo $VROOTDIR/$1 already exist +elif [ ! -d /mnt/cdrom/RedHat/RPMS ] ; then + echo No rpms in /mnt/cdrom/RedHat/RPMS. Is the CD mounted \? +else + echo `ls /mnt/cdrom/RedHat/RPMS/*.noarch.rpm \ + /mnt/cdrom/RedHat/RPMS/*.i386.rpm | wc -l` packages to install + VROOT=$VROOTDIR/$1 + mkdir -p -m755 $VROOT + chattr -t $VROOT + mkdir -p $VROOT/proc + mount -t proc none $VROOT/proc + mkdir -p $VROOT/var/lib/rpm + rpm --root $VROOT --initdb + rpm --root $VROOT -Uvh \ + /mnt/cdrom/RedHat/RPMS/*.noarch.rpm \ + /mnt/cdrom/RedHat/RPMS/*.i386.rpm + $USR_LIB_VSERVER/install-post.sh $1 + umount $VROOT/proc +fi + + diff --git a/distrib/install-rh7.3 b/distrib/install-rh7.3 new file mode 100644 index 0000000..5a84f8e --- /dev/null +++ b/distrib/install-rh7.3 @@ -0,0 +1,66 @@ +#!/bin/sh +# $Id: install-rh7.3,v 1.1.4.2 2004/02/06 22:20:29 ensc Exp $ --*- sh -*-- + +# Copyright (C) 2003 Enrico Scholz +# based on distrib/install-rh7.3 by Jacques Gelinas +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# This script creates a vserver from RedHat 7.3 CD. Only +# the first CD is used and must be mounted in /mnt/cdrom. +# Specify the name of the vserver +# "install-rh7.3 test" will create /vservers/test + +: ${UTIL_VSERVER_VARS:=$(dirname $0)/util-vserver-vars} +test -e "$UTIL_VSERVER_VARS" || { + echo "Can not find util-vserver installation; aborting..." + exit 1 +} +. "$UTIL_VSERVER_VARS" + +USR_LIB_VSERVER=$PKGLIBDIR + +if [ $# -lt 1 ] ; then + echo install-rh7.3 vserver-id [ type ] + echo type minimum means, minimum package for a server + echo type large means, all packages on the first CD +elif [ -d $VROOTDIR/$1/var/lib/rpm ] ; then + echo $VROOTDIR/$1 already exist +elif [ ! -d /mnt/cdrom/RedHat/RPMS ] ; then + echo No rpms in /mnt/cdrom/RedHat/RPMS. Is the CD mounted \? +else + VROOT=$VROOTDIR/$1 + mkdir -p -m755 $VROOT + chattr -t $VROOT + mkdir -p $VROOT/proc + mount -t proc none $VROOT/proc + mkdir -p $VROOT/var/lib/rpm + rpm --root $VROOT --initdb + if [ "$2" = "minimum" ] ; then + echo `cat $USR_LIB_VSERVER/rh7.3-minimum | wc -l` packages to install + cd /mnt/cdrom/RedHat/RPMS + rpm --root $VROOT -Uvh `cat $USR_LIB_VSERVER/rh7.3-minimum` + else + echo `ls /mnt/cdrom/RedHat/RPMS/*.noarch.rpm \ + /mnt/cdrom/RedHat/RPMS/*.i386.rpm | wc -l` packages to install + rpm --root $VROOT -Uvh \ + /mnt/cdrom/RedHat/RPMS/*.noarch.rpm \ + /mnt/cdrom/RedHat/RPMS/*.i386.rpm --nodeps + fi + $USR_LIB_VSERVER/install-post.sh $1 + umount $VROOT/proc +fi + + diff --git a/distrib/install-rh8.0 b/distrib/install-rh8.0 new file mode 100644 index 0000000..d455f18 --- /dev/null +++ b/distrib/install-rh8.0 @@ -0,0 +1,71 @@ +#!/bin/sh + +# Copyright (C) 2003 Enrico Scholz +# based on distrib/install-rh8.0 by Jacques Gelinas +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# This script creates a vserver from RedHat 8.0 CD. Only +# the first CD is used and must be mounted in /mnt/cdrom. +# Specify the name of the vserver +# "install-rh8.0 test" will create /vservers/test + +: ${UTIL_VSERVER_VARS:=$(dirname $0)/util-vserver-vars} +test -e "$UTIL_VSERVER_VARS" || { + echo "Can not find util-vserver installation; aborting..." + exit 1 +} +. "$UTIL_VSERVER_VARS" + +USR_LIB_VSERVER=$PKGLIBDIR + +if [ $# -lt 1 ] ; then + echo install-rh8.0 vserver-id [ type ] + echo type minimum means, minimum package for a server + echo type large means, all packages on the first CD +elif [ -d $VROOTDIR/$1/var/lib/rpm ] ; then + echo $VROOTDIR/$1 already exist +elif [ ! -d /mnt/cdrom/RedHat/RPMS ] ; then + echo No rpms in /mnt/cdrom/RedHat/RPMS. Is the CD mounted \? +else + VROOT=$VROOTDIR/$1 + $USR_LIB_VSERVER/install-pre.sh $1 + mkdir -p $VROOT/proc + mount -t proc none $VROOT/proc + mount -t devpts none $VROOT/dev/pts + mkdir -p $VROOT/var/lib/rpm + rpm --root $VROOT --initdb + if [ "$2" = "minimum" ] ; then + echo `cat $USR_LIB_VSERVER/rh8.0-minimum | wc -l` packages to install + cd /mnt/cdrom/RedHat/RPMS + rpm --root $VROOT -Uvh `cat $USR_LIB_VSERVER/rh8.0-minimum` + else + PKGS=`ls /mnt/cdrom/RedHat/RPMS/*.noarch.rpm \ + /mnt/cdrom/RedHat/RPMS/*.i386.rpm` + for except in control-center iptables kernel-pcmcia-cs\ + nfs-utils pciutils quota rp-pppoe tcpdump \ + lokkit kudzu-devel pciutils-devel + do + PKGS=`ls $PKGS | grep -v $except` + done + echo `echo $PKGS | wc -w` packages to install + rpm --root $VROOT -Uvh $PKGS + fi + umount $VROOT/proc + umount $VROOT/dev/pts + $USR_LIB_VSERVER/install-post.sh $1 +fi + + diff --git a/distrib/install-rh9.0 b/distrib/install-rh9.0 new file mode 100644 index 0000000..7efc439 --- /dev/null +++ b/distrib/install-rh9.0 @@ -0,0 +1,72 @@ +#!/bin/sh + +# Copyright (C) 2003 Enrico Scholz +# based on distrib/install-rh9.0 by Jacques Gelinas +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# This script creates a vserver from RedHat 9.0 CD. Only +# the first CD is used and must be mounted in /mnt/cdrom. +# Specify the name of the vserver +# "install-rh9.0 test" will create /vservers/test + +: ${UTIL_VSERVER_VARS:=$(dirname $0)/util-vserver-vars} +test -e "$UTIL_VSERVER_VARS" || { + echo "Can not find util-vserver installation; aborting..." + exit 1 +} +. "$UTIL_VSERVER_VARS" + +USR_LIB_VSERVER=$PKGLIBDIR + +if [ $# -lt 1 ] ; then + echo install-rh9.0 vserver-id [ type ] + echo type minimum means, minimum package for a server + echo type large means, all packages on the first CD +elif [ -d $VROOTDIR/$1/var/lib/rpm ] ; then + echo $VROOTDIR/$1 already exist +elif [ ! -d /mnt/cdrom/RedHat/RPMS ] ; then + echo No rpms in /mnt/cdrom/RedHat/RPMS. Is the CD mounted \? +else + VROOT=$VROOTDIR/$1 + $USR_LIB_VSERVER/install-pre.sh $1 + mkdir -p $VROOT/proc + mount -t proc none $VROOT/proc + mount -t devpts none $VROOT/dev/pts + mkdir -p $VROOT/var/lib/rpm + rpm --root $VROOT --initdb + if [ "$2" = "minimum" ] ; then + echo `cat $USR_LIB_VSERVER/rh9.0-minimum | wc -l` packages to install + cd /mnt/cdrom/RedHat/RPMS + rpm --root $VROOT -Uvh `cat $USR_LIB_VSERVER/rh9.0-minimum` + else + PKGS=`ls /mnt/cdrom/RedHat/RPMS/*.noarch.rpm \ + /mnt/cdrom/RedHat/RPMS/*.i386.rpm` + for except in control-center iptables kernel-pcmcia-cs\ + nfs-utils pciutils quota rp-pppoe tcpdump \ + lokkit kudzu-devel pciutils-devel \ + redhat-config-securitylevel redhat-config-nfs + do + PKGS=`ls $PKGS | grep -v $except` + done + echo `echo $PKGS | wc -w` packages to install + rpm --root $VROOT -Uvh $PKGS --nodeps + fi + umount $VROOT/proc + umount $VROOT/dev/pts + $USR_LIB_VSERVER/install-post.sh $1 +fi + + diff --git a/distrib/mdk8.2-minimum b/distrib/mdk8.2-minimum new file mode 100644 index 0000000..344325d --- /dev/null +++ b/distrib/mdk8.2-minimum @@ -0,0 +1,179 @@ +4Suite-0.11.1-8.i386.rpm +Canna-3.5b2-62.i386.rpm +Canna-libs-3.5b2-62.i386.rpm +Distutils-1.0.2-2.noarch.rpm +MAKEDEV-3.3-4.i386.rpm +PyXML-0.7-4.i386.rpm +SysVinit-2.84-2.i386.rpm +a2ps-4.13b-19.i386.rpm +alchemist-1.0.23-1.i386.rpm +anacron-2.3-17.i386.rpm +ash-0.3.7-2.i386.rpm +at-3.1.8-23.i386.rpm +audiofile-0.2.3-1.i386.rpm +authconfig-4.2.8-4.i386.rpm +basesystem-7.0-2.noarch.rpm +bash-2.05a-13.i386.rpm +bdflush-1.5-17.i386.rpm +bzip2-1.0.2-2.i386.rpm +bzip2-libs-1.0.2-2.i386.rpm +chkconfig-1.3.5-3.i386.rpm +cpio-2.4.2-26.i386.rpm +cracklib-2.7-15.i386.rpm +cracklib-dicts-2.7-15.i386.rpm +crontabs-1.10-1.noarch.rpm +cyrus-sasl-1.5.24-25.i386.rpm +cyrus-sasl-md5-1.5.24-25.i386.rpm +cyrus-sasl-plain-1.5.24-25.i386.rpm +db1-1.85-8.i386.rpm +db2-2.4.14-10.i386.rpm +db3-3.3.11-6.i386.rpm +dev-3.3-4.i386.rpm +diffutils-2.7.2-5.i386.rpm +dosfstools-2.8-1.i386.rpm +e2fsprogs-1.27-3.i386.rpm +ed-0.2-25.i386.rpm +fam-2.6.7-6.i386.rpm +file-3.37-5.i386.rpm +filesystem-2.1.6-2.noarch.rpm +fileutils-4.1-10.i386.rpm +findutils-4.1.7-4.i386.rpm +freetype-2.0.9-2.i386.rpm +gawk-3.1.0-4.i386.rpm +gdbm-1.8.0-14.i386.rpm +glib-1.2.10-5.i386.rpm +glib2-2.0.1-2.i386.rpm +glibc-2.2.5-34.i386.rpm +glibc-common-2.2.5-34.i386.rpm +gnupg-1.0.6-5.i386.rpm +grep-2.5.1-1.i386.rpm +groff-1.17.2-12.i386.rpm +groff-perl-1.17.2-12.i386.rpm +gzip-1.3.3-1.i386.rpm +htdig-3.2.0-2.011302.i386.rpm +indexhtml-7.3-3.noarch.rpm +info-4.1-1.i386.rpm +initscripts-6.67-1.i386.rpm +iputils-20020124-3.i386.rpm +less-358-24.i386.rpm +libcap-1.10-8.i386.rpm +libghttp-1.0.9-2.i386.rpm +libjpeg-6b-19.i386.rpm +libmng-1.0.3-2.i386.rpm +libogg-1.0rc3-1.i386.rpm +libpng-1.0.12-2.i386.rpm +libstdc++-2.96-110.i386.rpm +libtermcap-2.0.8-28.i386.rpm +libtiff-3.5.7-2.i386.rpm +libtool-libs-1.4.2-7.i386.rpm +libunicode-0.4-6.i386.rpm +libuser-0.50.2-1.i386.rpm +libvorbis-1.0rc3-1.i386.rpm +libxml-1.8.17-3.i386.rpm +libxml2-2.4.19-4.i386.rpm +libxslt-1.0.15-1.i386.rpm +logrotate-3.6.4-1.i386.rpm +losetup-2.11n-12.i386.rpm +m4-1.4.1-7.i386.rpm +mailcap-2.1.9-2.noarch.rpm +mailx-8.1.1-22.i386.rpm +make-3.79.1-8.i386.rpm +man-1.5j-6.i386.rpm +man-pages-1.48-2.noarch.rpm +mktemp-1.5-14.i386.rpm +mount-2.11n-12.i386.rpm +mpage-2.5.1-9.i386.rpm +ncurses-5.2-26.i386.rpm +netpbm-9.24-3.i386.rpm +netpbm-progs-9.24-3.i386.rpm +newt-0.50.35-1.i386.rpm +nhpf-1.42-2.i386.rpm +ntsysv-1.3.5-3.i386.rpm +openldap-2.0.23-4.i386.rpm +openssh-3.1p1-3.i386.rpm +openssh-clients-3.1p1-3.i386.rpm +openssl-0.9.6b-18.i386.rpm +pam-0.75-32.i386.rpm +passwd-0.67-1.i386.rpm +patch-2.5.4-12.i386.rpm +pcre-3.9-2.i386.rpm +perl-5.6.1-34.99.6.i386.rpm +perl-CGI-2.752-34.99.6.i386.rpm +perl-CPAN-1.59_54-34.99.6.i386.rpm +perl-DB_File-1.75-34.99.6.i386.rpm +perl-DateManip-5.40-15.i386.rpm +perl-Digest-MD5-2.16-15.i386.rpm +perl-File-MMagic-1.13-14.i386.rpm +perl-HTML-Parser-3.26-2.i386.rpm +perl-HTML-Tagset-3.03-14.i386.rpm +perl-MIME-Base64-2.12-14.i386.rpm +perl-NDBM_File-1.75-34.99.6.i386.rpm +perl-NKF-1.71-2.i386.rpm +perl-Parse-Yapp-1.05-15.i386.rpm +perl-Storable-1.0.14-15.i386.rpm +perl-URI-1.17-16.i386.rpm +perl-XML-Dumper-0.4-12.noarch.rpm +perl-XML-Encoding-1.01-9.noarch.rpm +perl-XML-Grove-0.46alpha-11.noarch.rpm +perl-XML-Parser-2.30-15.i386.rpm +perl-XML-Twig-2.02-9.noarch.rpm +perl-libnet-1.0901-17.i386.rpm +perl-libwww-perl-5.63-9.i386.rpm +perl-libxml-enno-1.02-15.i386.rpm +perl-libxml-perl-0.07-14.noarch.rpm +pnm2ppa-1.04-2.i386.rpm +popt-1.6.4-7x.18.i386.rpm +portmap-4.0-41.i386.rpm +procmail-3.22-5.i386.rpm +procps-2.0.7-12.i386.rpm +psmisc-20.2-2.i386.rpm +pspell-0.12.2-8.i386.rpm +psutils-1.17-13.i386.rpm +pwdb-0.61.2-2.i386.rpm +python-1.5.2-38.i386.rpm +python-clap-1.0.0-3.noarch.rpm +python-popt-0.8.8-7.x.2.i386.rpm +python-xmlrpc-1.5.1-7.x.3.i386.rpm +python2-2.2-16.i386.rpm +readline-4.2a-4.i386.rpm +redhat-release-7.3-1.noarch.rpm +rootfiles-7.2-1.noarch.rpm +rpm-4.0.4-7x.18.i386.rpm +rpm-python-4.0.4-7x.18.i386.rpm +sed-3.02-11.i386.rpm +sendmail-8.11.6-15.i386.rpm +setup-2.5.12-1.noarch.rpm +sgml-common-0.6.3-9.noarch.rpm +sh-utils-2.0.11-14.i386.rpm +shadow-utils-20000902-7.i386.rpm +slang-1.4.5-2.i386.rpm +slocate-2.6-1.i386.rpm +specspo-7.3-4.noarch.rpm +sysklogd-1.4.1-8.i386.rpm +tar-1.13.25-4.i386.rpm +tcl-8.3.3-67.i386.rpm +tcsh-6.10-6.i386.rpm +termcap-11.0.1-10.noarch.rpm +textutils-2.0.21-1.i386.rpm +time-1.7-16.i386.rpm +tmpwatch-2.8.3-1.i386.rpm +umb-scheme-3.2-21.i386.rpm +unzip-5.50-2.i386.rpm +usermode-1.53-2.i386.rpm +utempter-0.5.2-6.i386.rpm +util-linux-2.11n-12.i386.rpm +vim-common-6.1-2.i386.rpm +vim-minimal-6.1-2.i386.rpm +vixie-cron-3.0.1-64.i386.rpm +which-2.13-3.i386.rpm +words-2-18.noarch.rpm +xinetd-2.3.4-0.8.i386.rpm +xml-common-0.6.3-9.noarch.rpm +zip-2.3-12.i386.rpm +zlib-1.1.3-25.7.i386.rpm +mingetty-1.00-1.i386.rpm +iproute-2.4.7-1.i386.rpm +modutils-2.4.14-3.i386.rpm +gmp-4.0.1-3.i386.rpm +expat-1.95.2-2.i386.rpm +net-tools-1.60-4.i386.rpm diff --git a/distrib/rh7.3-minimum b/distrib/rh7.3-minimum new file mode 100644 index 0000000..344325d --- /dev/null +++ b/distrib/rh7.3-minimum @@ -0,0 +1,179 @@ +4Suite-0.11.1-8.i386.rpm +Canna-3.5b2-62.i386.rpm +Canna-libs-3.5b2-62.i386.rpm +Distutils-1.0.2-2.noarch.rpm +MAKEDEV-3.3-4.i386.rpm +PyXML-0.7-4.i386.rpm +SysVinit-2.84-2.i386.rpm +a2ps-4.13b-19.i386.rpm +alchemist-1.0.23-1.i386.rpm +anacron-2.3-17.i386.rpm +ash-0.3.7-2.i386.rpm +at-3.1.8-23.i386.rpm +audiofile-0.2.3-1.i386.rpm +authconfig-4.2.8-4.i386.rpm +basesystem-7.0-2.noarch.rpm +bash-2.05a-13.i386.rpm +bdflush-1.5-17.i386.rpm +bzip2-1.0.2-2.i386.rpm +bzip2-libs-1.0.2-2.i386.rpm +chkconfig-1.3.5-3.i386.rpm +cpio-2.4.2-26.i386.rpm +cracklib-2.7-15.i386.rpm +cracklib-dicts-2.7-15.i386.rpm +crontabs-1.10-1.noarch.rpm +cyrus-sasl-1.5.24-25.i386.rpm +cyrus-sasl-md5-1.5.24-25.i386.rpm +cyrus-sasl-plain-1.5.24-25.i386.rpm +db1-1.85-8.i386.rpm +db2-2.4.14-10.i386.rpm +db3-3.3.11-6.i386.rpm +dev-3.3-4.i386.rpm +diffutils-2.7.2-5.i386.rpm +dosfstools-2.8-1.i386.rpm +e2fsprogs-1.27-3.i386.rpm +ed-0.2-25.i386.rpm +fam-2.6.7-6.i386.rpm +file-3.37-5.i386.rpm +filesystem-2.1.6-2.noarch.rpm +fileutils-4.1-10.i386.rpm +findutils-4.1.7-4.i386.rpm +freetype-2.0.9-2.i386.rpm +gawk-3.1.0-4.i386.rpm +gdbm-1.8.0-14.i386.rpm +glib-1.2.10-5.i386.rpm +glib2-2.0.1-2.i386.rpm +glibc-2.2.5-34.i386.rpm +glibc-common-2.2.5-34.i386.rpm +gnupg-1.0.6-5.i386.rpm +grep-2.5.1-1.i386.rpm +groff-1.17.2-12.i386.rpm +groff-perl-1.17.2-12.i386.rpm +gzip-1.3.3-1.i386.rpm +htdig-3.2.0-2.011302.i386.rpm +indexhtml-7.3-3.noarch.rpm +info-4.1-1.i386.rpm +initscripts-6.67-1.i386.rpm +iputils-20020124-3.i386.rpm +less-358-24.i386.rpm +libcap-1.10-8.i386.rpm +libghttp-1.0.9-2.i386.rpm +libjpeg-6b-19.i386.rpm +libmng-1.0.3-2.i386.rpm +libogg-1.0rc3-1.i386.rpm +libpng-1.0.12-2.i386.rpm +libstdc++-2.96-110.i386.rpm +libtermcap-2.0.8-28.i386.rpm +libtiff-3.5.7-2.i386.rpm +libtool-libs-1.4.2-7.i386.rpm +libunicode-0.4-6.i386.rpm +libuser-0.50.2-1.i386.rpm +libvorbis-1.0rc3-1.i386.rpm +libxml-1.8.17-3.i386.rpm +libxml2-2.4.19-4.i386.rpm +libxslt-1.0.15-1.i386.rpm +logrotate-3.6.4-1.i386.rpm +losetup-2.11n-12.i386.rpm +m4-1.4.1-7.i386.rpm +mailcap-2.1.9-2.noarch.rpm +mailx-8.1.1-22.i386.rpm +make-3.79.1-8.i386.rpm +man-1.5j-6.i386.rpm +man-pages-1.48-2.noarch.rpm +mktemp-1.5-14.i386.rpm +mount-2.11n-12.i386.rpm +mpage-2.5.1-9.i386.rpm +ncurses-5.2-26.i386.rpm +netpbm-9.24-3.i386.rpm +netpbm-progs-9.24-3.i386.rpm +newt-0.50.35-1.i386.rpm +nhpf-1.42-2.i386.rpm +ntsysv-1.3.5-3.i386.rpm +openldap-2.0.23-4.i386.rpm +openssh-3.1p1-3.i386.rpm +openssh-clients-3.1p1-3.i386.rpm +openssl-0.9.6b-18.i386.rpm +pam-0.75-32.i386.rpm +passwd-0.67-1.i386.rpm +patch-2.5.4-12.i386.rpm +pcre-3.9-2.i386.rpm +perl-5.6.1-34.99.6.i386.rpm +perl-CGI-2.752-34.99.6.i386.rpm +perl-CPAN-1.59_54-34.99.6.i386.rpm +perl-DB_File-1.75-34.99.6.i386.rpm +perl-DateManip-5.40-15.i386.rpm +perl-Digest-MD5-2.16-15.i386.rpm +perl-File-MMagic-1.13-14.i386.rpm +perl-HTML-Parser-3.26-2.i386.rpm +perl-HTML-Tagset-3.03-14.i386.rpm +perl-MIME-Base64-2.12-14.i386.rpm +perl-NDBM_File-1.75-34.99.6.i386.rpm +perl-NKF-1.71-2.i386.rpm +perl-Parse-Yapp-1.05-15.i386.rpm +perl-Storable-1.0.14-15.i386.rpm +perl-URI-1.17-16.i386.rpm +perl-XML-Dumper-0.4-12.noarch.rpm +perl-XML-Encoding-1.01-9.noarch.rpm +perl-XML-Grove-0.46alpha-11.noarch.rpm +perl-XML-Parser-2.30-15.i386.rpm +perl-XML-Twig-2.02-9.noarch.rpm +perl-libnet-1.0901-17.i386.rpm +perl-libwww-perl-5.63-9.i386.rpm +perl-libxml-enno-1.02-15.i386.rpm +perl-libxml-perl-0.07-14.noarch.rpm +pnm2ppa-1.04-2.i386.rpm +popt-1.6.4-7x.18.i386.rpm +portmap-4.0-41.i386.rpm +procmail-3.22-5.i386.rpm +procps-2.0.7-12.i386.rpm +psmisc-20.2-2.i386.rpm +pspell-0.12.2-8.i386.rpm +psutils-1.17-13.i386.rpm +pwdb-0.61.2-2.i386.rpm +python-1.5.2-38.i386.rpm +python-clap-1.0.0-3.noarch.rpm +python-popt-0.8.8-7.x.2.i386.rpm +python-xmlrpc-1.5.1-7.x.3.i386.rpm +python2-2.2-16.i386.rpm +readline-4.2a-4.i386.rpm +redhat-release-7.3-1.noarch.rpm +rootfiles-7.2-1.noarch.rpm +rpm-4.0.4-7x.18.i386.rpm +rpm-python-4.0.4-7x.18.i386.rpm +sed-3.02-11.i386.rpm +sendmail-8.11.6-15.i386.rpm +setup-2.5.12-1.noarch.rpm +sgml-common-0.6.3-9.noarch.rpm +sh-utils-2.0.11-14.i386.rpm +shadow-utils-20000902-7.i386.rpm +slang-1.4.5-2.i386.rpm +slocate-2.6-1.i386.rpm +specspo-7.3-4.noarch.rpm +sysklogd-1.4.1-8.i386.rpm +tar-1.13.25-4.i386.rpm +tcl-8.3.3-67.i386.rpm +tcsh-6.10-6.i386.rpm +termcap-11.0.1-10.noarch.rpm +textutils-2.0.21-1.i386.rpm +time-1.7-16.i386.rpm +tmpwatch-2.8.3-1.i386.rpm +umb-scheme-3.2-21.i386.rpm +unzip-5.50-2.i386.rpm +usermode-1.53-2.i386.rpm +utempter-0.5.2-6.i386.rpm +util-linux-2.11n-12.i386.rpm +vim-common-6.1-2.i386.rpm +vim-minimal-6.1-2.i386.rpm +vixie-cron-3.0.1-64.i386.rpm +which-2.13-3.i386.rpm +words-2-18.noarch.rpm +xinetd-2.3.4-0.8.i386.rpm +xml-common-0.6.3-9.noarch.rpm +zip-2.3-12.i386.rpm +zlib-1.1.3-25.7.i386.rpm +mingetty-1.00-1.i386.rpm +iproute-2.4.7-1.i386.rpm +modutils-2.4.14-3.i386.rpm +gmp-4.0.1-3.i386.rpm +expat-1.95.2-2.i386.rpm +net-tools-1.60-4.i386.rpm diff --git a/distrib/rh8.0-minimum b/distrib/rh8.0-minimum new file mode 100644 index 0000000..c96370f --- /dev/null +++ b/distrib/rh8.0-minimum @@ -0,0 +1,163 @@ +4Suite-[0-9]*.i386.rpm +Canna-[0-9]*.i386.rpm +Canna-libs-[0-9]*.i386.rpm +Distutils-*.noarch.rpm +MAKEDEV-[0-9]*.i386.rpm +PyXML-[0-9]*.i386.rpm +SysVinit-[0-9]*.i386.rpm +a2ps-[0-9]*.i386.rpm +alchemist-[0-9]*.i386.rpm +anacron-[0-9]*.i386.rpm +ash-[0-9]*.i386.rpm +at-[0-9]*.i386.rpm +audiofile-[0-9]*.i386.rpm +authconfig-[0-9]*.i386.rpm +basesystem-*.noarch.rpm +bash-[0-9]*.i386.rpm +bdflush-[0-9]*.i386.rpm +bzip2-[0-9]*.i386.rpm +bzip2-libs-[0-9]*.i386.rpm +chkconfig-[0-9]*.i386.rpm +cpio-[0-9]*.i386.rpm +cracklib-[0-9]*.i386.rpm +cracklib-dicts-[0-9]*.i386.rpm +crontabs-*.noarch.rpm +cyrus-sasl-[0-9]*.i386.rpm +cyrus-sasl-md5-[0-9]*.i386.rpm +db1-[0-9]*.i386.rpm +db2-[0-9]*.i386.rpm +db3-[0-9]*.i386.rpm +db4-[0-9]*.i386.rpm +libelf-[0-9]*.i386.rpm +dev-[0-9]*.i386.rpm +diffutils-[0-9]*.i386.rpm +dosfstools-[0-9]*.i386.rpm +e2fsprogs-[0-9]*.i386.rpm +ed-[0-9]*.i386.rpm +fam-[0-9]*.i386.rpm +file-[0-9]*.i386.rpm +filesystem-[0-9]*.noarch.rpm +fileutils-[0-9]*.i386.rpm +findutils-[0-9]*.i386.rpm +libacl-[0-9]*.i386.rpm +libgcc-[0-9]*.i386.rpm +freetype-[0-9]*.i386.rpm +gawk-[0-9]*.i386.rpm +gdbm-[0-9]*.i386.rpm +glib-[0-9]*.i386.rpm +glib2-[0-9]*.i386.rpm +glibc-[0-9]*.i386.rpm +glibc-common-[0-9]*.i386.rpm +gnupg-[0-9]*.i386.rpm +grep-[0-9]*.i386.rpm +groff-[0-9]*.i386.rpm +groff-perl-[0-9]*.i386.rpm +gzip-[0-9]*.i386.rpm +htdig-[0-9]*.i386.rpm +indexhtml-*.noarch.rpm +info-[0-9]*.i386.rpm +initscripts-[0-9]*.i386.rpm +iputils-[0-9]*.i386.rpm +less-[0-9]*.i386.rpm +libcap-[0-9]*.i386.rpm +libghttp-[0-9]*.i386.rpm +libjpeg-[0-9]*.i386.rpm +libmng-[0-9]*.i386.rpm +libogg-[0-9]*.i386.rpm +libpng-[0-9]*.i386.rpm +libstdc++-[0-9]*.i386.rpm +libtermcap-[0-9]*.i386.rpm +libtiff-[0-9]*.i386.rpm +libtool-libs-[0-9]*.i386.rpm +libunicode-[0-9]*.i386.rpm +libuser-[0-9]*.i386.rpm +libvorbis-[0-9]*.i386.rpm +libxml-[0-9]*.i386.rpm +libxml2-[0-9]*.i386.rpm +libxslt-[0-9]*.i386.rpm +logrotate-[0-9]*.i386.rpm +losetup-[0-9]*.i386.rpm +m4-[0-9]*.i386.rpm +mailcap-*.noarch.rpm +mailx-[0-9]*.i386.rpm +make-[0-9]*.i386.rpm +man-[0-9]*.i386.rpm +man-pages-*.noarch.rpm +mktemp-[0-9]*.i386.rpm +mount-[0-9]*.i386.rpm +mpage-[0-9]*.i386.rpm +ncurses-[0-9]*.i386.rpm +netpbm-[0-9]*.i386.rpm +newt-[0-9]*.i386.rpm +nhpf-[0-9]*.i386.rpm +ntsysv-[0-9]*.i386.rpm +openldap-[0-9]*.i386.rpm +openssh-[0-9]*.i386.rpm +openssh-clients-[0-9]*.i386.rpm +openssh-server-[0-9]*.i386.rpm +openssl-[0-9]*.i386.rpm +pam-[0-9]*.i386.rpm +passwd-[0-9]*.i386.rpm +patch-[0-9]*.i386.rpm +pcre-[0-9]*.i386.rpm +perl-[0-9]*.i386.rpm +perl-Filter-[0-9]*.i386.rpm +krb5-libs-[0-9]*.i386.rpm +libattr-[0-9]*.i386.rpm +hesiod-[0-9]*.i386.rpm +pnm2ppa-[0-9]*.i386.rpm +popt-[0-9]*.i386.rpm +portmap-[0-9]*.i386.rpm +procmail-[0-9]*.i386.rpm +procps-[0-9]*.i386.rpm +psmisc-[0-9]*.i386.rpm +pspell-[0-9]*.i386.rpm +psutils-[0-9]*.i386.rpm +pwdb-[0-9]*.i386.rpm +python-[0-9]*.i386.rpm +python-clap-*.noarch.rpm +python-popt-[0-9]*.i386.rpm +python-xmlrpc-[0-9]*.i386.rpm +python2-[0-9]*.i386.rpm +readline-[0-9]*.i386.rpm +redhat-release-*.noarch.rpm +rootfiles-*.noarch.rpm +rpm-[0-9]*.i386.rpm +sed-[0-9]*.i386.rpm +sendmail-[0-9]*.i386.rpm +setup-*.noarch.rpm +sgml-common-*.noarch.rpm +sh-utils-[0-9]*.i386.rpm +shadow-utils-[0-9]*.i386.rpm +slang-[0-9]*.i386.rpm +slocate-[0-9]*.i386.rpm +specspo-*.noarch.rpm +sysklogd-[0-9]*.i386.rpm +tar-[0-9]*.i386.rpm +tcl-[0-9]*.i386.rpm +tcsh-[0-9]*.i386.rpm +termcap-*.noarch.rpm +textutils-[0-9]*.i386.rpm +time-[0-9]*.i386.rpm +tmpwatch-[0-9]*.i386.rpm +umb-scheme-[0-9]*.i386.rpm +unzip-[0-9]*.i386.rpm +usermode-[0-9]*.i386.rpm +utempter-[0-9]*.i386.rpm +util-linux-[0-9]*.i386.rpm +vim-common-[0-9]*.i386.rpm +vim-minimal-[0-9]*.i386.rpm +vixie-cron-[0-9]*.i386.rpm +which-[0-9]*.i386.rpm +words-*.noarch.rpm +xinetd-[0-9]*.i386.rpm +xml-common-*.noarch.rpm +zip-[0-9]*.i386.rpm +zlib-[0-9]*.i386.rpm +mingetty-[0-9]*.i386.rpm +iproute-[0-9]*.i386.rpm +modutils-[0-9]*.i386.rpm +gmp-[0-9]*.i386.rpm +expat-[0-9]*.i386.rpm +net-tools-[0-9]*.i386.rpm + diff --git a/distrib/rh9.0-minimum b/distrib/rh9.0-minimum new file mode 100644 index 0000000..c96370f --- /dev/null +++ b/distrib/rh9.0-minimum @@ -0,0 +1,163 @@ +4Suite-[0-9]*.i386.rpm +Canna-[0-9]*.i386.rpm +Canna-libs-[0-9]*.i386.rpm +Distutils-*.noarch.rpm +MAKEDEV-[0-9]*.i386.rpm +PyXML-[0-9]*.i386.rpm +SysVinit-[0-9]*.i386.rpm +a2ps-[0-9]*.i386.rpm +alchemist-[0-9]*.i386.rpm +anacron-[0-9]*.i386.rpm +ash-[0-9]*.i386.rpm +at-[0-9]*.i386.rpm +audiofile-[0-9]*.i386.rpm +authconfig-[0-9]*.i386.rpm +basesystem-*.noarch.rpm +bash-[0-9]*.i386.rpm +bdflush-[0-9]*.i386.rpm +bzip2-[0-9]*.i386.rpm +bzip2-libs-[0-9]*.i386.rpm +chkconfig-[0-9]*.i386.rpm +cpio-[0-9]*.i386.rpm +cracklib-[0-9]*.i386.rpm +cracklib-dicts-[0-9]*.i386.rpm +crontabs-*.noarch.rpm +cyrus-sasl-[0-9]*.i386.rpm +cyrus-sasl-md5-[0-9]*.i386.rpm +db1-[0-9]*.i386.rpm +db2-[0-9]*.i386.rpm +db3-[0-9]*.i386.rpm +db4-[0-9]*.i386.rpm +libelf-[0-9]*.i386.rpm +dev-[0-9]*.i386.rpm +diffutils-[0-9]*.i386.rpm +dosfstools-[0-9]*.i386.rpm +e2fsprogs-[0-9]*.i386.rpm +ed-[0-9]*.i386.rpm +fam-[0-9]*.i386.rpm +file-[0-9]*.i386.rpm +filesystem-[0-9]*.noarch.rpm +fileutils-[0-9]*.i386.rpm +findutils-[0-9]*.i386.rpm +libacl-[0-9]*.i386.rpm +libgcc-[0-9]*.i386.rpm +freetype-[0-9]*.i386.rpm +gawk-[0-9]*.i386.rpm +gdbm-[0-9]*.i386.rpm +glib-[0-9]*.i386.rpm +glib2-[0-9]*.i386.rpm +glibc-[0-9]*.i386.rpm +glibc-common-[0-9]*.i386.rpm +gnupg-[0-9]*.i386.rpm +grep-[0-9]*.i386.rpm +groff-[0-9]*.i386.rpm +groff-perl-[0-9]*.i386.rpm +gzip-[0-9]*.i386.rpm +htdig-[0-9]*.i386.rpm +indexhtml-*.noarch.rpm +info-[0-9]*.i386.rpm +initscripts-[0-9]*.i386.rpm +iputils-[0-9]*.i386.rpm +less-[0-9]*.i386.rpm +libcap-[0-9]*.i386.rpm +libghttp-[0-9]*.i386.rpm +libjpeg-[0-9]*.i386.rpm +libmng-[0-9]*.i386.rpm +libogg-[0-9]*.i386.rpm +libpng-[0-9]*.i386.rpm +libstdc++-[0-9]*.i386.rpm +libtermcap-[0-9]*.i386.rpm +libtiff-[0-9]*.i386.rpm +libtool-libs-[0-9]*.i386.rpm +libunicode-[0-9]*.i386.rpm +libuser-[0-9]*.i386.rpm +libvorbis-[0-9]*.i386.rpm +libxml-[0-9]*.i386.rpm +libxml2-[0-9]*.i386.rpm +libxslt-[0-9]*.i386.rpm +logrotate-[0-9]*.i386.rpm +losetup-[0-9]*.i386.rpm +m4-[0-9]*.i386.rpm +mailcap-*.noarch.rpm +mailx-[0-9]*.i386.rpm +make-[0-9]*.i386.rpm +man-[0-9]*.i386.rpm +man-pages-*.noarch.rpm +mktemp-[0-9]*.i386.rpm +mount-[0-9]*.i386.rpm +mpage-[0-9]*.i386.rpm +ncurses-[0-9]*.i386.rpm +netpbm-[0-9]*.i386.rpm +newt-[0-9]*.i386.rpm +nhpf-[0-9]*.i386.rpm +ntsysv-[0-9]*.i386.rpm +openldap-[0-9]*.i386.rpm +openssh-[0-9]*.i386.rpm +openssh-clients-[0-9]*.i386.rpm +openssh-server-[0-9]*.i386.rpm +openssl-[0-9]*.i386.rpm +pam-[0-9]*.i386.rpm +passwd-[0-9]*.i386.rpm +patch-[0-9]*.i386.rpm +pcre-[0-9]*.i386.rpm +perl-[0-9]*.i386.rpm +perl-Filter-[0-9]*.i386.rpm +krb5-libs-[0-9]*.i386.rpm +libattr-[0-9]*.i386.rpm +hesiod-[0-9]*.i386.rpm +pnm2ppa-[0-9]*.i386.rpm +popt-[0-9]*.i386.rpm +portmap-[0-9]*.i386.rpm +procmail-[0-9]*.i386.rpm +procps-[0-9]*.i386.rpm +psmisc-[0-9]*.i386.rpm +pspell-[0-9]*.i386.rpm +psutils-[0-9]*.i386.rpm +pwdb-[0-9]*.i386.rpm +python-[0-9]*.i386.rpm +python-clap-*.noarch.rpm +python-popt-[0-9]*.i386.rpm +python-xmlrpc-[0-9]*.i386.rpm +python2-[0-9]*.i386.rpm +readline-[0-9]*.i386.rpm +redhat-release-*.noarch.rpm +rootfiles-*.noarch.rpm +rpm-[0-9]*.i386.rpm +sed-[0-9]*.i386.rpm +sendmail-[0-9]*.i386.rpm +setup-*.noarch.rpm +sgml-common-*.noarch.rpm +sh-utils-[0-9]*.i386.rpm +shadow-utils-[0-9]*.i386.rpm +slang-[0-9]*.i386.rpm +slocate-[0-9]*.i386.rpm +specspo-*.noarch.rpm +sysklogd-[0-9]*.i386.rpm +tar-[0-9]*.i386.rpm +tcl-[0-9]*.i386.rpm +tcsh-[0-9]*.i386.rpm +termcap-*.noarch.rpm +textutils-[0-9]*.i386.rpm +time-[0-9]*.i386.rpm +tmpwatch-[0-9]*.i386.rpm +umb-scheme-[0-9]*.i386.rpm +unzip-[0-9]*.i386.rpm +usermode-[0-9]*.i386.rpm +utempter-[0-9]*.i386.rpm +util-linux-[0-9]*.i386.rpm +vim-common-[0-9]*.i386.rpm +vim-minimal-[0-9]*.i386.rpm +vixie-cron-[0-9]*.i386.rpm +which-[0-9]*.i386.rpm +words-*.noarch.rpm +xinetd-[0-9]*.i386.rpm +xml-common-*.noarch.rpm +zip-[0-9]*.i386.rpm +zlib-[0-9]*.i386.rpm +mingetty-[0-9]*.i386.rpm +iproute-[0-9]*.i386.rpm +modutils-[0-9]*.i386.rpm +gmp-[0-9]*.i386.rpm +expat-[0-9]*.i386.rpm +net-tools-[0-9]*.i386.rpm + diff --git a/distrib/sample.conf b/distrib/sample.conf new file mode 100644 index 0000000..7e1b7a6 --- /dev/null +++ b/distrib/sample.conf @@ -0,0 +1,49 @@ +# Select an unused context (this is optional) +# The default is to allocate a free context on the fly +# In general you don't need to force a context +#S_CONTEXT= +# Select the IP number assigned to the virtual server +# This IP must be one IP of the server, either an interface +# or an IP alias +IPROOT=1.2.3.4 +# The netmask and broadcast are computed by default from IPROOTDEV +#IPROOTMASK= +#IPROOTBCAST= +# You can define on which device the IP alias will be done +# The IP alias will be set when the server is started and unset +# when the server is stopped +IPROOTDEV=eth0 +# Uncomment the onboot line if you want to enable this +# virtual server at boot time +#ONBOOT=yes +# You can set a different host name for the vserver +# If empty, the host name of the main server is used +S_HOSTNAME=somename.somedomain.com +# You can set a different NIS domain for the vserver +# If empty, the current on is kept +# Set it to "none" to have no NIS domain set +S_DOMAINNAME= +# You can set the priority level (nice) of all process in the vserver +# Even root won't be able to raise it +S_NICE= +# You can set various flags for the new security context +# lock: Prevent the vserver from setting new security context +# sched: Merge scheduler priority of all processes in the vserver +# so that it acts a like a single one. +# nproc: Limit the number of processes in the vserver according to ulimit +# (instead of a per user limit, this becomes a per vserver limit) +# private: No other process can join this security context. Even root +# Do not forget the quotes around the flags +S_FLAGS="lock nproc" +# You can set various ulimit flags and they will be inherited by the +# vserver. You enter here various command line argument of ulimit +# ULIMIT="-H -u 200" +# The example above, combined with the nproc S_FLAGS will limit the +# vserver to a maximum of 200 processes +ULIMIT="-H -u 1000" +# You can set various capabilities. By default, the vserver are run +# with a limited set, so you can let root run in a vserver and not +# worry about it. He can't take over the machine. In some cases +# you can to give a little more capabilities (such as CAP_NET_RAW) +# S_CAPS="CAP_NET_RAW" +S_CAPS="" diff --git a/distrib/sample.sh b/distrib/sample.sh new file mode 100755 index 0000000..8e8c047 --- /dev/null +++ b/distrib/sample.sh @@ -0,0 +1,17 @@ +#!/bin/sh +case $1 in +pre-start) + ;; +post-start) + ;; +pre-stop) + ;; +post-stop) + ;; +*) + echo $0 pre-start + echo $0 pre-stop + echo $0 post-start + echo $0 post-stop + ;; +esac diff --git a/doc/FAQ.txt b/doc/FAQ.txt new file mode 100644 index 0000000..fe4bd67 --- /dev/null +++ b/doc/FAQ.txt @@ -0,0 +1,20 @@ + + Object not found! + + The requested URL was not found on this server. If you entered + the URL manually please check your spelling and try again. + + If you think this is a server error, please contact the + [1]webmaster + +Error 404 + + + [2]remtk + ven 18 jui 2003 11:41:32 EDT + Apache/2.0.40 (Red Hat Linux) + +Références + + 1. mailto:root@localhost + 2. http://remtk/ diff --git a/doc/Makefile-files b/doc/Makefile-files new file mode 100644 index 0000000..f2c338e --- /dev/null +++ b/doc/Makefile-files @@ -0,0 +1,22 @@ +## $Id: Makefile-files,v 1.1 2003/09/29 22:01:58 ensc Exp $ -*- makefile -*- + +## Copyright (C) 2003 Enrico Scholz +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2, or (at your option) +## any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +## + +doc_DAT = doc/FAQ.txt \ + doc/changelog.txt \ + doc/intro.txt diff --git a/doc/changelog.txt b/doc/changelog.txt new file mode 100644 index 0000000..fe4bd67 --- /dev/null +++ b/doc/changelog.txt @@ -0,0 +1,20 @@ + + Object not found! + + The requested URL was not found on this server. If you entered + the URL manually please check your spelling and try again. + + If you think this is a server error, please contact the + [1]webmaster + +Error 404 + + + [2]remtk + ven 18 jui 2003 11:41:32 EDT + Apache/2.0.40 (Red Hat Linux) + +Références + + 1. mailto:root@localhost + 2. http://remtk/ diff --git a/doc/intro.txt b/doc/intro.txt new file mode 100644 index 0000000..e649a75 --- /dev/null +++ b/doc/intro.txt @@ -0,0 +1,1430 @@ + + 1. [1]Introduction [new.gif] + 1.1 [2]Who needs that [new.gif] + 2. [3]Principles [new.gif] + 2.1 [4]Non reversible isolation [new.gif] + 2.2 [5]Isolation areas [new.gif] + 2.3 [6]New system calls [new.gif] + 2.4 [7]Limiting super-user: The capabilities system [new.gif] + 2.5 [8]Enhancing the capability system [new.gif] + 2.6 [9]Playing with the new system calls [new.gif] + 2.6.1 [10]Playing with /usr/sbin/chcontext [new.gif] + 2.6.2 [11]Playing with /usr/sbin/chcontext as root [new.gif] + 2.6.3 [12]Playing with /usr/sbin/chbind [new.gif] + 2.6.4 [13]Playing with /usr/sbin/reducecap [new.gif] + 2.7 [14]Unification [new.gif] + 3. [15]Applications [new.gif] + 3.1 [16]Virtual server [new.gif] + 3.2 [17]Per user fire-wall [new.gif] + 3.3 [18]Secure server/Intrusion detection [new.gif] + 3.4 [19]Fail over servers [new.gif] + 4. [20]Installation [new.gif] + 4.1 [21]The packages [new.gif] + 4.2 [22]Setting a virtual server [new.gif] + 4.3 [23]Basic configuration of the virtual server [new.gif] + 4.4 [24]Entering the virtual server [new.gif] + 4.5 [25]Configuring the services [new.gif] + 4.6 [26]Starting/Stopping the virtual server [new.gif] + 4.7 [27]Starting/Stopping all the virtual servers [new.gif] + 4.8 [28]Restarting a virtual server from inside [new.gif] + 4.9 [29]Executing tasks at vserver start/stop time [new.gif] + 4.10 [30]Issues [new.gif] + 4.11 [31]How real is it ? [new.gif] + 5. [32]Features [new.gif] + 6. [33]Future directions [new.gif] + 6.1 [34]User controlled security box [new.gif] + 6.2 [35]Kernel enhancements [new.gif] + 6.2.1 [36]Per context disk quota [new.gif] + 6.2.2 [37]Global limits [new.gif] + 6.2.3 [38]Scheduler [new.gif] + 6.2.4 [39]Security issues [new.gif] + 6.2.4.1 [40]/dev/random [new.gif] + 6.2.4.2 [41]/dev/pts [new.gif] + 6.2.4.3 [42]Network devices [new.gif] + 7. [43]Alternative technologies [new.gif] + 7.1 [44]Virtual machines [new.gif] + 7.2 [45]Partitioning [new.gif] + 7.3 [46]Limitation of those technologies [new.gif] + 8. [47]Conclusion [new.gif] + 9. [48]Download [new.gif] + 10. [49]References [new.gif] + + Virtual private servers and security contexts + + Running independent Linux servers inside a single PC is now possible. + They offer many advantages, including higher security, flexibility and + cost reduction. + + NEW + +Introduction + + Linux computers are getting faster every day. So we should probably + end up with less, more powerful servers. Instead we are seeing more + and more servers. While there are many reasons for this trend (more + services offered), the major issue is more related to security and + administrative concerns. + + Is it possible to split a Linux server into virtual ones with as much + isolation as possible between each one, looking like real servers, yet + sharing some common tasks (monitoring, backup, ups, hardware + configuration, ...) ? + + We think so ... NEW + +Who needs that + + The short answer is everybody, or everybody managing a server. Here + are some applications: + + * Hosting: Complete general purpose hosting (Running many + independent servers in one box). + * Experimentation: You are toying with a new services and do not + want to impact the production services on the same machine. + * Education: Each student has its own server with root password. + * Personal security box: Run un-trusted applications with complete + control over their interaction with the rest of the computer and + the network. + * Managing several "versions" of the same server/project and turning + on/off each version independantly. + + Just think about all the viruses and worms out there, you end up with + a big everybody using a computer needs this. :-) NEW + +Principles + + NEW + +Non reversible isolation + + Unix and Linux have always had the chroot() system call. This call was + used to trap a process into a sub-directory. After the system-call, + the process is led to believe that the sub-directory is now the root + directory. This system call can't be reversed. In fact, the only thing + a process can do is trap itself further and further in the file-system + (calling chroot() again). + + The strategy is to introduce new system calls trapping the processes + in other areas within the server. NEW + +Isolation areas + + A virtual server is isolated from the rest of the server in 5 areas: + + * File system + The vserver is trapped into a sub-directory of the main server and + can't escape. This is done by the standard chroot() system call + found on all Unix and Linux boxes. + * Processes + The vserver can only see the processes in the same security + context. Even the root server can't see the processes in vservers, + making the root server less "dangerous" to use. A special + mechanism (context number 1) exists to view all processes though + (Limited to root in the root server). + * Networking + The vserver is assigned a host name and an IP number. The server + can only use this IP number to establish services and client + connection. Further, this restriction is transparent. + * Super user capabilities + The super user running in a vserver has less privileges than the + normal Linux root user. For example, it can't reconfigure the + networking and many aspect of the system. It can't mount devices, + can't access block devices and so on. + Roughly. the vserver super-user has full control over all files + and processes in the vserver and that's pretty much it. + * System V inter process communications + Sysv IPC resources are private to each vserver. The security + context is used as an extra key to select and assign resources. + + Those facilities are used together to create a runtime environment for + virtual servers. But they can be used independently to achieve various + goals. NEW + +New system calls + + The new system calls, as well as the existing chroot() system call are + sharing one common feature: Their effect can't be reversed. Once you + have executed one of those system call (chroot, new_s_context, + set_ipv4root), you can't get back. This affects the current process + and all the child processes. The parent process is not influenced. + + * new_s_context (int ctx) + This system call sets a new security context for the current + process. It will be inherited by all child processes. The security + context is just an id, but the system call makes sure a new unused + one is allocated. + A process can only see other processes sharing the same security + context. When the system boot, the original security context is 0. + But this one is not privileged in anyway. Processes member of the + security context 0 can only interact (and see) processes member of + context 0. + This system call isolates the processes space. + * Setting the capabilities ceiling + This is handle by the new_s_context system call as well. This + reduces the ceiling capabilities of the current process. Even + setuid sub-process can't grab more capabilities. The capability + system found since Linux 2.2 is explained later in this document. + * set_ipv4root(unsigned long ip) + This system call locks the process (and children) into using a + single IP when they communicate and when they installs a service. + This system call is a one shot. Once a process have set its IPV4 + (Internet Protocol Version 4) address to something different from + 0.0.0.0, it can't change it anymore. Children can't change it + either. + If a process tries to bind a specific IP number, it will succeed + only if this corresponds to the ipv4root (if different from + 0.0.0.0). If the process bind to any address, it will get the + ipv4root. + Basically, once a process is locked to a given ipv4root it is + forced to use this IP address to establish a service and + communicate. The restriction on services is handy: Most service + (Web servers, SQL servers) are binding to address 0.0.0.0. With + the ipv4root sets to a given IP you can have two virtual servers + using the exact same general/vanilla configuration for a given + services and running without any conflict. + This system calls isolate the IP network space. + + Those system calls are not privileged. Any user may issue them. NEW + +Limiting super-user: The capabilities system + + Once you have created a virtual environment where processes have a + limited view of the file-system, can't see processes outside of their + world and can only use a single IP number, you still must limit the + damages those processes can do. The goal is to run virtual + environments and provide some root privileges. + + How do you limit those root processes from taking over the system, or + even just re-booting it. Enter the capability system. This is not new, + but we suspect many people have never heard of it. + + In the old Unix/Linux days, user root (user ID 0) could do things + other user ID could not. All over the place in the kernel, system + calls were denying access to some resources unless the user ID of the + process (effective ID in fact) was 0. Plain zero. + + The only way a process with user ID 0 could loose some privileges was + by changing to another ID. Unfortunately this was an all or nothing + deal. Enter the capabilities. + + Today, the difference between root and the other users is the + capability set. User root has all capabilities and the other users + have none. The user ID 0 does not mean anything special anymore. There + are around 30 capabilities defined currently. A process may request to + loose a capability forever. It won't be able to get it back. + + Capabilities allows a root process to diminish its power. This is + exactly what we need to create custom super-user. A super-user process + in a virtual server would have some privileges such as binding port + below 1024, but would not be able to reconfigure the network or reboot + the machine. Check the file /usr/include/linux/capability.h to learn + which one are available. + + Note that the new system calls (new_s_context and set_ipv4root) are + not controlled by capabilities. They are by nature irreversible. Once + a virtual server is trapped in a chroot/s_context/ipv4root box, it + can't escape from the parameters of this trap. + + NEW + +Enhancing the capability system + + The Linux capability system, is still a work in progress. At some + point, we expect to see capabilities attached to programs, + generalizing the setuid concept. A setuid program would become a + program with all capability granted. + + For now, this is not available. As explained above a process may + request to loose capabilities and its child process will be trapped + with a smaller capability set. + + Well, ..., it does not work that way. Unfortunately, until + capabilities could be assigned to program, we still need a way to get + back capabilities even in a child process. So the irreversible logic + of the capabilities is kind of short circuited in the kernel. + + To solve this, we have introduced a new per-process capability ceiling + (cap_bset). This one represents the capability set inherited by child + process, including setuid root child process. Lowering this ceiling is + irreversible for a process and all its child. + + This ceiling is handled by the new_s_context system call and the + reducecap and chcontext utilities (part of the vserver package). + + Using this, we can setup a virtual server environment where root has + less capabilities, so can't reconfigure the main server. + + NEW + +Playing with the new system calls + + The vserver package provides 3 utilities to make use of the new system + calls. We will describe shortly how they work and provide few example. + We invite the reader to try those example, so it has a better feel and + trust. + + After re-booting with a kernel implementing the new system calls, and + installing the vserver package, one is ready to do experiment. You do + not need to be root to test those new utilities. None of them is + setuid either. NEW + +Playing with /usr/sbin/chcontext + + The /usr/sbin/chcontext utility is used to enter into a new security + context. The utility switch the security context and execute a + program, specified on the command line. This program is now isolated + and can't see the other processes running on the server. + + The experiment with this, start two command windows (xterm), as the + same user ID. In each window execute the following commands: + + xterm + + Using chcontext: first window + +/usr/sbin/chcontext /bin/sh +pstree +killall xterm +exit + + Using chcontext: second window + In the first window, you start the xterm command (or any command you + like). In the second window you execute chcontext. This starts a new + shell. You execute pstree and see very little. You attempt to kill the + xterm and you fail. You exit this shell and you are back seeing all + processes. + + Here is another example. You switch context and you get a new shell. + In this shell you start an xterm. Then you switch context again and + start another sub-shell. Now the sub-shell is again isolated. + +/usr/sbin/chcontext /bin/sh +pstree +xterm & +pstree +# Ok now you see your xterm +/usr/sbin/chcontext /bin/sh +pstree +# the xterm is not there, killall will fail +killall xterm +# Now we exit the shell +exit +pstree +# the xterm is there +killall xterm +# Ok, it is gone +exit +# We are back to the initial security context + + Using chcontext several times + Processes isolated using chcontext are doubly isolated: They can't see + the other processes on the server, but the other processes can't see + them either. The original security context (0) when you boot is no + better than the other: It sees only process in security context 0. + + While playing with chcontext, you will notice an exception. The + process 1 is visible from every security context. It is visible to + please utilities like pstree. But only root processes in security + context 0 are allowed to interact with it. NEW + +Playing with /usr/sbin/chcontext as root + + The new_s_context system call has a special semantic for root + processes running in security context 0 and having the CAP_SYS_ADMIN + capability: They can switch to any context they want. + + Normally, new_s_context allocates a new security context by selecting + an unused one. It walks all processes and find an ID (an integer) not + currently in use. + + But root in security context 0 is allowed to select the context it + wants. This allow the main server to control the virtual server. The + chcontext utility has the --ctx option to specify the context ID you + want. + + To help manage several virtual server, given that the security context + 0 can't see processes in other security context, it is a good thing + root in the main server (security context 0) is allowed to select a + specific context. Cool. But we also need a way to have a global + picture showing all processes in all security context. The security + context 1 is reserved for this. Security context 1 is allowed to see + all processes on the server but is not allowed to interact with them + (kill them). + + This special feature was allocated to security context 1 and not 0 + (the default when you boot) to isolate virtual servers from the main. + This way, while maintaining services on the main server, you won't + kill service in vservers accidentally. + + Here is an example showing those concepts: + +# You must be root, running X +# We start an xterm in another security context +/usr/sbin/chcontext xterm & +# We check, there is no xterm running, yet we can +# see it. +ps ax | grep xterm +# Are we running in security context 0 +# We check the s_context line in /proc/self/status +cat /proc/self/status +# Ok we in security context 0 +# Try the security context 1 +/usr/sbin/chcontext --ctx 1 ps ax | grep xterm +# Ok, we see the xterm, we try to kill it +/usr/sbin/chcontext --ctx 1 killall xterm +# No, security context 1 can see, but can't kill +# let's find out in which security context this +# xterm is running +/usr/sbin/chcontext --ctx 1 ps ax | grep xterm +# Ok, this is PID XX. We need the security context +/usr/sbin/chcontext --ctx 1 cat /proc/XX/status +# We see the s_context, this is SS. +# We want to kill this process +/usr/sbin/chcontext --ctx SS killall xterm + + chcontext as root + The /usr/sbin/vpstree and /usr/sbin/vps commands are supplied by the + vserver package. They simply runs ps and pstree in security context 1. + NEW + +Playing with /usr/sbin/chbind + + The chbind utility is used to lock a process and its children into + using a specific IP number. This applies to services and client + connection as well. Here are few examples. Execute them as root: + +# httpd is running +netstat -atn | grep ":80 " +# We see a line like this +# tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN +# Now we restart httpd, but we lock it so it +# uses only the main IP of eth0 +/usr/sbin/chbind --ip eth0 /etc/rc.d/init.d/httpd restart +netstat -atn | grep ":80 " +# Now we see a line like +# tcp 0 192.168.1.1:80 0.0.0.0:* LISTEN +# httpd.conf was not changed. +# Now, restart it normally +/etc/rc.d/init.d/httpd restart +# Now we experiment with client socket +# Log using telnet +telnet localhost +# Once logged in +netstat -atn | grep ":23 " +# You should see a line showing a connection from +# 127.0.0.1 to 127.0.0.1 like this +# tcp 0 0 127.0.0.1:23 127.0.0.1:32881 ESTABLISHED +exit +# Now we do the telnet again, bug forcing it to select a specific IP +/usr/sbin/chbind --ip eth0 telnet localhost +# Log in and then execute +netstat -atn | grep ":23 " +# You will get something like +# tcp 0 0 127.0.0.1:23 192.168.3.9:32883 ESTABLISHED + + Using /usr/sbin/chbind + NEW + +Playing with /usr/sbin/reducecap + + The reducecap utility is used to lower the capability ceiling of a + process and child process. Even setuid program won't be able to grab + more capabilities. + +# You are not root now +# What is the current capability ceiling +cat /proc/self/status +# The capBset line presents mostly 1s. +/usr/sbin/reducecap --secure /bin/sh +cat /proc/self/status +# The capBset now shows many more 0s. +# The capEff shows all 0s, you have no privilege now +# We su to root +su +cat /proc/self/status +# capEff is much better now, but there are still many 0s +# Now we try to see if we are really root +tail /var/log/messages +# So far so good, we see the content +/sbin/ifconfig eth0 +/sbin/ifconfig eth0 down +# No way, we can't configure the interface. In fact +# we have lost most privilege normally assigned to root +exit + + Using /usr/sbin/reducecap + NEW + +Unification + + Installing a virtual private server copies a linux installation inside + a sub-directory. It is a linux inside linux. If you intend to run + several vservers on the same box (which you will certainly do :-) ), + you will end up using a lot of disk space needlessly: Each vserver is + made up hundreds of megabytes of the same stuff. This is a big waste + of disk space. + + A solution is to use hard links to connect together common files. + Using the package information, we can tell which packages are shared + between various vservers, which files are configuration files and + which are not (binaries, libraries, resource files, ...). Non + configuration files may be linked together saving a huge amount of + disk space: A 2 GIG rh7.2 installation shrinks to 38megs. + + Using hard links is cool, but may be a problem. If one vserver + overwrite one file, say /bin/ls, then every vserver will inherit that + change. Not fun! The solution is to set the immutable bit on every + linked file. A file with such a bit on can't be modified, even by + root. The only way to modify it is to turn off the bit first. But + within a vserver environment, even root is not allowed to perform this + task. So linked file, turned immutable, are now safe: They can be + shared between vservers without side effects: Cool! + + Well, there is still another side effect. All vservers are now locked + with the same files. We are saving a lot of disk space, but we pay a + very heavy price for that: Vservers can't evolve independantly. + + A solution was found. A new bit call immutable-linkage-invert was + added. Combined with the immutable bit, a file may not be modified, + but may be unlinked. Unlinking a file in Unix/Linux means + disconnecting the name from the data and removing the name from the + directory. If the data is still referenced by one or more vservers, it + continue to exist on disk. So doing "rm /bin/ls" on a vserver, removes + the file /bin/ls for that vserver and that's all. If all vservers + perform this task, then /bin/ls (the data) will be forgotten completly + and the disk space will be recovered. + + Using this trick, a vserver gets back its independance. It becomes + possible to update packages by using the unlink/update sequence: + Unlink /bin/ls first and then put a new copy in place. Luckily, + package manager works this way. + + To keep this story short (probably too late :-) ), a unified vserver: + * Uses little disk space + * Can't interfere with other vservers by changing one of its file. + * Can perform package update/deletion normally using standard + practice. + + NEW + +Applications + + NEW + +Virtual server + + The first goal of this project is to create virtual servers sharing + the same machine. A virtual server operate like a normal Linux server. + It runs normal services such as telnet, mail servers, web servers, SQL + servers. In most cases, the services run using standard configuration: + The services are running unaware of the virtual server concept. + + Normal system administration is performed with ordinary admin tool. + Virtual servers have users account and a root account. + + Packages are installed using standard packages (RPMs for example). + + There are few exceptions. Some configuration can't be done inside a + virtual server. Notably the network configuration and the file-system + (mount/umount) can't be performed from a virtual server. + + NEW + +Per user fire-wall + + The set_ipv4root() system call may be used to differentiate the + various users running on an application server. If you want to setup a + fire-wall limiting what each user is doing, you have to assign one IP + per user, even if they are running application on the same server. The + chbind utility may be used to achieve that. NEW + +Secure server/Intrusion detection + + While it can be interesting to run several virtual servers in one box, + there is one concept potentially more generally useful. Imagine a + physical server running a single virtual server. The goal is isolate + the main environment from any service, any network. You boot in the + main environment, start very few services and then continue in the + virtual server. The service in the main environment could be + + * Un-reachable from the network. + * The system log daemon. While virtual server could log messages, + they would be unable to change/erase the logs. So even a cracked + virtual server would not be able the edit the log. + * Some intrusion detection facilities, potentially spying the state + of the virtual server. For example tripwire could run there and it + would be impossible to circumvent its operation or trick it. + + NEW + +Fail over servers + + One key feature of a virtual server is the independence from the + actual hardware. Most hardware issues are irrelevant for the virtual + server installation. For example: + + * Disk layout, partitions and the /etc/fstab configuration. The + virtual server has a dummy /etc/fstab. + * Network devices. + * Processor type, number of processor (kernel selection). + + The main server acts as a host and takes care of all those details. + The virtual server is just a client and ignores all the details. As + such, the client can be moved to another physical server will very few + manipulations. For example, to move the virtual server v1 from one + physical one computer to another, you do + + * Turn it off + /usr/sbin/vserver v1 stop + * Copy the file /etc/vservers/v1.conf to the new server. + * Copy all files in /vservers/v1 to the new server + * On the new server, start the vserver v1 + /usr/sbin/vserver v1 start + + As you see, there is no adjustment to do: + + * No user account merging. + * No hardware configuration to fix. + + This opens the door to fail over servers. Imagine a backup server + having a copy of many virtual servers. It can take over their tasks + with a single command. Various options exists for managing this backup + server: + + * rsync to synchronize the data. + * Network block devices to synchronize the data in real time. + * Sharing the installation over a SAN (storage area network). + * Heartbeat for automatic monitoring/fail over. + + NEW + +Installation + + NEW + +The packages + + * The kernel + We are supplying a patched 2.4.20 kernel. You will find [50]here + the kernel, the .config and the patch. + To install the kernel, just untar it. This will create a file + /boot/kernel-2.4.20ctx-17 (ctx stands for security context) and a + directory /lib/modules/2.4.20ctx-17. + Then, you need to update your boot loader. For lilo, you add a + section like this at the end of the file /etc/lilo.conf + + +image=/boot/vmlinuz-2.4.20ctx-17 + label=linux2.4.20ctx-17 + read-only + root=current + + lilo.conf section to add + Change the /dev/XXXX to your root partition. Then execute + /sbin/lilo. + Reboot and select the proper kernel. This kernel is fully + compatible with a normal 2.4.20 and will perform without any new + configuration. Note that the supplied kernel does not carry all + the features and modules found on the various distributions. + * The vserver package + This package provides the various utilities to make use of those + new system calls. The package also provides a complete solution to + implement virtual servers. We describe the major components here. + + /usr/sbin/chcontext + This is the utility to request a new security context. It can + be used to lower the capability ceiling. Execute it to learn + more. + + /usr/sbin/chbind + This is the utility to select one IP number and assign it to + a process and its children. + + /usr/sbin/newvserver (in vserver-admin) + Front-end to help create new virtual servers. + + /usr/sbin/reducecap + This utility is used to lower the capability ceiling of + children processes. + + /usr/sbin/vdu + A trimmed down "du" command reporting space usage of files + with a single link. Useful to tell how much space a unified + vserver is using. + + /usr/sbin/vkill + Locate the security context associated with a process, enter + it and kill the process. Generally used after you have + located a process with vtop, vpstree or vps. + + /usr/sbin/vps + Execute the ps command in security context 1 so all processes + in all vservers are shown. The security context and vserver + name are mapped inside the report. + + /usr/sbin/vpstree + Execute the pstree command in security context 1 so all + processes in all vservers are shown. + + /usr/sbin/vrpm + Apply an rpm command in several (or all) vservers. Useful + when you wish to update many vservers with the same package. + /usr/sbin/vrpm server1 server2 -- -Uvh /tmp/*.rpm + /usr/sbin/vrpm ALL -- -Uvh /tmp/*.rpm + After updating many packages in different vservers you may + want to re-unify them to recover disk space (and increase + cache effectivity). You can do this using the vunify command, + or simply by using the --unify option to the vrpm command. + After performing the rpm updates, vrpm will trigger the + vunify utility on the vservers for the updated packages. + /usr/sbin/vrpm --unify server1 server2 -- -Uvh /tmp/*.rpm + + /usr/sbin/vserver + This is the wrapper to start, stop and administer virtual + servers. + + /usr/sbin/vserver-stat + Produce a small report showing the activity in active + security context. The report presents the number of process + in each active security context as well as the name of the + vserver associated with this context. + + /usr/sbin/vtop + Execute the top command in security context 1 so all + processes in all vservers are shown. + + /etc/rc.d/init.d/vservers + This is an init script used to start all virtual servers at + boot time and stop them at shutdown time. Only virtual + servers with ONBOOT=yes are started at boot time. All + vservers are stopped at shutdown time. + + /etc/rc.d/init.d/rebootmgr + This is a daemon listening to requests from virtual servers. + It can either restart or stop a virtual server. The + /sbin/vreboot and /sbin/vhalt utilities are used to send + request to the reboot manager. + + /sbin/vreboot and /sbin/vhalt + Those utilities are copied in each virtual server. They + connect to the reboot manager (rebootmgr) server using the + /dev/reboot Unix domain socket and request either a restart + or a stop of the virtual server. The reboot manager issue + either a "/usr/sbin/vserver vserver restart" or + "/usr/sbin/vserver vserver stop" command. This allows the + virtual server administrator to test if all automatic service + are properly restarted at boot time. + + /usr/lib/vserver/vdu + This is a limited clone of the du command. It skips file with + more than one link. It is used to evaluate the disk usage of + an unified vserver. Using the normal du for this task is + misleading since it will count all unified files. + + NEW + +Setting a virtual server + + To set a virtual server, you need to copy in a sub-directory a Linux + installation. One way to achieve that is to copy some parts of the the + current server by issuing the command vserver XX build, where XX is + the name of the virtual server (pick one). This basically does (Well, + it does a little more than that, but this give you an idea): + +mkdir /vservers/XX +cd /vservers/XX +cp -ax /sbin /bin /etc /usr /var /dev /lib . +mkdir proc tmp home +chmod 1777 tmp + + Building a virtual server + + This is normally done using the command /usr/sbin/newvserver. This is + a text mode/graphical front-end allowing to setup the vserver runtime + and configure it. NEW + +Basic configuration of the virtual server + + A virtual private server has a few settings. They are defined in the + file /etc/vservers/XX.conf where XX is the name of the virtual server. + This is a simple script like configuration. Here are the various + parameters: + + * IPROOT + In general, each virtual server is tied to one IP using the new + set_ipv4root system call. This way several servers may run the + same services without conflict. Enter the IP number (a name is + also valid if defined in the DNS). + Since kernel ctx-12, you can assign more than one IP number to a + vserver. Enter them separated by spaces and don't forget to + enclose them with quotes. + Bu default, all IPs are configured as an IP alias on the IPROOTDEV + device (if defined). If you want to attach the various IP numbers + to different devices, specify the device as a prefix to the IP + number like this: + +IPROOT="eth0:192.168.1.2 eth1:192.168.3.1 192.168.1.4" + + IPROOT using multiple devices + In the example above, the IP 192.168.1.4 will be installed as an + IP alias on the device IPROOTDEV. + Use "IPROOT=0.0.0.0" or "IPROOT=" if you do not want to tie the + vserver at all. It will be allowed to use any IP available on the + server. + * IPROOTDEV + This is the network device use to setup the IP alias defined by + IPROOT. This is generally eth0. If you define this variable, the + IP alias will be configured when you start the virtual server and + un-configure when you stop it. + * IPROOTMASK + Netmask used to setup the IP alias. Uses the netmask of the + IPROOTDEV device by default. Seldom used. + If you have several IPs on one vserver and want to have different + netmask for each, use the following syntax: + +IPROOT="eth0:192.168.1.2 eth1:192.168.3.1/255.255.255.192" + + IPROOT using different netmask + 192.168.1.2 will use the netmask of eth0, while 192.168.3.1 will + use the specified netmask: 255.255.255.192. + * IPROOTBCAST + Broadcast address used to setup the IP alias. Uses the broadcast + of the IPROOTDEV device by default. Seldom used. + * ONBOOT + The vserver package supplies the vservers service. This service is + installed in the main server. It is used to start and stop the + virtual server at boot and shutdown time. + Virtual server with ONBOOT=yes will be started and stopped + properly like any other services of the main server. + Once a virtual server is properly configured, it is a good idea to + set this parameter to yes. + * S_CAPS + You enter here the various capability you want to grant to the + vserver. By default, a vserver is left with much less capabilities + than the root server. For example, a vserver is not allowed to use + raw socket. This explains why the ping command fails. S_CAPS lets + you enumerate the capability you want to keep in the vserver. + CAP_NET_RAW will give back ping ability for example. + * S_CONTEXT + This is optional. In general the security context ID is selected + by the kernel. An unused one is selected. If you select an ID (an + integer greater than 1), make sure you select a different one for + each server. Again, in most cases, you do not need to select one. + Leave the line commented. + * S_DOMAINNAME + A virtual server may have a different NIS domainname than the main + server. You set it here. If you leave the field empty, the vserver + will inherit the same NIS domain as the root server. Enter "none" + to reset the NIS domain name for this vserver. + * S_HOSTNAME + Many services (Apache for one) use the host name to setup some + defaults. A virtual server may have a different host name than the + main server. It is a good idea to fill this line. + * S_NICE + The is an optional priority level. It is an integer ranging + between from -20 to 19. Well it is the nice level in fact, so -20 + means the highest priority and 19 the lowest (the highest nice + level). All processes in the virtual server will be locked to this + level (or higher niceness). + Event root is locked and can't get more priority. + Note that this has limited usefulness. The kernel does not + differentiate processes running in different security context for + scheduling (for now :-) ). This means that a virtual servers + running many low priority processes may nevertheless claim a large + share of CPU. + * S_FLAGS + This is used to set various flags. Here are the supported flags: + + lock + This flags prevents the vserver from setting new security + contexts. + + sched + It kind of unifies the processes in a vserver from a + scheduler view point. All processes are weighted as single + one when compared to other processes in the real server. This + prevents a vserver from taking to much CPU resources. + + nproc + Make the ulimit maximum user process global to the vserver. + + private + Once set on a vserver security context, no other process can + enter it. Even the root server is unable to enter the + context. It can see the process list using security context + 1, but can't signal or trace the process. + + fakeinit + This assigned the current process so it works like the + process number 1. Using this trick, a normal /sbin/init may + be run in a vserver. The /usr/sbin/vserver command will use + /sbin/init to start and stop a vserver. A properly configured + /etc/inittab is needed though. + o Processes loosing their parent are reparent to this + process. + o getppid() done by child process of this process returns + 1. + o getpid() done by this process returns 1. + o This process is not shown in /proc since process number + 1 is always shown. + o An "initpid" entry is available in /proc/*/status to + tell which process is the fake init process. + * ULIMIT + This contains the command line option to the ulimit shell command. + You enter here whatever parameters accepted by ulimit. Here is the + default when you create a new vserver: + +ULIMIT="-H -u 1000" + + Default vserver ulimit + Normally ulimit settings only affects users independantly. So + limiting a vserver this way, limit each user processes + independantly in the vserver. Using special flags in the S_FLAGS + option, you can make those ulimit settings global to the vserver. + The example above used with the nproc parameter make the maximum + number of process global. In this case, a maximum of 1000 + processes is available to all users in the vserver. + + NEW + +Entering the virtual server + + It is possible to enter a virtual server context from the main server + just by executing /usr/sbin/vserver XX enter (where XX is the virtual + server name). + + This creates a shell. From there you can execute anything + administrative you normally do on a Linux server. + + NEW + +Configuring the services + + The virtual server can run pretty much any services. Many pseudo + services, such as network configuration are useless (the server is + already configured). After building the environment, enter it (without + starting the virtual server) using the vserver name enter command. + Then using a tool like Linuxconf (control/control service activity) , + or ntsysv, browse all service and keep only the needed ones. + + So after building the server, you enter it and you select the service + you need in that server. Many services such as network, and apmd are + either useless or won't run at all in the virtual server. They will + fail to start completely. NEW + +Starting/Stopping the virtual server + + Virtual server with ONBOOT=yes will be started and stopped like any + other services of the main server. But you can stop and start a + virtual server at any time. Starting a server means that all + configured service will be started. Stopping it means that all + configured services will be stopped and then all remaining process + will be killed. + + Oddly, starting a virtual server does not mean much. There is no + overhead. No monitoring process or proxy or emulator. Starting a + virtual server with 4 services is the same as running those 4 services + in the main server, at least performance wise (the service inside a + virtual server are locked inside the security context). + + The following commands may be used to control a virtual server: + + * /usr/sbin/vserver server start + * /usr/sbin/vserver server stop + * /usr/sbin/vserver server restart + * /usr/sbin/vserver server running + * /usr/sbin/vserver server enter + * /usr/sbin/vserver server exec some commands ... + * /usr/sbin/vserver server suexec user some commands ... + * /usr/sbin/vserver server service service-name + start/stop/restart/status + * /usr/sbin/vserver server status + + The running command prints if there are any processes running in the + virtual server context. + + Please note + + The processes running in a virtual server are invisible from the main + server. The opposite is true. This is very important. Managing the + main server must not cause problems to the various virtual servers. + For example, doing killall httpd will kill all the httpd processes in + the current context ( the main server or a virtual one). + + NEW + +Starting/Stopping all the virtual servers + + The sysv script /etc/rc.d/init.d/vserver is used to start and stop the + virtual server at boot and shutdown time. It may be used at any time + to operate all virtual servers. The following commands are supported: + + * /etc/rc.d/init.d/vservers start + * /etc/rc.d/init.d/vservers stop + * /etc/rc.d/init.d/vservers restart + * /etc/rc.d/init.d/vservers status + + The status command reports the running status of every virtual server. + NEW + +Restarting a virtual server from inside + + A virtual server administrator is not allowed to reboot the machine + (the kernel). But it is useful to restart his virtual server from + scratch. This allow him to make sure all the services are properly + configured to start at boot time. + + The /sbin/vreboot and /sbin/vhalt utilities are installed in each + virtual server so they can request a restart or stop. + + The rebootmgr service must be enabled in the main server. + + NEW + +Executing tasks at vserver start/stop time + + You can setup a script called /etc/vservers/XX.sh where XX is the name + of the virtual server. This script will be called four time: + + * Before starting the vserver + * After starting it. + * Before stopping it. + * After stopping it. + + You generally perform tasks such as mounting file system (mapping some + directory in the vserver root using "mount --bind"). + + Here is an example where you map the /home directory as the vserver + /home directory. + +#!/bin/sh +case $1 in +pre-start) + mount --bind /home /vservers/$2/home + ;; +post-start) + ;; +pre-stop) + ;; +post-stop) + umount /vservers/$2/home + ;; +esac + + /etc/vservers/XX.sh + NEW + +Issues + + There are some common problem you may encounter. Here they are. + + * The main server is not tied (by default) to any ipv4root. So if + the main server has already some service running they are probably + binding some UDP or TCP ports using the address 0.0.0.0. Once a + process has bound a service with the address 0.0.0.0 (see the + LISTEN lines when executing the "netstat -a" command), no other + process can bind the same port, even with a specific address. + The solution is to start the services of the main server using the + chbind utility to trap them in one ipv4root. For example + +/sbin/chbind --ip eth0 /etc/rc.d/init.d/httpd start + + Assigning on IP to a service + will limit Apache to the IP address of the eth0 interface. without + configuration changes (in httpd.conf). It is probably a good idea + to start the following services in the main server this way, + because they will be run by virtual servers as well. + + * httpd + * sshd + * xinetd + + To ease this, the vserver package supplies the following services: + v_httpd, v_sshd, v_smb and v_xinetd. Disable the corresponding + services and enable the v_ services and you will lock those services + on a single IP. + + Cleanup rc.local. This is probably not doing anything useful. + + NEW + +How real is it ? + + The project is new. So far, experiments have shown very little + restrictions. Service works the same in a virtual server. Further, + performance is the same. And there is a high level of isolation + between the various virtual servers and the main server. NEW + +Features + + There are various tricks one can use to make the virtual servers more + secure. + + * Putting a fire-wall on the box and limiting access to a virtual + services from another one. + * Using port redirection to allow one virtual server to logically + bind several IPs. One virtual server could run several web virtual + host this way. + + NEW + +Future directions + + NEW + +User controlled security box + + By combining the capabilities, the s_context, the ipv4root and the + AclFS (component of the [51]virtualfs package), we can produce a user + level tool allowing controlled access to the user own resources. For + example the user may download any program he wants and execute them + under control. Whenever the program tries to access something not + specified by the user, a popup is presented and the user may choose to + terminate the program or allow the access. + + NEW + +Kernel enhancements + + We expect to see some wider usage of the virtual servers. As usage + grow, we expect to see needs for more control. Here are some ideas. + + NEW + +Per context disk quota + + If one installs virtual servers and grant access to less trusted + users, he may want to limit the disk space used. Since a virtual + server may create new user accounts and run processes with any user ID + it wants, the current kernel disk quota is not powerful enough. First, + it can't differentiate between user ID 100 in one virtual server and + user ID 100 in another one. + + Further, the main administrator may want to control disk space + allocated to the virtual server on a server per server basis, + unrelated to the various user ID in use in those virtual servers. + + The kernel has already user and group disk quota. Adding security + context disk quota should be easily done. + + To differentiate between user IDs in virtual servers, the kernel could + coin together the security context and the user id to create a unique + ID. The kernel 2.4 now supports 32 user ID, so combining security + context and user ID in a single 32 bits number should be acceptable. + + NEW + +Global limits + + The kernel has supports for user limit (memory, processes file + handles). With virtual server, we may want to limit the resources used + by all processes in the virtual server. The security context would be + used as the key here. The following resources could be limited on a + security context basis (as opposed to user or process basis) + + * Memory used + * Processes number + (Done: This is now supported with the nproc flag in the kernel + 2.4.16ctx-4. By default a new vserver is limited to 1000 processes + maximum, configurable). + * File handles + + NEW + +Scheduler + + The scheduler may become security context aware. It could potentially + use this to provide some fairness and control priority based on + context. Currently the scheduler is process oriented and does not + group process together to qualify their priorities. For example, a + user running 10 compilations will get more CPU than another user + running a single compilation. + + Currently, it is possible to raise the nice (lower priority) for all + processes in a virtual server. This can't be reversed, so you are + setting an upper limit on priority (Just set the S_NICE variable in + the vserver configuration file). Note that a virtual server may still + start many low priority processes and this can grab significant share + of the CPU. A global per security context might be needed to really + provide more control and fairness between the various virtual servers. + + Done: The sched security context flag group all process in a vserver + so their priority is kind of unified. If you have 50 processes running + full speed in one vserver, they will take as much CPU resource than a + single process in the root server. A vserver can't starve the other... + NEW + +Security issues + + The current kernel + patch provides a fair level of isolation between + the virtual servers. User root can't take over the system: He sees + only his processes, has only access to his area of the file system + (chroot) and can't reconfigure the kernel. Yet there are some + potential problems. They are fixable. As usage grows, we will know if + they are real problems. Comments are welcome: + + NEW + +/dev/random + + Writing to /dev/random is not limited by any capability. Any root user + (virtual included) is allowed to write there. Is this a problem ? + + (kernel expert think it is ok) NEW + +/dev/pts + + /dev/pts is a virtual file-system used to allocate pseudo-tty. It + presents all the pseudo-tty in use on the server (including all + virtual server). User root is allowed to read and write to any + pseudo-tty, potentially causing problems on other vservers. + + Starting with the ctx-6 patch, /dev/pts is virtualised. Although the + file numbers are allocated from a single pool, a vserver only see the + pseudo-tty it owns. NEW + +Network devices + + Anyone can list the network devices configurations. This may inform a + virtual user that another vserver is on the same physical server. By + using as much resources as possible in his own vservers, a malicious + user could slow down the other server. Modification to the scheduler + explained above could stop this. + + Starting with the ctx-6 patch, a vserver only see the device + corresponding to its IP number. NEW + +Alternative technologies + + Using virtual servers may be a cost effective alternative to several + independent real servers. You get the administrative independence of + independent servers, but share some costs including operation costs. + + Other technologies exist offering some of the advantages talked in + this document as well as other. Two technologies are available on + various hardware platform: Virtual machines and partitioning, NEW + +Virtual machines + + This has been available for mainframes for a while now. You can boot + several different OS at once on the same server. This is mainly used + to isolate environments. For example, you can install the new version + of an OS on the same server, even while the server is running the + current version. This allows you to test and do a roll-out gracefully. + + The advantages of virtual machines are: + + * Total flexibility. You can run many different OS and different + version of the same OS, all at once. + * Robustness. You have total isolation. One OS may crash without + affecting the other. + * Resource management. You can effectively limit the resources taken + by one OS. + * Hardware Independence. The client OS is using virtual disks + provided by the host OS. + + This technology is not directly available on PCs. The Intel x86 + architecture does not support visualization natively. Some products + nevertheless have appeared and provide this. You can run Linux inside + Linux, or this other OS (Which BTW has a logo showing a window flying + in pieces, which quite frankly tells everything about it). + + The solutions available on PCs carry most of the advantages of the + virtual machines found on mainframe, except for performance. You can't + run that many virtual Linux's using this technology and expect it to + fly. One example of this technology is [52]vmware, which is quite + useful, especially if you must run this other OS... vmware may be used + to run Linux inside Linux, even test Linux installation while running + linux... NEW + +Partitioning + + Partitioning (domains ?) is a way to split the resources of a large + server so you end up with independent servers. For example, you can + take a 20 CPUs server and create 3 servers, two with 4 CPUs and one + with 12. You can very easily re-assign CPUs to servers in case you + need more for a given tasks. + + This technology provides full Independence, but much less flexibility. + If your 12 CPUs server is not working much, the 4 CPUs one can't + borrow some CPUs for 5 minutes. NEW + +Limitation of those technologies + + Oddly, one disadvantage of those technologies is a side effect of + their major advantage: Total Independence. Each virtual server is + running its own kernel. Cool. This makes the following tasks more + difficult or impossible: + + * Sharing administrative tasks such as backup. The virtual servers + are using volumes in the host server. The host server can't handle + the files in those volumes directly without interfering with the + client OS. It has to use some services of the client OS to access + the file. + The vserver solution does not have this limitation since the + virtual servers are living in the same file-system, sharing the + same kernel. + * Task monitoring. The virtual servers run their own kernel. As + such, the host OS can't spy on the tasks and check for intrusion + for example. + * Disk space. Virtual servers are using either volumes or full + devices in the host server. This space is pre-allocated to the + maximum needed by the server. You end up with a lot of wasted disk + space. Imagine running 100 virtual servers this way and allocating + say 10 gigs to each. You get the picture. The vserver solution is + sharing a common file-system so the free disk space is available + to all. + Further, if you are running the same Linux distribution in the + virtual servers, you can unify the disk space using hard link and + immutable attributes. The /usr/lib/vserver/vunify was created to + test that. Using information found in the rpm package the script + links the files, except configuration ones. + Testing vunify on a vserver installed with a RedHat 6.2 + distribution, unifying the packages glibc, binutils, perl, and + bash saved 60 megs. Quite a few packages are not changing often + and could be unified. + Vservers do not need kernel packages and hardware configuration + tools. This also contribute to save disk space. + * File system sharing + A little the same as above. You can't share file system easily + between vservers unless you use network services (often slower). + Using "mount --bind", it is very easy to "map" any directory of + the root server in several vservers, providing raw speed access + (and even sharing the disk cache). + + NEW + +Conclusion + + Virtual servers are interesting because they can provide a higher + level of security while potentially reducing the administration task. + Common operation such as backup, are shared between all servers. + Services such as monitoring may be configured once. + + A Linux server can run many services at once with a high level of + reliability. As servers are evolving, more and more services are + added, often unrelated. Unfortunately there are few details here and + there, making the server more complex than it is in reality. When one + wants to move one service to another server, it is always a little + pain: Some user accounts have to be moved and some configuration + files. A lot of hand tweaking. + + By installing services in separate virtual servers, it becomes much + easier to move services around (just by moving a directory although a + big one). + + Virtual servers may become a preferred way to install common Linux + servers. NEW + +Download + + The ftp site for this project is + [53]ftp://ftp.solucorp.qc.ca/pub/vserver . You will find there the + following components. + + * [54]kernel-2.4.20ctx-17.tar.gz + [55]kernel-2.4.20ctxsmp-17.tar.gz + A pre-compiled kernel for Pentium class machine and up. An SMP + kernel is also supplied. + * [56]vserver-0.22-1.src.rpm + The source RPM for the vserver utilities + * [57]vserver-0.22-1.i386.rpm + A compiled rpm for RedHat 7.x and up. Should work on any recent + distribution (glibc 2.2). You need a recent distribution to + operate a kernel 2.4 anyway. + * [58]vserver-admin-0.22-1.i386.rpm + Contains the command /usr/sbin/newvserver. It is a GUI to create + vservers. It requires the linuxconf-utils and linuxconf-lib + packages. You can get them from [59]here. linuxconf itself is not + needed though. + * [60]vserver-0.22.src.tar.gz + The vserver utilities source + * [61]patch-2.4.20ctx-17.gz + The patch against Linux 2.4.20 + * [62]patches + The various relative patches (ctxN-ctxN+1) + + NEW + +References + + This project is maintained by Jacques Gelinas [63]jack@solucorp.qc.ca + + The vserver package is licensed under the GNU PUBLIC LICENSE. + + A FAQ can be found at + [64]http://www.solucorp.qc.ca/howto.hc?projet=vserver + + A mailing list has been created to exchange about this project. It is + [65]vserver@solucorp.qc.ca .You can subscribe [66]here + + The mailing list is archived [67]here. + + The change logs for the vserver package are [68]here . + + The official copy of this document is found at + [69]http://www.solucorp.qc.ca/miscprj/s_context.hc + + This document was produced using the [70]TLMP documentation system + + [71]Top + [72]Back to project page + [73]About tlmpdoc and cookies + Document maintained by Jacques Gélinas ([74]jack@solucorp.qc.ca) + Last update: Wed Apr 16 11:22:22 2003 + +Références + + 1. http://remtk/solucor/miscprj/s_context.hc?s1=1&s2=0&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 2. http://remtk/solucor/miscprj/s_context.hc?s1=1&s2=1&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 3. http://remtk/solucor/miscprj/s_context.hc?s1=2&s2=0&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 4. http://remtk/solucor/miscprj/s_context.hc?s1=2&s2=1&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 5. http://remtk/solucor/miscprj/s_context.hc?s1=2&s2=2&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 6. http://remtk/solucor/miscprj/s_context.hc?s1=2&s2=3&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 7. http://remtk/solucor/miscprj/s_context.hc?s1=2&s2=4&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 8. http://remtk/solucor/miscprj/s_context.hc?s1=2&s2=5&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 9. http://remtk/solucor/miscprj/s_context.hc?s1=2&s2=6&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 10. http://remtk/solucor/miscprj/s_context.hc?s1=2&s2=6&s3=1&s4=0&full=0&prjstate=1&nodoc=0 + 11. http://remtk/solucor/miscprj/s_context.hc?s1=2&s2=6&s3=2&s4=0&full=0&prjstate=1&nodoc=0 + 12. http://remtk/solucor/miscprj/s_context.hc?s1=2&s2=6&s3=3&s4=0&full=0&prjstate=1&nodoc=0 + 13. http://remtk/solucor/miscprj/s_context.hc?s1=2&s2=6&s3=4&s4=0&full=0&prjstate=1&nodoc=0 + 14. http://remtk/solucor/miscprj/s_context.hc?s1=2&s2=7&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 15. http://remtk/solucor/miscprj/s_context.hc?s1=3&s2=0&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 16. http://remtk/solucor/miscprj/s_context.hc?s1=3&s2=1&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 17. http://remtk/solucor/miscprj/s_context.hc?s1=3&s2=2&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 18. http://remtk/solucor/miscprj/s_context.hc?s1=3&s2=3&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 19. http://remtk/solucor/miscprj/s_context.hc?s1=3&s2=4&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 20. http://remtk/solucor/miscprj/s_context.hc?s1=4&s2=0&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 21. http://remtk/solucor/miscprj/s_context.hc?s1=4&s2=1&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 22. http://remtk/solucor/miscprj/s_context.hc?s1=4&s2=2&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 23. http://remtk/solucor/miscprj/s_context.hc?s1=4&s2=3&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 24. http://remtk/solucor/miscprj/s_context.hc?s1=4&s2=4&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 25. http://remtk/solucor/miscprj/s_context.hc?s1=4&s2=5&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 26. http://remtk/solucor/miscprj/s_context.hc?s1=4&s2=6&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 27. http://remtk/solucor/miscprj/s_context.hc?s1=4&s2=7&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 28. http://remtk/solucor/miscprj/s_context.hc?s1=4&s2=8&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 29. http://remtk/solucor/miscprj/s_context.hc?s1=4&s2=9&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 30. http://remtk/solucor/miscprj/s_context.hc?s1=4&s2=10&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 31. http://remtk/solucor/miscprj/s_context.hc?s1=4&s2=11&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 32. http://remtk/solucor/miscprj/s_context.hc?s1=5&s2=0&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 33. http://remtk/solucor/miscprj/s_context.hc?s1=6&s2=0&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 34. http://remtk/solucor/miscprj/s_context.hc?s1=6&s2=1&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 35. http://remtk/solucor/miscprj/s_context.hc?s1=6&s2=2&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 36. http://remtk/solucor/miscprj/s_context.hc?s1=6&s2=2&s3=1&s4=0&full=0&prjstate=1&nodoc=0 + 37. http://remtk/solucor/miscprj/s_context.hc?s1=6&s2=2&s3=2&s4=0&full=0&prjstate=1&nodoc=0 + 38. http://remtk/solucor/miscprj/s_context.hc?s1=6&s2=2&s3=3&s4=0&full=0&prjstate=1&nodoc=0 + 39. http://remtk/solucor/miscprj/s_context.hc?s1=6&s2=2&s3=4&s4=0&full=0&prjstate=1&nodoc=0 + 40. http://remtk/solucor/miscprj/s_context.hc?s1=6&s2=2&s3=4&s4=1&full=0&prjstate=1&nodoc=0 + 41. http://remtk/solucor/miscprj/s_context.hc?s1=6&s2=2&s3=4&s4=2&full=0&prjstate=1&nodoc=0 + 42. http://remtk/solucor/miscprj/s_context.hc?s1=6&s2=2&s3=4&s4=3&full=0&prjstate=1&nodoc=0 + 43. http://remtk/solucor/miscprj/s_context.hc?s1=7&s2=0&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 44. http://remtk/solucor/miscprj/s_context.hc?s1=7&s2=1&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 45. http://remtk/solucor/miscprj/s_context.hc?s1=7&s2=2&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 46. http://remtk/solucor/miscprj/s_context.hc?s1=7&s2=3&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 47. http://remtk/solucor/miscprj/s_context.hc?s1=8&s2=0&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 48. http://remtk/solucor/miscprj/s_context.hc?s1=9&s2=0&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 49. http://remtk/solucor/miscprj/s_context.hc?s1=10&s2=0&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 50. ftp://ftp.solucorp.qc.ca/pub/vserver + 51. http://www.solucorp.qc.ca/virtualfs + 52. http://www.vmware.com/ + 53. ftp://ftp.solucorp.qc.ca/pub/vserver + 54. ftp://ftp.solucorp.qc.ca/pub/vserver/kernel-2.4.20ctx-17.tar.gz + 55. ftp://ftp.solucorp.qc.ca/pub/vserver/kernel-2.4.20ctxsmp-17.tar.gz + 56. ftp://ftp.solucorp.qc.ca/pub/vserver/vserver-0.22-1.src.rpm + 57. ftp://ftp.solucorp.qc.ca/pub/vserver/vserver-0.22-1.i386.rpm + 58. ftp://ftp.solucorp.qc.ca/pub/vserver/vserver-admin-0.22-1.i386.rpm + 59. http://www.solucorp.qc.ca/linuxconf/download.hc + 60. ftp://ftp.solucorp.qc.ca/pub/vserver/vserver-0.22.src.tar.gz + 61. ftp://ftp.solucorp.qc.ca/pub/vserver/patch-2.4.20ctx-17.gz + 62. ftp://ftp.solucorp.qc.ca/pub/vserver/patches + 63. mailto:jack@solucorp.qc.ca + 64. http://www.solucorp.qc.ca/howto.hc?projet=vserver + 65. mailto:vserver@solucorp.qc.ca + 66. http://www.solucorp.qc.ca/mlist/index.hc?list=vserver + 67. http://www.paul.sladen.org/vserver/archives/ + 68. http://www.solucorp.qc.ca/changes.hc?projet=vserver + 69. http://www.solucorp.qc.ca/miscprj/s_context.hc + 70. http://www.solucorp.qc.ca/tlmp + 71. http://remtk/solucor/miscprj/s_context.hc?s1=0&s2=0&s3=0&s4=0&full=0&prjstate=1&nodoc=0 + 72. http://remtk/solucor/miscprj/s_context.hc + 73. http://www.solucorp.qc.ca/tlmp/tlmpdoc.hc + 74. mailto:jack@solucorp.qc.ca diff --git a/install-sh b/install-sh new file mode 100755 index 0000000..f5061e7 --- /dev/null +++ b/install-sh @@ -0,0 +1,295 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2003-09-24.23 + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# 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 +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# 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= + +usage="Usage: $0 [OPTION]... SRCFILE DSTFILE + or: $0 -d DIR1 DIR2... + +In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default. +In the second, create the directory path DIR. + +Options: +-b=TRANSFORMBASENAME +-c copy source (using $cpprog) instead of moving (using $mvprog). +-d create directories instead of installing files. +-g GROUP $chgrp installed files to GROUP. +-m MODE $chmod installed files to MODE. +-o USER $chown installed files to USER. +-s strip installed files (using $stripprog). +-t=TRANSFORM +--help display this help and exit. +--version display version info and exit. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG +" + +while test -n "$1"; do + case $1 in + -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + shift + continue;; + + -c) instcmd=$cpprog + shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + --help) echo "$usage"; exit 0;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -s) stripcmd=$stripprog + shift + continue;; + + -t=*) transformarg=`echo $1 | sed 's/-t=//'` + shift + continue;; + + --version) echo "$0 $scriptversion"; exit 0;; + + *) if test -z "$src"; then + src=$1 + else + # this colon is to work around a 386BSD /bin/sh bug + : + dst=$1 + fi + shift + continue;; + esac +done + +if test -z "$src"; then + echo "$0: no input file specified." >&2 + exit 1 +fi + +# Protect names starting with `-'. +case $src in + -*) src=./$src ;; +esac + +if test -n "$dir_arg"; then + dst=$src + src= + + if test -d "$dst"; then + instcmd=: + chmodcmd= + else + instcmd=$mkdirprog + fi +else + # Waiting for this to be detected by the "$instcmd $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst ;; + esac + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + dst=$dst/`basename "$src"` + fi +fi + +# This sed command emulates the dirname command. +dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + +# Make sure that the destination directory exists. + +# Skip lots of stat calls in the usual case. +if test ! -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 test $# -ne 0 ; do + pathcomp=$pathcomp$1 + shift + test -d "$pathcomp" || $mkdirprog "$pathcomp" + pathcomp=$pathcomp/ + done +fi + +if test -n "$dir_arg"; then + $doit $instcmd "$dst" \ + && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ + && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ + && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } + +else + # If we're going to rename the final executable, determine the name now. + if test -z "$transformarg"; then + dstfile=`basename "$dst"` + else + dstfile=`basename "$dst" $transformbasename \ + | sed $transformarg`$transformbasename + fi + + # don't allow the sed command to completely eliminate the filename. + test -z "$dstfile" && dstfile=`basename "$dst"` + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 + trap '(exit $?); exit' 1 2 13 15 + + # Move or copy the file name to the temp name + $doit $instcmd "$src" "$dsttmp" && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $instcmd $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ + && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ + && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && + + # Now remove or move aside any old file at destination location. We + # try this two ways since rm can't unlink itself on some systems and + # the destination file might be busy for other reasons. In this case, + # the final cleanup might fail but the new file should still install + # successfully. + { + if test -f "$dstdir/$dstfile"; then + $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ + || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ + || { + echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 + (exit 1); exit + } + else + : + fi + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" +fi && + +# The final little trick to "correctly" pass the exit status to the exit trap. +{ + (exit 0); exit +} + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/lib/Makefile-files b/lib/Makefile-files new file mode 100644 index 0000000..fb493bc --- /dev/null +++ b/lib/Makefile-files @@ -0,0 +1,44 @@ +## $Id: Makefile-files,v 1.1.4.5 2003/11/28 23:25:49 ensc Exp $ -*- makefile -*- + +## Copyright (C) 2003 Enrico Scholz +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2, or (at your option) +## any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +## + +lib_SRCS = lib/syscall.c \ + lib/syscall_rlimit.c \ + lib/syscall_kill.c \ + lib/checkversion.c \ + lib/getctx.c \ + lib/getversion.c \ + lib/uint2str.c + +lib_HDRS = lib/vserver.h + +lib_XHDRS = lib/syscall-compat.hc \ + lib/syscall-legacy.hc \ + lib/syscall_rlimit-v11.hc \ + lib/syscall_kill-v11.hc \ + lib/getctx-compat.hc \ + lib/getctx-legacy.hc \ + lib/getversion-internal.hc \ + lib/safechroot-internal.hc \ + lib/virtual.h \ + lib/vserver-internal.h + +lib_lib_LIBS = lib/libvserver.a + +lib_libvserver_a_SOURCES = $(lib_SRCS) +lib_libvserver_a_CPPFLAGS = -I$(kernelincludedir) -D_GNU_SOURCE diff --git a/lib/checkversion.c b/lib/checkversion.c new file mode 100644 index 0000000..377ce7c --- /dev/null +++ b/lib/checkversion.c @@ -0,0 +1,43 @@ +// $Id: checkversion.c,v 1.1.2.3 2003/10/21 16:58:02 ensc Exp $ --*- c++ -*-- + +// Copyright (C) 2003 Enrico Scholz +// +// 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; version 2 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +#ifdef HAVE_CONFIG_H +# include +#endif +#include "compat.h" + +#include "vserver.h" +#include "getversion-internal.hc" + +int +utilvserver_checkCompatVersion() +{ + static int res=0; + static int v_errno; + + if (res==0) { + res = vc_get_version_internal(VC_CAT_COMPAT); + v_errno = errno; +#ifdef VC_ENABLE_API_LEGACY + if (res==-1 && (errno==ENOSYS || errno==EINVAL)) res=0; +#endif + } + + errno = v_errno; + return res; +} diff --git a/lib/getctx-compat.hc b/lib/getctx-compat.hc new file mode 100644 index 0000000..6dc5eb7 --- /dev/null +++ b/lib/getctx-compat.hc @@ -0,0 +1,30 @@ +// $Id: getctx-compat.hc,v 1.1.2.2 2003/12/30 13:45:57 ensc Exp $ --*- c++ -*-- + +// Copyright (C) 2003 Enrico Scholz +// +// 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; version 2 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +#ifndef H_UTIL_VSERVER_LIB_GETCTX_COMPAT_H +#define H_UTIL_VSERVER_LIB_GETCTX_COMPAT_H + +#include "getctx-legacy.hc" + +static inline ALWAYSINLINE xid_t +vc_X_getctx_compat(pid_t pid) +{ + return vc_X_getctx_legacy(pid); +} + +#endif // H_UTIL_VSERVER_LIB_GETCTX_COMPAT_H diff --git a/lib/getctx-legacy.hc b/lib/getctx-legacy.hc new file mode 100644 index 0000000..4f585b0 --- /dev/null +++ b/lib/getctx-legacy.hc @@ -0,0 +1,81 @@ +// $Id: getctx-legacy.hc,v 1.1.2.3 2003/12/30 13:45:57 ensc Exp $ --*- c++ -*-- + +// Copyright (C) 2003 Enrico Scholz +// +// 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; version 2 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +#ifndef H_UTIL_VSERVER_LIB_GETCTX_LEGACY_H +#define H_UTIL_VSERVER_LIB_GETCTX_LEGACY_H + +#ifdef HAVE_CONFIG_H +# include +#endif +#include "compat.h" + +#include "vserver.h" +#include "vserver-internal.h" +#include +#include +#include +#include + +#define CTX_TAG "\ns_context: " + +static xid_t +vc_X_getctx_legacy(pid_t pid) +{ + static volatile size_t bufsize=4097; + // TODO: is this really race-free? + size_t cur_bufsize = bufsize; + int fd; + char status_name[ sizeof("/proc/01234/status") ]; + char buf[cur_bufsize]; + size_t len; + char *pos = 0; + + if (pid<0 || (uint32_t)(pid)>99999) { + errno = EINVAL; + return 0; + } + + if (pid==0) strcpy(status_name, "/proc/self/status"); + else { + strcpy(status_name, "/proc/"); + len = utilvserver_uint2str(status_name+sizeof("/proc/")-1, + sizeof(status_name)-sizeof("/proc//status")+1, + pid, 10); + strcpy(status_name+sizeof("/proc/")+len-1, "/status"); + } + + fd = open(status_name, O_RDONLY); + if (fd==-1) return VC_NOCTX; + + len = read(fd, buf, cur_bufsize); + close(fd); + + if (len +// +// 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; version 2 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +#ifdef HAVE_CONFIG_H +# include +#endif +#include "compat.h" +#include "vserver.h" +#include "vserver-internal.h" + +#ifdef VC_ENABLE_API_COMPAT +# include "getctx-compat.hc" +#endif + +#ifdef VC_ENABLE_API_LEGACY +# include "getctx-legacy.hc" +#endif + +#include + +xid_t +vc_X_getctx(pid_t pid) +{ + CALL_VC(CALL_VC_COMPAT(vc_X_getctx, pid), + CALL_VC_LEGACY(vc_X_getctx, pid)); +} diff --git a/lib/getversion-internal.hc b/lib/getversion-internal.hc new file mode 100644 index 0000000..1112fbf --- /dev/null +++ b/lib/getversion-internal.hc @@ -0,0 +1,36 @@ +// $Id: getversion-internal.hc,v 1.1.2.3 2003/12/26 00:16:48 uid68581 Exp $ --*- c++ -*-- + +// Copyright (C) 2003 Enrico Scholz +// +// 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; version 2 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +#ifndef H_UTIL_VSERVER_LIB_GETVERSION_INTERNAL_H +#define H_UTIL_VSERVER_LIB_GETVERSION_INTERNAL_H + +#ifdef HAVE_CONFIG_H +# include +#endif +#include "compat.h" + +#include "vserver-internal.h" +#include "linuxvirtual.h" + +static inline ALWAYSINLINE int +vc_get_version_internal(int cat) +{ + return vserver(VC_CMD(VERSION, 0, 0), cat, 0); +} + +#endif // H_UTIL_VSERVER_LIB_GETVERSION_INTERNAL_H diff --git a/lib/getversion.c b/lib/getversion.c new file mode 100644 index 0000000..4c3c9c4 --- /dev/null +++ b/lib/getversion.c @@ -0,0 +1,30 @@ +// $Id: getversion.c,v 1.1.2.3 2004/01/26 18:19:24 ensc Exp $ --*- c++ -*-- + +// Copyright (C) 2003 Enrico Scholz +// +// 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; version 2 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +#ifdef HAVE_CONFIG_H +# include +#endif +#include "compat.h" + +#include "getversion-internal.hc" + +int +vc_get_version() +{ + return vc_get_version_internal(VC_CAT_COMPAT); +} diff --git a/lib/safechroot-internal.hc b/lib/safechroot-internal.hc new file mode 100644 index 0000000..543683e --- /dev/null +++ b/lib/safechroot-internal.hc @@ -0,0 +1,48 @@ +// $Id: safechroot-internal.hc,v 1.1.2.1 2003/10/14 15:19:14 ensc Exp $ --*- c++ -*-- + +// Copyright (C) 2003 Enrico Scholz +// +// 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; version 2 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +#ifndef H_UTIL_VSERVER_LIB_SAFECHROOT_INTERNAL_H +#define H_UTIL_VSERVER_LIB_SAFECHROOT_INTERNAL_H + +#ifdef HAVE_CONFIG_H +# include +#endif +#include "compat.h" + +#include +#include + +#ifndef NDEBUG +static void +vc_tell_unsafe_chroot() +{ + static int flag = -1; + if (flag==-1) { + char const * const e = getenv("VC_TELL_UNSAFE_CHROOT"); + flag = e ? atoi(e) : 0; + flag = flag ? 1 : 0; + } + + if (flag) write(2, "Unsafe chroot() used\n", 23); +} +#else +static ALWAYSINLINE UNUSED void vc_tell_unsafe_chroot() {} +#endif + + +#endif // H_UTIL_VSERVER_LIB_SAFECHROOT_INTERNAL_H diff --git a/lib/syscall-compat.hc b/lib/syscall-compat.hc new file mode 100644 index 0000000..306fffb --- /dev/null +++ b/lib/syscall-compat.hc @@ -0,0 +1,67 @@ +// $Id: syscall-compat.hc,v 1.1.4.7 2003/12/30 13:45:57 ensc Exp $ --*- c++ -*-- + +// Copyright (C) 2003 Enrico Scholz +// +// 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; version 2 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +#ifdef HAVE_CONFIG_H +# include +#endif +#include "compat.h" + +#include "safechroot-internal.hc" + +#include "vserver.h" +#include "vserver-internal.h" + +#include + +static inline ALWAYSINLINE int +vc_new_s_context_compat(xid_t ctx, unsigned int remove_cap, unsigned int flags) +{ + struct vcmd_new_s_context_v1 msg; + msg.remove_cap = remove_cap; + msg.flags = flags; + + return vserver(VC_CMD(COMPAT, 1, 1), CTX_USER2KERNEL(ctx), &msg); +} + +static inline ALWAYSINLINE int +vc_set_ipv4root_compat(uint32_t bcast, size_t nb, struct vc_ip_mask_pair const *ips) +{ + struct vcmd_set_ipv4root_v3 msg; + size_t i; + + if (nb>=NB_IPV4ROOT) { + errno = -EINVAL; + return -1; + } + + msg.broadcast = bcast; + + for (i=0; i +// based on syscall.cc by Jacques Gelinas +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +/* + This tells the system call number for new_s_context and set_ipv4root + using /proc/self/status. This helps until the vserver project is + included officially in the kernel (and has its own syscall). + + We rely on /proc/self/status to find the syscall number. + + If it is not there, we rely on adm/unistd.h. + + If this file does not have those system calls (not a patched kernel source) + we rely on static values in this file. +*/ +#include "safechroot-internal.hc" + +#include +#include +#include +#include +#include +#include + +// Here is the trick. We keep a copy of the define, then undef it +// and then later, we try to locate the value reading /proc/self/status +// If this fails, we have the old preserved copy. +static int def_NR_set_ipv4root = 274; +#undef __NR_set_ipv4root + +static int __NR_set_ipv4root_rev0; +static int __NR_set_ipv4root_rev1; +static int __NR_set_ipv4root_rev2; +static int __NR_set_ipv4root_rev3; +static int rev_ipv4root=0; + +#ifdef ENSC_SYSCALL_TRADITIONAL +inline static int +set_ipv4root_rev0(unsigned long ip) +{ + return syscall(__NR_set_ipv4root_rev0, ip); +} + +inline static int +set_ipv4root_rev1(unsigned long ip, unsigned long bcast) +{ + return syscall(__NR_set_ipv4root_rev1, ip, bcast); +} + +inline static int +set_ipv4root_rev2(unsigned long *ip, int nb, unsigned long bcast) +{ + return syscall(__NR_set_ipv4root_rev2, ip, nb, bcast); +} + +inline static int +set_ipv4root_rev3(unsigned long *ip, int nb, unsigned long bcast, unsigned long * mask) +{ + return syscall(__NR_set_ipv4root_rev3, ip, nb, bcast, mask); +} + +#else +inline static _syscall1(int, set_ipv4root_rev0, unsigned long, ip) +inline static _syscall2(int, set_ipv4root_rev1, unsigned long, ip, unsigned long, bcast) +inline static _syscall3(int, set_ipv4root_rev2, unsigned long *, ip, int, nb, unsigned long, bcast) +inline static _syscall4(int, set_ipv4root_rev3, unsigned long *, ip, int, nb, unsigned long, bcast, unsigned long *, mask) +#endif + +static int def_NR_new_s_context = 273; +#undef __NR_new_s_context +static int __NR_new_s_context_rev0; + //static int __NR_new_s_context_rev1; +static int rev_s_context=0; + +#ifdef ENSC_SYSCALL_TRADITIONAL +inline static int +new_s_context_rev0(int newctx, int remove_cap, int flags) +{ + return syscall(__NR_new_s_context_rev0, newctx, remove_cap, flags); +} +#else +inline static _syscall3(int, new_s_context_rev0, int, newctx, int, remove_cap, int, flags) + //static _syscall4(int, new_s_context_rev1, int, nbctx, int *, ctxs, int, remove_cap, int, flags) +#endif + +#if 0 +#undef __NR_set_ctxlimit +static int __NR_set_ctxlimit=-1; +static int rev_set_ctxlimit=-1; + +static _syscall2 (int, set_ctxlimit, int, resource, long, limit) +#endif + +static void init() +{ + static int is_init = 0; + if (!is_init){ + FILE *fin = fopen ("/proc/self/status","r"); + __NR_set_ipv4root_rev0 = def_NR_set_ipv4root; + __NR_set_ipv4root_rev1 = def_NR_set_ipv4root; + __NR_set_ipv4root_rev2 = def_NR_set_ipv4root; + __NR_set_ipv4root_rev3 = def_NR_set_ipv4root; + __NR_new_s_context_rev0 = def_NR_new_s_context; + //__NR_new_s_context_rev1 = def_NR_new_s_context; + if (fin != NULL){ + char line[100]; + while (fgets(line,sizeof(line)-1,fin)!=NULL){ + int num; + char title[100],rev[100]; + rev[0] = '\0'; + if (sscanf(line,"%s %d %s",title,&num,rev)>=2){ + if (strcmp(title,"__NR_set_ipv4root:")==0){ + __NR_set_ipv4root_rev0 = num; + __NR_set_ipv4root_rev1 = num; + __NR_set_ipv4root_rev2 = num; + __NR_set_ipv4root_rev3 = num; + if (strncmp(rev,"rev",3)==0){ + rev_ipv4root = atoi(rev+3); + } +#if 0 + }else if (strcmp(title,"__NR_set_ctxlimit:")==0){ + __NR_set_ctxlimit = num; + if (strncmp(rev,"rev",3)==0){ + rev_set_ctxlimit = atoi(rev+3); + } +#endif + }else if (strcmp(title,"__NR_new_s_context:")==0){ + __NR_new_s_context_rev0 = num; + //__NR_new_s_context_rev1 = num; + if (strncmp(rev,"rev",3)==0){ + rev_s_context = atoi(rev+3); + } + } + } + } + fclose (fin); + } + is_init = 1; + } +} + +void vc_init_legacy() +{ + init(); +} + +static ALWAYSINLINE int +vc_new_s_context_legacy(int ctx, int remove_cap, int flags) +{ + int ret = -1; + init(); + if (rev_s_context == 0){ + return new_s_context_rev0(ctx, remove_cap, flags); + }else{ + errno = -ENOSYS; + ret = -1; + } + return ret; +} + +static ALWAYSINLINE int +vc_set_ipv4root_legacy_internal ( + unsigned long ip[], + int nb, + unsigned long bcast, + unsigned long mask[]) +{ + init(); + if (rev_ipv4root == 0){ + if (nb > 1){ + fprintf (stderr,"set_ipv4root: Several IP number specified, but this kernel only supports one. Ignored\n"); + } + return set_ipv4root_rev0 (ip[0]); + }else if (rev_ipv4root == 1){ + if (nb > 1){ + fprintf (stderr,"set_ipv4root: Several IP number specified, but this kernel only supports one. Ignored\n"); + } + return set_ipv4root_rev1 (ip[0],bcast); + }else if (rev_ipv4root == 2){ + return set_ipv4root_rev2 (ip,nb,bcast); + }else if (rev_ipv4root == 3){ + return set_ipv4root_rev3 (ip,nb,bcast,mask); + } + errno = EINVAL; + return -1; +} + +static ALWAYSINLINE int +vc_set_ipv4root_legacy(uint32_t bcast, size_t nb, struct vc_ip_mask_pair const *ips) +{ + unsigned long ip[nb]; + unsigned long mask[nb]; + size_t i; + + for (i=0; i +// +// 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; version 2 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +#ifdef HAVE_CONFIG_H +# include +#endif +#include "compat.h" + +#include "vserver.h" +#include "vserver-internal.h" +#include "linuxvirtual.h" + +#ifdef VC_ENABLE_API_COMPAT +# include "syscall-compat.hc" +#endif + +#ifdef VC_ENABLE_API_LEGACY +# include "syscall-legacy.hc" +#endif + +#include +#include + +#if defined(VC_ENABLE_API_COMPAT) || defined(VC_ENABLE_API_LEGACY) + +int +vc_new_s_context(xid_t ctx, unsigned int remove_cap, unsigned int flags) +{ + CALL_VC(CALL_VC_COMPAT(vc_new_s_context, ctx, remove_cap, flags), + CALL_VC_LEGACY(vc_new_s_context, ctx, remove_cap, flags)); +} + +int +vc_set_ipv4root(uint32_t bcast, size_t nb, struct vc_ip_mask_pair const *ips) +{ + CALL_VC(CALL_VC_COMPAT(vc_set_ipv4root, bcast, nb, ips), + CALL_VC_LEGACY(vc_set_ipv4root, bcast, nb, ips)); +} + +#endif diff --git a/lib/syscall_kill-v11.hc b/lib/syscall_kill-v11.hc new file mode 100644 index 0000000..0231998 --- /dev/null +++ b/lib/syscall_kill-v11.hc @@ -0,0 +1,31 @@ +// $Id: syscall_kill-v11.hc,v 1.1.2.5 2004/01/26 18:20:18 ensc Exp $ --*- c++ -*-- + +// Copyright (C) 2003 Enrico Scholz +// +// 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; version 2 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +#ifdef HAVE_CONFIG_H +# include +#endif + +static inline ALWAYSINLINE int +vc_ctx_kill_v11(xid_t ctx, pid_t pid, int sig) +{ + struct vcmd_ctx_kill_v0 param = { 0,0 }; + param.pid = pid; + param.sig = sig; + + return vserver(VC_CMD(PROCTRL, 1, 0), ctx, ¶m); +} diff --git a/lib/syscall_kill.c b/lib/syscall_kill.c new file mode 100644 index 0000000..6e573f5 --- /dev/null +++ b/lib/syscall_kill.c @@ -0,0 +1,39 @@ +// $Id: syscall_kill.c,v 1.1.2.2 2003/12/30 13:45:57 ensc Exp $ --*- c++ -*-- + +// Copyright (C) 2003 Enrico Scholz +// +// 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; version 2 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +#ifdef HAVE_CONFIG_H +# include +#endif +#include "compat.h" + +#include "vserver.h" +#include "vserver-internal.h" +#include "linuxvirtual.h" + +#ifdef VC_ENABLE_API_V11 +# include "syscall_kill-v11.hc" +#endif + +int +vc_ctx_kill(xid_t ctx, pid_t pid, int sig) +{ + CALL_VC(CALL_VC_V11(vc_ctx_kill, ctx, pid, sig)); +} + +#if defined (VC_ENABLE_API_V11) +#endif diff --git a/lib/syscall_rlimit-v11.hc b/lib/syscall_rlimit-v11.hc new file mode 100644 index 0000000..146fb1b --- /dev/null +++ b/lib/syscall_rlimit-v11.hc @@ -0,0 +1,76 @@ +// $Id: syscall_rlimit-v11.hc,v 1.1.2.6 2003/12/30 13:45:57 ensc Exp $ --*- c++ -*-- + +// Copyright (C) 2003 Enrico Scholz +// +// 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; version 2 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +#ifdef HAVE_CONFIG_H +# include +#endif + +#define KERN2USR(LIMIT) \ + (((LIMIT)==CRLIM_INFINITY) ? VC_LIM_INFINITY : \ + ((LIMIT)==CRLIM_KEEP) ? VC_LIM_KEEP : (LIMIT)) + +#define USR2KERN(LIMIT) \ + (((LIMIT)==VC_LIM_INFINITY) ? CRLIM_INFINITY : \ + ((LIMIT)==VC_LIM_KEEP) ? CRLIM_KEEP : (LIMIT)) + +static inline ALWAYSINLINE int +vc_get_rlimit_v11(xid_t ctx, int resource, struct vc_rlimit *lim) +{ + struct vcmd_ctx_rlimit_v0 vc_lim; + int rc; + + vc_lim.id = resource; + rc = vserver(VC_CMD(RLIMIT, 1, 0), CTX_USER2KERNEL(ctx), &vc_lim); + lim->min = KERN2USR(vc_lim.minimum); + lim->soft = KERN2USR(vc_lim.softlimit); + lim->hard = KERN2USR(vc_lim.maximum); + + return rc; +} + +static inline ALWAYSINLINE int +vc_set_rlimit_v11(xid_t ctx, int resource, struct vc_rlimit const *lim) +{ + struct vcmd_ctx_rlimit_v0 vc_lim; + + vc_lim.id = resource; + vc_lim.minimum = USR2KERN(lim->min); + vc_lim.softlimit = USR2KERN(lim->soft); + vc_lim.maximum = USR2KERN(lim->hard); + + return vserver(VC_CMD(RLIMIT, 2, 0), CTX_USER2KERNEL(ctx), &vc_lim); +} + +static inline ALWAYSINLINE int +vc_get_rlimit_mask_v11(xid_t ctx, int tmp, struct vc_rlimit_mask *lim) +{ + struct vcmd_ctx_rlimit_v0 vc_lim; + int rc; + + (void)tmp; + + rc = vserver(VC_CMD(RLIMIT, 3, 0), CTX_USER2KERNEL(ctx), &vc_lim); + lim->min = vc_lim.minimum; + lim->soft = vc_lim.softlimit; + lim->hard = vc_lim.maximum; + + return rc; +} + +#undef KERN2USR +#undef USR2KERN diff --git a/lib/syscall_rlimit.c b/lib/syscall_rlimit.c new file mode 100644 index 0000000..445878c --- /dev/null +++ b/lib/syscall_rlimit.c @@ -0,0 +1,53 @@ +// $Id: syscall_rlimit.c,v 1.1.2.2 2003/12/30 13:45:56 ensc Exp $ --*- c++ -*-- + +// Copyright (C) 2003 Enrico Scholz +// +// 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; version 2 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +#ifdef HAVE_CONFIG_H +# include +#endif +#include "compat.h" + +#include "vserver.h" +#include "vserver-internal.h" +#include "linuxvirtual.h" + +#ifdef VC_ENABLE_API_V11 +# include "syscall_rlimit-v11.hc" +#endif + +#if defined (VC_ENABLE_API_V11) + +int +vc_get_rlimit(xid_t ctx, int resource, struct vc_rlimit *lim) +{ + CALL_VC(CALL_VC_V11(vc_get_rlimit, ctx, resource, lim)); +} + +int +vc_set_rlimit(xid_t ctx, int resource, struct vc_rlimit const *lim) +{ + CALL_VC(CALL_VC_V11(vc_set_rlimit, ctx, resource, lim)); +} + +int +vc_get_rlimit_mask(xid_t ctx, struct vc_rlimit_mask *lim) +{ + CALL_VC(CALL_VC_V11(vc_get_rlimit_mask, ctx, 0, lim)); +} + + +#endif diff --git a/lib/uint2str.c b/lib/uint2str.c new file mode 100644 index 0000000..5e99901 --- /dev/null +++ b/lib/uint2str.c @@ -0,0 +1,54 @@ +// $Id: uint2str.c,v 1.1.2.1 2003/10/14 15:19:14 ensc Exp $ --*- c++ -*-- + +// Copyright (C) 2003 Enrico Scholz +// +// 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; version 2 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +#ifdef HAVE_CONFIG_H +# include +#endif +#include "compat.h" + +#include +#include +#include + +size_t +utilvserver_uint2str(char *buf, size_t len, unsigned int val, unsigned char base) +{ + char *ptr = buf+len-1; + register size_t res; + if (base>=36 || len==0) return 0; + + *ptr = '\0'; + while (ptr>buf) { + unsigned char digit = val%base; + + --ptr; + *ptr = (digit<10 ? '0'+digit : + digit<36 ? 'a'+digit-10 : + (assert(false),'?')); + + val /= base; + if (val==0) break; + } + + assert(ptr>=buf && ptr<=buf+len-1); + + res = buf+len-ptr; + memmove(buf, ptr, res); + + return res-1; +} diff --git a/lib/virtual.h b/lib/virtual.h new file mode 100644 index 0000000..f55e6dd --- /dev/null +++ b/lib/virtual.h @@ -0,0 +1,121 @@ +#ifndef _LINUX_VIRTUAL_H +#define _LINUX_VIRTUAL_H + +#define VC_CATEGORY(c) (((c) >> 24) & 0x3F) +#define VC_COMMAND(c) (((c) >> 16) & 0xFF) +#define VC_VERSION(c) ((c) & 0xFFF) + +#define VC_CMD(c,i,v) ((((VC_CAT_ ## c) & 0x3F) << 24) \ + | (((i) & 0xFF) << 16) | ((v) & 0xFFF)) + +/* + + Syscall Matrix V2.2 + + |VERSION|CREATE |MODIFY |MIGRATE|CONTROL|EXPERIM| |SPECIAL|SPECIAL| + |STATS |DESTROY|ALTER |CHANGE |LIMIT |TEST | | | | + |INFO |SETUP | |MOVE | | | | | | + -------+-------+-------+-------+-------+-------+-------+ +-------+-------+ + SYSTEM |VERSION| | | | | | |DEVICES| | + HOST | 00| 01| 02| 03| 04| 05| | 06| 07| + -------+-------+-------+-------+-------+-------+-------+ +-------+-------+ + CPU | | | | | | | |SCHED. | | + PROCESS| 08| 09| 10| 11| 12| 13| | 14| 15| + -------+-------+-------+-------+-------+-------+-------+ +-------+-------+ + MEMORY | | | | | | | |SWAP | | + | 16| 17| 18| 19| 20| 21| | 22| 23| + -------+-------+-------+-------+-------+-------+-------+ +-------+-------+ + NETWORK| | | | | | | |SERIAL | | + | 24| 25| 26| 27| 28| 29| | 30| 31| + -------+-------+-------+-------+-------+-------+-------+ +-------+-------+ + DISK | | | | | | | | | | + VFS | 32| 33| 34| 35| 36| 37| | 38| 39| + -------+-------+-------+-------+-------+-------+-------+ +-------+-------+ + OTHER | | | | | | | | | | + | 40| 41| 42| 43| 44| 45| | 46| 47| + =======+=======+=======+=======+=======+=======+=======+ +=======+=======+ + SPECIAL| | | | | | | | | | + | 48| 49| 50| 51| 52| 53| | 54| 55| + -------+-------+-------+-------+-------+-------+-------+ +-------+-------+ + SPECIAL| | | | |RLIMIT |SYSCALL| | |COMPAT | + | 56| 57| 58| 59| 60|TEST 61| | 62| 63| + -------+-------+-------+-------+-------+-------+-------+ +-------+-------+ + +*/ + +#define VC_CAT_VERSION 0 + +#define VC_CAT_PROCTRL 12 + +#define VC_CAT_RLIMIT 60 + +#define VC_CAT_SYSTEST 61 +#define VC_CAT_COMPAT 63 + +/* interface version */ + +#define VCI_VERSION 0x00010001 + + + +/* query version */ + +#define VCMD_get_version VC_CMD(VERSION, 0, 0) + + +/* compatibiliy vserver commands */ + +#define VCMD_new_s_context VC_CMD(COMPAT, 1, 1) +#define VCMD_set_ipv4root VC_CMD(COMPAT, 2, 3) + +/* compatibiliy vserver arguments */ + +struct vcmd_new_s_context_v1 { + uint32_t remove_cap; + uint32_t flags; +}; + +#define NB_IPV4ROOT 16 + +struct vcmd_set_ipv4root_v3 { + /* number of pairs in id */ + uint32_t broadcast; + struct { + uint32_t ip; + uint32_t mask; + } ip_mask_pair[NB_IPV4ROOT]; +}; + +/* context signalling */ + +#define VCMD_ctx_kill VC_CMD(PROCTRL, 1, 0) + +struct vcmd_ctx_kill_v0 { + int32_t pid; + int32_t sig; +}; + +/* rlimit vserver commands */ + +#define VCMD_get_rlimit VC_CMD(RLIMIT, 1, 0) +#define VCMD_set_rlimit VC_CMD(RLIMIT, 2, 0) +#define VCMD_get_rlimit_mask VC_CMD(RLIMIT, 3, 0) + +struct vcmd_ctx_rlimit_v0 { + uint32_t id; + uint64_t minimum; + uint64_t softlimit; + uint64_t maximum; +}; + +struct vcmd_ctx_rlimit_mask_v0 { + uint32_t minimum; + uint32_t softlimit; + uint32_t maximum; +}; + +#define CRLIM_INFINITY (~0ULL) +#define CRLIM_KEEP (~1ULL) + + +#endif /* _LINUX_VIRTUAL_H */ diff --git a/lib/vserver-internal.h b/lib/vserver-internal.h new file mode 100644 index 0000000..fbccfd5 --- /dev/null +++ b/lib/vserver-internal.h @@ -0,0 +1,113 @@ +// $Id: vserver-internal.h,v 1.1.4.13 2004/02/05 03:52:45 ensc Exp $ --*- c++ -*-- + +// Copyright (C) 2003 Enrico Scholz +// +// 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; version 2 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +#ifndef H_VSERVER_SYSCALL_INTERNAL_H +#define H_VSERVER_SYSCALL_INTERNAL_H + +#include +#include +#include +#include +#include +#include + +#ifndef __NR_vserver +# define __NR_vserver 273 +#endif + +#define VC_PREFIX 0) +#define VC_SUFFIX else (void)((void)0 +#define CALL_VC_NOOP (void)0 +#define CALL_VC_GENERAL(ID, SUFFIX, FUNC, ...) \ + VC_PREFIX; VC_SELECT(ID) return FUNC ## _ ## SUFFIX(__VA_ARGS__); VC_SUFFIX + +#if 1 +# define VC_SELECT(ID) case ID: if(1) +# define CALL_VC(...) \ + switch (utilvserver_checkCompatVersion()&~0xff) { \ + case -1 & 0xff : if (1) break; \ + VC_SUFFIX, __VA_ARGS__ , VC_PREFIX; \ + default : errno = EINVAL; \ + } \ + return -1 +#else +# define VC_SELECT(ID) if (1) +# define CALL_VC(...) \ + if (1) {} VC_SUFFIX, __VA_ARGS__, VC_PREFIX; \ + errno = ENOSYS; return -1 +#endif + +#ifdef VC_ENABLE_API_COMPAT +# define CALL_VC_COMPAT(F,...) CALL_VC_GENERAL(0x00010000, compat, F, __VA_ARGS__) +#else +# define CALL_VC_COMPAT(F,...) CALL_VC_NOOP +#endif + +#ifdef VC_ENABLE_API_LEGACY +# define CALL_VC_LEGACY(F,...) CALL_VC_GENERAL(0x00000000, legacy, F, __VA_ARGS__) +#else +# define CALL_VC_LEGACY(F,...) CALL_VC_NOOP +#endif + +#ifdef VC_ENABLE_API_V11 +# define CALL_VC_V11(F,...) CALL_VC_GENERAL(0x00010000, v11, F, __VA_ARGS__) +#else +# define CALL_VC_V11(F,...) CALL_VC_NOOP +#endif + +#if 1 +# define CTX_KERNEL2USER(X) (((X)==(uint32_t)(-1)) ? VC_NOCTX : \ + ((X)==(uint32_t)(-2)) ? VC_SAMECTX : \ + (xid_t)(X)) + +# define CTX_USER2KERNEL(X) (((X)==VC_RANDCTX) ? (uint32_t)(-1) : \ + ((X)==VC_SAMECTX) ? (uint32_t)(-2) : \ + (uint32_t)(X)) +#else +# define CTX_USER2KERNEL(X) (X) +# define CTX_KERNEL2USER(X) (X) +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef HAVE_VSERVER +#ifdef ENSC_SYSCALL_TRADITIONAL +inline static UNUSED ALWAYSINLINE +int vserver(uint32_t cmd, uint32_t id, void *data) +{ + return syscall(__NR_vserver, cmd, id, data); +} +#else +inline static UNUSED ALWAYSINLINE +_syscall3(int, vserver, + uint32_t, cmd, uint32_t, id, void *, data) +#endif +#endif + +size_t utilvserver_uint2str(char *buf, size_t len, + unsigned int val, unsigned char base); +int utilvserver_checkCompatVersion(); + +#ifdef __cplusplus +} +#endif + + +#endif // H_VSERVER_SYSCALL_INTERNAL_H diff --git a/lib/vserver.h b/lib/vserver.h new file mode 100644 index 0000000..284f4a4 --- /dev/null +++ b/lib/vserver.h @@ -0,0 +1,97 @@ +/* $Id: vserver.h,v 1.1.4.11 2004/01/26 18:19:41 ensc Exp $ + +* Copyright (C) 2003 Enrico Scholz +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2, or (at your option) +* any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +#ifndef H_VSERVER_SYSCALL_H +#define H_VSERVER_SYSCALL_H + +#include +#include +#include + +/** the value which is returned in error-case (no ctx found) */ +#define VC_NOCTX ((xid_t)(-1)) +/** the value which means a random (the next free) ctx */ +#define VC_RANDCTX ((xid_t)(-1)) +/** the value which means the current ctx */ +#define VC_SAMECTX ((xid_t)(-2)) + +#define VC_LIM_INFINITY (~0ULL) +#define VC_LIM_KEEP (~1ULL) + +#ifdef __cplusplus +extern "C" { +#endif + + struct vc_ip_mask_pair { + uint32_t ip; + uint32_t mask; + }; + + /** Returns version of the current kernel API */ + int vc_get_version(); + + /** Puts current process into context , removes the given caps and + * sets flags. + * Special values for ctx are + * - VC_SAMECTX which means the current context (just for changing caps and flags) + * - VC_RANDCTX which means the next free context; this value can be used by + * ordinary users also */ + int vc_new_s_context(xid_t ctx, unsigned int remove_cap, unsigned int flags); + + /** Sets the ipv4root information. + * \precondition: nb<16 */ + int vc_set_ipv4root(uint32_t bcast, size_t nb, struct vc_ip_mask_pair const *ips); + + + /* rlimit related functions */ + typedef uint64_t vc_limit_t; + + + struct vc_rlimit + { + vc_limit_t min; + vc_limit_t soft; + vc_limit_t hard; + }; + + struct vc_rlimit_mask { + uint32_t min; + uint32_t soft; + uint32_t hard; + }; + + int vc_get_rlimit(xid_t ctx, int resource, struct vc_rlimit *lim); + int vc_set_rlimit(xid_t ctx, int resource, struct vc_rlimit const *lim); + int vc_get_rlimit_mask(xid_t ctx, struct vc_rlimit_mask *lim); + + + /** sends a signal to a context/pid + Special values for pid are: + * -1 which means every process in ctx except the init-process + * 0 which means every process in ctx inclusive the init-process */ + int vc_ctx_kill(xid_t ctx, pid_t pid, int sig); + + /** Returns the context of the given process. pid==0 means the current process. */ + xid_t vc_X_getctx(pid_t pid); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/linuxconf/Makefile-files b/linuxconf/Makefile-files new file mode 100644 index 0000000..0f50992 --- /dev/null +++ b/linuxconf/Makefile-files @@ -0,0 +1,47 @@ +## $Id: Makefile-files,v 1.1.2.2 2003/11/03 20:49:42 ensc Exp $ -*- makefile -*- + +## Copyright (C) 2003 Enrico Scholz +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2, or (at your option) +## any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +linuxconf_gen_SCRPTS = linuxconf/newvserver +linuxconf_src_DATMAN = linuxconf/newvserver.8 +linuxconf_cfg_src_DTA = linuxconf/newvserver.defaults + +linuxconf_XTRAS = linuxconf/newvserver.subst \ + $(linuxconf_cfg_src_DTA) \ + $(linuxconf_src_DATMAN) + +linuxconf_GENFILES = $(linuxconf_gen_SCRPTS) + + +if ENSC_ENABLE_LINUXCONF +linuxconf_DATMAN = $(linuxconf_src_DATMAN) +linuxconf_SCRPTS = $(linuxconf_gen_SCRPTS) +linuxconf_cfg_DTA = $(linuxconf_cfg_src_DTA) + +linuxconf/%: linuxconf/%.subst + @mkdir -p $$(dirname '$@') + sed -e 's!@'PKGLIBDIR'@!$(pkglibdir)!g; \ + s!@'SBINDIR'@!$(sbindir)!g' '$<' >'$@.tmp' + @-chmod --reference='$<' '$@.tmp' + @-rm -f '$@' + mv '$@.tmp' '$@' + @chmod a-w '$@' +else +linuxconf_DATMAN = +linuxconf_SCRPTS = +linuxconf_cfg_DTA = +endif diff --git a/linuxconf/newvserver.8 b/linuxconf/newvserver.8 new file mode 100644 index 0000000..46bbfd8 --- /dev/null +++ b/linuxconf/newvserver.8 @@ -0,0 +1,82 @@ +.TH "newvserver" "8" "0.1.0" "Jacques Gelinas " "System Administration" +.SH "NAME" +.LP +newvserver \- The newvserver is an interactive tool to create new vservers. +.SH "SYNTAX" +.LP +newvserver [ options ] + +.SH "DESCRIPTION" +.LP +newvserver \- The newvserver creates new vservers interactivly. It provides +a graphical user interface as well as a text user interface. You can +configure most aspect of the vserver (name, description, hostname, IP number, +root password, ...), select a source and then perform the creation. + +A vserver may be created by cloning another one, cloning the root server +or by performing a minimal installation from a distribution CD (RedHat +supported so far). + +.SH "Default values" +.LP +The file /etc/vservers/newvserver.defaults is sourced to get default +input value for many fields. If you are creating many vservers +(you will :-) ), you may want to edit this file and enter suitable +values such as your domain name, IP network, etc... + + +.SH "OPTIONS" +.LP +.TP +.I --help: +Presents a summary of the options. +.TP +.I --name: +Set the name of the new vserver. +.TP +.I --desc: +Set the description. +.TP +.I --unify 1/0: +Turn on unification on and off. +.TP +.I --hostname: +Set the host name of the new vserver +.TP +.I --ip: +Set the IP number(s) +.TP +.I --ondev: +Install the IP numbers as IP aliases on device. +.TP +.I --clone: +Create the vserver from another one or a distribution CD. +.TP +The distribution CD are identified by special strings: + #rh8.0m: RedHat 8 minimal + #rh8.0f: RedHat 8 complete first CD + #rh7.3m: RedHat 7.3 minimal + #rh7.3f: RedHat 7.3 complete first CD + #rh7.2m: RedHat 7.2 minimal + #rh7.2f: RedHat 7.2 complete first CD + +.SH "FILES" +.LP +\fI/etc/vservers/*.conf\fP +.P +\fI/etc/vservers/*.sh\fP +.P +\fI/etc/vservers/newvserver.defaults\fP +.P +\fI/vservers/*\fP + +.SH "AUTHORS" +.LP +This Man page was written by Jacques Gelinas. +.SH "SEE ALSO" +.LP +vserver(8) +vserver\-stat(8) +distrib-info(8) +vbuild(8) + diff --git a/linuxconf/newvserver.defaults b/linuxconf/newvserver.defaults new file mode 100644 index 0000000..badfe64 --- /dev/null +++ b/linuxconf/newvserver.defaults @@ -0,0 +1,18 @@ +# This script is sourced by newvserver to set the dialog default values +# Uncomment only the line you want to override. +# Name of the vserver +# name= +# Description +# desc= +# Reference vserver to clone +# clone=/ +# Use unification +# unify=1 +# Host name. Put the default domain if you want +# hostname=.mydomain.com +# List of IP +# Put the prefix of your network to save some typing +# ip= +# Network device for IP aliases setup +# ondev=eth0 + diff --git a/linuxconf/newvserver.subst b/linuxconf/newvserver.subst new file mode 100755 index 0000000..a0c271b --- /dev/null +++ b/linuxconf/newvserver.subst @@ -0,0 +1,529 @@ +#!/usr/bin/shellmod +# This module is used to create a new virtual private server + +# This module may be use inside linuxconf +# Do linuxconf --modulemain shellmod --setmod @SBINDIR@/newvserver + +# Load shellmod support function +. /usr/lib/linuxconf/lib/shellmod-lib.sh + +USR_SBIN=@SBINDIR@ +USR_LIB_VSERVER=@PKGLIBDIR@ +VSERVER_CMD=$USR_SBIN/vserver +CHBIND_CMD=$USR_SBIN/chbind +CHCONTEXT_CMD=$USR_SBIN/chcontext +SAVE_S_CONTEXT_CMD=$USR_LIB_VSERVER/save_s_context +CAPCHROOT_CMD=$USR_LIB_VSERVER/capchroot +VSERVERKILLALL_CMD=$USR_LIB_VSERVER/vserverkillall + + +usage(){ + cat <<-EOF >&2 + +newvserver [ options ] + + Interactive utility to create vservers. + +Options: + --name: Set the name of the new vserver. + --desc: Set the description. + --unify 1/0: Turn on unification on and off. + --hostname: Set the host name of the new vserver + --ip: Set the IP number(s) + --ondev: Install the IP numbers as IP aliases on device. + --clone: Create the vserver from another one or a distribution CD. + +The distribution CD are identified by special strings: + #rh9.0m: RedHat 9 minimal + #rh9.0f: RedHat 9 complete first CD + #rh8.0m: RedHat 8 minimal + #rh8.0f: RedHat 8 complete first CD + #rh7.3m: RedHat 7.3 minimal + #rh7.3f: RedHat 7.3 complete first CD + #rh7.2m: RedHat 7.2 minimal + #rh7.2f: RedHat 7.2 complete first CD + +EOF +} + +register(){ + qecho regmenu main MENU_MISCSERV "Create a new vserver" +} + +check_name(){ + LEN=`echo -n $1 | wc -c` + SMALL=`expr $LEN \<= 10` + if [ "$SMALL" = "1" ] ; then + return 0 + fi + return 1 +} + +check_hostname(){ + case $1 in + *\.*) + return 0 + ;; + *) + ;; + esac + return 1 +} + +check_ip(){ + case $1 in + *\.*\.*\.*) + return 0 + ;; + *) + ;; + esac + return 1 +} + +check_device(){ + if [ "$1" = "" ] ; then + return 1; + fi + return 0 +} + +# Tell the user to mount the CD +check_cd(){ + echo defval s1 "Make sure the $1" + echo defval s1 "is mounted on /mnt/cdrom" + echo defval s1 + echo defval s1 "Execute \"mount /mnt/cdrom\" if not" + echo notice =s1 +} + +# Set a fake fstab and mtab in a vserver +# $1 is the vserver path (/vserver/id) +set_fstab(){ + mkdir -p $1/etc + echo /dev/hdv1 / ext2 defaults 1 1 >$1/etc/fstab + echo /dev/hdv1 / ext2 rw 1 1 >$1/etc/mtab +} + +# Show a progress bar during installation +# The sub-process sends the number of output line first, then the lines +execprogress(){ + LOG=$1 + title=$2 + desc=$3 + shift; shift; shift + $* | + ( + >$LOG + read SIZE rest + qecho DIALOG + qecho settype DIATYPE_POPUP + qecho newf_str p1 "Package" + qecho newf_gauge s1 "$desc" 0 $SIZE + qecho show "$title" "$SIZE $rest" + nb=0 + while read pkg line + do + nb=`expr $nb + 1` + printf "%-20s %s\n" $pkg $line >>$LOG + qecho newf_str p1 "Package" "$pkg" + qecho newf_gauge s1 "$desc" $nb $SIZE + qecho show "$title" "$SIZE $rest" + done + qecho end + ) +} + +# install some packages with a progress bar +installpkgs(){ + LOG=$1 + shift + execprogress $LOG "Installing" "Packages installed" $* +} + +# Point d'entré du module +main(){ + name= + desc= + clone=/ + unify=1 + hostname= + ip= + ondev=eth0 + if [ -f /etc/vservers/newvserver.defaults ] ; then + source /etc/vservers/newvserver.defaults + fi + while [ "$1" != "" ] + do + case $1 in + --help) + usage + exit + ;; + --name) + name=$2 + shift; shift + ;; + --desc) + desc=$2 + shift; shift + ;; + --unify) + unify=$2 + shift; shift + ;; + --hostname) + hostname=$2 + shift; shift + ;; + --ip) + ip="$2" + shift; shift + ;; + --ondev) + ondev=$2 + shift; shift + ;; + --clone) + clone=$2 + shift; shift + ;; + *) + qecho error "Invalid option $1" + exit 1 + esac + done + qecho DIALOG + qecho newf_title top 1 top + qecho newf_str name "Vserver name (max 10 chars)" $name + qecho newf_str desc "Vserver description" "$desc" + qecho newf_list clone "Clone vserver" $clone + for conf in /etc/vservers/*.conf + do + case $conf in + /etc/vservers/\*.conf) + ;; + *) + DESC=`grep "# Description:" $conf | ( read a b c; echo $c)` + qecho listitem `basename $conf .conf` "$DESC" + ;; + esac + done + qecho listitem / "Root server" + qecho listitem "#rh9.0m" "From RedHat 9.0 CDrom/Minimal" + qecho listitem "#rh9.0f" "From RedHat 9.0 CDrom/Full" + qecho listitem "#rh8.0m" "From RedHat 8.0 CDrom/Minimal" + qecho listitem "#rh8.0f" "From RedHat 8.0 CDrom/Full" + qecho listitem "#rh7.3m" "From RedHat 7.3 CDrom/Minimal" + qecho listitem "#rh7.3f" "From RedHat 7.3 CDrom/Full" + qecho listitem "#rh7.2" "From RedHat 7.2 CDrom" + #qecho listitem "#mdk8.2m" "From Mandrake 8.2 CDrom/Minimal" + #qecho listitem "#mdk8.2f" "From Mandrake 8.2 CDrom/Full" + qecho newf_chk unify "Unified mode" 1 "Share disk space" $unify + + qecho newf_title Networking 1 Networking + qecho newf_str hostname "Host name" $hostname + qecho newf_info "" "Up to 16 IP numbers" + qecho newf_str ip "IP number(s)" "$ip" + qecho newf_str ondev "Install IP on device" $ondev + + qecho newf_title Authentication 1 Authentication + qecho newf_pass pass1 "Root password" + qecho newf_pass pass2 "Root password (retype)" + qecho newf_chk usemd5 "Password format" 1 "Use MD5" + qecho newf_chk useshadow "Password location" 1 "/etc/shadow" + + qecho newf_title NIS/LDAP 1 NIS/LDAP + qecho newf_str nisserver "NIS server" + qecho newf_str domainname "NIS domainname" + qecho newf_str ldapserver "LDAP server" + qecho newf_str ldapbasedn "LDAP base dn" + + qecho newf_title Services 1 Services + qecho newf_chk crond "crond" 1 "Scheduled tasks" + qecho newf_chk httpd "httpd" 0 "Web server" + qecho newf_chk sshd "sshd" 1 "Secure shell server" + qecho newf_chk cleansshd "" 1 "Redo sshd server keys" + qecho newf_chk syslog "syslog" 1 "Message logger" + qecho newf_chk xinetd "xinetd" 0 "On demand inet service" + qecho newf_chk nscd "nscd" 0 "Name service cache daemon" + + qecho newf_title "Backup profile" 1 "Backup profile" + qecho newf_str bkhostname "Host name" + qecho newf_info "" "Up to 16 IP numbers" + qecho newf_str bkip "IP number(s)" + qecho newf_str bkondev "Install IP on device" eth0 + + qecho newf_title Extra 1 Extra + qecho newf_chk onboot "Start server" 0 "at boot time" + qecho newf_str priority "Start priority" 100 + qecho newf_str nice "Nice level" + qecho newf_info "Available flags" "lock nproc sched hideinfo private" + qecho newf_str flags "Flags" "lock nproc" + qecho newf_str ulimit "Vserver ulimit" "-H -u 1000" + + + qecho newf_title "Shared directories" 1 "Shared directories" + qecho newf_str dir1 "Directory" + qecho newf_str dir2 "Directory" + qecho newf_str dir3 "Directory" + qecho newf_str dir4 "Directory" + + qecho newf_title "Excluded directories" 1 "Excluded directories" + qecho newf_info "" "Won't copy files in those directories" + qecho newf_str exdir1 "Directory" "/var/log" + qecho newf_str exdir2 "Directory" "/var/run" + qecho newf_str exdir3 "Directory" "/var/spool/mail" + qecho newf_str exdir4 "Directory" "/tmp" + qecho newf_str exdir5 "Directory" "" + qecho newf_str exdir6 "Directory" "" + + + while true + do + qecho edit "Vserver basic setup" + dispatch + if [ $CODE != "accept" ] ; then + break + elif ! check_name $name ; then + qecho error "You must provide a name (10 chars max)" + elif ! check_hostname $hostname ; then + qecho error "You must provide a valid/fully qualified host name" + elif ! check_ip $ip ; then + qecho error "You must provide a valid IP number" + elif ! check_device $ondev ; then + qecho error "You must provide a valid network device" + elif [ "$pass1" != "" -a "$pass1" != "$pass2" ] ; then + echo defval s1 The two passwords differ. + echo defval s1 You must re-enter the root password. + echo error =s1 + else + STARTTIME=`date +%s` + ONBOOT=no + if [ "$onboot" = "1" ] ; then + ONBOOT=yes + fi + VROOT=/vservers/$name + CONF=/etc/vservers/$name.conf + $USR_LIB_VSERVER/install-pre.sh $name + rm -f $CONF >/dev/null 2>/dev/null + echo "# Description: $desc" >>$CONF + echo >>$CONF + echo "if [ \"$PROFILE\" = \"\" ]; then" >>$CONF + echo " PROFILE=prod" >>$CONF + echo "fi" >>$CONF + echo "case \$PROFILE in" >>$CONF + echo "prod)" >>$CONF + echo " # Select the IP number(s) assigned to the virtual server" >>$CONF + echo " # These IPs will be defined as IP alias" >>$CONF + echo " # The alias will be setup on IPROOTDEV" >>$CONF + echo " # You can specify the device if needed" >>$CONF + echo " # IPROOT=\"eth0:1.2.3.4 eth1:3.4.5.6\" " >>$CONF + echo " IPROOT=\"$ip\"" >>$CONF + echo " # You can define on which device the IP alias will be done" >>$CONF + echo " # The IP alias will be set when the server is started and unset" >>$CONF + echo " # when the server is stopped" >>$CONF + echo " # The netmask and broadcast are computed by default from IPROOTDEV" >>$CONF + echo " #IPROOTMASK=" >>$CONF + echo " #IPROOTBCAST=" >>$CONF + echo " IPROOTDEV=$ondev" >>$CONF + echo " # You can set a different host name for the vserver" >>$CONF + echo " # If empty, the host name of the main server is used" >>$CONF + echo " S_HOSTNAME=$hostname" >>$CONF + echo " ;;" >>$CONF + echo "backup)" >>$CONF + echo " IPROOT=\"$bkip\"" >>$CONF + echo " #IPROOTMASK=" >>$CONF + echo " #IPROOTBCAST=" >>$CONF + echo " IPROOTDEV=$bkondev" >>$CONF + echo " S_HOSTNAME=$bkhostname" >>$CONF + echo " ;;" >>$CONF + echo "esac" >>$CONF + echo "# Set ONBOOT to yes or no if you want to enable this" >>$CONF + echo "# virtual server at boot time" >>$CONF + echo "ONBOOT=$ONBOOT" >>$CONF + echo "# Control the start order of the vservers" >>$CONF + echo "# Lower value start first" >>$CONF + echo "PRIORITY=$priority" >>$CONF + echo "# You can set a different NIS domain for the vserver" >>$CONF + echo "# If empty, the current on is kept" >>$CONF + echo "# Set it to \"none\" to have no NIS domain set" >>$CONF + echo "S_DOMAINNAME=$domainname" >>$CONF + echo "# You can set the priority level (nice) of all process in the vserver" >>$CONF + echo "# Even root won't be able to raise it" >>$CONF + echo "S_NICE=$nice" >>$CONF + echo "# You can set various flags for the new security context" >>$CONF + echo "# lock: Prevent the vserver from setting new security context" >>$CONF + echo "# sched: Merge scheduler priority of all processes in the vserver" >>$CONF + echo "# so that it acts a like a single one." >>$CONF + echo "# nproc: Limit the number of processes in the vserver according to ulimit" >>$CONF + echo "# (instead of a per user limit, this becomes a per vserver limit)" >>$CONF + echo "# private: No other process can join this security context. Even root" >>$CONF + echo "# Do not forget the quotes around the flags" >>$CONF + echo "S_FLAGS=\"$flags\"" >>$CONF + echo "# You can set various ulimit flags and they will be inherited by the" >>$CONF + echo "# vserver. You enter here various command line argument of ulimit" >>$CONF + echo "# ULIMIT=\"-H -u 200\"" >>$CONF + echo "# The example above, combined with the nproc S_FLAGS will limit the" >>$CONF + echo "# vserver to a maximum of 200 processes" >>$CONF + echo "ULIMIT=\"$ulimit\"" >>$CONF + echo "# You can set various capabilities. By default, the vserver are run" >>$CONF + echo "# with a limited set, so you can let root run in a vserver and not" >>$CONF + echo "# worry about it. He can\'t take over the machine. In some cases" >>$CONF + echo "# you can to give a little more capabilities \(such as CAP_NET_RAW\)" >>$CONF + echo "# S_CAPS=\"CAP_NET_RAW\"" >>$CONF + echo "S_CAPS=\"\"" >>$CONF + echo "# Select an unused context (this is optional)" >>$CONF + echo "# The default is to allocate a free context on the fly" >>$CONF + echo "# In general you don't need to force a context" >>$CONF + echo "#S_CONTEXT=" >>$CONF + + # Now we create the optional companion startup script + # for the vserver + SCRIPT=/etc/vservers/$name.sh + echo "#!/bin/sh" >$SCRIPT + echo 'case $1 in' >>$SCRIPT + echo "pre-start)" >>$SCRIPT + for dir in $dir1 $dir2 $dir3 $dir4 none + do + if [ "$dir" != "none" ] ; then + echo " mkdir -p $VROOT/$dir" >>$SCRIPT + echo " mount --bind $dir $VROOT/$dir" >>$SCRIPT + fi + done + echo " ;;" >>$SCRIPT + echo "post-start)" >>$SCRIPT + echo " ;;" >>$SCRIPT + echo "pre-stop)" >>$SCRIPT + echo " ;;" >>$SCRIPT + echo "post-stop)" >>$SCRIPT + for dir in $dir1 $dir2 $dir3 $dir4 none + do + if [ "$dir" != "none" ] ; then + echo " umount $VROOT/$dir" >>$SCRIPT + fi + done + echo " ;;" >>$SCRIPT + echo '*)' >>$SCRIPT + echo ' echo $0 pre-start' >>$SCRIPT + echo ' echo $0 pre-stop' >>$SCRIPT + echo ' echo $0 post-start' >>$SCRIPT + echo ' echo $0 post-stop' >>$SCRIPT + echo " ;;" >>$SCRIPT + echo "esac" >>$SCRIPT + chmod +x $SCRIPT + + LOG=/var/run/newvserver.log.$$ + if [ "$clone" = "/" ] ; then + # Unification does not work on / yet + $VSERVER_CMD $name build >$LOG + elif [ "$clone" = "#rh7.2" ] ; then + check_cd "first RedHat 7.2 CD" + set_fstab $VROOT + installpkgs $LOG $USR_LIB_VSERVER/install-rh7.2 $name + elif [ "$clone" = "#rh7.3m" -o "$clone" = "#rh7.3f" ] ; then + check_cd "first RedHat 7.3 CD" + set_fstab $VROOT + if [ "$clone" = "#rh7.3m" ] ;then + installpkgs $LOG $USR_LIB_VSERVER/install-rh7.3 $name minimum + else + installpkgs $LOG $USR_LIB_VSERVER/install-rh7.3 $name full + fi + elif [ "$clone" = "#rh8.0m" -o "$clone" = "#rh8.0f" ] ; then + check_cd "first RedHat 8.0 CD" + set_fstab $VROOT + if [ "$clone" = "#rh8.0m" ] ;then + installpkgs $LOG $USR_LIB_VSERVER/install-rh8.0 $name minimum + else + installpkgs $LOG $USR_LIB_VSERVER/install-rh8.0 $name full + fi + elif [ "$clone" = "#rh9.0m" -o "$clone" = "#rh9.0f" ] ; then + check_cd "first RedHat 9.0 CD" + set_fstab $VROOT + if [ "$clone" = "#rh9.0m" ] ;then + installpkgs $LOG $USR_LIB_VSERVER/install-rh9.0 $name minimum + else + installpkgs $LOG $USR_LIB_VSERVER/install-rh9.0 $name full + fi + elif [ "$unify" = "0" ] ; then + cp -ax /vservers/$clone/. $VROOT/. >$LOG + else + EXCLOPT= + for dir in $exdir1 $exdir2 $exdir3 $exdir4 $exdir5 $exdir6 none + do + if [ "$dir" != "none" ] ; then + EXCLOPT="$EXCLOPT --excldir $dir" + fi + done + $USR_LIB_VSERVER/vbuild $EXCLOPT --stats /vservers/$clone $VROOT >$LOG + fi + rm -f $VROOT/var/run/utmp + $USR_LIB_VSERVER/fakerunlevel 3 $VROOT/var/run/utmp + test "$crond" = 1 && $VSERVER_CMD $name chkconfig crond on >/dev/null + test "$httpd" = 1 && $VSERVER_CMD $name chkconfig httpd on >/dev/null + test "$sshd" = 1 && $VSERVER_CMD $name chkconfig sshd on >/dev/null + if [ "$cleansshd" = 1 ] ; then + echo Deleting sshd server keys >>$LOG + rm -f $VROOT/etc/ssh/*_key + rm -f $VROOT/etc/ssh/*_key.pub + fi + test "$syslog" = 1 && $VSERVER_CMD $name chkconfig syslog on >/dev/null + test "$xinetd" = 1 && $VSERVER_CMD $name chkconfig xinetd on >/dev/null + test "$nscd" = 1 && $VSERVER_CMD $name chkconfig nscd on >/dev/null + host0=`echo $hostname | sed 's/\./ /g' | ( read a b; echo $a)` + echo $ip $hostname $host0 localhost >$VROOT/etc/hosts + RHNETWORK=$VROOT/etc/sysconfig/network + if [ -f $RHNETWORK ] ; then + cat $RHNETWORK | grep -v HOSTNAME >/tmp/newvserver.tmp.$$ + cp /tmp/newvserver.tmp.$$ $RHNETWORK + echo HOSTNAME=$hostname >>$RHNETWORK + fi + # Umount proc and /dev/pts + $VSERVER_CMD $name stop >/dev/null + ENDTIME=`date +%s` + DURATION=`expr $ENDTIME - $STARTTIME` + + echo defval s1 Server $name was installed in $VROOT + echo defval s1 The configuration file /etc/vservers/$name.conf was created + echo defval s1 The script /etc/vservers/$name.sh was created + echo defval s1 Vserver $name was created in $DURATION seconds + echo defval s1 + cat $LOG | while read line + do + echo defval s1 $line + done + echo notice =s1 + rm -f $LOG + # Finish some stuff: root password, account policies + if [ -x $VROOT/usr/sbin/authconfig ] ; then + SHADOWOPT= + MD5OPT= + NISOPT= + LDAPOPT= + if [ "$usemd5" = "1" ] ; then + MD5OPT=--usemd5 + fi + if [ "$useshadow" = "1" ] ; then + SHADOWOPT=--useshadow + fi + if [ "$nisserver" != "" ] ; then + NISOPT="--nisserver $nisserver --nisdomain $domainname" + fi + if [ "$ldapserver" != "" ] ; then + LDAPOPT="--ldapserver $ldapserver --ldapbasedn $ldapbasedn" + fi + $VSERVER_CMD $name exec /usr/sbin/authconfig \ + --nostart --kickstart \ + $SHADOWOPT $MD5OPT $NISOPT $LDAPOPT + fi + if [ "$pass1" != "" ] ; then + (echo $pass1; sleep 5; echo $pass1) \ + | $VSERVER_CMD --silent $name exec passwd >/dev/null + fi + break + fi + done + qecho end +} + +dispatch diff --git a/m4/changelog.am b/m4/changelog.am new file mode 100644 index 0000000..f9e9475 --- /dev/null +++ b/m4/changelog.am @@ -0,0 +1,36 @@ +## $Id: changelog.am,v 1.1.4.1 2003/11/03 23:11:11 ensc Exp $ ---*- makefile -*--- + +## Copyright (C) 2002 Enrico Scholz +## +## 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; version 2 of the License. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +## + +ChangeLog.sed: + test "$(srcdir)" != "." + +if HAVE_CVS2CL +ChangeLog: Makefile + if test "$(srcdir)" = "." -a -d CVS; then \ + $(CVS2CL) $(CVS2CL_ALLFLAGS) -f $@; \ + fi +else +if HAVE_RCS2LOG +ChangeLog: ChangeLog.sed Makefile + if test "$(srcdir)" = "." -a -d CVS; then \ + $(RCS2LOG) -l 0 -c /dev/stdout | sed -f $< >$@; \ + fi +endif +endif + +.PHONY: ChangeLog diff --git a/m4/ensc_cflags.m4 b/m4/ensc_cflags.m4 new file mode 100644 index 0000000..07098f8 --- /dev/null +++ b/m4/ensc_cflags.m4 @@ -0,0 +1,111 @@ +dnl $Id: ensc_cflags.m4,v 1.1.4.1 2004/01/26 18:21:28 ensc Exp $ + +dnl Copyright (C) 2002 Enrico Scholz +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; version 2 of the License. +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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +AC_DEFUN([__ENSC_CHECK_WARNFLAGS], +[ + warn_flags="-Werror -W" + AC_MSG_CHECKING([whether the $1-compiler accepts ${warn_flags}]) + AC_LANG_PUSH($1) + old_CFLAGS="${$3}" + $3="$warn_flags" + AC_TRY_COMPILE([inline static void f(){}], + [], + [ensc_sys_compilerwarnflags_$2=${warn_flags}], + [ensc_sys_compilerwarnflags_$2=]) + AC_LANG_POP($1) + $3="$old_CFLAGS" + + if test x"${ensc_sys_compilerwarnflags_$2}" = x; then + AC_MSG_RESULT([no]) + else + AC_MSG_RESULT([yes]) + fi +]) + +AC_DEFUN([__ENSC_CHECK_WARNFLAGS_C], +[ + __ENSC_CHECK_WARNFLAGS(C, C, CFLAGS) +]) + +AC_DEFUN([__ENSC_CHECK_WARNFLAGS_CXX], +[ + __ENSC_CHECK_WARNFLAGS(C++, CXX, CXXFLAGS) +]) + + +# -------------------------------------------------------------------------- +# Check whether the C++ compiler accepts a certain flag +# If it does it adds the flag to CXXFLAGS +# If it does not then it returns an error to lf_ok +# Usage: +# ENSC_CHECK_CXX_FLAG(-flag1 -flag2 -flag3 ...) +# ------------------------------------------------------------------------- + +AC_DEFUN([ENSC_CHECK_CXX_FLAG], +[ + AC_REQUIRE([__ENSC_CHECK_WARNFLAGS_CXX]) + + echo 'void f(){}' > conftest.cc + for i in $1 + do + AC_MSG_CHECKING([whether $CXX accepts $i]) + if test -z "`${CXX} ${ensc_sys_compilerwarnflags_CXX} $i -c conftest.cc 2>&1`" + then + CXXFLAGS="${CXXFLAGS} $i" + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + fi + done + rm -f conftest.cc conftest.o +]) + +# -------------------------------------------------------------------------- +# Check whether the C compiler accepts a certain flag +# If it does it adds the flag to CFLAGS +# If it does not then it returns an error to lf_ok +# Usage: +# ENSC_CHECK_CC_FLAG(-flag1 -flag2 -flag3 ...) +# ------------------------------------------------------------------------- + +AC_DEFUN([ENSC_CHECK_CC_FLAG],[ + AC_REQUIRE([__ENSC_CHECK_WARNFLAGS_C]) + +echo 'void f(){}' > conftest.c + for i in $1 + do + AC_MSG_CHECKING([whether $CC accepts $i]) + if test -z "`${CC} ${ensc_sys_compilerwarnflags_C} $i -c conftest.c 2>&1`" + then + CFLAGS="${CFLAGS} $i" + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + fi + done + rm -f conftest.c conftest.o +]) + +AC_DEFUN([ENSC_CHECK_DEFAULT_FLAG], +[ + if test x"${ensc_sys_default_flag}" = x; then + ENSC_CHECK_CC_FLAG([-fmessage-length=0]) + ENSC_CHECK_CXX_FLAG([-fmessage-length=0]) + + ensc_sys_default_flag=set + fi +]) diff --git a/m4/ensc_changelog.m4 b/m4/ensc_changelog.m4 new file mode 100644 index 0000000..a66fc25 --- /dev/null +++ b/m4/ensc_changelog.m4 @@ -0,0 +1,31 @@ +dnl $Id: ensc_changelog.m4,v 1.1.2.1 2003/11/03 23:11:11 ensc Exp $ + +dnl Copyright (C) 2002 Enrico Scholz +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; version 2 of the License. +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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +dnl Usage: ENSC_CHANGELOG() + +AC_DEFUN([ENSC_CHANGELOG], +[ + if test x"$1" != x; then + AC_SUBST(CVS2CL_TAG, ['-F $1']) + fi + + AC_CHECK_PROGS(CVS2CL, [cvs2cl]) + AM_CONDITIONAL(HAVE_CVS2CL, [test x"$CVS2CL" != x]) + + AC_CHECK_PROGS(RCS2LOG, [rcs2log]) + AM_CONDITIONAL(HAVE_RCS2LOG, [test x"$RCS2LOG" != x]) +]) diff --git a/m4/ensc_e2fscheck.m4 b/m4/ensc_e2fscheck.m4 new file mode 100644 index 0000000..acd6272 --- /dev/null +++ b/m4/ensc_e2fscheck.m4 @@ -0,0 +1,70 @@ +dnl $Id: ensc_e2fscheck.m4,v 1.1.2.1 2004/01/26 18:20:51 ensc Exp $ + +dnl Copyright (C) 2004 Enrico Scholz +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; version 2 of the License. +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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +AC_DEFUN([ENSC_CHECK_EXT2FS_HEADER], +[ + AC_LANG_PUSH(C++) + AC_CACHE_CHECK([for ext2fs-headers], [ensc_cv_test_ext2fs_header],[ + AC_COMPILE_IFELSE(AC_LANG_SOURCE([#include + int main() { return 0; }]), + [ensc_cv_test_ext2fs_header=e2fsprogs],[ + AC_COMPILE_IFELSE(AC_LANG_SOURCE([#include + int main() { return 0; }]), + [ensc_cv_test_ext2fs_header=kernel],[ + ensc_cv_test_ext2fs_header=none])])]) + + case x"$ensc_cv_test_ext2fs_header" in + (xe2fsprogs) + AC_CHECK_HEADER([ext2fs/ext2_fs.h], + [AC_DEFINE(ENSC_HAVE_EXT2FS_EXT2_FS_H, 1, [define when is usable])], + [AC_MSG_FAILURE([unexpected error while checkin for ])]) + ;; + (xkernel) + AC_CHECK_HEADER([linux/ext2_fs.h], + [AC_DEFINE(ENSC_HAVE_LINUX_EXT2_FS_H, 1, [define when is usable])], + [AC_MSG_FAILURE([unexpected error while checkin for ])]) + ;; + (*) + AC_MSG_FAILURE([ +ext2fs headers were not found, or they are not usable. This can have +the following reasons: + +* you have neither the e2fsprogs nor the kernel headers installed + +* kernel headers are broken (e.g. these of linux 2.6 are known to be) + and you do not have e2fsprogs headers installed; please try to + install e2fsprogs-devel (for Red Hat) or e2fsprogs-dev (for Debian) + in this case + +* kernel headers are broken and your e2fsprogs headers are too old; + until version 1.27 (inclusive), they are using reserved C++ keywords + +* kernel headers are broken and your e2fsprogs headers are too new; + recent (January 2004) BK snapshots of e2fsprogs are unusable for + C++, for details and a solution see + https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=112448 + + +In the latter two cases you have the following options: +* fix the headers manually, or +* install a stable version of e2fsprogs (e.g. 1.34), or +* use good kernel headers (from linux 2.4.x) +]) + ;; + esac + AC_LANG_POP +]) diff --git a/m4/ensc_kerneldir.m4 b/m4/ensc_kerneldir.m4 new file mode 100644 index 0000000..bfb2cc1 --- /dev/null +++ b/m4/ensc_kerneldir.m4 @@ -0,0 +1,55 @@ +dnl $Id: ensc_kerneldir.m4,v 1.1.2.2 2004/01/26 18:21:28 ensc Exp $ + +dnl Copyright (C) 2002 Enrico Scholz +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; version 2 of the License. +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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +dnl Usage: ENSC_KERNEL_HEADERS() +dnl ... basedir of kernel-headers (without the '/linux'); +dnl this value will be AC_SUBST'ed + +AC_DEFUN([_ENSC_KERNEL_DIR], +[ + AC_CACHE_CHECK([for linux kernel dir], [ensc_cv_path_kerneldir], + [ +AC_ARG_WITH([kerneldir], + [AC_HELP_STRING([--with-kerneldir=DIR], + [assume kernelsources in DIR (default: /lib/modules//build)])], + [case "$withval" in + yes|no) AC_MSG_ERROR(['$withval' is not a valid value for kerneldir]);; + *) ensc_cv_path_kerneldir=$withval;; + esac], + [ensc_cv_path_kerneldir= + for i in /lib/modules/$(uname -r)/build /usr/src/linux /usr; do + test -e $i/include/linux/version.h && { ensc_cv_path_kerneldir=$i; break; } + done]) + ]) + + test "$ensc_cv_path_kerneldir" -a -e "$ensc_cv_path_kerneldir"/include/linux/version.h || { + AC_MSG_ERROR([Can not find kernelsources]) + } +]) + +AC_DEFUN([ENSC_KERNEL_HEADERS], +[ + AC_REQUIRE([_ENSC_KERNEL_DIR]) + + AC_CACHE_CHECK([for linux kernel headers], [ensc_cv_path_kernelheaders], + [ + ensc_cv_path_kernelheaders=$ensc_cv_path_kerneldir/include + ]) + + $1=$ensc_cv_path_kernelheaders + AC_SUBST($1) +]) diff --git a/m4/ensc_syscall.m4 b/m4/ensc_syscall.m4 new file mode 100644 index 0000000..c346f92 --- /dev/null +++ b/m4/ensc_syscall.m4 @@ -0,0 +1,87 @@ +dnl $Id: ensc_syscall.m4,v 1.2.2.1 2004/02/05 03:52:45 ensc Exp $ + +dnl Copyright (C) 2004 Enrico Scholz +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; version 2 of the License. +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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +dnl Usage: ENSC_SYSCALL + +AC_DEFUN([ENSC_SYSCALL], +[ + AC_REQUIRE([ENSC_KERNEL_HEADERS]) + AC_MSG_CHECKING([for syscall(2) invocation method]) + AC_ARG_WITH([syscall], + [AC_HELP_STRING([--with-syscall=METHOD], + [call syscall(2) with the specified METHOD; valid values are 'fast', 'traditional' and 'auto' (default: auto)])], + [], + [with_syscall=auto]) + AC_MSG_RESULT([$with_syscall]) + + case x"$with_syscall" in + xauto) + AC_CACHE_CHECK([which syscall(2) invocation works], [ensc_cv_test_syscall], + [ + old_CPPFLAGS=$CPPFLAGS + CPPFLAGS="-I$ensc_cv_path_kernelheaders" + AC_LANG_PUSH(C) + AC_COMPILE_IFELSE([ +#include +#include +#include +#define __NR_foo0 300 +#define __NR_foo1 301 +#define __NR_foo2 302 +#define __NR_foo3 303 +#define __NR_foo4 304 +#define __NR_foo5 305 +inline static _syscall0(int, foo0) +inline static _syscall1(int, foo1, int, a) +inline static _syscall2(int, foo2, int, a, int, b) +inline static _syscall3(int, foo3, int, a, int, b, int, c) +inline static _syscall4(int, foo4, int, a, int, b, int, c, int, d) +inline static _syscall5(int, foo5, int, a, int, b, int, c, int, d, int, e) + +int main() { + return foo0() || \ + foo1(1) || \ + foo2(1,2) || \ + foo3(1,2,3) || \ + foo4(1,2,3,4) || \ + foo5(1,2,3,4,5); +} + ], + [ensc_cv_test_syscall=fast], + [ensc_cv_test_syscall=traditional]) + + AC_LANG_POP + CPPFLAGS=$old_CPPFLAGS + ]) + with_syscall=$ensc_cv_test_syscall + ;; + xfast|xtraditional) + ;; + *) + AC_MSG_ERROR(['$with_syscall' is not a valid value for '--with-syscall']) + ;; + esac + + if test x"$with_syscall" = xtraditional; then + AC_DEFINE(ENSC_SYSCALL_TRADITIONAL, 1, [Define to 1 when the fast syscall(2) invocation does not work]) + fi + + AH_BOTTOM([ +#if defined(__pic__) && defined(__i386) && !defined(ENSC_SYSCALL_TRADITIONAL) +# define ENSC_SYSCALL_TRADITIONAL 1 +#endif]) +]) diff --git a/m4/ensc_uv_vrootdir.m4 b/m4/ensc_uv_vrootdir.m4 new file mode 100644 index 0000000..000d2f9 --- /dev/null +++ b/m4/ensc_uv_vrootdir.m4 @@ -0,0 +1,39 @@ +dnl $Id: ensc_uv_vrootdir.m4,v 1.1.2.2 2004/01/26 18:21:28 ensc Exp $ + +dnl Copyright (C) 2002 Enrico Scholz +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; version 2 of the License. +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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +dnl Usage: ENSC_UV_VROOTDIR[()] +dnl ... name of variable which will get assigned +dnl the dirname of the vserver-topdir + +AC_DEFUN([ENSC_UV_VROOTDIR], +[ + AC_MSG_CHECKING([which vserver-rootdir is to use]) + AC_ARG_WITH([vrootdir], + [AC_HELP_STRING([--with-vrootdir=DIR], + [place vservers under DIR (default: /vservers)])], + [case "$withval" in + yes|no) AC_MSG_ERROR(['$withval' is not a valid value for vrootdir]);; + *) ensc_uv_path_vrootdir=$withval;; + esac], + [ensc_uv_path_vrootdir=/vservers]) + AC_MSG_RESULT([$ensc_uv_path_vrootdir]) + + if test x"$1" != x; then + $1=$ensc_uv_path_vrootdir + AC_SUBST($1) + fi +]) diff --git a/m4/gpgsig.am b/m4/gpgsig.am new file mode 100644 index 0000000..bad1a9c --- /dev/null +++ b/m4/gpgsig.am @@ -0,0 +1,19 @@ +## $Id: gpgsig.am,v 1.1 2003/09/29 22:01:57 ensc Exp $ + +## Copyright (C) 2002 Enrico Scholz +## +## 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; version 2 of the License. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +gpgsig: + gpg --armor --detach-sign $(distdir).tar.bz2 diff --git a/m4/validate.am b/m4/validate.am new file mode 100644 index 0000000..49f59e5 --- /dev/null +++ b/m4/validate.am @@ -0,0 +1,29 @@ +## $Id: validate.am,v 1.1.4.1 2003/11/03 23:10:50 ensc Exp $ ---*- makefile -*--- + +## Copyright (C) 2002 Enrico Scholz +## +## 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; version 2 of the License. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +## + +$(BUILT_SOURCES) config.h: .X$(subst /,_,$(sysconfdir))-up-to-date + +distclean-local: distclean-uptodate + +distclean-uptodate: + @rm -f .*-up-to-date + +.%-up-to-date: + @rm -f .*-up-to-date + @touch -t 197001020000 '$@' + @$(MAKE) -s clean $(BUILT_SOURCES) diff --git a/man/Makefile-files b/man/Makefile-files new file mode 100644 index 0000000..32816db --- /dev/null +++ b/man/Makefile-files @@ -0,0 +1,31 @@ +## $Id: Makefile-files,v 1.1.4.1 2003/10/30 01:34:24 ensc Exp $ -*- makefile -*- + +## Copyright (C) 2003 Enrico Scholz +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2, or (at your option) +## any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +## + +man_DATMAN = man/chbind.8 \ + man/chcontext.8 \ + man/distrib-info.8 \ + man/rebootmgr.8 \ + man/reducecap.8 \ + man/vps.8 \ + man/vpstree.8 \ + man/vrpm.8 \ + man/vserver-copy.8 \ + man/vserver-stat.8 \ + man/vserver.8 \ + man/vtop.8 diff --git a/man/chbind.8 b/man/chbind.8 new file mode 100644 index 0000000..ca7783a --- /dev/null +++ b/man/chbind.8 @@ -0,0 +1,43 @@ +.TH "chbind" "8" "0.1.0" "Klavs Klavsen " "System Administration" +.SH "NAME" +.LP +chbind \- The chbind utility is used to lock a process and its children into using a specific IP number/Interface. +.SH "SYNTAX" +.LP +chbind [\fI\-\-silent\fP] [\fI\-\-ip ip_number/interface\fP] <\fIcommand arguments\fP> +.SH "DESCRIPTION" +.LP +The chbind utility executes a command, and locks the resulting process and its children into using a specific IP number/Interface, no matter what it is told in it's configuration. This applies to services and client connection as well. +.SH "OPTIONS" +.LP +.TP +\fB\-\-ip\fR ip_number/interface +Binds the process to the given IP number or Interface. If an interface +is supplied (for example eth0), both the IP number and broadcast address +are extracted. +.TP +\fB\-\-bcast\fR broadcast address +Binds the process to the given broadcast IP number. +.TP +\fB\-\-silent\fR +Do not complain. + +.SH "FILES" +.LP +\fI/usr/sbin/chbind\fP + + +.SH "EXAMPLES" +.LP +If I wanted to ensure my httpd listened only on my eth0 interface, I could do: +chbind \-\-ip eth0 /etc/rc.d/init.d/httpd start +.LP +Please contribute some, if you feel it's important. +.SH "AUTHORS" +.LP +This Man page was written by Klavs Klavsen and based upon the helpful output from the program itself and the documentation on the Virtual Server site +.SH "SEE ALSO" +.LP +chcontext(8) rebootmgr(8) reducecap(8) +vps(8) vpstree(8) vrpm(8) vserver(8) +vserver\-stat(8) vtop(8) diff --git a/man/chcontext.8 b/man/chcontext.8 new file mode 100644 index 0000000..63bd721 --- /dev/null +++ b/man/chcontext.8 @@ -0,0 +1,103 @@ +.TH "chcontext" "1" "0.1.0" "Klavs Klavsen " "System Administration" +.SH "NAME" +.LP +chcontext \- chcontext allocates a new security context and executes a command in that context. +.SH "SYNTAX" +.LP +chcontext [\fIoptions\fP] <\fIcommand arguments\fP> +.SH "DESCRIPTION" +.LP +chcontext allocates a new security context and executes a command in that context. +By default, a new/unused context is allocated +.SH "OPTIONS" +.LP +.TP +\fB\-\-cap\fR CAP_NAME +Add a capability from the command. This option may be repeated several time. See /usr/include/linux/capability.h In general, this option is used with the \-\-secure option. \-\-secure removes most critical capabilities and \-\-cap adds specific ones. +.TP +\fB\-\-cap\fR !CAP_NAME +Remove a capability from the command. This option may be repeated several time. See /usr/include/linux/capability.h +.TP +\fB\-\-ctx\fR num +Select the context. Only root in context 0 is allowed to select a specific context. +Context number 1 is special. It can see all processes in any contexts, but can't kill them though. +.TP +\fB\-\-disconnect\fR +Start the command in background and make the process a child of process 1. +.TP +\fB\-\-domainname\fR new_domainname +Set the domainname (NIS) in the new security context. +Use "none" to unset the domainname. +.TP +\fB\-\-flag\fR +Set one flag in the new or current security context. The following flags are supported. The option may be used several time. + lock: The new process is trapped and can't use + chcontext anymore. + sched: The new process and its children will + share a common execution priority. + nproc: Limit the number of process in the + vserver according to ulimit setting. + Normally, ulimit is a per user thing. + With this flag, it becomes a per vserver + thing. + private: No one can join this security context + once created. +.TP +\fB\-\-hostname\fR new_hostname +Set the hostname in the new security context. +This is needed because if you create a less privileged security context, it may be unable to change its hostname. +.TP +\fB\-\-secure\fR +Remove all the capabilities to make a virtual server trustable. +.TP +\fB\-\-silent\fR +Do not print the allocated context number. +.LP +Information about context is found in /proc/self/status +.SH "FILES" +.LP +\fI/usr/sbin/chcontext\fP + + +.SH "EXAMPLES" +.LP +# You must be root, running X. +# We start an xterm in another security context +/usr/sbin/chcontext xterm & + +# We check, there is no xterm running, yet we can +# see it. +ps ax | grep xterm + +# Are we running in security context 0 +# We check the s_context line in /proc/self/status +cat /proc/self/status + +# Ok we in security context 0 +# Try the security context 1 +/usr/sbin/chcontext \-\-ctx 1 ps ax | grep xterm + +# Ok, we see the xterm, we try to kill it +/usr/sbin/chcontext \-\-ctx 1 killall xterm + +# No, security context 1 can see, but can't kill +# let's find out in which security context this +# xterm is running +/usr/sbin/chcontext \-\-ctx 1 ps ax | grep xterm + +# Ok, this is PID XX. We need the security context +/usr/sbin/chcontext \-\-ctx 1 cat /proc/XX/status + +# We see the s_context, this is SS. +# We want to kill this process +/usr/sbin/chcontext \-\-ctx SS killall xterm +.LP +Please contribute some, if you feel it's important. +.SH "AUTHORS" +.LP +This Man page was written by Klavs Klavsen and based upon the helpful output from the program itself and the documentation on the Virtual Server site +.SH "SEE ALSO" +.LP +chbind(8) rebootmgr(8) reducecap(8) +vps(8) vpstree(8) vrpm(8) vserver(8) +vserver\-stat(8) vtop(8) diff --git a/man/distrib-info.8 b/man/distrib-info.8 new file mode 100644 index 0000000..5a7d867 --- /dev/null +++ b/man/distrib-info.8 @@ -0,0 +1,50 @@ +.TH "distrib-info" "8" "0.1.0" "Jacques Gelinas " "System Administration" +.SH "NAME" +.LP +distrib-info \- A distribution independant utility to retrieve package information. +.SH "SYNTAX" +.LP +distrib-info vserver-name command [options] + +.SH "DESCRIPTION" +.LP +distrib-info \- This utility provides a solution to hide some differences +between Linux distributions. The various utilities (vunify, vbuild, ...) +need package information to perform their task. They call distrib-info +to retrieve this information. distrib-info is the only one understanding +the various distribution out there. +.TP +This utility is only used as a back-end for other utilities such as +vunify and vbuild. +.SH "OPTIONS" +.LP +.TP +\fBdumpfiles\fR reports all files owned by a package. +.TP +\fBpkgversion\fR reports all packages and version. +.TP +\fBunifiles\fR reports the files of a package which may be shared by +several virtual servers. Generally, this excludes all configuration files. + +.SH "EXAMPLES" +.LP +The following command will report all packages in the vserver ref80. +The package will be presented with the version/release. + + distrib-info ref80 pkgversion + +To get the list of unify-able (sharable) file in package sendmail +of the vserver ref80, we do + + distrib-info ref80 unifiles sendmail +.SH "FILES" +.LP + /usr/lib/vservers/distrib-info +.SH "AUTHORS" +.LP +This Man page was written by Jacques Gelinas . +.SH "SEE ALSO" +.LP +vbuild(8) vfiles(8) vunify(8) +newvserver(8) + diff --git a/man/rebootmgr.8 b/man/rebootmgr.8 new file mode 100644 index 0000000..4ccfe5b --- /dev/null +++ b/man/rebootmgr.8 @@ -0,0 +1,38 @@ +.TH "rebootmgr" "8" "0.1.0" "Klavs Klavsen " "System Administration" +.SH "NAME" +.LP +rebootmgr \- rebootmgr stops and starts one or more vservers at your command. +.SH "SYNTAX" +.LP +rebootmgr \fIvserver\-name\fP [\fIvserver\-name\fP ...] \fICommand\fP +.SH "DESCRIPTION" +.LP +The chbind utility executes a command, and locks the resulting process and its children into using a specific IP number/Interface, no matter what it is told in it's configuration. This applies to services and client connection as well. +.SH "OPTIONS" +.LP +.TP +\fB\-\-ip\fR ip_number/interface +Binds the process to the given IP number or Interface. +.TP +\fB\-\-silent\fR +Do not complain. + +.SH "FILES" +.LP +\fI/usr/sbin/rebootmgr\fP + + +.SH "EXAMPLES" +.LP +If I wanted to ensure my httpd listened only on my eth0 interface, I could do: +chbind \-\-ip eth0 /etc/rc.d/init.d/httpd start +.LP +Please contribute some, if you feel it's important. +.SH "AUTHORS" +.LP +This Man page was written by Klavs Klavsen and based upon the helpful output from the program itself and the documentation on the Virtual Server site +.SH "SEE ALSO" +.LP +chcontext(8) chbind(8) reducecap(8) +vps(8) vpstree(8) vrpm(8) vserver(8) +vserver\-stat(8) vtop(8) diff --git a/man/reducecap.8 b/man/reducecap.8 new file mode 100644 index 0000000..bb16a4d --- /dev/null +++ b/man/reducecap.8 @@ -0,0 +1,124 @@ +.TH "reducecap" "8" "0.1.0" "Klavs Klavsen " "System Administration" +.SH "NAME" +.LP +reducecap \- The reducecap utility is used to lower the capability ceiling of a process and child process. +.SH "SYNTAX" +.LP +reducecap [\fIoptions\fP] <\fIcommand arguments\fP> +.SH "DESCRIPTION" +.LP +The reducecap utility is used to lower the capability ceiling of a process and child process. Even setuid program won't be able to grab more capabilities. +.SH "OPTIONS" +.LP +.TP +\fB\-\-secure\fR Removes all dangerous capabilities from the process executed.Specificly it removes: +CAP_LINUX_IMMUTABLE CAP_NET_BROADCAST CAP_NET_ADMIN, CAP_NET_RAW CAP_IPC_LOCK CAP_IPC_OWNER CAP_SYS_MODULE CAP_SYS_RAWIO CAP_SYS_PACCT CAP_SYS_ADMIN CAP_SYS_BOOT CAP_SYS_NICE CAP_SYS_RESOURCE CAP_SYS_TIME CAP_MKNOD. + +Leaving the following capabilities: +CAP_CHOWN CAP_DAC_OVERRIDE CAP_DAC_READ_SEARCH CAP_FOWNER CAP_FSETID CAP_KILL CAP_SETGID CAP_SETUID CAP_NET_BIND_SERVICE CAP_SYS_CHROOT CAP_SYS_PTRACE CAP_SYS_TTY_CONFIG CAP_LEASE CAP_QUOTACTL +.TP +\fB\-\-show\fR Shows the current process capabilities. +.TP +\fB\-\-flag\fR +sets the security context flags. The option may be repeated +several times. Here are the values: + +lock: The security context can't be changed. The process is trapped + in this context. This is generally used for vservers because yoy + do not want them to hide in new security context. + +sched: Each process in a security context contribute (lower) to the general + priority of every processes in the context. Mostly, all processes + in a security context take as much CPU together as one process + not bound to this flag. Said again differently, a vserver having + 100 active processes won't get more CPU than another vserver + with a single active process. + + +nproc: The "ulimit -u N" setting becomes global to the security context. It means + the security context is not allowed to have more than N processes. + +private: No other processes, even root in security context 0, is allowed to + enter this security context. Once a security context is setup + with this flag, it is on its own. This also means that root + in security context 0 won't be able to kill or interact with those + processes. + +hideinfo: Hides various information in /proc. + +.TP +\fB--LINUX_IMMUTABLE\fR +.TP +\fB--NET_BIND_SERVICE\fR +.TP +\fB--NET_BROADCAST\fR +.TP +\fB--NET_ADMIN\fR +.TP +\fB--NET_RAW\fR +.TP +\fB--IPC_LOCK\fR +.TP +\fB--IPC_OWNER\fR +.TP +\fB--SYS_MODULE\fR +.TP +\fB--SYS_RAWIO\fR +.TP +\fB--SYS_PACCT\fR +.TP +\fB--SYS_ADMIN\fR +.TP +\fB--SYS_BOOT\fR +.TP +\fB--SYS_NICE\fR +.TP +\fB--SYS_RESOURCE\fR +.TP +\fB--SYS_TIME\fR +.TP +\fB--MKNOD\fR + +All these options remove one capability. These options may be used +after the +\fB--secure\fR +option to remove more capabilities. + + +.SH "FILES" +.LP +\fI/usr/sbin/reducecap\fP + + +.SH "EXAMPLES" +.LP +# You are not root now +# What is the current capability ceiling +cat /proc/self/status +# The capBset line presents mostly 1s. +/usr/sbin/reducecap \-\-secure /bin/sh +cat /proc/self/status +# The capBset now shows many more 0s. +# The capEff shows all 0s, you have no privilege now +# We su to root +su +cat /proc/self/status +# capEff is much better now, but there are still many 0s +# Now we try to see if we are really root +tail /var/log/messages +# So far so good, we see the content +/sbin/ifconfig eth0 +/sbin/ifconfig eth0 down +# No way, we can't configure the interface. In fact +# we have lost most privilege normally assigned to root +exit +.LP +Please contribute some more, if you feel it's important. +.SH "AUTHORS" +.LP +This Man page was written by Klavs Klavsen and based upon the helpful output from the program itself and the documentation on the Virtual Server site +.SH "SEE ALSO" +.LP +chcontext(8) rebootmgr(8) chbind(8) +vps(8) vpstree(8) vrpm(8) vserver(8) +vserver\-stat(8) vtop(8) diff --git a/man/vps.8 b/man/vps.8 new file mode 100644 index 0000000..4b653f0 --- /dev/null +++ b/man/vps.8 @@ -0,0 +1,31 @@ +.TH "vps" "8" "0.1.0" "Klavs Klavsen " "System Administration" +.SH "NAME" +.LP +vps \- The vps utility is simply a wrapper for the ps program. +.SH "SYNTAX" +.LP +vps [\fIoptions\fP] + +.SH "DESCRIPTION" +.LP +vps \- The vps utility is simply a wrapper for the ps program, that enables ps to show you the all the processes on the system, instead of only the ones in the current s_context (see cat /proc/self/status). +.SH "OPTIONS" +.LP +.TP +See man ps. +.SH "FILES" +.LP +\fI/usr/sbin/vps\fP + + +.SH "EXAMPLES" +.LP +Please contribute some, if you feel it's important. +.SH "AUTHORS" +.LP +This Man page was written by Klavs Klavsen and based upon the helpful output from the program itself and the documentation on the Virtual Server site +.SH "SEE ALSO" +.LP +chcontext(8) rebootmgr(8) reducecap(8) +chbind(8) vpstree(8) vrpm(8) vserver(8) +vserver\-stat(8) vtop(8) diff --git a/man/vpstree.8 b/man/vpstree.8 new file mode 100644 index 0000000..27c1b24 --- /dev/null +++ b/man/vpstree.8 @@ -0,0 +1,31 @@ +.TH "vpstree" "8" "0.1.0" "Klavs Klavsen " "System Administration" +.SH "NAME" +.LP +vpstree \- The vpstree utility is simply a wrapper for the pstree program. +.SH "SYNTAX" +.LP +vpstree [\fIoptions\fP] + +.SH "DESCRIPTION" +.LP +vpstree \- The vpstree utility is simply a wrapper for the pstree program, that enables pstree to show you the all the processes on the system, instead of only the ones in the current s_context (see cat /proc/self/status). +.SH "OPTIONS" +.LP +.TP +See man pstree. +.SH "FILES" +.LP +\fI/usr/sbin/vpstree\fP + + +.SH "EXAMPLES" +.LP +Please contribute some, if you feel it's important. +.SH "AUTHORS" +.LP +This Man page was written by Klavs Klavsen and based upon the helpful output from the program itself and the documentation on the Virtual Server site +.SH "SEE ALSO" +.LP +chcontext(8) rebootmgr(8) reducecap(8) +chbind(8) vps(8) vrpm(8) vserver(8) +vserver\-stat(8) vtop(8) diff --git a/man/vrpm.8 b/man/vrpm.8 new file mode 100644 index 0000000..e6eb456 --- /dev/null +++ b/man/vrpm.8 @@ -0,0 +1,48 @@ +.TH "vrpm" "8" "0.1.0" "Klavs Klavsen " "System Administration" +.SH "NAME" +.LP +vrpm \- is simply a wrapper for the rpm utility. +.SH "SYNTAX" +.LP +vrpm [--unify] [ALL | vserver1 vserver2 ...] \-\- [rpm options] + +.SH "DESCRIPTION" +.LP +vrpm \- is simply a wrapper for the rpm utility. It enables rpm to manage a specific, several or all virtual server(s) with one command. +vrpm is executed in the root server. +.SH "OPTIONS" +.LP +.TP +\fB\-\-\fR All commands after this, is given to the rpm utility (see man rpm). +.TP +The +\fB--unify\fR option triggers the vunify utility on the vservers and the +supplied packages. +.SH "FILES" +.LP +\fI/usr/sbin/vrpm\fP + + +.SH "EXAMPLES" +.TP +verifies the gcc package on all vservers. +.LP +vrpm ALL \-\- \-\-verify gcc +.TP +Updates package.rpm on vserver1 and vserver2 if +the package exists in a earlier version +(the F flag for rpm). +.LP +vrpm vserver1 vserver2 \-\- \-Fvh package.rpm +.TP +vrpm is executed in the root server +.LP +Please contribute some more, if you feel it's important. +.SH "AUTHORS" +.LP +This Man page was written by Klavs Klavsen and based upon the helpful output from the program itself and the documentation on the Virtual Server site +.SH "SEE ALSO" +.LP +chcontext(8) rebootmgr(8) reducecap(8) +chbind(8) vps(8) vtop(8) vserver(8) +vserver\-stat(8) vpstree(8) diff --git a/man/vserver-copy.8 b/man/vserver-copy.8 new file mode 100644 index 0000000..48e3cf2 --- /dev/null +++ b/man/vserver-copy.8 @@ -0,0 +1,93 @@ +.TH "vserver-copy" "8" "0.3" "Mark Lawrence " "System Administration" +.SH "NAME" +.LP +vserver-copy \- copy/move a virtual server. +.SH "SYNTAX" +.LP +vserver-copy [\fIoptions\fP] \fIvserver\fP \fInewname\fP +.LP +vserver-copy [\fIoptions\fP] \fIvserver\fP \fIhost\fP:[\fInewname\fP] +.SH "DESCRIPTION" +.LP +vserver-copy makes a copy of a virtual server using rsync. It will +rewrite the vserver.conf configuration file with the new hostname and +IP information when given. If the destination name contains a host +specification then ssh/rsh will be used for the data transfer. + +vserver-copy can used on a running vserver, although naturally the +consistency of open database files and the like cannot be guaranteed. +A running vserver can however be safely moved from one root host to another +using the \-s flag. + +If downtime is an issue when moving a virtual server across hosts you +should first run vserver without the \-s flag. This will pre\-populate the +destination filesystem requiring only updates to be made on the next +invocation. +.SH "OPTIONS" +.LP +.TP +\fB\-h\fR,\fB-\-help\fR +output usage information and exit +.TP +\fB\-V\fR,\fB-\-version\fR +output version information and exit +.TP +\fB\-v\fR,\fB-\-verbose\fR +show all output (normally only informational messages and warnings) +.TP +\fB\-q\fR,\fB-\-quiet\fR +suppress all output +.TP +\fB\-d\fR,\fB-\-domain\fR domain +the new DNS domain when changing name. Overwrites /etc/hosts. Must be +used with \-i +.TP +\fB\-i\fR,\fB-\-ip\fR address +the new IP address when changing name. Overwrites /etc/hosts. Must be +used with \-d +.TP +\fB\-r\fR,\fB-\-vsroot\fR +directory containing virtual servers. Defaults to "/vserver" +.TP +\fB\-R\fR,\fB-\-rsh\fR +use rsh instead of the default ssh for network transfer +.TP +\fB\-s\fR,\fB-\-stopstart\fR +stop the virtual server before copying and start the new vserver afterwards. +This really only makes sense if you are copying across root hosts and not +changing names or IP addresses. +.SH "FILES" +.LP +\fI/etc/vservers/vserver.conf\fP +.SH "EXAMPLES" +.LP +# Copy a template vserver (same IP addresses etc) + +/usr/sbin/vserver-copy template web01 + +# Copy webserver with change in configuration + +/usr/sbin/vserver-copy -i 192.168.5.62 -d example.com template web62 + +# Move a running vserver to another roothost + +/usr/sbin/vserver-copy -s web62 roothost02: + +.SH "BUGS" +.LP +If a virtual server is moved from one root host to another a gratuitious +ping should be sent to inform other devices on the local area network +of the change in MAC address. + +Without this ping the devices will continue to attempt to reach the old +MAC address for the length of their arp-cache timeout (10 minute default +on Suns!). + +This functionality should probably be implmemented during the +"vserver start" process. +.SH "AUTHOR" +.LP +Mark Lawrence +.SH "SEE ALSO" +.LP +vserver(8) diff --git a/man/vserver-stat.8 b/man/vserver-stat.8 new file mode 100644 index 0000000..4c1ac2d --- /dev/null +++ b/man/vserver-stat.8 @@ -0,0 +1,40 @@ +.TH "vserver-stat" "8" "0.1.0" "Klavs Klavsen " "System Administration" +.SH "NAME" +.LP +vserver\-stat +.SH "SYNTAX" +.LP +vserver\-stat + +.SH "DESCRIPTION" +.LP +vserver\-stat \- The vserver\-stat utility shows informations about all the active contexts. + + CTX# Context number + #0 = root context + #1 = monitoring context + PROC QTY Quantity of processes in each + context + VSZ Number of pages of virtual + memory + RSS Resident set size + utime User\-mode CPU time + accumulated + ctime Kernel\-mode CPU time + accumulated +.SH "FILES" +.LP +\fI/usr/sbin/vserver\-stat\fP + + +.SH "EXAMPLES" +.LP +Please contribute some, if you feel it's important. +.SH "AUTHORS" +.LP +This Man page was written by Klavs Klavsen and based upon the helpful output from the program itself and the documentation on the Virtual Server site +.SH "SEE ALSO" +.LP +chcontext(8) rebootmgr(8) reducecap(8) +chbind(8) vps(8) vrpm(8) vserver(8) +vtop(8) vpstree(8) diff --git a/man/vserver.8 b/man/vserver.8 new file mode 100644 index 0000000..6ea2052 --- /dev/null +++ b/man/vserver.8 @@ -0,0 +1,74 @@ +.TH "vserver" "8" "0.1.0" "Klavs Klavsen " "System Administration" +.SH "NAME" +.LP +vserver \- The vserver utility enables you to control different aspects of your vservers. +.SH "SYNTAX" +.LP +vserver [ options ] [vserver name] [options] + +.SH "DESCRIPTION" +.LP +vserver \- The vserver utility enables you to control different aspects of your vservers, such as stopping and starting them, and services within them. +.SH "OPTIONS" +.LP +.TP +\fBbuild\fR Create a virtual server by copying the packages of the root server +.TP +\fBenter\fR Enter in the virtual server context and starts a shell. Same as "vserver name exec /bin/sh\". +.TP +\fBexec\fR Exec a command in the virtual server context as root. +syntax: vserver name exec command ... +.TP +\fBsuexec\fR Exec a command in the virtual server context under some user id. +syntax: vserver name suexec userid command ... +.TP +\fBservice\fR Control a service inside a vserver. +syntax: vserver name service service\-name (start/stop/restart etc.) +.TP +\fBstart\fR Starts the various services in the vserver. +It uses the default runlevel found in the +.B /etc/inittab +file of the vserver. +.TP +\fBstop\fR Ends all services and kills the remaining processes. +.TP +\fBrunning\fR Tells if a virtual server is running. It returns proper exit code, so you can use it as a test. +.TP +\fBstatus\fR Tells various information about the state of a virtual server: +running status, number of running processes and uptime. +.TP +.I --nodev +do not configure the IP devices associated with the vserver. This +is useful to execute some commands on the vserver (or enter it) +without making it active on the network. Especially useful if you +have an active copy of the vserver moved to another server on the +network. +.TP +.I --silent +cuts most informative messages. + +.SH "FILES" +.LP +\fI/usr/sbin/vserver\fP +.P +\fI/etc/vservers/*.conf\fP +.P +\fI/etc/vservers/*.sh\fP +.P +\fI/vservers/*\fP + +.SH "EXAMPLES" +.LP +Please contribute some, if you feel it's important. +.SH "AUTHORS" +.LP +This Man page was written by Klavs Klavsen and based upon the helpful output from the program itself and the documentation on the Virtual Server site +.SH "SEE ALSO" +.LP +chbind(8) chcontext(8) +newvserver(8) +rebootmgr(8) reducecap(8) +vps(8) vpstree(8) +vrpm(8) +vserver\-stat(8) +vtop(8) diff --git a/man/vtop.8 b/man/vtop.8 new file mode 100644 index 0000000..440bc27 --- /dev/null +++ b/man/vtop.8 @@ -0,0 +1,31 @@ +.TH "vtop" "8" "0.1.0" "Klavs Klavsen " "System Administration" +.SH "NAME" +.LP +vtop \- The vtop utility is simply a wrapper for the top program. +.SH "SYNTAX" +.LP +vtop [\fIoptions\fP] + +.SH "DESCRIPTION" +.LP +vtop \- The vtop utility is simply a wrapper for the top program, that enables top to show you the all the processes on the system, instead of only the ones in the current s_context (see cat /proc/self/status). +.SH "OPTIONS" +.LP +.TP +See man top. +.SH "FILES" +.LP +\fI/usr/sbin/vtop\fP + + +.SH "EXAMPLES" +.LP +Please contribute some, if you feel it's important. +.SH "AUTHORS" +.LP +This Man page was written by Klavs Klavsen and based upon the helpful output from the program itself and the documentation on the Virtual Server site +.SH "SEE ALSO" +.LP +chcontext(8) rebootmgr(8) reducecap(8) +chbind(8) vps(8) vrpm(8) vserver(8) +vserver\-stat(8) vpstree(8) diff --git a/missing b/missing new file mode 100755 index 0000000..e7ef83a --- /dev/null +++ b/missing @@ -0,0 +1,360 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. + +scriptversion=2003-09-02.23 + +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 +# 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 +# 02111-1307, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 +fi + +run=: + +# In the cases where this matters, `missing' is being run in the +# srcdir already. +if test -f configure.ac; then + configure_ac=configure.ac +else + configure_ac=configure.in +fi + +msg="missing on your system" + +case "$1" in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + # Exit code 63 means version mismatch. This often happens + # when the user try to use an ancient version of a tool on + # a file that requires a minimum version. In this case we + # we should proceed has if the program had been absent, or + # if --run hadn't been passed. + if test $? = 63; then + run=: + msg="probably too old" + fi + ;; +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] + +Send bug reports to ." + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + + aclocal*) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acinclude.m4' or \`${configure_ac}'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`${configure_ac}'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acconfig.h' or \`${configure_ac}'. You might want + to install the \`Autoconf' and \`GNU m4' packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` + test -z "$files" && files="config.h" + touch_files= + for f in $files; do + case "$f" in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; + esac + done + touch $touch_files + ;; + + automake*) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. + You might want to install the \`Automake' and \`Perl' packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print | + sed 's/\.am$/.in/' | + while read f; do touch "$f"; done + ;; + + autom4te) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + + echo 1>&2 "\ +WARNING: \`$1' is needed, but is $msg. + You might have modified some files without having the + proper tools for further handling them. + You can get \`$1' as part of \`Autoconf' from any GNU + archive site." + + file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` + test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo "#! /bin/sh" + echo "# Created by GNU Automake missing as a replacement of" + echo "# $ $@" + echo "exit 0" + chmod +x $file + exit 1 + fi + ;; + + bison|yacc) + echo 1>&2 "\ +WARNING: \`$1' $msg. 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 $msg. You should only need it if + you modified a \`.l' file. You may need the \`Flex' package + in order for those modifications to take effect. You can get + \`Flex' from any GNU archive site." + rm -f lex.yy.c + if [ $# -ne 1 ]; then + eval LASTARG="\${$#}" + case "$LASTARG" in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if [ ! -f lex.yy.c ]; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + help2man) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + + echo 1>&2 "\ +WARNING: \`$1' is $msg. 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 $msg. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + if test -z "$file"; then + file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` + fi + touch $file + ;; + + tar) + shift + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + fi + + # We have already tried tar in the generic part. + # Look for gnutar/gtar before invocation to avoid ugly error + # messages. + if (gnutar --version > /dev/null 2>&1); then + gnutar "$@" && exit 0 + fi + if (gtar --version > /dev/null 2>&1); then + gtar "$@" && exit 0 + fi + firstarg="$1" + if shift; then + case "$firstarg" in + *o*) + firstarg=`echo "$firstarg" | sed s/o//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + case "$firstarg" in + *h*) + firstarg=`echo "$firstarg" | sed s/h//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + fi + + echo 1>&2 "\ +WARNING: I can't seem to be able to run \`tar' with the given arguments. + You may want to install GNU tar or Free paxutils, or check the + command line arguments." + exit 1 + ;; + + *) + echo 1>&2 "\ +WARNING: \`$1' is needed, and is $msg. + 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 prerequisites 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 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/mkinstalldirs b/mkinstalldirs new file mode 100755 index 0000000..6504b74 --- /dev/null +++ b/mkinstalldirs @@ -0,0 +1,143 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy + +scriptversion=2003-11-08.23 + +# Original author: Noah Friedman +# Created: 1993-05-16 +# Public domain. +# +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +errstatus=0 +dirmode="" + +usage="\ +Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... + +Create each directory DIR (with mode MODE, if specified), including all +leading file name components. + +Report bugs to ." + +# process command line arguments +while test $# -gt 0 ; do + case $1 in + -h | --help | --h*) # -h for help + echo "$usage" + exit 0 + ;; + -m) # -m PERM arg + shift + test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } + dirmode=$1 + shift + ;; + --version) + echo "$0 $scriptversion" + exit 0 + ;; + --) # stop option processing + shift + break + ;; + -*) # unknown option + echo "$usage" 1>&2 + exit 1 + ;; + *) # first non-opt arg + break + ;; + esac +done + +for file +do + if test -d "$file"; then + shift + else + break + fi +done + +case $# in + 0) exit 0 ;; +esac + +case $dirmode in + '') + if mkdir -p -- . 2>/dev/null; then + echo "mkdir -p -- $*" + exec 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. + test -d ./-p && rmdir ./-p + test -d ./-- && rmdir ./-- + fi + ;; + *) + if mkdir -m "$dirmode" -p -- . 2>/dev/null; then + echo "mkdir -m $dirmode -p -- $*" + exec mkdir -m "$dirmode" -p -- "$@" + else + # Clean up after NextStep and OpenStep mkdir. + for d in ./-m ./-p ./-- "./$dirmode"; + do + test -d $d && rmdir $d + done + fi + ;; +esac + +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" + + mkdir "$pathcomp" || lasterr=$? + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + else + if test ! -z "$dirmode"; then + echo "chmod $dirmode $pathcomp" + lasterr="" + chmod "$dirmode" "$pathcomp" || lasterr=$? + + if test ! -z "$lasterr"; then + errstatus=$lasterr + fi + fi + fi + fi + + pathcomp="$pathcomp/" + done +done + +exit $errstatus + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/scripts/Makefile-files b/scripts/Makefile-files new file mode 100644 index 0000000..cec9518 --- /dev/null +++ b/scripts/Makefile-files @@ -0,0 +1,65 @@ +## $Id: Makefile-files,v 1.1.4.3 2003/12/03 00:06:37 ensc Exp $ -*- makefile -*- + +## Copyright (C) 2003 Enrico Scholz +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2, or (at your option) +## any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +## + +scriptscfgdir = $(sbindir) + +scripts_src_SCRPTS = scripts/distrib-info \ + scripts/rootshell \ + scripts/save_s_context \ + scripts/vprofile \ + scripts/vserverkillall \ + scripts/vservers.grabinfo.sh \ + scripts/vsysvwrapper +scripts_gen_SCRPTS = + +scripts_src_LEGSCRPTS = scripts/vunify.sh +scripts_gen_LEGSCRPTS = scripts/vkill + + +scripts_src_PRGS = scripts/vpstree \ + scripts/vrpm \ + scripts/vserver \ + scripts/vserver-copy \ + scripts/vtop +scripts_gen_PRGS = scripts/vps + +scripts_PRGS = $(scripts_src_PRGS) $(scripts_gen_PRGS) +scripts_SCRPTS = $(scripts_src_SCRPTS) $(scripts_gen_SCRPTS) +scripts_LEGSCRPTS = $(scripts_src_LEGSCRPTS) $(scripts_gen_LEGSCRPTS) +scriptscfg_DATA = scripts/util-vserver-vars + +scripts_XTRAS = scripts/util-vserver-vars.subst \ + scripts/vkill.subst \ + scripts/vps.subst \ + $(scripts_src_SCRPTS) $(scripts_src_PRGS) \ + $(scripts_src_LEGSCRPTS) + +scripts_GENSCRPTS = scripts/util-vserver-vars \ + $(scripts_gen_SCRPTS) $(scripts_gen_PRGS) \ + $(scripts_gen_LEGSCRPTS) + +scripts/%: scripts/%.subst + @mkdir -p $$(dirname '$@') + sed -e 's!@'PKGLIBDIR'@!$(pkglibdir)!g; \ + s!@'SBINDIR'@!$(sbindir)!g; \ + s!@'VSERVERDIR'@!$(vserverdir)!g' '$<' >'$@.tmp' + @-chmod --reference='$<' '$@.tmp' + @-rm -f '$@' + mv '$@.tmp' '$@' + @chmod a-w '$@' diff --git a/scripts/distrib-info b/scripts/distrib-info new file mode 100755 index 0000000..5a35f5e --- /dev/null +++ b/scripts/distrib-info @@ -0,0 +1,77 @@ +#!/bin/bash + +# Copyright (C) 2003 Enrico Scholz +# based on distrib-info by Jacques Gelinas +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +# This scripts knows about every possible distribution (well, it should) +# It is passed a vserver name and a key (a command). The key represent a task. +# It executes the command and output on stdout. +# For example +# distrib-info vserver1 pkgversion +# If vserver1 is a redhat system, it executes +# rpm -qa --queryformat "%{name}=%{version}-%{release} +: ${UTIL_VSERVER_VARS:=$(dirname $0)/util-vserver-vars} +test -e "$UTIL_VSERVER_VARS" || { + echo "Can not find util-vserver installation; aborting..." + exit 1 +} +. "$UTIL_VSERVER_VARS" + +if [ "$1" = "" ] ; then + echo distrib-info vserver-name command [ args ... ] >&2 + echo Commands are: >&2 + echo dumpfiles: Shows all files owned by a package >&2 + echo pkgversion: reports all packages and their version/release >&2 + echo unifiles: reports all unify-able file of a package >&2 + exit 1 +fi +if [ "$1" = "/" ] ; then + DISTDIR=/ + CHROOTCMD= +elif [ -d "$1" ] ; then + DISTDIR=$1 + CHROOTCMD="$SBINDIR/chroot $DISTDIR" +else + DISTDIR=$VROOTDIR/$1 + CHROOTCMD="$SBINDIR/chroot $DISTDIR" +fi +KEY=$2 +shift +shift +if [ -f $DIRDIR/etc/redhat-release -o -f $DISTDIR/etc/mandrake-release ] ; then + case $KEY in + pkgversion) + $CHROOTCMD /bin/rpm -qa --queryformat "%{name}=%{version}-%{release}\n" + ;; + unifiles) + # We remove /etc and /var/log to make sure no special file + # there will be unified + $CHROOTCMD /bin/rpm -ql --dump $* \ + | $PKGLIBDIR/parserpmdump /etc/ + ;; + dumpfiles) + $CHROOTCMD /bin/rpm -ql $* + ;; + *) + echo unknown request $KEY >&2 + ;; + esac +else + echo Distribution not supported yet >&2 +fi + diff --git a/scripts/rootshell b/scripts/rootshell new file mode 100755 index 0000000..0331278 --- /dev/null +++ b/scripts/rootshell @@ -0,0 +1,31 @@ +#!/bin/sh +# Copyright (C) 2003 Enrico Scholz +# based on rootshell by Jacques Gelinas +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +: ${UTIL_VSERVER_VARS:=$(dirname $0)/util-vserver-vars} +test -e "$UTIL_VSERVER_VARS" || { + echo "Can not find util-vserver installation; aborting..." + exit 1 +} +. "$UTIL_VSERVER_VARS" + +OPTIONS=$@ +if [ "$OPTIONS" = "" ] ; then + OPTIONS=--login +fi +exec $SBINDIR/chbind --silent --ip 0.0.0.0 /bin/bash $OPTIONS + diff --git a/scripts/save_s_context b/scripts/save_s_context new file mode 100755 index 0000000..535c14e --- /dev/null +++ b/scripts/save_s_context @@ -0,0 +1,32 @@ +#!/bin/sh + +# Copyright (C) 2003 Enrico Scholz +# based on save_s_context by Jacques Gelinas +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +if [ $# -lt 1 ] ;then + echo save_s_context file command + echo Save the security context in file and execute a command +else + CTX=`grep ^s_context: /proc/self/status | sed s/s_context:// | (read a b; echo $a)` + CTX=`eval expr $CTX + 0` + echo S_CONTEXT=$CTX >$1 + echo S_PROFILE=$PROFILE >>$1 + shift + exec "$@" +fi + + diff --git a/scripts/util-vserver-vars.subst b/scripts/util-vserver-vars.subst new file mode 100644 index 0000000..bb66358 --- /dev/null +++ b/scripts/util-vserver-vars.subst @@ -0,0 +1,3 @@ +PKGLIBDIR='@PKGLIBDIR@' +SBINDIR='@SBINDIR@' +VROOTDIR='@VSERVERDIR@' diff --git a/scripts/vkill.subst b/scripts/vkill.subst new file mode 100755 index 0000000..78c129a --- /dev/null +++ b/scripts/vkill.subst @@ -0,0 +1,60 @@ +#!/usr/bin/perl -w + +# Copyright (C) 2003 Enrico Scholz +# based on vkill by Philip Snyder +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# kill wrapper for vserver. +# Philip Snyder +# 2002/02/06 19:00 PST + + +$PROC = $ARGV[0]; + +# Grab the output from a context query against this process id +open(PH, "@SBINDIR@/chcontext --silent --ctx 1 cat /proc/$PROC/status 2>&1 |"); + +# Loop through the output +while () { + + # Searching for a line that looks like this: + # s_context: # + if (/^s_context: ([0-9]+)/) { + + print "Process id $PROC was found in security context $1.\n"; + + # Make sure the process is in a vserver context + if ($1 > 0) { + + # Since we have the context and the process id, we can kill it + print " + Killing... "; + `@SBINDIR@/chcontext --ctx $1 kill $PROC`; + print "[done]\n"; + + } else { + + # Not in vserver context, so its a process on the actual server + print " + Killing... "; + `kill $PROC`; + print "[done]\n"; + + } + exit; + } +} + +print "Process id $PROC not found.\n"; +exit diff --git a/scripts/vprofile b/scripts/vprofile new file mode 100755 index 0000000..26fe562 --- /dev/null +++ b/scripts/vprofile @@ -0,0 +1,37 @@ +#!/bin/sh + +# Copyright (C) 2003 Enrico Scholz +# based on vprofile by Jacques Gelinas +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# Prints or select the active profile for a vserver +if [ $# != 1 -a $# != 2 ] ; then + echo vprofile vserver [ profile-name ] +else + if [ ! -f /etc/vservers/$1.conf ] ; then + echo vserver $1 does not exist >&2 + else + unset PROFILE + . /etc/vservers/$1.conf + if [ $# = 1 ] ; then + echo PROFILE=$PROFILE + elif [ $# = 2 ] ; then + grep .\*\) /etc/vservers/$1.conf + fi + fi +fi + + diff --git a/scripts/vps.subst b/scripts/vps.subst new file mode 100755 index 0000000..ea32a37 --- /dev/null +++ b/scripts/vps.subst @@ -0,0 +1,125 @@ +#!/usr/bin/perl + +# Copyright (C) 2003 Enrico Scholz +# based on vps by Krischan Jodies +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# Wrapper for ps. Adds security context number and name +# to the PID column. +# +# (c) 2002 krischan.jodies@sernet.de +# version 1.0 + +# 1.1 Added error messages + +if ($ARGV[0] eq "--help") { + exec("ps @ARGV"); + exit; +} + + +$lockdir = "/var/run/vservers"; + +$pid_length = 5; +get_server_names(); +$context=get_context("self"); + +if ($context == -1) { + print "Can not find my security context. Is this a ctx kernel?\n"; + exit; +} +if ($context != 1) { + exec("@SBINDIR@/chcontext --silent --ctx 1 $0 @ARGV"); + print "Can not execute chcontext\n"; + exit; # not reached +} + + +if (! open PS, "ps @ARGV|") { + print "Can not execute ps\n"; + exit; +} +while () { + chomp; + push @ps,$_; +} + +$header = shift @ps; +$header =~ /(.*) PID(.+)/; +$left = $1; +$right = $2; +$left_length = length($left); +print "${left} PID CONTEXT ${right}\n"; +foreach $line (@ps) { + $pid = substr $line,$left_length,$pid_length; + print substr $line,0,$left_length; + print "$pid"; + $context = get_context($pid); + $context_name = getcontextname($context); + printf " %-3s %-10s",$context,$context_name; + print substr $line,$left_length + $pid_length; + print "\n"; + +} + +exit; + +sub get_context +{ + my $pid = $_[0]; + $pid =~ s/ //g; + open STATUS, "/proc/$pid/status"; + while () + { + chomp; + if (/s_context: (\d+)/) { + close STATUS; + return $1; + } + } + close STATUS; + return -1; +} + +sub getcontextname { + if (exists $name{$_[0]}) { + return $name{$_[0]}; + } + if ($_[0] == 1) { + return "ALL_PROCS"; + } + elsif ($_[0] == 0) { + return "MAIN"; + } + return "UNKNOWN"; +} + + +sub get_server_names +{ + opendir LOCKDIR, "$lockdir"; + while ($file=readdir(LOCKDIR)) { + if (-f "$lockdir/$file") { + open FILE, "$lockdir/$file"; + $file =~ s/(.+)\.ctx/$1/; + while () { + if (/S_CONTEXT=(\d+)/) { + $name{$1} = $file; + } + } + } + } +} diff --git a/scripts/vpstree b/scripts/vpstree new file mode 100755 index 0000000..b918308 --- /dev/null +++ b/scripts/vpstree @@ -0,0 +1,30 @@ +#!/bin/sh + +# Copyright (C) 2003 Enrico Scholz +# based on vpstree by Jacques Gelinas +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +#Presents the processes running in all virtual servers +: ${UTIL_VSERVER_VARS:=$(dirname $0)/util-vserver-vars} +test -e "$UTIL_VSERVER_VARS" || { + echo "Can not find util-vserver installation; aborting..." + exit 1 +} +. "$UTIL_VSERVER_VARS" + +exec $SBINDIR/chcontext --silent --ctx 1 pstree $* + + diff --git a/scripts/vrpm b/scripts/vrpm new file mode 100755 index 0000000..86d2214 --- /dev/null +++ b/scripts/vrpm @@ -0,0 +1,105 @@ +#!/bin/sh + +# Copyright (C) 2003 Enrico Scholz +# based on vrpm by Jacques Gelinas +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# Wrapper to update/install package in many vservers at once + +: ${UTIL_VSERVER_VARS:=$(dirname $0)/util-vserver-vars} +test -e "$UTIL_VSERVER_VARS" || { + echo "Can not find util-vserver installation; aborting..." + exit 1 +} +. "$UTIL_VSERVER_VARS" + +usage(){ + echo vrpm: Install/Updates packages in several vservers at once + echo vrpm vservers ... -- rpm options and packages + echo vrpm \[--unify\] ALL -- rpm options and packages + echo vrpm \[--unify\] server1 server2 -- -Uvh package.rpm + echo + echo vrpm is executed in the root server + echo "--unify run vunify on the vserver for the updated packages" +} +UNIFY=no +if [ "$1" = "--unify" ] ; then + UNIFY=yes + shift +fi +if [ $# = 0 ] ; then + usage +else + SERVERS= + while [ $# -gt 0 -a "$1" != "--" ] + do + if [ "$1" = "ALL" ] ; then + SERVERS=`cd $VROOTDIR && ls` + else + SERVERS="$SERVERS $1" + fi + shift + done + if [ "$1" != "--" ] ; then + usage + elif [ "$SERVERS" = "" ] ; then + echo no server specified + echo + usage + else + shift + for serv in $SERVERS + do + # We try to run the rpm command in the same security + # context than the vserver, if running. + # This way, process operations will be done in the proper + # context + # If the vserver is not running, chcontext will + # pick an unused one. + CTXOPT="" + CTXFILE=/var/run/vservers/$serv.ctx + if [ -f $CTXFILE ] ; then + source $CTXFILE + CTXOPT="--ctx $S_CONTEXT" + fi + #echo rpm --root $VROOTDIR/$serv $* + echo Updating server $serv + $SBINDIR/chcontext --silent $CTXOPT rpm --root $VROOTDIR/$serv $* + done + if [ "$UNIFY" = "yes" ] ; then + PACKAGES= + for pkg in $* + do + case $pkg in + -*) + # RPM options ? + ;; + --*) + # RPM options ? + ;; + *) + pkg=`rpm -qp $pkg --queryformat %{name}` + PACKAGES="$PACKAGES $pkg" + ;; + esac + done + echo Unification + $PKGLIBDIR/vunify --excldir /var/log $SERVERS -- $PACKAGES + fi + fi +fi + + diff --git a/scripts/vserver b/scripts/vserver new file mode 100755 index 0000000..79e553f --- /dev/null +++ b/scripts/vserver @@ -0,0 +1,796 @@ +#!/bin/bash + +# Copyright (C) 2003 Enrico Scholz +# based on vserver by Jacques Gelinas +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# This is a script to control a virtual server + +: ${UTIL_VSERVER_VARS:=$(dirname $0)/util-vserver-vars} +test -e "$UTIL_VSERVER_VARS" || { + echo "Can not find util-vserver installation; aborting..." + exit 1 +} +. "$UTIL_VSERVER_VARS" + +USR_SBIN=$SBINDIR +USR_LIB_VSERVER=$PKGLIBDIR + +VSERVER_CMD=$USR_SBIN/vserver +CHBIND_CMD=$USR_SBIN/chbind +CHCONTEXT_CMD=$USR_SBIN/chcontext +SAVE_S_CONTEXT_CMD=$USR_LIB_VSERVER/save_s_context +CAPCHROOT_CMD=$USR_LIB_VSERVER/capchroot +VSERVERKILLALL_CMD=$USR_LIB_VSERVER/vserverkillall +DEFAULTPATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin + +vserver_mknod(){ + mknod $1 $2 $3 $4 + chmod $5 $1 +} + +mountproc() +{ + mkdir -p $1/proc $1/dev/pts + if [ ! -d $1/proc/1 ] ; then + mount -t proc none $1/proc + mount -t devpts -o gid=5,mode=0620 none $1/dev/pts + fi +} +umountproc() +{ + umount $1/proc 2>/dev/null + umount $1/dev/pts 2>/dev/null +} + +# Check that the vservers parent directory has permission 000 +# This is the key to avoid chroot escape +testperm() +{ + return + PERM=`$USR_LIB_VSERVER/showperm $VROOTDIR/$1/..` + if [ "$PERM" != 000 ] ; then + echo + echo "**********************************************************" + echo $VROOTDIR/$1/.. has insecure permissions. + echo A vserver administrator may be able to visit the root server. + echo To fix this, do + echo " " chmod 000 $VROOTDIR/$1/.. + echo do it anytime you want, even if vservers are running. + echo "**********************************************************" + echo + fi +} +# Set the IP alias needed by a vserver +ifconfig_iproot() +{ + if [ "$NODEV" = "" -a "$IPROOT" != "" -a "$IPROOT" != "0.0.0.0" -a "$IPROOT" != "ALL" ] ;then + # A vserver may have more than one IP + # The first alias is dev:vserver + # and the other are dev:vserver1,2,3 and so on + # An IP may hold the device. The following is valid + # IPROOT="1.2.4.5 eth1:1.2.3.5" + # IPROOTDEV=eth0 + # The first IP 1.2.3.4 will go on eth0 and the other on eth1 + # VLAN devices are also supported (eth0.231 for vlan 231) + SUFFIX= + for oneip in $IPROOT + do + IPDEV=$IPROOTDEV + MASK=$IPROOTMASK + BCAST=$IPROOTBCAST + # Split the device and IP if available + case $oneip in + *:*) + eval `echo $oneip | tr : ' ' | (read dev ip; echo oneip=$ip; echo IPDEV=$dev)` + ;; + esac + # Split the IP and the netmask if available + case $oneip in + */*) + eval `echo $oneip | tr / ' ' | (read ip msk; echo oneip=$ip; echo MASK=$msk)` + eval `$USR_LIB_VSERVER/ifspec "" "$oneip" "$MASK" "$BCAST"` + ;; + esac + if [ "$IPDEV" != "" ] ; then + case $IPDEV in + *.*) + if [ ! -f /proc/net/vlan/$IPDEV ] ; then + /sbin/vconfig add `echo $IPDEV | tr . ' '` + # Put a dummy IP + /sbin/ifconfig $IPDEV 127.0.0.1 + fi + ;; + esac + # Compute the default netmask, if missing + eval `$USR_LIB_VSERVER/ifspec $IPDEV "$oneip" "$MASK" "$BCAST"` + IPROOTMASK=$NETMASK + IPROOTBCAST=$BCAST + #echo /sbin/ifconfig $IPDEV:$1$SUFFIX $oneip netmask $IPROOTMASK broadcast $IPROOTBCAST + /sbin/ifconfig $IPDEV:$1$SUFFIX $oneip netmask $IPROOTMASK broadcast $IPROOTBCAST + fi + if [ "$SUFFIX" = "" ] ; then + SUFFIX=1 + else + SUFFIX=`expr $SUFFIX + 1` + fi + done + fi + if [ "$IPROOTBCAST" = "" ] ; then + IPROOTBCAST=255.255.255.255 + fi +} +ifconfig_iproot_off() +{ + if [ "$NODEV" = "" -a "$IPROOT" != "" -a "$IPROOT" != "0.0.0.0" -a "$IPROOT" != "ALL" -a "$IPROOTDEV" != "" ] ;then + SUFFIX= + for oneip in $IPROOT + do + IPDEV=$IPROOTDEV + # Split the device and IP if available + case $oneip in + *:*) + eval `echo $oneip | tr : ' ' | (read dev ip; echo IPDEV=$dev)` + ;; + esac + /sbin/ifconfig $IPDEV:$1$SUFFIX down 2>/dev/null + if [ "$SUFFIX" = "" ] ; then + SUFFIX=1 + else + SUFFIX=`expr $SUFFIX + 1` + fi + done + fi +} +# Split an IPROOT definition, trash the devices and +# compose a set of --ip option for chbind +setipopt(){ + RET= + IPS="$*" + if [ "$IPS" = "" ] ; then + IPS=0.0.0.0 + fi + if [ "$1" = "ALL" ] ; then + IPS=`$USR_LIB_VSERVER/listdevip` + fi + for oneip in $IPS + do + # Split the device and IP if available + case $oneip in + *:*) + eval `echo $oneip | tr : ' ' | (read dev ip; echo oneip=$ip)` + ;; + esac + #case $oneip in + #*/*) + # eval `echo $oneip | tr / ' ' | (read ip msk; echo oneip=$ip)` + # ;; + #esac + echo --ip $oneip + done +} + +# Extract the initial runlevel from the vserver inittab +get_initdefault() +{ + INITDEFAULT=`grep :initdefault $VROOTDIR/$1/etc/inittab | sed 's/:/ /g' | ( read a level b; echo $level)` +} + +# Read the vserver configuration file, reusing the PROFILE value +# found in /var/run/vservers +readlastconf() +{ + if [ -f /var/run/vservers/$1.ctx ] ; then + . /var/run/vservers/$1.ctx + if [ "$S_PROFILE" != "" ] ; then + export PROFILE=$S_PROFILE + fi + fi + export PROFILE + . /etc/vservers/$1.conf +} +usage() +{ + echo vserver [ options ] server-name command ... + echo + echo server-name is a directory in $VROOTDIR + echo + echo The commands are: + echo " build : Create a virtual server by copying the packages" + echo " of the root server" + echo " enter : Enter in the virtual server context and starts a shell" + echo " Same as \"vserver name exec /bin/sh\"" + echo " exec : Exec a command in the virtual server context" + echo " suexec : Exec a command in the virtual server context uid" + echo " service : Control a service inside a vserver" + echo " vserver name service service-name start/stop/restart/status" + echo " start : Starts the various services in the vserver, runlevel 3" + echo " stop : Ends all services and kills the remaining processes" + echo " running : Tells if a virtual server is running" + echo " It returns proper exit code, so you can use it as a test" + echo " status : Tells some information about a vserver" + echo " chkconfig : It turns a server on or off in a vserver" + echo + echo "--nodev : Do not configure the IP aliases of the vserver" + echo " Useful to enter a vserver without enabling its network" + echo " and avoiding conflicts with another copy of this vserver" + echo " running elsewhere" + echo "--silent : No informative messages about vserver context and IP numbers" + echo " Useful when you want to redirect the output" +} + +calculateCaps() +{ + local f + for f in "$@"; do + case $f in + !CAP_SYS_CHROOT) + CHROOTOPT=--nochroot + ;; + *) + CAPS="$CAPS --cap $f" + ;; + esac + done +} + +SILENT= +NODEV= +while true +do + if [ "$1" = "--silent" ] ; then + SILENT=--silent + shift + elif [ "$1" = "--nodev" ] ; then + NODEV=--nodev + shift + else + break + fi +done +# Setup the default ulimit for a vserver +setdefulimit(){ + # File handle are limited to half of the current system limit + # Virtual memory is limited to the ram size + NFILE=`cat /proc/sys/fs/file-max` + NFILE=`expr $NFILE / 2` + VMEM=`cat /proc/meminfo | grep MemTotal | (read a b c; echo $b)` + # Disabled for now, we need a different to set the security + # context limit than fiddling with ulimit + #ulimit -H -n $NFILE -v $VMEM +} +if [ $# -lt 2 ] ; then + usage +elif [ "$2" = "build" ] ; then + # Either the directory does not exist or is empty + NBSUB=`ls $VROOTDIR/$1 2>/dev/null | grep -v lost+found | wc -l` + NBSUB=`expr $NBSUB` + if [ "$NBSUB" != 0 ] ; then + echo Virtual server $VROOTDIR/$1 already exist + else + if [ ! -d $VROOTDIR ] ; then + mkdir $VROOTDIR || exit 1 + chmod 000 $VROOTDIR + chattr +t $VROOTDIR + echo Directory $VROOTDIR was created with permissions 000 + fi + mkdir -p $VROOTDIR/$1 || exit 1 + chattr -t $VROOTDIR/$1 + chmod 755 $VROOTDIR/$1 + if test "$UTIL_VSERVER_AVOID_COPY"; then + mkdir -p $VROOTDIR/$1/{etc/rc.d/init.d,sbin,var/run,var/log} + else + cp -ax /sbin /bin /etc /usr /var /lib $VROOTDIR/$1/. || exit 1 + fi + cd $VROOTDIR/$1 || exit 1 + rm -fr lib/modules/* + rm -f var/spool/mail/* + rm -f `find var/run -type f` + rm -f `find var/log -type f` + touch var/log/wtmp + rm -f var/lock/subsys/* + rm -f etc/cron.d/kmod + mkdir proc tmp home root boot + test -f /root/.bashrc && cp -a /root/.bashrc root/. + test -f /root/.bash_profile && cp -a /root/.bash_profile root/. + chmod 1777 tmp + chmod 750 root + # Create a minimal dev so the virtual server can't grab + # more privileges + mkdir dev dev/pts + vserver_mknod dev/null c 1 3 666 + vserver_mknod dev/zero c 1 5 666 + vserver_mknod dev/full c 1 7 666 + vserver_mknod dev/random c 1 8 644 + vserver_mknod dev/urandom c 1 9 644 + vserver_mknod dev/tty c 5 0 666 + vserver_mknod dev/ptmx c 5 2 666 + touch dev/hdv1 + # Create a dummy /etc/fstab and /etc/mtab to please + # df and linuxconf. We use hdv1, which does not exist + # to remind the admin that it is not the real drive + echo /dev/hdv1 / ext2 defaults 1 1 >etc/fstab + echo /dev/hdv1 / ext2 rw 0 0 >etc/mtab + # Install the vreboot utility + cp -a $USR_LIB_VSERVER/vreboot sbin/. + ln -sf vreboot sbin/vhalt + + echo Directory $VROOTDIR/$1 has been populated + if [ ! -d /etc/vservers ] ; then + mkdir /etc/vservers + chmod 600 /etc/vservers + echo Directory /etc/vservers has been created + fi + if [ ! -f /etc/vservers/$1.conf ] ; then + CONF=/etc/vservers/$1.conf + cat >$CONF <<-EOF +if [ "$PROFILE" = "" ] ; then + PROFILE=prod +fi +# Select the IP number assigned to the virtual server +# This IP must be one IP of the server, either an interface +# or an IP alias +# A vserver may have more than one IP. Separate them with spaces. +# do not forget double quotes. +# Some examples: +# IPROOT="1.2.3.4 2.3.4.5" +# IPROOT="eth0:1.2.3.4 eth1:2.3.4.5" +# If the device is not specified, IPROOTDEV is used +case \$PROFILE in +prod) + IPROOT=1.2.3.4 + # The netmask and broadcast are computed by default from IPROOTDEV + #IPROOTMASK= + #IPROOTBCAST= + # You can define on which device the IP alias will be done + # The IP alias will be set when the server is started and unset + # when the server is stopped + #IPROOTDEV=eth0 + # You can set a different host name for the vserver + # If empty, the host name of the main server is used + S_HOSTNAME= + ;; +backup) + IPROOT=1.2.3.4 + #IPROOTMASK= + #IPROOTBCAST= + #IPROOTDEV=eth0 + S_HOSTNAME= + ;; +esac +# Uncomment the onboot line if you want to enable this +# virtual server at boot time +#ONBOOT=yes +# You can set a different NIS domain for the vserver +# If empty, the current on is kept +# Set it to "none" to have no NIS domain set +S_DOMAINNAME= +# You can set the priority level (nice) of all process in the vserver +# Even root won't be able to raise it +S_NICE= +# You can set various flags for the new security context +# lock: Prevent the vserver from setting new security context +# sched: Merge scheduler priority of all processes in the vserver +# so that it acts a like a single one. +# nproc: Limit the number of processes in the vserver according to ulimit +# (instead of a per user limit, this becomes a per vserver limit) +# private: No other process can join this security context. Even root +# Do not forget the quotes around the flags +S_FLAGS="lock nproc" +# You can set various ulimit flags and they will be inherited by the +# vserver. You enter here various command line argument of ulimit +# ULIMIT="-HS -u 200" +# The example above, combined with the nproc S_FLAGS will limit the +# vserver to a maximum of 200 processes +ULIMIT="-HS -u 1000" +# You can set various capabilities. By default, the vserver are run +# with a limited set, so you can let root run in a vserver and not +# worry about it. He can't take over the machine. In some cases +# you can to give a little more capabilities (such as CAP_NET_RAW) +# S_CAPS="CAP_NET_RAW" +S_CAPS="" +# Select an unused context (this is optional) +# The default is to allocate a free context on the fly +# In general you don't need to force a context +#S_CONTEXT= + EOF + echo $CONF has been created. Look at it\! + fi + # Turn off some service useless on a vserver + # vserver_turnoff apmd network autofs dhcpd gpm ipchains iptables \ + # irda isdn keytable kudzu linuxconf-setup netfs nfs nfslock \ + # pcmcia portmap pppoe random rawdevices rhnsd rstatd ruserd \ + # rwalld rwhod sendmail smb snmpd v_httpd h_xinetd v_sshd vservers \ + # xfs ypbind xinetd + ( + cd etc/init.d 2>/dev/null || cd etc/rc.d/init.d + for serv in * + do + case $serv in + *.bak|*~|functions|killall|halt|single) + ;; + *) + #$USR_LIB_VSERVER/capchroot $VROOTDIR/$1 /sbin/chkconfig --level 2345 $serv off + $0 --silent $1 chkconfig --level 2345 $serv off + ;; + esac + done + ) + rm -f etc/rc.d/rc6.d/S*reboot + fi +elif [ ! -f /etc/vservers/$1.conf ] ; then + echo No configuration for this vserver: /etc/vservers/$1.conf + exit 1 +elif [ ! -d $VROOTDIR/$1/. ] ; then + echo No directory for this vserver: $VROOTDIR/$1 + exit 1 +elif [ "$2" = "start" ] ; then + echo Starting the virtual server $1 + testperm $1 + if ! $VSERVER_CMD $1 running + then + test -x /etc/vservers/$1.sh && /etc/vservers/$1.sh pre-start $1 + IPROOT= + IPROOTMASK= + IPROOTBCAST= + IPROOTDEV= + S_NICE= + S_FLAGS= + . /etc/vservers/$1.conf + export PROFILE + ifconfig_iproot $1 + cd $VROOTDIR/$1 || exit 1 + + if [ "$PROFILE" != "" ] ; then + echo export PROFILE=$PROFILE >etc/PROFILE + fi + + rm -f `find var/run -type f` + touch var/run/utmp + chgrp ${UTMP_GROUP:-utmp} var/run/utmp + chmod 0664 var/run/utmp + rm -f var/lock/subsys/* + mountproc $VROOTDIR/$1 + CTXOPT= + HOSTOPT= + DOMAINOPT= + NICECMD= + FLAGS= + CAPS= + get_initdefault $1 + STARTCMD="/etc/rc.d/rc $INITDEFAULT" + if [ -x $VROOTDIR/$1/etc/init.d/rc ] ; then + STARTCMD="/etc/init.d/rc $INITDEFAULT" + elif [ -x $VROOTDIR/$1/usr/bin/emerge ] ; then + STARTCMD="/sbin/rc default" + elif [ -x $VROOTDIR/$1/etc/rc.d/rc.M ] ; then + STARTCMD="/etc/rc.d/rc.M" + fi + + DISCONNECT= + FAKEINIT= + for f in $S_FLAGS dummy + do + case $f in + dummy) + ;; + + minit) + FAKEINIT=true + FLAGS="$FLAGS --flag fakeinit" + STARTCMD=/sbin/minit-start + DISCONNECT=--disconnect + ;; + + fakeinit) + FAKEINIT=true + FLAGS="$FLAGS --flag $f" + STARTCMD=/sbin/init + DISCONNECT=--disconnect + ;; + *) + FLAGS="$FLAGS --flag $f" + ;; + esac + done + if [ -n "$S_START" ] ; then + STARTCMD=$S_START + fi + if [ "$FAKEINIT" = "" ] ; then + $USR_LIB_VSERVER/fakerunlevel $INITDEFAULT var/run/utmp + fi + + calculateCaps $S_CAPS + + if [ "$S_CONTEXT" != "" ] ; then + CTXOPT="--ctx $S_CONTEXT" + fi + if [ "$S_HOSTNAME" != "" ] ; then + HOSTOPT="--hostname $S_HOSTNAME" + export HOSTNAME=$S_HOSTNAME + fi + if [ "$S_DOMAINNAME" != "" ] ; then + DOMAINOPT="--domainname $S_DOMAINNAME" + fi + if [ "$S_NICE" != "" ] ; then + NICECMD="nice -$S_NICE" + fi + mkdir -p /var/run/vservers + chmod 700 /var/run/vservers + setdefulimit + if [ "$ULIMIT" != "" ] ; then + ulimit $ULIMIT + fi + #echo FLAGS=$FLAGS + #echo CAPS=$CAPS + # We switch to $VROOTDIR/$1 now, because after the + # security context switch $VROOTDIR directory becomes a dead zone. + cd $VROOTDIR/$1 + IPOPT=`setipopt $IPROOT` + export PATH=$DEFAULTPATH + $NICECMD $CHBIND_CMD $SILENT $IPOPT --bcast $IPROOTBCAST \ + $CHCONTEXT_CMD $SILENT $DISCONNECT $CAPS $FLAGS $CTXOPT $HOSTOPT $DOMAINOPT --secure \ + $SAVE_S_CONTEXT_CMD /var/run/vservers/$1.ctx \ + $CAPCHROOT_CMD $CHROOTOPT . $STARTCMD + sleep 2 + test -x /etc/vservers/$1.sh && /etc/vservers/$1.sh post-start $1 + fi +elif [ "$2" = "running" ] ; then + if [ ! -f /var/run/vservers/$1.ctx ] ; then + echo Server $1 is not running + exit 1 + else + . /var/run/vservers/$1.ctx + NB=$($USR_SBIN/vps ax | awk '{print $2}' | grep \^$S_CONTEXT\$ | wc -l) + #NB=`$CHCONTEXT_CMD --silent --ctx $S_CONTEXT ps ax | wc -l` + #NB=`eval expr $NB + 0` + if [ "$NB" -gt 0 ] ; then + echo Server $1 is running + exit 0 + else + echo Server $1 is not running + exit 1 + fi + fi +elif [ "$2" = "status" ] ; then + if $0 $1 running + then + . /var/run/vservers/$1.ctx + NB=$($USR_SBIN/vps ax | awk '{print $2}' | grep \^$S_CONTEXT\$ | wc -l) + echo $NB processes running + echo Vserver uptime: `$USR_LIB_VSERVER/filetime /var/run/vservers/$1.ctx` + fi +elif [ "$2" = "stop" ] ; then + echo Stopping the virtual server $1 + IPROOT= + IPROOTMASK= + IPROOTBCAST= + IPROOTDEV= + CAPS= + IS_MINIT= + readlastconf $1 + if $VSERVER_CMD $1 running + then + test -x /etc/vservers/$1.sh && /etc/vservers/$1.sh pre-stop $1 + ifconfig_iproot $1 + cd $VROOTDIR/$1 + mountproc $VROOTDIR/$1 + # The fakeinit flag tell us how to turn off the server + get_initdefault $1 + export PREVLEVEL=$INITDEFAULT + STOPCMD="/etc/rc.d/rc 6" + if [ -x $VROOTDIR/$1/etc/init.d/rc ] ; then + STOPCMD="/etc/init.d/rc 6" + elif [ -x $VROOTDIR/$1/usr/bin/emerge ] ; then + STOPCMD="/sbin/rc shutdown" + elif [ -x $VROOTDIR/$1/etc/rc.d/rc.6 ] ; then + STOPCMD="/etc/rc.d/rc.6" + fi + + for f in $S_FLAGS dummy + do + case $f in + minit) + IS_MINIT=1 + FLAGS="$FLAGS --flag fakeinit" + STOPCMD="/sbin/minit-stop" + ;; + + fakeinit) + FLAGS="$FLAGS --flag $f" + STOPCMD="/sbin/init 6" + ;; + *) + ;; + esac + done + + if [ -n "$S_STOP" ] ; then + STOPCMD=$S_STOP + fi + + calculateCaps $S_CAPS + + cd $VROOTDIR/$1 + IPOPT=`setipopt $IPROOT` + export PATH=$DEFAULTPATH + $CHBIND_CMD $SILENT $IPOPT --bcast $IPROOTBCAST \ + $CHCONTEXT_CMD $SILENT $CAPS --secure --ctx $S_CONTEXT \ + $CAPCHROOT_CMD . $STOPCMD + + if test "$IS_MINIT"; then + echo "Waiting for minit finish-signal" + dd if=var/run/minit-stop of=/dev/zero bs=1 count=1 &>/dev/null + sleep 1 + else + echo sleeping 5 seconds + sleep 5 + fi + + echo Killing all processes + $CHBIND_CMD --silent $IPOPT --bcast $IPROOTBCAST \ + $CHCONTEXT_CMD $CAPS --secure --silent --ctx $S_CONTEXT \ + $VSERVERKILLALL_CMD + fi + # We umount anyway, because "enter" establish the mount + # but when you exit, the server is considered not running + umountproc $VROOTDIR/$1 + cd / + test -x /etc/vservers/$1.sh && /etc/vservers/$1.sh post-stop $1 + ifconfig_iproot_off $1 +elif [ "$2" = "restart" ] ; then + if $0 $1 running + then + $0 $1 stop + $0 $1 start + fi +elif [ "$2" = "suexec" ] ; then + if [ -z "$3" ] ; then + echo "Missing user!" >&2 + echo "vserver vserver-name suexec user command [ args ... ]" >&2 + exit 1 + elif [ -z "$4" ] ; then + echo "Missing command and arguments!" >&2 + echo "vserver vserver-name suexec user command [ args ... ]" >&2 + exit 1 + else + IPROOT= + IPROOTMASK= + IPROOTBCAST= + IPROOTDEV= + readlastconf $1 + . /etc/vservers/$1.conf + cd $VROOTDIR/$1 + ifconfig_iproot $1 + mountproc $VROOTDIR/$1 + PS1="[\u@vserver:$1 \W]" + export PS1 + VSERVER=$1 + USERID=$3 + shift; shift; shift + CAPS= + for f in $S_CAPS dummy + do + case $f in + dummy) + ;; + !CAP_SYS_CHROOT) + CHROOTOPT=--nochroot + ;; + *) + CAPS="$CAPS --cap $f" + ;; + esac + done + FLAGS= + for f in $S_FLAGS dummy + do + case $f in + minit) + FLAGS="$FLAGS --flag fakeinit" + ;; + + dummy) + ;; + *) + FLAGS="$FLAGS --flag $f" + ;; + esac + done + setdefulimit + if [ "$ULIMIT" != "" ] ; then + ulimit $ULIMIT + fi + if $0 $VSERVER running >/dev/null + then + . /var/run/vservers/$VSERVER.ctx + cd $VROOTDIR/$VSERVER + IPOPT=`setipopt $IPROOT` + export PATH=$DEFAULTPATH + exec $CHBIND_CMD $SILENT $IPOPT --bcast $IPROOTBCAST \ + $CHCONTEXT_CMD $SILENT $FLAGS $CAPS --secure --ctx $S_CONTEXT \ + $CAPCHROOT_CMD --suid $USERID . "$@" + else + test -x /etc/vservers/$1.sh && /etc/vservers/$1.sh pre-start $1 + CTXOPT= + HOSTOPT= + DOMAINOPT= + if [ "$S_CONTEXT" != "" ] ; then + CTXOPT="--ctx $S_CONTEXT" + fi + if [ "$S_HOSTNAME" != "" ] ; then + HOSTOPT="--hostname $S_HOSTNAME" + export HOSTNAME=$S_HOSTNAME + fi + if [ "$S_DOMAINNAME" != "" ] ; then + DOMAINOPT="--domainname $S_DOMAINNAME" + fi + mkdir -p /var/run/vservers + cd $VROOTDIR/$VSERVER + IPOPT=`setipopt $IPROOT` + export PATH=$DEFAULTPATH + exec $CHBIND_CMD $SILENT $IPOPT --bcast $IPROOTBCAST \ + $CHCONTEXT_CMD $SILENT $FLAGS $CAPS --secure $CTXOPT $HOSTOPT $DOMAINOPT \ + $SAVE_S_CONTEXT_CMD /var/run/vservers/$VSERVER.ctx \ + $CAPCHROOT_CMD --suid $USERID $CHROOTOPT . "$@" + fi + fi +elif [ "$2" = "exec" ] ; then + VSERV=$1 + shift; shift + exec $0 $NODEV $SILENT $VSERV suexec root "$@" +elif [ "$2" = "enter" ] ; then + testperm $1 + exec $0 $NODEV $SILENT $1 exec /bin/bash -login +elif [ "$2" = "service" ] ; then + VSERVER=$1 + shift + shift + exec $0 $NODEV $SILENT $VSERVER exec /sbin/service "$@" +elif [ "$2" = "chkconfig" ] ; then + VSERVER=$1 + LEVELS=() + shift + shift + if [ "$1" = "--level" ] ; then + LEVELS=( --level "$2" ) + shift 2 + fi + if [ $# != 2 -a ! -x $VROOTDIR/$VSERVER/sbin/chkconfig ] ; then + echo Invalid argument, expected vserver name chkconfig [ --level nnn ] service on\|off + elif [ -x $VROOTDIR/$VSERVER/sbin/chkconfig ] ; then + exec $0 --silent $VSERVER exec /sbin/chkconfig "${LEVELS[@]}" "$@" + elif [ -x $VROOTDIR/$VSERVER/usr/sbin/update-rc.d ] ; then + if [ "$2" = "on" -o "$2" = "start" ] ; then + $0 --silent $VSERVER exec /usr/sbin/update-rc.d -f $1 remove >/dev/null + exec $0 --silent $VSERVER exec /usr/sbin/update-rc.d $1 start 80 2 3 4 5 . stop 20 0 1 6 . >/dev/null + elif [ "$2" = "off" -o "$2" = "stop" ] ; then + $0 --silent $VSERVER exec /usr/sbin/update-rc.d -f $1 remove >/dev/null + exec $0 --silent $VSERVER exec /usr/sbin/update-rc.d $1 stop 20 0 1 2 3 4 5 6 . >/dev/null + else + echo vserver chkconfig: Expecting on or off + fi + else + echo chkconfig functionality is not available on this + echo vserver distribution. + echo Looked for /sbin/chkconfig and /usr/sbin/update-rc.d + fi +else + echo Command unknown $2 + echo + usage +fi + diff --git a/scripts/vserver-copy b/scripts/vserver-copy new file mode 100755 index 0000000..a64f622 --- /dev/null +++ b/scripts/vserver-copy @@ -0,0 +1,390 @@ +#!/bin/sh + +# Copyright (C) 2003 Mark Lawrence , +# 2203,2004 Enrico Scholz +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# Copy/Sync a virtual host from one machine to another +# +# History: +# +# 2003-04-04: Version 0.4 - Mark lawrence +# - Set "ONBOOT=no" in the destination .conf file when --startstop +# is not used, in case the destination roothost reboots. We don't +# want two copies of a vserver running at the same time. +# +# 2003-03-04: Version 0.3 - Mark lawrence +# - Changed all checks for [ "" != "$var" ] into [ -n|-z "$var" ]. "" doesn't +# seem to work for bash on the Sparc architecture. +# - Changed $ssh variable into $shcmd. +# +# 2003-02-23: Version 0.2 - Mark Lawrence +# - Set ONBOOT to "no" in the original .conf file when the "-s" flag is +# used so that if/when you reboot the source roothost you don't have the +# same vserver and IP address running on two machines. + +: ${UTIL_VSERVER_VARS:=$(dirname $0)/util-vserver-vars} +test -e "$UTIL_VSERVER_VARS" || { + echo "Can not find util-vserver installation; aborting..." + exit 1 +} +. "$UTIL_VSERVER_VARS" + +VERSION="0.4" +umask 022 +me=${0##*/} + +mktemp="$(which mktemp 2>/dev/null) /tmp/vc.XXXXXX" || \ +mktemp=$(which tempfile 2>/dev/null) || { + echo $"Can not find mktemp or tempfile" >&2 + exit 1 +} + +### Helper functions ### + +# Save stdin and stdout for later use +exec 3>&1 +exec 4>&2 + +noninteractive () { + exec &> /dev/null +} + +interactive () { + exec 1>&3 + exec 2>&4 +} + +info () { + ! $quiet && echo "I: $me: $1" >&3 +} + +warn () { + ! $quiet && echo "W: $me: $1" >&4 +} + +error () { + ! $quiet && echo "E: $me: $2" >&4 + exit $1 +} + + +### Usage/Info functions ### + +usage () { + cat <&2 +Usage: $me [-hVvqidrRs] vserver newname + $me [-hVvqidrRs] vserver host:[newname] +EOF +} + +full_usage () { + usage + cat < + +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. + +EOF +} + + +### Default values and Command line options ### + +stopstart=(false) +verbose=(false) +quiet=(false) +shcmd="ssh" +rsflag="-e" +rsh=(false) +colon=":" +domain="" +ip="" +vsroot=$VROOTDIR + +if [ $# -eq 0 ]; then # Script invoked with no command-line args? + usage + exit 1 +fi + +temp=$(getopt -o hVvqd:i:rRs --long help,version,verbose,quiet,domain:,ip:,vsroot,rsh,stopstart, -n $me -- "$@") + +if [ $? -ne 0 ]; then + echo " (See -h for help)" + exit 1 +fi + +# Note the quotes around `$temp': they are essential! +eval set -- "$temp" + +while true; do + case "$1" in + -h|--help) full_usage + exit 1 + ;; + -V|--version) full_version + exit 1 + ;; + -v|--verbose) verbose=(true) + shift + ;; + -q|--quiet) quiet=(true) + shift + ;; + -d|--domain) domain="$2" + shift 2 + ;; + -i|--ip) ip="$2" + shift 2 + ;; + -r|--vsroot) vsroot="$2" + shift 2 + ;; + -R|--rsh) rsh=(true) + shift + ;; + -s|--stopstart) stopstart=(true) + shift + ;; + --) shift + break + ;; + *) echo "Internal error!" + exit 1 + ;; + esac +done + +if [ $# -ne 2 ]; then + usage + exit 1 +fi + + +### ### + +# By default we are reasonably quiet (ouput only via info, warn & error) +if $verbose; then + interactive +else + noninteractive +fi + +now=$(date) +info "called on $(hostname) at $now" + + +vserver=$1 +vconf=/etc/vservers/$vserver.conf +vroot=$vsroot/$vserver + +if $rsh; then + shcmd="rsh" +fi + +if (echo $2 | grep '^[a-z][a-z0-9]\+$'); then + dhost="" + newname=$2 + shcmd="" + rsflag="" + colon="" + if $rsh; then + warn "rsh is set but not used for a local copy" + fi +elif (echo $2 | grep '^[a-z].*[a-z0-9]:$'); then + dhost=${2/:/} + newname=$vserver +elif (echo $2 | grep '^[a-z].*[a-z0-9]:[a-z].*[a-z0-9]$'); then + dhost=${2/:*/} + newname=${2/*:/} +else + error 1 "Second argument must be of the form \"[host:]name\" or \"host:\"" +fi + +target=$vsroot/$newname +targetconf=/etc/vservers/$newname.conf + + +### Perform some sanity checks ### + +if [ ! -d $vroot ]; then + error 1 "Directory \"$vroot\" does not exist" +fi + +if [ ! -e $vconf ]; then + error 1 "Vserver file \"$vconf\" does not exist" +fi + +if [ -z "$dhost" ] && [ "$vserver" == "$newname" ]; then + error 1 "Source and destination names cannot be the same on the localhost" +fi + +if [ -n "$dhost" ] && ! (host $dhost | grep 'has address'); then + warn "$dhost does not resolve into an IP address" +fi + +if [ \( -n "$ip" -a -z "$domain" \) -o \ + \( -z "$ip" -a -n "$domain" \) ] +then + error 1 "Both IP address and domain must be specified together" +fi + +if [ -n "$ip" ] && \ +! (echo $ip | grep '^[0-9]\{1,3\}\(\.[0-9]\{1,3\}\)\{3\}$' ); then + error 1 "\"$ip\" is not a valid IP address" +fi + +# This works both locally and remote +if ($shcmd $dhost $SBINDIR/vserver $newname running | grep 'is running'); then + warn "destination vserver \"$newname\" is running" + error 1 "Cannot copy over a running vserver" +fi + + +### Do the copy ### + +info "Attempting to copy $vserver to $dhost$colon$newname" + +if $stopstart; then + info "Stopping virtual server \"$vserver\" on localhost" + $SBINDIR/vserver $vserver stop +fi + +test "$dhost" || { + mkdir -p -m755 $target + chattr -t $target +} + +info "Syncing directories" +# trailing slashes very important in the rsync! +if ! rsync -avxz $rsflag $shcmd $vroot/ $dhost$colon$target/; then + error 1 "rsync failed" +fi + +if [ -n "$ip" -a -n "$domain" ]; then + # Insert the new IPROOT/S_HOSTNAME values into the config file + info "Modifying $targetconf" + tmpf=$($mktemp) + if (sed -e "s/^S_HOSTNAME=.*/S_HOSTNAME=\"$newname\"/" \ + -e "s/^IPROOT=.*/IPROOT=\"$ip\"/" $vconf > $tmpf) + then + if ! rsync -v $rsflag $shcmd $tmpf $dhost$colon$targetconf; then + error $? "vserver config file copy/change failed" + fi + + else + warn "Unable to reconfigure virtual server config file" + fi + + # create a new /etc/hostname + info "Creating hostname file" + echo $newname > $tmpf + if ! rsync -v $rsflag $shcmd $tmpf $dhost$colon$target/etc/hostname; then + error 1 "vserver /etc/hostname copy failed" + fi + + info "Creating /etc/hosts" + cat << EOF > $tmpf +# /etc/hosts (automatically generated by $me) + +127.0.0.1 localhost +$ip $newname.$domain $newname + +# The following lines are desirable for IPv6 capable hosts + +::1 ip6-localhost ip6-loopback +fe00::0 ip6-localnet +ff00::0 ip6-mcastprefix +ff02::1 ip6-allnodes +ff02::2 ip6-allrouters +ff02::3 ip6-allhosts +EOF + + # copy /etc/hosts + if ! rsync -v $rsflag $shcmd $tmpf $dhost$colon$target/etc/hosts; then + error 1 "vserver /etc/hosts copy failed" + fi + rm -f $tmpf + +else + if ! $stopstart; then + # Make sure that this vserver doesn't start on the + # destination host if it reboots + tmpf=$($mktemp) + sed -e 's/^ONBOOT=.*/ONBOOT=no/' $vconf > $tmpf + vconf=$tmpf + fi + + # copy newname.conf unchanged + info "Copying $targetconf" + if ! rsync -v $rsflag $shcmd $vconf $dhost$colon$targetconf; then + error 1 "vserver config file copy/change failed" + fi + + rm -f $tmpf +fi + + +if $stopstart; then + info "Starting virtual server \"$vserver\" on $dhost" + $shcmd $dhost $SBINDIR/vserver $vserver start + if ($shcmd $dhost $SBINDIR/vserver $vserver running | \ + grep 'not running'); then + error 1 "Virtual server \"$vserver\" failed to start on $dhost" + fi + + # Make sure that we don't start the original on next boot + tmpf=$($mktemp) + sed -e 's/^ONBOOT=.*/ONBOOT=no/' $vconf > $tmpf + mv $tmpf $vconf +fi + +exit 0 diff --git a/scripts/vserverkillall b/scripts/vserverkillall new file mode 100755 index 0000000..f49f339 --- /dev/null +++ b/scripts/vserverkillall @@ -0,0 +1,63 @@ +#!/bin/sh + +# Copyright (C) 2003 Enrico Scholz +# based on vserverkillall by Jacques Gelinas +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# This script kills all process it can finds +# Only useful if you are using a security context. +# It does nothing in context 0 +USR_LIB_VSERVER=$(dirname $0) +CTX=`grep ^s_context /proc/self/status | sed s/s_context:// | (read a b; echo $a)` +CTX=`eval expr $CTX + 0` +if [ "$CTX" = 0 ] ; then + echo Running in security context 0, do nothing +else + cd /proc + for SIG in -TERM -TERM -TERM -9 + do + ONE=0 + for dir in * + do + case $dir in + 1) + ;; + $$) + ;; + [1-9]*) + ONE=1 + echo kill $SIG "`$USR_LIB_VSERVER/readlink /proc/$dir/exe`"[$dir] + kill $SIG $dir + ;; + *) + ;; + esac + done + if [ "$ONE" = 0 ] ; then + break + fi + sleep 1 + done + # Kill the fakeinit process. It is shown as process one, but can't + # be killed this way + INITPID=`cat /proc/self/status | grep initpid: | (read a b; expr $b)` + if [ "$INITPID" != "0" ] ; then + echo kill init, pid $INITPID + kill -9 $INITPID + fi +fi + + diff --git a/scripts/vservers.grabinfo.sh b/scripts/vservers.grabinfo.sh new file mode 100644 index 0000000..930d3a1 --- /dev/null +++ b/scripts/vservers.grabinfo.sh @@ -0,0 +1,51 @@ +#!/bin/sh +# Copyright (C) 2003 Enrico Scholz +# based on vservers.grabinfo.sh by Jacques Gelinas +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# Produce some XML statistics about vservers + +: ${UTIL_VSERVER_VARS:=$(dirname $0)/util-vserver-vars} +test -e "$UTIL_VSERVER_VARS" || { + echo "Can not find util-vserver installation; aborting..." + exit 1 +} +. "$UTIL_VSERVER_VARS" + +cd $VROOTDIR +for vserv in * +do + if [ -f /etc/vservers/$vserv.conf ] ; then + . /etc/vservers/$vserv.conf + echo "" + for ip in $IPROOT + do + case $ip in + *:*) + echo $ip | tr ':' ' ' | (read a b; echo " ") + ;; + *) + echo " " + ;; + esac + done + echo " " + $SBINDIR/vserver $vserv status + echo " " + echo "" + fi +done + diff --git a/scripts/vsysvwrapper b/scripts/vsysvwrapper new file mode 100755 index 0000000..f26ccf5 --- /dev/null +++ b/scripts/vsysvwrapper @@ -0,0 +1,46 @@ +#!/bin/sh + +# Copyright (C) 2003 Enrico Scholz +# based on vsyswrapper by Jacques Gelinas +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# Helper script for all the v_xxx scripts +: ${UTIL_VSERVER_VARS:=$(dirname $0)/util-vserver-vars} +test -e "$UTIL_VSERVER_VARS" || { + echo "Can not find util-vserver installation; aborting..." + exit 1 +} +. "$UTIL_VSERVER_VARS" + +if [ $# = 0 ] ; then + echo vsysvwrapper service_name >&2 +else + SERVICE=$1 + shift + IP=eth0 + if [ -f /etc/vservices/$SERVICE.conf ] ; then + . /etc/vservices/$SERVICE.conf + fi + IPOPT= + for oneip in $IP + do + IPOPT="$IPOPT --ip $oneip" + done + echo exec $SBINDIR/chbind $IPOPT /etc/init.d/$SERVICE $* + exec $SBINDIR/chbind $IPOPT /etc/init.d/$SERVICE $* +fi + + diff --git a/scripts/vtop b/scripts/vtop new file mode 100755 index 0000000..ae32b54 --- /dev/null +++ b/scripts/vtop @@ -0,0 +1,28 @@ +#!/bin/sh + +# Copyright (C) 2003 Enrico Scholz +# based on vtop by Jacques Gelinas +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +#Presents the processes running in all virtual servers +: ${UTIL_VSERVER_VARS:=$(dirname $0)/util-vserver-vars} +test -e "$UTIL_VSERVER_VARS" || { + echo "Can not find util-vserver installation; aborting..." + exit 1 +} +. "$UTIL_VSERVER_VARS" + +exec $SBINDIR/chcontext --silent --ctx 1 top $* diff --git a/scripts/vunify.sh b/scripts/vunify.sh new file mode 100755 index 0000000..dde50b8 --- /dev/null +++ b/scripts/vunify.sh @@ -0,0 +1,123 @@ +#!/bin/sh + +# Copyright (C) 2003 Enrico Scholz +# based on vunify by Jacques Gelinas +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# This scripts is used to unify the disk space used by vservers +# It takes various RPM packages and hard link them together so all +# vservers are sharing the same exact copy of the files. +# After doing so, it set them immutable, so the vserver can't change them + +# This has the following advantages: +# -You save disk space. If you have 100 vservers, each using 500 megs +# (common linux server installation), you can unify 90% of that +# -Memory usage. Since the exact same binary are loaded, including +# the same shared object, you save some memory and this can increase +# performance, especially the memory cache usage. +# +# On the down side, you are loosing some flexibility. The vserver +# administrators can't upgrade package as they see fit, since the +# files are immutable. On the other end, just unifying glibc is probably +# a win. +: ${UTIL_VSERVER_VARS:=$(dirname $0)/util-vserver-vars} +test -e "$UTIL_VSERVER_VARS" || { + echo "Can not find util-vserver installation; aborting..." + exit 1 +} +. "$UTIL_VSERVER_VARS" + +if [ $# = 0 ] ; then + echo vunify [ --undo ] ref-vserver vservers -- packages +else + undo=0 + if [ "$1" == "--undo" ] ; then + undo=1 + shift + fi + ref=$1 + shift + servers= + while [ "$1" != "" -a "$1" != "--" ] + do + servers="$servers $1" + shift + done + if [ "$servers" = "" ] ; then + echo No vserver specified >&2 + exit 1 + elif [ "$1" != "--" ] ; then + echo Missing -- marker >&2 + exit 1 + else + shift + if [ $# = 0 ] ; then + echo No package specified >&2 + exit 1 + else + if [ ! -d $VROOTDIR/$ref/. ] ; then + echo No vserver $ref >&2 + exit 1 + else + #echo ref=$ref + #echo servers=$servers + #echo packages=$* + tmpfile=/var/run/vunifi.$$ + rm -f $tmpfile + echo Extracting list of file to unify in $tmpfile + for pkg in $* + do + $VROOTDIR/$ref/bin/rpm --root $VROOTDIR/$ref -ql --dump $pkg | \ + while read path size mtime md5 \ + mode owner group isconfig isdoc rdev symlink + do + if [ "$isconfig" = 0 ] ; then + echo $path >>$tmpfile + fi + done + done + for serv in $servers + do + if [ "$undo" = 0 ] ; then + echo Unifying server $serv + cat $tmpfile | while read file + do + if [ ! -d $VROOTDIR/$ref/$file -a ! -L $VROOTDIR/$ref/$file ] ; then + ln -f $VROOTDIR/$ref/$file $VROOTDIR/$serv/$file + fi + done + cat $tmpfile | while read file + do + chattr +i $VROOTDIR/$ref/$file + done + else + echo Differencing server $serv + cat $tmpfile | while read file + do + chattr -i $VROOTDIR/$ref/$file + if [ ! -d $VROOTDIR/$ref/$file ] ; then + rm -f $VROOTDIR/$serv/$file + cp -a $VROOTDIR/$ref/$file $VROOTDIR/$serv/$file + fi + done + fi + done + rm -f $tmpfile + fi + fi + fi +fi + diff --git a/src/Makefile-files b/src/Makefile-files new file mode 100644 index 0000000..2d2586e --- /dev/null +++ b/src/Makefile-files @@ -0,0 +1,104 @@ +## $Id: Makefile-files,v 1.1.4.8 2004/02/09 23:18:59 ensc Exp $ -*- makefile -*- + +## Copyright (C) 2003 Enrico Scholz +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2, or (at your option) +## any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +## + +src_HDRS = src/vutil.h src/vutil.p \ + src/ext2fs.h + +src_pkglib_SCRPTS = src/setattr +src_pkglib_PRGS = src/capchroot \ + src/fakerunlevel \ + src/filetime \ + src/ifspec \ + src/listdevip \ + src/parserpmdump \ + src/readlink \ + src/showattr \ + src/showperm \ + src/vbuild \ + src/vcheck \ + src/vreboot \ + src/vunify + +src_sbin_PRGS = src/chbind \ + src/chcontext \ + src/rebootmgr \ + src/reducecap \ + src/vlimit \ + src/vdu \ + src/vfiles \ + src/vkill \ + src/vserver-stat + +src_GENFILES = src/setattr + +src_capchroot_SOURCES = src/capchroot.c +src_capchroot_LDADD = lib/libvserver.a + +src_chbind_SOURCES = src/chbind.c +src_chbind_LDADD = lib/libvserver.a + +src_chcontext_SOURCES = src/chcontext.c +src_chcontext_LDADD = lib/libvserver.a + +src_fakerunlevel_SOURCES = src/fakerunlevel.c +src_filetime_SOURCES = src/filetime.c +src_ifspec_SOURCES = src/ifspec.c +src_listdevip_SOURCES = src/listdevip.c +src_parserpmdump_SOURCES = src/parserpmdump.c +src_readlink_SOURCES = src/readlink.c + +src_rebootmgr_SOURCES = src/rebootmgr.c +src_rebootmgr_CPPFLAGS = $(AM_CPPFLAGS) -DSBINDIR=\"$(sbindir)\" -DVROOTDIR=\"$(vserverdir)\" + +src_reducecap_SOURCES = src/reducecap.c +src_reducecap_LDADD = lib/libvserver.a + +src_vlimit_SOURCES = src/vlimit.c +src_vlimit_LDADD = lib/libvserver.a + +src_vkill_SOURCES = src/vkill.c +src_vkill_LDADD = lib/libvserver.a +src_vkill_CPPFLAGS = $(AM_CPPFLAGS) -DLEGACYDIR=\"$(legacydir)\" + +src_showattr_SOURCES = src/showattr.c +src_showperm_SOURCES = src/showperm.c +src_vbuild_SOURCES = src/vbuild.cc src/vutil.cc +src_vdu_SOURCES = src/vdu.c +src_vfiles_SOURCES = src/vfiles.cc src/vutil.cc +src_vreboot_SOURCES = src/vreboot.c + +src_vserver_stat_SOURCES = src/vserver-stat.c +src_vserver_stat_LDADD = lib/libvserver.a + +src_vunify_SOURCES = src/vunify.cc src/vutil.cc +src_vunify_CPPFLAGS = $(AM_CPPFLAGS) -DVROOTDIR=\"$(vserverdir)\" +src_vcheck_SOURCES = src/vcheck.cc src/vutil.cc + +#install-data-hook: $(DESTDIR)$(pkglibdir)/setattr + +#$(DESTDIR)$(pkglibdir)/setattr: +# ln -s showattr '$@' + +src/setattr$(EXEEXT): src/showattr$(EXEEXT) + @rm -f '$@' + ln -s showattr$(EXEEXT) '$@' + +## Local Variables: +## compile-command: "make -C .. -k" +## End: diff --git a/src/capchroot.c b/src/capchroot.c new file mode 100644 index 0000000..5b8d738 --- /dev/null +++ b/src/capchroot.c @@ -0,0 +1,111 @@ +// $Id: capchroot.c,v 1.1.4.2 2003/11/28 23:08:43 ensc Exp $ + +// Copyright (C) 2003 Enrico Scholz +// based on capchroot.cc by Jacques Gelinas +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +/* + This chroot command does very little. Once the chroot + system call is executed, it (option) remove the CAP_SYS_CHROOT + capability. Then it executes its argument +*/ +#ifdef HAVE_CONFIG_H +# include +#endif +#include "compat.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "linuxcaps.h" +#include "vserver.h" + +int main (int argc, char *argv[]) +{ + if (argc < 3){ + fprintf (stderr,"capchroot version %s\n",VERSION); + fprintf (stderr + ,"capchroot --nochroot directory [ --suid user ] command argument\n" + "\n" + "--nochroot remove the CAP_SYS_CHROOT capability\n" + " after the chroot system call.\n" + "--suid switch to a different user (in the vserver context)\n" + " before executing the command.\n"); + }else{ + const char *uid = NULL; + bool nochroot = false; + int dir; + for (dir=1; dirpw_gid); + setuid(p->pw_uid); + } + if (cmd >= argc){ + fprintf (stderr,"capchroot: No command to execute, do nothing\n"); + }else{ + execvp (argv[cmd],argv+cmd); + fprintf (stderr,"Can't execute %s (%s)\n",argv[cmd] + ,strerror(errno)); + } + } + } + return -1; +} + + diff --git a/src/chbind.c b/src/chbind.c new file mode 100644 index 0000000..3f82a3d --- /dev/null +++ b/src/chbind.c @@ -0,0 +1,236 @@ +// $Id: chbind.c,v 1.1.4.1 2003/10/14 00:42:32 ensc Exp $ + +// Copyright (C) 2003 Enrico Scholz +// based on chbind.cc by Jacques Gelinas +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +#ifdef HAVE_CONFIG_H +# include +#endif +#include "compat.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "vserver.h" + +static void usage() +{ + fprintf (stderr,"chbind version %s\n",VERSION); + fprintf (stderr,"chbind [ --silent ] [ --ip ip_num[/mask] ] [ --bcast broadcast ] command argument\n"); + exit (-1); +} + +/* + Check if a network device exist in /proc/net/dev. + This is used because ifconfig_ioctl triggers modprobe if requesting + information about non existant devices. + + Return != 0 if the device exist. +*/ +static int chbind_devexist (const char *dev) +{ + int ret = 0; + FILE *fin = fopen ("/proc/net/dev","r"); + if (fin != NULL){ + int len = strlen(dev); + char buf[1000]; + fgets(buf,sizeof(buf)-1,fin); // Skip one line + while (fgets(buf,sizeof(buf)-1,fin)!=NULL){ + const char *pt = strstr(buf,dev); + if (pt != NULL && pt[len] == ':'){ + ret = 1; + break; + } + } + fclose (fin); + } + return ret; +} + + +static int ifconfig_ioctl( + int fd, + const char *ifname, + int cmd, + struct ifreq *ifr) +{ + strcpy(ifr->ifr_name, ifname); + return ioctl(fd, cmd,ifr); +} + +/* + Fetch the IP number of an interface from the kernel. + Assume the device is already available in the kernel + Return -1 if any error. +*/ +int ifconfig_getaddr ( + const char *ifname, + unsigned long *addr, + unsigned long *mask, + unsigned long *bcast) +{ + int ret = -1; + if (chbind_devexist(ifname)){ + int skfd = socket(AF_INET, SOCK_DGRAM, 0); + *addr = 0; + *bcast = 0xffffffff; + if (skfd != -1){ + struct ifreq ifr; + if (ifconfig_ioctl(skfd,ifname,SIOCGIFADDR, &ifr) >= 0){ + struct sockaddr_in *sin = (struct sockaddr_in*)&ifr.ifr_addr; + *addr = sin->sin_addr.s_addr; + ret = 0; + } + if (ifconfig_ioctl(skfd,ifname,SIOCGIFNETMASK, &ifr) >= 0){ + struct sockaddr_in *sin = (struct sockaddr_in*)&ifr.ifr_addr; + *mask = sin->sin_addr.s_addr; + ret = 0; + } + if (ifconfig_ioctl(skfd,ifname,SIOCGIFBRDADDR, &ifr) >= 0){ + struct sockaddr_in *sin = (struct sockaddr_in*)&ifr.ifr_addr; + *bcast = sin->sin_addr.s_addr; + ret = 0; + } + close (skfd); + } + } + return ret; +} + + + + +int main (int argc, char *argv[]) +{ + int ret = -1; + int silent = 0; + int i; + struct vc_ip_mask_pair ips[16]; + int nbaddrs = 0; + unsigned long bcast = 0xffffffff; + for (i=1; i> 1; + mask |= 0x80000000; + } + mask = ntohl(mask); + }else{ + struct hostent *h = gethostbyname (pt); + if (h != NULL){ + memcpy (&mask,h->h_addr,sizeof(mask)); + }else{ + fprintf (stderr,"Invalid netmask: %s\n",pt); + usage(); + } + } + + } + + h = gethostbyname (opt); + if (h == NULL){ + fprintf (stderr,"Invalid IP number or host name: %s\n",opt); + usage(); + }else{ + memcpy (&addr,h->h_addr,sizeof(addr)); + ips[nbaddrs].ip = addr; + ips[nbaddrs].mask = mask; + ++nbaddrs; + } + }else{ + ips[nbaddrs].ip = addr; + ips[nbaddrs].mask = mask; + ++nbaddrs; + } + i++; + }else if (strcmp(arg,"--bcast")==0){ + unsigned long tmp; + if (ifconfig_getaddr(opt,&tmp,&tmp,&bcast)==-1){ + struct hostent *h = gethostbyname (opt); + if (h == NULL){ + fprintf (stderr,"Invalid broadcast number: %s\n",opt); + usage(); + }else{ + memcpy (&bcast,h->h_addr,sizeof(bcast)); + } + } + i++; + }else if (strcmp(arg,"--silent")==0){ + silent = 1; + }else{ + break; + } + } + if (i == argc){ + usage(); + }else if (argv[i][0] == '-'){ + usage(); + }else{ + if (vc_set_ipv4root(bcast,nbaddrs,ips)==0){ + if (!silent){ + int i; + printf ("ipv4root is now"); + for (i=0; i>24 + ,(hostaddr>>16)&0xff + ,(hostaddr>>8)&0xff + ,hostaddr &0xff); + } + printf ("\n"); + } + execvp (argv[i],argv+i); + fprintf (stderr,"Can't exec %s (%s)\n",argv[i],strerror(errno)); + }else{ + fprintf (stderr,"Can't set the ipv4 root (%s)\n",strerror(errno)); + } + } + return ret; +} + + diff --git a/src/chcontext.c b/src/chcontext.c new file mode 100644 index 0000000..236e0cc --- /dev/null +++ b/src/chcontext.c @@ -0,0 +1,295 @@ +// $Id: chcontext.c,v 1.1.4.3 2004/01/07 16:24:01 ensc Exp $ + +// Copyright (C) 2003 Enrico Scholz +// based on chcontext.cc by Jacques Gelinas +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +/* + chcontext is a wrapper to user the new_s_context system call. It + does little more than mapping command line option to the system call + arguments. +*/ +#ifdef HAVE_CONFIG_H +# include +#endif +#include "compat.h" + +#include +#include +#include +#include +#include + +#include "linuxcaps.h" +#include "vserver.h" + +#ifndef CAP_QUOTACTL +# define CAP_QUOTACTL 29 +#endif + +static void usage() +{ + fprintf (stderr,"chcontext version %s\n",VERSION); + fprintf (stderr + ,"chcontext [ options ] command arguments ...\n" + "\n" + "chcontext allocate a new security context and executes\n" + "a command in that context.\n" + "By default, a new/unused context is allocated\n" + "\n" + + "--cap CAP_NAME\n" + "\tAdd a capability from the command. This option may be\n" + "\trepeated several time.\n" + "\tSee /usr/include/linux/capability.h\n" + "\tIn general, this option is used with the --secure option\n" + "\t--secure removes most critical capabilities and --cap\n" + "\tadds specific ones.\n" + "\n" + + "--cap !CAP_NAME\n" + "\tRemove a capability from the command. This option may be\n" + "\trepeated several time.\n" + "\tSee /usr/include/linux/capability.h\n" + "\n" + "--ctx num\n" + "\tSelect the context. On root in context 0 is allowed to\n" + "\tselect a specific context.\n" + "\tContext number 1 is special. It can see all processes\n" + "\tin any contexts, but can't kill them though.\n" + "\tOption --ctx may be repeated several times to specify up to 16 contexts.\n" + + "--disconnect\n" + "\tStart the command in background and make the process\n" + "\ta child of process 1.\n" + + "--domainname new_domainname\n" + "\tSet the domainname (NIS) in the new security context.\n" + "\tUse \"none\" to unset the domain name.\n" + + "--flag\n" + "\tSet one flag in the new or current security context. The following\n" + "\tflags are supported. The option may be used several time.\n" + "\n" + "\tfakeinit: The new process will believe it is process number 1.\n" + " Useful to run a real /sbin/init in a vserver.\n" + "\tlock: The new process is trapped and can't use chcontext anymore.\n" + "\tsched: The new process and its children will share a common \n" + " execution priority.\n" + "\tnproc: Limit the number of process in the vserver according to\n" + " ulimit setting. Normally, ulimit is a per user thing.\n" + " With this flag, it becomes a per vserver thing.\n" + "\tprivate: No one can join this security context once created.\n" + "\tulimit: Apply the current ulimit to the whole context\n" + + "--hostname new_hostname\n" + "\tSet the hostname in the new security context\n" + "\tThis is need because if you create a less privileged\n" + "\tsecurity context, it may be unable to change its hostname\n" + + "--secure\n" + "\tRemove all the capabilities to make a virtual server trustable\n" + + "--silent\n" + "\tDo not print the allocated context number.\n" + "\n" + "Information about context is found in /proc/self/status\n"); +} + + +int main (int argc, char *argv[]) +{ + int ret = -1; + int i; + int nbctx = 0; + int ctxs[16]; + int disconnect = 0; + int silent = 0; + int flags = 0; + unsigned remove_cap = 0; + unsigned add_cap = 0; + unsigned long secure = (1<= 16){ + fprintf (stderr,"Too many context, max 16, ignored.\n"); + }else{ + ctxs[nbctx++] = atoi(opt); + } + i++; + }else if (strcmp(arg,"--disconnect")==0){ + disconnect = 1; + }else if (strcmp(arg,"--silent")==0){ + silent = 1; + }else if (strcmp(arg,"--flag")==0){ + if (strcmp(opt,"lock")==0){ + flags |= 1; + }else if (strcmp(opt,"sched")==0){ + flags |= 2; + }else if (strcmp(opt,"nproc")==0){ + flags |= 4; + }else if (strcmp(opt,"private")==0){ + flags |= 8; + }else if (strcmp(opt,"fakeinit")==0){ + flags |= 16; + }else if (strcmp(opt,"hideinfo")==0){ + flags |= 32; + }else if (strcmp(opt,"ulimit")==0){ + flags |= 64; + }else{ + fprintf (stderr,"Unknown flag %s\n",opt); + } + i++; + }else if (strcmp(arg,"--cap")==0){ + static struct { + const char *option; + int bit; + }tbcap[]={ + // The following capabilities are normally available + // to vservers administrator, but are place for + // completeness + {"CAP_CHOWN",CAP_CHOWN}, + {"CAP_DAC_OVERRIDE",CAP_DAC_OVERRIDE}, + {"CAP_DAC_READ_SEARCH",CAP_DAC_READ_SEARCH}, + {"CAP_FOWNER",CAP_FOWNER}, + {"CAP_FSETID",CAP_FSETID}, + {"CAP_KILL",CAP_KILL}, + {"CAP_SETGID",CAP_SETGID}, + {"CAP_SETUID",CAP_SETUID}, + {"CAP_SETPCAP",CAP_SETPCAP}, + {"CAP_SYS_TTY_CONFIG",CAP_SYS_TTY_CONFIG}, + {"CAP_LEASE",CAP_LEASE}, + {"CAP_SYS_CHROOT",CAP_SYS_CHROOT}, + + // Those capabilities are not normally available + // to vservers because they are not needed and + // may represent a security risk + {"CAP_LINUX_IMMUTABLE",CAP_LINUX_IMMUTABLE}, + {"CAP_NET_BIND_SERVICE",CAP_NET_BIND_SERVICE}, + {"CAP_NET_BROADCAST",CAP_NET_BROADCAST}, + {"CAP_NET_ADMIN", CAP_NET_ADMIN}, + {"CAP_NET_RAW", CAP_NET_RAW}, + {"CAP_IPC_LOCK", CAP_IPC_LOCK}, + {"CAP_IPC_OWNER", CAP_IPC_OWNER}, + {"CAP_SYS_MODULE",CAP_SYS_MODULE}, + {"CAP_SYS_RAWIO", CAP_SYS_RAWIO}, + {"CAP_SYS_PACCT", CAP_SYS_PACCT}, + {"CAP_SYS_ADMIN", CAP_SYS_ADMIN}, + {"CAP_SYS_BOOT", CAP_SYS_BOOT}, + {"CAP_SYS_NICE", CAP_SYS_NICE}, + {"CAP_SYS_RESOURCE",CAP_SYS_RESOURCE}, + {"CAP_SYS_TIME", CAP_SYS_TIME}, + {"CAP_MKNOD", CAP_MKNOD}, + {"CAP_QUOTACTL", CAP_QUOTACTL}, + {NULL,0} + }; + int j; + unsigned *cap = &add_cap; + if (opt[0] == '!'){ + cap = &remove_cap; + opt++; + } + for (j=0; tbcap[j].option != NULL; j++){ + if (strcasecmp(tbcap[j].option,opt)==0){ + *cap |= (1< +// +// 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; version 2 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +#ifndef H_UTIL_VSERVER_SRC_EXT2FS_H +#define H_UTIL_VSERVER_SRC_EXT2FS_H + +#ifdef ENSC_HAVE_EXT2FS_EXT2_FS_H +# include +#elif defined(ENSC_HAVE_LINUX_EXT2_FS_H) +# include +#else +# error Do not know how to include +#endif + +#endif // H_UTIL_VSERVER_SRC_EXT2FS_H diff --git a/src/fakerunlevel.c b/src/fakerunlevel.c new file mode 100644 index 0000000..3ddcfe9 --- /dev/null +++ b/src/fakerunlevel.c @@ -0,0 +1,73 @@ +// $Id: fakerunlevel.c,v 1.1 2003/09/29 22:01:57 ensc Exp $ + +// Copyright (C) 2003 Enrico Scholz +// based on fakerunlevel.cc by Jacques Gelinas +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +/* + This program add a RUNLEVEL record in a utmp file. + This is used when a vserver lack a private init process + so runlevel properly report the fake runlevel. +*/ +#include +#include +#include +#include +#include + +static void usage() +{ + fprintf (stderr,"fakerunlevel version %s\n",VERSION); + fprintf (stderr + ,"\n" + "fakerunlevel runlevel utmp_file\n" + "\n" + "Put a runlevel record in file utmp_file\n"); +} + +int main (int argc, char *argv[]) +{ + if (argc != 3){ + usage(); + }else{ + int runlevel = atoi(argv[1]); + const char *fname = argv[2]; + if (runlevel < 1 || runlevel > 5){ + usage(); + }else{ + // Make sure the file exist + FILE *fout = fopen (fname,"a"); + if (fout == NULL){ + fprintf (stderr,"Can't open file %s (%s)\n",fname + ,strerror(errno)); + }else{ + struct utmp ut; + + fclose (fout); + utmpname (fname); + setutent(); + memset (&ut,0,sizeof(ut)); + ut.ut_type = RUN_LVL; + ut.ut_pid = ('#' << 8) + runlevel+'0'; + pututline (&ut); + endutent(); + } + } + } + + return 0; +} + diff --git a/src/filetime.c b/src/filetime.c new file mode 100644 index 0000000..59531d1 --- /dev/null +++ b/src/filetime.c @@ -0,0 +1,58 @@ +// $Id: filetime.c,v 1.1 2003/09/29 22:01:57 ensc Exp $ + +// Copyright (C) 2003 Enrico Scholz +// based on filetime.cc by Jacques Gelinas +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +#include +#include +#include +#include +#include + +int main (int argc, char *argv[]) +{ + int ret = -1; + if (argc != 2){ + fprintf (stderr + ,"filetime version %s\n" + "filetime file\n" + "\n" + "Prints the age of a file\n" + "(how long since it was created or modified)\n" + ,VERSION); + }else{ + struct stat st; + if (stat(argv[1],&st)==-1){ + fprintf (stderr,"Can't stat file %s (%s)\n",argv[1] + ,strerror(errno)); + }else{ + time_t now = time(NULL); + time_t since = now - st.st_mtime; + int days = since / (24*60*60); + int today = since % (24*60*60); + int hours = today / (60*60); + int minutes = (today % (60*60)) / 60; + if (days > 0){ + printf ("%d days ",days); + } + printf ("%02d:%02d\n",hours,minutes); + ret = 0; + } + } + return ret; +} + diff --git a/src/ifspec.c b/src/ifspec.c new file mode 100644 index 0000000..c375bcc --- /dev/null +++ b/src/ifspec.c @@ -0,0 +1,188 @@ +// $Id: ifspec.c,v 1.1.4.1 2003/11/21 16:01:09 ensc Exp $ + +// Copyright (C) 2003 Enrico Scholz +// based on ifspec.cc by Jacques Gelinas +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +/* + Prints the specs of a network device in shell like form + + ADDR= + NETMASK= + BCAST= +*/ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static void usage() +{ + fprintf (stderr,"ifspec version %s\n",VERSION); + fprintf (stderr + ,"ifspec network-device [ ipaddr netmask broadcast ]\n" + "prints device specification in a shell usable way\n"); + exit (-1); +} + +static int ifconfig_ioctl( + int fd, + const char *ifname, + int cmd, + struct ifreq *ifr) +{ + strcpy(ifr->ifr_name, ifname); + return ioctl(fd, cmd,ifr); +} + +static unsigned long ip_cnv (const char *str) +{ + const char *start_str = str; + unsigned tb[4]; + int no = 0; + unsigned long ret; + + memset (tb,-1,sizeof(tb)); + while (*str != '\0' && no < 4){ + if (isdigit(*str)){ + int val = atoi(str); + if (val > 255) break; + tb[no++] = val; + while (isdigit(*str)) str++; + if (*str == '.'){ + str++; + }else{ + break; + } + }else{ + break; + } + } + + ret = (tb[0] << 24) | (tb[1]<<16) | (tb[2] << 8) | tb[3]; + if (no != 4 || *str != '\0'){ + fprintf (stderr,"Invalid IP number or netmask: %s\n",start_str); + ret = 0xffffffff; + } + return ret; +} + + +/* + Fetch the IP number of an interface from the kernel. + Assume the device is already available in the kernel + Return -1 if any error. +*/ +int ifconfig_print ( + const char *ifname, + const char *addrstr, + const char *maskstr, + const char *bcaststr) +{ + int ret = -1; + int skfd = socket(AF_INET, SOCK_DGRAM, 0); + if (skfd != -1){ + struct ifreq ifr; + struct { + unsigned long addr; + unsigned long mask; + } solved = {0,0}; + if (addrstr != NULL && addrstr[0] != '\0'){ + printf ("ADDR=%s\n",addrstr); + solved.addr = ip_cnv (addrstr); + }else if (ifconfig_ioctl(skfd,ifname,SIOCGIFADDR, &ifr) >= 0){ + struct sockaddr_in *sin = (struct sockaddr_in*)&ifr.ifr_addr; + unsigned long addr = ntohl(sin->sin_addr.s_addr); + printf ("ADDR=%lu.%lu.%lu.%lu\n" + ,(addr>>24)&0xff + ,(addr>>16)&0xff + ,(addr>>8)&0xff + ,addr&0xff); + solved.addr = addr; + ret = 0; + } + else { + perror("ioctl(SIOCGIFADDR)"); + } + + if (maskstr != NULL && maskstr[0] != '\0'){ + printf ("NETMASK=%s\n",maskstr); + solved.mask = ip_cnv (maskstr); + }else if (ifconfig_ioctl(skfd,ifname,SIOCGIFNETMASK, &ifr) >= 0){ + struct sockaddr_in *sin = (struct sockaddr_in*)&ifr.ifr_addr; + unsigned long addr = ntohl(sin->sin_addr.s_addr); + printf ("NETMASK=%lu.%lu.%lu.%lu\n" + ,(addr>>24)&0xff + ,(addr>>16)&0xff + ,(addr>>8)&0xff + ,addr&0xff); + solved.mask = addr; + ret = 0; + } + else { + perror("ioctl(SIOCGIFNETMASK)"); + } + + if (bcaststr != NULL && bcaststr[0] != '\0'){ + printf ("BCAST=%s\n",bcaststr); + }else if (ifconfig_ioctl(skfd,ifname,SIOCGIFBRDADDR, &ifr) >= 0){ + struct sockaddr_in *sin = (struct sockaddr_in*)&ifr.ifr_addr; + unsigned long addr = ntohl(sin->sin_addr.s_addr); + printf ("BCAST=%lu.%lu.%lu.%lu\n" + ,(addr>>24)&0xff + ,(addr>>16)&0xff + ,(addr>>8)&0xff + ,addr&0xff); + ret = 0; + }else if (solved.addr!=0 && solved.mask!=0) { + // Can't get it from the kernel, compute it from the IP + // and the netmask + unsigned long addr = (solved.addr & solved.mask) + | ~solved.mask; + printf ("BCAST=%lu.%lu.%lu.%lu\n" + ,(addr>>24)&0xff + ,(addr>>16)&0xff + ,(addr>>8)&0xff + ,addr&0xff); + + } + close (skfd); + } + return ret; +} + + +int main (int argc, char *argv[]) +{ + int ret = -1; + if (argc < 2){ + usage(); + }else{ + const char *addrstr = argc >= 3 ? argv[2] : NULL; + const char *maskstr = argc >= 4 ? argv[3] : NULL; + const char *bcaststr = argc >= 5 ? argv[4] : NULL; + ret = ifconfig_print (argv[1],addrstr,maskstr,bcaststr); + } + return ret; +} + + + diff --git a/src/listdevip.c b/src/listdevip.c new file mode 100644 index 0000000..84fa388 --- /dev/null +++ b/src/listdevip.c @@ -0,0 +1,107 @@ +// $Id: listdevip.c,v 1.1 2003/09/29 22:01:57 ensc Exp $ + +// Copyright (C) 2003 Enrico Scholz +// based on listdevip.cc by Jacques Gelinas +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +/* + Print the list of all network (IP) devices. Print the IP + in fact, including all aliases. +*/ +#include +#include +#include +#include +#include +#include +#include +#include + + +static int ifconfig_ioctl( + int fd, + const char *ifname, + int cmd, + struct ifreq *ifr) +{ + strcpy(ifr->ifr_name, ifname); + return ioctl(fd, cmd,ifr); +} + + +static int devlist_read2_2() +{ + int ret = -1; + int skfd = socket (AF_INET,SOCK_DGRAM,0); + if (skfd < 0) { + perror ("socket"); + }else{ + struct ifconf ifc; + int numreqs = 30; + ifc.ifc_buf = NULL; + ret = 0; + while (1) { + ifc.ifc_len = sizeof(struct ifreq) * numreqs; + ifc.ifc_buf = (char*)realloc(ifc.ifc_buf, ifc.ifc_len); + + if (ioctl(skfd, SIOCGIFCONF, &ifc) < 0) { + perror("SIOCGIFCONF"); + ret = -1; + break; + } + if (ifc.ifc_len == (int)sizeof(struct ifreq) * numreqs) { + /* assume it overflowed and try again */ + numreqs += 10; + continue; + } + break; + } + if (ret == 0){ + struct ifreq *ifr = ifc.ifc_req; + int n; + for (n = 0; n < ifc.ifc_len; n += sizeof(struct ifreq)) { + struct sockaddr_in *sin = (struct sockaddr_in*)&ifr->ifr_addr; + unsigned long addr = ntohl(sin->sin_addr.s_addr); + unsigned long mask = 0xffffff00; + struct ifreq ifmask; + if (ifconfig_ioctl(skfd,ifr->ifr_name,SIOCGIFNETMASK, &ifmask) >= 0){ + struct sockaddr_in *sin = (struct sockaddr_in*)&ifmask.ifr_addr; + mask = ntohl(sin->sin_addr.s_addr); + } + + printf ("%lu.%lu.%lu.%lu/%lu.%lu.%lu.%lu\n" + ,(addr>>24)&0xff + ,(addr>>16)&0xff + ,(addr>>8)&0xff + ,addr&0xff + ,(mask>>24)&0xff + ,(mask>>16)&0xff + ,(mask>>8)&0xff + ,mask&0xff); + ifr++; + } + } + free(ifc.ifc_buf); + } + return ret; +} + +int main (int argc, char *argv[]) +{ + devlist_read2_2(); + return 0; +} + diff --git a/src/parserpmdump.c b/src/parserpmdump.c new file mode 100644 index 0000000..1fd5920 --- /dev/null +++ b/src/parserpmdump.c @@ -0,0 +1,71 @@ +// $Id: parserpmdump.c,v 1.1 2003/09/29 22:01:57 ensc Exp $ + +// Copyright (C) 2003 Enrico Scholz +// based on parserpmdump.cc by Jacques Gelinas +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +/* + Litte utility to extract non config file from + an rpm --dump command. +*/ +#include +#include +#include +#include +#include + + +int main (int argc, char *argv[]) +{ + int *tblen = alloca(argc * sizeof(int)); + int i; + char tmp[1000]; + + for (i=1; i= 0 && tmp[last] == '\n') tmp[last] = '\0'; + + for (i=0; i<8; i++){ + char *pt = start; + while (*pt > ' ') pt++; + if (*pt == ' ') *pt++ = '\0'; + if (i == 4){ + sscanf(start,"%o",&mode); + }else if (i==7){ + type = atoi(start); + } + start = pt; + + } + if (S_ISREG(mode) && type == 0) printf ("%s\n",tmp); + } + } + return 0; +} + diff --git a/src/readlink.c b/src/readlink.c new file mode 100644 index 0000000..77c8314 --- /dev/null +++ b/src/readlink.c @@ -0,0 +1,51 @@ +// $Id: readlink.c,v 1.1 2003/09/29 22:01:57 ensc Exp $ + +// Copyright (C) 2003 Enrico Scholz +// based on readlink.cc by Jacques Gelinas +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +/* + Copyright Jacques Gelinas jack@solucorp.qc.ca + Distributed under the Gnu Public License, see the License file + in this package. +*/ +#include +#include +#include +#include +#include + +int main (int argc, char *argv[]) +{ + int ret = -1; + if (argc != 2){ + fprintf (stderr,"readlink symlink-file\n"); + fprintf (stderr,"Prints the contents of a symlink\n"); + }else{ + char buf[PATH_MAX]; + int len = readlink (argv[1],buf,sizeof(buf)-1); + if (len > 0){ + buf[len] = '\0'; + printf ("%s\n",buf); + ret = 0; + }else{ + fprintf (stderr,"readlink failed for file %s (%s)\n" + ,argv[1],strerror(errno)); + } + } + return ret; +} + diff --git a/src/rebootmgr.c b/src/rebootmgr.c new file mode 100644 index 0000000..81abf4c --- /dev/null +++ b/src/rebootmgr.c @@ -0,0 +1,245 @@ +// $Id: rebootmgr.c,v 1.1.2.1.2.3 2003/10/30 15:16:30 ensc Exp $ + +// Copyright (C) 2003 Enrico Scholz +// based on rebootmgr.cc by Jacques Gelinas +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +/* + The reboot manager allow a virtual server administrator to request + a complete restart of his vserver. This means that all services + are terminated, all remaining processes are killed and then + all services are started. + + This is done by issuing + + /usr/sbin/vserver vserver restart + + + The rebootmgr installs a unix domain socket in each vservers + and listen for the reboot messages. All other message are discarded. + + The unix domain socket is placed in /vservers/N/dev/reboot and is + turned immutable. + + The vreboot utility is used to send the signal from the vserver + environment. +*/ +#ifdef HAVE_CONFIG_H +# include +#endif +#include "compat.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static void usage() +{ + fprintf (stderr,"rebootmgr version %s\n",VERSION); + fprintf (stderr,"\n"); + fprintf (stderr,"rebootmgr [--pidfile file ] vserver-name [ vserver-name ...]\n"); +} + +static int rebootmgr_opensocket (const char *vname) +{ + int ret = -1; + char sockn[PATH_MAX]; + int fd = socket (AF_UNIX,SOCK_STREAM,0); + sprintf (sockn,"%s/%s/dev/reboot",VROOTDIR, vname); + unlink (sockn); + if (fd == -1){ + fprintf (stderr,"Can't create a unix domain socket (%s)\n" + ,strerror(errno)); + }else{ + struct sockaddr_un un; + un.sun_family = AF_UNIX; + strcpy (un.sun_path,sockn); + if (bind(fd,(struct sockaddr*)&un,sizeof(un))==-1){ + fprintf (stderr,"Can't bind to file %s (%s)\n",sockn + ,strerror(errno)); + }else{ + int code; + chmod (sockn,0600); + code = listen (fd,10); + if (code == -1){ + fprintf (stderr,"Can't listen to file %s (%s)\n",sockn + ,strerror(errno)); + }else{ + ret = fd; + } + } + } + return ret; +} + +static int rebootmgr_process (int fd, const char *vname) +{ + int ret = -1; + char buf[100]; + int len = read (fd,buf,sizeof(buf)-1); + // fprintf (stderr,"process %d %s len %d\n",fd,vname,len); + if (len > 0){ + buf[len] = '\0'; + if (strcmp(buf,"reboot\n")==0){ + char cmd[1000]; + syslog (LOG_NOTICE,"reboot vserver %s\n",vname); + snprintf (cmd,sizeof(cmd)-1,"%s/vserver %s restart >>/var/log/boot.log 2>&1",SBINDIR, vname); + system (cmd); + ret = 0; + }else if (strcmp(buf,"halt\n")==0){ + char cmd[1000]; + syslog (LOG_NOTICE,"halt vserver %s\n",vname); + snprintf (cmd,sizeof(cmd)-1,"%s/vserver %s stop >>/var/log/boot.log 2>&1",SBINDIR, vname); + system (cmd); + ret = 0; + }else{ + syslog (LOG_ERR,"Invalid request from vserver %s",vname); + } + } + return ret; +} + + +int main (int argc, char *argv[]) +{ + int ret = -1; + if (argc < 2){ + usage(); + }else{ + int error = 0; + int start = 1; + int i; + int *sockets = alloca(argc * sizeof(int)); + + openlog ("rebootmgr",LOG_PID,LOG_DAEMON); + for (i=0; i maxfd) maxfd = fd; + FD_SET (fd,&fdin); + } + for (i=0; i maxfd) maxfd = fd; + FD_SET (fd,&fdin); + } + ok = select (maxfd+1,&fdin,NULL,NULL,NULL); + if (ok <= 0){ + break; + }else{ + int i; + int dst = 0; + + for (i=start; i +// based on reducecap.cc by Jacques Gelinas +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +#ifdef HAVE_CONFIG_H +# include +#endif +#include "compat.h" + +#include +#include +#include +#include +#include + +#include "linuxcaps.h" +#include "vserver.h" + +#ifndef CAP_QUOTACTL +# define CAP_QUOTACTL 29 +#endif + +extern int capget (struct __user_cap_header_struct *, struct __user_cap_data_struct *); +extern int capset (struct __user_cap_header_struct *, struct __user_cap_data_struct *); + +static void usage() +{ + fprintf (stderr,"reducecap version %s\n",VERSION); + fprintf (stderr,"reducecap [ options ] command argument\n"); + exit (-1); +} + +static void reducecap_print(struct __user_cap_data_struct *user) +{ + static const char *tb[]={ + "CAP_CHOWN", + "CAP_DAC_OVERRIDE", + "CAP_DAC_READ_SEARCH", + "CAP_FOWNER", + "CAP_FSETID", + "CAP_KILL", + "CAP_SETGID", + "CAP_SETUID", + "CAP_SETPCAP", + "CAP_LINUX_IMMUTABLE", + "CAP_NET_BIND_SERVICE", + "CAP_NET_BROADCAST", + "CAP_NET_ADMIN", + "CAP_NET_RAW", + "CAP_IPC_LOCK", + "CAP_IPC_OWNER", + "CAP_SYS_MODULE", + "CAP_SYS_RAWIO", + "CAP_SYS_CHROOT", + "CAP_SYS_PTRACE", + "CAP_SYS_PACCT", + "CAP_SYS_ADMIN", + "CAP_SYS_BOOT", + "CAP_SYS_NICE", + "CAP_SYS_RESOURCE", + "CAP_SYS_TIME", + "CAP_SYS_TTY_CONFIG", + "CAP_MKNOD", + "CAP_LEASE", + "CAP_QUOTACTL", + NULL + }; + int i; + printf ("%22s %9s %9s %9s\n","Capability","Effective","Permitted" + ,"Inheritable"); + for (i=0; tb[i] != NULL; i++){ + int bit = (1 << i); + printf ("%22s %9s %9s %9s\n" + ,tb[i] + ,(user->effective & bit) ? "X " : " " + ,(user->permitted & bit) ? "X " : " " + ,(user->inheritable & bit) ? "X " : " "); + } +} + +static void reducecap_show() +{ + struct __user_cap_header_struct header; + struct __user_cap_data_struct user; + header.version = _LINUX_CAPABILITY_VERSION; + header.pid = getpid(); + if (capget(&header,&user)==-1){ + perror ("capget"); + }else{ + reducecap_print (&user); + } +} + + + +int main (int argc, char *argv[]) +{ + int ret = -1; + unsigned long remove = 0; + int show = 0; + int flags = 0; + unsigned long secure = (1< +// based on showattr.cc by Jacques Gelinas +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +#ifdef HAVE_CONFIG_H +# include +#endif +#include "compat.h" + +#include +#include +#include +#include +#include +#include + +#include "ext2fs.h" + + +// Patch to help compile this utility on unpatched kernel source +#ifndef EXT2_IMMUTABLE_FILE_FL + #define EXT2_IMMUTABLE_FILE_FL 0x00000010 + #define EXT2_IMMUTABLE_LINK_FL 0x00008000 +#endif + +/* + Get the extended attributes of a file +*/ +static int getext2flags (const char *fname, long *flags) +{ + int ret = -1; + int fd = open (fname,O_RDONLY); + if (fd == -1){ + fprintf (stderr,"Can't open file %s (%s)\n",fname,strerror(errno)); + }else{ + *flags = 0; + ret = ioctl (fd,EXT2_IOC_GETFLAGS,flags); + close (fd); + if (ret == -1){ + fprintf (stderr,"Can't get ext2 flags on file %s (%s)\n" + ,fname,strerror(errno)); + } + } + return ret; +} + +/* + Set the extended attributes of a file +*/ +static int setext2flags (const char *fname, long flags) +{ + int ret = -1; + int fd = open (fname,O_RDONLY); + if (fd == -1){ + fprintf (stderr,"Can't open file %s (%s)\n",fname,strerror(errno)); + }else{ + ret = ioctl (fd,EXT2_IOC_SETFLAGS,&flags); + close (fd); + if (ret == -1){ + fprintf (stderr,"Can't set ext2 flags on file %s (%s)\n" + ,fname,strerror(errno)); + } + } + return ret; +} + + +int main (int argc, char *argv[]) +{ + int ret = -1; + if (argc <= 1){ + fprintf (stderr + ,"showattr file ...\n" + "\n" + "Presents extended file attribute.\n" + "\n" + "setattr --immutable --immulink file ...\n" + "\n" + "Sets the extended file attributes.\n" + "\n" + "These utilities exist as an interim until lsattr and\n" + "chattr are updated.\n" + ); + }else if (strstr(argv[0],"showattr")!=NULL){ + int i; + for (i=1; i +// based on showperm.cc by Jacques Gelinas +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +#include +#include +#include +#include + +int main (int argc, char *argv[]) +{ + int ret = -1; + if (argc < 2){ + fprintf (stderr,"showperm version %s\n",VERSION); + fprintf (stderr, + "showperm file or directory ...\n" + "prints permission bits for files\n" + "A very stripped down stat utility\n" + ); + }else{ + int i; + ret = 0; + for (i=1; i +// based on vbuild.cc by Jacques Gelinas +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +/* + This utility is used to build a new vserver using a reference vserver. + It uses hard link whenever possible instead of duplicating files. + Once done, it sets the immutable bits. +*/ +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include "vutil.h" + +using namespace std; + +struct EXCLDIR{ + string prefix; + int len; + EXCLDIR(const char *s) + { + prefix = s; + prefix += '/'; + len = prefix.size(); + } +}; +static vector excldirs; + + +static int ext2flags = EXT2_IMMUTABLE_FILE_FL | EXT2_IMMUTABLE_LINK_FL; +static struct { + int nblink; + int nbcopy; + long size_copy; + int nbdir; + int nbsymlink; + int nbspc; +} stats; + + +static void usage() +{ + cerr << + "vbuild version " << VERSION << + "\n\n" + "vbuild [ options ] reference-server new-vservers\n" + "\n" + "--test: Show what will be done, do not do it.\n" + "--debug: Prints some debugging messages.\n" + "\n" + "--excldir: None of the files under a given directory will be copied\n" + "\tThe directory is expressed in absolute/logical form (relative\n" + "\tto the vserver root (ex: /var/log)\n" + "\n" + "\n" + "--noflags: Do not put any immutable flags on the file\n" + "--immutable: Set the immutable_file bit on the files.\n" + "--immutable-mayunlink: Sets the immutable_link flag on files.\n" + "--stats: Produce statistics on the number of file linked\n" + " copied and so on.\n" + "\n" + "By default, the immutable_file and immutable_link flags are\n" + "set on the files. So if you want no immutable flags, you must\n" + "use --noflags. If you want a single flag, you must use\n" + "--noflags first, then the --immutable or --immutable-mayunlink\n" + "flag.\n" + ; +} + +/* + Return true if a directory lies inside a directory set +*/ +static bool vbuild_inside (vector &dirs, const char *path) +{ + bool found = false; + for (unsigned i=0; i &files) +{ + int ret = -1; + if (debug > 0) printf ("Copying directory %s\n",logical_dir.c_str()); + DIR *dir = opendir (refserv.c_str()); + if (dir == NULL){ + fprintf (stderr,"Can't open directory %s (%s)\n",refserv.c_str() + ,strerror(errno)); + }else{ + logical_dir += "/"; + bool copy_files = !vbuild_inside(excldirs,logical_dir.c_str()); + struct dirent *ent; + ret = 0; + while (ret == 0 && (ent=readdir(dir))!=NULL){ + if (strcmp(ent->d_name,".")==0 || strcmp(ent->d_name,"..")==0){ + continue; + } + string file = refserv + "/" + ent->d_name; + struct stat st; + if (vutil_lstat(file.c_str(),st) == -1){ + ret = -1; + }else if (st.st_dev != dev){ + if (debug > 0) printf ("Ignore sub-directory %s\n",file.c_str()); + }else{ + string newfile = newserv + "/" + ent->d_name; + if (S_ISDIR(st.st_mode)){ + if (vbuild_mkdir (newfile.c_str(),st.st_mode)==-1){ + fprintf (stderr,"Can't mkdir %s (%s)\n" + ,newfile.c_str(),strerror(errno)); + ret = -1; + }else{ + stats.nbdir++; + if (vbuild_chown(newfile.c_str(),st.st_uid,st.st_gid)==-1){ + fprintf (stderr,"Can't chown %s (%s)\n" + ,newfile.c_str(),strerror(errno)); + ret = -1; + } + ret |= vbuild_copy (file,newfile,dev + ,logical_dir + ent->d_name,files); + } + }else if (S_ISLNK(st.st_mode)){ + char path[PATH_MAX]; + int len = readlink(file.c_str(),path,sizeof(path)-1); + if (len < 0){ + fprintf (stderr,"Can't readlink %s (%s)\n" + ,file.c_str(),strerror(errno)); + ret = -1; + }else{ + path[len] = '\0'; + stats.nbsymlink++; + if (vbuild_symlink (path,newfile.c_str())==-1){ + fprintf (stderr,"Can't symlink %s to %s (%s)\n", + newfile.c_str(),path,strerror(errno)); + } + } + }else if (S_ISBLK(st.st_mode) + || S_ISCHR(st.st_mode) + || S_ISFIFO(st.st_mode)){ + stats.nbspc++; + if (vbuild_mknod (newfile.c_str(),st.st_mode,st.st_rdev)==-1){ + fprintf (stderr,"Can't mknod %s (%s)\n" + ,newfile.c_str(),strerror(errno)); + ret = -1; + } + }else if (S_ISSOCK(st.st_mode)){ + // Do nothing + }else if (copy_files){ + // Ok, this is a file. We either copy it or do a link + string logical_file = logical_dir + ent->d_name; + if (files.find (logical_file)==files.end()){ + if (debug > 1) printf ("Copying file %s\n",file.c_str()); + if (vbuild_file_copy (file.c_str(),newfile.c_str(),st)==-1){ + fprintf (stderr,"Can't copy %s to %s (%s)\n", + file.c_str(),newfile.c_str(),strerror(errno)); + ret = -1; + }else{ + stats.size_copy += st.st_size; + stats.nbcopy++; + } + }else{ + if (debug > 2) printf ("Linking file %s\n",file.c_str()); + setext2flag (file.c_str(),false,ext2flags); + stats.nblink++; + if (vbuild_link (file.c_str(),newfile.c_str())==-1){ + fprintf (stderr,"Can't link %s to %s (%s)\n", + file.c_str(),newfile.c_str(),strerror(errno)); + ret = -1; + } + setext2flag (file.c_str(),true,ext2flags); + } + } + } + } + closedir(dir); + } + return ret; +} + +int main (int argc, char *argv[]) +{ + int ret = -1; + bool statistics = false; + int i; + for (i=1; i packages; + // Load the files which are not configuration files from + // the packages + vutil_loadallpkg (refserv,packages); + set files; + for (list::iterator it=packages.begin(); it!=packages.end(); it++){ + (*it).loadfiles(refserv,files); + } + // Now, we do a recursive copy of refserv into newserv + umask (0); + mkdir (newserv.c_str(),0755); + setext2flag(newserv.c_str(), false, 0); + // Check if it is on the same volume + struct stat refst,newst; + if (vutil_lstat(refserv,refst)!=-1 + && vutil_lstat(newserv,newst)!=1){ + if (refst.st_dev != newst.st_dev){ + fprintf (stderr,"Can't vbuild %s because it is not on the same volume as %s\n" + ,newserv.c_str(),refserv.c_str()); + }else{ + stats.nbdir = stats.nblink = stats.nbcopy = stats.nbsymlink = 0; + stats.nbspc = 0; + stats.size_copy = 0; + ret = vbuild_copy (refserv,newserv,refst.st_dev,"",files); + if (statistics){ + printf ("Directory created: %d\n",stats.nbdir); + printf ("Files copied : %d\n",stats.nbcopy); + printf ("Bytes copied : %ld\n",stats.size_copy); + printf ("Files linked : %d\n",stats.nblink); + printf ("Files symlinked : %d\n",stats.nbsymlink); + printf ("Special files : %d\n",stats.nbspc); + } + } + } + } + return ret; +} + + diff --git a/src/vcheck.cc b/src/vcheck.cc new file mode 100644 index 0000000..81a6789 --- /dev/null +++ b/src/vcheck.cc @@ -0,0 +1,237 @@ +// $Id: vcheck.cc,v 1.1 2003/09/29 22:01:57 ensc Exp $ + +// Copyright (C) 2003 Enrico Scholz +// based on vcheck.cc by Jacques Gelinas +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +/* + This utility is used to compare two vservers. One is known to + be clean and the other is potentially corrupted (cracked). The + goal of this program is to run the rpm verify command, but using + the RPM database of the first vserver. +*/ +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include "vutil.h" + +using namespace std; + + +static void usage() +{ + cerr << + "vcheck version " << VERSION << + "\n\n" + "vcheck [ options ] reference-server chk-vservers\n" + "\n" + "--diffpkgs: Shows which package differ.\n" + " + means the package only exists in chk-server.\n" + " - means the package does not exist in chk-server.\n" + " ! means the servers have different version.\n" + "\n" + "--verify: Execute an RPM verify on common packages.\n" + "--debug: Turn on some (useless) debugging messages.\n" + ; +} + +typedef list PACKAGES; + +/* + Delete a directory silently +*/ +static int vcheck_deldir (const string &path) +{ + int ret = -1; + struct stat st; + if (lstat(path.c_str(),&st)==-1){ + ret = 0; + }else{ + if (!S_ISDIR(st.st_mode)){ + fprintf (stderr,"%s already exist and is not a directory\n" + ,path.c_str()); + exit (-1); + }else{ + DIR *d = opendir (path.c_str()); + if (d != NULL){ + struct dirent *ent; + ret = 0; + while ((ent=readdir(d))!=NULL){ + if (strcmp(ent->d_name,".")!=0 + && strcmp(ent->d_name,"..")!=0){ + string tmp = path + "/" + ent->d_name; + if (unlink(tmp.c_str())==-1){ + fprintf (stderr,"Can't delete file %s (%s)\n",tmp.c_str() + ,strerror(errno)); + ret = -1; + break; + } + } + } + closedir (d); + rmdir (path.c_str()); + } + } + } + return ret; +} + + +static int vcheck_copydb (const string &refserv, const string &path) +{ + int ret = -1; + string refpath = refserv + "/var/lib/rpm"; + DIR *d = opendir (refpath.c_str()); + if (d == NULL){ + fprintf (stderr,"Can't open directory %s (%s)\n",refpath.c_str() + ,strerror(errno)); + }else{ + ret = 0; + struct dirent *ent; + while ((ent=readdir(d))!=NULL){ + if (strcmp(ent->d_name,".")!=0 + && strcmp(ent->d_name,"..")!=0){ + string srcpath = refpath + "/" + ent->d_name; + const char *spath = srcpath.c_str(); + struct stat st; + if (stat(spath,&st)!=-1){ + string dstpath = path + "/" + ent->d_name; + if (file_copy (spath,dstpath.c_str(),st) == -1){ + ret = -1; + break; + } + }else{ + ret = -1; + fprintf (stderr,"Can't stat %s (%s)\n",spath,strerror(errno)); + break; + } + } + } + closedir (d); + } + return ret; +} + +class cmp_name{ +public: + int operator()(const PACKAGE &p1, const PACKAGE &p2){ + return strcmp(p1.name.c_str(),p2.name.c_str()); + } +}; + + +int main (int argc, char *argv[]) +{ + int ret = -1; + bool diffpkg = false; + bool verify = false; + int i; + for (i=1; iversion != it->version){ + differ.push_back (*it); + }else{ + common.push_back (*it); + } + } + for (list::iterator it=chkpkgs.begin(); it!=chkpkgs.end(); it++){ + list::iterator f = find_if(refpkgs.begin(),refpkgs.end(),same_name(*it)); + if (f == refpkgs.end()){ + added.push_back (*it); + } + } + differ.sort (); + added.sort(); + removed.sort(); + common.sort (); + bool something = false; + if (diffpkg){ + for (PACKAGES::iterator it=removed.begin(); it!=removed.end(); it++){ + printf ("- %s\n",it->name.c_str()); + } + for (PACKAGES::iterator it=added.begin(); it!=added.end(); it++){ + printf ("+ %s\n",it->name.c_str()); + } + for (PACKAGES::iterator it=differ.begin(); it!=differ.end(); it++){ + printf ("! %s\n",it->name.c_str()); + } + something = true; + } + if (verify){ + // We copy the rpm database from the reference vserver to + // the target vserver + string dbpath = chkserv + "/tmp/vcheck.db"; + vcheck_deldir (dbpath); + if (mkdir (dbpath.c_str(),0)==-1){ + fprintf (stderr,"Can't create directory %s (%s)\n" + ,dbpath.c_str(),strerror(errno)); + }else if (vcheck_copydb (refserv,dbpath) != -1){ + // We only compare the common package + string cmd = "rpm --dbpath /tmp/vcheck.db --root " + chkserv + " -V"; + for (PACKAGES::iterator it=common.begin(); it!=common.end(); it++){ + //printf ("compare %s\n",it->name.c_str()); + cmd += " " + it->name; + } + if (debug) printf ("CMD: %s\n",cmd.c_str()); + system (cmd.c_str()); + } + vcheck_deldir (dbpath); + something = true; + } + if (!something){ + fprintf (stderr,"Nothing to do !!!\n\n"); + usage(); + } + } + return ret; +} + + + diff --git a/src/vdu.c b/src/vdu.c new file mode 100644 index 0000000..55f6082 --- /dev/null +++ b/src/vdu.c @@ -0,0 +1,114 @@ +// $Id: vdu.c,v 1.1 2003/09/29 22:01:57 ensc Exp $ + +// Copyright (C) 2003 Enrico Scholz +// based on vdu.cc by Jacques Gelinas +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +__extension__ typedef long long longlong; + +static int vdu_onedir (char const *path, longlong *size) +{ + int ret = -1; + int dirfd = open (path,O_RDONLY); // A handle to speed up + // chdir + if (dirfd == -1){ + fprintf (stderr,"Can't open directory %s (%s)\n",path + ,strerror(errno)); + }else{ + DIR *dir; + + fchdir (dirfd); + dir = opendir ("."); + if (dir == NULL){ + fprintf (stderr,"Can't open (opendir) directory %s (%s)\n",path + ,strerror(errno)); + }else{ + struct stat dirst; + struct dirent *ent; + longlong dirsize = 0; + + ret = 0; + lstat (".",&dirst); + while ((ent=readdir(dir))!=NULL){ + struct stat st; + if (lstat(ent->d_name,&st)==-1){ + fprintf (stderr,"Can't stat %s/%s (%s)\n",path + ,ent->d_name,strerror(errno)); + ret = -1; + break; + }else if (S_ISREG(st.st_mode)){ + if (st.st_nlink == 1){ + dirsize += st.st_size; + } + }else if (S_ISDIR(st.st_mode) && st.st_dev == dirst.st_dev){ + if (strcmp(ent->d_name,".")!=0 + && strcmp(ent->d_name,"..")!=0){ + char *tmp = malloc(strlen(path) + strlen(ent->d_name) + 2); + if (tmp==0) ret=-1; + else { + strcpy(tmp, path); + strcat(tmp, "/"); + strcat(tmp, ent->d_name); + ret = vdu_onedir(tmp,&dirsize); + free(tmp); + fchdir (dirfd); + } + } + } + } + closedir (dir); + *size += dirsize; + } + close (dirfd); + } + return ret; +} + +int main (int argc, char *argv[]) +{ + int ret = -1; + if (argc < 2){ + fprintf (stderr,"vdu version %s\n",VERSION); + fprintf (stderr,"vdu directory ...\n\n"); + fprintf (stderr + ,"Compute the size of a directory tree, ignoring files\n" + "with more than one link.\n"); + }else{ + int i; + + ret = 0; + for (i=1; i> 10; + printf ("%s\t%ldK\n",argv[i],ksize); + } + } + return ret; +} + diff --git a/src/vfiles.cc b/src/vfiles.cc new file mode 100644 index 0000000..7d5f65d --- /dev/null +++ b/src/vfiles.cc @@ -0,0 +1,146 @@ +// $Id: vfiles.cc,v 1.1 2003/09/29 22:01:57 ensc Exp $ + +// Copyright (C) 2003 Enrico Scholz +// based on vfiles.cc by Jacques Gelinas +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +/* + This utility is used to extract the list of non unified files in + a vserver. +*/ +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include "vutil.h" + +using namespace std; + +static bool ignorelink = false; + + +static void usage() +{ + cerr << + "vfiles version " << VERSION << + "\n\n" + "vfiles [ options ] reference-server vserver\n" + "\n" + "--debug: Prints some debugging messages.\n" + "--ignorelink: Do not print symbolic links (they are never unified)\n" + "\n" + ; +} + + +static int vfiles_walk ( + string absdir, + dev_t dev, // We stay on the same volume + string logical_dir, + set &files) +{ + int ret = -1; + if (debug > 0) printf ("Entering directory %s\n",logical_dir.c_str()); + DIR *dir = opendir (absdir.c_str()); + if (dir == NULL){ + fprintf (stderr,"Can't open directory %s (%s)\n",absdir.c_str() + ,strerror(errno)); + }else{ + struct dirent *ent; + ret = 0; + while (ret == 0 && (ent=readdir(dir))!=NULL){ + if (strcmp(ent->d_name,".")==0 || strcmp(ent->d_name,"..")==0){ + continue; + } + string file = absdir + "/" + ent->d_name; + struct stat st; + if (vutil_lstat(file,st) == -1){ + ret = -1; + }else if (st.st_dev != dev){ + if (debug > 0) printf ("Ignore sub-directory %s\n",file.c_str()); + }else{ + if (S_ISDIR(st.st_mode)){ + ret |= vfiles_walk (file,dev + ,logical_dir + "/" + ent->d_name,files); + }else if (S_ISLNK(st.st_mode)){ + if (!ignorelink) printf ("%s\n",file.c_str()); + }else if (S_ISBLK(st.st_mode) + || S_ISCHR(st.st_mode) + || S_ISFIFO(st.st_mode)){ + printf ("%s\n",file.c_str()); + }else if (S_ISSOCK(st.st_mode)){ + // Do nothing + }else{ + // Ok, this is a file. We either copy it or do a link + string logical_file = logical_dir + "/" + ent->d_name; + if (files.find (logical_file)==files.end()){ + printf ("%s\n",file.c_str()); + } + } + } + } + closedir(dir); + } + return ret; +} + +int main (int argc, char *argv[]) +{ + int ret = -1; + int i; + for (i=1; i packages; + // Load the files which are not configuration files from + // the packages + vutil_loadallpkg (refserv,packages); + set files; + for (list::iterator it=packages.begin(); it!=packages.end(); it++){ + (*it).loadfiles(refserv,files); + } + struct stat st; + if (vutil_lstat(newserv,st)!=-1){ + // Now, we do a recursive walk of newserv and prints + // all files not unifiable + ret = vfiles_walk (newserv,st.st_dev,"",files); + } + } + return ret; +} + + + diff --git a/src/vkill.c b/src/vkill.c new file mode 100644 index 0000000..aeabb08 --- /dev/null +++ b/src/vkill.c @@ -0,0 +1,229 @@ +// $Id: vkill.c,v 1.1.2.2 2003/12/30 13:49:17 ensc Exp $ --*- c -*-- + +// Copyright (C) 2003 Enrico Scholz +// +// 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; version 2 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +#ifdef HAVE_CONFIG_H +# include +#endif +#include "compat.h" + +#include "vserver.h" +#include "linuxvirtual.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define VERSION_COPYRIGHT_DISCLAIMER + +#define CMD_HELP 0x8000 +#define CMD_VERSION 0x8001 + +#define WRITE_MSG(FD,X) (void)(write(FD,X,sizeof(X)-1)) +#define WRITE_STR(FD,X) writeStr(FD,X) + +static struct option const +CMDLINE_OPTIONS[] = { + { "help", no_argument, 0, CMD_HELP }, + { "version", no_argument, 0, CMD_VERSION }, + { 0,0,0,0 } +}; + +struct Arguments +{ + xid_t ctx; + int sig; +}; + +static char const * const SIGNALS[] = { + // 0 1 2 3 4 5 6 7 + "UNUSED", "HUP", "INT", "QUIT", "ILL", "TRAP", "ABRT", "UNUSED", + "FPE", "KILL", "USR1", "SEGV", "USR2", "PIPE", "ALRM", "TERM", + "STKFLT", "CHLD", "CONT", "STOP", "TSTP", "TTIN", "TTOU", "IO", + "XCPU", "XFSZ", "VTALRM", "PROF", "WINCH", + 0, +}; + +inline static void UNUSED +writeStr(int fd, char const *cmd) +{ + (void)write(fd, cmd, strlen(cmd)); +} + +static void +showHelp(int fd, char const *cmd, int res) +{ + WRITE_MSG(fd, "Usage: "); + WRITE_STR(fd, cmd); + WRITE_MSG(fd, + " [-c ] [-s ] [--] *\n" + "Please report bugs to " PACKAGE_BUGREPORT "\n"); + exit(res); +} + +static void +showVersion() +{ + WRITE_MSG(1, + "vkill " VERSION " -- sends signals to processes within other contexts\n" + "This program is part of " PACKAGE_STRING "\n\n" + "Copyright (C) 2003 Enrico Scholz\n" + VERSION_COPYRIGHT_DISCLAIMER); + exit(0); +} + +static int +str2sig(char const *str) +{ + char *errptr; + int res = strtol(str, &errptr, 10); + + if (*errptr!='\0') res=-1; + if (res==-1 && strncmp(str,"SIG",3)==0) str+=3; + if (res==-1) { + char const * const *ptr = SIGNALS; + for (;*ptr!=0; ++ptr) { + if (strcmp(*ptr,str)!=0) continue; + res = ptr-SIGNALS; + break; + } + } + + return res; +} + +#if defined(VC_ENABLE_API_LEGACY) +inline static ALWAYSINLINE int +kill_wrapper_legacy(xid_t ctx, char const *proc, int sig) +{ + pid_t pid = fork(); + if (pid==-1) { + perror("fork()"); + exit(1); + } + else if (pid==0) { + int status; + int res; + while ((res=wait4(pid, &status, 0,0))==-1 && + (errno==EAGAIN || errno==EINTR)) {} + + return (res==0 && WIFEXITED(status) && WEXITSTATUS(status)) ? 0 : 1; + } + + execl(LEGACYDIR "/vkill", "legacy/vkill", proc, (void *)(0)); + perror("execl()"); + exit(1); +} + +static int +kill_wrapper(xid_t ctx, char const *pid, int sig) +{ + //printf("kill_wrapper(%u, %s, %i)\n", ctx, pid, sig); + if (vc_ctx_kill(ctx,atoi(pid),sig)==-1) { + int err = errno; + if (vc_get_version(VC_CAT_COMPAT)==-1) + return kill_wrapper_legacy(ctx, pid, sig); + else { + errno = err; + perror("vc_ctx_kill()"); + return 1; + } + } + + return 0; +} +#else // VC_ENABLE_API_LEGACY +inline static int +kill_wrapper(xid_t ctx, char const *pid, int sig) +{ + if (vc_ctx_kill(ctx,atoi(pid),sig)==-1) { + perror("vc_ctx_kill()"); + return 1; + } + return 0; +} +#endif + + +int main(int argc, char *argv[]) +{ + int fail = 0; + struct Arguments args = { + .ctx = VC_NOCTX, + .sig = SIGTERM, + }; + + while (1) { + int c = getopt_long(argc, argv, "c:s:", CMDLINE_OPTIONS, 0); + if (c==-1) break; + + switch (c) { + case CMD_HELP : showHelp(1, argv[0], 0); + case CMD_VERSION : showVersion(); + case 'c' : args.ctx = atoi(optarg); break; + case 's' : args.sig = str2sig(optarg); break; + default : + WRITE_MSG(2, "Try '"); + WRITE_STR(2, argv[0]); + WRITE_MSG(2, " --help\" for more information.\n"); + return EXIT_FAILURE; + break; + } + } + + if (args.sig==-1) { + WRITE_MSG(2, "Invalid signal specified\n"); + return EXIT_FAILURE; + } + + if (args.ctx==VC_NOCTX && optind==argc) { + WRITE_MSG(2, "No pid specified\n"); + return EXIT_FAILURE; + } + + if (optind==argc) + fail += kill_wrapper(args.ctx, "0", args.sig); + else for (;optind +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +/* + Set the global per context limit of a resource (memory, file handle). + This utility can do it either for the current context or a selected + one. + + It uses the same options as ulimit, when possible +*/ +#ifdef HAVE_CONFIG_H +# include +#endif +#include "compat.h" + +#include "vserver.h" +#include "vserver-internal.h" + +#include +#include +#include +#include +#include +#include + +#define VERSION_COPYRIGHT_DISCLAIMER + +inline static void UNUSED +writeStr(int fd, char const *cmd) +{ + (void)write(fd, cmd, strlen(cmd)); +} + +#define WRITE_MSG(FD,X) (void)(write(FD,X,sizeof(X)-1)) +#define WRITE_STR(FD,X) writeStr(FD,X) + +#define NUMLIM(X) \ +{ #X, required_argument, 0, 2048|X } + +static struct option const +CMDLINE_OPTIONS[] = { + { "help", no_argument, 0, 'h' }, + { "version", no_argument, 0, 'v' }, + { "all", no_argument, 0, 'a' }, + NUMLIM( 0), NUMLIM( 1), NUMLIM( 2), NUMLIM( 3), + NUMLIM( 4), NUMLIM( 5), NUMLIM( 6), NUMLIM( 7), + NUMLIM( 8), NUMLIM( 9), NUMLIM(10), NUMLIM(11), + NUMLIM(12), NUMLIM(13), NUMLIM(14), NUMLIM(15), + NUMLIM(16), NUMLIM(17), NUMLIM(18), NUMLIM(19), + NUMLIM(20), NUMLIM(21), NUMLIM(22), NUMLIM(23), + NUMLIM(24), NUMLIM(25), NUMLIM(26), NUMLIM(27), + NUMLIM(28), NUMLIM(29), NUMLIM(30), NUMLIM(31), + { 0,0,0,0 } +}; + +static void +showHelp(int fd, char const *cmd, int res) +{ + WRITE_MSG(fd, "Usage: "); + WRITE_STR(fd, cmd); + WRITE_MSG(fd, + " [-c|--ctx ] [-a|--all] [-MSH -- ]*\n" + "Please report bugs to " PACKAGE_BUGREPORT "\n"); + exit(res); +} + +static void +showVersion() +{ + WRITE_MSG(1, + "vlimit " VERSION " -- limits context-resources\n" + "This program is part of " PACKAGE_STRING "\n\n" + "Copyright (C) 2003 Enrico Scholz\n" + VERSION_COPYRIGHT_DISCLAIMER); + exit(0); +} + +static void * +appendLimit(char *ptr, bool do_it, vc_limit_t lim) +{ + memcpy(ptr, " ", 2); + ptr += 2; + if (do_it) { + if (lim==VC_LIM_INFINITY) { + strcpy(ptr, "INF"); + ptr += 3; + } + else { + memcpy(ptr, "0x", 2); + ptr += 2; + + ptr += utilvserver_uint2str(ptr, 20, (lim>>32), 16); + ptr += utilvserver_uint2str(ptr, 20, lim&0xffffffff, 16); + *ptr = ' '; + } + } + else { + memcpy(ptr, "N/A", 3); + ptr += 3; + } + + return ptr; +} + +static void +showAll(int ctx) +{ + struct vc_rlimit_mask mask; + size_t i; + + if (vc_get_rlimit_mask(-2, &mask)==-1) { + perror("vc_get_rlimit_mask()"); + //exit(1); + } + + for (i=0; i<32; ++i) { + uint32_t bitmask = (1< +// based on vreboot.cc by Jacques Gelinas +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +/* + Used to send a reboot message to the reboot manager. It opens /dev/reboot + and write "reboot\n". +*/ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + Connect to a unix domain socket +*/ +static int vreboot_connect (const char *sockpath, bool showerror) +{ + int ret = -1; + int fd = socket (AF_UNIX,SOCK_STREAM,0); + if (fd == -1){ + if (showerror) perror("socket client"); + }else{ + struct sockaddr_un un; + int s; + + un.sun_family = AF_UNIX; + strcpy (un.sun_path,sockpath); + s = connect(fd,(struct sockaddr*)&un,sizeof(un)); + if (s == -1){ + if (showerror) fprintf (stderr,"connect %s (%s)\n" + ,sockpath,strerror(errno)); + }else{ + ret = fd; + } + } + return ret; +} + +static void usage() +{ + fprintf (stderr,"vreboot version %s\n",VERSION); + fprintf (stderr,"\n"); + fprintf (stderr,"vreboot [ --socket path ]\n"); + fprintf (stderr,"vhalt [ --socket path ]\n"); + fprintf (stderr,"vreboot request a reboot or a halt of a virtual server\n"); +} + +int main (int argc, char *argv[]) +{ + int ret = -1; + int i; + const char *sockpath = "/dev/reboot"; + for (i=1; i +// based on vserver-stat.cc by Guillaum Dallaire and Jacques Gelinas +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +/* + vserver-stat help you to see all the active context currently in the kernel + with some useful stat + + Changelog: + + 2003-01-08 Jacques Gelinas: Shows vserver description + 2002-02-28 Jacques Gelinas: Use dynamic system call + 2002-06-05 Martial Rioux : fix memory output error + 2002-12-05 Martial Rioux : fix output glitch + 2001-11-29 added uptime/ctx stat + 2001-11-20 added vmsize, rss, stime and utime stat +*/ + +#ifdef HAVE_CONFIG_H +# include +#endif +#include "compat.h" + +#include "vserver.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define PROC_DIR_NAME "/proc" +#define CTX_DIR_NAME "/var/run/vservers/" +#define CTX_NAME_MAX_LEN 50 + +struct ctx_list +{ + int ctx; + int process_count; + int VmSize_total; + int VmRSS_total; + long start_time_oldest; + long stime_total, utime_total; + char name[CTX_NAME_MAX_LEN]; + struct ctx_list *next; +} *my_ctx_list; + +struct process_info +{ + long VmSize; // number of pages of virtual memory + long VmRSS; // resident set size from /proc/#/stat + long start_time; // start time of process -- seconds since 1-1-70 + long stime, utime; // kernel & user-mode CPU time accumulated by process + long cstime, cutime; // cumulative time of process and reaped children + int s_context; +}; + +char *process_name; + +void usage() +{ + fprintf(stderr, "%s: from vserver kit version %s\n", process_name, VERSION); + fprintf(stderr, "(no argument needed)\n\n"); + fprintf(stderr, "Show informations about all the active context.\n\n"); + fprintf(stderr, " CTX# Context number\n"); + fprintf(stderr, " #0 = root context\n"); + fprintf(stderr, " #1 = monitoring context\n"); + fprintf(stderr, " PROC QTY Quantity of processes in each context\n"); + fprintf(stderr, " VSZ Number of pages of virtual memory\n"); + fprintf(stderr, " RSS Resident set size\n"); + fprintf(stderr, " userTIME User-mode CPU time accumulated\n"); + fprintf(stderr, " sysTIME Kernel-mode CPU time accumulated\n"); + fprintf(stderr, " UPTIME Uptime/context\n"); + fprintf(stderr, " NAME Virtual server name\n"); + fprintf(stderr, "\n"); + +} + +// return uptime (in ms) from /proc/uptime +long get_uptime() +{ + int fd; + double up; + char buffer[64]; + + // open the /proc/uptime file + if ((fd = open("/proc/uptime", O_RDONLY, 0)) == -1) + return 0; + + if (read(fd, buffer, sizeof(buffer)) < 1) + return 0; + + close(fd); + + if (sscanf(buffer, "%lf", &up) < 1) + { + fprintf(stderr, "%s: bad data in /proc/uptime\n", process_name); + return 0; + } + + return up * 100; +} + +// insert a new record to the list +struct ctx_list *insert_ctx(int ctx, struct ctx_list *next) +{ + struct ctx_list *new; + + new = (struct ctx_list *)malloc(sizeof(struct ctx_list)); + new->ctx = ctx; + new->process_count = 0; + new->VmSize_total = 0; + new->VmRSS_total = 0; + new->utime_total = 0; + new->stime_total = 0; + new->start_time_oldest = 0; + new->next = next; + new->name[0] = '\0'; + + return new; +} + +// find the ctx record with the ctx number +struct ctx_list *find_ctx(struct ctx_list *list, int ctx) +{ + // very simple search engine... + while(list != NULL) + { + // find + if (list->ctx == ctx) + { + return list; + } + list = list->next; + } + return NULL; +} + +// compute the process info into the list +void add_ctx(struct ctx_list *list, struct process_info *process) +{ + list->process_count ++; + list->VmSize_total += process->VmSize; + list->VmRSS_total += process->VmRSS; + list->utime_total += process->utime + process->cutime; + list->stime_total += process->stime + process->cstime; + + if (list->start_time_oldest == 0) // first entry + list->start_time_oldest = process->start_time; + else + if (list->start_time_oldest > process->start_time) + list->start_time_oldest = process->start_time; +} + +// increment the count number in the ctx record using ctx number +void count_ctx(struct ctx_list *list, struct process_info *process) +{ + struct ctx_list *prev = list; + + if (process == NULL) return; + + // search + while(list != NULL) + { + // find + if (list->ctx == process->s_context) + { + add_ctx(list, process); + return; + } + // insert between + if (list->ctx > process->s_context) + { + prev->next = insert_ctx(process->s_context, list); + add_ctx(prev->next, process); + return; + } + // ++ + prev = list; + list = list->next; + } + // add at the end + prev->next = insert_ctx(process->s_context, NULL); + add_ctx(prev->next, process); +} + +// free mem +void free_ctx(struct ctx_list *list) +{ + struct ctx_list *prev; + + for(;list != NULL; list = prev) + { + prev = list->next; + free(list); + } +} + +/* + Read the vserver description +*/ +static void read_description( + const char *name, // Vserver name + char descrip[1000]) +{ + char conf[PATH_MAX]; + FILE *fin; + descrip[0] = '\0'; + snprintf (conf,sizeof(conf)-1,"/etc/vservers/%s.conf",name); + fin = fopen (conf,"r"); + if (fin != NULL){ + char line[1000]; + while (fgets(line,sizeof(line)-1,fin)!=NULL){ + if (line[0] == '#'){ + char *pt = line+1; + while (isspace(*pt)) pt++; + if (strncmp(pt,"Description:",12)==0){ + int last; + pt += 12; + while (isspace(*pt)) pt++; + strcpy (descrip,pt); + last = strlen(descrip)-1; + if (last >=0 && descrip[last] == '\n'){ + descrip[last] = '\0'; + } + } + } + } + fclose (fin); + } +} + +// show the ctx_list with name from /var/run/servers/*.ctx +void show_ctx(struct ctx_list *list) +{ + // fill the ctx_list using the /var/run/servers/*.ctx file(s) + __extension__ int bind_ctx_name(struct ctx_list *list) + { + // fetch the context number in /var/run/vservers/'filename' + int fetch_ctx_number(char *filename) + { + int fd; + int ctx; + char buf[25]; + + // open file + if ((fd = open(filename, O_RDONLY, 0)) == -1) + return -1; + // put the file in a small buffer + if (read(fd, buf, sizeof(buf)) < 1) + return -1; + + close(fd); + + sscanf(buf, "S_CONTEXT=%d", &ctx); + return ctx; + } + + /* begin bind_ctx_name */ + + DIR *ctx_dir; + struct dirent *dir_entry; + char *p; + char ctx_name[CTX_NAME_MAX_LEN]; + struct ctx_list *ctx; + int ctx_number; + + // open the /var/run/vservers directory + if ((ctx_dir = opendir(CTX_DIR_NAME)) == NULL) + { + fprintf(stderr, "%s: in openning %s: %s\n", process_name, CTX_DIR_NAME, strerror(errno)); + return -1; + } + + chdir(CTX_DIR_NAME); + while ((dir_entry = readdir(ctx_dir)) != NULL) + { + strncpy(ctx_name, dir_entry->d_name, sizeof(ctx_name)); + p = strstr(ctx_name, ".ctx"); + if (p != NULL) // make sure that it is a .ctx file.. + { + *p = '\0'; // remove the .ctx in the file name + if ((ctx_number = fetch_ctx_number(dir_entry->d_name)) > 1) + { + if ((ctx = find_ctx(list, ctx_number)) != NULL) + strncpy(ctx->name, ctx_name, CTX_NAME_MAX_LEN); + } + } + // else fprintf(stderr, "invalid file %s in %s\n", dir_entry->d_name, CTX_DIR_NAME); + } + closedir(ctx_dir); + return 0; + } + + __extension__ char *convert_time(unsigned t, char *str) + { + unsigned hh, mm, ss, ms; + + ms = t % 100; + t /= 100; + + ss = t%60; + t /= 60; + mm = t%60; + t /= 60; + hh = t%60; + t /= 24; + + if (t > 0) // day > 0 + { + snprintf(str, 25, "%3.ud%02uh%02u", t, (hh%12) ? hh%12 : 12, mm); + } + else + { + if (hh > 0) // hour > 0 + snprintf(str, 25, " %2.uh%02um%02u", hh, mm, ss); + else + { + snprintf(str, 25, " %2.um%02u.%02u", mm, ss, ms); + } + } + return str; + } + + __extension__ char *convert_mem(unsigned long total, char *str) + { + // Byte + if (total < 1024) + { + snprintf(str, 25, "%luB", total); + return str; + } + + total >>= 10; // kByte + if (total < 1024) + { + snprintf(str, 25, "%lukB", total); + return str; + } + + total >>= 10; // MByte + if (total < 1024) + { + snprintf(str, 25, "%luMB", total); + return str; + } + + total >>= 10; // GByte + if (total < 1024) + { + snprintf(str, 25, "%luGB", total); + return str; + } + total >>= 10; // TByte + snprintf(str, 25, "%luTB", total); + return str; + } + + /* begin show_ctx */ + char utime[25], stime[25], ctx_uptime[25]; + char vmsize[25], vmrss[25]; + long uptime = get_uptime(); + + // now we have all the active context, fetch the name + // from /var/run/vservers/*.ctx + bind_ctx_name(list); + + printf("CTX PROC VSZ RSS userTIME sysTIME UPTIME NAME DESCRIPTION\n"); + while(list != NULL) + { + char descrip[1000]; + if (list->ctx == 1) + strncpy(list->name, "monitoring server", CTX_NAME_MAX_LEN); + + read_description (list->name,descrip); + + printf("%-4d %4d %6s %6s %9s %9s %9s %-8s %s\n", list->ctx, list->process_count, + convert_mem(list->VmSize_total, vmsize), convert_mem(list->VmRSS_total, vmrss), + convert_time(list->utime_total, utime), convert_time(list->stime_total, stime), convert_time(uptime - list->start_time_oldest, ctx_uptime) + , list->name,descrip); + list = list->next; + } +} + +// open the process's status file to get the ctx number, and other stat +struct process_info *get_process_info(char *pid) +{ + int fd; + char buffer[1024]; + char *p; + static struct process_info process; + + // open the proc/#/status file + snprintf(buffer, sizeof(buffer), "/proc/%s/status", pid); + if ((fd = open(buffer, O_RDONLY, 0)) == -1) + return NULL; + // put the file in a buffer + if (read(fd, buffer, sizeof(buffer)) < 1) + return NULL; + + close(fd); + + // find the s_context entry + if ((p = strstr(buffer, "s_context:")) == NULL) + return NULL; + + sscanf(p, "s_context: %d", &process.s_context); + + // open the /proc/#/stat file + snprintf(buffer, sizeof(buffer), "/proc/%s/stat", pid); + if ((fd = open(buffer, O_RDONLY, 0)) == -1) + return NULL; + // put the file in a buffer + if (read(fd, buffer, sizeof(buffer)) < 1) + return NULL; + + close(fd); + + p = strchr(buffer, ')'); // go after the PID (process_name) + sscanf(p + 2, + "%*s " + "%*s %*s %*s %*s %*s " + "%*s %*s %*s %*s %*s %ld %ld " + "%ld %ld %*s %*s %*s %*s " + "%ld %ld " + "%ld ", &process.utime, &process.stime, + &process.cutime, &process.cstime, + &process.start_time, + &process.VmSize, &process.VmRSS); + + return &process; +} + +int main(int argc, char **argv) +{ + DIR *proc_dir; + struct dirent *dir_entry; + pid_t my_pid; + + // for error msg + process_name = argv[0]; + + if (argc > 1) + { + usage(); + return 0; + } + + // do not include own stat + my_pid = getpid(); + + // try to switch in context 1 + if (vc_new_s_context(1,0, 0) < 0) + { + fprintf(stderr, "%s: unable to switch in context security #1\n", process_name); + return -1; + } + + // create the fist... + my_ctx_list = insert_ctx(0, NULL); + // init with the default name for the context 0 + strncpy(my_ctx_list->name, "root server", CTX_NAME_MAX_LEN); + + // open the /proc dir + if ((proc_dir = opendir(PROC_DIR_NAME)) == NULL) + { + fprintf(stderr, "%s: %s\n", process_name, strerror(errno)); + return -1; + } + + chdir(PROC_DIR_NAME); + while ((dir_entry = readdir(proc_dir)) != NULL) + { + // select only process file + if (!isdigit(*dir_entry->d_name)) + continue; + + if (atoi(dir_entry->d_name) != my_pid) + count_ctx(my_ctx_list, get_process_info(dir_entry->d_name)); + + } + closedir(proc_dir); + + // output the ctx_list + show_ctx(my_ctx_list); + + // free the ctx_list + free_ctx(my_ctx_list); + + return 0; +} diff --git a/src/vunify.cc b/src/vunify.cc new file mode 100644 index 0000000..2b0cac9 --- /dev/null +++ b/src/vunify.cc @@ -0,0 +1,388 @@ +// $Id: vunify.cc,v 1.1.4.1 2003/10/30 15:16:30 ensc Exp $ + +// Copyright (C) 2003 Enrico Scholz +// based on vunify.cc by Jacques Gelinas +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +/* + This utility is used to unify (using hard links) two or more + virtual servers. + It compares the each vserver with the first one and for every + common package (RPM, same version), it does a hard link on non + configuration file. It turns the file immutable after that. +*/ +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include "vutil.h" + +using namespace std; + +static bool undo = false; + +static int ext2flags = EXT2_IMMUTABLE_FILE_FL | EXT2_IMMUTABLE_LINK_FL; +struct EXCLDIR{ + string prefix; + int len; + EXCLDIR(const char *s) + { + prefix = s; + prefix += '/'; + len = prefix.size(); + } +}; +static vector excldirs; +static vector incldirs; + + +static void usage() +{ + cerr << + "vunify version " << VERSION << + "\n\n" + "vunify [ options ] reference-server vservers ... -- packages\n" + "vunify [ options ] reference-server vservers ... -- ALL\n" + "\n" + "--test: Show what will be done, do not do it.\n" + "--undo: Put back the file in place, using copies from the\n" + " reference server.\n" + "--debug: Prints some debugging messages.\n" + "--noflags: Do not put any immutable flags on the file\n" + "--immutable: Set the immutable_file bit on the files.\n" + "--immutable-mayunlink: Sets the immutable_link flag on files.\n" + "\n" + "--excldir: None of the files under a given directory will be unified\n" + "\tThe directory is expressed in absolute/logical form (relative\n" + "\tto the vserver root (ex: /var/log)\n" + "\n" + "--incldir: All the files under a given directory will be unified\n" + "\tThe directory is expressed in absolute/logical form (relative\n" + "\tto the vserver root (ex: /var/log)\n" + "\n" + "By default, the immutable_file and immutable_link flags are\n" + "set on the files. So if you want no immutable flags, you must\n" + "use --noflags. If you want a single flag, you must use\n" + "--noflags first, then the --immutable or --immutable-mayunlink\n" + "flag.\n" + ; +} + +static bool vunify_inside (vector &dirs, const char *path) +{ + bool found = false; + for (unsigned i=0; i files; // Files to unify + // This is loaded on demand + PACKAGE_UNI(string &_name, string &_version) + : PACKAGE(_name,_version) + { + } + PACKAGE_UNI(const char *_name, const char *_version) + : PACKAGE (_name,_version) + { + } + PACKAGE_UNI(const string &line) + : PACKAGE (line) + { + } + // Load the file member of the package, but exclude configuration file + void loadfiles(const string &ref) + { + if (files.empty()){ + if (debug) cout << "Loading files for package " << name << endl; + string namever; + namever = name + '-' + version; + FILE *fin = vutil_execdistcmd (K_UNIFILES,ref,namever.c_str()); + if (fin != NULL){ + char tmp[1000]; + while (fgets(tmp,sizeof(tmp)-1,fin)!=NULL){ + int last = strlen(tmp)-1; + if (last >= 0 && tmp[last] == '\n') tmp[last] = '\0'; + bool must_unify = false; + int type = 0; // K_UNIFILES only report unify-able files + if(type == 0 && !vunify_inside(excldirs,tmp)){ + must_unify = true; + }else if(vunify_inside(incldirs,tmp)){ + must_unify = true; + } + if (must_unify){ + files.push_front (tmp); + }else if (debug){ + cout << "Package " << name << " exclude " << tmp << endl; + } + } + } + if (debug) cout << "Done\n"; + } + } +}; + + +static ostream & operator << (ostream &c, const PACKAGE_UNI &p) +{ + return c << p.name << "-" << p.version; +} + +template + void printit(T a){ + cout << "xx " << a << endl; + } + +template + class printer{ + string title; + public: + printer (const char *_title): title(_title){} + void operator()(T a){ + cout << title << " " << a << endl; + } + }; + + +/* + Load the list of all packages in a vserver +*/ +static void vunify_loadallpkg (string &refserver, list &packages) +{ + FILE *fin = vutil_execdistcmd (K_PKGVERSION,refserver,NULL); + if (fin != NULL){ + char line[1000]; + while (fgets(line,sizeof(line)-1,fin)!=NULL){ + // fprintf (stderr,"line: %s",line); + int last = strlen(line)-1; + if (last >= 0 && line[last] == '\n') line[last] = '\0'; + packages.push_back (PACKAGE_UNI(line)); + } + pclose (fin); + } +} + +/* + Object to unify a file + The file is first removed, then a hard link is made and then + the immutable flag is done +*/ +class file_unifier{ + string &ref_server,&target_server; + int &ret; + public: + file_unifier(string &_ref, string &_target, int &_ret) + : ref_server(_ref),target_server(_target), ret(_ret) + {} + void operator()(const string &file) + { + string refpath = VROOTDIR "/" + ref_server + file; + string dstpath = VROOTDIR "/" + target_server + file; + if (debug) cout << "Unify " << refpath << " -> " << dstpath << endl; + struct stat st; + if (stat(refpath.c_str(),&st)==-1){ + if (debug) cout << "File " << refpath << " does not exist, ignored\n"; + }else if (setext2flag(refpath.c_str(),false,ext2flags)==-1){ + ret = -1; + }else if (vbuild_unlink(dstpath.c_str())==-1){ + ret = -1; + cerr << "Can't delete file " << dstpath + << " (" << strerror(errno) << ")\n"; + }else{ + if (undo){ + if (vbuild_file_copy(refpath.c_str(),dstpath.c_str(),st)==-1){ + ret = -1; + cerr << "Can't copy file " << refpath << " to " << dstpath + << " (" << strerror(errno) << ")\n"; + } + }else{ + if (vbuild_link(refpath.c_str(),dstpath.c_str())==-1){ + ret = -1; + cerr << "Can't link file " << refpath << " to " << dstpath + << " (" << strerror(errno) << ")\n"; + } + } + // We put back the original immutable because other vservers + // may be unified on it. + if (setext2flag(refpath.c_str(),true,ext2flags)==-1){ + ret = -1; + } + } + } +}; +#if 0 +// Check if two package have the same name (but potentially different version) +class same_name{ + PACKAGE_UNI &pkg; +public: + same_name(PACKAGE_UNI &_pkg) : pkg(_pkg) {} + bool operator()(const PACKAGE_UNI &p) + { + return pkg.name == p.name; + } +}; +#endif +// Predicate to decide if a package must be unified +class package_unifier{ +public: + string &ref_server,&target_server; + list &target_packages; + int &ret; + package_unifier(string &_ref, + string &_target, + list &_target_packages, + int &_ret) + : ref_server(_ref),target_server(_target) + , target_packages(_target_packages) , ret(_ret) + {} + void operator()(PACKAGE_UNI &pkg) + { + if (find(target_packages.begin(),target_packages.end(),pkg) + !=target_packages.end()){ + // Ok, the package is also in the target vserver + cout << "Unify pkg " << pkg << " from " << ref_server << " to " + << target_server << endl; + + if (!testmode || debug){ + pkg.loadfiles(ref_server); + for_each (pkg.files.begin(),pkg.files.end() + ,file_unifier(ref_server,target_server,ret)); + } + }else if (testmode){ + // The package is missing, in test mode we provide more information + if (find_if(target_packages.begin(),target_packages.end(),same_name(pkg)) + !=target_packages.end()){ + cout << pkg << " exist in server " << target_server << " not unified\n"; + }else{ + cout << pkg << " does not exist in server " << target_server << endl; + } + } + } +}; + +// For each vserver, find the common packages and unify them +class server_unifier{ +public: + list &ref_packages; + string &ref_server; + int &ret; + server_unifier(string _ref_server, list &_packages, int &_ret) + : ref_packages(_packages),ref_server(_ref_server), ret(_ret) + {} + void operator()(string serv) + { + list pkgs; + vunify_loadallpkg (serv,pkgs); + for_each(ref_packages.begin(),ref_packages.end() + ,package_unifier(ref_server,serv,pkgs,ret)); + } +}; +class deleteif{ +public: + char **argv0,**argvn; + deleteif(char **_argv0, char **_argvn): argv0(_argv0),argvn(_argvn){} + bool operator()(const PACKAGE_UNI &pkg) + { + bool found = false; + for (char **pt = argv0; pt < argvn; pt++){ + if (pkg.name == *pt){ + found = true; + break; + } + } + return !found; + } +}; + +int main (int argc, char *argv[]) +{ + int ret = -1; + int i; + for (i=1; i vservers; + for (; i("vservers")); + if (i == argc || strcmp(argv[i],"--")!=0){ + usage(); + }else{ + i++; + if (i < argc){ + list packages; + vunify_loadallpkg (refserv,packages); + if (i != argc-1 || strcmp(argv[i],"ALL")!=0){ + // We keep only the packages supplied on the command line + packages.remove_if(deleteif (argv+i,argv+argc)); + } + ret = 0; + umask (0); + for_each (vservers.begin(),vservers.end(),server_unifier(refserv,packages,ret)); + }else{ + usage(); + } + } + } + return ret; +} + + + + diff --git a/src/vutil.cc b/src/vutil.cc new file mode 100644 index 0000000..68bd4ea --- /dev/null +++ b/src/vutil.cc @@ -0,0 +1,275 @@ +// $Id: vutil.cc,v 1.1.4.2 2003/11/18 22:30:44 ensc Exp $ + +// Copyright (C) 2003 Enrico Scholz +// based on vutil.cc by Jacques Gelinas +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +#pragma implementation + +#ifdef HAVE_CONFIG_H +# include +#endif +#include "compat.h" + +#undef PACKAGE + +#include +#include +#include +#include +#include +#include +#include +#include +#include "vutil.h" +#include + +#include "ext2fs.h" + + +bool testmode; +int debug; + +int file_copy (const char *src, const char *dst, struct stat &st) +{ + int ret = -1; + FILE *fin = fopen (src,"r"); + if (fin == NULL){ + fprintf (stderr,"Can't open file %s (%s)\n",src,strerror(errno)); + }else{ + FILE *fout = fopen (dst,"w"); + if (fout == NULL){ + fprintf (stderr,"Can't open file %s (%s)\n",dst,strerror(errno)); + }else{ + char buf[8192]; + int len; + while ((len=fread(buf,1,sizeof(buf),fin))>0){ + fwrite (buf,1,len,fout); + } + fflush (fout); + ret = 0; + if (fchown (fileno(fout),st.st_uid,st.st_gid)==-1){ + fprintf (stderr,"Can't chown file %s (%s)\n" + ,dst,strerror(errno)); + ret = -1; + }else if (fchmod (fileno(fout),st.st_mode)==-1){ + fprintf (stderr,"Can't chmod file %s (%s)\n" + ,dst,strerror(errno)); + ret = -1; + } + fclose(fout); + struct utimbuf timbuf; + timbuf.modtime = st.st_mtime; + timbuf.actime = st.st_atime; + if (utime (dst,&timbuf)==-1){ + fprintf (stderr,"Can't set time stamp on file %s (%s)\n" + ,dst,strerror(errno)); + } + } + fclose (fin); + } + return ret; +} + +/* + Set the immutable flag on a file +*/ +int setext2flag (const char *fname, bool set, int ext2flags) +{ + int ret = -1; + if (testmode){ + ret = 0; + }else{ + int fd = open (fname,O_RDONLY); + if (fd == -1){ + fprintf (stderr,"Can't open file %s (%s)\n",fname + ,strerror(errno)); + }else{ + int flags = set ? ext2flags : 0; + ret = ioctl (fd,EXT2_IOC_SETFLAGS,&flags); + close (fd); + if (ret == -1){ + fprintf (stderr,"Can't %s immutable flag on file %s (%s)\n" + ,(set ? "set" : "unset") + ,fname + ,strerror(errno)); + } + } + } + return ret; +} + +int vbuild_mkdir (const char *path, mode_t mode) +{ + int ret = -1; + if (testmode){ + printf ("mkdir %s; chmod %o %s\n",path,mode,path); + ret = 0; + }else{ + ret = mkdir (path,mode); + if (ret == -1 && errno == EEXIST){ + struct stat st; + if (lstat(path,&st)!=-1 && S_ISDIR(st.st_mode)){ + ret = chmod (path,mode); + } + } + } + return ret; +} + +int vbuild_mknod(const char *path, mode_t mode, dev_t dev) +{ + int ret = -1; + if (testmode){ + printf ("mknod %s %o %02x:%02x\n",path,mode,major(dev),minor(dev)); + ret = 0; + }else{ + ret = mknod (path,mode,dev); + if (ret == -1 && errno == EEXIST){ + struct stat st; + lstat(path,&st); + if (lstat(path,&st)!=-1 + && (st.st_mode & S_IFMT) == (mode & S_IFMT) + && st.st_rdev == dev){ + ret = chmod (path,mode); + } + } + } + return ret; +} +int vbuild_symlink(const char *src, const char *dst) +{ + int ret = -1; + if (testmode){ + printf ("ln -s %s %s\n",src,dst); + ret = 0; + }else{ + ret = symlink (src,dst); + } + return ret; +} + +int vbuild_link(const char *src, const char *dst) +{ + int ret = -1; + if (testmode){ + printf ("ln %s %s\n",src,dst); + ret = 0; + }else{ + ret = link (src,dst); + } + return ret; +} + +int vbuild_unlink(const char *path) +{ + int ret = -1; + if (testmode){ + printf ("unlink %s\n",path); + ret = 0; + }else{ + ret = unlink (path); + } + return ret; +} + +int vbuild_chown(const char *path, uid_t uid, gid_t gid) +{ + int ret = -1; + if (testmode){ + printf ("chown %d.%d %s\n",uid,gid,path); + ret = 0; + }else{ + ret = chown (path,uid,gid); + } + return ret; +} + +int vbuild_file_copy( + const char *src, + const char *dst, + struct stat &st) +{ + int ret = -1; + if (testmode){ + printf ("cp -a %s %s\n",src,dst); + ret = 0; + }else{ + ret = file_copy (src,dst,st); + } + return ret; +} + +/* + Load the list of all packages in a vserver +*/ +void vutil_loadallpkg (string &refserver, list &packages) +{ + FILE *fin = vutil_execdistcmd (K_PKGVERSION,refserver,NULL); + if (fin != NULL){ + char line[1000]; + while (fgets(line,sizeof(line)-1,fin)!=NULL){ + int last = strlen(line)-1; + if (last >= 0 && line[last] == '\n') line[last] = '\0'; + packages.push_back (PACKAGE(line)); + } + pclose (fin); + } +} + +int vutil_lstat (string path, struct stat &st) +{ + int ret = 0; + if (lstat(path.c_str(),&st) == -1){ + fprintf (stderr,"Can't lstat file %s (%s)\n" + ,path.c_str(),strerror(errno)); + ret = -1; + } + return ret; +} + +const char K_PKGVERSION[]="pkgversion"; +const char K_DUMPFILES[]="dumpfiles"; +const char K_UNIFILES[]="unifiles"; + +FILE *vutil_execdistcmd (const char *key, const string &vserver, const char *args) +{ + string cmd = PKGLIBDIR "/distrib-info "; + cmd += vserver; + cmd += " "; + cmd += key; + if (args != NULL){ + cmd += " "; + cmd += args; + } + FILE *ret = popen (cmd.c_str(),"r"); + if (ret == NULL){ + fprintf (stderr,"Can't execute command %s\n",cmd.c_str()); + }else{ + #if 0 + char buf[1000]; + while (fgets(buf,sizeof(buf)-1,fin)!=NULL){ + int last = strlen(buf)-1; + if (last >= 0) buf[last] = '\0'; + ret = buf; + break; + } + pclose (fin); + #endif + } + return ret; +} + diff --git a/src/vutil.h b/src/vutil.h new file mode 100644 index 0000000..c567267 --- /dev/null +++ b/src/vutil.h @@ -0,0 +1,134 @@ +// $Id: vutil.h,v 1.1 2003/09/29 22:01:57 ensc Exp $ + +// Copyright (C) 2003 Enrico Scholz +// based on vutil.h by Jacques Gelinas +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +#pragma interface +#ifndef VUTIL_H +#define VUTIL_H + +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace std; + +extern int debug; +extern bool testmode; + +// Patch to help compile this utility on unpatched kernel source +#ifndef EXT2_IMMUTABLE_FILE_FL + #define EXT2_IMMUTABLE_FILE_FL 0x00000010 + #define EXT2_IMMUTABLE_LINK_FL 0x00008000 +#endif + + +FILE *vutil_execdistcmd (const char *, const string &, const char *); +extern const char K_DUMPFILES[]; +extern const char K_UNIFILES[]; +extern const char K_PKGVERSION[]; + +class PACKAGE{ +public: + string name; + string version; // version + release + PACKAGE(string &_name, string &_version) + : name (_name), version(_version) + { + } + PACKAGE(const char *_name, const char *_version) + : name (_name), version(_version) + { + } + PACKAGE(const string &line) + { + *this = line; + } + PACKAGE & operator = (const string &_line) + { + string line (_line); + string::iterator pos = find (line.begin(),line.end(),'='); + if (pos != line.end()){ + name = string(line.begin(),pos); + version = string(pos + 1,line.end()); + } + return *this; + } + PACKAGE (const PACKAGE &pkg) + { + name = pkg.name; + version = pkg.version; + } + bool operator == (const PACKAGE &v) const + { + return name == v.name && version == v.version; + } + bool operator < (const PACKAGE &v) const + { + bool ret = false; + if (name < v.name){ + ret = true; + }else if (name == v.name && version < v.version){ + ret = true; + } + return ret; + } + // Load the file member of the package, but exclude configuration file + void loadfiles(const string &ref, set &files) + { + if (debug > 2) cout << "Loading files for package " << name << endl; + string namever = name + '-' + version; + FILE *fin = vutil_execdistcmd (K_UNIFILES,ref,namever.c_str()); + if (fin != NULL){ + char tmp[1000]; + while (fgets(tmp,sizeof(tmp)-1,fin)!=NULL){ + int last = strlen(tmp)-1; + if (last >= 0 && tmp[last] == '\n') tmp[last] = '\0'; + files.insert (tmp); + } + } + if (debug > 2) cout << "Done\n"; + } + #if 0 + bool locate(const string &path) + { + return find (files.begin(),files.end(),path) != files.end(); + } + #endif +}; + +// Check if two package have the same name (but potentially different version) +class same_name{ + const PACKAGE &pkg; +public: + same_name(const PACKAGE &_pkg) : pkg(_pkg) {} + bool operator()(const PACKAGE &p) + { + return pkg.name == p.name; + } +}; + + +#include "vutil.p" + +#endif + diff --git a/src/vutil.p b/src/vutil.p new file mode 100644 index 0000000..32b5ce7 --- /dev/null +++ b/src/vutil.p @@ -0,0 +1,49 @@ +// $Id: vutil.p,v 1.1 2003/09/29 22:01:57 ensc Exp $ --*- c++ -*-- + +// Copyright (C) 2003 Enrico Scholz +// based on vutil.p by Jacques Gelinas +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +/* vutil.cc 11/04/2003 14.22.04 */ +int file_copy (const char *src, const char *dst, struct stat&st); +int setext2flag (const char *fname, bool set, int ext2flags); +int vbuild_mkdir (const char *path, mode_t mode); +int vbuild_mknod (const char *path, mode_t mode, dev_t dev); +int vbuild_symlink (const char *src, const char *dst); +int vbuild_link (const char *src, const char *dst); +int vbuild_unlink (const char *path); +int vbuild_chown (const char *path, uid_t uid, gid_t gid); +int vbuild_file_copy (const char *src, + const char *dst, + struct stat&st); +void vutil_loadallpkg (string&refserver, list&packages); +int vutil_lstat (string path, struct stat&st); +FILE *vutil_execdistcmd (const char *key, + const string&vserver, + const char *args); +/* syscall.cc 18/07/2003 09.50.10 */ +extern "C" int call_new_s_context (int nbctx, + int ctxs[], + int remove_cap, + int flags); +extern "C" int call_set_ipv4root (unsigned long ip[], + int nb, + unsigned long bcast, + unsigned long mask[]); +extern "C" int call_chrootsafe (const char *dir); +extern "C" int has_chrootsafe (void); +extern "C" int call_set_ctxlimit (int res, long limit); diff --git a/sysv/Makefile-files b/sysv/Makefile-files new file mode 100644 index 0000000..338a782 --- /dev/null +++ b/sysv/Makefile-files @@ -0,0 +1,59 @@ +## $Id: Makefile-files,v 1.1.4.2 2003/10/30 15:16:30 ensc Exp $ -*- makefile -*- + +## Copyright (C) 2003 Enrico Scholz +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2, or (at your option) +## any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +## + +sysv_XTRAS = sysv/rebootmgr.subst \ + sysv/v_gated.subst \ + sysv/v_httpd.subst \ + sysv/v_named.subst \ + sysv/v_portmap.subst \ + sysv/v_sendmail.subst \ + sysv/v_smb.subst \ + sysv/v_sshd.subst \ + sysv/v_xinetd.subst \ + sysv/vservers.subst + +sysv_GENSCRPTS = sysv/rebootmgr \ + sysv/v_gated \ + sysv/v_httpd \ + sysv/v_named \ + sysv/v_portmap \ + sysv/v_sendmail \ + sysv/v_smb \ + sysv/v_sshd \ + sysv/v_xinetd \ + sysv/vservers + +sysv_SCRPTS = $(sysv_GENSCRPTS) + +sysv_CFG = sysv/vservers.conf + + +sysv/%: sysv/%.subst + @mkdir -p $$(dirname '$@') + sed -e 's!/usr/lib/util-vserver!$(pkglibdir)!g; \ + s!^USR_SBIN=/usr/sbin$$!USR_SBIN=$(sbindir)!g; \ + s!^VROOTDIR=/vservers$$!VROOTDIR=$(vserverdir)!g; \ + ' '$<' >'$@.tmp' + if cmp -s '$<' '$@.tmp'; then \ + cp -p '$<' '$@'; \ + else \ + mv -f '$@.tmp' '$@'; \ + fi + -rm -f '$@.tmp' + @chmod a-w '$@' diff --git a/sysv/rebootmgr.subst b/sysv/rebootmgr.subst new file mode 100755 index 0000000..4ac9a25 --- /dev/null +++ b/sysv/rebootmgr.subst @@ -0,0 +1,63 @@ +#!/bin/sh +# chkconfig: - 98 10 +# description: The rebootmgr service is monitoring all virtual servers \ +# and restart them as need. Virtual servers are using \ +# the /sbin/vreboot command to talk with the reboot manager +# processname: rebootmgr +# config: /etc/vservers + +VROOTDIR=/vservers +USR_SBIN=/usr/sbin +PIDFILE=/var/run/rebootmgr.pid +# See how we were called. +case "$1" in + start) + echo "Starting the reboot manager" + cd /etc/vservers + VSERVERS= + for serv in *.conf + do + test -f "$serv" || continue + + serv=`basename $serv .conf` + if [ -d $VROOTDIR/$serv ] ; then + VSERVERS="$VSERVERS $serv" + fi + done + $USR_SBIN/rebootmgr --pidfile $PIDFILE $VSERVERS & + touch /var/lock/subsys/rebootmgr + ;; + stop) + echo "Stopping the reboot manager" + kill `cat $PIDFILE` + rm -f /var/lock/subsys/rebootmgr + rm -f $PIDFILE + ;; + restart) + $0 stop + $0 start + ;; + reload) + echo Not implemented + ;; + status) + if [ -f $PIDFILE ] ; then + if kill -0 `cat $PIDFILE` + then + echo rebootmgr is running + else + echo rebootmgr is NOT running + fi + fi + ;; + *) + echo "Usage: rebootmgr {start|stop|restart|reload|status}" + exit 1 +esac + +exit 0 + + + + + diff --git a/sysv/v_gated.subst b/sysv/v_gated.subst new file mode 100755 index 0000000..294857a --- /dev/null +++ b/sysv/v_gated.subst @@ -0,0 +1,13 @@ +#!/bin/sh +# chkconfig: - 32 75 +# description: Wrapper to start gated bound to a single IP + +# normally, you will need /etc/vservices/gated.conf +# with the following line +# IP=0.0.0.0 +# so gated is started without restriction even if you +# restart it from an ssh session, itself "chbounded" to a single +# IP. +USR_LIB_VSERVER=/usr/lib/util-vserver +exec $USR_LIB_VSERVER/vsysvwrapper gated $* + diff --git a/sysv/v_httpd.subst b/sysv/v_httpd.subst new file mode 100755 index 0000000..1c43a57 --- /dev/null +++ b/sysv/v_httpd.subst @@ -0,0 +1,6 @@ +#!/bin/sh +# chkconfig: - 85 15 +# description: Wrapper to start httpd bound to a single IP +USR_LIB_VSERVER=/usr/lib/util-vserver +exec $USR_LIB_VSERVER/vsysvwrapper httpd $* + diff --git a/sysv/v_named.subst b/sysv/v_named.subst new file mode 100755 index 0000000..507847f --- /dev/null +++ b/sysv/v_named.subst @@ -0,0 +1,11 @@ +#!/bin/sh +# chkconfig: - 55 45 +# description: Wrapper to start named bound to a single IP +USR_LIB_VSERVER=/usr/lib/util-vserver +exec $USR_LIB_VSERVER/vsysvwrapper named $* + + + + + + diff --git a/sysv/v_portmap.subst b/sysv/v_portmap.subst new file mode 100755 index 0000000..589f131 --- /dev/null +++ b/sysv/v_portmap.subst @@ -0,0 +1,11 @@ +#!/bin/sh +# chkconfig: - 91 35 +# description: Wrapper to start portmap bound to a single IP +USR_LIB_VSERVER=/usr/lib/util-vserver +exec $USR_LIB_VSERVER/vsysvwrapper portmap $* + + + + + + diff --git a/sysv/v_sendmail.subst b/sysv/v_sendmail.subst new file mode 100755 index 0000000..166597c --- /dev/null +++ b/sysv/v_sendmail.subst @@ -0,0 +1,6 @@ +#!/bin/sh +# chkconfig: - 80 30 +# description: Wrapper to start sendmail bound to a single IP +USR_LIB_VSERVER=/usr/lib/util-vserver +exec $USR_LIB_VSERVER/vsysvwrapper sendmail $* + diff --git a/sysv/v_smb.subst b/sysv/v_smb.subst new file mode 100755 index 0000000..3058ba7 --- /dev/null +++ b/sysv/v_smb.subst @@ -0,0 +1,11 @@ +#!/bin/sh +# chkconfig: - 91 35 +# description: Wrapper to start smb bound to a single IP +USR_LIB_VSERVER=/usr/lib/util-vserver +exec $USR_LIB_VSERVER/vsysvwrapper smb $* + + + + + + diff --git a/sysv/v_sshd.subst b/sysv/v_sshd.subst new file mode 100755 index 0000000..4459ce5 --- /dev/null +++ b/sysv/v_sshd.subst @@ -0,0 +1,11 @@ +#!/bin/sh +# chkconfig: - 55 25 +# description: Wrapper to start sshd bound to a single IP +USR_LIB_VSERVER=/usr/lib/util-vserver +exec $USR_LIB_VSERVER/vsysvwrapper sshd $* + + + + + + diff --git a/sysv/v_xinetd.subst b/sysv/v_xinetd.subst new file mode 100755 index 0000000..7933f12 --- /dev/null +++ b/sysv/v_xinetd.subst @@ -0,0 +1,6 @@ +#!/bin/sh +# chkconfig: - 56 50 +# description: Wrapper to start xinetd bound to a single IP +USR_LIB_VSERVER=/usr/lib/util-vserver +exec $USR_LIB_VSERVER/vsysvwrapper xinetd $* + diff --git a/sysv/vservers.conf b/sysv/vservers.conf new file mode 100644 index 0000000..0f309e3 --- /dev/null +++ b/sysv/vservers.conf @@ -0,0 +1,7 @@ +# Configuration file for the vservers service +# BACKGROUND=yes +# start the vservers on tty9, in background so the rest of the +# boot process end early +BACKGROUND=no + + diff --git a/sysv/vservers.subst b/sysv/vservers.subst new file mode 100755 index 0000000..bad0e49 --- /dev/null +++ b/sysv/vservers.subst @@ -0,0 +1,91 @@ +#!/bin/sh +# chkconfig: 345 98 10 +# description: The vservers service is used to start and stop all +# the virtual servers. + +USR_SBIN=/usr/sbin + + +# Print the vserver name in priority/alpha order +sortserver(){ + ( + cd /etc/vservers + for serv in *.conf + do + test -f "$serv" || continue + + PRIORITY=100 + . $serv + printf "%03d %s\n" $PRIORITY `basename $serv .conf` + done + ) | sort $* | (while read a b; do echo $b; done) +} + +startservers(){ + echo "Starting the virtual servers" + cd /etc/vservers + for name in `sortserver` + do + ONBOOT= + . $name.conf + if [ "$ONBOOT" = "yes" ] ; then + $USR_SBIN/vserver $name start + else + echo virtual server $name not configured for on boot start + fi + done +} + +BACKGROUND=off +if [ -f /etc/vservers.conf ] ; then + . /etc/vservers.conf +fi + + +# See how we were called. +case "$1" in + start) + if [ "$BACKGROUND" = "yes" ] ; then + startservers >/dev/tty8 /dev/tty8 & + else + startservers + fi + touch /var/lock/subsys/vservers + ;; + stop) + echo "Stopping the virtual servers" + cd /etc/vservers + for name in `sortserver -r` + do + $USR_SBIN/vserver $name stop + done + rm -f /var/lock/subsys/vservers + ;; + restart) + $0 stop + $0 start + ;; + reload) + echo Not implemented + ;; + status) + cd /etc/vservers + for serv in *.conf + do + ONBOOT=no + name=`basename $serv .conf` + . $serv + echo -n ONBOOT=$ONBOOT " " + $USR_SBIN/vserver $name running + done + ;; + *) + echo "Usage: vservers {start|stop|restart|reload|status}" + exit 1 +esac + +exit 0 + + + + diff --git a/tests/Makefile-files b/tests/Makefile-files new file mode 100644 index 0000000..50148c4 --- /dev/null +++ b/tests/Makefile-files @@ -0,0 +1,30 @@ +## $Id: Makefile-files,v 1.1.4.1 2003/11/28 23:10:08 ensc Exp $ -*- makefile -*- + +## Copyright (C) 2003 Enrico Scholz +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2, or (at your option) +## any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +## + +test_PRGS = tests/escaperoot \ + tests/forkbomb \ + tests/testipc \ + tests/testlimit \ + tests/testopenf + +tests_escaperoot_SOURCES = tests/escaperoot.cc +tests_forkbomb_SOURCES = tests/forkbomb.cc +tests_testipc_SOURCES = tests/testipc.cc +tests_testlimit_SOURCES = tests/testlimit.cc +tests_testopenf_SOURCES = tests/testopenf.cc diff --git a/tests/escaperoot.cc b/tests/escaperoot.cc new file mode 100644 index 0000000..b10d58c --- /dev/null +++ b/tests/escaperoot.cc @@ -0,0 +1,115 @@ +// $Id: escaperoot.cc,v 1.1.4.1 2003/10/30 15:12:34 ensc Exp $ + +// Copyright (C) 2003 Enrico Scholz +// based on tests/escaperoot.cc by Jacques Gelinas +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +/* + This program tries to escape out of a vserver using chroot flaws. + Once escaped, it exec a shell. + + None of this works on 2.4.13. +*/ +#include +#include +#include +#include +#include +#include +#include +#include + +static void print_pwd() +{ + char path[PATH_MAX]; + if (getcwd(path,sizeof(path)-1)!=NULL){ + printf ("PWD: %s\n",path); + } +} +/* + Just set a chroot in a sub-directory and keep the + current directory behind +*/ +static void test1() +{ + printf ("test1\n"); + print_pwd(); + mkdir ("dummy_dir",0755); + if (chroot ("dummy_dir")==-1){ + fprintf (stderr,"Can't chroot into dummy_dir (%s)\n",strerror(errno)); + }else{ + // Try to chdir into the real root + for (int i=0; i<1000; i++) chdir(".."); + print_pwd(); + if (execl ("/bin/sh","/bin/sh",NULL)==-1){ + fprintf (stderr,"execl /bin/sh failed (%s)\n",strerror(errno)); + } + } +} + +/* + Same as test1, except we open the current directory and do + a fchdir() to it before trying to escape to the real root. +*/ +static void test2() +{ + printf ("test2\n"); + print_pwd(); + mkdir ("dummy_dir",0755); + int fd = open (".",O_RDONLY); + if (fd == -1){ + fprintf (stderr,"Can't open current directory (%s)\n",strerror(errno)); + }else if (chroot ("dummy_dir")==-1){ + fprintf (stderr,"Can't chroot into dummy_dir (%s)\n",strerror(errno)); + }else if (fchdir(fd)==-1){ + fprintf (stderr,"Can't fchdir to the current directory (%s)\n" + ,strerror(errno)); + }else{ + // Try to chdir into the real root + for (int i=0; i<1000; i++) chdir(".."); + print_pwd(); + if (execl ("/bin/sh","/bin/sh",NULL)==-1){ + fprintf (stderr,"execl /bin/sh failed (%s)\n",strerror(errno)); + } + } +} + +/* + Perform the test in a sub-process so it won't affect the current one +*/ +static void dotest (void (*f)()) +{ + pid_t pid = fork(); + if (pid == 0){ + f(); + _exit (0); + }else if (pid == -1){ + fprintf (stderr,"Can't fork (%s)\n",strerror(errno)); + }else{ + int status; + wait (&status); + } +} + +int main (int, char *[]) +{ + dotest (test1); + dotest (test2); + printf ("All attempts failed\n"); + return 0; +} + + diff --git a/tests/forkbomb.cc b/tests/forkbomb.cc new file mode 100644 index 0000000..8c30f97 --- /dev/null +++ b/tests/forkbomb.cc @@ -0,0 +1,107 @@ +// $Id: forkbomb.cc,v 1.1 2003/09/29 22:01:57 ensc Exp $ + +// Copyright (C) 2003 Enrico Scholz +// based on tests/forkbomb.cc by Jacques Gelinas +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +#include +#include +#include +#include +#include +#include +#include + +enum MODE {MODE_SLEEP,MODE_LOOP,MODE_FORK, MODE_FORKSHELL}; + + +static void forkbomb_userfork (MODE mode) +{ + pid_t pid = fork(); + if (pid==-1){ + fprintf (stderr,"Fork failed (%s)\n",strerror(errno)); + }else if (pid == 0){ + if (mode == MODE_SLEEP){ + sleep(20); + }else if (mode == MODE_LOOP){ + int k=0; + while (1) k++; + }else if (mode == MODE_FORKSHELL){ + system ("/bin/false"); + } + _exit (0); + } +} + + +int main (int argc, char *argv[]) +{ + if (argc != 4){ + fprintf (stderr,"formboom N M mode\n" + "where N is the number of process to start\n" + "and M is the number of user to start\n" + "Each user will try to start N process\n" + "\n" + "mode is:\n" + " sleep: Each process sleeps for 20 seconds and exits\n" + " loop: Each process loops forever\n" + " fork: Each process exits immediatly and is restarted\n" + " by the parent\n" + " forkshell: Each process runs /bin/false in a shell and\n" + " exits, then the parent start a new one\n" + ); + }else{ + MODE mode; + if (strcmp(argv[3],"sleep")==0){ + mode = MODE_SLEEP; + }else if (strcmp(argv[3],"loop")==0){ + mode = MODE_LOOP; + }else if (strcmp(argv[3],"fork")==0){ + mode = MODE_FORK; + }else if (strcmp(argv[3],"forkshell")==0){ + mode = MODE_FORKSHELL; + }else{ + fprintf (stderr,"Invalid mode\n"); + exit (-1); + } + for (int i=0; i +// based on tests/testipc.cc by Jacques Gelinas +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +/* + Test to see isolation of the various IPC resources + between security context +*/ +#include +#include +#include +#include +#include +#include +#include + +int main (int argc, char *argv[]) +{ + int ret = -1; + if (argc < 2){ + fprintf (stderr, + "testipc createshm\n" + ); + }else if(strcmp(argv[1],"createshm")==0){ + int id = shmget (1,1024,IPC_CREAT|0666); + if (id == -1){ + fprintf (stderr,"shmget failed (%s)\n",strerror(errno)); + }else{ + printf ("shmget id %d\n",id); + void *pt = shmat (id,NULL,0); + if (pt == NULL){ + fprintf (stderr,"can't shmat to id %d (%s)\n",id,strerror(errno)); + }else{ + strcpy ((char*)pt,"original string"); + + printf ("Letting a sub-program attach to this memory\n"); + char tmp[100]; + sprintf (tmp,"./testipc accessshm %d",id); + int ok = system (tmp); + printf ("\tSub-program returned %d\n",ok); + + printf ("\tThe segment now hold :%s:\n",(char*)pt); + shmdt (pt); + + printf ("A sub-program in another context can't attach\n"); + sprintf (tmp,"/usr/sbin/chcontext ./testipc accessshm %d",id); + ok = system (tmp); + printf ("\tSub-program returned %d\n",ok); + + printf ("Executing a sub-shell\n"); + system ("/bin/sh"); + } + printf ("Delete the share memory segment\n"); + if (shmctl (id,IPC_RMID,NULL)==-1){ + fprintf (stderr,"shmctl failed (%s)\n",strerror(errno)); + }else{ + ret = 0; + } + } + }else if(strcmp(argv[1],"accessshm")==0){ + int id = atoi(argv[2]); + void *pt = shmat (id,NULL,0); + if (pt == (void*)-1){ + fprintf (stderr,"can't shmat to id %d (%s)\n",id,strerror(errno)); + }else{ + printf ("\tWriting hello in share memory\n"); + strcpy ((char*)pt,"hello"); + ret = 0; + } + }else if(strcmp(argv[1],"createsem")==0){ + int id = semget (1,1,IPC_CREAT|0666); + if (id == -1){ + fprintf (stderr,"semget failed (%s)\n",strerror(errno)); + }else{ + printf ("semget id %d\n",id); + + printf ("Letting a sub-program play with this semaphore\n"); + char tmp[100]; + sprintf (tmp,"./testipc accesssem %d",id); + int ok = system (tmp); + printf ("\tSub-program returned %d\n",ok); + + printf ("A sub-program in another context can't use the semaphore\n"); + sprintf (tmp,"/usr/sbin/chcontext ./testipc accesssem %d",id); + ok = system (tmp); + printf ("\tSub-program returned %d\n",ok); + + printf ("Executing a sub-shell\n"); + system ("/bin/sh"); + + printf ("Delete the semaphore\n"); + if (semctl (id,0,IPC_RMID,NULL)==-1){ + fprintf (stderr,"semctl failed (%s)\n",strerror(errno)); + }else{ + ret = 0; + } + } + }else if(strcmp(argv[1],"accesssem")==0){ + int id = atoi(argv[2]); + struct sembuf ops[]={ + {0,0,0} + }; + if (semop (id,ops,1) == -1){ + fprintf (stderr,"can't semop with id %d (%s)\n",id,strerror(errno)); + }else{ + ret = 0; + } + } + return ret; +} + + diff --git a/tests/testlimit.cc b/tests/testlimit.cc new file mode 100644 index 0000000..e8f86d5 --- /dev/null +++ b/tests/testlimit.cc @@ -0,0 +1,52 @@ +// $Id: testlimit.cc,v 1.1 2003/09/29 22:01:57 ensc Exp $ + +// Copyright (C) 2003 Enrico Scholz +// based on tests/testlimit.cc by Jacques Gelinas +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +#include +#include +#include +#include +#include +#include + +int main (int argc, char *argv[]) +{ + if (argc != 3){ + fprintf (stderr,"testlimit nbprocess malloc_size\n"); + }else{ + int nbproc = atoi(argv[1]); + int size = atoi(argv[2]); + for (int i=0; i +// based on tests/testopenf.cc by Jacques Gelinas +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +#include +#include +#include +#include +#include +#include + +int main (int argc, char *argv[]) +{ + if (argc != 3){ + fprintf (stderr,"testlimit nbprocess nbopen\n"); + }else{ + int nbproc = atoi(argv[1]); + int nbopen = atoi(argv[2]); + for (int i=0; i %epoch:%version-%release +BuildRequires: e2fsprogs-devel +Requires(post): %__chattr + +%package linuxconf +Summary: Linuxconf administration modules for vservers +Group: Applications/System +Requires: %name = %epoch:%version-%release +Provides: vserver-admin = %epoch:%version-%release +Conflicts: vserver-admin < %epoch:%version-%release +Conflicts: vserver-admin > %epoch:%version-%release + +%description +This package provides the components and a framework to setup virtual +servers. A virtual server runs inside a linux server. It is nevertheless +highly independent. As such, you can run various services with normal +configuration. The various vservers can't interact with each other and +can't interact with services in the main server. + +This requires a special kernel supporting the new new_s_context and +set_ipv4root system call. + + +%description linuxconf +This package provides the components to setup virtual servers with +linuxconf. + + +%prep +%setup -q + + +%build +%configure --enable-linuxconf +%__make %{?_smp_mflags} + + +%install +rm -rf $RPM_BUILD_ROOT +%__make DESTDIR=$RPM_BUILD_ROOT install + +mkdir -p $RPM_BUILD_ROOT/vservers +test "%_initrddir" = %_sysconfdir/init.d || { + mkdir -p ${RPM_BUILD_ROOT}%_initrddir + mv ${RPM_BUILD_ROOT}%_sysconfdir/init.d/* ${RPM_BUILD_ROOT}%_initrddir/ +} + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%define v_services httpd named portmap sendmail smb sshd xinetd +%post +/sbin/chkconfig --add vservers +/sbin/chkconfig --add rebootmgr + +for i in %v_services; do + /sbin/chkconfig --add v_$i +done + +%__chattr +t /vservers || : + + +%preun +test "$1" != 0 || for i in %v_services; do + /sbin/chkconfig --del v_$i +done + +test "$1" != 0 || %{_initrddir}/rebootmgr stop &>/dev/null || : +test "$1" != 0 || /sbin/chkconfig --del rebootmgr +test "$1" != 0 || /sbin/chkconfig --del vservers + + +%postun +test "$1" = 0 || %{_initrddir}/rebootmgr condrestart >/dev/null || : + + +%files +%defattr(-,root,root) +%doc AUTHORS COPYING ChangeLog NEWS README THANKS +%doc doc/FAQ.txt +%_sbindir/* +%_libdir/%name +%_includedir/vserver.h +%_libdir/libvserver.a +%_mandir/man8/* +%config %_initrddir/* +%config(noreplace) /etc/vservers.conf +%attr(0,root,root) %dir /vservers + +%exclude %_sbindir/newvserver +%exclude %_mandir/man8/newvserver* + + +%files linuxconf +%defattr(-,root,root) +%config(noreplace) /etc/vservers/newvserver.defaults +%_sbindir/newvserver +%_mandir/man8/newvserver* + + +%changelog + +* Fri Sep 26 2003 Enrico Scholz - 0:0.23.4-1 +- initial build. diff --git a/util-vserver.spec.in b/util-vserver.spec.in new file mode 100644 index 0000000..c5f2ac1 --- /dev/null +++ b/util-vserver.spec.in @@ -0,0 +1,121 @@ +%define __chattr /usr/bin/chattr + +Summary: Linux virtual server utilities +Name: @PACKAGE@ +Version: @VERSION@ +Release: 0 +Epoch: 0 +Copyright: GPL +Group: System Environment/Base +URL: http://savannah.nongnu.org/projects/util-vserver/ +Source0: http://savannah.nongnu.org/download/util-vserver/stable.pkg/%version/%name-%version.tar.bz2 +Provides: %name-devel = %epoch:%version-%release +BuildRoot: %_tmppath/%name-%version-%release-root +Provides: vserver = %epoch:%version-%release +Conflicts: vserver < %epoch:%version-%release +Conflicts: vserver > %epoch:%version-%release +BuildRequires: e2fsprogs-devel +Requires(post): %__chattr + +%package linuxconf +Summary: Linuxconf administration modules for vservers +Group: Applications/System +Requires: %name = %epoch:%version-%release +Provides: vserver-admin = %epoch:%version-%release +Conflicts: vserver-admin < %epoch:%version-%release +Conflicts: vserver-admin > %epoch:%version-%release + +%description +This package provides the components and a framework to setup virtual +servers. A virtual server runs inside a linux server. It is nevertheless +highly independent. As such, you can run various services with normal +configuration. The various vservers can't interact with each other and +can't interact with services in the main server. + +This requires a special kernel supporting the new new_s_context and +set_ipv4root system call. + + +%description linuxconf +This package provides the components to setup virtual servers with +linuxconf. + + +%prep +%setup -q + + +%build +%configure --enable-linuxconf +%__make %{?_smp_mflags} + + +%install +rm -rf $RPM_BUILD_ROOT +%__make DESTDIR=$RPM_BUILD_ROOT install + +mkdir -p $RPM_BUILD_ROOT/vservers +test "%_initrddir" = %_sysconfdir/init.d || { + mkdir -p ${RPM_BUILD_ROOT}%_initrddir + mv ${RPM_BUILD_ROOT}%_sysconfdir/init.d/* ${RPM_BUILD_ROOT}%_initrddir/ +} + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%define v_services httpd named portmap sendmail smb sshd xinetd +%post +/sbin/chkconfig --add vservers +/sbin/chkconfig --add rebootmgr + +for i in %v_services; do + /sbin/chkconfig --add v_$i +done + +%__chattr +t /vservers || : + + +%preun +test "$1" != 0 || for i in %v_services; do + /sbin/chkconfig --del v_$i +done + +test "$1" != 0 || %{_initrddir}/rebootmgr stop &>/dev/null || : +test "$1" != 0 || /sbin/chkconfig --del rebootmgr +test "$1" != 0 || /sbin/chkconfig --del vservers + + +%postun +test "$1" = 0 || %{_initrddir}/rebootmgr condrestart >/dev/null || : + + +%files +%defattr(-,root,root) +%doc AUTHORS COPYING ChangeLog NEWS README THANKS +%doc doc/FAQ.txt +%_sbindir/* +%_libdir/%name +%_includedir/vserver.h +%_libdir/libvserver.a +%_mandir/man8/* +%config %_initrddir/* +%config(noreplace) /etc/vservers.conf +%attr(0,root,root) %dir /vservers + +%exclude %_sbindir/newvserver +%exclude %_mandir/man8/newvserver* + + +%files linuxconf +%defattr(-,root,root) +%config(noreplace) /etc/vservers/newvserver.defaults +%_sbindir/newvserver +%_mandir/man8/newvserver* + + +%changelog + +* Fri Sep 26 2003 Enrico Scholz - 0:0.23.4-1 +- initial build.