%define name OpenPBS %define version 2.3.16 %define release 34mdk %define lib_name_orig lib%{name} %define lib_major 0 %define lib_name %{lib_name_orig}%{lib_major} Name: %{name} Summary: The Portable Batch System Group: Cluster/Queueing Services Version: %{version} Release: %{release} License: PBS URL: http://www.openpbs.org Requires: openssh-clients >= 2.9 Provides: openpbs BuildRoot: %{_tmppath}/%{name}-%{version} Prefix: %{_prefix} Packager: Antoine Ginies <aginies@mandrakesoft.com> Source: %{name}-%{version}.tar.bz2 Source1: pbs_server Source2: pbs.conf Source3: PBS_doc_v2.3_admin.pdf Source4: pbs_mom Source5: pbs_sched Source6: xpbs Source7: xpbsmon Source8: tclIndex_xpbsmon Source9: tclIndex_xpbs Source10: introduction_openPBS Source11: xtermPBSlog Source12: pbs Source13: setup_pbs_server Source14: pbs_config.sample Source15: pbs_para_job.sh Source17: pbs-epilogue Source18: pbs-prologue Source19: setup_pbs_client Patch0: patch_owner.bz2 Patch1: OpenPBS.exclude_scripts.patch.bz2 #Patch2: patch_xpbs.bz2 #Patch3: patch_xpbsmon.bz2 %package -n %{lib_name}-devel Summary: The Portable Batch System (PBS) devel Group: Development/Other BuildRoot: %{_tmppath}/%{name}-%{version} Prefix: %{_prefix} %package client Summary: The Portable Batch System (PBS) client Requires: openssh-clients >= 2.9 Group: Cluster/Queueing Services BuildRoot: %{_tmppath}/%{name}-%{version} Prefix: %{_prefix} %package xpbs Requires: tk >= 8.3, tcl >= 8.3, %{name}-client = %{version}-%{release} Summary: The Portable Batch System (PBS) X interface Group: Monitoring BuildRoot: %{_tmppath}/%{name}-%{version} Prefix: %{_prefix} %description The Portable Batch System (PBS) is a flexible batch software processing system developed at NASA Ames Research Center. It operates on networked, multi-platform UNIX environments, including heterogeneous clusters of workstations, supercomputers, and massively parallel systems. "This product includes software developed by NASA Ames Research Center, Lawrence Livermore National Laboratory, and Veridian Information Solutions, Inc. Visit www.OpenPBS.org for OpenPBS software support,products, and information." %description client The Portable Batch System (PBS) client. "This product includes software developed by NASA Ames Research Center, Lawrence Livermore National Laboratory, and Veridian Information Solutions, Inc. Visit www.OpenPBS.org for OpenPBS software support,products, and information." %description -n %{lib_name}-devel The Portable Batch System (PBS) function prototype. "This product includes software developed by NASA Ames Research Center, Lawrence Livermore National Laboratory, and Veridian Information Solutions, Inc. Visit www.OpenPBS.org for OpenPBS software support,products, and information." %description xpbs The Portable Batch System (PBS) X interface. "This product includes software developed by NASA Ames Research Center, Lawrence Livermore National Laboratory, and Veridian Information Solutions, Inc. Visit www.OpenPBS.org for OpenPBS software support,products, and information." %prep rm -rf %{RPM_BUILD_ROOT} %setup -q -n %{name}-%{version} %patch0 -p0 %patch1 -p0 cp %{SOURCE3} $RPM_BUILD_DIR/%{name}-%{version}/PBS_doc_v2.3_admin.pdf cp %{SOURCE10} $RPM_BUILD_DIR/%{name}-%{version}/introduction_openPBS cp %{SOURCE15} $RPM_BUILD_DIR/%{name}-%{version}/para_job_pbs.sh #%patch2 -p0 #%patch3 -p0 %pre /usr/sbin/groupadd -g 12386 -r -f pbs > /dev/null 2>&1 ||: # /usr/sbin/useradd -g pbs -d %{pbs_user} -r -s /bin/bash -p "" -m >/dev/null 2>&1 ||: %pre client /usr/sbin/groupadd -g 12386 -r -f pbs > /dev/null 2>&1 ||: %build pbs_server_home=/var/spool/pbs ./configure \ --prefix=/usr \ --with-scp \ --enable-docs \ --enable-server \ --enable-mom \ --enable-client \ --enable-gui \ --srcdir=${buildroot} \ --set-server-home=${pbs_server_home} #make depend #cp -f %{SOURCE13} /home/aginies/rpm/BUILD/OpenPBS-2.3.16/src/lib/Libattr make %install # needed to rebuild Makefile with valid path pbs_server_home_for_install=${RPM_BUILD_ROOT}/var/spool/pbs ./configure \ --prefix=/usr \ --libdir=/usr/lib \ --enable-docs \ --enable-server \ --enable-mom \ --enable-gui \ --enable-client \ --set-server-home=${pbs_server_home_for_install} myname=`id -un` mygroup=`id -gn` mkdir -p %{buildroot}%{_initrddir} mkdir -p ${pbs_server_home_for_install}/mom_priv/ touch ${pbs_server_home_for_install}/mom_priv/config chmod 644 ${pbs_server_home_for_install}/mom_priv/config mkdir -p %{buildroot}%{_defaultdocdir} mkdir -p %{buildroot}%{_sysconfdir} mkdir -p %{buildroot}%{_sbindir} mkdir -p %{buildroot}%{_libdir}/xpbs mkdir -p %{buildroot}%{_libdir}/xpbsmon mkdir -p %{buildroot}%{_libdir}/%{name}-%{version} mkdir -p %{buildroot}%{_defaultdocdir}/%{name}-%{version} mkdir -p %{buildroot}%{_defaultdocdir}/%{name}-client-%{version} install -m755 %{SOURCE1} %{buildroot}%{_initrddir}/pbs_server install -m755 %{SOURCE4} %{buildroot}%{_initrddir}/pbs_mom install -m755 %{SOURCE5} %{buildroot}%{_initrddir}/pbs_sched install -m755 %{SOURCE12} %{buildroot}%{_initrddir}/openpbs install -m644 %{SOURCE2} %{buildroot}%{_sysconfdir}/pbs.conf install -m644 %{SOURCE11} %{buildroot}%{_sbindir}/pbslogs #%makeinstall %makeinstall INSTALL_USER=$myname INSTALL_GROUP=$mygroup chmod 755 %{buildroot}%{_sbindir}/pbs_mom chmod 755 %{buildroot}%{_sbindir}/pbs_sched chmod 755 %{buildroot}%{_sbindir}/pbs_iff chmod 755 %{buildroot}%{_sbindir}/pbs_rcp chmod 755 %{buildroot}%{_sbindir}/pbs_server chmod 755 %{buildroot}%{_initrddir}/openpbs # needed to overwrite bad path in those scripts install -m755 %{SOURCE6} %{buildroot}%{_bindir}/xpbs install -m755 %{SOURCE7} %{buildroot}%{_bindir}/xpbsmon install -m755 %{SOURCE13} %{buildroot}%{_bindir}/setup_pbs_server install -m755 %{SOURCE19} %{buildroot}%{_bindir}/setup_pbs_client install -m644 %{SOURCE8} %{buildroot}%{_libdir}/xpbsmon/tclIndex install -m644 %{SOURCE9} %{buildroot}%{_libdir}/xpbs/tclIndex install -m644 %{SOURCE14} %{buildroot}%{_var}/spool/pbs/pbs_config.sample install -m755 %{SOURCE17} %{buildroot}%{_var}/spool/pbs/mom_priv/epilogue install -m755 %{SOURCE18} %{buildroot}%{_var}/spool/pbs/mom_priv/prologue echo "# MOM server configuration file" > ${pbs_server_home_for_install}/mom_priv/config echo "# if more than one value, separate it by comma." >> ${pbs_server_home_for_install}/mom_priv/config cd %{buildroot}%{_libdir}/ mv libattr.a %{buildroot}%{_libdir}/%{name}-%{version}/libattr.a mv libcmds.a %{buildroot}%{_libdir}/%{name}-%{version}/libcmds.a mv liblog.a %{buildroot}%{_libdir}/%{name}-%{version}/liblog.a mv libnet.a %{buildroot}%{_libdir}/%{name}-%{version}/libnet.a mv libpbs.a %{buildroot}%{_libdir}/%{name}-%{version}/libpbs.a mv libsite.a %{buildroot}%{_libdir}/%{name}-%{version}/libsite.a mv pbs_sched.a %{buildroot}%{_libdir}/%{name}-%{version}/pbs_sched.a %clean rm -rf ${RPM_BUILD_ROOT} %post #!/bin/sh pbs_prefix=/usr pbs_server_home=/var/spool/pbs if [ -f "${pbs_server_home}/server_name" ]; then echo `hostname` > ${pbs_server_home}/server_name fi #if [ ! -f "${pbs_server_home}/default_server" ] ; then # echo "# <server hostname>" > ${pbs_server_home}/default_server #fi if [ -f "${pbs_server_home}/default_server" ]; then echo `hostname` >> ${pbs_server_home}/default_server fi echo `hostname` > ${pbs_server_home}/server_priv/nodes # add pbs service %_post_service pbs_server %_post_service pbs_sched # mise a jour /etc/services if needed CHECK_PORT=`grep 15003 /etc/services` if [ -z "$CHECK_PORT" ]; then cat >> /etc/services << EOF # Port needed by PBS pbs_server 15001/tcp # pbs server pbs_mom 15002/tcp # mom to/from server pbs_resmon 15003/tcp # mom resource management requests pbs_resmon 15003/udp # mom resource management requests pbs_sched 15004/tcp # scheduler EOF fi echo "!!!!!!!!!!!!!!!!" echo "End users may not use it unless they register at Openpbs.org site." echo "Please REGISTER:" echo "http://www.openpbs.org/request.php3" %post client pbs_prefix=/usr pbs_server_home=/var/spool/pbs default_master=`hostname` echo ${master} > ${pbs_server_home}/server_name if [ -f "${pbs_server_home}/mom_priv/config" ]; then cat >> ${pbs_server_home}/mom_priv/config << EOF ## rule is defined by the name # \$ideal_load 2.0 # \$max_load 3.5 ## host allowed to connect to Mom server on unprivileged port # \$restricted *.mandrakesoft.com ## log event : # 0x1ff log all events + debug events # 0x0ff just all events \$logevent 0x0ff ## host allowed to connect to mom server on privileged port \$clienthost ${master} ## alarm if the script hang or take very long time to execute (sec) \$prologalarm 30 EOF fi CHECK_PORT=`grep 15003 /etc/services` if [ -z "$CHECK_PORT" ]; then cat >> /etc/services << EOF # Port needed by PBS pbs_server 15001/tcp # pbs server pbs_mom 15002/tcp # mom to/from server pbs_resmon 15003/tcp # mom resource management requests pbs_resmon 15003/udp # mom resource management requests pbs_sched 15004/tcp # scheduler EOF else echo "" echo "Documentation in /usr/share/doc/OpenPBS" echo "!!!!!!!!!!!!!!!!" echo "End users may not use it unless they register at Openpbs.org site." echo "Please REGISTER:" echo "http://www.openpbs.org/request.php3" fi %_post_service pbs_mom %post xpbs echo "" echo "Check /usr/lib/xpbs/xpbsrc and /usr/lib/xpbsmon/xpbsmonrc" echo "and put the correct name of the PBS server at the end of those files." echo "By default it is the name of your Machine." %preun %_preun_service pbs_server %_preun_service pbs_sched # rm -rf %{_var}/spool/pbs/sched_logs/ # rm -rf %{_var}/spool/pbs/sched_priv/ # rm -rf %{_var}/spool/pbs/server_priv/ # rm -rf %{_var}/spool/pbs/server_logs/ %preun client %_preun_service pbs_mom # rm -rf %{_var}/spool/pbs/mom_logs/ # rm -rf %{_var}/spool/pbs/mom_priv/ %postun -p /sbin/ldconfig # /usr/sbin/userdel pbs %files %defattr(-,root,root) %doc doc/READ_ME PBS_License.txt %attr(755,root,root) %config %{_initrddir}/pbs_server %attr(755,root,root) %config %{_initrddir}/pbs_sched %attr(755,root,root) %config %{_initrddir}/openpbs %attr(644,root,root) %{_mandir}/man1/pbs* %attr(644,root,root) %{_mandir}/man3/pbs* %attr(644,root,root) %{_mandir}/man7/pbs* %attr(644,root,root) %{_mandir}/man8/pbsnodes* %attr(644,root,root) %{_mandir}/man8/pbs_server.8B* %attr(644,root,root) %{_mandir}/man8/pbs_sch* %attr(644,root,root) %config(noreplace) %{_sysconfdir}/pbs.conf %attr(755,root,root) %{_sbindir}/pbs_server %attr(755,root,root) %{_sbindir}/pbs_sched %attr(755,root,root) %{_sbindir}/pbslogs %attr(755,root,root) %{_bindir}/pbsnodes %attr(755,root,root) %{_bindir}/setup_pbs_server %attr(755,root,root) %{_var}/spool/pbs/sched_logs/ %{_var}/spool/pbs/sched_priv/* %attr(755,root,root) %{_var}/spool/pbs/server_logs/ %attr(755,root,root) %{_var}/spool/pbs/checkpoint/ %attr(755,root,root) %{_var}/spool/pbs/server_priv/ %attr(775,root,pbs) %{_var}/spool/pbs/spool/ %attr(1777,root,pbs) %{_var}/spool/pbs/undelivered/ %attr(644,root,root) %config(noreplace) %{_var}/spool/pbs/pbs_environment %attr(644,root,root) %config(noreplace) %{_var}/spool/pbs/server_name %attr(644,root,root) %{_var}/spool/pbs/pbs_config.sample %files client %defattr(-,root,root) %doc PBS_doc_v2.3_admin.pdf introduction_openPBS para_job_pbs.sh PBS_License.txt ser_job_pbs.sh %attr(644,root,root) %config(noreplace) %{_sysconfdir}/pbs.conf %attr(644,root,root) %{_mandir}/man1/q* %attr(644,root,root) %{_mandir}/man8/q* %attr(644,root,root) %{_mandir}/man8/pbsnodes* %attr(644,root,root) %{_mandir}/man8/pbs_mom.8B* %attr(644,root,root) %{_mandir}/man1/bas* %attr(644,root,root) %{_mandir}/man1/nqs* %attr(755,root,root) %{_var}/spool/pbs/aux %{_var}/spool/pbs/mom_logs/ %{_var}/spool/pbs/mom_priv/* %attr(755,root,root) %{_var}/spool/pbs/checkpoint %attr(1755,root,pbs) %{_var}/spool/pbs/undelivered %attr(775,root,pbs) %{_var}/spool/pbs/spool %attr(644,root,root) %config(noreplace) %{_var}/spool/pbs/pbs_environment %attr(755,root,root) %{_bindir}/q* %attr(755,root,root) %{_bindir}/pbsnodes %attr(755,root,root) %{_bindir}/pbsdsh %attr(755,root,root) %{_bindir}/setup_pbs_client %attr(755,root,root) %{_sbindir}/pbs_demux %attr(4755,root,root) %{_sbindir}/pbs_iff %attr(755,root,root) %{_sbindir}/pbs_mom %attr(4755,root,root) %{_sbindir}/pbs_rcp %attr(755,root,root) %config %{_initrddir}/pbs_mom %attr(644,root,root) %config(noreplace) %{_var}/spool/pbs/server_name %files -n %{lib_name}-devel %defattr(-,root,root) %doc PBS_License.txt %attr(644,root,root) %{_mandir}/man3/tm* %attr(644,root,root) %{_libdir}/%{name}-%{version}/libattr.a %attr(644,root,root) %{_libdir}/%{name}-%{version}/libcmds.a %attr(644,root,root) %{_libdir}/%{name}-%{version}/liblog.a %attr(644,root,root) %{_libdir}/%{name}-%{version}/libnet.a %attr(644,root,root) %{_libdir}/%{name}-%{version}/libpbs.a %attr(644,root,root) %{_libdir}/%{name}-%{version}/libsite.a %attr(644,root,root) %{_libdir}/%{name}-%{version}/pbs_sched.a %attr(644,root,root) %{_includedir}/* %files xpbs %defattr(-,root,root) %doc PBS_License.txt %attr(644,root,root) %{_mandir}/man1/x* %attr(755,root,root) %{_bindir}/pbs_tclsh %attr(755,root,root) %{_bindir}/pbs_wish %attr(755,root,root) %{_bindir}/xpbsmon %attr(755,root,root) %{_bindir}/xpbs %attr(644,root,root) %{_libdir}/xpbs/bitmaps/* %attr(644,root,root) %{_libdir}/xpbs/help/* %attr(755,root,root) %{_libdir}/xpbs/bin/* %attr(644,root,root) %{_libdir}/xpbs/preferences.tcl %attr(644,root,root) %{_libdir}/xpbs/pbs.tcl %attr(644,root,root) %{_libdir}/xpbs/*.tk %attr(644,root,root) %{_libdir}/xpbs/tclIndex %attr(644,root,root) %config(noreplace) %{_libdir}/xpbs/xpbsrc %attr(644,root,root) %{_libdir}/xpbsmon/*.tk %attr(644,root,root) %{_libdir}/xpbsmon/*.tcl %attr(644,root,root) %{_libdir}/xpbsmon/tclIndex %attr(644,root,root) %config(noreplace) %{_libdir}/xpbsmon/xpbsmonrc %attr(644,root,root) %{_libdir}/xpbsmon/bitmaps/* %attr(644,root,root) %{_libdir}/xpbsmon/help/* %changelog * Tue Aug 6 2002 Antoine Ginies <aginies@mandrakesoft.com> 2.3.16-34mdk - correct path problem in setup_pbs_server (fonction adjust_xpbs) - build with gcc 3.2 * Thu Aug 1 2002 Antoine Ginies <aginies@mandrakesoft.com> 2.3.16-33mdk - correct stupid bug in setup_pbs_server * Wed Jul 31 2002 Antoine Ginies <aginies@mandrakesoft.com> 2.3.16-32mdk - modify setup_pbs_server to correct node list * Wed Jul 17 2002 Antoine Ginies <aginies@mandrakesoft.com> 2.3.16-31mdk - correct setup_pbs server and client scripts * Wed Jul 17 2002 Antoine Ginies <aginies@mandrakesoft.com> 2.3.16-30mdk - adjust xpbsrc and xpbsmonrc files * Tue Jul 16 2002 Antoine Ginies <aginies@mandrakesoft.com> 2.3.16-29mdk - change xpbmonrc xpbsrc * Thu Jul 11 2002 Antoine Ginies <aginies@mandrakesoft.com> 2.3.16-28mdk - Build on 8.2 with 2.96 * Tue Jul 9 2002 Antoine Ginies <aginies@mandrakesoft.com> 2.3.16-27mdk - add info in setup_pbs_server script * Sun Jul 7 2002 Antoine Ginies <aginies@mandrakesoft.com> 2.3.16-26mdk - change help message in setup_pbs_server script * Fri Jul 5 2002 Antoine Ginies <aginies@mandrakesoft.com> 2.3.16-25mdk - change setup_pbs_server script * Thu Jul 4 2002 Antoine Ginies <aginies@mandrakesoft.com> 2.3.16-24mdk - add script setup_pbs_server * Wed Jul 3 2002 Antoine Ginies <aginies@mandrakesoft.com> 2.3.16-23mdk - add script setup_pbs_client * Tue Jun 25 2002 Antoine Ginies <aginies@mandrakesoft.com> 2.3.16-22mdk - adjust %prep and %post spec file - move OpenPBS from Development to Cluster group :-) * Thu Jun 6 2002 Antoine Ginies <aginies@mandrakesoft.com> 2.3.16-21mdk - add missing man pages * Thu Jun 6 2002 Antoine Ginies <aginies@mandrakesoft.com> 2.3.16-20mdk - fix para_job_sh script - fix pbs.setconf script * Tue Jun 4 2002 Antoine Ginies <aginies@mandrakesoft.com> 2.3.16-19mdk - add a pbs group in OpenPBS-client Package * Mon Jun 3 2002 Antoine Ginies <aginies@mandrakesoft.com> 2.3.16-18mdk - add epilogue and prologue script in OpenPBS-client package - change OpenPBS-devel directory to /usr/lib/OpenPBS-version Thats solve conflict with libnet.a and other lib. - adjust right on idirectory /var/spool/pbs/spool and undelivered * Thu May 30 2002 Antoine Ginies <aginies@mandrakesoft.com> 2.3.16-17mdk - setuid root pbs_rcp - add --with-scp configure option - add acknowledgment in description * Tue May 28 2002 Antoine Ginies <aginies@mandrakesoft.com> 2.3.16-16mdk - add latest PBS_license file * Mon May 27 2002 Antoine Ginies <aginies@mandrakesoft.com> 2.3.16-15mdk - add paralel and serial job scripts * Fri May 24 2002 Antoine Ginies <aginies@mandrakesoft.com> 2.3.16-14mdk - include pbs.setting script to configure client and server - add pbs user * Wed May 22 2002 Antoine Ginies <aginies@mandrakesoft.com> 2.3.16-13mdk - client modification * Wed May 22 2002 Antoine Ginies <aginies@mandrakesoft.com> 2.3.16-12mdk - setuid root pbs_iff - fix /etc/services file * Tue May 21 2002 Antoine Ginies <aginies@mandrakesoft.com> 2.3.16-11mdk - add pbsnodes binary - all documentation in /usr/share/doc/OpenPBS-version - add noreplace for config files * Thu May 16 2002 Antoine Ginies <aginies@mandrakesoft.com> 2.3.16-10mdk - update of introduction_openPBS * Fri Apr 26 2002 Antoine Ginies <aginies@mandrakesoft.com> 2.3.16-9mdk - fixing spec file * Fri Apr 26 2002 Antoine Ginies <aginies@mandrakesoft.com> 2.3.16-8mdk - fixing pbs_sched initscript * Mon Mar 18 2002 Antoine Ginies <aginies@mandrakesoft.com> 2.3.16-7mdk - fixing hostname in config file of xpbs and xpbsmon * Wed Mar 13 2002 Antoine Ginies <aginies@mandrakesoft.com> 2.3.16-6mdk - fixing problem of xpbs xpbs_mon - include Documentation in PDF format and quick help to create Queue * Fri Mar 7 2002 Antoine Ginies <aginies@mandrakesoft.com> 2.3.16-5mdk - fixing initscript, and files in different package * Fri Mar 1 2002 Antoine Ginies <aginies@mandrakesoft.com> 2.3.16-4mdk - Separate X, client, devel and main package * Thu Feb 28 2002 Antoine Ginies <aginies@mandrakesoft.com> 2.3.16-3mdk - resolve problem of path for pbs_mon, pbs_iff, pbs_server, pbs_shed * Tue Feb 26 2002 Antoine Ginies <aginies@mandrakesoft.com> 2.3.16-2mdk - Separate devel and main package * Mon Feb 25 2002 Antoine Ginies <aginies@mandrakesoft.com> 2.3.16-1mdk - First realease for Mandrakesoft