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

Re: [mdk-admin] rpm upgrade (fwd)



Hi

I'm trying to upgrade my system from Mandrake 7.2 to 8.1 . I've heard some
horror stories about the rpm 3->4 upgrade, so I decided to do it first.

However, I got into a mess for doing tis upgrade before the libc upgrade
(I wanted to run 'rpm --rebuilddb' before upgrading any other package)

This is a glibc issue (see below for the details)

I can't figure exactly why I this ld error message: is
'/lib/ld-linux.so.2' hardwired in glibc, and won't be affectedby
LD_LIBRARY_PATH ?

I sent this mail to a mandrake list, but so far I have no reply. A google
search yields one similar case in one of redhat's list, with a
recommendation to reinstall from scratch...

Help would be appreciated

-- 
Tzafrir Cohen
mailto:tzafrir@technion.ac.il
http://www.technion.ac.il/~tzafrir


---------- Forwarded message ----------
Date: Mon, 22 Oct 2001 12:16:13 +0200 (IST)
From: Tzafrir Cohen <tzafrir@technion.ac.il>
Reply-To: mdk-admin@lists.freezer-burn.org
To: mdk-admin@lists.freezer-burn.org
Subject: Re: [mdk-admin] rpm upgrade

Thanks Vincent

I finally bit the bullet and did this, but it turns out that things are
not that simple...

On Wed, 17 Oct 2001, Vincent Danen wrote:

> On Thu Oct 18, 2001 at 03:21:03AM +0200, Tzafrir Cohen wrote:
>
> > Another rpm question
> >
> > I want to upgrade a system from 7.2 to 8.1 . I would rather do a "manual
> > upgrade" of packages.
> >
> > The first thing I haveto do is to upgrade rpm. Currently it is
> > rpm-3.0.5-27mdk . Can rpm of 8.1 read my current database? Can I test this
> > by extracting the rpm binaryfrom the 8.1 package and try to read the
> > database with it?
>
> Yeah, I'd copy /bin/rpm from an 8.1 system to /usr/local/bin/rpm or
> something and give it a shot.It *should* work.  Now, rpm itself may
> not work like this due to library requirements, but it should be able
> to report stuff with just the rpm binary (ie. just try do a -qa or -qi
> on a specific package).

I copied the old rpm binary as /usr/local/bin/rpm3 and the new rpm binary
as /usr/local/bin/rpm4

Mistake number 1. I should have also kep a copy of the old 'rpm2cpio' . It
turns out that in the older version it is statically linked, whereas in
the newer version it is dynamically linked.

>
> If that still doesn't work, copy your 3.0.5 rpm binary to
> /use/local/bin/rpm and upgrade rpm, popt, and bzip2 (I think that's
> all you'll need, maybe some db* files) and give it a shot.If nothing
> else, you can use the old rpm binary to re-install the old rpm.

I then used 'rpm -Uv --nodeps' to upgrade only the rpm-4 package. The
dependencies I ignored were:

* the old rpm-* packages. I figure that the first thing I'll do later
would be to fix that
* glibc2.2, because I figured that only non-critical components of the rpm
package are dynamically linked.

Well, it turns out that one of those dynamically linked components was the
library that is used to run 'rpm --rebuilddb'

So I now can't run 'rpm --rebuilddb' .

Mistake 2. (?): Upgrade glibc to 2.2 before upgrading rpm
 The '(?)' is here because the glibc upgrade is also one of those that may
break existing programs, and it is involved in a genral dependency mess.

I grabbed rpm2cpio from another computer with 7.2 , and extracted the
glibc package under /home/tzafrir/tmp ('rpm2cpio glibc-....rpm |cpio
-ivd')

So now I get:

$ rpm --rebuilddb
/usr/lib/rpm/rpmd: /lib/libc.so.6: version `GLIBC_2.2.3' not found (required by /usr/lib/librpmdb-4.0.3.so)
/usr/lib/rpm/rpmd: /lib/libc.so.6: version `GLIBC_2.2' not found (required by /usr/lib/librpmdb-4.0.3.so)
/usr/lib/rpm/rpmd: /lib/libc.so.6: version `GLIBC_2.2' not found (required by /usr/lib/librpmio-4.0.3.so)

$ LD_LIBRARY_PATH=$HOME/tmp/lib:/lib rpm --rebuilddb
/usr/lib/rpm/rpmd: /lib/ld-linux.so.2: version `GLIBC_2.2.3' not found (required by /home/tzafrir/tmp/lib/libc.so.6)
/usr/lib/rpm/rpmd: /lib/ld-linux.so.2: version `GLIBC_2.2' not found (required by /home/tzafrir/tmp/lib/libc.so.6)

I currently run it as user for the sake of writing this post, but running
this as root gave the same error.

$ which rpm
/bin/rpm
$ rpm --version
RPM version 4.0.3
$ ls -l /bin/rpm
-rwxr-xr-x    1 root     root      1647916 Sep 19 01:20 /bin/rpm*

Any ideas how to make that binary run?

I really can't figure out this error message: can't glibc 2.2 use glibc
2.1's loader? There must be a way around this...

>
> > If it should work: anything I need to do besides running 'rpm --rebuilddb'
> > after the upgrade ?
>
> I would do a rpm --rebuilddb right after you install the 4.x rpm.I
> wouldn't wait until after you upgraded the packages.

-- 
Tzafrir Cohen
mailto:tzafrir@technion.ac.il
http://www.technion.ac.il/~tzafrir

________________________________________
For list information visit:  http://www.freezer-burn.org/mailman/listinfo/mdk-admin


=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il