summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Dudau <adrian.dudau@enea.com>2016-01-25 13:28:22 +0100
committerAdrian Dudau <adrian.dudau@enea.com>2016-01-25 13:28:53 +0100
commitf2472f452cc1a79000154df9a918214e7c206ed1 (patch)
tree62a422438fd863f1ac6542ed118b72ee33ed8ebf
parent5189d80c25f426786e2f54b3ec6484291b4a0abe (diff)
parenta43271bc9283128d82c6542c70378a52a05d35cf (diff)
downloadmeta-el-common-f2472f452cc1a79000154df9a918214e7c206ed1.tar.gz
Merge branch 'dizzy'
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
-rw-r--r--conf/distro/enea.conf1
-rw-r--r--conf/distro/include/enea-mirrors.inc12
-rwxr-xr-xenea-init-build-env261
-rw-r--r--recipes-connectivity/nfs-utils/nfs-utils/fix-segfault-in-add_name.patch59
-rw-r--r--recipes-connectivity/nfs-utils/nfs-utils_1.3.0.bbappend5
-rw-r--r--recipes-connectivity/openssh/openssh/openssh-ptest-fix-sshconnect.patch57
-rw-r--r--recipes-connectivity/openssh/openssh_6.6p1.bbappend3
-rw-r--r--recipes-core/dbus/dbus_1.8.2.bbappend5
-rw-r--r--recipes-core/dbus/files/CVE-2014-3532.patch112
-rw-r--r--recipes-core/util-linux/util-linux/avoid_parallel_tests.patch19
-rw-r--r--recipes-core/util-linux/util-linux/avoid_unsupported_find_opts.patch38
-rw-r--r--recipes-core/util-linux/util-linux/avoid_unsupported_grep_opts.patch57
-rw-r--r--recipes-core/util-linux/util-linux/avoid_unsupported_sleep_param.patch20
-rw-r--r--recipes-core/util-linux/util-linux/display_testname_for_subtest.patch17
-rw-r--r--recipes-core/util-linux/util-linux/ptest.patch16
-rw-r--r--recipes-core/util-linux/util-linux/run-ptest10
-rw-r--r--recipes-core/util-linux/util-linux_%.bbappend41
-rw-r--r--recipes-devtools/automake/automake/new_rt_path_for_test-driver.patch35
-rw-r--r--recipes-devtools/automake/automake_1.14.1.bbappend5
-rw-r--r--recipes-devtools/elfutils/elfutils/add-ptest.patch23
-rw-r--r--recipes-devtools/elfutils/elfutils/avoid_parallel_tests.patch20
-rw-r--r--recipes-devtools/elfutils/elfutils/run-ptest3
-rw-r--r--recipes-devtools/elfutils/elfutils_0.148.bbappend19
-rw-r--r--recipes-devtools/gdb/gdb/0001-add-delay-before-run-exp-file.patch26
-rw-r--r--recipes-devtools/gdb/gdb/0002-function-name-is-used-by-mistake.patch30
-rw-r--r--recipes-devtools/gdb/gdb/change-scripts-support-from-ksh-to-bash.patch14
-rw-r--r--recipes-devtools/gdb/gdb/gdb-ptest-attach.patch30
-rwxr-xr-xrecipes-devtools/gdb/gdb/run-ptest2
-rw-r--r--recipes-devtools/gdb/gdb/runtest-flags.patch30
-rw-r--r--recipes-devtools/gdb/gdb_7.7.1.bbappend40
-rw-r--r--recipes-devtools/python/python-smartpm/smart-already-installed-message.patch54
-rw-r--r--recipes-devtools/python/python-smartpm_1.4.1.bbappend5
-rw-r--r--recipes-devtools/tclap/tclap_1.2.1.bbappend1
-rw-r--r--recipes-extended/ltp/files/fix-test_proc_kill-hang.patch23
-rw-r--r--recipes-extended/ltp/files/periodic_output.patch31
-rw-r--r--recipes-extended/ltp/ltp_20140422.bbappend7
-rw-r--r--recipes-support/fuse/fuse_2.9.3.bbappend8
37 files changed, 1139 insertions, 0 deletions
diff --git a/conf/distro/enea.conf b/conf/distro/enea.conf
index da5ddd5..94deafb 100644
--- a/conf/distro/enea.conf
+++ b/conf/distro/enea.conf
@@ -5,6 +5,7 @@ DISTRO_VERSION_MAJOR = "5.0"
5DISTRO_VERSION_MINOR ??= "" 5DISTRO_VERSION_MINOR ??= ""
6DISTRO_VERSION = "${DISTRO_VERSION_MAJOR}${DISTRO_VERSION_MINOR}" 6DISTRO_VERSION = "${DISTRO_VERSION_MAJOR}${DISTRO_VERSION_MINOR}"
7 7
8require conf/distro/include/enea-mirrors.inc
8 9
9SDK_VENDOR = "-eneasdk" 10SDK_VENDOR = "-eneasdk"
10SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" 11SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}"
diff --git a/conf/distro/include/enea-mirrors.inc b/conf/distro/include/enea-mirrors.inc
new file mode 100644
index 0000000..3a9bfa4
--- /dev/null
+++ b/conf/distro/include/enea-mirrors.inc
@@ -0,0 +1,12 @@
1PREMIRRORS ??= "\
2cvs://.*/.* http://linux.enea.com/${DISTRO_VERSION}/sources/ \n \
3svn://.*/.* http://linux.enea.com/${DISTRO_VERSION}/sources/ \n \
4git://.*/.* http://linux.enea.com/${DISTRO_VERSION}/sources/ \n \
5hg://.*/.* http://linux.enea.com/${DISTRO_VERSION}/sources/ \n \
6bzr://.*/.* http://linux.enea.com/${DISTRO_VERSION}/sources/ \n \
7svk://.*/.* http://linux.enea.com/${DISTRO_VERSION}/sources/ \n \
8p4://.*/.* http://linux.enea.com/${DISTRO_VERSION}/sources/ \n \
9osc://.*/.* http://linux.enea.com/${DISTRO_VERSION}/sources/ \n \
10https?$://.*/.* http://linux.enea.com/${DISTRO_VERSION}/sources/ \n \
11ftp://.*/.* http://linux.enea.com/${DISTRO_VERSION}/sources/ \n \
12"
diff --git a/enea-init-build-env b/enea-init-build-env
new file mode 100755
index 0000000..e231a5b
--- /dev/null
+++ b/enea-init-build-env
@@ -0,0 +1,261 @@
1#!/bin/bash
2if [ "$_" = "$0" ]; then
3 echo "Error: This script needs to be sourced."
4 echo "Please run as 'source $0'."
5 exit
6fi
7
8# always unset these in case something goes wrong in the previous run
9unset BBLAYERS_CONF_EXISTS
10unset BUILD_PATH
11unset CUSTOM_SCRIPTS
12unset DISTRO
13unset DOWNLOAD_DLDIR
14unset SOURCE_MIRROR_URL
15unset ENEAROOT
16unset EXITME
17unset LOCAL_CONF_EXISTS
18unset MACHINE
19unset METALAYERS
20unset NUM_CORES
21unset SSTATE_DIR
22unset SSTATE_MIRRORS
23unset TESTING_ADDITIONS
24unset -f usage
25unset OPTERR
26unset OPTIND
27unset OPTION
28
29NUM_CORES=$(grep -c processor /proc/cpuinfo || echo 2)
30BUILD_PATH="build"
31METALAYERS="meta-enea-base"
32
33function usage() {
34cat <<EOF
35Usage:
36 source $(basename $BASH_SOURCE) [OPTIONS]
37
38OPTIONS:
39 -b <build dir>
40 Build dir
41 default: build
42
43 -c <script name>
44 Script to be used for further customization
45 Multiple executable customization scripts could be used
46 The customized script must have the executable bit set in order to be used
47 e.g. -c meta-some-layer/scripts/conf_setup.sh
48
49 -g <url>
50 download mirror e.g., file:///media/downloads
51 default: http://linux.enea.com/${DISTRO_VERSION}/sources
52
53 -j <cores>
54 Number of cores to use in build.
55 default: all
56
57 -k <sstate dir>
58 Shared local sstate cache, type -k <build dir>/sstate
59 if you want to use private sstate cache.
60
61 -l <list of meta-layers>
62 List of meta-layers, e.g., -l meta-fsl-ppc,meta-enea-lwrt
63 default: none
64
65 -m <machine name>
66 Machine name (required)
67
68 -t
69 To be used by testing framework.
70 Currently add the distrodata inheritance.
71 -s
72 Non-default DISTRO to use
73
74 -h
75 Help - this text
76EOF
77}
78
79SSTATE_MIRRORS='http://linux.enea.com/${DISTRO_VERSION}/sstate-cache/PATH'
80SOURCE_MIRROR_URL='http://linux.enea.com/${DISTRO_VERSION}/sources'
81
82while getopts ":hb:c:d:f:g:j:k:l:m:ts:" OPTION; do
83 case $OPTION in
84 b)
85 BUILD_PATH=$OPTARG
86 ;;
87 c)
88 CUSTOM_SCRIPTS=$CUSTOM_SCRIPTS" eval $PWD/$OPTARG;"
89 ;;
90 d)
91 # set DL_DIR. be careful when using this, as it's easy to
92 # introduce isseues if this dir is shared
93 DOWNLOAD_DLDIR=$(readlink -m $OPTARG)
94 ;;
95 g)
96 SOURCE_MIRROR_URL=$OPTARG
97 ;;
98 j)
99 NUM_CORES=$OPTARG
100 ;;
101 k)
102 SSTATE_DIR=$(readlink -m $OPTARG)
103 ;;
104 l)
105 METALAYERS="$METALAYERS,$OPTARG"
106 ;;
107 m)
108 MACHINE=$OPTARG
109 ;;
110 t)
111 TESTING_ADDITIONS=1
112 ;;
113 s)
114 DISTRO=$OPTARG
115 ;;
116 h)
117 usage
118 EXITME=1
119 ;;
120 \?)
121 echo "Unknown option '-$OPTARG'"
122 usage
123 EXITME=1
124 ;;
125 esac
126done
127
128METALAYERS="$METALAYERS,meta-openembedded/meta-filesystems,meta-openembedded/meta-networking,meta-openembedded/meta-oe,meta-openembedded/meta-python"
129ENEAROOT="$(pwd)"
130ENEAROOT=$(readlink -f "$ENEAROOT")
131
132if [[ ! -d $SSTATE_DIR && ! -z $SSTATE_DIR ]]; then
133 mkdir -p $SSTATE_DIR
134 if [[ $? -ne 0 ]]; then
135 echo "Error: Unable to create directory $SSTATE_DIR. Do you have permissions?"
136 EXITME=1
137 fi
138fi
139if [[ ! -d $DOWNLOAD_DLDIR && ! -z $DOWNLOAD_DLDIR ]]; then
140 mkdir -p $DOWNLOAD_DLDIR
141 if [[ $? -ne 0 ]]; then
142 echo "Error: Unable to create directory $DOWNLOAD_DLDIR. Do you have permissions?"
143 EXITME=1
144 fi
145fi
146
147if [[ -n $EXITME ]]; then
148 echo
149elif [[ -z $BASH_VERSINFO ]]; then
150 echo "This script requires bash."
151elif [ "$MACHINE"x = "x" -a ! -r "$BUILD_PATH/conf/local.conf" ]; then
152cat <<EOF
153error: When creating a new build dir, you must at least specify -m MACHINE.
154
155Use option -h for help.
156EOF
157else
158
159 if ! (test -r "$BUILD_PATH/conf/local.conf"); then
160 LOCAL_CONF_EXISTS=1
161 fi
162
163 if ! (test -r "$BUILD_PATH/conf/bblayers.conf"); then
164 BBLAYERS_CONF_EXISTS=1
165 fi
166
167 source ./oe-init-build-env $BUILD_PATH
168
169 if [[ -n $LOCAL_CONF_EXISTS ]]; then
170 sed -i \
171 -e "s|^#BB_NUMBER_THREADS.*|BB_NUMBER_THREADS \?= \"$NUM_CORES\"|" \
172 -e "s|^#PARALLEL_MAKE.*|PARALLEL_MAKE \?= \"-j $NUM_CORES\"|" \
173 -e 's|^DISTRO ?= "poky"|DISTRO ?= "enea"|' \
174 conf/local.conf
175 echo "*** Info: Setting BB_NUMBER_THREADS to $NUM_CORES"
176 echo "*** Info: Setting PARALLEL_MAKE to -j$NUM_CORES"
177 echo "*** Info: Setting DISTRO to enea"
178
179 if [[ -n $MACHINE ]]; then
180 sed -i -e "s|^MACHINE.*|MACHINE = \"$MACHINE\"|" conf/local.conf
181 echo "*** Info: Setting MACHINE to $MACHINE"
182 fi
183
184 echo "SSTATE_MIRRORS ?= \"file://.* $SSTATE_MIRRORS\"" >> conf/local.conf
185 echo "*** Info: Setting SSTATE_MIRRORS to $SSTATE_MIRRORS"
186
187 if [[ -n $SSTATE_DIR ]]; then
188 sed -i -e "s|^#SSTATE_DIR ?=.*|SSTATE_DIR ?= \"$SSTATE_DIR\"|" conf/local.conf
189 echo "*** Info: Setting SSTATE_DIR to $SSTATE_DIR"
190 fi
191
192 echo "SOURCE_MIRROR_URL ?= \"$SOURCE_MIRROR_URL\"" >> conf/local.conf
193 echo "*** Info: Setting SOURCE_MIRROR_URL to $SOURCE_MIRROR_URL"
194 echo "INHERIT += \"own-mirrors\"" >> conf/local.conf
195 echo "*** Info: Inheriting own-mirror"
196
197
198 if [[ -n $TESTING_ADDITIONS ]]; then
199 echo "INHERIT += \"distrodata\"" >> conf/local.conf
200 echo "*** Info: Inheriting distrodata."
201 fi
202
203 if [[ -n $DISTRO ]]; then
204 sed -i -e "s|^DISTRO.*|DISTRO ?= \"$DISTRO\"|" conf/local.conf
205 sed -i -e 's|^PACKAGE_CLASSES ?= "package_rpm"|PACKAGE_CLASSES ?= "package_rpm package_ipk"|' conf/local.conf
206 echo "*** Info: Setting PACKAGE_CLASSES to ipk and rpm"
207 echo "*** Info: Setting DISTRO to $DISTRO "
208 fi
209
210
211 if [[ -n $DOWNLOAD_DLDIR ]]; then
212 sed -i -e "s|^#DL_DIR ?=.*|DL_DIR ?= \"$DOWNLOAD_DLDIR\"|" conf/local.conf
213 echo "*** Info: Setting DL_DIR to $DOWNLOAD_DLDIR"
214 fi
215
216 if [[ ""x != "${CUSTOM_SCRIPTS}"x ]]; then
217 echo "*** Info: Appying \"${CUSTOM_SCRIPTS}\""
218 ${CUSTOM_SCRIPTS}
219 fi
220
221 else
222 echo "You already had conf/local.conf file, no modification is done."
223 fi
224
225 if [[ -n $BBLAYERS_CONF_EXISTS ]]; then
226 if [[ ""x != "${METALAYERS}"x ]]; then
227 for layer in $(echo $METALAYERS | tr ',' ' '); do
228 layer=$ENEAROOT/$layer
229 if [[ ! -d $layer ]]; then
230 echo "*** Error: There is no meta-layer called: $layer"
231 else
232 egrep "$layer " conf/bblayers.conf >/dev/null ||
233 sed -i -e '/.*meta-yocto .*/i\'" $layer \\\\" conf/bblayers.conf
234 echo "*** Info: Adding $layer to bblayers.conf"
235 fi
236 done
237 fi
238 else
239 echo "You already had conf/bblayers.conf file, no modification is done."
240 fi
241fi
242
243unset BBLAYERS_CONF_EXISTS
244unset BUILD_PATH
245unset CUSTOM_SCRIPTS
246unset DISTRO
247unset DOWNLOAD_DLDIR
248unset SOURCE_MIRROR_URL
249unset ENEAROOT
250unset EXITME
251unset LOCAL_CONF_EXISTS
252unset MACHINE
253unset METALAYERS
254unset NUM_CORES
255unset SSTATE_DIR
256unset SSTATE_MIRRORS
257unset TESTING_ADDITIONS
258unset -f usage
259unset OPTERR
260unset OPTIND
261unset OPTION
diff --git a/recipes-connectivity/nfs-utils/nfs-utils/fix-segfault-in-add_name.patch b/recipes-connectivity/nfs-utils/nfs-utils/fix-segfault-in-add_name.patch
new file mode 100644
index 0000000..4ebf2dc
--- /dev/null
+++ b/recipes-connectivity/nfs-utils/nfs-utils/fix-segfault-in-add_name.patch
@@ -0,0 +1,59 @@
1commit 25e83c2270b2d2966c992885faed0b79be09f474
2Author: Jeff Layton <jlayton@poochiereds.net>
3Date: Thu May 1 11:15:16 2014 -0400
4
5 mountd: fix segfault in add_name with newer gcc compilers
6
7 I hit a segfault in add_name with a mountd built with gcc-4.9.0. Some
8 NULL pointer checks got reordered such that a pointer was dereferenced
9 before checking to see whether it was NULL. The problem was due to
10 nfs-utils relying on undefined behavior, which tricked gcc into assuming
11 that the pointer would never be NULL.
12
13 At first I assumed that this was a compiler bug, but Jakub Jelinek and
14 Jeff Law pointed out:
15
16 "If old is NULL, then:
17
18 strncpy(new, old, cp-old);
19
20 is undefined behavior (even when cp == old == NULL in that case),
21 therefore gcc assumes that old is never NULL, as otherwise it would be
22 invalid.
23
24 Just guard
25 strncpy(new, old, cp-old);
26 new[cp-old] = 0;
27 with if (old) { ... }."
28
29 This patch does that. If old is NULL though, then we still need to
30 ensure that new is NULL terminated, lest the subsequent strcats walk off
31 the end of it.
32
33 Cc: Jeff Law <law@redhat.com>
34 Cc: Jakub Jelinek <jakub@redhat.com>
35 Signed-off-by: Jeff Layton <jlayton@poochiereds.net>
36 Signed-off-by: Steve Dickson <steved@redhat.com>
37
38 Upstream-Status:Backport
39 Signed-off-by: Tudor Florea <tudor.florea@enea.com>
40
41diff --git a/support/export/client.c b/support/export/client.c
42index dbf47b9..f85e11c 100644
43--- a/support/export/client.c
44+++ b/support/export/client.c
45@@ -482,8 +482,12 @@ add_name(char *old, const char *add)
46 else
47 cp = cp + strlen(cp);
48 }
49- strncpy(new, old, cp-old);
50- new[cp-old] = 0;
51+ if (old) {
52+ strncpy(new, old, cp-old);
53+ new[cp-old] = 0;
54+ } else {
55+ new[0] = 0;
56+ }
57 if (cp != old && !*cp)
58 strcat(new, ",");
59 strcat(new, add);
diff --git a/recipes-connectivity/nfs-utils/nfs-utils_1.3.0.bbappend b/recipes-connectivity/nfs-utils/nfs-utils_1.3.0.bbappend
new file mode 100644
index 0000000..7c9faf0
--- /dev/null
+++ b/recipes-connectivity/nfs-utils/nfs-utils_1.3.0.bbappend
@@ -0,0 +1,5 @@
1FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
2
3SRC_URI += " \
4 file://fix-segfault-in-add_name.patch \
5"
diff --git a/recipes-connectivity/openssh/openssh/openssh-ptest-fix-sshconnect.patch b/recipes-connectivity/openssh/openssh/openssh-ptest-fix-sshconnect.patch
new file mode 100644
index 0000000..0913701
--- /dev/null
+++ b/recipes-connectivity/openssh/openssh/openssh-ptest-fix-sshconnect.patch
@@ -0,0 +1,57 @@
1Fixed openssh ptest
2
3ptests for openssh, apart from a lot of .sh scripts, also
4require 2 executables to be cross-compiled for the target
5and deployed there, that will be called from the test
6scripts.
7
8Those 2 files were not built when cross-compiling
9(Makefile target all:), so I added them to the build,
10under the target all_test.
11
12This new make target is intended to be run from
13do_compile_ptest(), that builds everything needed for
14performing the ptests.
15
16Because both these 2 executables required for ptest
17are linked with libssh (LDFLAGS += -lssh), I also
18added it as dependency for each of them.
19
20Upstream-status: Inappropriate
21
22Signed-off-by: Liviu Gheorghisan <liviu.gheorghisan@enea.com>
23---
24--- a/Makefile.in 2014-12-10 16:19:37.513373454 +0100
25+++ b/Makefile.in 2014-12-10 16:25:23.262764227 +0100
26@@ -130,6 +130,8 @@ FIXALGORITHMSCMD= $(SHELL) $(srcdir)/fix
27
28 all: $(CONFIGFILES) $(MANPAGES) $(TARGETS)
29
30+all_test: regress/modpipe$(EXEEXT) regress/setuid-allowed$(EXEEXT)
31+
32 $(LIBSSH_OBJS): Makefile.in config.h
33 $(SSHOBJS): Makefile.in config.h
34 $(SSHDOBJS): Makefile.in config.h
35@@ -394,18 +396,18 @@ uninstall:
36 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-pkcs11-helper.8
37 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
38
39-regress/modpipe$(EXEEXT): $(srcdir)/regress/modpipe.c
40+regress/modpipe$(EXEEXT): libssh.a
41 [ -d `pwd`/regress ] || mkdir -p `pwd`/regress
42 [ -f `pwd`/regress/Makefile ] || \
43 ln -s `cd $(srcdir) && pwd`/regress/Makefile `pwd`/regress/Makefile
44- $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $? \
45+ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $(srcdir)/regress/modpipe.c \
46 $(LDFLAGS) -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
47
48-regress/setuid-allowed$(EXEEXT): $(srcdir)/regress/setuid-allowed.c
49+regress/setuid-allowed$(EXEEXT): libssh.a
50 [ -d `pwd`/regress ] || mkdir -p `pwd`/regress
51 [ -f `pwd`/regress/Makefile ] || \
52 ln -s `cd $(srcdir) && pwd`/regress/Makefile `pwd`/regress/Makefile
53- $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $? \
54+ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $(srcdir)/regress/setuid-allowed.c \
55 $(LDFLAGS) -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
56
57 tests interop-tests: $(TARGETS) regress/modpipe$(EXEEXT) regress/setuid-allowed$(EXEEXT)
diff --git a/recipes-connectivity/openssh/openssh_6.6p1.bbappend b/recipes-connectivity/openssh/openssh_6.6p1.bbappend
new file mode 100644
index 0000000..2e8ca80
--- /dev/null
+++ b/recipes-connectivity/openssh/openssh_6.6p1.bbappend
@@ -0,0 +1,3 @@
1FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
2
3SRC_URI += " file://openssh-ptest-fix-sshconnect.patch \
diff --git a/recipes-core/dbus/dbus_1.8.2.bbappend b/recipes-core/dbus/dbus_1.8.2.bbappend
new file mode 100644
index 0000000..3a6cb06
--- /dev/null
+++ b/recipes-core/dbus/dbus_1.8.2.bbappend
@@ -0,0 +1,5 @@
1FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
2
3SRC_URI += "\
4 file://CVE-2014-3532.patch \
5 "
diff --git a/recipes-core/dbus/files/CVE-2014-3532.patch b/recipes-core/dbus/files/CVE-2014-3532.patch
new file mode 100644
index 0000000..95f110c
--- /dev/null
+++ b/recipes-core/dbus/files/CVE-2014-3532.patch
@@ -0,0 +1,112 @@
1Date: Tue, 24 Jun 2014 17:57:14 +0100
2Subject: Handle ETOOMANYREFS when sending recursive fds (SCM_RIGHTS)
3
4Since Linux commit 25888e (from 2.6.37-rc4, Nov 2010), sendmsg() on Unix
5sockets returns -1 errno=ETOOMANYREFS ("Too many references: cannot splice")
6when the passfd mechanism (SCM_RIGHTS) is "abusively" used recursively by
7applications. A malicious client could use this to force a victim system
8service to be disconnected from the system bus; the victim would likely
9respond by exiting. This is a denial of service (fd.o #80163,
10CVE-2014-3532).
11
12This patch silently drops the D-Bus message on ETOOMANYREFS and does not close
13the connection.
14
15Upstream-Status: Backport
16
17Bug: https://bugs.freedesktop.org/show_bug.cgi?id=80163
18Reviewed-by: Thiago Macieira <thiago@kde.org>
19[altered commit message to explain DoS significance -smcv]
20Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
21Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
22
23diff --git a/dbus/dbus-sysdeps.c b/dbus/dbus-sysdeps.c
24index de3a18c..f4ba0fa 100644
25--- a/dbus/dbus-sysdeps.c
26+++ b/dbus/dbus-sysdeps.c
27@@ -762,6 +762,20 @@ _dbus_get_is_errno_epipe (void)
28 }
29
30 /**
31+ * See if errno is ETOOMANYREFS
32+ * @returns #TRUE if errno == ETOOMANYREFS
33+ */
34+dbus_bool_t
35+_dbus_get_is_errno_etoomanyrefs (void)
36+{
37+#ifdef ETOOMANYREFS
38+ return errno == ETOOMANYREFS;
39+#else
40+ return FALSE;
41+#endif
42+}
43+
44+/**
45 * Get error message from errno
46 * @returns _dbus_strerror(errno)
47 */
48diff --git a/dbus/dbus-sysdeps.h b/dbus/dbus-sysdeps.h
49index e586946..21033eb 100644
50--- a/dbus/dbus-sysdeps.h
51+++ b/dbus/dbus-sysdeps.h
52@@ -384,6 +384,7 @@ dbus_bool_t _dbus_get_is_errno_eagain_or_ewouldblock (void);
53 dbus_bool_t _dbus_get_is_errno_enomem (void);
54 dbus_bool_t _dbus_get_is_errno_eintr (void);
55 dbus_bool_t _dbus_get_is_errno_epipe (void);
56+dbus_bool_t _dbus_get_is_errno_etoomanyrefs (void);
57 const char* _dbus_strerror_from_errno (void);
58
59 void _dbus_disable_sigpipe (void);
60diff --git a/dbus/dbus-transport-socket.c b/dbus/dbus-transport-socket.c
61index 774f459..199d3b5 100644
62--- a/dbus/dbus-transport-socket.c
63+++ b/dbus/dbus-transport-socket.c
64@@ -645,12 +645,44 @@ do_writing (DBusTransport *transport)
65 {
66 /* EINTR already handled for us */
67
68- /* For some discussion of why we also ignore EPIPE here, see
69+ /* If the other end closed the socket with close() or shutdown(), we
70+ * receive EPIPE here but we must not close the socket yet: there
71+ * might still be some data to read. See:
72 * http://lists.freedesktop.org/archives/dbus/2008-March/009526.html
73 */
74
75 if (_dbus_get_is_errno_eagain_or_ewouldblock () || _dbus_get_is_errno_epipe ())
76 goto out;
77+
78+ /* Since Linux commit 25888e (from 2.6.37-rc4, Nov 2010), sendmsg()
79+ * on Unix sockets returns -1 errno=ETOOMANYREFS when the passfd
80+ * mechanism (SCM_RIGHTS) is used recursively with a recursion level
81+ * of maximum 4. The kernel does not have an API to check whether
82+ * the passed fds can be forwarded and it can change asynchronously.
83+ * See:
84+ * https://bugs.freedesktop.org/show_bug.cgi?id=80163
85+ */
86+
87+ else if (_dbus_get_is_errno_etoomanyrefs ())
88+ {
89+ /* We only send fds in the first byte of the message.
90+ * ETOOMANYREFS cannot happen after.
91+ */
92+ _dbus_assert (socket_transport->message_bytes_written == 0);
93+
94+ _dbus_verbose (" discard message of %d bytes due to ETOOMANYREFS\n",
95+ total_bytes_to_write);
96+
97+ socket_transport->message_bytes_written = 0;
98+ _dbus_string_set_length (&socket_transport->encoded_outgoing, 0);
99+ _dbus_string_compact (&socket_transport->encoded_outgoing, 2048);
100+
101+ /* The message was not actually sent but it needs to be removed
102+ * from the outgoing queue
103+ */
104+ _dbus_connection_message_sent_unlocked (transport->connection,
105+ message);
106+ }
107 else
108 {
109 _dbus_verbose ("Error writing to remote app: %s\n",
110--
111cgit v0.10.2
112
diff --git a/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch b/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch
new file mode 100644
index 0000000..9f6a720
--- /dev/null
+++ b/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch
@@ -0,0 +1,19 @@
1ptest needs buildtest-TESTS and runtest-TESTS targets.
2serial-tests is required to generate those targets.
3
4Signed-off-by: Alexandra Safta <alexandra.safta@enea.com>
5Signed-off-by: Tudor Florea <tudor.florea@enea.com>
6Upstream-Status: Inapporpriate
7
8diff -ruN a/configure.ac b/configure.ac
9--- a/configure.ac 2014-05-27 12:37:42.119772658 +0200
10+++ b/configure.ac 2014-05-27 12:41:46.225573272 +0200
11@@ -10,7 +10,7 @@
12 dnl AC_USE_SYSTEM_EXTENSIONS must be called before any macros that run
13 dnl the compiler (like AC_PROG_LIBTOOL) to avoid autoconf errors.
14 AC_USE_SYSTEM_EXTENSIONS
15-AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax dist-bzip2 no-dist-gzip dist-xz -Wno-portability subdir-objects])
16+AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax dist-bzip2 no-dist-gzip dist-xz -Wno-portability subdir-objects serial-tests])
17
18 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
19 [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
diff --git a/recipes-core/util-linux/util-linux/avoid_unsupported_find_opts.patch b/recipes-core/util-linux/util-linux/avoid_unsupported_find_opts.patch
new file mode 100644
index 0000000..13dc7dd
--- /dev/null
+++ b/recipes-core/util-linux/util-linux/avoid_unsupported_find_opts.patch
@@ -0,0 +1,38 @@
1Avoid unsupported find options
2
3Signed-off-by: Tudor Florea <tudor.florea@enea.com>
4Upstream-Status: Pending
5
6diff -ruN a/tests/run.sh b/tests/run.sh
7--- a/tests/run.sh 2013-08-26 23:48:48.868279097 +0200
8+++ b/tests/run.sh 2013-08-27 00:14:35.646730004 +0200
9@@ -91,7 +91,7 @@
10 # selected tests only
11 for s in $SUBTESTS; do
12 if [ -d "$top_srcdir/tests/ts/$s" ]; then
13- co=$(find $top_srcdir/tests/ts/$s -type f -perm /a+x -regex ".*/[^\.~]*" | sort)
14+ co=$(find $top_srcdir/tests/ts/$s -type f -perm -111 -regex ".*/[^\.~]*" | sort)
15 comps="$comps $co"
16 else
17 echo "Unknown test component '$s'"
18@@ -104,7 +104,7 @@
19 exit 1
20 fi
21
22- comps=$(find $top_srcdir/tests/ts/ -type f -perm /a+x -regex ".*/[^\.~]*" | sort)
23+ comps=$(find $top_srcdir/tests/ts/ -type f -perm -111 -regex ".*/[^\.~]*" | sort)
24 fi
25
26
27diff -ruN a/tests/ts/build-sys/config b/tests/ts/build-sys/config
28--- a/tests/ts/build-sys/config 2013-08-26 23:50:26.800131581 +0200
29+++ b/tests/ts/build-sys/config 2013-08-27 00:10:02.806302850 +0200
30@@ -32,7 +32,7 @@
31 ./configure $opts &> /dev/null
32 make -j &> /dev/null
33
34- bins=$(find . -type f -perm /a+x | sort)
35+ bins=$(find . -type f -perm -111 | sort)
36 for b in $bins; do
37 libs=$(readelf --dynamic $b 2> /dev/null | \
38 awk '/NEEDED/ { print $5 }' | \
diff --git a/recipes-core/util-linux/util-linux/avoid_unsupported_grep_opts.patch b/recipes-core/util-linux/util-linux/avoid_unsupported_grep_opts.patch
new file mode 100644
index 0000000..a0d5efa
--- /dev/null
+++ b/recipes-core/util-linux/util-linux/avoid_unsupported_grep_opts.patch
@@ -0,0 +1,57 @@
1Avoid unsupported grep options
2
3Signed-off-by: Tudor Florea <tudor.florea@enea.com>
4Upstream-Status: Pending
5
6diff -ruN a/ts/ipcs/headers b/ts/ipcs/headers
7--- a/tests/ts/ipcs/headers 2013-09-04 11:03:36.118613250 +0200
8+++ b/teste/ts/ipcs/headers 2013-09-04 11:03:27.906958437 +0200
9@@ -22,35 +22,35 @@
10 ts_init "$*"
11
12 ts_log "test: shm headers"
13-$TS_CMD_IPCS -m -t | grep --after-context=1 "^---" >> $TS_OUTPUT
14-$TS_CMD_IPCS -m -p | grep --after-context=1 "^---" >> $TS_OUTPUT
15-$TS_CMD_IPCS -m -c | grep --after-context=1 "^---" >> $TS_OUTPUT
16+$TS_CMD_IPCS -m -t | grep -A 1 "^---" >> $TS_OUTPUT
17+$TS_CMD_IPCS -m -p | grep -A 1 "^---" >> $TS_OUTPUT
18+$TS_CMD_IPCS -m -c | grep -A 1 "^---" >> $TS_OUTPUT
19 $TS_CMD_IPCS -m -l | grep "^---" >> $TS_OUTPUT
20 $TS_CMD_IPCS -m -u | grep "^---" >> $TS_OUTPUT
21 echo >> $TS_OUTPUT
22
23 ts_log "test: mesg headers"
24-$TS_CMD_IPCS -q -t | grep --after-context=1 "^---" >> $TS_OUTPUT
25-$TS_CMD_IPCS -q -p | grep --after-context=1 "^---" >> $TS_OUTPUT
26-$TS_CMD_IPCS -q -c | grep --after-context=1 "^---" >> $TS_OUTPUT
27+$TS_CMD_IPCS -q -t | grep -A 1 "^---" >> $TS_OUTPUT
28+$TS_CMD_IPCS -q -p | grep -A 1 "^---" >> $TS_OUTPUT
29+$TS_CMD_IPCS -q -c | grep -A 1 "^---" >> $TS_OUTPUT
30 $TS_CMD_IPCS -q -l | grep "^---" >> $TS_OUTPUT
31 $TS_CMD_IPCS -q -u | grep "^---" >> $TS_OUTPUT
32 echo >> $TS_OUTPUT
33
34 ts_log "test: sem headers"
35-$TS_CMD_IPCS -s -t | grep --after-context=1 "^---" >> $TS_OUTPUT
36-$TS_CMD_IPCS -s -p | grep --after-context=1 "^---" >> $TS_OUTPUT
37-$TS_CMD_IPCS -s -c | grep --after-context=1 "^---" >> $TS_OUTPUT
38+$TS_CMD_IPCS -s -t | grep -A 1 "^---" >> $TS_OUTPUT
39+$TS_CMD_IPCS -s -p | grep -A 1 "^---" >> $TS_OUTPUT
40+$TS_CMD_IPCS -s -c | grep -A 1 "^---" >> $TS_OUTPUT
41 $TS_CMD_IPCS -s -l | grep "^---" >> $TS_OUTPUT
42 $TS_CMD_IPCS -s -u | grep "^---" >> $TS_OUTPUT
43 echo >> $TS_OUTPUT
44
45 ts_log "test: all headers"
46-$TS_CMD_IPCS -a | grep --after-context=1 "^---" >> $TS_OUTPUT
47+$TS_CMD_IPCS -a | grep -A 1 "^---" >> $TS_OUTPUT
48
49-$TS_CMD_IPCS -a -t | grep --after-context=1 "^---" >> $TS_OUTPUT
50-$TS_CMD_IPCS -a -p | grep --after-context=1 "^---" >> $TS_OUTPUT
51-$TS_CMD_IPCS -a -c | grep --after-context=1 "^---" >> $TS_OUTPUT
52+$TS_CMD_IPCS -a -t | grep -A 1 "^---" >> $TS_OUTPUT
53+$TS_CMD_IPCS -a -p | grep -A 1 "^---" >> $TS_OUTPUT
54+$TS_CMD_IPCS -a -c | grep -A 1 "^---" >> $TS_OUTPUT
55 $TS_CMD_IPCS -a -l | grep "^---" >> $TS_OUTPUT
56 $TS_CMD_IPCS -a -u | grep "^---" >> $TS_OUTPUT
57
diff --git a/recipes-core/util-linux/util-linux/avoid_unsupported_sleep_param.patch b/recipes-core/util-linux/util-linux/avoid_unsupported_sleep_param.patch
new file mode 100644
index 0000000..3a62067
--- /dev/null
+++ b/recipes-core/util-linux/util-linux/avoid_unsupported_sleep_param.patch
@@ -0,0 +1,20 @@
1Avoid unsupported sleep parameter
2
3Signed-off-by: Tudor Florea <tudor.florea@enea.com>
4Upstream-Status: Pending
5
6diff -ruN a/simple b/simple
7--- a/tests/ts/tailf/simple 2013-09-04 11:34:49.971817130 +0200
8+++ b/tests/ts/tailf/simple 2013-09-04 11:34:37.876325128 +0200
9@@ -25,9 +25,9 @@
10
11 $TS_CMD_TAILF $INPUT > $TS_OUTPUT 2>&1 &
12
13-sleep 0.1
14+sleep 1
15 echo {0..9} >> $INPUT
16-sleep 0.1
17+sleep 1
18
19 rm -f $INPUT
20
diff --git a/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch b/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch
new file mode 100644
index 0000000..64f02d5
--- /dev/null
+++ b/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch
@@ -0,0 +1,17 @@
1Display testname for subtest
2
3Signed-off-by: Tudor Florea <tudor.florea@enea.com>
4Upstream-Status: Pending
5
6diff -ruN a/functions.sh b/functions.sh
7--- a/tests/functions.sh 2013-09-04 12:41:07.625488953 +0200
8+++ b/tests/functions.sh 2013-09-04 17:33:02.402802957 +0200
9@@ -209,7 +209,7 @@
10 [ $TS_NSUBTESTS -eq 0 ] && echo
11 TS_NSUBTESTS=$(( $TS_NSUBTESTS + 1 ))
12
13- printf "%16s: %-27s ..." "" "$TS_SUBNAME"
14+ printf "%13s: %-30s ..." "$TS_COMPONENT" "$TS_SUBNAME"
15 }
16
17 function ts_init {
diff --git a/recipes-core/util-linux/util-linux/ptest.patch b/recipes-core/util-linux/util-linux/ptest.patch
new file mode 100644
index 0000000..e9adc90
--- /dev/null
+++ b/recipes-core/util-linux/util-linux/ptest.patch
@@ -0,0 +1,16 @@
1Define TESTS variable
2
3Signed-off-by: Tudor Florea <tudor.florea@enea.com>
4Upstream-Status: Pending
5
6diff -ruN a/Makefile.am b/Makefile.am
7--- a/Makefile.am 2013-08-26 16:29:42.151429221 +0200
8+++ b/Makefile.am 2013-08-26 17:52:31.013898120 +0200
9@@ -43,7 +43,7 @@
10 dist_usrbin_exec_SCRIPTS =
11 systemdsystemunit_DATA =
12 check_PROGRAMS =
13-TESTS =
14+TESTS = $(check_PROGRAMS)
15
16 PATHFILES =
diff --git a/recipes-core/util-linux/util-linux/run-ptest b/recipes-core/util-linux/util-linux/run-ptest
new file mode 100644
index 0000000..b04f14a
--- /dev/null
+++ b/recipes-core/util-linux/util-linux/run-ptest
@@ -0,0 +1,10 @@
1#!/bin/sh
2
3cd tests || exit 1
4sh ./run.sh 2>&1 | {
5 sed '{
6 s/^\(.*\):\(.*\) \.\.\. OK$/PASS: \1:\2/
7 s/^\(.*\):\(.*\) \.\.\. FAILED \(.*\)$/FAIL: \1:\2 \3/
8 s/^\(.*\):\(.*\) \.\.\. IGNORE \(.*\)$/SKIP: \1:\2 \3/
9 }'
10}
diff --git a/recipes-core/util-linux/util-linux_%.bbappend b/recipes-core/util-linux/util-linux_%.bbappend
new file mode 100644
index 0000000..c5f09ba
--- /dev/null
+++ b/recipes-core/util-linux/util-linux_%.bbappend
@@ -0,0 +1,41 @@
1FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
2
3inherit ptest
4
5SRC_URI += " \
6 file://ptest.patch \
7 file://run-ptest \
8 file://avoid_unsupported_find_opts.patch \
9 file://avoid_unsupported_grep_opts.patch \
10 file://avoid_unsupported_sleep_param.patch \
11 file://display_testname_for_subtest.patch \
12 file://avoid_parallel_tests.patch \
13 "
14
15RDEPENDS_${PN}-ptest += " bash"
16
17do_compile_ptest() {
18 oe_runmake buildtest-TESTS
19}
20
21do_install_ptest() {
22 mkdir -p ${D}${PTEST_PATH}/tests/ts
23 find . -maxdepth 1 -type f -perm -111 -exec cp {} ${D}${PTEST_PATH} \;
24 cp ${S}/tests/functions.sh ${D}${PTEST_PATH}/tests/
25 cp ${S}/tests/commands.sh ${D}${PTEST_PATH}/tests/
26 cp ${S}/tests/run.sh ${D}${PTEST_PATH}/tests/
27 cp -pR ${S}/tests/expected ${D}${PTEST_PATH}/tests/expected
28
29 list="bitops build-sys cal col colrm column dmesg fsck hexdump hwclock ipcs isosize login look lscpu md5 misc more namei paths schedutils script swapon tailf utmpdump"
30 # The following tests are not installed yet:
31 # blkid scsi_debug module dependent
32 # cramfs gcc dependent
33 # eject gcc dependent
34 # fdisk scsi_debug module and gcc dependent
35 # libmount uuidgen dependent
36 # mount gcc dependant
37 # partx blkid dependant
38 for d in $list; do
39 cp -pR ${S}/tests/ts/$d ${D}${PTEST_PATH}/tests/ts/
40 done
41}
diff --git a/recipes-devtools/automake/automake/new_rt_path_for_test-driver.patch b/recipes-devtools/automake/automake/new_rt_path_for_test-driver.patch
new file mode 100644
index 0000000..fae10b3
--- /dev/null
+++ b/recipes-devtools/automake/automake/new_rt_path_for_test-driver.patch
@@ -0,0 +1,35 @@
1Set relative to top_builddir path in Makefile to access test-driver
2
3Signed-off-by: Adrian Calianu <adrian.calianu@enea.com>
4Upstream-Status: Pending
5
6--- a/bin/automake.in
7+++ b/bin/automake.in
8@@ -272,6 +272,9 @@
9 # $AM_CONFIG_AUX_DIR is prefixed with $(top_srcdir), so it can be used
10 # in Makefiles.
11 my $am_config_aux_dir = '';
12+# Directory used at runtime like running test-driver that should not
13+# depend on $(top_srcdir)
14+my $am_config_rt_aux_dir = '';
15
16 # Directory to search for AC_LIBSOURCE files, as set by AC_CONFIG_LIBOBJ_DIR
17 # in configure.ac.
18@@ -4700,7 +4703,7 @@
19 {
20 require_conf_file ("parallel-tests", FOREIGN, 'test-driver');
21 define_variable ("${pfx}LOG_DRIVER",
22- "\$(SHELL) $am_config_aux_dir/test-driver",
23+ "\$(SHELL) $am_config_rt_aux_dir/test-driver",
24 INTERNAL);
25 }
26 my $driver = '$(' . $pfx . 'LOG_DRIVER)';
27@@ -7284,6 +7287,10 @@
28 $am_config_aux_dir =
29 '$(top_srcdir)' . ($config_aux_dir eq '.' ? "" : "/$config_aux_dir");
30 $am_config_aux_dir =~ s,/*$,,;
31+
32+ $am_config_rt_aux_dir =
33+ '$(top_builddir)' . ($config_aux_dir eq '.' ? "" : "/$config_aux_dir");
34+ $am_config_rt_aux_dir =~ s,/*$,,;
35 }
diff --git a/recipes-devtools/automake/automake_1.14.1.bbappend b/recipes-devtools/automake/automake_1.14.1.bbappend
new file mode 100644
index 0000000..c3f22b8
--- /dev/null
+++ b/recipes-devtools/automake/automake_1.14.1.bbappend
@@ -0,0 +1,5 @@
1FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
2
3SRC_URI += " \
4 file://new_rt_path_for_test-driver.patch \
5 "
diff --git a/recipes-devtools/elfutils/elfutils/add-ptest.patch b/recipes-devtools/elfutils/elfutils/add-ptest.patch
new file mode 100644
index 0000000..88f808d
--- /dev/null
+++ b/recipes-devtools/elfutils/elfutils/add-ptest.patch
@@ -0,0 +1,23 @@
1Add 'install-ptest' rule.
2
3Signed-off-by: Mihaela Sendrea <mihaela.sendrea@enea.com>
4Upstream-status: Pending
5---
6diff -uNr a/tests/Makefile.am b/tests/Makefile.am
7--- a/tests/Makefile.am 2013-08-19 14:05:23.256292155 +0200
8+++ b/tests/Makefile.am 2013-08-19 15:49:16.084543591 +0200
9@@ -240,3 +240,14 @@
10 coverage:
11 -$(srcdir)/coverage.sh
12 endif
13+
14+install-ptest:
15+ @$(MKDIR_P) $(DESTDIR)/tests
16+ @$(MKDIR_P) $(DESTDIR)/src
17+ @install $(builddir)/*$(EXEEXT) $(DESTDIR)/tests
18+ @install $(srcdir)/*.sh $(DESTDIR)/tests
19+ @install $(builddir)/../src/*$(EXEEXT) $(DESTDIR)/src
20+ @cp $(builddir)/../Makefile $(DESTDIR)
21+ @sed -i -e 's|^Makefile:|_Makefile:|' $(DESTDIR)/tests/Makefile
22+ @sed -i -e 's|$(srcdir)|.|' $(DESTDIR)/tests/Makefile
23+
diff --git a/recipes-devtools/elfutils/elfutils/avoid_parallel_tests.patch b/recipes-devtools/elfutils/elfutils/avoid_parallel_tests.patch
new file mode 100644
index 0000000..ed6b6ef
--- /dev/null
+++ b/recipes-devtools/elfutils/elfutils/avoid_parallel_tests.patch
@@ -0,0 +1,20 @@
1ptest needs buildtest-TESTS and runtest-TESTS targets.
2serial-tests is required to generate those targets.
3
4Signed-off-by: Alexandra Safta <alexandra.safta@enea.com>
5Signed-off-by: Tudor Florea <tudor.florea@enea.com>
6Upstream-Status: Inappropriate
7
8diff -ruN a/configure.ac b/configure.ac
9
10--- a/configure.ac 2014-05-26 18:55:11.843190780 +0200
11+++ b/configure.ac 2014-05-26 18:56:01.725097919 +0200
12@@ -25,7 +25,7 @@
13 AC_PREREQ(2.63) dnl Minimum Autoconf version required.
14
15 dnl We use GNU make extensions; automake 1.10 defaults to -Wportability.
16-AM_INIT_AUTOMAKE([gnits 1.8 -Wno-portability dist-bzip2 no-dist-gzip])
17+AM_INIT_AUTOMAKE([gnits 1.8 -Wno-portability dist-bzip2 no-dist-gzip serial-tests])
18 AM_MAINTAINER_MODE
19
20 dnl Unique ID for this build.
diff --git a/recipes-devtools/elfutils/elfutils/run-ptest b/recipes-devtools/elfutils/elfutils/run-ptest
new file mode 100644
index 0000000..51ea6df
--- /dev/null
+++ b/recipes-devtools/elfutils/elfutils/run-ptest
@@ -0,0 +1,3 @@
1#!/bin/sh
2
3make -C tests -k runtest-TESTS
diff --git a/recipes-devtools/elfutils/elfutils_0.148.bbappend b/recipes-devtools/elfutils/elfutils_0.148.bbappend
new file mode 100644
index 0000000..704829a
--- /dev/null
+++ b/recipes-devtools/elfutils/elfutils_0.148.bbappend
@@ -0,0 +1,19 @@
1FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
2
3SRC_URI += "\
4 file://add-ptest.patch \
5 file://run-ptest \
6 file://avoid_parallel_tests.patch \
7"
8
9inherit ptest
10
11do_compile_ptest() {
12 oe_runmake -C tests buildtest-TESTS
13}
14
15do_install_ptest() {
16 oe_runmake -C tests install-ptest DESTDIR=${D}${PTEST_PATH}
17}
18
19RDEPENDS_${PN}-ptest += " bash"
diff --git a/recipes-devtools/gdb/gdb/0001-add-delay-before-run-exp-file.patch b/recipes-devtools/gdb/gdb/0001-add-delay-before-run-exp-file.patch
new file mode 100644
index 0000000..1c41562
--- /dev/null
+++ b/recipes-devtools/gdb/gdb/0001-add-delay-before-run-exp-file.patch
@@ -0,0 +1,26 @@
1Description: Add delay for stable running
2
3Author: jack zhang <jack.zhang@enea.com>
4Date: Mon, 12 Nov 2012 04:10:20 +0100
5
6Upstream-Status: Pending
7
8Signed-off-by: jack zhang <jack.zhang@enea.com>
9Signed-off-by: Ciprian Barbu <ciprian.barbu@enea.com>
10---
11 gdb/testsuite/dg-extract-results.sh | 1 +
12 1 files changed, 1 insertions(+), 0 deletions(-)
13
14diff --git a/gdb/testsuite/dg-extract-results.sh b/gdb/testsuite/dg-extract-results.sh
15--- a/gdb/testsuite/dg-extract-results.sh
16+++ b/gdb/testsuite/dg-extract-results.sh
17@@ -322,6 +322,7 @@ END {
18 n=1
19 while (n < expfileno) {
20 if (expfileseen[expfiles[n]]) {
21+ sleep 1
22 print "Running "expfiles[n]" ..."
23 if (filewritten["${TMP}/list"n]) {
24 if (expfileseen[expfiles[n]] == 1)
25--
261.7.5.4
diff --git a/recipes-devtools/gdb/gdb/0002-function-name-is-used-by-mistake.patch b/recipes-devtools/gdb/gdb/0002-function-name-is-used-by-mistake.patch
new file mode 100644
index 0000000..7f25a35
--- /dev/null
+++ b/recipes-devtools/gdb/gdb/0002-function-name-is-used-by-mistake.patch
@@ -0,0 +1,30 @@
1Description: function name is used by mistake
2
3Author: jack zhang <jack.zhang@enea.com>
4Date: Tue, 13 Nov 2012 09:56:54 +0100
5
6Upstream-Status: Pending
7
8Signed-off-by: jack zhang <jack.zhang@enea.com>
9Signed-off-by: Ciprian Barbu <ciprian.barbu@enea.com>
10---
11 gdb/testsuite/gdb.base/skip.exp | 4 ++--
12 1 files changed, 2 insertions(+), 2 deletions(-)
13
14diff --git a/gdb/testsuite/gdb.base/skip.exp b/gdb/testsuite/gdb.base/skip.exp
15--- a/gdb/testsuite/gdb.base/skip.exp
16+++ b/gdb/testsuite/gdb.base/skip.exp
17@@ -113,9 +113,9 @@ gdb_test "info skip 3" ".*\\n3\\s+file\\s+n.*" \
18 "info skip shows entry as disabled"
19
20 if ![runto_main] { fail "skip tests suppressed" }
21-gdb_test "step" "bar \\(\\) at.*" "step after disabling 3 (1)"
22+gdb_test "step" "foo \\(\\) at.*" "step after disabling 3 (1)"
23 gdb_test "step" ".*" "step after disabling 3 (2)"; # Return from foo()
24-gdb_test "step" "foo \\(\\) at.*" "step after disabling 3 (3)"
25+gdb_test "step" "bar \\(\\) at.*" "step after disabling 3 (3)"
26 gdb_test "step" ".*" "step after disabling 3 (4)"; # Return from bar()
27 gdb_test "step" "main \\(\\) at.*" "step after disabling 3 (5)"
28
29--
301.7.5.4
diff --git a/recipes-devtools/gdb/gdb/change-scripts-support-from-ksh-to-bash.patch b/recipes-devtools/gdb/gdb/change-scripts-support-from-ksh-to-bash.patch
new file mode 100644
index 0000000..d98affc
--- /dev/null
+++ b/recipes-devtools/gdb/gdb/change-scripts-support-from-ksh-to-bash.patch
@@ -0,0 +1,14 @@
1Avoid ksh dependency
2
3Upstream-Status: Pending
4
5Signed-off-by: Paul Vaduva <paul.vaduva@enea.com>
6diff -Naur a/gdb/testsuite/gdb.hp/tools/odump b/gdb/testsuite/gdb.hp/tools/odump
7--- a/gdb/testsuite/gdb.hp/tools/odump 2015-05-25 10:13:31.956107840 +0200
8+++ b/gdb/testsuite/gdb.hp/tools/odump 2015-05-25 10:14:04.690707176 +0200
9@@ -1,4 +1,4 @@
10-#!/bin/ksh
11+#!/bin/bash
12
13 # First source /app/appserver
14 . /app/appserver
diff --git a/recipes-devtools/gdb/gdb/gdb-ptest-attach.patch b/recipes-devtools/gdb/gdb/gdb-ptest-attach.patch
new file mode 100644
index 0000000..b95ac2c
--- /dev/null
+++ b/recipes-devtools/gdb/gdb/gdb-ptest-attach.patch
@@ -0,0 +1,30 @@
1From f442dc426b0346e1e413a7c3ae5b07725837135c Mon Sep 17 00:00:00 2001
2From: "Rick.Yang" <rick.yang@enea.com>
3Date: Sun, 11 Nov 2012 10:05:50 +0100
4Subject: [PATCH] Fix the failed test case.
5
6Description: Fixed failing test case
7 In fact, the test case is passing, but the output does not completely
8 match the expected pattern in some special case. Modified the pattern
9 to resolve it.
10
11Signed-off-by: Rick.Yang <rick.yang@enea.com>
12Signed-off-by: Ciprian Barbu <ciprian.barbu@enea.com>
13---
14 gdb/testsuite/gdb.base/attach.exp | 2 +-
15 1 files changed, 1 insertions(+), 1 deletions(-)
16
17diff --git a/gdb/testsuite/gdb.base/attach.exp b/gdb/testsuite/gdb.base/attach.exp
18--- a/gdb/testsuite/gdb.base/attach.exp
19+++ b/gdb/testsuite/gdb.base/attach.exp
20@@ -285,7 +285,7 @@ proc do_attach_tests {} {
21 gdb_test "dir ${objdir}/${subdir}" "Source directories searched: .*" \
22 "set source path"
23
24- gdb_test "cd /tmp" "Working directory /tmp." \
25+ gdb_test "cd /tmp" "Working directory /tmp.*" \
26 "cd away from process working directory"
27
28 # Explicitly flush out any knowledge of the previous attachment.
29--
301.7.5.4
diff --git a/recipes-devtools/gdb/gdb/run-ptest b/recipes-devtools/gdb/gdb/run-ptest
new file mode 100755
index 0000000..e8587e8
--- /dev/null
+++ b/recipes-devtools/gdb/gdb/run-ptest
@@ -0,0 +1,2 @@
1#!/bin/sh
2make -C testsuite check-single | sed -e 's/XFAIL/PASS/' -e 's/UNRESOLVED/SKIP/' -e 's/UNTESTED/SKIP/' -e 's/UNSUPPORTED/SKIP/'
diff --git a/recipes-devtools/gdb/gdb/runtest-flags.patch b/recipes-devtools/gdb/gdb/runtest-flags.patch
new file mode 100644
index 0000000..054abc3
--- /dev/null
+++ b/recipes-devtools/gdb/gdb/runtest-flags.patch
@@ -0,0 +1,30 @@
1Description: add -a to runtest
2 Pass "-a" to runtest so that everything is printed to output
3 (e.g. unsupported test cases)
4
5Author: "Gordon.Sun" <gordon.sun@enea.com>
6Date: Wed, 28 Nov 2012 03:39:58 +0100
7
8Upstream-Status: Inappropriate (other)
9
10Signed-off-by: Gordon.Sun <gordon.sun@enea.com>
11Signed-off-by: Ciprian Barbu <ciprian.barbu@enea.com>
12---
13 gdb/testsuite/Makefile.in | 2 +-
14 1 files changed, 1 insertions(+), 1 deletions(-)
15
16diff --git a/gdb/testsuite/Makefile.in b/gdb/testsuite/Makefile.in
17index fab124e..f5cddb2 100644
18--- a/gdb/testsuite/Makefile.in
19+++ b/gdb/testsuite/Makefile.in
20@@ -46,7 +46,7 @@ EXPECT = `if [ -f $${rootme}/../../expect/expect ] ; then \
21
22 RUNTEST = $(RUNTEST_FOR_TARGET)
23
24-RUNTESTFLAGS =
25+RUNTESTFLAGS = -a
26
27 FORCE_PARALLEL =
28
29--
301.7.5.4
diff --git a/recipes-devtools/gdb/gdb_7.7.1.bbappend b/recipes-devtools/gdb/gdb_7.7.1.bbappend
new file mode 100644
index 0000000..2da31a0
--- /dev/null
+++ b/recipes-devtools/gdb/gdb_7.7.1.bbappend
@@ -0,0 +1,40 @@
1inherit ptest
2
3FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
4
5SRC_URI += "file://run-ptest \
6 file://runtest-flags.patch \
7 file://0001-add-delay-before-run-exp-file.patch \
8 file://0002-function-name-is-used-by-mistake.patch \
9 file://gdb-ptest-attach.patch \
10 file://change-scripts-support-from-ksh-to-bash.patch \
11 "
12
13
14
15DEPENDS_${PN}-ptest += "expect dejagnu tcl"
16RDEPENDS_${PN}-ptest += "glibc-charmap-ibm1047 \
17 glibc-gconv-ibm1047 \
18 glibc-charmap-ebcdic-us \
19 glibc-gconv-ebcdic-us \
20 glibc-gconv-utf-32 \
21 glibc-gconv-utf-16 \
22 prelink \
23 expect \
24 dejagnu \
25 make \
26 bash \
27 "
28do_configure_ptest () {
29 cd ${S}/gdb/testsuite/
30 ./configure --host=${HOST_SYS} --build=${BUILD_SYS}
31 make site.exp
32}
33
34do_install_ptest () {
35 cp -pr ${S}/gdb/testsuite/ ${D}${PTEST_PATH}
36 cp -pr ${S}/gdb/features/ ${D}${PTEST_PATH}
37 install -p ${S}/config.sub ${D}${PTEST_PATH}/testsuite/
38 install -p ${S}/config.guess ${D}${PTEST_PATH}/testsuite/
39 install -p ${S}/install-sh ${D}${PTEST_PATH}/testsuite/
40}
diff --git a/recipes-devtools/python/python-smartpm/smart-already-installed-message.patch b/recipes-devtools/python/python-smartpm/smart-already-installed-message.patch
new file mode 100644
index 0000000..e264de8
--- /dev/null
+++ b/recipes-devtools/python/python-smartpm/smart-already-installed-message.patch
@@ -0,0 +1,54 @@
1
2From a74a9a9eb9d75964a0e978950e8b191d7a18d763 Mon Sep 17 00:00:00 2001
3From: Paul Eggleton <paul.eggleton@linux.intel.com>
4Date: Fri, 5 Jun 2015 17:07:16 +0100
5Subject: [PATCH] smart: change "is already installed" message from warning to
6 info
7
8This doesn't need to be a warning.
9
10Upstream-Status: Pending
11
12Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
13---
14 smart/commands/install.py | 4 ++--
15 smart/interfaces/text/interactive.py | 2 +-
16 2 files changed, 3 insertions(+), 3 deletions(-)
17
18diff --git a/smart/commands/install.py b/smart/commands/install.py
19index 6ef9682..80d456b 100644
20--- a/smart/commands/install.py
21+++ b/smart/commands/install.py
22@@ -152,7 +152,7 @@ def main(ctrl, opts):
23 for obj in results:
24 for pkg in obj.packages:
25 if pkg.installed:
26- iface.warning(_("%s (for %s) is already installed")
27+ iface.info(_("%s (for %s) is already installed")
28 % (pkg, arg))
29 installed = True
30 break
31@@ -184,7 +184,7 @@ def main(ctrl, opts):
32 for name in names:
33 pkg = names[name][0]
34 if pkg.installed:
35- iface.warning(_("%s is already installed") % pkg)
36+ iface.info(_("%s is already installed") % pkg)
37 else:
38 trans.enqueue(pkg, INSTALL)
39
40diff --git a/smart/interfaces/text/interactive.py b/smart/interfaces/text/interactive.py
41index 9865584..190867b 100644
42--- a/smart/interfaces/text/interactive.py
43+++ b/smart/interfaces/text/interactive.py
44@@ -278,7 +278,7 @@ class Interpreter(Cmd):
45 for name in names:
46 pkg = names[name][0]
47 if pkg.installed:
48- iface.warning(_("%s is already installed") % pkg)
49+ iface.info(_("%s is already installed") % pkg)
50 else:
51 found = True
52 transaction.enqueue(pkg, INSTALL)
53--
542.1.0
diff --git a/recipes-devtools/python/python-smartpm_1.4.1.bbappend b/recipes-devtools/python/python-smartpm_1.4.1.bbappend
new file mode 100644
index 0000000..1148437
--- /dev/null
+++ b/recipes-devtools/python/python-smartpm_1.4.1.bbappend
@@ -0,0 +1,5 @@
1FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
2
3SRC_URI += "\
4 file://smart-already-installed-message.patch \
5"
diff --git a/recipes-devtools/tclap/tclap_1.2.1.bbappend b/recipes-devtools/tclap/tclap_1.2.1.bbappend
new file mode 100644
index 0000000..afe3e9c
--- /dev/null
+++ b/recipes-devtools/tclap/tclap_1.2.1.bbappend
@@ -0,0 +1 @@
ALLOW_EMPTY_${PN} = "1"
diff --git a/recipes-extended/ltp/files/fix-test_proc_kill-hang.patch b/recipes-extended/ltp/files/fix-test_proc_kill-hang.patch
new file mode 100644
index 0000000..8fb11af
--- /dev/null
+++ b/recipes-extended/ltp/files/fix-test_proc_kill-hang.patch
@@ -0,0 +1,23 @@
1Fix test_proc_kill hanging
2
3Sometimes the signal is delivered to memcg_process before the framework took
4into consideration its pid entered in the tasks. Fixed by delaying the signal
5send command.
6
7Signed-off-by: George Nita <george.nita@enea.com>
8Upstream-Status: Not Submitted
9
10diff --git a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
11index ffbe006..e81bf74 100755
12--- a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
13+++ b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
14@@ -220,8 +220,8 @@ test_proc_kill()
15
16 $TEST_PATH/memcg_process $2 -s $3 &
17 pid=$!
18- sleep 1
19 echo $pid > tasks
20+ sleep 1
21
22 kill -s USR1 $pid 2> /dev/null
23 sleep 1
diff --git a/recipes-extended/ltp/files/periodic_output.patch b/recipes-extended/ltp/files/periodic_output.patch
new file mode 100644
index 0000000..153fe83
--- /dev/null
+++ b/recipes-extended/ltp/files/periodic_output.patch
@@ -0,0 +1,31 @@
1Add periodic output for long time test.
2
3Signed-off-by: Tudor Florea <tudor.florea@enea.com>
4Upstream-Status: Pending
5
6diff -ruN a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
7--- a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh 2013-11-08 15:54:09.515049081 +0100
8+++ b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh 2013-11-08 22:32:15.587370406 +0100
9@@ -37,7 +37,8 @@
10 exit 0
11 fi
12
13-RUN_TIME=$(( 60 * 60 ))
14+ONE_MINUTE=60
15+RUN_TIME=60
16
17 cleanup()
18 {
19@@ -81,7 +82,11 @@
20 eval /bin/kill -s SIGUSR1 \$pid$i 2> /dev/null
21 done
22
23- sleep $4
24+ for i in $(seq 0 $RUN_TIME-1)
25+ do
26+ eval echo "Started $i min ago. Still alive... "
27+ sleep $ONE_MINUTE
28+ done
29
30 for i in $(seq 0 $(($1-1)))
31 do
diff --git a/recipes-extended/ltp/ltp_20140422.bbappend b/recipes-extended/ltp/ltp_20140422.bbappend
index 59a4341..e0b6de0 100644
--- a/recipes-extended/ltp/ltp_20140422.bbappend
+++ b/recipes-extended/ltp/ltp_20140422.bbappend
@@ -1,3 +1,10 @@
1FILESEXTRAPATHS_append := "${THISDIR}/files"
2
3SRC_URI_append = " \
4 file://periodic_output.patch \
5 file://fix-test_proc_kill-hang.patch \
6 "
7
1do_compile_prepend () { 8do_compile_prepend () {
2 ( make -C ${B}/testcases/open_posix_testsuite generate-makefiles conformance-all tools-all functional-all stress-all ) 9 ( make -C ${B}/testcases/open_posix_testsuite generate-makefiles conformance-all tools-all functional-all stress-all )
3} 10}
diff --git a/recipes-support/fuse/fuse_2.9.3.bbappend b/recipes-support/fuse/fuse_2.9.3.bbappend
new file mode 100644
index 0000000..e4a6816
--- /dev/null
+++ b/recipes-support/fuse/fuse_2.9.3.bbappend
@@ -0,0 +1,8 @@
1PACKAGES =+ "fusermount"
2
3FILES_fusermount += "${base_bindir}/fusermount"
4
5do_install_append () {
6 install -d ${D}${base_bindir}
7 install -m 0755 ${B}/util/fusermount -t ${D}${base_bindir}
8}