meta-openembedded: sumo refresh b0950aeff5..be79b8b111

Update meta-openembedded to sumo HEAD.

Armin Kuster (2):
      wireshark: update to 2.4.7
      wireshark: update to 2.4.8

Denys Dmytriyenko (1):
      devmem2: ensure word is 32-bit, add support for 64-bit long

Jagadeesh Krishnanjanappa (1):
      fuse: CVE-2018-10906

Oleksandr Kravchuk (1):
      libsodium: update to 1.0.16

changqing.li@windriver.com (1):
      php: upgrade 7.2.4 -> 7.2.7     Included:

leimaohui (2):
      python-pytest: Fix conflict error as following:
      libnih: Fix do_package error when enable mutilib.

Change-Id: I036baed004e407d5e9fde46eba75b6cc7e3479e0
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/meta-openembedded/meta-filesystems/recipes-support/fuse/files/CVE-2018-10906-1.patch b/meta-openembedded/meta-filesystems/recipes-support/fuse/files/CVE-2018-10906-1.patch
new file mode 100644
index 0000000..83bef30
--- /dev/null
+++ b/meta-openembedded/meta-filesystems/recipes-support/fuse/files/CVE-2018-10906-1.patch
@@ -0,0 +1,52 @@
+From 28bdae3d113ef479c1660a581ef720cdc33bf466 Mon Sep 17 00:00:00 2001
+From: Jann Horn <jannh@google.com>
+Date: Fri, 13 Jul 2018 15:15:36 -0700
+Subject: [PATCH] fusermount: don't feed "escaped commas" into mount options
+
+The old code permits the following behavior:
+
+$ _FUSE_COMMFD=10000 priv_strace -etrace=mount -s200 fusermount -o 'foobar=\,allow_other' mount
+mount("/dev/fuse", ".", "fuse", MS_NOSUID|MS_NODEV, "foobar=\\,allow_other,fd=3,rootmode=40000,user_id=1000,group_id=1000") = -1 EINVAL (Invalid argument)
+
+However, backslashes do not have any special meaning for the kernel here.
+
+As it happens, you can't abuse this because there is no FUSE mount option
+that takes a string value that can contain backslashes; but this is very
+brittle. Don't interpret "escape characters" in places where they don't
+work.
+
+CVE: CVE-2018-10906
+Upstream-Status: Backport [https://github.com/libfuse/libfuse/commit/28bdae3d113ef479c1660a581ef720cdc33bf466]
+
+Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
+---
+ util/fusermount.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/util/fusermount.c b/util/fusermount.c
+index 0e1d34d..143bd4a 100644
+--- a/util/fusermount.c
++++ b/util/fusermount.c
+@@ -29,6 +29,7 @@
+ #include <sys/socket.h>
+ #include <sys/utsname.h>
+ #include <sched.h>
++#include <stdbool.h>
+ 
+ #define FUSE_COMMFD_ENV		"_FUSE_COMMFD"
+ 
+@@ -754,8 +755,10 @@ static int do_mount(const char *mnt, char **typep, mode_t rootmode,
+ 		unsigned len;
+ 		const char *fsname_str = "fsname=";
+ 		const char *subtype_str = "subtype=";
++		bool escape_ok = begins_with(s, fsname_str) ||
++				 begins_with(s, subtype_str);
+ 		for (len = 0; s[len]; len++) {
+-			if (s[len] == '\\' && s[len + 1])
++			if (escape_ok && s[len] == '\\' && s[len + 1])
+ 				len++;
+ 			else if (s[len] == ',')
+ 				break;
+-- 
+2.13.3
+
diff --git a/meta-openembedded/meta-filesystems/recipes-support/fuse/files/CVE-2018-10906-2.patch b/meta-openembedded/meta-filesystems/recipes-support/fuse/files/CVE-2018-10906-2.patch
new file mode 100644
index 0000000..104aa17
--- /dev/null
+++ b/meta-openembedded/meta-filesystems/recipes-support/fuse/files/CVE-2018-10906-2.patch
@@ -0,0 +1,48 @@
+From 5018a0c016495155ee598b7e0167b43d5d902414 Mon Sep 17 00:00:00 2001
+From: Jann Horn <jannh@google.com>
+Date: Sat, 14 Jul 2018 03:47:50 -0700
+Subject: [PATCH] fusermount: refuse unknown options
+
+Blacklists are notoriously fragile; especially if the kernel wishes to add
+some security-critical mount option at a later date, all existing systems
+with older versions of fusermount installed will suddenly have a security
+problem.
+Additionally, if the kernel's option parsing became a tiny bit laxer, the
+blacklist could probably be bypassed.
+
+Whitelist known-harmless flags instead, even if it's slightly more
+inconvenient.
+
+CVE: CVE-2018-10906
+Upstream-Status: Backport [https://github.com/libfuse/libfuse/commit/5018a0c016495155ee598b7e0167b43d5d902414]
+
+Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
+---
+ util/fusermount.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/util/fusermount.c b/util/fusermount.c
+index 4e0f51a..2792407 100644
+--- a/util/fusermount.c
++++ b/util/fusermount.c
+@@ -819,10 +819,16 @@ static int do_mount(const char *mnt, char **typep, mode_t rootmode,
+ 						flags |= flag;
+ 					else
+ 						flags  &= ~flag;
+-				} else {
++				} else if (opt_eq(s, len, "default_permissions") ||
++					   opt_eq(s, len, "allow_other") ||
++					   begins_with(s, "max_read=") ||
++					   begins_with(s, "blksize=")) {
+ 					memcpy(d, s, len);
+ 					d += len;
+ 					*d++ = ',';
++				} else {
++					fprintf(stderr, "%s: unknown option '%.*s'\n", progname, len, s);
++					exit(1);
+ 				}
+ 			}
+ 		}
+-- 
+2.13.3
+
diff --git a/meta-openembedded/meta-filesystems/recipes-support/fuse/fuse_2.9.7.bb b/meta-openembedded/meta-filesystems/recipes-support/fuse/fuse_2.9.7.bb
index 202d4c3..1eb9b70 100644
--- a/meta-openembedded/meta-filesystems/recipes-support/fuse/fuse_2.9.7.bb
+++ b/meta-openembedded/meta-filesystems/recipes-support/fuse/fuse_2.9.7.bb
@@ -15,6 +15,8 @@
            file://aarch64.patch \
            file://0001-fuse-fix-the-return-value-of-help-option.patch \
            file://fuse.conf \
+           file://CVE-2018-10906-1.patch \
+           file://CVE-2018-10906-2.patch \
 "
 SRC_URI[md5sum] = "9bd4ce8184745fd3d000ca2692adacdb"
 SRC_URI[sha256sum] = "832432d1ad4f833c20e13b57cf40ce5277a9d33e483205fc63c78111b3358874"
diff --git a/meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_2.4.6.bb b/meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_2.4.8.bb
similarity index 95%
rename from meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_2.4.6.bb
rename to meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_2.4.8.bb
index 3da0a7b..7c81ad3 100644
--- a/meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_2.4.6.bb
+++ b/meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_2.4.8.bb
@@ -11,8 +11,8 @@
 
 UPSTREAM_CHECK_URI = "https://1.as.dl.wireshark.org/src"
 
-SRC_URI[md5sum] = "8cfb73e286dd6427ca4405e6e802d13e"
-SRC_URI[sha256sum] = "8e965fd282bc0c09e7c4eba5f08a555d0ccf40a7d1544b939e01b90bc893d5fe"
+SRC_URI[md5sum] = "25f93aa6a2b3fdd9d1f01a49f84d224f"
+SRC_URI[sha256sum] = "db8ed7828c157e4ffb91fb8c41fa5a2f37fd44259175951a5c37848bf641f5e8"
 
 PE = "1"
 
diff --git a/meta-openembedded/meta-oe/recipes-crypto/libsodium/libsodium_1.0.11.bb b/meta-openembedded/meta-oe/recipes-crypto/libsodium/libsodium_1.0.11.bb
deleted file mode 100644
index cbcbe96..0000000
--- a/meta-openembedded/meta-oe/recipes-crypto/libsodium/libsodium_1.0.11.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-SUMMARY = "The Sodium crypto library"
-HOMEPAGE = "http://libsodium.org/"
-LICENSE = "ISC"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=c9f00492f01f5610253fde01c3d2e866"
-
-SRC_URI = "https://download.libsodium.org/libsodium/releases/${BPN}-${PV}.tar.gz"
-SRC_URI[md5sum] = "b58928d035064b2a46fb564937b83540"
-SRC_URI[sha256sum] = "a14549db3c49f6ae2170cbbf4664bd48ace50681045e8dbea7c8d9fb96f9c765"
-
-inherit autotools
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta-openembedded/meta-oe/recipes-crypto/libsodium/libsodium_1.0.16.bb b/meta-openembedded/meta-oe/recipes-crypto/libsodium/libsodium_1.0.16.bb
new file mode 100644
index 0000000..57f38fe
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-crypto/libsodium/libsodium_1.0.16.bb
@@ -0,0 +1,13 @@
+SUMMARY = "The Sodium crypto library"
+HOMEPAGE = "http://libsodium.org/"
+BUGTRACKER = "https://github.com/jedisct1/libsodium/issues"
+LICENSE = "ISC"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=7f5ecba1fa793fc1f3c8f32d6cb5a37b"
+
+SRC_URI = "https://download.libsodium.org/libsodium/releases/${BPN}-${PV}.tar.gz"
+SRC_URI[md5sum] = "37b18839e57e7a62834231395c8e962b"
+SRC_URI[sha256sum] = "eeadc7e1e1bcef09680fb4837d448fbdf57224978f865ac1c16745868fbd0533"
+
+inherit autotools
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-acinclude-use-pkgconfig-for-libxml2-config.patch b/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-acinclude-use-pkgconfig-for-libxml2-config.patch
index 51a5e43..e7d326d 100644
--- a/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-acinclude-use-pkgconfig-for-libxml2-config.patch
+++ b/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-acinclude-use-pkgconfig-for-libxml2-config.patch
@@ -4,7 +4,7 @@
 Subject: [PATCH 3/8] acinclude: use pkgconfig for libxml2 config
 
 Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
-Upstream-Status: pending
+Upstream-Status: Pending
 ---
  acinclude.m4 | 63 ++++++++++++++++++++++--------------------------------------
  1 file changed, 23 insertions(+), 40 deletions(-)
diff --git a/meta-openembedded/meta-oe/recipes-devtools/php/php/acinclude-xml2-config.patch b/meta-openembedded/meta-oe/recipes-devtools/php/php/acinclude-xml2-config.patch
index 30811a7..d083166 100644
--- a/meta-openembedded/meta-oe/recipes-devtools/php/php/acinclude-xml2-config.patch
+++ b/meta-openembedded/meta-oe/recipes-devtools/php/php/acinclude-xml2-config.patch
@@ -1,4 +1,4 @@
-Upstream-status: Unknown
+Upstream-Status: Pending
 
 diff --git a/acinclude.m4 b/acinclude.m4
 index 4fd452e..206fcbf 100644
diff --git a/meta-openembedded/meta-oe/recipes-devtools/php/php/iconv.patch b/meta-openembedded/meta-oe/recipes-devtools/php/php/iconv.patch
index b6e3ceb..ecf7d87 100644
--- a/meta-openembedded/meta-oe/recipes-devtools/php/php/iconv.patch
+++ b/meta-openembedded/meta-oe/recipes-devtools/php/php/iconv.patch
@@ -1,7 +1,7 @@
 From 17cc5645f3acf943a5a06465d09d0ebcfea987bd Mon Sep 17 00:00:00 2001
 From: Koen Kooi <koen@dominion.thruhere.net>
 Date: Wed, 2 Nov 2011 16:54:57 +0100
-Subject: [PATCH] Upstream-status: Unknown
+Subject: [PATCH] Upstream-Status: Pending
 
 ---
  acinclude.m4        | 3 ++-
diff --git a/meta-openembedded/meta-oe/recipes-devtools/php/php/imap-fix-autofoo.patch b/meta-openembedded/meta-oe/recipes-devtools/php/php/imap-fix-autofoo.patch
index b5fb7d4..16359af 100644
--- a/meta-openembedded/meta-oe/recipes-devtools/php/php/imap-fix-autofoo.patch
+++ b/meta-openembedded/meta-oe/recipes-devtools/php/php/imap-fix-autofoo.patch
@@ -1,7 +1,7 @@
 From c084c8349d1780980e232cb28b60a109e3d89438 Mon Sep 17 00:00:00 2001
 From: Koen Kooi <koen@dominion.thruhere.net>
 Date: Wed, 2 Nov 2011 16:54:57 +0100
-Subject: [PATCH] Upstream-status: Unknown
+Subject: [PATCH] Upstream-Status: Pending
 
 ---
  acinclude.m4       |  2 +-
diff --git a/meta-openembedded/meta-oe/recipes-devtools/php/php/pear-makefile.patch b/meta-openembedded/meta-oe/recipes-devtools/php/php/pear-makefile.patch
index 4bc1025..fcbf25b 100644
--- a/meta-openembedded/meta-oe/recipes-devtools/php/php/pear-makefile.patch
+++ b/meta-openembedded/meta-oe/recipes-devtools/php/php/pear-makefile.patch
@@ -1,7 +1,7 @@
 From edd575a546d56bb5683aff19782b16963d61fd0b Mon Sep 17 00:00:00 2001
 From: Koen Kooi <koen@dominion.thruhere.net>
 Date: Wed, 2 Nov 2011 16:54:57 +0100
-Subject: [PATCH] Upstream-status: Unknown
+Subject: [PATCH] Upstream-Status: Pending
 
 ---
  pear/Makefile.frag | 2 +-
diff --git a/meta-openembedded/meta-oe/recipes-devtools/php/php/php5-pear-makefile.patch b/meta-openembedded/meta-oe/recipes-devtools/php/php/php5-pear-makefile.patch
index cff6426..9974303 100644
--- a/meta-openembedded/meta-oe/recipes-devtools/php/php/php5-pear-makefile.patch
+++ b/meta-openembedded/meta-oe/recipes-devtools/php/php/php5-pear-makefile.patch
@@ -1,7 +1,7 @@
 From 79725e82d5981fc94eb657f0f46a499dbfc1cc40 Mon Sep 17 00:00:00 2001
 From: Koen Kooi <koen@dominion.thruhere.net>
 Date: Wed, 2 Nov 2011 16:54:57 +0100
-Subject: [PATCH] Upstream-status: Unknown
+Subject: [PATCH] Upstream-Status: Pending
 
 %% original patch: php5-pear-makefile.patch
 ---
diff --git a/meta-openembedded/meta-oe/recipes-devtools/php/php/php_exec_native.patch b/meta-openembedded/meta-oe/recipes-devtools/php/php/php_exec_native.patch
index 6af0dc8..8040900 100644
--- a/meta-openembedded/meta-oe/recipes-devtools/php/php/php_exec_native.patch
+++ b/meta-openembedded/meta-oe/recipes-devtools/php/php/php_exec_native.patch
@@ -1,7 +1,7 @@
 From d251b5aa3d23803d016ca16818e2e1d2f2b70a02 Mon Sep 17 00:00:00 2001
 From: Koen Kooi <koen@dominion.thruhere.net>
 Date: Wed, 2 Nov 2011 16:54:57 +0100
-Subject: [PATCH] Upstream-status: Inappriate
+Subject: [PATCH] Upstream-Status: Inappriate
 
 ---
  sapi/cli/config.m4 | 2 +-
diff --git a/meta-openembedded/meta-oe/recipes-devtools/php/php_7.2.4.bb b/meta-openembedded/meta-oe/recipes-devtools/php/php_7.2.7.bb
similarity index 80%
rename from meta-openembedded/meta-oe/recipes-devtools/php/php_7.2.4.bb
rename to meta-openembedded/meta-oe/recipes-devtools/php/php_7.2.7.bb
index 2fd1e66..a256cd7 100644
--- a/meta-openembedded/meta-oe/recipes-devtools/php/php_7.2.4.bb
+++ b/meta-openembedded/meta-oe/recipes-devtools/php/php_7.2.7.bb
@@ -4,7 +4,6 @@
 
 SRC_URI += "file://change-AC_TRY_RUN-to-AC_TRY_LINK.patch \
             file://0001-acinclude.m4-skip-binconfig-check-for-libxml.patch \
-            file://0001-main-php_ini.c-build-empty-php_load_zend_extension_c.patch \
             file://0001-fix-error-caused-by-a-new-variable-is-declared-after.patch \
            "
 SRC_URI_append_class-target = " \
@@ -13,8 +12,8 @@
                                 file://0001-opcache-config.m4-enable-opcache.patch \
                                 "
 
-SRC_URI[md5sum] = "864c64ffd2f1686b035ef8ce6a6d8478"
-SRC_URI[sha256sum] = "11658a0d764dc94023b9fb60d4b5eb75d438ad17981efe70abb0d0d09a447ef3"
+SRC_URI[md5sum] = "4b5698c8c6c2b9cbff3a5706da67bb0f"
+SRC_URI[sha256sum] = "cc81675a96af4dd18d8ffc02f26a36c622abadf86af7ecfea7bcde8d3c96d5a3"
 
 PACKAGECONFIG[mysql] = "--with-mysqli=${STAGING_BINDIR_CROSS}/mysql_config \
                         --with-pdo-mysql=${STAGING_BINDIR_CROSS}/mysql_config \
diff --git a/meta-openembedded/meta-oe/recipes-support/devmem2/devmem2.bb b/meta-openembedded/meta-oe/recipes-support/devmem2/devmem2.bb
index c86eb2e..9bd1eb7 100644
--- a/meta-openembedded/meta-oe/recipes-support/devmem2/devmem2.bb
+++ b/meta-openembedded/meta-oe/recipes-support/devmem2/devmem2.bb
@@ -4,7 +4,9 @@
 PR = "r7"
 
 SRC_URI = "http://www.free-electrons.com/pub/mirror/devmem2.c;downloadfilename=devmem2-new.c \
-           file://devmem2-fixups-2.patch;apply=yes;striplevel=0"
+           file://devmem2-fixups-2.patch;apply=yes;striplevel=0 \
+           file://0001-devmem.c-ensure-word-is-32-bit-and-add-support-for-6.patch"
+
 S = "${WORKDIR}"
 
 CFLAGS += "-DFORCE_STRICT_ALIGNMENT"
diff --git a/meta-openembedded/meta-oe/recipes-support/devmem2/devmem2/0001-devmem.c-ensure-word-is-32-bit-and-add-support-for-6.patch b/meta-openembedded/meta-oe/recipes-support/devmem2/devmem2/0001-devmem.c-ensure-word-is-32-bit-and-add-support-for-6.patch
new file mode 100644
index 0000000..2a57f29
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/devmem2/devmem2/0001-devmem.c-ensure-word-is-32-bit-and-add-support-for-6.patch
@@ -0,0 +1,70 @@
+From 1360a907879dd24041797a3b709d49aeac2ab444 Mon Sep 17 00:00:00 2001
+From: Denys Dmytriyenko <denys@ti.com>
+Date: Tue, 29 May 2018 16:55:42 -0400
+Subject: [PATCH] devmem.c: ensure word is 32-bit and add support for 64-bit
+ long
+
+Signed-off-by: Denys Dmytriyenko <denys@ti.com>
+---
+ devmem2.c | 23 +++++++++++++++++------
+ 1 file changed, 17 insertions(+), 6 deletions(-)
+
+diff --git a/devmem2.c b/devmem2.c
+index 5845381..68131b2 100644
+--- a/devmem2.c
++++ b/devmem2.c
+@@ -39,6 +39,7 @@
+ 
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <stdint.h>
+ #include <unistd.h>
+ #include <string.h>
+ #include <errno.h>
+@@ -69,7 +70,7 @@ int main(int argc, char **argv) {
+ 	if(argc < 2) {
+ 		fprintf(stderr, "\nUsage:\t%s { address } [ type [ data ] ]\n"
+ 			"\taddress : memory address to act upon\n"
+-			"\ttype    : access operation type : [b]yte, [h]alfword, [w]ord\n"
++			"\ttype    : access operation type : [b]yte, [h]alfword, [w]ord, [l]ong\n"
+ 			"\tdata    : data to be written\n\n",
+ 			argv[0]);
+ 		exit(1);
+@@ -103,9 +104,14 @@ int main(int argc, char **argv) {
+ 			read_result = *((unsigned short *) virt_addr);
+ 			break;
+ 		case 'w':
+-			data_size = sizeof(unsigned long);
++			data_size = sizeof(uint32_t);
+ 			virt_addr = fixup_addr(virt_addr, data_size);
+-			read_result = *((unsigned long *) virt_addr);
++			read_result = *((uint32_t *) virt_addr);
++			break;
++		case 'l':
++			data_size = sizeof(uint64_t);
++			virt_addr = fixup_addr(virt_addr, data_size);
++			read_result = *((uint64_t *) virt_addr);
+ 			break;
+ 		default:
+ 			fprintf(stderr, "Illegal data type '%c'.\n", access_type);
+@@ -129,9 +135,14 @@ int main(int argc, char **argv) {
+ 				read_result = *((unsigned short *) virt_addr);
+ 				break;
+ 			case 'w':
+-				virt_addr = fixup_addr(virt_addr, sizeof(unsigned long));
+-				*((unsigned long *) virt_addr) = write_val;
+-				read_result = *((unsigned long *) virt_addr);
++				virt_addr = fixup_addr(virt_addr, sizeof(uint32_t));
++				*((uint32_t *) virt_addr) = write_val;
++				read_result = *((uint32_t *) virt_addr);
++				break;
++			case 'l':
++				virt_addr = fixup_addr(virt_addr, sizeof(uint64_t));
++				*((uint64_t *) virt_addr) = write_val;
++				read_result = *((uint64_t *) virt_addr);
+ 				break;
+ 		}
+ 		sprintf(fmt_str, "Write at address 0x%%08lX (%%p): 0x%%0%dlX, "
+-- 
+2.7.4
+
diff --git a/meta-openembedded/meta-oe/recipes-support/libnih/libnih_1.0.3.bb b/meta-openembedded/meta-oe/recipes-support/libnih/libnih_1.0.3.bb
index 3e35f4d..fcb6beb 100644
--- a/meta-openembedded/meta-oe/recipes-support/libnih/libnih_1.0.3.bb
+++ b/meta-openembedded/meta-oe/recipes-support/libnih/libnih_1.0.3.bb
@@ -34,5 +34,15 @@
 inherit autotools
 inherit gettext
 
+do_configure_append () {
+        sed -i -e 's,lib/pkgconfig,${baselib}/pkgconfig,g' ${S}/nih/Makefile.in ${S}/nih-dbus/Makefile.in
+}
+
+FILES_${PN}-dev += "${libdir}/pkgconfig/* \
+        ${includedir}/* \
+        ${libdir}/*.so \
+        ${datadir}/* \
+        "
+
 # target libnih requires native nih-dbus-tool
 BBCLASSEXTEND = "native"
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python-pytest.inc b/meta-openembedded/meta-python/recipes-devtools/python/python-pytest.inc
index 4feb9a0..4c32dfb 100644
--- a/meta-openembedded/meta-python/recipes-devtools/python/python-pytest.inc
+++ b/meta-openembedded/meta-python/recipes-devtools/python/python-pytest.inc
@@ -9,6 +9,8 @@
 SRC_URI_append = " file://0001-setup.py-remove-the-setup_requires-for-setuptools-scm.patch \
                    file://pytest_version_fix.patch "
 
+inherit update-alternatives
+
 RDEPENDS_${PN}_class-target += " \
     ${PYTHON_PN}-attrs \
     ${PYTHON_PN}-debugger \
@@ -22,4 +24,12 @@
 
 FILESEXTRAPATHS_prepend := "${THISDIR}/python-pytest:"
 
+ALTERNATIVE_${PN} += "py.test pytest"
+
+NATIVE_LINK_NAME[pytest] = "${bindir}/pytest"
+ALTERNATIVE_TARGET[pytest] = "${bindir}/pytest"
+
+ALTERNATIVE_LINK_NAME[py.test] = "${bindir}/py.test"
+ALTERNATIVE_TARGET[py.test] = "${bindir}/py.test"
+
 BBCLASSEXTEND = "native nativesdk"
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python-pytest_3.4.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python-pytest_3.4.2.bb
index 201ab05..39e50ac 100644
--- a/meta-openembedded/meta-python/recipes-devtools/python/python-pytest_3.4.2.bb
+++ b/meta-openembedded/meta-python/recipes-devtools/python/python-pytest_3.4.2.bb
@@ -6,3 +6,4 @@
     ${PYTHON_PN}-compiler \
     ${PYTHON_PN}-funcsigs \
 "
+ALTERNATIVE_PRIORITY = "10"
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest_3.4.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest_3.4.2.bb
index 466cfa8..eba6632 100644
--- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest_3.4.2.bb
+++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest_3.4.2.bb
@@ -1,2 +1,4 @@
 inherit pypi setuptools3
 require python-pytest.inc
+
+ALTERNATIVE_PRIORITY = "100"