LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-16-2013, 01:46 AM   #1
Santoshkb
Member
 
Registered: Sep 2007
Posts: 56

Rep: Reputation: 15
Question Require help for building rpm from .src.rpm during uncompressing tar.xz file


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

Last edited by Santoshkb; 09-16-2013 at 01:50 AM.
 
Old 09-16-2013, 01:53 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,021

Rep: Reputation: 7896Reputation: 7896Reputation: 7896Reputation: 7896Reputation: 7896Reputation: 7896Reputation: 7896Reputation: 7896Reputation: 7896Reputation: 7896Reputation: 7896
in that case I think you need to skip %setup and untar it before running rpmbuild.
 
Old 09-16-2013, 02:07 AM   #3
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
I think rpmbuild is looking for a .tar.gz file and doesn't recognize the .tar.xz format.

I suggest uncompressing the .tar.xz and recompressing to .tar.gz, then try again to build your rpm.
 
2 members found this post helpful.
Old 09-16-2013, 02:10 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Quote:
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
Yes, you can do that.


About tar : Will recognize xz since 2010.. 2011.
I.e. if you have an "old" OS like RHEL 5 / CentOS 5,
the tar version is too old to include xz / lzma in the
"Automatically Determining Compression Based on File Extension".
https://library.linode.com/linux-too...file-extension

-
 
Old 09-16-2013, 02:15 AM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,021

Rep: Reputation: 7896Reputation: 7896Reputation: 7896Reputation: 7896Reputation: 7896Reputation: 7896Reputation: 7896Reputation: 7896Reputation: 7896Reputation: 7896Reputation: 7896
looks like you need to upgrade rpm: http://www.rpm.org/wiki/Releases/4.7.0
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
error in building rpm from src file vivekniwane Red Hat 1 10-23-2008 01:51 PM
How can I generate / build and RPM from *.src.rpm file sreekumartg Red Hat 3 02-23-2007 05:23 PM
Help building an .rpm from a .src.rpm ssenuta Linux - Software 6 04-10-2006 10:36 PM
Building RPM via src.Rpm ivanatora Linux - Newbie 2 02-20-2006 04:29 PM
.rpms, .tar.gz, .tgz, .src.rpm, & .tar.bz2 whoots Mandriva 10 10-18-2003 12:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration