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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
09-16-2013, 01:46 AM
|
#1
|
Member
Registered: Sep 2007
Posts: 56
Rep:
|
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.
|
|
|
09-16-2013, 01:53 AM
|
#2
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,021
|
in that case I think you need to skip %setup and untar it before running rpmbuild.
|
|
|
09-16-2013, 02:07 AM
|
#3
|
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908
|
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.
|
09-16-2013, 02:10 AM
|
#4
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
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
-
|
|
|
09-16-2013, 02:15 AM
|
#5
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,021
|
|
|
|
All times are GMT -5. The time now is 10:03 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|