HomePhorge

Build a Rake task for building Apple Packages
6c14a28e933cUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Build a Rake task for building Apple Packages

The goal is to have our release managers build all Puppet packages
within Rake, and so this commit adds a rake task (apple_package) that
will build a DMG-encapsulated package for OS X and put it into the
pkg/apple directory off of the Puppet Root.

To accomplish this goal, a folder structure is created in
/tmp/puppet/puppet-#{version} that mirrors the structure needed for
Apple's Packagemaker CLI tool to build a package for OS X. Next, the
necessary files are copied from the Puppet source into the structure in
/tmp/puppet/puppet-#{version} and then packagemaker is run
(targeting that folder structure) to build an initial package. Hdiutil
then encapsulates that package into a DMG, and the file is finally
copied into the pkg/apple directory.

In order to support 10.4 (which will be dropped in 2.8.x), we must
install puppet into /usr/lib/ruby/site_ruby/1.8 as opposed to
/Library/Ruby/Site/1.8. The prototype.plist file we bundle with the
package we create sets the IFPkgFlagFollowLinks key to true, so as long
as the symlink exists the package we build will respect it.

There IS a bug in OS X
(http://openradar.appspot.com/9202152) where the symlink in
/usr/lib/ruby/site_ruby is incorrect PRIOR to the first time the OS is
booted, but the symlink gets fixed at first boot. Users who build a
previously-unbooted-pristine-image of OS X and who also intend to
install Puppet on that image BEFORE it is booted may need to modify
their package to target /Library/Ruby/Site/1.8, however we cannot do
this at this time as OS X 10.4 DOES NOT have a /Library/Ruby/Site/1.8
folder.

Provide feedback about where package was created.

Packagemaker outputs a line that says "created: ..." and lists where the
package was created. The rake task moves the package to pkg/apple, so we
should provide feedback that this is happening.

Details

Provenance
Gary Larizza <gary@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUa7a10f6c2351: Merge branch '2.6.x' into 2.7.x
Branches
Unknown
Tags
Unknown

Event Timeline

Gary Larizza <gary@puppetlabs.com> committed rPU6c14a28e933c: Build a Rake task for building Apple Packages (authored by Gary Larizza <gary@puppetlabs.com>).Jan 10 2012, 11:33 PM