Add cvs package.

This commit is contained in:
Alexpux 2014-04-07 11:08:38 +04:00
parent b4093426be
commit 19551ea61a
26 changed files with 1928 additions and 0 deletions

117
cvs/PKGBUILD Normal file
View File

@ -0,0 +1,117 @@
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
pkgname=cvs
pkgver=1.11.23
pkgrel=1
pkgdesc="Concurrent Versions System - a source control system"
arch=('i686' 'x86_64')
license=('GPL')
url="http://cvs.nongnu.org/"
depends=('heimdal' 'zlib' 'libcrypt' 'libopenssl')
makedepends=('heimdal-devel' 'zlib-devel' 'gcc' 'libcrypt-devel' 'openssl-devel')
options=('staticlibs')
install=cvs.install
source=(ftp://ftp.gnu.org/non-gnu/cvs/source/stable/${pkgver}/${pkgname}-${pkgver}.tar.bz2
cvs-1.11.1p1-bs.patch
cvs-1.11.19-abortabort.patch
cvs-1.11.19-comp.patch
cvs-1.11.19-extzlib.patch
cvs-1.11.19-logmsg.patch
cvs-1.11.19-netbsd-tag.patch
cvs-1.11.19-tagname.patch
cvs-1.11.19-tmp.patch
cvs-1.11.21-diff-kk.patch
cvs-1.11.21-diff.patch
cvs-1.11.21-proxy.patch
cvs-1.11.21-sort.patch
cvs-1.11.22-cvspass.patch
cvs-1.11.22-ipv6-proxy.patch
cvs-1.11.22-stdinargs.patch
cvs-1.11.23-Back-port-KeywordExpand-configuration-keyword.patch
cvs-1.11.23-cve-2010-3846.patch
cvs-1.11.23-Fix-proxy-response-parser.patch
cvs-1.11.23-getline64.patch
cvs-1.11.23-make_make_check_sanity_testing_verbose.patch
cvs-1.11.23-Pass-server-IP-address-instead-of-hostname-to-GSSAPI.patch
cvs-1.11.23-remove_undefined_date_from_cvs_1_header.patch
cvs-1.11.23-sanity.patch
cvs-1.11.23-doc-Add-mandatory-argument-to-sp.patch
)
md5sums=('0213ea514e231559d6ff8f80a34117f0'
'e447b7d85674ae63bef7036fc7b2b669'
'41edb97470e684fc6a7d1d17f5d340be'
'f882e8c94cb052c3082cb6ea71cf0593'
'67979fb76f77171e7ce0ea309a312695'
'd55561000f4b68f3a8839dbdd2b4d85c'
'13b94678d134fa3c09f57f4d3a901e07'
'121eb89cb71b72171b6e4db2fc5cec09'
'2c4f19a8065c87ed294ec28e061c3df5'
'018571dc8cbbfd84305ee6b4aa070464'
'1220bc57bf535ce30f800c05b6f8cc4a'
'6a4d53e35c0e676ec3319e63b124f093'
'1dda83b84e55bd68bc038f78eea315d1'
'444ff8ee039c7d3acd12803054166034'
'510061aeccfa11206ac2ba007c07a04c'
'b8ceb38f9f7447aa664f43f2cd113f83'
'fd9d97f8ca16f4fe484afa910d657b26'
'b089d3792c225857f00c3eee33809a16'
'af3ba42367213cc51c9401516ce363a7'
'943f10d93fbadaea0ac54553dd85c03f'
'cf798718d3c7d4bc5ba510df38b5bd34'
'1487644a1062f58a6eedb54eaea7e012'
'adc404214d4061a8cb48c801b718a0ad'
'8432bdb38ceb9d8375c51846772a4366'
'cbeb735e8218837429ae98794ec6ff54')
prepare() {
cd ${srcdir}/${pkgname}-${pkgver}
patch -p1 -i ${srcdir}/cvs-1.11.22-cvspass.patch
patch -p1 -i ${srcdir}/cvs-1.11.19-extzlib.patch
patch -p1 -i ${srcdir}/cvs-1.11.19-netbsd-tag.patch
patch -p1 -i ${srcdir}/cvs-1.11.19-abortabort.patch
patch -p1 -i ${srcdir}/cvs-1.11.1p1-bs.patch
patch -p1 -i ${srcdir}/cvs-1.11.21-proxy.patch
patch -p1 -i ${srcdir}/cvs-1.11.19-logmsg.patch
patch -p1 -i ${srcdir}/cvs-1.11.19-tagname.patch
patch -p1 -i ${srcdir}/cvs-1.11.19-comp.patch
patch -p1 -i ${srcdir}/cvs-1.11.19-tmp.patch
patch -p1 -i ${srcdir}/cvs-1.11.21-diff.patch
patch -p1 -i ${srcdir}/cvs-1.11.21-diff-kk.patch
patch -p1 -i ${srcdir}/cvs-1.11.21-sort.patch
patch -p1 -i ${srcdir}/cvs-1.11.22-ipv6-proxy.patch
patch -p1 -i ${srcdir}/cvs-1.11.23-getline64.patch
patch -p1 -i ${srcdir}/cvs-1.11.22-stdinargs.patch
patch -p1 -i ${srcdir}/cvs-1.11.23-cve-2010-3846.patch
patch -p1 -i ${srcdir}/cvs-1.11.23-remove_undefined_date_from_cvs_1_header.patch
patch -p1 -i ${srcdir}/cvs-1.11.23-sanity.patch
patch -p1 -i ${srcdir}/cvs-1.11.23-make_make_check_sanity_testing_verbose.patch
patch -p1 -i ${srcdir}/cvs-1.11.23-Back-port-KeywordExpand-configuration-keyword.patch
patch -p1 -i ${srcdir}/cvs-1.11.23-Pass-server-IP-address-instead-of-hostname-to-GSSAPI.patch
patch -p1 -i ${srcdir}/cvs-1.11.23-Fix-proxy-response-parser.patch
patch -p1 -i ${srcdir}/cvs-1.11.23-doc-Add-mandatory-argument-to-sp.patch
autoreconf -vfi
#patch -Np1 < ../cvs-1.11.19-extzlib.patch
#patch -Np1 < ../cvs-1.11.23-getline64.patch
# CVE-2010-3864, https://www.redhat.com/security/data/cve/CVE-2010-3846.html
#patch -Np1 < ../cvs-1.11.23-cve-2010-3846.patch
sed -i -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' configure.in
find . -name Makefile.am | xargs sed -i -e 's/^INCLUDES/AM_CPPFLAGS/'
AUTOMAKE='automake --add-missing' autoreconf
}
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
unset EDITOR VISUAL
./configure --prefix=/usr
make
}
package() {
cd ${srcdir}/${pkgname}-${pkgver}
make DESTDIR=${pkgdir} install
rm "${pkgdir}"/usr/share/info/dir
}

View File

@ -0,0 +1,70 @@
--- cvs-1.11.19/src/server.c.old3 2004-09-24 21:59:08.000000000 +0200
+++ cvs-1.11.19/src/server.c 2005-02-28 13:09:22.000000000 +0100
@@ -4900,6 +4900,15 @@
int status;
int save_noexec;
+#ifndef DONT_USE_SIGNALS
+#ifdef SIGABRT
+ /* Need to deregister the SIGABRT handler so that if an assertion
+ fails and calls abort while we're cleaning up, we won't
+ infinitely recurse in the cleanup function. */
+ SIG_deregister(SIGABRT, server_cleanup);
+#endif
+#endif /* !DONT_USE_SIGNALS */
+
if (buf_to_net != NULL)
{
/* Since we're done, go ahead and put BUF_TO_NET back into blocking
--- cvs-1.11.19/src/main.c.old3 2005-02-03 15:50:51.000000000 +0100
+++ cvs-1.11.19/src/main.c 2005-02-28 13:02:52.000000000 +0100
@@ -341,6 +341,13 @@
const char *name;
char temp[10];
+#ifdef SIGABRT
+ /* Need to deregister the SIGABRT handler so that if an assertion
+ fails and calls abort while we're cleaning up, we won't
+ infinitely recurse in the cleanup function. */
+ SIG_deregister(SIGABRT, main_cleanup);
+#endif
+
switch (sig)
{
#ifdef SIGABRT
--- cvs-1.11.19/src/rcs.c.old3 2005-01-31 23:15:08.000000000 +0100
+++ cvs-1.11.19/src/rcs.c 2005-02-28 13:06:06.000000000 +0100
@@ -8314,6 +8314,15 @@
called from a signal handler, so we don't know whether the
files got created. */
+#ifndef DONT_USE_SIGNALS
+#ifdef SIGABRT
+ /* Need to deregister the SIGABRT handler so that if an assertion
+ fails and calls abort while we're cleaning up, we won't
+ infinitely recurse in the cleanup function. */
+ SIG_deregister(SIGABRT, rcs_cleanup);
+#endif
+#endif /* !DONT_USE_SIGNALS */
+
/* FIXME: Do not perform buffered I/O from an interrupt handler like
this (via error). However, I'm leaving the error-calling code there
in the hope that on the rare occasion the error call is actually made
--- cvs-1.11.19/src/patch.c.old3 2005-01-31 23:15:02.000000000 +0100
+++ cvs-1.11.19/src/patch.c 2005-02-28 13:04:16.000000000 +0100
@@ -796,6 +796,15 @@
called from a signal handler, without SIG_begincrsect, so
we don't know whether the files got created. */
+#ifndef DONT_USE_SIGNALS
+#ifdef SIGABRT
+ /* Need to deregister the SIGABRT handler so that if an assertion
+ fails and calls abort while we're cleaning up, we won't
+ infinitely recurse in the cleanup function. */
+ SIG_deregister(SIGABRT, patch_cleanup);
+#endif
+#endif /* !DONT_USE_SIGNALS */
+
if (tmpfile1 != NULL)
{
if (unlink_file (tmpfile1) < 0

View File

@ -0,0 +1,11 @@
--- cvs-1.11.19/src/rcs.c.old 2005-03-17 11:21:18.000000000 +0100
+++ cvs-1.11.19/src/rcs.c 2005-03-17 11:21:56.000000000 +0100
@@ -138,7 +138,7 @@
string comparisons. This macro speeds things up a bit by skipping
the function call when the first characters are different. It
evaluates its arguments multiple times. */
-#define STREQ(a, b) (*(char *)(a) == *(char *)(b) && strcmp ((a), (b)) == 0)
+#define STREQ(a, b) ((a) != NULL && (b) != NULL && *(char *)(a) == *(char *)(b) && strcmp ((a), (b)) == 0)
/*
* We don't want to use isspace() from the C library because:

View File

@ -0,0 +1,44 @@
--- cvs-1.11.19/configure.in.old.old4 2005-02-01 00:10:49.000000000 +0100
+++ cvs-1.11.19/configure.in 2005-02-28 13:27:10.000000000 +0100
@@ -1040,8 +1040,8 @@
tools/Makefile \
vms/Makefile \
windows-NT/Makefile \
- windows-NT/SCC/Makefile \
- zlib/Makefile])
+ windows-NT/SCC/Makefile
+ ])
dnl and we're done
AC_OUTPUT
--- cvs-1.11.19/Makefile.am.old.old4 2004-11-11 23:30:36.000000000 +0100
+++ cvs-1.11.19/Makefile.am 2005-02-28 13:25:32.000000000 +0100
@@ -17,7 +17,7 @@
## Subdirectories to run make in for the primary targets.
# Unix source subdirs, where we'll want to run lint and etags:
# This is a legacy variable from b4 Automake
-USOURCE_SUBDIRS = lib zlib diff src
+USOURCE_SUBDIRS = lib diff src
# All other subdirs:
SUBDIRS = $(USOURCE_SUBDIRS) man doc contrib tools \
windows-NT os2 emx vms
--- cvs-1.11.19/src/Makefile.am.old.old4 2005-01-31 23:07:35.000000000 +0100
+++ cvs-1.11.19/src/Makefile.am 2005-02-28 13:24:26.000000000 +0100
@@ -24,7 +24,7 @@
# 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. -I.. -I$(srcdir) -I$(top_srcdir)/lib
-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
@@ -105,7 +105,7 @@
cvs_LDADD = \
../diff/libdiff.a \
../lib/libcvs.a \
- ../zlib/libz.a
+ -lz
# extra clean targets
# wish this could be distclean-hdr-local but it's not part of automake

View File

@ -0,0 +1,20 @@
--- cvs-1.11.19/src/logmsg.c.old 2005-03-09 10:45:50.000000000 +0100
+++ cvs-1.11.19/src/logmsg.c 2005-03-09 10:46:36.000000000 +0100
@@ -230,6 +230,8 @@
if ((*messagep)[0] == '\0' ||
(*messagep)[strlen (*messagep) - 1] != '\n')
(void) fprintf (fp, "\n");
+ } else {
+ (void) fprintf (fp, "\n");
}
if (repository != NULL)
@@ -271,7 +273,7 @@
}
(void) fprintf (fp,
- "\n%s----------------------------------------------------------------------\n",
+ "%s----------------------------------------------------------------------\n",
CVSEDITPREFIX);
(void) fprintf (fp,
"%sEnter Log. Lines beginning with `%.*s' are removed automatically\n%s\n",

View File

@ -0,0 +1,28 @@
--- cvs-1.11.19/src/logmsg.c.old2 2005-02-28 11:49:35.000000000 +0100
+++ cvs-1.11.19/src/logmsg.c 2005-02-28 12:58:16.000000000 +0100
@@ -690,6 +690,15 @@
strlen (str_list) + strlen (p->key) + 5);
(void) strcat (str_list, p->key);
break;
+ case 't':
+ str_list =
+ xrealloc (str_list,
+ (strlen (str_list)
+ + (li->tag ? strlen (li->tag) : 0)
+ + 10)
+ );
+ (void) strcat (str_list, (li->tag ? li->tag : ""));
+ break;
case 'V':
str_list =
xrealloc (str_list,
--- cvs-1.11.19/src/mkmodules.c.old2 2005-01-31 23:14:17.000000000 +0100
+++ cvs-1.11.19/src/mkmodules.c 2005-02-28 12:59:03.000000000 +0100
@@ -74,6 +74,7 @@
"# s = file name\n",
"# V = old version number (pre-checkin)\n",
"# v = new version number (post-checkin)\n",
+ "# t = tag or branch name\n",
"#\n",
"# For example:\n",
"#DEFAULT (echo \"\"; id; echo %s; date; cat) >> $CVSROOT/CVSROOT/commitlog\n",

View File

@ -0,0 +1,11 @@
--- cvs-1.11.19/src/rcs.c.old 2005-03-14 13:09:39.000000000 +0100
+++ cvs-1.11.19/src/rcs.c 2005-03-14 13:08:24.000000000 +0100
@@ -3382,7 +3382,7 @@
RCS_check_tag (tag)
const char *tag;
{
- char *invalid = "$,.:;@"; /* invalid RCS tag characters */
+ char *invalid = "$,.:;@/"; /* invalid RCS tag characters */
const char *cp;
/*

19
cvs/cvs-1.11.19-tmp.patch Normal file
View File

@ -0,0 +1,19 @@
--- cvs-1.11.19/src/cvsbug.in.old 2004-02-03 15:37:52.000000000 +0100
+++ cvs-1.11.19/src/cvsbug.in 2005-08-22 16:35:06.000000000 +0200
@@ -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

12
cvs/cvs-1.11.1p1-bs.patch Normal file
View File

@ -0,0 +1,12 @@
diff -up cvs-1.11.23/src/sanity.sh.bs cvs-1.11.23/src/sanity.sh
--- cvs-1.11.23/src/sanity.sh.bs 2008-07-15 15:38:59.000000000 -0400
+++ cvs-1.11.23/src/sanity.sh 2008-07-15 15:40:29.000000000 -0400
@@ -18,6 +18,8 @@
#
# Original Author: K. Richard Pixley
+exit 0
+
# usage:
usage ()
{

View File

@ -0,0 +1,11 @@
--- cvs-1.11.21/src/diff.c.old 2005-12-19 11:01:59.000000000 +0100
+++ cvs-1.11.21/src/diff.c 2005-12-21 15:45:40.000000000 +0100
@@ -438,7 +438,7 @@
/* Send the current files unless diffing two revs from the archive */
if (diff_rev2 == NULL && diff_date2 == NULL)
- send_files (argc, argv, local, 0, 0);
+ send_files (argc, argv, local, 0, options[0] == '\0' ? 0 : SEND_FORCE);
else
send_files (argc, argv, local, 0, SEND_NO_CONTENTS);

View File

@ -0,0 +1,21 @@
--- cvs-1.11.21/src/diff.c.old 2005-05-27 19:17:03.000000000 +0200
+++ cvs-1.11.21/src/diff.c 2005-12-15 15:22:05.000000000 +0100
@@ -955,14 +955,16 @@
/* The first revision does not exist. If EMPTY_FILES is
true, treat this as an added file. Otherwise, warn
about the missing tag. */
- if( use_rev2 == NULL || RCS_isdead( vers->srcfile, use_rev2 ) )
+ if( use_rev2 == NULL || RCS_isdead( vers->srcfile, use_rev2 ) ) {
/* At least in the case where DIFF_REV1 and DIFF_REV2
* are both numeric (and non-existant (NULL), as opposed to
* dead?), we should be returning some kind of error (see
* basicb-8a0 in testsuite). The symbolic case may be more
* complicated.
*/
- return DIFF_SAME;
+ error (0, 0, "no revision in file %s or missing file %s", finfo->fullname, finfo->fullname);
+ return DIFF_ERROR;
+ }
if( empty_files )
return DIFF_ADDED;
if( use_rev1 != NULL )

211
cvs/cvs-1.11.21-proxy.patch Normal file
View File

@ -0,0 +1,211 @@
--- cvs-1.11.21/src/client.h.proxy 2005-08-02 22:46:57.000000000 +0200
+++ cvs-1.11.21/src/client.h 2005-11-10 10:26:24.000000000 +0100
@@ -83,6 +83,9 @@
# ifndef CVS_AUTH_PORT
# define CVS_AUTH_PORT 2401
# endif /* CVS_AUTH_PORT */
+# ifndef CVS_PROXY_PORT
+# define CVS_PROXY_PORT 80
+# endif /* CVS_PROXY_PORT */
# endif /* (AUTH_CLIENT_SUPPORT) || defined (HAVE_GSSAPI) */
# if HAVE_KERBEROS
--- cvs-1.11.21/src/client.c.proxy 2005-09-22 17:58:46.000000000 +0200
+++ cvs-1.11.21/src/client.c 2005-11-10 10:26:24.000000000 +0100
@@ -144,6 +144,7 @@
static size_t try_read_from_server PROTO ((char *, size_t));
+static void proxy_connect PROTO ((cvsroot_t *, int));
static void auth_server PROTO ((cvsroot_t *, struct buffer *, struct buffer *,
int, int, struct hostent *));
@@ -3802,7 +3803,7 @@
int port_number;
struct sockaddr_in client_sai;
struct hostent *hostinfo;
- struct buffer *to_server, *from_server;
+ struct buffer *local_to_server, *local_from_server;
sock = socket (AF_INET, SOCK_STREAM, 0);
if (sock == -1)
@@ -3810,7 +3811,17 @@
error (1, 0, "cannot create socket: %s", SOCK_STRERROR (SOCK_ERRNO));
}
port_number = get_cvs_port_number (root);
- hostinfo = init_sockaddr (&client_sai, root->hostname, port_number);
+
+ /* if we have a proxy connect to that instead */
+ if (root->proxy_hostname)
+ {
+ hostinfo = init_sockaddr (&client_sai, root->proxy_hostname, root->proxy_port);
+ }
+ else
+ {
+ hostinfo = init_sockaddr (&client_sai, root->hostname, port_number);
+ }
+
if (trace)
{
fprintf (stderr, " -> Connecting to %s(%s):%d\n",
@@ -3820,29 +3831,41 @@
if (connect (sock, (struct sockaddr *) &client_sai, sizeof (client_sai))
< 0)
error (1, 0, "connect to %s(%s):%d failed: %s",
- root->hostname,
+ root->proxy_hostname ? root->proxy_hostname : root->hostname,
inet_ntoa (client_sai.sin_addr),
- port_number, SOCK_STRERROR (SOCK_ERRNO));
+ root->proxy_hostname ? root->proxy_port : port_number,
+ SOCK_STRERROR (SOCK_ERRNO));
- make_bufs_from_fds (sock, sock, 0, &to_server, &from_server, 1);
+ make_bufs_from_fds (sock, sock, 0, &local_to_server, &local_from_server, 1);
- auth_server (root, to_server, from_server, verify_only, do_gssapi, hostinfo);
+ if (root->proxy_hostname)
+ {
+ // REALLY ugly hack to allow proxy_connect() to use send_to_server().
+ // The proper fix would be to remove the global to_server & from_server
+ // variables, and instead let send_to_server() etc. take the target
+ // server struct as a paramter.
+ to_server = local_to_server;
+ from_server = local_from_server;
+ proxy_connect (root, port_number);
+ }
+
+ auth_server (root, local_to_server, local_from_server, verify_only, do_gssapi, hostinfo);
if (verify_only)
{
int status;
- status = buf_shutdown (to_server);
+ status = buf_shutdown (local_to_server);
if (status != 0)
error (0, status, "shutting down buffer to server");
- buf_free (to_server);
- to_server = NULL;
+ buf_free (local_to_server);
+ local_to_server = NULL;
- status = buf_shutdown (from_server);
+ status = buf_shutdown (local_from_server);
if (status != 0)
error (0, status, "shutting down buffer from server");
- buf_free (from_server);
- from_server = NULL;
+ buf_free (local_from_server);
+ local_from_server = NULL;
/* Don't need to set server_started = 0 since we don't set it to 1
* until returning from this call.
@@ -3850,8 +3873,8 @@
}
else
{
- *to_server_p = to_server;
- *from_server_p = from_server;
+ *to_server_p = local_to_server;
+ *from_server_p = local_from_server;
}
return;
@@ -3860,6 +3883,46 @@
static void
+proxy_connect (root, port_number)
+ cvsroot_t *root;
+ int port_number;
+{
+#define CONNECT_STRING "CONNECT %s:%d HTTP/1.0\r\n\r\n"
+ /* Send a "CONNECT" command to proxy: */
+ char* read_buf;
+ int codenum, count;
+
+ /* 4 characters for port covered by the length of %s & %d */
+ char* write_buf = xmalloc (strlen (CONNECT_STRING) + strlen (root->hostname) + 20 + 1);
+ int len = sprintf (write_buf, CONNECT_STRING, root->hostname, port_number);
+ send_to_server (write_buf, len);
+
+ /* Wait for HTTP status code, bail out if you don't get back a 2xx code.*/
+ count = read_line (&read_buf);
+ sscanf (read_buf, "%s %d", write_buf, &codenum);
+
+ if ((codenum / 100) != 2)
+ error (1, 0, "proxy server %s:%d does not support http tunnelling",
+ root->proxy_hostname, root->proxy_port);
+ free (read_buf);
+ free (write_buf);
+
+ /* Skip through remaining part of MIME header, recv_line
+ consumes the trailing \n */
+ while(read_line (&read_buf) > 0)
+ {
+ if (read_buf[0] == '\r' || read_buf[0] == 0)
+ {
+ free (read_buf);
+ break;
+ }
+ free (read_buf);
+ }
+}
+
+
+
+static void
auth_server (root, lto_server, lfrom_server, verify_only, do_gssapi, hostinfo)
cvsroot_t *root;
struct buffer *lto_server;
--- cvs-1.11.21/src/root.c.proxy 2005-09-04 02:26:43.000000000 +0200
+++ cvs-1.11.21/src/root.c 2005-11-10 10:26:24.000000000 +0100
@@ -298,7 +298,7 @@
newroot->port = 0;
newroot->directory = NULL;
newroot->proxy_hostname = NULL;
- newroot->proxy_port = 0;
+ newroot->proxy_port = CVS_PROXY_PORT;
#endif /* CLIENT_SUPPORT */
return newroot;
@@ -371,6 +371,7 @@
char *cvsroot_copy, *p, *q; /* temporary pointers for parsing */
#ifdef CLIENT_SUPPORT
int check_hostname, no_port, no_password;
+ const char *env_var;
#endif /* CLIENT_SUPPORT */
assert (root_in);
@@ -406,6 +407,31 @@
cvsroot_copy = ++p;
#ifdef CLIENT_SUPPORT
+ /* Determine proxy */
+ env_var = getenv("CVS_PROXY");
+/*
+ if (!env_var)
+ env_var = getenv("HTTP_PROXY");
+ if (!env_var)
+ env_var = getenv("http_proxy");
+*/
+ /* Check if a proxy was specified, and if it is a HTTP proxy */
+ if (env_var && !memcmp(env_var, "http://", 7))
+ {
+ char *port_str;
+
+ /* Try to parse the proxy data */
+ env_var += 7;
+ /* TODO - parse username/password data, too */
+ port_str = strchr(env_var, ':');
+ if (port_str)
+ {
+ *port_str++ = 0;
+ newroot->proxy_port = atoi(port_str);
+ newroot->proxy_hostname = xstrdup(env_var);
+ }
+ }
+
/* Look for method options, for instance, proxy, proxyport.
* We don't handle these, but we like to try and warn the user that
* they are being ignored.

View File

@ -0,0 +1,12 @@
--- cvs-1.11.21/contrib/rcs2log.sh.old 2005-08-02 22:46:43.000000000 +0200
+++ cvs-1.11.21/contrib/rcs2log.sh 2006-05-09 11:49:10.000000000 +0200
@@ -68,6 +68,9 @@
For more information about these matters, see the files named COPYING.
Author: Paul Eggert <eggert@twinsun.com>'
+# set old environment for sort (bug #190009)
+export _POSIX2_VERSION=199209
+
# functions
@MKTEMP_SH_FUNCTION@

View File

@ -0,0 +1,66 @@
diff -up cvs-1.11.23/src/login.c.cvspass cvs-1.11.23/src/login.c
--- cvs-1.11.23/src/login.c.cvspass 2008-05-07 11:57:34.000000000 -0400
+++ cvs-1.11.23/src/login.c 2008-07-15 15:34:34.000000000 -0400
@@ -315,6 +315,15 @@ internal error: can only call password_e
fp = CVS_FOPEN (passfile, "r");
if (fp == NULL)
{
+ fp = CVS_FOPEN (passfile, "w");
+ if (fp != NULL)
+ {
+ fclose (fp);
+ fp = CVS_FOPEN (passfile, "r");
+ }
+ }
+ if (fp == NULL)
+ {
error (0, errno, "warning: failed to open %s for reading", passfile);
goto process;
}
diff -up cvs-1.11.23/src/logmsg.c.cvspass cvs-1.11.23/src/logmsg.c
--- cvs-1.11.23/src/logmsg.c.cvspass 2008-05-07 11:57:34.000000000 -0400
+++ cvs-1.11.23/src/logmsg.c 2008-07-15 15:34:34.000000000 -0400
@@ -269,7 +269,7 @@ do_editor (dir, messagep, repository, ch
}
(void) fprintf (fp,
- "%s----------------------------------------------------------------------\n",
+ "\n%s----------------------------------------------------------------------\n",
CVSEDITPREFIX);
(void) fprintf (fp,
"%sEnter Log. Lines beginning with `%.*s' are removed automatically\n%s\n",
diff -up cvs-1.11.23/src/sanity.sh.cvspass cvs-1.11.23/src/sanity.sh
--- cvs-1.11.23/src/sanity.sh.cvspass 2008-05-06 21:16:00.000000000 -0400
+++ cvs-1.11.23/src/sanity.sh 2008-07-15 15:37:43.000000000 -0400
@@ -15590,6 +15590,7 @@ description:
revision 1\.1
date: [0-9/]* [0-9:]*; author: ${username}; state: Exp;
branches: 1\.1\.2;
+x
xCVS: ----------------------------------------------------------------------
xCVS: Enter Log. Lines beginning with .CVS:. are removed automatically
xCVS:
@@ -15601,6 +15602,7 @@ xCVS: ----------------------------------
----------------------------
revision 1\.1\.2\.1
date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0
+x
xCVS: ----------------------------------------------------------------------
xCVS: Enter Log. Lines beginning with .CVS:. are removed automatically
xCVS:
@@ -15622,6 +15624,7 @@ description:
revision 1\.1
date: [0-9/]* [0-9:]*; author: ${username}; state: Exp;
branches: 1\.1\.2;
+x
xCVS: ----------------------------------------------------------------------
xCVS: Enter Log. Lines beginning with .CVS:. are removed automatically
xCVS:
@@ -15633,6 +15636,7 @@ xCVS: ----------------------------------
----------------------------
revision 1\.1\.2\.1
date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0
+x
xCVS: ----------------------------------------------------------------------
xCVS: Enter Log. Lines beginning with .CVS:. are removed automatically
xCVS:

View File

@ -0,0 +1,439 @@
diff -up cvs-1.11.23/src/client.c.ipv6 cvs-1.11.23/src/client.c
--- cvs-1.11.23/src/client.c.ipv6 2008-07-15 15:42:29.000000000 -0400
+++ cvs-1.11.23/src/client.c 2008-07-15 15:43:46.000000000 -0400
@@ -81,7 +81,7 @@ static Key_schedule sched;
/* This is needed for GSSAPI encryption. */
static gss_ctx_id_t gcontext;
-static int connect_to_gserver PROTO((cvsroot_t *, int, struct hostent *));
+static int connect_to_gserver PROTO((cvsroot_t *, int, char *));
# endif /* HAVE_GSSAPI */
@@ -146,7 +146,7 @@ static size_t try_read_from_server PROTO
static void proxy_connect PROTO ((cvsroot_t *, int));
static void auth_server PROTO ((cvsroot_t *, struct buffer *, struct buffer *,
- int, int, struct hostent *));
+ int, int, char *));
/* We need to keep track of the list of directories we've sent to the
server. This list, along with the current CVSROOT, will help us
@@ -3583,30 +3583,6 @@ supported_request (name)
#if defined (AUTH_CLIENT_SUPPORT) || defined (HAVE_KERBEROS) || defined (HAVE_GSSAPI)
-static struct hostent *init_sockaddr PROTO ((struct sockaddr_in *, char *,
- unsigned int));
-
-static struct hostent *
-init_sockaddr (name, hostname, port)
- struct sockaddr_in *name;
- char *hostname;
- unsigned int port;
-{
- struct hostent *hostinfo;
- unsigned short shortport = port;
-
- memset (name, 0, sizeof (*name));
- name->sin_family = AF_INET;
- name->sin_port = htons (shortport);
- hostinfo = gethostbyname (hostname);
- if (hostinfo == NULL)
- {
- fprintf (stderr, "Unknown host %s.\n", hostname);
- error_exit ();
- }
- name->sin_addr = *(struct in_addr *) hostinfo->h_addr;
- return hostinfo;
-}
@@ -3782,41 +3758,63 @@ connect_to_pserver (root, to_server_p, f
{
int sock;
int port_number;
- struct sockaddr_in client_sai;
- struct hostent *hostinfo;
+ int gerr;
+ struct addrinfo hints, *res, *res0;
+ char pbuf[32];
struct buffer *local_to_server, *local_from_server;
+ char *p_hostname;
- sock = socket (AF_INET, SOCK_STREAM, 0);
- if (sock == -1)
- {
- error (1, 0, "cannot create socket: %s", SOCK_STRERROR (SOCK_ERRNO));
- }
port_number = get_cvs_port_number (root);
- /* if we have a proxy connect to that instead */
- if (root->proxy_hostname)
- {
- hostinfo = init_sockaddr (&client_sai, root->proxy_hostname, root->proxy_port);
- }
- else
- {
- hostinfo = init_sockaddr (&client_sai, root->hostname, port_number);
+ sprintf (pbuf, "%u", (root->proxy_hostname) ? root->proxy_port : port_number);
+ pbuf[sizeof(pbuf)-1] = '\0';
+ memset (&hints, 0, sizeof (hints));
+ hints.ai_family = af;
+ hints.ai_socktype = SOCK_STREAM;
+
+ /* do we have a proxy? */
+ p_hostname = (root->proxy_hostname) ? root->proxy_hostname : root->hostname;
+
+ gerr = getaddrinfo (p_hostname, pbuf, &hints, &res0);
+ if (gerr)
+ {
+ fprintf (stderr, "Unknown host %s.\n", p_hostname);
+ error_exit ();
+ }
+
+ /* Try connect to p_hostname using all available families */
+ for (res = res0; res != NULL; res = res->ai_next)
+ {
+ sock = socket (res->ai_family, res->ai_socktype, 0);
+ if (sock == -1) {
+ if (res->ai_next)
+ continue;
+ else {
+ char *sock_error = SOCK_STRERROR (SOCK_ERRNO);
+ freeaddrinfo(res0);
+ error (1, 0, "cannot create socket: %s", sock_error);
+ }
+ }
+
+ if (connect (sock, res->ai_addr, res->ai_addrlen) < 0)
+ {
+ if (res->ai_next)
+ {
+ close(sock);
+ continue;
+ }
+ else
+ {
+ char *sock_error = SOCK_STRERROR (SOCK_ERRNO);
+ freeaddrinfo(res0);
+ error (1, 0, "connect to [%s]:%s failed: %s", p_hostname,
+ pbuf, sock_error);
+ }
+ }
+ /* success */
+ break;
}
- if (trace)
- {
- fprintf (stderr, " -> Connecting to %s(%s):%d\n",
- root->hostname,
- inet_ntoa (client_sai.sin_addr), port_number);
- }
- if (connect (sock, (struct sockaddr *) &client_sai, sizeof (client_sai))
- < 0)
- error (1, 0, "connect to %s(%s):%d failed: %s",
- root->proxy_hostname ? root->proxy_hostname : root->hostname,
- inet_ntoa (client_sai.sin_addr),
- root->proxy_hostname ? root->proxy_port : port_number,
- SOCK_STRERROR (SOCK_ERRNO));
-
make_bufs_from_fds (sock, sock, 0, &local_to_server, &local_from_server, 1);
if (root->proxy_hostname)
@@ -3830,7 +3828,7 @@ connect_to_pserver (root, to_server_p, f
proxy_connect (root, port_number);
}
- auth_server (root, local_to_server, local_from_server, verify_only, do_gssapi, hostinfo);
+ auth_server (root, local_to_server, local_from_server, verify_only, do_gssapi, p_hostname);
if (verify_only)
{
@@ -3904,13 +3902,13 @@ proxy_connect (root, port_number)
static void
-auth_server (root, lto_server, lfrom_server, verify_only, do_gssapi, hostinfo)
+auth_server (root, lto_server, lfrom_server, verify_only, do_gssapi, hostname)
cvsroot_t *root;
struct buffer *lto_server;
struct buffer *lfrom_server;
int verify_only;
int do_gssapi;
- struct hostent *hostinfo;
+ char *hostname;
{
char *username = ""; /* the username we use to connect */
char no_passwd = 0; /* gets set if no password found */
@@ -3940,7 +3938,7 @@ auth_server (root, lto_server, lfrom_ser
error (1, 0, "gserver currently only enabled for socket connections");
}
- if (! connect_to_gserver (root, fd, hostinfo))
+ if (! connect_to_gserver (root, fd, hostname))
{
error (1, 0,
"authorization failed: server %s rejected access to %s",
@@ -3956,7 +3954,7 @@ auth_server (root, lto_server, lfrom_ser
char *begin = NULL;
char *password = NULL;
char *end = NULL;
-
+
if (verify_only)
{
begin = "BEGIN VERIFICATION REQUEST";
@@ -4137,36 +4135,74 @@ start_tcp_server (root, to_server, from_
int s;
const char *portenv;
int port;
- struct hostent *hp;
- struct sockaddr_in sin;
+ int gerr;
+ struct addrinfo hints, *res, *res0;
char *hname;
-
- s = socket (AF_INET, SOCK_STREAM, 0);
- if (s < 0)
- error (1, 0, "cannot create socket: %s", SOCK_STRERROR (SOCK_ERRNO));
+ char pbuf[32], hbuf[1025];
port = get_cvs_port_number (root);
- hp = init_sockaddr (&sin, root->hostname, port);
+ sprintf (pbuf, "%u", port);
+ pbuf[sizeof(pbuf)-1] = '\0';
+ memset (&hints, 0, sizeof(hints));
+ hints.ai_family = af;
+ hints.ai_socktype = SOCK_STREAM;
+ gerr = getaddrinfo (root->hostname, pbuf, &hints, &res0);
+ if (gerr) {
+ fprintf (stderr, "Unknown host %s.\n", root->hostname);
+ error_exit ();
+ }
- hname = xstrdup (hp->h_name);
-
- if (trace)
+ /* Try connect to current_parsed_root->hostname using all available families */
+ gerr = -1;
+ for (res = res0; res != NULL; res = res->ai_next)
{
- fprintf (stderr, " -> Connecting to %s(%s):%d\n",
- root->hostname,
- inet_ntoa (sin.sin_addr), port);
+ s = socket (res->ai_family, res->ai_socktype, 0);
+ if (s < 0)
+ {
+ if (res->ai_next)
+ continue;
+ else
+ {
+ char *sock_error = SOCK_STRERROR (SOCK_ERRNO);
+ freeaddrinfo(res0);
+ error (1, 0, "cannot create socket: %s", sock_error);
+ }
+ }
+ if (trace)
+ {
+ char hbuf[1025];
+ getnameinfo(res->ai_addr, res->ai_addrlen, hbuf, sizeof(hbuf),
+ NULL, 0, NI_NUMERICHOST);
+ fprintf (stderr, " -> Connecting to %s(%s):%d\n",
+ root->hostname, hbuf, port);
+ }
+
+ if (connect (s, res->ai_addr, res->ai_addrlen) < 0)
+ {
+ if (res->ai_next)
+ {
+ close(s);
+ continue;
+ }
+ else
+ {
+ char *sock_error = SOCK_STRERROR (SOCK_ERRNO);
+ freeaddrinfo(res0);
+ error (1, 0, "connect to [%s]:%s failed: %s",
+ root->hostname, pbuf, sock_error);
+ }
+ }
+ getnameinfo(res->ai_addr, res->ai_addrlen, hbuf, sizeof(hbuf), NULL, 0, 0);
+ hname = xmalloc (strlen (hbuf) + 1);
+ strcpy (hname, hbuf);
+ /* success */
+ break;
}
- if (connect (s, (struct sockaddr *) &sin, sizeof sin) < 0)
- error (1, 0, "connect to %s(%s):%d failed: %s",
- root->hostname,
- inet_ntoa (sin.sin_addr),
- port, SOCK_STRERROR (SOCK_ERRNO));
-
{
const char *realm;
- struct sockaddr_in laddr;
+ struct sockaddr_storage laddr;
int laddrlen;
KTEXT_ST ticket;
MSG_DAT msg_data;
@@ -4182,13 +4218,15 @@ start_tcp_server (root, to_server, from_
/* We don't care about the checksum, and pass it as zero. */
status = krb_sendauth (KOPT_DO_MUTUAL, s, &ticket, "rcmd",
hname, realm, (unsigned long) 0, &msg_data,
- &cred, sched, &laddr, &sin, "KCVSV1.0");
+ &cred, sched, &laddr, res->ai_addr, "KCVSV1.0");
if (status != KSUCCESS)
error (1, 0, "kerberos authentication failed: %s",
krb_get_err_text (status));
memcpy (kblock, cred.session, sizeof (C_Block));
}
+ freeaddrinfo(res0);
+
close_on_exec (s);
free (hname);
@@ -4241,10 +4279,10 @@ recv_bytes (sock, buf, need)
*/
#define BUFSIZE 1024
static int
-connect_to_gserver (root, sock, hostinfo)
+connect_to_gserver (root, sock, hostname)
cvsroot_t *root;
int sock;
- struct hostent *hostinfo;
+ char *hostname;
{
char *str;
char buf[BUFSIZE];
@@ -4257,9 +4295,9 @@ connect_to_gserver (root, sock, hostinfo
if (send (sock, str, strlen (str), 0) < 0)
error (1, 0, "cannot send: %s", SOCK_STRERROR (SOCK_ERRNO));
- if (strlen (hostinfo->h_name) > BUFSIZE - 5)
+ if (strlen (hostname) > BUFSIZE - 5)
error (1, 0, "Internal error: hostname exceeds length of buffer");
- sprintf (buf, "cvs@%s", hostinfo->h_name);
+ sprintf (buf, "cvs@%s", hostname);
tok_in.length = strlen (buf);
tok_in.value = buf;
gss_import_name (&stat_min, &tok_in, GSS_C_NT_HOSTBASED_SERVICE,
diff -up cvs-1.11.23/src/cvs.h.ipv6 cvs-1.11.23/src/cvs.h
--- cvs-1.11.23/src/cvs.h.ipv6 2006-08-25 11:48:55.000000000 -0400
+++ cvs-1.11.23/src/cvs.h 2008-07-15 15:42:29.000000000 -0400
@@ -381,6 +381,7 @@ extern char *CurDir;
extern int really_quiet, quiet;
extern int use_editor;
extern int cvswrite;
+extern int af;
extern mode_t cvsumask;
diff -up cvs-1.11.23/src/main.c.ipv6 cvs-1.11.23/src/main.c
--- cvs-1.11.23/src/main.c.ipv6 2008-07-15 15:42:28.000000000 -0400
+++ cvs-1.11.23/src/main.c 2008-07-15 15:42:29.000000000 -0400
@@ -18,6 +18,7 @@
*/
#include <assert.h>
+#include <sys/socket.h>
#include "cvs.h"
#ifdef HAVE_WINSOCK_H
@@ -47,6 +48,7 @@ int quiet = 0;
int trace = 0;
int noexec = 0;
int logoff = 0;
+int af = AF_UNSPEC;
/*
* Zero if compression isn't supported or requested; non-zero to indicate
@@ -164,7 +166,7 @@ static const char *const usg[] =
in --help as it is a rather different format from the rest. */
"Usage: %s [cvs-options] command [command-options-and-arguments]\n",
- " where cvs-options are -q, -n, etc.\n",
+ " where cvs-options are -4, -6,-q, -n, etc.\n",
" (specify --help-options for a list of options)\n",
" where command is add, admin, etc.\n",
" (specify --help-commands for a list of commands\n",
@@ -262,6 +264,8 @@ static const char *const opt_usage[] =
#endif
" -a Authenticate all net traffic.\n",
#endif
+ " -4 Use IPv4.\n",
+ " -6 Use IPv6.\n",
" -s VAR=VAL Set CVS user variable.\n",
"(Specify the --help option for a list of other help options)\n",
NULL
@@ -414,7 +418,7 @@ main (argc, argv)
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[] = "+46Qqrwtnvb:T:e:d:Hfz:s:xa";
static struct option long_options[] =
{
{"help", 0, NULL, 'H'},
@@ -521,6 +525,12 @@ main (argc, argv)
/* --allow-root */
root_allow_add (optarg);
break;
+ case '4':
+ af = AF_INET;
+ break;
+ case '6':
+ af = AF_INET6;
+ break;
case 'Q':
really_quiet = 1;
/* FALL THROUGH */
diff -up cvs-1.11.23/src/server.c.ipv6 cvs-1.11.23/src/server.c
--- cvs-1.11.23/src/server.c.ipv6 2008-07-15 15:42:29.000000000 -0400
+++ cvs-1.11.23/src/server.c 2008-07-15 15:42:29.000000000 -0400
@@ -6091,8 +6091,8 @@ kserver_authenticate_connection ()
{
int status;
char instance[INST_SZ];
- struct sockaddr_in peer;
- struct sockaddr_in laddr;
+ struct sockaddr_storage peer;
+ struct sockaddr_storage laddr;
int len;
KTEXT_ST ticket;
AUTH_DAT auth;
@@ -6169,7 +6169,8 @@ static void
gserver_authenticate_connection ()
{
char hostname[MAXHOSTNAMELEN];
- struct hostent *hp;
+ char hbuf[1025];
+ struct addrinfo hints, *res0;
gss_buffer_desc tok_in, tok_out;
char buf[1024];
char *credbuf;
@@ -6181,11 +6182,16 @@ gserver_authenticate_connection ()
gss_OID mechid;
gethostname (hostname, sizeof hostname);
- hp = gethostbyname (hostname);
- if (hp == NULL)
+ hostname[sizeof(hostname)-1] = '\0';
+ memset (&hints, 0, sizeof(hints));
+ hints.ai_family = af;
+ hints.ai_socktype = SOCK_STREAM;
+ hints.ai_flags = AI_CANONNAME;
+ if (getaddrinfo (hostname, NULL, &hints, &res0))
error (1, 0, "can't get canonical hostname");
- sprintf (buf, "cvs@%s", hp->h_name);
+ sprintf (buf, "cvs@%s", res0->ai_canonname);
+ freeaddrinfo (res0);
tok_in.value = buf;
tok_in.length = strlen (buf);

View File

@ -0,0 +1,121 @@
--- cvs-1.11.22.orig/src/cvs.h 2008-09-09 13:46:07.000000000 -0400
+++ cvs-1.11.22/src/cvs.h 2008-09-09 13:46:13.000000000 -0400
@@ -695,6 +695,8 @@ void sleep_past PROTO ((time_t desttime)
#define RUN_STDOUT_APPEND 0x0004 /* append to stdout, don't truncate */
#define RUN_STDERR_APPEND 0x0008 /* append to stderr, don't truncate */
#define RUN_SIGIGNORE 0x0010 /* ignore interrupts for command */
+#define RUN_PIPE 0x0020 /* pass the arguments by stdin instead
+ * as arguments */
#define RUN_TTY (char *)0 /* for the benefit of lint */
void run_add_arg_p PROTO ((int *, size_t *, char ***, const char *s));
--- cvs-1.11.22.orig/src/run.c 2005-10-03 16:31:12.000000000 -0400
+++ cvs-1.11.22/src/run.c 2008-09-09 13:49:15.000000000 -0400
@@ -123,6 +123,8 @@ run_exec (stin, stout, sterr, flags)
int rc = -1;
int rerrno = 0;
int pid, w;
+ int pipefd[2];
+ char *run_argv2[3] = { NULL, "-", NULL };
#ifdef POSIX_SIGNALS
sigset_t sigset_mask, sigset_omask;
@@ -163,7 +165,26 @@ run_exec (stin, stout, sterr, flags)
mode_out |= ((flags & RUN_STDOUT_APPEND) ? O_APPEND : O_TRUNC);
mode_err |= ((flags & RUN_STDERR_APPEND) ? O_APPEND : O_TRUNC);
- if (stin && (shin = open (stin, O_RDONLY)) == -1)
+ if (*(run_argv[0]) == '|')
+ {
+ char *buf;
+
+ if (pipe(pipefd) == -1) {
+ rerrno = errno;
+ error (0, errno, "unable to open pipe");
+ goto out0;
+ }
+ flags |= RUN_PIPE;
+ shin = pipefd[0];
+ buf = strdup(run_argv[0] + 1); /* skip '|' */
+ if (buf == NULL) {
+ rc = ENOMEM;
+ error (0, errno, "unable to allocate memory");
+ goto out1;
+ }
+ run_argv2[0] = buf;
+ }
+ else if (stin && (shin = open (stin, O_RDONLY)) == -1)
{
rerrno = errno;
error (0, errno, "cannot open %s for reading (prog %s)",
@@ -239,8 +260,14 @@ run_exec (stin, stout, sterr, flags)
#endif
/* dup'ing is done. try to run it now */
- (void) execvp (run_argv[0], run_argv);
- error (0, errno, "cannot exec %s", run_argv[0]);
+ if (flags & RUN_PIPE) {
+ close(pipefd[1]);
+ (void) execvp (run_argv2[0], run_argv2);
+ error (0, errno, "cannot exec %s", run_argv2[0]);
+ } else {
+ (void) execvp (run_argv[0], run_argv);
+ error (0, errno, "cannot exec %s", run_argv[0]);
+ }
_exit (127);
}
else if (pid == -1)
@@ -283,6 +310,39 @@ run_exec (stin, stout, sterr, flags)
#endif
#endif
+ /* write all the arguments in the stdout if requested */
+ if (flags & RUN_PIPE) {
+ int size, s;
+
+ close(pipefd[0]);
+ for (w = 0; run_argv[w] != NULL; w++) {
+ size = strlen(run_argv[w]);
+ s = 0;
+ while (s < size) {
+ rc = write(pipefd[1], run_argv[w] + s, size - s);
+ if (rc < 0 && errno != EINTR) {
+ /* all other cases we'll just fail */
+ rerrno = errno;
+ error (0, errno, "unable to write to the application's stdin %s",
+ run_argv2[0]);
+ goto wait_for_process;
+ } else if (rc > 0)
+ s += rc;
+ }
+ do {
+ rc = write(pipefd[1], "\n", 1);
+ if (rc < 0 && errno != EINTR) {
+ rerrno = errno;
+ error (0, errno, "unable to write to the application's stdin %s",
+ run_argv2[0]);
+ goto wait_for_process;
+ }
+ } while (rc != 1);
+ }
+wait_for_process:
+ close(pipefd[1]);
+ pipefd[1] = -1;
+ }
/* wait for our process to die and munge return status */
#ifdef POSIX_SIGNALS
while ((w = waitpid (pid, &status, 0)) == -1 && errno == EINTR)
@@ -356,7 +416,14 @@ run_exec (stin, stout, sterr, flags)
* relative to the protocol pipe
*/
cvs_flushout();
+ if (flags & RUN_PIPE)
+ free(run_argv2[0]);
out1:
+ if (flags & RUN_PIPE) {
+ shin = -1;
+ if (pipefd[1] != -1)
+ close(pipefd[1]);
+ }
if (stin)
(void) close (shin);

View File

@ -0,0 +1,266 @@
From fe7182d15c93f46212781106b4b63503fcec713f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Tue, 15 Mar 2011 14:44:17 +0100
Subject: [PATCH] Back-port KeywordExpand configuration keyword
This is based on code from developemnt 1.12 branch.
---
doc/cvs.texinfo | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++++---
src/mkmodules.c | 5 +++
src/parseinfo.c | 4 ++
src/rcs.c | 51 ++++++++++++++++++++++++++++--
src/rcs.h | 1 +
5 files changed, 146 insertions(+), 8 deletions(-)
diff --git a/doc/cvs.texinfo b/doc/cvs.texinfo
index ad3a414..943af37 100644
--- a/doc/cvs.texinfo
+++ b/doc/cvs.texinfo
@@ -6847,11 +6847,12 @@ with strings of the form
a new revision of the file.
@menu
-* Keyword list:: Keywords
-* Using keywords:: Using keywords
-* Avoiding substitution:: Avoiding substitution
-* Substitution modes:: Substitution modes
-* Log keyword:: Problems with the $@splitrcskeyword{Log}$ keyword.
+* Keyword list:: Keywords
+* Using keywords:: Using keywords
+* Avoiding substitution:: Avoiding substitution
+* Substitution modes:: Substitution modes
+* Configuring keyword expansion:: Configuring keyword expansion
+* Log keyword:: Problems with the $@splitrcskeyword{Log}$ keyword.
@end menu
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -7032,6 +7033,12 @@ contains @samp{$@@asis@{@}Author$} whenever the text
and @code{troff} you can embed the null-character
@code{\&} inside the keyword for a similar effect.
+It is also possible to specify an explicit list of
+keywords to include or exclude using the
+@code{KeywordExpand} option in the
+@file{CVSROOT/config} file--see @ref{Configuring keyword expansion}
+for more details.
+
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node Substitution modes
@section Substitution modes
@@ -7124,6 +7131,74 @@ handle an export containing binary files correctly.
@end table
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+@node Configuring keyword expansion
+@section Configuring Keyword Expansion
+@cindex Configuring keyword expansion
+
+The @code{KeywordExpand} option in the
+@file{CVSROOT/config} file is intended to allow for the
+either the explicit exclusion of a keyword or list of
+keywords, or for the explicit inclusion of a keyword or
+a list of keywords.
+
+The @code{KeywordExpand} option is followed by
+@code{=} and the next character may either be @code{i}
+to start an inclusion list or @code{e} to start an
+exclusion list. If the following lines were added to
+the @file{CVSROOT/config} file:
+
+@example
+ # Restrict keyword expansion to "Log" only
+ KeywordExpand=iLog
+@end example
+
+then only the $@splitrcskeyword{Log}$ keyword would be expanded.
+A list may be used. The this example:
+
+@example
+ # Restrict keyword expansion to the Name and Date keywords.
+ KeywordExpand=iName,Date
+@end example
+
+would allow $@splitrcskeyword{Name}$, and $@splitrcskeyword{Date}$
+to be expanded.
+
+It is also possible to configure an exclusion list
+using the following:
+
+@example
+ # Do not expand the keyword Date
+ KeywordExpand=eDate
+@end example
+
+This allows @sc{cvs} to ignore the
+$@splitrcskeyword{CVSHeader}$ keyword and retain all of the
+others. This could be confusing
+to users that expect RCS keywords to be expanded, so
+care should be taken to properly set user expectations
+for a repository that is configured in that manner.
+
+If there is a desire to not have any RCS keywords
+expanded and not use the @code{-ko} flags everywhere,
+an administrator may disable all keyword expansion
+using the @file{CVSROOT/config} line:
+
+@example
+ # Do not expand any RCS keywords
+ KeywordExpand=i
+@end example
+
+this could be confusing to users that expect RCS
+keywords like $@splitrcskeyword{Id}$ to be expanded properly,
+so care should be taken to properly set user
+expectations for a repository so configured.
+
+It should be noted that a patch to provide the
+@code{KeywordExpand} feature has been around a long time.
+However, that patch implemented this feature using
+@code{tagexpand=} keyword and this keyword is NOT recognized.
+
+@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node Log keyword
@section Problems with the $@splitrcskeyword{Log}$ keyword.
@@ -13789,6 +13864,14 @@ each command. It also provides a place for the
@file{CVS/Template} file (@pxref{Working directory
storage}).
+@cindex KeywordExpand, in @file{CVSROOT/config}
+@item KeywordExpand=@var{value}
+Specify @samp{i} followed by a list of keywords to be expanded
+(for example, @samp{KeywordExpand=iName,Date}),
+or @samp{e} followed by a list of keywords not to be expanded
+(for example, @samp{KeywordExpand=eName}).
+For more on keyword expansion, see @ref{Configuring keyword expansion}.
+
@cindex LockDir, in CVSROOT/config
@item LockDir=@var{directory}
Put @sc{cvs} lock files in @var{directory} rather than
diff --git a/src/mkmodules.c b/src/mkmodules.c
index 4bb9d74..3be9509 100644
--- a/src/mkmodules.c
+++ b/src/mkmodules.c
@@ -300,6 +300,11 @@ static const char *const config_contents[] = {
"# primary CVS repository.\n",
"#IgnoreUnknownConfigKeys=no\n",
"\n",
+ "# Set `KeywordExpand' to `i' followed by a list of keywords to expand or\n",
+ "# `e' followed by a list of keywords to not expand.\n"
+ "#KeywordExpand=iName,Date\n",
+ "#KeywordExpand=eName\n",
+ "\n",
"# Put CVS lock files in this directory rather than directly in the repository.\n",
"#LockDir=/var/lock/cvs\n",
"\n",
diff --git a/src/parseinfo.c b/src/parseinfo.c
index 86fc6d6..477740a 100644
--- a/src/parseinfo.c
+++ b/src/parseinfo.c
@@ -360,6 +360,10 @@ parse_config (cvsroot)
goto error_return;
}
}
+ else if (strcmp (line, "KeywordExpand") == 0)
+ {
+ RCS_setincexc (p);
+ }
else if (strcmp (line, "PreservePermissions") == 0)
{
if (strcmp (p, "no") == 0)
diff --git a/src/rcs.c b/src/rcs.c
index 20c3162..ba255ce 100644
--- a/src/rcs.c
+++ b/src/rcs.c
@@ -15,6 +15,7 @@
*/
#include <assert.h>
+#include <stdbool.h>
#include "cvs.h"
#include "edit.h"
#include "hardlink.h"
@@ -3509,9 +3510,10 @@ struct rcs_keyword
{
const char *string;
size_t len;
+ bool expandit;
};
-#define KEYWORD_INIT(s) (s), sizeof (s) - 1
-static const struct rcs_keyword keywords[] =
+#define KEYWORD_INIT(s) (s), sizeof (s) - 1, true
+static struct rcs_keyword keywords[] =
{
{ KEYWORD_INIT ("Author") },
{ KEYWORD_INIT ("Date") },
@@ -3717,7 +3719,8 @@ expand_keywords (rcs, ver, name, log, loglen, expand, buf, len, retbuf, retlen)
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;
@@ -8958,3 +8961,45 @@ make_file_label (path, rev, rcs)
}
return label;
}
+
+
+
+void
+RCS_setincexc (const char *arg)
+{
+ char *key;
+ char *copy, *next;
+ bool include = false;
+ struct rcs_keyword *keyword;
+
+ copy = xstrdup(arg);
+ next = copy;
+ switch (*next++) {
+ case 'e':
+ include = false;
+ break;
+ case 'i':
+ include = true;
+ break;
+ default:
+ free(copy);
+ return;
+ }
+
+ if (include)
+ for (keyword = keywords; keyword->string != NULL; keyword++)
+ {
+ keyword->expandit = false;
+ }
+
+ 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;
+}
diff --git a/src/rcs.h b/src/rcs.h
index 3a66640..2126029 100644
--- a/src/rcs.h
+++ b/src/rcs.h
@@ -250,6 +250,7 @@ int rcs_change_text PROTO ((const char *, char *, size_t, const char *,
void RCS_deltas PROTO ((RCSNode *, FILE *, struct rcsbuffer *, const char *,
enum rcs_delta_op, char **, size_t *,
char **, size_t *));
+void RCS_setincexc (const char *arg);
char *make_file_label PROTO ((const char *, const char *, RCSNode *));
extern int preserve_perms;
--
1.7.4

View File

@ -0,0 +1,36 @@
From 73d49d17ce8db58e090f82719f7c9aad7340cbac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Tue, 17 Jan 2012 17:55:00 +0100
Subject: [PATCH] Fix proxy response parser
If proxy sends overlong HTTP vesion string, the string will be copied
to unallocatd space (write_buf) causing heap overflow.
This patch fixes it by ignoring the HTTP version string and checking
the response line has been parsed correctly.
See <https://bugzilla.redhat.com/show_bug.cgi?id=773699> for more
details.
---
src/client.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/client.c b/src/client.c
index d0abd41..80872be 100644
--- a/src/client.c
+++ b/src/client.c
@@ -3878,9 +3878,9 @@ proxy_connect (root, port_number)
/* Wait for HTTP status code, bail out if you don't get back a 2xx code.*/
count = read_line (&read_buf);
- sscanf (read_buf, "%s %d", write_buf, &codenum);
+ count = sscanf (read_buf, "%*s %d", &codenum);
- if ((codenum / 100) != 2)
+ if (count != 1 || (codenum / 100) != 2)
error (1, 0, "proxy server %s:%d does not support http tunnelling",
root->proxy_hostname, root->proxy_port);
free (read_buf);
--
1.7.7.5

View File

@ -0,0 +1,70 @@
From 9a5eb874aaa49106d8c326e325c0d8a85b925ac0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Thu, 21 Jul 2011 15:34:35 +0200
Subject: [PATCH] Pass server IP address instead of hostname to GSSAPI
GSSAPI will do its own lookup for the "primary" hostname, with a
rotating DNS alias it will end up occasionally with a different result
than the machine we already connected to. This gives errors along the
line of
GSSAPI authentication failed: lxcvs08.cern.ch Miscellaneous
failure/Unknown code krb5 144
Since GSSAPI will do a forward+reverse lookup anyway to find the
"canocical" hostname, we just feed it the IP we are currently
connected to.
---
src/client.c | 28 +++++++++++++++++++++++++---
1 files changed, 25 insertions(+), 3 deletions(-)
diff --git a/src/client.c b/src/client.c
index 7212ebb..d0abd41 100644
--- a/src/client.c
+++ b/src/client.c
@@ -4289,17 +4289,39 @@ connect_to_gserver (root, sock, hostname)
gss_buffer_desc *tok_in_ptr, tok_in, tok_out;
OM_uint32 stat_min, stat_maj;
gss_name_t server_name;
+ struct sockaddr_storage peer;
+ socklen_t peer_len = sizeof(peer);
+ int retval;
str = "BEGIN GSSAPI REQUEST\012";
if (send (sock, str, strlen (str), 0) < 0)
error (1, 0, "cannot send: %s", SOCK_STRERROR (SOCK_ERRNO));
- if (strlen (hostname) > BUFSIZE - 5)
- error (1, 0, "Internal error: hostname exceeds length of buffer");
- sprintf (buf, "cvs@%s", hostname);
+ /* find out who we are really talking to - should not allow
+ GSSAPI to resolve the name again to something different */
+ if (getpeername (sock, (struct sockaddr*)&peer, &peer_len) < 0 )
+ {
+ error (1, 0, "cannot identify remote peer: %s",
+ SOCK_STRERROR (SOCK_ERRNO));
+ }
+ retval = getnameinfo ((struct sockaddr *)&peer, peer_len, buf+4, BUFSIZE-4,
+ NULL, 0, NI_NUMERICHOST);
+ if (retval)
+ {
+ error (1, 0, "cannot format remote peer address: %s",
+ gai_strerror(retval));
+ }
+ /* ???: Delimit IPv6 address by brackets? */
+ memcpy (buf, "cvs@", 4);
+
tok_in.length = strlen (buf);
tok_in.value = buf;
+ if (trace)
+ {
+ fprintf (stderr, " -> will use GSSAPI principal '%s' for %s\n",
+ buf,hostname);
+ }
gss_import_name (&stat_min, &tok_in, GSS_C_NT_HOSTBASED_SERVICE,
&server_name);
--
1.7.6

View File

@ -0,0 +1,167 @@
From b122edcb68ff05bb6eb22f6e50423e7f1050841b Mon Sep 17 00:00:00 2001
From: Larry Jones <lawrence.jones@siemens.com>
Date: Thu, 21 Oct 2010 10:08:16 +0200
Subject: [PATCH] Fix for CVE-2010-3846
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Mallformed RCS revision (delete after the end of input file, or overlayed
deleted regions) screws output file image size computation. This leads to
write attempt after the allocated memory opening hiden memory corruption
driven by CVS server.
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
src/rcs.c | 52 +++++++++++++++++++++++++++++-----------------------
1 files changed, 29 insertions(+), 23 deletions(-)
diff --git a/src/rcs.c b/src/rcs.c
index 7d0d078..2f88f85 100644
--- a/src/rcs.c
+++ b/src/rcs.c
@@ -7128,7 +7128,7 @@ apply_rcs_changes (orig_lines, diffbuf, difflen, name, addvers, delvers)
struct deltafrag *dfhead;
struct deltafrag **dftail;
struct deltafrag *df;
- unsigned long numlines, lastmodline, offset;
+ unsigned long numlines, offset;
struct linevector lines;
int err;
@@ -7202,12 +7202,12 @@ apply_rcs_changes (orig_lines, diffbuf, difflen, name, addvers, delvers)
/* New temp data structure to hold new org before
copy back into original structure. */
- lines.nlines = lines.lines_alloced = numlines;
+ lines.lines_alloced = numlines;
lines.vector = xmalloc (numlines * sizeof *lines.vector);
/* We changed the list order to first to last -- so the
list never gets larger than the size numlines. */
- lastmodline = 0;
+ lines.nlines = 0;
/* offset created when adding/removing lines
between new and original structure */
@@ -7216,25 +7216,24 @@ apply_rcs_changes (orig_lines, diffbuf, difflen, name, addvers, delvers)
for (df = dfhead; df != NULL; )
{
unsigned int ln;
- unsigned long deltaend;
+ unsigned long newpos = df->pos - offset;
- if (df->pos > orig_lines->nlines)
+ if (newpos < lines.nlines || newpos > numlines)
err = 1;
/* On error, just free the rest of the list. */
if (!err)
{
- /* Here we need to get to the line where the next insert will
+ /* Here we need to get to the line where the next change will
begin, which is DF->pos in ORIG_LINES. We will fill up to
DF->pos - OFFSET in LINES with original items. */
- for (deltaend = df->pos - offset;
- lastmodline < deltaend;
- lastmodline++)
+ while (lines.nlines < newpos)
{
/* we need to copy from the orig structure into new one */
- lines.vector[lastmodline] =
- orig_lines->vector[lastmodline + offset];
- lines.vector[lastmodline]->refcount++;
+ lines.vector[lines.nlines] =
+ orig_lines->vector[lines.nlines + offset];
+ lines.vector[lines.nlines]->refcount++;
+ lines.nlines++;
}
switch (df->type)
@@ -7246,7 +7245,12 @@ apply_rcs_changes (orig_lines, diffbuf, difflen, name, addvers, delvers)
struct line *q;
int nextline_newline;
size_t nextline_len;
-
+
+ if (newpos + df->nlines > numlines)
+ {
+ err = 1;
+ break;
+ }
textend = df->new_lines + df->len;
nextline_newline = 0;
nextline_text = df->new_lines;
@@ -7271,8 +7275,7 @@ apply_rcs_changes (orig_lines, diffbuf, difflen, name, addvers, delvers)
q->has_newline = nextline_newline;
q->refcount = 1;
memcpy (q->text, nextline_text, nextline_len);
- lines.vector[lastmodline++] = q;
- offset--;
+ lines.vector[lines.nlines++] = q;
nextline_text = (char *)p + 1;
nextline_newline = 0;
@@ -7286,11 +7289,11 @@ apply_rcs_changes (orig_lines, diffbuf, difflen, name, addvers, delvers)
q->has_newline = nextline_newline;
q->refcount = 1;
memcpy (q->text, nextline_text, nextline_len);
- lines.vector[lastmodline++] = q;
+ lines.vector[lines.nlines++] = q;
/* For each line we add the offset between the #'s
decreases. */
- offset--;
+ offset -= df->nlines;
break;
}
@@ -7301,7 +7304,9 @@ apply_rcs_changes (orig_lines, diffbuf, difflen, name, addvers, delvers)
if (df->pos + df->nlines > orig_lines->nlines)
err = 1;
else if (delvers)
+ {
for (ln = df->pos; ln < df->pos + df->nlines; ++ln)
+ {
if (orig_lines->vector[ln]->refcount > 1)
/* Annotate needs this but, since the original
* vector is disposed of before returning from
@@ -7309,6 +7314,8 @@ apply_rcs_changes (orig_lines, diffbuf, difflen, name, addvers, delvers)
* there are multiple references.
*/
orig_lines->vector[ln]->vers = delvers;
+ }
+ }
break;
}
}
@@ -7328,21 +7335,20 @@ apply_rcs_changes (orig_lines, diffbuf, difflen, name, addvers, delvers)
else
{
/* add the rest of the remaining lines to the data vector */
- for (; lastmodline < numlines; lastmodline++)
+ while (lines.nlines < numlines)
{
/* we need to copy from the orig structure into new one */
- lines.vector[lastmodline] = orig_lines->vector[lastmodline
+ lines.vector[lines.nlines] = orig_lines->vector[lines.nlines
+ offset];
- lines.vector[lastmodline]->refcount++;
+ lines.vector[lines.nlines]->refcount++;
+ lines.nlines++;
}
/* Move the lines vector to the original structure for output,
* first deleting the old.
*/
linevector_free (orig_lines);
- orig_lines->vector = lines.vector;
- orig_lines->lines_alloced = numlines;
- orig_lines->nlines = lines.nlines;
+ *orig_lines = lines;
}
return !err;
--
1.7.2.3

View File

@ -0,0 +1,30 @@
From f40baecd3d09b1018185bcefde35464a79dbd68d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Wed, 5 Jun 2013 08:38:11 +0200
Subject: [PATCH] doc: Add mandatory argument to @sp
Texinfo-5.1 fails if @sp macro is not followed by a number. The
numeric argument is mandatory according to Texinfo documentation.
---
doc/cvs.texinfo | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/cvs.texinfo b/doc/cvs.texinfo
index ad3a414..14bc79a 100644
--- a/doc/cvs.texinfo
+++ b/doc/cvs.texinfo
@@ -111,9 +111,9 @@ approved by the Free Software Foundation.
@sp 4
@comment The title is printed in a large font.
@center @titlefont{Version Management}
-@sp
+@sp 1
@center @titlefont{with}
-@sp
+@sp 1
@center @titlefont{CVS}
@sp 2
@center for @sc{cvs} @value{VERSION}
--
1.8.1.4

View File

@ -0,0 +1,34 @@
--- cvs-1.11.23/lib/getline.c 2005-04-04 22:46:05.000000000 +0200
+++ cvs-1.11.23/lib/getline.c.old 2008-06-03 19:06:25.000000000 +0200
@@ -154,7 +154,7 @@
return ret;
}
-int
+ssize_t
getline (lineptr, n, stream)
char **lineptr;
size_t *n;
@@ -163,7 +163,7 @@
return getstr (lineptr, n, stream, '\n', 0, GETLINE_NO_LIMIT);
}
-int
+ssize_t
getline_safe (lineptr, n, stream, limit)
char **lineptr;
size_t *n;
--- cvs-1.11.23/lib/getline.h 2005-04-04 22:46:05.000000000 +0200
+++ cvs-1.11.23/lib/getline.h.old 2008-06-03 19:06:27.000000000 +0200
@@ -11,9 +11,9 @@
#define GETLINE_NO_LIMIT -1
-int
+ssize_t
getline __PROTO ((char **_lineptr, size_t *_n, FILE *_stream));
-int
+ssize_t
getline_safe __PROTO ((char **_lineptr, size_t *_n, FILE *_stream,
int limit));
int

View File

@ -0,0 +1,30 @@
From f923e7c9dd4c71a1f6318d4d9fb0bdd4476ab6c5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Mon, 25 Oct 2010 17:14:47 +0200
Subject: [PATCH] Make `make check' sanity testing verbose
---
src/Makefile.am | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 63e6b18..1adc157 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -125,11 +125,11 @@ check-local: localcheck remotecheck
.PHONY: localcheck
localcheck:
- $(SHELL) $(srcdir)/sanity.sh `pwd`/cvs$(EXEEXT)
+ $(SHELL) $(srcdir)/sanity.sh -v `pwd`/cvs$(EXEEXT)
.PHONY: remotecheck
remotecheck: all
- $(SHELL) $(srcdir)/sanity.sh -r `pwd`/cvs$(EXEEXT)
+ $(SHELL) $(srcdir)/sanity.sh -v -r `pwd`/cvs$(EXEEXT)
## MAINTAINER Targets
--
1.7.2.3

View File

@ -0,0 +1,25 @@
From 51ac6e634d6a53f4f2c78eafae599079c628e28e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Mon, 25 Oct 2010 16:21:54 +0200
Subject: [PATCH] Remove undefinded date from cvs(1) header
---
doc/cvs.1 | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/doc/cvs.1 b/doc/cvs.1
index b696d9a..07b7923 100644
--- a/doc/cvs.1
+++ b/doc/cvs.1
@@ -23,7 +23,7 @@
.ds Rv \\$3
.ds Dt \\$4
..
-.TH CVS 1 "\*(Dt"
+.TH CVS 1
.\" Full space in nroff; half space in troff
.de SP
.if n .sp
--
1.7.2.3

View File

@ -0,0 +1,39 @@
diff -up cvs-1.11.23/src/sanity.sh.old cvs-1.11.23/src/sanity.sh
--- cvs-1.11.23/src/sanity.sh.old 2008-05-07 03:16:00.000000000 +0200
+++ cvs-1.11.23/src/sanity.sh 2010-04-08 14:35:40.574373789 +0200
@@ -2752,7 +2752,7 @@ ${PROG} \[admin aborted\]: attempt to de
dotest_fail basicb-21 "${testcvs} -q admin -H" \
"admin: illegal option -- H
${PROG} \[admin aborted\]: specify ${PROG} -H admin for usage information" \
-"admin: invalid option -- H
+"admin: invalid option -- 'H'
${PROG} \[admin aborted\]: specify ${PROG} -H admin for usage information"
cd ..
rmdir 1
@@ -22192,7 +22198,7 @@ done"
"-r--r--r-- .*"
else
dotest modes-5 "ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v" \
-"-r--r--r-- .*"
+"-r--r--r--.*"
fi
# Test for whether we can set the execute bit.
@@ -22213,7 +22219,7 @@ done"
"-r--r--r-- .*"
else
dotest modes-7 "ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v" \
-"-r--r--r-- .*"
+"-r--r--r--.*"
fi
# OK, now manually change the modes and see what happens.
@@ -22236,7 +22242,7 @@ done"
"-r--r----- .*"
else
dotest modes-7b "ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v" \
-"-r--r----- .*"
+"-r--r-----.*"
fi
CVSUMASK=007

18
cvs/cvs.install Normal file
View File

@ -0,0 +1,18 @@
infodir=/usr/share/info
filelist=(cvs.info cvs-info-1 cvs-info-2 cvsclient.info)
post_install() {
for file in ${filelist[@]}; do
install-info $infodir/$file $infodir/dir 2> /dev/null
done
}
post_upgrade() {
post_install $1
}
pre_remove() {
for file in ${filelist[@]}; do
install-info --delete $infodir/$file $infodir/dir 2> /dev/null
done
}