2e64a15 dist-git: optimize cgit cache file generator

Authored and Committed by praiskup a year ago
    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
    copr-dist-git configuration.
    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
    Fixes: #397
    Fixes: #1218
    Fixes: #824
file modified
+2 -0