LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 03-04-2008, 03:25 PM   #1
thatguyinss
LQ Newbie
 
Registered: Mar 2007
Posts: 10

Rep: Reputation: 0
How to build an RPM from tar.gz on CentOS 4.5?


Sorry for the ignorance, but Google is not helping on this one.

The system is a i386 CentOS 4.5 w/ tar 1.14 on it now.

I'm trying to install the new version of tar (1.19) and the only builds that they offer is tar.gz, no rpms.

So I cannot find any tutorials about how to build the rpm and am wondering if anyone here knows how to do it or could post some instructions or links to a guide?

Thanks
 
Old 03-04-2008, 03:59 PM   #2
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,697

Rep: Reputation: 61
You can download the the src.rpm of the tar version and install that. It will install in /usr/src/redhat and in there it will place the tar file it was using in its build. and in SPEC is the spec file it used to build. Open the spec file in there and edit the file name to the new archived name of the new tar file you wish to build. In basic you modify the spec file for tar in SPEC directory to point to the new archived tar file. Place the new tar archive file in SOURCE directory. Then build the rpm and see if it works. May need to tweak other spec options.

Install the the latest tar*.src.rpm from a Fedora mirror.
rpm -ivh tar*.src.rpm
Copy the new tar archive to /usr/src/redhat/SOURCE
Then modify the spec file in /usr/src/redhat/SPEC to reflect the name of the new tar file.
Then to build the rpm use this command.
rpmbuild -ba name_of_spec_file.spec
If it completes with no errors then the new rpm will be in /usr/src/redhat/RPMS

Or goto here and get the one from the development directory. Not sure if it will install or not because it may require newer rpm depenencies. You may download the src.rpm of that version and build it on your system using current system specs. To do so use this command to build.
rpmbuild --recompile --rebuild full_name_of_tar_src.rpm
http://download.fedora.redhat.com/pu...6/os/Packages/

Brian
 
Old 01-12-2009, 08:25 PM   #3
hattori.hanzo
Member
 
Registered: Aug 2006
Posts: 167

Rep: Reputation: 15
I just tried this with Openssh 5.0p1 and have a question.

http://download.fedora.redhat.com/pu...-1.fc9.src.rpm

It is okay to run the rpmbuild command as root? I read in some other documentation that say it is best to run as a normal user.

Could someone please elaborate what eneeds to be changed in the spec file. I did not change anything and the rpmbuild command ran successfully.

regards
 
Old 01-12-2009, 08:30 PM   #4
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 120Reputation: 120
You have to run it as root don't you, since normal users don't have write access to /usr/src/redhat
 
  


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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
.tar.gz and .tar.bz and .src.rpm how to rpms gadekishore Linux - Software 2 10-13-2005 12:51 AM
How to build RPM from Tar.gz fireedo Suse/Novell 4 05-13-2005 02:00 PM
Is there a way to transform tar.gz into rpm or is there a GUI for tar.gz MElipse Linux - Newbie 2 04-11-2004 04:31 AM
.rpms, .tar.gz, .tgz, .src.rpm, & .tar.bz2 whoots Mandriva 10 10-18-2003 12:08 PM
Diferance between rpm, tar, tar.gz, scr.tar, etc mobassir Linux - General 12 08-21-2003 06:30 AM


All times are GMT -5. The time now is 08:33 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration