diff options
author | Andy Doan <andy.doan@linaro.org> | 2016-11-09 13:51:01 -0600 |
---|---|---|
committer | Andy Doan <andy.doan@linaro.org> | 2016-11-10 14:53:03 -0600 |
commit | 90a06a8ecd109d37691fa63bc92f41bab5fd0899 (patch) | |
tree | 7fff4778db0c52966279079a0c2a9a235283d52f | |
parent | e745e537cca2b963709fa4004db06e3b5c683643 (diff) |
cgit: convert android-git over to cgit
Change-Id: I1b24f257ddaaac23749a8bd230ad8a2538e12739
Reviewed-on: https://review.linaro.org/15429
Reviewed-by: Ben Copeland <ben.copeland@linaro.org>
-rw-r--r-- | per-service/git-servers/files/android-git.linaro.org.conf | 31 | ||||
-rw-r--r-- | per-service/git-servers/group_vars/android-git | 30 |
2 files changed, 44 insertions, 17 deletions
diff --git a/per-service/git-servers/files/android-git.linaro.org.conf b/per-service/git-servers/files/android-git.linaro.org.conf index fe99cb07..c7eb7f90 100644 --- a/per-service/git-servers/files/android-git.linaro.org.conf +++ b/per-service/git-servers/files/android-git.linaro.org.conf @@ -100,34 +100,20 @@ Mutex default rewrite-map RewriteMap gitdirs prg:{{tools_checkout_dir}}/linaro-git-tools/git-repo-url-rewrite/git-directory-rewritemap.py RewriteRule ^/git-ro/(.*) /git-http/${gitdirs:$1} [P,L] - RewriteRule ^/git/(.*/clone.bundle)$ /git-http/${gitdirs:$1} [P,L] - - RedirectMatch permanent ^/$ /gitweb RewriteCond %{HTTP_USER_AGENT} (googlebot|bingbot|Baiduspider) [NC] RewriteRule .* - [R=403,L] - SetEnv GIT_HTTP_EXPORT_ALL 1 - SetEnv GIT_PROJECT_ROOT {{ repo_root }} - SetEnv GITWEB_CONFIG /etc/gitweb.{{ git_host }}.conf - SetEnvIf User-Agent "Amazon Route 53 Health Check" dontlog - Alias /gitweb.js /usr/share/gitweb/static/gitweb.js Alias /git-http/ {{ repo_root }}/ AliasMatch ^/git/(.*)/clone.bundle$ {{ repo_root }}/$1/clone.bundle AliasMatch ^/git/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$ {{ repo_root }}/$1 AliasMatch ^/git/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$ {{ repo_root }}/$1 + Alias /manifest.js.gz {{ repo_root }}/manifest.js.gz - ScriptAliasMatch "(?x)^/git/(.*/(HEAD | info/refs | objects/info/[^/]+ | git-(upload|receive)-pack))$" /usr/lib/git-core/git-http-backend/$1 - ScriptAlias /gitweb /usr/lib/cgi-bin/gitweb.cgi - - <Directory "/usr/lib/git-core"> - Options +ExecCgi -MultiViews +SymLinksIfOwnerMatch - AllowOverride none - Require all granted - </Directory> + ScriptAliasMatch "(?x)^/git/(.*/(HEAD | info/refs | objects/info/[^/]+ | git-(upload|receive)-pack))$" {{ apache_root }}/cgit/git-http-backend.cgi <Directory "{{ repo_root }}"> AllowOverride None @@ -143,8 +129,19 @@ Mutex default rewrite-map </FilesMatch> </Directory> - <Directory "{{ apache_root }}/{{ git_host }}/"> + # We have to keep an alias around for gitweb because we used to have a + # redirect permanent rule for / -> /gitweb + RewriteRule ^/gitweb(.*)$ $1 [P,L] + + # We have things in ci and user bookmarks for gitweb URLs to raw file downloads like: + # curl -L http://git.linaro.org/ci/publishing-api.git/blob_plain/HEAD:/linaro-cp.py + RewriteRule ^/(.*)/blob_plain/HEAD:/(.*)$ $1/plain/$2 [R=301] + + Alias /cgit-css "/var/www/cgit/cgit-css/" + ScriptAlias / "{{ apache_root}}/cgit/cgit/" + <Directory "{{ apache_root }}/cgit/"> AllowOverride None + Options ExecCGI FollowSymlinks Require all granted </Directory> </VirtualHost> diff --git a/per-service/git-servers/group_vars/android-git b/per-service/git-servers/group_vars/android-git index 9fbd01c4..1c2f0dfc 100644 --- a/per-service/git-servers/group_vars/android-git +++ b/per-service/git-servers/group_vars/android-git @@ -7,3 +7,33 @@ host_site_name: Linaro Android Git Hosting git_bundle_blacklist: git-android-bundle-exclude.txt grokmirror_master: false + +clone_urls: + - https://{{git_host}}/git + +cgit_strict_export: false + +collapsible_sections: + - accessories + - android + - boot + - brillo + - device + - hardware + - jujube + - kernel + - lava-server + - linaro + - linaro-art + - linaro-extras + - mirror + - packages + - people + - platform + - product + - test + - toolchain + - tools + - trusty + - u-boot + - uefi |