aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--devel/cvs-devel/Makefile34
-rw-r--r--devel/cvs-devel/distinfo9
-rw-r--r--devel/cvs-devel/files/patch-64bit_crashfix15
-rw-r--r--devel/cvs-devel/files/patch-DSA_external_passwd_file388
-rw-r--r--devel/cvs-devel/files/patch-PAM_support144
-rw-r--r--devel/cvs-devel/files/patch-PATH_MAX_check27
-rw-r--r--devel/cvs-devel/files/patch-check_method_crash21
-rw-r--r--devel/cvs-devel/files/patch-contrib-Makefile.in10
-rw-r--r--devel/cvs-devel/files/patch-copyright44
-rw-r--r--devel/cvs-devel/files/patch-cvs-repouid-0.1111
-rw-r--r--devel/cvs-devel/files/patch-cvs.info.typo58
-rw-r--r--devel/cvs-devel/files/patch-cvsbug_tmpfix22
-rw-r--r--devel/cvs-devel/files/patch-cvsrc_whitespace37
-rw-r--r--devel/cvs-devel/files/patch-date_format_option151
-rw-r--r--devel/cvs-devel/files/patch-ext_expansion29
-rw-r--r--devel/cvs-devel/files/patch-extra_tags29
-rw-r--r--devel/cvs-devel/files/patch-fix_-l26
-rw-r--r--devel/cvs-devel/files/patch-fix_sparc_sigbus30
-rw-r--r--devel/cvs-devel/files/patch-flag_conflicted_copies21
-rw-r--r--devel/cvs-devel/files/patch-freebsdlocal4062
-rw-r--r--devel/cvs-devel/files/patch-history_val-tag_world_writeable31
-rw-r--r--devel/cvs-devel/files/patch-homedir44
-rw-r--r--devel/cvs-devel/files/patch-import-n-X15
-rw-r--r--devel/cvs-devel/files/patch-keyword_alphanumerics27
-rw-r--r--devel/cvs-devel/files/patch-lib-Makefile.in37
-rw-r--r--devel/cvs-devel/files/patch-login_cvspass_message19
-rw-r--r--devel/cvs-devel/files/patch-newlines_in_commit_template32
-rw-r--r--devel/cvs-devel/files/patch-normalize_correct_roots34
-rw-r--r--devel/cvs-devel/files/patch-parseopts108
-rw-r--r--devel/cvs-devel/files/patch-rcs2log_POSIX_sort15
-rw-r--r--devel/cvs-devel/files/patch-remove_-R_warning21
-rw-r--r--devel/cvs-devel/files/patch-rsc2log_fix49
-rw-r--r--devel/cvs-devel/files/patch-server_wrapper51
-rw-r--r--devel/cvs-devel/files/patch-src-Makefile.in63
-rw-r--r--devel/cvs-devel/files/patch-zlib-read-compressed11
-rw-r--r--devel/cvs-devel/pkg-descr3
-rw-r--r--devel/cvs-devel/pkg-plist12
37 files changed, 1639 insertions, 4201 deletions
diff --git a/devel/cvs-devel/Makefile b/devel/cvs-devel/Makefile
index 3fea9c752c9a..3ea01445dcbb 100644
--- a/devel/cvs-devel/Makefile
+++ b/devel/cvs-devel/Makefile
@@ -1,30 +1,25 @@
-# New ports collection makefile for: cvs+ipv6
-# Date created: Tue Jul 23 11:24:24 JST 2002
-# Whom: sumikawa
+# New ports collection makefile for: cvs-devel
+# Date created: Wed, 14 Nov 2007 00:21:45 +0530
+# Whom: Balwinder S Dheeman <bdheeman@gmail.com>
#
# $FreeBSD$
#
PORTNAME= cvs
-PORTVERSION= 1.11.17
-PORTREVISION= 1
+PORTVERSION= 1.12.13
+PORTREVISION= 8
CATEGORIES= devel ipv6
MASTER_SITES= ${MASTER_SITE_GNU}
-MASTER_SITE_SUBDIR= non-gnu/${PORTNAME}/source/stable/${PORTVERSION}
-PKGNAMESUFFIX= +ipv6
+MASTER_SITE_SUBDIR= non-gnu/${PORTNAME}/source/feature/${PORTVERSION}
+PKGNAMESUFFIX= -devel
-PATCH_SITES= ftp://ftp.kame.net/pub/kame/misc/
-PATCHFILES= ${DISTNAME}-v6-20040610.diff.gz
-PATCH_DIST_STRIP= -p1
-
-MAINTAINER= sumikawa@FreeBSD.org
+MAINTAINER= bdheeman@gmail.com
COMMENT= IPv6 enabled cvs. You can use IPv6 connection when using pserver
-CONFLICTS= cvsnt-[12]*
+CONFLICTS= cvsnt-[12]* cvs+ipv6-[12]*
GNU_CONFIGURE= yes
USE_BZIP2= yes
-#USE_GMAKE= yes
CONFIGURE_ARGS= --enable-ipv6 --without-gssapi \
--with-editor="vi" \
--with-tmpdir="/tmp"
@@ -35,16 +30,17 @@ MAN8= cvsbug.8
INFO= cvs cvsclient
CVS_SITE?= :pserver:anoncvs@anoncvs.jp.FreeBSD.org:/home/ncvs
-CVS_VER?= v${PORTVERSION:S/./_/g}
+CVS_VER?= v${PORTVERSION:S//_/g}
post-patch:
- ${REINPLACE_CMD} 's/${PORTVERSION:S/./\./g}/&+IPv6/g' ${WRKSRC}/configure
+ ${REINPLACE_CMD} 's/${PORTVERSION:S/./\./g}/&-devel/g' \
+ ${WRKSRC}/configure
@${CP} ${FILESDIR}/missing ${WRKSRC}
-replace:
+post-install:
.for f in cvs cvsbug
- ${MV} /usr/bin/${f} /usr/bin/${f}.orig
- ${CP} -p ${PREFIX}/bin/${f} /usr/bin/
+ -${MV} ${PREFIX:S/\/local//}/bin/${f} ${PREFIX:S/\/local//}/bin/${f}.orig
+ -${CP} -p ${PREFIX}/bin/${f} ${PREFIX:S/\/local//}/bin
.endfor
generate-patch:
diff --git a/devel/cvs-devel/distinfo b/devel/cvs-devel/distinfo
index a26948f129f8..9ed329875137 100644
--- a/devel/cvs-devel/distinfo
+++ b/devel/cvs-devel/distinfo
@@ -1,6 +1,3 @@
-MD5 (cvs-1.11.17.tar.bz2) = 17cd48888d5571d215a44a7e8d46759c
-SHA256 (cvs-1.11.17.tar.bz2) = a5486a3224140e7bd94ba77c5f690da8142fa9ee241e1a75612d6228c459e97e
-SIZE (cvs-1.11.17.tar.bz2) = 2343366
-MD5 (cvs-1.11.17-v6-20040610.diff.gz) = 29b341c7b619c7c86751a7ee2e8eca02
-SHA256 (cvs-1.11.17-v6-20040610.diff.gz) = 16aa61329485fbd94c3a2c117e49ee99612f5f0281e9a85c13c22349e39eed11
-SIZE (cvs-1.11.17-v6-20040610.diff.gz) = 12807
+MD5 (cvs-1.12.13.tar.bz2) = 956ab476ce276c2d19d583e227dbdbea
+SHA256 (cvs-1.12.13.tar.bz2) = 78853613b9a6873a30e1cc2417f738c330e75f887afdaf7b3d0800cb19ca515e
+SIZE (cvs-1.12.13.tar.bz2) = 3911104
diff --git a/devel/cvs-devel/files/patch-64bit_crashfix b/devel/cvs-devel/files/patch-64bit_crashfix
new file mode 100644
index 000000000000..15ec55410c57
--- /dev/null
+++ b/devel/cvs-devel/files/patch-64bit_crashfix
@@ -0,0 +1,15 @@
+# Fix a 64-bit crash in the entries_time() function and another bug in
+# the diff code. Thanks to Gabor Gombas for the patch. Closes:
+# #329127.
+diff -Nur diff/util.c diff/util.c
+--- diff/util.c 2003-02-03 03:52:38.000000000 +0800
++++ diff/util.c 2006-02-26 21:32:22.000000000 +0800
+@@ -235,7 +235,7 @@
+ close (pipes[0]);
+ }
+
+- execl (PR_PROGRAM, PR_PROGRAM, "-f", "-h", name, 0);
++ execl (PR_PROGRAM, PR_PROGRAM, "-f", "-h", name, NULL);
+ pfatal_with_name (PR_PROGRAM);
+ }
+ else
diff --git a/devel/cvs-devel/files/patch-DSA_external_passwd_file b/devel/cvs-devel/files/patch-DSA_external_passwd_file
new file mode 100644
index 000000000000..f7d21bfb65ef
--- /dev/null
+++ b/devel/cvs-devel/files/patch-DSA_external_passwd_file
@@ -0,0 +1,388 @@
+# Add support for overriding lookups in CVSROOT/passwd
+# Specify --password-file <file> on the pserver command line to use it
+# Initial patch from the Debian DSA team, adapted by Steve McIntyre.
+# See README.Debian for more details.
+diff -Nur src/cvs.h src/cvs.h
+--- src/cvs.h 2005-10-02 16:17:20.000000000 +0100
++++ src/cvs.h 2006-08-19 01:20:33.000000000 +0100
+@@ -371,6 +371,7 @@
+ extern int use_editor;
+ extern int cvswrite;
+ extern mode_t cvsumask;
++extern char *PasswordFileName;
+
+ /* Temp dir abstraction. */
+ /* From main.c. */
+diff -Nur src/main.c src/main.c
+--- src/main.c 2006-08-17 00:25:16.000000000 +0100
++++ src/main.c 2006-08-19 01:20:03.000000000 +0100
+@@ -43,8 +43,7 @@
+ int noexec = 0;
+ int readonlyfs = 0;
+ int logoff = 0;
+-
+-
++char *PasswordFileName = NULL;
+
+ /***
+ ***
+@@ -519,6 +518,7 @@
+ {"help-commands", 0, NULL, 1},
+ {"help-synonyms", 0, NULL, 2},
+ {"help-options", 0, NULL, 4},
++ {"password-file", required_argument, NULL, 5},
+ #ifdef SERVER_SUPPORT
+ {"allow-root", required_argument, NULL, 3},
+ #endif /* SERVER_SUPPORT */
+@@ -646,6 +646,10 @@
+ root_allow_add (optarg, gConfigPath);
+ break;
+ #endif /* SERVER_SUPPORT */
++ case 5:
++ /* --password-file */
++ PasswordFileName = xstrdup(optarg);
++ break;
+ case 'Q':
+ really_quiet = 1;
+ /* FALL THROUGH */
+diff -Nur src/Makefile.in src/Makefile.in
+--- src/Makefile.in 2005-10-03 14:37:18.000000000 +0100
++++ src/Makefile.in 2006-08-17 00:28:35.000000000 +0100
+@@ -146,7 +146,7 @@
+ ls.$(OBJEXT) main.$(OBJEXT) mkmodules.$(OBJEXT) \
+ modules.$(OBJEXT) ms-buffer.$(OBJEXT) myndbm.$(OBJEXT) \
+ no_diff.$(OBJEXT) parseinfo.$(OBJEXT) patch.$(OBJEXT) \
+- rcs.$(OBJEXT) rcscmds.$(OBJEXT) recurse.$(OBJEXT) \
++ rcs.$(OBJEXT) rcscmds.$(OBJEXT) readpw.$(OBJEXT) recurse.$(OBJEXT) \
+ release.$(OBJEXT) remove.$(OBJEXT) repos.$(OBJEXT) \
+ root.$(OBJEXT) rsh-client.$(OBJEXT) run.$(OBJEXT) \
+ scramble.$(OBJEXT) server.$(OBJEXT) stack.$(OBJEXT) \
+@@ -349,6 +349,7 @@
+ patch.c \
+ rcs.c \
+ rcscmds.c \
++ readpw.c \
+ recurse.c \
+ release.c \
+ remove.c \
+@@ -543,6 +544,7 @@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/patch.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rcs.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rcscmds.Po@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readpw.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/recurse.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/release.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remove.Po@am__quote@
+diff -Nur src/parseinfo.h src/parseinfo.h
+--- src/parseinfo.h 2006-08-17 00:25:16.000000000 +0100
++++ src/parseinfo.h 2006-08-17 00:58:25.000000000 +0100
+@@ -21,6 +21,7 @@
+ char *HistoryLogPath;
+ char *HistorySearchPath;
+ char *TmpDir;
++ char *PasswordFileName;
+
+ /* Should the logmsg be re-read during the do_verify phase?
+ * RereadLogAfterVerify=no|stat|yes
+diff -Nur src/readpw.c src/readpw.c
+--- src/readpw.c 1970-01-01 01:00:00.000000000 +0100
++++ src/readpw.c 2006-08-19 01:45:26.000000000 +0100
+@@ -0,0 +1,158 @@
++/*
++ readpw.c - read the CVS password from an external file
++ Copyright (c) 2006 Martin Schulze <joey@infodrom.org>
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software
++ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++*/
++
++#include <string.h>
++#include <stdio.h>
++#include <errno.h>
++#include <syslog.h>
++
++#define PWFILE "/tmp/work/cvs/cvs.passwd"
++
++/*
++ * Source: control_nextline() in dtaus.c from dtaus
++ */
++size_t readline (FILE *f, char **buf, unsigned int len)
++{
++ char line[100];
++ char tmp[100];
++ char *cp;
++ int i;
++
++ memset (line, 0, sizeof(line));
++ memset (*buf, 0, len);
++
++ cp = line;
++
++ while (!strlen(line) && (cp = fgets(line, 100, f))) {
++ if (strlen(line)) {
++ if (line[0] != '#') {
++ if (line[strlen(line)-1] != '\n') {
++ strcpy(tmp, line);
++ while (tmp[strlen(tmp)-1] != '\n' && (cp = fgets(tmp, 100, f)));
++ } else
++ line[strlen(line)-1] = '\0';
++ if (line[strlen(line)-1] == '\r')
++ line[strlen(line)-1] = '\0';
++ for (i=strlen(line);(line[i-1] == ' '||line[i-1] == '\t')&&i>0; i--)
++ line[i-1] = '\0';
++ } else
++ line[0] = '\0';
++ }
++ }
++ for (cp=line; *cp==' '; cp++);
++
++ if (strlen(cp)) {
++ memcpy(*buf, cp, strlen(cp) >= len ? len-1 : strlen(cp));
++ return (strlen (cp));
++ } else
++ return 0;
++}
++
++#define MAXLINE 100
++#define PWLEN 20
++
++char *getpwline (const char *fname, const char *repository, const char *logname)
++{
++ FILE *f;
++ char buf[MAXLINE], *bp = buf;
++ static char line[MAXLINE];
++ int inrepo = 0;
++ char *cp;
++
++ memset (line, 0, sizeof (line));
++
++ if ((f = fopen (fname, "r")) == NULL) {
++ perror ("fopen");
++ return line;
++ }
++
++ while (readline (f, &bp, 50)) {
++ if (buf[0] == '/') {
++ syslog(LOG_ERR, "Looking for repo %s in %s\n", repository, buf);
++ if (!inrepo && !strcmp (buf, repository))
++ {
++ syslog(LOG_ERR, "matched repository %s\n", repository);
++ inrepo = 1;
++ }
++ else if (inrepo)
++ inrepo = 0;
++ } else {
++ if (inrepo) {
++ if ((cp = strchr (buf, ':')) != NULL) {
++ if ( (cp - buf) == strlen (logname)
++ && !strncmp (buf, logname, strlen (logname))) {
++ memcpy (line, buf, strlen(buf) >= MAXLINE ? MAXLINE-1 : strlen(buf));
++ }
++ }
++ }
++ }
++ }
++
++ if (ferror (f))
++ perror ("ferror");
++ if (fclose (f) < 0)
++ perror ("fclose");
++
++ return line;
++}
++
++/*
++*****************************************************************
++ */
++#ifdef TEST_READPW
++
++void getpasswd (const char *fname, const char *repository, const char *logname, char **pw, char **user)
++{
++ char *line;
++ char *cp, *xp;
++
++ memset (*pw, 0, PWLEN);
++ memset (*user, 0, PWLEN);
++
++ line = getpwline(fname, repository, logname);
++
++ if (line[0] == '\0')
++ return;
++
++ cp = strchr (line, ':');
++ cp++;
++
++ if ((xp = strchr (cp, ':')) != NULL) {
++ memcpy (*pw, cp, xp-cp >= PWLEN ? PWLEN-1 : xp-cp);
++
++ xp++;
++
++ if (strlen (xp))
++ memcpy (*user, xp, strlen(xp) >= PWLEN ? PWLEN-1 : strlen(xp));
++ }
++}
++
++int main ()
++{
++ char pw[PWLEN], *ppw = pw;
++ char cvsuser[PWLEN], *pcu = cvsuser;
++
++ getpasswd (PWFILE, "/cvs/debian-doc", "jseidel", &ppw, &pcu);
++
++ printf ("%s<:>%s\n", pw, cvsuser);
++ printf ("XXXXXXXXXXXXX\n");
++
++ return 0;
++}
++#endif /*TEST_READPW */
+diff -Nur src/server.c src/server.c
+--- src/server.c 2006-08-17 00:25:16.000000000 +0100
++++ src/server.c 2006-08-20 00:31:22.000000000 +0100
+@@ -22,6 +22,8 @@
+
+ int server_active = 0;
+
++char *getpwline (const char *fname, const char *repository, const char *logname);
++
+ #if defined (SERVER_SUPPORT) || defined (CLIENT_SUPPORT)
+
+ # include "log-buffer.h"
+@@ -6689,51 +6691,71 @@
+ {
+ int retval = 0;
+ FILE *fp;
+- char *filename;
++ char *filename = NULL;
++ char *cp;
+ char *linebuf = NULL;
+ size_t linebuf_len;
+ int found_it = 0;
+ int namelen;
+
+- /* We don't use current_parsed_root->directory because it hasn't been
+- * set yet -- our `repository' argument came from the authentication
+- * protocol, not the regular CVS protocol.
+- */
+-
+- filename = xmalloc (strlen (repository)
+- + 1
+- + strlen (CVSROOTADM)
+- + 1
+- + strlen (CVSROOTADM_PASSWD)
+- + 1);
++ if (!PasswordFileName)
++ {
++ /* We don't use current_parsed_root->directory because it hasn't been
++ * set yet -- our `repository' argument came from the authentication
++ * protocol, not the regular CVS protocol.
++ */
++
++ filename = xmalloc (strlen (repository)
++ + 1
++ + strlen (CVSROOTADM)
++ + 1
++ + strlen (CVSROOTADM_PASSWD)
++ + 1);
+
+- (void) sprintf (filename, "%s/%s/%s", repository,
+- CVSROOTADM, CVSROOTADM_PASSWD);
++ (void) sprintf (filename, "%s/%s/%s", repository,
++ CVSROOTADM, CVSROOTADM_PASSWD);
+
+- fp = CVS_FOPEN (filename, "r");
+- if (fp == NULL)
+- {
+- if (!existence_error (errno))
+- error (0, errno, "cannot open %s", filename);
+- free (filename);
+- return 0;
+- }
++ fp = CVS_FOPEN (filename, "r");
++ if (fp == NULL)
++ {
++ if (!existence_error (errno))
++ error (0, errno, "cannot open %s", filename);
++ free (filename);
++ return 0;
++ }
+
+- /* Look for a relevant line -- one with this user's name. */
+- namelen = strlen (username);
+- while (getline (&linebuf, &linebuf_len, fp) >= 0)
+- {
+- if ((strncmp (linebuf, username, namelen) == 0)
+- && (linebuf[namelen] == ':'))
+- {
+- found_it = 1;
+- break;
+- }
++ /* Look for a relevant line -- one with this user's name. */
++ namelen = strlen (username);
++ while (getline (&linebuf, &linebuf_len, fp) >= 0)
++ {
++ if ((strncmp (linebuf, username, namelen) == 0)
++ && (linebuf[namelen] == ':'))
++ {
++ found_it = 1;
++ break;
++ }
++ }
++ if (ferror (fp))
++ error (0, errno, "cannot read %s", filename);
++ if (fclose (fp) < 0)
++ error (0, errno, "cannot close %s", filename);
++ }
++ else /* DSA_VERSION */
++ {
++ namelen = strlen (username);
++
++ cp = getpwline (PasswordFileName, repository, username);
++ /* syslog (LOG_NOTICE, "cp=%s", cp); */
++ if (strlen (cp)) {
++ linebuf = xmalloc (strlen (cp) + 1);
++ memcpy (linebuf, cp, strlen(cp)+1);
++ /* syslog (LOG_NOTICE, "line=%s", linebuf); */
++ found_it = 1;
++ } else
++ found_it = 0;
++
++ /* syslog (LOG_NOTICE, "username=%s, password=%s, repository=%s", username, password, repository); */
+ }
+- if (ferror (fp))
+- error (0, errno, "cannot read %s", filename);
+- if (fclose (fp) < 0)
+- error (0, errno, "cannot close %s", filename);
+
+ /* If found_it, then linebuf contains the information we need. */
+ if (found_it)
+@@ -6823,6 +6845,7 @@
+ retval = 0;
+ }
+
++ if (filename)
+ free (filename);
+ if (linebuf)
+ free (linebuf);
+@@ -7043,7 +7066,10 @@
+ letting you in if it won't say why, and I am not convinced
+ that the potential information disclosure to an attacker
+ outweighs this. */
+- printf ("error 0 no such user %s in CVSROOT/passwd\n", username);
++ if (PasswordFileName)
++ printf ("error 0 no such user %s in %s\n", username, PasswordFileName);
++ else
++ printf ("error 0 no such user %s in CVSROOT/passwd\n", username);
+
+ exit (EXIT_FAILURE);
+ }
diff --git a/devel/cvs-devel/files/patch-PAM_support b/devel/cvs-devel/files/patch-PAM_support
new file mode 100644
index 000000000000..4b37c20fc7b0
--- /dev/null
+++ b/devel/cvs-devel/files/patch-PAM_support
@@ -0,0 +1,144 @@
+#
+# Add in extra PAM options compared to upstream's own PAM code:
+# * Add an extra option PamAuth to control use of PAM separately from
+# SystemAuth
+# * Add support for DefaultPamUser - try that if the specified
+# user does not exist
+#
+# Patch by Steve McIntyre <steve@einval.com>
+diff -Nur doc/cvs.texinfo doc/cvs.texinfo
+--- doc/cvs.texinfo 2005-09-23 03:02:53.000000000 +0100
++++ doc/cvs.texinfo 2006-05-19 23:50:10.000000000 +0100
+@@ -2662,8 +2662,18 @@
+ system has PAM (Pluggable Authentication Modules)
+ and your @sc{cvs} server executable was configured to
+ use it at compile time (using @code{./configure --enable-pam} - see the
+-INSTALL file for more). In this case, PAM will be consulted instead.
+-This means that @sc{cvs} can be configured to use any password
++INSTALL file for more). In this case, PAM may be
++consulted first (or instead). The
++"fallback" behaviour can be controlled using the two
++variables @code{PamAuth} and @code{SystemAuth}. On a
++Debian system, @code{PamAuth} defaults to @code{yes}
++and @code{SystemAuth} to @code{no} - after all, PAM can
++supports passwd file lookups itself. Changing these is
++possible by setting @code{PamAuth=no} and
++@code{SystemAuth=yes} in the @sc{cvs} @file{config}
++file, @pxref{config}).
++
++Use of PAM means that @sc{cvs} can be configured to use any password
+ authentication source PAM can be configured to use (possibilities
+ include a simple UNIX password, NIS, LDAP, and others) in its
+ global configuration file (usually @file{/etc/pam.conf}
+@@ -2691,7 +2701,7 @@
+ cvs session required pam_unix.so
+ @end example
+
+-The the equivalent @file{/etc/pam.d/cvs} would contain
++The equivalent @file{/etc/pam.d/cvs} would contain
+
+ @example
+ auth required pam_unix.so
+@@ -2715,6 +2725,13 @@
+ feature should not be used if you may not have control of the name
+ @sc{cvs} will be invoked as.
+
++If you wish to use PAM for authentication, and details
++of your users are not available using getpwnam(), you
++may set a default name for the account on the server
++that will be used after authentication. To do this,
++either set @code{DefaultPamUser=user} in the @sc{cvs}
++@file{config} file, @pxref{config}.
++
+ Be aware, also, that falling back to system
+ authentication might be a security risk: @sc{cvs}
+ operations would then be authenticated with that user's
+diff -Nur src/parseinfo.c src/parseinfo.c
+--- src/parseinfo.c 2005-09-06 05:40:37.000000000 +0100
++++ src/parseinfo.c 2006-05-19 22:46:00.000000000 +0100
+@@ -303,8 +303,12 @@
+ */
+ #endif /* PROXY_SUPPORT */
+ #ifdef AUTH_SERVER_SUPPORT
+- new->system_auth = true;
++ new->system_auth = false;
+ #endif /* AUTH_SERVER_SUPPORT */
++#ifdef HAVE_PAM
++ new->PamAuth = true;
++ new->DefaultPamUser = NULL;
++#endif
+
+ return new;
+ }
+@@ -696,6 +700,13 @@
+ readSizeT (infopath, "MaxCompressionLevel", p,
+ &retval->MaxCompressionLevel);
+ #endif /* SERVER_SUPPORT */
++#ifdef HAVE_PAM
++ else if (!strcmp (line, "DefaultPamUser"))
++ retval->DefaultPamUser = xstrdup(p);
++ else if (!strcmp (line, "PamAuth"))
++ readBool (infopath, "PamAuth", p,
++ &retval->PamAuth);
++#endif
+ else
+ /* We may be dealing with a keyword which was added in a
+ subsequent version of CVS. In that case it is a good idea
+diff -Nur src/parseinfo.h src/parseinfo.h
+--- src/parseinfo.h 2005-09-05 04:03:38.000000000 +0100
++++ src/parseinfo.h 2006-05-19 22:40:31.000000000 +0100
+@@ -59,6 +59,10 @@
+ #ifdef PRESERVE_PERMISSIONS_SUPPORT
+ bool preserve_perms;
+ #endif /* PRESERVE_PERMISSIONS_SUPPORT */
++#ifdef HAVE_PAM
++ char *DefaultPamUser;
++ bool PamAuth;
++#endif
+ };
+
+ bool parse_error (const char *, unsigned int);
+diff -Nur src/server.c src/server.c
+--- src/server.c 2005-09-28 16:25:59.000000000 +0100
++++ src/server.c 2006-05-20 00:45:14.000000000 +0100
+@@ -6919,6 +6919,15 @@
+ {
+ pam_stage = "get pam user";
+ retval = pam_get_item (pamh, PAM_USER, (const void **)username);
++ if ((retval != PAM_SUCCESS) && (NULL != config->DefaultPamUser))
++ {
++ /* An issue with using pam is that the host may well not have
++ a local user entry to match the authenticated user. If this
++ has failed, optionally fall back to a specified local
++ username */
++ *username = xstrdup(config->DefaultPamUser);
++ retval = PAM_SUCCESS;
++ }
+ }
+
+ if (retval != PAM_SUCCESS)
+@@ -7022,7 +7031,11 @@
+
+ assert (rc == 0);
+
++#ifdef HAVE_PAM
++ if (!config->system_auth && !config->PamAuth)
++#else
+ if (!config->system_auth)
++#endif
+ {
+ /* Note that the message _does_ distinguish between the case in
+ which we check for a system password and the case in which
+@@ -7037,9 +7050,10 @@
+
+ /* No cvs password found, so try /etc/passwd. */
+ #ifdef HAVE_PAM
+- if (check_pam_password (&username, password))
++ if ( (config->PamAuth && check_pam_password (&username, password)) ||
++ (config->system_auth && check_system_password (username, password)))
+ #else /* !HAVE_PAM */
+- if (check_system_password (username, password))
++ if (config->system_auth && check_system_password (username, password))
+ #endif /* HAVE_PAM */
+ host_user = xstrdup (username);
+ else
diff --git a/devel/cvs-devel/files/patch-PATH_MAX_check b/devel/cvs-devel/files/patch-PATH_MAX_check
new file mode 100644
index 000000000000..0af532bd4bc6
--- /dev/null
+++ b/devel/cvs-devel/files/patch-PATH_MAX_check
@@ -0,0 +1,27 @@
+# Fix FTBFS in hurd-i386 regarding bad check of PATH_MAX.
+# Closes: #378966
+# Thanks to Cyril Brulebois <cyril.brulebois@enst-bretagne.fr>
+diff -Nur lib/chdir-long.c lib/chdir-long.c
+--- lib/chdir-long.c 2005-09-19 21:12:18.000000000 +0000
++++ lib/chdir-long.c 2006-07-20 02:47:32.000000000 +0000
+@@ -39,9 +39,7 @@
+ # define O_DIRECTORY 0
+ #endif
+
+-#ifndef PATH_MAX
+-# error "compile this file only if your system defines PATH_MAX"
+-#endif
++#ifdef PATH_MAX
+
+ struct cd_buf
+ {
+@@ -269,6 +267,8 @@
+ }
+ #endif
+
++#endif /* PATH_MAX */
++
+ /*
+ Local Variables:
+ compile-command: "gcc -DTEST_CHDIR=1 -DHAVE_CONFIG_H -I.. -g -O -W -Wall chdir-long.c libcoreutils.a"
+
diff --git a/devel/cvs-devel/files/patch-check_method_crash b/devel/cvs-devel/files/patch-check_method_crash
new file mode 100644
index 000000000000..a7524301928f
--- /dev/null
+++ b/devel/cvs-devel/files/patch-check_method_crash
@@ -0,0 +1,21 @@
+#
+# Do a basic sanity check on the method in the CVSROOT - don't crash
+# if one is not specified! Bug#274020
+#
+# Patch from Steve McIntyre <steve@einval.com>
+diff -Nur src/root.c src/root.c
+--- src/root.c 2005-09-25 08:38:29.000000000 +0800
++++ src/root.c 2006-02-26 17:48:32.000000000 +0800
+@@ -535,6 +535,12 @@
+ method = "";
+ #endif /* defined (CLIENT_SUPPORT) || defined (SERVER_SUPPORT) */
+
++ if (NULL == method)
++ {
++ error (0, 0, "Missing method in CVSROOT.");
++ goto error_exit;
++ }
++
+ /* Now we have an access method -- see if it's valid. */
+
+ if (!strcasecmp (method, "local"))
diff --git a/devel/cvs-devel/files/patch-contrib-Makefile.in b/devel/cvs-devel/files/patch-contrib-Makefile.in
deleted file mode 100644
index be06c83dfcdf..000000000000
--- a/devel/cvs-devel/files/patch-contrib-Makefile.in
+++ /dev/null
@@ -1,10 +0,0 @@
---- contrib/Makefile.in.orig Fri Apr 19 00:55:53 2002
-+++ contrib/Makefile.in Sun Aug 25 06:03:37 2002
-@@ -126,6 +126,7 @@
-
-
- contrib_DATA = \
-+ ${contrib_MANS} \
- README \
- intro.doc
-
diff --git a/devel/cvs-devel/files/patch-copyright b/devel/cvs-devel/files/patch-copyright
new file mode 100644
index 000000000000..81747b2516d1
--- /dev/null
+++ b/devel/cvs-devel/files/patch-copyright
@@ -0,0 +1,44 @@
+# Change references from GNU Public License to GNU General Public
+# License, where that is meant (closes: #102142)
+#
+# Patch by Tollef Fog Heen <tfheen@debian.org>
+diff -Nur DEVEL-CVS DEVEL-CVS
+--- DEVEL-CVS 2005-09-01 20:46:54.000000000 +0800
++++ DEVEL-CVS 2006-02-26 22:40:36.000000000 +0800
+@@ -7,7 +7,8 @@
+ Policies regarding the CVS source repository:
+
+ By checking items into the repository, developers agree to permit
+-distribution of such items under the terms of the GNU Public License.
++distribution of such items under the terms of the GNU General Public
++License.
+
+ ----------------------------------------------------------------------
+ Procedure for dealing with people who want to be developers:
+diff -Nur doc/cvsclient.texi doc/cvsclient.texi
+--- doc/cvsclient.texi 2006-02-26 22:40:35.000000000 +0800
++++ doc/cvsclient.texi 2006-02-26 22:40:37.000000000 +0800
+@@ -54,7 +54,7 @@
+ user documentation, @file{cvs.texinfo}, for that information. The
+ protocol is non-proprietary (anyone who wants to is encouraged to
+ implement it) and an implementation, known as CVS, is available under
+-the GNU Public License. The CVS distribution, containing this
++the GNU General Public License. The CVS distribution, containing this
+ implementation, @file{cvs.texinfo}, and a copy (possibly more or less up
+ to date than what you are reading now) of this document,
+ @file{cvsclient.texi}, can be found at the usual GNU FTP sites, with a
+diff -Nur HACKING HACKING
+--- HACKING 2005-09-25 08:36:08.000000000 +0800
++++ HACKING 2006-02-26 22:42:15.000000000 +0800
+@@ -403,8 +403,9 @@
+ for each issue. Use context diffs or unidiffs for patches.
+
+ 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@nongnu.org, you implicitly grant this permission.
++the terms of the GNU General Public License" with your patch. By
++sending a 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
diff --git a/devel/cvs-devel/files/patch-cvs-repouid-0.1 b/devel/cvs-devel/files/patch-cvs-repouid-0.1
new file mode 100644
index 000000000000..d31e0467482d
--- /dev/null
+++ b/devel/cvs-devel/files/patch-cvs-repouid-0.1
@@ -0,0 +1,111 @@
+#
+# cvs-repouid patch for controlling pserver access. See
+# README.Debian for details.
+#
+# Original patch by Wichert Akkerman <wakkerma@debian.org>, fixes by
+# Steve McIntyre <steve@einval.com> with help from Alberto Garcia
+# <agarcia@igalia.com>
+diff -Nur src/cvs.h src/cvs.h
+--- src/cvs.h 2005-10-02 23:17:20.000000000 +0800
++++ src/cvs.h 2006-02-26 22:08:16.000000000 +0800
+@@ -145,6 +145,13 @@
+ #define CVSADM_TEMPLATE "CVS/Template"
+ #endif /* USE_VMS_FILENAMES */
+
++/* Global configuration file mapping repositories to uids. This can be
++ used instead of getting the unix user. This is prevents a security
++ problem where anyone with commit access can basically become any
++ user on the machine. Combined with the insecure pserver that is a
++ problem waiting to happen. */
++#define CVS_REPOUIDFILE "/etc/cvs-repouids"
++
+ /* This is the special directory which we use to store various extra
+ per-directory information in the repository. It must be the same as
+ CVSADM to avoid creating a new reserved directory name which users cannot
+diff -Nur src/server.c src/server.c
+--- src/server.c 2005-09-28 23:25:59.000000000 +0800
++++ src/server.c 2006-02-26 22:08:16.000000000 +0800
+@@ -6570,6 +6570,12 @@
+ exit (EXIT_FAILURE);
+ }
+
++ if (pw->pw_uid == 0)
++ {
++ printf("error 0: root not allowed\n");
++ exit (EXIT_FAILURE);
++ }
++
+ #if HAVE_INITGROUPS
+ if (initgroups (pw->pw_name, pw->pw_gid) < 0
+ # ifdef EPERM
+@@ -6667,6 +6673,51 @@
+ }
+ #endif
+
++static char*
++global_repo_uid(const char* repository)
++{
++ FILE *fp;
++ char *linebuf = NULL;
++ size_t linebuf_len;
++ int found_it = 0;
++ size_t repolen = strlen (repository);
++ char *user;
++
++ fp = fopen (CVS_REPOUIDFILE, "r");
++ if (fp == NULL)
++ {
++ if (!existence_error (errno))
++ error (0, errno, "cannot open %s", CVS_REPOUIDFILE);
++ return NULL;
++ }
++
++ while (getline (&linebuf, &linebuf_len, fp) >= 0)
++ {
++ if ((strncmp (linebuf, repository, repolen) == 0)
++ && (linebuf[repolen] == ':'))
++ {
++ found_it = 1;
++ break;
++ }
++ }
++
++ if (ferror (fp))
++ error (0, errno, "cannot read %s", CVS_REPOUIDFILE);
++ if (fclose (fp) < 0)
++ error (0, errno, "cannot close %s", CVS_REPOUIDFILE);
++
++ if (!found_it) {
++ free (linebuf);
++ return NULL;
++ }
++
++ strtok (linebuf + repolen, "\n");
++ user = xstrdup (linebuf + repolen + 1);
++ free (linebuf);
++
++ return user;
++}
++
+ #ifdef AUTH_SERVER_SUPPORT
+
+ extern char *crypt (const char *, const char *);
+@@ -6738,7 +6789,7 @@
+ /* If found_it, then linebuf contains the information we need. */
+ if (found_it)
+ {
+- char *found_password, *host_user_tmp;
++ char *found_password, *host_user_tmp, *user_override;
+ char *non_cvsuser_portion;
+
+ /* We need to make sure lines such as
+@@ -6805,6 +6856,9 @@
+ /* Give host_user_ptr permanent storage. */
+ *host_user_ptr = xstrdup (host_user_tmp);
+ retval = 1;
++ user_override = global_repo_uid (repository);
++ if (user_override)
++ *host_user_ptr = user_override;
+ }
+ else
+ {
diff --git a/devel/cvs-devel/files/patch-cvs.info.typo b/devel/cvs-devel/files/patch-cvs.info.typo
new file mode 100644
index 000000000000..82103e91603d
--- /dev/null
+++ b/devel/cvs-devel/files/patch-cvs.info.typo
@@ -0,0 +1,58 @@
+# Minor documentation changes
+#
+# Patch by Steve McIntyre <steve@einval.com> and Britton Leo Kerin <fsblk@aurora.uaf.edu>
+diff -Nur doc/cvsclient.texi doc/cvsclient.texi
+--- doc/cvsclient.texi 2005-07-20 18:39:59.000000000 +0800
++++ doc/cvsclient.texi 2006-02-26 22:39:20.000000000 +0800
+@@ -3,9 +3,10 @@
+ @setfilename cvsclient.info
+ @include version-client.texi
+
+-@dircategory Programming
++@dircategory Development
+ @direntry
+-* cvsclient: (cvsclient). The CVS client/server protocol.
++* CVS client/server: (cvsclient). Describes the client/server protocol
++ used by CVS.
+ @end direntry
+
+ @node Top
+diff -Nur doc/cvs.texinfo doc/cvs.texinfo
+--- doc/cvs.texinfo 2006-02-26 22:39:19.000000000 +0800
++++ doc/cvs.texinfo 2006-02-26 22:39:20.000000000 +0800
+@@ -97,7 +97,7 @@
+ @end macro
+ @end ifhtml
+
+-@dircategory GNU Packages
++@dircategory Development
+ @direntry
+ * CVS: (cvs). Concurrent Versions System
+ @end direntry
+@@ -2385,13 +2385,16 @@
+ There are two access methods that you use in @code{CVSROOT}
+ for rsh. @code{:server:} specifies an internal rsh
+ client, which is supported only by some @sc{cvs} ports.
++This is not supported on most Unix-style systems,
++including Debian.
+ @code{:ext:} specifies an external rsh program. By
+ default this is @code{rsh} (unless otherwise specified
+ by the @file{--with-rsh} flag to configure) but you may set the
+ @code{CVS_RSH} environment variable to invoke another
+ program which can access the remote server (for
+ example, @code{remsh} on HP-UX 9 because @code{rsh} is
+-something different). It must be a program which can
++something different, or @code{ssh} to allow the use of
++secure and/or compressed connections). It must be a program which can
+ transmit data to and from the server without modifying
+ it; for example the Windows NT @code{rsh} is not
+ suitable since it by default translates between CRLF
+@@ -12711,7 +12714,7 @@
+ @item @var{mname} [ options ] @var{dir} [ @var{files}@dots{} ]
+ In the simplest case, this form of module definition
+ reduces to @samp{@var{mname} @var{dir}}. This defines
+-all the files in directory @var{dir} as module mname.
++all the files in directory @var{dir} as module @var{mname}.
+ @var{dir} is a relative path (from @code{$CVSROOT}) to a
+ directory of source in the source repository. In this
+ case, on checkout, a single directory called
diff --git a/devel/cvs-devel/files/patch-cvsbug_tmpfix b/devel/cvs-devel/files/patch-cvsbug_tmpfix
new file mode 100644
index 000000000000..f5d15ae94403
--- /dev/null
+++ b/devel/cvs-devel/files/patch-cvsbug_tmpfix
@@ -0,0 +1,22 @@
+# Patch for a tmp race in cvsbug (in the source package; we don't ship
+# the script as part of the package). Closes: #325106
+diff -Nur src/cvsbug.in src/cvsbug.in
+--- src/cvsbug.in 2003-02-26 05:31:33.000000000 +0800
++++ src/cvsbug.in 2006-02-26 22:07:08.000000000 +0800
+@@ -109,14 +109,14 @@
+ /usr/bin/ypcat passwd 2>/dev/null | cat - /etc/passwd | grep "^$LOGNAME:" |
+ cut -f5 -d':' | sed -e 's/,.*//' > $TEMP
+ ORIGINATOR="`cat $TEMP`"
+- rm -f $TEMP
++ > $TEMP
+ fi
+ fi
+
+ if [ "$ORIGINATOR" = "" ]; then
+ grep "^$LOGNAME:" /etc/passwd | cut -f5 -d':' | sed -e 's/,.*//' > $TEMP
+ ORIGINATOR="`cat $TEMP`"
+- rm -f $TEMP
++ > $TEMP
+ fi
+
+ if [ -n "$ORGANIZATION" ]; then
diff --git a/devel/cvs-devel/files/patch-cvsrc_whitespace b/devel/cvs-devel/files/patch-cvsrc_whitespace
new file mode 100644
index 000000000000..ca3c68f597ea
--- /dev/null
+++ b/devel/cvs-devel/files/patch-cvsrc_whitespace
@@ -0,0 +1,37 @@
+# Ignore leading whitespace in .cvsrc files. Closes: #212415. Thanks
+# to James R. Van Zandt for the patch.
+diff -Nur src/cvsrc.c src/cvsrc.c
+--- src/cvsrc.c 2005-03-16 23:52:14.000000000 +0800
++++ src/cvsrc.c 2006-02-26 18:25:18.000000000 +0800
+@@ -41,6 +41,7 @@
+ size_t line_chars_allocated;
+
+ char *optstart;
++ int white_len;
+
+ int command_len;
+ int found = 0;
+@@ -96,9 +97,12 @@
+ if (line[0] == '#')
+ continue;
+
++ for (white_len=0; isspace(line[white_len]); white_len++)
++ ;
++
+ /* stop if we match the current command */
+- if (!strncmp (line, cmdname, command_len)
+- && isspace ((unsigned char) *(line + command_len)))
++ if (!strncmp (line + white_len, cmdname, command_len)
++ && isspace ((unsigned char) *(line + white_len + command_len)))
+ {
+ found = 1;
+ break;
+@@ -120,7 +124,7 @@
+ if (found)
+ {
+ /* skip over command in the options line */
+- for (optstart = strtok (line + command_len, "\t \n");
++ for (optstart = strtok (line + white_len + command_len, "\t \n");
+ optstart;
+ optstart = strtok (NULL, "\t \n"))
+ {
diff --git a/devel/cvs-devel/files/patch-date_format_option b/devel/cvs-devel/files/patch-date_format_option
new file mode 100644
index 000000000000..d78f5988328f
--- /dev/null
+++ b/devel/cvs-devel/files/patch-date_format_option
@@ -0,0 +1,151 @@
+#
+# Add an extra option to set the DateFormat used in log output.
+#
+# Patch by Steve McIntyre <steve@einval.com>
+diff -Nur doc/cvs.texinfo doc/cvs.texinfo
+--- doc/cvs.texinfo 2005-09-23 10:02:53.000000000 +0800
++++ doc/cvs.texinfo 2006-02-26 23:03:05.000000000 +0800
+@@ -14840,9 +14840,17 @@
+ group to using @code{cvs admin} to change the default keyword
+ substitution mode, lock revisions, unlock revisions, and
+ replace the log message, use @samp{UserAdminOptions=klum}.
+-@end table
+-
+
++@cindex DateFormat, in CVSROOT/config
++@item DateFormat=@var{value}
++Control the output format of dates from cvs. cvs version 1.12.x
++changed the default format to use ``iso8601'' dates, which are
++better for many reasons. However, old scripts/programs written to
++parse the output of various cvs commands (especially cvs log) may
++not cope with the change in date format (e.g. gcvs). The default
++value of DateFormat will be ``iso8601'', but if you need temporary
++backwards-compatibility set DateFormat=old.
++@end table
+
+ @c ---------------------------------------------------------------------
+ @node Environment variables
+diff -Nur src/log.c src/log.c
+--- src/log.c 2005-03-22 21:19:57.000000000 +0800
++++ src/log.c 2006-02-26 23:03:05.000000000 +0800
+@@ -1607,8 +1607,12 @@
+ &sec);
+ if (year < 1900)
+ year += 1900;
+- sprintf (buf, "%04d-%02d-%02d %02d:%02d:%02d +0000", year, mon, mday,
+- hour, min, sec);
++ if ('-' == datesep)
++ sprintf (buf, "%04d%c%02d%c%02d %02d:%02d:%02d +0000", year, datesep,
++ mon, datesep, mday, hour, min, sec);
++ else
++ sprintf (buf, "%04d%c%02d%c%02d %02d:%02d:%02d", year, datesep,
++ mon, datesep, mday, hour, min, sec);
+ cvs_output_tagged ("date", buf);
+
+ cvs_output_tagged ("text", "; author: ");
+diff -Nur src/main.c src/main.c
+--- src/main.c 2006-02-26 23:03:04.000000000 +0800
++++ src/main.c 2006-02-26 23:10:12.000000000 +0800
+@@ -1371,9 +1371,19 @@
+ static char buf[sizeof ("yyyy-mm-dd HH:MM:SS -HHMM")];
+ /* Convert to a time in the local time zone. */
+ struct tm ltm = *(localtime (&unixtime));
+-
+- if (!my_strftime (buf, sizeof (buf), "%Y-%m-%d %H:%M:%S %z", &ltm, 0, 0))
+- return NULL;
++ char *format = NULL;
++
++ switch (datesep)
++ {
++ case '/':
++ format = "%Y/%m/%d %H:%M:%S";
++ break;
++ default:
++ format = "%Y-%m-%d %H:%M:%S %z";
++ break;
++ }
++ if (my_strftime (buf, sizeof (buf), format, &ltm, 0, 0) == 0)
++ return NULL;
+
+ return xstrdup (buf);
+ }
+@@ -1388,9 +1398,19 @@
+ static char buf[sizeof ("yyyy-mm-dd HH:MM:SS -HHMM")];
+ /* Convert to a time in the local time zone. */
+ struct tm ltm = *(gmtime (&unixtime));
+-
+- if (!my_strftime (buf, sizeof (buf), "%Y-%m-%d %H:%M:%S %z", &ltm, 0, 0))
+- return NULL;
++ char *format = NULL;
++
++ switch (datesep)
++ {
++ case '/':
++ format = "%Y/%m/%d %H:%M:%S";
++ break;
++ default:
++ format = "%Y-%m-%d %H:%M:%S %z";
++ break;
++ }
++ if (my_strftime (buf, sizeof (buf), format, &ltm, 0, 0) == 0)
++ return NULL;
+
+ return xstrdup (buf);
+ }
+diff -Nur src/parseinfo.c src/parseinfo.c
+--- src/parseinfo.c 2005-09-06 12:40:37.000000000 +0800
++++ src/parseinfo.c 2006-02-26 23:03:05.000000000 +0800
+@@ -626,6 +626,19 @@
+ retval->logHistory = xstrdup (p);
+ }
+ }
++ /* grab FreeBSD date format idea */
++ else if (strcmp (line, "DateFormat") == 0)
++ {
++ if (strcmp (p, "old") == 0)
++ {
++ datesep = '/';
++ }
++ else if (strcmp (p, "iso8601") == 0)
++ {
++ datesep = '-';
++ }
++ }
++ /* end grabbing */
+ else if (strcmp (line, "RereadLogAfterVerify") == 0)
+ {
+ if (!strcasecmp (p, "never"))
+diff -Nur src/rcs.c src/rcs.c
+--- src/rcs.c 2006-02-26 23:03:04.000000000 +0800
++++ src/rcs.c 2006-02-26 23:03:05.000000000 +0800
+@@ -33,6 +33,8 @@
+ # endif
+ #endif
+
++int datesep = '-';
++
+ /* The RCS -k options, and a set of enums that must match the array.
+ These come first so that we can use enum kflag in function
+ prototypes. */
+@@ -3537,8 +3539,8 @@
+ &sec);
+ if (year < 1900)
+ year += 1900;
+- sprintf (buf, "%04d/%02d/%02d %02d:%02d:%02d", year, mon, mday,
+- hour, min, sec);
++ sprintf (buf, "%04d%c%02d%c%02d %02d:%02d:%02d", year, datesep, mon,
++ datesep, mday, hour, min, sec);
+ return xstrdup (buf);
+ }
+
+diff -Nur src/rcs.h src/rcs.h
+--- src/rcs.h 2005-03-18 06:36:24.000000000 +0800
++++ src/rcs.h 2006-02-26 23:03:05.000000000 +0800
+@@ -254,6 +254,7 @@
+ void RCS_setlocalid (const char *, unsigned int, void **, const char *arg);
+ char *make_file_label (const char *, const char *, RCSNode *);
+
++extern int datesep;
+ extern bool preserve_perms;
+
+ /* From import.c. */
diff --git a/devel/cvs-devel/files/patch-ext_expansion b/devel/cvs-devel/files/patch-ext_expansion
new file mode 100644
index 000000000000..b3d69dd12bda
--- /dev/null
+++ b/devel/cvs-devel/files/patch-ext_expansion
@@ -0,0 +1,29 @@
+#
+# Make the "ext" method more intelligent; allow specification of the
+# "rsh" command using ext=<command>. Extended to recognise "extssh" the
+# same way as "ext=ssh"
+#
+# Original patch by Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>,
+# extension by Steve McIntyre <steve@einval.com>. Bugs #165432 and #276328
+diff -Nur src/root.c.orig src/root.c
+--- src/root.c.orig 2006-05-05 23:35:40.000000000 +0800
++++ src/root.c 2006-05-05 23:34:12.000000000 +0800
+@@ -553,6 +547,18 @@
+ newroot->method = gserver_method;
+ else if (!strcasecmp (method, "server"))
+ newroot->method = server_method;
++ else if (strncmp (method, "ext=", 4) == 0)
++ {
++ const char *rsh = method + 4;
++ setenv ("CVS_RSH", rsh, 1); /* This is a hack, but simplifies */
++ newroot->method = ext_method;
++ }
++ else if (strncmp (method, "extssh", 6) == 0)
++ {
++ const char *rsh = method + 3;
++ setenv ("CVS_RSH", rsh, 1); /* This is a hack, but simplifies */
++ newroot->method = ext_method;
++ }
+ else if (!strcasecmp (method, "ext"))
+ newroot->method = ext_method;
+ else if (!strcasecmp (method, "fork"))
diff --git a/devel/cvs-devel/files/patch-extra_tags b/devel/cvs-devel/files/patch-extra_tags
new file mode 100644
index 000000000000..2d37e2ec305b
--- /dev/null
+++ b/devel/cvs-devel/files/patch-extra_tags
@@ -0,0 +1,29 @@
+#
+# Add extra tag keyword expansion options
+#
+# Patch by Steve McIntyre <steve@einval.com>
+diff -Nur src/logmsg.c src/logmsg.c
+--- src/logmsg.c 2006-02-26 22:54:52.000000000 +0800
++++ src/logmsg.c 2006-02-26 22:56:36.000000000 +0800
+@@ -642,7 +642,11 @@
+ break;
+ case 'T':
+ li = p->data;
+- arg = li->tag ? li->tag : "";
++ arg = li->tag ? li->tag : "TRUNK";
++ break;
++ case 'S':
++ arg = xmalloc(strlen(p->key) + 5);
++ sprintf(arg, "\\\"%s\\\"", p->key);
+ break;
+ case 'V':
+ li = p->data;
+@@ -814,7 +818,7 @@
+ #endif /* SERVER_SUPPORT */
+ "p", "s", srepos,
+ "r", "s", current_parsed_root->directory,
+- "sVv", ",", changes,
++ "SsTVv", ",", changes,
+ logmsg_list_to_args_proc, (void *) NULL,
+ (char *) NULL);
+ if (!cmdline || !strlen (cmdline))
diff --git a/devel/cvs-devel/files/patch-fix_-l b/devel/cvs-devel/files/patch-fix_-l
new file mode 100644
index 000000000000..c384369c6ac9
--- /dev/null
+++ b/devel/cvs-devel/files/patch-fix_-l
@@ -0,0 +1,26 @@
+# Re-added -l option to the client. Does nothing, but stops
+# warnings/errors. Will really fix #219950 and #224737, and also a
+# differently-described bug (220379). Closes: #219950, #220379
+#
+# Patch by Steve McIntyre <steve@einval.com>
+diff -Nur src/main.c src/main.c
+--- src/main.c 2006-02-26 22:09:42.000000000 +0800
++++ src/main.c 2006-02-26 22:09:43.000000000 +0800
+@@ -511,7 +511,7 @@
+ int help = 0; /* Has the user asked for help? This
+ lets us support the `cvs -H cmd'
+ convention to give help for cmd. */
+- static const char short_options[] = "+QqrwtnRvb:T:e:d:Hfz:s:xa";
++ static const char short_options[] = "+QqrwtnRvb:T:e:d:Hfz:s:xal";
+ static struct option long_options[] =
+ {
+ {"help", 0, NULL, 'H'},
+@@ -669,6 +669,8 @@
+ noexec = 1;
+ logoff = 1;
+ break;
++ case 'l': /* no-op to simply ignore the old -l option */
++ break;
+ case 'v':
+ (void) fputs ("\n", stdout);
+ version (0, NULL);
diff --git a/devel/cvs-devel/files/patch-fix_sparc_sigbus b/devel/cvs-devel/files/patch-fix_sparc_sigbus
new file mode 100644
index 000000000000..bc2abaf2c393
--- /dev/null
+++ b/devel/cvs-devel/files/patch-fix_sparc_sigbus
@@ -0,0 +1,30 @@
+diff -Nur src/update.c src/update.c
+--- src/update.c 2005-09-22 20:49:17.000000000 +0200
++++ src/update.c 2006-12-15 01:35:54.000000000 +0100
+@@ -58,7 +58,7 @@
+ static int patch_file (struct file_info *finfo,
+ Vers_TS *vers_ts,
+ int *docheckout, struct stat *file_info,
+- unsigned char *checksum);
++ md5_uint32 *checksum);
+ static void patch_file_write (void *, const char *, size_t);
+ #endif
+ static int merge_file (struct file_info *finfo, Vers_TS *vers);
+@@ -723,7 +723,7 @@
+ {
+ int docheckout;
+ struct stat file_info;
+- unsigned char checksum[16];
++ md5_uint32 checksum[4];
+
+ retval = patch_file (finfo,
+ vers, &docheckout,
+@@ -1511,7 +1511,7 @@
+ */
+ static int
+ patch_file (struct file_info *finfo, Vers_TS *vers_ts, int *docheckout,
+- struct stat *file_info, unsigned char *checksum)
++ struct stat *file_info, md5_uint32 *checksum)
+ {
+ char *backup;
+ char *file1;
diff --git a/devel/cvs-devel/files/patch-flag_conflicted_copies b/devel/cvs-devel/files/patch-flag_conflicted_copies
new file mode 100644
index 000000000000..0657e6c6977f
--- /dev/null
+++ b/devel/cvs-devel/files/patch-flag_conflicted_copies
@@ -0,0 +1,21 @@
+# Undo not flagging conflicted copies anymore, as reported by
+# Henrique de Moraes Holschuh <hmh@debian.org>
+# Closes: #368681
+# Fix as described in message to the CVS mailing list at
+# http://lists.gnu.org/archive/html/info-cvs/2006-06/msg00050.html
+--- src/client.c~ 2005-10-02 16:17:20.000000000 +0100
++++ src/client.c 2006-06-09 20:12:06.000000000 +0100
+@@ -4533,10 +4533,9 @@
+ /* File no longer exists. Don't do anything, missing files
+ just happen. */
+ }
+- else if (!vers->ts_rcs || args->force
+- || strcmp (vers->ts_conflict
+- ? vers->ts_conflict : vers->ts_rcs, vers->ts_user)
+- || (vers->ts_conflict && !strcmp (cvs_cmd_name, "diff")))
++ else if (vers->ts_rcs == NULL
++ || args->force
++ || strcmp (vers->ts_user, vers->ts_rcs) != 0)
+ {
+ if (args->no_contents
+ && supported_request ("Is-modified"))
diff --git a/devel/cvs-devel/files/patch-freebsdlocal b/devel/cvs-devel/files/patch-freebsdlocal
deleted file mode 100644
index 5c9336d26a51..000000000000
--- a/devel/cvs-devel/files/patch-freebsdlocal
+++ /dev/null
@@ -1,4062 +0,0 @@
-Index: FREEBSD-Xlist
-diff -u /dev/null src/contrib/cvs/FREEBSD-Xlist:1.1
---- /dev/null Fri Oct 20 15:17:33 2006
-+++ FREEBSD-Xlist Thu Jun 10 05:14:53 2004
-@@ -0,0 +1,21 @@
-+FreeBSD: src/contrib/cvs/FREEBSD-Xlist,v 1.1 2004/06/09 20:14:53 des Exp $
-+
-+*/*.com
-+*/*.dep
-+*/*.dsp
-+*/*.mak
-+*/.cvsignore
-+.cvsignore
-+README.VMS
-+build.com
-+cvs.spec*
-+cvsnt.*
-+doc/*.info*
-+doc/*.ps
-+doc/texinfo.tex
-+emx
-+lib/getdate.c
-+os2
-+vms
-+windows-NT
-+zlib
-Index: FREEBSD-upgrade
-diff -u /dev/null src/contrib/cvs/FREEBSD-upgrade:1.11
---- /dev/null Fri Oct 20 15:17:33 2006
-+++ FREEBSD-upgrade Thu Jun 10 05:51:26 2004
-@@ -0,0 +1,38 @@
-+FreeBSD: src/contrib/cvs/FREEBSD-upgrade,v 1.11 2004/06/09 20:51:26 des Exp $
-+
-+MAINTAINER= peter@FreeBSD.org
-+
-+This directory contains the virgin CVS source on the vendor branch. Do
-+not under any circumstances commit new versions onto the mainline, new
-+versions or official-patch versions must be imported.
-+
-+To prepare a new cvs dist for import, extract it into a fresh directory;
-+then delete the files and directories listed in FREEBSD-Xlist.
-+
-+CVS is imported from its top level directory something like this:
-+ cvs -n import src/contrib/cvs CVSHOME v<version>
-+
-+The -n option is "don't do anything" so you can see what is about to happen
-+first. Remove it when it looks ok.
-+
-+The initial import was done with:
-+ cvs import src/contrib/cvs CVSHOME v1_8_1
-+
-+When new versions are imported, cvs will give instructions on how to merge
-+the local and vendor changes when/if conflicts arise.
-+
-+The developers can be reached at: <devel-cvs@cyclic.com>. Local changes
-+that are suitable for public consumption should be submitted for inclusion
-+in future releases.
-+
-+peter@freebsd.org - 20 Aug 1996
-+
-+Current local changes:
-+ - CVS_LOCAL_BRANCH_NUM environment variable support for choosing the
-+ magic branch number. (for CVSup local-commit support)
-+ - CVSREADONLYFS environment variable and global option -R to enable
-+ no-locking readonly mode (eg: cvs repo is a cdrom or mirror)
-+ - the verify message script can edit the submitted log message.
-+ - CVSROOT/options file
-+ - Variable keyword expansion controls including custom keywords.
-+ - $ CVSHeader$ keyword - like Header, but with $CVSROOT stripped off.
-Index: contrib/sccs2rcs.in
-diff -u src/contrib/cvs/contrib/sccs2rcs.in:1.1.1.3 src/contrib/cvs/contrib/sccs2rcs.in:1.5
---- src/contrib/cvs/contrib/sccs2rcs.in:1.1.1.3 Thu Apr 15 10:01:55 2004
-+++ contrib/sccs2rcs.in Thu Apr 15 10:17:25 2004
-@@ -48,6 +48,7 @@
- # -Allan G. Schrum schrum@ofsoptics.com agschrum@mindspring.com
- # Fri Sep 26 10:40:40 EDT 2003
- #
-+# FreeBSD: src/contrib/cvs/contrib/sccs2rcs.in,v 1.5 2004/04/15 01:17:25 peter Exp $
-
-
- #we'll assume the user set up the path correctly
-Index: diff/diagmeet.note
-diff -u src/contrib/cvs/diff/diagmeet.note:1.1.1.1 src/contrib/cvs/diff/diagmeet.note:removed
---- src/contrib/cvs/diff/diagmeet.note:1.1.1.1 Mon Jan 26 12:09:49 1998
-+++ diff/diagmeet.note Fri Oct 20 15:17:34 2006
-@@ -1,71 +0,0 @@
--Here is a comparison matrix which shows a case in which
--it is possible for the forward and backward scan in `diag'
--to meet along a nonzero length of diagonal simultaneous
--(so that bdiag[d] and fdiag[d] are not equal)
--even though there is no snake on that diagonal at the meeting point.
--
--
-- 85 1 1 1 159 1 1 17
-- 1 2 3 4
--60
-- 1 2
--1
-- 2 2 3 4
--71
-- 3 3 4 5
--85
-- 4 3 4 5
--17
-- 5 4 5
--1
-- 6 4 5 6
--183
-- 7 5 6 7
--10
-- 8 6 7
--1
-- 9 6 7 8
--12
-- 7 8 9 10
--13
-- 10 8 9 10
--14
-- 10 9 10
--17
-- 10 10
--1
-- 10 9 10
--1
-- 8 10 10 10
--183
-- 8 7 9 9 9
--10
-- 7 6 8 9 8 8
--1
-- 6 5 7 7
--1
-- 5 6 6
--1
-- 5 5 5
--50
-- 5 4 4 4
--1
-- 4 3 3
--85
-- 5 4 3 2 2
--1
-- 2 1
--17
-- 5 4 3 2 1 1
--1
-- 1 0
-- 85 1 1 1 159 1 1 17
--
--
--
--
--
--
--
--
--
-Index: diff/diff3.c
-diff -u src/contrib/cvs/diff/diff3.c:1.1.1.7 src/contrib/cvs/diff/diff3.c:1.6
---- src/contrib/cvs/diff/diff3.c:1.1.1.7 Thu Apr 15 10:01:56 2004
-+++ diff/diff3.c Thu Apr 15 10:17:26 2004
-@@ -12,6 +12,9 @@
- GNU General Public License for more details.
-
- */
-+/*
-+ * FreeBSD: src/contrib/cvs/diff/diff3.c,v 1.6 2004/04/15 01:17:26 peter Exp $
-+ */
-
- /* Written by Randy Smith */
- /* Librarification by Tim Pierce */
-Index: lib/md5.h
-diff -u src/contrib/cvs/lib/md5.h:1.1.1.3 src/contrib/cvs/lib/md5.h:1.2
---- src/contrib/cvs/lib/md5.h:1.1.1.3 Sat Dec 11 21:22:56 1999
-+++ lib/md5.h Sun Dec 12 00:10:02 1999
-@@ -1,8 +1,21 @@
- /* See md5.c for explanation and copyright information. */
-
-+/*
-+ * FreeBSD: src/contrib/cvs/lib/md5.h,v 1.2 1999/12/11 15:10:02 peter Exp $
-+ */
-+
- #ifndef MD5_H
- #define MD5_H
-
-+#ifdef __FreeBSD__
-+#define cvs_MD5Context MD5Context
-+#define cvs_MD5Init MD5Init
-+#define cvs_MD5Update MD5Update
-+#define cvs_MD5Final MD5Final
-+#define cvs_MD5Transform MD5Transform
-+#include <sys/md5.h>
-+#else
-+
- /* Unlike previous versions of this code, uint32 need not be exactly
- 32 bits, merely 32 bits or more. Choosing a data type which is 32
- bits instead of 64 is not important; speed is considerably more
-@@ -23,4 +36,6 @@
- struct cvs_MD5Context *context));
- void cvs_MD5Transform PROTO ((cvs_uint32 buf[4], const unsigned char in[64]));
-
-+#endif
-+
- #endif /* !MD5_H */
-Index: man/cvs.1
-diff -u /dev/null src/contrib/cvs/man/cvs.1:1.22
---- /dev/null Fri Oct 20 15:17:35 2006
-+++ man/cvs.1 Thu Jul 28 22:53:45 2005
-@@ -0,0 +1,2203 @@
-+.\" FreeBSD: src/contrib/cvs/man/cvs.1,v 1.22 2005/07/28 13:53:45 keramida Exp $
-+.de Id
-+.ds Rv \\$3
-+.ds Dt \\$4
-+..
-+.TH CVS 1 "\*(Dt"
-+.\" Full space in nroff; half space in troff
-+.de SP
-+.if n .sp
-+.if t .sp .5
-+..
-+.\" quoted command
-+.de `
-+.RB ` "\|\\$1\|" '\\$2
-+..
-+.SH "NAME"
-+cvs \- Concurrent Versions System
-+.SH "SYNOPSIS"
-+.TP
-+\fBcvs\fP [ \fIcvs_options\fP ]
-+.I cvs_command
-+[
-+.I command_options
-+] [
-+.I command_args
-+]
-+.SH "NOTE"
-+This manpage is a summary of some of the features of
-+.B cvs
-+but it may no longer be kept up-to-date.
-+For more current and in-depth documentation, please consult the
-+Cederqvist manual (via the
-+.B info cvs
-+command or otherwise,
-+as described in the SEE ALSO section of this manpage).
-+.SH "DESCRIPTION"
-+.IX "revision control system" "\fLcvs\fR"
-+.IX cvs "" "\fLcvs\fP \- concurrent versions system"
-+.IX "concurrent versions system \- \fLcvs\fP"
-+.IX "release control system" "cvs command" "" "\fLcvs\fP \- concurrent versions system"
-+.IX "source control system" "cvs command" "" "\fLcvs\fP \- concurrent versions system"
-+.IX revisions "cvs command" "" "\fLcvs\fP \- source control"
-+CVS is a version control system, which allows you to keep old versions
-+of files (usually source code), keep a log of who, when, and why
-+changes occurred, etc., like RCS or SCCS. Unlike the simpler systems,
-+CVS does not just operate on one file at a time or one directory at a
-+time, but operates on hierarchical collections of directories
-+consisting of version controlled files. CVS helps to manage releases
-+and to control the concurrent editing of source files among multiple
-+authors. CVS allows triggers to enable/log/control various
-+operations and works well over a wide area network.
-+.SP
-+.B cvs
-+keeps a single copy of the master sources.
-+This copy is called the source ``repository''; it contains all the
-+information to permit extracting previous software releases at any
-+time based on either a symbolic revision tag, or a date in the past.
-+.SH "ESSENTIAL COMMANDS"
-+.B cvs
-+provides a rich variety of commands (\fIcvs_command\fP in the
-+Synopsis), each of which often has a wealth of options, to satisfy the
-+many needs of source management in distributed environments. However,
-+you don't have to master every detail to do useful work with
-+.BR cvs ;
-+in fact, five commands are sufficient to use (and contribute to)
-+the source repository.
-+.TP
-+\fBcvs checkout\fP \fImodules\fP\|.\|.\|.
-+A necessary preliminary for most \fBcvs\fP work: creates your private
-+copy of the source for \fImodules\fP (named collections of source; you
-+can also use a path relative to the source repository here). You can
-+work with this copy without interfering with others' work. At least
-+one subdirectory level is always created.
-+.TP
-+.B cvs update
-+Execute this command from \fIwithin\fP your private source
-+directory when you wish to update your copies of source files from
-+changes that other developers have made to the source in the
-+repository.
-+.TP
-+\fBcvs add\fP \fIfile\fP\|.\|.\|.
-+Use this command to enroll new files in \fBcvs\fP records of your
-+working directory. The files will be added to the repository the next
-+time you run
-+.` "cvs commit".
-+Note:
-+You should use the
-+.` "cvs import"
-+command to bootstrap new sources into the source repository.
-+.` "cvs add"
-+is only used for new files to an already checked-out module.
-+.TP
-+\fBcvs remove\fP \fIfile\fP\|.\|.\|.
-+Use this command (after erasing any files listed) to declare that you
-+wish to eliminate files from the repository. The removal does not
-+affect others until you run
-+.` "cvs commit".
-+.TP
-+\fBcvs commit\fP \fIfile\fP\|.\|.\|.
-+Use this command when you wish to ``publish'' your changes to other
-+developers, by incorporating them in the source repository.
-+.SH "OPTIONS"
-+The
-+.B cvs
-+command line can include
-+.IR cvs_options ,
-+which apply to the overall
-+.B cvs
-+program; a
-+.IR cvs_command ,
-+which specifies a particular action on the source repository; and
-+.I command_options
-+and
-+.I command_arguments
-+to fully specify what the
-+.I cvs_command
-+will do.
-+.SP
-+.I Warning:
-+you must be careful of precisely where you place options relative to the
-+.IR cvs_command .
-+The same option can mean different things depending on whether it
-+is in the
-+.I cvs_options
-+position (to the left of a
-+.B cvs
-+command) or in the
-+.I command_options
-+position (to the right of a
-+.B cvs
-+command).
-+.SP
-+There are only two situations where you may omit
-+.IR cvs_command :
-+.` "cvs \-H"
-+or
-+.` "cvs --help"
-+elicits a list of available commands, and
-+.` "cvs \-v"
-+or
-+.` "cvs --version"
-+displays version information on \fBcvs\fP itself.
-+.SP
-+.SH "CVS OPTIONS"
-+As of release 1.6,
-+.B cvs
-+supports
-+.SM GNU
-+style long options as well as short options. Only
-+a few long options are currently supported, these are listed in
-+brackets after the short options whose functions they duplicate.
-+.SP
-+Use these options to control the overall
-+.B cvs
-+program:
-+.TP
-+.B \-H [ --help ]
-+Display usage information about the specified
-+.I cvs_command
-+(but do not actually execute the command). If you don't specify a
-+command name,
-+.` "cvs \-H"
-+displays a summary of all the commands available.
-+.TP
-+.B \-Q
-+Causes the command to be
-+.I really
-+quiet; the command will generate output only for serious problems.
-+.TP
-+.B \-q
-+Causes the command to be somewhat quiet; informational messages, such
-+as reports of recursion through subdirectories, are suppressed.
-+.TP
-+\fB\-b\fP \fIbindir\fP
-+Use
-+.I bindir
-+as the directory where
-+.SM RCS
-+programs are located (CVS 1.9 and older).
-+Overrides the setting of the
-+.SM RCSBIN
-+environment variable.
-+This value should be specified as an absolute pathname.
-+.TP
-+\fB\-d\fP \fICVS_root_directory\fP
-+Use
-+.I CVS_root_directory
-+as the root directory pathname of the master
-+source repository.
-+Overrides the setting of the
-+.SM CVSROOT
-+environment variable.
-+This value should be specified as an absolute pathname.
-+.TP
-+\fB\-e\fP \fIeditor\fP
-+Use
-+.I editor
-+to enter revision log information.
-+Overrides the setting of the
-+.SM CVSEDITOR\c
-+,
-+.SM VISUAL\c
-+, and
-+.SM EDITOR
-+environment variables.
-+.TP
-+.B \-f
-+Do not read the
-+.B cvs
-+startup file (\fI~/.cvsrc\fP).
-+.TP
-+.B \-n
-+Do not change any files. Attempt to execute the
-+.IR cvs_command ,
-+but only to issue reports; do not remove, update, or merge any
-+existing files, or create any new files.
-+.TP
-+.B \-t
-+Trace program execution; display messages showing the steps of
-+.B cvs
-+activity. Particularly useful with
-+.B \-n
-+to explore the potential impact of an unfamiliar command.
-+.TP
-+.B \-r
-+Makes new working files read-only.
-+Same effect as if the
-+.SM CVSREAD
-+environment variable is set.
-+.TP
-+.B \-R
-+Turns on read-only repository mode. This allows one to check out from a
-+read-only repository, such as within an anoncvs server, or from a CDROM
-+repository.
-+Same effect as if the
-+.SM CVSREADONLYFS
-+environment variable is set. Using
-+.B \-R
-+can also considerably speed up checkout's over NFS.
-+.TP
-+.B \-v [ --version ]
-+Displays version and copyright information for
-+.BR cvs .
-+.TP
-+.B \-w
-+Makes new working files read-write (default).
-+Overrides the setting of the
-+.SM CVSREAD
-+environment variable.
-+.TP
-+.B \-g
-+Forces group-write perms on working files. This option is typically
-+used when you have multiple users sharing a single checked out source
-+tree, allowing them to operate their shells with a less dangerous umask.
-+To use this feature, create a directory to hold the checked-out source
-+tree, set it to a private group, and set up the directory such that
-+files created under it inherit the group id of the directory. This occurs
-+automatically with FreeBSD. With SysV you must typically set the SGID bit
-+on the directory. The users who are to share the checked out tree must
-+be placed in that group. Note that the sharing of a single checked-out
-+source tree is very different from giving several users access to a common
-+CVS repository. Access to a common CVS repository already maintains shared
-+group-write perms and does not require this option.
-+
-+To use the option transparently, simply place the line 'cvs -g' in your
-+~/.cvsrc file. Doing this is not recommended unless you firewall all your
-+source checkouts within a private group or within a private mode 0700
-+directory.
-+.TP
-+.B \-x
-+Encrypt all communication between the client and the server. As of
-+this writing, this is only implemented when using a Kerberos
-+connection.
-+.TP
-+\fB\-z\fP \fIcompression\-level\fP
-+When transferring files across the network use
-+.B gzip
-+with compression level \fIcompression\-level\fP to compress and
-+de-compress data as it is transferred. Requires the presence of
-+the
-+.SM GNU
-+.B gzip
-+program in the current search path at both ends of the link.
-+.SH "USAGE"
-+Except when requesting general help with
-+.` "cvs \-H",
-+you must specify a
-+.I cvs_command
-+to
-+.B cvs
-+to select a specific release control function to perform.
-+Each
-+.B cvs
-+command accepts its own collection of options and arguments.
-+However, many options are available across several commands.
-+You can display a usage summary for each command by specifying the
-+.B \-H
-+option with the command.
-+.SH "CVS STARTUP FILE"
-+Normally, when CVS starts up, it reads the
-+.I .cvsrc
-+file from the home directory of the user reading it. This startup
-+procedure can be turned off with the
-+.B \-f
-+flag.
-+.SP
-+The
-+.I .cvsrc
-+file lists CVS commands with a list of arguments, one command per
-+line. For example, the following line in \fI.cvsrc\fP:
-+.SP
-+diff \-c
-+.SP
-+will mean that the
-+.` "cvs diff"
-+command will always be passed the \-c option in addition to any
-+other options that are specified in the command line (in this case
-+it will have the effect of producing context sensitive diffs for
-+all executions of
-+.` "cvs diff"
-+).
-+.SP
-+Global options are specified using the \fBcvs\fP keyword. For example,
-+the following:
-+.SP
-+cvs \-q
-+.SP
-+will mean that all
-+.` "cvs"
-+commands will behave as thought he \-q global option had been supplied.
-+.SH "CVS COMMAND SUMMARY"
-+Here are brief descriptions of all the
-+.B cvs
-+commands:
-+.TP
-+.B add
-+Add a new file or directory to the repository, pending a
-+.` "cvs commit"
-+on the same file.
-+Can only be done from within sources created by a previous
-+.` "cvs checkout"
-+invocation.
-+Use
-+.` "cvs import"
-+to place whole new hierarchies of sources under
-+.B cvs
-+control.
-+(Does not directly affect repository; changes
-+working directory.)
-+.TP
-+.B admin
-+Execute
-+control functions on the source repository. (Changes
-+repository directly; uses working directory without changing it.)
-+.TP
-+.B checkout
-+Make a working directory of source files for editing. (Creates or changes
-+working directory.)
-+.TP
-+.B commit
-+Apply to the source repository changes, additions, and deletions from your
-+working directory. (Changes repository.)
-+.TP
-+.B diff
-+Show differences between files in working directory and source
-+repository, or between two revisions in source repository.
-+(Does not change either repository or working directory.)
-+.TP
-+.B export
-+Prepare copies of a set of source files for shipment off site.
-+Differs from
-+.` "cvs checkout"
-+in that no
-+.B cvs
-+administrative directories are created (and therefore
-+.` "cvs commit"
-+cannot be executed from a directory prepared with
-+.` "cvs export"),
-+and a symbolic tag must be specified.
-+(Does not change repository; creates directory similar to working
-+directories).
-+.TP
-+.B history
-+Show reports on
-+.B cvs
-+commands that you or others have executed on a particular file or
-+directory in the source repository. (Does not change repository or
-+working directory.) History logs are kept only if enabled by creation
-+of the
-+.` "$CVSROOT/CVSROOT/history"
-+file; see
-+.BR cvs ( 5 ).
-+.TP
-+.B import
-+Incorporate a set of updates from off-site into the source repository,
-+as a ``vendor branch''. (Changes repository.)
-+.TP
-+.B init
-+Initialize a repository by adding the CVSROOT subdirectory and some default
-+control files. You must use this command or initialize the repository in
-+some other way before you can use it.
-+.TP
-+.B log
-+Display
-+log information.
-+(Does not change repository or working directory.)
-+.TP
-+.B rdiff
-+Prepare a collection of diffs as a patch file between two releases in
-+the repository. (Does not change repository or working directory.)
-+.TP
-+.B release
-+Cancel a
-+.` "cvs checkout",
-+abandoning any changes.
-+(Can delete working directory; no effect on repository.)
-+.TP
-+.B remove
-+Remove files from the source repository, pending a
-+.` "cvs commit"
-+on the same files. (Does not directly affect repository;
-+changes working directory.)
-+.TP
-+.B rtag
-+Explicitly specify a symbolic tag for particular revisions of files in the
-+source repository. See also
-+.` "cvs tag".
-+(Changes repository directly; does not require or affect
-+working directory.)
-+.TP
-+.B status
-+Show current status of files: latest version, version in working
-+directory, whether working version has been edited and, optionally,
-+symbolic tags in the
-+.SM RCS
-+file. (Does not change
-+repository or working directory.)
-+.TP
-+.B tag
-+Specify a symbolic tag for files in the repository. By default, tags
-+the revisions
-+that were last synchronized with your working directory. (Changes
-+repository directly; uses working directory without changing it.)
-+.TP
-+.B update
-+Bring your working directory up to date with changes from the
-+repository. Merges are performed automatically when possible; a
-+warning is issued if manual resolution is required for conflicting
-+changes. (Changes working directory; does not change repository.)
-+.SH "COMMON COMMAND OPTIONS"
-+This section describes the
-+.I command_options
-+that are available across several
-+.B cvs
-+commands. Not all commands support all of these options; each option
-+is only supported for commands where it makes sense. However, when
-+a command has one of these options you can count on the same meaning
-+for the option as in other commands. (Other command
-+options, which are listed with the individual commands, may have
-+different meanings from one
-+.B cvs
-+command to another.)
-+.I "Warning:"
-+the
-+.B history
-+command is an exception;
-+it supports many options that conflict
-+even with these standard options.
-+.TP
-+\fB\-D\fP \fIdate_spec\fP
-+Use the most recent revision no later than \fIdate_spec\fP (a single
-+argument, date description specifying a date in the
-+past). A wide variety of date formats are supported, in particular
-+ISO ("1972-09-24 20:05") or Internet ("24 Sep 1972 20:05").
-+The \fIdate_spec\fP is interpreted as being in the local timezone, unless a
-+specific timezone is specified.
-+The specification is ``sticky'' when you use it to make a
-+private copy of a source file; that is, when you get a working file
-+using \fB\-D\fP, \fBcvs\fP records the date you
-+specified, so that further updates in the same directory will use the
-+same date (unless you explicitly override it; see the description of
-+the \fBupdate\fP command).
-+.B \-D
-+is available with the
-+.BR checkout ", " diff ", " history ", " export ", "
-+.BR rdiff ", " rtag ", and "
-+.B update
-+commands.
-+Examples of valid date specifications include:
-+.in +1i
-+.ft B
-+.nf
-+1 month ago
-+2 hours ago
-+400000 seconds ago
-+last year
-+last Monday
-+yesterday
-+a fortnight ago
-+3/31/92 10:00:07 PST
-+January 23, 1987 10:05pm
-+22:00 GMT
-+.fi
-+.ft P
-+.in -1i
-+.TP
-+.B \-f
-+When you specify a particular date or tag to \fBcvs\fP commands, they
-+normally ignore files that do not contain the tag (or did not exist on
-+the date) that you specified. Use the \fB\-f\fP option if you want
-+files retrieved even when there is no match for the tag or date. (The
-+most recent version is used in this situation.)
-+.B \-f
-+is available with these commands:
-+.BR checkout ", " export ", "
-+.BR rdiff ", " rtag ", and " update .
-+.TP
-+\fB\-k\fP \fIkflag\fP
-+Alter the default
-+processing of keywords.
-+The \fB\-k\fP option is available with the
-+.BR add ", " checkout ", " diff ", " export ", "
-+.BR rdiff ", and " 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,
-+\fBcvs\fP associates your selected \fIkflag\fP with the file, and
-+continues to use it with future \fBupdate\fP commands on the same file
-+until you specify otherwise.
-+.SP
-+Some of the more useful \fIkflag\fPs are \-ko and \-kb (for binary files),
-+and \-kv which is useful for an
-+.B export
-+where you wish to retain keyword information after an
-+.B import
-+at some other site.
-+.TP
-+.B \-l
-+Local; run only in current working directory, rather than recurring through
-+subdirectories. Available with the following commands:
-+.BR checkout ", " commit ", " diff ", "
-+.BR export ", " remove ", " rdiff ", " rtag ", "
-+.BR status ", " tag ", and " update .
-+.TP
-+.B \-n
-+Do
-+.I not
-+run any
-+.BR checkout / commit / tag / update
-+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 "
-+.B rtag
-+commands.
-+.I Warning:
-+this is not the same
-+as the overall
-+.` "cvs \-n"
-+option, which you can specify to the
-+.I left
-+of a
-+.B cvs
-+command!
-+.TP
-+.B \-P
-+Prune (remove) directories that are empty after being updated, on
-+.BR checkout ", or " update .
-+Normally, an empty directory (one that is void of revision-controlled
-+files) is left alone.
-+Specifying
-+.B \-P
-+will cause these directories to be silently removed from your checked-out
-+sources.
-+This does not remove the directory from the repository, only from your
-+checked out copy.
-+Note that this option is implied by the
-+.B \-r
-+or
-+.B \-D
-+options of
-+.BR checkout " and " export .
-+.TP
-+.B \-T
-+Create/Update CVS/Template by copying it from the (local) repository.
-+This option is useful for developers maintaining a local cvs repository
-+but committing to a remote repository. By maintaining CVS/Template the
-+remote commits will still be able to bring up the proper template in the
-+commit editor session.
-+Available with the
-+.BR checkout " and " update
-+commands.
-+.TP
-+.B \-p
-+Pipe the files retrieved from the repository to standard output,
-+rather than writing them in the current directory. Available with the
-+.BR checkout " and " update
-+commands.
-+.TP
-+\fB\-r\fP \fItag\fP
-+Use the revision specified by the
-+.I tag
-+argument instead of the default ``head'' revision. As well as
-+arbitrary tags defined with the \fBtag\fP or \fBrtag\fP command, two
-+special tags are always available:
-+.` "HEAD"
-+refers to the most
-+recent version available in the repository, and
-+.` "BASE"
-+refers to the revision you last checked out into the current working
-+directory.
-+.SP
-+The \fItag\fP specification is ``sticky'' when you use
-+this option with
-+.` "cvs checkout"
-+or
-+.` "cvs update"
-+to
-+make your own copy of a file: \fBcvs\fP remembers the \fItag\fP and
-+continues to use it on future \fBupdate\fP commands, until you specify
-+otherwise.
-+.I tag
-+can be either a symbolic or numeric tag.
-+Specifying the
-+.B \-q
-+global option along with the
-+.B \-r
-+command option is often useful, to suppress the warning messages when the
-+.SM RCS
-+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
-+commands.
-+.I Warning:
-+this is not the same
-+as the overall
-+.` "cvs \-r"
-+option, which you can specify to the
-+.I left
-+of a
-+.B cvs
-+command!
-+.SH "CVS COMMANDS"
-+Here (finally) are details on all the
-+.B cvs
-+commands and the options each accepts. The summary lines at the top
-+of each command's description highlight three kinds of things:
-+.TP 1i
-+\ \ \ \ Command Options and Arguments
-+Special options are described in detail below; common command options
-+may appear only in the summary line.
-+.TP 1i
-+\ \ \ \ Working Directory, or Repository?
-+Some \fBcvs\fP commands require a working directory to operate; some
-+require a repository. Also, some commands \fIchange\fP the
-+repository, some change the working directory, and some change
-+nothing.
-+.TP 1i
-+\ \ \ \ Synonyms
-+Many commands have synonyms, which you may find easier to
-+remember (or type) than the principal name.
-+.PP
-+.TP
-+\fBadd\fP [\fB\-k\fP \fIkflag\fP] [\fB\-m '\fP\fImessage\fP\fB'\fP] \fIfiles.\|.\|.\fP
-+.I Requires:
-+repository, working directory.
-+.br
-+.I Changes:
-+working directory.
-+.br
-+.I Synonym:
-+.B new
-+.br
-+Use the
-+.B add
-+command to create a new file or directory in the
-+source repository.
-+The files or directories specified with
-+.B add
-+must already exist in the current directory (which must have been created
-+with the
-+.B checkout
-+command).
-+To add a whole new directory hierarchy to the source repository
-+(for example, files received from a third-party vendor), use the
-+.` "cvs import"
-+command instead.
-+.SP
-+If the argument to
-+.` "cvs add"
-+refers to an immediate sub-directory, the directory is
-+created at the correct place in the
-+source repository, and the necessary
-+.B cvs
-+administration files are created in your working directory.
-+If the directory already exists in the source repository,
-+.` "cvs add"
-+still creates the administration files in your version of the directory.
-+This allows you to use
-+.` "cvs add"
-+to add a particular directory to your private sources even if
-+someone else created that directory after your
-+.B checkout
-+of the sources. You can do the following:
-+.SP
-+.in +1i
-+.ft B
-+.nf
-+example% mkdir new_directory
-+example% cvs add new_directory
-+example% cvs update new_directory
-+.fi
-+.ft P
-+.in -1i
-+.SP
-+An alternate approach using
-+.` "cvs update"
-+might be:
-+.SP
-+.in +1i
-+.ft B
-+.nf
-+example% cvs update -d new_directory
-+.fi
-+.ft P
-+.in -1i
-+.SP
-+(To add \fIany available\fP new directories to your working directory, it's
-+probably simpler to use
-+.` "cvs checkout"
-+or
-+.` "cvs update -d".)
-+.SP
-+The added files are not placed in the
-+source repository until you use
-+.` "cvs commit"
-+to make the change permanent.
-+Doing a
-+.` "cvs add"
-+on a file that was removed with the
-+.` "cvs remove"
-+command will resurrect the file, if no
-+.` "cvs commit"
-+command intervened.
-+.SP
-+You will have the opportunity to specify a logging message, as usual,
-+when you use
-+.` "cvs commit"
-+to make the new file permanent. If you'd like to have another
-+logging message associated with just
-+.I creation
-+of the file (for example, to describe the file's purpose), you can
-+specify it with the
-+.` "\-m \fImessage\fP"
-+option to the
-+.B add
-+command.
-+.SP
-+The
-+.` "-k kflag"
-+option specifies the default way that this
-+file will be checked out.
-+The
-+.` "kflag"
-+argument is stored in the
-+.SM RCS
-+file and can be changed with
-+.` "cvs admin".
-+Specifying
-+.` "-ko"
-+is useful for checking in binaries that
-+shouldn't have
-+keywords expanded.
-+.TP
-+\fBadmin\fP [\fIrcs-options\fP] \fIfiles.\|.\|.\fP
-+.I Requires:
-+repository, working directory.
-+.br
-+.I Changes:
-+repository.
-+.br
-+.I Synonym:
-+.B rcs
-+.br
-+This is the
-+.B cvs
-+interface to assorted administrative
-+facilities, similar to
-+.BR rcs ( 1 ).
-+This command works recursively, so extreme care should be
-+used.
-+.TP
-+\fBcheckout\fP [\fBoptions\fP] \fImodules\fP.\|.\|.
-+.I Requires:
-+repository.
-+.br
-+.I Changes:
-+working directory.
-+.br
-+.I Synonyms:
-+.BR co ", " get
-+.br
-+Make a working directory containing copies of the source files specified by
-+.IR modules .
-+You must execute
-+.` "cvs checkout"
-+before using most of the other
-+.B cvs
-+commands, since most of them operate on your working directory.
-+.SP
-+\fImodules\fP are either symbolic names (themselves defined as the
-+module
-+.` "modules"
-+in the source repository; see
-+.BR cvs ( 5 ))
-+for some collection of source directories and files, or paths to
-+directories or files in the repository.
-+.SP
-+Depending on the
-+.I modules
-+you specify,
-+.B checkout
-+may recursively create directories and populate them with the appropriate
-+source files.
-+You can then edit these source files at any time (regardless of whether
-+other software developers are editing their own copies of the sources);
-+update them to include new changes applied by others to the source
-+repository; or commit your work as a permanent change to the
-+repository.
-+.SP
-+Note that
-+.B checkout
-+is used to create directories.
-+The top-level directory created is always added to the directory
-+where
-+.B checkout
-+is invoked, and usually has the same name as the specified
-+.IR module .
-+In the case of a
-+.I module
-+alias, the created sub-directory may have a different name, but you can be
-+sure that it will be a sub-directory, and that
-+.B checkout
-+will show the relative path leading to each file as it is extracted into
-+your private work area (unless you specify the
-+.B \-Q
-+global option).
-+.SP
-+Running
-+.` "cvs checkout"
-+on a directory that was already built by a prior
-+.B checkout
-+is also permitted, and
-+has the same effect as specifying the
-+.B \-d
-+option to the
-+.B update
-+command described below.
-+.SP
-+The
-+.I options
-+permitted with
-+.` "cvs checkout"
-+include the standard command options
-+.BR \-P ", " \-f ", "
-+.BI \-k " kflag"
-+\&,
-+.BR \-l ", " \-n ", " \-p ", "
-+.BR \-r
-+.IR tag ", and"
-+.BI \-D " date"\c
-+\&.
-+.SP
-+In addition to those, you can use these special command options
-+with
-+.BR checkout :
-+.SP
-+Use the
-+.B \-A
-+option to reset any sticky tags, dates, or
-+.B \-k
-+options. (If you get a working file using one of the
-+\fB\-r\fP, \fB\-D\fP, or \fB\-k\fP options, \fBcvs\fP remembers the
-+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).
-+.SP
-+The
-+.BI \-j " branch"
-+option merges the changes made between the
-+resulting revision and the revision that it is based on (e.g., if
-+the tag refers to a branch,
-+.B cvs
-+will merge all changes made in that branch into your working file).
-+.SP
-+With two \fB-j\fP options,
-+.B cvs
-+will merge in the changes between the two respective revisions.
-+This can be used to ``remove'' a certain delta from your working file.
-+.SP
-+In addition, each \fB-j\fP option can contain on optional date
-+specification which, when used with branches, can limit the chosen
-+revision to one within a specific date.
-+An optional date is specified by adding a colon (:) to the tag.
-+An example might be what
-+.` "cvs import"
-+tells you to do when you have
-+just imported sources that have conflicts with local changes:
-+.SP
-+.in +1i
-+.ft B
-+.nf
-+example% cvs checkout -jTAG:yesterday -jTAG module
-+.fi
-+.ft P
-+.in -1i
-+.SP
-+Use the
-+.B \-N
-+option with
-+.` "\-d \fIdir\fP"
-+to avoid shortening module paths in your working directory. (Normally, \fBcvs\fP shortens paths as much as possible when you specify an explicit target directory.)
-+.SP
-+Use the
-+.B \-c
-+option to copy the module file, sorted, to the standard output,
-+instead of creating or modifying any files or directories in your
-+working directory.
-+.SP
-+Use the
-+.BI \-d " dir"
-+option to create a directory called
-+.I dir
-+for the working files, instead of using the module name. Unless you
-+also use \fB\-N\fP, the paths created under \fIdir\fP will be as short
-+as possible.
-+.SP
-+Use the
-+.B \-s
-+option to display per-module status information stored with
-+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]
-+.I Requires:
-+working directory, repository.
-+.br
-+.I Changes:
-+repository.
-+.br
-+.I Synonym:
-+.B ci
-+.br
-+Use
-+.` "cvs commit"
-+when you want to incorporate changes from your working source
-+files into the general source repository.
-+.SP
-+If you don't specify particular \fIfiles\fP to commit, all
-+of the files in your working current directory are examined.
-+.B commit
-+is careful to change in the repository only those files that you have
-+really changed. By default (or if you explicitly specify the
-+.B \-R
-+option), files
-+in subdirectories are also examined and committed if they have
-+changed; you can use the
-+.B \-l
-+option to limit
-+.B commit
-+to the current directory only.
-+Sometimes you may want to force a file to be committed even though it
-+is unchanged; this is achieved with the
-+.B \-f
-+flag, which also has the effect of disabling recursion (you can turn
-+it back on with
-+.B \-R
-+of course).
-+.SP
-+.B commit
-+verifies that the selected files are up to date with the current revisions
-+in the source repository; it will notify you, and exit without
-+committing, if any of the specified files must be made current first
-+with
-+.` "cvs update".
-+.B commit
-+does not call the
-+.B update
-+command for you, but rather leaves that for you to do when
-+the time is right.
-+.SP
-+When all is well, an editor is invoked to allow you to enter a log
-+message that will be written to one or more logging programs and placed in the
-+source repository file.
-+You can instead specify the log message on the command line with the
-+.B \-m
-+option, thus suppressing the editor invocation, or use the
-+.B \-F
-+option to specify that the argument \fIfile\fP contains the log message.
-+.SP
-+The
-+.B \-r
-+option can be used to commit to a particular symbolic or numeric revision.
-+For example, to bring all your files up to the
-+revision ``3.0'' (including those that haven't changed), you might do:
-+.SP
-+.in +1i
-+.ft B
-+.nf
-+example% cvs commit -r3.0
-+.fi
-+.ft P
-+.in -1i
-+.SP
-+.B cvs
-+will only allow you to commit to a revision that is on the main trunk (a
-+revision with a single dot).
-+However, you can also commit to a branch revision (one that has an even
-+number of dots) with the
-+.B \-r
-+option.
-+To create a branch revision, one typically use the
-+.B \-b
-+option of the
-+.BR rtag " or " tag
-+commands.
-+Then, either
-+.BR checkout " or " update
-+can be used to base your sources on the newly created branch.
-+From that point on, all
-+.B commit
-+changes made within these working sources will be automatically added
-+to a branch revision, thereby not perturbing main-line development in any
-+way.
-+For example, if you had to create a patch to the 1.2 version of the
-+product, even though the 2.0 version is already under development, you
-+might do:
-+.SP
-+.in +1i
-+.ft B
-+.nf
-+example% cvs rtag -b -rFCS1_2 FCS1_2_Patch product_module
-+example% cvs checkout -rFCS1_2_Patch product_module
-+example% cd product_module
-+[[ hack away ]]
-+example% cvs commit
-+.fi
-+.ft P
-+.in -1i
-+.SP
-+Say you have been working on some extremely experimental software, based on
-+whatever revision you happened to checkout last week.
-+If others in your group would like to work on this software with you, but
-+without disturbing main-line development, you could commit your change to a
-+new branch.
-+Others can then checkout your experimental stuff and utilize the full
-+benefit of
-+.B cvs
-+conflict resolution.
-+The scenario might look like:
-+.SP
-+.in +1i
-+.ft B
-+.nf
-+example% cvs tag -b EXPR1
-+example% cvs update -rEXPR1
-+[[ hack away ]]
-+example% cvs commit
-+.fi
-+.ft P
-+.in -1i
-+.SP
-+Others would simply do
-+.` "cvs checkout -rEXPR1 whatever_module"
-+to work with you on the experimental change.
-+.TP
-+\fBdiff\fP [\fB\-kl\fP] [\fIformat_options\fP] [[\fB\-r\fP \fIrev1\fP | \fB\-D\fP \fIdate1\fP | \fB\-j\fP \fIrev1:date1\fP] [\fB\-r\fP \fIrev2\fP | \fB\-D\fP \fIdate2\fP | \fB\-j\fP \fIrev2:date2\fP]] [\fIfiles.\|.\|.\fP]
-+.I Requires:
-+working directory, repository.
-+.br
-+.I Changes:
-+nothing.
-+.br
-+You can compare your working files with revisions in the source
-+repository, with the
-+.` "cvs diff"
-+command. If you don't specify a particular revision, your files
-+are compared with the revisions they were based on. You can also use
-+the standard
-+.B cvs
-+command option
-+.B \-r
-+to specify a particular revision to compare your files with. Finally,
-+if you use
-+.B \-r
-+twice, you can see differences between two revisions in the
-+repository.
-+You can also specify
-+.B \-D
-+options to diff against a revision (on the head branch) in the past, and
-+you can also specify
-+.B \-j
-+options to diff against a revision relative to a branch tag in the past.
-+The
-+.B \-r
-+and
-+.B \-D
-+and
-+.B \-j
-+options can be mixed together with at most two options ever specified.
-+.SP
-+See
-+.` "cvs --help diff"
-+for a list of supported
-+.IR format_options .
-+.SP
-+If you don't specify any files,
-+.B diff
-+will display differences for all those files in the current directory
-+(and its subdirectories, unless you use the standard option
-+.BR \-l )
-+that
-+differ from the corresponding revision in the source repository
-+(i.e. files that
-+.I you
-+have changed), or that differ from the revision specified.
-+.TP
-+\fBexport\fP [\-\fBf\|lNnQq\fP] \fB\-r\fP \fIrev\fP\||\|\fB\-D\fP \fIdate\fP [\fB\-d\fP \fIdir\fP] [\fB\-k\fP \fIkflag\fP] \fImodule\fP.\|.\|.
-+.I Requires:
-+repository.
-+.br
-+.I Changes:
-+current directory.
-+.br
-+This command is a variant of
-+.` "cvs checkout";
-+use it when you want a copy of the source for \fImodule\fP
-+without the \fBcvs\fP administrative directories. For example, you
-+might use
-+.` "cvs export"
-+to prepare source for shipment
-+off-site. This command \fIrequires\fP that you specify a date or tag
-+(with \fB\-D\fP or \fB\-r\fP), so that you can count on reproducing
-+the source you ship to others.
-+.SP
-+The only non-standard options are
-+.` "\-d \fIdir\fP"
-+(write the
-+source into directory \fIdir\fP) and
-+.` "\-N"
-+(don't shorten
-+module paths).
-+These have the same meanings as the same options in
-+.` "cvs checkout".
-+.SP
-+The
-+.B \-kv
-+option is useful when
-+.B export
-+is used.
-+This causes any
-+keywords to be expanded such that an
-+.B import
-+done at some other site will not lose the keyword revision information.
-+Other \fIkflag\fPs may be used with
-+.` "cvs export"
-+and are described in
-+.BR co ( 1 ).
-+.TP
-+\fBhistory\fP [\fB\-\fP\fIreport\fP] [\fB\-\fP\fIflags\fP] [\fB\-\fP\fIoptions args\fP] [\fIfiles\fP.\|.\|.]
-+.I Requires:
-+the file
-+.` "$CVSROOT/CVSROOT/history"
-+.br
-+.I Changes:
-+nothing.
-+.br
-+\fBcvs\fP keeps a history file that tracks each use of the
-+\fBcheckout\fP, \fBcommit\fP, \fBrtag\fP, \fBupdate\fP, and \fBrelease\fP
-+commands. You can use
-+.` "cvs history"
-+to display this
-+information in various formats.
-+.SP
-+.I Warning:
-+.` "cvs history"
-+uses
-+.` "\-f",
-+.` "\-l",
-+.` "\-n",
-+and
-+.` "\-p"
-+in ways that conflict with the
-+descriptions in
-+.SM
-+COMMON COMMAND OPTIONS\c
-+\&.
-+.SP
-+Several options (shown above as \fB\-\fP\fIreport\fP) control what
-+kind of report is generated:
-+.TP 1i
-+.B \ \ \ \ \ \ \-c
-+Report on each time \fBcommit\fP was used (i.e., each time the
-+repository was modified).
-+.TP 1i
-+\fB\ \ \ \ \ \ \-m\fP \fImodule\fP
-+Report on a particular \fImodule\fP. (You can meaningfully use
-+\fB\-m\fP more than once on the command line.)
-+.TP 1i
-+.B \ \ \ \ \ \ \-o
-+Report on checked-out modules.
-+.TP 1i
-+.B \ \ \ \ \ \ \-T
-+Report on all tags.
-+.TP 1i
-+\fB\ \ \ \ \ \ \-x\fP \fItype\fP
-+Extract a particular set of record types \fIX\fP from the \fBcvs\fP
-+history. The types are indicated by single letters, which you may
-+specify in combination.
-+Certain commands have a single record type: \fBcheckout\fP (type `O'),
-+\fBrelease\fP (type `F'), and \fBrtag\fP (type `T'). One of four
-+record types may result from an \fBupdate\fP: `W', when the working copy
-+of a file is deleted during update (because it was gone from the
-+repository); `U', when a working file was copied from the
-+repository; `G', when a merge was necessary and it succeeded; and 'C',
-+when a merge was necessary but collisions were detected (requiring
-+manual merging). Finally, one of three record types results from
-+\fBcommit\fP: `M', when a file was modified; `A', when a file is first
-+added; and `R', when a file is removed.
-+.TP 1i
-+.B \ \ \ \ \ \ \-e
-+Everything (all record types); equivalent to specifying
-+.` "\-xMACFROGWUT".
-+.TP 1i
-+\fB\ \ \ \ \ \ \-z\fP \fIzone\fP
-+Use time zone
-+.I zone
-+when outputting history records.
-+The zone name
-+.B LT
-+stands for local time;
-+numeric offsets stand for hours and minutes ahead of UTC.
-+For example,
-+.B +0530
-+stands for 5 hours and 30 minutes ahead of (i.e. east of) UTC.
-+.PP
-+.RS .5i
-+The options shown as \fB\-\fP\fIflags\fP constrain the report without
-+requiring option arguments:
-+.RE
-+.TP 1i
-+.B \ \ \ \ \ \ \-a
-+Show data for all users (the default is to show data only for the user
-+executing
-+.` "cvs history").
-+.TP 1i
-+.B \ \ \ \ \ \ \-l
-+Show last modification only.
-+.TP 1i
-+.B \ \ \ \ \ \ \-w
-+Show only the records for modifications done from the same working
-+directory where
-+.` "cvs history"
-+is executing.
-+.PP
-+.RS .5i
-+The options shown as \fB\-\fP\fIoptions args\fP constrain the report
-+based on an argument:
-+.RE
-+.TP 1i
-+\fB\ \ \ \ \ \ \-b\fP \fIstr\fP
-+Show data back to a record containing the string \fIstr\fP in either
-+the module name, the file name, or the repository path.
-+.TP 1i
-+\fB\ \ \ \ \ \ \-D\fP \fIdate\fP
-+Show data since \fIdate\fP.
-+.TP 1i
-+\fB\ \ \ \ \ \ \-p\fP \fIrepository\fP
-+Show data for a particular source repository (you can specify several
-+\fB\-p\fP options on the same command line).
-+.TP 1i
-+\fB\ \ \ \ \ \ \-r\fP \fIrev\fP
-+Show records referring to revisions since the revision or tag
-+named \fIrev\fP appears in individual RCS files.
-+Each
-+.SM RCS
-+file is searched for the revision or tag.
-+.TP 1i
-+\fB\ \ \ \ \ \ \-t\fP \fItag\fP
-+Show records since tag \fItag\fP was last added to the history file.
-+This differs from the \fB-r\fP flag above in that it reads
-+only the history file, not the
-+.SM RCS
-+files, and is much faster.
-+.TP 1i
-+\fB\ \ \ \ \ \ \-u\fP \fIname\fP
-+Show records for user \fIname\fP.
-+.PP
-+.TP
-+\fBimport\fP [\fB\-\fP\fIoptions\fP] \fIrepository vendortag releasetag\fP.\|.\|.
-+.I Requires:
-+Repository, source distribution directory.
-+.br
-+.I Changes:
-+repository.
-+.br
-+Use
-+.` "cvs import"
-+to incorporate an entire source
-+distribution from an outside source (e.g., a source vendor) into your
-+source repository directory. You can use this command both for
-+initial creation of a repository, and for wholesale updates to the
-+module form the outside source.
-+.SP
-+The \fIrepository\fP argument gives a directory name (or a path to a
-+directory) under the CVS root directory for repositories; if the
-+directory did not exist, \fBimport\fP creates it.
-+.SP
-+When you use \fBimport\fP for updates to source that has been modified in your
-+source repository (since a prior \fBimport\fP), it
-+will notify you of any files that conflict in the two branches of
-+development; use
-+.` "cvs checkout -j"
-+to reconcile the differences, as \fBimport\fP instructs you to do.
-+.SP
-+By default, certain file names are ignored during
-+.` "cvs import":
-+names associated with
-+.SM CVS
-+administration, or with other common source control systems; common
-+names for patch files, object files, archive files, and editor backup
-+files; and other names that are usually artifacts of assorted utilities.
-+For an up to date list of ignored file names, see the Cederqvist manual (as
-+described in the SEE ALSO section of this manpage).
-+.SP
-+The outside source is saved in a first-level
-+branch, by default
-+.` "1.1.1".
-+Updates are leaves of this
-+branch; for example, files from the first imported collection of
-+source will be revision
-+.` "1.1.1.1",
-+then files from the first
-+imported update will be revision
-+.` "1.1.1.2",
-+and so on.
-+.SP
-+At least three arguments are required. \fIrepository\fP is needed to
-+identify the collection of source. \fIvendortag\fP is a tag for the
-+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
-+.` "cvs import".
-+.SP
-+One of the standard
-+.B cvs
-+command options is available: \fB\-m\fP
-+\fImessage\fP. If you do not specify a logging message with
-+\fB\-m\fP, your editor is invoked (as with \fBcommit\fP) to allow you
-+to enter one.
-+.SP
-+There are three additional special options.
-+.SP
-+Use
-+.` "\-d"
-+to specify that each file's time of last modification should be used
-+for the checkin date and time.
-+.SP
-+Use
-+.` "\-b \fIbranch\fP"
-+to specify a first-level branch other
-+than
-+.` "1.1.1".
-+.SP
-+Use
-+.` "\-I \fIname\fP"
-+to specify file names that should be
-+ignored during \fBimport\fP. You can use this option repeatedly.
-+To avoid ignoring any files at all (even those ignored by default),
-+specify
-+.` "\-I !".
-+.TP
-+\fBlog\fP [\fB\-l\fP] \fIrlog-options [files\fP\|.\|.\|.]
-+.I Requires:
-+repository, working directory.
-+.br
-+.I Changes:
-+nothing.
-+.br
-+.I Synonym:
-+.B rlog
-+.br
-+Display log information for \fIfiles\fP.
-+Among the more useful options are \fB\-h\fP
-+to display only the header (including tag definitions, but omitting
-+most of the full log); \fB\-r\fP to select logs on particular
-+revisions or ranges of revisions; and \fB\-d\fP to select particular
-+dates or date ranges. See
-+.BR rlog ( 1 )
-+for full explanations.
-+This command is recursive by default, unless the
-+.B \-l
-+option is specified.
-+.TP
-+\fBrdiff\fP [\fB\-\fP\fIflags\fP] [\fB\-V\fP \fIvn\fP] [\fB\-r\fP \fIt\fP|\fB\-D\fP \fId\fP [\fB\-r\fP \fIt2\fP|\fB\-D\fP \fId2\fP]] \fImodules\|.\|.\|.\fP
-+.I Requires:
-+repository.
-+.br
-+.I Changes:
-+nothing.
-+.br
-+.I Synonym:
-+.B patch
-+.br
-+Builds a Larry Wall format
-+.BR patch ( 1 )
-+file between two releases, that can be fed directly into the
-+.B patch
-+program to bring an old release up-to-date with the new release.
-+(This is one of the few \fBcvs\fP commands that operates directly from
-+the repository, and doesn't require a prior
-+.BR checkout .)
-+The diff output is sent to the standard output device.
-+You can specify (using the standard \fB\-r\fP and \fB\-D\fP options)
-+any combination of one or two revisions or dates.
-+If only one revision or date is specified, the
-+patch file reflects differences between that revision or date and the
-+current ``head'' revisions in the
-+.SM RCS
-+file.
-+.SP
-+Note that if the software release affected
-+is contained in more than one directory, then it may be necessary to
-+specify the
-+.B \-p
-+option to the
-+.B patch
-+command when patching the old sources, so that
-+.B patch
-+is able to find the files that are located in other directories.
-+.SP
-+The standard option \fIflags\fP \fB\-f\fP, and \fB\-l\fP
-+are available with this command. There are also several
-+special option flags:
-+.SP
-+If you use the
-+.B \-s
-+option, no patch output is produced.
-+Instead, a summary of the changed or added files between the two
-+releases is sent to the standard output device.
-+This is useful for finding out, for example, which files have changed
-+between two dates or revisions.
-+.SP
-+If you use the
-+.B \-t
-+option, a diff of the top two revisions is sent to the standard output device.
-+This is most useful for seeing what the last change to a file was.
-+.SP
-+If you use the
-+.B \-u
-+option, the patch output uses the newer ``unidiff'' format for context
-+diffs.
-+.SP
-+You can use
-+.B \-c
-+to explicitly specify the
-+.` "diff \-c"
-+form of context diffs
-+(which is the default), if you like.
-+.TP
-+\fBrelease\fP [\fB\-dQq\fP] \fImodules\fP\|.\|.\|.
-+.I Requires:
-+Working directory.
-+.br
-+.I Changes:
-+Working directory, history log.
-+.br
-+This command is meant to safely cancel the effect of
-+.` "cvs checkout".
-+Since
-+.B cvs
-+doesn't lock files, it isn't strictly necessary to use this command.
-+You can always simply delete your working directory, if you
-+like; but you risk losing changes you may have forgotten, and you
-+leave no trace in the
-+.B cvs
-+history file that you've abandoned your checkout.
-+.SP
-+Use
-+.` "cvs release"
-+to avoid these problems. This command
-+checks that no un-committed changes are present; that you are
-+executing it from immediately above, or inside, a \fBcvs\fP working
-+directory; and that the repository recorded for your files is the same
-+as the repository defined in the module database.
-+.SP
-+If all these conditions are true,
-+.` "cvs release"
-+leaves a
-+record of its execution (attesting to your intentionally abandoning
-+your checkout) in the
-+.B cvs
-+history log.
-+.SP
-+You can use the \fB\-d\fP flag to request that your working copies of
-+the source files be deleted if the \fBrelease\fP succeeds.
-+.TP
-+\fBremove\fP [\fB\-lR\fP] [\fIfiles\|.\|.\|.\fP]
-+.I Requires:
-+Working directory.
-+.br
-+.I Changes:
-+Working directory.
-+.br
-+.I Synonyms:
-+.BR rm ", " delete
-+.br
-+Use this command to declare that you wish to remove \fIfiles\fP from
-+the source repository. Like most
-+.B cvs
-+commands,
-+.` "cvs remove"
-+works on files in your working
-+directory, not directly on the repository. As a safeguard, it also
-+requires that you first erase the specified files from your working
-+directory.
-+.SP
-+The files are not actually removed until you apply your changes to the
-+repository with
-+.BR commit ;
-+at that point, the corresponding
-+.SM RCS
-+files in the source repository are
-+.I moved
-+into the
-+.` "Attic"
-+directory (also within the source repository).
-+.SP
-+This command is recursive by default, scheduling all physically removed
-+files that it finds for removal by the next
-+.BR commit .
-+Use the
-+.B \-l
-+option to avoid this recursion, or just specify that actual files that you
-+wish remove to consider.
-+.TP
-+\fBrtag\fP [\fB\-f\|alnRQq\fP] [\fB\-b\fP] [\fB\-d\fP] [\fB\-r\fP \fItag\fP | \fB\-D\fP \fIdate\fP] \fIsymbolic_tag\fP \fImodules\|.\|.\|.\fP
-+.I Requires:
-+repository.
-+.br
-+.I Changes:
-+repository.
-+.br
-+.I Synonym:
-+.B rfreeze
-+.br
-+You can use this command to assign symbolic tags to particular,
-+explicitly specified source versions in the repository.
-+.` "cvs rtag"
-+works directly on the repository contents (and requires no
-+prior
-+.BR checkout ).
-+Use
-+.` "cvs tag"
-+instead, to base the selection of
-+versions to tag on the contents of your working directory.
-+.SP
-+In general, tags (often the symbolic names of software distributions)
-+should not be removed, but the
-+.B \-d
-+option is available as a means to remove completely obsolete symbolic names
-+if necessary (as might be the case for an Alpha release, say).
-+.SP
-+.` "cvs rtag"
-+will not move a tag that already exists. With the \fB\-F\fP option,
-+however,
-+.` "cvs rtag"
-+will re-locate any instance of \fIsymbolic_tag\fP that already exists
-+on that file to the new repository versions. Without the \fB\-F\fP
-+option, attempting to use
-+.` "cvs rtag"
-+to apply a tag that already exists on that file will produce an error
-+message.
-+.SP
-+The \fB-b\fP option makes the tag a ``branch'' tag, allowing
-+concurrent, isolated development.
-+This is most useful for creating a patch to a previously released software
-+distribution.
-+.SP
-+You can use the standard \fB\-r\fP and \fB\-D\fP options to tag only those
-+files that already contain a certain tag. This method would be used
-+to rename a tag: tag only the files identified by the old tag, then delete the
-+old tag, leaving the new tag on exactly the same files as the old tag.
-+.SP
-+.B rtag
-+executes recursively by default, tagging all subdirectories of
-+\fImodules\fP you specify in the argument. You can restrict its
-+operation to top-level directories with the standard \fB\-l\fP option;
-+or you can explicitly request recursion with \fB\-R\fP.
-+.SP
-+The modules database can specify a program to execute whenever a tag
-+is specified; a typical use is to send electronic mail to a group of
-+interested parties. If you want to bypass that program, use the
-+standard \fB\-n\fP option.
-+.SP
-+Use the
-+.B \-a
-+option to have
-+.B rtag
-+look in the
-+.` "Attic"
-+for removed files that contain the specified tag.
-+The tag is removed from these files, which makes it convenient to re-use a
-+symbolic tag as development continues (and files get removed from the
-+up-coming distribution).
-+.TP
-+\fBstatus\fP [\fB\-lRqQ\fP] [\fB\-v\fP] [\fIfiles\fP\|.\|.\|.]
-+.I Requires:
-+working directory, repository.
-+.br
-+.I Changes:
-+nothing.
-+.br
-+Display a brief report on the current status of \fIfiles\fP with
-+respect to the source repository, including any ``sticky'' tags,
-+dates, or \fB\-k\fP options. (``Sticky'' options will restrict how
-+.` "cvs update"
-+operates until you reset them; see the
-+description of
-+.` "cvs update \-A\|.\|.\|.".)
-+.SP
-+You can also use this command to anticipate the potential impact of a
-+.` "cvs update"
-+on your working source directory. If you do
-+not specify any \fIfiles\fP explicitly, reports are shown for all
-+files that \fBcvs\fP has placed in your working directory. You can
-+limit the scope of this search to the current directory itself (not
-+its subdirectories) with the standard \fB\-l\fP option flag; or you
-+can explicitly request recursive status reports with the \fB\-R\fP
-+option.
-+.SP
-+The
-+.B \-v
-+option causes the symbolic tags for the
-+.SM RCS
-+file to be displayed as well.
-+.TP
-+\fBtag\fP [\fB\-lQqR\fP] [\fB\-F\fP] [\fB\-b\fP] [\fB\-d\fP] [\fB\-r\fP \fItag\fP | \fB\-D\fP \fIdate\fP] [\fB\-f\fP] \fIsymbolic_tag\fP [\fIfiles\fP\|.\|.\|.\|]
-+.I Requires:
-+working directory, repository.
-+.br
-+.I Changes:
-+repository.
-+.br
-+.I Synonym:
-+.B freeze
-+.br
-+Use this command to assign symbolic tags to the nearest repository
-+versions to your working sources. The tags are applied immediately to
-+the repository, as with \fBrtag\fP.
-+.SP
-+One potentially surprising aspect of the fact that \fBcvs tag\fP
-+operates on the repository is that you are tagging the checked-in
-+revisions, which may differ from locally modified files in your working
-+directory. If you want to avoid doing this by mistake, specify the
-+\fB-c\fP option to \fBcvs tag\fP. If there are any locally modified files, CVS
-+will abort with an error before it tags any files.
-+.SP
-+One use for tags is to record a ``snapshot'' of the current sources
-+when the software freeze date of a project arrives. As bugs are fixed
-+after the freeze date, only those changed sources that are to be part
-+of the release need be re-tagged.
-+.SP
-+The symbolic tags are meant to permanently record which revisions of which
-+files were used in creating a software distribution.
-+The
-+.BR checkout ,
-+.B export
-+and
-+.B update
-+commands allow you to extract an exact copy of a tagged release at any time in
-+the future, regardless of whether files have been changed, added, or removed
-+since the release was tagged.
-+.SP
-+You can use the standard \fB\-r\fP and \fB\-D\fP options to tag only those
-+files that already contain a certain tag. This method would be used
-+to rename a tag: tag only the files identified by the old tag, then delete the
-+old tag, leaving the new tag on exactly the same files as the old tag.
-+.SP
-+Specifying the \fB\-f\fP flag in addition to the \fB\-r\fP or \fB\-D\fP
-+flags will tag those files named on the command line even if they do not
-+contain the old tag or did not exist on the specified date.
-+.SP
-+By default (without a \fB\-r\fP or \fB\-D\fP flag)
-+the versions to be tagged are supplied
-+implicitly by the \fBcvs\fP records of your working files' history
-+rather than applied explicitly.
-+.SP
-+If you use
-+.` "cvs tag \-d \fIsymbolic_tag\fP\|.\|.\|.",
-+the
-+symbolic tag you specify is
-+.I deleted
-+instead of being added. \fIWarning\fP: Be very certain of your ground
-+before you delete a tag; doing this effectively discards some
-+historical information, which may later turn out to have been valuable.
-+.SP
-+.` "cvs tag"
-+will not move a tag that already exists. With the \fB\-F\fP option,
-+however,
-+.` "cvs tag"
-+will re-locate any instance of \fIsymbolic_tag\fP that already exists
-+on that file to the new repository versions. Without the \fB\-F\fP
-+option, attempting to use
-+.` "cvs tag"
-+to apply a tag that already exists on that file will produce an error
-+message.
-+.SP
-+The \fB-b\fP option makes the tag a ``branch'' tag, allowing
-+concurrent, isolated development.
-+This is most useful for creating a patch to a previously released software
-+distribution.
-+.SP
-+Normally,
-+.B tag
-+executes recursively through subdirectories; you can prevent this by
-+using the standard \fB\-l\fP option, or specify the recursion
-+explicitly by using \fB\-R\fP.
-+.TP
-+\fBupdate\fP [\fB\-ACdf\|lPpQqR\fP] [\fB\-d\fP] [\fB\-r\fP \fItag\fP|\fB\-D\fP \fIdate\fP] \fIfiles\|.\|.\|.\fP
-+.I Requires:
-+repository, working directory.
-+.br
-+.I Changes:
-+working directory.
-+.br
-+After you've run
-+.B checkout
-+to create your private copy of source from the common repository,
-+other developers will continue changing the central source. From time
-+to time, when it is convenient in your development process, you can
-+use the
-+.B update
-+command
-+from within your working directory to reconcile your work with any
-+revisions applied to the source repository since your last
-+.B checkout
-+or
-+.BR update .
-+.SP
-+.B update
-+keeps you informed of its progress by printing a line for each file,
-+prefaced with one of the characters
-+.` "U P A R M C ?"
-+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
-+recent versions available in the repository.
-+.TP 1i
-+\fBP\fP \fIfile\fP
-+Like \fBU\fP, but the CVS server sends a patch instead of an entire file.
-+This accomplishes the same thing as \fBU\fP using less bandwidth.
-+.TP 1i
-+\fBA\fP \fIfile\fP
-+The file has been \fIadded\fP to your private copy of the sources, and
-+will be added to the
-+source repository when you run
-+.` "cvs commit"
-+on the file.
-+This is a reminder to you that the file needs to be committed.
-+.TP 1i
-+\fBR\fP \fIfile\fP
-+The file has been \fIremoved\fP from your private copy of the sources, and
-+will be removed from the
-+source repository when you run
-+.` "cvs commit"
-+on the file.
-+This is a reminder to you that the file needs to be committed.
-+.TP 1i
-+\fBM\fP \fIfile\fP
-+The file is \fImodified\fP in your working directory.
-+.` "M"
-+can indicate one of two states for a file you're working on: either
-+there were no modifications to the same file in the repository, so
-+that your file remains as you last saw it; or there were modifications
-+in the repository as well as in your copy, but they were
-+\fImerged\fP successfully, without conflict, in your working
-+directory.
-+.TP 1i
-+\fBC\fP \fIfile\fP
-+A \fIconflict\fP was detected while trying to merge your changes to
-+\fIfile\fP with changes from the source repository. \fIfile\fP (the
-+copy in your working directory) is now the result of merging
-+the two versions; an unmodified copy of your file is also
-+in your working directory, with the name `\fB.#\fP\fIfile\fP\fB.\fP\fIversion\fP',
-+where
-+.I version
-+is the
-+revision that your modified file started from.
-+(Note that some systems automatically purge files that begin with
-+\&
-+.` ".#"
-+if they have not been accessed for a few days.
-+If you intend to keep a copy of your original file, it is a very good
-+idea to rename it.)
-+.TP 1i
-+\fB?\fP \fIfile\fP
-+\fIfile\fP is in your working directory, but does not correspond to
-+anything in the source repository, and is not in the list of files
-+for \fBcvs\fP to ignore (see the description of the \fB\-I\fP option).
-+.PP
-+.RS .5i
-+.SP
-+Use the
-+.B \-A
-+option to reset any sticky tags, dates, or
-+.B \-k
-+options. (If you get a working copy of a file by using one of the
-+\fB\-r\fP, \fB\-D\fP, or \fB\-k\fP options, \fBcvs\fP remembers the
-+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).
-+.SP
-+The \fB\-j\fP\fIbranch\fP option
-+merges the changes made between the
-+resulting revision and the revision that it is based on (e.g., if
-+the tag refers to a branch,
-+.B cvs
-+will merge all changes made in
-+that branch into your working file).
-+.SP
-+With two \fB-j\fP options,
-+.B cvs
-+will merge in the changes between the two respective revisions.
-+This can be used to ``remove'' a certain delta from your working file.
-+E.g., If the file foo.c is based on
-+revision 1.6 and I want to remove the changes made between 1.3 and
-+1.5, I might do:
-+.SP
-+.in +1i
-+.ft B
-+.nf
-+example% cvs update -j1.5 -j1.3 foo.c # note the order...
-+.fi
-+.ft P
-+.in -1i
-+.SP
-+In addition, each \fB-j\fP option can contain on optional date
-+specification which, when used with branches, can limit the chosen
-+revision to one within a specific date.
-+An optional date is specified by adding a colon (:) to the tag.
-+.SP
-+.in +1i
-+.ft B
-+.nf
-+-jSymbolic_Tag:Date_Specifier
-+.fi
-+.ft P
-+.in -1i
-+.SP
-+Use the
-+.B \-d
-+option to create any directories that exist in the repository if they're
-+missing from the working directory. (Normally, update acts only on
-+directories and files that were already enrolled in your
-+working directory.) This is useful for updating directories
-+that were created in the repository since the initial
-+\fBcheckout\fP; but it has an unfortunate side effect. If you
-+deliberately avoided certain directories in the repository when you
-+created your working directory (either through use of a module name or by
-+listing explicitly the files and directories you wanted on the
-+command line), then updating with
-+.B \-d
-+will create those directories, which may not be what you want.
-+.SP
-+Use \fB\-I\fP \fIname\fP to ignore files whose names match \fIname\fP
-+(in your working directory) during the update. You can specify
-+\fB\-I\fP more than once on the command line to specify several files
-+to ignore. By default,
-+\fBupdate\fP ignores files whose names match certain patterns; for
-+an up to date list of ignored file names, see the Cederqvist manual (as
-+described in the SEE ALSO section of this manpage).
-+.SP
-+Use
-+.` "\-I !"
-+to avoid ignoring any files at all.
-+.SP
-+Use the
-+.` "\-C"
-+option to overwrite locally modified files with clean copies from
-+the repository (the modified file is saved in
-+`\fB.#\fP\fIfile\fP\fB.\fP\fIrevision\fP', however).
-+.SP
-+The standard \fBcvs\fP command options \fB\-f\fP, \fB\-k\fP,
-+\fB\-l\fP, \fB\-P\fP, \fB\-p\fP, and \fB\-r\fP
-+are also available with \fBupdate\fP.
-+.RE
-+.SH "FILES"
-+For more detailed information on
-+.B cvs
-+supporting files, see
-+.BR cvs ( 5 ).
-+.LP
-+.I
-+Files in home directories:
-+.TP
-+\&.cvsrc
-+The
-+.B cvs
-+initialization file. Lines in this file can be used to specify default
-+options for each
-+.B cvs
-+command. For example the line
-+.` "diff \-c"
-+will ensure that
-+.` "cvs diff"
-+is always passed the
-+.B \-c
-+option in addition to any other options passed on the command line.
-+.TP
-+\&.cvswrappers
-+Specifies wrappers to be used in addition to those specified in the
-+CVSROOT/cvswrappers file in the repository.
-+.LP
-+.I
-+Files in working directories:
-+.TP
-+CVS
-+A directory of \fBcvs\fP administrative files.
-+.I
-+Do not delete.
-+.TP
-+CVS/Entries
-+List and status of files in your working directory.
-+.TP
-+CVS/Entries.Backup
-+A backup of
-+.` "CVS/Entries".
-+.TP
-+CVS/Entries.Static
-+Flag: do not add more entries on
-+.` "cvs update".
-+.TP
-+CVS/Root
-+Pathname to the repository (
-+.SM CVSROOT
-+) location at the time of checkout. This file is used instead
-+of the
-+.SM CVSROOT
-+environment variable if the environment variable is not
-+set. A warning message will be issued when the contents of this
-+file and the
-+.SM CVSROOT
-+environment variable differ. The file may be over-ridden by the
-+presence of the
-+.SM CVS_IGNORE_REMOTE_ROOT
-+environment variable.
-+.TP
-+CVS/Repository
-+Pathname to the corresponding directory in the source repository.
-+.TP
-+CVS/Tag
-+Contains the per-directory ``sticky'' tag or date information.
-+This file is created/updated when you specify
-+.B \-r
-+or
-+.B \-D
-+to the
-+.B checkout
-+or
-+.B update
-+commands, and no files are specified.
-+.TP
-+CVS/Checkin.prog
-+Name of program to run on
-+.` "cvs commit".
-+.TP
-+CVS/Update.prog
-+Name of program to run on
-+.` "cvs update".
-+.LP
-+.I
-+Files in source repositories:
-+.TP
-+$CVSROOT/CVSROOT
-+Directory of global administrative files for repository.
-+.TP
-+CVSROOT/commitinfo,v
-+Records programs for filtering
-+.` "cvs commit"
-+requests.
-+.TP
-+CVSROOT/cvswrappers,v
-+Records
-+.B cvs
-+wrapper commands to be used when checking files into and out of the
-+repository. Wrappers allow the file or directory to be processed
-+on the way in and out of CVS. The intended uses are many, one
-+possible use would be to reformat a C file before the file is checked
-+in, so all of the code in the repository looks the same.
-+.TP
-+CVSROOT/editinfo,v
-+Records programs for editing/validating
-+.` "cvs commit"
-+log entries.
-+.TP
-+CVSROOT/history
-+Log file of \fBcvs\fP transactions.
-+.TP
-+CVSROOT/loginfo,v
-+Records programs for piping
-+.` "cvs commit"
-+log entries.
-+.TP
-+CVSROOT/modules,v
-+Definitions for modules in this repository.
-+.TP
-+CVSROOT/rcsinfo,v
-+Records pathnames to templates used during a
-+.` "cvs commit"
-+operation.
-+.TP
-+CVSROOT/taginfo,v
-+Records programs for validating/logging
-+.` "cvs tag"
-+and
-+.` "cvs rtag"
-+operations.
-+.TP
-+MODULE/Attic
-+Directory for removed source files.
-+.TP
-+#cvs.lock
-+A lock directory created by
-+.B cvs
-+when doing sensitive changes to the
-+source repository.
-+.TP
-+#cvs.tfl.\fIpid\fP
-+Temporary lock file for repository.
-+.TP
-+#cvs.rfl.\fIpid\fP
-+A read lock.
-+.TP
-+#cvs.wfl.\fIpid\fP
-+A write lock.
-+.SH "ENVIRONMENT"
-+.TP
-+.SM CVSROOT
-+Should contain the full pathname to the root of the
-+.B cvs
-+source repository (where the
-+.SM RCS
-+files are kept). This information must be available to \fBcvs\fP for
-+most commands to execute; if
-+.SM CVSROOT
-+is not set, or if you wish to override it for one invocation, you can
-+supply it on the command line:
-+.` "cvs \-d \fIcvsroot cvs_command\fP\|.\|.\|."
-+You may not need to set
-+.SM CVSROOT
-+if your \fBcvs\fP binary has the right path compiled in.
-+.TP
-+.SM CVSREAD
-+If this is set,
-+.B checkout
-+and
-+.B update
-+will try hard to make the files in your working directory read-only.
-+When this is not set, the default behavior is to permit modification
-+of your working files.
-+.TP
-+.SM CVSREADONLYFS
-+If this is set, the
-+.B \-R
-+option is assumed, and
-+.B cvs
-+operates in read-only repository mode.
-+.TP
-+.SM RCSBIN
-+Specifies the full pathname where to find
-+.SM RCS
-+programs, such as
-+.BR co ( 1 )
-+and
-+.BR ci ( 1 )
-+(CVS 1.9 and older).
-+.TP
-+.SM CVSEDITOR
-+Specifies the program to use for recording log messages during
-+.BR commit .
-+If not set, the
-+.SM VISUAL
-+and
-+.SM EDITOR
-+environment variables are tried (in that order).
-+If neither is set, a system-dependent default editor (e.g.,
-+.BR vi )
-+is used.
-+.TP
-+.SM CVS_CLIENT_PORT
-+If this variable is set then
-+.B cvs
-+will use this port in
-+\fIpserver mode\fP
-+rather than the default port (cvspserver 2401).
-+.TP
-+.SM CVS_IGNORE_REMOTE_ROOT
-+If this variable is set then
-+.B cvs
-+will ignore all references to remote repositories in the CVS/Root file.
-+.TP
-+.SM CVS_OPTIONS
-+Specifies a set of default options for
-+.B cvs.
-+These options are interpreted before the startup file (\fI~/.cvsrc\fP) is read
-+and can be overridden by explicit command line parameters.
-+.TP
-+.SM CVS_RSH
-+.B cvs
-+uses the contents of this variable to determine the name of the
-+remote shell command to use when starting a
-+.B cvs
-+server. If this variable is not set then
-+.` "ssh"
-+is used.
-+.TP
-+.SM CVS_SERVER
-+.B cvs
-+uses the contents of this variable to determine the name of the
-+.B cvs
-+server command. If this variable is not set then
-+.` "cvs"
-+is used.
-+.TP
-+.SM CVSWRAPPERS
-+This variable is used by the
-+.` "cvswrappers"
-+script to determine the name of the wrapper file, in addition to the
-+wrappers defaults contained in the repository
-+.SM (CVSROOT/cvswrappers)
-+and the user's home directory (~/.cvswrappers).
-+.SH "AUTHORS"
-+.TP
-+Dick Grune
-+Original author of the
-+.B cvs
-+shell script version posted to
-+.B comp.sources.unix
-+in the volume6 release of December, 1986.
-+Credited with much of the
-+.B cvs
-+conflict resolution algorithms.
-+.TP
-+Brian Berliner
-+Coder and designer of the
-+.B cvs
-+program itself in April, 1989, based on the original work done by Dick.
-+.TP
-+Jeff Polk
-+Helped Brian with the design of the
-+.B cvs
-+module and vendor branch support and author of the
-+.BR checkin ( 1 )
-+shell script (the ancestor of
-+.` "cvs import").
-+.TP
-+And many others too numerous to mention here.
-+.SH "SEE ALSO"
-+The most comprehensive manual for CVS is
-+Version Management with CVS by Per Cederqvist et al. Depending on
-+your system, you may be able to get it with the
-+.B info cvs
-+command or it may be available as cvs.ps (postscript), cvs.texinfo
-+(texinfo source), or cvs.html.
-+.SP
-+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
-+.in -1i
-+.SP
-+.BR ci ( 1 ),
-+.BR co ( 1 ),
-+.BR cvs ( 5 ),
-+.BR cvsbug ( 8 ),
-+.BR diff ( 1 ),
-+.BR grep ( 1 ),
-+.BR patch ( 1 ),
-+.BR rcs ( 1 ),
-+.BR rcsdiff ( 1 ),
-+.BR rcsmerge ( 1 ),
-+.BR rlog ( 1 ).
-Index: man/cvsbug.8
-diff -u src/contrib/cvs/man/cvsbug.8:1.1.1.4 src/contrib/cvs/man/cvsbug.8:1.3
---- src/contrib/cvs/man/cvsbug.8:1.1.1.4 Mon Sep 2 14:50:19 2002
-+++ man/cvsbug.8 Mon Oct 2 15:43:55 2000
-@@ -17,6 +17,7 @@
- .\" General Public License for more details.
- .\"
- .\" ---------------------------------------------------------------------------
-+.\" FreeBSD: src/contrib/cvs/man/cvsbug.8,v 1.3 2000/10/02 06:43:55 peter Exp $
- .nh
- .TH CVSBUG 8 xVERSIONx "February 1993"
- .SH NAME
-Index: src/buffer.c
-diff -u src/contrib/cvs/src/buffer.c:1.1.1.7 src/contrib/cvs/src/buffer.c:1.5
---- src/contrib/cvs/src/buffer.c:1.1.1.7 Thu Apr 15 10:01:55 2004
-+++ src/buffer.c Thu Apr 15 10:17:26 2004
-@@ -1,5 +1,7 @@
- /* Code for the buffer data structure. */
-
-+/* FreeBSD: src/contrib/cvs/src/buffer.c,v 1.5 2004/04/15 01:17:26 peter Exp $ */
-+
- #include <assert.h>
- #include "cvs.h"
- #include "buffer.h"
-Index: src/checkout.c
-diff -u src/contrib/cvs/src/checkout.c:1.1.1.13 src/contrib/cvs/src/checkout.c:1.5
---- src/contrib/cvs/src/checkout.c:1.1.1.13 Thu Apr 15 10:01:55 2004
-+++ src/checkout.c Thu Apr 15 10:17:26 2004
-@@ -33,6 +33,10 @@
- * edited by the user, if necessary (when the repository is moved, e.g.)
- */
-
-+/*
-+ * FreeBSD: src/contrib/cvs/src/checkout.c,v 1.5 2004/04/15 01:17:26 peter Exp $
-+ */
-+
- #include <assert.h>
- #include "cvs.h"
-
-@@ -50,6 +54,7 @@
- "\t-N\tDon't shorten module paths if -d specified.\n",
- "\t-P\tPrune empty directories.\n",
- "\t-R\tProcess directories recursively.\n",
-+ "\t-T\tCreate Template file from local repository for remote commit.\n",
- "\t-c\t\"cat\" the module database.\n",
- "\t-f\tForce a head revision match if tag/date not found.\n",
- "\t-l\tLocal directory only, not recursive\n",
-@@ -92,6 +97,7 @@
- static char *join_rev1;
- static char *join_rev2;
- static int join_tags_validated;
-+static int pull_template;
- static char *preload_update_dir;
- static char *history_name;
- static enum mtype m_type;
-@@ -139,7 +145,7 @@
- else
- {
- m_type = CHECKOUT;
-- valid_options = "+ANnk:d:flRpQqcsr:D:j:P";
-+ valid_options = "+ANnk:d:flRpTQqcsr:D:j:P";
- valid_usage = checkout_usage;
- }
-
-@@ -168,6 +174,9 @@
- case 'n':
- run_module_prog = 0;
- break;
-+ case 'T':
-+ pull_template = 1;
-+ break;
- case 'Q':
- case 'q':
- #ifdef SERVER_SUPPORT
-@@ -1096,8 +1105,7 @@
- force_tag_match, 0 /* !local */ ,
- 1 /* update -d */ , aflag, checkout_prune_dirs,
- pipeout, which, join_rev1, join_rev2,
-- preload_update_dir, m_type == CHECKOUT,
-- repository);
-+ preload_update_dir, pull_template, repository);
- goto out;
- }
-
-@@ -1153,8 +1161,7 @@
- err += do_update (argc - 1, argv + 1, options, tag, date,
- force_tag_match, local_specified, 1 /* update -d */,
- aflag, checkout_prune_dirs, pipeout, which, join_rev1,
-- join_rev2, preload_update_dir, m_type == CHECKOUT,
-- repository);
-+ join_rev2, preload_update_dir, pull_template, repository);
- out:
- free (preload_update_dir);
- preload_update_dir = oldupdate;
-Index: src/client.c
-diff -u src/contrib/cvs/src/client.c:1.1.1.16 src/contrib/cvs/src/client.c:1.12
---- src/contrib/cvs/src/client.c:1.1.1.16 Fri Jun 11 04:05:37 2004
-+++ src/client.c Fri Jun 11 04:12:50 2004
-@@ -10,6 +10,10 @@
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details. */
-
-+/*
-+ * FreeBSD: src/contrib/cvs/src/client.c,v 1.12 2004/06/10 19:12:50 peter Exp $
-+ */
-+
- #ifdef HAVE_CONFIG_H
- # include "config.h"
- #endif /* HAVE_CONFIG_H */
-@@ -262,7 +266,7 @@
- }
-
- /* Now check the value for root. */
-- if (this_root && current_parsed_root
-+ if (CVSroot_cmdline == NULL && this_root && current_parsed_root
- && (strcmp (this_root, current_parsed_root->original) != 0))
- {
- /* Don't send this, since the CVSROOTs don't match. */
-@@ -4732,7 +4736,7 @@
- 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 = "rsh";
-+ cvs_rsh = "ssh";
- if (!cvs_server)
- cvs_server = "cvs";
-
-@@ -4793,7 +4797,7 @@
- int child_pid;
-
- if (!cvs_rsh)
-- cvs_rsh = "rsh";
-+ cvs_rsh = "ssh";
- if (!cvs_server)
- cvs_server = "cvs";
-
-@@ -5151,7 +5155,8 @@
- }
- else if (vers->ts_rcs == NULL
- || args->force
-- || strcmp (vers->ts_user, vers->ts_rcs) != 0)
-+ || strcmp (vers->ts_user, vers->ts_rcs) != 0
-+ || (vers->vn_user && *vers->vn_user == '0'))
- {
- if (args->no_contents
- && supported_request ("Is-modified"))
-Index: src/commit.c
-diff -u src/contrib/cvs/src/commit.c:1.1.1.14 src/contrib/cvs/src/commit.c:1.15
---- src/contrib/cvs/src/commit.c:1.1.1.14 Fri Jun 11 04:05:37 2004
-+++ src/commit.c Fri Jun 11 04:12:50 2004
-@@ -12,6 +12,7 @@
- *
- * The call is: cvs commit [options] files...
- *
-+ * FreeBSD: src/contrib/cvs/src/commit.c,v 1.15 2004/06/10 19:12:50 peter Exp $
- */
-
- #include <assert.h>
-Index: src/cvs.h
-diff -u src/contrib/cvs/src/cvs.h:1.1.1.15 src/contrib/cvs/src/cvs.h:1.20
---- src/contrib/cvs/src/cvs.h:1.1.1.15 Fri Jun 11 04:05:38 2004
-+++ src/cvs.h Fri Jun 11 04:12:50 2004
-@@ -9,6 +9,7 @@
- /*
- * basic information used in all source files
- *
-+ * FreeBSD: src/contrib/cvs/src/cvs.h,v 1.20 2004/06/10 19:12:50 peter Exp $
- */
-
-
-@@ -194,6 +195,7 @@
- #define CVSROOTADM_WRITERS "writers"
- #define CVSROOTADM_PASSWD "passwd"
- #define CVSROOTADM_CONFIG "config"
-+#define CVSROOTADM_OPTIONS "options"
-
- #define CVSNULLREPOS "Emptydir" /* an empty directory */
-
-@@ -263,6 +265,8 @@
- #define CVSREAD_ENV "CVSREAD" /* make files read-only */
- #define CVSREAD_DFLT 0 /* writable files by default */
-
-+#define CVSREADONLYFS_ENV "CVSREADONLYFS" /* repository is read-only */
-+
- #define TMPDIR_ENV "TMPDIR" /* Temporary directory */
-
- #define EDITOR1_ENV "CVSEDITOR" /* which editor to use */
-@@ -372,6 +376,7 @@
- extern int use_editor;
- extern int cvswrite;
- extern mode_t cvsumask;
-+extern char *RCS_citag;
-
-
-
-@@ -390,7 +395,9 @@
-
- extern int trace; /* Show all commands */
- extern int noexec; /* Don't modify disk anywhere */
-+extern int readonlyfs; /* fail on all write locks; succeed all read locks */
- extern int logoff; /* Don't write history entry */
-+extern int require_real_user; /* skip CVSROOT/passwd, /etc/passwd users only*/
-
- extern int top_level_admin;
-
-@@ -498,6 +505,7 @@
- char *strcat_filename_onto_homedir PROTO ((const char *, const char *));
- char *cvs_temp_name PROTO ((void));
- FILE *cvs_temp_file PROTO ((char **filename));
-+void parseopts PROTO ((const char *root));
-
- int numdots PROTO((const char *s));
- char *increment_revnum PROTO ((const char *));
-@@ -576,6 +584,7 @@
- void WriteTag PROTO ((const char *dir, const char *tag, const char *date,
- int nonbranch, const char *update_dir,
- const char *repository));
-+void WriteTemplate PROTO ((const char *dir, const char *update_dir));
- void cat_module PROTO((int status));
- void check_entries PROTO((char *dir));
- void close_module PROTO((DBM * db));
-Index: src/cvsbug.in
-diff -u src/contrib/cvs/src/cvsbug.in:1.1.1.3 src/contrib/cvs/src/cvsbug.in:1.2
---- src/contrib/cvs/src/cvsbug.in:1.1.1.3 Thu Apr 15 10:01:55 2004
-+++ src/cvsbug.in Wed Sep 7 22:39:44 2005
-@@ -109,14 +109,12 @@
- /usr/bin/ypcat passwd 2>/dev/null | cat - /etc/passwd | grep "^$LOGNAME:" |
- cut -f5 -d':' | sed -e 's/,.*//' > $TEMP
- ORIGINATOR="`cat $TEMP`"
-- rm -f $TEMP
- fi
- fi
-
- if [ "$ORIGINATOR" = "" ]; then
- grep "^$LOGNAME:" /etc/passwd | cut -f5 -d':' | sed -e 's/,.*//' > $TEMP
- ORIGINATOR="`cat $TEMP`"
-- rm -f $TEMP
- fi
-
- if [ -n "$ORGANIZATION" ]; then
-Index: src/diff.c
-diff -u src/contrib/cvs/src/diff.c:1.1.1.12 src/contrib/cvs/src/diff.c:1.21
---- src/contrib/cvs/src/diff.c:1.1.1.12 Thu Apr 15 10:01:55 2004
-+++ src/diff.c Thu Apr 15 10:31:28 2004
-@@ -12,6 +12,8 @@
- *
- * Without any file arguments, runs diff against all the currently modified
- * files.
-+ *
-+ * FreeBSD: src/contrib/cvs/src/diff.c,v 1.21 2004/04/15 01:31:28 peter Exp $
- */
-
- #include <assert.h>
-@@ -52,6 +54,7 @@
- static char *diff_rev1, *diff_rev2;
- /* Command line dates, from -D option. Malloc'd. */
- static char *diff_date1, *diff_date2;
-+static char *diff_join1, *diff_join2;
- static char *use_rev1, *use_rev2;
- static int have_rev1_label, have_rev2_label;
-
-@@ -272,6 +275,8 @@
- diff_rev2 = NULL;
- diff_date1 = NULL;
- diff_date2 = NULL;
-+ diff_join1 = NULL;
-+ diff_join2 = NULL;
-
- optind = 0;
- /* FIXME: This should really be allocating an argv to be passed to diff
-@@ -282,7 +287,7 @@
- * to diff.
- */
- while ((c = getopt_long (argc, argv,
-- "+abcdefhilnpstuwy0123456789BHNRTC:D:F:I:L:U:W:k:r:",
-+ "+abcdefhilnpstuwy0123456789BHNRTC:D:F:I:L:U:W:k:r:j:",
- longopts, &option_index)) != -1)
- {
- switch (c)
-@@ -345,6 +350,27 @@
- free (options);
- options = RCS_check_kflag (optarg);
- break;
-+ case 'j':
-+ {
-+ char *ptr;
-+ char *cpy = strdup(optarg);
-+
-+ if ((ptr = strchr(optarg, ':')) != NULL)
-+ *ptr++ = 0;
-+ if (diff_rev2 != NULL || diff_date2 != NULL)
-+ error (1, 0,
-+ "no more than two revisions/dates can be specified");
-+ if (diff_rev1 != NULL || diff_date1 != NULL) {
-+ diff_join2 = cpy;
-+ diff_rev2 = optarg;
-+ diff_date2 = ptr ? Make_Date(ptr) : NULL;
-+ } else {
-+ diff_join1 = cpy;
-+ diff_rev1 = optarg;
-+ diff_date1 = ptr ? Make_Date(ptr) : NULL;
-+ }
-+ }
-+ break;
- case 'r':
- if (diff_rev2 != NULL || diff_date2 != NULL)
- error (1, 0,
-@@ -393,13 +419,18 @@
- send_option_string (opts);
- if (options[0] != '\0')
- send_arg (options);
-- if (diff_rev1)
-+ if (diff_join1)
-+ option_with_arg ("-j", diff_join1);
-+ else if (diff_rev1)
- option_with_arg ("-r", diff_rev1);
-- if (diff_date1)
-+ else if (diff_date1)
- client_senddate (diff_date1);
-- if (diff_rev2)
-+
-+ if (diff_join2)
-+ option_with_arg ("-j", diff_join2);
-+ else if (diff_rev2)
- option_with_arg ("-r", diff_rev2);
-- if (diff_date2)
-+ else if (diff_date2)
- client_senddate (diff_date2);
- send_arg ("--");
-
-@@ -413,28 +444,26 @@
-
- send_to_server ("diff\012", 0);
- err = get_responses_and_close ();
-- free (options);
-- options = NULL;
-- return (err);
-- }
-+ } 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);
-+ {
-+ 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);
-+ }
-
- /* clean up */
- free (options);
-@@ -444,6 +473,10 @@
- free (diff_date1);
- if (diff_date2 != NULL)
- free (diff_date2);
-+ if (diff_join1 != NULL)
-+ free (diff_join1);
-+ if (diff_join2 != NULL)
-+ free (diff_join2);
-
- return (err);
- }
-@@ -489,7 +522,7 @@
- int exists;
-
- exists = 0;
-- /* special handling for TAG_HEAD */
-+ /* special handling for TAG_HEAD XXX */
- if (diff_rev1 && strcmp (diff_rev1, TAG_HEAD) == 0)
- {
- char *head =
-@@ -886,7 +919,7 @@
-
- if (diff_rev1 || diff_date1)
- {
-- /* special handling for TAG_HEAD */
-+ /* special handling for TAG_HEAD XXX */
- if (diff_rev1 && strcmp (diff_rev1, TAG_HEAD) == 0)
- {
- if (vers->vn_rcs != NULL && vers->srcfile != NULL)
-@@ -902,7 +935,7 @@
- }
- if (diff_rev2 || diff_date2)
- {
-- /* special handling for TAG_HEAD */
-+ /* special handling for TAG_HEAD XXX */
- if (diff_rev2 && strcmp (diff_rev2, TAG_HEAD) == 0)
- {
- if (vers->vn_rcs != NULL && vers->srcfile != NULL)
-Index: src/entries.c
-diff -u src/contrib/cvs/src/entries.c:1.1.1.8 src/contrib/cvs/src/entries.c:1.4
---- src/contrib/cvs/src/entries.c:1.1.1.8 Thu Apr 15 10:01:55 2004
-+++ src/entries.c Thu Apr 15 10:41:05 2004
-@@ -11,6 +11,9 @@
- * the Entries file.
- */
-
-+/*
-+ * FreeBSD: src/contrib/cvs/src/entries.c,v 1.4 2004/04/15 01:41:05 peter Exp $
-+ */
- #include "cvs.h"
- #include "getline.h"
-
-@@ -635,6 +638,72 @@
- return (p);
- }
-
-+static char *root_template;
-+
-+static int
-+get_root_template(const char *repository, const char *path)
-+{
-+ if (root_template) {
-+ if (strcmp(path, root_template) == 0)
-+ return(0);
-+ free(root_template);
-+ }
-+ if ((root_template = strdup(path)) == NULL)
-+ return(-1);
-+ return(0);
-+}
-+
-+/*
-+ * Write out/Clear the CVS/Template file.
-+ */
-+void
-+WriteTemplate (dir, update_dir)
-+ const char *dir;
-+ const char *update_dir;
-+{
-+ char *tmp = NULL;
-+ struct stat st1;
-+ struct stat st2;
-+
-+ if (Parse_Info(CVSROOTADM_RCSINFO, "cvs", get_root_template, 1) < 0)
-+ return;
-+
-+ if (asprintf(&tmp, "%s/%s", dir, CVSADM_TEMPLATE) < 0)
-+ error (1, errno, "out of memory");
-+
-+ if (stat(root_template, &st1) == 0) {
-+ if (stat(tmp, &st2) < 0 || st1.st_mtime != st2.st_mtime) {
-+ FILE *fi;
-+ FILE *fo;
-+
-+ if ((fi = open_file(root_template, "r")) != NULL) {
-+ if ((fo = open_file(tmp, "w")) != NULL) {
-+ int n;
-+ char buf[256];
-+
-+ while ((n = fread(buf, 1, sizeof(buf), fi)) > 0)
-+ fwrite(buf, 1, n, fo);
-+ fflush(fo);
-+ if (ferror(fi) || ferror(fo)) {
-+ fclose(fo);
-+ remove(tmp);
-+ error (1, errno, "error copying Template");
-+ } else {
-+ struct timeval times[2];
-+ fclose(fo);
-+ times[0].tv_sec = st1.st_mtime;
-+ times[0].tv_usec = 0;
-+ times[1] = times[0];
-+ utimes(tmp, times);
-+ }
-+ }
-+ fclose(fi);
-+ }
-+ }
-+ }
-+ free(tmp);
-+}
-+
- /*
- * Write out/Clear the CVS/Tag file.
- */
-Index: src/filesubr.c
-diff -u src/contrib/cvs/src/filesubr.c:1.1.1.12 src/contrib/cvs/src/filesubr.c:1.12
---- src/contrib/cvs/src/filesubr.c:1.1.1.12 Fri Jun 11 04:05:37 2004
-+++ src/filesubr.c Fri Jun 11 04:12:50 2004
-@@ -17,6 +17,10 @@
- definitions under operating systems (like, say, Windows NT) with different
- file system semantics. */
-
-+/*
-+ * FreeBSD: src/contrib/cvs/src/filesubr.c,v 1.12 2004/06/10 19:12:50 peter Exp $
-+ */
-+
- #include <assert.h>
- #include "cvs.h"
-
-@@ -872,8 +876,8 @@
- const char *link;
- {
- char *file = NULL;
-- int buflen = 128;
-- int link_name_len;
-+ int buflen = BUFSIZ;
-+ int linklen;
-
- /* Get the name of the file to which `from' is linked.
- FIXME: what portability issues arise here? Are readlink &
-@@ -881,15 +885,15 @@
- do
- {
- file = xrealloc (file, buflen);
-- link_name_len = readlink (link, file, buflen - 1);
-+ errno = 0;
-+ linklen = readlink (link, file, buflen - 1);
- buflen *= 2;
- }
-- while (link_name_len < 0 && errno == ENAMETOOLONG);
-+ while (linklen == -1 && errno == ENAMETOOLONG);
-
-- if (link_name_len < 0)
-+ if (linklen == -1)
- error (1, errno, "cannot readlink %s", link);
--
-- file[link_name_len] = '\0';
-+ file[linklen] = '\0';
-
- return file;
- }
-Index: src/import.c
-diff -u src/contrib/cvs/src/import.c:1.1.1.13 src/contrib/cvs/src/import.c:1.12
---- src/contrib/cvs/src/import.c:1.1.1.13 Thu Apr 15 10:01:55 2004
-+++ src/import.c Thu Apr 15 10:17:27 2004
-@@ -14,6 +14,8 @@
- * VendorReleTag Tag for this particular release
- *
- * Additional arguments specify more Vendor Release Tags.
-+ *
-+ * FreeBSD: src/contrib/cvs/src/import.c,v 1.12 2004/04/15 01:17:27 peter Exp $
- */
-
- #include "cvs.h"
-Index: src/lock.c
-diff -u src/contrib/cvs/src/lock.c:1.1.1.12 src/contrib/cvs/src/lock.c:1.13
---- src/contrib/cvs/src/lock.c:1.1.1.12 Thu Apr 15 10:01:55 2004
-+++ src/lock.c Thu Apr 15 10:17:27 2004
-@@ -8,6 +8,8 @@
- * Set Lock
- *
- * Lock file support for CVS.
-+ *
-+ * FreeBSD: src/contrib/cvs/src/lock.c,v 1.13 2004/04/15 01:17:27 peter Exp $
- */
-
- /* The node Concurrency in doc/cvs.texinfo has a brief introduction to
-@@ -407,7 +409,7 @@
- (void) fprintf (stderr, "%s-> Reader_Lock(%s)\n", CLIENT_SERVER_STR,
- xrepository);
-
-- if (noexec)
-+ if (noexec || readonlyfs)
- return 0;
-
- /* we only do one directory at a time for read locks! */
-@@ -484,6 +486,11 @@
- if (noexec)
- return 0;
-
-+ if (readonlyfs) {
-+ error (0, 0, "write lock failed - read-only repository");
-+ return (1);
-+ }
-+
- /* We only know how to do one list at a time */
- if (locklist != (List *) NULL)
- {
-Index: src/log.c
-diff -u src/contrib/cvs/src/log.c:1.1.1.12 src/contrib/cvs/src/log.c:1.2
---- src/contrib/cvs/src/log.c:1.1.1.12 Fri Jun 11 04:05:37 2004
-+++ src/log.c Tue Jul 6 17:10:38 2004
-@@ -10,6 +10,8 @@
- * Prints the RCS "log" (rlog) information for the specified files. With no
- * argument, prints the log information for all the files in the directory
- * (recursive by default).
-+ *
-+ * FreeBSD: src/contrib/cvs/src/log.c,v 1.2 2004/07/06 08:10:38 des Exp $
- */
-
- #include "cvs.h"
-@@ -1605,8 +1607,8 @@
- &sec);
- if (year < 1900)
- year += 1900;
-- sprintf (buf, "%04d/%02d/%02d %02d:%02d:%02d", year, mon, mday,
-- hour, min, sec);
-+ sprintf (buf, "%04d%c%02d%c%02d %02d:%02d:%02d",
-+ year, datesep, mon, datesep, mday, hour, min, sec);
- cvs_output (buf, 0);
-
- cvs_output ("; author: ", 0);
-Index: src/login.c
-diff -u src/contrib/cvs/src/login.c:1.1.1.9 src/contrib/cvs/src/login.c:1.9
---- src/contrib/cvs/src/login.c:1.1.1.9 Thu Apr 15 10:01:55 2004
-+++ src/login.c Sat Apr 23 02:58:25 2005
-@@ -5,6 +5,8 @@
- * specified in the README file that comes with CVS.
- *
- * Allow user to log in for an authenticating server.
-+ *
-+ * FreeBSD: src/contrib/cvs/src/login.c,v 1.9 2005/04/22 17:58:25 simon Exp $
- */
-
- #include "cvs.h"
-@@ -114,7 +116,7 @@
-
- if (isspace(*(linebuf + 1)))
- /* special case since strtoul ignores leading white space */
-- entry_version = 0;
-+ q = linebuf + 1;
- else
- entry_version = strtoul (linebuf + 1, &q, 10);
-
-Index: src/logmsg.c
-diff -u src/contrib/cvs/src/logmsg.c:1.1.1.10 src/contrib/cvs/src/logmsg.c:1.12
---- src/contrib/cvs/src/logmsg.c:1.1.1.10 Thu Apr 15 10:01:55 2004
-+++ src/logmsg.c Thu Apr 15 10:17:27 2004
-@@ -4,6 +4,8 @@
- *
- * 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.
-+ *
-+ * FreeBSD: src/contrib/cvs/src/logmsg.c,v 1.12 2004/04/15 01:17:27 peter Exp $
- */
-
- #include <assert.h>
-@@ -226,6 +228,8 @@
- (*messagep)[strlen (*messagep) - 1] != '\n')
- (void) fprintf (fp, "\n");
- }
-+ else
-+ (void) fprintf (fp, "\n");
-
- if (repository != NULL)
- /* tack templates on if necessary */
-Index: src/main.c
-diff -u src/contrib/cvs/src/main.c:1.1.1.13 src/contrib/cvs/src/main.c:1.25
---- src/contrib/cvs/src/main.c:1.1.1.13 Thu Apr 15 10:01:55 2004
-+++ src/main.c Tue Jul 6 17:10:38 2004
-@@ -10,10 +10,12 @@
- * Credit to Dick Grune, Vrije Universiteit, Amsterdam, for writing
- * the shell-script CVS system that this is based on.
- *
-+ * FreeBSD: src/contrib/cvs/src/main.c,v 1.25 2004/07/06 08:10:38 des Exp $
- */
-
- #include <assert.h>
- #include "cvs.h"
-+#include "prepend_args.h"
-
- #ifdef HAVE_WINSOCK_H
- #include <winsock.h>
-@@ -41,6 +43,8 @@
- int quiet = 0;
- int trace = 0;
- int noexec = 0;
-+int readonlyfs = 0;
-+int require_real_user = 0;
- int logoff = 0;
-
- /* Set if we should be writing CVSADM directories at top level. At
-@@ -106,7 +110,7 @@
- {
- { "add", "ad", "new", add, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR },
- { "admin", "adm", "rcs", admin, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR },
-- { "annotate", "ann", NULL, annotate, CVS_CMD_USES_WORK_DIR },
-+ { "annotate", "ann", "blame", annotate, CVS_CMD_USES_WORK_DIR },
- { "checkout", "co", "get", checkout, 0 },
- { "commit", "ci", "com", commit, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR },
- { "diff", "di", "dif", diff, CVS_CMD_USES_WORK_DIR },
-@@ -247,8 +251,10 @@
- " -q Cause CVS to be somewhat quiet.\n",
- " -r Make checked-out files read-only.\n",
- " -w Make checked-out files read-write (default).\n",
-+ " -g Force group-write perms on checked-out files.\n",
- " -n Do not execute anything that will change the disk.\n",
- " -t Show trace of program execution -- try with -n.\n",
-+ " -R Assume repository is read-only, such as CDROM\n",
- " -v CVS version and copyright.\n",
- " -T tmpdir Use 'tmpdir' for temporary files.\n",
- " -e editor Use 'editor' for editing log information.\n",
-@@ -406,7 +412,7 @@
- int help = 0; /* Has the user asked for help? This
- lets us support the `cvs -H cmd'
- convention to give help for cmd. */
-- static const char short_options[] = "+Qqrwtnvb:T:e:d:Hfz:s:xa";
-+ static const char short_options[] = "+QqgrwtnRvb:T:e:d:Hfz:s:xaU";
- static struct option long_options[] =
- {
- {"help", 0, NULL, 'H'},
-@@ -469,6 +475,12 @@
- }
- if (getenv (CVSREAD_ENV) != NULL)
- cvswrite = 0;
-+ if (getenv (CVSREADONLYFS_ENV) != NULL) {
-+ readonlyfs = 1;
-+ logoff = 1;
-+ }
-+
-+ prepend_default_options (getenv ("CVS_OPTIONS"), &argc, &argv);
-
- /* Set this to 0 to force getopt initialization. getopt() sets
- this to 1 internally. */
-@@ -531,9 +543,20 @@
- case 'w':
- cvswrite = 1;
- break;
-+ case 'g':
-+ /*
-+ * force full group write perms (used for shared checked-out
-+ * source trees, see manual page)
-+ */
-+ umask(umask(077) & 007);
-+ break;
- case 't':
- trace = 1;
- break;
-+ case 'R':
-+ readonlyfs = 1;
-+ logoff = 1;
-+ break;
- case 'n':
- noexec = 1;
- logoff = 1;
-@@ -623,6 +646,11 @@
- We will issue an error later if stream
- authentication is not supported. */
- break;
-+ case 'U':
-+#ifdef SERVER_SUPPORT
-+ require_real_user = 1;
-+#endif
-+ break;
- case '?':
- default:
- usage (usg);
-@@ -749,6 +777,12 @@
- (void) putenv (env);
- /* do not free env, as putenv has control of it */
- }
-+ {
-+ char *env;
-+ env = xmalloc (sizeof "CVS_PID=" + 32); /* XXX pid < 10^32 */
-+ (void) sprintf (env, "CVS_PID=%ld", (long) getpid ());
-+ (void) putenv (env);
-+ }
- #endif
-
- #ifndef DONT_USE_SIGNALS
-@@ -974,6 +1008,9 @@
- if we didn't, then there would be no way to check in a new
- CVSROOT/config file to fix the broken one! */
- parse_config (current_parsed_root->directory);
-+
-+ /* Now is a convenient time to read CVSROOT/options */
-+ parseopts(current_parsed_root->directory);
- }
-
- #ifdef CLIENT_SUPPORT
-@@ -1166,3 +1203,64 @@
- (void) fprintf (stderr, *cpp);
- error_exit ();
- }
-+
-+void
-+parseopts(root)
-+ const char *root;
-+{
-+ char path[PATH_MAX];
-+ int save_errno;
-+ char buf[1024];
-+ const char *p;
-+ char *q;
-+ FILE *fp;
-+
-+ if (root == NULL) {
-+ printf("no CVSROOT in parseopts\n");
-+ return;
-+ }
-+ p = strchr (root, ':');
-+ if (p)
-+ p++;
-+ else
-+ p = root;
-+ if (p == NULL) {
-+ printf("mangled CVSROOT in parseopts\n");
-+ return;
-+ }
-+ (void) sprintf (path, "%s/%s/%s", p, CVSROOTADM, CVSROOTADM_OPTIONS);
-+ if ((fp = fopen(path, "r")) != NULL) {
-+ while (fgets(buf, sizeof buf, fp) != NULL) {
-+ if (buf[0] == '#')
-+ continue;
-+ q = strrchr(buf, '\n');
-+ if (q)
-+ *q = '\0';
-+
-+ if (!strcmp(buf, "iso8601")) {
-+ datesep = '-';
-+ }
-+ if (!strncmp(buf, "tag=", 4)) {
-+ char *what;
-+ char *rcs_localid;
-+
-+ rcs_localid = buf + 4;
-+ RCS_setlocalid(rcs_localid);
-+ }
-+ if (!strncmp(buf, "tagexpand=", 10)) {
-+ char *what;
-+ char *rcs_incexc;
-+
-+ rcs_incexc = buf + 10;
-+ RCS_setincexc(rcs_incexc);
-+ }
-+ /*
-+ * OpenBSD has a "umask=" and "dlimit=" command, we silently
-+ * ignore them here since they are not much use to us. cvsumask
-+ * defaults to 002 already, and the dlimit (data size limit)
-+ * should really be handled elsewhere (eg: login.conf).
-+ */
-+ }
-+ fclose(fp);
-+ }
-+}
-Index: src/mkmodules.c
-diff -u src/contrib/cvs/src/mkmodules.c:1.1.1.12 src/contrib/cvs/src/mkmodules.c:1.13
---- src/contrib/cvs/src/mkmodules.c:1.1.1.12 Thu Apr 15 10:01:55 2004
-+++ src/mkmodules.c Thu Apr 15 10:17:27 2004
-@@ -3,7 +3,10 @@
- * 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. */
-+ * specified in the README file that comes with the CVS kit.
-+ *
-+ * FreeBSD: src/contrib/cvs/src/mkmodules.c,v 1.13 2004/04/15 01:17:27 peter Exp $
-+ */
-
- #include "cvs.h"
- #include "getline.h"
-Index: src/parseinfo.c
-diff -u src/contrib/cvs/src/parseinfo.c:1.1.1.12 src/contrib/cvs/src/parseinfo.c:1.3
---- src/contrib/cvs/src/parseinfo.c:1.1.1.12 Thu Apr 15 10:01:55 2004
-+++ src/parseinfo.c Thu Apr 15 10:17:27 2004
-@@ -4,6 +4,8 @@
- *
- * 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.
-+ *
-+ * FreeBSD: src/contrib/cvs/src/parseinfo.c,v 1.3 2004/04/15 01:17:27 peter Exp $
- */
-
- #include "cvs.h"
-@@ -350,6 +352,25 @@
- goto error_return;
- }
- }
-+ else if (strcmp (line, "tag") == 0) {
-+ RCS_setlocalid(p);
-+ }
-+ else if (strcmp (line, "umask") == 0) {
-+ cvsumask = (mode_t)(strtol(p, NULL, 8) & 0777);
-+ }
-+ else if (strcmp (line, "dlimit") == 0) {
-+#ifdef BSD
-+#include <sys/resource.h>
-+ struct rlimit rl;
-+
-+ if (getrlimit(RLIMIT_DATA, &rl) != -1) {
-+ rl.rlim_cur = atoi(p);
-+ rl.rlim_cur *= 1024;
-+
-+ (void) setrlimit(RLIMIT_DATA, &rl);
-+ }
-+#endif /* BSD */
-+ }
- else if (strcmp (line, "PreservePermissions") == 0)
- {
- if (strcmp (p, "no") == 0)
-Index: src/patch.c
-diff -u src/contrib/cvs/src/patch.c:1.1.1.13 src/contrib/cvs/src/patch.c:1.2
---- src/contrib/cvs/src/patch.c:1.1.1.13 Thu Apr 15 10:01:55 2004
-+++ src/patch.c Sat Apr 23 02:58:25 2005
-@@ -10,6 +10,8 @@
- * 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: src/contrib/cvs/src/patch.c,v 1.2 2005/04/22 17:58:25 simon Exp $
- */
-
- #include <assert.h>
-@@ -385,6 +387,7 @@
- struct utimbuf t;
- char *vers_tag, *vers_head;
- char *rcs = NULL;
-+ char *rcs_orig = NULL;
- RCSNode *rcsfile;
- FILE *fp1, *fp2, *fp3;
- int ret = 0;
-@@ -415,7 +418,7 @@
- if ((rcsfile->flags & VALID) && (rcsfile->flags & INATTIC))
- isattic = 1;
-
-- rcs = xmalloc (strlen (finfo->file) + sizeof (RCSEXT) + 5);
-+ rcs_orig = rcs = xmalloc (strlen (finfo->file) + sizeof (RCSEXT) + 5);
- (void) sprintf (rcs, "%s%s", finfo->file, RCSEXT);
-
- /* if vers_head is NULL, may have been removed from the release */
-@@ -757,8 +760,8 @@
- free (vers_tag);
- if (vers_head != NULL)
- free (vers_head);
-- if (rcs != NULL)
-- free (rcs);
-+ if (rcs_orig)
-+ free (rcs_orig);
- return ret;
- }
-
-Index: src/rcs.c
-diff -u src/contrib/cvs/src/rcs.c:1.1.1.14 src/contrib/cvs/src/rcs.c:1.28
---- src/contrib/cvs/src/rcs.c:1.1.1.14 Thu Apr 15 10:01:55 2004
-+++ src/rcs.c Sat Apr 23 02:58:25 2005
-@@ -6,6 +6,8 @@
- *
- * The routines contained in this file do all the rcs file parsing and
- * manipulation
-+ *
-+ * FreeBSD: src/contrib/cvs/src/rcs.c,v 1.28 2005/04/22 17:58:25 simon Exp $
- */
-
- #include <assert.h>
-@@ -24,6 +26,7 @@
- # endif
- #endif
-
-+int datesep = '/';
- int preserve_perms = 0;
-
- /* The RCS -k options, and a set of enums that must match the array.
-@@ -134,6 +137,8 @@
- evaluates its arguments multiple times. */
- #define STREQ(a, b) (*(char *)(a) == *(char *)(b) && strcmp ((a), (b)) == 0)
-
-+static char * getfullCVSname PROTO ((char *, char **));
-+
- /*
- * We don't want to use isspace() from the C library because:
- *
-@@ -2502,13 +2507,25 @@
- char *rev;
- {
- int rev_num;
-- char *xrev, *test_branch;
-+ char *xrev, *test_branch, *local_branch_num;
-
- xrev = xmalloc (strlen (rev) + 14); /* enough for .0.number */
- check_rev = xrev;
-
-+ local_branch_num = getenv("CVS_LOCAL_BRANCH_NUM");
-+ if (local_branch_num)
-+ {
-+ rev_num = atoi(local_branch_num);
-+ if (rev_num < 2)
-+ rev_num = 2;
-+ else
-+ rev_num &= ~1;
-+ }
-+ else
-+ rev_num = 2;
-+
- /* only look at even numbered branches */
-- for (rev_num = 2; ; rev_num += 2)
-+ for ( ; ; rev_num += 2)
- {
- /* see if the physical branch exists */
- (void) sprintf (xrev, "%s.%d", rev, rev_num);
-@@ -3024,8 +3041,7 @@
- if (retval != NULL)
- return (retval);
-
-- if (!force_tag_match ||
-- (vers != NULL && RCS_datecmp (vers->date, date) <= 0))
-+ if (vers && (!force_tag_match || RCS_datecmp (vers->date, date) <= 0))
- return xstrdup (vers->version);
- else
- return NULL;
-@@ -3481,27 +3497,31 @@
- {
- const char *string;
- size_t len;
-+ int expandit;
- };
- #define KEYWORD_INIT(s) (s), sizeof (s) - 1
--static const struct rcs_keyword keywords[] =
-+static struct rcs_keyword keywords[] =
- {
-- { KEYWORD_INIT ("Author") },
-- { KEYWORD_INIT ("Date") },
-- { KEYWORD_INIT ("Header") },
-- { KEYWORD_INIT ("Id") },
-- { KEYWORD_INIT ("Locker") },
-- { KEYWORD_INIT ("Log") },
-- { KEYWORD_INIT ("Name") },
-- { KEYWORD_INIT ("RCSfile") },
-- { KEYWORD_INIT ("Revision") },
-- { KEYWORD_INIT ("Source") },
-- { KEYWORD_INIT ("State") },
-- { NULL, 0 }
-+ { KEYWORD_INIT ("Author"), 1 },
-+ { KEYWORD_INIT ("Date"), 1 },
-+ { KEYWORD_INIT ("CVSHeader"), 1 },
-+ { KEYWORD_INIT ("Header"), 1 },
-+ { KEYWORD_INIT ("Id"), 1 },
-+ { KEYWORD_INIT ("Locker"), 1 },
-+ { KEYWORD_INIT ("Log"), 1 },
-+ { KEYWORD_INIT ("Name"), 1 },
-+ { KEYWORD_INIT ("RCSfile"), 1 },
-+ { KEYWORD_INIT ("Revision"), 1 },
-+ { KEYWORD_INIT ("Source"), 1 },
-+ { KEYWORD_INIT ("State"), 1 },
-+ { NULL, 0, 0 },
-+ { NULL, 0, 0 }
- };
- enum keyword
- {
- KEYWORD_AUTHOR = 0,
- KEYWORD_DATE,
-+ KEYWORD_CVSHEADER,
- KEYWORD_HEADER,
- KEYWORD_ID,
- KEYWORD_LOCKER,
-@@ -3510,8 +3530,10 @@
- KEYWORD_RCSFILE,
- KEYWORD_REVISION,
- KEYWORD_SOURCE,
-- KEYWORD_STATE
-+ KEYWORD_STATE,
-+ KEYWORD_LOCALID
- };
-+enum keyword keyword_local = KEYWORD_ID;
-
- /* Convert an RCS date string into a readable string. This is like
- the RCS date2str function. */
-@@ -3527,8 +3549,8 @@
- &sec);
- if (year < 1900)
- year += 1900;
-- sprintf (buf, "%04d/%02d/%02d %02d:%02d:%02d", year, mon, mday,
-- hour, min, sec);
-+ sprintf (buf, "%04d%c%02d%c%02d %02d:%02d:%02d",
-+ year, datesep, mon, datesep, mday, hour, min, sec);
- return xstrdup (buf);
- }
-
-@@ -3689,7 +3711,8 @@
- slen = s - srch;
- for (keyword = keywords; keyword->string != NULL; keyword++)
- {
-- if (keyword->len == slen
-+ if (keyword->expandit
-+ && keyword->len == slen
- && strncmp (keyword->string, srch, slen) == 0)
- {
- break;
-@@ -3736,15 +3759,25 @@
- free_value = 1;
- break;
-
-+ case KEYWORD_CVSHEADER:
- case KEYWORD_HEADER:
- case KEYWORD_ID:
-+ case KEYWORD_LOCALID:
- {
- const char *path;
- int free_path;
- char *date;
-+ char *old_path;
-
-- if (kw == KEYWORD_HEADER)
-+ old_path = NULL;
-+ if (kw == KEYWORD_HEADER ||
-+ (kw == KEYWORD_LOCALID &&
-+ keyword_local == KEYWORD_HEADER))
- path = rcs->path;
-+ else if (kw == KEYWORD_CVSHEADER ||
-+ (kw == KEYWORD_LOCALID &&
-+ keyword_local == KEYWORD_CVSHEADER))
-+ path = getfullCVSname(rcs->path, &old_path);
- else
- path = last_component (rcs->path);
- path = escape_keyword_value (path, &free_path);
-@@ -3767,6 +3800,8 @@
- * and we can discard the const.
- */
- free ((char *)path);
-+ if (old_path)
-+ free (old_path);
- free (date);
- free_value = 1;
- }
-@@ -4103,7 +4138,7 @@
- size_t len;
- int free_value = 0;
- char *log = NULL;
-- size_t loglen;
-+ size_t loglen = 0;
- Node *vp = NULL;
- #ifdef PRESERVE_PERMISSIONS_SUPPORT
- uid_t rcs_owner = (uid_t) -1;
-@@ -7421,7 +7456,7 @@
-
- for (ln = 0; ln < headlines.nlines; ++ln)
- {
-- char buf[80];
-+ char *buf;
- /* Period which separates year from month in date. */
- char *ym;
- /* Period which separates month from day in date. */
-@@ -7432,10 +7467,12 @@
- if (prvers == NULL)
- prvers = vers;
-
-+ buf = xmalloc (strlen (prvers->version) + 24);
- sprintf (buf, "%-12s (%-8.8s ",
- prvers->version,
- prvers->author);
- cvs_output (buf, 0);
-+ free (buf);
-
- /* Now output the date. */
- ym = strchr (prvers->date, '.');
-@@ -8620,3 +8657,105 @@
- }
- return label;
- }
-+
-+void
-+RCS_setlocalid (arg)
-+ const char *arg;
-+{
-+ char *copy, *next, *key;
-+
-+ copy = xstrdup(arg);
-+ next = copy;
-+ key = strtok(next, "=");
-+
-+ keywords[KEYWORD_LOCALID].string = xstrdup(key);
-+ keywords[KEYWORD_LOCALID].len = strlen(key);
-+ keywords[KEYWORD_LOCALID].expandit = 1;
-+
-+ /* options? */
-+ while (key = strtok(NULL, ",")) {
-+ if (!strcmp(key, keywords[KEYWORD_ID].string))
-+ keyword_local = KEYWORD_ID;
-+ else if (!strcmp(key, keywords[KEYWORD_HEADER].string))
-+ keyword_local = KEYWORD_HEADER;
-+ else if (!strcmp(key, keywords[KEYWORD_CVSHEADER].string))
-+ keyword_local = KEYWORD_CVSHEADER;
-+ else
-+ error(1, 0, "Unknown LocalId mode: %s", key);
-+ }
-+ free(copy);
-+}
-+
-+void
-+RCS_setincexc (arg)
-+ const char *arg;
-+{
-+ char *key;
-+ char *copy, *next;
-+ int include = 0;
-+ struct rcs_keyword *keyword;
-+
-+ copy = xstrdup(arg);
-+ next = copy;
-+ switch (*next++) {
-+ case 'e':
-+ include = 0;
-+ break;
-+ case 'i':
-+ include = 1;
-+ break;
-+ default:
-+ free(copy);
-+ return;
-+ }
-+
-+ if (include)
-+ for (keyword = keywords; keyword->string != NULL; keyword++)
-+ {
-+ keyword->expandit = 0;
-+ }
-+
-+ key = strtok(next, ",");
-+ while (key) {
-+ for (keyword = keywords; keyword->string != NULL; keyword++) {
-+ if (strcmp (keyword->string, key) == 0)
-+ keyword->expandit = include;
-+ }
-+ key = strtok(NULL, ",");
-+ }
-+ free(copy);
-+ return;
-+}
-+
-+#define ATTIC "/" CVSATTIC
-+static char *
-+getfullCVSname(CVSname, pathstore)
-+ char *CVSname, **pathstore;
-+{
-+ if (current_parsed_root->directory) {
-+ int rootlen;
-+ char *c = NULL;
-+ int alen = sizeof(ATTIC) - 1;
-+
-+ *pathstore = xstrdup(CVSname);
-+ if ((c = strrchr(*pathstore, '/')) != NULL) {
-+ if (c - *pathstore >= alen) {
-+ if (!strncmp(c - alen, ATTIC, alen)) {
-+ while (*c != '\0') {
-+ *(c - alen) = *c;
-+ c++;
-+ }
-+ *(c - alen) = '\0';
-+ }
-+ }
-+ }
-+
-+ rootlen = strlen(current_parsed_root->directory);
-+ if (!strncmp(*pathstore, current_parsed_root->directory, rootlen) &&
-+ (*pathstore)[rootlen] == '/')
-+ CVSname = (*pathstore + rootlen + 1);
-+ else
-+ CVSname = (*pathstore);
-+ }
-+ return CVSname;
-+}
-Index: src/rcs.h
-diff -u src/contrib/cvs/src/rcs.h:1.1.1.10 src/contrib/cvs/src/rcs.h:1.11
---- src/contrib/cvs/src/rcs.h:1.1.1.10 Thu Apr 15 10:01:55 2004
-+++ src/rcs.h Tue Jul 6 17:10:38 2004
-@@ -6,6 +6,8 @@
- * specified in the README file that comes with the CVS source distribution.
- *
- * RCS source control definitions needed by rcs.c and friends
-+ *
-+ * FreeBSD: src/contrib/cvs/src/rcs.h,v 1.11 2004/07/06 08:10:38 des Exp $
- */
-
- /* Strings which indicate a conflict if they occur at the start of a line. */
-@@ -244,8 +246,11 @@
- void RCS_deltas PROTO ((RCSNode *, FILE *, struct rcsbuffer *, const char *,
- enum rcs_delta_op, char **, size_t *,
- char **, size_t *));
-+void RCS_setincexc PROTO ((const char *arg));
-+void RCS_setlocalid PROTO ((const char *arg));
- char *make_file_label PROTO ((const char *, const char *, RCSNode *));
-
-+extern int datesep;
- extern int preserve_perms;
-
- /* From import.c. */
-Index: src/rcscmds.c
-diff -u src/contrib/cvs/src/rcscmds.c:1.1.1.10 src/contrib/cvs/src/rcscmds.c:1.10
---- src/contrib/cvs/src/rcscmds.c:1.1.1.10 Thu Apr 15 10:01:55 2004
-+++ src/rcscmds.c Thu Apr 15 10:17:27 2004
-@@ -7,6 +7,8 @@
- *
- * The functions in this file provide an interface for performing
- * operations directly on RCS files.
-+ *
-+ * FreeBSD: src/contrib/cvs/src/rcscmds.c,v 1.10 2004/04/15 01:17:27 peter Exp $
- */
-
- #include "cvs.h"
-Index: src/recurse.c
-diff -u src/contrib/cvs/src/recurse.c:1.1.1.13 src/contrib/cvs/src/recurse.c:1.12
---- src/contrib/cvs/src/recurse.c:1.1.1.13 Thu Apr 15 10:01:55 2004
-+++ src/recurse.c Thu Apr 15 10:17:27 2004
-@@ -6,6 +6,7 @@
- *
- * General recursion handler
- *
-+ * FreeBSD: src/contrib/cvs/src/recurse.c,v 1.12 2004/04/15 01:17:27 peter Exp $
- */
-
- #include "cvs.h"
-Index: src/server.c
-diff -u src/contrib/cvs/src/server.c:1.1.1.18 src/contrib/cvs/src/server.c:1.24
---- src/contrib/cvs/src/server.c:1.1.1.18 Fri Jun 11 04:05:38 2004
-+++ src/server.c Fri Jun 11 04:12:50 2004
-@@ -8,6 +8,10 @@
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details. */
-
-+/*
-+ * FreeBSD: src/contrib/cvs/src/server.c,v 1.24 2004/06/10 19:12:50 peter Exp $
-+ */
-+
- #include <assert.h>
- #include "cvs.h"
- #include "watch.h"
-@@ -773,6 +777,9 @@
- nothing. But for rsh, we need to do it now. */
- parse_config (current_parsed_root->directory);
-
-+ /* Now is a good time to read CVSROOT/options too. */
-+ parseopts(current_parsed_root->directory);
-+
- path = xmalloc (strlen (current_parsed_root->directory)
- + sizeof (CVSROOTADM)
- + 2);
-@@ -5602,7 +5609,10 @@
- password file. If so, that's enough to authenticate with. If
- not, we'll check /etc/passwd. */
-
-- rc = check_repository_password (username, password, repository,
-+ if (require_real_user)
-+ rc = 0; /* "not found" */
-+ else
-+ rc = check_repository_password (username, password, repository,
- &host_user);
-
- if (rc == 2)
-Index: src/tag.c
-diff -u src/contrib/cvs/src/tag.c:1.1.1.12 src/contrib/cvs/src/tag.c:1.2
---- src/contrib/cvs/src/tag.c:1.1.1.12 Thu Apr 15 10:01:55 2004
-+++ src/tag.c Fri Aug 6 02:47:35 2004
-@@ -10,6 +10,8 @@
- * Add or delete a symbolic name to an RCS file, or a collection of RCS files.
- * Tag uses the checked out revision in the current directory, rtag uses
- * the modules database, if necessary.
-+ *
-+ * FreeBSD: src/contrib/cvs/src/tag.c,v 1.2 2004/08/05 17:47:35 des Exp $
- */
-
- #include "cvs.h"
-@@ -1199,6 +1201,9 @@
- || strcmp (name, TAG_HEAD) == 0)
- return;
-
-+ 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
-Index: src/update.c
-diff -u src/contrib/cvs/src/update.c:1.1.1.15 src/contrib/cvs/src/update.c:1.14
---- src/contrib/cvs/src/update.c:1.1.1.15 Fri Jun 11 04:05:38 2004
-+++ src/update.c Fri Jun 11 04:12:50 2004
-@@ -31,6 +31,8 @@
- * versions, these are updated too. If the -d option was specified, new
- * directories added to the repository are automatically created and updated
- * as well.
-+ *
-+ * FreeBSD: src/contrib/cvs/src/update.c,v 1.14 2004/06/10 19:12:50 peter Exp $
- */
-
- #include "cvs.h"
-@@ -95,10 +97,10 @@
- static int aflag = 0;
- static int toss_local_changes = 0;
- static int force_tag_match = 1;
-+static int pull_template = 0;
- static int update_build_dirs = 0;
- static int update_prune_dirs = 0;
- static int pipeout = 0;
--static int dotemplate = 0;
- #ifdef SERVER_SUPPORT
- static int patches = 0;
- static int rcs_diff_patches = 0;
-@@ -123,6 +125,7 @@
- "\t-j rev\tMerge in changes made between current revision and rev.\n",
- "\t-I ign\tMore files to ignore (! to reset).\n",
- "\t-W spec\tWrappers specification line.\n",
-+ "\t-T\tCreate CVS/Template.\n",
- "(Specify the --help global option for a list of other help options)\n",
- NULL
- };
-@@ -138,6 +141,7 @@
- int c, err;
- int local = 0; /* recursive by default */
- int which; /* where to look for files and dirs */
-+ int xpull_template = 0;
-
- if (argc == -1)
- usage (update_usage);
-@@ -147,7 +151,7 @@
-
- /* parse the args */
- optind = 0;
-- while ((c = getopt (argc, argv, "+ApCPflRQqduk:r:D:j:I:W:")) != -1)
-+ while ((c = getopt (argc, argv, "+ApCPflRQTqduk:r:D:j:I:W:")) != -1)
- {
- switch (c)
- {
-@@ -185,6 +189,9 @@
- "-q or -Q must be specified before \"%s\"",
- cvs_cmd_name);
- break;
-+ case 'T':
-+ xpull_template = 1;
-+ break;
- case 'd':
- update_build_dirs = 1;
- break;
-@@ -413,8 +420,8 @@
- /* call the command line interface */
- err = do_update (argc, argv, options, tag, date, force_tag_match,
- local, update_build_dirs, aflag, update_prune_dirs,
-- pipeout, which, join_rev1, join_rev2, (char *) NULL, 1,
-- (char *) NULL);
-+ pipeout, which, join_rev1, join_rev2, (char *) NULL,
-+ xpull_template, (char *) NULL);
-
- /* free the space Make_Date allocated if necessary */
- if (date != NULL)
-@@ -431,7 +438,7 @@
- int
- do_update (argc, argv, xoptions, xtag, xdate, xforce, local, xbuild, xaflag,
- xprune, xpipeout, which, xjoin_rev1, xjoin_rev2, preload_update_dir,
-- xdotemplate, repository)
-+ xpull_template, repository)
- int argc;
- char **argv;
- char *xoptions;
-@@ -447,7 +454,7 @@
- char *xjoin_rev1;
- char *xjoin_rev2;
- char *preload_update_dir;
-- int xdotemplate;
-+ int xpull_template;
- char *repository;
- {
- int err = 0;
-@@ -462,7 +469,7 @@
- aflag = xaflag;
- update_prune_dirs = xprune;
- pipeout = xpipeout;
-- dotemplate = xdotemplate;
-+ pull_template = xpull_template;
-
- /* setup the join support */
- join_rev1 = xjoin_rev1;
-@@ -604,7 +611,7 @@
- && tag != NULL
- && finfo->rcs != NULL)
- {
-- char *rev = RCS_getversion (finfo->rcs, tag, NULL, 1, NULL);
-+ char *rev = RCS_getversion (finfo->rcs, tag, date, 1, NULL);
- if (rev != NULL
- && !RCS_nodeisbranch (finfo->rcs, tag))
- nonbranch = 1;
-@@ -950,7 +957,7 @@
- via WriteTag. */
- 0,
- 0,
-- dotemplate);
-+ pull_template);
- rewrite_tag = 1;
- nonbranch = 0;
- Subdir_Register (entries, (char *) NULL, dir);
-@@ -1009,6 +1016,12 @@
- nonbranch = 0;
- }
-
-+ /* keep the CVS/Template file current */
-+ if (pull_template)
-+ {
-+ WriteTemplate (dir, update_dir);
-+ }
-+
- /* initialize the ignore list for this directory */
- ignlist = getlist ();
- }
-Index: src/update.h
-diff -u src/contrib/cvs/src/update.h:1.1.1.4 src/contrib/cvs/src/update.h:1.3
---- src/contrib/cvs/src/update.h:1.1.1.4 Thu Apr 15 10:01:55 2004
-+++ src/update.h Thu Apr 15 10:17:28 2004
-@@ -10,10 +10,14 @@
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details. */
-
-+/*
-+ * FreeBSD: src/contrib/cvs/src/update.h,v 1.3 2004/04/15 01:17:28 peter Exp $
-+ */
-+
- int do_update PROTO((int argc, char *argv[], char *xoptions, char *xtag,
- char *xdate, int xforce, int local, int xbuild,
- int xaflag, int xprune, int xpipeout, int which,
- char *xjoin_rev1, char *xjoin_rev2, char *preload_update_dir,
-- int xdotemplate, char *repository));
-+ int xpull_template, char *repository));
- int joining PROTO((void));
- extern int isemptydir PROTO ((const char *dir, int might_not_exist));
-Index: src/prepend_args.c
-diff -u /dev/null src/gnu/usr.bin/cvs/cvs/prepend_args.c:1.3
---- /dev/null Fri Oct 20 15:17:40 2006
-+++ src/prepend_args.c Mon Sep 2 15:09:03 2002
-@@ -0,0 +1,86 @@
-+/* prepend_args.c - utilility programs for manpiulating argv[]
-+ Copyright (C) 1999 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. */
-+
-+/* FreeBSD: src/gnu/usr.bin/cvs/cvs/prepend_args.c,v 1.3 2002/09/02 06:09:03 peter Exp $ */
-+
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+#include "cvs.h"
-+#include "prepend_args.h"
-+
-+
-+/* Find the white-space-separated options specified by OPTIONS, and
-+ using BUF to store copies of these options, set ARGV[0], ARGV[1],
-+ etc. to the option copies. Return the number N of options found.
-+ Do not set ARGV[N] to NULL. If ARGV is NULL, do not store ARGV[0]
-+ etc. Backslash can be used to escape whitespace (and backslashes). */
-+static int
-+prepend_args (options, buf, argv)
-+ char const *options;
-+ char *buf;
-+ char **argv;
-+{
-+ char const *o = options;
-+ char *b = buf;
-+ int n = 0;
-+
-+ for (;;)
-+ {
-+ while (isspace ((unsigned char) *o))
-+ o++;
-+ if (!*o)
-+ return n;
-+ if (argv)
-+ argv[n] = b;
-+ n++;
-+
-+ do
-+ if ((*b++ = *o++) == '\\' && *o)
-+ b[-1] = *o++;
-+ while (*o && ! isspace ((unsigned char) *o));
-+
-+ *b++ = '\0';
-+ }
-+}
-+
-+/* Prepend the whitespace-separated options in OPTIONS to the argument
-+ vector of a main program with argument count *PARGC and argument
-+ vector *PARGV. */
-+void
-+prepend_default_options (options, pargc, pargv)
-+ char const *options;
-+ int *pargc;
-+ char ***pargv;
-+{
-+ if (options)
-+ {
-+ char *buf = xmalloc (strlen (options) + 1);
-+ int prepended = prepend_args (options, buf, (char **) NULL);
-+ int argc = *pargc;
-+ char * const *argv = *pargv;
-+ char **pp = (char **) xmalloc ((prepended + argc + 1) * sizeof *pp);
-+ *pargc = prepended + argc;
-+ *pargv = pp;
-+ *pp++ = *argv++;
-+ pp += prepend_args (options, buf, pp);
-+ while ((*pp++ = *argv++))
-+ continue;
-+ }
-+}
-Index: src/prepend_args.h
-diff -u /dev/null src/gnu/usr.bin/cvs/cvs/prepend_args.h:1.2
---- /dev/null Fri Oct 20 15:17:40 2006
-+++ src/prepend_args.h Mon Sep 2 15:09:03 2002
-@@ -0,0 +1,26 @@
-+/* prepend_args.h - utilility programs for manpiulating argv[]
-+ Copyright (C) 1999 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. */
-+
-+/* FreeBSD: src/gnu/usr.bin/cvs/cvs/prepend_args.h,v 1.2 2002/09/02 06:09:03 peter Exp $ */
-+
-+/* This code, taken from GNU Grep, originally used the "PARAM" macro, as the
-+ current GNU coding standards requires. Older GNU code used the "PROTO"
-+ macro, before the GNU coding standards replaced it. We use the older
-+ form here to keep from having to include another file in cvs/src/main.c. */
-+
-+void prepend_default_options PROTO ((char const *, int *, char ***));
diff --git a/devel/cvs-devel/files/patch-history_val-tag_world_writeable b/devel/cvs-devel/files/patch-history_val-tag_world_writeable
new file mode 100644
index 000000000000..4ec36aa282f2
--- /dev/null
+++ b/devel/cvs-devel/files/patch-history_val-tag_world_writeable
@@ -0,0 +1,31 @@
+# Don't make history and val-tags files world-writable when creating a
+# new repository. (Closes: #125892)
+#
+# Author unknown, probably Eric Gillespie, Jr. <epg@debian.org>
+diff -Nur src/mkmodules.c src/mkmodules.c
+--- src/mkmodules.c 2005-05-25 04:59:01.000000000 +0800
++++ src/mkmodules.c 2006-02-26 22:27:55.000000000 +0800
+@@ -1249,11 +1249,6 @@
+ fp = xfopen (info, "w");
+ if (fclose (fp) < 0)
+ error (1, errno, "cannot close %s", info);
+-
+- /* Make the new history file world-writeable, since every CVS
+- user will need to be able to write to it. We use chmod()
+- because xchmod() is too shy. */
+- chmod (info, 0666);
+ }
+
+ /* Make an empty val-tags file to prevent problems creating it later. */
+@@ -1267,11 +1262,6 @@
+ fp = xfopen (info, "w");
+ if (fclose (fp) < 0)
+ error (1, errno, "cannot close %s", info);
+-
+- /* Make the new val-tags file world-writeable, since every CVS
+- user will need to be able to write to it. We use chmod()
+- because xchmod() is too shy. */
+- chmod (info, 0666);
+ }
+
+ free (info);
diff --git a/devel/cvs-devel/files/patch-homedir b/devel/cvs-devel/files/patch-homedir
new file mode 100644
index 000000000000..44961cb36123
--- /dev/null
+++ b/devel/cvs-devel/files/patch-homedir
@@ -0,0 +1,44 @@
+# Fix handling of homedirectory for pserver, patch from
+# Jim Studt <jim@federated.com>. Closes: Bug#51234
+diff -Nur src/filesubr.c src/filesubr.c
+--- src/filesubr.c 2005-09-28 23:25:59.000000000 +0800
++++ src/filesubr.c 2006-02-26 22:31:57.000000000 +0800
+@@ -795,6 +795,11 @@
+ The workaround is to put -f in inetd.conf which means that
+ get_homedir won't get called until after the switch in user ID.
+
++ NOTE: the above paragraph is not sufficient if the HOME environment
++ variable is set, it overrides the uid based password lookup, hence
++ the change_uid logic path that blocks the HOME environment variable
++ when the uid gets changed.
++
+ The whole concept of a "home directory" on the server is pretty
+ iffy, although I suppose some people probably are relying on it for
+ .cvsrc and such, in the cases where it works. */
+@@ -802,15 +807,24 @@
+ get_homedir (void)
+ {
+ static char *home = NULL;
++ static uid_t home_uid = 0;
++ static int changed_uid = 0;
+ char *env;
++ uid_t uid = getuid();
+ struct passwd *pw;
+
++ if ( home && home_uid != uid) {
++ home = 0;
++ home_uid = uid;
++ changed_uid = 1;
++ }
++
+ if (home != NULL)
+ return home;
+
+- if (!server_active && (env = getenv ("HOME")) != NULL)
++ if (!server_active && ((env = getenv ("HOME")) != NULL) && !changed_uid)
+ home = env;
+- else if ((pw = (struct passwd *) getpwuid (getuid ()))
++ else if ((pw = (struct passwd *) getpwuid (uid))
+ && pw->pw_dir)
+ home = xstrdup (pw->pw_dir);
+ else
diff --git a/devel/cvs-devel/files/patch-import-n-X b/devel/cvs-devel/files/patch-import-n-X
new file mode 100644
index 000000000000..3fc01fdaef2c
--- /dev/null
+++ b/devel/cvs-devel/files/patch-import-n-X
@@ -0,0 +1,15 @@
+# Fix `cvs import -X' failure
+# Fixes: #374964
+# Patch by Florian Zschocke <zschocke@gmx.net>
+diff -Nur src/import.c src/import.c
+--- src/import.c 2005-09-04 02:27:44.000000000 +0200
++++ src/import.c 2006-06-19 19:41:57.000000000 +0200
+@@ -595,7 +595,7 @@
+ /* Attempt to make the Attic directory, in case it
+ does not exist. */
+ (void) sprintf (rcs, "%s/%s", repository, CVSATTIC);
+- if (CVS_MKDIR (rcs, 0777 ) != 0 && errno != EEXIST)
++ if (noexec == 0 && CVS_MKDIR (rcs, 0777 ) != 0 && errno != EEXIST)
+ error (1, errno, "cannot make directory `%s'", rcs);
+
+ /* Note that the above clobbered the path name, so we
diff --git a/devel/cvs-devel/files/patch-keyword_alphanumerics b/devel/cvs-devel/files/patch-keyword_alphanumerics
new file mode 100644
index 000000000000..1ad62b266678
--- /dev/null
+++ b/devel/cvs-devel/files/patch-keyword_alphanumerics
@@ -0,0 +1,27 @@
+# Fix keyword handling to accept alphanumerics, not just alphabetics.
+# Thanks to Branden Robinson for this fix.
+diff -Nur src/rcs.c src/rcs.c
+--- src/rcs.c 2005-09-28 23:25:59.000000000 +0800
++++ src/rcs.c 2006-02-26 17:58:32.000000000 +0800
+@@ -3680,13 +3680,18 @@
+ srch_len -= (srch_next + 1) - srch;
+ srch = srch_next + 1;
+
+- /* Look for the first non alphabetic character after the '$'. */
++ /*
++ * Accept alphanumerics, not just alphabetics. XFree86, anyone?
++ * Branden Robinson Sat, 7 Sep 2002 02:04:59 -0500
++ */
++
++ /* Look for the first non alphanumeric character after the '$'. */
+ send = srch + srch_len;
+ for (s = srch; s < send; s++)
+- if (! isalpha ((unsigned char) *s))
++ if (! isalnum ((unsigned char) *s))
+ break;
+
+- /* If the first non alphabetic character is not '$' or ':',
++ /* If the first non alphanumeric character is not '$' or ':',
+ then this is not an RCS keyword. */
+ if (s == send || (*s != '$' && *s != ':'))
+ continue;
diff --git a/devel/cvs-devel/files/patch-lib-Makefile.in b/devel/cvs-devel/files/patch-lib-Makefile.in
deleted file mode 100644
index 128728d46604..000000000000
--- a/devel/cvs-devel/files/patch-lib-Makefile.in
+++ /dev/null
@@ -1,37 +0,0 @@
---- lib/Makefile.in.orig Mon Sep 29 19:05:58 2003
-+++ lib/Makefile.in Tue Sep 30 11:25:43 2003
-@@ -173,8 +173,6 @@
- getopt.c \
- getopt1.c \
- getpass.c \
-- md5.c \
-- regex.c \
- savecwd.c \
- sighandle.c \
- stripslash.c \
-@@ -210,7 +208,7 @@
- libcvs_a_DEPENDENCIES = @LIBOBJS@
- am_libcvs_a_OBJECTS = argmatch.$(OBJEXT) getdate.$(OBJEXT) \
- getline.$(OBJEXT) getopt.$(OBJEXT) getopt1.$(OBJEXT) \
-- getpass.$(OBJEXT) md5.$(OBJEXT) regex.$(OBJEXT) \
-+ getpass.$(OBJEXT) \
- savecwd.$(OBJEXT) sighandle.$(OBJEXT) stripslash.$(OBJEXT) \
- xgetwd.$(OBJEXT) yesno.$(OBJEXT)
- libcvs_a_OBJECTS = $(am_libcvs_a_OBJECTS)
-@@ -228,7 +226,6 @@
- @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
-@@ -289,8 +286,6 @@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpass.Po@am__quote@
--@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5.Po@am__quote@
--@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/savecwd.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sighandle.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stripslash.Po@am__quote@
diff --git a/devel/cvs-devel/files/patch-login_cvspass_message b/devel/cvs-devel/files/patch-login_cvspass_message
new file mode 100644
index 000000000000..71b02b8d3b48
--- /dev/null
+++ b/devel/cvs-devel/files/patch-login_cvspass_message
@@ -0,0 +1,19 @@
+# Print a clearer message if ~/.cvspass does not exist when cvs login is
+# called. Closes: #168163.
+#
+# Patch by Steve McIntyre <steve@einval.com>
+diff -Nur src/login.c src/login.c
+--- src/login.c 2005-05-14 05:47:28.000000000 +0800
++++ src/login.c 2006-02-26 21:31:17.000000000 +0800
+@@ -309,7 +309,10 @@
+ fp = CVS_FOPEN (passfile, "r");
+ if (fp == NULL)
+ {
+- error (0, errno, "warning: failed to open %s for reading", passfile);
++ if (errno == ENOENT)
++ error (0, 0, "CVS password file %s does not exist - creating a new file", passfile);
++ else
++ error (0, errno, "warning: failed to open %s for reading", passfile);
+ goto process;
+ }
+
diff --git a/devel/cvs-devel/files/patch-newlines_in_commit_template b/devel/cvs-devel/files/patch-newlines_in_commit_template
new file mode 100644
index 000000000000..858cf7f4bb6d
--- /dev/null
+++ b/devel/cvs-devel/files/patch-newlines_in_commit_template
@@ -0,0 +1,32 @@
+# Change commit template so that there are two newlines at the
+# beginning. (closes: #102624)
+#
+# Patch from Tollef Fog Heen <tfheen@debian.org>
+diff -Nur src/logmsg.c src/logmsg.c
+--- src/logmsg.c 2005-09-04 08:27:44.000000000 +0800
++++ src/logmsg.c 2006-02-26 17:57:28.000000000 +0800
+@@ -264,6 +264,11 @@
+ }
+ }
+
++ if (!*messagep)
++ {
++ (void) fprintf (fp, "\n");
++ }
++
+ (void) fprintf (fp,
+ "%s----------------------------------------------------------------------\n",
+ CVSEDITPREFIX);
+@@ -349,7 +354,11 @@
+ *messagep = NULL;
+ }
+
+- if (pre_stbuf.st_mtime == post_stbuf.st_mtime || *messagep == NULL)
++ if (pre_stbuf.st_mtime == post_stbuf.st_mtime ||
++ *messagep == NULL ||
++ (*messagep)[0] == '\0' ||
++ strcmp (*messagep, "\n") == 0 ||
++ strcmp (*messagep, "\n\n") == 0)
+ {
+ for (;;)
+ {
diff --git a/devel/cvs-devel/files/patch-normalize_correct_roots b/devel/cvs-devel/files/patch-normalize_correct_roots
new file mode 100644
index 000000000000..b8ab013f3b8e
--- /dev/null
+++ b/devel/cvs-devel/files/patch-normalize_correct_roots
@@ -0,0 +1,34 @@
+# Apply patch from 120042, which only tries to parse pserver, gserver
+# and kserver methods when doing cvs login. (closes: #120042).
+#
+# Patch from Horms <horms@vergenet.net>
+diff -Nur src/login.c src/login.c
+--- src/login.c 2006-02-26 22:10:42.000000000 +0800
++++ src/login.c 2006-02-26 22:25:14.000000000 +0800
+@@ -200,11 +200,21 @@
+ return NULL;
+ }
+ *p = ' ';
+- tmp_root_canonical = normalize_cvsroot (tmp_root);
+- if (strcmp (cvsroot_canonical, tmp_root_canonical) == 0)
+- password = p + 1;
+-
+- free (tmp_root_canonical);
++ switch (tmp_root->method)
++ {
++ case gserver_method:
++ case pserver_method:
++#ifdef HAVE_KERBEROS
++ case kserver_method:
++#endif /* HAVE_KERBEROS */
++ tmp_root_canonical = normalize_cvsroot (tmp_root);
++ if (strcmp (cvsroot_canonical, tmp_root_canonical) == 0)
++ password = p + 1;
++ free (tmp_root_canonical);
++ break;
++ default:
++ break;
++ }
+ }
+
+ return password;
diff --git a/devel/cvs-devel/files/patch-parseopts b/devel/cvs-devel/files/patch-parseopts
new file mode 100644
index 000000000000..7d1432950ff1
--- /dev/null
+++ b/devel/cvs-devel/files/patch-parseopts
@@ -0,0 +1,108 @@
+diff -Nur src/cvs.h src/cvs.h
+--- src/cvs.h 2006-08-19 00:05:38.000000000 +0100
++++ src/cvs.h 2006-08-19 00:05:41.000000000 +0100
+@@ -177,6 +177,7 @@
+ #define CVSROOTADM_LOGINFO "loginfo"
+ #define CVSROOTADM_MODULES "modules"
+ #define CVSROOTADM_NOTIFY "notify"
++#define CVSROOTADM_OPTIONS "options"
+ #define CVSROOTADM_PASSWD "passwd"
+ #define CVSROOTADM_POSTADMIN "postadmin"
+ #define CVSROOTADM_POSTPROXY "postproxy"
+@@ -506,6 +507,7 @@
+ char *strcat_filename_onto_homedir (const char *, const char *);
+ char *cvs_temp_name (void);
+ FILE *cvs_temp_file (char **filename);
++void parseopts (const char *root);
+
+ int ls (int argc, char *argv[]);
+ int unlink_file (const char *f);
+diff -Nur src/main.c src/main.c
+--- src/main.c 2006-08-19 00:05:38.000000000 +0100
++++ src/main.c 2006-08-19 00:08:14.000000000 +0100
+@@ -1108,6 +1108,8 @@
+ CVSROOT/config file to fix the broken one! */
+ if (config) free_config (config);
+ config = parse_config (current_parsed_root->directory, NULL);
++ /* Now is a convenient time to read CVSROOT/options */
++ parseopts(current_parsed_root->directory);
+
+ /* Can set TMPDIR in the environment if necessary now, since
+ * if it was set in config, we now know it.
+@@ -1482,5 +1484,63 @@
+ exit (EXIT_FAILURE);
+ }
+
++void
++parseopts(root)
++ const char *root;
++{
++ char path[PATH_MAX];
++ int save_errno;
++ char buf[1024];
++ const char *p;
++ char *q;
++ FILE *fp;
++
++ if (root == NULL) {
++ printf("no CVSROOT in parseopts\n");
++ return;
++ }
++ p = strchr (root, ':');
++ if (p)
++ p++;
++ else
++ p = root;
++ if (p == NULL) {
++ printf("mangled CVSROOT in parseopts\n");
++ return;
++ }
++ (void) sprintf (path, "%s/%s/%s", p, CVSROOTADM, CVSROOTADM_OPTIONS);
++ if ((fp = fopen(path, "r")) != NULL) {
++ while (fgets(buf, sizeof buf, fp) != NULL) {
++ if (buf[0] == '#')
++ continue;
++ q = strrchr(buf, '\n');
++ if (q)
++ *q = '\0';
++
++ if (!strncmp(buf, "tag=", 4)) {
++ char *what;
++ char *rcs_localid;
++
++ rcs_localid = buf + 4;
++ RCS_setlocalid(path, 0, &config->keywords, rcs_localid);
++ }
++ if (!strncmp(buf, "tagexpand=", 10)) {
++ char *what;
++ char *rcs_incexc;
++
++ rcs_incexc = buf + 10;
++ RCS_setincexc(&config->keywords, rcs_incexc);
++ }
++ /*
++ * OpenBSD has a "umask=" and "dlimit=" command, we silently
++ * ignore them here since they are not much use to us. cvsumask
++ * defaults to 002 already, and the dlimit (data size limit)
++ * should really be handled elsewhere (eg: login.conf).
++ */
++ }
++ fclose(fp);
++ }
++}
++
+ /* vim:tabstop=8:shiftwidth=4
+ */
+diff -Nur src/server.c src/server.c
+--- src/server.c 2006-08-19 00:05:38.000000000 +0100
++++ src/server.c 2006-08-19 00:05:41.000000000 +0100
+@@ -985,6 +985,9 @@
+ config->MaxCompressionLevel);
+ }
+
++ /* Now is a good time to read CVSROOT/options too. */
++ parseopts(current_parsed_root->directory);
++
+ path = xmalloc (strlen (current_parsed_root->directory)
+ + sizeof (CVSROOTADM)
+ + 2);
diff --git a/devel/cvs-devel/files/patch-rcs2log_POSIX_sort b/devel/cvs-devel/files/patch-rcs2log_POSIX_sort
new file mode 100644
index 000000000000..7871ebd6cba2
--- /dev/null
+++ b/devel/cvs-devel/files/patch-rcs2log_POSIX_sort
@@ -0,0 +1,15 @@
+# Make rcs2log use POSIX 1003.1-2001 compliant `sort'. Closes: #368909
+# Patch taken from http://cvs.pld.org.pl/SOURCES/cvs-POSIX.patch?rev=1.1 ,
+# Thanks to the PLD Team.
+diff -Nur contrib/rcs2log.sh.orig contrib/rcs2log.sh
+--- contrib/rcs2log.sh.orig 2006-05-26 15:16:54.000000000 +0800
++++ contrib/rcs2log.sh 2006-05-26 15:16:35.000000000 +0800
+@@ -649,7 +649,7 @@
+ # Sort the log entries, first by date+time (in reverse order),
+ # then by author, then by log entry, and finally by file name and revision
+ # (just in case).
+-sort -t"$SOH" +2 -4r +4 +0 |
++sort -t"$SOH" -k 3,4r -k 5 -k 1 |
+
+ # Finally, reformat the sorted log entries.
+ $AWK -F"$SOH" '
diff --git a/devel/cvs-devel/files/patch-remove_-R_warning b/devel/cvs-devel/files/patch-remove_-R_warning
new file mode 100644
index 000000000000..098e88a5af3a
--- /dev/null
+++ b/devel/cvs-devel/files/patch-remove_-R_warning
@@ -0,0 +1,21 @@
+#
+# Turn off read-only warning that breaks pserver client access. Doh!
+# Closes: #319467, #264019
+# Patch by Steve McIntyre <steve@einval.com>
+diff -Nur src/main.c src/main.c
+--- src/main.c 2005-10-02 23:17:21.000000000 +0800
++++ src/main.c 2006-02-26 18:23:04.000000000 +0800
+@@ -764,13 +764,6 @@
+ if (argc < 1)
+ usage (usg);
+
+- if (readonlyfs && !really_quiet) {
+- error (0, 0,
+- "WARNING: Read-only repository access mode selected via `cvs -R'.\n\
+-Using this option to access a repository which some users write to may\n\
+-cause intermittent sandbox corruption.");
+- }
+-
+ /* Calculate the cvs global session ID */
+
+ {
diff --git a/devel/cvs-devel/files/patch-rsc2log_fix b/devel/cvs-devel/files/patch-rsc2log_fix
new file mode 100644
index 000000000000..4ac5ab23014c
--- /dev/null
+++ b/devel/cvs-devel/files/patch-rsc2log_fix
@@ -0,0 +1,49 @@
+#
+# Patch to make the rcs2log script cope with old-format (5 parameter)
+# and new-format (6 parameter) log output. Bug#258140
+#
+# Patch from Ludovic Rousseau <rousseau@debian.org>
+diff -Nur contrib/rcs2log.sh contrib/rcs2log.sh
+--- contrib/rcs2log.sh 2005-07-12 22:12:55.000000000 +0800
++++ contrib/rcs2log.sh 2006-02-26 17:43:11.000000000 +0800
+@@ -416,11 +416,24 @@
+ : ;;
+ esac >$llogout || exit
+
++# the date format in 'cvs -q log' changed
++# it was
++# date: 2003/05/06 21:23:30; author: rousseau; state: Exp; lines: +29 -31
++# it is now
++# date: 2003-05-06 21:23:30 +0000; author: rousseau; state: Exp; lines: +29 -31
+ output_authors='/^date: / {
+- if ($2 ~ /^[0-9]*[-\/][0-9][0-9][-\/][0-9][0-9]$/ && $3 ~ /^[0-9][0-9]:[0-9][0-9]:[0-9][0-9][-+0-9:]*;$/ && $4 == "author:" && $5 ~ /^[^;]*;$/) {
+- print substr($5, 1, length($5)-1)
+- }
++ # old date format
++ if ($2 ~ /^[0-9]*[-\/][0-9][0-9][-\/][0-9][0-9]$/ && $3 ~ /^[0-9][0-9]:[0-9][0-9]:[0-9][0-9][-+0-9:]*;$/ && $4 == "author:" && $5 ~ /^[^;]*;$/) {
++ print substr($5, 1, length($5)-1)
++ }
++ else {
++ # new date format
++ if ($2 ~ /^[0-9]*[-\/][0-9][0-9][-\/][0-9][0-9]$/ && $3 ~ /^[0-9][0-9]:[0-9][0-9]:[0-9][0-9][-+0-9:]*$/ && $5 == "author:" && $6 ~ /^[^;]*;$/) {
++ print substr($6, 1, length($6)-1)
++ }
++ }
+ }'
++
+ authors=`
+ $AWK "$output_authors" <"$rlogfile" | sort -u | comm -23 - $llogout
+ `
+@@ -611,7 +624,11 @@
+ date = newdate date
+ }
+ time = substr($3, 1, length($3) - 1)
+- author = substr($5, 1, length($5)-1)
++ author = substr($5, 1, length($5)-1)
++ if (author ~ /author/) {
++ # new date format
++ author = substr($6, 1, length($6)-1)
++ }
+ printf "%s%s%s%s%s%s%s%s%s%s", filename, SOH, rev, SOH, date, SOH, time, SOH, author, SOH
+ rev = "?"
+ next
diff --git a/devel/cvs-devel/files/patch-server_wrapper b/devel/cvs-devel/files/patch-server_wrapper
new file mode 100644
index 000000000000..fe36aa6139b7
--- /dev/null
+++ b/devel/cvs-devel/files/patch-server_wrapper
@@ -0,0 +1,51 @@
+#
+# Added patch to support cvs -W ! - clears all wrappers (patch also
+# forwarded to CVS people) #3374
+#
+# Patch by Michael Alan Dorman <mdorman@lot49.med.miami.edu>
+diff -Nur src/wrapper.c src/wrapper.c
+--- src/wrapper.c 2005-09-04 08:27:44.000000000 +0800
++++ src/wrapper.c 2006-02-26 22:26:53.000000000 +0800
+@@ -86,7 +86,7 @@
+ move this to a per-connection data structure, or better yet
+ think about a cleaner solution. */
+ static int wrap_setup_already_done = 0;
+- char *homedir;
++ char *homedir = NULL;
+
+ if (wrap_setup_already_done != 0)
+ return;
+@@ -107,6 +107,11 @@
+ free (file);
+ }
+
++#ifdef SERVER_SUPPORT
++ if (!server_active)
++#endif
++ {
++
+ /* Then add entries found in home dir, (if user has one) and file
+ exists. */
+ homedir = get_homedir ();
+@@ -115,6 +120,8 @@
+ hand it might be obnoxious to complain when CVS will function
+ just fine without .cvswrappers (and many users won't even know what
+ .cvswrappers is). */
++ }
++
+ if (homedir != NULL)
+ {
+ char *file = strcat_filename_onto_homedir (homedir, CVSDOTWRAPPER);
+@@ -339,6 +346,12 @@
+ if (!line || line[0] == '#')
+ return;
+
++ /* Allows user to declare all wrappers null and void */
++ if ( line[0] == '!') {
++ wrap_kill ( );
++ return;
++ }
++
+ memset (&e, 0, sizeof(e));
+
+ /* Search for the wild card */
diff --git a/devel/cvs-devel/files/patch-src-Makefile.in b/devel/cvs-devel/files/patch-src-Makefile.in
deleted file mode 100644
index 274f9b32cc05..000000000000
--- a/devel/cvs-devel/files/patch-src-Makefile.in
+++ /dev/null
@@ -1,63 +0,0 @@
---- src/Makefile.in.orig Mon Sep 29 19:06:14 2003
-+++ src/Makefile.in Tue Sep 30 11:26:22 2003
-@@ -80,7 +80,7 @@
- KRB4 = @KRB4@
- LDFLAGS = @LDFLAGS@
- LIBOBJS = @LIBOBJS@
--LIBS = @LIBS@
-+LIBS = @LIBS@ -lmd -lgnuregex -lz
- LN_S = @LN_S@
- LTLIBOBJS = @LTLIBOBJS@
- MAINT = @MAINT@
-@@ -146,7 +146,7 @@
- # some namespace hackery going on that maybe shouldn't be. Long term fix is to
- # 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)
-+INCLUDES = -I$(top_srcdir)/lib -I$(top_srcdir)/diff $(includeopt)
-
- bin_PROGRAMS = cvs
- bin_SCRIPTS = cvsbug
-@@ -187,6 +187,7 @@
- no_diff.c \
- parseinfo.c \
- patch.c \
-+ prepend_args.c \
- rcs.c \
- rcscmds.c \
- recurse.c \
-@@ -224,8 +225,7 @@
-
- cvs_LDADD = \
- ../diff/libdiff.a \
-- ../lib/libcvs.a \
-- ../zlib/libz.a
-+ ../lib/libcvs.a
-
-
- # extra clean targets
-@@ -262,6 +262,7 @@
- main.$(OBJEXT) mkmodules.$(OBJEXT) modules.$(OBJEXT) \
- myndbm.$(OBJEXT) no_diff.$(OBJEXT) parseinfo.$(OBJEXT) \
- patch.$(OBJEXT) rcs.$(OBJEXT) rcscmds.$(OBJEXT) \
-+ prepend_args.$(OBJEXT) \
- recurse.$(OBJEXT) release.$(OBJEXT) remove.$(OBJEXT) \
- repos.$(OBJEXT) root.$(OBJEXT) run.$(OBJEXT) scramble.$(OBJEXT) \
- server.$(OBJEXT) status.$(OBJEXT) subr.$(OBJEXT) tag.$(OBJEXT) \
-@@ -293,7 +294,7 @@
- @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)/patch.Po ./$(DEPDIR)/prepend_args.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 \
-@@ -411,6 +412,7 @@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/no_diff.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parseinfo.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/patch.Po@am__quote@
-+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prepend_args.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rcs.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rcscmds.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/recurse.Po@am__quote@
diff --git a/devel/cvs-devel/files/patch-zlib-read-compressed b/devel/cvs-devel/files/patch-zlib-read-compressed
new file mode 100644
index 000000000000..e1d137e99264
--- /dev/null
+++ b/devel/cvs-devel/files/patch-zlib-read-compressed
@@ -0,0 +1,11 @@
+--- src/zlib.c~ 3 Jun 2005 18:26:09 -0000 1.31
++++ src/zlib.c 27 Oct 2005 17:59:49 -0000
+@@ -229,7 +229,7 @@ compress_buffer_input (void *closure, ch
+ would fetch all the available bytes, and at least one byte. */
+
+ status = (*cb->buf->input) (cb->buf->closure, bd->text,
+- need, BUFFER_DATA_SIZE, &nread);
++ need ? 1 : 0, BUFFER_DATA_SIZE, &nread);
+
+ if (status == -2)
+ /* Don't try to recover from memory allcoation errors. */
diff --git a/devel/cvs-devel/pkg-descr b/devel/cvs-devel/pkg-descr
index 4b5ee8151a8f..56a8a41e9110 100644
--- a/devel/cvs-devel/pkg-descr
+++ b/devel/cvs-devel/pkg-descr
@@ -1,3 +1,4 @@
-IPv6 enabled cvs. You can use IPv6 connection when using pserver.
+The latest and, or feature release CVS (Concurrent Version System). IPv6
+enabled, you can use IPv6 connection when using pserver.
WWW: http://www.cvshome.org/
diff --git a/devel/cvs-devel/pkg-plist b/devel/cvs-devel/pkg-plist
index 2b82bbbcbbe0..ee011cfc0cb5 100644
--- a/devel/cvs-devel/pkg-plist
+++ b/devel/cvs-devel/pkg-plist
@@ -1,24 +1,30 @@
+@comment $FreeBSD$
+@unexec if [ -x /usr/bin/cvs.orig ]; then mv -f /usr/bin/cvs.orig /usr/bin/cvs; fi
bin/cvs
+@exec if [ ! -x /usr/bin/cvs.orig ]; then mv /usr/bin/cvs /usr/bin/cvs.orig; cp -p %D/%F /usr/bin/%F; fi
+@unexec if [ -x /usr/bin/cvsbug.orig ]; then mv -f /usr/bin/cvsbug.orig /usr/bin/cvsbug; fi
bin/cvsbug
+@exec if [ ! -x /usr/bin/cvsbug.orig ]; then mv /usr/bin/cvsbug /usr/bin/cvsbug.orig; cp -p %D/%F /usr/bin/%F; fi
bin/rcs2log
share/cvs/contrib/README
-share/cvs/contrib/check_cvs
share/cvs/contrib/clmerge
share/cvs/contrib/cln_hist
share/cvs/contrib/commit_prep
share/cvs/contrib/cvs2vendor
share/cvs/contrib/cvs_acls
-share/cvs/contrib/cvscheck
-share/cvs/contrib/cvscheck.man
share/cvs/contrib/debug_check_log
share/cvs/contrib/intro.doc
share/cvs/contrib/log
share/cvs/contrib/log_accum
share/cvs/contrib/mfpipe
+share/cvs/contrib/newcvsroot
share/cvs/contrib/pvcs2rcs
+share/cvs/contrib/rcs-5.7-commitid.patch
share/cvs/contrib/rcs-to-cvs
share/cvs/contrib/rcs2log
share/cvs/contrib/rcslock
+share/cvs/contrib/sandbox_status
share/cvs/contrib/sccs2rcs
+share/cvs/contrib/validate_repo
@dirrm share/cvs/contrib
@dirrm share/cvs