summaryrefslogtreecommitdiffstats
path: root/INSTALL
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2015-06-01 22:58:39 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2015-06-01 23:24:52 +0200
commitb44411fb5399f75939a57f0ccc8166d06fa8ba6f (patch)
treeeaa23e8c411bbd8f433ac412f6a155d30278b765 /INSTALL
parentecfa27e406ebc5ff0d493f040f33426c565ded49 (diff)
downloadaurweb-b44411fb5399f75939a57f0ccc8166d06fa8ba6f.tar.xz
Use gitnamespaces for efficient storage
Instead of using one Git repository per package, use a single large object storage for space efficiency. The refs of the individual package bases are divided using gitnamespaces(7) which allows for exposing each namespace as an independent repository easily. Also, git-serve is modified to create a branch for each package, allowing to browse the large repository with cgit. Helped-by: Florian Pritz <bluewind@xinu.at> Helped-by: Johannes Löthberg <johannes@kyriasis.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'INSTALL')
-rw-r--r--INSTALL33
1 files changed, 29 insertions, 4 deletions
diff --git a/INSTALL b/INSTALL
index 2a67f9b..026d4b9 100644
--- a/INSTALL
+++ b/INSTALL
@@ -19,13 +19,17 @@ Setup on Arch Linux
$ mysql -uaur -p AUR </srv/http/aurweb/schema/aur-schema.sql
-5) Generate templates for new Git repositories:
+5) Create a new user:
- $ /srv/http/aurweb/scripts/git-integration/gen-templates.py
+ # useradd -U -d /srv/http/aurweb -c 'AUR user' aur
-6) Create a new user:
+6) Initialize the Git repository:
- # useradd -U -d /srv/http/aurweb -c 'AUR user' aur
+ # mkdir /srv/http/aurweb/aur.git/
+ # cd /srv/http/aurweb/aur.git/
+ # git init --bare
+ # ln -s ../../scripts/git-integration/git-update.py hooks/update
+ # chown -R aur .
7) Install the git-auth wrapper script:
@@ -42,3 +46,24 @@ Setup on Arch Linux
AuthorizedKeysCommand /usr/local/bin/aur-git-auth "%t" "%k"
AuthorizedKeysCommandUser aur
+9) If you want to enable smart HTTP support with nginx and uWSGI, you can use
+ the following directives:
+
+ location ~ ^/([a-z0-9][a-z0-9.+_-]*)\.git/(.*)$ {
+ include uwsgi_params;
+ uwsgi_modifier1 9;
+ uwsgi_param PATH_INFO /aur.git/$2;
+ uwsgi_param GIT_NAMESPACE $1;
+ uwsgi_pass unix:/run/uwsgi/smarthttp/aurweb.sock;
+ }
+
+ For the uWSGI configuration, the following template can be used:
+
+ [uwsgi]
+ plugins = cgi
+ uid = aur
+ processes = 1
+ threads = 8
+ env = GIT_HTTP_EXPORT_ALL=
+ env = GIT_PROJECT_ROOT=/srv/http/aurweb
+ cgi = /usr/lib/git-core/git-http-backend