export PATH=/sbin:/bin:/usr/sbin:/usr/bin
+echo "* Entering mkfedora " "$@"
+
# Verbosity
verbose=0
if [ -f /etc/planetlab/plc_config ] ; then
. /etc/planetlab/plc_config
if [ -n "$PLC_DEVEL_FEDORA_URL" ] ; then
+ echo "* mkfedora : setting mirrors from /etc/planetlab/config"
mirrors=($PLC_DEVEL_FEDORA_URL)
fi
fi
"
fi
+echo "$0: candidate mirrors"
+for mirror in "${mirrors[@]}" ; do
+ echo "* candidate mirror $mirror"
+done
+baseurl=""
for mirror in "${mirrors[@]}" ; do
for attempt in $attempts; do
- baseurl=$mirror/$attempt
- if fetch $baseurl/repodata/repomd.xml >/dev/null ; then
- break
+ attempturl=$mirror/$attempt
+ if fetch $attempturl/repodata/repomd.xml >/dev/null ; then
+ baseurl=$attempturl
+ break 2
fi
- unset baseurl
done
- if [ -n "$baseurl" ] ; then
- break
- fi
- unset baseurl
done
if [ -z "$baseurl" ] ; then
mount -t devpts none $vroot/dev/pts
mount -t tmpfs none $vroot/dev/shm
-# make rpms ignore installing stuff to /proc
+## make rpms ignore installing stuff to /proc
mkdir -p $vroot/etc/rpm
-echo "%_netsharedpath /proc" > $vroot/etc/rpm/macros
+# Because of https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=52725
+# you have to use at least one language beside 'C'
+echo "%_install_langs C:de:en:es:fr" > $vroot/etc/rpm/macros
+echo "%_netsharedpath /proc:/dev/pts" >> $vroot/etc/rpm/macros
+# append to the vserver's rpm macros
+echo "%_install_langs C:de:en:es:fr" > /etc/rpm/macros
+echo "%_netsharedpath /proc:/dev/pts" >> /etc/rpm/macros
# Mount /proc in reference image
mkdir -p $vroot/proc
mount -t proc none $vroot/proc