[pkg-java] r16511 - in trunk/jarjar/debian: . patches
Damien Raude-Morvan
drazzib at alioth.debian.org
Mon Apr 8 20:41:24 UTC 2013
Author: drazzib
Date: 2013-04-08 20:41:24 +0000 (Mon, 08 Apr 2013)
New Revision: 16511
Added:
trunk/jarjar/debian/patches/szzepiq_jar_resources.diff
Removed:
trunk/jarjar/debian/patches/0003-fix-path-in-build.xml.patch
trunk/jarjar/debian/patches/0004-support-gnu-regexp.patch
trunk/jarjar/debian/patches/0005-cast-null-to-java.io.File.patch
trunk/jarjar/debian/source.fetch
Modified:
trunk/jarjar/debian/ant.properties
trunk/jarjar/debian/changelog
trunk/jarjar/debian/control
trunk/jarjar/debian/orig-tar.sh
trunk/jarjar/debian/patches/0001-fix-build.xml.patch
trunk/jarjar/debian/patches/0002-embed-libs-from-debian.patch
trunk/jarjar/debian/patches/series
trunk/jarjar/debian/rules
trunk/jarjar/debian/watch
Log:
* New upstream release.
* Add myself as Uploaders.
* Use ASM 4.x for bytecode processing:
- d/control: Build-Depends on libasm4-java.
- d/rules: Update CLASSPATH.
- d/ant.properties: Use asm4.jar and asm4-commons.jar.
* d/watch: Update to check on googlecode.com
* Update Standards-Version: 3.9.4, no changes needed.
* d/patches/szzepiq_jar_resources.diff:
From <URL:https://github.com/szczepiq/jarjar>, resolve the issue with
jarjar not updating the fully qualified class names in the jar's resources
* d/patches/0003-fix-path-in-build.xml.patch,
d/patches/0004-support-gnu-regexp.patch,
d/patches/0005-cast-null-to-java.io.File.patch: Dropped, as only needed
from old GCJ runtime.
Modified: trunk/jarjar/debian/ant.properties
===================================================================
--- trunk/jarjar/debian/ant.properties 2013-04-08 20:38:08 UTC (rev 16510)
+++ trunk/jarjar/debian/ant.properties 2013-04-08 20:41:24 UTC (rev 16511)
@@ -1,7 +1,7 @@
-asm-commons.jar /usr/share/java/asm3-commons.jar
-asm.jar /usr/share/java/asm3.jar
+asm.jar=/usr/share/java/asm4.jar
+asm-commons.jar=/usr/share/java/asm4-commons.jar
# WARNING: maven-plugin-api
# does not exists in debian at the moment
#maven-plugin-api.jar /usr/share/java/
-compile.source 1.4
-compile.target 1.4
+compile.source=1.5
+compile.target=1.5
Modified: trunk/jarjar/debian/changelog
===================================================================
--- trunk/jarjar/debian/changelog 2013-04-08 20:38:08 UTC (rev 16510)
+++ trunk/jarjar/debian/changelog 2013-04-08 20:41:24 UTC (rev 16511)
@@ -1,3 +1,23 @@
+jarjar (1.4+svn142-1) experimental; urgency=low
+
+ * New upstream release.
+ * Add myself as Uploaders.
+ * Use ASM 4.x for bytecode processing:
+ - d/control: Build-Depends on libasm4-java.
+ - d/rules: Update CLASSPATH.
+ - d/ant.properties: Use asm4.jar and asm4-commons.jar.
+ * d/watch: Update to check on googlecode.com
+ * Update Standards-Version: 3.9.4, no changes needed.
+ * d/patches/szzepiq_jar_resources.diff:
+ From <URL:https://github.com/szczepiq/jarjar>, resolve the issue with
+ jarjar not updating the fully qualified class names in the jar's resources
+ * d/patches/0003-fix-path-in-build.xml.patch,
+ d/patches/0004-support-gnu-regexp.patch,
+ d/patches/0005-cast-null-to-java.io.File.patch: Dropped, as only needed
+ from old GCJ runtime.
+
+ -- Damien Raude-Morvan <drazzib at debian.org> Mon, 07 Jan 2013 23:46:03 +0100
+
jarjar (1.1-3) unstable; urgency=low
* Rember to actually remove Michael Koch from uploaders.
Modified: trunk/jarjar/debian/control
===================================================================
--- trunk/jarjar/debian/control 2013-04-08 20:38:08 UTC (rev 16510)
+++ trunk/jarjar/debian/control 2013-04-08 20:41:24 UTC (rev 16511)
@@ -2,9 +2,10 @@
Section: java
Priority: optional
Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
-Uploaders: Niels Thykier <niels at thykier.net>
-Build-Depends: debhelper (>= 7), cdbs, ant, libasm3-java, default-jdk
-Standards-Version: 3.9.2
+Uploaders: Niels Thykier <niels at thykier.net>,
+ Damien Raude-Morvan <drazzib at debian.org>
+Build-Depends: ant, cdbs, debhelper (>= 7), default-jdk, libasm4-java (>= 4.1-2)
+Standards-Version: 3.9.4
Vcs-Svn: svn://svn.debian.org/svn/pkg-java/trunk/jarjar
Vcs-Browser: http://svn.debian.org/wsvn/pkg-java/trunk/jarjar
Homepage: http://code.google.com/p/jarjar/
Modified: trunk/jarjar/debian/orig-tar.sh
===================================================================
--- trunk/jarjar/debian/orig-tar.sh 2013-04-08 20:38:08 UTC (rev 16510)
+++ trunk/jarjar/debian/orig-tar.sh 2013-04-08 20:41:24 UTC (rev 16511)
@@ -3,11 +3,11 @@
VERSION=$2
TAR=../jarjar_$VERSION.orig.tar.gz
DIR=jarjar-$VERSION
-TAG="release-$VERSION"
+REV=$(echo $VERSION | sed 's/^.*+svn\([0-9]\+\)$/\1/')
-svn export http://jarjar.googlecode.com/svn/tags/${TAG}/jarjar $DIR
+svn export http://jarjar.googlecode.com/svn/trunk/jarjar -r ${REV} $DIR
tar -c -z -f $TAR --exclude '*.jar' $DIR
-rm -rf $DIR ../$TAG
+rm -rf $DIR
# move to directory 'tarballs'
if [ -r .svn/deb-layout ]; then
Modified: trunk/jarjar/debian/patches/0001-fix-build.xml.patch
===================================================================
--- trunk/jarjar/debian/patches/0001-fix-build.xml.patch 2013-04-08 20:38:08 UTC (rev 16510)
+++ trunk/jarjar/debian/patches/0001-fix-build.xml.patch 2013-04-08 20:41:24 UTC (rev 16511)
@@ -6,20 +6,15 @@
build.xml | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
-diff --git a/build.xml b/build.xml
-index dbe5b1f..d0fca14 100644
--- a/build.xml
+++ b/build.xml
-@@ -47,8 +47,9 @@
- <fileset dir="src/@{module}" excludes="**/*.java"/>
- </copy>
- <javac srcdir="src/@{module}" destdir="build/@{module}"
-- source="${compile.source}"
-- target="${compile.target}" bootclasspath="@{bootclasspath}" extdirs="${compile.extdirs}"
-+ source="1.5"
-+ target="1.5" bootclasspath="@{bootclasspath}" extdirs="${compile.extdirs}"
-+ excludes="com/tonicsystems/jarjar/JarJarMojo.java"
- debug="${compile.debug}" optimize="${compile.optimize}" deprecation="${compile.deprecation}">
+@@ -69,7 +69,8 @@
+ <javac includeantruntime="true" srcdir="src/@{module}" destdir="build/@{module}"
+ source="${compile.source}"
+ target="${compile.target}" bootclasspath="@{bootclasspath}" extdirs="${compile.extdirs}"
+- debug="${compile.debug}" optimize="${compile.optimize}" deprecation="${compile.deprecation}">
++ debug="${compile.debug}" optimize="${compile.optimize}" deprecation="${compile.deprecation}"
++ excludes="com/tonicsystems/jarjar/JarJarMojo.java">
<classpath refid="@{refid}"/>
<compilerarg value="-Xlint"/>
---
+ </javac>
Modified: trunk/jarjar/debian/patches/0002-embed-libs-from-debian.patch
===================================================================
--- trunk/jarjar/debian/patches/0002-embed-libs-from-debian.patch 2013-04-08 20:38:08 UTC (rev 16510)
+++ trunk/jarjar/debian/patches/0002-embed-libs-from-debian.patch 2013-04-08 20:41:24 UTC (rev 16511)
@@ -6,19 +6,16 @@
build.xml | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
-diff --git a/build.xml b/build.xml
-index d0fca14..ea5707e 100644
--- a/build.xml
+++ b/build.xml
-@@ -76,8 +76,8 @@
+@@ -96,8 +96,8 @@
<mkdir dir="dist"/>
<jarjar jarfile="${jarfile}">
<fileset dir="build/main"/>
-- <zipfileset src="lib/asm-3.3.1.jar"/>
-- <zipfileset src="lib/asm-commons-3.3.1.jar">
-+ <zipfileset src="${asm.jar}"/>
-+ <zipfileset src="${asm-commons.jar}">
- <include name="org/objectweb/asm/commons/EmptyVisitor.class"/>
+- <zipfileset src="lib/asm-4.0.jar"/>
+- <zipfileset src="lib/asm-commons-4.0.jar">
++ <zipfileset src="${asm.jar}"/>
++ <zipfileset src="${asm-commons.jar}">
<include name="org/objectweb/asm/commons/Remap*.class"/>
<include name="org/objectweb/asm/commons/LocalVariablesSorter.class"/>
---
+ </zipfileset>
Deleted: trunk/jarjar/debian/patches/0003-fix-path-in-build.xml.patch
===================================================================
--- trunk/jarjar/debian/patches/0003-fix-path-in-build.xml.patch 2013-04-08 20:38:08 UTC (rev 16510)
+++ trunk/jarjar/debian/patches/0003-fix-path-in-build.xml.patch 2013-04-08 20:41:24 UTC (rev 16511)
@@ -1,24 +0,0 @@
-From: Arnaud Vandyck <avdyk at debian.org>
-Date: Sun, 28 Feb 2010 12:42:07 +0100
-Subject: fix path in build.xml
-
----
- build.xml | 4 +++-
- 1 files changed, 3 insertions(+), 1 deletions(-)
-
-diff --git a/build.xml b/build.xml
-index ea5707e..bbae4da 100644
---- a/build.xml
-+++ b/build.xml
-@@ -25,7 +25,9 @@
- <echo>bootclasspath ${compile.bootclasspath}</echo>
- <tstamp/>
- <path id="path.build">
-- <fileset dir="lib" includes="**/*.jar"/>
-+ <pathelement path="${asm.jar}" />
-+ <pathelement path="${asm-commons.jar}" />
-+ <pathelement path="${gnu-regexp.jar}" />
- </path>
- <path id="path.run">
- <path refid="path.build"/>
---
Deleted: trunk/jarjar/debian/patches/0004-support-gnu-regexp.patch
===================================================================
--- trunk/jarjar/debian/patches/0004-support-gnu-regexp.patch 2013-04-08 20:38:08 UTC (rev 16510)
+++ trunk/jarjar/debian/patches/0004-support-gnu-regexp.patch 2013-04-08 20:41:24 UTC (rev 16511)
@@ -1,22 +0,0 @@
-From: Arnaud Vandyck <avdyk at debian.org>
-Date: Sun, 28 Feb 2010 12:42:08 +0100
-Subject: support gnu-regexp
-
----
- .../com/tonicsystems/jarjar/PackageRemapper.java | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/src/main/com/tonicsystems/jarjar/PackageRemapper.java b/src/main/com/tonicsystems/jarjar/PackageRemapper.java
-index 3b7e5da..6b71a7d 100644
---- a/src/main/com/tonicsystems/jarjar/PackageRemapper.java
-+++ b/src/main/com/tonicsystems/jarjar/PackageRemapper.java
-@@ -28,7 +28,7 @@ class PackageRemapper extends Remapper
- private static final String RESOURCE_SUFFIX = "RESOURCE";
-
- private static final Pattern ARRAY_FOR_NAME_PATTERN
-- = Pattern.compile("\\[L[\\p{javaJavaIdentifierPart}\\.]+?;");
-+ = Pattern.compile("\\[L\\p{Alpha}[\\p{Alnum}\\.]*?;");
-
- private final List<Wildcard> wildcards;
- private final Map<String, String> typeCache = new HashMap<String, String>();
---
Deleted: trunk/jarjar/debian/patches/0005-cast-null-to-java.io.File.patch
===================================================================
--- trunk/jarjar/debian/patches/0005-cast-null-to-java.io.File.patch 2013-04-08 20:38:08 UTC (rev 16510)
+++ trunk/jarjar/debian/patches/0005-cast-null-to-java.io.File.patch 2013-04-08 20:41:24 UTC (rev 16511)
@@ -1,22 +0,0 @@
-From: Torsten Werner <twerner at debian.org>
-Date: Sun, 28 Feb 2010 12:45:07 +0100
-Subject: cast null to java.io.File
-
----
- .../tonicsystems/jarjar/util/AntJarProcessor.java | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/src/main/com/tonicsystems/jarjar/util/AntJarProcessor.java b/src/main/com/tonicsystems/jarjar/util/AntJarProcessor.java
-index 449fdb6..55d7f5d 100644
---- a/src/main/com/tonicsystems/jarjar/util/AntJarProcessor.java
-+++ b/src/main/com/tonicsystems/jarjar/util/AntJarProcessor.java
-@@ -84,7 +84,7 @@ abstract public class AntJarProcessor extends Jar
- String dir = file.substring(0, slash);
- if (dirs.add(dir)) {
- addParentDirs(dir, zOut);
-- super.zipDir(null, zOut, dir + "/", ZipFileSet.DEFAULT_DIR_MODE, JAR_MARKER);
-+ super.zipDir((java.io.File) null, zOut, dir + "/", ZipFileSet.DEFAULT_DIR_MODE, JAR_MARKER);
- }
- }
- }
---
Modified: trunk/jarjar/debian/patches/series
===================================================================
--- trunk/jarjar/debian/patches/series 2013-04-08 20:38:08 UTC (rev 16510)
+++ trunk/jarjar/debian/patches/series 2013-04-08 20:41:24 UTC (rev 16511)
@@ -1,5 +1,3 @@
0001-fix-build.xml.patch
0002-embed-libs-from-debian.patch
-0003-fix-path-in-build.xml.patch
-0004-support-gnu-regexp.patch
-0005-cast-null-to-java.io.File.patch
+szzepiq_jar_resources.diff
Added: trunk/jarjar/debian/patches/szzepiq_jar_resources.diff
===================================================================
--- trunk/jarjar/debian/patches/szzepiq_jar_resources.diff (rev 0)
+++ trunk/jarjar/debian/patches/szzepiq_jar_resources.diff 2013-04-08 20:41:24 UTC (rev 16511)
@@ -0,0 +1,160 @@
+Description: Create patch from fork at <URL:https://github.com/szczepiq/jarjar>.
+ which resolve the issue with jarjar not updating the fully qualified class names
+ in the jar's resources.
+ For instance, with this patch jarjar is able to replace classname (based on requested
+ rules) in META-INF/plexus/components.xml files.
+Source: https://github.com/szczepiq/jarjar
+Author: Szczepan Faber
+Author: Damien Raude-Morvan <drazzib at debian.org>
+Last-Update: 2013-01-08
+--- a/src/main/com/tonicsystems/jarjar/MainProcessor.java
++++ b/src/main/com/tonicsystems/jarjar/MainProcessor.java
+@@ -16,6 +16,8 @@
+
+ package com.tonicsystems.jarjar;
+
++import com.tonicsystems.jarjar.resource.DefaultLineRewriter;
++import com.tonicsystems.jarjar.resource.ResourceRewriter;
+ import com.tonicsystems.jarjar.util.*;
+ import java.io.File;
+ import java.io.IOException;
+@@ -54,6 +56,7 @@
+ processors.add(new ZapProcessor(zapList));
+ processors.add(new JarTransformerChain(new RemappingClassTransformer[]{ new RemappingClassTransformer(pr) }));
+ processors.add(new ResourceProcessor(pr));
++ processors.add(new ResourceRewriter(new DefaultLineRewriter(ruleList), verbose));
+ chain = new JarProcessorChain(processors.toArray(new JarProcessor[processors.size()]));
+ }
+
+--- /dev/null
++++ b/src/main/com/tonicsystems/jarjar/resource/DefaultLineRewriter.java
+@@ -0,0 +1,34 @@
++package com.tonicsystems.jarjar.resource;
++
++import com.tonicsystems.jarjar.Rule;
++import com.tonicsystems.jarjar.util.EntryStruct;
++
++import java.util.LinkedList;
++import java.util.List;
++
++/**
++ * by Szczepan Faber, created at: 9/11/12
++ */
++public class DefaultLineRewriter implements LineRewriter {
++ private final List<MatchableRule> rules = new LinkedList<MatchableRule>();
++
++ public DefaultLineRewriter(List<Rule> ruleList) {
++ for (Rule rule : ruleList) {
++ rules.add(new MatchableRule(rule));
++ }
++ }
++
++ public boolean accepts(EntryStruct struct) {
++ return !struct.name.endsWith(".class") && !struct.name.endsWith(".java") && !struct.name.endsWith("MANIFEST.MF");
++ }
++
++ public String replaceLine(String line) {
++ for (MatchableRule rule : rules) {
++ String replacement = rule.replace(line);
++ if (!replacement.equals(line)) {
++ return replacement;
++ }
++ }
++ return line;
++ }
++}
+--- /dev/null
++++ b/src/main/com/tonicsystems/jarjar/resource/LineRewriter.java
+@@ -0,0 +1,14 @@
++package com.tonicsystems.jarjar.resource;
++
++import com.tonicsystems.jarjar.util.EntryStruct;
++
++/**
++ * by Szczepan Faber, created at: 9/11/12
++ */
++public interface LineRewriter {
++
++ boolean accepts(EntryStruct struct);
++
++ String replaceLine(String line);
++
++}
+--- /dev/null
++++ b/src/main/com/tonicsystems/jarjar/resource/MatchableRule.java
+@@ -0,0 +1,31 @@
++package com.tonicsystems.jarjar.resource;
++
++import com.tonicsystems.jarjar.Rule;
++
++import java.util.regex.Matcher;
++import java.util.regex.Pattern;
++
++/**
++ * by Szczepan Faber, created at: 9/11/12
++ */
++public class MatchableRule {
++
++ private final String pattern;
++ private final String replacement;
++
++ public MatchableRule(Rule rule) {
++ this(rule.getPattern(), rule.getResult());
++ }
++
++ public MatchableRule(String pattern, String replacement) {
++ this.pattern = pattern;
++ this.replacement = replacement;
++ }
++
++ public String replace(String input) {
++ String p = pattern.replaceAll("\\.", "\\\\.").replaceAll("\\*\\*", "([\\\\w\\\\d_\\\\\\$]*)");
++ String replacement = this.replacement.replaceAll("@1","\\$1");
++ Matcher m = Pattern.compile(p).matcher(input);
++ return m.replaceAll(replacement);
++ }
++}
+\ No newline at end of file
+--- /dev/null
++++ b/src/main/com/tonicsystems/jarjar/resource/ResourceRewriter.java
+@@ -0,0 +1,40 @@
++package com.tonicsystems.jarjar.resource;
++
++import com.tonicsystems.jarjar.util.EntryStruct;
++import com.tonicsystems.jarjar.util.JarProcessor;
++
++import java.io.*;
++
++/**
++ * by Szczepan Faber, created at: 9/11/12
++ */
++public class ResourceRewriter implements JarProcessor {
++
++ private final LineRewriter input;
++ private final boolean verbose;
++
++ public ResourceRewriter(LineRewriter input, boolean verbose) {
++ this.input = input;
++ this.verbose = verbose;
++ }
++
++ public boolean process(EntryStruct struct) throws IOException {
++ if (input.accepts(struct)) {
++ BufferedReader reader = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(struct.data)));
++ ByteArrayOutputStream out = new ByteArrayOutputStream();
++ PrintStream printer = new PrintStream(out);
++ String line;
++ while((line = reader.readLine()) != null) {
++ String replacement = input.replaceLine(line);
++ if (!replacement.equals(line) && verbose) {
++ System.out.println("Updating file: " + struct.name + ". Replacement: " + replacement);
++ }
++ printer.println(replacement);
++ }
++ reader.close();
++ printer.close();
++ struct.data = out.toByteArray();
++ }
++ return true;
++ }
++}
Modified: trunk/jarjar/debian/rules
===================================================================
--- trunk/jarjar/debian/rules 2013-04-08 20:38:08 UTC (rev 16510)
+++ trunk/jarjar/debian/rules 2013-04-08 20:41:24 UTC (rev 16511)
@@ -7,7 +7,7 @@
JAVA_HOME := /usr/lib/jvm/default-java
-DEB_JARS := asm3 asm3-commons
+DEB_JARS := asm4 asm4-commons
DEB_ANT_BUILD_TARGET := jar javadoc
install/libjarjar-java::
@@ -15,4 +15,4 @@
dh_link -plibjarjar-java /usr/share/java/jarjar-$(VERSION).jar /usr/share/java/jarjar.jar
get-orig-source:
- uscan --download-version $(DEB_UPSTREAM_VERSION) --force-download
+ debian/orig-tar.sh --release $(DEB_UPSTREAM_VERSION)
Deleted: trunk/jarjar/debian/source.fetch
===================================================================
--- trunk/jarjar/debian/source.fetch 2013-04-08 20:38:08 UTC (rev 16510)
+++ trunk/jarjar/debian/source.fetch 2013-04-08 20:41:24 UTC (rev 16511)
@@ -1,3 +0,0 @@
-version=3
-opts=dversionmangle=s/[+.]dfsg//,uversionmangle=s/(rc\d+)/~$1/ \
- http://code.google.com/p/jarjar/downloads/list http://jarjar.googlecode.com/files/jarjar-src-(.*)\.zip
Modified: trunk/jarjar/debian/watch
===================================================================
--- trunk/jarjar/debian/watch 2013-04-08 20:38:08 UTC (rev 16510)
+++ trunk/jarjar/debian/watch 2013-04-08 20:41:24 UTC (rev 16511)
@@ -1,4 +1,4 @@
version=3
-
-opts=dversionmangle=s/[+.]dfsg//,uversionmangle=s/(rc\d+)/~$1/ \
- http://jarjar.googlecode.com/svn/tags/ release-(.*)/ debian debian/orig-tar.sh
+opts=dversionmangle=s/[+.]svn(\d+)//,uversionmangle=s/(rc\d+)/~$1/ \
+http://code.google.com/p/jarjar/downloads/list?can=1 \
+ //jarjar.googlecode.com/files/jarjar-(\d[\d.]*)\.jar
More information about the pkg-java-commits
mailing list