fix for bug 4010: remove xcatws.cgi from PCM build

This commit is contained in:
ligc 2014-03-06 15:52:23 -06:00
parent c8ebe8a9df
commit 72abb182bb

14
xCAT-server/xCAT-server.spec Normal file → Executable file
View File

@ -26,6 +26,9 @@ Obsoletes: atftp-xcat
%define fsm %(if [ "$fsm" = "1" ];then echo 1; else echo 0; fi)
%define pcm %(if [ "$pcm" = "1" ];then echo 1; else echo 0; fi)
%define notpcm %(if [ "$pcm" = "1" ];then echo 0; else echo 1; fi)
%if %fsm
# nothing needed here
%else
@ -309,14 +312,25 @@ mkdir -p $RPM_BUILD_ROOT/%{prefix}/ws
mkdir -p $RPM_BUILD_ROOT/etc/apache2/conf.d
mkdir -p $RPM_BUILD_ROOT/etc/httpd/conf.d
cp xCAT-wsapi/* $RPM_BUILD_ROOT/%{prefix}/ws
# PCM does not need xcatws.cgi
# xcatws.cgi causes xCAT-server requires perl-JSON, which is not shipped with PCM
%if %pcm
rm -f $RPM_BUILD_ROOT/%{prefix}/ws/xcatws.cgi
%endif
%if %fsm
%else
echo "ScriptAlias /xcatrhevh %{prefix}/ws/xcatrhevh.cgi" > $RPM_BUILD_ROOT/etc/apache2/conf.d/xcat-ws.conf
%if %notpcm
echo "ScriptAlias /xcatws %{prefix}/ws/xcatws.cgi" >> $RPM_BUILD_ROOT/etc/apache2/conf.d/xcat-ws.conf
%endif
cat $RPM_BUILD_ROOT/%{prefix}/ws/xcat-ws.conf.apache2 >> $RPM_BUILD_ROOT/etc/apache2/conf.d/xcat-ws.conf
echo "ScriptAlias /xcatrhevh %{prefix}/ws/xcatrhevh.cgi" > $RPM_BUILD_ROOT/etc/httpd/conf.d/xcat-ws.conf
%if %notpcm
echo "ScriptAlias /xcatws %{prefix}/ws/xcatws.cgi" >> $RPM_BUILD_ROOT/etc/httpd/conf.d/xcat-ws.conf
%endif
cat $RPM_BUILD_ROOT/%{prefix}/ws/xcat-ws.conf.httpd >> $RPM_BUILD_ROOT/etc/httpd/conf.d/xcat-ws.conf
%endif
rm -f $RPM_BUILD_ROOT/%{prefix}/ws/xcat-ws.conf.apache2