From 72abb182bb493e1c7829425071514c48430edbaf Mon Sep 17 00:00:00 2001 From: ligc Date: Thu, 6 Mar 2014 15:52:23 -0600 Subject: [PATCH] fix for bug 4010: remove xcatws.cgi from PCM build --- xCAT-server/xCAT-server.spec | 14 ++++++++++++++ 1 file changed, 14 insertions(+) mode change 100644 => 100755 xCAT-server/xCAT-server.spec diff --git a/xCAT-server/xCAT-server.spec b/xCAT-server/xCAT-server.spec old mode 100644 new mode 100755 index eb4b820a1..1a5028ab2 --- a/xCAT-server/xCAT-server.spec +++ b/xCAT-server/xCAT-server.spec @@ -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