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
Tagging module MyPLC - MyPLC-4.3-14
[build.git]
/
vbuild-fedora-mirror.sh
diff --git
a/vbuild-fedora-mirror.sh
b/vbuild-fedora-mirror.sh
index
73e1932
..
52fca69
100755
(executable)
--- a/
vbuild-fedora-mirror.sh
+++ b/
vbuild-fedora-mirror.sh
@@
-14,13
+14,15
@@
skip_core=
root=/mirror/
root=/mirror/
+hozac_url=http://rpm.hozac.com/dhozac/centos/5/vserver
+
us_fedora_url=rsync://mirrors.kernel.org/fedora
us_centos_url=rsync://mirrors.rit.edu/centos
us_epel_url=rsync://rsync.gtlib.gatech.edu/fedora-epel
us_fedora_url=rsync://mirrors.kernel.org/fedora
us_centos_url=rsync://mirrors.rit.edu/centos
us_epel_url=rsync://rsync.gtlib.gatech.edu/fedora-epel
-#
this one is contaminated with the .~tmp~ thing
-
-eu_fedora_url=rsync://mirror
s.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_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
@@
-29,7
+31,7
@@
jp_centos_url="jp_centos_url-needs-to-be-defined"
jp_epel_url="jp_epel_url-needs-to-be-defined"
default_distroname="centos5"
jp_epel_url="jp_epel_url-needs-to-be-defined"
default_distroname="centos5"
-all_distronames="f8 f10
centos5.2
epel5"
+all_distronames="f8 f10
f11 centos5.2 centos5.3
epel5"
default_arch="i386"
all_archs="i386 x86_64"
default_arch="i386"
all_archs="i386 x86_64"
@@
-46,6
+48,8
@@
function mirror_distro_arch () {
distroname=$1; shift
arch=$1; shift
distroname=$1; shift
arch=$1; shift
+ LFTP=0
+
distroname=$(echo $distroname | tr '[A-Z]' '[a-z]')
case $distroname in
fc*[1-6])
distroname=$(echo $distroname | tr '[A-Z]' '[a-z]')
case $distroname in
fc*[1-6])
@@
-53,7
+57,7
@@
function mirror_distro_arch () {
distro="Fedora Core"
rsyncurl=$fedora_url
;;
distro="Fedora Core"
rsyncurl=$fedora_url
;;
- f*[7-9]|f1
0
)
+ 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
@@
-68,6
+72,11
@@
function mirror_distro_arch () {
distro=epel
rsyncurl=$epel_url
;;
distro=epel
rsyncurl=$epel_url
;;
+ hozac)
+ distroindex=5
+ distro="hozac"
+ rsyncurl=$hozac_url
+ ;;
*)
echo "WARNING -- Unknown distribution $distroname -- skipped"
return 1
*)
echo "WARNING -- Unknown distribution $distroname -- skipped"
return 1
@@
-76,9
+85,11
@@
function mirror_distro_arch () {
excludelist="debug/ iso/ ppc/ source/"
options="--archive --compress --delete --delete-excluded $dry_run $verbose"
excludelist="debug/ iso/ ppc/ source/"
options="--archive --compress --delete --delete-excluded $dry_run $verbose"
+ lftp_options="--delete $dry_run $verbose"
[ -n "$(rsync --help | grep no-motd)" ] && options="$options --no-motd"
for e in $excludelist; do
options="$options --exclude $e"
[ -n "$(rsync --help | grep no-motd)" ] && options="$options --no-motd"
for e in $excludelist; do
options="$options --exclude $e"
+ lftp_options="$lftp_options --exclude $e"
done
echo ">>>>>>>>>>>>>>>>>>>> root=$root distroname=$distroname arch=$arch rsyncurl=$rsyncurl"
done
echo ">>>>>>>>>>>>>>>>>>>> root=$root distroname=$distroname arch=$arch rsyncurl=$rsyncurl"
@@
-94,7
+105,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|1
0
)
+ 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
@@
-128,6
+139,18
@@
function mirror_distro_arch () {
localpath=epel
;;
localpath=epel
;;
+ hozac*)
+ case $distroindex in
+ 5)
+ # leave off trailing '/'
+ paths="$paths $arch"
+ RES=0
+ LFTP=1
+ ;;
+ esac
+ localpath=dhozac
+ ;;
+
esac
if [ "$RES" = 1 ] ; then
esac
if [ "$RES" = 1 ] ; then
@@
-136,7
+159,11
@@
function mirror_distro_arch () {
for repopath in $paths; do
echo "===== $distro -> $distroindex $repopath"
[ -z "$dry_run" ] && mkdir -p ${root}/${localpath}/${repopath}
for repopath in $paths; do
echo "===== $distro -> $distroindex $repopath"
[ -z "$dry_run" ] && mkdir -p ${root}/${localpath}/${repopath}
- command="rsync $options ${rsyncurl}/${repopath} ${root}/${localpath}/${repopath}"
+ if [ "$LFTP" = 1 ]; then
+ command="lftp -c mirror $lftp_options ${rsyncurl}/${repopath} ${root}/${localpath}/${repopath}"
+ else
+ command="rsync $options ${rsyncurl}/${repopath} ${root}/${localpath}/${repopath}"
+ fi
echo $command
$command
done
echo $command
$command
done