diff --git a/roles/distgit/pagure/templates/z_pagure.conf b/roles/distgit/pagure/templates/z_pagure.conf index 408bbc6351..64ae6d4571 100644 --- a/roles/distgit/pagure/templates/z_pagure.conf +++ b/roles/distgit/pagure/templates/z_pagure.conf @@ -18,6 +18,7 @@ WSGIDaemonProcess pagureproc user=pagure group=packager maximum-requests=1000 di # SSLCertificateKeyFile /etc/pki/tls/certs/pagure.io.key Alias /static /usr/lib/python2.7/site-packages/pagure/static/ + Alias /grokmirror /srv/git/grokmirror SetEnv GIT_PROJECT_ROOT /srv/git/repositories diff --git a/roles/distgit/tasks/main.yml b/roles/distgit/tasks/main.yml index a551797765..53b135f08c 100644 --- a/roles/distgit/tasks/main.yml +++ b/roles/distgit/tasks/main.yml @@ -430,3 +430,31 @@ command: semodule -i /usr/local/share/selinux/cgi-nfs.pp when: nfs_selinux_module|changed tags: selinux + +- name: setup grokmirror for repos + package: name=python-grokmirror state=installed + tags: + - grokmirror + - pkgs + +- name: make dir for grokmirror manifest + file: /srv/git/grokmirror state=directory owner=root group=packager mode=2775 + tags: + - grokmirror + - pkgs + +- name: set acls for grokmirror + acl: + path: /srv/git/grokmirror + etype: group + permissions: rwx + state: present + tags: + - grokmirror + - pkgs + +- name: run initial grokmirror run + command: /usr/bin/grok-manifest -m /srv/git/grokmirror/manifest.js.gz -t /srv/git/repositories/ creates=/srv/git/grokmirror/manifest.js.gz + tags: + - grokmirror + - pkgs diff --git a/roles/git/hooks/files/post-receive-chained b/roles/git/hooks/files/post-receive-chained index b0175124fb..05c4bcd9b9 100755 --- a/roles/git/hooks/files/post-receive-chained +++ b/roles/git/hooks/files/post-receive-chained @@ -7,7 +7,8 @@ pee \ /usr/share/git-core/post-receive-fedmsg \ /usr/share/git-core/post-receive-alternativearch \ /usr/lib/python2.7/site-packages/pagure/hooks/files/default_hook.py \ - /usr/lib/python2.7/site-packages/pagure/hooks/files/pagure_hook.py + /usr/lib/python2.7/site-packages/pagure/hooks/files/pagure_hook.py \ + "/usr/bin/grok-manifest -m /srv/git/grokmirror/manifest.js.gz -t /srv/git/repositories/ -n `pwd`" # We used to send emails directly from the git hook here, but now we send to # fedmsg which routes to FMN which routes to packagers and the mailing list.