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

Re: libc5 to libc6 auto-upgrade script



I did a new licb5 install and ran your script.  Here are some suggested
changes.  There may be more, but I wanted to get this out the door
to save everyone from covering the same ground.

I put a " || exit" after the bash upgrade and suggest that more use
be made of this to bring the script to a halt after an error.
 
Is it OK to do the reboot asked for by the libc5 upgrade at the completion
of the script?


--- cut here ---
#! /bin/sh

# some corrections by Lindsay Allen

# 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-$(dpkg --print-installation-architecture)

# libc
#
dpkg -r wg15-locale && dpkg -iB */ldso_*.deb */libc5_*.deb */libc6_*.deb

# bash
#
dpkg -iB */ncurses3.0_*.deb */ncurses3.4_*.deb 
dpkg -iB */libreadline2_*.deb */libreadlineg2_*.deb
# paranoia says run ldconfig NOW. don't laugh, i've needed to do this on
# some libc5-libc6 upgrades. i know that the postinst scripts for the
# libs are supposed to do it but ....
ldconfig
dpkg -iB */bash_*.deb || exit

# new dpkg
#
dpkg -iB */libg++272_*.deb
dpkg -iB */dpkg_*.deb */dpkg-dev_*.deb */dpkg-ftp_*.deb

# perl
#
dpkg -iB */libgdbm1_*.deb */libgdbmg1_*.deb
# paranoia says "run ldconfig now".
ldconfig
# perl-base must be configured before installing perl
dpkg -iB */perl-base_*.deb && dpkg -iB */perl_*.deb

# the user can now run dselect and select any -dev packages they want
# (and other packages too, of course :-)

--- cut here ---

HTH
Lindsay
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Lindsay Allen   <allen@cleo.murdoch.edu.au>  Perth, Western Australia
voice +61 8 9316 2486    32.0125S 115.8445E    vk6lj      Debian Unix
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

On Thu, 8 Jan 1998, Craig Sanders wrote:

> 
> 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
> 
> # bash
> #
> dpkg -iB */ncurses3.0_*.deb */ncurses3.4_*.deb 
> dpkg -iB */libreadline2_*.deb */libreadlineg2_*.deb
> # paranoia says run ldconfig NOW. don't laugh, i've needed to do this on
> # some libc5-libc6 upgrades. i know that the postinst scripts for the
> # libs are supposed to do it but ....
> ldconfig
> dpkg -iB */bash_*.deb
> 
> # new dpkg
> #
> dpkg -iB */libg++272_*.deb
> dpkg -iB */dpkg_*.deb */dpkg-dev_*.deb */dpkg-ftp_*.deb
> 
> # perl
> #
> dpkg -iB */libgdbm_*.deb */libgdbm1g_*.deb
> # paranoia says "run ldconfig now".
> ldconfig
> dpkg -iB */perl-base_*.deb */perl_*.deb
> 
> # the user can now run dselect and select any -dev packages they want
> # (and other packages too, of course :-)
> 
> --- cut here---
> 
> 
> --
> craig sanders
> 
> 
> --
> 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 .
> 
> 


--
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: