FORMULA File

In addition to the formula itself, a FORMULA file must exist which describes the package. An example of this file is:

name: apache
os: RedHat, Debian, Ubuntu, Suse, FreeBSD
os_family: RedHat, Debian, Suse, FreeBSD
version: 201506
release: 2
summary: Formula for installing Apache
description: Formula for installing Apache

Required Fields

This file must contain at least the following fields:

name

The name of the package, as it will appear in the package filename, in the repository metadata, and the package database. Even if the source formula has -formula in its name, this name should probably not include that. For instance, when packaging the apache-formula, the name should be set to apache.

os

The value of the os grain that this formula supports. This is used to help users know which operating systems can support this package.

os_family

The value of the os_family grain that this formula supports. This is used to help users know which operating system families can support this package.

version

The version of the package. While it is up to the organization that manages this package, it is suggested that this version is specified in a YYYYMM format. For instance, if this version was released in June 2015, the package version should be 201506. If multiple releases are made in a month, the release field should be used.

minimum_version

Minimum recommended version of Salt to use this formula. Not currently enforced.

release

This field refers primarily to a release of a version, but also to multiple versions within a month. In general, if a version has been made public, and immediate updates need to be made to it, this field should also be updated.

summary

A one-line description of the package.

description

A more detailed description of the package which can contain more than one line.

Optional Fields

The following fields may also be present.

top_level_dir

This field is optional, but highly recommended. If it is not specified, the package name will be used.

Formula repositories typically do not store .sls files in the root of the repository; instead they are stored in a subdirectory. For instance, an apache-formula repository would contain a directory called apache, which would contain an init.sls, plus a number of other related files. In this instance, the top_level_dir should be set to apache.

Files outside the top_level_dir, such as README.rst, FORMULA, and LICENSE will not be installed. The exceptions to this rule are files that are already treated specially, such as pillar.example and _modules/.