[ILUG] Executable modified by rpm?

Darragh Bailey felix at compsoc.nuigalway.ie
Thu Feb 10 16:13:40 GMT 2011


On Thu, Feb 10, 2011 at 12:48:54PM +0000, isdtor wrote:
> I'm trying to build a CentOS5 rpm of the latest skype beta. While the
> skype binary from the rpm source works fine standalone,
> the binary from the install rpm dumps core and is also not identical
> to the original.
> 
> $ tar xjf ~/skype_static-2.1.0.81.tar.bz2
> $ mkdir rpm
> $ cd rpm
> $ rpm2cpio /usr/src/redhat/RPMS/i386/skype_static-2.1.0.81-1.el5.i386.rpm
> |cpio -dim
> 59886 blocks
> $ cd ..
> $ cmp skype_static-2.1.0.81/skype rpm/usr/bin/skype
> skype_static-2.1.0.81/skype rpm/usr/bin/skype differ: char 44636, line 43
> $ ./rpm/usr/bin/skype
> Segmentation fault
> $
> 
> I cannot figure out how the binary gets changed. The only operation in
> the spec file that touches it is an install command.
> That leaves rpm.

rpm build post scripts can end up modifying file contents, I find them
probematic when trying to package prebuilt binary files.

Try running the following and look at what scripts get run against the
files you are packaging
rpm --eval "%__os_install_post" 

following is used to turn off the python byte compile that sometimes
causes problems when packaging python modules, should be possible to
adapt it to turn off which ever script is causing you problems.

%global __os_install_post %(echo '%{__os_install_post}' | sed -e
%'s!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')



-- 
Darragh

"Nothing is foolproof to a sufficiently talented fool."


More information about the ILUG mailing list