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,230

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,826
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,230

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,826
Website

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

faridreza99 wrote:

please provide more information

Well, ok...

THE UNIVERSE (some information to help you live in it)

1. Area: Infinite.

    The Hitchhiker's Guide to the Galaxy offers this definition of the word "infinite".

    Infinite: Bigger than the biggest thing ever and then some. Much bigger than that in fact, really amazingly immense, a totally stunning size, real "wow, that's big," time. Infinity is just so big that, by comparison, bigness itself looks really titchy. Gigantic multiplied by colossal multiplied by staggeringly huge is the sort of concept we're trying to get across here.

     
2. Imports: None.

    It is impossible to import things into an infinite area, there being no outside to import things in from.


3. Exports: None.

    See Imports


4. Population: None

    It is known that there are an infinite number of worlds, simply because there is an infinite amount of space for them to be in. However, not every one of them is inhabited. Therefore, there must be a finite number of inhabited worlds. Any finite number divided by infinity is as near to nothing as makes no odds, so the average population of all the planets in the Universe can be said to be zero. From this it follows that the population of the whole Universe is also zero, and that any people you may meet from time to time are merely the products of a deranged imagination.


5. Monetary Units: None

    In fact there are three freely convertible currencies in the Galaxy, but none of them count. The Altarian Dollar has recently collapsed, the Flainian Pobble Bead is only exchangeable for other Flainian Pobble Beads, and the Triganic Pu has its own very special problems. It exchange rate of eight Ningis to one Pu is simple enough, but since a Ningi is a triangular rubber coin six thousand eight hundred miles along each side, no one has ever collected enough to own one Pu. Nigis are not negotiable currency, because Galactibanks refuse to deal in fiddling small change. From this basic premise it is very simple to prove that the Galactibanks are also the product of a deranged imagination.


6. Art: None

    The Function of art is to hold the mirror up to nature, and there simply isn't a mirror big enough - see point one.


7. Sex: None.

    Well, in fact there is an awful lot in this, largely because of the total lack of money, trade, banks, art or anything else that might keep all the nonexistent people of the Universe occupied.

    However, it is not worth embarking on a long discussion of it now because it really is terribly complicated. For further information see Guide chapters seven, nine, ten, eleven, fourteen, seventeen, nineteen, twenty-one to eighty-four inclusive, and in fact most of the rest of the Guide


I hope that helps...  And, don't forget your towel!  (Or, next time, be more specific when requesting information...)

Offline

#7 2014-08-05 10:38 PM

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

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,230

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