3 # This script serves to sync the following modules from fedora-buffet:
4 # - fedora -> ${MIRRORDIR}/fedora
5 # - epel -> ${MIRRORDIR}/epel
7 # To make quick-fedora-mirror happy, it does so through a bind mount,
8 # separate from the symlink farm at ${MIRRORDIR}.
10 # mirrors.mit.edu is on the IP ACL for fedora-buffet0 here
11 # so we'll use it. Adjust these values if switching upstreams.
12 RSYNCSOURCE=rsync://download-i2.fedoraproject.org
13 MASTERMODULE=fedora-buffet0
16 TIMEFILE="${MIRRORDIR}/.locks/fedora-buffet.timefile"
17 QFM="./tools/fedora/quick-fedora-mirror"
19 if ! [ -x "${QFM}" ]; then
20 # It is expected that this script is sourced by fetch-hudson
21 # and that cwd is the workspace where the root of this repository
23 echo "Could not find quick-fedora-mirror."
30 TMPDIR=$(mktemp -d /tmp/fedora.XXXXXX) || die "Unable to mktemp"
31 exittrap() { rm -rf "${TMPDIR}"; }
33 CONF="${TMPDIR}/qfm.conf"
35 # This will be sourced by qfm, which uses zsh.
36 # Where our mirrors live
37 DESTD=${MIRRORDIR}/.fedora-buffet
38 # State regarding last sync, and also a lockfile for qfm
40 # Upstream mirror that contains MASTERMODULE
42 MASTERMODULE=${MASTERMODULE}
43 PREBITFLIP=${PREBITFLIP}
44 # Which module to sync
46 # Map from module to location in DESTD
47 MODULEMAPPING=(fedora fedora epel epel)
53 "${QFM}" --config "${CONF}"