From f68b06798fc551d0b9b97cd9c931183ba6134729 Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Mon, 30 Jun 2025 08:56:55 -0600 Subject: [PATCH] rust/htp: follow suricata versioning Have htp follow Suricata versioning so we don't have to worry about version updates as it changes. For example, between 8.0.0-beta1 and 8.0.0-rc1 there were changes to the htp, however the version stayed at 2.0.0 making it impossible to publish these changes to crates.io. --- configure.ac | 1 + rust/Cargo.lock.in | 2 +- rust/Cargo.toml.in | 2 +- rust/Makefile.am | 6 +++--- rust/htp/.gitignore | 1 - rust/htp/{Cargo.toml => Cargo.toml.in} | 2 +- rust/htp/Makefile.am | 3 +++ 7 files changed, 10 insertions(+), 7 deletions(-) delete mode 100644 rust/htp/.gitignore rename rust/htp/{Cargo.toml => Cargo.toml.in} (96%) create mode 100644 rust/htp/Makefile.am diff --git a/configure.ac b/configure.ac index 17bb5ecc11..919866cde0 100644 --- a/configure.ac +++ b/configure.ac @@ -2537,6 +2537,7 @@ AC_CONFIG_FILES(Makefile src/Makefile rust/Makefile rust/Cargo.lock rust/Cargo.t AC_CONFIG_FILES(rust/sys/Makefile rust/sys/Cargo.toml) AC_CONFIG_FILES(rust/suricatactl/Makefile rust/suricatactl/Cargo.toml) AC_CONFIG_FILES(rust/suricatasc/Makefile rust/suricatasc/Cargo.toml) +AC_CONFIG_FILES(rust/htp/Makefile rust/htp/Cargo.toml) AC_CONFIG_FILES(qa/Makefile qa/coccinelle/Makefile) AC_CONFIG_FILES(rules/Makefile doc/Makefile doc/userguide/Makefile) AC_CONFIG_FILES(suricata.yaml etc/Makefile etc/suricata.logrotate etc/suricata.service) diff --git a/rust/Cargo.lock.in b/rust/Cargo.lock.in index 51972efc8a..8d8539b02f 100644 --- a/rust/Cargo.lock.in +++ b/rust/Cargo.lock.in @@ -1569,7 +1569,7 @@ dependencies = [ [[package]] name = "suricata-htp" -version = "2.0.0" +version = "8.0.0-dev" dependencies = [ "base64", "brotli", diff --git a/rust/Cargo.toml.in b/rust/Cargo.toml.in index bddc8cd798..4d656df7f6 100644 --- a/rust/Cargo.toml.in +++ b/rust/Cargo.toml.in @@ -87,7 +87,7 @@ suricata-sys = { path = "./sys", version = "@PACKAGE_VERSION@" } suricata-lua-sys = { version = "5.4.8002" } -htp = { package = "suricata-htp", path = "./htp", version = "2.0.0" } +htp = { package = "suricata-htp", path = "./htp", version = "@PACKAGE_VERSION@" } [dev-dependencies] test-case = "~3.3.1" diff --git a/rust/Makefile.am b/rust/Makefile.am index e7f176c7ea..2dccf1209c 100644 --- a/rust/Makefile.am +++ b/rust/Makefile.am @@ -1,4 +1,5 @@ -SUBDIRS = sys \ +SUBDIRS = htp \ + sys \ suricatasc \ suricatactl @@ -13,8 +14,7 @@ EXTRA_DIST = src derive htp \ sys \ sys/Cargo.toml \ suricatasc \ - suricatactl \ - htp/Cargo.toml + suricatactl if !DEBUG RELEASE = --release diff --git a/rust/htp/.gitignore b/rust/htp/.gitignore deleted file mode 100644 index 01c3566232..0000000000 --- a/rust/htp/.gitignore +++ /dev/null @@ -1 +0,0 @@ -!Cargo.toml diff --git a/rust/htp/Cargo.toml b/rust/htp/Cargo.toml.in similarity index 96% rename from rust/htp/Cargo.toml rename to rust/htp/Cargo.toml.in index 2c9a7f9026..883182e080 100644 --- a/rust/htp/Cargo.toml +++ b/rust/htp/Cargo.toml.in @@ -1,6 +1,6 @@ [package] name = "suricata-htp" -version = "2.0.0" +version = "@PACKAGE_VERSION@" edition = "2021" autobins = false license-file = "LICENSE" diff --git a/rust/htp/Makefile.am b/rust/htp/Makefile.am new file mode 100644 index 0000000000..acf00aeb68 --- /dev/null +++ b/rust/htp/Makefile.am @@ -0,0 +1,3 @@ +EXTRA_DIST = Cargo.toml + +all-local: Cargo.toml