2007-10-26 22:44:33 +00:00
|
|
|
Summary: xCAT perl libraries
|
|
|
|
Name: perl-xCAT
|
2008-06-02 13:02:07 +00:00
|
|
|
Version: 2.1
|
2007-10-26 22:44:33 +00:00
|
|
|
Release: snap%(date +"%Y%m%d%H%M")
|
|
|
|
License: EPL
|
|
|
|
Group: System Environment/Libraries
|
2008-06-03 17:50:32 +00:00
|
|
|
Source: perl-xCAT-2.1.tar.gz
|
2007-10-26 22:44:33 +00:00
|
|
|
Packager: IBM Corp.
|
|
|
|
Vendor: IBM Corp.
|
|
|
|
Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
|
2007-12-11 19:15:28 +00:00
|
|
|
Prefix: /opt/xcat
|
2007-10-26 22:44:33 +00:00
|
|
|
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root
|
|
|
|
%ifos linux
|
|
|
|
BuildArch: noarch
|
|
|
|
%endif
|
|
|
|
|
|
|
|
Provides: perl(xCAT) = %{version}
|
|
|
|
|
|
|
|
%description
|
|
|
|
Provides perl xCAT libraries for core functionality. Required for all xCAT installations.
|
|
|
|
Includes xCAT::Table, xCAT::NodeRange, among others.
|
|
|
|
|
2008-06-03 20:02:58 +00:00
|
|
|
%prep -n perl-xCAT
|
2007-12-11 19:15:28 +00:00
|
|
|
%setup -q
|
2007-10-26 22:44:33 +00:00
|
|
|
%build
|
2008-02-27 19:52:07 +00:00
|
|
|
# This phase is done in (for RH): /usr/src/redhat/BUILD/perl-xCAT-2.0
|
|
|
|
# All of the tarball source has been unpacked there and is in the same file structure
|
|
|
|
# as it is in svn.
|
|
|
|
|
|
|
|
# Build the pod version of the man pages for each DB table. It puts them in the man5 subdir.
|
2008-03-17 13:34:40 +00:00
|
|
|
# The convert the pods to man pages and html pages.
|
2008-02-27 19:52:07 +00:00
|
|
|
./db2man
|
|
|
|
|
|
|
|
# Convert pods to man pages, e.g.: pod2man pods/man5/chain.5.pod share/man/man5/chain.1
|
2008-03-17 13:34:40 +00:00
|
|
|
# for i in pods/*/*.pod; do
|
|
|
|
# man="share/man${i#pods}" # the substitute form is not supported on aix: ${i/pods/share\/man}
|
|
|
|
# mkdir -p ${man%/*}
|
|
|
|
# pod2man $i ${man%.pod}
|
|
|
|
# done
|
2008-02-27 19:52:07 +00:00
|
|
|
|
2007-10-26 22:44:33 +00:00
|
|
|
%install
|
2008-02-27 19:52:07 +00:00
|
|
|
# The install phase puts all of the files in the paths they should be in when the rpm is
|
|
|
|
# installed on a system. The RPM_BUILD_ROOT is a simulated root file system and usually
|
|
|
|
# has a value like: /var/tmp/perl-xCAT-2.0-snap200802270932-root
|
2007-10-26 22:44:33 +00:00
|
|
|
|
2007-12-11 19:15:28 +00:00
|
|
|
rm -rf $RPM_BUILD_ROOT
|
2007-10-26 22:44:33 +00:00
|
|
|
|
2007-12-11 19:15:28 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/data
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/perl-xCAT
|
2008-02-27 19:52:07 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/man/man5
|
2008-03-17 13:34:40 +00:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/doc/man5
|
2007-10-26 22:44:33 +00:00
|
|
|
|
2007-12-11 19:15:28 +00:00
|
|
|
cp -r xCAT/* $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/
|
|
|
|
chmod 644 $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/*
|
|
|
|
chmod 644 $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT/data/*
|
|
|
|
|
|
|
|
cp LICENSE.html $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/perl-xCAT
|
|
|
|
chmod 644 $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/perl-xCAT/*
|
2007-10-26 22:44:33 +00:00
|
|
|
|
2008-02-29 17:33:27 +00:00
|
|
|
cp README $RPM_BUILD_ROOT/%{prefix}
|
|
|
|
chmod 644 $RPM_BUILD_ROOT/%{prefix}/README
|
|
|
|
|
2008-02-27 19:52:07 +00:00
|
|
|
# These were built dynamically in the build phase
|
|
|
|
cp share/man/man5/* $RPM_BUILD_ROOT/%{prefix}/share/man/man5
|
2008-03-17 13:34:40 +00:00
|
|
|
chmod 644 $RPM_BUILD_ROOT/%{prefix}/share/man/man5/*
|
|
|
|
cp share/doc/man5/* $RPM_BUILD_ROOT/%{prefix}/share/doc/man5
|
|
|
|
chmod 644 $RPM_BUILD_ROOT/%{prefix}/share/doc/man5/*
|
2008-02-27 19:52:07 +00:00
|
|
|
|
2007-10-26 22:44:33 +00:00
|
|
|
%clean
|
2008-02-27 19:52:07 +00:00
|
|
|
# This step does not happen until *after* the %files packaging below
|
2007-12-11 19:15:28 +00:00
|
|
|
rm -rf $RPM_BUILD_ROOT
|
2007-10-26 22:44:33 +00:00
|
|
|
|
2007-12-11 19:15:28 +00:00
|
|
|
#find $RPM_BUILD_ROOT -type f | sed -e "s@$RPM_BUILD_ROOT@/@" > files.list
|
2007-10-29 18:01:11 +00:00
|
|
|
|
2007-12-11 19:15:28 +00:00
|
|
|
%files
|
|
|
|
%defattr(-, root, root)
|
|
|
|
#%doc LICENSE.html
|
2008-02-27 19:52:07 +00:00
|
|
|
#%doc README
|
|
|
|
# Just package everything that has been copied into RPM_BUILD_ROOT
|
2007-12-11 19:15:28 +00:00
|
|
|
%{prefix}
|
2007-10-26 22:44:33 +00:00
|
|
|
|
2008-04-25 17:21:55 +00:00
|
|
|
%post
|
2008-05-03 13:26:14 +00:00
|
|
|
%ifos linux
|
2008-04-25 17:21:55 +00:00
|
|
|
if [ "$1" -gt 1 ]; then #Ugrade only, restart daemon and migrate settings
|
2008-05-21 20:33:25 +00:00
|
|
|
if [ -x /etc/init.d/xcatd ] && [ -f "/proc/cmdline" ]; then
|
2008-04-25 17:21:55 +00:00
|
|
|
. /etc/profile.d/xcat.sh
|
|
|
|
/etc/init.d/xcatd restart
|
|
|
|
#THE NEXT BIT SHOULD NOT BE RELEVANT TO RELEASE, IT SHOULD HELP A BETA INSTALL UPDATE GRACEFULLY
|
|
|
|
BOOTPCHECK=`tabdump bootparams|grep -v '^#node'`
|
|
|
|
if [ -z "$BOOTPCHECK" ]; then
|
|
|
|
echo -n "Old schema use detected, migrating settings, may take a while..."
|
|
|
|
for node in `nodels`; do
|
|
|
|
MIGSETTING=`nodels $node noderes.serialport|sed -e 's/^.*:.*:\s*//'`
|
|
|
|
nodech $node noderes.serialport=
|
|
|
|
if [ ! -z "$MIGSETTING" ]; then
|
|
|
|
nodech $node "nodehm.serialport=$MIGSETTING"
|
|
|
|
fi
|
|
|
|
MIGSETTING=`nodels $node noderes.kernel|sed -e 's/^.*:.*:\s*//'`
|
|
|
|
nodech $node noderes.kernel=
|
|
|
|
if [ ! -z "$MIGSETTING" ]; then
|
|
|
|
nodech $node "bootparams.kernel=$MIGSETTING"
|
|
|
|
fi
|
|
|
|
MIGSETTING=`nodels $node noderes.initrd|sed -e 's/^.*:.*:\s*//'`
|
|
|
|
nodech $node noderes.initrd=
|
|
|
|
if [ ! -z "$MIGSETTING" ]; then
|
|
|
|
nodech $node "bootparams.initrd=$MIGSETTING"
|
|
|
|
fi
|
|
|
|
MIGSETTING=`nodels $node noderes.kcmdline|sed -e 's/^.*:.*:\s*//'`
|
|
|
|
nodech $node noderes.kcmdline=
|
|
|
|
if [ ! -z "$MIGSETTING" ]; then
|
|
|
|
nodech $node "bootparams.kcmdline=$MIGSETTING"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
echo "Done"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
2008-05-03 13:26:14 +00:00
|
|
|
%endif
|
2008-04-25 17:21:55 +00:00
|
|
|
|
2007-10-26 22:44:33 +00:00
|
|
|
%changelog
|
|
|
|
* Wed May 2 2007 - Norm Nott nott@us.ibm.com
|
|
|
|
- Made changes to make this work on AIX
|
|
|
|
|
|
|
|
* Wed Jan 24 2007 Jarrod Johnson <jbjohnso@us.ibm.com>
|
|
|
|
-It begins
|
|
|
|
|