6
0
forked from pool/netty

34 Commits

Author SHA256 Message Date
4f7c8a054f Accepting request 1295615 from Java:packages
4.1.123

OBS-URL: https://build.opensuse.org/request/show/1295615
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/netty?expand=0&rev=7
2025-07-25 15:04:56 +00:00
9272b942cc OBS-URL: https://build.opensuse.org/package/show/Java:packages/netty?expand=0&rev=76 2025-07-24 18:15:35 +00:00
77a56e6ac6 OBS-URL: https://build.opensuse.org/package/show/Java:packages/netty?expand=0&rev=75 2025-07-24 18:01:32 +00:00
a346feeee4 OBS-URL: https://build.opensuse.org/package/show/Java:packages/netty?expand=0&rev=74 2025-07-24 17:32:42 +00:00
5b27b01931 OBS-URL: https://build.opensuse.org/package/show/Java:packages/netty?expand=0&rev=73 2025-07-03 19:09:26 +00:00
6cdd29a7f0 OBS-URL: https://build.opensuse.org/package/show/Java:packages/netty?expand=0&rev=72 2025-06-10 09:17:03 +00:00
609ab09c04 OBS-URL: https://build.opensuse.org/package/show/Java:packages/netty?expand=0&rev=71 2025-06-10 08:49:05 +00:00
f0b9d05854 Accepting request 1284160 from Java:packages
4.1.122

OBS-URL: https://build.opensuse.org/request/show/1284160
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/netty?expand=0&rev=6
2025-06-10 07:07:34 +00:00
25ecbc201f OBS-URL: https://build.opensuse.org/package/show/Java:packages/netty?expand=0&rev=69 2025-06-09 10:56:36 +00:00
d1f938a48d OBS-URL: https://build.opensuse.org/package/show/Java:packages/netty?expand=0&rev=68 2025-06-06 14:53:51 +00:00
35b7e182f1 Accepting request 1264771 from Java:packages
OBS-URL: https://build.opensuse.org/request/show/1264771
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/netty?expand=0&rev=5
2025-03-28 08:36:57 +00:00
6ca30ae4fe Fix pom.xml errors that will be fatal with Maven 4
OBS-URL: https://build.opensuse.org/package/show/Java:packages/netty?expand=0&rev=66
2025-03-27 22:03:44 +00:00
d58cd52ce9 Accepting request 1245120 from Java:packages
4.1.118

OBS-URL: https://build.opensuse.org/request/show/1245120
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/netty?expand=0&rev=4
2025-02-11 20:31:25 +00:00
0deabeaf17 OBS-URL: https://build.opensuse.org/package/show/Java:packages/netty?expand=0&rev=64 2025-02-11 14:57:30 +00:00
5dbb81cf38 OBS-URL: https://build.opensuse.org/package/show/Java:packages/netty?expand=0&rev=63 2025-02-11 14:54:05 +00:00
8a09310e15 OBS-URL: https://build.opensuse.org/package/show/Java:packages/netty?expand=0&rev=62 2025-02-11 14:35:06 +00:00
21911a7780 Accepting request 1228513 from Java:packages
4.1.115, bsc#1233297, CVE-2024-47535

OBS-URL: https://build.opensuse.org/request/show/1228513
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/netty?expand=0&rev=3
2024-12-05 16:10:13 +00:00
db991669c7 OBS-URL: https://build.opensuse.org/package/show/Java:packages/netty?expand=0&rev=60 2024-12-05 12:56:15 +00:00
232b552f66 OBS-URL: https://build.opensuse.org/package/show/Java:packages/netty?expand=0&rev=59 2024-12-05 12:54:23 +00:00
0b6723814d OBS-URL: https://build.opensuse.org/package/show/Java:packages/netty?expand=0&rev=58 2024-12-04 18:51:15 +00:00
af4cb47f4d OBS-URL: https://build.opensuse.org/package/show/Java:packages/netty?expand=0&rev=57 2024-12-04 18:41:48 +00:00
ec5430b105 OBS-URL: https://build.opensuse.org/package/show/Java:packages/netty?expand=0&rev=56 2024-12-04 18:22:32 +00:00
4659c18a19 Accepting request 1227087 from Java:packages
General cleanup

OBS-URL: https://build.opensuse.org/request/show/1227087
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/netty?expand=0&rev=2
2024-11-28 21:43:00 +00:00
96a6047fff OBS-URL: https://build.opensuse.org/package/show/Java:packages/netty?expand=0&rev=54 2024-11-27 07:50:07 +00:00
1aa82d8fd1 Accepting request 1219600 from Java:packages
forgot a changelog

OBS-URL: https://build.opensuse.org/request/show/1219600
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/netty?expand=0&rev=1
2024-10-30 16:37:08 +00:00
15b547fef2 OBS-URL: https://build.opensuse.org/package/show/Java:packages/netty?expand=0&rev=52 2024-10-30 14:49:59 +00:00
0ff97990aa OBS-URL: https://build.opensuse.org/package/show/Java:packages/netty?expand=0&rev=51 2024-10-09 21:16:46 +00:00
6ce117b8e1 OBS-URL: https://build.opensuse.org/package/show/Java:packages/netty?expand=0&rev=50 2024-10-09 18:00:16 +00:00
1f94ae87b5 OBS-URL: https://build.opensuse.org/package/show/Java:packages/netty?expand=0&rev=49 2024-10-09 17:35:11 +00:00
80436d6205 OBS-URL: https://build.opensuse.org/package/show/Java:packages/netty?expand=0&rev=48 2024-10-09 17:21:40 +00:00
e0fe930ae9 OBS-URL: https://build.opensuse.org/package/show/Java:packages/netty?expand=0&rev=47 2024-10-09 10:02:01 +00:00
c27f37778d OBS-URL: https://build.opensuse.org/package/show/Java:packages/netty?expand=0&rev=46 2024-10-09 01:48:03 +00:00
6f2467ee2a OBS-URL: https://build.opensuse.org/package/show/Java:packages/netty?expand=0&rev=45 2024-10-09 01:40:18 +00:00
0eb78f730e Add reproducible.patch to omit the mtime from libnetty-unix-common.a for reproducible builds (boo#1047218)
OBS-URL: https://build.opensuse.org/package/show/Java:packages/netty?expand=0&rev=44
2024-09-25 05:15:52 +00:00
12 changed files with 669 additions and 535 deletions

View File

@@ -1,19 +1,19 @@
From 9f25019c162b0fcb43a97b81a74f67524085ebaa Mon Sep 17 00:00:00 2001
From 2caba3146e0ff279db66cd8362c06efdeac0d48e Mon Sep 17 00:00:00 2001
From: Mat Booth <mat.booth@redhat.com>
Date: Mon, 7 Sep 2020 12:17:31 +0100
Subject: [PATCH 1/7] Remove optional dep Blockhound
Subject: [PATCH 1/4] Remove optional dep Blockhound
---
common/pom.xml | 5 -
.../java/io/netty/util/internal/Hidden.java | 190 ------
.../java/io/netty/util/internal/Hidden.java | 200 ------
...ockhound.integration.BlockHoundIntegration | 14 -
pom.xml | 8 -
transport-blockhound-tests/pom.xml | 163 -----
.../NettyBlockHoundIntegrationTest.java | 575 ------------------
transport-blockhound-tests/pom.xml | 219 -------
.../NettyBlockHoundIntegrationTest.java | 568 ------------------
.../netty/util/internal/localhost_server.key | 28 -
.../netty/util/internal/localhost_server.pem | 17 -
.../io/netty/util/internal/mutual_auth_ca.pem | 19 -
9 files changed, 1019 deletions(-)
9 files changed, 1078 deletions(-)
delete mode 100644 common/src/main/java/io/netty/util/internal/Hidden.java
delete mode 100644 common/src/main/resources/META-INF/services/reactor.blockhound.integration.BlockHoundIntegration
delete mode 100644 transport-blockhound-tests/pom.xml
@@ -23,7 +23,7 @@ Subject: [PATCH 1/7] Remove optional dep Blockhound
delete mode 100644 transport-blockhound-tests/src/test/resources/io/netty/util/internal/mutual_auth_ca.pem
diff --git a/common/pom.xml b/common/pom.xml
index 6b4cbb5955..d33dace318 100644
index 66e719e183..77452afbac 100644
--- a/common/pom.xml
+++ b/common/pom.xml
@@ -82,11 +82,6 @@
@@ -40,10 +40,10 @@ index 6b4cbb5955..d33dace318 100644
<artifactId>mockito-core</artifactId>
diff --git a/common/src/main/java/io/netty/util/internal/Hidden.java b/common/src/main/java/io/netty/util/internal/Hidden.java
deleted file mode 100644
index cf32e154ff..0000000000
index e227c90c7e..0000000000
--- a/common/src/main/java/io/netty/util/internal/Hidden.java
+++ /dev/null
@@ -1,190 +0,0 @@
@@ -1,200 +0,0 @@
-/*
- * Copyright 2019 The Netty Project
- *
@@ -142,6 +142,16 @@ index cf32e154ff..0000000000
- );
-
- builder.allowBlockingCallsInside(
- "io.netty.buffer.AdaptivePoolingAllocator$1",
- "initialValue"
- );
-
- builder.allowBlockingCallsInside(
- "io.netty.buffer.AdaptivePoolingAllocator$1",
- "onRemoval"
- );
-
- builder.allowBlockingCallsInside(
- "io.netty.handler.ssl.SslHandler",
- "handshake"
- );
@@ -256,10 +266,10 @@ index e33bea796c..0000000000
-io.netty.util.internal.Hidden$NettyBlockHoundIntegration
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 1760dd38f9..23868dff41 100644
index 4f572c5912..6b389326a4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -749,7 +749,6 @@
@@ -839,7 +839,6 @@
<module>testsuite-native-image</module>
<module>testsuite-native-image-client</module>
<module>testsuite-native-image-client-runtime-init</module>
@@ -267,7 +277,7 @@ index 1760dd38f9..23868dff41 100644
<module>microbench</module>
<module>bom</module>
</modules>
@@ -1168,13 +1167,6 @@
@@ -1254,13 +1253,6 @@
<version>${log4j2.version}</version>
<scope>test</scope>
</dependency>
@@ -276,17 +286,17 @@ index 1760dd38f9..23868dff41 100644
- <dependency>
- <groupId>io.projectreactor.tools</groupId>
- <artifactId>blockhound</artifactId>
- <version>1.0.6.RELEASE</version>
- <version>1.0.13.RELEASE</version>
- </dependency>
</dependencies>
</dependencyManagement>
diff --git a/transport-blockhound-tests/pom.xml b/transport-blockhound-tests/pom.xml
deleted file mode 100644
index ef1a0f6955..0000000000
index a48ee58b90..0000000000
--- a/transport-blockhound-tests/pom.xml
+++ /dev/null
@@ -1,163 +0,0 @@
@@ -1,219 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright 2019 The Netty Project
@@ -309,7 +319,7 @@ index ef1a0f6955..0000000000
- <parent>
- <groupId>io.netty</groupId>
- <artifactId>netty-parent</artifactId>
- <version>4.1.108.Final</version>
- <version>4.1.123.Final</version>
- </parent>
-
- <artifactId>netty-transport-blockhound-tests</artifactId>
@@ -402,6 +412,42 @@ index ef1a0f6955..0000000000
- <argLine.common>-XX:+AllowRedefinitionToAddDeleteMethods</argLine.common>
- </properties>
- </profile>
- <profile>
- <id>java22</id>
- <activation>
- <jdk>22</jdk>
- </activation>
- <properties>
- <argLine.common>-XX:+AllowRedefinitionToAddDeleteMethods</argLine.common>
- </properties>
- </profile>
- <profile>
- <id>java23</id>
- <activation>
- <jdk>23</jdk>
- </activation>
- <properties>
- <argLine.common>-XX:+AllowRedefinitionToAddDeleteMethods</argLine.common>
- </properties>
- </profile>
- <profile>
- <id>java24</id>
- <activation>
- <jdk>24</jdk>
- </activation>
- <properties>
- <argLine.common>-XX:+AllowRedefinitionToAddDeleteMethods</argLine.common>
- </properties>
- </profile>
- <profile>
- <id>java25</id>
- <activation>
- <jdk>25</jdk>
- </activation>
- <properties>
- <argLine.common>-XX:+AllowRedefinitionToAddDeleteMethods -XX:+EnableDynamicAgentLoading</argLine.common>
- </properties>
- </profile>
- </profiles>
-
- <properties>
@@ -448,14 +494,34 @@ index ef1a0f6955..0000000000
- <artifactId>blockhound</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.junit.jupiter</groupId>
- <artifactId>junit-jupiter-api</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.junit.jupiter</groupId>
- <artifactId>junit-jupiter-engine</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.junit.jupiter</groupId>
- <artifactId>junit-jupiter-params</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project>
diff --git a/transport-blockhound-tests/src/test/java/io/netty/util/internal/NettyBlockHoundIntegrationTest.java b/transport-blockhound-tests/src/test/java/io/netty/util/internal/NettyBlockHoundIntegrationTest.java
deleted file mode 100644
index a005095d82..0000000000
index 403b97a418..0000000000
--- a/transport-blockhound-tests/src/test/java/io/netty/util/internal/NettyBlockHoundIntegrationTest.java
+++ /dev/null
@@ -1,575 +0,0 @@
@@ -1,568 +0,0 @@
-/*
- * Copyright 2019 The Netty Project
-
@@ -509,11 +575,9 @@ index a005095d82..0000000000
-import io.netty.util.concurrent.ScheduledFuture;
-import io.netty.util.concurrent.SingleThreadEventExecutor;
-import io.netty.util.internal.Hidden.NettyBlockHoundIntegration;
-import org.hamcrest.Matchers;
-import org.junit.jupiter.api.BeforeAll;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.Timeout;
-import org.junit.jupiter.api.condition.DisabledIf;
-import reactor.blockhound.BlockHound;
-import reactor.blockhound.BlockingOperationError;
-import reactor.blockhound.integration.BlockHoundIntegration;
@@ -538,20 +602,15 @@ index a005095d82..0000000000
-import java.util.concurrent.locks.ReentrantLock;
-
-import static io.netty.buffer.Unpooled.wrappedBuffer;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertInstanceOf;
-import static org.junit.jupiter.api.Assertions.assertNull;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.junit.jupiter.api.Assertions.fail;
-import static org.junit.jupiter.api.Assumptions.assumeTrue;
-
-@DisabledIf("isDisabledIfJavaVersion18OrAbove")
-public class NettyBlockHoundIntegrationTest {
-
- private static boolean isDisabledIfJavaVersion18OrAbove() {
- return PlatformDependent.javaVersion() >= 18;
- }
-
- @BeforeAll
- public static void setUpClass() {
- BlockHound.install();
@@ -580,7 +639,7 @@ index a005095d82..0000000000
- future.get(5, TimeUnit.SECONDS);
- fail("Expected an exception due to a blocking call but none was thrown");
- } catch (ExecutionException e) {
- assertThat(e.getCause(), Matchers.instanceOf(BlockingOperationError.class));
- assertInstanceOf(BlockingOperationError.class, e.getCause());
- }
- }
-
@@ -871,7 +930,7 @@ index a005095d82..0000000000
- NioEventLoopGroup group = new NioEventLoopGroup();
- try {
- DnsNameResolverBuilder builder = new DnsNameResolverBuilder(group.next())
- .channelFactory(NioDatagramChannel::new);
- .datagramChannelFactory(NioDatagramChannel::new);
- doTestParseResolverFilesAllowsBlockingCalls(builder::build);
- } finally {
- group.shutdownGracefully();
@@ -1114,5 +1173,5 @@ index 9c9241bc65..0000000000
-hH82y9bBeflqroOeztqMpONpWoZjlz0sWbJNvXztXINL7LaNmVYOcoUrCcxPS54T
------END CERTIFICATE-----
--
2.44.0
2.50.1

View File

@@ -1,7 +1,7 @@
From 0ef17cec55336a3ec8cc66968f9af83ccf12265b Mon Sep 17 00:00:00 2001
From 8f4108d30a1a883b60bc944165ab1ecd91792d2e Mon Sep 17 00:00:00 2001
From: Mat Booth <mat.booth@redhat.com>
Date: Mon, 7 Sep 2020 13:24:30 +0100
Subject: [PATCH 2/7] Remove optional dep conscrypt
Subject: [PATCH 2/4] Remove optional dep conscrypt
---
handler/pom.xml | 6 -
@@ -15,7 +15,7 @@ Subject: [PATCH 2/7] Remove optional dep conscrypt
delete mode 100644 handler/src/main/java/io/netty/handler/ssl/ConscryptAlpnSslEngine.java
diff --git a/handler/pom.xml b/handler/pom.xml
index 4abc6aa199..a1f438f510 100644
index d13a8b48ed..e8375d6273 100644
--- a/handler/pom.xml
+++ b/handler/pom.xml
@@ -96,12 +96,6 @@
@@ -367,10 +367,10 @@ index 9eb8f15d14..b5715e87ff 100644
// https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8230977.
// Because of this lets not do a Java version runtime check but just depend on if the required methods are
diff --git a/handler/src/main/java/io/netty/handler/ssl/SslHandler.java b/handler/src/main/java/io/netty/handler/ssl/SslHandler.java
index f439173a8c..9f3035584e 100644
index f80b3004a8..6159b87ca2 100644
--- a/handler/src/main/java/io/netty/handler/ssl/SslHandler.java
+++ b/handler/src/main/java/io/netty/handler/ssl/SslHandler.java
@@ -252,55 +252,6 @@ public class SslHandler extends ByteToMessageDecoder implements ChannelOutboundH
@@ -250,55 +250,6 @@ public class SslHandler extends ByteToMessageDecoder implements ChannelOutboundH
return ((ReferenceCountedOpenSslEngine) engine).jdkCompatibilityMode;
}
},
@@ -426,7 +426,7 @@ index f439173a8c..9f3035584e 100644
JDK(false, MERGE_CUMULATOR) {
@Override
SSLEngineResult unwrap(SslHandler handler, ByteBuf in, int len, ByteBuf out) throws SSLException {
@@ -359,8 +310,7 @@ public class SslHandler extends ByteToMessageDecoder implements ChannelOutboundH
@@ -357,8 +308,7 @@ public class SslHandler extends ByteToMessageDecoder implements ChannelOutboundH
};
static SslEngineType forEngine(SSLEngine engine) {
@@ -437,10 +437,10 @@ index f439173a8c..9f3035584e 100644
SslEngineType(boolean wantsDirectBuffer, Cumulator cumulator) {
diff --git a/pom.xml b/pom.xml
index 23868dff41..3976ea7eb8 100644
index 6b389326a4..e3d8295642 100644
--- a/pom.xml
+++ b/pom.xml
@@ -828,16 +828,6 @@
@@ -918,16 +918,6 @@
<optional>true</optional>
</dependency>
@@ -454,9 +454,9 @@ index 23868dff41..3976ea7eb8 100644
- <optional>true</optional>
- </dependency>
-
<!--
Bouncy Castle - completely optional, only needed when:
- you generate a temporary self-signed certificate using SelfSignedCertificate, and
<!-- ACCP - needed for running tests, used for accelerating SSL with OpenSSL. -->
<dependency>
<groupId>software.amazon.cryptools</groupId>
--
2.44.0
2.50.1

View File

@@ -1,7 +1,7 @@
From 4d8c81c9cdc1c1ba3a823179dcc4ccef7042367b Mon Sep 17 00:00:00 2001
From 80592dee40e6b80b630c5931e4e76d0bbe7e9cfd Mon Sep 17 00:00:00 2001
From: Mat Booth <mat.booth@redhat.com>
Date: Mon, 7 Sep 2020 13:26:20 +0100
Subject: [PATCH 3/7] Remove optional deps jetty alpn and npn
Subject: [PATCH 3/4] Remove optional deps jetty alpn and npn
---
handler/pom.xml | 10 --
@@ -15,7 +15,7 @@ Subject: [PATCH 3/7] Remove optional deps jetty alpn and npn
delete mode 100644 handler/src/main/java/io/netty/handler/ssl/JettyNpnSslEngine.java
diff --git a/handler/pom.xml b/handler/pom.xml
index a1f438f510..4a98d473cf 100644
index e8375d6273..6b9a3dd5f7 100644
--- a/handler/pom.xml
+++ b/handler/pom.xml
@@ -86,16 +86,6 @@
@@ -374,10 +374,10 @@ index aad00b5f6d..0000000000
- }
-}
diff --git a/pom.xml b/pom.xml
index 3976ea7eb8..fb437f78ca 100644
index e3d8295642..e6759f0794 100644
--- a/pom.xml
+++ b/pom.xml
@@ -785,20 +785,6 @@
@@ -875,20 +875,6 @@
<optional>true</optional>
</dependency>
@@ -399,5 +399,5 @@ index 3976ea7eb8..fb437f78ca 100644
<dependency>
<groupId>com.google.protobuf</groupId>
--
2.44.0
2.50.1

View File

@@ -1,21 +1,21 @@
From d4347c276254ada7a0a06c0d3c0eeb550e9683b6 Mon Sep 17 00:00:00 2001
From e93d8f3b39a67d1726304d8fe29f5ca8584d60e0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
Date: Thu, 30 Mar 2023 13:19:04 +0200
Subject: [PATCH 4/7] Disable Brotli and ZStd compression
Subject: [PATCH 4/4] Disable Brotli and ZStd compression
---
.../codec/http/HttpContentCompressor.java | 105 +-----------------
.../codec/http/HttpContentDecompressor.java | 7 --
.../CompressorHttp2ConnectionEncoder.java | 44 +-------
.../DelegatingDecompressorFrameListener.java | 13 ---
.../StandardCompressionOptions.java | 53 +--------
5 files changed, 6 insertions(+), 216 deletions(-)
.../codec/http/HttpContentCompressor.java | 107 +-----------------
.../codec/http/HttpContentDecompressor.java | 22 ----
.../CompressorHttp2ConnectionEncoder.java | 42 +------
.../DelegatingDecompressorFrameListener.java | 20 ----
.../StandardCompressionOptions.java | 70 +-----------
5 files changed, 5 insertions(+), 256 deletions(-)
diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/HttpContentCompressor.java b/codec-http/src/main/java/io/netty/handler/codec/http/HttpContentCompressor.java
index 0effd37779..51e6c10934 100644
index 17f55d3ed5..27da52dd9a 100644
--- a/codec-http/src/main/java/io/netty/handler/codec/http/HttpContentCompressor.java
+++ b/codec-http/src/main/java/io/netty/handler/codec/http/HttpContentCompressor.java
@@ -22,9 +22,6 @@ import io.netty.buffer.ByteBuf;
@@ -24,9 +24,6 @@ import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.embedded.EmbeddedChannel;
import io.netty.handler.codec.MessageToByteEncoder;
@@ -25,7 +25,7 @@ index 0effd37779..51e6c10934 100644
import io.netty.handler.codec.compression.CompressionOptions;
import io.netty.handler.codec.compression.DeflateOptions;
import io.netty.handler.codec.compression.GzipOptions;
@@ -32,11 +29,6 @@ import io.netty.handler.codec.compression.StandardCompressionOptions;
@@ -34,11 +31,6 @@ import io.netty.handler.codec.compression.StandardCompressionOptions;
import io.netty.handler.codec.compression.ZlibCodecFactory;
import io.netty.handler.codec.compression.ZlibEncoder;
import io.netty.handler.codec.compression.ZlibWrapper;
@@ -36,32 +36,20 @@ index 0effd37779..51e6c10934 100644
-import io.netty.handler.codec.compression.SnappyOptions;
import io.netty.util.internal.ObjectUtil;
/**
@@ -49,11 +41,8 @@ import io.netty.util.internal.ObjectUtil;
import static io.netty.util.internal.ObjectUtil.checkInRange;
@@ -52,11 +44,8 @@ import static io.netty.util.internal.ObjectUtil.checkInRange;
*/
public class HttpContentCompressor extends HttpContentEncoder {
private final boolean supportsCompressionOptions;
- private final BrotliOptions brotliOptions;
private final GzipOptions gzipOptions;
private final DeflateOptions deflateOptions;
- private final ZstdOptions zstdOptions;
- private final SnappyOptions snappyOptions;
private final int compressionLevel;
private final int windowBits;
@@ -137,11 +126,8 @@ public class HttpContentCompressor extends HttpContentEncoder {
this.windowBits = ObjectUtil.checkInRange(windowBits, 9, 15, "windowBits");
this.memLevel = ObjectUtil.checkInRange(memLevel, 1, 9, "memLevel");
this.contentSizeThreshold = ObjectUtil.checkPositiveOrZero(contentSizeThreshold, "contentSizeThreshold");
- this.brotliOptions = null;
this.gzipOptions = null;
this.deflateOptions = null;
- this.zstdOptions = null;
- this.snappyOptions = null;
this.factories = null;
this.supportsCompressionOptions = false;
}
@@ -170,17 +156,11 @@ public class HttpContentCompressor extends HttpContentEncoder {
private final int contentSizeThreshold;
private ChannelHandlerContext ctx;
@@ -174,11 +163,8 @@ public class HttpContentCompressor extends HttpContentEncoder {
*/
public HttpContentCompressor(int contentSizeThreshold, CompressionOptions... compressionOptions) {
this.contentSizeThreshold = ObjectUtil.checkPositiveOrZero(contentSizeThreshold, "contentSizeThreshold");
@@ -71,33 +59,27 @@ index 0effd37779..51e6c10934 100644
- ZstdOptions zstdOptions = null;
- SnappyOptions snappyOptions = null;
if (compressionOptions == null || compressionOptions.length == 0) {
- brotliOptions = Brotli.isAvailable() ? StandardCompressionOptions.brotli() : null;
gzipOptions = StandardCompressionOptions.gzip();
deflateOptions = StandardCompressionOptions.deflate();
- zstdOptions = Zstd.isAvailable() ? StandardCompressionOptions.zstd() : null;
- snappyOptions = StandardCompressionOptions.snappy();
} else {
ObjectUtil.deepCheckNotNull("compressionOptions", compressionOptions);
for (CompressionOptions compressionOption : compressionOptions) {
@@ -190,16 +170,10 @@ public class HttpContentCompressor extends HttpContentEncoder {
// This results in the static analysis of native-image identifying the instanceof BrotliOptions check
// and thus BrotliOptions itself as unreachable, enabling native-image to link all classes
// at build time and not complain about the missing Brotli classes.
- if (Brotli.isAvailable() && compressionOption instanceof BrotliOptions) {
- brotliOptions = (BrotliOptions) compressionOption;
- } else if (compressionOption instanceof GzipOptions) {
+ if (compressionOption instanceof GzipOptions) {
gzipOptions = (GzipOptions) compressionOption;
} else if (compressionOption instanceof DeflateOptions) {
deflateOptions = (DeflateOptions) compressionOption;
- } else if (compressionOption instanceof ZstdOptions) {
- zstdOptions = (ZstdOptions) compressionOption;
- } else if (compressionOption instanceof SnappyOptions) {
- snappyOptions = (SnappyOptions) compressionOption;
} else {
throw new IllegalArgumentException("Unsupported " + CompressionOptions.class.getSimpleName() +
": " + compressionOption);
@@ -209,9 +183,6 @@ public class HttpContentCompressor extends HttpContentEncoder {
compressionOptions = defaultCompressionOptions(
StandardCompressionOptions.gzip(), StandardCompressionOptions.deflate());
@@ -192,16 +178,10 @@ public class HttpContentCompressor extends HttpContentEncoder {
// This results in the static analysis of native-image identifying the instanceof BrotliOptions check
// and thus BrotliOptions itself as unreachable, enabling native-image to link all classes
// at build time and not complain about the missing Brotli classes.
- if (Brotli.isAvailable() && compressionOption instanceof BrotliOptions) {
- brotliOptions = (BrotliOptions) compressionOption;
- } else if (compressionOption instanceof GzipOptions) {
+ if (compressionOption instanceof GzipOptions) {
gzipOptions = (GzipOptions) compressionOption;
} else if (compressionOption instanceof DeflateOptions) {
deflateOptions = (DeflateOptions) compressionOption;
- } else if (Zstd.isAvailable() && compressionOption instanceof ZstdOptions) {
- zstdOptions = (ZstdOptions) compressionOption;
- } else if (compressionOption instanceof SnappyOptions) {
- snappyOptions = (SnappyOptions) compressionOption;
} else {
throw new IllegalArgumentException("Unsupported " + CompressionOptions.class.getSimpleName() +
": " + compressionOption);
@@ -210,9 +190,6 @@ public class HttpContentCompressor extends HttpContentEncoder {
this.gzipOptions = gzipOptions;
this.deflateOptions = deflateOptions;
@@ -107,7 +89,7 @@ index 0effd37779..51e6c10934 100644
this.factories = new HashMap<String, CompressionEncoderFactory>();
@@ -221,15 +192,6 @@ public class HttpContentCompressor extends HttpContentEncoder {
@@ -222,15 +199,6 @@ public class HttpContentCompressor extends HttpContentEncoder {
if (this.deflateOptions != null) {
this.factories.put("deflate", new DeflateEncoderFactory());
}
@@ -120,10 +102,25 @@ index 0effd37779..51e6c10934 100644
- if (this.snappyOptions != null) {
- this.factories.put("snappy", new SnappyEncoderFactory());
- }
}
this.compressionLevel = -1;
this.windowBits = -1;
@@ -302,9 +264,6 @@ public class HttpContentCompressor extends HttpContentEncoder {
private static CompressionOptions[] defaultCompressionOptions(
@@ -238,14 +206,6 @@ public class HttpContentCompressor extends HttpContentEncoder {
List<CompressionOptions> options = new ArrayList<CompressionOptions>(5);
options.add(gzipOptions);
options.add(deflateOptions);
- options.add(StandardCompressionOptions.snappy());
-
- if (Brotli.isAvailable()) {
- options.add(StandardCompressionOptions.brotli());
- }
- if (Zstd.isAvailable()) {
- options.add(StandardCompressionOptions.zstd());
- }
return options.toArray(new CompressionOptions[0]);
}
@@ -289,9 +249,6 @@ public class HttpContentCompressor extends HttpContentEncoder {
@SuppressWarnings("FloatingPointEquality")
protected String determineEncoding(String acceptEncoding) {
float starQ = -1.0f;
@@ -133,7 +130,7 @@ index 0effd37779..51e6c10934 100644
float gzipQ = -1.0f;
float deflateQ = -1.0f;
for (String encoding : acceptEncoding.split(",")) {
@@ -320,41 +279,20 @@ public class HttpContentCompressor extends HttpContentEncoder {
@@ -307,41 +264,20 @@ public class HttpContentCompressor extends HttpContentEncoder {
}
if (encoding.contains("*")) {
starQ = q;
@@ -177,7 +174,7 @@ index 0effd37779..51e6c10934 100644
if (gzipQ == -1.0f && this.gzipOptions != null) {
return "gzip";
}
@@ -435,41 +373,4 @@ public class HttpContentCompressor extends HttpContentEncoder {
@@ -422,41 +358,4 @@ public class HttpContentCompressor extends HttpContentEncoder {
deflateOptions.windowBits(), deflateOptions.memLevel());
}
}
@@ -220,10 +217,10 @@ index 0effd37779..51e6c10934 100644
- }
}
diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/HttpContentDecompressor.java b/codec-http/src/main/java/io/netty/handler/codec/http/HttpContentDecompressor.java
index e8e1d90972..15f56aff91 100644
index 44e6195332..ea461844af 100644
--- a/codec-http/src/main/java/io/netty/handler/codec/http/HttpContentDecompressor.java
+++ b/codec-http/src/main/java/io/netty/handler/codec/http/HttpContentDecompressor.java
@@ -15,7 +15,6 @@
@@ -15,23 +15,15 @@
*/
package io.netty.handler.codec.http;
@@ -231,31 +228,48 @@ index e8e1d90972..15f56aff91 100644
import static io.netty.handler.codec.http.HttpHeaderValues.DEFLATE;
import static io.netty.handler.codec.http.HttpHeaderValues.GZIP;
import static io.netty.handler.codec.http.HttpHeaderValues.X_DEFLATE;
@@ -23,8 +22,6 @@ import static io.netty.handler.codec.http.HttpHeaderValues.X_GZIP;
import static io.netty.handler.codec.http.HttpHeaderValues.SNAPPY;
import static io.netty.handler.codec.http.HttpHeaderValues.X_GZIP;
-import static io.netty.handler.codec.http.HttpHeaderValues.SNAPPY;
-import static io.netty.handler.codec.http.HttpHeaderValues.ZSTD;
import static io.netty.util.internal.ObjectUtil.checkPositiveOrZero;
import io.netty.channel.embedded.EmbeddedChannel;
-import io.netty.handler.codec.compression.Brotli;
-import io.netty.handler.codec.compression.BrotliDecoder;
-import io.netty.handler.codec.compression.SnappyFrameDecoder;
import io.netty.handler.codec.compression.ZlibCodecFactory;
import io.netty.handler.codec.compression.ZlibWrapper;
import io.netty.handler.codec.compression.SnappyFrameDecoder;
@@ -69,10 +66,6 @@ public class HttpContentDecompressor extends HttpContentDecoder {
-import io.netty.handler.codec.compression.Zstd;
-import io.netty.handler.codec.compression.ZstdDecoder;
/**
* Decompresses an {@link HttpMessage} and an {@link HttpContent} compressed in
@@ -102,20 +94,6 @@ public class HttpContentDecompressor extends HttpContentDecoder {
return new EmbeddedChannel(ctx.channel().id(), ctx.channel().metadata().hasDisconnect(),
ctx.channel().config(), ZlibCodecFactory.newZlibDecoder(wrapper));
ctx.channel().config(), ZlibCodecFactory.newZlibDecoder(wrapper, maxAllocation));
}
- if (Brotli.isAvailable() && BR.contentEqualsIgnoreCase(contentEncoding)) {
- return new EmbeddedChannel(ctx.channel().id(), ctx.channel().metadata().hasDisconnect(),
- ctx.channel().config(), new BrotliDecoder());
- }
-
- if (SNAPPY.contentEqualsIgnoreCase(contentEncoding)) {
- return new EmbeddedChannel(ctx.channel().id(), ctx.channel().metadata().hasDisconnect(),
- ctx.channel().config(), new SnappyFrameDecoder());
- }
-
- if (Zstd.isAvailable() && ZSTD.contentEqualsIgnoreCase(contentEncoding)) {
- return new EmbeddedChannel(ctx.channel().id(), ctx.channel().metadata().hasDisconnect(),
- ctx.channel().config(), new ZstdDecoder());
- }
if (SNAPPY.contentEqualsIgnoreCase(contentEncoding)) {
return new EmbeddedChannel(ctx.channel().id(), ctx.channel().metadata().hasDisconnect(),
// 'identity' or unsupported
return null;
diff --git a/codec-http2/src/main/java/io/netty/handler/codec/http2/CompressorHttp2ConnectionEncoder.java b/codec-http2/src/main/java/io/netty/handler/codec/http2/CompressorHttp2ConnectionEncoder.java
index 262c8ad18b..150c1929b8 100644
index b12213dff6..fdeadaebbe 100644
--- a/codec-http2/src/main/java/io/netty/handler/codec/http2/CompressorHttp2ConnectionEncoder.java
+++ b/codec-http2/src/main/java/io/netty/handler/codec/http2/CompressorHttp2ConnectionEncoder.java
@@ -21,33 +21,23 @@ import io.netty.channel.ChannelHandlerContext;
@@ -21,20 +21,12 @@ import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelPromise;
import io.netty.channel.embedded.EmbeddedChannel;
import io.netty.handler.codec.ByteToMessageDecoder;
@@ -268,13 +282,15 @@ index 262c8ad18b..150c1929b8 100644
import io.netty.handler.codec.compression.DeflateOptions;
import io.netty.handler.codec.compression.GzipOptions;
import io.netty.handler.codec.compression.StandardCompressionOptions;
-import io.netty.handler.codec.compression.Zstd;
-import io.netty.handler.codec.compression.ZstdEncoder;
-import io.netty.handler.codec.compression.ZstdOptions;
-import io.netty.handler.codec.compression.SnappyFrameEncoder;
-import io.netty.handler.codec.compression.SnappyOptions;
import io.netty.util.concurrent.PromiseCombiner;
import io.netty.util.internal.ObjectUtil;
import io.netty.util.internal.UnstableApi;
@@ -43,14 +35,11 @@ import java.util.List;
import static io.netty.handler.codec.http.HttpHeaderNames.CONTENT_ENCODING;
import static io.netty.handler.codec.http.HttpHeaderNames.CONTENT_LENGTH;
@@ -289,7 +305,7 @@ index 262c8ad18b..150c1929b8 100644
/**
* A decorating HTTP2 encoder that will compress data frames according to the {@code content-encoding} header for each
@@ -67,11 +57,8 @@ public class CompressorHttp2ConnectionEncoder extends DecoratingHttp2ConnectionE
@@ -69,11 +58,8 @@ public class CompressorHttp2ConnectionEncoder extends DecoratingHttp2ConnectionE
private final boolean supportsCompressionOptions;
@@ -301,24 +317,21 @@ index 262c8ad18b..150c1929b8 100644
/**
* Create a new {@link CompressorHttp2ConnectionEncoder} instance
@@ -82,15 +69,7 @@ public class CompressorHttp2ConnectionEncoder extends DecoratingHttp2ConnectionE
}
private static CompressionOptions[] defaultCompressionOptions() {
@@ -87,13 +73,6 @@ public class CompressorHttp2ConnectionEncoder extends DecoratingHttp2ConnectionE
List<CompressionOptions> compressionOptions = new ArrayList<CompressionOptions>();
compressionOptions.add(StandardCompressionOptions.gzip());
compressionOptions.add(StandardCompressionOptions.deflate());
- compressionOptions.add(StandardCompressionOptions.snappy());
- if (Brotli.isAvailable()) {
- return new CompressionOptions[] {
- StandardCompressionOptions.brotli(),
- StandardCompressionOptions.snappy(),
- StandardCompressionOptions.gzip(),
- StandardCompressionOptions.deflate() };
- compressionOptions.add(StandardCompressionOptions.brotli());
- }
- return new CompressionOptions[] { StandardCompressionOptions.snappy(),
- StandardCompressionOptions.gzip(), StandardCompressionOptions.deflate() };
+ return new CompressionOptions[] { StandardCompressionOptions.gzip(), StandardCompressionOptions.deflate() };
- if (Zstd.isAvailable()) {
- compressionOptions.add(StandardCompressionOptions.zstd());
- }
return compressionOptions.toArray(new CompressionOptions[0]);
}
/**
@@ -135,16 +114,10 @@ public class CompressorHttp2ConnectionEncoder extends DecoratingHttp2ConnectionE
@@ -139,16 +118,10 @@ public class CompressorHttp2ConnectionEncoder extends DecoratingHttp2ConnectionE
// This results in the static analysis of native-image identifying the instanceof BrotliOptions check
// and thus BrotliOptions itself as unreachable, enabling native-image to link all classes at build time
// and not complain about the missing Brotli classes.
@@ -336,7 +349,7 @@ index 262c8ad18b..150c1929b8 100644
} else {
throw new IllegalArgumentException("Unsupported " + CompressionOptions.class.getSimpleName() +
": " + compressionOptions);
@@ -282,19 +255,6 @@ public class CompressorHttp2ConnectionEncoder extends DecoratingHttp2ConnectionE
@@ -286,19 +259,6 @@ public class CompressorHttp2ConnectionEncoder extends DecoratingHttp2ConnectionE
if (DEFLATE.contentEqualsIgnoreCase(contentEncoding) || X_DEFLATE.contentEqualsIgnoreCase(contentEncoding)) {
return newCompressionChannel(ctx, ZlibWrapper.ZLIB);
}
@@ -357,19 +370,20 @@ index 262c8ad18b..150c1929b8 100644
return null;
}
diff --git a/codec-http2/src/main/java/io/netty/handler/codec/http2/DelegatingDecompressorFrameListener.java b/codec-http2/src/main/java/io/netty/handler/codec/http2/DelegatingDecompressorFrameListener.java
index 6c59189be6..bbd89747ab 100644
index 4c25f0adb7..3e3cdddeb4 100644
--- a/codec-http2/src/main/java/io/netty/handler/codec/http2/DelegatingDecompressorFrameListener.java
+++ b/codec-http2/src/main/java/io/netty/handler/codec/http2/DelegatingDecompressorFrameListener.java
@@ -19,22 +19,17 @@ import io.netty.buffer.Unpooled;
@@ -19,24 +19,16 @@ import io.netty.buffer.Unpooled;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.embedded.EmbeddedChannel;
import io.netty.handler.codec.ByteToMessageDecoder;
-import io.netty.handler.codec.compression.Brotli;
-import io.netty.handler.codec.compression.BrotliDecoder;
-import io.netty.handler.codec.compression.Zstd;
-import io.netty.handler.codec.compression.ZstdDecoder;
import io.netty.handler.codec.compression.ZlibCodecFactory;
import io.netty.handler.codec.compression.ZlibWrapper;
-import io.netty.handler.codec.compression.SnappyFrameDecoder;
import io.netty.util.internal.UnstableApi;
import static io.netty.handler.codec.http.HttpHeaderNames.CONTENT_ENCODING;
import static io.netty.handler.codec.http.HttpHeaderNames.CONTENT_LENGTH;
@@ -380,12 +394,13 @@ index 6c59189be6..bbd89747ab 100644
import static io.netty.handler.codec.http.HttpHeaderValues.X_DEFLATE;
import static io.netty.handler.codec.http.HttpHeaderValues.X_GZIP;
-import static io.netty.handler.codec.http.HttpHeaderValues.SNAPPY;
-import static io.netty.handler.codec.http.HttpHeaderValues.ZSTD;
import static io.netty.handler.codec.http2.Http2Error.INTERNAL_ERROR;
import static io.netty.handler.codec.http2.Http2Exception.streamError;
import static io.netty.util.internal.ObjectUtil.checkNotNull;
@@ -180,14 +175,6 @@ public class DelegatingDecompressorFrameListener extends Http2FrameListenerDecor
@@ -233,18 +225,6 @@ public class DelegatingDecompressorFrameListener extends Http2FrameListenerDecor
return new EmbeddedChannel(ctx.channel().id(), ctx.channel().metadata().hasDisconnect(),
ctx.channel().config(), ZlibCodecFactory.newZlibDecoder(wrapper));
ctx.channel().config(), ZlibCodecFactory.newZlibDecoder(wrapper, maxAllocation));
}
- if (Brotli.isAvailable() && BR.contentEqualsIgnoreCase(contentEncoding)) {
- return new EmbeddedChannel(ctx.channel().id(), ctx.channel().metadata().hasDisconnect(),
@@ -394,30 +409,36 @@ index 6c59189be6..bbd89747ab 100644
- if (SNAPPY.contentEqualsIgnoreCase(contentEncoding)) {
- return new EmbeddedChannel(ctx.channel().id(), ctx.channel().metadata().hasDisconnect(),
- ctx.channel().config(), new SnappyFrameDecoder());
- }
- if (Zstd.isAvailable() && ZSTD.contentEqualsIgnoreCase(contentEncoding)) {
- return new EmbeddedChannel(ctx.channel().id(), ctx.channel().metadata().hasDisconnect(),
- ctx.channel().config(), new ZstdDecoder());
- }
// 'identity' or unsupported
return null;
}
diff --git a/codec/src/main/java/io/netty/handler/codec/compression/StandardCompressionOptions.java b/codec/src/main/java/io/netty/handler/codec/compression/StandardCompressionOptions.java
index ac2582418c..698c4b510a 100644
index 38793a97e6..c1f1c8c17c 100644
--- a/codec/src/main/java/io/netty/handler/codec/compression/StandardCompressionOptions.java
+++ b/codec/src/main/java/io/netty/handler/codec/compression/StandardCompressionOptions.java
@@ -15,10 +15,8 @@
@@ -15,11 +15,10 @@
*/
package io.netty.handler.codec.compression;
-import com.aayushatharva.brotli4j.encoder.Encoder;
-
import io.netty.util.internal.ObjectUtil;
/**
- * Standard Compression Options for {@link BrotliOptions},
+ * Standard Compression Options for
* {@link GzipOptions} and {@link DeflateOptions}
*/
public final class StandardCompressionOptions {
@@ -28,55 +26,6 @@ public final class StandardCompressionOptions {
@@ -28,73 +27,6 @@ public final class StandardCompressionOptions {
// Prevent outside initialization
}
/**
- /**
- * Default implementation of {@link BrotliOptions} with {@link Encoder.Parameters#setQuality(int)} set to 4
- * and {@link Encoder.Parameters#setMode(Encoder.Mode)} set to {@link Encoder.Mode#TEXT}
- */
@@ -430,12 +451,34 @@ index ac2582418c..698c4b510a 100644
- *
- * @param parameters {@link Encoder.Parameters} Instance
- * @throws NullPointerException If {@link Encoder.Parameters} is {@code null}
- * @deprecated Use {@link #brotli(int, int, BrotliMode)}
- */
- @Deprecated
- public static BrotliOptions brotli(Encoder.Parameters parameters) {
- return new BrotliOptions(parameters);
- }
-
- /**
- * Create a new {@link BrotliOptions}
- *
- * @param quality Specifies the compression level.
- * @param window Specifies the size of the sliding window when compressing.
- * @param mode optimizes the compression algorithm based on the type of input data.
- * @throws NullPointerException If {@link BrotliMode} is {@code null}
- */
- public static BrotliOptions brotli(int quality, int window, BrotliMode mode) {
- ObjectUtil.checkInRange(quality, 0, 11, "quality");
- ObjectUtil.checkInRange(window, 10, 24, "window");
- ObjectUtil.checkNotNull(mode, "mode");
-
- Encoder.Parameters parameters = new Encoder.Parameters()
- .setQuality(quality)
- .setWindow(window)
- .setMode(mode.adapt());
- return new BrotliOptions(parameters);
- }
-
- /**
- * Default implementation of {@link ZstdOptions} with{compressionLevel(int)} set to
- * {@link ZstdConstants#DEFAULT_COMPRESSION_LEVEL},{@link ZstdConstants#DEFAULT_BLOCK_SIZE},
- * {@link ZstdConstants#MAX_BLOCK_SIZE}
@@ -447,12 +490,9 @@ index ac2582418c..698c4b510a 100644
- /**
- * Create a new {@link ZstdOptions}
- *
- * @param blockSize
- * is used to calculate the compressionLevel
- * @param maxEncodeSize
- * specifies the size of the largest compressed object
- * @param compressionLevel
- * specifies the level of the compression
- * @param blockSize is used to calculate the compressionLevel
- * @param maxEncodeSize specifies the size of the largest compressed object
- * @param compressionLevel specifies the level of the compression
- */
- public static ZstdOptions zstd(int compressionLevel, int blockSize, int maxEncodeSize) {
- return new ZstdOptions(compressionLevel, blockSize, maxEncodeSize);
@@ -460,16 +500,14 @@ index ac2582418c..698c4b510a 100644
-
- /**
- * Create a new {@link SnappyOptions}
- *
- */
- public static SnappyOptions snappy() {
- return new SnappyOptions();
- }
-
- /**
/**
* Default implementation of {@link GzipOptions} with
* {@code compressionLevel()} set to 6, {@code windowBits()} set to 15 and {@code memLevel()} set to 8.
*/
--
2.44.0
2.50.1

View File

@@ -1,153 +0,0 @@
From ed6da0d5d23a55e951bdd303eb7805634ea4b90e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
Date: Thu, 30 Mar 2023 13:19:45 +0200
Subject: [PATCH 5/7] Do not use the Graal annotations
---
.../java/io/netty/util/NetUtilSubstitutions.java | 13 -------------
.../util/internal/svm/CleanerJava6Substitution.java | 10 ----------
.../svm/PlatformDependent0Substitution.java | 10 ----------
.../internal/svm/PlatformDependentSubstitution.java | 9 ---------
.../svm/UnsafeRefArrayAccessSubstitution.java | 9 ---------
5 files changed, 51 deletions(-)
diff --git a/common/src/main/java/io/netty/util/NetUtilSubstitutions.java b/common/src/main/java/io/netty/util/NetUtilSubstitutions.java
index 65c7bb94a5..18bfc1664f 100644
--- a/common/src/main/java/io/netty/util/NetUtilSubstitutions.java
+++ b/common/src/main/java/io/netty/util/NetUtilSubstitutions.java
@@ -15,35 +15,22 @@
*/
package io.netty.util;
-import com.oracle.svm.core.annotate.Alias;
-import com.oracle.svm.core.annotate.InjectAccessors;
-import com.oracle.svm.core.annotate.TargetClass;
-
import java.net.Inet4Address;
import java.net.Inet6Address;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.util.Collection;
-@TargetClass(NetUtil.class)
final class NetUtilSubstitutions {
private NetUtilSubstitutions() {
}
- @Alias
- @InjectAccessors(NetUtilLocalhost4Accessor.class)
public static Inet4Address LOCALHOST4;
- @Alias
- @InjectAccessors(NetUtilLocalhost6Accessor.class)
public static Inet6Address LOCALHOST6;
- @Alias
- @InjectAccessors(NetUtilLocalhostAccessor.class)
public static InetAddress LOCALHOST;
- @Alias
- @InjectAccessors(NetUtilNetworkInterfacesAccessor.class)
public static Collection<NetworkInterface> NETWORK_INTERFACES;
private static final class NetUtilLocalhost4Accessor {
diff --git a/common/src/main/java/io/netty/util/internal/svm/CleanerJava6Substitution.java b/common/src/main/java/io/netty/util/internal/svm/CleanerJava6Substitution.java
index aed4777a0d..0fa5a858ab 100644
--- a/common/src/main/java/io/netty/util/internal/svm/CleanerJava6Substitution.java
+++ b/common/src/main/java/io/netty/util/internal/svm/CleanerJava6Substitution.java
@@ -15,19 +15,9 @@
*/
package io.netty.util.internal.svm;
-import com.oracle.svm.core.annotate.Alias;
-import com.oracle.svm.core.annotate.RecomputeFieldValue;
-import com.oracle.svm.core.annotate.TargetClass;
-
-@TargetClass(className = "io.netty.util.internal.CleanerJava6")
final class CleanerJava6Substitution {
private CleanerJava6Substitution() {
}
- @Alias
- @RecomputeFieldValue(
- kind = RecomputeFieldValue.Kind.FieldOffset,
- declClassName = "java.nio.DirectByteBuffer",
- name = "cleaner")
private static long CLEANER_FIELD_OFFSET;
}
diff --git a/common/src/main/java/io/netty/util/internal/svm/PlatformDependent0Substitution.java b/common/src/main/java/io/netty/util/internal/svm/PlatformDependent0Substitution.java
index 1a06a5518d..3bd61f467a 100644
--- a/common/src/main/java/io/netty/util/internal/svm/PlatformDependent0Substitution.java
+++ b/common/src/main/java/io/netty/util/internal/svm/PlatformDependent0Substitution.java
@@ -15,19 +15,9 @@
*/
package io.netty.util.internal.svm;
-import com.oracle.svm.core.annotate.Alias;
-import com.oracle.svm.core.annotate.RecomputeFieldValue;
-import com.oracle.svm.core.annotate.TargetClass;
-
-@TargetClass(className = "io.netty.util.internal.PlatformDependent0")
final class PlatformDependent0Substitution {
private PlatformDependent0Substitution() {
}
- @Alias
- @RecomputeFieldValue(
- kind = RecomputeFieldValue.Kind.FieldOffset,
- declClassName = "java.nio.Buffer",
- name = "address")
private static long ADDRESS_FIELD_OFFSET;
}
diff --git a/common/src/main/java/io/netty/util/internal/svm/PlatformDependentSubstitution.java b/common/src/main/java/io/netty/util/internal/svm/PlatformDependentSubstitution.java
index 08932da772..8df7f18218 100644
--- a/common/src/main/java/io/netty/util/internal/svm/PlatformDependentSubstitution.java
+++ b/common/src/main/java/io/netty/util/internal/svm/PlatformDependentSubstitution.java
@@ -15,11 +15,6 @@
*/
package io.netty.util.internal.svm;
-import com.oracle.svm.core.annotate.Alias;
-import com.oracle.svm.core.annotate.RecomputeFieldValue;
-import com.oracle.svm.core.annotate.TargetClass;
-
-@TargetClass(className = "io.netty.util.internal.PlatformDependent")
final class PlatformDependentSubstitution {
private PlatformDependentSubstitution() {
}
@@ -31,9 +26,5 @@ final class PlatformDependentSubstitution {
* in PlatformDependent happens during image building, the non-recomputed value
* is cached.
*/
- @Alias
- @RecomputeFieldValue(
- kind = RecomputeFieldValue.Kind.ArrayBaseOffset,
- declClass = byte[].class)
private static long BYTE_ARRAY_BASE_OFFSET;
}
diff --git a/common/src/main/java/io/netty/util/internal/svm/UnsafeRefArrayAccessSubstitution.java b/common/src/main/java/io/netty/util/internal/svm/UnsafeRefArrayAccessSubstitution.java
index 08f492f132..f0b10d7cde 100644
--- a/common/src/main/java/io/netty/util/internal/svm/UnsafeRefArrayAccessSubstitution.java
+++ b/common/src/main/java/io/netty/util/internal/svm/UnsafeRefArrayAccessSubstitution.java
@@ -15,18 +15,9 @@
*/
package io.netty.util.internal.svm;
-import com.oracle.svm.core.annotate.Alias;
-import com.oracle.svm.core.annotate.RecomputeFieldValue;
-import com.oracle.svm.core.annotate.TargetClass;
-
-@TargetClass(className = "io.netty.util.internal.shaded.org.jctools.util.UnsafeRefArrayAccess")
final class UnsafeRefArrayAccessSubstitution {
private UnsafeRefArrayAccessSubstitution() {
}
- @Alias
- @RecomputeFieldValue(
- kind = RecomputeFieldValue.Kind.ArrayIndexShift,
- declClass = Object[].class)
public static int REF_ELEMENT_SHIFT;
}
--
2.44.0

View File

@@ -1,157 +0,0 @@
From 96fcc46e1eb7f3199fbf7f56d9c6435a19a10001 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
Date: Thu, 30 Mar 2023 13:20:35 +0200
Subject: [PATCH 6/7] Do not use the Jetbrains annotations
---
common/src/main/java/io/netty/util/Recycler.java | 2 --
.../java/io/netty/util/concurrent/AbstractEventExecutor.java | 4 +---
.../java/io/netty/util/concurrent/GlobalEventExecutor.java | 4 +---
.../io/netty/util/concurrent/SingleThreadEventExecutor.java | 5 ++---
.../test/java/io/netty/util/RecyclerFastThreadLocalTest.java | 2 --
common/src/test/java/io/netty/util/RecyclerTest.java | 4 +---
6 files changed, 5 insertions(+), 16 deletions(-)
diff --git a/common/src/main/java/io/netty/util/Recycler.java b/common/src/main/java/io/netty/util/Recycler.java
index a17a9906c4..41d5f7bc84 100644
--- a/common/src/main/java/io/netty/util/Recycler.java
+++ b/common/src/main/java/io/netty/util/Recycler.java
@@ -24,7 +24,6 @@ import io.netty.util.internal.UnstableApi;
import io.netty.util.internal.logging.InternalLogger;
import io.netty.util.internal.logging.InternalLoggerFactory;
import org.jctools.queues.MessagePassingQueue;
-import org.jetbrains.annotations.VisibleForTesting;
import java.util.ArrayDeque;
import java.util.Queue;
@@ -208,7 +207,6 @@ public abstract class Recycler<T> {
return true;
}
- @VisibleForTesting
final int threadLocalSize() {
LocalPool<T> localPool = threadLocal.getIfExists();
return localPool == null ? 0 : localPool.pooledHandles.size() + localPool.batch.size();
diff --git a/common/src/main/java/io/netty/util/concurrent/AbstractEventExecutor.java b/common/src/main/java/io/netty/util/concurrent/AbstractEventExecutor.java
index 6409578637..e9463935ba 100644
--- a/common/src/main/java/io/netty/util/concurrent/AbstractEventExecutor.java
+++ b/common/src/main/java/io/netty/util/concurrent/AbstractEventExecutor.java
@@ -19,8 +19,6 @@ import io.netty.util.internal.UnstableApi;
import io.netty.util.internal.logging.InternalLogger;
import io.netty.util.internal.logging.InternalLoggerFactory;
-import org.jetbrains.annotations.Async.Execute;
-
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
@@ -169,7 +167,7 @@ public abstract class AbstractEventExecutor extends AbstractExecutorService impl
}
}
- protected static void runTask(@Execute Runnable task) {
+ protected static void runTask(Runnable task) {
task.run();
}
diff --git a/common/src/main/java/io/netty/util/concurrent/GlobalEventExecutor.java b/common/src/main/java/io/netty/util/concurrent/GlobalEventExecutor.java
index 4514c023a3..542eecee3f 100644
--- a/common/src/main/java/io/netty/util/concurrent/GlobalEventExecutor.java
+++ b/common/src/main/java/io/netty/util/concurrent/GlobalEventExecutor.java
@@ -21,8 +21,6 @@ import io.netty.util.internal.ThreadExecutorMap;
import io.netty.util.internal.logging.InternalLogger;
import io.netty.util.internal.logging.InternalLoggerFactory;
-import org.jetbrains.annotations.Async.Schedule;
-
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.Queue;
@@ -221,7 +219,7 @@ public final class GlobalEventExecutor extends AbstractScheduledEventExecutor im
execute0(task);
}
- private void execute0(@Schedule Runnable task) {
+ private void execute0(Runnable task) {
addTask(ObjectUtil.checkNotNull(task, "task"));
if (!inEventLoop()) {
startThread();
diff --git a/common/src/main/java/io/netty/util/concurrent/SingleThreadEventExecutor.java b/common/src/main/java/io/netty/util/concurrent/SingleThreadEventExecutor.java
index 070b2fdfff..d0d9ecd73e 100644
--- a/common/src/main/java/io/netty/util/concurrent/SingleThreadEventExecutor.java
+++ b/common/src/main/java/io/netty/util/concurrent/SingleThreadEventExecutor.java
@@ -22,7 +22,6 @@ import io.netty.util.internal.ThreadExecutorMap;
import io.netty.util.internal.UnstableApi;
import io.netty.util.internal.logging.InternalLogger;
import io.netty.util.internal.logging.InternalLoggerFactory;
-import org.jetbrains.annotations.Async.Schedule;
import java.lang.Thread.State;
import java.util.ArrayList;
@@ -822,12 +821,12 @@ public abstract class SingleThreadEventExecutor extends AbstractScheduledEventEx
lazyExecute0(task);
}
- private void execute0(@Schedule Runnable task) {
+ private void execute0(Runnable task) {
ObjectUtil.checkNotNull(task, "task");
execute(task, wakesUpForTask(task));
}
- private void lazyExecute0(@Schedule Runnable task) {
+ private void lazyExecute0(Runnable task) {
execute(ObjectUtil.checkNotNull(task, "task"), false);
}
diff --git a/common/src/test/java/io/netty/util/RecyclerFastThreadLocalTest.java b/common/src/test/java/io/netty/util/RecyclerFastThreadLocalTest.java
index 7c8d4da113..1dfaffc7da 100644
--- a/common/src/test/java/io/netty/util/RecyclerFastThreadLocalTest.java
+++ b/common/src/test/java/io/netty/util/RecyclerFastThreadLocalTest.java
@@ -16,7 +16,6 @@
package io.netty.util;
import io.netty.util.concurrent.FastThreadLocalThread;
-import org.jetbrains.annotations.NotNull;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import org.junit.jupiter.api.extension.ExtendWith;
@@ -29,7 +28,6 @@ import static org.junit.jupiter.api.Assertions.assertFalse;
@ExtendWith(RunInFastThreadLocalThreadExtension.class)
public class RecyclerFastThreadLocalTest extends RecyclerTest {
- @NotNull
@Override
protected Thread newThread(Runnable runnable) {
return new FastThreadLocalThread(runnable);
diff --git a/common/src/test/java/io/netty/util/RecyclerTest.java b/common/src/test/java/io/netty/util/RecyclerTest.java
index 49359ff962..1ee4c6bd5c 100644
--- a/common/src/test/java/io/netty/util/RecyclerTest.java
+++ b/common/src/test/java/io/netty/util/RecyclerTest.java
@@ -15,7 +15,6 @@
*/
package io.netty.util;
-import org.jetbrains.annotations.NotNull;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import org.junit.jupiter.api.function.Executable;
@@ -55,7 +54,6 @@ public class RecyclerTest {
};
}
- @NotNull
protected Thread newThread(Runnable runnable) {
return new Thread(runnable);
}
@@ -341,7 +339,7 @@ public class RecyclerTest {
ExecutorService single = Executors.newSingleThreadExecutor(new ThreadFactory() {
@Override
- public Thread newThread(@NotNull Runnable r) {
+ public Thread newThread(Runnable r) {
return RecyclerTest.this.newThread(r);
}
});
--
2.44.0

View File

@@ -1,29 +0,0 @@
From 9699a1489cd1a0109354a2ec6251e5834977450d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
Date: Thu, 30 Mar 2023 13:21:56 +0200
Subject: [PATCH 7/7] Do not require the tcnative native library
---
handler/pom.xml | 6 ------
1 file changed, 6 deletions(-)
diff --git a/handler/pom.xml b/handler/pom.xml
index 4a98d473cf..9a44c6b850 100644
--- a/handler/pom.xml
+++ b/handler/pom.xml
@@ -70,12 +70,6 @@
<artifactId>netty-tcnative-classes</artifactId>
<optional>true</optional>
</dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>${tcnative.artifactId}</artifactId>
- <classifier>${tcnative.classifier}</classifier>
- <optional>true</optional>
- </dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
--
2.44.0

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7544dcbe696139c04fe625d85f6b24cdb89b29ede6ec27c81608fbf6c960091c
size 3123221

BIN
netty-4.1.123.Final.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -1,3 +1,347 @@
-------------------------------------------------------------------
Thu Jul 24 18:11:55 UTC 2025 - Fridrich Strba <fstrba@suse.com>
- Upgrade to upsteam version 4.1.123
* Fixes
+ Fix chunk reuse bug in adaptive allocator
+ More accurate adaptive memory usage accounting
+ Introduce size-classes for the adaptive allocator
+ Reduce magazine proliferation eagerness
+ Fix concurrent ByteBuffer access issue in
AdaptiveByteBuf.getBytes
+ Fix possible buffer corruption caused by incorrect
setCharSequence(...) implementation
+ AdaptiveByteBuf: Fix AdaptiveByteBuf.maxFastWritableBytes()
to take writerIndex() into account
+ Optimize capacity bumping for adaptive ByteBufs
+ AbstractDnsRecord: equals() and hashCode() to ignore name
field's case
+ Backport Unsafe guards
+ Guard recomputed offset access with hasUnsafe
+ HTTP2: Always produce a RST frame on stream exception
+ Correct what artifacts included in netty-bom
- Modified patches:
* 0001-Remove-optional-dep-Blockhound.patch
* 0002-Remove-optional-dep-conscrypt.patch
* 0003-Remove-optional-deps-jetty-alpn-and-npn.patch
* 0004-Disable-Brotli-and-ZStd-compression.patch
+ rediff
-------------------------------------------------------------------
Mon Jun 9 10:45:10 UTC 2025 - Fridrich Strba <fstrba@suse.com>
- Upgrade to upstream version 4.1.122
* Fixes of 4.1.122
+ DirContextUtils.addNameServer(...) should just catch Exception
internally
+ Make public API specify explicit maxAllocation to prevent OOM
+ Fix concurrent ByteBuf write access bug in adaptive allocator
+ Fix transport-native-kqueue Bundle-SymbolicNames
+ Fix resolver-dns-native-macos Bundle-SymbolicNames
+ Always correctly calculate the memory address of the ByteBuf
even if sun.misc.Unsafe is not usable
+ Upgrade lz4 dependencies as the old version did not correctly
handle ByteBuffer that have an arrayOffset > 0
+ Optimize ByteBuf.setCharSequence for adaptive allocator
+ Kqueue: Fix registration failure when fd is reused
+ Make JdkZlibEncoder accept Deflater.DEFAULT_COMPRESSION as
level
+ Ensure OpenSsl.availableJavaCipherSuites does not contain null
values
+ Always prefer direct buffers for pooled allocators if not
explicit disabled
+ Update to netty-tcnative 2.0.72.Final
+ Re-enable sun.misc.Unsafe by default on Java 24+
+ Kqueue: Delay removal from registration map to fix noisy
warnings
* Fixes of 4.1.121
+ Epoll.isAvailable() returns false on Ubuntu 20.04/22.04 arch
amd64
+ Fix transport-native-epoll Bundle-SymbolicNames
* Fixes of 4.1.120
+ Fix flawed termination condition check in
HttpPostRequestEncoder#encodeNextChunkUrlEncoded(int) for
current InterfaceHttpData
+ Exposed decoderEnforceMaxConsecutiveEmptyDataFrames and
decoderEnforceMaxRstFramesPerWindow
+ ThreadExecutorMap must restore old EventExecutor
+ Make Recycler virtual thread friendly
+ Disable sun.misc.Unsafe by default on Java 24+
+ Adaptive: Correctly enforce leak detection when using
AdaptiveByteBufAllocator
+ Add suppressed exception to original cause when calling
Future.sync*
+ Add SETTINGS_ENABLE_CONNECT_PROTOCOL to the default HTTP/2
settings
+ Correct computation for suboptimal chunk retirement
probability
+ Fix bug in method
AdaptivePoolingAllocator.allocateWithoutLock(...)
+ Fix a Bytebuf leak in TcpDnsQueryDecoder
+ SSL: Clear native error if named group is not supported
+ WebSocketClientCompressionHandler shouldn't claim window bits
support when jzlib is not available
+ Fix the assignment error of maxQoS parameter in ConnAck
Properties
* Fixes of 4.1.119
+ Replace SSL assertion with explicit record length check
+ Fix NPE when upgrade message fails to aggregate
+ SslHandler: Fix possible NPE when executor is used for
delegating
+ Consistently add channel info in HTTP/2 logs
+ Add QueryStringDecoder option to leave '+' alone
+ Use initialized BouncyCastle providers when available
- Modified patches:
* 0001-Remove-optional-dep-Blockhound.patch
* 0002-Remove-optional-dep-conscrypt.patch
* 0004-Disable-Brotli-and-ZStd-compression.patch
+ rediff
-------------------------------------------------------------------
Thu Mar 27 22:03:11 UTC 2025 - Fridrich Strba <fstrba@suse.com>
- Fix pom.xml errors that will be fatal with Maven 4
-------------------------------------------------------------------
Tue Feb 11 14:38:06 UTC 2025 - Fridrich Strba <fstrba@suse.com>
- Upgrade to upstream version 4.1.118
* Fixes of 4.1.118
+ SslHandler doesn't correctly validate packets which can lead
to native crash when using native SSLEngine (bsc#1237037,
CVE-2025-24970)
+ Denial of Service attack on windows app using Netty, again
(bsc#1237038, CVE-2025-25193)
+ Upgrade netty-tcnative to 2.0.70.Final
+ Fix recycling in CodecOutputList
+ Allocate bytebuf without magazine lock when threads get
collisions
+ Make StreamBufferingEncoder not send header frame with
priority by default
+ Notify event loop termination future of unexpected exceptions
+ KQueueEventLoop leaks memory on shutdown
+ Fix AccessControlException in GlobalEventExecutor
+ Fix possible buffer leak when stream can't be mapped
+ AdaptivePoolingAllocator: Round chunk sizes up to
MIN_CHUNK_SIZE units and reduce chunk release frequency
* Fixes of 4.1.117
+ Fix classloader leaks in GlobalEventExecuto
+ Support BouncyCastle FIPS for reading PEM files
+ Dns: Correctly encode DnsPtrRecord
+ Provides Brotli settings without com.aayushatharva.brotli4j
dependency
+ Make DefaultResourceLeak more resilient against OOM
+ OpenSslSession: Add support to defensively check for peer
certs
+ Reentrant close in EmbeddedChannel
+ SslHandler: Ensure buffers are never leaked when wrap(...)
produce SSLException
+ Adaptive: Only use ThreadLocal if called from
FastThreadLocalThread in case of temporary byte[] allocation
+ Correcly handle comments appended to nameserver declarations
* Fixes of 4.1.116
+ PcapWriteHandler no longer ignores writePcapGlobalHeader
+ Allow PcapWriteHandler to output PCAP files larger than 2GB
+ Fix bugs in BoundedInputStream
+ AdaptiveByteBufAllocator will not use threadlocal magazine if
FastThreadLocalThread.willCleanupFastThreadLocals() returns
false
+ Fix HTTP header validation bug
+ Add range check for
AdaptivePoolingAllocator.CENTRAL_QUEUE_CAPACITY and
MAGAZINE_BUFFER_QUEUE_CAPACITY
+ Fix possible race condition in method
AdaptivePoolingAllocator.offerToQueue(...)
+ Make sure the sentinel Magazine.MAGAZINE_FREED not be replaced
+ Decrease usedMemory of magazine when the chunk get deallocate
+ Only try to use Zstd and Brotli if we can load the native libs
+ AdaptiveByteBufAllocator: Correctly manage used memory
strategy in all cases
+ Bump BlockHound version to 1.0.10.RELEASE
+ Add details to TooLongFrameException message
+ Adapt: Only add Chunk to central Queue if unused
+ Adapt: Don't fail when we run on a host with 1 core
+ Adapt: Ensure Chunks from the central Queue are re-used even
if there are Magazine local cached Chunks
- Modified patches:
* 0001-Remove-optional-dep-Blockhound.patch
* 0002-Remove-optional-dep-conscrypt.patch
* 0004-Disable-Brotli-and-ZStd-compression.patch
+ rediff
-------------------------------------------------------------------
Thu Dec 5 12:48:41 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Upgrade to upstream version 4.1.115
* Fixes:
+ Allow MessageToMessageDecoder to take care of reading more
data when needed
+ Fix SSL session resumption with ClientAuth.OPTIONAL and add
tests with session tickets
+ Fix incorrect cast in NioDomainSocketChannel.parent()
+ Fix bug where SslHandler may stall after TLSv1.3 handshake
with delegate tasks
+ AdaptiveByteBufAllocator: Make pooling of AdaptiveByteBuf
magazine local
+ Specialize Adaptive's allocator Recycler based on magazine's
owner
+ Fix epoll_wait retry loop
+ Log / include the correct error during handshake failure
+ Convey autoAckPing in http2 decoder constructor chain
+ Allow to set used named groups per OpenSslContext
+ Verify default named groups before using them with native SSL
implementation
+ Include details on why it was not possible to configure
accepted issuers in the SSLException
+ Correctly detect if KeyManager is not supported by OpenSSL
version
+ Preserve ordering of default named groups during conversation
+ Denial of Service attack on windows app using netty
(bsc#1233297, CVE-2024-47535)
- Split the netty-poms package in netty-parent and netty-bom
- Modified patch:
* 0001-Remove-optional-dep-Blockhound.patch
+ rediff
-------------------------------------------------------------------
Wed Nov 27 07:45:09 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Clean a bit the spec file and adapt to the recent changes in
netty-tcnative package
- Removed patches:
* 0005-Do-not-use-the-Graal-annotations.patch
* 0006-Do-not-use-the-Jetbrains-annotations.patch
+ remove the annotations with a macro in the jurand tool
* 0007-Do-not-require-the-tcnative-native-library.patch
+ we are building now the artifact, so we can require it
-------------------------------------------------------------------
Wed Oct 30 14:29:44 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Upgrade to upstream version 4.1.114
* Fixes of 4.1.114:
+ Validate HTTP Method
+ Release AdaptiveByteBuf when ownership could not be transfered
+ Make arenas reuse their last chunk more aggressively
+ Only add Magazine to Set if we can ensure its removed again
+ Ensure Chunk will not leak if init of AdaptiveByteBuf fails
for whatever reason
+ Correctly release one-off allocated chunks
+ Ensure pooled memory is released when
AdaptivePoolingAllocator is GC'ed
+ Slices / duplicates of AdaptiveByteBuf must not escape the
rootParent
+ Fix sizeBucket bug in AdaptivePoolingAllocator
+ AdaptiveByteBufAllocator: More strict reference counting for
chunks
+ Ensure we not store the DnsQueryContext for later removal when
we couldnt obtain a query id
+ Reduce memory fragmentation
+ Properly free magazine chunks and avoid orphaned magazines
+ Magazines must be freed under the expand lock
+ Release message before failing promise when multiple requests
are written while upgrade is in progress.
+ Allow to reuse more then one session per host / port mapping
+ Ensure writes will not fail when triggered after receiving
UpgradeEvent.UPGRADE_SUCCESSFUL
+ Refactor DnsNameResolver to be able to use different
strategies when it comes to creating Channels for queries.
+ DnsNameResolver: allow users to skip bind() during bootstrap
+ DnsResolverBuilder methods should make it clear that these are
for DatagramChannel
* Fixes of 4.1.113:
+ feat: Support for IP_BIND_ADDRESS_NO_PORT socket option
+ Ensure AbstractCoalescingBufferQueue does not end up in
inconsistent state on error
+ Add new SslHandler.isEncrypted(...) variant that will not
produce false positives
+ Ensure flushes are not discarded by ChunkedWriteHandler for
passed through messages
+ Remove reference to parent in recycled buffers for leak
detection
+ Upgrade to netty-tcnative 2.0.66.Final
+ Cleanup fields on AdaptiveByteBuf::deallocate
* Fixes of 4.1.112:
+ Avoid unnecessary reflective probes on netty initialization
+ Allow control frames between fragments
+ Only delete the socket file for NioServerDomainSocketChannel
+ Add check for IPv6 brackets when address is unresolved
+ fix ResolvConf initialization with SecurityManager enabled
+ Fix potential DNS cache invalidation in
ResolveWithDotSearchDomain scenario
+ Backport the SslContextBuilder.endpointIdentificationAlgorithm
method
+ Aggressively remove PoolThreadCache references from its
finalizer object
+ Send Http2PriorityFrame through fireUserEventTriggered for
Http2MultiplexHandler
+ Fix potential DNS cache invalidation across different
EventLoops
+ Reject http header values with non SP / HTAB chars
+ Don't strip whitespaces from header names and let the
validator handle it
+ Reject request if NUL is present in the request line
+ Allow HTTP responses without reason-phrase
+ Validate HTTP version while decoding
+ Only include scopeId on link-local addresses when using native
transport
* Fixes of 4.1.111:
+ ReadOnlyByteBufferBuf | ReadOnlyUnsafeDirectByteBuf get, copy,
duplicate, slice methods should be safe to be called from
multiple threads
+ ReadyOnlyBuf must return false for isWritable() when sliced or
duplicated
+ ReadOnlyByteBuf (and sub-classes) does not create derived
buffers that share reference count
+ ByteBuf.asReadOnly().nioBuffer*() need to return read-only
ByteBuffer
+ Remove unwanted mandatory dependency in OSGi
+ HashedWheelTimer.stop() must cancel tasks
+ ZSTD decompression not resilient to compression bombs
+ Duplicate of slice should have the same capacity as the
original slice so that it's not writable
+ Optimize wrap buffer cumulation in SslHandler and don't mutate
input buffers
+ Prepare for unsafe memory access deprecated for removal
+ Fix AdaptiveByteBufAllocator class loading on Java 6/7
+ Add missing NULL checks in native code
* Fixes of 4.1.110:
+ Add unix domain socket transport in netty 4.x via JDK16+
+ Backport #13075: Add the AdaptivePoolingAllocator
+ Add no-value key handling only for form body
+ Add support for specifying SecureRandom in SSLContext
initialization
* Fixes of 4.1.109:
+ Utilize ByteBuf#indexOf
+ Don't send a RST frame when closing the stream in a write
future while processing inbound frames
+ Fix DefaultChannelId#asLongText NPE
+ Fix voidPromise in Http2FrameCodec.writeHeadersFrame
+ Make /etc/resolv.conf reading more robust
+ Fix NioSocketChannel usage in graalvm native-image
+ Improve ByteBufUtil#firstIndexOf
+ Rewrite ZstdDecoder to remove the need of allocate a huge
byte[] internally
+ Always log registered/detected ChannelInitializerExtension(s)
at INFO level
+ Enhance AsciiString#toLowerCase and AsciiString#toUpperCase
+ Add support for zstd http content decompression
+ Save Snappy's encode tmp table allocation
- Regenerated patches:
* 0001-Remove-optional-dep-Blockhound.patch
* 0002-Remove-optional-dep-conscrypt.patch
* 0003-Remove-optional-deps-jetty-alpn-and-npn.patch
* 0004-Disable-Brotli-and-ZStd-compression.patch
* 0005-Do-not-use-the-Graal-annotations.patch
* 0006-Do-not-use-the-Jetbrains-annotations.patch
* 0007-Do-not-require-the-tcnative-native-library.patch
-------------------------------------------------------------------
Tue Sep 24 22:27:37 UTC 2024 - Bernhard Wiedemann <bwiedemann@suse.com>
- Add reproducible.patch to omit the mtime from libnetty-unix-common.a
for reproducible builds (boo#1047218)
-------------------------------------------------------------------
Wed Mar 27 13:17:21 UTC 2024 - Fridrich Strba <fstrba@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package netty
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
%global namedreltag .Final
%global namedversion %{version}%{?namedreltag}
Name: netty
Version: 4.1.108
Version: 4.1.123
Release: 0
Summary: An asynchronous event-driven network application framework and tools for Java
License: Apache-2.0
@@ -34,29 +34,36 @@ Patch0: 0001-Remove-optional-dep-Blockhound.patch
Patch1: 0002-Remove-optional-dep-conscrypt.patch
Patch2: 0003-Remove-optional-deps-jetty-alpn-and-npn.patch
Patch3: 0004-Disable-Brotli-and-ZStd-compression.patch
Patch4: 0005-Do-not-use-the-Graal-annotations.patch
Patch5: 0006-Do-not-use-the-Jetbrains-annotations.patch
Patch6: 0007-Do-not-require-the-tcnative-native-library.patch
Patch7: no-werror.patch
Patch4: no-werror.patch
Patch5: reproducible.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: fdupes
BuildRequires: gcc
BuildRequires: jurand
BuildRequires: libtool
BuildRequires: make
BuildRequires: maven-local
BuildRequires: unzip
BuildRequires: mvn(com.fasterxml:aalto-xml)
BuildRequires: mvn(com.jcraft:jzlib)
BuildRequires: mvn(commons-logging:commons-logging)
BuildRequires: mvn(io.netty:netty-tcnative) >= 2.0.60
BuildRequires: mvn(io.netty:netty-tcnative-classes) >= 2.0.60
BuildRequires: mvn(kr.motd.maven:os-maven-plugin)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.apache.logging.log4j:log4j-1.2-api)
BuildRequires: mvn(org.apache.logging.log4j:log4j-api)
BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-dependency-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-remote-resources-plugin)
BuildRequires: mvn(org.bouncycastle:bcpkix-jdk15on)
BuildRequires: mvn(org.bouncycastle:bctls-jdk15on)
BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin)
BuildRequires: mvn(org.codehaus.mojo:exec-maven-plugin)
BuildRequires: mvn(org.jctools:jctools-core)
BuildRequires: mvn(org.codehaus.mojo:flatten-maven-plugin)
BuildRequires: mvn(org.fusesource.hawtjni:hawtjni-maven-plugin)
BuildRequires: mvn(org.jctools:jctools-core) >= 4
BuildRequires: mvn(org.slf4j:slf4j-api)
%description
@@ -73,11 +80,20 @@ 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 poms
%package bom
Summary: POM-only artifacts for %{name}
Obsoletes: %{name}-poms
BuildArch: noarch
%description poms
%description bom
%{summary}.
%package parent
Summary: POM-only artifacts for %{name}
Obsoletes: %{name}-poms
BuildArch: noarch
%description parent
%{summary}.
%package javadoc
@@ -96,28 +112,20 @@ BuildArch: noarch
%patch -P 3 -p1
%patch -P 4 -p1
%patch -P 5 -p1
%patch -P 6 -p1
%patch -P 7 -p1
# remove annotations for which we have no dependencies
# Graal annotations
%{java_remove_annotations} common -p "com.oracle.svm.core.annotate"
# Jetbrains annotation
%{java_remove_annotations} common -p "org.jetbrains.annotations"
# remove unnecessary dependency on parent POM
%pom_remove_parent . bom dev-tools
# Disable all in one jar
%pom_disable_module all
%pom_remove_parent . bom
# Not needed for RPM builds
%pom_disable_module "example"
%pom_disable_module "microbench"
%pom_xpath_inject 'pom:plugin[pom:artifactId="maven-remote-resources-plugin"]' '
<dependencies>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-dev-tools</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>'
%pom_remove_plugin :maven-antrun-plugin
%pom_remove_plugin :maven-dependency-plugin
%pom_remove_plugin :xml-maven-plugin
@@ -135,6 +143,9 @@ BuildArch: noarch
%pom_remove_plugin -r :forbiddenapis
%pom_remove_plugin -r :revapi-maven-plugin
%pom_remove_plugin -r :bom-helper-maven-plugin
%pom_remove_plugin -r :central-publishing-maven-plugin
%pom_remove_plugin -r :nexus-staging-maven-plugin
%pom_remove_plugin :duplicate-finder-maven-plugin all
cp %{SOURCE1} common/codegen.bash
chmod +x common/codegen.bash
@@ -173,26 +184,25 @@ rm codec/src/main/java/io/netty/handler/codec/marshalling/*
rm codec/src/*/java/io/netty/handler/codec/compression/Lzma*.java
%pom_remove_dep -r com.ning:compress-lzf
rm codec/src/*/java/io/netty/handler/codec/compression/Lzf*.java
%pom_remove_dep -r net.jpountz.lz4:lz4
%pom_remove_dep -r org.lz4:lz4-java
rm codec/src/*/java/io/netty/handler/codec/compression/Lz4*.java
%pom_remove_dep -r com.aayushatharva.brotli4j:
rm codec/src/*/java/io/netty/handler/codec/compression/Brotli*.java
%pom_remove_dep -r com.github.luben:zstd-jni
rm codec/src/*/java/io/netty/handler/codec/compression/Zstd*.java
# Disable other codecs with extra dependencies
%pom_remove_dep -r com.fasterxml:aalto-xml
%pom_disable_module codec-xml
# Disable unneeded transport artifacts
%pom_disable_module transport-native-epoll
%pom_disable_module transport-native-kqueue
%pom_disable_module transport-rxtx
%pom_disable_module transport-sctp
%pom_remove_dep -r :netty-transport-rxtx
%pom_disable_module transport-udt
%pom_remove_dep -r :netty-transport-udt
%pom_remove_dep -r :netty-build-common
%pom_remove_dep :netty-dev-tools
# Disable macos native bit
%pom_disable_module resolver-dns-native-macos
%pom_remove_dep -r :netty-resolver-dns-native-macos
# Disable test suites
%pom_disable_module testsuite
@@ -214,22 +224,29 @@ unzip %{SOURCE2} -d transport-native-unix-common/target/netty-jni-util
# Upstream has jctools bundled.
%pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId = 'maven-bundle-plugin']/pom:executions/pom:execution[pom:id = 'generate-manifest']/pom:configuration/pom:instructions/pom:Import-Package" common/pom.xml
%pom_xpath_inject "pom:project" '
<properties><javaModuleName>io.netty.dev.tools</javaModuleName></properties>
' dev-tools
%pom_remove_dep -r :annotations-java5
%pom_xpath_remove "pom:profiles/pom:profile[pom:id = 'staging']" all
%pom_xpath_remove "pom:plugins/pom:plugin/pom:configuration/pom:flattenDependencyMode" all
# Tell xmvn to install attached artifact, which it does not
# do by default. In this case install all attached artifacts with
# the linux classifier.
%{mvn_package} ":::linux*:"
%{mvn_package} ":netty-parent" poms
%{mvn_package} ":netty-bom" poms
%{mvn_package} ":netty-parent" parent
%{mvn_package} ":netty-bom" bom
%{mvn_package} ':*-tests' __noinstall
%build
%{mvn_build} -f -- \
-Dproject.build.outputTimestamp=$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ) \
-Dsource=8
%install
@@ -239,9 +256,11 @@ unzip %{SOURCE2} -d transport-native-unix-common/target/netty-jni-util
%files -f .mfiles
%license LICENSE.txt NOTICE.txt
%files poms -f .mfiles-poms
%files parent -f .mfiles-parent
%license LICENSE.txt NOTICE.txt
%files bom -f .mfiles-bom
%files javadoc -f .mfiles-javadoc
%license LICENSE.txt NOTICE.txt

13
reproducible.patch Normal file
View File

@@ -0,0 +1,13 @@
Index: netty-netty-4.1.108.Final/transport-native-unix-common/Makefile
===================================================================
--- netty-netty-4.1.108.Final.orig/transport-native-unix-common/Makefile
+++ netty-netty-4.1.108.Final/transport-native-unix-common/Makefile
@@ -39,7 +39,7 @@ all: $(LIB)
$(LIB): $(OBJS)
mkdir -p $(LIB_DIR)
- $(AR) rcs $(LIB) $^
+ $(AR) -D rcs $(LIB) $^
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c
mkdir -p $(OBJ_DIR)