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 RSYNCSOURCE=rsync://dl.fedoraproject.org
14 MASTERMODULE=fedora-buffet0
17 TIMEFILE="${MIRRORDIR}/.locks/fedora-buffet.timefile"
18 QFM="./tools/fedora/quick-fedora-mirror"
20 if ! [ -x "${QFM}" ]; then
21 # It is expected that this script is sourced by fetch-hudson
22 # and that cwd is the workspace where the root of this repository
24 echo "Could not find quick-fedora-mirror."
31 TMPDIR=$(mktemp -d /tmp/fedora-buffet.XXXXXX) || die "Unable to mktemp"
32 exittrap() { rm -rf "${TMPDIR}"; }
34 CONF="${TMPDIR}/qfm.conf"
36 # This will be sourced by qfm, which uses zsh.
37 # Where our mirrors live
38 DESTD=${MIRRORDIR}/fedora-buffet
39 # State regarding last sync, and also a lockfile for qfm
41 # Upstream mirror that contains MASTERMODULE
43 MASTERMODULE=${MASTERMODULE}
44 PREBITFLIP=${PREBITFLIP}
45 # Which module to sync
47 # Map from module to location in DESTD
48 MODULEMAPPING=(fedora fedora epel epel)
54 "${QFM}" --config "${CONF}" --alwayscheck