Author: drazzib Date: 2013-04-08 20:38:08 +0000 (Mon, 08 Apr 2013) New Revision: 16510
Added: tags/jarjar/1.4+svn142-1/ tags/jarjar/1.4+svn142-1/debian/patches/szzepiq_jar_resources.diff Removed: tags/jarjar/1.4+svn142-1/debian/patches/0003-fix-path-in-build.xml.patch tags/jarjar/1.4+svn142-1/debian/patches/0004-support-gnu-regexp.patch tags/jarjar/1.4+svn142-1/debian/patches/0005-cast-null-to-java.io.File.patch tags/jarjar/1.4+svn142-1/debian/source.fetch Modified: tags/jarjar/1.4+svn142-1/debian/ant.properties tags/jarjar/1.4+svn142-1/debian/changelog tags/jarjar/1.4+svn142-1/debian/control tags/jarjar/1.4+svn142-1/debian/orig-tar.sh tags/jarjar/1.4+svn142-1/debian/patches/0001-fix-build.xml.patch tags/jarjar/1.4+svn142-1/debian/patches/0002-embed-libs-from-debian.patch tags/jarjar/1.4+svn142-1/debian/patches/series tags/jarjar/1.4+svn142-1/debian/rules tags/jarjar/1.4+svn142-1/debian/watch Log: [svn-buildpackage] Tagging jarjar 1.4+svn142-1 Modified: tags/jarjar/1.4+svn142-1/debian/ant.properties =================================================================== --- trunk/jarjar/debian/ant.properties 2013-04-08 19:07:47 UTC (rev 16509) +++ tags/jarjar/1.4+svn142-1/debian/ant.properties 2013-04-08 20:38:08 UTC (rev 16510) @@ -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: tags/jarjar/1.4+svn142-1/debian/changelog =================================================================== --- trunk/jarjar/debian/changelog 2013-04-08 19:07:47 UTC (rev 16509) +++ tags/jarjar/1.4+svn142-1/debian/changelog 2013-04-08 20:38:08 UTC (rev 16510) @@ -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 <[email protected]> Mon, 07 Jan 2013 23:46:03 +0100 + jarjar (1.1-3) unstable; urgency=low * Rember to actually remove Michael Koch from uploaders. Modified: tags/jarjar/1.4+svn142-1/debian/control =================================================================== --- trunk/jarjar/debian/control 2013-04-08 19:07:47 UTC (rev 16509) +++ tags/jarjar/1.4+svn142-1/debian/control 2013-04-08 20:38:08 UTC (rev 16510) @@ -2,9 +2,10 @@ Section: java Priority: optional Maintainer: Debian Java Maintainers <[email protected]> -Uploaders: Niels Thykier <[email protected]> -Build-Depends: debhelper (>= 7), cdbs, ant, libasm3-java, default-jdk -Standards-Version: 3.9.2 +Uploaders: Niels Thykier <[email protected]>, + Damien Raude-Morvan <[email protected]> +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: tags/jarjar/1.4+svn142-1/debian/orig-tar.sh =================================================================== --- trunk/jarjar/debian/orig-tar.sh 2013-04-08 19:07:47 UTC (rev 16509) +++ tags/jarjar/1.4+svn142-1/debian/orig-tar.sh 2013-04-08 20:38:08 UTC (rev 16510) @@ -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: tags/jarjar/1.4+svn142-1/debian/patches/0001-fix-build.xml.patch =================================================================== --- trunk/jarjar/debian/patches/0001-fix-build.xml.patch 2013-04-08 19:07:47 UTC (rev 16509) +++ tags/jarjar/1.4+svn142-1/debian/patches/0001-fix-build.xml.patch 2013-04-08 20:38:08 UTC (rev 16510) @@ -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: tags/jarjar/1.4+svn142-1/debian/patches/0002-embed-libs-from-debian.patch =================================================================== --- trunk/jarjar/debian/patches/0002-embed-libs-from-debian.patch 2013-04-08 19:07:47 UTC (rev 16509) +++ tags/jarjar/1.4+svn142-1/debian/patches/0002-embed-libs-from-debian.patch 2013-04-08 20:38:08 UTC (rev 16510) @@ -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: tags/jarjar/1.4+svn142-1/debian/patches/0003-fix-path-in-build.xml.patch =================================================================== --- trunk/jarjar/debian/patches/0003-fix-path-in-build.xml.patch 2013-04-08 19:07:47 UTC (rev 16509) +++ tags/jarjar/1.4+svn142-1/debian/patches/0003-fix-path-in-build.xml.patch 2013-04-08 20:38:08 UTC (rev 16510) @@ -1,24 +0,0 @@ -From: Arnaud Vandyck <[email protected]> -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: tags/jarjar/1.4+svn142-1/debian/patches/0004-support-gnu-regexp.patch =================================================================== --- trunk/jarjar/debian/patches/0004-support-gnu-regexp.patch 2013-04-08 19:07:47 UTC (rev 16509) +++ tags/jarjar/1.4+svn142-1/debian/patches/0004-support-gnu-regexp.patch 2013-04-08 20:38:08 UTC (rev 16510) @@ -1,22 +0,0 @@ -From: Arnaud Vandyck <[email protected]> -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: tags/jarjar/1.4+svn142-1/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 19:07:47 UTC (rev 16509) +++ tags/jarjar/1.4+svn142-1/debian/patches/0005-cast-null-to-java.io.File.patch 2013-04-08 20:38:08 UTC (rev 16510) @@ -1,22 +0,0 @@ -From: Torsten Werner <[email protected]> -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: tags/jarjar/1.4+svn142-1/debian/patches/series =================================================================== --- trunk/jarjar/debian/patches/series 2013-04-08 19:07:47 UTC (rev 16509) +++ tags/jarjar/1.4+svn142-1/debian/patches/series 2013-04-08 20:38:08 UTC (rev 16510) @@ -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: tags/jarjar/1.4+svn142-1/debian/patches/szzepiq_jar_resources.diff =================================================================== --- tags/jarjar/1.4+svn142-1/debian/patches/szzepiq_jar_resources.diff (rev 0) +++ tags/jarjar/1.4+svn142-1/debian/patches/szzepiq_jar_resources.diff 2013-04-08 20:38:08 UTC (rev 16510) @@ -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 <[email protected]> +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: tags/jarjar/1.4+svn142-1/debian/rules =================================================================== --- trunk/jarjar/debian/rules 2013-04-08 19:07:47 UTC (rev 16509) +++ tags/jarjar/1.4+svn142-1/debian/rules 2013-04-08 20:38:08 UTC (rev 16510) @@ -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: tags/jarjar/1.4+svn142-1/debian/source.fetch =================================================================== --- trunk/jarjar/debian/source.fetch 2013-04-08 19:07:47 UTC (rev 16509) +++ tags/jarjar/1.4+svn142-1/debian/source.fetch 2013-04-08 20:38:08 UTC (rev 16510) @@ -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: tags/jarjar/1.4+svn142-1/debian/watch =================================================================== --- trunk/jarjar/debian/watch 2013-04-08 19:07:47 UTC (rev 16509) +++ tags/jarjar/1.4+svn142-1/debian/watch 2013-04-08 20:38:08 UTC (rev 16510) @@ -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 _______________________________________________ pkg-java-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits

