[cpp-sp COMMIT] /branches/REL_2/shibboleth.spec.in

noreply at shibboleth.net noreply at shibboleth.net
Thu Aug 25 01:23:19 BST 2011


Author: scantor
Date: Thu Aug 25 01:23:19 2011
New Revision: 3508

URL: http://svn.shibboleth.net/view/cpp-sp?rev=3508&view=rev
Log:
Add post script for shib.conf cleanup.

Modified:
    branches/REL_2/shibboleth.spec.in

Modified: branches/REL_2/shibboleth.spec.in
URL: http://svn.shibboleth.net/view/cpp-sp/branches/REL_2/shibboleth.spec.in?rev=3508&r1=3507&r2=3508&view=diff
==============================================================================
--- branches/REL_2/shibboleth.spec.in (original)
+++ branches/REL_2/shibboleth.spec.in Thu Aug 25 01:23:19 2011
@@ -11,19 +11,19 @@
 Requires:	openssl
 PreReq:		xmltooling-schemas, opensaml-schemas
 %if 0%{?suse_version} > 1030 && 0%{?suse_version} < 1130
-PreReq:         %{insserv_prereq}
-BuildRequires:  libXerces-c-devel >= 2.8.0
+PreReq:		%{insserv_prereq}
+BuildRequires:	libXerces-c-devel >= 2.8.0
 %else
-BuildRequires:  libxerces-c-devel >= 2.8.0
-%endif
-BuildRequires:  libxml-security-c-devel >= 1.4.0
-BuildRequires:  libxmltooling-devel >= 1.5
-BuildRequires:  libsaml-devel >= 2.5
+BuildRequires:	libxerces-c-devel >= 2.8.0
+%endif
+BuildRequires:	libxml-security-c-devel >= 1.4.0
+BuildRequires:	libxmltooling-devel >= 1.5
+BuildRequires:	libsaml-devel >= 2.5
 %{?_with_log4cpp:BuildRequires: liblog4cpp-devel >= 1.0}
 %{!?_with_log4cpp:BuildRequires: liblog4shib-devel}
 %if 0%{?rhel} >= 6 || 0%{?centos_version} >= 600
-Requires: libcurl-openssl >= 7.21.7
-BuildRequires: chrpath
+Requires:		libcurl-openssl >= 7.21.7
+BuildRequires:	chrpath
 %endif
 BuildRequires:  gcc-c++, zlib-devel
 %{!?_without_doxygen:BuildRequires: doxygen}
@@ -48,11 +48,11 @@
 that supports multiple protocols, federated identity, and the extensible
 exchange of rich attributes subject to privacy controls.
 
-This package contains the Shibboleth Service Provider runtime libraries
-and Apache module(s).
+This package contains the Shibboleth Service Provider runtime libraries,
+daemon, default plugins, and Apache module(s).
 
 %package devel
-Summary:	Shibboleth development Headers
+Summary:	Shibboleth Development Headers
 Group:		Development/Libraries/C and C++
 Requires:	%{name} = %{version}-%{release}
 %if 0%{?suse_version} > 1030 && 0%{?suse_version} < 1130
@@ -101,28 +101,28 @@
 touch rpm.filelist
 APACHE_CONFIG="no"
 if [ -f $RPM_BUILD_ROOT%{_libdir}/%{name}/mod_shib_13.so ] ; then
-    APACHE_CONFIG="apache.config"
+	APACHE_CONFIG="apache.config"
 fi
 if [ -f $RPM_BUILD_ROOT%{_libdir}/%{name}/mod_shib_20.so ] ; then
-    APACHE_CONFIG="apache2.config"
+	APACHE_CONFIG="apache2.config"
 fi
 if [ -f $RPM_BUILD_ROOT%{_libdir}/%{name}/mod_shib_22.so ] ; then
-    APACHE_CONFIG="apache22.config"
+	APACHE_CONFIG="apache22.config"
 fi
 %{?_without_builtinapache:APACHE_CONFIG="no"}
 if [ "$APACHE_CONFIG" != "no" ] ; then
-    APACHE_CONFD="no"
-    if [ -d %{_sysconfdir}/httpd/conf.d ] ; then
-            APACHE_CONFD="%{_sysconfdir}/httpd/conf.d"
-    fi
-    if [ -d %{_sysconfdir}/apache2/conf.d ] ; then
-            APACHE_CONFD="%{_sysconfdir}/apache2/conf.d"
-    fi
-    if [ "$APACHE_CONFD" != "no" ] ; then
-        %{__mkdir} -p $RPM_BUILD_ROOT$APACHE_CONFD
-        %{__cp} -p $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/$APACHE_CONFIG $RPM_BUILD_ROOT$APACHE_CONFD/shib.conf 
-        echo "%config(noreplace) $APACHE_CONFD/shib.conf" > rpm.filelist
-    fi
+	APACHE_CONFD="no"
+	if [ -d %{_sysconfdir}/httpd/conf.d ] ; then
+		APACHE_CONFD="%{_sysconfdir}/httpd/conf.d"
+	fi
+	if [ -d %{_sysconfdir}/apache2/conf.d ] ; then
+		APACHE_CONFD="%{_sysconfdir}/apache2/conf.d"
+	fi
+	if [ "$APACHE_CONFD" != "no" ] ; then
+		%{__mkdir} -p $RPM_BUILD_ROOT$APACHE_CONFD
+		%{__cp} -p $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/$APACHE_CONFIG $RPM_BUILD_ROOT$APACHE_CONFD/shib.conf 
+		echo "%config(noreplace) $APACHE_CONFD/shib.conf" > rpm.filelist
+	fi
 fi
 
 %if "%{_vendor}" == "redhat" || "%{_vendor}" == "suse"
@@ -150,20 +150,40 @@
 cd %{_sysconfdir}/%{name}
 sh ./keygen.sh -b
 
+if [ "$1" -gt "1" ] ; then
+	# On systems with shib.conf installed, clean up old Alias commands
+	# by pointing them at new version-independent /usr/share/share tree.
+	# Any Aliases we didn't create we assume are custom files.
+	# This is to accomodate making shib.conf a noreplace config file.
+	APACHE_CONF="no"
+	if [ -f %{_sysconfdir}/httpd/conf.d/shib.conf ] ; then
+		APACHE_CONF="%{_sysconfdir}/httpd/conf.d/shib.conf"
+	fi
+	if [ -f %{_sysconfdir}/apache2/conf.d/shib.conf ] ; then
+		APACHE_CONF="%{_sysconfdir}/apache2/conf.d/shib.conf"
+	fi
+	if [ "$APACHE_CONF" != "no" ] ; then
+		%{__sed} -i "s/\/usr\/share\/doc\/shibboleth\(\-\(.\)\{1,\}\)\{0,1\}\/main\.css/\/usr\/share\/shibboleth\/main.css/g" \
+			$APACHE_CONF
+		%{__sed} -i "s/\/usr\/share\/doc\/shibboleth\(\-\(.\)\{1,\}\)\{0,1\}\/logo\.jpg/\/usr\/share\/shibboleth\/logo.jpg/g" \
+			$APACHE_CONF
+	fi
+fi
+
 %if "%{_vendor}" == "redhat"
 	# This adds the proper /etc/rc*.d links for the script
 	/sbin/chkconfig --add shibd
 	# On upgrade, restart components if they're already running.
-    if [ "$1" -gt "1" ] ; then

[... 79 lines stripped ...]


More information about the commits mailing list