Index: AUTHORS =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/AUTHORS,v retrieving revision 1.1.1.2 retrieving revision 1.1.1.3 diff -u -p -r1.1.1.2 -r1.1.1.3 --- AUTHORS 15 Apr 2004 01:01:54 -0000 1.1.1.2 +++ AUTHORS 26 Dec 2007 03:55:00 -0000 1.1.1.3 @@ -49,9 +49,11 @@ Jim Kingdon and others at Cygnus Support remote repository access code. Larry Jones and Derek Price have been maintaining and -enhancing CVS for some years. Mark D. Baushke came on in +enhancing CVS for some years. Mark D. Baushke came on in 2003. +Conrad Pino began maintaining the Windows port in 2004. + There have been many, many contributions not listed here. Consult the individual ChangeLog files in each directory for a more complete idea. Index: BUGS =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/BUGS,v retrieving revision 1.1.1.8 retrieving revision 1.1.1.9 diff -u -p -r1.1.1.8 -r1.1.1.9 --- BUGS 10 Jun 2004 19:05:37 -0000 1.1.1.8 +++ BUGS 26 Dec 2007 03:55:00 -0000 1.1.1.9 @@ -88,22 +88,6 @@ an incorrect value, though this does not noticed under BSDI. -* Spaces in arguments to `cvs diff' are currently split on spaces and tabs -before being passed to diff. This can often cause diff to abort since it can -no longer interpret its options string and if it can, coincidentally, -interpret its option string, then the problem may be output in unexpected -formats. - - -* `release' of a project subdir does not remove the `subdir' entry from - `./CVS/Entries'. - - -* Most of the remote commands are encountering assertion failures when listing - the toplevel of the repository (e.g. `cvs rlog .'). This appears to be - related to the symlinked CVS root fix. - - * Status /*-------. Index: ChangeLog =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/ChangeLog,v retrieving revision 1.1.1.15 retrieving revision 1.1.1.16 diff -u -p -r1.1.1.15 -r1.1.1.16 --- ChangeLog 10 Jun 2004 19:05:36 -0000 1.1.1.15 +++ ChangeLog 26 Dec 2007 03:55:00 -0000 1.1.1.16 @@ -1,3 +1,281 @@ +2006-06-09 Derek Price + + * NEWS: Note client/server conflict fix. + +2006-05-25 Derek Price + + * configure.in: Accept --with-rsh argument to set RSH_DFLT in config.h. + Prefer `remsh' to `rsh' when autodetecting and comment rationale. + +2006-04-27 Derek Price + + * acinclude.m4 (ACX_WITH_GSSAPI): Detect libgss for HP-UX. + * NEWS: Note that GSSAPI builds under HP-UX. + (Report from Larry Jones .) + +2006-03-07 Derek Price + + * NEWS: Note rtag fixes. + +2006-02-26 Derek Price + + * NEWS: Note CVSADM fix as an efficiency improvement. + +2006-02-01 Derek Price + + * NEWS: Note unconditional val-tags lock removal. + + * NEWS: Note history buffer overflow fix. + +2006-01-30 Derek Price + + * NEWS: Note nonblocking flow control pipe fix. + +2005-12-09 Derek Price + + * NEWS: Note misc doc & bug fixes. + +2005-12-07 Derek Price + + * NEWS: Note recognition of :extssh:. + +2005-10-18 Derek Price + + * KEYS: New file, suggested by Antoine Lexy-Lambert . + * README: Mention KEYS file. + +2005-09-26 Derek Price + + [bug #14639] + * acinclude.m4: Find the crypto library on FreeBSD 5.x. + Patch from Serguei E. Leontiev . + + * NEWS: Note FreeBSD 5.x GSSAPI fix. + + * NEWS: Note fsync'd commits. + +2005-09-24 Derek Price + + * NEWS, HACKING: Standardize on Automake 1.9.6. + +2005-09-22 Derek Price + + * NEWS: Mention conflict fixes. + +2005-09-13 Derek Price + + * TESTS: Mention new $username8 & $anyusername variables. + +2005-09-04 Larry Jones + + * NEWS: s/bug-cvs@gnu.org/bug-cvs@nongnu.org/. + * configure.in: s/info-cvs@gnu.org/info-cvs@nongnu.org/. + * configure: Regenerated. + +2005-09-01 Derek Price + + * AUTHORS, DEVEL-CVS, HACKING, README: Update links, email addresses, + & mailing list descriptions. + +2005-09-01 Derek Price + + * FAQ: Update links. + +2005-09-01 Derek Price + + * HACKING, INSTALL, README, README.VMS, configure.in: Update links and + email addresses. + +2005-08-31 Derek Price + + * www/.htaccess: Remove this file. + +2005-08-31 Derek Price + + * cvs.spec.in: Note last spec file change in internal ChangeLog. + +2005-08-31 Derek Price + + * NEWS: Note spec file repair. + +2005-08-31 Derek Price + + * cvs.spec.in: Update links to point to Savannah. s/Copyright/License/ + for RPM 4.mumble. + +2005-08-30 Larry Jones + + * NEWS: Note import locking fix. + +2005-07-12 Derek Price + + * FAQ, HACKING, INSTALL: Add copyright notices. + +2005-07-11 Derek Price + + * FAQ, HACKING, INSTALL: Update license notices. + +2005-06-02 Derek Price + + * NEWS: Note server compression hang fix. + +2005-06-01 Conrad T. Pino + + * makewin32.cmd: Add Windows NT command file to build CVS Project. + Imported from revision 1.2 on feature branch. + +2005-05-27 Derek Price + + * NEWS: Note diff space split fix. + * BUGS: Remove diff space split note. + +2005-05-03 Derek Price + + * INSTALL: Add footnote about compiling a CVS checkout of CVS on a + case-insensitive UNIX file system like Mac OS X. + +2005-05-02 Derek Price + + * TODO (231): Renumber as... + (234): ...this to match numbering on 1.12.x. + +2005-05-02 Derek Price + + * TODO (231): New item. + (22, 30, 31): Remove completed items. + +2005-05-02 Derek Price + + * NEWS: Note new val-tags locks. + +2005-04-30 Derek Price + + * NEWS: Note new history locks. + +2005-04-20 Derek Price + + * NEWS: Note log overflow fix. + +2005-04-15 Derek Price + + * NEWS: Note Klocwork fixes. + +2005-04-14 Derek Price + + * NEWS: Note contrib Perl taint vulnerability fix. + +2005-03-23 Derek Price + + * ylwrap: New file. + +2005-03-15 Derek Price + + * HACKING, NEWS: Note new Automake version. + +2005-03-04 Jim Hyslop + + * NEWS: Note fix for compile errors on IRIX 5.3. + +2005-02-22 Derek Price + + * NEWS: Note recent watch on/off fileattr fix. + +2005-01-31 Derek Price + + * AUTHORS: Add Conrad Pino. + * README: Update copyright notice. + +2005-01-29 Derek Price + + * NEWS: Note some recent changes. + +2004-11-17 Derek Price + + * NEWS: Note "red file" fix source inclusion. + +2004-11-05 Conrad T. Pino + + * cvsnt.dep: Regenerated after complete rebuild. + * cvsnt.mak: Regenerated after complete rebuild. + +2004-11-03 Derek Price + + * HACKING, NEWS: Note new Autoconf & Automake versions. + +2004-10-29 Derek Price + + * NEWS: Note xreadlink fix. + +2004-10-26 Derek Price + + * NEWS: Note GSSAPI error message fix. + +2004-10-19 Derek Price + + * NEWS: Note resurrection fix. + +2004-10-14 Derek Price + + * NEWS: Note new import branch verification. + +2004-09-25 Derek Price + + * configure.in: Use doc/mkman.pl as source for doc/mkman. + +2004-09-08 Conrad T. Pino + + * cvsnt.dsp: Add "windows-NT/JmgStat.c" to project. Add + "windows-NT/JmgStat.h" to project. Add "lib/xsize.h" to project. + * cvsnt.dep: Regenerated for "cvsnt.dsp" change. + * cvsnt.mak: Regenerated for "cvsnt.dsp" change. + +2004-09-07 Derek Price + + * NEWS: Note Windows DST fix. + +2004-09-03 Derek Price + + * HACKING: Codify backwards compatibility conventions. Remove outdated + reference to very old MSVC++ releases. + +2004-08-30 Derek Price + + * NEWS: Note compliance of log_accum.pl with Perl 5.8.5. + +2004-08-24 Derek Price + + * TODO (24, 49, 92, 113): Remove completed/obsolescent items. + +2004-08-24 Derek Price + + * BUGS: Remove release subdir note. This was fixed with the commit on + 2004-02-25, based on Matthew Ogilvie's patch. + +2004-08-24 Derek Price + + * NEWS: Note r* . fix. + * BUGS: Remove r* . note. + +2004-08-24 Derek Price + + * NEWS: Note invalid tag fix. + +2004-08-24 Mark D. Baushke + + * NEWS: Note that modules -a bugfix has a change in behavior. + +2004-06-22 Derek Price + + * NEWS: Note Conrad's Windows fix. + +2004-06-21 Derek Price + + * .cvsignore: Ignore GPG signature files for distributions. + +2004-06-10 Derek Price + + * NEWS: Note manual update. + 2004-06-09 Derek Price * NEWS: Note Stefan & Sebastian's security fixes. Index: DEVEL-CVS =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/DEVEL-CVS,v retrieving revision 1.1.1.5 retrieving revision 1.1.1.6 diff -u -p -r1.1.1.5 -r1.1.1.6 --- DEVEL-CVS 2 Sep 2002 05:49:36 -0000 1.1.1.5 +++ DEVEL-CVS 26 Dec 2007 03:55:00 -0000 1.1.1.6 @@ -4,37 +4,6 @@ This file, DEVEL-CVS, contains the polic development group operates. Also see the HACKING file. ---------------------------------------------------------------------- -Charter for the devel-cvs mailing list: - -The CVS Developers' List exists to help people -with access to the CVS source repository co-ordinate changes, make -releases, and administer the repository. - -Everyone who has been given checkin access to the repository for the -CVS sources should read devel-cvs. Only those with checkin access may -send messages to the list. - -The devel-cvs list may be used to discuss: -- administrivia regarding the CVS source repository and release - process, and -- changes and features intended for inclusion in the official CVS - release (either source code or documentation), which someone plans - to implement, or has implemented. - -The devel-cvs list should not be used to discuss: -- changes or features to packages other than the CVS release - (e.g., related packages like tkCVS, RAD/CVS, or other groups' - distributions of CVS, like RCVS, etc.), -- changes which nobody has offered to implement, or -- the philosophy of CVS (as opposed to a specific change to CVS). -These topics should either go on info-cvs, or have a new mailing list -created for them. - -The topic restrictions in this charter do not reflect the development -group's future plans for CVS; rather, they reflect a topic -classification which the group finds helpful. - ----------------------------------------------------------------------- Policies regarding the CVS source repository: By checking items into the repository, developers agree to permit Index: FAQ =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/FAQ,v retrieving revision 1.1.1.7 retrieving revision 1.1.1.8 diff -u -p -r1.1.1.7 -r1.1.1.8 --- FAQ 15 Apr 2004 01:01:55 -0000 1.1.1.7 +++ FAQ 26 Dec 2007 03:55:00 -0000 1.1.1.8 @@ -1,3 +1,24 @@ +------------------------------------------------------------------------------- + + CVS is Copyright (C) 1989-2005 The Free Software Foundation, Inc. + + CVS 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 1, or (at your option) + any later version. + + More details are available in the COPYING file but, in simplified + terms, this means that any distributed modifications you make to + this software must also be released under the GNU General Public + License. + + CVS 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. + +------------------------------------------------------------------------------- + This file contains a CVS FAQ. Until 1995 it was maintained by David Grubbs. It was out of date and not being maintained, but it had a certain following and in 1997 Pascal Molli decided to start @@ -13,13 +34,14 @@ until someone can write some code to ext and insert things like tables of contents). The answers which are dated "6/13/1997" below are really from the 1995 -FAQ, for the most part. Many of them are out of date. If you have -some time, you are encouraged to double-check them against other -sources like the Cederqvist manual and update the FAQ. If you don't -have such time, take them with a grain of salt or a few. +FAQ, for the most part. Many of them are out of date. The current FAQ may +be found at . If you have +some time, you are encouraged to export that FAQ as text and import it here. +If you don't have such time, take the answers in this file with at least a few +grains of salt. -Since Feb. 2000 CVS is being maintained by OpenAvenue, Inc. and many of -the existing resources have been centeralized on http://www.cvshome.org. +Since August, 2005, many of the existing CVS resources have been centralized on + & . Category: /, all questions @@ -1899,7 +1921,8 @@ You can branch a branch. GIC is no longer being maintained and tkCVS is recommended instead. - For more on tkCVS, see http://www.cvshome.org/dev/addontkcvs.html. + For more on tkCVS, see + . kingdon@cyclic.com Index: HACKING =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/HACKING,v retrieving revision 1.1.1.7 retrieving revision 1.1.1.8 diff -u -p -r1.1.1.7 -r1.1.1.8 --- HACKING 10 Jun 2004 19:05:37 -0000 1.1.1.7 +++ HACKING 26 Dec 2007 03:55:00 -0000 1.1.1.8 @@ -1,10 +1,29 @@ How to write code for CVS +* License of CVS + + CVS is Copyright (C) 1989-2005 The 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 1, or (at your option) + any later version. + + More details are available in the COPYING file but, in simplified + terms, this means that any distributed modifications you make to + this software must also be released under the GNU General Public + 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. + * Source Patches against the development version of CVS are most likely to be accepted: - $ cvs -d:pserver:anoncvs@cvs.cvshome.org/cvsroot co ccvs + $ CVS_RSH=ssh cvs -d:ext:anoncvs@savannah.nongnu.org:/cvsroot/cvs co ccvs * Compiler options @@ -13,13 +32,28 @@ detect many programming errors. This is might cause spurious warnings, but at least on some machines, there should be no spurious warnings. For example: - $ CFLAGS="-g -Wall" ./configure + $ CFLAGS="-g -Wall" ./configure Configure is not very good at remembering this setting; it will get wiped out whenever you do a ./config.status --recheck, so you'll need to use: - $ CFLAGS="-g -Wall" ./config.status --recheck + $ CFLAGS="-g -Wall" ./config.status --recheck + +* Backwards Compatibility + +Only bug fixes are accepted into the stable branch. New features should be +applied to the trunk. + +If it is not inextricable from a bug fix, CVS's output (to stdout/stderr) +should not be changed on the stable branch in order to best support scripts and +other tools which parse CVS's output. It is ok to change output between +feature releases (on the trunk), though such changes should be noted in the +NEWS file. + +Changes in the way CVS responds to command line options, config options, etc. +should be accompanied by deprecation warnings for an entire stable series of +releases before being changed permanently, if at all possible. * Indentation style @@ -100,10 +134,6 @@ Generally speaking the GNU coding standa and perhaps an exception or two we haven't mentioned). This is the file standards.text at the GNU FTP sites. -Filenames for .c and .h files may contain _ but should not contain - -(the latter causes Visual C++ 2.1 to create makefiles which Visual C++ -4.0 cannot use). - * Regenerating Build Files On UNIX, if you wish to change the Build files, you will need Autoconf and @@ -115,13 +145,13 @@ have the same versions the developers do automatically aren't included in the generated Makefiles unless you run configure with the --enable-maintainer-mode option. -The CVS Makefiles and configure script were built using Automake 1.7.9 and -Autoconf 2.58, respectively. +The CVS Makefiles and configure script were built using Automake 1.9.6 and +Autoconf 2.59, respectively. There is a known bug in Autoconf 2.57 that will prevent the configure scripts it generates from working on some platforms. Other combinations of autotool versions may or may not work. If you get other versions to work, -please send a report to . +please send a report to . * Writing patches (strategy) @@ -174,7 +204,7 @@ for each issue. Use context diffs or un Include words like "I grant permission to distribute this patch under the terms of the GNU Public License" with your patch. By sending a -patch to bug-cvs@gnu.org, you implicitly grant this permission. +patch to bug-cvs@nongnu.org, you implicitly grant this permission. Submitting a patch to bug-cvs is the way to reach the people who have signed up to receive such submissions (including CVS developers), but @@ -203,27 +233,21 @@ intentional, to avoid a last minute rush * Mailing lists -Anyone can add themselves to the following mailing lists: +In addition to the mailing lists listed in the README file, developers should +take particular note of the following mailling lists: - dev. Unless you are accepted as a CVS developer as - described in the DEVEL-CVS file, you will only be able to - read this list, not send to it. The charter of the list is - also in DEVEL-CVS. - cvs. The only messages sent to this list are sent + bug-cvs: This is the list which users are requested to send bug reports + to. General CVS development and design discussions also take place on + this list. + info-cvs: This list is intended for user questions, but general CVS + development and design discussions sometimes take place on this list. + cvs-cvs: The only messages sent to this list are sent automatically, via the CVS `loginfo' mechanism, when someone checks something in to the master CVS repository. - test-results. The only messages sent to this list are sent + cvs-test-results: The only messages sent to this list are sent automatically, daily, by a script which runs "make check" and "make remotecheck" on the master CVS sources. -To subscribe to dev, cvs, or test-results, send -a message to "-subscribe@ccvs.cvshome.org" or visit -http://ccvs.cvshome.org/servlets/ProjectMailingListList and follow the -instructions there. - -One other list related to CVS development is bug-cvs. This is the -list which users are requested to send bug reports to. Anyone can -subscribe; to do so send mail to bug-cvs-request@gnu.org. - -Other CVS discussions take place on the info-cvs mailing list -(send mail to info-cvs-request@gnu.org to subscribe) or on -the newsgroup comp.software.config-mgmt. + +To subscribe to any of these lists, send mail to -request@nongnu.org +or visit http://savannah.nongnu.org/mail/?group=cvs and follow the instructions +for the list you wish to subscribe to. Index: INSTALL =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/INSTALL,v retrieving revision 1.1.1.13 retrieving revision 1.1.1.14 diff -u -p -r1.1.1.13 -r1.1.1.14 --- INSTALL 10 Jun 2004 19:05:36 -0000 1.1.1.13 +++ INSTALL 26 Dec 2007 03:55:00 -0000 1.1.1.14 @@ -1,4 +1,24 @@ -First, read the README file. If you're still happy... +------------------------------------------------------------------------------- + +CVS is Copyright (C) 1989-2005 The Free Software Foundation, Inc. + +CVS 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 1, 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. + +------------------------------------------------------------------------------- + +Now back to our regularly scheduled program: + +Please read the README file before reading this INSTALL file. Then, to +install CVS: + First you need to obtain and install the CVS executables. If you got a distribution which contains executables, consult the installation @@ -95,7 +115,7 @@ Tested platforms CVS has been tested on the following platforms. The most recent version of CVS reported to have been tested is indicated, but more recent versions of CVS probably will work too. Please send updates to -this list to bug-cvs@gnu.org (doing so in the form of a diff +this list to bug-cvs@nongnu.org (doing so in the form of a diff to this file, or at least exact suggested text, is encouraged). "tested" means, at a minimum, that CVS compiles and appears to work on simple (manual) testing. In many cases it also means "make check" @@ -182,7 +202,8 @@ PowerPC or RS/6000: IBM RS/6000 running AIX 4.3 (1.10.7) Lynx 2.3.1 120495 (1.6.86) (footnote 9) Lynx 2.5 (1.9) (footnote 10) - MkLinux DR3 GENERIC #6 (1.10.5.1) (presumably LinuxPPC too) + Linux DR3 GENERIC #6 (1.10.5.1) (presumably LinuxPPC too) + Mac OS X ALL (footnote 14) Mac OS X Darwin 6.6 Darwin Kernel Version 6.6 (1.11.1p1) Mac OS X Darwin 5.5 Darwin Kernel Version 5.5 (1.11.6) (footnote 12) Mac OS X Darwin 5.5 Darwin Kernel Version 5.5 (1.12.1) (footnote 12) @@ -253,6 +274,17 @@ VAX: A build under HP PA-RISC 2.0 will probably not run under PA-RISC 1.1 unless "+DAportable" is added to the HP ANSI cc compiler flags. +(footnote 14) + Because of the case-insensitive file system on Mac OS X, you cannot build + CVS directly from a checkout from CVS. The name of the built executable, + `cvs', conflicts with name of the CVS administration directory, `CVS'. + The work-around is to build the executable from a build directory separate + from the source directory. i.e.: + + cvs co ccvs; cd ccvs + mkdir build; cd build + ../configure && make + ------------------------------------------------------------------------------- Building from source code under Unix: Index: Makefile.in =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/Makefile.in,v retrieving revision 1.1.1.12 retrieving revision 1.1.1.13 diff -u -p -r1.1.1.12 -r1.1.1.13 --- Makefile.in 10 Jun 2004 19:05:36 -0000 1.1.1.12 +++ Makefile.in 26 Dec 2007 03:54:59 -0000 1.1.1.13 @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.7.9 from Makefile.am. +# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ -# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -28,7 +28,6 @@ # 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. - srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -36,7 +35,6 @@ 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 @@ -50,6 +48,46 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +subdir = . +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(srcdir)/cvs.spec.in $(top_srcdir)/configure \ + $(top_srcdir)/emx/Makefile.in $(top_srcdir)/os2/Makefile.in \ + $(top_srcdir)/zlib/Makefile.in AUTHORS COPYING COPYING.LIB \ + ChangeLog INSTALL NEWS TODO compile depcomp install-sh \ + mdate-sh missing mkinstalldirs ylwrap +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.in +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 = cvs.spec emx/Makefile os2/Makefile zlib/Makefile +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-exec-recursive install-info-recursive \ + install-recursive installcheck-recursive installdirs-recursive \ + pdf-recursive ps-recursive uninstall-info-recursive \ + uninstall-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } +DIST_ARCHIVES = $(distdir).tar.gz $(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@ @@ -119,6 +157,8 @@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ @@ -132,6 +172,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ +mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ @@ -139,6 +180,7 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +with_default_rsh = @with_default_rsh@ # Unix source subdirs, where we'll want to run lint and etags: # This is a legacy variable from b4 Automake @@ -147,7 +189,6 @@ USOURCE_SUBDIRS = lib zlib diff src SUBDIRS = $(USOURCE_SUBDIRS) man doc contrib tools \ windows-NT os2 emx vms - EXTRA_DIST = \ .cvsignore \ BUGS \ @@ -168,43 +209,42 @@ EXTRA_DIST = \ cvs.spec \ mktemp.sh -subdir = . -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = cvs.spec emx/Makefile os2/Makefile zlib/Makefile -DIST_SOURCES = - -RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \ - ps-recursive install-info-recursive uninstall-info-recursive \ - all-recursive install-data-recursive install-exec-recursive \ - installdirs-recursive install-recursive uninstall-recursive \ - check-recursive installcheck-recursive -DIST_COMMON = README $(srcdir)/Makefile.in $(srcdir)/configure AUTHORS \ - COPYING COPYING.LIB ChangeLog INSTALL Makefile.am NEWS TODO \ - acinclude.m4 aclocal.m4 compile config.h.in configure \ - configure.in cvs.spec.in depcomp install-sh mdate-sh missing \ - mkinstalldirs -DIST_SUBDIRS = $(SUBDIRS) all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: - -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) +am--refresh: + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ + cd $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile -Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe) +.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: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck -$(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) - cd $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4 +$(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 @@ -216,14 +256,14 @@ config.h: stamp-h1 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@ $(top_srcdir)/configure.in $(ACLOCAL_M4) +$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_srcdir) && $(AUTOHEADER) - touch $(srcdir)/config.h.in + rm -f stamp-h1 + touch $@ distclean-hdr: -rm -f config.h stamp-h1 -cvs.spec: $(top_builddir)/config.status cvs.spec.in +cvs.spec: $(top_builddir)/config.status $(srcdir)/cvs.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ emx/Makefile: $(top_builddir)/config.status $(top_srcdir)/emx/Makefile.in cd $(top_builddir) && $(SHELL) ./config.status $@ @@ -240,7 +280,13 @@ uninstall-info-am: # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @set fnord $$MAKEFLAGS; amf=$$2; \ + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ @@ -252,7 +298,7 @@ $(RECURSIVE_TARGETS): local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ @@ -260,7 +306,13 @@ $(RECURSIVE_TARGETS): mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: - @set fnord $$MAKEFLAGS; amf=$$2; \ + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ @@ -281,7 +333,7 @@ maintainer-clean-recursive: local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ @@ -292,14 +344,6 @@ ctags-recursive: test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done -ETAGS = etags -ETAGSFLAGS = - -CTAGS = ctags -CTAGSFLAGS = - -tags: TAGS - ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -308,19 +352,22 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique +tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ - if (etags --etags-include --version) >/dev/null 2>&1; then \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ + empty_fix=.; \ else \ include_option=--include; \ + empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -f $$subdir/TAGS && \ + test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ @@ -330,10 +377,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCE 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 - + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) @@ -356,24 +404,11 @@ GTAGS: distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - -top_distdir = . -distdir = $(PACKAGE)-$(VERSION) - -am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } - -GZIP_ENV = --best -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) - $(mkinstalldirs) $(distdir)/. $(distdir)/contrib $(distdir)/doc $(distdir)/emx $(distdir)/os2 $(distdir)/src $(distdir)/windows-NT $(distdir)/zlib + $(mkdir_p) $(distdir)/. $(distdir)/contrib $(distdir)/doc $(distdir)/emx $(distdir)/lib $(distdir)/os2 $(distdir)/src $(distdir)/windows-NT $(distdir)/zlib @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ @@ -385,7 +420,7 @@ distdir: $(DISTFILES) dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ - $(mkinstalldirs) "$(distdir)$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ @@ -400,15 +435,17 @@ distdir: $(DISTFILES) || exit 1; \ fi; \ done - list='$(SUBDIRS)'; for subdir in $$list; do \ + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d $(distdir)/$$subdir \ - || mkdir $(distdir)/$$subdir \ + test -d "$(distdir)/$$subdir" \ + || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" \ - distdir=../$(distdir)/$$subdir \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ @@ -419,24 +456,46 @@ distdir: $(DISTFILES) ! -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 + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) - dist-bzip2: distdir - $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir - $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist - $(am__remove_distdir) - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst @@ -456,19 +515,20 @@ distcheck: dist distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ - (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \ - && rm -f $(distdir).tar.gz \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) - @echo "$(distdir).tar.gz is ready for distribution" | \ - sed 'h;s/./=/g;p;x;p;x' + @(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 \ @@ -492,7 +552,6 @@ check: check-recursive all-am: Makefile config.h installdirs: installdirs-recursive installdirs-am: - install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive @@ -512,7 +571,7 @@ mostlyclean-generic: clean-generic: distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -530,6 +589,8 @@ dvi: dvi-recursive dvi-am: +html: html-recursive + info: info-recursive info-am: @@ -566,22 +627,20 @@ uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive -.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \ - clean-generic clean-recursive ctags ctags-recursive dist \ - dist-all dist-bzip2 dist-gzip distcheck distclean \ - distclean-generic distclean-hdr distclean-recursive \ - distclean-tags distcleancheck distdir distuninstallcheck dvi \ - dvi-am dvi-recursive info info-am info-recursive install \ - install-am install-data install-data-am install-data-recursive \ - install-exec install-exec-am install-exec-recursive \ - install-info install-info-am install-info-recursive install-man \ - install-recursive install-strip installcheck installcheck-am \ - installdirs installdirs-am installdirs-recursive \ - maintainer-clean maintainer-clean-generic \ - maintainer-clean-recursive mostlyclean mostlyclean-generic \ - mostlyclean-recursive pdf pdf-am pdf-recursive ps ps-am \ - ps-recursive tags tags-recursive uninstall uninstall-am \ - uninstall-info-am uninstall-info-recursive uninstall-recursive +.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ + check-am clean clean-generic clean-recursive ctags \ + ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \ + dist-tarZ dist-zip distcheck distclean distclean-generic \ + distclean-hdr distclean-recursive 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-info \ + install-info-am install-man install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic maintainer-clean-recursive \ + mostlyclean mostlyclean-generic mostlyclean-recursive pdf \ + pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ + uninstall-info-am .PHONY: localcheck remotecheck Index: NEWS =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/NEWS,v retrieving revision 1.1.1.13 retrieving revision 1.1.1.14 diff -u -p -r1.1.1.13 -r1.1.1.14 --- NEWS 10 Jun 2004 19:05:37 -0000 1.1.1.13 +++ NEWS 26 Dec 2007 03:55:00 -0000 1.1.1.14 @@ -1,6 +1,208 @@ -Changes since 1.11.16: +Changes since 1.11.21: ********************** +BUG FIXES + +* The CVS client again correctly reports files with conflicts when using + servers running CVS 1.11.20/1.12.12, or earlier (and maybe 3rd party + servers). + +* The GSSAPI server should now build under HP-UX. + +* `cvs rtag' now correctly tags files that have been removed from the trunk. + +* Code efficiency has been improved slightly. + +* A rare race condition that could leave a lock on the val-tags file has been + avoided. + +* A potential buffer overflow in the history command has been fixed. + +* Thanks to a report and patch from Garrett Rooney , paused + trigger processes no longer cause the CVS server to consume 100% CPU. + +* Thanks to a suggestion from Joseph P. Skudlarek , an + :extssh: has been added as a synonym of the :ext: access method, as a + kindness to users of old version of Eclipse. + +* Misc documentation updates and minor bug fixes. + +Changes from 1.11.20 to 1.11.21: +******************************** + +BUG FIXES + +* Thanks to Serguei E. Leontiev , CVS with Kerberos 5 GSSAPI + should automatically link on FreeBSD 5.x. (bug #14639). + +* Thanks to Rahul Bhargava , heavily loaded systems + suffering from a disk crash or power failure will not lose data they claimed + to have committed. + +* CVS server now handles conflict markers in Entry requests as documented. + +* CVS now remembers that binary file merge conflicts occurred until the + timestamp of the updated binary file changes. + +* CVS client now saves some bandwidth by not sending the contents of files + with conflicts to the server when it isn't needed. + +* CVS now does correct locking during import. + +* A problem where the server could block indefinitely waiting for an EOF from + the client when compression was enabled has been fixed. + +* `cvs diff' no longer splits its arguments on spaces. + +* Thanks to an old report and patch from Stewart Brodie , a + potential crash in response to a corrupt RCS file has been fixed. + +* CVS now locks the history and val-tags files before writing to them. + Especially with large repositories, users should no longer see new warnings + about corrupt history records when using the `cvs history' command. Existing + corrupt history records will still need to be removed manually. val-tags + corruption should have had less obvious effects, but removing the + CVSROOT/val-tags file and allowing a 1.11.21 or later version of CVS to + regenerate it may eliminate a few odd behaviors and possibly cause a slight + speed up of read transactions in large repositories over time. + +BUILD ISSUES + +* The RPM spec file works again with the most modern versions of `rpm'. + +DEVELOPER ISSUES + +* We've standardized on Automake 1.9.6 to get some at new features that make + our jobs easier. See the HACKING file for more on using the autotools with + CVS. + +Changes from 1.11.19 to 1.11.20: +******************************** + +SERVER SECURITY FIXES + +* Thanks to a report from Alen Zukich , several minor + security issues have been addressed. One was a buffer overflow that is + potentially serious but which may not be exploitable, assigned CAN-2005-0753 + by the Common Vulnerabilities and Exposures Project + . Other fixes resulting from Alen's report include + repair of an arbitrary free with no known exploit and several plugged memory + leaks and potentially freed NULL pointers which may have been exploitable for + a denial of service attack. + +* Thanks to a report from Craig Monson , minor + potential vulnerabilities in the contributed Perl scripts have been fixed. + The confirmed vulnerability could allow the execution of arbitrary code on + the CVS server, but only if a user already had commit access and if one of + the contrib scripts was installed improperly, a condition which should have + been quickly visible to any administrator. The complete description of the + problem is here: . If + you were making use of any of the contributed trigger scripts on a CVS + server, you should probably still replace them with the new versions, to be + on the safe side. + + Unfortunately, our fix is incomplete. Taint-checking has been enabled in all + the contributed Perl scripts intended to be run as trigger scripts, but no + attempt has been made to ensure that they still run in taint mode. You will + most likely have to tweak the scripts in some way to make them run. Please + send any patches you find necessary back to so that we + may again ship fully enabled scripts in the future. + + You should also make sure that any home-grown Perl scripts that you might + have installed as CVS triggers also have taint-checking enabled. This can be + done by adding `-T' on the scripts' #! lines. Please try running + `perldoc perlsec' if you would like more information on general Perl security + and taint-checking. + +BUG FIXES + +* Thanks to a report and a patch from Georg Scwharz + CVS now builds without error on IRIX 5.3 + +DEVELOPER ISSUES + +* We've standardized on Automake 1.9.5 to get some at new features that make + our jobs easier. See the HACKING file for more on using the autotools with + CVS. + +Changes from 1.11.18 to 1.11.19: +******************************** + +BUG FIXES + +* Thanks to a patch from Jim Hyslop , issuing + 'cvs watch on' or 'cvs watch off' in an empty directory no longer + clears any watchers in that directory. + +* An intermittant assertion failure in checkout has been fixed. + +* Thanks to a report from Chris Bohn , all the source files + needed for the Windows "red file" fix are actually included in the + distribution. + +* Misc bug and documentation fixes. + +Changes from 1.11.17 to 1.11.18: +******************************** + +BUG FIXES + +* Thanks to a report from Gottfried Ganssauge , CVS no + longer exits when it encounters links pointing to paths containing more + than 128 characters. + +* Thanks to a report from Dan Peterson , error messages from + GSSAPI servers are no longer truncated. + +* Thanks to a report from Dan Peterson , attempts to resurrect + a file on the trunk that was added on a branch no longer causes an assertion + failure. + +* Thanks to a report from Dan Peterson , imports to branches + like "1.1." no longer create corrupt RCS archives. + +* Thanks to a report from Chris Bohn , links from J.C. Hamlin + , and code posted by Jonathan Gilligan, we think we have + finally corrected the Windows "red-file" (daylight savings time) bug once and + for all. + +* Thanks to a patch from Jeroen Ruigrok/asmodai , the + log_accum.pl script should no longer elicit warnings from Perl 5.8.5. + +* The r* commands (rlog, rls, etc.) can once again handle requests to run + against the entire repository (e.g. `cvs rlog .'). Thanks go to Dan Peterson + for the report. + +* A problem where the attempted access of files via tags beginning with spaces + could cause the CVS server to hang has been fixed. This was a particular + problem with WinCVS clients because users would sometimes accidentally + include spaces in tags pasted into a dialog box. This fix also altered some + of the error messages generated by the use of invalid tags. Thanks go to Dan + Peterson for the report. + +* Thanks to James E Wilson for a bug fix to + modules processing "gcc-core -a !gcc/f gcc" will no longer exclude + gcc/fortran by mistake. + +* Thanks to Conrad Pino , the Windows build works once again. + +* Misc updates to the manual. + +DEVELOPER ISSUES + +* We've standardized on Automake 1.9.3 to get some at new features that make + our jobs easier. See the note below on the Autoconf upgrade for more + details. + +* We've standardized on Autoconf version 2.59 to get presumed bug fixes and + features, but nothing specific. Mostly, once we decide to upgrade one of the + autotools we just figure it'll save time later to grab the most current + versions of the others too. See the HACKING file for more on using the + autotools with CVS. + +Changes from 1.11.16 to 1.11.17: +******************************** + SERVER SECURITY FIXES * Thanks to Stefan Esser & Sebastian Krahmer, several potential security Index: README =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/README,v retrieving revision 1.1.1.6 retrieving revision 1.1.1.7 diff -u -p -r1.1.1.6 -r1.1.1.7 --- README 15 Apr 2004 01:01:54 -0000 1.1.1.6 +++ README 26 Dec 2007 03:54:59 -0000 1.1.1.7 @@ -1,12 +1,13 @@ CVS Kit - Copyright (c) 1993-1994 Brian Berliner - Copyright (c) 1992 Brian Berliner and Jeff Polk - Copyright (c) 1989-1992, Brian Berliner - Copyright (c) 1998-2004 Free Software Foundation, - Derek Price, - & Ximbiot - All Rights Reserved + Copyright (C) 1986-2005 Free Software Foundation, Inc. + + Portions Copyright (C) 1998-2005 Derek Price, + & Ximbiot . + Portions Copyright (C) 1993-1994 Brian Berliner. + Portions Copyright (C) 1992 Brian Berliner and Jeff Polk. + Portions Copyright (C) 1989-1992 Brian Berliner. + All Rights Reserved 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 @@ -74,6 +75,20 @@ compatibility problems with CVS 1.5 or l ------------------------------------------------------------------------------- +Verifying the Integrity of Downloads: + +The official CVS source and binary releases are signed by the CVS maintainer +who generated them. This does not imply any sort of warranty, but it does mean +that you can verify that the file you downloaded did, in fact, come from a CVS +maintainer. + +The OpenPGP keys of the CVS maintainers who have submitted them are in the KEYS +file of the CVS distribution and are also available from many OpenPGP key +servers. It is recommended that you verify the key fingerprints against an +external source, however you obtain the key. + +------------------------------------------------------------------------------- + Installation: Please read the INSTALL file for installation instructions. Brief summary: @@ -98,19 +113,31 @@ cvs.texinfo and re-generate cvs.ps using * How do I get up-to-date information and information about other versions of CVS? -On the web, http://www.loria.fr/~molli/cvs-index.html. - See also - http://www.cvshome.org + http://cvs.nongnu.org + http://www.cvsnt.org + +Anyone can add themselves to the following mailing lists: -The mailing list for CVS is info-cvs@gnu.org. Send -subscription and removal requests for that list to -info-cvs-request@gnu.org. + bug-cvs: This is the list which users are requested to send bug reports + to. General CVS development and design discussions also tend to take + place on this list. + info-cvs: This list is intended for user questions, including general + help requests. + cvs-announce: CVS release announcements and other major + announcements about the project are sent to this list. + cvs-announce-binaries: Announcements are made to this list + when binaries for various platforms are built and initially + posted for download. + +To subscribe to any of these lists, send mail to -request@nongnu.org +or visit http://savannah.nongnu.org/mail/?group=cvs and follow the instructions +for the list you wish to subscribe to. The newsgroup for CVS (and other configuration management systems) is -comp.software.config-mgmt. There is not yet a CVS-specific newsgroup, -but perhaps if comp.software.config-mgmt gets enough CVS discussion, -then it will be possible to create one. +comp.software.config-mgmt. The gnu.cvs.help newsgroup is a 2-way mirror +of the info-cvs@nongnu.org mailing list and gnu.cvs.bug is similarly a 2-way +mirror of bug-cvs@nongnu.org. ------------------------------------------------------------------------------- Index: TESTS =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/TESTS,v retrieving revision 1.1.1.7 retrieving revision 1.1.1.8 diff -u -p -r1.1.1.7 -r1.1.1.8 --- TESTS 15 Apr 2004 01:01:55 -0000 1.1.1.7 +++ TESTS 26 Dec 2007 03:55:00 -0000 1.1.1.8 @@ -211,20 +211,24 @@ false when executed and are intended to "if $remote; then ... ; else ... ; fi" - * $testdir = the directory this test is taking place in - (CVSROOT=$testdir/cvsroot or CVSROOT=:fork:$testdir/cvsroot) - * $testcvs = full path to the cvs executable we are testing - * $PLUS = expr dependant uninterpreted '+' since this can vary - * $DOTSTAR = expr dependant _interpreted_ .* since some exprs don't match - EOL - * $username = regexp to match a username - * $hostname = regexp to match a hostname - * $PROG = regexp to match progname in CVS error messages - * $remote = ':' (true) or 'false', depending on whether the script is - running with a remote CVSROOT - * $keep = ':' (true) or 'false'. When set, the first test run will - leave any files and directories it created in $testdir and - exit when complete. + * $testdir = the directory this test is taking place in + (CVSROOT=$testdir/cvsroot or + CVSROOT=:fork:$testdir/cvsroot) + * $testcvs = full path to the cvs executable we are testing + * $PLUS = expr dependant uninterpreted '+' since this can vary + * $DOTSTAR = expr dependant _interpreted_ .* since some exprs don't + match EOL + * $username = the username of the user running the tests + * $username8 = the first 8 characters of $username, output by some + system and CVS commands + * $anyusername = regexp to match any valid system or CVS username + * $hostname = regexp to match a hostname + * $PROG = regexp to match progname in CVS error messages + * $remote = ':' (true) or 'false', depending on whether the script is + running with a remote CVSROOT + * $keep = ':' (true) or 'false'. When set, the first test run will + leave any files and directories it created in $testdir and + exit when complete. And, of course, some characters like '.' in regexps need to be '\' escaped when you mean them literally. Some characters may be interpreted by the shell, Index: TODO =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/TODO,v retrieving revision 1.1.1.10 retrieving revision 1.1.1.11 diff -u -p -r1.1.1.10 -r1.1.1.11 --- TODO 15 Apr 2004 01:01:55 -0000 1.1.1.10 +++ TODO 26 Dec 2007 03:55:00 -0000 1.1.1.11 @@ -1,20 +1,5 @@ The "TODO" file! -*-Indented-Text-*- -22. Catch signals for cleanup when "add"ing files. - -24. Insist on a log message. - (If done, this should be configurable via commitinfo or some new - config file -kingdon, Jun 1995). - -30. Add "rdiff" & "rtag" program options to the modules database. These - commands seem hard to use since these commands deal directly with the - RCS ,v files. (perhaps should think a little harder about what this is - trying to accomplish and what the best way is -kingdon, Jul 1997). - -31. Think hard about ^C recovery. - One particular issue: RCS removes the ,foo.c, file on ^C and CVS - doesn't. - 38. Think hard about using RCS state information to allow one to checkin a new vendor release without having it be accessed until it has been integrated into the local changes. @@ -27,11 +12,6 @@ The "TODO" file! PRCS 1.0 was particularly bad the way it handled the "invisible state", but 1.2 is significantly better. -49. cvs xxx commands should be able to deal with files in other - directories. I want to do a cvs add foo/bar.c. - [[ most commands now use the generic recursion processor, but not all; - this note is left here to remind me to fix the others ]] - 52. SCCS has a feature that I would *love* to see in CVS, as it is very useful. One may make a private copy of SCCS suid to a particular user, so other users in the authentication list may check files in and out of @@ -73,13 +53,6 @@ The "TODO" file! can only support symlinks that are relative and within the scope of the sources being controlled. -92. Look into this: - After a bit of soul searching via dbx, I realized my sin was that I'd - specified "echo" as the program to call from loginfo. The commit - procedure worked fine till it hit my echo, then silently aborted - leaving the lockfiles intact. Since I needn't use the loginfo - facility, I simply removed those commands and it all works. - 93. Need to think hard about release and development environments. Think about execsets as well. @@ -131,9 +104,6 @@ The "TODO" file! error. I think a later cvs get sys seemed to work so perhaps something is amiss in handling multiple arguments to cvs get? -113. The "cvs update" command should tee its output to a log file in ".". - (why? What is wrong with piping stdout to "tee"? -kingdon, Jun 1995) - 119. When importing a directory tree that is under SCCS/RCS control, consider an option to have import checkout the SCCS/RCS files if necessary. (This is if someone wants to import something which @@ -888,3 +858,8 @@ wait interval. 230. Support for options like compression as part of the CVSROOT might be nice. This should be fairly easy to implement now using the method options. + +234. Noop commands should be logged in the history file. Information can +still be obtained with noop commands, for instance via `cvs -n up -p', and +paranoid admins might appreciate this. Similarly, perhaps diff operations +should be logged. Index: acinclude.m4 =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/acinclude.m4,v retrieving revision 1.1.1.5 retrieving revision 1.1.1.6 diff -u -p -r1.1.1.5 -r1.1.1.6 --- acinclude.m4 10 Jun 2004 19:05:37 -0000 1.1.1.5 +++ acinclude.m4 26 Dec 2007 03:54:59 -0000 1.1.1.6 @@ -211,6 +211,11 @@ when using GSSAPI.]) AC_SEARCH_LIBS([__dn_expand], [resolv]) # + # crypto Need by gssapi under FreeBSD 5.4 + # + AC_SEARCH_LIBS([RC4], [crypto]) + + # # crypt Needed by roken under FreeBSD 4.6. # AC_SEARCH_LIBS([crypt], [crypt]) @@ -254,17 +259,22 @@ when using GSSAPI.]) AC_SEARCH_LIBS([krb5_free_context], [krb5]) # + # gss This may be the only lib needed under HP-UX, so find it + # first. + # # gssapi_krb5 Only lib needed with MIT K5 v1.2.1, so find it first in # order to prefer MIT Kerberos. If both MIT & Heimdal # Kerberos are installed and in the path, this will leave # some of the libraries above in LIBS unnecessarily, but # noone would ever do that, right? # + # gss HP-UX ??? + # # gssapi_krb5 MIT K5 v1.2.2-beta1 -lkrb5 # # gssapi Heimdal K 0.3d -lkrb5 # - AC_SEARCH_LIBS([gss_import_name], [gssapi_krb5 gssapi]) + AC_SEARCH_LIBS([gss_import_name], [gss gssapi_krb5 gssapi]) fi ])dnl Index: aclocal.m4 =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/aclocal.m4,v retrieving revision 1.1.1.5 retrieving revision 1.1.1.6 diff -u -p -r1.1.1.5 -r1.1.1.6 --- aclocal.m4 10 Jun 2004 19:05:37 -0000 1.1.1.5 +++ aclocal.m4 26 Dec 2007 03:54:59 -0000 1.1.1.6 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.7.9 -*- Autoconf -*- +# generated automatically by aclocal 1.9.6 -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,684 +11,32 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. -/* 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. */ - -AC_DEFUN([ACX_WITH_GSSAPI],[ -# -# Use --with-gssapi[=DIR] to enable GSSAPI support. -# -# defaults to enabled with DIR in default list below -# -# Search for /SUNHEA/ and read the comments about this default below. -# -AC_ARG_WITH( - [gssapi], - AC_HELP_STRING( - [--with-gssapi], - [GSSAPI directory (default autoselects)]), , - [with_gssapi=yes])dnl - -dnl -dnl FIXME - cache withval and obliterate later cache values when options change -dnl -# -# Try to locate a GSSAPI installation if no location was specified, assuming -# GSSAPI was enabled (the default). -# -if test -n "$acx_gssapi_cv_gssapi"; then - # Granted, this is a slightly ugly way to print this info, but the - # AC_CHECK_HEADER used in the search for a GSSAPI installation makes using - # AC_CACHE_CHECK worse - AC_MSG_CHECKING([for GSSAPI]) -else :; fi -AC_CACHE_VAL([acx_gssapi_cv_gssapi], [ -if test x$with_gssapi = xyes; then - # --with but no location specified - # assume a gssapi.h or gssapi/gssapi.h locates our install. - # - # This isn't always strictly true. For instance Solaris 7's SUNHEA (header) - # package installs gssapi.h whether or not the necessary libraries are - # installed. I'm still not sure whether to consider this a bug. The long - # way around is to not consider GSSPAI installed unless gss_import_name is - # found, but that brings up a lot of other hassles, like continuing to let - # gcc & ld generate the error messages when the user uses --with-gssapi=dir - # as a debugging aid. The short way around is to disable GSSAPI by default, - # but I think Sun users have been faced with this for awhile and I haven't - # heard many complaints. - acx_gssapi_save_CPPFLAGS=$CPPFLAGS - for acx_gssapi_cv_gssapi in yes /usr/kerberos /usr/cygnus/kerbnet no; do - if test x$acx_gssapi_cv_gssapi = xno; then - break - fi - if test x$acx_gssapi_cv_gssapi = xyes; then - AC_MSG_CHECKING([for GSSAPI]) - AC_MSG_RESULT([]) - else - CPPFLAGS="$acx_gssapi_save_CPPFLAGS -I$acx_gssapi_cv_gssapi/include" - AC_MSG_CHECKING([for GSSAPI in $acx_gssapi_cv_gssapi]) - AC_MSG_RESULT([]) - fi - unset ac_cv_header_gssapi_h - unset ac_cv_header_gssapi_gssapi_h - unset ac_cv_header_krb5_h - AC_CHECK_HEADERS([gssapi.h gssapi/gssapi.h krb5.h]) - if (test "$ac_cv_header_gssapi_h" = yes || - test "$ac_cv_header_gssapi_gssapi_h" = yes) && - test "$ac_cv_header_krb5_h" = yes; then - break - fi - done - CPPFLAGS=$acx_gssapi_save_CPPFLAGS -else - acx_gssapi_cv_gssapi=$with_gssapi -fi -AC_MSG_CHECKING([for GSSAPI]) -])dnl -AC_MSG_RESULT([$acx_gssapi_cv_gssapi]) - +# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. # -# Set up GSSAPI includes for later use. We don't bother to check for -# $acx_gssapi_cv_gssapi=no here since that will be caught later. -# -if test x$acx_gssapi_cv_gssapi = xyes; then - # no special includes necessary - GSSAPI_INCLUDES="" -else - # GSSAPI at $acx_gssapi_cv_gssapi (could be 'no') - GSSAPI_INCLUDES=" -I$acx_gssapi_cv_gssapi/include" -fi - -# -# Get the rest of the information CVS needs to compile with GSSAPI support -# -if test x$acx_gssapi_cv_gssapi != xno; then - # define HAVE_GSSAPI and set up the includes - AC_DEFINE([HAVE_GSSAPI], , -[Define if you have GSSAPI with Kerberos version 5 available.]) - includeopt=$includeopt$GSSAPI_INCLUDES - - # locate any other headers - acx_gssapi_save_CPPFLAGS=$CPPFLAGS - CPPFLAGS=$CPPFLAGS$GSSAPI_INCLUDES - dnl We don't use HAVE_KRB5_H anywhere, but including it here might make it - dnl easier to spot errors by reading configure output - AC_CHECK_HEADERS([gssapi.h gssapi/gssapi.h gssapi/gssapi_generic.h krb5.h]) - # And look through them for GSS_C_NT_HOSTBASED_SERVICE or its alternatives - AC_CACHE_CHECK( - [for GSS_C_NT_HOSTBASED_SERVICE], - [acx_gssapi_cv_gss_c_nt_hostbased_service], - [ - acx_gssapi_cv_gss_c_nt_hostbased_service=no - if test "$ac_cv_header_gssapi_h" = "yes"; then - AC_EGREP_HEADER( - [GSS_C_NT_HOSTBASED_SERVICE], [gssapi.h], - [acx_gssapi_cv_gss_c_nt_hostbased_service=yes], - [ - AC_EGREP_HEADER( - [gss_nt_service_name], [gssapi.h], - [acx_gssapi_cv_gss_c_nt_hostbased_service=gss_nt_service_name]) - ]) - fi - if test $acx_gssapi_cv_gss_c_nt_hostbased_service = no && - test "$ac_cv_header_gssapi_gssapi_h" = "yes"; then - AC_EGREP_HEADER( - [GSS_C_NT_HOSTBASED_SERVICE], [gssapi/gssapi.h], - [acx_gssapi_cv_gss_c_nt_hostbased_service=yes], - [ - AC_EGREP_HEADER([gss_nt_service_name], [gssapi/gssapi.h], - [acx_gssapi_cv_gss_c_nt_hostbased_service=gss_nt_service_name]) - ]) - else :; fi - if test $acx_gssapi_cv_gss_c_nt_hostbased_service = no && - test "$ac_cv_header_gssapi_gssapi_generic_h" = "yes"; then - AC_EGREP_HEADER( - [GSS_C_NT_HOSTBASED_SERVICE], [gssapi/gssapi_generic.h], - [acx_gssapi_cv_gss_c_nt_hostbased_service=yes], - [ - AC_EGREP_HEADER( - [gss_nt_service_name], [gssapi/gssapi_generic.h], - [acx_gssapi_cv_gss_c_nt_hostbased_service=gss_nt_service_name]) - ]) - else :; fi - ]) - if test $acx_gssapi_cv_gss_c_nt_hostbased_service != yes && - test $acx_gssapi_cv_gss_c_nt_hostbased_service != no; then - # don't define for yes since that means it already means something and - # don't define for no since we'd rather the compiler catch the error - # It's debatable whether we'd prefer that the compiler catch the error - # - it seems our estranged developer is more likely to be familiar with - # the intricacies of the compiler than with those of autoconf, but by - # the same token, maybe we'd rather alert them to the fact that most - # of the support they need to fix the problem is installed if they can - # simply locate the appropriate symbol. - AC_DEFINE_UNQUOTED( - [GSS_C_NT_HOSTBASED_SERVICE], - [$acx_gssapi_cv_gss_c_nt_hostbased_service], -[Define to an alternative value if GSS_C_NT_HOSTBASED_SERVICE isn't defined -in the gssapi.h header file. MIT Kerberos 1.2.1 requires this. Only relevant -when using GSSAPI.]) - else :; fi - - CPPFLAGS=$acx_gssapi_save_CPPFLAGS - - # Expect the libs to be installed parallel to the headers - # - # We could try once with and once without, but I'm not sure it's worth the - # trouble. - if test x$acx_gssapi_cv_gssapi != xyes; then - if test -z "$LIBS"; then - LIBS="-L$acx_gssapi_cv_gssapi/lib" - else - LIBS="-L$acx_gssapi_cv_gssapi/lib $LIBS" - fi - else :; fi - - dnl What happens if we want to enable, say, krb5 and some other GSSAPI - dnl authentication method at the same time? - # - # Some of the order below is particular due to library dependencies - # - - # - # des Heimdal K 0.3d, but Heimdal seems to be set up such - # that it could have been installed from elsewhere. - # - AC_SEARCH_LIBS([des_set_odd_parity], [des]) - - # - # com_err Heimdal K 0.3d - # - # com_err MIT K5 v1.2.2-beta1 - # - AC_SEARCH_LIBS([com_err], [com_err]) - - # - # asn1 Heimdal K 0.3d -lcom_err - # - AC_SEARCH_LIBS([initialize_asn1_error_table_r], [asn1]) - - # - # resolv required, but not installed by Heimdal K 0.3d - # - # resolv MIT K5 1.2.2-beta1 - # Linux 2.2.17 - # - AC_SEARCH_LIBS([__dn_expand], [resolv]) - - # - # crypt Needed by roken under FreeBSD 4.6. - # - AC_SEARCH_LIBS([crypt], [crypt]) - - # - # roken Heimdal K 0.3d -lresolv - # roken FreeBSD 4.6 -lcrypt - # - AC_SEARCH_LIBS([roken_gethostbyaddr], [roken]) - - # - # k5crypto MIT K5 v1.2.2-beta1 - # - AC_SEARCH_LIBS([valid_enctype], [k5crypto]) - - # - # gen ? ? ? Needed on Irix 5.3 with some - # Irix 5.3 version of Kerberos. I'm not - # sure which since Irix didn't - # get any testing this time - # around. Original comment: - # - # This is necessary on Irix 5.3, in order to link against libkrb5 -- - # there, an_to_ln.o refers to things defined only in -lgen. - # - AC_SEARCH_LIBS([compile], [gen]) - - # - # krb5 ? ? ? -lgen -l??? - # Irix 5.3 - # - # krb5 MIT K5 v1.1.1 - # - # krb5 MIT K5 v1.2.2-beta1 -lcrypto -lcom_err - # Linux 2.2.17 - # - # krb5 MIT K5 v1.2.2-beta1 -lcrypto -lcom_err -lresolv - # - # krb5 Heimdal K 0.3d -lasn1 -lroken -ldes - # - AC_SEARCH_LIBS([krb5_free_context], [krb5]) - - # - # gssapi_krb5 Only lib needed with MIT K5 v1.2.1, so find it first in - # order to prefer MIT Kerberos. If both MIT & Heimdal - # Kerberos are installed and in the path, this will leave - # some of the libraries above in LIBS unnecessarily, but - # noone would ever do that, right? - # - # gssapi_krb5 MIT K5 v1.2.2-beta1 -lkrb5 - # - # gssapi Heimdal K 0.3d -lkrb5 - # - AC_SEARCH_LIBS([gss_import_name], [gssapi_krb5 gssapi]) -fi -])dnl - - - -# size_max.m4 serial 2 -dnl Copyright (C) 2003 Free Software Foundation, Inc. -dnl This file is free software, distributed under the terms of the GNU -dnl General Public License. As a special exception to the GNU General -dnl Public License, this file may be distributed as part of a program -dnl that contains a configuration script generated by Autoconf, under -dnl the same distribution terms as the rest of that program. - -dnl From Bruno Haible. - -AC_DEFUN([gl_SIZE_MAX], -[ - AC_CHECK_HEADERS(stdint.h) - dnl First test whether the system already has SIZE_MAX. - AC_MSG_CHECKING([for SIZE_MAX]) - result= - AC_EGREP_CPP([Found it], [ -#include -#if HAVE_STDINT_H -#include -#endif -#ifdef SIZE_MAX -Found it -#endif -], result=yes) - if test -z "$result"; then - dnl Define it ourselves. Here we assume that the type 'size_t' is not wider - dnl than the type 'unsigned long'. - dnl The _AC_COMPUTE_INT macro works up to LONG_MAX, since it uses 'expr', - dnl which is guaranteed to work from LONG_MIN to LONG_MAX. - _AC_COMPUTE_INT([~(size_t)0 / 10], res_hi, - [#include ], result=?) - _AC_COMPUTE_INT([~(size_t)0 % 10], res_lo, - [#include ], result=?) - _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint, - [#include ], result=?) - if test "$fits_in_uint" = 1; then - dnl Even though SIZE_MAX fits in an unsigned int, it must be of type - dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'. - AC_TRY_COMPILE([#include - extern size_t foo; - extern unsigned long foo; - ], [], fits_in_uint=0) - fi - if test -z "$result"; then - if test "$fits_in_uint" = 1; then - result="$res_hi$res_lo"U - else - result="$res_hi$res_lo"UL - fi - else - dnl Shouldn't happen, but who knows... - result='~(size_t)0' - fi - fi - AC_MSG_RESULT([$result]) - if test "$result" != yes; then - AC_DEFINE_UNQUOTED([SIZE_MAX], [$result], - [Define as the maximum value of type 'size_t', if the system doesn't define it.]) - fi -]) - - - -# xsize.m4 serial 3 -dnl Copyright (C) 2003-2004 Free Software Foundation, Inc. -dnl This file is free software, distributed under the terms of the GNU -dnl General Public License. As a special exception to the GNU General -dnl Public License, this file may be distributed as part of a program -dnl that contains a configuration script generated by Autoconf, under -dnl the same distribution terms as the rest of that program. - -AC_DEFUN([gl_XSIZE], -[ - dnl Prerequisites of lib/xsize.h. - AC_REQUIRE([gl_SIZE_MAX]) - AC_REQUIRE([AC_C_INLINE]) - AC_CHECK_HEADERS(stdint.h) -]) - -# 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 10 - -AC_PREREQ([2.54]) - -# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow -# the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl - -# 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_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 -# 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]) - -# Copyright 2002 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 +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. -AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"]) +AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], - [AM_AUTOMAKE_VERSION([1.7.9])]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright 2001, 2002 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_AUTOMAKE_VERSION([1.9.6])]) -# _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])]) +# AM_AUX_DIR_EXPAND -*- Autoconf -*- +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # -# Check to make sure that the build environment is sane. -# - -# Copyright 1996, 1997, 2000, 2001 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)]) - -# -*- Autoconf -*- - - -# Copyright 1997, 1999, 2000, 2001 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_AUX_DIR_EXPAND - -# Copyright 2001 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. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to @@ -728,131 +76,55 @@ fi # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. -# Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50]) - -AC_DEFUN([AM_AUX_DIR_EXPAND], [ +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_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. - -# Copyright 2001 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)]) - -# AM_PROG_INSTALL_STRIP - -# Copyright 2001 Free Software Foundation, Inc. +# AM_CONDITIONAL -*- Autoconf -*- -# 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])]) - -# -*- 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. +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# serial 1 +# serial 7 -# 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=. +# 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 - am__leading_dot=_ + $1_TRUE='#' + $1_FALSE= fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# serial 5 -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +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])]) -# 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 (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. +# serial 8 # 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, @@ -861,7 +133,6 @@ AC_SUBST([am__leading_dot])]) # CC etc. in the Makefile, will ask for an AC_PROG_CC use... - # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. @@ -920,7 +191,9 @@ AC_CACHE_CHECK([dependency style of $dep : > 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 + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf @@ -948,9 +221,14 @@ AC_CACHE_CHECK([dependency style of $dep 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 + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi @@ -984,8 +262,8 @@ AC_SUBST([DEPDIR], ["${am__leading_dot}d # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking Speeds up one-time builds - --enable-dependency-tracking Do not reject slow dependency extractors]) +[ --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='\' @@ -994,26 +272,16 @@ AM_CONDITIONAL([AMDEP], [test "x$enable_ AC_SUBST([AMDEPBACKSLASH]) ]) -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +# Generate code to set up dependency tracking. -*- Autoconf -*- -# 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 (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -#serial 2 +#serial 3 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ @@ -1032,27 +300,21 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS 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"` + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # 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" | \ + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. 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 " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue @@ -1069,35 +331,214 @@ done # ----------------------------- # 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"]) -]) +# 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"]) +]) + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 8 + +# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. +AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 12 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.58])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +# test to see if srcdir already configured +if test "`cd $srcdir && pwd`" != "`pwd`" && + test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_PROG_INSTALL_SH +AM_PROG_INSTALL_STRIP +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +]) +]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $1 | $1:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +install_sh=${install_sh-"$am_aux_dir/install-sh"} +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- +# From Jim Meyering + +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# Check to see how 'make' treats includes. -*- Autoconf -*- +# serial 4 + +AC_DEFUN([AM_MAINTAINER_MODE], +[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode is disabled by default + AC_ARG_ENABLE(maintainer-mode, +[ --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer], + USE_MAINTAINER_MODE=$enableval, + USE_MAINTAINER_MODE=no) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST(MAINT)dnl +] +) -# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. +AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) -# 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. +# Check to see how 'make' treats includes. -*- Autoconf -*- -# 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 (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# serial 2 +# serial 3 # AM_MAKE_INCLUDE() # ----------------- @@ -1141,152 +582,339 @@ AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) -# AM_CONDITIONAL -*- Autoconf -*- +# Copyright (C) 1999, 2000, 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# Copyright 1997, 2000, 2001 Free Software Foundation, Inc. +# serial 3 -# 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. +# AM_PROG_CC_C_O +# -------------- +# Like AC_PROG_CC_C_O, but changed for automake. +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 +]) -# 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. +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# serial 5 +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -AC_PREREQ(2.52) +# serial 4 -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[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='#' +# 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 - $1_TRUE='#' - $1_FALSE= + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) 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])]) +]) -# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- +# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. +# AM_PROG_MKDIR_P +# --------------- +# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. +# +# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories +# created by `make install' are always world readable, even if the +# installer happens to have an overly restrictive umask (e.g. 077). +# This was a mistake. There are at least two reasons why we must not +# use `-m 0755': +# - it causes special bits like SGID to be ignored, +# - it may be too restrictive (some setups expect 775 directories). +# +# Do not use -m 0755 and let people choose whatever they expect by +# setting umask. +# +# We cannot accept any implementation of `mkdir' that recognizes `-p'. +# Some implementations (such as Solaris 8's) are not thread-safe: if a +# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' +# concurrently, both version can detect that a/ is missing, but only +# one can create it and the other will error out. Consequently we +# restrict ourselves to GNU make (using the --version option ensures +# this.) +AC_DEFUN([AM_PROG_MKDIR_P], +[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + # We used to keeping the `.' as first argument, in order to + # allow $(mkdir_p) to be used without argument. As in + # $(mkdir_p) $(somedir) + # where $(somedir) is conditionally defined. However this is wrong + # for two reasons: + # 1. if the package is installed by a user who cannot write `.' + # make install will fail, + # 2. the above comment should most certainly read + # $(mkdir_p) $(DESTDIR)$(somedir) + # so it does not work when $(somedir) is undefined and + # $(DESTDIR) is not. + # To support the latter case, we have to write + # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), + # so the `.' trick is pointless. + mkdir_p='mkdir -p --' +else + # On NextStep and OpenStep, the `mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because `.' already + # exists. + for d in ./-p ./--version; + do + test -d $d && rmdir $d + done + # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. + if test -f "$ac_aux_dir/mkinstalldirs"; then + mkdir_p='$(mkinstalldirs)' + else + mkdir_p='$(install_sh) -d' + fi +fi +AC_SUBST([mkdir_p])]) -# 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. +# Helper functions for option handling. -*- Autoconf -*- -# 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 (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -AC_PREREQ([2.52]) +# serial 3 -# serial 6 +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) -# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. -AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) +# _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)]) -# Add --enable-maintainer-mode option to configure. -# From Jim Meyering +# _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)])]) -# Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. +# _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])]) -# 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. +# Check to make sure that the build environment is sane. -*- Autoconf -*- -# 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 (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# serial 2 +# serial 4 -AC_DEFUN([AM_MAINTAINER_MODE], -[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) - dnl maintainer-mode is disabled by default - AC_ARG_ENABLE(maintainer-mode, -[ --enable-maintainer-mode enable make rules and dependencies not useful - (and sometimes confusing) to the casual installer], - USE_MAINTAINER_MODE=$enableval, - USE_MAINTAINER_MODE=no) - AC_MSG_RESULT([$USE_MAINTAINER_MODE]) - AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) - MAINT=$MAINTAINER_MODE_TRUE - AC_SUBST(MAINT)dnl -] -) +# 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 -AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) + # 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 -# serial 2 + 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_CC_C_O -# -------------- -# Like AC_PROG_CC_C_O, but changed for automake. +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# Copyright 1999, 2000, 2001 Free Software Foundation, Inc. +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# 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. +# Check how to create a tarball. -*- Autoconf -*- -# 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 (C) 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -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 -]) +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR +m4_include([acinclude.m4]) Index: config.h.in =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/config.h.in,v retrieving revision 1.1.1.13 retrieving revision 1.1.1.14 diff -u -p -r1.1.1.13 -r1.1.1.14 --- config.h.in 10 Jun 2004 19:05:37 -0000 1.1.1.13 +++ config.h.in 26 Dec 2007 03:54:59 -0000 1.1.1.14 @@ -402,6 +402,10 @@ /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE +/* The default remote shell to use, if one does not specify the CVS_RSH + environment variable. */ +#undef RSH_DFLT + /* If you are working with a large remote repository and a 'cvs checkout' is swamping your network and memory, define these to enable flow control. You will end up with even less probability of a consistent checkout (see Index: configure =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/configure,v retrieving revision 1.1.1.14 retrieving revision 1.1.1.15 diff -u -p -r1.1.1.14 -r1.1.1.15 --- configure 10 Jun 2004 19:05:36 -0000 1.1.1.14 +++ configure 26 Dec 2007 03:55:00 -0000 1.1.1.15 @@ -1,8 +1,8 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.58 for Concurrent Versions System (CVS) 1.11.17. +# Generated by GNU Autoconf 2.59 for Concurrent Versions System (CVS) 1.11.22. # -# Report bugs to . +# Report bugs to . # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation @@ -269,9 +269,9 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='Concurrent Versions System (CVS)' PACKAGE_TARNAME='cvs' -PACKAGE_VERSION='1.11.17' -PACKAGE_STRING='Concurrent Versions System (CVS) 1.11.17' -PACKAGE_BUGREPORT='bug-cvs@gnu.org' +PACKAGE_VERSION='1.11.22' +PACKAGE_STRING='Concurrent Versions System (CVS) 1.11.22' +PACKAGE_BUGREPORT='bug-cvs@nongnu.org' ac_unique_file="src/cvs.h" # Factoring default headers for most tests. @@ -311,7 +311,7 @@ ac_includes_default="\ # 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 AWK SET_MAKE am__leading_dot ac_prefix_program MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP RANLIB ac_ct_RANLIB YACC LN_S PERL CSH MKTEMP SENDMAIL PR ROFF PS2PDF TEXI2DVI MAKE_TARGETS_IN_VPATH_TRUE MAKE_TARGETS_IN_VPATH_FALSE LIBOBJS KRB4 includeopt EDITOR LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar ac_prefix_program MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP RANLIB ac_ct_RANLIB YACC LN_S PERL CSH MKTEMP SENDMAIL PR ROFF PS2PDF TEXI2DVI MAKE_TARGETS_IN_VPATH_TRUE MAKE_TARGETS_IN_VPATH_FALSE LIBOBJS KRB4 includeopt EDITOR with_default_rsh LTLIBOBJS' ac_subst_files='MKTEMP_SH_FUNCTION' # Initialize some variables set by options. @@ -784,7 +784,7 @@ 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 Concurrent Versions System (CVS) 1.11.17 to adapt to many kinds of systems. +\`configure' configures Concurrent Versions System (CVS) 1.11.22 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -846,17 +846,17 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Concurrent Versions System (CVS) 1.11.17:";; + short | recursive ) echo "Configuration of Concurrent Versions System (CVS) 1.11.22:";; 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 builds - --enable-dependency-tracking Do not reject slow dependency extractors + --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-cvs-ndbm Use the NDBM library distributed with CVS rather than attempting to use a system NDBM library. Disabling this may not work. (default) @@ -911,6 +911,8 @@ Optional Packages: --with-gssapi GSSAPI directory (default autoselects) --with-editor The default text editor CVS should use for log messages (default autoselects) + --with-rsh The default remote shell CVS will use for :ext: + transport (default autodetects) --with-tmpdir The temporary directory CVS should use as a default (default autoselects) --with-umask Set the umask CVS will use by default in the @@ -938,7 +940,7 @@ Some influential environment variables: 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 . +Report bugs to . _ACEOF fi @@ -972,40 +974,43 @@ case $srcdir in ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -case "$ac_dir" in -.) ac_abs_builddir=$ac_builddir;; + +# 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_builddir in - .) ac_abs_builddir="$ac_dir";; - [\\/]* | ?:[\\/]* ) ac_abs_builddir=$ac_builddir;; - *) ac_abs_builddir="$ac_dir"/$ac_builddir;; + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac -case "$ac_dir" in +case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in - .) ac_abs_top_builddir="$ac_dir";; + .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir="$ac_dir"/${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac -case "$ac_dir" in +case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in - .) ac_abs_srcdir="$ac_dir";; + .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir="$ac_dir"/$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac -case "$ac_dir" in +case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in - .) ac_abs_top_srcdir="$ac_dir";; + .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir="$ac_dir"/$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac @@ -1031,8 +1036,8 @@ fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -Concurrent Versions System (CVS) configure 1.11.17 -generated by GNU Autoconf 2.58 +Concurrent Versions System (CVS) configure 1.11.22 +generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation @@ -1045,8 +1050,8 @@ 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 Concurrent Versions System (CVS) $as_me 1.11.17, which was -generated by GNU Autoconf 2.58. Invocation command line was +It was created by Concurrent Versions System (CVS) $as_me 1.11.22, which was +generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1382,7 +1387,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -am__api_version="1.7" +am__api_version="1.9" ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then @@ -1545,7 +1550,6 @@ _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` @@ -1559,6 +1563,39 @@ else echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi +if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + # We used to keeping the `.' as first argument, in order to + # allow $(mkdir_p) to be used without argument. As in + # $(mkdir_p) $(somedir) + # where $(somedir) is conditionally defined. However this is wrong + # for two reasons: + # 1. if the package is installed by a user who cannot write `.' + # make install will fail, + # 2. the above comment should most certainly read + # $(mkdir_p) $(DESTDIR)$(somedir) + # so it does not work when $(somedir) is undefined and + # $(DESTDIR) is not. + # To support the latter case, we have to write + # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), + # so the `.' trick is pointless. + mkdir_p='mkdir -p --' +else + # On NextStep and OpenStep, the `mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because `.' already + # exists. + for d in ./-p ./--version; + do + test -d $d && rmdir $d + done + # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. + if test -f "$ac_aux_dir/mkinstalldirs"; then + mkdir_p='$(mkinstalldirs)' + else + mkdir_p='$(install_sh) -d' + fi +fi + for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. @@ -1637,7 +1674,7 @@ else fi rmdir .tst 2>/dev/null - # test to see if srcdir already configured +# 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 @@ -1657,7 +1694,7 @@ fi # Define the identity of the package. PACKAGE='cvs' - VERSION='1.11.17' + VERSION='1.11.22' # Some tools Automake needs. @@ -1676,9 +1713,6 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_ru 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 @@ -1771,6 +1805,13 @@ INSTALL_STRIP_PROGRAM="\${SHELL} \$(inst # We need awk for the "check" target. The system "awk" is bad on # some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + @@ -2908,7 +2949,9 @@ else : > 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 + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf @@ -2936,9 +2979,14 @@ else 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 + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi @@ -3709,9 +3757,9 @@ echo "$as_me: WARNING: minix/config.h: p echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX -## ------------------------------ ## -## Report this to bug-cvs@gnu.org ## -## ------------------------------ ## +## --------------------------------- ## +## Report this to bug-cvs@nongnu.org ## +## --------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 @@ -5177,9 +5225,9 @@ echo "$as_me: WARNING: $ac_header: proce echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX -## ------------------------------ ## -## Report this to bug-cvs@gnu.org ## -## ------------------------------ ## +## --------------------------------- ## +## Report this to bug-cvs@nongnu.org ## +## --------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 @@ -6223,9 +6271,9 @@ echo "$as_me: WARNING: $ac_header: proce echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX -## ------------------------------ ## -## Report this to bug-cvs@gnu.org ## -## ------------------------------ ## +## --------------------------------- ## +## Report this to bug-cvs@nongnu.org ## +## --------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 @@ -7526,9 +7574,9 @@ echo "$as_me: WARNING: $ac_header: proce echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX -## ------------------------------ ## -## Report this to bug-cvs@gnu.org ## -## ------------------------------ ## +## --------------------------------- ## +## Report this to bug-cvs@nongnu.org ## +## --------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 @@ -7983,9 +8031,9 @@ echo "$as_me: WARNING: $ac_header: proce echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX -## ------------------------------ ## -## Report this to bug-cvs@gnu.org ## -## ------------------------------ ## +## --------------------------------- ## +## Report this to bug-cvs@nongnu.org ## +## --------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 @@ -8862,9 +8910,9 @@ echo "$as_me: WARNING: $ac_header: proce echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX -## ------------------------------ ## -## Report this to bug-cvs@gnu.org ## -## ------------------------------ ## +## --------------------------------- ## +## Report this to bug-cvs@nongnu.org ## +## --------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 @@ -10592,9 +10640,9 @@ echo "$as_me: WARNING: $ac_header: proce echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX -## ------------------------------ ## -## Report this to bug-cvs@gnu.org ## -## ------------------------------ ## +## --------------------------------- ## +## Report this to bug-cvs@nongnu.org ## +## --------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 @@ -10789,9 +10837,9 @@ echo "$as_me: WARNING: $ac_header: proce echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX -## ------------------------------ ## -## Report this to bug-cvs@gnu.org ## -## ------------------------------ ## +## --------------------------------- ## +## Report this to bug-cvs@nongnu.org ## +## --------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 @@ -11498,6 +11546,136 @@ fi # + # crypto Need by gssapi under FreeBSD 5.4 + # + echo "$as_me:$LINENO: checking for library containing RC4" >&5 +echo $ECHO_N "checking for library containing RC4... $ECHO_C" >&6 +if test "${ac_cv_search_RC4+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +ac_cv_search_RC4=no +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* 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 RC4 (); +int +main () +{ +RC4 (); + ; + 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 + ac_cv_search_RC4="none required" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_RC4" = no; then + for ac_lib in crypto; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* 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 RC4 (); +int +main () +{ +RC4 (); + ; + 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 + ac_cv_search_RC4="-l$ac_lib" +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_exeext conftest.$ac_ext + done +fi +LIBS=$ac_func_search_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_search_RC4" >&5 +echo "${ECHO_T}$ac_cv_search_RC4" >&6 +if test "$ac_cv_search_RC4" != no; then + test "$ac_cv_search_RC4" = "none required" || LIBS="$ac_cv_search_RC4 $LIBS" + +fi + + + # # crypt Needed by roken under FreeBSD 4.6. # echo "$as_me:$LINENO: checking for library containing crypt" >&5 @@ -12166,12 +12344,17 @@ fi # + # gss This may be the only lib needed under HP-UX, so find it + # first. + # # gssapi_krb5 Only lib needed with MIT K5 v1.2.1, so find it first in # order to prefer MIT Kerberos. If both MIT & Heimdal # Kerberos are installed and in the path, this will leave # some of the libraries above in LIBS unnecessarily, but # noone would ever do that, right? # + # gss HP-UX ??? + # # gssapi_krb5 MIT K5 v1.2.2-beta1 -lkrb5 # # gssapi Heimdal K 0.3d -lkrb5 @@ -12236,7 +12419,7 @@ fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_gss_import_name" = no; then - for ac_lib in gssapi_krb5 gssapi; do + for ac_lib in gss gssapi_krb5 gssapi; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -12420,6 +12603,90 @@ _ACEOF +# What remote shell transport should our client cvs default to using? + +# Check whether --with-rsh or --without-rsh was given. +if test "${with_rsh+set}" = set; then + withval="$with_rsh" + +else + with_rsh="remsh rsh ssh" +fi; + +if test no = "$with_rsh"; then + { echo "$as_me:$LINENO: WARNING: Failed to find usable remote shell. Using 'rsh'." >&5 +echo "$as_me: WARNING: Failed to find usable remote shell. Using 'rsh'." >&2;} + with_rsh=rsh +elif test yes = "$with_rsh"; then + # Make --with-rsh mean the same thing as --with-rsh=rsh + with_rsh=rsh +fi + +if echo $with_rsh |grep ^/ >/dev/null; then + # If $with_rsh is an absolute path, issue a warning if the executable + # doesn't exist or isn't usable, but then trust the user and use it + # regardless + with_default_rsh=$with_rsh + echo "$as_me:$LINENO: checking for a remote shell" >&5 +echo $ECHO_N "checking for a remote shell... $ECHO_C" >&6 + if ! test -f $with_rsh \ + || ! test -x $with_rsh; then + # warn the user that they may encounter problems + { echo "$as_me:$LINENO: WARNING: $with_rsh is not a path to an executable file" >&5 +echo "$as_me: WARNING: $with_rsh is not a path to an executable file" >&2;} + fi +else + # Search for a remote shell + for ac_prog in $with_rsh +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_with_default_rsh+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$with_default_rsh"; then + ac_cv_prog_with_default_rsh="$with_default_rsh" # 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_with_default_rsh="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +with_default_rsh=$ac_cv_prog_with_default_rsh +if test -n "$with_default_rsh"; then + echo "$as_me:$LINENO: result: $with_default_rsh" >&5 +echo "${ECHO_T}$with_default_rsh" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$with_default_rsh" && break +done +test -n "$with_default_rsh" || with_default_rsh=""rsh"" + +fi + + +cat >>confdefs.h <<_ACEOF +#define RSH_DFLT "$with_default_rsh" +_ACEOF + + + # Check whether --with-tmpdir or --without-tmpdir was given. if test "${with_tmpdir+set}" = set; then @@ -13006,7 +13273,7 @@ fi ac_config_files="$ac_config_files contrib/sccs2rcs" - ac_config_files="$ac_config_files doc/mkman" + ac_config_files="$ac_config_files doc/mkman:doc/mkman.pl" ac_config_files="$ac_config_files src/cvsbug" @@ -13406,8 +13673,8 @@ _ASBOX } >&5 cat >&5 <<_CSEOF -This file was extended by Concurrent Versions System (CVS) $as_me 1.11.17, which was -generated by GNU Autoconf 2.58. Invocation command line was +This file was extended by Concurrent Versions System (CVS) $as_me 1.11.22, which was +generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -13472,8 +13739,8 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -Concurrent Versions System (CVS) config.status 1.11.17 -configured by $0, generated by GNU Autoconf 2.58, +Concurrent Versions System (CVS) config.status 1.11.22 +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. @@ -13594,7 +13861,7 @@ do "contrib/rcs2log" ) CONFIG_FILES="$CONFIG_FILES contrib/rcs2log:contrib/rcs2log.sh" ;; "contrib/rcslock" ) CONFIG_FILES="$CONFIG_FILES contrib/rcslock" ;; "contrib/sccs2rcs" ) CONFIG_FILES="$CONFIG_FILES contrib/sccs2rcs" ;; - "doc/mkman" ) CONFIG_FILES="$CONFIG_FILES doc/mkman" ;; + "doc/mkman" ) CONFIG_FILES="$CONFIG_FILES doc/mkman:doc/mkman.pl" ;; "src/cvsbug" ) CONFIG_FILES="$CONFIG_FILES src/cvsbug" ;; "windows-NT/fix-msvc-mak" ) CONFIG_FILES="$CONFIG_FILES windows-NT/fix-msvc-mak:windows-NT/fix-msvc-mak-head.pl:windows-NT/fix-msvc-mak.pl" ;; "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; @@ -13712,14 +13979,17 @@ 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,@AMTAR@,$AMTAR,;t t +s,@am__tar@,$am__tar,;t t +s,@am__untar@,$am__untar,;t t s,@ac_prefix_program@,$ac_prefix_program,;t t s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t @@ -13760,6 +14030,7 @@ s,@LIBOBJS@,$LIBOBJS,;t t s,@KRB4@,$KRB4,;t t s,@includeopt@,$includeopt,;t t s,@EDITOR@,$EDITOR,;t t +s,@with_default_rsh@,$with_default_rsh,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t /@MKTEMP_SH_FUNCTION@/r $MKTEMP_SH_FUNCTION s,@MKTEMP_SH_FUNCTION@,,;t t @@ -13883,40 +14154,43 @@ case $srcdir in ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -case "$ac_dir" in -.) ac_abs_builddir=$ac_builddir;; + +# 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_builddir in - .) ac_abs_builddir="$ac_dir";; - [\\/]* | ?:[\\/]* ) ac_abs_builddir=$ac_builddir;; - *) ac_abs_builddir="$ac_dir"/$ac_builddir;; + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac -case "$ac_dir" in +case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in - .) ac_abs_top_builddir="$ac_dir";; + .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir="$ac_dir"/${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac -case "$ac_dir" in +case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in - .) ac_abs_srcdir="$ac_dir";; + .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir="$ac_dir"/$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac -case "$ac_dir" in +case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in - .) ac_abs_top_srcdir="$ac_dir";; + .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir="$ac_dir"/$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac @@ -14344,40 +14618,43 @@ case $srcdir in ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -case "$ac_dest_dir" in -.) ac_abs_builddir=$ac_builddir;; + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dest_dir";; *) - case $ac_builddir in - .) ac_abs_builddir="$ac_dest_dir";; - [\\/]* | ?:[\\/]* ) ac_abs_builddir=$ac_builddir;; - *) ac_abs_builddir="$ac_dest_dir"/$ac_builddir;; + case "$ac_dest_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dest_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dest_dir";; esac;; esac -case "$ac_dest_dir" in +case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in - .) ac_abs_top_builddir="$ac_dest_dir";; + .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir="$ac_dest_dir"/${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac -case "$ac_dest_dir" in +case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in - .) ac_abs_srcdir="$ac_dest_dir";; + .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir="$ac_dest_dir"/$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac -case "$ac_dest_dir" in +case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in - .) ac_abs_top_srcdir="$ac_dest_dir";; + .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir="$ac_dest_dir"/$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac @@ -14466,40 +14743,43 @@ case $srcdir in ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -case "$ac_dir" in -.) ac_abs_builddir=$ac_builddir;; + +# 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_builddir in - .) ac_abs_builddir="$ac_dir";; - [\\/]* | ?:[\\/]* ) ac_abs_builddir=$ac_builddir;; - *) ac_abs_builddir="$ac_dir"/$ac_builddir;; + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac -case "$ac_dir" in +case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in - .) ac_abs_top_builddir="$ac_dir";; + .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir="$ac_dir"/${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac -case "$ac_dir" in +case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in - .) ac_abs_srcdir="$ac_dir";; + .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir="$ac_dir"/$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac -case "$ac_dir" in +case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in - .) ac_abs_top_srcdir="$ac_dir";; + .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir="$ac_dir"/$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac @@ -14532,27 +14812,21 @@ echo X"$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"` + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # 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" | \ + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. 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 " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue Index: configure.in =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/configure.in,v retrieving revision 1.1.1.14 retrieving revision 1.1.1.15 diff -u -p -r1.1.1.14 -r1.1.1.15 --- configure.in 10 Jun 2004 19:05:37 -0000 1.1.1.14 +++ configure.in 26 Dec 2007 03:54:59 -0000 1.1.1.15 @@ -1,5 +1,6 @@ dnl configure.in for cvs -AC_INIT([Concurrent Versions System (CVS)],[1.11.17],[bug-cvs@gnu.org],[cvs]) +AC_INIT([Concurrent Versions System (CVS)],[1.11.22], + [bug-cvs@nongnu.org],[cvs]) AC_CONFIG_SRCDIR(src/cvs.h) AM_INIT_AUTOMAKE([gnu 1.7.9 dist-bzip2 no-define]) AC_PREREQ(2.58) @@ -496,6 +497,58 @@ dnl dnl end --with-editor dnl +dnl +dnl begin --with-rsh +dnl +dnl Many sites no longer desire the use of "rsh" as the default +dnl remote shell program. They typically favor "ssh" as the default + +# What remote shell transport should our client cvs default to using? +AC_ARG_WITH( + [rsh], + AC_HELP_STRING( + [--with-rsh], + [The default remote shell CVS will use for :ext: transport + (default autodetects)]), , + dnl `remsh' is only useful on HP-UX, where `rsh' is the `restricted shell' + dnl and `remsh' is the remote shell, but look for it first since it + dnl probably won't exist on any platform where it shouldn't be preferred + dnl to `rsh'. + [with_rsh="remsh rsh ssh"]) + +if test no = "$with_rsh"; then + AC_MSG_WARN([Failed to find usable remote shell. Using 'rsh'.]) + with_rsh=rsh +elif test yes = "$with_rsh"; then + # Make --with-rsh mean the same thing as --with-rsh=rsh + with_rsh=rsh +fi + +if echo $with_rsh |grep ^/ >/dev/null; then + # If $with_rsh is an absolute path, issue a warning if the executable + # doesn't exist or isn't usable, but then trust the user and use it + # regardless + with_default_rsh=$with_rsh + AC_MSG_CHECKING([for a remote shell]) + if ! test -f $with_rsh \ + || ! test -x $with_rsh; then + # warn the user that they may encounter problems + AC_MSG_WARN([$with_rsh is not a path to an executable file]) + fi +else + # Search for a remote shell + AC_CHECK_PROGS([with_default_rsh], [$with_rsh], "rsh") +fi + +AC_DEFINE_UNQUOTED( + [RSH_DFLT], ["$with_default_rsh"], + [The default remote shell to use, if one does not specify the + CVS_RSH environment variable.]) +dnl done with finding a default CVS_RSH value +dnl +dnl end --with-rsh +dnl + dnl dnl Find a temporary directory @@ -1021,7 +1074,7 @@ AC_CONFIG_FILES(contrib/pvcs2rcs, [chmod AC_CONFIG_FILES(contrib/rcs2log:contrib/rcs2log.sh, [chmod +x contrib/rcs2log]) AC_CONFIG_FILES(contrib/rcslock, [chmod +x contrib/rcslock]) AC_CONFIG_FILES(contrib/sccs2rcs, [chmod +x contrib/sccs2rcs]) -AC_CONFIG_FILES(doc/mkman, [chmod +x doc/mkman]) +AC_CONFIG_FILES(doc/mkman:doc/mkman.pl, [chmod +x doc/mkman]) AC_CONFIG_FILES(src/cvsbug, [chmod +x src/cvsbug]) AC_CONFIG_FILES(windows-NT/fix-msvc-mak:windows-NT/fix-msvc-mak-head.pl:windows-NT/fix-msvc-mak.pl, [chmod +x windows-NT/fix-msvc-mak]) @@ -1053,7 +1106,7 @@ m4_bmatch(m4_defn([AC_PACKAGE_VERSION]), [ cat <. +read the relevant mailing lists, most importantly . Below you will find information on the status of this version of CVS. Index: contrib/ChangeLog =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/contrib/ChangeLog,v retrieving revision 1.1.1.13 retrieving revision 1.1.1.14 diff -u -p -r1.1.1.13 -r1.1.1.14 --- contrib/ChangeLog 15 Apr 2004 01:01:55 -0000 1.1.1.13 +++ contrib/ChangeLog 26 Dec 2007 03:55:01 -0000 1.1.1.14 @@ -1,8 +1,59 @@ +2005-09-01 Derek Price + + * cvs_acls.html, cvs_acls.in, log_accum.in: Update links. + +2005-09-01 Derek Price + + * commit_prep.in, cvs_acls.in, log.in, log_accum.in, mfpipe.in, + pvcs2rcs.in, rcslock.in: Update links and email addresses. + +2005-07-12 Derek Price + + * clmerge.in, cln_hist.in, commit_prep.in, cvs2vendor.sh, cvs_acls.in, + cvscheck.sh, debug_check_log.sh, descend.sh, log.in, log_accum.in, + mfpipe.in, rcs-to-cvs.sh, rcs2log.sh, rcs2sccs.sh, rcslock.in, + sccs2rcs.in: Add copyright notices. + +2005-07-11 Derek Price + + * clmerge.in, cln_hist.in, commit_prep.in, cvs2vendor.sh, cvs_acls.in, + cvscheck.sh, debug_check_log.sh, descend.sh, log.in, log_accum.in, + mfpipe.in, rcs-to-cvs.sh, rcs2log.sh, rcs2sccs.sh, rcslock.in, + sccs2rcs.in: Update license notices. + +2005-04-14 Derek Price + + * commit_prep.in, cvs_acls.in, log.in, log_accum.in, mfpipe.in, + rcslock.in: Enable taint checking and comment. This closes cvshome.org + Issue #224. + +2005-04-08 Derek Price + + * README: Correct my email address. + +2005-01-31 Derek Price + + * Makefile.am: Update copyright notices. + +2005-01-25 Mark D. Baushke + + * cvs_acls.in: New version from + "Peter Connolly" . + * cvs_acls.html: New file from + "Peter Connolly" . + * Makefile.am (EXTRA_DIST): Add cvs_acls.html + * Makefile.in: Regenerated. + +2004-08-30 Derek Price + + * log_accum.in: Changes to supress warnings under Perl 5.8.5. + (Patch from Jeroen Ruigrok/asmodai .) + 2004-01-30 Derek Price Close issue #155. * log_accum.in: Remove unused variables. - (Patch from (Ville Skyttä .) + (Patch from Ville Skyttä .) 2003-10-14 Derek Price Index: contrib/Makefile.am =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/contrib/Makefile.am,v retrieving revision 1.1.1.5 retrieving revision 1.1.1.6 diff -u -p -r1.1.1.5 -r1.1.1.6 --- contrib/Makefile.am 15 Apr 2004 01:01:55 -0000 1.1.1.5 +++ contrib/Makefile.am 26 Dec 2007 03:55:00 -0000 1.1.1.6 @@ -1,9 +1,11 @@ ## Process this file with automake to produce Makefile.in # Makefile for GNU CVS contributed sources. # Do not use this makefile directly, but only from `../Makefile'. -# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, -# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. +# +# Copyright (C) 1986-2005 The Free Software Foundation, Inc. +# +# Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , +# and others. # 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 @@ -52,6 +54,7 @@ EXTRA_DIST = \ cvs2vendor.sh \ cvscheck.sh \ cvshelp.man \ + cvs_acls.html \ debug_check_log.sh \ descend.sh \ descend.man \ Index: contrib/Makefile.in =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/contrib/Makefile.in,v retrieving revision 1.1.1.10 retrieving revision 1.1.1.11 diff -u -p -r1.1.1.10 -r1.1.1.11 --- contrib/Makefile.in 15 Apr 2004 01:01:55 -0000 1.1.1.10 +++ contrib/Makefile.in 26 Dec 2007 03:55:00 -0000 1.1.1.11 @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.7.9 from Makefile.am. +# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ -# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,9 +16,11 @@ # Makefile for GNU CVS contributed sources. # Do not use this makefile directly, but only from `../Makefile'. -# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, -# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. +# +# Copyright (C) 1986-2005 The Free Software Foundation, Inc. +# +# Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , +# and others. # 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 @@ -30,6 +32,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. + srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -37,7 +40,6 @@ 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 @@ -51,6 +53,36 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +subdir = contrib +DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/check_cvs.in $(srcdir)/clmerge.in \ + $(srcdir)/cln_hist.in $(srcdir)/commit_prep.in \ + $(srcdir)/cvs_acls.in $(srcdir)/log.in $(srcdir)/log_accum.in \ + $(srcdir)/mfpipe.in $(srcdir)/pvcs2rcs.in $(srcdir)/rcs2log.sh \ + $(srcdir)/rcslock.in $(srcdir)/sccs2rcs.in ChangeLog +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = check_cvs clmerge cln_hist commit_prep cvs_acls \ + log log_accum mfpipe pvcs2rcs rcs2log rcslock sccs2rcs +am__installdirs = "$(DESTDIR)$(contribdir)" "$(DESTDIR)$(contribdir)" +contribSCRIPT_INSTALL = $(INSTALL_SCRIPT) +SCRIPTS = $(contrib_SCRIPTS) +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +contribDATA_INSTALL = $(INSTALL_DATA) +DATA = $(contrib_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ @@ -120,6 +152,8 @@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ @@ -133,6 +167,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ +mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ @@ -140,9 +175,8 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ - +with_default_rsh = @with_default_rsh@ contribdir = $(pkgdatadir)/contrib - contrib_SCRIPTS = \ check_cvs \ clmerge \ @@ -161,20 +195,16 @@ contrib_SCRIPTS = \ rcslock \ sccs2rcs - contrib_DATA = \ README \ intro.doc - contrib_MANS = \ cvscheck.man - bin_LINKS = \ rcs2log - EXTRA_DIST = \ .cvsignore \ $(contrib_DATA) \ @@ -182,6 +212,7 @@ EXTRA_DIST = \ cvs2vendor.sh \ cvscheck.sh \ cvshelp.man \ + cvs_acls.html \ debug_check_log.sh \ descend.sh \ descend.man \ @@ -190,68 +221,74 @@ EXTRA_DIST = \ rcs2log.sh \ rcs2sccs.sh - CLEANFILES = $(bin_SCRIPTS) $(contrib_SCRIPTS) - SUFFIXES = .sh -subdir = contrib -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = check_cvs clmerge cln_hist commit_prep cvs_acls log \ - log_accum mfpipe pvcs2rcs rcs2log rcslock sccs2rcs -SCRIPTS = $(contrib_SCRIPTS) - -DIST_SOURCES = -DATA = $(contrib_DATA) - -DIST_COMMON = README $(srcdir)/Makefile.in ChangeLog Makefile.am \ - check_cvs.in clmerge.in cln_hist.in commit_prep.in cvs_acls.in \ - log.in log_accum.in mfpipe.in pvcs2rcs.in rcs2log.sh rcslock.in \ - sccs2rcs.in all: all-am .SUFFIXES: .SUFFIXES: .sh -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu contrib/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu contrib/Makefile -Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) -check_cvs: $(top_builddir)/config.status check_cvs.in +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +check_cvs: $(top_builddir)/config.status $(srcdir)/check_cvs.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -clmerge: $(top_builddir)/config.status clmerge.in +clmerge: $(top_builddir)/config.status $(srcdir)/clmerge.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -cln_hist: $(top_builddir)/config.status cln_hist.in +cln_hist: $(top_builddir)/config.status $(srcdir)/cln_hist.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -commit_prep: $(top_builddir)/config.status commit_prep.in +commit_prep: $(top_builddir)/config.status $(srcdir)/commit_prep.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -cvs_acls: $(top_builddir)/config.status cvs_acls.in +cvs_acls: $(top_builddir)/config.status $(srcdir)/cvs_acls.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -log: $(top_builddir)/config.status log.in +log: $(top_builddir)/config.status $(srcdir)/log.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -log_accum: $(top_builddir)/config.status log_accum.in +log_accum: $(top_builddir)/config.status $(srcdir)/log_accum.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -mfpipe: $(top_builddir)/config.status mfpipe.in +mfpipe: $(top_builddir)/config.status $(srcdir)/mfpipe.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -pvcs2rcs: $(top_builddir)/config.status pvcs2rcs.in +pvcs2rcs: $(top_builddir)/config.status $(srcdir)/pvcs2rcs.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -rcs2log: $(top_builddir)/config.status rcs2log.sh +rcs2log: $(top_builddir)/config.status $(srcdir)/rcs2log.sh cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -rcslock: $(top_builddir)/config.status rcslock.in +rcslock: $(top_builddir)/config.status $(srcdir)/rcslock.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -sccs2rcs: $(top_builddir)/config.status sccs2rcs.in +sccs2rcs: $(top_builddir)/config.status $(srcdir)/sccs2rcs.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -contribSCRIPT_INSTALL = $(INSTALL_SCRIPT) install-contribSCRIPTS: $(contrib_SCRIPTS) @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(contribdir) + test -z "$(contribdir)" || $(mkdir_p) "$(DESTDIR)$(contribdir)" @list='$(contrib_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 " $(contribSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(contribdir)/$$f"; \ - $(contribSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(contribdir)/$$f; \ + echo " $(contribSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(contribdir)/$$f'"; \ + $(contribSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(contribdir)/$$f"; \ else :; fi; \ done @@ -259,27 +296,26 @@ uninstall-contribSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(contrib_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " rm -f $(DESTDIR)$(contribdir)/$$f"; \ - rm -f $(DESTDIR)$(contribdir)/$$f; \ + echo " rm -f '$(DESTDIR)$(contribdir)/$$f'"; \ + rm -f "$(DESTDIR)$(contribdir)/$$f"; \ done uninstall-info-am: -contribDATA_INSTALL = $(INSTALL_DATA) install-contribDATA: $(contrib_DATA) @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(contribdir) + test -z "$(contribdir)" || $(mkdir_p) "$(DESTDIR)$(contribdir)" @list='$(contrib_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f="`echo $$p | sed -e 's|^.*/||'`"; \ - echo " $(contribDATA_INSTALL) $$d$$p $(DESTDIR)$(contribdir)/$$f"; \ - $(contribDATA_INSTALL) $$d$$p $(DESTDIR)$(contribdir)/$$f; \ + f=$(am__strip_dir) \ + echo " $(contribDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(contribdir)/$$f'"; \ + $(contribDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(contribdir)/$$f"; \ done uninstall-contribDATA: @$(NORMAL_UNINSTALL) @list='$(contrib_DATA)'; for p in $$list; do \ - f="`echo $$p | sed -e 's|^.*/||'`"; \ - echo " rm -f $(DESTDIR)$(contribdir)/$$f"; \ - rm -f $(DESTDIR)$(contribdir)/$$f; \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(contribdir)/$$f'"; \ + rm -f "$(DESTDIR)$(contribdir)/$$f"; \ done tags: TAGS TAGS: @@ -287,10 +323,6 @@ TAGS: ctags: CTAGS CTAGS: -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - -top_distdir = .. -distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ @@ -304,7 +336,7 @@ distdir: $(DISTFILES) dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ - $(mkinstalldirs) "$(distdir)$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ @@ -322,9 +354,10 @@ distdir: $(DISTFILES) check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) $(DATA) - installdirs: - $(mkinstalldirs) $(DESTDIR)$(contribdir) $(DESTDIR)$(contribdir) + for dir in "$(DESTDIR)$(contribdir)" "$(DESTDIR)$(contribdir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -345,7 +378,7 @@ clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -362,6 +395,8 @@ dvi: dvi-am dvi-am: +html: html-am + info: info-am info-am: @@ -397,8 +432,8 @@ uninstall-am: uninstall-contribDATA unin uninstall-info-am uninstall-local .PHONY: all all-am check check-am clean clean-generic distclean \ - distclean-generic distdir dvi dvi-am info info-am install \ - install-am install-contribDATA install-contribSCRIPTS \ + distclean-generic distdir dvi dvi-am html html-am info info-am \ + install install-am install-contribDATA install-contribSCRIPTS \ install-data install-data-am install-data-local install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ Index: contrib/README =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/contrib/README,v retrieving revision 1.1.1.5 retrieving revision 1.1.1.6 diff -u -p -r1.1.1.5 -r1.1.1.6 --- contrib/README 2 Dec 2002 03:13:37 -0000 1.1.1.5 +++ contrib/README 26 Dec 2007 03:55:00 -0000 1.1.1.6 @@ -71,8 +71,7 @@ An attempt at a table of Contents for th useful. debug_check_log A shell script to help analyze sanity check failures. - Contributed by Derek R. Price - + Contributed by Derek R. Price . descend A shell script that can be used to recursively descend.man descend through a directory. In CVS 1.2, this was Index: contrib/clmerge.in =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/contrib/clmerge.in,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.2 diff -u -p -r1.1.1.1 -r1.1.1.2 --- contrib/clmerge.in 10 Aug 2001 09:43:22 -0000 1.1.1.1 +++ contrib/clmerge.in 26 Dec 2007 03:55:00 -0000 1.1.1.2 @@ -1,5 +1,17 @@ #! @PERL@ +# Copyright (C) 1995-2005 The 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. + # Merge conflicted ChangeLogs # tromey Mon Aug 15 1994 Index: contrib/cln_hist.in =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/contrib/cln_hist.in,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.2 diff -u -p -r1.1.1.1 -r1.1.1.2 --- contrib/cln_hist.in 10 Aug 2001 09:43:22 -0000 1.1.1.1 +++ contrib/cln_hist.in 26 Dec 2007 03:55:00 -0000 1.1.1.2 @@ -1,5 +1,17 @@ #! @PERL@ # -*-Perl-*- + +# Copyright (C) 1995-2005 The 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. # # Contributed by David G. Grubbs # Index: contrib/commit_prep.in =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/contrib/commit_prep.in,v retrieving revision 1.1.1.2 retrieving revision 1.1.1.3 diff -u -p -r1.1.1.2 -r1.1.1.3 --- contrib/commit_prep.in 15 Apr 2004 01:01:55 -0000 1.1.1.2 +++ contrib/commit_prep.in 26 Dec 2007 03:55:00 -0000 1.1.1.3 @@ -1,6 +1,36 @@ -#! @PERL@ +#! @PERL@ -T # -*-Perl-*- -# + +# Copyright (C) 1994-2005 The 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. + +############################################################################### +############################################################################### +############################################################################### +# +# THIS SCRIPT IS PROBABLY BROKEN. REMOVING THE -T SWITCH ON THE #! LINE ABOVE +# WOULD FIX IT, BUT THIS IS INSECURE. WE RECOMMEND FIXING THE ERRORS WHICH THE +# -T SWITCH WILL CAUSE PERL TO REPORT BEFORE RUNNING THIS SCRIPT FROM A CVS +# SERVER TRIGGER. PLEASE SEND PATCHES CONTAINING THE CHANGES YOU FIND +# NECESSARY TO RUN THIS SCRIPT WITH THE TAINT-CHECKING ENABLED BACK TO THE +# <@PACKAGE_BUGREPORT@> MAILING LIST. +# +# For more on general Perl security and taint-checking, please try running the +# `perldoc perlsec' command. +# +############################################################################### +############################################################################### +############################################################################### + # Perl filter to handle pre-commit checking of files. This program # records the last directory where commits will be taking place for # use by the log_accum.pl script. Index: contrib/cvs2vendor.sh =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/contrib/cvs2vendor.sh,v retrieving revision 1.1.1.2 retrieving revision 1.1.1.3 diff -u -p -r1.1.1.2 -r1.1.1.3 --- contrib/cvs2vendor.sh 15 Apr 2004 01:01:55 -0000 1.1.1.2 +++ contrib/cvs2vendor.sh 26 Dec 2007 03:55:01 -0000 1.1.1.3 @@ -1,5 +1,17 @@ #! /bin/sh # +# Copyright (C) 1997-2005 The 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. +# # cvs2vendor - move revsisions from files in A to files in B # # The primary reason for this script is to move deltas from a Index: contrib/cvs_acls.html =================================================================== RCS file: contrib/cvs_acls.html diff -N contrib/cvs_acls.html --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ contrib/cvs_acls.html 26 Dec 2007 03:55:01 -0000 1.1.1.1 @@ -0,0 +1,459 @@ + + + +cvs_acls + + + + + +

+ + + + + +
+

+

+

Name

+

cvs_acls - Access Control List for CVS

+

+

+
+

Synopsis

+

In 'commitinfo':

+
+  repository/path/to/restrict $CVSROOT/CVSROOT/cvs_acls [-d][-u $USER][-f <logfile>]
+

where:

+
+  -d  turns on debug information
+  -u  passes the client-side userId to the cvs_acls script
+  -f  specifies an alternate filename for the restrict_log file
+

In 'cvsacl':

+
+  {allow.*,deny.*} [|user,user,... [|repos,repos,... [|branch,branch,...]]]
+

where:

+
+  allow|deny - allow: commits are allowed; deny: prohibited
+  user          - userId to be allowed or restricted
+  repos         - file or directory to be allowed or restricted
+  branch        - branch to be allowed or restricted
+

See below for examples.

+

+

+
+

Licensing

+

cvs_acls - provides access control list functionality for CVS +

+
+
+Copyright (c) 2004 by Peter Connolly <peter.connolly@cnet.com>  
+All rights reserved.
+

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

+

+

+
+

Description

+

This script--cvs_acls--is invoked once for each directory within a +``cvs commit''. The set of files being committed for that directory as +well as the directory itself, are passed to this script. This script +checks its 'cvsacl' file to see if any of the files being committed +are on the 'cvsacl' file's restricted list. If any of the files are +restricted, then the cvs_acls script passes back an exit code of 1 +which disallows the commits for that directory.

+

Messages are returned to the committer indicating the file(s) that +he/she are not allowed to committ. Additionally, a site-specific +set of messages (e.g., contact information) can be included in these +messages.

+

When a commit is prohibited, log messages are written to a restrict_log +file in $CVSROOT/CVSROOT. This default file can be redirected to +another destination.

+

The script is triggered from the 'commitinfo' file in $CVSROOT/CVSROOT/.

+

+

+
+

Enhancements

+

This section lists the bug fixes and enhancements added to cvs_acls +that make up the current cvs_acls.

+

+

+

Fixed Bugs

+

This version attempts to get rid the following bugs from the +original version of cvs_acls:

+ +

+

+

Enhancements

+ +

+

+

ToDoS

+ +

+

+
+

Version Information

+

This is not offered as a fix to the original 'cvs_acls' script since it +differs substantially in goals and methods from the original and there +are probably a significant number of people out there that still require +the original version's functionality.

+

The 'cvsacl' file flags of 'allow' and 'deny' were intentionally +changed to 'allow' and 'deny' because there are enough differences +between the original script's behavior and this one's that we wanted to +make sure that users will rethink their 'cvsacl' file formats before +plugging in this newer script.

+

Please note that there has been very limited cross-platform testing of +this script!!! (We did not have the time or resources to do exhaustive +cross-platform testing.)

+

It was developed and tested under Red Hat Linux 9.0 using PERL 5.8.0. +Additionally, it was built and tested under Red Hat Linux 7.3 using +PERL 5.6.1.

+

$Id: cvs_acls.html,v 1.1.2.2 2005/09/01 13:44:49 dprice Exp $

+

This version is based on the 1.11.13 version of cvs_acls +peter.connolly@cnet.com (Peter Connolly)

+
+  Access control lists for CVS.  dgg@ksr.com (David G. Grubbs)
+  Branch specific controls added by voisine@bytemobile.com (Aaron Voisine)
+

+

+
+

Installation

+

To use this program, do the following four things:

+

0. Install PERL, version 5.6.1 or 5.8.0.

+

1. Admin Setup:

+
+   There are two choices here.
+
+   a) The first option is to use the $ENV{"USER"}, server-side userId
+      (from the third column of your pserver 'passwd' file) as the basis for 
+      your restrictions.  In this case, you will (at a minimum) want to set
+      up a new "cvsadmin" userId and group on the pserver machine.  
+      CVS administrators will then set up their 'passwd' file entries to
+      run either as "cvs" (for regular users) or as "cvsadmin" (for power 
+      users).  Correspondingly, your 'cvsacl' file will only list 'cvs'
+      and 'cvsadmin' as the userIds in the second column.
+
+      Commentary: A potential weakness of this is that the xinetd 
+      cvspserver process will need to run as 'root' in order to switch 
+      between the 'cvs' and the 'cvsadmin' userIds.  Some sysadmins don't
+      like situations like this and may want to chroot the process.
+      Talk to them about this point...
+
+   b) The second option is to use the client-side userId as the basis for
+      your restrictions.  In this case, all the xinetd cvspserver processes 
+      can run as userId 'cvs' and no 'root' userId is required.  If you have
+      a 'passwd' file that lists 'cvs' as the effective run-time userId for
+      all your users, then no changes to this file are needed.  Your 'cvsacl'
+      file will use the individual, client-side userIds in its 2nd column.
+
+      As long as the userIds in pserver's 'passwd' file match those userIds 
+      that your Linux server know about, this approach is ideal if you are 
+      planning to move from pserver to SSH access at some later point in time.
+      Just by switching the CVSROOT var from CVSROOT=:pserver:<userId>... to 
+      CVSROOT=:ext:<userId>..., users can switch over to SSH access without
+      any other administrative changes.  When all users have switched over to
+      SSH, the inherently insecure xinetd cvspserver process can be disabled.
+      [http://ximbiot.com/cvs/manual/cvs-1.11.17/cvs_2.html#SEC32]
+
+      :TODO: The only potential glitch with the SSH approach is the possibility 
+      that each user can have differing umasks that might interfere with one 
+      another, especially during a transition from pserver to SSH.  As noted
+      in the ToDo section, this needs a good strategy and set of tests for that 
+      yet...
+

2. Put two lines, as the *only* non-comment lines, in your commitinfo file:

+
+   ALL $CVSROOT/CVSROOT/commit_prep 
+   ALL $CVSROOT/CVSROOT/cvs_acls [-d][-u $USER ][-f <logfilename>]
+
+   where "-d" turns on debug trace
+         "-u $USER" passes the client-side userId to cvs_acls 
+         "-f <logfilename"> overrides the default filename used to log
+                            restricted commit attempts.
+
+   (These are handled in the processArgs() subroutine.)
+

If you are using client-side userIds to restrict access to your +repository, make sure that they are in this order since the commit_prep +script is required in order to pass the $USER parameter.

+

A final note about the repository matching pattern. The example above +uses ``ALL'' but note that this means that the cvs_acls script will run +for each and every commit in your repository. Obviously, in a large +repository this adds up to a lot of overhead that may not be necesary. +A better strategy is to use a repository pattern that is more specific +to the areas that you wish to secure.

+

3. Install this file as $CVSROOT/CVSROOT/cvs_acls and make it executable.

+

4. Create a file named CVSROOT/cvsacl and optionally add it to + CVSROOT/checkoutlist and check it in. See the CVS manual's + administrative files section about checkoutlist. Typically:

+
+   $ cvs checkout CVSROOT
+   $ cd CVSROOT
+   [ create the cvsacl file, include 'commitinfo' line ]
+   [ add cvsacl to checkoutlist ]
+   $ cvs add cvsacl
+   $ cvs commit -m 'Added cvsacl for use with cvs_acls.' cvsacl checkoutlist
+

Note: The format of the 'cvsacl' file is described in detail immediately +below but here is an important set up point:

+
+   Make sure to include a line like the following:
+
+     deny||CVSROOT/commitinfo CVSROOT/cvsacl
+     allow|cvsadmin|CVSROOT/commitinfo CVSROOT/cvsacl
+
+   that restricts access to commitinfo and cvsacl since this would be one of
+   the easiest "end runs" around this ACL approach. ('commitinfo' has the 
+   line that executes the cvs_acls script and, of course, all the 
+   restrictions are in 'cvsacl'.)
+

5. (Optional) Create a 'restrict_msg' file in the $CVSROOT/CVSROOT directory. + Whenever there is a restricted file or dir message, cvs_acls will look + for this file and, if it exists, print its contents as part of the + commit-denial message. This gives you a chance to print any site-specific + information (e.g., who to call, what procedures to look up,...) whenever + a commit is denied.

+

+

+
+

Format of the cvsacl file

+

The 'cvsacl' file determines whether you may commit files. It contains lines +read from top to bottom, keeping track of whether a given user, repository +and branch combination is ``allowed'' or ``denied.'' The script will assume +``allowed'' on all repository paths until 'allow' and 'deny' rules change +that default.

+

The normal pattern is to specify an 'deny' rule to turn off +access to ALL users, then follow it with a matching 'allow' rule that will +turn on access for a select set of users. In the case of multiple rules for +the same user, repository and branch, the last one takes precedence.

+

Blank lines and lines with only comments are ignored. Any other lines not +beginning with ``allow'' or ``deny'' are logged to the restrict_log file.

+

Lines beginning with ``allow'' or ``deny'' are assumed to be '|'-separated +triples: (All spaces and tabs are ignored in a line.)

+
+  {allow.*,deny.*} [|user,user,... [|repos,repos,... [|branch,branch,...]]]
+
+   1. String starting with "allow" or "deny".
+   2. Optional, comma-separated list of usernames.
+   3. Optional, comma-separated list of repository pathnames.
+      These are pathnames relative to $CVSROOT.  They can be directories or
+      filenames.  A directory name allows or restricts access to all files and
+      directories below it. One line can have either directories or filenames
+      but not both.
+   4. Optional, comma-separated list of branch tags.
+      If not specified, all branches are assumed. Use HEAD to reference the
+      main branch.
+

Example: (Note: No in-line comments.)

+
+   # ----- Make whole repository unavailable.
+   deny
+
+   # ----- Except for user "dgg".
+   allow|dgg
+
+   # ----- Except when "fred" or "john" commit to the 
+   #       module whose repository is "bin/ls"
+   allow|fred, john|bin/ls
+
+   # ----- Except when "ed" commits to the "stable" 
+   #       branch of the "bin/ls" repository
+   allow|ed|/bin/ls|stable
+

+

+
+

Program Logic

+

CVS passes to @ARGV an absolute directory pathname (the repository +appended to your $CVSROOT variable), followed by a list of filenames +within that directory that are to be committed.

+

The script walks through the 'cvsacl' file looking for matches on +the username, repository and branch.

+

A username match is simply the user's name appearing in the second +column of the cvsacl line in a space-or-comma separate list. If +blank, then any user will match.

+

A repository match:

+ +

+

+

Pseudocode

+
+     read CVS/Entries file and create branch{file}->{branch} hash table
+   + for each 'allow' and 'deny' line in the 'cvsacl' file:
+   |   user match?   
+   |     - Yes: set $user_match       = 1;
+   |   repository and branch match?
+   |     - Yes: add to %repository_matches;
+   |   did user, repository match?
+   |     - Yes: if 'deny' then 
+   |                add %repository_matches -> %restricted_entries
+   |            if 'allow'   then 
+   |                remove %repository_matches <- %restricted_entries
+   + end for loop
+     any saved restrictions?
+       no:  exit, 
+            set exit code allowing commits and exit
+       yes: report restrictions, 
+            set exit code prohibiting commits and exit
+

+

+

Sanity Check

+
+  1) file allow trumps a dir deny
+     deny||java/lib
+     allow||java/lib/README
+  2) dir allow can undo a file deny
+     deny||java/lib/README
+     allow||java/lib
+  3) file deny trumps a dir allow
+     allow||java/lib
+     deny||java/lib/README
+  4) dir deny trumps a file allow
+     allow||java/lib/README
+     deny||java/lib
+  ... so last match always takes precedence
+ + + + Index: contrib/cvs_acls.in =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/contrib/cvs_acls.in,v retrieving revision 1.1.1.4 retrieving revision 1.1.1.5 diff -u -p -r1.1.1.4 -r1.1.1.5 --- contrib/cvs_acls.in 21 Jan 2003 21:53:02 -0000 1.1.1.4 +++ contrib/cvs_acls.in 26 Dec 2007 03:55:00 -0000 1.1.1.5 @@ -1,193 +1,963 @@ -#! @PERL@ +#! @PERL@ -T # -*-Perl-*- + +# Copyright (C) 1994-2005 The 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. # -# Access control lists for CVS. dgg@ksr.com (David G. Grubbs) -# Branch specific controls added by voisine@bytemobile.com (Aaron Voisine) -# -# CVS "commitinfo" for matching repository names, running the program it finds -# on the same line. More information is available in the CVS man pages. -# -# ==== INSTALLATION: -# -# To use this program as I intended, do the following four things: -# -# 0. Install PERL. :-) -# -# 1. Put one line, as the *only* non-comment line, in your commitinfo file: -# -# DEFAULT /usr/local/bin/cvs_acls -# -# 2. Install this file as /usr/local/bin/cvs_acls and make it executable. -# -# 3. Create a file named CVSROOT/avail and optionally add it to -# CVSROOT/checkoutlist and check it in. See the CVS manual's -# administrative files section about checkoutlist. Typically: -# -# $ cvs checkout CVSROOT -# $ cd CVSROOT -# [ create the avail file ] -# [ add avail to checkoutlist ] -# $ cvs add avail -# $ cvs commit -m 'Added avail for use with cvs_acls.' avail checkoutlist -# -# ==== FORMAT OF THE avail FILE: -# -# The avail file determines whether you may commit files. It contains lines -# read from top to bottom, keeping track of a single "bit". The "bit" -# defaults to "on". It can be turned "off" by "unavail" lines and "on" by -# "avail" lines. ==> Last one counts. -# -# Any line not beginning with "avail" or "unavail" is ignored. -# -# Lines beginning with "avail" or "unavail" are assumed to be '|'-separated -# triples: (All spaces and tabs are ignored in a line.) -# -# {avail.*,unavail.*} [|user,user,... [|repos,repos,... [|branch,branch,...]]] -# -# 1. String starting with "avail" or "unavail". -# 2. Optional, comma-separated list of usernames. -# 3. Optional, comma-separated list of repository pathnames. -# These are pathnames relative to $CVSROOT. They can be directories or -# filenames. A directory name allows access to all files and -# directories below it. -# 4. Optional, comma-separated list of branch tags. -# If not specified, all branches are assumed. Use HEAD to reference the -# main branch. -# -# Example: (Text from the ';;' rightward may not appear in the file.) -# -# unavail ;; Make whole repository unavailable. -# avail|dgg ;; Except for user "dgg". -# avail|fred, john|bin/ls ;; Except when "fred" or "john" commit to -# ;; the module whose repository is "bin/ls" -# avail|ed|/bin/ls|stable ;; Except when "ed" commits to the "stable" -# ;; branch of the "bin/ls" repository -# -# PROGRAM LOGIC: -# -# CVS passes to @ARGV an absolute directory pathname (the repository -# appended to your $CVSROOT variable), followed by a list of filenames -# within that directory. -# -# We walk through the avail file looking for a line that matches the -# username, repository and branch. -# -# A username match is simply the user's name appearing in the second -# column of the avail line in a space-or-comma separate list. +# 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. + +############################################################################### +############################################################################### +############################################################################### # -# A repository match is either: -# - One element of the third column matches $ARGV[0], or some -# parent directory of $ARGV[0]. -# - Otherwise *all* file arguments ($ARGV[1..$#ARGV]) must be -# in the file list in one avail line. -# - In other words, using directory names in the third column of -# the avail file allows committing of any file (or group of -# files in a single commit) in the tree below that directory. -# - If individual file names are used in the third column of -# the avail file, then files must be committed individually or -# all files specified in a single commit must all appear in -# third column of a single avail line. +# THIS SCRIPT IS PROBABLY BROKEN. REMOVING THE -T SWITCH ON THE #! LINE ABOVE +# WOULD FIX IT, BUT THIS IS INSECURE. WE RECOMMEND FIXING THE ERRORS WHICH THE +# -T SWITCH WILL CAUSE PERL TO REPORT BEFORE RUNNING THIS SCRIPT FROM A CVS +# SERVER TRIGGER. PLEASE SEND PATCHES CONTAINING THE CHANGES YOU FIND +# NECESSARY TO RUN THIS SCRIPT WITH THE TAINT-CHECKING ENABLED BACK TO THE +# <@PACKAGE_BUGREPORT@> MAILING LIST. # -# A branch match is either: -# - When no branches are listed in the fourth column. -# - One element from the fourth column matches each of the tag -# names for $ARGV[1..$#ARGV] found in the CVS/Entries file. -# - HEAD specified in the fourth column will match if there -# is no tag listed in the CVS/Entries file. +# For more on general Perl security and taint-checking, please try running the +# `perldoc perlsec' command. # +############################################################################### +############################################################################### +############################################################################### + +=head1 Name + +cvs_acls - Access Control List for CVS + +=head1 Synopsis + +In 'commitinfo': + + repository/path/to/restrict $CVSROOT/CVSROOT/cvs_acls [-d][-u $USER][-f ] + +where: + + -d turns on debug information + -u passes the client-side userId to the cvs_acls script + -f specifies an alternate filename for the restrict_log file + +In 'cvsacl': + + {allow.*,deny.*} [|user,user,... [|repos,repos,... [|branch,branch,...]]] + +where: + + allow|deny - allow: commits are allowed; deny: prohibited + user - userId to be allowed or restricted + repos - file or directory to be allowed or restricted + branch - branch to be allowed or restricted + +See below for examples. + +=head1 Licensing + +cvs_acls - provides access control list functionality for CVS + +Copyright (c) 2004 by Peter Connolly +All rights reserved. + +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 + +=head1 Description + +This script--cvs_acls--is invoked once for each directory within a +"cvs commit". The set of files being committed for that directory as +well as the directory itself, are passed to this script. This script +checks its 'cvsacl' file to see if any of the files being committed +are on the 'cvsacl' file's restricted list. If any of the files are +restricted, then the cvs_acls script passes back an exit code of 1 +which disallows the commits for that directory. + +Messages are returned to the committer indicating the file(s) that +he/she are not allowed to committ. Additionally, a site-specific +set of messages (e.g., contact information) can be included in these +messages. + +When a commit is prohibited, log messages are written to a restrict_log +file in $CVSROOT/CVSROOT. This default file can be redirected to +another destination. + +The script is triggered from the 'commitinfo' file in $CVSROOT/CVSROOT/. + +=head1 Enhancements + +This section lists the bug fixes and enhancements added to cvs_acls +that make up the current cvs_acls. + +=head2 Fixed Bugs + +This version attempts to get rid the following bugs from the +original version of cvs_acls: + +=over 2 + +=item * +Multiple entries on an 'cvsacl' line will be matched individually, +instead of requiring that all commit files *exactly* match all +'cvsacl' entries. Commiting a file not in the 'cvsacl' list would +allow *all* files (including a restricted file) to be committed. + +[IMO, this basically made the original script unuseable for our +situation since any arbitrary combination of committed files could +avoid matching the 'cvsacl's entries.] + +=item * +Handle specific filename restrictions. cvs_acls didn't restrict +individual files specified in 'cvsacl'. + +=item * +Correctly handle multiple, specific filename restrictions + +=item * +Prohibit mix of dirs and files on a single 'cvsacl' line +[To simplify the logic and because this would be normal usage.] + +=item * +Correctly handle a mixture of branch restrictions within one work +directory + +=item * +$CVSROOT existence is checked too late + +=item * +Correctly handle the CVSROOT=:local:/... option (useful for +interactive testing) + +=item * +Replacing shoddy "$universal_off" logic +(Thanks to Karl-Konig Konigsson for pointing this out.) + +=back + +=head2 Enhancements + +=over 2 + +=item * +Checks modules in the 'cvsacl' file for valid files and directories + +=item * +Accurately report restricted entries and their matching patterns + +=item * +Simplified and commented overly complex PERL REGEXPs for readability +and maintainability + +=item * +Skip the rest of processing if a mismatch on portion of the 'cvsacl' line + +=item * +Get rid of opaque "karma" messages in favor of user-friendly messages +that describe which user, file(s) and branch(es) were disallowed. + +=item * +Add optional 'restrict_msg' file for additional, site-specific +restriction messages. + +=item * +Take a "-u" parameter for $USER from commit_prep so that the script +can do restrictions based on the client-side userId rather than the +server-side userId (usually 'cvs'). + +(See discussion below on "Admin Setup" for more on this point.) + +=item * +Added a lot more debug trace + +=item * +Tested these restrictions with concurrent use of pserver and SSH +access to model our transition from pserver to ext access. + +=item * +Added logging of restricted commit attempts. +Restricted commits can be sent to a default file: +$CVSROOT/CVSROOT/restrictlog or to one passed to the script +via the -f command parameter. + +=back + +=head2 ToDoS + +=over 2 + +=item * +Need to deal with pserver/SSH transition with conflicting umasks? + +=item * +Use a CPAN module to handle command parameters. + +=item * +Use a CPAN module to clone data structures. + +=back + +=head1 Version Information + +This is not offered as a fix to the original 'cvs_acls' script since it +differs substantially in goals and methods from the original and there +are probably a significant number of people out there that still require +the original version's functionality. + +The 'cvsacl' file flags of 'allow' and 'deny' were intentionally +changed to 'allow' and 'deny' because there are enough differences +between the original script's behavior and this one's that we wanted to +make sure that users will rethink their 'cvsacl' file formats before +plugging in this newer script. + +Please note that there has been very limited cross-platform testing of +this script!!! (We did not have the time or resources to do exhaustive +cross-platform testing.) + +It was developed and tested under Red Hat Linux 9.0 using PERL 5.8.0. +Additionally, it was built and tested under Red Hat Linux 7.3 using +PERL 5.6.1. + +$Id: cvs_acls.in,v 1.4.4.6 2005/09/01 13:44:49 dprice Exp $ + +This version is based on the 1.11.13 version of cvs_acls +peter.connolly@cnet.com (Peter Connolly) + + Access control lists for CVS. dgg@ksr.com (David G. Grubbs) + Branch specific controls added by voisine@bytemobile.com (Aaron Voisine) + +=head1 Installation + +To use this program, do the following four things: + +0. Install PERL, version 5.6.1 or 5.8.0. + +1. Admin Setup: + + There are two choices here. + + a) The first option is to use the $ENV{"USER"}, server-side userId + (from the third column of your pserver 'passwd' file) as the basis for + your restrictions. In this case, you will (at a minimum) want to set + up a new "cvsadmin" userId and group on the pserver machine. + CVS administrators will then set up their 'passwd' file entries to + run either as "cvs" (for regular users) or as "cvsadmin" (for power + users). Correspondingly, your 'cvsacl' file will only list 'cvs' + and 'cvsadmin' as the userIds in the second column. + + Commentary: A potential weakness of this is that the xinetd + cvspserver process will need to run as 'root' in order to switch + between the 'cvs' and the 'cvsadmin' userIds. Some sysadmins don't + like situations like this and may want to chroot the process. + Talk to them about this point... + + b) The second option is to use the client-side userId as the basis for + your restrictions. In this case, all the xinetd cvspserver processes + can run as userId 'cvs' and no 'root' userId is required. If you have + a 'passwd' file that lists 'cvs' as the effective run-time userId for + all your users, then no changes to this file are needed. Your 'cvsacl' + file will use the individual, client-side userIds in its 2nd column. + + As long as the userIds in pserver's 'passwd' file match those userIds + that your Linux server know about, this approach is ideal if you are + planning to move from pserver to SSH access at some later point in time. + Just by switching the CVSROOT var from CVSROOT=:pserver:... to + CVSROOT=:ext:..., users can switch over to SSH access without + any other administrative changes. When all users have switched over to + SSH, the inherently insecure xinetd cvspserver process can be disabled. + [http://ximbiot.com/cvs/manual/cvs-1.11.17/cvs_2.html#SEC32] + + :TODO: The only potential glitch with the SSH approach is the possibility + that each user can have differing umasks that might interfere with one + another, especially during a transition from pserver to SSH. As noted + in the ToDo section, this needs a good strategy and set of tests for that + yet... + +2. Put two lines, as the *only* non-comment lines, in your commitinfo file: + + ALL $CVSROOT/CVSROOT/commit_prep + ALL $CVSROOT/CVSROOT/cvs_acls [-d][-u $USER ][-f ] + + where "-d" turns on debug trace + "-u $USER" passes the client-side userId to cvs_acls + "-f overrides the default filename used to log + restricted commit attempts. + + (These are handled in the processArgs() subroutine.) + +If you are using client-side userIds to restrict access to your +repository, make sure that they are in this order since the commit_prep +script is required in order to pass the $USER parameter. + +A final note about the repository matching pattern. The example above +uses "ALL" but note that this means that the cvs_acls script will run +for each and every commit in your repository. Obviously, in a large +repository this adds up to a lot of overhead that may not be necesary. +A better strategy is to use a repository pattern that is more specific +to the areas that you wish to secure. + +3. Install this file as $CVSROOT/CVSROOT/cvs_acls and make it executable. + +4. Create a file named CVSROOT/cvsacl and optionally add it to + CVSROOT/checkoutlist and check it in. See the CVS manual's + administrative files section about checkoutlist. Typically: + + $ cvs checkout CVSROOT + $ cd CVSROOT + [ create the cvsacl file, include 'commitinfo' line ] + [ add cvsacl to checkoutlist ] + $ cvs add cvsacl + $ cvs commit -m 'Added cvsacl for use with cvs_acls.' cvsacl checkoutlist + +Note: The format of the 'cvsacl' file is described in detail immediately +below but here is an important set up point: -$debug = 0; + Make sure to include a line like the following: + + deny||CVSROOT/commitinfo CVSROOT/cvsacl + allow|cvsadmin|CVSROOT/commitinfo CVSROOT/cvsacl + + that restricts access to commitinfo and cvsacl since this would be one of + the easiest "end runs" around this ACL approach. ('commitinfo' has the + line that executes the cvs_acls script and, of course, all the + restrictions are in 'cvsacl'.) + +5. (Optional) Create a 'restrict_msg' file in the $CVSROOT/CVSROOT directory. + Whenever there is a restricted file or dir message, cvs_acls will look + for this file and, if it exists, print its contents as part of the + commit-denial message. This gives you a chance to print any site-specific + information (e.g., who to call, what procedures to look up,...) whenever + a commit is denied. + +=head1 Format of the cvsacl file + +The 'cvsacl' file determines whether you may commit files. It contains lines +read from top to bottom, keeping track of whether a given user, repository +and branch combination is "allowed" or "denied." The script will assume +"allowed" on all repository paths until 'allow' and 'deny' rules change +that default. + +The normal pattern is to specify an 'deny' rule to turn off +access to ALL users, then follow it with a matching 'allow' rule that will +turn on access for a select set of users. In the case of multiple rules for +the same user, repository and branch, the last one takes precedence. + +Blank lines and lines with only comments are ignored. Any other lines not +beginning with "allow" or "deny" are logged to the restrict_log file. + +Lines beginning with "allow" or "deny" are assumed to be '|'-separated +triples: (All spaces and tabs are ignored in a line.) + + {allow.*,deny.*} [|user,user,... [|repos,repos,... [|branch,branch,...]]] + + 1. String starting with "allow" or "deny". + 2. Optional, comma-separated list of usernames. + 3. Optional, comma-separated list of repository pathnames. + These are pathnames relative to $CVSROOT. They can be directories or + filenames. A directory name allows or restricts access to all files and + directories below it. One line can have either directories or filenames + but not both. + 4. Optional, comma-separated list of branch tags. + If not specified, all branches are assumed. Use HEAD to reference the + main branch. + +Example: (Note: No in-line comments.) + + # ----- Make whole repository unavailable. + deny + + # ----- Except for user "dgg". + allow|dgg + + # ----- Except when "fred" or "john" commit to the + # module whose repository is "bin/ls" + allow|fred, john|bin/ls + + # ----- Except when "ed" commits to the "stable" + # branch of the "bin/ls" repository + allow|ed|/bin/ls|stable + +=head1 Program Logic + +CVS passes to @ARGV an absolute directory pathname (the repository +appended to your $CVSROOT variable), followed by a list of filenames +within that directory that are to be committed. + +The script walks through the 'cvsacl' file looking for matches on +the username, repository and branch. + +A username match is simply the user's name appearing in the second +column of the cvsacl line in a space-or-comma separate list. If +blank, then any user will match. + +A repository match: + +=over 2 + +=item * +Each entry in the modules section of the current 'cvsacl' line is +examined to see if it is a dir or a file. The line must have +either files or dirs, but not both. (To simplify the logic.) + +=item * +If neither, then assume the 'cvsacl' file was set up in error and +skip that 'allow' line. + +=item * +If a dir, then each dir pattern is matched separately against the +beginning of each of the committed files in @ARGV. + +=item * +If a file, then each file pattern is matched exactly against each +of the files to be committed in @ARGV. + +=item * +Repository and branch must BOTH match together. This is to cover +the use case where a user has multiple branches checked out in +a single work directory. Commit files can be from different +branches. + +A branch match is either: + +=over 4 + +=item * +When no branches are listed in the fourth column. ("Match any.") + +=item * +All elements from the fourth column are matched against each of +the tag names for $ARGV[1..$#ARGV] found in the %branches file. + +=back + +=item * +'allow' match remove that match from the tally map. + +=item * +Restricted ('deny') matches are saved in the %repository_matches +table. + +=item * +If there is a match on user, repository and branch: + + If repository, branch and user match + if 'deny' + add %repository_matches entries to %restricted_entries + else if 'allow' + remove %repository_matches entries from %restricted_entries + +=item * +At the end of all the 'cvsacl' line checks, check to see if there +are any entries in the %restricted_entries. If so, then deny the +commit. + +=back + +=head2 Pseudocode + + read CVS/Entries file and create branch{file}->{branch} hash table + + for each 'allow' and 'deny' line in the 'cvsacl' file: + | user match? + | - Yes: set $user_match = 1; + | repository and branch match? + | - Yes: add to %repository_matches; + | did user, repository match? + | - Yes: if 'deny' then + | add %repository_matches -> %restricted_entries + | if 'allow' then + | remove %repository_matches <- %restricted_entries + + end for loop + any saved restrictions? + no: exit, + set exit code allowing commits and exit + yes: report restrictions, + set exit code prohibiting commits and exit + +=head2 Sanity Check + + 1) file allow trumps a dir deny + deny||java/lib + allow||java/lib/README + 2) dir allow can undo a file deny + deny||java/lib/README + allow||java/lib + 3) file deny trumps a dir allow + allow||java/lib + deny||java/lib/README + 4) dir deny trumps a file allow + allow||java/lib/README + deny||java/lib + ... so last match always takes precedence + +=cut + +$debug = 0; # Set to 1 for debug messages + +%repository_matches = (); # hash of match file and pattern from 'cvsacl' + # repository_matches --> [branch, matching-pattern] + # (Used during module/branch matching loop) + +%restricted_entries = (); # hash table of restricted commit files (from @ARGV) + # restricted_entries --> branch + # (If user/module/branch all match on an 'deny' + # line, then entries added to this map.) + +%branch; # hash table of key: commit file; value: branch + # Built from ".../CVS/Entries" file of directory + # currently being examined + +# ---------------------------------------------------------------- get CVSROOT $cvsroot = $ENV{'CVSROOT'}; -$availfile = $cvsroot . "/CVSROOT/avail"; -$entries = "CVS/Entries"; -$myname = $ENV{"USER"} if !($myname = $ENV{"LOGNAME"}); +die "Must set CVSROOT\n" if !$cvsroot; +if ($cvsroot =~ /:([\/\w]*)$/) { # Filter ":pserver:", ":local:"-type prefixes + $cvsroot = $1; +} +# ------------------------------------------------------------- set file paths +$entries = "CVS/Entries"; # client-side file??? +$cvsaclfile = $cvsroot . "/CVSROOT/cvsacl"; +$restrictfile = $cvsroot . "/CVSROOT/restrict_msg"; +$restrictlog = $cvsroot . "/CVSROOT/restrict_log"; + +# --------------------------------------------------------------- process args +$user_name = processArgs(\@ARGV); + +print("$$ \@ARGV after processArgs is: @ARGV.\n") if $debug; +print("$$ ========== Begin $PROGRAM_NAME for \"$ARGV[0]\" repository. ========== \n") if $debug; + +# --------------------------------------------------------------- filter @ARGV eval "print STDERR \$die='Unknown parameter $1\n' if !defined \$$1; \$$1=\$';" while ($ARGV[0] =~ /^(\w+)=/ && shift(@ARGV)); -exit 255 if $die; # process any variable=value switches +exit 255 if $die; # process any variable=value switches -die "Must set CVSROOT\n" if !$cvsroot; -($repos = shift) =~ s:^$cvsroot/::; -grep($_ = $repos . '/' . $_, @ARGV); +print("$$ \@ARGV after shift processing contains:",join("\, ",@ARGV),".\n") if $debug; + +# ---------------------------------------------------------------- get cvsroot +($repository = shift) =~ s:^$cvsroot/::; +grep($_ = $repository . '/' . $_, @ARGV); -print "$$ Repos: $repos\n","$$ ==== ",join("\n$$ ==== ",@ARGV),"\n" if $debug; +print("$$ \$cvsroot is: $cvsroot.\n") if $debug; +print "$$ Repos: $repository\n","$$ ==== ",join("\n$$ ==== ",@ARGV),"\n" if $debug; -$exit_val = 0; # Good Exit value +$exit_val = 0; # presume good exit value for commit -$universal_off = 0; +# ---------------------------------------------------------------------------- +# ---------------------------------- create hash table $branch{file -> branch} +# ---------------------------------------------------------------------------- -my %branch; -my $f; +# Here's a typical Entries file: +# +# /checkoutlist/1.4/Wed Feb 4 23:51:23 2004// +# /cvsacl/1.3/Tue Feb 24 23:05:43 2004// +# ... +# /verifymsg/1.1/Fri Mar 16 19:56:24 2001// +# D/backup//// +# D/temp//// open(ENTRIES, $entries) || die("Cannot open $entries.\n"); +print("$$ File / Branch\n") if $debug; +my $i = 0; while() { chop; - next if /^\s*$/; - if(m|^[^/]*/([^/]*)/(?:[^/]*/)*[^/]?([^/]*)$|) { - $branch{$repos . '/' . $1} = ($2) ? $2 : "HEAD"; - print "$$ $1/$2\n" if $debug; + next if /^\s*$/; # Skip blank lines + $i = $i + 1; + if (m| + / # 1st slash + ([\w.-]*) # file name -> $1 + / # 2nd slash + .* # revision number + / # 3rd slash + .* # date and time + / # 4th slash + .* # keyword + / # 5th slash + T? # 'T' constant + (\w*) # branch -> #2 + |x) { + $branch{$repository . '/' . $1} = ($2) ? $2 : "HEAD"; + print "$$ CVS Entry $i: $1/$2\n" if $debug; } } close(ENTRIES); -open (AVAIL, $availfile) || exit(0); # It is ok for avail file not to exist -while () { +# ---------------------------------------------------------------------------- +# ------------------------------------- evaluate each active line from 'cvsacl' +# ---------------------------------------------------------------------------- +open (CVSACL, $cvsaclfile) || exit(0); # It is ok for cvsacl file not to exist +while () { chop; - next if /^\s*\#/; - next if /^\s*$/; - ($flagstr, $u, $m, $b) = split(/[\s,]*\|[\s,]*/, $_); - - # Skip anything not starting with "avail" or "unavail" and complain. - (print "Bad avail line: $_\n"), next - if ($flagstr !~ /^avail/ && $flagstr !~ /^unavail/); - - # Set which bit we are playing with. ('0' is OK == Available). - $flag = (($& eq "avail") ? 0 : 1); - - # If we find a "universal off" flag (i.e. a simple "unavail") remember it - $universal_off = 1 if ($flag && !$u && !$m && !$b); - - # $myname considered "in user list" if actually in list or is NULL - $in_user = (!$u || grep ($_ eq $myname, split(/[\s,]+/,$u))); - print "$$ \$myname($myname) in user list: $_\n" if $debug && $in_user; - - # Module matches if it is a NULL module list in the avail line. If module - # list is not null, we check every argument combination. - if (!($in_repo = !$m)) { - my @tmp = split(/[\s,]+/,$m); - for $j (@tmp) { - # If the repos from avail is a parent(or equal) dir of $repos, OK - $in_repo = 1, last if ($repos eq $j || $repos =~ /^$j\//); - } - if (!$in_repo) { - $in_repo = 1; - for $j (@ARGV) { - last if !($in_repo = grep ($_ eq $j, @tmp)); - } - } + next if /^\s*\#/; # skip comments + next if /^\s*$/; # skip blank lines + # --------------------------------------------- parse current 'cvsacl' line + print("$$ ==========\n$$ Processing \'cvsacl\' line: $_.\n") if $debug; + ($cvsacl_flag, $cvsacl_userIds, $cvsacl_modules, $cvsacl_branches) = split(/[\s,]*\|[\s,]*/, $_); + + # ------------------------------ Validate 'allow' or 'deny' line prefix + if ($cvsacl_flag !~ /^allow/ && $cvsacl_flag !~ /^deny/) { + print ("Bad cvsacl line: $_\n") if $debug; + $log_text = sprintf "Bad cvsacl line: %s", $_; + write_restrictlog_record($log_text); + next; } - print "$$ \$repos($repos) in repository list: $_\n" if $debug && $in_repo; - # Branch matches if it is in the branch list in the avail line, the branch - # list is NULL, or there is no branch and HEAD is in the branch list. - if(!($in_branch = !$b)) { - @bls = split (/[\s,]+/,$b); + # -------------------------------------------------- init loop match flags + $user_match = 0; + %repository_matches = (); + + # ------------------------------------------------------------------------ + # ---------------------------------------------------------- user matching + # ------------------------------------------------------------------------ + # $user_name considered "in user list" if actually in list or is NULL + $user_match = (!$cvsacl_userIds || grep ($_ eq $user_name, split(/[\s,]+/,$cvsacl_userIds))); + print "$$ \$user_name: $user_name \$user_match match flag is: $user_match.\n" if $debug; + if (!$user_match) { + next; # no match, skip to next 'cvsacl' line + } - for $j (@ARGV) { - $f = $j; - last if !($in_branch = grep($_ eq $branch{$j}, @bls)); + # ------------------------------------------------------------------------ + # ---------------------------------------------------- repository matching + # ------------------------------------------------------------------------ + if (!$cvsacl_modules) { # blank module list = all modules + if (!$cvsacl_branches) { # blank branch list = all branches + print("$$ Adding all modules to \%repository_matches; null " . + "\$cvsacl_modules and \$cvsacl_branches.\n") if $debug; + for $commit_object (@ARGV) { + $repository_matches{$commit_object} = [$branch{$commit_object}, $cvsacl_modules]; + print("$$ \$repository_matches{$commit_object} = " . + "[$branch{$commit_object}, $cvsacl_modules].\n") if $debug; + } + } + else { # need to check for repository match + @branch_list = split (/[\s,]+/,$cvsacl_branches); + print("$$ Branches from \'cvsacl\' record: ", join(", ",@branch_list),".\n") if $debug; + for $commit_object (@ARGV) { + if (grep($branch{$commit_object}, @branch_list)) { + $repository_matches{$commit_object} = [$branch{$commit_object}, $cvsacl_modules]; + print("$$ \$repository_matches{$commit_object} = " . + "[$branch{$commit_object}, $cvsacl_modules].\n") if $debug; + } + } + } + } + else { + # ----------------------------------- check every argument combination + # parse 'cvsacl' modules to array + my @module_list = split(/[\s,]+/,$cvsacl_modules); + # ------------- Check all modules in list for either file or directory + my $fileType = ""; + if (($fileType = checkFileness(@module_list)) eq "") { + next; # skip bad file types + } + # ---------- Check each combination of 'cvsacl' modules vs. @ARGV files + print("$$ Checking matches for \@module_list: ", join("\, ",@module_list), ".\n") if $debug; + # loop thru all command-line commit objects + for $commit_object (@ARGV) { + # loop thru all modules on 'cvsacl' line + for $cvsacl_module (@module_list) { + print("$$ Is \'cvsacl\': $cvsacl_modules pattern in: \@ARGV " . + "\$commit_object: $commit_object?\n") if $debug; + # Do match of beginning of $commit_object + checkModuleMatch($fileType, $commit_object, $cvsacl_module); + } # end for commit objects + } # end for cvsacl modules + } # end if + + print("$$ Matches for: \%repository_matches: ", join("\, ", (keys %repository_matches)), ".\n") if $debug; + + # ------------------------------------------------------------------------ + # ----------------------------------------------------- setting exit value + # ------------------------------------------------------------------------ + if ($user_match && %repository_matches) { + print("$$ An \"$cvsacl_flag\" match on User(s): $cvsacl_userIds; Module(s):" . + " $cvsacl_modules; Branch(es): $cvsacl_branches.\n") if $debug; + if ($cvsacl_flag eq "deny") { + # Add all matches to the hash of restricted modules + foreach $commitFile (keys %repository_matches) { + print("$$ Adding \%repository_matches entry: $commitFile.\n") if $debug; + $restricted_entries{$commitFile} = $repository_matches{$commitFile}[0]; + } + } + else { + # Remove all matches from the restricted modules hash + foreach $commitFile (keys %repository_matches) { + print("$$ Removing \%repository_matches entry: $commitFile.\n") if $debug; + delete $restricted_entries{$commitFile}; + } } } - print "$$ \$branch($branch{$f}) in branch list: $_\n" - if $debug && $in_branch; + print "$$ ==== End of processing for \'cvsacl\' line: $_.\n" if $debug; +} +close(CVSACL); - $exit_val = $flag if ($in_user && $in_repo && $in_branch); - print "$$ ==== \$exit_val = $exit_val\n$$ ==== \$flag = $flag\n" if $debug; +# ---------------------------------------------------------------------------- +# --------------------------------------- determine final 'commit' disposition +# ---------------------------------------------------------------------------- +if (%restricted_entries) { # any restricted entries? + $exit_val = 1; # don't commit + print("**** Access denied: Insufficient authority for user: '$user_name\' " . + "to commit to \'$repository\'.\n**** Contact CVS Administrators if " . + "you require update access to these directories or files.\n"); + print("**** file(s)/dir(s) restricted were:\n\t", join("\n\t",keys %restricted_entries), "\n"); + printOptionalRestrictionMessage(); + write_restrictlog(); +} +elsif (!$exit_val && $debug) { + print "**** Access allowed: Sufficient authority for commit.\n"; } -close(AVAIL); + print "$$ ==== \$exit_val = $exit_val\n" if $debug; -print "**** Access denied: Insufficient Karma ($myname|$repos|$branch{$f})\n" - if $exit_val; -print "**** Access allowed: Personal Karma exceeds Environmental Karma.\n" - if $universal_off && !$exit_val; exit($exit_val); + +# ---------------------------------------------------------------------------- +# -------------------------------------------------------------- end of "main" +# ---------------------------------------------------------------------------- + + +# ---------------------------------------------------------------------------- +# -------------------------------------------------------- process script args +# ---------------------------------------------------------------------------- +sub processArgs { + +# This subroutine is passed a reference to @ARGV. + +# If @ARGV contains a "-u" entry, use that as the effective userId. In this +# case, the userId is the client-side userId that has been passed to this +# script by the commit_prep script. (This is why the commit_prep script must +# be placed *before* the cvs_acls script in the commitinfo admin file.) + +# Otherwise, pull the userId from the server-side environment. + + my $userId = ""; + my ($argv) = shift; # pick up ref to @ARGV + my @argvClone = (); # immutable copy for foreach loop + for ($i=0; $i<(scalar @{$argv}); $i++) { + $argvClone[$i]=$argv->[$i]; + } + + print("$$ \@_ to processArgs is: @_.\n") if $debug; + + # Parse command line arguments (file list is seen as one arg) + foreach $arg (@argvClone) { + print("$$ \$arg for processArgs loop is: $arg.\n") if $debug; + # Set $debug flag? + if ($arg eq '-d') { + shift @ARGV; + $debug = 1; + print("$$ \$debug flag set on.\n") if $debug; + print STDERR "Debug turned on...\n"; + } + # Passing in a client-side userId? + elsif ($arg eq '-u') { + shift @ARGV; + $userId = shift @ARGV; + print("$$ client-side \$userId set to: $userId.\n") if $debug; + } + # An override for the default restrictlog file? + elsif ($arg eq '-f') { + shift @ARGV; + $restrictlog = shift @ARGV; + } + else { + next; + } + } + + # No client-side userId passed? then get from server env + if (!$userId) { + $userId = $ENV{"USER"} if !($userId = $ENV{"LOGNAME"}); + print("$$ server-side \$userId set to: $userId.\n") if $debug; + } + + print("$$ processArgs returning \$userId: $userId.\n") if $debug; + return $userId; + +} + + +# ---------------------------------------------------------------------------- +# --------------------- Check all modules in list for either file or directory +# ---------------------------------------------------------------------------- +sub checkFileness { + +# Module patterns on the 'cvsacl' record can be files or directories. +# If it's a directory, we pattern-match the directory name from 'cvsacl' +# against the left side of the committed filename to see if the file is in +# that hierarchy. By contrast, files use an explicit match. If the entries +# are neither files nor directories, then the cvsacl file has been set up +# incorrectly; we return a "" and the caller skips that line as invalid. +# +# This function determines whether the entries on the 'cvsacl' record are all +# directories or all files; it cannot be a mixture. This restriction put in +# to simplify the logic (without taking away much functionality). + + my @module_list = @_; + print("$$ Checking \"fileness\" or \"dir-ness\" for \@module_list entries.\n") if $debug; + print("$$ Entries are: ", join("\, ",@module_list), ".\n") if $debug; + my $filetype = ""; + for $cvsacl_module (@module_list) { + my $reposDirName = $cvsroot . '/' . $cvsacl_module; + my $reposFileName = $reposDirName . "\,v"; + print("$$ In checkFileness: \$reposDirName: $reposDirName; \$reposFileName: $reposFileName.\n") if $debug; + if (((-d $reposDirName) && ($filetype eq "file")) || ((-f $reposFileName) && ($filetype eq "dir"))) { + print("Can\'t mix files and directories on single \'cvsacl\' file record; skipping entry.\n"); + print(" Please contact a CVS administrator.\n"); + $filetype = ""; + last; + } + elsif (-d $reposDirName) { + $filetype = "dir"; + print("$$ $reposDirName is a directory.\n") if $debug; + } + elsif (-f $reposFileName) { + $filetype = "file"; + print("$$ $reposFileName is a regular file.\n") if $debug; + } + else { + print("***** Item to commit was neither a regular file nor a directory.\n"); + print("***** Current \'cvsacl\' line ignored.\n"); + print("***** Possible problem with \'cvsacl\' admin file. Please contact a CVS administrator.\n"); + $filetype = ""; + $text = sprintf("Module entry on cvsacl line: %s is not a valid file or directory.\n", $cvsacl_module); + write_restrictlog_record($text); + last; + } # end if + } # end for + + print("$$ checkFileness will return \$filetype: $filetype.\n") if $debug; + return $filetype; +} + + +# ---------------------------------------------------------------------------- +# ----------------------------------------------------- check for module match +# ---------------------------------------------------------------------------- +sub checkModuleMatch { + +# This subroutine checks for a match between the directory or file pattern +# specified in the 'cvsacl' file (i.e., $cvsacl_modules) versus the commit file +# objects passed into the script via @ARGV (i.e., $commit_object). + +# The directory pattern only has to match the beginning portion of the commit +# file's name for a match since all files under that directory are considered +# a match. File patterns must exactly match. + +# Since (theoretically, if not normally in practice) a working directory can +# contain a mixture of files from different branches, this routine checks to +# see if there is also a match on branch before considering the file +# comparison a match. + + my $match_flag = ""; + + print("$$ \@_ in checkModuleMatch is: @_.\n") if $debug; + my ($type,$commit_object,$cvsacl_module) = @_; + + if ($type eq "file") { # Do exact file match of $commit_object + if ($commit_object eq $cvsacl_module) { + $match_flag = "file"; + } # Do dir match at beginning of $commit_object + } + elsif ($commit_object =~ /^$cvsacl_module\//) { + $match_flag = "dir"; + } + + if ($match_flag) { + print("$$ \$repository: $repository matches \$commit_object: $commit_object.\n") if $debug; + if (!$cvsacl_branches) { # empty branch pattern matches all + print("$$ blank \'cvsacl\' branch matches all commit files.\n") if $debug; + $repository_matches{$commit_object} = [$branch{$commit_object}, $cvsacl_module]; + print("$$ \$repository_matches{$commit_object} = [$branch{$commit_object}, $cvsacl_module].\n") if $debug; + } + else { # otherwise check branch hash table + @branch_list = split (/[\s,]+/,$cvsacl_branches); + print("$$ Branches from \'cvsacl\' record: ", join(", ",@branch_list),".\n") if $debug; + if (grep(/$branch{$commit_object}/, @branch_list)) { + $repository_matches{$commit_object} = [$branch{$commit_object}, $cvsacl_module]; + print("$$ \$repository_matches{$commit_object} = [$branch{$commit_object}, " . + "$cvsacl_module].\n") if $debug; + } + } + } + +} + +# ---------------------------------------------------------------------------- +# ------------------------------------------------------- check for file match +# ---------------------------------------------------------------------------- +sub printOptionalRestrictionMessage { + +# This subroutine optionally prints site-specific file restriction information +# whenever a restriction condition is met. If the file 'restrict_msg' does +# not exist, the routine immediately exits. If there is a 'restrict_msg' file +# then all the contents are printed at the end of the standard restriction +# message. + +# As seen from examining the definition of $restrictfile, the default filename +# is: $CVSROOT/CVSROOT/restrict_msg. + + open (RESTRICT, $restrictfile) || return; # It is ok for cvsacl file not to exist + while () { + chop; + # print out each line + print("**** $_\n"); + } + +} + +# ---------------------------------------------------------------------------- +# ---------------------------------------------------------- write log message +# ---------------------------------------------------------------------------- +sub write_restrictlog { + +# This subroutine iterates through the list of restricted entries and logs +# each one to the error logfile. + + # write each line in @text out separately + foreach $commitfile (keys %restricted_entries) { + $log_text = sprintf "Commit attempt by: %s for: %s on branch: %s", + $user_name, $commitfile, $branch{$commitfile}; + write_restrictlog_record($log_text); + } + +} + +# ---------------------------------------------------------------------------- +# ---------------------------------------------------------- write log message +# ---------------------------------------------------------------------------- +sub write_restrictlog_record { + +# This subroutine receives a scalar string and writes it out to the +# $restrictlog file as a separate line. Each line is prepended with the date +# and time in the format: "2004/01/30 12:00:00 ". + + $text = shift; + + # return quietly if there is a problem opening the log file. + open(FILE, ">>$restrictlog") || return; + + (@time) = localtime(); + + # write each line in @text out separately + $log_record = sprintf "%04d/%02d/%02d %02d:%02d:%02d %s.\n", + $time[5]+1900, $time[4]+1, $time[3], $time[2], $time[1], $time[0], $text; + print FILE $log_record; + print("$$ restrict_log record being written: $log_record to $restrictlog.\n") if $debug; + + close(FILE); +} Index: contrib/cvscheck.sh =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/contrib/cvscheck.sh,v retrieving revision 1.1.1.2 retrieving revision 1.1.1.3 diff -u -p -r1.1.1.2 -r1.1.1.3 --- contrib/cvscheck.sh 15 May 1997 22:46:06 -0000 1.1.1.2 +++ contrib/cvscheck.sh 26 Dec 2007 03:55:01 -0000 1.1.1.3 @@ -1,5 +1,17 @@ #! /bin/sh # +# Copyright (C) 1995-2005 The 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. +# # cvscheck - identify files added, changed, or removed # in CVS working directory # Index: contrib/debug_check_log.sh =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/contrib/debug_check_log.sh,v retrieving revision 1.1.1.2 retrieving revision 1.1.1.3 diff -u -p -r1.1.1.2 -r1.1.1.3 --- contrib/debug_check_log.sh 2 Dec 2002 03:13:37 -0000 1.1.1.2 +++ contrib/debug_check_log.sh 26 Dec 2007 03:55:01 -0000 1.1.1.3 @@ -1,5 +1,17 @@ #!/bin/sh +# Copyright (C) 2000-2005 The 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. + # # This program is intended to take a check.log file generated by a failed run of # sanity.sh as input and run expr line by line on it. It seems a much easier @@ -7,15 +19,6 @@ # # -# This script falls under the GNU General Public License and is intended to -# be distributed with CVS. -# - -# -# No warranties, express or implied. -# - -# # Contributed by Derek R. Price # Index: contrib/descend.sh =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/contrib/descend.sh,v retrieving revision 1.1.1.2 retrieving revision 1.1.1.3 diff -u -p -r1.1.1.2 -r1.1.1.3 --- contrib/descend.sh 15 May 1997 22:46:06 -0000 1.1.1.2 +++ contrib/descend.sh 26 Dec 2007 03:55:01 -0000 1.1.1.3 @@ -1,5 +1,17 @@ #! /bin/sh # +# Copyright (C) 1995-2005 The 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. +# # descend - walk down a directory tree and execute a command at each node fullname=$0 Index: contrib/log.in =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/contrib/log.in,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.2 diff -u -p -r1.1.1.1 -r1.1.1.2 --- contrib/log.in 10 Aug 2001 09:43:22 -0000 1.1.1.1 +++ contrib/log.in 26 Dec 2007 03:55:00 -0000 1.1.1.2 @@ -1,6 +1,36 @@ -#! @PERL@ +#! @PERL@ -T # -*-Perl-*- -# + +# Copyright (C) 1994-2005 The 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. + +############################################################################### +############################################################################### +############################################################################### +# +# THIS SCRIPT IS PROBABLY BROKEN. REMOVING THE -T SWITCH ON THE #! LINE ABOVE +# WOULD FIX IT, BUT THIS IS INSECURE. WE RECOMMEND FIXING THE ERRORS WHICH THE +# -T SWITCH WILL CAUSE PERL TO REPORT BEFORE RUNNING THIS SCRIPT FROM A CVS +# SERVER TRIGGER. PLEASE SEND PATCHES CONTAINING THE CHANGES YOU FIND +# NECESSARY TO RUN THIS SCRIPT WITH THE TAINT-CHECKING ENABLED BACK TO THE +# <@PACKAGE_BUGREPORT@> MAILING LIST. +# +# For more on general Perl security and taint-checking, please try running the +# `perldoc perlsec' command. +# +############################################################################### +############################################################################### +############################################################################### + # XXX: FIXME: handle multiple '-f logfile' arguments # # XXX -- I HATE Perl! This *will* be re-written in shell/awk/sed soon! Index: contrib/log_accum.in =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/contrib/log_accum.in,v retrieving revision 1.1.1.2 retrieving revision 1.1.1.3 diff -u -p -r1.1.1.2 -r1.1.1.3 --- contrib/log_accum.in 15 Apr 2004 01:01:55 -0000 1.1.1.2 +++ contrib/log_accum.in 26 Dec 2007 03:55:00 -0000 1.1.1.3 @@ -1,6 +1,36 @@ -#! @PERL@ +#! @PERL@ -T # -*-Perl-*- -# + +# Copyright (C) 1994-2005 The 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. + +############################################################################### +############################################################################### +############################################################################### +# +# THIS SCRIPT IS PROBABLY BROKEN. REMOVING THE -T SWITCH ON THE #! LINE ABOVE +# WOULD FIX IT, BUT THIS IS INSECURE. WE RECOMMEND FIXING THE ERRORS WHICH THE +# -T SWITCH WILL CAUSE PERL TO REPORT BEFORE RUNNING THIS SCRIPT FROM A CVS +# SERVER TRIGGER. PLEASE SEND PATCHES CONTAINING THE CHANGES YOU FIND +# NECESSARY TO RUN THIS SCRIPT WITH THE TAINT-CHECKING ENABLED BACK TO THE +# <@PACKAGE_BUGREPORT@> MAILING LIST. +# +# For more on general Perl security and taint-checking, please try running the +# `perldoc perlsec' command. +# +############################################################################### +############################################################################### +############################################################################### + # Perl filter to handle the log messages from the checkin of files in # a directory. This script will group the lists of files by log # message, and mail a single consolidated log message at the end of @@ -51,7 +81,7 @@ $rcsidinfo = 2; # When set properly, this will cause links to aspects of the project to # print in the commit emails. #$CVSWEB_SCHEME = "http"; -#$CVSWEB_DOMAIN = "cvshome.org"; +#$CVSWEB_DOMAIN = "nongnu.org"; #$CVSWEB_PORT = "80"; #$CVSWEB_URI = "source/browse/"; #$SEND_URL = "true"; @@ -60,7 +90,7 @@ $SEND_DIFF = "true"; # Set this to a domain to have CVS pretend that all users who make # commits have mail accounts within that domain. -#$EMULATE_LOCAL_MAIL_USER="cvshome.org"; +#$EMULATE_LOCAL_MAIL_USER="nongnu.org"; # Set this to '-c' for context diffs; defaults to '-u' for unidiff format. $difftype = '-uN'; @@ -273,7 +303,7 @@ sub change_summary { } $diff = "\n\n"; - $vhost = @path[0]; + $vhost = $path[0]; if ($CVSWEB_PORT eq "80") { $cvsweb_base = "$CVSWEB_SCHEME://$vhost.$CVSWEB_DOMAIN/$CVSWEB_URI"; } @@ -369,7 +399,7 @@ sub build_header { #sub mlist_map #{ # local($path) = @_; -# my $domain = "cvshome.org"; +# my $domain = "nongnu.org"; # # if ($path =~ /^([^\/]+)/) { # return "cvs\@$1.$domain"; @@ -457,7 +487,7 @@ sub mail_notification my $subj = &derive_subject_from_changes_file (); - if ($EMULATE_LOCAL_MAIL_USER NE "") { + if ($EMULATE_LOCAL_MAIL_USER ne "") { $MAIL_FROM = "$cvs_user\@$EMULATE_LOCAL_MAIL_USER"; } @@ -536,7 +566,6 @@ $state = $STATE_NONE; $cvs_user = $ENV{'USER'} || getlogin || (getpwuid($<))[0] || sprintf("uid#%d",$<); @files = process_argv(@ARGV); @path = split('/', $files[0]); -$repository = $path[0]; if ($#path == 0) { $dir = "."; } else { Index: contrib/mfpipe.in =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/contrib/mfpipe.in,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.2 diff -u -p -r1.1.1.1 -r1.1.1.2 --- contrib/mfpipe.in 10 Aug 2001 09:43:22 -0000 1.1.1.1 +++ contrib/mfpipe.in 26 Dec 2007 03:55:00 -0000 1.1.1.2 @@ -1,6 +1,36 @@ -#! @PERL@ +#! @PERL@ -T # -*-Perl-*- -# + +# Copyright (C) 1994-2005 The 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. + +############################################################################### +############################################################################### +############################################################################### +# +# THIS SCRIPT IS PROBABLY BROKEN. REMOVING THE -T SWITCH ON THE #! LINE ABOVE +# WOULD FIX IT, BUT THIS IS INSECURE. WE RECOMMEND FIXING THE ERRORS WHICH THE +# -T SWITCH WILL CAUSE PERL TO REPORT BEFORE RUNNING THIS SCRIPT FROM A CVS +# SERVER TRIGGER. PLEASE SEND PATCHES CONTAINING THE CHANGES YOU FIND +# NECESSARY TO RUN THIS SCRIPT WITH THE TAINT-CHECKING ENABLED BACK TO THE +# <@PACKAGE_BUGREPORT@> MAILING LIST. +# +# For more on general Perl security and taint-checking, please try running the +# `perldoc perlsec' command. +# +############################################################################### +############################################################################### +############################################################################### + # From: clyne@niwot.scd.ucar.EDU (John Clyne) # Date: Fri, 28 Feb 92 09:54:21 MST # Index: contrib/pvcs2rcs.in =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/contrib/pvcs2rcs.in,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.2 diff -u -p -r1.1.1.1 -r1.1.1.2 --- contrib/pvcs2rcs.in 2 Sep 2002 05:49:42 -0000 1.1.1.1 +++ contrib/pvcs2rcs.in 26 Dec 2007 03:55:00 -0000 1.1.1.2 @@ -103,7 +103,7 @@ # pvcs_archives. # * You must use the -pflat option when processing single filenames # passed as arguments to the script. This is probably a bug. -# * questions, comments, additions can be sent to info-cvs@gnu.org +# * questions, comments, additions can be sent to info-cvs@nongnu.org ######################################################################### Index: contrib/rcs-to-cvs.sh =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/contrib/rcs-to-cvs.sh,v retrieving revision 1.1.1.2 retrieving revision 1.1.1.3 diff -u -p -r1.1.1.2 -r1.1.1.3 --- contrib/rcs-to-cvs.sh 15 May 1997 22:46:08 -0000 1.1.1.2 +++ contrib/rcs-to-cvs.sh 26 Dec 2007 03:55:01 -0000 1.1.1.3 @@ -1,13 +1,22 @@ #! /bin/sh # +# Copyright (c) 1989-2005 The Free Software Foundation, Inc. +# Portions Copyright (c) 1989, Brian Berliner +# +# 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. +# # Based on the CVS 1.0 checkin csh script. # Contributed by Per Cederqvist . # Rewritten in sh by David MacKenzie . # -# Copyright (c) 1989, Brian Berliner -# -# You may distribute under the terms of the GNU General Public License. -# ############################################################################# # # Check in sources that previously were under RCS or no source control system. Index: contrib/rcs2log.sh =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/contrib/rcs2log.sh,v retrieving revision 1.1.1.5 retrieving revision 1.1.1.6 diff -u -p -r1.1.1.5 -r1.1.1.6 --- contrib/rcs2log.sh 15 Apr 2004 01:01:55 -0000 1.1.1.5 +++ contrib/rcs2log.sh 26 Dec 2007 03:55:01 -0000 1.1.1.6 @@ -1,5 +1,17 @@ #! /bin/sh +# Copyright (C) 1995-2005 The 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. + # RCS to ChangeLog generator # Generate a change log prefix from RCS files (perhaps in the CVS repository) Index: contrib/rcs2sccs.sh =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/contrib/rcs2sccs.sh,v retrieving revision 1.1.1.4 retrieving revision 1.1.1.5 diff -u -p -r1.1.1.4 -r1.1.1.5 --- contrib/rcs2sccs.sh 15 Apr 2004 01:01:55 -0000 1.1.1.4 +++ contrib/rcs2sccs.sh 26 Dec 2007 03:55:01 -0000 1.1.1.5 @@ -1,5 +1,16 @@ #! /bin/sh # +# Copyright (C) 1995-2005 The 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. # ############################################################ Index: contrib/rcslock.in =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/contrib/rcslock.in,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.2 diff -u -p -r1.1.1.1 -r1.1.1.2 --- contrib/rcslock.in 10 Aug 2001 09:43:22 -0000 1.1.1.1 +++ contrib/rcslock.in 26 Dec 2007 03:55:01 -0000 1.1.1.2 @@ -1,6 +1,36 @@ -#! @PERL@ +#! @PERL@ -T # -*-Perl-*- +# Copyright (C) 1994-2005 The 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. + +############################################################################### +############################################################################### +############################################################################### +# +# THIS SCRIPT IS PROBABLY BROKEN. REMOVING THE -T SWITCH ON THE #! LINE ABOVE +# WOULD FIX IT, BUT THIS IS INSECURE. WE RECOMMEND FIXING THE ERRORS WHICH THE +# -T SWITCH WILL CAUSE PERL TO REPORT BEFORE RUNNING THIS SCRIPT FROM A CVS +# SERVER TRIGGER. PLEASE SEND PATCHES CONTAINING THE CHANGES YOU FIND +# NECESSARY TO RUN THIS SCRIPT WITH THE TAINT-CHECKING ENABLED BACK TO THE +# <@PACKAGE_BUGREPORT@> MAILING LIST. +# +# For more on general Perl security and taint-checking, please try running the +# `perldoc perlsec' command. +# +############################################################################### +############################################################################### +############################################################################### + # Author: John Rouillard (rouilj@cs.umb.edu) # Supported: Yeah right. (Well what do you expect for 2 hours work?) # Blame-to: rouilj@cs.umb.edu Index: contrib/sccs2rcs.in =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/contrib/sccs2rcs.in,v retrieving revision 1.5 retrieving revision 1.6 diff -u -p -r1.5 -r1.6 --- contrib/sccs2rcs.in 15 Apr 2004 01:17:25 -0000 1.5 +++ contrib/sccs2rcs.in 26 Dec 2007 04:03:14 -0000 1.6 @@ -1,4 +1,16 @@ #! @CSH@ -f + +# Copyright (C) 1995-2005 The 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. # # Sccs2rcs is a script to convert an existing SCCS # history into an RCS history without losing any of @@ -48,7 +60,6 @@ # -Allan G. Schrum schrum@ofsoptics.com agschrum@mindspring.com # Fri Sep 26 10:40:40 EDT 2003 # -# $FreeBSD$ #we'll assume the user set up the path correctly Index: diff/ChangeLog =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/diff/ChangeLog,v retrieving revision 1.1.1.9 retrieving revision 1.1.1.10 diff -u -p -r1.1.1.9 -r1.1.1.10 --- diff/ChangeLog 10 Jun 2004 19:05:38 -0000 1.1.1.9 +++ diff/ChangeLog 26 Dec 2007 03:55:04 -0000 1.1.1.10 @@ -1,3 +1,11 @@ +2005-09-04 Derek Price + + * Makefile.am (EXTRA_DIST): Add .cvsignore. + +2004-11-05 Conrad T. Pino + + * libdiff.dep: Regenerated after complete rebuild. + 2004-05-15 Derek Price * libdiff.dsp: Header file list updated. Index: diff/Makefile.am =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/diff/Makefile.am,v retrieving revision 1.1.1.2 retrieving revision 1.1.1.3 diff -u -p -r1.1.1.2 -r1.1.1.3 --- diff/Makefile.am 10 Jun 2004 19:05:38 -0000 1.1.1.2 +++ diff/Makefile.am 26 Dec 2007 03:55:04 -0000 1.1.1.3 @@ -22,4 +22,4 @@ libdiff_a_SOURCES = diff.c diff3.c analy side.c system.h diffrun.h EXTRA_DIST = ChangeLog build_diff.com diagmeet.note \ - libdiff.dep libdiff.dsp libdiff.mak + libdiff.dep libdiff.dsp libdiff.mak .cvsignore Index: diff/Makefile.in =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/diff/Makefile.in,v retrieving revision 1.1.1.8 retrieving revision 1.1.1.9 diff -u -p -r1.1.1.8 -r1.1.1.9 --- diff/Makefile.in 10 Jun 2004 19:05:38 -0000 1.1.1.8 +++ diff/Makefile.in 26 Dec 2007 03:55:04 -0000 1.1.1.9 @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.7.9 from Makefile.am. +# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ -# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -21,7 +21,6 @@ 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 @@ -35,6 +34,39 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +subdir = diff +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AR = ar +ARFLAGS = cru +libdiff_a_AR = $(AR) $(ARFLAGS) +libdiff_a_LIBADD = +am_libdiff_a_OBJECTS = diff.$(OBJEXT) diff3.$(OBJEXT) \ + analyze.$(OBJEXT) cmpbuf.$(OBJEXT) io.$(OBJEXT) \ + context.$(OBJEXT) ed.$(OBJEXT) normal.$(OBJEXT) \ + ifdef.$(OBJEXT) util.$(OBJEXT) dir.$(OBJEXT) version.$(OBJEXT) \ + side.$(OBJEXT) +libdiff_a_OBJECTS = $(am_libdiff_a_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(libdiff_a_SOURCES) +DIST_SOURCES = $(libdiff_a_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ @@ -104,6 +136,8 @@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ @@ -117,6 +151,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ +mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ @@ -124,63 +159,49 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ - +with_default_rsh = @with_default_rsh@ INCLUDES = -I$(top_srcdir)/lib - noinst_LIBRARIES = libdiff.a - libdiff_a_SOURCES = diff.c diff3.c analyze.c cmpbuf.c cmpbuf.h io.c \ context.c ed.c normal.c ifdef.c util.c dir.c version.c diff.h \ side.c system.h diffrun.h - EXTRA_DIST = ChangeLog build_diff.com diagmeet.note \ - libdiff.dep libdiff.dsp libdiff.mak - -subdir = diff -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -LIBRARIES = $(noinst_LIBRARIES) - -libdiff_a_AR = $(AR) cru -libdiff_a_LIBADD = -am_libdiff_a_OBJECTS = diff.$(OBJEXT) diff3.$(OBJEXT) analyze.$(OBJEXT) \ - cmpbuf.$(OBJEXT) io.$(OBJEXT) context.$(OBJEXT) ed.$(OBJEXT) \ - normal.$(OBJEXT) ifdef.$(OBJEXT) util.$(OBJEXT) dir.$(OBJEXT) \ - version.$(OBJEXT) side.$(OBJEXT) -libdiff_a_OBJECTS = $(am_libdiff_a_OBJECTS) - -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/analyze.Po ./$(DEPDIR)/cmpbuf.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/context.Po ./$(DEPDIR)/diff.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/diff3.Po ./$(DEPDIR)/dir.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/ed.Po ./$(DEPDIR)/ifdef.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/io.Po ./$(DEPDIR)/normal.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/side.Po ./$(DEPDIR)/util.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/version.Po -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -DIST_SOURCES = $(libdiff_a_SOURCES) -DIST_COMMON = $(srcdir)/Makefile.in ChangeLog Makefile.am -SOURCES = $(libdiff_a_SOURCES) + libdiff.dep libdiff.dsp libdiff.mak .cvsignore all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu diff/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu diff/Makefile -Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) - -AR = ar +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) @@ -190,7 +211,7 @@ libdiff.a: $(libdiff_a_OBJECTS) $(libdif $(RANLIB) libdiff.a mostlyclean-compile: - -rm -f *.$(OBJEXT) core *.core + -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @@ -210,36 +231,20 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ -@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ -@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ -@am__fastdepCC_TRUE@ fi +@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 `test -f '$<' || echo '$(srcdir)/'`$< +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ -@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ -@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ -@am__fastdepCC_TRUE@ fi +@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 `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` uninstall-info-am: -ETAGS = etags -ETAGSFLAGS = - -CTAGS = ctags -CTAGSFLAGS = - -tags: TAGS - ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -248,6 +253,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique +tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) @@ -259,10 +265,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEP 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 - + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) @@ -285,10 +292,6 @@ GTAGS: distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - -top_distdir = .. -distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ @@ -302,7 +305,7 @@ distdir: $(DISTFILES) dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ - $(mkinstalldirs) "$(distdir)$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ @@ -320,7 +323,6 @@ distdir: $(DISTFILES) check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) - installdirs: install: install-am install-exec: install-exec-am @@ -341,7 +343,7 @@ mostlyclean-generic: clean-generic: distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -360,6 +362,8 @@ dvi: dvi-am dvi-am: +html: html-am + info: info-am info-am: @@ -395,13 +399,14 @@ uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-noinstLIBRARIES ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am info \ - info-am install install-am install-data install-data-am \ - install-exec install-exec-am install-info install-info-am \ - install-man install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ - ps ps-am tags uninstall uninstall-am uninstall-info-am + distclean-generic distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-exec install-exec-am install-info \ + install-info-am install-man install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. Index: doc/ChangeLog =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/doc/ChangeLog,v retrieving revision 1.1.1.16 retrieving revision 1.1.1.17 diff -u -p -r1.1.1.16 -r1.1.1.17 --- doc/ChangeLog 10 Jun 2004 19:05:37 -0000 1.1.1.16 +++ doc/ChangeLog 26 Dec 2007 03:55:01 -0000 1.1.1.17 @@ -1,3 +1,205 @@ +2006-06-08 Derek Price + + * cvsclient.texi (Requests): Add Empty-conflicts. + +2006-03-20 Mark D. Baushke + + [patch #4965] + * cvs.texinfo (Sticky tags, Merging and keywords) + (checkout options, update options): The -A switch + does not reset sticky -k options on modified files. + * cvs.1, stamp-1, stamp-vti, version.texi: Regenerated. + +2006-02-28 Derek Price + + * cvs.texinfo (Editing administrative files): Import changes from Wiki. + +2005-12-09 Derek Price + + [patch #4634] + * cvsclient.texi (Root request): Clarify. + +2005-11-10 Larry Jones + + * cvs.texinfo (Common options): -n no longer applies to commit. + (commit): Remove reference to the defunct -n option. + * cvs.1, stamp-vti, version.texi: Regenerated + +2005-10-12 Derek Price + + * cvs.texinfo: Remove text that created unintentional cross-references + in generated info files. + +2005-10-04 Derek Price + + * cvs.texinfo: s/visa versa/vice versa/. (From Wiki.) + +2005-09-26 Derek Price + + * Makefile.am (cvs-paper.ps, cvs-paper.pdf): Remove implicit sources. + Add comments about why implicit rules won't work for these targets. + Make sure the distributed cvs-paper.pdf is created in $(srcdir). Make + cvs-paper.pdf directly from cvs-paper.ms to avoid building it just + because cvs-paper.ps is missing. + + * Makefile.am (EXTRA_DIST): Restore PDFs. + * cvs-paper.ps: Removed. + * texinfo.tex: Update from GNULIB. + +2005-09-25 Derek Price + + * Makefile.am (doc): Finish removing PSs. + + * Makefile.am (EXTRA_DIST): Remove PDFs too until errors go away. + + * Makefile.am (EXTRA_DIST): Dist PDFs rather than PSs. + +2005-09-22 Larry Jones + + * cvs.texinfo (rdiff options): Document -k. + * cvs.1, stamp-vti, version.texi: Regenerated. + +2005-09-20 Larry Jones + + * cvs.texinfo: Move summary and detail contents to the front + where they belong. + +2005-09-14 Derek Price + + * Makefile.am: s#cvs.1#$(srcdir)/cvs.1#. + +2005-09-11 Larry Jones + + * cvs.texinfo (Common options): Note that -r branch for a revision + means the head of the branch. + +2005-09-10 Larry Jones + + * cvs.texinfo (Error messages): Add suggested messages. + +2005-09-09 Larry Jones + + * cvs.texinfo (Error messages): Add signal 11 message. + +2005-09-01 Derek Price + + * cvs.man.footer: Update links. + +2005-09-01 Derek Price + + * cvs.texinfo: Update links and email addresses. + +2005-08-29 Derek Price + + * cvs.texinfo (From scratch): Add checkout to import example, from + wiki. + +2005-08-29 Derek Price + + * cvs.texinfo (Removing directories): Correct grammar, from wiki. + +2005-08-29 Derek Price + + * cvs.texinfo (From scratch): Clarify note on `cvs add', inspired from + wiki. + +2005-08-22 Derek Price + + Address bug #13882, submitted by Fred Maranhao. + * cvs.texinfo (log options, admin options, Invoking CVS): Add cross + references for clarity about possible states. + +2005-08-22 Derek Price + + * cvs.texinfo (Updating a file): Add note about update -d, inspired by + wiki. + +2005-08-12 Derek Price + + * cvs.texinfo (What is CVS?): Rephrase for clarity, imported from + Wiki. + +2005-08-02 Derek Price + + * cvs.texinfo (What is CVS?, BUGS): s/cvshome/nongnu/. Remove + obsolete Pascal Molli link. + +2005-06-22 Derek Price + + * cvs.texinfo (Builds): Update Gunnar Tornblom's email at his request. + +2005-05-03 Derek Price + + * cvsclient.texi (Goals): Remove typo. Resolves cvshome issue #236. + +2005-05-03 Derek Price + + * cvs.texinfo (Creating a repository): Provide xref to the remote + repositries section. Resolves issue #203 on cvshome.org. + +2005-05-03 Derek Price + + * cvs.texinfo (Moving directories): Clarify instructions on renaming a + directory. Partially resolves issue #246 on cvshome.org. + +2005-05-03 Derek Price + + * cvs.texinfo (update output): Use "working directory" in place of + "source" for clarity. Closes issue #245 on cvshome.org. + +2005-04-28 Derek Price + + * mkman.pl: Minor changes to accomodate Perl 5.8.4. Improve + commenting. + ($nk, $ret, $debug): New globals. + (debug_print): New function. + +2005-04-14 Derek Price + + * cvs.texinfo (Administrative files): Add "Trigger Scripts" node to + the menu. + (Trigger Scripts, Trigger Script Security): New nodes. + (syntax): Move under Trigger scripts node. + (commit files, taginfo): Rewrite to reference Trigger Script node. + +2005-04-06 Derek Price + + * Makefile.am (MAINTAINERCLEANFILES): Add cvs.1. + (cvs.1): Create intermediate file so that the original isn't emptied on + error. + +2005-01-31 Derek Price + + * Makefile.am, cvs.man.header, cvs.texinfo: Update copyright notices. + +2005-01-29 Derek Price + + * cvs.texinfo (log options): Note quirky interaction of log options. + (Suggestion from Dan Peterson .) + +2004-10-29 Mark D. Baushke + + * cvs.texinfo (Common options): The -r TAG option works with + the cvs annotate command. + (Original patch from Ville Skytta .) + +2004-09-25 Derek Price + + * mkman.in: Move to... + * mkman.pl: ...here. + * Makefile.am (cvs.1): mkman is in build dir, not src dir. + +2004-07-17 Derek Price + + * cvs.texinfo (Update imports, import): Add notes on requirement that + release tags be unique. + (Original patch from Ilya N. Golubev .) + +2004-06-10 Derek Price + + * cvs.texinfo (commit files): Remove reference to the obsolete -i + module option. + 2004-05-28 Derek Price * cvs.texinfo (Global options): Remove reference to global -l option. Index: doc/Makefile.am =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/doc/Makefile.am,v retrieving revision 1.1.1.4 retrieving revision 1.1.1.5 diff -u -p -r1.1.1.4 -r1.1.1.5 --- doc/Makefile.am 10 Jun 2004 19:05:37 -0000 1.1.1.4 +++ doc/Makefile.am 26 Dec 2007 03:55:01 -0000 1.1.1.5 @@ -1,8 +1,10 @@ ## Process this file with automake to produce Makefile.in # Makefile for GNU CVS documentation (excluding man pages - see ../man). -# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, -# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. +# +# Copyright (C) 1986-2005 The Free Software Foundation, Inc. +# +# Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , +# and others. # 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 @@ -15,7 +17,7 @@ # GNU General Public License for more details. info_TEXINFOS = cvs.texinfo cvsclient.texi -man_MANS = cvs.1 +man_MANS = $(srcdir)/cvs.1 PSS = \ cvs.ps \ @@ -24,7 +26,7 @@ PSS = \ PDFS = \ cvs.pdf \ - cvs-paper.pdf \ + $(srcdir)/cvs-paper.pdf \ cvsclient.pdf TXTS = \ @@ -32,25 +34,27 @@ TXTS = \ cvsclient.txt EXTRA_DIST = \ - $(PSS) \ .cvsignore \ ChangeLog.fsf \ RCSFILES \ mdate-sh \ - cvs.1 \ + $(srcdir)/cvs.1 \ cvs-paper.ms \ cvs.man.header \ - cvs.man.footer + cvs.man.footer \ + $(PDFS) + +MOSTLYCLEANFILES = -MOSTLYCLEANFILES = \ +CLEANFILES = \ + $(PSS) \ $(TXTS) -# These Automake generates MOSTLYCLEAN targets for PostScripts genersted from -# TEXINFOS, but it shouldn't when those files are in EXTRA_DIST MAINTAINERCLEANFILES = \ - $(PSS) + $(PDFS) \ + $(srcdir)/cvs.1 -doc: info ps +doc: info pdf .PHONY: doc txt: $(TXTS) @@ -65,21 +69,36 @@ dvi: cvs.dvi cvsclient.dvi cvs.txt: cvs.texinfo $(srcdir)/version.texi cvsclient.txt: cvsclient.texi $(srcdir)/version-client.texi -# These targets need to be very specific so that the other PDFs get generated -# correctly. If they are more generic and cvs.ps is made before cvs.pdf, then -# cvs.pdf will be generated from the generic target and the PS source, which -# contains less information (hyperlinks and such) than the usual texinfo source. +# The cvs-paper.pdf target needs to be very specific so that the other PDFs get +# generated correctly. If a more generic .ps.pdf implicit target is defined, +# and cvs.ps is made before cvs.pdf, then cvs.pdf can be generated from the +# .ps.pdf target and the PS source, which contains less information (hyperlinks +# and such) than the usual texinfo source. +# +# It is possible that an implicit .ms.ps target could be safely defined. I +# don't recall looking into it. cvs-paper.ps: cvs-paper.ms - $(ROFF) -t -p -ms -Tps $< > $@-t - mv $@-t $@ + $(ROFF) -t -p -ms -Tps $(srcdir)/cvs-paper.ms >cvs-paper.ps-t + cp cvs-paper.ps-t $@ + -@rm -f cvs-paper.ps-t + +# This rule introduces some redundancy, but `make distcheck' requires that +# Nothing in $(srcdir) be rebuilt, and this will always be rebuilt when it +# is dependant on cvs-paper.ps and cvs-paper.ps isn't distributed. +$(srcdir)/cvs-paper.pdf: cvs-paper.ms + $(ROFF) -t -p -ms -Tps $(srcdir)/cvs-paper.ms >cvs-paper.ps-t + ps2pdf cvs-paper.ps-t cvs-paper.pdf-t + cp cvs-paper.pdf-t $@ + -@rm -f cvs-paper.pdf-t cvs-paper.ps-t -cvs-paper.pdf: cvs-paper.ps - ps2pdf $< $@ +MOSTLYCLEANFILES += cvs-paper.pdf-t cvs-paper.ps-t # Targets to build a man page from cvs.texinfo. -cvs.1: @MAINTAINER_MODE_TRUE@ mkman cvs.man.header cvs.texinfo cvs.man.footer - ./mkman $(srcdir)/cvs.man.header $(srcdir)/cvs.texinfo \ - $(srcdir)/cvs.man.footer >$@ +$(srcdir)/cvs.1: @MAINTAINER_MODE_TRUE@ mkman cvs.man.header cvs.texinfo cvs.man.footer + $(PERL) ./mkman $(srcdir)/cvs.man.header $(srcdir)/cvs.texinfo \ + $(srcdir)/cvs.man.footer >cvs.tmp + cp cvs.tmp $(srcdir)/cvs.1 + -@rm -f cvs.tmp # texinfo based targets automake neglects to include SUFFIXES = .txt Index: doc/Makefile.in =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/doc/Makefile.in,v retrieving revision 1.1.1.8 retrieving revision 1.1.1.9 diff -u -p -r1.1.1.8 -r1.1.1.9 --- doc/Makefile.in 10 Jun 2004 19:05:37 -0000 1.1.1.8 +++ doc/Makefile.in 26 Dec 2007 03:55:01 -0000 1.1.1.9 @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.7.9 from Makefile.am. +# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ -# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,9 +15,11 @@ @SET_MAKE@ # Makefile for GNU CVS documentation (excluding man pages - see ../man). -# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, -# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. +# +# Copyright (C) 1986-2005 The Free Software Foundation, Inc. +# +# Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , +# and others. # 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 @@ -28,7 +30,6 @@ # 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. - srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -36,7 +37,6 @@ 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 @@ -50,6 +50,35 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +subdir = doc +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/mkman.pl $(srcdir)/stamp-1 $(srcdir)/stamp-vti \ + $(srcdir)/version-client.texi $(srcdir)/version.texi ChangeLog \ + mdate-sh texinfo.tex +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = mkman +SOURCES = +DIST_SOURCES = +INFO_DEPS = $(srcdir)/cvs.info $(srcdir)/cvsclient.info +am__TEXINFO_TEX_DIR = $(srcdir) +DVIS = cvs.dvi cvsclient.dvi +HTMLS = cvs.html cvsclient.html +TEXINFOS = cvs.texinfo cvsclient.texi +TEXI2PDF = $(TEXI2DVI) --pdf --batch +MAKEINFOHTML = $(MAKEINFO) --html +AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) +DVIPS = dvips +am__installdirs = "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)" +man1dir = $(mandir)/man1 +NROFF = nroff +MANS = $(man_MANS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ @@ -119,6 +148,8 @@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ @@ -132,6 +163,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ +mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ @@ -139,167 +171,232 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ - +with_default_rsh = @with_default_rsh@ info_TEXINFOS = cvs.texinfo cvsclient.texi -man_MANS = cvs.1 - +man_MANS = $(srcdir)/cvs.1 PSS = \ cvs.ps \ cvs-paper.ps \ cvsclient.ps - PDFS = \ cvs.pdf \ - cvs-paper.pdf \ + $(srcdir)/cvs-paper.pdf \ cvsclient.pdf - TXTS = \ cvs.txt \ cvsclient.txt - EXTRA_DIST = \ - $(PSS) \ .cvsignore \ ChangeLog.fsf \ RCSFILES \ mdate-sh \ - cvs.1 \ + $(srcdir)/cvs.1 \ cvs-paper.ms \ cvs.man.header \ - cvs.man.footer + cvs.man.footer \ + $(PDFS) - -MOSTLYCLEANFILES = \ +MOSTLYCLEANFILES = cvs-paper.pdf-t cvs-paper.ps-t +CLEANFILES = \ + $(PSS) \ $(TXTS) - -# These Automake generates MOSTLYCLEAN targets for PostScripts genersted from -# TEXINFOS, but it shouldn't when those files are in EXTRA_DIST MAINTAINERCLEANFILES = \ - $(PSS) + $(PDFS) \ + $(srcdir)/cvs.1 # texinfo based targets automake neglects to include SUFFIXES = .txt -subdir = doc -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = mkman -DIST_SOURCES = -am__TEXINFO_TEX_DIR = $(srcdir) -INFO_DEPS = cvs.info cvsclient.info -DVIS = cvs.dvi cvsclient.dvi -TEXINFOS = cvs.texinfo cvsclient.texi - -NROFF = nroff -MANS = $(man_MANS) -DIST_COMMON = $(srcdir)/Makefile.in ChangeLog Makefile.am mdate-sh \ - mkman.in stamp-1 stamp-vti texinfo.tex version-client.texi \ - version.texi all: all-am .SUFFIXES: -.SUFFIXES: .txt .dvi .info .pdf .ps .texi .texinfo .txi -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) +.SUFFIXES: .txt .dvi .html .info .pdf .ps .texi .texinfo .txi +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/Makefile -Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) -mkman: $(top_builddir)/config.status mkman.in +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +mkman: $(top_builddir)/config.status $(srcdir)/mkman.pl cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ .texinfo.info: - @rm -f $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9] - $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ - -o $@ `test -f '$<' || echo '$(srcdir)/'`$< + restore=: && backupdir="$(am__leading_dot)am$$$$" && \ + am__cwd=`pwd` && cd $(srcdir) && \ + rm -rf $$backupdir && mkdir $$backupdir && \ + if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ + for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ + if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ + done; \ + else :; fi && \ + cd "$$am__cwd"; \ + if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ + -o $@ $<; \ + then \ + rc=0; \ + cd $(srcdir); \ + else \ + rc=$$?; \ + cd $(srcdir) && \ + $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ + fi; \ + rm -rf $$backupdir; exit $$rc .texinfo.dvi: TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ - $(TEXI2DVI) `test -f '$<' || echo '$(srcdir)/'`$< + $(TEXI2DVI) $< .texinfo.pdf: TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ - $(TEXI2PDF) `test -f '$<' || echo '$(srcdir)/'`$< -cvs.info: cvs.texinfo version.texi -cvs.dvi: cvs.texinfo version.texi -cvs.pdf: cvs.texinfo version.texi -version.texi: @MAINTAINER_MODE_TRUE@ stamp-vti -stamp-vti: cvs.texinfo $(top_srcdir)/configure + $(TEXI2PDF) $< + +.texinfo.html: + rm -rf $(@:.html=.htp) + if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ + -o $(@:.html=.htp) $<; \ + then \ + rm -rf $@; \ + if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ + mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \ + else \ + if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ + rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \ + exit 1; \ + fi +$(srcdir)/cvs.info: cvs.texinfo $(srcdir)/version.texi +cvs.dvi: cvs.texinfo $(srcdir)/version.texi +cvs.pdf: cvs.texinfo $(srcdir)/version.texi +cvs.html: cvs.texinfo $(srcdir)/version.texi +$(srcdir)/version.texi: @MAINTAINER_MODE_TRUE@ $(srcdir)/stamp-vti +$(srcdir)/stamp-vti: cvs.texinfo $(top_srcdir)/configure @(dir=.; test -f ./cvs.texinfo || dir=$(srcdir); \ set `$(SHELL) $(srcdir)/mdate-sh $$dir/cvs.texinfo`; \ echo "@set UPDATED $$1 $$2 $$3"; \ echo "@set UPDATED-MONTH $$2 $$3"; \ echo "@set EDITION $(VERSION)"; \ echo "@set VERSION $(VERSION)") > vti.tmp - @cmp -s vti.tmp version.texi \ - || (echo "Updating version.texi"; \ - cp vti.tmp version.texi) + @cmp -s vti.tmp $(srcdir)/version.texi \ + || (echo "Updating $(srcdir)/version.texi"; \ + cp vti.tmp $(srcdir)/version.texi) -@rm -f vti.tmp - @cp version.texi $@ + @cp $(srcdir)/version.texi $@ mostlyclean-vti: -rm -f vti.tmp maintainer-clean-vti: -@MAINTAINER_MODE_TRUE@ -rm -f stamp-vti version.texi +@MAINTAINER_MODE_TRUE@ -rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi .texi.info: - @rm -f $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9] - $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ - -o $@ `test -f '$<' || echo '$(srcdir)/'`$< + restore=: && backupdir="$(am__leading_dot)am$$$$" && \ + am__cwd=`pwd` && cd $(srcdir) && \ + rm -rf $$backupdir && mkdir $$backupdir && \ + if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ + for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ + if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ + done; \ + else :; fi && \ + cd "$$am__cwd"; \ + if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ + -o $@ $<; \ + then \ + rc=0; \ + cd $(srcdir); \ + else \ + rc=$$?; \ + cd $(srcdir) && \ + $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ + fi; \ + rm -rf $$backupdir; exit $$rc .texi.dvi: TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ - $(TEXI2DVI) `test -f '$<' || echo '$(srcdir)/'`$< + $(TEXI2DVI) $< .texi.pdf: TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ - $(TEXI2PDF) `test -f '$<' || echo '$(srcdir)/'`$< -cvsclient.info: cvsclient.texi version-client.texi -cvsclient.dvi: cvsclient.texi version-client.texi -cvsclient.pdf: cvsclient.texi version-client.texi -version-client.texi: @MAINTAINER_MODE_TRUE@ stamp-1 -stamp-1: cvsclient.texi $(top_srcdir)/configure + $(TEXI2PDF) $< + +.texi.html: + rm -rf $(@:.html=.htp) + if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ + -o $(@:.html=.htp) $<; \ + then \ + rm -rf $@; \ + if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ + mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \ + else \ + if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ + rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \ + exit 1; \ + fi +$(srcdir)/cvsclient.info: cvsclient.texi $(srcdir)/version-client.texi +cvsclient.dvi: cvsclient.texi $(srcdir)/version-client.texi +cvsclient.pdf: cvsclient.texi $(srcdir)/version-client.texi +cvsclient.html: cvsclient.texi $(srcdir)/version-client.texi +$(srcdir)/version-client.texi: @MAINTAINER_MODE_TRUE@ $(srcdir)/stamp-1 +$(srcdir)/stamp-1: cvsclient.texi $(top_srcdir)/configure @(dir=.; test -f ./cvsclient.texi || dir=$(srcdir); \ set `$(SHELL) $(srcdir)/mdate-sh $$dir/cvsclient.texi`; \ echo "@set UPDATED $$1 $$2 $$3"; \ echo "@set UPDATED-MONTH $$2 $$3"; \ echo "@set EDITION $(VERSION)"; \ echo "@set VERSION $(VERSION)") > 1.tmp - @cmp -s 1.tmp version-client.texi \ - || (echo "Updating version-client.texi"; \ - cp 1.tmp version-client.texi) + @cmp -s 1.tmp $(srcdir)/version-client.texi \ + || (echo "Updating $(srcdir)/version-client.texi"; \ + cp 1.tmp $(srcdir)/version-client.texi) -@rm -f 1.tmp - @cp version-client.texi $@ + @cp $(srcdir)/version-client.texi $@ mostlyclean-1: -rm -f 1.tmp maintainer-clean-1: -@MAINTAINER_MODE_TRUE@ -rm -f stamp-1 version-client.texi - -TEXI2PDF = $(TEXI2DVI) --pdf --batch -DVIPS = dvips +@MAINTAINER_MODE_TRUE@ -rm -f $(srcdir)/stamp-1 $(srcdir)/version-client.texi .dvi.ps: + TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ $(DVIPS) -o $@ $< uninstall-info-am: - $(PRE_UNINSTALL) + @$(PRE_UNINSTALL) @if (install-info --version && \ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ - echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$relfile"; \ - install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$relfile; \ + echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \ + install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \ done; \ else :; fi @$(NORMAL_UNINSTALL) @@ -307,15 +404,19 @@ uninstall-info-am: for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ - (if cd $(DESTDIR)$(infodir); then \ - echo " rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9])"; \ + (if cd "$(DESTDIR)$(infodir)"; then \ + echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \ rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ else :; fi); \ done dist-info: $(INFO_DEPS) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ list='$(INFO_DEPS)'; \ for base in $$list; do \ + case $$base in \ + $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \ + esac; \ if test -f $$base; then d=.; else d=$(srcdir); fi; \ for file in $$d/$$base*; do \ relfile=`expr "$$file" : "$$d/\(.*\)"`; \ @@ -325,13 +426,14 @@ dist-info: $(INFO_DEPS) done mostlyclean-aminfo: - -rm -f cvs.aux cvs.cp cvs.cps cvs.fn cvs.fns cvs.ky cvs.kys cvs.log cvs.pg \ - cvs.pgs cvs.tmp cvs.toc cvs.tp cvs.tps cvs.vr cvs.vrs cvs.dvi \ - cvs.pdf cvs.ps cvsclient.aux cvsclient.cp cvsclient.cps \ - cvsclient.fn cvsclient.fns cvsclient.ky cvsclient.kys \ - cvsclient.log cvsclient.pg cvsclient.pgs cvsclient.tmp \ - cvsclient.toc cvsclient.tp cvsclient.tps cvsclient.vr \ - cvsclient.vrs cvsclient.dvi cvsclient.pdf cvsclient.ps + -rm -rf cvs.aux cvs.cp cvs.cps cvs.fn cvs.fns cvs.ky cvs.kys cvs.log cvs.pg \ + cvs.pgs cvs.tmp cvs.toc cvs.tp cvs.tps cvs.vr cvs.vrs \ + cvs.dvi cvs.pdf cvs.ps cvs.html cvsclient.aux cvsclient.cp \ + cvsclient.cps cvsclient.fn cvsclient.fns cvsclient.ky \ + cvsclient.kys cvsclient.log cvsclient.pg cvsclient.pgs \ + cvsclient.tmp cvsclient.toc cvsclient.tp cvsclient.tps \ + cvsclient.vr cvsclient.vrs cvsclient.dvi cvsclient.pdf \ + cvsclient.ps cvsclient.html maintainer-clean-aminfo: @list='$(INFO_DEPS)'; for i in $$list; do \ @@ -339,11 +441,9 @@ maintainer-clean-aminfo: echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \ rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \ done - -man1dir = $(mandir)/man1 install-man1: $(man1_MANS) $(man_MANS) @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(man1dir) + test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)" @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ @@ -362,8 +462,8 @@ install-man1: $(man1_MANS) $(man_MANS) 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)$(man1dir)/$$inst"; \ - $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ done uninstall-man1: @$(NORMAL_UNINSTALL) @@ -383,8 +483,8 @@ uninstall-man1: 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)$(man1dir)/$$inst"; \ - rm -f $(DESTDIR)$(man1dir)/$$inst; \ + echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ + rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ done tags: TAGS TAGS: @@ -392,12 +492,9 @@ TAGS: ctags: CTAGS CTAGS: -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - -top_distdir = .. -distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) + $(mkdir_p) $(distdir)/$(srcdir) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ @@ -409,7 +506,7 @@ distdir: $(DISTFILES) dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ - $(mkinstalldirs) "$(distdir)$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ @@ -430,9 +527,10 @@ distdir: $(DISTFILES) check-am: all-am check: check-am all-am: Makefile $(INFO_DEPS) $(MANS) - installdirs: - $(mkinstalldirs) $(DESTDIR)$(infodir) $(DESTDIR)$(man1dir) + for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -451,9 +549,10 @@ mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -467,10 +566,12 @@ distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic -dvi: dvi-am - dvi-am: $(DVIS) +html: html-am + +html-am: $(HTMLS) + info: info-am info-am: $(INFO_DEPS) @@ -483,17 +584,21 @@ install-info: install-info-am install-info-am: $(INFO_DEPS) @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(infodir) - @list='$(INFO_DEPS)'; \ + test -z "$(infodir)" || $(mkdir_p) "$(DESTDIR)$(infodir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + list='$(INFO_DEPS)'; \ for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + esac; \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \ for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \ $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \ if test -f $$ifile; then \ relfile=`echo "$$ifile" | sed 's|^.*/||'`; \ - echo " $(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile"; \ - $(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile; \ + echo " $(INSTALL_DATA) '$$ifile' '$(DESTDIR)$(infodir)/$$relfile'"; \ + $(INSTALL_DATA) "$$ifile" "$(DESTDIR)$(infodir)/$$relfile"; \ else : ; fi; \ done; \ done @@ -503,8 +608,8 @@ install-info-am: $(INFO_DEPS) list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ - echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$relfile";\ - install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$relfile || :;\ + echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\ + install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\ done; \ else : ; fi install-man: install-man1 @@ -535,19 +640,19 @@ uninstall-am: uninstall-info-am uninstal uninstall-man: uninstall-man1 .PHONY: all all-am check check-am clean clean-generic dist-info \ - distclean distclean-generic distdir dvi dvi-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ - install-man1 install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-1 \ - maintainer-clean-aminfo maintainer-clean-generic \ - maintainer-clean-vti mostlyclean mostlyclean-1 \ - mostlyclean-aminfo mostlyclean-generic mostlyclean-vti pdf \ - pdf-am ps ps-am uninstall uninstall-am uninstall-info-am \ - uninstall-man uninstall-man1 + distclean distclean-generic distdir dvi dvi-am html html-am \ + info info-am install install-am install-data install-data-am \ + install-exec install-exec-am install-info install-info-am \ + install-man install-man1 install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-1 maintainer-clean-aminfo \ + maintainer-clean-generic maintainer-clean-vti mostlyclean \ + mostlyclean-1 mostlyclean-aminfo mostlyclean-generic \ + mostlyclean-vti pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-info-am uninstall-man uninstall-man1 -doc: info ps +doc: info pdf .PHONY: doc txt: $(TXTS) @@ -562,21 +667,34 @@ dvi: cvs.dvi cvsclient.dvi cvs.txt: cvs.texinfo $(srcdir)/version.texi cvsclient.txt: cvsclient.texi $(srcdir)/version-client.texi -# These targets need to be very specific so that the other PDFs get generated -# correctly. If they are more generic and cvs.ps is made before cvs.pdf, then -# cvs.pdf will be generated from the generic target and the PS source, which -# contains less information (hyperlinks and such) than the usual texinfo source. +# The cvs-paper.pdf target needs to be very specific so that the other PDFs get +# generated correctly. If a more generic .ps.pdf implicit target is defined, +# and cvs.ps is made before cvs.pdf, then cvs.pdf can be generated from the +# .ps.pdf target and the PS source, which contains less information (hyperlinks +# and such) than the usual texinfo source. +# +# It is possible that an implicit .ms.ps target could be safely defined. I +# don't recall looking into it. cvs-paper.ps: cvs-paper.ms - $(ROFF) -t -p -ms -Tps $< > $@-t - mv $@-t $@ - -cvs-paper.pdf: cvs-paper.ps - ps2pdf $< $@ + $(ROFF) -t -p -ms -Tps $(srcdir)/cvs-paper.ms >cvs-paper.ps-t + cp cvs-paper.ps-t $@ + -@rm -f cvs-paper.ps-t + +# This rule introduces some redundancy, but `make distcheck' requires that +# Nothing in $(srcdir) be rebuilt, and this will always be rebuilt when it +# is dependant on cvs-paper.ps and cvs-paper.ps isn't distributed. +$(srcdir)/cvs-paper.pdf: cvs-paper.ms + $(ROFF) -t -p -ms -Tps $(srcdir)/cvs-paper.ms >cvs-paper.ps-t + ps2pdf cvs-paper.ps-t cvs-paper.pdf-t + cp cvs-paper.pdf-t $@ + -@rm -f cvs-paper.pdf-t cvs-paper.ps-t # Targets to build a man page from cvs.texinfo. -cvs.1: @MAINTAINER_MODE_TRUE@ mkman cvs.man.header cvs.texinfo cvs.man.footer - ./mkman $(srcdir)/cvs.man.header $(srcdir)/cvs.texinfo \ - $(srcdir)/cvs.man.footer >$@ +$(srcdir)/cvs.1: @MAINTAINER_MODE_TRUE@ mkman cvs.man.header cvs.texinfo cvs.man.footer + $(PERL) ./mkman $(srcdir)/cvs.man.header $(srcdir)/cvs.texinfo \ + $(srcdir)/cvs.man.footer >cvs.tmp + cp cvs.tmp $(srcdir)/cvs.1 + -@rm -f cvs.tmp .texinfo.txt: $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ --no-headers -o $@ `test -f '$<' || echo '$(srcdir)/'`$< Index: doc/cvs.1 =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/doc/cvs.1,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.2 diff -u -p -r1.1.1.1 -r1.1.1.2 --- doc/cvs.1 10 Jun 2004 19:05:37 -0000 1.1.1.1 +++ doc/cvs.1 26 Dec 2007 03:55:01 -0000 1.1.1.2 @@ -2,9 +2,9 @@ .\" cvs.man.header, cvs.texinfo, & cvs.man.footer files. Please make changes .\" there. A full copyright & license notice may also be found in cvs.texinfo. .\" -.\" Copyright 2004 The Free Software Foundation, -.\" Derek R. Price, -.\" & Ximbiot +.\" Man page autogeneration, including this header file, is +.\" Copyright 2004-2005 The Free Software Foundation, Inc., +.\" Derek R. Price, & Ximbiot . .\" .\" This documentation is free software; you can redistribute it and/or modify .\" it under the terms of the GNU General Public License as published by @@ -428,7 +428,7 @@ option as in other commands. (Other com which are listed with the individual commands, may have different behavior from one \fBcvs\fR command to the other). .SP -\fBNote: the \fBhistory\fB command is an exception; it supports +\fBThe \fBhistory\fB command is an exception; it supports many options that conflict even with these standard options.\fR .SP .IX "Dates" @@ -561,7 +561,7 @@ file, and continues to use it with futur commands on the same file until you specify otherwise. .SP The \fB-k\fR option is available with the \fBadd\fR, -\fBcheckout\fR, \fBdiff\fR, \fBimport\fR and +\fBcheckout\fR, \fBdiff\fR, \fBrdiff\fR, \fBimport\fR and \fBupdate\fR commands. .SP .IP "" 0 @@ -594,10 +594,10 @@ Do not run any tag program. (A program specified to run in the modules database (see node `modules\(aq in the CVS manual); this option bypasses it). .SP -\fBNote: this is not the same as the \fBcvs -n\fB +\fBThis is not the same as the \fBcvs -n\fB program option, which you can specify to the left of a cvs command!\fR .SP -Available with the \fBcheckout\fR, \fBcommit\fR, \fBexport\fR, +Available with the \fBcheckout\fR, \fBexport\fR, and \fBrtag\fR commands. .SP .IP "" 0 @@ -644,17 +644,20 @@ on sticky tags/dates, see node `Sticky t The tag can be either a symbolic or numeric tag, as described in see node `Tags\(aq in the CVS manual, or the name of a branch, as described in see node `Branching and merging\(aq in the CVS manual. +When a command expects a specific revision, +the name of a branch is interpreted as the most recent +revision on that branch. .SP Specifying the \fB-q\fR global option along with the \fB-r\fR command option is often useful, to suppress the warning messages when the \fBrcs\fR file does not contain the specified tag. .SP -\fBNote: this is not the same as the overall \fBcvs -r\fB option, +\fBThis is not the same as the overall \fBcvs -r\fB option, which you can specify to the left of a \fBcvs\fB command!\fR .SP -\fB-r\fR is available with the \fBcheckout\fR, \fBcommit\fR, -\fBdiff\fR, \fBhistory\fR, \fBexport\fR, \fBrdiff\fR, +\fB-r\fR is available with the \fBannotate\fR, \fBcheckout\fR, +\fBcommit\fR, \fBdiff\fR, \fBhistory\fR, \fBexport\fR, \fBrdiff\fR, \fBrtag\fR, and \fBupdate\fR commands. .SP .IP "" 0 @@ -984,10 +987,10 @@ it is created. The state is visible in \fIcvs log\fR (see node `log\(aq in the CVS manual), and in the \fB$\fP\fPLog$\fR and \fB$\fP\fPState$\fR keywords (see node `Keyword substitution\(aq in the CVS manual). Note that \fBcvs\fR -uses the \fBdead\fR state for its own purposes; to +uses the \fBdead\fR state for its own purposes (see node `Attic\(aq in the CVS manual); to take a file to or from the \fBdead\fR state use -commands like \fBcvs remove\fR and \fBcvs add\fR, not -\fBcvs admin -s\fR. +commands like \fBcvs remove\fR and \fBcvs add\fR +(see node `Adding and removing\(aq in the CVS manual), not \fBcvs admin -s\fR. .SP .IP "" 0 \fB-t[\fIfile\fB]\fR @@ -1283,6 +1286,7 @@ options with \fBcheckout\fR: \fB-A\fR .IP "" 2 Reset any sticky tags, dates, or \fB-k\fR options. +Does not reset sticky \fB-k\fR options on modified files. See see node `Sticky tags\(aq in the CVS manual, for more information on sticky tags/dates. .SP .IP "" 0 @@ -1393,7 +1397,7 @@ $ cvs checkout -D yesterday tc .IX "commit (subcommand)" .SP .IP "\(bu" 2 -Synopsis: commit [-lnRf] [-m \(aqlog_message\(aq | +Synopsis: commit [-lRf] [-m \(aqlog_message\(aq | -F file] [-r revision] [files\&...] .IP "\(bu" 2 Requires: working directory, repository. @@ -2562,7 +2566,7 @@ various formats. Logging must be enabled by creating the file \fB$CVSROOT/CVSROOT/history\fR. .SP -\fBNote: \fBhistory\fB uses \fB-f\fB, \fB-l\fB, +\fB\fBhistory\fB uses \fB-f\fB, \fB-l\fB, \fB-n\fB, and \fB-p\fB in ways that conflict with the normal use inside \fBcvs\fB (see node `Common options\(aq in the CVS manual).\fR .SP @@ -2807,8 +2811,10 @@ At least three arguments are required. \fIrepository\fR is needed to identify the collection of source. \fIvendortag\fR is a tag for the entire branch (e.g., for 1.1.1). You must also specify at -least one \fIreleasetag\fR to identify the files at -the leaves created each time you execute \fBimport\fR. +least one \fIreleasetag\fR to uniquely identify the files at +the leaves created each time you execute \fBimport\fR. The +\fIreleasetag\fR should be new, not previously existing in the +repository file, and uniquely identify the imported release, .SP Note that \fBimport\fR does \fInot\fR change the directory in which you invoke it. In particular, it @@ -2939,13 +2945,18 @@ message are printed. All times are disp Coordinated Universal Time (UTC). (Other parts of \fBcvs\fR print times in the local timezone). .SP -\fBNote: \fBlog\fB uses \fB-R\fB in a way that conflicts +\fB\fBlog\fB uses \fB-R\fB in a way that conflicts with the normal use inside \fBcvs\fB (see node `Common options\(aq in the CVS manual).\fR .SP .SH "log options" .SP By default, \fBlog\fR prints all information that is -available. All other options restrict the output. +available. All other options restrict the output. Note that the revision +selection options (\fB-d\fR, \fB-r\fR, \fB-s\fR, and \fB-w\fR) have no +effect, other than possibly causing a search for files in Attic directories, +when used in conjunction with the options that restrict the output to only +\fBlog\fR header fields (\fB-b\fR, \fB-h\fR, \fB-R\fR, and \fB-t\fR) +unless the \fB-S\fR option is also specified. .SP .IP "" 0 \fB-b\fR @@ -3103,7 +3114,10 @@ Suppress the header if no revisions are .IP "" 2 Print information about revisions whose state attributes match one of the states given in the -comma-separated list \fIstates\fR. +comma-separated list \fIstates\fR. Individual states may +be any text string, though \fBcvs\fR commonly only uses two +states, \fBExp\fR and \fBdead\fR. See see node `admin options\(aq in the CVS manual +for more information. .SP .IP "" 0 \fB-t\fR @@ -3180,6 +3194,12 @@ If no matching revision is found, retrie recent revision (instead of ignoring the file). .SP .IP "" 0 +\fB-k \fIkflag\fB\fR +.IP "" 2 +Process keywords according to \fIkflag\fR. See +see node `Keyword substitution\(aq in the CVS manual. +.SP +.IP "" 0 \fB-l\fR .IP "" 2 Local; don\(aqt descend subdirectories. @@ -3484,6 +3504,7 @@ These special options are also available \fB-A\fR .IP "" 2 Reset any sticky tags, dates, or \fB-k\fR options. +Does not reset sticky \fB-k\fR options on modified files. See see node `Sticky tags\(aq in the CVS manual, for more information on sticky tags/dates. .SP .IP "" 0 @@ -3572,7 +3593,7 @@ by one character indicating the status o .IP "" 2 The file was brought up to date with respect to the repository. This is done for any file that exists in -the repository but not in your source, and for files +the repository but not in your working directory, and for files that you haven\(aqt changed but are not the most recent versions available in the repository. .SP @@ -3690,9 +3711,7 @@ to CVS, development of CVS, and more, se .SP .PD 0 .IP "" 4 -.B http://cvshome.org -.IP "" 4 -.B http://www.loria.fr/~molli/cvs-index.html +.B http://cvs.nongnu.org .in -1i .SP .BR ci ( 1 ), Index: doc/cvs.man.footer =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/doc/cvs.man.footer,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.2 diff -u -p -r1.1.1.1 -r1.1.1.2 --- doc/cvs.man.footer 10 Jun 2004 19:05:37 -0000 1.1.1.1 +++ doc/cvs.man.footer 26 Dec 2007 03:55:01 -0000 1.1.1.2 @@ -42,9 +42,7 @@ to CVS, development of CVS, and more, se .SP .PD 0 .IP "" 4 -.B http://cvshome.org -.IP "" 4 -.B http://www.loria.fr/~molli/cvs-index.html +.B http://cvs.nongnu.org .in -1i .SP .BR ci ( 1 ), Index: doc/cvs.man.header =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/doc/cvs.man.header,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.2 diff -u -p -r1.1.1.1 -r1.1.1.2 --- doc/cvs.man.header 10 Jun 2004 19:05:37 -0000 1.1.1.1 +++ doc/cvs.man.header 26 Dec 2007 03:55:01 -0000 1.1.1.2 @@ -2,9 +2,9 @@ .\" cvs.man.header, cvs.texinfo, & cvs.man.footer files. Please make changes .\" there. A full copyright & license notice may also be found in cvs.texinfo. .\" -.\" Copyright 2004 The Free Software Foundation, -.\" Derek R. Price, -.\" & Ximbiot +.\" Man page autogeneration, including this header file, is +.\" Copyright 2004-2005 The Free Software Foundation, Inc., +.\" Derek R. Price, & Ximbiot . .\" .\" This documentation is free software; you can redistribute it and/or modify .\" it under the terms of the GNU General Public License as published by Index: doc/cvs.texinfo =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/doc/cvs.texinfo,v retrieving revision 1.1.1.15 retrieving revision 1.1.1.16 diff -u -p -r1.1.1.15 -r1.1.1.16 --- doc/cvs.texinfo 10 Jun 2004 19:05:37 -0000 1.1.1.15 +++ doc/cvs.texinfo 26 Dec 2007 03:55:01 -0000 1.1.1.16 @@ -4,13 +4,14 @@ @macro copyleftnotice @noindent Copyright @copyright{} 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, - 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + 2001, 2002, 2003, 2004, 2005 + Free Software Foundation, Inc. @multitable @columnfractions .12 .88 @item Portions -@item @tab Copyright @copyright{} 1999, 2000, 2001, 2002, 2003, 2004 +@item @tab Copyright @copyright{} 1999, 2000, 2001, 2002, 2003, 2004, 2005 Derek R. Price, -@item @tab Copyright @copyright{} 2002, 2003, 2004 +@item @tab Copyright @copyright{} 2002, 2003, 2004, 2005 Ximbiot @url{http://ximbiot.com}, @item @tab Copyright @copyright{} 1992, 1993, 1999 Signum Support AB, @item @tab and Copyright @copyright{} others. @@ -127,6 +128,10 @@ approved by the Free Software Foundation @copyleftnotice @end titlepage +@summarycontents + +@contents + @comment ================================================================ @comment The real text starts here @comment ================================================================ @@ -232,7 +237,7 @@ versions. on the same project. It is all too easy to overwrite each others' changes unless you are extremely careful. Some editors, like @sc{gnu} Emacs, try to make sure that -the same file is never modified by two people at the +two people never modify the same file at the same time. Unfortunately, if someone is using another editor, that safeguard will not work. @sc{cvs} solves this problem by insulating the different developers from each other. Every @@ -261,21 +266,20 @@ free download from the Internet. For mo on downloading @sc{cvs} and other @sc{cvs} topics, see: @example -@url{http://www.cvshome.org/} -@url{http://www.loria.fr/~molli/cvs-index.html} +@url{http://cvs.nongnu.org/} @end example @cindex Mailing list @cindex List, mailing list @cindex Newsgroups -There is a mailing list, known as @email{info-cvs@@gnu.org}, +There is a mailing list, known as @email{info-cvs@@nongnu.org}, devoted to @sc{cvs}. To subscribe or unsubscribe write to -@email{info-cvs-request@@gnu.org}. +@email{info-cvs-request@@nongnu.org}. If you prefer a Usenet group, there is a one-way mirror (posts to the email -list are usually sent to the news group, but not visa versa) of -@email{info-cvs@@gnu.org} at @url{news:gnu.cvs.help}. The right +list are usually sent to the news group, but not vice versa) of +@email{info-cvs@@nongnu.org} at @url{news:gnu.cvs.help}. The right Usenet group for posts is @url{news:comp.software.config-mgmt} which is for @sc{cvs} discussions (along with other configuration management systems). In the future, it might be @@ -290,11 +294,11 @@ if there is sufficient @sc{cvs} traffic @c would need to take a more comprehensive look at the @c whole comp.software.config-mgmt.* hierarchy). -You can also subscribe to the @email{bug-cvs@@gnu.org} mailing list, +You can also subscribe to the @email{bug-cvs@@nongnu.org} mailing list, described in more detail in @ref{BUGS}. To subscribe -send mail to @email{bug-cvs-request@@gnu.org}. There is a two-way +send mail to @email{bug-cvs-request@@nongnu.org}. There is a two-way Usenet mirror (posts to the Usenet group are usually sent to the email list and -visa versa) of @email{bug-cvs@@gnu.org} named @url{news:gnu.cvs.bug}. +vice versa) of @email{bug-cvs@@nongnu.org} named @url{news:gnu.cvs.bug}. @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @node What is CVS not? @@ -1805,7 +1809,15 @@ It is possible to commit an erroneous ad file. You can often fix the error and check in a new revision, but sometimes a particularly bad error in the administrative file makes it impossible to commit new -revisions. +revisions. If and when this happens, you can correct +the problem by temporarily copying a corrected administrative file +directly into the @code{$CVSROOT/CVSROOT} repository directory, +then committing the same correction via a checkout of the @file{CVSROOT} +module. It is important that the correction also be made via the +checked out copy, or the next checkout and commit to the +CVSROOT module will overwrite the correction that was +copied directly into the repository, possibly breaking things in such +a way as to prevent commits again. @c @xref{Bad administrative files} for a hint @c about how to solve such situations. @c -- administrative file checking-- @@ -1866,6 +1878,13 @@ and server1, to update everything else. @cindex Creating a repository @cindex Setting up a repository +This section describes how to set up a @sc{cvs} repository for any +sort of access method. After completing the setup described in this +section, you should be able to access your @sc{cvs} repository immediately +via the local access method and several remote access methods. For +more information on setting up remote access to the repository you create +in this section, please read the section on @xref{Remote repositories}. + To set up a @sc{cvs} repository, first choose the machine and disk on which you want to store the revision history of the source files. CPU and memory @@ -3178,8 +3197,13 @@ $ cvs import -m "Created directory struc This will add yoyodyne/@var{dir} as a directory under @code{$CVSROOT}. -Then, use @code{add} to add files (and new directories) -as they appear. +Use @code{checkout} to get the new project. Then, use @code{add} +to add files (and new directories) as needed. + +@example +$ cd .. +$ cvs co yoyodyne/@var{dir} +@end example Check that the permissions @sc{cvs} sets on the directories inside @code{$CVSROOT} are reasonable. @@ -3817,7 +3841,8 @@ The sticky tags will remain on your work you delete them with @samp{cvs update -A}. The @samp{-A} option merges local changes into the version of the file from the head of the trunk, removing any sticky tags, -dates, or options. See @ref{update} for more on the operation +dates, or options (other than sticky @samp{-k} options on locally +modified files). See @ref{update} for more on the operation of @code{cvs update}. @cindex Sticky date @@ -4605,6 +4630,13 @@ for this is to release the working direc committed and check it out again. @end ignore +As a result of using @samp{-kk} during the merge, each file examined by the +update will have @samp{-kk} set as sticky options. Running @code{update -A} +will clear the sticky options on unmodified files, but it will not clear +the sticky options on modified files. To get back to the default keyword +substitution for modified files, you must commit the results of the merge +and then run @code{update -A}. + @c --------------------------------------------------------------------- @node Recursive behavior @chapter Recursive behavior @@ -4971,7 +5003,7 @@ later merge the removals to another bran @cindex Removing directories @cindex Directories, removing -In concept removing directories is somewhat similar to +In concept, removing directories is somewhat similar to removing files---you want the directory to not exist in your current working directories, but you also want to be able to retrieve old releases in which the directory @@ -4998,7 +5030,7 @@ removing it. @c need for -P and so that a file can be a directory in @c one revision and a regular file in another. Note that @samp{-P} is implied by the @samp{-r} or @samp{-D} -options of @code{checkout}. This way +options of @code{checkout}. This way, @sc{cvs} will be able to correctly create the directory or not depending on whether the particular version you are checking out contains any files in that directory. @@ -5197,9 +5229,9 @@ like this: @enumerate @item Inform everyone who has a checked out copy of the directory that the -directory will be renamed. They should commit all -their changes, and remove their working copies, -before you take the steps below. +directory will be renamed. They should commit all their changes in all their +copies of the project containing the directory to be removed, and remove +all their working copies of said project, before you take the steps below. @item Rename the directory inside the repository. @@ -5938,10 +5970,12 @@ these options, see @ref{Invoking CVS}. @cindex Merging a file @cindex Update, introduction -When you want to update or merge a file, use the @code{update} +When you want to update or merge a file, use the @code{cvs update -d} command. For files that are not up to date this is roughly equivalent to a @code{checkout} command: the newest revision of the file is -extracted from the repository and put in your working directory. +extracted from the repository and put in your working directory. The +@code{-d} option, not necessary with @code{checkout}, tells @sc{cvs} +that you wish it to create directories added by other developers. Your modifications to a file are never lost when you use @code{update}. If no newer revision exists, @@ -6978,8 +7012,10 @@ each working directory copy of a file al substitution mode. The former is set by the @samp{-k} option to @code{cvs add} and @code{cvs admin}; the latter is set by the @samp{-k} or @samp{-A} options to @code{cvs -checkout} or @code{cvs update}. @code{cvs diff} also -has a @samp{-k} option. For some examples, +checkout} or @code{cvs update}. +@code{cvs diff} and @code{cvs rdiff} also +have @samp{-k} options. +For some examples, see @ref{Binary files}, and @ref{Merging and keywords}. @c The fact that -A is overloaded to mean both reset @c sticky options and reset sticky tags/dates is @@ -7198,6 +7234,9 @@ $ cd wdiff-0.05 $ cvs import -m "Import of FSF v. 0.05" fsf/wdiff FSF_DIST WDIFF_0_05 @end example +@strong{WARNING: If you use a release tag that already exists in one of the +repository archives, files removed by an import may not be detected.} + For files that have not been modified locally, the newly created revision becomes the head revision. If you have made local changes, @code{import} will warn you that you must merge the changes @@ -7409,7 +7448,7 @@ for other files to access source files f location. Many people have come up with some such a @c two such people are paul@sander.cupertino.ca.us (for @c a previous employer) -@c and gtornblo@senet.abb.se (spicm and related tools), +@c and gunnar.tornblom@se.abb.com (spicm and related tools), @c but as far as I know @c no one has nicely packaged or released such a system (or @c instructions for constructing one). @@ -7909,7 +7948,7 @@ option as in other commands. (Other com which are listed with the individual commands, may have different behavior from one @sc{cvs} command to the other). -@strong{Note: the @samp{history} command is an exception; it supports +@strong{The @samp{history} command is an exception; it supports many options that conflict even with these standard options.} @table @code @@ -8131,7 +8170,7 @@ file, and continues to use it with futur commands on the same file until you specify otherwise. The @samp{-k} option is available with the @code{add}, -@code{checkout}, @code{diff}, @code{import} and +@code{checkout}, @code{diff}, @code{rdiff}, @code{import} and @code{update} commands. @item -l @@ -8158,10 +8197,10 @@ Do not run any tag program. (A program specified to run in the modules database (@pxref{modules}); this option bypasses it). -@strong{Note: this is not the same as the @samp{cvs -n} +@strong{This is not the same as the @samp{cvs -n} program option, which you can specify to the left of a cvs command!} -Available with the @code{checkout}, @code{commit}, @code{export}, +Available with the @code{checkout}, @code{export}, and @code{rtag} commands. @item -P @@ -8224,17 +8263,20 @@ on sticky tags/dates, @pxref{Sticky tags The tag can be either a symbolic or numeric tag, as described in @ref{Tags}, or the name of a branch, as described in @ref{Branching and merging}. +When a command expects a specific revision, +the name of a branch is interpreted as the most recent +revision on that branch. Specifying the @samp{-q} global option along with the @samp{-r} command option is often useful, to suppress the warning messages when the @sc{rcs} file does not contain the specified tag. -@strong{Note: this is not the same as the overall @samp{cvs -r} option, +@strong{This is not the same as the overall @samp{cvs -r} option, which you can specify to the left of a @sc{cvs} command!} -@samp{-r} is available with the @code{checkout}, @code{commit}, -@code{diff}, @code{history}, @code{export}, @code{rdiff}, +@samp{-r} is available with the @code{annotate}, @code{checkout}, +@code{commit}, @code{diff}, @code{history}, @code{export}, @code{rdiff}, @code{rtag}, and @code{update} commands. @item -W @@ -8539,10 +8581,10 @@ it is created. The state is visible in @var{cvs log} (@pxref{log}), and in the @samp{$@splitrcskeyword{Log}$} and @samp{$@splitrcskeyword{State}$} keywords (@pxref{Keyword substitution}). Note that @sc{cvs} -uses the @code{dead} state for its own purposes; to +uses the @code{dead} state for its own purposes (@pxref{Attic}); to take a file to or from the @code{dead} state use -commands like @code{cvs remove} and @code{cvs add}, not -@code{cvs admin -s}. +commands like @code{cvs remove} and @code{cvs add} +(@pxref{Adding and removing}), not @code{cvs admin -s}. @item -t[@var{file}] Useful with @sc{cvs}. Write descriptive text from the @@ -8835,6 +8877,7 @@ options with @code{checkout}: @table @code @item -A Reset any sticky tags, dates, or @samp{-k} options. +Does not reset sticky @samp{-k} options on modified files. See @ref{Sticky tags}, for more information on sticky tags/dates. @item -c @@ -8932,7 +8975,7 @@ $ cvs checkout -D yesterday tc @itemize @bullet @item -Synopsis: commit [-lnRf] [-m 'log_message' | +Synopsis: commit [-lRf] [-m 'log_message' | -F file] [-r revision] [files@dots{}] @item Requires: working directory, repository. @@ -9872,7 +9915,7 @@ various formats. Logging must be enabled by creating the file @file{$CVSROOT/CVSROOT/history}. -@strong{Note: @code{history} uses @samp{-f}, @samp{-l}, +@strong{@code{history} uses @samp{-f}, @samp{-l}, @samp{-n}, and @samp{-p} in ways that conflict with the normal use inside @sc{cvs} (@pxref{Common options}).} @@ -10091,8 +10134,10 @@ At least three arguments are required. @var{repository} is needed to identify the collection of source. @var{vendortag} is a tag for the entire branch (e.g., for 1.1.1). You must also specify at -least one @var{releasetag} to identify the files at -the leaves created each time you execute @code{import}. +least one @var{releasetag} to uniquely identify the files at +the leaves created each time you execute @code{import}. The +@var{releasetag} should be new, not previously existing in the +repository file, and uniquely identify the imported release, @c I'm not completely sure this belongs here. But @c we need to say it _somewhere_ reasonably obvious; it @@ -10247,7 +10292,7 @@ Coordinated Universal Time (UTC). (Othe @c client then communicates to the server, is the @c right solution. -@strong{Note: @code{log} uses @samp{-R} in a way that conflicts +@strong{@code{log} uses @samp{-R} in a way that conflicts with the normal use inside @sc{cvs} (@pxref{Common options}).} @menu @@ -10260,7 +10305,12 @@ with the normal use inside @sc{cvs} (@px @appendixsubsec log options By default, @code{log} prints all information that is -available. All other options restrict the output. +available. All other options restrict the output. Note that the revision +selection options (@code{-d}, @code{-r}, @code{-s}, and @code{-w}) have no +effect, other than possibly causing a search for files in Attic directories, +when used in conjunction with the options that restrict the output to only +@code{log} header fields (@code{-b}, @code{-h}, @code{-R}, and @code{-t}) +unless the @code{-S} option is also specified. @table @code @item -b @@ -10391,7 +10441,10 @@ Suppress the header if no revisions are @item -s @var{states} Print information about revisions whose state attributes match one of the states given in the -comma-separated list @var{states}. +comma-separated list @var{states}. Individual states may +be any text string, though @sc{cvs} commonly only uses two +states, @samp{Exp} and @samp{dead}. See @ref{admin options} +for more information. @item -t Print the same as @samp{-h}, plus the descriptive text. @@ -10473,6 +10526,10 @@ Use the most recent revision no later th If no matching revision is found, retrieve the most recent revision (instead of ignoring the file). +@item -k @var{kflag} +Process keywords according to @var{kflag}. See +@ref{Keyword substitution}. + @item -l Local; don't descend subdirectories. @@ -10746,6 +10803,7 @@ These special options are also available @table @code @item -A Reset any sticky tags, dates, or @samp{-k} options. +Does not reset sticky @samp{-k} options on modified files. See @ref{Sticky tags}, for more information on sticky tags/dates. @item -C @@ -10826,7 +10884,7 @@ by one character indicating the status o @item U @var{file} The file was brought up to date with respect to the repository. This is done for any file that exists in -the repository but not in your source, and for files +the repository but not in your working directory, and for files that you haven't changed but are not the most recent versions available in the repository. @@ -11074,7 +11132,8 @@ Delete revisions from the repository. S Run quietly; do not print diagnostics. @item -s@var{state}[:@var{rev}] -Set the state. +Set the state. See @ref{admin options} for more information on possible +states. @c Does not work for client/server CVS @item -t @@ -11853,6 +11912,8 @@ file, which defines the modules inside t @menu * modules:: Defining modules * Wrappers:: Specify binary-ness based on file name +* Trigger Scripts:: Some notes on the commit support files and + taginfo, referenced below. * commit files:: The commit support files (commitinfo, verifymsg, editinfo, loginfo) * taginfo:: Verifying/Logging tags @@ -12349,59 +12410,26 @@ cvs import -I ! -W "*.exe -k 'b'" first- @c One catch--"cvs diff" will not invoke the wrappers @c (probably a CVS bug, although I haven't thought it out). -@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@node commit files -@appendixsec The commit support files -@cindex Committing, administrative support files - -The @samp{-i} flag in the @file{modules} file can be -used to run a certain program whenever files are -committed (@pxref{modules}). The files described in -this section provide other, more flexible, ways to run -programs whenever something is committed. - -There are three kinds of programs that can be run on -commit. They are specified in files in the repository, -as described below. The following table summarizes the -file names and the purpose of the corresponding -programs. - -@table @file -@item commitinfo -The program is responsible for checking that the commit -is allowed. If it exits with a non-zero exit status -the commit will be aborted. - -@item verifymsg -The specified program is used to evaluate the log message, -and possibly verify that it contains all required -fields. This is most useful in combination with the -@file{rcsinfo} file, which can hold a log message -template (@pxref{rcsinfo}). - -@item editinfo -The specified program is used to edit the log message, -and possibly verify that it contains all required -fields. This is most useful in combination with the -@file{rcsinfo} file, which can hold a log message -template (@pxref{rcsinfo}). (obsolete) - -@item loginfo -The specified program is called when the commit is -complete. It receives the log message and some -additional information and can store the log message in -a file, or mail it to appropriate persons, or maybe -post it to a local newsgroup, or@dots{} Your -imagination is the limit! -@end table +@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . +@node Trigger Scripts +@appendixsec The Trigger Scripts +@cindex Info files +@cindex Trigger scripts + +Several of the administrative files support triggers, or the launching external +scripts or programs at specific times before or after particular events. The +individual files are discussed in the later sections, @ref{commit files} and +@ref{taginfo}, but some of the common elements are discussed here. + +All the trigger scripts are launched in a copy of the user sandbox being +committed, on the server, in client-server mode. In local mode, the scripts +are actually launched directly from the user sandbox directory being committed. +For most intents and purposes, the same scripts can be run in both locations +without alteration. @menu -* syntax:: The common syntax -* commitinfo:: Pre-commit checking -* verifymsg:: How are log messages evaluated? -* editinfo:: Specifying how log messages are created - (obsolete) -* loginfo:: Where should log messages be sent? +* syntax:: The common syntax +* Trigger Script Security:: Trigger script security @end menu @c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @@ -12466,6 +12494,78 @@ is used as a file name or command-line a @c unambiguous but there is nothing like an example to @c confirm people's understanding of this sort of thing). +@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . +@node Trigger Script Security +@appendixsubsec Security and the Trigger Scripts +@cindex Info files, security +@cindex Trigger scripts, security + +Security is a huge subject, and implementing a secure system is a non-trivial +task. This section will barely touch on all the issues involved, but it is +well to note that, as with any script you will be allowing an untrusted +user to run on your server, there are measures you can take to help prevent +your trigger scripts from being abused. + +For instance, since the CVS trigger scripts all run in a copy of the user's +sandbox on the server, a naively coded Perl trigger script which attempts to +use a Perl module that is not installed on the system can be hijacked by any +user with commit access who is checking in a file with the correct name. Other +scripting languages may be vulnerable to similar hacks. + +One way to make a script more secure, at least with Perl, is to use scripts +which invoke the @code{-T}, or "taint-check" switch on their @code{#!} line. +In the most basic terms, this causes Perl to avoid running code that may have +come from an external source. Please run the @code{perldoc perlsec} command +for more on Perl security. Again, other languages may implement other security +verification hooks which look more or less like Perl's "taint-check" mechanism. + +@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +@node commit files +@appendixsec The commit support files +@cindex Committing, administrative support files + +There are three kinds of trigger scripts (@pxref{Trigger Scripts}) that can be +run at various times during a commit. They are specified in files in the +repository, as described below. The following table summarizes the +file names and the purpose of the corresponding programs. + +@table @file +@item commitinfo +The program is responsible for checking that the commit +is allowed. If it exits with a non-zero exit status +the commit will be aborted. + +@item verifymsg +The specified program is used to evaluate the log message, +and possibly verify that it contains all required +fields. This is most useful in combination with the +@file{rcsinfo} file, which can hold a log message +template (@pxref{rcsinfo}). + +@item editinfo +The specified program is used to edit the log message, +and possibly verify that it contains all required +fields. This is most useful in combination with the +@file{rcsinfo} file, which can hold a log message +template (@pxref{rcsinfo}). (obsolete) + +@item loginfo +The specified program is called when the commit is +complete. It receives the log message and some +additional information and can store the log message in +a file, or mail it to appropriate persons, or maybe +post it to a local newsgroup, or@dots{} Your +imagination is the limit! +@end table + +@menu +* commitinfo:: Pre-commit checking +* verifymsg:: How are log messages evaluated? +* editinfo:: Specifying how log messages are created + (obsolete) +* loginfo:: Where should log messages be sent? +@end menu + @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @node commitinfo @appendixsubsec Commitinfo @@ -12694,7 +12794,7 @@ RereadLogAfterVerify=always @cindex Per-module editor @cindex Log messages, editing -@strong{Note: The @file{editinfo} feature has been +@strong{The @file{editinfo} feature has been rendered obsolete. To set a default editor for log messages use the @code{CVSEDITOR}, @code{EDITOR} environment variables (@pxref{Environment variables}) or the @samp{-e} global @@ -13046,9 +13146,9 @@ directory. The @file{taginfo} file defines programs to execute when someone executes a @code{tag} or @code{rtag} command. The @file{taginfo} file has the standard form -for administrative files (@pxref{syntax}), +for trigger scripts (@pxref{Trigger Scripts}), where each line is a regular expression -followed by a command to execute. The arguments passed +followed by a command to execute (@pxref{syntax}). The arguments passed to the command are, in order, the @var{tagname}, @var{operation} (@code{add} for @code{tag}, @code{mov} for @code{tag -F}, and @code{del} for @@ -13490,7 +13590,7 @@ that the file should be checked with the @samp{stat()} function to see if it has changed (see warning below) before rereading. The default value is @samp{always}. -@strong{Note: the `stat' mode can cause CVS to pause for up to +@strong{The `stat' mode can cause CVS to pause for up to one extra second per directory committed. This can be less IO and CPU intensive but is not recommended for use with large repositories} @@ -14092,6 +14192,19 @@ logged in as "root". (You can disable t On some systems this means editing the appropriate @file{config.h} file before building @sc{cvs}.) +@item Terminated with fatal signal 11 +This message usually indicates that @sc{cvs} (the server, if you're +using client/server mode) has run out of (virtual) memory. +Although @sc{cvs} tries to catch the error and issue a more meaningful +message, there are many circumstances where that is not possible. +If you appear to have lots of memory available to the system, +the problem is most likely that you're running into a system-wide +limit on the amount of memory a single process can use or a +similar process-specific limit. +The mechanisms for displaying and setting such limits vary from +system to system, so you'll have to consult an expert for your +particular system if you don't know how to do that. + @item Too many arguments! This message is typically printed by the @file{log.pl} script which is in the @file{contrib} directory in the @@ -14182,9 +14295,21 @@ vi $* exit 0 @end example -@c "warning: foo was lost" and "no longer pertinent" (both normal). -@c Would be nice to write these up--they are -@c potentially confusing for the new user. +@item cvs update: warning: @var{file} was lost +This means that the working copy of @var{file} has been deleted +but it has not been removed from @sc{cvs}. +This is nothing to be concerned about, +the update will just recreate the local file from the repository. +(This is a convenient way to discard local changes to a file: +just delete it and then run @code{cvs update}.) + +@item cvs update: warning: @var{file} is not (any longer) pertinent +This means that the working copy of @var{file} has been deleted, +it has not been removed from @sc{cvs} in the current working directory, +but it has been removed from @sc{cvs} in some other working directory. +This is nothing to be concerned about, +the update would have removed the local file anyway. + @end table @node Connection @@ -14449,12 +14574,11 @@ distribution. It contains much more inf process of submitting fixes. @item -There may be resources on the net which can help. Two -good places to start are: +There may be resources on the net which can help. A +good place to start is: @example -@url{http://www.cvshome.org} -@url{http://www.loria.fr/~molli/cvs-index.html} +@url{http://cvs.nongnu.org/} @end example If you are so inspired, increasing the information @@ -14467,7 +14591,7 @@ page on mailing lists or newsgroups when came up. @item -It is also possible to report bugs to @email{bug-cvs@@gnu.org}. +It is also possible to report bugs to @email{bug-cvs@@nongnu.org}. Note that someone may or may not want to do anything with your bug report---if you need a solution consider one of the options mentioned above. People probably do @@ -14476,20 +14600,20 @@ in consequences and/or easy to fix, howe also increase your odds by being as clear as possible about the exact nature of the bug and any other relevant information. The way to report bugs is to -send email to @email{bug-cvs@@gnu.org}. Note -that submissions to @email{bug-cvs@@gnu.org} may be distributed +send email to @email{bug-cvs@@nongnu.org}. Note +that submissions to @email{bug-cvs@@nongnu.org} may be distributed under the terms of the @sc{gnu} Public License, so if you don't like this, don't submit them. There is usually no justification for sending mail directly to one of the @sc{cvs} maintainers rather than to -@email{bug-cvs@@gnu.org}; those maintainers who want to hear -about such bug reports read @email{bug-cvs@@gnu.org}. Also note +@email{bug-cvs@@nongnu.org}; those maintainers who want to hear +about such bug reports read @email{bug-cvs@@nongnu.org}. Also note that sending a bug report to other mailing lists or newsgroups is @emph{not} a substitute for sending it to -@email{bug-cvs@@gnu.org}. It is fine to discuss @sc{cvs} bugs on +@email{bug-cvs@@nongnu.org}. It is fine to discuss @sc{cvs} bugs on whatever forum you prefer, but there are not necessarily any maintainers reading bug reports sent -anywhere except @email{bug-cvs@@gnu.org}. +anywhere except @email{bug-cvs@@nongnu.org}. @end itemize @cindex Known bugs in this manual or CVS @@ -14507,10 +14631,6 @@ comprehensive, detailed list of known bu @printindex cp -@summarycontents - -@contents - @bye Local Variables: Index: doc/cvsclient.texi =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/doc/cvsclient.texi,v retrieving revision 1.1.1.12 retrieving revision 1.1.1.13 diff -u -p -r1.1.1.12 -r1.1.1.13 --- doc/cvsclient.texi 15 Apr 2004 01:01:56 -0000 1.1.1.12 +++ doc/cvsclient.texi 26 Dec 2007 03:55:01 -0000 1.1.1.13 @@ -82,7 +82,7 @@ It does not depend on NFS, rdist, etc. @item Providing a reliable transport is outside this protocol. The protocol expects a reliable transport that is transparent (that is, there is no -translation of characters, including characters such as such as +translation of characters, including characters such as linefeeds or carriage returns), and can transmit all 256 octets (for example for proper handling of binary files, compression, and encryption). The encoding of characters specified by the protocol (the @@ -535,12 +535,13 @@ Here are the requests: @table @code @item Root @var{pathname} \n Response expected: no. Tell the server which @code{CVSROOT} to use. -Note that @var{pathname} is a local directory and @emph{not} a fully -qualified @code{CVSROOT} variable. @var{pathname} must -already exist; if creating a new root, use the @code{init} request, not -@code{Root}. @var{pathname} does not include the hostname of the -server, how to access the server, etc.; by the time the CVS protocol is -in use, connection, authentication, etc., are already taken care of. +Note that @var{pathname} is @emph{not} a fully qualified @code{CVSROOT} +variable, but only the local directory part of it. @var{pathname} must +already exist on the server; if creating a new root, use the @code{init} +request, not @code{Root}. Again, @var{pathname} @emph{does not} include +the hostname of the server, how to access the server, etc.; by the time +the CVS protocol is in use, connection, authentication, etc., are +already taken care of. The @code{Root} request must be sent only once, and it must be sent before any requests other than @code{Valid-responses}, @@ -871,6 +872,15 @@ in this document, servers must support t not do anything) and clients must issue it. The @code{Root} request need not have been previously sent. +@item Empty-conflicts \n +Response expected: yes. This request is an alias for @code{noop}. Its +presence in the list of @code{valid-requests} is intended to be used as a +placeholder to alert the client that the server does not require the contents +of files with conflicts that have not been modified since the merge, for +operations other than diff. It was a bug in pre 1.11.22 & pre 1.12.14 servers +that the contents of files with conflicts was required for the server to +acknowledge the existence of the conflicts. + @item Notify @var{filename} \n Response expected: no. Tell the server that an @code{edit} or @code{unedit} command has taken @@ -2014,7 +2024,7 @@ working directory, and the meaning of se A number of enhancements are possible. Also see the file @sc{todo} in the @sc{cvs} source distribution, which has further ideas concerning various aspects of @sc{cvs}, some of which impact the protocol. -Similarly, the @code{http://www.cvshome.org} site, in particular the +Similarly, the @code{http://cvs.nongnu.org} site, in particular the @cite{Development} pages. @itemize @bullet Index: doc/mkman.in =================================================================== RCS file: doc/mkman.in diff -N doc/mkman.in --- doc/mkman.in 10 Jun 2004 19:05:37 -0000 1.1.1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,314 +0,0 @@ -#! @PERL@ -# -# Generate a man page from sections of a Texinfo manual. -# -# Copyright 2004 The Free Software Foundation, -# Derek R. Price, -# & Ximbiot -# -# 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. - - - -# Need Perl 5.005 or greater for re 'eval'. -require 5.005; - -# The usual. -use strict; -use IO::File; - - - -### -### GLOBALS -### -my $texi_num = 0; # Keep track of how many texinfo files have been encountered. -my @parent; # This needs to be global to be used inside of a regex later. - - - -### -### FUNCTIONS -### -sub keyword_mode -{ - my ($keyword, $file) = @_; - - return "\\fR" - if $keyword =~ /^(|r|t)$/; - return "\\fB" - if $keyword =~ /^(strong|sc|code|file|samp)$/; - return "\\fI" - if $keyword =~ /^(emph|var|dfn)$/; - die "no handler for keyword \`$keyword', found at line $. of file \`$file'\n"; -} - - - -# Return replacement for \@$keyword{$content}. -sub do_keyword -{ - my ($file, $parent, $keyword, $content) = @_; - - return "see node \`$content\\(aq in the CVS manual" - if $keyword =~ /^(p?x)?ref$/; - return "\\fP\\fP$content" - if $keyword =~ /^splitrcskeyword$/; - - my $endmode = keyword_mode $parent; - my $startmode = keyword_mode $keyword, $file; - - return "$startmode$content$endmode"; -} - - - -### -### MAIN -### -for my $file (@ARGV) -{ - my $fh = new IO::File "< $file" - or die "Failed to open file \`$file': $!"; - - if ($file !~ /\.(texinfo|texi|txi)$/) - { - print stderr "Passing \`$file' through unprocessed.\n"; - # Just cat any file that doesn't look like a Texinfo source. - while (my $line = $fh->getline) - { - print $line; - } - next; - } - - print stderr "Processing \`$file'.\n"; - $texi_num++; - my $gotone = 0; - my $inblank = 0; - my $indent = 0; - my $inexample = 0; - my $inmenu = 0; - my $intable = 0; - my $last_header = ""; - my @table_headers; - my @table_footers; - my $table_header = ""; - my $table_footer = ""; - my $last; - while ($_ = $fh->getline) - { - if (!$gotone && /^\@c ----- START MAN $texi_num -----$/) - { - $gotone = 1; - next; - } - - # Skip ahead until our man section. - next unless $gotone; - - # If we find the end tag we are done. - last if /^\@c ----- END MAN $texi_num -----$/; - - # Need to do this everywhere. i.e., before we print example - # lines, since literal back slashes can appear there too. - s/\\/\\\\/g; - s/^\./\\&./; - s/([\s])\./$1\\&./; - s/'/\\(aq/g; - s/`/\\`/g; - s/(? (?:[^{}]|(?<=\@)[{}])*) # Non-braces without backtracking - | - (??{ $nk }) # Nested keywords - )*) - \} - (?{ pop (@parent) }) # Lose track of the current keyword. - /x; - - @parent = (""); - while (s/$nk/do_keyword $file, $parent[$#parent], $1, $2/e) - { - # Do nothing except replace our last-replacement - # tracker - the replacement regex above is handling - # everything else. - @parent = (""); - } - s/$nk/do_keyword $file, $parent[$#parent], $1, $2/ge; - - if (/\@\w+\{/) - { - # If there is still an opening keyword left, we need to - # find the close bracket. Set $last to append the next - # line in the next pass. - $last = $_; - next; - } - - # Finally, unprotect texinfo special characters. - s/\@://g; - s/\@([{}])/$1/g; - - # Verify we haven't left commands unprocessed. - die "Unprocessed command at line $. of file \`$file': " - . ($1 ? "$1\n" : "\n") - if /^(?>(?:[^\@]|\@\@)*)\@(\w+|.|$)/; - - # Unprotect @@. - s/\@\@/\@/g; - - # And print whatever's left. - print $_; - } -} Index: doc/mkman.pl =================================================================== RCS file: doc/mkman.pl diff -N doc/mkman.pl --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ doc/mkman.pl 26 Dec 2007 03:55:01 -0000 1.1.1.1 @@ -0,0 +1,369 @@ +#! @PERL@ +# +# Generate a man page from sections of a Texinfo manual. +# +# Copyright 2004 The Free Software Foundation, +# Derek R. Price, +# & Ximbiot +# +# 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. + + + +# Need Perl 5.005 or greater for re 'eval'. +require 5.005; + +# The usual. +use strict; +use IO::File; + + + +### +### GLOBALS +### +my $texi_num = 0; # Keep track of how many texinfo files have been encountered. +my @parent; # This needs to be global to be used inside of a regex later. +my $nk; # Ditto. +my $ret; # The RE match Type, used in debug prints. +my $debug = 0; # Debug mode? + + + +### +### FUNCTIONS +### +sub debug_print +{ + print @_ if $debug; +} + + + +sub keyword_mode +{ + my ($keyword, $file) = @_; + + return "\\fR" + if $keyword =~ /^(|r|t)$/; + return "\\fB" + if $keyword =~ /^(strong|sc|code|file|samp)$/; + return "\\fI" + if $keyword =~ /^(emph|var|dfn)$/; + die "no handler for keyword \`$keyword', found at line $. of file \`$file'\n"; +} + + + +# Return replacement for \@$keyword{$content}. +sub do_keyword +{ + my ($file, $parent, $keyword, $content) = @_; + + return "see node \`$content\\(aq in the CVS manual" + if $keyword =~ /^(p?x)?ref$/; + return "\\fP\\fP$content" + if $keyword =~ /^splitrcskeyword$/; + + my $endmode = keyword_mode $parent; + my $startmode = keyword_mode $keyword, $file; + + return "$startmode$content$endmode"; +} + + + +### +### MAIN +### +for my $file (@ARGV) +{ + my $fh = new IO::File "< $file" + or die "Failed to open file \`$file': $!"; + + if ($file !~ /\.(texinfo|texi|txi)$/) + { + print stderr "Passing \`$file' through unprocessed.\n"; + # Just cat any file that doesn't look like a Texinfo source. + while (my $line = $fh->getline) + { + print $line; + } + next; + } + + print stderr "Processing \`$file'.\n"; + $texi_num++; + my $gotone = 0; + my $inblank = 0; + my $indent = 0; + my $inexample = 0; + my $inmenu = 0; + my $intable = 0; + my $last_header = ""; + my @table_headers; + my @table_footers; + my $table_header = ""; + my $table_footer = ""; + my $last; + while ($_ = $fh->getline) + { + if (!$gotone && /^\@c ----- START MAN $texi_num -----$/) + { + $gotone = 1; + next; + } + + # Skip ahead until our man section. + next unless $gotone; + + # If we find the end tag we are done. + last if /^\@c ----- END MAN $texi_num -----$/; + + # Need to do this everywhere. i.e., before we print example + # lines, since literal back slashes can appear there too. + s/\\/\\\\/g; + s/^\./\\&./; + s/([\s])\./$1\\&./; + s/'/\\(aq/g; + s/`/\\`/g; + s/(? + [^{}]|(?<=\@)[{}] # Non-braces... + | # ...or... + (??{ $nk }) # ...nested keywords... + )*) # ...without backtracking. + \} + (?{ debug_print "$ret MATCHED $&\nPOPPING ", + pop (@parent), "\n"; }) # Lose track of the current keyword. + /x; + + $ret = "m//"; + if (/\@\w+\{(?:[^{}]|(?<=\@)[{}]|(??{ $nk }))*$/) + { + # If there is an opening keyword on this line without a + # close bracket, we need to find the close bracket + # before processing the line. Set $last to append the + # next line in the next pass. + $last = $_; + next; + } + + # Okay, the following works somewhat counter-intuitively. $nk + # processes the whole line, so @parent gets loaded properly, + # then, since no closing brackets have been found for the + # outermost matches, the innermost matches match and get + # replaced first. + # + # For example: + # + # Processing the line: + # + # yadda yadda @code{yadda @var{foo} yadda @var{bar} yadda} + # + # Happens something like this: + # + # 1. Ignores "yadda yadda " + # 2. Sees "@code{" and pushes "code" onto @parent. + # 3. Ignores "yadda " (backtracks and ignores "yadda yadda + # @code{yadda "?) + # 4. Sees "@var{" and pushes "var" onto @parent. + # 5. Sees "foo}", pops "var", and realizes that "@var{foo}" + # matches the overall pattern ($nk). + # 6. Replaces "@var{foo}" with the result of: + # + # do_keyword $file, $parent[$#parent], $1, $2; + # + # which would be "\Ifoo\B", in this case, because "var" + # signals a request for italics, or "\I", and "code" is + # still on the stack, which means the previous style was + # bold, or "\B". + # + # Then the while loop restarts and a similar series of events + # replaces "@var{bar}" with "\Ibar\B". + # + # Then the while loop restarts and a similar series of events + # replaces "@code{yadda \Ifoo\B yadda \Ibar\B yadda}" with + # "\Byadda \Ifoo\B yadda \Ibar\B yadda\R". + # + $ret = "s///"; + @parent = (""); + while (s/$nk/do_keyword $file, $parent[$#parent], $1, $2/e) + { + # Do nothing except reset our last-replacement + # tracker - the replacement regex above is handling + # everything else. + debug_print "FINAL MATCH $&\n"; + @parent = (""); + } + + # Finally, unprotect texinfo special characters. + s/\@://g; + s/\@([{}])/$1/g; + + # Verify we haven't left commands unprocessed. + die "Unprocessed command at line $. of file \`$file': " + . ($1 ? "$1\n" : "\n") + if /^(?>(?:[^\@]|\@\@)*)\@(\w+|.|$)/; + + # Unprotect @@. + s/\@\@/\@/g; + + # And print whatever's left. + print $_; + } +} Index: doc/stamp-1 =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/doc/stamp-1,v retrieving revision 1.1.1.5 retrieving revision 1.1.1.6 diff -u -p -r1.1.1.5 -r1.1.1.6 --- doc/stamp-1 10 Jun 2004 19:05:37 -0000 1.1.1.5 +++ doc/stamp-1 26 Dec 2007 03:55:01 -0000 1.1.1.6 @@ -1,4 +1,4 @@ -@set UPDATED 3 February 2004 -@set UPDATED-MONTH February 2004 -@set EDITION 1.11.17 -@set VERSION 1.11.17 +@set UPDATED 8 June 2006 +@set UPDATED-MONTH June 2006 +@set EDITION 1.11.22 +@set VERSION 1.11.22 Index: doc/stamp-vti =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/doc/stamp-vti,v retrieving revision 1.1.1.5 retrieving revision 1.1.1.6 diff -u -p -r1.1.1.5 -r1.1.1.6 --- doc/stamp-vti 10 Jun 2004 19:05:37 -0000 1.1.1.5 +++ doc/stamp-vti 26 Dec 2007 03:55:01 -0000 1.1.1.6 @@ -1,4 +1,4 @@ -@set UPDATED 27 May 2004 -@set UPDATED-MONTH May 2004 -@set EDITION 1.11.17 -@set VERSION 1.11.17 +@set UPDATED 15 May 2006 +@set UPDATED-MONTH May 2006 +@set EDITION 1.11.22 +@set VERSION 1.11.22 Index: doc/version-client.texi =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/doc/version-client.texi,v retrieving revision 1.1.1.5 retrieving revision 1.1.1.6 diff -u -p -r1.1.1.5 -r1.1.1.6 --- doc/version-client.texi 10 Jun 2004 19:05:37 -0000 1.1.1.5 +++ doc/version-client.texi 26 Dec 2007 03:55:01 -0000 1.1.1.6 @@ -1,4 +1,4 @@ -@set UPDATED 3 February 2004 -@set UPDATED-MONTH February 2004 -@set EDITION 1.11.17 -@set VERSION 1.11.17 +@set UPDATED 8 June 2006 +@set UPDATED-MONTH June 2006 +@set EDITION 1.11.22 +@set VERSION 1.11.22 Index: doc/version.texi =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/doc/version.texi,v retrieving revision 1.1.1.5 retrieving revision 1.1.1.6 diff -u -p -r1.1.1.5 -r1.1.1.6 --- doc/version.texi 10 Jun 2004 19:05:37 -0000 1.1.1.5 +++ doc/version.texi 26 Dec 2007 03:55:01 -0000 1.1.1.6 @@ -1,4 +1,4 @@ -@set UPDATED 27 May 2004 -@set UPDATED-MONTH May 2004 -@set EDITION 1.11.17 -@set VERSION 1.11.17 +@set UPDATED 15 May 2006 +@set UPDATED-MONTH May 2006 +@set EDITION 1.11.22 +@set VERSION 1.11.22 Index: lib/ChangeLog =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/lib/ChangeLog,v retrieving revision 1.1.1.14 retrieving revision 1.1.1.15 diff -u -p -r1.1.1.14 -r1.1.1.15 --- lib/ChangeLog 10 Jun 2004 19:05:38 -0000 1.1.1.14 +++ lib/ChangeLog 26 Dec 2007 03:55:02 -0000 1.1.1.15 @@ -1,3 +1,57 @@ +2005-11-14 Mark D. Baushke + + * system.h (FOLD_FN_CHAR): Distinguish OSX_ and VMS_ variations + based on USE_VMS_FILENAME macro. + +2005-11-09 Mark D. Baushke + + * system.h (FOLD_FN_CHAR): Create a VMS alternative of this macro + (patch suggested by Piet Schuermans ). + +2005-07-11 Mark D. Baushke + + * getpass.c (getpass): Add a K&R style function definition. + +2005-04-15 Derek Price + + * Makefile.am (EXTRA_DIST): Add test-getdate.sh. + +2005-03-23 Derek Price + + * Makefile.am (TESTS, MOSTLYCLEANFILES, check_PROGRAMS, EXTRA_DIST, + getdate_SOURCES, getdate_CPPFLAGS): Add getdate testing cruft. + * test-getdate.sh: New file. + * .cvsignore: Ignore getdate executable. + +2005-03-23 Larry Jones + + * getdate.c: Remove absolute paths from #line directives. + +2005-03-04 Jim Hyslop + + * xtime.h: added include guards to fix compile errors on IRIX 5.3 + (Patch from Georg Schwarz .) + +2005-02-08 Derek Price + + * fncase.c (OSX_filename_classes): Mac OSX doesn't need \ mapped to /. + * system.h (FOLD_FN_CASE): Clarify comment. + +2005-01-31 Derek Price + + * Makefile.am: Update copyright notices. + +2004-10-05 Derek Price + + * regex.c: Back out my change from 2004-04-07 as possibly suppressing + useful warnings. + +2004-10-05 Mark D. Baushke + + * regex.c (re_comp): Cast gettext return value to char * to + avoid warning in !ENABLE_NLS case. Patch imported from GNULIB. + (Problem report from Martin Neitzel .) + 2004-05-28 Derek Price * xsize.h: New file from GNULIB. Index: lib/Makefile.am =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/lib/Makefile.am,v retrieving revision 1.1.1.4 retrieving revision 1.1.1.5 diff -u -p -r1.1.1.4 -r1.1.1.5 --- lib/Makefile.am 10 Jun 2004 19:05:38 -0000 1.1.1.4 +++ lib/Makefile.am 26 Dec 2007 03:55:01 -0000 1.1.1.5 @@ -1,8 +1,10 @@ ## Process this file with automake to produce Makefile.in # Makefile for library files used by GNU CVS. -# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, -# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. +# +# Copyright (C) 1986-2005 The Free Software Foundation, Inc. +# +# Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , +# and others. # 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 @@ -86,7 +88,23 @@ EXTRA_DIST = \ ChangeLog.fsf \ build_lib.com \ libcvs.dep libcvs.dsp libcvs.mak \ - xgssapi.h + xgssapi.h \ + test-getdate.sh + +TESTS = +MOSTLYCLEANFILES = +check_PROGRAMS = + +# Test GNULIB getdate module. +TESTS += test-getdate.sh +MOSTLYCLEANFILES += getdate-expected getdate-got getdate.diff +# Program required by test-getdate.sh for testing getdate.y. +check_PROGRAMS += getdate +EXTRA_DIST += $(check_PROGRAMS) +getdate_SOURCES = getdate.y +getdate_CPPFLAGS = -DTEST +##getdate_LDADD = \ +## $(noinst_LIBRARIES) # For the xsize module from GNULIB. libcvs_a_SOURCES += xsize.h Index: lib/Makefile.in =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/lib/Makefile.in,v retrieving revision 1.1.1.12 retrieving revision 1.1.1.13 diff -u -p -r1.1.1.12 -r1.1.1.13 --- lib/Makefile.in 10 Jun 2004 19:05:38 -0000 1.1.1.12 +++ lib/Makefile.in 26 Dec 2007 03:55:01 -0000 1.1.1.13 @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.7.9 from Makefile.am. +# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ -# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,9 +15,11 @@ @SET_MAKE@ # Makefile for library files used by GNU CVS. -# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, -# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. +# +# Copyright (C) 1986-2005 The Free Software Foundation, Inc. +# +# Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , +# and others. # 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 @@ -36,7 +38,6 @@ 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 @@ -50,6 +51,49 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +check_PROGRAMS = getdate$(EXEEXT) +subdir = lib +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/fnmatch.h.in ChangeLog dup2.c fncase.c fnmatch.c \ + fnmatch.h.in ftruncate.c getdate.c gethostname.c memmove.c \ + mkdir.c rename.c strerror.c strstr.c strtoul.c valloc.c \ + waitpid.c +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = fnmatch.h +LIBRARIES = $(noinst_LIBRARIES) +AR = ar +ARFLAGS = cru +libcvs_a_AR = $(AR) $(ARFLAGS) +libcvs_a_DEPENDENCIES = @LIBOBJS@ +am_libcvs_a_OBJECTS = argmatch.$(OBJEXT) getdate.$(OBJEXT) \ + getline.$(OBJEXT) getopt.$(OBJEXT) getopt1.$(OBJEXT) \ + getpass.$(OBJEXT) md5.$(OBJEXT) regex.$(OBJEXT) \ + savecwd.$(OBJEXT) sighandle.$(OBJEXT) stripslash.$(OBJEXT) \ + xgetwd.$(OBJEXT) yesno.$(OBJEXT) +libcvs_a_OBJECTS = $(am_libcvs_a_OBJECTS) +am_getdate_OBJECTS = getdate-getdate.$(OBJEXT) +getdate_OBJECTS = $(am_getdate_OBJECTS) +getdate_LDADD = $(LDADD) +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS) +YLWRAP = $(top_srcdir)/ylwrap +SOURCES = $(libcvs_a_SOURCES) $(getdate_SOURCES) +DIST_SOURCES = $(libcvs_a_SOURCES) $(getdate_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ @@ -119,6 +163,8 @@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ @@ -132,6 +178,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ +mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ @@ -139,6 +186,7 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +with_default_rsh = @with_default_rsh@ # For now we need to include $(top_srcdir)/src because some systems # (at least 'AIX rioscpu2 3 4 000030498200', @@ -153,7 +201,6 @@ target_alias = @target_alias@ # # $(includeopt) is CVS specific and set by configure INCLUDES = -I$(top_srcdir)/src $(includeopt) - noinst_LIBRARIES = libcvs.a # Always use CVS's regular expression matcher regex.o, because of @@ -168,96 +215,53 @@ noinst_LIBRARIES = libcvs.a # matching?) # For the xsize module from GNULIB. -libcvs_a_SOURCES = \ - argmatch.c \ - getdate.y \ - getline.c \ - getopt.c \ - getopt1.c \ - getpass.c \ - md5.c \ - regex.c \ - savecwd.c \ - sighandle.c \ - stripslash.c \ - xgetwd.c \ - yesno.c \ - getline.h \ - getopt.h \ - getpagesize.h \ - md5.h \ - regex.h \ - savecwd.h \ - system.h \ - wait.h \ - xselect.h \ - xtime.h\ -xsize.h +libcvs_a_SOURCES = argmatch.c getdate.y getline.c getopt.c getopt1.c \ + getpass.c md5.c regex.c savecwd.c sighandle.c stripslash.c \ + xgetwd.c yesno.c getline.h getopt.h getpagesize.h md5.h \ + regex.h savecwd.h system.h wait.h xselect.h xtime.h xsize.h libcvs_a_LIBADD = @LIBOBJS@ - -EXTRA_DIST = \ - .cvsignore \ - ChangeLog.fsf \ - build_lib.com \ - libcvs.dep libcvs.dsp libcvs.mak \ - xgssapi.h - -subdir = lib -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -LIBRARIES = $(noinst_LIBRARIES) - -libcvs_a_AR = $(AR) cru -libcvs_a_DEPENDENCIES = @LIBOBJS@ -am_libcvs_a_OBJECTS = argmatch.$(OBJEXT) getdate.$(OBJEXT) \ - getline.$(OBJEXT) getopt.$(OBJEXT) getopt1.$(OBJEXT) \ - getpass.$(OBJEXT) md5.$(OBJEXT) regex.$(OBJEXT) \ - savecwd.$(OBJEXT) sighandle.$(OBJEXT) stripslash.$(OBJEXT) \ - xgetwd.$(OBJEXT) yesno.$(OBJEXT) -libcvs_a_OBJECTS = $(am_libcvs_a_OBJECTS) - -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/dup2.Po $(DEPDIR)/fncase.Po \ -@AMDEP_TRUE@ $(DEPDIR)/fnmatch.Po $(DEPDIR)/fnmatch.h.in \ -@AMDEP_TRUE@ $(DEPDIR)/ftruncate.Po $(DEPDIR)/gethostname.Po \ -@AMDEP_TRUE@ $(DEPDIR)/memmove.Po $(DEPDIR)/mkdir.Po \ -@AMDEP_TRUE@ $(DEPDIR)/rename.Po $(DEPDIR)/strerror.Po \ -@AMDEP_TRUE@ $(DEPDIR)/strstr.Po $(DEPDIR)/strtoul.Po \ -@AMDEP_TRUE@ $(DEPDIR)/valloc.Po $(DEPDIR)/waitpid.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/argmatch.Po ./$(DEPDIR)/getdate.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/getline.Po ./$(DEPDIR)/getopt.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/getopt1.Po ./$(DEPDIR)/getpass.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/md5.Po ./$(DEPDIR)/regex.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/savecwd.Po ./$(DEPDIR)/sighandle.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/stripslash.Po ./$(DEPDIR)/xgetwd.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/yesno.Po -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS) -DIST_SOURCES = $(libcvs_a_SOURCES) -DIST_COMMON = $(srcdir)/Makefile.in ChangeLog Makefile.am dup2.c \ - fncase.c fnmatch.c fnmatch.h.in ftruncate.c getdate.c \ - gethostname.c memmove.c mkdir.c rename.c strerror.c strstr.c \ - strtoul.c valloc.c waitpid.c -SOURCES = $(libcvs_a_SOURCES) - +EXTRA_DIST = .cvsignore ChangeLog.fsf build_lib.com libcvs.dep \ + libcvs.dsp libcvs.mak xgssapi.h test-getdate.sh \ + $(check_PROGRAMS) + +# Test GNULIB getdate module. +TESTS = test-getdate.sh +MOSTLYCLEANFILES = getdate-expected getdate-got getdate.diff +getdate_SOURCES = getdate.y +getdate_CPPFLAGS = -DTEST all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj .y -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/Makefile -Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) - -AR = ar +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) @@ -266,8 +270,14 @@ libcvs.a: $(libcvs_a_OBJECTS) $(libcvs_a $(libcvs_a_AR) libcvs.a $(libcvs_a_OBJECTS) $(libcvs_a_LIBADD) $(RANLIB) libcvs.a +clean-checkPROGRAMS: + -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS) +getdate$(EXEEXT): $(getdate_OBJECTS) $(getdate_DEPENDENCIES) + @rm -f getdate$(EXEEXT) + $(LINK) $(getdate_LDFLAGS) $(getdate_OBJECTS) $(getdate_LDADD) $(LIBS) + mostlyclean-compile: - -rm -f *.$(OBJEXT) core *.core + -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @@ -287,6 +297,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/valloc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/waitpid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argmatch.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdate-getdate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getline.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ @@ -301,56 +312,37 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yesno.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ -@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ -@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ -@am__fastdepCC_TRUE@ fi +@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 `test -f '$<' || echo '$(srcdir)/'`$< +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ -@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ -@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ -@am__fastdepCC_TRUE@ fi +@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 `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +getdate-getdate.o: getdate.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(getdate_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT getdate-getdate.o -MD -MP -MF "$(DEPDIR)/getdate-getdate.Tpo" -c -o getdate-getdate.o `test -f 'getdate.c' || echo '$(srcdir)/'`getdate.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getdate-getdate.Tpo" "$(DEPDIR)/getdate-getdate.Po"; else rm -f "$(DEPDIR)/getdate-getdate.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getdate.c' object='getdate-getdate.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(getdate_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o getdate-getdate.o `test -f 'getdate.c' || echo '$(srcdir)/'`getdate.c + +getdate-getdate.obj: getdate.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(getdate_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT getdate-getdate.obj -MD -MP -MF "$(DEPDIR)/getdate-getdate.Tpo" -c -o getdate-getdate.obj `if test -f 'getdate.c'; then $(CYGPATH_W) 'getdate.c'; else $(CYGPATH_W) '$(srcdir)/getdate.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/getdate-getdate.Tpo" "$(DEPDIR)/getdate-getdate.Po"; else rm -f "$(DEPDIR)/getdate-getdate.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getdate.c' object='getdate-getdate.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(getdate_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o getdate-getdate.obj `if test -f 'getdate.c'; then $(CYGPATH_W) 'getdate.c'; else $(CYGPATH_W) '$(srcdir)/getdate.c'; fi` .y.c: - $(YACCCOMPILE) `test -f '$<' || echo '$(srcdir)/'`$< - if test -f y.tab.h; then \ - to=`echo "$*_H" | sed \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ - -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`; \ - sed "/^#/ s/Y_TAB_H/$$to/g" y.tab.h >$*.ht; \ - rm -f y.tab.h; \ - if cmp -s $*.ht $*.h; then \ - rm -f $*.ht ;\ - else \ - mv $*.ht $*.h; \ - fi; \ - fi - if test -f y.output; then \ - mv y.output $*.output; \ - fi - sed '/^#/ s|y\.tab\.c|$@|' y.tab.c >$@t && mv $@t $@ - rm -f y.tab.c + $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE) uninstall-info-am: -ETAGS = etags -ETAGSFLAGS = - -CTAGS = ctags -CTAGSFLAGS = - -tags: TAGS - ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -359,6 +351,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique +tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) @@ -370,10 +363,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEP 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 - + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) @@ -396,10 +390,79 @@ GTAGS: distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -top_distdir = .. -distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list='$(TESTS)'; \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *" $$tst "*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + echo "XPASS: $$tst"; \ + ;; \ + *) \ + echo "PASS: $$tst"; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *" $$tst "*) \ + xfail=`expr $$xfail + 1`; \ + echo "XFAIL: $$tst"; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + echo "FAIL: $$tst"; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + echo "SKIP: $$tst"; \ + fi; \ + done; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="All $$all tests passed"; \ + else \ + banner="All $$all tests behaved as expected ($$xfail expected failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all tests failed"; \ + else \ + banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + skipped="($$skip tests were not run)"; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + echo "$$dashes"; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes"; \ + test "$$failed" -eq 0; \ + else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ @@ -413,7 +476,7 @@ distdir: $(DISTFILES) dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ - $(mkinstalldirs) "$(distdir)$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ @@ -429,9 +492,10 @@ distdir: $(DISTFILES) fi; \ done check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile $(LIBRARIES) - installdirs: install: install-am install-exec: install-exec-am @@ -448,11 +512,12 @@ install-strip: `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: + -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -460,7 +525,8 @@ maintainer-clean-generic: -rm -f getdate.c clean: clean-am -clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am +clean-am: clean-checkPROGRAMS clean-generic clean-noinstLIBRARIES \ + mostlyclean-am distclean: distclean-am -rm -rf $(DEPDIR) ./$(DEPDIR) @@ -472,6 +538,8 @@ dvi: dvi-am dvi-am: +html: html-am + info: info-am info-am: @@ -505,16 +573,16 @@ ps-am: uninstall-am: uninstall-info-am -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-noinstLIBRARIES ctags distclean distclean-compile \ - distclean-generic distclean-local distclean-tags distdir dvi \ - dvi-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-info-am +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-noinstLIBRARIES ctags \ + distclean distclean-compile distclean-generic distclean-local \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-exec \ + install-exec-am install-info install-info-am install-man \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-info-am # Until Automake gets its act together Index: lib/fncase.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/lib/fncase.c,v retrieving revision 1.1.1.2 retrieving revision 1.1.1.3 diff -u -p -r1.1.1.2 -r1.1.1.3 --- lib/fncase.c 15 Apr 2004 01:01:56 -0000 1.1.1.2 +++ lib/fncase.c 26 Dec 2007 03:55:02 -0000 1.1.1.3 @@ -104,7 +104,7 @@ OSX_filename_classes[] = 0x40,0x61,0x62,0x63, 0x64,0x65,0x66,0x67, 0x68,0x69,0x6a,0x6b, 0x6c,0x6d,0x6e,0x6f, 0x70,0x71,0x72,0x73, 0x74,0x75,0x76,0x77, - 0x78,0x79,0x7a,0x5b, 0x2f,0x5d,0x5e,0x5f, + 0x78,0x79,0x7a,0x5b, 0x5c,0x5d,0x5e,0x5f, 0x60,0x61,0x62,0x63, 0x64,0x65,0x66,0x67, 0x68,0x69,0x6a,0x6b, 0x6c,0x6d,0x6e,0x6f, 0x70,0x71,0x72,0x73, 0x74,0x75,0x76,0x77, Index: lib/getdate =================================================================== RCS file: lib/getdate diff -N lib/getdate Binary files /dev/null and /tmp/cvsXzNpoQ differ Index: lib/getpass.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/lib/getpass.c,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.2 diff -u -p -r1.1.1.1 -r1.1.1.2 --- lib/getpass.c 15 Apr 2004 01:01:56 -0000 1.1.1.1 +++ lib/getpass.c 26 Dec 2007 03:55:02 -0000 1.1.1.2 @@ -37,7 +37,12 @@ #endif char * +#if __STDC__ getpass (const char *prompt) +#else +getpass (prompt) + const char *prompt; +#endif { FILE *in, *out; struct termios s, t; Index: lib/regex.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/lib/regex.c,v retrieving revision 1.1.1.6 retrieving revision 1.1.1.7 diff -u -p -r1.1.1.6 -r1.1.1.7 --- lib/regex.c 15 Apr 2004 01:01:56 -0000 1.1.1.6 +++ lib/regex.c 26 Dec 2007 03:55:02 -0000 1.1.1.7 @@ -4001,7 +4001,7 @@ static boolean alt_match_null_string_p ( /* Free everything we malloc. */ #ifdef MATCH_MAY_ALLOCATE -#define FREE_VAR(var) if (var) { (void)REGEX_FREE ((void *)var); var = NULL; } else +#define FREE_VAR(var) if (var) { REGEX_FREE (var); var = NULL; } else #define FREE_VARIABLES() \ do { \ REGEX_FREE_STACK (fail_stack.stack); \ @@ -6084,7 +6084,7 @@ re_comp (s) if (!s) { if (!re_comp_buf.buffer) - return gettext ("No previous regular expression"); + return (char *) gettext ("No previous regular expression"); return 0; } Index: lib/system.h =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/lib/system.h,v retrieving revision 1.1.1.9 retrieving revision 1.1.1.10 diff -u -p -r1.1.1.9 -r1.1.1.10 --- lib/system.h 10 Jun 2004 19:05:38 -0000 1.1.1.9 +++ lib/system.h 26 Dec 2007 03:55:02 -0000 1.1.1.10 @@ -491,18 +491,22 @@ extern unsigned char WNT_filename_classe Windows NT, you can use either / or \. */ # define ISDIRSEP(c) (FOLD_FN_CHAR(c) == '/') # define ISABSOLUTE(s) (ISDIRSEP(s[0]) || FOLD_FN_CHAR(s[0]) >= 'a' && FOLD_FN_CHAR(s[0]) <= 'z' && s[1] == ':' && ISDIRSEP(s[2])) -# else /* ! WOE32 */ - /* As far as I know, just Macintosh OS X can make it here, - * but since the OS X fold just folds a-z into A-Z or visa-versa, I'm just - * allowing it to be used for any case insensitive system which we aren't - * yet making other specific folds or exceptions for (basically, anything - * case insensitive other than Windows, where \ and C:\ style absolute paths - * also need to be accounted for). - * - * Under Mac OS X, filenames are case-insensitive. +# else /* !__CYGWIN32__ && !WOE32 */ + /* As far as I know, only Macintosh OS X & VMS make it here, but any + * platform defining FILENAMES_CASE_INSENSITIVE which isn't WOE32 or + * piggy-backing the same could, in theory. Since the OS X fold just folds + * A-Z into a-z, I'm just allowing it to be used for any case insensitive + * system which we aren't yet making other specific folds or exceptions for. + * WOE32 needs its own class since \ and C:\ style absolute paths also need + * to be accounted for. */ +# if defined(USE_VMS_FILENAMES) +# define FOLD_FN_CHAR(c) (VMS_filename_classes[(unsigned char) (c)]) +extern unsigned char VMS_filename_classes[]; +# else # define FOLD_FN_CHAR(c) (OSX_filename_classes[(unsigned char) (c)]) extern unsigned char OSX_filename_classes[]; +# endif # endif /* __CYGWIN32__ || WOE32 */ /* The following need to be declared for all case insensitive filesystems. Index: lib/test-getdate.sh =================================================================== RCS file: lib/test-getdate.sh diff -N lib/test-getdate.sh --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lib/test-getdate.sh 26 Dec 2007 03:55:02 -0000 1.1.1.1 @@ -0,0 +1,127 @@ +#! /bin/sh + +# Test that a getdate executable meets its specification. +# +# Copyright (C) 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. */ + +# Why are these dates tested? +# +# February 29, 2003 +# Is not a leap year - should be invalid. +# +# 2004-12-40 +# Make sure get_date does not "roll" date forward to January 9th. Some +# versions have been known to do this. +# +# Dec-5-1972 +# This is my birthday. :) +# +# 3/29/1974 +# 1996/05/12 13:57:45 +# Because. +# +# 12-05-12 +# This will be my 40th birthday. Ouch. :) +# +# 05/12/96 +# Because. +# +# third tuesday in March, 2078 +# Wanted this to work. +# +# 1969-12-32 2:00:00 UTC +# 1970-01-01 2:00:00 UTC +# 1969-12-32 2:00:00 +0400 +# 1970-01-01 2:00:00 +0400 +# 1969-12-32 2:00:00 -0400 +# 1970-01-01 2:00:00 -0400 +# Playing near the UNIX Epoch boundry condition to make sure date rolling +# is also disabled there. +# +# 1996-12-12 1 month +# Test a relative date. +# +# Tue Jan 19 03:14:07 2038 +0000 +# For machines with 31-bit time_t, any date past this date will be an +# invalid date. So, any test date with a value greater than this +# time is not portable. +# +# Feb. 29, 2096 4 years +# 4 years from this date is _not_ a leap year, so Feb. 29th does not exist. +# +# Feb. 29, 2096 8 years +# 8 years from this date is a leap year, so Feb. 29th does exist, +# but on many hosts with 32-bit time_t types time, this test will +# fail. So, this is not a portable test. +# + +TZ=UTC0; export TZ + +cat >getdate-expected < Bad format - couldn't convert. + > Bad format - couldn't convert. + > Bad format - couldn't convert. + > Fri Mar 29 00:00:00 1974 + > Sun May 12 13:57:45 1996 + > Sat May 12 00:00:00 2012 + > Sun May 12 00:00:00 1996 + > Bad format - couldn't convert. + > Bad format - couldn't convert. + > Thu Jan 1 02:00:00 1970 + > Bad format - couldn't convert. + > Bad format - couldn't convert. + > Bad format - couldn't convert. + > Thu Jan 1 06:00:00 1970 + > Sun Jan 12 00:00:00 1997 + > +EOF + +./getdate >getdate-got <>getdate-got + +if cmp getdate-expected getdate-got >getdate.cmp; then :; else + LOGFILE=`pwd`/getdate.log + cat getdate.cmp >${LOGFILE} + echo "** expected: " >>${LOGFILE} + cat getdate-expected >>${LOGFILE} + echo "** got: " >>${LOGFILE} + cat getdate-got >>${LOGFILE} + echo "FAIL: getdate" | tee -a ${LOGFILE} + echo "Failed! See ${LOGFILE} for more!" >&2 + exit 1 +fi + +rm getdate-expected getdate-got getdate.cmp +exit 0 Index: lib/xtime.h =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/lib/xtime.h,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.2 diff -u -p -r1.1.1.1 -r1.1.1.2 --- lib/xtime.h 10 Aug 2001 09:43:20 -0000 1.1.1.1 +++ lib/xtime.h 26 Dec 2007 03:55:02 -0000 1.1.1.2 @@ -11,6 +11,8 @@ /* This file simply performs the include magic necessary for using time * functions */ +#ifndef XTIME_HEADER_INCLUDED +#define XTIME_HEADER_INCLUDED #ifdef vms # include @@ -55,3 +57,5 @@ extern long timezone; # endif /* !defined(HAVE_FTIME) && !defined(HAVE_TIMEZONE) */ #endif /* !vms */ + +#endif /* !XTIME_HEADER_INCLUDED */ Index: man/ChangeLog =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/man/ChangeLog,v retrieving revision 1.1.1.11 retrieving revision 1.1.1.12 diff -u -p -r1.1.1.11 -r1.1.1.12 --- man/ChangeLog 10 Jun 2004 19:05:38 -0000 1.1.1.11 +++ man/ChangeLog 26 Dec 2007 03:55:04 -0000 1.1.1.12 @@ -1,3 +1,7 @@ +2005-01-31 Derek Price + + * Makefile.am: Update copyright notices. + 2004-04-30 Derek Price First pass at closing issue #3 from cvshome.org. Index: man/Makefile.am =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/man/Makefile.am,v retrieving revision 1.1.1.3 retrieving revision 1.1.1.4 diff -u -p -r1.1.1.3 -r1.1.1.4 --- man/Makefile.am 10 Jun 2004 19:05:38 -0000 1.1.1.3 +++ man/Makefile.am 26 Dec 2007 03:55:04 -0000 1.1.1.4 @@ -1,8 +1,10 @@ ## Process this file with automake to produce Makefile.in # Makefile.am for GNU CVS man pages. -# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, -# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. +# +# Copyright (C) 1986-2005 The Free Software Foundation, Inc. +# +# Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , +# and others. # 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 Index: man/Makefile.in =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/man/Makefile.in,v retrieving revision 1.1.1.9 retrieving revision 1.1.1.10 diff -u -p -r1.1.1.9 -r1.1.1.10 --- man/Makefile.in 10 Jun 2004 19:05:38 -0000 1.1.1.9 +++ man/Makefile.in 26 Dec 2007 03:55:04 -0000 1.1.1.10 @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.7.9 from Makefile.am. +# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ -# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,9 +15,11 @@ @SET_MAKE@ # Makefile.am for GNU CVS man pages. -# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, -# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. +# +# Copyright (C) 1986-2005 The Free Software Foundation, Inc. +# +# Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , +# and others. # 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 @@ -28,7 +30,6 @@ # 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. - srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -36,7 +37,6 @@ 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 @@ -50,6 +50,24 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +subdir = man +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +man5dir = $(mandir)/man5 +am__installdirs = "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)" +man8dir = $(mandir)/man8 +NROFF = nroff +MANS = $(man_MANS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ @@ -119,6 +137,8 @@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ @@ -132,6 +152,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ +mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ @@ -139,36 +160,48 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ - +with_default_rsh = @with_default_rsh@ man_MANS = cvs.5 cvsbug.8 EXTRA_DIST = \ .cvsignore \ $(man_MANS) -subdir = man -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -DIST_SOURCES = - -NROFF = nroff -MANS = $(man_MANS) -DIST_COMMON = $(srcdir)/Makefile.in ChangeLog Makefile.am all: all-am .SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu man/Makefile -Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh uninstall-info-am: - -man5dir = $(mandir)/man5 install-man5: $(man5_MANS) $(man_MANS) @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(man5dir) + test -z "$(man5dir)" || $(mkdir_p) "$(DESTDIR)$(man5dir)" @list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ @@ -187,8 +220,8 @@ install-man5: $(man5_MANS) $(man_MANS) 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)$(man5dir)/$$inst"; \ - $(INSTALL_DATA) $$file $(DESTDIR)$(man5dir)/$$inst; \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst"; \ done uninstall-man5: @$(NORMAL_UNINSTALL) @@ -208,14 +241,12 @@ uninstall-man5: 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)$(man5dir)/$$inst"; \ - rm -f $(DESTDIR)$(man5dir)/$$inst; \ + echo " rm -f '$(DESTDIR)$(man5dir)/$$inst'"; \ + rm -f "$(DESTDIR)$(man5dir)/$$inst"; \ done - -man8dir = $(mandir)/man8 install-man8: $(man8_MANS) $(man_MANS) @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(man8dir) + test -z "$(man8dir)" || $(mkdir_p) "$(DESTDIR)$(man8dir)" @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ @@ -234,8 +265,8 @@ install-man8: $(man8_MANS) $(man_MANS) 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; \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst"; \ done uninstall-man8: @$(NORMAL_UNINSTALL) @@ -255,8 +286,8 @@ uninstall-man8: 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; \ + echo " rm -f '$(DESTDIR)$(man8dir)/$$inst'"; \ + rm -f "$(DESTDIR)$(man8dir)/$$inst"; \ done tags: TAGS TAGS: @@ -264,10 +295,6 @@ TAGS: ctags: CTAGS CTAGS: -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - -top_distdir = .. -distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ @@ -281,7 +308,7 @@ distdir: $(DISTFILES) dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ - $(mkinstalldirs) "$(distdir)$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ @@ -299,9 +326,10 @@ distdir: $(DISTFILES) check-am: all-am check: check-am all-am: Makefile $(MANS) - installdirs: - $(mkinstalldirs) $(DESTDIR)$(man5dir) $(DESTDIR)$(man8dir) + for dir in "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -321,7 +349,7 @@ mostlyclean-generic: clean-generic: distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -338,6 +366,8 @@ dvi: dvi-am dvi-am: +html: html-am + info: info-am info-am: @@ -373,8 +403,8 @@ uninstall-am: uninstall-info-am uninstal uninstall-man: uninstall-man5 uninstall-man8 .PHONY: all all-am check check-am clean clean-generic distclean \ - distclean-generic distdir dvi dvi-am info info-am install \ - install-am install-data install-data-am install-exec \ + distclean-generic distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-man5 install-man8 install-strip installcheck \ installcheck-am installdirs maintainer-clean \ Index: man/cvs.1 =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/man/cvs.1,v retrieving revision 1.22 retrieving revision 1.23 diff -u -p -r1.22 -r1.23 --- man/cvs.1 28 Jul 2005 13:53:45 -0000 1.22 +++ man/cvs.1 7 Jan 2008 04:25:18 -0000 1.23 @@ -1,3 +1,4 @@ +\fBimport\fR. .\" $FreeBSD$ .de Id .ds Rv \\$3 @@ -519,8 +520,8 @@ is available with these commands: Alter the default processing of keywords. The \fB\-k\fP option is available with the -.BR add ", " checkout ", " diff ", " export ", " -.BR rdiff ", and " update +.BR add ", " checkout ", " diff ", " rdiff ", " export ", and " +BR update commands. Your \fIkflag\fP specification is ``sticky'' when you use it to create a private copy of a source file; that is, when you use this option with the \fBcheckout\fP or \fBupdate\fP commands, @@ -550,7 +551,7 @@ run any program. (A program can be specified to run on each of these activities, in the modules database; this option bypasses it.) Available with the -.BR checkout ", " commit ", " export ", and " +.BR checkout ", " export ", and " .B rtag commands. .I Warning: @@ -621,6 +622,9 @@ continues to use it on future \fBupdate\ otherwise. .I tag can be either a symbolic or numeric tag. +When a command expects a specific revision, +the name of a branch is interpreted as the most recent +revision on that branch. Specifying the .B \-q global option along with the @@ -630,9 +634,9 @@ command option is often useful, to suppr file does not contain the specified tag. .B \-r is available with the -.BR checkout ", " commit ", " diff ", " -.BR history ", " export ", " -.BR rdiff ", " rtag ", and " update +.BR annotate ", " checkout ", " +.BR commit ", " diff ", " history ", " export ", " rdiff ", " +.BR rtag ", and " update commands. .I Warning: this is not the same @@ -887,6 +891,9 @@ options. (If you get a working file usi corresponding tag, date, or \fIkflag\fP and continues using it on future updates; use the \fB\-A\fP option to make \fBcvs\fP forget these specifications, and retrieve the ``head'' version of the file). +Does not reset sticky +.B \-k +options on modified files. .SP The .BI \-j " branch" @@ -945,7 +952,7 @@ the .B \-s option within the modules file. .TP -\fBcommit\fP [\fB\-lnR\fP] [\fB\-m\fP '\fIlog_message\fP' | \fB\-F\fP \fIfile\fP] [\fB\-r\fP \fIrevision\fP] [\fIfiles.\|.\|.\fP] +\fBcommit\fP [\fB\-lR\fP] [\fB\-m\fP '\fIlog_message\fP' | \fB\-F\fP \fIfile\fP] [\fB\-r\fP \fIrevision\fP] [\fIfiles.\|.\|.\fP] .I Requires: working directory, repository. .br @@ -1354,9 +1361,12 @@ identify the collection of source. \fIv entire branch (e.g., for .` "1.1.1"). You must also specify at -least one \fIreleasetag\fP to identify the files at the leaves created -each time you execute +least one \fIreleasetag\fR to uniquely identify the files at +the leaves created each time you execute .` "cvs import". +The +\fIreleasetag\fR should be new, not previously existing in the +repository file, and uniquely identify the imported release. .SP One of the standard .B cvs @@ -1762,8 +1772,8 @@ to indicate the status of the file: .TP 1i \fBU\fP \fIfile\fP The file was brought \fIup to date\fP with respect to the repository. -This is done for any file that exists in the repository but not in -your source, and for files that you haven't changed but are not the most +This is done for any file that exists in the repository but not in your +working directory, and for files that you haven't changed but are not the most recent versions available in the repository. .TP 1i \fBP\fP \fIfile\fP @@ -2186,8 +2196,7 @@ command or it may be available as cvs.ps For CVS updates, more information on documentation, software related to CVS, development of CVS, and more, see: .in +1i -.B http://cvshome.org -.B http://www.loria.fr/~molli/cvs-index.html +.B http://cvs.nongnu.org .in -1i .SP .BR ci ( 1 ), Index: src/ChangeLog =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/ChangeLog,v retrieving revision 1.1.1.16 retrieving revision 1.1.1.17 diff -u -p -r1.1.1.16 -r1.1.1.17 --- src/ChangeLog 10 Jun 2004 19:05:37 -0000 1.1.1.16 +++ src/ChangeLog 26 Dec 2007 03:55:02 -0000 1.1.1.17 @@ -1,3 +1,1075 @@ +2006-06-08 Derek Price + + * sanity.sh (conflicts4): Test that the client honors Empty-conflicts. + + * server.c (requests): Add "Empty-conflicts" marker. + * client.c (send_fileproc): Send contents of all files with conflicts + unless the server can handle the conflict marker in the Entry. + + * sanity.sh (conflicts4): New tests. + (Original patch from Mark D. Baushke .) + +2006-06-07 Mark D. Baushke + + * modules.c (my_module): Remove unused variable xvalue. + [Fixes NetBSD coverity cid-705.] + +2006-05-31 Mark D. Baushke + + * add.c (add): Fix memory leak. + [Fixes NetBSD coverity cid-3751.] + (add_directory): Fix memory leak. + [Fixes NetBSD coverity cid-3640.] + + * checkin.c (Checkin): Avoid possible NULL dereference. + [Fixes NetBSD coverity cid-2425.] + + * client.c (auth_server): Fix memory leak. + [Fixes NetBSD coverity cid-3404.] + + * commit.c (remove_file): Fix memory leak. + [Fixes NetBSD coverity cid-3752.] + + * rcs.c (RCS_checkin): Add assert (tip). + [Fixes NetBSD coverity cid-2424.] + +2006-05-26 Mark D. Baushke + + * add.c (add): Do not leak memory. + [Fixes NetBSD coverity cid-2199.] + + * edit.c (onoff_fileproc): Do not leak memory. + [Fixes NetBSD coverity cid-2201.] + + * edit.c (onoff_filesdoneproc): Do not leak memory. + [Fixes NetBSD coverity cid-2202.] + + * lock.c (readers_exist): Add assert (lockdir). + [Fixes NetBSD coverity cid-2411.] + + * rcs.c (RCS_findlock_or_tip): Do not leak memory. + [Fixes NetBSD coverity cid-2198.] + + * rcs.c (RCS_getdate): Avoid possible NULL dereference. + [Fixes NetBSD coverity cid-2412.] + + * server.c (serve_sticky): Do not leak file descriptors. + [Fixes NetBSD coverity cid-2197.] + + * server.c (do_cvs_command): Do not leak memory. + [Fixes NetBSD coverity cid-2204.] + + * tag.c (add_to_val_tags): Do not leak memory. + [Fixes NetBSD coverity cid-2071.] + +2006-05-25 Derek Price + + * client.c (start_rsh_server): Default rsh client to RSH_DFLT. Remove + verbose comment attempting to justify the previous default. + +2006-05-24 Larry Jones + + * sanity.sh: Add -v|--verbose option to echo test names. Clean + up help message. + Remove val-tags files for cleanup instead of truncating since the + truncation code doesn't work right on Solaris. Always use -f when + removing val-tags. + +2006-05-22 Derek Price + + * rcs.c (RCS_reparsercsfile, RCS_fully_parse, RCS_checkout, RCS_deltas, + RCS_getdeltatext, RCS_copydeltas): Verify input revision numbers. + (rcs6): Update to compensate. + + * sanity.sh (rcs6): New test. + +2006-05-16 Derek Price + + * main.c: Update copyright for 2006. + +2006-05-12 Mark D. Baushke + + * log.c (log_expand_revlist): Add assert (r->first). It should + only be possible for both r->first == NULL && r->last == NULL + which would have been handled. + [Fixes NetBSD coverity cid-1063.] + + * server.c (do_cvs_command): Protect close (dev_null_fd) against + invalid fd value in error_exit. + [Fixes NetBSD coverity cid-1307.] + + * rcs.c (RCS_isdead): Assert that the first argument is not NULL. + [Fixes NetBSD coverity cid-1058.] + + * commit.c (checkaddfile): Do not dereference NULL on call to + error(). + [Fixes NetBSD coverity cid-1061.] + + * log.c (cvslog): Assert p->start && p->end instead of masking the + problem. + * server.c (server_updated): Assert findnode_fn results instead of + masking the problem. + + * add.c (add_directory): Revert previous change. The xstrdup() + function already deals a NULL argument. + * client.c (handle_mt): Ditto. + * entries.c (Entnode_Create): Ditto. + (Entries_Open): Ditto. + * logmsg.c (fmt_proc): Ditto. + * vers_ts.c (Version_TS): Ditto. + +2006-05-11 Mark D. Baushke + + * add.c (add_directory): Protect tag from NULL dereference. + [Fixes NetBSD cid-1054.] + + * client.c (handle_mt): Deal with missing text argument. + [Fixes NetBSD cid-924.] + + * entries.c (Entnode_Create): Protect date, tag and ts_conflict + from possible NULL dereference. + [Fixes NetBSD coverity cid-994, cid-995, cid-1055, cid-1057.] + + * entries.c (Entries_Open): Protect dirtag and dirdate from + possible NULL dereference. + [Fixes NetBSD coverity cid-996.] + + * log.c (cvslog): Validate start and end args to + date_to_internet(). + [Fixes NetBSD coverity cid-2427 and cid-2428.] + + * logmsg.c (fmt_proc): Protect li->tag from NULL dereference. + [Fixes NetBSD coverity cid-997.] + + * vers_ts.c (Version_TS): Protect tag and vers_ts->tag from NULL + dereference. + [Fixes NetBSD coverity cid-1053.] + +2006-05-04 Mark D. Baushke + + * filesubr.c (cvs_temp_file): Avoid keeping pointers to free()'d + storage laying around. + * commit.c (commit): Handle possible NULL filename values + returned from cvs_temp_file(). + * filesubr.c (cvs_temp_name): Ditto. + * import.c (import): Ditto. + * login.c (password_entry_operation): Ditto. + * logmsg.c (do_verify): Ditto. + * patch.c (patch_fileproc): Ditto. + [Fixes NetBSD coverity cid-2545.] + + * buffer.c (packetizing_buffer_output): Initialize outdata. + [Fixes NetBSD coverity cid-2474.] + + * server.c (server_updated): Check for NULL return from + findnode_fn(). [Fixes NetBSD coverity cid-1352.] + +2006-04-19 Larry Jones + + * history.c (sort_order): Back out previous change - not needed. + +2006-04-15 Larry Jones + + * history.c (sort_order): Add prototype. + * server.c (template_proc): Add prototype and make args const. + * update.c (RegisterMerge): Make static to match prototype. + +2006-04-07 Derek Price + + * client.c (strto_file_size): New function which checks for errors when + parsing protocol input. + (read_counted_file, update_entries, handle_mbinary): Use new function. + Remove FIXME. + (Thanks to a report from Brendan Harrison + .) + + * client.c (send_a_repository): Add assertion. + (Thanks to an incorrect report from Brendan Harrison + .) + +2006-04-06 Derek Price + + * filesubr.c (last_component, expand_wild), rcs.c (RCS_deltas, + RCS_rewrite), server.c (server_checked_in): Add assertions. + (Thanks to an incorrect report from Brendan Harrison + .) + +2006-03-31 Mark D. Baushke + + * cvsrc.c (read_cvsrc): Deal with \r\n (DOS) line endings in + .cvsrc files. + +2006-03-07 Derek Price + + * tag.c (rtag_proc): Search the Attic when -F is used. + * sanity.sh (tests): Run death-rtag. + (death-rtag): Expect success. + + * sanity.sh (death-rtag): Add failing force tag move test. + +2006-03-06 Derek Price + + * tag.c (rtag_proc): Always search in the attic when -r is used. + + * sanity.sh (death-rtag): New test. + (Original report from C. Michael Pilato .) + +2006-03-01 Derek Price + + * sanity.sh: Set MALLOC_CHECK_ in hopes of exposing common memory + errors when CVS is linked with glibc 2.x. + +2006-02-27 Derek Price + + * lock.c (internal_lock): Back out previous change, we don't change + user visible output on stable unless absolutely necessary. + + * lock.c (internal_lock): Improve error message. + +2006-02-26 Derek Price + + * client.c (call_in_directory): Remove unneeded code. + * sanity.sh (toplevel-12): Compensate by failing to expect a redundant + error message. + +2006-02-24 Mark D. Baushke + + * client.c (gzip_level): Move to... + * main.c (gzip_level): ...here. + (main): Revert previous change in '-z' argument processing and + remove CLIENT_SUPPORT ifdef/endif. + * sanity.h (crerepos-6a): Deal with --disable-client output. + + * main.c (main): Validate the gzip compression level for + --disable-client configurations. + +2006-02-13 Derek Price + + * server.c (do_cvs_command): Skip server_cleanup in the child process. + + * sanity.sh (sshstdio-6): Rewrite using more portable sed script. + +2006-02-02 Derek Price + + * sanity.sh (sshstdio): Attempt to ignore spurious SSH output. + + * main.c (main), release.c (release), server.c (do_cvs_command): Always + call the cleanup hooks before exit. + +2006-02-01 Derek Price + + * tag.c (add_to_val_tags): When a tag turns out to exist in the db when + it isn't expected, release the lock. + + * history.c (save_user, save_file, save_mod, read_hrecs): Avoid + overflow. + +2006-01-30 Derek Price + + * server.c (do_cvs_command): Set flow control pipe to blocking mode + before waiting for it to close. + (set_block_fd): New function. + (Original patch from Garrett Rooney .) + +2006-01-13 Larry Jones + + * mkmodules.c (config_contents): Change SystemAuth to yes to match + the default value. Add missing newline in RereadLogAfterVerify. + +2006-01-09 Larry Jones + + * commit.c (remove_file): Record correct revision in history file. + (Reported by Chris Reed .) + +2005-12-07 Derek Price + + * client.c (start_server), root.c (method_names), root.h (CVSmethod): + Handle :extssh: as a kindness to Eclipse users. + (Suggestion from Joseph P. Skudlarek .) + +2005-12-06 Mark D. Baushke + + * buffer.c (stdio_buffer_shutdown): No longer assert() the + fstat(). Use error (0, ...) instead of error (1, ...) to avoid + infinite loops. (patch #4678) + Patch adapted from "Allan L. Bazinet" + +2005-11-10 Larry Jones + + * commit.c (commit): Complain about obsolete -n option if not in + server mode. + +2005-11-09 Derek Price + + * sanity.sh (pserver-4.2): Accept a "no such sytem user" message when + a root attempt is made. + +2005-09-30 Larry Jones + + * expand_path.c (expand_path): Fix memory leaks. + +2005-09-29 Paul Eggert + Derek Price + + * client.c (handle_m, handle_e): Remove incomplete workaround for + O_NONBLOCK problem; no longer needed because of the fix below. + (start_rsh_server): We need the O_NONBLOCK fix, so pass 'true' to + piped_child to enable the workaround. + * cvs.h (piped_child): New bool argument saying whether O_NONBLOCK + fix is needed. All uses changed. + * run.c (work_around_openssh_glitch): New function. + (piped_child): Use it if the fix is requested. Avoid call call to + vfork with undefined behavior. + +2005-09-26 Conrad T. Pino + + * rcs.c: Use "#ifdef HAVE_FSYNC" just like every where else. + +2005-09-25 Derek Price + + * rcs.c (rcs_internal_unlockfile): Fsync files before renaming them. + Patch from Rahul Bhargava . + +2005-09-24 Derek Price + + * update.c (merge_file): Check for RCS_checkout errors. + +2005-09-23 Larry Jones + + * checkout.c (export_usage): Note that -r requires a tag. + +2005-09-22 Larry Jones + + * patch.c (patch_usage): Document -k option. + +2005-09-22 Derek Price + + * classify.c (Classify_File): If a file had a conflict and the + timestamp hasn't changed, it still has a conflict. Add comment about + how T_MODIFIED could later turn out to have conflict markers and why + it should not be checked in this function. + * client.c (send_fileproc): Don't send contents for files known to have + conflicts unless this is for `cvs diff'. + * commit.c (check_fileproc): T_CONFLICT should be handled like + T_MODIFIED, since force could be requested. Simplify logic since + T_CONFLICT can now be trusted. + * cvs.h (file_has_conflict): Remove proto. + * rcs.c (RCS_Checkout): Comment noexec behavior in header block. + * server.c (serve_unchanged, serve_is_modified): Handle conflicts. + * status.c (status_fileproc): Trust T_CONFLICT to simplify. + * subr.c (file_has_conflict): Removed. + * update.c (update_fileproc): Trust T_CONFLICT. + (RegisterMerge): New function factored from... + (merge_file, join_file): ...these two functions. + * vers_ts.c (time_stamp_server): Handle = conflict timestamps in server + entdata. + * sanity.sh (files-12): Account for slight behavior improvement. + (status, conflicts, mwrap): Account for corrected behavior. + (join-readonly-conflict-10): Correct comment. + (binfiles-con1b): New test for correct behavior. + +2005-09-19 Derek Price + + * sanity.sh (modules5-8): Rename... + (modules5-8r): ...to this and comment Mac OS X failure. + Comment Solaris 9 failure below with a `FIXME?' tag. + + * sanity.sh: Remove previous hack in favor of setting TESTDIR on + Solaris (and Mac OS X) until problem is solved correctly. + +2005-09-15 Derek Price + + * sanity.sh: Use /bin/pwd to verify current dir since Solaris 9 is + sometimes resolving symlinked paths. + +2005-09-14 Derek Price + + * edit.c (edit_usage, unedit_usage, editors_usage), watch.c + (watch_usage, watchers_usage): Add quotes and reword for clarity and + consistency. + + * edit.c (edit_usage): Add missing syntax. Reword description for + clarity. Mention default behavior. + +2005-09-13 Derek Price + + * sanity.sh: Split $username into $username & $username8. Rename + $author as $anyusername. + +2005-09-12 Derek Price + + * sanity.sh (binfiles-con1b): Back out accidental addition. + + * sanity.sh (username): Cut $username down to 8 characters when longer, + since that is all that appears in output. + +2005-09-07 Derek Price + + Close . + * rcs.c (RCS_parse): Free variable *after* using it for the last time. + +2005-09-06 Derek Price + + * rcs.c (RCS_putdtree): Remove unused variable. + +2005-09-06 Mark D. Baushke + + Close . + * rcs.c (RCS_putdtree): Avoid stack overflow which may be + possible with excessive recursive calls to RCS_putdtree(). + (Patch from Serg Masyutin.) + +2005-09-03 Derek Price + + * add.c (add_usage): Standardize usage message somewhat. + +2005-09-02 Larry Jones + + * commit.c (checkaddfile): Improve error messages for lock_RCS failure. + * release.c (release): Improve error message for pclose failure. + + * root.h (struct cvsroot_s): Always declare isremote to simplify + other code. Simplify referencing code. + * root.c (new_cvsroot_t): Always initialize isremote. + * server.h: Always declare server_active to simplify other code. + Simplify referencing code. + * server.c: Always define server_active. + +2005-09-01 Derek Price + + * main.c, wrapper.c: Update links. + +2005-09-01 Derek Price + + * recurse.c: Update bug report email address. + +2005-08-30 Larry Jones + + * import.c (import_descend): Lock repository directory during import. + +2005-07-12 Derek Price + + * buffer.c, buffer.h, client.h, expand_path.c, history.c, myndbm.h, + release.c: Add copyright notices. + +2005-07-11 Derek Price + + * buffer.c, buffer.h, client.h, expand_path.c, history.c, myndbm.h, + release.c: Update license notices. + +2005-06-22 Larry Jones + + * vers_ts (Version_TS): Don't allow command line keyword expansion + modes to override binary mode. + * sanity.sh (): Tests for the above. + (Merged from trunk.) + +2005-06-06 Conrad T. Pino + + * cvs.h: Reverse patch committed 2005-05-27 by Conrad T. Pino. + * run.c: Reverse patch committed 2005-05-27 by Conrad T. Pino. + +2005-06-02 Derek Price + + * zlib.c (compress_buffer_shutdown_input): Don't attempt to read EOF + from the client during shutdown. It might never be sent. + * sanity.sh (abspath2): Test for this. + +2005-05-31 Derek Price + for Alexander Taler + + * rcscmds.c: Change type of call_diff_argc_allocated from int to + size_t, to match the prototype of run_add_arg_p(). This fixes a + bus error in OpenBSD 3.6 sparc64. + +2005-05-27 Conrad T. Pino + + * cvs.h: Replace "run_arg" function with "#define run_arg run_add_arg", + add "run_add_arg" prototype, change "piped_child" prototype to be same + as feature branch to reflect "(os2,src,windows-NT)/run.c" changes. + * run.c: Remove "run_arg" to synchronize with "../windows-NT/run.c". + Function "run_add_arg" scope was "static" and is now "extern" scope. + Synchronize "piped_child" function arguments with feature branch. + +2005-05-27 Derek Price + + * client.c (send_arg): Make arg const. + (send_option_string): Rename to... + (send_options): ...this and accept argc/argv in place of string. + * client.h: Update protos to match the changes to client.c. + * cvs.h (RCS_exec_rcsdiff, diff_exec): Update protos. + (run_add_arg_p, run_arg_free_p): New protos. + * diff.c (opts, opts_allocated): Replace with... + (diff_argv, diff_argc, diff_arg_allocated): ...these. + (add_diff_args): New convenience function. + (diff): Use new constructs and APIs. + * patch.c (patch_fileproc, RCS_checkin, RCS_delete_revs), rcscmds.c + (call_diff_add_arg, call_diff_setup, RCS_merge, RCS_exec_rcsdiff, + diff_exec, RCS_output_diff_options), update.c (patch_file): Use new + APIs. + * run.c (run_add_arg_p, run_arg_free_p): New functions. + (run_argc_allocated): Make size_t. + (run_setup, run_add_arg): Use new functions. + * sanity.sh: Accomodate above changes. + (rcslib-diffrgx-3): Slip in test for space splitting. + +2005-05-02 Derek Price + + Remove unnecessary level of indirection. + * lock.c (L_HISTORY_LOCK, L_VAL_TAGS_LOCK): Remove macros. + (internal_lock, internal_clear_lock): Accept lock as argument. + (history_lock, clear_history_lock, val_tags_lock, clear_val_tags_lock): + Replace old macro arg with an actual lock pointer. + +2005-05-02 Derek Price + + * lock.c (internal_lock, internal_clear_lock): Add protos. + (history_lock, val_tags_lock): Return the chartered true/false status. + +2005-05-02 Derek Price + + * cvs.h (CVSHISTLCK): Rename macro to... + (CVSHISTORYLCK): ...this. + (CVSVALTAGSLCK): New macro. + (val_tags_lock, clear_val_tags_lock): New functions. + * lock.c (global_val_tags_lock): New global. + (Lock_Cleanup): Clean up after val-tags lock if necessary. + (L_HISTORY_LOCK, L_VAL_TAGS_LOCK): New local macros. + (internal_lock, internal_clear_lock, val_tags_lock, + clear_val_tags_lock): New functions. + (history_lock, clear_history_lock): Use new internal functions. + * tag.c (is_in_val_tags, add_to_val_tags): New functions using the + write-lock for val-tags and factored from... + (tag_check_valid): ...this function. + * sanity.sh (lockfiles-22): Add val-tags lock test. + +2005-04-28 Derek Price + + * cvs.h (history_lock, clear_history_lock): New protos. + * lock.c (struct lock): Add lockdirname. + (global_history_lock): New global. + (global_read_lock): Initialize. + (lock_name): Handle const args. + (lock_simple_remove): Factor out code in favor of clear_lock call. + (set_lock): Handle variable lockdirname. + (lock_filesdoneproc): Set new lockdirname. + (history_lock, clear_history_lock): New functions. + (clear_lock): Avoid segfault on missing lock. + (Lock_Cleanup): Clean up history locks when necessary. + * history.c (history_write): Use new lock. + * sanity.sh (lockfiles-20): Test new lock. + +2005-04-28 Derek Price + + * sanity.sh (lockfiles): Port some locking tests over from 1.12.x. + +2005-04-28 Derek Price + + * lock.c (clear_lock): Improve comment. + +2005-04-28 Derek Price + + * lock.c (struct lock): Store lockdir name. + (masterlock): Remove global. + (remove_lock_files, clear_lock, set_lock): Update to compensate. + +2005-04-20 Derek Price + + * sanity.sh (rcs5): Minor cosmetic change. + +2005-04-20 Derek Price + + * sanity.sh (tests): Add rcs4. + (rcs5): Add comments. + +2005-04-20 Derek Price + + * rcs.c (expand_keywords): Avoid buffer overflow. + (Original patch from Stewart Brodie .) + + * sanity.sh (rcs5): New tests for the above. + +2005-03-17 Derek Price + + * login.c (password_entry_parseline): Avoid using uninitialized + variable. + * rcs.c (RCS_deltas): Avoid buffer overflow. + (RCS_checkout): Avoid using uninitialized loglen. + * patch.c (patch_fileproc): Free original pointer, not one that may + have been incremented. + (Thanks to report from Alen Zukich .) + +2005-03-17 Derek Price + + * commit.c (checkaddfile): Avoid dereferencing a NULL pointer in + response to a rare error. + * admin.c (admin_fileproc), log.c (log_expand_revlist), mkmodules.c + (checkout_file), rcs.c (RCS_getdate, RCS_deltas, RCS_findlock_or_tip, + RCS_tag2rev): Avoid dereferencing NULL pointer. + (Thanks to report from Alen Zukich .) + +2005-03-17 Derek Price + + * rcs.c (RCS_reparsercsfile): Avoid memory leak. + (Thanks to report from Alen Zukich .) + +2005-03-17 Derek Price + + * log.c (log_expand_revlist): Suppress message and not error handling + when really_quiet. + +2005-03-17 Derek Price + + * client.c (call_in_directory): Put function call after var decls. + +2005-03-16 Derek Price + + * client.c (call_in_directory), commit.c (commit_filesdoneproc), log.c + (log_expand_revlist, log_version), logmsg.c (logfile_write), modules + (my_module), no_diff.c (No_Difference), parseinfo.c (Parse_Info), rcs.c + (RCS_deltas, RCS_checkin, RCS_addbranch, do_locks, do_symbols), + rcscmds.c (RCS_merge), root.c (parse_cvsroot, normalize_cvsroot), + update.c (merge_file): Verify assumptions via assertions. + (Thanks to (probably) incorrect reports from Alen Zukich + .) + +2005-03-16 Derek Price + + * server.c (create_adm_p, serve_entry), tag.c (rtag_proc): Avoid memory + leaks. + (Thanks to report from Alen Zukich .) + +2005-03-15 Mark D. Baushke + + * history.c (select_hrec): Avoid possible memory leak. + +2005-03-15 Derek Price + + * patch.c (patch_proc): Avoid memory leak. + (Thanks to report from Alen Zukich .) + +2005-03-11 Mark D. Baushke + + * modules.c (my_module): Protect against free (NULL) code path. + +2005-03-11 Derek Price + + * annotate.c (rannotate_proc), fileattr.c (fileattr_write), rcs.c + (RCS_deltas), server.c (check_repository_password), update.c (update): + Avoid memory leaks. + (Thanks to report from Alen Zukich .) + +2005-03-09 Derek Price + + * add.c (add, add_directory), buffer.c (allocate_buffer_datas), + client.c (update_entries), commit.c (checkaddfile), entries.c + (Entries_Open), fileattr.c (fileattr_read), ignore.c (ign_add), + import.c (import), main.c (main), parseinfo.c (parse_config), rcs.c + (RCS_reparsercsfile, RCS_getbranchpoint, RCS_checkout, + RCS_delete_revs, apply_rcs_changes): Avoid memory leaks. + (Thanks to report from Alen Zukich .) + + * hardlink.c, hardlink.h: Avoid compiling entire contents of these + files w/o preserve permissions support. + +2005-03-09 Mark D. Baushke + + * history.c (history, save_file): Cleanup the API to match the + comments. + +2005-02-27 Jim Meyering + + * login.c (password_entry_operation): Exit nonzero when + failing to close a just-appended-to .cvspass file. + +2005-02-26 Larry Jones + + * release.c (release): Remove unneeded code. + +2005-02-22 Derek Price + + * edit.c: Load watch settings before setting new ones with + `cvs watch on/off'. + (Original patch from Jim Hyslop .) + + * sanity.sh (watch6): New tests for same. + (Outline from Jim Hyslop .) + +2005-02-21 Mark D. Baushke + + * import.c (import): Avoid using assert with side effects it may + be configured away using NDEBUG. + (Patch from Frank Hemer .) + +2005-02-08 Derek Price + + * build_src.com: Build stack.c on VMS. + (Suggestion from Piet Schuermans .) + +2005-02-01 Larry Jones + + * log.c (log_fileproc, log_expand_revlist): Add support for BASE tag. + * sanity.sh (log): New tests for above. + +2005-01-31 Derek Price + + * main.c: Update year in copyright notice to match GNU standards. + * sanity.sh (version-1): Update to match. + +2005-01-31 Derek Price + + * main.c: Rephrase --version message. + * sanity.sh (version-1): Update to match. + +2005-01-31 Derek Price + + * Makefile.am, add.c, admin.c, annotate.c, checkin.c, checkout.c, + classify.c, commit.c, create_adm.c, cvs.h, cvsrc.c, diff.c, entries.c, + find_names.c, hash.c, hash.h, history.h, import.c, lock.c, log.c, + login.c, logmsg.c, main.c, mkmodules.c, modules.c, myndbm.c, no_diff.c, + parseinfo.c, patch.c, rcs.c, rcs.h, rcscmds.c, recurse.c, remove.c, + repos.c, root.c, root.h, server.h, stack.c, stack.h, status.c, subr.c, + tag.c, update.c, vers_ts.c, version.c: Update copyright notices. + +2005-01-29 Derek Price + + * log.c (log_usage): Add note about using -S with revision info + supression and selection. + (Suggestion from Dan Peterson .) + +2004-12-19 Larry Jones + + * expand_path.c (expand_path): Rewrite using offsets instead of + pointers to simplify and avoid reallocation bugs. + (Inspired by Jeremy Bopp .) + +2004-12-09 Derek Price + + * sanity.sh (tests): Add modules7. + +2004-12-09 Derek Price + + * sanity.sh (modules7): New test group. + (Based on a patch from Mark D. Baushke , based on a + report from Richard Verhoeven .) + +2004-11-18 Mark D. Baushke + + * checkout.c (checkout_proc): Passing the repository to + tag_check_valid seems to stop the assertion failure in recurse.c + do_recursion. + * sanity.sh (basic2-21a): Removed. + (basic2-21b): Fixed. + +2004-11-17 Mark D. Baushke + + * sanity.sh (basic2-21a): The val-tags file should have + at least 'rtagged-by-head y' in it. + (basic2-21b): New test showing a cvs bug when val-tags + is not properly updated. + (Report from "John Elgin" .) + +2004-11-17 Mark D. Baushke + + * client.c (handle_m, handle_e): Winsock is returning + SOCK_ERRNO == WSAENOTSOCK for select() problems and not + setting errno. Do not bother with printing an error from a + select() that is not returning an non-zero errno. + (Report from Conrad T. Pino .) + +2004-11-10 Derek Price + + * sanity.sh: Maintain pass/skip/warn status and output at end. + (usage): Note new functionality of -e. + (warn): New function. + (verify_tmp_empty): Warn instead of failing. Delete turds if warn() + doesn't exit. + +2004-11-10 Derek Price + + * sanity.sh (verify_tmp_empty): New function. + (dotest_internal_*): Call verify_tmp_empty as needed. + +2004-11-09 Mark D. Baushke + + * sanity.sh: Backport find_tool changes from 1.12.9.1. + (SEARCHPATH): New list of PATH directories to search. + (Which): Use $SEARCHPATH. Support -a switch. + (badtools,set_bad_tool,is_bad_tool): Keep track of tools that do + not work for us. + (version_test): Obtain the version of tools under test if + possible. + (tool_find): Rewrite. API changed to allow a list of + tests to be used against a list of possible command names found on + the SEARCHPATH. + (id_tool_test): Check that 'id -u' and 'id -un' work. + (expr_tooltest1): Check for NextStep 3.3 expr bug. + (expr_tooltest2): Check for SunOS expr multi-line pattern bug. + (expr_create_bar): Create a test file for expr testing. + (expr_tooltest3): Use it and test for big multi-line identity + matches. + (expr_set_ENDANCHOR): Find and set the right value for ENDANCHOR. + (expr_set_DOTSTAR): Find and set the right value for DOTSTAR. + (expr_tooltest_DOTSTAR): Ensure that DOTSTAR works with big + matches. + (tr_tooltest1): Verify that tr handles NUL bytes. + (awk_tooltest1): Verify that awk the BEGIN clause works properly. + (awk_tooltest2): Verify that print %c format item works properly. + +2004-11-02 Mark D. Baushke + + * filesubr.c (MAXSIZE): New macro. + (xreadlink): Ensure initial buffer size does not exceed MAXSIZE. + Avoid cast. If readlink fails with buffer size just under MAXSIZE, + try again with MAXSIZE. + +2004-11-02 Mark D. Baushke + + * filesubr.c (xreadlink): AIX and HP-UX readlink() returns ERANGE + when there is not enough room in the buffer. + +2004-11-01 Derek Price + + * sanity.sh (rcslib): Fix typo in path. + +2004-11-01 Derek Price + + * sanity.sh (rcslib): Test a link to a path longer than 128 + characters. + +2004-10-29 Derek Price + + * filesubr.c (xreadlink): Make sure allocation is tried once at the + maximum buffer size. Protect against overflow. + +2004-10-29 Mark D. Baushke + + * filesubr.c (SIZE_MAX, SSIZE_MAX): Use #include "xsize.h" instead. + (xreadlink): Use xrealloc instead of xmalloc/free. + +2004-10-29 Mark D. Baushke + + * filesubr.c (SIZE_MAX, SSIZE_MAX): New constants. + (xreadlink): Deal with symlinks longer than 127 bytes. + (Problem reported as issue 190 by Gottfried Ganssauge + .) + +2004-10-28 Mark D. Baushke + + * release.c (release): Allow builds of cvs with --disable-server + --disable-client both used for local installation configuration. + * root.c (Name_Root): Ditto. + * update.c (checkout_file): Ditto. + (Problem reported by Jean Olivier Caron .) + +2004-10-27 Mark D. Baushke + + * cvs.h (RCS_FLAGS_USETIME): New flag. + * rcs.c (RCS_checkin): Add citime argument. + * rcs.h (RCS_checkin): Ditto. + * checkin.c (Checkin): Pass new RCS_checkin argument. + * commit.c (remove_file, checkaddfile): Ditto. + * import.c (add_rev): Ditto. + + * sanity.sh (tagdate): Delete tagdate-19b as an incorrect test. + +2004-10-27 Mark D. Baushke + + * sanity.sh (tagdate): Provide more output. + +2004-10-26 Mark D. Baushke + + * commit.c (checkaddfile): Create a dead version for a new file + added to a branch. Fixes FIXCVS for tagdate tests. + * sanity.sh (tagdate): Update to expect correct results. + (death2, branch-after-import, join, ignore-on-branch): Ditto. + +2004-10-26 Derek Price + + * client.c (connect_to_gserver): Avoid truncating error messages from + the GSSAPI server. + (Report from Dan Peterson .) + +2004-10-26 Derek Price + + * sanity.sh (import-quirks): Test an even branch number. + +2004-10-25 Derek Price + + * import.c (import): Repair regex for regressions introduced in last + commit. + * sanity.sh (import-quirks): Test a few branch numbers import shouldn't + have a problem with. + +2004-10-25 Derek Price + + * import.c (import): Anchor and simplify branch verification regex. + * sanity.sh (import-quirks): Test another pattern that should fail. + +2004-10-25 Mark D. Baushke + + * sanity.sh (tagdate): Added some additional tests and FIXCVS + comments for dealing properly with a 'cvs add' of a file to + a branch that already exists on the mainline. + (Problem reported by Renny Barrett .) + + * sanity.sh (getrlogdate): New shell function. + (tagdate-{13,14,16}): Use it to avoid 'sleep 60' by using + the exact 1.1.4.1 timestamp for tagdate-14 and tagdate-16. + +2004-10-22 Mark D. Baushke + + * sanity.sh (tagdate): Fix typo. + +2004-10-19 Derek Price + + * add.c (add): Avoid attempting to resurrect a dead rev 1.1. + * sanity.sh (resurrection): Add test for the above. + (Report from Dan Peterson .) + +2004-10-14 Derek Price + + * import.c (import): Verify branch specifications more thoroughly. + * sanity.sh (importb): Adapt to new error message. + (import-quirks): New test. + +2004-10-04 Derek Price + + * cvs.h (CVSROOT_DFLT): Undef rather than defining to NULL. + * main.c (main): Untangle parsing of CVSROOT, eliminating several + variables in the process. Simplify xmalloc/sprintf with asnprintf. + +2004-10-01 Mark D. Baushke + + * main.c (main): Initialize CVSroot before it is used. + (Report and patch by Martin Neitzel .) + * sanity.sh (status): Test it. + +2004-09-25 Mark D. Baushke + + * sanity.sh (parseroot2): Correct two test names. Restore CVSROOT. + + * sanity.sh (parseroot2): Expand dokeep inline. + +2004-09-24 Derek Price + + * sanity.sh (tests): Add parseroot2. + +2004-09-24 Derek Price + + * sanity.sh (parseroot2): New test for root parsing consistency. + (Original patch from Alexander Taler .) + + * cvs.h (Name_Root, free_cvsroot_t, parse_cvsroot, local_cvsroot, + Create_Root, root_allow_add, root_allow_free, root_allow_ok): Move + these protos to... + * root.h: ...here. + * client.c (arg_should_not_be_sent_to_server), recurse.c + (start_recusrion, do_recursion): Use new Name_Root API. + * main.c (current_root): Remove global. + (set_root_directory): Set current_parsed_root directly. + (main): Use new Name_Root API. Restore deletion of root directories + list. + * root.c (Name_Root): Return a parsed cvsroot_t rather than a string. + +2004-09-23 Derek Price + + * sanity.sh (depends_on_ssh, sshstdio): Don't use skip() to skip + remote-only tests. + +2004-09-23 Mark D. Baushke + + * server.c (cvs_output, cvs_output_binary): fflush (stderr) + here to avoid problems with 'cvs status 2>&1'. + (Report by Frank Hemer .) + +2004-09-23 Derek Price + + * sanity.sh (crerepos, sshstdio): Minor modifications to make use of + the new depends_on_?sh API. + +2004-09-23 Derek Price + + * sanity.sh: Accept new -e option to interpret non-fatal calls to skip + as errors. + (skip, depends_on_rsh, depends_on_ssh): New functions. + +2004-09-12 Mark D. Baushke + + * rcs.c (RCS_checkout): Allow noexec to do checkouts when + server_active is true. + * sanity.sh (join7): Test above change (fixes a FIXCVS). + +2004-09-08 Mark D. Baushke + + * sanity.sh (join7): Fix if-then-else conditional. + + * server.c (server_updated): Deal with cvs -n update -jt1 -jt2 + "protocol error: uncounted data discarded" problem. + * sanity.sh (join7): New test for this case. + +2004-08-24 Derek Price + + * recurse.c (start_recursion): Don't shorten //. to / (use //). + +2004-08-24 Derek Price + + * recurse.c (start_recursion): Strip trailing CWD indirections on + repository. + * sanity.sh (rstar-toplevel): Update to account for new behavior. + (Report from Dan Peterson .) + +2004-08-24 Mark D. Baushke + + * recurse.c (do_recursion): Correct test for calling + server_pause_check to occur when locktype != CVS_LOCK_WRITE. + (Patch suggested by Ian Lance Taylor + in bug#198). + +2004-08-24 Derek Price + + * rcs.c (translate_symtag): Prevent infinite loop. + * tag.c (tag_check_valid): Check tag syntax before searching for tags. + * sanity.sh (tag-space): Some tests for the above. + (Report from Dan Peterson .) + +2004-08-24 Mark D. Baushke + + * ignore.c (ignore_directory): Include the terminating NUL + character in the directory name comparison to avoid matching + substrings of directories by accident. + (Report and suggested fix from James E Wilson + .) + * sanity.sh (modules4): Add some more tests testing the above + change. + +2004-08-17 Mark D. Baushke + + * sanity.sh (sshstdio): Fix comment typo plus gratuitous + reformatting. + + * client.c (handle_m): Workaround to deal with stdio getting put + into non-blocking via redirection of stderr and interaction with + ssh on some platforms. On those boxes, stdio can put stdout + unexpectedly into non-blocking mode which may lead to fwrite() or + fflush() failing with EAGAIN, but cvs not checking for the error. + (Patch suggested by Frank Hemer .) + + * client.c (handle_e): Similar fix for stderr. + * sanity.sh (sshstdio): New test for non-blocking stdio via ssh. + +2004-08-11 Derek Price + + * sanity.sh (basicc): Work around a problem in Linux 2.2 & Bash 2.05b + which prevents a `cd ..' from a deleted directory from working. + (Original patch from Matthew Ogilvie .) + +2004-06-22 Derek Price + + * wrapper.c: Add explicit "void" return type to "wrap_clean_fmt_str" + definition. + (Patch from Conrad T. Pino .) + 2004-06-09 Derek Price * commit.c, filesubr.c, history.c, server.c, wrapper.c: Various @@ -531,7 +1603,7 @@ * tag.c (tag_fileproc): Ditto. * update.c (checkout_file): Ditto. * server.c (server_updated): Do not buf_free (filebuf) here. - + 2004-02-13 Larry Jones * rcs.c (locate_rcs): Remove unused variables. @@ -749,7 +1821,7 @@ "Protocol error: uncounted data discarded" messages in some circumstances. (Problem reported by "Jim.Hyslop" .) - + 2003-12-03 Derek Price * sanity.sh (recase-8csss): rename to... @@ -945,7 +2017,7 @@ CVSROOT files being in the way since the client skips destination validity checks since it should be rare that a client is running in client/server mode on the server and CVS has no current way to - check if it is running on the server. + check if it is running on the server. (check_repository-3): Test renamed to checkout_repository-3. (dottedroot): New test to check that a CVSROOT with a "." in the name will work. @@ -1005,7 +2077,7 @@ 2003-10-25 Mark D. Baushke * sanity.sh (parseroot): Perform this test in a subdirectory. - It should avoid problems on case-insensitive systems where + It should avoid problems on case-insensitive systems where CVSROOT and cvsroot are the same directory (eg, MacOS X). 2003-10-24 Derek Price @@ -1025,7 +2097,7 @@ * sanity.sh (join6): New testcase for above. (Suggested by Paul Edwards, from somewhere in Australia.) (import): Fix collateral damage. - + 2003-10-23 Derek Price * sanity.sh (fail): Refer the user to the `TESTS' and `check.log' files @@ -1046,7 +2118,7 @@ exists. (Reported by Rodolfo Schulz de Lima .) * sanity.sh (admin): Test these changes. - + 2003-10-17 Mark D. Baushke * admin.c (admin_fileproc): Force tag match on admin @@ -1653,7 +2725,7 @@ rtag' as various parts of cvs "know" how to automatically branch files (eg: cvs add). Trying to remember state is getting "Too Hard (TM)") * sanity.sh (branches3): Test the CVS_LOCAL_BRANCH_NUM feature. - + 2003-03-04 Derek Price * history.c (history_write): Remove unneeded O_CREAT in the call to @@ -1708,7 +2780,7 @@ This bug was discovered and fixed for FreeBSD cvs. See v 1.21 of - for more information. + for more information. * sanity.sh (rcs4): Tests for same. (Patch from Mark D. Baushke .) Index: src/Makefile.am =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/Makefile.am,v retrieving revision 1.1.1.5 retrieving revision 1.1.1.6 diff -u -p -r1.1.1.5 -r1.1.1.6 --- src/Makefile.am 15 Apr 2004 01:01:55 -0000 1.1.1.5 +++ src/Makefile.am 26 Dec 2007 03:55:02 -0000 1.1.1.6 @@ -1,8 +1,10 @@ ## Process this file with automake to produce Makefile.in # Makefile for GNU CVS program. -# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, -# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. +# +# Copyright (C) 1986-2005 The Free Software Foundation, Inc. +# +# Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , +# and others. # 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 Index: src/Makefile.in =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/Makefile.in,v retrieving revision 1.1.1.12 retrieving revision 1.1.1.13 diff -u -p -r1.1.1.12 -r1.1.1.13 --- src/Makefile.in 15 Apr 2004 01:01:55 -0000 1.1.1.12 +++ src/Makefile.in 26 Dec 2007 03:55:02 -0000 1.1.1.13 @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.7.9 from Makefile.am. +# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ -# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,9 +15,11 @@ @SET_MAKE@ # Makefile for GNU CVS program. -# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, -# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. +# +# Copyright (C) 1986-2005 The Free Software Foundation, Inc. +# +# Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , +# and others. # 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 @@ -29,6 +31,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. + srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -36,7 +39,6 @@ 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 @@ -50,6 +52,55 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +bin_PROGRAMS = cvs$(EXEEXT) +subdir = src +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/cvsbug.in ChangeLog +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = cvsbug +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am_cvs_OBJECTS = add.$(OBJEXT) admin.$(OBJEXT) annotate.$(OBJEXT) \ + buffer.$(OBJEXT) checkin.$(OBJEXT) checkout.$(OBJEXT) \ + classify.$(OBJEXT) client.$(OBJEXT) commit.$(OBJEXT) \ + create_adm.$(OBJEXT) cvsrc.$(OBJEXT) diff.$(OBJEXT) \ + edit.$(OBJEXT) entries.$(OBJEXT) error.$(OBJEXT) \ + expand_path.$(OBJEXT) fileattr.$(OBJEXT) filesubr.$(OBJEXT) \ + find_names.$(OBJEXT) hardlink.$(OBJEXT) hash.$(OBJEXT) \ + history.$(OBJEXT) ignore.$(OBJEXT) import.$(OBJEXT) \ + lock.$(OBJEXT) log.$(OBJEXT) login.$(OBJEXT) logmsg.$(OBJEXT) \ + main.$(OBJEXT) mkmodules.$(OBJEXT) modules.$(OBJEXT) \ + myndbm.$(OBJEXT) no_diff.$(OBJEXT) parseinfo.$(OBJEXT) \ + patch.$(OBJEXT) rcs.$(OBJEXT) rcscmds.$(OBJEXT) \ + recurse.$(OBJEXT) release.$(OBJEXT) remove.$(OBJEXT) \ + repos.$(OBJEXT) root.$(OBJEXT) run.$(OBJEXT) \ + scramble.$(OBJEXT) server.$(OBJEXT) stack.$(OBJEXT) \ + status.$(OBJEXT) subr.$(OBJEXT) tag.$(OBJEXT) update.$(OBJEXT) \ + version.$(OBJEXT) vers_ts.$(OBJEXT) watch.$(OBJEXT) \ + wrapper.$(OBJEXT) zlib.$(OBJEXT) +cvs_OBJECTS = $(am_cvs_OBJECTS) +cvs_DEPENDENCIES = ../diff/libdiff.a ../lib/libcvs.a ../zlib/libz.a +binSCRIPT_INSTALL = $(INSTALL_SCRIPT) +SCRIPTS = $(bin_SCRIPTS) +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(cvs_SOURCES) +DIST_SOURCES = $(cvs_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ @@ -105,7 +156,6 @@ RANLIB = @RANLIB@ ROFF = @ROFF@ SENDMAIL = @SENDMAIL@ SET_MAKE = @SET_MAKE@ - SHELL = /bin/sh STRIP = @STRIP@ TEXI2DVI = @TEXI2DVI@ @@ -120,6 +170,8 @@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ @@ -133,6 +185,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ +mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ @@ -140,6 +193,7 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +with_default_rsh = @with_default_rsh@ # $(includeopt) is CVS specific and set by configure # FIXME - This includes line is dependant on its order. This means there is @@ -147,8 +201,6 @@ target_alias = @target_alias@ # try and remove naming ocnflicts and fix Automake to allow particular includes # to be attached only to particular object files. Short term fix is either or. INCLUDES = -I$(top_srcdir)/lib -I$(top_srcdir)/diff -I$(top_srcdir)/zlib $(includeopt) - -bin_PROGRAMS = cvs bin_SCRIPTS = cvsbug # The cvs executable @@ -224,7 +276,6 @@ cvs_SOURCES = \ update.h \ watch.h - cvs_LDADD = \ ../diff/libdiff.a \ ../lib/libcvs.a \ @@ -245,99 +296,51 @@ EXTRA_DIST = \ build_src.com \ sanity.sh -subdir = src -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = cvsbug -bin_PROGRAMS = cvs$(EXEEXT) -PROGRAMS = $(bin_PROGRAMS) - -am_cvs_OBJECTS = add.$(OBJEXT) admin.$(OBJEXT) annotate.$(OBJEXT) \ - buffer.$(OBJEXT) checkin.$(OBJEXT) checkout.$(OBJEXT) \ - classify.$(OBJEXT) client.$(OBJEXT) commit.$(OBJEXT) \ - create_adm.$(OBJEXT) cvsrc.$(OBJEXT) diff.$(OBJEXT) \ - edit.$(OBJEXT) entries.$(OBJEXT) error.$(OBJEXT) \ - expand_path.$(OBJEXT) fileattr.$(OBJEXT) filesubr.$(OBJEXT) \ - find_names.$(OBJEXT) hardlink.$(OBJEXT) hash.$(OBJEXT) \ - history.$(OBJEXT) ignore.$(OBJEXT) import.$(OBJEXT) \ - lock.$(OBJEXT) log.$(OBJEXT) login.$(OBJEXT) logmsg.$(OBJEXT) \ - main.$(OBJEXT) mkmodules.$(OBJEXT) modules.$(OBJEXT) \ - myndbm.$(OBJEXT) no_diff.$(OBJEXT) parseinfo.$(OBJEXT) \ - patch.$(OBJEXT) rcs.$(OBJEXT) rcscmds.$(OBJEXT) \ - recurse.$(OBJEXT) release.$(OBJEXT) remove.$(OBJEXT) \ - repos.$(OBJEXT) root.$(OBJEXT) run.$(OBJEXT) scramble.$(OBJEXT) \ - server.$(OBJEXT) stack.$(OBJEXT) status.$(OBJEXT) \ - subr.$(OBJEXT) tag.$(OBJEXT) update.$(OBJEXT) version.$(OBJEXT) \ - vers_ts.$(OBJEXT) watch.$(OBJEXT) wrapper.$(OBJEXT) \ - zlib.$(OBJEXT) -cvs_OBJECTS = $(am_cvs_OBJECTS) -cvs_DEPENDENCIES = ../diff/libdiff.a ../lib/libcvs.a ../zlib/libz.a -cvs_LDFLAGS = -SCRIPTS = $(bin_SCRIPTS) - - -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/add.Po ./$(DEPDIR)/admin.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/annotate.Po ./$(DEPDIR)/buffer.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/checkin.Po ./$(DEPDIR)/checkout.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/classify.Po ./$(DEPDIR)/client.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/commit.Po ./$(DEPDIR)/create_adm.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/cvsrc.Po ./$(DEPDIR)/diff.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/edit.Po ./$(DEPDIR)/entries.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/error.Po ./$(DEPDIR)/expand_path.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/fileattr.Po ./$(DEPDIR)/filesubr.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/find_names.Po ./$(DEPDIR)/hardlink.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/hash.Po ./$(DEPDIR)/history.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/ignore.Po ./$(DEPDIR)/import.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/lock.Po ./$(DEPDIR)/log.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/login.Po ./$(DEPDIR)/logmsg.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/main.Po ./$(DEPDIR)/mkmodules.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/modules.Po ./$(DEPDIR)/myndbm.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/no_diff.Po ./$(DEPDIR)/parseinfo.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/patch.Po ./$(DEPDIR)/rcs.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/rcscmds.Po ./$(DEPDIR)/recurse.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/release.Po ./$(DEPDIR)/remove.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/repos.Po ./$(DEPDIR)/root.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/run.Po ./$(DEPDIR)/scramble.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/server.Po ./$(DEPDIR)/stack.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/status.Po ./$(DEPDIR)/subr.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/tag.Po ./$(DEPDIR)/update.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/vers_ts.Po ./$(DEPDIR)/version.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/watch.Po ./$(DEPDIR)/wrapper.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/zlib.Po -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -DIST_SOURCES = $(cvs_SOURCES) -DIST_COMMON = $(srcdir)/Makefile.in ChangeLog Makefile.am cvsbug.in -SOURCES = $(cvs_SOURCES) - all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile -Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) -cvsbug: $(top_builddir)/config.status cvsbug.in +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +cvsbug: $(top_builddir)/config.status $(srcdir)/cvsbug.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(bindir) + test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_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) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \ - $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \ + echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done @@ -345,8 +348,8 @@ uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ - rm -f $(DESTDIR)$(bindir)/$$f; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: @@ -354,16 +357,15 @@ clean-binPROGRAMS: cvs$(EXEEXT): $(cvs_OBJECTS) $(cvs_DEPENDENCIES) @rm -f cvs$(EXEEXT) $(LINK) $(cvs_LDFLAGS) $(cvs_OBJECTS) $(cvs_LDADD) $(LIBS) -binSCRIPT_INSTALL = $(INSTALL_SCRIPT) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(bindir) + test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " $(binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f"; \ - $(binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f; \ + echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ else :; fi; \ done @@ -371,12 +373,12 @@ uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ - rm -f $(DESTDIR)$(bindir)/$$f; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ done mostlyclean-compile: - -rm -f *.$(OBJEXT) core *.core + -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @@ -438,36 +440,20 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zlib.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ -@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ -@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ -@am__fastdepCC_TRUE@ fi +@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 `test -f '$<' || echo '$(srcdir)/'`$< +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ -@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ -@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ -@am__fastdepCC_TRUE@ fi +@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 `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` uninstall-info-am: -ETAGS = etags -ETAGSFLAGS = - -CTAGS = ctags -CTAGSFLAGS = - -tags: TAGS - ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -476,6 +462,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique +tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) @@ -487,10 +474,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEP 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 - + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) @@ -513,10 +501,6 @@ GTAGS: distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - -top_distdir = .. -distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ @@ -530,7 +514,7 @@ distdir: $(DISTFILES) dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ - $(mkinstalldirs) "$(distdir)$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ @@ -549,9 +533,10 @@ check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: check-am all-am: Makefile $(PROGRAMS) $(SCRIPTS) - installdirs: - $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(bindir) + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -571,7 +556,7 @@ mostlyclean-generic: clean-generic: distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @@ -591,6 +576,8 @@ dvi: dvi-am dvi-am: +html: html-am + info: info-am info-am: @@ -628,14 +615,15 @@ uninstall-am: uninstall-binPROGRAMS unin .PHONY: CTAGS GTAGS all all-am check check-am check-local clean \ clean-binPROGRAMS clean-generic ctags distclean \ distclean-compile distclean-generic distclean-tags distdir dvi \ - dvi-am info info-am install install-am install-binPROGRAMS \ - install-binSCRIPTS install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-binSCRIPTS uninstall-info-am + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-binSCRIPTS install-data \ + install-data-am install-exec install-exec-am install-info \ + install-info-am install-man install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-binSCRIPTS \ + uninstall-info-am check-local: localcheck remotecheck Index: src/add.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/add.c,v retrieving revision 1.1.1.12 retrieving revision 1.1.1.13 diff -u -p -r1.1.1.12 -r1.1.1.13 --- src/add.c 10 Jun 2004 19:05:37 -0000 1.1.1.12 +++ src/add.c 26 Dec 2007 03:55:02 -0000 1.1.1.13 @@ -1,6 +1,11 @@ /* - * Copyright (c) 1992, Brian Berliner and Jeff Polk - * Copyright (c) 1989-1992, Brian Berliner + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (c) 1992, Brian Berliner and Jeff Polk + * Portions Copyright (c) 1989-1992, Brian Berliner * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS source distribution. @@ -37,8 +42,9 @@ static int build_entry PROTO((const char static const char *const add_usage[] = { "Usage: %s %s [-k rcs-kflag] [-m message] files...\n", - "\t-k\tUse \"rcs-kflag\" to add the file with the specified kflag.\n", - "\t-m\tUse \"message\" for the creation log.\n", + "\t-k rcs-kflag\tUse \"rcs-kflag\" to add the file with the specified\n", + "\t\t\tkflag.\n", + "\t-m message\tUse \"message\" for the creation log.\n", "(Specify the --help global option for a list of other help options)\n", NULL }; @@ -75,12 +81,12 @@ add (argc, argv) switch (c) { case 'k': - if (options) - free (options); + if (options) free (options); options = RCS_check_kflag (optarg); break; case 'm': + if (message) free (message); message = xstrdup (optarg); break; case '?': @@ -155,11 +161,17 @@ add (argc, argv) int j; if (argc == 0) + { /* We snipped out all the arguments in the above sanity check. We can just forget the whole thing (and we better, because if we fired up the server and passed it nothing, it would spit back a usage message). */ + if (options) + free (options); + if (message) + free (message); return err; + } start_server (); ign_setup (); @@ -469,7 +481,25 @@ same name already exists in the reposito char *prev = previous_rev (vers->srcfile, vers->vn_rcs); int status; - assert (prev != NULL); + if (prev == NULL) + { + /* There is no previous revision. Either: + * + * * Revision 1.1 was dead, as when a file was + * inititially added on a branch, + * + * or + * + * * All previous revisions have been deleted. + * For instance, via `admin -o'. + */ + if (!really_quiet) + error (0, 0, +"File `%s' has no previous revision to resurrect.", + finfo.fullname); + free (prev); + goto skip_this_file; + } if (!quiet) error (0, 0, "Resurrecting file `%s' from revision %s.", @@ -665,6 +695,8 @@ cannot resurrect %s; RCS file removed by server_checked_in (finfo.file, finfo.update_dir, repository); #endif } + +skip_this_file: free (repository); Entries_Close (entries); @@ -745,11 +777,7 @@ add_directory (finfo) error (0, errno, "cannot chdir to %s", finfo->fullname); return 1; } -#ifdef SERVER_SUPPORT if (!server_active && isfile (CVSADM)) -#else - if (isfile (CVSADM)) -#endif { error (0, 0, "%s/%s already exists", finfo->fullname, CVSADM); goto out; @@ -818,7 +846,10 @@ add_directory (finfo) fileattr_write (); fileattr_free (); if (attrs != NULL) + { free (attrs); + attrs = NULL; + } /* * Set up an update list with a single title node for Update_Logfile @@ -838,9 +869,7 @@ add_directory (finfo) dellist (&ulist); } -#ifdef SERVER_SUPPORT if (!server_active) -#endif Create_Admin (".", finfo->fullname, rcsdir, tag, date, nonbranch, 0, 1); if (tag) free (tag); @@ -858,6 +887,8 @@ add_directory (finfo) free (rcsdir); free (message); + if (attrs != NULL) + free (attrs); return 0; @@ -865,6 +896,7 @@ out: if (restore_cwd (&cwd, NULL)) error_exit (); free_cwd (&cwd); + if (message) free (message); if (rcsdir != NULL) free (rcsdir); return 0; Index: src/admin.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/admin.c,v retrieving revision 1.1.1.12 retrieving revision 1.1.1.13 diff -u -p -r1.1.1.12 -r1.1.1.13 --- src/admin.c 15 Apr 2004 01:01:55 -0000 1.1.1.12 +++ src/admin.c 26 Dec 2007 03:55:02 -0000 1.1.1.13 @@ -1,6 +1,11 @@ /* - * Copyright (c) 1992, Brian Berliner and Jeff Polk - * Copyright (c) 1989-1992, Brian Berliner + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (c) 1992, Brian Berliner and Jeff Polk + * Portions Copyright (c) 1989-1992, Brian Berliner * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS source distribution. @@ -379,17 +384,13 @@ admin (argc, argv) /* The use of `cvs admin -k' is unrestricted. However, any other option is restricted if the group CVS_ADMIN_GROUP exists on the server. */ - if ( -# ifdef CLIENT_SUPPORT - /* This is only "secure" on the server, since the user could edit the - * RCS file on a local host, but some people like this kind of - * check anyhow. The alternative would be to check only when - * (server_active) rather than when not on the client. - */ - !current_parsed_root->isremote && -# endif /* CLIENT_SUPPORT */ - !only_k_option - && (grp = getgrnam(CVS_ADMIN_GROUP)) != NULL) + /* This is only "secure" on the server, since the user could edit the + * RCS file on a local host, but some people like this kind of + * check anyhow. The alternative would be to check only when + * (server_active) rather than when not on the client. + */ + if (!current_parsed_root->isremote && !only_k_option && + (grp = getgrnam(CVS_ADMIN_GROUP)) != NULL) { #ifdef HAVE_GETGROUPS gid_t *grps; @@ -816,6 +817,13 @@ admin_fileproc (callerdat, finfo) { tag = xstrdup (arg + 2); rev = RCS_head (rcs); + if (!rev) + { + error (0, 0, "No head revision in archive file `%s'.", + rcs->path); + status = 1; + continue; + } } else { Index: src/annotate.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/annotate.c,v retrieving revision 1.1.1.5 retrieving revision 1.1.1.6 diff -u -p -r1.1.1.5 -r1.1.1.6 --- src/annotate.c 15 Apr 2004 01:01:55 -0000 1.1.1.5 +++ src/annotate.c 26 Dec 2007 03:55:02 -0000 1.1.1.6 @@ -1,6 +1,11 @@ /* - * Copyright (c) 1992, Brian Berliner and Jeff Polk - * Copyright (c) 1989-1992, Brian Berliner + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (c) 1992, Brian Berliner and Jeff Polk + * Portions Copyright (c) 1989-1992, Brian Berliner * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS source distribution. @@ -222,6 +227,7 @@ rannotate_proc (argc, argv, xwhere, mwhe { error (0, errno, "cannot chdir to %s", repository); free (repository); + free (where); return (1); } /* End section which is identical to patch_proc. */ Index: src/buffer.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/buffer.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -p -r1.5 -r1.6 --- src/buffer.c 15 Apr 2004 01:17:26 -0000 1.5 +++ src/buffer.c 26 Dec 2007 04:05:09 -0000 1.6 @@ -1,6 +1,18 @@ -/* Code for the buffer data structure. */ +/* + * Copyright (C) 1996-2005 The 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. + */ -/* $FreeBSD$ */ +/* Code for the buffer data structure. */ #include #include "cvs.h" @@ -112,11 +124,13 @@ allocate_buffer_datas () /* Allocate buffer_data structures in blocks of 16. */ #define ALLOC_COUNT (16) - alc = ((struct buffer_data *) - xmalloc (ALLOC_COUNT * sizeof (struct buffer_data))); + alc = xmalloc (ALLOC_COUNT * sizeof (struct buffer_data)); space = (char *) valloc (ALLOC_COUNT * BUFFER_DATA_SIZE); - if (alc == NULL || space == NULL) + if (!space) + { + free (alc); return; + } for (i = 0; i < ALLOC_COUNT; i++, alc++, space += BUFFER_DATA_SIZE) { alc->next = free_buffer_data; @@ -1408,10 +1422,16 @@ stdio_buffer_shutdown (buf) { struct stdio_buffer_closure *bc = buf->closure; struct stat s; - int closefp = 1; + int closefp, statted; - /* Must be a pipe or a socket. What could go wrong? */ - assert (fstat (fileno (bc->fp), &s) != -1); + /* Must be a pipe or a socket. What could go wrong? + * Well, apparently for disconnected clients under AIX, the + * fstat() will return -1 on the server if the client has gone + * away. + */ + if (fstat(fileno(bc->fp), &s) == -1) statted = 0; + else statted = 1; + closefp = statted; /* Flush the buffer if we can */ if (buf->flush) @@ -1434,7 +1454,7 @@ stdio_buffer_shutdown (buf) # ifndef NO_SOCKET_TO_FD { /* shutdown() sockets */ - if (S_ISSOCK (s.st_mode)) + if (statted && S_ISSOCK (s.st_mode)) shutdown (fileno (bc->fp), 0); } # endif /* NO_SOCKET_TO_FD */ @@ -1442,7 +1462,7 @@ stdio_buffer_shutdown (buf) /* Can't be set with SHUTDOWN_SERVER defined */ else if (pclose (bc->fp) == EOF) { - error (1, errno, "closing connection to %s", + error (0, errno, "closing connection to %s", current_parsed_root->hostname); closefp = 0; } @@ -1462,7 +1482,7 @@ stdio_buffer_shutdown (buf) # endif # ifndef NO_SOCKET_TO_FD /* shutdown() sockets */ - if (S_ISSOCK (s.st_mode)) + if (statted && S_ISSOCK (s.st_mode)) shutdown (fileno (bc->fp), 1); # else { @@ -1475,19 +1495,19 @@ stdio_buffer_shutdown (buf) buf->output = NULL; } - if (closefp && fclose (bc->fp) == EOF) + if (statted && closefp && fclose (bc->fp) == EOF) { - if (0 -# ifdef SERVER_SUPPORT - || server_active -# endif /* SERVER_SUPPORT */ - ) + if (server_active) { /* Syslog this? */ } # ifdef CLIENT_SUPPORT + /* We are already closing the connection. + * On error, print a warning and try to + * continue to avoid infinte loops. + */ else - error (1, errno, + error (0, errno, "closing down connection to %s", current_parsed_root->hostname); # endif /* CLIENT_SUPPORT */ @@ -1501,8 +1521,13 @@ stdio_buffer_shutdown (buf) do w = waitpid (bc->child_pid, (int *) 0, 0); while (w == -1 && errno == EINTR); + + /* We are already closing the connection. + * On error, print a warning and try to + * continue to avoid infinte loops. + */ if (w == -1) - error (1, errno, "waiting for process %d", bc->child_pid); + error (0, errno, "waiting for process %d", bc->child_pid); } return 0; } @@ -1835,7 +1860,7 @@ packetizing_buffer_output (closure, data struct packetizing_buffer *pb = (struct packetizing_buffer *) closure; char inbuf[BUFFER_DATA_SIZE + 2]; char stack_outbuf[BUFFER_DATA_SIZE + PACKET_SLOP + 4]; - struct buffer_data *outdata; + struct buffer_data *outdata = NULL; char *outbuf; int size, status, translated; @@ -1890,6 +1915,11 @@ packetizing_buffer_output (closure, data buf_output (pb->buf, outbuf, translated + 2); else { + /* if ((have + PACKET_SLOP + 4) > BUFFER_DATA_SIZE), then + outdata may be NULL. */ + if (outdata == NULL) + abort (); + outdata->size = translated + 2; buf_append_data (pb->buf, outdata, outdata); } Index: src/buffer.h =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/buffer.h,v retrieving revision 1.1.1.6 retrieving revision 1.1.1.7 diff -u -p -r1.1.1.6 -r1.1.1.7 --- src/buffer.h 15 Apr 2004 01:01:55 -0000 1.1.1.6 +++ src/buffer.h 26 Dec 2007 03:55:03 -0000 1.1.1.7 @@ -1,3 +1,17 @@ +/* + * Copyright (C) 1996-2005 The 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. + */ + /* Declarations concerning the buffer data structure. */ #if defined (SERVER_SUPPORT) || defined (CLIENT_SUPPORT) Index: src/checkin.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/checkin.c,v retrieving revision 1.1.1.5 retrieving revision 1.1.1.6 diff -u -p -r1.1.1.5 -r1.1.1.6 --- src/checkin.c 15 Apr 2004 01:01:55 -0000 1.1.1.5 +++ src/checkin.c 26 Dec 2007 03:55:02 -0000 1.1.1.6 @@ -1,6 +1,11 @@ /* - * Copyright (c) 1992, Brian Berliner and Jeff Polk - * Copyright (c) 1989-1992, Brian Berliner + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk + * Portions Copyright (C) 1989-1992, Brian Berliner * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS source distribution. @@ -60,7 +65,7 @@ Checkin (type, finfo, rev, tag, options, */ assert (finfo->rcs != NULL); - switch (RCS_checkin (finfo->rcs, finfo->file, message, rev, + switch (RCS_checkin (finfo->rcs, finfo->file, message, rev, 0, RCS_FLAGS_KEEPFILE)) { case 0: /* everything normal */ @@ -74,7 +79,8 @@ Checkin (type, finfo, rev, tag, options, changes is if the file contains RCS keywords. So we if we are not expanding RCS keywords, we are done. */ - if (strcmp (options, "-V4") == 0) /* upgrade to V5 now */ + if (options != NULL + && strcmp (options, "-V4") == 0) /* upgrade to V5 now */ options[0] = '\0'; /* FIXME: If PreservePermissions is on, RCS_cmp_file is Index: src/checkout.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/checkout.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -p -r1.5 -r1.6 --- src/checkout.c 15 Apr 2004 01:17:26 -0000 1.5 +++ src/checkout.c 26 Dec 2007 04:09:41 -0000 1.6 @@ -1,6 +1,11 @@ /* - * Copyright (c) 1992, Brian Berliner and Jeff Polk - * Copyright (c) 1989-1992, Brian Berliner + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk + * Portions Copyright (C) 1989-1992, Brian Berliner * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS source distribution. @@ -72,13 +77,13 @@ static const char *const checkout_usage[ static const char *const export_usage[] = { - "Usage: %s %s [-NRfln] [-r rev] [-D date] [-d dir] [-k kopt] module...\n", + "Usage: %s %s [-NRfln] [-r tag] [-D date] [-d dir] [-k kopt] module...\n", "\t-N\tDon't shorten module paths if -d specified.\n", "\t-f\tForce a head revision match if tag/date not found.\n", "\t-l\tLocal directory only, not recursive\n", "\t-R\tProcess directories recursively (default).\n", "\t-n\tDo not run module program (if any).\n", - "\t-r rev\tExport revision or tag.\n", + "\t-r tag\tExport tagged revisions.\n", "\t-D date\tExport revisions as of date.\n", "\t-d dir\tExport into dir instead of module name.\n", "\t-k kopt\tUse RCS kopt -k option on checkout.\n", @@ -179,11 +184,9 @@ checkout (argc, argv) break; case 'Q': case 'q': -#ifdef SERVER_SUPPORT /* The CVS 1.5 client sends these options (in addition to Global_option requests), so we must ignore them. */ if (!server_active) -#endif error (1, 0, "-q or -Q must be specified before \"%s\"", cvs_cmd_name); @@ -437,10 +440,8 @@ safe_location (where) CLIENT_SERVER_STR, where ? where : "(null)"); -#ifdef CLIENT_SUPPORT /* Don't compare remote CVSROOTs to our destination directory. */ - if ( current_parsed_root->isremote ) return 1; -#endif /* CLIENT_SUPPORT */ + if (current_parsed_root->isremote) return 1; /* set current - even if where is set we'll need to cd back... */ current = xgetwd (); @@ -1062,7 +1063,8 @@ internal error: %s doesn't start with %s which = W_REPOS; if (tag != NULL && !tag_validated) { - tag_check_valid (tag, argc - 1, argv + 1, 0, aflag, NULL); + tag_check_valid (tag, argc - 1, argv + 1, 0, aflag, + repository); tag_validated = 1; } } Index: src/classify.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/classify.c,v retrieving revision 1.1.1.8 retrieving revision 1.1.1.9 diff -u -p -r1.1.1.8 -r1.1.1.9 --- src/classify.c 15 Apr 2004 01:01:55 -0000 1.1.1.8 +++ src/classify.c 26 Dec 2007 03:55:02 -0000 1.1.1.9 @@ -1,6 +1,11 @@ /* - * Copyright (c) 1992, Brian Berliner and Jeff Polk - * Copyright (c) 1989-1992, Brian Berliner + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk + * Portions Copyright (C) 1989-1992, Brian Berliner * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS source distribution. @@ -279,7 +284,9 @@ Classify_File (finfo, tag, date, options error (0, 0, "warning: %s was lost", finfo->fullname); ret = T_CHECKOUT; } - else if (strcmp (vers->ts_user, vers->ts_rcs) == 0) + else if (!strcmp (vers->ts_user, + vers->ts_conflict + ? vers->ts_conflict : vers->ts_rcs)) { /* @@ -293,6 +300,8 @@ Classify_File (finfo, tag, date, options if (vers->entdata->options && strcmp (vers->entdata->options, vers->options) != 0) ret = T_CHECKOUT; + else if (vers->ts_conflict) + ret = T_CONFLICT; else { sticky_ck (finfo, aflag, vers); @@ -313,6 +322,13 @@ Classify_File (finfo, tag, date, options else ret = T_NEEDS_MERGE; #else + /* Files with conflict markers and new timestamps fall through + * here, but they need to. T_CONFLICT is an error in + * commit_fileproc, whereas T_CONFLICT with conflict markers + * is caught but only warned about. Similarly, update_fileproc + * currently reregisters a file that was conflicted but lost + * its markers. + */ ret = T_MODIFIED; sticky_ck (finfo, aflag, vers); #endif Index: src/client.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/client.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -p -r1.12 -r1.13 --- src/client.c 10 Jun 2004 19:12:50 -0000 1.12 +++ src/client.c 26 Dec 2007 05:08:14 -0000 1.13 @@ -225,7 +225,8 @@ arg_should_not_be_sent_to_server (arg) /* Try to decide whether we should send arg to the server by checking the contents of the corresponding CVSADM directory. */ { - char *t, *this_root; + char *t, *root_string; + cvsroot_t *this_root = NULL; /* Calculate "dirname arg" */ for (t = arg + strlen (arg) - 1; t >= arg; t--) @@ -255,25 +256,32 @@ arg_should_not_be_sent_to_server (arg) /* Since we didn't find it in the list, check the CVSADM files on disk. */ this_root = Name_Root (arg, (char *) NULL); + root_string = this_root->original; *t = c; } else { /* We're at the beginning of the string. Look at the CVSADM files in cwd. */ - this_root = (CVSroot_cmdline ? xstrdup(CVSroot_cmdline) - : Name_Root ((char *) NULL, (char *) NULL)); + if (CVSroot_cmdline) + root_string = CVSroot_cmdline; + else + { + this_root = Name_Root ((char *) NULL, (char *) NULL); + root_string = this_root->original; + } } /* Now check the value for root. */ - if (CVSroot_cmdline == NULL && this_root && current_parsed_root - && (strcmp (this_root, current_parsed_root->original) != 0)) + if (CVSroot_cmdline == NULL && + root_string && current_parsed_root + && (strcmp (root_string, current_parsed_root->original) != 0)) { /* Don't send this, since the CVSROOTs don't match. */ - free (this_root); + if (this_root) free_cvsroot_t (this_root); return 1; } - free (this_root); + if (this_root) free_cvsroot_t (this_root); } /* OK, let's send it. */ @@ -890,12 +898,6 @@ read_line (resultp) #if defined(CLIENT_SUPPORT) || defined(SERVER_SUPPORT) /* - * Zero if compression isn't supported or requested; non-zero to indicate - * a compression level to request from gzip. - */ -int gzip_level; - -/* * Level of compression to use when running gzip on a single file. */ int file_gzip_level; @@ -1117,6 +1119,8 @@ call_in_directory (pathname, func, data) int reposdirname_absolute; int newdir = 0; + assert (pathname); + reposname = NULL; read_line (&reposname); assert (reposname != NULL); @@ -1198,44 +1202,6 @@ call_in_directory (pathname, func, data) if (CVS_CHDIR (toplevel_wd) < 0) error (1, errno, "could not chdir to %s", toplevel_wd); - /* Create the CVS directory at the top level if needed. The - isdir seems like an unneeded system call, but it *does* - need to be called both if the CVS_CHDIR below succeeds - (e.g. "cvs co .") or if it fails (e.g. basicb-1a in - testsuite). We only need to do this for the "." case, - since the server takes care of forcing this directory to be - created in all other cases. If we don't create CVSADM - here, the call to Entries_Open below will fail. FIXME: - perhaps this means that we should change our algorithm - below that calls Create_Admin instead of having this code - here? */ - if (/* I think the reposdirname_absolute case has to do with - things like "cvs update /foo/bar". In any event, the - code below which tries to put toplevel_repos into - CVS/Repository is almost surely unsuited to - the reposdirname_absolute case. */ - !reposdirname_absolute - && (strcmp (dir_name, ".") == 0) - && ! isdir (CVSADM)) - { - char *repo; - char *r; - - newdir = 1; - - repo = xmalloc (strlen (toplevel_repos) - + 10); - strcpy (repo, toplevel_repos); - r = repo + strlen (repo); - if (r[-1] != '.' || r[-2] != '/') - strcpy (r, "/."); - - Create_Admin (".", ".", repo, (char *) NULL, - (char *) NULL, 0, 1, 1); - - free (repo); - } - if (CVS_CHDIR (dir_name) < 0) { char *dir; @@ -1496,7 +1462,44 @@ handle_copy_file (args, len) { call_in_directory (args, copy_a_file, (char *)NULL); } - + + + +/* Attempt to read a file size from a string. Accepts base 8 (0N), base 16 + * (0xN), or base 10. Exits on error. + * + * RETURNS + * The file size, in a size_t. + * + * FATAL ERRORS + * 1. As strtoul(). + * 2. If the number read exceeds SIZE_MAX. + */ +static size_t +strto_file_size (const char *s) +{ + unsigned long tmp; + char *endptr; + + /* Read it. */ + errno = 0; + tmp = strtoul (s, &endptr, 0); + + /* Check for errors. */ + if (errno || endptr == s) + error (1, errno, "Server sent invalid file size `%s'", s); + if (*endptr != '\0') + error (1, 0, + "Server sent trailing characters in file size `%s'", + endptr); + if (tmp > SIZE_MAX) + error (1, 0, "Server sent file size exceeding client max."); + + /* Return it. */ + return (size_t)tmp; +} + + static void read_counted_file PROTO ((char *, char *)); @@ -1529,9 +1532,7 @@ read_counted_file (filename, fullname) if (size_string[0] == 'z') error (1, 0, "\ protocol error: compressed files not supported for that operation"); - /* FIXME: should be doing more error checking, probably. Like using - strtoul and making sure we used up the whole line. */ - size = atoi (size_string); + size = strto_file_size (size_string); free (size_string); /* A more sophisticated implementation would use only a limited amount @@ -1813,11 +1814,12 @@ update_entries (data_arg, ent_list, shor { char *size_string; char *mode_string; - int size; + size_t size; char *buf; char *temp_filename; int use_gzip; int patch_failed; + char *s; read_line (&mode_string); @@ -1825,13 +1827,14 @@ update_entries (data_arg, ent_list, shor if (size_string[0] == 'z') { use_gzip = 1; - size = atoi (size_string+1); + s = size_string + 1; } else { use_gzip = 0; - size = atoi (size_string); + s = size_string; } + size = strto_file_size (s); free (size_string); /* Note that checking this separately from writing the file is @@ -1932,7 +1935,7 @@ update_entries (data_arg, ent_list, shor #ifdef USE_VMS_FILENAMES /* A VMS rename of "blah.dat" to "foo" to implies a destination of "foo.dat" which is unfortinate for CVS */ - sprintf (temp_filename, "%s_new_", filename); + sprintf (temp_filename, "%s_new_", filename); #else #ifdef _POSIX_NO_TRUNC sprintf (temp_filename, ".new.%.9s", filename); @@ -1985,6 +1988,8 @@ update_entries (data_arg, ent_list, shor entirely possible that future files will not have the same problem. */ error (0, errno, "cannot write %s", short_pathname); + free (temp_filename); + free (buf); goto discard_file_and_return; } @@ -2841,7 +2846,10 @@ send_a_repository (dir, repository, upda const char *repository; const char *update_dir_in; { - char *update_dir = xstrdup (update_dir_in); + char *update_dir; + + assert (update_dir_in); + update_dir = xstrdup (update_dir_in); if (toplevel_repos == NULL && repository != NULL) { @@ -3101,7 +3109,7 @@ handle_mbinary (args, len) /* Get the size. */ read_line (&size_string); - size = atoi (size_string); + size = strto_file_size (size_string); free (size_string); /* OK, now get all the data. The algorithm here is that we read @@ -3250,7 +3258,7 @@ handle_mt (args, len) else if (importmergecmd.seen) { if (strcmp (tag, "conflicts") == 0) - importmergecmd.conflicts = atoi (text); + importmergecmd.conflicts = text ? atoi (text) : -1; else if (strcmp (tag, "mergetag1") == 0) importmergecmd.mergetag1 = xstrdup (text); else if (strcmp (tag, "mergetag2") == 0) @@ -3918,6 +3926,7 @@ auth_server (root, lto_server, lfrom_ser /* Paranoia. */ memset (password, 0, strlen (password)); + free (password); # else /* ! AUTH_CLIENT_SUPPORT */ error (1, 0, "INTERNAL ERROR: This client does not support pserver authentication"); # endif /* AUTH_CLIENT_SUPPORT */ @@ -4032,7 +4041,7 @@ connect_to_forked_server (to_server, fro fprintf (stderr, " -> Forking server: %s %s\n", command[0], command[1]); } - child_pid = piped_child (command, &tofd, &fromfd); + child_pid = piped_child (command, &tofd, &fromfd, 0); if (child_pid < 0) error (1, 0, "could not fork server process"); @@ -4236,7 +4245,8 @@ connect_to_gserver (root, sock, hostinfo if (need > sizeof buf) { - int got; + ssize_t got; + size_t total; /* This usually means that the server sent us an error message. Read it byte by byte and print it out. @@ -4245,13 +4255,19 @@ connect_to_gserver (root, sock, hostinfo want to do this to work with older servers. */ buf[0] = cbuf[0]; buf[1] = cbuf[1]; - got = recv (sock, buf + 2, sizeof buf - 2, 0); - if (got < 0) - error (1, 0, "recv() from server %s: %s", - root->hostname, SOCK_STRERROR (SOCK_ERRNO)); - buf[got + 2] = '\0'; - if (buf[got + 1] == '\n') - buf[got + 1] = '\0'; + total = 2; + while (got = recv (sock, buf + total, sizeof buf - total, 0)) + { + if (got < 0) + error (1, 0, "recv() from server %s: %s", + root->hostname, SOCK_STRERROR (SOCK_ERRNO)); + total += got; + if (strrchr (buf + total - got, '\n')) + break; + } + buf[total] = '\0'; + if (buf[total - 1] == '\n') + buf[total - 1] = '\0'; error (1, 0, "error from server %s: %s", root->hostname, buf); } @@ -4332,6 +4348,7 @@ start_server () #endif /* HAVE_GSSAPI */ case ext_method: + case extssh_method: #ifdef NO_EXT_METHOD error (0, 0, ":ext: method not supported by this port of CVS"); error (1, 0, "try :server: instead"); @@ -4716,27 +4733,7 @@ start_rsh_server (root, to_server, from_ char *rsh_argv[10]; if (!cvs_rsh) - /* People sometimes suggest or assume that this should default - to "remsh" on systems like HPUX in which that is the - system-supplied name for the rsh program. However, that - causes various problems (keep in mind that systems such as - HPUX might have non-system-supplied versions of "rsh", like - a Kerberized one, which one might want to use). If we - based the name on what is found in the PATH of the person - who runs configure, that would make it harder to - consistently produce the same result in the face of - different people producing binary distributions. If we - based it on "remsh" always being the default for HPUX - (e.g. based on uname), that might be slightly better but - would require us to keep track of what the defaults are for - each system type, and probably would cope poorly if the - existence of remsh or rsh varies from OS version to OS - version. Therefore, it seems best to have the default - remain "rsh", and tell HPUX users to specify remsh, for - example in CVS_RSH or other such mechanisms to be devised, - if that is what they want (the manual already tells them - that). */ - cvs_rsh = "ssh"; + cvs_rsh = RSH_DFLT; if (!cvs_server) cvs_server = "cvs"; @@ -4797,7 +4794,7 @@ start_rsh_server (root, to_server, from_ int child_pid; if (!cvs_rsh) - cvs_rsh = "ssh"; + cvs_rsh = RSH_DFLT; if (!cvs_server) cvs_server = "cvs"; @@ -4841,7 +4838,7 @@ start_rsh_server (root, to_server, from_ fprintf (stderr, "%s ", argv[i]); putc ('\n', stderr); } - child_pid = piped_child (argv, &tofd, &fromfd); + child_pid = piped_child (argv, &tofd, &fromfd, 1); if (child_pid < 0) error (1, errno, "cannot start server via rsh"); @@ -4860,10 +4857,10 @@ start_rsh_server (root, to_server, from_ /* Send an argument STRING. */ void send_arg (string) - char *string; + const char *string; { char buf[1]; - char *p = string; + const char *p = string; send_to_server ("Argument ", 0); @@ -5155,7 +5152,10 @@ warning: ignoring -k options due to serv } else if (vers->ts_rcs == NULL || args->force - || strcmp (vers->ts_user, vers->ts_rcs) != 0 + || strcmp (vers->ts_conflict + && supported_request ("Empty-conflicts") + ? vers->ts_conflict : vers->ts_rcs, vers->ts_user) + || (vers->ts_conflict && !strcmp (cvs_cmd_name, "diff")) || (vers->vn_user && *vers->vn_user == '0')) { if (args->no_contents @@ -5362,36 +5362,15 @@ send_dirleave_proc (callerdat, dir, err, } /* - * Send each option in a string to the server, one by one. - * This assumes that the options are separated by spaces, for example - * STRING might be "--foo -C5 -y". + * Send each option in an array to the server, one by one. + * argv might be "--foo=bar", "-C", "5", "-y". */ - void -send_option_string (string) - char *string; +send_options (int argc, char *const *argv) { - char *copy; - char *p; - - copy = xstrdup (string); - p = copy; - while (1) - { - char *s; - char l; - - for (s = p; *s != ' ' && *s != '\0'; s++) - ; - l = *s; - *s = '\0'; - if (s != p) - send_arg (p); - if (l == '\0') - break; - p = s + 1; - } - free (copy); + int i; + for (i = 0; i < argc; i++) + send_arg (argv[i]); } Index: src/client.h =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/client.h,v retrieving revision 1.1.1.9 retrieving revision 1.1.1.10 diff -u -p -r1.1.1.9 -r1.1.1.10 --- src/client.h 15 Apr 2004 01:01:55 -0000 1.1.1.9 +++ src/client.h 26 Dec 2007 03:55:03 -0000 1.1.1.10 @@ -1,3 +1,17 @@ +/* + * Copyright (C) 1994-2005 The 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. + */ + /* Interface between the client and the rest of CVS. */ /* Stuff shared with the server. */ @@ -119,11 +133,10 @@ send_files PROTO((int argc, char **argv, /* Send an argument to the remote server. */ void -send_arg PROTO((char *string)); +send_arg PROTO((const char *string)); /* Send a string of single-char options to the remote server, one by one. */ -void -send_option_string PROTO((char *string)); +void send_options PROTO ((int argc, char * const *argv)); extern void send_a_repository PROTO ((const char *, const char *, const char *)); Index: src/commit.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/commit.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -p -r1.15 -r1.16 --- src/commit.c 10 Jun 2004 19:12:50 -0000 1.15 +++ src/commit.c 26 Dec 2007 05:20:16 -0000 1.16 @@ -1,6 +1,11 @@ /* - * Copyright (c) 1992, Brian Berliner and Jeff Polk - * Copyright (c) 1989-1992, Brian Berliner + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk + * Portions Copyright (C) 1989-1992, Brian Berliner * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS source distribution. @@ -12,7 +17,6 @@ * * The call is: cvs commit [options] files... * - * $FreeBSD$ */ #include @@ -384,12 +388,8 @@ commit (argc, argv) /* FIXME: Shouldn't this check be much more closely related to the readonly user stuff (CVSROOT/readers, &c). That is, why should root be able to "cvs init", "cvs import", &c, but not "cvs ci"? */ - if (geteuid () == (uid_t) 0 -# ifdef CLIENT_SUPPORT - /* Who we are on the client side doesn't affect logging. */ - && !current_parsed_root->isremote -# endif - ) + /* Who we are on the client side doesn't affect logging. */ + if (geteuid () == (uid_t) 0 && !current_parsed_root->isremote) { struct passwd *pw; @@ -412,6 +412,7 @@ commit (argc, argv) /* Silently ignore -n for compatibility with old * clients. */ + if (!server_active) error(0, 0, "the `-n' option is obsolete"); break; #endif /* SERVER_SUPPORT */ case 'm': @@ -642,7 +643,8 @@ commit (argc, argv) fp = cvs_temp_file (&fname); if (fp == NULL) - error (1, 0, "cannot create temporary file %s", fname); + error (1, 0, "cannot create temporary file %s", + fname ? fname : "(null)"); if (fwrite (saved_message, 1, strlen (saved_message), fp) != strlen (saved_message)) error (1, errno, "cannot write temporary file %s", fname); @@ -713,10 +715,8 @@ commit (argc, argv) Lock_Cleanup (); dellist (&mulist); -#ifdef SERVER_SUPPORT if (server_active) return err; -#endif /* see if we need to sleep before returning to avoid time-stamp races */ if (last_register_time) @@ -871,11 +871,11 @@ check_fileproc (callerdat, finfo) case T_CHECKOUT: case T_PATCH: case T_NEEDS_MERGE: - case T_CONFLICT: case T_REMOVE_ENTRY: error (0, 0, "Up-to-date check failed for `%s'", finfo->fullname); freevers_ts (&vers); return 1; + case T_CONFLICT: case T_MODIFIED: case T_ADDED: case T_REMOVED: @@ -913,40 +913,30 @@ check_fileproc (callerdat, finfo) return 1; } } - if (status == T_MODIFIED && !force_ci && vers->ts_conflict) + if (status == T_CONFLICT && !force_ci) { - /* - * We found a "conflict" marker. - * - * If the timestamp on the file is the same as the - * timestamp stored in the Entries file, we block the commit. - */ - if ( file_has_conflict ( finfo, vers->ts_conflict ) ) - { - error (0, 0, - "file `%s' had a conflict and has not been modified", - finfo->fullname); - freevers_ts (&vers); - return 1; - } - - if (file_has_markers (finfo)) - { - /* Make this a warning, not an error, because we have - no way of knowing whether the "conflict indicators" - are really from a conflict or whether they are part - of the document itself (cvs.texinfo and sanity.sh in - CVS itself, for example, tend to want to have strings - like ">>>>>>>" at the start of a line). Making people - kludge this the way they need to kludge keyword - expansion seems undesirable. And it is worse than - keyword expansion, because there is no -ko - analogue. */ - error (0, 0, - "\ + error (0, 0, + "file `%s' had a conflict and has not been modified", + finfo->fullname); + freevers_ts (&vers); + return 1; + } + if (status == T_MODIFIED && !force_ci && file_has_markers (finfo)) + { + /* Make this a warning, not an error, because we have + no way of knowing whether the "conflict indicators" + are really from a conflict or whether they are part + of the document itself (cvs.texinfo and sanity.sh in + CVS itself, for example, tend to want to have strings + like ">>>>>>>" at the start of a line). Making people + kludge this the way they need to kludge keyword + expansion seems undesirable. And it is worse than + keyword expansion, because there is no -ko + analogue. */ + error (0, 0, + "\ warning: file `%s' seems to still contain conflict indicators", - finfo->fullname); - } + finfo->fullname); } if (status == T_REMOVED) @@ -1285,11 +1275,7 @@ commit_fileproc (callerdat, finfo) if (!got_message) { got_message = 1; - if ( -#ifdef SERVER_SUPPORT - !server_active && -#endif - use_editor) + if (!server_active && use_editor) do_editor (finfo->update_dir, &saved_message, finfo->repository, ulist); do_verify (&saved_message, finfo->repository); @@ -1475,6 +1461,8 @@ commit_filesdoneproc (callerdat, err, re Node *p; List *ulist; + assert (repository); + p = findnode (mulist, update_dir); if (p == NULL) return err; @@ -1565,11 +1553,7 @@ commit_direntproc (callerdat, dir, repos /* get commit message */ real_repos = Name_Repository (dir, update_dir); got_message = 1; - if ( -#ifdef SERVER_SUPPORT - !server_active && -#endif - use_editor) + if (!server_active && use_editor) do_editor (update_dir, &saved_message, real_repos, ulist); do_verify (&saved_message, real_repos); free (real_repos); @@ -1753,18 +1737,22 @@ remove_file (finfo, tag, message) if (corev != NULL) free (corev); - retcode = RCS_checkin (finfo->rcs, finfo->file, message, rev, + retcode = RCS_checkin (finfo->rcs, finfo->file, message, rev, 0, RCS_FLAGS_DEAD | RCS_FLAGS_QUIET); if (retcode != 0) { if (!quiet) error (0, retcode == -1 ? errno : 0, "failed to commit dead revision for `%s'", finfo->fullname); + if (prev_rev != NULL) + free (prev_rev); return 1; } /* At this point, the file has been committed as removed. We should probably tell the history file about it */ - history_write ('R', NULL, finfo->rcs->head, finfo->file, finfo->repository); + corev = rev ? RCS_getbranch (finfo->rcs, rev, 1) : RCS_head (finfo->rcs); + history_write ('R', NULL, corev, finfo->file, finfo->repository); + free (corev); if (rev != NULL) free (rev); @@ -2086,7 +2074,8 @@ checkaddfile (file, repository, tag, opt /* and lock it */ if (lock_RCS (file, rcs, rev, repository)) { - error (0, 0, "cannot lock `%s'.", rcs->path); + error (0, 0, "cannot lock revision %s in `%s'.", + rev ? rev : tag ? tag : "HEAD", rcs->path); if (rev != NULL) free (rev); goto out; @@ -2124,13 +2113,14 @@ checkaddfile (file, repository, tag, opt /* commit a dead revision. */ (void) sprintf (tmp, "file %s was initially added on branch %s.", file, tag); - retcode = RCS_checkin (rcs, NULL, tmp, NULL, + retcode = RCS_checkin (rcs, NULL, tmp, NULL, 0, RCS_FLAGS_DEAD | RCS_FLAGS_QUIET); free (tmp); if (retcode != 0) { error (retcode == -1 ? 1 : 0, retcode == -1 ? errno : 0, "could not create initial dead revision %s", rcs->path); + free (fname); goto out; } @@ -2143,7 +2133,7 @@ checkaddfile (file, repository, tag, opt rcs = RCS_parse (file, repository); if (rcs == NULL) { - error (0, 0, "could not read %s", rcs->path); + error (0, 0, "could not read %s in %s", file, repository); goto out; } *rcsnode = rcs; @@ -2151,7 +2141,8 @@ checkaddfile (file, repository, tag, opt /* and lock it once again. */ if (lock_RCS (file, rcs, NULL, repository)) { - error (0, 0, "cannot lock `%s'.", rcs->path); + error (0, 0, "cannot lock initial revision in `%s'.", + rcs->path); goto out; } } @@ -2164,12 +2155,25 @@ checkaddfile (file, repository, tag, opt char *head; char *magicrev; int retcode; + time_t headtime = -1; + char *revnum, *tmp; + FILE *fp; + time_t t = -1; + struct tm *ct; fixbranch (rcs, sbranch); head = RCS_getversion (rcs, NULL, NULL, 0, (int *) NULL); + if (!head) + error (1, 0, "No head revision in archive file `%s'.", + rcs->path); magicrev = RCS_magicrev (rcs, head); + /* If this is not a new branch, then we will want a dead + version created before this one. */ + if (!newfile) + headtime = RCS_getrevtime (rcs, head, 0, 0); + retcode = RCS_settag (rcs, tag, magicrev); RCS_rewrite (rcs, NULL, NULL); @@ -2182,13 +2186,76 @@ checkaddfile (file, repository, tag, opt "could not stub branch %s for %s", tag, rcs->path); goto out; } + /* We need to add a dead version here to avoid -rtag -Dtime + checkout problems between when the head version was + created and now. */ + if (!newfile && headtime != -1) + { + /* move the new file out of the way. */ + fname = xmalloc (strlen (file) + sizeof (CVSADM) + + sizeof (CVSPREFIX) + 10); + (void) sprintf (fname, "%s/%s%s", CVSADM, CVSPREFIX, file); + rename_file (file, fname); + + /* Create empty FILE. Can't use copy_file with a DEVNULL + argument -- copy_file now ignores device files. */ + fp = fopen (file, "w"); + if (fp == NULL) + error (1, errno, "cannot open %s for writing", file); + if (fclose (fp) < 0) + error (0, errno, "cannot close %s", file); + + /* As we will be hacking the delta date, put the time + this was added into the log message. */ + t = time(NULL); + ct = gmtime(&t); + tmp = xmalloc (strlen (file) + strlen (tag) + 80); + + (void) sprintf (tmp, + "file %s was added on branch %s on %d-%02d-%02d %02d:%02d:%02d +0000", + file, tag, + ct->tm_year + (ct->tm_year < 100 ? 0 : 1900), + ct->tm_mon + 1, ct->tm_mday, + ct->tm_hour, ct->tm_min, ct->tm_sec); + + /* commit a dead revision. */ + revnum = RCS_whatbranch (rcs, tag); + retcode = RCS_checkin (rcs, NULL, tmp, revnum, headtime, + RCS_FLAGS_DEAD | + RCS_FLAGS_QUIET | + RCS_FLAGS_USETIME); + free (revnum); + free (tmp); + + if (retcode != 0) + { + error (retcode == -1 ? 1 : 0, retcode == -1 ? errno : 0, + "could not created dead stub %s for %s", tag, + rcs->path); + goto out; + } + + /* put the new file back where it was */ + rename_file (fname, file); + free (fname); + + /* double-check that the file was written correctly */ + freercsnode (&rcs); + rcs = RCS_parse (file, repository); + if (rcs == NULL) + { + error (0, 0, "could not read %s", rcs->path); + goto out; + } + *rcsnode = rcs; + } } else { /* lock the branch. (stubbed branches need not be locked.) */ if (lock_RCS (file, rcs, NULL, repository)) { - error (0, 0, "cannot lock `%s'.", rcs->path); + error (0, 0, "cannot lock head revision in `%s'.", rcs->path); goto out; } } Index: src/create_adm.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/create_adm.c,v retrieving revision 1.1.1.9 retrieving revision 1.1.1.10 diff -u -p -r1.1.1.9 -r1.1.1.10 --- src/create_adm.c 15 Apr 2004 01:01:55 -0000 1.1.1.9 +++ src/create_adm.c 26 Dec 2007 03:55:02 -0000 1.1.1.10 @@ -1,6 +1,11 @@ /* - * Copyright (c) 1992, Brian Berliner and Jeff Polk - * Copyright (c) 1989-1992, Brian Berliner + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk + * Portions Copyright (C) 1989-1992, Brian Berliner * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS source distribution. Index: src/cvs.h =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/cvs.h,v retrieving revision 1.20 diff -u -p -r1.20 cvs.h --- src/cvs.h 10 Jun 2004 19:12:50 -0000 1.20 +++ src/cvs.h 7 Jan 2008 04:40:44 -0000 @@ -1,6 +1,11 @@ /* - * Copyright (c) 1992, Brian Berliner and Jeff Polk - * Copyright (c) 1989-1992, Brian Berliner + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk + * Portions Copyright (C) 1989-1992, Brian Berliner * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS kit. @@ -209,6 +214,8 @@ extern int errno; #define CVSATTIC "Attic" #define CVSLCK "#cvs.lock" +#define CVSHISTORYLCK "#cvs.history.lock" +#define CVSVALTAGSLCK "#cvs.val-tags.lock" #define CVSRFL "#cvs.rfl" #define CVSWFL "#cvs.wfl" #define CVSRFLPAT "#cvs.rfl.*" /* wildcard expr to match read locks */ @@ -274,7 +281,10 @@ extern int errno; #define EDITOR3_ENV "EDITOR" /* which editor to use */ #define CVSROOT_ENV "CVSROOT" /* source directory root */ -#define CVSROOT_DFLT NULL /* No dflt; must set for checkout */ +/* Define CVSROOT_DFLT to a fallback value for CVSROOT. + * +#undef CVSROOT_DFL + */ #define IGNORE_ENV "CVSIGNORE" /* More files to ignore */ #define WRAPPER_ENV "CVSWRAPPERS" /* name of the wrapper file */ @@ -294,6 +304,9 @@ extern int errno; command line, the client, etc. */ #define MAXDATELEN 50 +/* FreeBSD.org default is to use ssh. */ +#define RSH_DFLT "ssh" + /* The type of an entnode. */ enum ent_type { @@ -426,15 +439,18 @@ int RCS_merge PROTO((RCSNode *, const ch #define RCS_FLAGS_QUIET 4 #define RCS_FLAGS_MODTIME 8 #define RCS_FLAGS_KEEPFILE 16 +#define RCS_FLAGS_USETIME 32 -extern int RCS_exec_rcsdiff PROTO ((RCSNode *rcsfile, - const char *opts, const char *options, +extern int RCS_exec_rcsdiff PROTO ((RCSNode *rcsfile, int diff_argc, + char *const *diff_argv, + const char *options, const char *rev1, const char *rev1_cache, const char *rev2, const char *label1, const char *label2, const char *workfile)); extern int diff_exec PROTO ((const char *file1, const char *file2, const char *label1, const char *label2, - const char *options, const char *out)); + int diff_argc, char *const *diff_argv, + const char *out)); #include "error.h" @@ -458,15 +474,6 @@ char *Name_Repository PROTO((const char const char *Short_Repository PROTO((const char *repository)); void Sanitize_Repository_Name PROTO((char *repository)); -char *Name_Root PROTO((char *dir, char *update_dir)); -void free_cvsroot_t PROTO((cvsroot_t *root_in)); -cvsroot_t *parse_cvsroot PROTO((const char *root)); -cvsroot_t *local_cvsroot PROTO((const char *dir)); -void Create_Root PROTO((const char *dir, const char *rootdir)); -void root_allow_add PROTO ((char *)); -void root_allow_free PROTO ((void)); -int root_allow_ok PROTO ((char *)); - char *previous_rev PROTO ((RCSNode *rcs, const char *rev)); char *gca PROTO ((const char *rev1, const char *rev2)); extern void check_numeric PROTO ((const char *, int, char **)); @@ -576,6 +583,14 @@ void lock_tree_for_write PROTO ((int arg /* See lock.c for description. */ extern void lock_dir_for_write PROTO ((char *)); +/* Get a write lock for the history file. */ +int history_lock PROTO ((const char *)); +void clear_history_lock PROTO ((void)); + +/* Get a write lock for the val-tags file. */ +int val_tags_lock PROTO ((const char *)); +void clear_val_tags_lock PROTO ((void)); + /* LockDir setting from CVSROOT/config. */ extern char *lock_dir; @@ -676,8 +691,6 @@ int SIG_inCrSect PROTO((void)); void read_cvsrc PROTO((int *argc, char ***argv, const char *cmdname)); char *make_message_rcslegal PROTO((const char *message)); -extern int file_has_conflict PROTO ((const struct file_info *, - const char *ts_conflict)); extern int file_has_markers PROTO ((const struct file_info *)); extern void get_file PROTO ((const char *, const char *, const char *, char **, size_t *, size_t *)); @@ -695,6 +708,8 @@ void sleep_past PROTO ((time_t desttime) #define RUN_SIGIGNORE 0x0010 /* ignore interrupts for command */ #define RUN_TTY (char *)0 /* for the benefit of lint */ +void run_add_arg_p PROTO ((int *, size_t *, char ***, const char *s)); +void run_arg_free_p PROTO ((int, char **)); void run_arg PROTO((const char *s)); void run_print PROTO((FILE * fp)); void run_setup PROTO ((const char *prog)); @@ -703,7 +718,7 @@ int run_exec PROTO((const char *stin, co /* other similar-minded stuff from run.c. */ FILE *run_popen PROTO((const char *, const char *)); -int piped_child PROTO((const char **, int *, int *)); +int piped_child PROTO((const char **, int *, int *, int)); void close_on_exec PROTO((int)); pid_t waitpid PROTO((pid_t, int *, int)); Index: src/cvsrc.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/cvsrc.c,v retrieving revision 1.1.1.7 retrieving revision 1.1.1.8 diff -u -p -r1.1.1.7 -r1.1.1.8 --- src/cvsrc.c 15 Apr 2004 01:01:55 -0000 1.1.1.7 +++ src/cvsrc.c 26 Dec 2007 03:55:02 -0000 1.1.1.8 @@ -1,5 +1,10 @@ /* - * Copyright (c) 1993 david d zuhn + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (C) 1993 david d zuhn * * Written by david d `zoo' zuhn while at Cygnus Support * @@ -120,9 +125,9 @@ read_cvsrc (argc, argv, cmdname) if (found) { /* skip over command in the options line */ - for (optstart = strtok (line + command_len, "\t \n"); + for (optstart = strtok (line + command_len, "\t \n\r"); optstart; - optstart = strtok (NULL, "\t \n")) + optstart = strtok (NULL, "\t \n\r")) { new_argv [new_argc++] = xstrdup (optstart); Index: src/diff.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/diff.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -p -r1.21 -r1.22 --- src/diff.c 15 Apr 2004 01:31:28 -0000 1.21 +++ src/diff.c 31 Dec 2007 03:27:32 -0000 1.22 @@ -1,6 +1,11 @@ /* - * Copyright (c) 1992, Brian Berliner and Jeff Polk - * Copyright (c) 1989-1992, Brian Berliner + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk + * Portions Copyright (C) 1989-1992, Brian Berliner * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS source distribution. @@ -63,8 +68,9 @@ static int have_rev1_label, have_rev2_la static char *user_file_rev; static char *options; -static char *opts; -static size_t opts_allocated = 1; +static char **diff_argv; +static int diff_argc; +static size_t diff_arg_allocated; static int diff_errors; static int empty_files = 0; @@ -209,6 +215,54 @@ static struct option const longopts[] = {0, 0, 0, 0} }; + + +/* Add one of OPT or LONGOPT, and ARGUMENT, when present, to global DIFF_ARGV. + * + * INPUTS + * opt A character option representation. + * longopt A long option name. + * argument Optional option argument. + * + * GLOBALS + * diff_argc The number of arguments in DIFF_ARGV. + * diff_argv Array of argument strings. + * diff_arg_allocated Allocated length of DIFF_ARGV. + * + * NOTES + * Behavior when both OPT & LONGOPT are provided is undefined. + * + * RETURNS + * Nothing. + */ +static void +add_diff_args (char opt, const char *longopt, const char *argument) +{ + char *tmp; + + /* Add opt or longopt to diff_arv. */ + assert (opt || (longopt && *longopt)); + assert (!(opt && (longopt && *longopt))); + if (opt) + { + tmp = xmalloc (3); + sprintf (tmp, "-%c", opt); + } + else + { + tmp = xmalloc (3 + strlen (longopt)); + sprintf (tmp, "--%s", longopt); + } + run_add_arg_p (&diff_argc, &diff_arg_allocated, &diff_argv, tmp); + free (tmp); + + /* When present, add ARGUMENT to DIFF_ARGV. */ + if (argument) + run_add_arg_p (&diff_argc, &diff_arg_allocated, &diff_argv, argument); +} + + + /* CVS 1.9 and similar versions seemed to have pretty weird handling of -y and -T. In the cases where it called rcsdiff, they would have the meanings mentioned below. In the cases where it @@ -245,7 +299,6 @@ diff (argc, argv) int argc; char **argv; { - char tmp[50]; int c, err = 0; int local = 0; int which; @@ -265,12 +318,11 @@ diff (argc, argv) /* Clean out our global variables (multiroot can call us multiple times and the server can too, if the client sends several diff commands). */ - if (opts == NULL) + if (diff_argc) { - opts_allocated = 1; - opts = xmalloc (opts_allocated); + run_arg_free_p (diff_argc, diff_argv); + diff_argc = 0; } - opts[0] = '\0'; diff_rev1 = NULL; diff_rev2 = NULL; diff_date1 = NULL; @@ -293,7 +345,7 @@ diff (argc, argv) switch (c) { case 'y': - xrealloc_and_strcat (&opts, &opts_allocated, " --side-by-side"); + add_diff_args (0, "side-by-side", NULL); break; case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'h': case 'i': case 'n': case 'p': case 's': case 't': @@ -301,8 +353,7 @@ diff (argc, argv) case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case 'B': case 'H': case 'T': - (void) sprintf (tmp, " -%c", (char) c); - xrealloc_and_strcat (&opts, &opts_allocated, tmp); + add_diff_args (c, NULL, NULL); break; case 'L': if (have_rev1_label++) @@ -311,33 +362,15 @@ diff (argc, argv) error (0, 0, "extra -L arguments ignored"); break; } - - xrealloc_and_strcat (&opts, &opts_allocated, " -L"); - xrealloc_and_strcat (&opts, &opts_allocated, optarg); - break; + /* Fall through. */ case 'C': case 'F': case 'I': case 'U': case 'W': - (void) sprintf (tmp, " -%c", (char) c); - xrealloc_and_strcat (&opts, &opts_allocated, tmp); - xrealloc_and_strcat (&opts, &opts_allocated, optarg); - break; - case 131: - /* --ifdef. */ - xrealloc_and_strcat (&opts, &opts_allocated, " --ifdef="); - xrealloc_and_strcat (&opts, &opts_allocated, optarg); + add_diff_args (c, NULL, optarg); break; - case 129: case 130: case 132: case 133: case 134: + case 129: case 130: case 131: case 132: case 133: case 134: case 135: case 136: case 137: case 138: case 139: case 140: case 141: case 142: case 143: case 145: case 146: - xrealloc_and_strcat (&opts, &opts_allocated, " --"); - xrealloc_and_strcat (&opts, &opts_allocated, - longopts[option_index].name); - if (longopts[option_index].has_arg == 1 - || (longopts[option_index].has_arg == 2 - && optarg != NULL)) - { - xrealloc_and_strcat (&opts, &opts_allocated, "="); - xrealloc_and_strcat (&opts, &opts_allocated, optarg); - } + add_diff_args (0, longopts[option_index].name, + longopts[option_index].has_arg ? optarg : NULL); break; case 'R': local = 0; @@ -416,7 +449,7 @@ diff (argc, argv) send_arg("-l"); if (empty_files) send_arg("-N"); - send_option_string (opts); + send_options (diff_argc, diff_argv); if (options[0] != '\0') send_arg (options); if (diff_join1) @@ -446,24 +479,24 @@ diff (argc, argv) err = get_responses_and_close (); } else #endif - { - if (diff_rev1 != NULL) - tag_check_valid (diff_rev1, argc, argv, local, 0, ""); - if (diff_rev2 != NULL) - tag_check_valid (diff_rev2, argc, argv, local, 0, ""); - - which = W_LOCAL; - if (diff_rev1 != NULL || diff_date1 != NULL) - which |= W_REPOS | W_ATTIC; - - wrap_setup (); - - /* start the recursion processor */ - err = start_recursion (diff_fileproc, diff_filesdoneproc, diff_dirproc, - diff_dirleaveproc, NULL, argc, argv, local, - which, 0, CVS_LOCK_READ, (char *) NULL, 1, - (char *) NULL); - } + { /* FreeBSD addition - warning idention not changed til matching-} */ + if (diff_rev1 != NULL) + tag_check_valid (diff_rev1, argc, argv, local, 0, ""); + if (diff_rev2 != NULL) + tag_check_valid (diff_rev2, argc, argv, local, 0, ""); + + which = W_LOCAL; + if (diff_rev1 != NULL || diff_date1 != NULL) + which |= W_REPOS | W_ATTIC; + + wrap_setup (); + + /* start the recursion processor */ + err = start_recursion (diff_fileproc, diff_filesdoneproc, diff_dirproc, + diff_dirleaveproc, NULL, argc, argv, local, + which, 0, CVS_LOCK_READ, (char *) NULL, 1, + (char *) NULL); + } /* FreeBSD addition */ /* clean up */ free (options); @@ -522,7 +555,7 @@ diff_fileproc (callerdat, finfo) int exists; exists = 0; - /* special handling for TAG_HEAD XXX */ + /* special handling for TAG_HEAD */ if (diff_rev1 && strcmp (diff_rev1, TAG_HEAD) == 0) { char *head = @@ -733,8 +766,8 @@ RCS file: ", 0); if (empty_file == DIFF_ADDED) { if (use_rev2 == NULL) - status = diff_exec (DEVNULL, finfo->file, label1, label2, opts, - RUN_TTY); + status = diff_exec (DEVNULL, finfo->file, label1, label2, + diff_argc, diff_argv, RUN_TTY); else { int retcode; @@ -750,7 +783,8 @@ RCS file: ", 0); if( retcode != 0 ) goto out; - status = diff_exec (DEVNULL, tmp, label1, label2, opts, RUN_TTY); + status = diff_exec (DEVNULL, tmp, label1, label2, + diff_argc, diff_argv, RUN_TTY); } } else @@ -766,16 +800,16 @@ RCS file: ", 0); if (retcode != 0) goto out; - status = diff_exec (tmp, DEVNULL, label1, label2, opts, RUN_TTY); + status = diff_exec (tmp, DEVNULL, label1, label2, + diff_argc, diff_argv, RUN_TTY); } } else { - status = RCS_exec_rcsdiff(vers->srcfile, opts, - *options ? options : vers->options, - use_rev1, rev1_cache, use_rev2, - label1, label2, - finfo->file); + status = RCS_exec_rcsdiff (vers->srcfile, diff_argc, diff_argv, + *options ? options : vers->options, + use_rev1, rev1_cache, use_rev2, + label1, label2, finfo->file); } @@ -919,7 +953,7 @@ diff_file_nodiff( finfo, vers, empty_fil if (diff_rev1 || diff_date1) { - /* special handling for TAG_HEAD XXX */ + /* special handling for TAG_HEAD */ if (diff_rev1 && strcmp (diff_rev1, TAG_HEAD) == 0) { if (vers->vn_rcs != NULL && vers->srcfile != NULL) @@ -935,7 +969,7 @@ diff_file_nodiff( finfo, vers, empty_fil } if (diff_rev2 || diff_date2) { - /* special handling for TAG_HEAD XXX */ + /* special handling for TAG_HEAD */ if (diff_rev2 && strcmp (diff_rev2, TAG_HEAD) == 0) { if (vers->vn_rcs != NULL && vers->srcfile != NULL) Index: src/edit.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/edit.c,v retrieving revision 1.1.1.11 retrieving revision 1.1.1.12 diff -u -p -r1.1.1.11 -r1.1.1.12 --- src/edit.c 15 Apr 2004 01:01:55 -0000 1.1.1.11 +++ src/edit.c 26 Dec 2007 03:55:02 -0000 1.1.1.12 @@ -32,7 +32,10 @@ onoff_fileproc (callerdat, finfo) void *callerdat; struct file_info *finfo; { + char *watched = fileattr_get0 (finfo->file, "_watched"); fileattr_set (finfo->file, "_watched", turning_on ? "" : NULL); + if (watched != NULL) + free (watched); return 0; } @@ -50,7 +53,12 @@ onoff_filesdoneproc (callerdat, err, rep List *entries; { if (setting_default) + { + char *watched = fileattr_get0 (NULL, "_watched"); fileattr_set (NULL, "_watched", turning_on ? "" : NULL); + if (watched != NULL) + free (watched); + } return err; } @@ -357,12 +365,12 @@ edit_fileproc (callerdat, finfo) static const char *const edit_usage[] = { - "Usage: %s %s [-lR] [files...]\n", - "-l: Local directory only, not recursive\n", - "-R: Process directories recursively\n", - "-a: Specify what actions for temporary watch, one of\n", - " edit,unedit,commit,all,none\n", - "(Specify the --help global option for a list of other help options)\n", + "Usage: %s %s [-lR] [-a ]... []...\n", + "-l\tLocal directory only, not recursive.\n", + "-R\tProcess directories recursively (default).\n", + "-a\tSpecify action to register for temporary watch, one of:\n", + " \t`edit', `unedit', `commit', `all', or `none' (defaults to `all').\n", + "(Specify the --help global option for a list of other help options.)\n", NULL }; @@ -572,10 +580,10 @@ unedit_fileproc (callerdat, finfo) static const char *const unedit_usage[] = { - "Usage: %s %s [-lR] [files...]\n", - "-l: Local directory only, not recursive\n", - "-R: Process directories recursively\n", - "(Specify the --help global option for a list of other help options)\n", + "Usage: %s %s [-lR] []...\n", + "-l\tLocal directory only, not recursive.\n", + "-R\tProcess directories recursively (default).\n", + "(Specify the --help global option for a list of other help options.)\n", NULL }; @@ -1041,10 +1049,10 @@ notify_check (repository, update_dir) static const char *const editors_usage[] = { - "Usage: %s %s [-lR] [files...]\n", - "\t-l\tProcess this directory only (not recursive).\n", - "\t-R\tProcess directories recursively.\n", - "(Specify the --help global option for a list of other help options)\n", + "Usage: %s %s [-lR] []...\n", + "-l\tProcess this directory only (not recursive).\n", + "-R\tProcess directories recursively (default).\n", + "(Specify the --help global option for a list of other help options.)\n", NULL }; Index: src/entries.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/entries.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -p -r1.4 -r1.5 --- src/entries.c 15 Apr 2004 01:41:05 -0000 1.4 +++ src/entries.c 2 Jan 2008 08:57:42 -0000 1.5 @@ -1,6 +1,11 @@ /* - * Copyright (c) 1992, Brian Berliner and Jeff Polk - * Copyright (c) 1989-1992, Brian Berliner + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk + * Portions Copyright (C) 1989-1992, Brian Berliner * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS source distribution. @@ -540,6 +545,7 @@ Entries_Open (aflag, update_dir) break; default: /* Ignore unrecognized commands. */ + Entnode_Destroy (ent); break; } } Index: src/expand_path.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/expand_path.c,v retrieving revision 1.1.1.6 retrieving revision 1.1.1.7 diff -u -p -r1.1.1.6 -r1.1.1.7 --- src/expand_path.c 15 Apr 2004 01:01:55 -0000 1.1.1.6 +++ src/expand_path.c 26 Dec 2007 03:55:03 -0000 1.1.1.7 @@ -1,5 +1,17 @@ /* expand_path.c -- expand environmental variables in passed in string * + * Copyright (C) 1995-2005 The 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. + * * The main routine is expand_path(), it is the routine that handles * the '~' character in four forms: * ~name @@ -97,16 +109,14 @@ expand_path (name, file, line) const char *file; int line; { - const char *s; - char *d; + size_t s, d, p; + char *e; char *mybuf = NULL; size_t mybuf_size = 0; char *buf = NULL; size_t buf_size = 0; - size_t doff; - char *result; /* Sorry this routine is so ugly; it is a head-on collision @@ -117,82 +127,74 @@ expand_path (name, file, line) thusly. */ /* First copy from NAME to MYBUF, expanding $ as we go. */ - s = name; - d = mybuf; - doff = d - mybuf; - expand_string (&mybuf, &mybuf_size, doff + 1); - d = mybuf + doff; - while ((*d++ = *s)) + s = d = 0; + while (name[s] != '\0') { - if (*s++ == '$') + if (name[s] == '$') { - char *p = d; - char *e; - int flag = (*s == '{'); - - doff = d - mybuf; - expand_string (&mybuf, &mybuf_size, doff + 1); - d = mybuf + doff; - for (; (*d++ = *s); s++) + p = d; + if (name[++s] == '{') { - if (flag - ? *s =='}' - : isalnum ((unsigned char) *s) == 0 && *s != '_') - break; - doff = d - mybuf; - expand_string (&mybuf, &mybuf_size, doff + 1); - d = mybuf + doff; + while (name[++s] != '}' && name[s] != '\0') + { + expand_string (&mybuf, &mybuf_size, p + 1); + mybuf[p++] = name[s]; + } + if (name[s] != '\0') ++s; } - *--d = '\0'; - e = expand_variable (&p[flag], file, line); - - if (e) + else { - doff = d - mybuf; - expand_string (&mybuf, &mybuf_size, doff + 1); - d = mybuf + doff; - for (d = &p[-1]; (*d++ = *e++);) + while (isalnum ((unsigned char) name[s]) || name[s] == '_') { - doff = d - mybuf; - expand_string (&mybuf, &mybuf_size, doff + 1); - d = mybuf + doff; + expand_string (&mybuf, &mybuf_size, p + 1); + mybuf[p++] = name[s++]; } - --d; - if (flag && *s) - s++; + } + expand_string (&mybuf, &mybuf_size, p + 1); + mybuf[p] = '\0'; + e = expand_variable (mybuf + d, file, line); + + if (e) + { + p = strlen(e); + expand_string (&mybuf, &mybuf_size, d + p); + memcpy(mybuf + d, e, p); + d += p; } else /* expand_variable has already printed an error message. */ goto error_exit; } - doff = d - mybuf; - expand_string (&mybuf, &mybuf_size, doff + 1); - d = mybuf + doff; + else + { + expand_string (&mybuf, &mybuf_size, d + 1); + mybuf[d++] = name[s++]; + } } - doff = d - mybuf; - expand_string (&mybuf, &mybuf_size, doff + 1); - d = mybuf + doff; - *d = '\0'; + expand_string (&mybuf, &mybuf_size, d + 1); + mybuf[d++] = '\0'; /* Then copy from MYBUF to BUF, expanding ~. */ - s = mybuf; - d = buf; + s = d = 0; /* If you don't want ~username ~/ to be expanded simply remove * This entire if statement including the else portion */ - if (*s++ == '~') + if (mybuf[s] == '~') { - char *t; - char *p, *pstart; - pstart = p = xstrdup (s); - if (*pstart=='/' || *pstart==0) - t = get_homedir (); + p = d; + while (mybuf[++s] != '/' && mybuf[s] != '\0') + { + expand_string (&buf, &buf_size, p + 1); + buf[p++] = name[s]; + } + expand_string (&buf, &buf_size, p + 1); + buf[p] = '\0'; + + if (p == d) + e = get_homedir (); else { #ifdef GETPWNAM_MISSING - for (; *p!='/' && *p; p++) - ; - *p = 0; if (line != 0) error (0, 0, "%s:%d:tilde expansion not supported on this system", @@ -200,57 +202,34 @@ expand_path (name, file, line) else error (0, 0, "%s:tilde expansion not supported on this system", file); - return NULL; + goto error_exit; #else struct passwd *ps; - for (; *p!='/' && *p; p++) - ; - *p = 0; - ps = getpwnam (pstart); - if (ps == 0) + ps = getpwnam (buf + d); + if (ps == NULL) { if (line != 0) error (0, 0, "%s:%d: no such user %s", - file, line, pstart); + file, line, buf + d); else - error (0, 0, "%s: no such user %s", file, pstart); - return NULL; + error (0, 0, "%s: no such user %s", file, buf + d); + goto error_exit; } - t = ps->pw_dir; + e = ps->pw_dir; #endif } - if (t == NULL) + if (e == NULL) error (1, 0, "cannot find home directory"); - doff = d - buf; - expand_string (&buf, &buf_size, doff + 1); - d = buf + doff; - while ((*d++ = *t++)) - { - doff = d - buf; - expand_string (&buf, &buf_size, doff + 1); - d = buf + doff; - } - --d; - s+=p-pstart; - free (pstart); - } - else - --s; - /* Kill up to here */ - doff = d - buf; - expand_string (&buf, &buf_size, doff + 1); - d = buf + doff; - while ((*d++ = *s++)) - { - doff = d - buf; - expand_string (&buf, &buf_size, doff + 1); - d = buf + doff; + p = strlen(e); + expand_string (&buf, &buf_size, d + p); + memcpy(buf + d, e, p); + d += p; } - doff = d - buf; - expand_string (&buf, &buf_size, doff + 1); - d = buf + doff; - *d = '\0'; + /* Kill up to here */ + p = strlen(mybuf + s) + 1; + expand_string (&buf, &buf_size, d + p); + memcpy(buf + d, mybuf + s, p); /* OK, buf contains the value we want to return. Clean up and return it. */ Index: src/fileattr.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/fileattr.c,v retrieving revision 1.1.1.6 retrieving revision 1.1.1.7 diff -u -p -r1.1.1.6 -r1.1.1.7 --- src/fileattr.c 15 Apr 2004 01:01:55 -0000 1.1.1.6 +++ src/fileattr.c 26 Dec 2007 03:55:03 -0000 1.1.1.7 @@ -139,6 +139,7 @@ fileattr_read () "file attribute database corruption: tab missing in %s", fname); ++p; + if (fileattr_default_attrs) free (fileattr_default_attrs); fileattr_default_attrs = xstrdup (p); } else @@ -589,6 +590,7 @@ fileattr_write () { error (0, errno, "cannot make directory %s", repname); (void) umask (omask); + free (fname); free (repname); return; } @@ -600,6 +602,7 @@ fileattr_write () { error (0, errno, "cannot write %s", fname); (void) umask (omask); + free (fname); return; } } Index: src/filesubr.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/filesubr.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -p -r1.13 -r1.14 --- src/filesubr.c 31 Dec 2007 03:39:17 -0000 1.13 +++ src/filesubr.c 31 Dec 2007 03:59:16 -0000 1.14 @@ -24,6 +24,8 @@ #include #include "cvs.h" +#include "xsize.h" + static int deep_remove_dir PROTO((const char *path)); /* @@ -109,7 +111,7 @@ copy_file (from, to) error (1, errno, "cannot close %s", to); } - /* now, set the times for the copied file to match those of the original */ + /* preserve last access & modification times */ memset ((char *) &t, 0, sizeof (t)); t.actime = sb.st_atime; t.modtime = sb.st_mtime; @@ -437,14 +439,10 @@ unlink_file_dir (f) { struct stat sb; - if (trace -#ifdef SERVER_SUPPORT - /* This is called by the server parent process in contexts where - it is not OK to send output (e.g. after we sent "ok" to the - client). */ - && !server_active -#endif - ) + /* This is called by the server parent process in contexts where + it is not OK to send output (e.g. after we sent "ok" to the + client). */ + if (trace && !server_active) (void) fprintf (stderr, "-> unlink_file_dir(%s)\n", f); if (noexec) @@ -708,7 +706,8 @@ cvs_temp_name () fp = cvs_temp_file (&fn); if (fp == NULL) - error (1, errno, "Failed to create temporary file"); + error (1, errno, "Failed to create temporary file %s", + fn ? fn : "(null)"); if (fclose (fp) == EOF) error (0, errno, "Failed to close temporary file %s", fn); return fn; @@ -745,7 +744,8 @@ cvs_temp_name () * NFS locking thing, but until I hear of more problems, I'm not going to * bother. */ -FILE *cvs_temp_file (filename) +FILE * +cvs_temp_file (filename) char **filename; { char *fn; @@ -784,7 +784,11 @@ FILE *cvs_temp_file (filename) errno = save_errno; } - if (fp == NULL) free (fn); + if (fp == NULL) + { + free (fn); + fn = NULL; + } /* mkstemp is defined to open mode 0600 using glibc 2.0.7+ */ /* FIXME - configure can probably tell us which version of glibc we are * linking to and not chmod for 2.0.7+ @@ -799,7 +803,11 @@ FILE *cvs_temp_file (filename) fn = tempnam (Tmpdir, "cvs"); if (fn == NULL) fp = NULL; - else if ((fp = CVS_FOPEN (fn, "w+")) == NULL) free (fn); + else if ((fp = CVS_FOPEN (fn, "w+")) == NULL) + { + free (fn); + fn = NULL; + } else chmod (fn, 0600); /* tempnam returns a pointer to a newly malloc'd string, so there's @@ -849,6 +857,11 @@ FILE *cvs_temp_file (filename) #endif *filename = fn; + if (fn == NULL && fp != NULL) + { + fclose (fp); + fp = NULL; + } return fp; } @@ -871,32 +884,48 @@ FILE *cvs_temp_file (filename) * This function exits with a fatal error if it fails to read the link for * any reason. */ +#define MAXSIZE (SIZE_MAX < SSIZE_MAX ? SIZE_MAX : SSIZE_MAX) + char * xreadlink (link) const char *link; { char *file = NULL; - int buflen = BUFSIZ; - int link_name_len; + size_t buflen = BUFSIZ; - /* Get the name of the file to which `from' is linked. - FIXME: what portability issues arise here? Are readlink & - ENAMETOOLONG defined on all systems? -twp */ - do + /* Get the name of the file to which `from' is linked. */ + while (1) { + ssize_t r; + size_t link_name_len; + file = xrealloc (file, buflen); - errno = 0; - link_name_len = readlink (link, file, buflen - 1); - buflen *= 2; - } - while (link_name_len < 0 && errno == ENAMETOOLONG); + r = readlink (link, file, buflen); + link_name_len = r; - if (link_name_len < 0) - error (1, errno, "cannot readlink %s", link); + if (r < 0 +#ifdef ERANGE + /* AIX 4 and HP-UX report ERANGE if the buffer is too small. */ + && errno != ERANGE +#endif + ) + error (1, errno, "cannot readlink %s", link); - file[link_name_len] = '\0'; + /* If there is space for the NUL byte, set it and return. */ + if (r >= 0 && link_name_len < buflen) + { + file[link_name_len] = '\0'; + return file; + } - return file; + if (buflen <= MAXSIZE / 2) + buflen *= 2; + else if (buflen < MAXSIZE) + buflen = MAXSIZE; + else + /* Our buffer cannot grow any bigger. */ + error (1, ENAMETOOLONG, "cannot readlink %s", link); + } } #endif /* HAVE_READLINK */ @@ -949,7 +978,8 @@ last_component (path) const char *path; { const char *last = strrchr (path, '/'); - + + assert (path); if (last && (last != path)) return last + 1; else @@ -989,11 +1019,7 @@ get_homedir () if (home != NULL) return home; - if ( -#ifdef SERVER_SUPPORT - !server_active && -#endif - (env = getenv ("HOME")) != NULL) + if (!server_active && (env = getenv ("HOME")) != NULL) home = env; else if ((pw = (struct passwd *) getpwuid (getuid ())) && pw->pw_dir) @@ -1034,6 +1060,7 @@ expand_wild (argc, argv, pargc, pargv) char ***pargv; { int i; + assert (argv || !argc); if (size_overflow_p (xtimes (argc, sizeof (char *)))) { *pargc = 0; *pargv = NULL; Index: src/find_names.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/find_names.c,v retrieving revision 1.1.1.9 retrieving revision 1.1.1.10 diff -u -p -r1.1.1.9 -r1.1.1.10 --- src/find_names.c 15 Apr 2004 01:01:55 -0000 1.1.1.9 +++ src/find_names.c 26 Dec 2007 03:55:03 -0000 1.1.1.10 @@ -1,6 +1,11 @@ /* - * Copyright (c) 1992, Brian Berliner and Jeff Polk - * Copyright (c) 1989-1992, Brian Berliner + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk + * Portions Copyright (C) 1989-1992, Brian Berliner * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS source distribution. Index: src/hardlink.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/hardlink.c,v retrieving revision 1.1.1.5 retrieving revision 1.1.1.6 diff -u -p -r1.1.1.5 -r1.1.1.6 --- src/hardlink.c 15 Apr 2004 01:01:55 -0000 1.1.1.5 +++ src/hardlink.c 26 Dec 2007 03:55:03 -0000 1.1.1.6 @@ -11,7 +11,9 @@ /* Collect and manage hardlink info associated with a particular file. */ #include "cvs.h" -#include "hardlink.h" + +#ifdef PRESERVE_PERMISSIONS_SUPPORT +# include "hardlink.h" /* The structure currently used to manage hardlink info is a list. Therefore, most of the functions which manipulate hardlink data @@ -302,4 +304,4 @@ find_checkedout_proc (node, data) return 0; } - +#endif /* PRESERVE_PERMISSIONS_SUPPORT */ Index: src/hardlink.h =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/hardlink.h,v retrieving revision 1.1.1.2 retrieving revision 1.1.1.3 diff -u -p -r1.1.1.2 -r1.1.1.3 --- src/hardlink.h 18 Mar 1999 09:21:30 -0000 1.1.1.2 +++ src/hardlink.h 26 Dec 2007 03:55:03 -0000 1.1.1.3 @@ -17,6 +17,7 @@ when files are being checked out or updated. It is used only when hardlinked files are being checked out. */ +#ifdef PRESERVE_PERMISSIONS_SUPPORT struct hardlink_info { Ctype status; /* as returned from Classify_File() */ @@ -31,3 +32,4 @@ void update_hardlink_info PROTO ((const List *list_linked_files_on_disk PROTO ((char *)); int compare_linkage_lists PROTO ((List *, List *)); int find_checkedout_proc PROTO ((Node *, void *)); +#endif /* PRESERVE_PERMISSIONS_SUPPORT */ Index: src/hash.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/hash.c,v retrieving revision 1.1.1.6 retrieving revision 1.1.1.7 diff -u -p -r1.1.1.6 -r1.1.1.7 --- src/hash.c 15 Apr 2004 01:01:55 -0000 1.1.1.6 +++ src/hash.c 26 Dec 2007 03:55:03 -0000 1.1.1.7 @@ -1,5 +1,10 @@ /* - * Copyright (c) 1992, Brian Berliner and Jeff Polk + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS source distribution. Index: src/hash.h =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/hash.h,v retrieving revision 1.1.1.6 retrieving revision 1.1.1.7 diff -u -p -r1.1.1.6 -r1.1.1.7 --- src/hash.h 15 Apr 2004 01:01:55 -0000 1.1.1.6 +++ src/hash.h 26 Dec 2007 03:55:03 -0000 1.1.1.7 @@ -1,5 +1,10 @@ /* - * Copyright (c) 1992, Brian Berliner and Jeff Polk + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS source distribution. Index: src/history.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/history.c,v retrieving revision 1.1.1.12 retrieving revision 1.1.1.13 diff -u -p -r1.1.1.12 -r1.1.1.13 --- src/history.c 10 Jun 2004 19:05:37 -0000 1.1.1.12 +++ src/history.c 26 Dec 2007 03:55:03 -0000 1.1.1.13 @@ -1,9 +1,18 @@ /* + * Copyright (C) 1994-2005 The Free Software Foundation, Inc. * - * You may distribute under the terms of the GNU General Public License - * as specified in the README file that comes with the CVS 1.0 kit. - * - * **************** History of Users and Module **************** + * 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. + */ + +/* **************** History of Users and Module **************** * * LOGGING: Append record to "${CVSROOT}/CVSROOTADM/CVSROOTADM_HISTORY". * @@ -236,7 +245,7 @@ static short tz_local; static time_t tz_seconds_east_of_GMT; static char *tz_name = "+0000"; -char *logHistory = ALL_HISTORY_REC_TYPES; +char *logHistory; /* -r, -t, or -b options, malloc'd. These are "" if the option in question is not specified or is overridden by another option. The @@ -257,24 +266,24 @@ static struct hrec *last_backto; we do. */ static char *rec_types; -static int hrec_count; -static int hrec_max; +static size_t hrec_count; +static size_t hrec_max; static char **user_list; /* Ptr to array of ptrs to user names */ -static int user_max; /* Number of elements allocated */ -static int user_count; /* Number of elements used */ +static size_t user_max; /* Number of elements allocated */ +static size_t user_count; /* Number of elements used */ static struct file_list_str { char *l_file; char *l_module; } *file_list; /* Ptr to array file name structs */ -static int file_max; /* Number of elements allocated */ -static int file_count; /* Number of elements used */ +static size_t file_max; /* Number of elements allocated */ +static size_t file_count; /* Number of elements used */ static char **mod_list; /* Ptr to array of ptrs to module names */ -static int mod_max; /* Number of elements allocated */ -static int mod_count; /* Number of elements used */ +static size_t mod_max; /* Number of elements allocated */ +static size_t mod_count; /* Number of elements used */ static char *histfile; /* Ptr to the history file name */ @@ -442,7 +451,7 @@ history (argc, argv) backto = xstrdup (optarg); break; case 'f': /* For specified file */ - save_file ("", optarg, (char *) NULL); + save_file (NULL, optarg, NULL); break; case 'm': /* Full module report */ if (!module_report++) report_count++; @@ -451,7 +460,7 @@ history (argc, argv) save_module (optarg); break; case 'p': /* For specified directory */ - save_file (optarg, "", (char *) NULL); + save_file (optarg, NULL, NULL); break; case 'r': /* Since specified Tag/Rev */ if (since_date || *since_tag || *backto) @@ -534,7 +543,7 @@ history (argc, argv) argc -= optind; argv += optind; for (i = 0; i < argc; i++) - save_file ("", argv[i], (char *) NULL); + save_file (NULL, argv[i], NULL); /* ================ Now analyze the arguments a bit */ @@ -724,9 +733,10 @@ history_write (type, update_dir, revs, n * readonlyfs. */ return; - if ( strchr(logHistory, type) == NULL ) + if (strchr (logHistory, type) == NULL) return; - fname = xmalloc (strlen (current_parsed_root->directory) + sizeof (CVSROOTADM) + fname = xmalloc (strlen (current_parsed_root->directory) + + sizeof (CVSROOTADM) + sizeof (CVSROOTADM_HISTORY) + 3); (void) sprintf (fname, "%s/%s/%s", current_parsed_root->directory, CVSROOTADM, CVSROOTADM_HISTORY); @@ -752,6 +762,11 @@ history_write (type, update_dir, revs, n CLIENT_SERVER_STR, fname); if (noexec) goto out; + + if (!history_lock (current_parsed_root->directory)) + /* history_lock() will already have printed an error on failure. */ + goto out; + fd = CVS_OPEN (fname, O_WRONLY | O_APPEND | OPEN_BINARY, 0666); if (fd < 0) { @@ -789,7 +804,7 @@ history_write (type, update_dir, revs, n if (save_cwd (&cwd)) error_exit (); - if ( CVS_CHDIR (pwdir) < 0 || (homedir = xgetwd ()) == NULL) + if (CVS_CHDIR (pwdir) < 0 || (homedir = xgetwd ()) == NULL) homedir = pwdir; if (restore_cwd (&cwd, NULL)) @@ -896,6 +911,7 @@ history_write (type, update_dir, revs, n error (1, errno, "cannot close history file: %s", fname); free (workdir); out: + clear_history_lock (); free (fname); } @@ -910,7 +926,8 @@ save_user (name) if (user_count == user_max) { user_max = xsum (user_max, USER_INCREMENT); - if (size_overflow_p (xtimes (user_max, sizeof (char *)))) + if (user_count == user_max + || size_overflow_p (xtimes (user_max, sizeof (char *)))) { error (0, 0, "save_user: too many users"); return; @@ -944,7 +961,8 @@ save_file (dir, name, module) if (file_count == file_max) { file_max = xsum (file_max, FILE_INCREMENT); - if (size_overflow_p (xtimes (file_max, sizeof (*fl)))) + if (file_count == file_max + || size_overflow_p (xtimes (file_max, sizeof (*fl)))) { error (0, 0, "save_file: too many files"); return; @@ -952,7 +970,9 @@ save_file (dir, name, module) file_list = xrealloc (file_list, xtimes (file_max, sizeof (*fl))); } fl = &file_list[file_count++]; - fl->l_file = cp = xmalloc (strlen (dir) + strlen (name) + 2); + fl->l_file = cp = xmalloc (dir ? strlen (dir) : 0 + + name ? strlen (name) : 0 + + 2); fl->l_module = module; if (dir && *dir) @@ -989,7 +1009,8 @@ save_module (module) if (mod_count == mod_max) { mod_max = xsum (mod_max, MODULE_INCREMENT); - if (size_overflow_p (xtimes (mod_max, sizeof (char *)))) + if (mod_count == mod_max + || size_overflow_p (xtimes (mod_max, sizeof (char *)))) { error (0, 0, "save_module: too many modules"); return; @@ -1142,9 +1163,13 @@ read_hrecs (fname) { struct hrec *old_head = hrec_head; - hrec_max += HREC_INCREMENT; - hrec_head = xrealloc ((char *) hrec_head, - hrec_max * sizeof (struct hrec)); + hrec_max = xsum (hrec_max, HREC_INCREMENT); + if (hrec_count == hrec_max + || size_overflow_p (xtimes (hrec_max, sizeof (struct hrec)))) + error (1, 0, "Too many history records in history file."); + + hrec_head = xrealloc (hrec_head, + xtimes (hrec_max, sizeof (struct hrec))); if (last_since_tag) last_since_tag = hrec_head + (last_since_tag - old_head); if (last_backto) @@ -1393,6 +1418,8 @@ select_hrec (hr) if (within (cp, cp2)) { hr->mod = fl->l_module; + if (cmpfile != NULL) + free (cmpfile); break; } if (cmpfile != NULL) Index: src/history.h =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/history.h,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.2 diff -u -p -r1.1.1.1 -r1.1.1.2 --- src/history.h 15 Apr 2004 01:01:55 -0000 1.1.1.1 +++ src/history.h 26 Dec 2007 03:55:03 -0000 1.1.1.2 @@ -1,6 +1,8 @@ /* - * Copyright (c) 2003, Derek Price, Ximbiot , - * and the Free Software Foundation + * Copyright (C) 2003-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 2003-2005 Derek Price, Ximbiot , + * and others. * * You may distribute under the terms of the GNU General Public License * as specified in the README file that comes with the CVS source Index: src/ignore.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/ignore.c,v retrieving revision 1.1.1.10 retrieving revision 1.1.1.11 diff -u -p -r1.1.1.10 -r1.1.1.11 --- src/ignore.c 10 Jun 2004 19:05:37 -0000 1.1.1.10 +++ src/ignore.c 26 Dec 2007 03:55:03 -0000 1.1.1.11 @@ -65,13 +65,11 @@ ign_setup () ign_add (tmp, 0); free (tmp); -#ifdef CLIENT_SUPPORT /* The client handles another way, by (after it does its own ignore file processing, and only if !ign_inhibit_server), letting the server know about the files and letting it decide whether to ignore them based on CVSROOOTADM_IGNORE. */ if (!current_parsed_root->isremote) -#endif { char *file = xmalloc (strlen (current_parsed_root->directory) + sizeof (CVSROOTADM) + sizeof (CVSROOTADM_IGNORE) + 10); @@ -237,10 +235,25 @@ ign_add (ign, hold) free (ign_list[i]); ign_hold = -1; } - s_ign_list = (char **) xmalloc (ign_count * sizeof (char *)); - for (i = 0; i < ign_count; i++) - s_ign_list[i] = ign_list[i]; - s_ign_count = ign_count; + if (s_ign_list) + { + /* Don't save the ignore list twice - if there are two + * bangs in a local .cvsignore file then we don't want to + * save the new list the first bang created. + * + * We still need to free the "new" ignore list. + */ + for (i = 0; i < ign_count; i++) + free (ign_list[i]); + } + else + { + /* Save the ignore list for later. */ + s_ign_list = xmalloc (ign_count * sizeof (char *)); + for (i = 0; i < ign_count; i++) + s_ign_list[i] = ign_list[i]; + s_ign_count = ign_count; + } ign_count = 1; /* Always ignore the "CVS" directory. */ ign_list[0] = xstrdup ("CVS"); @@ -331,7 +344,7 @@ ignore_directory (name) i = dir_ign_current; while (i--) { - if (strncmp (name, dir_ign_list[i], strlen (dir_ign_list[i])) == 0) + if (strncmp (name, dir_ign_list[i], strlen (dir_ign_list[i])+1) == 0) return 1; } Index: src/import.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/import.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -p -r1.12 -r1.13 --- src/import.c 15 Apr 2004 01:17:27 -0000 1.12 +++ src/import.c 2 Jan 2008 08:58:40 -0000 1.13 @@ -1,6 +1,11 @@ /* - * Copyright (c) 1992, Brian Berliner and Jeff Polk - * Copyright (c) 1989-1992, Brian Berliner + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk + * Portions Copyright (C) 1989-1992, Brian Berliner * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS source distribution. @@ -14,8 +19,6 @@ * VendorReleTag Tag for this particular release * * Additional arguments specify more Vendor Release Tags. - * - * $FreeBSD$ */ #include "cvs.h" @@ -86,17 +89,14 @@ import (argc, argv) { case 'Q': case 'q': -#ifdef SERVER_SUPPORT /* The CVS 1.5 client sends these options (in addition to Global_option requests), so we must ignore them. */ if (!server_active) -#endif error (1, 0, "-q or -Q must be specified before \"%s\"", cvs_cmd_name); break; case 'd': -#ifdef SERVER_SUPPORT if (server_active) { /* CVS 1.10 and older clients will send this, but it @@ -106,7 +106,6 @@ import (argc, argv) "warning: not setting the time of import from the file"); error (0, 0, "due to client limitations"); } -#endif use_file_modtime = 1; break; case 'b': @@ -119,6 +118,7 @@ import (argc, argv) #else use_editor = 0; #endif + if (message) free (message); message = xstrdup(optarg); break; case 'I': @@ -145,7 +145,6 @@ import (argc, argv) if (argc < 3) usage (import_usage); -#ifdef SERVER_SUPPORT /* This is for handling the Checkin-time request. It might seem a bit odd to enable the use_file_modtime code even in the case where Checkin-time was not sent for a particular file. The @@ -157,7 +156,6 @@ import (argc, argv) if (server_active) use_file_modtime = 1; -#endif /* Don't allow "CVS" as any directory in module path. * @@ -214,11 +212,22 @@ import (argc, argv) * support branching to a single level, so the specified vendor branch * must only have two dots in it (like "1.1.1"). */ - for (cp = vbranch; *cp != '\0'; cp++) - if (!isdigit ((unsigned char) *cp) && *cp != '.') - error (1, 0, "%s is not a numeric branch", vbranch); - if (numdots (vbranch) != 2) - error (1, 0, "Only branches with two dots are supported: %s", vbranch); + { + regex_t pat; + int ret = regcomp (&pat, "^[1-9][0-9]*\\.[1-9][0-9]*\\.[1-9][0-9]*$", + REG_EXTENDED); + assert (!ret); + if (regexec (&pat, vbranch, 0, NULL, 0)) + { + error (1, 0, +"Only numeric branch specifications with two dots are\n" +"supported by import, not `%s'. For example: `1.1.1'.", + vbranch); + } + regfree (&pat); + } + + /* Set vhead to the branch's parent. */ vhead = xstrdup (vbranch); cp = strrchr (vhead, '.'); *cp = '\0'; @@ -232,17 +241,10 @@ import (argc, argv) } #endif - if ( -#ifdef SERVER_SUPPORT - !server_active && -#endif - use_editor) + if (!server_active && use_editor) { do_editor ((char *) NULL, &message, -#ifdef CLIENT_SUPPORT - current_parsed_root->isremote ? (char *) NULL : -#endif - repository, + current_parsed_root->isremote ? (char *) NULL : repository, (List *) NULL); } do_verify (&message, repository); @@ -315,7 +317,8 @@ import (argc, argv) /* Create the logfile that will be logged upon completion */ if ((logfp = cvs_temp_file (&tmpfile)) == NULL) - error (1, errno, "cannot create temporary file `%s'", tmpfile); + error (1, errno, "cannot create temporary file `%s'", + tmpfile ? tmpfile : "(null)"); /* On systems where we can unlink an open file, do so, so it will go away no matter how we exit. FIXME-maybe: Should be checking for errors but I'm not sure which error(s) we get if we are on a system @@ -436,6 +439,9 @@ import_descend (message, vtag, targc, ta ign_add_file (CVSDOTIGNORE, 1); wrap_add_file (CVSDOTWRAPPER, 1); + if (!current_parsed_root->isremote) + lock_dir_for_write (repository); + if ((dirp = CVS_OPENDIR (".")) == NULL) { error (0, errno, "cannot open directory"); @@ -448,13 +454,13 @@ import_descend (message, vtag, targc, ta { if (strcmp (dp->d_name, ".") == 0 || strcmp (dp->d_name, "..") == 0) goto one_more_time_boys; -#ifdef SERVER_SUPPORT + /* CVS directories are created in the temp directory by server.c because it doesn't special-case import. So don't print a message about them, regardless of -I!. */ if (server_active && strcmp (dp->d_name, CVSADM) == 0) goto one_more_time_boys; -#endif + if (ign_name (dp->d_name)) { add_log ('I', dp->d_name); @@ -518,6 +524,9 @@ import_descend (message, vtag, targc, ta (void) CVS_CLOSEDIR (dirp); } + if (!current_parsed_root->isremote) + Lock_Cleanup (); + if (dirlist != NULL) { Node *head, *p; @@ -750,7 +759,7 @@ add_rev (message, rcs, vfile, vers) tocvsPath = wrap_tocvs_process_file (vfile); status = RCS_checkin (rcs, tocvsPath == NULL ? vfile : tocvsPath, - message, vbranch, + message, vbranch, 0, (RCS_FLAGS_QUIET | RCS_FLAGS_KEEPFILE | (use_file_modtime ? RCS_FLAGS_MODTIME : 0))); ierrno = errno; @@ -1586,11 +1595,7 @@ import_descend_dir (message, dir, vtag, repository = new; } -#ifdef CLIENT_SUPPORT if (!quiet && !current_parsed_root->isremote) -#else - if (!quiet) -#endif error (0, 0, "Importing %s", repository); if ( CVS_CHDIR (dir) < 0) @@ -1601,11 +1606,7 @@ import_descend_dir (message, dir, vtag, err = 1; goto out; } -#ifdef CLIENT_SUPPORT if (!current_parsed_root->isremote && !isdir (repository)) -#else - if (!isdir (repository)) -#endif { rcs = xmalloc (strlen (repository) + sizeof (RCSEXT) + 5); (void) sprintf (rcs, "%s%s", repository, RCSEXT); Index: src/lock.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/lock.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -p -r1.13 -r1.14 --- src/lock.c 15 Apr 2004 01:17:27 -0000 1.13 +++ src/lock.c 2 Jan 2008 09:05:04 -0000 1.14 @@ -1,6 +1,11 @@ /* - * Copyright (c) 1992, Brian Berliner and Jeff Polk - * Copyright (c) 1989-1992, Brian Berliner + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk + * Portions Copyright (C) 1989-1992, Brian Berliner * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS source distribution. @@ -87,8 +92,17 @@ struct lock { case of writelocks, it is just a pointer to the storage allocated for the ->key field. */ char *repository; - /* Do we have a lock named CVSLCK? */ - int have_lckdir; + + /* The name of the master lock dir. Usually CVSLCK. */ + const char *lockdirname; + + /* The full path to the lock dir, if we are currently holding it. + * + * This will be LOCKDIRNAME catted onto REPOSITORY. We waste a little + * space by storing it, but save a later malloc/free. + */ + char *lockdir; + /* Note there is no way of knowing whether the readlock and writelock exist. The code which sets the locks doesn't use SIG_beginCrSect to set a flag like we do for CVSLCK. */ @@ -117,7 +131,6 @@ static char *readlock; static char *writelock; /* Malloc'd array specifying the name of a CVSLCK file (absolute pathname). Will always be non-NULL in the cases where it is used. */ -static char *masterlock; static List *locklist; #define L_OK 0 /* success */ @@ -126,7 +139,10 @@ static List *locklist; /* This is the (single) readlock which is set by Reader_Lock. The repository field is NULL if there is no such lock. */ -static struct lock global_readlock; +static struct lock global_readlock = {NULL, CVSLCK, NULL}; + +static struct lock global_history_lock = {NULL, CVSHISTORYLCK, NULL}; +static struct lock global_val_tags_lock = {NULL, CVSVALTAGSLCK, NULL}; /* List of locks set by lock_tree_for_write. This is redundant with locklist, sort of. */ @@ -142,7 +158,7 @@ static List *locked_list; /* LockDir from CVSROOT/config. */ char *lock_dir; -static char *lock_name PROTO ((char *repository, char *name)); +static char *lock_name PROTO ((const char *repository, const char *name)); /* Return a newly malloc'd string containing the name of the lock for the repository REPOSITORY and the lock file name within that directory @@ -152,13 +168,13 @@ static char *lock_name PROTO ((char *rep things simple). */ static char * lock_name (repository, name) - char *repository; - char *name; + const char *repository; + const char *name; { char *retval; - char *p; + const char *p; char *q; - char *short_repos; + const char *short_repos; mode_t save_umask; int saved_umask = 0; @@ -313,6 +329,10 @@ Lock_Cleanup () locked_dir = NULL; locked_list = NULL; } + + if (global_history_lock.repository) clear_history_lock (); + if (global_val_tags_lock.repository) clear_val_tags_lock (); + in_lock_cleanup = 0; } @@ -349,6 +369,8 @@ unlock_proc (p, closure) return (0); } + + /* Remove the lock files. */ static void lock_simple_remove (lock) @@ -363,7 +385,7 @@ lock_simple_remove (lock) if (readlock != NULL) { tmp = lock_name (lock->repository, readlock); - if ( CVS_UNLINK (tmp) < 0 && ! existence_error (errno)) + if (CVS_UNLINK (tmp) < 0 && ! existence_error (errno)) error (0, errno, "failed to remove lock %s", tmp); free (tmp); } @@ -375,21 +397,12 @@ lock_simple_remove (lock) if (writelock != NULL) { tmp = lock_name (lock->repository, writelock); - if ( CVS_UNLINK (tmp) < 0 && ! existence_error (errno)) + if (CVS_UNLINK (tmp) < 0 && ! existence_error (errno)) error (0, errno, "failed to remove lock %s", tmp); free (tmp); } - if (lock->have_lckdir) - { - tmp = lock_name (lock->repository, CVSLCK); - SIG_beginCrSect (); - if (CVS_RMDIR (tmp) < 0) - error (0, errno, "failed to remove lock dir %s", tmp); - lock->have_lckdir = 0; - SIG_endCrSect (); - free (tmp); - } + clear_lock (lock); } @@ -662,6 +675,9 @@ readers_exist (repository) #endif lockdir = lock_name (repository, ""); + + assert (lockdir != NULL); + lockdir[strlen (lockdir) - 1] = '\0'; /* remove trailing slash */ do { @@ -768,13 +784,13 @@ set_lock (lock, will_wait) long us; struct stat sb; mode_t omask; + char *masterlock; + int status; #ifdef CVS_FUDGELOCKS time_t now; #endif - if (masterlock != NULL) - free (masterlock); - masterlock = lock_name (lock->repository, CVSLCK); + masterlock = lock_name (lock->repository, lock->lockdirname); /* * Note that it is up to the callers of set_lock() to arrange for signal @@ -783,33 +799,33 @@ set_lock (lock, will_wait) */ waited = 0; us = 1; - lock->have_lckdir = 0; for (;;) { - int status = -1; + status = -1; omask = umask (cvsumask); SIG_beginCrSect (); if (CVS_MKDIR (masterlock, 0777) == 0) { - lock->have_lckdir = 1; + lock->lockdir = masterlock; SIG_endCrSect (); status = L_OK; if (waited) lock_obtained (lock->repository); - goto out; + goto after_sig_unblock; } SIG_endCrSect (); - out: + after_sig_unblock: (void) umask (omask); if (status != -1) - return status; + goto done; if (errno != EEXIST) { error (0, errno, "failed to create lock directory for `%s' (%s)", lock->repository, masterlock); - return (L_ERROR); + status = L_ERROR; + goto done; } /* Find out who owns the lock. If the lock directory is @@ -821,7 +837,8 @@ set_lock (lock, will_wait) continue; error (0, errno, "couldn't stat lock directory `%s'", masterlock); - return (L_ERROR); + status = L_ERROR; + goto done; } #ifdef CVS_FUDGELOCKS @@ -843,7 +860,10 @@ set_lock (lock, will_wait) /* if he wasn't willing to wait, return an error */ if (!will_wait) - return (L_LOCKED); + { + status = L_LOCKED; + goto done; + } /* if possible, try a very short sleep without a message */ if (!waited && us < 1000) @@ -874,23 +894,45 @@ set_lock (lock, will_wait) lock_wait (lock->repository); waited = 1; } +done: + if (!lock->lockdir) free (masterlock); + return status; } + + /* - * Clear master lock. We don't have to recompute the lock name since - * clear_lock is never called except after a successful set_lock(). + * Clear master lock. + * + * INPUTS + * lock The lock information. + * + * OUTPUTS + * Sets LOCK->lockdir to NULL after removing the directory it names and + * freeing the storage. + * + * ASSUMPTIONS + * If we own the master lock directory, its name is stored in LOCK->lockdir. + * We may free LOCK->lockdir. + * */ static void clear_lock (lock) struct lock *lock; { SIG_beginCrSect (); - if (CVS_RMDIR (masterlock) < 0) - error (0, errno, "failed to remove lock dir `%s'", masterlock); - lock->have_lckdir = 0; + if (lock->lockdir) + { + if (CVS_RMDIR (lock->lockdir) < 0) + error (0, errno, "failed to remove lock dir `%s'", lock->lockdir); + free (lock->lockdir); + lock->lockdir = NULL; + } SIG_endCrSect (); } + + /* * Print out a message that the lock is still held, then sleep a while. */ @@ -965,7 +1007,8 @@ lock_filesdoneproc (callerdat, err, repo p->key = xstrdup (repository); p->data = xmalloc (sizeof (struct lock)); ((struct lock *)p->data)->repository = p->key; - ((struct lock *)p->data)->have_lckdir = 0; + ((struct lock *)p->data)->lockdirname = CVSLCK; + ((struct lock *)p->data)->lockdir = NULL; /* FIXME-KRP: this error condition should not simply be passed by. */ if (p->key == NULL || addnode (lock_tree_list, p) != 0) @@ -1018,9 +1061,106 @@ lock_dir_for_write (repository) node->key = xstrdup (repository); node->data = xmalloc (sizeof (struct lock)); ((struct lock *)node->data)->repository = node->key; - ((struct lock *)node->data)->have_lckdir = 0; + ((struct lock *)node->data)->lockdirname = CVSLCK; + ((struct lock *)node->data)->lockdir = NULL; (void) addnode (locked_list, node); Writer_Lock (locked_list); } } + + + +/* This is the internal implementation behind history_lock & val_tags_lock. It + * gets a write lock for the history or val-tags file. + * + * RETURNS + * true, on success + * false, on error + */ +static int internal_lock PROTO ((struct lock *lock, const char *xrepository)); +static int +internal_lock (lock, xrepository) + struct lock *lock; + const char *xrepository; +{ + /* remember what we're locking (for Lock_Cleanup) */ + assert (!lock->repository); + lock->repository = xmalloc (strlen (xrepository) + sizeof (CVSROOTADM) + 2); + sprintf (lock->repository, "%s/%s", xrepository, CVSROOTADM); + + /* get the lock dir for our own */ + if (set_lock (lock, 1) != L_OK) + { + if (!really_quiet) + error (0, 0, "failed to obtain history lock in repository `%s'", + xrepository); + + return 0; + } + + return 1; +} + + + +/* This is the internal implementation behind history_lock & val_tags_lock. It + * removes the write lock for the history or val-tags file, when it exists. + */ +static void internal_clear_lock PROTO((struct lock *lock)); +static void +internal_clear_lock (lock) + struct lock *lock; +{ + SIG_beginCrSect (); + if (lock->repository) + { + free (lock->repository); + lock->repository = NULL; + } + SIG_endCrSect (); + + clear_lock (lock); +} + + + +/* Lock the CVSROOT/history file for write. + */ +int +history_lock (xrepository) + const char *xrepository; +{ + return internal_lock (&global_history_lock, xrepository); +} + + + +/* Remove the CVSROOT/history lock, if it exists. + */ +void +clear_history_lock () +{ + internal_clear_lock (&global_history_lock); +} + + + +/* Lock the CVSROOT/val-tags file for write. + */ +int +val_tags_lock (xrepository) + const char *xrepository; +{ + return internal_lock (&global_val_tags_lock, xrepository); +} + + + +/* Remove the CVSROOT/val-tags lock, if it exists. + */ +void +clear_val_tags_lock () +{ + internal_clear_lock (&global_val_tags_lock); +} Index: src/log.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/log.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -p -r1.3 -r1.4 --- src/log.c 12 Dec 2006 03:20:36 -0000 1.3 +++ src/log.c 2 Jan 2008 09:13:03 -0000 1.4 @@ -1,6 +1,11 @@ /* - * Copyright (c) 1992, Brian Berliner and Jeff Polk - * Copyright (c) 1989-1992, Brian Berliner + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk + * Portions Copyright (C) 1989-1992, Brian Berliner * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS source distribution. @@ -15,6 +20,7 @@ */ #include "cvs.h" +#include /* This structure holds information parsed from the -r option. */ @@ -125,7 +131,7 @@ static int log_fileproc PROTO ((void *ca static struct option_revlist *log_parse_revlist PROTO ((const char *)); static void log_parse_date PROTO ((struct log_data *, const char *)); static void log_parse_list PROTO ((List **, const char *)); -static struct revlist *log_expand_revlist PROTO ((RCSNode *, +static struct revlist *log_expand_revlist PROTO ((RCSNode *, char *, struct option_revlist *, int)); static void log_free_revlist PROTO ((struct revlist *)); @@ -152,12 +158,14 @@ static const char *const log_usage[] = "Usage: %s %s [-lRhtNb] [-r[revisions]] [-d dates] [-s states]\n", " [-w[logins]] [files...]\n", "\t-l\tLocal directory only, no recursion.\n", - "\t-R\tOnly print name of RCS file.\n", + "\t-b\tOnly list revisions on the default branch.\n", "\t-h\tOnly print header.\n", + "\t-R\tOnly print name of RCS file.\n", "\t-t\tOnly print header and descriptive text.\n", "\t-N\tDo not list tags.\n", - "\t-S\tDo not print name/header if no revisions selected.\n", - "\t-b\tOnly list revisions on the default branch.\n", + "\t-S\tDo not print name/header if no revisions selected. -d, -r,\n", + "\t\t-s, & -w have little effect in conjunction with -b, -h, -R, and\n", + "\t\t-t without this option.\n", "\t-r[revisions]\tA comma-separated list of revisions to print:\n", "\t rev1:rev2 Between rev1 and rev2, including rev1 and rev2.\n", "\t rev1::rev2 Between rev1 and rev2, excluding rev1.\n", @@ -313,6 +321,7 @@ cvslog (argc, argv) { p = log_data.datelist; log_data.datelist = p->next; + assert (p->start != NULL && p->end != NULL); send_to_server ("Argument -d\012", 0); send_to_server ("Argument ", 0); date_to_internet (datetmp, p->start); @@ -324,23 +333,21 @@ cvslog (argc, argv) date_to_internet (datetmp, p->end); send_to_server (datetmp, 0); send_to_server ("\012", 0); - if (p->start) - free (p->start); - if (p->end) - free (p->end); + free (p->start); + free (p->end); free (p); } while (log_data.singledatelist != NULL) { p = log_data.singledatelist; log_data.singledatelist = p->next; + assert (p->end != NULL); send_to_server ("Argument -d\012", 0); send_to_server ("Argument ", 0); date_to_internet (datetmp, p->end); send_to_server (datetmp, 0); send_to_server ("\012", 0); - if (p->end) - free (p->end); + free (p->end); free (p); } @@ -813,21 +820,30 @@ log_fileproc (callerdat, finfo) { struct log_data *log_data = (struct log_data *) callerdat; Node *p; + char *baserev; int selrev = -1; RCSNode *rcsfile; char buf[50]; struct revlist *revlist = NULL; struct log_data_and_rcs log_data_and_rcs; - if ((rcsfile = finfo->rcs) == NULL) + rcsfile = finfo->rcs; + p = findnode (finfo->entries, finfo->file); + if (p != NULL) + { + Entnode *e = p->data; + baserev = e->version; + if (baserev[0] == '-') ++baserev; + } + else + baserev = NULL; + + if (rcsfile == NULL) { /* no rcs file. What *do* we know about this file? */ - p = findnode (finfo->entries, finfo->file); - if (p != NULL) + if (baserev != NULL) { - Entnode *e = p->data; - - if (e->version[0] == '0' && e->version[1] == '\0') + if (baserev[0] == '0' && baserev[1] == '\0') { if (!really_quiet) error (0, 0, "%s has been added, but not committed", @@ -850,7 +866,7 @@ log_fileproc (callerdat, finfo) /* Turn any symbolic revisions in the revision list into numeric revisions. */ - revlist = log_expand_revlist (rcsfile, log_data->revlist, + revlist = log_expand_revlist (rcsfile, baserev, log_data->revlist, log_data->default_branch); if (log_data->sup_header || (!log_data->header && !log_data->long_header)) @@ -1040,8 +1056,9 @@ log_fileproc (callerdat, finfo) * Expand any symbolic revisions. */ static struct revlist * -log_expand_revlist (rcs, revlist, default_branch) +log_expand_revlist (rcs, baserev, revlist, default_branch) RCSNode *rcs; + char *baserev; struct option_revlist *revlist; int default_branch; { @@ -1062,13 +1079,26 @@ log_expand_revlist (rcs, revlist, defaul /* If both first and last are NULL, it means that we want just the head of the default branch, which is RCS_head. */ nr->first = RCS_head (rcs); - nr->last = xstrdup (nr->first); - nr->fields = numdots (nr->first) + 1; + if (!nr->first) + { + if (!really_quiet) + error (0, 0, "No head revision in archive `%s'.", + rcs->path); + nr->last = NULL; + nr->fields = 0; + } + else + { + nr->last = xstrdup (nr->first); + nr->fields = numdots (nr->first) + 1; + } } else if (r->branchhead) { char *branch; + assert (r->first != NULL); + /* Print just the head of the branch. */ if (isdigit ((unsigned char) r->first[0])) nr->first = RCS_getbranch (rcs, r->first, 1); @@ -1083,10 +1113,11 @@ log_expand_revlist (rcs, revlist, defaul free (branch); } } - if (nr->first == NULL && !really_quiet) + if (!nr->first) { - error (0, 0, "warning: no branch `%s' in `%s'", - r->first, rcs->path); + if (!really_quiet) + error (0, 0, "warning: no branch `%s' in `%s'", + r->first, rcs->path); nr->last = NULL; nr->fields = 0; } @@ -1102,7 +1133,9 @@ log_expand_revlist (rcs, revlist, defaul nr->first = xstrdup (r->first); else { - if (RCS_nodeisbranch (rcs, r->first)) + if (baserev && strcmp (r->first, TAG_BASE) == 0) + nr->first = xstrdup (baserev); + else if (RCS_nodeisbranch (rcs, r->first)) nr->first = RCS_whatbranch (rcs, r->first); else nr->first = RCS_gettag (rcs, r->first, 1, (int *) NULL); @@ -1120,7 +1153,9 @@ log_expand_revlist (rcs, revlist, defaul nr->last = xstrdup (r->last); else { - if (RCS_nodeisbranch (rcs, r->last)) + if (baserev && strcmp (r->last, TAG_BASE) == 0) + nr->last = xstrdup (baserev); + else if (RCS_nodeisbranch (rcs, r->last)) nr->last = RCS_whatbranch (rcs, r->last); else nr->last = RCS_gettag (rcs, r->last, 1, (int *) NULL); @@ -1146,6 +1181,7 @@ log_expand_revlist (rcs, revlist, defaul nr->first = xstrdup (nr->last); cp = strrchr (nr->first, '.'); + assert (cp); strcpy (cp + 1, "0"); } } @@ -1160,6 +1196,7 @@ log_expand_revlist (rcs, revlist, defaul char *cp; cp = strrchr (nr->last, '.'); + assert (cp); *cp = '\0'; } } @@ -1259,7 +1296,9 @@ log_expand_revlist (rcs, revlist, defaul char *cp; nr->first = xstrdup (rcs->head); + assert (nr->first); cp = strrchr (nr->first, '.'); + assert (cp); *cp = '\0'; } nr->last = xstrdup (nr->first); @@ -1647,6 +1686,7 @@ log_version (log_data, revlist, rcs, ver if (padd != NULL) { + assert (pdel); cvs_output (" lines: +", 0); cvs_output (padd->data, 0); cvs_output (" -", 2); Index: src/login.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/login.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -p -r1.9 -r1.10 --- src/login.c 22 Apr 2005 17:58:25 -0000 1.9 +++ src/login.c 2 Jan 2008 09:00:08 -0000 1.10 @@ -1,12 +1,15 @@ /* - * Copyright (c) 1995, Cyclic Software, Bloomington, IN, USA + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (c) 1995, Cyclic Software, Bloomington, IN, USA * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with CVS. * * Allow user to log in for an authenticating server. - * - * $FreeBSD$ */ #include "cvs.h" @@ -384,7 +387,8 @@ process: /* create and open a temp file */ if ((tmp_fp = cvs_temp_file (&tmp_name)) == NULL) - error (1, errno, "unable to open temp file %s", tmp_name); + error (1, errno, "unable to open temp file %s", + tmp_name ? tmp_name : "(null)"); line = 0; while ((line_length = getline (&linebuf, &linebuf_len, fp)) >= 0) @@ -457,7 +461,7 @@ process: if (fprintf (fp, "/1 %s %s\n", cvsroot_canonical, newpassword) == EOF) error (1, errno, "cannot write %s", passfile); if (fclose (fp) < 0) - error (0, errno, "cannot close %s", passfile); + error (1, errno, "cannot close %s", passfile); } /* Utter, total, raving paranoia, I know. */ Index: src/logmsg.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/logmsg.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -p -r1.12 -r1.13 --- src/logmsg.c 15 Apr 2004 01:17:27 -0000 1.12 +++ src/logmsg.c 2 Jan 2008 09:36:37 -0000 1.13 @@ -1,6 +1,11 @@ /* - * Copyright (c) 1992, Brian Berliner and Jeff Polk - * Copyright (c) 1989-1992, Brian Berliner + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk + * Portions Copyright (C) 1989-1992, Brian Berliner * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS source distribution. @@ -198,11 +203,7 @@ do_editor (dir, messagep, repository, ch struct stat pre_stbuf, post_stbuf; int retcode = 0; -#ifdef CLIENT_SUPPORT assert (!current_parsed_root->isremote != !repository); -#else - assert (repository); -#endif if (noexec || reuse_log_message) return; @@ -294,12 +295,7 @@ do_editor (dir, messagep, repository, ch if (editinfo_editor) free (editinfo_editor); editinfo_editor = (char *) NULL; -#ifdef CLIENT_SUPPORT - if (current_parsed_root->isremote) - ; /* nothing, leave editinfo_editor NULL */ - else -#endif - if (repository != NULL) + if (!current_parsed_root->isremote && repository != NULL) (void) Parse_Info (CVSROOTADM_EDITINFO, repository, editinfo_proc, 0); /* run the editor */ @@ -426,11 +422,9 @@ do_verify (messagep, repository) struct stat pre_stbuf, post_stbuf; -#ifdef CLIENT_SUPPORT if (current_parsed_root->isremote) /* The verification will happen on the server. */ return; -#endif /* FIXME? Do we really want to skip this on noexec? What do we do for the other administrative files? */ @@ -449,7 +443,8 @@ do_verify (messagep, repository) temp file, and close the file. */ if ((fp = cvs_temp_file (&fname)) == NULL) - error (1, errno, "cannot create temporary file %s", fname); + error (1, errno, "cannot create temporary file %s", + fname ? fname : "(null)"); if (*messagep != NULL) fputs (*messagep, fp); @@ -555,7 +550,7 @@ do_verify (messagep, repository) if (unlink_file (fname) < 0) error (0, errno, "cannot remove %s", fname); free (fname); - free( verifymsg_script ); + free (verifymsg_script); verifymsg_script = NULL; } @@ -751,6 +746,8 @@ logfile_write (repository, filter, messa char *fmt_percent; /* the location of the percent sign that starts the format string. */ + assert (repository); + /* The user may specify a format string as part of the filter. Originally, `%s' was the only valid string. The string that was substituted for it was: Index: src/main.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/main.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -p -r1.25 -r1.26 --- src/main.c 6 Jul 2004 08:10:38 -0000 1.25 +++ src/main.c 2 Jan 2008 10:17:27 -0000 1.26 @@ -1,9 +1,14 @@ /* - * Copyright (c) 1992, Brian Berliner and Jeff Polk - * Copyright (c) 1989-1992, Brian Berliner + * Copyright (C) 1986-2006 The Free Software Foundation, Inc. * - * You may distribute under the terms of the GNU General Public License - * as specified in the README file that comes with the CVS source distribution. + * Portions Copyright (C) 1998-2006 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk + * Portions Copyright (C) 1989-1992, Brian Berliner + * + * You may distribute under the terms of the GNU General Public License + * as specified in the README file that comes with the CVS source distribution. * * This is the main C driver for the CVS system. * @@ -47,6 +52,12 @@ int readonlyfs = 0; int require_real_user = 0; int logoff = 0; +/* + * Zero if compression isn't supported or requested; non-zero to indicate + * a compression level to request from gzip. + */ +int gzip_level; + /* Set if we should be writing CVSADM directories at top level. At least for now we'll make the default be off (the CVS 1.9, not CVS 1.9.2, behavior). */ @@ -67,15 +78,6 @@ char *Editor = EDITOR_DFLT; values in CVS/Root files, we maintain a list of them. */ List *root_directories = NULL; -/* We step through the above values. This variable is set to reflect - * the currently active value. - * - * Now static. FIXME - this variable should be removable (well, localizable) - * with a little more work. - */ -static char *current_root = NULL; - - static const struct cmd { char *fullname; /* Full name of the function (e.g. "commit") */ @@ -191,8 +193,7 @@ static const char *const usg[] = version control means. */ "For CVS updates and additional information, see\n", - " the CVS home page at http://www.cvshome.org/ or\n", - " Pascal Molli's CVS site at http://www.loria.fr/~molli/cvs-index.html\n", + " the CVS home page at http://cvs.nongnu.org/\n", NULL, }; @@ -278,9 +279,9 @@ set_root_directory (p, ignored) Node *p; void *ignored; { - if (current_root == NULL && p->data == NULL) + if (current_parsed_root == NULL && p->data != NULL) { - current_root = p->key; + current_parsed_root = p->data; return 1; } return 0; @@ -400,12 +401,12 @@ main (argc, argv) int argc; char **argv; { - char *CVSroot = CVSROOT_DFLT; + cvsroot_t *CVSroot_parsed = NULL; + int cvsroot_update_env = 1; char *cp, *end; const struct cmd *cm; int c, err = 0; - int tmpdir_update_env, cvs_update_env; - int free_CVSroot = 0; + int tmpdir_update_env; int free_Editor = 0; int free_Tmpdir = 0; @@ -455,7 +456,6 @@ main (argc, argv) * Query the environment variables up-front, so that * they can be overridden by command line arguments */ - cvs_update_env = 0; tmpdir_update_env = *Tmpdir; /* TMPDIR_DFLT must be set */ if ((cp = getenv (TMPDIR_ENV)) != NULL) { @@ -468,11 +468,6 @@ main (argc, argv) Editor = cp; else if ((cp = getenv (EDITOR3_ENV)) != NULL) Editor = cp; - if ((cp = getenv (CVSROOT_ENV)) != NULL) - { - CVSroot = cp; - cvs_update_env = 0; /* it's already there */ - } if (getenv (CVSREAD_ENV) != NULL) cvswrite = 0; if (getenv (CVSREADONLYFS_ENV) != NULL) { @@ -566,8 +561,12 @@ main (argc, argv) version (0, (char **) NULL); (void) fputs ("\n", stdout); (void) fputs ("\ -Copyright (c) 1989-2004 Brian Berliner, david d `zoo' zuhn, \n\ - Jeff Polk, and other authors\n", stdout); +Copyright (C) 2006 Free Software Foundation, Inc.\n\ +\n\ +Senior active maintainers include Larry Jones, Derek R. Price,\n\ +and Mark D. Baushke. Please see the AUTHORS and README files from the CVS\n\ +distribution kit for a complete list of contributors and copyrights.\n", + stdout); (void) fputs ("\n", stdout); (void) fputs ("CVS may be copied only under the terms of the GNU General Public License,\n", stdout); (void) fputs ("a copy of which can be found with the CVS distribution kit.\n", stdout); @@ -575,6 +574,12 @@ Copyright (c) 1989-2004 Brian Berliner, (void) fputs ("Specify the --help option for further information about CVS\n", stdout); +#ifdef SYSTEM_CLEANUP + /* Hook for OS-specific behavior, for example socket subsystems + * on NT and OS2 or dealing with windows and arguments on Mac. + */ + SYSTEM_CLEANUP (); +#endif exit (0); break; case 'b': @@ -585,11 +590,13 @@ Copyright (c) 1989-2004 Brian Berliner, either new or old CVS. */ break; case 'T': + if (free_Tmpdir) free (Tmpdir); Tmpdir = xstrdup (optarg); free_Tmpdir = 1; tmpdir_update_env = 1; /* need to update environment */ break; case 'e': + if (free_Editor) free (Editor); Editor = xstrdup (optarg); free_Editor = 1; break; @@ -597,11 +604,6 @@ Copyright (c) 1989-2004 Brian Berliner, if (CVSroot_cmdline != NULL) free (CVSroot_cmdline); CVSroot_cmdline = xstrdup (optarg); - if (free_CVSroot) - free (CVSroot); - CVSroot = xstrdup (optarg); - free_CVSroot = 1; - cvs_update_env = 1; /* need to update environment */ break; case 'H': help = 1; @@ -610,12 +612,10 @@ Copyright (c) 1989-2004 Brian Berliner, use_cvsrc = 0; /* unnecessary, since we've done it above */ break; case 'z': -#ifdef CLIENT_SUPPORT gzip_level = strtol (optarg, &end, 10); if (*end != '\0' || gzip_level < 0 || gzip_level > 9) error (1, 0, "gzip compression level must be between 0 and 9"); -#endif /* CLIENT_SUPPORT */ /* If no CLIENT_SUPPORT, we just silently ignore the gzip * level, so that users can have it in their .cvsrc and not * cause any trouble. @@ -744,21 +744,18 @@ Copyright (c) 1989-2004 Brian Berliner, cvs_cmd_name = "server"; } # endif /* AUTH_SERVER_SUPPORT || HAVE_GSSAPI */ +#endif /* SERVER_SUPPORT */ server_active = strcmp (cvs_cmd_name, "server") == 0; -#endif /* SERVER_SUPPORT */ - /* This is only used for writing into the history file. For remote connections, it might be nice to have hostname and/or remote path, on the other hand I'm not sure whether it is worth the trouble. */ -#ifdef SERVER_SUPPORT if (server_active) CurDir = xstrdup (""); else -#endif { CurDir = xgetwd (); if (CurDir == NULL) @@ -766,7 +763,10 @@ Copyright (c) 1989-2004 Brian Berliner, } if (Tmpdir == NULL || Tmpdir[0] == '\0') + { + if (free_Tmpdir) free (Tmpdir); Tmpdir = "/tmp"; + } #ifdef HAVE_PUTENV if (tmpdir_update_env) @@ -820,68 +820,66 @@ Copyright (c) 1989-2004 Brian Berliner, if (use_cvsrc) read_cvsrc (&argc, &argv, cvs_cmd_name); -#ifdef SERVER_SUPPORT /* Fiddling with CVSROOT doesn't make sense if we're running - in server mode, since the client will send the repository - directory after the connection is made. */ - + * in server mode, since the client will send the repository + * directory after the connection is made. + */ if (!server_active) -#endif { - char *CVSADM_Root; - - /* See if we are able to find a 'better' value for CVSroot - in the CVSADM_ROOT directory. */ - - CVSADM_Root = NULL; - - /* "cvs import" shouldn't check CVS/Root; in general it - ignores CVS directories and CVS/Root is likely to - specify a different repository than the one we are - importing to. */ - - if (!(cm->attr & CVS_CMD_IGNORE_ADMROOT) - - /* -d overrides CVS/Root, so don't give an error if the - latter points to a nonexistent repository. */ - && CVSroot_cmdline == NULL) + /* First check if a root was set via the command line. */ + if (CVSroot_cmdline) { - CVSADM_Root = Name_Root((char *) NULL, (char *) NULL); + if (!(CVSroot_parsed = parse_cvsroot (CVSroot_cmdline))) + error (1, 0, "Bad CVSROOT: `%s'.", CVSroot_cmdline); } - if (CVSADM_Root != NULL) + /* See if we are able to find a 'better' value for CVSroot + * in the CVSADM_ROOT directory. + * + * "cvs import" shouldn't check CVS/Root; in general it + * ignores CVS directories and CVS/Root is likely to + * specify a different repository than the one we are + * importing to, but if this is not import and no root was + * specified on the command line, set the root from the + * CVS/Root file. + */ + if (!CVSroot_parsed + && !(cm->attr & CVS_CMD_IGNORE_ADMROOT) + ) + CVSroot_parsed = Name_Root (NULL, NULL); + + /* Now, if there is no root on the command line and we didn't find + * one in a file, set it via the $CVSROOT env var. + */ + if (!CVSroot_parsed) { - if (CVSroot == NULL || !cvs_update_env) + char *tmp = getenv (CVSROOT_ENV); + if (tmp) { - CVSroot = CVSADM_Root; - cvs_update_env = 1; /* need to update environment */ + if (!(CVSroot_parsed = parse_cvsroot (tmp))) + error (1, 0, "Bad CVSROOT: `%s'.", tmp); + cvsroot_update_env = 0; } } +#ifdef CVSROOT_DFLT + if (!CVSroot_parsed) + { + if (!(CVSroot_parsed = parse_cvsroot (CVSROOT_DFLT))) + error (1, 0, "Bad CVSROOT: `%s'.", CVSROOT_DFLT); + } +#endif /* CVSROOT_DFLT */ + /* Now we've reconciled CVSROOT from the command line, the CVS/Root file, and the environment variable. Do the last sanity checks on the variable. */ - - if (! CVSroot) + if (!CVSroot_parsed) { error (0, 0, "No CVSROOT specified! Please use the `-d' option"); error (1, 0, "or set the %s environment variable.", CVSROOT_ENV); } - - if (! *CVSroot) - { - error (0, 0, - "CVSROOT is set but empty! Make sure that the"); - error (0, 0, - "specification of CVSROOT is valid, either via the"); - error (0, 0, - "`-d' option, the %s environment variable, or the", - CVSROOT_ENV); - error (1, 0, - "CVS/Root file (if any)."); - } } /* Here begins the big loop over unique cvsroot values. We @@ -893,19 +891,19 @@ Copyright (c) 1989-2004 Brian Berliner, root_directories = getlist (); /* Prime it. */ - if (CVSroot != NULL) + if (CVSroot_parsed) { Node *n; n = getnode (); n->type = NT_UNKNOWN; - n->key = xstrdup (CVSroot); - n->data = NULL; + n->key = xstrdup (CVSroot_parsed->original); + n->data = CVSroot_parsed; if (addnode (root_directories, n)) error (1, 0, "cannot add initial CVSROOT %s", n->key); } - assert (current_root == NULL); + assert (current_parsed_root == NULL); /* If we're running the server, we want to execute this main loop once and only once (we won't be serving multiple roots @@ -913,70 +911,58 @@ Copyright (c) 1989-2004 Brian Berliner, once). To get out of the loop, we perform a "break" at the end of things. */ - while ( -#ifdef SERVER_SUPPORT - server_active || -#endif - walklist (root_directories, set_root_directory, NULL) - ) + while (server_active || + walklist (root_directories, set_root_directory, NULL)) { -#ifdef SERVER_SUPPORT /* Fiddling with CVSROOT doesn't make sense if we're running in server mode, since the client will send the repository directory after the connection is made. */ if (!server_active) -#endif { /* Now we're 100% sure that we have a valid CVSROOT variable. Parse it to see if we're supposed to do remote accesses or use a special access method. */ - if (current_parsed_root != NULL) - free_cvsroot_t (current_parsed_root); - if ((current_parsed_root = parse_cvsroot (current_root)) == NULL) - error (1, 0, "Bad CVSROOT: `%s'.", current_root); - if (trace) fprintf (stderr, "%s-> main loop with CVSROOT=%s\n", - CLIENT_SERVER_STR, current_root); + CLIENT_SERVER_STR, current_parsed_root->original); /* * Check to see if the repository exists. */ -#ifdef CLIENT_SUPPORT if (!current_parsed_root->isremote) -#endif /* CLIENT_SUPPORT */ { char *path; int save_errno; path = xmalloc (strlen (current_parsed_root->directory) - + sizeof (CVSROOTADM) - + 2); - (void) sprintf (path, "%s/%s", current_parsed_root->directory, CVSROOTADM); + + strlen (CVSROOTADM) + 2); + sprintf (path, "%s/%s", current_parsed_root->directory, + CVSROOTADM); if (!isaccessible (path, R_OK | X_OK)) { save_errno = errno; - /* If this is "cvs init", the root need not exist yet. */ - if (strcmp (cvs_cmd_name, "init") != 0) - { + /* If this is "cvs init", the root need not exist yet. + */ + if (strcmp (cvs_cmd_name, "init")) error (1, save_errno, "%s", path); } - } free (path); } #ifdef HAVE_PUTENV - /* Update the CVSROOT environment variable if necessary. */ - /* FIXME (njc): should we always set this with the CVSROOT from the command line? */ - if (cvs_update_env) + /* Update the CVSROOT environment variable. */ + if (cvsroot_update_env) { static char *prev; char *env; - env = xmalloc (strlen (CVSROOT_ENV) + strlen (CVSroot) - + 1 + 1); - (void) sprintf (env, "%s=%s", CVSROOT_ENV, CVSroot); + + env = xmalloc (strlen (CVSROOT_ENV) + + strlen (current_parsed_root->original) + + 2); + sprintf (env, "%s=%s", CVSROOT_ENV, + current_parsed_root->original); (void) putenv (env); /* do not free env yet, as putenv has control of it */ /* but do free the previous value, if any */ @@ -994,14 +980,7 @@ Copyright (c) 1989-2004 Brian Berliner, predetermine whether CVSROOT/config overrides things from read_cvsrc and other such places or vice versa. That sort of thing probably needs more thought. */ - if (1 -#ifdef SERVER_SUPPORT - && !server_active -#endif -#ifdef CLIENT_SUPPORT - && !current_parsed_root->isremote -#endif - ) + if (!server_active && !current_parsed_root->isremote) { /* If there was an error parsing the config file, parse_config already printed an error. We keep going. Why? Because @@ -1031,31 +1010,28 @@ Copyright (c) 1989-2004 Brian Berliner, err = (*(cm->func)) (argc, argv); /* Mark this root directory as done. When the server is - active, current_root will be NULL -- don't try and + active, our list will be empty -- don't try and remove it from the list. */ - if (current_root != NULL) + if (!server_active) { - Node *n = findnode (root_directories, current_root); + Node *n = findnode (root_directories, + current_parsed_root->original); assert (n != NULL); - n->data = (void *) 1; - current_root = NULL; + assert (n->data != NULL); + free_cvsroot_t (n->data); + n->data = NULL; + current_parsed_root = NULL; } - -#if 0 - /* This will not work yet, since it tries to free (void *) 1. */ - dellist (&root_directories); -#endif -#ifdef SERVER_SUPPORT if (server_active) { server_active = 0; break; } -#endif } /* end of loop for cvsroot values */ + dellist (&root_directories); } /* end of stuff that gets done if the user DOESN'T ask for help */ Lock_Cleanup (); @@ -1067,8 +1043,6 @@ Copyright (c) 1989-2004 Brian Berliner, free ((char *)program_path); if (CVSroot_cmdline != NULL) free (CVSroot_cmdline); - if (free_CVSroot) - free (CVSroot); if (free_Editor) free (Editor); if (free_Tmpdir) Index: src/mkmodules.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/mkmodules.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -p -r1.13 -r1.14 --- src/mkmodules.c 15 Apr 2004 01:17:27 -0000 1.13 +++ src/mkmodules.c 2 Jan 2008 09:00:53 -0000 1.14 @@ -1,12 +1,14 @@ /* - * Copyright (c) 1992, Brian Berliner and Jeff Polk - * Copyright (c) 1989-1992, Brian Berliner + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk + * Portions Copyright (C) 1989-1992, Brian Berliner * * You may distribute under the terms of the GNU General Public License as - * specified in the README file that comes with the CVS kit. - * - * $FreeBSD$ - */ + * specified in the README file that comes with the CVS kit. */ #include "cvs.h" #include "getline.h" @@ -284,7 +286,7 @@ static const char *const modules_content static const char *const config_contents[] = { "# Set this to \"no\" if pserver shouldn't check system users/passwords\n", - "#SystemAuth=no\n", + "#SystemAuth=yes\n", "\n", "# Put CVS lock files in this directory rather than directly in the repository.\n", "#LockDir=/var/lock/cvs\n", @@ -305,7 +307,7 @@ static const char *const config_contents "#LogHistory=" ALL_HISTORY_REC_TYPES "\n", "\n", "# Set `RereadLogAfterVerify' to `always' (the default) to allow the verifymsg\n", - "# script to change the log message. Set it to `stat' to force CVS to verify", + "# script to change the log message. Set it to `stat' to force CVS to verify\n", "# that the file has changed before reading it (this can take up to an extra\n", "# second per directory being committed, so it is not recommended for large\n", "# repositories. Set it to `never' (the previous CVS behavior) to prevent\n", @@ -579,7 +581,17 @@ checkout_file (file, temp) free (rcs); return (1); } + rcsnode = RCS_parsercsfile (rcs); + if (!rcsnode) + { + /* Probably not necessary (?); RCS_parsercsfile already printed a + message. */ + error (0, 0, "Failed to parse `%s'.", rcs); + free (rcs); + return 1; + } + retcode = RCS_checkout (rcsnode, NULL, NULL, NULL, NULL, temp, (RCSCHECKOUTPROC) NULL, (void *) NULL); if (retcode != 0) Index: src/modules.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/modules.c,v retrieving revision 1.1.1.10 retrieving revision 1.1.1.11 diff -u -p -r1.1.1.10 -r1.1.1.11 --- src/modules.c 15 Apr 2004 01:01:55 -0000 1.1.1.10 +++ src/modules.c 26 Dec 2007 03:55:03 -0000 1.1.1.11 @@ -1,6 +1,11 @@ /* - * Copyright (c) 1992, Brian Berliner and Jeff Polk - * Copyright (c) 1989-1992, Brian Berliner + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk + * Portions Copyright (C) 1989-1992, Brian Berliner * * You may distribute under the terms of the GNU General Public License * as specified in the README file that comes with the CVS source @@ -131,7 +136,6 @@ my_module (db, mname, m_type, msg, callb char *mwhere = NULL; char *mfile = NULL; char *spec_opt = NULL; - char *xvalue = NULL; int alias = 0; datum key, val; char *cp; @@ -371,6 +375,7 @@ my_module (db, mname, m_type, msg, callb /* mwhere gets just the module name */ mwhere = xstrdup (mname); mfile = cp + 1; + assert (strlen (mfile)); /* put the / back in mname */ *cp = '/'; @@ -744,7 +749,7 @@ module `%s' is a request for a file in a err += run_exec (RUN_TTY, RUN_TTY, RUN_TTY, RUN_NORMAL); free (expanded_path); } - free (real_prog); + if (real_prog) free (real_prog); } } @@ -765,8 +770,6 @@ module `%s' is a request for a file in a if (value != NULL) free (value); - if (xvalue != NULL) - free (xvalue); return (err); } Index: src/myndbm.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/myndbm.c,v retrieving revision 1.1.1.10 retrieving revision 1.1.1.11 diff -u -p -r1.1.1.10 -r1.1.1.11 --- src/myndbm.c 15 Apr 2004 01:01:55 -0000 1.1.1.10 +++ src/myndbm.c 26 Dec 2007 03:55:03 -0000 1.1.1.11 @@ -1,5 +1,11 @@ /* - * Copyright (c) 1992, Brian Berliner + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk + * Portions Copyright (C) 1989-1992, Brian Berliner * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS source distribution. Index: src/myndbm.h =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/myndbm.h,v retrieving revision 1.1.1.2 retrieving revision 1.1.1.3 diff -u -p -r1.1.1.2 -r1.1.1.3 --- src/myndbm.h 15 May 1997 22:45:38 -0000 1.1.1.2 +++ src/myndbm.h 26 Dec 2007 03:55:03 -0000 1.1.1.3 @@ -1,3 +1,17 @@ +/* + * Copyright (C) 1994-2005 The 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. + */ + #ifdef MY_NDBM #define DBLKSIZ 4096 Index: src/no_diff.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/no_diff.c,v retrieving revision 1.1.1.6 retrieving revision 1.1.1.7 diff -u -p -r1.1.1.6 -r1.1.1.7 --- src/no_diff.c 15 Apr 2004 01:01:55 -0000 1.1.1.6 +++ src/no_diff.c 26 Dec 2007 03:55:03 -0000 1.1.1.7 @@ -1,6 +1,11 @@ /* - * Copyright (c) 1992, Brian Berliner and Jeff Polk - * Copyright (c) 1989-1992, Brian Berliner + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk + * Portions Copyright (C) 1989-1992, Brian Berliner * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS source distribution. @@ -15,6 +20,7 @@ */ #include "cvs.h" +#include int No_Difference (finfo, vers) @@ -71,6 +77,7 @@ No_Difference (finfo, vers) /* update the entdata pointer in the vers_ts structure */ p = findnode (finfo->entries, finfo->file); + assert (p); vers->entdata = p->data; ret = 0; Index: src/parseinfo.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/parseinfo.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -p -r1.3 -r1.4 --- src/parseinfo.c 15 Apr 2004 01:17:27 -0000 1.3 +++ src/parseinfo.c 2 Jan 2008 10:18:49 -0000 1.4 @@ -1,6 +1,11 @@ /* - * Copyright (c) 1992, Brian Berliner and Jeff Polk - * Copyright (c) 1989-1992, Brian Berliner + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk + * Portions Copyright (C) 1989-1992, Brian Berliner * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS source distribution. @@ -11,6 +16,7 @@ #include "cvs.h" #include "getline.h" #include +#include "history.h" extern char *logHistory; @@ -42,6 +48,8 @@ Parse_Info (infofile, repository, callpr const char *srepos; const char *regex_err; + assert (repository); + if (current_parsed_root == NULL) { /* XXX - should be error maybe? */ @@ -272,8 +280,7 @@ parse_config (cvsroot) value, currently at least. */ error (0, errno, "cannot open %s", infopath); } - free (infopath); - return 0; + goto set_defaults_and_return; } while (getline (&line, &line_allocated, fp_info) >= 0) @@ -416,8 +423,8 @@ warning: this CVS does not support Prese { if (strcmp (p, "all") != 0) { - logHistory=xmalloc(strlen (p) + 1); - strcpy (logHistory, p); + if (logHistory) free (logHistory); + logHistory = xstrdup (p); } } else if (strcmp (line, "RereadLogAfterVerify") == 0) @@ -457,12 +464,17 @@ warning: this CVS does not support Prese error (0, errno, "cannot close %s", infopath); goto error_return; } +set_defaults_and_return: + if (!logHistory) + logHistory = xstrdup (ALL_HISTORY_REC_TYPES); free (infopath); if (line != NULL) free (line); return 0; error_return: + if (!logHistory) + logHistory = xstrdup (ALL_HISTORY_REC_TYPES); if (infopath != NULL) free (infopath); if (line != NULL) Index: src/patch.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/patch.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -p -r1.2 -r1.3 --- src/patch.c 22 Apr 2005 17:58:25 -0000 1.2 +++ src/patch.c 2 Jan 2008 09:01:10 -0000 1.3 @@ -1,6 +1,11 @@ /* - * Copyright (c) 1992, Brian Berliner and Jeff Polk - * Copyright (c) 1989-1992, Brian Berliner + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk + * Portions Copyright (C) 1989-1992, Brian Berliner * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS source distribution. @@ -10,8 +15,6 @@ * Create a Larry Wall format "patch" file between a previous release and the * current head of a module, or between two releases. Can specify the * release as either a date or a revision number. - * - * $FreeBSD$ */ #include @@ -44,7 +47,7 @@ static int unidiff = 0; static const char *const patch_usage[] = { - "Usage: %s %s [-flR] [-c|-u] [-s|-t] [-V %%d]\n", + "Usage: %s %s [-flR] [-c|-u] [-s|-t] [-V %%d] [-k kopt]\n", " -r rev|-D date [-r rev2 | -D date2] modules...\n", "\t-f\tForce a head revision match if tag/date not found.\n", "\t-l\tLocal directory only, not recursive\n", @@ -53,9 +56,10 @@ static const char *const patch_usage[] = "\t-u\tUnidiff format.\n", "\t-s\tShort patch - one liner per file.\n", "\t-t\tTop two diffs - last change made to the file.\n", + "\t-V vers\tUse RCS Version \"vers\" for keyword expansion.\n", + "\t-k kopt\tSpecify keyword expansion mode.\n", "\t-D date\tDate.\n", "\t-r rev\tRevision - symbolic or numeric.\n", - "\t-V vers\tUse RCS Version \"vers\" for keyword expansion.\n", "(Specify the --help global option for a list of other help options)\n", NULL }; @@ -83,11 +87,9 @@ patch (argc, argv) { case 'Q': case 'q': -#ifdef SERVER_SUPPORT /* The CVS 1.5 client sends these options (in addition to Global_option requests), so we must ignore them. */ if (!server_active) -#endif error (1, 0, "-q or -Q must be specified before \"%s\"", cvs_cmd_name); @@ -340,6 +342,7 @@ patch_proc (argc, argv, xwhere, mwhere, { error (0, errno, "cannot chdir to %s", repository); free (repository); + free (where); return 1; } @@ -402,6 +405,9 @@ patch_fileproc (callerdat, finfo) char *cp1, *cp2; FILE *fp; int line_length; + int dargc = 0; + size_t darg_allocated = 0; + char **dargv = NULL; line1 = NULL; line1_chars_allocated = 0; @@ -512,7 +518,8 @@ patch_fileproc (callerdat, finfo) */ if ((fp1 = cvs_temp_file (&tmpfile1)) == NULL) { - error (0, errno, "cannot create temporary file %s", tmpfile1); + error (0, errno, "cannot create temporary file %s", + tmpfile1 ? tmpfile1 : "(null)"); ret = 1; goto out; } @@ -521,7 +528,8 @@ patch_fileproc (callerdat, finfo) error (0, errno, "warning: cannot close %s", tmpfile1); if ((fp2 = cvs_temp_file (&tmpfile2)) == NULL) { - error (0, errno, "cannot create temporary file %s", tmpfile2); + error (0, errno, "cannot create temporary file %s", + tmpfile2 ? tmpfile2 : "(null)"); ret = 1; goto out; } @@ -530,7 +538,8 @@ patch_fileproc (callerdat, finfo) error (0, errno, "warning: cannot close %s", tmpfile2); if ((fp3 = cvs_temp_file (&tmpfile3)) == NULL) { - error (0, errno, "cannot create temporary file %s", tmpfile3); + error (0, errno, "cannot create temporary file %s", + tmpfile3 ? tmpfile3 : "(null)"); ret = 1; goto out; } @@ -581,8 +590,10 @@ patch_fileproc (callerdat, finfo) (void)utime (tmpfile2, &t); } - switch (diff_exec (tmpfile1, tmpfile2, NULL, NULL, unidiff ? "-u" : "-c", - tmpfile3)) + if (unidiff) run_add_arg_p (&dargc, &darg_allocated, &dargv, "-u"); + else run_add_arg_p (&dargc, &darg_allocated, &dargv, "-c"); + switch (diff_exec (tmpfile1, tmpfile2, NULL, NULL, dargc, dargv, + tmpfile3)) { case -1: /* fork/wait failure */ error (1, errno, "fork for diff failed on %s", rcs); @@ -744,16 +755,33 @@ failed to read diff file header %s for % free (line1); if (line2) free (line2); - if (CVS_UNLINK (tmpfile1) < 0) - error (0, errno, "cannot unlink %s", tmpfile1); - if (CVS_UNLINK (tmpfile2) < 0) - error (0, errno, "cannot unlink %s", tmpfile2); - if (CVS_UNLINK (tmpfile3) < 0) - error (0, errno, "cannot unlink %s", tmpfile3); - free (tmpfile1); - free (tmpfile2); - free (tmpfile3); - tmpfile1 = tmpfile2 = tmpfile3 = NULL; + if (tmpfile1 != NULL) + { + if (CVS_UNLINK (tmpfile1) < 0) + error (0, errno, "cannot unlink %s", tmpfile1); + free (tmpfile1); + tmpfile1 = NULL; + } + if (tmpfile2 != NULL) + { + if (CVS_UNLINK (tmpfile2) < 0) + error (0, errno, "cannot unlink %s", tmpfile2); + free (tmpfile2); + tmpfile2 = NULL; + } + if (tmpfile3 != NULL) + { + if (CVS_UNLINK (tmpfile3) < 0) + error (0, errno, "cannot unlink %s", tmpfile3); + free (tmpfile3); + tmpfile3 = NULL; + } + + if (dargc) + { + run_arg_free_p (dargc, dargv); + free (dargv); + } out2: if (vers_tag != NULL) Index: src/rcs.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/rcs.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -p -r1.28 -r1.29 --- src/rcs.c 22 Apr 2005 17:58:25 -0000 1.28 +++ src/rcs.c 7 Jan 2008 02:03:50 -0000 1.29 @@ -1,5 +1,11 @@ /* - * Copyright (c) 1992, Brian Berliner and Jeff Polk + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk + * Portions Copyright (C) 1989-1992, Brian Berliner * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS source distribution. @@ -303,8 +309,8 @@ RCS_parse (file, repos) } else if (! existence_error (errno)) { - free ( rcsfile ); error (0, errno, "cannot open %s", rcsfile); + free (rcsfile); } return retval; @@ -500,8 +506,13 @@ RCS_reparsercsfile (rdata, pfp, rcsbufp) RCS_addaccess expects nothing but spaces. FIXME: It would be easy and more efficient to change RCS_addaccess. */ - rdata->access = rcsbuf_valcopy (&rcsbuf, value, 1, - (size_t *) NULL); + if (rdata->access) + { + error (0, 0, + "Duplicate `access' keyword found in RCS file."); + free (rdata->access); + } + rdata->access = rcsbuf_valcopy (&rcsbuf, value, 1, NULL); } continue; } @@ -511,8 +522,15 @@ RCS_reparsercsfile (rdata, pfp, rcsbufp) if (STREQ (key, "locks")) { if (value != NULL) - rdata->locks_data = rcsbuf_valcopy (&rcsbuf, value, 0, - (size_t *) NULL); + { + if (rdata->locks_data) + { + error (0, 0, + "Duplicate `locks' keyword found in RCS file."); + free (rdata->locks_data); + } + rdata->locks_data = rcsbuf_valcopy (&rcsbuf, value, 0, NULL); + } if (! rcsbuf_getkey (&rcsbuf, &key, &value)) { error (1, 0, "premature end of file reading %s", rcsfile); @@ -529,8 +547,16 @@ RCS_reparsercsfile (rdata, pfp, rcsbufp) if (STREQ (RCSSYMBOLS, key)) { if (value != NULL) - rdata->symbols_data = rcsbuf_valcopy (&rcsbuf, value, 0, - (size_t *) NULL); + { + if (rdata->symbols_data) + { + error (0, 0, + "Duplicate `%s' keyword found in RCS file.", + RCSSYMBOLS); + free (rdata->symbols_data); + } + rdata->symbols_data = rcsbuf_valcopy (&rcsbuf, value, 0, NULL); + } continue; } @@ -554,8 +580,14 @@ RCS_reparsercsfile (rdata, pfp, rcsbufp) if (STREQ (key, "comment")) { - rdata->comment = rcsbuf_valcopy (&rcsbuf, value, 0, - (size_t *) NULL); + if (rdata->comment) + { + error (0, 0, + "warning: duplicate key `%s' in RCS file `%s'", + key, rcsfile); + free (rdata->comment); + } + rdata->comment = rcsbuf_valcopy (&rcsbuf, value, 0, NULL); continue; } if (rdata->other == NULL) @@ -589,14 +621,9 @@ RCS_reparsercsfile (rdata, pfp, rcsbufp) q->key = vnode->version; /* add the nodes to the list */ - if (addnode (rdata->versions, q) != 0) - { -#if 0 - purify_printf("WARNING: Adding duplicate version: %s (%s)\n", - q->key, rcsfile); - freenode (q); -#endif - } + if (addnode (rdata->versions, q)) + error (1, 0, "Multiple %s revision deltas found in `%s'", + q->key, rcsfile); } /* Here KEY and VALUE are whatever caused getdelta to return NULL. */ @@ -750,10 +777,10 @@ RCS_fully_parse (rcs) break; vers = findnode (rcs->versions, key); - if (vers == NULL) + if (!vers) error (1, 0, - "mismatch in rcs file %s between deltas and deltatexts (%s)", - rcs->path, key); + "Delta text %s without revision information in `%s'.", + key, rcs->path); vnode = vers->data; @@ -2077,6 +2104,8 @@ do_symbols (list, val) char *cp = val; char *tag, *rev; + assert (cp); + for (;;) { /* skip leading whitespace */ @@ -2119,6 +2148,8 @@ do_locks (list, val) char *cp = val; char *user, *rev; + assert (cp); + for (;;) { /* skip leading whitespace */ @@ -2303,6 +2334,12 @@ RCS_tag2rev (rcs, tag) * the 0 in some other position -- */ pa = strrchr (rev, '.'); + if (!pa) + /* This might happen, for instance, if an RCS file only contained + * revisions 2.x and higher, and REV == "1". + */ + error (1, 0, "revision `%s' does not exist", tag); + pb = xmalloc (strlen (rev) + 3); *pa++ = 0; (void) sprintf (pb, "%s.%d.%s", rev, RCS_MAGIC_BRANCH, pa); @@ -2889,8 +2926,9 @@ RCS_getbranchpoint (rcs, target) vp = findnode (rcs->versions, branch); if (vp == NULL) - { + { error (0, 0, "%s: can't find branch point %s", rcs->path, target); + free (branch); return NULL; } rev = vp->data; @@ -3024,6 +3062,8 @@ RCS_getdate (rcs, date, force_tag_match) { char *date_1_1 = vers->date; + assert (p->data != NULL); + vers = p->data; if (RCS_datecmp (vers->date, date_1_1) != 0) return xstrdup ("1.1"); @@ -3292,7 +3332,7 @@ translate_symtag (rcs, tag) if (rcs->symbols_data != NULL) { size_t len; - char *cp; + char *cp, *last; /* Look through the RCS symbols information. This is like do_symbols, but we don't add the information to a list. In @@ -3301,8 +3341,16 @@ translate_symtag (rcs, tag) len = strlen (tag); cp = rcs->symbols_data; + /* Keeping track of LAST below isn't strictly necessary, now that tags + * should be parsed for validity before they are accepted, but tags + * with spaces used to cause the code below to loop indefintely, so + * I have corrected for that. Now, in the event that I missed + * something, the server cannot be hung. -DRP + */ + last = NULL; while ((cp = strchr (cp, tag[0])) != NULL) { + if (cp == last) break; if ((cp == rcs->symbols_data || whitespace (cp[-1])) && strncmp (cp, tag, len) == 0 && cp[len] == ':') @@ -3325,6 +3373,7 @@ translate_symtag (rcs, tag) ++cp; if (*cp == '\0') break; + last = cp; } } @@ -3452,6 +3501,8 @@ RCS_isdead (rcs, tag) Node *p; RCSVers *version; + assert (rcs != NULL); + if (rcs->flags & PARTIAL) RCS_reparsercsfile (rcs, (FILE **) NULL, (struct rcsbuffer *) NULL); @@ -3931,6 +3982,13 @@ expand_keywords (rcs, ver, name, log, lo if (*snl == '\n') ++cnl; + /* If the log message did not end in a newline, increment + * the newline count so we have space for the extra leader. + * Failure to do so results in a buffer overrun. + */ + if (loglen && snl[-1] != '\n') + ++cnl; + date = printable_date (ver->date); sub = xrealloc (sub, (sublen @@ -3939,6 +3997,10 @@ expand_keywords (rcs, ver, name, log, lo + strlen (date) + strlen (ver->author) + loglen + /* Use CNL + 2 below: One leader for each log + * line, plus the Revision/Author/Date line, + * plus a trailing blank line. + */ + (cnl + 2) * leader_len + 20)); if (expand != KFLAG_V) @@ -3978,6 +4040,14 @@ expand_keywords (rcs, ver, name, log, lo ++slnl; memcpy (sub + sublen, sl, slnl - sl); sublen += slnl - sl; + if (slnl == logend && slnl[-1] != '\n') + { + /* There was no EOL at the end of the log message. Add + * one. + */ + sub[sublen] = '\n'; + ++sublen; + } sl = slnl; } } @@ -4096,7 +4166,8 @@ expand_keywords (rcs, ver, name, log, lo Otherwise, if WORKFILE is NULL, check out the revision to SOUT. If SOUT is RUN_TTY, then write the contents of the revision to standard output. When using SOUT, the output is generally a - temporary file; don't bother to get the file modes correct. + temporary file; don't bother to get the file modes correct. When + NOEXEC is set, WORKFILEs are not written but SOUTs are. REV is the numeric revision to check out. It may be NULL, which means to check out the head of the default branch. @@ -4171,7 +4242,7 @@ RCS_checkout (rcs, workfile, rev, nameta assert (rev == NULL || isdigit ((unsigned char) *rev)); - if (noexec && workfile != NULL) + if (noexec && !server_active && workfile != NULL) return 0; assert (sout == RUN_TTY || workfile == NULL); @@ -4201,10 +4272,23 @@ RCS_checkout (rcs, workfile, rev, nameta gothead = 0; if (! rcsbuf_getrevnum (&rcsbuf, &key)) error (1, 0, "unexpected EOF reading %s", rcs->path); + + if (!STREQ (rcs->head, key)) + error (1, 0, "Expected head revision %s, found %s.", + rcs->head, key); + while (rcsbuf_getkey (&rcsbuf, &key, &value)) { if (STREQ (key, "log")) + { + if (log) + { + error (0, 0, +"Duplicate log keyword found for head revision in RCS file."); + free (log); + } log = rcsbuf_valcopy (&rcsbuf, value, 0, &loglen); + } else if (STREQ (key, "text")) { gothead = 1; @@ -4704,6 +4788,7 @@ RCS_findlock_or_tip (rcs) char *user = getcaller(); Node *lock, *p; List *locklist; + char *defaultrev = NULL; /* Find unique delta locked by caller. This code is very similar to the code in RCS_unlock -- perhaps it could be abstracted @@ -4749,7 +4834,17 @@ RCS_findlock_or_tip (rcs) those error checks are to make users lock before a checkin, and we do that in other ways if at all anyway (e.g. rcslock.pl). */ - p = findnode (rcs->versions, RCS_getbranch (rcs, rcs->branch, 0)); + defaultrev = RCS_getbranch (rcs, rcs->branch, 0); + p = findnode (rcs->versions, defaultrev); + if (defaultrev != NULL) + free (defaultrev); + if (!p) + { + error (0, 0, "RCS file `%s' does not contain its default revision.", + rcs->path); + return NULL; + } + return p->data; } @@ -4863,6 +4958,8 @@ RCS_addbranch (rcs, branch) Node *marker; RCSVers *branchnode; + assert (branch); + /* Append to end by default. */ marker = NULL; @@ -4981,18 +5078,21 @@ RCS_addbranch (rcs, branch) or zero for success. */ int -RCS_checkin (rcs, workfile_in, message, rev, flags) +RCS_checkin (rcs, workfile_in, message, rev, citime, flags) RCSNode *rcs; const char *workfile_in; const char *message; const char *rev; + time_t citime; int flags; { RCSVers *delta, *commitpt; Deltatext *dtext; Node *nodep; char *tmpfile, *changefile; - char *diffopts; + int dargc = 0; + size_t darg_allocated = 0; + char **dargv = NULL; size_t bufsize; int status, checkin_quiet; struct tm *ftm; @@ -5014,6 +5114,7 @@ RCS_checkin (rcs, workfile_in, message, { char *p; int extlen = strlen (RCSEXT); + assert (rcs->path); workfile = xstrdup (last_component (rcs->path)); p = workfile + (strlen (workfile) - extlen); assert (strncmp (p, RCSEXT, extlen) == 0); @@ -5048,6 +5149,8 @@ RCS_checkin (rcs, workfile_in, message, } modtime = ws.st_mtime; } + else if (flags & RCS_FLAGS_USETIME) + modtime = citime; else (void) time (&modtime); ftm = gmtime (&modtime); @@ -5289,6 +5392,7 @@ workfile); if (dots == 0) { tip = xstrdup (rcs->head); + assert (tip != NULL); if (atoi (tip) != atoi (branch)) { newrev = (char *) xrealloc (newrev, strlen (newrev) + 3); @@ -5418,9 +5522,10 @@ workfile); /* Diff options should include --binary if the RCS file has -kb set in its `expand' field. */ - diffopts = (rcs->expand != NULL && STREQ (rcs->expand, "b") - ? "-a -n --binary" - : "-a -n"); + run_add_arg_p (&dargc, &darg_allocated, &dargv, "-a"); + run_add_arg_p (&dargc, &darg_allocated, &dargv, "-n"); + if (rcs->expand && STREQ (rcs->expand, "b")) + run_add_arg_p (&dargc, &darg_allocated, &dargv, "--binary"); if (STREQ (commitpt->version, rcs->head) && numdots (delta->version) == 1) @@ -5443,7 +5548,8 @@ workfile); memset (commitpt->text, 0, sizeof (Deltatext)); bufsize = 0; - switch (diff_exec (workfile, tmpfile, NULL, NULL, diffopts, changefile)) + switch (diff_exec (workfile, tmpfile, NULL, NULL, + dargc, dargv, changefile)) { case 0: case 1: @@ -5491,7 +5597,8 @@ workfile); /* This file is not being inserted at the head, but on a side branch somewhere. Make a diff from the previous revision to the working file. */ - switch (diff_exec (tmpfile, workfile, NULL, NULL, diffopts, changefile)) + switch (diff_exec (tmpfile, workfile, NULL, NULL, + dargc, dargv, changefile)) { case 0: case 1: @@ -5518,6 +5625,9 @@ workfile); } } + run_arg_free_p (dargc, dargv); + free (dargv); + /* Update DELTA linkage. It is important not to do this before the very end of RCS_checkin; if an error arises that forces us to abort checking in, we must not have malformed deltas @@ -5590,7 +5700,13 @@ workfile); freedeltatext (dtext); if (status != 0) + { + /* If delta has not been added to a List, then freeing the Node key + * won't free delta->version. + */ + if (delta->version) free (delta->version); free_rcsvers_contents (delta); + } return status; } @@ -6292,7 +6408,12 @@ RCS_delete_revs (rcs, tag1, tag2, inclus /* A range consisting of a branch number means the latest revision on that branch. */ if (RCS_isbranch (rcs, rev1) && STREQ (rev1, rev2)) - rev1 = rev2 = RCS_getbranch (rcs, rev1, 0); + { + char *tmp = RCS_getbranch (rcs, rev1, 0); + free (rev1); + free (rev2); + rev1 = rev2 = tmp; + } else { /* Make sure REV1 and REV2 are ordered correctly (in the @@ -6580,6 +6701,10 @@ RCS_delete_revs (rcs, tag1, tag2, inclus } else { + int dargc = 0; + size_t darg_allocated = 0; + char **dargv = NULL; + beforefile = cvs_temp_name(); status = RCS_checkout (rcs, NULL, before, NULL, "-ko", beforefile, (RCSCHECKOUTPROC)0, NULL); @@ -6587,7 +6712,12 @@ RCS_delete_revs (rcs, tag1, tag2, inclus goto delrev_done; outfile = cvs_temp_name(); - status = diff_exec (beforefile, afterfile, NULL, NULL, "-an", outfile); + run_add_arg_p (&dargc, &darg_allocated, &dargv, "-a"); + run_add_arg_p (&dargc, &darg_allocated, &dargv, "-n"); + status = diff_exec (beforefile, afterfile, NULL, NULL, + dargc, dargv, outfile); + run_arg_free_p (dargc, dargv); + free (dargv); if (status == 2) { @@ -6685,7 +6815,7 @@ RCS_delete_revs (rcs, tag1, tag2, inclus delrev_done: if (rev1 != NULL) free (rev1); - if (rev2 != NULL) + if (rev2 && rev2 != rev1) free (rev2); if (branchpoint != NULL) free (branchpoint); @@ -7046,6 +7176,7 @@ apply_rcs_changes (lines, diffbuf, diffl }; struct deltafrag *dfhead; struct deltafrag *df; + int err; dfhead = NULL; for (p = diffbuf; p != NULL && p < diffbuf + difflen; ) @@ -7111,33 +7242,39 @@ apply_rcs_changes (lines, diffbuf, diffl } } + err = 0; for (df = dfhead; df != NULL;) { unsigned int ln; - switch (df->type) - { - case FRAG_ADD: - if (! linevector_add (lines, df->new_lines, df->len, addvers, - df->pos)) - return 0; - break; - case FRAG_DELETE: - if (df->pos > lines->nlines - || df->pos + df->nlines > lines->nlines) - return 0; - if (delvers != NULL) - for (ln = df->pos; ln < df->pos + df->nlines; ++ln) - lines->vector[ln]->vers = delvers; - linevector_delete (lines, df->pos, df->nlines); - break; - } + /* Once an error is encountered, just free the rest of the list and + * return. + */ + if (!err) + switch (df->type) + { + case FRAG_ADD: + if (! linevector_add (lines, df->new_lines, df->len, addvers, + df->pos)) + err = 1; + break; + case FRAG_DELETE: + if (df->pos > lines->nlines + || df->pos + df->nlines > lines->nlines) + return 0; + if (delvers != NULL) + for (ln = df->pos; ln < df->pos + df->nlines; ++ln) + lines->vector[ln]->vers = delvers; + linevector_delete (lines, df->pos, df->nlines); + break; + } + df = df->next; free (dfhead); dfhead = df; } - return 1; + return !err; } /* Apply an RCS change text to a buffer. The function name starts @@ -7255,12 +7392,18 @@ RCS_deltas (rcs, fp, rcsbuf, version, op struct linevector trunklines; int foundhead; + assert (version); + if (fp == NULL) { rcsbuf_cache_open (rcs, rcs->delta_pos, &fp, &rcsbuf_local); rcsbuf = &rcsbuf_local; } + assert (rcsbuf); + + if (log) *log = NULL; + ishead = 1; vers = NULL; prev_vers = NULL; @@ -7288,6 +7431,13 @@ RCS_deltas (rcs, fp, rcsbuf, version, op if (! rcsbuf_getrevnum (rcsbuf, &key)) error (1, 0, "unexpected EOF reading RCS file %s", rcs->path); + /* look up the revision */ + node = findnode (rcs->versions, key); + if (!node) + error (1, 0, + "Delta text %s without revision information in `%s'.", + key, rcs->path); + if (next != NULL && ! STREQ (next, key)) { /* This is not the next version we need. It is a branch @@ -7299,13 +7449,6 @@ RCS_deltas (rcs, fp, rcsbuf, version, op { isnext = 1; - /* look up the revision */ - node = findnode (rcs->versions, key); - if (node == NULL) - error (1, 0, - "mismatch in rcs file %s between deltas and deltatexts (%s)", - rcs->path, key); - /* Stash the previous version. */ prev_vers = vers; @@ -7331,6 +7474,12 @@ RCS_deltas (rcs, fp, rcsbuf, version, op && STREQ (key, "log") && STREQ (branchversion, version)) { + if (*log != NULL) + { + error (0, 0, "Duplicate `log' keyword in RCS file (`%s').", + rcs->path); + free (*log); + } *log = rcsbuf_valcopy (rcsbuf, value, 0, loglen); } @@ -7412,6 +7561,9 @@ RCS_deltas (rcs, fp, rcsbuf, version, op if (vers->branches == NULL) error (1, 0, "missing expected branches in %s", rcs->path); + if (!cpversion) + error (1, 0, "Invalid revision number in `%s'.", + rcs->path); *cpversion = '.'; ++cpversion; cpversion = strchr (cpversion, '.'); @@ -7797,9 +7949,10 @@ RCS_getdeltatext (rcs, fp, rcsbuf) } p = findnode (rcs->versions, num); - if (p == NULL) - error (1, 0, "mismatch in rcs file %s between deltas and deltatexts (%s)", - rcs->path, num); + if (!p) + error (1, 0, + "Delta text %s without revision information in `%s'.", + num, rcs->path); d = (Deltatext *) xmalloc (sizeof (Deltatext)); d->version = xstrdup (num); @@ -8064,31 +8217,65 @@ RCS_putdtree (rcs, rev, fp) RCSVers *versp; Node *p, *branch; + /* Previously, this function used a recursive implementation, but + if the trunk has a huge number of revisions and the program + stack is not big, a stack overflow could occur, so this + nonrecursive version was developed to be more safe. */ + Node *branchlist, *onebranch; + List *branches; + List *onebranchlist; + if (rev == NULL) return; - /* Find the delta node for this revision. */ - p = findnode (rcs->versions, rev); - if (p == NULL) + branches = getlist(); + + for (; rev != NULL;) { - error (1, 0, - "error parsing repository file %s, file may be corrupt.", - rcs->path); - } + /* Find the delta node for this revision. */ + p = findnode (rcs->versions, rev); + if (p == NULL) + { + error (1, 0, + "error parsing repository file %s, file may be corrupt.", + rcs->path); + } - versp = p->data; + versp = p->data; + + /* Print the delta node and go for its `next' node. This + prints the trunk. If there are any branches printed on this + revision, mark we have some. */ + putdelta (versp, fp); + /* Store branch information into branch list so to write its + trunk afterwards */ + if (versp->branches != NULL) + { + branch = getnode(); + branch->data = versp->branches; + + addnode(branches, branch); + } + + rev = versp->next; + } - /* Print the delta node and recurse on its `next' node. This prints - the trunk. If there are any branches printed on this revision, + /* If there are any branches printed on this revision, print those trunks as well. */ - putdelta (versp, fp); - RCS_putdtree (rcs, versp->next, fp); - if (versp->branches != NULL) - { - branch = versp->branches->list; - for (p = branch->next; p != branch; p = p->next) + branchlist = branches->list; + for (branch = branchlist->next; + branch != branchlist; + branch = branch->next) + { + onebranchlist = (List *)(branch->data); + onebranch = onebranchlist->list; + for (p = onebranch->next; p != onebranch; p = p->next) RCS_putdtree (rcs, p->key, fp); + + branch->data = NULL; /* so to prevent its freeing on dellist */ } + + dellist(&branches); } static void @@ -8193,6 +8380,11 @@ RCS_copydeltas (rcs, fin, rcsbufin, fout } np = findnode (rcs->versions, dtext->version); + if (!np) + error (1, 0, + "Delta text %s without revision information in `%s'.", + dtext->version, rcs->path); + dadmin = np->data; /* If this revision has been outdated, just skip it. */ @@ -8480,6 +8672,28 @@ rcs_internal_unlockfile (fp, rcsfile) real solution is to check each call to fprintf rather than waiting until the end like this. */ error (1, errno, "error writing to lock file %s", rcs_lockfile); + + /* Flush and sync the file, or the user may be told the commit completed, + * while a server crash/power failure could still cause the data to be + * lost. + * + * Invoking rename(",," , ",v") on Linux and almost all UNIXs + * only flushes the inode for the target file to disk, it does not + * guarantee flush of the kernel buffers allocated for the ,,. + * Depending upon the load on the machine, the Linux kernel's flush daemon + * process may not flush for a while. In the meantime the CVS transaction + * could have been declared committed to the end CVS user (CVS process has + * returned the final "OK"). If the machine crashes prior to syncing the + * changes to disk, the committed transaction can be lost. + */ + if (fflush (fp) != 0) + error (1, errno, "error flushing file `%s' to kernel buffers", + rcs_lockfile); +#ifdef HAVE_FSYNC + if (fsync (rcs_lockfd) < 0) + error (1, errno, "error fsyncing file `%s'", rcs_lockfile); +#endif + if (fclose (fp) == EOF) error (1, errno, "error closing lock file %s", rcs_lockfile); rcs_lockfd = -1; @@ -8534,6 +8748,8 @@ RCS_rewrite (rcs, newdtext, insertpt) FILE *fin, *fout; struct rcsbuffer rcsbufin; + assert (rcs); + if (noexec) return; Index: src/rcs.h =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/rcs.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -p -r1.11 -r1.12 --- src/rcs.h 6 Jul 2004 08:10:38 -0000 1.11 +++ src/rcs.h 2 Jan 2008 10:20:57 -0000 1.12 @@ -1,6 +1,11 @@ /* - * Copyright (c) 1992, Brian Berliner and Jeff Polk - * Copyright (c) 1989-1992, Brian Berliner + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk + * Portions Copyright (C) 1989-1992, Brian Berliner * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS source distribution. @@ -226,7 +231,8 @@ void RCS_setexpand PROTO ((RCSNode *, co int RCS_checkout PROTO ((RCSNode *, const char *, const char *, const char *, const char *, const char *, RCSCHECKOUTPROC, void *)); int RCS_checkin PROTO ((RCSNode *rcs, const char *workfile, - const char *message, const char *rev, int flags)); + const char *message, const char *rev, time_t citime, + int flags)); int RCS_cmp_file PROTO((RCSNode *, const char *, char **, const char *, const char *, const char *)); int RCS_settag PROTO ((RCSNode *, const char *, const char *)); Index: src/rcscmds.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/rcscmds.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -p -r1.10 -r1.11 --- src/rcscmds.c 15 Apr 2004 01:17:27 -0000 1.10 +++ src/rcscmds.c 2 Jan 2008 09:01:50 -0000 1.11 @@ -1,14 +1,17 @@ /* - * Copyright (c) 1992, Brian Berliner and Jeff Polk - * Copyright (c) 1989-1992, Brian Berliner + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk + * Portions Copyright (C) 1989-1992, Brian Berliner * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS source distribution. * * The functions in this file provide an interface for performing * operations directly on RCS files. - * - * $FreeBSD$ */ #include "cvs.h" @@ -53,8 +56,8 @@ On a related note, see the comments at diff_exec, later in this file, for more on the diff library. */ -static void RCS_output_diff_options PROTO ((const char *, const char *, - const char *, const char *)); +static void RCS_output_diff_options PROTO ((int, char *const *, const char *, + const char *, const char *)); /* Stuff to deal with passing arguments the way libdiff.a wants to deal @@ -66,17 +69,18 @@ static void RCS_output_diff_options PROT argument will be parsed into whitespace separated words and added to the global call_diff_argv list. - Then, optionally, call call_diff_arg for each additional argument + Then, optionally, call call_diff_add_arg for each additional argument that you'd like to pass to the diff library. Finally, call call_diff or call_diff3 to produce the diffs. */ static char **call_diff_argv; static int call_diff_argc; -static int call_diff_argc_allocated; +static size_t call_diff_argc_allocated; static void call_diff_add_arg PROTO ((const char *)); -static void call_diff_setup PROTO ((const char *prog)); +static void call_diff_setup PROTO ((const char *prog, + int argc, char * const *argv)); static int call_diff PROTO ((const char *out)); static int call_diff3 PROTO ((char *out)); @@ -85,62 +89,37 @@ static void call_diff_flush_output PROTO static void call_diff_write_stdout PROTO((const char *)); static void call_diff_error PROTO((const char *, const char *, const char *)); + + +static void +call_diff_add_arg (s) + const char *s; +{ + run_add_arg_p (&call_diff_argc, &call_diff_argc_allocated, &call_diff_argv, + s); +} + + + /* VARARGS */ static void -call_diff_setup (prog) +call_diff_setup (prog, argc, argv) const char *prog; + int argc; + char * const *argv; { - char *cp; int i; - char *call_diff_prog; /* clean out any malloc'ed values from call_diff_argv */ - for (i = 0; i < call_diff_argc; i++) - { - if (call_diff_argv[i]) - { - free (call_diff_argv[i]); - call_diff_argv[i] = (char *) 0; - } - } + run_arg_free_p (call_diff_argc, call_diff_argv); call_diff_argc = 0; - call_diff_prog = xstrdup (prog); - /* put each word into call_diff_argv, allocating it as we go */ - for (cp = strtok (call_diff_prog, " \t"); - cp != NULL; - cp = strtok ((char *) NULL, " \t")) - call_diff_add_arg (cp); - free (call_diff_prog); + call_diff_add_arg (prog); + for (i = 0; i < argc; i++) + call_diff_add_arg (argv[i]); } -static void -call_diff_arg (s) - const char *s; -{ - call_diff_add_arg (s); -} - -static void -call_diff_add_arg (s) - const char *s; -{ - /* allocate more argv entries if we've run out */ - if (call_diff_argc >= call_diff_argc_allocated) - { - call_diff_argc_allocated += 50; - call_diff_argv = (char **) - xrealloc ((char *) call_diff_argv, - call_diff_argc_allocated * sizeof (char **)); - } - - if (s) - call_diff_argv[call_diff_argc++] = xstrdup (s); - else - /* Not post-incremented on purpose! */ - call_diff_argv[call_diff_argc] = (char *) 0; -} /* Callback function for the diff library to write data to the output file. This is used when we are producing output to stdout. */ @@ -213,6 +192,8 @@ static int call_diff (out) const char *out; { + call_diff_add_arg (NULL); + if (out == RUN_TTY) return diff_run (call_diff_argc, call_diff_argv, NULL, &call_diff_stdout_callbacks); @@ -264,6 +245,7 @@ RCS_merge(rcs, path, workfile, options, symbolic). */ xrev1 = RCS_gettag (rcs, rev1, 0, NULL); xrev2 = RCS_gettag (rcs, rev2, 0, NULL); + assert (xrev1 && xrev2); /* Check out chosen revisions. The error message when RCS_checkout fails is not very informative -- it is taken verbatim from RCS 5.7, @@ -304,21 +286,21 @@ RCS_merge(rcs, path, workfile, options, /* Remember that the first word in the `call_diff_setup' string is used now only for diagnostic messages -- CVS no longer forks to run diff3. */ diffout = cvs_temp_name(); - call_diff_setup ("diff3"); - call_diff_arg ("-E"); - call_diff_arg ("-am"); - - call_diff_arg ("-L"); - call_diff_arg (workfile); - call_diff_arg ("-L"); - call_diff_arg (xrev1); - call_diff_arg ("-L"); - call_diff_arg (xrev2); - - call_diff_arg ("--"); - call_diff_arg (workfile); - call_diff_arg (tmp1); - call_diff_arg (tmp2); + call_diff_setup ("diff3", 0, NULL); + call_diff_add_arg ("-E"); + call_diff_add_arg ("-am"); + + call_diff_add_arg ("-L"); + call_diff_add_arg (workfile); + call_diff_add_arg ("-L"); + call_diff_add_arg (xrev1); + call_diff_add_arg ("-L"); + call_diff_add_arg (xrev2); + + call_diff_add_arg ("--"); + call_diff_add_arg (workfile); + call_diff_add_arg (tmp1); + call_diff_add_arg (tmp2); retval = call_diff3 (diffout); @@ -384,10 +366,11 @@ RCS_merge(rcs, path, workfile, options, about this--any such features are undocumented in the context of CVS, and I'm not sure how important to users. */ int -RCS_exec_rcsdiff(rcsfile, opts, options, rev1, rev1_cache, rev2, - label1, label2, workfile ) +RCS_exec_rcsdiff (rcsfile, diff_argc, diff_argv, options, rev1, rev1_cache, + rev2, label1, label2, workfile) RCSNode *rcsfile; - const char *opts; + int diff_argc; + char * const *diff_argv; const char *options; const char *rev1; const char *rev1_cache; @@ -467,8 +450,9 @@ RCS file: ", 0); use_file2 = tmpfile2; } - RCS_output_diff_options (opts, rev1, rev2, workfile); - status = diff_exec( use_file1, use_file2, label1, label2, opts, RUN_TTY ); + RCS_output_diff_options (diff_argc, diff_argv, rev1, rev2, workfile); + status = diff_exec (use_file1, use_file2, label1, label2, + diff_argc, diff_argv, RUN_TTY); if (status >= 0) { retval = status; @@ -547,16 +531,15 @@ RCS file: ", 0); message on stderr. */ int -diff_exec (file1, file2, label1, label2, options, out) +diff_exec (file1, file2, label1, label2, dargc, dargv, out) const char *file1; const char *file2; const char *label1; const char *label2; - const char *options; + int dargc; + char * const *dargv; const char *out; { - char *args; - #ifdef PRESERVE_PERMISSIONS_SUPPORT /* If either file1 or file2 are special files, pretend they are /dev/null. Reason: suppose a file that represents a block @@ -590,18 +573,15 @@ diff_exec (file1, file2, label1, label2, } #endif - args = xmalloc (strlen (options) + 10); - /* The first word in this string is used only for error reporting. */ - sprintf (args, "diff %s", options); - call_diff_setup (args); + /* The first arg to call_diff_setup is used only for error reporting. */ + call_diff_setup ("diff", dargc, dargv); if (label1) - call_diff_arg (label1); + call_diff_add_arg (label1); if (label2) - call_diff_arg (label2); - call_diff_arg ("--"); - call_diff_arg (file1); - call_diff_arg (file2); - free (args); + call_diff_add_arg (label2); + call_diff_add_arg ("--"); + call_diff_add_arg (file1); + call_diff_add_arg (file2); return call_diff (out); } @@ -613,19 +593,23 @@ diff_exec (file1, file2, label1, label2, that I have seen. */ static void -RCS_output_diff_options (opts, rev1, rev2, workfile) - const char *opts; +RCS_output_diff_options (diff_argc, diff_argv, rev1, rev2, workfile) + int diff_argc; + char * const *diff_argv; const char *rev1; const char *rev2; const char *workfile; { - char *tmp; - - tmp = (char *) xmalloc (strlen (opts) + strlen (rev1) + 10); - - sprintf (tmp, "diff%s -r%s", opts, rev1); - cvs_output (tmp, 0); - free (tmp); + int i; + + cvs_output ("diff", 0); + for (i = 0; i < diff_argc; i++) + { + cvs_output (" ", 1); + cvs_output (diff_argv[i], 0); + } + cvs_output (" -r", 3); + cvs_output (rev1, 0); if (rev2) { Index: src/recurse.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/recurse.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -p -r1.12 -r1.13 --- src/recurse.c 15 Apr 2004 01:17:27 -0000 1.12 +++ src/recurse.c 2 Jan 2008 09:02:39 -0000 1.13 @@ -1,12 +1,17 @@ /* - * Copyright (c) 1992, Brian Berliner and Jeff Polk + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk + * Portions Copyright (C) 1989-1992, Brian Berliner * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS source distribution. * * General recursion handler * - * $FreeBSD$ */ #include "cvs.h" @@ -135,6 +140,25 @@ start_recursion (fileproc, filesdoneproc frame.aflag = aflag; frame.locktype = locktype; frame.dosrcs = dosrcs; + + /* If our repository_in has a trailing "/.", remove it before storing it + * for do_recursion(). + * + * FIXME: This is somewhat of a hack in the sense that many of our callers + * painstakingly compute and add the trailing '.' we now remove. + */ + while (repository_in && strlen (repository_in) >= 2 + && repository_in[strlen (repository_in) - 2] == '/' + && repository_in[strlen (repository_in) - 1] == '.') + { + /* Beware the case where the string is exactly "/." or "//.". + * Paths with a leading "//" are special on some early UNIXes. + */ + if (strlen (repository_in) == 2 || strlen (repository_in) == 3) + repository_in[strlen (repository_in) - 1] = '\0'; + else + repository_in[strlen (repository_in) - 2] = '\0'; + } frame.repository = repository_in; expand_wild (argc, argv, &argc, &argv); @@ -172,21 +196,24 @@ start_recursion (fileproc, filesdoneproc && CVSroot_cmdline == NULL && current_parsed_root->isremote) { - char *root = Name_Root (NULL, update_dir); - if (root && strcmp (root, current_parsed_root->original) != 0) - /* We're skipping this directory because it is for - a different root. Therefore, we just want to - do the subdirectories only. Processing files would - cause a working directory from one repository to be - processed against a different repository, which could - cause all kinds of spurious conflicts and such. - - Question: what about the case of "cvs update foo" - where we process foo/bar and not foo itself? That - seems to be handled somewhere (else) but why should - it be a separate case? Needs investigation... */ - just_subdirs = 1; - free (root); + cvsroot_t *root = Name_Root (NULL, update_dir); + if (root) + { + if (strcmp (root->original, current_parsed_root->original)) + /* We're skipping this directory because it is for + * a different root. Therefore, we just want to + * do the subdirectories only. Processing files would + * cause a working directory from one repository to be + * processed against a different repository, which could + * cause all kinds of spurious conflicts and such. + * + * Question: what about the case of "cvs update foo" + * where we process foo/bar and not foo itself? That + * seems to be handled somewhere (else) but why should + * it be a separate case? Needs investigation... */ + just_subdirs = 1; + free_cvsroot_t (root); + } } #endif @@ -307,11 +334,8 @@ start_recursion (fileproc, filesdoneproc addfile (&files_by_dir, dir, comp); else if (isdir (dir)) { - if ((which & W_LOCAL) && isdir (CVSADM) -#ifdef CLIENT_SUPPORT - && !current_parsed_root->isremote -#endif - ) + if ((which & W_LOCAL) && isdir (CVSADM) && + !current_parsed_root->isremote) { /* otherwise, look for it in the repository. */ char *tmp_update_dir; @@ -567,7 +591,7 @@ do_recursion (frame) * generating data, to give the buffers a chance to drain to the * remote client. We should not have locks active at this point, * but if there are writelocks around, we cannot pause here. */ - if (server_active && locktype != CVS_LOCK_NONE) + if (server_active && locktype != CVS_LOCK_WRITE) server_pause_check(); #endif @@ -583,43 +607,41 @@ do_recursion (frame) directories, since we're guaranteed to have only one CVSROOT -- our own. */ - if ( - /* If -d was specified, it should override CVS/Root. - - In the single-repository case, it is long-standing CVS behavior - and makes sense - the user might want another access method, - another server (which mounts the same repository), &c. - - In the multiple-repository case, -d overrides all CVS/Root - files. That is the only plausible generalization I can - think of. */ - CVSroot_cmdline == NULL + /* If -d was specified, it should override CVS/Root. -#ifdef SERVER_SUPPORT - && ! server_active -#endif - ) + In the single-repository case, it is long-standing CVS behavior + and makes sense - the user might want another access method, + another server (which mounts the same repository), &c. + + In the multiple-repository case, -d overrides all CVS/Root + files. That is the only plausible generalization I can + think of. */ + if (CVSroot_cmdline == NULL && !server_active) { - char *this_root = Name_Root ((char *) NULL, update_dir); + cvsroot_t *this_root = Name_Root ((char *) NULL, update_dir); if (this_root != NULL) { - if (findnode (root_directories, this_root) == NULL) + if (findnode (root_directories, this_root->original)) + { + process_this_directory = !strcmp (current_parsed_root->original, + this_root->original); + free_cvsroot_t (this_root); + } + else { /* Add it to our list. */ Node *n = getnode (); n->type = NT_UNKNOWN; - n->key = xstrdup (this_root); + n->key = xstrdup (this_root->original); + n->data = this_root; if (addnode (root_directories, n)) - error (1, 0, "cannot add new CVSROOT %s", this_root); - - } - - process_this_directory = - (strcmp (current_parsed_root->original, this_root) == 0); + error (1, 0, "cannot add new CVSROOT %s", + this_root->original); - free (this_root); + process_this_directory = 0; + } } } @@ -682,7 +704,8 @@ do_recursion (frame) if (repository == NULL) { Name_Repository ((char *) NULL, update_dir); - assert (!"Not reached. Please report this problem to "); + assert (!"Not reached. Please report this problem to <" + PACKAGE_BUGREPORT ">"); } /* find the files and fill in entries if appropriate */ @@ -1031,42 +1054,41 @@ but CVS uses %s for its own purposes; sk /* Only process this directory if the root matches. This nearly duplicates code in do_recursion. */ - if ( - /* If -d was specified, it should override CVS/Root. - - In the single-repository case, it is long-standing CVS behavior - and makes sense - the user might want another access method, - another server (which mounts the same repository), &c. - - In the multiple-repository case, -d overrides all CVS/Root - files. That is the only plausible generalization I can - think of. */ - CVSroot_cmdline == NULL + /* If -d was specified, it should override CVS/Root. -#ifdef SERVER_SUPPORT - && ! server_active -#endif - ) + In the single-repository case, it is long-standing CVS behavior + and makes sense - the user might want another access method, + another server (which mounts the same repository), &c. + + In the multiple-repository case, -d overrides all CVS/Root + files. That is the only plausible generalization I can + think of. */ + if (CVSroot_cmdline == NULL && !server_active) { - char *this_root = Name_Root (dir, update_dir); + cvsroot_t *this_root = Name_Root (dir, update_dir); if (this_root != NULL) { - if (findnode (root_directories, this_root) == NULL) + if (findnode (root_directories, this_root->original)) + { + process_this_directory = !strcmp (current_parsed_root->original, + this_root->original); + free_cvsroot_t (this_root); + } + else { /* Add it to our list. */ Node *n = getnode (); n->type = NT_UNKNOWN; - n->key = xstrdup (this_root); + n->key = xstrdup (this_root->original); + n->data = this_root; if (addnode (root_directories, n)) - error (1, 0, "cannot add new CVSROOT %s", this_root); + error (1, 0, "cannot add new CVSROOT %s", + this_root->original); + process_this_directory = 0; } - - process_this_directory = (strcmp (current_parsed_root->original, this_root) == 0); - - free (this_root); } } Index: src/release.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/release.c,v retrieving revision 1.1.1.8 retrieving revision 1.1.1.9 diff -u -p -r1.1.1.8 -r1.1.1.9 --- src/release.c 15 Apr 2004 01:01:55 -0000 1.1.1.8 +++ src/release.c 26 Dec 2007 03:55:03 -0000 1.1.1.9 @@ -1,4 +1,18 @@ /* + * Copyright (C) 1994-2005 The 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. + */ + +/* * Release: "cancel" a checkout in the history log. * * - Enter a line in the history log indicating the "release". - If asked to, @@ -67,7 +81,6 @@ release (argc, argv) { FILE *fp; int i, c; - char *repository; char *line = NULL; size_t line_allocated = 0; char *update_cmd; @@ -124,8 +137,12 @@ release (argc, argv) + 1 + 3 + 3 + 16 + 1); sprintf (update_cmd, "%s %s%s-n -q -d %s update", program_path, +#if defined (CLIENT_SUPPORT) || defined (SERVER_SUPPORT) cvsauthenticate ? "-a " : "", cvsencrypt ? "-x " : "", +#else + "", "", +#endif current_parsed_root->original); #ifdef CLIENT_SUPPORT @@ -173,11 +190,9 @@ release (argc, argv) continue; } - repository = Name_Repository ((char *) NULL, (char *) NULL); - if (!really_quiet) { - int line_length; + int line_length, status; /* The "release" command piggybacks on "update", which does the real work of finding out if anything is not @@ -204,10 +219,10 @@ release (argc, argv) complain and go on to the next arg. Especially, we do not want to delete the local copy, since it's obviously not what the user thinks it is. */ - if ((pclose (fp)) != 0) + status = pclose (fp); + if (status != 0) { - error (0, 0, "unable to release `%s'", thisarg); - free (repository); + error (0, 0, "unable to release `%s' (%d)", thisarg, status); if (restore_cwd (&cwd, NULL)) error_exit (); continue; @@ -222,7 +237,6 @@ release (argc, argv) { (void) fprintf (stderr, "** `%s' aborted by user choice.\n", cvs_cmd_name); - free (repository); if (restore_cwd (&cwd, NULL)) error_exit (); continue; @@ -236,9 +250,8 @@ release (argc, argv) CVS/Entries file in the wrong directory. See release-17 through release-23. */ - free (repository); if (restore_cwd (&cwd, NULL)) - exit (EXIT_FAILURE); + error_exit (); if (1 #ifdef CLIENT_SUPPORT @@ -255,7 +268,7 @@ release (argc, argv) argv[2] = NULL; err += unedit (argc, argv); if (restore_cwd (&cwd, NULL)) - exit (EXIT_FAILURE); + error_exit (); } #ifdef CLIENT_SUPPORT @@ -293,7 +306,7 @@ release (argc, argv) err += get_server_responses (); if (restore_cwd (&cwd, NULL)) - exit (EXIT_FAILURE); + error_exit (); } #endif /* CLIENT_SUPPORT */ } Index: src/remove.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/remove.c,v retrieving revision 1.1.1.11 retrieving revision 1.1.1.12 diff -u -p -r1.1.1.11 -r1.1.1.12 --- src/remove.c 15 Apr 2004 01:01:55 -0000 1.1.1.11 +++ src/remove.c 26 Dec 2007 03:55:03 -0000 1.1.1.12 @@ -1,6 +1,11 @@ /* - * Copyright (c) 1992, Brian Berliner and Jeff Polk - * Copyright (c) 1989-1992, Brian Berliner + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk + * Portions Copyright (C) 1989-1992, Brian Berliner * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS source distribution. Index: src/repos.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/repos.c,v retrieving revision 1.1.1.6 retrieving revision 1.1.1.7 diff -u -p -r1.1.1.6 -r1.1.1.7 --- src/repos.c 15 Apr 2004 01:01:55 -0000 1.1.1.6 +++ src/repos.c 26 Dec 2007 03:55:03 -0000 1.1.1.7 @@ -1,6 +1,11 @@ /* - * Copyright (c) 1992, Brian Berliner and Jeff Polk - * Copyright (c) 1989-1992, Brian Berliner + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk + * Portions Copyright (C) 1989-1992, Brian Berliner * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS source distribution. Index: src/root.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/root.c,v retrieving revision 1.1.1.11 retrieving revision 1.1.1.12 diff -u -p -r1.1.1.11 -r1.1.1.12 --- src/root.c 15 Apr 2004 01:01:55 -0000 1.1.1.11 +++ src/root.c 26 Dec 2007 03:55:03 -0000 1.1.1.12 @@ -1,6 +1,10 @@ /* - * Copyright (c) 1992, Mark D. Baushke - * Copyright (c) 2002, Derek R. Price + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Poritons Copyright (c) 1992, Mark D. Baushke * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS source distribution. @@ -11,6 +15,7 @@ */ #include "cvs.h" +#include #include "getline.h" /* Printable names for things in the current_parsed_root->method enum variable. @@ -18,18 +23,19 @@ const char method_names[][16] = { "undefined", "local", "server (rsh)", "pserver", - "kserver", "gserver", "ext", "fork" + "kserver", "gserver", "ext", "extssh", "fork" }; #ifndef DEBUG -char * +cvsroot_t * Name_Root (dir, update_dir) - char *dir; - char *update_dir; + const char *dir; + const char *update_dir; { FILE *fpin; - char *ret, *xupdate_dir; + cvsroot_t *ret; + const char *xupdate_dir; char *root = NULL; size_t root_allocated = 0; char *tmp; @@ -87,7 +93,7 @@ Name_Root (dir, update_dir) goto out; } fclose (fpin); - cp = root + (len - 1); + cp = root + len - 1; if (*cp == '\n') *cp = '\0'; /* strip the newline */ @@ -96,43 +102,34 @@ Name_Root (dir, update_dir) * absolute pathname or specify a remote server. */ - if ( -#ifdef CLIENT_SUPPORT - (strchr (root, ':') == NULL) && -#endif - ! isabsolute (root)) + ret = parse_cvsroot (root); + if (ret == NULL) { error (0, 0, "in directory %s:", xupdate_dir); error (0, 0, - "ignoring %s because it does not contain an absolute pathname.", + "ignoring %s because it does not contain a valid root.", CVSADM_ROOT); - ret = NULL; goto out; } -#ifdef CLIENT_SUPPORT - if ((strchr (root, ':') == NULL) && !isdir (root)) -#else /* ! CLIENT_SUPPORT */ - if (!isdir (root)) -#endif /* CLIENT_SUPPORT */ + if (!ret->isremote && !isdir (ret->directory)) { error (0, 0, "in directory %s:", xupdate_dir); error (0, 0, "ignoring %s because it specifies a non-existent repository %s", CVSADM_ROOT, root); + free_cvsroot_t (ret); ret = NULL; goto out; } - /* allocate space to return and fill it in */ - strip_trailing_slashes (root); - ret = xstrdup (root); + out: free (cvsadm); free (tmp); if (root != NULL) free (root); - return (ret); + return ret; } @@ -293,6 +290,7 @@ new_cvsroot_t () newroot->original = NULL; newroot->method = null_method; + newroot->isremote = 0; #ifdef CLIENT_SUPPORT newroot->username = NULL; newroot->password = NULL; @@ -301,7 +299,6 @@ new_cvsroot_t () newroot->directory = NULL; newroot->proxy_hostname = NULL; newroot->proxy_port = 0; - newroot->isremote = 0; #endif /* CLIENT_SUPPORT */ return newroot; @@ -376,6 +373,8 @@ parse_cvsroot (root_in) int check_hostname, no_port, no_password; #endif /* CLIENT_SUPPORT */ + assert (root_in); + /* allocate some space */ newroot = new_cvsroot_t(); @@ -411,7 +410,7 @@ parse_cvsroot (root_in) * We don't handle these, but we like to try and warn the user that * they are being ignored. */ - if (p = strchr (method, ';')) + if ((p = strchr (method, ';')) != NULL) { *p++ = '\0'; if (!really_quiet) @@ -457,10 +456,7 @@ parse_cvsroot (root_in) : local_method); } -#ifdef CLIENT_SUPPORT newroot->isremote = (newroot->method != local_method); -#endif /* CLIENT_SUPPORT */ - if ((newroot->method != local_method) && (newroot->method != fork_method)) @@ -743,6 +739,8 @@ normalize_cvsroot (root) char *p, *hostname, *username; char port_s[64]; + assert (root && root->hostname && root->directory); + /* get the appropriate port string */ sprintf (port_s, "%d", get_cvs_port_number (root)); Index: src/root.h =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/root.h,v retrieving revision 1.1.1.2 retrieving revision 1.1.1.3 diff -u -p -r1.1.1.2 -r1.1.1.3 --- src/root.h 15 Apr 2004 01:01:55 -0000 1.1.1.2 +++ src/root.h 26 Dec 2007 03:55:04 -0000 1.1.1.3 @@ -1,7 +1,11 @@ /* - * Copyright (c) 2001, Derek Price and others - * Copyright (c) 1992, Brian Berliner and Jeff Polk - * Copyright (c) 1989-1992, Brian Berliner + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk + * Portions Copyright (C) 1989-1992, Brian Berliner * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS kit. @@ -18,6 +22,7 @@ typedef enum { kserver_method, gserver_method, ext_method, + extssh_method, fork_method } CVSmethod; extern const char method_names[][16]; /* change this in root.c if you change @@ -27,6 +32,7 @@ typedef struct cvsroot_s { char *original; /* The complete source CVSroot string. */ CVSmethod method; /* One of the enum values above. */ char *directory; /* The directory name. */ + unsigned char isremote; /* Nonzero if we are doing remote access. */ #ifdef CLIENT_SUPPORT char *username; /* The username or NULL if method == local. */ char *password; /* The password or NULL if method == local. */ @@ -37,6 +43,14 @@ typedef struct cvsroot_s { * used. */ int proxy_port; /* The port of the proxy or zero, as above. */ - unsigned char isremote; /* Nonzero if we are doing remote access. */ #endif /* CLIENT_SUPPORT */ } cvsroot_t; + +cvsroot_t *Name_Root PROTO((const char *dir, const char *update_dir)); +void free_cvsroot_t PROTO((cvsroot_t *root_in)); +cvsroot_t *parse_cvsroot PROTO((const char *root)); +cvsroot_t *local_cvsroot PROTO((const char *dir)); +void Create_Root PROTO((const char *dir, const char *rootdir)); +void root_allow_add PROTO ((char *)); +void root_allow_free PROTO ((void)); +int root_allow_ok PROTO ((char *)); Index: src/run.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/run.c,v retrieving revision 1.1.1.8 retrieving revision 1.1.1.9 diff -u -p -r1.1.1.8 -r1.1.1.9 --- src/run.c 15 Apr 2004 01:01:55 -0000 1.1.1.8 +++ src/run.c 26 Dec 2007 03:55:03 -0000 1.1.1.9 @@ -36,7 +36,19 @@ extern char *strtok (); */ static char **run_argv; static int run_argc; -static int run_argc_allocated; +static size_t run_argc_allocated; + + + +void +run_arg_free_p (int argc, char **argv) +{ + int i; + for (i = 0; i < argc; i++) + free (argv[i]); +} + + /* VARARGS */ void @@ -44,18 +56,10 @@ run_setup (prog) const char *prog; { char *cp; - int i; char *run_prog; /* clean out any malloc'ed values from run_argv */ - for (i = 0; i < run_argc; i++) - { - if (run_argv[i]) - { - free (run_argv[i]); - run_argv[i] = (char *) 0; - } - } + run_arg_free_p (run_argc, run_argv); run_argc = 0; run_prog = xstrdup (prog); @@ -73,22 +77,35 @@ run_arg (s) run_add_arg (s); } -static void -run_add_arg (s) + + +void +run_add_arg_p (iargc, iarg_allocated, iargv, s) + int *iargc; + size_t *iarg_allocated; + char ***iargv; const char *s; { /* allocate more argv entries if we've run out */ - if (run_argc >= run_argc_allocated) + if (*iargc >= *iarg_allocated) { - run_argc_allocated += 50; - run_argv = (char **) xrealloc ((char *) run_argv, - run_argc_allocated * sizeof (char **)); + *iarg_allocated += 50; + *iargv = xrealloc (*iargv, *iarg_allocated * sizeof (char **)); } if (s) - run_argv[run_argc++] = xstrdup (s); + (*iargv)[(*iargc)++] = xstrdup (s); else - run_argv[run_argc] = (char *) 0; /* not post-incremented on purpose! */ + (*iargv)[*iargc] = NULL; /* not post-incremented on purpose! */ +} + + + +static void +run_add_arg (s) + const char *s; +{ + run_add_arg_p (&run_argc, &run_argc_allocated, &run_argv, s); } @@ -400,11 +417,107 @@ run_popen (cmd, mode) return (popen (cmd, mode)); } + + +/* Work around an OpenSSH problem: it can put its standard file + descriptors into nonblocking mode, which will mess us up if we + share file descriptions with it. The simplest workaround is + to create an intervening process between OpenSSH and the + actual stderr. */ + +static void +work_around_openssh_glitch (void) +{ + pid_t pid; + int stderr_pipe[2]; + struct stat sb; + + /* Do nothing unless stderr is a file that is affected by + nonblocking mode. */ + if (!(fstat (STDERR_FILENO, &sb) == 0 + && (S_ISFIFO (sb.st_mode) || S_ISSOCK (sb.st_mode) + || S_ISCHR (sb.st_mode) || S_ISBLK (sb.st_mode)))) + return; + + if (pipe (stderr_pipe) < 0) + error (1, errno, "cannot create pipe"); + pid = fork (); + if (pid < 0) + error (1, errno, "cannot fork"); + if (pid != 0) + { + /* Still in child of original process. Act like "cat -u". */ + char buf[1 << 13]; + ssize_t inbytes; + pid_t w; + int status; + + if (close (stderr_pipe[1]) < 0) + error (1, errno, "cannot close pipe"); + + while ((inbytes = read (stderr_pipe[0], buf, sizeof buf)) != 0) + { + size_t outbytes = 0; + + if (inbytes < 0) + { + if (errno == EINTR) + continue; + error (1, errno, "reading from pipe"); + } + + do + { + ssize_t w = write (STDERR_FILENO, + buf + outbytes, inbytes - outbytes); + if (w < 0) + { + if (errno == EINTR) + w = 0; + if (w < 0) + _exit (1); + } + outbytes += w; + } + while (inbytes != outbytes); + } + + /* Done processing output from grandchild. Propagate + its exit status back to the parent. */ + while ((w = waitpid (pid, &status, 0)) == -1 && errno == EINTR) + continue; + if (w < 0) + error (1, errno, "waiting for child"); + if (!WIFEXITED (status)) + { + if (WIFSIGNALED (status)) + raise (WTERMSIG (status)); + error (1, errno, "child did not exit cleanly"); + } + _exit (WEXITSTATUS (status)); + } + + /* Grandchild of original process. */ + if (close (stderr_pipe[0]) < 0) + error (1, errno, "cannot close pipe"); + + if (stderr_pipe[1] != STDERR_FILENO) + { + if (dup2 (stderr_pipe[1], STDERR_FILENO) < 0) + error (1, errno, "cannot dup2 pipe"); + if (close (stderr_pipe[1]) < 0) + error (1, errno, "cannot close pipe"); + } +} + + + int -piped_child (command, tofdp, fromfdp) +piped_child (command, tofdp, fromfdp, fix_stderr) const char **command; int *tofdp; int *fromfdp; + int fix_stderr; { int pid; int to_child_pipe[2]; @@ -422,11 +535,7 @@ piped_child (command, tofdp, fromfdp) setmode (from_child_pipe[1], O_BINARY); #endif -#ifdef HAVE_VFORK - pid = vfork (); -#else pid = fork (); -#endif if (pid < 0) error (1, errno, "cannot fork"); if (pid == 0) @@ -440,7 +549,10 @@ piped_child (command, tofdp, fromfdp) if (dup2 (from_child_pipe[1], STDOUT_FILENO) < 0) error (1, errno, "cannot dup2 pipe"); - /* Okay to cast out const below - execvp don't return anyhow. */ + if (fix_stderr) + work_around_openssh_glitch (); + + /* Okay to cast out const below - execvp don't return nohow. */ execvp ((char *)command[0], (char **)command); error (1, errno, "cannot exec %s", command[0]); } Index: src/sanity.sh =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/sanity.sh,v retrieving revision 1.1.1.15 retrieving revision 1.1.1.16 diff -u -p -r1.1.1.15 -r1.1.1.16 --- src/sanity.sh 10 Jun 2004 19:05:38 -0000 1.1.1.15 +++ src/sanity.sh 26 Dec 2007 03:55:04 -0000 1.1.1.16 @@ -22,7 +22,7 @@ usage () { echo "Usage: `basename $0` --help" - echo "Usage: `basename $0` [-klr] [-f FROM-TEST] [-h HOSTNAME] CVS-TO-TEST [TESTS-TO-RUN...]" + echo "Usage: `basename $0` [-eklrv] [-f FROM-TEST] [-h HOSTNAME] CVS-TO-TEST [TESTS-TO-RUN...]" } exit_usage () @@ -35,22 +35,27 @@ exit_help () { usage echo - echo "-H|--help display this text" - echo "-l|--link-root" - echo " test CVS using a symlink to a real CVSROOT" - echo "-r|--remote test remote instead of local cvs" + echo "-H|--help Display this text." + echo "-e|--skipfail Treat tests that would otherwise be nonfatally skipped" + echo " for reasons like missing tools as failures, exiting" + echo " with an error message. Also treat warnings as" + echo " failures." + echo "-f FROM-TEST Run TESTS-TO-RUN, skipping all tests in the list before" + echo " FROM-TEST." echo "-h HOSTNAME Use :ext:HOSTNAME to run remote tests rather than" echo " :fork:. Implies --remote and assumes that \$TESTDIR" echo " resolves to the same directory on both the client and" echo " the server." - echo "-k|--keep try to keep directories created by individual tests" - echo " around, exiting after the first test which supports" - echo " --keep" - echo "-f FROM-TEST run TESTS-TO-RUN, skipping all tests in the list before" - echo " FROM-TEST" + echo "-k|--keep Try to keep directories created by individual tests" + echo " around, exiting after the first test which supports" + echo " --keep." + echo "-l|--link-root" + echo " Test CVS using a symlink to a real CVSROOT." + echo "-r|--remote Test remote instead of local cvs." + echo "-v|--verbose List test names as they are executed." echo - echo "CVS-TO-TEST the path to the CVS executable to be tested" - echo "TESTS-TO-RUN the names of the tests to run (defaults to all tests)" + echo "CVS-TO-TEST The path to the CVS executable to be tested." + echo "TESTS-TO-RUN The names of the tests to run (defaults to all tests)." exit 2 } @@ -59,6 +64,10 @@ exit_help () # required to make this script work properly. unset CVSREAD +# This will cause malloc to run slower but should also catch some common errors +# when CVS is linked with glibc 2.x. +MALLOC_CHECK_=2; export MALLOC_CHECK_ + # We want to invoke a predictable set of i18n behaviors, not whatever # the user running this script might have set. # In particular: @@ -71,6 +80,14 @@ LC_ALL=C export LC_ALL +# +# Initialize the test counts. +# +passed=0 +skipped=0 +warnings=0 + + # # read our options @@ -80,7 +97,9 @@ unset remotehost keep=false linkroot=false remote=false -while getopts f:h:Hklr-: option ; do +skipfail=false +verbose=false +while getopts ef:h:Hklrv-: option ; do # convert the long opts to short opts if test x$option = x-; then case "$OPTARG" in @@ -100,12 +119,23 @@ while getopts f:h:Hklr-: option ; do option=k; OPTARG= ;; + s|sk|ski|skip|skipf|skipfa|skipfai|skipfail) + option=e + OPTARG= + ;; + v|ve|ver|verb|verbo|verbos|verbose) + option=v + OPTARG= + ;; *) option=\? OPTARG= esac fi case "$option" in + e) + skipfail=: + ;; f) fromtest="$OPTARG" ;; @@ -133,6 +163,9 @@ while getopts f:h:Hklr-: option ; do r) remote=: ;; + v) + verbose=: + ;; \?) exit_usage ;; @@ -183,7 +216,8 @@ echo 'This test should produce no other echo '(Note that the test can take an hour or more to run and periodically stops' echo 'for as long as one minute. Do not assume there is a problem just because' echo 'nothing seems to happen for a long time. If you cannot live without' -echo "running status, try the command: \`tail -f check.log' from another window.)" +echo 'running status, use the -v option or try the command:' +echo "\`tail -f check.log' from another window.)" # Regexp to match what CVS will call itself in output that it prints. # FIXME: we don't properly quote this--if the name contains . we'll @@ -191,11 +225,7 @@ echo "running status, try the command: \ # special characters we are probably in big trouble. PROG=`basename ${testcvs}` -# Regexp to match an author name. I'm not really sure what characters -# should be here. a-zA-Z obviously. People complained when 0-9 were -# not allowed in usernames. Other than that I'm not sure. -username="[-a-zA-Z0-9][-a-zA-Z0-9]*" -author="[-a-zA-Z0-9][-a-zA-Z0-9]*" +# Match the hostname hostname="[-_.a-zA-Z0-9]*" # Regexp to match the name of a temporary file (from cvs_temp_name). @@ -211,11 +241,41 @@ RFCDATE_EPOCH="1 Jan 1970 00:00:00 -0000 # than diff does DATE="[a-zA-Z]* [a-zA-Z]* [ 1-3][0-9] [0-9:]* [0-9]*" +# Which directories should Which and find_tool search for executables? +SEARCHPATH=$PATH:/usr/local/bin:/usr/contrib/bin:/usr/contrib:/usr/gnu/bin:/local/bin:/local/gnu/bin:/gnu/bin:/sw/bin:/usr/pkg/bin + +# Do not assume that `type -p cmd` is portable +# Usage: Which [-a] [-x|-f|-r] prog [$SEARCHPATH:/with/directories:/to/search] +Which() { + # Optional first argument for file type, defaults to -x. + # Second argument is the file or directory to be found. + # Third argument is the PATH to search. + # By default, print only the first file that matches, + # -a will cause all matches to be printed. + notevery=: + if [ "x$1" = "x-a" ]; then notevery=false; shift; fi + case "$1" in + -*) t=$1; shift ;; + *) t=-x ;; + esac + case "$1" in + # FIXME: Someday this may need to be fixed + # to deal better with C:\some\path\to\ssh values... + /*) test $t $1 && echo $1 ;; + *) for d in `IFS=:; echo ${2-$SEARCHPATH}` + do + test $t $d/$1 && { echo $d/$1; if $notevery; then break; fi; } + done + ;; + esac +} + + # On cygwin32, we may not have /bin/sh. if test -r /bin/sh; then TESTSHELL="/bin/sh" else - TESTSHELL=`type -p sh 2>/dev/null` + TESTSHELL=`Which -f sh` if test ! -r "$TESTSHELL"; then TESTSHELL="/bin/sh" fi @@ -245,6 +305,12 @@ fi # which makes for a lot of failed `tail -f' attempts. touch check.log +# Workaround any X11Forwarding by ssh. Otherwise this text: +# Warning: No xauth data; using fake authentication data for X11 forwarding. +# has been known to end up in the test results below +# causing the test to fail. +[ -n "$DISPLAY" ] && unset DISPLAY + # The default value of /tmp/cvs-sanity for TESTDIR is dubious, # because it loses if two people/scripts try to run the tests # at the same time. Some possible solutions: @@ -326,40 +392,103 @@ fi : ${ID=id} : ${TR=tr} +# Keep track of tools that are found, but do NOT work as we hope +# in order to avoid them in future +badtools= +set_bad_tool () +{ + badtools=$badtools:$1 +} +is_bad_tool () +{ + case ":$badtools:" in *:$1:*) return 0 ;; *) return 1 ; esac +} + +version_test () +{ + vercmd=$1 + verbad=: + if RES=`$vercmd --version &1`; then + if test "X$RES" != "X--version" && test "X$RES" != "X" ; then + echo "$RES" + verbad=false + fi + fi + if $verbad; then + echo "The command \`$vercmd' does not support the --version option." + fi + # It does not really matter that --version is not supported + return 0 +} + +# Try to find a tool that satisfies all of the tests. +# Usage: list:of:colon:separated:alternatives test1 test2 test3 test4... +# Example: find_tool awk:gawk:nawk awk_tooltest1 awk_tooltest2 find_tool () { - GLOCS="`echo $PATH | sed 's/:/ /g'` /usr/local/bin /usr/contrib/bin /usr/gnu/bin /local/bin /local/gnu/bin /gnu/bin" + default_TOOL=$1 + echo find_tool: ${1+"$@"} >>$LOGFILE + cmds="`IFS=:; echo $1`"; shift; tooltests="${1+$@}" + if test -z "$tooltests"; then tooltests=version_test; fi + clist=; for cmd in $cmds; do clist="$clist `Which -a $cmd`"; done + # Make sure the default tool is just the first real command name + for default_TOOL in $clist `IFS=:; echo $default_TOOL`; do break; done TOOL="" - for path in $GLOCS ; do - if test -x $path/g$1 ; then - RES="`$path/g$1 --version /dev/null`" - if test "X$RES" != "X--version" && test "X$RES" != "X" ; then - TOOL=$path/g$1 - break + for trytool in $clist ; do + pass=: + for tooltest in $tooltests; do + result=`eval $tooltest $trytool` + rc=$? + echo "Running $tooltest $trytool" >>$LOGFILE + if test -n "$result"; then + echo "$result" >>$LOGFILE fi - fi - if test -x $path/$1 ; then - RES="`$path/$1 --version /dev/null`" - if test "X$RES" != "X--version" && test "X$RES" != "X" ; then - TOOL=$path/$1 - break + if test "$rc" = "0"; then + echo "PASS: $tooltest $trytool" >>$LOGFILE + elif test "$rc" = "77"; then + echo "MARGINAL: $tooltest $trytool; rc=$rc" >>$LOGFILE + TOOL=$trytool + pass=false + else + set_bad_tool $trytool + echo "FAIL: $tooltest $trytool; rc=$rc" >>$LOGFILE + pass=false fi + done + if $pass; then + echo $trytool + return 0 fi done - if test -z "$TOOL"; then - : + if test -n "$TOOL"; then + echo "Notice: The default version of \`$default_TOOL' is defective." >>$LOGFILE + echo "using \`$TOOL' and hoping for the best." >>$LOGFILE + echo "Notice: The default version of \`$default_TOOL' is defective." >&2 + echo "using \`$TOOL' and hoping for the best." >&2 + echo $TOOL else - echo "Notice: The default version of \`$1' is defective, using" >&2 - echo "\`$TOOL' instead." >&2 + echo $default_TOOL fi - echo "$TOOL" } +id_tool_test () +{ + id=$1 + if $id -u >/dev/null 2>&1 && $id -un >/dev/null 2>&1; then + return 0 + else + echo "Running these tests requires an \`id' program that understands the" + echo "-u and -n flags. Make sure that such an id (GNU, or many but not" + echo "all vendor-supplied versions) is in your path." + return 1 + fi +} + +ID=`find_tool id version_test id_tool_test` +echo "Using ID=$ID" >>$LOGFILE + # You can't run CVS as root; print a nice error message here instead # of somewhere later, after making a mess. -# -# FIXME - find_tool() finds the 'gid' from GNU id-utils if I pull 'id' out of -# my path. for pass in false :; do case "`$ID -u 2>/dev/null`" in "0") @@ -367,18 +496,6 @@ for pass in false :; do exit 1 ;; - "") - if $pass; then :; else - ID=`find_tool id` - fi - if $pass || test -z "$ID" ; then - echo "Running these tests requires an \`id' program that understands the" >&2 - echo "-u and -n flags. Make sure that such an id (GNU, or many but not" >&2 - echo "all vendor-supplied versions) is in your path." >&2 - exit 1 - fi - ;; - *) break ;; @@ -386,63 +503,70 @@ for pass in false :; do done # Cause NextStep 3.3 users to lose in a more graceful fashion. -if $EXPR 'abc +expr_tooltest1 () +{ +expr=$1 +if $expr 'abc def' : 'abc def' >/dev/null; then - : good, it works + # good, it works + return 0 else - EXPR=`find_tool expr` - if test -z "$EXPR" ; then - echo 'Running these tests requires an "expr" program that can handle' >&2 - echo 'multi-line patterns. Make sure that such an expr (GNU, or many but' >&2 - echo 'not all vendor-supplied versions) is in your path.' >&2 - exit 1 - fi + echo 'Running these tests requires an "expr" program that can handle' + echo 'multi-line patterns. Make sure that such an expr (GNU, or many but' + echo 'not all vendor-supplied versions) is in your path.' + return 1 fi +} # Warn SunOS, SysVr3.2, etc., users that they may be partially losing # if we can't find a GNU expr to ease their troubles... -if $EXPR 'a +expr_tooltest2 () +{ +expr=$1 +if $expr 'a b' : 'a c' >/dev/null; then - EXPR=`find_tool expr` - if test -z "$EXPR" ; then - echo 'Warning: you are using a version of expr that does not correctly' - echo 'match multi-line patterns. Some tests may spuriously pass or fail.' - echo 'You may wish to make sure GNU expr is in your path.' - EXPR=expr - fi + echo 'Warning: you are using a version of expr that does not correctly' + echo 'match multi-line patterns. Some tests may spuriously pass or fail.' + echo 'You may wish to make sure GNU expr is in your path.' + return 1 else - : good, it works + return 0 fi +} -# More SunOS lossage... +expr_create_bar () +{ echo 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' >${TESTDIR}/foo cat ${TESTDIR}/foo ${TESTDIR}/foo ${TESTDIR}/foo ${TESTDIR}/foo >${TESTDIR}/bar cat ${TESTDIR}/bar ${TESTDIR}/bar ${TESTDIR}/bar ${TESTDIR}/bar >${TESTDIR}/foo cat ${TESTDIR}/foo ${TESTDIR}/foo ${TESTDIR}/foo ${TESTDIR}/foo >${TESTDIR}/bar -if $EXPR "`cat ${TESTDIR}/bar`" : "`cat ${TESTDIR}/bar`" >/dev/null; then +rm -f ${TESTDIR}/foo +} + +expr_tooltest3 () +{ +expr=$1 +# More SunOS lossage... +test ! -f ${TESTDIR}/bar && expr_create_bar +if $expr "`cat ${TESTDIR}/bar`" : "`cat ${TESTDIR}/bar`" >/dev/null; then : good, it works else - EXPR=`find_tool expr` - if test -z "$EXPR" ; then - echo 'Warning: you are using a version of expr that does not correctly' - echo 'match large patterns. Some tests may spuriously pass or fail.' - echo 'You may wish to make sure GNU expr is in your path.' - EXPR=expr - fi + echo 'Warning: you are using a version of expr that does not correctly' + echo 'match large patterns. Some tests may spuriously pass or fail.' + echo 'You may wish to make sure GNU expr is in your path.' + return 1 fi -if $EXPR "`cat ${TESTDIR}/bar`x" : "`cat ${TESTDIR}/bar`y" >/dev/null; then - EXPR=`find_tool expr` - if test -z "$EXPR" ; then - echo 'Warning: you are using a version of expr that does not correctly' - echo 'match large patterns. Some tests may spuriously pass or fail.' - echo 'You may wish to make sure GNU expr is in your path.' - EXPR=expr - fi -else - : good, it works +if $expr "`cat ${TESTDIR}/bar`x" : "`cat ${TESTDIR}/bar`y" >/dev/null; then + echo 'Warning: you are using a version of expr that does not correctly' + echo 'match large patterns. Some tests may spuriously pass or fail.' + echo 'You may wish to make sure GNU expr is in your path.' + return 1 fi +# good, it works +return 0 +} # That we should have to do this is total bogosity, but GNU expr # version 1.9.4-1.12 uses the emacs definition of "$" instead of the unix @@ -450,10 +574,18 @@ fi # next release of GNU expr after 1.12 (but we still have to cater to the old # ones for some time because they are in many linux distributions). ENDANCHOR="$" -if $EXPR 'abc +expr_set_ENDANCHOR () +{ +expr=$1 +ENDANCHOR="$" +if $expr 'abc def' : 'abc$' >/dev/null; then ENDANCHOR='\'\' + echo "Notice: An ENDANCHOR of dollar does not work." + echo "Using a workaround for GNU expr versions 1.9.4 thru 1.12" fi +return 0 +} # Work around another GNU expr (version 1.10-1.12) bug/incompatibility. # "." doesn't appear to match a newline (it does with SunOS 4.1.3 expr). @@ -464,28 +596,53 @@ fi # next release of GNU expr after 1.12 (but we still have to cater to the old # ones for some time because they are in many linux distributions). DOTSTAR='.*' -if $EXPR 'abc +expr_set_DOTSTAR () +{ +expr=$1 +DOTSTAR='.*' +if $expr 'abc def' : "a${DOTSTAR}f" >/dev/null; then : good, it works else DOTSTAR='\(.\| \)*' + echo "Notice: DOTSTAR changed from sane \`.*' value to \`$DOTSTAR\`" + echo "to workaround GNU expr version 1.10 thru 1.12 bug where \`.'" + echo "does not match a newline." fi +return 0 +} # Now that we have DOTSTAR, make sure it works with big matches -if $EXPR "`cat ${TESTDIR}/bar`" : "${DOTSTAR}xyzABC${DOTSTAR}$" >/dev/null; then - : good, it works +expr_tooltest_DOTSTAR () +{ +expr=$1 +test ! -f ${TESTDIR}/bar && expr_create_bar +if $expr "`cat ${TESTDIR}/bar`" : "${DOTSTAR}xyzABC${DOTSTAR}$" >/dev/null; then + # good, it works + return 0 else - EXPR=`find_tool expr` - if test -z "$EXPR" ; then - echo 'Warning: you are using a version of expr that does not correctly' - echo 'match large patterns. Some tests may spuriously pass or fail.' - echo 'You may wish to make sure GNU expr is in your path.' - EXPR=expr - fi + echo 'Warning: you are using a version of expr that does not correctly' + echo 'match large patterns. Some tests may spuriously pass or fail.' + echo 'You may wish to make sure GNU expr is in your path.' + return 77 fi +} -rm -f ${TESTDIR}/foo ${TESTDIR}/bar +EXPR=`find_tool ${EXPR}:gexpr \ + version_test expr_tooltest1 expr_tooltest2 expr_tooltest3 \ +expr_set_ENDANCHOR expr_set_DOTSTAR expr_tooltest_DOTSTAR` + +# Set the ENDANCHOR and DOTSTAR for the chosen expr version. +expr_set_ENDANCHOR ${EXPR} >/dev/null +expr_tooltest_DOTSTAR ${EXPR} >/dev/null + +echo "Using EXPR=$EXPR" >>$LOGFILE +echo "Using ENDANCHOR=$ENDANCHOR" >>$LOGFILE +echo "Using DOTSTAR=$DOTSTAR" >>$LOGFILE + +# Cleanup +rm -f ${TESTDIR}/bar # Work around yet another GNU expr (version 1.10) bug/incompatibility. # "+" is a special character, yet for unix expr (e.g. SunOS 4.1.3) @@ -519,22 +676,151 @@ else exit 1 fi +# Only 8 characters of $username appear in some output. +if test `echo $username |wc -c` -gt 8; then + username8=`echo $username |sed 's/^\(........\).*/\1/'` +else + username8=$username +fi + +# Rarely, we need to match any username, not just the name of the user +# running this test. +# +# I'm not really sure what characters should be here. a-zA-Z obviously. +# People complained when 0-9 were not allowed in usernames. Other than that +# I'm not sure. +anyusername="[-a-zA-Z0-9][-a-zA-Z0-9]*" + # now make sure that tr works on NULs -if $EXPR `echo "123" | ${TR} '2' '\0'` : "123" >/dev/null 2>&1; then - TR=`find_tool tr` - if test -z "$TR" ; then - echo 'Warning: you are using a version of tr which does not correctly' - echo 'handle NUL bytes. Some tests may spuriously pass or fail.' - echo 'You may wish to make sure GNU tr is in your path.' - TR=tr - fi +tr_tooltest1 () +{ +tr=$1 +if $EXPR `echo "123" | $tr '2' '\0'` : "123" >/dev/null 2>&1; then + echo 'Warning: you are using a version of tr which does not correctly' + echo 'handle NUL bytes. Some tests may spuriously pass or fail.' + echo 'You may wish to make sure GNU tr is in your path.' + return 77 +fi +# good, it works +return 0 +} + +TR=`find_tool ${TR}:gtr version_test tr_tooltest1` +echo "Using TR=$TR" >>$LOGFILE + +# Awk testing + +awk_tooltest1 () +{ +awk=$1 +$awk 'BEGIN {printf("one\ntwo\nthree\nfour\nfive\nsix")}' abc +if $EXPR "`cat abc`" : \ +'one +two +three +four +five +six'; then + rm abc + return 0 else - : good, it works + rm abc + echo "Notice: awk BEGIN clause or printf is not be working properly." + return 1 fi +} + +# Format item %c check +awk_tooltest2 () +{ +awk=$1 +$awk 'BEGIN { printf "%c%c%c", 2, 3, 4 }' abc +if $EXPR "`cat abc`" : "123" ; then + : good, found it +else + echo "Notice: awk format %c string may not be working properly." + rm abc + return 77 +fi +rm abc +return 0 +} + +AWK=`find_tool gawk:nawk:awk version_test awk_tooltest1 awk_tooltest2` +echo "Using AWK=$AWK" >>$LOGFILE + +# Test that $1 works as a remote shell. If so, set $host, $CVS_RSH, & +# $save_CVS_RSH to match and return 0. Otherwise, set $skipreason and return +# 77. +depends_on_rsh () +{ + host=${remotehost-"`hostname`"} + result=`$1 $host 'echo test'` + rc=$? + if test $? != 0 || test "x$result" != "xtest"; then + skipreason="\`$1 $host' failed rc=$rc result=$result" + return 77 + fi + + save_CVS_RSH=$CVS_RSH + CVS_RSH=$1; export CVS_RSH + return 0 +} + +# Find a usable SSH. When a usable ssh is found, set $host, $CVS_RSH, and +# $save_CVS_RSH and return 0. Otherwise, set $skipreason and return 77. +depends_on_ssh () +{ + case "$CVS_RSH" in + *ssh*|*putty*) + tryssh=`Which $CVS_RSH` + if [ ! -n "$tryssh" ]; then + skipreason="Unable to find CVS_RSH=$CVS_RSH executable" + return 77 + elif [ ! -x "$tryssh" ]; then + skipreason="Unable to execute $tryssh program" + return 77 + fi + ;; + *) + # Look in the user's PATH for "ssh" + tryssh=`Which ssh` + if test ! -r "$tryssh"; then + skipreason="Unable to find ssh program" + return 77 + fi + ;; + esac + + depends_on_rsh "$tryssh" + return $? +} pass () { echo "PASS: $1" >>${LOGFILE} + passed=`expr $passed + 1` +} + +skip () +{ + if $skipfail; then + fail "$1${2+ ($2)}" + else + echo "SKIP: $1${2+ ($2)}" >>$LOGFILE + fi + skipped=`expr $skipped + 1` +} + +warn () +{ + if $skipfail; then + fail "$1${2+ ($2)}" + else + echo "WARNING: $1${2+ ($2)}" >>$LOGFILE + fi + warnings=`expr $warnings + 1` } fail () @@ -545,6 +831,28 @@ fail () exit 1 } +verify_tmp_empty () +{ + # Test our temp directory for cvs-serv* directories and cvsXXXXXX temp + # files. We would like to not leave any behind. + if $remote && ls $TMPDIR/cvs-serv* >/dev/null 2>&1; then + # A true value means ls found files/directories with these names. + # Give the server some time to finish, then retry. + sleep 1 + if ls $TMPDIR/cvs-serv* >/dev/null 2>&1; then + warn "$1" "Found cvs-serv* directories in $TMPDIR." + # The above will exit if $skipfail + rm -rf $TMPDIR/cvs-serv* + fi + fi + if ls $TMPDIR/cvs?????? >/dev/null 2>&1; then + # A true value means ls found files/directories with these names. + warn "$1" "Found cvsXXXXXX temp files in $TMPDIR." + # The above will exit if $skipfail + rm -f ls $TMPDIR/cvs?????? + fi +} + # See dotest and dotest_fail for explanation (this is the parts # of the implementation common to the two). dotest_internal () @@ -562,14 +870,17 @@ dotest_internal () # surely use a somewhat non-specific pattern). cat ${TESTDIR}/dotest.tmp >>${LOGFILE} pass "$1" + verify_tmp_empty "$1" # expr can't distinguish between "zero characters matched" and "no match", # so special-case it. elif test -z "$3" && test ! -s ${TESTDIR}/dotest.tmp; then pass "$1" + verify_tmp_empty "$1" elif test x"$4" != x; then if $EXPR "`cat ${TESTDIR}/dotest.tmp`" : "$4${ENDANCHOR}" >/dev/null; then cat ${TESTDIR}/dotest.tmp >>${LOGFILE} pass "$1" + verify_tmp_empty "$1" else echo "** expected: " >>${LOGFILE} echo "$3" >>${LOGFILE} @@ -644,17 +955,20 @@ dotest_internal_debug () fail "$1" else pass "$1" + verify_tmp_empty "$1" fi else echo "$3" > ${TESTDIR}/dotest.exp if dotest_line_by_line "$1" "$2"; then pass "$1" + verify_tmp_empty "$1" else if test x"$4" != x; then mv ${TESTDIR}/dotest.exp ${TESTDIR}/dotest.ex1 echo "$4" > ${TESTDIR}/dotest.exp if dotest_line_by_line "$1" "$2"; then pass "$1" + verify_tmp_empty "$1" else mv ${TESTDIR}/dotest.exp ${TESTDIR}/dotest.ex2 echo "** expected: " >>${LOGFILE} @@ -716,6 +1030,7 @@ dotest_lit () cat >${TESTDIR}/dotest.exp if cmp ${TESTDIR}/dotest.exp ${TESTDIR}/dotest.tmp >/dev/null 2>&1; then pass "$1" + verify_tmp_empty "$1" else echo "** expected: " >>${LOGFILE} cat ${TESTDIR}/dotest.exp >>${LOGFILE} @@ -754,6 +1069,19 @@ dotest_sort () dotest_internal "$@" } +# A function for fetching the timestamp of a revison of a file +getrlogdate () { + ${testcvs} -n rlog -N ${1+"$@"} | + while read token value; do + case "$token" in + date:) + echo $value | sed "s,;.*,," + break; + ;; + esac + done +} + # Avoid picking up any stray .cvsrc, etc., from the user running the tests mkdir home HOME=${TESTDIR}/home; export HOME @@ -773,30 +1101,31 @@ RCSINIT=; export RCSINIT if test x"$*" = x; then # Basic/miscellaneous functionality tests="version basica basicb basicc basic1 deep basic2" - tests="${tests} parseroot files spacefiles commit-readonly" + tests="${tests} parseroot parseroot2 files spacefiles commit-readonly" tests="${tests} commit-add-missing" tests="${tests} status" # Branching, tagging, removing, adding, multiple directories tests="${tests} rdiff rdiff-short" - tests="${tests} rdiff2 diff diffnl death death2" + tests="${tests} rdiff2 diff diffnl death death2 death-rtag" tests="${tests} rm-update-message rmadd rmadd2 rmadd3 resurrection" - tests="${tests} dirs dirs2 branches branches2 tagc tagf" + tests="${tests} dirs dirs2 branches branches2 tagc tagf tag-space" tests="${tests} rcslib multibranch import importb importc import-CVS" + tests="$tests import-quirks" tests="${tests} update-p import-after-initial branch-after-import" - tests="${tests} join join2 join3 join4 join5 join6" + tests="${tests} join join2 join3 join4 join5 join6 join7" tests="${tests} join-readonly-conflict join-admin join-admin-2" tests="${tests} join-rm" - tests="${tests} new newb conflicts conflicts2 conflicts3" + tests="${tests} new newb conflicts conflicts2 conflicts3 conflicts4" tests="${tests} clean" # Checking out various places (modules, checkout -d, &c) tests="${tests} modules modules2 modules3 modules4 modules5 modules6" - tests="${tests} mkmodules co-d" + tests="${tests} modules7 mkmodules co-d" tests="${tests} cvsadm emptydir abspath abspath2 toplevel toplevel2" tests="${tests} rstar-toplevel trailingslashes checkout_repository" # Log messages, error messages. tests="${tests} mflag editor errmsg1 errmsg2 adderrmsg opterrmsg" # Watches, binary files, history browsing, &c. - tests="${tests} devcom devcom2 devcom3 watch4 watch5" + tests="${tests} devcom devcom2 devcom3 watch4 watch5 watch6" tests="${tests} unedit-without-baserev" tests="${tests} ignore ignore-on-branch binfiles binfiles2 binfiles3" tests="${tests} mcopy binwrap binwrap2" @@ -804,7 +1133,9 @@ if test x"$*" = x; then tests="${tests} serverpatch log log2 logopt ann ann-id" # Repository Storage (RCS file format, CVS lock files, creating # a repository without "cvs init", &c). - tests="${tests} crerepos rcs rcs2 rcs3 lockfiles backuprecover" + tests="${tests} crerepos rcs rcs2 rcs3 rcs4 rcs5 rcs6" + tests="$tests lockfiles backuprecover" + tests="${tests} sshstdio" # More history browsing, &c. tests="${tests} history" tests="${tests} big modes modes2 modes3 stamps" @@ -1757,6 +2088,11 @@ for what in $tests; do continue fi fi + + if $verbose; then + echo "$what:" + fi + case $what in version) @@ -1766,8 +2102,11 @@ for what in $tests; do ' Concurrent Versions System (CVS) [0-9.]*.* -Copyright (c) [-0-9]* Brian Berliner, david d .zoo. zuhn, - Jeff Polk, and other authors +Copyright (C) [0-9]* Free Software Foundation, Inc. + +Senior active maintainers include Larry Jones, Derek R. Price, +and Mark D. Baushke. Please see the AUTHORS and README files from the CVS +distribution kit for a complete list of contributors and copyrights. CVS may be copied only under the terms of the GNU General Public License, a copy of which can be found with the CVS distribution kit. @@ -1895,7 +2234,7 @@ ${PLUS} ssfile line 2" =================================================================== RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v retrieving revision 1\.1 -diff -c -C3isacrowd -r1\.1 ssfile +diff -c -C 3isacrowd -r1\.1 ssfile ${PROG} diff: invalid context length argument" dotest basica-7 "${testcvs} -q ci -m modify-it" \ "Checking in sdir/ssdir/ssfile; @@ -1992,8 +2331,8 @@ done" ' Annotations for sdir/ssdir/ssfile \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* -1\.1 .'"${username}"' *[0-9a-zA-Z-]*.: ssfile -1\.2 .'"${username}"' *[0-9a-zA-Z-]*.: ssfile line 2' +1\.1 .'"$username8"' *[0-9a-zA-Z-]*.: ssfile +1\.2 .'"$username8"' *[0-9a-zA-Z-]*.: ssfile line 2' # Test resurrecting with strange revision numbers cd sdir/ssdir @@ -2381,7 +2720,8 @@ ${PROG} update: Updating second-dir" # On Linux 2.2 systems, the cwd may be gone, so we recreate it # to allow basicc-11 to actually happen if test ! -d ../first-dir; then - cd .. + # Apparently `cd ..' doesn't work with Linux 2.2 & Bash 2.05b. + cd $TESTDIR/1 mkdir ./first-dir cd ./first-dir fi @@ -2389,8 +2729,7 @@ ${PROG} update: Updating second-dir" "" "${PROG} release: deletion of directory \./\. failed: .*" dotest basicc-11a "test -d ../second-dir" "" - cd .. - cd .. + cd ../.. mkdir 2; cd 2 dotest basicc-12 "${testcvs} -Q co ." "" @@ -3433,7 +3772,17 @@ Are you sure you want to release (and de "${PROG} rtag: Tagging first-dir ${PROG} rtag: Tagging first-dir/dir1 ${PROG} rtag: Tagging first-dir/dir1/dir2" - + # The next test used to cause an assert failure + # something like: + # cvs: ./recurse.c:667: do_recursion: Assertion `repository != ((void *)0)' failed. + dotest basic2-21b "${testcvs} co -p -r rtagged-by-head first-dir/file6" \ +"=================================================================== +Checking out first-dir/file6 +RCS: $CVSROOT_DIRNAME/first-dir/file6,v +VERS: 1\.2 +\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* +file6 +file6" # tag by tag dotest basic2-22 "${testcvs} rtag -r rtagged-by-head rtagged-by-tag first-dir" \ "${PROG} rtag: Tagging first-dir @@ -3772,6 +4121,8 @@ $PROG logout: Entry not found\." rm -r 1 ;; + + files) # Test of how we specify files on the command line # (recurse.c and that sort of thing). Vaguely similar to @@ -3847,26 +4198,25 @@ ${CVSROOT_DIRNAME}/first-dir/dir/sdir/ss new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1 done" if $remote; then + # FIXCVS: # This is a bug, looks like that toplevel_repos cruft in # client.c is coming back to haunt us. # May want to think about the whole issue, toplevel_repos # has always been crufty and trying to patch it up again # might be a mistake. - dotest_fail files-12 \ + dotest files-12 \ "${testcvs} commit -f -m test ./sdir/ssdir/.file ./.file" \ -"${PROG} commit: Up-to-date check failed for .\.file' -${PROG} \[commit aborted\]: correct above errors first!" +"Checking in \./sdir/ssdir/\.file; +${CVSROOT_DIRNAME}/first-dir/dir/sdir/ssdir/Attic/\.file,v <-- \.file +new revision: 1\.1\.2\.3; previous revision: 1\.1\.2\.2 +done" # Sync up the version numbers so that the rest of the # tests don't need to expect different numbers based # local or remote. dotest files-12-workaround \ -"${testcvs} commit -f -m test sdir/ssdir/.file .file" \ -"Checking in sdir/ssdir/\.file; -${CVSROOT_DIRNAME}/first-dir/dir/sdir/ssdir/Attic/\.file,v <-- \.file -new revision: 1\.1\.2\.3; previous revision: 1\.1\.2\.2 -done -Checking in \.file; +"${testcvs} commit -f -m test .file" \ +"Checking in \.file; ${CVSROOT_DIRNAME}/first-dir/dir/Attic/\.file,v <-- \.file new revision: 1\.1\.2\.3; previous revision: 1\.1\.2\.2 done" @@ -4053,7 +4403,7 @@ C tfile" # Now note our status dotest status-1 "${testcvs} status tfile" \ "=================================================================== -File: tfile Status: File had conflicts on merge +File: tfile Status: Unresolved Conflict Working revision: 1\.2.* Repository revision: 1\.2 ${CVSROOT_DIRNAME}/first-dir/tfile,v @@ -4086,6 +4436,21 @@ File: tfile Status: Locally Sticky Date: (none) Sticky Options: (none)" + # Check that there are no problems just using CVS/Root too. + save_CVSROOT=$CVSROOT + unset CVSROOT + dotest status-3a "${testcvs} status tfile" \ +"=================================================================== +File: tfile Status: Locally Modified + + Working revision: 1\.2.* + Repository revision: 1\.2 ${CVSROOT_DIRNAME}/first-dir/tfile,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none)" + CVSROOT=$save_CVSROOT + export CVSROOT + # FIXCVS: # Update is supposed to re-Register() the file when it # finds resolved conflicts: @@ -4477,7 +4842,7 @@ done" =================================================================== RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v retrieving revision 1\.2 -diff --ifdef=HAVE_WINSOCK_H -r1\.2 abc +diff --ifdef HAVE_WINSOCK_H -r1\.2 abc #ifndef HAVE_WINSOCK_H extern int gethostname (); #else /\* HAVE_WINSOCK_H \*/ @@ -5248,7 +5613,7 @@ ${PROG} update: file4 is no longer in th dotest death2-16 "${testcvs} -q commit -m add" \ "Checking in file2; ${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2 -new revision: 1\.1\.2\.1; previous revision: 1\.1 +new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1 done" # Add a new file on the branch. @@ -5398,6 +5763,103 @@ C file4" cd .. ; rm -rf first-dir ${CVSROOT_DIRNAME}/first-dir ;; + + + death-rtag) + # This documents a bug in CVS that prevents rtag from tagging files + # in the Attic. + mkdir $CVSROOT_DIRNAME/death-rtag + dotest death-rtag-init-1 "$testcvs -Q co death-rtag" + cd death-rtag + echo "This is the file foo" > foo + echo "This is the file bar" > bar + dotest death-rtag-init-2 "$testcvs -Q add foo bar" + dotest death-rtag-init-3 "$testcvs -Q ci -m 'Add foo and bar.'" \ +"RCS file: $CVSROOT_DIRNAME/death-rtag/bar,v +done +Checking in bar; +$CVSROOT_DIRNAME/death-rtag/bar,v <-- bar +initial revision: 1\.[0-9]* +done +RCS file: $CVSROOT_DIRNAME/death-rtag/foo,v +done +Checking in foo; +$CVSROOT_DIRNAME/death-rtag/foo,v <-- foo +initial revision: 1\.[0-9]* +done" + dotest death-rtag-init-5 "$testcvs -Q tag -b mybranch" + + dotest death-rtag-1 "$testcvs -q rtag -rmybranch willtag death-rtag" + dotest death-rtag-2 "$testcvs -Q rm -f foo" + dotest death-rtag-3 "$testcvs -Q ci -m 'Remove foo.'" \ +"Removing foo; +$CVSROOT_DIRNAME/death-rtag/foo,v <-- foo +new revision: delete; previous revision: 1\.[0-9]* +done" + # commit something on the branch so that the moving tag is visible. + dotest death-rtag-3.2 "$testcvs -Q up -rmybranch" + echo some branch content >>foo + echo some branch content >>bar + dotest death-rtag-3.3 "$testcvs -Q ci -m 'Change foo.'" \ +"Checking in bar; +$CVSROOT_DIRNAME/death-rtag/bar,v <-- bar +new revision: 1\.1\.2\.1; previous revision: 1\.1 +done +Checking in foo; +$CVSROOT_DIRNAME/death-rtag/Attic/foo,v <-- foo +new revision: 1\.1\.2\.1; previous revision: 1\.1 +done" + dotest death-rtag-3.4 \ +"$testcvs -q rtag -rmybranch wontmove death-rtag" + dotest death-rtag-3.5 "$testcvs -q rtag -F wontmove death-rtag" + + cd .. + # Removing -f below avoids this bug. + dotest death-rtag-4 "$testcvs -q rtag -frmybranch wonttag death-rtag" + + # When the bug existed, `wonttag' would not have been present in + # foo,v. + # + # A second bug prevented `wontmove' from moving from the branch to + # the dead revision on the trunk (death-rtag-3.4 & death-rtag-3.5). + dotest death-rtag-5 "$testcvs -q rlog death-rtag" \ +" +RCS file: $CVSROOT_DIRNAME/death-rtag/bar,v +head: 1.[0-9]* +branch: +locks: strict +access list: +symbolic names: + wonttag: 1\.1\.2\.1 + wontmove: 1\.1 + willtag: 1\.1 + mybranch: 1\.1.0\.2 +keyword substitution: kv +$DOTSTAR +RCS file: $CVSROOT_DIRNAME/death-rtag/Attic/foo,v +head: 1.[0-9]* +branch: +locks: strict +access list: +symbolic names: + wonttag: 1\.1\.2\.1 + wontmove: 1\.2 + willtag: 1\.1 + mybranch: 1\.1.0\.2 +keyword substitution: kv +$DOTSTAR" + + if $keep; then + echo Keeping $TESTDIR and exiting due to --keep + exit 0 + fi + + rm -r death-rtag + rm -rf $CVSROOT_DIRNAME/death-rtag + ;; + + + rm-update-message) # FIXME # local CVS prints a warning message when update notices a missing @@ -5860,8 +6322,8 @@ done" dotest resurrection-init5 "$testcvs -Q rm -f file1" - # The first test is that `cvs add' will resurrect a file before it - # has been committed. + # The first test is that `cvs add' will resurrect a file before its + # removal has been committed. dotest_sort resurrection-1 "$testcvs add file1" \ "U file1 $PROG add: file1, version 1\.1, resurrected" @@ -5909,6 +6371,24 @@ $PROG add: use 'cvs commit' to add this $CVSROOT_DIRNAME/first-dir/file1,v <-- file1 new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1 done" + + # The next few tests verify that an attempted resurrection of a file + # with no previous revision on the trunk fails. + touch file2 + dotest resurrection-9 "$testcvs -Q add file2" + dotest resurrection-10 "$testcvs -Q ci -mnew-file2" \ +"RCS file: $CVSROOT_DIRNAME/first-dir/Attic/file2,v +done +Checking in file2; +$CVSROOT_DIRNAME/first-dir/Attic/file2,v <-- file2 +new revision: 1\.1\.2\.1; previous revision: 1\.1 +done" + dotest resurrection-11 "$testcvs -Q up -A" + + # This command once caused an assertion failure. + dotest resurrection-12 "$testcvs add file2" \ +"$PROG add: File \`file2' has no previous revision to resurrect\." + if $keep; then echo Keeping $TESTDIR and exiting due to --keep exit 0 @@ -7009,6 +7489,160 @@ ${PROG} rtag: first-dir/file1: Not movin rm -rf ${CVSROOT_DIRNAME}/first-dir ;; + tag-space) + # Test tags with spaces in the names. + # + # Prior to releases 1.11.18 & 1.12.10, some commands used with + # tags with spaces in the names could hang CVS. + + # Setup; check in first-dir/file1 + mkdir 1; cd 1 + dotest tag-space-init-1 "$testcvs -q co -l ." + mkdir first-dir + dotest tag-space-init-2 "$testcvs add first-dir" \ +"Directory $CVSROOT_DIRNAME/first-dir added to the repository" + cd first-dir + touch file1 + dotest tag-space-init-3 "$testcvs add file1" \ +"$PROG add: scheduling file \`file1' for addition +$PROG add: use '$PROG commit' to add this file permanently" + dotest tag-space-init-4 "$testcvs -Q ci -m add" \ +"RCS file: $CVSROOT_DIRNAME/first-dir/file1,v +done +Checking in file1; +$CVSROOT_DIRNAME/first-dir/file1,v <-- file1 +initial revision: 1\.1 +done" + + # Reportedly, the following two tags make it past WinCVS. + dotest_fail tag-space-1 "$testcvs tag ' spacetag '" \ +"$PROG \[tag aborted\]: tag \` spacetag ' must start with a letter" + dotest_fail tag-space-2 "$testcvs tag 'spacetag '" \ +"$PROG \[tag aborted\]: tag \`spacetag ' has non-visible graphic characters" + + if $remote; then + # Verify that this isn't a client check. + dotest tag-space-3 "$testcvs server" \ +"E $PROG \[tag aborted\]: tag \` spacetag ' must start with a letter +error " <>fileX + + # Writes actually cause symlinks to be resolved. + dotest rcslib-long-symlink-3 "$testcvs -q ci -mwrite-it" \ +"Checking in fileX; +$CVSROOT_DIRNAME/123456789012345678901234567890/123456789012345678901234567890/123456789012345678901234567890/123456789012345678901234567890/123456789012345678901234567890/123456789012345678901234567890/123456789012345678901234567890/123456789012345678901234567890/123456789012345678901234567890/123456789012345678901234567890/file1,v <-- fileX +new revision: 1\.5; previous revision: 1\.4 +done" if $keep; then echo Keeping ${TESTDIR} and exiting due to --keep exit 0 fi + cd .. # Must remove the symlink first. Samba doesn't appear to show # broken symlink across the SMB share, and rm -rf by itself # will remove file1,v first and leave file2,v a broken link and the @@ -7353,10 +8031,12 @@ ${PROG} rtag: could not read RCS file fo # rcslib-symlink-3j works fine, but the next one doesn't unless run # remotely under Cygwin and using a TESTDIR on a Samba share. if test -n "$remotehost"; then - $CVS_RSH $remotehost "rm -f ${CVSROOT_DIRNAME}/first-dir/file2,v" + $CVS_RSH $remotehost \ +"rm -f $CVSROOT_DIRNAME/first-dir/file2,v $CVSROOT_DIRNAME/second-dir/fileX,v" fi - rm -rf ${CVSROOT_DIRNAME}/first-dir - rm -r first-dir 2 + rm -rf $CVSROOT_DIRNAME/first-dir $CVSROOT_DIRNAME/second-dir \ + $CVSROOT_DIRNAME/123456789012345678901234567890 + rm -r first-dir second-dir 2 ;; multibranch) @@ -7457,6 +8137,7 @@ modify-on-br1 # head -- intended to test vendor branches and HEAD, # although it doesn't really do it yet. # import-CVS -- refuse to import directories named "CVS". + # import-quirks -- short tests of import quirks. # import mkdir import-dir ; cd import-dir @@ -7717,7 +8398,8 @@ Use the following command to help the me echo 'my own stuff' >mine2.c dotest_fail importb-3 \ "${testcvs} import -m add -b 1 second-dir dummy really_dumb_y" \ -"${PROG} \[[a-z]* aborted\]: Only branches with two dots are supported: 1" +"$PROG \[import aborted\]: Only numeric branch specifications with two dots are +supported by import, not \`1'\. For example: \`1\.1\.1'\." : when we implement main-branch import, should be \ "N second-dir/mine1\.c N second-dir/mine2\.c @@ -7935,6 +8617,72 @@ $PROG import: Importing $CVSROOT_DIRNAME rm -rf $CVSROOT_DIRNAME/import-CVS ;; + + + import-quirks) + # Short tests of quirky import behavior. + # + # For a list of other import tests with short descriptions, see the + # comment header of the "import" test. + mkdir import-quirks + cd import-quirks + touch file1 file2 file3 + + # CVS prior to 1.11.18 and 1.12.10 used to happily import to + # "branch 1.1", creating RCS archives with revisions like, + # "1.1..1". That double-dot is *not* a typo. + dotest_fail import-quirks-1 \ +"$testcvs import -b1.1. -mbad-bad-bad import-quirks VB RT" \ +"$PROG \[import aborted\]: Only numeric branch specifications with two dots are +supported by import, not \`1\.1\.'\. For example: \`1\.1\.1'\." + + dotest_fail import-quirks-2 \ +"$testcvs import -b1.1.1.. -mbad-bad-bad import-quirks VB RT" \ +"$PROG \[import aborted\]: Only numeric branch specifications with two dots are +supported by import, not \`1\.1\.1\.\.'\. For example: \`1\.1\.1'\." + + # Try a few odd numbers. This is hardly comprehensive. + dotest_sort import-quirks-2 \ +"$testcvs import -b10.10.101 -mthis-ones-ok import-quirks-2 VB RT" \ +" + +N import-quirks-2/file1 +N import-quirks-2/file2 +N import-quirks-2/file3 +No conflicts created by this import" + + dotest_sort import-quirks-3 \ +"$testcvs import -b2345678901.2345678901.2345678901 -mthis-ones-ok import-quirks-3 VB RT" \ +" + +N import-quirks-3/file1 +N import-quirks-3/file2 +N import-quirks-3/file3 +No conflicts created by this import" + + dotest_sort import-quirks-4 \ +"$testcvs import -b1.1.2 -mthis-ones-ok import-quirks-4 VB RT" \ +" + +N import-quirks-4/file1 +N import-quirks-4/file2 +N import-quirks-4/file3 +No conflicts created by this import" + + if $keep; then + echo Keeping $TESTDIR and exiting due to --keep + exit 0 + fi + + cd .. + rm -r import-quirks + rm -rf $CVSROOT_DIRNAME/import-quirks-2 \ + $CVSROOT_DIRNAME/import-quirks-3 \ + $CVSROOT_DIRNAME/import-quirks-4 + ;; + + + import-after-initial) # Properly handle the case in which the first version of a # file is created by a regular cvs add and commit, and there @@ -8041,7 +8789,7 @@ ${PROG} add: use .${PROG} commit. to add "${testcvs} commit -m cvs-add file2" \ "Checking in file2; ${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2 -new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1 +new revision: 1\.1\.1\.1\.2\.2; previous revision: 1\.1\.1\.1\.2\.1 done" if $keep; then @@ -8337,7 +9085,7 @@ new revision: 1\.1\.2\.1; previous revis done Checking in file2; ${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2 -new revision: 1\.1\.2\.1; previous revision: 1\.1 +new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1 done Removing file3; ${CVSROOT_DIRNAME}/first-dir/file3,v <-- file3 @@ -8424,8 +9172,8 @@ M file4' U first-dir/file2 RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v retrieving revision 1\.1 -retrieving revision 1\.1\.2\.1 -Merging differences between 1\.1 and 1\.1\.2\.1 into file2 +retrieving revision 1\.1\.2\.2 +Merging differences between 1\.1 and 1\.1\.2\.2 into file2 U first-dir/file3 ${PROG} checkout: scheduling first-dir/file3 for removal U first-dir/file4 @@ -8459,8 +9207,8 @@ U first-dir/file7' "U file1 RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v retrieving revision 1\.1 -retrieving revision 1\.1\.2\.1 -Merging differences between 1\.1 and 1\.1\.2\.1 into file2 +retrieving revision 1\.1\.2\.2 +Merging differences between 1\.1 and 1\.1\.2\.2 into file2 ${PROG} update: scheduling file3 for removal M file4 ${PROG} update: file file4 is locally modified, but has been removed in revision branch @@ -8498,8 +9246,8 @@ T file7" "U file1 RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v retrieving revision 1.1 -retrieving revision 1.1.2.1 -Merging differences between 1.1 and 1.1.2.1 into file2 +retrieving revision 1.1.2.2 +Merging differences between 1.1 and 1.1.2.2 into file2 ${PROG} update: scheduling file3 for removal ${PROG} update: file file4 has been modified, but has been removed in revision branch U file8 @@ -8532,8 +9280,8 @@ U file1 U file2 RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v retrieving revision 1\.1 -retrieving revision 1\.1\.2\.1 -Merging differences between 1\.1 and 1\.1\.2\.1 into file2 +retrieving revision 1\.1\.2\.2 +Merging differences between 1\.1 and 1\.1\.2\.2 into file2 U file3 ${PROG} update: scheduling file3 for removal U file4 @@ -9335,6 +10083,66 @@ U temp2\.txt rm -rf ${CVSROOT_DIRNAME}/join6 ;; + join7) + # This test deals with joins that happen with the -n switch + mkdir join7; cd join7 + mkdir impdir; cd impdir + echo aaa >temp.txt + echo bbb >>temp.txt + echo ccc >>temp.txt + dotest join7-1 \ +"${testcvs} -Q import -minitial join7 vendor vers-1" \ +"" + cd .. + dotest join7-2 "${testcvs} -Q co join7" "" + cd join7 + echo ddd >> temp.txt + dotest join7-3 "${testcvs} -Q ci -madded-line temp.txt" \ +"Checking in temp.txt; +$CVSROOT_DIRNAME/join7/temp.txt,v <-- temp.txt +new revision: 1\.2; previous revision: 1\.1 +done" + cd ../impdir + echo aaaa >temp.txt + echo bbbb >>temp.txt + echo ccc >>temp.txt + echo eee >>temp.txt + dotest join7-4 \ +"${testcvs} -Q import -minitial join7 vendor vers-2" \ +"" + cd ../join7 + dotest join7-5 \ +"${testcvs} -n update -jvers-1 -jvers-2 temp.txt" \ +"RCS file: $CVSROOT_DIRNAME/join7/temp.txt,v +retrieving revision 1\.1\.1\.1 +retrieving revision 1\.1\.1\.2 +Merging differences between 1\.1\.1\.1 and 1\.1\.1\.2 into temp.txt +rcsmerge: warning: conflicts during merge" + touch temp.txt + dotest join7-6 "${testcvs} -n update -jvers-1 -jvers-2 temp.txt" \ +"RCS file: $CVSROOT_DIRNAME/join7/temp.txt,v +retrieving revision 1\.1\.1\.1 +retrieving revision 1\.1\.1\.2 +Merging differences between 1\.1\.1\.1 and 1\.1\.1\.2 into temp.txt +rcsmerge: warning: conflicts during merge" \ +"RCS file: $CVSROOT_DIRNAME/join7/temp.txt,v +retrieving revision 1\.1\.1\.1 +retrieving revision 1\.1\.1\.2 +Merging differences between 1\.1\.1\.1 and 1\.1\.1\.2 into temp.txt +rcsmerge: warning: conflicts during merge" + + if $keep; then + echo Keeping ${TESTDIR} and exiting due to --keep + exit 0 + fi + + cd ../.. + rm -r join7 + rm -rf $CVSROOT_DIRNAME/join7 + ;; + + + join-readonly-conflict) # Previously, only tests 1 & 11 were being tested. I added the # intermediate dotest's to try and diagnose a different failure @@ -9397,7 +10205,7 @@ C $file" # (and read-only) .# file for writing. echo conflict > $file - # verify that the backup file is writable + # verify that the backup file is not writable if test -w ".#$file.1.1"; then fail "join-readonly-conflict-10 : .#$file.1.1 is writable" else @@ -9985,7 +10793,7 @@ C a" dotest conflicts-status-1 "${testcvs} status a" \ "=================================================================== -File: a Status: File had conflicts on merge +File: a Status: Unresolved Conflict Working revision: 1\.2.* Repository revision: 1\.2 ${CVSROOT_DIRNAME}/first-dir/a,v @@ -10481,45 +11289,168 @@ ${PROG} update: ignoring first-dir/sdir dotest conflicts3-20a "${testcvs} -q co -l first-dir" '' cd first-dir - dotest conflicts3-21 "${testcvs} -q update -d sdir" "U sdir/sfile" - rm -r sdir/CVS - dotest conflicts3-22 "${testcvs} -q update" "${QUESTION} sdir" - if $remote; then - dotest_fail conflicts3-23 "${testcvs} -q update -PdA" \ -"${QUESTION} sdir -${PROG} update: move away sdir/sfile; it is in the way -C sdir/sfile" - else - dotest conflicts3-23 "${testcvs} -q update -PdA" \ -"${QUESTION} sdir" + dotest conflicts3-21 "${testcvs} -q update -d sdir" "U sdir/sfile" + rm -r sdir/CVS + dotest conflicts3-22 "${testcvs} -q update" "${QUESTION} sdir" + if $remote; then + dotest_fail conflicts3-23 "${testcvs} -q update -PdA" \ +"${QUESTION} sdir +${PROG} update: move away sdir/sfile; it is in the way +C sdir/sfile" + else + dotest conflicts3-23 "${testcvs} -q update -PdA" \ +"${QUESTION} sdir" + fi + + # Not that it should really affect much, but let's do the case + # where sfile has been removed. For example, suppose that sdir + # had been a CVS-controlled directory which was then removed + # by removing each file (and using update -P or some such). Then + # suppose that the build process creates an sdir directory which + # is not supposed to be under CVS. + rm -r sdir + dotest conflicts3-24 "${testcvs} -q update -d sdir" "U sdir/sfile" + rm sdir/sfile + dotest conflicts3-25 "${testcvs} rm sdir/sfile" \ +"${PROG} remove: scheduling .sdir/sfile. for removal +${PROG} remove: use .${PROG} commit. to remove this file permanently" + dotest conflicts3-26 "${testcvs} ci -m remove sdir/sfile" \ +"Removing sdir/sfile; +${CVSROOT_DIRNAME}/first-dir/sdir/sfile,v <-- sfile +new revision: delete; previous revision: 1\.1 +done" + rm -r sdir/CVS + dotest conflicts3-27 "${testcvs} -q update" "${QUESTION} sdir" + dotest conflicts3-28 "${testcvs} -q update -PdA" \ +"${QUESTION} sdir" + + cd ../.. + + rm -r 1 2 + rm -rf ${CVSROOT_DIRNAME}/first-dir + ;; + + conflicts4) + mkdir conflicts4; cd conflicts4 + mkdir 1; cd 1 + dotest conflicts4-1 "$testcvs -q co -l ." + mkdir first-dir + dotest conflicts4-2 "${testcvs} add first-dir" \ +"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" + cd .. + mkdir 2; cd 2 + dotest conflicts4-3 "${testcvs} -q co -l first-dir" '' + cd ../1/first-dir + echo baseline >file1 + dotest conflicts4-4 "${testcvs} -q add file1" \ +"$PROG add: use .$PROG commit. to add this file permanently" + dotest conflicts4-5 "${testcvs} -q ci -m add-it" \ +"RCS file: $CVSROOT_DIRNAME/first-dir/file1,v +done +Checking in file1; +$CVSROOT_DIRNAME/first-dir/file1,v <-- file1 +initial revision: 1\.1 +done" + cd ../../2/first-dir + dotest conflicts4-6 "${testcvs} -q update" "U file1" + # Make a local change + echo wibble2 >> file1 + dotest conflicts4-7 "${testcvs} -q ci -m update2" \ +"Checking in file1; +$CVSROOT_DIRNAME/first-dir/file1,v <-- file1 +new revision: 1\.2; previous revision: 1\.1 +done" + cd ../../1/first-dir + echo wibble1 >>file1 + dotest conflicts4-8 "${testcvs} -Q update" \ +"RCS file: $CVSROOT_DIRNAME/first-dir/file1,v +retrieving revision 1\.1 +retrieving revision 1\.2 +Merging differences between 1\.1 and 1\.2 into file1 +rcsmerge: warning: conflicts during merge +cvs update: conflicts found in file1" + dotest_fail conflicts4-9 "${testcvs} -q update" \ +"C file1" + + if $remote; then + cat >$TESTDIR/conflicts4/serveme <$TESTDIR/conflicts4/client.out +EOF + # Cygwin. Pthffffffffft! + if test -n "$remotehost"; then + $CVS_RSH $remotehost "chmod +x $TESTDIR/conflicts4/serveme" + else + chmod +x $TESTDIR/conflicts4/serveme + fi + save_CVS_SERVER=$CVS_SERVER + CVS_SERVER=$TESTDIR/conflicts4/serveme; export CVS_SERVER + dotest_fail conflicts4-10r "$testcvs -q up" "C file1" + dotest conflicts4-11r "cat $TESTDIR/conflicts4/client.out" \ +"$DOTSTAR +Argument -- +Directory . +$CVSROOT_DIRNAME/first-dir +Entry /file1/1.2/+=// +Modified file1 +u=rw,g=rw,o=r +59 +baseline +""<<<<<<< file1 +wibble1 +""======= +wibble2 +"">>>>>>> 1.2 +update" + + cat >$TESTDIR/conflicts4/serveme <$TESTDIR/conflicts4/client.out +EOF + + dotest_fail conflicts4-12r "$testcvs -q up" "C file1" + dotest conflicts4-13r "cat $TESTDIR/conflicts4/client.out" \ +"$DOTSTAR +Argument -- +Directory . +$CVSROOT_DIRNAME/first-dir +Entry /file1/1.2/+=// +Unchanged file1 +update" + + CVS_SERVER=$save_CVS_SERVER; export CVS_SERVER fi - # Not that it should really affect much, but let's do the case - # where sfile has been removed. For example, suppose that sdir - # had been a CVS-controlled directory which was then removed - # by removing each file (and using update -P or some such). Then - # suppose that the build process creates an sdir directory which - # is not supposed to be under CVS. - rm -r sdir - dotest conflicts3-24 "${testcvs} -q update -d sdir" "U sdir/sfile" - rm sdir/sfile - dotest conflicts3-25 "${testcvs} rm sdir/sfile" \ -"${PROG} remove: scheduling .sdir/sfile. for removal -${PROG} remove: use .${PROG} commit. to remove this file permanently" - dotest conflicts3-26 "${testcvs} ci -m remove sdir/sfile" \ -"Removing sdir/sfile; -${CVSROOT_DIRNAME}/first-dir/sdir/sfile,v <-- sfile -new revision: delete; previous revision: 1\.1 -done" - rm -r sdir/CVS - dotest conflicts3-27 "${testcvs} -q update" "${QUESTION} sdir" - dotest conflicts3-28 "${testcvs} -q update -PdA" \ -"${QUESTION} sdir" - - cd ../.. + if $keep; then + echo Keeping $TESTDIR and exiting due to --keep + exit 0 + fi - rm -r 1 2 - rm -rf ${CVSROOT_DIRNAME}/first-dir + cd ../../.. + rm -rf conflicts4 + rm -rf $CVSROOT_DIRNAME/first-dir ;; clean) @@ -11430,9 +12361,10 @@ done" "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" cd first-dir - mkdir subdir - dotest modules4-3 "${testcvs} add subdir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir/subdir added to the repository" + mkdir subdir subdir_long + dotest modules4-3 "${testcvs} add subdir subdir_long" \ +"Directory ${CVSROOT_DIRNAME}/first-dir/subdir added to the repository +Directory ${CVSROOT_DIRNAME}/first-dir/subdir_long added to the repository" echo file1 > file1 dotest modules4-4 "${testcvs} add file1" \ @@ -11444,7 +12376,12 @@ done" "${PROG}"' add: scheduling file `subdir/file2'\'' for addition '"${PROG}"' add: use .'"${PROG}"' commit. to add this file permanently' - dotest modules4-6 "${testcvs} -q ci -m add-it" \ + echo file3 > subdir_long/file3 + dotest modules4-6 "${testcvs} add subdir_long/file3" \ +"${PROG}"' add: scheduling file `subdir_long/file3'\'' for addition +'"${PROG}"' add: use .'"${PROG}"' commit. to add this file permanently' + + dotest modules4-7 "${testcvs} -q ci -m add-it" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v done Checking in file1; @@ -11456,19 +12393,26 @@ done Checking in subdir/file2; ${CVSROOT_DIRNAME}/first-dir/subdir/file2,v <-- file2 initial revision: 1\.1 +done +RCS file: ${CVSROOT_DIRNAME}/first-dir/subdir_long/file3,v +done +Checking in subdir_long/file3; +${CVSROOT_DIRNAME}/first-dir/subdir_long/file3,v <-- file3 +initial revision: 1\.1 done" cd .. - dotest modules4-7 "${testcvs} -q update -d CVSROOT" \ + dotest modules4-8 "${testcvs} -q update -d CVSROOT" \ "U CVSROOT${DOTSTAR}" cd CVSROOT cat >modules < file1 + dotest modules7-2 "$testcvs -Q add file1" + dotest modules7-3 "$testcvs -Q ci -mnew file1" \ +"RCS file: $CVSROOT_DIRNAME/one/file1,v +done +Checking in file1; +$CVSROOT_DIRNAME/one/file1,v <-- file1 +initial revision: 1\.1 +done" + dotest modules7-4 "$testcvs -Q tag mytag file1" + cd ../CVSROOT + echo 'all -a zero one' > modules + dotest modules7-5 "$testcvs -Q ci -mall-module" \ +"Checking in modules; +$CVSROOT_DIRNAME/CVSROOT/modules,v <-- modules +new revision: [0-9.]*; previous revision: [0-9.]* +done +$PROG commit: Rebuilding administrative file database" + cd ../.. + mkdir myexport + cd myexport + # FIXCVS: The export should NOT be aborted here + dotest_fail modules7-6 "$testcvs export -rmytag all" \ +"$PROG \[export aborted\]: no such tag mytag" + cd .. + rm -fr myexport + mkdir myexport + cd myexport + # FIXCVS: Workaround is to have mytag listed in val-tags + echo 'mytag y' > $CVSROOT_DIRNAME/CVSROOT/val-tags + dotest modules7-7 "$testcvs export -rmytag all" \ +"$PROG export: Updating zero +$PROG export: Updating one +U one/file1" + dotest modules7-8 'cat one/file1' 'file1 contents' + + if $keep; then + echo Keeping $TESTDIR and exiting due to --keep + exit 0 + fi + + # cleanup + cd ../top/CVSROOT + echo "# empty modules file" >modules + dotest modules7-cleanup-1 "$testcvs -Q ci -mempty-modules" \ +"Checking in modules; +$CVSROOT_DIRNAME/CVSROOT/modules,v <-- modules +new revision: [0-9.]*; previous revision: [0-9.]* +done +$PROG commit: Rebuilding administrative file database" + cd ../../.. + rm -fr modules7 + rm -rf $CVSROOT_DIRNAME/zero $CVSROOT_DIRNAME/one + ;; + + mkmodules) # When a file listed in checkoutlist doesn't exist, cvs-1.10.4 # would fail to remove the CVSROOT/.#[0-9]* temporary file it @@ -13651,7 +14696,11 @@ ${PROG} \[checkout aborted\]: than the 0 # cvs checkout: warning: cannot make directory CVS in /: Permission denied # cvs [checkout aborted]: cannot make directory /foo: Permission denied # $ - dotest_fail abspath2-1 "${testcvs} co /foo" \ + # + # The -z9 in this test also checks for an old server bug where the + # server would block indefinitely attempting to read an EOF from the + # client in the compression buffer shutdown routine. + dotest_fail abspath2-1 "$testcvs -z9 co /foo" \ "$PROG \[checkout aborted\]: Absolute module reference invalid: \`/foo'" \ "$PROG \[server aborted\]: Absolute module reference invalid: \`/foo' $PROG \[checkout aborted\]: end of file from server (consult above messages if any)" @@ -13772,7 +14821,6 @@ U top-dir/file1" "${PROG} checkout: warning: cannot make directory CVS in \.: Permission denied ${PROG} checkout: Updating top-dir" \ "${PROG} checkout: warning: cannot make directory CVS in \.: Permission denied -${PROG} checkout: warning: cannot make directory CVS in \.: Permission denied ${PROG} checkout: in directory \.: ${PROG} checkout: cannot open CVS/Entries for reading: No such file or directory ${PROG} checkout: Updating top-dir" @@ -13893,14 +14941,14 @@ ${PROG} commit: Rebuilding administrativ rstar-toplevel) - # FIXCVS: - # This test confirms a bug that exists in the r* commands currently - # when run against the top-level project. + # This test used to confirm a bug that existed in the r* commands + # run against the top-level project prior to CVS 1.11.18 & 1.12.10. # - # The assertion failure is something like: + # The assertion failure was something like: # do_recursion: Assertion \`strstr (repository, \"/\./\") == ((void \*)0)' failed\..*" - dotest_fail rstar-toplevel-1 "$testcvs rlog ." \ -"${DOTSTAR}ssertion.*failed${DOTSTAR}" "${DOTSTAR}failed assertion${DOTSTAR}" + dotest rstar-toplevel-1 "$testcvs -q rlog ." \ +" +RCS file: $CVSROOT_DIRNAME/CVSROOT$DOTSTAR" if $keep; then echo Keeping ${TESTDIR} and exiting due to --keep @@ -14798,7 +15846,7 @@ U first-dir/abc' # Now do it again, after removing the val-tags file created # by devcom-t1 to force CVS to search the repository # containing CVS directories. - rm ${CVSROOT_DIRNAME}/CVSROOT/val-tags + rm -f ${CVSROOT_DIRNAME}/CVSROOT/val-tags mkdir 3 cd 3 dotest devcom-t3 "${testcvs} -q co -rtag first-dir" \ @@ -15183,6 +16231,94 @@ done" rm -rf ${CVSROOT_DIRNAME}/first-dir ;; + + + watch6) + # Check that `cvs watch on' does not reset the fileattr file. + mkdir watch6; cd watch6 + + dotest watch6-setup-1 "$testcvs -Q co -ldtop ." + cd top + mkdir watch6 + dotest watch6-setup-2 "$testcvs -Q add watch6" + + cd .. + dotest watch6-setup-3 "$testcvs -Q co watch6" + cd watch6 + + mkdir subdir + dotest watch6-setup-4 "$testcvs -Q add subdir" + cd subdir + + # START watch add/remove sequence + dotest watch6-1 "$testcvs -Q watch add" + dotest watch6-2 \ +"grep '_watchers' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null" + + dotest watch6-3 "$testcvs watch on" + dotest watch6-4 \ +"grep '_watchers' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null" + dotest watch6-5 \ +"grep '_watched' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null" + + dotest watch6-6 "$testcvs watch off" + dotest watch6-7 \ +"grep '_watchers' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null" + dotest_fail watch6-8 \ +"grep '_watched' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null" + + dotest watch6-9 "$testcvs watch remove" + dotest_fail watch6-10 \ +"test -d $CVSROOT_DIRNAME/test-directory/subdir/CVS" + dotest_fail watch6-11 \ +"test -f $CVSROOT_DIRNAME/test-directory/subdir/CVS/fileattr" + # END watch add/remove sequence + + echo Hi there >afile + dotest watch6-12 "$testcvs -Q add afile" + dotest watch6-13 "$testcvs ci -m 'A file' afile" \ +"RCS file: $CVSROOT_DIRNAME/watch6/subdir/afile,v +done +Checking in afile; +$CVSROOT_DIRNAME/watch6/subdir/afile,v <-- afile +initial revision: 1\.1 +done" + + # START watch add/remove sequence + dotest watch6-14 "$testcvs -Q watch add" + dotest watch6-15 \ +"grep '_watchers' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null" + + dotest watch6-16 "$testcvs watch on" + dotest watch6-17 \ +"grep '_watchers' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null" + dotest watch6-18 \ +"grep '_watched' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null" + + dotest watch6-19 "$testcvs watch off" + dotest watch6-20 \ +"grep '_watchers' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null" + dotest_fail watch6-21 \ +"grep '_watched' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null" + + dotest watch6-22 "$testcvs watch remove" + dotest_fail watch6-23 \ +"test -d $CVSROOT_DIRNAME/test-directory/subdir/CVS" + dotest_fail watch6-24 \ +"test -f $CVSROOT_DIRNAME/test-directory/subdir/CVS/fileattr" + # END watch add/remove sequence + + if $keep; then + echo Keeping $TESTDIR and exiting due to --keep + exit 0 + fi + cd ../../.. + rm -r watch6 + rm -rf $CVSROOT_DIRNAME/watch6 + ;; + + + unedit-without-baserev) mkdir 1; cd 1 module=x @@ -15465,7 +16601,7 @@ T file1' dotest ignore-on-branch-5 "$testcvs -q ci -mbranch file2" \ "Checking in file2; $CVSROOT_DIRNAME/ignore-on-branch/file2,v <-- file2 -new revision: 1\.1\.2\.1; previous revision: 1\.1 +new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1 done" dotest ignore-on-branch-6 "$testcvs -q up -rbranch2" \ "${PROG} update: file2 is no longer in the repository" @@ -15523,6 +16659,24 @@ File: binfile Status: Up-to-da Sticky Date: (none) Sticky Options: -kb" + # Test that "-kk" does not override "-kb" + cd ../.. + mkdir 2a; cd 2a + dotest binfiles-5.5a0 "${testcvs} -q co -kk first-dir" 'U first-dir/binfile' + cd first-dir + # Testing that sticky options is -kb is the closest thing we have + # to testing that binary files work right on non-unix machines + # (until there is automated testing for such machines, of course). + dotest binfiles-5.5a1 "${testcvs} status binfile" \ +"=================================================================== +File: binfile Status: Up-to-date + + Working revision: 1\.1.* + Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/binfile,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: -kb" + # Test whether the default options from the RCS file are # also used when operating on files instead of whole # directories @@ -15542,6 +16696,22 @@ File: binfile Status: Up-to-da Sticky Options: -kb" cd ../.. rm -r 3 + # test that "-kk" does not override "-kb" + mkdir 3; cd 3 + dotest binfiles-5.5c0 "${testcvs} -q co -kk first-dir/binfile" \ +'U first-dir/binfile' + cd first-dir + dotest binfiles-5.5c1 "${testcvs} status binfile" \ +"=================================================================== +File: binfile Status: Up-to-date + + Working revision: 1\.1.* + Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/binfile,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: -kb" + cd ../.. + rm -r 3 cd 2/first-dir cp ../../1/binfile2.dat binfile @@ -15564,11 +16734,13 @@ done" cd ../../2/first-dir echo 'edits in dir 2' >binfile dotest binfiles-con1 "${testcvs} -q update" \ -"U binfile -${PROG} update: nonmergeable file needs merge +"$PROG update: nonmergeable file needs merge ${PROG} update: revision 1\.3 from repository is now in binfile ${PROG} update: file from working directory is now in \.#binfile\.1\.2 C binfile" + + dotest_fail binfiles-con1b "$testcvs -q up" "C binfile" + dotest binfiles-con2 "cmp binfile ../../1/binfile.dat" '' dotest binfiles-con3 "cat .#binfile.1.2" 'edits in dir 2' @@ -15582,9 +16754,11 @@ done" dotest binfiles-con5 "${testcvs} -q update" '[UP] binfile' dotest binfiles-9 "${testcvs} -q update -A" '' - dotest binfiles-10 "${testcvs} -q update -kk" '[UP] binfile' + # "-kk" no longer does anything with "-kb" + dotest binfiles-10 "${testcvs} -q update -kk" '' dotest binfiles-11 "${testcvs} -q update" '' - dotest binfiles-12 "${testcvs} -q update -A" '[UP] binfile' + # "-kk" no longer does anything with "-kb" + dotest binfiles-12 "${testcvs} -q update -A" '' dotest binfiles-13 "${testcvs} -q update -A" '' cd ../.. @@ -16590,27 +17764,13 @@ done" cd ../.. cd m1/first-dir echo "changed in m1" >aa - if $remote; then - # The tagged text code swallows up "U aa" but isn't yet up to - # trying to figure out how it interacts with the "C aa" and - # other stuff. The whole deal of having both is pretty iffy. - dotest mwrap-7 "${testcvs} -nq update" \ + dotest mwrap-7 "$testcvs -nq update" \ "${PROG} update: nonmergeable file needs merge ${PROG} update: revision 1\.2 from repository is now in aa ${PROG} update: file from working directory is now in \.#aa\.1\.1 -C aa -U aa" - else - dotest mwrap-7 "${testcvs} -nq update" \ -"U aa -${PROG} update: nonmergeable file needs merge -${PROG} update: revision 1\.2 from repository is now in aa -${PROG} update: file from working directory is now in \.#aa\.1\.1 C aa" - fi dotest mwrap-8 "${testcvs} -q update" \ -"U aa -${PROG} update: nonmergeable file needs merge +"$PROG update: nonmergeable file needs merge ${PROG} update: revision 1\.2 from repository is now in aa ${PROG} update: file from working directory is now in \.#aa\.1\.1 C aa" @@ -17594,6 +18754,28 @@ ${log_rev3} ${log_rev2} ${log_trailer}" + # Test BASE pseudotag + dotest log-23 "${testcvs} log -rBASE file1" \ +"${log_header1} +${log_tags1} +${log_keyword} +total revisions: 5; selected revisions: 1 +description: +${log_rev2b} +${log_trailer}" + + dotest log-24 "${testcvs} -q up -r1.2 file1" "[UP] file1" + dotest log-25 "${testcvs} log -rBASE file1" \ +"${log_header1} +${log_tags1} +${log_keyword} +total revisions: 5; selected revisions: 1 +description: +${log_rev2} +${log_trailer}" + + dotest log-26 "${testcvs} -q up -rbranch file1" "[UP] file1" + # Now the same tests but with rlog dotest log-r11 "${testcvs} rlog first-dir/file1" \ @@ -17817,6 +18999,26 @@ ${log_rev3} ${log_rev2} ${log_trailer}" + # Test BASE pseudotag + dotest log-r23 "${testcvs} rlog -rBASE first-dir/file1" \ +"${PROG} rlog: warning: no revision .BASE. in .${CVSROOT_DIRNAME}/first-dir/file1,v. +${rlog_header1} +${log_tags1} +${log_keyword} +total revisions: 5; selected revisions: 0 +description: +${log_trailer}" + + dotest log-r24 "${testcvs} -q up -r1.2 file1" "[UP] file1" + dotest log-r25 "${testcvs} rlog -rBASE first-dir/file1" \ +"${PROG} rlog: warning: no revision .BASE. in .${CVSROOT_DIRNAME}/first-dir/file1,v. +${rlog_header1} +${log_tags1} +${log_keyword} +total revisions: 5; selected revisions: 0 +description: +${log_trailer}" + # Test when head is dead dotest log-d0 "${testcvs} -q up -A" \ @@ -18428,47 +19630,47 @@ done" " Annotations for file1 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* -1\.1 (${username} *[0-9a-zA-Z-]*): this -1\.1 (${username} *[0-9a-zA-Z-]*): is -1\.2 (${username} *[0-9a-zA-Z-]*): a -1\.3 (${username} *[0-9a-zA-Z-]*): trunk file -1\.2 (${username} *[0-9a-zA-Z-]*): -1\.2 (${username} *[0-9a-zA-Z-]*): with -1\.2 (${username} *[0-9a-zA-Z-]*): a -1\.2 (${username} *[0-9a-zA-Z-]*): blank -1\.2 (${username} *[0-9a-zA-Z-]*): line" +1\.1 ($username8 *[0-9a-zA-Z-]*): this +1\.1 ($username8 *[0-9a-zA-Z-]*): is +1\.2 ($username8 *[0-9a-zA-Z-]*): a +1\.3 ($username8 *[0-9a-zA-Z-]*): trunk file +1\.2 ($username8 *[0-9a-zA-Z-]*): +1\.2 ($username8 *[0-9a-zA-Z-]*): with +1\.2 ($username8 *[0-9a-zA-Z-]*): a +1\.2 ($username8 *[0-9a-zA-Z-]*): blank +1\.2 ($username8 *[0-9a-zA-Z-]*): line" dotest ann-11 "${testcvs} ann -r br" \ " Annotations for file1 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* -1\.1 (${username} *[0-9a-zA-Z-]*): this -1\.1 (${username} *[0-9a-zA-Z-]*): is -1\.2 (${username} *[0-9a-zA-Z-]*): a -1\.1 (${username} *[0-9a-zA-Z-]*): file -1\.2 (${username} *[0-9a-zA-Z-]*): -1\.2 (${username} *[0-9a-zA-Z-]*): with -1\.2 (${username} *[0-9a-zA-Z-]*): a -1\.2 (${username} *[0-9a-zA-Z-]*): blank -1\.2 (${username} *[0-9a-zA-Z-]*): line -1\.2\.2\.1 (${username} *[0-9a-zA-Z-]*): and some -1\.2\.2\.1 (${username} *[0-9a-zA-Z-]*): branched content" +1\.1 ($username8 *[0-9a-zA-Z-]*): this +1\.1 ($username8 *[0-9a-zA-Z-]*): is +1\.2 ($username8 *[0-9a-zA-Z-]*): a +1\.1 ($username8 *[0-9a-zA-Z-]*): file +1\.2 ($username8 *[0-9a-zA-Z-]*): +1\.2 ($username8 *[0-9a-zA-Z-]*): with +1\.2 ($username8 *[0-9a-zA-Z-]*): a +1\.2 ($username8 *[0-9a-zA-Z-]*): blank +1\.2 ($username8 *[0-9a-zA-Z-]*): line +1\.2\.2\.1 ($username8 *[0-9a-zA-Z-]*): and some +1\.2\.2\.1 ($username8 *[0-9a-zA-Z-]*): branched content" # FIXCVS: shouldn't "-r 1.2.0.2" be the same as "-r br"? dotest ann-12 "${testcvs} ann -r 1.2.0.2 file1" "" dotest ann-13 "${testcvs} ann -r 1.2.2 file1" \ " Annotations for file1 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* -1\.1 (${username} *[0-9a-zA-Z-]*): this -1\.1 (${username} *[0-9a-zA-Z-]*): is -1\.2 (${username} *[0-9a-zA-Z-]*): a -1\.1 (${username} *[0-9a-zA-Z-]*): file -1\.2 (${username} *[0-9a-zA-Z-]*): -1\.2 (${username} *[0-9a-zA-Z-]*): with -1\.2 (${username} *[0-9a-zA-Z-]*): a -1\.2 (${username} *[0-9a-zA-Z-]*): blank -1\.2 (${username} *[0-9a-zA-Z-]*): line -1\.2\.2\.1 (${username} *[0-9a-zA-Z-]*): and some -1\.2\.2\.1 (${username} *[0-9a-zA-Z-]*): branched content" +1\.1 ($username8 *[0-9a-zA-Z-]*): this +1\.1 ($username8 *[0-9a-zA-Z-]*): is +1\.2 ($username8 *[0-9a-zA-Z-]*): a +1\.1 ($username8 *[0-9a-zA-Z-]*): file +1\.2 ($username8 *[0-9a-zA-Z-]*): +1\.2 ($username8 *[0-9a-zA-Z-]*): with +1\.2 ($username8 *[0-9a-zA-Z-]*): a +1\.2 ($username8 *[0-9a-zA-Z-]*): blank +1\.2 ($username8 *[0-9a-zA-Z-]*): line +1\.2\.2\.1 ($username8 *[0-9a-zA-Z-]*): and some +1\.2\.2\.1 ($username8 *[0-9a-zA-Z-]*): branched content" dotest_fail ann-14 "${testcvs} ann -r bill-clintons-chastity file1" \ "${PROG} \[annotate aborted\]: no such tag bill-clintons-chastity" @@ -18480,46 +19682,46 @@ Annotations for file1 " Annotations for first-dir/file1 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* -1\.1 (${username} *[0-9a-zA-Z-]*): this -1\.1 (${username} *[0-9a-zA-Z-]*): is -1\.2 (${username} *[0-9a-zA-Z-]*): a -1\.3 (${username} *[0-9a-zA-Z-]*): trunk file -1\.2 (${username} *[0-9a-zA-Z-]*): -1\.2 (${username} *[0-9a-zA-Z-]*): with -1\.2 (${username} *[0-9a-zA-Z-]*): a -1\.2 (${username} *[0-9a-zA-Z-]*): blank -1\.2 (${username} *[0-9a-zA-Z-]*): line" +1\.1 ($username8 *[0-9a-zA-Z-]*): this +1\.1 ($username8 *[0-9a-zA-Z-]*): is +1\.2 ($username8 *[0-9a-zA-Z-]*): a +1\.3 ($username8 *[0-9a-zA-Z-]*): trunk file +1\.2 ($username8 *[0-9a-zA-Z-]*): +1\.2 ($username8 *[0-9a-zA-Z-]*): with +1\.2 ($username8 *[0-9a-zA-Z-]*): a +1\.2 ($username8 *[0-9a-zA-Z-]*): blank +1\.2 ($username8 *[0-9a-zA-Z-]*): line" dotest ann-r11 "${testcvs} rann -r br first-dir" \ " Annotations for first-dir/file1 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* -1\.1 (${username} *[0-9a-zA-Z-]*): this -1\.1 (${username} *[0-9a-zA-Z-]*): is -1\.2 (${username} *[0-9a-zA-Z-]*): a -1\.1 (${username} *[0-9a-zA-Z-]*): file -1\.2 (${username} *[0-9a-zA-Z-]*): -1\.2 (${username} *[0-9a-zA-Z-]*): with -1\.2 (${username} *[0-9a-zA-Z-]*): a -1\.2 (${username} *[0-9a-zA-Z-]*): blank -1\.2 (${username} *[0-9a-zA-Z-]*): line -1\.2\.2\.1 (${username} *[0-9a-zA-Z-]*): and some -1\.2\.2\.1 (${username} *[0-9a-zA-Z-]*): branched content" +1\.1 ($username8 *[0-9a-zA-Z-]*): this +1\.1 ($username8 *[0-9a-zA-Z-]*): is +1\.2 ($username8 *[0-9a-zA-Z-]*): a +1\.1 ($username8 *[0-9a-zA-Z-]*): file +1\.2 ($username8 *[0-9a-zA-Z-]*): +1\.2 ($username8 *[0-9a-zA-Z-]*): with +1\.2 ($username8 *[0-9a-zA-Z-]*): a +1\.2 ($username8 *[0-9a-zA-Z-]*): blank +1\.2 ($username8 *[0-9a-zA-Z-]*): line +1\.2\.2\.1 ($username8 *[0-9a-zA-Z-]*): and some +1\.2\.2\.1 ($username8 *[0-9a-zA-Z-]*): branched content" dotest ann-r12 "${testcvs} rann -r 1.2.0.2 first-dir/file1" "" dotest ann-r13 "${testcvs} rann -r 1.2.2 first-dir/file1" \ " Annotations for first-dir/file1 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* -1\.1 (${username} *[0-9a-zA-Z-]*): this -1\.1 (${username} *[0-9a-zA-Z-]*): is -1\.2 (${username} *[0-9a-zA-Z-]*): a -1\.1 (${username} *[0-9a-zA-Z-]*): file -1\.2 (${username} *[0-9a-zA-Z-]*): -1\.2 (${username} *[0-9a-zA-Z-]*): with -1\.2 (${username} *[0-9a-zA-Z-]*): a -1\.2 (${username} *[0-9a-zA-Z-]*): blank -1\.2 (${username} *[0-9a-zA-Z-]*): line -1\.2\.2\.1 (${username} *[0-9a-zA-Z-]*): and some -1\.2\.2\.1 (${username} *[0-9a-zA-Z-]*): branched content" +1\.1 ($username8 *[0-9a-zA-Z-]*): this +1\.1 ($username8 *[0-9a-zA-Z-]*): is +1\.2 ($username8 *[0-9a-zA-Z-]*): a +1\.1 ($username8 *[0-9a-zA-Z-]*): file +1\.2 ($username8 *[0-9a-zA-Z-]*): +1\.2 ($username8 *[0-9a-zA-Z-]*): with +1\.2 ($username8 *[0-9a-zA-Z-]*): a +1\.2 ($username8 *[0-9a-zA-Z-]*): blank +1\.2 ($username8 *[0-9a-zA-Z-]*): line +1\.2\.2\.1 ($username8 *[0-9a-zA-Z-]*): and some +1\.2\.2\.1 ($username8 *[0-9a-zA-Z-]*): branched content" dotest_fail ann-r14 "${testcvs} rann -r bill-clintons-chastity first-dir/file1" \ "${PROG} \[rannotate aborted\]: no such tag bill-clintons-chastity" @@ -18566,8 +19768,8 @@ done" " Annotations for $file \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* -1.2 ($username *[0-9a-zA-Z-]*): "'\$'"Id: $file,v 1.1 [0-9/]* [0-9:]* $username Exp "'\$'" -1.2 ($username *[0-9a-zA-Z-]*): line2" +1.2 ($username8 *[0-9a-zA-Z-]*): "'\$'"Id: $file,v 1.1 [0-9/]* [0-9:]* $username Exp "'\$'" +1.2 ($username8 *[0-9a-zA-Z-]*): line2" cd ../.. rm -rf 1 @@ -18585,24 +19787,22 @@ Annotations for $file # local. if $remote; then + # Use :ext: rather than :fork:. Most of the tests use :fork:, + # so we want to make sure that we test :ext: _somewhere_. + # Make sure 'rsh' works first. + depends_on_rsh "$CVS_RSH" + if test $? -eq 77; then + skip crerepos "$skipreason" + continue + fi + # For remote, just create the repository. We don't yet do # the various other tests above for remote but that should be # changed. mkdir crerepos mkdir crerepos/CVSROOT - # Use :ext: rather than :fork:. Most of the tests use :fork:, - # so we want to make sure that we test :ext: _somewhere_. - - # Maybe a bit dubious in the sense that people need to - # have rsh working to run the tests, but at least it - # isn't inetd :-). Might want to think harder about this - - # maybe try :ext:, and if it fails, print a (single, nice) - # message and fall back to :fork:. Maybe testing :ext: - # with our own CVS_RSH rather than worrying about a system one - # would do the trick. - - # Make sure server ignores real ${HOME}/.cvsrc: + # Make sure server ignores real ${HOME}/.cvsrc: cat >$TESTDIR/cvs-setHome <&2 - exit 1 - fi - + CREREPOS_ROOT=:ext:$host$TESTDIR/crerepos else # First, if the repository doesn't exist at all... @@ -18704,8 +19891,10 @@ ${PROG} \[[a-z]* aborted\]: Bad CVSROOT: # key or somesuch. Which error message we get depends on whether # false finishes running before we try to talk to it or not. dotest_fail crerepos-6a "CVS_RSH=false ${testcvs} -q -d ../crerepos get ." \ -"${PROG} \[checkout aborted\]: end of file from server (consult above messages if any)" \ -"${PROG} \[checkout aborted\]: received broken pipe signal" +"${PROG} \[checkout aborted\]: .*" \ +"${PROG} checkout: CVSROOT is set for a remote access method but your +${PROG} checkout: CVS executable doesn't support it\. +${PROG} \[checkout aborted\]: Bad CVSROOT: .\.\./crerepos.\." cd .. rm -r 1 @@ -19479,41 +20668,160 @@ U rcs4-dir/file1' cd rcs4-dir echo 'local change' >> file1 - # commit a local change - dotest rcs4-4 \ -"${testcvs} -q commit -m hack file1" \ -"Checking in file1; -${CVSROOT_DIRNAME}/rcs4-dir/file1,v <-- file1 + # commit a local change + dotest rcs4-4 \ +"${testcvs} -q commit -m hack file1" \ +"Checking in file1; +${CVSROOT_DIRNAME}/rcs4-dir/file1,v <-- file1 +new revision: 1\.2; previous revision: 1\.1 +done" + # now see if we get version 1.1 or 1.1.1.1 when we ask for + # a checkout by time... it really should be 1.1.1.1 as + # that was indeed the version that was visible at the target + # time. + dotest rcs4-5 \ +"${testcvs} -q update -D 'October 1, 2001 UTC' file1" \ +'[UP] file1' + dotest rcs4-6 \ +"${testcvs} -q status file1" \ +'=================================================================== +File: file1 Status: Up-to-date + + Working revision: 1\.1\.1\.1.* + Repository revision: 1\.1\.1\.1 '${CVSROOT_DIRNAME}'/rcs4-dir/file1,v + Sticky Tag: (none) + Sticky Date: 2001\.10\.01\.00\.00\.00 + Sticky Options: (none)' + + if $keep; then + echo Keeping ${TESTDIR} and exiting due to --keep + exit 0 + fi + + cd ../.. + rm -r rcs4 + rm -rf ${CVSROOT_DIRNAME}/rcs4-dir + ;; + + + + rcs5) + # Some tests of the $Log keyword and log message without a trailing + # EOL. This used to look ugly and, in the worst case, could cause + # a seg fault due to a buffer overflow. + # + # Note that it should not be possible to create this situation via a + # CVS server (and any client), since the server itself inserts the + # trailing EOL onto log messages that are missing one. Still, we + # shouldn't segfault due to a corrupt RCS file and I think that a log + # message without the trailing EOL doesn't actually violate the RCS + # spec, though it doesn't appear to be possible to create such a log + # message using RCS 5.7. + + mkdir $CVSROOT_DIRNAME/rcs5 + cat <<\EOF >$CVSROOT_DIRNAME/rcs5/file1,v +head 1.1; +access; +symbols; +locks; +expand kv; + +1.1 date 2007.03.20.04.03.02; author jeremiah; state Ext; branches; next; + +desc +@@ + +1.1 +log +@he always had very fine wine@ +text +@line1 +/* +EOF +echo ' * Revision history: $''Log$' >>$CVSROOT_DIRNAME/rcs5/file1,v + cat <<\EOF >>$CVSROOT_DIRNAME/rcs5/file1,v + */ +line5 +@ +EOF + + mkdir rcs5 + cd rcs5 + dotest rcs5-1 "$testcvs -Q co rcs5" + dotest rcs5-2 "cat rcs5/file1" \ +"line1 +/\\* + \\* Revision history: "'\$'"Log: file1,v "'\$'" + \\* Revision history: Revision 1\.1 2007/03/20 04:03:02 jeremiah + \\* Revision history: he always had very fine wine + \\* Revision history: + \\*/ +line5" + + cd .. + rm -r rcs5 + rm -rf $CVSROOT_DIRNAME/rcs5 + ;; + + + + rcs6) + # Test that CVS notices a specific type of corruption in the RCS + # archive. In the past, this type of corruption had turned up after + # a user ineptly attempted to delete a revision from an arcvhive + # manually. + mkdir rcs6; cd rcs6 + + # Make the project. + dotest rcs6-init-1 "$testcvs -Q co -ld top .; cd top" + mkdir rcs6 + dotest rcs6-init-2 "$testcvs -Q add rcs6" + cd rcs6 + + # Populate it. + echo some words >afile + dotest rcs6-init-3 "$testcvs -Q add afile" + dotest rcs6-init-4 "$testcvs -Q ci -mnewfile afile" \ +"RCS file: $CVSROOT_DIRNAME/rcs6/afile,v +done +Checking in afile; +$CVSROOT_DIRNAME/rcs6/afile,v <-- afile +initial revision: 1\.1 +done" + echo more words >>afile + dotest rcs6-init-5 "$testcvs -Q ci -mrev2 afile" \ +"Checking in afile; +$CVSROOT_DIRNAME/rcs6/afile,v <-- afile new revision: 1\.2; previous revision: 1\.1 done" - # now see if we get version 1.1 or 1.1.1.1 when we ask for - # a checkout by time... it really should be 1.1.1.1 as - # that was indeed the version that was visible at the target - # time. - dotest rcs4-5 \ -"${testcvs} -q update -D 'October 1, 2001 UTC' file1" \ -'[UP] file1' - dotest rcs4-6 \ -"${testcvs} -q status file1" \ -'=================================================================== -File: file1 Status: Up-to-date - Working revision: 1\.1\.1\.1.* - Repository revision: 1\.1\.1\.1 '${CVSROOT_DIRNAME}'/rcs4-dir/file1,v - Sticky Tag: (none) - Sticky Date: 2001\.10\.01\.00\.00\.00 - Sticky Options: (none)' + # Corrupt the archive. + sed -e '8,12d' \ + -e 's/^head 1\.2/head 1.1/' \ + <$CVSROOT_DIRNAME/rcs6/afile,v \ + >$CVSROOT_DIRNAME/rcs6/cfile,v + + # Update used to work. + dotest_fail rcs6-1 "$testcvs -q up" \ +"$PROG \[update aborted\]: Expected head revision 1\.1, found 1\.2\." + + # Then a commit hosed the archive further without any warnings. + # Updating to an old revision (e.g. 1.1) would have reported the + # corruption. A second commit would have deleted data from the + # file. if $keep; then - echo Keeping ${TESTDIR} and exiting due to --keep + echo Keeping $TESTDIR and exiting due to --keep exit 0 fi - cd ../.. - rm -r rcs4 - rm -rf ${CVSROOT_DIRNAME}/rcs4-dir + cd ../../.. + rm -r rcs6 + rm -rf $CVSROOT_DIRNAME/rcs6 ;; + + lockfiles) # Tests of CVS lock files. # TODO-maybe: Add a test where we arrange for a loginfo @@ -19583,6 +20891,86 @@ ${PROG} \[update aborted\]: cannot stat dotest lockfiles-8 "${testcvs} -q update" "" dotest lockfiles-9 "${testcvs} -q co -l ." "" + ### + ### There are race conditions in the following tests, but hopefully + ### the 5 seconds the first process waits to remove the lockdir and + ### the 30 seconds CVS waits betweens checks will be significant + ### enough to render the case moot. + ### + # Considers the following cases: + # + # Lock Present + # Operation Allowed (case #) + # + # Read Write + # _______ ______ + # Read |Yes (1) No (3) + # Write |No (7) No (9) + # + # Tests do not appear in same ordering as table. The odd numbering + # scheme maintains correspondance with a larger table on 1.12.x: + # 1. Read when read locks are present... + # 3. Don't read when write locks present... + # 7. Don't write when read locks are present... + # 9. Don't write when write locks are present... + + # 3. Don't read when write locks present... + mkdir "$TESTDIR/locks/first-dir/#cvs.lock" + (sleep 5; rmdir "$TESTDIR/locks/first-dir/#cvs.lock")& + dotest lockfiles-10 "$testcvs -q co -l first-dir" \ +"$PROG checkout: \[[0-9:]*\] waiting for $username's lock in $CVSROOT_DIRNAME/first-dir +$PROG checkout: \[[0-9:]*\] obtained lock in $CVSROOT_DIRNAME/first-dir" + + # 1. Read when read locks are present... + touch "$TESTDIR/locks/first-dir/#cvs.rfl.test.lock" + dotest lockfiles-11 "$testcvs -q co -l first-dir" + rm "$TESTDIR/locks/first-dir/#cvs.rfl.test.lock" + + # 7. Don't write when read locks are present... + echo I always have trouble coming up with witty text for the test files >>first-dir/sdir/ssdir/file1 + touch "$TESTDIR/locks/first-dir/sdir/ssdir/#cvs.rfl.test.lock" + (sleep 5; rm "$TESTDIR/locks/first-dir/sdir/ssdir/#cvs.rfl.test.lock")& + dotest lockfiles-13 "$testcvs -q ci -mconflict first-dir" \ +"$PROG commit: \[[0-9:]*\] waiting for $username's lock in $CVSROOT_DIRNAME/first-dir/sdir/ssdir +$PROG commit: \[[0-9:]*\] obtained lock in $CVSROOT_DIRNAME/first-dir/sdir/ssdir +Checking in first-dir/sdir/ssdir/file1; +$CVSROOT_DIRNAME/first-dir/sdir/ssdir/file1,v <-- file1 +new revision: 1\.2; previous revision: 1\.1 +done" + + # 9. Don't write when write locks are present... + echo yet this poem would probably only give longfellow bile >>first-dir/sdir/ssdir/file1 + mkdir "$TESTDIR/locks/first-dir/sdir/ssdir/#cvs.lock" + (sleep 5; rmdir "$TESTDIR/locks/first-dir/sdir/ssdir/#cvs.lock")& + dotest lockfiles-19 "$testcvs -q ci -mnot-up-to-date first-dir" \ +"$PROG commit: \[[0-9:]*\] waiting for $username's lock in $CVSROOT_DIRNAME/first-dir/sdir/ssdir +$PROG commit: \[[0-9:]*\] obtained lock in $CVSROOT_DIRNAME/first-dir/sdir/ssdir +Checking in first-dir/sdir/ssdir/file1; +$CVSROOT_DIRNAME/first-dir/sdir/ssdir/file1,v <-- file1 +new revision: 1\.3; previous revision: 1\.2 +done" + + # 10. Don't write when history locks are present... + echo have you ever heard a poem quite so vile\? >>first-dir/sdir/ssdir/file1 + mkdir "$TESTDIR/locks/CVSROOT/#cvs.history.lock" + (sleep 5; rmdir "$TESTDIR/locks/CVSROOT/#cvs.history.lock")& + dotest lockfiles-20 "$testcvs -q ci -mnot-up-to-date first-dir" \ +"Checking in first-dir/sdir/ssdir/file1; +$CVSROOT_DIRNAME/first-dir/sdir/ssdir/file1,v <-- file1 +new revision: 1\.4; previous revision: 1\.3 +done +$PROG commit: \[[0-9:]*\] waiting for $username's lock in $CVSROOT_DIRNAME/CVSROOT +$PROG commit: \[[0-9:]*\] obtained lock in $CVSROOT_DIRNAME/CVSROOT" + + dotest lockfiles-21 "$testcvs -Q tag newtag first-dir" + + rm -f $CVSROOT_DIRNAME/CVSROOT/val-tags + mkdir "$TESTDIR/locks/CVSROOT/#cvs.val-tags.lock" + (sleep 5; rmdir "$TESTDIR/locks/CVSROOT/#cvs.val-tags.lock")& + dotest lockfiles-22 "$testcvs -q up -r newtag first-dir" \ +"$PROG update: \[[0-9:]*\] waiting for $username's lock in $CVSROOT_DIRNAME/CVSROOT +$PROG update: \[[0-9:]*\] obtained lock in $CVSROOT_DIRNAME/CVSROOT" + cd CVSROOT echo "# nobody here but us comments" >config dotest lockfiles-cleanup-1 "${testcvs} -q ci -m config-it" \ @@ -19892,6 +21280,149 @@ done" rm -rf ${CVSROOT_DIRNAME}/first-dir ;; + + + sshstdio) + # CVS_RSH=ssh can have a problem with a non-blocking stdio + # in some cases. So, this test is all about testing :ext: + # with CVS_RSH=ssh. The problem is that not all machines + # will necessarily have ssh available, so be prepared to + # skip this test. + + # Are we able to run find and use an ssh? + if $remote; then :; else + continue + fi + + depends_on_ssh + if test $? -eq 77; then + skip sshstdio "$skipreason" + continue + fi + + SSHSTDIO_ROOT=:ext:$host$CVSROOT_DIRNAME + + mkdir sshstdio; cd sshstdio + dotest sshstdio-1 "$testcvs -d $SSHSTDIO_ROOT -q co -l ." + mkdir first-dir + dotest sshstdio-2 "$testcvs add first-dir" \ + "Directory $CVSROOT_DIRNAME/first-dir added to the repository" + cd first-dir + a='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' + c='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' + # Generate 1024 lines of $a + cnt=0 + echo $a > aaa + while [ $cnt -lt 5 ] ; do + cnt=`expr $cnt + 1` ; + mv aaa aaa.old + cat aaa.old aaa.old aaa.old aaa.old > aaa + done + dotest sshstdio-3 "$testcvs -q add aaa" \ +"$PROG add: use .$PROG commit. to add this file permanently" + dotest sshstdio-4 "$testcvs -q ci -mcreate aaa" \ +"RCS file: $CVSROOT_DIRNAME/first-dir/aaa,v +done +Checking in aaa; +$CVSROOT_DIRNAME/first-dir/aaa,v <-- aaa +initial revision: 1\.1 +done" + # replace lines 1, 512, 513, 1024 with $c + sed 510q < aaa > aaa.old + (echo $c; cat aaa.old; echo $c; \ + echo $c; cat aaa.old; echo $c) > aaa + dotest sshstdio-5 "$testcvs -q ci -mmodify-it aaa" \ +"Checking in aaa; +$CVSROOT_DIRNAME/first-dir/aaa,v <-- aaa +new revision: 1\.2; previous revision: 1\.1 +done" + cat > wrapper.sh <&1 < /dev/null | cat +EOF + chmod +x wrapper.sh + ./wrapper.sh \ + $testcvs -z5 -Q diff --side-by-side -W 500 -r 1.1 -r 1.2 \ + aaa \ + |sed -e \ +'/^Write failed flushing stdout buffer\. $/d; + /^write stdout: Broken pipe $/d; + :retry; + /Write failed flushing stdout buffer\. $/{ + N; + s/Write failed flushing stdout buffer\. \n//; + b retry; +} + /write stdout: Broken pipe $/{ + N; + s/write stdout: Broken pipe \n//; + b retry; +}' \ + > wrapper.dif + + $testcvs -z5 -Q diff --side-by-side -W 500 -r 1.1 -r 1.2 \ + aaa > good.dif + + dotest sshstdio-6 "cmp wrapper.dif good.dif" + + if $keep; then + echo Keeping $TESTDIR and exiting due to --keep + exit 0 + fi + + cd ../.. + CVS_RSH=$save_CVS_RSH; export CVS_RSH + rm -r sshstdio + rm -rf $CVSROOT_DIRNAME/first-dir + ;; + + + + parseroot2) + # Test some :ext: roots for consistancy. + if $remote; then :; else + continue + fi + + depends_on_rsh "$CVS_RSH" + if test $? -eq 77; then + skip parseroot2 "$skipreason" + continue + fi + + # Test checking out and subsequently updating with some different + # CVSROOTs. + + # A standard case, hostname:dirname. + mkdir parseroot2; cd parseroot2 + save_CVSROOT=$CVSROOT + CVSROOT=$host:$CVSROOT_DIRNAME + dotest parseroot2-1 "$testcvs -Q co CVSROOT" + cd CVSROOT + dotest parseroot2-2 "$testcvs -Q up" + cd .. + + # A degenerate remote case, just the server name and the directory + # name, with no :'s to help parsing. It can be mistaken for a + # relative directory name. + rm -r CVSROOT + CVSROOT=$host$CVSROOT_DIRNAME + dotest parseroot2-3 "$testcvs -Q co CVSROOT" + cd CVSROOT + dotest parseroot2-4 "$testcvs -Q up" + + if $keep; then + echo Keeping $TESTDIR and exiting due to --keep + exit 0 + fi + + cd ../.. + CVSROOT=$save_CVSROOT + rm -r parseroot2 + ;; + + + history) # CVSROOT/history tests: # history: various "cvs history" invocations @@ -21226,24 +22757,24 @@ xx" " Annotations for file1 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* -1\.3 (${username} *[0-9a-zA-Z-]*): initial -1\.4\.2\.1 (${username} *[0-9a-zA-Z-]*): xx "'\$'"Log: file1,v "'\$'" -1\.4\.2\.1 (${username} *[0-9a-zA-Z-]*): xx Revision 1\.4 [0-9/]* [0-9:]* ${username} -1\.4\.2\.1 (${username} *[0-9a-zA-Z-]*): xx First log line -1\.4\.2\.1 (${username} *[0-9a-zA-Z-]*): xx Second log line -1\.4\.2\.1 (${username} *[0-9a-zA-Z-]*): xx -1\.4\.2\.1 (${username} *[0-9a-zA-Z-]*): br-change" +1\.3 ($username8 *[0-9a-zA-Z-]*): initial +1\.4\.2\.1 ($username8 *[0-9a-zA-Z-]*): xx "'\$'"Log: file1,v "'\$'" +1\.4\.2\.1 ($username8 *[0-9a-zA-Z-]*): xx Revision 1\.4 [0-9/]* [0-9:]* $username +1\.4\.2\.1 ($username8 *[0-9a-zA-Z-]*): xx First log line +1\.4\.2\.1 ($username8 *[0-9a-zA-Z-]*): xx Second log line +1\.4\.2\.1 ($username8 *[0-9a-zA-Z-]*): xx +1\.4\.2\.1 ($username8 *[0-9a-zA-Z-]*): br-change" dotest keywordlog-23 "${testcvs} ann -r HEAD file1" \ " Annotations for file1 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* -1\.3 (${username} *[0-9a-zA-Z-]*): initial -1\.5 (${username} *[0-9a-zA-Z-]*): xx "'\$'"Log: file1,v "'\$'" -1\.5 (${username} *[0-9a-zA-Z-]*): xx Revision 1\.4 [0-9/]* [0-9:]* ${username} -1\.5 (${username} *[0-9a-zA-Z-]*): xx First log line -1\.5 (${username} *[0-9a-zA-Z-]*): xx Second log line -1\.5 (${username} *[0-9a-zA-Z-]*): xx -1\.5 (${username} *[0-9a-zA-Z-]*): change" +1\.3 ($username8 *[0-9a-zA-Z-]*): initial +1\.5 ($username8 *[0-9a-zA-Z-]*): xx "'\$'"Log: file1,v "'\$'" +1\.5 ($username8 *[0-9a-zA-Z-]*): xx Revision 1\.4 [0-9/]* [0-9:]* $username +1\.5 ($username8 *[0-9a-zA-Z-]*): xx First log line +1\.5 ($username8 *[0-9a-zA-Z-]*): xx Second log line +1\.5 ($username8 *[0-9a-zA-Z-]*): xx +1\.5 ($username8 *[0-9a-zA-Z-]*): change" cd ../.. # @@ -21508,8 +23039,7 @@ diff -r1\.2 file1 # Here's the problem... shouldn't -kk a binary file... rm file1 dotest keyword2-13 "${testcvs} -q update -A -kk -j branch" \ -"U binfile\.dat -${PROG} update: warning: file1 was lost +"${PROG} update: warning: file1 was lost U file1 RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v retrieving revision 1\.1 @@ -21524,13 +23054,13 @@ ${CVSROOT_DIRNAME}/first-dir/file1,v <- new revision: 1\.3; previous revision: 1\.2 done" - dotest_fail keyword2-15 "cmp binfile.dat ../binfile.dat" \ -"binfile\.dat \.\./binfile\.dat differ: char 13, line 2" + # "-kk" no longer corrupts binary files + dotest keyword2-15 "cmp binfile.dat ../binfile.dat" '' # Okay, restore everything and make CVS try and merge a binary file... + # "-kk" no longer affects binary files dotest keyword2-16 "${testcvs} -q update -A" \ -"[UP] binfile.dat -[UP] file1" +"[UP] file1" dotest keyword2-17 "${testcvs} -q tag -b branch2" \ "T binfile\.dat T file1" @@ -21543,16 +23073,15 @@ T file1" ${CVSROOT_DIRNAME}/first-dir/binfile\.dat,v <-- binfile\.dat new revision: 1\.1\.4\.1; previous revision: 1\.1 done" + # "-kk" no longer affects binary files + + # XXXX: do not ask, why we get the "U binfile.dat" line twice + # looks like a bug! dotest keyword2-20 "${testcvs} -q update -A -kk -j branch2" \ "U binfile\.dat -RCS file: ${CVSROOT_DIRNAME}/first-dir/binfile\.dat,v -retrieving revision 1\.1 -retrieving revision 1\.1\.4\.1 -Merging differences between 1\.1 and 1\.1\.4\.1 into binfile\.dat +U binfile\.dat U file1" - # Yep, it's broke, 'cept for that gal in Hodunk who uses -kk - # so that some files only merge when she says so. Time to clean up... cd ../.. rm -r 1 rm -rf ${CVSROOT_DIRNAME}/first-dir @@ -21744,6 +23273,8 @@ done" # for checkout and update as well. # mkdir 1; cd 1 + save_TZ=$TZ + TZ=UTC; export TZ dotest tagdate-1 "${testcvs} -q co -l ." '' mkdir first-dir dotest tagdate-2 "${testcvs} add first-dir" \ @@ -21761,6 +23292,8 @@ Checking in file1; ${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1 initial revision: 1\.1 done" + date_T1=`getrlogdate -r1.1 first-dir/file1` + dotest tagdate-5 "${testcvs} -q tag -b br1" "T file1" dotest tagdate-6 "${testcvs} -q tag -b br2" "T file1" echo trunk-2 >file1 @@ -21769,6 +23302,8 @@ done" ${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1 new revision: 1\.2; previous revision: 1\.1 done" + date_T2=`getrlogdate -r1.2 first-dir/file1` + # We are testing -r -D where br1 is a (magic) branch without # any revisions. First the case where br2 doesn't have any # revisions either: @@ -21780,6 +23315,7 @@ done" ${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1 new revision: 1\.1\.4\.1; previous revision: 1\.1 done" + date_T3=`getrlogdate -r1.1.4.1 first-dir/file1` # Then the case where br2 does have revisions: dotest tagdate-11 "${testcvs} -q update -p -r br1 -D now" "trunk-1" @@ -21789,52 +23325,397 @@ done" "${PROG} \[update aborted\]: argument to join may not contain a date specifier without a tag" # And check export - # Wish some shorter sleep interval would suffice, but I need to - # guarantee that the point in time specified by the argument to -D - # in tagdate-14 and tagdate-16 - # falls in the space of time between commits to br2 and I - # figure 60 seconds is probably a large enough range to - # account for most network file system delays and such... - # as it stands, it takes between 1 and 2 seconds between - # calling CVS on my machine and the -D argument being used to - # recall the file revision and this timing will certainly vary - # by several seconds between machines - dependant on CPUspeeds, - # I/O speeds, load, etc. - sleep 60 - echo br2-2 >file1 dotest tagdate-13 "${testcvs} -q ci -m modify-2-on-br2" \ "Checking in file1; ${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1 new revision: 1\.1\.4\.2; previous revision: 1\.1\.4\.1 done" + date_T4=`getrlogdate -r1.1.4.2 first-dir/file1` + cd ../.. - mkdir 2; cd - dotest tagdate-14 "${testcvs} -q export -r br2 -D'1 minute ago' first-dir" \ + mkdir 2; cd 2 + dotest tagdate-14 "${testcvs} -q export -r br2 -D'$date_T3' first-dir" \ "[UP] first-dir/file1" dotest tagdate-15 "cat first-dir/file1" "br2-1" # Now for annotate cd ../1/first-dir - dotest tagdate-16 "${testcvs} annotate -rbr2 -D'1 minute ago'" \ + dotest tagdate-16 "${testcvs} annotate -rbr2 -D'$date_T3'" \ " Annotations for file1 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* -1\.1\.4\.1 (${username} *[0-9a-zA-Z-]*): br2-1" +1\.1\.4\.1 ($username8 *[0-9a-zA-Z-]*): br2-1" dotest tagdate-17 "${testcvs} annotate -rbr2 -Dnow" \ " Annotations for file1 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* -1\.1\.4\.2 (${username} *[0-9a-zA-Z-]*): br2-2" +1\.1\.4\.2 ($username8 *[0-9a-zA-Z-]*): br2-2" + + # Now check to see what happens when we add files to br2 and trunk + echo br2-1 > file3 + dotest tagdate-18 "${testcvs} add file3" \ +"${PROG} add: scheduling file \`file3' for addition on branch \`br2' +${PROG} add: use .${PROG} commit. to add this file permanently" + dotest tagdate-19 "${testcvs} -q ci -m add file3" \ +"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v +done +Checking in file3; +${CVSROOT_DIRNAME}/first-dir/Attic/file3,v <-- file3 +new revision: 1\.1\.2\.1; previous revision: 1\.1 +done" + date_T5=`getrlogdate -r1.1 first-dir/file3` + date_T6=`getrlogdate -r1.1.2.1 first-dir/file3` + + cd ../.. + mkdir 3; cd 3 + dotest tagdate-20 "${testcvs} -Q co first-dir" '' + cd first-dir + echo trunk-1 > file2 + dotest tagdate-21 "${testcvs} add file2" \ +"${PROG} add: scheduling file .file2. for addition +${PROG} add: use .${PROG} commit. to add this file permanently" + dotest tagdate-22 "${testcvs} -q ci -m add file2" \ +"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v +done +Checking in file2; +${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2 +initial revision: 1\.1 +done" + date_T7=`getrlogdate -r1.1 first-dir/file2` + echo "trunk-2" >file2 + dotest tagdate-23 "${testcvs} -q ci -m update file2" \ +"Checking in file2; +${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2 +new revision: 1\.2; previous revision: 1\.1 +done" + date_T8=`getrlogdate -r1.2 first-dir/file2` + + cd ../../1/first-dir + echo br2-1 > file2 + dotest tagdate-24 "${testcvs} add file2" \ +"${PROG} add: scheduling file \`file2' for addition on branch \`br2' +${PROG} add: use .${PROG} commit. to add this file permanently" + dotest tagdate-25 "${testcvs} -q ci -m add file2" \ +"Checking in file2; +${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2 +new revision: 1\.2\.2\.2; previous revision: 1\.2\.2\.1 +done" + date_T9=`getrlogdate -r1.2.2.2 first-dir/file2` + cd ../.. + + # Time Rev Branch Comments + # T0 trunk first-dir created + # T1 1.1 trunk first-dir/file1 committed "trunk-1" + # br1 branch created + # br2 branch created + # T2 1.2 trunk first-dir/file1 committed "trunk-2" + # T3 1.1.4.1 br2 first-dir/file1 committed "br2-1" + # +60s + # T4 1.1.4.2 br2 first-dir/file1 committed "br2-2" + # T5 1.1 trunk first-dir/file3 dead + # T6 1.1.2.1 br2 first-dir/file3 committed "br2-1" + # T7 1.1 trunk first-dir/file2 committed "trunk-1" + # T8 1.2 trunk first-dir/file2 committed "trunk-2" + # T8 1.2.2.1 br2 first-dir/file2 dead + # T9 1.2.2.2 br2 first-dir/file2 committed "br2-1" + # + + mkdir 4; cd 4 + (echo Dates for tagdate-26-* are:;\ + echo " date_T1='$date_T1'";\ + echo " date_T2='$date_T2'";\ + echo " date_T3='$date_T3'";\ + echo " date_T4='$date_T4'";\ + echo " date_T5='$date_T5'";\ + echo " date_T6='$date_T6'";\ + echo " date_T7='$date_T7'";\ + echo " date_T8='$date_T8'";\ + echo " date_T9='$date_T9'") >>$LOGFILE + dotest tagdate-26-trunk-t1 \ +"${testcvs} co -D'$date_T1' -d first-dir-trunk-t1 first-dir" \ +"${PROG} checkout: Updating first-dir-trunk-t1 +U first-dir-trunk-t1/file1" + dotest tagdate-26-br2-t1 \ +"${testcvs} co -r br2 -D'$date_T1' -d first-dir-br2-t1 first-dir" \ +"${PROG} checkout: Updating first-dir-br2-t1 +U first-dir-br2-t1/file1" + dotest tagdate-26-trunk-t2 \ +"${testcvs} co -D'$date_T2' -d first-dir-trunk-t2 first-dir" \ +"${PROG} checkout: Updating first-dir-trunk-t2 +U first-dir-trunk-t2/file1" + dotest tagdate-26-br2-t2 \ +"${testcvs} co -r br2 -D'$date_T2' -d first-dir-br2-t2 first-dir" \ +"${PROG} checkout: Updating first-dir-br2-t2 +U first-dir-br2-t2/file1" + dotest tagdate-26-br2-t3 \ +"${testcvs} co -r br2 -D'$date_T3' -d first-dir-br2-t3 first-dir" \ +"${PROG} checkout: Updating first-dir-br2-t3 +U first-dir-br2-t3/file1" + dotest tagdate-26-br2-t4 \ +"${testcvs} co -r br2 -D'$date_T4' -d first-dir-br2-t4 first-dir" \ +"${PROG} checkout: Updating first-dir-br2-t4 +U first-dir-br2-t4/file1" + dotest tagdate-26-br2-t6 \ +"${testcvs} co -r br2 -D'$date_T6' -d first-dir-br2-t6 first-dir" \ +"${PROG} checkout: Updating first-dir-br2-t6 +U first-dir-br2-t6/file1 +U first-dir-br2-t6/file3" + dotest tagdate-26-trunk-t7 \ +"${testcvs} co -D'$date_T7' -d first-dir-trunk-t7 first-dir" \ +"${PROG} checkout: Updating first-dir-trunk-t7 +U first-dir-trunk-t7/file1 +U first-dir-trunk-t7/file2" + dotest tagdate-26-br2-t7 \ +"${testcvs} co -r br2 -D'$date_T7' -d first-dir-br2-t7 first-dir" \ +"${PROG} checkout: Updating first-dir-br2-t7 +U first-dir-br2-t7/file1 +U first-dir-br2-t7/file3" + dotest tagdate-26-trunk-t8 \ +"${testcvs} co -D'$date_T8' -d first-dir-trunk-t8 first-dir" \ +"${PROG} checkout: Updating first-dir-trunk-t8 +U first-dir-trunk-t8/file1 +U first-dir-trunk-t8/file2" + dotest tagdate-26-br2-t8 \ +"${testcvs} co -r br2 -D'$date_T8' -d first-dir-br2-t8 first-dir" \ +"${PROG} checkout: Updating first-dir-br2-t8 +U first-dir-br2-t8/file1 +U first-dir-br2-t8/file3" + dotest tagdate-26-br2-t9 \ +"${testcvs} co -r br2 -D'$date_T9' -d first-dir-br2-t9 first-dir" \ +"${PROG} checkout: Updating first-dir-br2-t9 +U first-dir-br2-t9/file1 +U first-dir-br2-t9/file2 +U first-dir-br2-t9/file3" + dotest tagdate-27-trunk-t1 \ +"${testcvs} status first-dir-trunk-t1" \ +"${PROG} status: Examining first-dir-trunk-t1 +=================================================================== +File: file1 Status: Up-to-date + + Working revision: 1\.1[^.]* + Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file1,v + Sticky Tag: (none) + Sticky Date: [0-9.]* + Sticky Options: (none)" + dotest tagdate-27-br2-t1 \ +"${testcvs} status first-dir-br2-t1" \ +"${PROG} status: Examining first-dir-br2-t1 +=================================================================== +File: file1 Status: Needs Patch + + Working revision: 1\.1[^.]* + Repository revision: 1\.1\.4\.2 ${CVSROOT_DIRNAME}/first-dir/file1,v + Sticky Tag: br2 (branch: 1\.1\.4) + Sticky Date: (none) + Sticky Options: (none)" + dotest tagdate-27-trunk-t2 \ +"${testcvs} status first-dir-trunk-t2" \ +"${PROG} status: Examining first-dir-trunk-t2 +=================================================================== +File: file1 Status: Up-to-date + + Working revision: 1\.2[^.]* + Repository revision: 1\.2 ${CVSROOT_DIRNAME}/first-dir/file1,v + Sticky Tag: (none) + Sticky Date: [0-9.]* + Sticky Options: (none)" + dotest tagdate-27-br2-t2 \ +"${testcvs} status first-dir-br2-t2" \ +"${PROG} status: Examining first-dir-br2-t2 +=================================================================== +File: file1 Status: Needs Patch + + Working revision: 1\.1[^.]* + Repository revision: 1\.1\.4\.2 ${CVSROOT_DIRNAME}/first-dir/file1,v + Sticky Tag: br2 (branch: 1\.1\.4) + Sticky Date: (none) + Sticky Options: (none)" + dotest tagdate-27-br2-t3 \ +"${testcvs} status first-dir-br2-t3" \ +"${PROG} status: Examining first-dir-br2-t3 +=================================================================== +File: file1 Status: Needs Patch + + Working revision: 1\.1\.4\.1[^.]* + Repository revision: 1\.1\.4\.2 ${CVSROOT_DIRNAME}/first-dir/file1,v + Sticky Tag: br2 (branch: 1\.1\.4) + Sticky Date: (none) + Sticky Options: (none)" + dotest tagdate-27-br2-t4 \ +"${testcvs} status first-dir-br2-t4" \ +"${PROG} status: Examining first-dir-br2-t4 +=================================================================== +File: file1 Status: Up-to-date + + Working revision: 1\.1\.4\.2[^.]* + Repository revision: 1\.1\.4\.2 ${CVSROOT_DIRNAME}/first-dir/file1,v + Sticky Tag: br2 (branch: 1\.1\.4) + Sticky Date: (none) + Sticky Options: (none)" + dotest tagdate-27-br2-t6 \ +"${testcvs} status first-dir-br2-t6" \ +"${PROG} status: Examining first-dir-br2-t6 +=================================================================== +File: file1 Status: Up-to-date + + Working revision: 1\.1\.4\.2[^.]* + Repository revision: 1\.1\.4\.2 ${CVSROOT_DIRNAME}/first-dir/file1,v + Sticky Tag: br2 (branch: 1\.1\.4) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: file3 Status: Up-to-date + + Working revision: 1\.1\.2\.1[^.]* + Repository revision: 1\.1\.2\.1 ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v + Sticky Tag: br2 (branch: 1\.1\.2) + Sticky Date: (none) + Sticky Options: (none)" + dotest tagdate-27-trunk-t7 \ +"${testcvs} status first-dir-trunk-t7" \ +"${PROG} status: Examining first-dir-trunk-t7 +=================================================================== +File: file1 Status: Up-to-date + + Working revision: 1\.2[^.]* + Repository revision: 1\.2 ${CVSROOT_DIRNAME}/first-dir/file1,v + Sticky Tag: (none) + Sticky Date: [0-9.]* + Sticky Options: (none) + +=================================================================== +File: file2 Status: Up-to-date + + Working revision: 1\.1[^.]* + Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file2,v + Sticky Tag: (none) + Sticky Date: [0-9.]* + Sticky Options: (none)" + dotest tagdate-27-br2-t7 \ +"${testcvs} status first-dir-br2-t7" \ +"${PROG} status: Examining first-dir-br2-t7 +=================================================================== +File: file1 Status: Up-to-date + + Working revision: 1\.1\.4\.2[^.]* + Repository revision: 1\.1\.4\.2 ${CVSROOT_DIRNAME}/first-dir/file1,v + Sticky Tag: br2 (branch: 1\.1\.4) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: file3 Status: Up-to-date + + Working revision: 1\.1\.2\.1[^.]* + Repository revision: 1\.1\.2\.1 ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v + Sticky Tag: br2 (branch: 1\.1\.2) + Sticky Date: (none) + Sticky Options: (none)" + dotest tagdate-27-trunk-t8 \ +"${testcvs} status first-dir-trunk-t8" \ +"${PROG} status: Examining first-dir-trunk-t8 +=================================================================== +File: file1 Status: Up-to-date + + Working revision: 1\.2[^.]* + Repository revision: 1\.2 ${CVSROOT_DIRNAME}/first-dir/file1,v + Sticky Tag: (none) + Sticky Date: [0-9.]* + Sticky Options: (none) + +=================================================================== +File: file2 Status: Up-to-date + + Working revision: 1\.2[^.]* + Repository revision: 1\.2 ${CVSROOT_DIRNAME}/first-dir/file2,v + Sticky Tag: (none) + Sticky Date: [0-9.]* + Sticky Options: (none)" + dotest tagdate-27-br2-t8 \ +"${testcvs} status first-dir-br2-t8" \ +"${PROG} status: Examining first-dir-br2-t8 +=================================================================== +File: file1 Status: Up-to-date + + Working revision: 1\.1\.4\.2[^.]* + Repository revision: 1\.1\.4\.2 ${CVSROOT_DIRNAME}/first-dir/file1,v + Sticky Tag: br2 (branch: 1\.1\.4) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: file3 Status: Up-to-date + + Working revision: 1\.1\.2\.1[^.]* + Repository revision: 1\.1\.2\.1 ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v + Sticky Tag: br2 (branch: 1\.1\.2) + Sticky Date: (none) + Sticky Options: (none)" + dotest tagdate-27-br2-t9 \ +"${testcvs} status first-dir-br2-t9" \ +"${PROG} status: Examining first-dir-br2-t9 +=================================================================== +File: file1 Status: Up-to-date + + Working revision: 1\.1\.4\.2[^.]* + Repository revision: 1\.1\.4\.2 ${CVSROOT_DIRNAME}/first-dir/file1,v + Sticky Tag: br2 (branch: 1\.1\.4) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: file2 Status: Up-to-date + + Working revision: 1\.2\.2\.2[^.]* + Repository revision: 1\.2\.2\.2 ${CVSROOT_DIRNAME}/first-dir/file2,v + Sticky Tag: br2 (branch: 1\.2\.2) + Sticky Date: (none) + Sticky Options: (none) + +=================================================================== +File: file3 Status: Up-to-date + + Working revision: 1\.1\.2\.1[^.]* + Repository revision: 1\.1\.2\.1 ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v + Sticky Tag: br2 (branch: 1\.1\.2) + Sticky Date: (none) + Sticky Options: (none)" + + # Now check the contents of the files + dotest tagdate-28-trunk-t1 'cat first-dir-trunk-t1/file1' 'trunk-1' + dotest tagdate-28-br2-t1 'cat first-dir-br2-t1/file1' 'trunk-1' + dotest tagdate-28-trunk-t2 'cat first-dir-trunk-t2/file1' 'trunk-2' + dotest tagdate-28-br2-t2 'cat first-dir-br2-t2/file1' 'trunk-1' + dotest tagdate-28-br2-t3 'cat first-dir-br2-t3/file1' 'br2-1' + dotest tagdate-28-br2-t4 'cat first-dir-br2-t4/file1' 'br2-2' + dotest tagdate-28-br2-t6a 'cat first-dir-br2-t6/file1' "br2-2" + dotest tagdate-28-br2-t6b 'cat first-dir-br2-t6/file3' "br2-1" + dotest tagdate-28-trunk-t7a 'cat first-dir-trunk-t7/file1' "trunk-2" + dotest tagdate-28-trunk-t7b 'cat first-dir-trunk-t7/file2' "trunk-1" + dotest tagdate-28-br2-t7a 'cat first-dir-br2-t7/file1' "br2-2" + dotest tagdate-28-br2-t7b 'cat first-dir-br2-t7/file3' "br2-1" + dotest tagdate-28-trunk-t8a 'cat first-dir-trunk-t8/file1' "trunk-2" + dotest tagdate-28-trunk-t8b 'cat first-dir-trunk-t8/file2' "trunk-2" + dotest tagdate-28-br2-t8a 'cat first-dir-br2-t8/file1' "br2-2" + dotest tagdate-28-br2-t8c 'cat first-dir-br2-t8/file3' "br2-1" + dotest tagdate-28-br2-t9a 'cat first-dir-br2-t9/file1' "br2-2" + dotest tagdate-28-br2-t9b 'cat first-dir-br2-t9/file2' "br2-1" + dotest tagdate-28-br2-t9c 'cat first-dir-br2-t9/file3' "br2-1" + cd .. + + unset date_T1 date_T2 date_T3 date_T4 date_T5 + unset date_T6 date_T7 date_T8 date_T9 + TZ=$save_TZ if $keep; then echo Keeping ${TESTDIR} and exiting due to --keep exit 0 fi - cd ../.. - rm -r 1 2 + rm -r 1 2 3 4 rm -rf ${CVSROOT_DIRNAME}/first-dir ;; @@ -23143,13 +25024,13 @@ add cat >${TESTDIR}/lockme <&2 exit 1 fi @@ -26496,9 +28377,13 @@ Root ${CVSROOT_DIRNAME} noop EOF + # The "no such system user" error is occurring on at least one of + # our BSD 2.0.2 nightly test platforms. dotest_fail pserver-4.2 \ "${testcvs} --allow-root=${CVSROOT_DIRNAME} pserver" \ -"error 0: root not allowed" </dev/null 2>&1; then - # A true value means ls found files/directories with these names. - # Give the server some time to finish, then retry. - sleep 1 - if ls $TMPDIR/cvs-serv* >/dev/null 2>&1; then - fail "Found cvs-serv* directories in $TMPDIR." - fi - fi - if ls $TMPDIR/cvs?????? >/dev/null 2>&1; then - # A true value means ls found files/directories with these names. - fail "Found cvsXXXXXX temp files in $TMPDIR." - fi + # Reset val-tags to a pristine state. + rm -f $CVSROOT_DIRNAME/CVSROOT/val-tags + + verify_tmp_empty "post $what" done # The big loop -echo "OK, all tests completed." +# Set up summary data for output. +skippedoutput= +warningsoutput= +extendedinfo= +if test $skipped -ne 0; then + skippedoutput="$skipped test group" + if test $skipped -ne 1; then + skippedoutput="${skippedoutput}s" + fi + skippedoutput="$skippedoutput skipped" +fi +if test $warnings -ne 0; then + warningsoutput="$warnings test" + if test $warnings -ne 1; then + warningsoutput="${warningsoutput}s" + fi + warningsoutput="$warningsoutput passed with warnings" +fi +if test -n "$skippedoutput" || test -n "$warningsoutput"; then + extendedinfo=" (" + if test -n "$skippedoutput"; then + extendedinfo="$extendedinfo$skippedoutput" + fi + if test -n "$skippedoutput" && test -n "$warningsoutput"; then + extendedinfo="$extendedinfo and " + fi + if test -n "$warningsoutput"; then + extendedinfo="$extendedinfo$warningsoutput" + fi + extendedinfo="$extendedinfo)" +fi + +echo "OK, all $passed tests passed$extendedinfo." # TODO: # * Test `cvs update -d foo' (where foo does not exist). Index: src/server.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/server.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -p -r1.24 -r1.25 --- src/server.c 10 Jun 2004 19:12:50 -0000 1.24 +++ src/server.c 7 Jan 2008 02:44:32 -0000 1.25 @@ -20,6 +20,8 @@ #include "getline.h" #include "buffer.h" +int server_active = 0; + #if defined(SERVER_SUPPORT) || defined(CLIENT_SUPPORT) # ifdef HAVE_GSSAPI /* This stuff isn't included solely with SERVER_SUPPORT since some of these @@ -360,13 +362,20 @@ create_adm_p (base_dir, dir) dir_where_cvsadm_lives = xmalloc (strlen (base_dir) + strlen (dir) + 100); if (dir_where_cvsadm_lives == NULL) + { + free (p); return ENOMEM; + } /* Allocate some space for the temporary string in which we will construct filenames. */ tmp = xmalloc (strlen (base_dir) + strlen (dir) + 100); if (tmp == NULL) + { + free (p); + free (dir_where_cvsadm_lives); return ENOMEM; + } /* We make several passes through this loop. On the first pass, @@ -1234,6 +1243,7 @@ serve_sticky (arg) if (alloc_pending (80 + strlen (CVSADM_TAG))) sprintf (pending_error_text, "E cannot write to %s", CVSADM_TAG); pending_error = save_errno; + (void) fclose (f); return; } if (fclose (f) == EOF) @@ -1682,7 +1692,9 @@ serve_unchanged (arg) * is allowed, but broken versions of WinCVS & TortoiseCVS rely on * this behavior. */ - *timefield = '='; + if (*timefield != '+') + /* Skip this for entries with conflict markers. */ + *timefield = '='; break; } } @@ -1753,7 +1765,10 @@ serve_is_modified (arg) * is allowed, but broken versions of WinCVS & TortoiseCVS rely on * this behavior. */ - *timefield = 'M'; + if (*timefield != '+') + /* Skip this for entries with conflict markers. */ + *timefield = 'M'; + if (kopt != NULL) { if (alloc_pending (strlen (name) + 80)) @@ -1840,6 +1855,7 @@ serve_entry (arg) cp = xmalloc (strlen (arg) + 2); if (cp == NULL) { + free (p); pending_error = ENOMEM; return; } @@ -2703,6 +2719,25 @@ set_nonblock_fd (fd) +/* + * Set buffer FD to blocking I/O. Returns 0 for success or errno code. + */ +int +set_block_fd (fd) + int fd; +{ + int flags; + + flags = fcntl (fd, F_GETFL, 0); + if (flags < 0) + return errno; + if (fcntl (fd, F_SETFL, flags & ~O_NONBLOCK) < 0) + return errno; + return 0; +} + + + static void do_cvs_command (cmd_name, command) char *cmd_name; @@ -2926,22 +2961,31 @@ error \n"); { char junk; ssize_t status; - while ((status = read (flowcontrol_pipe[0], &junk, 1)) > 0 - || (status == -1 && errno == EAGAIN)); + set_block_fd (flowcontrol_pipe[0]); + while ((status = read (flowcontrol_pipe[0], &junk, 1)) > 0); } /* FIXME: No point in printing an error message with error(), * as STDERR is already closed, but perhaps this could be syslogged? */ #endif + rcs_cleanup (); + Lock_Cleanup (); + /* Don't call server_cleanup - the parent will handle that. */ +#ifdef SYSTEM_CLEANUP + /* Hook for OS-specific behavior, for example socket subsystems on + NT and OS2 or dealing with windows and arguments on Mac. */ + SYSTEM_CLEANUP (); +#endif exit (exitstatus); } /* OK, sit around getting all the input from the child. */ { - struct buffer *stdoutbuf; - struct buffer *stderrbuf; - struct buffer *protocol_inbuf; + struct buffer *stdoutbuf = NULL; + struct buffer *stderrbuf = NULL; + struct buffer *protocol_inbuf = NULL; + int err_exit = 0; /* Number of file descriptors to check in select (). */ int num_to_check; int count_needed = 1; @@ -2994,7 +3038,8 @@ error \n"); { buf_output0 (buf_to_net, "E close failed\n"); print_error (errno); - goto error_exit; + err_exit = 1; + goto child_finish; } stdout_pipe[1] = -1; @@ -3002,7 +3047,8 @@ error \n"); { buf_output0 (buf_to_net, "E close failed\n"); print_error (errno); - goto error_exit; + err_exit = 1; + goto child_finish; } stderr_pipe[1] = -1; @@ -3010,7 +3056,8 @@ error \n"); { buf_output0 (buf_to_net, "E close failed\n"); print_error (errno); - goto error_exit; + err_exit = 1; + goto child_finish; } protocol_pipe[1] = -1; @@ -3019,7 +3066,8 @@ error \n"); { buf_output0 (buf_to_net, "E close failed\n"); print_error (errno); - goto error_exit; + err_exit = 1; + goto child_finish; } flowcontrol_pipe[0] = -1; #endif /* SERVER_FLOWCONTROL */ @@ -3028,7 +3076,9 @@ error \n"); { buf_output0 (buf_to_net, "E close failed\n"); print_error (errno); - goto error_exit; + dev_null_fd = -1; /* Do not try to close it again. */ + err_exit = 1; + goto child_finish; } dev_null_fd = -1; @@ -3115,7 +3165,8 @@ error \n"); { buf_output0 (buf_to_net, "E select failed\n"); print_error (errno); - goto error_exit; + err_exit = 1; + goto child_finish; } } while (numfds < 0); @@ -3148,7 +3199,8 @@ error \n"); { buf_output0 (buf_to_net, "E buf_input_data failed\n"); print_error (status); - goto error_exit; + err_exit = 1; + goto child_finish; } /* @@ -3222,7 +3274,8 @@ error \n"); { buf_output0 (buf_to_net, "E buf_input_data failed\n"); print_error (status); - goto error_exit; + err_exit = 1; + goto child_finish; } /* What should we do with errors? syslog() them? */ @@ -3247,7 +3300,8 @@ error \n"); { buf_output0 (buf_to_net, "E buf_input_data failed\n"); print_error (status); - goto error_exit; + err_exit = 1; + goto child_finish; } /* What should we do with errors? syslog() them? */ @@ -3327,21 +3381,33 @@ E CVS locks may need cleaning up.\n"); command_pid = -1; } + child_finish: /* * OK, we've waited for the child. By now all CVS locks are free * and it's OK to block on the network. */ set_block (buf_to_net); buf_flush (buf_to_net, 1); - buf_shutdown (protocol_inbuf); - buf_free (protocol_inbuf); - protocol_inbuf = NULL; - buf_shutdown (stderrbuf); - buf_free (stderrbuf); - stderrbuf = NULL; - buf_shutdown (stdoutbuf); - buf_free (stdoutbuf); - stdoutbuf = NULL; + if (protocol_inbuf) + { + buf_shutdown (protocol_inbuf); + buf_free (protocol_inbuf); + protocol_inbuf = NULL; + } + if (stderrbuf) + { + buf_shutdown (stderrbuf); + buf_free (stderrbuf); + stderrbuf = NULL; + } + if (stdoutbuf) + { + buf_shutdown (stdoutbuf); + buf_free (stdoutbuf); + stdoutbuf = NULL; + } + if (err_exit) + goto error_exit; } if (errs) @@ -3365,7 +3431,8 @@ E CVS locks may need cleaning up.\n"); command_pid = -1; } - close (dev_null_fd); + if (dev_null_fd >= 0) + close (dev_null_fd); close (protocol_pipe[0]); close (protocol_pipe[1]); close (stderr_pipe[0]); @@ -3693,6 +3760,10 @@ server_checked_in (file, update_dir, rep const char *update_dir; const char *repository; { + assert (file); + assert (update_dir); + assert (repository); + if (noexec) return; if (scratched_file != NULL && entries_line == NULL) @@ -4126,6 +4197,7 @@ server_updated (finfo, vers, updated, mo free (scratched_file); scratched_file = NULL; } + buf_send_counted (protocol); return; } @@ -4204,7 +4276,6 @@ CVS server internal error: no mode in se if (updated == SERVER_UPDATED) { Node *node; - Entnode *entnode; if (!(supported_response ("Created") && supported_response ("Update-existing"))) @@ -4222,9 +4293,13 @@ CVS server internal error: no mode in se in case we end up processing it again (e.g. modules3-6 in the testsuite). */ node = findnode_fn (finfo->entries, finfo->file); - entnode = node->data; - free (entnode->timestamp); - entnode->timestamp = xstrdup ("="); + assert (node != NULL); + if (node != NULL) + { + Entnode *entnode = node->data; + free (entnode->timestamp); + entnode->timestamp = xstrdup ("="); + } } else if (updated == SERVER_MERGED) buf_output0 (protocol, "Merged "); @@ -4512,9 +4587,12 @@ struct template_proc_data static struct template_proc_data *tpd; static int +template_proc PROTO((const char *repository, const char *template)); + +static int template_proc (repository, template) - char *repository; - char *template; + const char *repository; + const char *template; { FILE *fp; char buf[1024]; @@ -4792,6 +4870,7 @@ struct request requests[] = REQ_LINE("Checkin-time", serve_checkin_time, 0), REQ_LINE("Modified", serve_modified, RQ_ESSENTIAL), REQ_LINE("Is-modified", serve_is_modified, 0), + REQ_LINE("Empty-conflicts", serve_noop, 0), /* The client must send this request to interoperate with CVS 1.5 through 1.9 servers. The server must support it (although it can @@ -5046,8 +5125,6 @@ server_cleanup (sig) } } -int server_active = 0; - int server (argc, argv) int argc; @@ -5479,6 +5556,7 @@ check_repository_password (username, pas { if (!existence_error (errno)) error (0, errno, "cannot open %s", filename); + free (filename); return 0; } @@ -5912,6 +5990,8 @@ pserver_authenticate_connection () printf ("I LOVE YOU\n"); fflush (stdout); + /* It's okay to skip rcs_cleanup() and Lock_Cleanup() here. */ + #ifdef SYSTEM_CLEANUP /* Hook for OS-specific behavior, for example socket subsystems on NT and OS2 or dealing with windows and arguments on Mac. */ @@ -6425,12 +6505,10 @@ cvs_output (str, len) size_t to_write = len; const char *p = str; - /* For symmetry with cvs_outerr we would call fflush (stderr) - here. I guess the assumption is that stderr will be - unbuffered, so we don't need to. That sounds like a sound - assumption from the manpage I looked at, but if there was - something fishy about it, my guess is that calling fflush - would not produce a significant performance problem. */ + /* Local users that do 'cvs status 2>&1' on a local repository + may see the informational messages out-of-order with the + status messages unless we use the fflush (stderr) here. */ + fflush (stderr); while (to_write > 0) { @@ -6487,16 +6565,16 @@ this client does not support writing bin size_t written; size_t to_write = len; const char *p = str; - - /* For symmetry with cvs_outerr we would call fflush (stderr) - here. I guess the assumption is that stderr will be - unbuffered, so we don't need to. That sounds like a sound - assumption from the manpage I looked at, but if there was - something fishy about it, my guess is that calling fflush - would not produce a significant performance problem. */ #ifdef USE_SETMODE_STDOUT int oldmode; +#endif + /* Local users that do 'cvs status 2>&1' on a local repository + may see the informational messages out-of-order with the + status messages unless we use the fflush (stderr) here. */ + fflush (stderr); + +#ifdef USE_SETMODE_STDOUT /* It is possible that this should be the same ifdef as USE_SETMODE_BINARY but at least for the moment we keep them separate. Mostly this is just laziness and/or a question Index: src/server.h =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/server.h,v retrieving revision 1.1.1.8 retrieving revision 1.1.1.9 diff -u -p -r1.1.1.8 -r1.1.1.9 --- src/server.h 15 Apr 2004 01:01:55 -0000 1.1.1.8 +++ src/server.h 26 Dec 2007 03:55:04 -0000 1.1.1.9 @@ -1,8 +1,8 @@ /* - * Copyright (c) 2003 The Free Software Foundation. + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. * - * Portions Copyright (c) 2003 Derek Price - * and Ximbiot , + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS kit. @@ -21,6 +21,12 @@ /* + * Nonzero if we are using the server. Used by various places to call + * server-specific functions. + */ +extern int server_active; + +/* * Expand to `S', ` ', or the empty string. Used in `%s-> ...' trace printfs. */ #ifdef SERVER_SUPPORT @@ -31,12 +37,6 @@ #ifdef SERVER_SUPPORT -/* - * Nonzero if we are using the server. Used by various places to call - * server-specific functions. - */ -extern int server_active; - /* Server functions exported to the rest of CVS. */ /* Run the server. */ Index: src/stack.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/stack.c,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.2 diff -u -p -r1.1.1.1 -r1.1.1.2 --- src/stack.c 15 Apr 2004 01:01:55 -0000 1.1.1.1 +++ src/stack.c 26 Dec 2007 03:55:03 -0000 1.1.1.2 @@ -1,7 +1,8 @@ /* - * Copyright (c) 2004, Free Software Foundation, - * Derek Price, - * & Ximbiot . + * Copyright (C) 2004-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 2004-2005 Derek Price, Ximbiot , + * and others. * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS source distribution. Index: src/stack.h =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/stack.h,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.2 diff -u -p -r1.1.1.1 -r1.1.1.2 --- src/stack.h 15 Apr 2004 01:01:55 -0000 1.1.1.1 +++ src/stack.h 26 Dec 2007 03:55:04 -0000 1.1.1.2 @@ -1,7 +1,6 @@ /* - * Copyright (c) 2004, Free Software Foundation, - * Derek Price, - * & Ximbiot . + * Copyright (c) 2004-2005 The Free Software Foundation, + * Derek Price, and Ximbiot . * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS source distribution. Index: src/status.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/status.c,v retrieving revision 1.1.1.10 retrieving revision 1.1.1.11 diff -u -p -r1.1.1.10 -r1.1.1.11 --- src/status.c 15 Apr 2004 01:01:55 -0000 1.1.1.10 +++ src/status.c 26 Dec 2007 03:55:03 -0000 1.1.1.11 @@ -1,6 +1,11 @@ /* - * Copyright (c) 1992, Brian Berliner and Jeff Polk - * Copyright (c) 1989-1992, Brian Berliner + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk + * Portions Copyright (C) 1989-1992, Brian Berliner * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS source distribution. @@ -141,9 +146,6 @@ status_fileproc (callerdat, finfo) sstat = "Needs Patch"; break; case T_CONFLICT: - /* I _think_ that "unresolved" is correct; that if it has - been resolved then the status will change. But I'm not - sure about that. */ sstat = "Unresolved Conflict"; break; case T_ADDED: @@ -153,9 +155,7 @@ status_fileproc (callerdat, finfo) sstat = "Locally Removed"; break; case T_MODIFIED: - if ( vers->ts_conflict - && ( file_has_conflict ( finfo, vers->ts_conflict ) - || file_has_markers ( finfo ) ) ) + if (file_has_markers (finfo)) sstat = "File had conflicts on merge"; else /* Note that we do not re Register() the file when we spot @@ -206,20 +206,15 @@ status_fileproc (callerdat, finfo) } else if (vers->vn_user[0] == '0' && vers->vn_user[1] == '\0') cvs_output (" Working revision:\tNew file!\n", 0); -#ifdef SERVER_SUPPORT - else if (server_active) - { - cvs_output (" Working revision:\t", 0); - cvs_output (vers->vn_user, 0); - cvs_output ("\n", 0); - } -#endif else { cvs_output (" Working revision:\t", 0); cvs_output (vers->vn_user, 0); - cvs_output ("\t", 0); - cvs_output (vers->ts_rcs, 0); + if (!server_active) + { + cvs_output ("\t", 0); + cvs_output (vers->ts_rcs, 0); + } cvs_output ("\n", 0); } Index: src/subr.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/subr.c,v retrieving revision 1.1.1.13 retrieving revision 1.1.1.14 diff -u -p -r1.1.1.13 -r1.1.1.14 --- src/subr.c 10 Jun 2004 19:05:38 -0000 1.1.1.13 +++ src/subr.c 26 Dec 2007 03:55:03 -0000 1.1.1.14 @@ -1,6 +1,11 @@ /* - * Copyright (c) 1992, Brian Berliner and Jeff Polk - * Copyright (c) 1989-1992, Brian Berliner + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk + * Portions Copyright (C) 1989-1992, Brian Berliner * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS source distribution. @@ -319,7 +324,6 @@ increment_revnum (rev) const char *rev; { char *newrev, *p; - int lastfield; size_t len = strlen (rev); newrev = xmalloc (len + 2); @@ -645,59 +649,6 @@ make_message_rcslegal (message) -/* - * file_has_conflict - * - * This function compares the timestamp of a file with ts_conflict set - * to the timestamp on the actual file and returns TRUE or FALSE based - * on the results. - * - * This function does not check for actual markers in the file and - * file_has_markers() function should be called when that is interesting. - * - * ASSUMPTIONS - * The ts_conflict field is not NULL. - * - * RETURNS - * TRUE ts_conflict matches the current timestamp. - * FALSE The ts_conflict field does not match the file's - * timestamp. - */ -int -file_has_conflict (finfo, ts_conflict) - const struct file_info *finfo; - const char *ts_conflict; -{ - char *filestamp; - int retcode; - - /* If ts_conflict is NULL, there was no merge since the last - * commit and there can be no conflict. - */ - assert (ts_conflict); - - /* - * If the timestamp has changed and no - * conflict indicators are found, it isn't a - * conflict any more. - */ - -#ifdef SERVER_SUPPORT - if (server_active) - retcode = ts_conflict[0] == '='; - else -#endif /* SERVER_SUPPORT */ - { - filestamp = time_stamp (finfo->file); - retcode = !strcmp (ts_conflict, filestamp); - free (filestamp); - } - - return retcode; -} - - - /* Does the file FINFO contain conflict markers? The whole concept of looking at the contents of the file to figure out whether there are unresolved conflicts is kind of bogus (people do want to manage files Index: src/tag.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/tag.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -p -r1.2 -r1.3 --- src/tag.c 5 Aug 2004 17:47:35 -0000 1.2 +++ src/tag.c 2 Jan 2008 08:54:42 -0000 1.3 @@ -1,6 +1,11 @@ /* - * Copyright (c) 1992, Brian Berliner and Jeff Polk - * Copyright (c) 1989-1992, Brian Berliner + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk + * Portions Copyright (C) 1989-1992, Brian Berliner * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS source distribution. @@ -152,11 +157,9 @@ cvstag (argc, argv) break; case 'Q': case 'q': -#ifdef SERVER_SUPPORT /* The CVS 1.5 client sends these options (in addition to Global_option requests), so we must ignore them. */ if (!server_active) -#endif error (1, 0, "-q or -Q must be specified before \"%s\"", cvs_cmd_name); @@ -354,11 +357,12 @@ rtag_proc (argc, argv, xwhere, mwhere, m { error (0, errno, "cannot chdir to %s", repository); free (repository); + free (where); return (1); } /* End section which is identical to patch_proc. */ - if (delete_flag || attic_too || (force_tag_match && numtag)) + if (delete_flag || force_tag_move || attic_too || numtag) which = W_REPOS | W_ATTIC; else which = W_REPOS; @@ -1134,6 +1138,170 @@ val_fileproc (callerdat, finfo) +/* This routine determines whether a tag appears in CVSROOT/val-tags. + * + * The val-tags file will be open read-only when IDB is NULL. Since writes to + * val-tags always append to it, the lack of locking is okay. The worst case + * race condition might misinterpret a partially written "foobar" matched, for + * instance, a request for "f", "foo", of "foob". Such a mismatch would be + * caught harmlessly later. + * + * Before CVS adds a tag to val-tags, it will lock val-tags for write and + * verify that the tag is still not present to avoid adding it twice. + * + * NOTES + * This function expects its parent to handle any necessary locking of the + * val-tags file. + * + * INPUTS + * idb When this value is NULL, the val-tags file is opened in + * in read-only mode. When present, the val-tags file is opened + * in read-write mode and the DBM handle is stored in *IDB. + * name The tag to search for. + * + * OUTPUTS + * *idb The val-tags file opened for read/write, or NULL if it couldn't + * be opened. + * + * ERRORS + * Exits with an error message if the val-tags file cannot be opened for + * read (failure to open val-tags read/write is harmless - see below). + * + * RETURNS + * true 1. If NAME exists in val-tags. + * 2. If IDB is non-NULL and val-tags cannot be opened for write. + * This allows callers to ignore the harmless inability to + * update the val-tags cache. + * false If the file could be opened and the tag is not present. + */ +static int is_in_val_tags PROTO((DBM **idb, const char *name)); +static int +is_in_val_tags (idb, name) + DBM **idb; + const char *name; +{ + DBM *db = NULL; + char *valtags_filename; + datum mytag; + int status; + + /* Casting out const should be safe here - input datums are not + * written to by the myndbm functions. + */ + mytag.dptr = (char *)name; + mytag.dsize = strlen (name); + + valtags_filename = xmalloc (strlen (current_parsed_root->directory) + + sizeof CVSROOTADM + + sizeof CVSROOTADM_VALTAGS + 3); + sprintf (valtags_filename, "%s/%s/%s", current_parsed_root->directory, + CVSROOTADM, CVSROOTADM_VALTAGS); + + if (idb) + { + db = dbm_open (valtags_filename, O_RDWR, 0666); + if (!db) + { + mode_t omask; + + if (!existence_error (errno)) + { + error (0, errno, "warning: cannot open %s read/write", + valtags_filename); + *idb = NULL; + return 1; + } + + omask = umask (cvsumask); + db = dbm_open (valtags_filename, O_RDWR | O_CREAT | O_TRUNC, 0666); + umask (omask); + if (!db) + { + error (0, errno, "warning: cannot create %s", + valtags_filename); + *idb = NULL; + return 1; + } + + *idb = db; + return 0; + } + + *idb = db; + } + else + { + db = dbm_open (valtags_filename, O_RDONLY, 0444); + if (!db && !existence_error (errno)) + error (1, errno, "cannot read %s", valtags_filename); + } + + /* If the file merely fails to exist, we just keep going and create + it later if need be. */ + + status = 0; + if (db) + { + datum val; + + val = dbm_fetch (db, mytag); + if (val.dptr != NULL) + /* Found. The tag is valid. */ + status = 1; + + /* FIXME: should check errors somehow (add dbm_error to myndbm.c?). */ + + if (!idb) dbm_close (db); + } + + free (valtags_filename); + return status; +} + + + +/* Add a tag to the CVSROOT/val-tags cache. Establishes a write lock and + * reverifies that the tag does not exist before adding it. + */ +static void add_to_val_tags PROTO((const char *name)); +static void +add_to_val_tags (name) + const char *name; +{ + DBM *db; + datum mytag; + datum value; + + if (noexec) return; + + val_tags_lock (current_parsed_root->directory); + + /* Check for presence again since we have a lock now. */ + if (is_in_val_tags (&db, name)) + { + clear_val_tags_lock (); + if (db) + dbm_close (db); + return; + } + + /* Casting out const should be safe here - input datums are not + * written to by the myndbm functions. + */ + mytag.dptr = (char *)name; + mytag.dsize = strlen (name); + value.dptr = "y"; + value.dsize = 1; + + if (dbm_store (db, mytag, value, DBM_REPLACE) < 0) + error (0, errno, "failed to store %s into val-tags", name); + dbm_close (db); + + clear_val_tags_lock (); +} + + + static Dtype val_direntproc PROTO ((void *, const char *, const char *, const char *, List *)); @@ -1175,10 +1343,6 @@ tag_check_valid (name, argc, argv, local int aflag; char *repository; { - DBM *db; - char *valtags_filename; - int nowrite = 0; - datum mytag; struct val_args the_val_args; struct saved_cwd cwd; int which; @@ -1204,49 +1368,12 @@ Numeric tag %s contains characters other if (readonlyfs) return; - /* FIXME: This routine doesn't seem to do any locking whatsoever - (and it is called from places which don't have locks in place). - If two processes try to write val-tags at the same time, it would - seem like we are in trouble. */ - - mytag.dptr = name; - mytag.dsize = strlen (name); - - valtags_filename = xmalloc (strlen (current_parsed_root->directory) - + sizeof CVSROOTADM - + sizeof CVSROOTADM_VALTAGS + 3); - sprintf (valtags_filename, "%s/%s/%s", current_parsed_root->directory, - CVSROOTADM, CVSROOTADM_VALTAGS); - db = dbm_open (valtags_filename, O_RDWR, 0666); - if (db == NULL) - { - if (!existence_error (errno)) - { - error (0, errno, "warning: cannot open %s read/write", - valtags_filename); - db = dbm_open (valtags_filename, O_RDONLY, 0666); - if (db != NULL) - nowrite = 1; - else if (!existence_error (errno)) - error (1, errno, "cannot read %s", valtags_filename); - } - /* If the file merely fails to exist, we just keep going and create - it later if need be. */ - } - if (db != NULL) - { - datum val; + /* Verify that the tag is valid syntactically. Some later code once made + * assumptions about this. + */ + RCS_check_tag (name); - val = dbm_fetch (db, mytag); - if (val.dptr != NULL) - { - /* Found. The tag is valid. */ - dbm_close (db); - free (valtags_filename); - return; - } - /* FIXME: should check errors somehow (add dbm_error to myndbm.c?). */ - } + if (is_in_val_tags (NULL, name)) return; /* We didn't find the tag in val-tags, so look through all the RCS files to see whether it exists there. Yes, this is expensive, but there @@ -1291,41 +1418,11 @@ Numeric tag %s contains characters other if (!the_val_args.found) error (1, 0, "no such tag %s", name); else - { /* The tags is valid but not mentioned in val-tags. Add it. */ - datum value; + add_to_val_tags (name); +} - if (noexec || nowrite) - { - if (db != NULL) - dbm_close (db); - free (valtags_filename); - return; - } - if (db == NULL) - { - mode_t omask; - omask = umask (cvsumask); - db = dbm_open (valtags_filename, O_RDWR | O_CREAT | O_TRUNC, 0666); - (void)umask (omask); - - if (db == NULL) - { - error (0, errno, "warning: cannot create %s", valtags_filename); - free (valtags_filename); - return; - } - } - value.dptr = "y"; - value.dsize = 1; - if (dbm_store (db, mytag, value, DBM_REPLACE) < 0) - error (0, errno, "cannot store %s into %s", name, - valtags_filename); - dbm_close (db); - } - free (valtags_filename); -} /* * Check whether a join tag is valid. This is just like Index: src/update.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/update.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -p -r1.14 -r1.15 --- src/update.c 10 Jun 2004 19:12:50 -0000 1.14 +++ src/update.c 7 Jan 2008 02:49:44 -0000 1.15 @@ -1,6 +1,11 @@ /* - * Copyright (c) 1992, Brian Berliner and Jeff Polk - * Copyright (c) 1989-1992, Brian Berliner + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk + * Portions Copyright (C) 1989-1992, Brian Berliner * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS source distribution. @@ -36,6 +41,7 @@ */ #include "cvs.h" +#include #include "savecwd.h" #ifdef SERVER_SUPPORT # include "md5.h" @@ -180,11 +186,9 @@ update (argc, argv) break; case 'Q': case 'q': -#ifdef SERVER_SUPPORT /* The CVS 1.5 client sends these options (in addition to Global_option requests), so we must ignore them. */ if (!server_active) -#endif error (1, 0, "-q or -Q must be specified before \"%s\"", cvs_cmd_name); @@ -202,6 +206,7 @@ update (argc, argv) tag = optarg; break; case 'D': + if (date) free (date); date = Make_Date (optarg); break; case 'P': @@ -521,13 +526,8 @@ do_update (argc, argv, xoptions, xtag, x argc, argv, local, which, aflag, CVS_LOCK_READ, preload_update_dir, 1, repository); -#ifdef SERVER_SUPPORT - if (server_active) - return err; -#endif - /* see if we need to sleep before returning to avoid time-stamp races */ - if (last_register_time) + if (!server_active && last_register_time) { sleep_past (last_register_time); } @@ -683,11 +683,7 @@ update_fileproc (callerdat, finfo) bakname = backup_file (finfo->file, vers->vn_user); /* This behavior is sufficiently unexpected to justify overinformativeness, I think. */ -#ifdef SERVER_SUPPORT - if ((! really_quiet) && (! server_active)) -#else /* ! SERVER_SUPPORT */ - if (! really_quiet) -#endif /* SERVER_SUPPORT */ + if (!really_quiet && !server_active) (void) printf ("(Locally modified %s moved to %s)\n", finfo->file, bakname); free (bakname); @@ -702,8 +698,7 @@ update_fileproc (callerdat, finfo) { if (vers->ts_conflict) { - if (file_has_conflict (finfo, vers->ts_conflict) - || file_has_markers (finfo)) + if (file_has_markers (finfo)) { write_letter (finfo, 'C'); retval = 1; @@ -854,11 +849,7 @@ update_filesdone_proc (callerdat, err, r if (unlink_file_dir (CVSADM) < 0 && !existence_error (errno)) error (0, errno, "cannot remove %s directory", CVSADM); } -#ifdef SERVER_SUPPORT else if (!server_active && !pipeout) -#else - else if (!pipeout) -#endif /* SERVER_SUPPORT */ { /* If there is no CVS/Root file, add one */ if (!isfile (CVSADM_ROOT)) @@ -911,15 +902,11 @@ update_dirent_proc (callerdat, dir, repo is when update -d is specified, and the working directory is gone but the subdirectory is still mentioned in CVS/Entries). */ - if (1 -#ifdef SERVER_SUPPORT - /* In the remote case, the client should refrain from - sending us the directory in the first place. So we - want to continue to give an error, so clients make - sure to do this. */ - && !server_active -#endif - && !isdir (repository)) + /* In the remote case, the client should refrain from + sending us the directory in the first place. So we + want to continue to give an error, so clients make + sure to do this. */ + if (!server_active && !isdir (repository)) return R_SKIP_ALL; if (noexec) @@ -1213,13 +1200,10 @@ scratch_file (finfo, vers) #endif if (unlink_file (finfo->file) < 0 && ! existence_error (errno)) error (0, errno, "unable to remove %s", finfo->fullname); - else -#ifdef SERVER_SUPPORT + else if (!server_active) + { /* skip this step when the server is running since * server_updated should have handled it */ - if (!server_active) -#endif - { /* keep the vers structure up to date in case we do a join * - if there isn't a file, it can't very well have a version number, can it? */ @@ -1261,11 +1245,7 @@ checkout_file (finfo, vers_ts, adding, m /* Don't screw with backup files if we're going to stdout, or if we are the server. */ - if (!pipeout -#ifdef SERVER_SUPPORT - && ! server_active -#endif - ) + if (!pipeout && !server_active) { backup = xmalloc (strlen (finfo->file) + sizeof (CVSADM) @@ -1357,7 +1337,9 @@ VERS: ", 0); for us to stat. */ if (stat (vers_ts->srcfile->path, &sb) < 0) { +#if defined (SERVER_SUPPORT) || defined (CLIENT_SUPPORT) buf_free (revbuf); +#endif /* defined (SERVER_SUPPORT) || defined (CLIENT_SUPPORT) */ error (1, errno, "cannot stat %s", vers_ts->srcfile->path); } @@ -1524,8 +1506,10 @@ VERS: ", 0); free (backup); } +#if defined (SERVER_SUPPORT) || defined (CLIENT_SUPPORT) if (revbuf != NULL) buf_free (revbuf); +#endif /* defined (SERVER_SUPPORT) || defined (CLIENT_SUPPORT) */ return retval; } @@ -1726,7 +1710,9 @@ patch_file (finfo, vers_ts, docheckout, retcode = 0; if (! fail) { - char *diff_options; + int dargc = 0; + size_t darg_allocated = 0; + char **dargv = NULL; /* If the client does not support the Rcs-diff command, we send a context diff, and the client must invoke patch. @@ -1734,16 +1720,13 @@ patch_file (finfo, vers_ts, docheckout, new approach only requires running diff in the server; the client can handle everything without invoking an external program. */ - if (! rcs_diff_patches) - { + if (!rcs_diff_patches) /* We use -c, not -u, because that is what CVS has traditionally used. Kind of a moot point, now that Rcs-diff is preferred, so there is no point in making the compatibility issues worse. */ - diff_options = "-c"; - } + run_add_arg_p (&dargc, &darg_allocated, &dargv, "-c"); else - { /* Now that diff is librarified, we could be passing -a if we wanted to. However, it is unclear to me whether we would want to. Does diff -a, in any significant @@ -1753,10 +1736,11 @@ patch_file (finfo, vers_ts, docheckout, 'binary'. Conversely, do they tend to be much larger in the bad cases? This needs some more thought/investigation, I suspect. */ - - diff_options = "-n"; - } - retcode = diff_exec (file1, file2, NULL, NULL, diff_options, finfo->file); + run_add_arg_p (&dargc, &darg_allocated, &dargv, "-n"); + retcode = diff_exec (file1, file2, NULL, NULL, dargc, dargv, + finfo->file); + run_arg_free_p (dargc, dargv); + free (dargv); /* A retcode of 0 means no differences. 1 means some differences. */ if (retcode != 0 @@ -1947,6 +1931,47 @@ write_letter (finfo, letter) +/* Reregister a file after a merge. */ +static void +RegisterMerge PROTO((struct file_info *finfo, Vers_TS *vers, + const char *backup, int has_conflicts)); +static void +RegisterMerge (finfo, vers, backup, has_conflicts) + struct file_info *finfo; + Vers_TS *vers; + const char *backup; + int has_conflicts; +{ + /* This file is the result of a merge, which means that it has + been modified. We use a special timestamp string which will + not compare equal to any actual timestamp. */ + char *cp = NULL; + + if (has_conflicts) + { + time (&last_register_time); + cp = time_stamp (finfo->file); + } + Register (finfo->entries, finfo->file, vers->vn_rcs ? vers->vn_rcs : "0", + "Result of merge", vers->options, vers->tag, vers->date, cp); + if (cp) + free (cp); + +#ifdef SERVER_SUPPORT + /* Send the new contents of the file before the message. If we + wanted to be totally correct, we would have the client write + the message only after the file has safely been written. */ + if (server_active) + { + server_copy_file (finfo->file, finfo->update_dir, finfo->repository, + backup); + server_updated (finfo, vers, SERVER_MERGED, (mode_t) -1, NULL, NULL); + } +#endif +} + + + /* * Do all the magic associated with a file which needs to be merged */ @@ -1960,6 +1985,8 @@ merge_file (finfo, vers) int retcode = 0; int retval; + assert (vers->vn_user); + /* * The users currently modified file is moved to a backup file name * ".#filename.version", so that it will stay around for a few days @@ -1997,13 +2024,21 @@ merge_file (finfo, vers) thought needs to go into this, and in the meantime it is safe to treat any such mismatch as an automatic conflict. -twp */ -#ifdef SERVER_SUPPORT - if (server_active) - server_copy_file (finfo->file, finfo->update_dir, - finfo->repository, backup); -#endif + retcode = RCS_checkout (finfo->rcs, finfo->file, + vers->vn_rcs, vers->tag, + vers->options, NULL, NULL, NULL); + if (retcode) + { + error (0, 0, "failed to check out `%s' file", finfo->fullname); + error (0, 0, "restoring `%s' from backup file `%s'", + finfo->fullname, backup); + rename_file (backup, finfo->file); + retval = 1; + goto out; + } + xchmod (finfo->file, 1); - status = checkout_file (finfo, vers, 0, 1, 1); + RegisterMerge (finfo, vers, backup, 1); /* Is there a better term than "nonmergeable file"? What we really mean is, not something that CVS cannot or does not @@ -2037,24 +2072,6 @@ merge_file (finfo, vers) if (strcmp (vers->options, "-V4") == 0) vers->options[0] = '\0'; - /* This file is the result of a merge, which means that it has - been modified. We use a special timestamp string which will - not compare equal to any actual timestamp. */ - { - char *cp = 0; - - if (status) - { - (void) time (&last_register_time); - cp = time_stamp (finfo->file); - } - Register (finfo->entries, finfo->file, vers->vn_rcs, - "Result of merge", vers->options, vers->tag, - vers->date, cp); - if (cp) - free (cp); - } - /* fix up the vers structure, in case it is used by join */ if (join_rev1) { @@ -2065,19 +2082,7 @@ merge_file (finfo, vers) vers->vn_user = xstrdup (vers->vn_rcs); } -#ifdef SERVER_SUPPORT - /* Send the new contents of the file before the message. If we - wanted to be totally correct, we would have the client write - the message only after the file has safely been written. */ - if (server_active) - { - server_copy_file (finfo->file, finfo->update_dir, finfo->repository, - backup); - server_updated (finfo, vers, SERVER_MERGED, - (mode_t) -1, (unsigned char *) NULL, - (struct buffer *) NULL); - } -#endif + RegisterMerge (finfo, vers, backup, status); /* FIXME: the noexec case is broken. RCS_merge could be doing the xcmp on the temporary files without much hassle, I think. */ @@ -2671,31 +2676,7 @@ join_file (finfo, vers) RCS_checkout above, and we aren't running as the server. However, that is not the normal case, and calling Register again won't cost much in that case. */ - { - char *cp = 0; - - if (status) - { - (void) time (&last_register_time); - cp = time_stamp (finfo->file); - } - Register (finfo->entries, finfo->file, - vers->vn_rcs ? vers->vn_rcs : "0", "Result of merge", - vers->options, vers->tag, vers->date, cp); - if (cp) - free(cp); - } - -#ifdef SERVER_SUPPORT - if (server_active) - { - server_copy_file (finfo->file, finfo->update_dir, finfo->repository, - backup); - server_updated (finfo, vers, SERVER_MERGED, - (mode_t) -1, (unsigned char *) NULL, - (struct buffer *) NULL); - } -#endif + RegisterMerge (finfo, vers, backup, status); out: free (rev1); Index: src/vers_ts.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/vers_ts.c,v retrieving revision 1.1.1.12 retrieving revision 1.1.1.13 diff -u -p -r1.1.1.12 -r1.1.1.13 --- src/vers_ts.c 10 Jun 2004 19:05:38 -0000 1.1.1.12 +++ src/vers_ts.c 26 Dec 2007 03:55:03 -0000 1.1.1.13 @@ -1,6 +1,11 @@ /* - * Copyright (c) 1992, Brian Berliner and Jeff Polk - * Copyright (c) 1989-1992, Brian Berliner + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk + * Portions Copyright (C) 1989-1992, Brian Berliner * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS source distribution. @@ -35,6 +40,7 @@ Version_TS (finfo, options, tag, date, f Vers_TS *vers_ts; struct stickydirtag *sdtp; Entnode *entdata; + char *rcsexpand = NULL; #ifdef UTIME_EXPECTS_WRITABLE int change_it_back = 0; @@ -106,30 +112,39 @@ Version_TS (finfo, options, tag, date, f } } + /* Always look up the RCS keyword mode when we have an RCS archive. It + * will either be needed as a default or to avoid allowing the -k options + * specified on the command line from overriding binary mode (-kb). + */ + if (finfo->rcs != NULL) + rcsexpand = RCS_getexpand (finfo->rcs); + /* * -k options specified on the command line override (and overwrite) - * options stored in the entries file + * options stored in the entries file and default options from the RCS + * archive, except for binary mode (-kb). */ if (options && *options != '\0') - vers_ts->options = xstrdup (options); - else if (!vers_ts->options || *vers_ts->options == '\0') { - if (finfo->rcs != NULL) - { - /* If no keyword expansion was specified on command line, - use whatever was in the rcs file (if there is one). This - is how we, if we are the server, tell the client whether - a file is binary. */ - char *rcsexpand = RCS_getexpand (finfo->rcs); - if (rcsexpand != NULL) - { - if (vers_ts->options != NULL) - free (vers_ts->options); - vers_ts->options = xmalloc (strlen (rcsexpand) + 3); - strcpy (vers_ts->options, "-k"); - strcat (vers_ts->options, rcsexpand); - } - } + if (vers_ts->options != NULL) + free (vers_ts->options); + if (rcsexpand != NULL && strcmp (rcsexpand, "b") == 0) + vers_ts->options = xstrdup ("-kb"); + else + vers_ts->options = xstrdup (options); + } + else if ((!vers_ts->options || *vers_ts->options == '\0') + && rcsexpand != NULL) + { + /* If no keyword expansion was specified on command line, + use whatever was in the rcs file (if there is one). This + is how we, if we are the server, tell the client whether + a file is binary. */ + if (vers_ts->options != NULL) + free (vers_ts->options); + vers_ts->options = xmalloc (strlen (rcsexpand) + 3); + strcpy (vers_ts->options, "-k"); + strcat (vers_ts->options, rcsexpand); } if (!vers_ts->options) vers_ts->options = xstrdup (""); @@ -287,6 +302,13 @@ time_stamp_server (file, vers_ts, entdat else if (entdata->timestamp && entdata->timestamp[0] == '=') mark_unchanged (vers_ts); + else if (entdata->conflict + && entdata->conflict[0] == '=') + { + /* These just need matching content. Might as well minimize it. */ + vers_ts->ts_user = xstrdup (""); + vers_ts->ts_conflict = xstrdup (""); + } else if (entdata->timestamp && (entdata->timestamp[0] == 'M' || entdata->timestamp[0] == 'D') Index: src/version.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/version.c,v retrieving revision 1.1.1.13 retrieving revision 1.1.1.14 diff -u -p -r1.1.1.13 -r1.1.1.14 --- src/version.c 2 Dec 2002 03:13:37 -0000 1.1.1.13 +++ src/version.c 26 Dec 2007 03:55:03 -0000 1.1.1.14 @@ -1,8 +1,12 @@ /* - * Copyright (c) 1994 david d `zoo' zuhn - * Copyright (c) 1994 Free Software Foundation, Inc. - * Copyright (c) 1992, Brian Berliner and Jeff Polk - * Copyright (c) 1989-1992, Brian Berliner + * Copyright (C) 1986-2005 The Free Software Foundation, Inc. + * + * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , + * and others. + * + * Portions Copyright (C) 1994 david d `zoo' zuhn + * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk + * Portions Copyright (C) 1989-1992, Brian Berliner * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with this CVS source distribution. @@ -53,10 +57,8 @@ version (argc, argv) if (argc == -1) usage (version_usage); -#ifdef CLIENT_SUPPORT if (current_parsed_root && current_parsed_root->isremote) (void) fputs ("Client: ", stdout); -#endif /* Having the year here is a good idea, so people have some idea of how long ago their version of CVS was Index: src/watch.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/watch.c,v retrieving revision 1.1.1.10 retrieving revision 1.1.1.11 diff -u -p -r1.1.1.10 -r1.1.1.11 --- src/watch.c 15 Apr 2004 01:01:55 -0000 1.1.1.10 +++ src/watch.c 26 Dec 2007 03:55:03 -0000 1.1.1.11 @@ -18,14 +18,13 @@ const char *const watch_usage[] = { "Usage: %s %s {on|off|add|remove} [-lR] [-a ]... []...\n", - "on/off: turn on/off read-only checkouts of files\n", - "add/remove: add or remove notification on actions\n", - "-l (on/off/add/remove): Local directory only, not recursive\n", - "-R (on/off/add/remove): Process directories recursively (default)\n", - "-a (add/remove): Specify what actions, one of\n", - " edit,unedit,commit,all,none (defaults to all, multiple -a\n", - " options are permitted)\n", - "(Specify the --help global option for a list of other help options)\n", + "on/off: Turn on/off read-only checkouts of files.\n", + "add/remove: Add or remove notification on actions.\n", + "-l (on/off/add/remove): Local directory only, not recursive.\n", + "-R (on/off/add/remove): Process directories recursively (default).\n", + "-a (add/remove): Specify what actions, one of: `edit', `unedit',\n", + " `commit', `all', or `none' (defaults to `all').\n", + "(Specify the --help global option for a list of other help options.)\n", NULL }; @@ -407,10 +406,10 @@ watch (argc, argv) static const char *const watchers_usage[] = { - "Usage: %s %s [-lR] [files...]\n", - "\t-l\tProcess this directory only (not recursive).\n", - "\t-R\tProcess directories recursively.\n", - "(Specify the --help global option for a list of other help options)\n", + "Usage: %s %s [-lR] []...\n", + "-l\tProcess this directory only (not recursive).\n", + "-R\tProcess directories recursively (default).\n", + "(Specify the --help global option for a list of other help options.)\n", NULL }; Index: src/wrapper.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/wrapper.c,v retrieving revision 1.1.1.12 retrieving revision 1.1.1.13 diff -u -p -r1.1.1.12 -r1.1.1.13 --- src/wrapper.c 10 Jun 2004 19:05:38 -0000 1.1.1.12 +++ src/wrapper.c 26 Dec 2007 03:55:03 -0000 1.1.1.13 @@ -93,9 +93,7 @@ void wrap_setup() else wrap_setup_already_done = 1; -#ifdef CLIENT_SUPPORT if (!current_parsed_root->isremote) -#endif { char *file; @@ -240,6 +238,7 @@ wrap_unparse_rcs_options (line, first_ca * Remove fmt str specifier other than %% or %s. And allow * only max_s %s specifiers */ +void wrap_clean_fmt_str(char *fmt, int max_s) { while (*fmt) { @@ -257,7 +256,6 @@ wrap_clean_fmt_str(char *fmt, int max_s) } fmt++; } - return; } /* @@ -418,7 +416,8 @@ wrap_add (line, isTemp) switch(opt){ case 'f': /* Before this is reenabled, need to address the problem in - commit.c (see http://www.cvshome.org/docs/infowrapper.html). */ + commit.c (see + http://ximbiot.com/cvs/cvshome/docs/infowrapper.html). */ error (1, 0, "-t/-f wrappers not supported by this version of CVS"); @@ -432,7 +431,8 @@ wrap_add (line, isTemp) break; case 't': /* Before this is reenabled, need to address the problem in - commit.c (see http://www.cvshome.org/docs/infowrapper.html). */ + commit.c (see + http://ximbiot.com/cvs/cvshome/docs/infowrapper.html). */ error (1, 0, "-t/-f wrappers not supported by this version of CVS"); Index: src/zlib.c =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/src/zlib.c,v retrieving revision 1.1.1.7 retrieving revision 1.1.1.8 diff -u -p -r1.1.1.7 -r1.1.1.8 --- src/zlib.c 15 Apr 2004 01:01:55 -0000 1.1.1.7 +++ src/zlib.c 26 Dec 2007 03:55:03 -0000 1.1.1.8 @@ -361,18 +361,10 @@ compress_buffer_shutdown_input (buf) struct compress_buffer *cb = (struct compress_buffer *) buf->closure; int zstatus; - /* Pick up any trailing data, such as the checksum. */ - while (1) - { - int status, nread; - char buf[100]; - - status = compress_buffer_input (cb, buf, 0, sizeof buf, &nread); - if (status == -1) - break; - if (status != 0) - return status; - } + /* Don't make any attempt to pick up trailing data since we are shutting + * down. If the client doesn't know we are shutting down, we might not + * see the EOF we are expecting. + */ zstatus = inflateEnd (&cb->zstr); if (zstatus != Z_OK) Index: tools/ChangeLog =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/tools/ChangeLog,v retrieving revision 1.1.1.8 retrieving revision 1.1.1.9 diff -u -p -r1.1.1.8 -r1.1.1.9 --- tools/ChangeLog 15 Apr 2004 01:01:56 -0000 1.1.1.8 +++ tools/ChangeLog 26 Dec 2007 03:55:05 -0000 1.1.1.9 @@ -1,3 +1,13 @@ +2005-09-01 Derek Price + + * README: Correct grammar. + + * README: Update links. + +2005-01-31 Derek Price + + * Makefile.am: Update copyright notices. + 2003-05-21 Derek Price * Makefile.in: Regenerate with Automake version 1.7.5. Index: tools/Makefile.am =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/tools/Makefile.am,v retrieving revision 1.1.1.2 retrieving revision 1.1.1.3 diff -u -p -r1.1.1.2 -r1.1.1.3 --- tools/Makefile.am 15 Apr 2004 01:01:56 -0000 1.1.1.2 +++ tools/Makefile.am 26 Dec 2007 03:55:05 -0000 1.1.1.3 @@ -1,8 +1,10 @@ ## Process this file with automake to produce Makefile.in # Makefile for GNU CVS auxiliary tools. -# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, -# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. +# +# Copyright (C) 1986-2005 The Free Software Foundation, Inc. +# +# Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , +# and others. # 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 Index: tools/Makefile.in =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/tools/Makefile.in,v retrieving revision 1.1.1.8 retrieving revision 1.1.1.9 diff -u -p -r1.1.1.8 -r1.1.1.9 --- tools/Makefile.in 15 Apr 2004 01:01:56 -0000 1.1.1.8 +++ tools/Makefile.in 26 Dec 2007 03:55:05 -0000 1.1.1.9 @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.7.9 from Makefile.am. +# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ -# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,9 +15,11 @@ @SET_MAKE@ # Makefile for GNU CVS auxiliary tools. -# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, -# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. +# +# Copyright (C) 1986-2005 The Free Software Foundation, Inc. +# +# Portions Copyright (C) 1998-2005 Derek Price, Ximbiot , +# and others. # 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 @@ -28,7 +30,6 @@ # 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. - srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -36,7 +37,6 @@ 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 @@ -50,6 +50,20 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +subdir = tools +DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + ChangeLog +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ @@ -119,6 +133,8 @@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ @@ -132,6 +148,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ +mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ @@ -139,25 +156,42 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ - +with_default_rsh = @with_default_rsh@ EXTRA_DIST = \ README .cvsignore -subdir = tools -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -DIST_SOURCES = -DIST_COMMON = README $(srcdir)/Makefile.in ChangeLog Makefile.am all: all-am .SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu tools/Makefile -Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh uninstall-info-am: tags: TAGS TAGS: @@ -165,10 +199,6 @@ TAGS: ctags: CTAGS CTAGS: -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - -top_distdir = .. -distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ @@ -182,7 +212,7 @@ distdir: $(DISTFILES) dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ - $(mkinstalldirs) "$(distdir)$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ @@ -200,7 +230,6 @@ distdir: $(DISTFILES) check-am: all-am check: check-am all-am: Makefile - installdirs: install: install-am install-exec: install-exec-am @@ -221,7 +250,7 @@ mostlyclean-generic: clean-generic: distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -238,6 +267,8 @@ dvi: dvi-am dvi-am: +html: html-am + info: info-am info-am: @@ -271,8 +302,8 @@ ps-am: uninstall-am: uninstall-info-am .PHONY: all all-am check check-am clean clean-generic distclean \ - distclean-generic distdir dvi dvi-am info info-am install \ - install-am install-data install-data-am install-exec \ + distclean-generic distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ Index: tools/README =================================================================== RCS file: /home/obrien/Cvs/cvs/contrib/cvs/tools/README,v retrieving revision 1.1.1.3 retrieving revision 1.1.1.4 diff -u -p -r1.1.1.3 -r1.1.1.4 --- tools/README 2 Sep 2002 05:50:28 -0000 1.1.1.3 +++ tools/README 26 Dec 2007 03:55:05 -0000 1.1.1.4 @@ -5,7 +5,6 @@ Pcl-cvs is an Emacs interface to CVS. If you are looking for pcl-cvs, we'd suggest pcl-cvs version 2.x, at: ftp://ftp.weird.com/pub/local/ -Both of the following CVS sites have a page about pcl-cvs: - http://www.loria.fr/~molli/cvs-index.html - http://cvshome.org/ -They also have much information about CVS tools more generally. +The following CVS site has a page about pcl-cvs: + http://ximbiot.com +It also has much information about CVS tools more generally.