####################
# 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 $@
$(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)
@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
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
# 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
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
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
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)
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
+}
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
+++ /dev/null
-[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
+++ /dev/null
-[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
+++ /dev/null
-[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
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