Hi,
After many hours of testing I've finally come up with a script to upgrade a Gentoo 2007.0 server available via Linode.
Deploy a standard Gentoo 2007.0 image from the Linode Distribution Wizard then SSH in as root and create a script with the following content:
Code:
#!/bin/bash
#
# update portage tree
#
emerge --sync
#
# Fix the Bash/Portage blocker
#
emerge -1 =app-shells/bash-3.2_p17-r1
emerge portage lzma-utils
emerge bash
#
# Fix the mktemp/coreutils/util-linux blocker
#
emerge -C mktemp util-linux
emerge coreutils util-linux
hash -r
#
# Fix the ss/com_err/e2fsprogs/e2fsprogs-libs blocker
#
emerge -f e2fsprogs e2fsprogs-libs
emerge -C ss com_err e2fsprogs
emerge e2fsprogs
#
# Merge in all /etc updates
#
echo "-5" | etc-update
#
# Now go get a kernel source tarball
#
wget --quiet -O /dev/stdout http://www.linode.com/src/$(uname -r).tar.bz2 | tar xjvp -C /usr/src
cd /usr/src
ln -s $(ls) linux
cd linux
zcat /proc/config.gz > .config
make oldconfig && make && make modules_install && depmod
#
# Updating CFLAGS
# See: http://www.linode.com/forums/viewtopic.php?t=3267
#
sed -i s/-pipe/-mno-tls-direct-seg-refs/ /etc/make.conf
#
# Remove cracklib as it doesn't upgrade nicely
#
emerge -C cracklib
#
# Now rebuild your whole system :-)
#
for type in system world ; do
emerge -e ${type}
while [ $? -gt 0 ]; do
emerge --resume -e ${type}
done
done
Now chmod +x that script and then run it:
Code:
# chmod +x myscript
# ./myscript
You will soon have the latest and greatest version of Gentoo... well, in a few hours anyway
Each time I have ran this script it has worked for me. No doubt there will be other package blockers in the future that this script doesn't cover so you'll have to figure that out on your own
Oh one thing to note is that it may error if the kernel source tarball from
http://www.linode.com/src doesn't end in tar.bz2. I noticed tonight that some of the newer ones seem to be ending in tar.gz
I hope this helps someone as I think Linode is a great match with Gentoo Perhaps it can be used to help create a Gentoo 2008.0 install image??
Cheers,
Rich