How to build an rpm package for PBS Pro 14.0.0 (Locally and on OBS)
...
...
Building an rpm package locally on CentOs 7
Prerequisites
...
1. Source (mainline)
...
2. Dependencies installed on Centos 7
...
...
3. RPM development tree
...
Steps to create rpm development tree (if
...
it does not exist)
...
1. Go to home directory
...
2. mkdir rpmbuild
...
3. cd rpmbuild
...
4. mkdir BUILD BUILDROOT RPMS SOURCES SPECS SRPMS
Installing
...
Dependencies
Below is the list of dependecies dependencies specified in the "pbspro.spec" file gcc
autoconf
automake
hwloc-devel
libX11-devel
libXt-devel
libedit-devel
libical-devel
ncurses-devel
perl
postgresql-devel
pythonfile:
gcc
autoconf
automake
hwloc-devel
libX11-devel
libXt-devel
libedit-devel
libical-devel
ncurses-devel
perl
postgresql-devel
python-devel >= 2.6
...
python-devel < 3.0
...
tcl-devel
...
tk-devel
...
swig
expat-devel (if suse then libexpat-devel)
...
openssl-devel (if suse then libopenssl-devel)
- We can install the dependencies specified in the "pbspro.spec" file using the command below command.:
yum-builddep builder pbspro.spec
or 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 any error in installing any dependency we can try installing dependencies individually using below command.:
yum install "dependency name"
example : yum install postgresql
Source directory and creation of tar.gz file
- Go to pbs-13.0.800 directory
2. change directory to src/pbs
[maltesh@maltesh pbs-13.0.800]# cd src/pbs
...
[maltesh@maltesh pbs]# ls
...
aclocal.m4 autogen.sh autom4te.cache buildutils config.log configure configure.ac COPYRIGHT doc INSTALL LICENSE m4 Makefile.am Makefile.in pbs_startup README src win_configure
3. run autogen.sh script.
./autogen.sh
...
(generates configure script and makefile templates)
...
4. run ./configure
...
5. run the below command
make dist
...
make dist
make dist generates .tar.gz (pbs-13.0.800.tar.gz) file in the same directory.
...
6.move the pbs-13.0.800.tar.gz file to ~/rpmbuild/SOURCES
...
7. move pbs-13.0.800/src/pbspro.spec file to ~/rpmbuild/SPECS
...
8. change directory to ~/rpmbuild/SPECS
...
9. Run the below command
...
rpmbuild -ba pbspro.spec
...
This command will generate the rpm packages namely pbspro-client-13.0.800-0.x86_64.rpm, pbspro-debuginfo-13.0.800-0.x86_64.rpm,
...
pbspro-execution-13.0.800-0.x86_64.rpm, pbspro-server-13.0.800-0.x86_64.rpm in ~/rpmbuild/RPMS dirctory.
...
Build & test an rpm package locally on centos7
...
One pbs_benchpress completes you can find PTL log in ptl.txt
...
...
Building rpm package on OBS
OBS: The Open Build Service (OBS) is a generic system to build and distribute binary packages from sources in an automatic, consistent and reproducible way.
Pre-requisites
1.Source(13.0.800).
Steps to generate rpm
1. Follow the same above steps 1-5 to generate .tar.gz file.
2.Login to OBS system using below link
https://172.16.77.234/package/show/home:subhasisb2003/pbs
3.Under Source Files, add pbspro.spec and pbspro-13.0.800.tar.gz files(if the files exist, delete them using delete option ).
...