# This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # cvs # cvs/Makefile # cvs/distinfo # cvs/files # cvs/files/freebsd.diff # cvs/files/patch-configure # cvs/files/patch-contrib::Makefile.in # cvs/files/patch-contrib::easy-import.in # cvs/files/patch-doc::cvs.texinfo # cvs/files/patch-lib::md5.c # cvs/files/patch-lib::md5.h # cvs/files/patch-src::Makefile.in # cvs/files/patch-src::add.c # cvs/files/patch-src::commit.c # cvs/files/patch-src::create_adm.c # cvs/files/patch-src::cvs.h # cvs/files/patch-src::diff.c # cvs/files/patch-src::entries.c # cvs/files/patch-src::filesubr.c # cvs/files/patch-src::log.c # cvs/files/patch-src::logmsg.c # cvs/files/patch-src::main.c # cvs/files/patch-src::mkmodules.c # cvs/files/patch-src::parseinfo.c # cvs/files/patch-src::prepend_args.c # cvs/files/patch-src::prepend_args.h # cvs/files/patch-src::rcs.c # cvs/files/patch-src::rcs.h # cvs/files/patch-src::root.c # cvs/files/patch-src::sanity.sh # cvs/files/patch-src::server.c # cvs/files/patch-src::tag.c # cvs/files/patch-src::update.c # cvs/pkg-descr # cvs/pkg-plist # echo c - cvs mkdir -p cvs > /dev/null 2>&1 echo x - cvs/Makefile sed 's/^X//' >cvs/Makefile << 'END-of-cvs/Makefile' X# New ports collection makefile for: cvs X# Date created: 5 Sep 2004 X# Whom: Oliver Eikemeier X# X# $FreeBSD$ X# X XPORTNAME= cvs XPORTVERSION= 1.12.9 XCATEGORIES= devel XMASTER_SITES= http://musthave.sunbase.org/progs/ccvs/%SUBDIR%/ XMASTER_SITE_SUBDIR= ${DISTNAME} XDISTFILES= ${DISTNAME}${EXTRACT_SUFX} X XMAINTAINER= eik@FreeBSD.org XCOMMENT= CVS X XCONFLICTS= cvs+ipv6-1.* X XCEDERQVIST= cederqvist-${PORTVERSION}.html X XCFLAGS:= ${CFLAGS:N-O*} -O X X.if defined(CFLAGS) && !empty(CFLAGS:M-O[2-9]*) XBROKEN= "Doesn't build with ${CFLAGS:M-O[2-9]*}" X.endif X X.if !defined(NOPORTDOCS) XDISTFILES+= ${CEDERQVIST}${EXTRACT_SUFX} XPORTDOCS= cvs*.html X.endif X XUSE_BZIP2= yes XGNU_CONFIGURE= yes X XMAN1= cvs.1 XMAN5= cvs.5 XMAN8= cvsbug.8 XCONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} X XCONFIGURE_ARGS= --mandir=${MANPREFIX}/man \ X --infodir=${PREFIX}/${INFO_PATH} \ X --with-rsh=ssh \ X --with-editor=vi \ X --with-tmpdir=/tmp \ X --with-umask=002 \ X --with-cvs-admin-group=cvsadmin \ X --without-libiconv-prefix \ X --without-libintl-prefix \ X --without-included-regex \ X --with-external-zlib \ X --without-gssapi X XLIBS= -lgnuregex -lmd X XCONFIGURE_ENV= LIBS="${LIBS}" \ X PERL="${PERL}" X XMAKE_ENV= MAKEINFOFLAGS=--no-split X XPLIST_SUB= INFO_PATH=${INFO_PATH} X Xpre-everything:: X @${ECHO_MSG} "=======================================================================================" X @${ECHO_MSG} X @${ECHO_MSG} "Build ${PKGNAME} with PREFIX=/usr to replace cvs in the base" X @${ECHO_MSG} X @${ECHO_MSG} "=======================================================================================" X Xpost-extract: X @${RM} ${WRKSRC}/doc/cvs.info ${WRKSRC}/doc/cvsclient.info X Xpre-su-install: X.for sect in 1 5 8 X @manbase="${DESTDIR}${MAN${sect}PREFIX}/man/man${sect:L}"; \ X for man in ${MAN${sect}:S/$/${MANEXT}/}; do \ X if [ -f "$$manbase/$$man" ]; then \ X ${CP} -vp "$$manbase/$$man" \ X "$$manbase/.$$man.${PKGNAME}.backup"; \ X fi; \ X done X.endfor X @binbase="${DESTDIR}${PREFIX}/bin"; \ X for bin in cvs cvsbug; do \ X if [ -f "$$binbase/$$bin" ]; then \ X ${CP} -vp "$$binbase/$$bin" \ X "$$binbase/.$$bin.${PKGNAME}.backup"; \ X fi; \ X done X @examplebase="${DESTDIR}${EXAMPLESDIR}/contrib"; \ X for example in README clmerge cln_hist commit_prep cvs2vendor \ X cvs_acls debug_check_log easy-import intro.doc log \ X log_accum mfpipe newcvsroot pvcs2rcs rcs-to-cvs \ X rcs2log rcslock sandbox_status sccs2rcs validate_repo; \ X do \ X if [ -f "$$examplebase/$$example" ]; then \ X ${CP} -vp "$$examplebase/$$example" \ X "$$examplebase/.$$example.${PKGNAME}.backup"; \ X fi; \ X done X @infobase="${DESTDIR}${PREFIX}/${INFO_PATH}"; \ X for info in cvs.info.gz cvsclient.info.gz; do \ X if [ -f "$$infobase/$$info" ]; then \ X ${CP} -vp "$$infobase/$$info" \ X "$$infobase/.$$info.${PKGNAME}.backup"; \ X fi; \ X done X Xpost-install: X.if !defined(NOPORTDOCS) X @${MKDIR} ${DESTDIR}${DOCSDIR} X @${INSTALL_DATA} ${WRKDIR}/${CEDERQVIST}/cvs*.html ${DESTDIR}${DOCSDIR} X.endif X ${GZIP_CMD} ${PREFIX}/${INFO_PATH}/cvs.info ${PREFIX}/${INFO_PATH}/cvsclient.info X Xtest: build X @${RM} -Rf /tmp/cvs-sanity X @/usr/bin/su -m eik -c 'cd ${WRKSRC} && ${MAKE} check' X X.include END-of-cvs/Makefile echo x - cvs/distinfo sed 's/^X//' >cvs/distinfo << 'END-of-cvs/distinfo' XMD5 (cvs-1.12.9.tar.bz2) = 41396dfe38c3c9f80de98ea53e6d55aa XSIZE (cvs-1.12.9.tar.bz2) = 2695064 XMD5 (cederqvist-1.12.9.html.tar.bz2) = b49e2f478e7215cff6bc4db025188e98 XSIZE (cederqvist-1.12.9.html.tar.bz2) = 120669 END-of-cvs/distinfo echo c - cvs/files mkdir -p cvs/files > /dev/null 2>&1 echo x - cvs/files/freebsd.diff sed 's/^X//' >cvs/files/freebsd.diff << 'END-of-cvs/files/freebsd.diff' XIndex: src/checkout.c X=================================================================== XRCS file: /home/ncvs/src/contrib/cvs/src/checkout.c,v Xretrieving revision 1.1.1.13 Xretrieving revision 1.5 Xdiff -u -u -r1.1.1.13 -r1.5 X--- src/checkout.c 15 Apr 2004 01:01:55 -0000 1.1.1.13 X+++ src/checkout.c 15 Apr 2004 01:17:26 -0000 1.5 X@@ -50,6 +54,7 @@ X "\t-N\tDon't shorten module paths if -d specified.\n", X "\t-P\tPrune empty directories.\n", X "\t-R\tProcess directories recursively.\n", X+ "\t-T\tCreate Template file from local repository for remote commit.\n", X "\t-c\t\"cat\" the module database.\n", X "\t-f\tForce a head revision match if tag/date not found.\n", X "\t-l\tLocal directory only, not recursive\n", X@@ -92,6 +97,7 @@ X static char *join_rev1; X static char *join_rev2; X static int join_tags_validated; X+static int pull_template; X static char *preload_update_dir; X static char *history_name; X static enum mtype m_type; X@@ -139,7 +145,7 @@ X else X { X m_type = CHECKOUT; X- valid_options = "+ANnk:d:flRpQqcsr:D:j:P"; X+ valid_options = "+ANnk:d:flRpTQqcsr:D:j:P"; X valid_usage = checkout_usage; X } X X@@ -168,6 +174,9 @@ X case 'n': X run_module_prog = 0; X break; X+ case 'T': X+ pull_template = 1; X+ break; X case 'Q': X case 'q': X #ifdef SERVER_SUPPORT X@@ -1096,8 +1105,7 @@ X force_tag_match, 0 /* !local */ , X 1 /* update -d */ , aflag, checkout_prune_dirs, X pipeout, which, join_rev1, join_rev2, X- preload_update_dir, m_type == CHECKOUT, X- repository); X+ preload_update_dir, pull_template, repository); X goto out; X } X X@@ -1153,8 +1161,7 @@ X err += do_update (argc - 1, argv + 1, options, tag, date, X force_tag_match, local_specified, 1 /* update -d */, X aflag, checkout_prune_dirs, pipeout, which, join_rev1, X- join_rev2, preload_update_dir, m_type == CHECKOUT, X- repository); X+ join_rev2, preload_update_dir, pull_template, repository); X out: X free (preload_update_dir); X preload_update_dir = oldupdate; XIndex: src/client.c X=================================================================== XRCS file: /home/ncvs/src/contrib/cvs/src/client.c,v Xretrieving revision 1.1.1.16 Xretrieving revision 1.12 Xdiff -u -u -r1.1.1.16 -r1.12 X--- src/client.c 10 Jun 2004 19:05:37 -0000 1.1.1.16 X+++ src/client.c 10 Jun 2004 19:12:50 -0000 1.12 X@@ -262,7 +266,7 @@ X } X X /* Now check the value for root. */ X- if (this_root && current_parsed_root X+ if (CVSroot_cmdline == NULL && this_root && current_parsed_root X && (strcmp (this_root, current_parsed_root->original) != 0)) X { X /* Don't send this, since the CVSROOTs don't match. */ X@@ -4732,7 +4736,7 @@ X example in CVS_RSH or other such mechanisms to be devised, X if that is what they want (the manual already tells them X that). */ X- cvs_rsh = "rsh"; X+ cvs_rsh = "ssh"; X if (!cvs_server) X cvs_server = "cvs"; X X@@ -4793,7 +4797,7 @@ X int child_pid; X X if (!cvs_rsh) X- cvs_rsh = "rsh"; X+ cvs_rsh = "ssh"; X if (!cvs_server) X cvs_server = "cvs"; X X@@ -5151,7 +5155,8 @@ X } X else if (vers->ts_rcs == NULL X || args->force X- || strcmp (vers->ts_user, vers->ts_rcs) != 0) X+ || strcmp (vers->ts_user, vers->ts_rcs) != 0 X+ || (vers->vn_user && *vers->vn_user == '0')) X { X if (args->no_contents X && supported_request ("Is-modified")) XIndex: src/cvs.h X=================================================================== XRCS file: /home/ncvs/src/contrib/cvs/src/cvs.h,v Xretrieving revision 1.1.1.15 Xretrieving revision 1.20 Xdiff -u -u -r1.1.1.15 -r1.20 X--- src/cvs.h 10 Jun 2004 19:05:38 -0000 1.1.1.15 X+++ src/cvs.h 10 Jun 2004 19:12:50 -0000 1.20 X@@ -194,6 +195,7 @@ X #define CVSROOTADM_WRITERS "writers" X #define CVSROOTADM_PASSWD "passwd" X #define CVSROOTADM_CONFIG "config" X+#define CVSROOTADM_OPTIONS "options" X X #define CVSNULLREPOS "Emptydir" /* an empty directory */ X X@@ -263,6 +265,8 @@ X #define CVSREAD_ENV "CVSREAD" /* make files read-only */ X #define CVSREAD_DFLT 0 /* writable files by default */ X X+#define CVSREADONLYFS_ENV "CVSREADONLYFS" /* repository is read-only */ X+ X #define TMPDIR_ENV "TMPDIR" /* Temporary directory */ X X #define EDITOR1_ENV "CVSEDITOR" /* which editor to use */ X@@ -372,6 +376,7 @@ X extern int use_editor; X extern int cvswrite; X extern mode_t cvsumask; X+extern char *RCS_citag; X X X X@@ -390,7 +395,9 @@ X X extern int trace; /* Show all commands */ X extern int noexec; /* Don't modify disk anywhere */ X+extern int readonlyfs; /* fail on all write locks; succeed all read locks */ X extern int logoff; /* Don't write history entry */ X+extern int require_real_user; /* skip CVSROOT/passwd, /etc/passwd users only*/ X X extern int top_level_admin; X X@@ -498,6 +505,7 @@ X char *strcat_filename_onto_homedir PROTO ((const char *, const char *)); X char *cvs_temp_name PROTO ((void)); X FILE *cvs_temp_file PROTO ((char **filename)); X+void parseopts PROTO ((const char *root)); X X int numdots PROTO((const char *s)); X char *increment_revnum PROTO ((const char *)); X@@ -576,6 +584,7 @@ X void WriteTag PROTO ((const char *dir, const char *tag, const char *date, X int nonbranch, const char *update_dir, X const char *repository)); X+void WriteTemplate PROTO ((const char *dir, const char *update_dir)); X void cat_module PROTO((int status)); X void check_entries PROTO((char *dir)); X void close_module PROTO((DBM * db)); XIndex: src/diff.c X=================================================================== XRCS file: /home/ncvs/src/contrib/cvs/src/diff.c,v Xretrieving revision 1.1.1.12 Xretrieving revision 1.21 Xdiff -u -u -r1.1.1.12 -r1.21 X--- src/diff.c 15 Apr 2004 01:01:55 -0000 1.1.1.12 X+++ src/diff.c 15 Apr 2004 01:31:28 -0000 1.21 X@@ -12,6 +12,8 @@ X * X * Without any file arguments, runs diff against all the currently modified X * files. X+ * X+ * $FreeBSD: src/contrib/cvs/src/diff.c,v 1.21 2004/04/15 01:31:28 peter Exp $ X */ X X #include X@@ -52,6 +54,7 @@ X static char *diff_rev1, *diff_rev2; X /* Command line dates, from -D option. Malloc'd. */ X static char *diff_date1, *diff_date2; X+static char *diff_join1, *diff_join2; X static char *use_rev1, *use_rev2; X static int have_rev1_label, have_rev2_label; X X@@ -272,6 +275,8 @@ X diff_rev2 = NULL; X diff_date1 = NULL; X diff_date2 = NULL; X+ diff_join1 = NULL; X+ diff_join2 = NULL; X X optind = 0; X /* FIXME: This should really be allocating an argv to be passed to diff X@@ -282,7 +287,7 @@ X * to diff. X */ X while ((c = getopt_long (argc, argv, X- "+abcdefhilnpstuwy0123456789BHNRTC:D:F:I:L:U:W:k:r:", X+ "+abcdefhilnpstuwy0123456789BHNRTC:D:F:I:L:U:W:k:r:j:", X longopts, &option_index)) != -1) X { X switch (c) X@@ -345,6 +350,27 @@ X free (options); X options = RCS_check_kflag (optarg); X break; X+ case 'j': X+ { X+ char *ptr; X+ char *cpy = strdup(optarg); X+ X+ if ((ptr = strchr(optarg, ':')) != NULL) X+ *ptr++ = 0; X+ if (diff_rev2 != NULL || diff_date2 != NULL) X+ error (1, 0, X+ "no more than two revisions/dates can be specified"); X+ if (diff_rev1 != NULL || diff_date1 != NULL) { X+ diff_join2 = cpy; X+ diff_rev2 = optarg; X+ diff_date2 = ptr ? Make_Date(ptr) : NULL; X+ } else { X+ diff_join1 = cpy; X+ diff_rev1 = optarg; X+ diff_date1 = ptr ? Make_Date(ptr) : NULL; X+ } X+ } X+ break; X case 'r': X if (diff_rev2 != NULL || diff_date2 != NULL) X error (1, 0, X@@ -393,13 +419,18 @@ X send_option_string (opts); X if (options[0] != '\0') X send_arg (options); X- if (diff_rev1) X+ if (diff_join1) X+ option_with_arg ("-j", diff_join1); X+ else if (diff_rev1) X option_with_arg ("-r", diff_rev1); X- if (diff_date1) X+ else if (diff_date1) X client_senddate (diff_date1); X- if (diff_rev2) X+ X+ if (diff_join2) X+ option_with_arg ("-j", diff_join2); X+ else if (diff_rev2) X option_with_arg ("-r", diff_rev2); X- if (diff_date2) X+ else if (diff_date2) X client_senddate (diff_date2); X send_arg ("--"); X X@@ -413,28 +444,26 @@ X X send_to_server ("diff\012", 0); X err = get_responses_and_close (); X- free (options); X- options = NULL; X- return (err); X- } X+ } else X #endif X- X- if (diff_rev1 != NULL) X- tag_check_valid (diff_rev1, argc, argv, local, 0, ""); X- if (diff_rev2 != NULL) X- tag_check_valid (diff_rev2, argc, argv, local, 0, ""); X- X- which = W_LOCAL; X- if (diff_rev1 != NULL || diff_date1 != NULL) X- which |= W_REPOS | W_ATTIC; X- X- wrap_setup (); X- X- /* start the recursion processor */ X- err = start_recursion (diff_fileproc, diff_filesdoneproc, diff_dirproc, X- diff_dirleaveproc, NULL, argc, argv, local, X- which, 0, CVS_LOCK_READ, (char *) NULL, 1, X- (char *) NULL); X+ { X+ if (diff_rev1 != NULL) X+ tag_check_valid (diff_rev1, argc, argv, local, 0, ""); X+ if (diff_rev2 != NULL) X+ tag_check_valid (diff_rev2, argc, argv, local, 0, ""); X+ X+ which = W_LOCAL; X+ if (diff_rev1 != NULL || diff_date1 != NULL) X+ which |= W_REPOS | W_ATTIC; X+ X+ wrap_setup (); X+ X+ /* start the recursion processor */ X+ err = start_recursion (diff_fileproc, diff_filesdoneproc, diff_dirproc, X+ diff_dirleaveproc, NULL, argc, argv, local, X+ which, 0, CVS_LOCK_READ, (char *) NULL, 1, X+ (char *) NULL); X+ } X X /* clean up */ X free (options); X@@ -444,6 +473,10 @@ X free (diff_date1); X if (diff_date2 != NULL) X free (diff_date2); X+ if (diff_join1 != NULL) X+ free (diff_join1); X+ if (diff_join2 != NULL) X+ free (diff_join2); X X return (err); X } X@@ -489,7 +522,7 @@ X int exists; X X exists = 0; X- /* special handling for TAG_HEAD */ X+ /* special handling for TAG_HEAD XXX */ X if (diff_rev1 && strcmp (diff_rev1, TAG_HEAD) == 0) X { X char *head = X@@ -886,7 +919,7 @@ X X if (diff_rev1 || diff_date1) X { X- /* special handling for TAG_HEAD */ X+ /* special handling for TAG_HEAD XXX */ X if (diff_rev1 && strcmp (diff_rev1, TAG_HEAD) == 0) X { X if (vers->vn_rcs != NULL && vers->srcfile != NULL) X@@ -902,7 +935,7 @@ X } X if (diff_rev2 || diff_date2) X { X- /* special handling for TAG_HEAD */ X+ /* special handling for TAG_HEAD XXX */ X if (diff_rev2 && strcmp (diff_rev2, TAG_HEAD) == 0) X { X if (vers->vn_rcs != NULL && vers->srcfile != NULL) XIndex: src/entries.c X=================================================================== XRCS file: /home/ncvs/src/contrib/cvs/src/entries.c,v Xretrieving revision 1.1.1.8 Xretrieving revision 1.4 Xdiff -u -u -r1.1.1.8 -r1.4 X--- src/entries.c 15 Apr 2004 01:01:55 -0000 1.1.1.8 X+++ src/entries.c 15 Apr 2004 01:41:05 -0000 1.4 X@@ -11,6 +11,9 @@ X * the Entries file. X */ X X+/* X+ * $FreeBSD: src/contrib/cvs/src/entries.c,v 1.4 2004/04/15 01:41:05 peter Exp $ X+ */ X #include "cvs.h" X #include "getline.h" X X@@ -635,6 +638,72 @@ X return (p); X } X X+static char *root_template; X+ X+static int X+get_root_template(const char *repository, const char *path) X+{ X+ if (root_template) { X+ if (strcmp(path, root_template) == 0) X+ return(0); X+ free(root_template); X+ } X+ if ((root_template = strdup(path)) == NULL) X+ return(-1); X+ return(0); X+} X+ X+/* X+ * Write out/Clear the CVS/Template file. X+ */ X+void X+WriteTemplate (dir, update_dir) X+ const char *dir; X+ const char *update_dir; X+{ X+ char *tmp = NULL; X+ struct stat st1; X+ struct stat st2; X+ X+ if (Parse_Info(CVSROOTADM_RCSINFO, "cvs", get_root_template, 1) < 0) X+ return; X+ X+ if (asprintf(&tmp, "%s/%s", dir, CVSADM_TEMPLATE) < 0) X+ error (1, errno, "out of memory"); X+ X+ if (stat(root_template, &st1) == 0) { X+ if (stat(tmp, &st2) < 0 || st1.st_mtime != st2.st_mtime) { X+ FILE *fi; X+ FILE *fo; X+ X+ if ((fi = open_file(root_template, "r")) != NULL) { X+ if ((fo = open_file(tmp, "w")) != NULL) { X+ int n; X+ char buf[256]; X+ X+ while ((n = fread(buf, 1, sizeof(buf), fi)) > 0) X+ fwrite(buf, 1, n, fo); X+ fflush(fo); X+ if (ferror(fi) || ferror(fo)) { X+ fclose(fo); X+ remove(tmp); X+ error (1, errno, "error copying Template"); X+ } else { X+ struct timeval times[2]; X+ fclose(fo); X+ times[0].tv_sec = st1.st_mtime; X+ times[0].tv_usec = 0; X+ times[1] = times[0]; X+ utimes(tmp, times); X+ } X+ } X+ fclose(fi); X+ } X+ } X+ } X+ free(tmp); X+} X+ X /* X * Write out/Clear the CVS/Tag file. X */ XIndex: src/filesubr.c X=================================================================== XRCS file: /home/ncvs/src/contrib/cvs/src/filesubr.c,v Xretrieving revision 1.1.1.12 Xretrieving revision 1.12 Xdiff -u -u -r1.1.1.12 -r1.12 X--- src/filesubr.c 10 Jun 2004 19:05:37 -0000 1.1.1.12 X+++ src/filesubr.c 10 Jun 2004 19:12:50 -0000 1.12 X@@ -17,6 +17,10 @@ X definitions under operating systems (like, say, Windows NT) with different X file system semantics. */ X X+/* X+ * $FreeBSD: src/contrib/cvs/src/filesubr.c,v 1.12 2004/06/10 19:12:50 peter Exp $ X+ */ X+ X #include X #include "cvs.h" X X@@ -872,8 +876,8 @@ X const char *link; X { X char *file = NULL; X- int buflen = 128; X- int link_name_len; X+ int buflen = BUFSIZ; X+ int linklen; X X /* Get the name of the file to which `from' is linked. X FIXME: what portability issues arise here? Are readlink & X@@ -881,15 +885,15 @@ X do X { X file = xrealloc (file, buflen); X- link_name_len = readlink (link, file, buflen - 1); X+ errno = 0; X+ linklen = readlink (link, file, buflen - 1); X buflen *= 2; X } X- while (link_name_len < 0 && errno == ENAMETOOLONG); X+ while (linklen == -1 && errno == ENAMETOOLONG); X X- if (link_name_len < 0) X+ if (linklen == -1) X error (1, errno, "cannot readlink %s", link); X- X- file[link_name_len] = '\0'; X+ file[linklen] = '\0'; X X return file; X } XIndex: src/import.c X=================================================================== XRCS file: /home/ncvs/src/contrib/cvs/src/import.c,v Xretrieving revision 1.1.1.13 Xretrieving revision 1.12 Xdiff -u -u -r1.1.1.13 -r1.12 X--- src/import.c 15 Apr 2004 01:01:55 -0000 1.1.1.13 X+++ src/import.c 15 Apr 2004 01:17:27 -0000 1.12 X@@ -14,6 +14,8 @@ X * VendorReleTag Tag for this particular release X * X * Additional arguments specify more Vendor Release Tags. X+ * X+ * $FreeBSD: src/contrib/cvs/src/import.c,v 1.12 2004/04/15 01:17:27 peter Exp $ X */ X X #include "cvs.h" XIndex: src/lock.c X=================================================================== XRCS file: /home/ncvs/src/contrib/cvs/src/lock.c,v Xretrieving revision 1.1.1.12 Xretrieving revision 1.13 Xdiff -u -u -r1.1.1.12 -r1.13 X--- src/lock.c 15 Apr 2004 01:01:55 -0000 1.1.1.12 X+++ src/lock.c 15 Apr 2004 01:17:27 -0000 1.13 X@@ -8,6 +8,8 @@ X * Set Lock X * X * Lock file support for CVS. X+ * X+ * $FreeBSD: src/contrib/cvs/src/lock.c,v 1.13 2004/04/15 01:17:27 peter Exp $ X */ X X /* The node Concurrency in doc/cvs.texinfo has a brief introduction to X@@ -407,7 +409,7 @@ X (void) fprintf (stderr, "%s-> Reader_Lock(%s)\n", CLIENT_SERVER_STR, X xrepository); X X- if (noexec) X+ if (noexec || readonlyfs) X return 0; X X /* we only do one directory at a time for read locks! */ X@@ -484,6 +486,11 @@ X if (noexec) X return 0; X X+ if (readonlyfs) { X+ error (0, 0, "write lock failed - read-only repository"); X+ return (1); X+ } X+ X /* We only know how to do one list at a time */ X if (locklist != (List *) NULL) X { XIndex: src/log.c X=================================================================== XRCS file: /home/ncvs/src/contrib/cvs/src/log.c,v Xretrieving revision 1.1.1.12 Xretrieving revision 1.2 Xdiff -u -u -r1.1.1.12 -r1.2 X--- src/log.c 10 Jun 2004 19:05:37 -0000 1.1.1.12 X+++ src/log.c 6 Jul 2004 08:10:38 -0000 1.2 X@@ -10,6 +10,8 @@ X * Prints the RCS "log" (rlog) information for the specified files. With no X * argument, prints the log information for all the files in the directory X * (recursive by default). X+ * X+ * $FreeBSD: src/contrib/cvs/src/log.c,v 1.2 2004/07/06 08:10:38 des Exp $ X */ X X #include "cvs.h" X@@ -1605,8 +1607,8 @@ X &sec); X if (year < 1900) X year += 1900; X- sprintf (buf, "%04d/%02d/%02d %02d:%02d:%02d", year, mon, mday, X- hour, min, sec); X+ sprintf (buf, "%04d%c%02d%c%02d %02d:%02d:%02d", X+ year, datesep, mon, datesep, mday, hour, min, sec); X cvs_output (buf, 0); X X cvs_output ("; author: ", 0); XIndex: src/login.c X=================================================================== XRCS file: /home/ncvs/src/contrib/cvs/src/login.c,v Xretrieving revision 1.1.1.9 Xretrieving revision 1.8 Xdiff -u -u -r1.1.1.9 -r1.8 X--- src/login.c 15 Apr 2004 01:01:55 -0000 1.1.1.9 X+++ src/login.c 15 Apr 2004 01:17:27 -0000 1.8 X@@ -5,6 +5,8 @@ X * specified in the README file that comes with CVS. X * X * Allow user to log in for an authenticating server. X+ * X+ * $FreeBSD: src/contrib/cvs/src/login.c,v 1.8 2004/04/15 01:17:27 peter Exp $ X */ X X #include "cvs.h" XIndex: src/logmsg.c X=================================================================== XRCS file: /home/ncvs/src/contrib/cvs/src/logmsg.c,v Xretrieving revision 1.1.1.10 Xretrieving revision 1.12 Xdiff -u -u -r1.1.1.10 -r1.12 X--- src/logmsg.c 15 Apr 2004 01:01:55 -0000 1.1.1.10 X+++ src/logmsg.c 15 Apr 2004 01:17:27 -0000 1.12 X@@ -4,6 +4,8 @@ X * X * You may distribute under the terms of the GNU General Public License as X * specified in the README file that comes with the CVS source distribution. X+ * X+ * $FreeBSD: src/contrib/cvs/src/logmsg.c,v 1.12 2004/04/15 01:17:27 peter Exp $ X */ X X #include X@@ -226,6 +228,8 @@ X (*messagep)[strlen (*messagep) - 1] != '\n') X (void) fprintf (fp, "\n"); X } X+ else X+ (void) fprintf (fp, "\n"); X X if (repository != NULL) X /* tack templates on if necessary */ XIndex: src/main.c X=================================================================== XRCS file: /home/ncvs/src/contrib/cvs/src/main.c,v Xretrieving revision 1.1.1.13 Xretrieving revision 1.25 Xdiff -u -u -r1.1.1.13 -r1.25 X--- src/main.c 15 Apr 2004 01:01:55 -0000 1.1.1.13 X+++ src/main.c 6 Jul 2004 08:10:38 -0000 1.25 X@@ -10,10 +10,12 @@ X * Credit to Dick Grune, Vrije Universiteit, Amsterdam, for writing X * the shell-script CVS system that this is based on. X * X+ * $FreeBSD: src/contrib/cvs/src/main.c,v 1.25 2004/07/06 08:10:38 des Exp $ X */ X X #include X #include "cvs.h" X+#include "prepend_args.h" X X #ifdef HAVE_WINSOCK_H X #include X@@ -41,6 +43,8 @@ X int quiet = 0; X int trace = 0; X int noexec = 0; X+int readonlyfs = 0; X+int require_real_user = 0; X int logoff = 0; X X /* Set if we should be writing CVSADM directories at top level. At X@@ -106,7 +110,7 @@ X { X { "add", "ad", "new", add, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR }, X { "admin", "adm", "rcs", admin, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR }, X- { "annotate", "ann", NULL, annotate, CVS_CMD_USES_WORK_DIR }, X+ { "annotate", "ann", "blame", annotate, CVS_CMD_USES_WORK_DIR }, X { "checkout", "co", "get", checkout, 0 }, X { "commit", "ci", "com", commit, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR }, X { "diff", "di", "dif", diff, CVS_CMD_USES_WORK_DIR }, X@@ -247,8 +251,10 @@ X " -q Cause CVS to be somewhat quiet.\n", X " -r Make checked-out files read-only.\n", X " -w Make checked-out files read-write (default).\n", X+ " -g Force group-write perms on checked-out files.\n", X " -n Do not execute anything that will change the disk.\n", X " -t Show trace of program execution -- try with -n.\n", X+ " -R Assume repository is read-only, such as CDROM\n", X " -v CVS version and copyright.\n", X " -T tmpdir Use 'tmpdir' for temporary files.\n", X " -e editor Use 'editor' for editing log information.\n", X@@ -406,7 +412,7 @@ X int help = 0; /* Has the user asked for help? This X lets us support the `cvs -H cmd' X convention to give help for cmd. */ X- static const char short_options[] = "+Qqrwtnvb:T:e:d:Hfz:s:xa"; X+ static const char short_options[] = "+QqgrwtnRvb:T:e:d:Hfz:s:xaU"; X static struct option long_options[] = X { X {"help", 0, NULL, 'H'}, X@@ -469,6 +475,12 @@ X } X if (getenv (CVSREAD_ENV) != NULL) X cvswrite = 0; X+ if (getenv (CVSREADONLYFS_ENV) != NULL) { X+ readonlyfs = 1; X+ logoff = 1; X+ } X+ X+ prepend_default_options (getenv ("CVS_OPTIONS"), &argc, &argv); X X /* Set this to 0 to force getopt initialization. getopt() sets X this to 1 internally. */ X@@ -531,9 +543,20 @@ X case 'w': X cvswrite = 1; X break; X+ case 'g': X+ /* X+ * force full group write perms (used for shared checked-out X+ * source trees, see manual page) X+ */ X+ umask(umask(077) & 007); X+ break; X case 't': X trace = 1; X break; X+ case 'R': X+ readonlyfs = 1; X+ logoff = 1; X+ break; X case 'n': X noexec = 1; X logoff = 1; X@@ -623,6 +646,11 @@ X We will issue an error later if stream X authentication is not supported. */ X break; X+ case 'U': X+#ifdef SERVER_SUPPORT X+ require_real_user = 1; X+#endif X+ break; X case '?': X default: X usage (usg); X@@ -749,6 +777,12 @@ X (void) putenv (env); X /* do not free env, as putenv has control of it */ X } X+ { X+ char *env; X+ env = xmalloc (sizeof "CVS_PID=" + 32); /* XXX pid < 10^32 */ X+ (void) sprintf (env, "CVS_PID=%ld", (long) getpid ()); X+ (void) putenv (env); X+ } X #endif X X #ifndef DONT_USE_SIGNALS X@@ -974,6 +1008,9 @@ X if we didn't, then there would be no way to check in a new X CVSROOT/config file to fix the broken one! */ X parse_config (current_parsed_root->directory); X+ X+ /* Now is a convenient time to read CVSROOT/options */ X+ parseopts(current_parsed_root->directory); X } X X #ifdef CLIENT_SUPPORT X@@ -1166,3 +1203,64 @@ X (void) fprintf (stderr, *cpp); X error_exit (); X } X+ X+void X+parseopts(root) X+ const char *root; X+{ X+ char path[PATH_MAX]; X+ int save_errno; X+ char buf[1024]; X+ const char *p; X+ char *q; X+ FILE *fp; X+ X+ if (root == NULL) { X+ printf("no CVSROOT in parseopts\n"); X+ return; X+ } X+ p = strchr (root, ':'); X+ if (p) X+ p++; X+ else X+ p = root; X+ if (p == NULL) { X+ printf("mangled CVSROOT in parseopts\n"); X+ return; X+ } X+ (void) sprintf (path, "%s/%s/%s", p, CVSROOTADM, CVSROOTADM_OPTIONS); X+ if ((fp = fopen(path, "r")) != NULL) { X+ while (fgets(buf, sizeof buf, fp) != NULL) { X+ if (buf[0] == '#') X+ continue; X+ q = strrchr(buf, '\n'); X+ if (q) X+ *q = '\0'; X+ X+ if (!strcmp(buf, "iso8601")) { X+ datesep = '-'; X+ } X+ if (!strncmp(buf, "tag=", 4)) { X+ char *what; X+ char *rcs_localid; X+ X+ rcs_localid = buf + 4; X+ RCS_setlocalid(rcs_localid); X+ } X+ if (!strncmp(buf, "tagexpand=", 10)) { X+ char *what; X+ char *rcs_incexc; X+ X+ rcs_incexc = buf + 10; X+ RCS_setincexc(rcs_incexc); X+ } X+ /* X+ * OpenBSD has a "umask=" and "dlimit=" command, we silently X+ * ignore them here since they are not much use to us. cvsumask X+ * defaults to 002 already, and the dlimit (data size limit) X+ * should really be handled elsewhere (eg: login.conf). X+ */ X+ } X+ fclose(fp); X+ } X+} XIndex: src/mkmodules.c X=================================================================== XRCS file: /home/ncvs/src/contrib/cvs/src/mkmodules.c,v Xretrieving revision 1.1.1.12 Xretrieving revision 1.13 Xdiff -u -u -r1.1.1.12 -r1.13 X--- src/mkmodules.c 15 Apr 2004 01:01:55 -0000 1.1.1.12 X+++ src/mkmodules.c 15 Apr 2004 01:17:27 -0000 1.13 X@@ -3,7 +3,10 @@ X * Copyright (c) 1989-1992, Brian Berliner X * X * You may distribute under the terms of the GNU General Public License as X- * specified in the README file that comes with the CVS kit. */ X+ * specified in the README file that comes with the CVS kit. X+ * X+ * $FreeBSD: src/contrib/cvs/src/mkmodules.c,v 1.13 2004/04/15 01:17:27 peter Exp $ X+ */ X X #include "cvs.h" X #include "getline.h" XIndex: src/parseinfo.c X=================================================================== XRCS file: /home/ncvs/src/contrib/cvs/src/parseinfo.c,v Xretrieving revision 1.1.1.12 Xretrieving revision 1.3 Xdiff -u -u -r1.1.1.12 -r1.3 X--- src/parseinfo.c 15 Apr 2004 01:01:55 -0000 1.1.1.12 X+++ src/parseinfo.c 15 Apr 2004 01:17:27 -0000 1.3 X@@ -4,6 +4,8 @@ X * X * You may distribute under the terms of the GNU General Public License as X * specified in the README file that comes with the CVS source distribution. X+ * X+ * $FreeBSD: src/contrib/cvs/src/parseinfo.c,v 1.3 2004/04/15 01:17:27 peter Exp $ X */ X X #include "cvs.h" X@@ -350,6 +352,25 @@ X goto error_return; X } X } X+ else if (strcmp (line, "tag") == 0) { X+ RCS_setlocalid(p); X+ } X+ else if (strcmp (line, "umask") == 0) { X+ cvsumask = (mode_t)(strtol(p, NULL, 8) & 0777); X+ } X+ else if (strcmp (line, "dlimit") == 0) { X+#ifdef BSD X+#include X+ struct rlimit rl; X+ X+ if (getrlimit(RLIMIT_DATA, &rl) != -1) { X+ rl.rlim_cur = atoi(p); X+ rl.rlim_cur *= 1024; X+ X+ (void) setrlimit(RLIMIT_DATA, &rl); X+ } X+#endif /* BSD */ X+ } X else if (strcmp (line, "PreservePermissions") == 0) X { X if (strcmp (p, "no") == 0) XIndex: src/rcs.c X=================================================================== XRCS file: /home/ncvs/src/contrib/cvs/src/rcs.c,v Xretrieving revision 1.1.1.14 Xretrieving revision 1.27 Xdiff -u -u -r1.1.1.14 -r1.27 X--- src/rcs.c 15 Apr 2004 01:01:55 -0000 1.1.1.14 X+++ src/rcs.c 6 Jul 2004 08:10:38 -0000 1.27 X@@ -6,6 +6,8 @@ X * X * The routines contained in this file do all the rcs file parsing and X * manipulation X+ * X+ * $FreeBSD: src/contrib/cvs/src/rcs.c,v 1.27 2004/07/06 08:10:38 des Exp $ X */ X X #include X@@ -24,6 +26,7 @@ X # endif X #endif X X+int datesep = '/'; X int preserve_perms = 0; X X /* The RCS -k options, and a set of enums that must match the array. X@@ -134,6 +137,8 @@ X evaluates its arguments multiple times. */ X #define STREQ(a, b) (*(char *)(a) == *(char *)(b) && strcmp ((a), (b)) == 0) X X+static char * getfullCVSname PROTO ((char *, char **)); X+ X /* X * We don't want to use isspace() from the C library because: X * X@@ -2502,13 +2507,25 @@ X char *rev; X { X int rev_num; X- char *xrev, *test_branch; X+ char *xrev, *test_branch, *local_branch_num; X X xrev = xmalloc (strlen (rev) + 14); /* enough for .0.number */ X check_rev = xrev; X X+ local_branch_num = getenv("CVS_LOCAL_BRANCH_NUM"); X+ if (local_branch_num) X+ { X+ rev_num = atoi(local_branch_num); X+ if (rev_num < 2) X+ rev_num = 2; X+ else X+ rev_num &= ~1; X+ } X+ else X+ rev_num = 2; X+ X /* only look at even numbered branches */ X- for (rev_num = 2; ; rev_num += 2) X+ for ( ; ; rev_num += 2) X { X /* see if the physical branch exists */ X (void) sprintf (xrev, "%s.%d", rev, rev_num); X@@ -3481,27 +3498,31 @@ X { X const char *string; X size_t len; X+ int expandit; X }; X #define KEYWORD_INIT(s) (s), sizeof (s) - 1 X-static const struct rcs_keyword keywords[] = X+static struct rcs_keyword keywords[] = X { X- { KEYWORD_INIT ("Author") }, X- { KEYWORD_INIT ("Date") }, X- { KEYWORD_INIT ("Header") }, X- { KEYWORD_INIT ("Id") }, X- { KEYWORD_INIT ("Locker") }, X- { KEYWORD_INIT ("Log") }, X- { KEYWORD_INIT ("Name") }, X- { KEYWORD_INIT ("RCSfile") }, X- { KEYWORD_INIT ("Revision") }, X- { KEYWORD_INIT ("Source") }, X- { KEYWORD_INIT ("State") }, X- { NULL, 0 } X+ { KEYWORD_INIT ("Author"), 1 }, X+ { KEYWORD_INIT ("Date"), 1 }, X+ { KEYWORD_INIT ("CVSHeader"), 1 }, X+ { KEYWORD_INIT ("Header"), 1 }, X+ { KEYWORD_INIT ("Id"), 1 }, X+ { KEYWORD_INIT ("Locker"), 1 }, X+ { KEYWORD_INIT ("Log"), 1 }, X+ { KEYWORD_INIT ("Name"), 1 }, X+ { KEYWORD_INIT ("RCSfile"), 1 }, X+ { KEYWORD_INIT ("Revision"), 1 }, X+ { KEYWORD_INIT ("Source"), 1 }, X+ { KEYWORD_INIT ("State"), 1 }, X+ { NULL, 0, 0 }, X+ { NULL, 0, 0 } X }; X enum keyword X { X KEYWORD_AUTHOR = 0, X KEYWORD_DATE, X+ KEYWORD_CVSHEADER, X KEYWORD_HEADER, X KEYWORD_ID, X KEYWORD_LOCKER, X@@ -3510,8 +3531,10 @@ X KEYWORD_RCSFILE, X KEYWORD_REVISION, X KEYWORD_SOURCE, X- KEYWORD_STATE X+ KEYWORD_STATE, X+ KEYWORD_LOCALID X }; X+enum keyword keyword_local = KEYWORD_ID; X X /* Convert an RCS date string into a readable string. This is like X the RCS date2str function. */ X@@ -3527,8 +3550,8 @@ X &sec); X if (year < 1900) X year += 1900; X- sprintf (buf, "%04d/%02d/%02d %02d:%02d:%02d", year, mon, mday, X- hour, min, sec); X+ sprintf (buf, "%04d%c%02d%c%02d %02d:%02d:%02d", X+ year, datesep, mon, datesep, mday, hour, min, sec); X return xstrdup (buf); X } X X@@ -3689,7 +3712,8 @@ X slen = s - srch; X for (keyword = keywords; keyword->string != NULL; keyword++) X { X- if (keyword->len == slen X+ if (keyword->expandit X+ && keyword->len == slen X && strncmp (keyword->string, srch, slen) == 0) X { X break; X@@ -3736,15 +3760,25 @@ X free_value = 1; X break; X X+ case KEYWORD_CVSHEADER: X case KEYWORD_HEADER: X case KEYWORD_ID: X+ case KEYWORD_LOCALID: X { X const char *path; X int free_path; X char *date; X+ char *old_path; X X- if (kw == KEYWORD_HEADER) X+ old_path = NULL; X+ if (kw == KEYWORD_HEADER || X+ (kw == KEYWORD_LOCALID && X+ keyword_local == KEYWORD_HEADER)) X path = rcs->path; X+ else if (kw == KEYWORD_CVSHEADER || X+ (kw == KEYWORD_LOCALID && X+ keyword_local == KEYWORD_CVSHEADER)) X+ path = getfullCVSname(rcs->path, &old_path); X else X path = last_component (rcs->path); X path = escape_keyword_value (path, &free_path); X@@ -3767,6 +3801,8 @@ X * and we can discard the const. X */ X free ((char *)path); X+ if (old_path) X+ free (old_path); X free (date); X free_value = 1; X } X@@ -8620,3 +8656,105 @@ X } X return label; X } X+ X+void X+RCS_setlocalid (arg) X+ const char *arg; X+{ X+ char *copy, *next, *key; X+ X+ copy = xstrdup(arg); X+ next = copy; X+ key = strtok(next, "="); X+ X+ keywords[KEYWORD_LOCALID].string = xstrdup(key); X+ keywords[KEYWORD_LOCALID].len = strlen(key); X+ keywords[KEYWORD_LOCALID].expandit = 1; X+ X+ /* options? */ X+ while (key = strtok(NULL, ",")) { X+ if (!strcmp(key, keywords[KEYWORD_ID].string)) X+ keyword_local = KEYWORD_ID; X+ else if (!strcmp(key, keywords[KEYWORD_HEADER].string)) X+ keyword_local = KEYWORD_HEADER; X+ else if (!strcmp(key, keywords[KEYWORD_CVSHEADER].string)) X+ keyword_local = KEYWORD_CVSHEADER; X+ else X+ error(1, 0, "Unknown LocalId mode: %s", key); X+ } X+ free(copy); X+} X+ X+void X+RCS_setincexc (arg) X+ const char *arg; X+{ X+ char *key; X+ char *copy, *next; X+ int include = 0; X+ struct rcs_keyword *keyword; X+ X+ copy = xstrdup(arg); X+ next = copy; X+ switch (*next++) { X+ case 'e': X+ include = 0; X+ break; X+ case 'i': X+ include = 1; X+ break; X+ default: X+ free(copy); X+ return; X+ } X+ X+ if (include) X+ for (keyword = keywords; keyword->string != NULL; keyword++) X+ { X+ keyword->expandit = 0; X+ } X+ X+ key = strtok(next, ","); X+ while (key) { X+ for (keyword = keywords; keyword->string != NULL; keyword++) { X+ if (strcmp (keyword->string, key) == 0) X+ keyword->expandit = include; X+ } X+ key = strtok(NULL, ","); X+ } X+ free(copy); X+ return; X+} X+ X+#define ATTIC "/" CVSATTIC X+static char * X+getfullCVSname(CVSname, pathstore) X+ char *CVSname, **pathstore; X+{ X+ if (current_parsed_root->directory) { X+ int rootlen; X+ char *c = NULL; X+ int alen = sizeof(ATTIC) - 1; X+ X+ *pathstore = xstrdup(CVSname); X+ if ((c = strrchr(*pathstore, '/')) != NULL) { X+ if (c - *pathstore >= alen) { X+ if (!strncmp(c - alen, ATTIC, alen)) { X+ while (*c != '\0') { X+ *(c - alen) = *c; X+ c++; X+ } X+ *(c - alen) = '\0'; X+ } X+ } X+ } X+ X+ rootlen = strlen(current_parsed_root->directory); X+ if (!strncmp(*pathstore, current_parsed_root->directory, rootlen) && X+ (*pathstore)[rootlen] == '/') X+ CVSname = (*pathstore + rootlen + 1); X+ else X+ CVSname = (*pathstore); X+ } X+ return CVSname; X+} XIndex: src/rcs.h X=================================================================== XRCS file: /home/ncvs/src/contrib/cvs/src/rcs.h,v Xretrieving revision 1.1.1.10 Xretrieving revision 1.11 Xdiff -u -u -r1.1.1.10 -r1.11 X--- src/rcs.h 15 Apr 2004 01:01:55 -0000 1.1.1.10 X+++ src/rcs.h 6 Jul 2004 08:10:38 -0000 1.11 X@@ -6,6 +6,8 @@ X * specified in the README file that comes with the CVS source distribution. X * X * RCS source control definitions needed by rcs.c and friends X+ * X+ * $FreeBSD: src/contrib/cvs/src/rcs.h,v 1.11 2004/07/06 08:10:38 des Exp $ X */ X X /* Strings which indicate a conflict if they occur at the start of a line. */ X@@ -244,8 +246,11 @@ X void RCS_deltas PROTO ((RCSNode *, FILE *, struct rcsbuffer *, const char *, X enum rcs_delta_op, char **, size_t *, X char **, size_t *)); X+void RCS_setincexc PROTO ((const char *arg)); X+void RCS_setlocalid PROTO ((const char *arg)); X char *make_file_label PROTO ((const char *, const char *, RCSNode *)); X X+extern int datesep; X extern int preserve_perms; X X /* From import.c. */ XIndex: src/rcscmds.c X=================================================================== XRCS file: /home/ncvs/src/contrib/cvs/src/rcscmds.c,v Xretrieving revision 1.1.1.10 Xretrieving revision 1.10 Xdiff -u -u -r1.1.1.10 -r1.10 X--- src/rcscmds.c 15 Apr 2004 01:01:55 -0000 1.1.1.10 X+++ src/rcscmds.c 15 Apr 2004 01:17:27 -0000 1.10 X@@ -7,6 +7,8 @@ X * X * The functions in this file provide an interface for performing X * operations directly on RCS files. X+ * X+ * $FreeBSD: src/contrib/cvs/src/rcscmds.c,v 1.10 2004/04/15 01:17:27 peter Exp $ X */ X X #include "cvs.h" XIndex: src/recurse.c X=================================================================== XRCS file: /home/ncvs/src/contrib/cvs/src/recurse.c,v Xretrieving revision 1.1.1.13 Xretrieving revision 1.12 Xdiff -u -u -r1.1.1.13 -r1.12 X--- src/recurse.c 15 Apr 2004 01:01:55 -0000 1.1.1.13 X+++ src/recurse.c 15 Apr 2004 01:17:27 -0000 1.12 X@@ -6,6 +6,7 @@ X * X * General recursion handler X * X+ * $FreeBSD: src/contrib/cvs/src/recurse.c,v 1.12 2004/04/15 01:17:27 peter Exp $ X */ X X #include "cvs.h" XIndex: src/server.c X=================================================================== XRCS file: /home/ncvs/src/contrib/cvs/src/server.c,v Xretrieving revision 1.1.1.18 Xretrieving revision 1.24 Xdiff -u -u -r1.1.1.18 -r1.24 X--- src/server.c 10 Jun 2004 19:05:38 -0000 1.1.1.18 X+++ src/server.c 10 Jun 2004 19:12:50 -0000 1.24 X@@ -8,6 +8,10 @@ X MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the X GNU General Public License for more details. */ X X+/* X+ * $FreeBSD: src/contrib/cvs/src/server.c,v 1.24 2004/06/10 19:12:50 peter Exp $ X+ */ X+ X #include X #include "cvs.h" X #include "watch.h" X@@ -773,6 +777,9 @@ X nothing. But for rsh, we need to do it now. */ X parse_config (current_parsed_root->directory); X X+ /* Now is a good time to read CVSROOT/options too. */ X+ parseopts(current_parsed_root->directory); X+ X path = xmalloc (strlen (current_parsed_root->directory) X + sizeof (CVSROOTADM) X + 2); X@@ -5602,7 +5609,10 @@ X password file. If so, that's enough to authenticate with. If X not, we'll check /etc/passwd. */ X X- rc = check_repository_password (username, password, repository, X+ if (require_real_user) X+ rc = 0; /* "not found" */ X+ else X+ rc = check_repository_password (username, password, repository, X &host_user); X X if (rc == 2) XIndex: src/tag.c X=================================================================== XRCS file: /home/ncvs/src/contrib/cvs/src/tag.c,v Xretrieving revision 1.1.1.12 Xretrieving revision 1.2 Xdiff -u -u -r1.1.1.12 -r1.2 X--- src/tag.c 15 Apr 2004 01:01:55 -0000 1.1.1.12 X+++ src/tag.c 5 Aug 2004 17:47:35 -0000 1.2 X@@ -10,6 +10,8 @@ X * Add or delete a symbolic name to an RCS file, or a collection of RCS files. X * Tag uses the checked out revision in the current directory, rtag uses X * the modules database, if necessary. X+ * X+ * $FreeBSD: src/contrib/cvs/src/tag.c,v 1.2 2004/08/05 17:47:35 des Exp $ X */ X X #include "cvs.h" X@@ -1199,6 +1201,9 @@ X || strcmp (name, TAG_HEAD) == 0) X return; X X+ if (readonlyfs) X+ return; X+ X /* FIXME: This routine doesn't seem to do any locking whatsoever X (and it is called from places which don't have locks in place). X If two processes try to write val-tags at the same time, it would XIndex: src/update.c X=================================================================== XRCS file: /home/ncvs/src/contrib/cvs/src/update.c,v Xretrieving revision 1.1.1.15 Xretrieving revision 1.14 Xdiff -u -u -r1.1.1.15 -r1.14 X--- src/update.c 10 Jun 2004 19:05:38 -0000 1.1.1.15 X+++ src/update.c 10 Jun 2004 19:12:50 -0000 1.14 X@@ -31,6 +31,8 @@ X * versions, these are updated too. If the -d option was specified, new X * directories added to the repository are automatically created and updated X * as well. X+ * X+ * $FreeBSD: src/contrib/cvs/src/update.c,v 1.14 2004/06/10 19:12:50 peter Exp $ X */ X X #include "cvs.h" X@@ -95,10 +97,10 @@ X static int aflag = 0; X static int toss_local_changes = 0; X static int force_tag_match = 1; X+static int pull_template = 0; X static int update_build_dirs = 0; X static int update_prune_dirs = 0; X static int pipeout = 0; X-static int dotemplate = 0; X #ifdef SERVER_SUPPORT X static int patches = 0; X static int rcs_diff_patches = 0; X@@ -123,6 +125,7 @@ X "\t-j rev\tMerge in changes made between current revision and rev.\n", X "\t-I ign\tMore files to ignore (! to reset).\n", X "\t-W spec\tWrappers specification line.\n", X+ "\t-T\tCreate CVS/Template.\n", X "(Specify the --help global option for a list of other help options)\n", X NULL X }; X@@ -138,6 +141,7 @@ X int c, err; X int local = 0; /* recursive by default */ X int which; /* where to look for files and dirs */ X+ int xpull_template = 0; X X if (argc == -1) X usage (update_usage); X@@ -147,7 +151,7 @@ X X /* parse the args */ X optind = 0; X- while ((c = getopt (argc, argv, "+ApCPflRQqduk:r:D:j:I:W:")) != -1) X+ while ((c = getopt (argc, argv, "+ApCPflRQTqduk:r:D:j:I:W:")) != -1) X { X switch (c) X { X@@ -185,6 +189,9 @@ X "-q or -Q must be specified before \"%s\"", X cvs_cmd_name); X break; X+ case 'T': X+ xpull_template = 1; X+ break; X case 'd': X update_build_dirs = 1; X break; X@@ -413,8 +420,8 @@ X /* call the command line interface */ X err = do_update (argc, argv, options, tag, date, force_tag_match, X local, update_build_dirs, aflag, update_prune_dirs, X- pipeout, which, join_rev1, join_rev2, (char *) NULL, 1, X- (char *) NULL); X+ pipeout, which, join_rev1, join_rev2, (char *) NULL, X+ xpull_template, (char *) NULL); X X /* free the space Make_Date allocated if necessary */ X if (date != NULL) X@@ -431,7 +438,7 @@ X int X do_update (argc, argv, xoptions, xtag, xdate, xforce, local, xbuild, xaflag, X xprune, xpipeout, which, xjoin_rev1, xjoin_rev2, preload_update_dir, X- xdotemplate, repository) X+ xpull_template, repository) X int argc; X char **argv; X char *xoptions; X@@ -447,7 +454,7 @@ X char *xjoin_rev1; X char *xjoin_rev2; X char *preload_update_dir; X- int xdotemplate; X+ int xpull_template; X char *repository; X { X int err = 0; X@@ -462,7 +469,7 @@ X aflag = xaflag; X update_prune_dirs = xprune; X pipeout = xpipeout; X- dotemplate = xdotemplate; X+ pull_template = xpull_template; X X /* setup the join support */ X join_rev1 = xjoin_rev1; X@@ -604,7 +611,7 @@ X && tag != NULL X && finfo->rcs != NULL) X { X- char *rev = RCS_getversion (finfo->rcs, tag, NULL, 1, NULL); X+ char *rev = RCS_getversion (finfo->rcs, tag, date, 1, NULL); X if (rev != NULL X && !RCS_nodeisbranch (finfo->rcs, tag)) X nonbranch = 1; X@@ -950,7 +957,7 @@ X via WriteTag. */ X 0, X 0, X- dotemplate); X+ pull_template); X rewrite_tag = 1; X nonbranch = 0; X Subdir_Register (entries, (char *) NULL, dir); X@@ -1009,6 +1016,12 @@ X nonbranch = 0; X } X X+ /* keep the CVS/Template file current */ X+ if (pull_template) X+ { X+ WriteTemplate (dir, update_dir); X+ } X+ X /* initialize the ignore list for this directory */ X ignlist = getlist (); X } XIndex: src/update.h X=================================================================== XRCS file: /home/ncvs/src/contrib/cvs/src/update.h,v Xretrieving revision 1.1.1.4 Xretrieving revision 1.3 Xdiff -u -u -r1.1.1.4 -r1.3 X--- src/update.h 15 Apr 2004 01:01:55 -0000 1.1.1.4 X+++ src/update.h 15 Apr 2004 01:17:28 -0000 1.3 X@@ -10,10 +10,14 @@ X MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the X GNU General Public License for more details. */ X X+/* X+ * $FreeBSD: src/contrib/cvs/src/update.h,v 1.3 2004/04/15 01:17:28 peter Exp $ X+ */ X+ X int do_update PROTO((int argc, char *argv[], char *xoptions, char *xtag, X char *xdate, int xforce, int local, int xbuild, X int xaflag, int xprune, int xpipeout, int which, X char *xjoin_rev1, char *xjoin_rev2, char *preload_update_dir, X- int xdotemplate, char *repository)); X+ int xpull_template, char *repository)); X int joining PROTO((void)); X extern int isemptydir PROTO ((const char *dir, int might_not_exist)); END-of-cvs/files/freebsd.diff echo x - cvs/files/patch-configure sed 's/^X//' >cvs/files/patch-configure << 'END-of-cvs/files/patch-configure' X--- configure.orig Wed Jun 9 17:14:41 2004 X+++ configure Sun Sep 5 18:18:01 2004 X@@ -1346,7 +1346,7 @@ X X X cat >>confdefs.h <<_ACEOF X-#define PACKAGE_STRING "$PACKAGE_STRING" X+#define PACKAGE_STRING "$PACKAGE_STRING-FreeBSD" X _ACEOF X X X@@ -31601,6 +31601,8 @@ X X ac_config_files="$ac_config_files contrib/cvs_acls" X X+ ac_config_files="$ac_config_files contrib/easy-import" X+ X ac_config_files="$ac_config_files contrib/log" X X ac_config_files="$ac_config_files contrib/log_accum" X@@ -32330,7 +32332,7 @@ X s,@INSTALL_DATA@,$INSTALL_DATA,;t t X s,@CYGPATH_W@,$CYGPATH_W,;t t X s,@PACKAGE@,$PACKAGE,;t t X-s,@VERSION@,$VERSION,;t t X+s,@VERSION@,$VERSION-FreeBSD,;t t X s,@ACLOCAL@,$ACLOCAL,;t t X s,@AUTOCONF@,$AUTOCONF,;t t X s,@AUTOMAKE@,$AUTOMAKE,;t t END-of-cvs/files/patch-configure echo x - cvs/files/patch-contrib::Makefile.in sed 's/^X//' >cvs/files/patch-contrib::Makefile.in << 'END-of-cvs/files/patch-contrib::Makefile.in' X--- contrib/Makefile.in.orig Wed Jun 9 17:27:05 2004 X+++ contrib/Makefile.in Sun Sep 5 20:03:58 2004 X@@ -33,7 +33,7 @@ X srcdir = @srcdir@ X top_srcdir = @top_srcdir@ X VPATH = @srcdir@ X-pkgdatadir = $(datadir)/@PACKAGE@ X+pkgdatadir = $(datadir)/examples/@PACKAGE@ X pkglibdir = $(libdir)/@PACKAGE@ X pkgincludedir = $(includedir)/@PACKAGE@ X top_builddir = .. X@@ -185,6 +185,7 @@ X cvs2vendor \ X cvs_acls \ X debug_check_log \ X+ easy-import \ X log \ X log_accum \ X mfpipe \ X@@ -236,14 +237,14 @@ X mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs X CONFIG_HEADER = $(top_builddir)/config.h X CONFIG_CLEAN_FILES = validate_repo clmerge cln_hist commit_prep cvs_acls \ X- log log_accum mfpipe pvcs2rcs rcs2log rcslock sccs2rcs X+ easy-import log log_accum mfpipe pvcs2rcs rcs2log rcslock sccs2rcs X SCRIPTS = $(contrib_SCRIPTS) X X DIST_SOURCES = X DATA = $(contrib_DATA) X X DIST_COMMON = README $(srcdir)/Makefile.in ChangeLog Makefile.am \ X- clmerge.in cln_hist.in commit_prep.in cvs_acls.in log.in \ X+ clmerge.in cln_hist.in commit_prep.in cvs_acls.in easy-import.in log.in \ X log_accum.in mfpipe.in pvcs2rcs.in rcs2log.sh rcslock.in \ X sccs2rcs.in validate_repo.in X all: all-am X@@ -265,6 +266,8 @@ X cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ X cvs_acls: $(top_builddir)/config.status cvs_acls.in X cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ X+easy-import: $(top_builddir)/config.status easy-import.in X+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ X log: $(top_builddir)/config.status log.in X cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ X log_accum: $(top_builddir)/config.status log_accum.in X@@ -403,8 +406,7 @@ X X info-am: X X-install-data-am: install-contribDATA install-contribSCRIPTS \ X- install-data-local X+install-data-am: install-contribDATA install-contribSCRIPTS X X install-exec-am: X END-of-cvs/files/patch-contrib::Makefile.in echo x - cvs/files/patch-contrib::easy-import.in sed 's/^X//' >cvs/files/patch-contrib::easy-import.in << 'END-of-cvs/files/patch-contrib::easy-import.in' X--- contrib/easy-import.in.orig Sun Sep 5 17:06:27 2004 X+++ contrib/easy-import.in Sun Sep 5 17:08:28 2004 X@@ -0,0 +1,403 @@ X+#! @PERL@ X+# X+# Support for importing a source collection into CVS. X+# Tries to prevent the user from the most common pitfalls (like creating X+# new top-level repositories or second-level areas accidentally), and X+# cares to do some of the `dirty' work like maintaining the modules X+# database accordingly. X+# X+# Written by Jörg Wunsch, 95/03/07, and placed in the public domain. X+# X+# $FreeBSD$ X+ X+require "complete.pl"; X+require "getopts.pl"; X+ X+ X+sub scan_opts X+{ X+ local($status); X+ X+ $status = &Getopts("nv"); X+ X+ $dont_do_it = "-n" if $opt_n; X+ if($opt_v) { X+ print STDERR '$FreeBSD$' . "\n"; # 'emacs kludge X+ exit 0; X+ } X+ die "usage: $0 [-v] [-n] [moduledir]\n" . X+ " -n: don't do any commit, show only\n" . X+ " -v: show program version\n" X+ unless $status && $#ARGV <= 0; X+ X+ if($#ARGV == 0) { X+ $moduledir = $ARGV[0]; X+ shift; X+ } X+} X+ X+sub lsdir X+{ X+ # find all subdirectories under @_ X+ # ignore all CVS entries, dot entries, and non-directories X+ X+ local($base) = @_; X+ local(@ls, @rv, $fname); X+ X+ opendir(DIR, $base) || die "Cannot find dir $base.\n"; X+ X+ @ls = readdir(DIR); X+ closedir(DIR); X+ X+ @rv = (); X+ X+ foreach $fname (@ls) { X+ next if $fname =~ /^CVS/ || $fname eq "Attic" X+ || $fname =~ /^\./ || ! -d "$base/$fname"; X+ @rv = (@rv, $fname); X+ } X+ X+ return sort(@rv); X+} X+ X+ X+sub contains X+{ X+ # look if the first parameter is contained in the list following it X+ local($item, @list) = @_; X+ local($found, $i); X+ X+ $found = 0; X+ foreach $i (@list) { X+ return 1 if $i eq $item; X+ } X+ return 0; X+} X+ X+ X+ X+sub term_init X+{ X+ # first, get some terminal attributes X+ X+ # try bold mode first X+ $so = `tput md`; $se = `tput me`; X+ X+ # if no bold mode available, use standout mode X+ if ($so eq "") { X+ $so = `tput so`; $se = `tput se`; X+ } X+ X+ # try if we can underscore X+ $us = `tput us`; $ue = `tput ue`; X+ # if we don't have it available, or same as bold/standout, disable it X+ if ($us eq "" || $us eq $so) { X+ $us = $ue = ""; X+ } X+ X+ # look how many columns we've got X+ if($ENV{'COLUMNS'} ne "") { X+ $columns = $ENV{'COLUMNS'}; X+ } elsif(-t STDIN) { # if we operate on a terminal... X+ local($word, $tmp); X+ X+ open(STTY, "stty -a|"); X+ $_ = ; # try getting the tty win structure value X+ close(STTY); X+ chop; X+ $columns = 0; X+ foreach $word (split) { X+ $columns = $tmp if $word eq "columns;"; # the number preceding X+ $tmp = $word; X+ } X+ } else { X+ $columns = 80; X+ } X+ # sanity X+ $columns = 80 unless $columns >= 5; X+} X+ X+ X+sub list X+{ X+ # pretty-print a list X+ # imports: global variable $columns X+ local(@items) = @_; X+ local($longest,$i,$item,$cols,$width); X+ X+ # find the longest item X+ $longest = 0; X+ foreach $item (@items) { X+ $i = length($item); X+ $longest = $i if $longest < $i; X+ } X+ $width = $longest + 1; X+ $cols = int($columns / $width); X+ X+ $i = 0; X+ foreach $item (@items) { X+ print $item; X+ if(++$i == $cols) { X+ $i = 0; print "\n"; X+ } else { X+ print ' ' x ($width - length($item)); X+ } X+ } X+ print "\n" unless $i == 0; X+} X+ X+sub cvs_init X+{ X+ # get the CVS repository(s) X+ X+ die "You need to have the \$CVSROOT variable set.\n" X+ unless $ENV{'CVSROOT'} ne ""; X+ X+ # get the list of available repositories X+ $cvsroot = $ENV{'CVSROOT'}; X+ $cvsroot = (split(/:/, $cvsroot, 2))[1] if $cvsroot =~ /:/; X+ @reps = &lsdir($cvsroot); X+} X+ X+ X+sub lsmodules X+{ X+ # list all known CVS modules X+ local(%rv, $mname, $mpath, $_); X+ X+ %rv = (); X+ X+ open(CVS, "cvs co -c|"); X+ while($_ = ) { X+ chop; X+ ($mname,$mpath) = split; X+ next if $mname eq ""; X+ $rv{$mname} = $mpath; X+ } X+ close(CVS); X+ X+ return %rv; X+} X+ X+ X+sub checktag X+{ X+ # check a given string for tag rules X+ local($s, $name) = @_; X+ local($regexp); X+ X+ if($name eq "vendor") { $regexp = '^[A-Z][A-Z0-9_]*$'; } X+ elsif($name eq "release") { $regexp = '^[a-z][a-z0-9_]*$'; } X+ else { X+ print STDERR "Internal error: unknown tag name $name\n"; X+ exit(2); X+ } X+ X+ if($s !~ /$regexp/) { X+ print "\a${us}Valid $name tags must match the regexp " . X+ "$regexp.${ue}\n"; X+ return 0; X+ } X+ if($s =~ /^RELENG/) { X+ print "\a${us}Tags must not start with the word \"RELENG\".${ue}\n"; X+ return 0; X+ } X+ X+ return 1; X+} X+ X+ X+&scan_opts; X+&term_init; X+&cvs_init; X+ X+if(! $moduledir) { X+ @dirs = &lsdir("."); X+ print "${so}Import from which directory?${se}\n"; X+ @dirs = (@dirs, "."); X+ &list(@dirs); X+ $moduledir = &Complete("Which? [.]: ", @dirs); X+ $moduledir = "." unless $moduledir ne ""; X+} X+ X+chdir $moduledir || die "Cannot chdir to $moduledir\n"; X+ X+print "${so}Available repositories:${se}\n"; X+&list(@reps); X+ X+# the following kludge prevents the Complete package from starting X+# over with the string just selected; Complete should better provide X+# some reinitialize method X+$Complete'return = ""; $Complete'r = 0; X+ X+$selected = X+ &Complete("Enter repository (=complete, ^D=show): ", X+ @reps); X+ X+die "\aYou cannot create new repositories with this script.\n" X+ unless &contains($selected, @reps); X+ X+$rep = $selected; X+ X+print "\n${so}Selected repository:${se} ${us}$rep${ue}\n"; X+ X+ X+@areas = &lsdir("$cvsroot/$rep"); X+ X+print "${so}Existent areas in this repository:${se}\n"; X+&list(@areas); X+ X+$Complete'return = ""; $Complete'r = 0; X+ X+$selected = X+ &Complete("Enter area name (=complete, ^D=show): ", X+ @areas); X+ X+print "\a${us}Warning: this will create a new area.${ue}\n" X+ unless &contains($selected, @areas); X+ X+$area = "$rep/$selected"; X+ X+print "\n${so}[Working on:${se} ${us}$area${ue}${so}]${se}\n"; X+ X+%cvsmods = &lsmodules(); X+ X+for(;;) { X+ $| = 1; X+ print "${so}Gimme the module name:${se} "; X+ $| = 0; X+ $modname = <>; X+ chop $modname; X+ if ($modname eq "") { X+ print "\a${us}You cannot use an empty module name.${ue}\n"; X+ next; X+ } X+ last if !$cvsmods{$modname}; X+ print "\a${us}This module name does already exist; do you intend to\n" . X+ "perform a vendor-branch import to the existing sources?${ue}: "; X+ $rep = <>; X+ if ($rep =~ /\s*[yY]/) { X+ ($area,$modpath) = split(/\//,$cvsmods{$modname},2); X+ $branchimport = 1; X+ last; X+ } X+ print "${us}Choose another name.${ue}\n"; X+} X+ X+ X+if(!$branchimport) { X+ for(;;) { X+ $| = 1; X+ print "${so}Enter the module path:${se} $area/"; X+ $| = 0; X+ $modpath = <>; X+ chop $modpath; X+ if ($modpath eq "") { X+ print "\a${us}You cannot use an empty module path.${ue}\n"; X+ next; X+ } X+ last if ! -d "$cvsroot/$area/$modpath"; X+ print "\a${us}This module path does already exist; " . X+ "choose another one.${ue}\n"; X+ } X+ X+ X+ @newdirs = (); X+ $dir1 = "$cvsroot/$area"; X+ $dir2 = "$area"; X+ X+ @newdirs = (@newdirs, "$dir2") if ! -d $dir1; X+ X+ foreach $ele (split(/\//, $modpath)) { X+ $dir1 = "$dir1/$ele"; X+ $dir2 = "$dir2/$ele"; X+ @newdirs = (@newdirs, "$dir2") if ! -d $dir1; X+ } X+ X+ print "${so}You're going to create the following new directories:${se}\n"; X+ X+ &list(@newdirs); X+} X+ X+for(;;) { X+ $| = 1; X+ print "${so}Enter a \`vendor\' tag (e. g. the authors ID):${se} "; X+ $| = 0; X+ $vtag = <>; X+ chop $vtag; X+ last if &checktag($vtag, "vendor"); X+} X+ X+for(;;) { X+ $| = 1; X+ print "${so}Enter a \`release\' tag (e. g. the version #):${se} "; X+ $| = 0; X+ $rtag = <>; X+ chop $rtag; X+ last if &checktag($rtag, "release"); X+} X+ X+ X+$| = 1; X+print "${so}This is your last chance to interrupt, " . X+ "hit to go on:${se} "; X+$| = 0; X+<>; X+ X+if (!$branchimport) { X+ $mod = ""; X+ foreach $tmp (sort(keys(%cvsmods))) { X+ if($tmp gt $modname) { X+ $mod = $tmp; X+ last; X+ } X+ } X+ if($mod eq "") { X+ # we are going to append our module X+ $cmd = "\$\na\n"; X+ } else { X+ # we can insert it X+ $cmd = "/^${mod}[ \t]/\ni\n"; X+ } X+ X+ print "${so}Checking out the modules database...${se}\n"; X+ system("cvs co modules") && die "${us}failed.\n${ue}"; X+ X+ print "${so}Inserting new module...${se}\n"; X+ open(ED, "|ed modules/modules") || die "${us}Cannot start ed${ue}\n"; X+ print(ED "${cmd}${modname} " . ' ' x (15 - length($modname)) . X+ "$area/${modpath}\n.\nw\nq\n"); X+ close(ED); X+ X+ print "${so}Commiting new modules database...${se}\n"; X+ system("cvs $dont_do_it commit -m \" " . X+ "${modname} --> $area/${modpath}\" modules") X+ && die "Commit failed\n"; X+ X+ # we always release "modules" to prevent duplicate X+ system("cvs -Q release -d modules"); X+} X+ X+print "${so}Importing source. Enter a commit message in the editor.${se}\n"; X+ X+system("cvs $dont_do_it import $area/$modpath $vtag $rtag"); X+ X+print "${so}You are done now. Go to a different directory, perform a${se}\n". X+ "${us}cvs co ${modname}${ue} ${so}command, and see if your new module" . X+ " builds ok.${se}\n"; X+ X+print "\nPlease don't forget to edit the parent Makefile to add what you\n". X+ "just imported.\n"; X+ X+if($dont_do_it) { X+print <cvs/files/patch-doc::cvs.texinfo << 'END-of-cvs/files/patch-doc::cvs.texinfo' X--- doc/cvs.texinfo.orig Sun Sep 5 19:14:04 2004 X+++ doc/cvs.texinfo Sun Sep 5 19:19:20 2004 X@@ -14048,6 +14048,11 @@ X @xref{verifymsg}, for more information on how verifymsg X may be used. X X+@cindex tag, in CVSROOT/config X+@item tag=@var{value} X+Enable an additional keyword that gets expanded on checkout; X+any string is legal. X+ X @cindex UserAdminOptions, in CVSROOT/config X @item UserAdminOptions=@var{value} X Control what options will be allowed with the @code{cvs admin} X@@ -14126,6 +14131,11 @@ X It has the same effect as if the @samp{-R} command-line X option is used. This can also allow the use of X read-only NFS repositories. X+ X+@cindex CVSOPTIONS, environment variable X+@item $CVSOPTIONS X+A whitespace-separated list of options prepended to X+the global options (@pxref{Global options}). X X @item $CVSUMASK X Controls permissions of files in the repository. See END-of-cvs/files/patch-doc::cvs.texinfo echo x - cvs/files/patch-lib::md5.c sed 's/^X//' >cvs/files/patch-lib::md5.c << 'END-of-cvs/files/patch-lib::md5.c' X--- lib/md5.c.orig Sat Jul 19 18:32:40 2003 X+++ lib/md5.c Sun Sep 5 15:12:25 2004 X@@ -34,6 +34,8 @@ X X #include /* for memcpy() and memset() */ X X+#ifndef __FreeBSD__ X+ X #include "md5.h" X X /* Little-endian byte-swapping routines. Note that these do not X@@ -286,6 +288,7 @@ X buf[2] += c; X buf[3] += d; X } X+#endif X #endif X X #ifdef TEST END-of-cvs/files/patch-lib::md5.c echo x - cvs/files/patch-lib::md5.h sed 's/^X//' >cvs/files/patch-lib::md5.h << 'END-of-cvs/files/patch-lib::md5.h' X--- lib/md5.h.orig Sun Sep 5 11:19:00 2004 X+++ lib/md5.h Sun Sep 5 11:22:16 2004 X@@ -3,6 +3,15 @@ X #ifndef MD5_H X #define MD5_H X X+#ifdef __FreeBSD__ X+#include X+#define cvs_MD5Context MD5Context X+#define cvs_MD5Init(c) MD5Init(c) X+#define cvs_MD5Update(c,b,l) MD5Update(c,b,l) X+#define cvs_MD5Final(d,c) MD5Final(d,c) X+#define cvs_MD5Transform(b,i) MD5Transform(b,i) X+#else X+ X /* Unlike previous versions of this code, uint32 need not be exactly X 32 bits, merely 32 bits or more. Choosing a data type which is 32 X bits instead of 64 is not important; speed is considerably more X@@ -22,5 +31,7 @@ X void cvs_MD5Final (unsigned char digest[16], X struct cvs_MD5Context *context); X void cvs_MD5Transform (cvs_uint32 buf[4], const unsigned char in[64]); X+ X+#endif X X #endif /* !MD5_H */ END-of-cvs/files/patch-lib::md5.h echo x - cvs/files/patch-src::Makefile.in sed 's/^X//' >cvs/files/patch-src::Makefile.in << 'END-of-cvs/files/patch-src::Makefile.in' X--- src/Makefile.in.orig Sun Sep 5 14:55:28 2004 X+++ src/Makefile.in Sun Sep 5 14:59:05 2004 X@@ -222,6 +222,7 @@ X no_diff.c \ X parseinfo.c \ X patch.c \ X+ prepend_args.c \ X rcs.c \ X rcscmds.c \ X recurse.c \ X@@ -253,6 +254,7 @@ X hash.h \ X history.h \ X myndbm.h \ X+ prepend_args.h \ X rcs.h \ X root.h \ X server.h \ X@@ -308,7 +310,7 @@ X log-buffer.$(OBJEXT) login.$(OBJEXT) logmsg.$(OBJEXT) \ X ls.$(OBJEXT) main.$(OBJEXT) mkmodules.$(OBJEXT) \ X modules.$(OBJEXT) myndbm.$(OBJEXT) no_diff.$(OBJEXT) \ X- parseinfo.$(OBJEXT) patch.$(OBJEXT) rcs.$(OBJEXT) \ X+ parseinfo.$(OBJEXT) patch.$(OBJEXT) prepend_args.$(OBJEXT) rcs.$(OBJEXT) \ X rcscmds.$(OBJEXT) recurse.$(OBJEXT) release.$(OBJEXT) \ X remove.$(OBJEXT) repos.$(OBJEXT) root.$(OBJEXT) \ X rsh-client.$(OBJEXT) run.$(OBJEXT) scramble.$(OBJEXT) \ X@@ -345,6 +347,7 @@ X @AMDEP_TRUE@ ./$(DEPDIR)/mkmodules.Po ./$(DEPDIR)/modules.Po \ X @AMDEP_TRUE@ ./$(DEPDIR)/myndbm.Po ./$(DEPDIR)/no_diff.Po \ X @AMDEP_TRUE@ ./$(DEPDIR)/parseinfo.Po ./$(DEPDIR)/patch.Po \ X+@AMDEP_TRUE@ ./$(DEPDIR)/prepend_args.Po \ X @AMDEP_TRUE@ ./$(DEPDIR)/rcs.Po ./$(DEPDIR)/rcscmds.Po \ X @AMDEP_TRUE@ ./$(DEPDIR)/recurse.Po ./$(DEPDIR)/release.Po \ X @AMDEP_TRUE@ ./$(DEPDIR)/remove.Po ./$(DEPDIR)/repos.Po \ X@@ -472,6 +475,7 @@ X @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/no_diff.Po@am__quote@ X @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parseinfo.Po@am__quote@ X @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/patch.Po@am__quote@ X+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prepend_args.Po@am__quote@ X @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rcs.Po@am__quote@ X @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rcscmds.Po@am__quote@ X @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/recurse.Po@am__quote@ END-of-cvs/files/patch-src::Makefile.in echo x - cvs/files/patch-src::add.c sed 's/^X//' >cvs/files/patch-src::add.c << 'END-of-cvs/files/patch-src::add.c' X--- src/add.c.orig Mon Sep 6 14:04:08 2004 X+++ src/add.c Mon Sep 6 14:04:28 2004 X@@ -837,7 +837,7 @@ X X #ifdef SERVER_SUPPORT X if (server_active) X- WriteTemplate (finfo->fullname, 1, rcsdir); X+ WriteTemplate (".", 1, finfo->fullname, rcsdir); X else X #endif X Create_Admin (".", finfo->fullname, rcsdir, tag, date, nonbranch, 0, 1); END-of-cvs/files/patch-src::add.c echo x - cvs/files/patch-src::commit.c sed 's/^X//' >cvs/files/patch-src::commit.c << 'END-of-cvs/files/patch-src::commit.c' X--- src/commit.c.orig Mon Sep 6 14:08:47 2004 X+++ src/commit.c Mon Sep 6 14:09:16 2004 X@@ -1532,7 +1532,7 @@ X } X mkmodules (admin_dir); X free (admin_dir); X- WriteTemplate (".", 1, repository); X+ WriteTemplate (".", 1, update_dir, repository); X } X } X END-of-cvs/files/patch-src::commit.c echo x - cvs/files/patch-src::create_adm.c sed 's/^X//' >cvs/files/patch-src::create_adm.c << 'END-of-cvs/files/patch-src::create_adm.c' X--- src/create_adm.c.orig Mon Sep 6 14:38:41 2004 X+++ src/create_adm.c Mon Sep 6 14:40:41 2004 X@@ -154,6 +154,8 @@ X /* Create a new CVS/Tag file */ X WriteTag (dir, tag, date, nonbranch, update_dir, repository); X X+ WriteTemplate (dir, dotemplate, update_dir, repository); X+ X TRACE (1, "Create_Admin"); X X free (reposcopy); END-of-cvs/files/patch-src::create_adm.c echo x - cvs/files/patch-src::cvs.h sed 's/^X//' >cvs/files/patch-src::cvs.h << 'END-of-cvs/files/patch-src::cvs.h' X--- src/cvs.h.orig Wed Jun 9 16:52:38 2004 X+++ src/cvs.h Mon Sep 6 14:02:36 2004 X@@ -166,6 +166,7 @@ X #define CVSROOTADM_WRITERS "writers" X #define CVSROOTADM_PASSWD "passwd" X #define CVSROOTADM_CONFIG "config" X+#define CVSROOTADM_OPTIONS "options" X X #define CVSNULLREPOS "Emptydir" /* an empty directory */ X X@@ -352,6 +353,7 @@ X extern int use_editor; X extern int cvswrite; X extern mode_t cvsumask; X+extern char *RCS_citag; X X X X@@ -372,6 +374,7 @@ X extern int noexec; /* Don't modify disk anywhere */ X extern int readonlyfs; /* fail on all write locks; succeed all read locks */ X extern int logoff; /* Don't write history entry */ X+extern int require_real_user; /* skip CVSROOT/passwd, /etc/passwd users only*/ X X extern int top_level_admin; X #ifdef SUPPORT_OLD_INFO_FMT_STRINGS X@@ -493,6 +496,7 @@ X char *strcat_filename_onto_homedir (const char *, const char *); X char *cvs_temp_name (void); X FILE *cvs_temp_file (char **filename); X+void parseopts (const char *root); X X int numdots (const char *s); X char *increment_revnum (const char *); X@@ -576,7 +580,7 @@ X void ParseTag (char **tagp, char **datep, int *nonbranchp); X void WriteTag (const char *dir, const char *tag, const char *date, X int nonbranch, const char *update_dir, const char *repository); X-void WriteTemplate (const char *update_dir, int dotemplate, X+void WriteTemplate (const char *dir, int dotemplate, const char *update_dir, X const char *repository); X void cat_module (int status); X void check_entries (char *dir); END-of-cvs/files/patch-src::cvs.h echo x - cvs/files/patch-src::diff.c sed 's/^X//' >cvs/files/patch-src::diff.c << 'END-of-cvs/files/patch-src::diff.c' X--- src/diff.c.orig Mon Mar 22 16:37:34 2004 X+++ src/diff.c Sun Sep 5 14:50:35 2004 X@@ -47,6 +47,7 @@ X static char *diff_rev1, *diff_rev2; X /* Command line dates, from -D option. Malloc'd. */ X static char *diff_date1, *diff_date2; X+static char *diff_join1, *diff_join2; X static char *use_rev1, *use_rev2; X static int have_rev1_label, have_rev2_label; X X@@ -265,6 +266,8 @@ X diff_rev2 = NULL; X diff_date1 = NULL; X diff_date2 = NULL; X+ diff_join1 = NULL; X+ diff_join2 = NULL; X X optind = 0; X /* FIXME: This should really be allocating an argv to be passed to diff X@@ -275,7 +278,7 @@ X * to diff. X */ X while ((c = getopt_long (argc, argv, X- "+abcdefhilnpstuwy0123456789BHNRTC:D:F:I:L:U:W:k:r:", X+ "+abcdefhilnpstuwy0123456789BHNRTC:D:F:I:L:U:W:k:r:j:", X longopts, &option_index)) != -1) X { X switch (c) X@@ -338,6 +341,27 @@ X free (options); X options = RCS_check_kflag (optarg); X break; X+ case 'j': X+ { X+ char *ptr; X+ char *cpy = strdup(optarg); X+ X+ if ((ptr = strchr(optarg, ':')) != NULL) X+ *ptr++ = 0; X+ if (diff_rev2 != NULL || diff_date2 != NULL) X+ error (1, 0, X+ "no more than two revisions/dates can be specified"); X+ if (diff_rev1 != NULL || diff_date1 != NULL) { X+ diff_join2 = cpy; X+ diff_rev2 = optarg; X+ diff_date2 = ptr ? Make_Date(ptr) : NULL; X+ } else { X+ diff_join1 = cpy; X+ diff_rev1 = optarg; X+ diff_date1 = ptr ? Make_Date(ptr) : NULL; X+ } X+ } X+ break; X case 'r': X if (diff_rev2 != NULL || diff_date2 != NULL) X error (1, 0, X@@ -386,13 +410,18 @@ X send_option_string (opts); X if (options[0] != '\0') X send_arg (options); X- if (diff_rev1) X+ if (diff_join1) X+ option_with_arg ("-j", diff_join1); X+ else if (diff_rev1) X option_with_arg ("-r", diff_rev1); X- if (diff_date1) X+ else if (diff_date1) X client_senddate (diff_date1); X- if (diff_rev2) X+ X+ if (diff_join2) X+ option_with_arg ("-j", diff_join2); X+ else if (diff_rev2) X option_with_arg ("-r", diff_rev2); X- if (diff_date2) X+ else if (diff_date2) X client_senddate (diff_date2); X send_arg ("--"); X X@@ -406,28 +435,26 @@ X X send_to_server ("diff\012", 0); X err = get_responses_and_close (); X- free (options); X- options = NULL; X- return (err); X- } X+ } else X #endif X- X- if (diff_rev1 != NULL) X- tag_check_valid (diff_rev1, argc, argv, local, 0, ""); X- if (diff_rev2 != NULL) X- tag_check_valid (diff_rev2, argc, argv, local, 0, ""); X- X- which = W_LOCAL; X- if (diff_rev1 != NULL || diff_date1 != NULL) X- which |= W_REPOS | W_ATTIC; X- X- wrap_setup (); X- X- /* start the recursion processor */ X- err = start_recursion X- ( diff_fileproc, diff_filesdoneproc, diff_dirproc, X- diff_dirleaveproc, NULL, argc, argv, local, X- which, 0, CVS_LOCK_READ, (char *) NULL, 1, (char *) NULL ); X+ { X+ if (diff_rev1 != NULL) X+ tag_check_valid (diff_rev1, argc, argv, local, 0, ""); X+ if (diff_rev2 != NULL) X+ tag_check_valid (diff_rev2, argc, argv, local, 0, ""); X+ X+ which = W_LOCAL; X+ if (diff_rev1 != NULL || diff_date1 != NULL) X+ which |= W_REPOS | W_ATTIC; X+ X+ wrap_setup (); X+ X+ /* start the recursion processor */ X+ err = start_recursion X+ ( diff_fileproc, diff_filesdoneproc, diff_dirproc, X+ diff_dirleaveproc, NULL, argc, argv, local, X+ which, 0, CVS_LOCK_READ, (char *) NULL, 1, (char *) NULL ); X+ } X X /* clean up */ X free (options); X@@ -437,6 +464,11 @@ X free (diff_date1); X if (diff_date2 != NULL) X free (diff_date2); X+ if (diff_join1 != NULL) X+ free (diff_join1); X+ if (diff_join2 != NULL) X+ free (diff_join2); X+ X X return (err); X } END-of-cvs/files/patch-src::diff.c echo x - cvs/files/patch-src::entries.c sed 's/^X//' >cvs/files/patch-src::entries.c << 'END-of-cvs/files/patch-src::entries.c' X--- src/entries.c.orig Wed May 12 23:05:28 2004 X+++ src/entries.c Mon Sep 6 23:26:52 2004 X@@ -596,19 +596,38 @@ X X X X+static int root_valid = 0; X+static char *root_template = NULL; X+ X+static int X+get_root_template(const char *repository, const char *path, void *closure) X+{ X+ root_valid = 1; X+ if (root_template) { X+ if (strcmp(path, root_template) == 0) X+ return(0); X+ free(root_template); X+ } X+ if ((root_template = strdup(path)) == NULL) X+ return(-1); X+ return(0); X+} X+ X+ X+ X /* X * Write out the CVS/Template file. X */ X void X-WriteTemplate (const char *update_dir, int xdotemplate, const char *repository) X+WriteTemplate (const char *dir, int xdotemplate, const char *update_dir, const char *repository) X { X-#ifdef SERVER_SUPPORT X TRACE (1, "Write_Template (%s, %s)", update_dir, repository); X X- if (noexec) X+ if (noexec || ! xdotemplate) X return; X X- if (server_active && xdotemplate) X+#ifdef SERVER_SUPPORT X+ if (server_active) X { X /* Clear the CVS/Template if supported to allow for the case X * where the rcsinfo file no longer has an entry for this X@@ -617,7 +636,56 @@ X server_clear_template (update_dir, repository); X server_template (update_dir, repository); X } X+ else X #endif X+ { X+ char *tmp = NULL; X+ struct stat st1; X+ struct stat st2; X+ X+ root_valid = 0; X+ if (Parse_Info(CVSROOTADM_RCSINFO, repository, get_root_template, 1, NULL) < 0) X+ return; X+ X+ if (asprintf(&tmp, "%s/%s", dir, CVSADM_TEMPLATE) < 0) X+ error (1, errno, "out of memory"); X+ X+ if (! root_valid ) { X+ unlink_file (tmp); X+ } X+ else if (stat(root_template, &st1) == 0) { X+ if (stat(tmp, &st2) < 0 || st1.st_size != st2.st_size || \ X+ memcmp(&st1.st_mtimespec, &st2.st_mtimespec, sizeof(struct timespec)) != 0) { X+ FILE *fi; X+ FILE *fo; X+ X+ TRACE (TRACE_DATA, "copy Template (%s)", root_template); X+ if ((fi = open_file(root_template, "r")) != NULL) { X+ if ((fo = open_file(tmp, "w")) != NULL) { X+ int n; X+ char buf[256]; X+ X+ while ((n = fread(buf, 1, sizeof(buf), fi)) > 0) X+ fwrite(buf, 1, n, fo); X+ fflush(fo); X+ if (ferror(fi) || ferror(fo)) { X+ fclose(fo); X+ remove(tmp); X+ error (1, errno, "error copying Template"); X+ } else { X+ struct timeval times[2]; X+ fclose(fo); X+ TIMESPEC_TO_TIMEVAL(times, &st1.st_mtimespec); X+ times[1] = times[0]; X+ utimes(tmp, times); X+ } X+ } X+ fclose(fi); X+ } X+ } X+ } X+ free(tmp); X+ } X X return; X } END-of-cvs/files/patch-src::entries.c echo x - cvs/files/patch-src::filesubr.c sed 's/^X//' >cvs/files/patch-src::filesubr.c << 'END-of-cvs/files/patch-src::filesubr.c' X--- src/filesubr.c.orig Sun Sep 5 13:47:25 2004 X+++ src/filesubr.c Sun Sep 5 13:48:58 2004 X@@ -779,7 +779,7 @@ X xreadlink (const char *link) X { X char *file = NULL; X- int buflen = 128; X+ int buflen = BUFSIZ; X int link_name_len; X X /* Get the name of the file to which `from' is linked. X@@ -788,12 +788,13 @@ X do X { X file = xrealloc (file, buflen); X+ errno = 0; X link_name_len = readlink (link, file, buflen - 1); X buflen *= 2; X } X- while (link_name_len < 0 && errno == ENAMETOOLONG); X+ while (link_name_len == -1 && errno == ENAMETOOLONG); X X- if (link_name_len < 0) X+ if (link_name_len == -1) X error (1, errno, "cannot readlink %s", link); X X file[link_name_len] = '\0'; END-of-cvs/files/patch-src::filesubr.c echo x - cvs/files/patch-src::log.c sed 's/^X//' >cvs/files/patch-src::log.c << 'END-of-cvs/files/patch-src::log.c' X--- src/log.c.orig Sun Sep 5 13:51:14 2004 X+++ src/log.c Sun Sep 5 13:52:34 2004 X@@ -1573,8 +1573,8 @@ X &sec); X if (year < 1900) X year += 1900; X- sprintf (buf, "%04d-%02d-%02d %02d:%02d:%02d +0000", year, mon, mday, X- hour, min, sec); X+ sprintf (buf, "%04d%c%02d%c%02d %02d:%02d:%02d +0000", X+ year, datesep, mon, datesep, mday, hour, min, sec); X cvs_output_tagged ("date", buf); X X cvs_output_tagged ("text", "; author: "); END-of-cvs/files/patch-src::log.c echo x - cvs/files/patch-src::logmsg.c sed 's/^X//' >cvs/files/patch-src::logmsg.c << 'END-of-cvs/files/patch-src::logmsg.c' X--- src/logmsg.c.orig Sun Sep 5 13:53:09 2004 X+++ src/logmsg.c Sun Sep 5 13:53:45 2004 X@@ -229,6 +229,8 @@ X (*messagep)[strlen (*messagep) - 1] != '\n') X (void) fprintf (fp, "\n"); X } X+ else X+ (void) fprintf (fp, "\n"); X X if (repository != NULL) X /* tack templates on if necessary */ END-of-cvs/files/patch-src::logmsg.c echo x - cvs/files/patch-src::main.c sed 's/^X//' >cvs/files/patch-src::main.c << 'END-of-cvs/files/patch-src::main.c' X--- src/main.c.orig Sat May 29 06:49:51 2004 X+++ src/main.c Sun Sep 5 22:04:12 2004 X@@ -14,6 +14,7 @@ X */ X X #include "cvs.h" X+#include "prepend_args.h" X X #ifdef HAVE_WINSOCK_H X # include X@@ -42,6 +43,7 @@ X int trace = 0; X int noexec = 0; X int readonlyfs = 0; X+int require_real_user = 0; X int logoff = 0; X X /* Set if we should be writing CVSADM directories at top level. At X@@ -110,7 +112,7 @@ X { X { "add", "ad", "new", add, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR }, X { "admin", "adm", "rcs", admin, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR }, X- { "annotate", "ann", NULL, annotate, CVS_CMD_USES_WORK_DIR }, X+ { "annotate", "ann", "blame", annotate, CVS_CMD_USES_WORK_DIR }, X { "checkout", "co", "get", checkout, 0 }, X { "commit", "ci", "com", commit, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR }, X { "diff", "di", "dif", diff, CVS_CMD_USES_WORK_DIR }, X@@ -255,6 +257,7 @@ X " -q Cause CVS to be somewhat quiet.\n", X " -r Make checked-out files read-only.\n", X " -w Make checked-out files read-write (default).\n", X+ " -g Force group-write perms on checked-out files.\n", X " -n Do not execute anything that will change the disk.\n", X " -t Show trace of program execution (repeat for more\n", X " verbosity) -- try with -n.\n", X@@ -430,7 +433,7 @@ X int help = 0; /* Has the user asked for help? This X lets us support the `cvs -H cmd' X convention to give help for cmd. */ X- static const char short_options[] = "+QqrwtnRvb:T:e:d:Hfz:s:xa"; X+ static const char short_options[] = "+QqgrwtnRvb:T:e:d:Hfz:s:xaU"; X static struct option long_options[] = X { X {"help", 0, NULL, 'H'}, X@@ -504,6 +507,8 @@ X logoff = 1; X } X X+ prepend_default_options (getenv ("CVS_OPTIONS"), &argc, &argv); X+ X /* Set this to 0 to force getopt initialization. getopt() sets X this to 1 internally. */ X optind = 0; X@@ -565,6 +570,13 @@ X case 'w': X cvswrite = 1; X break; X+ case 'g': X+ /* X+ * force full group write perms (used for shared checked-out X+ * source trees, see manual page) X+ */ X+ umask(umask(077) & 007); X+ break; X case 't': X trace++; X break; X@@ -664,6 +676,9 @@ X We will issue an error later if stream X authentication is not supported. */ X break; X+ case 'U': X+ require_real_user = 1; X+ break; X case '?': X default: X usage (usg); X@@ -676,10 +691,7 @@ X usage (usg); X X if (readonlyfs && !really_quiet) { X- error (0, 0, X- "WARNING: Read-only repository access mode selected via `cvs -R'.\n\ X-Using this option to access a repository which some users write to may\n\ X-cause intermittent sandbox corruption."); X+ TRACE (1, "Read-only repository access mode selected via `cvs -R'"); X } X X /* Look up the command name. */ X@@ -1015,6 +1027,9 @@ X if we didn't, then there would be no way to check in a new X CVSROOT/config file to fix the broken one! */ X parse_config (current_parsed_root->directory); X+ X+ /* Now is a convenient time to read CVSROOT/options */ X+ parseopts(current_parsed_root->directory); X } X X #ifdef CLIENT_SUPPORT X@@ -1301,6 +1316,69 @@ X for (; *cpp; cpp++) X (void) fprintf (stderr, *cpp); X exit (EXIT_FAILURE); X+} X+ X+ X+ X+void X+parseopts(root) X+ const char *root; X+{ X+ char path[PATH_MAX]; X+ int save_errno; X+ char buf[1024]; X+ const char *p; X+ char *q; X+ FILE *fp; X+ X+ if (root == NULL) { X+ printf("no CVSROOT in parseopts\n"); X+ return; X+ } X+ p = strchr (root, ':'); X+ if (p) X+ p++; X+ else X+ p = root; X+ if (p == NULL) { X+ printf("mangled CVSROOT in parseopts\n"); X+ return; X+ } X+ (void) sprintf (path, "%s/%s/%s", p, CVSROOTADM, CVSROOTADM_OPTIONS); X+ if ((fp = fopen(path, "r")) != NULL) { X+ while (fgets(buf, sizeof buf, fp) != NULL) { X+ if (buf[0] == '#') X+ continue; X+ q = strrchr(buf, '\n'); X+ if (q) X+ *q = '\0'; X+ X+ if (!strcmp(buf, "iso8601")) { X+ datesep = '-'; X+ } X+ if (!strncmp(buf, "tag=", 4)) { X+ char *what; X+ char *rcs_localid; X+ X+ rcs_localid = buf + 4; X+ RCS_setlocalid(rcs_localid); X+ } X+ if (!strncmp(buf, "tagexpand=", 10)) { X+ char *what; X+ char *rcs_incexc; X+ X+ rcs_incexc = buf + 10; X+ RCS_setincexc(rcs_incexc); X+ } X+ /* X+ * OpenBSD has a "umask=" and "dlimit=" command, we silently X+ * ignore them here since they are not much use to us. cvsumask X+ * defaults to 002 already, and the dlimit (data size limit) X+ * should really be handled elsewhere (eg: login.conf). X+ */ X+ } X+ fclose(fp); X+ } X } X X /* vim:tabstop=8:shiftwidth=4 END-of-cvs/files/patch-src::main.c echo x - cvs/files/patch-src::mkmodules.c sed 's/^X//' >cvs/files/patch-src::mkmodules.c << 'END-of-cvs/files/patch-src::mkmodules.c' X--- src/mkmodules.c.orig Sat May 29 06:48:52 2004 X+++ src/mkmodules.c Mon Sep 6 10:35:58 2004 X@@ -352,6 +352,23 @@ X NULL X }; X X+static const char *const config_options[] = { X+ "# The \"options\" file controls various FreeBSD extensions.\n", X+ "\n", X+ "# Set `iso8601' to use `-' instead of `/' as a date separator.\n", X+ "#iso8601\n" X+ "\n", X+ "# Set this to the name of a local tag to use in addition to Id\n", X+ "# (equivalent to `LocalKeyword' in " CVSROOTADM_CONFIG ").\n", X+ "#tag=FreeBSD=CVSHeader\n" X+ "\n", X+ "# Set `tagexpand' to a comma separated list of tags that should\n", X+ "# be expanded (`i') or excluded from expansion (`e').\n", X+ "# (equivalent to `KeywordExpand' in " CVSROOTADM_CONFIG ").\n", X+ "#tagexpand=iFreeBSD\n", X+ NULL X+}; X+ X static const struct admin_file filelist[] = { X {CVSROOTADM_LOGINFO, X "no logging of 'cvs commit' messages is done without a %s file", X@@ -411,6 +428,9 @@ X {CVSROOTADM_CONFIG, X "a %s file configures various behaviors", X config_contents}, X+ {CVSROOTADM_OPTIONS, X+ "a %s file configures FreeBSD extensions", X+ config_options}, X {NULL, NULL, NULL} X }; X END-of-cvs/files/patch-src::mkmodules.c echo x - cvs/files/patch-src::parseinfo.c sed 's/^X//' >cvs/files/patch-src::parseinfo.c << 'END-of-cvs/files/patch-src::parseinfo.c' X--- src/parseinfo.c.orig Sun Sep 5 14:13:51 2004 X+++ src/parseinfo.c Sun Sep 5 14:15:57 2004 X@@ -355,6 +355,25 @@ X RCS_setincexc(p); X X } X+ else if (strcmp (line, "tag") == 0) { X+ RCS_setlocalid(p); X+ } X+ else if (strcmp (line, "umask") == 0) { X+ cvsumask = (mode_t)(strtol(p, NULL, 8) & 0777); X+ } X+ else if (strcmp (line, "dlimit") == 0) { X+#ifdef BSD X+#include X+ struct rlimit rl; X+ X+ if (getrlimit(RLIMIT_DATA, &rl) != -1) { X+ rl.rlim_cur = atoi(p); X+ rl.rlim_cur *= 1024; X+ X+ (void) setrlimit(RLIMIT_DATA, &rl); X+ } X+#endif /* BSD */ X+ } X else if (strcmp (line, "PreservePermissions") == 0) X { X if (strcmp (p, "no") == 0) END-of-cvs/files/patch-src::parseinfo.c echo x - cvs/files/patch-src::prepend_args.c sed 's/^X//' >cvs/files/patch-src::prepend_args.c << 'END-of-cvs/files/patch-src::prepend_args.c' X--- src/prepend_args.c.orig Sun Sep 5 15:13:27 2004 X+++ src/prepend_args.c Sun Sep 5 15:17:13 2004 X@@ -0,0 +1,78 @@ X+/* prepend_args.c - utilility programs for manpiulating argv[] X+ Copyright (C) 1999 Free Software Foundation, Inc. X+ X+ This program is free software; you can redistribute it and/or modify X+ it under the terms of the GNU General Public License as published by X+ the Free Software Foundation; either version 2, or (at your option) X+ any later version. X+ X+ This program is distributed in the hope that it will be useful, X+ but WITHOUT ANY WARRANTY; without even the implied warranty of X+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the X+ GNU General Public License for more details. X+ X+ You should have received a copy of the GNU General Public License X+ along with this program; if not, write to the Free Software X+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA X+ 02111-1307, USA. */ X+ X+ X+#ifdef HAVE_CONFIG_H X+# include X+#endif X+#include "cvs.h" X+#include "prepend_args.h" X+ X+ X+/* Find the white-space-separated options specified by OPTIONS, and X+ using BUF to store copies of these options, set ARGV[0], ARGV[1], X+ etc. to the option copies. Return the number N of options found. X+ Do not set ARGV[N] to NULL. If ARGV is NULL, do not store ARGV[0] X+ etc. Backslash can be used to escape whitespace (and backslashes). */ X+static int X+prepend_args (char const *options, char *buf, char **argv) X+{ X+ char const *o = options; X+ char *b = buf; X+ int n = 0; X+ X+ for (;;) X+ { X+ while (isspace ((unsigned char) *o)) X+ o++; X+ if (!*o) X+ return n; X+ if (argv) X+ argv[n] = b; X+ n++; X+ X+ do X+ if ((*b++ = *o++) == '\\' && *o) X+ b[-1] = *o++; X+ while (*o && ! isspace ((unsigned char) *o)); X+ X+ *b++ = '\0'; X+ } X+} X+ X+/* Prepend the whitespace-separated options in OPTIONS to the argument X+ vector of a main program with argument count *PARGC and argument X+ vector *PARGV. */ X+void X+prepend_default_options (char const *options, int *pargc, char ***pargv) X+{ X+ if (options) X+ { X+ char *buf = xmalloc (strlen (options) + 1); X+ int prepended = prepend_args (options, buf, (char **) NULL); X+ int argc = *pargc; X+ char * const *argv = *pargv; X+ char **pp = (char **) xmalloc ((prepended + argc + 1) * sizeof *pp); X+ *pargc = prepended + argc; X+ *pargv = pp; X+ *pp++ = *argv++; X+ pp += prepend_args (options, buf, pp); X+ while ((*pp++ = *argv++)) X+ continue; X+ } X+} END-of-cvs/files/patch-src::prepend_args.c echo x - cvs/files/patch-src::prepend_args.h sed 's/^X//' >cvs/files/patch-src::prepend_args.h << 'END-of-cvs/files/patch-src::prepend_args.h' X--- src/prepend_args.h.orig Sun Sep 5 15:13:27 2004 X+++ src/prepend_args.h Sun Sep 5 15:17:40 2004 X@@ -0,0 +1,19 @@ X+/* prepend_args.h - utilility programs for manpiulating argv[] X+ Copyright (C) 1999 Free Software Foundation, Inc. X+ X+ This program is free software; you can redistribute it and/or modify X+ it under the terms of the GNU General Public License as published by X+ the Free Software Foundation; either version 2, or (at your option) X+ any later version. X+ X+ This program is distributed in the hope that it will be useful, X+ but WITHOUT ANY WARRANTY; without even the implied warranty of X+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the X+ GNU General Public License for more details. X+ X+ You should have received a copy of the GNU General Public License X+ along with this program; if not, write to the Free Software X+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA X+ 02111-1307, USA. */ X+ X+void prepend_default_options (char const *options, int *pargc, char ***pargv); END-of-cvs/files/patch-src::prepend_args.h echo x - cvs/files/patch-src::rcs.c sed 's/^X//' >cvs/files/patch-src::rcs.c << 'END-of-cvs/files/patch-src::rcs.c' X--- src/rcs.c.orig Sun Sep 5 14:19:56 2004 X+++ src/rcs.c Sun Sep 5 14:25:39 2004 X@@ -23,6 +23,7 @@ X # endif X #endif X X+int datesep = '/'; X int preserve_perms = 0; X X /* The RCS -k options, and a set of enums that must match the array. X@@ -3401,8 +3402,8 @@ X &sec); X if (year < 1900) X year += 1900; X- sprintf (buf, "%04d/%02d/%02d %02d:%02d:%02d", year, mon, mday, X- hour, min, sec); X+ sprintf (buf, "%04d%c%02d%c%02d %02d:%02d:%02d", X+ year, datesep, mon, datesep, mday, hour, min, sec); X return xstrdup (buf); X } X END-of-cvs/files/patch-src::rcs.c echo x - cvs/files/patch-src::rcs.h sed 's/^X//' >cvs/files/patch-src::rcs.h << 'END-of-cvs/files/patch-src::rcs.h' X--- src/rcs.h.orig Sun Sep 5 14:25:47 2004 X+++ src/rcs.h Sun Sep 5 14:26:21 2004 X@@ -242,6 +242,7 @@ X void RCS_setlocalid (const char *arg); X char *make_file_label (const char *, const char *, RCSNode *); X X+extern int datesep; X extern int preserve_perms; X X /* From import.c. */ END-of-cvs/files/patch-src::rcs.h echo x - cvs/files/patch-src::root.c sed 's/^X//' >cvs/files/patch-src::root.c << 'END-of-cvs/files/patch-src::root.c' X--- src/root.c.orig Mon Sep 6 01:13:01 2004 X+++ src/root.c Mon Sep 6 01:15:27 2004 X@@ -508,7 +508,7 @@ X newroot->isremote = (newroot->method != local_method); X X if (readonlyfs && newroot->isremote) X- error (1, 0, X+ TRACE (1, X "Read-only repository feature unavailable with remote roots (cvsroot = %s)", X cvsroot_copy); X END-of-cvs/files/patch-src::root.c echo x - cvs/files/patch-src::sanity.sh sed 's/^X//' >cvs/files/patch-src::sanity.sh << 'END-of-cvs/files/patch-src::sanity.sh' X--- src/sanity.sh.orig Wed Jun 9 16:52:38 2004 X+++ src/sanity.sh Tue Sep 7 01:53:08 2004 X@@ -325,13 +325,13 @@ X echo "No such file or file not readable: $remotehost:${testcvs}" >&2 X exit 1 X fi X- if $CVS_RSH $remotehost "${servercvs} --version /dev/null | X- grep '^Concurrent Versions System' >/dev/null 2>&1"; then :; else X+ if $CVS_RSH $remotehost "${servercvs} --version" /dev/null | X+ grep '^Concurrent Versions System' >/dev/null 2>&1; then :; else X echo "Not a CVS executable: $remotehost:${servercvs}" >&2 X exit 1 X fi X- if $CVS_RSH $remotehost "${servercvs} --version /dev/null 2>&1"; then :; else X+ if $CVS_RSH $remotehost "${servercvs} --version" /dev/null 2>&1; then :; else X echo "CVS executable \`$remotehost:${servercvs}' does not contain server support." >&2 X exit 1 X fi X@@ -495,21 +495,6 @@ X # X CVS="${testcvs} -Q" X X-LOGFILE=`pwd`/check.log X- X-# Save the previous log in case the person running the tests decides X-# they want to look at it. The extension ".plog" is chosen for consistency X-# with dejagnu. X-if test -f check.log; then X- mv check.log check.plog X-fi X- X-# Create the log file so check.log can be tailed almost immediately after X-# this script is started. Otherwise it can take up to a minute or two before X-# the log file gets created when $remotehost is specified on some systems, X-# which makes for a lot of failed `tail -f' attempts. X-touch check.log X- X # The default value of /tmp/cvs-sanity for TESTDIR is dubious, X # because it loses if two people/scripts try to run the tests X # at the same time. Some possible solutions: X@@ -571,6 +556,21 @@ X fi X cd ${TESTDIR} X X+LOGFILE=`pwd`/check.log X+ X+# Save the previous log in case the person running the tests decides X+# they want to look at it. The extension ".plog" is chosen for consistency X+# with dejagnu. X+if test -f check.log; then X+ mv check.log check.plog X+fi X+ X+# Create the log file so check.log can be tailed almost immediately after X+# this script is started. Otherwise it can take up to a minute or two before X+# the log file gets created when $remotehost is specified on some systems, X+# which makes for a lot of failed `tail -f' attempts. X+touch check.log X+ X # Now set $TMPDIR if the user hasn't overridden it. X # X # We use a $TMPDIR under $TESTDIR by default so that two tests may be run at X@@ -2053,8 +2053,8 @@ X X if $remote; then X dotest version-2r "${testcvs} version" \ X-'Client: Concurrent Versions System (CVS) [0-9p.]* (client.*) X-Server: Concurrent Versions System (CVS) [0-9p.]* (.*server)' X+'Client: Concurrent Versions System (CVS) [0-9.]*.* (client.*) X+Server: Concurrent Versions System (CVS) [0-9.]*.* (.*server)' X else X dotest version-2 "${testcvs} version" \ X 'Concurrent Versions System (CVS) [0-9.]*.*' X@@ -3867,6 +3867,7 @@ X loginfo X modules X notify X+options X rcsinfo X taginfo X verifymsg" X@@ -3882,6 +3883,7 @@ X loginfo X modules X notify X+options X rcsinfo X taginfo X verifymsg" X@@ -3900,6 +3902,7 @@ X loginfo X modules X notify X+options X rcsinfo X taginfo X verifymsg" X@@ -3921,6 +3924,7 @@ X loginfo X modules X notify X+options X rcsinfo X taginfo X verifymsg X@@ -6649,6 +6653,7 @@ X loginfo X modules X notify X+options X rcsinfo X taginfo X verifymsg X@@ -6675,6 +6680,7 @@ X ---- $ISO8601DATE 1\.[0-9][0-9]* loginfo X ---- $ISO8601DATE 1\.[0-9][0-9]* modules X ---- $ISO8601DATE 1\.[0-9][0-9]* notify X+---- $ISO8601DATE 1\.[0-9][0-9]* options X ---- $ISO8601DATE 1\.[0-9][0-9]* rcsinfo X ---- $ISO8601DATE 1\.[0-9][0-9]* taginfo X ---- $ISO8601DATE 1\.[0-9][0-9]* verifymsg X@@ -6701,6 +6707,7 @@ X /loginfo/1\.[0-9][0-9]*/$DATE// X /modules/1\.[0-9][0-9]*/$DATE// X /notify/1\.[0-9][0-9]*/$DATE// X+/options/1\.[0-9][0-9]*/$DATE// X /rcsinfo/1\.[0-9][0-9]*/$DATE// X /taginfo/1\.[0-9][0-9]*/$DATE// X /verifymsg/1\.[0-9][0-9]*/$DATE// X@@ -6726,6 +6733,7 @@ X loginfo X modules X notify X+options X rcsinfo X taginfo X verifymsg X@@ -10780,6 +10788,7 @@ X U CVSROOT/loginfo X U CVSROOT/modules X U CVSROOT/notify X+U CVSROOT/options X U CVSROOT/rcsinfo X U CVSROOT/taginfo X U CVSROOT/verifymsg' X@@ -10894,6 +10903,7 @@ X U CVSROOT/loginfo X U CVSROOT/modules X U CVSROOT/notify X+U CVSROOT/options X U CVSROOT/rcsinfo X U CVSROOT/taginfo X U CVSROOT/verifymsg' X@@ -10915,6 +10925,7 @@ X U CVSROOT/loginfo X U CVSROOT/modules X U CVSROOT/notify X+U CVSROOT/options X U CVSROOT/rcsinfo X U CVSROOT/taginfo X U CVSROOT/verifymsg' X@@ -10939,6 +10950,7 @@ X U CVSROOT/loginfo X U CVSROOT/modules X U CVSROOT/notify X+U CVSROOT/options X U CVSROOT/rcsinfo X U CVSROOT/taginfo X U CVSROOT/verifymsg' X@@ -10996,6 +11008,7 @@ X U CVSROOT/loginfo X U CVSROOT/modules X U CVSROOT/notify X+U CVSROOT/options X U CVSROOT/rcsinfo X U CVSROOT/taginfo X U CVSROOT/verifymsg" X@@ -11763,6 +11776,7 @@ X U CVSROOT/loginfo X U CVSROOT/modules X U CVSROOT/notify X+U CVSROOT/options X U CVSROOT/rcsinfo X U CVSROOT/taginfo X U CVSROOT/verifymsg" X@@ -14041,6 +14055,8 @@ X C CVSROOT/modules X ${CPROG} checkout: move away \`CVSROOT/notify'; it is in the way X C CVSROOT/notify X+${CPROG} checkout: move away \`CVSROOT/options'; it is in the way X+C CVSROOT/options X ${CPROG} checkout: move away \`CVSROOT/rcsinfo'; it is in the way X C CVSROOT/rcsinfo X ${CPROG} checkout: move away \`CVSROOT/taginfo'; it is in the way X@@ -14179,6 +14195,7 @@ X revision 1\.1 X date: ${ISO8601DATE}; author: ${username}; state: Exp; X branches: 1\.1\.2; X+x X xCVS: ---------------------------------------------------------------------- X xCVS: Enter Log. Lines beginning with .CVS:. are removed automatically X xCVS: X@@ -14190,6 +14207,7 @@ X ---------------------------- X revision 1\.1\.2\.1 X date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0 X+x X xCVS: ---------------------------------------------------------------------- X xCVS: Enter Log. Lines beginning with .CVS:. are removed automatically X xCVS: X@@ -14217,6 +14235,7 @@ X revision 1\.1 X date: ${ISO8601DATE}; author: ${username}; state: Exp; X branches: 1\.1\.2; X+x X xCVS: ---------------------------------------------------------------------- X xCVS: Enter Log. Lines beginning with .CVS:. are removed automatically X xCVS: X@@ -14228,6 +14247,7 @@ X ---------------------------- X revision 1\.1\.2\.1 X date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0 X+x X xCVS: ---------------------------------------------------------------------- X xCVS: Enter Log. Lines beginning with .CVS:. are removed automatically X xCVS: X@@ -14249,6 +14269,7 @@ X revision 1\.1 X date: ${ISO8601DATE}; author: ${username}; state: Exp; X branches: 1\.1\.2; X+x X xCVS: ---------------------------------------------------------------------- X xCVS: Enter Log. Lines beginning with .CVS:. are removed automatically X xCVS: X@@ -14260,6 +14281,7 @@ X ---------------------------- X revision 1\.1\.2\.1 X date: ${ISO8601DATE}; author: ${username}; state: Exp; lines: ${PLUS}1 -0 X+x X xCVS: ---------------------------------------------------------------------- X xCVS: Enter Log. Lines beginning with .CVS:. are removed automatically X xCVS: X@@ -19136,13 +19158,13 @@ X CVS_SERVER=$TESTDIR/cvs-setHome; export CVS_SERVER X X if test -n "$remotehost"; then X- CREREPOS_ROOT=:ext:$remotehost${TESTDIR}/crerepos X+ host="$remotehost" X else X- CREREPOS_ROOT=:ext:`hostname`:${TESTDIR}/crerepos X+ host="`hostname`" X fi X+ CREREPOS_ROOT=:ext:$host:${TESTDIR}/crerepos X X # If we're going to do remote testing, make sure 'rsh' works first. X- host="`hostname`" X if test "x`${CVS_RSH} $host -n 'echo hi'`" != "xhi"; then X echo "ERROR: cannot test remote CVS, because \`${CVS_RSH} $host' fails." >&2 X exit 1 X@@ -20722,7 +20744,7 @@ X # course, bogus, but that is the way it is currently. X if test -n "$remotehost"; then X dotest modes-10remotehost "$CVS_RSH $remotehost 'ls -l ${CVSROOT_DIRNAME}/first-dir/ab,v'" \ X-"-r--r--r--.*" X+"-r-.r-.r-..*" X else X dotest modes-10r "ls -l ${CVSROOT_DIRNAME}/first-dir/ab,v" \ X "-r-xr-x---.*" "-r-xr-xr-x.*" X@@ -26342,21 +26364,17 @@ X dotest multiroot2-9a "${testcvs} -t update" \ X " *-> parse_cvsroot ( ${TESTDIR}/root1 ) X *-> main loop with CVSROOT=${TESTDIR}/root1 X- *-> Write_Template (\., ${TESTDIR}/root1) X ${CPROG} update: Updating \. X *-> Reader_Lock(${TESTDIR}/root1) X *-> Simple_Lock_Cleanup() X- *-> Write_Template (dir1, ${TESTDIR}/root1/dir1) X ${CPROG} update: Updating dir1 X *-> Reader_Lock(${TESTDIR}/root1/dir1) X *-> Simple_Lock_Cleanup() X *-> parse_cvsroot ( ${TESTDIR}/root2 ) X *-> main loop with CVSROOT=${TESTDIR}/root2 X- *-> Write_Template (dir1/sdir, ${TESTDIR}/root2/dir1/sdir) X ${CPROG} update: Updating dir1/sdir X *-> Reader_Lock(${TESTDIR}/root2/sdir) X *-> Simple_Lock_Cleanup() X- *-> Write_Template (dir1/sdir/ssdir, ${TESTDIR}/root2/sdir/ssdir) X ${CPROG} update: Updating dir1/sdir/ssdir X *-> Reader_Lock(${TESTDIR}/root2/sdir/ssdir) X *-> Simple_Lock_Cleanup() X@@ -27932,7 +27950,7 @@ X # Make sure we get the update without a commit. X dotest template-rcsinfo-3 "${testcvs} -Q ci -m." '' X # Did the CVSROOT/CVS/Template file get the updated version? X- if $remote; then X+ if true; then X dotest template-rcsinfo-4r \ X "cmp CVS/Template ${TESTDIR}/template/temp.def" '' X else X@@ -27943,7 +27961,7 @@ X echo "^first ${TESTDIR}/template/temp.first" >>rcsinfo X dotest template-rcsinfo-4.1 "${testcvs} -Q ci -m. rcsinfo" X # Did the CVSROOT/CVS/Template file get the updated version? X- if $remote; then X+ if true; then X dotest template-rcsinfo-5r \ X "cmp CVS/Template ${TESTDIR}/template/temp.def" '' X else X@@ -27959,7 +27977,7 @@ X ${SPROG} checkout: Updating first/subdir X ${SPROG} checkout: Updating second" X X- if $remote; then X+ if true; then X # When in client/server CVS/Template must exist X dotest template-first-r-1 "test -f first/CVS/Template" '' X dotest template-first-r-2 "test -f first/subdir/CVS/Template" '' X@@ -27985,7 +28003,7 @@ X mkdir otherdir X dotest template-add-1 "${testcvs} add otherdir" \ X "Directory ${CVSROOT_DIRNAME}/second/otherdir added to the repository" X- if $remote; then X+ if true; then X dotest template-add-2r \ X "cmp otherdir/CVS/Template ${TESTDIR}/template/temp.def" '' X else X@@ -27999,13 +28017,13 @@ X echo 'CVS: Line two' >> ${TESTDIR}/template/temp.def X echo 'CVS: Line two' >> ${TESTDIR}/template/temp.first X echo 'CVS: Line two' >> ${TESTDIR}/template/temp.subdir X- dotest template-second "${testcvs} update first second" \ X+ dotest template-second "${testcvs} update -T first second" \ X "${SPROG} update: Updating first X ${SPROG} update: Updating first/subdir X ${SPROG} update: Updating second X ${SPROG} update: Updating second/otherdir" X X- if $remote; then X+ if true; then X dotest template-second-r-1 \ X "cmp first/CVS/Template ${TESTDIR}/template/temp.first" '' X dotest template-second-r-2 \ X@@ -28024,11 +28042,11 @@ X fi X # Update the remote template with a zero-length template X : > ${TESTDIR}/template/temp.def X- dotest template-third-1 "${testcvs} update second" \ X+ dotest template-third-1 "${testcvs} update -T second" \ X "${SPROG} update: Updating second X ${SPROG} update: Updating second/otherdir" X X- if $remote; then X+ if true; then X dotest_fail template-third-r-2 "test -s second/CVS/Template" '' X dotest_fail template-third-r-3 "test -s second/otherdir/CVS/Template" '' X else X@@ -28051,10 +28069,10 @@ X fi X X cd CVSROOT X- dotest template-norcsinfo-1 "${testcvs} up" \ X+ dotest template-norcsinfo-1 "${testcvs} up -T" \ X "${SPROG} update: Updating \." X # Did the CVSROOT/CVS/Template file get the updated version? X- if $remote; then X+ if true; then X dotest template-norcsinfo-r-2 \ X "cmp CVS/Template ${TESTDIR}/template/temp.def" '' X else X@@ -28069,7 +28087,7 @@ X "test ! -s CVS/Template" '' X cd .. X X- dotest template-norcsinfo-5 "${testcvs} update first" \ X+ dotest template-norcsinfo-5 "${testcvs} update -T first" \ X "${SPROG} update: Updating first X ${SPROG} update: Updating first/subdir" X END-of-cvs/files/patch-src::sanity.sh echo x - cvs/files/patch-src::server.c sed 's/^X//' >cvs/files/patch-src::server.c << 'END-of-cvs/files/patch-src::server.c' X--- src/server.c.orig Sun Sep 5 14:26:29 2004 X+++ src/server.c Sun Sep 5 14:28:22 2004 X@@ -741,6 +741,9 @@ X nothing. But for rsh, we need to do it now. */ X parse_config (current_parsed_root->directory); X X+ /* Now is a good time to read CVSROOT/options too. */ X+ parseopts(current_parsed_root->directory); X+ X path = xmalloc (strlen (current_parsed_root->directory) X + sizeof (CVSROOTADM) X + 2); X@@ -5815,8 +5818,11 @@ X password file. If so, that's enough to authenticate with. If X not, we'll check /etc/passwd or maybe whatever is configured via PAM. */ X X- rc = check_repository_password (username, password, repository, X- &host_user); X+ if (require_real_user) X+ rc = 0; /* "not found" */ X+ else X+ rc = check_repository_password (username, password, repository, X+ &host_user); X X if (rc == 2) X return NULL; END-of-cvs/files/patch-src::server.c echo x - cvs/files/patch-src::tag.c sed 's/^X//' >cvs/files/patch-src::tag.c << 'END-of-cvs/files/patch-src::tag.c' X--- src/tag.c.orig Sun Sep 5 14:30:10 2004 X+++ src/tag.c Sun Sep 5 14:30:41 2004 X@@ -1353,6 +1353,9 @@ X || strcmp (name, TAG_HEAD) == 0) X return; X X+ if (readonlyfs) X+ return; X+ X /* FIXME: This routine doesn't seem to do any locking whatsoever X (and it is called from places which don't have locks in place). X If two processes try to write val-tags at the same time, it would END-of-cvs/files/patch-src::tag.c echo x - cvs/files/patch-src::update.c sed 's/^X//' >cvs/files/patch-src::update.c << 'END-of-cvs/files/patch-src::update.c' X--- src/update.c.orig Wed May 5 18:19:04 2004 X+++ src/update.c Tue Sep 7 10:17:25 2004 X@@ -108,7 +108,7 @@ X static time_t last_register_time; X static const char *const update_usage[] = X { X- "Usage: %s %s [-APCdflRp] [-k kopt] [-r rev] [-D date] [-j rev]\n", X+ "Usage: %s %s [-APCdflRTp] [-k kopt] [-r rev] [-D date] [-j rev]\n", X " [-I ign] [-W spec] [files...]\n", X "\t-A\tReset any sticky tags/date/kopts.\n", X "\t-P\tPrune empty directories.\n", X@@ -124,6 +124,7 @@ X "\t-j rev\tMerge in changes made between current revision and rev.\n", X "\t-I ign\tMore files to ignore (! to reset).\n", X "\t-W spec\tWrappers specification line.\n", X+ "\t-T\tCreate CVS/Template.\n", X "(Specify the --help global option for a list of other help options)\n", X NULL X }; X@@ -139,6 +140,7 @@ X int c, err; X int local = 0; /* recursive by default */ X int which; /* where to look for files and dirs */ X+ int xdotemplate = 0; X X if (argc == -1) X usage (update_usage); X@@ -148,7 +150,7 @@ X X /* parse the args */ X optind = 0; X- while ((c = getopt (argc, argv, "+ApCPflRQqduk:r:D:j:I:W:")) != -1) X+ while ((c = getopt (argc, argv, "+ApCPflRQTqduk:r:D:j:I:W:")) != -1) X { X switch (c) X { X@@ -186,6 +188,9 @@ X "-q or -Q must be specified before \"%s\"", X cvs_cmd_name); X break; X+ case 'T': X+ xdotemplate = 1; X+ break; X case 'd': X update_build_dirs = 1; X break; X@@ -415,7 +420,7 @@ X /* call the command line interface */ X err = do_update (argc, argv, options, tag, date, force_tag_match, X local, update_build_dirs, aflag, update_prune_dirs, X- pipeout, which, join_rev1, join_rev2, NULL, 1, NULL); X+ pipeout, which, join_rev1, join_rev2, NULL, xdotemplate, NULL); X X /* free the space Make_Date allocated if necessary */ X if (date != NULL) X@@ -591,7 +596,7 @@ X && tag != NULL X && finfo->rcs != NULL) X { X- char *rev = RCS_getversion (finfo->rcs, tag, NULL, 1, NULL); X+ char *rev = RCS_getversion (finfo->rcs, tag, date, 1, NULL); X if (rev != NULL X && nonbranch != (nb = !RCS_nodeisbranch (finfo->rcs, tag))) X { X@@ -996,7 +1001,12 @@ X warned = 0; X } X X- WriteTemplate (update_dir, dotemplate, repository); X+ if (dotemplate || server_active) X+ { X+ const char *xrepository = Name_Repository (dir, update_dir); X+ WriteTemplate (dir, dotemplate || server_active, update_dir, xrepository); X+ free (xrepository); X+ } X X /* initialize the ignore list for this directory */ X ignlist = getlist (); END-of-cvs/files/patch-src::update.c echo x - cvs/pkg-descr sed 's/^X//' >cvs/pkg-descr << 'END-of-cvs/pkg-descr' XWWW: https://www.cvshome.org/ END-of-cvs/pkg-descr echo x - cvs/pkg-plist sed 's/^X//' >cvs/pkg-plist << 'END-of-cvs/pkg-plist' X@option preserve Xbin/cvs Xbin/cvsbug X%%EXAMPLESDIR%%/contrib/README X%%EXAMPLESDIR%%/contrib/clmerge X%%EXAMPLESDIR%%/contrib/cln_hist X%%EXAMPLESDIR%%/contrib/commit_prep X%%EXAMPLESDIR%%/contrib/cvs2vendor X%%EXAMPLESDIR%%/contrib/cvs_acls X%%EXAMPLESDIR%%/contrib/debug_check_log X%%EXAMPLESDIR%%/contrib/easy-import X%%EXAMPLESDIR%%/contrib/intro.doc X%%EXAMPLESDIR%%/contrib/log X%%EXAMPLESDIR%%/contrib/log_accum X%%EXAMPLESDIR%%/contrib/mfpipe X%%EXAMPLESDIR%%/contrib/newcvsroot X%%EXAMPLESDIR%%/contrib/pvcs2rcs X%%EXAMPLESDIR%%/contrib/rcs-to-cvs X%%EXAMPLESDIR%%/contrib/rcs2log X%%EXAMPLESDIR%%/contrib/rcslock X%%EXAMPLESDIR%%/contrib/sandbox_status X%%EXAMPLESDIR%%/contrib/sccs2rcs X%%EXAMPLESDIR%%/contrib/validate_repo X@unexec rmdir %D/%%EXAMPLESDIR%%/contrib 2>/dev/null || true X@unexec rmdir %D/%%EXAMPLESDIR%% 2>/dev/null || true X@unexec install-info --delete %D/%%INFO_PATH%%/cvs.info %D/%%INFO_PATH%%/dir X%%INFO_PATH%%/cvs.info.gz X@exec install-info %D/%%INFO_PATH%%/cvs.info %D/%%INFO_PATH%%/dir X@unexec install-info --delete %D/%%INFO_PATH%%/cvsclient.info %D/%%INFO_PATH%%/dir X%%INFO_PATH%%/cvsclient.info.gz X@exec install-info %D/%%INFO_PATH%%/cvsclient.info %D/%%INFO_PATH%%/dir X@unexec if [ -f %D/%%INFO_PATH%%/dir ]; then if sed -e '1,/Menu:/d' %D/%%INFO_PATH%%/dir | grep -q '^[*] '; then true; else rm %D/%%INFO_PATH%%/dir; fi; fi END-of-cvs/pkg-plist exit