Index: ossp-pkg/shiela/ChangeLog RCS File: /v/ossp/cvs/ossp-pkg/shiela/ChangeLog,v rcsdiff -q -kk '-r1.15' '-r1.16' -u '/v/ossp/cvs/ossp-pkg/shiela/ChangeLog,v' 2>/dev/null --- ChangeLog 2002/12/21 10:32:39 1.15 +++ ChangeLog 2002/12/21 11:00:17 1.16 @@ -11,6 +11,11 @@ Changes between 0.9.2 and 0.9.3 (19-Aug-2002 to 21-Dec-2002): + *) Finally really use the "Environment" configuration section to find + "cvs" and "sendmail" directly and add a "Program" sub-command to it + for easier extension of the "Environment" section in the future. + [Ralf S. Engelschall] + *) Consistently use IO objects instead of the anchient direct fiddling with Perl's filedescriptor symbol globs. [Ralf S. Engelschall] @@ -72,6 +77,6 @@ Changes between *GENESIS* and 0.9.0 (Apr-2000 to 18-Jun-2000): - *) Created the first Shiela version. + *) Created the first OSSP shiela version. [Ralf S. Engelschall] Index: ossp-pkg/shiela/INSTALL RCS File: /v/ossp/cvs/ossp-pkg/shiela/INSTALL,v rcsdiff -q -kk '-r1.3' '-r1.4' -u '/v/ossp/cvs/ossp-pkg/shiela/INSTALL,v' 2>/dev/null --- INSTALL 2002/12/21 09:42:57 1.3 +++ INSTALL 2002/12/21 11:00:17 1.4 @@ -9,6 +9,6 @@ INSTALLATION - Usually you want to use Shiela inside the repository tree. + Usually you want to use OSSP shiela inside the repository tree. Read the shiela-install(1) manual page for details. Index: ossp-pkg/shiela/Makefile.in RCS File: /v/ossp/cvs/ossp-pkg/shiela/Makefile.in,v rcsdiff -q -kk '-r1.4' '-r1.5' -u '/v/ossp/cvs/ossp-pkg/shiela/Makefile.in,v' 2>/dev/null --- Makefile.in 2002/12/21 09:42:57 1.4 +++ Makefile.in 2002/12/21 11:00:17 1.5 @@ -64,15 +64,15 @@ @$(SHTOOL) echo -e "%Bgenerating shiela.1%b" V=`$(SHTOOL) version -l txt -d short VERSION`; \ D=`$(SHTOOL) version -l txt -d long VERSION | $(SED) -e 's;.*(;;' -e 's;).*;;'`; \ - $(POD2MAN) --section=1 --center="CVS ACL and Logging Facility" \ - --release="$$D" --date="OSSP Shiela $$V" shiela.pod >shiela.1 + $(POD2MAN) --section=1 --center="Access Control and Logging Facility for CVS" \ + --release="$$D" --date="OSSP shiela $$V" shiela.pod >shiela.1 shiela-install.1: shiela-install.pod @$(SHTOOL) echo -e "%Bgenerating shiela-install.1%b" V=`$(SHTOOL) version -l txt -d short VERSION`; \ D=`$(SHTOOL) version -l txt -d long VERSION | $(SED) -e 's;.*(;;' -e 's;).*;;'`; \ - $(POD2MAN) --section=1 --center="CVS ACL and Logging Facility" \ - --release="$$D" --date="OSSP Shiela $$V" shiela-install.pod >shiela-install.1 + $(POD2MAN) --section=1 --center="Access Control and Logging Facility for CVS" \ + --release="$$D" --date="OSSP shiela $$V" shiela-install.pod >shiela-install.1 install: all $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(bindir) Index: ossp-pkg/shiela/TODO RCS File: /v/ossp/cvs/ossp-pkg/shiela/TODO,v rcsdiff -q -kk '-r1.3' '-r1.4' -u '/v/ossp/cvs/ossp-pkg/shiela/TODO,v' 2>/dev/null --- TODO 2002/12/21 09:42:57 1.3 +++ TODO 2002/12/21 11:00:17 1.4 @@ -29,7 +29,7 @@ just top-level directories. This should be easy to add for version 1.1 by adjusting the access control routine. - o Shiela perhaps should read in shiela.msg in order to know + o It perhaps should read in shiela.msg in order to know what to kick out when compressing the message. For version 1.1: Index: ossp-pkg/shiela/devtool.conf RCS File: /v/ossp/cvs/ossp-pkg/shiela/devtool.conf,v rcsdiff -q -kk '-r1.3' '-r1.4' -u '/v/ossp/cvs/ossp-pkg/shiela/devtool.conf,v' 2>/dev/null --- devtool.conf 2002/12/21 09:42:57 1.3 +++ devtool.conf 2002/12/21 11:00:17 1.4 @@ -29,8 +29,8 @@ sed -e "s/version=\".*\"/version=\"$V\"/" shiela-install.sh.n && mv shiela-install.sh.n shiela-install.sh V=`./shtool version -l txt -d long VERSION` sed -e "s/Version .*(.*)/Version $V/g" README.n && mv README.n README - sed -e "s/B .*/B $V/" shiela.pod.n && mv shiela.pod.n shiela.pod - sed -e "s/B .*/B $V/" shiela-install.pod.n && mv shiela-install.pod.n shiela-install.pod + sed -e "s/B .*/B $V/" shiela.pod.n && mv shiela.pod.n shiela.pod + sed -e "s/B .*/B $V/" shiela-install.pod.n && mv shiela-install.pod.n shiela-install.pod %tag V=`./shtool version -ltxt -dshort VERSION | sed -e 's;\.;_;g'` Index: ossp-pkg/shiela/shiela-install.pod RCS File: /v/ossp/cvs/ossp-pkg/shiela/shiela-install.pod,v rcsdiff -q -kk '-r1.7' '-r1.8' -u '/v/ossp/cvs/ossp-pkg/shiela/shiela-install.pod,v' 2>/dev/null --- shiela-install.pod 2002/12/21 09:42:57 1.7 +++ shiela-install.pod 2002/12/21 11:00:17 1.8 @@ -29,23 +29,23 @@ =head1 NAME -B - Shiela installation utility +B - OSSP shiela installation utility =head1 VERSION -B 0.9.3 (21-Dec-2002) +B 0.9.3 (21-Dec-2002) =head1 DESCRIPTION -B is an access control and logging facility for use with +B is an access control and logging facility for use with the I (CVS). Read shiela(1) for more -details about B itself. This B program is a -small utility intended to help in adding B to an existing CVS +details about B itself. This B program is a +small utility intended to help in adding B to an existing CVS repository for testing or production purposes. =head1 INSTALLATION: MANUALLY -B can be installed and activated in a CVS repository either +B can be installed and activated in a CVS repository either manually or via the B program. The manual steps would be: @@ -79,7 +79,7 @@ operations): ``C''. This assumes that you are using the OSSP CVS version. If you use a stock CVS version, you have to skip this step and live with the fact that `C' commands cannot be access controlled by B (because then +import>' commands cannot be access controlled by B (because then this hook does not exists at all). =item B<6.> @@ -88,7 +88,7 @@ operations): ``C''. This requires that you are using the OSSP CVS version. If you use a stock CVS version, you have to skip this step and life with the fact that `C' commands cannot be access controlled by B (because then +admin>' commands cannot be access controlled by B (because then this hook does not exists at all). =item B<7.> @@ -107,9 +107,9 @@ ``C''. This requires that you use the OSSP CVS version. If you use a stock CVS version, use ``C'' -instead and live with the fact that B's run-time efficiency is +instead and live with the fact that B's run-time efficiency is slightly decreased and branch recognition might be less correct (because -B has to determine details the hard way which CVS already would +B has to determine details the hard way which CVS already would know easily). =item B<10.> Index: ossp-pkg/shiela/shiela-install.sh RCS File: /v/ossp/cvs/ossp-pkg/shiela/shiela-install.sh,v rcsdiff -q -kk '-r1.8' '-r1.9' -u '/v/ossp/cvs/ossp-pkg/shiela/shiela-install.sh,v' 2>/dev/null --- shiela-install.sh 2002/12/21 09:42:57 1.8 +++ shiela-install.sh 2002/12/21 11:00:17 1.9 @@ -85,16 +85,17 @@ ;; esac -echo "This is ${term_bold}Shiela Setup${term_norm}, Version ${term_bold}${version}${term_norm}" -echo "Copyright (c) 2000 Ralf S. Engelschall " +echo "This is ${term_bold}OSSP shiela Setup${term_norm}, Version ${term_bold}${version}${term_norm}" +echo "Copyright (c) 2000-2002 Ralf S. Engelschall " +echo "Copyright (c) 2000-2002 The OSSP Project " echo "" echo "${term_bold}PARAMETER DETERMINATION${term_norm}" cat <$tmpdir/shiela.cfg < +## OSSP shiela - Access Control and Logging Facility for CVS +## Copyright (c) 2000-2002 Ralf S. Engelschall +## Copyright (c) 2000-2002 The OSSP Project ## -## This file is part of Shiela, an access control and logging -## facility for Concurrent Versions System (CVS) repositories -## which can be found at http://www.ossp.org/pkg/shiela/. +## This file is part of OSSP shiela, an access control and logging +## facility for Concurrent Versions System (CVS) repositories +## which can be found at http://www.ossp.org/pkg/tool/shiela/. ## ## This program is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License @@ -388,9 +416,16 @@ ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 ## USA, or contact Ralf S. Engelschall . ## -## shiela.cfg: Shiela configuration (syntax: Shiela C-style) +## shiela.cfg: run-time configuration (syntax: OSSP shiela C-style) ## +Environment { + Program sendmail ${V_tool_sendmail}; + Program cvs ${V_tool_cvs}; + Program diff ${V_tool_diff}; + Program uuencode ${V_tool_uuencode}; +}; + Project { Tag ${V_project_tag}; Name "${V_project_name}"; @@ -404,11 +439,6 @@ }; }; -Environment { - CVS ${V_tool_cvs}; - Sendmail ${V_tool_sendmail}; -}; - Repository { Tag ${V_repos_tag}; Name "${V_repos_name}"; @@ -458,7 +488,7 @@ cat </dev/null --- shiela.pl 2002/12/21 10:32:40 1.20 +++ shiela.pl 2002/12/21 11:00:17 1.21 @@ -149,7 +149,7 @@ # determine user information $RT->{username} = $CF->{Project}->{User}->{$RT->{userid}}->{name} || - die "CVS user `$RT->{userid}' not found in Shiela configuration"; + die "CVS user `$RT->{userid}' not found in OSSP shiela configuration"; $RT->{usermail} = $CF->{Project}->{User}->{$RT->{userid}}->{mail} || "$RT->{userid}\@localhost"; @@ -175,11 +175,19 @@ } return $prog; } - $RT->{sendmail} = &find_program("ssmtp") || + $RT->{sendmail} = $CF->{Environment}->{Program}->{cvs} || + &find_program("ssmtp") || &find_program("sendmail") || die "unable to find `sendmail' program"; - $RT->{cvs} = &find_program("cvs") || + $RT->{cvs} = $CF->{Environment}->{Program}->{sendmail} || + &find_program("cvs") || die "unable to find `cvs' program"; + $RT->{diff} = $CF->{Environment}->{Program}->{diff} || + &find_program("diff") || + die "unable to find `diff' program"; + $RT->{uuencode} = $CF->{Environment}->{Program}->{uuencode} || + &find_program("uuencode") || + die "unable to find `uuencode' program"; # pre-calculate a reasonable MIME boundary tag my $randtag; @@ -349,7 +357,7 @@ ## _________________________________________________________________ ## -## Determine Shiela configuration. +## Determine OSSP shiela configuration. ## ## We theoretically could directly operate on the syntax tree as ## created by parse_config() above. But for convinience reasons and @@ -380,6 +388,9 @@ }, 'Logging' => { 'Report' => {} + }, + 'Environment' => { + 'Program' => {} } }; my $cf = &parse_config($t, \&parse_config_callback, $CF); @@ -1361,14 +1372,14 @@ # handle special invocation under `cvs add ' if (join(' ', @cvsinfo) eq '- New directory') { # see CVS' src/add.c - # Hmmm... we always just deal with files in Shiela, so there + # 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 # by CVS. Additionally, creating empty directories in the CVS # repository doesn't harm anyone. A regular cronjob is usually # used to get rid of them anyway. So we decided to not log # `cvs add ' commands at all. We are early in processing - # it is acceptable to just exit Shiela immediately. + # it is acceptable to just exit OSSP shiela immediately. exit(0); } @@ -1407,7 +1418,7 @@ # provided a temporary working area on the server # side for us. Now we can only hope the CVS version # is at least capable of server communications... - print STDERR "cvs import: Warning: Shiela cannot process local imports\n"; + print STDERR "cvs import: Warning: OSSP shiela cannot process local imports\n"; print STDERR "cvs import: if the CVS version isn't at least capable of\n"; print STDERR "cvs import: server communications (which we're forced to use).\n"; print STDERR "cvs import: Ignoring this operation - don't expect log messages!\n"; @@ -1655,8 +1666,8 @@ "\$ cvs update -p -r$Iv $Is >$Is.new\n" . "\$ diff -u $Is.old $Is.new\n"; if (not $RT->{useserver}) { - system("$RT->{cvs} -f -l -Q -n update -p -r$IV '$Is' | uuencode '$Is' >$Is.old"); - system("$RT->{cvs} -f -l -Q -n update -p -r$Iv '$Is' | uuencode '$Is' >$Is.new"); + system("$RT->{cvs} -f -l -Q -n update -p -r$IV '$Is' | $RT->{uuencode} '$Is' >$Is.old"); + system("$RT->{cvs} -f -l -Q -n update -p -r$Iv '$Is' | $RT->{uuencode} '$Is' >$Is.new"); } else { my $cvs = new CVS ($RT->{cvs}, $RT->{cvsroot}); @@ -1676,7 +1687,7 @@ $io->close; $cvs->close; } - my $io = new IO::File "diff -u $Is.old $Is.new|" + my $io = new IO::File "$RT->{diff} -u $Is.old $Is.new|" || die "unable to open diff command pipe for reading"; $cvsdiff .= $_ while (<$io>); $io->close; Index: ossp-pkg/shiela/shiela.pod RCS File: /v/ossp/cvs/ossp-pkg/shiela/shiela.pod,v rcsdiff -q -kk '-r1.7' '-r1.8' -u '/v/ossp/cvs/ossp-pkg/shiela/shiela.pod,v' 2>/dev/null --- shiela.pod 2002/12/21 09:42:57 1.7 +++ shiela.pod 2002/12/21 11:00:17 1.8 @@ -81,6 +81,53 @@ For semantical reasons only a particular structure is allowed to be created with the syntax. This is described in the following. +=head2 Environment Configuration + +The last configuration block is optional and for setting the run-time +environment. This configuration block has to be of the following +structure: + + Environment { + [Program sendmail ;] + [Program cvs ;] + [Program diff ;] + [Program uuencode ;] + }; + +The individual parts of this are: + +=over 4 + +=item BpathE;> + +This overrides the path to the F executable. Per default +B determines this automatically through the inherited C<$PATH> +variable. Use this either if you have Sendmail not in C<$PATH> or if you +have multiple Sendmail instances installed. + +=item BpathE;> + +This overrides the path to the F executable. Per default B +determines this automatically through the inherited C<$PATH> variable. +Use this either if you have CVS not in C<$PATH> or if you have multiple +CVS instances installed. + +=item BpathE;> + +This overrides the path to the F executable. Per default B determines this automatically through the inherited C<$PATH> +variable. Use this either if you have GNU Diffutils not in C<$PATH> or +if you have multiple GNU Diffutils instances installed. + +=item BpathE;> + +This overrides the path to the F executable. Per default +B determines this automatically through the inherited +C<$PATH> variable. Use this either if you have GNU Sharutils not in +C<$PATH> or if you have multiple GNU Sharutils instances installed. + +=back + =head2 Project Configuration The first configuration block is for the project to which the repository @@ -335,42 +382,19 @@ =back -=head2 Environment Configuration - -The last configuration block is optional and for setting the run-time -environment. This configuration block has to be of the following -structure: - - Environment { - CVS ; - Sendmail ; - }; - -The individual parts of this are: - -=over 4 - -=item BpathE;> - -This overrides the path to the CVS executable. Per default B -determines this automatically through the inherited C<$PATH> variable. -Use this either if you have CVS not in C<$PATH> or if you have multiple -CVS instances installed. - -=item BpathE;> - -This overrides the path to the Sendmail executable. Per default -B determines this automatically through the inherited C<$PATH> -variable. Use this either if you have Sendmail not in C<$PATH> or if you -have multiple Sendmail instances installed. - -=back - =head1 EXAMPLE The following example shows a fictive but reasonable configuration for a sample FOO project: + # override the run-time environment + Environment { + Program sendmail /e/foo/sw/bin/sendmail; + Program cvs /e/foo/sw/bin/cvs; + Program diff /e/foo/sw/bin/diff; + Program uuencode /e/foo/sw/bin/uuencode; + }; + # define the project and its users Project { Tag FOO; @@ -439,12 +463,6 @@ }; }; - # override the run-time environment - Environment { - CVS /e/foo/sw/bin/cvs; - Sendmail /e/foo/sw/bin/sendmail; - }; - =head1 HISTORY There were the scripts C and C (originally