From b8b5d7a46639c21a14fab0ed92ffa6e5a9de39f6 Mon Sep 17 00:00:00 2001 From: Michael Simacek Date: Mon, 2 Jul 2018 14:42:41 +0200 Subject: [PATCH 1/2] Use ASM 5 --- 0001-Fedora-jetty.home.patch | 2 +- 0002-Default-to-ASM-5.patch | 37 ++++++++++++++++++++++++++++++++++++ jetty.spec | 3 +++ 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 0002-Default-to-ASM-5.patch diff --git a/0001-Fedora-jetty.home.patch b/0001-Fedora-jetty.home.patch index 3d40be5..d585816 100644 --- a/0001-Fedora-jetty.home.patch +++ b/0001-Fedora-jetty.home.patch @@ -1,7 +1,7 @@ From e1f6d2f9749b6a04a3b7d163d17df41751fb8977 Mon Sep 17 00:00:00 2001 From: Michael Simacek Date: Tue, 2 Jun 2015 22:52:21 +0200 -Subject: [PATCH] Fedora jetty.home +Subject: [PATCH 1/2] Fedora jetty.home --- .../eclipse/jetty/start/config/CommandLineConfigSource.java | 3 +++ diff --git a/0002-Default-to-ASM-5.patch b/0002-Default-to-ASM-5.patch new file mode 100644 index 0000000..419455e --- /dev/null +++ b/0002-Default-to-ASM-5.patch @@ -0,0 +1,37 @@ +From 0104a128dc2354c3805278a9a0092c7f2f12ceff Mon Sep 17 00:00:00 2001 +From: Michael Simacek +Date: Mon, 2 Jul 2018 14:39:39 +0200 +Subject: [PATCH 2/2] Default to ASM 5 + +--- + .../org/eclipse/jetty/annotations/AnnotationParser.java | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +diff --git a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationParser.java b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationParser.java +index 2c232c5..a87ff6b 100644 +--- a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationParser.java ++++ b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationParser.java +@@ -69,7 +69,7 @@ import org.objectweb.asm.Opcodes; + public class AnnotationParser + { + private static final Logger LOG = Log.getLogger(AnnotationParser.class); +- protected static int ASM_OPCODE_VERSION = Opcodes.ASM6; //compatibility of api ++ protected static int ASM_OPCODE_VERSION = Opcodes.ASM5; //compatibility of api + + /** + * Map of classnames scanned and the first location from which scan occurred +@@ -112,11 +112,6 @@ public class AnnotationParser + asmVersion = Opcodes.ASM5; + break; + } +- case 6: +- { +- asmVersion = Opcodes.ASM6; +- break; +- } + default: + { + LOG.warn("Unrecognized runtime asm version, assuming {}", asmVersion); +-- +2.17.1 + diff --git a/jetty.spec b/jetty.spec index 9b119fe..681682b 100644 --- a/jetty.spec +++ b/jetty.spec @@ -64,6 +64,8 @@ Source5: %{name}.service Source6: LICENSE-MIT Patch1: 0001-Fedora-jetty.home.patch +# Fedora 27 doesn't have asm 6 yet +Patch2: 0002-Default-to-ASM-5.patch BuildRequires: maven-local BuildRequires: mvn(javax.servlet:javax.servlet-api) @@ -602,6 +604,7 @@ License: (ASL 2.0 or EPL) and MIT %setup -q -n %{name}.project-%{name}-%{version}%{addver} %patch1 -p1 +%patch2 -p1 find . -name "*.?ar" -exec rm {} \; find . -name "*.class" -exec rm {} \; From 40c22c357d86b5986f307d56d3c4dee1c3bd3560 Mon Sep 17 00:00:00 2001 From: Michael Simacek Date: Mon, 2 Jul 2018 16:53:02 +0200 Subject: [PATCH 2/2] Workaround NPE in shade-plugin --- jetty.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jetty.spec b/jetty.spec index 681682b..2507b02 100644 --- a/jetty.spec +++ b/jetty.spec @@ -648,6 +648,9 @@ sed -i '/^\s*\*.*