LinuxQuestions.org
Visit Jeremy's Blog.
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
  Search this Thread
Old 01-10-2009, 04:16 PM   #1
shaybery
Member
 
Registered: Jan 2008
Posts: 30

Rep: Reputation: 15
How to get spec file from existing rpm?


I want to change some thing inside the post install script of an existing rpm.
there is any way to create a nearest spec file of this rpm, in order to change a bit the post install script inside this spec and then create again the rpm with the fixed spec file?

no body wrote any program that can create spec file(99% identical from the orig spec file?)?
 
Old 01-10-2009, 04:20 PM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Can you get the source rpm?

It would be useful to put your distro in your profile.
 
Old 01-11-2009, 12:51 AM   #3
shaybery
Member
 
Registered: Jan 2008
Posts: 30

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by billymayday View Post
Can you get the source rpm?

It would be useful to put your distro in your profile.
It would be useful to put your distro in your profile.[/QUOTE]

Redhat 5.x.
I don't have the source rpm, I have only the binary.
how do i create the spec file from rpm binary file?
I guess that there is any program that runs rpm -qpi <rpm> and get the identification of the spec file, and run rpm -qp --scripts <rpm> and get the un\pre\post install scripts. I guess that it's enough for creating the spec file of this rpm.

Can you explain a bit what is the source rpm?
 
Old 01-11-2009, 01:15 AM   #4
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 676

Rep: Reputation: 137Reputation: 137
Quote:
Originally Posted by shaybery View Post
It would be useful to put your distro in your profile.
Redhat 5.x.
I don't have the source rpm, I have only the binary.
how do i create the spec file from rpm binary file?
I guess that there is any program that runs rpm -qpi <rpm> and get the identification of the spec file, and run rpm -qp --scripts <rpm> and get the un\pre\post install scripts. I guess that it's enough for creating the spec file of this rpm.

Can you explain a bit what is the source rpm?[/QUOTE]
You can use rpmrebuild - http://rpmrebuil.sf.net
It's exactly what it did - run query on rpm db to recreate *.spec file
 
Old 01-11-2009, 06:44 AM   #5
shaybery
Member
 
Registered: Jan 2008
Posts: 30

Original Poster
Rep: Reputation: 15
thanks

rpmrebuild is the right tool for that.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
what is the error in my rpm spec file ukbhan Linux - Newbie 48 06-25-2008 02:24 AM
rpm spec file help AutoC Fedora 3 01-30-2008 08:25 AM
rpm spec file alrawab Linux - General 2 03-28-2007 06:39 AM
RPM Spec file adddy Linux - Software 8 11-07-2006 05:02 AM
RPM Spec file creation: %file section question davidas Linux - Newbie 0 03-16-2004 10:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:42 AM.

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