Linux - CertificationThis forum is for the discussion of all topics relating to Linux certification.
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.
One more slightly intimidating requirement of the RHCE objectives is to create your own RPM package. The relevant RHCE objective is:
Build a simple RPM that packages a single file
Once the RPM is complete, you should be able to install it on any other RHEL 6 system. Once installed, that single file should appear in the same directory every time. I include an excerpt from Chapter 11 of my book which should give you a bit of insight on the process.
Two commands from the rpmdevtools package are of special
interest. The rpmdev-setuptree command creates the rpmbuild/ subdirectory, with
appropriate subdirectories. The rpmdev-newspec command creates a newpackage.
spec file in the local directory, with a template that can be used to create an RPM.
Thus, to build an RPM, you’d run the rpmdev-setuptree command to build the directory structure, and then copy the gzip
compressed archive to the rpmbuild/SOURCES subdirectory. Now you can create a
spec file to process that archive.
Once modifications are complete, you can use that newpackage.spec template file, along with the rpmbuild/ subdirectories to help create a RPM package. (Source code files are no longer tied to the /usr/src subdirectories.
Sounds like you should write this up more fully as a tutorial.
I have. It's in Chapter 11 of my book, described in a different thread linked here. But I think my OP, along with typical .spec files you can find for yourself (along with the rpm and rpmbuild commands), can get you started on learning how to create your own RPM.