Add JDK-8375294 EOPNOTSUPP patch ahead of 25.0.4

Resolves: RHEL-169615
This commit is contained in:
Andrew Hughes 2026-04-18 17:47:21 +01:00
parent 66f7477628
commit 8928e5d148
2 changed files with 69 additions and 1 deletions

View File

@ -1390,7 +1390,8 @@ Patch1001: fips-%{featurever}u-%{fipsver}.patch
#
#############################################
# Currently empty
# JDK-8375294: (fs) Files.copy can fail with EOPNOTSUPP when copy_file_range not supported
Patch2001: jdk8375294-handle-EOPNOTSUPP-in-copying.patch
#############################################
#
@ -1925,6 +1926,8 @@ sh %{SOURCE12} %{top_level_dir_name}
pushd %{top_level_dir_name}
# Add crypto policy and FIPS support
%patch -P1001 -p1
# Add EOPNOTSUPP patch
%patch -P2001 -p1
popd # openjdk
# Patch NSS adapter
@ -2609,12 +2612,14 @@ exit 0
- Bump giflib version to 6.1.2 following JDK-8379256 & JDK-8380078
- Bump libpng version to 1.6.57 following JDK-8380959 & JDK-8382047
- Bump zlib version to 1.3.2 following JDK-8378631
- Add JDK-8375294 EOPNOTSUPP patch ahead of 25.0.4
- ** This tarball is embargoed until 2026-04-21 @ 1pm PT. **
- Resolves: RHEL-169619
- Resolves: RHEL-157142
- Resolves: RHEL-157154
- Resolves: RHEL-161306
- Resolves: RHEL-161455
- Resolves: RHEL-169615
* Wed Mar 11 2026 Thomas Fitzsimmons <fitzsim@redhat.com> - 1:25.0.2.0.10-3
- Disable abidiff inspection in rpminspect.yaml to avoid an out-of-memory error on the CentOS test farm

View File

@ -0,0 +1,63 @@
From dbbdc1dffd10608195487fa139e77c4a90c80658 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20Van=C4=9Bk?= <jvanek@openjdk.org>
Date: Wed, 15 Apr 2026 12:54:49 +0000
Subject: [PATCH] 8375294: (fs) Files.copy can fail with EOPNOTSUPP when
copy_file_range not supported
Reviewed-by: andrew
Backport-of: 30cda00010888b6e9a2bf8cdeaedbb3eb4b6a222
---
src/java.base/linux/native/libnio/ch/FileDispatcherImpl.c | 5 +++--
src/java.base/linux/native/libnio/fs/LinuxNativeDispatcher.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/java.base/linux/native/libnio/ch/FileDispatcherImpl.c b/src/java.base/linux/native/libnio/ch/FileDispatcherImpl.c
index efbd0ca5684..54d640b03a4 100644
--- a/src/java.base/linux/native/libnio/ch/FileDispatcherImpl.c
+++ b/src/java.base/linux/native/libnio/ch/FileDispatcherImpl.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -63,7 +63,7 @@ Java_sun_nio_ch_FileDispatcherImpl_transferFrom0(JNIEnv *env, jobject this,
if (n < 0) {
if (errno == EAGAIN)
return IOS_UNAVAILABLE;
- if (errno == ENOSYS)
+ if (errno == ENOSYS || errno == EOPNOTSUPP)
return IOS_UNSUPPORTED_CASE;
if ((errno == EBADF || errno == EINVAL || errno == EXDEV) &&
((ssize_t)count >= 0))
@@ -103,6 +103,7 @@ Java_sun_nio_ch_FileDispatcherImpl_transferTo0(JNIEnv *env, jobject this,
case EINVAL:
case ENOSYS:
case EXDEV:
+ case EOPNOTSUPP:
// ignore and try sendfile()
break;
default:
diff --git a/src/java.base/linux/native/libnio/fs/LinuxNativeDispatcher.c b/src/java.base/linux/native/libnio/fs/LinuxNativeDispatcher.c
index c90e99dda07..4677411b0ba 100644
--- a/src/java.base/linux/native/libnio/fs/LinuxNativeDispatcher.c
+++ b/src/java.base/linux/native/libnio/fs/LinuxNativeDispatcher.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -193,6 +193,7 @@ Java_sun_nio_fs_LinuxNativeDispatcher_directCopy0
case EINVAL:
case ENOSYS:
case EXDEV:
+ case EOPNOTSUPP:
// ignore and try sendfile()
break;
default:
--
2.52.0