ports/118033: [new port] devel/cvs-devel 1.12.13_8
Balwinder S Dheeman
bdheeman at gmail.com
Wed Nov 14 07:30:01 UTC 2007
>Number: 118033
>Category: ports
>Synopsis: [new port] devel/cvs-devel 1.12.13_8
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Wed Nov 14 07:30:00 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator: Balwinder S Dheeman
>Release: 8.0-CURRENT
>Organization:
Anu'z Linux at HOME
>Environment:
FreeBSD cto.homelinux.net 8.0-CURRENT FreeBSD 8.0-CURRENT #1: Mon Nov 12 21:32:24 IST 2007 bsd at cto.homelinux.net:/usr/obj/usr/src/sys/MYKERNEL i386
>Description:
Latest upstream/feature release, similar to Debian, see the ChangeLog excerpts available at http://cto.homelinux.net/usr/ports/devel/cvs-devel/ChangeLog page.
This feature release/version, I think, would be quite useful for all those users who want to share and, or transfer their existing CVS repositories from Linux to FreeBSD machines.
>How-To-Repeat:
NA
>Fix:
A shar file is attached herewith for you kind testing and, or commit.
Patch attached with submission follows:
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# /usr/ports/devel/cvs-devel
# /usr/ports/devel/cvs-devel/Makefile
# /usr/ports/devel/cvs-devel/distinfo
# /usr/ports/devel/cvs-devel/pkg-descr
# /usr/ports/devel/cvs-devel/pkg-plist
# /usr/ports/devel/cvs-devel/files
# /usr/ports/devel/cvs-devel/files/missing
# /usr/ports/devel/cvs-devel/files/patch-64bit_crashfix
# /usr/ports/devel/cvs-devel/files/patch-DSA_external_passwd_file
# /usr/ports/devel/cvs-devel/files/patch-PAM_support
# /usr/ports/devel/cvs-devel/files/patch-PATH_MAX_check
# /usr/ports/devel/cvs-devel/files/patch-check_method_crash
# /usr/ports/devel/cvs-devel/files/patch-copyright
# /usr/ports/devel/cvs-devel/files/patch-cvs-repouid-0.1
# /usr/ports/devel/cvs-devel/files/patch-cvs.info.typo
# /usr/ports/devel/cvs-devel/files/patch-cvsbug_tmpfix
# /usr/ports/devel/cvs-devel/files/patch-cvsrc_whitespace
# /usr/ports/devel/cvs-devel/files/patch-ext_expansion
# /usr/ports/devel/cvs-devel/files/patch-date_format_option
# /usr/ports/devel/cvs-devel/files/patch-extra_tags
# /usr/ports/devel/cvs-devel/files/patch-fix_-l
# /usr/ports/devel/cvs-devel/files/patch-fix_sparc_sigbus
# /usr/ports/devel/cvs-devel/files/patch-flag_conflicted_copies
# /usr/ports/devel/cvs-devel/files/patch-history_val-tag_world_writeable
# /usr/ports/devel/cvs-devel/files/patch-homedir
# /usr/ports/devel/cvs-devel/files/patch-import-n-X
# /usr/ports/devel/cvs-devel/files/patch-keyword_alphanumerics
# /usr/ports/devel/cvs-devel/files/patch-login_cvspass_message
# /usr/ports/devel/cvs-devel/files/patch-newlines_in_commit_template
# /usr/ports/devel/cvs-devel/files/patch-normalize_correct_roots
# /usr/ports/devel/cvs-devel/files/patch-parseopts
# /usr/ports/devel/cvs-devel/files/patch-rcs2log_POSIX_sort
# /usr/ports/devel/cvs-devel/files/patch-remove_-R_warning
# /usr/ports/devel/cvs-devel/files/patch-rsc2log_fix
# /usr/ports/devel/cvs-devel/files/patch-server_wrapper
# /usr/ports/devel/cvs-devel/files/patch-zlib-read-compressed
#
echo c - /usr/ports/devel/cvs-devel
mkdir -p /usr/ports/devel/cvs-devel > /dev/null 2>&1
echo x - /usr/ports/devel/cvs-devel/Makefile
sed 's/^X//' >/usr/ports/devel/cvs-devel/Makefile << 'END-of-/usr/ports/devel/cvs-devel/Makefile'
X# New ports collection makefile for: cvs-devel
X# Date created: Wed, 14 Nov 2007 00:21:45 +0530
X# Whom: Balwinder S Dheeman <bdheeman at gmail.com>
X#
X# $FreeBSD$
X#
X
XPORTNAME= cvs
XPORTVERSION= 1.12.13
XPORTREVISION= 8
XCATEGORIES= devel ipv6
XMASTER_SITES= ${MASTER_SITE_GNU}
XMASTER_SITE_SUBDIR= non-gnu/${PORTNAME}/source/feature/${PORTVERSION}
XPKGNAMESUFFIX= -devel
X
XMAINTAINER= bdheeman at gmail.com
XCOMMENT= IPv6 enabled cvs. You can use IPv6 connection when using pserver
X
XCONFLICTS= cvsnt-[12]* cvs+ipv6-[12]*
X
XGNU_CONFIGURE= yes
XUSE_BZIP2= yes
XCONFIGURE_ARGS= --enable-ipv6 --without-gssapi \
X --with-editor="vi" \
X --with-tmpdir="/tmp"
X
XMAN1= cvs.1
XMAN5= cvs.5
XMAN8= cvsbug.8
XINFO= cvs cvsclient
X
XCVS_SITE?= :pserver:anoncvs at anoncvs.jp.FreeBSD.org:/home/ncvs
XCVS_VER?= v${PORTVERSION:S//_/g}
X
Xpost-patch:
X ${REINPLACE_CMD} 's/${PORTVERSION:S//\/g}/&+IPv6/g' ${WRKSRC}/configure
X @${CP} ${FILESDIR}/missing ${WRKSRC}
X
Xpost-install:
X.for f in cvs cvsbug
X ${MV} ${PREFIX:S/\/local//}/bin/${f} ${PREFIX:S/\/local//}/bin/${f}.orig
X ${CP} -p ${PREFIX}/bin/${f} ${PREFIX:S/\/local//}/bin
X.endfor
X
Xgenerate-patch:
X cvs -R -d ${CVS_SITE} rdiff -u -r ${CVS_VER} -r HEAD \
X src/contrib/cvs \
X | ${SED} \
X -e 's,^\+\+\+ src/contrib/cvs/,+++ ,' \
X -e 's,^Index: src/contrib/cvs/,Index: ,' \
X -e 's,\$$FreeBSD: ,FreeBSD: ,' \
X > ${FILESDIR}/patch-freebsdlocal
X cvs -R -d ${CVS_SITE} rdiff -u -D 1999-12-01 -r HEAD \
X gnu/usr.bin/cvs/cvs/prepend_args.c \
X gnu/usr.bin/cvs/cvs/prepend_args.h \
X | ${SED} \
X -e 's,^\+\+\+ src/gnu/usr.bin/cvs/cvs/,+++ src/,' \
X -e 's,^Index: src/gnu/usr.bin/cvs/cvs/,Index: src/,' \
X -e 's,\$$FreeBSD: ,FreeBSD: ,' \
X >> ${FILESDIR}/patch-freebsdlocal
X
X.include <bsd.port.mk>
END-of-/usr/ports/devel/cvs-devel/Makefile
echo x - /usr/ports/devel/cvs-devel/distinfo
sed 's/^X//' >/usr/ports/devel/cvs-devel/distinfo << 'END-of-/usr/ports/devel/cvs-devel/distinfo'
XMD5 (cvs-1.12.13.tar.bz2) = 956ab476ce276c2d19d583e227dbdbea
XSHA256 (cvs-1.12.13.tar.bz2) = 78853613b9a6873a30e1cc2417f738c330e75f887afdaf7b3d0800cb19ca515e
XSIZE (cvs-1.12.13.tar.bz2) = 3911104
END-of-/usr/ports/devel/cvs-devel/distinfo
echo x - /usr/ports/devel/cvs-devel/pkg-descr
sed 's/^X//' >/usr/ports/devel/cvs-devel/pkg-descr << 'END-of-/usr/ports/devel/cvs-devel/pkg-descr'
XThe latest and, or feature release CVS (Concurrent Version System). IPv6
Xenabled, you can use IPv6 connection when using pserver.
X
XWWW: http://www.cvshome.org/
END-of-/usr/ports/devel/cvs-devel/pkg-descr
echo x - /usr/ports/devel/cvs-devel/pkg-plist
sed 's/^X//' >/usr/ports/devel/cvs-devel/pkg-plist << 'END-of-/usr/ports/devel/cvs-devel/pkg-plist'
X at comment $FreeBSD$
X at unexec if [ -x /usr/bin/cvs.orig ]; then mv -f /usr/bin/cvs.orig /usr/bin/cvs; fi
Xbin/cvs
X at exec if [ ! -x /usr/bin/cvs.orig ]; then mv /usr/bin/cvs /usr/bin/cvs.orig; cp -p %D/%F /usr/bin/%F; fi
X at unexec if [ -x /usr/bin/cvsbug.orig ]; then mv -f /usr/bin/cvsbug.orig /usr/bin/cvsbug; fi
Xbin/cvsbug
X at exec if [ ! -x /usr/bin/cvsbug.orig ]; then mv /usr/bin/cvsbug /usr/bin/cvsbug.orig; cp -p %D/%F /usr/bin/%F; fi
Xbin/rcs2log
Xshare/cvs/contrib/README
Xshare/cvs/contrib/clmerge
Xshare/cvs/contrib/cln_hist
Xshare/cvs/contrib/commit_prep
Xshare/cvs/contrib/cvs2vendor
Xshare/cvs/contrib/cvs_acls
Xshare/cvs/contrib/debug_check_log
Xshare/cvs/contrib/intro.doc
Xshare/cvs/contrib/log
Xshare/cvs/contrib/log_accum
Xshare/cvs/contrib/mfpipe
Xshare/cvs/contrib/newcvsroot
Xshare/cvs/contrib/pvcs2rcs
Xshare/cvs/contrib/rcs-5.7-commitid.patch
Xshare/cvs/contrib/rcs-to-cvs
Xshare/cvs/contrib/rcs2log
Xshare/cvs/contrib/rcslock
Xshare/cvs/contrib/sandbox_status
Xshare/cvs/contrib/sccs2rcs
Xshare/cvs/contrib/validate_repo
X at dirrm share/cvs/contrib
X at dirrm share/cvs
END-of-/usr/ports/devel/cvs-devel/pkg-plist
echo c - /usr/ports/devel/cvs-devel/files
mkdir -p /usr/ports/devel/cvs-devel/files > /dev/null 2>&1
echo x - /usr/ports/devel/cvs-devel/files/missing
sed 's/^X//' >/usr/ports/devel/cvs-devel/files/missing << 'END-of-/usr/ports/devel/cvs-devel/files/missing'
X#! /bin/sh
Xexit 0
END-of-/usr/ports/devel/cvs-devel/files/missing
echo x - /usr/ports/devel/cvs-devel/files/patch-64bit_crashfix
sed 's/^X//' >/usr/ports/devel/cvs-devel/files/patch-64bit_crashfix << 'END-of-/usr/ports/devel/cvs-devel/files/patch-64bit_crashfix'
X# Fix a 64-bit crash in the entries_time() function and another bug in
X# the diff code. Thanks to Gabor Gombas for the patch. Closes:
X# #329127.
Xdiff -Nur diff/util.c diff/util.c
X--- diff/util.c 2003-02-03 03:52:38.000000000 +0800
X+++ diff/util.c 2006-02-26 21:32:22.000000000 +0800
X@@ -235,7 +235,7 @@
X close (pipes[0]);
X }
X
X- execl (PR_PROGRAM, PR_PROGRAM, "-f", "-h", name, 0);
X+ execl (PR_PROGRAM, PR_PROGRAM, "-f", "-h", name, NULL);
X pfatal_with_name (PR_PROGRAM);
X }
X else
END-of-/usr/ports/devel/cvs-devel/files/patch-64bit_crashfix
echo x - /usr/ports/devel/cvs-devel/files/patch-DSA_external_passwd_file
sed 's/^X//' >/usr/ports/devel/cvs-devel/files/patch-DSA_external_passwd_file << 'END-of-/usr/ports/devel/cvs-devel/files/patch-DSA_external_passwd_file'
X# Add support for overriding lookups in CVSROOT/passwd
X# Specify --password-file <file> on the pserver command line to use it
X# Initial patch from the Debian DSA team, adapted by Steve McIntyre.
X# See README.Debian for more details.
Xdiff -Nur src/cvs.h src/cvs.h
X--- src/cvs.h 2005-10-02 16:17:20.000000000 +0100
X+++ src/cvs.h 2006-08-19 01:20:33.000000000 +0100
X@@ -371,6 +371,7 @@
X extern int use_editor;
X extern int cvswrite;
X extern mode_t cvsumask;
X+extern char *PasswordFileName;
X
X /* Temp dir abstraction. */
X /* From main.c. */
Xdiff -Nur src/main.c src/main.c
X--- src/main.c 2006-08-17 00:25:16.000000000 +0100
X+++ src/main.c 2006-08-19 01:20:03.000000000 +0100
X@@ -43,8 +43,7 @@
X int noexec = 0;
X int readonlyfs = 0;
X int logoff = 0;
X-
X-
X+char *PasswordFileName = NULL;
X
X /***
X ***
X@@ -519,6 +518,7 @@
X {"help-commands", 0, NULL, 1},
X {"help-synonyms", 0, NULL, 2},
X {"help-options", 0, NULL, 4},
X+ {"password-file", required_argument, NULL, 5},
X #ifdef SERVER_SUPPORT
X {"allow-root", required_argument, NULL, 3},
X #endif /* SERVER_SUPPORT */
X@@ -646,6 +646,10 @@
X root_allow_add (optarg, gConfigPath);
X break;
X #endif /* SERVER_SUPPORT */
X+ case 5:
X+ /* --password-file */
X+ PasswordFileName = xstrdup(optarg);
X+ break;
X case 'Q':
X really_quiet = 1;
X /* FALL THROUGH */
Xdiff -Nur src/Makefile.in src/Makefile.in
X--- src/Makefile.in 2005-10-03 14:37:18.000000000 +0100
X+++ src/Makefile.in 2006-08-17 00:28:35.000000000 +0100
X@@ -146,7 +146,7 @@
X ls.$(OBJEXT) main.$(OBJEXT) mkmodules.$(OBJEXT) \
X modules.$(OBJEXT) ms-buffer.$(OBJEXT) myndbm.$(OBJEXT) \
X no_diff.$(OBJEXT) parseinfo.$(OBJEXT) patch.$(OBJEXT) \
X- rcs.$(OBJEXT) rcscmds.$(OBJEXT) recurse.$(OBJEXT) \
X+ rcs.$(OBJEXT) rcscmds.$(OBJEXT) readpw.$(OBJEXT) recurse.$(OBJEXT) \
X release.$(OBJEXT) remove.$(OBJEXT) repos.$(OBJEXT) \
X root.$(OBJEXT) rsh-client.$(OBJEXT) run.$(OBJEXT) \
X scramble.$(OBJEXT) server.$(OBJEXT) stack.$(OBJEXT) \
X@@ -349,6 +349,7 @@
X patch.c \
X rcs.c \
X rcscmds.c \
X+ readpw.c \
X recurse.c \
X release.c \
X remove.c \
X@@ -543,6 +544,7 @@
X @AMDEP_TRUE@@am__include@ @am__quote@/$(DEPDIR)/patch.Po at am__quote@
X @AMDEP_TRUE@@am__include@ @am__quote@/$(DEPDIR)/rcs.Po at am__quote@
X @AMDEP_TRUE@@am__include@ @am__quote@/$(DEPDIR)/rcscmds.Po at am__quote@
X+ at AMDEP_TRUE@@am__include@ @am__quote@/$(DEPDIR)/readpw.Po at am__quote@
X @AMDEP_TRUE@@am__include@ @am__quote@/$(DEPDIR)/recurse.Po at am__quote@
X @AMDEP_TRUE@@am__include@ @am__quote@/$(DEPDIR)/release.Po at am__quote@
X @AMDEP_TRUE@@am__include@ @am__quote@/$(DEPDIR)/remove.Po at am__quote@
Xdiff -Nur src/parseinfo.h src/parseinfo.h
X--- src/parseinfo.h 2006-08-17 00:25:16.000000000 +0100
X+++ src/parseinfo.h 2006-08-17 00:58:25.000000000 +0100
X@@ -21,6 +21,7 @@
X char *HistoryLogPath;
X char *HistorySearchPath;
X char *TmpDir;
X+ char *PasswordFileName;
X
X /* Should the logmsg be re-read during the do_verify phase?
X * RereadLogAfterVerify=no|stat|yes
Xdiff -Nur src/readpw.c src/readpw.c
X--- src/readpw.c 1970-01-01 01:00:00.000000000 +0100
X+++ src/readpw.c 2006-08-19 01:45:26.000000000 +0100
X@@ -0,0 +1,158 @@
X+/*
X+ readpw.c - read the CVS password from an external file
X+ Copyright (c) 2006 Martin Schulze <joey at infodrom.org>
X+
X+ This program is free software; you can redistribute it and/or modify
X+ it under the terms of the GNU General Public License as published by
X+ the Free Software Foundation; either version 2 of the License, or
X+ (at your option) any later version.
X+
X+ This program is distributed in the hope that it will be useful,
X+ but WITHOUT ANY WARRANTY; without even the implied warranty of
X+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X+ GNU General Public License for more details.
X+
X+ You should have received a copy of the GNU General Public License
X+ along with this program; if not, write to the Free Software
X+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X+*/
X+
X+#include <string.h>
X+#include <stdio.h>
X+#include <errno.h>
X+#include <syslog.h>
X+
X+#define PWFILE "/tmp/work/cvs/cvs.passwd"
X+
X+/*
X+ * Source: control_nextline() in dtaus.c from dtaus
X+ */
X+size_t readline (FILE *f, char **buf, unsigned int len)
X+{
X+ char line[100];
X+ char tmp[100];
X+ char *cp;
X+ int i;
X+
X+ memset (line, 0, sizeof(line));
X+ memset (*buf, 0, len);
X+
X+ cp = line;
X+
X+ while (!strlen(line) && (cp = fgets(line, 100, f))) {
X+ if (strlen(line)) {
X+ if (line[0] != '#') {
X+ if (line[strlen(line)-1] != '\n') {
X+ strcpy(tmp, line);
X+ while (tmp[strlen(tmp)-1] != '\n' && (cp = fgets(tmp, 100, f)));
X+ } else
X+ line[strlen(line)-1] = '\0';
X+ if (line[strlen(line)-1] == '\r')
X+ line[strlen(line)-1] = '\0';
X+ for (i=strlen(line);(line[i-1] == ' '||line[i-1] == '\t')&&i>0; i--)
X+ line[i-1] = '\0';
X+ } else
X+ line[0] = '\0';
X+ }
X+ }
X+ for (cp=line; *cp==' '; cp++);
X+
X+ if (strlen(cp)) {
X+ memcpy(*buf, cp, strlen(cp) >= len ? len-1 : strlen(cp));
X+ return (strlen (cp));
X+ } else
X+ return 0;
X+}
X+
X+#define MAXLINE 100
X+#define PWLEN 20
X+
X+char *getpwline (const char *fname, const char *repository, const char *logname)
X+{
X+ FILE *f;
X+ char buf[MAXLINE], *bp = buf;
X+ static char line[MAXLINE];
X+ int inrepo = 0;
X+ char *cp;
X+
X+ memset (line, 0, sizeof (line));
X+
X+ if ((f = fopen (fname, "r")) == NULL) {
X+ perror ("fopen");
X+ return line;
X+ }
X+
X+ while (readline (f, &bp, 50)) {
X+ if (buf[0] == '/') {
X+ syslog(LOG_ERR, "Looking for repo %s in %s\n", repository, buf);
X+ if (!inrepo && !strcmp (buf, repository))
X+ {
X+ syslog(LOG_ERR, "matched repository %s\n", repository);
X+ inrepo = 1;
X+ }
X+ else if (inrepo)
X+ inrepo = 0;
X+ } else {
X+ if (inrepo) {
X+ if ((cp = strchr (buf, ':')) != NULL) {
X+ if ( (cp - buf) == strlen (logname)
X+ && !strncmp (buf, logname, strlen (logname))) {
X+ memcpy (line, buf, strlen(buf) >= MAXLINE ? MAXLINE-1 : strlen(buf));
X+ }
X+ }
X+ }
X+ }
X+ }
X+
X+ if (ferror (f))
X+ perror ("ferror");
X+ if (fclose (f) < 0)
X+ perror ("fclose");
X+
X+ return line;
X+}
X+
X+/*
X+*****************************************************************
X+ */
X+#ifdef TEST_READPW
X+
X+void getpasswd (const char *fname, const char *repository, const char *logname, char **pw, char **user)
X+{
X+ char *line;
X+ char *cp, *xp;
X+
X+ memset (*pw, 0, PWLEN);
X+ memset (*user, 0, PWLEN);
X+
X+ line = getpwline(fname, repository, logname);
X+
X+ if (line[0] == '\0')
X+ return;
X+
X+ cp = strchr (line, ':');
X+ cp++;
X+
X+ if ((xp = strchr (cp, ':')) != NULL) {
X+ memcpy (*pw, cp, xp-cp >= PWLEN ? PWLEN-1 : xp-cp);
X+
X+ xp++;
X+
X+ if (strlen (xp))
X+ memcpy (*user, xp, strlen(xp) >= PWLEN ? PWLEN-1 : strlen(xp));
X+ }
X+}
X+
X+int main ()
X+{
X+ char pw[PWLEN], *ppw = pw;
X+ char cvsuser[PWLEN], *pcu = cvsuser;
X+
X+ getpasswd (PWFILE, "/cvs/debian-doc", "jseidel", &ppw, &pcu);
X+
X+ printf ("%s<:>%s\n", pw, cvsuser);
X+ printf ("XXXXXXXXXXXXX\n");
X+
X+ return 0;
X+}
X+#endif /*TEST_READPW */
Xdiff -Nur src/server.c src/server.c
X--- src/server.c 2006-08-17 00:25:16.000000000 +0100
X+++ src/server.c 2006-08-20 00:31:22.000000000 +0100
X@@ -22,6 +22,8 @@
X
X int server_active = 0;
X
X+char *getpwline (const char *fname, const char *repository, const char *logname);
X+
X #if defined (SERVER_SUPPORT) || defined (CLIENT_SUPPORT)
X
X # include "log-buffer.h"
X@@ -6689,51 +6691,71 @@
X {
X int retval = 0;
X FILE *fp;
X- char *filename;
X+ char *filename = NULL;
X+ char *cp;
X char *linebuf = NULL;
X size_t linebuf_len;
X int found_it = 0;
X int namelen;
X
X- /* We don't use current_parsed_root->directory because it hasn't been
X- * set yet -- our `repository' argument came from the authentication
X- * protocol, not the regular CVS protocol.
X- */
X-
X- filename = xmalloc (strlen (repository)
X- + 1
X- + strlen (CVSROOTADM)
X- + 1
X- + strlen (CVSROOTADM_PASSWD)
X- + 1);
X+ if (!PasswordFileName)
X+ {
X+ /* We don't use current_parsed_root->directory because it hasn't been
X+ * set yet -- our `repository' argument came from the authentication
X+ * protocol, not the regular CVS protocol.
X+ */
X+
X+ filename = xmalloc (strlen (repository)
X+ + 1
X+ + strlen (CVSROOTADM)
X+ + 1
X+ + strlen (CVSROOTADM_PASSWD)
X+ + 1);
X
X- (void) sprintf (filename, "%s/%s/%s", repository,
X- CVSROOTADM, CVSROOTADM_PASSWD);
X+ (void) sprintf (filename, "%s/%s/%s", repository,
X+ CVSROOTADM, CVSROOTADM_PASSWD);
X
X- fp = CVS_FOPEN (filename, "r");
X- if (fp == NULL)
X- {
X- if (!existence_error (errno))
X- error (0, errno, "cannot open %s", filename);
X- free (filename);
X- return 0;
X- }
X+ fp = CVS_FOPEN (filename, "r");
X+ if (fp == NULL)
X+ {
X+ if (!existence_error (errno))
X+ error (0, errno, "cannot open %s", filename);
X+ free (filename);
X+ return 0;
X+ }
X
X- /* Look for a relevant line -- one with this user's name. */
X- namelen = strlen (username);
X- while (getline (&linebuf, &linebuf_len, fp) >= 0)
X- {
X- if ((strncmp (linebuf, username, namelen) == 0)
X- && (linebuf[namelen] == ':'))
X- {
X- found_it = 1;
X- break;
X- }
X+ /* Look for a relevant line -- one with this user's name. */
X+ namelen = strlen (username);
X+ while (getline (&linebuf, &linebuf_len, fp) >= 0)
X+ {
X+ if ((strncmp (linebuf, username, namelen) == 0)
X+ && (linebuf[namelen] == ':'))
X+ {
X+ found_it = 1;
X+ break;
X+ }
X+ }
X+ if (ferror (fp))
X+ error (0, errno, "cannot read %s", filename);
X+ if (fclose (fp) < 0)
X+ error (0, errno, "cannot close %s", filename);
X+ }
X+ else /* DSA_VERSION */
X+ {
X+ namelen = strlen (username);
X+
X+ cp = getpwline (PasswordFileName, repository, username);
X+ /* syslog (LOG_NOTICE, "cp=%s", cp); */
X+ if (strlen (cp)) {
X+ linebuf = xmalloc (strlen (cp) + 1);
X+ memcpy (linebuf, cp, strlen(cp)+1);
X+ /* syslog (LOG_NOTICE, "line=%s", linebuf); */
X+ found_it = 1;
X+ } else
X+ found_it = 0;
X+
X+ /* syslog (LOG_NOTICE, "username=%s, password=%s, repository=%s", username, password, repository); */
X }
X- if (ferror (fp))
X- error (0, errno, "cannot read %s", filename);
X- if (fclose (fp) < 0)
X- error (0, errno, "cannot close %s", filename);
X
X /* If found_it, then linebuf contains the information we need. */
X if (found_it)
X@@ -6823,6 +6845,7 @@
X retval = 0;
X }
X
X+ if (filename)
X free (filename);
X if (linebuf)
X free (linebuf);
X@@ -7043,7 +7066,10 @@
X letting you in if it won't say why, and I am not convinced
X that the potential information disclosure to an attacker
X outweighs this. */
X- printf ("error 0 no such user %s in CVSROOT/passwd\n", username);
X+ if (PasswordFileName)
X+ printf ("error 0 no such user %s in %s\n", username, PasswordFileName);
X+ else
X+ printf ("error 0 no such user %s in CVSROOT/passwd\n", username);
X
X exit (EXIT_FAILURE);
X }
END-of-/usr/ports/devel/cvs-devel/files/patch-DSA_external_passwd_file
echo x - /usr/ports/devel/cvs-devel/files/patch-PAM_support
sed 's/^X//' >/usr/ports/devel/cvs-devel/files/patch-PAM_support << 'END-of-/usr/ports/devel/cvs-devel/files/patch-PAM_support'
X#
X# Add in extra PAM options compared to upstream's own PAM code:
X# * Add an extra option PamAuth to control use of PAM separately from
X# SystemAuth
X# * Add support for DefaultPamUser - try that if the specified
X# user does not exist
X#
X# Patch by Steve McIntyre <steve at einval.com>
Xdiff -Nur doc/cvs.texinfo doc/cvs.texinfo
X--- doc/cvs.texinfo 2005-09-23 03:02:53.000000000 +0100
X+++ doc/cvs.texinfo 2006-05-19 23:50:10.000000000 +0100
X@@ -2662,8 +2662,18 @@
X system has PAM (Pluggable Authentication Modules)
X and your @sc{cvs} server executable was configured to
X use it at compile time (using @code{/configure --enable-pam} - see the
X-INSTALL file for more). In this case, PAM will be consulted instead.
X-This means that @sc{cvs} can be configured to use any password
X+INSTALL file for more). In this case, PAM may be
X+consulted first (or instead). The
X+"fallback" behaviour can be controlled using the two
X+variables @code{PamAuth} and @code{SystemAuth}. On a
X+Debian system, @code{PamAuth} defaults to @code{yes}
X+and @code{SystemAuth} to @code{no} - after all, PAM can
X+supports passwd file lookups itself. Changing these is
X+possible by setting @code{PamAuth=no} and
X+ at code{SystemAuth=yes} in the @sc{cvs} @file{config}
X+file, @pxref{config}).
X+
X+Use of PAM means that @sc{cvs} can be configured to use any password
X authentication source PAM can be configured to use (possibilities
X include a simple UNIX password, NIS, LDAP, and others) in its
X global configuration file (usually @file{/etc/pam.conf}
X@@ -2691,7 +2701,7 @@
X cvs session required pam_unix.so
X @end example
X
X-The the equivalent @file{/etc/pam.d/cvs} would contain
X+The equivalent @file{/etc/pam.d/cvs} would contain
X
X @example
X auth required pam_unix.so
X@@ -2715,6 +2725,13 @@
X feature should not be used if you may not have control of the name
X @sc{cvs} will be invoked as.
X
X+If you wish to use PAM for authentication, and details
X+of your users are not available using getpwnam(), you
X+may set a default name for the account on the server
X+that will be used after authentication. To do this,
X+either set @code{DefaultPamUser=user} in the @sc{cvs}
X+ at file{config} file, @pxref{config}.
X+
X Be aware, also, that falling back to system
X authentication might be a security risk: @sc{cvs}
X operations would then be authenticated with that user's
Xdiff -Nur src/parseinfo.c src/parseinfo.c
X--- src/parseinfo.c 2005-09-06 05:40:37.000000000 +0100
X+++ src/parseinfo.c 2006-05-19 22:46:00.000000000 +0100
X@@ -303,8 +303,12 @@
X */
X #endif /* PROXY_SUPPORT */
X #ifdef AUTH_SERVER_SUPPORT
X- new->system_auth = true;
X+ new->system_auth = false;
X #endif /* AUTH_SERVER_SUPPORT */
X+#ifdef HAVE_PAM
X+ new->PamAuth = true;
X+ new->DefaultPamUser = NULL;
X+#endif
X
X return new;
X }
X@@ -696,6 +700,13 @@
X readSizeT (infopath, "MaxCompressionLevel", p,
X &retval->MaxCompressionLevel);
X #endif /* SERVER_SUPPORT */
X+#ifdef HAVE_PAM
X+ else if (!strcmp (line, "DefaultPamUser"))
X+ retval->DefaultPamUser = xstrdup(p);
X+ else if (!strcmp (line, "PamAuth"))
X+ readBool (infopath, "PamAuth", p,
X+ &retval->PamAuth);
X+#endif
X else
X /* We may be dealing with a keyword which was added in a
X subsequent version of CVS. In that case it is a good idea
Xdiff -Nur src/parseinfo.h src/parseinfo.h
X--- src/parseinfo.h 2005-09-05 04:03:38.000000000 +0100
X+++ src/parseinfo.h 2006-05-19 22:40:31.000000000 +0100
X@@ -59,6 +59,10 @@
X #ifdef PRESERVE_PERMISSIONS_SUPPORT
X bool preserve_perms;
X #endif /* PRESERVE_PERMISSIONS_SUPPORT */
X+#ifdef HAVE_PAM
X+ char *DefaultPamUser;
X+ bool PamAuth;
X+#endif
X };
X
X bool parse_error (const char *, unsigned int);
Xdiff -Nur src/server.c src/server.c
X--- src/server.c 2005-09-28 16:25:59.000000000 +0100
X+++ src/server.c 2006-05-20 00:45:14.000000000 +0100
X@@ -6919,6 +6919,15 @@
X {
X pam_stage = "get pam user";
X retval = pam_get_item (pamh, PAM_USER, (const void **)username);
X+ if ((retval != PAM_SUCCESS) && (NULL != config->DefaultPamUser))
X+ {
X+ /* An issue with using pam is that the host may well not have
X+ a local user entry to match the authenticated user. If this
X+ has failed, optionally fall back to a specified local
X+ username */
X+ *username = xstrdup(config->DefaultPamUser);
X+ retval = PAM_SUCCESS;
X+ }
X }
X
X if (retval != PAM_SUCCESS)
X@@ -7022,7 +7031,11 @@
X
X assert (rc == 0);
X
X+#ifdef HAVE_PAM
X+ if (!config->system_auth && !config->PamAuth)
X+#else
X if (!config->system_auth)
X+#endif
X {
X /* Note that the message _does_ distinguish between the case in
X which we check for a system password and the case in which
X@@ -7037,9 +7050,10 @@
X
X /* No cvs password found, so try /etc/passwd. */
X #ifdef HAVE_PAM
X- if (check_pam_password (&username, password))
X+ if ( (config->PamAuth && check_pam_password (&username, password)) ||
X+ (config->system_auth && check_system_password (username, password)))
X #else /* !HAVE_PAM */
X- if (check_system_password (username, password))
X+ if (config->system_auth && check_system_password (username, password))
X #endif /* HAVE_PAM */
X host_user = xstrdup (username);
X else
END-of-/usr/ports/devel/cvs-devel/files/patch-PAM_support
echo x - /usr/ports/devel/cvs-devel/files/patch-PATH_MAX_check
sed 's/^X//' >/usr/ports/devel/cvs-devel/files/patch-PATH_MAX_check << 'END-of-/usr/ports/devel/cvs-devel/files/patch-PATH_MAX_check'
X# Fix FTBFS in hurd-i386 regarding bad check of PATH_MAX.
X# Closes: #378966
X# Thanks to Cyril Brulebois <cyril.brulebois at enst-bretagne.fr>
Xdiff -Nur lib/chdir-long.c lib/chdir-long.c
X--- lib/chdir-long.c 2005-09-19 21:12:18.000000000 +0000
X+++ lib/chdir-long.c 2006-07-20 02:47:32.000000000 +0000
X@@ -39,9 +39,7 @@
X # define O_DIRECTORY 0
X #endif
X
X-#ifndef PATH_MAX
X-# error "compile this file only if your system defines PATH_MAX"
X-#endif
X+#ifdef PATH_MAX
X
X struct cd_buf
X {
X@@ -269,6 +267,8 @@
X }
X #endif
X
X+#endif /* PATH_MAX */
X+
X /*
X Local Variables:
X compile-command: "gcc -DTEST_CHDIR=1 -DHAVE_CONFIG_H -I.. -g -O -W -Wall chdir-long.c libcoreutils.a"
X
END-of-/usr/ports/devel/cvs-devel/files/patch-PATH_MAX_check
echo x - /usr/ports/devel/cvs-devel/files/patch-check_method_crash
sed 's/^X//' >/usr/ports/devel/cvs-devel/files/patch-check_method_crash << 'END-of-/usr/ports/devel/cvs-devel/files/patch-check_method_crash'
X#
X# Do a basic sanity check on the method in the CVSROOT - don't crash
X# if one is not specified! Bug#274020
X#
X# Patch from Steve McIntyre <steve at einval.com>
Xdiff -Nur src/root.c src/root.c
X--- src/root.c 2005-09-25 08:38:29.000000000 +0800
X+++ src/root.c 2006-02-26 17:48:32.000000000 +0800
X@@ -535,6 +535,12 @@
X method = "";
X #endif /* defined (CLIENT_SUPPORT) || defined (SERVER_SUPPORT) */
X
X+ if (NULL == method)
X+ {
X+ error (0, 0, "Missing method in CVSROOT.");
X+ goto error_exit;
X+ }
X+
X /* Now we have an access method -- see if it's valid. */
X
X if (!strcasecmp (method, "local"))
END-of-/usr/ports/devel/cvs-devel/files/patch-check_method_crash
echo x - /usr/ports/devel/cvs-devel/files/patch-copyright
sed 's/^X//' >/usr/ports/devel/cvs-devel/files/patch-copyright << 'END-of-/usr/ports/devel/cvs-devel/files/patch-copyright'
X# Change references from GNU Public License to GNU General Public
X# License, where that is meant (closes: #102142)
X#
X# Patch by Tollef Fog Heen <tfheen at debian.org>
Xdiff -Nur DEVEL-CVS DEVEL-CVS
X--- DEVEL-CVS 2005-09-01 20:46:54.000000000 +0800
X+++ DEVEL-CVS 2006-02-26 22:40:36.000000000 +0800
X@@ -7,7 +7,8 @@
X Policies regarding the CVS source repository:
X
X By checking items into the repository, developers agree to permit
X-distribution of such items under the terms of the GNU Public License.
X+distribution of such items under the terms of the GNU General Public
X+License.
X
X ----------------------------------------------------------------------
X Procedure for dealing with people who want to be developers:
Xdiff -Nur doc/cvsclient.texi doc/cvsclient.texi
X--- doc/cvsclient.texi 2006-02-26 22:40:35.000000000 +0800
X+++ doc/cvsclient.texi 2006-02-26 22:40:37.000000000 +0800
X@@ -54,7 +54,7 @@
X user documentation, @file{cvs.texinfo}, for that information. The
X protocol is non-proprietary (anyone who wants to is encouraged to
X implement it) and an implementation, known as CVS, is available under
X-the GNU Public License. The CVS distribution, containing this
X+the GNU General Public License. The CVS distribution, containing this
X implementation, @file{cvs.texinfo}, and a copy (possibly more or less up
X to date than what you are reading now) of this document,
X @file{cvsclient.texi}, can be found at the usual GNU FTP sites, with a
Xdiff -Nur HACKING HACKING
X--- HACKING 2005-09-25 08:36:08.000000000 +0800
X+++ HACKING 2006-02-26 22:42:15.000000000 +0800
X@@ -403,8 +403,9 @@
X for each issue. Use context diffs or unidiffs for patches.
X
X Include words like "I grant permission to distribute this patch under
X-the terms of the GNU Public License" with your patch. By sending a
X-patch to bug-cvs at nongnu.org, you implicitly grant this permission.
X+the terms of the GNU General Public License" with your patch. By
X+sending a patch to bug-cvs at nongnu.org, you implicitly grant this
X+permission.
X
X Submitting a patch to bug-cvs is the way to reach the people who have
X signed up to receive such submissions (including CVS developers), but
END-of-/usr/ports/devel/cvs-devel/files/patch-copyright
echo x - /usr/ports/devel/cvs-devel/files/patch-cvs-repouid-0.1
sed 's/^X//' >/usr/ports/devel/cvs-devel/files/patch-cvs-repouid-0.1 << 'END-of-/usr/ports/devel/cvs-devel/files/patch-cvs-repouid-0.1'
X#
X# cvs-repouid patch for controlling pserver access. See
X# README.Debian for details.
X#
X# Original patch by Wichert Akkerman <wakkerma at debian.org>, fixes by
X# Steve McIntyre <steve at einval.com> with help from Alberto Garcia
X# <agarcia at igalia.com>
Xdiff -Nur src/cvs.h src/cvs.h
X--- src/cvs.h 2005-10-02 23:17:20.000000000 +0800
X+++ src/cvs.h 2006-02-26 22:08:16.000000000 +0800
X@@ -145,6 +145,13 @@
X #define CVSADM_TEMPLATE "CVS/Template"
X #endif /* USE_VMS_FILENAMES */
X
X+/* Global configuration file mapping repositories to uids. This can be
X+ used instead of getting the unix user. This is prevents a security
X+ problem where anyone with commit access can basically become any
X+ user on the machine. Combined with the insecure pserver that is a
X+ problem waiting to happen. */
X+#define CVS_REPOUIDFILE "/etc/cvs-repouids"
X+
X /* This is the special directory which we use to store various extra
X per-directory information in the repository. It must be the same as
X CVSADM to avoid creating a new reserved directory name which users cannot
Xdiff -Nur src/server.c src/server.c
X--- src/server.c 2005-09-28 23:25:59.000000000 +0800
X+++ src/server.c 2006-02-26 22:08:16.000000000 +0800
X@@ -6570,6 +6570,12 @@
X exit (EXIT_FAILURE);
X }
X
X+ if (pw->pw_uid == 0)
X+ {
X+ printf("error 0: root not allowed\n");
X+ exit (EXIT_FAILURE);
X+ }
X+
X #if HAVE_INITGROUPS
X if (initgroups (pw->pw_name, pw->pw_gid) < 0
X # ifdef EPERM
X@@ -6667,6 +6673,51 @@
X }
X #endif
X
X+static char*
X+global_repo_uid(const char* repository)
X+{
X+ FILE *fp;
X+ char *linebuf = NULL;
X+ size_t linebuf_len;
X+ int found_it = 0;
X+ size_t repolen = strlen (repository);
X+ char *user;
X+
X+ fp = fopen (CVS_REPOUIDFILE, "r");
X+ if (fp == NULL)
X+ {
X+ if (!existence_error (errno))
X+ error (0, errno, "cannot open %s", CVS_REPOUIDFILE);
X+ return NULL;
X+ }
X+
X+ while (getline (&linebuf, &linebuf_len, fp) >= 0)
X+ {
X+ if ((strncmp (linebuf, repository, repolen) == 0)
X+ && (linebuf[repolen] == ':'))
X+ {
X+ found_it = 1;
X+ break;
X+ }
X+ }
X+
X+ if (ferror (fp))
X+ error (0, errno, "cannot read %s", CVS_REPOUIDFILE);
X+ if (fclose (fp) < 0)
X+ error (0, errno, "cannot close %s", CVS_REPOUIDFILE);
X+
X+ if (!found_it) {
X+ free (linebuf);
X+ return NULL;
X+ }
X+
X+ strtok (linebuf + repolen, "\n");
X+ user = xstrdup (linebuf + repolen + 1);
X+ free (linebuf);
X+
X+ return user;
X+}
X+
X #ifdef AUTH_SERVER_SUPPORT
X
X extern char *crypt (const char *, const char *);
X@@ -6738,7 +6789,7 @@
X /* If found_it, then linebuf contains the information we need. */
X if (found_it)
X {
X- char *found_password, *host_user_tmp;
X+ char *found_password, *host_user_tmp, *user_override;
X char *non_cvsuser_portion;
X
X /* We need to make sure lines such as
X@@ -6805,6 +6856,9 @@
X /* Give host_user_ptr permanent storage. */
X *host_user_ptr = xstrdup (host_user_tmp);
X retval = 1;
X+ user_override = global_repo_uid (repository);
X+ if (user_override)
X+ *host_user_ptr = user_override;
X }
X else
X {
END-of-/usr/ports/devel/cvs-devel/files/patch-cvs-repouid-0.1
echo x - /usr/ports/devel/cvs-devel/files/patch-cvs.info.typo
sed 's/^X//' >/usr/ports/devel/cvs-devel/files/patch-cvs.info.typo << 'END-of-/usr/ports/devel/cvs-devel/files/patch-cvs.info.typo'
X# Minor documentation changes
X#
X# Patch by Steve McIntyre <steve at einval.com> and Britton Leo Kerin <fsblk at aurora.uaf.edu>
Xdiff -Nur doc/cvsclient.texi doc/cvsclient.texi
X--- doc/cvsclient.texi 2005-07-20 18:39:59.000000000 +0800
X+++ doc/cvsclient.texi 2006-02-26 22:39:20.000000000 +0800
X@@ -3,9 +3,10 @@
X @setfilename cvsclient.info
X @include version-client.texi
X
X- at dircategory Programming
X+ at dircategory Development
X @direntry
X-* cvsclient: (cvsclient). The CVS client/server protocol.
X+* CVS client/server: (cvsclient). Describes the client/server protocol
X+ used by CVS.
X @end direntry
X
X @node Top
Xdiff -Nur doc/cvs.texinfo doc/cvs.texinfo
X--- doc/cvs.texinfo 2006-02-26 22:39:19.000000000 +0800
X+++ doc/cvs.texinfo 2006-02-26 22:39:20.000000000 +0800
X@@ -97,7 +97,7 @@
X @end macro
X @end ifhtml
X
X- at dircategory GNU Packages
X+ at dircategory Development
X @direntry
X * CVS: (cvs). Concurrent Versions System
X @end direntry
X@@ -2385,13 +2385,16 @@
X There are two access methods that you use in @code{CVSROOT}
X for rsh. @code{:server:} specifies an internal rsh
X client, which is supported only by some @sc{cvs} ports.
X+This is not supported on most Unix-style systems,
X+including Debian.
X @code{:ext:} specifies an external rsh program. By
X default this is @code{rsh} (unless otherwise specified
X by the @file{--with-rsh} flag to configure) but you may set the
X @code{CVS_RSH} environment variable to invoke another
X program which can access the remote server (for
X example, @code{remsh} on HP-UX 9 because @code{rsh} is
X-something different). It must be a program which can
X+something different, or @code{ssh} to allow the use of
X+secure and/or compressed connections). It must be a program which can
X transmit data to and from the server without modifying
X it; for example the Windows NT @code{rsh} is not
X suitable since it by default translates between CRLF
X@@ -12711,7 +12714,7 @@
X @item @var{mname} [ options ] @var{dir} [ @var{files}@dots{} ]
X In the simplest case, this form of module definition
X reduces to @samp{@var{mname} @var{dir}}. This defines
X-all the files in directory @var{dir} as module mname.
X+all the files in directory @var{dir} as module @var{mname}.
X @var{dir} is a relative path (from @code{$CVSROOT}) to a
X directory of source in the source repository. In this
X case, on checkout, a single directory called
END-of-/usr/ports/devel/cvs-devel/files/patch-cvs.info.typo
echo x - /usr/ports/devel/cvs-devel/files/patch-cvsbug_tmpfix
sed 's/^X//' >/usr/ports/devel/cvs-devel/files/patch-cvsbug_tmpfix << 'END-of-/usr/ports/devel/cvs-devel/files/patch-cvsbug_tmpfix'
X# Patch for a tmp race in cvsbug (in the source package; we don't ship
X# the script as part of the package). Closes: #325106
Xdiff -Nur src/cvsbug.in src/cvsbug.in
X--- src/cvsbug.in 2003-02-26 05:31:33.000000000 +0800
X+++ src/cvsbug.in 2006-02-26 22:07:08.000000000 +0800
X@@ -109,14 +109,14 @@
X /usr/bin/ypcat passwd 2>/dev/null | cat - /etc/passwd | grep "^$LOGNAME:" |
X cut -f5 -d':' | sed -e 's/,.*//' > $TEMP
X ORIGINATOR="`cat $TEMP`"
X- rm -f $TEMP
X+ > $TEMP
X fi
X fi
X
X if [ "$ORIGINATOR" = "" ]; then
X grep "^$LOGNAME:" /etc/passwd | cut -f5 -d':' | sed -e 's/,.*//' > $TEMP
X ORIGINATOR="`cat $TEMP`"
X- rm -f $TEMP
X+ > $TEMP
X fi
X
X if [ -n "$ORGANIZATION" ]; then
END-of-/usr/ports/devel/cvs-devel/files/patch-cvsbug_tmpfix
echo x - /usr/ports/devel/cvs-devel/files/patch-cvsrc_whitespace
sed 's/^X//' >/usr/ports/devel/cvs-devel/files/patch-cvsrc_whitespace << 'END-of-/usr/ports/devel/cvs-devel/files/patch-cvsrc_whitespace'
X# Ignore leading whitespace in .cvsrc files. Closes: #212415. Thanks
X# to James R. Van Zandt for the patch.
Xdiff -Nur src/cvsrc.c src/cvsrc.c
X--- src/cvsrc.c 2005-03-16 23:52:14.000000000 +0800
X+++ src/cvsrc.c 2006-02-26 18:25:18.000000000 +0800
X@@ -41,6 +41,7 @@
X size_t line_chars_allocated;
X
X char *optstart;
X+ int white_len;
X
X int command_len;
X int found = 0;
X@@ -96,9 +97,12 @@
X if (line[0] == '#')
X continue;
X
X+ for (white_len=0; isspace(line[white_len]); white_len++)
X+ ;
X+
X /* stop if we match the current command */
X- if (!strncmp (line, cmdname, command_len)
X- && isspace ((unsigned char) *(line + command_len)))
X+ if (!strncmp (line + white_len, cmdname, command_len)
X+ && isspace ((unsigned char) *(line + white_len + command_len)))
X {
X found = 1;
X break;
X@@ -120,7 +124,7 @@
X if (found)
X {
X /* skip over command in the options line */
X- for (optstart = strtok (line + command_len, "\t \n");
X+ for (optstart = strtok (line + white_len + command_len, "\t \n");
X optstart;
X optstart = strtok (NULL, "\t \n"))
X {
END-of-/usr/ports/devel/cvs-devel/files/patch-cvsrc_whitespace
echo x - /usr/ports/devel/cvs-devel/files/patch-ext_expansion
sed 's/^X//' >/usr/ports/devel/cvs-devel/files/patch-ext_expansion << 'END-of-/usr/ports/devel/cvs-devel/files/patch-ext_expansion'
X#
X# Make the "ext" method more intelligent; allow specification of the
X# "rsh" command using ext=<command>. Extended to recognise "extssh" the
X# same way as "ext=ssh"
X#
X# Original patch by Inaky Perez-Gonzalez <inaky.perez-gonzalez at intel.com>,
X# extension by Steve McIntyre <steve at einval.com>. Bugs #165432 and #276328
Xdiff -Nur src/root.c.orig src/root.c
X--- src/root.c.orig 2006-05-05 23:35:40.000000000 +0800
X+++ src/root.c 2006-05-05 23:34:12.000000000 +0800
X@@ -553,6 +547,18 @@
X newroot->method = gserver_method;
X else if (!strcasecmp (method, "server"))
X newroot->method = server_method;
X+ else if (strncmp (method, "ext=", 4) == 0)
X+ {
X+ const char *rsh = method + 4;
X+ setenv ("CVS_RSH", rsh, 1); /* This is a hack, but simplifies */
X+ newroot->method = ext_method;
X+ }
X+ else if (strncmp (method, "extssh", 6) == 0)
X+ {
X+ const char *rsh = method + 3;
X+ setenv ("CVS_RSH", rsh, 1); /* This is a hack, but simplifies */
X+ newroot->method = ext_method;
X+ }
X else if (!strcasecmp (method, "ext"))
X newroot->method = ext_method;
X else if (!strcasecmp (method, "fork"))
END-of-/usr/ports/devel/cvs-devel/files/patch-ext_expansion
echo x - /usr/ports/devel/cvs-devel/files/patch-date_format_option
sed 's/^X//' >/usr/ports/devel/cvs-devel/files/patch-date_format_option << 'END-of-/usr/ports/devel/cvs-devel/files/patch-date_format_option'
X#
X# Add an extra option to set the DateFormat used in log output.
X#
X# Patch by Steve McIntyre <steve at einval.com>
Xdiff -Nur doc/cvs.texinfo doc/cvs.texinfo
X--- doc/cvs.texinfo 2005-09-23 10:02:53.000000000 +0800
X+++ doc/cvs.texinfo 2006-02-26 23:03:05.000000000 +0800
X@@ -14840,9 +14840,17 @@
X group to using @code{cvs admin} to change the default keyword
X substitution mode, lock revisions, unlock revisions, and
X replace the log message, use @samp{UserAdminOptions=klum}.
X- at end table
X-
X
X+ at cindex DateFormat, in CVSROOT/config
X+ at item DateFormat=@var{value}
X+Control the output format of dates from cvs. cvs version 1.12.x
X+changed the default format to use ``iso8601'' dates, which are
X+better for many reasons. However, old scripts/programs written to
X+parse the output of various cvs commands (especially cvs log) may
X+not cope with the change in date format (e.g. gcvs). The default
X+value of DateFormat will be ``iso8601'', but if you need temporary
X+backwards-compatibility set DateFormat=old.
X+ at end table
X
X @c ---------------------------------------------------------------------
X @node Environment variables
Xdiff -Nur src/log.c src/log.c
X--- src/log.c 2005-03-22 21:19:57.000000000 +0800
X+++ src/log.c 2006-02-26 23:03:05.000000000 +0800
X@@ -1607,8 +1607,12 @@
X &sec);
X if (year < 1900)
X year += 1900;
X- sprintf (buf, "%04d-%02d-%02d %02d:%02d:%02d +0000", year, mon, mday,
X- hour, min, sec);
X+ if ('-' == datesep)
X+ sprintf (buf, "%04d%c%02d%c%02d %02d:%02d:%02d +0000", year, datesep,
X+ mon, datesep, mday, hour, min, sec);
X+ else
X+ sprintf (buf, "%04d%c%02d%c%02d %02d:%02d:%02d", year, datesep,
X+ mon, datesep, mday, hour, min, sec);
X cvs_output_tagged ("date", buf);
X
X cvs_output_tagged ("text", "; author: ");
Xdiff -Nur src/main.c src/main.c
X--- src/main.c 2006-02-26 23:03:04.000000000 +0800
X+++ src/main.c 2006-02-26 23:10:12.000000000 +0800
X@@ -1371,9 +1371,19 @@
X static char buf[sizeof ("yyyy-mm-dd HH:MM:SS -HHMM")];
X /* Convert to a time in the local time zone. */
X struct tm ltm = *(localtime (&unixtime));
X-
X- if (!my_strftime (buf, sizeof (buf), "%Y-%m-%d %H:%M:%S %z", <m, 0, 0))
X- return NULL;
X+ char *format = NULL;
X+
X+ switch (datesep)
X+ {
X+ case '/':
X+ format = "%Y/%m/%d %H:%M:%S";
X+ break;
X+ default:
X+ format = "%Y-%m-%d %H:%M:%S %z";
X+ break;
X+ }
X+ if (my_strftime (buf, sizeof (buf), format, <m, 0, 0) == 0)
X+ return NULL;
X
X return xstrdup (buf);
X }
X@@ -1388,9 +1398,19 @@
X static char buf[sizeof ("yyyy-mm-dd HH:MM:SS -HHMM")];
X /* Convert to a time in the local time zone. */
X struct tm ltm = *(gmtime (&unixtime));
X-
X- if (!my_strftime (buf, sizeof (buf), "%Y-%m-%d %H:%M:%S %z", <m, 0, 0))
X- return NULL;
X+ char *format = NULL;
X+
X+ switch (datesep)
X+ {
X+ case '/':
X+ format = "%Y/%m/%d %H:%M:%S";
X+ break;
X+ default:
X+ format = "%Y-%m-%d %H:%M:%S %z";
X+ break;
X+ }
X+ if (my_strftime (buf, sizeof (buf), format, <m, 0, 0) == 0)
X+ return NULL;
X
X return xstrdup (buf);
X }
Xdiff -Nur src/parseinfo.c src/parseinfo.c
X--- src/parseinfo.c 2005-09-06 12:40:37.000000000 +0800
X+++ src/parseinfo.c 2006-02-26 23:03:05.000000000 +0800
X@@ -626,6 +626,19 @@
X retval->logHistory = xstrdup (p);
X }
X }
X+ /* grab FreeBSD date format idea */
X+ else if (strcmp (line, "DateFormat") == 0)
X+ {
X+ if (strcmp (p, "old") == 0)
X+ {
X+ datesep = '/';
X+ }
X+ else if (strcmp (p, "iso8601") == 0)
X+ {
X+ datesep = '-';
X+ }
X+ }
X+ /* end grabbing */
X else if (strcmp (line, "RereadLogAfterVerify") == 0)
X {
X if (!strcasecmp (p, "never"))
Xdiff -Nur src/rcs.c src/rcs.c
X--- src/rcs.c 2006-02-26 23:03:04.000000000 +0800
X+++ src/rcs.c 2006-02-26 23:03:05.000000000 +0800
X@@ -33,6 +33,8 @@
X # endif
X #endif
X
X+int datesep = '-';
X+
X /* The RCS -k options, and a set of enums that must match the array.
X These come first so that we can use enum kflag in function
X prototypes. */
X@@ -3537,8 +3539,8 @@
X &sec);
X if (year < 1900)
X year += 1900;
X- sprintf (buf, "%04d/%02d/%02d %02d:%02d:%02d", year, mon, mday,
X- hour, min, sec);
X+ sprintf (buf, "%04d%c%02d%c%02d %02d:%02d:%02d", year, datesep, mon,
X+ datesep, mday, hour, min, sec);
X return xstrdup (buf);
X }
X
Xdiff -Nur src/rcs.h src/rcs.h
X--- src/rcs.h 2005-03-18 06:36:24.000000000 +0800
X+++ src/rcs.h 2006-02-26 23:03:05.000000000 +0800
X@@ -254,6 +254,7 @@
X void RCS_setlocalid (const char *, unsigned int, void **, const char *arg);
X char *make_file_label (const char *, const char *, RCSNode *);
X
X+extern int datesep;
X extern bool preserve_perms;
X
X /* From import.c. */
END-of-/usr/ports/devel/cvs-devel/files/patch-date_format_option
echo x - /usr/ports/devel/cvs-devel/files/patch-extra_tags
sed 's/^X//' >/usr/ports/devel/cvs-devel/files/patch-extra_tags << 'END-of-/usr/ports/devel/cvs-devel/files/patch-extra_tags'
X#
X# Add extra tag keyword expansion options
X#
X# Patch by Steve McIntyre <steve at einval.com>
Xdiff -Nur src/logmsg.c src/logmsg.c
X--- src/logmsg.c 2006-02-26 22:54:52.000000000 +0800
X+++ src/logmsg.c 2006-02-26 22:56:36.000000000 +0800
X@@ -642,7 +642,11 @@
X break;
X case 'T':
X li = p->data;
X- arg = li->tag ? li->tag : "";
X+ arg = li->tag ? li->tag : "TRUNK";
X+ break;
X+ case 'S':
X+ arg = xmalloc(strlen(p->key) + 5);
X+ sprintf(arg, "\\\"%s\\\"", p->key);
X break;
X case 'V':
X li = p->data;
X@@ -814,7 +818,7 @@
X #endif /* SERVER_SUPPORT */
X "p", "s", srepos,
X "r", "s", current_parsed_root->directory,
X- "sVv", ",", changes,
X+ "SsTVv", ",", changes,
X logmsg_list_to_args_proc, (void *) NULL,
X (char *) NULL);
X if (!cmdline || !strlen (cmdline))
END-of-/usr/ports/devel/cvs-devel/files/patch-extra_tags
echo x - /usr/ports/devel/cvs-devel/files/patch-fix_-l
sed 's/^X//' >/usr/ports/devel/cvs-devel/files/patch-fix_-l << 'END-of-/usr/ports/devel/cvs-devel/files/patch-fix_-l'
X# Re-added -l option to the client. Does nothing, but stops
X# warnings/errors. Will really fix #219950 and #224737, and also a
X# differently-described bug (220379). Closes: #219950, #220379
X#
X# Patch by Steve McIntyre <steve at einval.com>
Xdiff -Nur src/main.c src/main.c
X--- src/main.c 2006-02-26 22:09:42.000000000 +0800
X+++ src/main.c 2006-02-26 22:09:43.000000000 +0800
X@@ -511,7 +511,7 @@
X int help = 0; /* Has the user asked for help? This
X lets us support the `cvs -H cmd'
X convention to give help for cmd. */
X- static const char short_options[] = "+QqrwtnRvb:T:e:d:Hfz:s:xa";
X+ static const char short_options[] = "+QqrwtnRvb:T:e:d:Hfz:s:xal";
X static struct option long_options[] =
X {
X {"help", 0, NULL, 'H'},
X@@ -669,6 +669,8 @@
X noexec = 1;
X logoff = 1;
X break;
X+ case 'l': /* no-op to simply ignore the old -l option */
X+ break;
X case 'v':
X (void) fputs ("\n", stdout);
X version (0, NULL);
END-of-/usr/ports/devel/cvs-devel/files/patch-fix_-l
echo x - /usr/ports/devel/cvs-devel/files/patch-fix_sparc_sigbus
sed 's/^X//' >/usr/ports/devel/cvs-devel/files/patch-fix_sparc_sigbus << 'END-of-/usr/ports/devel/cvs-devel/files/patch-fix_sparc_sigbus'
Xdiff -Nur src/update.c src/update.c
X--- src/update.c 2005-09-22 20:49:17.000000000 +0200
X+++ src/update.c 2006-12-15 01:35:54.000000000 +0100
X@@ -58,7 +58,7 @@
X static int patch_file (struct file_info *finfo,
X Vers_TS *vers_ts,
X int *docheckout, struct stat *file_info,
X- unsigned char *checksum);
X+ md5_uint32 *checksum);
X static void patch_file_write (void *, const char *, size_t);
X #endif
X static int merge_file (struct file_info *finfo, Vers_TS *vers);
X@@ -723,7 +723,7 @@
X {
X int docheckout;
X struct stat file_info;
X- unsigned char checksum[16];
X+ md5_uint32 checksum[4];
X
X retval = patch_file (finfo,
X vers, &docheckout,
X@@ -1511,7 +1511,7 @@
X */
X static int
X patch_file (struct file_info *finfo, Vers_TS *vers_ts, int *docheckout,
X- struct stat *file_info, unsigned char *checksum)
X+ struct stat *file_info, md5_uint32 *checksum)
X {
X char *backup;
X char *file1;
END-of-/usr/ports/devel/cvs-devel/files/patch-fix_sparc_sigbus
echo x - /usr/ports/devel/cvs-devel/files/patch-flag_conflicted_copies
sed 's/^X//' >/usr/ports/devel/cvs-devel/files/patch-flag_conflicted_copies << 'END-of-/usr/ports/devel/cvs-devel/files/patch-flag_conflicted_copies'
X# Undo not flagging conflicted copies anymore, as reported by
X# Henrique de Moraes Holschuh <hmh at debian.org>
X# Closes: #368681
X# Fix as described in message to the CVS mailing list at
X# http://lists.gnu.org/archive/html/info-cvs/2006-06/msg00050.html
X--- src/client.c~ 2005-10-02 16:17:20.000000000 +0100
X+++ src/client.c 2006-06-09 20:12:06.000000000 +0100
X@@ -4533,10 +4533,9 @@
X /* File no longer exists. Don't do anything, missing files
X just happen. */
X }
X- else if (!vers->ts_rcs || args->force
X- || strcmp (vers->ts_conflict
X- ? vers->ts_conflict : vers->ts_rcs, vers->ts_user)
X- || (vers->ts_conflict && !strcmp (cvs_cmd_name, "diff")))
X+ else if (vers->ts_rcs == NULL
X+ || args->force
X+ || strcmp (vers->ts_user, vers->ts_rcs) != 0)
X {
X if (args->no_contents
X && supported_request ("Is-modified"))
END-of-/usr/ports/devel/cvs-devel/files/patch-flag_conflicted_copies
echo x - /usr/ports/devel/cvs-devel/files/patch-history_val-tag_world_writeable
sed 's/^X//' >/usr/ports/devel/cvs-devel/files/patch-history_val-tag_world_writeable << 'END-of-/usr/ports/devel/cvs-devel/files/patch-history_val-tag_world_writeable'
X# Don't make history and val-tags files world-writable when creating a
X# new repository. (Closes: #125892)
X#
X# Author unknown, probably Eric Gillespie, Jr. <epg at debian.org>
Xdiff -Nur src/mkmodules.c src/mkmodules.c
X--- src/mkmodules.c 2005-05-25 04:59:01.000000000 +0800
X+++ src/mkmodules.c 2006-02-26 22:27:55.000000000 +0800
X@@ -1249,11 +1249,6 @@
X fp = xfopen (info, "w");
X if (fclose (fp) < 0)
X error (1, errno, "cannot close %s", info);
X-
X- /* Make the new history file world-writeable, since every CVS
X- user will need to be able to write to it. We use chmod()
X- because xchmod() is too shy. */
X- chmod (info, 0666);
X }
X
X /* Make an empty val-tags file to prevent problems creating it later. */
X@@ -1267,11 +1262,6 @@
X fp = xfopen (info, "w");
X if (fclose (fp) < 0)
X error (1, errno, "cannot close %s", info);
X-
X- /* Make the new val-tags file world-writeable, since every CVS
X- user will need to be able to write to it. We use chmod()
X- because xchmod() is too shy. */
X- chmod (info, 0666);
X }
X
X free (info);
END-of-/usr/ports/devel/cvs-devel/files/patch-history_val-tag_world_writeable
echo x - /usr/ports/devel/cvs-devel/files/patch-homedir
sed 's/^X//' >/usr/ports/devel/cvs-devel/files/patch-homedir << 'END-of-/usr/ports/devel/cvs-devel/files/patch-homedir'
X# Fix handling of homedirectory for pserver, patch from
X# Jim Studt <jim at federated.com>. Closes: Bug#51234
Xdiff -Nur src/filesubr.c src/filesubr.c
X--- src/filesubr.c 2005-09-28 23:25:59.000000000 +0800
X+++ src/filesubr.c 2006-02-26 22:31:57.000000000 +0800
X@@ -795,6 +795,11 @@
X The workaround is to put -f in inetd.conf which means that
X get_homedir won't get called until after the switch in user ID.
X
X+ NOTE: the above paragraph is not sufficient if the HOME environment
X+ variable is set, it overrides the uid based password lookup, hence
X+ the change_uid logic path that blocks the HOME environment variable
X+ when the uid gets changed.
X+
X The whole concept of a "home directory" on the server is pretty
X iffy, although I suppose some people probably are relying on it for
X .cvsrc and such, in the cases where it works. */
X@@ -802,15 +807,24 @@
X get_homedir (void)
X {
X static char *home = NULL;
X+ static uid_t home_uid = 0;
X+ static int changed_uid = 0;
X char *env;
X+ uid_t uid = getuid();
X struct passwd *pw;
X
X+ if ( home && home_uid != uid) {
X+ home = 0;
X+ home_uid = uid;
X+ changed_uid = 1;
X+ }
X+
X if (home != NULL)
X return home;
X
X- if (!server_active && (env = getenv ("HOME")) != NULL)
X+ if (!server_active && ((env = getenv ("HOME")) != NULL) && !changed_uid)
X home = env;
X- else if ((pw = (struct passwd *) getpwuid (getuid ()))
X+ else if ((pw = (struct passwd *) getpwuid (uid))
X && pw->pw_dir)
X home = xstrdup (pw->pw_dir);
X else
END-of-/usr/ports/devel/cvs-devel/files/patch-homedir
echo x - /usr/ports/devel/cvs-devel/files/patch-import-n-X
sed 's/^X//' >/usr/ports/devel/cvs-devel/files/patch-import-n-X << 'END-of-/usr/ports/devel/cvs-devel/files/patch-import-n-X'
X# Fix `cvs import -X' failure
X# Fixes: #374964
X# Patch by Florian Zschocke <zschocke at gmx.net>
Xdiff -Nur src/import.c src/import.c
X--- src/import.c 2005-09-04 02:27:44.000000000 +0200
X+++ src/import.c 2006-06-19 19:41:57.000000000 +0200
X@@ -595,7 +595,7 @@
X /* Attempt to make the Attic directory, in case it
X does not exist. */
X (void) sprintf (rcs, "%s/%s", repository, CVSATTIC);
X- if (CVS_MKDIR (rcs, 0777 ) != 0 && errno != EEXIST)
X+ if (noexec == 0 && CVS_MKDIR (rcs, 0777 ) != 0 && errno != EEXIST)
X error (1, errno, "cannot make directory `%s'", rcs);
X
X /* Note that the above clobbered the path name, so we
END-of-/usr/ports/devel/cvs-devel/files/patch-import-n-X
echo x - /usr/ports/devel/cvs-devel/files/patch-keyword_alphanumerics
sed 's/^X//' >/usr/ports/devel/cvs-devel/files/patch-keyword_alphanumerics << 'END-of-/usr/ports/devel/cvs-devel/files/patch-keyword_alphanumerics'
X# Fix keyword handling to accept alphanumerics, not just alphabetics.
X# Thanks to Branden Robinson for this fix.
Xdiff -Nur src/rcs.c src/rcs.c
X--- src/rcs.c 2005-09-28 23:25:59.000000000 +0800
X+++ src/rcs.c 2006-02-26 17:58:32.000000000 +0800
X@@ -3680,13 +3680,18 @@
X srch_len -= (srch_next + 1) - srch;
X srch = srch_next + 1;
X
X- /* Look for the first non alphabetic character after the '$'. */
X+ /*
X+ * Accept alphanumerics, not just alphabetics. XFree86, anyone?
X+ * Branden Robinson Sat, 7 Sep 2002 02:04:59 -0500
X+ */
X+
X+ /* Look for the first non alphanumeric character after the '$'. */
X send = srch + srch_len;
X for (s = srch; s < send; s++)
X- if (! isalpha ((unsigned char) *s))
X+ if (! isalnum ((unsigned char) *s))
X break;
X
X- /* If the first non alphabetic character is not '$' or ':',
X+ /* If the first non alphanumeric character is not '$' or ':',
X then this is not an RCS keyword. */
X if (s == send || (*s != '$' && *s != ':'))
X continue;
END-of-/usr/ports/devel/cvs-devel/files/patch-keyword_alphanumerics
echo x - /usr/ports/devel/cvs-devel/files/patch-login_cvspass_message
sed 's/^X//' >/usr/ports/devel/cvs-devel/files/patch-login_cvspass_message << 'END-of-/usr/ports/devel/cvs-devel/files/patch-login_cvspass_message'
X# Print a clearer message if ~/.cvspass does not exist when cvs login is
X# called. Closes: #168163.
X#
X# Patch by Steve McIntyre <steve at einval.com>
Xdiff -Nur src/login.c src/login.c
X--- src/login.c 2005-05-14 05:47:28.000000000 +0800
X+++ src/login.c 2006-02-26 21:31:17.000000000 +0800
X@@ -309,7 +309,10 @@
X fp = CVS_FOPEN (passfile, "r");
X if (fp == NULL)
X {
X- error (0, errno, "warning: failed to open %s for reading", passfile);
X+ if (errno == ENOENT)
X+ error (0, 0, "CVS password file %s does not exist - creating a new file", passfile);
X+ else
X+ error (0, errno, "warning: failed to open %s for reading", passfile);
X goto process;
X }
X
END-of-/usr/ports/devel/cvs-devel/files/patch-login_cvspass_message
echo x - /usr/ports/devel/cvs-devel/files/patch-newlines_in_commit_template
sed 's/^X//' >/usr/ports/devel/cvs-devel/files/patch-newlines_in_commit_template << 'END-of-/usr/ports/devel/cvs-devel/files/patch-newlines_in_commit_template'
X# Change commit template so that there are two newlines at the
X# beginning. (closes: #102624)
X#
X# Patch from Tollef Fog Heen <tfheen at debian.org>
Xdiff -Nur src/logmsg.c src/logmsg.c
X--- src/logmsg.c 2005-09-04 08:27:44.000000000 +0800
X+++ src/logmsg.c 2006-02-26 17:57:28.000000000 +0800
X@@ -264,6 +264,11 @@
X }
X }
X
X+ if (!*messagep)
X+ {
X+ (void) fprintf (fp, "\n");
X+ }
X+
X (void) fprintf (fp,
X "%s----------------------------------------------------------------------\n",
X CVSEDITPREFIX);
X@@ -349,7 +354,11 @@
X *messagep = NULL;
X }
X
X- if (pre_stbuf.st_mtime == post_stbuf.st_mtime || *messagep == NULL)
X+ if (pre_stbuf.st_mtime == post_stbuf.st_mtime ||
X+ *messagep == NULL ||
X+ (*messagep)[0] == '\0' ||
X+ strcmp (*messagep, "\n") == 0 ||
X+ strcmp (*messagep, "\n\n") == 0)
X {
X for (;;)
X {
END-of-/usr/ports/devel/cvs-devel/files/patch-newlines_in_commit_template
echo x - /usr/ports/devel/cvs-devel/files/patch-normalize_correct_roots
sed 's/^X//' >/usr/ports/devel/cvs-devel/files/patch-normalize_correct_roots << 'END-of-/usr/ports/devel/cvs-devel/files/patch-normalize_correct_roots'
X# Apply patch from 120042, which only tries to parse pserver, gserver
X# and kserver methods when doing cvs login. (closes: #120042).
X#
X# Patch from Horms <horms at vergenet.net>
Xdiff -Nur src/login.c src/login.c
X--- src/login.c 2006-02-26 22:10:42.000000000 +0800
X+++ src/login.c 2006-02-26 22:25:14.000000000 +0800
X@@ -200,11 +200,21 @@
X return NULL;
X }
X *p = ' ';
X- tmp_root_canonical = normalize_cvsroot (tmp_root);
X- if (strcmp (cvsroot_canonical, tmp_root_canonical) == 0)
X- password = p + 1;
X-
X- free (tmp_root_canonical);
X+ switch (tmp_root->method)
X+ {
X+ case gserver_method:
X+ case pserver_method:
X+#ifdef HAVE_KERBEROS
X+ case kserver_method:
X+#endif /* HAVE_KERBEROS */
X+ tmp_root_canonical = normalize_cvsroot (tmp_root);
X+ if (strcmp (cvsroot_canonical, tmp_root_canonical) == 0)
X+ password = p + 1;
X+ free (tmp_root_canonical);
X+ break;
X+ default:
X+ break;
X+ }
X }
X
X return password;
END-of-/usr/ports/devel/cvs-devel/files/patch-normalize_correct_roots
echo x - /usr/ports/devel/cvs-devel/files/patch-parseopts
sed 's/^X//' >/usr/ports/devel/cvs-devel/files/patch-parseopts << 'END-of-/usr/ports/devel/cvs-devel/files/patch-parseopts'
Xdiff -Nur src/cvs.h src/cvs.h
X--- src/cvs.h 2006-08-19 00:05:38.000000000 +0100
X+++ src/cvs.h 2006-08-19 00:05:41.000000000 +0100
X@@ -177,6 +177,7 @@
X #define CVSROOTADM_LOGINFO "loginfo"
X #define CVSROOTADM_MODULES "modules"
X #define CVSROOTADM_NOTIFY "notify"
X+#define CVSROOTADM_OPTIONS "options"
X #define CVSROOTADM_PASSWD "passwd"
X #define CVSROOTADM_POSTADMIN "postadmin"
X #define CVSROOTADM_POSTPROXY "postproxy"
X@@ -506,6 +507,7 @@
X char *strcat_filename_onto_homedir (const char *, const char *);
X char *cvs_temp_name (void);
X FILE *cvs_temp_file (char **filename);
X+void parseopts (const char *root);
X
X int ls (int argc, char *argv[]);
X int unlink_file (const char *f);
Xdiff -Nur src/main.c src/main.c
X--- src/main.c 2006-08-19 00:05:38.000000000 +0100
X+++ src/main.c 2006-08-19 00:08:14.000000000 +0100
X@@ -1108,6 +1108,8 @@
X CVSROOT/config file to fix the broken one! */
X if (config) free_config (config);
X config = parse_config (current_parsed_root->directory, NULL);
X+ /* Now is a convenient time to read CVSROOT/options */
X+ parseopts(current_parsed_root->directory);
X
X /* Can set TMPDIR in the environment if necessary now, since
X * if it was set in config, we now know it.
X@@ -1482,5 +1484,63 @@
X exit (EXIT_FAILURE);
X }
X
X+void
X+parseopts(root)
X+ const char *root;
X+{
X+ char path[PATH_MAX];
X+ int save_errno;
X+ char buf[1024];
X+ const char *p;
X+ char *q;
X+ FILE *fp;
X+
X+ if (root == NULL) {
X+ printf("no CVSROOT in parseopts\n");
X+ return;
X+ }
X+ p = strchr (root, ':');
X+ if (p)
X+ p++;
X+ else
X+ p = root;
X+ if (p == NULL) {
X+ printf("mangled CVSROOT in parseopts\n");
X+ return;
X+ }
X+ (void) sprintf (path, "%s/%s/%s", p, CVSROOTADM, CVSROOTADM_OPTIONS);
X+ if ((fp = fopen(path, "r")) != NULL) {
X+ while (fgets(buf, sizeof buf, fp) != NULL) {
X+ if (buf[0] == '#')
X+ continue;
X+ q = strrchr(buf, '\n');
X+ if (q)
X+ *q = '\0';
X+
X+ if (!strncmp(buf, "tag=", 4)) {
X+ char *what;
X+ char *rcs_localid;
X+
X+ rcs_localid = buf + 4;
X+ RCS_setlocalid(path, 0, &config->keywords, rcs_localid);
X+ }
X+ if (!strncmp(buf, "tagexpand=", 10)) {
X+ char *what;
X+ char *rcs_incexc;
X+
X+ rcs_incexc = buf + 10;
X+ RCS_setincexc(&config->keywords, rcs_incexc);
X+ }
X+ /*
X+ * OpenBSD has a "umask=" and "dlimit=" command, we silently
X+ * ignore them here since they are not much use to us. cvsumask
X+ * defaults to 002 already, and the dlimit (data size limit)
X+ * should really be handled elsewhere (eg: login.conf).
X+ */
X+ }
X+ fclose(fp);
X+ }
X+}
X+
X /* vim:tabstop=8:shiftwidth=4
X */
Xdiff -Nur src/server.c src/server.c
X--- src/server.c 2006-08-19 00:05:38.000000000 +0100
X+++ src/server.c 2006-08-19 00:05:41.000000000 +0100
X@@ -985,6 +985,9 @@
X config->MaxCompressionLevel);
X }
X
X+ /* Now is a good time to read CVSROOT/options too. */
X+ parseopts(current_parsed_root->directory);
X+
X path = xmalloc (strlen (current_parsed_root->directory)
X + sizeof (CVSROOTADM)
X + 2);
END-of-/usr/ports/devel/cvs-devel/files/patch-parseopts
echo x - /usr/ports/devel/cvs-devel/files/patch-rcs2log_POSIX_sort
sed 's/^X//' >/usr/ports/devel/cvs-devel/files/patch-rcs2log_POSIX_sort << 'END-of-/usr/ports/devel/cvs-devel/files/patch-rcs2log_POSIX_sort'
X# Make rcs2log use POSIX 1003.1-2001 compliant `sort'. Closes: #368909
X# Patch taken from http://cvs.pld.org.pl/SOURCES/cvs-POSIX.patch?rev=1.1 ,
X# Thanks to the PLD Team.
Xdiff -Nur contrib/rcs2log.sh.orig contrib/rcs2log.sh
X--- contrib/rcs2log.sh.orig 2006-05-26 15:16:54.000000000 +0800
X+++ contrib/rcs2log.sh 2006-05-26 15:16:35.000000000 +0800
X@@ -649,7 +649,7 @@
X # Sort the log entries, first by date+time (in reverse order),
X # then by author, then by log entry, and finally by file name and revision
X # (just in case).
X-sort -t"$SOH" +2 -4r +4 +0 |
X+sort -t"$SOH" -k 3,4r -k 5 -k 1 |
X
X # Finally, reformat the sorted log entries.
X $AWK -F"$SOH" '
END-of-/usr/ports/devel/cvs-devel/files/patch-rcs2log_POSIX_sort
echo x - /usr/ports/devel/cvs-devel/files/patch-remove_-R_warning
sed 's/^X//' >/usr/ports/devel/cvs-devel/files/patch-remove_-R_warning << 'END-of-/usr/ports/devel/cvs-devel/files/patch-remove_-R_warning'
X#
X# Turn off read-only warning that breaks pserver client access. Doh!
X# Closes: #319467, #264019
X# Patch by Steve McIntyre <steve at einval.com>
Xdiff -Nur src/main.c src/main.c
X--- src/main.c 2005-10-02 23:17:21.000000000 +0800
X+++ src/main.c 2006-02-26 18:23:04.000000000 +0800
X@@ -764,13 +764,6 @@
X if (argc < 1)
X usage (usg);
X
X- if (readonlyfs && !really_quiet) {
X- error (0, 0,
X- "WARNING: Read-only repository access mode selected via `cvs -R'.\n\
X-Using this option to access a repository which some users write to may\n\
X-cause intermittent sandbox corruption.");
X- }
X-
X /* Calculate the cvs global session ID */
X
X {
END-of-/usr/ports/devel/cvs-devel/files/patch-remove_-R_warning
echo x - /usr/ports/devel/cvs-devel/files/patch-rsc2log_fix
sed 's/^X//' >/usr/ports/devel/cvs-devel/files/patch-rsc2log_fix << 'END-of-/usr/ports/devel/cvs-devel/files/patch-rsc2log_fix'
X#
X# Patch to make the rcs2log script cope with old-format (5 parameter)
X# and new-format (6 parameter) log output. Bug#258140
X#
X# Patch from Ludovic Rousseau <rousseau at debian.org>
Xdiff -Nur contrib/rcs2log.sh contrib/rcs2log.sh
X--- contrib/rcs2log.sh 2005-07-12 22:12:55.000000000 +0800
X+++ contrib/rcs2log.sh 2006-02-26 17:43:11.000000000 +0800
X@@ -416,11 +416,24 @@
X : ;;
X esac >$llogout || exit
X
X+# the date format in 'cvs -q log' changed
X+# it was
X+# date: 2003/05/06 21:23:30; author: rousseau; state: Exp; lines: +29 -31
X+# it is now
X+# date: 2003-05-06 21:23:30 +0000; author: rousseau; state: Exp; lines: +29 -31
X output_authors='/^date: / {
X- 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 ~ /^[^;]*;$/) {
X- print substr($5, 1, length($5)-1)
X- }
X+ # old date format
X+ 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 ~ /^[^;]*;$/) {
X+ print substr($5, 1, length($5)-1)
X+ }
X+ else {
X+ # new date format
X+ 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 ~ /^[^;]*;$/) {
X+ print substr($6, 1, length($6)-1)
X+ }
X+ }
X }'
X+
X authors=`
X $AWK "$output_authors" <"$rlogfile" | sort -u | comm -23 - $llogout
X `
X@@ -611,7 +624,11 @@
X date = newdate date
X }
X time = substr($3, 1, length($3) - 1)
X- author = substr($5, 1, length($5)-1)
X+ author = substr($5, 1, length($5)-1)
X+ if (author ~ /author/) {
X+ # new date format
X+ author = substr($6, 1, length($6)-1)
X+ }
X printf "%s%s%s%s%s%s%s%s%s%s", filename, SOH, rev, SOH, date, SOH, time, SOH, author, SOH
X rev = "?"
X next
END-of-/usr/ports/devel/cvs-devel/files/patch-rsc2log_fix
echo x - /usr/ports/devel/cvs-devel/files/patch-server_wrapper
sed 's/^X//' >/usr/ports/devel/cvs-devel/files/patch-server_wrapper << 'END-of-/usr/ports/devel/cvs-devel/files/patch-server_wrapper'
X#
X# Added patch to support cvs -W ! - clears all wrappers (patch also
X# forwarded to CVS people) #3374
X#
X# Patch by Michael Alan Dorman <mdorman at lot49.med.miami.edu>
Xdiff -Nur src/wrapper.c src/wrapper.c
X--- src/wrapper.c 2005-09-04 08:27:44.000000000 +0800
X+++ src/wrapper.c 2006-02-26 22:26:53.000000000 +0800
X@@ -86,7 +86,7 @@
X move this to a per-connection data structure, or better yet
X think about a cleaner solution. */
X static int wrap_setup_already_done = 0;
X- char *homedir;
X+ char *homedir = NULL;
X
X if (wrap_setup_already_done != 0)
X return;
X@@ -107,6 +107,11 @@
X free (file);
X }
X
X+#ifdef SERVER_SUPPORT
X+ if (!server_active)
X+#endif
X+ {
X+
X /* Then add entries found in home dir, (if user has one) and file
X exists. */
X homedir = get_homedir ();
X@@ -115,6 +120,8 @@
X hand it might be obnoxious to complain when CVS will function
X just fine without .cvswrappers (and many users won't even know what
X .cvswrappers is). */
X+ }
X+
X if (homedir != NULL)
X {
X char *file = strcat_filename_onto_homedir (homedir, CVSDOTWRAPPER);
X@@ -339,6 +346,12 @@
X if (!line || line[0] == '#')
X return;
X
X+ /* Allows user to declare all wrappers null and void */
X+ if ( line[0] == '!') {
X+ wrap_kill ( );
X+ return;
X+ }
X+
X memset (&e, 0, sizeof(e));
X
X /* Search for the wild card */
END-of-/usr/ports/devel/cvs-devel/files/patch-server_wrapper
echo x - /usr/ports/devel/cvs-devel/files/patch-zlib-read-compressed
sed 's/^X//' >/usr/ports/devel/cvs-devel/files/patch-zlib-read-compressed << 'END-of-/usr/ports/devel/cvs-devel/files/patch-zlib-read-compressed'
X--- src/zlib.c~ 3 Jun 2005 18:26:09 -0000 1.31
X+++ src/zlib.c 27 Oct 2005 17:59:49 -0000
X@@ -229,7 +229,7 @@ compress_buffer_input (void *closure, ch
X would fetch all the available bytes, and at least one byte. */
X
X status = (*cb->buf->input) (cb->buf->closure, bd->text,
X- need, BUFFER_DATA_SIZE, &nread);
X+ need ? 1 : 0, BUFFER_DATA_SIZE, &nread);
X
X if (status == -2)
X /* Don't try to recover from memory allcoation errors. */
END-of-/usr/ports/devel/cvs-devel/files/patch-zlib-read-compressed
exit
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list