Wishlist: 0 items

No products were added to the wishlist!

59, 13th main road, Jayanagar 4th block east, Bangalore - 560011
8310160443

Creating PAYLOAD-FREE Package

Here’s how we make a “true” payload-free package (that does not leave a receipt):

pkgbuild --nopayload --scripts /path/to/scripts_dir --identifier org.example.payloadfree --version 1.0 MyGreatPayloadFree.pkg

But payload-free packages built this way have a “feature” that can sometimes prove problematic. Flat packages built with pkgbuild using the --nopayload option do not leave receipts in the pkgutil database. This means it can be difficult to determine if a given payload-free package has already been installed on a given machine.

This is especially annoying with Munki: by default, when installing a package, Munki uses the package’s receipt(s) to determine whether or not the package has been installed. Without that receipt, and with no other information, Munki can’t tell if the package has been installed.

Fortunately, it’s trivial to make a pseudo-payload-free package that leaves a receipt. All we need to do is specify an empty payload!

 

and here’s a “pseudo” payload-free package that does leave a receipt:

mkdir empty
pkgbuild --root empty --scripts /path/to/scripts_dir --identifier org.example.payloadfree --version 1.0 MyGreatPayloadFree.pkg

That’s it! Instead of using the --nopayload option, we create an empty directory and point the --root option at it. The package is built with the empty payload, and when installed, the package leaves a receipt.

 

More info :

  1. https://managingosx.wordpress.com/2010/02/18/payload-free-package-template/
  2. https://derflounder.wordpress.com/2014/06/01/understanding-payload-free-packages/
  3. https://managingosx.wordpress.com/2015/05/20/pseudo-payload-free-pkgs-with-pkgbuild/
  4. https://derflounder.wordpress.com/2015/05/21/payload-free-package-creator-app-revisited/
  5. To learn more about packages : https://www.youtube.com/watch?v=oKxjxi9Eny8