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.
pull/2756/head
Jason Ish 8 years ago
parent 889a6de926
commit ee83f7a0db

1
rust/.gitignore vendored

@ -1,6 +1,7 @@
!Cargo.toml.in !Cargo.toml.in
/.cargo/config /.cargo/config
/Cargo.toml /Cargo.toml
/Cargo.lock
/target /target
/vendor /vendor
/gen /gen

21
rust/Cargo.lock generated

@ -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"

@ -12,5 +12,5 @@ debug = true
lua = [] lua = []
[dependencies] [dependencies]
nom = "2.1.0" nom = "~3.0"
libc = "0.2.0" libc = "~0.2.0"

@ -1,12 +1,12 @@
EXTRA_DIST = Cargo.toml \ EXTRA_DIST = Cargo.toml \
Cargo.lock \
src \ src \
.cargo/config.in \ .cargo/config.in \
gen-c-headers.py \ gen-c-headers.py \
gen/c-headers gen/c-headers
if HAVE_RUST if HAVE_RUST
EXTRA_DIST += vendor EXTRA_DIST += Cargo.lock \
vendor
endif endif
if HAVE_RUST_VENDOR if HAVE_RUST_VENDOR
@ -53,6 +53,9 @@ distclean-local:
check: check:
cd $(top_srcdir)/rust && CARGO_TARGET_DIR=$(abs_builddir)/target \ cd $(top_srcdir)/rust && CARGO_TARGET_DIR=$(abs_builddir)/target \
cargo test cargo test
Cargo.lock: Cargo.toml
cargo update
else else
all-local clean-local check: all-local clean-local check:
endif endif

Loading…
Cancel
Save