summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerry Trieu <jerry@advancedtelematic.com>2016-07-25 14:58:30 +0200
committerJerry Trieu <jerry@advancedtelematic.com>2016-07-25 16:50:24 +0200
commitf25ff7dd4a5a2b0e5d924d942d17b55d4ab9292b (patch)
tree666a3545c658181046a66eb928221b45f1c11cdb
parentb2ec5bee02bdb9dc8352274ba4693fdaaf57797b (diff)
downloadrvi_sota_client-f25ff7dd4a5a2b0e5d924d942d17b55d4ab9292b.tar.gz
Override rust-openssl paths in .cargo/config
Use .cargo/config to build patched openssl (compatible with rust 1.7.0 for meta-rust on yocto). Use 'replace' in Cargo.toml when meta-rust is updated.
-rw-r--r--.gitignore2
-rw-r--r--Makefile7
2 files changed, 8 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 37d830b..bcf117a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
target
pkg/sota_client
.tmp*
+.cargo/config
+rust-openssl
diff --git a/Makefile b/Makefile
index 9ddd2b3..5e0f961 100644
--- a/Makefile
+++ b/Makefile
@@ -33,6 +33,7 @@ run: image ## Run the client inside a Docker container.
clean: ## Remove all compiled libraries, builds and temporary files.
$(CARGO) clean
@rm -f .tmp* *.deb *.rpm pkg/*.deb pkg/*.rpm pkg/*.toml /tmp/ats_credentials.toml
+ @rm -rf rust-openssl .cargo/config
.PHONY: clean-cache
clean-cache:
@@ -48,7 +49,7 @@ client-musl: src/ ## Make a statically linked release build of the client.
$(CARGO) build --release --target=$(MUSL_TARGET)
@cp target/$(MUSL_TARGET)/release/sota_client pkg/
-image: client-musl ## Build a Docker image from a statically linked binary.
+image: rust-openssl client-musl ## Build a Docker image from a statically linked binary.
@docker build -t advancedtelematic/sota-client pkg
define make-pkg
@@ -79,3 +80,7 @@ for-meta-rust:
/root/.cargo/bin/rustup override set 1.7.0 && \
cargo clean && \
cargo test"
+
+rust-openssl:
+ @git clone https://github.com/sfackler/rust-openssl $@
+ @echo 'paths = ["'$@'"]' > .cargo/config