From 9e44ed2a23f322432b64ee1bb1b5bd93bf622906 Mon Sep 17 00:00:00 2001 From: kurt Date: Tue, 12 Mar 2013 04:39:42 +0000 Subject: [PATCH] - Update to 7u17 which contains multiple security corrections --- devel/jdk/1.7/Makefile | 21 ++--- devel/jdk/1.7/distinfo | 6 +- .../patch-jdk_make_java_nio_mapfile-bsd | 15 ---- .../patches/patch-jdk_make_sun_awt_Makefile | 21 ----- ..._native_java_net_PlainDatagramSocketImpl_c | 39 --------- ...dk_src_solaris_native_java_net_bsd_close_c | 87 ------------------- 6 files changed, 10 insertions(+), 179 deletions(-) delete mode 100644 devel/jdk/1.7/patches/patch-jdk_make_java_nio_mapfile-bsd delete mode 100644 devel/jdk/1.7/patches/patch-jdk_make_sun_awt_Makefile delete mode 100644 devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_net_PlainDatagramSocketImpl_c delete mode 100644 devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_net_bsd_close_c diff --git a/devel/jdk/1.7/Makefile b/devel/jdk/1.7/Makefile index f14e2f53926..26b5dc1ed9f 100644 --- a/devel/jdk/1.7/Makefile +++ b/devel/jdk/1.7/Makefile @@ -1,25 +1,22 @@ -# $OpenBSD: Makefile,v 1.60 2013/03/11 10:50:09 espie Exp $ +# $OpenBSD: Makefile,v 1.61 2013/03/12 04:39:42 kurt Exp $ SHARED_ONLY= Yes ONLY_FOR_ARCHS= i386 amd64 COMMENT-main= Java2(TM) SE Dev Kit v${V} COMMENT-jre= Java2(TM) SE Runtime Environment v${V} -V= 1.7.0.11 -B= b24 +V= 1.7.0.17 +B= b02 PKGNAME= jdk-${V} PKGNAME-main= jdk-${V} -REVISION-main= 2 PKGNAME-jre= jre-${V} -REVISION-jre= 2 EPOCH= 0 JDK_SRC= openjdk-7u6-fcs-src-b24-28_aug_2012.zip -PATCH_SET= openjdk-7u10-patch-set-20130117.zip -PATCH_SET2= openjdk-7u11-patch-set-20130118.zip +PATCH_SET= openjdk-7u17-patch-set-20130310.zip -DISTFILES= ${JDK_SRC} ${PATCH_SET}:1 ${PATCH_SET2}:1 -EXTRACT_ONLY= ${JDK_SRC} ${PATCH_SET} ${PATCH_SET2} +DISTFILES= ${JDK_SRC} ${PATCH_SET}:1 +EXTRACT_ONLY= ${JDK_SRC} ${PATCH_SET} DIST_SUBDIR= jdk CATEGORIES= devel/jdk java @@ -88,7 +85,7 @@ MAKE_ENV= ALT_BOOTDIR=${ALT_BOOTDIR} \ USERNAME=${USER} \ MILESTONE=fcs \ BUILD_NUMBER=${B} \ - JDK_UPDATE_VERSION=11 \ + JDK_UPDATE_VERSION=17 \ HOTSPOT_BUILD_JOBS=${HOTSPOT_BUILD_JOBS} #ALL_TARGET= debug_build @@ -129,9 +126,7 @@ post-extract: @cp -f ${FILESDIR}/PLATFORM_API_BSDOS_PCM.c \ ${WRKDIST}/jdk/src/solaris/native/com/sun/media/sound @cd ${WRKDIST} && \ - ${PATCH} -p0 -z .orig.u10 --quiet < ${WRKDIR}/${PATCH_SET:R} - @cd ${WRKDIST} && \ - ${PATCH} -p0 -z .orig.u11 --quiet < ${WRKDIR}/${PATCH_SET2:R} + ${PATCH} -p0 -z .orig.u17 --quiet < ${WRKDIR}/${PATCH_SET:R} @perl -pi -e 's|build-policy install-limited|build-policy install-unlimited|' \ ${WRKDIST}/jdk/make/javax/crypto/Makefile diff --git a/devel/jdk/1.7/distinfo b/devel/jdk/1.7/distinfo index 9ee9c8b6a0b..2707a294382 100644 --- a/devel/jdk/1.7/distinfo +++ b/devel/jdk/1.7/distinfo @@ -1,6 +1,4 @@ -SHA256 (jdk/openjdk-7u10-patch-set-20130117.zip) = r/GbRE1R6cNlWlnSaVY0jdoNG/z8bjOjnd0vFM8770k= -SHA256 (jdk/openjdk-7u11-patch-set-20130118.zip) = SukSTAlB8xRyftUus337lPTr8d4QhDuTG0zhCHYNQb0= +SHA256 (jdk/openjdk-7u17-patch-set-20130310.zip) = q1KGrZhGNuCum5hpw/nMj1altanADhT5QSckYI5852U= SHA256 (jdk/openjdk-7u6-fcs-src-b24-28_aug_2012.zip) = qbsNejvr3IJW/G97Ye2Ep5wU/P/NV3YXgBhDoB7CMfQ= -SIZE (jdk/openjdk-7u10-patch-set-20130117.zip) = 390615 -SIZE (jdk/openjdk-7u11-patch-set-20130118.zip) = 1303 +SIZE (jdk/openjdk-7u17-patch-set-20130310.zip) = 808897 SIZE (jdk/openjdk-7u6-fcs-src-b24-28_aug_2012.zip) = 103777502 diff --git a/devel/jdk/1.7/patches/patch-jdk_make_java_nio_mapfile-bsd b/devel/jdk/1.7/patches/patch-jdk_make_java_nio_mapfile-bsd deleted file mode 100644 index 5b536ab8832..00000000000 --- a/devel/jdk/1.7/patches/patch-jdk_make_java_nio_mapfile-bsd +++ /dev/null @@ -1,15 +0,0 @@ -$OpenBSD: patch-jdk_make_java_nio_mapfile-bsd,v 1.5 2013/01/24 23:14:54 kurt Exp $ ---- jdk/make/java/nio/mapfile-bsd.orig Thu Jan 24 17:05:39 2013 -+++ jdk/make/java/nio/mapfile-bsd Thu Jan 24 17:07:31 2013 -@@ -81,6 +81,11 @@ SUNWprivate_1.1 { - Java_sun_nio_ch_KQueue_identOffset; - Java_sun_nio_ch_KQueue_filterOffset; - Java_sun_nio_ch_KQueue_flagsOffset; -+ Java_sun_nio_ch_KQueueArrayWrapper_initStructSizes; -+ Java_sun_nio_ch_KQueueArrayWrapper_init; -+ Java_sun_nio_ch_KQueueArrayWrapper_register0; -+ Java_sun_nio_ch_KQueueArrayWrapper_kevent0; -+ Java_sun_nio_ch_KQueueArrayWrapper_interrupt; - Java_sun_nio_ch_KQueuePort_socketpair; - Java_sun_nio_ch_KQueuePort_interrupt; - Java_sun_nio_ch_KQueuePort_drain1; diff --git a/devel/jdk/1.7/patches/patch-jdk_make_sun_awt_Makefile b/devel/jdk/1.7/patches/patch-jdk_make_sun_awt_Makefile deleted file mode 100644 index 74cb4962d70..00000000000 --- a/devel/jdk/1.7/patches/patch-jdk_make_sun_awt_Makefile +++ /dev/null @@ -1,21 +0,0 @@ -$OpenBSD: patch-jdk_make_sun_awt_Makefile,v 1.6 2013/02/06 22:08:33 kurt Exp $ ---- jdk/make/sun/awt/Makefile.orig Wed Feb 6 14:59:12 2013 -+++ jdk/make/sun/awt/Makefile Wed Feb 6 14:59:35 2013 -@@ -123,8 +123,6 @@ OTHER_CFLAGS += -DMLIB_NO_LIBSUNMATH - OTHER_LDLIBS = $(JVMLIB) $(LIBM) $(LIBDL) - endif - --FILES_c += initIDs.c -- - ifeq ($(PLATFORM), bsd) - FILES_c = $(FILES_2D_c) - FILES_c += awt_LoadLibrary.c -@@ -138,6 +136,8 @@ FILES_c += awt_LoadLibrary.c - OTHER_CFLAGS += -DMLIB_NO_LIBSUNMATH - OTHER_LDLIBS = $(JVMLIB) $(LIBM) - endif -+ -+FILES_c += initIDs.c - - # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SOLARIS/LINUX - endif # PLATFORM diff --git a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_net_PlainDatagramSocketImpl_c b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_net_PlainDatagramSocketImpl_c deleted file mode 100644 index 15dd7383732..00000000000 --- a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_net_PlainDatagramSocketImpl_c +++ /dev/null @@ -1,39 +0,0 @@ -$OpenBSD: patch-jdk_src_solaris_native_java_net_PlainDatagramSocketImpl_c,v 1.6 2013/02/02 17:39:23 kurt Exp $ ---- jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c.orig Fri Feb 1 12:55:19 2013 -+++ jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c Fri Feb 1 12:56:25 2013 -@@ -1358,7 +1358,7 @@ static void setMulticastInterface(JNIEnv *env, jobject - * value is an InetAddress. - */ - #ifdef AF_INET6 --#if defined(__solaris__) || defined(MACOSX) -+#if defined(__solaris__) || defined(_ALLBSD_SOURCE) - if (ipv6_available()) { - mcast_set_if_by_addr_v6(env, this, fd, value); - } else { -@@ -1381,7 +1381,7 @@ static void setMulticastInterface(JNIEnv *env, jobject - * value is a NetworkInterface. - */ - #ifdef AF_INET6 --#if defined(__solaris__) || defined(MACOSX) -+#if defined(__solaris__) || defined(_ALLBSD_SOURCE) - if (ipv6_available()) { - mcast_set_if_by_if_v6(env, this, fd, value); - } else { -@@ -1464,7 +1464,7 @@ static void mcast_set_loop_v6(JNIEnv *env, jobject thi - static void setMulticastLoopbackMode(JNIEnv *env, jobject this, int fd, - jint opt, jobject value) { - #ifdef AF_INET6 --#if defined(__solaris__) || defined(MACOSX) -+#if defined(__solaris__) || defined(_ALLBSD_SOURCE) - if (ipv6_available()) { - mcast_set_loop_v6(env, this, fd, value); - } else { -@@ -2038,7 +2038,7 @@ Java_java_net_PlainDatagramSocketImpl_setTimeToLive(JN - } - /* setsockopt to be correct ttl */ - #ifdef AF_INET6 --#if defined(__solaris__) || defined(MACOSX) -+#if defined(__solaris__) || defined(_ALLBSD_SOURCE) - if (ipv6_available()) { - setHopLimit(env, fd, ttl); - } else { diff --git a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_net_bsd_close_c b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_net_bsd_close_c deleted file mode 100644 index 0e446880d1a..00000000000 --- a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_net_bsd_close_c +++ /dev/null @@ -1,87 +0,0 @@ -$OpenBSD: patch-jdk_src_solaris_native_java_net_bsd_close_c,v 1.3 2013/02/02 17:39:23 kurt Exp $ ---- jdk/src/solaris/native/java/net/bsd_close.c.orig Tue Aug 28 19:15:27 2012 -+++ jdk/src/solaris/native/java/net/bsd_close.c Fri Feb 1 13:06:28 2013 -@@ -345,7 +345,77 @@ int NET_Select(int s, fd_set *readfds, fd_set *writefd - * signal other than our wakeup signal. - */ - int NET_Timeout(int s, long timeout) { -+/* -+ * On MacOS X, poll(2) is not working correctly, so a select(2) based -+ * implementation is preferred. See -+ * -+ * http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7131399 -+ * -+ * However, on FreeBSD, the select(2) based implementation can cause -+ * crashes under load and poll(2) is preferred. See -+ * -+ * http://docs.freebsd.org/cgi/getmsg.cgi?fetch=215525+0+current/freebsd-java -+ * -+ * Other *BSD should adjust as appropriate. -+ */ -+#ifndef __APPLE__ - long prevtime = 0, newtime; -+ struct timeval t; -+ fdEntry_t *fdEntry = getFdEntry(s); -+ -+ /* -+ * Check that fd hasn't been closed. -+ */ -+ if (fdEntry == NULL) { -+ errno = EBADF; -+ return -1; -+ } -+ -+ /* -+ * Pick up current time as may need to adjust timeout -+ */ -+ if (timeout > 0) { -+ gettimeofday(&t, NULL); -+ prevtime = t.tv_sec * 1000 + t.tv_usec / 1000; -+ } -+ -+ for(;;) { -+ struct pollfd pfd; -+ int rv; -+ threadEntry_t self; -+ -+ /* -+ * Poll the fd. If interrupted by our wakeup signal -+ * errno will be set to EBADF. -+ */ -+ pfd.fd = s; -+ pfd.events = POLLIN | POLLERR; -+ -+ startOp(fdEntry, &self); -+ rv = poll(&pfd, 1, timeout); -+ endOp(fdEntry, &self); -+ -+ /* -+ * If interrupted then adjust timeout. If timeout -+ * has expired return 0 (indicating timeout expired). -+ */ -+ if (rv < 0 && errno == EINTR) { -+ if (timeout > 0) { -+ gettimeofday(&t, NULL); -+ newtime = t.tv_sec * 1000 + t.tv_usec / 1000; -+ timeout -= newtime - prevtime; -+ if (timeout <= 0) { -+ return 0; -+ } -+ prevtime = newtime; -+ } -+ } else { -+ return rv; -+ } -+ -+ } -+#else -+ long prevtime = 0, newtime; - struct timeval t, *tp = &t; - fdEntry_t *fdEntry = getFdEntry(s); - -@@ -414,4 +484,5 @@ int NET_Timeout(int s, long timeout) { - } - - } -+#endif - }