summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-06 11:08:56 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-07 14:22:36 (GMT)
commita7ddbea345c90646e6b9ddb89f768865caffdf07 (patch)
tree59e7c434d0d9b6a1e95d61c8449056f200183d97
parentc2dbcbbac48127cd014592443a6ac6062c95566f (diff)
downloadpoky-a7ddbea345c90646e6b9ddb89f768865caffdf07.tar.gz
meta: Drop swabber
swabber hasn't been used in years and never did work well in the first place. Remove its recipes, class and configuration. (From OE-Core rev: e18657df0b7e45a224fae17e68c447eae94258ac) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/image-swab.bbclass94
-rw-r--r--meta/conf/swabber/Ubuntu-10.04.1-64/blacklist6
-rw-r--r--meta/conf/swabber/Ubuntu-10.04.1-64/filters7
-rw-r--r--meta/conf/swabber/Ubuntu-10.04.1-64/whitelist23
-rw-r--r--meta/conf/swabber/generic/blacklist2
-rw-r--r--meta/conf/swabber/generic/filters10
-rw-r--r--meta/conf/swabber/generic/whitelist15
-rw-r--r--meta/recipes-devtools/swabber/swabber-native_git.bb21
-rwxr-xr-xscripts/swabber-strace-attach31
9 files changed, 0 insertions, 209 deletions
diff --git a/meta/classes/image-swab.bbclass b/meta/classes/image-swab.bbclass
deleted file mode 100644
index 6b02cad..0000000
--- a/meta/classes/image-swab.bbclass
+++ /dev/null
@@ -1,94 +0,0 @@
1HOST_DATA ?= "${TMPDIR}/host-contamination-data/"
2SWABBER_REPORT ?= "${LOG_DIR}/swabber/"
3SWABBER_LOGS ?= "${LOG_DIR}/contamination-logs"
4TRACE_LOGDIR ?= "${SWABBER_LOGS}/${PACKAGE_ARCH}"
5TRACE_LOGFILE = "${TRACE_LOGDIR}/${PN}-${PV}"
6
7SWAB_ORIG_TASK := "${BB_DEFAULT_TASK}"
8BB_DEFAULT_TASK = "generate_swabber_report"
9
10# Several recipes don't build with parallel make when run under strace
11# Ideally these should be fixed but as a temporary measure disable parallel
12# builds for troublesome recipes
13PARALLEL_MAKE_pn-openssl = ""
14PARALLEL_MAKE_pn-glibc = ""
15PARALLEL_MAKE_pn-glib-2.0 = ""
16PARALLEL_MAKE_pn-libxml2 = ""
17PARALLEL_MAKE_pn-readline = ""
18PARALLEL_MAKE_pn-util-linux = ""
19PARALLEL_MAKE_pn-binutils = ""
20PARALLEL_MAKE_pn-bison = ""
21PARALLEL_MAKE_pn-cmake = ""
22PARALLEL_MAKE_pn-elfutils = ""
23PARALLEL_MAKE_pn-gcc = ""
24PARALLEL_MAKE_pn-gcc-runtime = ""
25PARALLEL_MAKE_pn-m4 = ""
26PARALLEL_MAKE_pn-opkg = ""
27PARALLEL_MAKE_pn-pkgconfig = ""
28PARALLEL_MAKE_pn-prelink = ""
29PARALLEL_MAKE_pn-rpm = ""
30PARALLEL_MAKE_pn-tcl = ""
31PARALLEL_MAKE_pn-beecrypt = ""
32PARALLEL_MAKE_pn-curl = ""
33PARALLEL_MAKE_pn-gmp = ""
34PARALLEL_MAKE_pn-libmpc = ""
35PARALLEL_MAKE_pn-libxslt = ""
36PARALLEL_MAKE_pn-lzo = ""
37PARALLEL_MAKE_pn-popt = ""
38PARALLEL_MAKE_pn-linux-wrs = ""
39PARALLEL_MAKE_pn-libgcrypt = ""
40PARALLEL_MAKE_pn-gpgme = ""
41PARALLEL_MAKE_pn-udev = ""
42PARALLEL_MAKE_pn-gnutls = ""
43
44python() {
45 # NOTE: It might be useful to detect host infection on native and cross
46 # packages but as it turns out to be pretty hard to do this for all native
47 # and cross packages which aren't swabber-native or one of its dependencies
48 # I have ignored them for now...
49 if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('nativesdk', d) and not bb.data.inherits_class('cross', d):
50 deps = (d.getVarFlag('do_setscene', 'depends', True) or "").split()
51 deps.append('strace-native:do_populate_sysroot')
52 d.setVarFlag('do_setscene', 'depends', " ".join(deps))
53 logdir = d.expand("${TRACE_LOGDIR}")
54 bb.utils.mkdirhier(logdir)
55 else:
56 d.setVar('STRACEFUNC', '')
57}
58
59STRACEPID = "${@os.getpid()}"
60STRACEFUNC = "imageswab_attachstrace"
61
62do_configure[prefuncs] += "${STRACEFUNC}"
63do_compile[prefuncs] += "${STRACEFUNC}"
64
65imageswab_attachstrace () {
66 STRACE=`which strace`
67
68 if [ -x "$STRACE" ]; then
69 swabber-strace-attach "$STRACE -f -o ${TRACE_LOGFILE}-${BB_CURRENTTASK}.log -e trace=open,execve -p ${STRACEPID}" "${TRACE_LOGFILE}-traceattach-${BB_CURRENTTASK}.log"
70 fi
71}
72
73do_generate_swabber_report () {
74
75 update_distro ${HOST_DATA}
76
77 # Swabber can't create the directory for us
78 mkdir -p ${SWABBER_REPORT}
79
80 REPORTSTAMP=${SWAB_ORIG_TASK}-`date +%2m%2d%2H%2M%Y`
81
82 if [ `which ccache` ] ; then
83 CCACHE_DIR=`( ccache -s | grep "cache directory" | grep -o '[^ ]*$' 2> /dev/null )`
84 fi
85
86 if [ "$(ls -A ${HOST_DATA})" ]; then
87 echo "Generating swabber report"
88 swabber -d ${HOST_DATA} -l ${SWABBER_LOGS} -o ${SWABBER_REPORT}/report-${REPORTSTAMP}.txt -r ${SWABBER_REPORT}/extra_report-${REPORTSTAMP}.txt -c all -p ${TOPDIR} -f ${OEROOT}/meta/conf/swabber ${TOPDIR} ${OEROOT} ${CCACHE_DIR}
89 else
90 echo "No host data, cannot generate swabber report."
91 fi
92}
93addtask generate_swabber_report after do_${SWAB_ORIG_TASK}
94do_generate_swabber_report[depends] = "swabber-native:do_populate_sysroot"
diff --git a/meta/conf/swabber/Ubuntu-10.04.1-64/blacklist b/meta/conf/swabber/Ubuntu-10.04.1-64/blacklist
deleted file mode 100644
index 5fdb8f2..0000000
--- a/meta/conf/swabber/Ubuntu-10.04.1-64/blacklist
+++ /dev/null
@@ -1,6 +0,0 @@
1libneon27-gnutls
2openjdk-6-jre-headless
3openjdk-6-jre-lib
4openjdk-6-jre
5libdbus-1-3
6libneon27-gnutls
diff --git a/meta/conf/swabber/Ubuntu-10.04.1-64/filters b/meta/conf/swabber/Ubuntu-10.04.1-64/filters
deleted file mode 100644
index a447f70..0000000
--- a/meta/conf/swabber/Ubuntu-10.04.1-64/filters
+++ /dev/null
@@ -1,7 +0,0 @@
1/usr/local/lib/python2.6
2/usr/lib/python2.6
3/usr/lib/pymodules/python2.6
4/usr/lib/perl/5.10
5# which is part of the debianutils packages, but we don't want to put the entire
6# debianutils package in the whitelist.
7/usr/bin/which
diff --git a/meta/conf/swabber/Ubuntu-10.04.1-64/whitelist b/meta/conf/swabber/Ubuntu-10.04.1-64/whitelist
deleted file mode 100644
index f0fe963..0000000
--- a/meta/conf/swabber/Ubuntu-10.04.1-64/whitelist
+++ /dev/null
@@ -1,23 +0,0 @@
1base-files
2dash
3libacl1
4libattr1
5libbz2-1.0
6libc6
7libc-bin
8libglib2.0-0
9libncurses5
10libselinux1
11libsqlite3-0
12libssl0.9.8
13mime-support
14perl-base
15python2.6
16python2.6-minimal
17python-apport
18python-gst0.10
19python-imaging
20python-minimal
21python-support
22python-zope.interface
23zlib1g
diff --git a/meta/conf/swabber/generic/blacklist b/meta/conf/swabber/generic/blacklist
deleted file mode 100644
index 396bcb4..0000000
--- a/meta/conf/swabber/generic/blacklist
+++ /dev/null
@@ -1,2 +0,0 @@
1udev
2dkpg
diff --git a/meta/conf/swabber/generic/filters b/meta/conf/swabber/generic/filters
deleted file mode 100644
index 3b10fcb..0000000
--- a/meta/conf/swabber/generic/filters
+++ /dev/null
@@ -1,10 +0,0 @@
1/tmp
2/etc/localtime
3/etc/ld.so.cache
4/etc/ld.so.conf
5/etc/passwd
6/etc/group
7/etc/nsswitch.conf
8/proc
9/dev/null
10/dev/tty
diff --git a/meta/conf/swabber/generic/whitelist b/meta/conf/swabber/generic/whitelist
deleted file mode 100644
index 48ec2af..0000000
--- a/meta/conf/swabber/generic/whitelist
+++ /dev/null
@@ -1,15 +0,0 @@
1bash
2bzip2
3ccache
4coreutils
5cpp
6file
7findutils
8gawk
9grep
10hostname
11make
12sed
13tar
14util-linux
15zlib1g
diff --git a/meta/recipes-devtools/swabber/swabber-native_git.bb b/meta/recipes-devtools/swabber/swabber-native_git.bb
deleted file mode 100644
index 2f313bb..0000000
--- a/meta/recipes-devtools/swabber/swabber-native_git.bb
+++ /dev/null
@@ -1,21 +0,0 @@
1SUMMARY = "Tool to monitor and report on host system file usage"
2HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/swabber"
3LICENSE = "GPLv2"
4LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
5
6SRCREV = "2d1fe36fb0a4fdaae8823a9818a6785182d75e66"
7PV = "0.0+git${SRCPV}"
8
9S = "${WORKDIR}/git"
10
11SRC_URI = "git://git.yoctoproject.org/swabber"
12
13inherit native
14
15do_configure () {
16 :
17}
18
19do_install() {
20 oe_runmake 'DESTDIR=${D}' install
21}
diff --git a/scripts/swabber-strace-attach b/scripts/swabber-strace-attach
deleted file mode 100755
index e8f3258..0000000
--- a/scripts/swabber-strace-attach
+++ /dev/null
@@ -1,31 +0,0 @@
1#!/usr/bin/env python3
2import os
3import sys
4import subprocess
5
6# Detach from the controlling terminal and parent process by forking twice to daemonize ourselves,
7# then run the command passed as argv[1]. Send log data to argv[2].
8
9pid = os.fork()
10if (pid == 0):
11 os.setsid()
12 pid = os.fork()
13 if (pid != 0):
14 os._exit(0)
15else:
16 sys.exit()
17
18
19si = open(os.devnull, 'r')
20so = open(sys.argv[2], 'w')
21se = so
22
23# Replace those fds with our own
24os.dup2(si.fileno(), sys.stdin.fileno())
25os.dup2(so.fileno(), sys.stdout.fileno())
26os.dup2(se.fileno(), sys.stderr.fileno())
27
28ret = subprocess.call(sys.argv[1], shell=True)
29
30os._exit(ret)
31