aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-core/glibc/glibc/0029-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch68
-rw-r--r--meta/recipes-core/glibc/glibc_2.25.bb1
-rw-r--r--meta/recipes-core/images/build-appliance-image_15.0.0.bb2
-rw-r--r--meta/recipes-devtools/distcc/distcc_3.2.bb2
-rw-r--r--meta/recipes-devtools/gdb/gdb-7.12.1.inc1
-rw-r--r--meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch53
-rw-r--r--meta/recipes-devtools/ruby/ruby.inc2
-rw-r--r--meta/recipes-devtools/ruby/ruby_2.4.4.bb (renamed from meta/recipes-devtools/ruby/ruby_2.4.0.bb)7
-rw-r--r--meta/recipes-extended/byacc/byacc.inc2
-rw-r--r--meta/recipes-multimedia/libpng/libpng_1.6.28.bb8
-rw-r--r--meta/recipes-support/libmpc/libmpc_1.0.3.bb2
-rw-r--r--meta/recipes-support/mpfr/mpfr_3.1.5.bb2
-rw-r--r--meta/recipes-support/neon/neon_0.30.2.bb2
-rwxr-xr-xscripts/sstate-diff-machines.sh2
-rwxr-xr-xscripts/sstate-sysroot-cruft.sh2
-rwxr-xr-xscripts/test-dependencies.sh286
16 files changed, 142 insertions, 300 deletions
diff --git a/meta/recipes-core/glibc/glibc/0029-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch b/meta/recipes-core/glibc/glibc/0029-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch
new file mode 100644
index 0000000000..bef888742b
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0029-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch
@@ -0,0 +1,68 @@
+From 297aca56465035dce1f7b91b5cdda54379141957 Mon Sep 17 00:00:00 2001
+From: Pratyush Anand <panand@redhat.com>
+Date: Wed, 22 Mar 2017 17:02:38 +0530
+Subject: [PATCH] bits/siginfo.h: enum definition for TRAP_HWBKPT is missing
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Compile following linux kernel test code with latest glibc:
+
+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/testing/selftests/breakpoints/breakpoint_test_arm64.c
+
+and we get following error:
+breakpoint_test_arm64.c: In function ‘run_test’:
+breakpoint_test_arm64.c:171:25: error: ‘TRAP_HWBKPT’ undeclared (first use in this function)
+ if (siginfo.si_code != TRAP_HWBKPT) {
+ ^
+I can compile test code by modifying my local
+/usr/include/bits/siginfo.h and test works great. Therefore, this patch
+will be needed in upstream glibc so that issue is fixed there as well.
+
+Signed-off-by: Pratyush Anand <panand@redhat.com>
+
+Upstream-Status: Submitted [https://sourceware.org/bugzilla/show_bug.cgi?id=21286]
+---
+ bits/siginfo.h | 6 +++++-
+ sysdeps/unix/sysv/linux/bits/siginfo.h | 6 +++++-
+ 2 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/bits/siginfo.h b/bits/siginfo.h
+index 4919df5..6dc714e 100644
+--- a/bits/siginfo.h
++++ b/bits/siginfo.h
+@@ -140,8 +140,12 @@ enum
+ {
+ TRAP_BRKPT = 1, /* Process breakpoint. */
+ # define TRAP_BRKPT TRAP_BRKPT
+- TRAP_TRACE /* Process trace trap. */
++ TRAP_TRACE, /* Process trace trap. */
+ # define TRAP_TRACE TRAP_TRACE
++ TRAP_BRANCH, /* Process branch trap. */
++# define TRAP_BRANCH TRAP_BRANCH
++ TRAP_HWBKPT /* hardware breakpoint/watchpoint */
++# define TRAP_HWBKPT TRAP_HWBKPT
+ };
+ # endif
+
+diff --git a/sysdeps/unix/sysv/linux/bits/siginfo.h b/sysdeps/unix/sysv/linux/bits/siginfo.h
+index 7b0d4f6..9cdf42a 100644
+--- a/sysdeps/unix/sysv/linux/bits/siginfo.h
++++ b/sysdeps/unix/sysv/linux/bits/siginfo.h
+@@ -235,8 +235,12 @@ enum
+ {
+ TRAP_BRKPT = 1, /* Process breakpoint. */
+ # define TRAP_BRKPT TRAP_BRKPT
+- TRAP_TRACE /* Process trace trap. */
++ TRAP_TRACE, /* Process trace trap. */
+ # define TRAP_TRACE TRAP_TRACE
++ TRAP_BRANCH, /* Process branch trap. */
++# define TRAP_BRANCH TRAP_BRANCH
++ TRAP_HWBKPT /* hardware breakpoint/watchpoint */
++# define TRAP_HWBKPT TRAP_HWBKPT
+ };
+ # endif
+
+--
+2.7.4
+
diff --git a/meta/recipes-core/glibc/glibc_2.25.bb b/meta/recipes-core/glibc/glibc_2.25.bb
index 58b90b7b90..49fcf0c67e 100644
--- a/meta/recipes-core/glibc/glibc_2.25.bb
+++ b/meta/recipes-core/glibc/glibc_2.25.bb
@@ -43,6 +43,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
file://0026-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch \
file://0027-locale-fix-hard-coded-reference-to-gcc-E.patch \
file://0028-Rework-fno-omit-frame-pointer-support-on-i386.patch \
+ file://0029-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch \
"
NATIVESDKFIXES ?= ""
diff --git a/meta/recipes-core/images/build-appliance-image_15.0.0.bb b/meta/recipes-core/images/build-appliance-image_15.0.0.bb
index 045781c21a..7485734f01 100644
--- a/meta/recipes-core/images/build-appliance-image_15.0.0.bb
+++ b/meta/recipes-core/images/build-appliance-image_15.0.0.bb
@@ -23,7 +23,7 @@ IMAGE_FSTYPES = "vmdk"
inherit core-image module-base setuptools3
-SRCREV ?= "b859272ad4053185d4980cac05481b430e05345f"
+SRCREV ?= "ebb42af2829edfca1a23c7a51a431c656ffc2090"
SRC_URI = "git://git.yoctoproject.org/poky;branch=pyro \
file://Yocto_Build_Appliance.vmx \
file://Yocto_Build_Appliance.vmxf \
diff --git a/meta/recipes-devtools/distcc/distcc_3.2.bb b/meta/recipes-devtools/distcc/distcc_3.2.bb
index ea3d7c10be..ff0e22f9b4 100644
--- a/meta/recipes-devtools/distcc/distcc_3.2.bb
+++ b/meta/recipes-devtools/distcc/distcc_3.2.bb
@@ -14,7 +14,7 @@ PACKAGECONFIG[popt] = "--without-included-popt,--with-included-popt,popt"
RRECOMMENDS_${PN} = "avahi-daemon"
-SRC_URI = "git://github.com/distcc/distcc.git;branch=${PV} \
+SRC_URI = "git://github.com/akuster/distcc.git;branch=${PV} \
file://separatebuilddir.patch \
file://0001-zeroconf-Include-fcntl.h.patch \
file://default \
diff --git a/meta/recipes-devtools/gdb/gdb-7.12.1.inc b/meta/recipes-devtools/gdb/gdb-7.12.1.inc
index 634756ce45..1d81185a0a 100644
--- a/meta/recipes-devtools/gdb/gdb-7.12.1.inc
+++ b/meta/recipes-devtools/gdb/gdb-7.12.1.inc
@@ -16,6 +16,7 @@ SRC_URI = "http://ftp.gnu.org/gnu/gdb/gdb-${PV}.tar.xz \
file://0009-Change-order-of-CFLAGS.patch \
file://0010-resolve-restrict-keyword-conflict.patch \
file://package_devel_gdb_patches_120-sigprocmask-invalid-call.patch \
+ file://gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch \
"
SRC_URI[md5sum] = "193453347ddced7acb6b1cd2ee8f2e4b"
SRC_URI[sha256sum] = "4607680b973d3ec92c30ad029f1b7dbde3876869e6b3a117d8a7e90081113186"
diff --git a/meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch b/meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch
new file mode 100644
index 0000000000..9bf99f6beb
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch
@@ -0,0 +1,53 @@
+From 49bd068c3acf376a3018c0ebd849bf7f72a1874d Mon Sep 17 00:00:00 2001
+From: James Clarke <jrtc27@jrtc27.com>
+Date: Fri, 19 Jan 2018 17:22:49 +0000
+Subject: [PATCH] gdb: Fix ia64 defining TRAP_HWBKPT before including
+ gdb_wait.h
+
+On ia64, gdb_wait.h eventually includes siginfo-consts-arch.h, which
+contains an enum with TRAP_HWBKPT, along with a #define. Thus we cannot
+define TRAP_HWBKPT to 4 beforehand, and so gdb_wait.h must be included
+earlier; include it from linux-ptrace.h so it can never come afterwards.
+
+gdb/ChangeLog:
+
+ * nat/linux-ptrace.c: Remove unnecessary reinclusion of
+ gdb_ptrace.h, and move including gdb_wait.h ...
+ * nat/linux-ptrace.h: ... to here.
+
+Upstream-Status: Accepted [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=5a6c3296a7a90694ad4042f6256f3da6d4fa4ee8]
+
+Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
+---
+ gdb/nat/linux-ptrace.c | 2 --
+ gdb/nat/linux-ptrace.h | 1 +
+ 2 files changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/gdb/nat/linux-ptrace.c b/gdb/nat/linux-ptrace.c
+index 3447e07..dd3310e 100644
+--- a/gdb/nat/linux-ptrace.c
++++ b/gdb/nat/linux-ptrace.c
+@@ -21,8 +21,6 @@
+ #include "linux-procfs.h"
+ #include "linux-waitpid.h"
+ #include "buffer.h"
+-#include "gdb_wait.h"
+-#include "gdb_ptrace.h"
+ #include <sys/procfs.h>
+
+ /* Stores the ptrace options supported by the running kernel.
+diff --git a/gdb/nat/linux-ptrace.h b/gdb/nat/linux-ptrace.h
+index 5954945..6faa89b 100644
+--- a/gdb/nat/linux-ptrace.h
++++ b/gdb/nat/linux-ptrace.h
+@@ -21,6 +21,7 @@
+ struct buffer;
+
+ #include "nat/gdb_ptrace.h"
++#include "gdb_wait.h"
+
+ #ifdef __UCLIBC__
+ #if !(defined(__UCLIBC_HAS_MMU__) || defined(__ARCH_HAS_MMU__))
+--
+2.7.4
+
diff --git a/meta/recipes-devtools/ruby/ruby.inc b/meta/recipes-devtools/ruby/ruby.inc
index d71989889e..9a52a6965f 100644
--- a/meta/recipes-devtools/ruby/ruby.inc
+++ b/meta/recipes-devtools/ruby/ruby.inc
@@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = "\
file://LEGAL;md5=daf349ad59dd19bd8c919171bff3c5d6 \
"
-DEPENDS = "ruby-native zlib openssl tcl libyaml db gdbm readline"
+DEPENDS = "ruby-native zlib openssl tcl libyaml gdbm readline"
DEPENDS_class-native = "openssl-native libyaml-native"
SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
diff --git a/meta/recipes-devtools/ruby/ruby_2.4.0.bb b/meta/recipes-devtools/ruby/ruby_2.4.4.bb
index 8cc52d6211..61fcedbf82 100644
--- a/meta/recipes-devtools/ruby/ruby_2.4.0.bb
+++ b/meta/recipes-devtools/ruby/ruby_2.4.4.bb
@@ -6,11 +6,10 @@ SRC_URI += " \
file://ruby-CVE-2017-9227.patch \
file://ruby-CVE-2017-9228.patch \
file://ruby-CVE-2017-9229.patch \
- file://CVE-2017-14064.patch \
"
-SRC_URI[md5sum] = "7e9485dcdb86ff52662728de2003e625"
-SRC_URI[sha256sum] = "152fd0bd15a90b4a18213448f485d4b53e9f7662e1508190aa5b702446b29e3d"
+SRC_URI[md5sum] = "d50e00ccc1c9cf450f837b92d3ed3e88"
+SRC_URI[sha256sum] = "254f1c1a79e4cc814d1e7320bc5bdd995dc57e08727d30a767664619a9c8ae5a"
# it's unknown to configure script, but then passed to extconf.rb
# maybe it's not really needed as we're hardcoding the result with
@@ -21,7 +20,7 @@ PACKAGECONFIG ??= ""
PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
PACKAGECONFIG[valgrind] = "--with-valgrind=yes, --with-valgrind=no, valgrind"
-PACKAGECONFIG[gpm] = "--with-gmp=yes, --with-gmp=no, gmp"
+PACKAGECONFIG[gmp] = "--with-gmp=yes, --with-gmp=no, gmp"
PACKAGECONFIG[ipv6] = ",--enable-wide-getaddrinfo,"
EXTRA_AUTORECONF += "--exclude=aclocal"
diff --git a/meta/recipes-extended/byacc/byacc.inc b/meta/recipes-extended/byacc/byacc.inc
index adb07193d7..951946d3ac 100644
--- a/meta/recipes-extended/byacc/byacc.inc
+++ b/meta/recipes-extended/byacc/byacc.inc
@@ -5,7 +5,7 @@ programming language."
SECTION = "devel"
LICENSE = "PD"
-SRC_URI = "ftp://invisible-island.net/byacc/byacc-${PV}.tgz \
+SRC_URI = "https://downloads.yoctoproject.org/mirror/sources/byacc-${PV}.tgz \
file://byacc-open.patch \
file://0001-byacc-do-not-reorder-CC-and-CFLAGS.patch"
diff --git a/meta/recipes-multimedia/libpng/libpng_1.6.28.bb b/meta/recipes-multimedia/libpng/libpng_1.6.28.bb
index 9cb2967fe6..fa290fa033 100644
--- a/meta/recipes-multimedia/libpng/libpng_1.6.28.bb
+++ b/meta/recipes-multimedia/libpng/libpng_1.6.28.bb
@@ -6,11 +6,15 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=67d8837410863f9821bbd606536f0329 \
file://png.h;endline=144;md5=abfa0497feb393b5842d3d82c1009520"
DEPENDS = "zlib"
-SRC_URI = "${GENTOO_MIRROR}/libpng-${PV}.tar.xz \
- "
+LIBV = "16"
+
+SRC_URI = "https://ftp-osl.osuosl.org/pub/${BPN}/src/archive/xz/${BPN}${LIBV}/${BP}.tar.xz"
+
SRC_URI[md5sum] = "425354f86c392318d31aedca71019372"
SRC_URI[sha256sum] = "d8d3ec9de6b5db740fefac702c37ffcf96ae46cb17c18c1544635a3852f78f7a"
+MIRRORS += "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/${PV}/ ${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/older-releases/${PV}/"
+
BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config"
inherit autotools binconfig-disabled pkgconfig
diff --git a/meta/recipes-support/libmpc/libmpc_1.0.3.bb b/meta/recipes-support/libmpc/libmpc_1.0.3.bb
index 4f1f5242fb..58813244ef 100644
--- a/meta/recipes-support/libmpc/libmpc_1.0.3.bb
+++ b/meta/recipes-support/libmpc/libmpc_1.0.3.bb
@@ -3,7 +3,7 @@ require libmpc.inc
DEPENDS = "gmp mpfr"
LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02"
-SRC_URI = "http://www.multiprecision.org/mpc/download/mpc-${PV}.tar.gz"
+SRC_URI = "https://ftp.gnu.org/gnu/mpc/mpc-${PV}.tar.gz"
SRC_URI[md5sum] = "d6a1d5f8ddea3abd2cc3e98f58352d26"
SRC_URI[sha256sum] = "617decc6ea09889fb08ede330917a00b16809b8db88c29c31bfbb49cbf88ecc3"
diff --git a/meta/recipes-support/mpfr/mpfr_3.1.5.bb b/meta/recipes-support/mpfr/mpfr_3.1.5.bb
index 2d59c4a1be..1b56f2c066 100644
--- a/meta/recipes-support/mpfr/mpfr_3.1.5.bb
+++ b/meta/recipes-support/mpfr/mpfr_3.1.5.bb
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
file://COPYING.LESSER;md5=6a6a8e020838b23406c81b19c1d46df6"
DEPENDS = "gmp"
-SRC_URI = "http://www.mpfr.org/mpfr-${PV}/mpfr-${PV}.tar.xz \
+SRC_URI = "https://ftp.gnu.org/gnu/${BPN}/mpfr-${PV}.tar.xz \
file://long-long-thumb.patch \
"
SRC_URI[md5sum] = "c4ac246cf9795a4491e7766002cd528f"
diff --git a/meta/recipes-support/neon/neon_0.30.2.bb b/meta/recipes-support/neon/neon_0.30.2.bb
index 5792c56f3a..12a2e0b37c 100644
--- a/meta/recipes-support/neon/neon_0.30.2.bb
+++ b/meta/recipes-support/neon/neon_0.30.2.bb
@@ -5,7 +5,7 @@ LICENSE = "LGPLv2+"
LIC_FILES_CHKSUM = "file://src/COPYING.LIB;md5=f30a9716ef3762e3467a2f62bf790f0a \
file://src/ne_utils.h;beginline=1;endline=20;md5=2caca609538eddaa6f6adf120a218037"
-SRC_URI = "http://www.webdav.org/${BPN}/${BPN}-${PV}.tar.gz \
+SRC_URI = "${DEBIAN_MIRROR}/main/n/neon27/neon27_${PV}.orig.tar.gz \
file://pkgconfig.patch \
"
diff --git a/scripts/sstate-diff-machines.sh b/scripts/sstate-diff-machines.sh
index 056aa0a04c..27c6a33006 100755
--- a/scripts/sstate-diff-machines.sh
+++ b/scripts/sstate-diff-machines.sh
@@ -118,7 +118,7 @@ for M in ${machines}; do
cp -ra ${tmpdir}/stamps/* ${OUTPUT}/${M}
find ${OUTPUT}/${M} -name \*sigdata\* | sed "s#${OUTPUT}/${M}/##g" | sort > ${OUTPUT}/${M}/list
M_UNDERSCORE=`echo ${M} | sed 's/-/_/g'`
- sed "s/${M_UNDERSCORE}/MACHINE/g; s/${M}/MACHINE/g" ${OUTPUT}/${M}/list | sort > ${OUTPUT}/${M}/list.M
+ sed "s/^${M_UNDERSCORE}-/MACHINE/g" ${OUTPUT}/${M}/list | sort > ${OUTPUT}/${M}/list.M
find ${tmpdir}/stamps/ -name \*sigdata\* | xargs rm -f
else
printf "ERROR: no sigdata files were generated for MACHINE $M in ${tmpdir}/stamps\n";
diff --git a/scripts/sstate-sysroot-cruft.sh b/scripts/sstate-sysroot-cruft.sh
index b6166aa1b2..d9917f5152 100755
--- a/scripts/sstate-sysroot-cruft.sh
+++ b/scripts/sstate-sysroot-cruft.sh
@@ -105,7 +105,9 @@ WHITELIST="${WHITELIST} \
# generated by php
WHITELIST="${WHITELIST} \
+ .*/usr/lib/php5/php/.channels \
.*/usr/lib/php5/php/.channels/.* \
+ .*/usr/lib/php5/php/.registry \
.*/usr/lib/php5/php/.registry/.* \
.*/usr/lib/php5/php/.depdb \
.*/usr/lib/php5/php/.depdblock \
diff --git a/scripts/test-dependencies.sh b/scripts/test-dependencies.sh
deleted file mode 100755
index 0b94de8608..0000000000
--- a/scripts/test-dependencies.sh
+++ /dev/null
@@ -1,286 +0,0 @@
-#!/bin/bash
-
-# Author: Martin Jansa <martin.jansa@gmail.com>
-#
-# Copyright (c) 2013 Martin Jansa <Martin.Jansa@gmail.com>
-
-# Used to detect missing dependencies or automagically
-# enabled dependencies which aren't explicitly enabled
-# or disabled. Using bash to have PIPESTATUS variable.
-
-# It does 3 builds of <target>
-# 1st to populate sstate-cache directory and sysroot
-# 2nd to rebuild each recipe with every possible
-# dependency found in sysroot (which stays populated
-# from 1st build
-# 3rd to rebuild each recipe only with dependencies defined
-# in DEPENDS
-# 4th (optional) repeat build like 3rd to make sure that
-# minimal versions of dependencies defined in DEPENDS
-# is also enough
-
-# Global vars
-tmpdir=
-targets=
-recipes=
-buildhistory=
-buildtype=
-default_targets="world"
-default_buildhistory="buildhistory"
-default_buildtype="1 2 3 c"
-
-usage () {
- cat << EOF
-Welcome to utility to detect missing or autoenabled dependencies.
-WARNING: this utility will completely remove your tmpdir (make sure
- you don't have important buildhistory or persistent dir there).
-$0 <OPTION>
-
-Options:
- -h, --help
- Display this help and exit.
-
- --tmpdir=<tmpdir>
- Specify tmpdir, will use the environment variable TMPDIR if it is not specified.
- Something like /OE/oe-core/tmp-eglibc (no / at the end).
-
- --targets=<targets>
- List of targets separated by space, will use the environment variable TARGETS if it is not specified.
- It will run "bitbake <targets>" to populate sysroots.
- Default value is "world".
-
- --recipes=<recipes>
- File with list of recipes we want to rebuild with minimal and maximal sysroot.
- Will use the environment variable RECIPES if it is not specified.
- Default value will use all packages ever recorded in buildhistory directory.
-
- --buildhistory=<buildhistory>
- Path to buildhistory directory, it needs to be enabled in your config,
- because it's used to detect different dependencies and to create list
- of recipes to rebuild when it's not specified.
- Will use the environment variable BUILDHISTORY if it is not specified.
- Default value is "buildhistory"
-
- --buildtype=<buildtype>
- There are 4 types of build:
- 1: build to populate sstate-cache directory and sysroot
- 2: build to rebuild each recipe with every possible dep
- 3: build to rebuild each recipe with minimal dependencies
- 4: build to rebuild each recipe again with minimal dependencies
- c: compare buildhistory directories from build 2 and 3
- Will use the environment variable BUILDTYPE if it is not specified.
- Default value is "1 2 3 c", order is important, type 4 is optional.
-EOF
-}
-
-# Print error information and exit.
-echo_error () {
- echo "ERROR: $1" >&2
- exit 1
-}
-
-while [ -n "$1" ]; do
- case $1 in
- --tmpdir=*)
- tmpdir=`echo $1 | sed -e 's#^--tmpdir=##' | xargs readlink -e`
- [ -d "$tmpdir" ] || echo_error "Invalid argument to --tmpdir"
- shift
- ;;
- --targets=*)
- targets=`echo $1 | sed -e 's#^--targets="*\([^"]*\)"*#\1#'`
- shift
- ;;
- --recipes=*)
- recipes=`echo $1 | sed -e 's#^--recipes="*\([^"]*\)"*#\1#'`
- shift
- ;;
- --buildhistory=*)
- buildhistory=`echo $1 | sed -e 's#^--buildhistory="*\([^"]*\)"*#\1#'`
- shift
- ;;
- --buildtype=*)
- buildtype=`echo $1 | sed -e 's#^--buildtype="*\([^"]*\)"*#\1#'`
- shift
- ;;
- --help|-h)
- usage
- exit 0
- ;;
- *)
- echo "Invalid arguments $*"
- echo_error "Try '$0 -h' for more information."
- ;;
- esac
-done
-
-# tmpdir directory, use environment variable TMPDIR
-# if it was not specified, otherwise, error.
-[ -n "$tmpdir" ] || tmpdir=$TMPDIR
-[ -n "$tmpdir" ] || echo_error "No tmpdir found!"
-[ -d "$tmpdir" ] || echo_error "Invalid tmpdir \"$tmpdir\""
-[ -n "$targets" ] || targets=$TARGETS
-[ -n "$targets" ] || targets=$default_targets
-[ -n "$recipes" ] || recipes=$RECIPES
-[ -n "$recipes" -a ! -f "$recipes" ] && echo_error "Invalid file with list of recipes to rebuild"
-[ -n "$recipes" ] || echo "All packages ever recorded in buildhistory directory will be rebuilt"
-[ -n "$buildhistory" ] || buildhistory=$BUILDHISTORY
-[ -n "$buildhistory" ] || buildhistory=$default_buildhistory
-[ -d "$buildhistory" ] || echo_error "Invalid buildhistory directory \"$buildhistory\""
-[ -n "$buildtype" ] || buildtype=$BUILDTYPE
-[ -n "$buildtype" ] || buildtype=$default_buildtype
-echo "$buildtype" | grep -v '^[1234c ]*$' && echo_error "Invalid buildtype \"$buildtype\", only some combination of 1, 2, 3, 4, c separated by space is allowed"
-
-OUTPUT_BASE=test-dependencies/`date "+%s"`
-declare -i RESULT=0
-
-build_all() {
- echo "===== 1st build to populate sstate-cache directory and sysroot ====="
- OUTPUT1=${OUTPUT_BASE}/${TYPE}_all
- mkdir -p ${OUTPUT1}
- echo "Logs will be stored in ${OUTPUT1} directory"
- bitbake -k $targets 2>&1 | tee -a ${OUTPUT1}/complete.log
- RESULT+=${PIPESTATUS[0]}
- grep "ERROR: Task.*failed" ${OUTPUT1}/complete.log > ${OUTPUT1}/failed-tasks.log
- cat ${OUTPUT1}/failed-tasks.log | sed 's@.*/@@g; s@_.*@@g; s@\.bb, .*@@g; s@\.bb:.*@@g' | sort -u > ${OUTPUT1}/failed-recipes.log
-}
-
-build_every_recipe() {
- if [ "${TYPE}" = "2" ] ; then
- echo "===== 2nd build to rebuild each recipe with every possible dep ====="
- OUTPUT_MAX=${OUTPUT_BASE}/${TYPE}_max
- OUTPUTB=${OUTPUT_MAX}
- else
- echo "===== 3rd or 4th build to rebuild each recipe with minimal dependencies ====="
- OUTPUT_MIN=${OUTPUT_BASE}/${TYPE}_min
- OUTPUTB=${OUTPUT_MIN}
- fi
-
- mkdir -p ${OUTPUTB} ${OUTPUTB}/failed ${OUTPUTB}/ok
- echo "Logs will be stored in ${OUTPUTB} directory"
- if [ -z "$recipes" ]; then
- ls -d $buildhistory/packages/*/* | xargs -n 1 basename | sort -u > ${OUTPUTB}/recipe.list
- recipes=${OUTPUTB}/recipe.list
- fi
- if [ "${TYPE}" != "2" ] ; then
- echo "!!!Removing tmpdir \"$tmpdir\"!!!"
- rm -rf $tmpdir/deploy $tmpdir/pkgdata $tmpdir/sstate-control $tmpdir/stamps $tmpdir/sysroots $tmpdir/work $tmpdir/work-shared 2>/dev/null
- fi
- i=1
- count=`cat $recipes ${OUTPUT1}/failed-recipes.log | sort -u | wc -l`
- for recipe in `cat $recipes ${OUTPUT1}/failed-recipes.log | sort -u`; do
- echo "Building recipe: ${recipe} ($i/$count)"
- declare -i RECIPE_RESULT=0
- bitbake -c cleansstate ${recipe} > ${OUTPUTB}/${recipe}.log 2>&1;
- RECIPE_RESULT+=$?
- bitbake ${recipe} >> ${OUTPUTB}/${recipe}.log 2>&1;
- RECIPE_RESULT+=$?
- if [ "${RECIPE_RESULT}" != "0" ] ; then
- RESULT+=${RECIPE_RESULT}
- mv ${OUTPUTB}/${recipe}.log ${OUTPUTB}/failed/
- grep "ERROR: Task.*failed" ${OUTPUTB}/failed/${recipe}.log | tee -a ${OUTPUTB}/failed-tasks.log
- grep "ERROR: Task.*failed" ${OUTPUTB}/failed/${recipe}.log | sed 's@.*/@@g; s@_.*@@g; s@\.bb, .*@@g; s@\.bb:.*@@g' >> ${OUTPUTB}/failed-recipes.log
- # and append also ${recipe} in case the failed task was from some dependency
- echo ${recipe} >> ${OUTPUTB}/failed-recipes.log
- else
- mv ${OUTPUTB}/${recipe}.log ${OUTPUTB}/ok/
- fi
- if [ "${TYPE}" != "2" ] ; then
- rm -rf $tmpdir/deploy $tmpdir/pkgdata $tmpdir/sstate-control $tmpdir/stamps $tmpdir/sysroots $tmpdir/work $tmpdir/work-shared 2>/dev/null
- fi
- i=`expr $i + 1`
- done
- echo "Copying buildhistory/packages to ${OUTPUTB}"
- cp -ra $buildhistory/packages ${OUTPUTB}
- # This will be usefull to see which library is pulling new dependency
- echo "Copying do_package logs to ${OUTPUTB}/do_package/"
- mkdir ${OUTPUTB}/do_package
- find $tmpdir/work/ -name log.do_package 2>/dev/null| while read f; do
- # pn is 3 levels back, but we don't know if there is just one log per pn (only one arch and version)
- # dest=`echo $f | sed 's#^.*/\([^/]*\)/\([^/]*\)/\([^/]*\)/log.do_package#\1#g'`
- dest=`echo $f | sed "s#$tmpdir/work/##g; s#/#_#g"`
- cp $f ${OUTPUTB}/do_package/$dest
- done
-}
-
-compare_deps() {
- # you can run just compare task with command like this
- # OUTPUT_BASE=test-dependencies/1373140172 \
- # OUTPUT_MAX=${OUTPUT_BASE}/2_max \
- # OUTPUT_MIN=${OUTPUT_BASE}/3_min \
- # openembedded-core/scripts/test-dependencies.sh --tmpdir=tmp-eglibc --targets=glib-2.0 --recipes=recipe_list --buildtype=c
- echo "===== Compare dependencies recorded in \"${OUTPUT_MAX}\" and \"${OUTPUT_MIN}\" ====="
- [ -n "${OUTPUTC}" ] || OUTPUTC=${OUTPUT_BASE}/comp
- mkdir -p ${OUTPUTC}
- OUTPUT_FILE=${OUTPUTC}/dependency-changes
- echo "Differences will be stored in ${OUTPUT_FILE}, dot is shown for every 100 of checked packages"
- echo > ${OUTPUT_FILE}
-
- [ -d ${OUTPUT_MAX} ] || echo_error "Directory with output from build 2 \"${OUTPUT_MAX}\" does not exist"
- [ -d ${OUTPUT_MIN} ] || echo_error "Directory with output from build 3 \"${OUTPUT_MIN}\" does not exist"
- [ -d ${OUTPUT_MAX}/packages/ ] || echo_error "Directory with packages from build 2 \"${OUTPUT_MAX}/packages/\" does not exist"
- [ -d ${OUTPUT_MIN}/packages/ ] || echo_error "Directory with packages from build 3 \"${OUTPUT_MIN}/packages/\" does not exist"
- i=0
- find ${OUTPUT_MAX}/packages/ -name latest | sed "s#${OUTPUT_MAX}/##g" | while read pkg; do
- max_pkg=${OUTPUT_MAX}/${pkg}
- min_pkg=${OUTPUT_MIN}/${pkg}
- # pkg=packages/armv5te-oe-linux-gnueabi/libungif/libungif/latest
- recipe=`echo "${pkg}" | sed 's#packages/[^/]*/\([^/]*\)/\([^/]*\)/latest#\1#g'`
- package=`echo "${pkg}" | sed 's#packages/[^/]*/\([^/]*\)/\([^/]*\)/latest#\2#g'`
- if [ ! -f "${min_pkg}" ] ; then
- echo "ERROR: ${recipe}: ${package} package isn't created when building with minimal dependencies?" | tee -a ${OUTPUT_FILE}
- echo ${recipe} >> ${OUTPUTC}/failed-recipes.log
- continue
- fi
- # strip version information in parenthesis
- max_deps=`grep "^RDEPENDS = " ${max_pkg} | sed 's/^RDEPENDS = / /g; s/$/ /g; s/([^(]*)//g'`
- min_deps=`grep "^RDEPENDS = " ${min_pkg} | sed 's/^RDEPENDS = / /g; s/$/ /g; s/([^(]*)//g'`
- if [ "$i" = 100 ] ; then
- echo -n "." # cheap progressbar
- i=0
- fi
- if [ "${max_deps}" = "${min_deps}" ] ; then
- # it's annoying long, but at least it's showing some progress, warnings are grepped at the end
- echo "NOTE: ${recipe}: ${package} rdepends weren't changed" >> ${OUTPUT_FILE}
- else
- missing_deps=
- for dep in ${max_deps}; do
- if ! echo "${min_deps}" | grep -q " ${dep} " ; then
- missing_deps="${missing_deps} ${dep}"
- echo # to get rid of dots on last line
- echo "WARN: ${recipe}: ${package} rdepends on ${dep}, but it isn't a build dependency?" | tee -a ${OUTPUT_FILE}
- fi
- done
- if [ -n "${missing_deps}" ] ; then
- echo ${recipe} >> ${OUTPUTC}/failed-recipes.log
- fi
- fi
- i=`expr $i + 1`
- done
- echo # to get rid of dots on last line
- echo "Found differences: "
- grep "^WARN: " ${OUTPUT_FILE} | tee ${OUTPUT_FILE}.warn.log
- echo "Found errors: "
- grep "^ERROR: " ${OUTPUT_FILE} | tee ${OUTPUT_FILE}.error.log
- RESULT+=`cat ${OUTPUT_FILE}.warn.log | wc -l`
- RESULT+=`cat ${OUTPUT_FILE}.error.log | wc -l`
-}
-
-for TYPE in $buildtype; do
- case ${TYPE} in
- 1) build_all;;
- 2) build_every_recipe;;
- 3) build_every_recipe;;
- 4) build_every_recipe;;
- c) compare_deps;;
- *) echo_error "Invalid buildtype \"$TYPE\""
- esac
-done
-
-cat ${OUTPUT_BASE}/*/failed-recipes.log | sort -u >> ${OUTPUT_BASE}/failed-recipes.log
-
-if [ "${RESULT}" != "0" ] ; then
- echo "ERROR: ${RESULT} issues were found in these recipes: `cat ${OUTPUT_BASE}/failed-recipes.log | xargs`"
-fi
-
-echo "INFO: Output written in: ${OUTPUT_BASE}"
-exit ${RESULT}