- Package:
- kgb-client
- Source:
- kgb-bot
- Submitter:
- Pierre Schweitzer
- Date:
- 2014-12-10 19:12:17 UTC
- Severity:
- important
This report follows the report on Ubuntu LP: https://bugs.launchpad.net/ubuntu/+source/kgb-bot/+bug/1400453 When calling the kgb-client on a SVN repo with a tailing "/", the client will hit an assert: perl: /build/buildd/subversion-1.8.8/subversion/libsvn_subr/dirent_uri.c:972: svn_dirent_join: Assertion `svn_dirent_is_canonical(base, pool)' failed. Aborted The solution to fix it is to remove said tailing "/". Because SVN provides the path with the tailing "/" in case of a hook, it would be better if kgb-client chomps it.
Leading or trailing? I suppose the former, as you wrote in launchpad. Anyway, I can't confirm this behaviour. Luckily my post-commit hook writes a log so I could look at the last invocation, which looks like: /usr/bin/kgb-client --conf /home/groups/$CONFIG.conf /var/svnroot/$REPO 1588 (From your LP bug: kgb-client --conf /etc/kgb-client/kgb-reactos.conf --repository svn /srv/svn/reactos/ 65590 ) Running it again there is no output and the return code is 0. (And I see the commit message in the channel :)) Or is it the trailing / after all? % /usr/bin/kgb-client --conf /home/groups/$CONFIG.conf /var/svnroot/$REPO/ 1588 perl: /build/subversion-IvrZTj/subversion-1.8.10/subversion/libsvn_subr/dirent_uri.c:972: svn_dirent_join: Assertion `svn_dirent_is_canonical(base, pool)' failed. + coredump. Ok, here we are. I'm just not so sure where the trailing / in your invocation comes from. Unless I'm mistaken, the subversion version that passed the path without a trailing slash to the post-commit hook in my example was 1.8.9-2, and KGB was at version 1.33-1. But yes, having the client strip the trailing / from the path might be a good idea. Cheers, gregor
Ok, thanks for clarifying. I have REPOS="$1" REV="$2" KGB_CLI=/usr/bin/kgb-client KGB_CONF=$some.config $KGB_CLI --conf "$KGB_CONF" "$REPOS" "$REV" So that's the same, except that - I don't get a trailing slash - I don't use --repository svn (no idea if this has any influence) Cheers, gregor
Yes, I'm sorry, it's trailing "/". Just confused a bit while writing the bug report. For the record, our invocation is in post-commit hook is: kgb-client --conf /etc/kgb-client/kgb-reactos.conf --repository svn "$1" "$2" > /dev/null 2>&1 & Sorry for the confusion. svn_dirent_join: Assertion `svn_dirent_is_canonical(base, pool)' failed.
Please find attached a patch to resolve the issue. When in SVN context, it just chomp any trailing /. Tested & fixing the issue here.