You can create your own RPM package
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.
|