Author: rvs
Date: Fri Mar  2 18:39:35 2012
New Revision: 1296379

URL: http://svn.apache.org/viewvc?rev=1296379&view=rev
Log:
BIGTOP-417. webapps shipped by bigtop components should be using a 
system-provided Tomcat

Added:
    
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/bigtop-tomcat/
    
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/bigtop-tomcat/do-component-build
    
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/bigtop-tomcat/install_tomcat.sh
    incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-tomcat/
    
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-tomcat/changelog
    
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-tomcat/compat
    
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-tomcat/control
    
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-tomcat/copyright
    
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-tomcat/rules
   (with props)
    incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-tomcat/
    
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-tomcat/BUILD/
    
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-tomcat/BUILD/.gitignore
    
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-tomcat/RPMS/
    
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-tomcat/RPMS/.gitignore
    
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-tomcat/SOURCES/
    
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-tomcat/SOURCES/.gitignore
    
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-tomcat/SPECS/
    
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-tomcat/SPECS/bigtop-tomcat.spec
    
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-tomcat/SRPMS/
    
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-tomcat/SRPMS/.gitignore
Removed:
    
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/oozie/oozie-examples.sh
Modified:
    incubator/bigtop/branches/hadoop-0.23/bigtop.mk

Added: 
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/bigtop-tomcat/do-component-build
URL: 
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/bigtop-tomcat/do-component-build?rev=1296379&view=auto
==============================================================================
--- 
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/bigtop-tomcat/do-component-build
 (added)
+++ 
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/bigtop-tomcat/do-component-build
 Fri Mar  2 18:39:35 2012
@@ -0,0 +1,25 @@
+#!/bin/sh
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -ex
+
+mkdir dl
+ant -Dbase.path=dl clean download
+ant -Dbase.path=dl
+ant -Dbase.path=dl -Dskip.installer=true -f dist.xml dist-static package-tgz 
+
+mkdir build
+tar -C build --strip-components=1 -xzf 
output/release/v*/bin/apache-tomcat-*[0-9].tar.gz

Added: 
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/bigtop-tomcat/install_tomcat.sh
URL: 
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/bigtop-tomcat/install_tomcat.sh?rev=1296379&view=auto
==============================================================================
--- 
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/bigtop-tomcat/install_tomcat.sh
 (added)
+++ 
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/bigtop-tomcat/install_tomcat.sh
 Fri Mar  2 18:39:35 2012
@@ -0,0 +1,91 @@
+#!/bin/bash
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -e
+
+usage() {
+  echo "
+usage: $0 <options>
+  Required not-so-options:
+     --build-dir=DIR             path to Whirr dist.dir
+     --prefix=PREFIX             path to install into
+
+  Optional options:
+     --doc-dir=DIR               path to install docs into 
[/usr/share/doc/whirr]
+     --lib-dir=DIR               path to install Whirr home [/usr/lib/whirr]
+  "
+  exit 1
+}
+
+OPTS=$(getopt \
+  -n $0 \
+  -o '' \
+  -l 'prefix:' \
+  -l 'doc-dir:' \
+  -l 'lib-dir:' \
+  -l 'build-dir:' -- "$@")
+
+if [ $? != 0 ] ; then
+    usage
+fi
+
+eval set -- "$OPTS"
+while true ; do
+    case "$1" in
+        --prefix)
+        PREFIX=$2 ; shift 2
+        ;;
+        --build-dir)
+        BUILD_DIR=$2 ; shift 2
+        ;;
+        --doc-dir)
+        DOC_DIR=$2 ; shift 2
+        ;;
+        --lib-dir)
+        LIB_DIR=$2 ; shift 2
+        ;;
+        --)
+        shift ; break
+        ;;
+        *)
+        echo "Unknown option: $1"
+        usage
+        exit 1
+        ;;
+    esac
+done
+
+for var in PREFIX BUILD_DIR ; do
+  if [ -z "$(eval "echo \$$var")" ]; then
+    echo Missing param: $var
+    usage
+  fi
+done
+
+MAN_DIR=$PREFIX/usr/share/man/man1
+DOC_DIR=${DOC_DIR:-$PREFIX/usr/share/doc/bigtop-tomcat}
+LIB_DIR=${LIB_DIR:-$PREFIX/usr/lib/bigtop-tomcat}
+
+# First we'll move everything into lib
+install -d -m 0755 $LIB_DIR
+(cd $BUILD_DIR && tar -cf - .) | (cd $LIB_DIR && tar -xf -)
+
+rm -rf $LIB_DIR/webapps
+mv -f $LIB_DIR/conf $LIB_DIR/conf.template
+
+install -d -m 0755 $DOC_DIR
+mv $LIB_DIR/{RUNNING.txt,RELEASE-NOTES,NOTICE,LICENSE} $DOC_DIR

Added: 
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-tomcat/changelog
URL: 
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-tomcat/changelog?rev=1296379&view=auto
==============================================================================
--- 
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-tomcat/changelog
 (added)
+++ 
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-tomcat/changelog
 Fri Mar  2 18:39:35 2012
@@ -0,0 +1 @@
+--- This is auto-generated 

Added: 
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-tomcat/compat
URL: 
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-tomcat/compat?rev=1296379&view=auto
==============================================================================
--- 
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-tomcat/compat
 (added)
+++ 
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-tomcat/compat
 Fri Mar  2 18:39:35 2012
@@ -0,0 +1 @@
+6

Added: 
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-tomcat/control
URL: 
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-tomcat/control?rev=1296379&view=auto
==============================================================================
--- 
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-tomcat/control
 (added)
+++ 
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-tomcat/control
 Fri Mar  2 18:39:35 2012
@@ -0,0 +1,27 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+Source: bigtop-tomcat
+Section: misc
+Priority: extra
+Maintainer: Bigtop <[email protected]>
+Build-Depends: debhelper (>= 6)
+Standards-Version: 3.8.0
+Homepage: http://tomcat.apache.org/
+
+Package: bigtop-tomcat
+Architecture: all
+Description: Apache Tomcat 
+ Apache Tomcat is an open source software implementation of the
+ Java Servlet and JavaServer Pages technologies. 

Added: 
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-tomcat/copyright
URL: 
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-tomcat/copyright?rev=1296379&view=auto
==============================================================================
--- 
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-tomcat/copyright
 (added)
+++ 
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-tomcat/copyright
 Fri Mar  2 18:39:35 2012
@@ -0,0 +1,15 @@
+Format: http://dep.debian.net/deps/dep5
+Source: http://tomcat.apache.org/
+Upstream-Name: Apache Tomcat
+
+Files: *
+Copyright: 2010-2011, The Apache Software Foundation
+License: Apache-2.0
+
+Files debian/*
+Copyright: 2011, The Apache Software Foundation
+License: Apache-2.0
+
+License: Apache-2.0
+ On Debian systems, the complete text of the Apache 2.0 license
+ can be found in "/usr/share/common-licenses/Apache-2.0".

Added: 
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-tomcat/rules
URL: 
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-tomcat/rules?rev=1296379&view=auto
==============================================================================
--- 
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-tomcat/rules
 (added)
+++ 
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-tomcat/rules
 Fri Mar  2 18:39:35 2012
@@ -0,0 +1,89 @@
+#!/usr/bin/make -f
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+export DH_VERBOSE=1
+
+# This has to be exported to make some magic below work.
+export DH_OPTIONS
+
+patch: patch-stamp
+patch-stamp:   
+       touch $@
+
+clean: 
+       dh_testdir
+       dh_testroot
+       rm -f *-stamp
+       dh_clean
+       rm -Rf debian/tmp debian/bigtop-tomcat
+       find debian -name .\*swp -exec rm -f {} \;
+
+build-indep: build-indep-stamp
+build-indep-stamp: patch-stamp
+       bash debian/do-component-build -Dmaven.repo.local=${HOME}/.m2/repository
+       touch $@
+
+install: install-indep
+install-indep: 
+       dh_testdir
+       dh_testroot
+       bash -x debian/install_tomcat.sh                             \
+         --build-dir=build                                          \
+         --doc-dir=debian/bigtop-tomcat/usr/share/doc/bigtop-tomcat \
+         --prefix=debian/bigtop-tomcat
+       (dh_lintian) || /bin/true
+
+binary-common: 
+       dh_testdir
+       dh_testroot
+       dh_installchangelogs
+       dh_installdocs
+#      dh_installexamples
+#      dh_installmenu
+#      dh_installdebconf
+#      dh_installlogrotate
+#      dh_installemacsen
+#      dh_installpam
+#      dh_installmime
+#      dh_python
+#      dh_installinit
+#      dh_installcron
+#      dh_installinfo
+       dh_installman
+       dh_link
+       dh_strip
+       dh_compress
+       dh_fixperms
+#      dh_perl
+       dh_makeshlibs
+       dh_installdeb
+       dh_shlibdeps
+       dh_gencontrol
+       dh_md5sums
+       dh_builddeb
+
+binary-indep: build-indep install-indep
+       $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
+
+binary-arch:   
+
+
+binary: binary-indep
+.PHONY: build clean binary-indep binary install-indep binary-arch

Propchange: 
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/bigtop-tomcat/rules
------------------------------------------------------------------------------
    svn:executable = *

Added: 
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-tomcat/BUILD/.gitignore
URL: 
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-tomcat/BUILD/.gitignore?rev=1296379&view=auto
==============================================================================
    (empty)

Added: 
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-tomcat/RPMS/.gitignore
URL: 
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-tomcat/RPMS/.gitignore?rev=1296379&view=auto
==============================================================================
    (empty)

Added: 
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-tomcat/SOURCES/.gitignore
URL: 
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-tomcat/SOURCES/.gitignore?rev=1296379&view=auto
==============================================================================
    (empty)

Added: 
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-tomcat/SPECS/bigtop-tomcat.spec
URL: 
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-tomcat/SPECS/bigtop-tomcat.spec?rev=1296379&view=auto
==============================================================================
--- 
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-tomcat/SPECS/bigtop-tomcat.spec
 (added)
+++ 
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-tomcat/SPECS/bigtop-tomcat.spec
 Fri Mar  2 18:39:35 2012
@@ -0,0 +1,59 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+%define lib_tomcat %{_usr}/lib/%{name}
+
+%if  %{?suse_version:1}0
+  %define doc_tomcat %{_docdir}/%{name}
+%else
+  %define doc_tomcat %{_docdir}/%{name}-%{version}
+%endif
+
+Name: bigtop-tomcat
+Version: %{bigtop_tomcat_version}
+Release: %{bigtop_tomcat_release}
+Summary: Apache Tomcat
+URL: http://tomcat.apache.org/
+Group: Development/Libraries
+BuildArch: noarch
+Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+License: ASL 2.0 
+Source0: apache-tomcat-%{bigtop_tomcat_base_version}.tar.gz
+Source1: do-component-build
+Source2: install_tomcat.sh
+
+%description 
+Apache Tomcat is an open source software implementation of the
+Java Servlet and JavaServer Pages technologies.
+
+%prep
+%setup -n apache-tomcat-%{bigtop_tomcat_base_version}-src
+
+%build
+bash %{SOURCE1}
+
+%install
+%__rm -rf $RPM_BUILD_ROOT
+bash %{SOURCE2} \
+          --build-dir=build \
+         --doc-dir=$RPM_BUILD_ROOT%{doc_tomcat} \
+          --prefix=$RPM_BUILD_ROOT
+
+%files 
+%defattr(-,root,root)
+%attr(0755,root,root) %{lib_tomcat}
+%doc %{doc_tomcat}
+
+%changelog
+

Added: 
incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-tomcat/SRPMS/.gitignore
URL: 
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/bigtop-tomcat/SRPMS/.gitignore?rev=1296379&view=auto
==============================================================================
    (empty)

Modified: incubator/bigtop/branches/hadoop-0.23/bigtop.mk
URL: 
http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop.mk?rev=1296379&r1=1296378&r2=1296379&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/bigtop.mk (original)
+++ incubator/bigtop/branches/hadoop-0.23/bigtop.mk Fri Mar  2 18:39:35 2012
@@ -167,3 +167,15 @@ BIGTOP_JSVC_TARBALL_SRC=commons-daemon-$
 BIGTOP_JSVC_TARBALL_DST=commons-daemon-$(BIGTOP_JSVC_BASE_VERSION).tar.gz
 BIGTOP_JSVC_SITE=$(APACHE_MIRROR)/commons/daemon/source/
 $(eval $(call PACKAGE,bigtop-jsvc,BIGTOP_JSVC))
+
+# Bigtop-tomcat
+BIGTOP_TOMCAT_NAME=bigtop-tomcat
+BIGTOP_TOMCAT_RELNOTES_NAME=Apache Tomcat
+BIGTOP_TOMCAT_PKG_NAME=bigtop-tomcat
+BIGTOP_TOMCAT_BASE_VERSION=6.0.35
+BIGTOP_TOMCAT_PKG_VERSION=$(BIGTOP_TOMCAT_BASE_VERSION)
+BIGTOP_TOMCAT_RELEASE_VERSION=1
+BIGTOP_TOMCAT_TARBALL_SRC=apache-tomcat-$(BIGTOP_TOMCAT_BASE_VERSION)-src.tar.gz
+BIGTOP_TOMCAT_TARBALL_DST=apache-tomcat-$(BIGTOP_TOMCAT_BASE_VERSION).tar.gz
+BIGTOP_TOMCAT_SITE=$(APACHE_MIRROR)/tomcat/tomcat-6/v$(BIGTOP_TOMCAT_BASE_VERSION)/src/
+$(eval $(call PACKAGE,bigtop-tomcat,BIGTOP_TOMCAT))


Reply via email to