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