summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2005-04-20 01:41:28 +0000
committerchristos <christos@NetBSD.org>2005-04-20 01:41:28 +0000
commit7d77e6d05cb3cf361c29df4ea76e784863fddaca (patch)
tree86e96096b0c918c73348ec165e6dbe013b1829a9 /gnu
parent5eaebcb7035e8251254003fd7a3f4902750a8f91 (diff)
Import 1.11.20 from ccvs.cvshome.org
Diffstat (limited to 'gnu')
-rw-r--r--gnu/dist/cvs/README15
-rw-r--r--gnu/dist/cvs/TODO19
-rw-r--r--gnu/dist/cvs/contrib/ChangeLog30
-rw-r--r--gnu/dist/cvs/contrib/Makefile.in172
-rw-r--r--gnu/dist/cvs/contrib/README3
-rw-r--r--gnu/dist/cvs/contrib/cvs_acls.html459
-rwxr-xr-xgnu/dist/cvs/contrib/cvs_acls.in1074
-rwxr-xr-xgnu/dist/cvs/contrib/log.in20
-rwxr-xr-xgnu/dist/cvs/contrib/mfpipe.in20
-rwxr-xr-xgnu/dist/cvs/contrib/rcslock.in20
-rw-r--r--gnu/dist/cvs/diff/libdiff.dep1
-rw-r--r--gnu/dist/cvs/doc/cvs.man.header6
-rw-r--r--gnu/dist/cvs/doc/mkman.pl314
-rw-r--r--gnu/dist/cvs/lib/fncase.c2
-rwxr-xr-xgnu/dist/cvs/lib/getdatebin0 -> 20400 bytes
-rw-r--r--gnu/dist/cvs/lib/regex.c4
-rwxr-xr-xgnu/dist/cvs/lib/test-getdate.sh127
-rw-r--r--gnu/dist/cvs/lib/xtime.h4
-rw-r--r--gnu/dist/cvs/src/Makefile.in275
-rwxr-xr-xgnu/dist/cvs/src/build_src.com3
-rw-r--r--gnu/dist/cvs/src/checkin.c11
-rw-r--r--gnu/dist/cvs/src/classify.c9
-rw-r--r--gnu/dist/cvs/src/create_adm.c9
-rw-r--r--gnu/dist/cvs/src/cvsrc.c7
-rw-r--r--gnu/dist/cvs/src/expand_path.c155
-rw-r--r--gnu/dist/cvs/src/fileattr.c3
-rw-r--r--gnu/dist/cvs/src/hardlink.c6
-rw-r--r--gnu/dist/cvs/src/hardlink.h2
-rw-r--r--gnu/dist/cvs/src/hash.c7
-rw-r--r--gnu/dist/cvs/src/hash.h7
-rw-r--r--gnu/dist/cvs/src/import.c33
-rw-r--r--gnu/dist/cvs/src/login.c11
-rw-r--r--gnu/dist/cvs/src/myndbm.c8
-rw-r--r--gnu/dist/cvs/src/no_diff.c11
-rw-r--r--gnu/dist/cvs/src/rcs.h12
-rw-r--r--gnu/dist/cvs/src/rcscmds.c10
-rw-r--r--gnu/dist/cvs/src/release.c10
-rw-r--r--gnu/dist/cvs/src/server.h6
-rw-r--r--gnu/dist/cvs/src/stack.c7
-rw-r--r--gnu/dist/cvs/src/stack.h5
-rw-r--r--gnu/dist/cvs/src/status.c9
-rw-r--r--gnu/dist/cvs/src/version.c12
-rw-r--r--gnu/dist/cvs/src/wrapper.c2
-rwxr-xr-xgnu/dist/cvs/ylwrap160
44 files changed, 2523 insertions, 557 deletions
diff --git a/gnu/dist/cvs/README b/gnu/dist/cvs/README
index ec46859602f..7b1f6462289 100644
--- a/gnu/dist/cvs/README
+++ b/gnu/dist/cvs/README
@@ -1,12 +1,13 @@
CVS Kit
- Copyright (c) 1993-1994 Brian Berliner
- Copyright (c) 1992 Brian Berliner and Jeff Polk
- Copyright (c) 1989-1992, Brian Berliner
- Copyright (c) 1998-2004 Free Software Foundation,
- Derek Price,
- & Ximbiot <http://ximbiot.com>
- All Rights Reserved
+ Copyright (C) 1986-2005 Free Software Foundation, Inc.
+
+ Portions Copyright (C) 1998-2005 Derek Price,
+ & Ximbiot <http://ximbiot.com>.
+ Portions Copyright (C) 1993-1994 Brian Berliner.
+ Portions Copyright (C) 1992 Brian Berliner and Jeff Polk.
+ Portions Copyright (C) 1989-1992 Brian Berliner.
+ All Rights Reserved
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnu/dist/cvs/TODO b/gnu/dist/cvs/TODO
index b03b4195f40..8e432af5ca7 100644
--- a/gnu/dist/cvs/TODO
+++ b/gnu/dist/cvs/TODO
@@ -2,10 +2,6 @@ The "TODO" file! -*-Indented-Text-*-
22. Catch signals for cleanup when "add"ing files.
-24. Insist on a log message.
- (If done, this should be configurable via commitinfo or some new
- config file -kingdon, Jun 1995).
-
30. Add "rdiff" & "rtag" program options to the modules database. These
commands seem hard to use since these commands deal directly with the
RCS ,v files. (perhaps should think a little harder about what this is
@@ -27,11 +23,6 @@ The "TODO" file! -*-Indented-Text-*-
PRCS 1.0 was particularly bad the way it handled the "invisible
state", but 1.2 is significantly better.
-49. cvs xxx commands should be able to deal with files in other
- directories. I want to do a cvs add foo/bar.c.
- [[ most commands now use the generic recursion processor, but not all;
- this note is left here to remind me to fix the others ]]
-
52. SCCS has a feature that I would *love* to see in CVS, as it is very
useful. One may make a private copy of SCCS suid to a particular user,
so other users in the authentication list may check files in and out of
@@ -73,13 +64,6 @@ The "TODO" file! -*-Indented-Text-*-
can only support symlinks that are relative and within the scope of
the sources being controlled.
-92. Look into this:
- After a bit of soul searching via dbx, I realized my sin was that I'd
- specified "echo" as the program to call from loginfo. The commit
- procedure worked fine till it hit my echo, then silently aborted
- leaving the lockfiles intact. Since I needn't use the loginfo
- facility, I simply removed those commands and it all works.
-
93. Need to think hard about release and development environments. Think
about execsets as well.
@@ -131,9 +115,6 @@ The "TODO" file! -*-Indented-Text-*-
error. I think a later cvs get sys seemed to work so perhaps
something is amiss in handling multiple arguments to cvs get?
-113. The "cvs update" command should tee its output to a log file in ".".
- (why? What is wrong with piping stdout to "tee"? -kingdon, Jun 1995)
-
119. When importing a directory tree that is under SCCS/RCS control,
consider an option to have import checkout the SCCS/RCS files if
necessary. (This is if someone wants to import something which
diff --git a/gnu/dist/cvs/contrib/ChangeLog b/gnu/dist/cvs/contrib/ChangeLog
index efe5c033bb2..10cf7debc24 100644
--- a/gnu/dist/cvs/contrib/ChangeLog
+++ b/gnu/dist/cvs/contrib/ChangeLog
@@ -1,8 +1,36 @@
+2005-04-14 Derek Price <derek@ximbiot.com>
+
+ * commit_prep.in, cvs_acls.in, log.in, log_accum.in, mfpipe.in,
+ rcslock.in: Enable taint checking and comment. This closes cvshome.org
+ Issue #224.
+
+2005-04-08 Derek Price <derek@ximbiot.com>
+
+ * README: Correct my email address.
+
+2005-01-31 Derek Price <derek@ximbiot.com>
+
+ * Makefile.am: Update copyright notices.
+
+2005-01-25 Mark D. Baushke <mdb@cvshome.org>
+
+ * cvs_acls.in: New version from
+ "Peter Connolly" <Peter.Connolly@cnet.com>.
+ * cvs_acls.html: New file from
+ "Peter Connolly" <Peter.Connolly@cnet.com>.
+ * Makefile.am (EXTRA_DIST): Add cvs_acls.html
+ * Makefile.in: Regenerated.
+
+2004-08-30 Derek Price <derek@ximbiot.com>
+
+ * log_accum.in: Changes to supress warnings under Perl 5.8.5.
+ (Patch from Jeroen Ruigrok/asmodai <asmodai@wxs.nl>.)
+
2004-01-30 Derek Price <derek@ximbiot.com>
Close issue #155.
* log_accum.in: Remove unused variables.
- (Patch from (Ville Skyttä <scop@cvshome.org>.)
+ (Patch from Ville Skyttä <scop@cvshome.org>.)
2003-10-14 Derek Price <derek@ximbiot.com>
diff --git a/gnu/dist/cvs/contrib/Makefile.in b/gnu/dist/cvs/contrib/Makefile.in
index 4e4444d1860..2b03137abc3 100644
--- a/gnu/dist/cvs/contrib/Makefile.in
+++ b/gnu/dist/cvs/contrib/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.7.9 from Makefile.am.
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
# @configure_input@
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -16,9 +16,11 @@
# Makefile for GNU CVS contributed sources.
# Do not use this makefile directly, but only from `../Makefile'.
-# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
-# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+#
+# Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+#
+# Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+# and others.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -30,6 +32,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
+
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
@@ -37,7 +40,6 @@ pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
-
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
@@ -51,6 +53,36 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
+subdir = contrib
+DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/check_cvs.in $(srcdir)/clmerge.in \
+ $(srcdir)/cln_hist.in $(srcdir)/commit_prep.in \
+ $(srcdir)/cvs_acls.in $(srcdir)/log.in $(srcdir)/log_accum.in \
+ $(srcdir)/mfpipe.in $(srcdir)/pvcs2rcs.in $(srcdir)/rcs2log.sh \
+ $(srcdir)/rcslock.in $(srcdir)/sccs2rcs.in ChangeLog
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = check_cvs clmerge cln_hist commit_prep cvs_acls \
+ log log_accum mfpipe pvcs2rcs rcs2log rcslock sccs2rcs
+am__installdirs = "$(DESTDIR)$(contribdir)" "$(DESTDIR)$(contribdir)"
+contribSCRIPT_INSTALL = $(INSTALL_SCRIPT)
+SCRIPTS = $(contrib_SCRIPTS)
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+contribDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(contrib_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
@@ -120,6 +152,8 @@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
bindir = @bindir@
build_alias = @build_alias@
datadir = @datadir@
@@ -133,6 +167,7 @@ libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
+mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
@@ -140,9 +175,7 @@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
-
contribdir = $(pkgdatadir)/contrib
-
contrib_SCRIPTS = \
check_cvs \
clmerge \
@@ -161,20 +194,16 @@ contrib_SCRIPTS = \
rcslock \
sccs2rcs
-
contrib_DATA = \
README \
intro.doc
-
contrib_MANS = \
cvscheck.man
-
bin_LINKS = \
rcs2log
-
EXTRA_DIST = \
.cvsignore \
$(contrib_DATA) \
@@ -182,6 +211,7 @@ EXTRA_DIST = \
cvs2vendor.sh \
cvscheck.sh \
cvshelp.man \
+ cvs_acls.html \
debug_check_log.sh \
descend.sh \
descend.man \
@@ -190,68 +220,74 @@ EXTRA_DIST = \
rcs2log.sh \
rcs2sccs.sh
-
CLEANFILES = $(bin_SCRIPTS) $(contrib_SCRIPTS)
-
SUFFIXES = .sh
-subdir = contrib
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES = check_cvs clmerge cln_hist commit_prep cvs_acls log \
- log_accum mfpipe pvcs2rcs rcs2log rcslock sccs2rcs
-SCRIPTS = $(contrib_SCRIPTS)
-
-DIST_SOURCES =
-DATA = $(contrib_DATA)
-
-DIST_COMMON = README $(srcdir)/Makefile.in ChangeLog Makefile.am \
- check_cvs.in clmerge.in cln_hist.in commit_prep.in cvs_acls.in \
- log.in log_accum.in mfpipe.in pvcs2rcs.in rcs2log.sh rcslock.in \
- sccs2rcs.in
all: all-am
.SUFFIXES:
.SUFFIXES: .sh
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu contrib/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu contrib/Makefile
-Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
-check_cvs: $(top_builddir)/config.status check_cvs.in
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+check_cvs: $(top_builddir)/config.status $(srcdir)/check_cvs.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-clmerge: $(top_builddir)/config.status clmerge.in
+clmerge: $(top_builddir)/config.status $(srcdir)/clmerge.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-cln_hist: $(top_builddir)/config.status cln_hist.in
+cln_hist: $(top_builddir)/config.status $(srcdir)/cln_hist.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-commit_prep: $(top_builddir)/config.status commit_prep.in
+commit_prep: $(top_builddir)/config.status $(srcdir)/commit_prep.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-cvs_acls: $(top_builddir)/config.status cvs_acls.in
+cvs_acls: $(top_builddir)/config.status $(srcdir)/cvs_acls.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-log: $(top_builddir)/config.status log.in
+log: $(top_builddir)/config.status $(srcdir)/log.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-log_accum: $(top_builddir)/config.status log_accum.in
+log_accum: $(top_builddir)/config.status $(srcdir)/log_accum.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-mfpipe: $(top_builddir)/config.status mfpipe.in
+mfpipe: $(top_builddir)/config.status $(srcdir)/mfpipe.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-pvcs2rcs: $(top_builddir)/config.status pvcs2rcs.in
+pvcs2rcs: $(top_builddir)/config.status $(srcdir)/pvcs2rcs.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-rcs2log: $(top_builddir)/config.status rcs2log.sh
+rcs2log: $(top_builddir)/config.status $(srcdir)/rcs2log.sh
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-rcslock: $(top_builddir)/config.status rcslock.in
+rcslock: $(top_builddir)/config.status $(srcdir)/rcslock.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-sccs2rcs: $(top_builddir)/config.status sccs2rcs.in
+sccs2rcs: $(top_builddir)/config.status $(srcdir)/sccs2rcs.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-contribSCRIPT_INSTALL = $(INSTALL_SCRIPT)
install-contribSCRIPTS: $(contrib_SCRIPTS)
@$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(contribdir)
+ test -z "$(contribdir)" || $(mkdir_p) "$(DESTDIR)$(contribdir)"
@list='$(contrib_SCRIPTS)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
if test -f $$d$$p; then \
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
- echo " $(contribSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(contribdir)/$$f"; \
- $(contribSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(contribdir)/$$f; \
+ echo " $(contribSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(contribdir)/$$f'"; \
+ $(contribSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(contribdir)/$$f"; \
else :; fi; \
done
@@ -259,27 +295,26 @@ uninstall-contribSCRIPTS:
@$(NORMAL_UNINSTALL)
@list='$(contrib_SCRIPTS)'; for p in $$list; do \
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
- echo " rm -f $(DESTDIR)$(contribdir)/$$f"; \
- rm -f $(DESTDIR)$(contribdir)/$$f; \
+ echo " rm -f '$(DESTDIR)$(contribdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(contribdir)/$$f"; \
done
uninstall-info-am:
-contribDATA_INSTALL = $(INSTALL_DATA)
install-contribDATA: $(contrib_DATA)
@$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(contribdir)
+ test -z "$(contribdir)" || $(mkdir_p) "$(DESTDIR)$(contribdir)"
@list='$(contrib_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- f="`echo $$p | sed -e 's|^.*/||'`"; \
- echo " $(contribDATA_INSTALL) $$d$$p $(DESTDIR)$(contribdir)/$$f"; \
- $(contribDATA_INSTALL) $$d$$p $(DESTDIR)$(contribdir)/$$f; \
+ f=$(am__strip_dir) \
+ echo " $(contribDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(contribdir)/$$f'"; \
+ $(contribDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(contribdir)/$$f"; \
done
uninstall-contribDATA:
@$(NORMAL_UNINSTALL)
@list='$(contrib_DATA)'; for p in $$list; do \
- f="`echo $$p | sed -e 's|^.*/||'`"; \
- echo " rm -f $(DESTDIR)$(contribdir)/$$f"; \
- rm -f $(DESTDIR)$(contribdir)/$$f; \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(contribdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(contribdir)/$$f"; \
done
tags: TAGS
TAGS:
@@ -287,10 +322,6 @@ TAGS:
ctags: CTAGS
CTAGS:
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-
-top_distdir = ..
-distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
@@ -304,7 +335,7 @@ distdir: $(DISTFILES)
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
- $(mkinstalldirs) "$(distdir)$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
@@ -322,9 +353,10 @@ distdir: $(DISTFILES)
check-am: all-am
check: check-am
all-am: Makefile $(SCRIPTS) $(DATA)
-
installdirs:
- $(mkinstalldirs) $(DESTDIR)$(contribdir) $(DESTDIR)$(contribdir)
+ for dir in "$(DESTDIR)$(contribdir)" "$(DESTDIR)$(contribdir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
@@ -345,7 +377,7 @@ clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
- -rm -f $(CONFIG_CLEAN_FILES)
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -362,6 +394,8 @@ dvi: dvi-am
dvi-am:
+html: html-am
+
info: info-am
info-am:
@@ -397,8 +431,8 @@ uninstall-am: uninstall-contribDATA uninstall-contribSCRIPTS \
uninstall-info-am uninstall-local
.PHONY: all all-am check check-am clean clean-generic distclean \
- distclean-generic distdir dvi dvi-am info info-am install \
- install-am install-contribDATA install-contribSCRIPTS \
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
+ install install-am install-contribDATA install-contribSCRIPTS \
install-data install-data-am install-data-local install-exec \
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
diff --git a/gnu/dist/cvs/contrib/README b/gnu/dist/cvs/contrib/README
index b6e33f7ec11..360f59f189f 100644
--- a/gnu/dist/cvs/contrib/README
+++ b/gnu/dist/cvs/contrib/README
@@ -71,8 +71,7 @@ An attempt at a table of Contents for this directory:
useful.
debug_check_log A shell script to help analyze sanity check failures.
- Contributed by Derek R. Price
- <derek.price@openavenue.com>
+ Contributed by Derek R. Price <derek@ximbiot.com>.
descend A shell script that can be used to recursively
descend.man descend through a directory. In CVS 1.2, this was
diff --git a/gnu/dist/cvs/contrib/cvs_acls.html b/gnu/dist/cvs/contrib/cvs_acls.html
new file mode 100644
index 00000000000..61b27f418f9
--- /dev/null
+++ b/gnu/dist/cvs/contrib/cvs_acls.html
@@ -0,0 +1,459 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>cvs_acls</title>
+<link rev="made" href="mailto:root@localhost" />
+</head>
+
+<body style="background-color: white">
+
+<p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
+
+<ul>
+
+ <li><a href="#name">Name</a></li>
+ <li><a href="#synopsis">Synopsis</a></li>
+ <li><a href="#licensing">Licensing</a></li>
+ <li><a href="#description">Description</a></li>
+ <li><a href="#enhancements">Enhancements</a></li>
+ <ul>
+
+ <li><a href="#fixed_bugs">Fixed Bugs</a></li>
+ <li><a href="#enhancements">Enhancements</a></li>
+ <li><a href="#todos">ToDoS</a></li>
+ </ul>
+
+ <li><a href="#version_information">Version Information</a></li>
+ <li><a href="#installation">Installation</a></li>
+ <li><a href="#format_of_the_cvsacl_file">Format of the cvsacl file</a></li>
+ <li><a href="#program_logic">Program Logic</a></li>
+ <ul>
+
+ <li><a href="#pseudocode">Pseudocode</a></li>
+ <li><a href="#sanity_check">Sanity Check</a></li>
+ </ul>
+
+</ul>
+<!-- INDEX END -->
+
+<hr />
+<p>
+</p>
+<h1><a name="name">Name</a></h1>
+<p>cvs_acls - Access Control List for CVS</p>
+<p>
+</p>
+<hr />
+<h1><a name="synopsis">Synopsis</a></h1>
+<p>In 'commitinfo':</p>
+<pre>
+ repository/path/to/restrict $CVSROOT/CVSROOT/cvs_acls [-d][-u $USER][-f &lt;logfile&gt;]</pre>
+<p>where:</p>
+<pre>
+ -d turns on debug information
+ -u passes the client-side userId to the cvs_acls script
+ -f specifies an alternate filename for the restrict_log file</pre>
+<p>In 'cvsacl':</p>
+<pre>
+ {allow.*,deny.*} [|user,user,... [|repos,repos,... [|branch,branch,...]]]</pre>
+<p>where:</p>
+<pre>
+ allow|deny - allow: commits are allowed; deny: prohibited
+ user - userId to be allowed or restricted
+ repos - file or directory to be allowed or restricted
+ branch - branch to be allowed or restricted</pre>
+<p>See below for examples.</p>
+<p>
+</p>
+<hr />
+<h1><a name="licensing">Licensing</a></h1>
+<p>cvs_acls - provides access control list functionality for CVS
+</p>
+<pre>
+
+Copyright (c) 2004 by Peter Connolly &lt;peter.connolly@cnet.com&gt;
+All rights reserved.</pre>
+<p>This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.</p>
+<p>This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.</p>
+<p>You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</p>
+<p>
+</p>
+<hr />
+<h1><a name="description">Description</a></h1>
+<p>This script--cvs_acls--is invoked once for each directory within a
+``cvs commit''. The set of files being committed for that directory as
+well as the directory itself, are passed to this script. This script
+checks its 'cvsacl' file to see if any of the files being committed
+are on the 'cvsacl' file's restricted list. If any of the files are
+restricted, then the cvs_acls script passes back an exit code of 1
+which disallows the commits for that directory.</p>
+<p>Messages are returned to the committer indicating the <a href="#item_file"><code>file(s)</code></a> that
+he/she are not allowed to committ. Additionally, a site-specific
+set of messages (e.g., contact information) can be included in these
+messages.</p>
+<p>When a commit is prohibited, log messages are written to a restrict_log
+file in $CVSROOT/CVSROOT. This default file can be redirected to
+another destination.</p>
+<p>The script is triggered from the 'commitinfo' file in $CVSROOT/CVSROOT/.</p>
+<p>
+</p>
+<hr />
+<h1><a name="enhancements">Enhancements</a></h1>
+<p>This section lists the bug fixes and enhancements added to cvs_acls
+that make up the current cvs_acls.</p>
+<p>
+</p>
+<h2><a name="fixed_bugs">Fixed Bugs</a></h2>
+<p>This version attempts to get rid the following bugs from the
+original version of cvs_acls:</p>
+<ul>
+<li><strong><a name="item_files">Multiple entries on an 'cvsacl' line will be matched individually,
+instead of requiring that all commit files *exactly* match all
+'cvsacl' entries. Commiting a file not in the 'cvsacl' list would
+allow *all* files (including a restricted file) to be committed.</a></strong><br />
+</li>
+[IMO, this basically made the original script unuseable for our
+situation since any arbitrary combination of committed files could
+avoid matching the 'cvsacl's entries.]
+<p></p>
+<li><strong><a name="item_handle_specific_filename_restrictions_2e_cvs_acls_">Handle specific filename restrictions. cvs_acls didn't restrict
+individual files specified in 'cvsacl'.</a></strong><br />
+</li>
+<li><strong><a name="item_correctly_handle_multiple_2c_specific_filename_res">Correctly handle multiple, specific filename restrictions</a></strong><br />
+</li>
+<li><strong><a name="item_prohibit_mix_of_dirs_and_files_on_a_single__27cvsa">Prohibit mix of dirs and files on a single 'cvsacl' line
+[To simplify the logic and because this would be normal usage.]</a></strong><br />
+</li>
+<li><strong><a name="item_correctly_handle_a_mixture_of_branch_restrictions_">Correctly handle a mixture of branch restrictions within one work
+directory</a></strong><br />
+</li>
+<li><strong><a name="item__24cvsroot_existence_is_checked_too_late">$CVSROOT existence is checked too late</a></strong><br />
+</li>
+<li><strong><a name="item_option">Correctly handle the CVSROOT=:local:/... option (useful for
+interactive testing)</a></strong><br />
+</li>
+<li><strong><a name="item_logic">Replacing shoddy ``$universal_off'' logic
+(Thanks to Karl-Konig Konigsson for pointing this out.)</a></strong><br />
+</li>
+</ul>
+<p>
+</p>
+<h2><a name="enhancements">Enhancements</a></h2>
+<ul>
+<li><strong><a name="item_checks_modules_in_the__27cvsacl_27_file_for_valid_">Checks modules in the 'cvsacl' file for valid files and directories</a></strong><br />
+</li>
+<li><strong><a name="item_accurately_report_restricted_entries_and_their_mat">Accurately report restricted entries and their matching patterns</a></strong><br />
+</li>
+<li><strong><a name="item_simplified_and_commented_overly_complex_perl_regex">Simplified and commented overly complex PERL REGEXPs for readability
+and maintainability</a></strong><br />
+</li>
+<li><strong><a name="item_skip_the_rest_of_processing_if_a_mismatch_on_porti">Skip the rest of processing if a mismatch on portion of the 'cvsacl' line</a></strong><br />
+</li>
+<li><strong><a name="item_file">Get rid of opaque ``karma'' messages in favor of user-friendly messages
+that describe which user, <code>file(s)</code> and <code>branch(es)</code> were disallowed.</a></strong><br />
+</li>
+<li><strong><a name="item_add_optional__27restrict_msg_27_file_for_additiona">Add optional 'restrict_msg' file for additional, site-specific
+restriction messages.</a></strong><br />
+</li>
+<li><strong><a name="item_userid">Take a ``-u'' parameter for $USER from commit_prep so that the script
+can do restrictions based on the client-side userId rather than the
+server-side userId (usually 'cvs').</a></strong><br />
+</li>
+(See discussion below on ``Admin Setup'' for more on this point.)
+<p></p>
+<li><strong><a name="item_added_a_lot_more_debug_trace">Added a lot more debug trace</a></strong><br />
+</li>
+<li><strong><a name="item_tested_these_restrictions_with_concurrent_use_of_p">Tested these restrictions with concurrent use of pserver and SSH
+access to model our transition from pserver to ext access.</a></strong><br />
+</li>
+<li><strong><a name="item_added_logging_of_restricted_commit_attempts_2e_res">Added logging of restricted commit attempts.
+Restricted commits can be sent to a default file:
+$CVSROOT/CVSROOT/restrictlog or to one passed to the script
+via the -f command parameter.</a></strong><br />
+</li>
+</ul>
+<p>
+</p>
+<h2><a name="todos">ToDoS</a></h2>
+<ul>
+<li><strong><a name="item_need_to_deal_with_pserver_2fssh_transition_with_co">Need to deal with pserver/SSH transition with conflicting umasks?</a></strong><br />
+</li>
+<li><strong><a name="item_use_a_cpan_module_to_handle_command_parameters_2e">Use a CPAN module to handle command parameters.</a></strong><br />
+</li>
+<li><strong><a name="item_use_a_cpan_module_to_clone_data_structures_2e">Use a CPAN module to clone data structures.</a></strong><br />
+</li>
+</ul>
+<p>
+</p>
+<hr />
+<h1><a name="version_information">Version Information</a></h1>
+<p>This is not offered as a fix to the original 'cvs_acls' script since it
+differs substantially in goals and methods from the original and there
+are probably a significant number of people out there that still require
+the original version's functionality.</p>
+<p>The 'cvsacl' file flags of 'allow' and 'deny' were intentionally
+changed to 'allow' and 'deny' because there are enough differences
+between the original script's behavior and this one's that we wanted to
+make sure that users will rethink their 'cvsacl' file formats before
+plugging in this newer script.</p>
+<p>Please note that there has been very limited cross-platform testing of
+this script!!! (We did not have the time or resources to do exhaustive
+cross-platform testing.)</p>
+<p>It was developed and tested under Red Hat Linux 9.0 using PERL 5.8.0.
+Additionally, it was built and tested under Red Hat Linux 7.3 using
+PERL 5.6.1.</p>
+<p>$Id: cvs_acls.html,v 1.1.1.1 2005/04/20 01:42:07 christos Exp $</p>
+<p>This version is based on the 1.11.13 version of cvs_acls
+<a href="mailto:peter.connolly@cnet.com">peter.connolly@cnet.com</a> (Peter Connolly)</p>
+<pre>
+ Access control lists for CVS. dgg@ksr.com (David G. Grubbs)
+ Branch specific controls added by voisine@bytemobile.com (Aaron Voisine)</pre>
+<p>
+</p>
+<hr />
+<h1><a name="installation">Installation</a></h1>
+<p>To use this program, do the following four things:</p>
+<p>0. Install PERL, version 5.6.1 or 5.8.0.</p>
+<p>1. Admin Setup:</p>
+<pre>
+ There are two choices here.</pre>
+<pre>
+ a) The first option is to use the $ENV{&quot;USER&quot;}, server-side userId
+ (from the third column of your pserver 'passwd' file) as the basis for
+ your restrictions. In this case, you will (at a minimum) want to set
+ up a new &quot;cvsadmin&quot; userId and group on the pserver machine.
+ CVS administrators will then set up their 'passwd' file entries to
+ run either as &quot;cvs&quot; (for regular users) or as &quot;cvsadmin&quot; (for power
+ users). Correspondingly, your 'cvsacl' file will only list 'cvs'
+ and 'cvsadmin' as the userIds in the second column.</pre>
+<pre>
+ Commentary: A potential weakness of this is that the xinetd
+ cvspserver process will need to run as 'root' in order to switch
+ between the 'cvs' and the 'cvsadmin' userIds. Some sysadmins don't
+ like situations like this and may want to chroot the process.
+ Talk to them about this point...</pre>
+<pre>
+ b) The second option is to use the client-side userId as the basis for
+ your restrictions. In this case, all the xinetd cvspserver processes
+ can run as userId 'cvs' and no 'root' userId is required. If you have
+ a 'passwd' file that lists 'cvs' as the effective run-time userId for
+ all your users, then no changes to this file are needed. Your 'cvsacl'
+ file will use the individual, client-side userIds in its 2nd column.</pre>
+<pre>
+ As long as the userIds in pserver's 'passwd' file match those userIds
+ that your Linux server know about, this approach is ideal if you are
+ planning to move from pserver to SSH access at some later point in time.
+ Just by switching the CVSROOT var from CVSROOT=:pserver:&lt;userId&gt;... to
+ CVSROOT=:ext:&lt;userId&gt;..., users can switch over to SSH access without
+ any other administrative changes. When all users have switched over to
+ SSH, the inherently insecure xinetd cvspserver process can be disabled.
+ [<a href="https://www.cvshome.org/docs/manual/cvs-1.11.17/cvs_2.html#SEC32">https://www.cvshome.org/docs/manual/cvs-1.11.17/cvs_2.html#SEC32</a>]</pre>
+<pre>
+ :TODO: The only potential glitch with the SSH approach is the possibility
+ that each user can have differing umasks that might interfere with one
+ another, especially during a transition from pserver to SSH. As noted
+ in the ToDo section, this needs a good strategy and set of tests for that
+ yet...</pre>
+<p>2. Put two lines, as the *only* non-comment lines, in your commitinfo file:</p>
+<pre>
+ ALL $CVSROOT/CVSROOT/commit_prep
+ ALL $CVSROOT/CVSROOT/cvs_acls [-d][-u $USER ][-f &lt;logfilename&gt;]</pre>
+<pre>
+ where &quot;-d&quot; turns on debug trace
+ &quot;-u $USER&quot; passes the client-side userId to cvs_acls
+ &quot;-f &lt;logfilename&quot;&gt; overrides the default filename used to log
+ restricted commit attempts.</pre>
+<pre>
+ (These are handled in the processArgs() subroutine.)</pre>
+<p>If you are using client-side userIds to restrict access to your
+repository, make sure that they are in this order since the commit_prep
+script is required in order to pass the $USER parameter.</p>
+<p>A final note about the repository matching pattern. The example above
+uses ``ALL'' but note that this means that the cvs_acls script will run
+for each and every commit in your repository. Obviously, in a large
+repository this adds up to a lot of overhead that may not be necesary.
+A better strategy is to use a repository pattern that is more specific
+to the areas that you wish to secure.</p>
+<p>3. Install this file as $CVSROOT/CVSROOT/cvs_acls and make it executable.</p>
+<p>4. Create a file named CVSROOT/cvsacl and optionally add it to
+ CVSROOT/checkoutlist and check it in. See the CVS manual's
+ administrative files section about checkoutlist. Typically:</p>
+<pre>
+ $ cvs checkout CVSROOT
+ $ cd CVSROOT
+ [ create the cvsacl file, include 'commitinfo' line ]
+ [ add cvsacl to checkoutlist ]
+ $ cvs add cvsacl
+ $ cvs commit -m 'Added cvsacl for use with cvs_acls.' cvsacl checkoutlist</pre>
+<p>Note: The format of the 'cvsacl' file is described in detail immediately
+below but here is an important set up point:</p>
+<pre>
+ Make sure to include a line like the following:</pre>
+<pre>
+ deny||CVSROOT/commitinfo CVSROOT/cvsacl
+ allow|cvsadmin|CVSROOT/commitinfo CVSROOT/cvsacl</pre>
+<pre>
+ that restricts access to commitinfo and cvsacl since this would be one of
+ the easiest &quot;end runs&quot; around this ACL approach. ('commitinfo' has the
+ line that executes the cvs_acls script and, of course, all the
+ restrictions are in 'cvsacl'.)</pre>
+<p>5. (Optional) Create a 'restrict_msg' file in the $CVSROOT/CVSROOT directory.
+ Whenever there is a restricted file or dir message, cvs_acls will look
+ for this file and, if it exists, print its contents as part of the
+ commit-denial message. This gives you a chance to print any site-specific
+ information (e.g., who to call, what procedures to look up,...) whenever
+ a commit is denied.</p>
+<p>
+</p>
+<hr />
+<h1><a name="format_of_the_cvsacl_file">Format of the cvsacl file</a></h1>
+<p>The 'cvsacl' file determines whether you may commit files. It contains lines
+read from top to bottom, keeping track of whether a given user, repository
+and branch combination is ``allowed'' or ``denied.'' The script will assume
+``allowed'' on all repository paths until 'allow' and 'deny' rules change
+that default.</p>
+<p>The normal pattern is to specify an 'deny' rule to turn off
+access to ALL users, then follow it with a matching 'allow' rule that will
+turn on access for a select set of users. In the case of multiple rules for
+the same user, repository and branch, the last one takes precedence.</p>
+<p>Blank lines and lines with only comments are ignored. Any other lines not
+beginning with ``allow'' or ``deny'' are logged to the restrict_log file.</p>
+<p>Lines beginning with ``allow'' or ``deny'' are assumed to be '|'-separated
+triples: (All spaces and tabs are ignored in a line.)</p>
+<pre>
+ {allow.*,deny.*} [|user,user,... [|repos,repos,... [|branch,branch,...]]]</pre>
+<pre>
+ 1. String starting with &quot;allow&quot; or &quot;deny&quot;.
+ 2. Optional, comma-separated list of usernames.
+ 3. Optional, comma-separated list of repository pathnames.
+ These are pathnames relative to $CVSROOT. They can be directories or
+ filenames. A directory name allows or restricts access to all files and
+ directories below it. One line can have either directories or filenames
+ but not both.
+ 4. Optional, comma-separated list of branch tags.
+ If not specified, all branches are assumed. Use HEAD to reference the
+ main branch.</pre>
+<p>Example: (Note: No in-line comments.)</p>
+<pre>
+ # ----- Make whole repository unavailable.
+ deny</pre>
+<pre>
+ # ----- Except for user &quot;dgg&quot;.
+ allow|dgg</pre>
+<pre>
+ # ----- Except when &quot;fred&quot; or &quot;john&quot; commit to the
+ # module whose repository is &quot;bin/ls&quot;
+ allow|fred, john|bin/ls</pre>
+<pre>
+ # ----- Except when &quot;ed&quot; commits to the &quot;stable&quot;
+ # branch of the &quot;bin/ls&quot; repository
+ allow|ed|/bin/ls|stable</pre>
+<p>
+</p>
+<hr />
+<h1><a name="program_logic">Program Logic</a></h1>
+<p>CVS passes to @ARGV an absolute directory pathname (the repository
+appended to your $CVSROOT variable), followed by a list of filenames
+within that directory that are to be committed.</p>
+<p>The script walks through the 'cvsacl' file looking for matches on
+the username, repository and branch.</p>
+<p>A username match is simply the user's name appearing in the second
+column of the cvsacl line in a space-or-comma separate list. If
+blank, then any user will match.</p>
+<p>A repository match:</p>
+<ul>
+<li><strong><a name="item_each_entry_in_the_modules_section_of_the_current__">Each entry in the modules section of the current 'cvsacl' line is
+examined to see if it is a dir or a file. The line must have
+either files or dirs, but not both. (To simplify the logic.)</a></strong><br />
+</li>
+<li><strong><a name="item_if_neither_2c_then_assume_the__27cvsacl_27_file_wa">If neither, then assume the 'cvsacl' file was set up in error and
+skip that 'allow' line.</a></strong><br />
+</li>
+<li><strong><a name="item_if_a_dir_2c_then_each_dir_pattern_is_matched_separ">If a dir, then each dir pattern is matched separately against the
+beginning of each of the committed files in @ARGV.</a></strong><br />
+</li>
+<li><strong><a name="item_if_a_file_2c_then_each_file_pattern_is_matched_exa">If a file, then each file pattern is matched exactly against each
+of the files to be committed in @ARGV.</a></strong><br />
+</li>
+<li><strong><a name="item_repository_and_branch_must_both_match_together_2e_">Repository and branch must BOTH match together. This is to cover
+the use case where a user has multiple branches checked out in
+a single work directory. Commit files can be from different
+branches.</a></strong><br />
+</li>
+A branch match is either:
+<ul>
+<li><strong><a name="item_when_no_branches_are_listed_in_the_fourth_column_2">When no branches are listed in the fourth column. (``Match any.'')</a></strong><br />
+</li>
+<li><strong><a name="item_all_elements_from_the_fourth_column_are_matched_ag">All elements from the fourth column are matched against each of
+the tag names for $ARGV[1..$#ARGV] found in the %branches file.</a></strong><br />
+</li>
+</ul>
+<li><strong><a name="item__27allow_27_match_remove_that_match_from_the_tally">'allow' match remove that match from the tally map.</a></strong><br />
+</li>
+<li><strong><a name="item_restricted">Restricted ('deny') matches are saved in the %repository_matches
+table.</a></strong><br />
+</li>
+<li><strong><a name="item_if_there_is_a_match_on_user_2c_repository_and_bran">If there is a match on user, repository and branch:</a></strong><br />
+</li>
+<pre>
+ If repository, branch and user match
+ if 'deny'
+ add %repository_matches entries to %restricted_entries
+ else if 'allow'
+ remove %repository_matches entries from %restricted_entries</pre>
+<li><strong><a name="item_at_the_end_of_all_the__27cvsacl_27_line_checks_2c_">At the end of all the 'cvsacl' line checks, check to see if there
+are any entries in the %restricted_entries. If so, then deny the
+commit.</a></strong><br />
+</li>
+</ul>
+<p>
+</p>
+<h2><a name="pseudocode">Pseudocode</a></h2>
+<pre>
+ read CVS/Entries file and create branch{file}-&gt;{branch} hash table
+ + for each 'allow' and 'deny' line in the 'cvsacl' file:
+ | user match?
+ | - Yes: set $user_match = 1;
+ | repository and branch match?
+ | - Yes: add to %repository_matches;
+ | did user, repository match?
+ | - Yes: if 'deny' then
+ | add %repository_matches -&gt; %restricted_entries
+ | if 'allow' then
+ | remove %repository_matches &lt;- %restricted_entries
+ + end for loop
+ any saved restrictions?
+ no: exit,
+ set exit code allowing commits and exit
+ yes: report restrictions,
+ set exit code prohibiting commits and exit</pre>
+<p>
+</p>
+<h2><a name="sanity_check">Sanity Check</a></h2>
+<pre>
+ 1) file allow trumps a dir deny
+ deny||java/lib
+ allow||java/lib/README
+ 2) dir allow can undo a file deny
+ deny||java/lib/README
+ allow||java/lib
+ 3) file deny trumps a dir allow
+ allow||java/lib
+ deny||java/lib/README
+ 4) dir deny trumps a file allow
+ allow||java/lib/README
+ deny||java/lib
+ ... so last match always takes precedence</pre>
+
+</body>
+
+</html>
diff --git a/gnu/dist/cvs/contrib/cvs_acls.in b/gnu/dist/cvs/contrib/cvs_acls.in
index 990f2076c71..68efd73a5fa 100755
--- a/gnu/dist/cvs/contrib/cvs_acls.in
+++ b/gnu/dist/cvs/contrib/cvs_acls.in
@@ -1,193 +1,951 @@
-#! @PERL@
+#! @PERL@ -T
# -*-Perl-*-
+
+###############################################################################
+###############################################################################
+###############################################################################
#
-# Access control lists for CVS. dgg@ksr.com (David G. Grubbs)
-# Branch specific controls added by voisine@bytemobile.com (Aaron Voisine)
-#
-# CVS "commitinfo" for matching repository names, running the program it finds
-# on the same line. More information is available in the CVS man pages.
-#
-# ==== INSTALLATION:
-#
-# To use this program as I intended, do the following four things:
-#
-# 0. Install PERL. :-)
-#
-# 1. Put one line, as the *only* non-comment line, in your commitinfo file:
-#
-# DEFAULT /usr/local/bin/cvs_acls
-#
-# 2. Install this file as /usr/local/bin/cvs_acls and make it executable.
-#
-# 3. Create a file named CVSROOT/avail and optionally add it to
-# CVSROOT/checkoutlist and check it in. See the CVS manual's
-# administrative files section about checkoutlist. Typically:
-#
-# $ cvs checkout CVSROOT
-# $ cd CVSROOT
-# [ create the avail file ]
-# [ add avail to checkoutlist ]
-# $ cvs add avail
-# $ cvs commit -m 'Added avail for use with cvs_acls.' avail checkoutlist
-#
-# ==== FORMAT OF THE avail FILE:
-#
-# The avail file determines whether you may commit files. It contains lines
-# read from top to bottom, keeping track of a single "bit". The "bit"
-# defaults to "on". It can be turned "off" by "unavail" lines and "on" by
-# "avail" lines. ==> Last one counts.
-#
-# Any line not beginning with "avail" or "unavail" is ignored.
-#
-# Lines beginning with "avail" or "unavail" are assumed to be '|'-separated
-# triples: (All spaces and tabs are ignored in a line.)
-#
-# {avail.*,unavail.*} [|user,user,... [|repos,repos,... [|branch,branch,...]]]
-#
-# 1. String starting with "avail" or "unavail".
-# 2. Optional, comma-separated list of usernames.
-# 3. Optional, comma-separated list of repository pathnames.
-# These are pathnames relative to $CVSROOT. They can be directories or
-# filenames. A directory name allows access to all files and
-# directories below it.
-# 4. Optional, comma-separated list of branch tags.
-# If not specified, all branches are assumed. Use HEAD to reference the
-# main branch.
-#
-# Example: (Text from the ';;' rightward may not appear in the file.)
-#
-# unavail ;; Make whole repository unavailable.
-# avail|dgg ;; Except for user "dgg".
-# avail|fred, john|bin/ls ;; Except when "fred" or "john" commit to
-# ;; the module whose repository is "bin/ls"
-# avail|ed|/bin/ls|stable ;; Except when "ed" commits to the "stable"
-# ;; branch of the "bin/ls" repository
-#
-# PROGRAM LOGIC:
-#
-# CVS passes to @ARGV an absolute directory pathname (the repository
-# appended to your $CVSROOT variable), followed by a list of filenames
-# within that directory.
-#
-# We walk through the avail file looking for a line that matches the
-# username, repository and branch.
-#
-# A username match is simply the user's name appearing in the second
-# column of the avail line in a space-or-comma separate list.
-#
-# A repository match is either:
-# - One element of the third column matches $ARGV[0], or some
-# parent directory of $ARGV[0].
-# - Otherwise *all* file arguments ($ARGV[1..$#ARGV]) must be
-# in the file list in one avail line.
-# - In other words, using directory names in the third column of
-# the avail file allows committing of any file (or group of
-# files in a single commit) in the tree below that directory.
-# - If individual file names are used in the third column of
-# the avail file, then files must be committed individually or
-# all files specified in a single commit must all appear in
-# third column of a single avail line.
+# THIS SCRIPT IS PROBABLY BROKEN. REMOVING THE -T SWITCH ON THE #! LINE ABOVE
+# WOULD FIX IT, BUT THIS IS INSECURE. WE RECOMMEND FIXING THE ERRORS WHICH THE
+# -T SWITCH WILL CAUSE PERL TO REPORT BEFORE RUNNING THIS SCRIPT FROM A CVS
+# SERVER TRIGGER. PLEASE SEND PATCHES CONTAINING THE CHANGES YOU FIND
+# NECESSARY TO RUN THIS SCRIPT WITH THE TAINT-CHECKING ENABLED BACK TO THE
+# <bug-cvs@gnu.org> MAILING LIST.
#
-# A branch match is either:
-# - When no branches are listed in the fourth column.
-# - One element from the fourth column matches each of the tag
-# names for $ARGV[1..$#ARGV] found in the CVS/Entries file.
-# - HEAD specified in the fourth column will match if there
-# is no tag listed in the CVS/Entries file.
+# For more on general Perl security and taint-checking, please try running the
+# `perldoc perlsec' command.
#
+###############################################################################
+###############################################################################
+###############################################################################
+
+=head1 Name
+
+cvs_acls - Access Control List for CVS
+
+=head1 Synopsis
+
+In 'commitinfo':
+
+ repository/path/to/restrict $CVSROOT/CVSROOT/cvs_acls [-d][-u $USER][-f <logfile>]
+
+where:
+
+ -d turns on debug information
+ -u passes the client-side userId to the cvs_acls script
+ -f specifies an alternate filename for the restrict_log file
+
+In 'cvsacl':
+
+ {allow.*,deny.*} [|user,user,... [|repos,repos,... [|branch,branch,...]]]
+
+where:
+
+ allow|deny - allow: commits are allowed; deny: prohibited
+ user - userId to be allowed or restricted
+ repos - file or directory to be allowed or restricted
+ branch - branch to be allowed or restricted
+
+See below for examples.
+
+=head1 Licensing
+
+cvs_acls - provides access control list functionality for CVS
+
+Copyright (c) 2004 by Peter Connolly <peter.connolly@cnet.com>
+All rights reserved.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+=head1 Description
+
+This script--cvs_acls--is invoked once for each directory within a
+"cvs commit". The set of files being committed for that directory as
+well as the directory itself, are passed to this script. This script
+checks its 'cvsacl' file to see if any of the files being committed
+are on the 'cvsacl' file's restricted list. If any of the files are
+restricted, then the cvs_acls script passes back an exit code of 1
+which disallows the commits for that directory.
+
+Messages are returned to the committer indicating the file(s) that
+he/she are not allowed to committ. Additionally, a site-specific
+set of messages (e.g., contact information) can be included in these
+messages.
+
+When a commit is prohibited, log messages are written to a restrict_log
+file in $CVSROOT/CVSROOT. This default file can be redirected to
+another destination.
+
+The script is triggered from the 'commitinfo' file in $CVSROOT/CVSROOT/.
+
+=head1 Enhancements
+
+This section lists the bug fixes and enhancements added to cvs_acls
+that make up the current cvs_acls.
+
+=head2 Fixed Bugs
+
+This version attempts to get rid the following bugs from the
+original version of cvs_acls:
+
+=over 2
+
+=item *
+Multiple entries on an 'cvsacl' line will be matched individually,
+instead of requiring that all commit files *exactly* match all
+'cvsacl' entries. Commiting a file not in the 'cvsacl' list would
+allow *all* files (including a restricted file) to be committed.
+
+[IMO, this basically made the original script unuseable for our
+situation since any arbitrary combination of committed files could
+avoid matching the 'cvsacl's entries.]
+
+=item *
+Handle specific filename restrictions. cvs_acls didn't restrict
+individual files specified in 'cvsacl'.
+
+=item *
+Correctly handle multiple, specific filename restrictions
+
+=item *
+Prohibit mix of dirs and files on a single 'cvsacl' line
+[To simplify the logic and because this would be normal usage.]
+
+=item *
+Correctly handle a mixture of branch restrictions within one work
+directory
+
+=item *
+$CVSROOT existence is checked too late
+
+=item *
+Correctly handle the CVSROOT=:local:/... option (useful for
+interactive testing)
+
+=item *
+Replacing shoddy "$universal_off" logic
+(Thanks to Karl-Konig Konigsson for pointing this out.)
+
+=back
+
+=head2 Enhancements
+
+=over 2
+
+=item *
+Checks modules in the 'cvsacl' file for valid files and directories
+
+=item *
+Accurately report restricted entries and their matching patterns
+
+=item *
+Simplified and commented overly complex PERL REGEXPs for readability
+and maintainability
+
+=item *
+Skip the rest of processing if a mismatch on portion of the 'cvsacl' line
+
+=item *
+Get rid of opaque "karma" messages in favor of user-friendly messages
+that describe which user, file(s) and branch(es) were disallowed.
+
+=item *
+Add optional 'restrict_msg' file for additional, site-specific
+restriction messages.
+
+=item *
+Take a "-u" parameter for $USER from commit_prep so that the script
+can do restrictions based on the client-side userId rather than the
+server-side userId (usually 'cvs').
+
+(See discussion below on "Admin Setup" for more on this point.)
+
+=item *
+Added a lot more debug trace
+
+=item *
+Tested these restrictions with concurrent use of pserver and SSH
+access to model our transition from pserver to ext access.
+
+=item *
+Added logging of restricted commit attempts.
+Restricted commits can be sent to a default file:
+$CVSROOT/CVSROOT/restrictlog or to one passed to the script
+via the -f command parameter.
+
+=back
+
+=head2 ToDoS
+
+=over 2
+
+=item *
+Need to deal with pserver/SSH transition with conflicting umasks?
+
+=item *
+Use a CPAN module to handle command parameters.
+
+=item *
+Use a CPAN module to clone data structures.
+
+=back
+
+=head1 Version Information
+
+This is not offered as a fix to the original 'cvs_acls' script since it
+differs substantially in goals and methods from the original and there
+are probably a significant number of people out there that still require
+the original version's functionality.
+
+The 'cvsacl' file flags of 'allow' and 'deny' were intentionally
+changed to 'allow' and 'deny' because there are enough differences
+between the original script's behavior and this one's that we wanted to
+make sure that users will rethink their 'cvsacl' file formats before
+plugging in this newer script.
+
+Please note that there has been very limited cross-platform testing of
+this script!!! (We did not have the time or resources to do exhaustive
+cross-platform testing.)
+
+It was developed and tested under Red Hat Linux 9.0 using PERL 5.8.0.
+Additionally, it was built and tested under Red Hat Linux 7.3 using
+PERL 5.6.1.
+
+$Id: cvs_acls.in,v 1.1.1.3 2005/04/20 01:42:03 christos Exp $
+
+This version is based on the 1.11.13 version of cvs_acls
+peter.connolly@cnet.com (Peter Connolly)
+
+ Access control lists for CVS. dgg@ksr.com (David G. Grubbs)
+ Branch specific controls added by voisine@bytemobile.com (Aaron Voisine)
+
+=head1 Installation
+
+To use this program, do the following four things:
+
+0. Install PERL, version 5.6.1 or 5.8.0.
+
+1. Admin Setup:
+
+ There are two choices here.
+
+ a) The first option is to use the $ENV{"USER"}, server-side userId
+ (from the third column of your pserver 'passwd' file) as the basis for
+ your restrictions. In this case, you will (at a minimum) want to set
+ up a new "cvsadmin" userId and group on the pserver machine.
+ CVS administrators will then set up their 'passwd' file entries to
+ run either as "cvs" (for regular users) or as "cvsadmin" (for power
+ users). Correspondingly, your 'cvsacl' file will only list 'cvs'
+ and 'cvsadmin' as the userIds in the second column.
+
+ Commentary: A potential weakness of this is that the xinetd
+ cvspserver process will need to run as 'root' in order to switch
+ between the 'cvs' and the 'cvsadmin' userIds. Some sysadmins don't
+ like situations like this and may want to chroot the process.
+ Talk to them about this point...
+
+ b) The second option is to use the client-side userId as the basis for
+ your restrictions. In this case, all the xinetd cvspserver processes
+ can run as userId 'cvs' and no 'root' userId is required. If you have
+ a 'passwd' file that lists 'cvs' as the effective run-time userId for
+ all your users, then no changes to this file are needed. Your 'cvsacl'
+ file will use the individual, client-side userIds in its 2nd column.
+
+ As long as the userIds in pserver's 'passwd' file match those userIds
+ that your Linux server know about, this approach is ideal if you are
+ planning to move from pserver to SSH access at some later point in time.
+ Just by switching the CVSROOT var from CVSROOT=:pserver:<userId>... to
+ CVSROOT=:ext:<userId>..., users can switch over to SSH access without
+ any other administrative changes. When all users have switched over to
+ SSH, the inherently insecure xinetd cvspserver process can be disabled.
+ [https://www.cvshome.org/docs/manual/cvs-1.11.17/cvs_2.html#SEC32]
+
+ :TODO: The only potential glitch with the SSH approach is the possibility
+ that each user can have differing umasks that might interfere with one
+ another, especially during a transition from pserver to SSH. As noted
+ in the ToDo section, this needs a good strategy and set of tests for that
+ yet...
+
+2. Put two lines, as the *only* non-comment lines, in your commitinfo file:
+
+ ALL $CVSROOT/CVSROOT/commit_prep
+ ALL $CVSROOT/CVSROOT/cvs_acls [-d][-u $USER ][-f <logfilename>]
+
+ where "-d" turns on debug trace
+ "-u $USER" passes the client-side userId to cvs_acls
+ "-f <logfilename"> overrides the default filename used to log
+ restricted commit attempts.
+
+ (These are handled in the processArgs() subroutine.)
+
+If you are using client-side userIds to restrict access to your
+repository, make sure that they are in this order since the commit_prep
+script is required in order to pass the $USER parameter.
+
+A final note about the repository matching pattern. The example above
+uses "ALL" but note that this means that the cvs_acls script will run
+for each and every commit in your repository. Obviously, in a large
+repository this adds up to a lot of overhead that may not be necesary.
+A better strategy is to use a repository pattern that is more specific
+to the areas that you wish to secure.
+
+3. Install this file as $CVSROOT/CVSROOT/cvs_acls and make it executable.
+
+4. Create a file named CVSROOT/cvsacl and optionally add it to
+ CVSROOT/checkoutlist and check it in. See the CVS manual's
+ administrative files section about checkoutlist. Typically:
+
+ $ cvs checkout CVSROOT
+ $ cd CVSROOT
+ [ create the cvsacl file, include 'commitinfo' line ]
+ [ add cvsacl to checkoutlist ]
+ $ cvs add cvsacl
+ $ cvs commit -m 'Added cvsacl for use with cvs_acls.' cvsacl checkoutlist
+
+Note: The format of the 'cvsacl' file is described in detail immediately
+below but here is an important set up point:
+
+ Make sure to include a line like the following:
+
+ deny||CVSROOT/commitinfo CVSROOT/cvsacl
+ allow|cvsadmin|CVSROOT/commitinfo CVSROOT/cvsacl
+
+ that restricts access to commitinfo and cvsacl since this would be one of
+ the easiest "end runs" around this ACL approach. ('commitinfo' has the
+ line that executes the cvs_acls script and, of course, all the
+ restrictions are in 'cvsacl'.)
+
+5. (Optional) Create a 'restrict_msg' file in the $CVSROOT/CVSROOT directory.
+ Whenever there is a restricted file or dir message, cvs_acls will look
+ for this file and, if it exists, print its contents as part of the
+ commit-denial message. This gives you a chance to print any site-specific
+ information (e.g., who to call, what procedures to look up,...) whenever
+ a commit is denied.
+
+=head1 Format of the cvsacl file
+
+The 'cvsacl' file determines whether you may commit files. It contains lines
+read from top to bottom, keeping track of whether a given user, repository
+and branch combination is "allowed" or "denied." The script will assume
+"allowed" on all repository paths until 'allow' and 'deny' rules change
+that default.
+
+The normal pattern is to specify an 'deny' rule to turn off
+access to ALL users, then follow it with a matching 'allow' rule that will
+turn on access for a select set of users. In the case of multiple rules for
+the same user, repository and branch, the last one takes precedence.
+
+Blank lines and lines with only comments are ignored. Any other lines not
+beginning with "allow" or "deny" are logged to the restrict_log file.
+
+Lines beginning with "allow" or "deny" are assumed to be '|'-separated
+triples: (All spaces and tabs are ignored in a line.)
+
+ {allow.*,deny.*} [|user,user,... [|repos,repos,... [|branch,branch,...]]]
+
+ 1. String starting with "allow" or "deny".
+ 2. Optional, comma-separated list of usernames.
+ 3. Optional, comma-separated list of repository pathnames.
+ These are pathnames relative to $CVSROOT. They can be directories or
+ filenames. A directory name allows or restricts access to all files and
+ directories below it. One line can have either directories or filenames
+ but not both.
+ 4. Optional, comma-separated list of branch tags.
+ If not specified, all branches are assumed. Use HEAD to reference the
+ main branch.
+
+Example: (Note: No in-line comments.)
+
+ # ----- Make whole repository unavailable.
+ deny
-$debug = 0;
+ # ----- Except for user "dgg".
+ allow|dgg
+
+ # ----- Except when "fred" or "john" commit to the
+ # module whose repository is "bin/ls"
+ allow|fred, john|bin/ls
+
+ # ----- Except when "ed" commits to the "stable"
+ # branch of the "bin/ls" repository
+ allow|ed|/bin/ls|stable
+
+=head1 Program Logic
+
+CVS passes to @ARGV an absolute directory pathname (the repository
+appended to your $CVSROOT variable), followed by a list of filenames
+within that directory that are to be committed.
+
+The script walks through the 'cvsacl' file looking for matches on
+the username, repository and branch.
+
+A username match is simply the user's name appearing in the second
+column of the cvsacl line in a space-or-comma separate list. If
+blank, then any user will match.
+
+A repository match:
+
+=over 2
+
+=item *
+Each entry in the modules section of the current 'cvsacl' line is
+examined to see if it is a dir or a file. The line must have
+either files or dirs, but not both. (To simplify the logic.)
+
+=item *
+If neither, then assume the 'cvsacl' file was set up in error and
+skip that 'allow' line.
+
+=item *
+If a dir, then each dir pattern is matched separately against the
+beginning of each of the committed files in @ARGV.
+
+=item *
+If a file, then each file pattern is matched exactly against each
+of the files to be committed in @ARGV.
+
+=item *
+Repository and branch must BOTH match together. This is to cover
+the use case where a user has multiple branches checked out in
+a single work directory. Commit files can be from different
+branches.
+
+A branch match is either:
+
+=over 4
+
+=item *
+When no branches are listed in the fourth column. ("Match any.")
+
+=item *
+All elements from the fourth column are matched against each of
+the tag names for $ARGV[1..$#ARGV] found in the %branches file.
+
+=back
+
+=item *
+'allow' match remove that match from the tally map.
+
+=item *
+Restricted ('deny') matches are saved in the %repository_matches
+table.
+
+=item *
+If there is a match on user, repository and branch:
+
+ If repository, branch and user match
+ if 'deny'
+ add %repository_matches entries to %restricted_entries
+ else if 'allow'
+ remove %repository_matches entries from %restricted_entries
+
+=item *
+At the end of all the 'cvsacl' line checks, check to see if there
+are any entries in the %restricted_entries. If so, then deny the
+commit.
+
+=back
+
+=head2 Pseudocode
+
+ read CVS/Entries file and create branch{file}->{branch} hash table
+ + for each 'allow' and 'deny' line in the 'cvsacl' file:
+ | user match?
+ | - Yes: set $user_match = 1;
+ | repository and branch match?
+ | - Yes: add to %repository_matches;
+ | did user, repository match?
+ | - Yes: if 'deny' then
+ | add %repository_matches -> %restricted_entries
+ | if 'allow' then
+ | remove %repository_matches <- %restricted_entries
+ + end for loop
+ any saved restrictions?
+ no: exit,
+ set exit code allowing commits and exit
+ yes: report restrictions,
+ set exit code prohibiting commits and exit
+
+=head2 Sanity Check
+
+ 1) file allow trumps a dir deny
+ deny||java/lib
+ allow||java/lib/README
+ 2) dir allow can undo a file deny
+ deny||java/lib/README
+ allow||java/lib
+ 3) file deny trumps a dir allow
+ allow||java/lib
+ deny||java/lib/README
+ 4) dir deny trumps a file allow
+ allow||java/lib/README
+ deny||java/lib
+ ... so last match always takes precedence
+
+=cut
+
+$debug = 0; # Set to 1 for debug messages
+
+%repository_matches = (); # hash of match file and pattern from 'cvsacl'
+ # repository_matches --> [branch, matching-pattern]
+ # (Used during module/branch matching loop)
+
+%restricted_entries = (); # hash table of restricted commit files (from @ARGV)
+ # restricted_entries --> branch
+ # (If user/module/branch all match on an 'deny'
+ # line, then entries added to this map.)
+
+%branch; # hash table of key: commit file; value: branch
+ # Built from ".../CVS/Entries" file of directory
+ # currently being examined
+
+# ---------------------------------------------------------------- get CVSROOT
$cvsroot = $ENV{'CVSROOT'};
-$availfile = $cvsroot . "/CVSROOT/avail";
-$entries = "CVS/Entries";
-$myname = $ENV{"USER"} if !($myname = $ENV{"LOGNAME"});
+die "Must set CVSROOT\n" if !$cvsroot;
+if ($cvsroot =~ /:([\/\w]*)$/) { # Filter ":pserver:", ":local:"-type prefixes
+ $cvsroot = $1;
+}
+
+# ------------------------------------------------------------- set file paths
+$entries = "CVS/Entries"; # client-side file???
+$cvsaclfile = $cvsroot . "/CVSROOT/cvsacl";
+$restrictfile = $cvsroot . "/CVSROOT/restrict_msg";
+$restrictlog = $cvsroot . "/CVSROOT/restrict_log";
+
+# --------------------------------------------------------------- process args
+$user_name = processArgs(\@ARGV);
+print("$$ \@ARGV after processArgs is: @ARGV.\n") if $debug;
+print("$$ ========== Begin $PROGRAM_NAME for \"$ARGV[0]\" repository. ========== \n") if $debug;
+
+# --------------------------------------------------------------- filter @ARGV
eval "print STDERR \$die='Unknown parameter $1\n' if !defined \$$1; \$$1=\$';"
while ($ARGV[0] =~ /^(\w+)=/ && shift(@ARGV));
-exit 255 if $die; # process any variable=value switches
+exit 255 if $die; # process any variable=value switches
-die "Must set CVSROOT\n" if !$cvsroot;
-($repos = shift) =~ s:^$cvsroot/::;
-grep($_ = $repos . '/' . $_, @ARGV);
+print("$$ \@ARGV after shift processing contains:",join("\, ",@ARGV),".\n") if $debug;
-print "$$ Repos: $repos\n","$$ ==== ",join("\n$$ ==== ",@ARGV),"\n" if $debug;
+# ---------------------------------------------------------------- get cvsroot
+($repository = shift) =~ s:^$cvsroot/::;
+grep($_ = $repository . '/' . $_, @ARGV);
-$exit_val = 0; # Good Exit value
+print("$$ \$cvsroot is: $cvsroot.\n") if $debug;
+print "$$ Repos: $repository\n","$$ ==== ",join("\n$$ ==== ",@ARGV),"\n" if $debug;
-$universal_off = 0;
+$exit_val = 0; # presume good exit value for commit
-my %branch;
-my $f;
+# ----------------------------------------------------------------------------
+# ---------------------------------- create hash table $branch{file -> branch}
+# ----------------------------------------------------------------------------
+
+# Here's a typical Entries file:
+#
+# /checkoutlist/1.4/Wed Feb 4 23:51:23 2004//
+# /cvsacl/1.3/Tue Feb 24 23:05:43 2004//
+# ...
+# /verifymsg/1.1/Fri Mar 16 19:56:24 2001//
+# D/backup////
+# D/temp////
open(ENTRIES, $entries) || die("Cannot open $entries.\n");
+print("$$ File / Branch\n") if $debug;
+my $i = 0;
while(<ENTRIES>) {
chop;
- next if /^\s*$/;
- if(m|^[^/]*/([^/]*)/(?:[^/]*/)*[^/]?([^/]*)$|) {
- $branch{$repos . '/' . $1} = ($2) ? $2 : "HEAD";
- print "$$ $1/$2\n" if $debug;
+ next if /^\s*$/; # Skip blank lines
+ $i = $i + 1;
+ if (m|
+ / # 1st slash
+ ([\w.-]*) # file name -> $1
+ / # 2nd slash
+ .* # revision number
+ / # 3rd slash
+ .* # date and time
+ / # 4th slash
+ .* # keyword
+ / # 5th slash
+ T? # 'T' constant
+ (\w*) # branch -> #2
+ |x) {
+ $branch{$repository . '/' . $1} = ($2) ? $2 : "HEAD";
+ print "$$ CVS Entry $i: $1/$2\n" if $debug;
}
}
close(ENTRIES);
-open (AVAIL, $availfile) || exit(0); # It is ok for avail file not to exist
-while (<AVAIL>) {
+# ----------------------------------------------------------------------------
+# ------------------------------------- evaluate each active line from 'cvsacl'
+# ----------------------------------------------------------------------------
+open (CVSACL, $cvsaclfile) || exit(0); # It is ok for cvsacl file not to exist
+while (<CVSACL>) {
chop;
- next if /^\s*\#/;
- next if /^\s*$/;
- ($flagstr, $u, $m, $b) = split(/[\s,]*\|[\s,]*/, $_);
-
- # Skip anything not starting with "avail" or "unavail" and complain.
- (print "Bad avail line: $_\n"), next
- if ($flagstr !~ /^avail/ && $flagstr !~ /^unavail/);
-
- # Set which bit we are playing with. ('0' is OK == Available).
- $flag = (($& eq "avail") ? 0 : 1);
-
- # If we find a "universal off" flag (i.e. a simple "unavail") remember it
- $universal_off = 1 if ($flag && !$u && !$m && !$b);
-
- # $myname considered "in user list" if actually in list or is NULL
- $in_user = (!$u || grep ($_ eq $myname, split(/[\s,]+/,$u)));
- print "$$ \$myname($myname) in user list: $_\n" if $debug && $in_user;
-
- # Module matches if it is a NULL module list in the avail line. If module
- # list is not null, we check every argument combination.
- if (!($in_repo = !$m)) {
- my @tmp = split(/[\s,]+/,$m);
- for $j (@tmp) {
- # If the repos from avail is a parent(or equal) dir of $repos, OK
- $in_repo = 1, last if ($repos eq $j || $repos =~ /^$j\//);
+ next if /^\s*\#/; # skip comments
+ next if /^\s*$/; # skip blank lines
+ # --------------------------------------------- parse current 'cvsacl' line
+ print("$$ ==========\n$$ Processing \'cvsacl\' line: $_.\n") if $debug;
+ ($cvsacl_flag, $cvsacl_userIds, $cvsacl_modules, $cvsacl_branches) = split(/[\s,]*\|[\s,]*/, $_);
+
+ # ------------------------------ Validate 'allow' or 'deny' line prefix
+ if ($cvsacl_flag !~ /^allow/ && $cvsacl_flag !~ /^deny/) {
+ print ("Bad cvsacl line: $_\n") if $debug;
+ $log_text = sprintf "Bad cvsacl line: %s", $_;
+ write_restrictlog_record($log_text);
+ next;
+ }
+
+ # -------------------------------------------------- init loop match flags
+ $user_match = 0;
+ %repository_matches = ();
+
+ # ------------------------------------------------------------------------
+ # ---------------------------------------------------------- user matching
+ # ------------------------------------------------------------------------
+ # $user_name considered "in user list" if actually in list or is NULL
+ $user_match = (!$cvsacl_userIds || grep ($_ eq $user_name, split(/[\s,]+/,$cvsacl_userIds)));
+ print "$$ \$user_name: $user_name \$user_match match flag is: $user_match.\n" if $debug;
+ if (!$user_match) {
+ next; # no match, skip to next 'cvsacl' line
+ }
+
+ # ------------------------------------------------------------------------
+ # ---------------------------------------------------- repository matching
+ # ------------------------------------------------------------------------
+ if (!$cvsacl_modules) { # blank module list = all modules
+ if (!$cvsacl_branches) { # blank branch list = all branches
+ print("$$ Adding all modules to \%repository_matches; null " .
+ "\$cvsacl_modules and \$cvsacl_branches.\n") if $debug;
+ for $commit_object (@ARGV) {
+ $repository_matches{$commit_object} = [$branch{$commit_object}, $cvsacl_modules];
+ print("$$ \$repository_matches{$commit_object} = " .
+ "[$branch{$commit_object}, $cvsacl_modules].\n") if $debug;
+ }
}
- if (!$in_repo) {
- $in_repo = 1;
- for $j (@ARGV) {
- last if !($in_repo = grep ($_ eq $j, @tmp));
+ else { # need to check for repository match
+ @branch_list = split (/[\s,]+/,$cvsacl_branches);
+ print("$$ Branches from \'cvsacl\' record: ", join(", ",@branch_list),".\n") if $debug;
+ for $commit_object (@ARGV) {
+ if (grep($branch{$commit_object}, @branch_list)) {
+ $repository_matches{$commit_object} = [$branch{$commit_object}, $cvsacl_modules];
+ print("$$ \$repository_matches{$commit_object} = " .
+ "[$branch{$commit_object}, $cvsacl_modules].\n") if $debug;
+ }
}
}
}
- print "$$ \$repos($repos) in repository list: $_\n" if $debug && $in_repo;
+ else {
+ # ----------------------------------- check every argument combination
+ # parse 'cvsacl' modules to array
+ my @module_list = split(/[\s,]+/,$cvsacl_modules);
+ # ------------- Check all modules in list for either file or directory
+ my $fileType = "";
+ if (($fileType = checkFileness(@module_list)) eq "") {
+ next; # skip bad file types
+ }
+ # ---------- Check each combination of 'cvsacl' modules vs. @ARGV files
+ print("$$ Checking matches for \@module_list: ", join("\, ",@module_list), ".\n") if $debug;
+ # loop thru all command-line commit objects
+ for $commit_object (@ARGV) {
+ # loop thru all modules on 'cvsacl' line
+ for $cvsacl_module (@module_list) {
+ print("$$ Is \'cvsacl\': $cvsacl_modules pattern in: \@ARGV " .
+ "\$commit_object: $commit_object?\n") if $debug;
+ # Do match of beginning of $commit_object
+ checkModuleMatch($fileType, $commit_object, $cvsacl_module);
+ } # end for commit objects
+ } # end for cvsacl modules
+ } # end if
- # Branch matches if it is in the branch list in the avail line, the branch
- # list is NULL, or there is no branch and HEAD is in the branch list.
- if(!($in_branch = !$b)) {
- @bls = split (/[\s,]+/,$b);
+ print("$$ Matches for: \%repository_matches: ", join("\, ", (keys %repository_matches)), ".\n") if $debug;
- for $j (@ARGV) {
- $f = $j;
- last if !($in_branch = grep($_ eq $branch{$j}, @bls));
+ # ------------------------------------------------------------------------
+ # ----------------------------------------------------- setting exit value
+ # ------------------------------------------------------------------------
+ if ($user_match && %repository_matches) {
+ print("$$ An \"$cvsacl_flag\" match on User(s): $cvsacl_userIds; Module(s):" .
+ " $cvsacl_modules; Branch(es): $cvsacl_branches.\n") if $debug;
+ if ($cvsacl_flag eq "deny") {
+ # Add all matches to the hash of restricted modules
+ foreach $commitFile (keys %repository_matches) {
+ print("$$ Adding \%repository_matches entry: $commitFile.\n") if $debug;
+ $restricted_entries{$commitFile} = $repository_matches{$commitFile}[0];
+ }
+ }
+ else {
+ # Remove all matches from the restricted modules hash
+ foreach $commitFile (keys %repository_matches) {
+ print("$$ Removing \%repository_matches entry: $commitFile.\n") if $debug;
+ delete $restricted_entries{$commitFile};
+ }
}
}
- print "$$ \$branch($branch{$f}) in branch list: $_\n"
- if $debug && $in_branch;
+ print "$$ ==== End of processing for \'cvsacl\' line: $_.\n" if $debug;
+}
+close(CVSACL);
- $exit_val = $flag if ($in_user && $in_repo && $in_branch);
- print "$$ ==== \$exit_val = $exit_val\n$$ ==== \$flag = $flag\n" if $debug;
+# ----------------------------------------------------------------------------
+# --------------------------------------- determine final 'commit' disposition
+# ----------------------------------------------------------------------------
+if (%restricted_entries) { # any restricted entries?
+ $exit_val = 1; # don't commit
+ print("**** Access denied: Insufficient authority for user: '$user_name\' " .
+ "to commit to \'$repository\'.\n**** Contact CVS Administrators if " .
+ "you require update access to these directories or files.\n");
+ print("**** file(s)/dir(s) restricted were:\n\t", join("\n\t",keys %restricted_entries), "\n");
+ printOptionalRestrictionMessage();
+ write_restrictlog();
+}
+elsif (!$exit_val && $debug) {
+ print "**** Access allowed: Sufficient authority for commit.\n";
}
-close(AVAIL);
+
print "$$ ==== \$exit_val = $exit_val\n" if $debug;
-print "**** Access denied: Insufficient Karma ($myname|$repos|$branch{$f})\n"
- if $exit_val;
-print "**** Access allowed: Personal Karma exceeds Environmental Karma.\n"
- if $universal_off && !$exit_val;
exit($exit_val);
+
+# ----------------------------------------------------------------------------
+# -------------------------------------------------------------- end of "main"
+# ----------------------------------------------------------------------------
+
+
+# ----------------------------------------------------------------------------
+# -------------------------------------------------------- process script args
+# ----------------------------------------------------------------------------
+sub processArgs {
+
+# This subroutine is passed a reference to @ARGV.
+
+# If @ARGV contains a "-u" entry, use that as the effective userId. In this
+# case, the userId is the client-side userId that has been passed to this
+# script by the commit_prep script. (This is why the commit_prep script must
+# be placed *before* the cvs_acls script in the commitinfo admin file.)
+
+# Otherwise, pull the userId from the server-side environment.
+
+ my $userId = "";
+ my ($argv) = shift; # pick up ref to @ARGV
+ my @argvClone = (); # immutable copy for foreach loop
+ for ($i=0; $i<(scalar @{$argv}); $i++) {
+ $argvClone[$i]=$argv->[$i];
+ }
+
+ print("$$ \@_ to processArgs is: @_.\n") if $debug;
+
+ # Parse command line arguments (file list is seen as one arg)
+ foreach $arg (@argvClone) {
+ print("$$ \$arg for processArgs loop is: $arg.\n") if $debug;
+ # Set $debug flag?
+ if ($arg eq '-d') {
+ shift @ARGV;
+ $debug = 1;
+ print("$$ \$debug flag set on.\n") if $debug;
+ print STDERR "Debug turned on...\n";
+ }
+ # Passing in a client-side userId?
+ elsif ($arg eq '-u') {
+ shift @ARGV;
+ $userId = shift @ARGV;
+ print("$$ client-side \$userId set to: $userId.\n") if $debug;
+ }
+ # An override for the default restrictlog file?
+ elsif ($arg eq '-f') {
+ shift @ARGV;
+ $restrictlog = shift @ARGV;
+ }
+ else {
+ next;
+ }
+ }
+
+ # No client-side userId passed? then get from server env
+ if (!$userId) {
+ $userId = $ENV{"USER"} if !($userId = $ENV{"LOGNAME"});
+ print("$$ server-side \$userId set to: $userId.\n") if $debug;
+ }
+
+ print("$$ processArgs returning \$userId: $userId.\n") if $debug;
+ return $userId;
+
+}
+
+
+# ----------------------------------------------------------------------------
+# --------------------- Check all modules in list for either file or directory
+# ----------------------------------------------------------------------------
+sub checkFileness {
+
+# Module patterns on the 'cvsacl' record can be files or directories.
+# If it's a directory, we pattern-match the directory name from 'cvsacl'
+# against the left side of the committed filename to see if the file is in
+# that hierarchy. By contrast, files use an explicit match. If the entries
+# are neither files nor directories, then the cvsacl file has been set up
+# incorrectly; we return a "" and the caller skips that line as invalid.
+#
+# This function determines whether the entries on the 'cvsacl' record are all
+# directories or all files; it cannot be a mixture. This restriction put in
+# to simplify the logic (without taking away much functionality).
+
+ my @module_list = @_;
+ print("$$ Checking \"fileness\" or \"dir-ness\" for \@module_list entries.\n") if $debug;
+ print("$$ Entries are: ", join("\, ",@module_list), ".\n") if $debug;
+ my $filetype = "";
+ for $cvsacl_module (@module_list) {
+ my $reposDirName = $cvsroot . '/' . $cvsacl_module;
+ my $reposFileName = $reposDirName . "\,v";
+ print("$$ In checkFileness: \$reposDirName: $reposDirName; \$reposFileName: $reposFileName.\n") if $debug;
+ if (((-d $reposDirName) && ($filetype eq "file")) || ((-f $reposFileName) && ($filetype eq "dir"))) {
+ print("Can\'t mix files and directories on single \'cvsacl\' file record; skipping entry.\n");
+ print(" Please contact a CVS administrator.\n");
+ $filetype = "";
+ last;
+ }
+ elsif (-d $reposDirName) {
+ $filetype = "dir";
+ print("$$ $reposDirName is a directory.\n") if $debug;
+ }
+ elsif (-f $reposFileName) {
+ $filetype = "file";
+ print("$$ $reposFileName is a regular file.\n") if $debug;
+ }
+ else {
+ print("***** Item to commit was neither a regular file nor a directory.\n");
+ print("***** Current \'cvsacl\' line ignored.\n");
+ print("***** Possible problem with \'cvsacl\' admin file. Please contact a CVS administrator.\n");
+ $filetype = "";
+ $text = sprintf("Module entry on cvsacl line: %s is not a valid file or directory.\n", $cvsacl_module);
+ write_restrictlog_record($text);
+ last;
+ } # end if
+ } # end for
+
+ print("$$ checkFileness will return \$filetype: $filetype.\n") if $debug;
+ return $filetype;
+}
+
+
+# ----------------------------------------------------------------------------
+# ----------------------------------------------------- check for module match
+# ----------------------------------------------------------------------------
+sub checkModuleMatch {
+
+# This subroutine checks for a match between the directory or file pattern
+# specified in the 'cvsacl' file (i.e., $cvsacl_modules) versus the commit file
+# objects passed into the script via @ARGV (i.e., $commit_object).
+
+# The directory pattern only has to match the beginning portion of the commit
+# file's name for a match since all files under that directory are considered
+# a match. File patterns must exactly match.
+
+# Since (theoretically, if not normally in practice) a working directory can
+# contain a mixture of files from different branches, this routine checks to
+# see if there is also a match on branch before considering the file
+# comparison a match.
+
+ my $match_flag = "";
+
+ print("$$ \@_ in checkModuleMatch is: @_.\n") if $debug;
+ my ($type,$commit_object,$cvsacl_module) = @_;
+
+ if ($type eq "file") { # Do exact file match of $commit_object
+ if ($commit_object eq $cvsacl_module) {
+ $match_flag = "file";
+ } # Do dir match at beginning of $commit_object
+ }
+ elsif ($commit_object =~ /^$cvsacl_module\//) {
+ $match_flag = "dir";
+ }
+
+ if ($match_flag) {
+ print("$$ \$repository: $repository matches \$commit_object: $commit_object.\n") if $debug;
+ if (!$cvsacl_branches) { # empty branch pattern matches all
+ print("$$ blank \'cvsacl\' branch matches all commit files.\n") if $debug;
+ $repository_matches{$commit_object} = [$branch{$commit_object}, $cvsacl_module];
+ print("$$ \$repository_matches{$commit_object} = [$branch{$commit_object}, $cvsacl_module].\n") if $debug;
+ }
+ else { # otherwise check branch hash table
+ @branch_list = split (/[\s,]+/,$cvsacl_branches);
+ print("$$ Branches from \'cvsacl\' record: ", join(", ",@branch_list),".\n") if $debug;
+ if (grep(/$branch{$commit_object}/, @branch_list)) {
+ $repository_matches{$commit_object} = [$branch{$commit_object}, $cvsacl_module];
+ print("$$ \$repository_matches{$commit_object} = [$branch{$commit_object}, " .
+ "$cvsacl_module].\n") if $debug;
+ }
+ }
+ }
+
+}
+
+# ----------------------------------------------------------------------------
+# ------------------------------------------------------- check for file match
+# ----------------------------------------------------------------------------
+sub printOptionalRestrictionMessage {
+
+# This subroutine optionally prints site-specific file restriction information
+# whenever a restriction condition is met. If the file 'restrict_msg' does
+# not exist, the routine immediately exits. If there is a 'restrict_msg' file
+# then all the contents are printed at the end of the standard restriction
+# message.
+
+# As seen from examining the definition of $restrictfile, the default filename
+# is: $CVSROOT/CVSROOT/restrict_msg.
+
+ open (RESTRICT, $restrictfile) || return; # It is ok for cvsacl file not to exist
+ while (<RESTRICT>) {
+ chop;
+ # print out each line
+ print("**** $_\n");
+ }
+
+}
+
+# ----------------------------------------------------------------------------
+# ---------------------------------------------------------- write log message
+# ----------------------------------------------------------------------------
+sub write_restrictlog {
+
+# This subroutine iterates through the list of restricted entries and logs
+# each one to the error logfile.
+
+ # write each line in @text out separately
+ foreach $commitfile (keys %restricted_entries) {
+ $log_text = sprintf "Commit attempt by: %s for: %s on branch: %s",
+ $user_name, $commitfile, $branch{$commitfile};
+ write_restrictlog_record($log_text);
+ }
+
+}
+
+# ----------------------------------------------------------------------------
+# ---------------------------------------------------------- write log message
+# ----------------------------------------------------------------------------
+sub write_restrictlog_record {
+
+# This subroutine receives a scalar string and writes it out to the
+# $restrictlog file as a separate line. Each line is prepended with the date
+# and time in the format: "2004/01/30 12:00:00 ".
+
+ $text = shift;
+
+ # return quietly if there is a problem opening the log file.
+ open(FILE, ">>$restrictlog") || return;
+
+ (@time) = localtime();
+
+ # write each line in @text out separately
+ $log_record = sprintf "%04d/%02d/%02d %02d:%02d:%02d %s.\n",
+ $time[5]+1900, $time[4]+1, $time[3], $time[2], $time[1], $time[0], $text;
+ print FILE $log_record;
+ print("$$ restrict_log record being written: $log_record to $restrictlog.\n") if $debug;
+
+ close(FILE);
+}
diff --git a/gnu/dist/cvs/contrib/log.in b/gnu/dist/cvs/contrib/log.in
index 87f40b55b5b..2e89f442440 100755
--- a/gnu/dist/cvs/contrib/log.in
+++ b/gnu/dist/cvs/contrib/log.in
@@ -1,6 +1,24 @@
-#! @PERL@
+#! @PERL@ -T
# -*-Perl-*-
+
+###############################################################################
+###############################################################################
+###############################################################################
+#
+# THIS SCRIPT IS PROBABLY BROKEN. REMOVING THE -T SWITCH ON THE #! LINE ABOVE
+# WOULD FIX IT, BUT THIS IS INSECURE. WE RECOMMEND FIXING THE ERRORS WHICH THE
+# -T SWITCH WILL CAUSE PERL TO REPORT BEFORE RUNNING THIS SCRIPT FROM A CVS
+# SERVER TRIGGER. PLEASE SEND PATCHES CONTAINING THE CHANGES YOU FIND
+# NECESSARY TO RUN THIS SCRIPT WITH THE TAINT-CHECKING ENABLED BACK TO THE
+# <bug-cvs@gnu.org> MAILING LIST.
#
+# For more on general Perl security and taint-checking, please try running the
+# `perldoc perlsec' command.
+#
+###############################################################################
+###############################################################################
+###############################################################################
+
# XXX: FIXME: handle multiple '-f logfile' arguments
#
# XXX -- I HATE Perl! This *will* be re-written in shell/awk/sed soon!
diff --git a/gnu/dist/cvs/contrib/mfpipe.in b/gnu/dist/cvs/contrib/mfpipe.in
index 1ecceb06901..47eec0e9a62 100755
--- a/gnu/dist/cvs/contrib/mfpipe.in
+++ b/gnu/dist/cvs/contrib/mfpipe.in
@@ -1,6 +1,24 @@
-#! @PERL@
+#! @PERL@ -T
# -*-Perl-*-
+
+###############################################################################
+###############################################################################
+###############################################################################
+#
+# THIS SCRIPT IS PROBABLY BROKEN. REMOVING THE -T SWITCH ON THE #! LINE ABOVE
+# WOULD FIX IT, BUT THIS IS INSECURE. WE RECOMMEND FIXING THE ERRORS WHICH THE
+# -T SWITCH WILL CAUSE PERL TO REPORT BEFORE RUNNING THIS SCRIPT FROM A CVS
+# SERVER TRIGGER. PLEASE SEND PATCHES CONTAINING THE CHANGES YOU FIND
+# NECESSARY TO RUN THIS SCRIPT WITH THE TAINT-CHECKING ENABLED BACK TO THE
+# <bug-cvs@gnu.org> MAILING LIST.
#
+# For more on general Perl security and taint-checking, please try running the
+# `perldoc perlsec' command.
+#
+###############################################################################
+###############################################################################
+###############################################################################
+
# From: clyne@niwot.scd.ucar.EDU (John Clyne)
# Date: Fri, 28 Feb 92 09:54:21 MST
#
diff --git a/gnu/dist/cvs/contrib/rcslock.in b/gnu/dist/cvs/contrib/rcslock.in
index e17356b9b1c..b517bd8f1d6 100755
--- a/gnu/dist/cvs/contrib/rcslock.in
+++ b/gnu/dist/cvs/contrib/rcslock.in
@@ -1,6 +1,24 @@
-#! @PERL@
+#! @PERL@ -T
# -*-Perl-*-
+###############################################################################
+###############################################################################
+###############################################################################
+#
+# THIS SCRIPT IS PROBABLY BROKEN. REMOVING THE -T SWITCH ON THE #! LINE ABOVE
+# WOULD FIX IT, BUT THIS IS INSECURE. WE RECOMMEND FIXING THE ERRORS WHICH THE
+# -T SWITCH WILL CAUSE PERL TO REPORT BEFORE RUNNING THIS SCRIPT FROM A CVS
+# SERVER TRIGGER. PLEASE SEND PATCHES CONTAINING THE CHANGES YOU FIND
+# NECESSARY TO RUN THIS SCRIPT WITH THE TAINT-CHECKING ENABLED BACK TO THE
+# <bug-cvs@gnu.org> MAILING LIST.
+#
+# For more on general Perl security and taint-checking, please try running the
+# `perldoc perlsec' command.
+#
+###############################################################################
+###############################################################################
+###############################################################################
+
# Author: John Rouillard (rouilj@cs.umb.edu)
# Supported: Yeah right. (Well what do you expect for 2 hours work?)
# Blame-to: rouilj@cs.umb.edu
diff --git a/gnu/dist/cvs/diff/libdiff.dep b/gnu/dist/cvs/diff/libdiff.dep
index cdcb6cd3ad0..ab46fd843ae 100644
--- a/gnu/dist/cvs/diff/libdiff.dep
+++ b/gnu/dist/cvs/diff/libdiff.dep
@@ -27,7 +27,6 @@
.\diff.c : \
- "..\lib\fnmatch.h"\
"..\lib\getopt.h"\
"..\lib\regex.h"\
"..\windows-NT\config.h"\
diff --git a/gnu/dist/cvs/doc/cvs.man.header b/gnu/dist/cvs/doc/cvs.man.header
index 839269ecdb8..cbc4f7d6de2 100644
--- a/gnu/dist/cvs/doc/cvs.man.header
+++ b/gnu/dist/cvs/doc/cvs.man.header
@@ -2,9 +2,9 @@
.\" cvs.man.header, cvs.texinfo, & cvs.man.footer files. Please make changes
.\" there. A full copyright & license notice may also be found in cvs.texinfo.
.\"
-.\" Copyright 2004 The Free Software Foundation,
-.\" Derek R. Price,
-.\" & Ximbiot <http://ximbiot.com>
+.\" Man page autogeneration, including this header file, is
+.\" Copyright 2004-2005 The Free Software Foundation, Inc.,
+.\" Derek R. Price, & Ximbiot <http://ximbiot.com>.
.\"
.\" This documentation is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
diff --git a/gnu/dist/cvs/doc/mkman.pl b/gnu/dist/cvs/doc/mkman.pl
new file mode 100644
index 00000000000..bec7583a0c5
--- /dev/null
+++ b/gnu/dist/cvs/doc/mkman.pl
@@ -0,0 +1,314 @@
+#! @PERL@
+#
+# Generate a man page from sections of a Texinfo manual.
+#
+# Copyright 2004 The Free Software Foundation,
+# Derek R. Price,
+# & Ximbiot <http://ximbiot.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+
+
+# Need Perl 5.005 or greater for re 'eval'.
+require 5.005;
+
+# The usual.
+use strict;
+use IO::File;
+
+
+
+###
+### GLOBALS
+###
+my $texi_num = 0; # Keep track of how many texinfo files have been encountered.
+my @parent; # This needs to be global to be used inside of a regex later.
+
+
+
+###
+### FUNCTIONS
+###
+sub keyword_mode
+{
+ my ($keyword, $file) = @_;
+
+ return "\\fR"
+ if $keyword =~ /^(|r|t)$/;
+ return "\\fB"
+ if $keyword =~ /^(strong|sc|code|file|samp)$/;
+ return "\\fI"
+ if $keyword =~ /^(emph|var|dfn)$/;
+ die "no handler for keyword \`$keyword', found at line $. of file \`$file'\n";
+}
+
+
+
+# Return replacement for \@$keyword{$content}.
+sub do_keyword
+{
+ my ($file, $parent, $keyword, $content) = @_;
+
+ return "see node \`$content\\(aq in the CVS manual"
+ if $keyword =~ /^(p?x)?ref$/;
+ return "\\fP\\fP$content"
+ if $keyword =~ /^splitrcskeyword$/;
+
+ my $endmode = keyword_mode $parent;
+ my $startmode = keyword_mode $keyword, $file;
+
+ return "$startmode$content$endmode";
+}
+
+
+
+###
+### MAIN
+###
+for my $file (@ARGV)
+{
+ my $fh = new IO::File "< $file"
+ or die "Failed to open file \`$file': $!";
+
+ if ($file !~ /\.(texinfo|texi|txi)$/)
+ {
+ print stderr "Passing \`$file' through unprocessed.\n";
+ # Just cat any file that doesn't look like a Texinfo source.
+ while (my $line = $fh->getline)
+ {
+ print $line;
+ }
+ next;
+ }
+
+ print stderr "Processing \`$file'.\n";
+ $texi_num++;
+ my $gotone = 0;
+ my $inblank = 0;
+ my $indent = 0;
+ my $inexample = 0;
+ my $inmenu = 0;
+ my $intable = 0;
+ my $last_header = "";
+ my @table_headers;
+ my @table_footers;
+ my $table_header = "";
+ my $table_footer = "";
+ my $last;
+ while ($_ = $fh->getline)
+ {
+ if (!$gotone && /^\@c ----- START MAN $texi_num -----$/)
+ {
+ $gotone = 1;
+ next;
+ }
+
+ # Skip ahead until our man section.
+ next unless $gotone;
+
+ # If we find the end tag we are done.
+ last if /^\@c ----- END MAN $texi_num -----$/;
+
+ # Need to do this everywhere. i.e., before we print example
+ # lines, since literal back slashes can appear there too.
+ s/\\/\\\\/g;
+ s/^\./\\&./;
+ s/([\s])\./$1\\&./;
+ s/'/\\(aq/g;
+ s/`/\\`/g;
+ s/(?<!-)---(?!-)/\\(em/g;
+ s/\@bullet({}|\b)/\\(bu/g;
+ s/\@dots({}|\b)/\\&.../g;
+
+ # Examples should be indented and otherwise untouched
+ if (/^\@example$/)
+ {
+ $indent += 2;
+ print qq{.SP\n.PD 0\n};
+ $inexample = 1;
+ next;
+ }
+ if ($inexample)
+ {
+ if (/^\@end example$/)
+ {
+ $indent -= 2;
+ print qq{\n.PD\n.IP "" $indent\n};
+ $inexample = 0;
+ next;
+ }
+ if (/^[ ]*$/)
+ {
+ print ".SP\n";
+ next;
+ }
+
+ # Preserve the newline.
+ $_ = qq{.IP "" $indent\n} . $_;
+ }
+
+ # Compress blank lines into a single line. This and its
+ # corresponding skip purposely bracket the @menu and comment
+ # removal so that blanks on either side of a menu are
+ # compressed after the menu is removed.
+ if (/^[ ]*$/)
+ {
+ $inblank = 1;
+ next;
+ }
+
+ # Not used
+ if (/^\@(ignore|menu)$/)
+ {
+ $inmenu++;
+ next;
+ }
+ # Delete menu contents.
+ if ($inmenu)
+ {
+ next unless /^\@end (ignore|menu)$/;
+ $inmenu--;
+ next;
+ }
+
+ # Remove comments
+ next if /^\@c(omment)?\b/;
+
+ # It's okay to ignore this keyword - we're not using any
+ # first-line indent commands at all.
+ next if s/^\@noindent\s*$//;
+
+ # @need is only significant in printed manuals.
+ next if s/^\@need\s+.*$//;
+
+ # If we didn't hit the previous check and $inblank is set, then
+ # we just finished with some number of blanks. Print the man
+ # page blank symbol before continuing processing of this line.
+ if ($inblank)
+ {
+ print ".SP\n";
+ $inblank = 0;
+ }
+
+ # Chapter headers.
+ $last_header = $1 if s/^\@node\s+(.*)$/.SH "$1"/;
+ if (/^\@appendix\w*\s+(.*)$/)
+ {
+ my $content = $1;
+ $content =~ s/^$last_header(\\\(em|\s+)?//;
+ next if $content =~ /^\s*$/;
+ s/^\@appendix\w*\s+.*$/.SS "$content"/;
+ }
+
+ # Tables are similar to examples, except we need to handle the
+ # keywords.
+ if (/^\@(itemize|table)(\s+(.*))?$/)
+ {
+ $indent += 2;
+ push @table_headers, $table_header;
+ push @table_footers, $table_footer;
+ my $content = $3;
+ if (/^\@itemize/)
+ {
+ my $bullet = $content;
+ $table_header = qq{.IP "$bullet" $indent\n};
+ $table_footer = "";
+ }
+ else
+ {
+ my $hi = $indent - 2;
+ $table_header = qq{.IP "" $hi\n};
+ $table_footer = qq{\n.IP "" $indent};
+ if ($content)
+ {
+ $table_header .= "$content\{";
+ $table_footer = "\}$table_footer";
+ }
+ }
+ $intable++;
+ next;
+ }
+
+ if ($intable)
+ {
+ if (/^\@end (itemize|table)$/)
+ {
+ $table_header = pop @table_headers;
+ $table_footer = pop @table_footers;
+ $indent -= 2;
+ $intable--;
+ next;
+ }
+ s/^\@itemx?(\s+(.*))?$/$table_header$2$table_footer/;
+ # Fall through so the rest of the table lines are
+ # processed normally.
+ }
+
+ # Index entries.
+ s/^\@cindex\s+(.*)$/.IX "$1"/;
+
+ $_ = "$last$_" if $last;
+ undef $last;
+
+ # Trap keywords
+ my $nk = qr/
+ \@(\w+)\{
+ (?{ push @parent, $1 }) # Keep track of the last keyword
+ # keyword we encountered.
+ ((?:
+ (?> (?:[^{}]|(?<=\@)[{}])*) # Non-braces without backtracking
+ |
+ (??{ $nk }) # Nested keywords
+ )*)
+ \}
+ (?{ pop (@parent) }) # Lose track of the current keyword.
+ /x;
+
+ @parent = ("");
+ while (s/$nk/do_keyword $file, $parent[$#parent], $1, $2/e)
+ {
+ # Do nothing except replace our last-replacement
+ # tracker - the replacement regex above is handling
+ # everything else.
+ @parent = ("");
+ }
+ s/$nk/do_keyword $file, $parent[$#parent], $1, $2/ge;
+
+ if (/\@\w+\{/)
+ {
+ # If there is still an opening keyword left, we need to
+ # find the close bracket. Set $last to append the next
+ # line in the next pass.
+ $last = $_;
+ next;
+ }
+
+ # Finally, unprotect texinfo special characters.
+ s/\@://g;
+ s/\@([{}])/$1/g;
+
+ # Verify we haven't left commands unprocessed.
+ die "Unprocessed command at line $. of file \`$file': "
+ . ($1 ? "$1\n" : "<EOL>\n")
+ if /^(?>(?:[^\@]|\@\@)*)\@(\w+|.|$)/;
+
+ # Unprotect @@.
+ s/\@\@/\@/g;
+
+ # And print whatever's left.
+ print $_;
+ }
+}
diff --git a/gnu/dist/cvs/lib/fncase.c b/gnu/dist/cvs/lib/fncase.c
index c8fb25f2180..28424281576 100644
--- a/gnu/dist/cvs/lib/fncase.c
+++ b/gnu/dist/cvs/lib/fncase.c
@@ -104,7 +104,7 @@ OSX_filename_classes[] =
0x40,0x61,0x62,0x63, 0x64,0x65,0x66,0x67,
0x68,0x69,0x6a,0x6b, 0x6c,0x6d,0x6e,0x6f,
0x70,0x71,0x72,0x73, 0x74,0x75,0x76,0x77,
- 0x78,0x79,0x7a,0x5b, 0x2f,0x5d,0x5e,0x5f,
+ 0x78,0x79,0x7a,0x5b, 0x5c,0x5d,0x5e,0x5f,
0x60,0x61,0x62,0x63, 0x64,0x65,0x66,0x67,
0x68,0x69,0x6a,0x6b, 0x6c,0x6d,0x6e,0x6f,
0x70,0x71,0x72,0x73, 0x74,0x75,0x76,0x77,
diff --git a/gnu/dist/cvs/lib/getdate b/gnu/dist/cvs/lib/getdate
new file mode 100755
index 00000000000..e0a138011eb
--- /dev/null
+++ b/gnu/dist/cvs/lib/getdate
Binary files differ
diff --git a/gnu/dist/cvs/lib/regex.c b/gnu/dist/cvs/lib/regex.c
index dd56bdbc606..e123284e39e 100644
--- a/gnu/dist/cvs/lib/regex.c
+++ b/gnu/dist/cvs/lib/regex.c
@@ -4001,7 +4001,7 @@ static boolean alt_match_null_string_p (),
/* Free everything we malloc. */
#ifdef MATCH_MAY_ALLOCATE
-#define FREE_VAR(var) if (var) { (void)REGEX_FREE ((void *)var); var = NULL; } else
+#define FREE_VAR(var) if (var) { REGEX_FREE (var); var = NULL; } else
#define FREE_VARIABLES() \
do { \
REGEX_FREE_STACK (fail_stack.stack); \
@@ -6084,7 +6084,7 @@ re_comp (s)
if (!s)
{
if (!re_comp_buf.buffer)
- return gettext ("No previous regular expression");
+ return (char *) gettext ("No previous regular expression");
return 0;
}
diff --git a/gnu/dist/cvs/lib/test-getdate.sh b/gnu/dist/cvs/lib/test-getdate.sh
new file mode 100755
index 00000000000..5b1db24edc6
--- /dev/null
+++ b/gnu/dist/cvs/lib/test-getdate.sh
@@ -0,0 +1,127 @@
+#! /bin/sh
+
+# Test that a getdate executable meets its specification.
+#
+# Copyright (C) 2004 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+# Why are these dates tested?
+#
+# February 29, 2003
+# Is not a leap year - should be invalid.
+#
+# 2004-12-40
+# Make sure get_date does not "roll" date forward to January 9th. Some
+# versions have been known to do this.
+#
+# Dec-5-1972
+# This is my birthday. :)
+#
+# 3/29/1974
+# 1996/05/12 13:57:45
+# Because.
+#
+# 12-05-12
+# This will be my 40th birthday. Ouch. :)
+#
+# 05/12/96
+# Because.
+#
+# third tuesday in March, 2078
+# Wanted this to work.
+#
+# 1969-12-32 2:00:00 UTC
+# 1970-01-01 2:00:00 UTC
+# 1969-12-32 2:00:00 +0400
+# 1970-01-01 2:00:00 +0400
+# 1969-12-32 2:00:00 -0400
+# 1970-01-01 2:00:00 -0400
+# Playing near the UNIX Epoch boundry condition to make sure date rolling
+# is also disabled there.
+#
+# 1996-12-12 1 month
+# Test a relative date.
+#
+# Tue Jan 19 03:14:07 2038 +0000
+# For machines with 31-bit time_t, any date past this date will be an
+# invalid date. So, any test date with a value greater than this
+# time is not portable.
+#
+# Feb. 29, 2096 4 years
+# 4 years from this date is _not_ a leap year, so Feb. 29th does not exist.
+#
+# Feb. 29, 2096 8 years
+# 8 years from this date is a leap year, so Feb. 29th does exist,
+# but on many hosts with 32-bit time_t types time, this test will
+# fail. So, this is not a portable test.
+#
+
+TZ=UTC0; export TZ
+
+cat >getdate-expected <<EOF
+Enter date, or blank line to exit.
+ > Bad format - couldn't convert.
+ > Bad format - couldn't convert.
+ > Bad format - couldn't convert.
+ > Fri Mar 29 00:00:00 1974
+ > Sun May 12 13:57:45 1996
+ > Sat May 12 00:00:00 2012
+ > Sun May 12 00:00:00 1996
+ > Bad format - couldn't convert.
+ > Bad format - couldn't convert.
+ > Thu Jan 1 02:00:00 1970
+ > Bad format - couldn't convert.
+ > Bad format - couldn't convert.
+ > Bad format - couldn't convert.
+ > Thu Jan 1 06:00:00 1970
+ > Sun Jan 12 00:00:00 1997
+ >
+EOF
+
+./getdate >getdate-got <<EOF
+February 29, 2003
+2004-12-40
+Dec-5-1972
+3/29/1974
+1996/05/12 13:57:45
+12-05-12
+05/12/96
+third tuesday in March, 2078
+1969-12-32 2:00:00 UTC
+1970-01-01 2:00:00 UTC
+1969-12-32 2:00:00 +0400
+1970-01-01 2:00:00 +0400
+1969-12-32 2:00:00 -0400
+1970-01-01 2:00:00 -0400
+1996-12-12 1 month
+EOF
+
+echo >>getdate-got
+
+if cmp getdate-expected getdate-got >getdate.cmp; then :; else
+ LOGFILE=`pwd`/getdate.log
+ cat getdate.cmp >${LOGFILE}
+ echo "** expected: " >>${LOGFILE}
+ cat getdate-expected >>${LOGFILE}
+ echo "** got: " >>${LOGFILE}
+ cat getdate-got >>${LOGFILE}
+ echo "FAIL: getdate" | tee -a ${LOGFILE}
+ echo "Failed! See ${LOGFILE} for more!" >&2
+ exit 1
+fi
+
+rm getdate-expected getdate-got getdate.cmp
+exit 0
diff --git a/gnu/dist/cvs/lib/xtime.h b/gnu/dist/cvs/lib/xtime.h
index 00d9fae874c..7760de5e931 100644
--- a/gnu/dist/cvs/lib/xtime.h
+++ b/gnu/dist/cvs/lib/xtime.h
@@ -11,6 +11,8 @@
/* This file simply performs the include magic necessary for using time
* functions
*/
+#ifndef XTIME_HEADER_INCLUDED
+#define XTIME_HEADER_INCLUDED
#ifdef vms
# include <time.h>
@@ -55,3 +57,5 @@ extern long timezone;
# endif /* !defined(HAVE_FTIME) && !defined(HAVE_TIMEZONE) */
#endif /* !vms */
+
+#endif /* !XTIME_HEADER_INCLUDED */
diff --git a/gnu/dist/cvs/src/Makefile.in b/gnu/dist/cvs/src/Makefile.in
index c3aa0fc8281..565d2037ec7 100644
--- a/gnu/dist/cvs/src/Makefile.in
+++ b/gnu/dist/cvs/src/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.7.9 from Makefile.am.
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
# @configure_input@
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -15,9 +15,11 @@
@SET_MAKE@
# Makefile for GNU CVS program.
-# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
-# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+#
+# Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+#
+# Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+# and others.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -29,6 +31,9 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
+
+SOURCES = $(cvs_SOURCES)
+
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
@@ -36,7 +41,6 @@ pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
-
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
@@ -50,6 +54,55 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
+bin_PROGRAMS = cvs$(EXEEXT)
+subdir = src
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/cvsbug.in ChangeLog
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = cvsbug
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS)
+am_cvs_OBJECTS = add.$(OBJEXT) admin.$(OBJEXT) annotate.$(OBJEXT) \
+ buffer.$(OBJEXT) checkin.$(OBJEXT) checkout.$(OBJEXT) \
+ classify.$(OBJEXT) client.$(OBJEXT) commit.$(OBJEXT) \
+ create_adm.$(OBJEXT) cvsrc.$(OBJEXT) diff.$(OBJEXT) \
+ edit.$(OBJEXT) entries.$(OBJEXT) error.$(OBJEXT) \
+ expand_path.$(OBJEXT) fileattr.$(OBJEXT) filesubr.$(OBJEXT) \
+ find_names.$(OBJEXT) hardlink.$(OBJEXT) hash.$(OBJEXT) \
+ history.$(OBJEXT) ignore.$(OBJEXT) import.$(OBJEXT) \
+ lock.$(OBJEXT) log.$(OBJEXT) login.$(OBJEXT) logmsg.$(OBJEXT) \
+ main.$(OBJEXT) mkmodules.$(OBJEXT) modules.$(OBJEXT) \
+ myndbm.$(OBJEXT) no_diff.$(OBJEXT) parseinfo.$(OBJEXT) \
+ patch.$(OBJEXT) rcs.$(OBJEXT) rcscmds.$(OBJEXT) \
+ recurse.$(OBJEXT) release.$(OBJEXT) remove.$(OBJEXT) \
+ repos.$(OBJEXT) root.$(OBJEXT) run.$(OBJEXT) \
+ scramble.$(OBJEXT) server.$(OBJEXT) stack.$(OBJEXT) \
+ status.$(OBJEXT) subr.$(OBJEXT) tag.$(OBJEXT) update.$(OBJEXT) \
+ version.$(OBJEXT) vers_ts.$(OBJEXT) watch.$(OBJEXT) \
+ wrapper.$(OBJEXT) zlib.$(OBJEXT)
+cvs_OBJECTS = $(am_cvs_OBJECTS)
+cvs_DEPENDENCIES = ../diff/libdiff.a ../lib/libcvs.a ../zlib/libz.a
+binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
+SCRIPTS = $(bin_SCRIPTS)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(cvs_SOURCES)
+DIST_SOURCES = $(cvs_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
@@ -105,7 +158,6 @@ RANLIB = @RANLIB@
ROFF = @ROFF@
SENDMAIL = @SENDMAIL@
SET_MAKE = @SET_MAKE@
-
SHELL = /bin/sh
STRIP = @STRIP@
TEXI2DVI = @TEXI2DVI@
@@ -120,6 +172,8 @@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
bindir = @bindir@
build_alias = @build_alias@
datadir = @datadir@
@@ -133,6 +187,7 @@ libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
+mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
@@ -147,8 +202,6 @@ target_alias = @target_alias@
# try and remove naming ocnflicts and fix Automake to allow particular includes
# to be attached only to particular object files. Short term fix is either or.
INCLUDES = -I$(top_srcdir)/lib -I$(top_srcdir)/diff -I$(top_srcdir)/zlib $(includeopt)
-
-bin_PROGRAMS = cvs
bin_SCRIPTS = cvsbug
# The cvs executable
@@ -224,7 +277,6 @@ cvs_SOURCES = \
update.h \
watch.h
-
cvs_LDADD = \
../diff/libdiff.a \
../lib/libcvs.a \
@@ -245,99 +297,51 @@ EXTRA_DIST = \
build_src.com \
sanity.sh
-subdir = src
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES = cvsbug
-bin_PROGRAMS = cvs$(EXEEXT)
-PROGRAMS = $(bin_PROGRAMS)
-
-am_cvs_OBJECTS = add.$(OBJEXT) admin.$(OBJEXT) annotate.$(OBJEXT) \
- buffer.$(OBJEXT) checkin.$(OBJEXT) checkout.$(OBJEXT) \
- classify.$(OBJEXT) client.$(OBJEXT) commit.$(OBJEXT) \
- create_adm.$(OBJEXT) cvsrc.$(OBJEXT) diff.$(OBJEXT) \
- edit.$(OBJEXT) entries.$(OBJEXT) error.$(OBJEXT) \
- expand_path.$(OBJEXT) fileattr.$(OBJEXT) filesubr.$(OBJEXT) \
- find_names.$(OBJEXT) hardlink.$(OBJEXT) hash.$(OBJEXT) \
- history.$(OBJEXT) ignore.$(OBJEXT) import.$(OBJEXT) \
- lock.$(OBJEXT) log.$(OBJEXT) login.$(OBJEXT) logmsg.$(OBJEXT) \
- main.$(OBJEXT) mkmodules.$(OBJEXT) modules.$(OBJEXT) \
- myndbm.$(OBJEXT) no_diff.$(OBJEXT) parseinfo.$(OBJEXT) \
- patch.$(OBJEXT) rcs.$(OBJEXT) rcscmds.$(OBJEXT) \
- recurse.$(OBJEXT) release.$(OBJEXT) remove.$(OBJEXT) \
- repos.$(OBJEXT) root.$(OBJEXT) run.$(OBJEXT) scramble.$(OBJEXT) \
- server.$(OBJEXT) stack.$(OBJEXT) status.$(OBJEXT) \
- subr.$(OBJEXT) tag.$(OBJEXT) update.$(OBJEXT) version.$(OBJEXT) \
- vers_ts.$(OBJEXT) watch.$(OBJEXT) wrapper.$(OBJEXT) \
- zlib.$(OBJEXT)
-cvs_OBJECTS = $(am_cvs_OBJECTS)
-cvs_DEPENDENCIES = ../diff/libdiff.a ../lib/libcvs.a ../zlib/libz.a
-cvs_LDFLAGS =
-SCRIPTS = $(bin_SCRIPTS)
-
-
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/add.Po ./$(DEPDIR)/admin.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/annotate.Po ./$(DEPDIR)/buffer.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/checkin.Po ./$(DEPDIR)/checkout.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/classify.Po ./$(DEPDIR)/client.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/commit.Po ./$(DEPDIR)/create_adm.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/cvsrc.Po ./$(DEPDIR)/diff.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/edit.Po ./$(DEPDIR)/entries.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/error.Po ./$(DEPDIR)/expand_path.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/fileattr.Po ./$(DEPDIR)/filesubr.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/find_names.Po ./$(DEPDIR)/hardlink.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/hash.Po ./$(DEPDIR)/history.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/ignore.Po ./$(DEPDIR)/import.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/lock.Po ./$(DEPDIR)/log.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/login.Po ./$(DEPDIR)/logmsg.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/main.Po ./$(DEPDIR)/mkmodules.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/modules.Po ./$(DEPDIR)/myndbm.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/no_diff.Po ./$(DEPDIR)/parseinfo.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/patch.Po ./$(DEPDIR)/rcs.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/rcscmds.Po ./$(DEPDIR)/recurse.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/release.Po ./$(DEPDIR)/remove.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/repos.Po ./$(DEPDIR)/root.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/run.Po ./$(DEPDIR)/scramble.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/server.Po ./$(DEPDIR)/stack.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/status.Po ./$(DEPDIR)/subr.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/tag.Po ./$(DEPDIR)/update.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/vers_ts.Po ./$(DEPDIR)/version.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/watch.Po ./$(DEPDIR)/wrapper.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/zlib.Po
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-DIST_SOURCES = $(cvs_SOURCES)
-DIST_COMMON = $(srcdir)/Makefile.in ChangeLog Makefile.am cvsbug.in
-SOURCES = $(cvs_SOURCES)
-
all: all-am
.SUFFIXES:
.SUFFIXES: .c .o .obj
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu src/Makefile
-Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
-cvsbug: $(top_builddir)/config.status cvsbug.in
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+cvsbug: $(top_builddir)/config.status $(srcdir)/cvsbug.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(bindir)
+ test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; for p in $$list; do \
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
; then \
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
- echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
- $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
+ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
else :; fi; \
done
@@ -345,8 +349,8 @@ uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
- echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
- rm -f $(DESTDIR)$(bindir)/$$f; \
+ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+ rm -f "$(DESTDIR)$(bindir)/$$f"; \
done
clean-binPROGRAMS:
@@ -354,16 +358,15 @@ clean-binPROGRAMS:
cvs$(EXEEXT): $(cvs_OBJECTS) $(cvs_DEPENDENCIES)
@rm -f cvs$(EXEEXT)
$(LINK) $(cvs_LDFLAGS) $(cvs_OBJECTS) $(cvs_LDADD) $(LIBS)
-binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
install-binSCRIPTS: $(bin_SCRIPTS)
@$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(bindir)
+ test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
@list='$(bin_SCRIPTS)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
if test -f $$d$$p; then \
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
- echo " $(binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f"; \
- $(binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f; \
+ echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+ $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
else :; fi; \
done
@@ -371,12 +374,12 @@ uninstall-binSCRIPTS:
@$(NORMAL_UNINSTALL)
@list='$(bin_SCRIPTS)'; for p in $$list; do \
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
- echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
- rm -f $(DESTDIR)$(bindir)/$$f; \
+ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+ rm -f "$(DESTDIR)$(bindir)/$$f"; \
done
mostlyclean-compile:
- -rm -f *.$(OBJEXT) core *.core
+ -rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@@ -438,36 +441,20 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zlib.Po@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
-@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
-@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
-@am__fastdepCC_TRUE@ fi
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
-@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
-@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
-@am__fastdepCC_TRUE@ fi
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
uninstall-info-am:
-ETAGS = etags
-ETAGSFLAGS =
-
-CTAGS = ctags
-CTAGSFLAGS =
-
-tags: TAGS
-
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
@@ -476,6 +463,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
+tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
@@ -487,10 +475,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$tags$$unique" \
- || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique
-
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
@@ -513,10 +502,6 @@ GTAGS:
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-
-top_distdir = ..
-distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
@@ -530,7 +515,7 @@ distdir: $(DISTFILES)
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
- $(mkinstalldirs) "$(distdir)$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
@@ -549,9 +534,10 @@ check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) check-local
check: check-am
all-am: Makefile $(PROGRAMS) $(SCRIPTS)
-
installdirs:
- $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(bindir)
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
@@ -571,7 +557,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
- -rm -f $(CONFIG_CLEAN_FILES)
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@@ -591,6 +577,8 @@ dvi: dvi-am
dvi-am:
+html: html-am
+
info: info-am
info-am:
@@ -628,14 +616,15 @@ uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \
.PHONY: CTAGS GTAGS all all-am check check-am check-local clean \
clean-binPROGRAMS clean-generic ctags distclean \
distclean-compile distclean-generic distclean-tags distdir dvi \
- dvi-am info info-am install install-am install-binPROGRAMS \
- install-binSCRIPTS install-data install-data-am install-exec \
- install-exec-am install-info install-info-am install-man \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
- tags uninstall uninstall-am uninstall-binPROGRAMS \
- uninstall-binSCRIPTS uninstall-info-am
+ dvi-am html html-am info info-am install install-am \
+ install-binPROGRAMS install-binSCRIPTS install-data \
+ install-data-am install-exec install-exec-am install-info \
+ install-info-am install-man install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am uninstall-binPROGRAMS uninstall-binSCRIPTS \
+ uninstall-info-am
check-local: localcheck remotecheck
diff --git a/gnu/dist/cvs/src/build_src.com b/gnu/dist/cvs/src/build_src.com
index e37de196730..8b8358cc80a 100755
--- a/gnu/dist/cvs/src/build_src.com
+++ b/gnu/dist/cvs/src/build_src.com
@@ -44,6 +44,7 @@ $ CC root.c
$ CC run.c
$ CC scramble.c
$ CC server.c
+$ CC stack.c
$ CC status.c
$ CC subr.c
$ CC tag.c
@@ -62,7 +63,7 @@ lock.obj,log.obj,login.obj,logmsg.obj,mkmodules.obj,modules.obj,myndbm.obj,-
no_diff.obj,-
parseinfo.obj,patch.obj,rcs.obj,rcscmds.obj,recurse.obj,release.obj,-
remove.obj,repos.obj,root.obj,run.obj,scramble.obj,server.obj,-
-status.obj,-
+stack.obj,status.obj,-
subr.obj,tag.obj,update.obj,version.obj,vers_ts.obj,watch.obj,wrapper.obj,-
zlib.obj
$ link/nodeb/exe=cvs.exe main.obj,cvslib.olb/lib,[-.vms]openvmslib.olb/lib,-
diff --git a/gnu/dist/cvs/src/checkin.c b/gnu/dist/cvs/src/checkin.c
index 938b71742d2..9403056f922 100644
--- a/gnu/dist/cvs/src/checkin.c
+++ b/gnu/dist/cvs/src/checkin.c
@@ -1,6 +1,11 @@
/*
- * Copyright (c) 1992, Brian Berliner and Jeff Polk
- * Copyright (c) 1989-1992, Brian Berliner
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ * and others.
+ *
+ * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk
+ * Portions Copyright (C) 1989-1992, Brian Berliner
*
* You may distribute under the terms of the GNU General Public License as
* specified in the README file that comes with the CVS source distribution.
@@ -60,7 +65,7 @@ Checkin (type, finfo, rev, tag, options, message)
*/
assert (finfo->rcs != NULL);
- switch (RCS_checkin (finfo->rcs, finfo->file, message, rev,
+ switch (RCS_checkin (finfo->rcs, finfo->file, message, rev, 0,
RCS_FLAGS_KEEPFILE))
{
case 0: /* everything normal */
diff --git a/gnu/dist/cvs/src/classify.c b/gnu/dist/cvs/src/classify.c
index 7ce823528dc..cc26913ca1f 100644
--- a/gnu/dist/cvs/src/classify.c
+++ b/gnu/dist/cvs/src/classify.c
@@ -1,6 +1,11 @@
/*
- * Copyright (c) 1992, Brian Berliner and Jeff Polk
- * Copyright (c) 1989-1992, Brian Berliner
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ * and others.
+ *
+ * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk
+ * Portions Copyright (C) 1989-1992, Brian Berliner
*
* You may distribute under the terms of the GNU General Public License as
* specified in the README file that comes with the CVS source distribution.
diff --git a/gnu/dist/cvs/src/create_adm.c b/gnu/dist/cvs/src/create_adm.c
index bccb4a27d15..ccf744f3ea9 100644
--- a/gnu/dist/cvs/src/create_adm.c
+++ b/gnu/dist/cvs/src/create_adm.c
@@ -1,6 +1,11 @@
/*
- * Copyright (c) 1992, Brian Berliner and Jeff Polk
- * Copyright (c) 1989-1992, Brian Berliner
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ * and others.
+ *
+ * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk
+ * Portions Copyright (C) 1989-1992, Brian Berliner
*
* You may distribute under the terms of the GNU General Public License as
* specified in the README file that comes with the CVS source distribution.
diff --git a/gnu/dist/cvs/src/cvsrc.c b/gnu/dist/cvs/src/cvsrc.c
index 9aed694bfc2..83aee4b4890 100644
--- a/gnu/dist/cvs/src/cvsrc.c
+++ b/gnu/dist/cvs/src/cvsrc.c
@@ -1,5 +1,10 @@
/*
- * Copyright (c) 1993 david d zuhn
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ * and others.
+ *
+ * Portions Copyright (C) 1993 david d zuhn
*
* Written by david d `zoo' zuhn while at Cygnus Support
*
diff --git a/gnu/dist/cvs/src/expand_path.c b/gnu/dist/cvs/src/expand_path.c
index 5aa10639390..3cfdc4979f1 100644
--- a/gnu/dist/cvs/src/expand_path.c
+++ b/gnu/dist/cvs/src/expand_path.c
@@ -97,16 +97,14 @@ expand_path (name, file, line)
const char *file;
int line;
{
- const char *s;
- char *d;
+ size_t s, d, p;
+ char *e;
char *mybuf = NULL;
size_t mybuf_size = 0;
char *buf = NULL;
size_t buf_size = 0;
- size_t doff;
-
char *result;
/* Sorry this routine is so ugly; it is a head-on collision
@@ -117,82 +115,74 @@ expand_path (name, file, line)
thusly. */
/* First copy from NAME to MYBUF, expanding $<foo> as we go. */
- s = name;
- d = mybuf;
- doff = d - mybuf;
- expand_string (&mybuf, &mybuf_size, doff + 1);
- d = mybuf + doff;
- while ((*d++ = *s))
+ s = d = 0;
+ while (name[s] != '\0')
{
- if (*s++ == '$')
+ if (name[s] == '$')
{
- char *p = d;
- char *e;
- int flag = (*s == '{');
-
- doff = d - mybuf;
- expand_string (&mybuf, &mybuf_size, doff + 1);
- d = mybuf + doff;
- for (; (*d++ = *s); s++)
+ p = d;
+ if (name[++s] == '{')
{
- if (flag
- ? *s =='}'
- : isalnum ((unsigned char) *s) == 0 && *s != '_')
- break;
- doff = d - mybuf;
- expand_string (&mybuf, &mybuf_size, doff + 1);
- d = mybuf + doff;
+ while (name[++s] != '}' && name[s] != '\0')
+ {
+ expand_string (&mybuf, &mybuf_size, p + 1);
+ mybuf[p++] = name[s];
+ }
+ if (name[s] == '}') ++s;
}
- *--d = '\0';
- e = expand_variable (&p[flag], file, line);
-
- if (e)
+ else
{
- doff = d - mybuf;
- expand_string (&mybuf, &mybuf_size, doff + 1);
- d = mybuf + doff;
- for (d = &p[-1]; (*d++ = *e++);)
+ while (isalnum ((unsigned char) name[s]) || name[s] == '_')
{
- doff = d - mybuf;
- expand_string (&mybuf, &mybuf_size, doff + 1);
- d = mybuf + doff;
+ expand_string (&mybuf, &mybuf_size, p + 1);
+ mybuf[p++] = name[s++];
}
- --d;
- if (flag && *s)
- s++;
+ }
+ expand_string (&mybuf, &mybuf_size, p + 1);
+ mybuf[p] = '\0';
+ e = expand_variable (mybuf + d, file, line);
+
+ if (e)
+ {
+ p = strlen(e);
+ expand_string (&mybuf, &mybuf_size, d + p);
+ memcpy(mybuf + d, e, p);
+ d += p;
}
else
/* expand_variable has already printed an error message. */
goto error_exit;
}
- doff = d - mybuf;
- expand_string (&mybuf, &mybuf_size, doff + 1);
- d = mybuf + doff;
+ else
+ {
+ expand_string (&mybuf, &mybuf_size, d + 1);
+ mybuf[d++] = name[s++];
+ }
}
- doff = d - mybuf;
- expand_string (&mybuf, &mybuf_size, doff + 1);
- d = mybuf + doff;
- *d = '\0';
+ expand_string (&mybuf, &mybuf_size, d + 1);
+ mybuf[d++] = '\0';
/* Then copy from MYBUF to BUF, expanding ~. */
- s = mybuf;
- d = buf;
+ s = d = 0;
/* If you don't want ~username ~/ to be expanded simply remove
* This entire if statement including the else portion
*/
- if (*s++ == '~')
+ if (mybuf[s] == '~')
{
- char *t;
- char *p, *pstart;
- pstart = p = xstrdup (s);
- if (*pstart=='/' || *pstart==0)
- t = get_homedir ();
+ p = d;
+ while (mybuf[++s] != '/' && mybuf[s] != '\0')
+ {
+ expand_string (&buf, &buf_size, p + 1);
+ buf[p++] = name[s];
+ }
+ expand_string (&buf, &buf_size, p + 1);
+ buf[p] = '\0';
+
+ if (p == d)
+ e = get_homedir ();
else
{
#ifdef GETPWNAM_MISSING
- for (; *p!='/' && *p; p++)
- ;
- *p = 0;
if (line != 0)
error (0, 0,
"%s:%d:tilde expansion not supported on this system",
@@ -203,54 +193,31 @@ expand_path (name, file, line)
return NULL;
#else
struct passwd *ps;
- for (; *p!='/' && *p; p++)
- ;
- *p = 0;
- ps = getpwnam (pstart);
+ ps = getpwnam (buf + d);
if (ps == 0)
{
if (line != 0)
error (0, 0, "%s:%d: no such user %s",
- file, line, pstart);
+ file, line, buf + d);
else
- error (0, 0, "%s: no such user %s", file, pstart);
+ error (0, 0, "%s: no such user %s", file, buf + d);
return NULL;
}
- t = ps->pw_dir;
+ e = ps->pw_dir;
#endif
}
- if (t == NULL)
+ if (e == NULL)
error (1, 0, "cannot find home directory");
- doff = d - buf;
- expand_string (&buf, &buf_size, doff + 1);
- d = buf + doff;
- while ((*d++ = *t++))
- {
- doff = d - buf;
- expand_string (&buf, &buf_size, doff + 1);
- d = buf + doff;
- }
- --d;
- s+=p-pstart;
- free (pstart);
- }
- else
- --s;
- /* Kill up to here */
- doff = d - buf;
- expand_string (&buf, &buf_size, doff + 1);
- d = buf + doff;
- while ((*d++ = *s++))
- {
- doff = d - buf;
- expand_string (&buf, &buf_size, doff + 1);
- d = buf + doff;
+ p = strlen(e);
+ expand_string (&buf, &buf_size, d + p);
+ memcpy(buf + d, e, p);
+ d += p;
}
- doff = d - buf;
- expand_string (&buf, &buf_size, doff + 1);
- d = buf + doff;
- *d = '\0';
+ /* Kill up to here */
+ p = strlen(mybuf + s) + 1;
+ expand_string (&buf, &buf_size, d + p);
+ memcpy(buf + d, mybuf + s, p);
/* OK, buf contains the value we want to return. Clean up and return
it. */
diff --git a/gnu/dist/cvs/src/fileattr.c b/gnu/dist/cvs/src/fileattr.c
index 9b108514445..ca6bd0eb478 100644
--- a/gnu/dist/cvs/src/fileattr.c
+++ b/gnu/dist/cvs/src/fileattr.c
@@ -139,6 +139,7 @@ fileattr_read ()
"file attribute database corruption: tab missing in %s",
fname);
++p;
+ if (fileattr_default_attrs) free (fileattr_default_attrs);
fileattr_default_attrs = xstrdup (p);
}
else
@@ -589,6 +590,7 @@ fileattr_write ()
{
error (0, errno, "cannot make directory %s", repname);
(void) umask (omask);
+ free (fname);
free (repname);
return;
}
@@ -600,6 +602,7 @@ fileattr_write ()
{
error (0, errno, "cannot write %s", fname);
(void) umask (omask);
+ free (fname);
return;
}
}
diff --git a/gnu/dist/cvs/src/hardlink.c b/gnu/dist/cvs/src/hardlink.c
index 5cd9c370fd8..ed050334fad 100644
--- a/gnu/dist/cvs/src/hardlink.c
+++ b/gnu/dist/cvs/src/hardlink.c
@@ -11,7 +11,9 @@
/* Collect and manage hardlink info associated with a particular file. */
#include "cvs.h"
-#include "hardlink.h"
+
+#ifdef PRESERVE_PERMISSIONS_SUPPORT
+# include "hardlink.h"
/* The structure currently used to manage hardlink info is a list.
Therefore, most of the functions which manipulate hardlink data
@@ -302,4 +304,4 @@ find_checkedout_proc (node, data)
return 0;
}
-
+#endif /* PRESERVE_PERMISSIONS_SUPPORT */
diff --git a/gnu/dist/cvs/src/hardlink.h b/gnu/dist/cvs/src/hardlink.h
index f9df34448ed..b2279683fe6 100644
--- a/gnu/dist/cvs/src/hardlink.h
+++ b/gnu/dist/cvs/src/hardlink.h
@@ -17,6 +17,7 @@
when files are being checked out or updated. It is used only when
hardlinked files are being checked out. */
+#ifdef PRESERVE_PERMISSIONS_SUPPORT
struct hardlink_info
{
Ctype status; /* as returned from Classify_File() */
@@ -31,3 +32,4 @@ void update_hardlink_info PROTO ((const char *));
List *list_linked_files_on_disk PROTO ((char *));
int compare_linkage_lists PROTO ((List *, List *));
int find_checkedout_proc PROTO ((Node *, void *));
+#endif /* PRESERVE_PERMISSIONS_SUPPORT */
diff --git a/gnu/dist/cvs/src/hash.c b/gnu/dist/cvs/src/hash.c
index 4a97784ec32..d9bc12cc3c1 100644
--- a/gnu/dist/cvs/src/hash.c
+++ b/gnu/dist/cvs/src/hash.c
@@ -1,5 +1,10 @@
/*
- * Copyright (c) 1992, Brian Berliner and Jeff Polk
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ * and others.
+ *
+ * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk
*
* You may distribute under the terms of the GNU General Public License as
* specified in the README file that comes with the CVS source distribution.
diff --git a/gnu/dist/cvs/src/hash.h b/gnu/dist/cvs/src/hash.h
index edfee46fe00..a31fc5dd04f 100644
--- a/gnu/dist/cvs/src/hash.h
+++ b/gnu/dist/cvs/src/hash.h
@@ -1,5 +1,10 @@
/*
- * Copyright (c) 1992, Brian Berliner and Jeff Polk
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ * and others.
+ *
+ * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk
*
* You may distribute under the terms of the GNU General Public License as
* specified in the README file that comes with the CVS source distribution.
diff --git a/gnu/dist/cvs/src/import.c b/gnu/dist/cvs/src/import.c
index 1eb02cfef61..08d53e23154 100644
--- a/gnu/dist/cvs/src/import.c
+++ b/gnu/dist/cvs/src/import.c
@@ -1,6 +1,11 @@
/*
- * Copyright (c) 1992, Brian Berliner and Jeff Polk
- * Copyright (c) 1989-1992, Brian Berliner
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ * and others.
+ *
+ * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk
+ * Portions Copyright (C) 1989-1992, Brian Berliner
*
* You may distribute under the terms of the GNU General Public License as
* specified in the README file that comes with the CVS source distribution.
@@ -117,6 +122,7 @@ import (argc, argv)
#else
use_editor = 0;
#endif
+ if (message) free (message);
message = xstrdup(optarg);
break;
case 'I':
@@ -212,11 +218,22 @@ import (argc, argv)
* support branching to a single level, so the specified vendor branch
* must only have two dots in it (like "1.1.1").
*/
- for (cp = vbranch; *cp != '\0'; cp++)
- if (!isdigit ((unsigned char) *cp) && *cp != '.')
- error (1, 0, "%s is not a numeric branch", vbranch);
- if (numdots (vbranch) != 2)
- error (1, 0, "Only branches with two dots are supported: %s", vbranch);
+ {
+ regex_t pat;
+ int ret = regcomp (&pat, "^[1-9][0-9]*\\.[1-9][0-9]*\\.[1-9][0-9]*$",
+ REG_EXTENDED);
+ assert (!ret);
+ if (regexec (&pat, vbranch, 0, NULL, 0))
+ {
+ error (1, 0,
+"Only numeric branch specifications with two dots are\n"
+"supported by import, not `%s'. For example: `1.1.1'.",
+ vbranch);
+ }
+ regfree (&pat);
+ }
+
+ /* Set vhead to the branch's parent. */
vhead = xstrdup (vbranch);
cp = strrchr (vhead, '.');
*cp = '\0';
@@ -748,7 +765,7 @@ add_rev (message, rcs, vfile, vers)
tocvsPath = wrap_tocvs_process_file (vfile);
status = RCS_checkin (rcs, tocvsPath == NULL ? vfile : tocvsPath,
- message, vbranch,
+ message, vbranch, 0,
(RCS_FLAGS_QUIET | RCS_FLAGS_KEEPFILE
| (use_file_modtime ? RCS_FLAGS_MODTIME : 0)));
ierrno = errno;
diff --git a/gnu/dist/cvs/src/login.c b/gnu/dist/cvs/src/login.c
index 49622e80a8c..1c9ce553632 100644
--- a/gnu/dist/cvs/src/login.c
+++ b/gnu/dist/cvs/src/login.c
@@ -1,5 +1,10 @@
/*
- * Copyright (c) 1995, Cyclic Software, Bloomington, IN, USA
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ * and others.
+ *
+ * Portions Copyright (c) 1995, Cyclic Software, Bloomington, IN, USA
*
* You may distribute under the terms of the GNU General Public License as
* specified in the README file that comes with CVS.
@@ -114,7 +119,7 @@ password_entry_parseline (cvsroot_canonical, warn, linenumber, linebuf)
if (isspace(*(linebuf + 1)))
/* special case since strtoul ignores leading white space */
- entry_version = 0;
+ q = linebuf + 1;
else
entry_version = strtoul (linebuf + 1, &q, 10);
@@ -455,7 +460,7 @@ process:
if (fprintf (fp, "/1 %s %s\n", cvsroot_canonical, newpassword) == EOF)
error (1, errno, "cannot write %s", passfile);
if (fclose (fp) < 0)
- error (0, errno, "cannot close %s", passfile);
+ error (1, errno, "cannot close %s", passfile);
}
/* Utter, total, raving paranoia, I know. */
diff --git a/gnu/dist/cvs/src/myndbm.c b/gnu/dist/cvs/src/myndbm.c
index a5afcce1ed6..cb99cc27eb9 100644
--- a/gnu/dist/cvs/src/myndbm.c
+++ b/gnu/dist/cvs/src/myndbm.c
@@ -1,5 +1,11 @@
/*
- * Copyright (c) 1992, Brian Berliner
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ * and others.
+ *
+ * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk
+ * Portions Copyright (C) 1989-1992, Brian Berliner
*
* You may distribute under the terms of the GNU General Public License as
* specified in the README file that comes with the CVS source distribution.
diff --git a/gnu/dist/cvs/src/no_diff.c b/gnu/dist/cvs/src/no_diff.c
index ebddcd39e3e..45847a1abe2 100644
--- a/gnu/dist/cvs/src/no_diff.c
+++ b/gnu/dist/cvs/src/no_diff.c
@@ -1,6 +1,11 @@
/*
- * Copyright (c) 1992, Brian Berliner and Jeff Polk
- * Copyright (c) 1989-1992, Brian Berliner
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ * and others.
+ *
+ * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk
+ * Portions Copyright (C) 1989-1992, Brian Berliner
*
* You may distribute under the terms of the GNU General Public License as
* specified in the README file that comes with the CVS source distribution.
@@ -15,6 +20,7 @@
*/
#include "cvs.h"
+#include <assert.h>
int
No_Difference (finfo, vers)
@@ -71,6 +77,7 @@ No_Difference (finfo, vers)
/* update the entdata pointer in the vers_ts structure */
p = findnode (finfo->entries, finfo->file);
+ assert (p);
vers->entdata = p->data;
ret = 0;
diff --git a/gnu/dist/cvs/src/rcs.h b/gnu/dist/cvs/src/rcs.h
index 4a6d2a57dfc..3a66640b2b2 100644
--- a/gnu/dist/cvs/src/rcs.h
+++ b/gnu/dist/cvs/src/rcs.h
@@ -1,6 +1,11 @@
/*
- * Copyright (c) 1992, Brian Berliner and Jeff Polk
- * Copyright (c) 1989-1992, Brian Berliner
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ * and others.
+ *
+ * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk
+ * Portions Copyright (C) 1989-1992, Brian Berliner
*
* You may distribute under the terms of the GNU General Public License as
* specified in the README file that comes with the CVS source distribution.
@@ -224,7 +229,8 @@ void RCS_setexpand PROTO ((RCSNode *, const char *));
int RCS_checkout PROTO ((RCSNode *, const char *, const char *, const char *,
const char *, const char *, RCSCHECKOUTPROC, void *));
int RCS_checkin PROTO ((RCSNode *rcs, const char *workfile,
- const char *message, const char *rev, int flags));
+ const char *message, const char *rev, time_t citime,
+ int flags));
int RCS_cmp_file PROTO((RCSNode *, const char *, char **, const char *,
const char *, const char *));
int RCS_settag PROTO ((RCSNode *, const char *, const char *));
diff --git a/gnu/dist/cvs/src/rcscmds.c b/gnu/dist/cvs/src/rcscmds.c
index 52e3a9aec1e..bb825ff25e4 100644
--- a/gnu/dist/cvs/src/rcscmds.c
+++ b/gnu/dist/cvs/src/rcscmds.c
@@ -1,6 +1,11 @@
/*
- * Copyright (c) 1992, Brian Berliner and Jeff Polk
- * Copyright (c) 1989-1992, Brian Berliner
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ * and others.
+ *
+ * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk
+ * Portions Copyright (C) 1989-1992, Brian Berliner
*
* You may distribute under the terms of the GNU General Public License as
* specified in the README file that comes with the CVS source distribution.
@@ -262,6 +267,7 @@ RCS_merge(rcs, path, workfile, options, rev1, rev2)
symbolic). */
xrev1 = RCS_gettag (rcs, rev1, 0, NULL);
xrev2 = RCS_gettag (rcs, rev2, 0, NULL);
+ assert (xrev1 && xrev2);
/* Check out chosen revisions. The error message when RCS_checkout
fails is not very informative -- it is taken verbatim from RCS 5.7,
diff --git a/gnu/dist/cvs/src/release.c b/gnu/dist/cvs/src/release.c
index 2d8c72cba0f..23f052200b3 100644
--- a/gnu/dist/cvs/src/release.c
+++ b/gnu/dist/cvs/src/release.c
@@ -67,7 +67,6 @@ release (argc, argv)
{
FILE *fp;
int i, c;
- char *repository;
char *line = NULL;
size_t line_allocated = 0;
char *update_cmd;
@@ -124,8 +123,12 @@ release (argc, argv)
+ 1 + 3 + 3 + 16 + 1);
sprintf (update_cmd, "%s %s%s-n -q -d %s update",
program_path,
+#if defined (CLIENT_SUPPORT) || defined (SERVER_SUPPORT)
cvsauthenticate ? "-a " : "",
cvsencrypt ? "-x " : "",
+#else
+ "", "",
+#endif
current_parsed_root->original);
#ifdef CLIENT_SUPPORT
@@ -173,8 +176,6 @@ release (argc, argv)
continue;
}
- repository = Name_Repository ((char *) NULL, (char *) NULL);
-
if (!really_quiet)
{
int line_length;
@@ -207,7 +208,6 @@ release (argc, argv)
if ((pclose (fp)) != 0)
{
error (0, 0, "unable to release `%s'", thisarg);
- free (repository);
if (restore_cwd (&cwd, NULL))
error_exit ();
continue;
@@ -222,7 +222,6 @@ release (argc, argv)
{
(void) fprintf (stderr, "** `%s' aborted by user choice.\n",
cvs_cmd_name);
- free (repository);
if (restore_cwd (&cwd, NULL))
error_exit ();
continue;
@@ -236,7 +235,6 @@ release (argc, argv)
CVS/Entries file in the wrong directory. See release-17
through release-23. */
- free (repository);
if (restore_cwd (&cwd, NULL))
exit (EXIT_FAILURE);
diff --git a/gnu/dist/cvs/src/server.h b/gnu/dist/cvs/src/server.h
index 20152d85dd5..543204e035e 100644
--- a/gnu/dist/cvs/src/server.h
+++ b/gnu/dist/cvs/src/server.h
@@ -1,8 +1,8 @@
/*
- * Copyright (c) 2003 The Free Software Foundation.
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
*
- * Portions Copyright (c) 2003 Derek Price
- * and Ximbiot <http://ximbiot.com>,
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ * and others.
*
* You may distribute under the terms of the GNU General Public License as
* specified in the README file that comes with the CVS kit.
diff --git a/gnu/dist/cvs/src/stack.c b/gnu/dist/cvs/src/stack.c
index edba9056175..22a10888c35 100644
--- a/gnu/dist/cvs/src/stack.c
+++ b/gnu/dist/cvs/src/stack.c
@@ -1,7 +1,8 @@
/*
- * Copyright (c) 2004, Free Software Foundation,
- * Derek Price,
- * & Ximbiot <http://ximbiot.com>.
+ * Copyright (C) 2004-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 2004-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ * and others.
*
* You may distribute under the terms of the GNU General Public License as
* specified in the README file that comes with the CVS source distribution.
diff --git a/gnu/dist/cvs/src/stack.h b/gnu/dist/cvs/src/stack.h
index 49ebdf80a88..822010bbe4a 100644
--- a/gnu/dist/cvs/src/stack.h
+++ b/gnu/dist/cvs/src/stack.h
@@ -1,7 +1,6 @@
/*
- * Copyright (c) 2004, Free Software Foundation,
- * Derek Price,
- * & Ximbiot <http://ximbiot.com>.
+ * Copyright (c) 2004-2005 The Free Software Foundation,
+ * Derek Price, and Ximbiot <http://ximbiot.com>.
*
* You may distribute under the terms of the GNU General Public License as
* specified in the README file that comes with the CVS source distribution.
diff --git a/gnu/dist/cvs/src/status.c b/gnu/dist/cvs/src/status.c
index 2e2957e5835..ed2c8cd83b6 100644
--- a/gnu/dist/cvs/src/status.c
+++ b/gnu/dist/cvs/src/status.c
@@ -1,6 +1,11 @@
/*
- * Copyright (c) 1992, Brian Berliner and Jeff Polk
- * Copyright (c) 1989-1992, Brian Berliner
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ * and others.
+ *
+ * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk
+ * Portions Copyright (C) 1989-1992, Brian Berliner
*
* You may distribute under the terms of the GNU General Public License as
* specified in the README file that comes with the CVS source distribution.
diff --git a/gnu/dist/cvs/src/version.c b/gnu/dist/cvs/src/version.c
index 8c76a168bda..bbe5261e2c8 100644
--- a/gnu/dist/cvs/src/version.c
+++ b/gnu/dist/cvs/src/version.c
@@ -1,8 +1,12 @@
/*
- * Copyright (c) 1994 david d `zoo' zuhn
- * Copyright (c) 1994 Free Software Foundation, Inc.
- * Copyright (c) 1992, Brian Berliner and Jeff Polk
- * Copyright (c) 1989-1992, Brian Berliner
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ * and others.
+ *
+ * Portions Copyright (C) 1994 david d `zoo' zuhn
+ * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk
+ * Portions Copyright (C) 1989-1992, Brian Berliner
*
* You may distribute under the terms of the GNU General Public License as
* specified in the README file that comes with this CVS source distribution.
diff --git a/gnu/dist/cvs/src/wrapper.c b/gnu/dist/cvs/src/wrapper.c
index 548b3a506c2..97568aff530 100644
--- a/gnu/dist/cvs/src/wrapper.c
+++ b/gnu/dist/cvs/src/wrapper.c
@@ -240,6 +240,7 @@ wrap_unparse_rcs_options (line, first_call_p)
* Remove fmt str specifier other than %% or %s. And allow
* only max_s %s specifiers
*/
+void
wrap_clean_fmt_str(char *fmt, int max_s)
{
while (*fmt) {
@@ -257,7 +258,6 @@ wrap_clean_fmt_str(char *fmt, int max_s)
}
fmt++;
}
- return;
}
/*
diff --git a/gnu/dist/cvs/ylwrap b/gnu/dist/cvs/ylwrap
new file mode 100755
index 00000000000..ced3af3d619
--- /dev/null
+++ b/gnu/dist/cvs/ylwrap
@@ -0,0 +1,160 @@
+#! /bin/sh
+# ylwrap - wrapper for lex/yacc invocations.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003 Free Software
+# Foundation, Inc.
+#
+# Written by Tom Tromey <tromey@cygnus.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Usage:
+# ylwrap INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]...
+# * INPUT is the input file
+# * OUTPUT is file PROG generates
+# * DESIRED is file we actually want
+# * PROGRAM is program to run
+# * ARGS are passed to PROG
+# Any number of OUTPUT,DESIRED pairs may be used.
+
+# The input.
+input="$1"
+shift
+case "$input" in
+ [\\/]* | ?:[\\/]*)
+ # Absolute path; do nothing.
+ ;;
+ *)
+ # Relative path. Make it absolute.
+ input="`pwd`/$input"
+ ;;
+esac
+
+pairlist=
+while test "$#" -ne 0; do
+ if test "$1" = "--"; then
+ shift
+ break
+ fi
+ pairlist="$pairlist $1"
+ shift
+done
+
+# The program to run.
+prog="$1"
+shift
+# Make any relative path in $prog absolute.
+case "$prog" in
+ [\\/]* | ?:[\\/]*) ;;
+ *[\\/]*) prog="`pwd`/$prog" ;;
+esac
+
+# FIXME: add hostname here for parallel makes that run commands on
+# other machines. But that might take us over the 14-char limit.
+dirname=ylwrap$$
+trap "cd `pwd`; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15
+mkdir $dirname || exit 1
+
+cd $dirname
+
+case $# in
+ 0) $prog "$input" ;;
+ *) $prog "$@" "$input" ;;
+esac
+status=$?
+
+if test $status -eq 0; then
+ set X $pairlist
+ shift
+ first=yes
+ # Since DOS filename conventions don't allow two dots,
+ # the DOS version of Bison writes out y_tab.c instead of y.tab.c
+ # and y_tab.h instead of y.tab.h. Test to see if this is the case.
+ y_tab_nodot="no"
+ if test -f y_tab.c || test -f y_tab.h; then
+ y_tab_nodot="yes"
+ fi
+
+ # The directory holding the input.
+ input_dir=`echo "$input" | sed -e 's,\([\\/]\)[^\\/]*$,\1,'`
+ # Quote $INPUT_DIR so we can use it in a regexp.
+ # FIXME: really we should care about more than `.' and `\'.
+ input_rx=`echo "$input_dir" | sed 's,\\\\,\\\\\\\\,g;s,\\.,\\\\.,g'`
+
+ while test "$#" -ne 0; do
+ from="$1"
+ # Handle y_tab.c and y_tab.h output by DOS
+ if test $y_tab_nodot = "yes"; then
+ if test $from = "y.tab.c"; then
+ from="y_tab.c"
+ else
+ if test $from = "y.tab.h"; then
+ from="y_tab.h"
+ fi
+ fi
+ fi
+ if test -f "$from"; then
+ # If $2 is an absolute path name, then just use that,
+ # otherwise prepend `../'.
+ case "$2" in
+ [\\/]* | ?:[\\/]*) target="$2";;
+ *) target="../$2";;
+ esac
+
+ # Edit out `#line' or `#' directives.
+ #
+ # We don't want the resulting debug information to point at
+ # an absolute srcdir; it is better for it to just mention the
+ # .y file with no path.
+ #
+ # We want to use the real output file name, not yy.lex.c for
+ # instance.
+ #
+ # We want the include guards to be adjusted too.
+ FROM=`echo "$from" | sed \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
+ -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
+ TARGET=`echo "$2" | sed \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
+ -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
+ sed "/^#/{s,$input_rx,,;s,$from,$2,;s,$FROM,$TO,;}" "$from" >"$target" ||
+ status=$?
+ else
+ # A missing file is only an error for the first file. This
+ # is a blatant hack to let us support using "yacc -d". If -d
+ # is not specified, we don't want an error when the header
+ # file is "missing".
+ if test $first = yes; then
+ status=1
+ fi
+ fi
+ shift
+ shift
+ first=no
+ done
+else
+ status=$?
+fi
+
+# Remove the directory.
+cd ..
+rm -rf $dirname
+
+exit $status