diff --git a/Makefile b/Makefile
index 5e39c066fe..d7d7dfd78f 100644
--- a/Makefile
+++ b/Makefile
@@ -28,40 +28,37 @@ else
docs_run :=
endif
-.PHONY: help all shell docs-serve test unit functional clean image docs gpg
+.PHONY: help all shell serve-docs test unit functional clean image docs gpg
.DEFAULT_GOAL := all
all: image ## builds the project's Rust components
- $(run) cargo build --manifest-path components/core/Cargo.toml
- $(run) cargo build --manifest-path components/bldr/Cargo.toml
- $(run) cargo build --manifest-path components/depot-core/Cargo.toml
+ $(run) cargo build --manifest-path components/sup/Cargo.toml
$(run) cargo build --manifest-path components/depot/Cargo.toml
- $(run) cargo build --manifest-path components/depot-client/Cargo.toml
test: image ## tests the project's Rust components
$(run) cargo test --manifest-path components/core/Cargo.toml
- $(run) cargo test --manifest-path components/bldr/Cargo.toml
$(run) cargo test --manifest-path components/depot-core/Cargo.toml
- $(run) cargo test --manifest-path components/depot/Cargo.toml
$(run) cargo test --manifest-path components/depot-client/Cargo.toml
+ $(run) cargo test --manifest-path components/sup/Cargo.toml
+ $(run) cargo test --manifest-path components/depot/Cargo.toml
unit: image ## executes the components' unit test suites
$(run) cargo test --lib --manifest-path components/core/Cargo.toml
- $(run) cargo test --lib --manifest-path components/bldr/Cargo.toml
$(run) cargo test --lib --manifest-path components/depot-core/Cargo.toml
- $(run) cargo test --lib --manifest-path components/depot/Cargo.toml
$(run) cargo test --lib --manifest-path components/depot-client/Cargo.toml
+ $(run) cargo test --lib --manifest-path components/sup/Cargo.toml
+ $(run) cargo test --lib --manifest-path components/depot/Cargo.toml
functional: image ## executes the components' functional test suites
- $(run) cargo test --test functional --manifest-path components/bldr/Cargo.toml
+ $(run) cargo test --test functional --manifest-path components/sup/Cargo.toml
$(run) cargo test --test functional --manifest-path components/depot/Cargo.toml
clean: ## cleans up the project tree
$(run) cargo clean --manifest-path components/core/Cargo.toml
- $(run) cargo clean --manifest-path components/bldr/Cargo.toml
$(run) cargo clean --manifest-path components/depot-core/Cargo.toml
- $(run) cargo clean --manifest-path components/depot/Cargo.toml
$(run) cargo clean --manifest-path components/depot-client/Cargo.toml
+ $(run) cargo clean --manifest-path components/sup/Cargo.toml
+ $(run) cargo clean --manifest-path components/depot/Cargo.toml
help:
@perl -nle'print $& if m{^[a-zA-Z_-]+:.*?## .*$$}' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
@@ -72,7 +69,7 @@ shell: image ## launches a development shell
serve-docs: docs ## serves the project documentation from an HTTP server
@echo "==> View the docs at:\n\n http://`\
echo $(docs_host) | sed -e 's|^tcp://||' -e 's|:[0-9]\{1,\}$$||'`:9633/\n\n"
- $(docs_run) sh -c 'set -e; cd ./components/bldr/target/doc; python -m SimpleHTTPServer 9633;'
+ $(docs_run) sh -c 'set -e; cd ./components/sup/target/doc; python -m SimpleHTTPServer 9633;'
ifneq ($(IN_DOCKER),)
distclean: ## fully cleans up project tree and any associated Docker images and containers
@@ -97,11 +94,11 @@ endif
docs: image ## build the docs
$(run) sh -c 'set -ex; \
- cargo doc --manifest-path components/bldr/Cargo.toml; \
- rustdoc --crate-name bldr README.md -o ./components/bldr/target/doc/bldr; \
- docco -e .sh -o components/bldr/target/doc/bldr/bldr-build plans/bldr-build; \
- cp -r images ./components/bldr/target/doc/bldr; \
- echo "" > components/bldr/target/doc/index.html;'
+ cargo doc --manifest-path components/sup/Cargo.toml; \
+ rustdoc --crate-name habitat_sup README.md -o ./components/sup/target/doc/habitat_sup; \
+ docco -e .sh -o components/sup/target/doc/habitat_sup/bldr-build plans/bldr-build; \
+ cp -r images ./components/sup/target/doc/habitat_sup; \
+ echo "" > components/sup/target/doc/index.html;'
gpg: ## installs gpg signing keys, only run this in a Studio
(cd plans && make gpg)
diff --git a/components/bldr/tests/fixtures/simple_service_without_config/plan.sh b/components/bldr/tests/fixtures/simple_service_without_config/plan.sh
deleted file mode 100644
index 8648803167..0000000000
--- a/components/bldr/tests/fixtures/simple_service_without_config/plan.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-pkg_name=simple_service_without_config
-pkg_origin=test
-pkg_version=0.0.1
-pkg_license=('Apache2')
-pkg_maintainer="Adam Jacob "
-pkg_source=http://example.com/releases/${pkg_name}-${pkg_version}.tar.bz2
-pkg_filename=${pkg_name}-${pkg_version}.tar.bz2
-pkg_shasum=0e21be5d7c5e6ab6adcbed257619897db59be9e1ded7ef6fd1582d0cdb5e5bb7
-pkg_gpg_key=3853DA6B
-pkg_bin_dirs=(bin)
-pkg_deps=(chef/gpgme chef/libassuan chef/libgpg-error)
-pkg_service_run="bin/simple_service_without_config"
-pkg_docker_build="auto"
-pkg_docker_build_no_cache="true"
-
-do_begin() {
- tar -cjvf $BLDR_SRC_CACHE/${pkg_name}-${pkg_version}.tar.bz2 --exclude 'plans' --exclude '.git' --exclude '.gitignore' --exclude 'target' --transform "s,^\.,simple_service_without_config-0.0.1," .
- pkg_shasum=$(trim $(sha256sum /opt/bldr/cache/src/simple_service_without_config-0.0.1.tar.bz2 | cut -d " " -f 1))
-}
-
-do_download() {
- return 0
-}
-
-do_build() {
- return 0
-}
-
-do_install() {
- cp -r /src/components/bldr/target/debug/bldr $pkg_prefix/bin
- cp -r $BLDR_SRC_CACHE/$pkg_dirname/bin $pkg_prefix
- chmod 755 $pkg_path/bin
- chmod 755 $pkg_path/bin/*
- return 0
-}
diff --git a/components/core/Cargo.lock b/components/core/Cargo.lock
index 600c40989e..f123b790a0 100644
--- a/components/core/Cargo.lock
+++ b/components/core/Cargo.lock
@@ -1,5 +1,5 @@
[root]
-name = "bldr_core"
+name = "habitat_core"
version = "0.4.0"
dependencies = [
"gpgme 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
diff --git a/components/core/Cargo.toml b/components/core/Cargo.toml
index 8e38c3e82b..3fbd281000 100644
--- a/components/core/Cargo.toml
+++ b/components/core/Cargo.toml
@@ -1,5 +1,5 @@
[package]
-name = "bldr_core"
+name = "habitat_core"
version = "0.4.0"
authors = ["Adam Jacob ", "Jamie Winsor ", "Fletcher Nichol ", "Joshua Timberman ", "Dave Parfitt "]
diff --git a/components/core/src/error.rs b/components/core/src/error.rs
index af376db20f..8ef50af39b 100644
--- a/components/core/src/error.rs
+++ b/components/core/src/error.rs
@@ -22,7 +22,7 @@ pub type Result = result::Result;
/// Core error types
#[derive(Debug)]
pub enum Error {
- /// Occurs when a `bldr_core::package::PackageArchive` is being read.
+ /// Occurs when a `habitat_core::package::PackageArchive` is being read.
ArchiveError(libarchive::error::ArchiveError),
/// Occurs when a file that should exist does not or could not be read.
FileNotFound(String),
diff --git a/components/depot-client/Cargo.lock b/components/depot-client/Cargo.lock
index 4a7ffdf44c..40e0ad004c 100644
--- a/components/depot-client/Cargo.lock
+++ b/components/depot-client/Cargo.lock
@@ -1,9 +1,9 @@
[root]
-name = "bldr_depot_client"
+name = "habitat_depot_client"
version = "0.4.0"
dependencies = [
- "bldr_core 0.4.0",
- "bldr_depot_core 0.4.0",
+ "habitat_core 0.4.0",
+ "habitat_depot_core 0.4.0",
"hyper 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -22,30 +22,6 @@ name = "bitflags"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-[[package]]
-name = "bldr_core"
-version = "0.4.0"
-dependencies = [
- "gpgme 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
- "libarchive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex 0.1.58 (registry+https://github.com/rust-lang/crates.io-index)",
- "rust-crypto 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)",
- "rustc-serialize 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "bldr_depot_core"
-version = "0.4.0"
-dependencies = [
- "bldr_core 0.4.0",
- "hyper 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "lmdb-sys 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "rustc-serialize 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
[[package]]
name = "cookie"
version = "0.2.2"
@@ -99,6 +75,30 @@ dependencies = [
"libgpg-error-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
+[[package]]
+name = "habitat_core"
+version = "0.4.0"
+dependencies = [
+ "gpgme 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libarchive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 0.1.58 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rust-crypto 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-serialize 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "habitat_depot_core"
+version = "0.4.0"
+dependencies = [
+ "habitat_core 0.4.0",
+ "hyper 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lmdb-sys 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-serialize 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
[[package]]
name = "hpack"
version = "0.2.0"
diff --git a/components/depot-client/Cargo.toml b/components/depot-client/Cargo.toml
index 55090df8b5..016e5688cb 100644
--- a/components/depot-client/Cargo.toml
+++ b/components/depot-client/Cargo.toml
@@ -1,5 +1,5 @@
[package]
-name = "bldr_depot_client"
+name = "habitat_depot_client"
version = "0.4.0"
authors = ["Adam Jacob ", "Jamie Winsor ", "Fletcher Nichol ", "Joshua Timberman ", "Dave Parfitt "]
@@ -8,8 +8,8 @@ hyper = "*"
log = "*"
rustc-serialize = "*"
-[dependencies.bldr_core]
+[dependencies.habitat_core]
path = "../core"
-[dependencies.bldr_depot_core]
+[dependencies.habitat_depot_core]
path = "../depot-core"
diff --git a/components/depot-client/src/error.rs b/components/depot-client/src/error.rs
index 0985dacdf8..cdb9fab6b7 100644
--- a/components/depot-client/src/error.rs
+++ b/components/depot-client/src/error.rs
@@ -11,11 +11,11 @@ use std::result;
use hyper;
-use bldr::{self, package};
+use hcore::{self, package};
#[derive(Debug)]
pub enum Error {
- BldrCore(bldr::Error),
+ HabitatCore(hcore::Error),
HTTP(hyper::status::StatusCode),
HyperError(hyper::error::Error),
IO(io::Error),
@@ -30,7 +30,7 @@ pub type Result = result::Result;
impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let msg = match *self {
- Error::BldrCore(ref e) => format!("{}", e),
+ Error::HabitatCore(ref e) => format!("{}", e),
Error::HTTP(ref e) => format!("{}", e),
Error::HyperError(ref err) => format!("{}", err),
Error::IO(ref e) => format!("{}", e),
@@ -55,7 +55,7 @@ impl fmt::Display for Error {
impl error::Error for Error {
fn description(&self) -> &str {
match *self {
- Error::BldrCore(ref err) => err.description(),
+ Error::HabitatCore(ref err) => err.description(),
Error::HTTP(_) => "Received an HTTP error",
Error::HyperError(ref err) => err.description(),
Error::IO(ref err) => err.description(),
@@ -67,9 +67,9 @@ impl error::Error for Error {
}
}
-impl From for Error {
- fn from(err: bldr::Error) -> Error {
- Error::BldrCore(err)
+impl From for Error {
+ fn from(err: hcore::Error) -> Error {
+ Error::HabitatCore(err)
}
}
diff --git a/components/depot-client/src/lib.rs b/components/depot-client/src/lib.rs
index 525fc7c16c..769aa2c0ea 100644
--- a/components/depot-client/src/lib.rs
+++ b/components/depot-client/src/lib.rs
@@ -4,8 +4,8 @@
// 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.
-extern crate bldr_core as bldr;
-extern crate bldr_depot_core as depot_core;
+extern crate habitat_core as hcore;
+extern crate habitat_depot_core as depot_core;
#[macro_use]
extern crate hyper;
#[macro_use]
@@ -20,7 +20,7 @@ use std::fs::{self, File};
use std::io::{Read, Write, BufWriter, Seek, SeekFrom};
use std::path::{Path, PathBuf};
-use bldr::package::{PackageArchive, PackageIdent};
+use hcore::package::{PackageArchive, PackageIdent};
use depot_core::{XFileName, data_object};
use hyper::client::{Client, Body};
use hyper::status::StatusCode;
@@ -50,10 +50,7 @@ pub fn fetch_key(depot: &str, key: &str, path: &str) -> Result {
/// * Package cannot be found
/// * Remote Depot is not available
/// * File cannot be created and written to
-pub fn fetch_package(depot: &str,
- package: &PackageIdent,
- store: &str)
- -> Result {
+pub fn fetch_package(depot: &str, package: &PackageIdent, store: &str) -> Result {
let url = format!("{}/pkgs/{}/download", depot, package);
match download(&package.name, &url, store) {
Ok(file) => {
diff --git a/components/depot-core/Cargo.lock b/components/depot-core/Cargo.lock
index 5bb34f2ccc..64f1578269 100644
--- a/components/depot-core/Cargo.lock
+++ b/components/depot-core/Cargo.lock
@@ -1,8 +1,8 @@
[root]
-name = "bldr_depot_core"
+name = "habitat_depot_core"
version = "0.4.0"
dependencies = [
- "bldr_core 0.4.0",
+ "habitat_core 0.4.0",
"hyper 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
"lmdb-sys 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -22,19 +22,6 @@ name = "bitflags"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-[[package]]
-name = "bldr_core"
-version = "0.4.0"
-dependencies = [
- "gpgme 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
- "libarchive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex 0.1.58 (registry+https://github.com/rust-lang/crates.io-index)",
- "rust-crypto 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)",
- "rustc-serialize 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
[[package]]
name = "cookie"
version = "0.2.2"
@@ -88,6 +75,19 @@ dependencies = [
"libgpg-error-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
+[[package]]
+name = "habitat_core"
+version = "0.4.0"
+dependencies = [
+ "gpgme 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libarchive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 0.1.58 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rust-crypto 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-serialize 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
[[package]]
name = "hpack"
version = "0.2.0"
diff --git a/components/depot-core/Cargo.toml b/components/depot-core/Cargo.toml
index eafe7d6701..b9d4b6bed1 100644
--- a/components/depot-core/Cargo.toml
+++ b/components/depot-core/Cargo.toml
@@ -1,5 +1,5 @@
[package]
-name = "bldr_depot_core"
+name = "habitat_depot_core"
version = "0.4.0"
authors = ["Adam Jacob ", "Jamie Winsor ", "Fletcher Nichol ", "Joshua Timberman ", "Dave Parfitt "]
@@ -9,5 +9,5 @@ libc = "*"
lmdb-sys = "*"
rustc-serialize = "*"
-[dependencies.bldr_core]
+[dependencies.habitat_core]
path = "../core"
diff --git a/components/depot-core/src/data_object.rs b/components/depot-core/src/data_object.rs
index ec09413a60..b6f5acbf54 100644
--- a/components/depot-core/src/data_object.rs
+++ b/components/depot-core/src/data_object.rs
@@ -8,7 +8,7 @@ use std::fmt;
use std::result;
use std::slice;
-use bldr::{package, Error, Result};
+use hcore::{package, Error, Result};
use libc::c_void;
use lmdb_sys;
use rustc_serialize::{Encoder, Decoder, Encodable, Decodable};
diff --git a/components/depot-core/src/lib.rs b/components/depot-core/src/lib.rs
index c51619e880..55f46efd23 100644
--- a/components/depot-core/src/lib.rs
+++ b/components/depot-core/src/lib.rs
@@ -4,7 +4,7 @@
// 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.
-extern crate bldr_core as bldr;
+extern crate habitat_core as hcore;
#[macro_use]
extern crate hyper;
extern crate libc;
diff --git a/components/depot/Cargo.lock b/components/depot/Cargo.lock
index dce30701ba..b976c0314b 100644
--- a/components/depot/Cargo.lock
+++ b/components/depot/Cargo.lock
@@ -1,14 +1,14 @@
[root]
-name = "bldr_depot"
+name = "habitat_depot"
version = "0.4.0"
dependencies = [
"bincode 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "bldr_core 0.4.0",
- "bldr_depot_core 0.4.0",
"clap 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"env_logger 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gpgme 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "habitat_core 0.4.0",
+ "habitat_depot_core 0.4.0",
"hyper 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"iron 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -63,30 +63,6 @@ name = "bitflags"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-[[package]]
-name = "bldr_core"
-version = "0.4.0"
-dependencies = [
- "gpgme 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
- "libarchive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)",
- "rust-crypto 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)",
- "rustc-serialize 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "bldr_depot_core"
-version = "0.4.0"
-dependencies = [
- "bldr_core 0.4.0",
- "hyper 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "lmdb-sys 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "rustc-serialize 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
[[package]]
name = "bodyparser"
version = "0.2.0"
@@ -195,6 +171,30 @@ dependencies = [
"libgpg-error-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
+[[package]]
+name = "habitat_core"
+version = "0.4.0"
+dependencies = [
+ "gpgme 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libarchive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rust-crypto 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-serialize 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "habitat_depot_core"
+version = "0.4.0"
+dependencies = [
+ "habitat_core 0.4.0",
+ "hyper 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lmdb-sys 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-serialize 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
[[package]]
name = "hpack"
version = "0.2.0"
diff --git a/components/depot/Cargo.toml b/components/depot/Cargo.toml
index 0f76b0b8c2..b4beaa9700 100644
--- a/components/depot/Cargo.toml
+++ b/components/depot/Cargo.toml
@@ -1,10 +1,10 @@
[package]
-name = "bldr_depot"
+name = "habitat_depot"
version = "0.4.0"
authors = ["Adam Jacob ", "Jamie Winsor ", "Fletcher Nichol ", "Joshua Timberman ", "Dave Parfitt "]
[[bin]]
-name = "bldr-depot"
+name = "hab-depot"
doc = false
[dependencies]
@@ -32,10 +32,10 @@ walkdir = "*"
[dependencies.clap]
features = [ "suggestions", "color", "unstable" ]
-[dependencies.bldr_core]
+[dependencies.habitat_core]
path = "../core"
-[dependencies.bldr_depot_core]
+[dependencies.habitat_depot_core]
path = "../depot-core"
[dev-dependencies]
diff --git a/components/depot/src/data_store.rs b/components/depot/src/data_store.rs
index e181df376c..1637ac4dd3 100644
--- a/components/depot/src/data_store.rs
+++ b/components/depot/src/data_store.rs
@@ -1631,7 +1631,7 @@ mod tests {
use super::*;
use error::Error;
use depot_core::data_object::*;
- use bldr::package;
+ use hcore::package;
// JW TODO: This test is ignored while I track down a bug preventing multiple transactions
// being opened from different threads.
diff --git a/components/depot/src/doctor.rs b/components/depot/src/doctor.rs
index 3e496fb12c..1cb04ffb71 100644
--- a/components/depot/src/doctor.rs
+++ b/components/depot/src/doctor.rs
@@ -9,8 +9,8 @@ use std::io;
use std::path::PathBuf;
use std::str::FromStr;
-use bldr;
-use bldr::package::{self, PackageArchive};
+use hcore;
+use hcore::package::{self, PackageArchive};
use depot_core::data_object::{self, DataObject};
use time;
use walkdir::WalkDir;
@@ -112,7 +112,7 @@ pub enum OperationType {
#[derive(Debug)]
pub enum Reason {
BadArchive,
- BadMetadata(bldr::Error),
+ BadMetadata(hcore::Error),
BadPermissions,
IO(io::Error),
FileExists,
diff --git a/components/depot/src/error.rs b/components/depot/src/error.rs
index 1165250fd4..b36eeeb840 100644
--- a/components/depot/src/error.rs
+++ b/components/depot/src/error.rs
@@ -10,7 +10,7 @@ use std::io;
use std::fmt;
use std::result;
-use bldr::{self, package};
+use hcore::{self, package};
use hyper;
use data_store;
@@ -18,8 +18,8 @@ use data_store;
#[derive(Debug)]
pub enum Error {
BadPort(String),
- BldrCore(bldr::Error),
DbInvalidPath,
+ HabitatCore(hcore::Error),
HTTP(hyper::status::StatusCode),
InvalidPackageIdent(String),
IO(io::Error),
@@ -37,8 +37,8 @@ impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let msg = match *self {
Error::BadPort(ref e) => format!("{} is an invalid port. Valid range 1-65535.", e),
- Error::BldrCore(ref e) => format!("{}", e),
Error::DbInvalidPath => format!("Invalid filepath to internal datastore"),
+ Error::HabitatCore(ref e) => format!("{}", e),
Error::HTTP(ref e) => format!("{}", e),
Error::InvalidPackageIdent(ref e) => {
format!("Invalid package identifier: {:?}. A valid identifier is in the form \
@@ -70,8 +70,8 @@ impl error::Error for Error {
fn description(&self) -> &str {
match *self {
Error::BadPort(_) => "Received an invalid port or a number outside of the valid range.",
- Error::BldrCore(ref err) => err.description(),
Error::DbInvalidPath => "A bad filepath was provided for an internal datastore",
+ Error::HabitatCore(ref err) => err.description(),
Error::HTTP(_) => "Received an HTTP error",
Error::InvalidPackageIdent(_) => "Package identifiers must be in origin/name format (example: chef/redis)",
Error::IO(ref err) => err.description(),
@@ -85,9 +85,9 @@ impl error::Error for Error {
}
}
-impl From for Error {
- fn from(err: bldr::Error) -> Error {
- Error::BldrCore(err)
+impl From for Error {
+ fn from(err: hcore::Error) -> Error {
+ Error::HabitatCore(err)
}
}
diff --git a/components/depot/src/lib.rs b/components/depot/src/lib.rs
index 7578c145cc..9f0baedc6d 100644
--- a/components/depot/src/lib.rs
+++ b/components/depot/src/lib.rs
@@ -4,8 +4,8 @@
// 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.
-extern crate bldr_core as bldr;
-extern crate bldr_depot_core as depot_core;
+extern crate habitat_core as hcore;
+extern crate habitat_depot_core as depot_core;
extern crate bincode;
#[macro_use]
extern crate bitflags;
@@ -44,7 +44,7 @@ use crypto::sha2::Sha256;
use crypto::digest::Digest;
use self::data_store::{DataStore, Database};
-use bldr::package::{self, PackageArchive};
+use hcore::package::{self, PackageArchive};
pub struct Depot {
pub path: String,
diff --git a/components/depot/src/main.rs b/components/depot/src/main.rs
index 6d46a17a22..d179017f6c 100644
--- a/components/depot/src/main.rs
+++ b/components/depot/src/main.rs
@@ -4,8 +4,8 @@
// 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.
-extern crate bldr_depot as depot;
-extern crate bldr_depot_core as depot_core;
+extern crate habitat_depot as depot;
+extern crate habitat_depot_core as depot_core;
#[macro_use]
extern crate clap;
extern crate env_logger;
@@ -162,7 +162,7 @@ fn repo_list(config: &Config) -> Result<()> {
let mut cursor = try!(txn.cursor_ro());
match cursor.first() {
Err(Error::MdbError(data_store::MdbError::NotFound)) => {
- println!("No repositories. Create one with `bldr-depot repo create`.");
+ println!("No repositories. Create one with `hab-depot repo create`.");
return Ok(());
}
Err(e) => return Err(e),
diff --git a/components/depot/src/server.rs b/components/depot/src/server.rs
index e119a03a58..82c423418a 100644
--- a/components/depot/src/server.rs
+++ b/components/depot/src/server.rs
@@ -21,7 +21,7 @@ use super::Depot;
use config::Config;
use data_store::{self, Cursor, Database, Transaction};
use error::{Error, Result};
-use bldr::package::{self, PackageArchive};
+use hcore::package::{self, PackageArchive};
fn write_file(filename: &PathBuf, body: &mut Body) -> Result {
let path = filename.parent().unwrap();
@@ -91,8 +91,8 @@ fn upload_package(depot: &Depot, req: &mut Request) -> IronResult {
// This should never happen. Writing the package to disk and recording it's existence
// in the metadata is a transactional operation and one cannot exist without the other.
//
- // JW TODO: write the depot repair tool and wire it into the `bldr-depot repair` command
- panic!("Inconsistent package metadata! Exit and run `bldr-depot repair` to fix data integrity.");
+ // JW TODO: write the depot repair tool and wire it into the `hab-depot repair` command
+ panic!("Inconsistent package metadata! Exit and run `hab-depot repair` to fix data integrity.");
}
}
@@ -182,8 +182,8 @@ fn download_package(depot: &Depot, req: &mut Request) -> IronResult {
// This should never happen. Writing the package to disk and recording it's existence
// in the metadata is a transactional operation and one cannot exist without the other.
//
- // JW TODO: write the depot repair tool and wire it into the `bldr-depot repair` command
- panic!("Inconsistent package metadata! Exit and run `bldr-depot repair` to fix data integrity.");
+ // JW TODO: write the depot repair tool and wire it into the `hab-depot repair` command
+ panic!("Inconsistent package metadata! Exit and run `hab-depot repair` to fix data integrity.");
}
}
Err(Error::MdbError(data_store::MdbError::NotFound)) => {
@@ -474,7 +474,7 @@ impl From for IronError {
fn from(err: Error) -> IronError {
IronError {
error: Box::new(err),
- response: Response::with((status::InternalServerError, "Internal bldr error")),
+ response: Response::with((status::InternalServerError, "Internal Habitat error")),
}
}
}
diff --git a/components/depot/tests/server.rs b/components/depot/tests/server.rs
index 1cb2159934..396d716839 100644
--- a/components/depot/tests/server.rs
+++ b/components/depot/tests/server.rs
@@ -8,7 +8,7 @@ extern crate regex;
extern crate time;
extern crate hyper;
extern crate url;
-extern crate bldr_core as core;
+extern crate habitat_core as core;
extern crate uuid;
extern crate rustc_serialize;
diff --git a/components/bldr/Cargo.lock b/components/sup/Cargo.lock
similarity index 98%
rename from components/bldr/Cargo.lock
rename to components/sup/Cargo.lock
index e664db4910..a09c580050 100644
--- a/components/bldr/Cargo.lock
+++ b/components/sup/Cargo.lock
@@ -1,14 +1,14 @@
[root]
-name = "bldr"
+name = "habitat_sup"
version = "0.4.0"
dependencies = [
"ansi_term 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "bldr_core 0.4.0",
- "bldr_depot_client 0.4.0",
- "bldr_depot_core 0.4.0",
"clap 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"env_logger 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gpgme 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "habitat_core 0.4.0",
+ "habitat_depot_client 0.4.0",
+ "habitat_depot_core 0.4.0",
"hyper 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"iron 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -63,41 +63,6 @@ name = "bitflags"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-[[package]]
-name = "bldr_core"
-version = "0.4.0"
-dependencies = [
- "gpgme 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
- "libarchive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex 0.1.48 (registry+https://github.com/rust-lang/crates.io-index)",
- "rust-crypto 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)",
- "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "bldr_depot_client"
-version = "0.4.0"
-dependencies = [
- "bldr_core 0.4.0",
- "bldr_depot_core 0.4.0",
- "hyper 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "bldr_depot_core"
-version = "0.4.0"
-dependencies = [
- "bldr_core 0.4.0",
- "hyper 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "lmdb-sys 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
[[package]]
name = "bodyparser"
version = "0.2.0"
@@ -204,6 +169,41 @@ dependencies = [
"libgpg-error-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
+[[package]]
+name = "habitat_core"
+version = "0.4.0"
+dependencies = [
+ "gpgme 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libarchive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 0.1.48 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rust-crypto 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "habitat_depot_client"
+version = "0.4.0"
+dependencies = [
+ "habitat_core 0.4.0",
+ "habitat_depot_core 0.4.0",
+ "hyper 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "habitat_depot_core"
+version = "0.4.0"
+dependencies = [
+ "habitat_core 0.4.0",
+ "hyper 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lmdb-sys 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
[[package]]
name = "hpack"
version = "0.2.0"
diff --git a/components/bldr/Cargo.toml b/components/sup/Cargo.toml
similarity index 85%
rename from components/bldr/Cargo.toml
rename to components/sup/Cargo.toml
index 00754b5a05..bdd440d299 100644
--- a/components/bldr/Cargo.toml
+++ b/components/sup/Cargo.toml
@@ -1,14 +1,14 @@
[package]
-name = "bldr"
+name = "habitat_sup"
version = "0.4.0"
authors = ["Adam Jacob ", "Jamie Winsor ", "Fletcher Nichol ", "Joshua Timberman ", "Dave Parfitt "]
exclude = ["plans/**/*","web/**/*"]
[lib]
-name = "bldr"
+name = "habitat_sup"
[[bin]]
-name = "bldr"
+name = "hab-sup"
doc = false
[[test]]
@@ -37,13 +37,13 @@ threadpool = "*"
urlencoded = "*"
openssl = "*"
-[dependencies.bldr_core]
+[dependencies.habitat_core]
path = "../core"
-[dependencies.bldr_depot_core]
+[dependencies.habitat_depot_core]
path = "../depot-core"
-[dependencies.bldr_depot_client]
+[dependencies.habitat_depot_client]
path = "../depot-client"
[dependencies.wonder]
diff --git a/components/bldr/src/census.rs b/components/sup/src/census.rs
similarity index 100%
rename from components/bldr/src/census.rs
rename to components/sup/src/census.rs
diff --git a/components/bldr/src/command/configure.rs b/components/sup/src/command/configure.rs
similarity index 100%
rename from components/bldr/src/command/configure.rs
rename to components/sup/src/command/configure.rs
diff --git a/components/bldr/src/command/inject.rs b/components/sup/src/command/inject.rs
similarity index 100%
rename from components/bldr/src/command/inject.rs
rename to components/sup/src/command/inject.rs
diff --git a/components/bldr/src/command/install.rs b/components/sup/src/command/install.rs
similarity index 97%
rename from components/bldr/src/command/install.rs
rename to components/sup/src/command/install.rs
index 0fa5ff646a..39a2bf4508 100644
--- a/components/bldr/src/command/install.rs
+++ b/components/sup/src/command/install.rs
@@ -29,8 +29,8 @@
use std::fs;
-use core::fs::PACKAGE_CACHE;
-use core::package::PackageIdent;
+use hcore::fs::PACKAGE_CACHE;
+use hcore::package::PackageIdent;
use depot_core::data_object;
use depot_client;
diff --git a/components/bldr/src/command/key.rs b/components/sup/src/command/key.rs
similarity index 99%
rename from components/bldr/src/command/key.rs
rename to components/sup/src/command/key.rs
index a921b8f363..f26fbe7770 100644
--- a/components/bldr/src/command/key.rs
+++ b/components/sup/src/command/key.rs
@@ -9,9 +9,9 @@ use std::path::Path;
use std::process::{Command, Stdio, Child};
use ansi_term::Colour::{Yellow, Red};
-use core::package::PackageIdent;
-use core::fs::KEY_CACHE;
-use core::gpg;
+use hcore::package::PackageIdent;
+use hcore::fs::KEY_CACHE;
+use hcore::gpg;
use depot_client;
use time::strptime;
use rpassword::read_password;
diff --git a/components/bldr/src/command/mod.rs b/components/sup/src/command/mod.rs
similarity index 100%
rename from components/bldr/src/command/mod.rs
rename to components/sup/src/command/mod.rs
diff --git a/components/bldr/src/command/start.rs b/components/sup/src/command/start.rs
similarity index 99%
rename from components/bldr/src/command/start.rs
rename to components/sup/src/command/start.rs
index 7c60807bec..05d9d56f67 100644
--- a/components/bldr/src/command/start.rs
+++ b/components/sup/src/command/start.rs
@@ -51,7 +51,7 @@
use std::env;
use ansi_term::Colour::Yellow;
-use core::fs::PACKAGE_CACHE;
+use hcore::fs::PACKAGE_CACHE;
use depot_client;
use error::{BldrResult, ErrorKind};
diff --git a/components/bldr/src/command/upload.rs b/components/sup/src/command/upload.rs
similarity index 99%
rename from components/bldr/src/command/upload.rs
rename to components/sup/src/command/upload.rs
index 79bf150f3e..6816a6856c 100644
--- a/components/bldr/src/command/upload.rs
+++ b/components/sup/src/command/upload.rs
@@ -22,7 +22,7 @@
use std::path::PathBuf;
-use core::package::PackageArchive;
+use hcore::package::PackageArchive;
use depot_client;
use hyper::status::StatusCode;
diff --git a/components/bldr/src/config.rs b/components/sup/src/config.rs
similarity index 99%
rename from components/bldr/src/config.rs
rename to components/sup/src/config.rs
index c7f2bdcd55..84179e4586 100644
--- a/components/bldr/src/config.rs
+++ b/components/sup/src/config.rs
@@ -14,7 +14,7 @@
use std::str::FromStr;
-use core::package::PackageIdent;
+use hcore::package::PackageIdent;
use error::{BldrError, ErrorKind};
use gossip::server::GOSSIP_DEFAULT_PORT;
diff --git a/components/bldr/src/config_file.rs b/components/sup/src/config_file.rs
similarity index 99%
rename from components/bldr/src/config_file.rs
rename to components/sup/src/config_file.rs
index 2ca529eba4..f0a837d54a 100644
--- a/components/bldr/src/config_file.rs
+++ b/components/sup/src/config_file.rs
@@ -10,7 +10,7 @@ use std::fs::{self, File};
use std::io::prelude::*;
use std::path::{Path, PathBuf};
-use core::fs::SERVICE_HOME;
+use hcore::fs::SERVICE_HOME;
use openssl::crypto::hash as openssl_hash;
use rustc_serialize::hex::ToHex;
use time::{SteadyTime, Duration};
diff --git a/components/bldr/src/discovery/etcd.rs b/components/sup/src/discovery/etcd.rs
similarity index 94%
rename from components/bldr/src/discovery/etcd.rs
rename to components/sup/src/discovery/etcd.rs
index e55cd24ceb..dafd02e4f9 100644
--- a/components/bldr/src/discovery/etcd.rs
+++ b/components/sup/src/discovery/etcd.rs
@@ -183,40 +183,39 @@ pub fn watch_mock_thread(key: &str,
watcher_tx: Sender