RPM: Build a Binary RPM Package from Sources on Red Hat
Introduction
Building an RPM is not a complicated task, even from source files. In my job I had to compile Open On Load kernel module and package it.
The problem is when you want to deploy this kernel module on several production servers and you don’t want to have all development tools installed on all production servers. This is the documentation I’ve made to create RPMs with binaries from sources.
Compilation
It is better to test compilation before trying to package it (just to be sure it works).
So you need to have a Red Hat with development tools installed to compile Open On Load module:
|
|
Now we can compile:
|
|
Create package
Now let’s build a binary RPMS from the source RPM:
|
|
You now have got packages in /root/rpmbuild/RPMS/x86_64/
and can deploy them without any development packages on production servers.
Last updated 08 Jun 2011, 14:23 CEST.