X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lbuild-initvm.sh;h=da0ef1c1748127d1394fe341b4e6d43e7ceff5b2;hb=3141739aa6baa066d17f0326854594fdef76151c;hp=2a5518a8d042062ee7db55453d661ae155f27baf;hpb=3f1f3cef6af76e307e1c5241363b41ab41b4a249;p=build.git diff --git a/lbuild-initvm.sh b/lbuild-initvm.sh index 2a5518a8..da0ef1c1 100755 --- a/lbuild-initvm.sh +++ b/lbuild-initvm.sh @@ -43,7 +43,7 @@ PUBLIC_BRIDGE=br0 VIF_GUEST=eth0 ########## -FEDORA_MIRROR_BASE="http://mirror.onelab.eu/fedora/" +FEDORA_MIRROR="http://mirror.onelab.eu/" FEDORA_MIRROR_KEYS="http://mirror.onelab.eu/keys/" FEDORA_PREINSTALLED="dnf dnf-yum passwd rsyslog vim-minimal dhclient chkconfig rootfiles policycoreutils openssh-server openssh-clients" DEBIAN_PREINSTALLED="openssh-server openssh-client" @@ -179,20 +179,20 @@ function fedora_download() { # copy yum config and repo files cp /etc/yum.conf $INSTALL_ROOT/etc/ - cp /etc/yum.repos.d/fedora* $INSTALL_ROOT/etc/yum.repos.d/ + cp /etc/yum.repos.d/fedora{,-updates}.repo $INSTALL_ROOT/etc/yum.repos.d/ # append fedora repo files with desired ${fedora_release} and $basearch for f in $INSTALL_ROOT/etc/yum.repos.d/* ; do sed -i "s/\$basearch/$arch/g; s/\$releasever/${fedora_release}/g;" $f done - MIRROR_URL=$FEDORA_MIRROR_BASE/releases/${fedora_release}/Everything/$arch/os + MIRROR_URL=$FEDORA_MIRROR/fedora/releases/${fedora_release}/Everything/$arch/os # since fedora18 the rpms are scattered by first name # first try the second version of fedora-release first RELEASE_URLS="" local subindex for subindex in 3 2 1; do - RELEASE_URLS="$RELEASE_URLS $MIRROR_URL/Packages/f/fedora-release-${fedora_release}-1.noarch.rpm" + RELEASE_URLS="$RELEASE_URLS $MIRROR_URL/Packages/f/fedora-release-${fedora_release}-${subindex}.noarch.rpm" done RELEASE_TARGET=$INSTALL_ROOT/fedora-release-${fedora_release}.noarch.rpm @@ -338,8 +338,7 @@ function fedora_configure_yum () { # use mirroring/ stuff instead of a hard-wired config local repofile=$lxc_root/etc/yum.repos.d/building.repo yumconf_mirrors $repofile ${DIRNAME} $fcdistro \ - "no-exclusion-in-this-context" \ - $FEDORA_MIRROR_BASE + "" $FEDORA_MIRROR # the keys stuff requires adjustment though sed -i $repofile -e s,'gpgkey=.*',"gpgkey=${FEDORA_MIRROR_KEYS}/RPM-GPG-KEY-fedora-${fedora_release}-primary,"