Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 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

...

A. Create rpm Development Tree (if it does not exist)

The rpmdevtools package contains the rpmdev-setuptree command which will create the necessary directories.

sudo yum install -y rpmdevtools

rpmdev-setuptree

Alternatively, to create the tree by hand:

1. Go to your home directory; you don't need to be root

2. mkdir            rpmbuild

...

4. mkdir            BUILD  BUILDROOT  RPMS  SOURCES  SPECS  SRPMS

...

 

...

B. Install Dependencies

Below is the list of dependencies prerequisite packages.  (These are also specified in the "pbsproopenpbs.spec" file):

  • gcc
  • autoconf
  • automake
  • hwloc-devel
  • libX11-devel
  • libXt-devel
  • libedit-devel
  • libical-devel
  • ncurses-devel
  • perl
  • postgresql-devel

...

  • python3-devel >=

...

  • 3.

...

  • 5
  • tcl-devel
  • tk-devel
  • swig
  • expat-devel (if suse then libexpat-devel)
  • openssl-devel (if suse then libopenssl-devel)

...

1. Install dependencies for building PBS Pro:

For CentOS systems, run the following command as root:

yum -builder pbspro.spec 
or 
yum install gcc autoconf automake install -y gcc make rpm-build libtool hwloc-devel libX11-devel libXt-devel libedit-devel libical-devel ncurses-devel perl postgresql-devel python3-devel tcl-devel  tk-devel swig expat-devel openssl-devel libXext libXft

For openSUSE systems, 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 pythonpython3-devel tcl-devel tk-devel swig expatlibexpat-devel libopenssl-devel libXext-devel openssllibXft-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 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

fontconfig

2. Install 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, run the following command as root:

yum install -y expat libedit postgresql-server python3 sendmail sudo tcl tk libical

For openSUSE systems, run the following command as root:

zypper install expat libedit postgresql-server python3 sendmail sudo tcl tk libical1

3. Install prerequisite packages for testing PBS Pro:

Make sure you have the following on your local system:

the pip command

the sudo command

the which command

the net-tools package

...

C. Build the rpm Package for OpenPBS <pbs_version>

You can either build from source cloned from GitHub, or build from source rpm (srpm).

To Build from source cloned from GitHub:

        Note: <pbs_version> specified at openpbs/src/openpbs.spec

1.    Go to openpbs directory which you have cloned (git clone https://github.com/openpbs/openpbs)
2.    Run the autogen.sh script to generate the configure script and Makefile.in files
                ./autogen.sh
                (generates configure script and Makefile.in templates)
3.    Run ./configure
4.    Generate the source tar that will use to build the rpm
                make dist
                make dist generates .tar.gz (

...

openpbs-

...

<pbs_version>.tar.gz) file in the same directory.
65.move     Move the  pbs-13.0.800openpbs-<pbs_version>.tar.gz file to ~/rpmbuild/SOURCES
7. move pbs-13.0.800/src/pbspro6.    Copy openpbs/openpbs.spec file to  ~to  ~/rpmbuild/SPECS
87. change     Change directory to ~/rpmbuild/SPECS
98. Run     Run the below command
                  rpmbuild -ba

...

openpbs.spec         (This command will generate the below rpm packages

...

in ~/rpmbuild/RPMS dirctory)

                  a) openpbs-client-

...

<pbs_version>-0.x86_64.

...

rpm 

                  b) openpbs-debuginfo-

...

<pbs_version>-0.x86_64.

...

rpm 

                  c) openpbs-execution-

...

<pbs_version>-0.x86_64.rpm

...

                  d) openpbs-server-

...

<pbs_version>-0.x86_64.rpm

...

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


...

To Build the rpm Package from openpbs-<pbs_version>.src.rpm:

  1. Download from http://download.opensuse.org/repositories/home:/pbsproci/

2. You can either use the –rebuild option, or you can build the rpm yourself.

To use the --rebuild option:

Do an rpmbuild –rebuild openpbs-<pbs_version>.src.rpm


To build the rpm yourself:

Install the openpbs-<pbs_version>.src.rpm

rpm -i openpbs-<pbs_version>.src.rpm    

This installs openpbs-<pbs_version>.tar.gz and openpbs.spec in their respective directories under the rpmbuild dev tree.

Change directory to ~/rpmbuild/SPECS and run the below command

rpmbuild -ba openpbs.spec               (This command generates the below rpm packages in ~/rpmbuild/RPMS dirctory)

a) openpbs-client-<pbs_version>-0.x86_64.rpm

b) openpbs-debuginfo-<pbs_version>-0.x86_64.rpm

c) openpbs-execution-<pbs_version>-0.x86_64.rpm

d) openpbs-server-<pbs_version>-0.x86_64.rpm

...

D. Install and Test Your rpm Package Locally

Installing and Testing Locally on CentOS7:

  1.  Log in as root
  2.  Change directory to ~/rpmbuild/RPMS
  3.  Install the package: yum -y install /root/rpmbuild/RPMS/x86_64/

...

  1. openpbs-server-

...

  1. <pbs_version>.x86_64.rpm

...

  1.  Enable MoM via “PBS_START_MOM=1” in /etc/pbs.conf file
  2.  Start the PBS Pro daemons using /etc/init.d/pbs start

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

...

  1.  From a non-root account, make sure that PBS works by running a job
  2.  Continue as root
  3.  cd test/fw

...

  1.  Install PTL and dependencies: pip install -r requirements.txt .

...

  1.  Create user accounts and groups required by PTL:  pbs_config --make-ug

...

  1.  cd ../tests

...

  1.  Run PTL tests: pbs_benchpress -l INFOCLI2 -o ptl.txt

...

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

...

...

Installing and Testing

...

Locally on

...

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:

...

  1.  Log in as root
  2.  Change directory to ~/rpmbuild/RPMS 
  3.  Install the package: zypper -n install /root/rpmbuild/RPMS/x86_64/

...

  1. openpbs-server-

...

  1. <pbs_version>.x86_64.rpm

...

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

...

  1.  Enable MoM via “PBS_START_MOM=1” in /etc/pbs.conf file
  2.  Start the PBS Pro daemons using /etc/init.d/pbs start

...

  1.  
  2.  From a non-root account, make sure that PBS works by running a job
  3.  Continue as root
  4.  cd test/fw

...

  1.  Install PTL and dependencies: pip install -r requirements.txt .

...

  1.  Create user accounts and groups required by PTL: pbs_config --make-ug

...

  1.  cd .

...

  1. .

...

  1. /tests

...

  1.  Run PTL tests: pbs_benchpress -l INFOCLI2 -o ptl.txt

...

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

...

    


...

OSS Site Map

...

...