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

Nudge for Ventura Delta updates #417

Open
anuj530 opened this issue Oct 26, 2022 · 14 comments
Open

Nudge for Ventura Delta updates #417

anuj530 opened this issue Oct 26, 2022 · 14 comments

Comments

@anuj530
Copy link

anuj530 commented Oct 26, 2022

As you may already know, macOS Ventura will be offered as a delta update on macs running 12.3+. On managed machines, it will be offered as a delta after 30 days of Ventura release date.

While testing Nudge on an un-managed mac where I was able to see the delta update, I noticed that when I have attempttoFetchMajorUpgrade key set to false Nudge will show the following in the logs:

_Device requires major upgrade but attemptToFetchMajorUpgrade is False - skipping download
 Unable to find major upgrade application, exiting Nudge_

If I set attempttoFetchMajorUpgrade key to true, Nudge downloads the full app installer. I also noticed that Under the software update preference pane, offered update also changed from Delta to full app installer as soon as Nudge started downloading the installer. This is not ideal because standard user accounts on macs would not be able to perform this upgrade since the full app installer requires admin rights to install.

Basically, on MDM-managed macs, after 30 days, devices running 12.3 to 12.6 will treat the Ventura update as a minor update.

Nudge needs to be able to present users with just the software update pane without actually expecting an app installer bundle to open for a major upgrade. OR Nudge needs to be able to download the delta update as it can do with minor updates.

@kevinmcox
Copy link
Contributor

I'd clarify that once we get through this one-time-only initial 30 day delay of the delta-upgrades:

"macOS 12.3+ will treat the Ventura upgrade the same a minor update with no app needing to be downloaded."

@pro4tlzz
Copy link
Contributor

pro4tlzz commented Oct 26, 2022

https://github.com/macadmins/nudge/blob/main/Nudge/Utilities/SoftwareUpdate.swift#L56

This is because Nudge calls softwareupdate with the --fetch-full-installer option when looking for a major upgrade. I missed this during my testing.

I think in this case add another code path to check the required OS >= 13 and call softwareupdate with the delta option instead, although I'm not sure on the actual verb for that.

Maybe there is a way we can detect softwareupdate is capable of offering delta updates.

@colorenz
Copy link
Contributor

colorenz commented Oct 27, 2022

Hi for jamf users there can be a workarround. You can use the actionButtonPath to run jamf self service policy and with that policy you can open software update from the System Settings :D

@dan-snelson has posted a working config.
https://macadmins.slack.com/archives/C02KPHZ7MDX/p1666831304360389?thread_ts=1666817887.774279&cid=C02KPHZ7MDX

@pro4tlzz maybe its good if we can also use disableSoftwareUpdateWorkflow to disable all Major softwareupdate workflows. So Nudge will not try to run it and only prompt the User.

@anuj530
Copy link
Author

anuj530 commented Oct 27, 2022

@colorenz sure we can do that, but the whole point of delta updates is we dont have to push out 12GB installers

@colorenz
Copy link
Contributor

With that workflow you can use it also for the delta Updates. In you jamf policy you run that command to open System preferences.

open 'x-apple.systempreferences:com.apple.preferences.softwareupdate'

@Lotusshaney
Copy link

Infact if you don’t want to open Jamf you can just use the path to the Softwareupdate.prefpane as the url.

/System/Library/PreferencePanes/Softwareupdate.prefpane I believe. I tested it today and it works all the way back to at least 11.x

@anuj530
Copy link
Author

anuj530 commented Oct 28, 2022

@colorenz @Lotusshaney thats a great workaround idea! let me give that a shot today! Thank you!

@donmontalvo
Copy link

With that workflow you can use it also for the delta Updates. In you jamf policy you run that command to open System preferences.

open 'x-apple.systempreferences:com.apple.preferences.softwareupdate'

I love how this method actually brings it to the front, and without any errors! Kudos!

@erikng
Copy link
Member

erikng commented Dec 29, 2022

Any suggestions for tackling this within nudge instead of workarounds?

@kevinmcox
Copy link
Contributor

@erikng How complicated would it be to have Nudge use the current OS version to evaluate how to proceed?

If 12.3 or higher use the same workflow for both minor updates and major upgrades.

If 12.2.1 or lower behave like it currently does.

@erikng
Copy link
Member

erikng commented Jan 2, 2023

Unsure but doesn't it also depend on how many days it's been since the OS released + if device is mdm enrolled?

@kevinmcox
Copy link
Contributor

The MDM enrollment changing the behavior of delta upgrades was a one-time thing that has now expired, so we don't have to consider that any longer.

@nider
Copy link

nider commented Jan 10, 2023

I encountered this exact issue today where I wanted users to use the Ventura delta update if available, I initially tried to configure Nudge to not attempt to download the major update, but quickly discovered that just caused Nudge to skip showing its UI if it detected the upgrade was a major upgrade.

Thanks to the suggestions here I was able to develop a slightly different workaround, which is to set majorUpgradeAppPath to /System/Library/CoreServices/Software Update.app. This has the affect of both causing Nudge to not attempt to download the full installer as the configured path already exists on disk, and directs the user to (loads) the Software Update settings pane when Update Device is clicked.

With this I achieved exactly the behaviour I was looking for.

Edit: of course I discover after I posted this, that I re-invented the wheel with many other people discovering or suggesting the same.

@kevinmcox
Copy link
Contributor

I wrote up the two primary workaround methods shared by the community in case it'll be helpful to anyone else coming across this issue before it is resolved: https://www.kevinmcox.com/2023/01/configuring-nudge-for-macos-delta-upgrades/

lucascantor added a commit to lucascantor/FamilyConfigProfiles that referenced this issue Dec 4, 2023
Use built-in software update pane as `majorUpgradeAppPath` and `actionButtonPath`
- [per new documented Nudge best practices](macadmins/nudge#417), because macOS upgrades no longer download as standalone apps

Stop attempting to download macOS upgrade app or minor updates via Apple's buggy `softwareupdate` binary

Also remove non-custom values, and use defaults instead
lucascantor added a commit to lucascantor/FamilyConfigProfiles that referenced this issue Dec 4, 2023
Use built-in software update pane as `majorUpgradeAppPath` and `actionButtonPath`
- [per new documented Nudge best practices](macadmins/nudge#417), because macOS upgrades no longer download as standalone apps

Stop attempting to download macOS upgrade app or minor updates via Apple's buggy `softwareupdate` binary

Also remove non-custom values, and use defaults instead
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

No branches or pull requests

8 participants