summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/lsof
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/lsof')
-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
-rw-r--r--meta/recipes-extended/lsof/lsof_4.91.bb63
-rw-r--r--meta/recipes-extended/lsof/lsof_4.99.3.bb23
4 files changed, 146 insertions, 139 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:
diff --git a/meta/recipes-extended/lsof/lsof_4.91.bb b/meta/recipes-extended/lsof/lsof_4.91.bb
deleted file mode 100644
index b3adfd57af..0000000000
--- a/meta/recipes-extended/lsof/lsof_4.91.bb
+++ /dev/null
@@ -1,63 +0,0 @@
1SUMMARY = "LiSt Open Files tool"
2DESCRIPTION = "Lsof is a Unix-specific diagnostic tool. \
3Its name stands for LiSt Open Files, and it does just that."
4HOMEPAGE = "http://people.freebsd.org/~abe/"
5SECTION = "devel"
6LICENSE = "BSD"
7LIC_FILES_CHKSUM = "file://00README;beginline=645;endline=679;md5=964df275d26429ba3b39dbb9f205172a"
8
9# Upstream lsof releases are hosted on an ftp server which times out download
10# attempts from hosts for which it can not perform a DNS reverse-lookup (See:
11# https://people.freebsd.org/~abe/ ). http://www.mirrorservice.org seems to be
12# the most commonly used alternative.
13
14SRC_URI = "http://www.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_${PV}.tar.bz2 \
15 file://lsof-remove-host-information.patch \
16 "
17
18SRC_URI[md5sum] = "148ed410cb52e08c2adc0c60f480f11f"
19SRC_URI[sha256sum] = "c9da946a525fbf82ff80090b6d1879c38df090556f3fe0e6d782cb44172450a3"
20
21LOCALSRC = "file://${WORKDIR}/lsof_${PV}/lsof_${PV}_src.tar"
22
23S = "${WORKDIR}/lsof_${PV}_src"
24
25python do_unpack () {
26 if not bb.data.inherits_class('externalsrc', d) or not d.getVar('EXTERNALSRC'):
27 # temporarily change S for unpack of lsof_${PV}
28 s = d.getVar('S', False)
29 d.setVar('S', '${WORKDIR}/lsof_${PV}')
30 bb.build.exec_func('base_do_unpack', d)
31 # temporarily change SRC_URI for unpack of lsof_${PV}_src
32 src_uri = d.getVar('SRC_URI', False)
33 d.setVar('SRC_URI', '${LOCALSRC}')
34 d.setVar('S', s)
35 bb.build.exec_func('base_do_unpack', d)
36 d.setVar('SRC_URI', src_uri)
37}
38
39export LSOF_INCLUDE = "${STAGING_INCDIR}"
40
41do_configure () {
42 export LSOF_AR="${AR} cr"
43 export LSOF_RANLIB="${RANLIB}"
44 if [ "x${GLIBCVERSION}" != "x" ]; then
45 LINUX_CLIB=`echo ${GLIBCVERSION} |sed -e 's,\.,,g'`
46 LINUX_CLIB="-DGLIBCV=${LINUX_CLIB}"
47 export LINUX_CLIB
48 fi
49 yes | ./Configure linux
50}
51
52export I = "${STAGING_INCDIR}"
53export L = "${STAGING_INCDIR}"
54
55do_compile () {
56 oe_runmake 'CC=${CC}' 'CFGL=${LDFLAGS} -L./lib -llsof' 'DEBUG=' 'INCL=${CFLAGS}'
57}
58
59do_install () {
60 install -d ${D}${sbindir} ${D}${mandir}/man8
61 install -m 0755 lsof ${D}${sbindir}/lsof
62 install -m 0644 lsof.8 ${D}${mandir}/man8/lsof.8
63}
diff --git a/meta/recipes-extended/lsof/lsof_4.99.3.bb b/meta/recipes-extended/lsof/lsof_4.99.3.bb
new file mode 100644
index 0000000000..93e91fb427
--- /dev/null
+++ b/meta/recipes-extended/lsof/lsof_4.99.3.bb
@@ -0,0 +1,23 @@
1SUMMARY = "LiSt Open Files tool"
2DESCRIPTION = "Lsof is a Unix-specific diagnostic tool. \
3Its name stands for LiSt Open Files, and it does just that."
4HOMEPAGE = "http://people.freebsd.org/~abe/"
5SECTION = "devel"
6LICENSE = "Spencer-94"
7LIC_FILES_CHKSUM = "file://COPYING;md5=a48ac97a8550eff12395a2c0d6151510"
8
9SRC_URI = "git://github.com/lsof-org/lsof;branch=master;protocol=https \
10 file://remove-host-information.patch"
11SRCREV = "2e4c7a1a9bc7258dc5b6a3ab28ebca44174279a8"
12
13S = "${WORKDIR}/git"
14
15inherit update-alternatives autotools pkgconfig manpages
16PACKAGECONFIG[manpages] = ""
17
18DEPENDS += "groff-native"
19
20ALTERNATIVE:${PN} = "lsof"
21ALTERNATIVE_LINK_NAME[lsof] = "${bindir}/lsof"
22# Make our priority higher than busybox
23ALTERNATIVE_PRIORITY = "100"