UNIX Socket FAQ

A forum for questions and answers about network programming on Linux and all other Unix-like systems

You are not logged in.

  • Index
  • » General
  • » Require help for building rpm from .src.rpm during uncompressing tar.

#1 2013-09-16 07:50 AM

santoshkumar
Member
Registered: 2007-08-21
Posts: 53

Require help for building rpm from .src.rpm during uncompressing tar.

Dear friends,

Require your help in building rpm from php-5.5.3-1.fc21.src.rpm

During the %prep stage , tries to do tar extract of .tar.xz format, where it fails.

Could we change the rpm spec ( in %setup section)to run the below commands to uncompress the file instead of its default tar xz .

xz -d php-5.5.3-strip.tar.xz
tar -xvf php-5.5.3-strip.tar

<code>
rpmbuild -ba /home/santoshk/testpk/rpmbuild/SPECS/php.spec

Get the below error:
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.65192
+ umask 022
+ cd /home/santoshk/testpk/rpmbuild/BUILD
+ rm -rf php-5.5.3
+ tar -xf /home/santoshk/testpk/rpmbuild/SOURCES/php-5.5.3-strip.tar.xz
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Archive contains obsolescent base-64 headers
tar: Read 476 bytes from /home/santoshk/testpk/rpmbuild/SOURCES/php-5.5.3-strip.tar.xz
tar: Error exit delayed from previous errors
error: Bad exit status from /var/tmp/rpm-tmp.65192 (%prep)
<code>



Rpm spec:
-------------------
%prep
%setup -q -n php-%{version}%{?rcver}

----------------------------------

Have php-5.5.3-strip.tar.xz when build the php-5.5.3-1.fc21.src.rpm
Thanks
Santosh

Offline

#2 2013-09-16 09:37 AM

i3839
Oddministrator
From: Amsterdam
Registered: 2003-06-07
Posts: 2,239

Re: Require help for building rpm from .src.rpm during uncompressing tar.

Why not decompress it manually and rerun the script?
Maybe change the file path in the spec file too.

The it will try to do:

"tar -xf /home/santoshk/testpk/rpmbuild/SOURCES/php-5.5.3-strip.tar"

which should work.

Offline

#3 2013-09-16 11:52 AM

RobSeace
Administrator
From: Boston, MA
Registered: 2002-06-12
Posts: 3,847
Website

Re: Require help for building rpm from .src.rpm during uncompressing tar.

Yeah, I think "%setup" only knows how to handle gzip (and possibly bzip2) compressed tarballs, not xz...  So, if you MUST use the xz compressed source tarball for some reason, you'll have to basically rip out "%setup" and duplicate all it does manually within the spec file there...  But, the better option if possible is to simply decompress it then recompress it via gzip (or maybe bzip2, though I'm not certain that will be auto-handled), and use THAT as the source instead...  Then, "%setup" will handle it just fine...  That assumes you want to recreate the source RPM again anyway, with the compressed source tarball embedded...  If you only care about building a binary RPM right now, then yeah just do as i3839 says and uncompress the source tarball and leave it like that, and list the uncompressed version as the source in the spec file...  Then, you can just "rpmbuild -bb <specfile>" to create the binary RPM...  (You'll need the uncompressed source tarball in that same "SOURCES" directory for it to find it...)

Offline

#4 2014-07-20 05:44 AM

faridreza99
Member
Registered: 2014-07-20
Posts: 2

Re: Require help for building rpm from .src.rpm during uncompressing tar.

please provide more information

Offline

#5 2014-07-23 09:16 PM

i3839
Oddministrator
From: Amsterdam
Registered: 2003-06-07
Posts: 2,239

Re: Require help for building rpm from .src.rpm during uncompressing tar.

That's a very old thread you're replying too...

(If you don't reply I'll assume you're a bot.)

Offline

#6 2014-08-04 05:16 PM

RobSeace
Administrator
From: Boston, MA
Registered: 2002-06-12
Posts: 3,847
Website

Re: Require help for building rpm from .src.rpm during uncompressing tar.

Offline

#7 2014-08-05 10:38 PM

i3839
Oddministrator
From: Amsterdam
Registered: 2003-06-07
Posts: 2,239

Re: Require help for building rpm from .src.rpm during uncompressing tar.

Good to have you back Rob!

Offline

#8 2014-10-12 03:30 AM

HectorLasso
Administrator
From: Colombia
Registered: 2002-06-12
Posts: 353

Re: Require help for building rpm from .src.rpm during uncompressing tar.

I lost my towel :(

Offline

#9 2014-10-24 09:33 PM

i3839
Oddministrator
From: Amsterdam
Registered: 2003-06-07
Posts: 2,239

Re: Require help for building rpm from .src.rpm during uncompressing tar.

...more likely that the towel lost you, considering you move around more than your towel does.

Offline

  • Index
  • » General
  • » Require help for building rpm from .src.rpm during uncompressing tar.

Board footer

Powered by FluxBB