Blob Blame History Raw
%if 0%{?el4}
%define aprversion 0
%else
%define aprversion 1
%endif

Name:           gridsite
Version:        1.5.19

Release:        1%{?dist}.1
Summary:        Grid Security for the Web, Web platforms for Grids

Group:          System Environment/Daemons

#  - src/gsexec.c ASL 2.0
#  - src/gsexec.h ASL 2.0
#  - src/mod_gridsite.c BSD but includes ASL 2.0 based code.
#  - src/mod_ssl-private.h BSD but includes ASL 2.0 based code.
# All other files are BSD
License:        ASL 2.0 and BSD
URL:            http://www.gridsite.org
Source0:        http://www.gridsite.org/download/sources/gridsite-%{version}.src.tar.gz
Source1:        gridsite-httpd.conf
Source2:        gridsitehead.txt
Source3:        gridsitefoot.txt
Source4:        root-level.gacl
Source5:        gridsitelogo.png

Patch1:         cgi-bin-location.patch
# Includes are wrong.
#https://bugzilla.redhat.com/show_bug.cgi?id=612109
#https://savannah.cern.ch/bugs/index.php?69632
Patch2:         gridsite-include.patch

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

%if %{?fedora}%{!?fedora:0} >= 10 || %{?rhel}%{!?rhel:0} >= 6
BuildRequires:  libcurl-devel
%else
BuildRequires:  curl-devel
%endif

BuildRequires:  libxml2-devel 
BuildRequires:  httpd-devel
BuildRequires:  doxygen
BuildRequires:  openssl-devel

Requires:       httpd
Requires:       mod_ssl
Requires:       gridsite-libs = %{version}-%{release}

%description
GridSite was originally a web application developed for managing and formatting 
the content of the http://www.gridpp.ac.uk/ website. Over the past years it 
has grown into a set of extensions to the Apache web server and a toolkit for 
Grid credentials, GACL access control lists and HTTP(S) protocol operations. 

This package gridsite contains apache httpd modules for enabling 
mod_gridsite.

%package  libs
Group:    System Environment/Daemons
Summary:  Run time libraries for mod_gridsite and gridsite-clients

%description libs
GridSite was originally a web application developed for managing and formatting 
the content of the http://www.gridpp.ac.uk/ website. Over the past years it 
has grown into a set of extensions to the Apache web server and a toolkit for 
Grid credentials, GACL access control lists and HTTP(S) protocol operations. 

This package contains the runtime libraries.

%package  clients
Group:    System Environment/Daemons
Summary:  Clients to gridsite including htcp, htrm, htmv
Requires: gridsite-libs = %{version}-%{release}

%description  clients
GridSite was originally a web application developed for managing and formatting 
the content of the http://www.gridpp.ac.uk/ website. Over the past years it 
has grown into a set of extensions to the Apache web server and a toolkit for 
Grid credentials, GACL access control lists and HTTP(S) protocol operations. 

This package gridsite-clients, contains clients for using against gridsite, 
htcp, htrm, ...

%package  gsexec
Group:    System Environment/Daemons
Summary:  Setuid gsexec tools for gridsite
Requires: gridsite-libs = %{version}-%{release}

%description  gsexec
GridSite was originally a web application developed for managing and formatting 
the content of the http://www.gridpp.ac.uk/ website. Over the past years it 
has grown into a set of extensions to the Apache web server and a toolkit for 

This package gridsite-setuid, contains the setuid gsexec program.

%package  devel
Group:    System Environment/Daemons
Summary:  Developers tools for gridsite
Requires: gridsite-libs = %{version}-%{release}

%description  devel
GridSite was originally a web application developed for managing and formatting 
the content of the http://www.gridpp.ac.uk/ website. Over the past years it 
has grown into a set of extensions to the Apache web server and a toolkit for 

This package gridsite-devel, contains developer tools for using gridsite.

%package   doc
Group:     System Environment/Daemons
Summary:   Developers Documentation for gridsite
Requires:  gridsite-devel = %{version}-%{release}
%if %{?fedora}%{!?fedora:0} >= 10 || %{?rhel}%{!?rhel:0} >= 6
BuildArch: noarch
%endif

%description  doc
GridSite was originally a web application developed for managing and formatting 
the content of the http://www.gridpp.ac.uk/ website. Over the past years it 
has grown into a set of extensions to the Apache web server and a toolkit for 

This package gridsite-doc, contains developer documentation for gridsite.

%prep
%setup -q -n org.gridsite.core
# Copy in apache configuration.
cp -p %{SOURCE1} .
cp -p %{SOURCE2} .
cp -p %{SOURCE3} .
cp -p %{SOURCE4} .
cp -p %{SOURCE5} .

## Change installed path of cgi-bins.
%patch1 -p1
# Includes are wrong.
#https://bugzilla.redhat.com/show_bug.cgi?id=612109
#https://savannah.cern.ch/bugs/index.php?69632
%patch2 -p1

%build
(cd src && MYCFLAGS="%{optflags} -DLINUX=2 -D_REENTRANT -D_LARGEFILE64_SOURCE -I../interface -I%{_includedir}/httpd -I%{_includedir}/apr-%{aprversion} -fPIC " make )

%install
rm -rf $RPM_BUILD_ROOT
(cd src && make install prefix=$RPM_BUILD_ROOT%{_usr} libdir=%{_lib} )

# Remove static libs 
rm  $RPM_BUILD_ROOT/%{_libdir}/libgridsite.a
# Remove docs we don't want now but will move it in %doc later.
rm -rf $RPM_BUILD_ROOT/%{_defaultdocdir} 
# Remove the built against globus-openssl libs since
# we don't actually do that.
rm  $RPM_BUILD_ROOT/%{_libdir}/libgridsite_globus.*

# Set up a root area to serve files from.
mkdir -p $RPM_BUILD_ROOT%{_var}/lib/gridsite
install -p -m 0644 gridsitehead.txt $RPM_BUILD_ROOT%{_var}/lib/gridsite/gridsitehead.txt
install -p -m 0644 gridsitefoot.txt $RPM_BUILD_ROOT%{_var}/lib/gridsite/gridsitefoot.txt
install -p -m 0644 root-level.gacl  $RPM_BUILD_ROOT%{_var}/lib/gridsite/.gacl

mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/grid-security/dn-lists

mkdir -p $RPM_BUILD_ROOT%{_var}/cache/mod_gridsite
# Copy in apache configuration, we must name it zgridsite.conf
# so it is loaded after mod_ssl in ssl.conf.
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d
install -p -m 0644 gridsite-httpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/zgridsite.conf

# 
mkdir -p $RPM_BUILD_ROOT%{_var}/www/icons
install -p -m 0644 gridsitelogo.png $RPM_BUILD_ROOT%{_var}/www/icons


%clean
rm -rf $RPM_BUILD_ROOT

%post libs -p /sbin/ldconfig

%postun libs -p /sbin/ldconfig

%files 
%defattr(-,root,root,-)
%{_libdir}/httpd/modules/mod_gridsite.so
%dir %{_libexecdir}/gridsite
%dir %{_libexecdir}/gridsite/cgi-bin
%{_libexecdir}/gridsite/cgi-bin/gridsite-copy.cgi 
%{_libexecdir}/gridsite/cgi-bin/gridsite-storage.cgi 
%{_libexecdir}/gridsite/cgi-bin/real-gridsite-admin.cgi 
%{_var}/www/icons/gridsitelogo.png
%dir %attr(0755,apache,apache) %{_var}/lib/gridsite
%dir %attr(0755,root,root) %{_sysconfdir}/grid-security
%dir %attr(0755,apache,apache) %{_sysconfdir}/grid-security/dn-lists
%dir %attr(0755,apache,apache) %{_var}/cache/mod_gridsite

%{_mandir}/man8/mod_gridsite.8.*

%config(noreplace) %{_sysconfdir}/httpd/conf.d/zgridsite.conf
%config(noreplace) %attr(-,apache,apache) %{_var}/lib/gridsite/.gacl
%config(noreplace) %attr(-,apache,apache) %{_var}/lib/gridsite/gridsitehead.txt
%config(noreplace) %attr(-,apache,apache) %{_var}/lib/gridsite/gridsitefoot.txt

%doc doc/httpd-fileserver.conf doc/httpd-webserver.conf 
%doc doc/httpd-storage.conf
%doc CHANGES LICENSE

%files gsexec
%defattr(-,root,root,-)
%attr(4754,root,apache) %{_sbindir}/gsexec
%{_mandir}/man8/gsexec.8.*

%files libs
%defattr(-,root,root,-)
%{_libdir}/libgridsite.so.*
%doc LICENSE 

%files  clients
%defattr(-,root,root,-)
%attr(0755,root,root) %{_bindir}/findproxyfile
%attr(0755,root,root) %{_bindir}/htcp
%attr(0755,root,root) %{_bindir}/htfind
%attr(0755,root,root) %{_bindir}/htll
%attr(0755,root,root) %{_bindir}/htls
%attr(0755,root,root) %{_bindir}/htmkdir
%attr(0755,root,root) %{_bindir}/htmv
%attr(0755,root,root) %{_bindir}/htping
%attr(0755,root,root) %{_bindir}/htrm
%attr(0755,root,root) %{_bindir}/urlencode

%{_mandir}/man1/findproxyfile.1.gz
%{_mandir}/man1/htcp.1.gz
%{_mandir}/man1/htfind.1.gz
%{_mandir}/man1/htll.1.gz
%{_mandir}/man1/htls.1.gz
%{_mandir}/man1/htmkdir.1.gz
%{_mandir}/man1/htmv.1.gz
%{_mandir}/man1/htping.1.gz
%{_mandir}/man1/htrm.1.gz
%{_mandir}/man1/urlencode.1.gz

%files devel
%defattr(-,root,root,-)
%{_includedir}/gridsite-gacl.h
%{_includedir}/gridsite.h
%{_libdir}/libgridsite.so

%files doc
%defattr(-,root,root,-)
%doc src/doxygen

%changelog
* Wed Sep 29 2010 jkeating - 1.5.19-1.1
- Rebuilt for gcc bug 634757

* Tue Sep 21 2010 Steve Traylen <steve.traylen@cern.ch> - 1.5.19-1
- Upstream to 1.5.19.
- Add gridsite-include.patch 
  https://savannah.cern.ch/bugs/index.php?69632 
  https://bugzilla.redhat.com/show_bug.cgi?id=612109
- Alter default .gacl
  https://bugzilla.redhat.com/show_bug.cgi?id=612187
- Change setuid binary from 4510 to 4754

* Thu May 20 2010 Steve Traylen <steve.traylen@cern.ch> - 1.5.18-4
- For .el4 use /usr/include/apr-0 rather than apr-1

* Wed May 19 2010 Steve Traylen <steve.traylen@cern.ch> - 1.5.18-3
- Don't use _sharedstatedir macro for .el4,5 support.

* Wed May 19 2010 Steve Traylen <steve.traylen@cern.ch> - 1.5.18-2
- Split docs of to a seperate package.
- License corrected to ASL 2.0 and BSD

* Mon May 17 2010 Steve Traylen <steve.traylen@cern.ch> - 1.5.18-1
- Initial package.