Package: tomcat7 Severity: wishlist Tags: patch Dear Maintainer, >From Ubuntu we are updating some packages to show OS distribution when showing version of some packages. Related spec: https://blueprints.launchpad.net/ubuntu/+spec/servercloud-s-server-app-banner-updates
-- System Information: Debian Release: wheezy/sid APT prefers trusty-updates APT policy: (500, 'trusty-updates'), (500, 'trusty-security'), (500, 'trusty'), (100, 'trusty-backports') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.8.0-27-generic (SMP w/4 CPU cores) Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash
diff -Nru tomcat7-7.0.42/debian/changelog tomcat7-7.0.42/debian/changelog --- tomcat7-7.0.42/debian/changelog 2013-11-18 08:26:09.000000000 +0000 +++ tomcat7-7.0.42/debian/changelog 2013-11-18 08:30:23.000000000 +0000 @@ -1,3 +1,10 @@ +tomcat7 (7.0.42-2) unstable; urgency=low + + * debian/patches/fix-distribution.patch: show distribution instead of OS name + * debian/control: add lsb-release as dependency + + -- Yolanda Robla <yolanda.ro...@canonical.com> Mon, 18 Nov 2013 08:29:07 +0000 + tomcat7 (7.0.42-1) unstable; urgency=low [ Gianfranco Costamagna ] diff -Nru tomcat7-7.0.42/debian/control tomcat7-7.0.42/debian/control --- tomcat7-7.0.42/debian/control 2013-11-18 08:26:09.000000000 +0000 +++ tomcat7-7.0.42/debian/control 2013-11-18 08:30:51.000000000 +0000 @@ -16,7 +16,7 @@ Package: tomcat7-common Architecture: all -Depends: libtomcat7-java (>= ${source:Version}), ${misc:Depends}, +Depends: libtomcat7-java (>= ${source:Version}), ${misc:Depends}, lsb-release, 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) diff -Nru tomcat7-7.0.42/debian/patches/fix-distribution.patch tomcat7-7.0.42/debian/patches/fix-distribution.patch --- tomcat7-7.0.42/debian/patches/fix-distribution.patch 1970-01-01 00:00:00.000000000 +0000 +++ tomcat7-7.0.42/debian/patches/fix-distribution.patch 2013-11-18 08:35:31.000000000 +0000 @@ -0,0 +1,45 @@ +Description: + Show distribution name instead of operating system name + when showing Tomcat version +Author: Yolanda Robla <yolanda.ro...@canonical.com> +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ + +Index: tomcat7_new/java/org/apache/catalina/util/ServerInfo.java +=================================================================== +--- tomcat7_new.orig/java/org/apache/catalina/util/ServerInfo.java 2013-11-11 20:25:23.063895000 +0000 ++++ tomcat7_new/java/org/apache/catalina/util/ServerInfo.java 2013-11-11 20:25:23.063895000 +0000 +@@ -21,6 +21,8 @@ + + import java.io.InputStream; + import java.util.Properties; ++import java.util.Scanner; ++import java.io.IOException; + + import org.apache.tomcat.util.ExceptionUtils; + +@@ -112,8 +114,22 @@ + System.out.println("Server version: " + getServerInfo()); + System.out.println("Server built: " + getServerBuilt()); + System.out.println("Server number: " + getServerNumber()); +- System.out.println("OS Name: " + +- System.getProperty("os.name")); ++ ++ String distribution = null; ++ try { ++ Process process = Runtime.getRuntime().exec("lsb_release -si"); ++ InputStream is = process.getInputStream(); ++ distribution = new Scanner(is, "UTF-8").useDelimiter("\\A").next(); ++ ++ if (distribution==null) ++ { ++ distribution = System.getProperty("os.name")+"nodistrib"; ++ } ++ } catch(IOException e) { ++ distribution = System.getProperty("os.name")+e.toString(); ++ } ++ ++ System.out.println("OS Name: " + distribution); + System.out.println("OS Version: " + + System.getProperty("os.version")); + System.out.println("Architecture: " + diff -Nru tomcat7-7.0.42/debian/patches/series tomcat7-7.0.42/debian/patches/series --- tomcat7-7.0.42/debian/patches/series 2013-11-18 08:26:09.000000000 +0000 +++ tomcat7-7.0.42/debian/patches/series 2013-11-18 08:30:34.000000000 +0000 @@ -11,3 +11,4 @@ 0014-JDTCompiler.patch 0015_disable_test_TestCometProcessor.patch 0017-use-jdbc-pool-default.patch +fix-distribution.patch