Remove cvsync to encourage a switch to rsync for repository mirroring.

cvsync is buggy and crashes.  It also replicates the repository in such
a way that there are problems with branches in the copies.  It is
abandonware, the last release is 14 years old.
ok sthen@
This commit is contained in:
naddy 2019-11-07 10:16:26 +00:00
parent 4871995f41
commit 6dac88ac17
19 changed files with 5 additions and 533 deletions

View File

@ -1,11 +1,11 @@
# $OpenBSD: Makefile,v 1.798 2019/11/06 14:52:05 fcambus Exp $
# $OpenBSD: Makefile,v 1.799 2019/11/07 10:16:26 naddy Exp $
COMMENT = exceptions to pkg_add rules
CATEGORIES = devel databases
DISTFILES =
# API.rev
PKGNAME = quirks-3.189
PKGNAME = quirks-3.190
PKG_ARCH = *
MAINTAINER = Marc Espie <espie@openbsd.org>

View File

@ -1,7 +1,7 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
# $OpenBSD: Quirks.pm,v 1.815 2019/11/06 14:52:06 fcambus Exp $
# $OpenBSD: Quirks.pm,v 1.816 2019/11/07 10:16:26 naddy Exp $
#
# Copyright (c) 2009 Marc Espie <espie@openbsd.org>
#
@ -1326,6 +1326,7 @@ my $obsolete_reason = {
'py3-ioflo' => 6,
'postgresql-plv8' => 5,
'py-GeoIP' => 6,
'cvsync' => 3,
};
# reasons for obsolete packages

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.1147 2019/11/06 15:01:54 sthen Exp $
# $OpenBSD: Makefile,v 1.1148 2019/11/07 10:16:26 naddy Exp $
SUBDIR =
SUBDIR += GeoIP
@ -54,7 +54,6 @@
SUBDIR += crawl
SUBDIR += ctrace
SUBDIR += curl
SUBDIR += cvsync
SUBDIR += czmq
SUBDIR += daq
SUBDIR += darkstat

View File

@ -1,33 +0,0 @@
# $OpenBSD: Makefile,v 1.56 2019/07/12 20:48:24 sthen Exp $
COMMENT= CVS repository synchronization utility
PKGNAME= cvsync-0.25.0pre0
DISTNAME= cvsync-0.24.19
REVISION= 4
CATEGORIES= net
HOMEPAGE= http://www.cvsync.org/
# BSD
PERMIT_PACKAGE= Yes
WANTLIB= c pthread z
MASTER_SITES= http://www.cvsync.org/dist/ \
ftp://ftp.allbsd.org/pub/cvsync/
USE_GMAKE= Yes
MAKE_ENV= CVSYNC_DEFAULT_CONFIG="${SYSCONFDIR}/cvsync.conf" \
CVSYNCD_DEFAULT_CONFIG="${SYSCONFDIR}/cvsyncd.conf" \
INSTALL_MAN_OPTS="-o ${MANOWN} -g ${MANGRP} -m ${MANMODE}" \
INSTALL_BIN_OPTS="-o ${BINOWN} -g ${BINGRP} -m ${BINMODE} ${INSTALL_STRIP}" \
INSTALL=install
NO_TEST= Yes
EXAMPLESDIR= ${PREFIX}/share/examples/cvsync
post-install:
${INSTALL_DATA_DIR} ${EXAMPLESDIR}
${INSTALL_DATA} ${FILESDIR}/*.conf ${EXAMPLESDIR}
.include <bsd.port.mk>

View File

@ -1,2 +0,0 @@
SHA256 (cvsync-0.24.19.tar.gz) = ddmfw4dhLLRxQd5NWcs7odKWUVcjDxABX7qjocOydWA=
SIZE (cvsync-0.24.19.tar.gz) = 139695

View File

@ -1,42 +0,0 @@
# $OpenBSD: cvsync.conf,v 1.1 2013/08/29 14:28:13 naddy Exp $
#
# Fetch the OpenBSD CVS repository.
#
config {
# for a list of available servers, see
# http://www.openbsd.org/cvsync.html#CVSROOT
hostname cvsync.example.org
base-prefix /cvs
compress
# the whole repository
collection {
name openbsd release rcs
scanfile /var/cache/cvsync/openbsd
}
# # alternatively, fetch only selected parts
# collection {
# name openbsd-cvsroot release rcs
# }
# collection {
# name openbsd-ports release rcs
# }
# collection {
# name openbsd-src release rcs
# }
# collection {
# name openbsd-www release rcs
# }
# collection {
# name openbsd-xenocara release rcs
# }
#
# # the X11 and XF4 trees are of historical interest only
# collection {
# name openbsd-x11 release rcs
# }
# collection {
# name openbsd-xf4 release rcs
# }
}

View File

@ -1,34 +0,0 @@
# $OpenBSD: cvsyncd.conf,v 1.2 2016/05/13 14:24:48 naddy Exp $
#
# Distribute the OpenBSD CVS repository.
#
config {
base-prefix /cvs
pidfile /var/run/cvsyncd/cvsyncd.pid
collection {
name openbsd release rcs
comment "OpenBSD CVS Repository"
scanfile /var/cache/cvsync/openbsd
}
collection {
super openbsd release rcs
name openbsd-cvsroot prefix CVSROOT
}
collection {
super openbsd release rcs
name openbsd-ports prefix ports
}
collection {
super openbsd release rcs
name openbsd-src prefix src
}
collection {
super openbsd release rcs
name openbsd-www prefix www
}
collection {
super openbsd release rcs
name openbsd-xenocara prefix xenocara
}
}

View File

@ -1,86 +0,0 @@
$OpenBSD: patch-common_filecmp_rcs_c,v 1.1 2014/06/25 17:54:07 naddy Exp $
--- common/filecmp_rcs.c.orig Mon Jul 18 16:32:56 2005
+++ common/filecmp_rcs.c Wed Jun 25 16:00:27 2014
@@ -1808,7 +1808,13 @@ filecmp_rcs_delta_add(struct filecmp_args *fca, struct
return (false);
len = rev->num.n_len + rev->date.rd_num.n_len + rev->author.i_len;
- len += rev->state.i_len + rev->next.n_len + hashops->length + 11;
+ len += rev->state.i_len + rev->next.n_len;
+
+ if (fca->fca_proto >= CVSYNC_PROTO(0, 25))
+ len += rev->commitid.i_len + 1;
+
+ len += hashops->length + 11; /* XXX magic? */
+
for (i = 0 ; i < branches->rb_count ; i++)
len += branches->rb_num[i].n_len + 1;
if (len > fca->fca_cmdmax) {
@@ -1895,6 +1901,21 @@ filecmp_rcs_delta_add(struct filecmp_args *fca, struct
rev->next.n_len);
}
+ /* commitid */
+ if (fca->fca_proto >= CVSYNC_PROTO(0, 25)) {
+ cmd[0] = rev->commitid.i_len;
+ if (!mux_send(fca->fca_mux, MUX_UPDATER, cmd, 1))
+ return (false);
+ if (rev->commitid.i_len > 0) {
+ if (!mux_send(fca->fca_mux, MUX_UPDATER, rev->commitid.i_id,
+ rev->commitid.i_len)) {
+ return (false);
+ }
+ (*hashops->update)(fca->fca_hash_ctx, rev->commitid.i_id,
+ rev->commitid.i_len);
+ }
+ }
+
(*hashops->final)(fca->fca_hash_ctx, cmd);
if (!mux_send(fca->fca_mux, MUX_UPDATER, cmd, hashops->length))
return (false);
@@ -1958,13 +1979,24 @@ filecmp_rcs_delta_update(struct filecmp_args *fca, str
rev->next.n_len);
}
+ /* commitid */
+ if (rev->commitid.i_len > 0 && fca->fca_proto >= CVSYNC_PROTO(0, 25))
+ (*hashops->update)(fca->fca_hash_ctx, rev->commitid.i_id,
+ rev->commitid.i_len);
+
(*hashops->final)(fca->fca_hash_ctx, fca->fca_hash);
if (memcmp(hash, fca->fca_hash, hashops->length) == 0)
return (true);
len = rev->num.n_len + rev->date.rd_num.n_len + rev->author.i_len;
- len += rev->state.i_len + rev->next.n_len + hashops->length + 11;
+ len += rev->state.i_len + rev->next.n_len;
+
+ if (fca->fca_proto >= CVSYNC_PROTO(0, 25))
+ len += rev->commitid.i_len + 1;
+
+ len += hashops->length + 11; /* XXX magic? */
+
for (i = 0 ; i < branches->rb_count ; i++)
len += branches->rb_num[i].n_len + 1;
if (len > fca->fca_cmdmax)
@@ -2037,6 +2069,19 @@ filecmp_rcs_delta_update(struct filecmp_args *fca, str
if (!mux_send(fca->fca_mux, MUX_UPDATER, rev->next.n_str,
rev->next.n_len)) {
return (false);
+ }
+ }
+
+ /* commitid */
+ if (fca->fca_proto >= CVSYNC_PROTO(0, 25)) {
+ cmd[0] = rev->commitid.i_len;
+ if (!mux_send(fca->fca_mux, MUX_UPDATER, cmd, 1))
+ return (false);
+ if (rev->commitid.i_len > 0) {
+ if (!mux_send(fca->fca_mux, MUX_UPDATER, rev->commitid.i_id,
+ rev->commitid.i_len)) {
+ return (false);
+ }
}
}

View File

@ -1,17 +0,0 @@
$OpenBSD: patch-common_filescan_rcs_c,v 1.2 2014/06/25 17:54:07 naddy Exp $
--- common/filescan_rcs.c.orig Mon Jul 18 16:32:57 2005
+++ common/filescan_rcs.c Wed Jun 25 16:01:04 2014
@@ -931,6 +931,13 @@ filescan_rcs_update_rcs_delta(struct filescan_args *fs
rev->next.n_len);
}
+ /* commitid */
+ if (fsa->fsa_proto >= CVSYNC_PROTO(0, 25)) {
+ if (rev->commitid.i_len > 0)
+ (*hashops->update)(fsa->fsa_hash_ctx, rev->commitid.i_id,
+ rev->commitid.i_len);
+ }
+
(*hashops->final)(fsa->fsa_hash_ctx, cmd);
if (!mux_send(fsa->fsa_mux, MUX_FILECMP, cmd, hashops->length))

View File

@ -1,91 +0,0 @@
$OpenBSD: patch-common_rcslib_c,v 1.2 2014/06/25 17:54:07 naddy Exp $
--- common/rcslib.c.orig Mon Jul 18 16:34:30 2005
+++ common/rcslib.c Wed Jun 25 00:48:47 2014
@@ -64,6 +64,7 @@ static const struct rcs_keyword rcs_keywords[] = {
{ "strict", 6 },
{ "symbols", 7 },
{ "text", 4 },
+ { "commitid", 8 },
{ NULL, 0 }
};
@@ -83,7 +84,8 @@ enum {
RCS_STATE,
RCS_STRICT,
RCS_SYMBOLS,
- RCS_TEXT
+ RCS_TEXT,
+ RCS_COMMITID
};
#define RCS_SKIP(p, e) \
@@ -579,6 +581,40 @@ rcslib_parse_delta(struct rcslib_file *rcs, char *sp,
return (NULL);
}
+ /* commitid id; */
+ rcskey = &rcs_keywords[RCS_COMMITID];
+ if ((sp + rcskey->namelen > bp) ||
+ (memcmp(sp, rcskey->name, rcskey->namelen) != 0)) {
+ rev->commitid.i_id = NULL;
+ rev->commitid.i_len = 0;
+ } else {
+ sp += rcskey->namelen;
+
+ p = sp;
+ RCS_SKIP_NORET(sp, bp)
+ if ((sp > bp) || (sp == p)) {
+ free(delta->rd_rev);
+ return (NULL);
+ }
+
+ if ((sp = rcslib_parse_id(sp, bp, &rev->commitid)) == NULL) {
+ free(delta->rd_rev);
+ return (NULL);
+ }
+
+ RCS_SKIP_NORET(sp, bp)
+ if ((sp > bp) || (*sp++ != ';')) {
+ free(delta->rd_rev);
+ return (NULL);
+ }
+
+ RCS_SKIP_NORET(sp, bp)
+ if (sp > bp) {
+ free(delta->rd_rev);
+ return (NULL);
+ }
+ }
+
/* { newphrase }* */
p = sp;
if ((sp = rcslib_parse_newphrase(sp, bp)) == NULL) {
@@ -1522,10 +1558,24 @@ rcslib_write_delta(int fd, const struct rcslib_revisio
iov[0].iov_len = 7;
iov[1].iov_base = rev->next.n_str;
iov[1].iov_len = rev->next.n_len;
- iov[2].iov_base = ";\n\n";
- iov[2].iov_len = 3;
- len = iov[0].iov_len + iov[1].iov_len + iov[2].iov_len;
- if ((wn = writev(fd, iov, 3)) == -1)
+ iov[2].iov_base = ";\n";
+ iov[2].iov_len = 2;
+ if (rev->commitid.i_len > 0) {
+ iov[3].iov_base ="commitid\t";
+ iov[3].iov_len = 9;
+ iov[4].iov_base = rev->commitid.i_id;
+ iov[4].iov_len = rev->commitid.i_len;
+ iov[5].iov_base = ";\n\n";
+ iov[5].iov_len = 3;
+ } else {
+ iov[3].iov_base = "\n";
+ iov[3].iov_len = 1;
+ iov[4].iov_base = iov[5].iov_base = NULL;
+ iov[4].iov_len = iov[5].iov_len = 0;
+ }
+ len = iov[0].iov_len + iov[1].iov_len + iov[2].iov_len +
+ iov[3].iov_len + iov[4].iov_len + iov[5].iov_len;
+ if ((wn = writev(fd, iov, 6)) == -1)
return (false);
if ((size_t)wn != len)
return (false);

View File

@ -1,11 +0,0 @@
$OpenBSD: patch-common_rcslib_h,v 1.2 2014/06/25 17:54:07 naddy Exp $
--- common/rcslib.h.orig Mon Jan 24 08:44:56 2005
+++ common/rcslib.h Wed Jun 25 00:48:47 2014
@@ -102,6 +102,7 @@ struct rcslib_revision {
struct rcsnum next;
struct rcsstr log;
struct rcsstr text;
+ struct rcsid commitid;
/* internal use */
struct rcslib_revision *rv_next;

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-common_refuse_c,v 1.2 2014/06/25 17:54:07 naddy Exp $
--- common/refuse.c.orig Mon Jul 18 16:32:58 2005
+++ common/refuse.c Wed Jun 25 00:48:47 2014
@@ -246,7 +246,7 @@ refuse_access(struct refuse_args *ra, struct cvsync_at
continue;
namelen = strlen(pat);
ep = pat + namelen;
- while (ep >= pat) {
+ while (ep > pat) {
if (*--ep != '/')
continue;

View File

@ -1,65 +0,0 @@
$OpenBSD: patch-common_updater_rcs_c,v 1.2 2014/06/26 20:06:50 naddy Exp $
--- common/updater_rcs.c.orig Mon Jul 18 16:32:59 2005
+++ common/updater_rcs.c Thu Jun 26 19:28:00 2014
@@ -59,6 +59,7 @@
#include "logmsg.h"
#include "mux.h"
#include "rcslib.h"
+#include "version.h"
#include "updater.h"
@@ -1930,18 +1931,50 @@ updater_rcs_write_delta(struct updater_args *uda, uint
sp += slen;
}
len -= slen + 1;
- iov[2].iov_base = ";\n\n";
- iov[2].iov_len = 3;
+ iov[2].iov_base = ";\n";
+ iov[2].iov_len = 2;
if ((wn = writev(uda->uda_fileno, iov, 3)) == -1) {
logmsg_err("%s", strerror(errno));
(*hashops->destroy)(uda->uda_hash_ctx);
return (false);
}
- if ((size_t)wn != slen + 10) {
+ if ((size_t)wn != slen + 9) {
logmsg_err("writev error");
(*hashops->destroy)(uda->uda_hash_ctx);
return (false);
+ }
+
+ /* commitid */
+ if (uda->uda_proto >= CVSYNC_PROTO(0, 25)) {
+ len--;
+ if ((slen = *sp++) != 0) {
+ iov[0].iov_base = "commitid\t";
+ iov[0].iov_len = 9;
+
+ if (len < slen) {
+ (*hashops->destroy)(uda->uda_hash_ctx);
+ return (false);
+ }
+ iov[1].iov_base = (void *)sp;
+ iov[1].iov_len = slen;
+ (*hashops->update)(uda->uda_hash_ctx, sp, slen);
+
+ sp += slen;
+ len -= slen;
+
+ iov[2].iov_base = ";\n\n";
+ iov[2].iov_len = 3;
+
+ if ((wn = writev(uda->uda_fileno, iov, 3)) == -1) {
+ (*hashops->destroy)(uda->uda_hash_ctx);
+ return (false);
+ }
+ if ((size_t)wn != slen + 12) {
+ (*hashops->destroy)(uda->uda_hash_ctx);
+ return (false);
+ }
+ }
}
if (len != hashops->length) {

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-common_version_h,v 1.1 2014/06/25 17:54:07 naddy Exp $
--- common/version.h.orig Fri Jun 3 20:03:17 2005
+++ common/version.h Wed Jun 25 00:57:44 2014
@@ -31,8 +31,8 @@
#define __VERSION_H__
#define CVSYNC_MAJOR 0
-#define CVSYNC_MINOR 24
-#define CVSYNC_PATCHLEVEL 19
+#define CVSYNC_MINOR 25
+#define CVSYNC_PATCHLEVEL 0
#define CVSYNC_PROTO_MAJOR CVSYNC_MAJOR
#define CVSYNC_PROTO_MINOR CVSYNC_MINOR

View File

@ -1,68 +0,0 @@
$OpenBSD: patch-cvsyncd_access_c,v 1.2 2014/11/19 23:49:41 sthen Exp $
--- cvsyncd/access.c.orig Mon Jul 18 07:33:02 2005
+++ cvsyncd/access.c Mon Nov 17 23:35:16 2014
@@ -103,10 +103,12 @@ static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER
bool
access_init(size_t sz)
{
+#if defined(NO_ARC4RANDOM)
#if !defined(NO_INITSTATE)
static char acl_random_state[256];
#endif /* !defined(NO_INITSTATE) */
struct timeval tv;
+#endif /* defined(NO_ARC4RANDOM) */
if ((acl = malloc(sz * sizeof(*acl))) == NULL) {
logmsg_err("ACL: %s", strerror(errno));
@@ -119,6 +121,7 @@ access_init(size_t sz)
return (false);
}
+#if defined(NO_ARC4RANDOM)
(void)gettimeofday(&tv, NULL);
#if !defined(NO_INITSTATE)
@@ -127,6 +130,7 @@ access_init(size_t sz)
#else /* !defined(NO_INITSTATE) */
srandom((unsigned long)tv.tv_usec);
#endif /* !defined(NO_INITSTATE) */
+#endif /* defined(NO_ARC4RANDOM) */
acl_name[0] = '\0';
acl_size = sz;
@@ -193,6 +197,11 @@ access_authorize(int sock, struct config *cf)
}
sa->sa_error = CVSYNC_NO_ERROR;
+ sa->sa_socket = sock;
+ sa->sa_config = cf;
+
+ config_acquire(cf);
+
if (cvsync_isinterrupted()) {
sa->sa_status = ACL_DENY;
sa->sa_error = CVSYNC_ERROR_UNAVAIL;
@@ -205,7 +214,11 @@ access_authorize(int sock, struct config *cf)
sa->sa_error = CVSYNC_ERROR_UNAVAIL;
return (sa);
}
+#if !defined(NO_ARC4RANDOM)
+ _v.v32 = arc4random();
+#else /* !defined(NO_ARC4RANDOM) */
_v.v32 = (uint32_t)random();
+#endif /* !defined(NO_ARC4RANDOM) */
wn = snprintf(sa->sa_hostinfo, sizeof(sa->sa_hostinfo),
"[%s] (%02x%02x%02x%02x)", sa->sa_addr,
_v.v8[0], _v.v8[1], _v.v8[2], _v.v8[3]);
@@ -305,11 +318,6 @@ access_authorize(int sock, struct config *cf)
sa->sa_error = CVSYNC_ERROR_UNAVAIL;
return (sa);
}
-
- sa->sa_socket = sock;
- sa->sa_config = cf;
-
- config_acquire(cf);
logmsg("%s Connected (status=%d)", sa->sa_hostinfo, sa->sa_status);
time(&sa->sa_tick);

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-rcscmp_main_c,v 1.1 2014/06/25 17:54:07 naddy Exp $
--- rcscmp/main.c.orig Mon Jul 18 16:37:38 2005
+++ rcscmp/main.c Wed Jun 25 00:48:47 2014
@@ -220,6 +220,10 @@ rcscmp_hash(struct rcslib_file *rcs, const struct hash
(*hashops->update)(ctx, rev->next.n_str,
rev->next.n_len);
}
+ if (rev->commitid.i_len > 0) {
+ (*hashops->update)(ctx, rev->commitid.i_id,
+ rev->commitid.i_len);
+ }
}
if (rcs->desc.s_len > 0)

View File

@ -1,2 +0,0 @@
A CVS repository syncer (client and server), written in portable C.
It is similar to cvsup, but not compatible with it.

View File

@ -1,23 +0,0 @@
@comment $OpenBSD: PLIST,v 1.8 2013/08/29 14:28:14 naddy Exp $
@newgroup _cvsyncd:697
@newuser _cvsyncd:697:_cvsyncd:daemon:cvsync service:/nonexistent:/sbin/nologin
@bin bin/cvscan
@bin bin/cvsup2cvsync
@bin bin/cvsync
@bin bin/cvsync2cvsup
@bin bin/cvsyncd
@bin bin/rcscan
@bin bin/rcscmp
@man man/man1/cvscan.1
@man man/man1/cvsup2cvsync.1
@man man/man1/cvsync.1
@man man/man1/cvsync2cvsup.1
@man man/man1/cvsyncd.1
@man man/man1/rcscan.1
@man man/man1/rcscmp.1
share/examples/cvsync/
share/examples/cvsync/cvsync.conf
@sample ${SYSCONFDIR}/cvsync.conf
share/examples/cvsync/cvsyncd.conf
@sample ${SYSCONFDIR}/cvsyncd.conf
@rcscript ${RCDIR}/cvsyncd

View File

@ -1,14 +0,0 @@
#!/bin/ksh
#
# $OpenBSD: cvsyncd.rc,v 1.2 2018/01/11 19:27:04 rpe Exp $
daemon="${TRUEPREFIX}/bin/cvsyncd"
daemon_user="_cvsyncd"
. /etc/rc.d/rc.subr
rc_pre() {
install -o _cvsyncd -d /var/run/cvsyncd
}
rc_cmd $1