From 90a06a8ecd109d37691fa63bc92f41bab5fd0899 Mon Sep 17 00:00:00 2001 From: Andy Doan Date: Wed, 9 Nov 2016 13:51:01 -0600 Subject: cgit: convert android-git over to cgit Change-Id: I1b24f257ddaaac23749a8bd230ad8a2538e12739 Reviewed-on: https://review.linaro.org/15429 Reviewed-by: Ben Copeland --- .../git-servers/files/android-git.linaro.org.conf | 31 ++++++++++------------ 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 - - - Options +ExecCgi -MultiViews +SymLinksIfOwnerMatch - AllowOverride none - Require all granted - + ScriptAliasMatch "(?x)^/git/(.*/(HEAD | info/refs | objects/info/[^/]+ | git-(upload|receive)-pack))$" {{ apache_root }}/cgit/git-http-backend.cgi AllowOverride None @@ -143,8 +129,19 @@ Mutex default rewrite-map - + # 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/" + AllowOverride None + Options ExecCGI FollowSymlinks Require all granted 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 -- cgit v1.2.3