// Copyright:: Copyright (c) 2015-2016 Chef Software, Inc.
//
// The terms of the Evaluation Agreement (Habitat) between Chef Software Inc.
// and the party accessing this file ("Licensee") apply to Licensee's use of
// the Software until such time that the Software is made available under an
// open source license such as the Apache 2.0 License.

pub const PACKAGE_HOME: &'static str = "/opt/bldr/pkgs";
pub const SERVICE_HOME: &'static str = "/opt/bldr/svc";
pub const PACKAGE_CACHE: &'static str = "/opt/bldr/cache/pkgs";
pub const GPG_CACHE: &'static str = "/opt/bldr/cache/gpg";
pub const KEY_CACHE: &'static str = "/opt/bldr/cache/keys";

// Copyright:: Copyright (c) 2015-2016 Chef Software, Inc.
//
// The terms of the Evaluation Agreement (Habitat) between Chef Software Inc.
// and the party accessing this file ("Licensee") apply to Licensee's use of
// the Software until such time that the Software is made available under an
// open source license such as the Apache 2.0 License.

use std::path::PathBuf;

pub const PACKAGE_HOME: &'static str = "/opt/bldr/pkgs";
pub const SERVICE_HOME: &'static str = "/opt/bldr/svc";
pub const PACKAGE_CACHE: &'static str = "/opt/bldr/cache/pkgs";
pub const GPG_CACHE: &'static str = "/opt/bldr/cache/gpg";
pub const KEY_CACHE: &'static str = "/opt/bldr/cache/keys";

pub fn service_path(service_name: &str) -> PathBuf {
    PathBuf::from(SERVICE_HOME).join(service_name)
}

Purge references to `bldr` in the Supervisor.
[hap-sup] Purge references to `bldr` in the Supervisor.

This change has a few noteworthy points:

* The various structs in the error subsystem have been changed, namely
  `ErrorKind` becomes `Error`, `BldrResult` becomes `Result`,
  `BldrError` becomes `SupError`, and the `bldr_error!` macro becomes
  `sup_error!`. This should make any future refactorings or extractions
  into other crates much easier as the function signatures should no
  longer need updating and puts `Result` and `Error` much more inline
  with their counterparts in the other components.
* Any references to `bldr-build` have been preserved until that software
  has gone through its name change.
* The unix owner and group names have not changed and remain `bldr`
  until the `dockerize` program in Studio has been updated. This leaves
  current packages running as before.
* The installation path (namely `/opt/bldr`) has not been updated,
  pending a future change to alter the Habitat home and leaves current
  pacakges runn as before.
* The key-related code hasn't been scrubbed other than plumbing through
  renamed functions from other modules. This is under the assumption
  that this code will be imminently changing and/or being removed from
  this component.
* The etcd-related code also hasn't been updated as it will be removed
  shortly from the codebase.
