diff --git a/roles/copr/dist_git/files/copr-dist-git.hourly b/roles/copr/dist_git/files/copr-dist-git.hourly index 6731becce1..28a81112b2 100755 --- a/roles/copr/dist_git/files/copr-dist-git.hourly +++ b/roles/copr/dist_git/files/copr-dist-git.hourly @@ -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 diff --git a/roles/copr/dist_git/files/httpd/dist-git/lookaside-copr.conf b/roles/copr/dist_git/files/httpd/dist-git/lookaside-copr.conf index 9aa3d78b5a..c86e19d525 100644 --- a/roles/copr/dist_git/files/httpd/dist-git/lookaside-copr.conf +++ b/roles/copr/dist_git/files/httpd/dist-git/lookaside-copr.conf @@ -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/ diff --git a/roles/copr/dist_git/files/httpd/dist-git/lookaside.conf b/roles/copr/dist_git/files/httpd/dist-git/lookaside.conf index 01a7608858..d967d1b0ff 100644 --- a/roles/copr/dist_git/files/httpd/dist-git/lookaside.conf +++ b/roles/copr/dist_git/files/httpd/dist-git/lookaside.conf @@ -1,5 +1,5 @@ -alias /lookaside /srv/cache/lookaside - +alias /lookaside /var/lib/dist-git/cache/lookaside + Options Indexes FollowSymLinks AllowOverride None Require all granted diff --git a/roles/copr/dist_git/tasks/main.yml b/roles/copr/dist_git/tasks/main.yml index f011ab0927..190ae079bd 100644 --- a/roles/copr/dist_git/tasks/main.yml +++ b/roles/copr/dist_git/tasks/main.yml @@ -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 diff --git a/roles/copr/dist_git/tasks/mount_fs.yml b/roles/copr/dist_git/tasks/mount_fs.yml index 97e752f9e3..bdfee5e599 100644 --- a/roles/copr/dist_git/tasks/mount_fs.yml +++ b/roles/copr/dist_git/tasks/mount_fs.yml @@ -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 diff --git a/roles/copr/dist_git/templates/cgitrc b/roles/copr/dist_git/templates/cgitrc index f7b8bcf706..4afb46c867 100644 --- a/roles/copr/dist_git/templates/cgitrc +++ b/roles/copr/dist_git/templates/cgitrc @@ -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