# Copyright (C) 2007 Platform Computing Inc # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # # %define subversion 5 Summary: Lava master component Name: component-lava-master-v1_0 Version: 1.0 Release: 5 License: GPLv2 Group: System Environment/Base Vendor: Platform Computing Corporation Requires: lava = 1.0, lava-master-config = 1.0 Requires: shadow-utils BuildArch: noarch Source: component-lava-master-v1_0-%{version}.%{subversion}.tar.gz %define compdependency component-lava-compute-v1_0 %description This package is a metapackage for Lava %prep %setup -q -n %{name} %post if [ -e /var/lock/subsys/kusu-installer ]; then exit 0; fi # Add "lavaadmin" user getent group lavaadmin >/dev/null || groupadd -g 456 lavaadmin getent passwd lavaadmin >/dev/null || useradd -u 456 -g lavaadmin -c "Lava Administrator" -s /sbin/nologin -m -d /home/lavaadmin lavaadmin 2> /dev/null || : if [ -f /etc/rc.kusu.d/S10lava-genconfig ]; then echo "Running Kusu RC Script: Lava" /etc/rc.kusu.d/S10lava-genconfig fi /bin/cat << 'EOF' > /opt/kusu/lib/plugins/cfmclient/lava-restart #!/bin/sh source /etc/profile.d/lava.sh if [ -f /var/lock/subsys/lava ]; then lsadmin reconfig -f badmin hstartup else /sbin/service lava start fi EOF %install mkdir -p $RPM_BUILD_ROOT/etc/rc.kusu.d mkdir -p $RPM_BUILD_ROOT/etc/lava/conf/lsbatch/lava mkdir -p $RPM_BUILD_ROOT/var/spool/lava/work/lava/logdir /usr/bin/install -m 755 S10lava-genconfig $RPM_BUILD_ROOT/etc/rc.kusu.d/ %postun # Generate scripts for the CFM to remove other packages /bin/cat << 'EOF' >> /opt/kusu/lib/plugins/cfmclient/%{name}.remove #!/bin/sh yum -y remove component-lava-compute-v1_0 lava-master-config lava rm -rf /opt/kusu/lib/plugins/cfmclient/%{name}.remove rm -rf /opt/kusu/lib/plugins/cfmclient/%{compdependency}.remove EOF %files /etc/rc.kusu.d/S10lava-genconfig %dir /etc/lava/conf/lsbatch/lava %dir /var/spool/lava/work/lava/logdir %changelog * Wed Feb 4 2009 Meng Kuan 1.0-5 - Port lava kit to Kit ASK 0.2. * Tue Feb 3 2009 Meng Kuan 1.0-4 - Final release of the old-style kits * Mon Apr 14 2008 Mike Frisch 1.0.3 - Fixed spec file (Problem #106940) * Thu Mar 27 2008 Mike Frisch 1.0-1 - Do not remove user in postun * Wed Jan 30 2008 Shawn Starr 1.0-0 - Initial release of Lava 1.0