4.2 build does not use mirroring/ at build-time - use trunk to setup mirroring
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 1 Sep 2008 06:21:03 +0000 (06:21 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 1 Sep 2008 06:21:03 +0000 (06:21 +0000)
mirroring/centos5/yum.repos.d/building.repo.in [deleted file]
mirroring/f7/yum.repos.d/building.repo.in [deleted file]
mirroring/f8/yum.repos.d/building.repo.in [deleted file]
mirroring/fc4/yum.repos.d/building.repo.in [deleted file]
mirroring/fc6/yum.repos.d/building.repo.in [deleted file]
mirroring/mirror.sh [deleted file]
vbuild-fedora-mirror.sh [deleted file]

diff --git a/mirroring/centos5/yum.repos.d/building.repo.in b/mirroring/centos5/yum.repos.d/building.repo.in
deleted file mode 100644 (file)
index c25cfd9..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-[base]
-name=CentOS 5.1 - $basearch - Base
-baseurl=@MIRRORURL@/centos/5.1/os/$basearch/
-gpgcheck=1
-gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
-
-[updates]
-name=CentOS 5.1 - $basearch - Released Updates
-baseurl=@MIRRORURL@/centos/5.1/updates/$basearch/
-gpgcheck=1
-gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
diff --git a/mirroring/f7/yum.repos.d/building.repo.in b/mirroring/f7/yum.repos.d/building.repo.in
deleted file mode 100644 (file)
index 0023f34..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-[base]
-name=Fedora 7 - $basearch - Base
-baseurl=@MIRRORURL@/fedora/releases/7/Everything/$basearch/os/
-enabled=1
-gpgcheck=1
-gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/releases/7/Everything/$basearch/os/RPM-GPG-KEY-fedora
-
-[updates]
-name=Fedora 7 - $basearch - Updates
-baseurl=@MIRRORURL@/fedora/updates/7/$basearch/
-enabled=1
-gpgcheck=1
-gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/releases/7/Everything/$basearch/os/RPM-GPG-KEY-fedora
diff --git a/mirroring/f8/yum.repos.d/building.repo.in b/mirroring/f8/yum.repos.d/building.repo.in
deleted file mode 100644 (file)
index 05d9eb0..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-[fedora]
-name=Fedora 8 - $basearch
-baseurl=@MIRRORURL@/fedora/releases/8/Everything/$basearch/os/
-enabled=1
-gpgcheck=1
-gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/releases/8/Everything/$basearch/os/RPM-GPG-KEY-fedora http://redhat.download.fedoraproject.org/pub/fedora/linux/releases/8/Everything/$basearch/os/RPM-GPG-KEY
-
-[updates]
-name=Fedora 8 - $basearch - Updates
-baseurl=@MIRRORURL@/fedora/updates/8/$basearch/
-enabled=1
-gpgcheck=1
-gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/releases/8/Everything/$basearch/os/RPM-GPG-KEY-fedora
diff --git a/mirroring/fc4/yum.repos.d/building.repo.in b/mirroring/fc4/yum.repos.d/building.repo.in
deleted file mode 100644 (file)
index dbac2e3..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-[base]
-name=Fedora Core 4 - $basearch - Base
-baseurl=@MIRRORURL@/fedora/core/4/$basearch/os/
-gpgcheck=1
-
-[updates]
-name=Fedora Core 4 - $basearch - Released Updates
-baseurl=@MIRRORURL@/fedora/core/updates/4/$basearch/
-gpgcheck=1
-
-#[extras]
-#name=Fedora Extras 4 - $basearch
-#baseurl=@MIRRORURL@/fedora/extras/4/$basearch/
-#gpgcheck=1
diff --git a/mirroring/fc6/yum.repos.d/building.repo.in b/mirroring/fc6/yum.repos.d/building.repo.in
deleted file mode 100644 (file)
index 25df468..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-[core]
-name=Fedora Core 6 - $basearch
-baseurl=@MIRRORURL@/fedora/core/6/$basearch/os/
-enabled=1
-gpgcheck=1
-gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/core/6/$basearch/os/RPM-GPG-KEY-fedora http://redhat.download.fedoraproject.org/pub/fedora/linux/core/6/$basearch/os/RPM-GPG-KEY
-
-[updates]
-name=Fedora Core 6 - $basearch - Updates
-baseurl=@MIRRORURL@/fedora/core/updates/6/$basearch/
-enabled=1
-gpgcheck=1
-gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/core/6/$basearch/os/RPM-GPG-KEY-fedora
-
-[extras]
-name=Fedora Extras 6 - $basearch
-baseurl=@MIRRORURL@/fedora/extras/6/$basearch/
-enabled=1
-gpgcheck=1
-gpgkey=http://redhat.download.fedoraproject.org/pub/fedora/linux/core/6/$basearch/os/RPM-GPG-KEY-fedora-extras
diff --git a/mirroring/mirror.sh b/mirroring/mirror.sh
deleted file mode 100755 (executable)
index df415bc..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-#!/bin/bash
-# $Id$
-
-COMMAND=$(basename $0)
-DIRNAME=$(dirname $0)
-
-default_url="http://localhost/mirror/"
-default_distro="f8"
-all_distros="fc4 fc6 f7 f8 centos5"
-
-function check_distro () {
-    local distro=$1; shift
-    if [ ! -d $DIRNAME/$distro/yum.repos.d ] ; then
-       echo "Distro $distro not supported - skipped"
-       return 1
-    fi
-    return 0
-}
-
-function do_repo () {
-    local distro=$1; shift
-    sedargs="-e s,@MIRRORURL@,$URL,"
-    [ -n "$GPGOFF" ] && sedargs="$sedargs -e "'s,gpgcheck\W*=\W*1,gpgcheck=0,'
-    sed $sedargs $DIRNAME/$distro/yum.repos.d/building.repo.in
-}
-
-function do_init () { 
-    local distro=$1; shift
-    repo=/etc/vservers/.distributions/$distro/yum.repos.d/building.repo
-    dir=/etc/vservers/.distributions/$distro/yum.repos.d/
-    if [ ! -d $dir ] ; then
-       [ -n "$VERBOSE" ] && echo Creating dir $dir
-       mkdir -p $dir
-    fi
-    [ -n "$VERBOSE" ] && echo "Creating $repo"
-    do_repo $distro > $repo
-}
-
-function do_diff () {
-    local distro=$1; shift
-    repo=/etc/vservers/.distributions/$distro/yum.repos.d/building.repo
-    if [ ! -f $repo ] ; then
-       echo "Cannot find $repo"
-    else
-       would=/tmp/$COMMAND.$$
-       do_repo $distro > $would
-       echo "==================== DIFF for $distro" '(current <-> would be)'
-       diff $repo $would 
-       rm $would
-    fi
-}
-
-function do_display () {
-    local distro=$1; shift
-    dir=/etc/vservers/.distributions/$distro/yum.repos.d/
-    if [ -d $dir ] ; then
-       echo "====================" Contents of $dir
-       ls $dir/*.repo 2> /dev/null | xargs head --verbose --lines=1000
-    else
-       echo "====================" $dir does not exist
-    fi
-}
-
-function do_clean () {
-    local distro=$1; shift
-    repo=/etc/vservers/.distributions/$distro/yum.repos.d/building.repo
-    [ -n "$VERBOSE" ] && echo Removing $repo
-    rm $repo
-}
-
-function do_superclean () {
-    local distro=$1; shift
-    dir=/etc/vservers/.distributions/$distro/yum.repos.d/
-    [ -n "$VERBOSE" ] && echo Removing all repo files in $dir
-    rm $dir/*.repo
-}
-
-function usage () {
-    echo "Usage $COMMAND [options] <command>"
-    echo "  a help to manage the yum.repos.d template in /etc/vservers/.distributions/<distro>"
-    echo "Available commands"
-    echo "  display: shows content (default if <command> is missing)"
-    echo "  diff: shows diff between current and what init would do"
-    echo "  init: creates /etc/vservers/.distributions/<distro>/yum.repos.d/building.repo"
-    echo "  clean: removes building.repo"
-    echo "  superclean: removes yum.repos.d altogether"
-    echo "Options"
-    echo "  -u URL to specify another location"
-    echo "     default is to use mirror root at $default_url"
-    echo "  -f <distro> : defaults to $default_distro"
-    echo "  -a : runs on all distros $all_distros"
-    echo "  -0 : turns off gpgcheck"
-    echo "  -v : verbose"
-    echo "Examples"
-    echo "  $COMMAND -a display "
-    echo "  $COMMAND -a superclean"
-    echo "  $COMMAND -a -u http://mirror.one-lab.org/ init"
-    echo "  $COMMAND -a display"
-    exit 1
-}
-    
-DISTROS=""
-URL=""
-VERBOSE=""
-GPGOFF=""
-
-function main () {
-
-    while getopts "u:f:a0v" opt; do
-       case $opt in
-           u) URL=$OPTARG ;;
-           f) DISTROS="$DISTROS $OPTARG" ;;
-           a) DISTROS="$DISTROS $all_distros" ;;
-           0) GPGOFF=true ;;
-           v) VERBOSE=true ;;
-           *) usage ;;
-       esac
-    done
-
-    shift $(($OPTIND - 1))
-    
-    # no action = display
-    case "$#" in 
-       0)
-           action=display ;;
-       1) 
-           action=$1; shift
-           case $action in
-               disp*) action=display ;;
-               init*) action=init ;;
-               diff*) action=diff ;;
-               clea*) action=clean ;;
-               super*) action=superclean ;;
-               *) usage ;;
-           esac ;;
-       *)
-           usage ;;
-    esac
-
-    [ -z "$URL" ] && URL=$default_url
-    [ -z "$DISTROS" ] && DISTROS="$default_distro"
-
-    # remove trailing slash
-    URL=$(echo $URL | sed -e 's,/$,,')
-
-    for distro in $DISTROS; do
-       [ -n "$VERBOSE" ] && echo ==================== Running $action for $distro
-       check_distro $distro && do_$action $distro
-    done
-
-    exit 0
-}
-
-main "$@"
diff --git a/vbuild-fedora-mirror.sh b/vbuild-fedora-mirror.sh
deleted file mode 100755 (executable)
index 8079f8b..0000000
+++ /dev/null
@@ -1,181 +0,0 @@
-#!/bin/bash
-# this can help you create/update your fedora mirror
-# $Id$
-
-COMMAND=$(basename $0)
-
-dry_run=
-verbose=
-skip_core=
-root=/mirror/
-
-us_fedora_url=rsync://mirrors.kernel.org/fedora
-# change this
-us_centos_url=rsync://mirrors.rit.edu/centos
-
-eu_fedora_url=rsync://ftp-stud.hs-esslingen.de/fedora/linux
-eu_centos_url=rsync://mirrors.ircam.fr/CentOS
-
-# change this
-jp_fedora_url="need-to-be-defined"
-# change this
-jp_centos_url="need-to-be-defined"
-
-default_distroname=f8
-all_distronames="f7 f8 f9 centos5.1 centos5.2"
-default_arch=i386
-all_archs="i386 x86_64"
-
-case $(hostname) in 
-    *.fr|*.de|*.uk)
-       fedora_url=$eu_fedora_url ; centos_url=$eu_centos_url ;;
-    *.jp)
-       fedora_url=$jp_fedora_url ; centos_url=$jp_centos_url ;;
-    *)
-       fedora_url=$us_fedora_url ; centos_url=$us_centos_url ;;
-esac
-
-function mirror_distro_arch () {
-    distroname=$1; shift
-    arch=$1; shift
-
-    distroname=$(echo $distroname | tr '[A-Z]' '[a-z]')
-    case $distroname in
-       fc*[1-6])
-           distroindex=$(echo $distroname | sed -e "s,fc,,g")
-           distro="Fedora Core"
-           rsyncurl=$fedora_url
-           ;;
-       f*[7-9])
-           distroindex=$(echo $distroname | sed -e "s,f,,g")
-           distro="Fedora"
-           rsyncurl=$fedora_url
-           ;;
-       centos[4-5]|centos[4-5].[0-9])
-           distroindex=$(echo $distroname | sed -e "s,centos,,g")
-           distro="CentOS"
-           rsyncurl=$centos_url
-           ;;
-       *)
-           echo "WARNING -- Unknown distribution $distroname -- skipped"
-           return 1
-           ;;
-    esac
-
-    excludelist="debug/ iso/ ppc/ source/"
-    options="--archive --compress --delete --delete-excluded $dry_run $verbose"
-    [ -n "$(rsync --help | grep no-motd)" ] && options="$options --no-motd"
-    for e in $excludelist; do
-       options="$options --exclude $e"
-    done
-
-    if [ -n "$verbose" ] ; then 
-       echo "root=$root"
-       echo "distro=$distroname"
-       echo "distroname=$distroname"
-       echo "distroindex=$distroindex"
-       echo "arch=$arch"
-       echo rsyncurl="$rsyncurl"
-       echo "rsync options=$options"
-    fi
-
-    RES=1
-    paths=""
-    case $distro in
-       [Ff]edora*)
-            case $distroindex in
-               2|4|6)
-                   [ -z "$skip_core" ] && paths="core/$distroindex/$arch/os/"
-                   paths="$paths core/updates/$distroindex/$arch/ extras/$distroindex/$arch/"
-                   RES=0
-                   ;;
-               [7-9])
-                   [ -z "$skip_core" ] && paths="releases/$distroindex/Everything/$arch/os/"
-                   paths="$paths updates/$distroindex/$arch/"
-                   RES=0
-                   ;;
-           esac
-           localpath=fedora
-           ;;
-    
-       CentOS*)
-           case $distroindex in
-               5*)
-                   [ -z "$skip_core" ] && paths="$distroindex/os/$arch/"
-                   paths="$paths $distroindex/updates/$arch/"
-                   RES=0
-                   ;;
-           esac
-           localpath=centos
-           ;;
-
-    esac
-
-    if [ "$RES" = 1 ] ; then
-       echo "DISTRIBUTION $distro $distroindex CURRENTLY UNSUPPORTED - skipped"
-    else
-       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}"
-           echo $command
-           $command
-       done
-    fi
-
-    return $RES 
-}
-
-function usage () {
-    echo "Usage: $COMMAND [-n] [-v] [-c] [-r root] [-u|U rsyncurl] [-e|-j] [-f distroname|-F] [-a arch|-A]"
-    echo "Defaults to -r $root -u $rsyncurl -f $default_distroname -a $default_arch"
-    echo "Options:"
-    echo " -n : dry run"
-    echo " -v : verbose"
-    echo " -c : skips core repository"
-    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 " -e : uses European mirrors $eu_fedora_url $eu_centos_url"
-    echo " -j : uses Japanese mirrors $jp_fedora_url $jp_centos_url"
-    echo " -f distroname - use vserver convention, e.g. fc6 and f7"
-    echo " -F : for distroname in $all_distronames"
-    echo " -a arch - use yum convention"
-    echo " -A : for arch in $all_archs"
-    exit 1
-}
-
-function main () {
-    distronames=""
-    archs=""
-    while getopts "nvcr:u:U:ef:Fa:Ah" opt ; do
-       case $opt in
-           n) dry_run=--dry-run ; verbose=--verbose ;;
-           v) verbose=--verbose ;;
-           c) skip_core=true ;;
-           r) root=$OPTARG ;;
-           u) fedora_url=$OPTARG ;;
-           U) centos_url=$OPTARG ;;
-           e) fedora_url=$eu_fedora_url ; centos_url=$eu_centos_url ;;
-           j) fedora_url=$jp_fedora_url ; centos_url=$jp_centos_url ;;
-           f) distronames="$distronames $OPTARG" ;;
-           F) distronames="$distronames $all_distronames" ;;
-           a) archs="$archs $OPTARG" ;;
-           A) archs="$archs $all_archs" ;;
-           h|*) usage ;;
-       esac
-    done
-    [ -z "$distronames" ] && distronames=$default_distroname
-    [ -z "$archs" ] && archs=$default_arch
-
-    RES=0
-    for distroname in $distronames ; do 
-       for arch in $archs; do 
-           mirror_distro_arch "$distroname" "$arch" || RES=1
-       done
-    done
-
-    exit $RES
-}
-
-main "$@"