From: Mingli Yu <[email protected]>

Fixes:
  WARNING: s-nail-14.9.24-r0 do_package_qa: QA Issue: File /usr/bin/s-nail in 
package s-nail contains reference to TMPDIR [buildpaths]

Signed-off-by: Mingli Yu <[email protected]>
---
 ...e-config.sh-not-reveal-the-build-env.patch | 43 +++++++++++++++++++
 .../recipes-extended/s-nail/s-nail_14.9.24.bb |  1 +
 2 files changed, 44 insertions(+)
 create mode 100644 
meta-oe/recipes-extended/s-nail/files/0001-mk-make-config.sh-not-reveal-the-build-env.patch

diff --git 
a/meta-oe/recipes-extended/s-nail/files/0001-mk-make-config.sh-not-reveal-the-build-env.patch
 
b/meta-oe/recipes-extended/s-nail/files/0001-mk-make-config.sh-not-reveal-the-build-env.patch
new file mode 100644
index 000000000..18ef6cae2
--- /dev/null
+++ 
b/meta-oe/recipes-extended/s-nail/files/0001-mk-make-config.sh-not-reveal-the-build-env.patch
@@ -0,0 +1,43 @@
+From fa93dab6393527673e642f26b6ea2c4413dd3cfe Mon Sep 17 00:00:00 2001
+From: Mingli Yu <[email protected]>
+Date: Wed, 27 Jul 2022 13:40:12 +0800
+Subject: [PATCH] make-config.sh: hidden the build info
+
+Use the CC as placeholder to replace the real build information which
+will be collected via src/mx/accmacvar.c and then added in the final
+binary s-nail, so hidden the build info to avoid revealing the detailed
+build info.
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Mingli Yu <[email protected]>
+---
+ mk/make-config.sh | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/mk/make-config.sh b/mk/make-config.sh
+index 2d7c619..9146004 100644
+--- a/mk/make-config.sh
++++ b/mk/make-config.sh
+@@ -3637,15 +3637,15 @@ LIBS=`squeeze_ws "${LIBS}"`
+ COMMLINE=`printf '%s\n' "${COMMLINE}" | ${sed} -e 's/.*--\(.*\)/\1/'`
+ COMMLINE=`squeeze_ws "${COMMLINE}"`
+ 
+-i=`printf '%s %s %s\n' "${CC}" "${CFLAGS}" "${i}"`
++i="CC"
+    printf '#define VAL_BUILD_CC "%s"\n' "$i" >> ${h}
+    i=`string_to_char_array "${i}"`
+    printf '#define VAL_BUILD_CC_ARRAY %s\n' "$i" >> ${h}
+-i=`printf '%s %s %s\n' "${CC}" "${LDFLAGS}" "${LIBS}"`
++i="CC"
+    printf '#define VAL_BUILD_LD "%s"\n' "$i" >> ${h}
+    i=`string_to_char_array "${i}"`
+    printf '#define VAL_BUILD_LD_ARRAY %s\n' "$i" >> ${h}
+-i=${COMMLINE}
++i="CC"
+    printf '#define VAL_BUILD_REST "%s"\n' "$i" >> ${h}
+    i=`string_to_char_array "${i}"`
+    printf '#define VAL_BUILD_REST_ARRAY %s\n' "$i" >> ${h}
+-- 
+2.25.1
+
diff --git a/meta-oe/recipes-extended/s-nail/s-nail_14.9.24.bb 
b/meta-oe/recipes-extended/s-nail/s-nail_14.9.24.bb
index 6e004fc90..bcdb1e478 100644
--- a/meta-oe/recipes-extended/s-nail/s-nail_14.9.24.bb
+++ b/meta-oe/recipes-extended/s-nail/s-nail_14.9.24.bb
@@ -10,6 +10,7 @@ SRC_URI = "https://ftp.sdaoden.eu/${BP}.tar.xz \
            file://0001-make.rc-set-VAL_MTA.patch \
            file://0001-su_INLINE-gcc-only-GNU-specifics-after-Og.patch \
            file://0001-su_INLINE-eh-no-give-up-share-detection.patch \
+           file://0001-mk-make-config.sh-not-reveal-the-build-env.patch \
 "
 SRC_URI[sha256sum] = 
"2714d6b8fb2af3b363fc7c79b76d058753716345d1b6ebcd8870ecd0e4f7ef8c"
 
-- 
2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#98001): 
https://lists.openembedded.org/g/openembedded-devel/message/98001
Mute This Topic: https://lists.openembedded.org/mt/92644990/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to