Project

General

Profile

Bug #2306 » rudder-webapp-fix-apache-head.patch

Matthieu CERDA, 2012-02-23 17:35

View differences:

SPECS/rudder-webapp.spec 2012-02-23 17:31:52.315582899 +0100
%define maven_settings settings-external.xml
%if 0%{?sles_version}
%define apache apache2
%endif
%if 0%{?el6}
%define apache httpd
%endif
#=================================================
# Header
#=================================================
......
mkdir -p %{buildroot}%{rudderdir}/share/upgrade-tools/
mkdir -p %{buildroot}%{ruddervardir}/inventories/incoming
mkdir -p %{buildroot}%{ruddervardir}/inventories/received
mkdir -p %{buildroot}%{rudderlogdir}/apache2/
mkdir -p %{buildroot}/etc/apache2/vhosts.d/
mkdir -p %{buildroot}%{rudderlogdir}/%{apache}/
mkdir -p %{buildroot}/etc/%{apache}/vhosts.d/
cp %{SOURCE1} %{buildroot}%{rudderdir}/etc/
cp %{_sourcedir}/rudder-sources/rudder/rudder-core/src/main/resources/ldap/bootstrap.ldif %{buildroot}%{rudderdir}/share/
......
cp -rf %{_sourcedir}/rudder-sources/rudder/rudder-web/src/main/resources/load-page %{buildroot}%{rudderdir}/share/
cp %{_sourcedir}/rudder-sources/rudder/rudder-core/src/test/resources/script/cfe-red-button.sh %{buildroot}%{rudderdir}/bin/
cp %{_sourcedir}/rudder-sources/rudder/rudder-core/src/main/resources/reportsInfo.xml %{buildroot}%{rudderdir}/etc/
cp %{_sourcedir}/rudder-sources/rudder/rudder-web/src/main/resources/apache2-default.conf %{buildroot}/etc/apache2/vhosts.d/
cp %{_sourcedir}/rudder-sources/rudder/rudder-web/src/main/resources/apache2-default.conf %{buildroot}/etc/%{apache}/vhosts.d/
cp %{SOURCE2} %{buildroot}%{rudderdir}/jetty7/contexts/
# Install upgrade tools
......
#=================================================
echo "Setting apache2 as a boot service"
/sbin/chkconfig --add apache2
/sbin/chkconfig --add %{apache}
echo "Reloading syslogd ..."
/etc/init.d/syslog reload
/etc/init.d/apache2 stop
/etc/init.d/%{apache} stop
# a2dissite default
# Do this ONLY at first install
if [ $1 -eq 1 ]
then
echo 'APACHE_MODULES="${APACHE_MODULES} rewrite dav dav_fs proxy proxy_http"' >> /etc/sysconfig/apache2
echo 'DAVLockDB /tmp/davlock.db' >> /etc/apache2/conf.d/dav_mod.conf
echo 'APACHE_MODULES="${APACHE_MODULES} rewrite dav dav_fs proxy proxy_http"' >> /etc/sysconfig/%{apache}
echo 'DAVLockDB /tmp/davlock.db' >> /etc/%{apache}/conf.d/dav_mod.conf
mkdir -p /var/rudder/configuration-repository
mkdir -p /var/rudder/configuration-repository/shared-files
......
chmod 755 -R %{rudderdir}/share/tools
chmod 655 -R %{rudderdir}/share/load-page
htpasswd2 -bc %{rudderdir}/etc/htpasswd-webdav rudder rudder
/etc/init.d/apache2 start
/etc/init.d/%{apache} start
# Run any upgrades
# Note this must happen *before* creating the technique store, as it was moved in version 2.3.2
......
%{rudderdir}/share
%{ruddervardir}/inventories/incoming
%{ruddervardir}/inventories/received
%{rudderlogdir}/apache2/
/etc/apache2/vhosts.d/
%{rudderlogdir}/%{apache}/
/etc/%{apache}/vhosts.d/
#=================================================
(2-2/2)