...
...
Building an rpm Package Locally
...
Steps to Create an rpm Development Tree (if it does not exist)
1. Go to home directory of user
2. mkdir rpmbuild
...
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-builddep pbspro.spec
or
yum -y 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 postgresql1
...
A. How to build rpm package for PBS Pro 14.1.0 (Source cloned from github)
...
1. Go to pbspro directory which we have cloned (git
...
clone https://github.com/PBSPro/pbspro)
...
2.
...
Change directory to src/pbs
[user@hostname pbspro]# cd src/pbs
[
...
user@hostname pbs]# ls
...
autogen.
...
sh configure.ac
...
doc LICENSE Makefile.am
...
pbspro-rpmlintrc README src win_configure
...
buildutils COPYRIGHT INSTALL m4 PBS_License.txt pbspro.spec README.md test
3. Run autogen.sh script
...
to generate configure script and makefile
./autogen.sh
(generates configure script and makefile templates)
4. run Run ./configure
5. run Run the below command
make dist
make dist generates .tar.gz (pbspro-<pbs_version>.tar.gz) file in the same directory.
6. move Move the pbspropbspro-<pbs_version>.tar.gz gz file to ~/rpmbuild/SOURCES
7. move Move pbspro/src/pbspro.spec file to ~to ~/rpmbuild/SPECS
8. change Change directory to ~/rpmbuild/SPECS
9. Run Run the below command
rpmbuild -ba pbspro.
...
spec ( This command will generate
...
below rpm packages
...
in ~/rpmbuild/RPMS dirctory)
a) pbspro-client-<pbs_version>-0.x86_64.
...
rpm
b) pbspro-debuginfo-<pbs_version>-0.x86_64.
...
rpm
c) pbspro-execution-<pbs_version>-0.x86_64.rpm
...
d) pbspro-server-<pbs_version>-0.x86_64.rpm
...
Note:
...
<pbs_version> specified
...
at pbspro/src/pbspro.spec
...
B. How to build rpm package for pbspro-<pbs_version>.src.rpm (
...
Creation of pbs rpms:
...
Download from http://download.opensuse.org/repositories/home:/pbsproci/)
...
1. 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
...
2. Run the below command
rpmbuild -ba pbspro.
...
This spec ( This command will generate the below rpm packages namely pbsproin ~/rpmbuild/RPMS dirctory)
a) pbspro-client-<pbs_version>-0.x86_64.rpm pbspro
b) pbspro-debuginfo-<pbs_version>-0.x86_64.rpm pbspro
c) pbspro-execution-<pbs_version>-0.x86_64.rpm
d) pbspro-server-<pbs_version>-0.x86_64.rpm
...
...
...
Installing and Testing an rpm
...
1. Get pbs/pbspro
2. cd pbs/pbspro
3. yum -y update
4. yum -y install yum-utils epel-release rpmdevtools (NOTE: epel-release is only require if you want to install PTL see below)
5. rpmdev-setuptree
6. yum-builddep -y ./pbspro.spec
7. cd pbs
8. ./autogen.sh
9. ./configure
10. make dist
11. cp pbspro-*.tar.gz ~/rpmbuild/SOURCES/
12. cp ../pbspro.spec ~/rpmbuild/SPECS/
13. rpmbuild -bb ../pbspro.spec (Build is complete on these step You can find RPMs in ~/rpmbuild/RPMS/x86_64/)
The following steps are to run PTL:
...
package locally on CentOS7
- Change directory to ~/rpmbuild/RPMS
- yum -y install /root/rpmbuild/RPMS/x86_64/pbspro-server-*.x86_64.rpm
...
- Need to enable mom “PBS_START_MOM=1” in /etc/pbs.conf file
- Start the PBSPro daemons using /etc/init.d/pbs start
...
- .
- Need to validate by submitting job and verifying the state.
- yum -y install python-pip sudo which net-tools
...
- cd test/fw
...
- pip install -r requirements.txt .
...
- Need to install PTL(PBS test Lab) by executing “python setup.py install”
- Need to create users needed by PTL by executing "pbs_config --make-ug"
...
- cd .
...
- ./tests
...
- pbs_benchpress -l INFOCLI2 -o ptl.txt
...
- Once pbs_benchpress completes, you can find the PTL log in ptl.txt.
...
Building and Testing an rpm Package Locally on openSUSE 13.2
...
Once pbs_benchpress completes, you can find the PTL log in ptl.txt.
...