1. Go to home directory of user (Example : /root)
2. mkdir rpmbuild
3. cd rpmbuild
4. mkdir BUILD BUILDROOT RPMS SOURCES SPECS SRPMS
( or )
we can use "rpmdev-setuptree" to create necessary directories.
Below is the list of dependencies specified in the "pbspro.spec" file:
1. Install the prerequisite packages for building PBS Pro.
For CentOS systems you should run the following command as root:
yum install -y gcc make rpm-build libtool 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 libXext libXft
For openSUSE systems you should run the following command as root:
zypper install gcc make rpm-build libtool hwloc-devel \
libX11-devel libXt-devel libedit-devel libical-devel \
ncurses-devel perl postgresql-devel python-devel tcl-devel \
tk-devel swig libexpat-devel libopenssl-devel libXext-devel \
libXft-devel fontconfig
2. Install the prerequisite packages for running PBS Pro. In addition
to the commands below, you should also install a text editor of
your choosing (vim, emacs, gedit, etc.).
For CentOS systems you should run the following command as root:
yum install -y expat libedit postgresql-server python \
sendmail sudo tcl tk libical
For openSUSE systems you should run the following command as root:
zypper install expat libedit postgresql-server python \
sendmail sudo tcl tk libical1
C. How to build rpm package for PBS Pro <pbs_version> (Source cloned from github)
Note: <pbs_version> specified at pbspro/src/pbspro.spec
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 ./configure
5. Run the below command
make dist
make dist generates .tar.gz (pbspro-<pbs_version>.tar.gz) file in the same directory.
6. Move the pbspro-<pbs_version>.tar.gz file to ~/rpmbuild/SOURCES
7. Move pbspro/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 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
D. How to build rpm package from pbspro-<pbs_version>.src.rpm (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. Change directory to ~/rpmbuild/SPECS and 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