From ee83f7a0dbe98afb17f36750d91d1fa0fa1f340e Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Tue, 6 Jun 2017 17:19:02 -0600 Subject: [PATCH] rust: build fixes and nom update Update nom to ~3.0. Prefix dependencies with ~, which will allow for newer patch versions only. Minor version updates should get a test before using. Remove Cargo.lock from the repo, but still generate as part of the vendoring process for release builds. This will ensure that all users of a particular distribution tarball will be linking against the same Rust dependencies. --- rust/.gitignore | 1 + rust/Cargo.lock | 21 --------------------- rust/Cargo.toml.in | 4 ++-- rust/Makefile.am | 7 +++++-- 4 files changed, 8 insertions(+), 25 deletions(-) delete mode 100644 rust/Cargo.lock diff --git a/rust/.gitignore b/rust/.gitignore index f0a2dd8e95..09a7c19e6a 100644 --- a/rust/.gitignore +++ b/rust/.gitignore @@ -1,6 +1,7 @@ !Cargo.toml.in /.cargo/config /Cargo.toml +/Cargo.lock /target /vendor /gen diff --git a/rust/Cargo.lock b/rust/Cargo.lock deleted file mode 100644 index 75d791f3af..0000000000 --- a/rust/Cargo.lock +++ /dev/null @@ -1,21 +0,0 @@ -[root] -name = "suricata" -version = "4.0.0-dev" -dependencies = [ - "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", - "nom 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "libc" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "nom" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[metadata] -"checksum libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)" = "88ee81885f9f04bff991e306fea7c1c60a5f0f9e409e99f6b40e3311a3363135" -"checksum nom 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e5d4598834859fedb9a0a69d5b862a970e77982a92f544d547257a4d49469067" diff --git a/rust/Cargo.toml.in b/rust/Cargo.toml.in index dd90d4c45d..45e1fb5c0b 100644 --- a/rust/Cargo.toml.in +++ b/rust/Cargo.toml.in @@ -12,5 +12,5 @@ debug = true lua = [] [dependencies] -nom = "2.1.0" -libc = "0.2.0" +nom = "~3.0" +libc = "~0.2.0" diff --git a/rust/Makefile.am b/rust/Makefile.am index a3255d995b..d4bbd15a68 100644 --- a/rust/Makefile.am +++ b/rust/Makefile.am @@ -1,12 +1,12 @@ EXTRA_DIST = Cargo.toml \ - Cargo.lock \ src \ .cargo/config.in \ gen-c-headers.py \ gen/c-headers if HAVE_RUST -EXTRA_DIST += vendor +EXTRA_DIST += Cargo.lock \ + vendor endif if HAVE_RUST_VENDOR @@ -53,6 +53,9 @@ distclean-local: check: cd $(top_srcdir)/rust && CARGO_TARGET_DIR=$(abs_builddir)/target \ cargo test + +Cargo.lock: Cargo.toml + cargo update else all-local clean-local check: endif