From 008e4c08f358a4f291018ff676e8b1c7d5c470a8 Mon Sep 17 00:00:00 2001 From: Joerg Sonnenberger Date: Tue, 25 Jan 2005 14:00:18 +0000 Subject: [PATCH] Mostly switch to the patch framework. For cvs.1.patch, it's easier to do by hand. Add a patch to let CVS ignore the environment variable CVSREADONLYFS for remote repositories. This allows a user to make lock-operation the default behaviour for local repositories without cludges for remote support. --- gnu/usr.bin/cvs/Makefile.inc | 3 +-- gnu/usr.bin/cvs/cvs/Makefile | 15 ++++++--------- gnu/usr.bin/cvs/cvs/root.c.patch | 25 +++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 11 deletions(-) create mode 100644 gnu/usr.bin/cvs/cvs/root.c.patch diff --git a/gnu/usr.bin/cvs/Makefile.inc b/gnu/usr.bin/cvs/Makefile.inc index 4145e0ac27..7107ea378d 100644 --- a/gnu/usr.bin/cvs/Makefile.inc +++ b/gnu/usr.bin/cvs/Makefile.inc @@ -1,10 +1,9 @@ -# $DragonFly: src/gnu/usr.bin/cvs/Makefile.inc,v 1.3 2004/08/03 18:11:54 dillon Exp $ +# $DragonFly: src/gnu/usr.bin/cvs/Makefile.inc,v 1.4 2005/01/25 14:00:18 joerg Exp $ # .if !defined(CVSDIR) CVSDIR= $(.CURDIR)/../../../../contrib/cvs-1.12.9 -CONTRIBDIR= ${CVSDIR} .if exists(${.OBJDIR}/../lib) LIBCVSDIR= ${.OBJDIR}/../lib diff --git a/gnu/usr.bin/cvs/cvs/Makefile b/gnu/usr.bin/cvs/cvs/Makefile index 7a5f60a61e..47265e53ea 100644 --- a/gnu/usr.bin/cvs/cvs/Makefile +++ b/gnu/usr.bin/cvs/cvs/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/gnu/usr.bin/cvs/cvs/Makefile,v 1.32.2.6 2003/01/21 23:06:51 peter Exp $ -# $DragonFly: src/gnu/usr.bin/cvs/cvs/Makefile,v 1.6 2004/05/20 02:27:56 dillon Exp $ +# $DragonFly: src/gnu/usr.bin/cvs/cvs/Makefile,v 1.7 2005/01/25 14:00:18 joerg Exp $ .include "${.CURDIR}/../Makefile.inc" @@ -23,18 +23,15 @@ SRCS= add.c admin.c annotate.c buffer.c \ recurse.c release.c remove.c repos.c root.c rsh-client.c run.c \ scramble.c server.c socket-client.c status.c subr.c tag.c update.c \ vers_ts.c version.c watch.c wrapper.c zlib.c \ - ${.OBJDIR}/main.c ${.OBJDIR}/diff.c + main.c diff.c ${PATCHES} -${.OBJDIR}/main.c: main.c.patch - patch -o ${.TARGET} -i ${.ALLSRC} ${CONTRIBDIR}/src/main.c - -${.OBJDIR}/diff.c: diff.c.patch - patch -o ${.TARGET} -i ${.ALLSRC} ${CONTRIBDIR}/src/diff.c +PATCHES=main.c.patch diff.c.patch root.c.patch +CONTRIBDIR= ${CVSDIR}/src ${.OBJDIR}/cvs.1: cvs.1.patch - patch -o ${.TARGET} -i ${.ALLSRC} ${CONTRIBDIR}/doc/cvs.1 + patch -o ${.TARGET} -i ${.ALLSRC} ${CVSDIR}/doc/cvs.1 -CLEANFILES+= ${.OBJDIR}/main.c ${.OBJDIR}/diff.c ${.OBJDIR}/cvs.1 +CLEANFILES+= ${.OBJDIR}/cvs.1 CFLAGS+= -I${.CURDIR} -I../lib -DHAVE_CONFIG_H \ -I${CVSDIR}/src -I${CVSDIR}/lib -I${CVSDIR}/diff -I. diff --git a/gnu/usr.bin/cvs/cvs/root.c.patch b/gnu/usr.bin/cvs/cvs/root.c.patch new file mode 100644 index 0000000000..4d65a4b577 --- /dev/null +++ b/gnu/usr.bin/cvs/cvs/root.c.patch @@ -0,0 +1,25 @@ +$DragonFly: src/gnu/usr.bin/cvs/cvs/Attic/root.c.patch,v 1.1 2005/01/25 14:00:18 joerg Exp $ +Index: root.c +=================================================================== +RCS file: /home/joerg/wd/repository/dragonflybsd/src/contrib/cvs-1.12.9/src/root.c,v +retrieving revision 1.1 +diff -u -r1.1 root.c +--- root.c 3 Aug 2004 18:08:51 -0000 1.1 ++++ root.c 24 Jan 2005 16:56:08 -0000 +@@ -507,10 +507,14 @@ + #ifdef CLIENT_SUPPORT + newroot->isremote = (newroot->method != local_method); + +- if (readonlyfs && newroot->isremote) +- error (1, 0, ++ if (newroot->isremote && readonlyfs) { ++ /* downgrade readonlyfs settings via environment */ ++ if (readonlyfs < 0) ++ error (1, 0, + "Read-only repository feature unavailable with remote roots (cvsroot = %s)", + cvsroot_copy); ++ readonlyfs = 0; ++ } + + if ((newroot->method != local_method) + #ifdef CLIENT_SUPPORT -- 2.41.0