Running macOS Catalina 10.15.6 (recently released) and the BigFix 9.5.14.73 installer won’t install the agent. In the middle of the install, it pops up the following message (that I’ve not seen before) and then fails:
"Installer" would like to access files in your Documents folder
The BESAgent.log file has nothing of particular interest:
Tue Jul 21 13:05:02 EDT 2020: preinstall: Package is: "/Users/me/here/BESAgent-9.5.14.73-BigFix_MacOSX10.7.pkg"
Tue Jul 21 13:05:02 EDT 2020: preinstall: Package Path is: "/Users/me/here"
Tue Jul 21 13:05:02 EDT 2020: preinstall: actionsite.afxm found in /Users/me/here and copied to /Library/Application Support/BigFix/BES Agent
Tue Jul 21 13:05:02 EDT 2020: preinstall: Stopping BESAgent
Tue Jul 21 13:05:17 EDT 2020: preinstall: Prepared to Install/Upgrade BESAgent
Tue Jul 21 13:06:29 EDT 2020: postinstall: Package is: "/Users/me/here/BESAgent-9.5.14.73-BigFix_MacOSX10.7.pkg"
Tue Jul 21 13:06:29 EDT 2020: postinstall: Package Path is: "/Users/me/here"
Tue Jul 21 13:06:29 EDT 2020: postinstall: No /Library/BESAgent/BESAgent.app found. Aborting
The prompt gives options of Don't Allow and OK. Neither option seems to make a difference.
After running the BESAgentUninstaller.sh script a couple times to make sure nothing’s been left behind, the installers for BESAgent 9.5.15.71 and 9.5.16.90 fail in the same fashion.
The BigFix installer for macOS is built as a “relocatable installer”, meaning that, if the installer does not find the software already installed in the expected location, it will look for it elsewhere on the hard drive and try to update it there. I had been working on re-packaging the BigFix installer and had extracted copies of several different versions on my hard drive. The BigFix installer stopped when it found a match and tried to upgrade that copy. The issue is that the BigFix installer expects that the agent has been installed in /Library/BESAgent and exits with an error when it doesn’t find it there.
The long term solution is that HCL really needs to build the macOS installer as non-relocatable.
The short term solution is for me to delete my extracted copies.
Does this have any negative consequences? Would this prevent installation on another volume? What do we change to do this?
This is something @hansen_m@rustymyers and others have run into before. It does seem like a good idea to fix it.
I would recommend filing an enhancement for this in the bigfix ideas portal with as much info as you can possibly provide, as well as a link to this forum post: HCL Software - Sign In
I thought this was fixed already in the latest installers. I can’t see any relocate reference in the Distribution XML for BESAgent-9.5.14.73-BigFix_MacOSX10.7.pkg. Where did you get that package?
…Oh wait, did you repackage the agent and enable relocate?
The BigFix installer does not actually permit installation on another volume. At least, the 9.5.14.73 installer that I’m currently testing only allows “Install for all users of this computer” and disallows “Install for me only” and :Install on a specific disk…". In addition, the postinstall script in the installer looks for a “/Library/BESAgent/BESAgent.app” file and fails if one does not exist:
clientDir="/Library/BESAgent"
clientAppDir="$clientDir/BESAgent.app"
appPList="/Library/Preferences/com.bigfix.BESAgent.plist"
######################################################################################
# Make Application directory what we need it to be
if [ ! -d "$clientAppDir" ]; then
Log "No $clientAppDir found. Aborting"
exit 1
fi
Granted, I understand that this is an odd case… how many computers will have an extracted copy of BESAgent.app somewhere else on their computer? It would make sense, however, to set an installer that is not relocatable to be not relocatable. It seems that HCL may have already done this on more recent installers, so I’ll stop now, satisfied.
# Function to remove 'relocate' tags
# This forces installer to place files in correct location on disk
def derelocatePacakge(distroPath):
# Open Distribution file passed to function
tree = ET.parse(distroPath)
# Get the root of the tree
root = tree.getroot()
# Should we add replocate?
relocate_pkg_ref = False
# Check each child
for child in root:
# If it's a pkg-ref
print "child: {}".format(child)
if child.tag == "relocate":
# Remove the whole child
root.remove(child)
# Remove old Distribution file
os.remove(distroPath)
# Write new Distribution file
tree.write(distroPath)