aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2019-01-06 14:17:31 -0800
committerDaniel Mueller <deso@posteo.net>2019-01-06 14:17:31 -0800
commit47ac62fa4b70b2172b9f279d3bd41b6a8709a5a4 (patch)
tree4e251adcd193a626dd4c8e6f5449c8ea8ee61584
parentd080927468c7e0e0d03e08ceb01fdab85c3ba9fd (diff)
downloadnitrocli-47ac62fa4b70b2172b9f279d3bd41b6a8709a5a4.tar.gz
nitrocli-47ac62fa4b70b2172b9f279d3bd41b6a8709a5a4.tar.bz2
Use [patch] section to control local crate replacements
The nitrokey-sys crate poses a challenge in that upgrading it causes build errors caused by linking against the system's nitrokey library from multiple crates, which is not allowed. The exact cause of the problem is unclear but the suspicion is that a bug in Cargo's replacing logic is the cause of the issue. To work around this problem, this change switches to using the [patch] section for replacing crates with local copies instead of the [replace] one.
-rw-r--r--nitrocli/Cargo.lock91
-rw-r--r--nitrocli/Cargo.toml22
2 files changed, 25 insertions, 88 deletions
diff --git a/nitrocli/Cargo.lock b/nitrocli/Cargo.lock
index 484d1fc..c3a73d0 100644
--- a/nitrocli/Cargo.lock
+++ b/nitrocli/Cargo.lock
@@ -11,12 +11,6 @@ name = "argparse"
version = "0.2.2"
[[package]]
-name = "argparse"
-version = "0.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-replace = "argparse 0.2.2"
-
-[[package]]
name = "base32"
version = "0.4.0"
@@ -30,12 +24,6 @@ name = "cc"
version = "1.0.28"
[[package]]
-name = "cc"
-version = "1.0.28"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-replace = "cc 1.0.28"
-
-[[package]]
name = "cfg-if"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -72,18 +60,12 @@ name = "libc"
version = "0.2.45"
[[package]]
-name = "libc"
-version = "0.2.45"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-replace = "libc 0.2.45"
-
-[[package]]
name = "memchr"
version = "2.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.45",
"version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -91,10 +73,10 @@ dependencies = [
name = "nitrocli"
version = "0.2.2"
dependencies = [
- "argparse 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "argparse 0.2.2",
"base32 0.4.0",
- "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)",
- "nitrokey 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.45",
+ "nitrokey 0.3.1",
"nitrokey-test 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -103,31 +85,19 @@ dependencies = [
name = "nitrokey"
version = "0.3.1"
dependencies = [
- "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)",
- "nitrokey-sys 3.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.45",
+ "nitrokey-sys 3.4.1",
+ "rand 0.6.1",
]
[[package]]
-name = "nitrokey"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-replace = "nitrokey 0.3.1"
-
-[[package]]
name = "nitrokey-sys"
version = "3.4.1"
dependencies = [
- "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cc 1.0.28",
]
[[package]]
-name = "nitrokey-sys"
-version = "3.4.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-replace = "nitrokey-sys 3.4.1"
-
-[[package]]
name = "nitrokey-test"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -159,29 +129,23 @@ version = "0.6.1"
dependencies = [
"cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.45",
"rand_chacha 0.1.0",
"rand_core 0.3.0",
"rand_hc 0.1.0",
"rand_isaac 0.1.0",
"rand_pcg 0.1.1",
"rand_xorshift 0.1.0",
- "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc_version 0.2.3",
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
-name = "rand"
-version = "0.6.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-replace = "rand 0.6.1"
-
-[[package]]
name = "rand_chacha"
version = "0.1.0"
dependencies = [
"rand_core 0.3.0",
- "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc_version 0.2.3",
]
[[package]]
@@ -207,7 +171,7 @@ name = "rand_pcg"
version = "0.1.1"
dependencies = [
"rand_core 0.3.0",
- "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rustc_version 0.2.3",
]
[[package]]
@@ -241,39 +205,21 @@ dependencies = [
name = "rustc_version"
version = "0.2.3"
dependencies = [
- "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "semver 0.9.0",
]
[[package]]
-name = "rustc_version"
-version = "0.2.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-replace = "rustc_version 0.2.3"
-
-[[package]]
name = "semver"
version = "0.9.0"
dependencies = [
- "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "semver-parser 0.7.0",
]
[[package]]
-name = "semver"
-version = "0.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-replace = "semver 0.9.0"
-
-[[package]]
name = "semver-parser"
version = "0.7.0"
[[package]]
-name = "semver-parser"
-version = "0.7.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-replace = "semver-parser 0.7.0"
-
-[[package]]
name = "syn"
version = "0.15.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -332,27 +278,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[metadata]
"checksum aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1e9a933f4e58658d7b12defcf96dc5c720f20832deebe3e0a19efd3b6aaeeb9e"
-"checksum argparse 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3f8ebf5827e4ac4fd5946560e6a99776ea73b596d80898f357007317a7141e47"
"checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12"
-"checksum cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4a8b715cb4597106ea87c7c84b2f1d452c7492033765df7f32651e66fcf749"
"checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4"
"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"
"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
"checksum lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a374c89b9db55895453a74c1e38861d9deec0b01b405a82516e9d5de4820dea1"
-"checksum libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)" = "2d2857ec59fadc0773853c664d2d18e7198e83883e7060b63c924cb077bd5c74"
"checksum memchr 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "db4c41318937f6e76648f42826b1d9ade5c09cafb5aef7e351240a70f39206e9"
-"checksum nitrokey 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6449b0b10f39d98d8c6071088d2df076701a2d2d7835c23cace4e02517d16158"
-"checksum nitrokey-sys 3.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "34794d630d40a093a3f0e31b821b38ee1c16e6909dc42064feff28f4798484f4"
"checksum nitrokey-test 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6226eaa31d1bbb031314d9288eb0e1bf6a70e7053da7960fea13ee84cab330ea"
"checksum proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)" = "77619697826f31a02ae974457af0b29b723e5619e113e9397b8b82c6bd253f09"
"checksum quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "53fa22a1994bd0f9372d7a816207d8a2677ad0325b073f5c5332760f0fb62b5c"
-"checksum rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ae9d223d52ae411a33cf7e54ec6034ec165df296ccd23533d671a28252b6f66a"
"checksum regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "37e7cbbd370869ce2e8dff25c7018702d10b21a20ef7135316f8daecd6c25b7f"
"checksum regex-syntax 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4e47a2ed29da7a9e1960e1639e7a982e6edc6d49be308a3b02daf511504a16d1"
-"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a"
-"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
-"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
"checksum syn 0.15.23 (registry+https://github.com/rust-lang/crates.io-index)" = "9545a6a093a3f0bd59adb472700acc08cad3776f860f16a897dfce8c88721cbc"
"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b"
"checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86"
diff --git a/nitrocli/Cargo.toml b/nitrocli/Cargo.toml
index 279c6c9..0128925 100644
--- a/nitrocli/Cargo.toml
+++ b/nitrocli/Cargo.toml
@@ -60,14 +60,14 @@ version = "0.1.1"
[dev-dependencies.regex]
version = "1"
-[replace]
-"argparse:0.2.2" = { path = "../argparse" }
-"base32:0.4.0" = { path = "../base32" }
-"cc:1.0.28" = { path = "../cc" }
-"libc:0.2.45" = { path = "../libc" }
-"nitrokey:0.3.1" = { path = "../nitrokey" }
-"nitrokey-sys:3.4.1" = { path = "../nitrokey-sys" }
-"rand:0.6.1" = { path = "../rand" }
-"rustc_version:0.2.3" = { path = "../rustc_version" }
-"semver:0.9.0" = { path = "../semver" }
-"semver-parser:0.7.0" = { path = "../semver-parser" }
+[patch.crates-io]
+argparse = { path = "../argparse" }
+base32 = { path = "../base32" }
+cc = { path = "../cc" }
+libc = { path = "../libc" }
+nitrokey = { path = "../nitrokey" }
+nitrokey-sys = { path = "../nitrokey-sys" }
+rand = { path = "../rand" }
+rustc_version = { path = "../rustc_version" }
+semver = { path = "../semver" }
+semver-parser = { path = "../semver-parser" }