SPEC file causing issues when trying to rebuild shibboleth SRPMS

Description

I needed to rebuild the shibboleth sp so that it would work on a nonstandard installation of RHEL4 with Apache 2.2. When doing a rebuild of the SRPMS for the shibboleth sp, I got the following error:

RPM build errors:
File not found: /var/tmp/shibboleth-2.1-root/etc/httpd/conf.d/shib.conf

To get around this issue I extracted the files from the SRPM package and then modified the spec file to not worry about creating the shib.conf file. After I did this, everything worked great. I don't know if there is a bug in the spec file or not. I also thought it might be nice to have a option to skip over this step of the build process. I am including a diff of my spec file with the original so you can see what I did to remove the creation of the shib.conf file.

< Source0: http://shibboleth.internet2.edu/downloads/%{name}-%{version}.tar.gz

> Source0: %{name}-%{version}.tar.gz
76,107d75
< # Plug the SP into Apache on a recognized system.
< APACHE_CONFIG="no"
< if [ -f $RPM_BUILD_ROOT/%{_libdir}/%{name}/mod_shib_13.so ] ; then
< APACHE_CONFIG="apache.config"
< fi
< if [ -f $RPM_BUILD_ROOT/%{_libdir}/%{name}/mod_shib_20.so ] ; then
< APACHE_CONFIG="apache2.config"
< fi
< if [ -f $RPM_BUILD_ROOT/%{_libdir}/%{name}/mod_shib_22.so ] ; then
< APACHE_CONFIG="apache22.config"
< fi
< 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
< %if "%{_vendor}" == "suse"
< %{__sed} "s/\/usr\/doc\/%{name}/\/usr\/share\/doc\/packages\/%{name}/g" \ < $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/$APACHE_CONFIG \ < > $RPM_BUILD_ROOT$APACHE_CONFD/shib.conf
< %else
< %{__sed} "s/\/usr\/doc\/%{name}/\/usr\/share\/doc\/%{name}-2.1/g" \ < $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/$APACHE_CONFIG \ < > $RPM_BUILD_ROOT$APACHE_CONFD/shib.conf
< %endif
< fi
< fi
165,169d132
< %if "%{_vendor}" == "suse"
< %config %{_sysconfdir}/apache2/conf.d/shib.conf
< %else
< %config %{_sysconfdir}/httpd/conf.d/shib.conf
< %endif

Environment

RHEL 4 with Apache 2.2

Activity

Scott Cantor June 23, 2009 at 12:47 PM

Closing after releases.

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Created February 20, 2009 at 11:38 AM
Updated June 23, 2009 at 12:47 PM
Resolved May 25, 2009 at 9:47 PM