X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=build.sh;h=60a7904c658cf338a31964899ae7deef8cd21384;hb=1092e58fa7aaf995d357858ab842095742108e9b;hp=d37dd48ece3c204f72bc025e654934c20f8634f8;hpb=91f86df07e8e0d0976f1c9db839cdcaf3d332a33;p=vserver-reference.git diff --git a/build.sh b/build.sh index d37dd48..60a7904 100755 --- a/build.sh +++ b/build.sh @@ -69,7 +69,7 @@ systemslice_count=$(ls ../build/config.${pldistro}/sliceimage-*.pkgs 2> /dev/nul [ $systemslice_count -gt 0 ] && for systemslice in $(ls ../build/config.${pldistro}/sliceimage-*.pkgs) ; do NAME=$(basename $systemslice .pkgs | sed -e s,sliceimage-,,) - echo "--------START BUILDING system sliceimage ${NAME}: $(date)" + echo " * --------START BUILDING system sliceimage ${NAME}: $(date)" # "Parse" out the packages and groups for yum systempackages=$(pl_getPackages ${pl_DISTRO_NAME} $pldistro $systemslice) @@ -89,23 +89,38 @@ systemslice_count=$(ls ../build/config.${pldistro}/sliceimage-*.pkgs 2> /dev/nul echo ${slicefamily} > ${vdir}.cloned # Install the system sliceimage specific packages - [ -n "$systempackages" ] && yum -c ${vdir}/etc/mkfedora-yum.conf --installroot=${vdir} -y install $systempackages + for yum_package in $systempackages; do + echo " * yum installing $yum_package" + yum -c ${vdir}/etc/mkfedora-yum.conf --installroot=${vdir} -y install $yum_package || \ + echo " * WARNING image $systemslice - yum install $yum_package failed" + done for group_plus in $systemgroups; do - group=$(echo $group_plus | sed -e "s,+++, ,g") - yum -c ${vdir}/etc/mkfedora-yum.conf --installroot=${vdir} -y groupinstall "$group" + yum_group=$(echo $group_plus | sed -e "s,+++, ,g") + echo " * yum groupinstalling $yum_group" + yum -c ${vdir}/etc/mkfedora-yum.conf --installroot=${vdir} -y groupinstall "$yum_group" || \ + echo " * WARNING image $systemslice - yum groupinstall $yum_group failed" done + # running pip or gem requires connectivity, and DNS + # so we expose the build-vm's /etc/resolv.conf to the current vdir + mkdir -p ${vdir}/etc + cp /etc/resolv.conf ${vdir}/etc + # this requires pip to be available in sliceimage at that point # fedora and debian -> python-pip # on fedora the command is called pip-python (sigh.) for pip in $systempips; do - chroot ${vdir} pip -v install $pip || chroot ${vdir} pip-python -v $pip || : + echo " * pip installing $pip" + chroot ${vdir} pip -v install $pip || chroot ${vdir} pip-python -v $pip || \ + echo " * WARNING image $systemslice - pip install $pip failed" done # same for gems; comes with ruby in fedora but ruby-devel is most likely a good thing # we add --no-rdoc --no-ri to keep it low for gem in $systemgems; do - chroot ${vdir} gem install --no-rdoc --no-ri $gem || : + echo " * gem installing $gem" + chroot ${vdir} gem install --no-rdoc --no-ri $gem || \ + echo " * WARNING image $systemslice - gem install $gem failed" done # search e.g. sliceimage-planetflow.post in config. or in config.planetlab otherwise @@ -143,7 +158,7 @@ systemslice_count=$(ls ../build/config.${pldistro}/sliceimage-*.pkgs 2> /dev/nul # cleanup yum remainings rm -rf ${vdir}/build ${vdir}/longbuildroot - echo "--------DONE BUILDING system sliceimage ${NAME}: $(date)" + echo " * --------DONE BUILDING system sliceimage ${NAME}: $(date)" done # search sliceimage.post in config. or in config.planetlab otherwise @@ -154,6 +169,14 @@ postfile=$(pl_locateDistroFile ../build/ ${pldistro} sliceimage.post) # fix sudoers config [ -f ${vref}/etc/sudoers ] && echo -e "\nDefaults\tlogfile=/var/log/sudo\n" >> ${vref}/etc/sudoers +# make sure 32bit slice images have the right yum config in /etc/yum/vars +# this issue showed on a f18 64bits node hosting a f14 32bits sliver +# this workaround probably means the 32bits sliver does not properly run as a 32bits VM +grep -q i386 ${vref}/etc/slicefamily && { + echo i686 > ${vref}/etc/yum/vars/arch + echo i386 > /etc/yum/vars/basearch +} + # cleanup yum remainings rm -rf ${vref}/build ${vref}/longbuildroot