Commit 392c5b5a authored by steve's avatar steve

2007-07-23 15:36:59 by steve

  Support FC 7
parent a75eaebf
#
# Here we list the mirror from which we should download the RPM
# files for an installation of Fedora Core 7.
#
#
# Default (i386) mirror
#
mirror = http://mirror.bytemark.co.uk/fedora/linux/releases/7/Fedora/i386/os/Fedora/
#
# Mirror for AMD64 machines.
#
mirror.amd64 = http://mirror.bytemark.co.uk/fedora/linux/releases/7/Fedora/x86_64/os/Fedora/
\ No newline at end of file
#
# Packages which we'll need to download for a minimal installation
# of Fedora Core 7.
#
MAKEDEV
SysVinit
audit-libs
basesystem
bash
beecrypt
bzip2-libs
chkconfig
coreutils
cracklib
cracklib-dicts
db4
device-mapper
e2fsprogs
e2fsprogs-libs
elfutils-libelf
ethtool
expat
filesystem
findutils
gawk
gdbm
glib2
glibc
glibc-common
grep
info
initscripts
iproute
iputils
krb5-libs
libacl
libattr
libcap
libgcc
libidn
keyutils-libs
libselinux
libsepol
libstdc++
libsysfs
libtermcap
libxml2
libxml2-python
mcstrans
mingetty
mktemp
module-init-tools
ncurses
neon
net-tools
openssl
pam
pcre
popt
procps
psmisc
python
python-elementtree
python-libs
python-numeric
python-sqlite
python-urlgrabber
readline
rpm
rpm-libs
rpm-python
sed
setup
shadow-utils
sqlite
sysklogd
termcap
tzdata
udev
util-linux
yum
yum-metadata-parser
zlib
#!/bin/sh
#
# Customise the distribution post-install.
#
prefix=$1
if [ ! -d "${prefix}" ]; then
echo "Serious error - the named directory doesn't exist."
exit
fi
#
# 1. Make sure there is a resolv.conf file present, such that
# DNS lookups succeed.
#
echo " Creating resolv.conf"
if [ ! -d "${prefix}/etc/" ]; then
mkdir -p "${prefix}/etc/"
fi
cp /etc/resolv.conf "${prefix}/etc/"
#
# 2. Copy the cached .RPM files into the yum directory, so that
# yum doesn't need to make them again.
#
echo " Setting up YUM cache"
if [ ! -d ${prefix}/var/cache/yum/core/packages/ ]; then
mkdir -p ${prefix}/var/cache/yum/core/packages/
fi
if [ ! -d ${prefix}/var/cache/yum/updates-released/packages/ ]; then
mkdir -p ${prefix}/var/cache/yum/updates-released/packages/
fi
for i in ${prefix}/*.rpm ; do
cp $i ${prefix}/var/cache/yum/core/packages/
cp $i ${prefix}/var/cache/yum/updates-released/packages/
done
#
# 3. Ensure that Yum has a working configuration file.
#
arch=i386
if [ $ARCH == "amd64" ] ; then
arch=x86_64
fi
echo " Creating yum.conf"
cat > ${prefix}/etc/yum.conf <<EOF
[main]
cachedir=/var/cache/yum
debuglevel=1
reposdir=/dev/null
logfile=/var/log/yum.log
retries=20
obsoletes=1
gpgcheck=0
assumeyes=1
# repos
[core]
name=core
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=core-6&arch=$arch
[updates-released]
name=updates
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-fc6&arch=$arch
EOF
#
# 4. Run "yum install yum".
#
echo " Mounting /proc"
if [ ! -d "${prefix}/proc" ]; then
mkdir -p "${prefix}/proc"
fi
mount -o bind /proc ${prefix}/proc
echo " Bootstrapping yum"
chroot ${prefix} /sbin/ldconfig
chroot ${prefix} /usr/bin/yum install yum 2>/dev/null
#
# 5. Clean up
#
echo " Cleaning up"
chroot ${prefix} /usr/bin/yum clean all
umount ${prefix}/proc
#
# 6. Remove the .rpm files from the prefix root.
#
echo " Final tidy..."
for i in ${prefix}/*.rpm; do
rm -f $i
done
find ${prefix} -name '*.rpmorig' -delete
find ${prefix} -name '*.rpmnew' -delete
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment