From: Jason Ish Date: Thu, 24 Oct 2024 16:35:56 +0000 (-0600) Subject: lua: update to newer lua crate X-Git-Tag: suricata-8.0.0-beta1~749 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a7eef812198118fa0b96059e70074bec5a8cdbe;p=thirdparty%2Fsuricata.git 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. --- diff --git a/rust/Cargo.lock.in b/rust/Cargo.lock.in index df3228dc0f..c9bc24964d 100644 --- a/rust/Cargo.lock.in +++ b/rust/Cargo.lock.in @@ -1009,9 +1009,9 @@ dependencies = [ [[package]] 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" -checksum = "27aba92b2bc53955440218aed3fa6e6f4cf6cba443deb8fed7e216e6b1d96af2" +checksum = "aed3f46aa1b92feb15880f722bbce121e769bda1770f0090121cd6c920d89450" dependencies = [ "fs_extra", ] diff --git a/rust/Cargo.toml.in b/rust/Cargo.toml.in index c69db93770..a1b53e3b58 100644 --- a/rust/Cargo.toml.in +++ b/rust/Cargo.toml.in @@ -67,7 +67,7 @@ time = "~0.3.36" 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] test-case = "~3.3.1" diff --git a/rust/Makefile.am b/rust/Makefile.am index 30e4803b3a..be80a806f1 100644 --- a/rust/Makefile.am +++ b/rust/Makefile.am @@ -35,16 +35,19 @@ RUST_TARGET = --target $(host_triplet) endif all-local: Cargo.toml + mkdir -p $(abs_top_builddir)/rust/gen if HAVE_CYGPATH cd $(abs_top_srcdir)/rust && \ @rustup_home@ CARGO_HOME="$(CARGO_HOME)" \ CARGO_TARGET_DIR="$(e_rustdir)/target" \ + SURICATA_LUA_SYS_HEADER_DST="$(e_rustdir)/gen" \ $(CARGO) build $(RELEASE) \ --features "$(RUST_FEATURES)" $(RUST_TARGET) else cd $(abs_top_srcdir)/rust && \ @rustup_home@ CARGO_HOME="$(CARGO_HOME)" \ CARGO_TARGET_DIR="$(abs_top_builddir)/rust/target" \ + SURICATA_LUA_SYS_HEADER_DST="$(abs_top_builddir)/rust/gen" \ $(CARGO) build $(RELEASE) $(NIGHTLY_ARGS) \ --features "$(RUST_FEATURES)" $(RUST_TARGET) endif @@ -57,9 +60,6 @@ endif $(RUST_SURICATA_LIBDIR)/${RUST_SURICATA_LIBNAME}; \ fi $(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: $(MKDIR_P) "$(DESTDIR)$(libdir)"