subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan <>
Subject Re: svnserve not reading hooks-env?
Date Thu, 10 Nov 2016 00:07:02 GMT
Hi Steven,

On 11/10/2016 00:45, Steven Simpson wrote:
> 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
> 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?
So if I get you right you are saying that someone connecting to the
server via https://[URL] causes the hook to run as expected while
someone using svn+ssh://[URL] triggers the hook but that fails due to
REPOWEBMAN_CONFIG not being set?

If I get you right, I can't follow you why you think REPOWEBMAN_CONFIG
would be set in the svn+ssh-case (or maybe I'm lacking some knowledge
You stated that you specified REPOWEBMAN_CONFIG in
/etc/forge/svn-hooks-env.ini which is set in the Apache config (aka:
applies when someone uses https://[URL]).

You also state that you start svnserve with the config file being set to
/etc/forge/svnserve.ini. But where would you expect the connection to
the REPOWEBMAN_CONFIG-environment variable here? Am I missing something
or is this actually the cause of your problem?


View raw message