Redirect old cgit repo urls to the new namespace.
This commit is contained in:
parent
ff6c36687a
commit
cc0089049f
4 changed files with 17 additions and 4 deletions
|
@ -6,9 +6,8 @@
|
|||
# Looking for git repos.
|
||||
#
|
||||
newfile=`mktemp`
|
||||
target=/srv/git/repositories/rpms
|
||||
target=/srv/git/repositories
|
||||
|
||||
ls $target > $newfile
|
||||
for d in `ls $target`; do
|
||||
if [ ! -L $target/$d ] && [ -d $target/$d ]; then
|
||||
for f in `ls $target/$d/`; do
|
||||
|
|
8
roles/distgit/files/cgit.conf
Normal file
8
roles/distgit/files/cgit.conf
Normal file
|
@ -0,0 +1,8 @@
|
|||
# Redirect requests to un-namespaced repos to their new namespaced home
|
||||
RedirectMatch 302 "/cgit/([a-zA-Z0-9\-]+)\.git(.*)$" "/cgit/rpms/$1.git$2"
|
||||
|
||||
Alias /cgit-data /usr/share/cgit
|
||||
ScriptAlias /cgit /var/www/cgi-bin/cgit
|
||||
<Directory "/usr/share/cgit">
|
||||
Require all granted
|
||||
</Directory>
|
|
@ -71,4 +71,4 @@ mimetype.svg=image/svg+xml
|
|||
## PPS: This list could be kept in a different file (e.g. '/etc/cgitrepos')
|
||||
## and included like this:
|
||||
project-list=/srv/git/pkgs-git-repos-list
|
||||
scan-path=/srv/git/repositories/rpms
|
||||
scan-path=/srv/git/repositories
|
||||
|
|
|
@ -233,12 +233,18 @@
|
|||
notify:
|
||||
- reload httpd
|
||||
|
||||
- name: install the CGit-related httpd config
|
||||
- name: install the CGit-related httpd redirect config
|
||||
copy: src=redirect.conf dest=/etc/httpd/conf.d/pkgs.fedoraproject.org/redirect.conf
|
||||
tags: distgit
|
||||
notify:
|
||||
- reload httpd
|
||||
|
||||
- name: install the CGit-related httpd main config
|
||||
copy: src=cgit.conf dest=/etc/httpd/conf.d/cgit.conf
|
||||
tags: distgit
|
||||
notify:
|
||||
- reload httpd
|
||||
|
||||
|
||||
# -- Lookaside Cache -------------------------------------
|
||||
# This is the annex to Dist Git, where we host source tarballs.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue