RPM Community Forums

Mailing List Message of <rpm-users>

Re: Glibc %post

From: Eric MSP Veith <eveith@wwweb-library.net>
Date: Fri 18 Jun 2010 - 23:33:18 CEST
Message-Id: <201006182333.29973.eveith@wwweb-library.net>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello List, again,

On Sunday 09 May 2010, Eric MSP Veith <eveith@wwweb-library.net> wrote:
> is there a good and clean way of upgrading glibc on a running system via
> RPM?

The solution with rpm5 is very simple.

- ---%<---
%post -p <lua>
os.execute("/sbin/ldconfig")
- --->%---

If one has %{__ldconfig} and wants to use it, it's as simple as adding 
another rpm.expand call.

This works even with broken pre-installed glibc packages. It's very simple 
to avoid all pitfalls as soon as one knows what the problem is. The critical 
moment is the switching-over of the links. The %post scriptlet has to run 
completely from memory, otherwise it'll segfault. That's why using a normal 
scriptlet with /bin/bash doesn't work. As long as the ABI is compatible, a 
Lua script does the trick. I haven't tested with embedded Ruby or Perl 
because Lua did the job just fine.

This never worked with slackware because Pat designed his pkgtools to remove 
an old package *before* installing a new one. Granted, this aleviates the 
programmer of a lot of problems, but it'll introduce headaches later on. 
Have a look at the install scripts for Slackware's glibc package...

> P. S. For @rpm5, I'm still maintaining my todo list (i.e., rpm5 make
>  check on Arch Linux, more docs and web site twiddeling), but won't get
>  to work on it for at least two weaks, just to let you know. Work has
>  been raining on me like hell the last days, so it'll be stalled. Sorry.

I'm slowly comming back on-line now that things have calmed. Need to get up 
to date. Heh, and I need some thumbs squeezed because my thesis is done, 
too. Hope it'll be a good one. :-)

			Eric
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkwb5h4ACgkQhS0drJ3goJJ0rQCdHORPYB4PnzCMJjk14ux29T5N
fTkAn3rkA1mMmfcbw37pkxZPkN0NmMNn
=kr8k
-----END PGP SIGNATURE-----
Received on Sat Jun 19 00:06:17 2010
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.