[gridsite] Add a gridsite-compat-1.5 package on EPEL4 & EPEL5.

stevetraylen stevetraylen at fedoraproject.org
Thu Jun 30 19:54:24 UTC 2011


commit ba22ea060870b21a8b540996ca6afd8abd2ba43d
Author: Steve Traylen <steve.traylen at cern.ch>
Date:   Thu Jun 30 21:50:45 2011 +0200

    Add a gridsite-compat-1.5 package on EPEL4 & EPEL5.

 cgi-bin-location-1.5.20.patch |   33 +++++++++++++++
 gridsite-include-1.5.20.patch |   60 +++++++++++++++++++++++++++
 gridsite.spec                 |   89 +++++++++++++++++++++++++++++++++++++++--
 sources                       |    1 +
 4 files changed, 179 insertions(+), 4 deletions(-)
---
diff --git a/cgi-bin-location-1.5.20.patch b/cgi-bin-location-1.5.20.patch
new file mode 100644
index 0000000..341789d
--- /dev/null
+++ b/cgi-bin-location-1.5.20.patch
@@ -0,0 +1,33 @@
+diff -uNr org.gridsite.core.ORIG/src/Makefile org.gridsite.core/src/Makefile
+--- org.gridsite.core.ORIG/src/Makefile	2009-07-23 20:59:20.863631673 +0200
++++ org.gridsite.core/src/Makefile	2009-07-23 21:14:46.450624936 +0200
+@@ -392,15 +392,16 @@
+                  $(prefix)/share/man/man1 \
+                  $(prefix)/share/man/man8 \
+                  $(prefix)/$(libdir)/httpd/modules \
+-                 $(prefix)/share/doc/gridsite-$(MINOR_VERSION)
++                 $(prefix)/share/doc/gridsite-$(MINOR_VERSION) \
++                 $(prefix)/libexec/gridsite/cgi-bin
+ 	echo '#define' GRST_VERSION $(DEFVERSION) > $(prefix)/include/gridsite.h
+ 	cat ../interface/gridsite.h >>$(prefix)/include/gridsite.h
+ 	cp -f ../interface/gridsite-gacl.h $(prefix)/include
+ 	cp -f urlencode $(prefix)/bin
+ 	cp -f findproxyfile $(prefix)/bin
+-	cp -f real-gridsite-admin.cgi $(prefix)/sbin
+-	cp -f gridsite-copy.cgi $(prefix)/sbin
+-	cp -f gridsite-storage.cgi $(prefix)/sbin
++	cp -f real-gridsite-admin.cgi $(prefix)/libexec/gridsite/cgi-bin
++	cp -f gridsite-copy.cgi $(prefix)/libexec/gridsite/cgi-bin
++	cp -f gridsite-storage.cgi $(prefix)/libexec/gridsite/cgi-bin
+ 	cp -f ../CHANGES ../README ../INSTALL ../LICENSE ../VERSION \
+                $(prefix)/share/doc/gridsite-$(MINOR_VERSION)
+ 	cp -f ../doc/index.html ../doc/*.conf ../doc/*.sh ../doc/*.spec \
+@@ -489,7 +490,7 @@
+ 	ln -sf htproxyput $(prefix)/bin/htproxyunixtime
+ 	ln -sf htproxyput $(prefix)/bin/htproxyrenew
+ 	ln -sf htproxyput $(prefix)/bin/htproxyinfo
+-	cp -f gridsite-delegation.cgi $(prefix)/sbin
++	cp -f gridsite-delegation.cgi $(prefix)/libexec/gridsite/cgi-bin
+ 	   
+ #
+ # Distributions
diff --git a/gridsite-include-1.5.20.patch b/gridsite-include-1.5.20.patch
new file mode 100644
index 0000000..1c7cc98
--- /dev/null
+++ b/gridsite-include-1.5.20.patch
@@ -0,0 +1,60 @@
+diff -uNr org.gridsite.core.ORIG/interface/gridsite-gacl.h org.gridsite.core/interface/gridsite-gacl.h
+--- org.gridsite.core.ORIG/interface/gridsite-gacl.h	2010-09-22 01:00:09.976742554 +0200
++++ org.gridsite.core/interface/gridsite-gacl.h	2010-09-22 01:01:04.304742031 +0200
+@@ -35,6 +35,9 @@
+ 
+ #ifndef HEADER_GACL_H
+ #define HEADER_GACL_H
++
++#ifdef __cplusplus
++extern "C" {
+ #endif
+ 
+ #ifndef GACL_LIB_VERSION
+@@ -186,3 +189,9 @@
+ 
+ GACLentry *GRSTgaclEntryParse(xmlNodePtr cur);
+ /*  special function for legacy EDG LB service */
++
++#ifdef __cplusplus
++} // extern "C"
++#endif
++
++#endif // HEADER_GACL_H
+diff -uNr org.gridsite.core.ORIG/interface/gridsite.h org.gridsite.core/interface/gridsite.h
+--- org.gridsite.core.ORIG/interface/gridsite.h	2010-09-22 01:00:09.976742554 +0200
++++ org.gridsite.core/interface/gridsite.h	2010-09-22 01:01:04.331492564 +0200
+@@ -35,6 +35,9 @@
+ 
+ #ifndef GRST_VERSION
+ #define GRST_VERSION 010500
++
++#ifdef __cplusplus
++extern "C" {
+ #endif
+ 
+ #ifndef HEADER_SSL_H
+@@ -419,3 +422,9 @@
+ int    GRSThtcpTSTrequestMake(char **, int *, unsigned int, char *, char *, char *);
+ int    GRSThtcpTSTresponseMake(char **, int *, unsigned int, char *, char *, char *);
+ int    GRSThtcpMessageParse(GRSThtcpMessage *, char *, int);
++
++#ifdef __cplusplus
++} // extern "C"
++#endif
++
++#endif // GRST_VERSION
+diff -uNr org.gridsite.core.ORIG/src/Makefile org.gridsite.core/src/Makefile
+--- org.gridsite.core.ORIG/src/Makefile	2010-09-22 01:00:09.988740935 +0200
++++ org.gridsite.core/src/Makefile	2010-09-22 01:04:20.963490070 +0200
+@@ -350,8 +350,8 @@
+                  $(prefix)/$(libdir)/httpd/modules \
+                  $(prefix)/share/doc/gridsite-$(MINOR_VERSION) \
+                  $(prefix)/libexec/gridsite/cgi-bin
+-	echo '#define' GRST_VERSION $(DEFVERSION) > $(prefix)/include/gridsite.h
+-	cat ../interface/gridsite.h >>$(prefix)/include/gridsite.h
++	sed 's/^\(#define GRST_VERSION\).*$$/\1 $(DEFVERSION)/' \
++	      ../interface/gridsite.h > $(prefix)/include/gridsite.h
+ 	cp -f ../interface/gridsite-gacl.h $(prefix)/include
+ 	cp -f urlencode $(prefix)/bin
+ 	cp -f findproxyfile $(prefix)/bin
diff --git a/gridsite.spec b/gridsite.spec
index 89f22ec..ca894b5 100644
--- a/gridsite.spec
+++ b/gridsite.spec
@@ -4,10 +4,17 @@
 %define aprversion 1
 %endif
 
+
+%global vercompat 1.5.20
+%if 0%{?el4}%{?el5} 
+%global compat 1
+%endif
+
+
 Name:           gridsite
 Version:        1.7.15
 
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Grid Security for the Web, Web platforms for Grids
 
 Group:          System Environment/Daemons
@@ -26,7 +33,16 @@ Source3:        gridsitefoot.txt
 Source4:        root-level.gacl
 Source5:        gridsitelogo.png
 
+Source10:       http://www.gridsite.org/download/sources/gridsite-%{vercompat}.src.tar.gz
+
+#Change location of cgi-scripts.
 Patch1:         cgi-bin-location-1.7.15.patch
+#Change location of cgi-scripts.
+Patch2:         cgi-bin-location-1.5.20.patch
+# Includes are wrong.
+#https://bugzilla.redhat.com/show_bug.cgi?id=612109
+#https://savannah.cern.ch/bugs/index.php?69632
+Patch3:         gridsite-include-1.5.20.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -66,6 +82,22 @@ Grid credentials, GACL access control lists and HTTP(S) protocol operations.
 
 This package contains the runtime libraries.
 
+%if 0%{?compat}
+%package compat
+Group:    System Environment/Daemons
+Summary:  Run time libraries for mod_gridsite and gridsite-clients
+Version:  %{vercompat}
+Release:  1
+
+%description compat
+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.
+%endif
+
 %package  clients
 Group:    System Environment/Daemons
 Summary:  Clients to gridsite including htcp, htrm, htmv
@@ -120,7 +152,16 @@ 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
+%if 0%{?compat}
+%setup -q -n org.gridsite.core -a 10
+pushd org.gridsite.core
+%patch2 -p1
+%patch3 -p1
+popd
+
+%else
 %setup -q -n org.gridsite.core
+%endif
 # Copy in apache configuration.
 cp -p %{SOURCE1} .
 cp -p %{SOURCE2} .
@@ -132,10 +173,34 @@ cp -p %{SOURCE5} .
 %patch1 -p1
 
 %build
+%if 0%{?compat}
+pushd org.gridsite.core
+(cd src && MYCFLAGS="%{optflags} -DLINUX=2 -D_REENTRANT -D_LARGEFILE64_SOURCE -I../interface -I%{_includedir}/httpd -I%{_includedir}/apr-%{aprversion} -fPIC " make )
+popd
+%endif
 (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
+%if 0%{?compat}
+pushd org.gridsite.core
+(cd src && make install prefix=$RPM_BUILD_ROOT%{_usr} libdir=%{_lib} )
+rm  $RPM_BUILD_ROOT/%{_libdir}/libgridsite.a
+# Remove the built against globus-openssl libs since
+# we don't actually do that.
+rm  $RPM_BUILD_ROOT/%{_libdir}/libgridsite_globus.*
+# Remove all most everything from -compat installation package
+# since we don't want it.
+rm $RPM_BUILD_ROOT%{_libdir}/libgridsite.so
+rm $RPM_BUILD_ROOT%{_libdir}/libgridsite.so.1
+rm -rf $RPM_BUILD_ROOT%{_includedir}
+rm -rf $RPM_BUILD_ROOT%{_datadir}
+rm -rf $RPM_BUILD_ROOT%{_libexecdir}
+rm -rf $RPM_BUILD_ROOT%{_bindir}
+rm -rf $RPM_BUILD_ROOT%{_sbindir}
+rm -rf $RPM_BUILD_ROOT%{_libdir}/httpd
+popd
+%endif
 (cd src && make install prefix=$RPM_BUILD_ROOT%{_usr} libdir=%{_lib} )
 
 # Remove static libs 
@@ -179,6 +244,12 @@ rm -rf $RPM_BUILD_ROOT
 
 %postun libs -p /sbin/ldconfig
 
+%if 0%{?compat}
+%post compat -p /sbin/ldconfig
+
+%postun compat -p /sbin/ldconfig
+%endif
+
 %files 
 %defattr(-,root,root,-)
 %{_libdir}/httpd/modules/mod_gridsite.so
@@ -204,8 +275,6 @@ rm -rf $RPM_BUILD_ROOT
 %doc doc/httpd-fileserver.conf doc/httpd-webserver.conf 
 %doc doc/httpd-storage.conf
 
-
-
 %doc CHANGES LICENSE
 
 %files gsexec
@@ -215,9 +284,18 @@ rm -rf $RPM_BUILD_ROOT
 
 %files libs
 %defattr(-,root,root,-)
-%{_libdir}/libgridsite.so.*
+%{_libdir}/libgridsite.so.1
+%{_libdir}/libgridsite.so.1.7*
 %doc LICENSE 
 
+%if 0%{?compat}
+%files compat
+%defattr(-,root,root,-)
+%{_libdir}/libgridsite.so.1.5*
+%doc LICENSE
+%endif
+
+
 %files  clients
 %defattr(-,root,root,-)
 %attr(0755,root,root) %{_bindir}/findproxyfile
@@ -253,6 +331,9 @@ rm -rf $RPM_BUILD_ROOT
 %doc src/doxygen
 
 %changelog
+* Thu Jun 30 2011 Steve Traylen <steve.traylen at cern.ch>  - 1.7.15-2
+- Add a gridsite-compat-1.5 package on EPEL4 & EPEL5.
+
 * Thu Jun 30 2011 Steve Traylen <steve.traylen at cern.ch>  - 1.7.15-1
 - Upstream 1.7.15, drop gridsite-include-1.7.9.patch since upstream,
   redo cgi-location patch.
diff --git a/sources b/sources
index f55f5a0..4242631 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
 34432f9771f5c1b3828658dc985c8188  gridsite-1.7.15.src.tar.gz
+305caf79718b44f99e59c1e5c8fd3f67  gridsite-1.5.20.src.tar.gz


More information about the scm-commits mailing list