From 0aede2620034ecb1339bec613d3bfacf27cda4e2 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Tue, 27 Apr 2021 22:16:01 +0200 Subject: [PATCH] copr-dist-git: simplify cgitrc config, #2 See previous commit. --- .../dist_git/files/patches/disable-cgit-refresh.patch | 10 ---------- roles/copr/dist_git/tasks/main.yml | 10 ++-------- 2 files changed, 2 insertions(+), 18 deletions(-) delete mode 100644 roles/copr/dist_git/files/patches/disable-cgit-refresh.patch diff --git a/roles/copr/dist_git/files/patches/disable-cgit-refresh.patch b/roles/copr/dist_git/files/patches/disable-cgit-refresh.patch deleted file mode 100644 index cad9f81330..0000000000 --- a/roles/copr/dist_git/files/patches/disable-cgit-refresh.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- /usr/share/copr/dist_git/bin/cgit_pkg_list 2019-07-09 13:14:44.000000000 +0000 -+++ /usr/share/copr/dist_git/bin/cgit_pkg_list 2019-08-27 20:35:47.278916631 +0000 -@@ -4,6 +4,7 @@ - # This speeds up cgit as it doesn't have to recurse into all dirs - # Looking for git repos. - -+exit 0 - destination=/var/lib/copr-dist-git/cgit_pkg_list - - if [ -n "$1" ] diff --git a/roles/copr/dist_git/tasks/main.yml b/roles/copr/dist_git/tasks/main.yml index efb3ae248f..216e5334a0 100644 --- a/roles/copr/dist_git/tasks/main.yml +++ b/roles/copr/dist_git/tasks/main.yml @@ -121,14 +121,8 @@ tags: - selinux -- name: dont regenerate cgit all the time for now - patch: src=patches/disable-cgit-refresh.patch - dest=/usr/share/copr/dist_git/bin/cgit_pkg_list - tags: patches - -- name: Create /var/cache/cgit/repo-list.rc if does not exists (it last 30 minutes to generate) - command: /etc/cron.hourly/copr-dist-git creates=/var/cache/cgit/repo-list.rc - +- name: Create CGIT config file if it does not exist (takes even 30 minutes) + command: /usr/bin/copr-dist-git-refresh-cgit creates=/var/cache/cgit/repo-configuration.rc - name: ensure that .config directory exists file: path=/home/copr-dist-git/.config state=directory