Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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.
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.
I am currently attending courses to become LPIC certified and while studying for part II of the exam a question arised in the class that I am hoping somebody might be able to respond to.
While discussing compiling source code into an actual .rpm, one of the directories that is discussed is /usr/src/redhat/SRPMS. We understood what all the other directories where used for when compiling source code. But what exactly is the SRPMS directory and what purpose does it serve. The explanation in the textbook is source RPM. A little more insight as to what exactly this is. The directory /usr/src/redhat/RPMS was stated that it contains the FINAL binary rpm. So maybe I am putting too much or too little thought into this but huh? What exactly is the SRPMS? and it purpose?
SRPM is, as your book states, source RPMs. When you install an SRPM you actually are putting the soiurce code for the program in the /usr/src/redhat directory hirerarchy. You can then go ahead and use the rpmbuild command to build a regular (binary) RPM, compiling the code, making the binaries, etc. If you have a source RPM you can modify the source and/or the RPM spec file if you want to make changes. The directory structure in /usr/src/redhat just lays the source out in a reasonably coherent fashion.
When you install a .src.rpm, you get the tarball (plus any attendant patch files) in the SOURCES folder, and the rpm .spec file in the SPECS folder. To compile a binary rpm, you would use the rpm -bb option to get a binary compiled for your system. The new binary would be placed in the RPMS folder.
If you also want a new .src.rpm for your system, use rpm -ba (to get both a binary and source rpm). The new binary will be placed in the RPMS folder, and the new .src.rpm will be placed in the SRPMS folder.
I should add, if there is anything you want to add to the new binary/source package, you copy it to the SOURCES folder, and it will be added to the package. You would then have to also edit the .spec file appropriately to account for the new parts, and what rpm should do with them.
Last edited by bigrigdriver; 11-16-2004 at 10:07 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.