Preparation of the Distribution

The package installation files cannot be distributed until the installation files in the master repository of the package have been prepared. This preparation consists essentially of compressing the current working revision and filing it in the revision directory.
There is a separate distribution process (thread) for distribution preparation.

After a package revision has been created or revised, this must first of all be prepared for distribution in the DSM environment.

Preparation entails the following actions:

  • Start preparation process in the DSMC
  • Create and update the STATUS files
  • Consistency check
  • Compression of package files

Start of the Preparation Process

In order for a package to be prepared for distribution, the task Preparing for Distribution must be carried out in the DSMC.
This action causes the current status "Must be prepared" to be written to the status file Project.status) of the package in the working directory.

The Preparing for Distribution process automatically runs as a background process. The user does not have to wait for the process to be completed.

Preparation Process.

The relevant distribution process checks at regular, configurable intervals whether the status file Project.status has changed, independently of the execution of the Preparing for Distribution task.

If the status file contains the status Must be prepared, the package files for the distribution will be compressed (apart from MSI and OS packages) and the status files Comp.Project.status and Project.status will be created or updated. Only when this action is complete can actual distribution of the package files commence.

During the Preparing for Distribution process, an "integrity file" package.fpi (file package index) is created. This contains information on all the package files.

In addition, a file package.fpi.checksum is created (only in the original copy of the repository), which contains the SHA-256 checksum of the package.fpi file. The package.fpi.checksum file is not used for the distribution, but only for examining the package downloads to the respective client.

Consistency Check

The distribution mechanism checks if the package files have been correctly distributed. Two procedures are combined:

  • CRC (Cyclic Redundancy Check) and SHA-256 (Secure Hash Algorithm)
    The checksum is saved during distribution preparation in file package.fpi and, depending on configuration, is checked after every distribution step.

    You can increase the reliability by selecting the option Check mechanism = Extended. In this case, after the writing is over, a checksum is again calculated and compared with the checksum contained in the package.fpi file.

    The distribution mechanism calculates the SHA-256 checksum of the file package.fpi and saves it in the additional file package.fpi.checksum. This checksum is stored in the DSMDB and is sent to the managed computer during the client synchronization. On the managed computer it is used to check the integrity of the downloaded package files.

  • Comparing the size and the timestamp of the file in the source and target with the package.fpi file.
    The file package.fpi is also distributed. During each distribution step, a check is performed as to whether the package files in the target directory have the same status as those in the source directory.
  • Completeness: A check is carried out as to whether all the files specified in the eScript are actually available in the repository.

In the case of copy *.* commands, the consistency check only returns an error if the source directory does not contain any files.

Compression of Package Files

During the distribution preparation process, the distribution process creates a compressed copy of the package files and places it in the directory containing the current revision of the package.
Compression is not carried out for certain package types for which a compressed distribution is not appropriate. These include MSI Packages and, if DSM OSD is used, OS package types as well. In this case, the package files are stored uncompressed in the revision directory.

From revision 2 of a package, every revision contains only those files which have been changed compared with the previous revision.