[jenkins] 06/09: Ignore the new dependency on bytecode-compatibility-transformer

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Tue Sep 2 20:42:32 UTC 2014


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

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

commit 878ce5dec3bb757ad640667b5effac7ad07c752e
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Tue Sep 2 17:45:32 2014 +0200

    Ignore the new dependency on bytecode-compatibility-transformer
---
 debian/changelog                                   |  1 +
 debian/maven.ignoreRules                           |  2 +
 ...ignore-bytecode-compatibility-transformer.patch | 91 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 4 files changed, 95 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index b57065c..0ade132 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ jenkins (1.509.4-1) UNRELEASED; urgency=medium
   * Team upload.
   * New upstream release
     - Refreshed the patches
+    - Ignore the dependency on bytecode-compatibility-transformer
   * Fixed a build failure caused by the relocation of the Maven artifacts
     in groovy 1.8.6-4 (Closes: #759946)
   * Removed the sourceless and unused connection.swf file (Closes: #736792)
diff --git a/debian/maven.ignoreRules b/debian/maven.ignoreRules
index 29c1fee..7aba12e 100644
--- a/debian/maven.ignoreRules
+++ b/debian/maven.ignoreRules
@@ -89,3 +89,5 @@ org.jenkins-ci.modules upstart-slave-installer * * * *
 org.jenkins-ci.modules launchd-slave-installer * * * *
 # Drop animal-sniffer plugin usage
 org.codehaus.mojo animal-sniffer-maven-plugin * * * *
+# TODO: To be packaged
+org.jenkins-ci bytecode-compatibility-transformer * * * *
diff --git a/debian/patches/0023-ignore-bytecode-compatibility-transformer.patch b/debian/patches/0023-ignore-bytecode-compatibility-transformer.patch
new file mode 100644
index 0000000..edcbb4f
--- /dev/null
+++ b/debian/patches/0023-ignore-bytecode-compatibility-transformer.patch
@@ -0,0 +1,91 @@
+--- a/core/src/main/java/hudson/model/AbstractProject.java
++++ b/core/src/main/java/hudson/model/AbstractProject.java
+@@ -91,7 +91,6 @@
+ import net.sf.json.JSONObject;
+ import org.acegisecurity.context.SecurityContext;
+ import org.acegisecurity.context.SecurityContextHolder;
+-import org.jenkinsci.bytecode.AdaptField;
+ import org.kohsuke.accmod.Restricted;
+ import org.kohsuke.accmod.restrictions.NoExternalUse;
+ import org.kohsuke.args4j.Argument;
+@@ -236,8 +235,7 @@
+     /**
+      * List of all {@link Trigger}s for this project.
+      */
+-    @AdaptField(was=List.class)
+-    protected volatile DescribableList<Trigger<?>,TriggerDescriptor> triggers = new DescribableList<Trigger<?>,TriggerDescriptor>(this);
++    protected volatile List<Trigger<?>> triggers = new DescribableList<Trigger<?>,TriggerDescriptor>(this);
+     private static final AtomicReferenceFieldUpdater<AbstractProject,DescribableList> triggersUpdater
+             = AtomicReferenceFieldUpdater.newUpdater(AbstractProject.class,DescribableList.class,"triggers");
+ 
+@@ -332,7 +330,7 @@
+         if (triggers == null) {
+             triggersUpdater.compareAndSet(this,null,new DescribableList<Trigger<?>,TriggerDescriptor>(this));
+         }
+-        return triggers;
++        return (DescribableList<Trigger<?>,TriggerDescriptor>) triggers;
+     }
+ 
+     @Override
+@@ -1966,7 +1964,7 @@
+ 
+         for (Trigger t : triggers())
+             t.stop();
+-        triggers.replaceBy(buildDescribable(req, Trigger.for_(this)));
++        ((DescribableList<Trigger<?>,TriggerDescriptor>) triggers).replaceBy(buildDescribable(req, Trigger.for_(this)));
+         for (Trigger t : triggers())
+             t.start(this,true);
+ 
+--- a/core/src/main/java/hudson/PluginManager.java
++++ b/core/src/main/java/hudson/PluginManager.java
+@@ -59,7 +59,6 @@
+ import org.apache.commons.io.FileUtils;
+ import org.apache.commons.io.FilenameUtils;
+ import org.apache.commons.logging.LogFactory;
+-import org.jenkinsci.bytecode.Transformer;
+ import org.jvnet.hudson.reactor.Executable;
+ import org.jvnet.hudson.reactor.Reactor;
+ import org.jvnet.hudson.reactor.ReactorException;
+@@ -152,8 +151,6 @@
+     // and load plugin-contributed classes.
+     public final ClassLoader uberClassLoader = new UberClassLoader();
+ 
+-    private final Transformer compatibilityTransformer = new Transformer();
+-
+     /**
+      * Once plugin is uploaded, this flag becomes true.
+      * This is used to report a message that Jenkins needs to be restarted
+@@ -182,17 +179,6 @@
+             rootDir.mkdirs();
+         
+         strategy = createPluginStrategy();
+-
+-        // load up rules for the core first
+-        try {
+-            compatibilityTransformer.loadRules(getClass().getClassLoader());
+-        } catch (IOException e) {
+-            LOGGER.log(Level.WARNING, "Failed to load compatibility rewrite rules",e);
+-        }
+-    }
+-
+-    public Transformer getCompatibilityTransformer() {
+-        return compatibilityTransformer;
+     }
+ 
+     public Api getApi() {
+--- a/core/src/main/java/hudson/ClassicPluginStrategy.java
++++ b/core/src/main/java/hudson/ClassicPluginStrategy.java
+@@ -626,11 +626,12 @@
+ 
+             return url;
+         }
+-
++/*
+         @Override
+         protected Class defineClassFromData(File container, byte[] classData, String classname) throws IOException {
+             return super.defineClassFromData(container, pluginManager.getCompatibilityTransformer().transform(classname,classData), classname);
+         }
++*/
+     }
+ 
+     public static boolean useAntClassLoader = Boolean.getBoolean(ClassicPluginStrategy.class.getName()+".useAntClassLoader");
diff --git a/debian/patches/series b/debian/patches/series
index 2c5e474..22f2901 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -20,3 +20,4 @@ build/0019-io-compat.pach.patch
 0020-Drop-use-of-gitsite-extension.patch
 0021-Compatibility-patch-for-guava-0.14.patch
 0022-Exclude-asm-dependencies-from-jnr-posix.patch
+0023-ignore-bytecode-compatibility-transformer.patch

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



More information about the pkg-java-commits mailing list