added aix pkging support, and tarballs directly in SOURCES

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@291 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
bp-sawyers 2008-01-17 20:33:12 +00:00
parent a2018d3f92
commit f85609131f
7 changed files with 116 additions and 54 deletions

View File

@ -5,11 +5,11 @@ OSNAME=$(uname)
if [ "$OSNAME" = "AIX" ]
then
tar -cvf xCAT-client-2.0.tar xCAT-client-2.0
gzip xCAT-client-2.0.tar
cp xCAT-client-2.0.tar.gz /opt/freeware/src/packages/SOURCES
echo '.svn' > /tmp/xcat-excludes
tar -X /tmp/xcat-excludes -cvf /opt/freeware/src/packages/SOURCES/xCAT-client-2.0.tar xCAT-client-2.0
gzip /opt/freeware/src/packages/SOURCES/xCAT-client-2.0.tar
cd ./xCAT-client-2.0
rm /opt/freeware/src/packages/RPMS/ppc/xCAT-client-2.0*rpm
rm -f /opt/freeware/src/packages/SRPMS/xCAT-client-2.0*rpm /opt/freeware/src/packages/RPMS/ppc/xCAT-client-2.0*rpm
rpm -ba xCAT-client.spec
#rpm -Uvh /opt/freeware/src/packages/RPMS/ppc/xCAT-client-2.0*rpm
@ -22,8 +22,8 @@ else
pkg="packages"
fi
tar --exclude .svn -czvf xCAT-client-2.0.tar.gz xCAT-client-2.0;
rm /usr/src/$pkg/RPMS/noarch/xCAT-client-2.0*rpm
rpmbuild -ta xCAT-client-2.0.tar.gz ;
tar --exclude .svn -czvf /usr/src/$pkg/SOURCES/xCAT-client-2.0.tar.gz xCAT-client-2.0;
rm -f /usr/src/$pkg/SRPMS/xCAT-client-2.0*rpm /usr/src/$pkg/RPMS/noarch/xCAT-client-2.0*rpm
rpmbuild -ta /usr/src/$pkg/SOURCES/xCAT-client-2.0.tar.gz ;
#rpm -Uvh /usr/src/$pkg/RPMS/noarch/xCAT-client-2.0*rpm
fi

View File

@ -4,12 +4,12 @@ OSNAME=$(uname)
if [ "$OSNAME" = "AIX" ]
then
tar -cvf perl-xCAT-2.0.tar perl-xCAT-2.0
gzip perl-xCAT-2.0.tar
cp perl-xCAT-2.0.tar.gz /opt/freeware/src/packages/SOURCES
echo '.svn' > /tmp/xcat-excludes
tar -X /tmp/xcat-excludes -cvf /opt/freeware/src/packages/SOURCES/perl-xCAT-2.0.tar perl-xCAT-2.0
gzip /opt/freeware/src/packages/SOURCES/perl-xCAT-2.0.tar
cd ./perl-xCAT-2.0
rm /opt/freeware/src/packages/RPMS/ppc/perl-xCAT-2.0*rpm
rm -f /opt/freeware/src/packages/SRPMS/perl-xCAT-2.0*rpm /opt/freeware/src/packages/RPMS/ppc/perl-xCAT-2.0*rpm
rpm -ba perl-xCAT.spec
#rpm -Uvh /opt/freeware/src/packages/RPMS/ppc/perl-xCAT-2.0*rpm
@ -21,8 +21,8 @@ else
pkg="packages"
fi
tar --exclude .svn -czvf perl-xCAT-2.0.tar.gz perl-xCAT-2.0/;
rm /usr/src/$pkg/RPMS/noarch/perl-xCAT-2.0*rpm
rpmbuild -ta perl-xCAT-2.0.tar.gz ;
tar --exclude .svn -czvf /usr/src/$pkg/SOURCES/perl-xCAT-2.0.tar.gz perl-xCAT-2.0/;
rm -f /usr/src/$pkg/SRPMS/perl-xCAT-2.0*rpm /usr/src/$pkg/RPMS/noarch/perl-xCAT-2.0*rpm
rpmbuild -ta /usr/src/$pkg/SOURCES/perl-xCAT-2.0.tar.gz ;
#rpm -Uvh /usr/src/$pkg/RPMS/noarch/perl-xCAT-2.0*rpm
fi

View File

@ -4,13 +4,14 @@ OSNAME=$(uname)
if [ "$OSNAME" = "AIX" ]
then
tar -cvf xCAT-server-2.0.tar xCAT-server-2.0
gzip xCAT-server-2.0.tar
cp xCAT-server-2.0.tar.gz /opt/freeware/src/packages/SOURCES
cd ./xCAT-server-2.0
rm /opt/freeware/src/packages/RPMS/ppc/xCAT-server-2.0*rpm
rpm -ba xCAT-server.spec
#rpm -Uvh /opt/freeware/src/packages/RPMS/ppc/xCAT-server-2.0*rpm
echo '.svn' > /tmp/xcat-excludes
tar -X /tmp/xcat-excludes -cvf /opt/freeware/src/packages/SOURCES/xCAT-server-2.0.tar xCAT-server-2.0
gzip /opt/freeware/src/packages/SOURCES/xCAT-server-2.0.tar
cd ./xCAT-server-2.0
rm -f /opt/freeware/src/packages/SRPMS/xCAT-server-2.0*rpm /opt/freeware/src/packages/RPMS/ppc/xCAT-server-2.0*rpm
rpm -ba xCAT-server.spec
#rpm -Uvh /opt/freeware/src/packages/RPMS/ppc/xCAT-server-2.0*rpm
else
@ -21,8 +22,8 @@ else
pkg="packages"
fi
tar --exclude .svn -czvf xCAT-server-2.0.tar.gz xCAT-server-2.0;
rm /usr/src/$pkg/RPMS/noarch/xCAT-server-2.0*rpm
rpmbuild -ta xCAT-server-2.0.tar.gz ;
tar --exclude .svn -czvf /usr/src/$pkg/SOURCES/xCAT-server-2.0.tar.gz xCAT-server-2.0;
rm -f /usr/src/$pkg/SRPMS/xCAT-server-2.0*rpm /usr/src/$pkg/RPMS/noarch/xCAT-server-2.0*rpm
rpmbuild -ta /usr/src/$pkg/SOURCES/xCAT-server-2.0.tar.gz ;
#rpm -Uvh /usr/src/$pkg/RPMS/noarch/xCAT-server-2.0*rpm
fi

34
makewebrpm Normal file
View File

@ -0,0 +1,34 @@
#!/bin/ksh
OSNAME=$(uname)
version='2.0'
if [ "$OSNAME" = "AIX" ]
then
echo '.svn' > /tmp/xcat-excludes
tar -X /tmp/xcat-excludes -cvf /opt/freeware/src/packages/SOURCES/xCAT-web.tar xCAT-web
gzip /opt/freeware/src/packages/SOURCES/xCAT-web.tar
cd ./xCAT-web
rm -f /opt/freeware/src/packages/SRPMS/xCAT-web*rpm /opt/freeware/src/packages/RPMS/ppc/xCAT-web*rpm
rpm -ba xCAT-web.spec
#rpm -Uvh /opt/freeware/src/packages/RPMS/ppc/xCAT-web*rpm
else
if [ -f /etc/redhat-release ]
then
pkg="redhat"
else
pkg="packages"
fi
source=$PWD
# Trying to avoid having the version # (2.0) on the xCAT-web dir name in svn
set -x
cd /usr/src/$pkg/SOURCES
rm -f xCAT-web-$version; ln -s $source/xCAT-web xCAT-web-$version # have to make tar think it is in xCAT-web-2.0
rm -f xCAT-web-$version.tar.gz
tar -czhf xCAT-web-$version.tar.gz --exclude=.svn --exclude=.project xCAT-web-$version
rm -f /usr/src/$pkg/SRPMS/xCAT-web-$version*rpm /usr/src/$pkg/RPMS/noarch/xCAT-web-$version*rpm
rpmbuild -ta xCAT-web-$version.tar.gz
#rpm -Uvh /usr/src/$pkg/RPMS/noarch/xCAT-web-$version*rpm
fi

View File

@ -71,55 +71,55 @@ if (!isset($_REQUEST['noderange'])) {
to /tmp on the nodes and executed from there.)</TD>
</TR>
<TR class=FormTable>
<TD colspan="3" nowrap><INPUT type="checkbox" name="run_psh" id="pshChkBox">
Use parallel shell (psh) command instead of xdsh.</TD>
<TD colspan="3" nowrap><INPUT type="checkbox" name="run_psh" id="pshChkBox" checked readonly>
Use parallel shell (psh) command instead of xdsh. Currently this option must be used, and the options below (associated with xdsh) are disabled.</TD>
</TR>
<TR class=FormTable>
<TD colspan="3"><B>Options:</TD>
</TR>
<TR class=FormTable>
<TD width="37"></TD>
<TD width="210" valign="top" nowrap><INPUT type="checkbox" name="serial" id="serialChkBox" checked>Streaming mode</TD>
<TD width="210" valign="top" nowrap><INPUT type="checkbox" name="serial" id="serialChkBox" disabled>Streaming mode</TD>
<TD width="500">Specifies that output is returned as it becomes available from each target, instead of waiting for the command to be completed on a target before returning output from that target.</TD>
</TR>
<TR class=FormTable>
<TD></TD>
<TD valign="top" nowrap><INPUT type="checkbox" name="monitor" id="monitorChkBox">Monitor</TD>
<TD valign="top" nowrap><INPUT type="checkbox" name="monitor" id="monitorChkBox" disabled>Monitor</TD>
<TD>Prints starting and completion messages for each node. Useful with Streaming mode.</TD>
</TR>
<TR class=FormTable>
<TD></TD>
<TD valign="top" nowrap><INPUT type="checkbox" name="verify" id="verifyChkBox">Verify</TD>
<TD valign="top" nowrap><INPUT type="checkbox" name="verify" id="verifyChkBox" disabled>Verify</TD>
<TD>Verifies that nodes are responding before sending the command to them.</TD>
</TR>
<TR class=FormTable>
<TD></TD>
<TD valign="top" nowrap><INPUT type="checkbox" name="collapse" id="collapseChkBox">Collaspe Identical Output</TD>
<TD valign="top" nowrap><INPUT type="checkbox" name="collapse" id="collapseChkBox" disabled>Collaspe Identical Output</TD>
<TD>Automatically pipe the xdsh output into xdshbak which will only display output once for all the nodes that display identical output. See the xdshbak man page for more info.</TD>
</TR>
<TR class=FormTable>
<TD></TD>
<TD valign="top" nowrap>Fanout:<INPUT type="text" name="fanout" id="fanoutTxtBox"></TD>
<TD valign="top" nowrap>Fanout: <INPUT type="text" name="fanout" id="fanoutTxtBox" disabled></TD>
<TD>The maximum number of nodes the command should be run on concurrently. When the command finishes on 1 of the nodes, it will be started on an additional node (the default is 64).</TD>
</TR>
<TR class=FormTable>
<TD></TD>
<TD valign="top" nowrap>UserID:<INPUT type="text" name="userID" id="userIDTxtBox"></TD>
<TD valign="top" nowrap>UserID: <INPUT type="text" name="userID" id="userIDTxtBox" disabled></TD>
<TD>The user id to use to run the command on the nodes.</TD>
</TR>
<TR class=FormTable>
<TD></TD>
<TD valign="top" nowrap>Remote Shell:<INPUT type="text" name="rshell" id="rshellTxtBox"></TD>
<TD valign="top" nowrap>Remote Shell: <INPUT type="text" name="rshell" id="rshellTxtBox" disabled></TD>
<TD>The remote shell program to use to run the command on the nodes. The default is /usr/bin/ssh.</TD>
</TR>
<TR class=FormTable>
<TD></TD>
<TD valign="top" nowrap>Shell Options:<INPUT type="txt" name="shell_opt" id="shell_optTxtBox"></TD>
<TD valign="top" nowrap>Shell Options: <INPUT type="txt" name="shell_opt" id="shell_optTxtBox" disabled></TD>
<TD>Options to pass to the remote shell being used.</TD>
</TR>
<TR class=FormTable>
<TD></TD>
<TD valign="top" nowrap><INPUT type="checkbox" name="ret_code" id="ret_codeChkBox">Code Return</TD>
<TD valign="top" nowrap><INPUT type="checkbox" name="ret_code" id="ret_codeChkBox" disabled>Return Code</TD>
<TD>Prints the return code of the (last) command that was run remotely on each node. The return code is appended at the end of the output for each node.</TD>
</TR>
<TR><TD colspan="3">

View File

@ -51,12 +51,12 @@ if (isset($_COOKIE['history']) && array_search($_REQUEST['command'], $_COOKIE['h
if ($psh == "off"){ //using dsh
$command = "xdsh ";
$copy_cmd = "xdcp ";
if ($group == "") $node_group = "-n " . $node;
else $node_group = "-N " . $group;
if ($group == "") $node_group = /* "-n " . */ $node;
else $node_group = /* "-N " . */ $group;
}else{
$command = "psh ";
$copy_cmd = "prcp ";
$copy_cmd = "pscp ";
if ($group == "") $node_group = $node;
else $node_group = $group;
}

View File

@ -38,7 +38,7 @@ chmod 755 $RPM_BUILD_ROOT%{prefix}/web/*
%files
%defattr(-,root,root)
# %defattr( 555, root, root, 755 )
%{prefix}
%{prefix}/web
%post
@ -50,26 +50,32 @@ then
if [ -e "/etc/redhat-release" ]; then
apachedaemon='httpd'
apacheuser='apache'
else
# todo: change this when switch to xcat 2
echo "Updating apache userid to allow logins..."
cp /etc/passwd /etc/passwd.orig
perl -e 'while (<>) { s,^apache:(.*):/sbin/nologin$,apache:$1:/bin/bash,; print $_; }' /etc/passwd.orig >/etc/passwd
else # SuSE
apachedaemon='apache2'
apacheuser='wwwrun'
fi
# Update the apache config
echo "Updating $apachedaemon configuration for xCAT..."
/bin/rm -f /etc/$apachedaemon/conf.d/xcat.conf
/bin/ln -s /opt/xcat/web/etc/apache2/conf.d/xcat.conf /etc/$apachedaemon/conf.d/xcat.conf
/bin/ln -s %{prefix}/web/etc/apache2/conf.d/xcat.conf /etc/$apachedaemon/conf.d/xcat.conf
/etc/init.d/$apachedaemon reload
# Config sudo - todo: change this when switch to xcat 2
if ! egrep "^$apacheuser ALL=\(ALL\) NOPASSWD:ALL" /etc/sudoers; then
# Link to the grpattr cmd. Todo: remove this when it is in base xcat
/bin/rm -f %{prefix}/bin/grpattr
mkdir -p %{prefix}/bin
/bin/ln -s %{prefix}/web/cmds/grpattr %{prefix}/bin/grpattr
# Config sudo. Todo: change this when switch to xcat 2
if ! egrep -q "^$apacheuser ALL=\(ALL\) NOPASSWD:ALL" /etc/sudoers; then
echo "Configuring sudo for $apacheuser..."
echo "$apacheuser ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
fi
#cp /etc/webmin/webmin.acl /etc/webmin/webmin.acl.orig
#perl -e 'while (<>) { if (/^root:/ && !/\bcsm\b/) {s/$/ csm/;} print $_; }' /etc/webmin/webmin.acl.orig >/etc/webmin/webmin.acl
#if [ `uname` = "Linux" ]; then
# kill -1 `cat /var/webmin/miniserv.pid`
#fi
fi
if [ "$1" = 1 ] || [ "$1" = 2 ] # initial install, or upgrade and this is the newer rpm
@ -82,11 +88,32 @@ fi
if [ "$1" = 0 ] # final rpm being removed
then
# Remove link to the apache conf file
if [ -e "/etc/redhat-release" ]; then
/bin/rm -f /etc/httpd/conf.d/xcat.conf
else
/bin/rm -f /etc/apache2/conf.d/xcat.conf
apachedaemon='httpd'
apacheuser='apache'
# Undo change we made to passwd file. Todo: change this when switch to xcat 2
echo "Undoing apache userid login..."
cp /etc/passwd /etc/passwd.tmp
perl -e 'while (<>) { s,^apache:(.*):/bin/bash$,apache:$1:/sbin/nologin,; print $_; }' /etc/passwd.tmp >/etc/passwd
else # SuSE
apachedaemon='apache2'
apacheuser='wwwrun'
fi
# Remove links made during the post install script
echo "Undoing $apachedaemon configuration for xCAT..."
/bin/rm -f /etc/$apachedaemon/conf.d/xcat.conf
/etc/init.d/$apachedaemon reload
/bin/rm -f %{prefix}/bin/grpattr
# Remove change we made to sudoers config. Todo: remove this when switch to xcat 2
if egrep -q "^$apacheuser ALL=\(ALL\) NOPASSWD:ALL" /etc/sudoers; then
echo "Undoing sudo configuration for $apacheuser..."
cp -f /etc/sudoers /etc/sudoers.tmp
egrep -v "^$apacheuser ALL=\(ALL\) NOPASSWD:ALL" /etc/sudoers.tmp > /etc/sudoers
rm -f /etc/sudoers.tmp
fi
fi