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

Test macOS installer for brave-core; ensure silent install possible #1539

Closed
bsclifton opened this issue Oct 11, 2018 · 2 comments
Closed

Test macOS installer for brave-core; ensure silent install possible #1539

bsclifton opened this issue Oct 11, 2018 · 2 comments

Comments

@bsclifton
Copy link
Member

We'll want to try (via CLI) one of the installers (PKG or DMG) on macOS to ensure we can do a silent install. We can capture the exact shell command ran here too

If (for some reason) we run into problems doing that, we can ask folks who may be familiar with the installer (ex: @simonhong or @emerick) for help 😄

@bsclifton
Copy link
Member Author

bsclifton commented Oct 17, 2018

PKG would be the easier choice (since automating a DMG involves using tools like hdiutil to mount the image)

Unfortunately, it seems that Admin privs are going to be required to automate the PKG install. I believe typical installations would like like this:
sudo installer -pkg Brave-Browser.pkg -target /

However, we can extract the contents of the PKG like so:
pkgutil --expand Brave-Browser.pkg /destination/here

I don't know if it's possible to extract the contents to /Applications though. Will need to do some testing. I'll also try the installer command without sudo and see how that works out

@bsclifton bsclifton reopened this Oct 17, 2018
@bsclifton
Copy link
Member Author

bsclifton commented Oct 17, 2018

Confirmed you need admin to run installer:

$ installer -pkg "/Users/clifton/Desktop/Brave-Browser.pkg" -target /
installer: Must be run as root to install this package.

So trying another route:

cd ~/Desktop
wget https://github.com/brave/brave-browser/releases/download/TAG-GOES-HERE/Brave-Browser.pkg
pkgutil --expand-full /Users/clifton/Desktop/Brave-Browser.pkg ./temp
mv ./temp/Payload/Brave\ Browser.app/ /Applications/
open -a /Applications/Brave\ Browser.app/

This approach worked great 😄

The downside to this approach is that it doesn't run the postinstall script (which gets extracted to ./temp/Scripts/postinstall in the example above). This script is used for the referral program (which doesn't matter in the context of migrating from Muon, since we already have a download ID, captured with #1294)... but it also does set the application permissions, in /Applications/. With this approach, it sets the permissions like so:

drwxr-xr-x   3 clifton  staff    96B Oct 17 14:11 Brave Browser.app

So we'd need to execute a few lines from the postinstall script to have parity (ex: group should be admin)

@bbondy bbondy removed this from the Muon => Brave Core migration milestone Oct 30, 2018
@bsclifton bsclifton modified the milestones: 0.57.x - Beta, Dupe / Invalid / Not actionable Nov 29, 2018
@bbondy bbondy removed this from the Dupe / Invalid / Not actionable milestone May 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants