-# $MirOS: src/gnu/usr.bin/cvs/Makefile.bsd-wrapper,v 1.36 2016/11/09 03:04:12 tg Exp $
+# $MirOS: src/gnu/usr.bin/cvs/Makefile.bsd-wrapper,v 1.37 2017/03/26 23:06:26 tg Exp $
# $OpenBSD: Makefile.bsd-wrapper,v 1.44 2004/01/02 09:01:24 millert Exp $
# MirOS patchlevel tracked in configure{.in,}
# hardcoded paths
CFVARS+= ac_cv_path_CSH=/usr/mpkg/bin/csh
CFVARS+= ac_cv_path_PS2PDF=false
-XARGS+= ZLIB_LIBS=-lz
.include <bsd.own.mk>
COPTS+= -Wall -Wno-unused
-/* config.h.in. Generated from configure.in by autoheader 2.61-MirPorts-1. */
+/* config.h.in. Generated from configure.in by autoheader 2.61-MirPorts-2. */
/* Define this to a NULL terminated list of allowed path prefixes (for
directories) and paths to files the CVS server will allow configuration to
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61-MirPorts-1 for Concurrent Versions System (CVS) 1.12.13-MirOS-0AB7.7.
+# Generated by GNU Autoconf 2.61-MirPorts-2 for Concurrent Versions System (CVS) 1.12.13-MirOS-0AB7.8.
#
# Report bugs to <miros-discuss@mirbsd.org>.
#
# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
# 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc.
-# Copyright (c) 2003, 2004, 2005, 2010, 2011, 2012, 2013, 2015, 2016
+# Copyright (c) 2003, 2004, 2005, 2010, 2011, 2012, 2013, 2015, 2016, 2017
# mirabilos <m@mirbsd.org>
#
# This program is free software; you can redistribute it and/or modify
# Identity of this package.
PACKAGE_NAME='Concurrent Versions System (CVS)'
PACKAGE_TARNAME='cvs'
-PACKAGE_VERSION='1.12.13-MirOS-0AB7.7'
-PACKAGE_STRING='Concurrent Versions System (CVS) 1.12.13-MirOS-0AB7.7'
+PACKAGE_VERSION='1.12.13-MirOS-0AB7.8'
+PACKAGE_STRING='Concurrent Versions System (CVS) 1.12.13-MirOS-0AB7.8'
PACKAGE_BUGREPORT='miros-discuss@mirbsd.org'
ac_unique_file="src/cvs.h"
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures Concurrent Versions System (CVS) 1.12.13-MirOS-0AB7.7 to adapt to many kinds of systems.
+\`configure' configures Concurrent Versions System (CVS) 1.12.13-MirOS-0AB7.8 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of Concurrent Versions System (CVS) 1.12.13-MirOS-0AB7.7:";;
+ short | recursive ) echo "Configuration of Concurrent Versions System (CVS) 1.12.13-MirOS-0AB7.8:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-Concurrent Versions System (CVS) configure 1.12.13-MirOS-0AB7.7
-generated by GNU Autoconf 2.61-MirPorts-1
+Concurrent Versions System (CVS) configure 1.12.13-MirOS-0AB7.8
+generated by GNU Autoconf 2.61-MirPorts-2
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
-Copyright (c) 2003, 2004, 2005, 2010, 2011, 2012, 2013, 2015, 2016
+Copyright (c) 2003, 2004, 2005, 2010, 2011, 2012, 2013, 2015, 2016, 2017
mirabilos <m@mirbsd.org>
This program is free software; you can redistribute it and/or modify
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by Concurrent Versions System (CVS) $as_me 1.12.13-MirOS-0AB7.7, which was
-generated by GNU Autoconf 2.61-MirPorts-1. Invocation command line was
+It was created by Concurrent Versions System (CVS) $as_me 1.12.13-MirOS-0AB7.8, which was
+generated by GNU Autoconf 2.61-MirPorts-2. Invocation command line was
$ $0 $@
# Define the identity of the package.
PACKAGE='cvs'
- VERSION='1.12.13-MirOS-0AB7.7'
+ VERSION='1.12.13-MirOS-0AB7.8'
# Some tools Automake needs.
+LIBS="${LIBS:+$LIBS }-lz"
+
# What remote shell transport should our client cvs default to using?
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by Concurrent Versions System (CVS) $as_me 1.12.13-MirOS-0AB7.7, which was
-generated by GNU Autoconf 2.61-MirPorts-1. Invocation command line was
+This file was extended by Concurrent Versions System (CVS) $as_me 1.12.13-MirOS-0AB7.8, which was
+generated by GNU Autoconf 2.61-MirPorts-2. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-Concurrent Versions System (CVS) config.status 1.12.13-MirOS-0AB7.7
-configured by $0, generated by GNU Autoconf 2.61-MirPorts-1,
+Concurrent Versions System (CVS) config.status 1.12.13-MirOS-0AB7.8
+configured by $0, generated by GNU Autoconf 2.61-MirPorts-2,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Copyright (C) 2006 Free Software Foundation, Inc.
-dnl $MirOS: src/gnu/usr.bin/cvs/configure.in,v 1.26 2017/01/08 19:43:51 tg Exp $
+dnl $MirOS: src/gnu/usr.bin/cvs/configure.in,v 1.28 2017/03/26 23:06:30 tg Exp $
dnl
dnl configure.in for cvs
[Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
-Copyright (c) 2003, 2004, 2005, 2010, 2011, 2012, 2013, 2015, 2016
+Copyright (c) 2003, 2004, 2005, 2010, 2011, 2012, 2013, 2015, 2016, 2017
mirabilos <m@mirbsd.org>
This program is free software; you can redistribute it and/or modify
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.])
-AC_INIT([Concurrent Versions System (CVS)],[1.12.13-MirOS-0AB7.7],
+AC_INIT([Concurrent Versions System (CVS)],[1.12.13-MirOS-0AB7.8],
[miros-discuss@mirbsd.org],[cvs])
AC_CONFIG_SRCDIR(src/cvs.h)
AM_INIT_AUTOMAKE([gnu 1.9.2 dist-bzip2 no-define])
dnl begin --with-*
dnl
+dnl WITH_EXTERNAL_ZLIB is external
+LIBS="${LIBS:+$LIBS }-lz"
+
dnl
dnl begin --with-rsh
dnl
{28truecm}{21truecm}%
\globaldefs = 0%
@end tex
-@comment $MirOS: src/gnu/usr.bin/cvs/doc/cvs.texinfo,v 1.29 2017/01/09 22:54:23 tg Exp $
+@comment $MirOS: src/gnu/usr.bin/cvs/doc/cvs.texinfo,v 1.32 2017/03/27 16:55:23 tg Exp $
@macro copyleftnotice
@noindent
Copyright @copyright{} 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
@multitable @columnfractions .12 .88
@item Portions
@item @tab Copyright @copyright{} 2003, 2004, 2005, 2007, 2009, 2010, 2011,
- 2013, 2014, 2015, 2016
+ 2013, 2014, 2015, 2016, 2017
mirabilos, The MirOS Project
@item @tab Copyright @copyright{} 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2007
if you want to allow read-only access to some directories
(@pxref{config}).
-@c CVS seems to use CVSUMASK in picking permissions for
-@c val-tags, but maybe we should say more about this.
-@c Like val-tags gets created by someone who doesn't
-@c have CVSUMASK set right?
@cindex CVSROOT/val-tags file, and read-only access to projects
@cindex val-tags file, and read-only access to projects
Also note that users must have write access to the
@c FIXME: Need more discussion of which
@c group should own the file in the repository.
@c Include a somewhat detailed example of the usual
-@c case where CVSUMASK is 007, the developers are all
+@c case where CVSUMASK is 002, the developers are all
@c in a group, and that group owns stuff in the
@c repository. Need to talk about group ownership of
@c newly-created directories/files (on some unices,
@code{cvs init} will enable history logging; if you
don't want that, remove the history file after running
@code{cvs init}. @xref{history file}.
+Since MirBSD CVS 1.12.13-MirOS-0AB7.8, MirPorts-19 or
+Debian cvs 2:1.12.13+real-22, only write operations
+will be logged by default; to change this, make the
+history file world-writable (but beware of the associated
+security risk) and remove the stock @samp{LogHistory}
+line in the @file{CVSROOT/config} file (@pxref{config})
+to use the (commented-out) default or put your own there.
+Note that these versions also create the @file{val-tags}
+file writable (@pxref{CVSUMASK}), not world-writable like
+prior versions, so users who wish to commit must, with a
+default @code{CVSUMASK} of 002, be in the same group as
+the repository.
@node Backing up
@section Backing up a repository
machine to the filename of the server you want to use,
for example @file{/usr/local/bin/cvs-1.6}.
For the @code{ext} and @code{fork} methods, you may
-also specify @var{CVS_SERVER} as an otpion in the
+also specify @var{CVS_SERVER} as an option in the
@var{CVSROOT} so that you may use different servers for
differnt roots. See @ref{Remote repositories} for more
details.
for the Berkeley mdoc macro processing.
@example
-$Mdocdate: January 9 2017 $
+$Mdocdate: March 27 2017 $
@end example
@cindex Header keyword
Default of @samp{TOEFWUPCGMAR} (or simply @samp{all}) will log
all transactions. Any subset of the default is
legal. (For example, to only log transactions that modify the
-@file{*,v} files, use @samp{LogHistory=TMAR}.) To disable history logging
+@file{*,v} files, use @samp{LogHistory=TMAR} which is nowadays
+set by @code{cvs init} by default.)
+To disable history logging
completely, use @samp{LogHistory=}.
@cindex MaxCommentLeaderLength, in CVSROOT/config
check out from a read-only repository, such as within
an anoncvs server, or from a @sc{cd-rom} repository.
-It has the same effect as if the @samp{-R} command-line
+Setting this has the same effect as if the @samp{-R} command-line
option is used. This can also allow the use of
read-only NFS repositories.
@item $CVSUMASK
+@anchor{CVSUMASK}
Controls permissions of files in the repository. See
@ref{File permissions}.
@cindex CVS_CLIENT_LOG, environment variable
@item $CVS_CLIENT_LOG
-Used for debugging only in client-server
-mode. If set, everything sent to the server is logged
-into @file{@code{$CVS_CLIENT_LOG}.in} and everything
-sent from the server is logged into
-@file{@code{$CVS_CLIENT_LOG}.out}.
+Used for debugging only in client-server mode.
+If set and not empty, everything sent to the server is logged
+into @file{@code{$CVS_CLIENT_LOG}.in}, and everything received
+from the server is logged into @file{@code{$CVS_CLIENT_LOG}.out}.
+
+@cindex CVS_SECONDARY_LOG, environment variable
+@item $CVS_SECONDARY_LOG
+Used for debugging only in secondary write proxy mode.
+If set and not empty, everything sent to the primary server is logged
+into @file{@code{$CVS_SECONDARY_LOG}.in}, and everything received
+from the primary server is logged into @file{@code{$CVS_SECONDARY_LOG}.out}.
+
+@cindex CVS_SERVER_LOG, environment variable
+@item $CVS_SERVER_LOG
+Used for debugging only in client-server mode.
+If set and not empty, everything sent to the client is logged
+into @file{@code{$CVS_SERVER_LOG}.in}, and everything received
+from the client is logged into @file{@code{$CVS_SERVER_LOG}.out}.
@cindex CVS_SERVER_SLEEP, environment variable
@item $CVS_SERVER_SLEEP
-# $MirOS: src/gnu/usr.bin/cvs/lib/Makefile.am,v 1.7 2011/06/11 03:58:06 tg Exp $
+# $MirOS: src/gnu/usr.bin/cvs/lib/Makefile.am,v 1.8 2017/03/26 23:09:14 tg Exp $
## Process this file with automake to produce Makefile.in
# Makefile for library files used by GNU CVS.
#
## CVS test scripts for getdate.
TESTS += test-getdate.sh
MOSTLYCLEANFILES += getdate-expected getdate-got getdate.diff
-DISTCLEANFILES += getdate.log
+DISTCLEANFILES += getdate.log getdate.log~
# Program required by test-getdate.sh for testing getdate.y.
check_PROGRAMS += getdate
getdate_SOURCES = \
@SET_MAKE@
-# $MirOS: src/gnu/usr.bin/cvs/lib/Makefile.in,v 1.17 2013/06/26 19:58:09 tg Exp $
+# $MirOS: src/gnu/usr.bin/cvs/lib/Makefile.in,v 1.18 2017/03/26 23:11:50 tg Exp $
# Makefile for library files used by GNU CVS.
#
# Copyright (C) 1986-2005 The Free Software Foundation, Inc.
MOSTLYCLEANFILES = alloca.h alloca.h-t fnmatch.h fnmatch.h-t \
getdate-expected getdate-got getdate.diff stdbool.h \
stdbool.h-t stdint.h stdint.h-t
-DISTCLEANFILES = getdate.log
+DISTCLEANFILES = getdate.log getdate.log~
MAINTAINERCLEANFILES = getdate.c
TESTS = test-getdate.sh
EXTRA_DIST = .cvsignore ChangeLog.fsf Makefile.gnulib build_lib.com \
Copyright (C) 1995, 1997, 1998, 2003, 2004, 2005
Free Software Foundation, Inc.
- Copyright (c) 2005, 2006, 2007, 2010, 2016
+ Copyright (c) 2005, 2006, 2007, 2010, 2016, 2017
mirabilos <m@mirbsd.org>
This program is free software; you can redistribute it and/or modify
"@(""#)" #varname ": " string
#endif
-__IDSTRING(rcsid_code, "$MirOS: src/gnu/usr.bin/cvs/lib/getdate.c,v 1.17 2016/10/22 22:46:51 tg Exp $");
-__IDSTRING(rcsid_bron, "$miros: src/gnu/usr.bin/cvs/lib/getdate.y,v 1.11 2016/10/22 22:45:50 tg Exp $");
+__IDSTRING(rcsid_code, "$MirOS: src/gnu/usr.bin/cvs/lib/getdate.c,v 1.18 2017/03/26 15:57:46 tg Exp $");
+__IDSTRING(rcsid_bron, "$miros: src/gnu/usr.bin/cvs/lib/getdate.y,v 1.12 2017/03/26 15:54:06 tg Exp $");
/* Shift A right by B bits portably, by dividing A by 2**B and
truncating towards minus infinity. A and B should be free of side
if (tz)
{
size_t tzsize = strlen (tz) + 1;
- tz = (tzsize <= TZBUFSIZE
+ tz = (tzsize == 1 ? NULL : (tzsize <= TZBUFSIZE
? memcpy (tzbuf, tz, tzsize)
- : xmemdup (tz, tzsize));
+ : xmemdup (tz, tzsize)));
}
return tz;
}
Copyright (C) 1995, 1997, 1998, 2003, 2004, 2005
Free Software Foundation, Inc.
- Copyright (c) 2005, 2006, 2007, 2010, 2016
+ Copyright (c) 2005, 2006, 2007, 2010, 2016, 2017
mirabilos <m@mirbsd.org>
This program is free software; you can redistribute it and/or modify
"@(""#)" #varname ": " string
#endif
-__IDSTRING(rcsid_code, "$MirOS: src/gnu/usr.bin/cvs/lib/getdate.y,v 1.11 2016/10/22 22:45:50 tg Exp $");
+__IDSTRING(rcsid_code, "$MirOS: src/gnu/usr.bin/cvs/lib/getdate.y,v 1.12 2017/03/26 15:54:06 tg Exp $");
/* placeholder line for __IDSTRING(rcsid_bron, "$miros: ..."); so that cpp #line directives work */
/* Shift A right by B bits portably, by dividing A by 2**B and
if (tz)
{
size_t tzsize = strlen (tz) + 1;
- tz = (tzsize <= TZBUFSIZE
+ tz = (tzsize == 1 ? NULL : (tzsize <= TZBUFSIZE
? memcpy (tzbuf, tz, tzsize)
- : xmemdup (tz, tzsize));
+ : xmemdup (tz, tzsize)));
}
return tz;
}
#include <sys/stat.h>
+__RCSID("$MirOS: src/gnu/usr.bin/cvs/lib/tempname.c,v 1.2 2017/03/26 15:54:06 tg Exp $");
+
#if _LIBC
# define struct_stat64 struct stat64
#else
if (try_tmpdir)
{
d = __secure_getenv ("TMPDIR");
- if (d != NULL && direxists (d))
+ if (d != NULL && *d && direxists (d))
dir = d;
else if (dir != NULL && direxists (dir))
/* nothing */ ;
+++ /dev/null
-# Allow the builder to specify an external ZLIB rather than the version
-# distributed with CVS.
-
-# Copyright (c) 2003
-# Anthon Pang <apang@telux.net>,
-# Derek R. Price, Ximbiot <http://ximbiot.com>,
-# and the 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.
-
-# ACX_WITH_EXTERNAL_ZLIB
-# -------------------
-# Determine which ZLIB to use.
-AC_DEFUN([ACX_WITH_EXTERNAL_ZLIB],[
-#
-# Use --with-zlib to build with a zlib other than the version distributed
-# with CVS.
-#
-# defaults to the included snapshot of zlib
-#
-AC_ARG_WITH([external-zlib],
- AC_HELP_STRING([--with-external-zlib],
- [Use the specified ZLIB library (defaults to
- the version distributed with the CVS source)]),
- [with_external_zlib=$withval],
- [with_external_zlib=no])
-
-#
-# Try to locate a ZLIB installation if no location was specified, assuming
-# external ZLIB was enabled.
-#
-if test -n "$acx_zlib_cv_external_zlib"; then
- # Granted, this is a slightly ugly way to print this info, but the
- # AC_CHECK_HEADER used in the search for a ZLIB installation makes using
- # AC_CACHE_CHECK worse
- AC_MSG_CHECKING([for external ZLIB])
-else :; fi
-AC_CACHE_VAL([acx_zlib_cv_external_zlib], [
- #
- # --with but no location specified
- # assume zlib.h locates our install.
- #
- acx_zlib_save_CPPFLAGS=$CPPFLAGS
- for acx_zlib_cv_external_zlib in yes /usr/local no; do
- if test x$acx_zlib_cv_external_zlib = xno; then
- break
- fi
- if test x$acx_zlib_cv_external_zlib = xyes; then
- AC_MSG_CHECKING([for external ZLIB])
- AC_MSG_RESULT([])
- else
- CPPFLAGS="$acx_zlib_save_CPPFLAGS -I$acx_zlib_cv_external_zlib/include"
- AC_MSG_CHECKING([for external ZLIB in $acx_zlib_cv_external_zlib])
- AC_MSG_RESULT([])
- fi
- unset ac_cv_header_zlib_h
- AC_CHECK_HEADERS([zlib.h])
- if test "$ac_cv_header_zlib_h" = yes; then
- break
- fi
- done
- CPPFLAGS=$acx_zlib_save_CPPFLAGS
-AC_MSG_CHECKING([for external ZLIB])
-])dnl
-AC_MSG_RESULT([$acx_zlib_cv_external_zlib])
-
-
-#
-# Output a pretty message naming our selected ZLIB "external" or "package"
-# so that any warnings printed by the version check make more sense.
-#
-AC_MSG_CHECKING([selected ZLIB])
-if test "x$with_external_zlib" = xno; then
- AC_MSG_RESULT([package])
-else
- AC_MSG_RESULT([external])
-fi
-
-
-#
-# Verify that the ZLIB we aren't using isn't newer than the one we are.
-#
-if test "x$acx_zlib_cv_external_zlib" != xno; then
- LOCAL_ZLIB_VERSION=`sed -n '/^#define ZLIB_VERSION ".*"$/{
- s/^#define ZLIB_VERSION "\(.*\)"$/\1/;
- p;}' <$srcdir/zlib/zlib.h 2>&AS_MESSAGE_LOG_FD`
- ACX_EXTRACT_HEADER_DEFN([ZLIB_VERSION], [zlib.h])
- ZLIB_VERSION=`echo "$ZLIB_VERSION" |sed 's/"//g'`
- ASX_VERSION_COMPARE([$LOCAL_ZLIB_VERSION], [$ZLIB_VERSION],
- [if test "x$with_external_zlib" = xno; then
- AC_MSG_WARN(
- [Found external ZLIB with a more recent version than the
- package version ($ZLIB_VERSION > $LOCAL_ZLIB_VERSION). configure with the
- --with-external-zlib option to select the more recent version.])
- fi],
- [],
- [if test "x$with_external_zlib" != xno; then
- AC_MSG_WARN(
- [Package ZLIB is more recent than requested external version
- ($LOCAL_ZLIB_VERSION > $ZLIB_VERSION). configure with the --without-external-zlib
- option to select the more recent version.])
- fi])
-fi
-
-
-# Now set with_external_zlib to our discovered value or the user specified
-# value, as appropriate.
-if test x$with_external_zlib = xyes; then
- with_external_zlib=$acx_zlib_cv_external_zlib
-fi
-# $with_external_zlib could still be "no"
-
-
-#
-# Set up ZLIB includes for later use.
-#
-if test x$with_external_zlib != xyes \
- && test x$with_external_zlib != no; then
- if test -z "$CPPFLAGS"; then
- CPPFLAGS="-I$with_external_zlib/include"
- else
- CPPFLAGS="$CPPFLAGS -I$with_external_zlib/include"
- fi
- if test -z "$LDFLAGS"; then
- LDFLAGS="-L$with_external_zlib/lib"
- else
- LDFLAGS="$LDFLAGS -L$with_external_zlib/lib"
- fi
-fi
-
-ZLIB_CPPFLAGS=
-ZLIB_LIBS=
-ZLIB_SUBDIRS=
-if test x$with_external_zlib = xno; then
- # We need ZLIB_CPPFLAGS so that later executions of cpp from configure
- # don't try to interpret $(top_srcdir)
- ZLIB_CPPFLAGS='-I$(top_srcdir)/zlib'
- ZLIB_LIBS='$(top_builddir)/zlib/libz.a'
- # ZLIB_SUBDIRS is only used in the top level Makefiles.
- ZLIB_SUBDIRS=zlib
-else
- # We know what to do now, so set up the CPPFLAGS, LDFLAGS, and LIBS for later
- # use.
- if test -z "$LIBS"; then
- LIBS=-lz
- else
- LIBS="$LIBS -lz"
- fi
-
- #
- # Verify external installed zlib works
- #
- # Ideally, we would also check that the version is newer
- #
- AC_MSG_CHECKING([that ZLIB library works])
- AC_TRY_LINK([#include <zlib.h>],
- [int i = Z_OK; const char *version = zlibVersion();],
- [AC_MSG_RESULT([yes])],
- [AC_MSG_RESULT([no])
- AC_MSG_ERROR([ZLIB failed to link])])
-fi
-
-dnl Subst for the local case
-AC_SUBST(ZLIB_SUBDIRS)dnl
-AC_SUBST(ZLIB_CPPFLAGS)dnl
-AC_SUBST(ZLIB_LIBS)dnl
-])
#include "buffer.h"
#include "save-cwd.h"
-__RCSID("$MirOS: src/gnu/usr.bin/cvs/src/client.c,v 1.6 2016/11/08 21:46:13 tg Exp $");
+__RCSID("$MirOS: src/gnu/usr.bin/cvs/src/client.c,v 1.7 2017/03/26 15:54:07 tg Exp $");
#ifdef CLIENT_SUPPORT
struct servent *s;
char *port_s;
- if (envname && (port_s = getenv (envname)))
+ if (envname && (port_s = getenv (envname)) && *port_s)
{
int port = atoi (port_s);
if (port <= 0)
command[0] = (root->cvs_server
? root->cvs_server : getenv ("CVS_SERVER"));
- if (!command[0])
+ if (!command[0] || !command[0][0])
# ifdef SERVER_SUPPORT
/* FIXME:
* I'm casting out the const below because I know that piped_child, the
#include "save-cwd.h"
#include "xsize.h"
+__RCSID("$MirOS: src/gnu/usr.bin/cvs/src/filesubr.c,v 1.4 2017/03/26 15:54:08 tg Exp $");
+
static int deep_remove_dir (const char *path);
/*
if (home != NULL)
return home;
- if (!server_active && (env = getenv ("HOME")) != NULL)
+ if (!server_active && (env = getenv ("HOME")) != NULL && *env)
home = env;
else if ((pw = (struct passwd *) getpwuid (getuid ()))
&& pw->pw_dir)
const char *
get_system_temp_dir (void)
{
- if (!tmpdir_env) tmpdir_env = getenv (TMPDIR_ENV);
+ if (!tmpdir_env) {
+ tmpdir_env = getenv (TMPDIR_ENV);
+ if (tmpdir_env && !*tmpdir_env)
+ tmpdir_env = NULL;
+ }
return tmpdir_env;
}
#include "cvs.h"
#include "buffer.h"
+__RCSID("$MirOS: src/gnu/usr.bin/cvs/src/log-buffer.c,v 1.2 2017/03/26 15:54:08 tg Exp $");
+
#if defined CLIENT_SUPPORT || defined SERVER_SUPPORT
/* We want to be able to log data sent between us and the server. We
* We do this _after_ authentication on purpose. Wouldn't really like to
* worry about logging passwords...
*/
- if (log)
+ if (log && *log)
{
int len = strlen (log);
char *buf = xmalloc (len + 5);
#include "cvs.h"
#include "getline.h"
-__RCSID("$MirOS: src/gnu/usr.bin/cvs/src/login.c,v 1.7 2016/11/08 23:04:37 tg Exp $");
+__RCSID("$MirOS: src/gnu/usr.bin/cvs/src/login.c,v 1.8 2017/03/26 15:54:08 tg Exp $");
/* There seems to be very little agreement on which system header
getpass is declared in. With a lot of fancy autoconfiscation,
char *passfile;
/* Environment should override file. */
- if ((passfile = getenv ("CVS_PASSFILE")) != NULL)
+ if ((passfile = getenv ("CVS_PASSFILE")) != NULL && *passfile)
return xstrdup (passfile);
/* Construct absolute pathname to user's password file. */
uint32_t arc4random(void);
#endif
-__RCSID("$MirOS: src/gnu/usr.bin/cvs/src/main.c,v 1.22 2017/01/08 19:13:05 tg Exp $");
+__RCSID("$MirOS: src/gnu/usr.bin/cvs/src/main.c,v 1.23 2017/03/26 15:54:08 tg Exp $");
const char *program_name;
const char *program_path;
* Query the environment variables up-front, so that
* they can be overridden by command line arguments
*/
- if ((cp = getenv (EDITOR1_ENV)) != NULL)
+ if ((cp = getenv (EDITOR1_ENV)) != NULL && *cp)
Editor = cp;
- else if ((cp = getenv (EDITOR2_ENV)) != NULL)
+ else if ((cp = getenv (EDITOR2_ENV)) != NULL && *cp)
Editor = cp;
- else if ((cp = getenv (EDITOR3_ENV)) != NULL)
+ else if ((cp = getenv (EDITOR3_ENV)) != NULL && *cp)
Editor = cp;
if (getenv (CVSREAD_ENV) != NULL)
cvswrite = 0;
a command-line flag to set the umask, since we'll have to
parse it before we get here. */
- if ((cp = getenv (CVSUMASK_ENV)) != NULL)
+ if ((cp = getenv (CVSUMASK_ENV)) != NULL && *cp)
{
/* FIXME: Should be accepting symbolic as well as numeric mask. */
cvsumask = strtol (cp, &end, 8) & 0777;
if (!CVSroot_parsed)
{
char *tmp = getenv (CVSROOT_ENV);
- if (tmp)
+ if (tmp && *tmp)
{
if (!(CVSroot_parsed = parse_cvsroot (tmp)))
error (1, 0, "Bad CVSROOT: `%s'.", tmp);
#include "history.h"
#include "save-cwd.h"
-__RCSID("$MirOS: src/gnu/usr.bin/cvs/src/mkmodules.c,v 1.14 2016/05/12 11:55:35 tg Exp $");
+__RCSID("$MirOS: src/gnu/usr.bin/cvs/src/mkmodules.c,v 1.16 2017/03/27 16:55:27 tg Exp $");
#ifndef DBLKSIZ
#define DBLKSIZ 4096 /* since GNU ndbm doesn't define it */
"# Set 'LogHistory' to 'all' or '" ALL_HISTORY_REC_TYPES "' to log all transactions to the\n",
"# history file, or a subset as needed (ie 'TMAR' logs all write operations)\n",
"#LogHistory=" ALL_HISTORY_REC_TYPES "\n",
+ "LogHistory=TMAR\n",
"\n",
"# Set 'RereadLogAfterVerify' to 'always' (the default) to allow the verifymsg\n",
"# script to change the log message. Set it to 'stat' to force CVS to verify\n",
}
}
- /* Turn on history logging by default. The user can remove the file
- to disable it. */
+ /* Turn on history logging of write operations by default.
+ The user can remove the file to disable it. */
strcpy (info, adm);
strcat (info, "/");
strcat (info, CVSROOTADM_HISTORY);
fp = xfopen (info, "w");
if (fclose (fp) < 0)
error (1, errno, "cannot close %s", info);
-
- /* Make the new history file world-writeable, since every CVS
- user will need to be able to write to it. We use chmod()
- because xchmod() is too shy. */
- chmod (info, 0666);
}
/* Make an empty val-tags file to prevent problems creating it later. */
fp = xfopen (info, "w");
if (fclose (fp) < 0)
error (1, errno, "cannot close %s", info);
-
- /* Make the new val-tags file world-writeable, since every CVS
- user will need to be able to write to it. We use chmod()
- because xchmod() is too shy. */
- chmod (info, 0666);
}
free (info);
#include "getline.h"
#include "history.h"
-__RCSID("$MirOS: src/gnu/usr.bin/cvs/src/parseinfo.c,v 1.12 2016/08/08 16:48:30 tg Exp $");
+__RCSID("$MirOS: src/gnu/usr.bin/cvs/src/parseinfo.c,v 1.15 2017/03/27 16:37:47 tg Exp $");
/*
* Parse the INFOFILE file for the specified REPOSITORY. Invoke CALLPROC for
}
else if (strcmp (line, "LogHistory") == 0)
{
- if (strcmp (p, "all") != 0)
- {
- static bool gotone = false;
- if (gotone)
- error (0, 0, "\
+ static char *prevpath = NULL;
+ static unsigned int prevln;
+
+ if (prevpath != NULL) {
+ error (0, 0, "\
%s [%u]: warning: duplicate LogHistory entry found.",
- infopath, ln);
- else
- gotone = true;
- free (retval->logHistory);
- retval->logHistory = xstrdup (p);
+ infopath, ln);
+ error (0, 0, "\
+%s [%u]: notice: this was the first definition.",
+ prevpath, prevln);
+ } else {
+ prevln = ln;
+ prevpath = xstrdup(infopath);
}
+ free(retval->logHistory);
+ retval->logHistory = xstrdup(strcmp(p, "all") ? p :
+ ALL_HISTORY_REC_TYPES);
}
else if (strcmp (line, "RereadLogAfterVerify") == 0)
{
# endif
#endif
-__RCSID("$MirOS: src/gnu/usr.bin/cvs/src/rcs.c,v 1.13 2012/04/22 14:57:41 tg Exp $");
+__RCSID("$MirOS: src/gnu/usr.bin/cvs/src/rcs.c,v 1.14 2017/03/26 15:54:09 tg Exp $");
/* The RCS -k options, and a set of enums that must match the array.
These come first so that we can use enum kflag in function
check_rev = xrev;
local_branch_num = getenv("CVS_LOCAL_BRANCH_NUM");
- if (local_branch_num)
+ if (local_branch_num && *local_branch_num)
{
rev_num = atoi(local_branch_num);
if (rev_num < 2)
#include "cvs.h"
#include "buffer.h"
-__RCSID("$MirOS: src/gnu/usr.bin/cvs/src/rsh-client.c,v 1.5 2011/06/11 00:39:38 tg Exp $");
+__RCSID("$MirOS: src/gnu/usr.bin/cvs/src/rsh-client.c,v 1.6 2017/03/26 15:54:10 tg Exp $");
#ifdef CLIENT_SUPPORT
char *rsh_argv[16];
char argvport[16];
- if (!cvs_rsh)
+ if (!cvs_rsh || !*cvs_rsh)
/* People sometimes suggest or assume that this should default
to "remsh" on systems like HPUX in which that is the
system-supplied name for the rsh program. However, that
if that is what they want (the manual already tells them
that). */
cvs_rsh = RSH_DFLT;
- if (!cvs_server)
+ if (!cvs_server || !*cvs_server)
cvs_server = "cvs";
/* The command line starts out with rsh. */
int tofd, fromfd;
int child_pid;
- if (!cvs_rsh)
+ if (!cvs_rsh || !*cvs_rsh)
cvs_rsh = RSH_DFLT;
- if (!cvs_server)
+ if (!cvs_server || !*cvs_server)
cvs_server = "cvs";
/* Pass the command to rsh as a single string. This shouldn't
#! /bin/sh
:
-# $MirOS: src/gnu/usr.bin/cvs/src/sanity.sh,v 1.7 2017/01/08 21:14:34 tg Exp $
+# $MirOS: src/gnu/usr.bin/cvs/src/sanity.sh,v 1.16 2017/03/26 22:53:34 tg Exp $
#-
# set DISABLE_ANY_RSH=1 to skip rsh and ssh calls
#
usage ()
{
echo "Usage: `basename $0` --help"
- echo "Usage: `basename $0` [--eklr] [-c CONFIG-FILE] [-f FROM-TEST] \\"
+ echo "Usage: `basename $0` [-eklnpr] [-c CONFIG-FILE] [-f FROM-TEST] \\"
echo " [-h HOSTNAME] [-s CVS-FOR-CVS-SERVER] CVS-TO-TEST \\"
echo " [TESTS-TO-RUN...]"
}
{
usage
echo
- echo "-H|--help display this text"
+ echo "-H|--help display this text"
echo "-c CONFIG-FILE"
echo "--config=CONFIG_FILE"
- echo " use an alternate test suite config file (defaults to"
- echo " \`sanity.config.sh' in the same directory as"
- echo " CVS-TO-TEST is found in)"
- echo "-e|--skipfail Treat tests that would otherwise be nonfatally skipped"
- echo " for reasons like missing tools as failures, exiting"
- echo " with an error message. Also treat warnings as"
- echo " failures."
+ echo " use an alternate test suite config file (defaults to"
+ echo " 'sanity.config.sh' in the same directory as"
+ echo " CVS-TO-TEST is found in)"
+ echo "-e|--skipfail Treat tests that would otherwise be nonfatally skipped"
+ echo " for reasons like missing tools as failures, exiting"
+ echo " with an error message. Also treat warnings as"
+ echo " failures."
echo "-f FROM-TEST"
echo "--from-test=FROM-TEST"
- echo " run TESTS-TO-RUN, skipping all tests in the list before"
- echo " FROM-TEST"
+ echo " run TESTS-TO-RUN, skipping all tests in the list before"
+ echo " FROM-TEST"
echo "-h HOSTNAME"
echo "--hostname HOSTNAME"
- echo " Use :ext:HOSTNAME to run remote tests rather than"
- echo " :fork:. Implies --remote and assumes that \$TESTDIR"
- echo " resolves to the same directory on both the client and"
- echo " the server."
- echo "-k|--keep try to keep directories created by individual tests"
- echo " around, exiting after the first test which supports"
- echo " --keep"
- echo "-l|--link-root"
- echo " test CVS using a symlink to a real CVSROOT"
- echo "-n|--noredirect"
- echo " test a secondary/primary CVS server (writeproxy)"
- echo " configuration with the Redirect response disabled"
- echo " (implies --proxy)."
- echo "-p|--proxy test a secondary/primary CVS server (writeproxy)"
- echo " configuration (implies --remote)."
- echo "-r|--remote test client/server, as opposed to local, CVS"
+ echo " Use :ext:HOSTNAME to run remote tests rather than"
+ echo " :fork:. Implies --remote and assumes that \$TESTDIR"
+ echo " resolves to the same directory on both the client and"
+ echo " the server."
+ echo "-k|--keep try to keep directories created by individual tests"
+ echo " around, exiting after the first test which supports"
+ echo " --keep"
+ echo "-l|--link-root test CVS using a symlink to a real CVSROOT"
+ echo "-n|--noredirect test a secondary/primary CVS server (writeproxy)"
+ echo " configuration with the Redirect response disabled"
+ echo " (implies --proxy)."
+ echo "-p|--proxy test a secondary/primary CVS server (writeproxy)"
+ echo " configuration (implies --remote)."
+ echo "-r|--remote test client/server, as opposed to local, CVS"
echo "-s CVS-FOR-CVS-SERVER"
echo "--server=CVS-FOR-CVS-SERVER"
- echo " use CVS-FOR-CVS-SERVER as the path to the CVS SERVER"
- echo " executable to be tested (defaults to CVS-TO-TEST and"
- echo " implies --remote)"
- echo
- echo "CVS-TO-TEST the path to the CVS executable to be tested; used as"
- echo " the path to the CVS client when CVS-FOR-CVS-SERVER is"
- echo " specified"
- echo "TESTS-TO-RUN the names of the tests to run (defaults to all tests)"
+ echo " use CVS-FOR-CVS-SERVER as the path to the CVS SERVER"
+ echo " executable to be tested (defaults to CVS-TO-TEST and"
+ echo " implies --remote)"
+ echo ""
+ echo "CVS-TO-TEST the path to the CVS executable to be tested; used as"
+ echo " the path to the CVS client when CVS-FOR-CVS-SERVER is"
+ echo " specified"
+ echo "TESTS-TO-RUN the names of the tests to run (defaults to all tests)"
exit 2
}
checklongoptarg()
{
if test "x$1" != xoptional && test -z "$OPTARG"; then
- echo "option \`--$LONGOPT' requires an argument" >&2
+ echo "option '--$LONGOPT' requires an argument" >&2
exit_usage
fi
}
checklongoptarg
;;
h)
- echo "\`--h' is ambiguous. Could mean \`--help' or \`--hostname'" >&2
+ echo "'--h' is ambiguous. Could mean '--help' or '--hostname'" >&2
exit_usage
;;
he|hel|help)
OPTARG=
;;
s)
- echo "\`--s' is ambiguous. Could mean \`--server' or \`--skipfail'" >&2
+ echo "'--s' is ambiguous. Could mean '--server' or '--skipfail'" >&2
exit_usage
;;
se|ser|serv|serve|server)
. "$configfile"
else
echo "WARNING: Failed to locate test suite config file" >&2
- echo " \`$configfile'." >&2
+ echo " '$configfile'." >&2
fi
# Verify that $CVS_RSH $remotehost works.
result=`$CVS_RSH $remotehost 'echo test'`
if test $? != 0 || test "x$result" != "xtest"; then
- echo "\`$CVS_RSH $remotehost' failed." >&2
+ echo "'$CVS_RSH $remotehost' failed." >&2
exit 1
fi
fi
fi
if $CVS_RSH $remotehost "${servercvs} --version </dev/null |
grep '^Concurrent.*(.*server)$' >/dev/null 2>&1"; then :; else
- echo "CVS executable \`$remotehost:${servercvs}' does not contain server support." >&2
+ echo "CVS executable '$remotehost:${servercvs}' does not contain server support." >&2
exit 1
fi
else
fi
if ${servercvs} --version </dev/null |
grep '^Concurrent.*(.*server)$' >/dev/null 2>&1; then :; else
- echo "CVS executable \`${servercvs}' does not contain server support." >&2
+ echo "CVS executable '${servercvs}' does not contain server support." >&2
exit 1
fi
fi
if $remote; then
if ${testcvs} --version </dev/null |
grep '^Concurrent.*(client.*)$' >/dev/null 2>&1; then :; else
- echo "CVS executable \`${testcvs}' does not contain client support." >&2
+ echo "CVS executable '${testcvs}' does not contain client support." >&2
exit 1
fi
fi
dokeep()
{
if ${keep}; then
- echo "Keeping ${TESTDIR} for test case \`${what}' and exiting due to --keep"
+ echo "Keeping ${TESTDIR} for test case '${what}' and exiting due to --keep"
exit 0
fi
}
echo '(Note that the test can take an hour or more to run and periodically stops'
echo 'for as long as one minute. Do not assume there is a problem just because'
echo 'nothing seems to happen for a long time. If you cannot live without'
-echo "running status, try the command: \`tail -f check.log' from another window.)"
+echo "running status, try the command: 'tail -f check.log' from another window.)"
# Regexp to match what the CVS client will call itself in output that it prints.
# FIXME: we don't properly quote this--if the name contains . we'll
fi
fi
if $verbad; then
- echo "The command \`$vercmd' does not support the --version option."
+ echo "The command '$vercmd' does not support the --version option."
fi
# It does not really matter that --version is not supported
return 0
fi
done
if test -n "$TOOL"; then
- echo "Notice: The default version of \`$default_TOOL' is defective." >>$LOGFILE
- echo "using \`$TOOL' and hoping for the best." >>$LOGFILE
- echo "Notice: The default version of \`$default_TOOL' is defective." >&2
- echo "using \`$TOOL' and hoping for the best." >&2
+ echo "Notice: The default version of '$default_TOOL' is defective." >>$LOGFILE
+ echo "using '$TOOL' and hoping for the best." >>$LOGFILE
+ echo "Notice: The default version of '$default_TOOL' is defective." >&2
+ echo "using '$TOOL' and hoping for the best." >&2
echo $TOOL
else
echo $default_TOOL
if $id -u >/dev/null 2>&1 && $id -un >/dev/null 2>&1; then
return 0
else
- echo "Running these tests requires an \`id' program that understands the"
+ echo "Running these tests requires an 'id' program that understands the"
echo "-u and -n flags. Make sure that such an id (GNU, or many but not"
echo "all vendor-supplied versions) is in your path."
return 1
else
DOTSTAR='\(.\|
\)*'
- echo "Notice: DOTSTAR changed from sane \`.*' value to \`$DOTSTAR\`"
- echo "to workaround GNU expr version 1.10 thru 1.12 bug where \`.'"
+ echo "Notice: DOTSTAR changed from sane '.*' value to '$DOTSTAR'"
+ echo "to workaround GNU expr version 1.10 thru 1.12 bug where '.'"
echo "does not match a newline."
fi
return 0
rm -rf $TESTDIR/ls-test
fi
if $ls $TESTDIR/ls-test >/dev/null 2>&1; then
- echo "Notice: \`$ls' is defective."
+ echo "Notice: '$ls' is defective."
echo 'This is a version of ls which does not correctly'
echo 'return false for files that do not exist. Some tests may'
echo 'spuriously pass or fail.'
result=`$1 $host 'echo test'`
rc=$?
if test $? != 0 || test "x$result" != "xtest"; then
- skipreason="\`$1 $host' failed rc=$rc result=$result"
+ skipreason="'$1 $host' failed rc=$rc result=$result"
return 77
fi
fail ()
{
echo "FAIL: $1" | tee -a ${LOGFILE}
- echo "*** Please see the \`TESTS' and \`check.log' files for more information." >&2
+ echo "*** Please see the 'TESTS' and 'check.log' files for more information." >&2
# This way the tester can go and see what remnants were left
exit 1
}
count=`expr $count + 1`
done
if test $count != 1; then
- echo "No such test \`$fromtest'." >&2
+ echo "No such test '$fromtest'." >&2
exit 2
fi
# make sure it is in $tests
*" $fromtest "*)
;;
*)
- echo "No such test \`$fromtest'." >&2
+ echo "No such test '$fromtest'." >&2
exit 2
;;
esac
###
dotest init-1 "$testcvs init"
-# We might need to allow "cvs admin" access.
+# We might need to allow "cvs admin" access and full history.
mkdir wnt
cd wnt
dotest init-1a "$testcvs -q co CVSROOT" "[UP] CVSROOT${DOTSTAR}"
cd CVSROOT
-sed -e's/^#UserAdminOptions=/UserAdminOptions=/' <config >tmpconfig
+sed -e 's/^#UserAdminOptions=/UserAdminOptions=/' \
+ -e '/^LogHistory/d' \
+ <config >tmpconfig
mv tmpconfig config
dotest init-1b "$testcvs -q ci -m allow-cvs-admin" "" \
".*/CVSROOT/config,v <-- config
cd ../..
rm -r wnt
+write_secondary_wrapper() { :; }
+CVS_SERVER_secondary_wrapper_orig=$CVS_SERVER
+
# Now hide the primary root behind a secondary if requested.
if $proxy; then
# Save the primary root.
if $noredirect; then
# Wrap the CVS server to allow --primary-root to be set by the
# secondary.
+ write_secondary_wrapper() {
cat <<EOF >$TESTDIR/secondary-wrapper
#! $TESTSHELL
CVS_SERVER=$TESTDIR/primary-wrapper
# No need to check the PID of the last client since we are testing with
# Redirect disabled.
-proot_arg="--allow-root=$SECONDARY_CVSROOT_DIRNAME"
-exec $CVS_SERVER \$proot_arg "\$@"
+proot_arg="--allow-root=$SECONDARY_CVSROOT_DIRNAME --allow-root=$PRIMARY_CVSROOT_DIRNAME"
+exec $CVS_SERVER_secondary_wrapper_orig \$proot_arg "\$@"
EOF
cat <<EOF >$TESTDIR/primary-wrapper
#! $TESTSHELL
fi
exec $CVS_SERVER "\$@"
EOF
-
+ }
+ write_secondary_wrapper
CVS_SERVER_secondary=$TESTDIR/secondary-wrapper
CVS_SERVER=$CVS_SERVER_secondary
# were written to.
case "\$cmd" in
add|import)
- # For \`add', we need a recursive update due to quirks in rsync syntax,
+ # For 'add', we need a recursive update due to quirks in rsync syntax,
# but it shouldn't affect efficiency since any new dir should be empty.
#
- # For \`import', a recursive update is necessary since subdirs may have
+ # For 'import', a recursive update is necessary since subdirs may have
# been added underneath the root dir we were passed.
$RSYNC -rglop \\
$PRIMARY_CVSROOT_DIRNAME/"\$dir" \\
;;
tag)
- # \`tag' may have changed CVSROOT/val-tags too.
+ # 'tag' may have changed CVSROOT/val-tags too.
$RSYNC -glop \\
$PRIMARY_CVSROOT_DIRNAME/CVSROOT/val-tags \\
$SECONDARY_CVSROOT_DIRNAME/CVSROOT
###
dotest init-2 "$testcvs init"
-# We might need to allow "cvs admin" access.
+# We might need to allow "cvs admin" access and full history.
mkdir wnt
cd wnt
dotest init-2a "$testcvs -q co CVSROOT" "[UP] CVSROOT${DOTSTAR}"
cd CVSROOT
-sed -e's/^#UserAdminOptions=/UserAdminOptions=/' <config >tmpconfig
+sed -e 's/^#UserAdminOptions=/UserAdminOptions=/' \
+ -e '/^LogHistory/d' \
+ <config >tmpconfig
mv tmpconfig config
dotest init-2b "$testcvs -q ci -m allow-cvs-admin" "" \
".*/CVSROOT/config,v <-- config
# texts that can be used and explicitly leaves open the format
# of these messages. Also, GNU getopt is broken and does not
# use __progname in the first place. *sigh* -- mirabilos
+ # Also supporting either argv0 with both errors and optional
+ # quotes now. -- mirabilos
dotest_fail basicb-21 "${testcvs} -q admin -H" \
-"admin: invalid option -- '*H'*
+"admin: i[ln][lv][ea][gl][ai][ld] option -- '*H'*
${CPROG} \[admin aborted\]: specify ${CPROG} -H admin for usage information" \
-"cvs: illegal option -- '*H'*
+"cvs: i[ln][lv][ea][gl][ai][ld] option -- '*H'*
${CPROG} \[admin aborted\]: specify ${CPROG} -H admin for usage information"
cd ..
rmdir 1
dotest parseroot3-9 "$testcvs -Q co -ldtop ."
dotest parseroot3-10 "test -d top"
dotest parseroot3-11 "test -d top/CVS"
- dotest parseroot3-10 "cat top/CVS/Root" "$CVSROOT"
+ dotest parseroot3-12 "cat top/CVS/Root" "$CVSROOT"
dokeep
cd ..
testcvs2="$testcvs -d '$CVSROOT2'"
dotest multiroot-setup-1 "mkdir $CVSROOT1_DIRNAME $CVSROOT2_DIRNAME"
+
dotest multiroot-setup-2 "$testcvs1 init"
+ # remove automatically-created LogHistory to work around the fact
+ # that CVS does not track those per root (and thus warns about
+ # encountering multiple of these entries)
+ mkdir wrkarnd; cd wrkarnd
+ dotest multiroot-setup-2a "$testcvs1 -q co CVSROOT" "[UP] CVSROOT${DOTSTAR}"
+ cd CVSROOT
+ sed -e '/^LogHistory/d' <config >tmpconfig
+ mv tmpconfig config
+ dotest multiroot-setup-2b "$testcvs1 -q ci -m workaround-LogHistory" "" \
+".*/CVSROOT/config,v <-- config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+ cd ../..; rm -r wrkarnd
+
dotest multiroot-setup-3 "$testcvs2 init"
+ # remove automatically-created LogHistory to work around the fact
+ # that CVS does not track those per root (and thus warns about
+ # encountering multiple of these entries)
+ mkdir wrkarnd; cd wrkarnd
+ dotest multiroot-setup-3a "$testcvs2 -q co CVSROOT" "[UP] CVSROOT${DOTSTAR}"
+ cd CVSROOT
+ sed -e '/^LogHistory/d' <config >tmpconfig
+ mv tmpconfig config
+ dotest multiroot-setup-3b "$testcvs2 -q ci -m workaround-LogHistory" "" \
+".*/CVSROOT/config,v <-- config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+ cd ../..; rm -r wrkarnd
#
# create some directories in ${CVSROOT1_DIRNAME}
CVSROOT2=`newroot $CVSROOT2_DIRNAME`
dotest multiroot2-1 "${testcvs} -d ${CVSROOT1} init" ""
+ # remove automatically-created LogHistory to work around the fact
+ # that CVS does not track those per root (and thus warns about
+ # encountering multiple of these entries)
+ mkdir wrkarnd; cd wrkarnd
+ dotest multiroot2-1a "$testcvs -d ${CVSROOT1} -q co CVSROOT" "[UP] CVSROOT${DOTSTAR}"
+ cd CVSROOT
+ sed -e '/^LogHistory/d' <config >tmpconfig
+ mv tmpconfig config
+ dotest multiroot2-1b "$testcvs -d ${CVSROOT1} -q ci -m workaround-LogHistory" "" \
+".*/CVSROOT/config,v <-- config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+ cd ../..; rm -r wrkarnd
dotest multiroot2-2 "${testcvs} -d ${CVSROOT2} init" ""
+ mkdir wrkarnd; cd wrkarnd
+ dotest multiroot2-2a "$testcvs -d ${CVSROOT2} -q co CVSROOT" "[UP] CVSROOT${DOTSTAR}"
+ cd CVSROOT
+ sed -e '/^LogHistory/d' <config >tmpconfig
+ mv tmpconfig config
+ dotest multiroot2-2b "$testcvs -d ${CVSROOT2} -q ci -m workaround-LogHistory" "" \
+".*/CVSROOT/config,v <-- config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+ cd ../..; rm -r wrkarnd
mkdir imp-dir; cd imp-dir
echo file1 >file1
mkdir 1; cd 1
dotest multiroot3-1 "${testcvs} -d ${CVSROOT1} init" ""
+ mkdir wrkarnd; cd wrkarnd
+ dotest multiroot3-1a "$testcvs -d ${CVSROOT1} -q co CVSROOT" "[UP] CVSROOT${DOTSTAR}"
+ cd CVSROOT
+ sed -e '/^LogHistory/d' <config >tmpconfig
+ mv tmpconfig config
+ dotest multiroot3-1b "$testcvs -d ${CVSROOT1} -q ci -m workaround-LogHistory" "" \
+".*/CVSROOT/config,v <-- config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+ cd ../..; rm -r wrkarnd
dotest multiroot3-2 "${testcvs} -d ${CVSROOT1} -q co -l ." ""
mkdir dir1
dotest multiroot3-3 "${testcvs} add dir1" \
"Directory ${TESTDIR}/root1/dir1 put under version control"
dotest multiroot3-4 "${testcvs} -d ${CVSROOT2} init" ""
rm -r CVS
+ mkdir wrkarnd; cd wrkarnd
+ dotest multiroot3-4a "$testcvs -d ${CVSROOT2} -q co CVSROOT" "[UP] CVSROOT${DOTSTAR}"
+ cd CVSROOT
+ sed -e '/^LogHistory/d' <config >tmpconfig
+ mv tmpconfig config
+ dotest multiroot3-4b "$testcvs -d ${CVSROOT2} -q ci -m workaround-LogHistory" "" \
+".*/CVSROOT/config,v <-- config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+ cd ../..; rm -r wrkarnd
dotest multiroot3-5 "${testcvs} -d ${CVSROOT2} -q co -l ." ""
mkdir dir2
mkdir 1; cd 1
dotest multiroot4-1 "${testcvs} -d ${CVSROOT1} init" ""
+ mkdir wrkarnd; cd wrkarnd
+ dotest multiroot4-1a "$testcvs -d ${CVSROOT1} -q co CVSROOT" "[UP] CVSROOT${DOTSTAR}"
+ cd CVSROOT
+ sed -e '/^LogHistory/d' <config >tmpconfig
+ mv tmpconfig config
+ dotest multiroot4-1b "$testcvs -d ${CVSROOT1} -q ci -m workaround-LogHistory" "" \
+".*/CVSROOT/config,v <-- config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+ cd ../..; rm -r wrkarnd
dotest multiroot4-2 "${testcvs} -d ${CVSROOT1} -q co -l ." ""
mkdir dircom
dotest multiroot4-3 "${testcvs} add dircom" \
cd ../..
mkdir 2; cd 2
dotest multiroot4-6 "${testcvs} -d ${CVSROOT2} init" ""
+ mkdir wrkarnd; cd wrkarnd
+ dotest multiroot4-6a "$testcvs -d ${CVSROOT2} -q co CVSROOT" "[UP] CVSROOT${DOTSTAR}"
+ cd CVSROOT
+ sed -e '/^LogHistory/d' <config >tmpconfig
+ mv tmpconfig config
+ dotest multiroot4-6b "$testcvs -d ${CVSROOT2} -q ci -m workaround-LogHistory" "" \
+".*/CVSROOT/config,v <-- config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+ cd ../..; rm -r wrkarnd
dotest multiroot4-7 "${testcvs} -d ${CVSROOT2} -q co -l ." ""
mkdir dircom
dotest multiroot4-8 "${testcvs} add dircom" \
noop
EOF
- dotest 2-3 "${servercvs} server" \
+ dotest server2-3 "${servercvs} server" \
"E protocol error: directory '${TESTDIR}' not within root '${CVSROOT_DIRNAME}'
error " <<EOF
Root ${CVSROOT_DIRNAME}
Unchanged foo/bar
noop
EOF
+
+ dotest server2-5 \
+"${servercvs} --allow-root=${CVSROOT_DIRNAME}.bad server" \
+"E Bad root ${CVSROOT_DIRNAME}
+error " <<EOF
+Root ${CVSROOT_DIRNAME}
+noop
+EOF
+ dotest server2-6 \
+"${servercvs} --allow-root=${CVSROOT_DIRNAME} server" \
+"ok" <<EOF
+Root ${CVSROOT_DIRNAME}
+noop
+EOF
servercvs=$save_servercvs
fi
;;
SECONDARY_CVSROOT_save=$SECONDARY_CVSROOT
SECONDARY_CVSROOT_DIRNAME=$TESTDIR/writeproxy_cvsroot
SECONDARY_CVSROOT=`newroot $SECONDARY_CVSROOT_DIRNAME`
+ write_secondary_wrapper
# Initialize the primary repository
dotest writeproxy-init-1 "$testcvs -d$PRIMARY_CVSROOT init"
ALL (cat >/dev/null; echo %R) >$TESTDIR/referrer
ALL $RSYNC -gopr --delete $PRIMARY_CVSROOT_DIRNAME/ $SECONDARY_CVSROOT_DIRNAME
EOF
+ # remove automatically-created LogHistory to work around the fact
+ # that we see both writeproxy and primary config here
+ sed -e '/^LogHistory/d' <config >tmpconfig
+ mv tmpconfig config
cat >>config <<EOF
PrimaryServer=$PRIMARY_CVSROOT
EOF
PRIMARY_CVSROOT=$PRIMARY_CVSROOT_save
SECONDARY_CVSROOT_DIRNAME=$SECONDARY_CVSROOT_DIRNAME_save
SECONDARY_CVSROOT=$SECONDARY_CVSROOT_save
+ write_secondary_wrapper
;;
PRIMARY_CVSROOT=`newroot $PRIMARY_CVSROOT_DIRNAME`
SECONDARY_CVSROOT_DIRNAME_save=$SECONDARY_CVSROOT_DIRNAME
SECONDARY_CVSROOT_DIRNAME=$TESTDIR/writeproxy_cvsroot
+ write_secondary_wrapper
# Initialize the primary repository
dotest writeproxy-noredirect-init-1 \
-"$testcvs -d'$PRIMARY_CVSROOT' init"
+"$testcvs -d'$PRIMARY_CVSROOT_DIRNAME' init"
mkdir writeproxy-noredirect; cd writeproxy-noredirect
mkdir primary; cd primary
dotest writeproxy-noredirect-init-2 \
cat >>loginfo <<EOF
ALL $RSYNC -gopr --delete $PRIMARY_CVSROOT_DIRNAME/ $SECONDARY_CVSROOT_DIRNAME
EOF
+ # remove automatically-created LogHistory to work around the fact
+ # that we see both writeproxy and primary config here
+ sed -e '/^LogHistory/d' <config >tmpconfig
+ mv tmpconfig config
cat >>config <<EOF
PrimaryServer=$PRIMARY_CVSROOT
EOF
PRIMARY_CVSROOT_DIRNAME=$PRIMARY_CVSROOT_DIRNAME_save
PRIMARY_CVSROOT=$PRIMARY_CVSROOT_save
SECONDARY_CVSROOT_DIRNAME=$SECONDARY_CVSROOT_DIRNAME_save
+ write_secondary_wrapper
;;
PRIMARY_CVSROOT=:ext:$host:$PRIMARY_CVSROOT_DIRNAME
SECONDARY_CVSROOT_DIRNAME=$TESTDIR/writeproxy_cvsroot
SECONDARY_CVSROOT=":ext;Redirect=yes:$host:$SECONDARY_CVSROOT_DIRNAME"
+ write_secondary_wrapper
# Initialize the primary repository
dotest writeproxy-ssh-init-1 "$testcvs -d$PRIMARY_CVSROOT init"
cat >>loginfo <<EOF
ALL echo Referrer=%R; cat >/dev/null
EOF
+ # remove automatically-created LogHistory to work around the fact
+ # that we see both writeproxy and primary config here
+ sed -e '/^LogHistory/d' <config >tmpconfig
+ mv tmpconfig config
cat >>config <<EOF
PrimaryServer=$PRIMARY_CVSROOT
EOF
PRIMARY_CVSROOT=$PRIMARY_CVSROOT_save
SECONDARY_CVSROOT_DIRNAME=$SECONDARY_CVSROOT_DIRNAME_save
SECONDARY_CVSROOT=$SECONDARY_CVSROOT_save
+ write_secondary_wrapper
;;
PRIMARY_CVSROOT=:ext:$host:$PRIMARY_CVSROOT_DIRNAME
SECONDARY_CVSROOT_DIRNAME=$TESTDIR/writeproxy_cvsroot
SECONDARY_CVSROOT=":ext;Redirect=no:$host:$PRIMARY_CVSROOT_DIRNAME"
+ write_secondary_wrapper
# Initialize the primary repository
dotest writeproxy-ssh-noredirect-init-1 \
cat >>loginfo <<EOF
ALL echo Referrer=%R; cat >/dev/null
EOF
+ # remove automatically-created LogHistory to work around the fact
+ # that we see both writeproxy and primary config here
+ sed -e '/^LogHistory/d' <config >tmpconfig
+ mv tmpconfig config
cat >>config <<EOF
PrimaryServer=$PRIMARY_CVSROOT
EOF
# No need to check the PID of the last client since we are testing with
# Redirect disabled.
proot_arg="--allow-root ${PRIMARY_CVSROOT##*:} --allow-root=$SECONDARY_CVSROOT_DIRNAME"
-exec $CVS_SERVER \$proot_arg "\$@"
+exec $CVS_SERVER_secondary_wrapper_orig \$proot_arg "\$@"
EOF
cat <<EOF >$TESTDIR/writeproxy-primary-wrapper
#! $TESTSHELL
PRIMARY_CVSROOT=$PRIMARY_CVSROOT_save
SECONDARY_CVSROOT_DIRNAME=$SECONDARY_CVSROOT_DIRNAME_save
SECONDARY_CVSROOT=$SECONDARY_CVSROOT_save
+ write_secondary_wrapper
rm $TESTDIR/writeproxy-secondary-wrapper \
$TESTDIR/writeproxy-primary-wrapper
CVS_SERVER=$CVS_SERVER_save
extendedinfo="$extendedinfo)"
fi
+echo "OK, all $passed tests passed$extendedinfo." >>$LOGFILE
echo "OK, all $passed tests passed$extendedinfo."
# TODO:
#include "getline.h"
#include "getnline.h"
-__RCSID("$MirOS: src/gnu/usr.bin/cvs/src/server.c,v 1.11 2016/11/09 02:54:33 tg Exp $");
+__RCSID("$MirOS: src/gnu/usr.bin/cvs/src/server.c,v 1.12 2017/03/26 15:54:10 tg Exp $");
int server_active = 0;
* Set this in .bashrc if you want to give yourself time to attach
* to the subprocess with a debugger.
*/
- if (getenv ("CVS_SERVER_SLEEP"))
+ if (getenv("CVS_SERVER_SLEEP") && *getenv("CVS_SERVER_SLEEP"))
{
int secs = atoi (getenv ("CVS_SERVER_SLEEP"));
TRACE (TRACE_DATA, "Sleeping CVS_SERVER_SLEEP (%d) seconds", secs);
* Set this in .bashrc if you want to give yourself time to attach
* to the subprocess with a debugger.
*/
- if (getenv ("CVS_PARENT_SERVER_SLEEP"))
+ if (getenv("CVS_PARENT_SERVER_SLEEP") && *getenv("CVS_PARENT_SERVER_SLEEP"))
{
int secs = atoi (getenv ("CVS_PARENT_SERVER_SLEEP"));
TRACE (TRACE_DATA, "Sleeping CVS_PARENT_SERVER_SLEEP (%d) seconds",
# include <wchar.h>
#endif
-__RCSID("$MirOS: src/gnu/usr.bin/cvs/src/subr.c,v 1.6 2011/07/28 15:54:35 tg Exp $");
+__RCSID("$MirOS: src/gnu/usr.bin/cvs/src/subr.c,v 1.7 2017/03/26 15:54:12 tg Exp $");
extern char *getlogin (void);
char *name;
/* super-user; try getlogin() to distinguish */
- if (((name = getlogin ()) || (name = getenv("LOGNAME")) ||
- (name = getenv("USER"))) && *name)
+ name = getlogin();
+ if (!name || !*name)
+ name = getenv("LOGNAME");
+ if (!name || !*name)
+ name = getenv("USER");
+ if (name && *name)
{
cache = xstrdup (name);
return cache;
#include "cvs.h"
#include "getline.h"
-__RCSID("$MirOS: src/gnu/usr.bin/cvs/src/wrapper.c,v 1.3 2010/09/19 19:43:13 tg Exp $");
+__RCSID("$MirOS: src/gnu/usr.bin/cvs/src/wrapper.c,v 1.4 2017/03/26 15:54:12 tg Exp $");
/*
Original Author: athan@morgan.com <Andrew C. Athan> 2/1/94
/* Search for the wild card */
while (*line && isspace ((unsigned char) *line))
++line;
+ if (!*line)
+ return;
for (temp = line;
*line && !isspace ((unsigned char) *line);
++line)