I've set up new repositories on RHEL 5 with subversion 1.5.3 from the
RPMforge repositories. I'm using svn+ssh authentication to avoid the storage
of user passwords in local user directories. And I'm using the classic
authorized_keys format:
command="/usr/bin/svnserve -t --tunnel-user=user" [SSH public key]
This works well to provide access. But the pre-commit and svnperms.conf that
I'm using fail to detect the author. I've edited pre-commit to report as
follows, and they're not showing the svnlook author being reported. This
also breaks the ability of svn+ssh, and svnperms.conf, to correctly assign
owners of submitted changes. I assume this is an svnlook bug: it used to
work well in Subversion 1.4.x. And I'd hate to have to migrate *back* to
that, really. I like the new features. But it's a big problem for system
management fo rme.
Here are my tweaks to pre-commit to generate my checks: basically, they
record the output of svnlook and other settings into a report file.
DATE=`date +%Y%m%d%M%S` export DATE
REPORT=/tmp/report-$DATE export $REPORT
rm -f $REPORT
# Report state for debugging purposes
echo "Arguments: $@" >> $REPORT
echo "REPOS:" >> $REPORT
echo "$REPOS: $REPOS" >> $REPORT
echo "TXN: $TXN" >> $REPORT
SVNLOOK=/usr/bin/svnlook
# Make sure that the log message contains some text.
echo "SVNLOOK command:" >> $REPORT
echo "$SVNLOOK log -t \"$TXN\" \"$REPOS\" | grep \"[a-zA-Z0-9]\" " >>
$REPORT
$SVNLOOK log -t "$TXN" "$REPOS" | grep "[a-zA-Z0-9]" >> $REPORT
echo "$SVNLOOK author -t \"$TXN\" \"$REPOS\"" >> $REPORT
$SVNLOOK author -t "$TXN" "$REPOS" >> $REPORT
$SVNLOOK log -t "$TXN" "$REPOS" | \
grep "[a-zA-Z0-9]" > /dev/null || exit 1
echo 'SVNLOOK succeeded' >> $REPORT
echo "user before svnlook: $user" >> $REPORT
user=`$SVNLOOK author -t "$TXN" "$REPOS"`
echo "user after svnlook: $user" >> $REPORT
# Check that the author of this commit has the rights to perform
# the commit on the files and directories being modified.
#commit-access-control.pl "$REPOS" "$TXN" commit-access-control.cfg || exit
1
$REPOS/hooks/svnperms.py -r "$REPOS" -t "$TXN" || exit 1
# All checks passed, so allow the commit.
exit 0
Received on 2008-10-26 02:07:21 CEST