PDA

View Full Version : [SOLVED] problem with precompiled binaries in rpm package


TheBigRed
9th April 2012, 02:40 PM
Hi,

it tried to create a rpm package of tsMuxer, the rpm packaging it selve works,
but there is a problem with the binaries in the rpm package.

Name: tsMuxer
Version: 1.10.6
Release: 1%{?dist}
Summary: software utility to create TS and M2TS files

Group: Utility
License: GPL
URL: http://www.smlabs.net/tsmuxer_en.html
Source0: http://www.videohelp.com/download/tsMuxeR_1.10.6.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)


%description
software utility to create TS and M2TS files for IP broadcasting as well as for viewing
at hardware video players (i.e., Dune HD Ultra, Sony Playstation3 and others).
# necessary for 64bit platform
# yum install ld-linux.so.2 libfreetype.so.6

%prep
%setup -q -c -n %{name}-%{version}-%{release}

%build

%install
install -dm 755 %{buildroot}%{_bindir}
install -D -p -m 755 tsMuxeR %{buildroot}%{_bindir}
install -D -p -m 755 tsMuxerGUI %{buildroot}%{_bindir}


%files
%{_bindir}/tsMuxeR
%{_bindir}/tsMuxerGUI

file size of the binaries in the rpm package:
ll /usr/bin/tsMuxe*
-rwxr-xr-x 1 root root 208 9. Apr 15:16 /usr/bin/tsMuxeR
-rwxr-xr-x 1 root root 208 9. Apr 15:16 /usr/bin/tsMuxerGUI

file size of the binaries in the tar.gz:
ll tsMuxe*
-rwxr-xr-x 1 1000 1000 516424 11. Mai 2009 tsMuxeR
-rwxr-xr-x 1 1000 1000 5070636 11. Mai 2009 tsMuxerGUI

any hints ?

PabloTwo
9th April 2012, 03:42 PM
The two files are statically linked 32 bit ELF files:
BASH:work/-> ll
total 10852
-rw-r--r--. 1 paul paul 5500 Mar 11 2009 licence.txt
-rw-r--r--. 1 paul paul 17924 May 9 2009 readme.rus.txt
-rwxr-xr-x. 1 paul paul 516424 May 11 2009 tsMuxeR
-rw-rw-r--. 1 paul paul 5489146 Apr 9 10:13 tsMuxeR_1.10.6.tar.gz
-rwxr-xr-x. 1 paul paul 5070636 May 11 2009 tsMuxerGUI
BASH:work/-> file tsMuxeR
tsMuxeR: ELF 32-bit LSB executable, Intel 80386, version 1 (GNU/Linux), statically linked, stripped
BASH:work/-> file tsMuxerGUI
tsMuxerGUI: ELF 32-bit LSB executable, Intel 80386, version 1 (GNU/Linux), statically linked, stripped
The packaging process automatically removes the "debug-info" from binaries (assuming they are dynamically linked) and not already "stripped", using "strip". This is what happens:
BASH:work/-> strip tsMuxeR
BASH:work/-> ll
total 10348
-rw-r--r--. 1 paul paul 5500 Mar 11 2009 licence.txt
-rw-r--r--. 1 paul paul 17924 May 9 2009 readme.rus.txt
-rwxr-xr-x. 1 paul paul 208 Apr 9 10:31 tsMuxeR
-rw-rw-r--. 1 paul paul 5489146 Apr 9 10:13 tsMuxeR_1.10.6.tar.gz
-rwxr-xr-x. 1 paul paul 5070636 May 11 2009 tsMuxerGUI
BASH:work/-> strip tsMuxerGUI
BASH:work/-> ll
total 5400
-rw-r--r--. 1 paul paul 5500 Mar 11 2009 licence.txt
-rw-r--r--. 1 paul paul 17924 May 9 2009 readme.rus.txt
-rwxr-xr-x. 1 paul paul 208 Apr 9 10:31 tsMuxeR
-rw-rw-r--. 1 paul paul 5489146 Apr 9 10:13 tsMuxeR_1.10.6.tar.gz
-rwxr-xr-x. 1 paul paul 208 Apr 9 10:32 tsMuxerGUI
There is probably a way, but I don't know it, to direct the packaging not to "strip" the binaries in the spec file.

TheBigRed
9th April 2012, 03:59 PM

The two files are statically linked 32 bit ELF files:

There is probably a way, but I don't know it, to direct the packaging not to "strip" the binaries in the spec file.

ok, strip was the hint.

i set the following flag to prevent strip of the binaries:
%global __strip /bin/false