[WEB] FC5 apt fails on post-scripts

Panu Matilainen pmatilai at laiskiainen.org
Tue Jun 20 07:19:54 PDT 2006


On Tue, 2006-06-20 at 13:42 +0200, Dag Wieers wrote:
> On Tue, 20 Jun 2006, Pablo Endres wrote:
> 
> > On Tue, 20 Jun 2006, Dag Wieers wrote:
> > > On Mon, 19 Jun 2006, Pablo Endres wrote:
> > > > On Mon, 19 Jun 2006, Dag Wieers wrote:
> > > > > On Sun, 18 Jun 2006, Pablo Endres wrote:
> > > > > 
> > > > > > Thanks for the reply here is the info you asked for:
> > > > > > 
> > > > > > Checking GPG signatures...
> > > > > > ########################################### [100%]
> > > > > > Committing changes...
> > > > > > Preparing...
> > > > > > ########################################### [100%]
> > > > > >    1:imlib2
> > > > > > ########################################### [33%]
> > > > > > error: %post(imlib2-1.2.2-1.fc5.rf.i386) scriptlet failed, exit status 255
> > > > > >    2:a52dec
> > > > > > ########################################### [67%]
> > > > > >    3:ffmpeg
> > > > > > ########################################### [100%]
> > > > > > error: %post(ffmpeg-0.4.9-0.5.20060317.fc5.i386) scriptlet failed, exit status 255
> > > > > > W: Some errors occurred while running transaction
> > > > > > 
> > > > > > [root at keymaker SOURCES]# rpm -qp --scripts /var/cache/apt/archives/imlib2_1.2.2-1.fc5.rf_i386.rpm
> > > > > > postinstall scriptlet (using /bin/sh):
> > > > > > /sbin/ldconfig 2>/dev/null
> > > > > > postuninstall scriptlet (using /bin/sh):
> > > > > > /sbin/ldconfig 2>/dev/null
> > > > > > 
> > > > > > [root at keymaker SOURCES]# rpm -qp --scripts /var/cache/apt/archives/ffmpeg_0.4.9-0.5.20060317.fc5_i386.rpm
> > > > > > postinstall scriptlet (using /bin/sh):
> > > > > > /sbin/ldconfig
> > > > > > chcon -t textrel_shlib_t /usr/lib/libav{codec,format,util}.so.*.*.* \
> > > > > >     &>/dev/null || :
> > > > > > postuninstall program: /sbin/ldconfig
> > > > > > 
> > > > > > My box is running FC5 with apt-0.5.15lorg3.1
> > > > > > 
> > > > > > Need anything else?
> > > > > 
> > > > > Yes, apparently your system has a problem running ldconfig. Try to run it
> > > > > as root and then fix whatever it outputs. This is not related to our
> > > > > packages, but to your system.
> > > >
> > > > DAG, I ran through another package that had the same behavior:
> > > > xchat.  I think it is basically anything with a postscript.  I could be
> > > > my box (I started off using livna) but I checked and I think I got
> > > > rid of all those pkgs.
> > > 
> > > More specific, it was anything with a postinstall script that used
> > > ldconfig. Could you tell us what was wrong with ldconfig ?
> > 
> > I ran ldconfig and ldconfig -v as root and found no
> > errors or warnings (just the usual dir listing).
> > I'm not sure if I told you guys before, but if I install the
> > same rpm manually (not using apt, but with rpm -Uvh) I don't get
> > the postscript errors.
> 
> Pablo,
> 
> I'm putting the apt mailinglist in copy as this seems to be apt related 
> and I don't know how to help you any further. I have no clue how apt could 
> cause this behaviour.

Almost certainly SELinux... 

FC5 selinux policy doesn't include the minimal necessary tweaks for
apt-rpm so if selinux is enabled, apt-rpm will fail on scriptlets.
Possible workarounds:
- disable selinux
- run 'chcon -t rpm_exec_t /usr/bin/apt-get' which will fix temporarily
(until the context gets reset again)

The proper fix would be to ship a custom selinux policy for apt within
the package itself. Alternatively one could bugzilla it - the stock
policy includes necessary bits (namely the rpm_exec_t thingy) for
smartpm and yumex (IIRC) which are not in Core so they might as well add
apt there...

	- Panu -






More information about the Apt-Rpm mailing list