From 4eac7ea05daeb2281d251f556a6a800e9a937932 Mon Sep 17 00:00:00 2001 From: Clayton Casciato Date: Mon, 19 May 2025 18:06:42 -0600 Subject: [PATCH] suricata: resolve TMPDIR QA issues in do_configure ERROR: suricata-7.0.0-r0 do_package_qa: QA Issue: File /usr/bin/suricata in package suricata contains reference to TMPDIR [buildpaths] ERROR: suricata-7.0.0-r0 do_package_qa: QA Issue: File /usr/src/debug/suricata/7.0.0/src/build-info.h in package suricata-src contains reference to TMPDIR [buildpaths] Address references when src/build-info.h is being written This is similar to Debian's approach: https://sources.debian.org/patches/suricata/1:7.0.10-1~bpo12%2B1/reproducible.patch/ Restore the "already-stripped" check and CFLAGS info Original resolution in commit c0e3fecc3bea ("suricata: fix QA warnings") Signed-off-by: Clayton Casciato Signed-off-by: Armin Kuster (cherry picked from commit 277bf8f9160540d582fec58f0f2139b4e4aebef0) Signed-off-by: Scott Murray --- recipes-ids/suricata/suricata_7.0.0.bb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/recipes-ids/suricata/suricata_7.0.0.bb b/recipes-ids/suricata/suricata_7.0.0.bb index 58ed688..e2e94e2 100644 --- a/recipes-ids/suricata/suricata_7.0.0.bb +++ b/recipes-ids/suricata/suricata_7.0.0.bb @@ -85,9 +85,25 @@ do_configure:prepend () { # use host for RUST_SURICATA_LIB_XC_DIR sed -i -e 's,\${host_alias},${RUST_HOST_SYS},' ${S}/configure.ac sed -i -e 's,libsuricata_rust.a,libsuricata.a,' ${S}/configure.ac + # Address build configuration written to src/build-info.h + sed -i -e 's,\(| sed -e '\''s/^/"/'\''\)\( |\),\1 -e '\''s#${WORKDIR}#\\.#g'\''\2,' ${S}/configure.ac oe_runconf } +CFLAGS += "-Wno-error=incompatible-pointer-types" + +# Commit 7a2b9acef2 cargo: pass PACKAGECONFIG_CONFARGS to cargo build +# breaks building this recipe. Providing a copy of the original function +# Armin 2025/04/01 +# +oe_cargo_build () { + export RUSTFLAGS="${RUSTFLAGS}" + bbnote "Using rust targets from ${RUST_TARGET_PATH}" + bbnote "cargo = $(which ${CARGO})" + bbnote "${CARGO} build ${CARGO_BUILD_FLAGS}$@" + "${CARGO}" build ${CARGO_BUILD_FLAGS}"$@" +} + do_compile () { # we do this to bypass the make provided by this pkg # patches Makefile to skip the subdir