Package init
This commit is contained in:
parent
939b286859
commit
87621b20b7
36
README.en.md
36
README.en.md
@ -1,36 +0,0 @@
|
||||
# netty3
|
||||
|
||||
#### Description
|
||||
{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**}
|
||||
|
||||
#### Software Architecture
|
||||
Software architecture description
|
||||
|
||||
#### Installation
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Instructions
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Contribution
|
||||
|
||||
1. Fork the repository
|
||||
2. Create Feat_xxx branch
|
||||
3. Commit your code
|
||||
4. Create Pull Request
|
||||
|
||||
|
||||
#### Gitee Feature
|
||||
|
||||
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
|
||||
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
|
||||
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
|
||||
4. The most valuable open source project [GVP](https://gitee.com/gvp)
|
||||
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
|
||||
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
||||
39
README.md
39
README.md
@ -1,39 +0,0 @@
|
||||
# netty3
|
||||
|
||||
#### 介绍
|
||||
{**以下是码云平台说明,您可以替换此简介**
|
||||
码云是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台
|
||||
无论是个人、团队、或是企业,都能够用码云实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)}
|
||||
|
||||
#### 软件架构
|
||||
软件架构说明
|
||||
|
||||
|
||||
#### 安装教程
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### 使用说明
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### 参与贡献
|
||||
|
||||
1. Fork 本仓库
|
||||
2. 新建 Feat_xxx 分支
|
||||
3. 提交代码
|
||||
4. 新建 Pull Request
|
||||
|
||||
|
||||
#### 码云特技
|
||||
|
||||
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
|
||||
2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com)
|
||||
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目
|
||||
4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目
|
||||
5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
|
||||
6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
||||
38
disableNPN.patch
Normal file
38
disableNPN.patch
Normal file
@ -0,0 +1,38 @@
|
||||
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) {
|
||||
73
netty-3.10.6-port-to-jzlib-1.1.0.patch
Normal file
73
netty-3.10.6-port-to-jzlib-1.1.0.patch
Normal file
@ -0,0 +1,73 @@
|
||||
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) {
|
||||
BIN
netty-3.10.6.Final.tar.gz
Normal file
BIN
netty-3.10.6.Final.tar.gz
Normal file
Binary file not shown.
120
netty3.spec
Normal file
120
netty3.spec
Normal file
@ -0,0 +1,120 @@
|
||||
%global name_reltag .Final
|
||||
%global name_ver %{version}%{name_reltag}
|
||||
%global bundled_jzlib_dir src/main/java/org/jboss/netty/util/internal/jzlib
|
||||
%global netty_handler_dir src/main/java/org/jboss/netty/handler
|
||||
|
||||
Name: netty3
|
||||
Version: 3.10.6
|
||||
Release: 6
|
||||
Summary: An asynchronous event-driven network application framework and tools for Java
|
||||
License: ASL 2.0 and BSD and CC0
|
||||
URL: http://netty.io/
|
||||
Source0: https://github.com/netty/netty/archive/netty-%{name_ver}.tar.gz
|
||||
Patch0: disableNPN.patch
|
||||
Patch1: netty-3.10.6-port-to-jzlib-1.1.0.patch
|
||||
|
||||
BuildRequires: maven-local
|
||||
BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:)
|
||||
BuildRequires: mvn(org.slf4j:slf4j-api)
|
||||
BuildRequires: mvn(org.jboss.marshalling:jboss-marshalling)
|
||||
BuildRequires: mvn(org.jboss.logging:jboss-logging)
|
||||
BuildRequires: mvn(org.bouncycastle:bcpkix-jdk15on)
|
||||
BuildRequires: mvn(org.apache.maven.plugins:maven-resources-plugin)
|
||||
BuildRequires: mvn(org.apache.maven.plugins:maven-enforcer-plugin)
|
||||
BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin)
|
||||
BuildRequires: mvn(org.apache.felix:org.osgi.core)
|
||||
BuildRequires: mvn(org.apache.felix:org.osgi.compendium)
|
||||
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
|
||||
BuildRequires: mvn(org.apache.ant:ant-launcher)
|
||||
BuildRequires: mvn(org.apache.ant:ant)
|
||||
BuildRequires: mvn(log4j:log4j:12)
|
||||
BuildRequires: mvn(javax.servlet:javax.servlet-api)
|
||||
BuildRequires: mvn(io.netty:netty-tcnative)
|
||||
BuildRequires: mvn(commons-logging:commons-logging)
|
||||
BuildRequires: mvn(com.jcraft:jzlib)
|
||||
BuildRequires: mvn(com.google.protobuf:protobuf-java)
|
||||
BuildRequires: mvn(ant-contrib:ant-contrib)
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
Requires: netty-tcnative
|
||||
|
||||
Provides: bundled(java-base64)
|
||||
Provides: netty3-javadoc
|
||||
Obsoletes: netty3-javadoc
|
||||
|
||||
%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.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n netty-netty-%{name_ver}
|
||||
|
||||
rm -rf jar doc license
|
||||
|
||||
%pom_remove_plugin :animal-sniffer-maven-plugin
|
||||
%pom_remove_plugin :maven-checkstyle-plugin
|
||||
%pom_remove_plugin :maven-jxr-plugin
|
||||
%pom_remove_plugin org.eclipse.m2e:lifecycle-mapping
|
||||
|
||||
%pom_remove_dep javax.activation:activation
|
||||
%pom_remove_dep :npn-api
|
||||
|
||||
%pom_xpath_remove "pom:dependency[pom:artifactId[text()='netty-tcnative']]/pom:classifier"
|
||||
%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_set "pom:dependency[pom:scope[text()='compile'] and pom:optional[text()='true']]/pom:scope" provided
|
||||
%pom_xpath_set "pom:dependency[pom:artifactId = 'log4j']/pom:version" 12
|
||||
|
||||
%pom_change_dep :servlet-api javax.servlet:javax.servlet-api:3.1.0
|
||||
|
||||
%pom_remove_plugin :maven-assembly-plugin
|
||||
%pom_remove_plugin :maven-javadoc-plugin
|
||||
%pom_remove_plugin :maven-source-plugin
|
||||
%pom_remove_plugin kr.motd.maven:exec-maven-plugin
|
||||
|
||||
sed s/jboss-logging-spi/jboss-logging/ -i pom.xml
|
||||
|
||||
rm -r %{bundled_jzlib_dir}
|
||||
%pom_add_dep com.jcraft:jzlib
|
||||
#javafile=
|
||||
sed -i s/org.jboss.netty.util.internal.jzlib/com.jcraft.jzlib/ \
|
||||
`find %{netty_handler_dir}/codec -name \*.java | sort -u`
|
||||
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
rm -v %{netty_handler_dir}/ssl/JettyNpnSslEngine.java
|
||||
|
||||
%mvn_compat_version : %{version} 3.9.3 %{name_ver} 3.9.3.Final 3
|
||||
%mvn_alias : org.jboss.netty:
|
||||
%mvn_file : %{name}
|
||||
|
||||
%build
|
||||
%mvn_build -f
|
||||
|
||||
%install
|
||||
%mvn_install
|
||||
|
||||
%files -f .mfiles
|
||||
%doc README.md
|
||||
%doc %{_javadocdir}/%{name}
|
||||
%license LICENSE.txt NOTICE.txt
|
||||
|
||||
|
||||
%changelog
|
||||
* Sat Dec 7 2019 huyan <hu.huyan@huawei.com> - 3.10.6-6
|
||||
- Package Initialization
|
||||
Loading…
x
Reference in New Issue
Block a user