OSSP CVS Repository

ossp - Check-in [4558]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 4558
Date: 2004-May-06 21:45:39 (local)
2004-May-06 19:45:39 (UTC)
User:rse
Branch:
Comment: flush the whole bunch of my fixes and cleanups
Tickets:
Inspections:
Files:
ossp-pkg/shiela/ChangeLog      1.41 -> 1.42     8 inserted, 1 deleted
ossp-pkg/shiela/devtool.conf      1.10 -> 1.11     2 inserted, 0 deleted
ossp-pkg/shiela/shiela-install.pod      1.22 -> 1.23     5 inserted, 5 deleted
ossp-pkg/shiela/shiela-install.sh      1.23 -> 1.24     18 inserted, 10 deleted
ossp-pkg/shiela/shiela.pl      1.52 -> 1.53     26 inserted, 11 deleted

ossp-pkg/shiela/ChangeLog 1.41 -> 1.42

--- ChangeLog    2004/05/05 13:18:47     1.41
+++ ChangeLog    2004/05/06 19:45:39     1.42
@@ -11,13 +11,20 @@
 
   Changes between 1.0.4 and 1.0.5 (23-Dec-2002 to xx-May-2004):
 
+   *) Upgraded to the new CVS 1.12.x info format strings.
+      OSSP shiela now works with CVS >= 1.12.x only.
+      [Ralf S. Engelschall]
+
+   *) Fixed shiela-install: "diff:mime" -> "patch:plain".
+      [Ralf S. Engelschall]
+
    *) Bump year in copyright messages for 2003 and 2004.
       [Ralf S. Engelschall]
 
    *) Upgrade build environment to GNU autoconf 2.59
       [Ralf S. Engelschall]
 
-   *) Provide "cvs rdiff" support in diff outputs.
+   *) Provide CVS 1.12.x "cvs rdiff" support in detail outputs.
       [Ralf S. Engelschall]
 
    *) Support CVS 1.12.x (option -l no longer existing).


ossp-pkg/shiela/devtool.conf 1.10 -> 1.11

--- devtool.conf 2004/05/05 13:08:30     1.10
+++ devtool.conf 2004/05/06 19:45:39     1.11
@@ -13,6 +13,8 @@
 %configure
     ./configure \
         --prefix=/tmp/shiela \
+        --with-perl=/usr/opkg/bin/perl \
+        --with-cvs=/usr/opkg/bin/cvs \
         "$@"
 
 %release


ossp-pkg/shiela/shiela-install.pod 1.22 -> 1.23

--- shiela-install.pod   2004/05/05 13:18:47     1.22
+++ shiela-install.pod   2004/05/06 19:45:39     1.23
@@ -71,7 +71,7 @@
 =item B<4.>
 
 add to C<$CVSROOT/CVSROOT/taginfo> (the hook for checking tag
-operations): ``C<ALL $CVSROOT/CVSROOT/shiela --hook=taginfo>''.
+operations): ``C<ALL $CVSROOT/CVSROOT/shiela --hook=taginfo %t %o %p %{sv}>''.
 
 =item B<5.>
 
@@ -96,17 +96,17 @@
 =item B<7.>
 
 add to C<$CVSROOT/CVSROOT/commitinfo> (the hook for checking commit
-operations): ``C<ALL $CVSROOT/CVSROOT/shiela --hook=commitinfo>''.
+operations): ``C<ALL $CVSROOT/CVSROOT/shiela --hook=commitinfo %r/%p %s>''.
 
 =item B<8.>
 
 add to C<$CVSROOT/CVSROOT/verifymsg> (the hook for post-processing log
-messages): ``C<DEFAULT $CVSROOT/CVSROOT/shiela --hook=verifymsg>''.
+messages): ``C<DEFAULT $CVSROOT/CVSROOT/shiela --hook=verifymsg %l>''.
 
 =item B<9.>
 
 add to C<$CVSROOT/CVSROOT/loginfo> (the hook for performing logging):
-``C<ALL $CVSROOT/CVSROOT/shiela --hook=loginfo %{sVvto}>''.
+``C<ALL $CVSROOT/CVSROOT/shiela --hook=loginfo %p %{sVvto}>''.
 This requires that you use a CVS version with RSE patches
 applied (see below). If you use a stock CVS version, use ``C<ALL
 $CVSROOT/CVSROOT/shiela --hook=loginfo %{sVv}>'' instead and live with
@@ -205,7 +205,7 @@
 B<OSSP shiela> to apply access control to the "C<cvs tag>" and "C<cvs
 admin>" commands. Hence Ralf S. Engelschall extended CVS with those
 features (and more) and maintains a patch set in the "cvs" package of
-his B<OpenPKG> project (http://www.ossp.org/). You can find the latest
+his B<OpenPKG> project (http://www.openpkg.org/). You can find the latest
 patch set under http://cvs.openpkg.org/openpkg-src/cvs/cvs.patches.rse
 
 =head1 SEE ALSO


ossp-pkg/shiela/shiela-install.sh 1.23 -> 1.24

--- shiela-install.sh    2004/05/05 13:11:43     1.23
+++ shiela-install.sh    2004/05/06 19:45:39     1.24
@@ -371,10 +371,10 @@
     CVS_VENDOR=CVSHome.org
 fi
 case $CVS_VERSION in
-   1.10.[789]* | 1.10.1[0123456789]* | 1.1[1-9].* )
+   1.1[2-9]* )
        ;;
    * )
-       echo "ERROR: CVS has to be at least version 1.10.7"
+       echo "ERROR: CVS has to be at least version 1.12"
        exit 1
        ;;
 esac
@@ -411,8 +411,8 @@
 cat >$tmpdir/shiela.cfg <<EOT
 ##
 ##  OSSP shiela - Access Control and Logging Facility for CVS
-##  Copyright (c) 2000-2002 Ralf S. Engelschall <rse@engelschall.com>
-##  Copyright (c) 2000-2002 The OSSP Project <http://www.ossp.org/>
+##  Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
+##  Copyright (c) 2000-2004 The OSSP Project <http://www.ossp.org/>
 ##
 ##  This file is part of OSSP shiela, an access control and logging
 ##  facility for Concurrent Versions System (CVS) repositories
@@ -477,8 +477,8 @@
 Logging {
     Reports {
         Report mail {
-            Content title rule header files log summary details;
-            Details diff:mime;
+            Content title rule header files log summary rule details;
+            Details patch:plain;
         };
     };
 };
@@ -586,6 +586,14 @@
 run chmod 644 shiela.msg
 cvs_file add shiela.msg
 
+cvs_file tst config
+if [ ".`grep -i UseNewInfoFmtStrings config`" != . ]; then
+    run "cp config config.old && sed -e 's;UseNewInfoFmtStrings=.*;UseNewInfoFmtStrings=yes;' <config.old >config && rm -f config.old"
+else
+    run "(echo ''; echo 'UseNewInfoFmtStrings=yes'; echo '') >>config"
+fi
+cvs_file add config
+
 cvs_file tst checkoutlist
 run "echo 'shiela.cfg' >>checkoutlist"
 run "echo 'shiela' >>checkoutlist"
@@ -597,7 +605,7 @@
 cvs_file add rcsinfo
 
 cvs_file tst taginfo
-run "(echo ''; echo 'ALL $V_tool_shiela --hook=taginfo'; echo '') >>taginfo"
+run "(echo ''; echo 'ALL $V_tool_shiela --hook=taginfo %t %o %p %{sv}'; echo '') >>taginfo"
 cvs_file add taginfo
 
 if [ ".$CVS_VENDOR" = .RSE ]; then
@@ -611,11 +619,11 @@
 fi
 
 cvs_file tst commitinfo
-run "(echo ''; echo 'ALL $V_tool_shiela --hook=commitinfo'; echo '') >>commitinfo"
+run "(echo ''; echo 'ALL $V_tool_shiela --hook=commitinfo %r/%p %s'; echo '') >>commitinfo"
 cvs_file add commitinfo
 
 cvs_file tst verifymsg
-run "(echo ''; echo 'DEFAULT $V_tool_shiela --hook=verifymsg'; echo '') >>verifymsg"
+run "(echo ''; echo 'DEFAULT $V_tool_shiela --hook=verifymsg %l'; echo '') >>verifymsg"
 cvs_file add verifymsg
 
 if [ ".$CVS_VENDOR" = .RSE ]; then
@@ -624,7 +632,7 @@
     flags="sVv"
 fi
 cvs_file tst loginfo
-run "(echo ''; echo 'ALL $V_tool_shiela --hook=loginfo %{${flags}}'; echo '') >>loginfo"
+run "(echo ''; echo 'ALL $V_tool_shiela --hook=loginfo %p %{${flags}}'; echo '') >>loginfo"
 cvs_file add loginfo
 
 run $V_tool_cvs update


ossp-pkg/shiela/shiela.pl 1.52 -> 1.53

--- shiela.pl    2004/05/05 13:11:43     1.52
+++ shiela.pl    2004/05/06 19:45:39     1.53
@@ -212,7 +212,7 @@
     $RT->{cvsvers} = $1 if ($v =~ m|Concurrent\s+Versions\s+System\s+\(CVS\)\s+([\d.p]+)\s+|s);
     $RT->{cvsrse} = 0;
     $RT->{cvsrse} = 1 if ($v =~ m|\[RSE\]|s);
-    die "$RT->{cvs} is not at least CVS 1.10" if ($RT->{cvsvers} !~ m|^1\.1[0-9]|);
+    die "$RT->{cvs} is not at least CVS 1.12" if ($RT->{cvsvers} !~ m|^1\.1[2-9]|);
     $RT->{useserver} = 0;
     $RT->{useserver} = 1 if ($v =~ m|server|s);
 
@@ -1425,7 +1425,12 @@
     my ($PA, $RT, $CF) = @_;
 
     #   take the arguments
-    my ($cvsdir, @cvsinfo) = split(/\s+/, $PA->{ARG}->[0]);
+    my $cvsdir = $PA->{ARG}->[0];
+    my @cvsinfo = ();
+    my $k = ($RT->{cvsrse} ? 5 : 3);
+    for (my $i = 1; $i <= $#{$PA->{ARG}}; $i += $k) {
+        push(@cvsinfo, join(",", @{$PA->{ARG}}[$i..$i+$k-1]));
+    }
 
     #   suck in the standard log information which CVS provides
     my $cvsmsg = '';
@@ -1435,7 +1440,7 @@
     $RT->{cvsop} = 'commit-file';
 
     #   handle special invocation under `cvs add <dir>'
-    if (join(' ', @cvsinfo) eq '- New directory') { # see CVS' src/add.c
+    if ($PA->{ARG}->[1] eq '- New directory') { # see CVS' src/add.c
         #   Hmmm... we always just deal with files in OSSP shiela, so there
         #   is no obvious and consistent way to deal now with only a
         #   plain directory. And there is also no log message provided
@@ -1451,7 +1456,7 @@
     #   CVS only calls us inside the loginfo hook and never in the
     #   commitinfo hook before. Additionally CVS doesn't provide us with
     #   the %{sVvto} information :(
-    if (join(' ', @cvsinfo) eq '- Imported sources') { # see CVS' src/import.c
+    if ($PA->{ARG}->[1] eq '- Imported sources') { # see CVS' src/import.c
         #   I = ignored
         #   L = link (=error),
         #   N = new file
@@ -2245,6 +2250,7 @@
         elsif ($content eq 'details') {
             $O .= "\n";
             if ($style =~ m|^url:(.+)|) {
+                $O .= "Change details:\n";
                 my $urlspec = $1;
                 foreach $file (sort(keys(%{$IN->{file}}))) {
                     next if ($IN->{file}->{$file}->{op} eq 'T');
@@ -2254,17 +2260,26 @@
                         elsif ($1 eq 'V') { $IN->{file}->{$file}->{oldrev}; }
                         elsif ($1 eq 'v') { $IN->{file}->{$file}->{newrev}; }
                     |gse;
-                    $O .= "$prefix$url\n";
+                    $O .= "  $prefix$url\n";
                 }
             }
             elsif ($style eq 'rdiff') {
-                $O .= "To re-generate the difference summary of this commit, execute:\n";
+                $O .= "Change details:\n";
                 foreach $file (sort(keys(%{$IN->{file}}))) {
-                    $O .= "cvs rdiff -uN " .
-                          " -r" . $IN->{file}->{$file}->{oldrev} .
-                          " -r" . $IN->{file}->{$file}->{newrev} .
-                          " " . $file .
-                          "\n";
+                    next if ($IN->{file}->{$file}->{op} eq 'T');
+                    if ($IN->{file}->{$file}->{op} eq 'A') {
+                        $O .= "  \$ cvs rdiff -u" .
+                              " -r0 -r" . $IN->{file}->{$file}->{newrev} .
+                              " " . $file .
+                              "\n";
+                    }
+                    else {
+                        $O .= "  \$ cvs rdiff -u" .
+                              " -r" . $IN->{file}->{$file}->{oldrev} .
+                              " -r" . $IN->{file}->{$file}->{newrev} .
+                              " " . $file .
+                              "\n";
+                    }
                 }
             }
             elsif ($style eq 'patch:plain') {

CVSTrac 2.0.1