dist-git: optimize cgit cache file generator
Start generating the CGIT configuration file (to be included into
/etc/cgitrc) on our own, and mimic the 'cgit --scan-path=...' output.
We previously relied on the full 'cgit --scan-path=...' functionality,
but that always traversed through all the dist git repositories (and
Fedora Copr has huge number of repositories, so this was too expensvie).
So newly, the 'cgit_pkg_list' is replaced with
'copr-dist-git-refresh-cgit' that can do both the "full scan" (without
arguments, executed by cron) and incremental run - with given
sub-directory argument (executed by importer daemon for particular
While I'm on it, I'm fixing the configuration for this feature and
documentation - and the new script is able to read the dist-git and
I also noticed that the test-cases related to cgit were entirely broken,
so those are fixed, too.
The new 'copr-dist-git-refresh-cgit' is installed into the monthly cron
job, to do periodic cgit fixups.
The incremental (per-package) 'cgit-dist-git-refresh-cgit' run is done
immediately after the new package is imported, and is executed only iff
the package was freshly created. This is to avoid unnecessary