[libspring-java] 01/01: Upload to unstable
Miguel Landaeta
nomadium at moszumanska.debian.org
Sun Aug 16 18:41:09 UTC 2015
This is an automated email from the git hooks/post-receive script.
nomadium pushed a commit to branch master
in repository libspring-java.
commit 51186e23ba80e9ecfc90ca341229796b39962509
Author: Miguel Landaeta <nomadium at debian.org>
Date: Sun Aug 16 20:33:57 2015 +0200
Upload to unstable
---
debian/changelog | 9 ++
debian/patches/0029-use-jruby-core.patch | 10 +-
debian/patches/0030-tomcat7-compatibility.patch | 151 ++++++++++++++++++++++++
debian/patches/series | 1 +
4 files changed, 168 insertions(+), 3 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 18a4b69..48fd8f2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+libspring-java (3.2.13-3) unstable; urgency=medium
+
+ * Fix FTBFS with gradle 2.5.x:
+ - Refresh d/p/0029-use-jruby-core.patch.
+ * Add compatibility with recent tomcat7 releases:
+ - Add d/p/0030-tomcat7-compatibility.patch.
+
+ -- Miguel Landaeta <nomadium at debian.org> Sun, 16 Aug 2015 19:35:43 +0200
+
libspring-java (3.2.13-2) unstable; urgency=medium
* Use jruby-core Maven artifact instead jruby one. (Closes: #788768).
diff --git a/debian/patches/0029-use-jruby-core.patch b/debian/patches/0029-use-jruby-core.patch
index 12f50e9..5428a86 100644
--- a/debian/patches/0029-use-jruby-core.patch
+++ b/debian/patches/0029-use-jruby-core.patch
@@ -1,11 +1,11 @@
Description: Use jruby-core maven artifact instead jruby main one
Author: Miguel Landaeta <nomadium at debian.org>
Forwarded: no
-Last-Update: 2015-06-20
+Last-Update: 2015-08-16
--- a/build.gradle
+++ b/build.gradle
-@@ -340,7 +340,7 @@
+@@ -340,10 +340,10 @@ project("spring-context") {
optional("org.aspectj:aspectjweaver:${aspectjVersion}")
optional("org.codehaus.groovy:groovy-all:1.x")
optional("org.beanshell:bsh:debian")
@@ -13,4 +13,8 @@ Last-Update: 2015-06-20
+ optional("org.jruby:jruby-core:debian") {
exclude group: 'org.jruby.joni', module: 'joni'
exclude group: 'org.jruby.extras', module: 'jnr-netdb'
- exclude group: 'org.jruby.extras', module: 'bytelist'
+- exclude group: 'org.jruby.extras', module: 'bytelist'
++ //exclude group: 'org.jruby.extras', module: 'bytelist'
+ }
+ testCompile("javax.inject:javax.inject-tck:1")
+ testCompile("commons-dbcp:commons-dbcp:debian")
diff --git a/debian/patches/0030-tomcat7-compatibility.patch b/debian/patches/0030-tomcat7-compatibility.patch
new file mode 100644
index 0000000..a625638
--- /dev/null
+++ b/debian/patches/0030-tomcat7-compatibility.patch
@@ -0,0 +1,151 @@
+Description: Add support for Tomcat 7.0.63+
+Author: Juergen Hoeller <jhoeller at pivotal.io>
+Origin: upstream, https://github.com/spring-projects/spring-framework/commit/37f74e76f674e175813f36d3562a9333d7c6654e
+Last-Update: 2015-08-16
+
+--- /dev/null
++++ libspring-java-3.2.13/spring-instrument-tomcat/src/main/java/org/apache/catalina/loader/WebappClassLoader.java
+@@ -0,0 +1,44 @@
++/*
++ * Copyright 2002-2015 the original author or authors.
++ *
++ * Licensed 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.
++ */
++
++package org.apache.catalina.loader;
++
++/**
++ * A mock of Tomcat's {@code WebappClassLoader} just for Spring's compilation purposes.
++ * Exposes both pre-7.0.63 as well as 7.0.63+ variants of {@code findResourceInternal}.
++ *
++ * @author Juergen Hoeller
++ * @since 4.2
++ */
++public class WebappClassLoader extends ClassLoader {
++
++ public WebappClassLoader() {
++ }
++
++ public WebappClassLoader(ClassLoader parent) {
++ super(parent);
++ }
++
++
++ protected ResourceEntry findResourceInternal(String name, String path) {
++ throw new UnsupportedOperationException();
++ }
++
++ protected ResourceEntry findResourceInternal(String name, String path, boolean manifestRequired) {
++ throw new UnsupportedOperationException();
++ }
++
++}
+--- libspring-java-3.2.13.orig/spring-instrument-tomcat/src/main/java/org/springframework/instrument/classloading/tomcat/TomcatInstrumentableClassLoader.java
++++ libspring-java-3.2.13/spring-instrument-tomcat/src/main/java/org/springframework/instrument/classloading/tomcat/TomcatInstrumentableClassLoader.java
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright 2002-2013 the original author or authors.
++ * Copyright 2002-2015 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+@@ -30,11 +30,10 @@ import org.springframework.instrument.cl
+ * to loaded classes without the need to use a VM-wide agent.
+ *
+ * <p>To be registered using a
+- * {@code <a href="http://tomcat.apache.org/tomcat-5.5-doc/config/loader.html">Loader</a>} tag
+- * in Tomcat's {@code <a href="http://tomcat.apache.org/tomcat-5.5-doc/config/context.html">Context</a>}
++ * {@code <a href="http://tomcat.apache.org/tomcat-6.0-doc/config/loader.html">Loader</a>} tag
++ * in Tomcat's {@code <a href="http://tomcat.apache.org/tomcat-6.0-doc/config/context.html">Context</a>}
+ * definition in the {@code server.xml} file, with the Spring-provided "spring-instrument-tomcat.jar"
+- * file deployed into Tomcat's "server/lib" (for Tomcat 5.x) or "lib" (for Tomcat 6.x) directory.
+- * The required configuration tag looks as follows:
++ * file deployed into Tomcat's "lib" directory. The required configuration tag looks as follows:
+ *
+ * <pre class="code"><Loader loaderClass="org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader"/></pre>
+ *
+@@ -44,10 +43,10 @@ import org.springframework.instrument.cl
+ * {@code getThrowawayClassLoader} methods mirror the corresponding methods
+ * in the LoadTimeWeaver interface, as expected by ReflectiveLoadTimeWeaver.
+ *
+- * <p>See the PetClinic sample application for a full example of this
+- * ClassLoader in action.
+- *
+- * <p><b>NOTE:</b> Requires Apache Tomcat version 5.0 or higher.
++ * <p><b>NOTE:</b> Requires Apache Tomcat version 6.0 or higher, as of Spring 4.0.
++ * This class is not intended to work on Tomcat 8.0+; please rely on Tomcat's own
++ * {@code InstrumentableClassLoader} facility instead, as autodetected by Spring's
++ * {@link org.springframework.instrument.classloading.tomcat.TomcatLoadTimeWeaver}.
+ *
+ * @author Costin Leau
+ * @author Juergen Hoeller
+@@ -55,6 +54,7 @@ import org.springframework.instrument.cl
+ * @see #addTransformer
+ * @see #getThrowawayClassLoader
+ * @see org.springframework.instrument.classloading.ReflectiveLoadTimeWeaver
++ * @see org.springframework.instrument.classloading.tomcat.TomcatLoadTimeWeaver
+ */
+ public class TomcatInstrumentableClassLoader extends WebappClassLoader {
+
+@@ -103,13 +103,13 @@ public class TomcatInstrumentableClassLo
+ */
+ public ClassLoader getThrowawayClassLoader() {
+ WebappClassLoader tempLoader = new WebappClassLoader();
+- // Use reflection to copy all the fields since most of them are private on pre-5.5 Tomcat.
++ // Use reflection to copy all the fields since they are not exposed any other way.
+ shallowCopyFieldState(this, tempLoader);
+ return tempLoader;
+ }
+
+
+- @Override
++ @Override // overriding the pre-7.0.63 variant of findResourceInternal
+ protected ResourceEntry findResourceInternal(String name, String path) {
+ ResourceEntry entry = super.findResourceInternal(name, path);
+ if (entry != null && entry.binaryContent != null && path.endsWith(CLASS_SUFFIX)) {
+@@ -119,11 +119,19 @@ public class TomcatInstrumentableClassLo
+ return entry;
+ }
+
++ @Override // overriding the 7.0.63+ variant of findResourceInternal
++ protected ResourceEntry findResourceInternal(String name, String path, boolean manifestRequired) {
++ ResourceEntry entry = super.findResourceInternal(name, path, manifestRequired);
++ if (entry != null && entry.binaryContent != null && path.endsWith(CLASS_SUFFIX)) {
++ String className = (name.endsWith(CLASS_SUFFIX) ? name.substring(0, name.length() - CLASS_SUFFIX.length()) : name);
++ entry.binaryContent = this.weavingTransformer.transformIfNecessary(className, entry.binaryContent);
++ }
++ return entry;
++ }
++
+ @Override
+ public String toString() {
+- StringBuilder sb = new StringBuilder(getClass().getName());
+- sb.append("\r\n").append(super.toString());
+- return sb.toString();
++ return getClass().getName() + "\r\n" + super.toString();
+ }
+
+
+--- libspring-java-3.2.13.orig/build.gradle
++++ libspring-java-3.2.13/build.gradle
+@@ -317,6 +317,10 @@ project("spring-instrument-tomcat") {
+ dependencies {
+ provided("org.apache.tomcat:tomcat-catalina:8.x")
+ }
++
++ jar {
++ exclude("org/apache/**") // exclude the mock used to bridge between pre-7.0.63 and 7.0.63+
++ }
+ }
+
+ project("spring-context") {
diff --git a/debian/patches/series b/debian/patches/series
index bc36023..14eb911 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -12,3 +12,4 @@
0027-disable-jcache-support.patch
0028-disable-jdiff-report.patch
0029-use-jruby-core.patch
+0030-tomcat7-compatibility.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/libspring-java.git
More information about the pkg-java-commits
mailing list