--- cvs-1.12.13+real.orig/AUTHORS +++ cvs-1.12.13+real/AUTHORS @@ -57,6 +57,12 @@ There have been many, many contributions not listed here. Consult the individual ChangeLog files in each directory for a more complete idea. +Thorsten Glaser is responsible for the MirOS extensions, +some of which were inspired by changes to GNU CVS 1.11.1p1 by other BSDs, +and did the MirOS BSD port as well as the MirPorts Framework packaging. + +This port also contains a fair number of the previous Debian package's patches. + In addition to the above contributors, the following Beta testers deserve special mention for their support. This is only a partial list; if you have helped in this way and would like to be listed, let --- cvs-1.12.13+real.orig/DEVEL-CVS +++ cvs-1.12.13+real/DEVEL-CVS @@ -7,7 +7,8 @@ Policies regarding the CVS source repository: By checking items into the repository, developers agree to permit -distribution of such items under the terms of the GNU Public License. +distribution of such items under the terms of the GNU General Public +License. ---------------------------------------------------------------------- Procedure for dealing with people who want to be developers: --- cvs-1.12.13+real.orig/HACKING +++ cvs-1.12.13+real/HACKING @@ -403,8 +403,8 @@ for each issue. Use context diffs or unidiffs for patches. Include words like "I grant permission to distribute this patch under -the terms of the GNU Public License" with your patch. By sending a -patch to bug-cvs@nongnu.org, you implicitly grant this permission. +the terms of the GNU General Public License" with your patch. By sending +a patch to bug-cvs@nongnu.org, you implicitly grant this permission. Submitting a patch to bug-cvs is the way to reach the people who have signed up to receive such submissions (including CVS developers), but --- cvs-1.12.13+real.orig/configure +++ cvs-1.12.13+real/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for Concurrent Versions System (CVS) 1.12.13. +# Generated by GNU Autoconf 2.59 for Concurrent Versions System (CVS) 1.12.13-MirDebian-8. # # Report bugs to . # @@ -283,8 +283,8 @@ # Identity of this package. PACKAGE_NAME='Concurrent Versions System (CVS)' PACKAGE_TARNAME='cvs' -PACKAGE_VERSION='1.12.13' -PACKAGE_STRING='Concurrent Versions System (CVS) 1.12.13' +PACKAGE_VERSION='1.12.13-MirDebian-8' +PACKAGE_STRING='Concurrent Versions System (CVS) 1.12.13-MirDebian-8' PACKAGE_BUGREPORT='bug-cvs@nongnu.org' ac_unique_file="src/cvs.h" @@ -808,7 +808,7 @@ # 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 to adapt to many kinds of systems. +\`configure' configures Concurrent Versions System (CVS) 1.12.13-MirDebian-8 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -874,7 +874,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Concurrent Versions System (CVS) 1.12.13:";; + short | recursive ) echo "Configuration of Concurrent Versions System (CVS) 1.12.13-MirDebian-8:";; esac cat <<\_ACEOF @@ -962,7 +962,7 @@ been updated to use the new *info format strings (default). --enable-config-override - Set to a comma-seperated list of paths to + Set to a comma-separated list of paths to directories (designated by trailing `/') and files, specifies the path prefixes (for directories) and paths to files the CVS server commands will allow @@ -1128,7 +1128,7 @@ test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -Concurrent Versions System (CVS) configure 1.12.13 +Concurrent Versions System (CVS) configure 1.12.13-MirDebian-8 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -1156,7 +1156,7 @@ 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, which was +It was created by Concurrent Versions System (CVS) $as_me 1.12.13-MirDebian-8, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1831,7 +1831,7 @@ # Define the identity of the package. PACKAGE='cvs' - VERSION='1.12.13' + VERSION='1.12.13-MirDebian-8' # Some tools Automake needs. @@ -5612,7 +5612,7 @@ missing_dir=`cd $ac_aux_dir && pwd` glocs="$PATH:/usr/local/bin:/usr/contrib/bin:/usr/gnu/bin:/local/bin:/local/gnu/bin:/gnu/bin" -for ac_prog in groff roff +for ac_prog in nroff gnroff groff roff do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -7372,6 +7372,97 @@ fi +echo "$as_me:$LINENO: checking for fseeko" >&5 +echo $ECHO_N "checking for fseeko... $ECHO_C" >&6 +if test "${ac_cv_func_fseeko+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define fseeko to an innocuous variant, in case declares fseeko. + For example, HP-UX 11i declares gettimeofday. */ +#define fseeko innocuous_fseeko + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char fseeko (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef fseeko + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char fseeko (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_fseeko) || defined (__stub___fseeko) +choke me +#else +char (*f) () = fseeko; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != fseeko; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_fseeko=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_fseeko=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5 +echo "${ECHO_T}$ac_cv_func_fseeko" >&6 + if test $ac_cv_func_fseeko = no; then case $LIBOBJS in "fseeko.$ac_objext" | \ @@ -42444,7 +42535,7 @@ } >&5 cat >&5 <<_CSEOF -This file was extended by Concurrent Versions System (CVS) $as_me 1.12.13, which was +This file was extended by Concurrent Versions System (CVS) $as_me 1.12.13-MirDebian-8, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -42507,7 +42598,7 @@ cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -Concurrent Versions System (CVS) config.status 1.12.13 +Concurrent Versions System (CVS) config.status 1.12.13-MirDebian-8 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" --- cvs-1.12.13+real.orig/configure.in +++ cvs-1.12.13+real/configure.in @@ -15,7 +15,7 @@ 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], +AC_INIT([Concurrent Versions System (CVS)],[1.12.13-MirDebian-8], [bug-cvs@nongnu.org],[cvs]) AC_CONFIG_SRCDIR(src/cvs.h) AC_CONFIG_AUX_DIR(build-aux) @@ -110,7 +110,7 @@ dnl Yeah, put the value in a variable add it to the substitution list dnl then have configure create sanity.sh from sanity.sh.in... glocs="$PATH:/usr/local/bin:/usr/contrib/bin:/usr/gnu/bin:/local/bin:/local/gnu/bin:/gnu/bin" -AC_PATH_PROGS(ROFF, groff roff, $missing_dir/missing roff, $glocs) +AC_PATH_PROGS(ROFF, nroff gnroff groff roff, $missing_dir/missing roff, $glocs) AC_PATH_PROG(PS2PDF, ps2pdf, $missing_dir/missing ps2pdf) AC_PATH_PROG(TEXI2DVI, texi2dvi, $missing_dir/missing texi2dvi) @@ -180,6 +180,7 @@ AC_CHECK_MEMBERS([struct stat.st_rdev]) AC_FUNC_FSEEKO +AC_CHECK_FUNC(fseeko) if test $ac_cv_func_fseeko = no; then AC_LIBOBJ(fseeko) AC_LIBOBJ(ftello) @@ -1444,7 +1445,7 @@ [config-override], AC_HELP_STRING( [--enable-config-override], - [Set to a comma-seperated list of paths to directories (designated by + [Set to a comma-separated list of paths to directories (designated by trailing `/') and files, specifies the path prefixes (for directories) and paths to files the CVS server commands will allow configuration to be read from. Specify `--enable-config-override=no' to disable config file --- cvs-1.12.13+real.orig/Makefile.in +++ cvs-1.12.13+real/Makefile.in @@ -187,6 +187,7 @@ GETOPT_H = @GETOPT_H@ GLOB_H = @GLOB_H@ GMSGFMT = @GMSGFMT@ +GREP = @GREP@ HAVE_LONG_64BIT = @HAVE_LONG_64BIT@ HAVE_LONG_LONG_64BIT = @HAVE_LONG_LONG_64BIT@ HAVE__BOOL = @HAVE__BOOL@ @@ -224,6 +225,7 @@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ @@ -249,8 +251,6 @@ ZLIB_LIBS = @ZLIB_LIBS@ ZLIB_SUBDIRS = @ZLIB_SUBDIRS@ ac_ct_CC = @ac_ct_CC@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ ac_prefix_program = @ac_prefix_program@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ @@ -267,23 +267,30 @@ build_vendor = @build_vendor@ cvs_client_objects = @cvs_client_objects@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ @@ -561,7 +568,8 @@ || exit 1; \ fi; \ done - -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + -find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ --- cvs-1.12.13+real.orig/FAQ +++ cvs-1.12.13+real/FAQ @@ -7234,7 +7234,7 @@ It will respond: - Directory /Repos/ added to the repository + Directory /Repos/ put under version control and will create both a matching directory in the Repository and a ./CVS administrative directory within the local directory. --- cvs-1.12.13+real.orig/MINOR-BUGS +++ cvs-1.12.13+real/MINOR-BUGS @@ -59,3 +59,15 @@ belong under the "checkout" function? Perhaps it is more logically grouped with the "history" function or we should create a new "info" function? + + +Note that it is the opinion of the Debian maintainer that the CVSROOT +environment variable ought to *never* be set at all. This prevents +a lot of trouble. Almost all CVS tutorials are perceived bogus. + +This version appears to have trouble with the testsuite for write +proxies. Other than that, everything appears to work well. + +"cvs annotate -b" does not do what people would expect, I think, +but neither does it do that under MidnightBSD/DragonFly, where +it came from. --- cvs-1.12.13+real.orig/vms/Makefile.in +++ cvs-1.12.13+real/vms/Makefile.in @@ -163,6 +163,7 @@ GETOPT_H = @GETOPT_H@ GLOB_H = @GLOB_H@ GMSGFMT = @GMSGFMT@ +GREP = @GREP@ HAVE_LONG_64BIT = @HAVE_LONG_64BIT@ HAVE_LONG_LONG_64BIT = @HAVE_LONG_LONG_64BIT@ HAVE__BOOL = @HAVE__BOOL@ @@ -200,6 +201,7 @@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ @@ -225,8 +227,6 @@ ZLIB_LIBS = @ZLIB_LIBS@ ZLIB_SUBDIRS = @ZLIB_SUBDIRS@ ac_ct_CC = @ac_ct_CC@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ ac_prefix_program = @ac_prefix_program@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ @@ -243,23 +243,30 @@ build_vendor = @build_vendor@ cvs_client_objects = @cvs_client_objects@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ --- cvs-1.12.13+real.orig/src/logmsg.c +++ cvs-1.12.13+real/src/logmsg.c @@ -31,6 +31,8 @@ static FILE *fp; static Ctype type; +char *LogMsgFile = NULL; + struct verifymsg_proc_data { /* The name of the temp file storing the log message to be verified. This @@ -201,6 +203,7 @@ char *fname; struct stat pre_stbuf, post_stbuf; int retcode = 0; + int finish = 0; assert (!current_parsed_root->isremote != !repository); @@ -224,6 +227,10 @@ (*messagep)[strlen (*messagep) - 1] != '\n') (void) fprintf (fp, "\n"); } + else + (void) fputc ('\n', fp); + if (finish) + goto finish_off; if (repository != NULL) /* tack templates on if necessary */ @@ -267,6 +274,9 @@ (void) fprintf (fp, "%s----------------------------------------------------------------------\n", CVSEDITPREFIX); + if (readonlyfs) + (void) fprintf (fp, "%sATTENTION: read-only mode selected!\n", + CVSEDITPREFIX); (void) fprintf (fp, "%sEnter Log. Lines beginning with `%.*s' are removed automatically\n%s\n", CVSEDITPREFIX, CVSEDITPREFIXLEN, CVSEDITPREFIX, @@ -280,28 +290,38 @@ "%s----------------------------------------------------------------------\n", CVSEDITPREFIX); + finish_off: /* finish off the temp file */ if (fclose (fp) == EOF) error (1, errno, "%s", fname); - if (stat (fname, &pre_stbuf) == -1) + if (LogMsgFile) + { + if (unlink_file (LogMsgFile) < 0) + error (0, errno, "warning: cannot remove temp file %s", LogMsgFile); + free (LogMsgFile); + } + LogMsgFile = fname; + if (finish) + return; + if (stat (LogMsgFile, &pre_stbuf) == -1) pre_stbuf.st_mtime = 0; /* run the editor */ run_setup (Editor); - run_add_arg (fname); + run_add_arg (LogMsgFile); if ((retcode = run_exec (RUN_TTY, RUN_TTY, RUN_TTY, RUN_NORMAL | RUN_SIGIGNORE)) != 0) error (0, retcode == -1 ? errno : 0, "warning: editor session failed"); /* put the entire message back into the *messagep variable */ - fp = xfopen (fname, "r"); + fp = xfopen (LogMsgFile, "r"); if (*messagep) free (*messagep); - if (stat (fname, &post_stbuf) != 0) - error (1, errno, "cannot find size of temp file %s", fname); + if (stat (LogMsgFile, &post_stbuf) != 0) + error (1, errno, "cannot find size of temp file %s", LogMsgFile); if (post_stbuf.st_size == 0) *messagep = NULL; @@ -326,7 +346,7 @@ if (line_length == -1) { if (ferror (fp)) - error (0, errno, "warning: cannot read %s", fname); + error (0, errno, "warning: cannot read %s", LogMsgFile); break; } if (strncmp (line, CVSEDITPREFIX, CVSEDITPREFIXLEN) == 0) @@ -339,7 +359,7 @@ } } if (fclose (fp) < 0) - error (0, errno, "warning: cannot close %s", fname); + error (0, errno, "warning: cannot close %s", LogMsgFile); /* canonicalize emply messages */ if (*messagep != NULL && @@ -349,7 +369,11 @@ *messagep = NULL; } - if (pre_stbuf.st_mtime == post_stbuf.st_mtime || *messagep == NULL) + if (pre_stbuf.st_mtime == post_stbuf.st_mtime || + *messagep == NULL || + (*messagep)[0] == '\0' || + strcmp (*messagep, "\n") == 0 || + strcmp (*messagep, "\n\n") == 0) { for (;;) { @@ -361,9 +385,11 @@ if (line_length < 0) { error (0, errno, "cannot read from stdin"); - if (unlink_file (fname) < 0) + if (unlink_file (LogMsgFile) < 0) error (0, errno, - "warning: cannot remove temp file %s", fname); + "warning: cannot remove temp file %s", LogMsgFile); + free (LogMsgFile); + LogMsgFile = NULL; error (1, 0, "aborting"); } else if (line_length == 0 @@ -371,8 +397,10 @@ break; if (*line == 'a' || *line == 'A') { - if (unlink_file (fname) < 0) - error (0, errno, "warning: cannot remove temp file %s", fname); + if (unlink_file (LogMsgFile) < 0) + error (0, errno, "warning: cannot remove temp file %s", LogMsgFile); + free (LogMsgFile); + LogMsgFile = NULL; error (1, 0, "aborted by user"); } if (*line == 'e' || *line == 'E') @@ -387,15 +415,14 @@ } if (line) free (line); - if (unlink_file (fname) < 0) - error (0, errno, "warning: cannot remove temp file %s", fname); - free (fname); + finish = 1; + goto again; } /* Runs the user-defined verification script as part of the commit or import process. This verification is meant to be run whether or not the user included the -m attribute. unlike the do_editor function, this is - independant of the running of an editor for getting a message. + independent of the running of an editor for getting a message. */ void do_verify (char **messagep, const char *repository, List *changes) @@ -785,6 +812,7 @@ `%s' is left as an exercise for the reader. */ /* %c = cvs_cmd_name + * %I = commit ID * %p = shortrepos * %r = repository * %{sVv} = file name, old revision (precommit), new revision (postcommit) @@ -800,6 +828,7 @@ #endif /* SUPPORT_OLD_INFO_FMT_STRINGS */ filter, "c", "s", cvs_cmd_name, + "I", "s", global_session_id, #ifdef SERVER_SUPPORT "R", "s", referrer ? referrer->original : "NONE", #endif /* SERVER_SUPPORT */ @@ -922,6 +951,7 @@ #endif /* SUPPORT_OLD_INFO_FMT_STRINGS */ script, "c", "s", cvs_cmd_name, + "I", "s", global_session_id, #ifdef SERVER_SUPPORT "R", "s", referrer ? referrer->original : "NONE", @@ -975,3 +1005,20 @@ return abs (run_exec (RUN_TTY, RUN_TTY, RUN_TTY, RUN_NORMAL | RUN_SIGIGNORE)); } + +void +logmsg_cleanup (int err) +{ + if (!use_editor || LogMsgFile == NULL) + return; + + if (err == 0) + { + if (unlink_file (LogMsgFile) < 0) + error (0, errno, "warning: cannot remove temp file %s", LogMsgFile); + } + else + error (0, 0, "your log message was saved in %s", LogMsgFile); + free (LogMsgFile); + LogMsgFile = NULL; +} --- cvs-1.12.13+real.orig/src/admin.c +++ cvs-1.12.13+real/src/admin.c @@ -147,6 +147,7 @@ TRACE (TRACE_FUNCTION, "postadmin_proc (%s, %s)", repository, filter); /* %c = cvs_cmd_name + * %I = commit ID * %R = referrer * %p = shortrepos * %r = repository @@ -162,6 +163,7 @@ #endif /* SUPPORT_OLD_INFO_FMT_STRINGS */ filter, "c", "s", cvs_cmd_name, + "I", "s", global_session_id, #ifdef SERVER_SUPPORT "R", "s", referrer ? referrer->original : "NONE", #endif /* SERVER_SUPPORT */ --- cvs-1.12.13+real.orig/src/wrapper.c +++ cvs-1.12.13+real/src/wrapper.c @@ -86,7 +86,7 @@ move this to a per-connection data structure, or better yet think about a cleaner solution. */ static int wrap_setup_already_done = 0; - char *homedir; + char *homedir = NULL; if (wrap_setup_already_done != 0) return; @@ -107,6 +107,11 @@ free (file); } +#ifdef SERVER_SUPPORT + if (!server_active) +#endif + { + /* Then add entries found in home dir, (if user has one) and file exists. */ homedir = get_homedir (); @@ -115,6 +120,8 @@ hand it might be obnoxious to complain when CVS will function just fine without .cvswrappers (and many users won't even know what .cvswrappers is). */ + } + if (homedir != NULL) { char *file = strcat_filename_onto_homedir (homedir, CVSDOTWRAPPER); @@ -339,6 +346,12 @@ if (!line || line[0] == '#') return; + /* Allows user to declare all wrappers null and void */ + if (line[0] == '!') { + wrap_kill (); + return; + } + memset (&e, 0, sizeof(e)); /* Search for the wild card */ --- cvs-1.12.13+real.orig/src/root.h +++ cvs-1.12.13+real/src/root.h @@ -22,6 +22,7 @@ kserver_method, gserver_method, ext_method, + extssh_method, fork_method } CVSmethod; extern const char method_names[][16]; /* change this in root.c if you change @@ -64,6 +65,7 @@ void root_allow_add (const char *, const char *configPath); void root_allow_free (void); bool root_allow_ok (const char *); +int root_allow_used (void); struct config *get_root_allow_config (const char *arg, const char *configPath); const char *primary_root_translate (const char *root_in); const char *primary_root_inverse_translate (const char *root_in); --- cvs-1.12.13+real.orig/src/main.c +++ cvs-1.12.13+real/src/main.c @@ -24,6 +24,10 @@ #include "strftime.h" #include "xgethostname.h" +#ifdef USE_LIBBSD +uint32_t arc4random(void); +#endif + const char *program_name; const char *program_path; const char *cvs_cmd_name; @@ -170,6 +174,7 @@ #ifdef SERVER_SUPPORT { "server", NULL, NULL, server, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR }, #endif + { "suck", NULL, NULL, suck, 0 }, { "status", "st", "stat", cvsstatus, CVS_CMD_USES_WORK_DIR }, { "tag", "ta", "freeze", cvstag, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR }, { "unedit", NULL, NULL, unedit, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR }, @@ -283,6 +288,7 @@ " -q Cause CVS to be somewhat quiet.\n", " -r Make checked-out files read-only.\n", " -w Make checked-out files read-write (default).\n", + " -g Force group-write permissions on checked-out files.\n", " -n Do not execute anything that will change the disk.\n", " -t Show trace of program execution (repeat for more\n", " verbosity) -- try with -n.\n", @@ -465,38 +471,6 @@ static char const alphabet[62] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; -/* Divide BUF by D, returning the remainder. Replace BUF by the - quotient. BUF[0] is the most significant part of BUF. - D must not exceed UINT_MAX >> CHAR_BIT. */ -static unsigned int -divide_by (unsigned char buf[COMMITID_RAW_SIZE], unsigned int d) -{ - unsigned int carry = 0; - int i; - for (i = 0; i < COMMITID_RAW_SIZE; i++) - { - unsigned int byte = buf[i]; - unsigned int dividend = (carry << CHAR_BIT) + byte; - buf[i] = dividend / d; - carry = dividend % d; - } - return carry; -} - -static void -convert (char const input[COMMITID_RAW_SIZE], char *output) -{ - static char const zero[COMMITID_RAW_SIZE] = { 0, }; - unsigned char buf[COMMITID_RAW_SIZE]; - size_t o = 0; - memcpy (buf, input, COMMITID_RAW_SIZE); - while (memcmp (buf, zero, COMMITID_RAW_SIZE) != 0) - output[o++] = alphabet[divide_by (buf, sizeof alphabet)]; - if (! o) - output[o++] = '0'; - output[o] = '\0'; -} - int main (int argc, char **argv) @@ -511,7 +485,7 @@ int help = 0; /* Has the user asked for help? This lets us support the `cvs -H cmd' convention to give help for cmd. */ - static const char short_options[] = "+QqrwtnRvb:T:e:d:Hfz:s:xa"; + static const char short_options[] = "+QqrwgtnRvb:T:e:d:Hfz:s:xal"; static struct option long_options[] = { {"help", 0, NULL, 'H'}, @@ -658,6 +632,13 @@ case 'w': cvswrite = 1; break; + case 'g': + /* + * Force full write permissions for the group. + * See the user's manual for details and dangers. + */ + umask(umask(S_IRWXG|S_IRWXO) & S_IRWXO); + break; case 't': trace++; break; @@ -669,6 +650,9 @@ noexec = 1; logoff = 1; break; + case 'l': + /* no-op to simply ignore the old -l option */ + break; case 'v': (void) fputs ("\n", stdout); version (0, NULL); @@ -676,6 +660,7 @@ (void) fputs ("\ Copyright (C) 2005 Free Software Foundation, Inc.\n\ \n\ +Portions contributed by Thorsten Glaser for the MirOS Project.\n\ Senior active maintainers include Larry Jones, Derek R. Price,\n\ and Mark D. Baushke. Please see the AUTHORS and README files from the CVS\n\ distribution kit for a complete list of contributors and copyrights.\n", @@ -764,56 +749,11 @@ if (argc < 1) usage (usg); - if (readonlyfs && !really_quiet) { - error (0, 0, - "WARNING: Read-only repository access mode selected via `cvs -R'.\n\ -Using this option to access a repository which some users write to may\n\ -cause intermittent sandbox corruption."); - } - /* Calculate the cvs global session ID */ - { - char buf[COMMITID_RAW_SIZE] = { 0, }; - char out[COMMITID_RAW_SIZE * 2]; - ssize_t len = 0; - time_t rightnow = time (NULL); - char *startrand = buf + sizeof (time_t); - unsigned char *p = (unsigned char *) startrand; - size_t randbytes = RANDOM_BYTES; - int flags = O_RDONLY; - int fd; -#ifdef O_NOCTTY - flags |= O_NOCTTY; -#endif - if (rightnow != (time_t)-1) - while (rightnow > 0) { - *--p = rightnow % (UCHAR_MAX + 1); - rightnow /= UCHAR_MAX + 1; - } - else { - /* try to use more random data */ - randbytes = COMMITID_RAW_SIZE; - startrand = buf; - } - fd = open ("/dev/urandom", flags); - if (fd >= 0) { - len = read (fd, startrand, randbytes); - close (fd); - } - if (len <= 0) { - /* no random data was available so use pid */ - long int pid = (long int)getpid (); - p = (unsigned char *) (startrand + sizeof (pid)); - while (pid > 0) { - *--p = pid % (UCHAR_MAX + 1); - pid /= UCHAR_MAX + 1; - } - } - convert(buf, out); - global_session_id = strdup (out); - } - + global_session_id = Xasprintf("1%010llX%04X%04X", + (unsigned long long)time(NULL), + (int)(getpid() & 0xFFFF), (int)(arc4random() & 0xFFFF)); TRACE (TRACE_FUNCTION, "main: Session ID is %s", global_session_id); @@ -1011,7 +951,7 @@ /* Now we've reconciled CVSROOT from the command line, the CVS/Root file, and the environment variable. Do the last sanity checks on the variable. */ - if (!CVSroot_parsed) + if (!CVSroot_parsed && cm->func != version) { error (0, 0, "No CVSROOT specified! Please use the `-d' option"); @@ -1043,6 +983,11 @@ assert (current_parsed_root == NULL); + /* Handle running 'cvs version' with no CVSROOT. */ + + if (cm->func == version && !CVSroot_parsed) + server_active = !0; + /* If we're running the server, we want to execute this main loop once and only once (we won't be serving multiple roots from this connection, so there's no need to do it more than @@ -1244,7 +1189,7 @@ if (*++p) { if (*date) free (*date); - *date = Make_Date (p); + *date = strcmp (p, "BASE") ? Make_Date (p) : xstrdup (p); } } else if (strlen (input)) @@ -1285,7 +1230,7 @@ ftm = localtime (&unixtime); (void) sprintf (date, DATEFORM, - ftm->tm_year + (ftm->tm_year < 100 ? 0 : 1900), + (long)ftm->tm_year + (ftm->tm_year < 100 ? 0L : 1900L), ftm->tm_mon + 1, ftm->tm_mday, ftm->tm_hour, ftm->tm_min, ftm->tm_sec); ret = xstrdup (date); @@ -1315,8 +1260,9 @@ void date_to_tm (struct tm *dest, const char *source) { + int y; if (sscanf (source, SDATEFORM, - &dest->tm_year, &dest->tm_mon, &dest->tm_mday, + &y, &dest->tm_mon, &dest->tm_mday, &dest->tm_hour, &dest->tm_min, &dest->tm_sec) != 6) /* Is there a better way to handle errors here? I made this @@ -1324,9 +1270,7 @@ deal with fatal errors. */ error (0, 0, "internal error: bad date %s", source); - if (dest->tm_year > 100) - dest->tm_year -= 1900; - + dest->tm_year = y - ((y > 100) ? 1900 : 0); dest->tm_mon -= 1; } @@ -1348,10 +1292,10 @@ {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; - sprintf (dest, "%d %s %d %02d:%02d:%02d -0000", source->tm_mday, + sprintf (dest, "%d %s %ld %02d:%02d:%02d -0000", source->tm_mday, source->tm_mon < 0 || source->tm_mon > 11 ? "???" : month_names[source->tm_mon], - source->tm_year + 1900, source->tm_hour, source->tm_min, + (long)source->tm_year + 1900, source->tm_hour, source->tm_min, source->tm_sec); } @@ -1458,7 +1402,7 @@ { (void) fprintf (stderr, *cpp++, program_name, cvs_cmd_name); for (; *cpp; cpp++) - (void) fprintf (stderr, *cpp); + (void) fprintf (stderr, "%s", *cpp); exit (EXIT_FAILURE); } --- cvs-1.12.13+real.orig/src/rsh-client.c +++ cvs-1.12.13+real/src/rsh-client.c @@ -53,9 +53,10 @@ char *cvs_server = (root->cvs_server != NULL ? root->cvs_server : getenv ("CVS_SERVER")); int i = 0; - /* This needs to fit "rsh", "-b", "-l", "USER", "host", + /* This needs to fit "rsh", "-b", "-l", "USER", "-p", port, "host", "cmd (w/ args)", and NULL. We leave some room to grow. */ - char *rsh_argv[10]; + char *rsh_argv[16]; + char argvport[16]; if (!cvs_rsh) /* People sometimes suggest or assume that this should default @@ -97,8 +98,17 @@ rsh_argv[i++] = root->username; } + if (root->method == extssh_method && root->port) + { + snprintf(argvport, sizeof(argvport), "%d", root->port); + rsh_argv[i++] = "-p"; + rsh_argv[i++] = argvport; + } + rsh_argv[i++] = root->hostname; rsh_argv[i++] = cvs_server; + if (readonlyfs) + rsh_argv[i++] = "-R"; rsh_argv[i++] = "server"; /* Mark the end of the arg list. */ @@ -154,10 +164,11 @@ * on the server machine does not set CVSROOT to something * containing a colon (or better yet, upgrade the server). */ - command = Xasprintf ("%s server", cvs_server); + command = Xasprintf ("%s%s server", cvs_server, readonlyfs ? " -R" : ""); { - char *argv[10]; + char argvport[16]; + char *argv[16]; char **p = argv; *p++ = cvs_rsh; @@ -171,6 +182,13 @@ *p++ = root->username; } + if (root->method == extssh_method && root->port) + { + snprintf(argvport, sizeof(argvport), "%d", root->port); + *p++ = "-p"; + *p++ = argvport; + } + *p++ = root->hostname; *p++ = command; *p++ = NULL; --- cvs-1.12.13+real.orig/src/login.c +++ cvs-1.12.13+real/src/login.c @@ -200,11 +200,21 @@ return NULL; } *p = ' '; - tmp_root_canonical = normalize_cvsroot (tmp_root); - if (strcmp (cvsroot_canonical, tmp_root_canonical) == 0) - password = p + 1; - - free (tmp_root_canonical); + switch (tmp_root->method) + { + case gserver_method: + case pserver_method: +#ifdef HAVE_KERBEROS + case kserver_method: +#endif /* HAVE_KERBEROS */ + tmp_root_canonical = normalize_cvsroot (tmp_root); + if (strcmp (cvsroot_canonical, tmp_root_canonical) == 0) + password = p + 1; + free (tmp_root_canonical); + break; + default: + break; + } } return password; @@ -309,7 +319,9 @@ fp = CVS_FOPEN (passfile, "r"); if (fp == NULL) { + if (errno != ENOENT) { error (0, errno, "warning: failed to open %s for reading", passfile); + } goto process; } --- cvs-1.12.13+real.orig/src/parseinfo.c +++ cvs-1.12.13+real/src/parseinfo.c @@ -230,7 +230,7 @@ return true; } - /* Record the factor character (kilo, mega, giga, tera). */ + /* Record the factor character (kibi, mebi, gibi, tebi). */ if (!isdigit (p[strlen(p) - 1])) { switch (p[strlen(p) - 1]) @@ -241,16 +241,16 @@ factor = xtimes (factor, 1024); case 'M': factor = xtimes (factor, 1024); - case 'k': + case 'K': factor = xtimes (factor, 1024); break; default: error (0, 0, "%s: Unknown %s factor: `%c'", - infopath, option, p[strlen(p)]); + infopath, option, p[strlen(p) - 1]); return false; } - TRACE (TRACE_DATA, "readSizeT(): Found factor %u for %s", + TRACE (TRACE_DATA, "readSizeT(): Found factor %zu for %s", factor, option); } @@ -274,9 +274,9 @@ /* Don't return an error, just max out. */ num = SIZE_MAX; - TRACE (TRACE_DATA, "readSizeT(): read number %u for %s", num, option); + TRACE (TRACE_DATA, "readSizeT(): read number %zu for %s", num, option); *val = xtimes (strtoul (p, NULL, 10), factor); - TRACE (TRACE_DATA, "readSizeT(): returnning %u for %s", *val, option); + TRACE (TRACE_DATA, "readSizeT(): returnning %zu for %s", *val, option); return true; } @@ -298,7 +298,7 @@ new->MaxCompressionLevel = 9; #endif /* SERVER_SUPPORT */ #ifdef PROXY_SUPPORT - new->MaxProxyBufferSize = (size_t)(8 * 1024 * 1024); /* 8 megabytes, + new->MaxProxyBufferSize = (size_t)(8 * 1024 * 1024); /* 8 mebibytes, * by default. */ #endif /* PROXY_SUPPORT */ @@ -392,6 +392,9 @@ */ bool processing = true; bool processed = true; +#ifdef SERVER_SUPPORT + size_t dummy_sizet; +#endif TRACE (TRACE_FUNCTION, "parse_config (%s)", cvsroot); @@ -689,13 +692,29 @@ readBool (infopath, "UseArchiveCommentLeader", p, &retval->UseArchiveCommentLeader); #ifdef SERVER_SUPPORT - else if (!strcmp (line, "MinCompressionLevel")) - readSizeT (infopath, "MinCompressionLevel", p, - &retval->MinCompressionLevel); - else if (!strcmp (line, "MaxCompressionLevel")) - readSizeT (infopath, "MaxCompressionLevel", p, - &retval->MaxCompressionLevel); + else if (!strcmp (line, "MinCompressionLevel")) { + readSizeT (infopath, "MinCompressionLevel", p, &dummy_sizet); + retval->MinCompressionLevel = dummy_sizet; + } + else if (!strcmp (line, "MaxCompressionLevel")) { + readSizeT (infopath, "MaxCompressionLevel", p, &dummy_sizet); + retval->MaxCompressionLevel = dummy_sizet; + } #endif /* SERVER_SUPPORT */ +#if !defined(LOCK_COMPATIBILITY) || !defined(SUPPORT_OLD_INFO_FMT_STRINGS) + else if ((!strcmp (line, "tag")) || (!strcmp (line, "umask")) + || (!strcmp (line, "DisableXProg")) || (!strcmp (line, "dlimit")) + || (!strcmp (line, "forceReadOnlyFS"))) { + /* We are dealing with keywords removed between cvs 1.11.1p1 + and cvs 1.12.10; odds are we are not being able to handle + access or concurrent access with 1.11 cvs correctly */ + error (0, 0, "%s: found keyword '%s' in repository", + infopath, line); + error (readonlyfs ? 0 : 1, 0, readonlyfs + ? "Danger: Granting read access to incompatible repository!" + : "Do not try to access a cvs 1.11 repository!"); + } +#endif else /* We may be dealing with a keyword which was added in a subsequent version of CVS. In that case it is a good idea --- cvs-1.12.13+real.orig/src/suck.c +++ cvs-1.12.13+real/src/suck.c @@ -0,0 +1,140 @@ +/*- + * Copyright (c) 2011 + * Thorsten Glaser + * + * Provided that these terms and disclaimer and all copyright notices + * are retained or reproduced in an accompanying document, permission + * is granted to deal in this work without restriction, including un- + * limited rights to use, publicly perform, distribute, sell, modify, + * merge, give away, or sublicence. + * + * This work is provided "AS IS" and WITHOUT WARRANTY of any kind, to + * the utmost extent permitted by applicable law, neither express nor + * implied; without malicious intent or gross negligence. In no event + * may a licensor, author or contributor be held liable for indirect, + * direct, other damage, loss, or other issues arising in any way out + * of dealing in the work, even if advised of the possibility of such + * damage or existence of a defect, except proven that it results out + * of said person's immediate fault when using the work as intended. + *- + * Download a ,v file from the repository + */ + +#include "cvs.h" + +#ifdef HAVE_MMAP +#include + +#ifndef MAP_FILE +#define MAP_FILE 0 +#endif + +#ifndef MAP_FAILED +#define MAP_FAILED ((void *)-1) +#endif +#endif + +static const char * const suck_usage[] = { + "Usage: %s %s module/filename\n", + NULL +}; + +int +suck(int argc, char *argv[]) +{ + size_t m, n; + int fd; + char *buf, *cp, *fn; + struct stat sb; + FILE *fp; + RCSNode *rcs; + + if (argc != 2) + usage(suck_usage); + +#ifdef CLIENT_SUPPORT + if (current_parsed_root->isremote) { + start_server(); + + if (!supported_request("suck")) + error(1, 0, "server does not support %s", "suck"); + + send_arg(argv[1]); + send_to_server("suck\012", 0); + + return (get_responses_and_close()); + } +#endif + + /* check for ../ attack */ + if (pathname_levels(argv[1]) > 0) + error(1, 0, "path %s outside of repository", argv[1]); + + /* repo + / + module/file */ + cp = Xasprintf("%s/%s", current_parsed_root->directory, argv[1]); + + /* find the slash */ + if ((fn = cp + (last_component(cp) - cp)) == cp) + usage(suck_usage); + + /* repo/module + file */ + fn[-1] = '\0'; + + /* check if it's a valid RCS file, not /etc/passwd or somesuch */ + if ((rcs = RCS_parse(fn, cp)) == NULL) { + error(1, 0, "not a valid RCS file: %s/%s", cp, fn); + return (1); + } + + /* save the real pathname of the RCS file for later */ + fn = xstrdup(rcs->path); + + /* free up resources allocated until now */ + freercsnode(&rcs); + free(cp); + + /* attempt to open the file ourselves */ + if ((fp = CVS_FOPEN(fn, FOPEN_BINARY_READ)) == NULL) + error(1, errno, "Could not open RCS archive %s", fn); + if (fstat(fd = fileno(fp), &sb) < 0) + error(1, errno, "Could not stat RCS archive %s", fn); + + /*XXX this code will fail for large files */ + + /* attempt to slurp entire file into memory */ +#ifdef HAVE_MMAP + buf = mmap(NULL, sb.st_size, PROT_READ, MAP_PRIVATE, fd, 0); + if (buf == NULL || buf == MAP_FAILED) { + error(0, errno, "Could not map memory to RCS archive %s", fn); +#endif + /* backup: just read */ + cp = buf = xmalloc(n = sb.st_size); + while (n) { + m = read(fd, cp, n); + if (m == (size_t)-1) + error(1, errno, + "Could not read RCS archive %s", fn); + cp += m; + n -= m; + } +#ifdef HAVE_MMAP + } +#endif + + /* write real pathname plus newline as text */ + cvs_output(fn + strlen(current_parsed_root->directory) + 1, 0); + cvs_output("\n", 1); + + /* write file content as binary */ + cvs_output_binary(buf, sb.st_size); + + /* release all resources allocated */ +#ifdef HAVE_MMAP + munmap(buf, sb.st_size); +#endif + fclose(fp); + free(fn); + + /* success */ + return (0); +} --- cvs-1.12.13+real.orig/src/lock.c +++ cvs-1.12.13+real/src/lock.c @@ -1319,6 +1319,10 @@ lock->repository = Xasprintf ("%s/%s", xrepository, CVSROOTADM); lock->free_repository = true; + /* do nothing if we know it fails anyway */ + if (readonlyfs) + return 0; + /* get the lock dir for our own */ if (set_lock (lock, 1) != L_OK) { --- cvs-1.12.13+real.orig/src/rcs.h +++ cvs-1.12.13+real/src/rcs.h @@ -33,7 +33,7 @@ CVS) will put this into RCS files. Considered obsolete. */ #define RCSDEAD "dead" -#define DATEFORM "%02d.%02d.%02d.%02d.%02d.%02d" +#define DATEFORM "%02ld.%02d.%02d.%02d.%02d.%02d" #define SDATEFORM "%d.%d.%d.%d.%d.%d" /* @@ -189,7 +189,7 @@ struct rcsbuffer; /* What RCS_deltas is supposed to do. */ -enum rcs_delta_op {RCS_ANNOTATE, RCS_FETCH}; +enum rcs_delta_op {RCS_ANNOTATE, RCS_ANNOTATE_BACKWARDS, RCS_FETCH}; /* * exported interfaces --- cvs-1.12.13+real.orig/src/rcs.c +++ cvs-1.12.13+real/src/rcs.c @@ -103,6 +103,7 @@ static char *truncate_revnum_in_place (char *); static char *truncate_revnum (const char *); static char *printable_date (const char *); +static char *mdoc_date (const char *); static char *escape_keyword_value (const char *, int *); static void expand_keywords (RCSNode *, RCSVers *, const char *, const char *, size_t, enum kflag, char *, @@ -2166,6 +2167,8 @@ if (! RCS_nodeisbranch (rcs, tag)) { + if (! strcmp (date, "BASE")) + return RCS_gettag (rcs, tag, force_tag_match, simple_tag); /* We can't get a particular date if the tag is not a branch. */ return NULL; @@ -2177,6 +2180,15 @@ else branch = xstrdup (tag); + if (! strcmp (date, "BASE")) + { + /* Cut off the branch suffix and return. */ + rev = strrchr (branch, '.'); + if (rev) + *rev = '\0'; + return branch; + } + /* Fetch the revision of branch as of date. */ rev = RCS_getdatebranch (rcs, date, branch); free (branch); @@ -3120,6 +3132,7 @@ struct timespec revdate; Node *p; RCSVers *vers; + int y; /* make sure we have something to look at... */ assert (rcs != NULL); @@ -3134,7 +3147,7 @@ vers = p->data; /* split up the date */ - if (sscanf (vers->date, SDATEFORM, &xtm.tm_year, &xtm.tm_mon, + if (sscanf (vers->date, SDATEFORM, &y, &xtm.tm_mon, &xtm.tm_mday, &xtm.tm_hour, &xtm.tm_min, &xtm.tm_sec) != 6) error (1, 0, "%s: invalid date for revision %s (%s)", rcs->print_path, rev, vers->date); @@ -3144,15 +3157,14 @@ 2000+, RCS files contain all four digits and we subtract 1900, because the tm_year field should contain years since 1900. */ - if (xtm.tm_year >= 100 && xtm.tm_year < 2000) + if (y >= 100 && y < 2000) error (0, 0, "%s: non-standard date format for revision %s (%s)", rcs->print_path, rev, vers->date); - if (xtm.tm_year >= 1900) - xtm.tm_year -= 1900; + xtm.tm_year = y - ((y >= 1900) ? 1900 : 0); /* put the date in a form getdate can grok */ - tdate = Xasprintf ("%d-%d-%d %d:%d:%d -0000", - xtm.tm_year + 1900, xtm.tm_mon, xtm.tm_mday, + tdate = Xasprintf ("%ld-%d-%d %d:%d:%d -0000", + (long)xtm.tm_year + 1900, xtm.tm_mon, xtm.tm_mday, xtm.tm_hour, xtm.tm_min, xtm.tm_sec); /* Turn it into seconds since the epoch. @@ -3173,7 +3185,7 @@ /* Put an appropriate string into `date', if we were given one. */ ftm = gmtime (&revdate.tv_sec); (void) sprintf (date, DATEFORM, - ftm->tm_year + (ftm->tm_year < 100 ? 0 : 1900), + (long)ftm->tm_year + (ftm->tm_year < 100 ? 0L : 1900L), ftm->tm_mon + 1, ftm->tm_mday, ftm->tm_hour, ftm->tm_min, ftm->tm_sec); } @@ -3475,6 +3487,7 @@ KEYWORD_REVISION, KEYWORD_SOURCE, KEYWORD_STATE, + KEYWORD_MDOCDATE, KEYWORD_LOCALID }; struct rcs_keyword @@ -3511,6 +3524,7 @@ KEYWORD_INIT (new, KEYWORD_REVISION, "Revision"); KEYWORD_INIT (new, KEYWORD_SOURCE, "Source"); KEYWORD_INIT (new, KEYWORD_STATE, "State"); + KEYWORD_INIT (new, KEYWORD_MDOCDATE, "Mdocdate"); return new; } @@ -3544,6 +3558,30 @@ +/* Convert an RCS date string into an mdoc string. This is like + the RCS date2str function, but for manual pages. */ +static char * +mdoc_date (const char *rcs_date) +{ + int year, mon, mday, hour, min, sec; + char buf[100]; + const char *months[] = { "January", "February", "March", "April", + "May", "June", "July", "August", + "September", "October", "November", "December", + "corrupt" }; + + (void) sscanf (rcs_date, SDATEFORM, &year, &mon, &mday, &hour, &min, + &sec); + if (mon < 1 || mon > 12) + mon = 13; + if (year < 1900) + year += 1900; + sprintf (buf, "%s %d %04d", months[mon - 1], mday, year); + return xstrdup (buf); +} + + + /* Escape the characters in a string so that it can be included in an RCS value. */ static char * @@ -3680,13 +3718,13 @@ srch_len -= (srch_next + 1) - srch; srch = srch_next + 1; - /* Look for the first non alphabetic character after the '$'. */ + /* Look for the first non alphanumeric character after the '$'. */ send = srch + srch_len; for (s = srch; s < send; s++) - if (! isalpha ((unsigned char) *s)) + if (! isalnum ((unsigned char) *s)) break; - /* If the first non alphabetic character is not '$' or ':', + /* If the first non alphanumeric character is not '$' or ':', then this is not an RCS keyword. */ if (s == send || (*s != '$' && *s != ':')) continue; @@ -3741,6 +3779,11 @@ free_value = 1; break; + case KEYWORD_MDOCDATE: + value = mdoc_date (ver->date); + free_value = 1; + break; + case KEYWORD_CVSHEADER: case KEYWORD_HEADER: case KEYWORD_ID: @@ -4177,6 +4220,9 @@ : (sout != RUN_TTY ? sout : "(stdout)")))); + if (rev && *rev == '-') + ++rev; + assert (rev == NULL || isdigit ((unsigned char) *rev)); if (noexec && !server_active && workfile != NULL) @@ -5081,7 +5127,7 @@ (void) time (&modtime); ftm = gmtime (&modtime); delta->date = Xasprintf (DATEFORM, - ftm->tm_year + (ftm->tm_year < 100 ? 0 : 1900), + (long)ftm->tm_year + (ftm->tm_year < 100 ? 0L : 1900L), ftm->tm_mon + 1, ftm->tm_mday, ftm->tm_hour, ftm->tm_min, ftm->tm_sec); if (flags & RCS_FLAGS_DEAD) @@ -7235,6 +7281,7 @@ /* Walk the deltas in RCS to get to revision VERSION. If OP is RCS_ANNOTATE, then write annotations using cvs_output. + If OP is RCS_ANNOTATE_BACKWARDS, do the same backwards. If OP is RCS_FETCH, then put the contents of VERSION into a newly-malloc'd array and put a pointer to it in *TEXT. Each line @@ -7263,6 +7310,7 @@ RCSVers *vers; RCSVers *prev_vers; RCSVers *trunk_vers; + RCSVers *top_vers; char *next; int ishead, isnext, isversion, onbranch; Node *node; @@ -7285,6 +7333,7 @@ vers = NULL; prev_vers = NULL; trunk_vers = NULL; + top_vers = NULL; next = NULL; onbranch = 0; foundhead = 0; @@ -7332,12 +7381,31 @@ vers = node->data; next = vers->next; + /* The top version is either HEAD or + the last version on the branch. */ + if (top_vers == NULL || + (onbranch && (op == RCS_ANNOTATE_BACKWARDS))) + top_vers = vers; + /* Compare key and trunkversion now, because key points to storage controlled by rcsbuf_getkey. */ if (STREQ (branchversion, key)) isversion = 1; else isversion = 0; + + if ((op == RCS_ANNOTATE_BACKWARDS) && STREQ (version, key)) { + if (onbranch) { + unsigned int ln; + + for (ln = 0; ln < curlines.nlines; ++ln) + curlines.vector[ln]->vers = NULL; + } else { + foundhead = 1; + linevector_copy (&headlines, &curlines); + break; + } + } } while (1) @@ -7365,17 +7433,27 @@ rcsbuf_valpolish (rcsbuf, value, 0, &vallen); if (ishead) { - if (! linevector_add (&curlines, value, vallen, NULL, 0)) + if (! linevector_add (&curlines, value, vallen, + (op == RCS_ANNOTATE_BACKWARDS) ? vers : NULL, 0)) error (1, 0, "invalid rcs file %s", rcs->print_path); ishead = 0; } else if (isnext) { + RCSVers *addv, *delv; + + if (op == RCS_ANNOTATE_BACKWARDS) { + addv = onbranch ? NULL : prev_vers; + delv = onbranch ? vers : NULL; + } else { + addv = onbranch ? vers : NULL; + delv = onbranch ? NULL : prev_vers; + } + if (! apply_rcs_changes (&curlines, value, vallen, rcs->path, - onbranch ? vers : NULL, - onbranch ? NULL : prev_vers)) + addv, delv)) error (1, 0, "invalid change text in %s", rcs->print_path); } break; @@ -7391,7 +7469,9 @@ /* This is the version we want. */ linevector_copy (&headlines, &curlines); foundhead = 1; - if (onbranch) + /* If we are annotating backwards, we have to + continue tracking when we're tracking a branch. */ + if (onbranch && !(op == RCS_ANNOTATE_BACKWARDS)) { /* We have found this version by tracking up a branch. Restore back to the lines we saved @@ -7480,6 +7560,7 @@ switch (op) { case RCS_ANNOTATE: + case RCS_ANNOTATE_BACKWARDS: { unsigned int ln; --- cvs-1.12.13+real.orig/src/import.c +++ cvs-1.12.13+real/src/import.c @@ -238,6 +238,23 @@ regfree (&pat); } + /* + * If you use even vendor branches, something evil[TM] can happen. + */ + { + regex_t pat; + assert (!regcomp (&pat, "^[1-9][0-9]*\\.[1-9][0-9]*\\.[0-9]*[13579]$", + REG_EXTENDED)); + if (regexec (&pat, vbranch, 0, NULL, 0)) + { + error (0, 0, + "warning: you are using an even vendor branch, which can\n" + "lead to problems: '%s'. Use for example: '1.1.3' or '1.1.5'.", + vbranch); + } + regfree (&pat); + } + /* Set vhead to the branch's parent. */ vhead = xstrdup (vbranch); cp = strrchr (vhead, '.'); @@ -311,6 +328,7 @@ free (vhead); send_to_server ("import\012", 0); err += get_responses_and_close (); + logmsg_cleanup(err); return err; } #endif @@ -436,6 +454,7 @@ free (vbranch); free (vhead); + logmsg_cleanup(err); return err; } @@ -595,7 +614,7 @@ /* Attempt to make the Attic directory, in case it does not exist. */ (void) sprintf (rcs, "%s/%s", repository, CVSATTIC); - if (CVS_MKDIR (rcs, 0777 ) != 0 && errno != EEXIST) + if (noexec == 0 && CVS_MKDIR (rcs, 0777 ) != 0 && errno != EEXIST) error (1, errno, "cannot make directory `%s'", rcs); /* Note that the above clobbered the path name, so we @@ -1253,7 +1272,7 @@ (void) time (&now); ftm = gmtime (&now); (void) sprintf (altdate1, DATEFORM, - ftm->tm_year + (ftm->tm_year < 100 ? 0 : 1900), + (long)ftm->tm_year + (ftm->tm_year < 100 ? 0L : 1900L), ftm->tm_mon + 1, ftm->tm_mday, ftm->tm_hour, ftm->tm_min, ftm->tm_sec); author = getcaller (); --- cvs-1.12.13+real.orig/src/patch.c +++ cvs-1.12.13+real/src/patch.c @@ -46,13 +46,13 @@ static const char *const patch_usage[] = { - "Usage: %s %s [-flR] [-c|-u] [-s|-t] [-V %%d] [-k kopt]\n", + "Usage: %s %s [-flR] [-c|-u[p]] [-s|-t] [-V %%d] [-k kopt]\n", " -r rev|-D date [-r rev2 | -D date2] modules...\n", "\t-f\tForce a head revision match if tag/date not found.\n", "\t-l\tLocal directory only, not recursive\n", "\t-R\tProcess directories recursively.\n", "\t-c\tContext diffs (default)\n", - "\t-u\tUnidiff format.\n", + "\t-u\tUnidiff format (-p works the same as in diff).\n", "\t-s\tShort patch - one liner per file.\n", "\t-t\tTop two diffs - last change made to the file.\n", "\t-V vers\tUse RCS Version \"vers\" for keyword expansion.\n", @@ -78,7 +78,7 @@ usage (patch_usage); optind = 0; - while ((c = getopt (argc, argv, "+V:k:cuftsQqlRD:r:")) != -1) + while ((c = getopt (argc, argv, "+V:k:cupftsQqlRD:r:")) != -1) { switch (c) { @@ -149,10 +149,13 @@ "the -V option is obsolete and should not be used"); break; case 'u': - unidiff = 1; /* Unidiff */ + unidiff |= 1; /* Unidiff */ break; case 'c': /* Context diff */ - unidiff = 0; + unidiff &= ~1; + break; + case 'p': + unidiff |= 2; /* Unidiff context */ break; case '?': default: @@ -167,6 +170,8 @@ if (argc < 1) usage (patch_usage); + if (!(unidiff & 1)) + unidiff = 0; if (toptwo_diffs && patch_short) error (1, 0, "-t and -s options are mutually exclusive"); if (toptwo_diffs && (date1 != NULL || date2 != NULL || @@ -202,6 +207,8 @@ send_arg("-s"); if (unidiff) send_arg("-u"); + if (unidiff & 2) + send_arg("-p"); if (rev1) option_with_arg ("-r", rev1); @@ -270,6 +277,7 @@ int which; char *repository; char *where; + char *cp; TRACE ( TRACE_FUNCTION, "patch_proc ( %s, %s, %s, %d, %d, %s, %s )", xwhere ? xwhere : "(null)", @@ -292,7 +300,6 @@ /* if mfile isn't null, we need to set up to do only part of the module */ if (mfile != NULL) { - char *cp; char *path; /* if the portion of the module is a path, put the dir part on repos */ @@ -342,14 +349,30 @@ if (rev1 != NULL && !rev1_validated) { - tag_check_valid (rev1, argc - 1, argv + 1, local_specified, 0, - repository, false); + if ((cp = strchr(rev1, ':')) != NULL) + { + *cp++ = '\0'; + date1 = Make_Date (cp); + if (*rev1 == '\0') + rev1 = NULL; + } + if (rev1) + tag_check_valid (rev1, argc - 1, argv + 1, local_specified, 0, + repository, false); rev1_validated = 1; } if (rev2 != NULL && !rev2_validated) { - tag_check_valid (rev2, argc - 1, argv + 1, local_specified, 0, - repository, false); + if ((cp = strchr(rev2, ':')) != NULL) + { + *cp++ = '\0'; + date2 = Make_Date (cp); + if (*rev2 == '\0') + rev2 = NULL; + } + if (rev2) + tag_check_valid (rev2, argc - 1, argv + 1, local_specified, 0, + repository, false); rev2_validated = 1; } @@ -571,6 +594,7 @@ if (unidiff) run_add_arg_p (&dargc, &darg_allocated, &dargv, "-u"); else run_add_arg_p (&dargc, &darg_allocated, &dargv, "-c"); + if (unidiff & 2) run_add_arg_p (&dargc, &darg_allocated, &dargv, "-p"); switch (diff_exec (tmpfile1, tmpfile2, NULL, NULL, dargc, dargv, tmpfile3)) { @@ -671,7 +695,10 @@ program. */ if (unidiff) { - cvs_output ("diff -u ", 0); + if (unidiff & 2) + cvs_output ("diff -up ", 0); + else + cvs_output ("diff -u ", 0); cvs_output (file1, 0); cvs_output (" ", 1); cvs_output (file2, 0); --- cvs-1.12.13+real.orig/src/annotate.c +++ cvs-1.12.13+real/src/annotate.c @@ -21,6 +21,7 @@ /* Options from the command line. */ +static int backwards = 0; static int force_tag_match = 1; static int force_binary = 0; static char *tag = NULL; @@ -36,7 +37,8 @@ static const char *const annotate_usage[] = { - "Usage: %s %s [-lRfF] [-r rev] [-D date] [files...]\n", + "Usage: %s %s [-blRfF] [-r rev] [-D date] [files...]\n", + "\t-b\tBackwards, show when a line was removed.\n", "\t-l\tLocal directory only, no recursion.\n", "\t-R\tProcess directories recursively.\n", "\t-f\tUse head revision if tag/date not found.\n", @@ -63,10 +65,13 @@ usage (annotate_usage); optind = 0; - while ((c = getopt (argc, argv, "+lr:D:fFR")) != -1) + while ((c = getopt (argc, argv, "+blr:D:fFR")) != -1) { switch (c) { + case 'b': + backwards = 1; + break; case 'l': local = 1; break; @@ -105,6 +110,8 @@ ign_setup (); + if (backwards) + send_arg ("-b"); if (local) send_arg ("-l"); if (!force_tag_match) @@ -280,7 +287,8 @@ else { RCS_deltas (finfo->rcs, NULL, NULL, - version, RCS_ANNOTATE, NULL, NULL, NULL, NULL); + version, backwards ? RCS_ANNOTATE_BACKWARDS : RCS_ANNOTATE, + NULL, NULL, NULL, NULL); } free (version); return 0; --- cvs-1.12.13+real.orig/src/parseinfo.h +++ cvs-1.12.13+real/src/parseinfo.h @@ -53,8 +53,8 @@ size_t MaxProxyBufferSize; #endif /* PROXY_SUPPORT */ #ifdef SERVER_SUPPORT - size_t MinCompressionLevel; - size_t MaxCompressionLevel; + unsigned MinCompressionLevel; + unsigned MaxCompressionLevel; #endif /* SERVER_SUPPORT */ #ifdef PRESERVE_PERMISSIONS_SUPPORT bool preserve_perms; --- cvs-1.12.13+real.orig/src/cvs.h +++ cvs-1.12.13+real/src/cvs.h @@ -365,6 +365,7 @@ extern const char *program_name, *program_path, *cvs_cmd_name; extern char *Editor; +extern char *LogMsgFile; extern int cvsadmin_root; extern char *CurDir; extern int really_quiet, quiet; @@ -504,6 +505,8 @@ int unlink_file (const char *f); int unlink_file_dir (const char *f); +int suck (int argc, char *argv[]); + /* This is the structure that the recursion processor passes to the fileproc to tell it about a particular file. */ struct file_info @@ -629,6 +632,7 @@ FILE *xlogfp, List *xchanges); void do_editor (const char *dir, char **messagep, const char *repository, List *changes); +void logmsg_cleanup (int err); void do_verify (char **messagep, const char *repository, List *changes); --- cvs-1.12.13+real.orig/src/mkmodules.c +++ cvs-1.12.13+real/src/mkmodules.c @@ -68,6 +68,7 @@ "# If any format strings are present in the filter, they will be replaced\n", "# as follows:\n", "# %c = canonical name of the command being executed\n", + "# %I = unique (randomly generated) commit ID\n", #ifdef PROXY_SUPPORT "# %R = the name of the referrer, if any, otherwise the value NONE\n", #endif @@ -82,7 +83,7 @@ "# Thus %{sv} is a legal format string, but will only be replaced with\n", "# file name and new revision.\n", "# It also generates multiple arguments for each file being operated upon.\n", - "# That is, if two files, file1 & file2, are being commited from 1.1 to\n", + "# That is, if two files, file1 & file2, are being committed from 1.1 to\n", "# version 1.1.2.1 and from 1.1.2.2 to 1.1.2.3, respectively, %{sVv} will\n", "# generate the following six arguments in this order:\n", "# file1, 1.1, 1.1.2.1, file2, 1.1.2.2, 1.1.2.3.\n", @@ -124,13 +125,14 @@ "#\n", "# Making sure that the entered bug-id number is correct.\n", "# Validating that the code that was reviewed is indeed the code being\n", - "# checked in (using the bug-id number or a seperate review\n", + "# checked in (using the bug-id number or a separate review\n", "# number to identify this particular code set.).\n", "#\n", "# If any of the above test failed, then the commit would be aborted.\n", "#\n", "# Format strings present in the filter will be replaced as follows:\n", "# %c = canonical name of the command being executed\n", + "# %I = unique (randomly generated) commit ID\n", #ifdef PROXY_SUPPORT "# %R = the name of the referrer, if any, otherwise the value NONE\n", #endif @@ -163,6 +165,7 @@ "#\n", "# Format strings present in the filter will be replaced as follows:\n", "# %c = canonical name of the command being executed\n", + "# %I = unique (randomly generated) commit ID\n", #ifdef PROXY_SUPPORT "# %R = the name of the referrer, if any, otherwise the value NONE\n", #endif @@ -199,6 +202,7 @@ "# | \"N\" (not branch)\n", "# %o = operation = \"add\" | \"mov\" | \"del\"\n", "# %c = canonical name of the command being executed\n", + "# %I = unique (randomly generated) commit ID\n", #ifdef PROXY_SUPPORT "# %R = the name of the referrer, if any, otherwise the value NONE\n", #endif @@ -245,6 +249,7 @@ "# If any format strings are present in the filter, they will be replaced\n", "# as follows:\n", "# %c = canonical name of the command being executed\n", + "# %I = unique (randomly generated) commit ID\n", #ifdef PROXY_SUPPORT "# %R = the name of the referrer, if any, otherwise the value NONE\n", #endif @@ -271,6 +276,7 @@ "# If any format strings are present in the filter, they will be replaced\n", "# as follows:\n", "# %c = canonical name of the command being executed\n", + "# %I = unique (randomly generated) commit ID\n", #ifdef PROXY_SUPPORT "# %R = the name of the referrer, if any, otherwise the value NONE\n", #endif @@ -299,6 +305,7 @@ "# If any format strings are present in the filter, they will be replaced\n", "# as follows:\n", "# %c = canonical name of the command being executed\n", + "# %I = unique (randomly generated) commit ID\n", #ifdef PROXY_SUPPORT "# %R = the name of the referrer, if any, otherwise the value NONE\n", #endif @@ -328,6 +335,7 @@ "# | \"N\" (not branch)\n", "# %o = operation = \"add\" | \"mov\" | \"del\"\n", "# %c = canonical name of the command being executed\n", + "# %I = unique (randomly generated) commit ID\n", #ifdef PROXY_SUPPORT "# %R = the name of the referrer, if any, otherwise the value NONE\n", #endif @@ -368,6 +376,7 @@ "# If any format strings are present in the filter, they will be replaced\n", "# as follows:\n", "# %c = canonical name of the command being executed\n", + "# %I = unique (randomly generated) commit ID\n", #ifdef PROXY_SUPPORT "# %R = the name of the referrer, if any, otherwise the value NONE\n", #endif @@ -446,6 +455,7 @@ "#\n", "# format strings are replaceed as follows:\n", "# %c = canonical name of the command being executed\n", + "# %I = unique (randomly generated) commit ID\n", #ifdef PROXY_SUPPORT "# %R = the name of the referrer, if any, otherwise the value NONE\n", #endif @@ -465,11 +475,10 @@ "# key [options] directory files...\n", "#\n", "# Where \"options\" are composed of:\n", - "# -i prog Run \"prog\" on \"cvs commit\" from top-level of module.\n", "# -o prog Run \"prog\" on \"cvs checkout\" of module.\n", "# -e prog Run \"prog\" on \"cvs export\" of module.\n", + "# -s status Assign a status to the module.\n", "# -t prog Run \"prog\" on \"cvs rtag\" of module.\n", - "# -u prog Run \"prog\" on \"cvs update\" of module.\n", "# -d dir Place module in directory \"dir\" instead of module name.\n", "# -l Top-level directory only -- do not recurse.\n", "#\n", @@ -489,67 +498,67 @@ }; static const char *const config_contents[] = { - "# Set `SystemAuth' to `no' if pserver shouldn't check system users/passwords.\n", + "# Set 'SystemAuth' to 'no' if pserver shouldn't check system users/passwords.\n", "#SystemAuth=no\n", "\n", - "# Set `LocalKeyword' to specify a local alias for a standard keyword.\n", + "# Set 'LocalKeyword' to specify a local alias for a standard keyword.\n", "#LocalKeyword=MYCVS=CVSHeader\n", "\n", - "# Set `KeywordExpand' to `i' followed by a list of keywords to expand or\n", - "# `e' followed by a list of keywords to not expand.\n" - "#KeywordExpand=iMYCVS,Name,Date\n", + "# Set 'KeywordExpand' to 'i' followed by a list of keywords to expand or\n", + "# 'e' followed by a list of keywords to not expand.\n" + "#KeywordExpand=iMYCVS,Name,Date,Mdocdate\n", "#KeywordExpand=eCVSHeader\n", "\n", #ifdef PRESERVE_PERMISSIONS_SUPPORT - "# Set `PreservePermissions' to `yes' to save file status information\n", + "# Set 'PreservePermissions' to 'yes' to save file status information\n", "# in the repository.\n", "#PreservePermissions=no\n", "\n", #endif - "# Set `TopLevelAdmin' to `yes' to create a CVS directory at the top\n", - "# level of the new working directory when using the `cvs checkout'\n", + "# Set 'TopLevelAdmin' to 'yes' to create a CVS directory at the top\n", + "# level of the new working directory when using the 'cvs checkout'\n", "# command.\n", "#TopLevelAdmin=no\n", "\n", "# Put CVS lock files in this directory rather than directly in the repository.\n", "#LockDir=/var/lock/cvs\n", "\n", - "# 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", + "# 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", "\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", + "# 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", "# that the file has changed before reading it (this can take up to an extra\n", "# second per directory being committed, so it is not recommended for large\n", - "# repositories. Set it to `never' (the previous CVS behavior) to prevent\n", + "# repositories. Set it to 'never' (the previous CVS behavior) to prevent\n", "# verifymsg scripts from changing the log message.\n", "#RereadLogAfterVerify=always\n", "\n", - "# Set `UserAdminOptions' to the list of `cvs admin' commands (options)\n", - "# that users not in the `cvsadmin' group are allowed to run. This\n", - "# defaults to `k', or only allowing the changing of the default\n", - "# keyword expansion mode for files for users not in the `cvsadmin' group.\n", - "# This value is ignored if the `cvsadmin' group does not exist.\n", + "# Set 'UserAdminOptions' to the list of 'cvs admin' commands (options)\n", + "# that users not in the '_cvsadmin' group are allowed to run. This\n", + "# defaults to 'k', or only allowing the changing of the default\n", + "# keyword expansion mode for files for users not in the '_cvsadmin' group.\n", + "# This value is ignored if the '_cvsadmin' group does not exist.\n", "#\n", - "# The following string would enable all `cvs admin' commands for all\n", + "# The following string would enable all 'cvs admin' commands for all\n", "# users:\n", "#UserAdminOptions=aAbceIklLmnNostuU\n", #ifdef SUPPORT_OLD_INFO_FMT_STRINGS "\n", - "# Set `UseNewInfoFmtStrings' to `no' if you must support a legacy system by\n", + "# Set 'UseNewInfoFmtStrings' to 'no' if you must support a legacy system by\n", "# enabling the deprecated old style info file command line format strings.\n", "# Be warned that these strings could be disabled in any new version of CVS.\n", "UseNewInfoFmtStrings=yes\n", #endif /* SUPPORT_OLD_INFO_FMT_STRINGS */ "\n", - "# Set `ImportNewFilesToVendorBranchOnly' to `yes' if you wish to force\n", - "# every `cvs import' command to behave as if the `-X' flag was\n", + "# Set 'ImportNewFilesToVendorBranchOnly' to 'yes' if you wish to force\n", + "# every 'cvs import' command to behave as if the '-X' flag was\n", "# specified.\n", "#ImportNewFilesToVendorBranchOnly=no\n", #ifdef PROXY_SUPPORT "\n", - "# Set `PrimaryServer' to the CVSROOT to the primary, or write, server when\n", + "# Set 'PrimaryServer' to the CVSROOT to the primary, or write, server when\n", "# establishing one or more read-only mirrors which serve as proxies for\n", "# the write server in write mode or redirect the client to the primary for\n", "# write requests.\n", @@ -558,13 +567,13 @@ "#\n", "# PrimaryServer=:fork:localhost/cvsroot\n", "\n", - "# Set `MaxProxyBufferSize' to the the maximum allowable secondary\n", + "# Set 'MaxProxyBufferSize' to the the maximum allowable secondary\n", "# buffer memory cache size before the buffer begins being stored to disk, in\n", - "# bytes. Must be a positive integer but may end in `k', `M', `G', or `T' (for\n", - "# kiilo, mega, giga, & tera, respectively). If an otherwise valid number you\n", + "# bytes. Must be a positive integer but may end in 'K', 'M', 'G', or 'T' (for\n", + "# Kibi, Mebi, Gibi, & Tebi, respectively). If an otherwise valid number you\n", "# specify is greater than the SIZE_MAX defined by your system's C compiler,\n", "# then it will be resolved to SIZE_MAX without a warning. Defaults to 8M (8\n", - "# megabytes).\n", + "# Mebibytes). The 'i' from 'Ki', 'Mi', etc. is omitted.\n", "#\n", "# High values for MaxProxyBufferSize may speed up a secondary server\n", "# with old hardware and a lot of available memory but can actually slow a\n", @@ -575,23 +584,23 @@ "# MaxProxyBufferSize=1G\n", #endif /* PROXY_SUPPORT */ "\n", - "# Set `MaxCommentLeaderLength' to the maximum length permitted for the\n", + "# Set 'MaxCommentLeaderLength' to the maximum length permitted for the\n", "# automagically determined comment leader used when expanding the Log\n", "# keyword, in bytes. CVS's behavior when the automagically determined\n", - "# comment leader exceeds this length is dependant on the value of\n", - "# `UseArchiveCommentLeader' set in this file. `unlimited' is a valid\n", + "# comment leader exceeds this length is dependent on the value of\n", + "# 'UseArchiveCommentLeader' set in this file. 'unlimited' is a valid\n", "# setting for this value. Defaults to 20 bytes.\n", "#\n", "# For example:\n", "#\n", "# MaxCommentLeaderLength=20\n", "\n", - "# Set `UseArchiveCommentLeader' to `yes' to cause CVS to fall back on\n", + "# Set 'UseArchiveCommentLeader' to 'yes' to cause CVS to fall back on\n", "# the comment leader set in the RCS archive file, if any, when the\n", - "# automagically determined comment leader exceeds `MaxCommentLeaderLength'\n", - "# bytes. If `UseArchiveCommentLeader' is not set and a comment leader\n", - "# greater than `MaxCommentLeaderLength' is calculated, the Log keyword\n", - "# being examined will not be expanded. Defaults to `no'.\n", + "# automagically determined comment leader exceeds 'MaxCommentLeaderLength'\n", + "# bytes. If 'UseArchiveCommentLeader' is not set and a comment leader\n", + "# greater than 'MaxCommentLeaderLength' is calculated, the Log keyword\n", + "# being examined will not be expanded. Defaults to 'no'.\n", "#\n", "# For example:\n", "#\n", @@ -816,7 +825,7 @@ } if (restore_cwd (&cwd)) - error (1, errno, "Failed to restore current directory, `%s'.", + error (1, errno, "Failed to restore current directory, '%s'.", cwd.name); free_cwd (&cwd); @@ -878,7 +887,7 @@ { /* Probably not necessary (?); RCS_parsercsfile already printed a message. */ - error (0, 0, "Failed to parse `%s'.", rcs); + error (0, 0, "Failed to parse '%s'.", rcs); free (rcs); return 1; } @@ -962,20 +971,22 @@ key.dptr = vp; while (*vp && !isspace ((unsigned char) *vp)) vp++; - key.dsize = vp - key.dptr; + key.dsize = vp - (char *)key.dptr; *vp++ = '\0'; /* NULL terminate the key */ while (*vp && isspace ((unsigned char) *vp)) vp++; /* skip whitespace to value */ if (*vp == '\0') { - error (0, 0, "warning: NULL value for key `%s'", key.dptr); + error (0, 0, "warning: NULL value for key '%s'", + (char *)key.dptr); continue; } val.dptr = vp; val.dsize = strlen (vp); if (dbm_store (db, key, val, DBM_INSERT) == 1) { - error (0, 0, "duplicate key found for `%s'", key.dptr); + error (0, 0, "duplicate key found for '%s'", + (char *)key.dptr); err++; } } @@ -1175,6 +1186,9 @@ which needs to be created. */ mkdir_if_needed (current_parsed_root->directory); + if (noexec) + return (0); + adm = Xasprintf ("%s/%s", current_parsed_root->directory, CVSROOTADM); mkdir_if_needed (adm); --- cvs-1.12.13+real.orig/src/Makefile.am +++ cvs-1.12.13+real/src/Makefile.am @@ -79,6 +79,7 @@ stack.c stack.h \ status.c \ subr.c subr.h \ + suck.c \ tag.c \ update.c \ version.c \ @@ -109,6 +110,7 @@ ../diff/libdiff.a \ ../lib/libcvs.a \ $(ZLIB_LIBS) +cvs_LDFLAGS = -Wl,--as-needed cvs_LDADD = $(cvs_client_objects) \ ../diff/libdiff.a \ ../lib/libcvs.a \ --- cvs-1.12.13+real.orig/src/status.c +++ cvs-1.12.13+real/src/status.c @@ -213,8 +213,11 @@ cvs_output (" Working revision:\t", 0); cvs_output (vers->vn_user, 0); - /* Only add the UTC timezone if there is a time to use. */ - if (!server_active && strlen (vers->ts_rcs) > 0) + /* Only add the UTC timezone if there is a time to use. + * ts_rcs sometimes contains only "=" character so we check len > 1 */ + if (!server_active && strlen (vers->ts_rcs) > 1 && + /* prevent an ugly error message */ + strcmp(vers->ts_rcs, "Result of merge") != 0) { /* Convert from the asctime() format to ISO 8601 */ char *buf; --- cvs-1.12.13+real.orig/src/diff.c +++ cvs-1.12.13+real/src/diff.c @@ -21,6 +21,8 @@ #include "cvs.h" +#define TAG_BHEAD ".bhead" + enum diff_file { DIFF_ERROR, @@ -444,9 +446,9 @@ } #endif - if (diff_rev1 != NULL) + if (diff_rev1 != NULL && strcmp(diff_rev1, TAG_BHEAD)) tag_check_valid (diff_rev1, argc, argv, local, 0, "", false); - if (diff_rev2 != NULL) + if (diff_rev2 != NULL && strcmp(diff_rev2, TAG_BHEAD)) tag_check_valid (diff_rev2, argc, argv, local, 0, "", false); which = W_LOCAL; @@ -903,8 +905,14 @@ if (diff_rev1 || diff_date1) { - /* special handling for TAG_HEAD */ - if (diff_rev1 && strcmp (diff_rev1, TAG_HEAD) == 0) + /* + * the special handling is broken, -rbranchname is the + * head (tip) of the branch already, -rHEAD is supposed + * to be the head (tip) of the MAIN branch (trunk); we + * introduce ".bhead" here, for now, but only here + */ + /* special handling for TAG_BHEAD */ + if (diff_rev1 && strcmp (diff_rev1, TAG_BHEAD) == 0) { if (vers->vn_rcs != NULL && vers->srcfile != NULL) use_rev1 = RCS_branch_head (vers->srcfile, vers->vn_rcs); @@ -919,8 +927,8 @@ } if (diff_rev2 || diff_date2) { - /* special handling for TAG_HEAD */ - if (diff_rev2 && strcmp (diff_rev2, TAG_HEAD) == 0) + /* special handling for TAG_BHEAD */ + if (diff_rev2 && strcmp (diff_rev2, TAG_BHEAD) == 0) { if (vers->vn_rcs && vers->srcfile) use_rev2 = RCS_branch_head (vers->srcfile, vers->vn_rcs); --- cvs-1.12.13+real.orig/src/add.c +++ cvs-1.12.13+real/src/add.c @@ -784,7 +784,7 @@ } /* setup the log message */ - message = Xasprintf ("Directory %s added to the repository\n%s%s%s%s%s%s", + message = Xasprintf ("Directory %s put under version control\n%s%s%s%s%s%s", rcsdir, tag ? "--> Using per-directory sticky tag `" : "", tag ? tag : "", tag ? "'\n" : "", --- cvs-1.12.13+real.orig/src/cvsrc.c +++ cvs-1.12.13+real/src/cvsrc.c @@ -41,6 +41,7 @@ size_t line_chars_allocated; char *optstart; + int white_len = 0; int command_len; int found = 0; @@ -96,9 +97,12 @@ if (line[0] == '#') continue; + while (isspace(line[white_len])) + ++white_len; + /* stop if we match the current command */ - if (!strncmp (line, cmdname, command_len) - && isspace ((unsigned char) *(line + command_len))) + if (!strncmp (line + white_len, cmdname, command_len) + && isspace ((unsigned char) *(line + white_len + command_len))) { found = 1; break; @@ -120,7 +124,7 @@ if (found) { /* skip over command in the options line */ - for (optstart = strtok (line + command_len, "\t \n"); + for (optstart = strtok (line + white_len + command_len, "\t \n"); optstart; optstart = strtok (NULL, "\t \n")) { --- cvs-1.12.13+real.orig/src/Makefile.in +++ cvs-1.12.13+real/src/Makefile.in @@ -150,9 +150,9 @@ release.$(OBJEXT) remove.$(OBJEXT) repos.$(OBJEXT) \ root.$(OBJEXT) rsh-client.$(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) + status.$(OBJEXT) subr.$(OBJEXT) suck.$(OBJEXT) tag.$(OBJEXT) \ + update.$(OBJEXT) version.$(OBJEXT) vers_ts.$(OBJEXT) \ + watch.$(OBJEXT) wrapper.$(OBJEXT) zlib.$(OBJEXT) cvs_OBJECTS = $(am_cvs_OBJECTS) am__DEPENDENCIES_1 = binSCRIPT_INSTALL = $(INSTALL_SCRIPT) @@ -199,6 +199,7 @@ GETOPT_H = @GETOPT_H@ GLOB_H = @GLOB_H@ GMSGFMT = @GMSGFMT@ +GREP = @GREP@ HAVE_LONG_64BIT = @HAVE_LONG_64BIT@ HAVE_LONG_LONG_64BIT = @HAVE_LONG_LONG_64BIT@ HAVE__BOOL = @HAVE__BOOL@ @@ -236,6 +237,7 @@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ @@ -261,8 +263,6 @@ ZLIB_LIBS = @ZLIB_LIBS@ ZLIB_SUBDIRS = @ZLIB_SUBDIRS@ ac_ct_CC = @ac_ct_CC@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ ac_prefix_program = @ac_prefix_program@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ @@ -279,23 +279,30 @@ build_vendor = @build_vendor@ cvs_client_objects = @cvs_client_objects@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ @@ -361,6 +368,7 @@ stack.c stack.h \ status.c \ subr.c subr.h \ + suck.c \ tag.c \ update.c \ version.c \ @@ -392,6 +400,7 @@ ../lib/libcvs.a \ $(ZLIB_LIBS) +cvs_LDFLAGS = -Wl,--as-needed cvs_LDADD = $(cvs_client_objects) \ ../diff/libdiff.a \ ../lib/libcvs.a \ @@ -556,6 +565,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stack.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/status.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/subr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/suck.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tag.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/update.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vers_ts.Po@am__quote@ --- cvs-1.12.13+real.orig/src/client.c +++ cvs-1.12.13+real/src/client.c @@ -3558,9 +3558,9 @@ * code. */ read_line_via (from_server, to_server, &read_buf); - sscanf (read_buf, "%s %d", write_buf, &codenum); + count = sscanf (read_buf, "%*s %d", &codenum); - if ((codenum / 100) != 2) + if (count != 1 || (codenum / 100) != 2) error (1, 0, "proxy server %s:%d does not support http tunnelling", root->proxy_hostname, proxy_port_number); free (read_buf); @@ -3901,8 +3901,12 @@ case ext_method: #ifdef NO_EXT_METHOD error (0, 0, ":ext: method not supported by this port of CVS"); + if (0) + case extssh_method: + error (0, 0, ":extssh: method not supported by this port of CVS"); error (1, 0, "try :server: instead"); #else /* ! NO_EXT_METHOD */ + case extssh_method: start_rsh_server (root, to_server_p, from_server_p); #endif /* NO_EXT_METHOD */ @@ -4362,7 +4366,7 @@ sprintf (tmp, "%lu\n", (unsigned long) newsize); send_to_server (tmp, 0); - send_to_server (buf, newsize); + send_to_server ((const void *)buf, newsize); } } else @@ -4415,7 +4419,7 @@ * one. */ if (newsize > 0) - send_to_server (buf, newsize); + send_to_server ((const void *)buf, newsize); } free (buf); free (mode_string); --- cvs-1.12.13+real.orig/src/tag.c +++ cvs-1.12.13+real/src/tag.c @@ -310,6 +310,7 @@ * %b = branch mode = "?" (delete ops - unknown) | "T" (branch) * | "N" (not branch) * %c = cvs_cmd_name + * %I = commit ID * %p = path from $CVSROOT * %r = path from root * %{sVv} = attribute list = file name, old version tag will be deleted @@ -333,6 +334,7 @@ "b", "c", delete_flag ? '?' : branch_mode ? 'T' : 'N', "c", "s", cvs_cmd_name, + "I", "s", global_session_id, #ifdef SERVER_SUPPORT "R", "s", referrer ? referrer->original : "NONE", #endif /* SERVER_SUPPORT */ @@ -747,6 +749,7 @@ * %b = branch mode = "?" (delete ops - unknown) | "T" (branch) * | "N" (not branch) * %c = cvs_cmd_name + * %I = commit ID * %p = path from $CVSROOT * %r = path from root * %{sVv} = attribute list = file name, old version tag will be deleted @@ -770,6 +773,7 @@ "b", "c", delete_flag ? '?' : branch_mode ? 'T' : 'N', "c", "s", cvs_cmd_name, + "I", "s", global_session_id, #ifdef SERVER_SUPPORT "R", "s", referrer ? referrer->original : "NONE", #endif /* SERVER_SUPPORT */ @@ -1235,14 +1239,14 @@ else if (strcmp (version, "0") == 0) { if (!quiet) - error (0, 0, "couldn't tag added but un-commited file `%s'", + error (0, 0, "couldn't tag added but un-committed file `%s'", finfo->file); goto free_vars_and_return; } else if (version[0] == '-') { if (!quiet) - error (0, 0, "skipping removed but un-commited file `%s'", + error (0, 0, "skipping removed but un-committed file `%s'", finfo->file); goto free_vars_and_return; } @@ -1450,6 +1454,7 @@ * 2. If IDB is non-NULL and val-tags cannot be opened for write. * This allows callers to ignore the harmless inability to * update the val-tags cache. + * 3. If CVSREADONLYFS is set (same as #2 above). * false If the file could be opened and the tag is not present. */ static int is_in_val_tags (DBM **idb, const char *name) @@ -1459,6 +1464,10 @@ datum mytag; int status; + /* do nothing if we know we fail anyway */ + if (readonlyfs) + return 1; + /* Casting out const should be safe here - input datums are not * written to by the myndbm functions. */ --- cvs-1.12.13+real.orig/src/cvsbug.in +++ cvs-1.12.13+real/src/cvsbug.in @@ -109,14 +109,14 @@ /usr/bin/ypcat passwd 2>/dev/null | cat - /etc/passwd | grep "^$LOGNAME:" | cut -f5 -d':' | sed -e 's/,.*//' > $TEMP ORIGINATOR="`cat $TEMP`" - rm -f $TEMP + > $TEMP fi fi if [ "$ORIGINATOR" = "" ]; then grep "^$LOGNAME:" /etc/passwd | cut -f5 -d':' | sed -e 's/,.*//' > $TEMP ORIGINATOR="`cat $TEMP`" - rm -f $TEMP + > $TEMP fi if [ -n "$ORGANIZATION" ]; then --- cvs-1.12.13+real.orig/src/subr.c +++ cvs-1.12.13+real/src/subr.c @@ -807,6 +807,8 @@ long s; long us; + if (time (&t) > desttime) return; + while (time (&t) <= desttime) { #ifdef HAVE_GETTIMEOFDAY @@ -835,6 +837,14 @@ (void)nanosleep (&ts, NULL); } } + + /* sleep another 20 ms (2 HZ) to avoid races */ + { + struct timespec ts; + ts.tv_sec = 0; + ts.tv_nsec = 20 * 1000 * 1000; + (void)nanosleep (&ts, NULL); + } } @@ -1285,7 +1295,7 @@ dellist(&pflist); free(b); error (1, 0, -"internal error: unknown integer arg size (%d)", +"internal error: unknown integer arg size (%zd)", length); break; } @@ -1328,7 +1338,7 @@ dellist(&pflist); free(b); error (1, 0, -"internal error: unknown floating point arg size (%d)", +"internal error: unknown floating point arg size (%zd)", length); break; } --- cvs-1.12.13+real.orig/src/commit.c +++ cvs-1.12.13+real/src/commit.c @@ -613,31 +613,7 @@ send_to_server ("ci\012", 0); err = get_responses_and_close (); - if (err != 0 && use_editor && saved_message != NULL) - { - /* If there was an error, don't nuke the user's carefully - constructed prose. This is something of a kludge; a better - solution is probably more along the lines of #150 in TODO - (doing a second up-to-date check before accepting the - log message has also been suggested, but that seems kind of - iffy because the real up-to-date check could still fail, - another error could occur, &c. Also, a second check would - slow things down). */ - - char *fname; - FILE *fp; - - fp = cvs_temp_file (&fname); - if (fp == NULL) - error (1, 0, "cannot create temporary file %s", fname); - if (fwrite (saved_message, 1, strlen (saved_message), fp) - != strlen (saved_message)) - error (1, errno, "cannot write temporary file %s", fname); - if (fclose (fp) < 0) - error (0, errno, "cannot close temporary file %s", fname); - error (0, 0, "saving log message in %s", fname); - free (fname); - } + logmsg_cleanup(err); return err; } #endif @@ -702,6 +678,7 @@ sleep_past (last_register_time); } + logmsg_cleanup(err); return err; } @@ -853,7 +830,7 @@ case T_ADDED: case T_REMOVED: { - char *editor; + char *editor = NULL; /* * some quick sanity checks; if no numeric -r option specified: @@ -1250,6 +1227,7 @@ #endif /* SUPPORT_OLD_INFO_FMT_STRINGS */ filter, "c", "s", cvs_cmd_name, + "I", "s", global_session_id, #ifdef SERVER_SUPPORT "R", "s", referrer ? referrer->original : "NONE", #endif /* SERVER_SUPPORT */ @@ -2255,9 +2233,10 @@ this was added into the log message. */ t = time (NULL); ct = gmtime (&t); - tmp = Xasprintf ("file %s was added on branch %s on %d-%02d-%02d %02d:%02d:%02d +0000", + tmp = Xasprintf ("file %s was added on branch %s on %ld-%02d-%02d %02d:%02d:%02d +0000", file, tag, - ct->tm_year + (ct->tm_year < 100 ? 0 : 1900), + (long)ct->tm_year + + (ct->tm_year < 100 ? 0 : 1900), ct->tm_mon + 1, ct->tm_mday, ct->tm_hour, ct->tm_min, ct->tm_sec); --- cvs-1.12.13+real.orig/src/history.c +++ cvs-1.12.13+real/src/history.c @@ -379,7 +379,7 @@ static const char * get_history_log_name (time_t now) { - char *log_name; + char *log_name = NULL; if (config->HistoryLogPath) { @@ -1561,7 +1561,7 @@ tm = localtime (&(lr->date)); (void) printf ("%c %04d-%02d-%02d %02d:%02d %s %-*s", ty, - tm->tm_year+1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, + (int)(tm->tm_year+1900), tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tz_name, user_len, lr->user); workdir = xmalloc (strlen (lr->dir) + strlen (lr->end) + 10); --- cvs-1.12.13+real.orig/src/modules.c +++ cvs-1.12.13+real/src/modules.c @@ -450,7 +450,7 @@ case '?': error (0, 0, "modules file has invalid option for key %s value %s", - key.dptr, value); + (char *)key.dptr, value); err++; goto do_module_return; } --- cvs-1.12.13+real.orig/src/root.c +++ cvs-1.12.13+real/src/root.c @@ -293,6 +293,12 @@ dellist (&root_allow); } +int +root_allow_used (void) +{ + return (root_allow != NULL); +} + bool root_allow_ok (const char *arg) { @@ -535,6 +541,12 @@ method = ""; #endif /* defined (CLIENT_SUPPORT) || defined (SERVER_SUPPORT) */ + if (NULL == method) + { + error (0, 0, "Missing method in CVSROOT."); + goto error_exit; + } + /* Now we have an access method -- see if it's valid. */ if (!strcasecmp (method, "local")) @@ -547,6 +559,16 @@ newroot->method = gserver_method; else if (!strcasecmp (method, "server")) newroot->method = server_method; + else if (strncmp (method, "ext=", 4) == 0) + { + newroot->cvs_rsh = xstrdup(method + 4); + newroot->method = ext_method; + } + else if (!strcasecmp (method, "extssh")) + { + newroot->cvs_rsh = xstrdup("ssh"); + newroot->method = extssh_method; + } else if (!strcasecmp (method, "ext")) newroot->method = ext_method; else if (!strcasecmp (method, "fork")) @@ -597,13 +619,15 @@ else if (!strcasecmp (p, "CVS_RSH")) { /* override CVS_RSH environment variable */ - if (newroot->method == ext_method) - newroot->cvs_rsh = xstrdup (q); + if (newroot->method == ext_method + || newroot->method == extssh_method) + newroot->cvs_rsh = xstrdup (q); } else if (!strcasecmp (p, "CVS_SERVER")) { /* override CVS_SERVER environment variable */ if (newroot->method == ext_method + || newroot->method == extssh_method || newroot->method == fork_method) newroot->cvs_server = xstrdup (q); } @@ -635,7 +659,8 @@ newroot->isremote = (newroot->method != local_method); #if defined (CLIENT_SUPPORT) || defined (SERVER_SUPPORT) - if (readonlyfs && newroot->isremote) + if (readonlyfs && newroot->isremote && (newroot->method != ext_method) + && (newroot->method != extssh_method)) error (1, 0, "Read-only repository feature unavailable with remote roots (cvsroot = %s)", cvsroot_copy); @@ -828,6 +853,7 @@ case server_method: case ext_method: no_port = 1; + case extssh_method: /* no_password already set */ check_hostname = 1; break; @@ -871,8 +897,8 @@ if (no_port && newroot->port) { error (0, 0, -"CVSROOT port specification is only valid for gserver, kserver,"); - error (0, 0, "and pserver connection methods."); +"CVSROOT port specification is only valid for extssh,"); + error (0, 0, "gserver, kserver and pserver connection methods."); goto error_exit; } #endif /* defined(CLIENT_SUPPORT) || defined (SERVER_SUPPORT) */ --- cvs-1.12.13+real.orig/src/edit.c +++ cvs-1.12.13+real/src/edit.c @@ -828,6 +828,7 @@ #endif /* SUPPORT_OLD_INFO_FMT_STRINGS */ filter, "c", "s", cvs_cmd_name, + "I", "s", global_session_id, #ifdef SERVER_SUPPORT "R", "s", referrer ? referrer->original : "NONE", #endif /* SERVER_SUPPORT */ --- cvs-1.12.13+real.orig/src/server.c +++ cvs-1.12.13+real/src/server.c @@ -823,6 +823,14 @@ } # endif + if (root_allow_used() && !root_allow_ok(arg)) + { + if (alloc_pending (80 + strlen (arg))) + sprintf (pending_error_text, + "E Bad root %s", arg); + return; + } + /* For pserver, this will already have happened, and the call will do nothing. But for rsh, we need to do it now. */ config = get_root_allow_config (current_parsed_root->directory, @@ -2350,6 +2358,7 @@ bool *pre = closure; /* %c = cvs_cmd_name + * %I = commit ID * %p = shortrepos * %r = repository */ @@ -2367,6 +2376,7 @@ # endif /* SUPPORT_OLD_INFO_FMT_STRINGS */ filter, "c", "s", cvs_cmd_name, + "I", "s", global_session_id, "R", "s", referrer ? referrer->original : "NONE", "p", "s", ".", "r", "s", current_parsed_root->directory, @@ -3519,7 +3529,7 @@ * Therefore, we wish to avoid reprocessing the command since that would * cause endless recursion. */ - if (isProxyServer()) + if ((command != version || current_parsed_root) && isProxyServer()) { # ifdef PROXY_SUPPORT if (reprocessing) @@ -4621,6 +4631,14 @@ static void +serve_suck (char *arg) +{ + do_cvs_command ("suck", suck); +} + + + +static void serve_add (char *arg) { do_cvs_command ("add", add); @@ -5962,6 +5980,7 @@ REQ_LINE("rannotate", serve_rannotate, 0), REQ_LINE("noop", serve_noop, RQ_ROOTLESS), REQ_LINE("version", serve_version, RQ_ROOTLESS), + REQ_LINE("suck", serve_suck, 0), REQ_LINE(NULL, NULL, 0) #undef REQ_LINE @@ -6271,8 +6290,12 @@ static const char *const server_usage[] = { +#ifdef ALLOW_CONFIG_OVERRIDE "Usage: %s %s [-c config-file]\n", "\t-c config-file\tPath to an alternative CVS config file.\n", +#else + "Usage: %s %s\n", +#endif "Normally invoked by a cvs client on a remote machine.\n", NULL }; @@ -6289,8 +6312,8 @@ { switch (c) { -#ifdef ALLOW_CONFIG_OVERRIDE case 'c': +#ifdef ALLOW_CONFIG_OVERRIDE if (gConfigPath) free (gConfigPath); gConfigPath = xstrdup (optarg); break; @@ -6887,7 +6910,7 @@ static int check_pam_password (char **username, char *password) { - int retval, err; + int retval; struct pam_conv conv = { cvs_pam_conv, 0 }; char *pam_stage = "start"; @@ -6930,7 +6953,7 @@ return retval == PAM_SUCCESS; /* indicate success */ } -#endif +#else /* !HAVE_PAM */ static int check_system_password (char *username, char *password) @@ -6996,6 +7019,7 @@ #endif return 1; } +#endif /* !HAVE_PAM */ --- cvs-1.12.13+real.orig/src/error.c +++ cvs-1.12.13+real/src/error.c @@ -208,7 +208,7 @@ * with the message here. */ #if HAVE_SYSLOG_H - syslog (LOG_DAEMON | LOG_EMERG, "Memory exhausted. Aborting."); + syslog (LOG_DAEMON | LOG_CRIT, "Memory exhausted. Aborting."); #endif /* HAVE_SYSLOG_H */ goto sidestep_done; @@ -219,18 +219,18 @@ * error while attempting to send the last error message to the client. */ - syslog (LOG_DAEMON | LOG_EMERG, + syslog (LOG_DAEMON | LOG_ALERT, "error (%d, %d) called recursively. Original message was:", last_status, last_errnum); - syslog (LOG_DAEMON | LOG_EMERG, "%s", last_message); + syslog (LOG_DAEMON | LOG_ALERT, "%s", last_message); - syslog (LOG_DAEMON | LOG_EMERG, + syslog (LOG_DAEMON | LOG_ALERT, "error (%d, %d) called recursively. Second message was:", status, errnum); - syslog (LOG_DAEMON | LOG_EMERG, "%s", buf2); + syslog (LOG_DAEMON | LOG_ALERT, "%s", buf2); - syslog (LOG_DAEMON | LOG_EMERG, "Aborting."); + syslog (LOG_DAEMON | LOG_ALERT, "Aborting."); #endif /* HAVE_SYSLOG_H */ sidestep_done: --- cvs-1.12.13+real.orig/src/fileattr.c +++ cvs-1.12.13+real/src/fileattr.c @@ -514,6 +514,7 @@ TRACE (TRACE_FUNCTION, "postwatch_proc (%s, %s)", repository, filter); /* %c = command name + * %I = commit ID * %p = shortrepos * %r = repository */ @@ -528,6 +529,7 @@ #endif /* SUPPORT_OLD_INFO_FMT_STRINGS */ filter, "c", "s", cvs_cmd_name, + "I", "s", global_session_id, #ifdef SERVER_SUPPORT "R", "s", referrer ? referrer->original : "NONE", #endif /* SERVER_SUPPORT */ --- cvs-1.12.13+real.orig/src/zlib.c +++ cvs-1.12.13+real/src/zlib.c @@ -229,7 +229,7 @@ would fetch all the available bytes, and at least one byte. */ status = (*cb->buf->input) (cb->buf->closure, bd->text, - need, BUFFER_DATA_SIZE, &nread); + need ? 1 : 0, BUFFER_DATA_SIZE, &nread); if (status == -2) /* Don't try to recover from memory allcoation errors. */ --- cvs-1.12.13+real.orig/src/sanity.sh +++ cvs-1.12.13+real/src/sanity.sh @@ -1,5 +1,7 @@ #! /bin/sh : +# set DISABLE_ANY_RSH=1 to skip rsh and ssh calls +# # sanity.sh -- a growing testsuite for cvs. # # The copyright notice said: "Copyright (C) 1992, 1993 Cygnus Support" @@ -1205,6 +1207,11 @@ # 77. require_rsh () { + if test x"$DISABLE_ANY_RSH" = x"1"; then + skipreason="administratively prohibited" + return 77 + fi + host=${remotehost-"`hostname`"} result=`$1 $host 'echo test'` rc=$? @@ -1313,7 +1320,7 @@ if $remote && $LS $TMPDIR/cvs-serv* >/dev/null 2>&1; then # A true value means ls found files/directories with these names. # Give the server some time to finish, then retry. - sleep 1 + sleep 2 if $LS $TMPDIR/cvs-serv* >/dev/null 2>&1; then warn "$1" "Found cvs-serv* directories in $TMPDIR." # The above will exit if $skipfail @@ -1503,6 +1510,9 @@ # lack \|). dotest () { + #echo dotest >$TESTDIR/_dotest.fun + #pwd >$TESTDIR/_dotest.cwd + #printf '%s\n' "$2" >$TESTDIR/_dotest.cmd rm -f $TESTDIR/dotest.ex? 2>&1 eval "$2" >$TESTDIR/dotest.tmp 2>&1 status=$? @@ -1518,6 +1528,9 @@ # Like dotest except only 2 args and result must exactly match stdin dotest_lit () { + #echo dotest_lit >$TESTDIR/_dotest.fun + #pwd >$TESTDIR/_dotest.cwd + #printf '%s\n' "$2" >$TESTDIR/_dotest.cmd rm -f $TESTDIR/dotest.ex? 2>&1 eval "$2" >$TESTDIR/dotest.tmp 2>&1 status=$? @@ -1543,6 +1556,9 @@ # Like dotest except exitstatus should be nonzero. dotest_fail () { + #echo dotest_fail >$TESTDIR/_dotest.fun + #pwd >$TESTDIR/_dotest.cwd + #printf '%s\n' "$2" >$TESTDIR/_dotest.cmd rm -f $TESTDIR/dotest.ex? 2>&1 eval "$2" >$TESTDIR/dotest.tmp 2>&1 status=$? @@ -1558,6 +1574,9 @@ # Like dotest except output is sorted. dotest_sort () { + #echo dotest_sort >$TESTDIR/_dotest.fun + #pwd >$TESTDIR/_dotest.cwd + #printf '%s\n' "$2" >$TESTDIR/_dotest.cmd rm -f $TESTDIR/dotest.ex? 2>&1 eval "$2" >$TESTDIR/dotest.tmp1 2>&1 status=$? @@ -1574,6 +1593,9 @@ # Like dotest_fail except output is sorted. dotest_fail_sort () { + #echo dotest_fail_sort >$TESTDIR/_dotest.fun + #pwd >$TESTDIR/_dotest.cwd + #printf '%s\n' "$2" >$TESTDIR/_dotest.cmd rm -f $TESTDIR/dotest.ex? 2>&1 eval "$2" >$TESTDIR/dotest.tmp1 2>&1 status=$? @@ -1622,6 +1644,7 @@ tests="$tests parseroot parseroot2 parseroot3 files spacefiles" tests="${tests} commit-readonly commit-add-missing" tests="${tests} status" + tests="${tests} suck" # Branching, tagging, removing, adding, multiple directories tests="${tests} rdiff rdiff-short" tests="${tests} rdiff2 diff diffnl death death2" @@ -2600,6 +2623,20 @@ ### dotest init-1 "$testcvs init" +# We might need to allow "cvs admin" access. +mkdir wnt +cd wnt +dotest init-1a "$testcvs -q co CVSROOT" "[UP] CVSROOT${DOTSTAR}" +cd CVSROOT +sed -e's/^#UserAdminOptions=/UserAdminOptions=/' tmpconfig +mv tmpconfig config +dotest init-1b "$testcvs -q ci -m allow-cvs-admin" "" \ +".*/CVSROOT/config,v <-- config +new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* +$SPROG commit: Rebuilding administrative file database" +cd ../.. +rm -r wnt + # Now hide the primary root behind a secondary if requested. if $proxy; then # Save the primary root. @@ -2726,7 +2763,7 @@ esac # \$dir # Avoid timestamp comparison issues with rsync. -sleep 1 +sleep 2 EOF chmod a+x $TESTDIR/sync-secondary @@ -2781,6 +2818,19 @@ ### dotest init-2 "$testcvs init" +# We might need to allow "cvs admin" access. +mkdir wnt +cd wnt +dotest init-2a "$testcvs -q co CVSROOT" "[UP] CVSROOT${DOTSTAR}" +cd CVSROOT +sed -e's/^#UserAdminOptions=/UserAdminOptions=/' tmpconfig +mv tmpconfig config +dotest init-2b "$testcvs -q ci -m allow-cvs-admin" "" \ +".*/CVSROOT/config,v <-- config +new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* +$SPROG commit: Rebuilding administrative file database" +cd ../.. +rm -r wnt ### @@ -2805,6 +2855,7 @@ Copyright (C) [0-9]* Free Software Foundation, Inc. +Portions contributed by Thorsten Glaser for the MirOS Project. Senior active maintainers include Larry Jones, Derek R. Price, and Mark D. Baushke. Please see the AUTHORS and README files from the CVS distribution kit for a complete list of contributors and copyrights. @@ -2822,8 +2873,8 @@ #Secondary Server: Concurrent Versions System (CVS) [0-9p.]* (.*server)' if $remote; then dotest version-2r "${testcvs} version" \ -'Client: Concurrent Versions System (CVS) [0-9p.]* (client.*) -Server: Concurrent Versions System (CVS) [0-9p.]* (.*server)' +'Client: Concurrent Versions System (CVS) [0-9p.]*\(-Mir[^ ]*\)* (client.*) +Server: Concurrent Versions System (CVS) [0-9p.]*\(-Mir[^ ]*\)* (.*server)' else dotest version-2 "${testcvs} version" \ 'Concurrent Versions System (CVS) [0-9.]*.*' @@ -2846,7 +2897,7 @@ dotest basica-0a "$testcvs -q co -l ." mkdir first-dir dotest basica-0b "$testcvs add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd .. rm -r 1 @@ -2865,17 +2916,17 @@ # Remote CVS gives the "cannot open CVS/Entries" error, which is # clearly a bug, but not a simple one to fix. dotest basica-1a10 "$testcvs -n add sdir" \ -"Directory $CVSROOT_DIRNAME/first-dir/sdir added to the repository" \ +"Directory $CVSROOT_DIRNAME/first-dir/sdir put under version control" \ "$SPROG add: cannot open CVS/Entries for reading: No such file or directory -Directory $CVSROOT_DIRNAME/first-dir/sdir added to the repository" +Directory $CVSROOT_DIRNAME/first-dir/sdir put under version control" dotest_fail basica-1a11 \ "test -d $CVSROOT_DIRNAME/first-dir/sdir" dotest basica-2 "$testcvs add sdir" \ -"Directory $CVSROOT_DIRNAME/first-dir/sdir added to the repository" +"Directory $CVSROOT_DIRNAME/first-dir/sdir put under version control" cd sdir mkdir ssdir dotest basica-3 "$testcvs add ssdir" \ -"Directory $CVSROOT_DIRNAME/first-dir/sdir/ssdir added to the repository" +"Directory $CVSROOT_DIRNAME/first-dir/sdir/ssdir put under version control" cd ssdir echo ssfile >ssfile @@ -3145,7 +3196,7 @@ dotest basicb-0d0 "${testcvs} -q co -l ." "" mkdir first-dir dotest basicb-0e "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd .. rm -r 2 @@ -3165,8 +3216,8 @@ # special only when it is directly in $CVSROOT/CVSROOT. mkdir Emptydir sdir2 dotest basicb-2 "${testcvs} add Emptydir sdir2" \ -"Directory ${CVSROOT_DIRNAME}/first-dir/Emptydir added to the repository -Directory ${CVSROOT_DIRNAME}/first-dir/sdir2 added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir/Emptydir put under version control +Directory ${CVSROOT_DIRNAME}/first-dir/sdir2 put under version control" cd Emptydir echo sfile1 starts >sfile1 dotest basicb-2a10 "${testcvs} -n add sfile1" \ @@ -3288,7 +3339,7 @@ dotest basicb-14 "${testcvs} -q co -l ." 'U topfile' mkdir second-dir dotest basicb-15 "${testcvs} add second-dir" \ -"Directory ${CVSROOT_DIRNAME}/second-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/second-dir put under version control" cd second-dir touch aa dotest basicb-16 "${testcvs} add aa" \ @@ -3327,10 +3378,15 @@ # many other folks are still using the older 'invalid option' # lib/getopt.c will use POSIX when __posixly_correct # otherwise the other, so accept both of them. -- mdb + # Added optional single quotes. -- mirabilos + # The above is actually untrue, POSIX only documents some older + # 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 dotest_fail basicb-21 "${testcvs} -q admin -H" \ -"admin: invalid option -- H +"admin: invalid option -- '*H'* ${CPROG} \[admin aborted\]: specify ${CPROG} -H admin for usage information" \ -"admin: illegal option -- H +"cvs: illegal option -- '*H'* ${CPROG} \[admin aborted\]: specify ${CPROG} -H admin for usage information" cd .. rmdir 1 @@ -3356,8 +3412,8 @@ dotest basicc-2 "$testcvs -q co -l ." mkdir first-dir second-dir dotest basicc-3 "${testcvs} add first-dir second-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository -Directory ${CVSROOT_DIRNAME}/second-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control +Directory ${CVSROOT_DIRNAME}/second-dir put under version control" # Old versions of CVS often didn't create this top-level CVS # directory in the first place. I think that maybe the only # way to get it to work currently is to let CVS create it, @@ -3807,7 +3863,7 @@ for i in dir1 dir2 dir3 dir4 dir5 dir6 dir7 dir8; do mkdir $i dotest deep-2-$i "${testcvs} add $i" \ -"Directory ${CVSROOT_DIRNAME}/first-dir/dir1[/dir0-9]* added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir/dir1[/dir0-9]* put under version control" cd $i echo file1 >file1 dotest deep-3-$i "${testcvs} add file1" \ @@ -3924,7 +3980,7 @@ if test ! -d $i ; then mkdir $i dotest basic2-2-$i "${testcvs} add $i" \ -"Directory ${CVSROOT_DIRNAME}/.*/$i added to the repository" +"Directory ${CVSROOT_DIRNAME}/.*/$i put under version control" fi cd $i @@ -4907,14 +4963,14 @@ # try and list a file before it's created, during an old revision, in # a period when it was dead and in the future - time_prebirth=`date '+%Y-%m-%d %H:%M:%S'` ; sleep 1 + time_prebirth=`date '+%Y-%m-%d %H:%M:%S'` ; sleep 2 touch dated dotest ls-D-init-1 "$testcvs -Q add dated" dotest ls-D-init-2 "$testcvs -Q ci -mm dated" - time_newborn=`date '+%Y-%m-%d %H:%M:%S'` ; sleep 1 + time_newborn=`date '+%Y-%m-%d %H:%M:%S'` ; sleep 2 echo mm >> dated dotest ls-D-init-2 "$testcvs -Q ci -mm dated" - time_predeath=`date '+%Y-%m-%d %H:%M:%S'` ; sleep 1 + time_predeath=`date '+%Y-%m-%d %H:%M:%S'` ; sleep 2 rm dated dotest ls-D-init-3 "$testcvs -Q rm dated" dotest ls-D-init-4 "$testcvs -Q ci -mm dated" @@ -4963,7 +5019,6 @@ CVSROOT=":pserver;proxy=localhost;proxyport=8080:localhost/dev/null" dotest parseroot-3r "$testcvs -d'$CVSROOT' logout" \ "Logging out of :pserver:$username@localhost:2401/dev/null -$CPROG logout: warning: failed to open $HOME/\.cvspass for reading: No such file or directory $CPROG logout: Entry not found." CVSROOT=":pserver;proxyport=8080:localhost/dev/null" dotest_fail parseroot-4r "$testcvs -d'$CVSROOT' logout" \ @@ -5010,7 +5065,7 @@ dotest files-1 "${testcvs} -q co -l ." "" mkdir first-dir dotest files-2 "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd first-dir touch tfile dotest files-3 "${testcvs} add tfile" \ @@ -5023,7 +5078,7 @@ dotest files-6 "${testcvs} -q update -r C" "" mkdir dir dotest files-7 "${testcvs} add dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir/dir added to the repository +"Directory ${CVSROOT_DIRNAME}/first-dir/dir put under version control --> Using per-directory sticky tag .C'" cd dir touch .file @@ -5032,12 +5087,12 @@ ${SPROG} add: use .${SPROG} commit. to add this file permanently" mkdir sdir dotest files-7c "${testcvs} add sdir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir/dir/sdir added to the repository +"Directory ${CVSROOT_DIRNAME}/first-dir/dir/sdir put under version control --> Using per-directory sticky tag .C'" cd sdir mkdir ssdir dotest files-8 "${testcvs} add ssdir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir/dir/sdir/ssdir added to the repository +"Directory ${CVSROOT_DIRNAME}/first-dir/dir/sdir/ssdir put under version control --> Using per-directory sticky tag .C'" cd ssdir touch .file @@ -5117,10 +5172,10 @@ initial revision: 1\.1" mkdir 'first dir' dotest spacefiles-4 "${testcvs} add 'first dir'" \ -"Directory ${CVSROOT_DIRNAME}/first dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first dir put under version control" mkdir ./-b dotest spacefiles-5 "${testcvs} add -- -b" \ -"Directory ${CVSROOT_DIRNAME}/-b added to the repository" +"Directory ${CVSROOT_DIRNAME}/-b put under version control" cd 'first dir' touch 'a file' dotest spacefiles-6 "${testcvs} add 'a file'" \ @@ -5193,7 +5248,7 @@ dotest status-init-1 "$testcvs -q co -l ." mkdir first-dir dotest status-init-2 "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd first-dir echo a line >tfile dotest status-init-3 "${testcvs} add tfile" \ @@ -5285,7 +5340,7 @@ cd .. mkdir fourth-dir dotest status-init-8 "$testcvs add fourth-dir" \ -"Directory $CVSROOT_DIRNAME/fourth-dir added to the repository" +"Directory $CVSROOT_DIRNAME/fourth-dir put under version control" cd fourth-dir echo yet another line >t3file dotest status-init-9 "$testcvs add t3file" \ @@ -5297,7 +5352,7 @@ cd ../first-dir mkdir third-dir dotest status-init-11 "$testcvs add third-dir" \ -"Directory $CVSROOT_DIRNAME/first-dir/third-dir added to the repository" +"Directory $CVSROOT_DIRNAME/first-dir/third-dir put under version control" cd third-dir echo another line >t2file dotest status-init-12 "$testcvs add t2file" \ @@ -5650,7 +5705,7 @@ dotest diff-1 "$testcvs -q co -l ." mkdir first-dir dotest diff-2 "$testcvs add first-dir" \ -"Directory $CVSROOT_DIRNAME/first-dir added to the repository" +"Directory $CVSROOT_DIRNAME/first-dir put under version control" cd first-dir # diff is anomalous. Most CVS commands print the "nothing @@ -5697,7 +5752,7 @@ dotest diffnl-000 "${testcvs} -q co -l ." '' mkdir first-dir dotest diffnl-001 "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd first-dir ${AWK} 'BEGIN {printf("one\ntwo\nthree\nfour\nfive\nsix")}' abc @@ -5861,7 +5916,7 @@ # doesn't get confused by it. mkdir subdir dotest 65a0 "${testcvs} add subdir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir/subdir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir/subdir put under version control" cd subdir echo file in subdir >sfile dotest 65a1 "${testcvs} add sfile" \ @@ -6590,7 +6645,7 @@ dotest rmadd-1 "$testcvs -q co -l ." mkdir first-dir dotest rmadd-2 "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd first-dir echo first file1 >file1 dotest rmadd-3 "${testcvs} add file1" \ @@ -6668,6 +6723,7 @@ >$CVSROOT_DIRNAME/CVSROOT/val-tags-tmp mv $CVSROOT_DIRNAME/CVSROOT/val-tags-tmp \ $CVSROOT_DIRNAME/CVSROOT/val-tags + rm -f $CVSROOT_DIRNAME/CVSROOT/val-tags.db dotest rmadd-18 "$testcvs -q update -p -r mynonbranch file1" \ "first file1" @@ -6733,7 +6789,7 @@ # now try forced revision with recursion mkdir sub dotest rmadd-26 "${testcvs} -q add sub" \ -"Directory ${CVSROOT_DIRNAME}/first-dir/sub added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir/sub put under version control" echo hello >sub/subfile dotest rmadd-27 "${testcvs} -q add sub/subfile" \ "${SPROG} add: use .${SPROG} commit. to add this file permanently" @@ -6790,7 +6846,7 @@ dotest rmadd2-1 "${testcvs} -q co -l ." '' mkdir first-dir dotest rmadd2-2 "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd first-dir echo 'initial contents' >file1 dotest rmadd2-3 "${testcvs} add file1" \ @@ -6890,7 +6946,7 @@ dotest rmadd3-init1 "${testcvs} -q co -l ." '' mkdir first-dir dotest rmadd3-init2 "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd first-dir echo initial content for file1 >file1 @@ -6941,7 +6997,7 @@ dotest resurrection-init1 "$testcvs -q co -l ." '' mkdir first-dir dotest resurrection-init2 "$testcvs add first-dir" \ -"Directory $CVSROOT_DIRNAME/first-dir added to the repository" +"Directory $CVSROOT_DIRNAME/first-dir put under version control" cd first-dir echo initial content for file1 >file1 @@ -7106,11 +7162,11 @@ dotest dirs2-1 "$testcvs -q co -l ." mkdir first-dir dotest dirs2-2 "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd first-dir mkdir sdir dotest dirs2-3 "${testcvs} add sdir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir/sdir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir/sdir put under version control" touch sdir/file1 dotest dirs2-4 "${testcvs} add sdir/file1" \ "${SPROG} add: scheduling file .sdir/file1. for addition @@ -7452,7 +7508,7 @@ '"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently' mkdir dir1 dotest branches2-9 "${testcvs} add dir1" \ -"Directory ${CVSROOT_DIRNAME}/first-dir/dir1 added to the repository +"Directory ${CVSROOT_DIRNAME}/first-dir/dir1 put under version control --> Using per-directory sticky tag "'`'"b1'" echo "file3 first revision" > dir1/file3 dotest branches2-10 "${testcvs} add dir1/file3" \ @@ -7802,7 +7858,7 @@ cd first-dir mkdir dir2 dotest branches2-25 "${testcvs} add dir2" \ -"Directory ${CVSROOT_DIRNAME}/first-dir/dir2 added to the repository +"Directory ${CVSROOT_DIRNAME}/first-dir/dir2 put under version control --> Using per-directory sticky tag "'`'"b1'" echo "file4 first revision" > dir2/file4 dotest branches2-26 "${testcvs} add dir2/file4" \ @@ -7952,10 +8008,10 @@ cd first-dir mkdir branches mixed mixed2 versions dotest branches4-2 "${testcvs} -q add branches mixed mixed2 versions" \ -"Directory ${CVSROOT_DIRNAME}/first-dir/branches added to the repository -Directory ${CVSROOT_DIRNAME}/first-dir/mixed added to the repository -Directory ${CVSROOT_DIRNAME}/first-dir/mixed2 added to the repository -Directory ${CVSROOT_DIRNAME}/first-dir/versions added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir/branches put under version control +Directory ${CVSROOT_DIRNAME}/first-dir/mixed put under version control +Directory ${CVSROOT_DIRNAME}/first-dir/mixed2 put under version control +Directory ${CVSROOT_DIRNAME}/first-dir/versions put under version control" echo file1 >branches/file1 echo file2 >branches/file2 @@ -8031,7 +8087,7 @@ dotest tagc-1 "${testcvs} -q co -l ." '' mkdir first-dir dotest tagc-2 "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd first-dir touch file1 file2 dotest tagc-3 "${testcvs} add file1 file2" \ @@ -8052,7 +8108,7 @@ T file2" # Avoid timestamp granularity bugs (FIXME: CVS should be # doing the sleep, right?). - sleep 1 + sleep 2 echo myedit >>file1 dotest tagc-6a "${testcvs} rm -f file2" \ "${SPROG} remove: scheduling .file2. for removal @@ -8193,7 +8249,7 @@ dotest tagf-1 "${testcvs} -q co -l ." '' mkdir first-dir dotest tagf-2 "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd first-dir touch file1 file2 dotest tagf-3 "${testcvs} add file1 file2" \ @@ -8397,7 +8453,7 @@ dotest tag-space-init-1 "$testcvs -q co -l ." mkdir first-dir dotest tag-space-init-2 "$testcvs add first-dir" \ -"Directory $CVSROOT_DIRNAME/first-dir added to the repository" +"Directory $CVSROOT_DIRNAME/first-dir put under version control" cd first-dir touch file1 dotest tag-space-init-3 "$testcvs add file1" \ @@ -8672,7 +8728,7 @@ dotest rcslib-merge-1 "$testcvs -q co -l ." mkdir first-dir dotest rcslib-merge-2 "$testcvs -q add first-dir" \ -"Directory $CVSROOT_DIRNAME.*/first-dir added to the repository" +"Directory $CVSROOT_DIRNAME.*/first-dir put under version control" cd ..; rm -r 1 dotest rcslib-merge-3 "$testcvs -q co first-dir" "" @@ -9757,7 +9813,19 @@ N import-quirks-4/file1 N import-quirks-4/file2 N import-quirks-4/file3 -No conflicts created by this import" +No conflicts created by this import +cvs import: warning: you are using an even vendor branch, which can +lead to problems: '1.1.2'. Use for example: '1.1.3' or '1.1.5'." \ +" + +N import-quirks-4/file1 +N import-quirks-4/file2 +N import-quirks-4/file3 +No conflicts created by this import +cvs import: warning: you are using an even vendor branch, which can +cvs import: warning: you are using an even vendor branch, which can +lead to problems: '1.1.2'. Use for example: '1.1.3' or '1.1.5'. +lead to problems: '1.1.2'. Use for example: '1.1.3' or '1.1.5'." dokeep cd .. @@ -9785,14 +9853,18 @@ # Create the module. dotest import-after-initial-1 \ "$testcvs -Q import -m. $module X Y" '' + sync >/dev/null 2>&1 file=m # Check it out and add a file. dotest import-after-initial-2 "$testcvs -Q co $module" '' + sync >/dev/null 2>&1 cd $module echo original > $file dotest import-after-initial-3 "${testcvs} -Q add $file" "" + sync >/dev/null 2>&1 dotest import-after-initial-4 "$testcvs -Q ci -m. $file" + sync >/dev/null 2>&1 # Delay a little so the following import isn't done in the same # second as the preceding commit. @@ -9803,12 +9875,14 @@ mkdir sub cd sub echo newer-via-import > $file + sync >/dev/null 2>&1 dotest import-after-initial-5 \ "$testcvs -Q import -m. $module X Y2" '' + sync >/dev/null 2>&1 cd .. # Sleep a second so we're sure to be after the second of the import. - sleep 1 + sleep 2 dotest import-after-initial-6 \ "$testcvs -Q update -p -D now $file" 'original' @@ -10380,7 +10454,7 @@ dotest join2-1 "${testcvs} -q co -l ." '' mkdir first-dir dotest join2-2 "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd first-dir echo 'initial contents of file1' >file1 dotest join2-3 "${testcvs} add file1" \ @@ -10489,7 +10563,7 @@ dotest join3-1 "${testcvs} -q co -l ." '' mkdir first-dir dotest join3-2 "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd first-dir echo 'initial contents of file1' >file1 dotest join3-3 "${testcvs} add file1" \ @@ -11130,7 +11204,7 @@ module=x mkdir $module dotest join-admin-0-2 "$testcvs -q add $module" \ -"Directory $CVSROOT_DIRNAME/$module added to the repository" +"Directory $CVSROOT_DIRNAME/$module put under version control" cd $module # Create a file so applying the first tag works. @@ -11182,7 +11256,7 @@ module=x mkdir $module dotest join-admin-2-2 "$testcvs -q add $module" \ -"Directory ${CVSROOT_DIRNAME}/x added to the repository" +"Directory ${CVSROOT_DIRNAME}/x put under version control" cd $module # Create a file so applying the first tag works. @@ -11252,7 +11326,7 @@ dotest join-rm-init-1 "$testcvs -q co -l ." '' mkdir $module dotest join-rm-init-2 "$testcvs -q add $module" \ -"Directory $CVSROOT_DIRNAME/$module added to the repository" +"Directory $CVSROOT_DIRNAME/$module put under version control" cd $module # add some files. @@ -11497,7 +11571,7 @@ echo add a line >>a mkdir dir1 dotest conflicts-127b "${testcvs} add dir1" \ -"Directory ${CVSROOT_DIRNAME}/first-dir/dir1 added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir/dir1 put under version control" dotest conflicts-128 "${testcvs} -q ci -m changed" \ "$CVSROOT_DIRNAME/first-dir/a,v <-- a new revision: 1\.2; previous revision: 1\.1" @@ -11945,7 +12019,7 @@ dotest conflicts3-1 "$testcvs -q co -l ." mkdir first-dir dotest conflicts3-2 "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd .. mkdir 2; cd 2 dotest conflicts3-3 "${testcvs} -q co -l first-dir" '' @@ -11994,7 +12068,7 @@ # and see that CVS doesn't lose its mind. mkdir sdir dotest conflicts3-14 "${testcvs} add sdir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir/sdir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir/sdir put under version control" touch sdir/sfile dotest conflicts3-14a "${testcvs} add sdir/sfile" \ "${SPROG} add: scheduling file .sdir/sfile. for addition @@ -12107,7 +12181,7 @@ dotest clean-1 "${testcvs} -q co -l ." '' mkdir first-dir dotest clean-2 "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd first-dir echo "The usual boring test text." > cleanme.txt dotest clean-3 "${testcvs} add cleanme.txt" \ @@ -12437,12 +12511,12 @@ cd first-dir mkdir subdir dotest modules-143a "${testcvs} add subdir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir/subdir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir/subdir put under version control" cd subdir mkdir ssdir dotest modules-143b "${testcvs} add ssdir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir/subdir/ssdir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir/subdir/ssdir put under version control" touch a b @@ -12699,9 +12773,9 @@ mkdir first-dir second-dir third-dir dotest modules2-setup-2 \ "${testcvs} add first-dir second-dir third-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository -Directory ${CVSROOT_DIRNAME}/second-dir added to the repository -Directory ${CVSROOT_DIRNAME}/third-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control +Directory ${CVSROOT_DIRNAME}/second-dir put under version control +Directory ${CVSROOT_DIRNAME}/third-dir put under version control" cd third-dir touch file3 dotest modules2-setup-3 "${testcvs} add file3" \ @@ -12947,7 +13021,7 @@ dotest modules3-0 "$testcvs -q co -l ." mkdir first-dir dotest modules3-1 "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd first-dir echo file1 >file1 @@ -13008,11 +13082,11 @@ cd second-dir mkdir suba dotest modules3-7-workaround1 "${testcvs} add suba" \ -"Directory ${CVSROOT_DIRNAME}/second-dir/suba added to the repository" +"Directory ${CVSROOT_DIRNAME}/second-dir/suba put under version control" cd suba mkdir subb dotest modules3-7-workaround2 "${testcvs} add subb" \ -"Directory ${CVSROOT_DIRNAME}/second-dir/suba/subb added to the repository" +"Directory ${CVSROOT_DIRNAME}/second-dir/suba/subb put under version control" cd ../.. fi @@ -13113,13 +13187,13 @@ dotest modules4-1 "${testcvs} -q co -l ." '' mkdir first-dir dotest modules4-2 "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd first-dir mkdir subdir subdir_long dotest modules4-3 "${testcvs} add subdir subdir_long" \ -"Directory ${CVSROOT_DIRNAME}/first-dir/subdir added to the repository -Directory ${CVSROOT_DIRNAME}/first-dir/subdir_long added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir/subdir put under version control +Directory ${CVSROOT_DIRNAME}/first-dir/subdir_long put under version control" echo file1 > file1 dotest modules4-4 "${testcvs} add file1" \ @@ -13248,11 +13322,11 @@ cd first-dir mkdir subdir dotest modules5-2 "${testcvs} add subdir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir/subdir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir/subdir put under version control" cd subdir mkdir ssdir dotest modules5-3 "${testcvs} add ssdir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir/subdir/ssdir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir/subdir/ssdir put under version control" touch a b dotest modules5-4 "${testcvs} add a b" \ "${SPROG} add: scheduling file .a. for addition @@ -13291,7 +13365,7 @@ for i in checkout export tag; do cat >> ${CVSROOT_DIRNAME}/$i.sh < mod1/file1 @@ -15001,7 +15075,7 @@ echo "file1" > mod1/file1 mkdir moda/modasub dotest emptydir-3b "${testcvs} add moda/modasub" \ -"Directory ${CVSROOT_DIRNAME}/moda/modasub added to the repository" +"Directory ${CVSROOT_DIRNAME}/moda/modasub put under version control" echo "filea" > moda/modasub/filea dotest emptydir-4 "${testcvs} add mod1/file1 moda/modasub/filea" \ "${SPROG} add: scheduling file .mod1/file1. for addition @@ -15328,8 +15402,8 @@ dotest toplevel-1 "${testcvs} -q co -l ." '' mkdir top-dir second-dir dotest toplevel-2 "${testcvs} add top-dir second-dir" \ -"Directory ${CVSROOT_DIRNAME}/top-dir added to the repository -Directory ${CVSROOT_DIRNAME}/second-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/top-dir put under version control +Directory ${CVSROOT_DIRNAME}/second-dir put under version control" cd top-dir touch file1 @@ -15447,8 +15521,8 @@ dotest toplevel2-1 "${testcvs} -q co -l ." '' mkdir top-dir second-dir dotest toplevel2-2 "${testcvs} add top-dir second-dir" \ -"Directory ${CVSROOT_DIRNAME}/top-dir added to the repository -Directory ${CVSROOT_DIRNAME}/second-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/top-dir put under version control +Directory ${CVSROOT_DIRNAME}/second-dir put under version control" cd top-dir touch file1 @@ -15686,7 +15760,7 @@ # can see the "CVS:" lines. cat >${TESTDIR}/editme <${TESTDIR}/edit.new mv ${TESTDIR}/edit.new \$1 exit 0 @@ -15697,7 +15771,7 @@ dotest editor-1 "${testcvs} -q co -l ." '' mkdir first-dir dotest editor-2 "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd first-dir touch file1 file2 dotest editor-3 "${testcvs} add file1 file2" \ @@ -15741,6 +15815,7 @@ revision 1\.1 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid}; branches: 1\.1\.2; +x xCVS: ---------------------------------------------------------------------- xCVS: Enter Log. Lines beginning with .CVS:. are removed automatically xCVS: @@ -15752,6 +15827,7 @@ ---------------------------- revision 1\.1\.2\.1 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid}; +x xCVS: ---------------------------------------------------------------------- xCVS: Enter Log. Lines beginning with .CVS:. are removed automatically xCVS: @@ -15779,6 +15855,7 @@ revision 1\.1 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid}; branches: 1\.1\.2; +x xCVS: ---------------------------------------------------------------------- xCVS: Enter Log. Lines beginning with .CVS:. are removed automatically xCVS: @@ -15790,6 +15867,7 @@ ---------------------------- revision 1\.1\.2\.1 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid}; +x xCVS: ---------------------------------------------------------------------- xCVS: Enter Log. Lines beginning with .CVS:. are removed automatically xCVS: @@ -15811,6 +15889,7 @@ revision 1\.1 date: ${ISO8601DATE}; author: ${username}; state: Exp; commitid: ${commitid}; branches: 1\.1\.2; +x xCVS: ---------------------------------------------------------------------- xCVS: Enter Log. Lines beginning with .CVS:. are removed automatically xCVS: @@ -15822,6 +15901,7 @@ ---------------------------- revision 1\.1\.2\.1 date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0; commitid: ${commitid}; +x xCVS: ---------------------------------------------------------------------- xCVS: Enter Log. Lines beginning with .CVS:. are removed automatically xCVS: @@ -15836,7 +15916,7 @@ # Test CVS's response to an unchanged log message cat >${TESTDIR}/editme <${TESTDIR}/editme <\$1 exit 0 EOF @@ -15863,7 +15943,7 @@ # Test CVS's response to a log message with one blank line cat >${TESTDIR}/editme <\$1 exit 0 EOF @@ -15877,7 +15957,7 @@ # Test CVS's response to a log message with only comments cat >${TESTDIR}/editme <${TESTDIR}/edit.new mv ${TESTDIR}/edit.new \$1 exit 0 @@ -15905,7 +15985,7 @@ cd ../first-dir cat >${TESTDIR}/editme <file1 dotest env-4 "${testcvs} add file1" \ @@ -16159,7 +16239,7 @@ dotest errmsg2-1 "$testcvs -q co -l ." mkdir first-dir dotest errmsg2-2 "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd first-dir dotest_fail errmsg2-3 "${testcvs} add CVS" \ "${CPROG} add: cannot add special file .CVS.; skipping" @@ -16189,7 +16269,7 @@ mkdir sdir cd .. dotest errmsg2-8 "${testcvs} add first-dir/sdir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir/sdir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir/sdir put under version control" # while we're here... check commit with no CVS directory dotest_fail errmsg2-8a "${testcvs} -q ci first-dir nonexistant" \ "${CPROG} commit: nothing known about .nonexistant' @@ -16205,7 +16285,7 @@ mkdir sdir10 dotest errmsg2-10 "${testcvs} add file10 sdir10" \ "${SPROG} add: scheduling file .file10. for addition -Directory ${CVSROOT_DIRNAME}/first-dir/sdir10 added to the repository +Directory ${CVSROOT_DIRNAME}/first-dir/sdir10 put under version control ${SPROG} add: use .${SPROG} commit. to add this file permanently" dotest errmsg2-11 "${testcvs} -q ci -m add-file10" \ "$CVSROOT_DIRNAME/first-dir/file10,v <-- file10 @@ -16219,7 +16299,7 @@ cd .. mkdir first-dir/sdir10/ssdir dotest errmsg2-13 "${testcvs} add first-dir/sdir10/ssdir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir/sdir10/ssdir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir/sdir10/ssdir put under version control" touch first-dir/sdir10/ssdir/ssfile dotest errmsg2-14 \ @@ -16360,7 +16440,7 @@ dotest adderrmsg-init1 "${testcvs} -q co -l ." '' mkdir adderrmsg-dir dotest adderrmsg-init2 "${testcvs} add adderrmsg-dir" \ -"Directory ${CVSROOT_DIRNAME}/adderrmsg-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/adderrmsg-dir put under version control" cd adderrmsg-dir # try to add the admin dir @@ -16839,7 +16919,7 @@ dotest watch4-0a "${testcvs} -q co -l ." '' mkdir first-dir dotest watch4-0b "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd first-dir dotest watch4-1 "${testcvs} watch on" '' @@ -16854,7 +16934,7 @@ # Now test the analogous behavior for directories. mkdir subdir dotest watch4-4 "${testcvs} add subdir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir/subdir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir/subdir put under version control" cd subdir touch sfile dotest watch4-5 "${testcvs} add sfile" \ @@ -16945,7 +17025,7 @@ dotest watch5-0a "${testcvs} -q co -l ." '' mkdir first-dir dotest watch5-0b "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd first-dir dotest watch5-1 "${testcvs} watch on" '' @@ -17125,7 +17205,7 @@ dotest edit-check-0a "$testcvs -q co -l ." mkdir first-dir dotest edit-check-0b "$testcvs add first-dir" \ -"Directory $CVSROOT_DIRNAME/first-dir added to the repository" +"Directory $CVSROOT_DIRNAME/first-dir put under version control" cd first-dir dotest edit-check-1 "$testcvs watch on" @@ -17374,7 +17454,7 @@ mkdir second-dir dotest edit-check-32c "$testcvs add second-dir" \ -"Directory $CVSROOT_DIRNAME/first-dir/second-dir added to the repository" +"Directory $CVSROOT_DIRNAME/first-dir/second-dir put under version control" cd second-dir echo ThirdFile >file3 @@ -18770,7 +18850,7 @@ dotest mwrap-1 "${testcvs} -q co -l ." '' mkdir first-dir dotest mwrap-2 "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd first-dir touch aa dotest mwrap-3 "${testcvs} add aa" \ @@ -19180,7 +19260,7 @@ exit 0 else echo "No BugId found." - sleep 1 + sleep 2 exit 1 fi EOF @@ -19747,7 +19827,7 @@ dotest taginfo-newfmt-8 "${testcvs} -q tag tag1" "" mkdir sdir dotest taginfo-newfmt-8b "${testcvs} -q add sdir" \ -"Directory ${TESTDIR}/cvsroot/first-dir/sdir added to the repository" +"Directory ${TESTDIR}/cvsroot/first-dir/sdir put under version control" touch sdir/file3 dotest taginfo-newfmt-8c "${testcvs} -q add sdir/file3" \ "${SPROG} add: use .${SPROG} commit. to add this file permanently" @@ -20043,7 +20123,7 @@ new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* $SPROG commit: Rebuilding administrative file database" - sleep 1 + sleep 2 echo '# noop' >> config dotest config-7 "$testcvs -q ci -mlog-commit" \ "$CVSROOT_DIRNAME/CVSROOT/config,v <-- config @@ -21586,7 +21666,7 @@ dotest logopt-1 "$testcvs -q co -l ." '' mkdir first-dir dotest logopt-2 "$testcvs add first-dir" \ -"Directory $CVSROOT_DIRNAME/first-dir added to the repository" +"Directory $CVSROOT_DIRNAME/first-dir put under version control" cd first-dir echo hi >file1 dotest logopt-3 "${testcvs} add file1" \ @@ -21631,7 +21711,7 @@ dotest ann-1 "$testcvs -q co -l ." mkdir first-dir dotest ann-2 "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd first-dir cat >file1 <$CVSROOT_DIRNAME/CVSROOT/history -O3395c677|anonymous|/*0|ccvs||ccvs +O3395c684|anonymous|/*0|ccvs||ccvs O3396c677|anonymous|/src|ccvs||src O3397c677|kingdon|/*0|ccvs||ccvs M339cafae|nk||ccvs/src|1.229|sanity.sh -M339cafff|anonymous||ccvs/src|1.23|Makefile +M339cb00c|anonymous||ccvs/src|1.23|Makefile M339dc339|kingdon|~/work/*0|ccvs/src|1.231|sanity.sh W33a6eada|anonymous|*4|ccvs/emx||Makefile.in C3b235f50|kingdon||ccvs/emx|1.3|README -M3b23af50|kingdon|~/work/*0|ccvs/doc|1.281|cvs.texinfo +M3b23af62|kingdon|~/work/*0|ccvs/doc|1.281|cvs.texinfo EOF dotest history-1 "${testcvs} history -e -a" \ @@ -23691,7 +23772,7 @@ dotest modes-1 "${testcvs} -q co -l ." '' mkdir first-dir dotest modes-2 "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd first-dir touch aa dotest modes-3 "${testcvs} add aa" \ @@ -23817,7 +23898,7 @@ dotest modes2-1 "${testcvs} -q co -l ." '' mkdir first-dir dotest modes2-2 "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd first-dir touch aa dotest modes2-3 "${testcvs} add aa" \ @@ -23864,8 +23945,8 @@ dotest modes3-1 "$testcvs -q co -l ." mkdir first-dir second-dir dotest modes3-2 "${testcvs} add first-dir second-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository -Directory ${CVSROOT_DIRNAME}/second-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control +Directory ${CVSROOT_DIRNAME}/second-dir put under version control" touch first-dir/aa second-dir/ab dotest modes3-3 "${testcvs} add first-dir/aa second-dir/ab" \ "${SPROG} add: scheduling file .first-dir/aa. for addition @@ -23944,7 +24025,7 @@ dotest stamps-1 "${testcvs} -q co -l ." '' mkdir first-dir dotest stamps-2 "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd first-dir touch aa echo '$''Id$' >kw @@ -24073,7 +24154,7 @@ dotest perms-1 "$testcvs -q co -l ." mkdir first-dir dotest perms-2 "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd first-dir touch foo @@ -24115,7 +24196,7 @@ dotest symlinks-1 "$testcvs -q co -l ." mkdir first-dir dotest symlinks-2 "$testcvs add first-dir" \ -"Directory $CVSROOT_DIRNAME/first-dir added to the repository" +"Directory $CVSROOT_DIRNAME/first-dir put under version control" cd first-dir dotest symlinks-2.1 "ln -s $TESTDIR/fumble slink" @@ -24158,7 +24239,7 @@ dotest symlinks2-1 "${testcvs} -q co -l ." '' mkdir first-dir dotest symlinks2-2 "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd first-dir echo nonsymlink > slink dotest symlinks2-3 "${testcvs} add slink" \ @@ -24196,7 +24277,7 @@ dotest hardlinks-1 "${testcvs} -q co -l ." '' mkdir first-dir dotest hardlinks-2 "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd first-dir # Make up some ugly filenames, to test that they get @@ -24285,7 +24366,7 @@ dotest sticky-1 "$testcvs -q co -l ." mkdir first-dir dotest sticky-2 "$testcvs add first-dir" \ -"Directory $CVSROOT_DIRNAME/first-dir added to the repository" +"Directory $CVSROOT_DIRNAME/first-dir put under version control" cd first-dir touch file1 @@ -24390,7 +24471,7 @@ dotest keyword-1 "${testcvs} -q co -l ." '' mkdir first-dir dotest keyword-2 "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd first-dir echo '$''Author$' > file1 @@ -24595,7 +24676,7 @@ dotest keywordlog-1 "${testcvs} -q co -l ." '' mkdir first-dir dotest keywordlog-2 "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd first-dir echo initial >file1 dotest keywordlog-3 "${testcvs} add file1" \ @@ -24852,7 +24933,7 @@ xx" cd ../CVSROOT - echo "MaxCommentLeaderLength=1k" >>config + echo "MaxCommentLeaderLength=1K" >>config dotest keywordlog-35 "$testcvs -Q ci -mset-MaxCommentLeaderLength" cd ../first-dir @@ -24892,7 +24973,7 @@ dotest keywordname-init-1 "${testcvs} -q co -l ." '' mkdir first-dir dotest keywordname-init-2 "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd first-dir echo '$'"Name$" >file1 @@ -25012,7 +25093,7 @@ dotest keyword2-1 "${testcvs} -q co -l ." '' mkdir first-dir dotest keyword2-2 "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd first-dir echo '$''Revision$' >> file1 @@ -25214,7 +25295,7 @@ ${PLUS} modify on branch ${PLUS} modify on branch after brtag" - # With a branch sticky tag, HEAD is the head of the trunk. + # Even with a branch sticky tag, HEAD is the head of the trunk. dotest head-br1-setup "${testcvs} -q update -r br1" "[UP] file1" dotest head-br1-update "${testcvs} -q update -r HEAD -p file1" \ "imported contents @@ -25222,7 +25303,26 @@ add a line on trunk after trunktag" # But diff thinks that HEAD is "br1". Case (b) from cvs.texinfo. # Probably people are relying on it. - dotest head-br1-diff "${testcvs} -q diff -c -r HEAD -r br1" "" + #dotest head-br1-diff "${testcvs} -q diff -c -r HEAD -r br1" "" + dotest head-br1-diffdot "${testcvs} -q diff -c -r .bhead -r br1" "" + # Always. Fuck people relying on it. + dotest_fail head-br1-diff "${testcvs} -q diff -c -r HEAD -r br1" \ +"Index: file1 +=================================================================== +RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v +retrieving revision 1\.3 +retrieving revision 1\.3\.2\.2 +diff -c -r1\.3 -r1\.3\.2\.2 +\*\*\* file1 ${RFCDATE} 1\.3 +--- file1 ${RFCDATE} 1\.3\.2\.2 +\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* +\*\*\* 1,3 \*\*\*\* +--- 1,5 ---- + imported contents + add a line on trunk + add a line on trunk after trunktag +${PLUS} modify on branch +${PLUS} modify on branch after brtag" # With a nonbranch sticky tag on a branch, # HEAD is the head of the trunk @@ -25235,7 +25335,26 @@ # CVS 1.9 and older thought that HEAD is "brtag" (this was # noted as "strange, maybe accidental"). But "br1" makes a # whole lot more sense. - dotest head-brtag-diff "${testcvs} -q diff -c -r HEAD -r br1" "" + #dotest head-brtag-diff "${testcvs} -q diff -c -r HEAD -r br1" "" + dotest head-brtag-diffdot "${testcvs} -q diff -c -r .bhead -r br1" "" + # HEAD is always tip of the trunk. + dotest_fail head-brtag-diff "${testcvs} -q diff -c -r HEAD -r br1" \ +"Index: file1 +=================================================================== +RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v +retrieving revision 1\.3 +retrieving revision 1\.3\.2\.2 +diff -c -r1\.3 -r1\.3\.2\.2 +\*\*\* file1 ${RFCDATE} 1\.3 +--- file1 ${RFCDATE} 1\.3\.2\.2 +\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* +\*\*\* 1,3 \*\*\*\* +--- 1,5 ---- + imported contents + add a line on trunk + add a line on trunk after trunktag +${PLUS} modify on branch +${PLUS} modify on branch after brtag" # With a nonbranch sticky tag on the trunk, HEAD is the head # of the trunk, I think. @@ -25324,7 +25443,7 @@ dotest tagdate-1 "${testcvs} -q co -l ." '' mkdir first-dir dotest tagdate-2 "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd first-dir echo trunk-1 >file1 @@ -25802,7 +25921,7 @@ dotest multibranch2-1 "${testcvs} -q co -l ." '' mkdir first-dir dotest multibranch2-2 "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd first-dir echo trunk-1 >file1 @@ -26038,7 +26157,7 @@ dotest admin-1 "${testcvs} -q co -l ." '' mkdir first-dir dotest admin-2 "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd first-dir dotest_fail admin-3 "${testcvs} -q admin -i file1" \ @@ -27002,7 +27121,7 @@ dotest reserved-1 "${testcvs} -q co -l ." '' mkdir first-dir dotest reserved-2 "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd first-dir touch file1 dotest reserved-3 "${testcvs} add file1" \ @@ -28061,18 +28180,18 @@ dotest release-1 "${testcvs} -q co -l ." '' mkdir first-dir dotest release-2 "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd first-dir mkdir dir1 dotest release-3 "${testcvs} add dir1" \ -"Directory ${CVSROOT_DIRNAME}/first-dir/dir1 added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir/dir1 put under version control" mkdir dir2 dotest release-4 "${testcvs} add dir2" \ -"Directory ${CVSROOT_DIRNAME}/first-dir/dir2 added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir/dir2 put under version control" cd dir2 mkdir dir3 dotest release-5 "${testcvs} add dir3" \ -"Directory ${CVSROOT_DIRNAME}/first-dir/dir2/dir3 added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir/dir2/dir3 put under version control" cd ../.. dotest release-6 "${testcvs} release -d first-dir/dir2/dir3 first-dir/dir1" \ @@ -28093,11 +28212,11 @@ cd first-dir mkdir dir1 dotest release-10 "${testcvs} add dir1" \ -"Directory ${CVSROOT_DIRNAME}/first-dir/dir1 added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir/dir1 put under version control" cd dir2 mkdir dir3 dotest release-11 "${testcvs} add dir3" \ -"Directory ${CVSROOT_DIRNAME}/first-dir/dir2/dir3 added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir/dir2/dir3 put under version control" cd ../.. dotest release-12 "${testcvs} release first-dir/dir2/dir3 first-dir/dir1" \ @@ -28148,7 +28267,7 @@ cd first-dir mkdir second-dir dotest release-18 "$testcvs add second-dir" \ -"Directory $CVSROOT_DIRNAME/first-dir/second-dir added to the repository" +"Directory $CVSROOT_DIRNAME/first-dir/second-dir put under version control" cd second-dir touch file1 @@ -28766,8 +28885,8 @@ dotest multiroot-setup-4 "${testcvs1} co -l ." "${SPROG} checkout: Updating ." mkdir mod1-1 mod1-2 dotest multiroot-setup-5 "${testcvs1} add mod1-1 mod1-2" \ -"Directory ${CVSROOT1_DIRNAME}/mod1-1 added to the repository -Directory ${CVSROOT1_DIRNAME}/mod1-2 added to the repository" +"Directory ${CVSROOT1_DIRNAME}/mod1-1 put under version control +Directory ${CVSROOT1_DIRNAME}/mod1-2 put under version control" echo file1-1 > mod1-1/file1-1 echo file1-2 > mod1-2/file1-2 dotest multiroot-setup-6 "${testcvs1} add mod1-1/file1-1 mod1-2/file1-2" \ @@ -28792,8 +28911,8 @@ dotest multiroot-setup-8 "${testcvs2} co -l ." "${SPROG} checkout: Updating ." mkdir mod2-1 mod2-2 dotest multiroot-setup-9 "${testcvs2} add mod2-1 mod2-2" \ -"Directory ${CVSROOT2_DIRNAME}/mod2-1 added to the repository -Directory ${CVSROOT2_DIRNAME}/mod2-2 added to the repository" +"Directory ${CVSROOT2_DIRNAME}/mod2-1 put under version control +Directory ${CVSROOT2_DIRNAME}/mod2-2 put under version control" echo file2-1 > mod2-1/file2-1 echo file2-2 > mod2-2/file2-2 dotest multiroot-setup-6 "${testcvs2} add mod2-1/file2-1 mod2-2/file2-2" \ @@ -30020,7 +30139,7 @@ dotest multiroot3-2 "${testcvs} -d ${CVSROOT1} -q co -l ." "" mkdir dir1 dotest multiroot3-3 "${testcvs} add dir1" \ -"Directory ${TESTDIR}/root1/dir1 added to the repository" +"Directory ${TESTDIR}/root1/dir1 put under version control" dotest multiroot3-4 "${testcvs} -d ${CVSROOT2} init" "" rm -r CVS dotest multiroot3-5 "${testcvs} -d ${CVSROOT2} -q co -l ." "" @@ -30037,7 +30156,7 @@ echo "D/dir2////" >>CVS/Entries dotest multiroot3-7 "${testcvs} add dir2" \ -"Directory ${TESTDIR}/root2/dir2 added to the repository" +"Directory ${TESTDIR}/root2/dir2 put under version control" touch dir1/file1 dir2/file2 if $remote; then @@ -30146,7 +30265,7 @@ dotest multiroot4-2 "${testcvs} -d ${CVSROOT1} -q co -l ." "" mkdir dircom dotest multiroot4-3 "${testcvs} add dircom" \ -"Directory ${TESTDIR}/root1/dircom added to the repository" +"Directory ${TESTDIR}/root1/dircom put under version control" cd dircom touch file1 dotest multiroot4-4 "${testcvs} add file1" \ @@ -30161,7 +30280,7 @@ dotest multiroot4-7 "${testcvs} -d ${CVSROOT2} -q co -l ." "" mkdir dircom dotest multiroot4-8 "${testcvs} add dircom" \ -"Directory ${TESTDIR}/root2/dircom added to the repository" +"Directory ${TESTDIR}/root2/dircom put under version control" cd dircom touch file2 dotest multiroot4-9 "${testcvs} add file2" \ @@ -30179,7 +30298,7 @@ # repository) and so on would also look the same. mkdir sdir2 dotest multiroot4-11 "${testcvs} -d ${CVSROOT2} add sdir2" \ -"Directory ${TESTDIR}/root2/dircom/sdir2 added to the repository" +"Directory ${TESTDIR}/root2/dircom/sdir2 put under version control" dotest multiroot4-12 "${testcvs} -q update" "" cd .. @@ -30208,7 +30327,7 @@ dotest rmroot-setup-1 "${testcvs} -q co -l ." '' mkdir first-dir dotest rmroot-setup-2 "${testcvs} add first-dir" \ -"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" +"Directory ${CVSROOT_DIRNAME}/first-dir put under version control" cd first-dir touch file1 file2 dotest rmroot-setup-3 "${testcvs} add file1 file2" \ @@ -31033,6 +31152,8 @@ EOF echo THIS-CONFIG-OPTION-IS-BAD=XXX >$TESTDIR/newconfig dotest_fail server-20 "$testcvs server -c $TESTDIR/newconfig" \ +"Usage: cvs server +Normally invoked by a cvs client on a remote machine." \ "E $SPROG \[server aborted\]: Invalid path to config file specified: \`$TESTDIR/newconfig'" </dev/null EOF - sleep 1 + sleep 2 dotest_fail client-11 "$testcvs update" \ "$CPROG \[update aborted\]: patch original file \./\.bashrc does not exist" @@ -31342,7 +31465,7 @@ echo "ok" cat >/dev/null EOF - sleep 1 + sleep 2 dotest_fail client-12 "$testcvs update" \ "$CPROG update: Server attempted to update a file via an invalid pathname: $CPROG \[update aborted\]: \`\.\./\.\./home/.bashrc'\." @@ -31362,7 +31485,7 @@ echo "ok" cat >/dev/null EOF - sleep 1 + sleep 2 dotest_fail client-13 "$testcvs update" \ "$CPROG update: Server attempted to update a file via an invalid pathname: $CPROG \[update aborted\]: \`$HOME/.bashrc'\." @@ -31382,7 +31505,7 @@ echo "ok" cat >/dev/null EOF - sleep 1 + sleep 2 dotest_fail client-14 "$testcvs update" \ "$CPROG update: Server attempted to update a file via an invalid pathname: $CPROG \[update aborted\]: \`\.\./\.\./home/.bashrc'\." @@ -31402,7 +31525,7 @@ echo "ok" cat >/dev/null EOF - sleep 1 + sleep 2 dotest_fail client-15 "$testcvs update" \ "$CPROG update: Server attempted to update a file via an invalid pathname: $CPROG \[update aborted\]: \`$HOME/.bashrc'\." @@ -31422,7 +31545,7 @@ echo "ok" cat >/dev/null EOF - sleep 1 + sleep 2 dotest_fail client-16 "$testcvs update" \ "$CPROG update: Server attempted to update a file via an invalid pathname: $CPROG \[update aborted\]: \`\.\./\.\./home/.bashrc'\." @@ -31446,7 +31569,7 @@ echo "ok" cat >/dev/null EOF - sleep 1 + sleep 2 dotest_fail client-18 "$testcvs update" \ "$CPROG \[update aborted\]: protocol error: Copy-file tried to specify directory" @@ -31459,7 +31582,7 @@ # Check that the client detects redirect loops. cat >$TESTDIR/serveme </dev/null EOF echo newstuff >file1 - sleep 1 + sleep 2 dotest_fail client-20 "$testcvs ci" \ "$CPROG commit: Examining \. $CPROG \[commit aborted\]: \`Redirect' loop detected\. Server misconfiguration$QUESTION" @@ -31709,7 +31832,7 @@ cd second mkdir otherdir dotest template-add-1 "${testcvs} add otherdir" \ -"Directory ${CVSROOT_DIRNAME}/second/otherdir added to the repository" +"Directory ${CVSROOT_DIRNAME}/second/otherdir put under version control" if $remote; then dotest template-add-2r \ "cmp otherdir/CVS/Template ${TESTDIR}/template/temp.def" '' @@ -31868,7 +31991,7 @@ save_CVS_SERVER=$CVS_SERVER ln -s $PRIMARY_CVSROOT_DIRNAME $TESTDIR/primary_link dotest writeproxy-0 "$CVS_SERVER server" \ -"Valid-requests Root Valid-responses valid-requests Command-prep Referrer Repository Directory Relative-directory Max-dotdot Static-directory Sticky Entry Kopt Checkin-time Modified Is-modified UseUnchanged Unchanged Notify Hostname LocalDir Questionable Argument Argumentx Global_option Gzip-stream wrapper-sendme-rcsOptions Set ${DOTSTAR}expand-modules ci co update diff log rlog list rlist global-list-quiet ls add remove update-patches gzip-file-contents status rdiff tag rtag import admin export history release watch-on watch-off watch-add watch-remove watchers editors edit init annotate rannotate noop version +"Valid-requests Root Valid-responses valid-requests Command-prep Referrer Repository Directory Relative-directory Max-dotdot Static-directory Sticky Entry Kopt Checkin-time Modified Is-modified UseUnchanged Unchanged Notify Hostname LocalDir Questionable Argument Argumentx Global_option Gzip-stream wrapper-sendme-rcsOptions Set ${DOTSTAR}expand-modules ci co update diff log rlog list rlist global-list-quiet ls add remove update-patches gzip-file-contents status rdiff tag rtag import admin export history release watch-on watch-off watch-add watch-remove watchers editors edit init annotate rannotate noop version suck ok ok ok" \ @@ -32088,7 +32211,7 @@ # No need to check the PID of the last client since we are testing with # Redirect disabled. -proot_arg="--allow-root $SECONDARY_CVSROOT_DIRNAME" +proot_arg="--allow-root ${PRIMARY_CVSROOT##*:} --allow-root $SECONDARY_CVSROOT_DIRNAME" exec $servercvs \$proot_arg "\$@" EOF cat <$TESTDIR/writeproxy-primary-wrapper @@ -32152,7 +32275,7 @@ mv $TESTDIR/save-root $PRIMARY_CVSROOT_DIRNAME dotest writeproxy-noredirect-5 "$CVS_SERVER server" \ -"Valid-requests Root Valid-responses valid-requests Command-prep Referrer Repository Directory Relative-directory Max-dotdot Static-directory Sticky Entry Kopt Checkin-time Modified Is-modified UseUnchanged Unchanged Notify Hostname LocalDir Questionable Argument Argumentx Global_option Gzip-stream wrapper-sendme-rcsOptions Set ${DOTSTAR}expand-modules ci co update diff log rlog list rlist global-list-quiet ls add remove update-patches gzip-file-contents status rdiff tag rtag import admin export history release watch-on watch-off watch-add watch-remove watchers editors edit init annotate rannotate noop version +"Valid-requests Root Valid-responses valid-requests Command-prep Referrer Repository Directory Relative-directory Max-dotdot Static-directory Sticky Entry Kopt Checkin-time Modified Is-modified UseUnchanged Unchanged Notify Hostname LocalDir Questionable Argument Argumentx Global_option Gzip-stream wrapper-sendme-rcsOptions Set ${DOTSTAR}expand-modules ci co update diff log rlog list rlist global-list-quiet ls add remove update-patches gzip-file-contents status rdiff tag rtag import admin export history release watch-on watch-off watch-add watch-remove watchers editors edit init annotate rannotate noop version suck ok ok ok @@ -32184,7 +32307,7 @@ cd firstdir echo now you see me >file1 dotest writeproxy-noredirect-6 "$CVS_SERVER server" \ -"Valid-requests Root Valid-responses valid-requests Command-prep Referrer Repository Directory Relative-directory Max-dotdot Static-directory Sticky Entry Kopt Checkin-time Modified Is-modified UseUnchanged Unchanged Notify Hostname LocalDir Questionable Argument Argumentx Global_option Gzip-stream wrapper-sendme-rcsOptions Set ${DOTSTAR}expand-modules ci co update diff log rlog list rlist global-list-quiet ls add remove update-patches gzip-file-contents status rdiff tag rtag import admin export history release watch-on watch-off watch-add watch-remove watchers editors edit init annotate rannotate noop version +"Valid-requests Root Valid-responses valid-requests Command-prep Referrer Repository Directory Relative-directory Max-dotdot Static-directory Sticky Entry Kopt Checkin-time Modified Is-modified UseUnchanged Unchanged Notify Hostname LocalDir Questionable Argument Argumentx Global_option Gzip-stream wrapper-sendme-rcsOptions Set ${DOTSTAR}expand-modules ci co update diff log rlog list rlist global-list-quiet ls add remove update-patches gzip-file-contents status rdiff tag rtag import admin export history release watch-on watch-off watch-add watch-remove watchers editors edit init annotate rannotate noop version suck ok ok ok @@ -32214,7 +32337,7 @@ echo /file1/0/dummy+timestamp// >>CVS/Entries dotest writeproxy-noredirect-7 "$CVS_SERVER server" \ -"Valid-requests Root Valid-responses valid-requests Command-prep Referrer Repository Directory Relative-directory Max-dotdot Static-directory Sticky Entry Kopt Checkin-time Modified Is-modified UseUnchanged Unchanged Notify Hostname LocalDir Questionable Argument Argumentx Global_option Gzip-stream wrapper-sendme-rcsOptions Set ${DOTSTAR}expand-modules ci co update diff log rlog list rlist global-list-quiet ls add remove update-patches gzip-file-contents status rdiff tag rtag import admin export history release watch-on watch-off watch-add watch-remove watchers editors edit init annotate rannotate noop version +"Valid-requests Root Valid-responses valid-requests Command-prep Referrer Repository Directory Relative-directory Max-dotdot Static-directory Sticky Entry Kopt Checkin-time Modified Is-modified UseUnchanged Unchanged Notify Hostname LocalDir Questionable Argument Argumentx Global_option Gzip-stream wrapper-sendme-rcsOptions Set ${DOTSTAR}expand-modules ci co update diff log rlog list rlist global-list-quiet ls add remove update-patches gzip-file-contents status rdiff tag rtag import admin export history release watch-on watch-off watch-add watch-remove watchers editors edit init annotate rannotate noop version suck ok ok Mode u=rw,g=rw,o=r @@ -32327,9 +32450,9 @@ # Set new roots. PRIMARY_CVSROOT_DIRNAME=$TESTDIR/primary_cvsroot - PRIMARY_CVSROOT=:ext:$host$PRIMARY_CVSROOT_DIRNAME + PRIMARY_CVSROOT=:ext:$host:$PRIMARY_CVSROOT_DIRNAME SECONDARY_CVSROOT_DIRNAME=$TESTDIR/writeproxy_cvsroot - SECONDARY_CVSROOT=":ext;Redirect=yes:$host$SECONDARY_CVSROOT_DIRNAME" + SECONDARY_CVSROOT=":ext;Redirect=yes:$host:$SECONDARY_CVSROOT_DIRNAME" # Initialize the primary repository dotest writeproxy-ssh-init-1 "$testcvs -d$PRIMARY_CVSROOT init" @@ -32426,9 +32549,9 @@ # Set new roots. PRIMARY_CVSROOT_DIRNAME=$TESTDIR/primary_cvsroot - PRIMARY_CVSROOT=:ext:$host$PRIMARY_CVSROOT_DIRNAME + PRIMARY_CVSROOT=:ext:$host:$PRIMARY_CVSROOT_DIRNAME SECONDARY_CVSROOT_DIRNAME=$TESTDIR/writeproxy_cvsroot - SECONDARY_CVSROOT=":ext;Redirect=no:$host$PRIMARY_CVSROOT_DIRNAME" + SECONDARY_CVSROOT=":ext;Redirect=no:$host:$PRIMARY_CVSROOT_DIRNAME" # Initialize the primary repository dotest writeproxy-ssh-noredirect-init-1 \ @@ -32463,7 +32586,7 @@ # No need to check the PID of the last client since we are testing with # Redirect disabled. -proot_arg="--allow-root=$SECONDARY_CVSROOT_DIRNAME" +proot_arg="--allow-root ${PRIMARY_CVSROOT##*:} --allow-root=$SECONDARY_CVSROOT_DIRNAME" exec $CVS_SERVER \$proot_arg "\$@" EOF cat <$TESTDIR/writeproxy-primary-wrapper @@ -32836,7 +32959,7 @@ *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} ) *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} ) *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} ) -Directory ${CVSROOT_DIRNAME}/trace/subdir added to the repository" \ +Directory ${CVSROOT_DIRNAME}/trace/subdir put under version control" \ " *callerdat=${PFMT}, argc=1, argv=${PFMT}, *direntproc=${PFMT}, dirleavproc=${PFMT}, @@ -32868,7 +32991,7 @@ *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} ) *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} ) *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} ) -${DOTSTAR}Directory ${CVSROOT_DIRNAME}/trace/subdir added to the repository +${DOTSTAR}Directory ${CVSROOT_DIRNAME}/trace/subdir put under version control S -> CVS_SERVER_SLEEP not set\. S -> Lock_Cleanup() S -> Lock_Cleanup() @@ -35507,6 +35630,35 @@ ;; + + suck) + modify_repo mkdir $CVSROOT_DIRNAME/first-dir + dotest suck-init-1 "$testcvs -Q co first-dir" + + cd first-dir + ${AWK} 'BEGIN { for (i = 64; i < 96; i++) printf "%02x %c\n", i-64, i }' \ + alloctet.dat + ${AWK} 'BEGIN { for (i = 32; i < 256; i++) printf "%02X %c\n", i, i }' \ + >alloctet.dat + + dotest suck-1 "$testcvs -Q add alloctet.dat" + dotest suck-2 "$testcvs -Q ci -m added" + + cd .. + + dotest suck-3 "$testcvs -Q suck first-dir/alloctet.dat >commavs" + echo "first-dir/alloctet.dat,v" >commavl + cat $CVSROOT_DIRNAME/first-dir/alloctet.dat,v >>commavl + dotest suck-eq "diff commavs commavl" + + dokeep + rm -r first-dir commavs commavl + modify_repo rm -rf $CVSROOT_DIRNAME/first-dir + ;; + + *) echo $what is not the name of a test -- ignored --- cvs-1.12.13+real.orig/src/update.c +++ cvs-1.12.13+real/src/update.c @@ -58,7 +58,7 @@ static int patch_file (struct file_info *finfo, Vers_TS *vers_ts, int *docheckout, struct stat *file_info, - unsigned char *checksum); + md5_uint32 *checksum); static void patch_file_write (void *, const char *, size_t); #endif static int merge_file (struct file_info *finfo, Vers_TS *vers); @@ -723,7 +723,7 @@ { int docheckout; struct stat file_info; - unsigned char checksum[16]; + md5_uint32 checksum[4]; retval = patch_file (finfo, vers, &docheckout, @@ -735,7 +735,8 @@ (rcs_diff_patches ? SERVER_RCS_DIFF : SERVER_PATCHED), - file_info.st_mode, checksum, + file_info.st_mode, + (void *)checksum, NULL); break; } @@ -1197,7 +1198,7 @@ { char *backup; int set_time, retval = 0; - int status; + int status = 0; int file_is_dead; struct buffer *revbuf; @@ -1511,7 +1512,7 @@ */ static int patch_file (struct file_info *finfo, Vers_TS *vers_ts, int *docheckout, - struct stat *file_info, unsigned char *checksum) + struct stat *file_info, md5_uint32 *checksum) { char *backup; char *file1; --- cvs-1.12.13+real.orig/windows-NT/JmgStat.c +++ cvs-1.12.13+real/windows-NT/JmgStat.c @@ -33,7 +33,7 @@ * Reproduced here with permission of Tony Hoyle. * * This code is copyright by Tony Hoyle and is licensed under the Gnu - * Public License. (See above) + * General Public License. (See above) * * NTFS, HPFS, and OWFS store file times as UTC times. * FAT stores file times as local time. --- cvs-1.12.13+real.orig/windows-NT/Makefile.in +++ cvs-1.12.13+real/windows-NT/Makefile.in @@ -173,6 +173,7 @@ GETOPT_H = @GETOPT_H@ GLOB_H = @GLOB_H@ GMSGFMT = @GMSGFMT@ +GREP = @GREP@ HAVE_LONG_64BIT = @HAVE_LONG_64BIT@ HAVE_LONG_LONG_64BIT = @HAVE_LONG_LONG_64BIT@ HAVE__BOOL = @HAVE__BOOL@ @@ -210,6 +211,7 @@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ @@ -235,8 +237,6 @@ ZLIB_LIBS = @ZLIB_LIBS@ ZLIB_SUBDIRS = @ZLIB_SUBDIRS@ ac_ct_CC = @ac_ct_CC@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ ac_prefix_program = @ac_prefix_program@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ @@ -253,23 +253,30 @@ build_vendor = @build_vendor@ cvs_client_objects = @cvs_client_objects@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ --- cvs-1.12.13+real.orig/windows-NT/SCC/Makefile.in +++ cvs-1.12.13+real/windows-NT/SCC/Makefile.in @@ -161,6 +161,7 @@ GETOPT_H = @GETOPT_H@ GLOB_H = @GLOB_H@ GMSGFMT = @GMSGFMT@ +GREP = @GREP@ HAVE_LONG_64BIT = @HAVE_LONG_64BIT@ HAVE_LONG_LONG_64BIT = @HAVE_LONG_LONG_64BIT@ HAVE__BOOL = @HAVE__BOOL@ @@ -198,6 +199,7 @@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ @@ -223,8 +225,6 @@ ZLIB_LIBS = @ZLIB_LIBS@ ZLIB_SUBDIRS = @ZLIB_SUBDIRS@ ac_ct_CC = @ac_ct_CC@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ ac_prefix_program = @ac_prefix_program@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ @@ -241,23 +241,30 @@ build_vendor = @build_vendor@ cvs_client_objects = @cvs_client_objects@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ --- cvs-1.12.13+real.orig/contrib/rcs2log.sh +++ cvs-1.12.13+real/contrib/rcs2log.sh @@ -31,6 +31,7 @@ -i INDENT Indent change log lines by INDENT spaces (default 8). -l LENGTH Try to limit log lines to LENGTH characters (default 79). -L FILE Use rlog-format FILE for source of logs. + -n Obsolete, use -u instead (whose syntax differs). -R If no FILEs are given and RCS is used, recurse through working directory. -r OPTION Pass OPTION to subsidiary log command. -t TABWIDTH Tab stops are every TABWIDTH characters (default 8). @@ -199,7 +200,7 @@ m[9]="Oct"; m[10]="Nov"; m[11]="Dec" ' -logdir=`$MKTEMP -d $TMPDIR/rcs2log.XXXXXX` +logdir=$($MKTEMP -d $TMPDIR/rcs2log.XXXXXXXXXX) test -n "$logdir" || exit llogout=$logdir/l trap exit 1 2 13 15 @@ -632,7 +633,7 @@ # Sort the log entries, first by date+time (in reverse order), # then by author, then by log entry, and finally by file name and revision # (just in case). -sort -t"$SOH" +2 -4r +4 +0 | +sort -t"$SOH" -k 3,4r -k 5 -k 1 | # Finally, reformat the sorted log entries. $AWK -F"$SOH" ' --- cvs-1.12.13+real.orig/contrib/sccs2rcs.in +++ cvs-1.12.13+real/contrib/sccs2rcs.in @@ -219,7 +219,7 @@ # we expected in the output we have other problems. # Note: Solaris awk does not like the following line. Use gawk # mawk, or nawk instead. - set date = `sccs prs -r$rev $file | @AWK@ '/^D / {print (substr($3,0,2)+0<70?20:19) $3, $4; exit}'` + set date = `sccs prs -r$rev $file | @AWK@ '/^D / {print (substr($3,1,2)+0<70?20:19) $3, $4; exit}'` set author = `sccs prs -r$rev $file | @AWK@ '/^D / {print $5; exit}'` echo "" echo "==> file $file, rev=$rev, date=$date, author=$author" --- cvs-1.12.13+real.orig/contrib/Makefile.in +++ cvs-1.12.13+real/contrib/Makefile.in @@ -190,6 +190,7 @@ GETOPT_H = @GETOPT_H@ GLOB_H = @GLOB_H@ GMSGFMT = @GMSGFMT@ +GREP = @GREP@ HAVE_LONG_64BIT = @HAVE_LONG_64BIT@ HAVE_LONG_LONG_64BIT = @HAVE_LONG_LONG_64BIT@ HAVE__BOOL = @HAVE__BOOL@ @@ -227,6 +228,7 @@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ @@ -252,8 +254,6 @@ ZLIB_LIBS = @ZLIB_LIBS@ ZLIB_SUBDIRS = @ZLIB_SUBDIRS@ ac_ct_CC = @ac_ct_CC@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ ac_prefix_program = @ac_prefix_program@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ @@ -270,23 +270,30 @@ build_vendor = @build_vendor@ cvs_client_objects = @cvs_client_objects@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ --- cvs-1.12.13+real.orig/contrib/rcs2log.1 +++ cvs-1.12.13+real/contrib/rcs2log.1 @@ -25,17 +25,17 @@ .Sh SYNOPSIS .Nm rcs2log .Bk -words +.Op Fl nRv .Op Fl c Ar changelog .Op Fl h Ar hostname .Op Fl i Ar indent .Op Fl l Ar length -.Op Fl R +.Op Fl L Ar file .Op Fl r Ar option .Op Fl t Ar tabwidth .Op Fl u Ar loginfullnamemailaddr -.Op Fl v -.Op Fl -help -.Op Fl -version +.Op Fl \-help +.Op Fl \-version .Op Ar file ... .Ek .Sh DESCRIPTION @@ -62,6 +62,14 @@ Try to limit log lines to .Ar length characters (default 79). +.It Fl L Ar file +Use rlog-format +.Ar file +for source of logs. +.It Fl n +Obsolete, use +.Fl u +instead (whose syntax differs). .It Fl R If no .Ar file Ns Li (s) @@ -83,9 +91,9 @@ .Ar mailaddr . .It Fl v Append RCS revision to file names in log lines. -.It Fl -help +.It Fl \-help Output help. -.It Fl -version +.It Fl \-version Output version number. .El .Sh SEE ALSO --- cvs-1.12.13+real.orig/contrib/pam/Makefile.in +++ cvs-1.12.13+real/contrib/pam/Makefile.in @@ -155,6 +155,7 @@ GETOPT_H = @GETOPT_H@ GLOB_H = @GLOB_H@ GMSGFMT = @GMSGFMT@ +GREP = @GREP@ HAVE_LONG_64BIT = @HAVE_LONG_64BIT@ HAVE_LONG_LONG_64BIT = @HAVE_LONG_LONG_64BIT@ HAVE__BOOL = @HAVE__BOOL@ @@ -192,6 +193,7 @@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ @@ -217,8 +219,6 @@ ZLIB_LIBS = @ZLIB_LIBS@ ZLIB_SUBDIRS = @ZLIB_SUBDIRS@ ac_ct_CC = @ac_ct_CC@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ ac_prefix_program = @ac_prefix_program@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ @@ -235,23 +235,30 @@ build_vendor = @build_vendor@ cvs_client_objects = @cvs_client_objects@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ --- cvs-1.12.13+real.orig/debian/compat +++ cvs-1.12.13+real/debian/compat @@ -0,0 +1 @@ +5 --- cvs-1.12.13+real.orig/debian/cvs-switchroot.1 +++ cvs-1.12.13+real/debian/cvs-switchroot.1 @@ -0,0 +1,78 @@ +.\" $MirOS: contrib/hosted/tg/deb/cvs/debian/cvs-switchroot.1,v 1.2 2011/06/24 16:16:06 tg Exp $ +.\" +.Dd June 10, 2011 +.Dt CVS\-SWITCHROOT 1 +.Os +.Sh NAME +.Nm cvs\-switchroot +.Nd change repository or tag in a cvs working copy +.Sh SYNOPSIS +.Nm +.Op Fl T +.Ar newroot +.Op Ar +.Pp +.Nm +.Op Fl T +\-\& +.Ar srcpath +.Op Ar +.Sh DESCRIPTION +The +.Nm +utility manipulates a CVS working copy directly, +modifying the information stored in the administrative +subdirectory and saving space by hardlinking if possible. +.Pp +If the +.Fl T +option is given, the sticky tag is operated on, +otherwise, the repository path +.Pq Ev CVSROOT . +.Pp +The information (Tag or Root) is set to the same as in +.Ar srcpath +if the first non-option argument +.Ar newroot +is a sole dash +.Pq Sq \-\& , +the literal value +.Ar newroot +otherwise. +.Sh EXAMPLES +Change all +.Pa Root +information in the current sandbox to +.Pa /cvs : +.Bd -literal -offset ident +$ cvs-switchroot /cvs . +.Ed +.Pp +Set all roots in the current working directory and all +its subdirectories to the +.Pa Root +of the parent directory: +.Bd -literal -offset ident +$ cvs-switchroot \- .. . +.Ed +.Pp +Hardlink the +.Pa Tag +information in the current working directory, for example +.Pa /usr/src , +and +.Pa /usr/ports +with each other: +.Bd -literal -offset ident +$ cvs-switchroot \-T \- . . /usr/ports +.Ed +.Sh SEE ALSO +.Xr cvs 1 +.Sh HISTORY +.Nm +has existed in the MirBSD source tree since 2005. +It was added to Debian's cvs package in 2011. +.Sh CAVEATS +.Nm +depends on +.Nm mksh . --- cvs-1.12.13+real.orig/debian/postrm +++ cvs-1.12.13+real/debian/postrm @@ -0,0 +1,49 @@ +#!/bin/sh +# $MirOS: contrib/hosted/tg/deb/cvs/debian/postrm,v 1.4 2011/12/04 14:45:59 tg Exp $ + +set -e + +# This maintainer script can be called the following ways: +# +# * postrm "remove" +# * postrm "purge" +# * old-postrm "upgrade" $new_version +# * disappearers-postrm "disappear" $overwriter $o_version +# The package's files have been removed or replaced; only Essential pak- +# kages may be available; skip gracefully actions requiring Depends. +# +# * new-postrm "failed-upgrade" $old_version +# Called when 'old-postrm "upgrade"' fails; the new package is unpacked, +# Essential packages and Pre-Depends are available; the latter have been +# configured and never removed but may be Unpacked or Half-Configured. +# +# * new-postrm "abort-install" [$old_version] +# * new-postrm "abort-upgrade" $old_version +# Called when preinst fails; package is not unpacked. Essential packages +# and (unpacked or Half-Configured) Pre-Depends are available. + +case $1 in +remove) + ;; + +purge) + rm -f /etc/cvs.conf /etc/cvs-cron.conf /etc/cvs-pserver.conf /etc/cron.weekly/cvs + test -x /usr/sbin/update-inetd && update-inetd --remove "^cvspserver" + (delgroup --system --only-if-empty _cvsadmin || :) + ;; + +upgrade|disappear|failed-upgrade|abort-install|abort-upgrade) + ;; + +*) + echo >&2 "postrm called with unknown subcommand '$1'" + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 --- cvs-1.12.13+real.orig/debian/changelog +++ cvs-1.12.13+real/debian/changelog @@ -0,0 +1,101 @@ +cvs (2:1.12.13+real-8) unstable; urgency=high + + * Brown paper bag change: sanity.sh (the testsuite) was corrupted + during checkout of the packaging VCS in the -7 (all PASS again) + * Bonus change: use hardening build flags; fix resulting warnings + * Urgency due to riding on the previous upload’s security fix + + -- Thorsten Glaser Tue, 07 Feb 2012 20:39:42 +0000 + +cvs (2:1.12.13+real-7) unstable; urgency=high + + * Drop unsafe scripts from contrib, add NEWS entry for that + (Closes: #658947) + * debian/rules: cleanup (remove install/check, dh_installdirs; + switch to dh_prep if extant) + * Use -Wl,--as-needed for the link to appease dpkg-shlibdebs + * Update maintainer scripts from template jupp (better comments) + * Drop csh-using contrib script from package, with NEWS entry + * Demote rcs2log(1) to contrib, add NEWS entry + * Stop shipping a patch to rcs(1) with the binary package, ffs + * Don’t ship cvshelp.man either, it’s antiquated and not useful + * Fix meaning of -rHEAD for the diff subcommand (with NEWS entry) + * Make the testsuite again usable (full PASS) + * Apply suggested patch for CVE-2012-0804 from Petr Pisar + * Update lintian overrides + + -- Thorsten Glaser Tue, 07 Feb 2012 18:01:44 +0000 + +cvs (2:1.12.13+real-6) unstable; urgency=low + + * d/watch: mangle the +real away until 1.12.14 is out, + as this is an artefact from the old (epoch 1) packaging + * Demote mksh to Suggests, recommended (hah!) by many + (Closes: #631110) (merges back 2:1.12.13+real-5ubuntu1) + * Honour Policy §11.4; fix by YOSHINO Yoshihito (Closes: #631936) + * Use upstream-source-in-CVS packaging, clean up + * d/rules: Add build-{arch,indep} targets as aliases to build + * Bring d/copyright more in sync with this distfile’s reality + * d/control: Reword package description. (Closes: #631826) + * If sleeping at exit, sleep another 20 ms (2 HZ), to avoid + possible race conditions. (Should work around LP: #12230) + * Update in sync with MirPorts 1.12.13-12 = MirOS BSD 0AAF.1 + * Stop installing cvsbug(8), use reportbug instead + + -- Thorsten Glaser Thu, 28 Jul 2011 16:02:02 +0000 + +cvs (2:1.12.13+real-5) unstable; urgency=low + + * Drop PAM entirely, it was specific to Debian anyway + * Add cvs-switchroot, from src/scripts/mnt-cvsroot (Closes: #41685) + * Drop some old and irrelevant changelogs from the binary package + * Update from MirPorts 1.12.13-11 = MirOS BSD 0AAE.2 + * Revert most of 65_login_cvspass_message and just be silent if the + pserver client password file doesn't exist and create it silently + if needed (Closes: #524146) + * Honour noexec flag in 'cvs -n init' (Closes: #151982) + * Sync modules option list with cederqvist (Closes: #226888) + * Apply patch for assert on negated version numbers on diff + (Closes: #297551) + From: Peter Moulder + * Change cvs add dir message (Closes: #294094) + * Accept port when using extssh connection method (Closes: #151882) + * Write a new command for direct ,v file download (Closes: #421119) + * Drop broken libbsd.fd.o headers and shut up gcc 4.6 warnings + * Fix piuparts breakage: ignore delgroup non-existence on purge + * Deliver a NEWS.Debian (Closes: #626106) + * d/README.source: Update, call to automake is now also needed + + -- Thorsten Glaser Sat, 11 Jun 2011 05:32:56 +0000 + +cvs (2:1.12.13+real-4) unstable; urgency=low + + * Renamed .orig.tar.gz due to archive pathname conflict + * d/README.source: Document patch location (VCS-CVS, VCS-Browser alike) + * New build from MirPorts 1.12.13-10 = MirOS BSD 0AAE.1 + - Contains changes from cvs (1:1.12.13-12ubuntu1): + + Apply fix from Kees Cook to avoid %n in writable memory (LP: #296453) + - Other BTS relevant changes: + + Allow CVSROOT-less “version” (LP: #97683) and “cvs version” + + Update loginfo documentation, ‘%{t}’ is indeed gone (Closes: #329151) + + Lower syslog level from emergency (Closes: #563856) + + Fix awk substr start argument, thanks John Hughes (Closes: #518600) + + Rename nodes with colons in them (Closes: #113809) + + Fix typo (Closes: #464137) + + Document missing rcs2log(1) options (Closes: #306354) and fix dashes + * Upload new package to Debian unstable (Closes: #306432) + (Closes: #458864) (Closes: #464134) (Closes: #479752) + (Closes: #576035) (Closes: #614700) (Closes: #617578) + - Drop PAM (Closes: #340984) (Closes: #393436) + - No longer installs repositories (Closes: #168300) + (Closes: #408117) (Closes: #482301) (Closes: #499790) + (Closes: #511643) (Closes: #607297) + - Deprecate pserver (Closes: #343169) (Closes: #495938) + - Drop Origin and Bugs headers again (upload to Debian proper) + and old (pre-Debian upload) private repo changelog entries + - Thank you, Steve, for handing over package maintainership! + * Clarify package description (LP: #377411) + * Build with Kerberos V support (Closes: #60800) (LP: #157760) + * Recommends: openssh-client; Suggests: rcs + + -- Thorsten Glaser Sat, 07 May 2011 01:00:39 +0000 --- cvs-1.12.13+real.orig/debian/watch +++ cvs-1.12.13+real/debian/watch @@ -0,0 +1,5 @@ +# $MirOS: contrib/hosted/tg/deb/cvs/debian/watch,v 1.2 2011/06/11 23:00:31 tg Exp $ + +version=3 +opts="dversionmangle=s/\+real$//" \ +http://ftp.gnu.org/non-gnu/cvs/source/feature/1.12.13/ cvs-([0-9.]*)\.tar\.gz --- cvs-1.12.13+real.orig/debian/doc-base.intro +++ cvs-1.12.13+real/debian/doc-base.intro @@ -0,0 +1,7 @@ +Document: cvs-doc-intro +Title: Introduction to using CVS +Author: Steven Pemberton +Section: Programming + +Format: Text +Files: /usr/share/cvs/contrib/intro.doc* --- cvs-1.12.13+real.orig/debian/doc-base.rcsfiles +++ cvs-1.12.13+real/debian/doc-base.rcsfiles @@ -0,0 +1,11 @@ +Document: cvs-doc-rcsfiles +Title: RCS file format description +Author: Jim Kingdon +Abstract: This file attempts to document the RCS file format (which is + implemented by a great many tools, both free and non-free, both by + calling GNU RCS and by reimplementing access to RCS files) in some + standard separate from any one tool. +Section: Programming + +Format: Text +Files: /usr/share/doc/cvs/RCSFILES* --- cvs-1.12.13+real.orig/debian/README.source +++ cvs-1.12.13+real/debian/README.source @@ -0,0 +1,31 @@ +#!/bin/sh +# $MirOS: contrib/hosted/tg/deb/cvs/debian/README.source,v 1.14 2012/02/07 22:41:42 tg Exp $ +#- +# The extracted .orig.tar.gz is kept in CVS, in the origtgz branch +# with appropriate tags. Changes are directly applied to the code, +# as checked out from CVS, and will end up as "direct patches with +# no patch system", this is by design. When releasing, configure.in +# AC_INIT call must be touched to change the version number, then +# this script must be run to regenerate the autoconf/automake files. +# For that, there are some dependencies: +# sudo apt-get install autoconf2.59 automake1.9 +# +# The patchlevel is kept in configure.in (and regenerated as below). +# MirDebian-8 is in sync with MirOS-0AB0.1 revision. +# +# The patches should be kept in sync with those in The MirPorts Framework: +# Vcs-CVS: :ext:_anoncvs@anoncvs.mirbsd.org:/cvs ports/devel/cvs/patches +# Vcs-Browser: http://cvs.mirbsd.de/ports/devel/cvs/patches/ +# The gist of the patches should also be in sync with MirBSD base: +# Vcs-CVS: :ext:_anoncvs@anoncvs.mirbsd.org:/cvs src/gnu/usr.bin/cvs +# Vcs-Browser: http://cvs.mirbsd.de/src/gnu/usr.bin/cvs/ + +set -x +cd "$(dirname "$0")/.." +rm -f config.h.in configure +rv=0 +#aclocal-1.9 -I m4 || rv=$? +autoheader2.59 || rv=$? +automake-1.9 || rv=$? +autoconf2.59 || rv=$? +exit $rv --- cvs-1.12.13+real.orig/debian/source.lintian-overrides +++ cvs-1.12.13+real/debian/source.lintian-overrides @@ -0,0 +1,8 @@ +# $MirOS: contrib/hosted/tg/deb/cvs/debian/source.lintian-overrides,v 1.5 2012/02/07 18:02:14 tg Exp $ + +# desired method of keeping changes is CVS +cvs source: direct-changes-in-diff-but-no-patch-system * + +# not my fault +cvs source: source-contains-cvs-control-dir zlib/CVS +cvs source: source-contains-cvs-control-dir zlib/os2/CVS --- cvs-1.12.13+real.orig/debian/doc-base.paper +++ cvs-1.12.13+real/debian/doc-base.paper @@ -0,0 +1,14 @@ +Document: cvs-doc-paper +Title: CVS II: Parallelizing Software Development +Author: Brian Berliner +Abstract: This paper is the cvs USENIX article, Winter 1990. + The program described in this paper fills a need in the UNIX community + for a freely available tool to manage software revision and release + control in a multi-developer, multi-directory, multi-group environment. + This tool also addresses the increasing need for tracking third-party + vendor source distributions while trying to maintain local modifications + to earlier releases. +Section: Programming + +Format: PDF +Files: /usr/share/doc/cvs/cvs-paper.pdf* --- cvs-1.12.13+real.orig/debian/info +++ cvs-1.12.13+real/debian/info @@ -0,0 +1,3 @@ +# $MirOS: contrib/hosted/tg/deb/cvs/debian/info,v 1.1 2010/09/19 17:31:55 tg Exp $ +#- +debian/stagedir/usr/share/info/*.info --- cvs-1.12.13+real.orig/debian/NEWS +++ cvs-1.12.13+real/debian/NEWS @@ -0,0 +1,48 @@ +cvs (2:1.12.13+real-7) unstable; urgency=high + + rcs2log no longer lives in the PATH, the contributed script + and its manpage are in /usr/share/cvs/contrib/rcs2log now. + + Some contrib files (and their documentation) are no longer + shipped with the binary package (antique, insecure, useless). + + -rHEAD in "cvs diff" now, consistently with all other cvs + subcommands, means "tip of the trunk (MAIN branch)"; to + access the tip of the another branch, use its name; as a + compatibility aid, -r.bhead (only in diff) points to the + tip of the sticky branch. + + -- Thorsten Glaser Sun, 04 Dec 2011 20:10:09 +0000 + +cvs (2:1.12.13+real-5) unstable; urgency=low + + This cvs package is a totally new packaging and has almost + nothing in common with what was in Debian before. The most + visible changes are outlined below: + + pserver is no longer officially supported; the cvs package + does not install any service, inetd, or something similar. + If you want to set up a CVS server, use SSH, as shown in: + * http://www.stremler.net/Code/cvs_tricks/cvs-over-ssh.html + * http://www.stremler.net/Code/cvs_tricks/cvs-over-ssh-advanced.html + * http://www.stremler.net/Code/cvs_tricks/cvs-over-ssh-advanced2.html + + Consequentially, PAM is also no longer supported, and this + package does not set up or manage any repositories; that's + the system administrator's job now. + + For running "cvs admin" tasks the user must be a member of + the new "_cvsadmin" system group, or the repository be set + up (UserAdminOptions in CVSROOT/config) to allow everyone. + + The date format for $Id$ and similar in checkouts has been + switched back from ISO 8601 to the standard RCS format, to + keep checksums over checkouts/exports consistent. This, as + well as the fact that only the :local: and :extssh: access + methods are officially supported, is not negotiable. + + Please direct feature requests upstream, not to the BTS. I + do quite an amount of hacking CVS, but prefer to care only + about the packaging bits with "full power" in Debian. + + -- Thorsten Glaser Sat, 11 Jun 2011 05:01:49 +0000 --- cvs-1.12.13+real.orig/debian/doc-base.faq +++ cvs-1.12.13+real/debian/doc-base.faq @@ -0,0 +1,10 @@ +Document: cvs-doc-faq +Title: CVS - Frequently Asked Questions +Author: David Grubbs, Dr. Pascal Molli, and others +Abstract: Packaged FAQ-O-MATIC dump containing a number of answers + to frequently asked questions about CVS. The document may be out of + date; http://ximbiot.com/cvs/wiki/CVS%20FAQ contains an updated version. +Section: Programming + +Format: Text +Files: /usr/share/doc/cvs/FAQ* --- cvs-1.12.13+real.orig/debian/install +++ cvs-1.12.13+real/debian/install @@ -0,0 +1,13 @@ +# $MirOS: contrib/hosted/tg/deb/cvs/debian/install,v 1.8 2011/12/04 15:18:35 tg Exp $ +#- +#contrib/cvs_acls.html usr/share/cvs/contrib/ +contrib/descend.man usr/share/cvs/contrib/ +contrib/descend.sh usr/share/cvs/contrib/ +contrib/rcs2log.1 usr/share/cvs/contrib/ +contrib/rcs2sccs.sh usr/share/cvs/contrib/ +contrib/sandbox_status.man usr/share/cvs/contrib/ +debian/cvs-switchroot usr/bin/ +#debian/lintian/cvs usr/share/lintian/overrides/ +debian/stagedir/usr/bin/cvs usr/bin/ +#debian/stagedir/usr/bin/cvsbug usr/bin/ +debian/stagedir/usr/share/cvs/contrib/* usr/share/cvs/contrib/ --- cvs-1.12.13+real.orig/debian/postinst +++ cvs-1.12.13+real/debian/postinst @@ -0,0 +1,57 @@ +#!/bin/sh +# $MirOS: contrib/hosted/tg/deb/cvs/debian/postinst,v 1.4 2011/12/04 14:45:58 tg Exp $ + +set -e + +# This maintainer script can be called the following ways: +# +# * new-postinst "configure" [$most_recently_configured_version] +# The package is unpacked; all dependencies are unpacked and, when there +# are no circular dependencies, configured. +# +# * old-postinst "abort-upgrade" $new_version +# * conflictors-postinst "abort-remove" "in-favour" $package +# $new_version +# * postinst "abort-remove" +# * deconfigureds-postinst "abort-deconfigure" "in-favour" +# $failed_install_package $fip_version ["removing" +# $conflicting_package $cp_version] +# The package is unpacked; all dependencies are at least Half-Installed, +# previously been configured, and not removed. In some error situations, +# dependencies may not be even fully unpacked. +# +# * postinst "triggered" "${triggers[*]}" +# For trigger-only calls, i.e. if "configure" is not called. + +# upgrade case from Debian CVS +nukes='/etc/cvs.conf /etc/cvs-cron.conf /etc/cvs-pserver.conf /etc/cron.weekly/cvs' +for x in $nukes; do + test -e "$x" || continue + rm -f $nukes + test -x /usr/sbin/update-inetd && update-inetd --remove "^cvspserver" + break +done + +case $1 in +configure) + addgroup --force-badname --system _cvsadmin + ;; + +abort-upgrade|abort-remove|abort-deconfigure) + ;; + +triggered) + ;; + +*) + echo >&2 "postinst called with unknown subcommand '$1'" + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 --- cvs-1.12.13+real.orig/debian/control +++ cvs-1.12.13+real/debian/control @@ -0,0 +1,43 @@ +# $MirOS: contrib/hosted/tg/deb/cvs/debian/control,v 1.18 2011/07/28 13:41:50 tg Exp $ +# +Source: cvs +Section: vcs +Priority: optional +Maintainer: Thorsten Glaser +Homepage: http://www.nongnu.org/cvs/ +Build-Depends: debhelper (>= 5), autotools-dev, bsdmainutils, groff, + libbsd-dev, libkrb5-dev | heimdal-dev, texi2html, texinfo, + texlive-latex-base, zlib1g-dev +Standards-Version: 3.9.2 +# First word is the $CVSROOT (-d arg) string, second word the module. +Vcs-CVS: :ext:_anoncvs@anoncvs.mirbsd.org:/cvs contrib/hosted/tg/deb/cvs +Vcs-Browser: http://cvs.mirbsd.de/contrib/hosted/tg/deb/cvs/ + +Package: cvs +Architecture: any +Multi-Arch: foreign +Depends: ${misc:Depends}, ${shlibs:Depends}, adduser, + dpkg (>= 1.15.4) | install-info +Recommends: openssh-client +Suggests: mksh (>= 40~), rcs +Replaces: cvs-doc +Conflicts: cvs-doc +Provides: cvs-doc +Description: Concurrent Versions System + CVS is a version control system, which allows you to keep access + to old versions of files (usually source code), keep a log of + who, when, and why changes occurred, etc., like RCS or SCCS. + It handles multiple developers, multiple directories, triggers to + enable/log/control various operations, and can work over a wide + area network. The texinfo manual provides further information on + more tasks that it can perform. + . + There are some tasks that are not covered by CVS. They can be done in + conjunction with CVS but will tend to require some script-writing and + software other than CVS. These tasks are bug-tracking, build management + (that is, make and make-like tools), and automated testing. However, + CVS makes these tasks easier. + . + This package contains a CVS binary which can act as both client and + server, although there is no CVS dæmon; to access remote repositories, + please use :extssh: not :pserver: any more. --- cvs-1.12.13+real.orig/debian/copyright +++ cvs-1.12.13+real/debian/copyright @@ -0,0 +1,119 @@ +This package was debianised by Thorsten Glaser on +Wed Sep 15 21:52:29 UTC 2010. + +$MirOS: contrib/hosted/tg/deb/cvs/debian/copyright,v 1.5 2011/07/28 13:27:24 tg Exp $ + +It was downloaded from: +http://ftp.gnu.org/non-gnu/cvs/source/feature/1.12.13/cvs-1.12.13.tar.gz + + +GNU CVS itself is Copyright © 1986-2005 + The Free Software Foundation, Inc. +with portions contributed by others. + +It is licenced under the GNU General Public License, version 2 or later, +with a good part available under either GPLv1 or LGPLv2.x. On Debian sy‐ +stems the licence can be found at: /usr/share/common-licenses/GPL-2 + +Parts of the code are covered by the following GPL-compatible copyright: + + * Copyright (c) 1993 Bob Withers + * All Rights Reserved + * + * Permission to use, copy, modify, and distribute this software and + * its documentation for any purpose and without fee is hereby granted + * provided that the above copyright notice appears in all copies and + * that both the copyright notice and this permission notice appear in + * supporting documentation. + +One header file, which almost certainly does not fall under copyright +law, is covered by the four-clause UCB licence, however in 1999 the +advertising clause was rescinded, so it’s GPL compatible now: + + * Copyright (c) 1989 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + +Parts are covered by the following GPL-compatible licence: + +# Copyright © 2005, 2008, 2011 +# Thorsten “mirabilos” Glaser +# +# Provided that these terms and disclaimer and all copyright notices +# are retained or reproduced in an accompanying document, permission +# is granted to deal in this work without restriction, including un‐ +# limited rights to use, publicly perform, distribute, sell, modify, +# merge, give away, or sublicence. +# +# This work is provided “AS IS” and WITHOUT WARRANTY of any kind, to +# the utmost extent permitted by applicable law, neither express nor +# implied; without malicious intent or gross negligence. In no event +# may a licensor, author or contributor be held liable for indirect, +# direct, other damage, loss, or other issues arising in any way out +# of dealing in the work, even if advised of the possibility of such +# damage or existence of a defect, except proven that it results out +# of said person’s immediate fault when using the work as intended. + +CVS also includes a convenience copy of zlib which is not used; +it’s covered by these (GPL-compatible) terms: + + Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + +zlib, again, contains contributed material under terms as those: + + * Copyright (c) 1997 + * Christian Michelsen Research AS + * Advanced Computing + * Fantoftvegen 38, 5036 BERGEN, Norway + * http://www.cmr.no + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Christian Michelsen Research AS makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. --- cvs-1.12.13+real.orig/debian/cvs-switchroot +++ cvs-1.12.13+real/debian/cvs-switchroot @@ -0,0 +1,99 @@ +#!/bin/mksh +# $MirOS: contrib/hosted/tg/deb/cvs/debian/cvs-switchroot,v 1.1 2011/06/10 23:44:12 tg Exp $ +#- +# Copyright © 2005, 2008, 2011 +# Thorsten “mirabilos” Glaser +# +# Provided that these terms and disclaimer and all copyright notices +# are retained or reproduced in an accompanying document, permission +# is granted to deal in this work without restriction, including un‐ +# limited rights to use, publicly perform, distribute, sell, modify, +# merge, give away, or sublicence. +# +# This work is provided “AS IS” and WITHOUT WARRANTY of any kind, to +# the utmost extent permitted by applicable law, neither express nor +# implied; without malicious intent or gross negligence. In no event +# may a licensor, author or contributor be held liable for indirect, +# direct, other damage, loss, or other issues arising in any way out +# of dealing in the work, even if advised of the possibility of such +# damage or existence of a defect, except proven that it results out +# of said person’s immediate fault when using the work as intended. +#- +# Change CVSROOT of a checked out tree (and save space with it) +# With option -T: change Tag instead of Root + +me=${0##*/} +if [[ $1 = -T ]]; then + tagmode=-T + fn=Tag + shift +else + tagmode= + fn=Root +fi +newroot=$1 +useroot=0 +if [[ $newroot = - ]]; then + shift + newroot=$(realpath "$1") + [[ -d $newroot ]] && if [[ -d $newroot/CVS ]]; then + newroot=$newroot/CVS/$fn + else + newroot=$newroot/$fn + fi + useroot=1 +fi +if [[ -z $newroot || $newroot = -? ]]; then + print -u2 "Syntax: $me newroot [dir [...]]" + print -u2 "\t$me - .../CVS/Root [dir [...]]" + print -u2 "\t$me -T - .../CVS/Tag [dir [...]]" + exit 1 +fi +shift + +[[ -z $1 ]] && set -- . + +# realpath(2)ise arguments +set -A arg +let i=0 +for name in "$@"; do + arg[i++]=$(realpath "$name") +done + +if ! T="$(mktemp ${arg[0]}/$me.XXXXXXXXXX)"; then + print -u2 "$me: fatal: cannot mktemp" + exit 1 +fi + +if (( useroot )); then + rm -f "$T" + ln "$newroot" "$T" || cp "$newroot" "$T" +fi + +trap 'rm -f "$T"; exit 0' 0 +trap 'rm -f "$T"; trap - EXIT; exit 1' 1 2 3 5 13 15 + +if (( !useroot )); then + chmod 664 "$T" + print -r -- "$newroot" >"$T" +fi + +let rv=0 +find "${arg[@]}" -path \*/CVS/$fn -print0 |& +while IFS= read -d '' -pr name; do + if ! rm "$name"; then + print -u2 "$me: error: cannot rm <$name>" + exit 1 + fi + ln -f "$T" "$name" || if ! U="$(mktemp ${arg[0]}/$me.XXXXXXXXXX)"; then + cp "$T" "$name" + elif cat "$T" >"$U" && ln -f "$U" "$name"; then + rm -f "$T" + T="$U" + else + rm -f "$U" + cp "$T" "$name" + fi +done + +exit 0 --- cvs-1.12.13+real.orig/debian/rules +++ cvs-1.12.13+real/debian/rules @@ -0,0 +1,152 @@ +#!/usr/bin/make -f +# $MirOS: contrib/hosted/tg/deb/cvs/debian/rules,v 1.17 2012/02/07 22:38:36 tg Exp $ + +CC?= gcc +CONFIGURE_ENV:= CC='${CC}' +EXTRA_CFLAGS= -Wall -fno-strict-aliasing -Wformat +# for now. uses are mostly checked. +EXTRA_CFLAGS+= -Wno-unused-result +EXTRA_CPPFLAGS= -D_GNU_SOURCE -DUSE_LIBBSD + +ifneq (,$(wildcard /usr/share/dpkg/buildflags.mk)) +# dpkg-dev (>= 1.16.1~) +DEB_CFLAGS_MAINT_APPEND=${EXTRA_CFLAGS} +DEB_CPPFLAGS_MAINT_APPEND=${EXTRA_CPPFLAGS} +DEB_BUILD_MAINT_OPTIONS=hardening=+all +DPKG_EXPORT_BUILDFLAGS= Yes +include /usr/share/dpkg/buildflags.mk +else +# old-fashioned way to determine build flags +CFLAGS= -O$(if $(findstring noopt,${DEB_BUILD_OPTIONS}),0,2) -g +CFLAGS+= ${EXTRA_CFLAGS} +CPPFLAGS+= ${EXTRA_CPPFLAGS} +CONFIGURE_ENV+= CFLAGS='${CFLAGS}' +CONFIGURE_ENV+= CPPFLAGS='${CPPFLAGS}' +CONFIGURE_ENV+= LDFLAGS='${LDFLAGS}' +endif + +ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) +NUMJOBS= $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) +MAKEFLAGS+= -j${NUMJOBS} +endif + +LIBS+= -lbsd + +CONFIGURE_ENV+= LIBS='${LIBS}' +CONFIGURE_ENV+= CSH=/bin/csh + +# check takes forever, so assume the safe choice +CONFIGURE_ENV+= ac_cv_func_working_mktime=no + +CONFIGURE_ARGS:= --prefix=/usr \ + --infodir=/usr/share/info \ + --mandir=/usr/share/man \ + --sysconfdir=/etc \ + --disable-dependency-tracking \ + --disable-maintainer-mode \ + --disable-pam \ + --disable-nls \ + --enable-client \ + --enable-password-authenticated-client \ + --enable-server \ + --enable-proxy \ + --enable-case-sensitivity \ + --enable-encryption \ + --disable-lock-compatibility \ + --disable-rootcommit \ + --disable-old-info-format-support \ + --enable-config-override=no \ + --without-krb4 \ + --with-gssapi \ + --with-external-zlib \ + --with-rsh=ssh \ + --with-editor=/usr/bin/editor \ + --with-tmpdir=/var/tmp \ + --with-umask=002 \ + --with-cvs-admin-group=_cvsadmin + +MAKE_ARGS:= MAKEINFO=makeinfo +MAKE_ARGS+= MAKEINFOFLAGS=--no-split + +CLEANFILES:= autom4te.cache debian/CVSTEMP debian/.*_stamp \ + debian/builddir debian/stagedir \ + build-aux/config.guess build-aux/config.sub \ + doc/cvs.1 doc/cvs.info* doc/cvsclient.info* \ + doc/cvs.pdf doc/cvsclient.pdf \ + doc/getdate-cvs.texi \ + vms/config.h windows-NT/config.h + +debian/.configure_stamp: + dh_testdir + -rm -rf ${CLEANFILES} + cp /usr/share/misc/config.guess /usr/share/misc/config.sub build-aux/ + mkdir debian/builddir debian/stagedir + cd debian/builddir && \ + env ${CONFIGURE_ENV} ${SHELL} ../../configure ${CONFIGURE_ARGS} + @:>$@ + +build build-indep build-arch: debian/.build_stamp + +debian/.build_stamp: debian/.configure_stamp + dh_testdir + cd debian/builddir && ${MAKE} ${MAKE_ARGS} + cd debian/builddir && ${MAKE} -C doc ${MAKE_ARGS} doc html info pdf txt + @:>$@ + +clean: + dh_testdir + -rm -rf ${CLEANFILES} + dh_clean + +binary-indep: + +binary-arch: debian/.build_stamp + dh_testdir + dh_testroot + if test -x "$$(which dh_prep)"; then dh_prep; else dh_clean -k; fi + -rm -rf debian/stagedir + mkdir -p debian/stagedir/clogs + cd debian/builddir && \ + ${MAKE} ${MAKE_ARGS} DESTDIR=${CURDIR}/debian/stagedir install + cat ChangeLog ChangeLog.zoo >debian/stagedir/clogs/ChangeLog + cat doc/ChangeLog doc/ChangeLog.fsf >debian/stagedir/clogs/ChangeLog.doc + #cat lib/ChangeLog lib/ChangeLog.fsf >debian/stagedir/clogs/ChangeLog.lib + #cat src/ChangeLog src/ChangeLog-97 src/ChangeLog-96 src/ChangeLog-9395 \ + # src/ChangeLog-9194 >debian/stagedir/clogs/ChangeLog.src + cp src/ChangeLog debian/stagedir/clogs/ChangeLog.src + cp contrib/ChangeLog debian/stagedir/clogs/ChangeLog.contrib + cp diff/ChangeLog debian/stagedir/clogs/ChangeLog.diff + #cp m4/ChangeLog debian/stagedir/clogs/ChangeLog.m4 + #cp man/ChangeLog debian/stagedir/clogs/ChangeLog.man + #cp tools/ChangeLog debian/stagedir/clogs/ChangeLog.tools + # fat and nonsensical to ship this + rm -f debian/stagedir/usr/share/cvs/contrib/rcs-5.7-commitid.patch + # uses csh + rm -f debian/stagedir/usr/share/cvs/contrib/sccs2rcs + # unsafe + rm -f debian/stagedir/usr/share/cvs/contrib/commit_prep + rm -f debian/stagedir/usr/share/cvs/contrib/cvs_acls + rm -f debian/stagedir/usr/share/cvs/contrib/log + rm -f debian/stagedir/usr/share/cvs/contrib/log_accum + rm -f debian/stagedir/usr/share/cvs/contrib/mfpipe + rm -f debian/stagedir/usr/share/cvs/contrib/rcslock + # we ship cvs-switchroot(1) instead + rm -f debian/stagedir/usr/share/cvs/contrib/newcvsroot + dh_installchangelogs debian/stagedir/clogs/ChangeLog + dh_installdocs + dh_install + dh_installinfo + dh_installman + dh_link + dh_strip + dh_compress + cd debian/cvs/usr/share/cvs/contrib && chmod +x descend.sh rcs2sccs.sh + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: binary binary-arch binary-indep build build-arch build-indep clean --- cvs-1.12.13+real.orig/debian/docs +++ cvs-1.12.13+real/debian/docs @@ -0,0 +1,22 @@ +# $MirOS: contrib/hosted/tg/deb/cvs/debian/docs,v 1.4 2011/12/04 15:18:35 tg Exp $ +#- +AUTHORS +BUGS +DEVEL-CVS +FAQ +HACKING +MINOR-BUGS +NEWS +PROJECTS +README +TODO +debian/builddir/doc/*.html +debian/builddir/doc/*.txt +debian/builddir/doc/cvs.pdf +debian/builddir/doc/cvsclient.pdf +debian/stagedir/clogs/ChangeLog.* +doc/HACKING.DOCS +doc/RCSFILES +doc/cvs-paper.ms +doc/cvs-paper.pdf +doc/writeproxy.rtf --- cvs-1.12.13+real.orig/debian/doc-base.client +++ cvs-1.12.13+real/debian/doc-base.client @@ -0,0 +1,18 @@ +Document: cvs-doc-client +Title: CVS client/server protocol description +Abstract: This document describes the client/server protocol used by CVS. +Section: Programming + +Format: HTML +Index: /usr/share/doc/cvs/cvsclient.html +Files: /usr/share/doc/cvs/cvsclient.html* + +Format: Text +Files: /usr/share/doc/cvs/cvsclient.txt* + +Format: PDF +Files: /usr/share/doc/cvs/cvsclient.pdf* + +Format: Info +Index: /usr/share/info/cvsclient.info.gz +Files: /usr/share/info/cvsclient.info* --- cvs-1.12.13+real.orig/debian/manpages +++ cvs-1.12.13+real/debian/manpages @@ -0,0 +1,6 @@ +# $MirOS: contrib/hosted/tg/deb/cvs/debian/manpages,v 1.4 2011/12/04 15:11:41 tg Exp $ +#- +debian/cvs-switchroot.1 +debian/stagedir/usr/share/man/man1/cvs.1 +debian/stagedir/usr/share/man/man5/cvs.5 +#debian/stagedir/usr/share/man/man8/cvsbug.8 --- cvs-1.12.13+real.orig/debian/doc-base +++ cvs-1.12.13+real/debian/doc-base @@ -0,0 +1,21 @@ +Document: cvs-doc +Title: Cederqvist - The CVS manual +Author: FSF, Derek R. Price, Ximbiot, Signum Support AB, and others +Abstract: This manual describes how to use and administer CVS. + It is both a manual and a tutorial, as well as a reference guide, + also known as The Cederqvist, and *the* book to read before using CVS. +Section: Programming + +Format: HTML +Index: /usr/share/doc/cvs/cvs.html +Files: /usr/share/doc/cvs/cvs.html* + +Format: Text +Files: /usr/share/doc/cvs/cvs.txt* + +Format: PDF +Files: /usr/share/doc/cvs/cvs.pdf* + +Format: Info +Index: /usr/share/info/cvs.info.gz +Files: /usr/share/info/cvs.info* --- cvs-1.12.13+real.orig/debian/source/format +++ cvs-1.12.13+real/debian/source/format @@ -0,0 +1 @@ +1.0 --- cvs-1.12.13+real.orig/lib/vasnprintf.c +++ cvs-1.12.13+real/lib/vasnprintf.c @@ -100,7 +100,12 @@ # define DIRECTIVE char_directive # define DIRECTIVES char_directives # define PRINTF_PARSE printf_parse +#if 0 +/* disabled for security reasons, to avoid having %n in writable memory */ # define USE_SNPRINTF (HAVE_DECL__SNPRINTF || HAVE_SNPRINTF) +#else +# define USE_SNPRINTF 0 +#endif # if HAVE_DECL__SNPRINTF /* Windows. */ # define SNPRINTF _snprintf @@ -591,11 +596,12 @@ { size_t maxlen; int count; - int retcount; +#if USE_SNPRINTF + int retcount = 0; +#endif maxlen = allocated - length; count = -1; - retcount = 0; #if USE_SNPRINTF # define SNPRINTF_BUF(arg) \ --- cvs-1.12.13+real.orig/lib/chdir-long.c +++ cvs-1.12.13+real/lib/chdir-long.c @@ -39,9 +39,7 @@ # define O_DIRECTORY 0 #endif -#ifndef PATH_MAX -# error "compile this file only if your system defines PATH_MAX" -#endif +#ifdef PATH_MAX struct cd_buf { @@ -269,6 +267,8 @@ } #endif +#endif /* PATH_MAX */ + /* Local Variables: compile-command: "gcc -DTEST_CHDIR=1 -DHAVE_CONFIG_H -I.. -g -O -W -Wall chdir-long.c libcoreutils.a" --- cvs-1.12.13+real.orig/lib/getcwd.c +++ cvs-1.12.13+real/lib/getcwd.c @@ -151,7 +151,7 @@ size_t allocated = size; size_t used; -#if HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD +#if HAVE_PARTLY_WORKING_GETCWD /* The system getcwd works, except it sometimes fails when it shouldn't, setting errno to ERANGE, ENAMETOOLONG, or ENOENT. If AT_FDCWD is not defined, the algorithm below is O(N**2) and this @@ -204,6 +204,9 @@ ino_t dotino; bool mount_point; int parent_status; + size_t dirroom; + size_t namlen; + bool use_d_ino = true; /* Look at the parent directory. */ #ifdef AT_FDCWD @@ -244,110 +247,131 @@ goto lose; dotlist[dotlen++] = '/'; #endif - /* Clear errno to distinguish EOF from error if readdir returns - NULL. */ - __set_errno (0); - while ((d = __readdir (dirstream)) != NULL) + for (;;) { + /* Clear errno to distinguish EOF from error if readdir returns + NULL. */ + __set_errno (0); + d = __readdir (dirstream); + + /* When we've iterated through all directory entries without finding + one with a matching d_ino, rewind the stream and consider each + name again, but this time, using lstat. This is necessary in a + chroot on at least one system (glibc-2.3.6 + linux 2.6.12), where + .., ../.., ../../.., etc. all had the same device number, yet the + d_ino values for entries in / did not match those obtained + via lstat. */ + if (d == NULL && errno == 0 && use_d_ino) + { + use_d_ino = false; + rewinddir (dirstream); + d = __readdir (dirstream); + } + + if (d == NULL) + { + if (errno == 0) + /* EOF on dirstream, which can mean e.g., that the current + directory has been removed. */ + __set_errno (ENOENT); + goto lose; + } if (d->d_name[0] == '.' && (d->d_name[1] == '\0' || (d->d_name[1] == '.' && d->d_name[2] == '\0'))) continue; - if (MATCHING_INO (d, thisino) || mount_point) + + if (use_d_ino) { - int entry_status; + bool match = (MATCHING_INO (d, thisino) || mount_point); + if (! match) + continue; + } + + { + int entry_status; #ifdef AT_FDCWD - entry_status = fstatat (fd, d->d_name, &st, AT_SYMLINK_NOFOLLOW); + entry_status = fstatat (fd, d->d_name, &st, AT_SYMLINK_NOFOLLOW); #else - /* Compute size needed for this file name, or for the file - name ".." in the same directory, whichever is larger. - Room for ".." might be needed the next time through - the outer loop. */ - size_t name_alloc = _D_ALLOC_NAMLEN (d); - size_t filesize = dotlen + MAX (sizeof "..", name_alloc); - - if (filesize < dotlen) - goto memory_exhausted; + /* Compute size needed for this file name, or for the file + name ".." in the same directory, whichever is larger. + Room for ".." might be needed the next time through + the outer loop. */ + size_t name_alloc = _D_ALLOC_NAMLEN (d); + size_t filesize = dotlen + MAX (sizeof "..", name_alloc); + + if (filesize < dotlen) + goto memory_exhausted; + + if (dotsize < filesize) + { + /* My, what a deep directory tree you have, Grandma. */ + size_t newsize = MAX (filesize, dotsize * 2); + size_t i; + if (newsize < dotsize) + goto memory_exhausted; + if (dotlist != dots) + free (dotlist); + dotlist = malloc (newsize); + if (dotlist == NULL) + goto lose; + dotsize = newsize; - if (dotsize < filesize) - { - /* My, what a deep directory tree you have, Grandma. */ - size_t newsize = MAX (filesize, dotsize * 2); - size_t i; - if (newsize < dotsize) - goto memory_exhausted; - if (dotlist != dots) - free (dotlist); - dotlist = malloc (newsize); - if (dotlist == NULL) - goto lose; - dotsize = newsize; - - i = 0; - do - { - dotlist[i++] = '.'; - dotlist[i++] = '.'; - dotlist[i++] = '/'; - } - while (i < dotlen); - } + i = 0; + do + { + dotlist[i++] = '.'; + dotlist[i++] = '.'; + dotlist[i++] = '/'; + } + while (i < dotlen); + } - strcpy (dotlist + dotlen, d->d_name); - entry_status = __lstat (dotlist, &st); + memcpy (dotlist + dotlen, d->d_name, _D_ALLOC_NAMLEN (d)); + entry_status = __lstat (dotlist, &st); #endif - /* We don't fail here if we cannot stat() a directory entry. - This can happen when (network) file systems fail. If this - entry is in fact the one we are looking for we will find - out soon as we reach the end of the directory without - having found anything. */ - if (entry_status == 0 && S_ISDIR (st.st_mode) - && st.st_dev == thisdev && st.st_ino == thisino) - break; - } + /* We don't fail here if we cannot stat() a directory entry. + This can happen when (network) file systems fail. If this + entry is in fact the one we are looking for we will find + out soon as we reach the end of the directory without + having found anything. */ + if (entry_status == 0 && S_ISDIR (st.st_mode) + && st.st_dev == thisdev && st.st_ino == thisino) + break; + } } - if (d == NULL) - { - if (errno == 0) - /* EOF on dirstream, which means that the current directory - has been removed. */ - __set_errno (ENOENT); - goto lose; - } - else - { - size_t dirroom = dirp - dir; - size_t namlen = _D_EXACT_NAMLEN (d); - if (dirroom <= namlen) + dirroom = dirp - dir; + namlen = _D_EXACT_NAMLEN (d); + + if (dirroom <= namlen) + { + if (size != 0) { - if (size != 0) - { - __set_errno (ERANGE); - goto lose; - } - else - { - char *tmp; - size_t oldsize = allocated; - - allocated += MAX (allocated, namlen); - if (allocated < oldsize - || ! (tmp = realloc (dir, allocated))) - goto memory_exhausted; - - /* Move current contents up to the end of the buffer. - This is guaranteed to be non-overlapping. */ - dirp = memcpy (tmp + allocated - (oldsize - dirroom), - tmp + dirroom, - oldsize - dirroom); - dir = tmp; - } + __set_errno (ERANGE); + goto lose; + } + else + { + char *tmp; + size_t oldsize = allocated; + + allocated += MAX (allocated, namlen); + if (allocated < oldsize + || ! (tmp = realloc (dir, allocated))) + goto memory_exhausted; + + /* Move current contents up to the end of the buffer. + This is guaranteed to be non-overlapping. */ + dirp = memcpy (tmp + allocated - (oldsize - dirroom), + tmp + dirroom, + oldsize - dirroom); + dir = tmp; } - dirp -= namlen; - memcpy (dirp, d->d_name, namlen); - *--dirp = '/'; } + dirp -= namlen; + memcpy (dirp, d->d_name, namlen); + *--dirp = '/'; thisdev = dotdev; thisino = dotino; --- cvs-1.12.13+real.orig/lib/getdelim.c +++ cvs-1.12.13+real/lib/getdelim.c @@ -48,7 +48,6 @@ { int result = 0; ssize_t cur_len = 0; - ssize_t len; if (lineptr == NULL || n == NULL || fp == NULL) { @@ -71,7 +70,6 @@ for (;;) { - char *t; int i; i = getc (fp); --- cvs-1.12.13+real.orig/lib/getdate.c +++ cvs-1.12.13+real/lib/getdate.c @@ -1,7 +1,11 @@ -/* A Bison parser, made by GNU Bison 1.875c. */ +/* patched to define "union YYSTYPE" as well --mirabilos */ -/* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +/* A Bison parser, made by GNU Bison 2.3. */ + +/* Skeleton implementation for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + 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 @@ -15,16 +19,24 @@ 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. */ + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. -/* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ -/* Written by Richard Stallman by simplifying the original so called - ``semantic'' parser. */ +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local @@ -36,6 +48,9 @@ /* Identify Bison output. */ #define YYBISON 1 +/* Bison version. */ +#define YYBISON_VERSION "2.3" + /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -74,6 +89,7 @@ tUDECIMAL_NUMBER = 276 }; #endif +/* Tokens. */ #define tAGO 258 #define tDST 259 #define tDAY 260 @@ -139,6 +155,10 @@ #include "getdate.h" +#ifdef USE_LIBBSD +size_t strlcat(char *, const char *, size_t); +#endif + /* There's no need to extend the stack, so there's no need to involve alloca. */ #define YYSTACK_USE_ALLOCA 0 @@ -166,8 +186,32 @@ #include #include +#ifndef IN_RCS #include "setenv.h" #include "xalloc.h" +#else /* IN_RCS */ +#include + +void * +xmalloc(size_t s) +{ + static const char xmalloc_enomem[] = "memory exhausted\n"; + void *x; + + if ((x = malloc(s)) == NULL) { + write(2, xmalloc_enomem, sizeof(xmalloc_enomem) - 1); + exit(1); + } + + return (x); +} + +void * +xmemdup(void const *p, size_t s) +{ + return (memcpy(xmalloc(s), p, s)); +} +#endif /* IN_RCS */ #if STDC_HEADERS || (! defined isascii && ! HAVE_ISASCII) # define IN_CTYPE_DOMAIN(c) 1 @@ -310,15 +354,22 @@ # define YYERROR_VERBOSE 0 #endif -#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 209 "getdate.y" -typedef union YYSTYPE { +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 +#endif + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +#line 240 "getdate.y" +{ long int intval; textint textintval; struct timespec timespec; -} YYSTYPE; -/* Line 191 of yacc.c. */ -#line 322 "getdate.c" +} +/* Line 193 of yacc.c. */ +#line 373 "getdate.c" + YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 @@ -329,56 +380,171 @@ /* Copy the second part of user declarations. */ -/* Line 214 of yacc.c. */ -#line 334 "getdate.c" +/* Line 216 of yacc.c. */ +#line 386 "getdate.c" -#if ! defined (yyoverflow) || YYERROR_VERBOSE +#ifdef short +# undef short +#endif + +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; +#endif + +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#elif (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +typedef signed char yytype_int8; +#else +typedef short int yytype_int8; +#endif + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif -# ifndef YYFREE -# define YYFREE free +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int # endif -# ifndef YYMALLOC -# define YYMALLOC malloc +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(msgid) dgettext ("bison-runtime", msgid) +# endif +# endif +# ifndef YY_ +# define YY_(msgid) msgid # endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(e) ((void) (e)) +#else +# define YYUSE(e) /* empty */ +#endif + +/* Identity function, used to suppress warnings about constant conditions. */ +#ifndef lint +# define YYID(n) (n) +#else +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static int +YYID (int i) +#else +static int +YYID (i) + int i; +#endif +{ + return i; +} +#endif + +#if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA -# define YYSTACK_ALLOC alloca -# endif -# else -# if defined (alloca) || defined (_ALLOCA_H) -# define YYSTACK_ALLOC alloca -# else # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif # endif # endif # endif # ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# else -# if defined (__STDC__) || defined (__cplusplus) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ # endif +# else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined _STDLIB_H \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif # endif -#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ -#if (! defined (yyoverflow) \ - && (! defined (__cplusplus) \ - || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))) +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { - short yyss; + yytype_int16 yyss; YYSTYPE yyvs; }; @@ -388,24 +554,24 @@ /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ - ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY -# if defined (__GNUC__) && 1 < __GNUC__ +# if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else # define YYCOPY(To, From, Count) \ do \ { \ - register YYSIZE_T yyi; \ + YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ - while (0) + while (YYID (0)) # endif # endif @@ -423,39 +589,33 @@ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ - while (0) + while (YYID (0)) #endif -#if defined (__STDC__) || defined (__cplusplus) - typedef signed char yysigned_char; -#else - typedef short yysigned_char; -#endif - -/* YYFINAL -- State number of the termination state. */ +/* YYFINAL -- State number of the termination state. */ #define YYFINAL 12 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 88 -/* YYNTOKENS -- Number of terminals. */ +/* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 26 -/* YYNNTS -- Number of nonterminals. */ +/* YYNNTS -- Number of nonterminals. */ #define YYNNTS 19 -/* YYNRULES -- Number of rules. */ +/* YYNRULES -- Number of rules. */ #define YYNRULES 78 -/* YYNRULES -- Number of states. */ +/* YYNRULES -- Number of states. */ #define YYNSTATES 96 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 276 -#define YYTRANSLATE(YYX) \ +#define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const unsigned char yytranslate[] = +static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -490,7 +650,7 @@ #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ -static const unsigned char yyprhs[] = +static const yytype_uint8 yyprhs[] = { 0, 0, 3, 5, 7, 10, 11, 14, 16, 18, 20, 22, 24, 26, 28, 31, 36, 42, 49, 57, @@ -502,8 +662,8 @@ 207, 209, 211, 213, 215, 217, 218, 221, 222 }; -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yysigned_char yyrhs[] = +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yytype_int8 yyrhs[] = { 27, 0, -1, 28, -1, 29, -1, 22, 39, -1, -1, 29, 30, -1, 31, -1, 32, -1, 33, -1, @@ -531,22 +691,22 @@ }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const unsigned short yyrline[] = +static const yytype_uint16 yyrline[] = { - 0, 230, 230, 231, 235, 242, 244, 248, 250, 252, - 254, 256, 258, 260, 264, 272, 280, 290, 297, 309, - 314, 322, 324, 326, 328, 330, 335, 340, 345, 350, - 358, 363, 383, 390, 398, 406, 411, 417, 422, 431, - 441, 445, 447, 449, 451, 453, 455, 457, 459, 461, - 463, 465, 467, 469, 471, 473, 475, 477, 479, 481, - 483, 485, 489, 491, 493, 495, 497, 499, 503, 503, - 506, 507, 512, 513, 518, 556, 557, 563, 564 + 0, 261, 261, 262, 266, 273, 275, 279, 281, 283, + 285, 287, 289, 291, 295, 303, 311, 321, 328, 340, + 345, 353, 355, 357, 359, 361, 366, 371, 376, 381, + 389, 394, 414, 421, 429, 437, 442, 448, 453, 462, + 472, 476, 478, 480, 482, 484, 486, 488, 490, 492, + 494, 496, 498, 500, 502, 504, 506, 508, 510, 512, + 514, 516, 520, 522, 524, 526, 528, 530, 534, 534, + 537, 538, 543, 544, 549, 587, 588, 594, 595 }; #endif -#if YYDEBUG || YYERROR_VERBOSE -/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "tAGO", "tDST", "tDAY", "tDAY_UNIT", @@ -563,7 +723,7 @@ # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ -static const unsigned short yytoknum[] = +static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, @@ -572,7 +732,7 @@ # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const unsigned char yyr1[] = +static const yytype_uint8 yyr1[] = { 0, 26, 27, 27, 28, 29, 29, 30, 30, 30, 30, 30, 30, 30, 31, 31, 31, 31, 31, 32, @@ -585,7 +745,7 @@ }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const unsigned char yyr2[] = +static const yytype_uint8 yyr2[] = { 0, 2, 1, 1, 2, 0, 2, 1, 1, 1, 1, 1, 1, 1, 2, 4, 5, 6, 7, 1, @@ -600,7 +760,7 @@ /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state STATE-NUM when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ -static const unsigned char yydefact[] = +static const yytype_uint8 yydefact[] = { 5, 0, 0, 2, 3, 71, 73, 70, 72, 4, 68, 69, 1, 26, 49, 24, 52, 19, 55, 0, @@ -614,8 +774,8 @@ 16, 77, 31, 75, 17, 18 }; -/* YYDEFGOTO[NTERM-NUM]. */ -static const yysigned_char yydefgoto[] = +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int8 yydefgoto[] = { -1, 2, 3, 4, 29, 30, 31, 32, 33, 34, 35, 36, 37, 9, 10, 11, 38, 77, 88 @@ -624,7 +784,7 @@ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ #define YYPACT_NINF -43 -static const yysigned_char yypact[] = +static const yytype_int8 yypact[] = { -18, 48, 9, -43, 19, -43, -43, -43, -43, -43, -43, -43, -43, 32, -43, -43, -43, 54, -43, 28, @@ -639,7 +799,7 @@ }; /* YYPGOTO[NTERM-NUM]. */ -static const yysigned_char yypgoto[] = +static const yytype_int8 yypgoto[] = { -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, 55, -43, -43, -11, -43, -42, -7 @@ -650,7 +810,7 @@ number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -1 -static const unsigned char yytable[] = +static const yytype_uint8 yytable[] = { 59, 60, 50, 61, 1, 62, 63, 64, 65, 12, 66, 67, 53, 68, 54, 85, 51, 55, 69, 56, @@ -663,7 +823,7 @@ 81, 82, 83, 84, 94, 92, 0, 0, 76 }; -static const yysigned_char yycheck[] = +static const yytype_int8 yycheck[] = { 5, 6, 4, 8, 22, 10, 11, 12, 13, 0, 15, 16, 6, 18, 8, 10, 18, 11, 23, 13, @@ -678,7 +838,7 @@ /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ -static const unsigned char yystos[] = +static const yytype_uint8 yystos[] = { 0, 22, 27, 28, 29, 18, 19, 20, 21, 39, 40, 41, 0, 5, 6, 7, 8, 9, 11, 12, @@ -692,22 +852,6 @@ 43, 41, 19, 18, 44, 43 }; -#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) -# define YYSIZE_T __SIZE_TYPE__ -#endif -#if ! defined (YYSIZE_T) && defined (size_t) -# define YYSIZE_T size_t -#endif -#if ! defined (YYSIZE_T) -# if defined (__STDC__) || defined (__cplusplus) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# endif -#endif -#if ! defined (YYSIZE_T) -# define YYSIZE_T unsigned int -#endif - #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) @@ -733,30 +877,63 @@ yychar = (Token); \ yylval = (Value); \ yytoken = YYTRANSLATE (yychar); \ - YYPOPSTACK; \ + YYPOPSTACK (1); \ goto yybackup; \ } \ else \ - { \ - yyerror (pc, "syntax error: cannot back up");\ + { \ + yyerror (pc, YY_("syntax error: cannot back up")); \ YYERROR; \ } \ -while (0) +while (YYID (0)) + #define YYTERROR 1 #define YYERRCODE 256 -/* YYLLOC_DEFAULT -- Compute the default location (before the actions - are run). */ +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ + +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) #ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - ((Current).first_line = (Rhs)[1].first_line, \ - (Current).first_column = (Rhs)[1].first_column, \ - (Current).last_line = (Rhs)[N].last_line, \ - (Current).last_column = (Rhs)[N].last_column) +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (YYID (N)) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (YYID (0)) +#endif + + +/* YY_LOCATION_PRINT -- Print the location on the stream. + This macro was not mandated originally: define only if we know + we won't break user code: when these are the locations we know. */ + +#ifndef YY_LOCATION_PRINT +# if YYLTYPE_IS_TRIVIAL +# define YY_LOCATION_PRINT(File, Loc) \ + fprintf (File, "%d.%d-%d.%d", \ + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif #endif + /* YYLEX -- calling `yylex' with the right arguments. */ #ifdef YYLEX_PARAM @@ -777,42 +954,99 @@ do { \ if (yydebug) \ YYFPRINTF Args; \ -} while (0) +} while (YYID (0)) -# define YYDSYMPRINT(Args) \ -do { \ - if (yydebug) \ - yysymprint Args; \ -} while (0) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value, pc); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (YYID (0)) -# define YYDSYMPRINTF(Title, Token, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yysymprint (stderr, \ - Token, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (0) + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, parser_control *pc) +#else +static void +yy_symbol_value_print (yyoutput, yytype, yyvaluep, pc) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; + parser_control *pc; +#endif +{ + if (!yyvaluep) + return; + YYUSE (pc); +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# else + YYUSE (yyoutput); +# endif + switch (yytype) + { + default: + break; + } +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, parser_control *pc) +#else +static void +yy_symbol_print (yyoutput, yytype, yyvaluep, pc) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; + parser_control *pc; +#endif +{ + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + + yy_symbol_value_print (yyoutput, yytype, yyvaluep, pc); + YYFPRINTF (yyoutput, ")"); +} /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ -#if defined (__STDC__) || defined (__cplusplus) +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static void -yy_stack_print (short *bottom, short *top) +yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) #else static void yy_stack_print (bottom, top) - short *bottom; - short *top; + yytype_int16 *bottom; + yytype_int16 *top; #endif { YYFPRINTF (stderr, "Stack now"); - for (/* Nothing. */; bottom <= top; ++bottom) + for (; bottom <= top; ++bottom) YYFPRINTF (stderr, " %d", *bottom); YYFPRINTF (stderr, "\n"); } @@ -821,45 +1055,53 @@ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ -} while (0) +} while (YYID (0)) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -#if defined (__STDC__) || defined (__cplusplus) +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static void -yy_reduce_print (int yyrule) +yy_reduce_print (YYSTYPE *yyvsp, int yyrule, parser_control *pc) #else static void -yy_reduce_print (yyrule) +yy_reduce_print (yyvsp, yyrule, pc) + YYSTYPE *yyvsp; int yyrule; + parser_control *pc; #endif { + int yynrhs = yyr2[yyrule]; int yyi; - unsigned int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", - yyrule - 1, yylno); - /* Print the symbols being reduced, and their result. */ - for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) - YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); - YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); + unsigned long int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + fprintf (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], + &(yyvsp[(yyi + 1) - (yynrhs)]) + , pc); + fprintf (stderr, "\n"); + } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ - yy_reduce_print (Rule); \ -} while (0) + yy_reduce_print (yyvsp, Rule, pc); \ +} while (YYID (0)) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) -# define YYDSYMPRINT(Args) -# define YYDSYMPRINTF(Title, Token, Value, Location) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ @@ -874,13 +1116,9 @@ if the built-in stack extension method is used). Do not make this value too large; the results are undefined if - SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ -#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0 -# undef YYMAXDEPTH -#endif - #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif @@ -890,45 +1128,47 @@ #if YYERROR_VERBOSE # ifndef yystrlen -# if defined (__GLIBC__) && defined (_STRING_H) +# if defined __GLIBC__ && defined _STRING_H # define yystrlen strlen # else /* Return the length of YYSTR. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static YYSIZE_T -# if defined (__STDC__) || defined (__cplusplus) yystrlen (const char *yystr) -# else +#else +static YYSIZE_T yystrlen (yystr) - const char *yystr; -# endif + const char *yystr; +#endif { - register const char *yys = yystr; - - while (*yys++ != '\0') + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) continue; - - return yys - yystr - 1; + return yylen; } # endif # endif # ifndef yystpcpy -# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static char * -# if defined (__STDC__) || defined (__cplusplus) yystpcpy (char *yydest, const char *yysrc) -# else +#else +static char * yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -# endif + char *yydest; + const char *yysrc; +#endif { - register char *yyd = yydest; - register const char *yys = yysrc; + char *yyd = yydest; + const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; @@ -938,70 +1178,194 @@ # endif # endif -#endif /* !YYERROR_VERBOSE */ +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; - + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; -#if YYDEBUG -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } -#if defined (__STDC__) || defined (__cplusplus) -static void -yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) -#else -static void -yysymprint (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE *yyvaluep; -#endif + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +/* Copy into YYRESULT an error message about the unexpected token + YYCHAR while in state YYSTATE. Return the number of bytes copied, + including the terminating null byte. If YYRESULT is null, do not + copy anything; just return the number of bytes that would be + copied. As a special case, return 0 if an ordinary "syntax error" + message will do. Return YYSIZE_MAXIMUM if overflow occurs during + size calculation. */ +static YYSIZE_T +yysyntax_error (char *yyresult, int yystate, int yychar) { - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; + int yyn = yypact[yystate]; - if (yytype < YYNTOKENS) + if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) + return 0; + else { - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); -# ifdef YYPRINT - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); + int yytype = YYTRANSLATE (yychar); + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + int yysize_overflow = 0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + int yyx; + +# if 0 + /* This is so xgettext sees the translatable formats that are + constructed on the fly. */ + YY_("syntax error, unexpected %s"); + YY_("syntax error, unexpected %s, expecting %s"); + YY_("syntax error, unexpected %s, expecting %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); # endif - } - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + char *yyfmt; + char const *yyf; + static char const yyunexpected[] = "syntax error, unexpected %s"; + static char const yyexpecting[] = ", expecting %s"; + static char const yyor[] = " or %s"; + char yyformat[sizeof yyunexpected + + sizeof yyexpecting - 1 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) + * (sizeof yyor - 1))]; + char const *yyprefix = yyexpecting; + + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yycount = 1; - switch (yytype) - { - default: - break; + yyarg[0] = yytname[yytype]; + yyfmt = yystpcpy (yyformat, yyunexpected); + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + yyformat[sizeof yyunexpected - 1] = '\0'; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + yyfmt = yystpcpy (yyfmt, yyprefix); + yyprefix = yyor; + } + + yyf = YY_(yyformat); + yysize1 = yysize + yystrlen (yyf); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + + if (yysize_overflow) + return YYSIZE_MAXIMUM; + + if (yyresult) + { + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + char *yyp = yyresult; + int yyi = 0; + while ((*yyp = *yyf) != '\0') + { + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyf += 2; + } + else + { + yyp++; + yyf++; + } + } + } + return yysize; } - YYFPRINTF (yyoutput, ")"); } +#endif /* YYERROR_VERBOSE */ + -#endif /* ! YYDEBUG */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ -#if defined (__STDC__) || defined (__cplusplus) +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static void -yydestruct (int yytype, YYSTYPE *yyvaluep) +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, parser_control *pc) #else static void -yydestruct (yytype, yyvaluep) +yydestruct (yymsg, yytype, yyvaluep, pc) + const char *yymsg; int yytype; YYSTYPE *yyvaluep; + parser_control *pc; #endif { - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; + YYUSE (yyvaluep); + YYUSE (pc); + + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); switch (yytype) { default: - break; + break; } } @@ -1009,14 +1373,14 @@ /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM -# if defined (__STDC__) || defined (__cplusplus) +#if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); -# else +#else int yyparse (); -# endif +#endif #else /* ! YYPARSE_PARAM */ -#if defined (__STDC__) || defined (__cplusplus) -int yyparse ( parser_control *pc ); +#if defined __STDC__ || defined __cplusplus +int yyparse (parser_control *pc); #else int yyparse (); #endif @@ -1032,39 +1396,49 @@ `----------*/ #ifdef YYPARSE_PARAM -# if defined (__STDC__) || defined (__cplusplus) -int yyparse (void *YYPARSE_PARAM) -# else -int yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -# endif +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void *YYPARSE_PARAM) +#else +int +yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +#endif #else /* ! YYPARSE_PARAM */ -#if defined (__STDC__) || defined (__cplusplus) +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) int -yyparse ( parser_control *pc ) +yyparse (parser_control *pc) #else int yyparse (pc) - parser_control *pc ; + parser_control *pc; #endif #endif { - /* The lookahead symbol. */ + /* The look-ahead symbol. */ int yychar; -/* The semantic value of the lookahead symbol. */ +/* The semantic value of the look-ahead symbol. */ YYSTYPE yylval; /* Number of syntax errors so far. */ int yynerrs; - register int yystate; - register int yyn; + int yystate; + int yyn; int yyresult; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; - /* Lookahead token as an internal (translated) token number. */ + /* Look-ahead token as an internal (translated) token number. */ int yytoken = 0; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif /* Three stacks and their tools: `yyss': related to states, @@ -1075,18 +1449,18 @@ to reallocate them elsewhere. */ /* The state stack. */ - short yyssa[YYINITDEPTH]; - short *yyss = yyssa; - register short *yyssp; + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss = yyssa; + yytype_int16 *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs = yyvsa; - register YYSTYPE *yyvsp; + YYSTYPE *yyvsp; -#define YYPOPSTACK (yyvsp--, yyssp--) +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) YYSIZE_T yystacksize = YYINITDEPTH; @@ -1095,9 +1469,9 @@ YYSTYPE yyval; - /* When reducing, the number of symbols on the RHS of the reduced - rule. */ - int yylen; + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; YYDPRINTF ((stderr, "Starting parse\n")); @@ -1121,8 +1495,7 @@ `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks - have just been pushed. so pushing a state here evens the stacks. - */ + have just been pushed. So pushing a state here evens the stacks. */ yyssp++; yysetstate: @@ -1135,18 +1508,18 @@ #ifdef yyoverflow { - /* Give user a chance to reallocate the stack. Use copies of + /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; - short *yyss1 = yyss; + yytype_int16 *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ - yyoverflow ("parser stack overflow", + yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), @@ -1157,21 +1530,21 @@ } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE - goto yyoverflowlab; + goto yyexhaustedlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyoverflowlab; + goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { - short *yyss1 = yyss; + yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) - goto yyoverflowlab; + goto yyexhaustedlab; YYSTACK_RELOCATE (yyss); YYSTACK_RELOCATE (yyvs); @@ -1202,19 +1575,17 @@ `-----------*/ yybackup: -/* Do appropriate processing given the current state. */ -/* Read a lookahead token if we need one and don't already have one. */ -/* yyresume: */ - - /* First try to decide what to do without reference to lookahead token. */ + /* Do appropriate processing given the current state. Read a + look-ahead token if we need one and don't already have one. */ + /* First try to decide what to do without reference to look-ahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; - /* Not known => get a lookahead token if don't already have one. */ + /* Not known => get a look-ahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); @@ -1229,7 +1600,7 @@ else { yytoken = YYTRANSLATE (yychar); - YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to @@ -1249,22 +1620,21 @@ if (yyn == YYFINAL) YYACCEPT; - /* Shift the lookahead token. */ - YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken])); - - /* Discard the token being shifted unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; - - *++yyvsp = yylval; - - /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; + /* Shift the look-ahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token unless it is eof. */ + if (yychar != YYEOF) + yychar = YYEMPTY; + yystate = yyn; + *++yyvsp = yylval; + goto yynewstate; @@ -1300,272 +1670,272 @@ switch (yyn) { case 4: -#line 236 "getdate.y" +#line 267 "getdate.y" { - pc->seconds = yyvsp[0].timespec; + pc->seconds = (yyvsp[(2) - (2)].timespec); pc->timespec_seen = true; - } + ;} break; case 7: -#line 249 "getdate.y" - { pc->times_seen++; } +#line 280 "getdate.y" + { pc->times_seen++; ;} break; case 8: -#line 251 "getdate.y" - { pc->local_zones_seen++; } +#line 282 "getdate.y" + { pc->local_zones_seen++; ;} break; case 9: -#line 253 "getdate.y" - { pc->zones_seen++; } +#line 284 "getdate.y" + { pc->zones_seen++; ;} break; case 10: -#line 255 "getdate.y" - { pc->dates_seen++; } +#line 286 "getdate.y" + { pc->dates_seen++; ;} break; case 11: -#line 257 "getdate.y" - { pc->days_seen++; } +#line 288 "getdate.y" + { pc->days_seen++; ;} break; case 12: -#line 259 "getdate.y" - { pc->rels_seen = true; } +#line 290 "getdate.y" + { pc->rels_seen = true; ;} break; case 14: -#line 265 "getdate.y" +#line 296 "getdate.y" { - pc->hour = yyvsp[-1].textintval.value; + pc->hour = (yyvsp[(1) - (2)].textintval).value; pc->minutes = 0; pc->seconds.tv_sec = 0; pc->seconds.tv_nsec = 0; - pc->meridian = yyvsp[0].intval; - } + pc->meridian = (yyvsp[(2) - (2)].intval); + ;} break; case 15: -#line 273 "getdate.y" +#line 304 "getdate.y" { - pc->hour = yyvsp[-3].textintval.value; - pc->minutes = yyvsp[-1].textintval.value; + pc->hour = (yyvsp[(1) - (4)].textintval).value; + pc->minutes = (yyvsp[(3) - (4)].textintval).value; pc->seconds.tv_sec = 0; pc->seconds.tv_nsec = 0; - pc->meridian = yyvsp[0].intval; - } + pc->meridian = (yyvsp[(4) - (4)].intval); + ;} break; case 16: -#line 281 "getdate.y" +#line 312 "getdate.y" { - pc->hour = yyvsp[-4].textintval.value; - pc->minutes = yyvsp[-2].textintval.value; + pc->hour = (yyvsp[(1) - (5)].textintval).value; + pc->minutes = (yyvsp[(3) - (5)].textintval).value; pc->seconds.tv_sec = 0; pc->seconds.tv_nsec = 0; pc->meridian = MER24; pc->zones_seen++; - pc->time_zone = time_zone_hhmm (yyvsp[-1].textintval, yyvsp[0].intval); - } + pc->time_zone = time_zone_hhmm ((yyvsp[(4) - (5)].textintval), (yyvsp[(5) - (5)].intval)); + ;} break; case 17: -#line 291 "getdate.y" +#line 322 "getdate.y" { - pc->hour = yyvsp[-5].textintval.value; - pc->minutes = yyvsp[-3].textintval.value; - pc->seconds = yyvsp[-1].timespec; - pc->meridian = yyvsp[0].intval; - } + pc->hour = (yyvsp[(1) - (6)].textintval).value; + pc->minutes = (yyvsp[(3) - (6)].textintval).value; + pc->seconds = (yyvsp[(5) - (6)].timespec); + pc->meridian = (yyvsp[(6) - (6)].intval); + ;} break; case 18: -#line 298 "getdate.y" +#line 329 "getdate.y" { - pc->hour = yyvsp[-6].textintval.value; - pc->minutes = yyvsp[-4].textintval.value; - pc->seconds = yyvsp[-2].timespec; + pc->hour = (yyvsp[(1) - (7)].textintval).value; + pc->minutes = (yyvsp[(3) - (7)].textintval).value; + pc->seconds = (yyvsp[(5) - (7)].timespec); pc->meridian = MER24; pc->zones_seen++; - pc->time_zone = time_zone_hhmm (yyvsp[-1].textintval, yyvsp[0].intval); - } + pc->time_zone = time_zone_hhmm ((yyvsp[(6) - (7)].textintval), (yyvsp[(7) - (7)].intval)); + ;} break; case 19: -#line 310 "getdate.y" +#line 341 "getdate.y" { - pc->local_isdst = yyvsp[0].intval; - pc->dsts_seen += (0 < yyvsp[0].intval); - } + pc->local_isdst = (yyvsp[(1) - (1)].intval); + pc->dsts_seen += (0 < (yyvsp[(1) - (1)].intval)); + ;} break; case 20: -#line 315 "getdate.y" +#line 346 "getdate.y" { pc->local_isdst = 1; - pc->dsts_seen += (0 < yyvsp[-1].intval) + 1; - } + pc->dsts_seen += (0 < (yyvsp[(1) - (2)].intval)) + 1; + ;} break; case 21: -#line 323 "getdate.y" - { pc->time_zone = yyvsp[0].intval; } +#line 354 "getdate.y" + { pc->time_zone = (yyvsp[(1) - (1)].intval); ;} break; case 22: -#line 325 "getdate.y" - { pc->time_zone = yyvsp[-1].intval; pc->rels_seen = true; } +#line 356 "getdate.y" + { pc->time_zone = (yyvsp[(1) - (2)].intval); pc->rels_seen = true; ;} break; case 23: -#line 327 "getdate.y" - { pc->time_zone = yyvsp[-2].intval + time_zone_hhmm (yyvsp[-1].textintval, yyvsp[0].intval); } +#line 358 "getdate.y" + { pc->time_zone = (yyvsp[(1) - (3)].intval) + time_zone_hhmm ((yyvsp[(2) - (3)].textintval), (yyvsp[(3) - (3)].intval)); ;} break; case 24: -#line 329 "getdate.y" - { pc->time_zone = yyvsp[0].intval + 60; } +#line 360 "getdate.y" + { pc->time_zone = (yyvsp[(1) - (1)].intval) + 60; ;} break; case 25: -#line 331 "getdate.y" - { pc->time_zone = yyvsp[-1].intval + 60; } +#line 362 "getdate.y" + { pc->time_zone = (yyvsp[(1) - (2)].intval) + 60; ;} break; case 26: -#line 336 "getdate.y" +#line 367 "getdate.y" { pc->day_ordinal = 1; - pc->day_number = yyvsp[0].intval; - } + pc->day_number = (yyvsp[(1) - (1)].intval); + ;} break; case 27: -#line 341 "getdate.y" +#line 372 "getdate.y" { pc->day_ordinal = 1; - pc->day_number = yyvsp[-1].intval; - } + pc->day_number = (yyvsp[(1) - (2)].intval); + ;} break; case 28: -#line 346 "getdate.y" +#line 377 "getdate.y" { - pc->day_ordinal = yyvsp[-1].intval; - pc->day_number = yyvsp[0].intval; - } + pc->day_ordinal = (yyvsp[(1) - (2)].intval); + pc->day_number = (yyvsp[(2) - (2)].intval); + ;} break; case 29: -#line 351 "getdate.y" +#line 382 "getdate.y" { - pc->day_ordinal = yyvsp[-1].textintval.value; - pc->day_number = yyvsp[0].intval; - } + pc->day_ordinal = (yyvsp[(1) - (2)].textintval).value; + pc->day_number = (yyvsp[(2) - (2)].intval); + ;} break; case 30: -#line 359 "getdate.y" +#line 390 "getdate.y" { - pc->month = yyvsp[-2].textintval.value; - pc->day = yyvsp[0].textintval.value; - } + pc->month = (yyvsp[(1) - (3)].textintval).value; + pc->day = (yyvsp[(3) - (3)].textintval).value; + ;} break; case 31: -#line 364 "getdate.y" +#line 395 "getdate.y" { /* Interpret as YYYY/MM/DD if the first value has 4 or more digits, otherwise as MM/DD/YY. The goal in recognizing YYYY/MM/DD is solely to support legacy machine-generated dates like those in an RCS log listing. If you want portability, use the ISO 8601 format. */ - if (4 <= yyvsp[-4].textintval.digits) + if (4 <= (yyvsp[(1) - (5)].textintval).digits) { - pc->year = yyvsp[-4].textintval; - pc->month = yyvsp[-2].textintval.value; - pc->day = yyvsp[0].textintval.value; + pc->year = (yyvsp[(1) - (5)].textintval); + pc->month = (yyvsp[(3) - (5)].textintval).value; + pc->day = (yyvsp[(5) - (5)].textintval).value; } else { - pc->month = yyvsp[-4].textintval.value; - pc->day = yyvsp[-2].textintval.value; - pc->year = yyvsp[0].textintval; + pc->month = (yyvsp[(1) - (5)].textintval).value; + pc->day = (yyvsp[(3) - (5)].textintval).value; + pc->year = (yyvsp[(5) - (5)].textintval); } - } + ;} break; case 32: -#line 384 "getdate.y" +#line 415 "getdate.y" { /* ISO 8601 format. YYYY-MM-DD. */ - pc->year = yyvsp[-2].textintval; - pc->month = -yyvsp[-1].textintval.value; - pc->day = -yyvsp[0].textintval.value; - } + pc->year = (yyvsp[(1) - (3)].textintval); + pc->month = -(yyvsp[(2) - (3)].textintval).value; + pc->day = -(yyvsp[(3) - (3)].textintval).value; + ;} break; case 33: -#line 391 "getdate.y" +#line 422 "getdate.y" { /* e.g. 17-JUN-1992. */ - pc->day = yyvsp[-2].textintval.value; - pc->month = yyvsp[-1].intval; - pc->year.value = -yyvsp[0].textintval.value; - pc->year.digits = yyvsp[0].textintval.digits; - } + pc->day = (yyvsp[(1) - (3)].textintval).value; + pc->month = (yyvsp[(2) - (3)].intval); + pc->year.value = -(yyvsp[(3) - (3)].textintval).value; + pc->year.digits = (yyvsp[(3) - (3)].textintval).digits; + ;} break; case 34: -#line 399 "getdate.y" +#line 430 "getdate.y" { /* e.g. JUN-17-1992. */ - pc->month = yyvsp[-2].intval; - pc->day = -yyvsp[-1].textintval.value; - pc->year.value = -yyvsp[0].textintval.value; - pc->year.digits = yyvsp[0].textintval.digits; - } + pc->month = (yyvsp[(1) - (3)].intval); + pc->day = -(yyvsp[(2) - (3)].textintval).value; + pc->year.value = -(yyvsp[(3) - (3)].textintval).value; + pc->year.digits = (yyvsp[(3) - (3)].textintval).digits; + ;} break; case 35: -#line 407 "getdate.y" +#line 438 "getdate.y" { - pc->month = yyvsp[-1].intval; - pc->day = yyvsp[0].textintval.value; - } + pc->month = (yyvsp[(1) - (2)].intval); + pc->day = (yyvsp[(2) - (2)].textintval).value; + ;} break; case 36: -#line 412 "getdate.y" +#line 443 "getdate.y" { - pc->month = yyvsp[-3].intval; - pc->day = yyvsp[-2].textintval.value; - pc->year = yyvsp[0].textintval; - } + pc->month = (yyvsp[(1) - (4)].intval); + pc->day = (yyvsp[(2) - (4)].textintval).value; + pc->year = (yyvsp[(4) - (4)].textintval); + ;} break; case 37: -#line 418 "getdate.y" +#line 449 "getdate.y" { - pc->day = yyvsp[-1].textintval.value; - pc->month = yyvsp[0].intval; - } + pc->day = (yyvsp[(1) - (2)].textintval).value; + pc->month = (yyvsp[(2) - (2)].intval); + ;} break; case 38: -#line 423 "getdate.y" +#line 454 "getdate.y" { - pc->day = yyvsp[-2].textintval.value; - pc->month = yyvsp[-1].intval; - pc->year = yyvsp[0].textintval; - } + pc->day = (yyvsp[(1) - (3)].textintval).value; + pc->month = (yyvsp[(2) - (3)].intval); + pc->year = (yyvsp[(3) - (3)].textintval); + ;} break; case 39: -#line 432 "getdate.y" +#line 463 "getdate.y" { pc->rel_ns = -pc->rel_ns; pc->rel_seconds = -pc->rel_seconds; @@ -1574,216 +1944,215 @@ pc->rel_day = -pc->rel_day; pc->rel_month = -pc->rel_month; pc->rel_year = -pc->rel_year; - } + ;} break; case 41: -#line 446 "getdate.y" - { pc->rel_year += yyvsp[-1].intval * yyvsp[0].intval; } +#line 477 "getdate.y" + { pc->rel_year += (yyvsp[(1) - (2)].intval) * (yyvsp[(2) - (2)].intval); ;} break; case 42: -#line 448 "getdate.y" - { pc->rel_year += yyvsp[-1].textintval.value * yyvsp[0].intval; } +#line 479 "getdate.y" + { pc->rel_year += (yyvsp[(1) - (2)].textintval).value * (yyvsp[(2) - (2)].intval); ;} break; case 43: -#line 450 "getdate.y" - { pc->rel_year += yyvsp[0].intval; } +#line 481 "getdate.y" + { pc->rel_year += (yyvsp[(1) - (1)].intval); ;} break; case 44: -#line 452 "getdate.y" - { pc->rel_month += yyvsp[-1].intval * yyvsp[0].intval; } +#line 483 "getdate.y" + { pc->rel_month += (yyvsp[(1) - (2)].intval) * (yyvsp[(2) - (2)].intval); ;} break; case 45: -#line 454 "getdate.y" - { pc->rel_month += yyvsp[-1].textintval.value * yyvsp[0].intval; } +#line 485 "getdate.y" + { pc->rel_month += (yyvsp[(1) - (2)].textintval).value * (yyvsp[(2) - (2)].intval); ;} break; case 46: -#line 456 "getdate.y" - { pc->rel_month += yyvsp[0].intval; } +#line 487 "getdate.y" + { pc->rel_month += (yyvsp[(1) - (1)].intval); ;} break; case 47: -#line 458 "getdate.y" - { pc->rel_day += yyvsp[-1].intval * yyvsp[0].intval; } +#line 489 "getdate.y" + { pc->rel_day += (yyvsp[(1) - (2)].intval) * (yyvsp[(2) - (2)].intval); ;} break; case 48: -#line 460 "getdate.y" - { pc->rel_day += yyvsp[-1].textintval.value * yyvsp[0].intval; } +#line 491 "getdate.y" + { pc->rel_day += (yyvsp[(1) - (2)].textintval).value * (yyvsp[(2) - (2)].intval); ;} break; case 49: -#line 462 "getdate.y" - { pc->rel_day += yyvsp[0].intval; } +#line 493 "getdate.y" + { pc->rel_day += (yyvsp[(1) - (1)].intval); ;} break; case 50: -#line 464 "getdate.y" - { pc->rel_hour += yyvsp[-1].intval * yyvsp[0].intval; } +#line 495 "getdate.y" + { pc->rel_hour += (yyvsp[(1) - (2)].intval) * (yyvsp[(2) - (2)].intval); ;} break; case 51: -#line 466 "getdate.y" - { pc->rel_hour += yyvsp[-1].textintval.value * yyvsp[0].intval; } +#line 497 "getdate.y" + { pc->rel_hour += (yyvsp[(1) - (2)].textintval).value * (yyvsp[(2) - (2)].intval); ;} break; case 52: -#line 468 "getdate.y" - { pc->rel_hour += yyvsp[0].intval; } +#line 499 "getdate.y" + { pc->rel_hour += (yyvsp[(1) - (1)].intval); ;} break; case 53: -#line 470 "getdate.y" - { pc->rel_minutes += yyvsp[-1].intval * yyvsp[0].intval; } +#line 501 "getdate.y" + { pc->rel_minutes += (yyvsp[(1) - (2)].intval) * (yyvsp[(2) - (2)].intval); ;} break; case 54: -#line 472 "getdate.y" - { pc->rel_minutes += yyvsp[-1].textintval.value * yyvsp[0].intval; } +#line 503 "getdate.y" + { pc->rel_minutes += (yyvsp[(1) - (2)].textintval).value * (yyvsp[(2) - (2)].intval); ;} break; case 55: -#line 474 "getdate.y" - { pc->rel_minutes += yyvsp[0].intval; } +#line 505 "getdate.y" + { pc->rel_minutes += (yyvsp[(1) - (1)].intval); ;} break; case 56: -#line 476 "getdate.y" - { pc->rel_seconds += yyvsp[-1].intval * yyvsp[0].intval; } +#line 507 "getdate.y" + { pc->rel_seconds += (yyvsp[(1) - (2)].intval) * (yyvsp[(2) - (2)].intval); ;} break; case 57: -#line 478 "getdate.y" - { pc->rel_seconds += yyvsp[-1].textintval.value * yyvsp[0].intval; } +#line 509 "getdate.y" + { pc->rel_seconds += (yyvsp[(1) - (2)].textintval).value * (yyvsp[(2) - (2)].intval); ;} break; case 58: -#line 480 "getdate.y" - { pc->rel_seconds += yyvsp[-1].timespec.tv_sec * yyvsp[0].intval; pc->rel_ns += yyvsp[-1].timespec.tv_nsec * yyvsp[0].intval; } +#line 511 "getdate.y" + { pc->rel_seconds += (yyvsp[(1) - (2)].timespec).tv_sec * (yyvsp[(2) - (2)].intval); pc->rel_ns += (yyvsp[(1) - (2)].timespec).tv_nsec * (yyvsp[(2) - (2)].intval); ;} break; case 59: -#line 482 "getdate.y" - { pc->rel_seconds += yyvsp[-1].timespec.tv_sec * yyvsp[0].intval; pc->rel_ns += yyvsp[-1].timespec.tv_nsec * yyvsp[0].intval; } +#line 513 "getdate.y" + { pc->rel_seconds += (yyvsp[(1) - (2)].timespec).tv_sec * (yyvsp[(2) - (2)].intval); pc->rel_ns += (yyvsp[(1) - (2)].timespec).tv_nsec * (yyvsp[(2) - (2)].intval); ;} break; case 60: -#line 484 "getdate.y" - { pc->rel_seconds += yyvsp[0].intval; } +#line 515 "getdate.y" + { pc->rel_seconds += (yyvsp[(1) - (1)].intval); ;} break; case 62: -#line 490 "getdate.y" - { pc->rel_year += yyvsp[-1].textintval.value * yyvsp[0].intval; } +#line 521 "getdate.y" + { pc->rel_year += (yyvsp[(1) - (2)].textintval).value * (yyvsp[(2) - (2)].intval); ;} break; case 63: -#line 492 "getdate.y" - { pc->rel_month += yyvsp[-1].textintval.value * yyvsp[0].intval; } +#line 523 "getdate.y" + { pc->rel_month += (yyvsp[(1) - (2)].textintval).value * (yyvsp[(2) - (2)].intval); ;} break; case 64: -#line 494 "getdate.y" - { pc->rel_day += yyvsp[-1].textintval.value * yyvsp[0].intval; } +#line 525 "getdate.y" + { pc->rel_day += (yyvsp[(1) - (2)].textintval).value * (yyvsp[(2) - (2)].intval); ;} break; case 65: -#line 496 "getdate.y" - { pc->rel_hour += yyvsp[-1].textintval.value * yyvsp[0].intval; } +#line 527 "getdate.y" + { pc->rel_hour += (yyvsp[(1) - (2)].textintval).value * (yyvsp[(2) - (2)].intval); ;} break; case 66: -#line 498 "getdate.y" - { pc->rel_minutes += yyvsp[-1].textintval.value * yyvsp[0].intval; } +#line 529 "getdate.y" + { pc->rel_minutes += (yyvsp[(1) - (2)].textintval).value * (yyvsp[(2) - (2)].intval); ;} break; case 67: -#line 500 "getdate.y" - { pc->rel_seconds += yyvsp[-1].textintval.value * yyvsp[0].intval; } +#line 531 "getdate.y" + { pc->rel_seconds += (yyvsp[(1) - (2)].textintval).value * (yyvsp[(2) - (2)].intval); ;} break; case 71: -#line 508 "getdate.y" - { yyval.timespec.tv_sec = yyvsp[0].textintval.value; yyval.timespec.tv_nsec = 0; } +#line 539 "getdate.y" + { (yyval.timespec).tv_sec = (yyvsp[(1) - (1)].textintval).value; (yyval.timespec).tv_nsec = 0; ;} break; case 73: -#line 514 "getdate.y" - { yyval.timespec.tv_sec = yyvsp[0].textintval.value; yyval.timespec.tv_nsec = 0; } +#line 545 "getdate.y" + { (yyval.timespec).tv_sec = (yyvsp[(1) - (1)].textintval).value; (yyval.timespec).tv_nsec = 0; ;} break; case 74: -#line 519 "getdate.y" +#line 550 "getdate.y" { if (pc->dates_seen && ! pc->year.digits - && ! pc->rels_seen && (pc->times_seen || 2 < yyvsp[0].textintval.digits)) - pc->year = yyvsp[0].textintval; + && ! pc->rels_seen && (pc->times_seen || 2 < (yyvsp[(1) - (1)].textintval).digits)) + pc->year = (yyvsp[(1) - (1)].textintval); else { - if (4 < yyvsp[0].textintval.digits) + if (4 < (yyvsp[(1) - (1)].textintval).digits) { pc->dates_seen++; - pc->day = yyvsp[0].textintval.value % 100; - pc->month = (yyvsp[0].textintval.value / 100) % 100; - pc->year.value = yyvsp[0].textintval.value / 10000; - pc->year.digits = yyvsp[0].textintval.digits - 4; + pc->day = (yyvsp[(1) - (1)].textintval).value % 100; + pc->month = ((yyvsp[(1) - (1)].textintval).value / 100) % 100; + pc->year.value = (yyvsp[(1) - (1)].textintval).value / 10000; + pc->year.digits = (yyvsp[(1) - (1)].textintval).digits - 4; } else { pc->times_seen++; - if (yyvsp[0].textintval.digits <= 2) + if ((yyvsp[(1) - (1)].textintval).digits <= 2) { - pc->hour = yyvsp[0].textintval.value; + pc->hour = (yyvsp[(1) - (1)].textintval).value; pc->minutes = 0; } else { - pc->hour = yyvsp[0].textintval.value / 100; - pc->minutes = yyvsp[0].textintval.value % 100; + pc->hour = (yyvsp[(1) - (1)].textintval).value / 100; + pc->minutes = (yyvsp[(1) - (1)].textintval).value % 100; } pc->seconds.tv_sec = 0; pc->seconds.tv_nsec = 0; pc->meridian = MER24; } } - } + ;} break; case 75: -#line 556 "getdate.y" - { yyval.intval = -1; } +#line 587 "getdate.y" + { (yyval.intval) = -1; ;} break; case 76: -#line 558 "getdate.y" - { yyval.intval = yyvsp[0].textintval.value; } +#line 589 "getdate.y" + { (yyval.intval) = (yyvsp[(2) - (2)].textintval).value; ;} break; case 77: -#line 563 "getdate.y" - { yyval.intval = MER24; } +#line 594 "getdate.y" + { (yyval.intval) = MER24; ;} break; case 78: -#line 565 "getdate.y" - { yyval.intval = yyvsp[0].intval; } +#line 596 "getdate.y" + { (yyval.intval) = (yyvsp[(1) - (1)].intval); ;} break; +/* Line 1267 of yacc.c. */ +#line 2151 "getdate.c" + default: break; } + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); -/* Line 1000 of yacc.c. */ -#line 1782 "getdate.c" - - yyvsp -= yylen; - yyssp -= yylen; - - + YYPOPSTACK (yylen); + yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; @@ -1812,99 +2181,65 @@ if (!yyerrstatus) { ++yynerrs; -#if YYERROR_VERBOSE - yyn = yypact[yystate]; - - if (YYPACT_NINF < yyn && yyn < YYLAST) - { - YYSIZE_T yysize = 0; - int yytype = YYTRANSLATE (yychar); - const char* yyprefix; - char *yymsg; - int yyx; - - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 0; - - yyprefix = ", expecting "; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) +#if ! YYERROR_VERBOSE + yyerror (pc, YY_("syntax error")); +#else + { + YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); + if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) + { + YYSIZE_T yyalloc = 2 * yysize; + if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) + yyalloc = YYSTACK_ALLOC_MAXIMUM; + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yyalloc); + if (yymsg) + yymsg_alloc = yyalloc; + else { - yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]); - yycount += 1; - if (yycount == 5) - { - yysize = 0; - break; - } + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; } - yysize += (sizeof ("syntax error, unexpected ") - + yystrlen (yytname[yytype])); - yymsg = (char *) YYSTACK_ALLOC (yysize); - if (yymsg != 0) - { - char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); - yyp = yystpcpy (yyp, yytname[yytype]); + } - if (yycount < 5) - { - yyprefix = ", expecting "; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - yyp = yystpcpy (yyp, yyprefix); - yyp = yystpcpy (yyp, yytname[yyx]); - yyprefix = " or "; - } - } - yyerror (pc, yymsg); - YYSTACK_FREE (yymsg); - } - else - yyerror (pc, "syntax error; also virtual memory exhausted"); - } - else -#endif /* YYERROR_VERBOSE */ - yyerror (pc, "syntax error"); + if (0 < yysize && yysize <= yymsg_alloc) + { + (void) yysyntax_error (yymsg, yystate, yychar); + yyerror (pc, yymsg); + } + else + { + yyerror (pc, YY_("syntax error")); + if (yysize != 0) + goto yyexhaustedlab; + } + } +#endif } if (yyerrstatus == 3) { - /* If just tried and failed to reuse lookahead token after an + /* If just tried and failed to reuse look-ahead token after an error, discard it. */ if (yychar <= YYEOF) - { - /* If at end of input, pop the error token, - then the rest of the stack, then return failure. */ + { + /* Return failure if at end of input. */ if (yychar == YYEOF) - for (;;) - { - YYPOPSTACK; - if (yyssp == yyss) - YYABORT; - YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); - yydestruct (yystos[*yyssp], yyvsp); - } - } + YYABORT; + } else { - YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); - yydestruct (yytoken, &yylval); + yydestruct ("Error: discarding", + yytoken, &yylval, pc); yychar = YYEMPTY; - } } - /* Else will try to reuse lookahead token after shifting the error + /* Else will try to reuse look-ahead token after shifting the error token. */ goto yyerrlab1; @@ -1914,15 +2249,17 @@ `---------------------------------------------------*/ yyerrorlab: -#ifdef __GNUC__ - /* Pacify GCC when the user code never invokes YYERROR and the label - yyerrorlab therefore never appears in user code. */ - if (0) + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) goto yyerrorlab; -#endif - yyvsp -= yylen; - yyssp -= yylen; + /* Do not reclaim the symbols of the rule which action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; @@ -1951,9 +2288,10 @@ if (yyssp == yyss) YYABORT; - YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); - yydestruct (yystos[yystate], yyvsp); - YYPOPSTACK; + + yydestruct ("Error: popping", + yystos[yystate], yyvsp, pc); + YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } @@ -1961,11 +2299,12 @@ if (yyn == YYFINAL) YYACCEPT; - YYDPRINTF ((stderr, "Shifting error token, ")); - *++yyvsp = yylval; + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + yystate = yyn; goto yynewstate; @@ -1985,25 +2324,43 @@ goto yyreturn; #ifndef yyoverflow -/*----------------------------------------------. -| yyoverflowlab -- parser overflow comes here. | -`----------------------------------------------*/ -yyoverflowlab: - yyerror (pc, "parser stack overflow"); +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (pc, YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: + if (yychar != YYEOF && yychar != YYEMPTY) + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval, pc); + /* Do not reclaim the symbols of the rule which action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp, pc); + YYPOPSTACK (1); + } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif - return yyresult; +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + /* Make sure YYID is used. */ + return YYID (yyresult); } -#line 568 "getdate.y" +#line 599 "getdate.y" static table const meridian_table[] = @@ -2793,7 +3150,8 @@ + sizeof pc.time_zone * CHAR_BIT / 3]; if (!tz_was_altered) tz0 = get_tz (tz0buf); - sprintf (tz1buf, "XXX%s%ld:%02d", "-" + (time_zone < 0), + snprintf(tz1buf, sizeof(tz1buf), + "XXX%s%ld:%02d", "-" + (time_zone < 0), abs_time_zone_hour, abs_time_zone_min); if (setenv ("TZ", tz1buf, 1) != 0) goto fail; @@ -2891,7 +3249,7 @@ ok = false; done: if (tz_was_altered) - ok &= (tz0 ? setenv ("TZ", tz0, 1) : unsetenv ("TZ")) == 0; + ok &= (tz0 ? setenv("TZ", tz0, 1) : (unsetenv("TZ"), 0)) == 0; if (tz0 != tz0buf) free (tz0); return ok; @@ -2900,37 +3258,52 @@ #if TEST int -main (int ac, char **av) +main(int argc, char **argv) { char buff[BUFSIZ]; + int cmd = 0; - printf ("Enter date, or blank line to exit.\n\t> "); + if (argc > 1) { + int i = 1; + buff[0] = '\0'; + while (i < argc) { + if (i > 1) + strlcat(buff, " ", BUFSIZ); + strlcat(buff, argv[i++], BUFSIZ); + } + cmd++; + goto once; + } + + printf("Enter date, or blank line to exit.\n> "); fflush (stdout); buff[BUFSIZ - 1] = '\0'; - while (fgets (buff, BUFSIZ - 1, stdin) && buff[0]) + while (fgets(buff, BUFSIZ - 1, stdin) && buff[0] && + buff[0] != '\r' && buff[0] != '\n') { struct timespec d; struct tm const *tm; + once: if (! get_date (&d, buff, NULL)) printf ("Bad format - couldn't convert.\n"); else if (! (tm = localtime (&d.tv_sec))) { - long int sec = d.tv_sec; - printf ("localtime (%ld) failed\n", sec); + printf ("localtime (%lld) failed\n", (long long)d.tv_sec); } else { int ns = d.tv_nsec; - printf ("%04ld-%02d-%02d %02d:%02d:%02d.%09d\n", - tm->tm_year + 1900L, tm->tm_mon + 1, tm->tm_mday, + printf ("%13lld =\t%04ld-%02d-%02d %02d:%02d:%02d.%09d\n", + (long long)d.tv_sec, (long)tm->tm_year + 1900, + tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, ns); } - printf ("\t> "); + if (cmd) + return 0; + printf ("> "); fflush (stdout); } return 0; } #endif /* TEST */ - - --- cvs-1.12.13+real.orig/lib/regex_internal.c +++ cvs-1.12.13+real/lib/regex_internal.c @@ -629,7 +629,7 @@ if (pstr->is_utf8) { - const unsigned char *raw, *p, *q, *end; + const unsigned char *raw, *p, *end; /* Special case UTF-8. Multi-byte chars start with any byte other than 0x80 - 0xbf. */ @@ -641,17 +641,8 @@ mbstate_t cur_state; wchar_t wc2; Idx mlen = raw + pstr->len - p; - unsigned char buf[6]; size_t mbclen; - q = p; - if (BE (pstr->trans != NULL, 0)) - { - int i = mlen < 6 ? mlen : 6; - while (--i >= 0) - buf[i] = pstr->trans[p[i]]; - q = buf; - } /* XXX Don't use mbrtowc, we know which conversion to use (UTF-8 -> UCS4). */ memset (&cur_state, 0, sizeof (cur_state)); --- cvs-1.12.13+real.orig/lib/regcomp.c +++ cvs-1.12.13+real/lib/regcomp.c @@ -1652,8 +1652,6 @@ && dfa->edests[node].nelem && !dfa->nodes[dfa->edests[node].elems[0]].duplicated) { - Idx org_node, cur_node; - org_node = cur_node = node; err = duplicate_node_closure (dfa, node, node, node, constraint); if (BE (err != REG_NOERROR, 0)) return err; --- cvs-1.12.13+real.orig/lib/pagealign_alloc.c +++ cvs-1.12.13+real/lib/pagealign_alloc.c @@ -44,6 +44,10 @@ #include "xalloc.h" #include "gettext.h" +#if HAVE_MMAP && !defined(HAVE_MAP_ANONYMOUS) +#include +#endif + #define _(str) gettext (str) #if HAVE_MMAP @@ -132,6 +136,7 @@ const int fd = -1; const int flags = MAP_ANONYMOUS | MAP_PRIVATE; # else /* !HAVE_MAP_ANONYMOUS */ + static int beenhere = 0; static int fd = -1; /* Only open /dev/zero once in order to avoid limiting the amount of memory we may allocate based on the number of open file descriptors. */ @@ -140,7 +145,20 @@ { fd = open ("/dev/zero", O_RDONLY, 0666); if (fd < 0) - error (EXIT_FAILURE, errno, _("Failed to open /dev/zero for read")); + { + if (!beenhere) + { + beenhere = 1; + error (EXIT_FAILURE, errno, _("Failed to open /dev/zero for read")); + } + else + { + fprintf (stderr, "Fatal in pagealign: %s\n", + _("Failed to open /dev/zero for read")); + fflush (stderr); + _exit (EXIT_FAILURE); + } + } } # endif /* HAVE_MAP_ANONYMOUS */ ret = mmap (NULL, size, PROT_READ | PROT_WRITE, flags, fd, 0); --- cvs-1.12.13+real.orig/lib/Makefile.in +++ cvs-1.12.13+real/lib/Makefile.in @@ -212,6 +212,7 @@ GETOPT_H = @GETOPT_H@ GLOB_H = @GLOB_H@ GMSGFMT = @GMSGFMT@ +GREP = @GREP@ HAVE_LONG_64BIT = @HAVE_LONG_64BIT@ HAVE_LONG_LONG_64BIT = @HAVE_LONG_LONG_64BIT@ HAVE__BOOL = @HAVE__BOOL@ @@ -249,6 +250,7 @@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ @@ -274,8 +276,6 @@ ZLIB_LIBS = @ZLIB_LIBS@ ZLIB_SUBDIRS = @ZLIB_SUBDIRS@ ac_ct_CC = @ac_ct_CC@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ ac_prefix_program = @ac_prefix_program@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ @@ -292,23 +292,30 @@ build_vendor = @build_vendor@ cvs_client_objects = @cvs_client_objects@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ --- cvs-1.12.13+real.orig/lib/test-getdate.sh +++ cvs-1.12.13+real/lib/test-getdate.sh @@ -19,6 +19,11 @@ # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +# as this uses POSIX behaviour and does not count leap seconds... +if test -n "$GETDATE_LD_PRELOAD"; then + LD_PRELOAD=$GETDATE_LD_PRELOAD + export LD_PRELOAD +fi ### ### Globals @@ -184,22 +189,22 @@ cat >getdate-expected < Bad format - couldn't convert. - > Bad format - couldn't convert. - > 1972-12-05 00:00:00.000000000 - > 1974-03-29 00:00:00.000000000 - > 1996-05-12 13:57:45.000000000 - > 2012-05-12 00:00:00.000000000 - > 1996-05-12 00:00:00.000000000 - > Bad format - couldn't convert. - > Bad format - couldn't convert. - > 1970-01-01 02:00:00.000000000 - > Bad format - couldn't convert. - > 1969-12-31 22:00:00.000000000 - > Bad format - couldn't convert. - > 1970-01-01 06:00:00.000000000 - > 1997-01-12 00:00:00.000000000 - > +> Bad format - couldn't convert. +> Bad format - couldn't convert. +> 92361600 = 1972-12-05 00:00:00.000000000 +> 133747200 = 1974-03-29 00:00:00.000000000 +> 831909465 = 1996-05-12 13:57:45.000000000 +> 1336780800 = 2012-05-12 00:00:00.000000000 +> 831859200 = 1996-05-12 00:00:00.000000000 +> Bad format - couldn't convert. +> Bad format - couldn't convert. +> 7200 = 1970-01-01 02:00:00.000000000 +> Bad format - couldn't convert. +> -7200 = 1969-12-31 22:00:00.000000000 +> Bad format - couldn't convert. +> 21600 = 1970-01-01 06:00:00.000000000 +> 853027200 = 1997-01-12 00:00:00.000000000 +> EOF ./getdate >getdate-got <getdate-expected < 2005-03-01 00:00:00.000000000 - > 2005-03-27 00:00:00.000000000 - > 2005-03-28 01:00:00.000000000 - > 2005-03-28 01:00:00.000000000 - > 2005-03-29 01:00:00.000000000 - > 2005-03-29 01:00:00.000000000 - > 2005-03-30 01:00:00.000000000 - > 2005-03-30 01:00:00.000000000 - > 2005-03-31 01:00:00.000000000 - > 2005-03-31 01:00:00.000000000 - > 2005-04-01 01:00:00.000000000 - > 2005-04-01 01:00:00.000000000 - > 2005-04-10 01:00:00.000000000 - > 2005-04-10 01:00:00.000000000 - > 2005-04-01 00:00:00.000000000 - > +> 1109635200 = 2005-03-01 00:00:00.000000000 +> 1111881600 = 2005-03-27 00:00:00.000000000 +> 1111968000 = 2005-03-28 01:00:00.000000000 +> 1111968000 = 2005-03-28 01:00:00.000000000 +> 1112054400 = 2005-03-29 01:00:00.000000000 +> 1112054400 = 2005-03-29 01:00:00.000000000 +> 1112140800 = 2005-03-30 01:00:00.000000000 +> 1112140800 = 2005-03-30 01:00:00.000000000 +> 1112227200 = 2005-03-31 01:00:00.000000000 +> 1112227200 = 2005-03-31 01:00:00.000000000 +> 1112313600 = 2005-04-01 01:00:00.000000000 +> 1112313600 = 2005-04-01 01:00:00.000000000 +> 1113091200 = 2005-04-10 01:00:00.000000000 +> 1113091200 = 2005-04-10 01:00:00.000000000 +> 1112310000 = 2005-04-01 00:00:00.000000000 +> EOF ./getdate >getdate-got <getdate-expected < 2005-03-01 00:00:00.000000000 - > 2005-02-28 18:00:00.000000000 - > 2005-04-01 00:00:00.000000000 - > Bad format - couldn't convert. - > 2005-04-30 19:00:00.000000000 - > 2005-04-30 20:00:00.000000000 - > 2005-05-01 00:00:00.000000000 - > 2005-04-30 20:00:00.000000000 - > Bad format - couldn't convert. - > 2005-05-31 19:00:00.000000000 - > 2005-05-31 20:00:00.000000000 - > 2005-06-01 00:00:00.000000000 - > 2005-05-31 20:00:00.000000000 - > +> 1109653200 = 2005-03-01 00:00:00.000000000 +> 1109631600 = 2005-02-28 18:00:00.000000000 +> 1112331600 = 2005-04-01 00:00:00.000000000 +> Bad format - couldn't convert. +> 1114902000 = 2005-04-30 19:00:00.000000000 +> 1114905600 = 2005-04-30 20:00:00.000000000 +> 1114920000 = 2005-05-01 00:00:00.000000000 +> 1114905600 = 2005-04-30 20:00:00.000000000 +> Bad format - couldn't convert. +> 1117580400 = 2005-05-31 19:00:00.000000000 +> 1117584000 = 2005-05-31 20:00:00.000000000 +> 1117598400 = 2005-06-01 00:00:00.000000000 +> 1117584000 = 2005-05-31 20:00:00.000000000 +> EOF ./getdate >getdate-got < #include +#if defined(STDC_HEADERS) || defined(HAVE_STRING_H) +# include +#else +# include +#endif #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ --- cvs-1.12.13+real.orig/lib/getdate.h +++ cvs-1.12.13+real/lib/getdate.h @@ -1,6 +1,7 @@ /* Parse a string into an internal time stamp. - Copyright (C) 1995, 1997, 1998, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 1995, 1997, 1998, 2003, 2004, 2005 + 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 @@ -16,7 +17,22 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#ifndef GETDATE_H +#define GETDATE_H + +#if HAVE_CONFIG_H +# include +#endif + #include +#ifndef IN_RCS #include "timespec.h" +#else +#include +#include +#define gettime(ts) clock_gettime(CLOCK_REALTIME,(ts)) +#endif bool get_date (struct timespec *, char const *, struct timespec const *); + +#endif /* GETDATE_H */ --- cvs-1.12.13+real.orig/zlib/contrib/minizip/unzip.h +++ cvs-1.12.13+real/zlib/contrib/minizip/unzip.h @@ -124,8 +124,8 @@ int iCaseSensitivity)); /* Compare two filename (fileName1,fileName2). - If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp) - If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi + If iCaseSenisivity = 1, comparison is case sensitivity (like strcmp) + If iCaseSenisivity = 2, comparison is not case sensitivity (like strcmpi or strcasecmp) If iCaseSenisivity = 0, case sensitivity is defaut of your operating system (like 1 on Unix, 2 on Windows) --- cvs-1.12.13+real.orig/zlib/contrib/minizip/unzip.c +++ cvs-1.12.13+real/zlib/contrib/minizip/unzip.c @@ -295,8 +295,8 @@ /* Compare two filename (fileName1,fileName2). - If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp) - If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi + If iCaseSenisivity = 1, comparison is case sensitivity (like strcmp) + If iCaseSenisivity = 2, comparison is not case sensitivity (like strcmpi or strcasecmp) If iCaseSenisivity = 0, case sensitivity is defaut of your operating system (like 1 on Unix, 2 on Windows) --- cvs-1.12.13+real.orig/zlib/contrib/ada/zlib.ads +++ cvs-1.12.13+real/zlib/contrib/ada/zlib.ads @@ -22,7 +22,7 @@ -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- --- covered by the GNU Public License. -- +-- covered by the GNU General Public License. -- ------------------------------------------------------------------------------ -- $Id: zlib.ads,v 1.1.1.2 2005/02/20 17:57:26 dprice Exp $ --- cvs-1.12.13+real.orig/doc/HACKING.DOCS +++ cvs-1.12.13+real/doc/HACKING.DOCS @@ -16,7 +16,9 @@ @strong{ ... } Similar to @emph{}, but the effect is to bracket with asterisks in info files (* ... *) and in bold in PDF & probably in postscript & - HTML. + HTML. It will cause spurious links in info if + used in some circumstances; if in doubt, use + @empy{ ... } instead then. @noindent Suppresses indentation of the following paragraph. This can ocassionally be useful after examples and the like. --- cvs-1.12.13+real.orig/doc/cvs.texinfo +++ cvs-1.12.13+real/doc/cvs.texinfo @@ -1,6 +1,8 @@ \input texinfo @c -*-texinfo-*- @comment Documentation for CVS. @setfilename cvs.info +@afourpaper +@comment $MirOS: contrib/hosted/tg/deb/cvs/doc/cvs.texinfo,v 1.5 2011/12/04 20:12:44 tg Exp $ @macro copyleftnotice @noindent Copyright @copyright{} 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, @@ -742,7 +744,7 @@ @c /home/joe/sources. But this node is too long @c as it is; need a little reorganization... -@cindex :local:, setting up +@cindex local method, setting up @sc{cvs} can access a repository by a variety of means. It might be on the local computer, or it might be on a computer across the room or across the world. @@ -2236,7 +2238,7 @@ through and @var{port} is the port number on the HTTP proxy server to connect via. @var{port} defaults to 8080. -@strong{NOTE: An HTTP proxy server is not the same as a @sc{cvs} write proxy +@emph{NOTE: An HTTP proxy server is not the same as a @sc{cvs} write proxy server - please see @ref{Write proxies} for more on @sc{cvs} write proxies.} For example, to connect pserver via a web proxy listening on port 8000 of @@ -2246,7 +2248,7 @@ :pserver;proxy=www.myproxy.net;proxyport=8000:@var{pserver_connection_string} @end example -@strong{NOTE: In the above example, @var{pserver_connection_string} is still +@emph{NOTE: In the above example, @var{pserver_connection_string} is still required to connect and authenticate to the CVS server, as noted in the upcoming sections on password authentication, @code{gserver}, and @code{kserver}. The example above only demonstrates a modification to the @@ -2377,21 +2379,23 @@ There is no need to edit @file{inetd.conf} or start a @sc{cvs} server daemon. -@cindex :server:, setting up -@cindex :ext:, setting up +@cindex server method, setting up +@cindex ext method, setting up @cindex Kerberos, using kerberized rsh @cindex SSH (rsh replacement) @cindex rsh replacements (Kerberized, SSH, &c) There are two access methods that you use in @code{CVSROOT} for rsh. @code{:server:} specifies an internal rsh client, which is supported only by some @sc{cvs} ports. +This is not supported on most Unix-style systems. @code{:ext:} specifies an external rsh program. By default this is @code{rsh} (unless otherwise specified by the @file{--with-rsh} flag to configure) but you may set the @code{CVS_RSH} environment variable to invoke another program which can access the remote server (for example, @code{remsh} on HP-UX 9 because @code{rsh} is -something different). It must be a program which can +something different, or @code{ssh} to allow the use of secure +and/or compressed connections). It must be a program which can transmit data to and from the server without modifying it; for example the Windows NT @code{rsh} is not suitable since it by default translates between CRLF @@ -2405,6 +2409,12 @@ to be inapplicable; consult the documentation for your rsh replacement. +In the Debian and MirBSD versions of @sc{cvs}, you can +also specify @code{:extssh:} to force use of the Secure +Shell, or @code{:ext=prog:} or @code{:ext=/path/to/prog:} +to specify the remote shell to use without needing to +touch the @code{CVS_RSH} environment variable. + You may choose to specify the @var{CVS_RSH} option as a method option in the @var{CVSROOT} string to allow you to use different connection tools for different roots (@pxref{The connection method}). For example, allowing @@ -2675,7 +2685,7 @@ (@code{info-cvs@@nongnu.org} or @code{bug-cvs@@nongnu.org}) if you use the @sc{cvs} PAM support. -@strong{WARNING: Using PAM gives the system administrator much more +@emph{WARNING: Using PAM gives the system administrator much more flexibility about how @sc{cvs} users are authenticated but no more security than other methods. See below for more.} @@ -2776,7 +2786,7 @@ @cindex Login (subcommand) @cindex Password client, using @cindex Authenticated client, using -@cindex :pserver:, setting up +@cindex pserver method, setting up To run a @sc{cvs} command on a remote repository via the password-authenticating server, one specifies the @code{pserver} protocol, optional username, repository host, an @@ -2940,8 +2950,8 @@ @cindex GSSAPI @cindex Security, GSSAPI -@cindex :gserver:, setting up -@cindex Kerberos, using :gserver: +@cindex gserver method, setting up +@cindex Kerberos, using gserver method GSSAPI is a generic interface to network security systems such as Kerberos 5. If you have a working GSSAPI library, you can have @@ -2992,9 +3002,9 @@ @node Kerberos authenticated @subsection Direct connection with Kerberos -@cindex Kerberos, using :kserver: +@cindex Kerberos, using kserver method @cindex Security, Kerberos -@cindex :kserver:, setting up +@cindex kserver method, setting up The easiest way to use Kerberos is to use the Kerberos @code{rsh}, as described in @ref{Connecting via rsh}. The main disadvantage of using rsh is that all the data @@ -3039,7 +3049,7 @@ @subsection Connecting with fork @cindex fork, access method -@cindex :fork:, setting up +@cindex fork method, setting up This access method allows you to connect to a repository on your local disk via the remote protocol. In other words it does pretty much the same thing as @@ -3065,7 +3075,7 @@ cvs -d :fork:/usr/local/cvsroot checkout foo @end example -@cindex CVS_SERVER, and :fork: +@cindex CVS_SERVER, and fork method As with @code{:ext:}, the server is called @samp{cvs} by default, or the value of the @code{CVS_SERVER} environment variable. @@ -3994,7 +4004,7 @@ tag. @noindent -@strong{WARNING: the commands in this section are +@emph{WARNING: the commands in this section are dangerous; they permanently discard historical information and it can be difficult or impossible to recover from errors. If you are a @sc{cvs} @@ -4024,7 +4034,7 @@ trigger warnings and will not be deleted. @noindent -@strong{WARNING: Moving branch tags is very dangerous! If you think +@emph{WARNING: Moving branch tags is very dangerous! If you think you need the @code{-B} option, think again and ask your @sc{cvs} administrator about it (if that isn't you). There is almost certainly another way to accomplish what you want to accomplish.} @@ -4055,7 +4065,7 @@ name are ignored with a warning message. @noindent -@strong{WARNING: Moving branch tags is very dangerous! If you think you +@emph{WARNING: Moving branch tags is very dangerous! If you think you need the @code{-B} option, think again and ask your @sc{cvs} administrator about it (if that isn't you). There is almost certainly another way to accomplish what you want to accomplish.} @@ -4904,7 +4914,7 @@ directory need not change anything. Therefore, there is no conflict. -@strong{WARNING: In versions of @sc{cvs} prior to 1.12.2, there was a +@emph{WARNING: In versions of @sc{cvs} prior to 1.12.2, there was a major problem with using @samp{-kk} on merges. Namely, @samp{-kk} overrode any default keyword expansion mode set in the archive file in the repository. This could, unfortunately for some users, cause data @@ -5968,7 +5978,7 @@ locks, have all developers put "edit -c", "commit -c" in their .cvsrc file, and turn on watches in the repository. This prevents them from doing a @code{cvs edit} if anyone is -already editting the file. It also may +already editing the file. It also may be possible to use plain watches together with suitable procedures (not enforced by software), to avoid having two people edit at the same time. @@ -6630,7 +6640,7 @@ put "edit -c" and "commit -c" into all .cvsrc files, and make files default to read only by turning on watches or putting "cvs -r" into all .cvsrc files. -This prevents multiple people from editting a file at +This prevents multiple people from editing a file at the same time (unless explicitly overriden with @samp{-f}). @c I'm a little dissatisfied with this presentation, @@ -6875,7 +6885,7 @@ There are two additional options that @code{cvs edit} understands as of @sc{cvs} client and server versions 1.12.10 but @code{cvs watch} does not. The first is @code{-c}, which causes @code{cvs edit} to fail if anyone else -is editting the file. This is probably only useful when @samp{edit -c} and +is editing the file. This is probably only useful when @samp{edit -c} and @samp{commit -c} are specified in all developers' @file{.cvsrc} files. This behavior may be overriden this via the @code{-f} option, which overrides @code{-c} and allows multiple edits to succeed. @@ -7182,6 +7192,15 @@ @item $@splitrcskeyword{Date}$ The date and time (UTC) the revision was checked in. +@cindex Mdocdate keyword +@item $@splitrcskeyword{Mdocdate}$ +The date (UTC) the revision was checked in, in a format suitable +for the Berkeley mdoc macro processing. + +@example +$Mdocdate: December 4 2011 $ +@end example + @cindex Header keyword @item $@splitrcskeyword{Header}$ A standard header containing the full pathname of the @@ -7551,12 +7570,13 @@ @example # Add a "MyBSD" keyword and restrict keyword - # expansion to the MyBSD, Name and Date keywords. + # expansion to the MyBSD, Name, Date and Mdocdate keywords. LocalKeyword=MyBSD=CVSHeader - KeywordExpand=iMyBSD,Name,Date + KeywordExpand=iMyBSD,Name,Date,Mdocdate @end example -would allow $@splitrcskeyword{MyBSD}$, $@splitrcskeyword{Name}$, and +would allow $@splitrcskeyword{MyBSD}$, $@splitrcskeyword{Name}$, +$@splitrcskeyword{Mdocdate} and $@splitrcskeyword{Date}$ to be expanded. It is also possible to configure an exclusion list @@ -7742,7 +7762,7 @@ $ cvs import -m "Import of FSF v. 0.05" fsf/wdiff FSF_DIST WDIFF_0_05 @end example -@strong{WARNING: If you use a release tag that already exists in one of the +@emph{WARNING: If you use a release tag that already exists in one of the repository archives, files removed by an import may not be detected.} For files that have not been modified locally, the newly created @@ -7786,7 +7806,12 @@ You can also revert local changes completely and return to the latest vendor release by changing the `head' -revision back to the vendor branch on all files. For +revision back to the vendor branch on all files. This +does, however, produce weird results if you should ever +edit this file again, for anyone looking at the output +from the @code{log} command or CVSweb. To fix this, +first commit a revision of the file which equals the +vendor branch, then use @code{admin} @samp{-b}. For example, if you have a checked-out copy of the sources in @file{~/work.d/wdiff}, and you want to revert to the vendor's version for all the files in that directory, @@ -7853,6 +7878,10 @@ @code{cvs import}. It takes as an argument the vendor branch to import to. The default is @samp{-b 1.1.1}. +Vendor branches can only be in the format 1.1.x where +@samp{x} is an @emph{uneven} number, because branch +tags use even numbers. + For example, suppose that there are two teams, the red team and the blue team, that are sending you sources. You want to import the red team's efforts to branch @@ -8130,6 +8159,7 @@ * rdiff:: 'patch' format diffs between releases * release:: Indicate that a directory is no longer in use * server & pserver:: Act as a server for a client on stdin/stdout +* suck:: Download RCS ,v file raw * update:: Bring work tree in sync with repository @end menu @@ -8375,6 +8405,31 @@ @samp{-N} in the @file{~/.cvsrc} entry for @samp{log}, you may need to use @samp{-f} to show the tag names. +@item -g +Forges group-writable permissions on files in the working copy. +This option is typically used when you have multiple users sharing +a single checked out source tree, allowing them to operate their +shells with a less dangerous umask at the expense of @sc{cvs} security. +To use this feature, create a directory to hold the checked-out +source tree, set it to a private group, and set up the directory +such that files created under it inherit the gid of the directory. +On BSD systems, this occurs automatically. On SYSV systems and +GNU/Linux, the sgid bit must be set on the directory for this. +The users who are to share the checked out tree must be placed in +that group which owns the directory. + +Note that the sharing of a single checked-out source tree is very +different from giving several users access to a common @sc{cvs} repository. +Access to a common @sc{cvs} repository already maintains shared group-write +permissions and does not require this option. + +Due to the security implications, setting this option globally in +your @file{.cvsrc} file is strongly discouraged; if you must, ensure +all source checkouts are "firewalled" within a private group or a +private mode 0700 directory. + +This option is a MidnightBSD extension merged into MirBSD @sc{cvs}. + @item -H @itemx --help Display usage information about the specified @samp{cvs_command} @@ -8498,7 +8553,7 @@ which are listed with the individual commands, may have different behavior from one @sc{cvs} command to the other). -@strong{Note: the @samp{history} command is an exception; it supports +@emph{Note: the @samp{history} command is an exception; it supports many options that conflict even with these standard options.} @table @code @@ -8523,7 +8578,7 @@ slightly different way; @pxref{history options}). For a complete description of the date formats accepted by @sc{cvs}, -@ref{Date input formats}. +@pxref{Date input formats}. @c What other formats should we accept? I don't want @c to start accepting a whole mess of non-standard @c new formats (there are a lot which are in wide use in @@ -8610,7 +8665,7 @@ @code{annotate}, @code{checkout}, @code{export}, @code{rdiff}, @code{rtag}, and @code{update}. -@strong{WARNING: The @code{commit} and @code{remove} +@emph{WARNING: The @code{commit} and @code{remove} commands also have a @samp{-f} option, but it has a different behavior for those commands. See @ref{commit options}, and @@ -8631,7 +8686,7 @@ @code{checkout}, @code{diff}, @code{export}, @code{import}, @code{rdiff}, and @code{update} commands. -@strong{WARNING: Prior to CVS version 1.12.2, the @samp{-k} flag +@emph{WARNING: Prior to CVS version 1.12.2, the @samp{-k} flag overrode the @samp{-kb} indication for a binary file. This could sometimes corrupt binary files. @xref{Merging and keywords}, for more.} @@ -8660,7 +8715,7 @@ specified to run in the modules database (@pxref{modules}); this option bypasses it). -@strong{Note: this is not the same as the @samp{cvs -n} +@emph{Note: this is not the same as the @samp{cvs -n} program option, which you can specify to the left of a cvs command!} Available with the @code{checkout}, @code{commit}, @code{export}, @@ -8688,14 +8743,21 @@ @item -r @var{tag}[:@var{date}] @cindex HEAD, special tag @cindex BASE, special tag +@cindex BASE, special date Use the revision specified by the @var{tag} argument (and the @var{date} argument for the commands which accept it) instead of the default @dfn{head} revision. As well as arbitrary tags defined with the @code{tag} or @code{rtag} command, two special tags are always available: @samp{HEAD} refers to the most recent version -available in the repository, and @samp{BASE} refers to the +available in the repository (also known as the tip of the @samp{MAIN} +branch, also known as trunk; the name of a branch refers to its tip; +this version of @sc{cvs} introduces @samp{.bhead}, but only for the +@sc{diff} command, for the same), and @samp{BASE} refers to the revision you last checked out into the current working directory. +@c fixed: HEAD is changed now; .bhead is the name of the branch, +@c but added for cases where it is unknown. +@c --mirabilos @c FIXME: What does HEAD really mean? I believe that @c the current answer is the head of the default branch @c for all cvs commands except diff. For diff, it @@ -8735,12 +8797,19 @@ the name of a branch is interpreted as the most recent revision on that branch. +As a MirOS @sc{cvs} extension, specifying @samp{BASE} as the @var{date} +portion of the argument yields the @emph{base revision} of the branch +specified by the @var{tag} portion of the argument, i.e. the revision +on the parent branch the @var{tag} branch split off, or, where both +branches were the same. +This option has not received very much testing, beware! + Specifying the @samp{-q} global option along with the @samp{-r} command option is often useful, to suppress the warning messages when the @sc{rcs} file does not contain the specified tag. -@strong{Note: this is not the same as the overall @samp{cvs -r} option, +@emph{Note: this is not the same as the overall @samp{cvs -r} option, which you can specify to the left of a @sc{cvs} command!} @samp{-r @var{tag}} is available with the @code{commit} and @code{history} @@ -9144,7 +9213,10 @@ For each file in @var{files}, print the head revision of the trunk, together with information on the last -modification for each line. +modification for each line. If backwards annotation +is requested, show the first modification after the +specified revision. (Backwards annotation currently +appears to be broken.) @menu * annotate options:: annotate options @@ -9160,6 +9232,10 @@ them): @table @code +@item -b +Backwards, show when a line was removed. +Currently appears to be broken. + @item -l Local directory only, no recursion. @@ -9501,8 +9577,12 @@ At @code{commit}, a unique commitid is placed in the @sc{rcs} file inside the repository. All files committed at once -get the same commitid. The commitid can be retrieved with -the @code{log} and @code{status} command; see @ref{log}, +get the same commitid, a string consisting only of hexadecimal +digits (usually 16 in GNU @sc{cvs}, 19 in MirBSD and MirDebian GNU @sc{cvs}). +FSF GNU @sc{cvs} 1.11, MirOS GNU @sc{cvs} 1.11, and OpenBSD OpenCVS do not +support commitids yet. +The commitid can be retrieved with +the @code{log} and @code{status} command; see @ref{log} and @ref{File status}. @menu @@ -9685,7 +9765,7 @@ under them will be compared. The exit status for diff is different than for other -@sc{cvs} commands; for details @ref{Exit status}. +@sc{cvs} commands; for details @pxref{Exit status}. @menu * diff options:: diff options @@ -10425,7 +10505,7 @@ (@file{$CVSROOT/CVSROOT/history}) with read and write permissions for all users (@pxref{Creating a repository}). -@strong{Note: @code{history} uses @samp{-f}, @samp{-l}, +@emph{Note: @code{history} uses @samp{-f}, @samp{-l}, @samp{-n}, and @samp{-p} in ways that conflict with the normal use inside @sc{cvs} (@pxref{Common options}).} @@ -10805,7 +10885,7 @@ the @code{$TZ} environment variable, which can be set to govern how @code{log} displays dates. -@strong{Note: @code{log} uses @samp{-R} in a way that conflicts +@emph{Note: @code{log} uses @samp{-R} in a way that conflicts with the normal use inside @sc{cvs} (@pxref{Common options}).} @menu @@ -11173,6 +11253,9 @@ @item -c Use the context diff format. This is the default format. +@item -p +Show which C function each change is in. + @item -s Create a summary change report instead of a patch. The summary includes information about files that were @@ -11282,7 +11365,7 @@ succeeds. If this flag is not given your files will remain in your working directory. -@strong{WARNING: The @code{release} command deletes +@emph{WARNING: The @code{release} command deletes all directories and files recursively. This has the very serious side-effect that any directory that you have created inside your checked-out sources, @@ -11386,6 +11469,25 @@ @end table @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +@node suck +@appendixsec suck---Download RCS ,v file raw +@cindex suck (subcommand) + +@itemize @bullet +@item +suck module/path +@item +Requires: repository +@end itemize + +Locates the file module/path,v or module/pa/Attic/th,v and downloads +it raw as RCS comma-v file. + +Output consists of the real pathname of the comma-v file, relative to +the CVS repository, followed by a newline and the binary file content +immediately thereafter. + +@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @node update @appendixsec update---Bring work tree in sync with repository @cindex update (subcommand) @@ -11669,6 +11771,10 @@ Do not read the @file{~/.cvsrc} file. See @ref{Global options}. +@item -g +Set the umask to allow group writable permissions in +the working copy. See @ref{Global options}. + @item -H @itemx --help Print a help message. See @ref{Global options}. @@ -11730,6 +11836,7 @@ @example $@splitrcskeyword{Author}: joe $ $@splitrcskeyword{Date}: 1993/12/09 03:21:13 $ +$@splitrcskeyword{Mdocdate}: December 9 1993 $ $@splitrcskeyword{CVSHeader}: files/file1,v 1.1 1993/12/09 03:21:13 joe Exp harry $ $@splitrcskeyword{Header}: /home/files/file1,v 1.1 1993/12/09 03:21:13 joe Exp harry $ $@splitrcskeyword{Id}: file1,v 1.1 1993/12/09 03:21:13 joe Exp harry $ @@ -11877,7 +11984,8 @@ @item -j @var{tag}[:@var{date}] Merge in the change specified by @var{tag}, or when @var{date} is specified and @var{tag} is a branch tag, the version from the branch @var{tag} as it -existed on @var{date}. See @ref{checkout options}. +existed on @var{date}. See @ref{checkout options}. Also, +see @ref{Common options}. @item -k @var{kflag} Use @var{kflag} keyword expansion. See @@ -11907,7 +12015,7 @@ @item -r @var{tag}[:@var{date}] Checkout the revision already tagged with @var{tag} or, when @var{date} is specified and @var{tag} is a branch tag, the version from the branch @var{tag} -as it existed on @var{date}. This . See @ref{Common options}. +as it existed on @var{date}. See @ref{Common options}. @item -s Like -c, but include module status. See @ref{checkout options}. @@ -12003,7 +12111,7 @@ @ref{Editing files}. @item -c -Check edits: Edit fails if someone else is already editting the file. +Check edits: Edit fails if someone else is already editing the file. Requires a @sc{cvs} client and server both of version 1.12.10 or greater. @item -f @@ -12711,7 +12819,7 @@ @item @var{mname} [ options ] @var{dir} [ @var{files}@dots{} ] In the simplest case, this form of module definition reduces to @samp{@var{mname} @var{dir}}. This defines -all the files in directory @var{dir} as module mname. +all the files in directory @var{dir} as module @var{mname}. @var{dir} is a relative path (from @code{$CVSROOT}) to a directory of source in the source repository. In this case, on checkout, a single directory called @@ -12975,7 +13083,7 @@ mechanisms outside @sc{cvs}, to insert any necessary changes. -@strong{WARNING: do not use @code{COPY} with +@emph{WARNING: do not use @code{COPY} with @sc{cvs} 1.9 or earlier - such versions of @sc{cvs} will copy one version of your file over the other, wiping out the previous contents.} @@ -13779,14 +13887,11 @@ @file{loginfo} supports: @table @t -@item @{stVv@} +@item @{sVv@} File attributes, where: @table @t @item s file name -@item T -tag name of destination, or the empty string when there is no associated -tag name (this usually means the trunk) @item V old version number (pre-checkin) @item v @@ -13795,7 +13900,7 @@ @end table For example, some valid format strings are @samp{%%}, -@samp{%s}, @samp{%@{s@}}, and @samp{%@{stVv@}}. +@samp{%s}, @samp{%@{s@}}, and @samp{%@{sVv@}}. @cindex loginfo (admin file), updating legacy repositories @cindex compatibility notes, loginfo admin file @@ -14442,6 +14547,7 @@ random string of printable characters of at least 16 characters length. Users should assume that it may someday grow to at most 256 characters in length. +Currently, MirBSD/MirDebian/MirPorts GNU @sc{cvs} uses 19 characters. @end table If you want to pass a value to the administrative files @@ -14613,7 +14719,7 @@ @cindex KeywordExpand, in CVSROOT/config @item KeywordExpand=@var{value} Specify @samp{i} followed by a list of keywords to be expanded -(for example, @samp{KeywordExpand=iMYCVS,Name,Date}), +(for example, @samp{KeywordExpand=iMYCVS,Name,Date,Mdocdate}), or @samp{e} followed by a list of keywords not to be expanded (for example, @samp{KeywordExpand=eCVSHeader}). For more on keyword expansion, see @ref{Configuring keyword expansion}. @@ -14747,7 +14853,7 @@ @samp{stat()} function to see if it has changed (see warning below) before rereading. The default value is @samp{always}. -@strong{Note: the `stat' mode can cause CVS to pause for up to +@emph{Note: the `stat' mode can cause CVS to pause for up to one extra second per directory committed. This can be less IO and CPU intensive but is not recommended for use with large repositories} @@ -15614,21 +15720,21 @@ access method you are using. @table @code -@cindex :ext:, troubleshooting +@cindex ext method, troubleshooting @item :ext: Try running the rsh program from the command line. For example: "rsh servername cvs -v" should print @sc{cvs} version information. If this doesn't work, you need to fix it before you can worry about @sc{cvs} problems. -@cindex :server:, troubleshooting +@cindex server method, troubleshooting @item :server: You don't need a command line rsh program to use this access method, but if you have an rsh program around, it may be useful as a debugging tool. Follow the directions given for :ext:. -@cindex :pserver:, troubleshooting +@cindex pserver method, troubleshooting @item :pserver: Errors along the lines of "connection refused" typically indicate that inetd isn't even listening for connections on port 2401 @@ -15806,6 +15912,16 @@ the file @file{doc/ChangeLog} in the @sc{cvs} source distribution. +The MirOS Project uses @sc{cvs} heavily in MirOS BSD and the +MirPorts Framework and has enhanced it as well as packaged it +for the MirDebian "WTF" repository. Responsible: + +@display +Thorsten Glaser <@t{tg@@mirbsd.org}> +@end display + +CVS Homepage: @url{http://www.nongnu.org/cvs/} + @c --------------------------------------------------------------------- @node BUGS @appendix Dealing with bugs in CVS or this manual --- cvs-1.12.13+real.orig/doc/getdate.texi +++ cvs-1.12.13+real/doc/getdate.texi @@ -3,12 +3,17 @@ @c Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @c 2003, 2004, 2005 Free Software Foundation, Inc. -@c Permission is granted to copy, distribute and/or modify this document -@c under the terms of the GNU Free Documentation License, Version 1.1 or -@c any later version published by the Free Software Foundation; with no -@c Invariant Sections, with no Front-Cover Texts, and with no Back-Cover -@c Texts. A copy of the license is included in the ``GNU Free -@c Documentation License'' file as part of this distribution. +@comment This file is part of the CVS distribution. + +@comment CVS is free software; you can redistribute it and/or modify +@comment it under the terms of the GNU General Public License as published by +@comment the Free Software Foundation; either version 2, or (at your option) +@comment any later version. + +@comment CVS is distributed in the hope that it will be useful, +@comment but WITHOUT ANY WARRANTY; without even the implied warranty of +@comment MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +@comment GNU General Public License for more details. @node Date input formats @chapter Date input formats @@ -55,8 +60,7 @@ * Day of week items:: Monday and others. * Relative items in date strings:: next tuesday, 2 years ago. * Pure numbers in date strings:: 19931219, 1440. -* Seconds since the Epoch:: @@1078100502. -* Specifying time zone rules:: TZ="America/New_York", TZ="UTC0". +* Seconds since the Epoch:: @@1101064456 * Authors of get_date:: Bellovin, Eggert, Salz, Berets, et al. @end menu @@ -75,7 +79,7 @@ @itemize @bullet @item calendar date items -@item time of day items +@item time of the day items @item time zone items @item day of the week items @item relative items @@ -113,8 +117,7 @@ @cindex language, in dates @cindex time zone item -The output of the @command{date} command -is not always acceptable as a date string, +The output of @command{date} is not always acceptable as a date string, not only because of the language problem, but also because there is no standard meaning for time zone items like @samp{IST}. When using @command{date} to generate a date string intended to be parsed later, @@ -124,15 +127,21 @@ @example $ LC_ALL=C TZ=UTC0 date -Mon Mar 1 00:21:42 UTC 2004 -$ TZ=UTC0 date +'%Y-%m-%d %H:%M:%SZ' -2004-03-01 00:21:42Z +Fri Dec 15 19:48:05 UTC 2000 +$ TZ=UTC0 date +"%Y-%m-%d %H:%M:%SZ" +2000-12-15 19:48:05Z +$ date --iso-8601=seconds # a GNU extension +2000-12-15T11:48:05-0800 +$ date --iso-8601=ns # a GNU extension +2004-02-29T16:21:42,692722128-0800 $ date --iso-8601=ns | tr T ' ' # --iso-8601 is a GNU extension. 2004-02-29 16:21:42,692722128-0800 $ date --rfc-2822 # a GNU extension -Sun, 29 Feb 2004 16:21:42 -0800 -$ date +'%Y-%m-%d %H:%M:%S %z' # %z is a GNU extension. -2004-02-29 16:21:42 -0800 +Fri, 15 Dec 2000 11:48:05 -0800 +$ date +"%Y-%m-%d %H:%M:%S %z" # %z is a GNU extension. +2000-12-15 11:48:05 -0800 +$ date +'@@%s' # %s is a MirOS extension. +@@1101064210 $ date +'@@%s.%N' # %s and %N are GNU extensions. @@1078100502.692722128 @end example @@ -231,14 +240,13 @@ 20:02-0500 # In @sc{est} (U.S. Eastern Standard Time). @end example -More generally, the time of day may be given as +More generally, the time of the day may be given as @samp{@var{hour}:@var{minute}:@var{second}}, where @var{hour} is a number between 0 and 23, @var{minute} is a number between 0 and -59, and @var{second} is a number between 0 and 59 possibly followed by -@samp{.} or @samp{,} and a fraction containing one or more digits. -Alternatively, -@samp{:@var{second}} can be omitted, in which case it is taken to -be zero. +59, and @var{second} is a number between 0 and 59, with an optional +fraction separated by @samp{.} or @samp{,} consisting of digits. +Alternatively, @samp{:@var{second}} can be omitted, in which case +it is taken to be zero. @findex am @r{in date strings} @findex pm @r{in date strings} @@ -299,8 +307,7 @@ described in the previous section. If neither a time zone item nor a time zone correction is supplied, -time stamps are interpreted using the rules of the default time zone -(@pxref{Specifying time zone rules}). +time stamps are interpreted using the rules of the default time zone. @node Day of week items @@ -389,7 +396,7 @@ date strings like @samp{this thursday}. When a relative item causes the resulting date to cross a boundary -where the clocks were adjusted, typically for daylight saving time, +where the clocks were adjusted, typically for daylight-saving time, the resulting date and time are adjusted accordingly. The fuzz in units can cause problems with relative items. For @@ -401,7 +408,7 @@ @example $ date -R Thu, 31 Jul 2003 13:02:39 -0700 -$ date --date='-1 month' +'Last month was %B?' +$ date --date="-1 month" +'Last month was %B?' Last month was July? $ date --date="$(date +%Y-%m-15) -1 month" +'Last month was %B!' Last month was June! @@ -430,7 +437,7 @@ If the decimal number is of the form @var{hh}@var{mm} and no other time of day item appears before it in the date string, then @var{hh} is read as the hour of the day and @var{mm} as the minute of the hour, for the -specified time of day. @var{mm} can also be omitted. +specified time of the day. @var{mm} can also be omitted. If both a calendar date and a time of day appear to the left of a number in the date string, but no relative item, then the number overrides the @@ -440,86 +447,49 @@ @node Seconds since the Epoch @section Seconds since the Epoch -If you precede a number with @samp{@@}, it represents an internal time -stamp as a count of seconds. The number can contain an internal -decimal point (either @samp{.} or @samp{,}); any excess precision not -supported by the internal representation is truncated toward minus -infinity. Such a number cannot be combined with any other date -item, as it specifies a complete time stamp. +If you give a string consisting of @samp{@@} followed by a decimal +number, it is parsed as an internal time stamp, @sc{utc} for +@acronym{POSIX} compliant systems, @sc{tai} for systems which keep +time correctly, and directly mapped to a kernel time. The implementation +handles an optional fraction separated by @samp{.} or @samp{,} and +truncates to a supported internal precision, rounding towards the +negative infinity. Since the kernel time stamp represents complete +date and time information, it cannot be combined with any other +format given. @cindex beginning of time, for @acronym{POSIX} @cindex epoch, for @acronym{POSIX} -Internally, computer times are represented as a count of seconds since -an epoch---a well-defined point of time. On @acronym{GNU} and -@acronym{POSIX} systems, the epoch is 1970-01-01 00:00:00 @sc{utc}, so -@samp{@@0} represents this time, @samp{@@1} represents 1970-01-01 -00:00:01 @sc{utc}, and so forth. @acronym{GNU} and most other -@acronym{POSIX}-compliant systems support such times as an extension -to @acronym{POSIX}, using negative counts, so that @samp{@@-1} -represents 1969-12-31 23:59:59 @sc{utc}. - -Traditional Unix systems count seconds with 32-bit two's-complement -integers and can represent times from 1901-12-13 20:45:52 through -2038-01-19 03:14:07 @sc{utc}. More modern systems use 64-bit counts -of seconds with nanosecond subcounts, and can represent all the times -in the known lifetime of the universe to a resolution of 1 nanosecond. - -On most systems, these counts ignore the presence of leap seconds. -For example, on most systems @samp{@@915148799} represents 1998-12-31 -23:59:59 @sc{utc}, @samp{@@915148800} represents 1999-01-01 00:00:00 -@sc{utc}, and there is no way to represent the intervening leap second -1998-12-31 23:59:60 @sc{utc}. - -@node Specifying time zone rules -@section Specifying time zone rules - -@vindex TZ -Normally, dates are interpreted using the rules of the current time -zone, which in turn are specified by the @env{TZ} environment -variable, or by a system default if @env{TZ} is not set. To specify a -different set of default time zone rules that apply just to one date, -start the date with a string of the form @samp{TZ="@var{rule}"}. The -two quote characters (@samp{"}) must be present in the date, and any -quotes or backslashes within @var{rule} must be escaped by a -backslash. - -For example, with the @acronym{GNU} @command{date} command you can -answer the question ``What time is it in New York when a Paris clock -shows 6:30am on October 31, 2004?'' by using a date beginning with -@samp{TZ="Europe/Paris"} as shown in the following shell transcript: +Although the date syntax here can represent any possible time since the +year zero, computer integers often cannot represent such a wide range of +time. On @acronym{POSIX} systems, the clock starts at 1970-01-01 00:00:00 +@sc{utc}: @acronym{POSIX} does not require support for times before the +@acronym{POSIX} Epoch and times far in the future. @acronym{GNU} and +traditional Unix systems have 32-bit signed @code{time_t} and can represent +times from 1901-12-13 20:45:52 through 2038-01-19 03:14:07 @sc{utc}, such +that @samp{@@0} represents the epoch, @samp{@@1} represents 1970-01-01 +00:00:01 @sc{utc}, and so forth, whereas @samp{@@-1}, not mandated by +@acronym{POSIX}, represents 1969-12-31 23:59:59 @sc{utc}. Systems with +64-bit signed @code{time_t} can represent all the times in the known +lifetime of the universe. Modern @acronym{UNIX} systems also can give +precise timecounters in the nanosecond or even attosecond range with +a resolution often only a small multiply, like 10000, of the CPU +frequency (on fast machines). + +@acronym{POSIX} conformant systems do not count leap seconds, and their +kernel time is a seconds-since-epoch representation of @sc{utc} (which +is a calendar time); the MirOS family of operating systems keeps time +as seconds since the epoch, @sc{tai}, correctly counting leap seconds +and providing conversion functions. Most MirOS ports have already +switched to a 64-bit signed @code{time_t}, some are using a +@sc{djb}-compatible @code{tai_t} internally. The rest of this +document has not been throughoutly checked for @sc{utc} vs @sc{tai} +correctness. For @acronym{POSIX}ly broken systems, @samp{@@915148799} +represents 1998-12-31 23:59:59 @sc{utc}, @samp{@@915148800} represents +1999-01-01 00:00:00 @sc{utc}, and there is no way to represent the +intervening leap second 1998-12-31 23:59:60 @sc{utc}. Also, calculation +of time deltas is wrong, such as the age of the MirOS founder is already +off by more than 10 seconds in 2000. -@example -$ export TZ="America/New_York" -$ date --date='TZ="Europe/Paris" 2004-10-31 06:30' -Sun Oct 31 01:30:00 EDT 2004 -@end example - -In this example, the @option{--date} operand begins with its own -@env{TZ} setting, so the rest of that operand is processed according -to @samp{Europe/Paris} rules, treating the string @samp{2004-10-31 -06:30} as if it were in Paris. However, since the output of the -@command{date} command is processed according to the overall time zone -rules, it uses New York time. (Paris was normally six hours ahead of -New York in 2004, but this example refers to a brief Halloween period -when the gap was five hours.) - -A @env{TZ} value is a rule that typically names a location in the -@uref{http://www.twinsun.com/tz/tz-link.htm, @samp{tz} database}. -A recent catalog of location names appears in the -@uref{http://twiki.org/cgi-bin/xtra/tzdate, TWiki Date and Time -Gateway}. A few non-@acronym{GNU} hosts require a colon before a -location name in a @env{TZ} setting, e.g., -@samp{TZ=":America/New_York"}. - -The @samp{tz} database includes a wide variety of locations ranging -from @samp{Arctic/Longyearbyen} to @samp{Antarctica/South_Pole}, but -if you are at sea and have your own private time zone, or if you are -using a non-@acronym{GNU} host that does not support the @samp{tz} -database, you may need to use a @acronym{POSIX} rule instead. Simple -@acronym{POSIX} rules like @samp{UTC0} specify a time zone without -daylight saving time; other rules can specify simple daylight saving -regimes. @xref{TZ Variable,, Specifying the Time Zone with @code{TZ}, -libc, The GNU C Library}. @node Authors of get_date @section Authors of @code{get_date} @@ -545,3 +515,11 @@ This chapter was originally produced by Fran@,{c}ois Pinard (@email{pinard@@iro.umontreal.ca}) from the @file{getdate.y} source code, and then edited by K.@: Berry (@email{kb@@cs.umb.edu}). + +The version of this chapter you are reading comes with CVS 1.12 and +the MirOS family of operating systems; it is based upon an older +version of the @acronym{GNU} coreutils manual which is not yet +restricted by the licencing conditions of the GNU Free Documentation +License, but more freely redistributable. Appropriate changes for +the in-tree @code{get_date} version of CVS have been applied. +The MirOS version is maintained by Thorsten Glaser @email{tg@@mirbsd.de}. --- cvs-1.12.13+real.orig/doc/mkman.pl +++ cvs-1.12.13+real/doc/mkman.pl @@ -62,7 +62,7 @@ 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"; + die "no handler for keyword '$keyword', found at line $. of file '$file'\n"; } @@ -72,8 +72,12 @@ { my ($file, $parent, $keyword, $content) = @_; - return "see node \`$content\\(aq in the CVS manual" - if $keyword =~ /^(p?x)?ref$/; + return "node \\(aq$content\\(aq in the CVS manual" + if $keyword =~ /^ref$/; + return "See node \\(aq$content\\(aq in the CVS manual" + if $keyword =~ /^xref$/; + return "see node \\(aq$content\\(aq in the CVS manual" + if $keyword =~ /^pxref$/; return "\\fP\\fP$content" if $keyword =~ /^splitrcskeyword$/; @@ -91,11 +95,11 @@ for my $file (@ARGV) { my $fh = new IO::File "< $file" - or die "Failed to open file \`$file': $!"; + or die "Failed to open file '$file': $!"; if ($file !~ /\.(texinfo|texi|txi)$/) { - print stderr "Passing \`$file' through unprocessed.\n"; + print stderr "Passing '$file' through unprocessed.\n"; # Just cat any file that doesn't look like a Texinfo source. while (my $line = $fh->getline) { @@ -104,7 +108,7 @@ next; } - print stderr "Processing \`$file'.\n"; + print stderr "Processing '$file'.\n"; $texi_num++; my $gotone = 0; my $inblank = 0; @@ -143,6 +147,9 @@ s/\@bullet({}|\b)/\\(bu/g; s/\@dots({}|\b)/\\&.../g; + # Hack for GNU groff with nroff -Tutf8 + s/-/\\-/g; + # Examples should be indented and otherwise untouched if (/^\@example$/) { @@ -356,7 +363,7 @@ s/\@([{}])/$1/g; # Verify we haven't left commands unprocessed. - die "Unprocessed command at line $. of file \`$file': " + die "Unprocessed command at line $. of file '$file': " . ($1 ? "$1\n" : "\n") if /^(?>(?:[^\@]|\@\@)*)\@(\w+|.|$)/; --- cvs-1.12.13+real.orig/doc/cvs.man.header +++ cvs-1.12.13+real/doc/cvs.man.header @@ -23,7 +23,9 @@ .ds Rv \\$3 .ds Dt \\$4 .. -.TH CVS 1 "\*(Dt" +.de IX +.. +.TH CVS 1 .\" Full space in nroff; half space in troff .de SP .if n .sp @@ -55,6 +57,7 @@ \fBcvs\fP. It is auto-generated from an appendix of the CVS manual. For more in-depth documentation, please consult the Cederqvist manual (via the +cvs(GNU) link in the MirBSD online (HTML) manual pages, the .B info CVS command or otherwise, as described in the SEE ALSO section of this manpage). Cross-references --- cvs-1.12.13+real.orig/doc/cvsclient.texi +++ cvs-1.12.13+real/doc/cvsclient.texi @@ -1,6 +1,7 @@ \input texinfo @c -*- texinfo -*- @setfilename cvsclient.info +@afourpaper @include version-client.texi @dircategory Programming @@ -53,7 +54,7 @@ user documentation, @file{cvs.texinfo}, for that information. The protocol is non-proprietary (anyone who wants to is encouraged to implement it) and an implementation, known as CVS, is available under -the GNU Public License. The CVS distribution, containing this +the GNU General Public License. The CVS distribution, containing this implementation, @file{cvs.texinfo}, and a copy (possibly more or less up to date than what you are reading now) of this document, @file{cvsclient.texi}, can be found at the usual GNU FTP sites, with a @@ -1268,7 +1269,7 @@ C: Directory . C: 1dir C: add -S: M Directory /u/cvsroot/1dir/nsdir added to the repository +S: M Directory /u/cvsroot/1dir/nsdir put under version control S: ok @end example @@ -1412,6 +1413,12 @@ Request that the server transmit its version message. The @code{Root} request need not have been previously sent. +@item suck \n +Response expected: yes. +Actually do a cvs command. This uses a previous @code{Argument} +request (only one, because the cvs command takes only one). +This is a MirBSD/MirPorts and Debian specific extension. + @item @var{other-request} @var{text} \n Response expected: yes. Any unrecognized request expects a response, and does not --- cvs-1.12.13+real.orig/doc/Makefile.in +++ cvs-1.12.13+real/doc/Makefile.in @@ -185,6 +185,7 @@ GETOPT_H = @GETOPT_H@ GLOB_H = @GLOB_H@ GMSGFMT = @GMSGFMT@ +GREP = @GREP@ HAVE_LONG_64BIT = @HAVE_LONG_64BIT@ HAVE_LONG_LONG_64BIT = @HAVE_LONG_LONG_64BIT@ HAVE__BOOL = @HAVE__BOOL@ @@ -222,6 +223,7 @@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ @@ -247,8 +249,6 @@ ZLIB_LIBS = @ZLIB_LIBS@ ZLIB_SUBDIRS = @ZLIB_SUBDIRS@ ac_ct_CC = @ac_ct_CC@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ ac_prefix_program = @ac_prefix_program@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ @@ -265,23 +265,30 @@ build_vendor = @build_vendor@ cvs_client_objects = @cvs_client_objects@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ @@ -524,10 +531,13 @@ $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \ esac; \ if test -f $$base; then d=.; else d=$(srcdir); fi; \ - for file in $$d/$$base*; do \ - relfile=`expr "$$file" : "$$d/\(.*\)"`; \ - test -f $(distdir)/$$relfile || \ - cp -p $$file $(distdir)/$$relfile; \ + base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \ + for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \ + if test -f $$file; then \ + relfile=`expr "$$file" : "$$d/\(.*\)"`; \ + test -f $(distdir)/$$relfile || \ + cp -p $$file $(distdir)/$$relfile; \ + else :; fi; \ done; \ done --- cvs-1.12.13+real.orig/doc/i18n/Makefile.in +++ cvs-1.12.13+real/doc/i18n/Makefile.in @@ -163,6 +163,7 @@ GETOPT_H = @GETOPT_H@ GLOB_H = @GLOB_H@ GMSGFMT = @GMSGFMT@ +GREP = @GREP@ HAVE_LONG_64BIT = @HAVE_LONG_64BIT@ HAVE_LONG_LONG_64BIT = @HAVE_LONG_LONG_64BIT@ HAVE__BOOL = @HAVE__BOOL@ @@ -200,6 +201,7 @@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ @@ -225,8 +227,6 @@ ZLIB_LIBS = @ZLIB_LIBS@ ZLIB_SUBDIRS = @ZLIB_SUBDIRS@ ac_ct_CC = @ac_ct_CC@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ ac_prefix_program = @ac_prefix_program@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ @@ -243,23 +243,30 @@ build_vendor = @build_vendor@ cvs_client_objects = @cvs_client_objects@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ --- cvs-1.12.13+real.orig/doc/i18n/pt_BR/Makefile.in +++ cvs-1.12.13+real/doc/i18n/pt_BR/Makefile.in @@ -154,6 +154,7 @@ GETOPT_H = @GETOPT_H@ GLOB_H = @GLOB_H@ GMSGFMT = @GMSGFMT@ +GREP = @GREP@ HAVE_LONG_64BIT = @HAVE_LONG_64BIT@ HAVE_LONG_LONG_64BIT = @HAVE_LONG_LONG_64BIT@ HAVE__BOOL = @HAVE__BOOL@ @@ -191,6 +192,7 @@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ @@ -216,8 +218,6 @@ ZLIB_LIBS = @ZLIB_LIBS@ ZLIB_SUBDIRS = @ZLIB_SUBDIRS@ ac_ct_CC = @ac_ct_CC@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ ac_prefix_program = @ac_prefix_program@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ @@ -234,23 +234,30 @@ build_vendor = @build_vendor@ cvs_client_objects = @cvs_client_objects@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ --- cvs-1.12.13+real.orig/man/cvs.5 +++ cvs-1.12.13+real/man/cvs.5 @@ -238,9 +238,9 @@ .B add for `tag', .B mov -for `tag -F', and +for `tag \-F', and .B del -for `tag -d`), +for `tag \-d`), .I repository , and any remaining are pairs of .B "filename revision" . --- cvs-1.12.13+real.orig/man/Makefile.in +++ cvs-1.12.13+real/man/Makefile.in @@ -164,6 +164,7 @@ GETOPT_H = @GETOPT_H@ GLOB_H = @GLOB_H@ GMSGFMT = @GMSGFMT@ +GREP = @GREP@ HAVE_LONG_64BIT = @HAVE_LONG_64BIT@ HAVE_LONG_LONG_64BIT = @HAVE_LONG_LONG_64BIT@ HAVE__BOOL = @HAVE__BOOL@ @@ -201,6 +202,7 @@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ @@ -226,8 +228,6 @@ ZLIB_LIBS = @ZLIB_LIBS@ ZLIB_SUBDIRS = @ZLIB_SUBDIRS@ ac_ct_CC = @ac_ct_CC@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ ac_prefix_program = @ac_prefix_program@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ @@ -244,23 +244,30 @@ build_vendor = @build_vendor@ cvs_client_objects = @cvs_client_objects@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ --- cvs-1.12.13+real.orig/maint-aux/Makefile.in +++ cvs-1.12.13+real/maint-aux/Makefile.in @@ -157,6 +157,7 @@ GETOPT_H = @GETOPT_H@ GLOB_H = @GLOB_H@ GMSGFMT = @GMSGFMT@ +GREP = @GREP@ HAVE_LONG_64BIT = @HAVE_LONG_64BIT@ HAVE_LONG_LONG_64BIT = @HAVE_LONG_LONG_64BIT@ HAVE__BOOL = @HAVE__BOOL@ @@ -194,6 +195,7 @@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ @@ -219,8 +221,6 @@ ZLIB_LIBS = @ZLIB_LIBS@ ZLIB_SUBDIRS = @ZLIB_SUBDIRS@ ac_ct_CC = @ac_ct_CC@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ ac_prefix_program = @ac_prefix_program@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ @@ -237,23 +237,30 @@ build_vendor = @build_vendor@ cvs_client_objects = @cvs_client_objects@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ --- cvs-1.12.13+real.orig/tools/Makefile.in +++ cvs-1.12.13+real/tools/Makefile.in @@ -160,6 +160,7 @@ GETOPT_H = @GETOPT_H@ GLOB_H = @GLOB_H@ GMSGFMT = @GMSGFMT@ +GREP = @GREP@ HAVE_LONG_64BIT = @HAVE_LONG_64BIT@ HAVE_LONG_LONG_64BIT = @HAVE_LONG_LONG_64BIT@ HAVE__BOOL = @HAVE__BOOL@ @@ -197,6 +198,7 @@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ @@ -222,8 +224,6 @@ ZLIB_LIBS = @ZLIB_LIBS@ ZLIB_SUBDIRS = @ZLIB_SUBDIRS@ ac_ct_CC = @ac_ct_CC@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ ac_prefix_program = @ac_prefix_program@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ @@ -240,23 +240,30 @@ build_vendor = @build_vendor@ cvs_client_objects = @cvs_client_objects@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ --- cvs-1.12.13+real.orig/diff/util.c +++ cvs-1.12.13+real/diff/util.c @@ -235,7 +235,7 @@ close (pipes[0]); } - execl (PR_PROGRAM, PR_PROGRAM, "-f", "-h", name, 0); + execl (PR_PROGRAM, PR_PROGRAM, "-f", "-h", name, NULL); pfatal_with_name (PR_PROGRAM); } else --- cvs-1.12.13+real.orig/diff/ifdef.c +++ cvs-1.12.13+real/diff/ifdef.c @@ -189,7 +189,7 @@ default: { - int value; + int value = 0; char *speclim; f = scan_printf_spec (spec); @@ -322,7 +322,7 @@ default: { - int value; + int value = 0; char *speclim; f = scan_printf_spec (spec); --- cvs-1.12.13+real.orig/diff/analyze.c +++ cvs-1.12.13+real/diff/analyze.c @@ -358,7 +358,7 @@ else { int c; - struct partition part; + struct partition part = { 0, 0, 0, 0 }; /* Find a point of correspondence in the middle of the files. */ --- cvs-1.12.13+real.orig/diff/side.c +++ cvs-1.12.13+real/diff/side.c @@ -122,7 +122,7 @@ break; case '\b': - if (in_position != 0 && --in_position < out_bound) + if (in_position != 0 && --in_position < out_bound) { if (out_position <= in_position) /* Add spaces to make up for suppressed tab past out_bound. */ for (; out_position < in_position; out_position++) @@ -133,6 +133,7 @@ cc = c; write_output (&cc, 1); } + } break; case '\f': --- cvs-1.12.13+real.orig/diff/Makefile.in +++ cvs-1.12.13+real/diff/Makefile.in @@ -164,6 +164,7 @@ GETOPT_H = @GETOPT_H@ GLOB_H = @GLOB_H@ GMSGFMT = @GMSGFMT@ +GREP = @GREP@ HAVE_LONG_64BIT = @HAVE_LONG_64BIT@ HAVE_LONG_LONG_64BIT = @HAVE_LONG_LONG_64BIT@ HAVE__BOOL = @HAVE__BOOL@ @@ -201,6 +202,7 @@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ @@ -226,8 +228,6 @@ ZLIB_LIBS = @ZLIB_LIBS@ ZLIB_SUBDIRS = @ZLIB_SUBDIRS@ ac_ct_CC = @ac_ct_CC@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ ac_prefix_program = @ac_prefix_program@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ @@ -244,23 +244,30 @@ build_vendor = @build_vendor@ cvs_client_objects = @cvs_client_objects@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ --- cvs-1.12.13+real.orig/diff/diff3.c +++ cvs-1.12.13+real/diff/diff3.c @@ -1439,14 +1439,13 @@ int const mapping[3], rev_mapping[3]; { int i; - int oddoneout; + int oddoneout = 0; char *cp; struct diff3_block *ptr; int line; size_t length; - int dontprint; + int dontprint = 0; static int skew_increment[3] = { 2, 3, 1 }; /* 0==>2==>1==>3 */ - char const *line_prefix = tab_align_flag ? "\t" : " "; for (ptr = diff; ptr; ptr = D_NEXT (ptr)) { @@ -1503,7 +1502,7 @@ line = 0; do { - printf_output (line_prefix); + printf_output (tab_align_flag ? "\t" : " "); cp = D_RELNUM (ptr, realfile, line); length = D_RELLEN (ptr, realfile, line); write_output (cp, length); @@ -1555,11 +1554,12 @@ int leading_dot, start, num; { write_output (".\n", 2); - if (leading_dot) + if (leading_dot) { if (num == 1) printf_output ("%ds/^\\.//\n", start); else printf_output ("%d,%ds/^\\.//\n", start, start + num - 1); + } } /* @@ -1750,11 +1750,12 @@ do { c = getc (infile); - if (c == EOF) + if (c == EOF) { if (ferror (infile)) diff3_perror_with_exit ("input file"); else if (feof (infile)) diff3_fatal ("input file shrank"); + } cc = c; write_output (&cc, 1); } @@ -1804,7 +1805,7 @@ linesread += i; while (0 <= --i) while ((c = getc (infile)) != '\n') - if (c == EOF) + if (c == EOF) { if (ferror (infile)) diff3_perror_with_exit ("input file"); else if (feof (infile)) @@ -1813,6 +1814,7 @@ diff3_fatal ("input file shrank"); return conflicts_found; } + } } /* Copy rest of common file. */ while ((c = getc (infile)) != EOF || !(ferror (infile) | feof (infile)))