Skip to content

Latest commit

 

History

History
103 lines (78 loc) · 3.28 KB

config.md

File metadata and controls

103 lines (78 loc) · 3.28 KB

Configuration Reference

The repository's primary configuration comes from config.yml. In addition, environment variables may be used to modify some behavior when creating Hootenanny archives and RPMs.

config.yml

This YAML file holds the all the relevant settings for this repository in the following dictionaries:

  • versions: Versions of the dependency RPMs
  • images: Build arguments, tags, and other settings for container images
  • maven: Maven cache URL and SHA1 checksum

Because this file is also used by shell build method (in addition to Vagrant), any relevant variable should have an anchor property (&). This allows a shell script to easily search for a value without using a YAML library. For example:

versions:
  libpostal: &libpostal_version '1.0.0-1'

In addition, using anchors allows reuse of the variable without repeating it, for example:

images:
  base: !!omap
    - rpmbuild:
        args:
          rpmbuild_dist: *rpmbuild_dist
          rpmbuild_uid: *rpmbuild_uid
          rpmbuild_gid: *rpmbuild_uid

Environment Variables

HOOT_VERSION_GEN

This corresponds to the value generated by Hootenanny's HOOT_VERSION_GEN script and is used as a component of the Hootenanny source archive filename. By default the Makefile will use the latest archive found in SOURCES; if there's more than one source archive, it may be specified by setting this environment variable when invoking make:

HOOT_VERSION_GEN=0.2.41_2_g4d31c87 make rpm

GIT_COMMIT

When creating a Hootenanny source archive, this environment variable is used to specify the exact Hootenanny git revision (or tag) that you want to create with make. For example:

# Create archive for Hootenanny revision 4d31c87
GIT_COMMIT=4d31c87 make archive

# Create archive for Hootenanny tag v0.2.41
GIT_COMMIT=v0.2.41 make archive

HOOT_RELEASE

For tagged releases, the default Release value of an RPM is 1. If a subsequent release of a tagged version is required (typically to fix a packaging defect), it may be specified with this environment variable. For example, the following would produce a release RPM with version of 0.2.41-2:

HOOT_RELEASE=2 HOOT_VERSION_GEN=0.2.41 make rpm

See the background section on versioning for more details.

MAVEN_CACHE

Hootenanny uses Maven for building its Java services code, which requires retrieving assets over HTTP. To prevent frequent timeouts and race conditions a pre-existing cache is downloaded prior to trying to run the rpmbuild-hoot-release or rpmbuild-hoot-devel containers. Setting the MAVEN_CACHE environment variable to any value other than 1 disables retrieving this cache file. For example:

MAVEN_CACHE=0 vagrant status

RPMBUILD_UID_MATCH

By default, the containers use a UID and GID matching the invoking user for rpmbuild; doing so prevents permission errors because Docker bind mounts are used to share files with the hootenanny containers. If you want the rpmbuild user to have the same UID/GID specified in config.yml, set RPMBUILD_UID_MATCH=0 (any value other than 1).