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

Fix Mac installer issues #1212

Merged
merged 1 commit into from
May 30, 2019
Merged

Fix Mac installer issues #1212

merged 1 commit into from
May 30, 2019

Conversation

alameenshah
Copy link
Contributor

@alameenshah alameenshah commented May 28, 2019

Fix couple installer issues

  1. Mac installer relies on GVFS.Service to do the auto-mount of registered repos. When GVFS.Service gets launched (post installation) it (Service) calls gvfs mount in the background (without user interaction). In this case if the kext is not loaded, then mount will fail. Updating the installer to load kext would help in scenario. Also updated postflight script to log output of kextstat command that is used to determine if macOS autoloaded kext or not. A non empty output means kext got autoloaded or there was an error running kextstat.

  2. Don't install copy of "VFS For Git.app" in /usr/loca/vfsforgit directory.

Fixes #1210

@alameenshah alameenshah self-assigned this May 28, 2019
Copy link
Member

@jamill jamill left a comment

Choose a reason for hiding this comment

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

Thanks! Left a couple of questions, but seems reasonable overall. I will try this out when I get a chance.

KEXTPATH="/Library/Extensions/PrjFSKext.kext"
isKextLoadedCmd="/usr/sbin/kextstat -l -b $KEXTBUNDLEID | wc -l"
isKextLoaded=$(eval $isKextLoadedCmd)
if [ "$isKextLoaded" -eq 0 ]; then
Copy link
Member

Choose a reason for hiding this comment

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

Are there any error conditions we might have to account for here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

kextstat can return console output which can indicate couple things

  • macOS successfully auto-loaded our kext after install.
  • there was a kextstat error.

Updated postflight to logkextstat output, in case it was a kextstat error.

isKextLoaded=$(eval $isKextLoadedCmd)
if [ "$isKextLoaded" -eq 0 ]; then
loadCmd="/sbin/kextload \"$KEXTPATH\""
echo $loadCmd
Copy link
Member

Choose a reason for hiding this comment

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

In other places, it looks like we include a little more context around the operation, rather than just the command. Should we do that here as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a short comment with info on what we are trying to do.

@alameenshah alameenshah changed the title Fix installer auto-mount failure Fix Mac installer issues May 29, 2019
@alameenshah
Copy link
Contributor Author

/azp run GitHub VFSForGit Mac Functional Tests

@azure-pipelines
Copy link

No pipelines are associated with this pull request.

Mac installer relies on GVFS.Service to do the auto-mount of
registered repos. When GVFS.Service gets launched (post
installation) it (Service) calls gvfs mount in the background
(without user interaction). In this case if the kext is not
loaded, then mount will fail. Updating the installer to load
kext would help in scenario.

Also updated postflight script to log output of kextstat command
that is used to determine if macOS autoloaded kext or not. A non
empty output means kext got autoloaded or there was an error
running kextstat.

Fixes #1210
@alameenshah alameenshah requested review from jrbriggs and jamill May 29, 2019 14:38
@alameenshah alameenshah merged commit 4c13f0a into microsoft:master May 30, 2019
@jrbriggs jrbriggs added this to the M153 milestone May 30, 2019
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.

macOS installer: automount fails
4 participants