📜 ⬆️ ⬇️

Step-by-Step: Preparing Mac OS Installation Packages. Part one

Gartner analysts say the share of the Mac platform in the corporate sector is growing year by year. Therefore, the issue of centralized management of Mac packages in corporate environments is becoming increasingly relevant. What are the benefits of using centralized software management? Among them:

  1. the ability to install applications on a large number of clients with the same settings;
  2. minimizing the number of problems and incidents with software through the use of uniform standards for the preparation of installation packages;
  3. installation package installation does not require action from the user and any additional privileges.

The topic of software management is quite extensive. The above are only the most vivid and everyday examples. Therefore, in our company, the preparation of Mac OS installation packages is provided as a separate service.

Plan for the first part of the article:
')
  1. Formats, package types. In this section, we consider the types of packages and their structure.
  2. Overview of the most popular tools for the preparation of installation packages.

(under the cut a lot of photos)


1. Formats, package types

Consider one of the most well-known types of payload package :

image

Archive.bom is a binary file that contains a list of files for the entire project. To view the data, you can use Isbom in terminal.

Archive.pax.gz - displayed as a pax archive and compressed with the gzip tool.

Info.plist is an xml file containing default settings for the whole package. To view the contents, use the Property list Editor tool; you can also view the file with a text editor.

PkgInfo is a simple text file containing the file and type of creation of the entire package.

Resources is a language pack folder containing simple localization strings.

Meta-package
Contains several payload packages in one installation package (Contents / Packages). Meta package does not install files by itself. Instead, it contains components in the form of packages. In Meta package, you can install a separate package, which is required. Meta package is convenient for large software products when there are a large number of files that need to be distributed.

image

Flat-package
Flat-pack uses a structure different from previous ones. First, Contents does not contain info.plist and PkgInfo. Secondly, it keeps its payload and resource at the root level. And the distribution.dist file is just Distribution.

Flat-pack also uses a more compact format for payload. Each payload has 3 files. Bom file takes the place of Archive.bom. The Payload file replaces Archive.pax.gz, and the PackageInfo replaces XML, PkgInfo. Flat-package keeps installation scripts differently. Pre-install, post-install action s become payload action. Payload consists of the main package name and the action type.

image

Bom - contains a list of paths and files for the entire project.

Payload - files packed into cpio.tgz archive.

PackageInfo - contains information about the package.

Distribution - describes which components will be installed on the system.

Resources is a language pack folder containing simple localization strings.

2. Overview of packaging tools

To date, there are many tools to create a package for Mac OS. We will look at several of the most famous:

Iceberg
Free tool designed by Stéphan Sudre. Very popular among Mac OS X administrators. You can create a package and metapackage, does not support the creation of flat-packages. It has a friendly interface and is easy to use, there is detailed documentation of the use of the tool on the site. There is also support for creating packages from the file system via snapshot. To date, the available version 1.2.9 (not updated since 2010) can be downloaded .

Package maker
Package Maker can also be downloaded from the official Apple website and is considered one of the most reliable and frequently used of all existing tools. Microsoft, in particular, gives preference to this tool and shows its solutions in the environment of Package Maker. The tool is included in the developer tool set (Xcode). Package Maker allows you to create Single Package, Metapackage and Distribution package. A feature of this tool is the creation of snapshots (snapshot) of the file system at some point, which is useful because it allows you to find the difference in the files. On Mac OS Package Maker is located in / Developer / Applications / Utilities.

Composer from JAMF Software
A handy tool that allows you to make a package in the following formats: .pkg, .mpkg, .dmg. Also, it can take pictures of the file system for further comparison of the difference. He has good documentation in English. In turn, JAMF Software conducts training and certification for its products, and, importantly, there is a forum where you can find a lot of tips on creating packages in the Composer environment. This tool is paid and today costs $ 99.95 (Commercial version) and $ 79.95 (Education version). You can also download a trial version by filling out the request trial form.

In the second part of the article, we will demonstrate how to create a package in the Package Maker environment.

Posted by: Eduard123

Source: https://habr.com/ru/post/256977/


All Articles