Package contents
During the build process, the hab-plan-build script creates several files that specify dependency, build, and configuration information. When packages are unpacked (extracted) and installed during the initialization phase of a Chef Habitat service, these files define what packages need to run.
Packages are installed in the /hab/pkgs/ directory, and then further organized in subdirectories corresponding to fully-qualified package identifiers: origin/name/version/release. For more information on package identifiers, see Packages.
Contents of a Chef Habitat package
BUILD_DEPS- Fully-qualified package identifiers of any build dependencies your package depends on. These are listed in the root
plan.shfile of your plan directory. BUILD_TDEPS- Fully-qualified package identifiers of any runtime dependencies that your project’s build dependencies depend on. This is essentially a flattened dependency tree up to the root dependency (
linux-headersin most cases). BUILDTIME_ENVIRONMENT- A file that contains information similar to the
RUNTIME_ENVIRONMENTfile, but is constructed from a package’s build-time dependencies instead of its runtime dependencies. This file isn’t currently consumed by other software in the Chef Habitat ecosystem, but it can be useful for troubleshooting and information. BUILDTIME_ENVIRONMENT_PROVENANCE- A file that provides information about which specific dependencies influenced the final value of a given variable in the
BUILDTIME_ENVIRONMENTfile. This file isn’t currently consumed by other software in the Chef Habitat ecosystem, but it can be useful for troubleshooting and information. CFLAGS- Additional switches to be passed to the compiler when this package is used as a build dependency.
DEPS- Runtime dependencies for your package. These dependencies are processed by Chef Habitat and their corresponding environment variables (such as
PATHandLD_LIBRARY_PATH) are added to the current environment. FILES- List of all files in this package along with their blake2b checksums. The FILES file itself is signed using
hab pkg signto provide an assurance that its contents haven’t been tampered with. IDENT- The fully-qualified identifier for the package. The format is
origin/name/version/release. INTERPRETERS- If
pkg_interpretersis specified in yourplan.sh, this file is generated and contains a list of absolute paths to any interpreters a package can provide. Code in aplan.shcan use thefix_interpreterfunction to replace hard-coded interpreter paths, such as/bin/env. Interpreter paths in Chef Habitat are nested under/hab/pkgs/. For more information on interpreters, see thefix_interpreterdescription in Plan helper functions. LDFLAGS- Additional switches to be passed to the compiler when this package is used as a build dependency.
LD_RUN_PATH- Additional switches to be passed to the compiler when this package is used as a build dependency.
MANIFEST- A file containing package information, such as checksum, maintainer, build variables, and other metadata specified in
plan.sh, as well as the contents ofplan.shitself. PATH- A file that contains all directories in the package which contain program binaries. The directories are separated with the target platform’s path separator character (either
:or;). RUNTIME_ENVIRONMENT- A file containing the result of layering the current package’s runtime environment variables on top of those of its dependencies. The build process consults this file when processing dependencies, and the Supervisor consults it together with
RUNTIME_PATHwhen generating the full set of environment variables that should be added before running a supervised process. RUNTIME_ENVIRONMENT_PROVENANCE- A file that provides information about which specific dependencies influenced the final value of a given variable in the
RUNTIME_ENVIRONMENTfile. This file isn’t currently consumed by other software in the Chef Habitat ecosystem, but it can be useful for troubleshooting and information. RUNTIME_PATH- A file that contains all directories that need to be prepended to an environment’s
$PATHbefore a program in this package can be expected to run correctly. The order of the elements is precise and meaningful, so it shouldn’t be altered. This file is used withRUNTIME_ENVIRONMENTto compute the full set of environment variables that should be added before running a program in this package. TARGET- The CPU architecture and platform for the package. The format is
architecture-platform. For example,x86_64-linux. TDEPS- Fully-qualified package identifiers of any runtime dependencies that your project’s runtime dependencies depend on. This is essentially a flattened dependency tree up to the root dependency (
linux-headersin most cases). SVC_GROUP- The value of
pkg_svc_groupfrom a plan. The Chef Habitat Supervisor will try to start a service with this group if it exists. SVC_USER- The value of
pkg_svc_userfrom a plan. The Chef Habitat Supervisor will try to start a service with this user if it exists. default.toml- If you have defined a
default.tomlfile in the root of your plan, it’s included in the same relative location within the installed package directory. For more information on configuration and thedefault.tomlfile, see Configuration updates. configdirectory`- If you have defined a
configsubdirectory with a templated configuration file in your plan, it’s included in the same relative location within the installed package directory. For more information on templated configuration files, see Add configuration to plans. config_installdirectory- If you have defined a
config_installsubdirectory with a templated configuration file in your plan, it’s included in the same relative location within the installed package directory. For more information on templated configuration files, see Add configuration to plans. hooksdirectory- If you have defined a
hookssubdirectory with hook scripts in your plan, those scripts are included in the same relative location within the installed package directory. Read more about Application lifecycle hooks.