Linux - SoftwareThis 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
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.
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.
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.