Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

 How to build an rpm package for PBS Pro 14.1.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 an 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 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
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:
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

Source directory and creation of tar.gz file

  1. Go to pbspro directory

      2. change directory to src/pbs

[user@hostname pbspro]# cd src/pbs

[user@hostname 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 generates .tar.gz (pbspro-14.0.1.tar.gz) file in the same directory.

6.move the pbspro-14.0.1.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 the rpm packages namely  pbspro-client-14.0.1-0.x86_64.rpm  pbspro-debuginfo-14.0.1-0.x86_64.rpm  pbspro-execution-14.0.1-0.x86_64.rpm  

pbspro-server-14.0.1-0.x86_64.rpm  in ~/rpmbuild/RPMS dirctory.


Building and Testing an rpm Package Locally on CentOS7

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:

14. yum -y install /root/rpmbuild/RPMS/x86_64/pbspro-server-*.x86_64.rpm

15. /etc/init.d/pbs start

16. yum -y install python-pip sudo which net-tools

17. cd test/fw

18. pip install -r requirements.txt .

19. pbs_config --make-ug

20. cd ../tests

21. 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

Use the following steps to build the open source PBS Pro on your local machine (running openSUSE 13.2):

1. get pbs/pbspro

2. cd pbs/pbspro

3. zypper -n ar -f -G http://download.opensuse.org/repositories/devel:/tools/openSUSE_13.2/devel:tools.repo

4. zypper -n ref

5. zypper -n install rpmdevtools python-xml  (NOTE: without python-xml PBS compilation will fail while generating *.c from *.xml for all attr of PBS)

6. rpmdev-setuptree

7. zypper -n install $(rpmspec --buildrequires -q pbspro.spec)  (NOTE: ignore any warning)

8. cd pbs

9. ./autogen.sh

10. ./configure

11. make dist

12. cp pbspro-*.tar.gz ~/rpmbuild/SOURCES/

13. cp ../pbspro.spec ~/rpmbuild/SPECS/

14. 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:

15. zypper -n install /root/rpmbuild/RPMS/x86_64/pbspro-server-*.x86_64.rpm

16. /etc/init.d/pbs start

17. zypper -n install python-pip sudo which net-tools

18. cd test/fw

19. pip install -r requirements.txt .

20. pbs_config --make-ug

21. cd ../tests

22. pbs_benchpress -l INFOCLI2 -o ptl.txt

Once pbs_benchpress completes, you can find the PTL log in ptl.txt.

    

Site Map


 

  • No labels