GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — tools: added support for notarytool for osx notarization by UlisesGascon · Pull Request #48701 · nodejs/node

Conversation

@UlisesGascon

@UlisesGascon UlisesGascon commented Jul 8, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Main Changes

  • Encapsulated gon to be used only when notarytool is not available (Xcode version < 13.0)
  • Added notarytool pkg submission by using user, pass, teamId combination.

How to test this code?

There is a cloned job in the ci-release named testing-new-osx-notarization-ojs+release where you can build with parameters as always. Please always use disttype: test.

As an example:

The Build 14 is passing. see. The pkg files are working fine

Screenshot 2023-09-15 at 20 37 15

The output from the Jenkins process is the expected:

Screenshot 2023-09-15 at 20 36 26

Notes

In order to properly work is required to include a new environmental variable NOTARIZATION_TEAM_ID in the Jenkins job, this data is not sensitive information.

I am a bit rusty in bash, so feel free to improve the script. Only the linter steps are relevant in the CI validation for this PR.

This is working with the existing credentials (NOTARIZATION_PASSWORD and NOTARIZATION_ID) so there is no breaking changes in the credentials for gon

Context

TL;DR:

By November 1, 2023, we should be able to use notarytool to notarize Node.js. Currently, we use gon, but there is no support for notarytool yet. Additionally, we want to replace gon as notarytool currently provides the option to wait for the notarization to be completed with the argument --wait.

  • Fix Action required by Apple: Transition to the notarytool command-line utility build#3385.
  • CC: @nodejs/build

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
UlisesGascon added 2 commits July 8, 2023 13:26
@UlisesGascon
tools: limit MacOS notarization with gon to Xcode version < 13.0
95ccc14
Signed-off-by: Ulises Gascon <[email protected]>
@UlisesGascon
tools: added basic support for notarytool
7cc24d8
@nodejs-github-bot nodejs-github-bot added macos Issues and PRs related to the macOS platform. tools Issues and PRs related to the tools directory. labels Jul 8, 2023
@UlisesGascon
fix: typo
dc63135
@UlisesGascon
UlisesGascon marked this pull request as ready for review July 8, 2023 12:30
@UlisesGascon UlisesGascon mentioned this pull request Jul 8, 2023
Action required by Apple: Transition to the notarytool command-line utility nodejs/build#3385
Closed
UlisesGascon added 3 commits July 8, 2023 14:36
@UlisesGascon
chore: linting
43446db
@UlisesGascon
chore: linting
a25c08f
@UlisesGascon
chore: linting
6ef370b
tony-go
tony-go reviewed Jul 8, 2023
View reviewed changes
Comment thread tools/osx-notarize.sh Resolved

Uh oh!

There was an error while loading. Please reload this page.

@richardlau richardlau mentioned this pull request Sep 13, 2023
Preparation for Node.js v21.0.0 #49638
Closed
3 tasks done
@UlisesGascon
fix: update script credentials
3b7c993
@UlisesGascon

UlisesGascon commented Sep 13, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

We have a new job in the release CI to test this script: https://ci-release.nodejs.org/job/testing-new-osx-notarization-ojs+release/.

Next steps:

  • Consolidate the script
  • Check the binaries generated
  • remove the temporary job and merge this PR (after review)
  • Try the standard job with the new script and validate the binaries in a canary build

Thanks for the great pairing session @mhdawson!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

UlisesGascon added 6 commits September 14, 2023 13:18
@UlisesGascon
fix: update script xcode version evaluation
ec27e52
@UlisesGascon
fix: simplification and linting errors
9a6e60c
@UlisesGascon
fix: typo in command name
0e96609
@UlisesGascon
fix: add notarization team id
94ca883
@UlisesGascon
fix: arguments order
1e82540
@UlisesGascon
fix: environmental variables management
4cb6407
@UlisesGascon
UlisesGascon requested review from MoLow, mhdawson, richardlau, targos and tony-go September 15, 2023 18:46
mhdawson
mhdawson approved these changes Sep 15, 2023
View reviewed changes

@mhdawson mhdawson left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM, @UlisesGascon thanks for putting this together

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

UlisesGascon reacted with heart emoji
All reactions
  • ❤️ 1 reaction
@mhdawson

mhdawson commented Sep 15, 2023

Copy link
Copy Markdown
Member

To clarify for readers in terms of

By November 1, 2023, we should be able to use notarytool to notarize Node.js.

It is really By November 1, 2023 we must use notarytool so we need this PR landed and backported to all release lines before then.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@UlisesGascon

UlisesGascon commented Sep 15, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

To clarify for readers in terms of

By November 1, 2023, we should be able to use notarytool to notarize Node.js.

It is really By November 1, 2023 we must use notarytool so we need this PR landed and backported to all release lines before then.

I think that this will make imposible to notarize releases with macos10.15 since Nov, so we can repurpose/upgrade the hardware (release-nearform-macos10.15-x64-1 and release-orka-macos10.15-x64-1) and reconfigure the Jenkins jobs in separate PRs.

Screenshot 2023-09-15 at 21 05 03

Based on xcodereleases

Important: Node.js should/can be tested in macos 10.15, this only affect the release process

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jasnell
jasnell approved these changes Sep 16, 2023
View reviewed changes
@mhdawson mhdawson added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Sep 16, 2023
mhdawson pushed a commit that referenced this pull request Sep 28, 2023
@UlisesGascon @mhdawson
tools: use osx notarytool for future releases
e97d256
Signed-off-by: Ulises Gascon <[email protected]>

Refs: nodejs/build#3385
PR-URL: #48701
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
@mhdawson

mhdawson commented Sep 28, 2023

Copy link
Copy Markdown
Member

landed in e97d256

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mhdawson mhdawson closed this Sep 28, 2023
@richardlau

richardlau commented Sep 29, 2023

Copy link
Copy Markdown
Member

Maybe someone with a mac can verify if the https://nodejs.org/download/nightly/v21.0.0-nightly202309295570c29780/node-v21.0.0-nightly202309295570c29780.pkg macOS build was notarized? We didn't get a "Your Mac software was successfully notarized." email from Apple for v21.0.0-nightly202309295570c29780 but maybe that's a change with the use of the new tool?

FWIW https://ci-release.nodejs.org/job/iojs+release/9667/nodes=osx11-release-pkg/console succeeded but the parsed operation_id was empty:

08:08:23 sh tools/osx-notarize.sh v21.0.0-nightly202309295570c29780
08:08:23 objc[10383]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x202f4f490) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x10f3942b8). One of the two will be used. Which one is undefined.
08:08:23 objc[10383]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x202f4f4e0) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x10f394308). One of the two will be used. Which one is undefined.
08:08:23 Notarization process is done with Notarytool.
08:10:23 Notarization submitted. Operation ID: 
08:10:23 ssh node-www "mkdir -p nodejs/nightly/v21.0.0-nightly202309295570c29780"

node/tools/osx-notarize.sh

Lines 69 to 83 in 6aa7101

notarization_output=$(
xcrun notarytool submit \
--apple-id "$NOTARIZATION_ID" \
--password "$NOTARIZATION_PASSWORD" \
--team-id "$NOTARIZATION_TEAM_ID" \
--wait \
"node-$pkgid.pkg" 2>&1
)
if [ $? -eq 0 ]; then
# Extract the operation ID from the output
operation_id=$(echo "$notarization_output" | awk '/RequestUUID/ {print $NF}')
echo "Notarization submitted. Operation ID: $operation_id"
exit 0
else

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mhdawson

mhdawson commented Sep 29, 2023

Copy link
Copy Markdown
Member

I was able to install the sep 29th on my mac without any messages/complaints so looks to me like it worked. Would be good to get other people to install/test as well to be double sure.

richardlau reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@BethGriggs

BethGriggs commented Sep 29, 2023

Copy link
Copy Markdown
Member

Looks good to me:

$ /usr/local/bin/node --version                
v21.0.0-nightly202309295570c29780
$ spctl -a -vvv -t install /usr/local/bin/node
/usr/local/bin/node: accepted
source=Notarized Developer ID
origin=Developer ID Application: Node.js Foundation (HX7739G8FX)
richardlau reacted with hooray emoji
All reactions
  • 🎉 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Sep 30, 2023
CI Reliability 2023-09-30 nodejs/reliability#679
Open
CI Reliability 2023-10-01 nodejs/reliability#680
Open
@mhdawson mhdawson removed dont-land-on-v18.x labels Oct 2, 2023
@mhdawson

mhdawson commented Oct 2, 2023

Copy link
Copy Markdown
Member

Looks good in terms of nightlies, removed the don't land tags

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@richardlau richardlau added the lts-watch-v18.x label Oct 2, 2023
@RafaelGSS RafaelGSS mentioned this pull request Oct 9, 2023
2023-10-17, Version 21.0.0 (Current) #49870
Merged
@UlisesGascon UlisesGascon mentioned this pull request Oct 19, 2023
tools: drop support for osx notarization with gon #50291
Merged
@richardlau richardlau added the lts-watch-v20.x label Oct 19, 2023
@targos targos added backported-to-v18.x and removed lts-watch-v18.x labels Oct 28, 2023
targos pushed a commit that referenced this pull request Oct 28, 2023
@UlisesGascon @targos
tools: use osx notarytool for future releases
014b65e
Signed-off-by: Ulises Gascon <[email protected]>

Refs: nodejs/build#3385
PR-URL: #48701
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
richardlau pushed a commit that referenced this pull request Nov 7, 2023
@UlisesGascon @richardlau
tools: use osx notarytool for future releases
3b1c15a
Signed-off-by: Ulises Gascon <[email protected]>

Refs: nodejs/build#3385
PR-URL: #48701
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
@targos targos mentioned this pull request Nov 12, 2023
v20.10.0 release proposal #50682
Merged
@targos targos added backported-to-v20.x and removed lts-watch-v20.x labels Nov 12, 2023
@UlisesGascon UlisesGascon mentioned this pull request Nov 13, 2023
tools: use OSX Keychain profile to notarize the releases #50715
Closed
@targos targos mentioned this pull request Nov 28, 2023
v18.19.0 release proposal #50953
Merged
@juanarbol juanarbol mentioned this pull request Dec 6, 2023
2023-12-06, N|Solid v5.0.1 Iron Release nodesource/nsolid#41
Merged
debadree25 pushed a commit to debadree25/node that referenced this pull request Apr 15, 2024
@UlisesGascon @debadree25
tools: use osx notarytool for future releases
41f56e9
Signed-off-by: Ulises Gascon <[email protected]>

Refs: nodejs/build#3385
PR-URL: nodejs#48701
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
@sercher
tools: use osx notarytool for future releases
768e954
Signed-off-by: Ulises Gascon <[email protected]>

Refs: nodejs/build#3385
PR-URL: nodejs/node#48701
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
@sercher
tools: use osx notarytool for future releases
352e6b8
Signed-off-by: Ulises Gascon <[email protected]>

Refs: nodejs/build#3385
PR-URL: nodejs/node#48701
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jasnell jasnell jasnell approved these changes
@anonrig anonrig anonrig approved these changes
@MoLow MoLow MoLow approved these changes
@targos targos Awaiting requested review from targos
@richardlau richardlau Awaiting requested review from richardlau
+2 more reviewers
@mhdawson mhdawson mhdawson approved these changes
@tony-go tony-go tony-go approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

macos Issues and PRs related to the macOS platform. tools Issues and PRs related to the tools directory.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Action required by Apple: Transition to the notarytool command-line utility

Uh oh!

There was an error while loading. Please reload this page.

10 participants

@UlisesGascon @mhdawson @nodejs-github-bot @richardlau @BethGriggs @jasnell @anonrig @MoLow @tony-go @targos
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.