copr-dist-git: adjust devel setup according to the current state of dist-git upstream
This commit is contained in:
parent
d4fdc837ed
commit
2a81a086ed
6 changed files with 10 additions and 26 deletions
|
@ -3,6 +3,6 @@
|
|||
(
|
||||
flock -n 9 || exit 1
|
||||
# ... commands executed under lock ...
|
||||
CGIT_CONFIG="/etc/cgitrc.slow" /var/www/cgi-bin/cgit --scan-path=/srv/git/repositories >/var/cache/cgit/repo-list.rc.new 2>/dev/null && mv -f /var/cache/cgit/repo-list.rc.new /var/cache/cgit/repo-list.rc
|
||||
CGIT_CONFIG="/etc/cgitrc.slow" /var/www/cgi-bin/cgit --scan-path=/var/lib/dist-git/git/repositories >/var/cache/cgit/repo-list.rc.new 2>/dev/null && mv -f /var/cache/cgit/repo-list.rc.new /var/cache/cgit/repo-list.rc
|
||||
|
||||
) 9>/var/lock/mylockfile
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
AliasMatch "/repo(/.*)/md5(/.*)" "/srv/cache/lookaside$1$2"
|
||||
Alias /repo/ /srv/cache/lookaside/
|
||||
AliasMatch "/repo(/.*)/md5(/.*)" "/var/lib/dist-git/cache/lookaside$1$2"
|
||||
Alias /repo/ /var/lib/dist-git/cache/lookaside/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
alias /lookaside /srv/cache/lookaside
|
||||
<Directory /srv/cache/lookaside>
|
||||
alias /lookaside /var/lib/dist-git/cache/lookaside
|
||||
<Directory /var/lib/dist-git/cache/lookaside>
|
||||
Options Indexes FollowSymLinks
|
||||
AllowOverride None
|
||||
Require all granted
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
dnf: state=latest name="dist-git"
|
||||
|
||||
- name: set home for copr-dist-git user
|
||||
user: name="copr-dist-git" home=/srv/git
|
||||
user: name="copr-dist-git" home=/var/lib/dist-git/git
|
||||
when: devel
|
||||
|
||||
- name: install packages
|
||||
|
@ -65,7 +65,7 @@
|
|||
when: not devel
|
||||
|
||||
- name: make sure directories are owned by root:root user
|
||||
file: path=/srv/git owner=root group=root mode=0755
|
||||
file: path=/var/lib/dist-git/git owner=root group=root mode=0755
|
||||
when: devel
|
||||
|
||||
# set ssh key, so that copr-service could access gitolite
|
||||
|
@ -79,12 +79,12 @@
|
|||
|
||||
- debug: msg={{pubkey}}
|
||||
|
||||
- name: prepare authorized key, so copr-service could interact with gitolite
|
||||
- name: prepare authorized key for copr-dist-git
|
||||
authorized_key: user="copr-dist-git" key="{{pubkey}}"
|
||||
when: devel
|
||||
|
||||
- name: set correct selinux policy for copr-dist-git's .ssh dir
|
||||
shell: 'semanage fcontext -a -t ssh_home_t "/srv/git/.ssh(/.*)?" && restorecon -R /srv/git/.ssh'
|
||||
shell: 'semanage fcontext -a -t ssh_home_t "/var/lib/dist-git/git/.ssh(/.*)?" && restorecon -R /var/lib/dist-git/git/.ssh'
|
||||
when: devel
|
||||
|
||||
- name: prepare authorized key, so copr-service could interact with gitolite
|
||||
|
|
|
@ -4,22 +4,6 @@
|
|||
- name: mount up disk of copr repo
|
||||
mount: name=/var/lib/dist-git src='LABEL=copr-dist-git' fstype=ext4 state=mounted
|
||||
|
||||
- name: prepare new /srv/git bind mount point
|
||||
file: state=directory path=/srv/git
|
||||
when: devel
|
||||
|
||||
- name: prepare new /srv/cache bind mount point
|
||||
file: state=directory path=/srv/cache
|
||||
when: devel
|
||||
|
||||
- name: mount up /srv/git
|
||||
mount: name=/srv/git src=/var/lib/dist-git/git fstype=ext4 opts=rw,bind state=mounted
|
||||
when: devel
|
||||
|
||||
- name: mount up /srv/cache
|
||||
mount: name=/srv/cache src=/var/lib/dist-git/cache fstype=ext4 opts=rw,bind state=mounted
|
||||
when: devel
|
||||
|
||||
- name: prepare mount point
|
||||
file: state=directory path=/var/lib/copr-dist-git
|
||||
|
||||
|
|
|
@ -80,6 +80,6 @@ mimetype.svg=image/svg+xml
|
|||
#repo.owner=fooman@example.com
|
||||
#repo.readme=info/web/about.html
|
||||
project-list=/var/lib/copr-dist-git/cgit_pkg_list
|
||||
#scan-path=/srv/git/repositories
|
||||
#scan-path=/var/lib/dist-git/git/repositories
|
||||
include=/var/cache/cgit/repo-list.rc
|
||||
clone-prefix=http://{{ dist_git_base_url }}/git
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue