more cleanup
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 29 Sep 2008 10:00:29 +0000 (10:00 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 29 Sep 2008 10:00:29 +0000 (10:00 +0000)
Makefile
build.common
mirroring/centos5/yum.repos.d/building.repo.in
mirroring/f7/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]
vbuild-init-vserver.sh

index 411e072..d7fed0f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -598,8 +598,8 @@ develclean:
 ####################
 # gather build information for the 'About' page
 # when run from crontab, INIT_CWD not properly set (says /root ..)
-# so, the nightly build passes NIGHTLY_BASE here
-# also store the nightly_base in .base for any post-processing purposes
+# so, the nightly build passes BASE here
+# also store BASE in .base for any post-processing purposes
 myplc-release:
        @echo 'Creating myplc-release'
        rm -f $@
@@ -609,13 +609,13 @@ myplc-release:
        $(MAKE) --no-print-directory version-svns >> $@
        echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx rpm info" >> $@
        $(MAKE) --no-print-directory version-rpms >> $@
-       @echo $(NIGHTLY_BASE) > .base
+       @echo $(BASE) > .base
 
 version-build:
        @echo -n 'Build build-date: ' ; date '+%Y.%m.%d'
        @echo -n 'Build build-time: ' ; date '+%H:%M-%Z'
        @echo -n 'Build build-hostname: ' ; hostname
-       @echo    "Build build-base: $(NIGHTLY_BASE)"
+       @echo    "Build build-base: $(BASE)"
        @echo    "Build planetlab-distro: $(PLDISTRO)"
        @echo    "Build planetlab-tags: $(PLDISTROTAGS)"
        @echo -n 'Build planetlab-tagsid: ' ; fgrep '$$''Id' $(PLDISTROTAGS)
@@ -623,7 +623,7 @@ version-build:
        @echo    "Build target-distro: $(DISTRO)"
        @echo    "Build target-distroname: $(DISTRONAME)"
        @echo    "Build target-release: $(RELEASE)"     
-       @echo    "Build target-personality: $(NIGHTLY_PERSONALITY)"     
+       @echo    "Build target-personality: $(PERSONALITY)"     
 
 #################### 
 # for a given module
index eba44dd..58d0aa3 100644 (file)
@@ -238,12 +238,12 @@ function pl_root_mkfedora () {
        mirrors=$(pl_parsePkgs mirror $fcdistro $pldistro $mirrorsfile)
     fi
 
-    exclude_line=""
+    kexclude_line=""
     # add them manually as the output of pl_parsePkgs is line-separated
     if [ -n "$pkgs_kexcludes" ] ; then
-       exclude_line="exclude="
+       kexclude_line="exclude="
        for kexclude in $pkgs_kexcludes ; do
-           exclude_line="$exclude_line $kexclude"
+           kexclude_line="$kexclude_line $kexclude"
        done
     fi
 
@@ -254,7 +254,7 @@ function pl_root_mkfedora () {
 
     # the repo part of the final yum.conf
     yum_conf_repos=$vroot/xxxmkfedora-repos.confxxx
-    if ! yumconf_mirrors $yum_conf_repos ../build/ $fcdistro "$exclude_line" $mirrors ; then
+    if ! yumconf_mirrors $yum_conf_repos ../build/ $fcdistro "$kexclude_line" $mirrors ; then
        echo xxx -- error ; return 1
     fi
     
@@ -655,7 +655,7 @@ function yumconf_mirrors () {
     dest_yumconf=$1; shift
     builddir=$1; shift
     fcdistro=$1; shift
-    exclude_line="$1" ; shift
+    kexclude_line="$1" ; shift
     mirrors="$@"
 
     template=$builddir/mirroring/$fcdistro/yum.repos.d/building.repo.in
@@ -667,7 +667,7 @@ function yumconf_mirrors () {
     fi
 
     for mirror in $mirrors; do
-       if yumconf_mirror $dest_yumconf $template "$exclude_line" $mirror; then
+       if yumconf_mirror $dest_yumconf $template "$kexclude_line" $mirror; then
            return 0
        fi
     done
@@ -680,12 +680,12 @@ function yumconf_mirrors () {
 function yumconf_mirror () {
     dest_yumconf=$1; shift
     template=$1; shift
-    exclude_line="$1" ; shift
+    kexclude_line="$1" ; shift
     mirror=$1; shift
 
     sed -e "s,@MIRRORURL@,$mirror,g" \
        -e "/baseurl=/i\\
-$exclude_line" $template > $dest_yumconf
+$kexclude_line" $template > $dest_yumconf
     
     # capture all lines defining baseurl
     baseurl_defs=$(grep '^baseurl=' $dest_yumconf)
@@ -720,3 +720,13 @@ function yumconf_gpgkey () {
     echo $value
     return 0
 }
+
+# patches a yum conf to insert an exclude line in each declared repo
+function yumconf_exclude_all_repos () {
+    repo=$1; shift
+    kexclude_line="$1" ; shift
+    
+    sed -i -e "/baseurl=.*$/i\\
+$kexclude_line\\
+" $repo
+}
index f29dcb3..79d8ac5 100644 (file)
@@ -14,4 +14,4 @@ gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
 name=Extra Packages for Enterprise Linux 5 - $basearch
 baseurl=@MIRRORURL@/epel/5/$basearch/
 gpgcheck=1
-gpgkey=http://mirrors.ircam.fr/pub/fedora/epel/RPM-GPG-KEY-EPEL
+gpgkey=http://download.fedora.redhat.com/pub/epel/RPM-GPG-KEY-EPEL
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/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
index fecdef7..655bfc7 100755 (executable)
@@ -59,8 +59,8 @@ function configure_yum_in_vserver () {
            echo "WARNING : cannot create myplc repo"
        else
             # exclude kernel from fedora repos 
-           for i in /vservers/$vserver/etc/yum.repos.d/* ; do
-               [ -f $i ] && echo "exclude=$pl_KEXCLUDES" >> $i
+           for repo in /vservers/$vserver/etc/yum.repos.d/* ; do
+               [ -f $repo ] && yumconf_exclude $repo "exclude=$pl_KEXCLUDES" 
            done
            # the build repo is not signed at this stage
            cat > /vservers/$vserver/etc/yum.repos.d/myplc.repo <<EOF