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 c0e3fecc3b ("suricata: fix QA warnings")

Signed-off-by: Clayton Casciato <majortomtosourcecontrol@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
(cherry picked from commit 277bf8f916)
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
This commit is contained in:
Clayton Casciato
2025-05-19 18:06:42 -06:00
committed by Scott Murray
parent 4c8212c19f
commit 4eac7ea05d

View File

@@ -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