# Be verbose
set -x
-# Make a basic chroot at the specified location given the specified
-# configuration.
-make_chroot_from_lst() {
- root=$1
- lst=$2
+# this is fragile, as the actual layout may vary from one mirror to the other
+# however this should be in line with the layouts obtained
+# when running build/vbuild-fedora-mirror.sh
+
+function yum_conf_fedora_core () {
+ BUILD_HOST=$1; shift
+ cat <<EOF
+[base]
+name=${pl_DISTRO_NAME} - base
+baseurl=http://${BUILD_HOST}/fedora/linux/core/${pl_DISTRO_RELEASE}/${pl_DISTRO_ARCH}/os/
+
+
+[updates]
+name=${pl_DISTRO_NAME} - updates
+baseurl=http://${BUILD_HOST}/fedora/linux/core/updates/${pl_DISTRO_RELEASE}/${pl_DISTRO_ARCH}/
- packages=$(pl_getPackagesOptions $lst)
- groups=$(pl_getGroupsOptions $lst)
- pl_setup_chroot $root $packages $groups
+[extras]
+name=${pl_DISTRO_NAME} - extras
+baseurl=http://${BUILD_HOST}/fedora/linux/extras/${pl_DISTRO_RELEASE}/${pl_DISTRO_ARCH}/
+EXTRAS
+EOF
}
-# Move specified directories out of the chroot and into a "data"
-# directory that will be bind mounted on /data inside the chroot.
-#move_datadirs() {
-# root=$1
-# data=$2
-# shift 2
-# pl_move_dirs $root $data /data "$@"
-#}
-
-# Make loopback filesystem from specified location
-#make_image() {
-# root=$1
-# image=$2
-# pl_make_image $root $image 100000000
-#}
+function yum_conf_fedora () {
+ BUILD_HOST=$1; shift
+ cat <<EOF
+[base]
+name=${pl_DISTRO_NAME} - base
+baseurl=http://${BUILD_HOST}/fedora/linux/releases/${pl_DISTRO_RELEASE}/Everything/${pl_DISTRO_ARCH}/os/
+
+[updates]
+name=${pl_DISTRO_NAME} - base
+baseurl=http://${BUILD_HOST}/fedora/linux/updates/${pl_DISTRO_RELEASE}/${pl_DISTRO_ARCH}/
+EOF
+}
function yum_conf_to_build_host () {
BUILD_HOST=$(hostname)
- cat <<EOF
+
+ cat <<EOF
[main]
cachedir=/var/cache/yum
debuglevel=2
# (e.g., from /etc/yum.repos.d/)
reposdir=/dev/null
-[base]
-name=Fedora Core 4 - i386 - base
-baseurl=http://${BUILD_HOST}/fedora/linux/core/${PLC_DEVEL_FEDORA_RELEASE}/${PLC_DEVEL_FEDORA_ARCH}/os/
-
-
-[updates]
-name=Fedora Core 4 - i386 - updates
-baseurl=http://${BUILD_HOST}/fedora/linux/core/updates/${PLC_DEVEL_FEDORA_RELEASE}/${PLC_DEVEL_FEDORA_ARCH}/
-
-$(if [ "${PLC_DEVEL_FEDORA_RELEASE}" -le 6 ] ; then cat << EXTRAS
-[extras]
-name=Fedora Core 4 - i386 - extras
-baseurl=http://${BUILD_HOST}/fedora/linux/extras/${PLC_DEVEL_FEDORA_RELEASE}/${PLC_DEVEL_FEDORA_ARCH}/
-EXTRAS
-fi)
EOF
+ case "$pl_DISTRO" in
+ Fedora)
+ if [ "${pl_DISTRO_RELEASE}" -le 6 ] ; then
+ yum_conf_fedora_core $BUILD_HOST
+ else
+ yum_conf_fedora $BUILD_HOST
+ fi
+ ;;
+ *)
+ echo "$0: no support for tuning yum.conf on this distribution $pl_DISTRO"
+ exit 1
+ ;;
+ esac
}
function sudoers_bootcustom_apache () {