Hello community,

here is the log from the commit of package netty3 for openSUSE:Factory checked 
in at 2019-11-18 20:08:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/netty3 (Old)
 and      /work/SRC/openSUSE:Factory/.netty3.new.26869 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "netty3"

Mon Nov 18 20:08:22 2019 rev:1 rq:748717 version:3.10.6

Changes:
--------
New Changes file:

--- /dev/null   2019-11-14 08:11:24.559789422 +0100
+++ /work/SRC/openSUSE:Factory/.netty3.new.26869/netty3.changes 2019-11-18 
20:08:26.077651851 +0100
@@ -0,0 +1,4 @@
+-------------------------------------------------------------------
+Thu Nov 14 12:48:51 UTC 2019 - Fridrich Strba <fst...@suse.com>
+
+- Initial packaging of netty3 3.10.6 compatibility version

New:
----
  disableNPN.patch
  netty-3.10.6-port-to-jzlib-1.1.0.patch
  netty-3.10.6.Final.tar.gz
  netty3.changes
  netty3.spec

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ netty3.spec ++++++
#
# spec file for package netty3
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


%global namedreltag .Final
%global namedversion %{version}%{?namedreltag}
Name:           netty3
Version:        3.10.6
Release:        0
Summary:        An asynchronous event-driven network application framework and 
tools for Java
# CC0: src/main/java/org/jboss/netty/handler/codec/base64/Base64.java
License:        Apache-2.0 AND BSD-3-Clause AND SUSE-Public-Domain
URL:            https://netty.io/
Source0:        
https://github.com/netty/netty/archive/netty-%{namedversion}.tar.gz
Patch0:         netty-3.10.6-port-to-jzlib-1.1.0.patch
Patch1:         disableNPN.patch
BuildRequires:  fdupes
BuildRequires:  maven-local
BuildRequires:  mvn(ant-contrib:ant-contrib)
BuildRequires:  mvn(com.google.protobuf:protobuf-java)
BuildRequires:  mvn(com.jcraft:jzlib)
BuildRequires:  mvn(commons-logging:commons-logging)
BuildRequires:  mvn(io.netty:netty-tcnative)
BuildRequires:  mvn(javax.servlet:javax.servlet-api)
BuildRequires:  mvn(log4j:log4j)
BuildRequires:  mvn(org.apache.ant:ant)
BuildRequires:  mvn(org.apache.ant:ant-launcher)
BuildRequires:  mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires:  mvn(org.apache.felix:org.osgi.compendium)
BuildRequires:  mvn(org.apache.felix:org.osgi.core)
BuildRequires:  mvn(org.apache.maven.plugins:maven-antrun-plugin)
BuildRequires:  mvn(org.apache.maven.plugins:maven-enforcer-plugin)
BuildRequires:  mvn(org.apache.maven.plugins:maven-resources-plugin)
BuildRequires:  mvn(org.bouncycastle:bcpkix-jdk15on)
BuildRequires:  mvn(org.jboss.logging:jboss-logging)
BuildRequires:  mvn(org.jboss.marshalling:jboss-marshalling)
BuildRequires:  mvn(org.slf4j:slf4j-api)
BuildRequires:  mvn(org.sonatype.oss:oss-parent:pom:)
Requires:       netty-tcnative
BuildArch:      noarch

%description
Netty is a NIO client server framework which enables quick and easy
development of network applications such as protocol servers and
clients. It greatly simplifies and streamlines network programming
such as TCP and UDP socket server.

'Quick and easy' doesn't mean that a resulting application will suffer
from a maintainability or a performance issue. Netty has been designed
carefully with the experiences earned from the implementation of a lot
of protocols such as FTP, SMTP, HTTP, and various binary and
text-based legacy protocols. As a result, Netty has succeeded to find
a way to achieve ease of development, performance, stability, and
flexibility without a compromise.

%package javadoc
Summary:        API documentation for %{name}

%description javadoc
%{summary}.

%prep
%setup -q -n netty-netty-%{namedversion}

# just to be sure, but not used anyway
rm -rf jar doc license

%pom_remove_plugin :maven-jxr-plugin
%pom_remove_plugin :maven-checkstyle-plugin
%pom_remove_plugin org.eclipse.m2e:lifecycle-mapping
%pom_remove_dep javax.activation:activation
%pom_remove_plugin :animal-sniffer-maven-plugin
%pom_remove_dep :npn-api
%pom_xpath_remove "pom:extension[pom:artifactId[text()='os-maven-plugin']]"
%pom_xpath_remove "pom:execution[pom:id[text()='remove-examples']]"
%pom_xpath_remove 
"pom:plugin[pom:artifactId[text()='maven-javadoc-plugin']]/pom:configuration"
%pom_xpath_remove 
"pom:dependency[pom:artifactId[text()='netty-tcnative']]/pom:classifier"
# Set scope of optional compile dependencies to 'provided'
%pom_xpath_set "pom:dependency[pom:scope[text()='compile'] and 
pom:optional[text()='true']]/pom:scope" provided

# Force use servlet 3.1 apis
%pom_change_dep :servlet-api javax.servlet:javax.servlet-api:3.1.0

%pom_xpath_set "pom:dependency[pom:artifactId = 'log4j']/pom:version" 12

# Uneeded tasks
%pom_remove_plugin :maven-assembly-plugin
%pom_remove_plugin :maven-source-plugin
# Unavailable plugin
%pom_remove_plugin kr.motd.maven:exec-maven-plugin
# Fix javadoc doclint
%pom_remove_plugin :maven-javadoc-plugin

sed s/jboss-logging-spi/jboss-logging/ -i pom.xml

# Remove bundled jzlib and use system jzlib
rm -r src/main/java/org/jboss/netty/util/internal/jzlib
%pom_add_dep com.jcraft:jzlib
sed -i s/org.jboss.netty.util.internal.jzlib/com.jcraft.jzlib/ \
    $(find src/main/java/org/jboss/netty/handler/codec -name \*.java | sort -u)
%patch0 -p1
%patch1 -p1

# adapting to excluded dep
rm -v src/main/java/org/jboss/netty/handler/ssl/JettyNpnSslEngine.java

%{mvn_compat_version} : %{version} 3.9.3 %{namedversion} 3.9.3.Final 3
%{mvn_alias} : org.jboss.netty:
%{mvn_file}  : %{name}

%build

# skipping tests because we don't have easymockclassextension
%{mvn_build} -f -- -Dsource=6

%install
%mvn_install
%fdupes -s %{buildroot}%{_javadocdir}

%files -f .mfiles
%doc README.md
%license LICENSE.txt NOTICE.txt

%files javadoc -f .mfiles-javadoc
%license LICENSE.txt NOTICE.txt

%changelog
++++++ disableNPN.patch ++++++
diff -rupN 
netty-3.9.3.Final/src/main/java/org/jboss/netty/handler/ssl/JdkSslClientContext.java
 
netty-3.9.3.Final-mod/src/main/java/org/jboss/netty/handler/ssl/JdkSslClientContext.java
--- 
netty-3.9.3.Final/src/main/java/org/jboss/netty/handler/ssl/JdkSslClientContext.java
        2014-08-06 20:56:29.000000000 +0200
+++ 
netty-3.9.3.Final-mod/src/main/java/org/jboss/netty/handler/ssl/JdkSslClientContext.java
    2015-01-30 08:23:00.394802892 +0100
@@ -108,9 +108,6 @@ public final class JdkSslClientContext e
         super(bufPool, ciphers);
 
         if (nextProtocols != null && nextProtocols.iterator().hasNext()) {
-            if (!JettyNpnSslEngine.isAvailable()) {
-                throw new SSLException("NPN/ALPN unsupported: " + 
nextProtocols);
-            }
 
             List<String> nextProtoList = new ArrayList<String>();
             for (String p: nextProtocols) {
diff -rupN 
netty-3.9.3.Final/src/main/java/org/jboss/netty/handler/ssl/JdkSslContext.java 
netty-3.9.3.Final-mod/src/main/java/org/jboss/netty/handler/ssl/JdkSslContext.java
--- 
netty-3.9.3.Final/src/main/java/org/jboss/netty/handler/ssl/JdkSslContext.java  
    2014-08-06 20:56:29.000000000 +0200
+++ 
netty-3.9.3.Final-mod/src/main/java/org/jboss/netty/handler/ssl/JdkSslContext.java
  2015-01-30 08:23:09.590641116 +0100
@@ -165,7 +165,7 @@ public abstract class JdkSslContext exte
         if (nextProtocols().isEmpty()) {
             return engine;
         } else {
-            return new JettyNpnSslEngine(engine, nextProtocols(), isServer());
+            return null;
         }
     }
 
diff -rupN 
netty-3.9.3.Final/src/main/java/org/jboss/netty/handler/ssl/JdkSslServerContext.java
 
netty-3.9.3.Final-mod/src/main/java/org/jboss/netty/handler/ssl/JdkSslServerContext.java
--- 
netty-3.9.3.Final/src/main/java/org/jboss/netty/handler/ssl/JdkSslServerContext.java
        2014-08-06 20:56:29.000000000 +0200
+++ 
netty-3.9.3.Final-mod/src/main/java/org/jboss/netty/handler/ssl/JdkSslServerContext.java
    2015-01-30 08:23:19.097473868 +0100
@@ -114,9 +114,6 @@ public final class JdkSslServerContext e
         }
 
         if (nextProtocols != null && nextProtocols.iterator().hasNext()) {
-            if (!JettyNpnSslEngine.isAvailable()) {
-                throw new SSLException("NPN/ALPN unsupported: " + 
nextProtocols);
-            }
 
             List<String> list = new ArrayList<String>();
             for (String p: nextProtocols) {
++++++ netty-3.10.6-port-to-jzlib-1.1.0.patch ++++++
diff -Nru 
netty-netty-3.10.6.Final/src/main/java/org/jboss/netty/handler/codec/compression/ZlibDecoder.java
 
netty-netty-3.10.6.Final.jzlib/src/main/java/org/jboss/netty/handler/codec/compression/ZlibDecoder.java
--- 
netty-netty-3.10.6.Final/src/main/java/org/jboss/netty/handler/codec/compression/ZlibDecoder.java
   2016-06-29 14:41:47.000000000 +0200
+++ 
netty-netty-3.10.6.Final.jzlib/src/main/java/org/jboss/netty/handler/codec/compression/ZlibDecoder.java
     2016-11-03 15:51:13.967846143 +0100
@@ -77,7 +77,7 @@
 
         synchronized (z) {
             int resultCode;
-            resultCode = z.inflateInit(JZlib.W_ZLIB);
+            resultCode = z.inflateInit();
             if (resultCode != JZlib.Z_OK) {
                 ZlibUtil.fail(z, "initialization failure", resultCode);
             }
diff -Nru 
netty-netty-3.10.6.Final/src/main/java/org/jboss/netty/handler/codec/compression/ZlibEncoder.java
 
netty-netty-3.10.6.Final.jzlib/src/main/java/org/jboss/netty/handler/codec/compression/ZlibEncoder.java
--- 
netty-netty-3.10.6.Final/src/main/java/org/jboss/netty/handler/codec/compression/ZlibEncoder.java
   2016-06-29 14:41:47.000000000 +0200
+++ 
netty-netty-3.10.6.Final.jzlib/src/main/java/org/jboss/netty/handler/codec/compression/ZlibEncoder.java
     2016-11-03 15:50:14.712839882 +0100
@@ -147,8 +147,7 @@
         wrapperOverhead = ZlibUtil.wrapperOverhead(wrapper);
 
         synchronized (z) {
-            int resultCode = z.deflateInit(compressionLevel, windowBits, 
memLevel,
-                    ZlibUtil.convertWrapperType(wrapper));
+            int resultCode = z.deflateInit(compressionLevel, 
ZlibUtil.convertWrapperType(wrapper), memLevel);
             if (resultCode != JZlib.Z_OK) {
                 ZlibUtil.fail(z, "initialization failure", resultCode);
             }
@@ -235,8 +234,7 @@
 
         synchronized (z) {
             int resultCode;
-            resultCode = z.deflateInit(compressionLevel, windowBits, memLevel,
-                    JZlib.W_ZLIB); // Default: ZLIB format
+            resultCode = z.deflateInit(compressionLevel, windowBits, memLevel);
             if (resultCode != JZlib.Z_OK) {
                 ZlibUtil.fail(z, "initialization failure", resultCode);
             } else {
diff -Nru 
netty-netty-3.10.6.Final/src/main/java/org/jboss/netty/handler/codec/compression/ZlibUtil.java
 
netty-netty-3.10.6.Final.jzlib/src/main/java/org/jboss/netty/handler/codec/compression/ZlibUtil.java
--- 
netty-netty-3.10.6.Final/src/main/java/org/jboss/netty/handler/codec/compression/ZlibUtil.java
      2016-06-29 14:41:47.000000000 +0200
+++ 
netty-netty-3.10.6.Final.jzlib/src/main/java/org/jboss/netty/handler/codec/compression/ZlibUtil.java
        2016-11-03 15:48:56.294801795 +0100
@@ -32,25 +32,26 @@
                 (z.msg != null? ": " + z.msg : ""));
     }
 
-    static Enum<?> convertWrapperType(ZlibWrapper wrapper) {
-        Enum<?> convertedWrapperType;
-        switch (wrapper) {
+    static int convertWrapperType(ZlibWrapper wrapper, int windowBits) {
+      switch (wrapper) {
         case NONE:
-            convertedWrapperType = JZlib.W_NONE;
+            windowBits = -windowBits;
             break;
         case ZLIB:
-            convertedWrapperType = JZlib.W_ZLIB;
             break;
         case GZIP:
-            convertedWrapperType = JZlib.W_GZIP;
+            windowBits += 16;
             break;
         case ZLIB_OR_NONE:
-            convertedWrapperType = JZlib.W_ZLIB_OR_NONE;
             break;
         default:
             throw new Error();
         }
-        return convertedWrapperType;
+        return windowBits;
+    }
+
+    static int convertWrapperType(ZlibWrapper wrapper) {
+        return convertWrapperType(wrapper, 15);
     }
 
     static int wrapperOverhead(ZlibWrapper wrapper) {

Reply via email to