Giter Site home page Giter Site logo

createosxinstallpkg's Introduction

Munki

Managed software installation for macOS

Introduction

Munki is an open source project originated by Walt Disney Animation Studios.

Munki is a set of tools that, used together with a webserver-based repository of packages and package metadata, can be used by macOS administrators to manage software installs (and in many cases removals) on macOS client machines.

Munki can install software packaged in the Apple package format and software distributed in "drag-and-drop" disk images.

Additionally, Munki can install many Apple Software Updates on Intel Macs, and can prompt users to install pending Apple updates on both Intel and Apple silicon.

Munki is currently in use at organizations all over the world, managing software for tens of thousands -- perhaps hundreds of thousands of Macs.

Get started

Get started with Munki here: Getting Started with Munki

Check out the Wiki for some notes and documentation, and browse and/or check out the source. See the releases page for pre-built installer packages of supported releases.

Some video learning resources are here.

Get help

The wiki is an in-depth resource: https://github.com/munki/munki/wiki
Frequently Asked Questions are here: https://github.com/munki/munki/wiki/FAQ

If you have additional questions, or need even more help getting started, post a question to munki-discuss. Please don't post support questions as comments on wiki documentation pages, or as GitHub code issues.

Issues with MunkiWebAdmin should be discussed in its group: munki-web-admin.

createosxinstallpkg's People

Contributors

chilcote avatar fuzzylogiq avatar gregneagle avatar keeleysam avatar nmcspadden avatar timsutton avatar wildeep avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

createosxinstallpkg's Issues

macOS Sierra 10.12 not working but code seems present

Been trying to use your script to create working packages for Dell Kace K1000.

I've looked at the script's code, it says it's already updated to work with macOS Sierra 10.12. Even looked at the content of the .app file, and the file names and locations seem to be the same as previous versions.

When the script gets to this, it fails:

TMPDIR = tempfile.mkdtemp(dir='/tmp')
source = options.source or plist_options.get('Source')
source = source.rstrip('/')
if source.endswith('.app'):
if not os.path.isdir(source):
fail('%s doesn\'t exist or isn\'t an app!' % source)
installesd_dmg = os.path.join(
source, 'Contents/SharedSupport/InstallESD.dmg')
osinstall_mpkg = os.path.join(
source, 'Contents/SharedSupport/OSInstall.mpkg')
if (not os.path.exists(installesd_dmg) or
not os.path.exists(osinstall_mpkg)):
fail('%s doesn\'t appear to be an OS X installer application!'
% source)

Here is the command I'm entering: sudo ./createOSXInstallPkg --source /Applications/Install\ macOS\ Sierra\ Public\ Beta.app/
I've looked at the source mentioned in the code, Contents/SharedSupport/InstallESD.dmg, and it exists.

Is there something that can be done on my end to make sure it works or the code needs to be updated/modified to work with 10.12 ?

Thanks!

Feature Request: .adtmpl support

In reading your post about the excellent new --make-fake-app feature, it struck me that some redundant work could potentially be avoided if createOSXinstallPkg could parse a list of packages in the AutoDMG template format. Altering the command from the post, it could look something like:

sudo ./createOSXinstallPkg --source /Applications/Install\ macOS\ Sierra\ Developer\ Beta.app --make-fake-app --plist /path/to/AutoDMG_VM.adtmpl

Since the AutoDMG and createOSXInstallPkg plists have a lot in common, it would make sense to parse it under the --plist option. In the example above, --source would override anything in the .adtmpl file (although you could also choose to just parse the Additional Packages and document that source was not supported).

Not enough space to copy all packages to InstallESD.dmg!

I try to add a package to 10.9.5,
why is warning about InstallESD.dmg,
if does not copy anything inside ?

sudo /Users/adam/Desktop/createOSXinstallPkg-master/createOSXinstallPkg --source /Volumes/10.9.5\ Mavericks/Install\ OS\ X\ Mavericks.app --pkg /Users/adam/Desktop/SecUpd2016-004Mavericks.pkg --output ~/Desktop/
Password:
Examining and verifying source...

InstallESD.dmg: /Volumes/10.9.5 Mavericks/Install OS X Mavericks.app/Contents/SharedSupport/InstallESD.dmg
OS Version: 10.9.5
OS Build: 13F34

Output path: /Users/adam/Desktop/InstallOSX_10.9.5_13F34_custom.pkg
Additional packages:

SecUpd2016-004Mavericks.pkg

Total additional package size: 362841 Kbytes

Checking available space on /Volumes/10.9.5 Mavericks/Install OS X Mavericks.app/Contents/SharedSupport/InstallESD.dmg...
Not enough space to copy all packages to InstallESD.dmg!
Available space: 112640 KBytes

Error message on 10.12.4 bundle

When running

sudo ./createOSXinstallPkg --source /Applications/Install\ macOS\ Sierra.app/

an error pops up of

Can't find brtool at /Applications/Install macOS Sierra.app/Contents/SharedSupport/InstallESD.dmg

Could be something new in the way Apple is packaging up these upgrade bundles.

Missing BaseSystem.dmg, macOS High Sierra 10.13

When attempting to run createOSXinstallPkg against the installer for macOS High Sierra I am getting the error "Missing BaseSystem.dmg in /Applications/Install macOS High Sierra.app". It looks like Apple has changed the location of BaseSystem.dmg. In 10.12, it was located inside the InstallESD.dmg disk image as a hidden dmg. It was at the root of the mounted disk image. It now appears to have been moved to outside of the InstallESD.dmg disk image.

How to create a Distribution PKG for El Capitan 10.11 Installer

I tried many times to add a Package "DisableSetupAssistent.pkg" to the Installer, but it dosen´t work. The Script in the PKG won´t execute at the Installation, the manual Install of the additional PKG work fine. I have read the Information for Yosemite, that only Distribution Packages will be supported. Mens this the same for El Capitan? I think yes, and i created a Distribution Package with the App "Packages", but it won´t work. A convert from a Jamf Composer FlatPackage was failed. How did you create those Packages to include this?

firmware-updates

Hi

Will this package run the firmware-updates that the app does?

I don't know if this is the right place to ask questions, if not it would be great if somebody could point me to the correct forum.

Thanks
Niklas

Macos Sierra package install fails with read-only mount

Hi,
I'm creating the package using the Macos Sierra beta package
When I install it on a 10.11.6 encrypted with FileVault 2, it fails with this error:

Aug 19 19:44:46 ops31 installd[387]: ./postflight: Traceback (most recent call last):
Aug 19 19:44:46 ops31 installd[387]: ./postflight: File "/Users/admin/Desktop/InstallOSX_10.12_16A293a_custom.pkg/Contents/Resources/postflight", line 1088, in
Aug 19 19:44:46 ops31 installd[387]: ./postflight: main()
Aug 19 19:44:46 ops31 installd[387]: ./postflight: File "/Users/admin/Desktop/InstallOSX_10.12_16A293a_custom.pkg/Contents/Resources/postflight", line 1080, in main
Aug 19 19:44:46 ops31 installd[387]: ./postflight: updateHelperPartitions(installvolumepath, install_data_path)
Aug 19 19:44:46 ops31 installd[387]: ./postflight: File "/Users/admin/Desktop/InstallOSX_10.12_16A293a_custom.pkg/Contents/Resources/postflight", line 820, in updateHelperPartitions
Aug 19 19:44:46 ops31 installd[387]: ./postflight: RPSdir = setupHelperPartition(mountpoint, install_data_path)
Aug 19 19:44:46 ops31 installd[387]: ./postflight: File "/Users/admin/Desktop/InstallOSX_10.12_16A293a_custom.pkg/Contents/Resources/postflight", line 761, in setupHelperPartition
Aug 19 19:44:46 ops31 installd[387]: ./postflight: shutil.copy(item, helper_root)
Aug 19 19:44:46 ops31 installd[387]: ./postflight: File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 119, in copy
Aug 19 19:44:46 ops31 installd[387]: ./postflight: copyfile(src, dst)
Aug 19 19:44:46 ops31 installd[387]: ./postflight: File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 83, in copyfile
Aug 19 19:44:46 ops31 installd[387]: ./postflight: with open(dst, 'wb') as fdst:
Aug 19 19:44:46 ops31 installd[387]: ./postflight: IOError: [Errno 1] Operation not permitted: '/private/tmp/PKInstallSandbox.LXLBtN/tmp/tmpsqY788/System/Library/CoreServices/boot.efi'

some debug print I added in the postinstall:

Aug 19 19:44:46 ops31 installd[387]: ./postflight: item: /OS X Install Data/boot.efi
Aug 19 19:44:46 ops31 installd[387]: ./postflight: mountpoint: /private/tmp/PKInstallSandbox.LXLBtN/tmp/tmpsqY788
Aug 19 19:44:46 ops31 installd[387]: ./postflight: install_data_path: /OS X Install Data
Aug 19 19:44:46 ops31 installd[387]: ./postflight: helper_root: /private/tmp/PKInstallSandbox.LXLBtN/tmp/tmpsqY788/System/Library/CoreServices
*** end debug print

So it fails trying to copy "/OS X Install Data/boot.ef"i to "/private/tmp/PKInstallSandbox.LXLBtN/tmp/tmpsqY788/System/Library/CoreServices"

When I check the mount point, I find that it is read-only:

$ mount
/dev/disk2s2 on /private/tmp/PKInstallSandbox.0Vpmg1/tmp/tmpbJvxWW/dmg.o50o99 (hfs, local, nodev, nosuid, read-only, noowners, nobrowse)

Any idea how I can solve this problem?
Thanks for your help,
Fuzzycheck

macOS 10.12/10.12.1 hdiutil Issue?

Hello,

A seemingly new issue. Since I upgraded my Mac to macOS 10.12/10.12.1, it seems that after I run createOSXInstallPkg the Install.ESD does not automatically unmount. After running the build (which works great), running it again gives an hdiutil error like:

Examining and verifying source... Error: "hdiutil: attach failed - Resource busy " while mounting InstallESD.dmg. Could not mount diskimage /Applications/Install macOS Sierra.app/Contents/SharedSupport/InstallESD.dmg
After I restart this is resolved. Is anyone else experiencing this error?

Thank you for this great tool. Any help would be greatly appreciated.

Shawn

Minor issue relating to trailing slashes

In the documentation (readme.md) there are no trailing slashes mentioned in usage examples. If a trailing slash is not used on a 10.11 install then the following is reported : "Install OS X El Capitan.app doesn't appear to be an OS X installer application!"

Adding a trailing slash (eg. "--source /Applications/Install OS X El Capitan.app/") will result in perfect operation.

This project is just excellent! Thanks for all the hard work on making it just work so well!

OS installation does not kick off after reboot - macOS Sierra

Hi,

I am trying to create Sierra OSXinstallPKG and so far I am not successful.

Package install successfully and asks for a restart, after the restart OS installation does not kick off automatically... instead it stays on the manual installation process asking to accept license and to select the volume to continue the installation.

I am using the latest createOSXinstallPKG script "Modified Aug 2016 for installs under SIP"

Please suggest if I am using the correct script for building the package ? or can I modify the script to automate the OS installation ?

Thanks,
Kumaresh

package installs successfully, but OS installation does not kick off after reboot.

Hi greg, I'm seeing an intermittant issue with deploying 10.10.1 using createOSXinstallPkg. In some installation attempts, the package created by createOSXinstallPkg will install successfully, but when the machine is rebooted, the OS installation does not actually begin. So far, each case has been solved by running the same pkg again- on the 2nd try, the installation does run. We're seeing this with probably 5-10% of attempted installations.
I haven't had any luck tracking down what's causing this in log files. Any ideas where I should start looking, or what might be going on here?

createOSXinstallPkg + First Boot Package Install Generator - install error- The package %@ is missing or invalid

Hi

I have noticed on certain machines during an upgrade when tailing the
install log i see the following error:

installer[60829]: External component packages (1) trustLevel=100 (trust
evaluation failed: Error Domain=PKInstallErrorDomain Code=106 "The package
“%@” is missing or invalid." UserInfo=0x7faee8cd74e0
{NSLocalizedDescription=The package “%@” is missing or invalid.,
identifier=com.googlecode.munki.installosx.pkg})

I used First Boot Package Install Generator to create distribution style
first boot package. I am not sure why its only happening on certain
machines.

Any idea?

full error report here: http://www.wepaste.com/installerror/

If prompted for pwd leave field blank.

run OsxInstallPkg with SIP enable

Hello,
I'm working on the project to create OSXInstallPKg
But want to ask expert here that: Have a way to around the context SIP enable. To run the install package in OSX EL Capitan. I do not want to disable SIP.

Thank

Error : Missing basesystem.dmg in high Sierra.app

Getting the mentioned error when I try to create vanilla OS pkg of High Sierra using the brtool guideline however same method works well with Sierra 10.12.6

basesystem.dmg is not missing in high Sierra.app it is there under shared support folder

createOSXInstallPkg-generated macOS Sierra installer is leaving `OS X Install Data` folder in root level of boot drive

I've noticed that a couple of macOS Sierra installers generated by createOSXInstallPkg are leaving behind an OS X Install Data folder on the root level of the boot drive.

I've observed this behavior with two separately generated macOS Sierra 10.12.0 build 16A323 installers:

  1. When using a stock createOSXInstallPkg-generated macOS Sierra installer with no added packages.
  2. When using a createOSXInstallPkg-generated macOS Sierra installer with added packages

Screenshot is attached.

screen shot 2016-09-23 at 3 05 05 pm

PHASE:Running package scripts

I have Deploystudio set up on a 10.11.5 machine. I get my computers to netboot to it no problem.
Created with createOSXinstallPkg
Deploystudio used to copy this in under 4 minutes and then the machine would reboot and start installing OS X 10.11.5. Now, it seems to be stuck and the log on the machine says something like
"2016-06-17 10:37:44.425 DeployStudio Runtime.bin[293:17608] installer:PHASE:Running package scripts"
But it never finishes. Does the same thing with a 10.10.5 package I used months ago successfully.
Any ideas why this isn't working?

Resulting pkg terminates with an error

I have tried several times and on several hosts to create a pkg for 10.11.6. I'm using very simple command (since more verbose commands failed as well) sudo /Users/localadmin/Documents/createOSXinstallPkg/createOSXinstallPkg --source /Users/localadmin/Documents/createOSXinstallPkg/Install\ OS\ X\ El\ Capitan.app/ --identifier com.apple.installosx.pkg. The error I get is: "The Installation failed. The installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance."

Please help, any assistance would be greatly appreciated.

Thank you

Automate install with DeployStudio or Munki tools

I'm using CreateOSXinstallPkg for months to automate the upgrade to OS X 10.10.x with DeployStudio 1.6.16 and 10.10.5 NetBoot set.
Now with 10.11 netBoot set and DeployStudio 1.7.1, the packages created by CreateOSXinstallPkg hang when it start the postflight even with 10.10 or 10.11 packages.
This is the installer log below:

Jan 20 16:20:45 mac-w89520wu64b installer[440]: Product archive /var/tmp/DSNetworkRepository/Packages/InstallOSX_10.10.5_14F27.pkg trustLevel=100
Jan 20 16:20:45 mac-w89520wu64b installer[440]: External component packages (1) trustLevel=100 (trust evaluation failed: Error Domain=PKInstallErrorDomain Code=106 "The package “%@” is missing or invalid." UserInfo={NSLocalizedDescription=The package “%@” is missing or invalid., identifier=com.googlecode.munki.installosx.pkg})
Jan 20 16:20:45 mac-w89520wu64b installer[440]: -[IFDInstallController(Private) _buildInstallPlanReturningError:]: location = file://localhost
Jan 20 16:20:45 mac-w89520wu64b installer[440]: -[IFDInstallController(Private) _buildInstallPlanReturningError:]: file://localhost/var/tmp/DSNetworkRepository/Packages/InstallOSX_10.10.5_14F27.pkg/
Jan 20 16:20:45 mac-w89520wu64b installer[440]: Set authorization level to root for session
Jan 20 16:20:45 mac-w89520wu64b installer[440]: Administrator authorization granted.
Jan 20 16:20:45 mac-w89520wu64b installer[440]: Will use PK session
Jan 20 16:20:45 mac-w89520wu64b installer[440]: Using authorization level of root for IFPKInstallElement
Jan 20 16:20:45 mac-w89520wu64b installer[440]: Starting installation:
Jan 20 16:20:46 mac-w89520wu64b installer[440]: Configuring volume "Macintosh HD"
Jan 20 16:20:46 mac-w89520wu64b installer[440]: Preparing disk for local booted install.
Jan 20 16:20:46 mac-w89520wu64b installer[440]: Free space on "Macintosh HD": 282.56 GB (282557243392 bytes).
Jan 20 16:20:46 mac-w89520wu64b installer[440]: Create temporary directory "/Volumes/Macintosh HD/Install.4407aznst"
Jan 20 16:20:46 mac-w89520wu64b installer[440]: IFPKInstallElement (1 packages)
Jan 20 16:20:46 mac-w89520wu64b installer[440]: PackageKit: Enqueuing install with framework-specified quality of service (utility)
Jan 20 16:20:46 mac-w89520wu64b installer[440]: PackageKit: ----- Begin install -----
Jan 20 16:20:46 mac-w89520wu64b installer[440]: PackageKit: request=PKInstallRequest <1 packages, destination=/Volumes/Macintosh HD>
Jan 20 16:20:46 mac-w89520wu64b installer[440]: PackageKit: packages=(
"PKJaguarPackage file://localhost/var/tmp/DSNetworkRepository/Packages/InstallOSX_10.10.5_14F27.pkg/"
)
Jan 20 16:20:47 mac-w89520wu64b installer[440]: PackageKit: Will do receipt-based obsoleting for package identifier com.googlecode.munki.installosx.pkg (prefix path=tmp)
Jan 20 16:20:47 mac-w89520wu64b installer[440]: PackageKit: Extracting file://localhost/var/tmp/DSNetworkRepository/Packages/InstallOSX_10.10.5_14F27.pkg/ (destination=/Volumes/Macintosh HD/.PKInstallSandboxManager/2D662639-705F-4280-95C2-BAE610DC5A29.activeSandbox/Root/tmp, uid=0)
Jan 20 16:20:47 mac-w89520wu64b installer[440]: PackageKit: Using system content trashcan path /Volumes/Macintosh HD/.PKInstallSandboxManager/2D662639-705F-4280-95C2-BAE610DC5A29.activeSandbox/Trashes for sandbox /Volumes/Macintosh HD/.PKInstallSandboxManager/2D662639-705F-4280-95C2-BAE610DC5A29.activeSandbox
Jan 20 16:20:47 mac-w89520wu64b installer[440]: PackageKit: Shoving /Volumes/Macintosh HD/.PKInstallSandboxManager/2D662639-705F-4280-95C2-BAE610DC5A29.activeSandbox/Root (1 items) to /Volumes/Macintosh HD
Jan 20 16:20:47 mac-w89520wu64b installer[440]: PackageKit: Executing script "./postflight" in /var/tmp/DSNetworkRepository/Packages/InstallOSX_10.10.5_14F27.pkg/Contents/Resources
Jan 20 16:24:28 mac-w89520wu64b installer[440]: Can not connect to /var/run/systemkeychaincheck.socket: No such file or directory

Has you can see, the script is blocked when it start the ./postflight.... and the last error appears 4 minutes after it hang.
No more log in install.log but the DS log continuously shows: "Installer:PHASE:Running packages scripts..." over and over... I've try to let it for hours but it never finish install....

I think this is a DeployStudio issue because the problem had appears in the last version (1.7.1), even with 10.10 package generated by CreateOSXinstallPkg, but have you an idea of what cause this behavior ?

Thanks for your help

Jerome

Installer changes OS language

The installer changes the language on the machine. Normal behaviour?

e.g. Upgrade a OS X 10.9 machine in german to OS X 10.11 and the machine is in english after the reboot. OSXInstallerPKG was created on a machine with OS X 10.11 with german as primary language. The installer app was downloaded from the same machine with a german Apple ID.

Blessing install data folder causes error and pkg install fails

Hi there,

We are testing on OSX 10.12.2 NBI created with AutoImagrNBI 1.3.4 with imagr.app 1.3.8.1, trying to install OSX 10.12.3.

The OSXInstall pkg fails to install and from install.log has error
'Could not set boot device properly: 0xe00002bc'
'Failed to bless OS X installer for startup: Command ... '

It seems the, '-setBoot' option on the, 'bless' command causes this.
If I run the pkg with the modified script removing the above option the package runs fine.

This however does not happen when we run the same package on the DeploymentStudio NBI. Is there a workaround or a fix for this?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.