From 79e285bea05e4e9a4c0feb7b43fe8355317d7f8e Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Sat, 31 Oct 2015 23:34:51 +0000 Subject: [PATCH] Make copr-dist-git serve smart-git and backend use it --- roles/copr/backend/templates/copr-be.conf.j2 | 2 +- roles/copr/dist_git/files/httpd/git-smart-http.conf | 7 +++++++ roles/copr/dist_git/tasks/main.yml | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 roles/copr/dist_git/files/httpd/git-smart-http.conf diff --git a/roles/copr/backend/templates/copr-be.conf.j2 b/roles/copr/backend/templates/copr-be.conf.j2 index f6228fe4fe..bb1956537b 100644 --- a/roles/copr/backend/templates/copr-be.conf.j2 +++ b/roles/copr/backend/templates/copr-be.conf.j2 @@ -83,7 +83,7 @@ keygen_host={{ keygen_host }} # minimum age for builds to be pruned prune_days=14 -dist_git_url=http://{{ dist_git_base_url }}/cgit +dist_git_url=http://{{ dist_git_base_url }}/git [builder] # default is 1800 diff --git a/roles/copr/dist_git/files/httpd/git-smart-http.conf b/roles/copr/dist_git/files/httpd/git-smart-http.conf new file mode 100644 index 0000000000..af4427b828 --- /dev/null +++ b/roles/copr/dist_git/files/httpd/git-smart-http.conf @@ -0,0 +1,7 @@ +SetEnv GIT_PROJECT_ROOT /var/lib/dist-git/git/rpms +SetEnv GIT_HTTP_EXPORT_ALL +ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/ + + Options +ExecCGI + Require all granted + diff --git a/roles/copr/dist_git/tasks/main.yml b/roles/copr/dist_git/tasks/main.yml index 4602ebef76..44c4e3d4d0 100644 --- a/roles/copr/dist_git/tasks/main.yml +++ b/roles/copr/dist_git/tasks/main.yml @@ -54,11 +54,12 @@ - command: 'git config --global user.name "Copr dist git"' -- name: install config for httpd to serve lookaside openly +- name: install httpd config to serve lookaside and smart-git copy: src="httpd/{{ item }}" dest="/etc/httpd/conf.d/dist-git/{{ item }}" with_items: - lookaside.conf - lookaside-copr.conf + - git-smart-http.conf tags: - config notify: