summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-security/nmap/files/0001-fix-racing-between-build-ncat-and-build-lua.patch55
-rw-r--r--meta-oe/recipes-security/nmap/nmap_7.95.bb1
2 files changed, 56 insertions, 0 deletions
diff --git a/meta-oe/recipes-security/nmap/files/0001-fix-racing-between-build-ncat-and-build-lua.patch b/meta-oe/recipes-security/nmap/files/0001-fix-racing-between-build-ncat-and-build-lua.patch
new file mode 100644
index 0000000000..aad8b1ee92
--- /dev/null
+++ b/meta-oe/recipes-security/nmap/files/0001-fix-racing-between-build-ncat-and-build-lua.patch
@@ -0,0 +1,55 @@
1From 0cde425abfcacdde725dccff29d01c9fce7c3888 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Sun, 9 Feb 2025 00:45:36 +0000
4Subject: [PATCH] fix racing between build-ncat and build-lua
5
6There are two build-lua rules, one in Makefile.in, another in
7ncat/Makefile.in which is required by build-ncat
8
9Build them may cause potential racing
10
11$ bitbake lib32-nmap
12$ grep -e "Compiling liblua" -e 'nmap-7.95/liblua' -e ": error" -n patch-to/temp/log.do_compile
13Compiling liblua
14make[1]: Entering directory 'path-to/build/tmp/work/corei7-32-wrsmllib32-linux/lib32-nmap/7.95/nmap-7.95/liblua'
15Compiling liblua
16make[2]: Entering directory 'path-to/build/tmp/work/corei7-32-wrsmllib32-linux/lib32-nmap/7.95/nmap-7.95/liblua'
17make[2]: Leaving directory 'path-to/tmp/work/corei7-32-wrsmllib32-linux/lib32-nmap/7.95/nmap-7.95/liblua'
18path-to/tmp/work/corei7-32-wrsmllib32-linux/lib32-nmap/7.95/recipe-sysroot-native/usr/bin/i686-wrsmllib32-linux/../../libexec/i686-wrsmllib32-linux/gcc/i686-wrsmllib32-linux/14.2.0/ld: ./../liblua/liblua.a: error adding symbols: no more archived files
19collect2: error: ld returned 1 exit status
20make[1]: Leaving directory 'path-to/tmp/work/corei7-32-wrsmllib32-linux/lib32-nmap/7.95/nmap-7.95/liblua'
21
22Explicitly make build-ncat depends on build-lua to avoid racing,
23after applying the patch
24...
25Compiling liblua
26make[1]: Entering directory 'path-to/tmp/work/corei7-32-wrsmllib32-linux/lib32-nmap/7.95/nmap-7.95/liblua'
27make[1]: Leaving directory 'path-to/tmp/work/corei7-32-wrsmllib32-linux/lib32-nmap/7.95/nmap-7.95/liblua'
28Compiling liblua
29make[2]: Entering directory 'path-to/tmp/work/corei7-32-wrsmllib32-linux/lib32-nmap/7.95/nmap-7.95/liblua'
30make[2]: Leaving directory 'path-to/tmp/work/corei7-32-wrsmllib32-linux/lib32-nmap/7.95/nmap-7.95/liblua'
31...
32
33Upstream-Status: Submitted [https://github.com/nmap/nmap/pull/3025]
34
35Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
36---
37 Makefile.in | 2 +-
38 1 file changed, 1 insertion(+), 1 deletion(-)
39
40diff --git a/Makefile.in b/Makefile.in
41index e2f79c9..0e634a3 100644
42--- a/Makefile.in
43+++ b/Makefile.in
44@@ -159,7 +159,7 @@ build-netutil: libnetutil/Makefile
45 @echo Compiling libnetutil;
46 cd libnetutil && $(MAKE)
47
48-build-ncat: $(NCATDIR)/Makefile build-nbase build-nsock $(NCATDIR)/ncat.h @PCAP_BUILD@
49+build-ncat: $(NCATDIR)/Makefile build-nbase build-nsock build-lua $(NCATDIR)/ncat.h @PCAP_BUILD@
50 cd $(NCATDIR) && $(MAKE)
51
52 build-lua: $(LIBLUADIR)/Makefile
53--
542.47.1
55
diff --git a/meta-oe/recipes-security/nmap/nmap_7.95.bb b/meta-oe/recipes-security/nmap/nmap_7.95.bb
index a319be4fb0..f165e47bf5 100644
--- a/meta-oe/recipes-security/nmap/nmap_7.95.bb
+++ b/meta-oe/recipes-security/nmap/nmap_7.95.bb
@@ -11,6 +11,7 @@ SRC_URI = "http://nmap.org/dist/${BP}.tar.bz2 \
11 file://0001-Include-time.h-header-to-pass-clang-compilation.patch \ 11 file://0001-Include-time.h-header-to-pass-clang-compilation.patch \
12 file://0002-Fix-building-with-libc.patch \ 12 file://0002-Fix-building-with-libc.patch \
13 file://0003-Fix-off-by-one-overflow-in-the-IP-protocol-table.patch \ 13 file://0003-Fix-off-by-one-overflow-in-the-IP-protocol-table.patch \
14 file://0001-fix-racing-between-build-ncat-and-build-lua.patch \
14 " 15 "
15SRC_URI[sha256sum] = "e14ab530e47b5afd88f1c8a2bac7f89cd8fe6b478e22d255c5b9bddb7a1c5778" 16SRC_URI[sha256sum] = "e14ab530e47b5afd88f1c8a2bac7f89cd8fe6b478e22d255c5b9bddb7a1c5778"
16inherit autotools-brokensep pkgconfig python3native 17inherit autotools-brokensep pkgconfig python3native