]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
rust: build fixes and nom update
authorJason Ish <ish@unx.ca>
Tue, 6 Jun 2017 23:19:02 +0000 (17:19 -0600)
committerJason Ish <ish@unx.ca>
Wed, 7 Jun 2017 02:25:45 +0000 (20:25 -0600)
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
rust/Cargo.lock [deleted file]
rust/Cargo.toml.in
rust/Makefile.am

index f0a2dd8e9510ed9b1348a92ceb7c7c89b0f2f3c6..09a7c19e6a66273651508214ee1c034336e427e5 100644 (file)
@@ -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 (file)
index 75d791f..0000000
+++ /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"
index dd90d4c45df00746708e4ff35bdd144003bd9fc6..45e1fb5c0b7804b78e9896f689b67cdb38d40406 100644 (file)
@@ -12,5 +12,5 @@ debug = true
 lua = []
 
 [dependencies]
-nom = "2.1.0"
-libc = "0.2.0"
+nom = "~3.0"
+libc = "~0.2.0"
index a3255d995bcde137ac1f061b58851af0db7512fd..d4bbd15a68770f9b3aabdc4831cb04f4856ed71c 100644 (file)
@@ -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