lua: update to newer lua crate

This crate lets us instruct it where to copy the header files instead
of our Makefile trying to find the correct ones and copying them into
place.

Can prevent the simultaneous copy errors sometimes seen on a make
without a clean.
pull/12049/head
Jason Ish 10 months ago committed by Victor Julien
parent 9ffb2cd7dd
commit 3a7eef8121

@ -1009,9 +1009,9 @@ dependencies = [
[[package]] [[package]]
name = "suricata-lua-sys" name = "suricata-lua-sys"
version = "0.1.0-alpha.1" version = "0.1.0-alpha.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "27aba92b2bc53955440218aed3fa6e6f4cf6cba443deb8fed7e216e6b1d96af2" checksum = "aed3f46aa1b92feb15880f722bbce121e769bda1770f0090121cd6c920d89450"
dependencies = [ dependencies = [
"fs_extra", "fs_extra",
] ]

@ -67,7 +67,7 @@ time = "~0.3.36"
suricata-derive = { path = "./derive", version = "@PACKAGE_VERSION@" } suricata-derive = { path = "./derive", version = "@PACKAGE_VERSION@" }
suricata-lua-sys = { version = "0.1.0-alpha.1" } suricata-lua-sys = { version = "0.1.0-alpha.3" }
[dev-dependencies] [dev-dependencies]
test-case = "~3.3.1" test-case = "~3.3.1"

@ -35,16 +35,19 @@ RUST_TARGET = --target $(host_triplet)
endif endif
all-local: Cargo.toml all-local: Cargo.toml
mkdir -p $(abs_top_builddir)/rust/gen
if HAVE_CYGPATH if HAVE_CYGPATH
cd $(abs_top_srcdir)/rust && \ cd $(abs_top_srcdir)/rust && \
@rustup_home@ CARGO_HOME="$(CARGO_HOME)" \ @rustup_home@ CARGO_HOME="$(CARGO_HOME)" \
CARGO_TARGET_DIR="$(e_rustdir)/target" \ CARGO_TARGET_DIR="$(e_rustdir)/target" \
SURICATA_LUA_SYS_HEADER_DST="$(e_rustdir)/gen" \
$(CARGO) build $(RELEASE) \ $(CARGO) build $(RELEASE) \
--features "$(RUST_FEATURES)" $(RUST_TARGET) --features "$(RUST_FEATURES)" $(RUST_TARGET)
else else
cd $(abs_top_srcdir)/rust && \ cd $(abs_top_srcdir)/rust && \
@rustup_home@ CARGO_HOME="$(CARGO_HOME)" \ @rustup_home@ CARGO_HOME="$(CARGO_HOME)" \
CARGO_TARGET_DIR="$(abs_top_builddir)/rust/target" \ CARGO_TARGET_DIR="$(abs_top_builddir)/rust/target" \
SURICATA_LUA_SYS_HEADER_DST="$(abs_top_builddir)/rust/gen" \
$(CARGO) build $(RELEASE) $(NIGHTLY_ARGS) \ $(CARGO) build $(RELEASE) $(NIGHTLY_ARGS) \
--features "$(RUST_FEATURES)" $(RUST_TARGET) --features "$(RUST_FEATURES)" $(RUST_TARGET)
endif endif
@ -57,9 +60,6 @@ endif
$(RUST_SURICATA_LIBDIR)/${RUST_SURICATA_LIBNAME}; \ $(RUST_SURICATA_LIBDIR)/${RUST_SURICATA_LIBNAME}; \
fi fi
$(MAKE) gen/rust-bindings.h $(MAKE) gen/rust-bindings.h
mkdir -p $(abs_top_builddir)/rust/gen
cp -a $(RUST_SURICATA_LIBDIR)/build/suricata-lua-sys-*/out/lua/*.h \
$(abs_top_builddir)/rust/gen/
install-library: install-library:
$(MKDIR_P) "$(DESTDIR)$(libdir)" $(MKDIR_P) "$(DESTDIR)$(libdir)"

Loading…
Cancel
Save