Skip to content

JDK-8310321: make JDKOPT_CHECK_CODESIGN_PARAMS more verbose #14541

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

MBaesken
Copy link
Member

@MBaesken MBaesken commented Jun 19, 2023

We were running into some issues with the configure checks checking the codesign tool. Unfortunately the output is a bit limited and should be enhanced, especially printing what is really called.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8310321: make JDKOPT_CHECK_CODESIGN_PARAMS more verbose (Enhancement - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/14541/head:pull/14541
$ git checkout pull/14541

Update a local copy of the PR:
$ git checkout pull/14541
$ git pull https://git.openjdk.org/jdk.git pull/14541/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 14541

View PR using the GUI difftool:
$ git pr show -t 14541

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/14541.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 19, 2023

👋 Welcome back mbaesken! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Jun 19, 2023
@MBaesken
Copy link
Member Author

A related question, maybe someone has seen this ; we get

configure:150634: calling /usr/bin/codesign -s - /open_jdk/build_dir/configure-support/codesign-testfile
/open_jdk/build_dir/configure-support/codesign-testfile: Operation not permitted
configure:150640: checking if debug mode codesign is possible
configure:150646: result: no

In the checking code (this is already with enhanced output).
Has someone seen the same 'operation not permitted' output and was able to fix this ?

@openjdk
Copy link

openjdk bot commented Jun 19, 2023

@MBaesken The following label will be automatically applied to this pull request:

  • build

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the build build-dev@openjdk.org label Jun 19, 2023
@mlbridge
Copy link

mlbridge bot commented Jun 19, 2023

Webrevs

Copy link
Member

@erikj79 erikj79 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should print that command line all the time. I think it would be better to echo the command line into config.log using AS_MESSAGE_LOG_FD.

@MBaesken
Copy link
Member Author

Hi Erik, the added codesign tool calls are already printed into the rather verbose config.log.
In the main configure output we see only what we saw before

checking for macosx code signing mode... auto, default
checking for macosx code signing identity... openjdk_codesign, default
checking if codesign with hardened runtime is possible... no
checking if debug mode codesign is possible... no
checking for macosx code signing mode... disabled

@erikj79
Copy link
Member

erikj79 commented Jun 20, 2023

Hi Erik, the added codesign tool calls are already printed into the rather verbose config.log. In the main configure output we see only what we saw before

checking for macosx code signing mode... auto, default checking for macosx code signing identity... openjdk_codesign, default checking if codesign with hardened runtime is possible... no checking if debug mode codesign is possible... no checking for macosx code signing mode... disabled

With your patch, configure.log and my console has this output:

checking for macosx code signing identity... openjdk_codesign, default
configure: check codesign, calling /usr/bin/codesign -s - /Users/erik/dev/jdk/build/macosx-aarch64-debug/configure-support/codesign-testfile
checking if debug mode codesign is possible... yes
checking for macosx code signing mode... debug

I think printing the command line used to probe codesign fits in config.log but not in the console output. This is the model used by the builtin macros in autoconf, such as probing for compiler flags. You can achieve this by something like:

echo $CODESIGN $PARAMS $CODESIGN_TESTFILE > $AS_MESSAGE_LOG_FD

@MBaesken
Copy link
Member Author

Hi Erik, I agree that logging this to config.log is sufficient. I am not sure why this looked different on my setup.
I adjusted the output.

@openjdk
Copy link

openjdk bot commented Jun 20, 2023

@MBaesken This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8310321: make JDKOPT_CHECK_CODESIGN_PARAMS more verbose

Reviewed-by: erikj

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 14 new commits pushed to the master branch:

  • 4a9cc8a: 8309266: C2: assert(final_con == (jlong)final_int) failed: final value should be integer
  • 4e4e586: 8310194: Generational ZGC: Lock-order asserts in JVMTI IterateThroughHeap
  • e1906e7: 8310027: Fix -Wconversion warnings in nmethod and compiledMethod related code
  • 4ca548f: 8310326: Incorrect position of the synthetic unnamed class
  • a059576: 8310187: Improve Generational ZGC jtreg testing
  • 9a68ec8: 8219357: G1: G1GCPhaseTimes::debug_phase uses unnecessary ResourceMark
  • 0878872: 8310020: MacroAssembler::call_VM(_leaf) doesn't consistently check for conflict with C calling convention.
  • 79069c5: 8310314: Misplaced "unnamed classes are a preview feature and are disabled by default" error
  • 96a7db7: 8309228: Clarify EXPERIMENTAL flags comment in hotspot/share/runtime/globals.hpp
  • b2e86ae: 8304478: Initial nroff manpage generation for JDK 22
  • ... and 4 more: https://git.openjdk.org/jdk/compare/f8f8bfbea15de0a57415ba27ad5722b6a4add07a...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jun 20, 2023
@MBaesken
Copy link
Member Author

Hi Erik, thanks for the review !

@MBaesken
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Jun 21, 2023

Going to push as commit 9eed049.
Since your change was applied there have been 25 commits pushed to the master branch:

  • 3faba07: 8307145: windowsaccessbridge.dll erroneously includes private methods in its C API
  • 886ac1c: 8308606: C2 SuperWord: remove alignment checks when not required
  • 47d00a4: 8310265: (process) jspawnhelper should not use argv[0]
  • e022e87: 8310053: VarHandle and slice handle derived from layout are lacking alignment check
  • 45eaf5e: 8298443: Remove expired flags in JDK 22
  • 28415ad: 8310225: Reduce inclusion of oopMapCache.hpp and generateOopMap.hpp
  • 4c3efb3: 8309034: NoClassDefFoundError when initializing Long$LongCache
  • 1120106: 8310458: Fix build failure caused by JDK-8310049
  • 09174e0: 8310049: Refactor Charset tests to use JUnit
  • 99d2a9a: 8310330: HttpClient: debugging interestOps/readyOps could cause exceptions and smaller cleanup
  • ... and 15 more: https://git.openjdk.org/jdk/compare/f8f8bfbea15de0a57415ba27ad5722b6a4add07a...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jun 21, 2023
@openjdk openjdk bot closed this Jun 21, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jun 21, 2023
@openjdk
Copy link

openjdk bot commented Jun 21, 2023

@MBaesken Pushed as commit 9eed049.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

2 participants