From Fedora Project Wiki
m (Fix comma fault.)
m (Fix linkx to external URLs in first paragraph)
Line 1: Line 1:
 
= grokmirror for Fedora git repository content =
 
= grokmirror for Fedora git repository content =
  
[[ https://github.com/mricon/grokmirror grokmirror ]] is a open source framework for mirroring git repositories.  
+
[https://github.com/mricon/grokmirror grokmirror] is a open source framework for mirroring git repositories.  
  
Fedora Infrastucture has setup a grokmirror manifest and hooks for all git repositories on [[ https://src.fedoraproject.org src.fedoraproject.org ]] This includes all the Fedora packages, forks of those packages, pull requests and so on. Users are welcome to mirror as much or as little of this content as they wish. Note that grokmirror is vastly more efficient than just doing 'git pull' in all repos without knowing if they updated or not, and keeps you much closer to up to date than a weekly checkout seed, so users wanting this content are encouraged to use grokmirror for it.  
+
Fedora Infrastucture has setup a grokmirror manifest and hooks for all git repositories on [https://src.fedoraproject.org src.fedoraproject.org] This includes all the Fedora packages, forks of those packages, pull requests and so on. Users are welcome to mirror as much or as little of this content as they wish. Note that grokmirror is vastly more efficient than just doing 'git pull' in all repos without knowing if they updated or not, and keeps you much closer to up to date than a weekly checkout seed, so users wanting this content are encouraged to use grokmirror for it.  
  
 
= Client setup =
 
= Client setup =

Revision as of 19:26, 2 April 2018

grokmirror for Fedora git repository content

grokmirror is a open source framework for mirroring git repositories.

Fedora Infrastucture has setup a grokmirror manifest and hooks for all git repositories on src.fedoraproject.org This includes all the Fedora packages, forks of those packages, pull requests and so on. Users are welcome to mirror as much or as little of this content as they wish. Note that grokmirror is vastly more efficient than just doing 'git pull' in all repos without knowing if they updated or not, and keeps you much closer to up to date than a weekly checkout seed, so users wanting this content are encouraged to use grokmirror for it.

Client setup

  • Install python2-grokmirror (python-grokmirror in <= F27 or EPEL)
  • copy the sample repos.conf from /usr/share/doc/python2-grokmirror/repos.conf and modify to suit your local needs.
  • Use the following config options in repos.conf:

site = https://src.fedoraproject.org

manifest = https://src.fedoraproject.org/grokmirror/manifest.js.gz

  • include and/or exclude any projects you wish

Post pull hook

grokmirror operates on 'bare' git repos. If you wish to update a set of non bare ones to push changes to, you can set a post_update_hook to something like:

#!/bin/sh -efu

#echo "$@" >&2
#echo "$@" >> ~/upd

repo="$1"

repo_local="${repo#/home/brain/mirror/}"
repo_local="${repo_local%.git}"
#echo "$repo_local" >&2

if [ -d "$repo_local" ]; then
  git -C "$repo_local" pull
else
  git clone -s "$repo" "$repo_local"
fi
 

Future plans

Now that src.fedoraproject.org is up and using grokmirror, we would like to add it also to our other large collections of git repos: [ https://pagure.io pagure.io] and copr dist-git. These collections will be added as time permits.

Links

https://github.com/mricon/grokmirror