Jason's picture

Mercurial is installed and is the most recent version. There isn't a /etc/apache2/conf/ directory - should I create it, or did you mean something else? (I don't have a revisioncontrol.conf file either).

root@trac-02 /etc/apache2# apt update && apt install -y mercurial
Hit:1 http://deb.debian.org/debian buster InRelease
Get:2 http://security.debian.org buster/updates InRelease [65.4 kB]                  
Ign:3 http://archive.turnkeylinux.org/debian buster-security InRelease
Ign:4 http://archive.turnkeylinux.org/debian buster InRelease
Hit:5 http://archive.turnkeylinux.org/debian buster-security Release
Hit:7 http://archive.turnkeylinux.org/debian buster Release
Fetched 65.4 kB in 2s (33.4 kB/s)                         
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
mercurial is already the newest version (4.8.2-1+deb10u1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@trac-02 /etc/apache2# cat > /etc/apache2/conf/hg.conf <<EOF
> AddHandler cgi-script .cgi
> ScriptAliasMatch ^/hg(.*) /usr/lib/cgi-bin/hgweb.cgi/\$1
> EOF
-bash: /etc/apache2/conf/hg.conf: No such file or directory
root@trac-02 /etc/apache2# sed -i "\|Include /etc/apache2/conf/svn.conf|a \    Include /etc/apache2/conf/hg.conf" /etc/apache2/sites-available/revisioncontrol.conf
sed: can't read /etc/apache2/sites-available/revisioncontrol.conf: No such file or directory
root@trac-02 /etc/apache2# ls -lah
total 92K
drwxr-xr-x  8 root root 4.0K Jul  9 06:25 .
drwxr-xr-x 96 root root 4.0K Jul 18 11:23 ..
-rw-r--r--  1 root root 7.1K Aug 25  2020 apache2.conf
drwxr-xr-x  2 root root 4.0K Jul  9 06:25 conf-available
drwxr-xr-x  2 root root 4.0K May 20 22:55 conf-enabled
-rw-r--r--  1 root root 1.8K May 20 22:56 envvars
-rw-r--r--  1 root root  31K Aug  8  2020 magic
drwxr-xr-x  2 root root  16K Jul 18 11:23 mods-available
drwxr-xr-x  2 root root 4.0K Jul 18 11:23 mods-enabled
-rw-r--r--  1 root root  320 May 20 22:55 ports.conf
drwxr-xr-x  2 root root 4.0K Jul 19 08:57 sites-available
drwxr-xr-x  2 root root 4.0K Jul 19 09:49 sites-enabled

If I navigate to http://trac-02/hg-helloworld, the following is logged in /var/log/apache2/error.log

[Mon Jul 19 09:31:02.873748 2021] [mpm_event:notice] [pid 7280:tid 139725540639872] AH00489: Apache/2.4.38 (Debian) OpenSSL/1.1.1d mod_wsgi/4.6.5 Python/2.7 configured -- resuming normal operations
[Mon Jul 19 09:31:02.873790 2021] [core:notice] [pid 7280:tid 139725540639872] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jul 19 09:31:10.186595 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602] /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:1243: UserWarning: /var/local/lib/trac/.eg$
[Mon Jul 19 09:31:10.186638 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]   warnings.warn(msg, UserWarning)
[Mon Jul 19 09:31:10.202128 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602] mod_wsgi (pid=7522): Exception occurred processing WSGI script '/usr/local/share/trac/cgi-bin/trac.ws$
[Mon Jul 19 09:31:10.202187 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602] Traceback (most recent call last):
[Mon Jul 19 09:31:10.202209 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]   File "/usr/local/share/trac/cgi-bin/trac.wsgi", line 11, in application
[Mon Jul 19 09:31:10.202285 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]     return dispatch_request(environ, start_request)
[Mon Jul 19 09:31:10.202296 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]   File "/usr/lib/python2.7/dist-packages/trac/web/main.py", line 614, in dispatch_request
[Mon Jul 19 09:31:10.202315 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]     return _dispatch_request(req, env, env_error)
[Mon Jul 19 09:31:10.202324 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]   File "/usr/lib/python2.7/dist-packages/trac/web/main.py", line 654, in _dispatch_request
[Mon Jul 19 09:31:10.202337 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]     send_internal_error(env, req, sys.exc_info())
[Mon Jul 19 09:31:10.202346 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]   File "/usr/lib/python2.7/dist-packages/trac/web/main.py", line 785, in send_internal_error
[Mon Jul 19 09:31:10.202360 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]     Chrome(env).add_jquery_ui(req)
[Mon Jul 19 09:31:10.202368 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]   File "/usr/lib/python2.7/dist-packages/trac/web/chrome.py", line 1388, in add_jquery_ui
[Mon Jul 19 09:31:10.202614 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]     or 'common/js/jquery-ui.js')
[Mon Jul 19 09:31:10.202626 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]   File "/usr/lib/python2.7/dist-packages/trac/web/chrome.py", line 166, in add_script
[Mon Jul 19 09:31:10.202641 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]     scriptset = req.chrome.setdefault('scriptset', set())
[Mon Jul 19 09:31:10.202650 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]   File "/usr/lib/python2.7/dist-packages/trac/web/api.py", line 498, in __getattr__
[Mon Jul 19 09:31:10.202819 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]     value = self.callbacks[name](self)
[Mon Jul 19 09:31:10.202830 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]   File "/usr/lib/python2.7/dist-packages/trac/web/chrome.py", line 823, in prepare_request
[Mon Jul 19 09:31:10.202845 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]     for contributor in self.navigation_contributors:
[Mon Jul 19 09:31:10.202854 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]   File "/usr/lib/python2.7/dist-packages/trac/core.py", line 93, in extensions
[Mon Jul 19 09:31:10.202879 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]     components = [component.compmgr[cls] for cls in classes]
[Mon Jul 19 09:31:10.202888 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]   File "/usr/lib/python2.7/dist-packages/trac/core.py", line 238, in __getitem__
[Mon Jul 19 09:31:10.202901 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]     component = cls(self)
[Mon Jul 19 09:31:10.202909 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]   File "/usr/lib/python2.7/dist-packages/trac/core.py", line 155, in __call__
[Mon Jul 19 09:31:10.202922 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]     self.__init__()
[Mon Jul 19 09:31:10.202930 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]   File "build/bdist.linux-x86_64/egg/acct_mgr/web_ui.py", line 73, in __init__
[Mon Jul 19 09:31:10.202938 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]     self._write_check(log=True)
[Mon Jul 19 09:31:10.202946 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]   File "build/bdist.linux-x86_64/egg/acct_mgr/web_ui.py", line 76, in _write_check
[Mon Jul 19 09:31:10.202954 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]     writable = self.acctmgr.get_all_supporting_stores('set_password')
[Mon Jul 19 09:31:10.202962 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]   File "build/bdist.linux-x86_64/egg/acct_mgr/api.py", line 324, in get_all_supporting_stores
[Mon Jul 19 09:31:10.202970 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]     for store in self.password_store:
[Mon Jul 19 09:31:10.202977 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]   File "build/bdist.linux-x86_64/egg/acct_mgr/api.py", line 296, in password_store
[Mon Jul 19 09:31:10.202985 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]     for store in self.stores:
[Mon Jul 19 09:31:10.202993 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]   File "/usr/lib/python2.7/dist-packages/trac/core.py", line 93, in extensions
[Mon Jul 19 09:31:10.203005 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]     components = [component.compmgr[cls] for cls in classes]
[Mon Jul 19 09:31:10.203013 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]   File "/usr/lib/python2.7/dist-packages/trac/core.py", line 238, in __getitem__
[Mon Jul 19 09:31:10.203025 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]     component = cls(self)
[Mon Jul 19 09:31:10.203033 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]   File "/usr/lib/python2.7/dist-packages/trac/core.py", line 155, in __call__
[Mon Jul 19 09:31:10.203045 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]     self.__init__()
[Mon Jul 19 09:31:10.203053 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]   File "build/bdist.linux-x86_64/egg/acct_mgr/svnserve.py", line 32, in __init__
[Mon Jul 19 09:31:10.203062 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602]     repo_dir = RepositoryManager(self.env).repository_dir
[Mon Jul 19 09:31:10.203078 2021] [wsgi:error] [pid 7522:tid 139725472233216] [remote 10.0.2.73:57602] AttributeError: 'RepositoryManager' object has no attribute 'repository_dir'