...
...
...
Building an rpm Package Locally on CentOs 7
Prerequisites
1. Source (mainline)code or src.rpm
2. Dependencies installed on Centos 7
...
4. mkdir BUILD BUILDROOT RPMS SOURCES SPECS SRPMS
Installing Dependencies
Below is the list of dependencies specified in the "pbspro.spec" file:
...
We can install the dependencies specified in the "pbspro.spec" file using the command below:
yum-builder pbspro.spec
or
yum install gcc autoconf automake hwloc-devel libX11-devel libXt-devel libedit-devel libical-devel ncurses-devel perl postgresql-devel python-devel tcl-devel tk-devel swig expat-devel openssl-devel
Note: If there is any error in installing any dependency, we can try installing dependencies individually using the command below:
yum install "dependency name"
example : yum install postgresql
...
1. How to build an rpm package for PBS Pro 14.1.0 (Source cloned from github)
Source directory and creation of tar.gz file
- Go to pbspro directory which we have cloned (git clone https://github.com/PBSPro/pbspro)
2. change Change directory to src/pbs
[user@hostname pbspro]# cd src/pbs
...
pbspro-server-<pbs_version>-0.x86_64.rpm in ~/rpmbuild/RPMS dirctory.
Note: <pbs_version> specified at pbspro/src/pbspro.spec
...
2. How to build an rpm package for pbspro-<pbs_version>.src.rpm (Downloaded from http://download.opensuse.org/repositories/home:/pbsproci/)
Creation of pbs rpms:
- Install the pbspro-<pbs_version>.src.rpm, this will install 1) pbspro-14.1.0.tar.gz and 2) pbspro.spec in respective directories under rpmbuild dev tree.
rpm -i pbspro-<pbs_version>.src.rpm - Move into ~/rpmbuild/SPECS and run below command to generate rpms.
rpmbuild -ba pbspro.spec
This command will generate the rpm packages namely pbspro-client-<pbs_version>-0.x86_64.rpm pbspro-debuginfo-<pbs_version>-0.x86_64.rpm pbspro-execution-<pbs_version>-0.x86_64.rpm
pbspro-server-<pbs_version>-0.x86_64.rpm in ~/rpmbuild/RPMS dirctory
...
Building and Testing an rpm Package Locally on CentOS7
...