summaryrefslogtreecommitdiffstats
path: root/CVSROOT
diff options
context:
space:
mode:
Diffstat (limited to 'CVSROOT')
-rw-r--r--CVSROOT/checkoutlist27
-rwxr-xr-xCVSROOT/commit_prep.pl4
-rwxr-xr-xCVSROOT/commitcheck4
-rw-r--r--CVSROOT/commitinfo18
-rwxr-xr-xCVSROOT/cvs_acls.pl5
-rwxr-xr-xCVSROOT/cvsedit2
-rw-r--r--CVSROOT/cvswrappers29
-rw-r--r--CVSROOT/editinfo10
-rwxr-xr-xCVSROOT/log_accum.pl102
-rw-r--r--CVSROOT/loginfo46
-rwxr-xr-xCVSROOT/mkavail22
-rw-r--r--CVSROOT/rcsinfo13
-rw-r--r--CVSROOT/taginfo25
-rwxr-xr-xCVSROOT/unwrap21
-rwxr-xr-xCVSROOT/updateCVSROOT28
-rwxr-xr-xCVSROOT/wrap21
16 files changed, 257 insertions, 120 deletions
diff --git a/CVSROOT/checkoutlist b/CVSROOT/checkoutlist
new file mode 100644
index 0000000..bed9b68
--- /dev/null
+++ b/CVSROOT/checkoutlist
@@ -0,0 +1,27 @@
+#
+# $Id$
+#
+# The "checkoutlist" file is used to support additional version controlled
+# administrative files in $CVSROOT/CVSROOT, such as template files.
+#
+# The first entry on a line is a filename which will be checked out from
+# the corresponding RCS file in the $CVSROOT/CVSROOT directory.
+# The remainder of the line is an error message to use if the file cannot
+# be checked out.
+#
+# File format:
+#
+# [<whitespace>]<filename><whitespace><error message><end-of-line>
+#
+# comment lines begin with '#'
+#
+avail
+commit_prep.pl
+commitcheck
+cvs_acls.pl
+cvsedit
+cvswrappers
+log_accum.pl
+rcstemplate
+unwrap
+wrap
diff --git a/CVSROOT/commit_prep.pl b/CVSROOT/commit_prep.pl
index e965af8..78526c1 100755
--- a/CVSROOT/commit_prep.pl
+++ b/CVSROOT/commit_prep.pl
@@ -1,6 +1,6 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
#
-# $FreeBSD$
+# $Id$
#
#
# Perl filter to handle pre-commit checking of files. This program
diff --git a/CVSROOT/commitcheck b/CVSROOT/commitcheck
index 7d9b5c3..4f62383 100755
--- a/CVSROOT/commitcheck
+++ b/CVSROOT/commitcheck
@@ -11,8 +11,8 @@ freefall*)
exit 1
esac
-if /usr/bin/perl $CVSROOT/CVSROOT/cvs_acls.pl ${1+"$@"}; then
- if /usr/bin/perl $CVSROOT/CVSROOT/commit_prep.pl ${1+"$@"}; then
+if $CVSROOT/CVSROOT/cvs_acls.pl ${1+"$@"}; then
+ if $CVSROOT/CVSROOT/commit_prep.pl ${1+"$@"}; then
exit 0
fi
fi
diff --git a/CVSROOT/commitinfo b/CVSROOT/commitinfo
index 17ae416..841dd6e 100644
--- a/CVSROOT/commitinfo
+++ b/CVSROOT/commitinfo
@@ -1,6 +1,5 @@
#
-# commitinfo,v 1.2 1992/03/31 04:19:47 berliner Exp
-# $FreeBSD$
+# $Id$
#
# The "commitinfo" file is used to control pre-commit checks.
# The filter on the right is invoked with the repository and a list
@@ -8,16 +7,15 @@
# cause the commit to be aborted.
#
# The first entry on a line is a regular expression which is tested
-# against the directory that the change is being committed to, relative to the
-# $CVSROOT. If a match is found, then the remainder of the line is the
-# name of the filter to run.
+# against the directory that the change is being committed to, relative
+# to the $CVSROOT. For the first match that is found, then the remainder
+# of the line is the name of the filter to run.
#
# If the repository name does not match any of the regular expressions in this
# file, the "DEFAULT" line is used, if it is specified.
#
-# If the name ALL appears as a regular expression it is always used
-# in addition to the first matching regex or DEFAULT.
+# If the name "ALL" appears as a regular expression it is always used
+# in addition to the first matching regex or "DEFAULT".
#
-#^cvs checkforcvsid
-#DEFAULT checkforid
-ALL /home/ncvs/CVSROOT/commitcheck
+#
+ALL $CVSROOT/CVSROOT/commitcheck
diff --git a/CVSROOT/cvs_acls.pl b/CVSROOT/cvs_acls.pl
index 0ea4ef7..9f27474 100755
--- a/CVSROOT/cvs_acls.pl
+++ b/CVSROOT/cvs_acls.pl
@@ -1,7 +1,6 @@
-#!/usr/bin/perl -- # -*-Perl-*-
+#!/usr/bin/perl
#
-# cvs_acls.pl,v 1.2 1992/04/11 16:01:24 berliner Exp
-# $FreeBSD$
+# $Id$
#
# Access control lists for CVS. dgg@ksr.com (David G. Grubbs)
#
diff --git a/CVSROOT/cvsedit b/CVSROOT/cvsedit
index 354ab03..24453b9 100755
--- a/CVSROOT/cvsedit
+++ b/CVSROOT/cvsedit
@@ -6,7 +6,7 @@
# To use this, make it executable, and set your editinfo DEFAULT line:
# DEFAULT /path/to/this/program
#
-# $Id: cvsedit,v 1.8 1995/08/28 12:14:04 rgrimes Exp $
+# $Id$
#
# same rules as CVS
diff --git a/CVSROOT/cvswrappers b/CVSROOT/cvswrappers
new file mode 100644
index 0000000..611a1b7
--- /dev/null
+++ b/CVSROOT/cvswrappers
@@ -0,0 +1,29 @@
+#
+# $Id$
+#
+# This file describes wrappers and other binary files to CVS.
+#
+# Wrappers are the concept where directories of files are to be
+# treated as a single file. The intended use is to wrap up a wrapper
+# into a single tar such that the tar archive can be treated as a
+# single binary file in CVS.
+#
+# To solve the problem effectively, it was also necessary to be able to
+# prevent rcsmerge from merging these files.
+#
+# Format of wrapper file ($CVSROOT/CVSROOT/cvswrappers or .cvswrappers)
+#
+# wildcard [option value][option value]...
+#
+# where option is one of
+# -f from cvs filter value: path to filter
+# -t to cvs filter value: path to filter
+# -m update methodology value: MERGE or COPY
+#
+# and value is a single-quote delimited value.
+#
+#
+#*.nib -f '$CVSROOT/CVSROOT/unwrap %s' -t '$CVSROOT/CVSROOT/wrap %s %s'
+#*.rtfd -f '$CVSROOT/CVSROOT/unwrap %s' -t '$CVSROOT/CVSROOT/wrap %s %s'
+#*.draw -f '$CVSROOT/CVSROOT/unwrap %s' -t '$CVSROOT/CVSROOT/wrap %s %s'
+#*.tiff -m 'COPY'
diff --git a/CVSROOT/editinfo b/CVSROOT/editinfo
index bf43161..49bc7e7 100644
--- a/CVSROOT/editinfo
+++ b/CVSROOT/editinfo
@@ -1,6 +1,5 @@
#
-# editinfo,v 1.1 1992/03/21 06:49:39 berliner Exp
-# $FreeBSD$
+# $Id$
#
# The "editinfo" file is used to allow verification of logging
# information. It works best when a template (as specified in the
@@ -28,9 +27,8 @@
# supported. There can be only one entry that matches a given
# repository.
#
-#DEFAULT $CVSROOT/CVSROOT/edit
+# Note there is no "edit" example script currently available....
#
-# uncomment this to deal with the new edit hook
-#DEFAULT /home/ncvs/CVSROOT/new_edithook
+#DEFAULT $CVSROOT/CVSROOT/edit "%s"
# peter's edit post-processor..
-DEFAULT /home/ncvs/CVSROOT/cvsedit
+DEFAULT $CVSROOT/CVSROOT/cvsedit
diff --git a/CVSROOT/log_accum.pl b/CVSROOT/log_accum.pl
index 07c5da3..9b43745 100755
--- a/CVSROOT/log_accum.pl
+++ b/CVSROOT/log_accum.pl
@@ -1,6 +1,6 @@
#!/usr/bin/perl
#
-# $Id: log_accum.pl,v 1.15 1995/11/27 08:28:42 peter Exp $
+# $Id$
#
# Perl filter to handle the log messages from the checkin of files in
# a directory. This script will group the lists of files by log
@@ -55,6 +55,7 @@ $CVSROOT = "$ENV{'CVSROOT'}";
$AVAIL_FILE = "$CVSROOT/CVSROOT/avail";
$MAIL_FILE = "/tmp/#cvs.mail";
+$SUBJ_FILE = "/tmp/#cvs.subj";
$VERSION_FILE = "version";
$TRUNKREV_FILE = "TrunkRev";
#$CHANGES_FILE = "Changes";
@@ -88,9 +89,14 @@ sub cleanup_tmpfiles {
opendir(DIR, ".");
if ($all == 1) {
push(@files, grep(/$id$/, readdir(DIR)));
- push(@files, "$MAIL_FILE.$id.db") if (-e "$MAIL_FILE.$id.db");
+
+ push(@files, "$MAIL_FILE.$id.db") if (-e "$MAIL_FILE.$id.db");
push(@files, "$MAIL_FILE.$id.dir") if (-e "$MAIL_FILE.$id.dir");
push(@files, "$MAIL_FILE.$id.pag") if (-e "$MAIL_FILE.$id.pag");
+
+ push(@files, "$SUBJ_FILE.$id.db") if (-e "$SUBJ_FILE.$id.db");
+ push(@files, "$SUBJ_FILE.$id.dir") if (-e "$SUBJ_FILE.$id.dir");
+ push(@files, "$SUBJ_FILE.$id.pag") if (-e "$SUBJ_FILE.$id.pag");
} else {
push(@files, grep(/^$FILE_PREFIX.*$id$/, readdir(DIR)));
}
@@ -287,21 +293,27 @@ sub do_changes_file {
local($changes,$category);
local(@text) = @_;
- $category = $mlist;
- $category =~ s/^cvs-//;
-
- $changes = "$CVSROOT/CVSROOT/commitlogs/$category";
+ dbmopen(%MAILFILE, "$MAIL_FILE.$id", 0666);
+
+ foreach $category (keys %MAILFILE) {
+ if ($category =~ /^cvs-/) {
+ $category =~ s,\n,,;
+ $category =~ s/^cvs-//;
+ $changes = "$CVSROOT/CVSROOT/commitlogs/$category";
- open(CHANGES, ">>$changes") || die("Cannot open $changes.\n");
- print(CHANGES join("\n", @text), "\n\n");
- close(CHANGES);
+ open(CHANGES, ">>$changes") || die("Cannot open $changes.\n");
+ print(CHANGES join("\n", @text), "\n\n");
+ close(CHANGES);
+ }
+ }
+ dbmclose(%MAILFILE);
}
sub do_avail_file {
local($where) = @_;
local($users,$repo,$who);
- dbmopen(MAILFILE, "$MAIL_FILE.$id", 0666);
+ dbmopen(%MAILFILE, "$MAIL_FILE.$id", 0666);
open(AVAIL, "<$AVAIL_FILE") || die("Cannot open $AVAIL_FILE.\n");
while(<AVAIL>) {
if(/^avail\|([^|]*)\|(.*)$/) {
@@ -319,7 +331,7 @@ sub do_avail_file {
}
}
close(AVAIL);
- dbmclose(MAILFILE);
+ dbmclose(%MAILFILE);
}
sub add_cc {
@@ -333,25 +345,33 @@ sub add_cc {
$who =~ s/^/"/;
$who =~ s/$/"/;
- dbmopen(MAILFILE, "$MAIL_FILE.$id", 0666);
+ dbmopen(%MAILFILE, "$MAIL_FILE.$id", 0666);
$MAILFILE{$who} = 1;
- dbmclose(MAILFILE);
+ dbmclose(%MAILFILE);
}
sub mail_notification {
local(@text) = @_;
local($names);
- local($mailing_lists);
- $committers = "CVS-committers";
+ local($subject);
+
print "Mailing the commit message...\n";
- dbmopen(MAILFILE, "$MAIL_FILE.$id", 0666);
- $mailing_lists = join(' ', $mlist, $committers);
- $names = join(" ", keys %MAILFILE) . " $mailing_lists";
+
+ dbmopen(%MAILFILE, "$MAIL_FILE.$id", 0666);
+ $names = "CVS-committers " . join(" ", keys %MAILFILE);
$names =~ s,\n,,;
- dbmclose(MAILFILE);
+ dbmclose(%MAILFILE);
- open(MAIL, "| mail -s \"cvs commit: $ARGV[0]\" $names");
+ dbmopen(%SUBJFILE, "$SUBJ_FILE.$id", 0666);
+ $subject = join(" ", keys %SUBJFILE);
+ $subject =~ s,\n,,;
+ $subject =~ s,[ ]*, ,;
+ dbmclose(%SUBJFILE);
+
+ #print "mail -s \"cvs commit: $subject\" $names\n";
+
+ open(MAIL, "| mail -s \"cvs commit: $subject\" $names");
print(MAIL join("\n", @text));
close(MAIL);
}
@@ -370,7 +390,7 @@ $state = $STATE_NONE;
$login = $ENV{'USER'} || getlogin || (getpwuid($<))[0] || sprintf("uid#%d",$<);
@files = split(' ', $ARGV[0]);
@path = split('/', $files[0]);
-$repository = @path[0];
+$repository = $path[0];
if ($#path == 0) {
$dir = ".";
} else {
@@ -383,6 +403,13 @@ if ($#path == 0) {
#print("id - ", $id, "\n");
$mlist = &mlist_map($files[0]);
+dbmopen(%MAILFILE, "$MAIL_FILE.$id", 0666);
+$MAILFILE{$mlist} = 1;
+dbmclose(%MAILFILE);
+
+dbmopen(%SUBJFILE, "$SUBJ_FILE.$id", 0666);
+$SUBJFILE{$ARGV[0]} = 1;
+dbmclose(%SUBJFILE);
#
# Check for a new directory first. This will always appear as a
@@ -400,9 +427,33 @@ if ($ARGV[0] =~ /New directory/) {
exit 0;
}
+# Check for an import command. This will always appear as a
+# single item in the argument list, and a log message.
+#
+if ($ARGV[0] =~ /Imported sources/) {
+ $version = &bump_version if ($cisco_systems != 0);
+ $header = &build_header($version);
+
+ @text = ();
+ push(@text, $header);
+ push(@text, "");
+
+ push(@text, " ".$ARGV[0]);
+ &do_changes_file(@text);
+
+ while (<STDIN>) {
+ chop; # Drop the newline
+ push(@text, " ".$_);
+ }
+
+ &mail_notification(@text);
+ exit 0;
+}
+
#no longer useful. the CC: line would be _too_ big.
#&do_avail_file($dir);
+
#
# Iterate over the body of the message collecting information.
#
@@ -428,11 +479,10 @@ while (<STDIN>) {
/^Obtained from:$/i) {
next;
}
-# Not accepted as generally useful yet.
-# if (/^CC:/i) {
-# &add_cc($_);
-# # next; # uncomment this to prevent logging CC: lines
-# }
+ if (/^CC:/i) {
+ &add_cc($_);
+ # next; # uncomment this to prevent logging CC: lines
+ }
push (@log_lines, $_);
}
}
diff --git a/CVSROOT/loginfo b/CVSROOT/loginfo
index adcaef6..2aadc50 100644
--- a/CVSROOT/loginfo
+++ b/CVSROOT/loginfo
@@ -1,24 +1,44 @@
#
-# $FreeBSD$
+# $Id$
#
# The "loginfo" file is used to control where "cvs commit" log information
# is sent. The first entry on a line is a regular expression which is tested
# against the directory that the change is being made to, relative to the
-# $CVSROOT. If a match is found, then the remainder of the line is a filter
-# program that should expect log information on its standard input.
+# $CVSROOT. For the first match that is found, then the remainder of the
+# line is a filter program that should expect log information on its standard
+# input.
#
-# The filter program may use one and only one % modifier (ala printf). If
-# %s is specified in the filter program, a brief title is included (enclosed
-# in single quotes) showing the modified file names.
+# If the repository name does not match any of the regular expressions in the
+# first field of this file, the "DEFAULT" line is used, if it is specified.
#
-# If the repository name does not match any of the regular expressions in this
-# file, the "DEFAULT" line is used, if it is specified.
+# If the name "ALL" appears as a regular expression it is always used
+# in addition to the first matching regex or "DEFAULT".
#
-# If the name ALL appears as a regular expression it is always used
-# in addition to the first matching regex or DEFAULT.
+# The filter program may use one and only one "%s" modifier (ala printf). If
+# such a "%s" is specified in the filter program, a brief title is included
+# (as one argument, enclosed in single quotes) showing the relative directory
+# name and listing the modified file names.
#
-# NB: For FreeBSD 2.0, the following line is the ONLY one which should
+# NOTE: contrib/log usage: (currently requires perl)
+# -d - turn debugging on....
+# -m mailto - send mail to "mailto" (multiple -m's permitted)
+# -f logfile - required arg: save messages to logfile
+# %s - may follow other options at the end of the line
+#
+# NOTE: contrib/log_accum usage: (currently requires perl)
+# (must have 'commit_prep -r' in commitinfo)
+# -d - turn debugging on....
+# -M modulename - use this as the module name (necessary for sub-dirs)
+# -m mailto - send mail to "mailto" (multiple -m's permitted) [optional]
+# -f logfile - save messages to logfile [optional]
+# %s - must follow other options at the end of the line
+#
+# without perl you could do this:
+#DEFAULT (echo ""; who am i; date; cat) >> $CVSROOT/CVSROOT/commitlog
+#
+#DEFAULT $CVSROOT/CVSROOT/log -f $CVSROOT/CVSROOT/commitlog %s
+#
+# NB: For FreeBSD 2.X, the following line is the ONLY one which should
# ever appear. If you want to do something extra to the log output, learn
# Perl.
-#
-DEFAULT /usr/bin/perl $CVSROOT/CVSROOT/log_accum.pl %s
+DEFAULT $CVSROOT/CVSROOT/log_accum.pl %s
diff --git a/CVSROOT/mkavail b/CVSROOT/mkavail
deleted file mode 100755
index fa21f74..0000000
--- a/CVSROOT/mkavail
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/perl
-#
-# Perl module to convert a CVS avail file into a majordomo alias file.
-#
-
-$MAILING_LIST = 'cvs-committers';
-$AVAIL_FILE = 'avail';
-
-open (MAIL, ">$MAILING_LIST");
-open (AVAIL, "<$AVAIL_FILE");
-
- while (<AVAIL>) {
- if (/^avail\|(.*)/) {
- $master = $1;
- foreach $who (split(/,/, $master)) {
- print (MAIL "$who\n");
- }
- }
- }
-
-close MAIL;
-close AVAIL;
diff --git a/CVSROOT/rcsinfo b/CVSROOT/rcsinfo
index 1c02ed7..bb09fd5 100644
--- a/CVSROOT/rcsinfo
+++ b/CVSROOT/rcsinfo
@@ -1,19 +1,18 @@
#
-# rcsinfo,v 1.3 1992/04/10 18:59:14 berliner Exp
-# $FreeBSD$
+# $Id$
#
# The "rcsinfo" file is used to control templates with which the editor
# is invoked on commit and import.
#
# The first entry on a line is a regular expression which is tested
# against the directory that the change is being made to, relative to the
-# $CVSROOT. If a match is found, then the remainder of the line is the
-# name of the file that contains the template.
+# $CVSROOT. For the first match that is found, then the remainder of the
+# line is the name of the file that contains the template.
#
# If the repository name does not match any of the regular expressions in this
# file, the "DEFAULT" line is used, if it is specified.
#
-# If the name ALL appears as a regular expression it is always used
-# in addition to the first matching regex or DEFAULT.
+# If the name "ALL" appears as a regular expression it is always used
+# in addition to the first matching regex or "DEFAULT".
#
-ALL /home/ncvs/CVSROOT/rcstemplate
+ALL $CVSROOT/CVSROOT/rcstemplate
diff --git a/CVSROOT/taginfo b/CVSROOT/taginfo
new file mode 100644
index 0000000..36af5bc
--- /dev/null
+++ b/CVSROOT/taginfo
@@ -0,0 +1,25 @@
+#
+# $Id$
+#
+# The "taginfo" file is used to control pre-tag checks.
+# The filter on the right is invoked with the following arguments:
+#
+# $1 -- tagname
+# $2 -- operation "add" for tag, "mov" for tag -F, and "del" for tag -d
+# $3 -- repository
+# $4-> file revision [file revision ...]
+#
+# A non-zero exit of the filter program will cause the tag to be aborted.
+#
+# The first entry on a line is a regular expression which is tested
+# against the directory that the change is being committed to, relative
+# to the $CVSROOT. For the first match that is found, then the remainder
+# of the line is the name of the filter to run.
+#
+# If the repository name does not match any of the regular expressions in this
+# file, the "DEFAULT" line is used, if it is specified.
+#
+# If the name "ALL" appears as a regular expression it is always used
+# in addition to the first matching regex or "DEFAULT".
+#
+#DEFAULT $CVSROOT/CVSROOT/tag_logging_program
diff --git a/CVSROOT/unwrap b/CVSROOT/unwrap
new file mode 100755
index 0000000..d8335f5
--- /dev/null
+++ b/CVSROOT/unwrap
@@ -0,0 +1,21 @@
+#! /bin/sh
+#
+# unwrap - extract the combined package (created with wrap)
+#
+# $Id$
+
+# move the file to a new name with an extension
+rm -rf $1.cvswrap
+mv $1 $1.cvswrap
+
+# untar the file
+
+if `gzip -t $1.cvswrap > /dev/null 2>&1`
+then
+ zcat -d $1.cvswrap | tar --preserve --sparse -x -f -
+else
+ tar --preserve -x -f $1.cvswrap
+fi
+
+# remove the original
+rm -rf $1.cvswrap
diff --git a/CVSROOT/updateCVSROOT b/CVSROOT/updateCVSROOT
deleted file mode 100755
index d8031b1..0000000
--- a/CVSROOT/updateCVSROOT
+++ /dev/null
@@ -1,28 +0,0 @@
-#! /bin/sh
-#
-# Called in place of mkmodules to take care of files mkmodules doesn't know.
-#
-# $Id: updateCVSROOT,v 1.7 1995/11/27 08:31:00 peter Exp $
-
-PATH=$PATH:/bin:/usr/bin:/usr/sbin:/sbin:/usr/local/bin
-export PATH
-
-FILELIST="avail mkavail commitcheck cvs_acls.pl commit_prep.pl log_accum.pl"
-FILELIST="${FILELIST} cvsedit edithook updateCVSROOT"
-
-cd $1
-
-for i in $FILELIST
-do
- find $i,v -newer $i -exec echo Updating CVSROOT/$i \; -exec co -q -u $i \;
-done
-
-find avail,v -newer cvs-committers -exec ./mkavail \;
-cmp -s cvs-committers /home/mail/cvs-committers || {
- echo "====== checking cvs-committers mailing list members ======"
- echo "/home/mail/cvs-committers is different to \$CVSROOT/cvs-committers"
- echo "please check to see what needs to be updated..."
-}
-
-echo Executing: mkmodules $1
-exec mkmodules $1
diff --git a/CVSROOT/wrap b/CVSROOT/wrap
new file mode 100755
index 0000000..7b44d9c
--- /dev/null
+++ b/CVSROOT/wrap
@@ -0,0 +1,21 @@
+#! /bin/sh
+#
+# wrap - Combine a directory into a single tar package.
+#
+# $Id$
+
+# This script is always called with the current directory set to
+# where the file to be combined exists. but i may get called with a
+# path to where cvs first started executing. (this probably should be
+# fixed in cvs) so strip out all of the directory information. The
+# first sed expression will only work if the path has a leading /
+# if it doesn't the one in the if statement will work.
+DIRNAME=`echo $1 | sed -e "s|/.*/||g"`
+if [ ! -d $DIRNAME ] ; then
+ DIRNAME=`echo $1 | sed -e "s|.*/||g"`
+fi
+#
+# Now tar up the directory but we now will only get a relative path
+# even if the user did a cvs commit . at the top.
+#
+tar --preserve -cf - $DIRNAME | gzip --no-name --best -c > $2
OpenPOWER on IntegriCloud