kc9wwh / macOSUpgrade

Workflow for doing in-place upgrades.
Other
418 stars 103 forks source link

Packing the OS Installer #90

Closed brodriguez255 closed 5 years ago

brodriguez255 commented 5 years ago

Tried to user Composer to create a package for macOS 10.14.2. Created the package successfully, but was not able to install from the package.

The suggested command for cli was a great start, but I made a few modifications that helped me out a lot.

Step 1: Change Permissions

Once you've got the installer sitting in /Applications, change the permissions to the app.

chmod -R 755 Install macOS Mojave.app

Step 2: Build the Package and Preserve Permissions

Running this will build the package and preserve the permissions that you applied with the chmod.

pkgbuild --install-location /Applications/ --component "/Applications/Install macOS Mojave.app" --ownership preserve "/Applications/PACKAGE_NAME.pkg"

kc9wwh commented 5 years ago

Hey @brodriguez255 -

Glad you were able to get this to work, but I am curious why you needed to preserver permissions as this shouldn't be needed?

brodriguez255 commented 5 years ago

hey @kc9wwh ,

Thanks for getting back to me. After performing the chmod permissions and building the package without preserving the permissions, The installer wouldn't run saying I didn't have the permissions for it. The only way I could run the installer after packaging it was if I using the --ownership preserve piece from the pkgbuild.

kenchan0130 commented 5 years ago

We have two choices.

  1. Grant privileges when making packages
  2. Use post_install.sh to change permissions when executing pkg

I think that option 1 is reasonable to realize. Therefore, it may be good to mention it in the readme for me.

kenchan0130 commented 5 years ago

It was supported by https://github.com/kc9wwh/macOSUpgrade/pull/89 and https://github.com/kc9wwh/macOSUpgrade/pull/109. Thank you for your contribution!