Skip to content

Commit 422ac3d

Browse files
authored
Merge pull request #4033 from hadfl/jdk_r46
openjdk package updates (r151046)
2 parents 0fa7844 + d90a9e2 commit 422ac3d

File tree

11 files changed

+172
-15
lines changed

11 files changed

+172
-15
lines changed

build/openjdk11/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
. ../../lib/build.sh
1818

1919
PROG=openjdk
20-
VER=11.0.28+6
20+
VER=11.0.29+7
2121
PKG=runtime/java/openjdk11
2222
SUMMARY="openjdk ${VER%%.*}"
2323
DESC="Open-source implementation of the eleventh edition of the "

build/openjdk17/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
. ../../lib/build.sh
1818

1919
PROG=openjdk
20-
VER=17.0.16+8
20+
VER=17.0.17+10
2121
PKG=runtime/java/openjdk17
2222
SUMMARY="openjdk ${VER%%.*}"
2323
DESC="Open-source implementation of the seventeenth edition of the "

build/openjdk21/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
. ../../lib/build.sh
1818

1919
PROG=openjdk
20-
VER=21.0.8+9
20+
VER=21.0.9+10
2121
PKG=runtime/java/openjdk21
2222
SUMMARY="openjdk ${VER%%.*}"
2323
DESC="Open-source implementation of the twenty-first edition of the "

build/openjdk21/patches/README.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ considerably modified. Cut from the jdk15 patches as of jdk15+32.
33

44
See also README-zero.txt for note on a project zero variant.
55

6+
Fix: restore support for extended attributes - see xattrs.patch
7+
8+
21.0.9
9+
10+
Minor patch noise.
11+
612
21.0.8
713

814
Poller implDeregister() signature change.

build/openjdk21/patches/illumos-port-27.patch

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
--- a/src/java.desktop/unix/native/libawt_xawt/awt/screencast_pipewire.c Thu Jun 8 15:06:27 2023
22
+++ b/src/java.desktop/unix/native/libawt_xawt/awt/screencast_pipewire.c Mon Jun 12 09:15:47 2023
3-
@@ -37,6 +37,10 @@
4-
#include "gtk_interface.h"
3+
@@ -42,6 +42,10 @@
54
#include "gtk3_interface.h"
5+
#include "canvas.h"
66

77
+#ifndef MAX
88
+#define MAX(a,b) ((a) > (b) ? (a) : (b))
@@ -13,10 +13,10 @@
1313
#define EXCEPTION_CHECK_DESCRIBE() if ((*env)->ExceptionCheck(env)) { \
1414
--- a/src/java.desktop/unix/native/libpipewire/include/spa/utils/endian.h Thu Feb 20 02:13:41 2025
1515
+++ b/src/java.desktop/unix/native/libpipewire/include/spa/utils/endian.h Fri Feb 21 11:45:01 2025
16-
@@ -22,6 +22,8 @@
17-
#include <sys/machine.h>
18-
#define __BIG_ENDIAN BIG_ENDIAN
19-
#define __BYTE_ORDER BIG_ENDIAN
16+
@@ -18,6 +18,8 @@
17+
#define bswap_16 _byteswap_ushort
18+
#define bswap_32 _byteswap_ulong
19+
#define bswap_64 _byteswap_uint64
2020
+#elif defined(SOLARIS)
2121
+#include <endian.h>
2222
#else

build/openjdk21/patches/series

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,6 @@ patch-src_hotspot_share_gc_g1_g1Analytics.cpp -p0
3434
tribblix-flags-cflags.patch -p0
3535
tribblix-flags-ldflags.patch -p0
3636
tribblix-flags-ldflags3.patch -p0
37+
xattrs.patch
3738
omnios-headless.patch
3839
fontpath.patch
Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
This patch reintroduces support for extended attributes in Solaris.
2+
It is subtly different from the support in JDK17 and earlier, in that
3+
attributes are implicitly namespaced, like Linux, as the code is now
4+
shared. This means that the 2 native attribute files you normally see
5+
are missing, and all the attribute filenames get a "user." prefix.
6+
7+
--- a/src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c Sat Oct 25 15:35:56 2025
8+
+++ b/src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c Wed Nov 12 14:16:06 2025
9+
@@ -296,6 +296,106 @@
10+
#endif
11+
12+
/**
13+
+ * Solaris and illumos do not have the f*xattr set of functions, so
14+
+ * provide a reasonable facsimile here.
15+
+ */
16+
+#ifdef __solaris__
17+
+ssize_t sunos_flistxattr(int fd, char* list, size_t size) {
18+
+ int xfd = openat(fd, ".", O_RDONLY|O_XATTR);
19+
+ DIR *dirp = fdopendir(xfd);
20+
+ int ilist = 0;
21+
+ int ilen = 0;
22+
+ struct dirent *dp;
23+
+ while (dp = readdir(dirp)) {
24+
+ if (strcmp(dp->d_name, ".") && strcmp(dp->d_name, "..")) {
25+
+ ilen = strlen(dp->d_name);
26+
+ if (size == 0) {
27+
+ /*
28+
+ * size==0 means just return the total size.
29+
+ */
30+
+ ilist += ilen;
31+
+ ilist += 1;
32+
+ } else {
33+
+ /*
34+
+ * If the name won't fit, break out and exit
35+
+ */
36+
+ if (ilist + ilen + 1 > size) {
37+
+ ilist = -1;
38+
+ break;
39+
+ }
40+
+ memcpy(list + ilist, dp->d_name, ilen);
41+
+ ilist += ilen;
42+
+ list[ilist] = 0;
43+
+ ilist += 1;
44+
+ }
45+
+ }
46+
+ }
47+
+ closedir(dirp);
48+
+ close(xfd);
49+
+ /*
50+
+ * If the result won't fit, return -1 and set errno to ERANGE
51+
+ */
52+
+ if (ilist == -1)
53+
+ errno = ERANGE;
54+
+ return ilist;
55+
+}
56+
+ssize_t sunos_fgetxattr(int fd, const char* name, void* value, size_t size) {
57+
+ int ifd = dup(fd);
58+
+ int gfd = openat(ifd, ".", O_RDONLY|O_XATTR);
59+
+ int rfd = openat(gfd, name, O_RDONLY);
60+
+ ssize_t nread;
61+
+ int xerr = 0;
62+
+ int nbuf[2];
63+
+ /*
64+
+ * return size of entry and don't do the read if size passed as 0
65+
+ */
66+
+ if (size == 0) {
67+
+ struct stat lbuf;
68+
+ fstat(rfd, &lbuf);
69+
+ nread = (ssize_t) lbuf.st_size;
70+
+ } else {
71+
+ nread = read(rfd, value, size);
72+
+ if (nread > size) {
73+
+ nread = -1;
74+
+ xerr = -1;
75+
+ }
76+
+ /*
77+
+ * now we need to check if there's any more to read, and error
78+
+ * out if there is as the buffer we were given is too small.
79+
+ * if the buffer was exactly the right size this read will return zero
80+
+ */
81+
+ if (nread == size) {
82+
+ if (read(rfd, &nbuf, 2) > 0) {
83+
+ nread = -1;
84+
+ xerr = -1;
85+
+ }
86+
+ }
87+
+ }
88+
+ close(rfd);
89+
+ close(gfd);
90+
+ close(ifd);
91+
+ if (xerr == -1) {
92+
+ errno = ERANGE;
93+
+ }
94+
+ return nread;
95+
+}
96+
+int sunos_fsetxattr(int fd, const char* name, void* value, size_t size) {
97+
+ int xfd = openat(fd, ".", O_RDONLY|O_XATTR);
98+
+ int wfd = openat(xfd, name, O_CREAT|O_RDWR, 0644);
99+
+ int uerr = write(wfd, value, size);
100+
+ close(wfd);
101+
+ close(xfd);
102+
+ return uerr;
103+
+}
104+
+int sunos_fremovexattr(int fd, const char* name) {
105+
+ int xfd = openat(fd, ".", O_RDONLY|O_XATTR);
106+
+ int uerr = unlinkat(xfd, name, 0);
107+
+ close(xfd);
108+
+ return uerr;
109+
+}
110+
+#endif
111+
+
112+
+/**
113+
* Call this to throw an internal UnixException when a system/library
114+
* call fails
115+
*/
116+
@@ -1546,6 +1634,8 @@
117+
res = fgetxattr(fd, name, value, valueLen);
118+
#elif defined(_ALLBSD_SOURCE)
119+
res = fgetxattr(fd, name, value, valueLen, 0, 0);
120+
+#elif defined(__solaris__)
121+
+ res = sunos_fgetxattr(fd, name, value, valueLen);
122+
#else
123+
throwUnixException(env, ENOTSUP);
124+
#endif
125+
@@ -1567,6 +1657,8 @@
126+
res = fsetxattr(fd, name, value, valueLen, 0);
127+
#elif defined(_ALLBSD_SOURCE)
128+
res = fsetxattr(fd, name, value, valueLen, 0, 0);
129+
+#elif defined(__solaris__)
130+
+ res = sunos_fsetxattr(fd, name, value, valueLen);
131+
#else
132+
throwUnixException(env, ENOTSUP);
133+
#endif
134+
@@ -1586,6 +1678,8 @@
135+
res = fremovexattr(fd, name);
136+
#elif defined(_ALLBSD_SOURCE)
137+
res = fremovexattr(fd, name, 0);
138+
+#elif defined(__solaris__)
139+
+ res = sunos_fremovexattr(fd, name);
140+
#else
141+
throwUnixException(env, ENOTSUP);
142+
#endif
143+
@@ -1605,6 +1699,8 @@
144+
res = flistxattr(fd, list, (size_t)size);
145+
#elif defined(_ALLBSD_SOURCE)
146+
res = flistxattr(fd, list, (size_t)size, 0);
147+
+#elif defined(__solaris__)
148+
+ res = sunos_flistxattr(fd, list, (size_t)size);
149+
#else
150+
throwUnixException(env, ENOTSUP);
151+
#endif

build/openjdk8/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
PROG=openjdk
2020
VER=1.8
21-
UPDATE=462
21+
UPDATE=472
2222
BUILD=08
2323
PKG=openjdk ##IGNORE## - filled in later
2424
SUMMARY="tbc"; DESC="tbc"

build/openjdk8/patches/ldflags-pie.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
diff -wpruN --no-dereference '--exclude=*.orig' a~/common/autoconf/generated-configure.sh a/common/autoconf/generated-configure.sh
22
--- a~/common/autoconf/generated-configure.sh 1970-01-01 00:00:00
33
+++ a/common/autoconf/generated-configure.sh 1970-01-01 00:00:00
4-
@@ -43516,7 +43516,7 @@ $as_echo "$supports" >&6; }
4+
@@ -43537,7 +43537,7 @@ $as_echo "$supports" >&6; }
55
# Enabling pie on 32 bit builds prevents the JVM from allocating a continuous
66
# java heap.
77
if test "x$OPENJDK_TARGET_CPU_BITS" != "x32"; then

build/openjdk8/patches/patch-common_autoconf_generated-configure.sh.patch

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
diff -wpruN '--exclude=*.orig' a~/common/autoconf/generated-configure.sh a/common/autoconf/generated-configure.sh
1+
diff -wpruN --no-dereference '--exclude=*.orig' a~/common/autoconf/generated-configure.sh a/common/autoconf/generated-configure.sh
22
--- a~/common/autoconf/generated-configure.sh 1970-01-01 00:00:00
33
+++ a/common/autoconf/generated-configure.sh 1970-01-01 00:00:00
44
@@ -4187,7 +4187,7 @@ VALID_TOOLCHAINS_all="gcc clang solstudi
@@ -49,7 +49,7 @@ diff -wpruN '--exclude=*.orig' a~/common/autoconf/generated-configure.sh a/commo
4949
else
5050
C_O_FLAG_HIGHEST="-O3"
5151
C_O_FLAG_HI="-O3"
52-
@@ -42671,12 +42679,12 @@ $as_echo "$ac_cv_c_bigendian" >&6; }
52+
@@ -42671,11 +42679,11 @@ $as_echo "$ac_cv_c_bigendian" >&6; }
5353
CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
5454
CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
5555
elif test "x$TOOLCHAIN_TYPE" = xgcc; then
@@ -66,7 +66,6 @@ diff -wpruN '--exclude=*.orig' a~/common/autoconf/generated-configure.sh a/commo
6666
LDFLAGS_JDK="$LDFLAGS_JDK -Wl,-z,relro"
6767
LEGACY_HOST_LDFLAGS="$LEGACY_HOST_LDFLAGS -Wl,-z,relro"
6868
LEGACY_TARGET_LDFLAGS="$LEGACY_TARGET_LDFLAGS -Wl,-z,relro"
69-
fi
7069
@@ -42809,7 +42817,7 @@ fi
7170
if test "x$TOOLCHAIN_TYPE" = xgcc; then
7271
# these options are used for both C and C++ compiles

0 commit comments

Comments
 (0)