[tomcat8] 01/05: Replaced tomcat7 with tomcat8

Emmanuel Bourg ebourg-guest at alioth.debian.org
Thu Sep 12 13:57:49 UTC 2013


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to branch master
in repository tomcat8.

commit 64e47e3657f709a97a4daa8970e16cb3de29d84d
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Thu Sep 12 15:21:26 2013 +0200

    Replaced tomcat7 with tomcat8
---
 debian/README.Debian                               |   22 +++---
 debian/control                                     |   56 ++++++-------
 debian/defaults.template                           |   14 ++--
 ...cat7-java.manifest => libtomcat8-java.manifest} |    0
 .../{libtomcat7-java.poms => libtomcat8-java.poms} |    0
 debian/logrotate.template                          |    4 +-
 debian/orig-tar.sh                                 |    6 +-
 debian/rules                                       |   52 ++++++-------
 debian/setenv.sh                                   |    2 +-
 debian/tomcat7-admin.install                       |    4 -
 debian/tomcat7-common.install                      |    2 -
 debian/tomcat7-common.links                        |    6 --
 debian/tomcat7-docs.doc-base                       |   10 ---
 debian/tomcat7-docs.install                        |    2 -
 debian/tomcat7-docs.links                          |    1 -
 debian/tomcat7-examples.install                    |    3 -
 debian/tomcat7-examples.links                      |    2 -
 debian/tomcat7-user.install                        |    5 --
 debian/tomcat7.config                              |   32 --------
 debian/tomcat7.dirs                                |    8 --
 debian/tomcat7.install                             |    9 ---
 debian/tomcat7.links                               |    4 -
 debian/tomcat7.postinst                            |   76 ------------------
 debian/tomcat7.postrm.in                           |   82 --------------------
 debian/tomcat7.prerm                               |   16 ----
 debian/tomcat8-admin.install                       |    4 +
 .../{tomcat7-common.docs => tomcat8-common.docs}   |    0
 debian/tomcat8-common.install                      |    2 +
 debian/tomcat8-common.links                        |    6 ++
 debian/tomcat8-docs.doc-base                       |   10 +++
 debian/tomcat8-docs.install                        |    2 +
 debian/tomcat8-docs.links                          |    1 +
 debian/tomcat8-examples.install                    |    3 +
 debian/tomcat8-examples.links                      |    2 +
 ...at7-instance-create => tomcat8-instance-create} |    6 +-
 ...instance-create.1 => tomcat8-instance-create.1} |   10 +--
 debian/tomcat8-user.install                        |    5 ++
 debian/tomcat8.config                              |   32 ++++++++
 debian/{tomcat7.cron.daily => tomcat8.cron.daily}  |    2 +-
 debian/tomcat8.dirs                                |    8 ++
 debian/{tomcat7.init => tomcat8.init}              |   42 +++++-----
 debian/tomcat8.install                             |    9 +++
 debian/tomcat8.links                               |    4 +
 debian/tomcat8.postinst                            |   76 ++++++++++++++++++
 debian/tomcat8.postrm.in                           |   82 ++++++++++++++++++++
 debian/tomcat8.prerm                               |   16 ++++
 debian/{tomcat7.templates => tomcat8.templates}    |   20 ++---
 47 files changed, 380 insertions(+), 380 deletions(-)

diff --git a/debian/README.Debian b/debian/README.Debian
index 0c97203..666c42b 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -1,36 +1,36 @@
 Getting started:
-  * After installing the tomcat7 package, the server should be accessible
+  * After installing the tomcat8 package, the server should be accessible
     at http://localhost:8080/
-  * If you install tomcat7-admin, then you need to edit 
-    /etc/tomcat7/tomcat-users.xml and add to it the following:
+  * If you install tomcat8-admin, then you need to edit 
+    /etc/tomcat8/tomcat-users.xml and add to it the following:
       <role rolename="manager"/>
       <user username="tomcat" password="s3cret" roles="manager"/>
     Tomcat administration will be accessible on 
     http://localhost:8080/manager/html
   * Tomcat is not running under a Java security manager by default. If you
     expose your Tomcat instance to the internet, please consider editing
-    your /etc/default/tomcat7 file and set TOMCAT7_SECURITY="yes", then
-    adjust policy files in /etc/tomcat7/policy.d/ as explained in
+    your /etc/default/tomcat8 file and set TOMCAT8_SECURITY="yes", then
+    adjust policy files in /etc/tomcat8/policy.d/ as explained in
     http://tomcat.apache.org/tomcat-7.0-doc/security-manager-howto.html
   * To run more than one Tomcat instance on your server, install the package
-    tomcat7-user and run the tomcat7-instance-create utility.
-    You should remove the tomcat7 package if you don't want Tomcat to
+    tomcat8-user and run the tomcat8-instance-create utility.
+    You should remove the tomcat8 package if you don't want Tomcat to
     start as a daemon at boot time.
   * If you configure your Tomcat to listen on one
     or more privileged ports (such as port 80 or port 443), then you
-    may now enable authbind in your /etc/default/tomcat7 file.  The
+    may now enable authbind in your /etc/default/tomcat8 file.  The
     authbind package can allow your Tomcat JVM user (a non-root user)
     to listen on privileged ports.  Set AUTHBIND="yes" to enable it,
     and then configure your Tomcat to listen on any port number you
     wish.  See the "man authbind" for information on configuring
     authbind.
 
-Deviations from upstream's tomcat7:
+Deviations from upstream's tomcat8:
 
   * In order to prevent library duplication, this version of tomcat
     does not provide tomcat-dbcp.jar.  Instead, it uses the lightweight,
-    scalable JDBC Pool implementation provided as part of tomcat7.
-    This also means that libtomcat7-java does not provide the
+    scalable JDBC Pool implementation provided as part of tomcat8.
+    This also means that libtomcat8-java does not provide the
     tomcat-dbcp.pom for the local maven-repo.  For more information
     and rationale, see:  
       https://bugs.launchpad.net/ubuntu/+source/tomcat6/+bug/283852
diff --git a/debian/control b/debian/control
index 6969178..1ad5a60 100644
--- a/debian/control
+++ b/debian/control
@@ -1,4 +1,4 @@
-Source: tomcat7
+Source: tomcat8
 Section: java
 Priority: optional
 Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
@@ -10,31 +10,31 @@ Build-Depends: default-jdk, ant-optional, debhelper (>= 9), po-debconf, libhamcr
 Build-Depends-Indep: maven-repo-helper, libecj-java, javahelper,
  junit4, libjstl1.1-java, libjakarta-taglibs-standard-java
 Standards-Version: 3.9.4
-Vcs-Git: git://anonscm.debian.org/pkg-java/tomcat7.git
-Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-java/tomcat7.git
+Vcs-Git: git://anonscm.debian.org/pkg-java/tomcat8.git
+Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-java/tomcat8.git
 Homepage: http://tomcat.apache.org
 
-Package: tomcat7-common
+Package: tomcat8-common
 Architecture: all
-Depends: libtomcat7-java (>= ${source:Version}), ${misc:Depends},
+Depends: libtomcat8-java (>= ${source:Version}), ${misc:Depends},
  default-jre-headless | java6-runtime-headless | java6-runtime | java-6-runtime
 Description: Servlet and JSP engine -- common files
  Apache Tomcat implements the Java Servlet and the JavaServer Pages (JSP)
  specifications from Sun Microsystems, and provides a "pure Java" HTTP web
  server environment for Java code to run.
  .
- This package contains common files needed by the tomcat7 and tomcat7-user
+ This package contains common files needed by the tomcat8 and tomcat8-user
  packages (Tomcat 6 scripts and libraries). 
 
-Package: tomcat7
+Package: tomcat8
 Architecture: all
-Depends: tomcat7-common (>= ${source:Version}), ucf,
+Depends: tomcat8-common (>= ${source:Version}), ucf,
 	adduser, ${misc:Depends}
 Recommends: authbind
-Suggests: tomcat7-docs (>= ${source:Version}),
-	tomcat7-admin (>= ${source:Version}),
-	tomcat7-examples (>= ${source:Version}),
-	tomcat7-user (>= ${source:Version}),
+Suggests: tomcat8-docs (>= ${source:Version}),
+	tomcat8-admin (>= ${source:Version}),
+	tomcat8-examples (>= ${source:Version}),
+	tomcat8-user (>= ${source:Version}),
 	libtcnative-1 (>= 1.1.24)
 Description: Servlet and JSP engine
  Apache Tomcat implements the Java Servlet and the JavaServer Pages (JSP)
@@ -43,18 +43,18 @@ Description: Servlet and JSP engine
  .
  This package contains only the startup scripts for the system-wide daemon.
  No documentation or web applications are included here, please install
- the tomcat7-docs and tomcat7-examples packages if you want them.
+ the tomcat8-docs and tomcat8-examples packages if you want them.
  Install the authbind package if you need to use Tomcat on ports 1-1023.
- Install tomcat7-user instead of this package if you don't want Tomcat to
+ Install tomcat8-user instead of this package if you don't want Tomcat to
  start as a service.
 
-Package: tomcat7-user
+Package: tomcat8-user
 Architecture: all
-Depends: tomcat7-common (>= ${source:Version}), netcat, ${misc:Depends}
-Suggests: tomcat7-docs (>= ${source:Version}),
-	tomcat7-admin (>= ${source:Version}),
-	tomcat7-examples (>= ${source:Version}),
-	tomcat7 (>= ${source:Version})
+Depends: tomcat8-common (>= ${source:Version}), netcat, ${misc:Depends}
+Suggests: tomcat8-docs (>= ${source:Version}),
+	tomcat8-admin (>= ${source:Version}),
+	tomcat8-examples (>= ${source:Version}),
+	tomcat8 (>= ${source:Version})
 Description: Servlet and JSP engine -- tools to create user instances
  Apache Tomcat implements the Java Servlet and the JavaServer Pages (JSP)
  specifications from Sun Microsystems, and provides a "pure Java" HTTP web
@@ -64,14 +64,14 @@ Description: Servlet and JSP engine -- tools to create user instances
  This user Tomcat instance can be started and stopped using the scripts
  provided in the Tomcat instance directory.
 
-Package: libtomcat7-java
+Package: libtomcat8-java
 Architecture: all
 Depends: libecj-java,
          libcommons-pool-java,
          libcommons-dbcp-java,
          libservlet3.0-java (>= ${source:Version}), ${misc:Depends}
 Conflicts: libtomcat6-java
-Suggests: tomcat7 (>= ${source:Version})
+Suggests: tomcat8 (>= ${source:Version})
 Description: Servlet and JSP engine -- core libraries
  Apache Tomcat implements the Java Servlet and the JavaServer Pages (JSP)
  specifications from Sun Microsystems, and provides a "pure Java" HTTP web
@@ -102,9 +102,9 @@ Description: Servlet 3.0 and JSP 2.2 Java API documentation
  .
  This package contains the documentation for the Java Servlet and JSP library.
 
-Package: tomcat7-admin
+Package: tomcat8-admin
 Architecture: all
-Depends: tomcat7-common (>= ${source:Version}), ${misc:Depends}
+Depends: tomcat8-common (>= ${source:Version}), ${misc:Depends}
 Description: Servlet and JSP engine -- admin web applications
  Apache Tomcat implements the Java Servlet and the JavaServer Pages (JSP)
  specifications from Sun Microsystems, and provides a "pure Java" HTTP web
@@ -112,9 +112,9 @@ Description: Servlet and JSP engine -- admin web applications
  .
  This package contains the administrative web interfaces.
 
-Package: tomcat7-examples
+Package: tomcat8-examples
 Architecture: all
-Depends: tomcat7-common (>= ${source:Version}), ${misc:Depends},
+Depends: tomcat8-common (>= ${source:Version}), ${misc:Depends},
  libjstl1.1-java, libjakarta-taglibs-standard-java
 Description: Servlet and JSP engine -- example web applications
  Apache Tomcat implements the Java Servlet and the JavaServer Pages (JSP)
@@ -123,10 +123,10 @@ Description: Servlet and JSP engine -- example web applications
  .
  This package contains the default Tomcat example webapps.
 
-Package: tomcat7-docs
+Package: tomcat8-docs
 Section: doc
 Architecture: all
-Depends: tomcat7-common (>= ${source:Version}), ${misc:Depends}
+Depends: tomcat8-common (>= ${source:Version}), ${misc:Depends}
 Description: Servlet and JSP engine -- documentation
  Apache Tomcat implements the Java Servlet and the JavaServer Pages (JSP)
  specifications from Sun Microsystems, and provides a "pure Java" HTTP web
diff --git a/debian/defaults.template b/debian/defaults.template
index c178030..2581192 100644
--- a/debian/defaults.template
+++ b/debian/defaults.template
@@ -1,10 +1,10 @@
 # Run Tomcat as this user ID. Not setting this or leaving it blank will use the
-# default of tomcat7.
-TOMCAT7_USER=tomcat7
+# default of tomcat8.
+TOMCAT8_USER=tomcat8
 
 # Run Tomcat as this group ID. Not setting this or leaving it blank will use
-# the default of tomcat7.
-TOMCAT7_GROUP=tomcat7
+# the default of tomcat8.
+TOMCAT8_GROUP=tomcat8
 
 # The home directory of the Java development kit (JDK). You need at least
 # JDK version 1.5. If JAVA_HOME is not set, some common directories for 
@@ -29,16 +29,16 @@ JAVA_OPTS="-Djava.awt.headless=true -Xmx128m -XX:+UseConcMarkSweepGC"
 #JSP_COMPILER=javac
 
 # Use the Java security manager? (yes/no, default: no)
-#TOMCAT7_SECURITY=no
+#TOMCAT8_SECURITY=no
 
-# Number of days to keep logfiles in /var/log/tomcat7. Default is 14 days.
+# Number of days to keep logfiles in /var/log/tomcat8. Default is 14 days.
 #LOGFILE_DAYS=14
 # Whether to compress logfiles older than today's
 #LOGFILE_COMPRESS=1
 
 # Location of the JVM temporary directory
 # WARNING: This directory will be destroyed and recreated at every startup !
-#JVM_TMP=/tmp/tomcat7-temp
+#JVM_TMP=/tmp/tomcat8-temp
 
 # If you run Tomcat on port numbers that are all higher than 1023, then you
 # do not need authbind.  It is used for binding Tomcat to lower port numbers.
diff --git a/debian/libtomcat7-java.manifest b/debian/libtomcat8-java.manifest
similarity index 100%
rename from debian/libtomcat7-java.manifest
rename to debian/libtomcat8-java.manifest
diff --git a/debian/libtomcat7-java.poms b/debian/libtomcat8-java.poms
similarity index 100%
rename from debian/libtomcat7-java.poms
rename to debian/libtomcat8-java.poms
diff --git a/debian/logrotate.template b/debian/logrotate.template
index ce082df..23ea069 100644
--- a/debian/logrotate.template
+++ b/debian/logrotate.template
@@ -1,8 +1,8 @@
-/var/log/tomcat7/catalina.out {
+/var/log/tomcat8/catalina.out {
   copytruncate
   weekly
   rotate 52
   compress
   missingok
-  create 640 tomcat7 adm
+  create 640 tomcat8 adm
 }
diff --git a/debian/orig-tar.sh b/debian/orig-tar.sh
index 969be57..35cff70 100755
--- a/debian/orig-tar.sh
+++ b/debian/orig-tar.sh
@@ -1,11 +1,11 @@
 #!/bin/sh -e
 
 VERSION=$2
-TAR=../tomcat7_$VERSION.orig.tar.gz
-DIR=tomcat7-$VERSION
+TAR=../tomcat8_$VERSION.orig.tar.gz
+DIR=tomcat8-$VERSION
 TAG=$(echo TOMCAT_$VERSION | sed -e 's/\./_/g')
 
-svn export http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/$TAG $DIR
+svn export http://svn.apache.org/repos/asf/tomcat/tc8.0.x/tags/$TAG $DIR
 tar -c -z -f $TAR --exclude 'standard.jar' --exclude 'jstl.jar' $DIR
 rm -rf $DIR ../$TAG
 
diff --git a/debian/rules b/debian/rules
index 396acdf..0516f91 100755
--- a/debian/rules
+++ b/debian/rules
@@ -77,7 +77,7 @@ clean:
 	rm -rf "output/"
 	rm -rf webapps/examples/WEB-INF/lib/*.jar
 	rm -f build-stamp modules/jdbc-pool/output/resources/MANIFEST.MF
-	rm -f debian/tomcat7.postrm
+	rm -f debian/tomcat8.postrm
 	dh_clean
 	mh_clean
 
@@ -92,7 +92,7 @@ binary-indep: build install
 	dh_testroot
 	dh_installchangelogs
 	dh_installdocs
-	dh_installman -ptomcat7-user debian/tomcat7-instance-create.1
+	dh_installman -ptomcat8-user debian/tomcat8-instance-create.1
 	dh_installexamples
 	dh_installinit --error-handler=true -- defaults 92 08
 	dh_installdebconf
@@ -113,45 +113,45 @@ binary-indep: build install
 	              debian/javaxpoms/jsp-api.pom
 	perl -p -i -e 's/\@MAVEN.DEPLOY.VERSION\@/$(T_VER)/' \
 	              debian/poms/*.pom
-	mh_installpoms -plibtomcat7-java
+	mh_installpoms -plibtomcat8-java
 	for i in $(T_MAVENIZED_JARS); \
 	do \
-		mh_installjar -plibtomcat7-java -l           \
+		mh_installjar -plibtomcat8-java -l           \
 	                      debian/poms/tomcat-$$i.pom     \
 	                      $(BLDLIB)/$$i.jar              \
-	                      usr/share/tomcat7/lib/$$i.jar; \
+	                      usr/share/tomcat8/lib/$$i.jar; \
 	done
-	mh_installjar -plibtomcat7-java -l --usj-name=catalina-tribes \
+	mh_installjar -plibtomcat8-java -l --usj-name=catalina-tribes \
 	              debian/poms/tomcat-tribes.pom \
 	              $(BLDLIB)/catalina-tribes.jar \
-	              usr/share/tomcat7/lib/catalina-tribes.jar
-	mh_installjar -plibtomcat7-java -l --usj-name=tomcat-api \
+	              usr/share/tomcat8/lib/catalina-tribes.jar
+	mh_installjar -plibtomcat8-java -l --usj-name=tomcat-api \
 	              debian/poms/tomcat-api.pom \
 	              $(BLDLIB)/tomcat-api.jar \
-	              usr/share/tomcat7/lib/tomcat-api.jar
-	mh_installjar -plibtomcat7-java -l --usj-name=tomcat-coyote \
+	              usr/share/tomcat8/lib/tomcat-api.jar
+	mh_installjar -plibtomcat8-java -l --usj-name=tomcat-coyote \
 	              debian/poms/tomcat-coyote.pom \
 	              $(BLDLIB)/tomcat-coyote.jar \
-	              usr/share/tomcat7/lib/tomcat-coyote.jar
-	mh_installjar -plibtomcat7-java -l --usj-name=tomcat-juli \
+	              usr/share/tomcat8/lib/tomcat-coyote.jar
+	mh_installjar -plibtomcat8-java -l --usj-name=tomcat-juli \
 	              debian/poms/tomcat-juli.pom \
 	              $(BLDBIN)/tomcat-juli.jar
-	mh_installjar -plibtomcat7-java -l --usj-name=tomcat-util \
+	mh_installjar -plibtomcat8-java -l --usj-name=tomcat-util \
 	              debian/poms/tomcat-util.pom \
 	              $(BLDLIB)/tomcat-util.jar \
-	              usr/share/tomcat7/lib/tomcat-util.jar
-	mh_installjar -plibtomcat7-java -l --usj-name=tomcat-jdbc \
+	              usr/share/tomcat8/lib/tomcat-util.jar
+	mh_installjar -plibtomcat8-java -l --usj-name=tomcat-jdbc \
 				  debian/poms/tomcat-jdbc.pom \
 			  	  output/jdbc-pool/tomcat-jdbc.jar \
-				  usr/share/tomcat7/lib/tomcat-jdbc.jar
+				  usr/share/tomcat8/lib/tomcat-jdbc.jar
 	for i in $(T_JARS); do \
 		mv $(BLDLIB)/$$i.jar $(BLDLIB)/$$i-$(T_VER).jar && \
-		dh_install -plibtomcat7-java \
+		dh_install -plibtomcat8-java \
 			$(BLDLIB)/$$i-$(T_VER).jar usr/share/java && \
-		dh_link -plibtomcat7-java usr/share/java/$$i-$(T_VER).jar \
+		dh_link -plibtomcat8-java usr/share/java/$$i-$(T_VER).jar \
 			usr/share/java/$$i.jar && \
-		dh_link -ptomcat7-common usr/share/java/$$i-$(T_VER).jar \
-			usr/share/tomcat7/lib/$$i.jar; done
+		dh_link -ptomcat8-common usr/share/java/$$i-$(T_VER).jar \
+			usr/share/tomcat8/lib/$$i.jar; done
 	dh_install --exclude=.bat --exclude=Thumbs.db
 	dh_link
 	mh_installpoms -plibservlet3.0-java
@@ -175,15 +175,15 @@ binary-indep: build install
                       output/build/lib/el-api.jar
 	rm -r debian/poms
 	rm -rf \
-           debian/tomcat7/usr/share/tomcat7/webapps/default_root/.svn \
-	   debian/tomcat7/usr/share/tomcat7/webapps/default_root/META-INF/.svn
-	chmod a+x debian/tomcat7-common/usr/share/tomcat7/bin/*.sh
-	chmod a+x debian/tomcat7-user/usr/bin/tomcat7-instance-create
-	chmod a+x debian/tomcat7-user/usr/share/tomcat7/skel/bin/*.sh
+           debian/tomcat8/usr/share/tomcat8/webapps/default_root/.svn \
+	   debian/tomcat8/usr/share/tomcat8/webapps/default_root/META-INF/.svn
+	chmod a+x debian/tomcat8-common/usr/share/tomcat8/bin/*.sh
+	chmod a+x debian/tomcat8-user/usr/bin/tomcat8-instance-create
+	chmod a+x debian/tomcat8-user/usr/share/tomcat8/skel/bin/*.sh
 	# update the checksum for the root webapp
 	unset rwmd5sum \
 		&& rwmd5sum=`cat $(RWFILES) | md5sum - 2>/dev/null | cut -d " " -f1` \
-		&& sed "s/\@ROOT_WEBAPP_MD5SUM\@/$$rwmd5sum/" debian/tomcat7.postrm.in > debian/tomcat7.postrm
+		&& sed "s/\@ROOT_WEBAPP_MD5SUM\@/$$rwmd5sum/" debian/tomcat8.postrm.in > debian/tomcat8.postrm
 	jh_manifest
 	dh_compress
 	dh_fixperms
diff --git a/debian/setenv.sh b/debian/setenv.sh
index 657c32d..2b89b4b 100644
--- a/debian/setenv.sh
+++ b/debian/setenv.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 #
 
-CATALINA_HOME=/usr/share/tomcat7
+CATALINA_HOME=/usr/share/tomcat8
 
 # The first existing directory is used for JAVA_HOME (if JAVA_HOME is not
 # defined in $DEFAULT)
diff --git a/debian/tomcat7-admin.install b/debian/tomcat7-admin.install
deleted file mode 100644
index 097495f..0000000
--- a/debian/tomcat7-admin.install
+++ /dev/null
@@ -1,4 +0,0 @@
-debian/context/manager.xml /etc/tomcat7/Catalina/localhost/
-output/build/webapps/manager /usr/share/tomcat7-admin/
-debian/context/host-manager.xml /etc/tomcat7/Catalina/localhost/
-output/build/webapps/host-manager /usr/share/tomcat7-admin/
diff --git a/debian/tomcat7-common.install b/debian/tomcat7-common.install
deleted file mode 100644
index 60e490d..0000000
--- a/debian/tomcat7-common.install
+++ /dev/null
@@ -1,2 +0,0 @@
-output/build/bin/bootstrap.jar /usr/share/tomcat7/bin/
-bin/* /usr/share/tomcat7/bin/
diff --git a/debian/tomcat7-common.links b/debian/tomcat7-common.links
deleted file mode 100644
index 589aa70..0000000
--- a/debian/tomcat7-common.links
+++ /dev/null
@@ -1,6 +0,0 @@
-/usr/share/java/tomcat-juli.jar /usr/share/tomcat7/bin/tomcat-juli.jar
-/usr/share/java/commons-dbcp.jar /usr/share/tomcat7/lib/commons-dbcp.jar
-/usr/share/java/commons-pool.jar /usr/share/tomcat7/lib/commons-pool.jar
-/usr/share/java/tomcat-el-api-2.2.jar /usr/share/tomcat7/lib/el-api.jar
-/usr/share/java/tomcat-jsp-api-2.2.jar /usr/share/tomcat7/lib/jsp-api.jar
-/usr/share/java/tomcat-servlet-api-3.0.jar /usr/share/tomcat7/lib/servlet-api.jar
diff --git a/debian/tomcat7-docs.doc-base b/debian/tomcat7-docs.doc-base
deleted file mode 100644
index 236fcb7..0000000
--- a/debian/tomcat7-docs.doc-base
+++ /dev/null
@@ -1,10 +0,0 @@
-Document: tomcat7
-Title: Apache Tomcat 7.0 Documentation
-Author: Apache Software Foundation
-Abstract: Documentation bundle for Apache Tomcat 7.0 Servlet/JSP container.
-Section: System/Administration
-
-Format: HTML
-Index: /usr/share/doc/tomcat7-docs/docs/index.html
-Files: /usr/share/doc/tomcat7-docs/docs/*
-
diff --git a/debian/tomcat7-docs.install b/debian/tomcat7-docs.install
deleted file mode 100644
index 8763b68..0000000
--- a/debian/tomcat7-docs.install
+++ /dev/null
@@ -1,2 +0,0 @@
-debian/context/docs.xml /etc/tomcat7/Catalina/localhost/
-output/build/webapps/docs /usr/share/tomcat7-docs/
diff --git a/debian/tomcat7-docs.links b/debian/tomcat7-docs.links
deleted file mode 100644
index 4969246..0000000
--- a/debian/tomcat7-docs.links
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/tomcat7-docs/docs /usr/share/doc/tomcat7-docs/docs
diff --git a/debian/tomcat7-examples.install b/debian/tomcat7-examples.install
deleted file mode 100644
index fd5a8e0..0000000
--- a/debian/tomcat7-examples.install
+++ /dev/null
@@ -1,3 +0,0 @@
-debian/context/examples.xml /etc/tomcat7/Catalina/localhost/
-output/build/webapps/examples /usr/share/tomcat7-examples/
-debian/policy/examples/*.policy /etc/tomcat7/policy.d/
diff --git a/debian/tomcat7-examples.links b/debian/tomcat7-examples.links
deleted file mode 100644
index 927957b..0000000
--- a/debian/tomcat7-examples.links
+++ /dev/null
@@ -1,2 +0,0 @@
-/usr/share/java/jstl1.1.jar /usr/share/tomcat7-examples/examples/WEB-INF/lib/jstl.jar
-/usr/share/java/standard.jar /usr/share/tomcat7-examples/examples/WEB-INF/lib/standard.jar
diff --git a/debian/tomcat7-user.install b/debian/tomcat7-user.install
deleted file mode 100644
index 7252678..0000000
--- a/debian/tomcat7-user.install
+++ /dev/null
@@ -1,5 +0,0 @@
-conf/*.xml /usr/share/tomcat7/skel/conf/
-conf/catalina.properties /usr/share/tomcat7/skel/conf/
-debian/logging.properties /usr/share/tomcat7/skel/conf/
-debian/tomcat7-instance-create /usr/bin/
-debian/setenv.sh /usr/share/tomcat7/skel/bin/
diff --git a/debian/tomcat7.config b/debian/tomcat7.config
deleted file mode 100644
index ee8cad5..0000000
--- a/debian/tomcat7.config
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-
-set -e
-
-. /usr/share/debconf/confmodule
-
-CONFFILE="/etc/default/tomcat7"
-JAVA_OPTS="-Djava.awt.headless=true -Xmx128m"
-
-if [ -e "${CONFFILE}" ]
-then
-	. ${CONFFILE} || true
-
-	if [ -n "${TOMCAT7_USER}" ]; then
-		db_set tomcat7/username "${TOMCAT7_USER}"
-	fi
-
-	if [ -n "${TOMCAT7_GROUP}" ]; then
-		db_set tomcat7/groupname "${TOMCAT7_GROUP}"
-	fi
-
-	if [ -n "${JAVA_OPTS}" ]; then
-		db_set tomcat7/javaopts "${JAVA_OPTS}"
-	fi
-fi
-
-db_input low tomcat7/username || true
-db_input low tomcat7/groupname || true
-db_input low tomcat7/javaopts || true
-db_go
-
-db_stop
diff --git a/debian/tomcat7.dirs b/debian/tomcat7.dirs
deleted file mode 100644
index 5f1887b..0000000
--- a/debian/tomcat7.dirs
+++ /dev/null
@@ -1,8 +0,0 @@
-var/log/tomcat7
-var/lib/tomcat7/webapps
-var/lib/tomcat7/common/classes
-var/lib/tomcat7/server/classes
-var/lib/tomcat7/shared/classes
-var/cache/tomcat7
-etc/tomcat7/Catalina/localhost
-etc/logrotate.d
diff --git a/debian/tomcat7.install b/debian/tomcat7.install
deleted file mode 100644
index 682ec66..0000000
--- a/debian/tomcat7.install
+++ /dev/null
@@ -1,9 +0,0 @@
-conf/catalina.properties /etc/tomcat7/
-debian/logging.properties /etc/tomcat7/
-conf/*.xml /etc/tomcat7/
-debian/policy/*.policy /etc/tomcat7/policy.d/
-debian/default_root /usr/share/tomcat7-root/
-debian/defaults.template /usr/share/tomcat7/
-debian/defaults.md5sum /usr/share/tomcat7/
-debian/logrotate.template /usr/share/tomcat7/
-debian/logrotate.md5sum /usr/share/tomcat7/
diff --git a/debian/tomcat7.links b/debian/tomcat7.links
deleted file mode 100644
index 22b7c23..0000000
--- a/debian/tomcat7.links
+++ /dev/null
@@ -1,4 +0,0 @@
-/etc/tomcat7 /var/lib/tomcat7/conf
-/var/cache/tomcat7 /var/lib/tomcat7/work
-/var/log/tomcat7 /var/lib/tomcat7/logs
-/usr/share/doc/tomcat7-common/README.Debian /usr/share/doc/tomcat7/README.Debian
diff --git a/debian/tomcat7.postinst b/debian/tomcat7.postinst
deleted file mode 100644
index ef339db..0000000
--- a/debian/tomcat7.postinst
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/bin/sh
-set -e
-
-. /usr/share/debconf/confmodule
-TEMPLATE="/usr/share/tomcat7/defaults.template"
-CONFFILE="/etc/default/tomcat7"
-LR_TEMPLATE="/usr/share/tomcat7/logrotate.template"
-LR_CONFFILE="/etc/logrotate.d/tomcat7"
-JAVA_OPTS="-Djava.awt.headless=true -Xmx128m -XX:+UseConcMarkSweepGC"
-
-case "$1" in
-    configure)
-
-	# Generate $CONFFILE from debconf seetings and $TEMPLATE
-	db_version 2.0
-	db_get tomcat7/username && TOMCAT7_USER="$RET" || TOMCAT7_USER="tomcat7"
-	db_get tomcat7/groupname && TOMCAT7_GROUP="$RET" || TOMCAT7_GROUP="tomcat7"
-	db_get tomcat7/javaopts && JAVA_OPTS="$RET" || JAVA_OPTS="-Djava.awt.headless=true -Xmx128m -XX:+UseConcMarkSweepGC"
-
-	tmpfile=`mktemp /tmp/tomcat7.XXXXXXXXXX`
-	chmod 644 $tmpfile
-	cat $TEMPLATE \
-		| sed "s%^TOMCAT7_USER=.*$%TOMCAT7_USER=$TOMCAT7_USER%" \
-		| sed "s%^TOMCAT7_GROUP=.*$%TOMCAT7_GROUP=$TOMCAT7_GROUP%" \
-		| sed "s%^JAVA_OPTS=.*$%JAVA_OPTS=\"$JAVA_OPTS\"%" \
-		>> $tmpfile
-	ucf --debconf-ok --sum-file /usr/share/tomcat7/defaults.md5sum $tmpfile $CONFFILE
-	rm -f $tmpfile
-
-	if ! getent group "$TOMCAT7_GROUP" > /dev/null 2>&1 ; then
-	    addgroup --system "$TOMCAT7_GROUP" --quiet
-	fi
-	if ! id $TOMCAT7_USER > /dev/null 2>&1 ; then
-	    adduser --system --home /usr/share/tomcat7 --no-create-home \
-		--ingroup "$TOMCAT7_GROUP" --disabled-password --shell /bin/false \
-		"$TOMCAT7_USER"
-	fi
-	chown -R $TOMCAT7_USER:adm /var/log/tomcat7 /var/cache/tomcat7
-	chmod 750 /var/log/tomcat7 /var/cache/tomcat7
-
-	# populate /etc/logrotate.d/tomcat7
-	tmpfile=`mktemp /tmp/tomcat7.XXXXXXXXXX`
-	chmod 644 $tmpfile
-	cat $LR_TEMPLATE | sed "s%create 640 tomcat7 adm%create 640 $TOMCAT7_USER adm%" >> $tmpfile
-	ucf --debconf-ok --sum-file /usr/share/tomcat7/logrotate.md5sum $tmpfile $LR_CONFFILE
-	rm -f $tmpfile
-
-	# configuration files should not be modifiable by tomcat7 user, as this can be a security issue
-	# (an attacker may insert code in a webapp and have access to all tomcat configuration)
-	# but those files should be readable by tomcat7, so we set the group to tomcat7
-	chown -Rh root:$TOMCAT7_GROUP /etc/tomcat7/*
-	chmod 640 /etc/tomcat7/tomcat-users.xml
-	chown -Rh $TOMCAT7_USER:$TOMCAT7_GROUP /var/lib/tomcat7/webapps /var/lib/tomcat7/common /var/lib/tomcat7/server /var/lib/tomcat7/shared
-	chmod 775 /var/lib/tomcat7/webapps
-	chmod 775 /etc/tomcat7/Catalina /etc/tomcat7/Catalina/localhost
-
-	# Authorize user tomcat7 to open privileged ports via authbind.
-	TOMCAT_UID="`id -u $TOMCAT7_USER`"
-	if [ ! -f "/etc/authbind/byuid/$TOMCAT_UID" ]; then
-		if [ ! -d "/etc/authbind/byuid" ]; then
-			mkdir -p /etc/authbind/byuid
-			chmod 755 /etc/authbind
-			chmod 755 /etc/authbind/byuid
-		fi
-		echo '0.0.0.0/0:1,1023' >/etc/authbind/byuid/$TOMCAT_UID
-		chown $TOMCAT7_USER:$TOMCAT7_GROUP /etc/authbind/byuid/$TOMCAT_UID
-		chmod 700 /etc/authbind/byuid/$TOMCAT_UID
-	fi
-    ;;
-esac
-
-if [ ! -d /var/lib/tomcat7/webapps/ROOT ]; then
-    cp -r /usr/share/tomcat7-root/default_root /var/lib/tomcat7/webapps/ROOT
-fi
-
-#DEBHELPER#
diff --git a/debian/tomcat7.postrm.in b/debian/tomcat7.postrm.in
deleted file mode 100644
index de35c3a..0000000
--- a/debian/tomcat7.postrm.in
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/bin/sh
-set -e
-
-#DEBHELPER#
-
-CONFFILE=/etc/default/tomcat7
-LR_CONFFILE=/etc/logrotate.d/tomcat7
-
-# Remove cached files and auto-generated catalina.policy
-rm -rf /var/cache/tomcat7/*
-
-case "$1" in
-    remove)
-        # Remove ROOT webapp if not modified
-        RWLOC="/var/lib/tomcat7/webapps/ROOT"
-        RWFILES="$RWLOC/index.html $RWLOC/META-INF/context.xml"
-        if [ "`(cat $RWFILES | md5sum -) 2>/dev/null | cut -d ' ' -f 1`" \
-                            = "@ROOT_WEBAPP_MD5SUM@" ] ; then
-            rm $RWFILES
-            rmdir --ignore-fail-on-non-empty \
-                /var/lib/tomcat7/webapps/ROOT/META-INF \
-                /var/lib/tomcat7/webapps/ROOT \
-                /var/lib/tomcat7/webapps \
-                /var/lib/tomcat7 || true
-        fi
-        if [ -d /var/lib/tomcat7/common ] && [ -z "`(find var/lib/tomcat7/common/classes -type f)`" ] ; then
-            rmdir --ignore-fail-on-non-empty \
-                /var/lib/tomcat7/common/classes \
-                /var/lib/tomcat7/common || true
-        fi
-        if [ -d /var/lib/tomcat7/server ] && [ -z "`(find var/lib/tomcat7/server/classes -type f)`" ] ; then
-            rmdir --ignore-fail-on-non-empty \
-                /var/lib/tomcat7/server/classes \
-                /var/lib/tomcat7/server || true
-        fi
-        if [ -d /var/lib/tomcat7/shared ] && [ -z "`(find var/lib/tomcat7/shared/classes -type f)`" ] ; then
-            rmdir --ignore-fail-on-non-empty \
-                /var/lib/tomcat7/shared/classes \
-                /var/lib/tomcat7/shared || true
-        fi
-        if [ -d "/var/cache/tomcat7" ] ; then
-            rm -rf /var/cache/tomcat7
-        fi
-    ;;
-
-    purge)
-        # ignore errors during purge
-        set +e
-        if [ -x "/usr/bin/ucf" ]; then
-            ucf --purge $CONFFILE
-            ucf --purge $LR_CONFFILE
-        fi
-        rm -rf /var/log/tomcat7 /var/lib/tomcat7/temp $CONFFILE $LR_CONFFILE
-        if [ -d "/var/lib/tomcat7" ] ; then
-            rmdir --ignore-fail-on-non-empty /var/lib/tomcat7
-        fi
-        rmdir --ignore-fail-on-non-empty /etc/tomcat7/policy.d \
-          /etc/tomcat7/Catalina/localhost /etc/tomcat7/Catalina /etc/tomcat7
-        # clean up /etc/authbind after conffiles have been removed
-        rmdir --ignore-fail-on-non-empty /etc/authbind/byuid /etc/authbind
-        # Put all files owned by group tomcat7 back into root group before deleting
-        # the tomcat7 user and group
-        chown -Rhf root:root /etc/tomcat7/ || true
-        # Remove user/group and log files (don't remove everything under
-        # /var/lib/tomcat7 because there might be user-installed webapps)
-        db_get tomcat7/username && TOMCAT7_USER="$RET" || TOMCAT7_USER="tomcat7"
-        db_get tomcat7/groupname && TOMCAT7_GROUP="$RET" || TOMCAT7_GROUP="tomcat7"
-        deluser $TOMCAT7_USER
-        delgroup $TOMCAT7_GROUP
-
-        set -e
-    ;;
-
-    upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
-        # Nothing to do here
-    ;;
-
-    *)
-        echo "$0 called with unknown argument \`$1'" >&2
-        exit 1
-    ;;
-esac
diff --git a/debian/tomcat7.prerm b/debian/tomcat7.prerm
deleted file mode 100644
index 6bc7cd6..0000000
--- a/debian/tomcat7.prerm
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-set -e
-
-case "$1" in
-    remove)
-	[ -f /etc/default/tomcat7 ] && . /etc/default/tomcat7
-	[ -z "$TOMCAT7_USER" ] && TOMCAT7_USER="tomcat7"
-	# Remove auth for tomcat7 to open privileged ports via authbind.
-	TOMCAT_UID="`id -u $TOMCAT7_USER`"
-	if [ -f "/etc/authbind/byuid/$TOMCAT_UID" ]; then
-		rm -f /etc/authbind/byuid/$TOMCAT_UID
-	fi
-    ;;
-esac
-
-#DEBHELPER#
diff --git a/debian/tomcat8-admin.install b/debian/tomcat8-admin.install
new file mode 100644
index 0000000..43f7310
--- /dev/null
+++ b/debian/tomcat8-admin.install
@@ -0,0 +1,4 @@
+debian/context/manager.xml /etc/tomcat8/Catalina/localhost/
+output/build/webapps/manager /usr/share/tomcat8-admin/
+debian/context/host-manager.xml /etc/tomcat8/Catalina/localhost/
+output/build/webapps/host-manager /usr/share/tomcat8-admin/
diff --git a/debian/tomcat7-common.docs b/debian/tomcat8-common.docs
similarity index 100%
rename from debian/tomcat7-common.docs
rename to debian/tomcat8-common.docs
diff --git a/debian/tomcat8-common.install b/debian/tomcat8-common.install
new file mode 100644
index 0000000..eadf4de
--- /dev/null
+++ b/debian/tomcat8-common.install
@@ -0,0 +1,2 @@
+output/build/bin/bootstrap.jar /usr/share/tomcat8/bin/
+bin/* /usr/share/tomcat8/bin/
diff --git a/debian/tomcat8-common.links b/debian/tomcat8-common.links
new file mode 100644
index 0000000..48f9279
--- /dev/null
+++ b/debian/tomcat8-common.links
@@ -0,0 +1,6 @@
+/usr/share/java/tomcat-juli.jar /usr/share/tomcat8/bin/tomcat-juli.jar
+/usr/share/java/commons-dbcp.jar /usr/share/tomcat8/lib/commons-dbcp.jar
+/usr/share/java/commons-pool.jar /usr/share/tomcat8/lib/commons-pool.jar
+/usr/share/java/tomcat-el-api-2.2.jar /usr/share/tomcat8/lib/el-api.jar
+/usr/share/java/tomcat-jsp-api-2.2.jar /usr/share/tomcat8/lib/jsp-api.jar
+/usr/share/java/tomcat-servlet-api-3.0.jar /usr/share/tomcat8/lib/servlet-api.jar
diff --git a/debian/tomcat8-docs.doc-base b/debian/tomcat8-docs.doc-base
new file mode 100644
index 0000000..ec3c303
--- /dev/null
+++ b/debian/tomcat8-docs.doc-base
@@ -0,0 +1,10 @@
+Document: tomcat8
+Title: Apache Tomcat 8.0 Documentation
+Author: Apache Software Foundation
+Abstract: Documentation bundle for Apache Tomcat 8.0 Servlet/JSP container.
+Section: System/Administration
+
+Format: HTML
+Index: /usr/share/doc/tomcat8-docs/docs/index.html
+Files: /usr/share/doc/tomcat8-docs/docs/*
+
diff --git a/debian/tomcat8-docs.install b/debian/tomcat8-docs.install
new file mode 100644
index 0000000..c9845c3
--- /dev/null
+++ b/debian/tomcat8-docs.install
@@ -0,0 +1,2 @@
+debian/context/docs.xml /etc/tomcat8/Catalina/localhost/
+output/build/webapps/docs /usr/share/tomcat8-docs/
diff --git a/debian/tomcat8-docs.links b/debian/tomcat8-docs.links
new file mode 100644
index 0000000..6eed5cf
--- /dev/null
+++ b/debian/tomcat8-docs.links
@@ -0,0 +1 @@
+/usr/share/tomcat8-docs/docs /usr/share/doc/tomcat8-docs/docs
diff --git a/debian/tomcat8-examples.install b/debian/tomcat8-examples.install
new file mode 100644
index 0000000..19c5619
--- /dev/null
+++ b/debian/tomcat8-examples.install
@@ -0,0 +1,3 @@
+debian/context/examples.xml /etc/tomcat8/Catalina/localhost/
+output/build/webapps/examples /usr/share/tomcat8-examples/
+debian/policy/examples/*.policy /etc/tomcat8/policy.d/
diff --git a/debian/tomcat8-examples.links b/debian/tomcat8-examples.links
new file mode 100644
index 0000000..32f3553
--- /dev/null
+++ b/debian/tomcat8-examples.links
@@ -0,0 +1,2 @@
+/usr/share/java/jstl1.1.jar /usr/share/tomcat8-examples/examples/WEB-INF/lib/jstl.jar
+/usr/share/java/standard.jar /usr/share/tomcat8-examples/examples/WEB-INF/lib/standard.jar
diff --git a/debian/tomcat7-instance-create b/debian/tomcat8-instance-create
similarity index 96%
rename from debian/tomcat7-instance-create
rename to debian/tomcat8-instance-create
index 5abd752..831ca1f 100644
--- a/debian/tomcat7-instance-create
+++ b/debian/tomcat8-instance-create
@@ -115,21 +115,21 @@ mkdir "${TARGET}/logs"
 mkdir "${TARGET}/webapps"
 mkdir "${TARGET}/work"
 mkdir "${TARGET}/temp"
-cp -r /usr/share/tomcat7/skel/* "${TARGET}"
+cp -r /usr/share/tomcat8/skel/* "${TARGET}"
 
 sed -i -e "s/Connector port=\"8080\"/Connector port=\"${HPORT}\"/;s/Server port=\"8005\" shutdown=\"SHUTDOWN\"/Server port=\"${CPORT}\" shutdown=\"${CWORD}\"/" "${TARGET}/conf/server.xml"
 
 cat > "${TARGET}/bin/startup.sh" << EOT
 #!/bin/sh
 export CATALINA_BASE="${FULLTARGET}"
-/usr/share/tomcat7/bin/startup.sh
+/usr/share/tomcat8/bin/startup.sh
 echo "Tomcat started"
 EOT
 
 cat > "${TARGET}/bin/shutdown.sh" << EOT
 #!/bin/sh
 export CATALINA_BASE="${FULLTARGET}"
-/usr/share/tomcat7/bin/shutdown.sh
+/usr/share/tomcat8/bin/shutdown.sh
 echo "Tomcat stopped"
 EOT
 
diff --git a/debian/tomcat7-instance-create.1 b/debian/tomcat8-instance-create.1
similarity index 57%
rename from debian/tomcat7-instance-create.1
rename to debian/tomcat8-instance-create.1
index 402f6d9..ed76dda 100644
--- a/debian/tomcat7-instance-create.1
+++ b/debian/tomcat8-instance-create.1
@@ -1,12 +1,12 @@
-.TH "TOMCAT7-INSTANCE-CREATE" "2" "Feb 2010" "" ""
+.TH "TOMCAT8-INSTANCE-CREATE" "2" "Feb 2010" "" ""
 .SH "NAME"
-tomcat7\-instance\-create \- creates a Tomcat7 instance
+tomcat8\-instance\-create \- creates a Tomcat 8 instance
 .SH "SYNOPSIS"
-.B tomcat7\-instance\-create [\fIOPTIONS\fR] \fIDIRECTORYNAME\fR
+.B tomcat8\-instance\-create [\fIOPTIONS\fR] \fIDIRECTORYNAME\fR
 .SH "DESCRIPTION"
 The
-.B tomcat7\-instance\-create
-script creates a directory with all required Tomcat7 CATALINA_BASE elements so that a separate Tomcat 7 instance with its own configuration, libraries or web applications can be run by a user. bin/startup.sh and bin/shutdown.sh scripts are also generated to allow the instance to be started and stopped.
+.B tomcat8\-instance\-create
+script creates a directory with all required Tomcat 8 CATALINA_BASE elements so that a separate Tomcat 8 instance with its own configuration, libraries or web applications can be run by a user. bin/startup.sh and bin/shutdown.sh scripts are also generated to allow the instance to be started and stopped.
 .TP 
 .B DIRECTORYNAME
 The name of the directory where the instance will be created. It should not exist and will be created automatically.
diff --git a/debian/tomcat8-user.install b/debian/tomcat8-user.install
new file mode 100644
index 0000000..2bae791
--- /dev/null
+++ b/debian/tomcat8-user.install
@@ -0,0 +1,5 @@
+conf/*.xml /usr/share/tomcat8/skel/conf/
+conf/catalina.properties /usr/share/tomcat8/skel/conf/
+debian/logging.properties /usr/share/tomcat8/skel/conf/
+debian/tomcat8-instance-create /usr/bin/
+debian/setenv.sh /usr/share/tomcat8/skel/bin/
diff --git a/debian/tomcat8.config b/debian/tomcat8.config
new file mode 100644
index 0000000..f7e32d3
--- /dev/null
+++ b/debian/tomcat8.config
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+CONFFILE="/etc/default/tomcat8"
+JAVA_OPTS="-Djava.awt.headless=true -Xmx128m"
+
+if [ -e "${CONFFILE}" ]
+then
+	. ${CONFFILE} || true
+
+	if [ -n "${TOMCAT8_USER}" ]; then
+		db_set tomcat8/username "${TOMCAT8_USER}"
+	fi
+
+	if [ -n "${TOMCAT8_GROUP}" ]; then
+		db_set tomcat8/groupname "${TOMCAT8_GROUP}"
+	fi
+
+	if [ -n "${JAVA_OPTS}" ]; then
+		db_set tomcat8/javaopts "${JAVA_OPTS}"
+	fi
+fi
+
+db_input low tomcat8/username || true
+db_input low tomcat8/groupname || true
+db_input low tomcat8/javaopts || true
+db_go
+
+db_stop
diff --git a/debian/tomcat7.cron.daily b/debian/tomcat8.cron.daily
similarity index 98%
rename from debian/tomcat7.cron.daily
rename to debian/tomcat8.cron.daily
index afbe287..a6b0b74 100644
--- a/debian/tomcat7.cron.daily
+++ b/debian/tomcat8.cron.daily
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-NAME=tomcat7
+NAME=tomcat8
 DEFAULT=/etc/default/$NAME
 LOGEXT=log
 
diff --git a/debian/tomcat8.dirs b/debian/tomcat8.dirs
new file mode 100644
index 0000000..0795275
--- /dev/null
+++ b/debian/tomcat8.dirs
@@ -0,0 +1,8 @@
+var/log/tomcat8
+var/lib/tomcat8/webapps
+var/lib/tomcat8/common/classes
+var/lib/tomcat8/server/classes
+var/lib/tomcat8/shared/classes
+var/cache/tomcat8
+etc/tomcat8/Catalina/localhost
+etc/logrotate.d
diff --git a/debian/tomcat7.init b/debian/tomcat8.init
similarity index 88%
rename from debian/tomcat7.init
rename to debian/tomcat8.init
index 967ba23..711d82d 100644
--- a/debian/tomcat7.init
+++ b/debian/tomcat8.init
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# /etc/init.d/tomcat7 -- startup script for the Tomcat 6 servlet engine
+# /etc/init.d/tomcat8 -- startup script for the Tomcat 8 servlet engine
 #
 # Written by Miquel van Smoorenburg <miquels at cistron.nl>.
 # Modified for Debian GNU/Linux	by Ian Murdock <imurdock at gnu.ai.mit.edu>.
@@ -10,7 +10,7 @@
 # Additional improvements by Jason Brittain <jason.brittain at mulesoft.com>.
 #
 ### BEGIN INIT INFO
-# Provides:          tomcat7
+# Provides:          tomcat8
 # Required-Start:    $local_fs $remote_fs $network
 # Required-Stop:     $local_fs $remote_fs $network
 # Should-Start:      $named
@@ -24,10 +24,10 @@
 set -e
 
 PATH=/bin:/usr/bin:/sbin:/usr/sbin
-NAME=tomcat7
+NAME=tomcat8
 DESC="Tomcat servlet engine"
 DEFAULT=/etc/default/$NAME
-JVM_TMP=/tmp/tomcat7-$NAME-tmp
+JVM_TMP=/tmp/tomcat8-$NAME-tmp
 
 if [ `id -u` -ne 0 ]; then
 	echo "You need root privileges to run this script"
@@ -49,9 +49,9 @@ fi
 
 # The following variables can be overwritten in $DEFAULT
 
-# Run Tomcat 7 as this user ID and group ID
-TOMCAT7_USER=tomcat7
-TOMCAT7_GROUP=tomcat7
+# Run Tomcat 8 as this user ID and group ID
+TOMCAT8_USER=tomcat8
+TOMCAT8_GROUP=tomcat8
 
 # this is a work-around until there is a suitable runtime replacement 
 # for dpkg-architecture for arch:all packages
@@ -88,14 +88,14 @@ for jdir in $JDK_DIRS; do
 done
 export JAVA_HOME
 
-# Directory where the Tomcat 6 binary distribution resides
+# Directory where the Tomcat 8 binary distribution resides
 CATALINA_HOME=/usr/share/$NAME
 
 # Directory for per-instance configuration files and webapps
 CATALINA_BASE=/var/lib/$NAME
 
 # Use the Java security manager? (yes/no)
-TOMCAT7_SECURITY=no
+TOMCAT8_SECURITY=no
 
 # Default Java options
 # Set java.awt.headless=true if JAVA_OPTS is not set so the
@@ -124,13 +124,13 @@ if [ -z "$CATALINA_TMPDIR" ]; then
 	CATALINA_TMPDIR="$JVM_TMP"
 fi
 
-# Set the JSP compiler if set in the tomcat7.default file
+# Set the JSP compiler if set in the tomcat8.default file
 if [ -n "$JSP_COMPILER" ]; then
 	JAVA_OPTS="$JAVA_OPTS -Dbuild.compiler=\"$JSP_COMPILER\""
 fi
 
 SECURITY=""
-if [ "$TOMCAT7_SECURITY" = "yes" ]; then
+if [ "$TOMCAT8_SECURITY" = "yes" ]; then
 	SECURITY="-security"
 fi
 
@@ -171,9 +171,9 @@ catalina_sh() {
 	# Run the catalina.sh script as a daemon
 	set +e
 	touch "$CATALINA_PID" "$CATALINA_BASE"/logs/catalina.out
-	chown $TOMCAT7_USER "$CATALINA_PID" "$CATALINA_BASE"/logs/catalina.out
-	start-stop-daemon --start -b -u "$TOMCAT7_USER" -g "$TOMCAT7_GROUP" \
-		-c "$TOMCAT7_USER" -d "$CATALINA_TMPDIR" -p "$CATALINA_PID" \
+	chown $TOMCAT8_USER "$CATALINA_PID" "$CATALINA_BASE"/logs/catalina.out
+	start-stop-daemon --start -b -u "$TOMCAT8_USER" -g "$TOMCAT8_GROUP" \
+		-c "$TOMCAT8_USER" -d "$CATALINA_TMPDIR" -p "$CATALINA_PID" \
 		-x /bin/bash -- -c "$AUTHBIND_COMMAND $TOMCAT_SH"
 	status="$?"
 	set +a -e
@@ -194,12 +194,12 @@ case "$1" in
 
 	log_daemon_msg "Starting $DESC" "$NAME"
 	if start-stop-daemon --test --start --pidfile "$CATALINA_PID" \
-		--user $TOMCAT7_USER --exec "$JAVA_HOME/bin/java" \
+		--user $TOMCAT8_USER --exec "$JAVA_HOME/bin/java" \
 		>/dev/null; then
 
 		# Regenerate POLICY_CACHE file
 		umask 022
-		echo "// AUTO-GENERATED FILE from /etc/tomcat7/policy.d/" \
+		echo "// AUTO-GENERATED FILE from /etc/tomcat8/policy.d/" \
 			> "$POLICY_CACHE"
 		echo ""  >> "$POLICY_CACHE"
 		cat $CATALINA_BASE/conf/policy.d/*.policy \
@@ -211,12 +211,12 @@ case "$1" in
 			log_failure_msg "could not create JVM temporary directory"
 			exit 1
 		}
-		chown $TOMCAT7_USER "$JVM_TMP"
+		chown $TOMCAT8_USER "$JVM_TMP"
 
 		catalina_sh start $SECURITY
 		sleep 5
         	if start-stop-daemon --test --start --pidfile "$CATALINA_PID" \
-			--user $TOMCAT7_USER --exec "$JAVA_HOME/bin/java" \
+			--user $TOMCAT8_USER --exec "$JAVA_HOME/bin/java" \
 			>/dev/null; then
 			if [ -f "$CATALINA_PID" ]; then
 				rm -f "$CATALINA_PID"
@@ -236,7 +236,7 @@ case "$1" in
 	set +e
 	if [ -f "$CATALINA_PID" ]; then 
 		start-stop-daemon --stop --pidfile "$CATALINA_PID" \
-			--user "$TOMCAT7_USER" \
+			--user "$TOMCAT8_USER" \
 			--retry=TERM/20/KILL/5 >/dev/null
 		if [ $? -eq 1 ]; then
 			log_progress_msg "$DESC is not running but pid file exists, cleaning up"
@@ -256,7 +256,7 @@ case "$1" in
    status)
 	set +e
 	start-stop-daemon --test --start --pidfile "$CATALINA_PID" \
-		--user $TOMCAT7_USER --exec "$JAVA_HOME/bin/java" \
+		--user $TOMCAT8_USER --exec "$JAVA_HOME/bin/java" \
 		>/dev/null 2>&1
 	if [ "$?" = "0" ]; then
 
@@ -281,7 +281,7 @@ case "$1" in
 	;;
   try-restart)
         if start-stop-daemon --test --start --pidfile "$CATALINA_PID" \
-		--user $TOMCAT7_USER --exec "$JAVA_HOME/bin/java" \
+		--user $TOMCAT8_USER --exec "$JAVA_HOME/bin/java" \
 		>/dev/null; then
 		$0 start
 	fi
diff --git a/debian/tomcat8.install b/debian/tomcat8.install
new file mode 100644
index 0000000..71e7413
--- /dev/null
+++ b/debian/tomcat8.install
@@ -0,0 +1,9 @@
+conf/catalina.properties /etc/tomcat8/
+debian/logging.properties /etc/tomcat8/
+conf/*.xml /etc/tomcat8/
+debian/policy/*.policy /etc/tomcat8/policy.d/
+debian/default_root /usr/share/tomcat8-root/
+debian/defaults.template /usr/share/tomcat8/
+debian/defaults.md5sum /usr/share/tomcat8/
+debian/logrotate.template /usr/share/tomcat8/
+debian/logrotate.md5sum /usr/share/tomcat8/
diff --git a/debian/tomcat8.links b/debian/tomcat8.links
new file mode 100644
index 0000000..5173aaf
--- /dev/null
+++ b/debian/tomcat8.links
@@ -0,0 +1,4 @@
+/etc/tomcat8 /var/lib/tomcat8/conf
+/var/cache/tomcat8 /var/lib/tomcat8/work
+/var/log/tomcat8 /var/lib/tomcat8/logs
+/usr/share/doc/tomcat8-common/README.Debian /usr/share/doc/tomcat8/README.Debian
diff --git a/debian/tomcat8.postinst b/debian/tomcat8.postinst
new file mode 100644
index 0000000..9bb4e98
--- /dev/null
+++ b/debian/tomcat8.postinst
@@ -0,0 +1,76 @@
+#!/bin/sh
+set -e
+
+. /usr/share/debconf/confmodule
+TEMPLATE="/usr/share/tomcat8/defaults.template"
+CONFFILE="/etc/default/tomcat8"
+LR_TEMPLATE="/usr/share/tomcat8/logrotate.template"
+LR_CONFFILE="/etc/logrotate.d/tomcat8"
+JAVA_OPTS="-Djava.awt.headless=true -Xmx128m -XX:+UseConcMarkSweepGC"
+
+case "$1" in
+    configure)
+
+	# Generate $CONFFILE from debconf seetings and $TEMPLATE
+	db_version 2.0
+	db_get tomcat8/username && TOMCAT8_USER="$RET" || TOMCAT8_USER="tomcat8"
+	db_get tomcat8/groupname && TOMCAT8_GROUP="$RET" || TOMCAT8_GROUP="tomcat8"
+	db_get tomcat8/javaopts && JAVA_OPTS="$RET" || JAVA_OPTS="-Djava.awt.headless=true -Xmx128m -XX:+UseConcMarkSweepGC"
+
+	tmpfile=`mktemp /tmp/tomcat8.XXXXXXXXXX`
+	chmod 644 $tmpfile
+	cat $TEMPLATE \
+		| sed "s%^TOMCAT8_USER=.*$%TOMCAT8_USER=$TOMCAT8_USER%" \
+		| sed "s%^TOMCAT8_GROUP=.*$%TOMCAT8_GROUP=$TOMCAT8_GROUP%" \
+		| sed "s%^JAVA_OPTS=.*$%JAVA_OPTS=\"$JAVA_OPTS\"%" \
+		>> $tmpfile
+	ucf --debconf-ok --sum-file /usr/share/tomcat8/defaults.md5sum $tmpfile $CONFFILE
+	rm -f $tmpfile
+
+	if ! getent group "$TOMCAT8_GROUP" > /dev/null 2>&1 ; then
+	    addgroup --system "$TOMCAT8_GROUP" --quiet
+	fi
+	if ! id $TOMCAT8_USER > /dev/null 2>&1 ; then
+	    adduser --system --home /usr/share/tomcat8 --no-create-home \
+		--ingroup "$TOMCAT8_GROUP" --disabled-password --shell /bin/false \
+		"$TOMCAT8_USER"
+	fi
+	chown -R $TOMCAT8_USER:adm /var/log/tomcat8 /var/cache/tomcat8
+	chmod 750 /var/log/tomcat8 /var/cache/tomcat8
+
+	# populate /etc/logrotate.d/tomcat8
+	tmpfile=`mktemp /tmp/tomcat8.XXXXXXXXXX`
+	chmod 644 $tmpfile
+	cat $LR_TEMPLATE | sed "s%create 640 tomcat8 adm%create 640 $TOMCAT8_USER adm%" >> $tmpfile
+	ucf --debconf-ok --sum-file /usr/share/tomcat8/logrotate.md5sum $tmpfile $LR_CONFFILE
+	rm -f $tmpfile
+
+	# configuration files should not be modifiable by tomcat8 user, as this can be a security issue
+	# (an attacker may insert code in a webapp and have access to all tomcat configuration)
+	# but those files should be readable by tomcat8, so we set the group to tomcat8
+	chown -Rh root:$TOMCAT8_GROUP /etc/tomcat8/*
+	chmod 640 /etc/tomcat8/tomcat-users.xml
+	chown -Rh $TOMCAT8_USER:$TOMCAT8_GROUP /var/lib/tomcat8/webapps /var/lib/tomcat8/common /var/lib/tomcat8/server /var/lib/tomcat8/shared
+	chmod 775 /var/lib/tomcat8/webapps
+	chmod 775 /etc/tomcat8/Catalina /etc/tomcat8/Catalina/localhost
+
+	# Authorize user tomcat8 to open privileged ports via authbind.
+	TOMCAT_UID="`id -u $TOMCAT8_USER`"
+	if [ ! -f "/etc/authbind/byuid/$TOMCAT_UID" ]; then
+		if [ ! -d "/etc/authbind/byuid" ]; then
+			mkdir -p /etc/authbind/byuid
+			chmod 755 /etc/authbind
+			chmod 755 /etc/authbind/byuid
+		fi
+		echo '0.0.0.0/0:1,1023' >/etc/authbind/byuid/$TOMCAT_UID
+		chown $TOMCAT8_USER:$TOMCAT8_GROUP /etc/authbind/byuid/$TOMCAT_UID
+		chmod 700 /etc/authbind/byuid/$TOMCAT_UID
+	fi
+    ;;
+esac
+
+if [ ! -d /var/lib/tomcat8/webapps/ROOT ]; then
+    cp -r /usr/share/tomcat8-root/default_root /var/lib/tomcat8/webapps/ROOT
+fi
+
+#DEBHELPER#
diff --git a/debian/tomcat8.postrm.in b/debian/tomcat8.postrm.in
new file mode 100644
index 0000000..9d50993
--- /dev/null
+++ b/debian/tomcat8.postrm.in
@@ -0,0 +1,82 @@
+#!/bin/sh
+set -e
+
+#DEBHELPER#
+
+CONFFILE=/etc/default/tomcat8
+LR_CONFFILE=/etc/logrotate.d/tomcat8
+
+# Remove cached files and auto-generated catalina.policy
+rm -rf /var/cache/tomcat8/*
+
+case "$1" in
+    remove)
+        # Remove ROOT webapp if not modified
+        RWLOC="/var/lib/tomcat8/webapps/ROOT"
+        RWFILES="$RWLOC/index.html $RWLOC/META-INF/context.xml"
+        if [ "`(cat $RWFILES | md5sum -) 2>/dev/null | cut -d ' ' -f 1`" \
+                            = "@ROOT_WEBAPP_MD5SUM@" ] ; then
+            rm $RWFILES
+            rmdir --ignore-fail-on-non-empty \
+                /var/lib/tomcat8/webapps/ROOT/META-INF \
+                /var/lib/tomcat8/webapps/ROOT \
+                /var/lib/tomcat8/webapps \
+                /var/lib/tomcat8 || true
+        fi
+        if [ -d /var/lib/tomcat8/common ] && [ -z "`(find var/lib/tomcat8/common/classes -type f)`" ] ; then
+            rmdir --ignore-fail-on-non-empty \
+                /var/lib/tomcat8/common/classes \
+                /var/lib/tomcat8/common || true
+        fi
+        if [ -d /var/lib/tomcat8/server ] && [ -z "`(find var/lib/tomcat8/server/classes -type f)`" ] ; then
+            rmdir --ignore-fail-on-non-empty \
+                /var/lib/tomcat8/server/classes \
+                /var/lib/tomcat8/server || true
+        fi
+        if [ -d /var/lib/tomcat8/shared ] && [ -z "`(find var/lib/tomcat8/shared/classes -type f)`" ] ; then
+            rmdir --ignore-fail-on-non-empty \
+                /var/lib/tomcat8/shared/classes \
+                /var/lib/tomcat8/shared || true
+        fi
+        if [ -d "/var/cache/tomcat8" ] ; then
+            rm -rf /var/cache/tomcat8
+        fi
+    ;;
+
+    purge)
+        # ignore errors during purge
+        set +e
+        if [ -x "/usr/bin/ucf" ]; then
+            ucf --purge $CONFFILE
+            ucf --purge $LR_CONFFILE
+        fi
+        rm -rf /var/log/tomcat8 /var/lib/tomcat8/temp $CONFFILE $LR_CONFFILE
+        if [ -d "/var/lib/tomcat8" ] ; then
+            rmdir --ignore-fail-on-non-empty /var/lib/tomcat8
+        fi
+        rmdir --ignore-fail-on-non-empty /etc/tomcat8/policy.d \
+          /etc/tomcat8/Catalina/localhost /etc/tomcat8/Catalina /etc/tomcat8
+        # clean up /etc/authbind after conffiles have been removed
+        rmdir --ignore-fail-on-non-empty /etc/authbind/byuid /etc/authbind
+        # Put all files owned by group tomcat8 back into root group before deleting
+        # the tomcat8 user and group
+        chown -Rhf root:root /etc/tomcat8/ || true
+        # Remove user/group and log files (don't remove everything under
+        # /var/lib/tomcat8 because there might be user-installed webapps)
+        db_get tomcat8/username && TOMCAT8_USER="$RET" || TOMCAT8_USER="tomcat8"
+        db_get tomcat8/groupname && TOMCAT8_GROUP="$RET" || TOMCAT8_GROUP="tomcat8"
+        deluser $TOMCAT8_USER
+        delgroup $TOMCAT8_GROUP
+
+        set -e
+    ;;
+
+    upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+        # Nothing to do here
+    ;;
+
+    *)
+        echo "$0 called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
diff --git a/debian/tomcat8.prerm b/debian/tomcat8.prerm
new file mode 100644
index 0000000..3bebb25
--- /dev/null
+++ b/debian/tomcat8.prerm
@@ -0,0 +1,16 @@
+#!/bin/sh
+set -e
+
+case "$1" in
+    remove)
+	[ -f /etc/default/tomcat8 ] && . /etc/default/tomcat8
+	[ -z "$TOMCAT8_USER" ] && TOMCAT8_USER="tomcat8"
+	# Remove auth for tomcat8 to open privileged ports via authbind.
+	TOMCAT_UID="`id -u $TOMCAT8_USER`"
+	if [ -f "/etc/authbind/byuid/$TOMCAT_UID" ]; then
+		rm -f /etc/authbind/byuid/$TOMCAT_UID
+	fi
+    ;;
+esac
+
+#DEBHELPER#
diff --git a/debian/tomcat7.templates b/debian/tomcat8.templates
similarity index 56%
rename from debian/tomcat7.templates
rename to debian/tomcat8.templates
index de3c559..8dc3b07 100644
--- a/debian/tomcat7.templates
+++ b/debian/tomcat8.templates
@@ -1,23 +1,23 @@
-Template: tomcat7/username
+Template: tomcat8/username
 Type: string
-Default: tomcat7
-_Description: Dedicated system account for the tomcat7 daemon:
- The tomcat7 server must use a dedicated account for its operation so that
+Default: tomcat8
+_Description: Dedicated system account for the tomcat8 daemon:
+ The tomcat8 server must use a dedicated account for its operation so that
  the system's security is not compromised by running it with superuser
  privileges.
 
-Template: tomcat7/groupname
+Template: tomcat8/groupname
 Type: string
-Default: tomcat7
-_Description: Dedicated system group for the tomcat7 daemon:
- The tomcat7 server must use a dedicated group for its operation so that
+Default: tomcat8
+_Description: Dedicated system group for the tomcat8 daemon:
+ The tomcat8 server must use a dedicated group for its operation so that
  the system's security is not compromised by running it with superuser
  privileges.
 
-Template: tomcat7/javaopts
+Template: tomcat8/javaopts
 Type: string
 Default: -Djava.awt.headless=true -Xmx128m -XX:+UseConcMarkSweepGC
-_Description: Please choose the tomcat7 JVM Java options:
+_Description: Please choose the tomcat8 JVM Java options:
  Tomcat's JVM will be launched with a specific set of Java options.
  .
  Note that if you use -XX:+UseConcMarkSweepGC you should add the

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/tomcat8.git



More information about the pkg-java-commits mailing list