diff mbox series

[meta-oe] minifi-cpp: Remove the buildpath issue

Message ID 20230918072759.106442-1-mingli.yu@windriver.com
State Under Review
Headers show
Series [meta-oe] minifi-cpp: Remove the buildpath issue | expand

Commit Message

Yu, Mingli Sept. 18, 2023, 7:27 a.m. UTC
From: Mingli Yu <mingli.yu@windriver.com>

Don't override CFLAGS and just append the "-fPIC" to CFLAGS to make
sure -fdebug-prefix-map option passed to compiler to fix the below
issue:
  WARNING: minifi-cpp-0.7.0-r0 do_package_qa: QA Issue: File /usr/bin/.debug/minificontroller in package minifi-cpp-dbg contains reference to TMPDIR
  File /usr/bin/.debug/minifi in package minifi-cpp-dbg contains reference to TMPDIR [buildpaths]

Pass the OPENSSLDIR to avoid introducing the build path to fix the
below issue:
  WARNING: minifi-cpp-0.7.0-r0 do_package_qa: QA Issue: File /usr/bin/minificontroller in package minifi-cpp contains reference to TMPDIR
  File /usr/bin/minifi in package minifi-cpp contains reference to TMPDIR [buildpaths]

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
---
 ...SPUUID.cmake-Pass-CFLAGS-to-compiler.patch | 33 +++++++++++++++++++
 ...1-CMakeLists.txt-Pass-the-OPENSSLDIR.patch | 31 +++++++++++++++++
 .../minifi-cpp/minifi-cpp_0.7.0.bb            |  5 +++
 3 files changed, 69 insertions(+)
 create mode 100644 meta-oe/recipes-extended/minifi-cpp/files/0001-BundledOSSPUUID.cmake-Pass-CFLAGS-to-compiler.patch
 create mode 100644 meta-oe/recipes-extended/minifi-cpp/files/0001-CMakeLists.txt-Pass-the-OPENSSLDIR.patch
diff mbox series

Patch

diff --git a/meta-oe/recipes-extended/minifi-cpp/files/0001-BundledOSSPUUID.cmake-Pass-CFLAGS-to-compiler.patch b/meta-oe/recipes-extended/minifi-cpp/files/0001-BundledOSSPUUID.cmake-Pass-CFLAGS-to-compiler.patch
new file mode 100644
index 000000000..a0265eaa3
--- /dev/null
+++ b/meta-oe/recipes-extended/minifi-cpp/files/0001-BundledOSSPUUID.cmake-Pass-CFLAGS-to-compiler.patch
@@ -0,0 +1,33 @@ 
+From ab031c2b1f8c03e23a8dc8a95c9c9e9b8ce397b2 Mon Sep 17 00:00:00 2001
+From: Mingli Yu <mingli.yu@windriver.com>
+Date: Fri, 15 Sep 2023 11:32:11 +0800
+Subject: [PATCH] BundledOSSPUUID.cmake: Pass CFLAGS to compiler
+
+Make sure -fdebug-prefix-map options are passed to compiler to fix the
+below warning:
+  WARNING: minifi-cpp-0.7.0-r0 do_package_qa: QA Issue: File /usr/bin/.debug/minificontroller in package minifi-cpp-dbg contains reference to TMPDIR
+File /usr/bin/.debug/minifi in package minifi-cpp-dbg contains reference to TMPDIR [buildpaths]
+
+Upsteam-Status: Pending
+
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+---
+ cmake/BundledOSSPUUID.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmake/BundledOSSPUUID.cmake b/cmake/BundledOSSPUUID.cmake
+index 0cf4bac0..ec57ef51 100644
+--- a/cmake/BundledOSSPUUID.cmake
++++ b/cmake/BundledOSSPUUID.cmake
+@@ -37,7 +37,7 @@ function(use_bundled_osspuuid SOURCE_DIR BINARY_DIR)
+     ENDFOREACH(BYPRODUCT)
+ 
+     # Build project
+-    set(CONFIGURE_COMMAND ac_cv_va_copy=C99 ./configure CFLAGS=-fPIC CXXFLAGS=-fPIC --host=${HOST_SYS}
++    set(CONFIGURE_COMMAND ac_cv_va_copy=C99 ./configure CXXFLAGS=-fPIC --host=${HOST_SYS}
+         --with-cxx --without-perl --without-php --without-pgsql
+         --prefix=${BINARY_DIR}/thirdparty/ossp-uuid-install)
+     string(TOLOWER "${CMAKE_BUILD_TYPE}" build_type)
+-- 
+2.25.1
+
diff --git a/meta-oe/recipes-extended/minifi-cpp/files/0001-CMakeLists.txt-Pass-the-OPENSSLDIR.patch b/meta-oe/recipes-extended/minifi-cpp/files/0001-CMakeLists.txt-Pass-the-OPENSSLDIR.patch
new file mode 100644
index 000000000..158fed559
--- /dev/null
+++ b/meta-oe/recipes-extended/minifi-cpp/files/0001-CMakeLists.txt-Pass-the-OPENSSLDIR.patch
@@ -0,0 +1,31 @@ 
+From 0c5735a0a02e15c3eae94d25fb8756285d121ddb Mon Sep 17 00:00:00 2001
+From: Mingli Yu <mingli.yu@windriver.com>
+Date: Fri, 15 Sep 2023 10:59:05 +0800
+Subject: [PATCH] CMakeLists.txt: Pass the OPENSSLDIR
+
+Fixes:
+  WARNING: minifi-cpp-0.7.0-r0 do_package_qa: QA Issue: File /usr/bin/minificontroller in package minifi-cpp contains reference to TMPDIR
+  File /usr/bin/minifi in package minifi-cpp contains reference to TMPDIR [buildpaths]
+
+Upstream-Status: Pending
+
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 215a4ef4..6fe8101f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -75,6 +75,7 @@ set(PASSTHROUGH_CMAKE_ARGS -DANDROID_ABI=${ANDROID_ABI}
+                            -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=${CMAKE_FIND_ROOT_PATH_MODE_LIBRARY}
+                            -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=${CMAKE_FIND_ROOT_PATH_MODE_INCLUDE}
+                            -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
++                           -DOPENSSLDIR=${OPENSSLDIR}
+ 						   ${OPENSSL_PASSTHROUGH}
+                            -G${CMAKE_GENERATOR})
+ 
+-- 
+2.25.1
+
diff --git a/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb b/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb
index 0986fdec0..b75a33695 100644
--- a/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb
+++ b/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb
@@ -35,6 +35,8 @@  SRC_URI = "git://github.com/apache/nifi-minifi-cpp.git;branch=master;protocol=ht
             file://0001-Do-not-use-LFS64-functions-on-linux-musl.patch \
             file://0001-Fix-the-constness-issues-around-autovector-iterator_.patch \
             file://0002-Fix-build-with-clang-17.patch \
+            file://0001-CMakeLists.txt-Pass-the-OPENSSLDIR.patch \
+            file://0001-BundledOSSPUUID.cmake-Pass-CFLAGS-to-compiler.patch \
             file://minifi.service \
             file://systemd-volatile.conf \
             file://sysvinit-volatile.conf \
@@ -65,7 +67,10 @@  EXTRA_OECMAKE += " \
     -DDISABLE_PYTHON_SCRIPTING=ON \
     -DFLEX_TARGET_ARG_COMPILE_FLAGS='--noline' \
     -DBISON_TARGET_ARG_COMPILE_FLAGS='--no-lines --file-prefix-map=${S}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}' \
+    -DOPENSSLDIR=${sysconfdir}/libressl \
     "
+
+CFLAGS:append = " -fPIC"
 EXTRA_OECMAKE:append:toolchain-clang = " -DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ranlib"
 LDFLAGS:append:toolchain-clang = " -fuse-ld=lld"