From 3a7eef812198118fa0b96059e70074bec5a8cdbe Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Thu, 24 Oct 2024 10:35:56 -0600 Subject: [PATCH] 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. --- rust/Cargo.lock.in | 4 ++-- rust/Cargo.toml.in | 2 +- rust/Makefile.am | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/rust/Cargo.lock.in b/rust/Cargo.lock.in index df3228dc0f82..c9bc24964d41 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 c69db937708e..a1b53e3b58ca 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 30e4803b3a30..be80a806f1aa 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)"