[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: libc5 to libc6 auto-upgrade script



Craig Sanders <cas@taz.net.au> writes:

> i think we're going to need some sort of auto-upgrade script to include on
> the hamm release CD rom, because dselect just can't do the libc6 upgrade
> safely (AFAIK).  The CD will also Need a top-level README.NOW file saying
> run this script first or suffer the consequences...would be nice if we
> could have a note printed on the "Oficial" :-) CD-ROMS produces by various
> manufacturers too.
> 
> Anyway, I wrote a primitive one based on Scott Ellis' HOWTO.
> 
> Here it is.  This script is untested.  I've never actually run it.  It
> is, however, an accurate duplicate of what I've done by hand over a
> dozen times by now.  It will probably need some tweaking, in particular,
> the command line options for dpkg may need some --force- options.
> 
> Also, all the "*/foo_*.deb" filenames should probably be replaced with
> the correct section directories.
> 
> Anyone got a bo machine they want to test this on?  I haven't got any left,
> they're all upgraded now :-)
> 
> --- cut here --- 
> #! /bin/sh
> 
> # upgrade a libc5 (bo) machine to libc6 (hamm).
> 
> # based on Scott Ellis' excellent "Debian libc5 to libc6 Mini-HOWTO"
> # document.
> 
> # first, build up a list of installed -dev packages so that we can
> # remove them.
> #
> # this is necessary even on machines which aren't doing libc6
> # development because libc5 can't be upgraded to latest without removal
> # of libc5-dev which also necessitates removal of other -dev packages
> # like libdb1-dev and libdl1-dev if they are installed.
> 
> DEVPACKAGES=`dpkg --get-selections | 
> 	grep -- -dev | 
> 	grep -v deinstall | 
> 	cut -f1`
> 
> dpkg --purge $DEVPACKAGES
> 
> # now install the new versions of things.  Just the bare minimum to let
> # the user safely run dselect for the rest of the upgrade.
> 
> # change this to prompt the user for the location of the debian archive.
> 
> cd /debian/dists/unstable/main/binary-i386
> 
> # libc
> #
> dpkg -iB */ldso_*.deb */libc5_*.deb */libc6_*.deb

After installing libc5 you need to reboot to get the new utmp
functions working. Because the reboot command uses the old utmp
entries it cant detect the runlevel any more. One has to do a sync and 
shutdown manually. The reboot command would just do a hardreset
without flushing the cache. If one is not carefull there the unpacked
libc5 / libc6 are still in cache and after reboot they are gone. And
guess what you system does without a libc5 (or a broken one).

Another point is that you need at least certain versions of various
libraries before you can upgrade fully. It should first be checked
wheter they are present and they should be upgraded if needed.

May the Source be with you.
			Mrvn


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: