[clojure] 06/11: No longer use the system ASM to avoid runtime conflicts

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Thu Dec 22 16:28:27 UTC 2016


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

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

commit f256911494086055453fe53afc1b9c9b2da24880
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Thu Dec 22 16:10:41 2016 +0100

    No longer use the system ASM to avoid runtime conflicts
---
 debian/README.Debian                |   5 -
 debian/changelog                    |   2 +-
 debian/control                      |   2 -
 debian/copyright                    |  33 ++++++-
 debian/maven.rules                  |   1 -
 debian/patches/01-replace-asm.patch | 189 ------------------------------------
 debian/patches/series               |   1 -
 debian/rules                        |   2 +-
 8 files changed, 30 insertions(+), 205 deletions(-)

diff --git a/debian/README.Debian b/debian/README.Debian
index 1495a98..88ba70a 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -1,11 +1,6 @@
 clojure for Debian
 ------------------
 
-To avoid code duplication, this package uses the libasm-java package
-rather than Clojure's private version of asm.  The clojure.jar file
-includes a Class-Path attribute so that the necessary dependencies
-will be brought in automatically when clojure.jar is on the classpath.
-
 This package includes two convenience scripts that correspond with
 Clojure's two main entry points: clojure (clojure.main) and clojurec
 (clojure.lang.Compile).
diff --git a/debian/changelog b/debian/changelog
index 8af0f48..d1aa12e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,9 +3,9 @@ clojure1.8 (1.8.0-1) UNRELEASED; urgency=medium
   * Team upload.
   * New upstream release
     - Rename the package to clojure1.8
-    - Refreshed the patch
     - Increased the priority of the alternatives
   * Moved the library to its own libclojure1.8-java package
+  * No longer use the system ASM to avoid runtime conflicts
 
  -- Emmanuel Bourg <ebourg at apache.org>  Thu, 22 Dec 2016 15:38:43 +0100
 
diff --git a/debian/control b/debian/control
index 22d1f7a..674f5bb 100644
--- a/debian/control
+++ b/debian/control
@@ -8,7 +8,6 @@ Build-Depends:
  debhelper (>= 10),
  default-jdk,
  javahelper,
- libasm-java (>= 5.0),
  libtext-markdown-perl | markdown,
  maven-repo-helper,
  rename
@@ -45,7 +44,6 @@ Description: Lisp dialect for the JVM
 Package: libclojure1.8-java
 Architecture: all
 Depends:
- libasm-java (>= 5.0),
  libjsr166y-java,
  ${misc:Depends}
 Section: java
diff --git a/debian/copyright b/debian/copyright
index 5511fce..0687aa0 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -15,16 +15,39 @@ Files: src/jvm/clojure/lang/Murmur3.java
 Copyright: Copyright (C) 2011 The Guava Authors
 License: Apache-2
 
+Files: src/jvm/clojure/asm/*
+Copyright: 2000-2011 INRIA, France Telecom
+License: BSD-3-clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ .
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+ 3. Neither the name of the copyright holders nor the names of its
+    contributors may be used to endorse or promote products derived from
+    this software without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ THE POSSIBILITY OF SUCH DAMAGE.
+
 Files: debian/*
 Copyright: Copyright (C) 2010 Peter Collingbourne <peter at pcc.me.uk>
            Copyright (C) 2011 Daigo Moriwaki <daigo at debian.org>
 License: GPL-2+
 
-Files: debian/patches/*
-Copyright: Copyright (C) 2010 Peter Collingbourne <peter at pcc.me.uk>
-           Copyright (C) 2011 Daigo Moriwaki <daigo at debian.org>
-License: EPL-1
-
 License: EPL-1
                        Eclipse Public License - v 1.0
  .
diff --git a/debian/maven.rules b/debian/maven.rules
index bc00d0b..7b7cdaf 100644
--- a/debian/maven.rules
+++ b/debian/maven.rules
@@ -1,2 +1 @@
-asm * * s/.*/3.x/
 * clojure * s/([0-9]+)\.([0-9]+).*/$1.$2.x/
diff --git a/debian/patches/01-replace-asm.patch b/debian/patches/01-replace-asm.patch
deleted file mode 100644
index cc73c0c..0000000
--- a/debian/patches/01-replace-asm.patch
+++ /dev/null
@@ -1,189 +0,0 @@
-Description: Use the version of ASM in Debian
-Forwarded: not-needed
---- a/build.xml
-+++ b/build.xml
-@@ -40,6 +40,7 @@
-   <target name="compile-java" depends="init"
-           description="Compile Java sources.">
-     <javac srcdir="${jsrc}" destdir="${build}" includeJavaRuntime="yes"
-+           classpath="/usr/share/java/asm.jar:/usr/share/java/asm-commons.jar"
-            includeAntRuntime="false"
-            debug="true" source="1.6" target="1.6"/>
-   </target>
-@@ -47,7 +48,7 @@
-   <target name="compile-clojure"
-           description="Compile Clojure sources.">
-     <java classname="clojure.lang.Compile"
--          classpath="${maven.compile.classpath}:${build}:${cljsrc}"
-+          classpath="/usr/share/java/asm.jar:/usr/share/java/asm-commons.jar:${maven.compile.classpath}:${build}:${cljsrc}"
-           failonerror="true"
-           fork="true">
-       <sysproperty key="clojure.compile.path" value="${build}"/>
-@@ -92,7 +93,7 @@
-            debug="true" source="1.6" target="1.6" includeantruntime="no"/>
-     <echo>Direct linking = ${directlinking}</echo>
-     <java classname="clojure.lang.Compile"
--          classpath="${test-classes}:${test}:${build}:${cljsrc}"
-+          classpath="/usr/share/java/asm.jar:/usr/share/java/asm-commons.jar:${test-classes}:${test}:${build}:${cljsrc}"
-           failonerror="true"
- 	  fork="true">
-       <sysproperty key="clojure.compile.path" value="${test-classes}"/>
-@@ -116,6 +117,8 @@
-       <sysproperty key="clojure.compiler.direct-linking" value="${directlinking}"/>
-       <classpath>
-         <pathelement path="${maven.test.classpath}"/>
-+        <path location="/usr/share/java/asm.jar"/>
-+        <path location="/usr/share/java/asm-commons.jar"/>
-         <path location="${test-classes}"/>
-         <path location="${test}"/>
-         <path location="${build}"/>
-@@ -158,7 +161,7 @@
-       </fileset>
-       <manifest>
-         <attribute name="Main-Class" value="clojure.main"/>
--        <attribute name="Class-Path" value="."/>
-+        <attribute name="Class-Path" value="asm.jar asm-commons.jar jsr166y.jar"/>
-       </manifest>
-     </jar>
-     <copy file="${clojure_jar}" tofile="${clojure_noversion_jar}"/>
---- a/src/clj/clojure/core.clj
-+++ b/src/clj/clojure/core.clj
-@@ -5246,10 +5246,10 @@
-                    (.getAnnotation c java.lang.annotation.Retention)] 
-           (= (.value r) java.lang.annotation.RetentionPolicy/RUNTIME)))))
- 
--(defn- descriptor [^Class c] (clojure.asm.Type/getDescriptor c))
-+(defn- descriptor [^Class c] (org.objectweb.asm.Type/getDescriptor c))
- 
- (declare process-annotation)
--(defn- add-annotation [^clojure.asm.AnnotationVisitor av name v]
-+(defn- add-annotation [^org.objectweb.asm.AnnotationVisitor av name v]
-   (cond
-    (vector? v) (let [avec (.visitArray av name)]
-                  (doseq [vval v]
-@@ -5259,7 +5259,7 @@
-                  (cond 
-                   (instance? java.lang.Enum ev)
-                   (.visitEnum av name (descriptor (class ev)) (str ev))
--                  (class? ev) (.visit av name (clojure.asm.Type/getType ev))
-+                  (class? ev) (.visit av name (org.objectweb.asm.Type/getType ev))
-                   :else (throw (IllegalArgumentException. 
-                                 (str "Unsupported annotation value: " v " of class " (class ev))))))
-    (seq? v) (let [[nested nv] v
---- a/src/clj/clojure/core_proxy.clj
-+++ b/src/clj/clojure/core_proxy.clj
-@@ -11,9 +11,9 @@
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;; proxy ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- 
- (import
-- '(clojure.asm ClassWriter ClassVisitor Opcodes Type) 
-+ '(org.objectweb.asm ClassWriter ClassVisitor Opcodes Type) 
-  '(java.lang.reflect Modifier Constructor)
-- '(clojure.asm.commons Method GeneratorAdapter)
-+ '(org.objectweb.asm.commons Method GeneratorAdapter)
-  '(clojure.lang IProxy Reflector DynamicClassLoader IPersistentMap PersistentHashMap RT))
- 
- (defn method-sig [^java.lang.reflect.Method meth]
---- a/src/clj/clojure/genclass.clj
-+++ b/src/clj/clojure/genclass.clj
-@@ -9,8 +9,8 @@
- (in-ns 'clojure.core)
- 
- (import '(java.lang.reflect Modifier Constructor)
--        '(clojure.asm ClassWriter ClassVisitor Opcodes Type)
--        '(clojure.asm.commons Method GeneratorAdapter)
-+        '(org.objectweb.asm ClassWriter ClassVisitor Opcodes Type)
-+        '(org.objectweb.asm.commons Method GeneratorAdapter)
-         '(clojure.lang IPersistentMap))
- 
- ;(defn method-sig [^java.lang.reflect.Method meth]
---- a/src/jvm/clojure/lang/Compiler.java
-+++ b/src/jvm/clojure/lang/Compiler.java
-@@ -12,11 +12,13 @@
- 
- package clojure.lang;
- 
--//*
-+/*
-+
-+import org.objectweb.asm.*;
-+import org.objectweb.asm.commons.GeneratorAdapter;
-+import org.objectweb.asm.commons.Method;
- 
--import clojure.asm.*;
--import clojure.asm.commons.GeneratorAdapter;
--import clojure.asm.commons.Method;
-+*/
- 
- import java.io.*;
- import java.lang.reflect.Constructor;
-@@ -26,14 +28,15 @@
- import java.util.regex.Matcher;
- 
- //*/
--/*
-+///*
- 
- import org.objectweb.asm.*;
- import org.objectweb.asm.commons.Method;
- import org.objectweb.asm.commons.GeneratorAdapter;
-+/*
- import org.objectweb.asm.util.TraceClassVisitor;
- import org.objectweb.asm.util.CheckClassAdapter;
--//*/
-+*/
- 
- public class Compiler implements Opcodes{
- 
---- a/src/jvm/clojure/lang/Intrinsics.java
-+++ b/src/jvm/clojure/lang/Intrinsics.java
-@@ -12,7 +12,7 @@
- 
- package clojure.lang;
- 
--import clojure.asm.Opcodes;
-+import org.objectweb.asm.Opcodes;
- 
- public class Intrinsics implements Opcodes{
- private static Object[] oa(Object... arr){
---- a/src/clj/clojure/reflect/java.clj
-+++ b/src/clj/clojure/reflect/java.clj
-@@ -11,7 +11,7 @@
- 
- (require '[clojure.set :as set]
-          '[clojure.string :as str])
--(import '[clojure.asm ClassReader ClassVisitor Type Opcodes]
-+(import '[org.objectweb.asm ClassReader ClassVisitor Type Opcodes]
-          '[java.lang.reflect Modifier]
-          java.io.InputStream)
- 
---- a/test/clojure/test_clojure/reflect.clj
-+++ b/test/clojure/test_clojure/reflect.clj
-@@ -26,7 +26,7 @@
- 
- (deftest field-descriptor->class-symbol-test
-   (are [s d] (= s (@#'reflect/field-descriptor->class-symbol d))
--       'clojure.asm.Type<><> "[[Lclojure/asm/Type;"
-+       'org.objectweb.asm.Type<><> "[[Lorg.objectweb/asm/Type;"
-        'int "I"
-        'java.lang.Object "Ljava.lang.Object;"))
- 
---- a/pom.xml
-+++ b/pom.xml
-@@ -73,6 +73,16 @@
-         </exclusion>
-       </exclusions>
-     </dependency>
-+    <dependency>
-+      <groupId>org.ow2.asm</groupId>
-+      <artifactId>asm</artifactId>
-+      <version>5.0.3</version>
-+    </dependency>
-+    <dependency>
-+      <groupId>org.ow2.asm</groupId>
-+      <artifactId>asm-commons</artifactId>
-+      <version>5.0.3</version>
-+    </dependency>
-   </dependencies>
- 
-   <build>
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 63dcdee..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1 +0,0 @@
-01-replace-asm.patch
diff --git a/debian/rules b/debian/rules
index 6da9cae..42ec417 100755
--- a/debian/rules
+++ b/debian/rules
@@ -18,7 +18,7 @@ override_dh_auto_build:
 	cat debian/footer.html >> changes.html
 
 override_dh_install:
-	$(JAVA_HOME)/bin/java -cp /usr/share/java/asm.jar:/usr/share/java/asm-commons.jar:clojure.jar clojure.main debian/gencompletions.clj > debian/$(SOURCE)/etc/rlwrap/clojure$(VER)
+	$(JAVA_HOME)/bin/java -cp clojure.jar clojure.main debian/gencompletions.clj > debian/$(SOURCE)/etc/rlwrap/clojure$(VER)
 
 	dh_install
 

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



More information about the pkg-java-commits mailing list