Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package netty for openSUSE:Factory checked in at 2022-01-13 23:21:42 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/netty (Old) and /work/SRC/openSUSE:Factory/.netty.new.1892 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "netty" Thu Jan 13 23:21:42 2022 rev:6 rq:946202 version:4.1.72 Changes: -------- --- /work/SRC/openSUSE:Factory/netty/netty.changes 2021-03-15 10:54:29.969180848 +0100 +++ /work/SRC/openSUSE:Factory/.netty.new.1892/netty.changes 2022-01-13 23:22:19.980082481 +0100 @@ -1,0 +2,22 @@ +Tue Dec 14 06:31:10 UTC 2021 - Fridrich Strba <fst...@suse.com> + +- Upgrade to latest upstream version 4.1.72 + * fixes: bsc#1193672, CVE-2021-43797: possible HTTP request + smuggling due to insufficient validation against control + characters +- Modified patches: + * 0001-Remove-optional-dep-Blockhound.patch + * 0002-Remove-optional-dep-conscrypt.patch + * 0003-Remove-optional-deps-jetty-alpn-and-npn.patch + * 0004-Remove-optional-dep-tcnative.patch + * 0005-Remove-optional-dep-log4j.patch + * 0006-revert-Fix-native-image-build.patch + * 0007-Revert-Support-session-cache-for-client-and-server-w.patch + * no-werror.patch + + rediff to changed context +- Added patch: + * no-brotli-zstd.patch + + disable Brotli and Zstd compression, since we lack + the dependencies needed to build them + +------------------------------------------------------------------- Old: ---- netty-4.1.60.Final.tar.gz New: ---- netty-4.1.72.Final.tar.gz no-brotli-zstd.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ netty.spec ++++++ --- /var/tmp/diff_new_pack.1lnoUH/_old 2022-01-13 23:22:20.536082845 +0100 +++ /var/tmp/diff_new_pack.1lnoUH/_new 2022-01-13 23:22:20.544082850 +0100 @@ -19,7 +19,7 @@ %global namedreltag .Final %global namedversion %{version}%{?namedreltag} Name: netty -Version: 4.1.60 +Version: 4.1.72 Release: 0 Summary: An asynchronous event-driven network application framework and tools for Java License: Apache-2.0 @@ -37,6 +37,7 @@ Patch5: 0006-revert-Fix-native-image-build.patch Patch6: 0007-Revert-Support-session-cache-for-client-and-server-w.patch Patch7: no-werror.patch +Patch8: no-brotli-zstd.patch BuildRequires: fdupes BuildRequires: gcc BuildRequires: make @@ -98,6 +99,7 @@ %patch5 -p1 %patch6 -p1 %patch7 -p1 +%patch8 -p1 # remove unnecessary dependency on parent POM %pom_remove_parent . bom dev-tools @@ -107,7 +109,6 @@ # Not needed for RPM builds %pom_disable_module "example" -%pom_disable_module "tarball" %pom_disable_module "microbench" %pom_xpath_inject 'pom:plugin[pom:artifactId="maven-remote-resources-plugin"]' ' @@ -134,6 +135,8 @@ %pom_remove_plugin -r :maven-jxr-plugin %pom_remove_plugin -r :maven-javadoc-plugin %pom_remove_plugin -r :forbiddenapis +%pom_remove_plugin -r :revapi-maven-plugin +%pom_remove_plugin -r :bom-helper-maven-plugin cp %{SOURCE1} common/codegen.bash chmod +x common/codegen.bash @@ -154,7 +157,7 @@ %pom_remove_plugin :groovy-maven-plugin common # We don't have com.oracle.substratevm -%pom_remove_dep "com.oracle.substratevm:" common +%pom_remove_dep "org.graalvm.nativeimage:" common rm common/src/main/java/io/netty/util/internal/svm/* # The protobuf-javanano API was discontinued upstream @@ -174,6 +177,10 @@ rm codec/src/*/java/io/netty/handler/codec/compression/Lzf*.java %pom_remove_dep -r net.jpountz.lz4:lz4 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 ++++++ 0001-Remove-optional-dep-Blockhound.patch ++++++ --- /var/tmp/diff_new_pack.1lnoUH/_old 2022-01-13 23:22:20.568082866 +0100 +++ /var/tmp/diff_new_pack.1lnoUH/_new 2022-01-13 23:22:20.572082869 +0100 @@ -1,19 +1,19 @@ -From e57c188a3eea004768c8d8a00738ed55fc79e05d Mon Sep 17 00:00:00 2001 +From 2fc86d590dc9d1ebe4adf2422b4eaef196b831b5 Mon Sep 17 00:00:00 2001 From: Mat Booth <mat.bo...@redhat.com> Date: Mon, 7 Sep 2020 12:17:31 +0100 Subject: [PATCH 1/7] Remove optional dep Blockhound --- common/pom.xml | 5 - - .../java/io/netty/util/internal/Hidden.java | 153 ------ + .../java/io/netty/util/internal/Hidden.java | 156 ------ ...ockhound.integration.BlockHoundIntegration | 14 - pom.xml | 7 - - transport-blockhound-tests/pom.xml | 115 ---- - .../NettyBlockHoundIntegrationTest.java | 497 ------------------ + transport-blockhound-tests/pom.xml | 126 ----- + .../NettyBlockHoundIntegrationTest.java | 518 ------------------ .../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, 855 deletions(-) + 9 files changed, 890 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 @@ 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 366fea28c7..938ea25c3e 100644 +index 9dfba34083..472429c00b 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -78,11 +78,6 @@ @@ -40,10 +40,10 @@ <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 fab714d8ad..0000000000 +index 0d96f054b3..0000000000 --- a/common/src/main/java/io/netty/util/internal/Hidden.java +++ /dev/null -@@ -1,153 +0,0 @@ +@@ -1,156 +0,0 @@ -/* - * Copyright 2019 The Netty Project - * @@ -70,7 +70,7 @@ -import java.util.function.Predicate; - -/** -- * Contains classes that must be have public visibility but are not public API. +- * Contains classes that must have public visibility but are not public API. - */ -class Hidden { - @@ -130,7 +130,10 @@ - "io.netty.handler.ssl.SslHandler", - "runAllDelegatedTasks" - ); -- +- builder.allowBlockingCallsInside( +- "io.netty.handler.ssl.SslHandler", +- "runDelegatedTasks" +- ); - builder.allowBlockingCallsInside( - "io.netty.util.concurrent.GlobalEventExecutor", - "takeTask"); @@ -174,7 +177,7 @@ - "parseEtcResolverOptions"); - - builder.allowBlockingCallsInside( -- "io.netty.resolver.HostsFileParser", +- "io.netty.resolver.HostsFileEntriesProvider$ParserImpl", - "parse"); - - builder.nonBlockingThreadPredicate(new Function<Predicate<Thread>, Predicate<Thread>>() { @@ -219,10 +222,10 @@ -io.netty.util.internal.Hidden$NettyBlockHoundIntegration \ No newline at end of file diff --git a/pom.xml b/pom.xml -index 573d1bf74f..a1cfd1b2fe 100644 +index d0691b828e..6da932c89e 100644 --- a/pom.xml +++ b/pom.xml -@@ -446,7 +446,6 @@ +@@ -576,7 +576,6 @@ <module>testsuite-native-image</module> <module>testsuite-native-image-client</module> <module>testsuite-native-image-client-runtime-init</module> @@ -230,7 +233,7 @@ <module>microbench</module> <module>bom</module> </modules> -@@ -770,12 +769,6 @@ +@@ -952,12 +951,6 @@ <scope>test</scope> </dependency> @@ -238,17 +241,17 @@ - <dependency> - <groupId>io.projectreactor.tools</groupId> - <artifactId>blockhound</artifactId> -- <version>1.0.3.RELEASE</version> +- <version>1.0.6.RELEASE</version> - </dependency> </dependencies> </dependencyManagement> diff --git a/transport-blockhound-tests/pom.xml b/transport-blockhound-tests/pom.xml deleted file mode 100644 -index 693ba89278..0000000000 +index 084776a7f5..0000000000 --- a/transport-blockhound-tests/pom.xml +++ /dev/null -@@ -1,115 +0,0 @@ +@@ -1,126 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ Copyright 2019 The Netty Project @@ -271,7 +274,7 @@ - <parent> - <groupId>io.netty</groupId> - <artifactId>netty-parent</artifactId> -- <version>4.1.60.Final</version> +- <version>4.1.72.Final</version> - </parent> - - <artifactId>netty-transport-blockhound-tests</artifactId> @@ -319,6 +322,15 @@ - <argLine.common>-XX:+AllowRedefinitionToAddDeleteMethods</argLine.common> - </properties> - </profile> +- <profile> +- <id>java17</id> +- <activation> +- <jdk>17</jdk> +- </activation> +- <properties> +- <argLine.common>-XX:+AllowRedefinitionToAddDeleteMethods</argLine.common> +- </properties> +- </profile> - </profiles> - - <properties> @@ -326,7 +338,9 @@ - <maven.compiler.target>1.8</maven.compiler.target> - <!-- Needed for SelfSignedCertificate --> - <argLine.java9.extras>--add-exports java.base/sun.security.x509=ALL-UNNAMED</argLine.java9.extras> -- <skipJapicmp>true</skipJapicmp> +- <japicmp.skip>true</japicmp.skip> +- <!-- Do not deploy this module --> +- <skipDeploy>true</skipDeploy> - </properties> - - <dependencies> @@ -366,10 +380,10 @@ -</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 1b454a1802..0000000000 +index e470366ee9..0000000000 --- a/transport-blockhound-tests/src/test/java/io/netty/util/internal/NettyBlockHoundIntegrationTest.java +++ /dev/null -@@ -1,497 +0,0 @@ +@@ -1,518 +0,0 @@ -/* - * Copyright 2019 The Netty Project - @@ -421,8 +435,9 @@ -import io.netty.util.concurrent.SingleThreadEventExecutor; -import io.netty.util.internal.Hidden.NettyBlockHoundIntegration; -import org.hamcrest.Matchers; --import org.junit.BeforeClass; --import org.junit.Test; +-import org.junit.jupiter.api.BeforeAll; +-import org.junit.jupiter.api.Test; +-import org.junit.jupiter.api.Timeout; -import reactor.blockhound.BlockHound; -import reactor.blockhound.BlockingOperationError; -import reactor.blockhound.integration.BlockHoundIntegration; @@ -447,15 +462,15 @@ - -import static io.netty.buffer.Unpooled.wrappedBuffer; -import static org.hamcrest.MatcherAssert.assertThat; --import static org.junit.Assert.assertEquals; --import static org.junit.Assert.assertNull; --import static org.junit.Assert.assertTrue; --import static org.junit.Assert.fail; --import static org.junit.Assume.assumeTrue; +-import static org.junit.jupiter.api.Assertions.assertEquals; +-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; - -public class NettyBlockHoundIntegrationTest { - -- @BeforeClass +- @BeforeAll - public static void setUpClass() { - BlockHound.install(); - } @@ -487,12 +502,14 @@ - } - } - -- @Test(timeout = 5000L) +- @Test +- @Timeout(value = 5000, unit = TimeUnit.MILLISECONDS) - public void testGlobalEventExecutorTakeTask() throws InterruptedException { - testEventExecutorTakeTask(GlobalEventExecutor.INSTANCE); - } - -- @Test(timeout = 5000L) +- @Test +- @Timeout(value = 5000, unit = TimeUnit.MILLISECONDS) - public void testSingleThreadEventExecutorTakeTask() throws InterruptedException { - SingleThreadEventExecutor executor = - new SingleThreadEventExecutor(null, new DefaultThreadFactory("test"), true) { @@ -516,7 +533,8 @@ - latch.await(); - } - -- @Test(timeout = 5000L) +- @Test +- @Timeout(value = 5000, unit = TimeUnit.MILLISECONDS) - public void testSingleThreadEventExecutorAddTask() throws Exception { - TestLinkedBlockingQueue<Runnable> taskQueue = new TestLinkedBlockingQueue<>(); - SingleThreadEventExecutor executor = @@ -547,7 +565,8 @@ - latch.await(); - } - -- @Test(timeout = 5000L) +- @Test +- @Timeout(value = 5000, unit = TimeUnit.MILLISECONDS) - public void testHashedWheelTimerStartStop() throws Exception { - HashedWheelTimer timer = new HashedWheelTimer(); - Future<?> futureStart = GlobalEventExecutor.INSTANCE.submit(timer::start); @@ -612,14 +631,25 @@ - } - - @Test -- public void testTrustManagerVerify() throws Exception { -- testTrustManagerVerify("TLSv1.2"); +- public void testTrustManagerVerifyJDK() throws Exception { +- testTrustManagerVerify(SslProvider.JDK, "TLSv1.2"); - } - - @Test -- public void testTrustManagerVerifyTLSv13() throws Exception { +- public void testTrustManagerVerifyTLSv13JDK() throws Exception { - assumeTrue(SslProvider.isTlsv13Supported(SslProvider.JDK)); -- testTrustManagerVerify("TLSv1.3"); +- testTrustManagerVerify(SslProvider.JDK, "TLSv1.3"); +- } +- +- @Test +- public void testTrustManagerVerifyOpenSSL() throws Exception { +- testTrustManagerVerify(SslProvider.OPENSSL, "TLSv1.2"); +- } +- +- @Test +- public void testTrustManagerVerifyTLSv13OpenSSL() throws Exception { +- assumeTrue(SslProvider.isTlsv13Supported(SslProvider.OPENSSL)); +- testTrustManagerVerify(SslProvider.OPENSSL, "TLSv1.3"); - } - - @Test @@ -693,17 +723,20 @@ - } - } - -- @Test(timeout = 5000L) +- @Test +- @Timeout(value = 5000, unit = TimeUnit.MILLISECONDS) - public void testUnixResolverDnsServerAddressStreamProvider_Parse() throws InterruptedException { - doTestParseResolverFilesAllowsBlockingCalls(DnsServerAddressStreamProviders::unixDefault); - } - -- @Test(timeout = 5000L) +- @Test +- @Timeout(value = 5000, unit = TimeUnit.MILLISECONDS) - public void testHostsFileParser_Parse() throws InterruptedException { - doTestParseResolverFilesAllowsBlockingCalls(DnsNameResolverBuilder::new); - } - -- @Test(timeout = 5000L) +- @Test +- @Timeout(value = 5000, unit = TimeUnit.MILLISECONDS) - public void testUnixResolverDnsServerAddressStreamProvider_ParseEtcResolverSearchDomainsAndOptions() - throws InterruptedException { - NioEventLoopGroup group = new NioEventLoopGroup(); @@ -750,9 +783,10 @@ - } - } - -- private static void testTrustManagerVerify(String tlsVersion) throws Exception { +- private static void testTrustManagerVerify(SslProvider provider, String tlsVersion) throws Exception { - final SslContext sslClientCtx = - SslContextBuilder.forClient() +- .sslProvider(provider) - .protocols(tlsVersion) - .trustManager(ResourcesUtil.getFile( - NettyBlockHoundIntegrationTest.class, "mutual_auth_ca.pem")) @@ -764,6 +798,7 @@ - ResourcesUtil.getFile( - NettyBlockHoundIntegrationTest.class, "localhost_server.key"), - null) +- .sslProvider(provider) - .protocols(tlsVersion) - .build(); - @@ -950,6 +985,6 @@ -hH82y9bBeflqroOeztqMpONpWoZjlz0sWbJNvXztXINL7LaNmVYOcoUrCcxPS54T ------END CERTIFICATE----- -- -2.30.1 +2.34.1 ++++++ 0002-Remove-optional-dep-conscrypt.patch ++++++ --- /var/tmp/diff_new_pack.1lnoUH/_old 2022-01-13 23:22:20.584082876 +0100 +++ /var/tmp/diff_new_pack.1lnoUH/_new 2022-01-13 23:22:20.584082876 +0100 @@ -1,4 +1,4 @@ -From 6cff9f609fec2864e5f17aedb8c4b7110b5b66bb Mon Sep 17 00:00:00 2001 +From 3485dc2d8187354247e014904462b97e6be62f1b Mon Sep 17 00:00:00 2001 From: Mat Booth <mat.bo...@redhat.com> Date: Mon, 7 Sep 2020 13:24:30 +0100 Subject: [PATCH 2/7] Remove optional dep conscrypt @@ -7,18 +7,18 @@ handler/pom.xml | 6 - .../java/io/netty/handler/ssl/Conscrypt.java | 75 ------- .../handler/ssl/ConscryptAlpnSslEngine.java | 196 ------------------ - .../JdkAlpnApplicationProtocolNegotiator.java | 8 +- - .../java/io/netty/handler/ssl/SslHandler.java | 47 +---- + .../JdkAlpnApplicationProtocolNegotiator.java | 11 +- + .../java/io/netty/handler/ssl/SslHandler.java | 46 +--- pom.xml | 10 - - 6 files changed, 2 insertions(+), 340 deletions(-) + 6 files changed, 2 insertions(+), 342 deletions(-) delete mode 100644 handler/src/main/java/io/netty/handler/ssl/Conscrypt.java delete mode 100644 handler/src/main/java/io/netty/handler/ssl/ConscryptAlpnSslEngine.java diff --git a/handler/pom.xml b/handler/pom.xml -index bb93416837..8bd2ba0774 100644 +index ceea6e1e8e..5c3ebbbfab 100644 --- a/handler/pom.xml +++ b/handler/pom.xml -@@ -81,12 +81,6 @@ +@@ -85,12 +85,6 @@ <artifactId>alpn-api</artifactId> <optional>true</optional> </dependency> @@ -315,7 +315,7 @@ - } -} diff --git a/handler/src/main/java/io/netty/handler/ssl/JdkAlpnApplicationProtocolNegotiator.java b/handler/src/main/java/io/netty/handler/ssl/JdkAlpnApplicationProtocolNegotiator.java -index 8c40d8dc91..8d7a854d62 100644 +index 9eb8f15d14..b5715e87ff 100644 --- a/handler/src/main/java/io/netty/handler/ssl/JdkAlpnApplicationProtocolNegotiator.java +++ b/handler/src/main/java/io/netty/handler/ssl/JdkAlpnApplicationProtocolNegotiator.java @@ -26,8 +26,7 @@ import javax.net.ssl.SSLEngine; @@ -325,10 +325,10 @@ - private static final boolean AVAILABLE = Conscrypt.isAvailable() || - JdkAlpnSslUtils.supportsAlpn() || + private static final boolean AVAILABLE = JdkAlpnSslUtils.supportsAlpn() || - JettyAlpnSslEngine.isAvailable(); + JettyAlpnSslEngine.isAvailable() || + BouncyCastle.isAvailable(); - private static final SslEngineWrapperFactory ALPN_WRAPPER = AVAILABLE ? new AlpnWrapper() : new FailureWrapper(); -@@ -119,7 +118,6 @@ public final class JdkAlpnApplicationProtocolNegotiator extends JdkBaseApplicati +@@ -120,7 +119,6 @@ public final class JdkAlpnApplicationProtocolNegotiator extends JdkBaseApplicati public SSLEngine wrapSslEngine(SSLEngine engine, ByteBufAllocator alloc, JdkApplicationProtocolNegotiator applicationNegotiator, boolean isServer) { throw new RuntimeException("ALPN unsupported. Is your classpath configured correctly?" @@ -336,7 +336,7 @@ + " For Jetty-ALPN, see " + "https://www.eclipse.org/jetty/documentation/current/alpn-chapter.html#alpn-starting"); } -@@ -129,10 +127,6 @@ public final class JdkAlpnApplicationProtocolNegotiator extends JdkBaseApplicati +@@ -130,13 +128,6 @@ public final class JdkAlpnApplicationProtocolNegotiator extends JdkBaseApplicati @Override public SSLEngine wrapSslEngine(SSLEngine engine, ByteBufAllocator alloc, JdkApplicationProtocolNegotiator applicationNegotiator, boolean isServer) { @@ -344,21 +344,23 @@ - return isServer ? ConscryptAlpnSslEngine.newServerEngine(engine, alloc, applicationNegotiator) - : ConscryptAlpnSslEngine.newClientEngine(engine, alloc, applicationNegotiator); - } +- if (BouncyCastle.isInUse(engine)) { +- return new BouncyCastleAlpnSslEngine(engine, applicationNegotiator, isServer); +- } // ALPN support was recently backported to Java8 as // 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 fbb102d884..38d411eccd 100644 +index 65ab9f8c3c..6b198f350f 100644 --- a/handler/src/main/java/io/netty/handler/ssl/SslHandler.java +++ b/handler/src/main/java/io/netty/handler/ssl/SslHandler.java -@@ -229,50 +229,6 @@ public class SslHandler extends ByteToMessageDecoder implements ChannelOutboundH +@@ -243,49 +243,6 @@ public class SslHandler extends ByteToMessageDecoder implements ChannelOutboundH return ((ReferenceCountedOpenSslEngine) engine).jdkCompatibilityMode; } }, - CONSCRYPT(true, COMPOSITE_CUMULATOR) { - @Override -- SSLEngineResult unwrap(SslHandler handler, ByteBuf in, int readerIndex, int len, ByteBuf out) -- throws SSLException { +- SSLEngineResult unwrap(SslHandler handler, ByteBuf in, int len, ByteBuf out) throws SSLException { - int nioBufferCount = in.nioBufferCount(); - int writerIndex = out.writerIndex(); - final SSLEngineResult result; @@ -369,13 +371,13 @@ - try { - handler.singleBuffer[0] = toByteBuffer(out, writerIndex, out.writableBytes()); - result = ((ConscryptAlpnSslEngine) handler.engine).unwrap( -- in.nioBuffers(readerIndex, len), +- in.nioBuffers(in.readerIndex(), len), - handler.singleBuffer); - } finally { - handler.singleBuffer[0] = null; - } - } else { -- result = handler.engine.unwrap(toByteBuffer(in, readerIndex, len), +- result = handler.engine.unwrap(toByteBuffer(in, in.readerIndex(), len), - toByteBuffer(out, writerIndex, out.writableBytes())); - } - out.writerIndex(writerIndex + result.bytesProduced()); @@ -401,8 +403,8 @@ - }, JDK(false, MERGE_CUMULATOR) { @Override - SSLEngineResult unwrap(SslHandler handler, ByteBuf in, int readerIndex, int len, ByteBuf out) -@@ -325,8 +281,7 @@ public class SslHandler extends ByteToMessageDecoder implements ChannelOutboundH + SSLEngineResult unwrap(SslHandler handler, ByteBuf in, int len, ByteBuf out) throws SSLException { +@@ -337,8 +294,7 @@ public class SslHandler extends ByteToMessageDecoder implements ChannelOutboundH }; static SslEngineType forEngine(SSLEngine engine) { @@ -413,14 +415,14 @@ SslEngineType(boolean wantsDirectBuffer, Cumulator cumulator) { diff --git a/pom.xml b/pom.xml -index a1cfd1b2fe..4fff3dc4e3 100644 +index 6da932c89e..a693bba2bf 100644 --- a/pom.xml +++ b/pom.xml -@@ -518,16 +518,6 @@ +@@ -654,16 +654,6 @@ <optional>true</optional> </dependency> -- <!-- Conscrypt - needed for running tests, used for acclerating SSL with OpenSSL. --> +- <!-- Conscrypt - needed for running tests, used for accelerating SSL with OpenSSL. --> - <dependency> - <groupId>${conscrypt.groupId}</groupId> - <artifactId>${conscrypt.artifactId}</artifactId> @@ -434,6 +436,6 @@ Bouncy Castle - completely optional, only needed when: - you generate a temporary self-signed certificate using SelfSignedCertificate, and -- -2.30.1 +2.34.1 ++++++ 0003-Remove-optional-deps-jetty-alpn-and-npn.patch ++++++ --- /var/tmp/diff_new_pack.1lnoUH/_old 2022-01-13 23:22:20.596082885 +0100 +++ /var/tmp/diff_new_pack.1lnoUH/_new 2022-01-13 23:22:20.600082887 +0100 @@ -1,24 +1,24 @@ -From b550be926f2ef3d0d01b3098b7b0d86285266032 Mon Sep 17 00:00:00 2001 +From 0ec3bb49133c023ffb6bf1e51b45cf8407318a6c Mon Sep 17 00:00:00 2001 From: Mat Booth <mat.bo...@redhat.com> Date: Mon, 7 Sep 2020 13:26:20 +0100 Subject: [PATCH 3/7] Remove optional deps jetty alpn and npn --- handler/pom.xml | 10 -- - .../JdkAlpnApplicationProtocolNegotiator.java | 7 +- + .../JdkAlpnApplicationProtocolNegotiator.java | 5 - .../JdkNpnApplicationProtocolNegotiator.java | 10 +- .../netty/handler/ssl/JettyAlpnSslEngine.java | 157 ------------------ .../netty/handler/ssl/JettyNpnSslEngine.java | 122 -------------- pom.xml | 14 -- - 6 files changed, 3 insertions(+), 317 deletions(-) + 6 files changed, 2 insertions(+), 316 deletions(-) delete mode 100644 handler/src/main/java/io/netty/handler/ssl/JettyAlpnSslEngine.java delete mode 100644 handler/src/main/java/io/netty/handler/ssl/JettyNpnSslEngine.java diff --git a/handler/pom.xml b/handler/pom.xml -index 8bd2ba0774..7bea1cd0b9 100644 +index 5c3ebbbfab..ca72ebddc0 100644 --- a/handler/pom.xml +++ b/handler/pom.xml -@@ -71,16 +71,6 @@ +@@ -75,16 +75,6 @@ <artifactId>bcpkix-jdk15on</artifactId> <optional>true</optional> </dependency> @@ -36,20 +36,18 @@ <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> diff --git a/handler/src/main/java/io/netty/handler/ssl/JdkAlpnApplicationProtocolNegotiator.java b/handler/src/main/java/io/netty/handler/ssl/JdkAlpnApplicationProtocolNegotiator.java -index 8d7a854d62..ddcb78e2ca 100644 +index b5715e87ff..df87f0f43a 100644 --- a/handler/src/main/java/io/netty/handler/ssl/JdkAlpnApplicationProtocolNegotiator.java +++ b/handler/src/main/java/io/netty/handler/ssl/JdkAlpnApplicationProtocolNegotiator.java -@@ -26,8 +26,7 @@ import javax.net.ssl.SSLEngine; - */ +@@ -27,7 +27,6 @@ import javax.net.ssl.SSLEngine; @Deprecated public final class JdkAlpnApplicationProtocolNegotiator extends JdkBaseApplicationProtocolNegotiator { -- private static final boolean AVAILABLE = JdkAlpnSslUtils.supportsAlpn() || -- JettyAlpnSslEngine.isAvailable(); -+ private static final boolean AVAILABLE = JdkAlpnSslUtils.supportsAlpn(); + private static final boolean AVAILABLE = JdkAlpnSslUtils.supportsAlpn() || +- JettyAlpnSslEngine.isAvailable() || + BouncyCastle.isAvailable(); private static final SslEngineWrapperFactory ALPN_WRAPPER = AVAILABLE ? new AlpnWrapper() : new FailureWrapper(); - -@@ -134,10 +133,6 @@ public final class JdkAlpnApplicationProtocolNegotiator extends JdkBaseApplicati +@@ -135,10 +134,6 @@ public final class JdkAlpnApplicationProtocolNegotiator extends JdkBaseApplicati if (JdkAlpnSslUtils.supportsAlpn()) { return new JdkAlpnSslEngine(engine, applicationNegotiator, isServer); } @@ -376,10 +374,10 @@ - } -} diff --git a/pom.xml b/pom.xml -index 4fff3dc4e3..e50e4e04ac 100644 +index a693bba2bf..f6a77538b9 100644 --- a/pom.xml +++ b/pom.xml -@@ -482,20 +482,6 @@ +@@ -612,20 +612,6 @@ <optional>true</optional> </dependency> @@ -401,6 +399,6 @@ <dependency> <groupId>com.google.protobuf</groupId> -- -2.30.1 +2.34.1 ++++++ 0004-Remove-optional-dep-tcnative.patch ++++++ ++++ 1787 lines (skipped) ++++ between /work/SRC/openSUSE:Factory/netty/0004-Remove-optional-dep-tcnative.patch ++++ and /work/SRC/openSUSE:Factory/.netty.new.1892/0004-Remove-optional-dep-tcnative.patch ++++++ 0005-Remove-optional-dep-log4j.patch ++++++ --- /var/tmp/diff_new_pack.1lnoUH/_old 2022-01-13 23:22:20.628082906 +0100 +++ /var/tmp/diff_new_pack.1lnoUH/_new 2022-01-13 23:22:20.632082908 +0100 @@ -1,4 +1,4 @@ -From 704998dea3b9efcf8497e31376aebf85e9156df9 Mon Sep 17 00:00:00 2001 +From c3cfdd6de230d55050877a90a982abe1d9659e69 Mon Sep 17 00:00:00 2001 From: Mat Booth <mat.bo...@redhat.com> Date: Mon, 7 Sep 2020 14:29:44 +0100 Subject: [PATCH 5/7] Remove optional dep log4j @@ -17,7 +17,7 @@ delete mode 100644 common/src/main/java/io/netty/util/internal/logging/Log4JLoggerFactory.java diff --git a/common/pom.xml b/common/pom.xml -index 938ea25c3e..589e49b943 100644 +index 472429c00b..7e9a757cde 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -63,21 +63,6 @@ @@ -25,8 +25,8 @@ <optional>true</optional> </dependency> - <dependency> -- <groupId>log4j</groupId> -- <artifactId>log4j</artifactId> +- <groupId>org.apache.logging.log4j</groupId> +- <artifactId>log4j-1.2-api</artifactId> - <optional>true</optional> - </dependency> - <dependency> @@ -43,7 +43,7 @@ <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> diff --git a/common/src/main/java/io/netty/util/internal/logging/InternalLoggerFactory.java b/common/src/main/java/io/netty/util/internal/logging/InternalLoggerFactory.java -index 80e1567c89..09ceea1667 100644 +index 7ad7db8a01..09ceea1667 100644 --- a/common/src/main/java/io/netty/util/internal/logging/InternalLoggerFactory.java +++ b/common/src/main/java/io/netty/util/internal/logging/InternalLoggerFactory.java @@ -39,63 +39,10 @@ public abstract class InternalLoggerFactory { @@ -70,7 +70,7 @@ - private static InternalLoggerFactory useSlf4JLoggerFactory(String name) { - try { -- InternalLoggerFactory f = new Slf4JLoggerFactory(true); +- InternalLoggerFactory f = Slf4JLoggerFactory.INSTANCE_WITH_NOP_CHECK; - f.newInstance(name).debug("Using SLF4J as the default logging framework"); - return f; - } catch (LinkageError ignore) { @@ -950,6 +950,6 @@ - } -} -- -2.30.1 +2.34.1 ++++++ 0006-revert-Fix-native-image-build.patch ++++++ --- /var/tmp/diff_new_pack.1lnoUH/_old 2022-01-13 23:22:20.644082916 +0100 +++ /var/tmp/diff_new_pack.1lnoUH/_new 2022-01-13 23:22:20.648082919 +0100 @@ -1,4 +1,4 @@ -From 315f2a4e90c5a59c7b17d07f3cab84adecad8375 Mon Sep 17 00:00:00 2001 +From f3d7187c9b860b523d331cf67467db5cfc9ff233 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.st...@bluewin.ch> Date: Thu, 11 Feb 2021 12:46:20 +0100 Subject: [PATCH 6/7] revert Fix native image build... @@ -10,16 +10,16 @@ .../io.netty/common/native-image.properties | 5 +- pom.xml | 2 - .../resolver-dns/native-image.properties | 18 -- - .../pom.xml | 100 ---------- + .../pom.xml | 102 ----------- .../NativeClientWithNettyInitAtRuntime.java | 36 ---- .../testsuite/svm/client/package-info.java | 21 --- - testsuite-native-image-client/pom.xml | 106 ----------- + testsuite-native-image-client/pom.xml | 108 ----------- .../testsuite/svm/client/DnsNativeClient.java | 48 ----- .../testsuite/svm/client/package-info.java | 20 -- .../src/main/resources/reflection-config.json | 8 - .../socket/InternetProtocolFamily.java | 17 +- .../socket/InternetProtocolFamilyTest.java | 36 ---- - 15 files changed, 115 insertions(+), 678 deletions(-) + 15 files changed, 115 insertions(+), 682 deletions(-) delete mode 100644 common/src/main/java/io/netty/util/NetUtilInitializations.java delete mode 100644 common/src/main/java/io/netty/util/NetUtilSubstitutions.java delete mode 100644 resolver-dns/src/main/resources/META-INF/native-image/io.netty/resolver-dns/native-image.properties @@ -467,10 +467,10 @@ - --initialize-at-run-time=io.netty.util.NetUtilSubstitutions$NetUtilLocalhostLazyHolder +Args = --initialize-at-run-time=io.netty.util.AbstractReferenceCounted,io.netty.util.concurrent.GlobalEventExecutor,io.netty.util.concurrent.ImmediateEventExecutor,io.netty.util.concurrent.ScheduledFutureTask,io.netty.util.internal.ThreadLocalRandom diff --git a/pom.xml b/pom.xml -index 0341f98232..6b91405ea5 100644 +index baaac8d945..056f5856d7 100644 --- a/pom.xml +++ b/pom.xml -@@ -444,8 +444,6 @@ +@@ -574,8 +574,6 @@ <module>testsuite-shading</module> <module>testsuite-native</module> <module>testsuite-native-image</module> @@ -505,10 +505,10 @@ - --initialize-at-run-time=io.netty.resolver.HostsFileEntriesResolver diff --git a/testsuite-native-image-client-runtime-init/pom.xml b/testsuite-native-image-client-runtime-init/pom.xml deleted file mode 100644 -index e91ceb33e9..0000000000 +index e6964701e0..0000000000 --- a/testsuite-native-image-client-runtime-init/pom.xml +++ /dev/null -@@ -1,100 +0,0 @@ +@@ -1,102 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ Copyright 2020 The Netty Project @@ -531,7 +531,7 @@ - <parent> - <groupId>io.netty</groupId> - <artifactId>netty-parent</artifactId> -- <version>4.1.60.Final</version> +- <version>4.1.72.Final</version> - </parent> - - <artifactId>netty-testsuite-native-image-client-runtime-init</artifactId> @@ -540,7 +540,9 @@ - <name>Netty/Testsuite/NativeImage/ClientRuntimeInit</name> - - <properties> -- <skipJapicmp>true</skipJapicmp> +- <japicmp.skip>true</japicmp.skip> +- <!-- Do not deploy this module --> +- <skipDeploy>true</skipDeploy> - </properties> - - <dependencies> @@ -568,7 +570,7 @@ - <build> - <plugins> - <plugin> -- <groupId>com.oracle.substratevm</groupId> +- <groupId>org.graalvm.nativeimage</groupId> - <artifactId>native-image-maven-plugin</artifactId> - <version>${graalvm.version}</version> - <executions> @@ -680,10 +682,10 @@ -package io.netty.testsuite.svm.client; diff --git a/testsuite-native-image-client/pom.xml b/testsuite-native-image-client/pom.xml deleted file mode 100644 -index d42dbae041..0000000000 +index 6eff56ff57..0000000000 --- a/testsuite-native-image-client/pom.xml +++ /dev/null -@@ -1,106 +0,0 @@ +@@ -1,108 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ Copyright 2020 The Netty Project @@ -706,7 +708,7 @@ - <parent> - <groupId>io.netty</groupId> - <artifactId>netty-parent</artifactId> -- <version>4.1.60.Final</version> +- <version>4.1.72.Final</version> - </parent> - - <artifactId>netty-testsuite-native-image-client</artifactId> @@ -715,7 +717,9 @@ - <name>Netty/Testsuite/NativeImage/Client</name> - - <properties> -- <skipJapicmp>true</skipJapicmp> +- <japicmp.skip>true</japicmp.skip> +- <!-- Do not deploy this module --> +- <skipDeploy>true</skipDeploy> - </properties> - - <dependencies> @@ -749,7 +753,7 @@ - <build> - <plugins> - <plugin> -- <groupId>com.oracle.substratevm</groupId> +- <groupId>org.graalvm.nativeimage</groupId> - <artifactId>native-image-maven-plugin</artifactId> - <version>${graalvm.version}</version> - <executions> @@ -927,7 +931,7 @@ /** diff --git a/transport/src/test/java/io/netty/channel/socket/InternetProtocolFamilyTest.java b/transport/src/test/java/io/netty/channel/socket/InternetProtocolFamilyTest.java deleted file mode 100644 -index 4a203057ed..0000000000 +index 6fe225b850..0000000000 --- a/transport/src/test/java/io/netty/channel/socket/InternetProtocolFamilyTest.java +++ /dev/null @@ -1,36 +0,0 @@ @@ -949,7 +953,7 @@ -package io.netty.channel.socket; - -import io.netty.util.NetUtil; --import org.junit.Test; +-import org.junit.jupiter.api.Test; - -import java.net.InetAddress; - @@ -968,6 +972,6 @@ - } -} -- -2.30.1 +2.34.1 ++++++ 0007-Revert-Support-session-cache-for-client-and-server-w.patch ++++++ ++++ 861 lines (skipped) ++++ between /work/SRC/openSUSE:Factory/netty/0007-Revert-Support-session-cache-for-client-and-server-w.patch ++++ and /work/SRC/openSUSE:Factory/.netty.new.1892/0007-Revert-Support-session-cache-for-client-and-server-w.patch ++++++ netty-4.1.60.Final.tar.gz -> netty-4.1.72.Final.tar.gz ++++++ ++++ 115281 lines of diff (skipped) ++++++ no-brotli-zstd.patch ++++++ diff -urEbwB netty-netty-4.1.72.Final.orig/codec/src/main/java/io/netty/handler/codec/compression/StandardCompressionOptions.java netty-netty-4.1.72.Final/codec/src/main/java/io/netty/handler/codec/compression/StandardCompressionOptions.java --- netty-netty-4.1.72.Final.orig/codec/src/main/java/io/netty/handler/codec/compression/StandardCompressionOptions.java 2021-12-13 17:10:20.554957183 +0100 +++ netty-netty-4.1.72.Final/codec/src/main/java/io/netty/handler/codec/compression/StandardCompressionOptions.java 2021-12-13 17:32:02.990725038 +0100 @@ -15,10 +15,8 @@ */ package io.netty.handler.codec.compression; -import com.aayushatharva.brotli4j.encoder.Encoder; - /** - * Standard Compression Options for {@link BrotliOptions}, + * Standard Compression Options for * {@link GzipOptions} and {@link DeflateOptions} */ public final class StandardCompressionOptions { @@ -28,47 +26,6 @@ } /** - * 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} - */ - public static BrotliOptions brotli() { - return BrotliOptions.DEFAULT; - } - - /** - * Create a new {@link BrotliOptions} - * - * @param parameters {@link Encoder.Parameters} Instance - * @throws NullPointerException If {@link Encoder.Parameters} is {@code null} - */ - public static BrotliOptions brotli(Encoder.Parameters parameters) { - 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} - */ - public static ZstdOptions zstd() { - return ZstdOptions.DEFAULT; - } - - /** - * 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 - */ - public static ZstdOptions zstd(int compressionLevel, int blockSize, int maxEncodeSize) { - return new ZstdOptions(compressionLevel, blockSize, maxEncodeSize); - } - - /** * Default implementation of {@link GzipOptions} with * {@code compressionLevel()} set to 6, {@code windowBits()} set to 15 and {@code memLevel()} set to 8. */ diff -urEbwB netty-netty-4.1.72.Final.orig/codec-http/src/main/java/io/netty/handler/codec/http/HttpContentCompressor.java netty-netty-4.1.72.Final/codec-http/src/main/java/io/netty/handler/codec/http/HttpContentCompressor.java --- netty-netty-4.1.72.Final.orig/codec-http/src/main/java/io/netty/handler/codec/http/HttpContentCompressor.java 2021-12-13 17:10:20.518956968 +0100 +++ netty-netty-4.1.72.Final/codec-http/src/main/java/io/netty/handler/codec/http/HttpContentCompressor.java 2021-12-13 17:48:39.308669475 +0100 @@ -22,9 +22,6 @@ import io.netty.channel.ChannelHandlerContext; import io.netty.channel.embedded.EmbeddedChannel; import io.netty.handler.codec.MessageToByteEncoder; -import io.netty.handler.codec.compression.Brotli; -import io.netty.handler.codec.compression.BrotliEncoder; -import io.netty.handler.codec.compression.BrotliOptions; import io.netty.handler.codec.compression.CompressionOptions; import io.netty.handler.codec.compression.DeflateOptions; import io.netty.handler.codec.compression.GzipOptions; @@ -32,9 +29,6 @@ import io.netty.handler.codec.compression.ZlibCodecFactory; import io.netty.handler.codec.compression.ZlibEncoder; import io.netty.handler.codec.compression.ZlibWrapper; -import io.netty.handler.codec.compression.Zstd; -import io.netty.handler.codec.compression.ZstdEncoder; -import io.netty.handler.codec.compression.ZstdOptions; import io.netty.util.internal.ObjectUtil; /** @@ -47,10 +41,8 @@ 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 int compressionLevel; private final int windowBits; @@ -134,10 +126,8 @@ 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.factories = null; this.supportsCompressionOptions = false; } @@ -166,27 +156,18 @@ */ public HttpContentCompressor(int contentSizeThreshold, CompressionOptions... compressionOptions) { this.contentSizeThreshold = ObjectUtil.checkPositiveOrZero(contentSizeThreshold, "contentSizeThreshold"); - BrotliOptions brotliOptions = null; GzipOptions gzipOptions = null; DeflateOptions deflateOptions = null; - ZstdOptions zstdOptions = 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; } else { ObjectUtil.deepCheckNotNull("compressionOptions", compressionOptions); for (CompressionOptions compressionOption : compressionOptions) { - if (compressionOption instanceof BrotliOptions) { - // if we have BrotliOptions, it means Brotli is available - 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 { throw new IllegalArgumentException("Unsupported " + CompressionOptions.class.getSimpleName() + ": " + compressionOption); @@ -196,8 +177,6 @@ this.gzipOptions = gzipOptions; this.deflateOptions = deflateOptions; - this.brotliOptions = brotliOptions; - this.zstdOptions = zstdOptions; this.factories = new HashMap<String, CompressionEncoderFactory>(); @@ -207,12 +186,6 @@ if (this.deflateOptions != null) { this.factories.put("deflate", new DeflateEncoderFactory()); } - if (this.brotliOptions != null) { - this.factories.put("br", new BrEncoderFactory()); - } - if (this.zstdOptions != null) { - this.factories.put("zstd", new ZstdEncoderFactory()); - } this.compressionLevel = -1; this.windowBits = -1; @@ -285,8 +258,6 @@ @SuppressWarnings("FloatingPointEquality") protected String determineEncoding(String acceptEncoding) { float starQ = -1.0f; - float brQ = -1.0f; - float zstdQ = -1.0f; float gzipQ = -1.0f; float deflateQ = -1.0f; for (String encoding : acceptEncoding.split(",")) { @@ -302,34 +273,20 @@ } if (encoding.contains("*")) { starQ = q; - } else if (encoding.contains("br") && q > brQ) { - brQ = q; - } else if (encoding.contains("zstd") && q > zstdQ) { - zstdQ = q; } else if (encoding.contains("gzip") && q > gzipQ) { gzipQ = q; } else if (encoding.contains("deflate") && q > deflateQ) { deflateQ = q; } } - if (brQ > 0.0f || zstdQ > 0.0f || gzipQ > 0.0f || deflateQ > 0.0f) { - if (brQ != -1.0f && brQ >= zstdQ && this.brotliOptions != null) { - return "br"; - } else if (zstdQ != -1.0f && zstdQ >= gzipQ && this.zstdOptions != null) { - return "zstd"; - } else if (gzipQ != -1.0f && gzipQ >= deflateQ && this.gzipOptions != null) { + if (gzipQ > 0.0f || deflateQ > 0.0f) { + if (gzipQ != -1.0f && gzipQ >= deflateQ && this.gzipOptions != null) { return "gzip"; } else if (deflateQ != -1.0f && this.deflateOptions != null) { return "deflate"; } } if (starQ > 0.0f) { - if (brQ == -1.0f && this.brotliOptions != null) { - return "br"; - } - if (zstdQ == -1.0f && this.zstdOptions != null) { - return "zstd"; - } if (gzipQ == -1.0f && this.gzipOptions != null) { return "gzip"; } @@ -410,29 +367,4 @@ deflateOptions.windowBits(), deflateOptions.memLevel()); } } - - /** - * Compression Encoder Factory that creates {@link BrotliEncoder}s - * used to compress http content for br content encoding - */ - private final class BrEncoderFactory implements CompressionEncoderFactory { - - @Override - public MessageToByteEncoder<ByteBuf> createEncoder() { - return new BrotliEncoder(brotliOptions.parameters()); - } - } - - /** - * Compression Encoder Factory for create {@link ZstdEncoder} - * used to compress http content for zstd content encoding - */ - private final class ZstdEncoderFactory implements CompressionEncoderFactory { - - @Override - public MessageToByteEncoder<ByteBuf> createEncoder() { - return new ZstdEncoder(zstdOptions.compressionLevel(), - zstdOptions.blockSize(), zstdOptions.maxEncodeSize()); - } - } } diff -urEbwB netty-netty-4.1.72.Final.orig/codec-http/src/main/java/io/netty/handler/codec/http/HttpContentDecompressor.java netty-netty-4.1.72.Final/codec-http/src/main/java/io/netty/handler/codec/http/HttpContentDecompressor.java --- netty-netty-4.1.72.Final.orig/codec-http/src/main/java/io/netty/handler/codec/http/HttpContentDecompressor.java 2021-12-13 17:10:20.518956968 +0100 +++ netty-netty-4.1.72.Final/codec-http/src/main/java/io/netty/handler/codec/http/HttpContentDecompressor.java 2021-12-13 17:40:25.649724006 +0100 @@ -15,15 +15,12 @@ */ package io.netty.handler.codec.http; -import static io.netty.handler.codec.http.HttpHeaderValues.BR; 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; import static io.netty.handler.codec.http.HttpHeaderValues.X_GZIP; 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.ZlibCodecFactory; import io.netty.handler.codec.compression.ZlibWrapper; @@ -67,10 +64,6 @@ return new EmbeddedChannel(ctx.channel().id(), ctx.channel().metadata().hasDisconnect(), ctx.channel().config(), ZlibCodecFactory.newZlibDecoder(wrapper)); } - if (Brotli.isAvailable() && BR.contentEqualsIgnoreCase(contentEncoding)) { - return new EmbeddedChannel(ctx.channel().id(), ctx.channel().metadata().hasDisconnect(), - ctx.channel().config(), new BrotliDecoder()); - } // 'identity' or unsupported return null; diff -urEbwB netty-netty-4.1.72.Final.orig/codec-http2/src/main/java/io/netty/handler/codec/http2/CompressorHttp2ConnectionEncoder.java netty-netty-4.1.72.Final/codec-http2/src/main/java/io/netty/handler/codec/http2/CompressorHttp2ConnectionEncoder.java --- netty-netty-4.1.72.Final.orig/codec-http2/src/main/java/io/netty/handler/codec/http2/CompressorHttp2ConnectionEncoder.java 2021-12-13 17:10:20.530957040 +0100 +++ netty-netty-4.1.72.Final/codec-http2/src/main/java/io/netty/handler/codec/http2/CompressorHttp2ConnectionEncoder.java 2021-12-13 17:53:13.454306875 +0100 @@ -21,29 +21,23 @@ import io.netty.channel.ChannelPromise; import io.netty.channel.embedded.EmbeddedChannel; import io.netty.handler.codec.ByteToMessageDecoder; -import io.netty.handler.codec.compression.BrotliEncoder; import io.netty.handler.codec.compression.ZlibCodecFactory; import io.netty.handler.codec.compression.ZlibWrapper; -import io.netty.handler.codec.compression.BrotliOptions; import io.netty.handler.codec.compression.CompressionOptions; 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.ZstdEncoder; -import io.netty.handler.codec.compression.ZstdOptions; import io.netty.util.concurrent.PromiseCombiner; import io.netty.util.internal.ObjectUtil; 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; -import static io.netty.handler.codec.http.HttpHeaderValues.BR; 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.IDENTITY; 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.ZSTD; /** * A decorating HTTP2 encoder that will compress data frames according to the {@code content-encoding} header for each @@ -63,17 +57,15 @@ private final boolean supportsCompressionOptions; - private BrotliOptions brotliOptions; private GzipOptions gzipCompressionOptions; private DeflateOptions deflateOptions; - private ZstdOptions zstdOptions; /** * Create a new {@link CompressorHttp2ConnectionEncoder} instance * with default implementation of {@link StandardCompressionOptions} */ public CompressorHttp2ConnectionEncoder(Http2ConnectionEncoder delegate) { - this(delegate, StandardCompressionOptions.brotli(), StandardCompressionOptions.gzip(), + this(delegate, StandardCompressionOptions.gzip(), StandardCompressionOptions.deflate()); } @@ -113,14 +105,10 @@ ObjectUtil.deepCheckNotNull("CompressionOptions", compressionOptionsArgs); for (CompressionOptions compressionOptions : compressionOptionsArgs) { - if (compressionOptions instanceof BrotliOptions) { - brotliOptions = (BrotliOptions) compressionOptions; - } else if (compressionOptions instanceof GzipOptions) { + if (compressionOptions instanceof GzipOptions) { gzipCompressionOptions = (GzipOptions) compressionOptions; } else if (compressionOptions instanceof DeflateOptions) { deflateOptions = (DeflateOptions) compressionOptions; - } else if (compressionOptions instanceof ZstdOptions) { - zstdOptions = (ZstdOptions) compressionOptions; } else { throw new IllegalArgumentException("Unsupported " + CompressionOptions.class.getSimpleName() + ": " + compressionOptions); @@ -258,15 +246,6 @@ if (DEFLATE.contentEqualsIgnoreCase(contentEncoding) || X_DEFLATE.contentEqualsIgnoreCase(contentEncoding)) { return newCompressionChannel(ctx, ZlibWrapper.ZLIB); } - if (brotliOptions != null && BR.contentEqualsIgnoreCase(contentEncoding)) { - return new EmbeddedChannel(ctx.channel().id(), ctx.channel().metadata().hasDisconnect(), - ctx.channel().config(), new BrotliEncoder(brotliOptions.parameters())); - } - if (zstdOptions != null && ZSTD.contentEqualsIgnoreCase(contentEncoding)) { - return new EmbeddedChannel(ctx.channel().id(), ctx.channel().metadata().hasDisconnect(), - ctx.channel().config(), new ZstdEncoder(zstdOptions.compressionLevel(), - zstdOptions.blockSize(), zstdOptions.maxEncodeSize())); - } // 'identity' or unsupported return null; } diff -urEbwB netty-netty-4.1.72.Final.orig/codec-http2/src/main/java/io/netty/handler/codec/http2/DelegatingDecompressorFrameListener.java netty-netty-4.1.72.Final/codec-http2/src/main/java/io/netty/handler/codec/http2/DelegatingDecompressorFrameListener.java --- netty-netty-4.1.72.Final.orig/codec-http2/src/main/java/io/netty/handler/codec/http2/DelegatingDecompressorFrameListener.java 2021-12-13 17:10:20.530957040 +0100 +++ netty-netty-4.1.72.Final/codec-http2/src/main/java/io/netty/handler/codec/http2/DelegatingDecompressorFrameListener.java 2021-12-13 17:55:03.506964279 +0100 @@ -19,15 +19,12 @@ 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.ZlibCodecFactory; import io.netty.handler.codec.compression.ZlibWrapper; 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; -import static io.netty.handler.codec.http.HttpHeaderValues.BR; 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.IDENTITY; @@ -178,10 +175,6 @@ return new EmbeddedChannel(ctx.channel().id(), ctx.channel().metadata().hasDisconnect(), ctx.channel().config(), ZlibCodecFactory.newZlibDecoder(wrapper)); } - if (Brotli.isAvailable() && BR.contentEqualsIgnoreCase(contentEncoding)) { - return new EmbeddedChannel(ctx.channel().id(), ctx.channel().metadata().hasDisconnect(), - ctx.channel().config(), new BrotliDecoder()); - } // 'identity' or unsupported return null; } ++++++ no-werror.patch ++++++ --- /var/tmp/diff_new_pack.1lnoUH/_old 2022-01-13 23:22:21.496083474 +0100 +++ /var/tmp/diff_new_pack.1lnoUH/_new 2022-01-13 23:22:21.500083476 +0100 @@ -1,15 +1,24 @@ ---- netty-netty-4.1.59.Final/transport-native-unix-common/pom.xml 2021-02-11 19:24:51.672176696 +0100 -+++ netty-netty-4.1.59.Final/transport-native-unix-common/pom.xml 2021-02-11 19:25:30.380406003 +0100 +--- netty-netty-4.1.72.Final/transport-native-unix-common/pom.xml 2021-12-13 17:10:20.606957494 +0100 ++++ netty-netty-4.1.72.Final/transport-native-unix-common/pom.xml 2021-12-13 17:11:21.279319445 +0100 @@ -153,7 +153,7 @@ <env key="LIB_DIR" value="${nativeLibOnlyDir}" /> <env key="OBJ_DIR" value="${nativeObjsOnlyDir}" /> <env key="JNI_PLATFORM" value="${jni.platform}" /> - <env key="CFLAGS" value="-O3 -Werror -Wno-attributes -fPIC -fno-omit-frame-pointer -Wunused-variable -fvisibility=hidden" /> + <env key="CFLAGS" value="-O3 -Wno-attributes -fPIC -fno-omit-frame-pointer -Wunused-variable -fvisibility=hidden" /> - <env key="LDFLAGS" value="-Wl,--no-as-needed -lrt" /> + <env key="LDFLAGS" value="-Wl,--no-as-needed -lrt -Wl,-platform_version,macos,10.2,10.2" /> <env key="LIB_NAME" value="${nativeLibName}" /> <!-- support for __attribute__((weak_import)) by the linker was added in 10.2 so ensure we -@@ -228,7 +228,7 @@ +@@ -226,7 +226,7 @@ + <env key="LIB_DIR" value="${nativeLibOnlyDir}" /> + <env key="OBJ_DIR" value="${nativeObjsOnlyDir}" /> + <env key="JNI_PLATFORM" value="${jni.platform}" /> +- <env key="CFLAGS" value="-target arm64-apple-macos11 -O3 -Werror -Wno-attributes -fPIC -fno-omit-frame-pointer -Wunused-variable -fvisibility=hidden" /> ++ <env key="CFLAGS" value="-target arm64-apple-macos11 -O3 -Wno-attributes -fPIC -fno-omit-frame-pointer -Wunused-variable -fvisibility=hidden" /> + <env key="LDFLAGS" value="-arch arm64 -Wl,--no-as-needed -lrt -Wl,-platform_version,macos,11.0,11.0" /> + <env key="LIB_NAME" value="${nativeLibName}" /> + <env key="MACOSX_DEPLOYMENT_TARGET" value="11.0" /> +@@ -298,7 +298,7 @@ <env key="LIB_DIR" value="${nativeLibOnlyDir}" /> <env key="OBJ_DIR" value="${nativeObjsOnlyDir}" /> <env key="JNI_PLATFORM" value="${jni.platform}" /> @@ -18,7 +27,7 @@ <env key="LDFLAGS" value="-Wl,--no-as-needed -lrt" /> <env key="LIB_NAME" value="${nativeLibName}" /> </exec> -@@ -298,7 +298,7 @@ +@@ -368,7 +368,7 @@ <env key="LIB_DIR" value="${nativeLibOnlyDir}" /> <env key="OBJ_DIR" value="${nativeObjsOnlyDir}" /> <env key="JNI_PLATFORM" value="${jni.platform}" /> @@ -27,7 +36,7 @@ <env key="LDFLAGS" value="-Wl,--no-as-needed -lrt" /> <env key="LIB_NAME" value="${nativeLibName}" /> </exec> -@@ -372,7 +372,7 @@ +@@ -442,7 +442,7 @@ <env key="LIB_DIR" value="${nativeLibOnlyDir}" /> <env key="OBJ_DIR" value="${nativeObjsOnlyDir}" /> <env key="JNI_PLATFORM" value="${jni.platform}" /> @@ -36,7 +45,7 @@ <env key="LDFLAGS" value="-Wl,--no-as-needed -lrt" /> <env key="LIB_NAME" value="${nativeLibName}" /> </exec> -@@ -446,7 +446,7 @@ +@@ -516,7 +516,7 @@ <env key="LIB_DIR" value="${nativeLibOnlyDir}" /> <env key="OBJ_DIR" value="${nativeObjsOnlyDir}" /> <env key="JNI_PLATFORM" value="${jni.platform}" />