Skip to content
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

Trigger macOS gatekeeper check on install #1006

Merged
merged 6 commits into from
Aug 12, 2024
Merged

Conversation

davidanthoff
Copy link
Collaborator

Fixes #999.

@IanButterworth I don't even have a Mac to test this, can you give this a try?

@IanButterworth IanButterworth changed the title Trigger some Mac security thing on install Trigger macOS gatekeeper check on install Aug 9, 2024
@IanButterworth
Copy link
Sponsor Member

This didn't seem to improve initial load time and Pkg repl switch time on nightly.

@IanButterworth
Copy link
Sponsor Member

Is there a way to know for sure this ran and didn't error?

@davidanthoff
Copy link
Collaborator Author

You can comment the three lines that redirect the various pipes and then add something like ; println(\"done\"). I had tried that on Windows and it seemed that it successfully ran. But would be good to test on Mac too.

@davidanthoff
Copy link
Collaborator Author

Ah, wait! This won't run on nightly, I think. Can you try with the rc channel? But make sure that 1.11-rc2 is also not installed via some other channel.

@IanButterworth
Copy link
Sponsor Member

Will try shortly. Coincidentally this was just published https://9to5mac.com/2024/08/11/apple-hasnt-yet-fulfilled-this-macos-promise-from-4-years-ago/

@IanButterworth
Copy link
Sponsor Member

IanButterworth commented Aug 12, 2024

Just uninstalled and reinstalled 1.11, on a slower internet connection, and I still hit 20s first julia startup and ~30s Pkg repl load. Maybe the background process was still loading. As a user I just went to get on with using julia..

I am fast coming to the conclusion that on MacOS we should be shipping the notarized .dmg. It's the way apple intend packaging to work. Working around that seems to currently run foul of these slow internet checks, and may be undefined in the future.


Look how painful this is. Note that after ] I type immediately until Pkg loads. (In the video I accidentally used juliaup not ./juliaup but the effect is the same)

Screen.Recording.2024-08-12.at.1.20.42.PM.mov

@davidanthoff
Copy link
Collaborator Author

One more thing we could try: wait for the background process to finish during the install. That will add time to the install, but it is a very easy change and maybe worth trying?

I'm not in general opposed to shipping dmg, I'm just a bit worried about timelines for such a big change, I think ideally we would find some simpler fix for 1.11 and then we can still revisit.

@IanButterworth
Copy link
Sponsor Member

That sounds like a decent fix for now. I'd recommend that it prints a message to explain the delay though, as 1 minute, the worst I've seen, is quite a long time.

@davidanthoff
Copy link
Collaborator Author

@IanButterworth can you try this version of the PR? When I run this on Windows, the whole loading takes very little time, I'd say less than 5 seconds.

src/operations.rs Outdated Show resolved Hide resolved
Co-authored-by: Ian Butterworth <i.r.butterworth@gmail.com>
@IanButterworth
Copy link
Sponsor Member

IanButterworth commented Aug 12, 2024

This was on slow airport wifi. The notarization part took 12s. Also there was a ~10s delay after download before the first notarization message showed.

% time ./juliaup add 1.11
Installing Julia 1.11.0-rc2+0.aarch64.apple.darwin14
Notarizing standard library
Finished notarizing standard library
./juliaup add 1.11  45.61s user 5.51s system 25% cpu 3:22.36 total

@IanButterworth
Copy link
Sponsor Member

Ah, the prints are being done by julia.. that's why there's a 10s delay before the first, because gatekeeper is checking julia itself first.

Can the prints be done in rust?
Also, a one-liner is a little tidier?

Checking standard library notarization... done.

@davidanthoff
Copy link
Collaborator Author

@IanButterworth can you try again? I changed the output a bit. Also added a dot print per stdlib to show progress.

@IanButterworth
Copy link
Sponsor Member

Looks good. Took 20s

% time ./juliaup add 1.11
Installing Julia 1.11.0-rc2+0.aarch64.apple.darwin14
Checking standard library notarization............................................................done.
./juliaup add 1.11  35.70s user 4.72s system 29% cpu 2:18.11 total

I think it will make people ask what it is.. but in the mean time I can try help switch over to the .dmg.

@davidanthoff davidanthoff merged commit 250069f into main Aug 12, 2024
23 checks passed
@davidanthoff davidanthoff deleted the something-for-mac branch August 12, 2024 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Launch julia and load all stdlibs after install, to move any OS checks to install time
2 participants