Upstream release 4.0.14.Final
This commit is contained in:
parent
12ff964dd5
commit
3fd2684510
|
@ -10,3 +10,4 @@
|
|||
/netty-3.6.4.Final-dist.tar.bz2
|
||||
/netty-3.6.5.Final-dist.tar.bz2
|
||||
/netty-3.6.6.Final-dist.tar.bz2
|
||||
/netty-4.0.14.Final.tar.gz
|
||||
|
|
|
@ -1,104 +0,0 @@
|
|||
From 423dc10334f211db7256944a0a9f40c8ca82359b Mon Sep 17 00:00:00 2001
|
||||
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||
Date: Thu, 13 Dec 2012 04:20:46 +0100
|
||||
Subject: [PATCH] Port netty to jzlib 1.1.0
|
||||
|
||||
---
|
||||
.../netty/handler/codec/compression/ZlibDecoder.java | 2 +-
|
||||
.../netty/handler/codec/compression/ZlibEncoder.java | 6 ++----
|
||||
.../netty/handler/codec/compression/ZlibUtil.java | 18 ++++++++++--------
|
||||
.../codec/spdy/SpdyHeaderBlockJZlibCompressor.java | 2 +-
|
||||
4 files changed, 14 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/src/main/java/org/jboss/netty/handler/codec/compression/ZlibDecoder.java b/src/main/java/org/jboss/netty/handler/codec/compression/ZlibDecoder.java
|
||||
index f31a430..e93efd8 100644
|
||||
--- a/src/main/java/org/jboss/netty/handler/codec/compression/ZlibDecoder.java
|
||||
+++ b/src/main/java/org/jboss/netty/handler/codec/compression/ZlibDecoder.java
|
||||
@@ -77,7 +77,7 @@ public class ZlibDecoder extends OneToOneDecoder {
|
||||
|
||||
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 --git a/src/main/java/org/jboss/netty/handler/codec/compression/ZlibEncoder.java b/src/main/java/org/jboss/netty/handler/codec/compression/ZlibEncoder.java
|
||||
index 46f711e..88e7342 100644
|
||||
--- a/src/main/java/org/jboss/netty/handler/codec/compression/ZlibEncoder.java
|
||||
+++ b/src/main/java/org/jboss/netty/handler/codec/compression/ZlibEncoder.java
|
||||
@@ -144,8 +144,7 @@ public class ZlibEncoder extends OneToOneStrictEncoder implements LifeCycleAware
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
@@ -230,8 +229,7 @@ public class ZlibEncoder extends OneToOneStrictEncoder implements LifeCycleAware
|
||||
|
||||
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 --git a/src/main/java/org/jboss/netty/handler/codec/compression/ZlibUtil.java b/src/main/java/org/jboss/netty/handler/codec/compression/ZlibUtil.java
|
||||
index 954edde..93d204f 100644
|
||||
--- a/src/main/java/org/jboss/netty/handler/codec/compression/ZlibUtil.java
|
||||
+++ b/src/main/java/org/jboss/netty/handler/codec/compression/ZlibUtil.java
|
||||
@@ -32,25 +32,27 @@ final class ZlibUtil {
|
||||
(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);
|
||||
}
|
||||
|
||||
private ZlibUtil() {
|
||||
diff --git a/src/main/java/org/jboss/netty/handler/codec/spdy/SpdyHeaderBlockJZlibCompressor.java b/src/main/java/org/jboss/netty/handler/codec/spdy/SpdyHeaderBlockJZlibCompressor.java
|
||||
index 612419d..957649b 100644
|
||||
--- a/src/main/java/org/jboss/netty/handler/codec/spdy/SpdyHeaderBlockJZlibCompressor.java
|
||||
+++ b/src/main/java/org/jboss/netty/handler/codec/spdy/SpdyHeaderBlockJZlibCompressor.java
|
||||
@@ -46,7 +46,7 @@ class SpdyHeaderBlockJZlibCompressor extends SpdyHeaderBlockCompressor {
|
||||
}
|
||||
|
||||
int resultCode = z.deflateInit(
|
||||
- compressionLevel, windowBits, memLevel, JZlib.W_ZLIB);
|
||||
+ compressionLevel, windowBits, memLevel);
|
||||
if (resultCode != JZlib.Z_OK) {
|
||||
throw new CompressionException(
|
||||
"failed to initialize an SPDY header block deflater: " + resultCode);
|
||||
--
|
||||
1.7.11.7
|
66
netty.spec
66
netty.spec
|
@ -1,13 +1,13 @@
|
|||
Name: netty
|
||||
Version: 3.6.6
|
||||
Release: 2%{?dist}
|
||||
Summary: An asynchronous event-driven network application framework and tools for Java
|
||||
%global namedreltag .Final
|
||||
%global namedversion %{version}%{?namedreltag}
|
||||
|
||||
Group: Development/Libraries
|
||||
Name: netty
|
||||
Version: 4.0.14
|
||||
Release: 1%{?dist}
|
||||
Summary: An asynchronous event-driven network application framework and tools for Java
|
||||
License: ASL 2.0
|
||||
URL: https://netty.io/
|
||||
Source0: http://%{name}.googlecode.com/files/%{name}-%{version}.Final-dist.tar.bz2
|
||||
Patch0: %{name}-port-to-jzlib-1.1.0.patch
|
||||
Source0: https://github.com/netty/netty/archive/netty-%{namedversion}.tar.gz
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
|
@ -16,21 +16,14 @@ BuildRequires: maven-antrun-plugin
|
|||
BuildRequires: maven-assembly-plugin
|
||||
BuildRequires: maven-compiler-plugin
|
||||
BuildRequires: maven-enforcer-plugin
|
||||
BuildRequires: maven-javadoc-plugin
|
||||
BuildRequires: maven-plugin-bundle
|
||||
BuildRequires: maven-resources-plugin
|
||||
BuildRequires: maven-source-plugin
|
||||
BuildRequires: maven-surefire-plugin
|
||||
BuildRequires: ant-contrib
|
||||
|
||||
BuildRequires: felix-osgi-compendium
|
||||
BuildRequires: felix-osgi-core
|
||||
BuildRequires: jboss-logging
|
||||
BuildRequires: jboss-marshalling
|
||||
BuildRequires: rxtx
|
||||
BuildRequires: protobuf-java
|
||||
BuildRequires: slf4j
|
||||
BuildRequires: sonatype-oss-parent
|
||||
BuildRequires: tomcat-servlet-3.0-api
|
||||
BuildRequires: jboss-marshalling
|
||||
|
||||
%description
|
||||
Netty is a NIO client server framework which enables quick and easy
|
||||
|
@ -46,43 +39,31 @@ 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}
|
||||
Group: Documentation
|
||||
|
||||
%description javadoc
|
||||
%{summary}.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}.Final
|
||||
# just to be sure, but not used anyway
|
||||
rm -rf jar doc license
|
||||
%setup -q -n netty-netty-%{namedversion}
|
||||
|
||||
%pom_remove_plugin :maven-jxr-plugin
|
||||
# Missing Mavenized rxtx
|
||||
%pom_disable_module "transport-rxtx"
|
||||
# Missing com.barchart.udt:barchart-udt-bundle:jar:2.3.0
|
||||
%pom_disable_module "transport-udt"
|
||||
# Not needed
|
||||
%pom_disable_module "example"
|
||||
%pom_disable_module "testsuite"
|
||||
%pom_disable_module "all"
|
||||
%pom_disable_module "tarball"
|
||||
%pom_disable_module "microbench"
|
||||
%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_xpath_remove "pom:execution[pom:id[text()='remove-examples']]"
|
||||
%pom_xpath_remove "pom:plugin[pom:artifactId[text()='maven-javadoc-plugin']]/pom:configuration"
|
||||
# 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
|
||||
|
||||
sed s/jboss-logging-spi/jboss-logging/ -i pom.xml
|
||||
|
||||
# Remove bundled jzlib and use system jzlib
|
||||
rm -rf 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
|
||||
%pom_remove_plugin :maven-enforcer-plugin
|
||||
%pom_remove_plugin :maven-antrun-plugin
|
||||
|
||||
%build
|
||||
%mvn_alias : org.jboss.netty:
|
||||
%mvn_file : %{name}
|
||||
# skipping tests because we don't have easymockclassextension
|
||||
%mvn_build -f
|
||||
|
||||
%install
|
||||
|
@ -95,6 +76,9 @@ sed -i s/org.jboss.netty.util.internal.jzlib/com.jcraft.jzlib/ \
|
|||
%doc LICENSE.txt NOTICE.txt
|
||||
|
||||
%changelog
|
||||
* Mon Dec 30 2013 Marek Goldmann <mgoldman@redhat.com> - 4.0.14-1
|
||||
- Upstream release 4.0.14.Final
|
||||
|
||||
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.6.6-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
||||
|
||||
|
|
Loading…
Reference in New Issue