[11u] backport JDK-8240972: macOS codesign fail on macOS 10.13.5 or older
Junyuan Zheng
Junyuan.Zheng at microsoft.com
Tue Mar 17 18:22:14 UTC 2020
Hi,
I would like to backport JDK-8240972
("macOS codesign fail on macOS 10.13.5 or older") to 11u.
The original patch cannot be applied to 11u directly because of the change JDK-8239708 (https://bugs.openjdk.java.net/browse/JDK-8239708).
And here is the diff based on the current code:
```
--- a/make/autoconf/basics.m4
+++ b/make/autoconf/basics.m4
@@ -1228,12 +1228,25 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
AC_MSG_CHECKING([if codesign certificate is present])
$RM codesign-testfile
$TOUCH codesign-testfile
- $CODESIGN -s "$MACOSX_CODESIGN_IDENTITY" codesign-testfile 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD || CODESIGN=
+ $CODESIGN -s "$MACOSX_CODESIGN_IDENTITY" codesign-testfile 2>&AS_MESSAGE_LOG_FD \
+ >&AS_MESSAGE_LOG_FD || CODESIGN=
$RM codesign-testfile
if test "x$CODESIGN" = x; then
AC_MSG_RESULT([no])
else
AC_MSG_RESULT([yes])
+ # Verify that the codesign has --option runtime
+ AC_MSG_CHECKING([if codesign has --option runtime])
+ $RM codesign-testfile
+ $TOUCH codesign-testfile
+ $CODESIGN --option runtime -s "$MACOSX_CODESIGN_IDENTITY" codesign-testfile \
+ 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD || CODESIGN=
+ $RM codesign-testfile
+ if test "x$CODESIGN" = x; then
+ AC_MSG_ERROR([codesign does not have --option runtime. macOS 10.13.6 and above is required.])
+ else
+ AC_MSG_RESULT([yes])
+ fi
fi
fi
BASIC_REQUIRE_PROGS(SETFILE, SetFile)
```
I also need a sponsor for this patch. Please let me know what you think.
Thanks,
Junyuan
More information about the jdk-updates-dev
mailing list