%global username sgeadmin %global sge_home %{_datadir}/gridengine %global spooldir %{_localstatedir}/spool/gridengine %global gecos Grid Engine %global _hardened_build 1 # sge uses a versioned binary protocol to communicate between the master # and the nodes that needs to be the same on all machines in a cluster. This # version is defined by GRM_GDI_VERSION in: libs/gdi/version.c # No updates should be pushed that bump this version in a stable release. Name: sge Version: 8.1.9 Release: 13%{?dist} Summary: Son of Grid Engine - Distributed Computing Management software # Only the file %{_libexecdir}/sge/bin/*/qmake is # under GPLv2+, which is not used or linked by other parts # of sge. # The file %{_libexecdir}/sge/bin/*/qtcsh is # under BSD with advertising, # which is not used or linked by other parts of sge. License: (BSD and LGPLv2+ and MIT and SISSL) and GPLv2+ and BSD with advertising URL: https://arc.liv.ac.uk/trac/SGE/ Source0: https://arc.liv.ac.uk/downloads/SGE/releases/%{version}/%{name}_%{version}.tar.xz Source3: sge.csh Source4: sge.sh Source5: sge_execd@.service Source6: sge_qmaster@.service Source7: sge_shadowd@.service Source8: sge_execd Source9: sgemaster Source10: Licenses Source11: sge.sysconfig Source12: README.package # Use waitpid() instead of wait3() with union wait # https://arc.liv.ac.uk/trac/SGE/ticket/1578 Patch0: sge-wait.patch # Don't need to make rc files in inst_common.sh Patch1: sge-rctemplates.patch # Don't use rpaths # https://arc.liv.ac.uk/trac/SGE/ticket/1494 Patch2: sge-rpath.patch # Fix build with openssl 1.1 # https://arc.liv.ac.uk/trac/SGE/ticket/1572 Patch3: sge-openssl1.1.patch # Support aarch64 # https://arc.liv.ac.uk/trac/SGE/ticket/1600 Patch4: sge-aarch64.patch # Use sge_peopen_r() # https://arc.liv.ac.uk/trac/SGE/ticket/652 Patch5: sge-peopen.patch # Fix up krb5 auth # https://arc.liv.ac.uk/trac/SGE/ticket/1608 Patch6: sge-krb5.patch # Do not ignore SIGCHLD in qmaster # https://arc.liv.ac.uk/trac/SGE/ticket/1607 Patch7: sge-sigchld.patch # Do not call ldd from arch Patch8: sge-noldd.patch # Newer glob # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=891373 Patch9: sge-qmake-glob-glibc227.patch # Build with tirpc Patch10: sge-tirpc.patch # Fix multiple definition errors Patch11: sge-extern.patch Patch12: sge-typedef.patch # For Patch9 BuildRequires: automake BuildRequires: /bin/csh BuildRequires: ant-junit BuildRequires: elfutils-libelf-devel BuildRequires: gcc BuildRequires: groff %if 0%{?fedora} || 0%{?rhel} >= 7 BuildRequires: hostname %else BuildRequires: /bin/hostname %endif BuildRequires: hwloc-devel BuildRequires: java-devel BuildRequires: javacc BuildRequires: jemalloc-devel %if 0%{?fedora} || 0%{?rhel} >= 7 BuildRequires: libdb-devel %else BuildRequires: db4-devel %endif BuildRequires: krb5-devel BuildRequires: libtirpc-devel BuildRequires: libXmu-devel BuildRequires: libXpm-devel %if 0%{?fedora} || 0%{?rhel} >= 7 BuildRequires: motif-devel %else BuildRequires: openmotif-devel %endif BuildRequires: net-tools BuildRequires: ncurses-devel BuildRequires: openssl-devel BuildRequires: pam-devel %if 0%{?fedora} || 0%{?rhel} >= 7 BuildRequires: systemd %endif BuildRequires: /usr/bin/pathfix.py Requires: binutils Requires: ncurses Requires(posttrans): /usr/sbin/alternatives Requires(preun): /usr/sbin/alternatives Requires(pre): shadow-utils Obsoletes: gridengine < 2011.11p1-33 Provides: gridengine = 2011.11p1-33 Provides: gridengine%{?_isa} = 2011.11p1-33 %description In a typical network that does not have distributed resource management software, workstations and servers are used from 5% to 20% of the time. Even technical servers are generally less than fully utilized. This means that there are a lot of cycles that can be used productively if only users know where they are, can capture them, and put them to work. Son of Grid Engine finds a pool of idle resources and harnesses it productively, so an organization gets as much as five to ten times the usable power out of systems on the network. That can increase utilization to as much as 98%. Son of Grid Engine software aggregates available compute resources and delivers compute power as a network service. These are the local files shared by both the qmaster and execd daemons. You must install this package in order to use any one of them. %package devel Summary: Son of Grid Engine development files License: BSD and LGPLv2+ and MIT and SISSL Requires: %{name} = %{version}-%{release} Obsoletes: gridengine-devel < 2011.11p1-33 Provides: gridengine-devel = 2011.11p1-33 Provides: gridengine-devel%{?_isa} = 2011.11p1-33 %description devel Son of Grid Engine development headers and libraries. %package drmaa4ruby Summary: Ruby binding for DRMAA library License: SISSL Requires: %{name} = %{version}-%{release} #Requires: /usr/bin/ruby BuildArch: noarch %description drmaa4ruby This binding is presumably not Grid Engine-specific. %package execd Summary: Son of Grid Engine execd program License: BSD and LGPLv2+ and MIT and SISSL Requires: %{name} = %{version}-%{release} %if 0%{?fedora} || 0%{?rhel} >= 7 Requires(post): systemd Requires(postun): systemd Requires(preun): systemd %else Requires(post): /sbin/chkconfig Requires(postun): /sbin/service Requires(preun): /sbin/chkconfig Requires(preun): /sbin/service %endif Requires(postun): %{name} = %{version}-%{release} Requires(preun): %{name} = %{version}-%{release} Obsoletes: gridengine-execd < 2011.11p1-33 Provides: gridengine-execd = 2011.11p1-33 Provides: gridengine-execd%{?_isa} = 2011.11p1-33 %description execd Programs needed to run a grid engine execution host %package java Summary: Son of Grid Engine java libraries License: BSD and LGPLv2+ and MIT and SISSL Requires: %{name} = %{version}-%{release} Requires: java-headless Requires: jpackage-utils %description java Son of Grid Engine java libraries. This includes the JGDI interface, DRMAA, and Java JSV support. %package qmaster Summary: Son of Grid Engine qmaster programs License: BSD and LGPLv2+ and MIT and SISSL Requires: %{name} = %{version}-%{release} %if 0%{?fedora} || 0%{?rhel} >= 7 Requires: libdb-utils Requires(post): systemd Requires(postun): systemd Requires(preun): systemd %else Requires: db4-utils Requires(post): /sbin/chkconfig Requires(postun): /sbin/service Requires(preun): /sbin/chkconfig Requires(preun): /sbin/service %endif Requires(postun): %{name} = %{version}-%{release} Requires(preun): %{name} = %{version}-%{release} Obsoletes: gridengine-qmaster < 2011.11p1-33 Provides: gridengine-qmaster = 2011.11p1-33 Provides: gridengine-qmaster%{?_isa} = 2011.11p1-33 %description qmaster Programs needed to run a grid engine qmaster or shadowd host %package qmon Summary: Son of Grid Engine qmon monitor License: BSD and LGPLv2+ and MIT and SISSL Requires: %{name} = %{version}-%{release} Requires: xorg-x11-fonts-ISO8859-1-100dpi Requires: xorg-x11-fonts-ISO8859-1-75dpi Obsoletes: gridengine-qmon < 2011.11p1-33 Provides: gridengine-qmon = 2011.11p1-33 Provides: gridengine-qmon%{?_isa} = 2011.11p1-33 %description qmon The qmon graphical grid engine monitor %prep %setup -q # Use system jemalloc # https://arc.liv.ac.uk/trac/SGE/ticket/1491 #rm -r source/3rdparty/jemalloc #Copy Licenses and README.package file into build directory cp %SOURCE10 %SOURCE12 . # Remove unneeded shbangs # https://arc.liv.ac.uk/trac/SGE/ticket/1493 sed -i -e '/^#! *\/bin\/sh/d' source/dist/util/install_modules/*.sh %patch0 -p1 -b .wait %patch1 -p1 -b .rctemplates %patch2 -p1 -b .rpath %patch3 -p1 -b .openssl1.1 %patch4 -p1 -b .aarch64 %patch5 -p1 -b .peopen %patch6 -p1 -b .krb5 %patch7 -p1 -b .sigchld %patch8 -p1 -b .noldd %patch9 -p1 -b .qmake-glob-glibc227 %patch10 -p1 -b .tirpc %patch11 -p1 -b .extern %patch12 -p1 -b .typedef sed -i.arch -e 's,/\$DSTARCH,,g' source/scripts/distinst rm source/dist/util/resources/loadsensors/interix-loadsensor.sh #Don't ship rctemplates rm -r source/dist/util/rctemplates #Don't ship windows .bat scripts find source -name \*.bat | xargs rm #Fix permissions chmod +x source/dist/util/dl?.*sh chmod -x source/dist/util/dl.*sh find source -name \*.c | xargs chmod -x cd source/3rdparty/qmake autoreconf cd - #Fix flags for qmake build find source/3rdparty/qmake source/3rdparty/qtcsh -name Makefile | xargs sed -i -e "/^CFLAGS *=/s:=:= %{optflags}:" #Fix xterm path sed -i -e s,X11/xterm,xterm,g doc/man/man5/sge_conf.5 \ source/dist/util/arch_variables \ source/libs/sgeobj/sge_conf.c %build cd source cat > aimk.private < build_private.properties <= 7 mkdir -p %{buildroot}%{_unitdir} install -p -m644 %SOURCE5 %SOURCE6 %SOURCE7 %{buildroot}%{_unitdir} %else mkdir -p $RPM_BUILD_ROOT%{_initrddir} install -p -m755 %SOURCE8 %SOURCE9 $RPM_BUILD_ROOT%{_initrddir} %endif mkdir -p %{buildroot}%{_sysconfdir}/sysconfig install -p -m644 %SOURCE11 %{buildroot}%{_sysconfdir}/sysconfig/gridengine-default cat > %{buildroot}%{_sysconfdir}/sysconfig/gridengine << EOF # Set the system default SGE_CELL here SGE_CELL=default EOF #sgeCA mkdir -p %{buildroot}%{_localstatedir}/sgeCA # Don't package catman files rm -rf %{buildroot}%{sge_home}/catman # Rename some man pages to avoid conflicts pushd %{buildroot}%{_mandir}/man5 for f in * do if [ ${f:0:4} != sge_ ] then mv $f sge_$f fi done popd #Don't need these rm -rf %{buildroot}%{sge_home}/3rd_party rm -rf %{buildroot}%{sge_home}/dtrace #Don't ship example binaries rm -rf %{buildroot}%{sge_home}/examples/jobsbin rm -rf %{buildroot}%{sge_home}/examples/worker.* #Cleanup some patch backups that get shipped rm %{buildroot}%{sge_home}/util/install_modules/inst_*.sh.* #TODO - Ship the GUI installer rm %{buildroot}%{sge_home}/start_gui_installer # Fix python shebangs %if 0%{?fedora} || 0%{?rhel} >= 8 pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{_datadir} %else pathfix.py -pni "%{__python2} %{py2_shbang_opts}" %{buildroot}%{_datadir} %endif %pre getent group %{username} >/dev/null || groupadd -r %{username} getent passwd %{username} >/dev/null || \ useradd -r -g %{username} -d %{sge_home} -s /sbin/nologin \ -c '%{gecos}' %{username} # For switching from gridengine to sge usermod -d %{sge_home} %{username} > /dev/null 2>&1 exit 0 %post -p /sbin/ldconfig %posttrans alternatives --install %{_bindir}/qsub qsub %{_bindir}/qsub-%{name} 10 \ --slave %{_mandir}/man1/qsub.1.gz qsub-man \ %{_mandir}/man1/qsub-%{name}.1.gz \ --slave %{_bindir}/qalter qalter %{_bindir}/qalter-%{name} \ --slave %{_mandir}/man1/qalter.1.gz qalter-man \ %{_mandir}/man1/qalter-%{name}.1.gz \ --slave %{_bindir}/qdel qdel %{_bindir}/qdel-%{name} \ --slave %{_mandir}/man1/qdel.1.gz qdel-man \ %{_mandir}/man1/qdel-%{name}.1.gz \ --slave %{_bindir}/qhold qhold %{_bindir}/qhold-%{name} \ --slave %{_mandir}/man1/qhold.1.gz qhold-man \ %{_mandir}/man1/qhold-%{name}.1.gz \ --slave %{_bindir}/qrls qrls %{_bindir}/qrls-%{name} \ --slave %{_mandir}/man1/qrls.1.gz qrls-man \ %{_mandir}/man1/qrls-%{name}.1.gz \ --slave %{_bindir}/qselect qselect %{_bindir}/qselect-%{name} \ --slave %{_mandir}/man1/qselect.1.gz qselect-man \ %{_mandir}/man1/qselect-%{name}.1.gz \ --slave %{_bindir}/qstat qstat %{_bindir}/qstat-%{name} \ --slave %{_mandir}/man1/qstat.1.gz qstat-man \ %{_mandir}/man1/qstat-%{name}.1.gz || : %preun if [ $1 -eq 0 ] ; then alternatives --remove qsub %{_bindir}/qsub-%{name} || : fi %postun -p /sbin/ldconfig %post execd %if 0%{?fedora} || 0%{?rhel} >= 7 %systemd_post sge_execd@default.service %else /sbin/chkconfig --add sge_execd %endif %postun execd %systemd_postun sge_execd@default.service %preun execd %if 0%{?fedora} || 0%{?rhel} >= 7 %systemd_preun sge_execd@default.service %else if [ $1 -eq 0 ] ; then # Package removal, not upgrade /sbin/service sge_execd stop /sbin/chkconfig --del sge_execd fi %endif %post qmaster %if 0%{?fedora} || 0%{?rhel} >= 7 %systemd_post sge_qmaster@default.service %systemd_post sge_shadowd@default.service %else /sbin/chkconfig --add sgemaster %endif %postun qmaster %systemd_postun sge_qmaster@default.service %systemd_postun sge_shadowd@default.service %preun qmaster %if 0%{?fedora} || 0%{?rhel} >= 7 %systemd_preun sge_qmaster@default.service %systemd_preun sge_shadowd@default.service %else if [ $1 -eq 0 ] ; then # Package removal, not upgrade /sbin/service sgemaster stop /sbin/chkconfig --del sgemaster fi %endif %files %{!?_licensedir:%global license %doc} %license Licenses LICENCES/* %doc AUTHORS NEWS README README.package %config(noreplace) %{_sysconfdir}/profile.d/sge.* %config(noreplace) %{_sysconfdir}/sysconfig/gridengine %config(noreplace) %{_sysconfdir}/sysconfig/gridengine-default # Only the file %{_bindir}/qmake-%{name} is # under GPLv2+ # Olny the file %{_bindir}/qtcsh is # under BSD with advertising %{_bindir}/* %exclude %{_bindir}/qacct %exclude %{_bindir}/qmon %exclude %{_bindir}/qsched %exclude %{_bindir}/sge_execd %exclude %{_bindir}/sge_qmaster %exclude %{_bindir}/sge_shadowd %exclude %{_bindir}/sge_*shepherd %dir %{_libdir}/gridengine %{_libdir}/libdrmaa.so* %{_libexecdir}/gridengine/ %exclude %{_libexecdir}/gridengine/utilbin/spool* %attr(0755,%username,%username) %dir %{sge_home} %{sge_home}/bin %exclude %{sge_home}/bin/*/qacct %exclude %{sge_home}/bin/*/qmon %exclude %{sge_home}/bin/*/qsched %exclude %{sge_home}/bin/*/sge_execd %exclude %{sge_home}/bin/*/sge_qmaster %exclude %{sge_home}/bin/*/sge_shadowd %exclude %{sge_home}/bin/*/sge_*shepherd %attr(0755,%username,%username) %ghost %dir %{sge_home}/default %attr(0755,%username,%username) %ghost %dir %{sge_home}/default/common %attr(0644,%username,%username) %ghost %{sge_home}/default/common/* %{sge_home}/doc %dir %{sge_home}/examples %dir %{sge_home}/examples/drmaa %{sge_home}/examples/jobs/ %{sge_home}/hadoop %{sge_home}/inst_sge %{sge_home}/lib %{sge_home}/mpi %{sge_home}/my_configuration.conf %dir %{sge_home}/pvm %{sge_home}/pvm/* %exclude %{sge_home}/pvm/src %{sge_home}/util %exclude %{sge_home}/util/resources/drmaa4ruby %dir %{sge_home}/utilbin %{sge_home}/utilbin/* %exclude %{sge_home}/utilbin/db_* %{_mandir}/man1/*.1* %exclude %{_mandir}/man1/qacct.1* %exclude %{_mandir}/man1/qmon.1* %exclude %{_mandir}/man1/qsched.1* %{_mandir}/man5/*.5* %{_mandir}/man8/*.8* %exclude %{_mandir}/man8/sge_qmaster.8* %exclude %{_mandir}/man8/sge_shadowd.8* %exclude %{_mandir}/man8/sge_execd.8* %exclude %{_mandir}/man8/sge_*shepherd.8* %attr(0755,%username,%username) %dir %{spooldir} %attr(0755,%username,%username) %dir %{spooldir}/default %files devel %{_includedir}/* %{sge_home}/examples/drmaa/* %exclude %{sge_home}/examples/drmaa/ruby %{sge_home}/pvm/src %{_mandir}/man3/*.3* %files drmaa4ruby %{sge_home}/util/resources/drmaa4ruby %{sge_home}/examples/drmaa/ruby/ %files execd %if 0%{?fedora} || 0%{?rhel} >= 7 %{_unitdir}/sge_execd@.service %else %{_initrddir}/sge_execd %endif %{_bindir}/sge_execd %{_bindir}/sge_*shepherd %{sge_home}/install_execd %{sge_home}/bin/*/sge_execd %{sge_home}/bin/*/sge_*shepherd %{_libdir}/security/pam_*.so %{_mandir}/man8/sge_execd.8* %{_mandir}/man8/sge_*shepherd.8* %files java %{_jnidir}/jgdi.jar %{_jnidir}/juti.jar # JNI libraries %{_libdir}/gridengine/libjgdi.so %{_libdir}/gridengine/libjuti.so # Compat symlinks %{_libdir}/gridengine/jgdi.jar %{_libdir}/gridengine/juti.jar %{_javadir}/drmaa.jar %{_javadir}/JSV.jar %files qmaster %if 0%{?fedora} || 0%{?rhel} >= 7 %{_unitdir}/sge_qmaster@.service %{_unitdir}/sge_shadowd@.service %else %{_initrddir}/sgemaster %endif %{_bindir}/qacct %{_bindir}/qsched %{_bindir}/sge_qmaster %{_bindir}/sge_shadowd %{_libdir}/gridengine/libspoolb.so %{_libdir}/gridengine/libspoolc.so %{_libexecdir}/gridengine/utilbin/spool* %{sge_home}/bin/*/qacct %{sge_home}/bin/*/qsched %{sge_home}/bin/*/sge_qmaster %{sge_home}/bin/*/sge_shadowd %{sge_home}/install_qmaster %{sge_home}/utilbin/db_* %{_mandir}/man1/qacct.1* %{_mandir}/man1/qsched.1* %{_mandir}/man8/sge_qmaster.8* %{_mandir}/man8/sge_shadowd.8* %attr(0755,%username,%username) %dir %{_localstatedir}/sgeCA %attr(0755,%username,%username) %ghost %dir %{spooldir}/default/qmaster %attr(0644,%username,%username) %ghost %{spooldir}/default/qmaster/* %attr(0755,%username,%username) %ghost %dir %{spooldir}/default/spool %attr(0755,%username,%username) %ghost %dir %{spooldir}/default/spooldb %attr(0644,%username,%username) %ghost %{spooldir}/default/spooldb/* %files qmon %{_bindir}/qmon %{_datadir}/X11/app-defaults/* %{sge_home}/bin/*/qmon %{sge_home}/qmon/ %{_mandir}/man1/qmon.1* %changelog * Fri Apr 24 2020 Orion Poplwski - 8.1.9-13 - export SGE_QMASTER_PORT * Fri Apr 24 2020 Orion Poplwski - 8.1.9-12 - Add PIDFile to sge_qmaster@service - Add patches to fix multiple definition errors - Fix jni jar symlink * Mon Apr 6 2020 Orion Poplwski - 8.1.9-11 - Add Restart=on-failure to service units * Tue Sep 17 2019 Orion Poplwski - 8.1.9-10 - Fixup permissions * Thu Jun 28 2018 Orion Poplwski - 8.1.9-9 - Start services after autofs.service and remote-fs.target * Fri Apr 27 2018 Orion Poplwski - 8.1.9-8 - Drop interix loadsensor and ksh dep - Do not restart services - kills jobs * Wed Apr 25 2018 Orion Poplwski - 8.1.9-7 - Setup cgroup directory in sge_execd@.service * Wed Mar 14 2018 Orion Poplwski - 8.1.9-6 - Add patch to not call ldd from util/arch * Wed May 24 2017 Orion Poplwski - 8.1.9-5 - Move ruby stuff to drmaa4ruby sub-package * Thu Apr 13 2017 Orion Poplwski - 8.1.9-4 - Use templated service files * Tue Apr 4 2017 Orion Poplwski - 8.1.9-3 - Build gss utils * Mon Feb 13 2017 Orion Poplwski - 8.1.9-2 - Add upstream patch to support openssl 1.1 - Add patch to support aarch64 * Wed Aug 17 2016 Orion Poplwski - 8.1.9-1 - Update to 8.1.9 * Mon Feb 23 2015 Orion Poplwski - 8.1.8-1 - Initial sge package