[olfs] Initial import

Orion Poplawski orion at fedoraproject.org
Tue Apr 23 19:45:33 UTC 2013


commit 6135c762417d4e872df80264db5de98069de95b3
Author: Orion Poplawski <orion at nwra.com>
Date:   Tue Apr 23 13:45:31 2013 -0600

    Initial import

 .gitignore          |    1 +
 context.xml         |    2 +
 olfs-servlet3.patch |   27 +++++++++
 olfs.spec           |  157 +++++++++++++++++++++++++++++++++++++++++++++++++++
 sources             |    1 +
 5 files changed, 188 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..180a32c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/olfs-1.9.5-src.tgz
diff --git a/context.xml b/context.xml
new file mode 100644
index 0000000..05e660f
--- /dev/null
+++ b/context.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Context allowLinking="true" />
diff --git a/olfs-servlet3.patch b/olfs-servlet3.patch
new file mode 100644
index 0000000..f90cacc
--- /dev/null
+++ b/olfs-servlet3.patch
@@ -0,0 +1,27 @@
+diff -up olfs-1.9.5-src/src/opendap/coreServlet/StaticContentServlet.java.servlet3 olfs-1.9.5-src/src/opendap/coreServlet/StaticContentServlet.java
+--- olfs-1.9.5-src/src/opendap/coreServlet/StaticContentServlet.java.servlet3	2013-04-23 11:18:50.946574524 -0600
++++ olfs-1.9.5-src/src/opendap/coreServlet/StaticContentServlet.java	2013-04-23 11:21:43.803914158 -0600
+@@ -25,8 +25,8 @@ package opendap.coreServlet;
+ 
+ 
+ import javax.servlet.http.HttpServletRequest;
++import javax.servlet.RequestDispatcher;
+ 
+-import org.apache.catalina.Globals;
+ import org.slf4j.Logger;
+ 
+ /**
+@@ -48,10 +48,10 @@ public class StaticContentServlet extend
+      */
+     protected String getRelativePath(HttpServletRequest request) {
+         // Are we being processed by a RequestDispatcher.include()?
+-        if (request.getAttribute(Globals.INCLUDE_REQUEST_URI_ATTR) != null) {
+-            String result = (String) request.getAttribute(Globals.INCLUDE_PATH_INFO_ATTR);
++        if (request.getAttribute(RequestDispatcher.INCLUDE_REQUEST_URI) != null) {
++            String result = (String) request.getAttribute(RequestDispatcher.INCLUDE_PATH_INFO);
+             if (result == null) {
+-                result = (String) request.getAttribute(Globals.INCLUDE_SERVLET_PATH_ATTR);
++                result = (String) request.getAttribute(RequestDispatcher.INCLUDE_SERVLET_PATH);
+             }
+             if (result == null || result.equals("")) result = "/";
+             log.debug("StaticContentServlet returning " + result);
diff --git a/olfs.spec b/olfs.spec
new file mode 100644
index 0000000..9f88ef1
--- /dev/null
+++ b/olfs.spec
@@ -0,0 +1,157 @@
+Name:           olfs
+Version:        1.9.5
+Release:        2%{?dist}
+Summary:        OPeNDAP Lightweight Frontend Servlet - client interface for Hyrax
+
+Group:          System Environment/Daemons
+License:        LGPLv2
+URL:            http://opendap.org/download/hyrax?q=olfs
+Source0:        http://www.opendap.org/pub/olfs/olfs-%{version}-src.tgz
+Source1:        context.xml
+# Patch to update to servlet3 api
+Patch0:         olfs-servlet3.patch
+BuildArch:      noarch
+
+BuildRequires:  jpackage-utils
+BuildRequires:  java-devel
+BuildRequires:  ant-junit
+BuildRequires:  commons-codec
+BuildRequires:  commons-httpclient
+BuildRequires:  apache-commons-cli
+BuildRequires:  apache-commons-lang
+BuildRequires:  apache-commons-logging
+BuildRequires:  jdom
+BuildRequires:  junit4
+BuildRequires:  log4j
+BuildRequires:  logback
+BuildRequires:  saxon
+BuildRequires:  slf4j
+BuildRequires:  tomcat-lib
+BuildRequires:  xalan-j2
+
+Requires:       jpackage-utils
+Requires:       java
+Requires:       tomcat
+Requires:       commons-codec
+Requires:       commons-httpclient
+Requires:       apache-commons-cli
+Requires:       apache-commons-lang
+Requires:       apache-commons-logging
+Requires:       jdom
+Requires:       junit4
+Requires:       log4j
+Requires:       logback
+Requires:       saxon
+Requires:       slf4j
+Requires:       xalan-j2
+
+
+%description
+The OPeNDAP Lightweight Frontend Servlet (OLFS) provides the public-
+accessible client interface for Hyrax.  The OLFS communicates with the Back
+End Server (BES) to provide data and catalog services to clients.  The OLFS
+implements the DAP2 protocol and supports some of the new DAP4 features.  We
+hope that other groups will develop new front end modules that will implement
+other protocols.
+
+
+%package javadoc
+Summary:        Javadocs for %{name}
+Group:          Documentation
+Requires:       %{name} = %{version}-%{release}
+Requires:       jpackage-utils
+
+%description javadoc
+This package contains the API documentation for %{name}.
+
+
+%prep
+%setup -q -n %{name}-%{version}-src
+%patch0 -p1 -b .servlet3
+find \( -name '*.class' -o -name '*.jar' \) -delete
+# Fix FSF license
+find -type f | xargs sed -i -e 's/[5]9 Temple Place,/51 Franklin Street,/' \
+  -e 's/[S]uite 330,/Fifth Floor,/' -e 's/[0]2111-1307/02110-1301/'
+
+
+%build
+export CLASSPATH=`build-classpath commons-cli commons-codec commons-httpclient \
+  commons-lang commons-logging jdom junit4 log4j logback saxon \
+  servlet slf4j/api tomcat/catalina.jar xalan-j2 xalan-j2-serializer`
+ant -Dbuild.sysclasspath=$CLASSPATH server
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/tomcat/webapps/opendap
+#Explode the war file into webapps
+unzip -d $RPM_BUILD_ROOT%{_datadir}/tomcat/webapps/opendap build/dist/opendap.war
+
+#Allow symbolic links in the webapp
+cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/tomcat/webapps/opendap/META-INF/context.xml
+
+#Move config to /etc/olfs
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/olfs
+pushd $RPM_BUILD_ROOT%{_datadir}/tomcat/webapps/opendap/initialContent
+for xml in *.xml
+do
+   mv $xml $RPM_BUILD_ROOT%{_sysconfdir}/olfs/
+   ln -s ../../../../../../etc/olfs/$xml .
+done
+
+#Setup log directory
+mkdir -p $RPM_BUILD_ROOT%{_sharedstatedir}/lib/tomcat/content/opendap
+mkdir -p $RPM_BUILD_ROOT%{_sharedstatedir}/log/tomcat/opendap
+ln -s ../../../../log/tomcat/opendap \
+      $RPM_BUILD_ROOT%{_sharedstatedir}/lib/tomcat/content/opendap/logs
+
+#Move javadocs out of webapp and into javadocdir
+mkdir -p $RPM_BUILD_ROOT%{_javadocdir}
+mv $RPM_BUILD_ROOT%{_datadir}/tomcat/webapps/opendap/docs \
+   $RPM_BUILD_ROOT%{_javadocdir}/%{name}
+
+
+%check 
+export CLASSPATH=`build-classpath commons-cli commons-codec commons-httpclient \
+  commons-lang commons-logging jdom junit4 log4j logback saxon \
+  servlet slf4j/api tomcat/catalina.jar xalan-j2 xalan-j2-serializer`
+ant -lib $CLASSPATH check
+
+
+%files
+%doc ChangeLog COPYRIGHT README
+%dir %{_sysconfdir}/olfs
+%config(noreplace) %{_sysconfdir}/olfs/*.xml
+%{_datadir}/tomcat/webapps/opendap/
+%attr(-,tomcat,tomcat) %{_sharedstatedir}/lib/tomcat/content/opendap
+%attr(-,tomcat,tomcat) %{_sharedstatedir}/log/tomcat/opendap
+
+%files javadoc
+%doc COPYRIGHT
+%{_javadocdir}/%{name}
+
+
+%changelog
+* Tue Apr 23 2013 Orion Poplawski <orion at cora.nwra.com> 1.9.5-2
+- Cleanup
+- Fix FSF address
+
+* Tue Apr 23 2013 Orion Poplawski <orion at cora.nwra.com> 1.9.5-1
+- Update to 1.9.5
+- Use tomcat instead of tomcat6
+
+* Thu Jul 12 2012 Orion Poplawski <orion at cora.nwra.com> 1.9.4-0.1.beta
+- Update to 1.9.4 beta
+
+* Wed Dec 1 2010 Orion Poplawski <orion at cora.nwra.com> 1.7.1-1
+- Update to 1.7.1
+- Rename jakarta-commons-cli to apache-commons-cli for f15+
+
+* Fri Jul 16 2010 Orion Poplawski <orion at cora.nwra.com> 1.6.2-2
+- Move configuration to %%{_sysconfdir}
+- Add content and log directories
+- Allow symbolic links in webapp directory with context.xml file
+
+* Thu Jul 15 2010 Orion Poplawski <orion at cora.nwra.com> 1.6.2-1
+- Initial Fedora package
diff --git a/sources b/sources
index e69de29..bec077d 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+cd6901470e74828a81a51bd6d86e65aa  olfs-1.9.5-src.tgz


More information about the scm-commits mailing list