-
Notifications
You must be signed in to change notification settings - Fork 339
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
supported_architecture not evaluated for uninstalls #1149
Comments
This is a bit trickier than it might sound at first pass. Filters or conditions on install are designed to make sure the correct version is installed based on what OS version is running or what processor architecture is available. But uninstalls are different -- we have to uninstall what is actually present, which may or may not match the version Munki would install if asked to. Examples: Machine is now running macOS 12, but still has Foo v1 installed. What if the uninstall process for Foo v2 won't properly uninstall Foo v1? We need to uninstall what's actually currently installed and not just use the uninstall info from the "latest" version of the item. The same concept can apply to supported_architectures. Bar 2.5 is available only as an Intel binary (or perhaps you've added only the Intel version to your Munki repo). You install it on your fleet, which includes Apple silicon machines. I do not disagree that processor architecture should be considered here: but it's not as simple as it might seem at first glance. |
Thanks for your time and thought on this matter.
I understand the scenarios and the complexities they present. I would,
however, consider those examples "admin created" situations where the
implementation could be modified using existing Munki behaviors to address
uninstalling at a different time in regard to the OS update, or
manipulating installcheck/preinstall scripts in the pkginfo for a newly
released Apple Silicon-specific version to address those complexities.
The issue I'm referring to is an internal issue where a script from a
pkginfo was used on a machine that the pkginfo was never intended to be
used on because it has a supported_architecture array set. For example, the
scenario could be that a vendor has a specific uninstall method/script for
intel that destroys data in a spot that it should not be destroyed on an
Apple Silicon installation. If one uninstallscript is used for both
platforms, that could lead to unexpected, or detrimental, consequences.
One _could_ argue that knowing how the uninstall currently behaves, the
situation can be, and I have, admin mitigated by creating an
uninstall_script that detects platform at run time and acts accordingly.
But, based on the intuitive model that the install process uses, it's not
clear that the uninstall process behaves differently.
I don't downplay the considerations that have to be made for it to be
addressed, but just pointing out they are distinct types of issues - admin
based vs code based.
…On Fri, Aug 5, 2022 at 4:01 PM Greg Neagle ***@***.***> wrote:
This is a bit trickier than it might sound at first pass.
Filters or conditions on *install* are designed to make sure the correct
version is installed based on what OS version is running or what processor
architecture is available. But uninstalls are different.
Examples:
Machine was running macOS 10.15 and Foo v1 was installed. Foo v2 is
released, and requires macOS 12.
Machine is upgraded to macOS 12, and at the same time, Foo is moved to
managed_installs.
Machine is now running macOS 12, but still has Foo v1 installed. What if
the uninstall process for Foo v2 won't properly uninstall Foo v1? We need
to uninstall what's actually currently installed and not just use the
uninstall info from the "latest" version of the item.
The same concept can apply to supported_architectures.
Bar 2.5 is available only as an Intel binary (or perhaps you've added only
the Intel version to your Munki repo). You install it on your fleet, which
includes Apple silicon machines.
Later the vendor releases an Apple silicon build of Bar 2.5, and you
import it into Munki. Since it's the same version, it's likely that Apple
silicon machines will still just have the Intel version of Bar 2.5.
Now you decide to remove it from one or more Apple silicon machines. If
the uninstall is different between Intel and Apple silicon, using the
uninstall method for the Apple silicon version would be the wrong thing to
do here, since the Intel version is actually installed. Again: we need to
uninstall what's actually currently installed and not just use the
uninstall info from whatever version we'd choose to install if this were a
managed_install.
I do not disagree that processor architecture should be considered here:
but it's not as simple as it might seem at first glance.
—
Reply to this email directly, view it on GitHub
<#1149 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/APR4CRVKVYGO7VSVKOIBYJLVXV6KXANCNFSM54W2IQPQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I have a software install that has both an
x86_64
architecture andarm
architecture import into Munki with the samename
. The install properly detects the architecture and installs the right agent, but when it comes to uninstalling the architecture is not evaluated. Instead, it is using a differentuninstall_script
than the one in its own pkginfo. At minimum, an uninstall script from a different pkginfo should not be used.When the item is added as a
managed_install
to the manifest, it is detected properly as seen I themanagedsoftwareupdate
log output:After letting the software install and moving the item to a
manage_uninstall
in the manifest, themanagedsoftwareupdate
logs don't reference the architecture at all during uninstall evaluation:And in the
/Library/Managed Installs/InstallInfo.plist
we can see that theuninstall_script
is not referencing the same file or pkg receipt as seen in the log output when the product was detected for install above.The text was updated successfully, but these errors were encountered: