Hi,
I have a server set up to access multiple repositories via HTTPS and
SSH. The Apache configuration points to the path-based authorization
file and the hook environment:
AuthzSVNAccessFile /var/forge/service/svn-authz.conf
SVNHooksEnv /etc/forge/svn-hooks-env.ini
The latter contains:
[default]
LANG=en_GB.UTF-8
PATH=/usr/bin:/bin
REPOWEBMAN_CONFIG=/etc/forge/repowebman.ini
$REPOWEBMAN_CONFIG is critical to invoking hooks, and they appear to
work when invoked via HTTPS. I also set up the following symlinks in
each repository:
hooks-env -> /etc/forge/svn-hooks-env.ini
svnserve.conf -> /etc/forge/svnserve.ini
The first is set up so that commits via <file:> URLs run hooks
correctly. The second file contains:
[general]
authz-db=/var/forge/service/svn-authz.conf
hooks-env=/etc/forge/svn-hooks-env.ini
...so they match the Apache configuration exactly.
To top it all off, my authorized_keys file contains the likes of:
command="/usr/bin/svnserve -t --config-file=/etc/forge/svnserve.ini
--tunnel-user=XXX -r XXX"
The SSH account is the same as the Apache account, and can read
/etc/forge/svnserve.ini, /etc/forge/svn-hooks-env.ini, and
/var/forge/service/svn-authz.conf.
svnserve reports as:
svnserve, version 1.9.3 (r1718519)
compiled Mar 14 2016, 07:39:01 on x86_64-pc-linux-gnu
svnadmin info on the repo I'm experimenting with says:
Repository Format: 5
Compatible With Version: 1.9.0
Repository Capability: mergeinfo
Filesystem Type: fsfs
Filesystem Format: 7
FSFS Sharded: yes
FSFS Shard Size: 1000
FSFS Shards Packed: 0/0
FSFS Logical Addressing: no
Configuration File: db/fsfs.conf
PROBLEM: When attempting to commit via SSH, I get errors from my scripts
indicating that they haven't found the REPOWEBMAN_CONFIG setting, so
they fail, and the commit fails. HTTPS-invoked hooks work fine. I've
verified that the authz-db field is being read from
/etc/forge/svnserve.ini (by pointing it at file that doesn't exist), but
hooks-env seems to be ignored, whether it's the setting inside
svnserve.ini or the symlink.
I temporarily replaced the start-commit script to print out env to
stderr and fail. When invoked over HTTPS, I see the environment
correctly set up as per /etc/forge/svn-hooks-env.ini; when over SSH,
only PWD, SHLVL and _ are set up.
What am I missing? Some silly typo?
Thanks,
Steven