]> asedeno.scripts.mit.edu Git - sipb-mirrors.git/commitdiff
combine fedora and epel jobs into fedora-buffet
authorAlejandro R. Sedeño <asedeno@mit.edu>
Fri, 4 Mar 2022 00:46:10 +0000 (19:46 -0500)
committerAlejandro R. Sedeño <asedeno@mit.edu>
Fri, 4 Mar 2022 00:46:10 +0000 (19:46 -0500)
fetch-scripts/fedora-buffet [moved from fetch-scripts/fedora with 72% similarity]
fetch-scripts/fedora-epel [deleted file]

similarity index 72%
rename from fetch-scripts/fedora
rename to fetch-scripts/fedora-buffet
index 0c9ec4025b974db1a53ffea41f300ed49cc3e3a0..73d62134467a5050dc127ea3bf1d428f99085fbf 100644 (file)
@@ -1,18 +1,19 @@
 #!/bin/bash
 
+# This script serves to sync the following modules from fedora-buffet:
+# - fedora -> ${MIRRORDIR}/fedora
+# - epel   -> ${MIRRORDIR}/epel
+
+# To make quick-fedora-mirror happy, it does so through a bind mount,
+# separate from the symlink farm at ${MIRRORDIR}.
+
 # mirrors.mit.edu is on the IP ACL for fedora-buffet0 here
 # so we'll use it. Adjust these values if switching upstreams.
 RSYNCSOURCE=rsync://download-i2.fedoraproject.org
 MASTERMODULE=fedora-buffet0
 PREBITFLIP=1
 
-# The remote module we want to sync from fedora-buffet[0].
-# Some call it fedora, others call it fedora-enchilada.
-MODULE=fedora
-# The local name for it.
-MODULEDIR=fedora
-
-TIMEFILE="${MIRRORDIR}/.locks/fedora.timefile"
+TIMEFILE="${MIRRORDIR}/.locks/fedora-buffet.timefile"
 QFM="./tools/fedora/quick-fedora-mirror"
 
 if ! [ -x "${QFM}" ]; then
@@ -33,7 +34,7 @@ CONF="${TMPDIR}/qfm.conf"
 cat >"${CONF}" <<EOF
 # This will be sourced by qfm, which uses zsh.
 # Where our mirrors live
-DESTD=${MIRRORDIR}
+DESTD=${MIRRORDIR}/.fedora-buffet
 # State regarding last sync, and also a lockfile for qfm
 TIMEFILE=${TIMEFILE}
 # Upstream mirror that contains MASTERMODULE
@@ -41,11 +42,12 @@ REMOTE=${RSYNCSOURCE}
 MASTERMODULE=${MASTERMODULE}
 PREBITFLIP=${PREBITFLIP}
 # Which module to sync
-MODULES=(${MODULE})
+MODULES=(fedora epel)
 # Map from module to location in DESTD
-MODULEMAPPING=(${MODULE} ${MODULEDIR})
+MODULEMAPPING=(fedora fedora epel epel)
 # One -v to rsync
 VERBOSE=4
+TMPDIR=${TMPDIR}
 EOF
 
 "${QFM}" --config "${CONF}"
diff --git a/fetch-scripts/fedora-epel b/fetch-scripts/fedora-epel
deleted file mode 100644 (file)
index 3863521..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/bin/bash
-
-# mirrors.mit.edu is on the IP ACL for fedora-buffet0 here
-# so we'll use it. Adjust these values if switching upstreams.
-RSYNCSOURCE=rsync://download-i2.fedoraproject.org
-MASTERMODULE=fedora-buffet0
-PREBITFLIP=1
-
-# The remote module we want to sync from fedora-buffet[0].
-# Some call it epel, others call it fedora-epel.
-MODULE=epel
-# The local name for it.
-MODULEDIR=epel
-
-TIMEFILE="${MIRRORDIR}/.locks/fedora-epel.timefile"
-QFM="./tools/fedora/quick-fedora-mirror"
-
-if ! [ -x "${QFM}" ]; then
-    # It is expected that this script is sourced by fetch-hudson
-    # and that cwd is the workspace where the root of this repository
-    # is checked out.
-    echo "Could not find quick-fedora-mirror."
-    exit 1
-fi
-
-exittrap() { :; }
-trap 'exittrap' EXIT
-
-TMPDIR=$(mktemp -d /tmp/fedora-epel.XXXXXX) || die "Unable to mktemp"
-exittrap() { rm -rf "${TMPDIR}"; }
-
-CONF="${TMPDIR}/qfm.conf"
-cat >"${CONF}" <<EOF
-# This will be sourced by qfm, which uses zsh.
-# Where our mirrors live
-DESTD=${MIRRORDIR}
-# State regarding last sync, and also a lockfile for qfm
-TIMEFILE=${TIMEFILE}
-# Upstream mirror that contains MASTERMODULE
-REMOTE=${RSYNCSOURCE}
-MASTERMODULE=${MASTERMODULE}
-PREBITFLIP=${PREBITFLIP}
-# Which module to sync
-MODULES=(${MODULE})
-# Map from module to location in DESTD
-MODULEMAPPING=(${MODULE} ${MODULEDIR})
-# One -v to rsync
-VERBOSE=4
-EOF
-
-"${QFM}" --config "${CONF}"
-
-rm -rf "${TMPDIR}"
-exittrap() { :; }