LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 06-18-2004, 04:07 PM   #1
SharpyWarpy
Member
 
Registered: Feb 2003
Location: Florida
Distribution: Fedora 18
Posts: 862

Rep: Reputation: 91
How to add a file to an existing rpm package


Is there any way to add a file to an existing rpm package? I have all these rpm
packages I've downloaded and I'd like to put a text file in some of them with additional notes. I found a script called rpmerizor that will build from an installed package but it doesn't have any options for adding a file later.
 
Old 06-18-2004, 04:40 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
The easiest way would be to get the .src.rpm for the app to which you want to add the file. When you install a .src.rpm, you don't get a working app; you get the source files (possibly with patches) and a spec file to direct rpm in creating an installable binary. The source file is the object of interest here. It's a plain old, ordinary tarball which you can unzip; untar; add the file; tar; and gzip back to the tarball stage.
Then, use the installed .src.rpm to make a new binary rpm with the text file included.
For a thourough read on the ins and outs of rpm, check out the Red Hat documentation. Look for a book called Max-Rpm (you can read it on-line, or download it to study at you leisure). There are sections which give better explainations and good examples of how to do it.
 
Old 06-19-2004, 06:12 AM   #3
SharpyWarpy
Member
 
Registered: Feb 2003
Location: Florida
Distribution: Fedora 18
Posts: 862

Original Poster
Rep: Reputation: 91
Okay, the best way I've found so far is using rpmerizor. Write the text file named, say, yada.txt with the additional notes then run
rpmerizor `rpm -ql packagename` yada.txt
This makes an rpm package with the installed files and includes the text file. Might want to do "rpm -qa | grep packagename" to get version and release first for use with rpmerizor naming file. Also, do "rpm -qi packagename" on another terminal and copy-paste summary, description from there -- makes it a lot faster.
 
Old 06-20-2004, 05:59 AM   #4
SharpyWarpy
Member
 
Registered: Feb 2003
Location: Florida
Distribution: Fedora 18
Posts: 862

Original Poster
Rep: Reputation: 91
Update: I found a better program than rpmerizor, rpmrebuild. Options are better, it allows you to edit the spec file right in the middle of the rpm creation so you can include your text file, automatically opens the spec file with your default editor.
 
  


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
Question on Add/Remove apps, rpm file equivalents? Arodef Fedora 7 01-09-2005 11:56 AM
Add precompiled binary to a rpm file doris Linux - Software 1 08-06-2004 07:00 PM
RPM: How do you extract just one file from the package? Thetargos Fedora 4 07-17-2004 03:03 AM
Add to existing path environment explorer Fedora 5 04-16-2004 04:27 PM
can reinstall the rpm package without delete the rpm package eye Red Hat 1 10-20-2003 07:53 AM

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

All times are GMT -5. The time now is 11:06 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