diff options
| -rw-r--r-- | meta/classes/image-swab.bbclass | 94 | ||||
| -rw-r--r-- | meta/conf/swabber/Ubuntu-10.04.1-64/blacklist | 6 | ||||
| -rw-r--r-- | meta/conf/swabber/Ubuntu-10.04.1-64/filters | 7 | ||||
| -rw-r--r-- | meta/conf/swabber/Ubuntu-10.04.1-64/whitelist | 23 | ||||
| -rw-r--r-- | meta/conf/swabber/generic/blacklist | 2 | ||||
| -rw-r--r-- | meta/conf/swabber/generic/filters | 10 | ||||
| -rw-r--r-- | meta/conf/swabber/generic/whitelist | 15 | ||||
| -rw-r--r-- | meta/recipes-devtools/swabber/swabber-native_git.bb | 21 | ||||
| -rwxr-xr-x | scripts/swabber-strace-attach | 31 |
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 6b02cadafe..0000000000 --- a/meta/classes/image-swab.bbclass +++ /dev/null | |||
| @@ -1,94 +0,0 @@ | |||
| 1 | HOST_DATA ?= "${TMPDIR}/host-contamination-data/" | ||
| 2 | SWABBER_REPORT ?= "${LOG_DIR}/swabber/" | ||
| 3 | SWABBER_LOGS ?= "${LOG_DIR}/contamination-logs" | ||
| 4 | TRACE_LOGDIR ?= "${SWABBER_LOGS}/${PACKAGE_ARCH}" | ||
| 5 | TRACE_LOGFILE = "${TRACE_LOGDIR}/${PN}-${PV}" | ||
| 6 | |||
| 7 | SWAB_ORIG_TASK := "${BB_DEFAULT_TASK}" | ||
| 8 | BB_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 | ||
| 13 | PARALLEL_MAKE_pn-openssl = "" | ||
| 14 | PARALLEL_MAKE_pn-glibc = "" | ||
| 15 | PARALLEL_MAKE_pn-glib-2.0 = "" | ||
| 16 | PARALLEL_MAKE_pn-libxml2 = "" | ||
| 17 | PARALLEL_MAKE_pn-readline = "" | ||
| 18 | PARALLEL_MAKE_pn-util-linux = "" | ||
| 19 | PARALLEL_MAKE_pn-binutils = "" | ||
| 20 | PARALLEL_MAKE_pn-bison = "" | ||
| 21 | PARALLEL_MAKE_pn-cmake = "" | ||
| 22 | PARALLEL_MAKE_pn-elfutils = "" | ||
| 23 | PARALLEL_MAKE_pn-gcc = "" | ||
| 24 | PARALLEL_MAKE_pn-gcc-runtime = "" | ||
| 25 | PARALLEL_MAKE_pn-m4 = "" | ||
| 26 | PARALLEL_MAKE_pn-opkg = "" | ||
| 27 | PARALLEL_MAKE_pn-pkgconfig = "" | ||
| 28 | PARALLEL_MAKE_pn-prelink = "" | ||
| 29 | PARALLEL_MAKE_pn-rpm = "" | ||
| 30 | PARALLEL_MAKE_pn-tcl = "" | ||
| 31 | PARALLEL_MAKE_pn-beecrypt = "" | ||
| 32 | PARALLEL_MAKE_pn-curl = "" | ||
| 33 | PARALLEL_MAKE_pn-gmp = "" | ||
| 34 | PARALLEL_MAKE_pn-libmpc = "" | ||
| 35 | PARALLEL_MAKE_pn-libxslt = "" | ||
| 36 | PARALLEL_MAKE_pn-lzo = "" | ||
| 37 | PARALLEL_MAKE_pn-popt = "" | ||
| 38 | PARALLEL_MAKE_pn-linux-wrs = "" | ||
| 39 | PARALLEL_MAKE_pn-libgcrypt = "" | ||
| 40 | PARALLEL_MAKE_pn-gpgme = "" | ||
| 41 | PARALLEL_MAKE_pn-udev = "" | ||
| 42 | PARALLEL_MAKE_pn-gnutls = "" | ||
| 43 | |||
| 44 | python() { | ||
| 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 | |||
| 59 | STRACEPID = "${@os.getpid()}" | ||
| 60 | STRACEFUNC = "imageswab_attachstrace" | ||
| 61 | |||
| 62 | do_configure[prefuncs] += "${STRACEFUNC}" | ||
| 63 | do_compile[prefuncs] += "${STRACEFUNC}" | ||
| 64 | |||
| 65 | imageswab_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 | |||
| 73 | do_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 | } | ||
| 93 | addtask generate_swabber_report after do_${SWAB_ORIG_TASK} | ||
| 94 | do_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 5fdb8f2b9a..0000000000 --- a/meta/conf/swabber/Ubuntu-10.04.1-64/blacklist +++ /dev/null | |||
| @@ -1,6 +0,0 @@ | |||
| 1 | libneon27-gnutls | ||
| 2 | openjdk-6-jre-headless | ||
| 3 | openjdk-6-jre-lib | ||
| 4 | openjdk-6-jre | ||
| 5 | libdbus-1-3 | ||
| 6 | libneon27-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 a447f70e96..0000000000 --- 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 f0fe9633dc..0000000000 --- a/meta/conf/swabber/Ubuntu-10.04.1-64/whitelist +++ /dev/null | |||
| @@ -1,23 +0,0 @@ | |||
| 1 | base-files | ||
| 2 | dash | ||
| 3 | libacl1 | ||
| 4 | libattr1 | ||
| 5 | libbz2-1.0 | ||
| 6 | libc6 | ||
| 7 | libc-bin | ||
| 8 | libglib2.0-0 | ||
| 9 | libncurses5 | ||
| 10 | libselinux1 | ||
| 11 | libsqlite3-0 | ||
| 12 | libssl0.9.8 | ||
| 13 | mime-support | ||
| 14 | perl-base | ||
| 15 | python2.6 | ||
| 16 | python2.6-minimal | ||
| 17 | python-apport | ||
| 18 | python-gst0.10 | ||
| 19 | python-imaging | ||
| 20 | python-minimal | ||
| 21 | python-support | ||
| 22 | python-zope.interface | ||
| 23 | zlib1g | ||
diff --git a/meta/conf/swabber/generic/blacklist b/meta/conf/swabber/generic/blacklist deleted file mode 100644 index 396bcb4bf2..0000000000 --- a/meta/conf/swabber/generic/blacklist +++ /dev/null | |||
| @@ -1,2 +0,0 @@ | |||
| 1 | udev | ||
| 2 | dkpg | ||
diff --git a/meta/conf/swabber/generic/filters b/meta/conf/swabber/generic/filters deleted file mode 100644 index 3b10fcb377..0000000000 --- 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 48ec2af2c8..0000000000 --- a/meta/conf/swabber/generic/whitelist +++ /dev/null | |||
| @@ -1,15 +0,0 @@ | |||
| 1 | bash | ||
| 2 | bzip2 | ||
| 3 | ccache | ||
| 4 | coreutils | ||
| 5 | cpp | ||
| 6 | file | ||
| 7 | findutils | ||
| 8 | gawk | ||
| 9 | grep | ||
| 10 | hostname | ||
| 11 | make | ||
| 12 | sed | ||
| 13 | tar | ||
| 14 | util-linux | ||
| 15 | zlib1g | ||
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 2f313bb466..0000000000 --- a/meta/recipes-devtools/swabber/swabber-native_git.bb +++ /dev/null | |||
| @@ -1,21 +0,0 @@ | |||
| 1 | SUMMARY = "Tool to monitor and report on host system file usage" | ||
| 2 | HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/swabber" | ||
| 3 | LICENSE = "GPLv2" | ||
| 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" | ||
| 5 | |||
| 6 | SRCREV = "2d1fe36fb0a4fdaae8823a9818a6785182d75e66" | ||
| 7 | PV = "0.0+git${SRCPV}" | ||
| 8 | |||
| 9 | S = "${WORKDIR}/git" | ||
| 10 | |||
| 11 | SRC_URI = "git://git.yoctoproject.org/swabber" | ||
| 12 | |||
| 13 | inherit native | ||
| 14 | |||
| 15 | do_configure () { | ||
| 16 | : | ||
| 17 | } | ||
| 18 | |||
| 19 | do_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 e8f325846c..0000000000 --- a/scripts/swabber-strace-attach +++ /dev/null | |||
| @@ -1,31 +0,0 @@ | |||
| 1 | #!/usr/bin/env python3 | ||
| 2 | import os | ||
| 3 | import sys | ||
| 4 | import 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 | |||
| 9 | pid = os.fork() | ||
| 10 | if (pid == 0): | ||
| 11 | os.setsid() | ||
| 12 | pid = os.fork() | ||
| 13 | if (pid != 0): | ||
| 14 | os._exit(0) | ||
| 15 | else: | ||
| 16 | sys.exit() | ||
| 17 | |||
| 18 | |||
| 19 | si = open(os.devnull, 'r') | ||
| 20 | so = open(sys.argv[2], 'w') | ||
| 21 | se = so | ||
| 22 | |||
| 23 | # Replace those fds with our own | ||
| 24 | os.dup2(si.fileno(), sys.stdin.fileno()) | ||
| 25 | os.dup2(so.fileno(), sys.stdout.fileno()) | ||
| 26 | os.dup2(se.fileno(), sys.stderr.fileno()) | ||
| 27 | |||
| 28 | ret = subprocess.call(sys.argv[1], shell=True) | ||
| 29 | |||
| 30 | os._exit(ret) | ||
| 31 | |||
