From 2078a0c828a064d0e12eed9110c3f71237a3d022 Mon Sep 17 00:00:00 2001 From: Tommi Virtanen Date: Thu, 29 Nov 2007 00:40:34 +0200 Subject: Write gitweb projects.list to ~/gitosis, not inside the gitosis-admin repo. This allows running gitweb as a separate user without needing to allow it read access to gitosis-admin.git. Running as separate user will still most likely require a ``chgrp www-data`` of the relevant repositories, but nothing not already decided public needs to be exposed. Existing gitweb users will need to adjust their gitweb.conf to point to the new location of the projects.list file. Removing the old projects.list from ~git/repositories/gitosis-admin.git/projects.list is safe once gitweb has switched to using the new location. --- gitosis/run_hook.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gitosis/run_hook.py') diff --git a/gitosis/run_hook.py b/gitosis/run_hook.py index a7943fc..f9a009d 100644 --- a/gitosis/run_hook.py +++ b/gitosis/run_hook.py @@ -13,6 +13,7 @@ from gitosis import ssh from gitosis import gitweb from gitosis import gitdaemon from gitosis import app +from gitosis import util def post_update(cfg, git_dir): export = os.path.join(git_dir, 'gitosis-export') @@ -31,9 +32,10 @@ def post_update(cfg, git_dir): gitweb.set_descriptions( config=cfg, ) + generated = util.getGeneratedFilesDir(config=cfg) gitweb.generate_project_list( config=cfg, - path=os.path.join(git_dir, 'projects.list'), + path=os.path.join(generated, 'projects.list'), ) gitdaemon.set_export_ok( config=cfg, -- cgit v1.2.3