summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/lsof/files
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/lsof/files')
-rw-r--r--meta/recipes-extended/lsof/files/lsof-remove-host-information.patch76
-rw-r--r--meta/recipes-extended/lsof/files/remove-host-information.patch123
2 files changed, 123 insertions, 76 deletions
diff --git a/meta/recipes-extended/lsof/files/lsof-remove-host-information.patch b/meta/recipes-extended/lsof/files/lsof-remove-host-information.patch
deleted file mode 100644
index b7d2323dc9..0000000000
--- a/meta/recipes-extended/lsof/files/lsof-remove-host-information.patch
+++ /dev/null
@@ -1,76 +0,0 @@
1Remove host information from version.h
2
3make lsof not include host information
4
5Upstream-Status: Inappropriate [embedded specific]
6
7Signed-off-by: Li Wang <li.wang@windriver.com>
8---
9 dialects/linux/Makefile | 50 +++++++++--------------------------------------
10 1 file changed, 9 insertions(+), 41 deletions(-)
11
12diff --git a/dialects/linux/Makefile b/dialects/linux/Makefile
13index 2bea108..792142b 100644
14--- a/dialects/linux/Makefile
15+++ b/dialects/linux/Makefile
16@@ -76,48 +76,16 @@ version.h: FRC
17 @echo Constructing version.h
18 @rm -f version.h
19 @echo '#define LSOF_BLDCMT "${LSOF_BLDCMT}"' > version.h;
20- @echo '#define LSOF_CC "${CC}"' >> version.h
21- @echo '#define LSOF_CCV "${CCV}"' >> version.h
22- @echo '#define LSOF_CCDATE "'`date`'"' >> version.h
23- @echo '#define LSOF_CCFLAGS "'`echo ${CFLAGS} | sed 's/\\\\(/\\(/g' | sed 's/\\\\)/\\)/g' | sed 's/"/\\\\"/g'`'"' >> version.h
24+ @echo '#define LSOF_CC ""' >> version.h
25+ @echo '#define LSOF_CCV ""' >> version.h
26+ @echo '#define LSOF_CCDATE ""' >> version.h
27+ @echo '#define LSOF_CCFLAGS ""' >> version.h
28 @echo '#define LSOF_CINFO "${CINFO}"' >> version.h
29- @if [ "X${LSOF_HOST}" = "X" ]; then \
30- echo '#define LSOF_HOST "'`uname -n`'"' >> version.h; \
31- else \
32- if [ "${LSOF_HOST}" = "none" ]; then \
33- echo '#define LSOF_HOST ""' >> version.h; \
34- else \
35- echo '#define LSOF_HOST "${LSOF_HOST}"' >> version.h; \
36- fi \
37- fi
38- @echo '#define LSOF_LDFLAGS "${CFGL}"' >> version.h
39- @if [ "X${LSOF_LOGNAME}" = "X" ]; then \
40- echo '#define LSOF_LOGNAME "${LOGNAME}"' >> version.h; \
41- else \
42- if [ "${LSOF_LOGNAME}" = "none" ]; then \
43- echo '#define LSOF_LOGNAME ""' >> version.h; \
44- else \
45- echo '#define LSOF_LOGNAME "${LSOF_LOGNAME}"' >> version.h; \
46- fi; \
47- fi
48- @if [ "X${LSOF_SYSINFO}" = "X" ]; then \
49- echo '#define LSOF_SYSINFO "'`uname -a`'"' >> version.h; \
50- else \
51- if [ "${LSOF_SYSINFO}" = "none" ]; then \
52- echo '#define LSOF_SYSINFO ""' >> version.h; \
53- else \
54- echo '#define LSOF_SYSINFO "${LSOF_SYSINFO}"' >> version.h; \
55- fi \
56- fi
57- @if [ "X${LSOF_USER}" = "X" ]; then \
58- echo '#define LSOF_USER "${USER}"' >> version.h; \
59- else \
60- if [ "${LSOF_USER}" = "none" ]; then \
61- echo '#define LSOF_USER ""' >> version.h; \
62- else \
63- echo '#define LSOF_USER "${LSOF_USER}"' >> version.h; \
64- fi \
65- fi
66+ @echo '#define LSOF_HOST ""' >> version.h;
67+ @echo '#define LSOF_LDFLAGS ""' >> version.h
68+ @echo '#define LSOF_LOGNAME ""' >> version.h;
69+ @echo '#define LSOF_SYSINFO ""' >> version.h;
70+ @echo '#define LSOF_USER ""' >> version.h;
71 @sed '/VN/s/.ds VN \(.*\)/#define LSOF_VERSION "\1"/' < version >> version.h
72
73 FRC:
74--
751.7.9.5
76
diff --git a/meta/recipes-extended/lsof/files/remove-host-information.patch b/meta/recipes-extended/lsof/files/remove-host-information.patch
new file mode 100644
index 0000000000..1f2b4afa69
--- /dev/null
+++ b/meta/recipes-extended/lsof/files/remove-host-information.patch
@@ -0,0 +1,123 @@
1From 4f05492ac07a7bbaf06dd8265b9cba329e1b53e9 Mon Sep 17 00:00:00 2001
2From: Ross Burton <ross.burton@arm.com>
3Date: Wed, 30 Aug 2017 15:05:16 +0800
4Subject: [PATCH] lsof: remove host information from version.h
5
6lsof doesn't embed the username or hostname in the build if SOURCE_DATE_EPOCH is
7defined, but this still embeds build paths. Delete all of the host details to
8ensure that no host information is leaked into the binary.
9
10Upstream-Status: Inappropriate
11Signed-off-by: Ross Burton <ross.burton@arm.com>
12Signed-off-by: Alexander Kanavin <alex@linutronix.de>
13---
14 autotools/version.h.in | 16 ++++-----
15 lib/dialects/linux/Makefile | 69 ++++++-------------------------------
16 2 files changed, 19 insertions(+), 66 deletions(-)
17
18diff --git a/autotools/version.h.in b/autotools/version.h.in
19index aac0b80..2e635a5 100644
20--- a/autotools/version.h.in
21+++ b/autotools/version.h.in
22@@ -37,13 +37,13 @@
23
24 #include "config.h"
25 #define LSOF_VERSION PACKAGE_VERSION
26-#define LSOF_HOST "@host@"
27-#define LSOF_LOGNAME "@logname@"
28-#define LSOF_USER "@user@"
29-#define LSOF_CC "@cc@"
30-#define LSOF_CCV "@ccv@"
31-#define LSOF_CCFLAGS "@ccflags@"
32-#define LSOF_LDFLAGS "@ldflags@"
33-#define LSOF_SYSINFO "@sysinfo@"
34+#define LSOF_HOST ""
35+#define LSOF_LOGNAME ""
36+#define LSOF_USER ""
37+#define LSOF_CC ""
38+#define LSOF_CCV ""
39+#define LSOF_CCFLAGS ""
40+#define LSOF_LDFLAGS ""
41+#define LSOF_SYSINFO ""
42
43 #endif
44diff --git a/lib/dialects/linux/Makefile b/lib/dialects/linux/Makefile
45index f8adaa6..7a79ca7 100644
46--- a/lib/dialects/linux/Makefile
47+++ b/lib/dialects/linux/Makefile
48@@ -83,64 +83,17 @@ ${LIB}: FRC
49 version.h: FRC
50 @echo Constructing version.h
51 @rm -f version.h
52- @echo '#define LSOF_BLDCMT "${LSOF_BLDCMT}"' > version.h;
53- @echo '#define LSOF_CC "${CC}"' >> version.h
54- @echo '#define LSOF_CCV "${CCV}"' >> version.h
55- @echo '#define LSOF_CCFLAGS "'`echo ${CFLAGS} | sed 's/\\\\(/\\(/g' | sed 's/\\\\)/\\)/g' | sed 's/"/\\\\"/g'`'"' >> version.h
56- @echo '#define LSOF_CINFO "${CINFO}"' >> version.h
57- @if [ "X${LSOF_HOST}" = "X" ]; then \
58- if [ "X${SOURCE_DATE_EPOCH}" = "X" ]; then \
59- echo '#define LSOF_HOST "'`uname -n`'"' >> version.h; \
60- else \
61- echo '#define LSOF_HOST ""' >> version.h; \
62- fi \
63- else \
64- if [ "${LSOF_HOST}" = "none" ]; then \
65- echo '#define LSOF_HOST ""' >> version.h; \
66- else \
67- echo '#define LSOF_HOST "${LSOF_HOST}"' >> version.h; \
68- fi \
69- fi
70- @echo '#define LSOF_LDFLAGS "${CFGL}"' >> version.h
71- @if [ "X${LSOF_LOGNAME}" = "X" ]; then \
72- if [ "X${SOURCE_DATE_EPOCH}" = "X" ]; then \
73- echo '#define LSOF_LOGNAME "${LOGNAME}"' >> version.h; \
74- else \
75- echo '#define LSOF_LOGNAME ""' >> version.h; \
76- fi \
77- else \
78- if [ "${LSOF_LOGNAME}" = "none" ]; then \
79- echo '#define LSOF_LOGNAME ""' >> version.h; \
80- else \
81- echo '#define LSOF_LOGNAME "${LSOF_LOGNAME}"' >> version.h; \
82- fi; \
83- fi
84- @if [ "X${LSOF_SYSINFO}" = "X" ]; then \
85- if [ "X${SOURCE_DATE_EPOCH}" = "X" ]; then \
86- echo '#define LSOF_SYSINFO "'`uname -a`'"' >> version.h; \
87- else \
88- echo '#define LSOF_SYSINFO ""' >> version.h; \
89- fi \
90- else \
91- if [ "${LSOF_SYSINFO}" = "none" ]; then \
92- echo '#define LSOF_SYSINFO ""' >> version.h; \
93- else \
94- echo '#define LSOF_SYSINFO "${LSOF_SYSINFO}"' >> version.h; \
95- fi \
96- fi
97- @if [ "X${LSOF_USER}" = "X" ]; then \
98- if [ "X${SOURCE_DATE_EPOCH}" = "X" ]; then \
99- echo '#define LSOF_USER "${USER}"' >> version.h; \
100- else \
101- echo '#define LSOF_USER ""' >> version.h; \
102- fi \
103- else \
104- if [ "${LSOF_USER}" = "none" ]; then \
105- echo '#define LSOF_USER ""' >> version.h; \
106- else \
107- echo '#define LSOF_USER "${LSOF_USER}"' >> version.h; \
108- fi \
109- fi
110+
111+ @echo '#define LSOF_BLDCMT ""' > version.h;
112+ @echo '#define LSOF_CC ""' >> version.h
113+ @echo '#define LSOF_CCV ""' >> version.h
114+ @echo '#define LSOF_CCFLAGS ""' >> version.h
115+ @echo '#define LSOF_CINFO ""' >> version.h
116+ @echo '#define LSOF_HOST ""' >> version.h
117+ @echo '#define LSOF_LDFLAGS ""' >> version.h
118+ @echo '#define LSOF_LOGNAME ""' >> version.h
119+ @echo '#define LSOF_SYSINFO ""' >> version.h
120+ @echo '#define LSOF_USER ""' >> version.h
121 @sed '/VN/s/.ds VN \(.*\)/#define LSOF_VERSION "\1"/' < version >> version.h
122
123 FRC: