git://git.onelab.eu
/
build.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Setting tag pyplnet-4.3-17
[build.git]
/
vbuild-fedora-mirror.sh
diff --git
a/vbuild-fedora-mirror.sh
b/vbuild-fedora-mirror.sh
index
a178ff4
..
1980d0a
100755
(executable)
--- a/
vbuild-fedora-mirror.sh
+++ b/
vbuild-fedora-mirror.sh
@@
-1,6
+1,5
@@
#!/bin/bash
# this can help you create/update your fedora mirror
#!/bin/bash
# this can help you create/update your fedora mirror
-# $Id$
COMMAND=$(basename $0)
LOGDIR=/var/log/fedora-mirroring
COMMAND=$(basename $0)
LOGDIR=/var/log/fedora-mirroring
@@
-14,29
+13,33
@@
skip_core=
root=/mirror/
root=/mirror/
+dhozac_url=rsync://rpm.hozac.com/dhozac/centos/
+
us_fedora_url=rsync://mirrors.kernel.org/fedora
us_fedora_url=rsync://mirrors.kernel.org/fedora
-# change this
us_centos_url=rsync://mirrors.rit.edu/centos
us_centos_url=rsync://mirrors.rit.edu/centos
-us_epel_url="us_epel_url-needs-to-be-defined"
-
-# this one is contaminated with the .~tmp~ thing
+us_epel_url=rsync://rsync.gtlib.gatech.edu/fedora-epel
-eu_fedora_url=rsync://mirrors.ircam.fr/fedora-linux
+# ircam's fedora8 repo has been turned off
+#eu_fedora_url=rsync://mirrors.ircam.fr/fedora-linux
+#eu_fedora_url=rsync://mirror.ovh.net/download.fedora.redhat.com/linux
+eu_fedora_url=rsync://ftp-stud.hs-esslingen.de/fedora/linux
eu_centos_url=rsync://mirrors.ircam.fr/CentOS
eu_epel_url=rsync://mirrors.ircam.fr/fedora-epel
eu_centos_url=rsync://mirrors.ircam.fr/CentOS
eu_epel_url=rsync://mirrors.ircam.fr/fedora-epel
-jp_fedora_url="jp_fedora_url-needs-to-be-defined"
-jp_centos_url="jp_centos_url-needs-to-be-defined"
-jp_epel_url="jp_epel_url-needs-to-be-defined"
+pl_fedora_url=$eu_fedora_url
+pl_centos_url=rsync://ftp.tpnet.pl/centos
+pl_epel_url=rsync://ftp.icm.edu.pl/pub/Linux/fedora/linux/epel
-default_distroname=
f8
-all_distronames="f
8 f9 centos5.2 epel5
"
-default_arch=
i386
+default_distroname=
"f16"
+all_distronames="f
16 f18
"
+default_arch=
"i386"
all_archs="i386 x86_64"
case $(hostname) in
all_archs="i386 x86_64"
case $(hostname) in
- *.fr|*.de|*.uk)
+
blitz*|
*.fr|*.de|*.uk)
fedora_url=$eu_fedora_url ; centos_url=$eu_centos_url ; epel_url=$eu_epel_url ;;
fedora_url=$eu_fedora_url ; centos_url=$eu_centos_url ; epel_url=$eu_epel_url ;;
+ *.pl)
+ fedora_url=$pl_fedora_url ; centos_url=$pl_centos_url ; epel_url=$pl_epel_url ;;
*.jp)
fedora_url=$jp_fedora_url ; centos_url=$jp_centos_url ; epel_url=$jp_epel_url ;;
*)
*.jp)
fedora_url=$jp_fedora_url ; centos_url=$jp_centos_url ; epel_url=$jp_epel_url ;;
*)
@@
-54,7
+57,7
@@
function mirror_distro_arch () {
distro="Fedora Core"
rsyncurl=$fedora_url
;;
distro="Fedora Core"
rsyncurl=$fedora_url
;;
- f*[7-9])
+ f*[7-9]
|f1?
)
distroindex=$(echo $distroname | sed -e "s,f,,g")
distro="Fedora"
rsyncurl=$fedora_url
distroindex=$(echo $distroname | sed -e "s,f,,g")
distro="Fedora"
rsyncurl=$fedora_url
@@
-64,11
+67,16
@@
function mirror_distro_arch () {
distro="CentOS"
rsyncurl=$centos_url
;;
distro="CentOS"
rsyncurl=$centos_url
;;
- epel
5
)
- distroindex=
5
+ epel
[5-6]
)
+ distroindex=
$(echo $distroname | sed -e "s,epel,,g")
distro=epel
rsyncurl=$epel_url
;;
distro=epel
rsyncurl=$epel_url
;;
+ dhozac)
+ distroindex=5
+ distro="dhozac"
+ rsyncurl=$dhozac_url
+ ;;
*)
echo "WARNING -- Unknown distribution $distroname -- skipped"
return 1
*)
echo "WARNING -- Unknown distribution $distroname -- skipped"
return 1
@@
-95,7
+103,7
@@
function mirror_distro_arch () {
paths="$paths core/updates/$distroindex/$arch/ extras/$distroindex/$arch/"
RES=0
;;
paths="$paths core/updates/$distroindex/$arch/ extras/$distroindex/$arch/"
RES=0
;;
- 7|8|9)
+ 7|8|9
|1?
)
[ -z "$skip_core" ] && paths="releases/$distroindex/Everything/$arch/os/"
paths="$paths updates/$distroindex/$arch/"
# f8 and f9 have the additional newkey repo
[ -z "$skip_core" ] && paths="releases/$distroindex/Everything/$arch/os/"
paths="$paths updates/$distroindex/$arch/"
# f8 and f9 have the additional newkey repo
@@
-121,7
+129,7
@@
function mirror_distro_arch () {
epel*)
case $distroindex in
epel*)
case $distroindex in
- 5)
+ 5
|6
)
paths="$paths $distroindex/$arch/"
RES=0
;;
paths="$paths $distroindex/$arch/"
RES=0
;;
@@
-129,6
+137,17
@@
function mirror_distro_arch () {
localpath=epel
;;
localpath=epel
;;
+ dhozac*)
+ case $distroindex in
+ 5)
+ # leave off trailing '/'
+ paths="$paths $distroindex/vserver/$arch"
+ RES=0
+ ;;
+ esac
+ localpath=dhozac
+ ;;
+
esac
if [ "$RES" = 1 ] ; then
esac
if [ "$RES" = 1 ] ; then
@@
-157,12
+176,13
@@
function usage () {
echo " -v : verbose"
echo " -l : turns on autologging in $LOGDIR"
echo " -c : skips core repository"
echo " -v : verbose"
echo " -l : turns on autologging in $LOGDIR"
echo " -c : skips core repository"
+ echo " -C : force syncing core repository (default)"
echo " -r root (default is $root)"
echo " -u rsyncurl for fedora (default is $fedora_url)"
echo " -U rsyncurl for centos (default is $centos_url)"
echo " -r root (default is $root)"
echo " -u rsyncurl for fedora (default is $fedora_url)"
echo " -U rsyncurl for centos (default is $centos_url)"
- echo " -
s : uses standard (US) mirrors $us_fedora_url $us_centos_url
"
- echo " -
e : uses European mirrors $eu_fedora_url $eu_centos
_url"
- echo " -
j : uses Japanese mirrors $jp_fedora_url $jp_centos
_url"
+ echo " -
E rsyncurl for epel (default is $epel_url)
"
+ echo " -
s : uses standard (US) mirrors $us_fedora_url $us_centos_url $us_epel
_url"
+ echo " -
e : uses European mirrors $eu_fedora_url $eu_centos_url $eu_epel
_url"
echo " -f distroname - use vserver convention, e.g. f8 or centos5"
echo " -F : for distroname in $all_distronames"
echo " -a arch - use yum convention"
echo " -f distroname - use vserver convention, e.g. f8 or centos5"
echo " -F : for distroname in $all_distronames"
echo " -a arch - use yum convention"
@@
-183,18
+203,19
@@
function run () {
function main () {
distronames=""
archs=""
function main () {
distronames=""
archs=""
- while getopts "nvlc
r:u:U:sej
f:Fa:Ah" opt ; do
+ while getopts "nvlc
Cr:u:U:E:se
f:Fa:Ah" opt ; do
case $opt in
n) dry_run=--dry-run ;;
v) verbose=--verbose ;;
l) log=true ;;
c) skip_core=true ;;
case $opt in
n) dry_run=--dry-run ;;
v) verbose=--verbose ;;
l) log=true ;;
c) skip_core=true ;;
+ C) skip_core= ;;
r) root=$OPTARG ;;
u) fedora_url=$OPTARG ;;
U) centos_url=$OPTARG ;;
r) root=$OPTARG ;;
u) fedora_url=$OPTARG ;;
U) centos_url=$OPTARG ;;
-
s) fedora_url=$us_fedora_url ; centos_url=$us_centos_url
;;
-
e) fedora_url=$eu_fedora_url ; centos_url=$eu_centos_url
;;
-
j) fedora_url=$jp_fedora_url ; centos_url=$jp_centos
_url ;;
+
E) epel_url=$OPTARG
;;
+
s) fedora_url=$us_fedora_url ; centos_url=$us_centos_url ; epel_url=$us_epel_url
;;
+
e) fedora_url=$eu_fedora_url ; centos_url=$eu_centos_url ; epel_url=$eu_epel
_url ;;
f) distronames="$distronames $OPTARG" ;;
F) distronames="$distronames $all_distronames" ;;
a) archs="$archs $OPTARG" ;;
f) distronames="$distronames $OPTARG" ;;
F) distronames="$distronames $all_distronames" ;;
a) archs="$archs $OPTARG" ;;
@@
-202,6
+223,8
@@
function main () {
h|*) usage ;;
esac
done
h|*) usage ;;
esac
done
+ shift $(($OPTIND-1))
+ [[ -n "$@" ]] && usage
[ -z "$distronames" ] && distronames=$default_distroname
[ -z "$archs" ] && archs=$default_arch
[ -z "$distronames" ] && distronames=$default_distroname
[ -z "$archs" ] && archs=$default_arch