subtree updates

meta-raspberrypi: cfbb192e5c..83f5577d8d:
  AJ Bagwell (1):
        linux-raspberrypi: add UBOOT_ENTRYPOINT to match LOADADDR

poky: ed98f1a1ae..30b38d9cb9:
  Alexander Kanavin (1):
        connman-conf: ignore eth0 in qemu in a way that is not sysvinit-specific

  Chen Qi (1):
        spirv-tools: fix to use sdk-1.3.204 branch

  Kevin Hao (1):
        kernel.bbclass: Fix the do_strip() malfunction

  Khem Raj (2):
        libarchive: Upgrade to 3.6.1
        musl: Move to 1.2.3 release tag

  Martin Jansa (1):
        license_image.bbclass: close package.manifest file

  Ralph Siemsen (2):
        xz: fix CVE-2022-1271
        gzip: upgrade 1.11 -> 1.12

  Richard Purdie (2):
        uninative: Upgrade to 3.6 with gcc 12 support
        package_ipk/deb: Fix specific version handling

  Ross Burton (1):
        python3-cryptography: backport fix for leaky test

meta-openembedded: b9e440ead8..1888971b1f:
  Andreas Müller (5):
        octave: add PACKAGECONFIG for (Qt-)gui - disabled by default
        xfce4-eyes-plugin: upgrade 4.5.1 -> 4.6.0
        gnome-online-accounts: upgrade 3.43.1 -> 3.44.0
        mutter: upgrade 41.2 -> 42.0
        gnome-shell: upgrade 41.2 -> 42.0

  Clément Péron (1):
        grpc: remove unused patches

  Kai Kang (2):
        wxwidgets: fix wx-config multilib issue
        python3-wxgtk4: pass '--baselib' to WX_CONFIG

  Khem Raj (6):
        Revert "python3-cppy: upgrade 1.2.0 -> 1.2.1"
        libotr: Include missing sys/socket.h header
        libcereal: Link in libatomic on rv32 for ptests
        gnuplot: Disable libcerf and fix typo
        libcereal: Disable on ppc/ppc64
        evolution-data-server: Disable g-i on musl

  Markus Volk (1):
        gparted: update to v1.4.0

  Naveen Saini (1):
        ndctl: fix build failure with EXEWRAPPER_ENABLED False

  Oleksandr Kravchuk (27):
        python3-beautifulsoup: update to 4.11.1
        python3-bidict: update to 0.22.0
        python3-can: update t 4.0.0
        python3-elementpath: update to 2.5.0
        python3-flask-login: update to 0.6.0
        python3-flask: update to 2.1.1
        python3-gcovr: update to 5.1
        python3-google-api-core: update to 2.7.1
        python3-google-auth: update to 2.6.3
        python3-grpcio-tools: update to 1.45.0
        python3-ipython: update to 8.2.0
        python3-jmespath: update to 1.0.0
        python3-mypy: update to 0.942
        python3-pint: update to 0.19.1
        python3-portalocker: update to 2.4.0
        python3-pulsectl: update to 22.3.2
        python3-pycurl: update to 7.45.1
        python3-pymogo: update to 4.1.0
        python3-pyscaffold: update to 4.2.1
        python3-pytest-helpers-namespace: update to 2021.12.29
        python3-pywbem: update to 1.4.1
        python3-regex: update to 2022.3.15
        python3-sympy: update to 1.10.1
        python3-tqdm: update to 4.64.1
        python3-twitter: update to 4.8.0
        python3-xmlschema: update to 1.10.0
        python3-zeroconf: update to 0.38.4

  Robert Yang (1):
        python3-wxgtk4: Require DISTRO_FEATURES as gtk3

  Sakib Sajal (1):
        drbd-utils: update 9.13.1 -> 9.20.2

  Scott Murray (1):
        wxwidgets: Fix building without x11

  Stefan Herbrechtsmeier (2):
        grpc: add cmake support for target
        grpc: remove useless link with libatomic append

  Stefan Schmidt (4):
        ot-br-posix: add recipe for an OpenThread Border Router
        ot-daemon: add recipe for OpenThread daemon
        wpantund: add new recipe
        MAINTAINERS: add entry for OpenThread

  Willy Tu (1):
        googletests: Update SRC_URI to 9e71237 to move closer to lastest version

  Yi Zhao (1):
        libyang: do not inherit binconfig-disabled

  wangmy (9):
        haveged: upgrade 1.9.17 -> 1.9.18
        hidapi: upgrade 0.10.1 -> 0.11.2
        hwdata: upgrade 0.357 -> 0.358
        broadcom-bt-firmware: upgrade 12.0.1.1105_p2 -> 12.0.1.1105_p3
        byacc: upgrade 20211224 -> 20220128
        ctags: upgrade 5.9.20211114.0 -> 5.9.20220410.0
        feh: upgrade 3.6.1 -> 3.8
        fio: upgrade 3.29 -> 3.30
        grpc: upgrade 1.45.1 -> 1.45.2

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ia6d6cf07c9398a7885df6b31b27019da4d8f01d8
diff --git a/meta-openembedded/meta-networking/MAINTAINERS b/meta-openembedded/meta-networking/MAINTAINERS
index 77e9066..ce53ec4 100644
--- a/meta-openembedded/meta-networking/MAINTAINERS
+++ b/meta-openembedded/meta-networking/MAINTAINERS
@@ -37,3 +37,7 @@
 NETKIT
 M:      Armin Kuster <akuster808@gmail.com>
 F:      recipes-netkit
+
+OPENTHREAD
+M:      Stefan Schmidt <stefan@datenfreihafen.org>
+F:      recipes-connectivity/openthread/
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/openthread/ot-br-posix/0001-otbr-agent.service.in-remove-pre-exec-hook-for-mdns-.patch b/meta-openembedded/meta-networking/recipes-connectivity/openthread/ot-br-posix/0001-otbr-agent.service.in-remove-pre-exec-hook-for-mdns-.patch
new file mode 100644
index 0000000..250de4b
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/openthread/ot-br-posix/0001-otbr-agent.service.in-remove-pre-exec-hook-for-mdns-.patch
@@ -0,0 +1,35 @@
+From ed60d4605b81c43b9ba9504a37835109c247c6f8 Mon Sep 17 00:00:00 2001
+From: Stefan Schmidt <stefan.schmidt@huawei.com>
+Date: Fri, 1 Apr 2022 21:46:03 +0200
+Subject: [PATCH] otbr-agent.service.in: remove pre exec hook for mdns service
+
+It uses the service command which is not available in all cases under
+Yocto/OE. The upstream project uses this mainly with Ubuntu and Raspian
+as testbeds.
+
+In our case we simply ensure that avahi-daemon is installed on the
+system inside the recipe.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Stefan Schmidt <stefan.schmidt@huawei.com>
+---
+ src/agent/otbr-agent.service.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/agent/otbr-agent.service.in b/src/agent/otbr-agent.service.in
+index 8314121347..4c97869def 100644
+--- a/src/agent/otbr-agent.service.in
++++ b/src/agent/otbr-agent.service.in
+@@ -6,7 +6,7 @@ After=dbus.socket
+ 
+ [Service]
+ EnvironmentFile=-@CMAKE_INSTALL_FULL_SYSCONFDIR@/default/otbr-agent
+-@EXEC_START_PRE@ExecStart=@CMAKE_INSTALL_FULL_SBINDIR@/otbr-agent $OTBR_AGENT_OPTS
++ExecStart=@CMAKE_INSTALL_FULL_SBINDIR@/otbr-agent $OTBR_AGENT_OPTS
+ KillMode=mixed
+ Restart=on-failure
+ RestartSec=5
+-- 
+2.35.1
+
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/openthread/ot-br-posix/Turn-off-sign-compare-for-musl-libc.patch b/meta-openembedded/meta-networking/recipes-connectivity/openthread/ot-br-posix/Turn-off-sign-compare-for-musl-libc.patch
new file mode 100644
index 0000000..df84550
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/openthread/ot-br-posix/Turn-off-sign-compare-for-musl-libc.patch
@@ -0,0 +1,131 @@
+From: Stefan Schmidt <stefan.schmidt@huawei.com>
+Subject: Turn off sign compare for musl libc
+
+When building with musl and clang the usage of CMSG_NXTHDR results in
+sign-compare error. Disable the check only in this specific part of the
+code with a #pragma.
+
+| /home/stefan/huawei/yocto-upstream/yoe/workspace/sources/ot-br-posix/third_party/openthread/repo/src/posix/platform/udp.cpp:147:28: fatal error: comparison of integers of different signs: 'unsigned long' and 'long' [-Wsign-compare]
+|         cmsg             = CMSG_NXTHDR(&msg, cmsg);
+|                            ^~~~~~~~~~~~~~~~~~~~~~~
+| /home/stefan/huawei/yocto-upstream/yoe/build/tmp/work/cortexa57-yoe-linux-musl/ot-br-posix/0.3.0+git999-r0/recipe-sysroot/usr/include/sys/socket.h:358:44: note: expanded from macro 'CMSG_NXTHDR'
+|         __CMSG_LEN(cmsg) + sizeof(struct cmsghdr) >= __MHDR_END(mhdr) - (unsigned char *)(cmsg) \
+|         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+| 1 error generated.
+
+Idea and fix taken from
+recipes-devtools/breakpad/breakpad/0001-Turn-off-sign-compare-for-musl-libc.patch
+by Khem Raj.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Stefan Schmidt <stefan.schmidt@huawei.com>
+
+diff --git a/src/backbone_router/nd_proxy.cpp b/src/backbone_router/nd_proxy.cpp
+index 7136878c3d..8a223c95c7 100644
+--- a/src/backbone_router/nd_proxy.cpp
++++ b/src/backbone_router/nd_proxy.cpp
+@@ -185,9 +185,18 @@ void NdProxyManager::ProcessMulticastNeighborSolicition()
+         VerifyOrExit(icmp6header->icmp6_type == ND_NEIGHBOR_SOLICIT, error = OTBR_ERROR_PARSE);
+ 
+         otbrLogDebug("NdProxyManager: Received ND-NS from %s", src.ToString().c_str());
+-
++#ifndef __GLIBC__
++  // In musl-libc, CMSG_NXTHDR typecasts char* to cmsghdr* which causes
++  // clang to throw sign-compare warning. This is to suppress the warning
++  // inline.
++  #pragma clang diagnostic push
++  #pragma clang diagnostic ignored "-Wsign-compare"
++#endif
+         for (cmsghdr = CMSG_FIRSTHDR(&msghdr); cmsghdr; cmsghdr = CMSG_NXTHDR(&msghdr, cmsghdr))
+-        {
++#ifndef __GLIBC__
++  #pragma clang diagnostic pop
++#endif
++	{
+             if (cmsghdr->cmsg_level != IPPROTO_IPV6)
+             {
+                 continue;
+Submodule third_party/openthread/repo contains modified content
+diff --git a/third_party/openthread/repo/src/posix/platform/infra_if.cpp b/third_party/openthread/repo/src/posix/platform/infra_if.cpp
+index 9f93d2b1c..1ed40fe50 100644
+--- a/third_party/openthread/repo/src/posix/platform/infra_if.cpp
++++ b/third_party/openthread/repo/src/posix/platform/infra_if.cpp
+@@ -228,7 +228,17 @@ otError InfraNetif::SendIcmp6Nd(uint32_t            aInfraIfIndex,
+     packetInfo->ipi6_ifindex = mInfraIfIndex;
+ 
+     // Per section 6.1.2 of RFC 4861, we need to send the ICMPv6 message with IP Hop Limit 255.
++#ifndef __GLIBC__
++  // In musl-libc, CMSG_NXTHDR typecasts char* to cmsghdr* which causes
++  // clang to throw sign-compare warning. This is to suppress the warning
++  // inline.
++  #pragma clang diagnostic push
++  #pragma clang diagnostic ignored "-Wsign-compare"
++#endif
+     cmsgPointer             = CMSG_NXTHDR(&msgHeader, cmsgPointer);
++#ifndef __GLIBC__
++  #pragma clang diagnostic pop
++#endif
+     cmsgPointer->cmsg_level = IPPROTO_IPV6;
+     cmsgPointer->cmsg_type  = IPV6_HOPLIMIT;
+     cmsgPointer->cmsg_len   = CMSG_LEN(sizeof(hopLimit));
+@@ -481,7 +491,17 @@ void InfraNetif::ReceiveIcmp6Message(void)
+ 
+     bufferLength = static_cast<uint16_t>(rval);
+ 
++#ifndef __GLIBC__
++  // In musl-libc, CMSG_NXTHDR typecasts char* to cmsghdr* which causes
++  // clang to throw sign-compare warning. This is to suppress the warning
++  // inline.
++  #pragma clang diagnostic push
++  #pragma clang diagnostic ignored "-Wsign-compare"
++#endif
+     for (cmh = CMSG_FIRSTHDR(&msg); cmh; cmh = CMSG_NXTHDR(&msg, cmh))
++#ifndef __GLIBC__
++  #pragma clang diagnostic pop
++#endif
+     {
+         if (cmh->cmsg_level == IPPROTO_IPV6 && cmh->cmsg_type == IPV6_PKTINFO &&
+             cmh->cmsg_len == CMSG_LEN(sizeof(struct in6_pktinfo)))
+diff --git a/third_party/openthread/repo/src/posix/platform/udp.cpp b/third_party/openthread/repo/src/posix/platform/udp.cpp
+index b7aacc5fa..a814fea70 100644
+--- a/third_party/openthread/repo/src/posix/platform/udp.cpp
++++ b/third_party/openthread/repo/src/posix/platform/udp.cpp
+@@ -144,8 +144,18 @@ otError transmitPacket(int aFd, uint8_t *aPayload, uint16_t aLength, const otMes
+     {
+         struct in6_pktinfo pktinfo;
+ 
++#ifndef __GLIBC__
++  // In musl-libc, CMSG_NXTHDR typecasts char* to cmsghdr* which causes
++  // clang to throw sign-compare warning. This is to suppress the warning
++  // inline.
++  #pragma clang diagnostic push
++  #pragma clang diagnostic ignored "-Wsign-compare"
++#endif
+         cmsg             = CMSG_NXTHDR(&msg, cmsg);
+-        cmsg->cmsg_level = IPPROTO_IPV6;
++#ifndef __GLIBC__
++  #pragma clang diagnostic pop
++#endif
++	cmsg->cmsg_level = IPPROTO_IPV6;
+         cmsg->cmsg_type  = IPV6_PKTINFO;
+         cmsg->cmsg_len   = CMSG_LEN(sizeof(pktinfo));
+ 
+@@ -200,7 +210,17 @@ otError receivePacket(int aFd, uint8_t *aPayload, uint16_t &aLength, otMessageIn
+     VerifyOrExit(rval > 0, perror("recvmsg"));
+     aLength = static_cast<uint16_t>(rval);
+ 
++#ifndef __GLIBC__
++  // In musl-libc, CMSG_NXTHDR typecasts char* to cmsghdr* which causes
++  // clang to throw sign-compare warning. This is to suppress the warning
++  // inline.
++  #pragma clang diagnostic push
++  #pragma clang diagnostic ignored "-Wsign-compare"
++#endif
+     for (struct cmsghdr *cmsg = CMSG_FIRSTHDR(&msg); cmsg != nullptr; cmsg = CMSG_NXTHDR(&msg, cmsg))
++#ifndef __GLIBC__
++  #pragma clang diagnostic pop
++#endif
+     {
+         if (cmsg->cmsg_level == IPPROTO_IPV6)
+         {
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/openthread/ot-br-posix_git.bb b/meta-openembedded/meta-networking/recipes-connectivity/openthread/ot-br-posix_git.bb
new file mode 100644
index 0000000..d9f558d
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/openthread/ot-br-posix_git.bb
@@ -0,0 +1,59 @@
+# SPDX-FileCopyrightText: Huawei Inc.
+#
+# SPDX-License-Identifier: Apache-2.0
+SUMMARY = "OpenThread Border Router"
+SECTION = "net"
+LICENSE = "BSD-3-Clause & MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=87109e44b2fda96a8991f27684a7349c \
+                    file://third_party/Simple-web-server/repo/LICENSE;md5=852b3f7f320b19f6431487b8b2fb1d74 \
+                    file://third_party/cJSON/repo/LICENSE;md5=218947f77e8cb8e2fa02918dc41c50d0 \
+                    file://third_party/http-parser/repo/LICENSE-MIT;md5=9bfa835d048c194ab30487af8d7b3778 \
+                    file://third_party/openthread/repo/LICENSE;md5=543b6fe90ec5901a683320a36390c65f \
+                    "
+DEPENDS = "autoconf-archive dbus readline avahi jsoncpp boost libnetfilter-queue"
+SRCREV = "ad6822257ffddbac295db97186e4ab449a2ed32a"
+PV = "0.3.0+git${SRCPV}"
+
+SRC_URI = "gitsm://github.com/openthread/ot-br-posix.git;protocol=https;branch=main \
+           file://0001-otbr-agent.service.in-remove-pre-exec-hook-for-mdns-.patch \
+           file://Turn-off-sign-compare-for-musl-libc.patch \
+           "
+
+S = "${WORKDIR}/git"
+SYSTEMD_SERVICE:${PN} = "otbr-agent.service"
+
+inherit pkgconfig cmake systemd
+
+EXTRA_OECMAKE = "-DBUILD_TESTING=OFF \
+                 -DOTBR_DBUS=ON \
+                 -DOTBR_REST=ON \
+                 -DOTBR_WEB=OFF \
+                 -DCMAKE_LIBRARY_PATH=${libdir} \
+                 -DOTBR_MDNS=avahi \
+                 -DOTBR_BACKBONE_ROUTER=ON \
+                 -DOTBR_BORDER_ROUTING=ON \
+                 -DOTBR_SRP_ADVERTISING_PROXY=ON \
+                 -DOTBR_BORDER_AGENT=ON \
+                 -DOT_SPINEL_RESET_CONNECTION=ON \
+                 -DOT_TREL=ON \
+                 -DOT_MLR=ON \
+                 -DOT_SRP_SERVER=ON \
+                 -DOT_ECDSA=ON \
+                 -DOT_SERVICE=ON \
+                 -DOTBR_DUA_ROUTING=ON \
+                 -DOT_DUA=ON \
+                 -DOT_BORDER_ROUTING_NAT64=ON \
+                 -DOTBR_DNSSD_DISCOVERY_PROXY=ON \
+                 -DOTBR_INFRA_IF_NAME=eth0 \
+                 -DOTBR_NO_AUTO_ATTACH=1 \
+                 -DOT_REFERENCE_DEVICE=ON \
+                 -DOT_DHCP6_CLIENT=ON \
+                 -DOT_DHCP6_SERVER=ON \
+                 "
+
+RDEPENDS:${PN} = "iproute2 avahi-daemon"
+
+RCONFLICTS:${PN} = "ot-daemon"
+
+FILES:${PN} += "${systemd_unitdir}/*"
+FILES:${PN} += "${datadir}/*"
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/openthread/ot-daemon_git.bb b/meta-openembedded/meta-networking/recipes-connectivity/openthread/ot-daemon_git.bb
new file mode 100644
index 0000000..f3f4c70
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/openthread/ot-daemon_git.bb
@@ -0,0 +1,27 @@
+# SPDX-FileCopyrightText: Huawei Inc.
+#
+# SPDX-License-Identifier: Apache-2.0
+SUMMARY = "OpenThread Daemon is an OpenThread POSIX build mode that runs OpenThread as a service."
+SECTION = "net"
+LICENSE = "BSD-3-Clause & Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=543b6fe90ec5901a683320a36390c65f \
+                    file://third_party/mbedtls/repo/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \
+                    "
+DEPENDS = "readline"
+SRCREV = "7dfde1f12923f03c9680be4d838b94b7a2320324"
+PV = "0.1+git${SRCPV}"
+
+SRC_URI = "git://github.com/openthread/openthread.git;protocol=https;branch=main \
+           "
+
+S = "${WORKDIR}/git"
+
+inherit cmake
+
+EXTRA_OECMAKE = "-DOT_DAEMON=ON \
+                 -DOT_SPINEL_RESET_CONNECTION=ON \
+                 -DOT_THREAD_VERSION=1.2 \
+                 -DOT_COVERAGE=OFF \
+                 -DOT_PLATFORM=posix \
+                 -DCMAKE_BUILD_TYPE=Release \
+                 "
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/openthread/wpantund_git.bb b/meta-openembedded/meta-networking/recipes-connectivity/openthread/wpantund_git.bb
new file mode 100644
index 0000000..bb444d0
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/openthread/wpantund_git.bb
@@ -0,0 +1,32 @@
+# SPDX-FileCopyrightText: Huawei Inc.
+#
+# SPDX-License-Identifier: Apache-2.0
+SUMMARY = "wpantund, Userspace WPAN Network Daemon"
+SECTION = "net"
+LICENSE = "Apache-2.0 & MIT & BSL-1.0 & BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e7820bc7f7d1638a6b54fc2e8d7fb103 \
+                    file://third_party/assert-macros/LICENSE;md5=cbf35ecdc8161026afe4da2906fab204 \
+                    file://third_party/boost/LICENSE;md5=e4224ccaecb14d942c71d31bef20d78c \
+                    file://third_party/fgetln/LICENSE;md5=389e03d2254ecad45d0d9bbdefef7129 \
+                    file://third_party/openthread/LICENSE;md5=543b6fe90ec5901a683320a36390c65f \
+                    file://third_party/pt/LICENSE;md5=dcd598b69cad786beea33da7b1ae14b7 \
+                    "
+DEPENDS = "autoconf-archive dbus readline"
+SRCREV = "0fb1f57e4224e2df3e630e146702bfcf63fbf07a"
+PV = "0.07.01+git${SRCPV}"
+
+SRC_URI = "gitsm://github.com/openthread/wpantund.git;protocol=https;branch=master \
+           "
+
+S = "${WORKDIR}/git"
+
+inherit pkgconfig perlnative autotools
+
+# CVE-2020-8916 has been fixed in commit
+# 3f108441e23e033b936e85be5b6877dd0a1fbf1c which is included in the SRCREV
+# CVE-2021-33889 has been fixed in commit
+# a8f3f761f6753b567d1e5ad22cbe6b0ceb6f2649 which is included in the SRCREV
+# There has not been a wpantund release as of yet that includes these fixes.
+# That means cve-check can not match them. Once a new release comes we can
+# remove the ignore statement.
+CVE_CHECK_IGNORE = "CVE-2020-8916 CVE-2021-33889"
diff --git a/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-drbd-utils-support-usrmerge.patch b/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-drbd-utils-support-usrmerge.patch
index 5e12872..d976680 100644
--- a/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-drbd-utils-support-usrmerge.patch
+++ b/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-drbd-utils-support-usrmerge.patch
@@ -1,4 +1,4 @@
-From 642b5823abeee27a0fdc2d12d0e1235461ace9ed Mon Sep 17 00:00:00 2001
+From 83764f5d57b3370e0b04a70f814ca49237a66eea Mon Sep 17 00:00:00 2001
 From: Changqing Li <changqing.li@windriver.com>
 Date: Thu, 5 Sep 2019 18:57:39 +0800
 Subject: [PATCH] drbd-utils: support usrmerge
@@ -6,18 +6,19 @@
 Upstream-Status: Inappropriate[oe-specific]
 
 Signed-off-by: Changqing Li <changqing.li@windriver.com>
+Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
 ---
  configure.ac         |  2 +-
- scripts/Makefile.in  |  4 ++--
+ scripts/Makefile.in  | 10 +++++-----
  user/v83/Makefile.in | 14 +++++++-------
  user/v84/Makefile.in | 14 +++++++-------
- 4 files changed, 17 insertions(+), 17 deletions(-)
+ 4 files changed, 20 insertions(+), 20 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index 4df1b4d..c4ef1bc 100644
+index ae575586..3d7deeae 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -176,7 +176,7 @@ AC_ARG_WITH(tmpfilesdir,
+@@ -180,7 +180,7 @@ AC_ARG_WITH(tmpfilesdir,
  AC_SUBST(tmpfilesdir)
  
  # set default early
@@ -27,22 +28,28 @@
     test x"$with_udev" = xyes ; then
  	if test x"$PKG_CONFIG" != x; then
 diff --git a/scripts/Makefile.in b/scripts/Makefile.in
-index fbb0beb..da701a1 100644
+index fcd298e9..2521fb08 100644
 --- a/scripts/Makefile.in
 +++ b/scripts/Makefile.in
-@@ -75,8 +75,8 @@ endif
- ifeq ($(subst both,systemd,$(initscripttype)),systemd)
+@@ -88,11 +88,11 @@ ifeq ($(subst both,systemd,$(initscripttype)),systemd)
  	install -d $(DESTDIR)$(systemdunitdir)
  	install -m 644 drbd.service $(DESTDIR)$(systemdunitdir)/
--	install -d $(DESTDIR)/lib/drbd/
--	install -m 755 drbd $(DESTDIR)/lib/drbd/
-+	install -d $(DESTDIR)/${nonarch_libdir}/drbd
-+	install -m 755 drbd $(DESTDIR)/${nonarch_libdir}/drbd
+ 	install -m 644 $(SYSTEMD_TEMPLATES) $(DESTDIR)$(systemdunitdir)/
+-	install -d $(DESTDIR)/lib/drbd/scripts
+-	install -m 755 drbd $(DESTDIR)/lib/drbd/scripts
+-	install -m 755 drbd-service-shim.sh $(DESTDIR)/lib/drbd/scripts
+-	install -m 755 drbd-wait-promotable.sh $(DESTDIR)/lib/drbd/scripts
+-	install -m 755 ocf.ra.wrapper.sh $(DESTDIR)/lib/drbd/scripts
++	install -d $(DESTDIR)/${nonarch_libdir}/drbdscripts
++	install -m 755 drbd $(DESTDIR)/${nonarch_libdir}/drbdscripts
++	install -m 755 drbd-service-shim.sh $(DESTDIR)/${nonarch_libdir}/drbdscripts
++	install -m 755 drbd-wait-promotable.sh $(DESTDIR)/${nonarch_libdir}/drbdscripts
++	install -m 755 ocf.ra.wrapper.sh $(DESTDIR)/${nonarch_libdir}/drbdscripts
  	install -d $(DESTDIR)$(tmpfilesdir)/
  	install -m 444 drbd.tmpfiles.conf $(DESTDIR)$(tmpfilesdir)/drbd.conf
  endif
 diff --git a/user/v83/Makefile.in b/user/v83/Makefile.in
-index 27516de..b301376 100644
+index 08cfe574..4c4971b6 100644
 --- a/user/v83/Makefile.in
 +++ b/user/v83/Makefile.in
 @@ -96,19 +96,19 @@ install:
@@ -73,10 +80,10 @@
  .PHONY: install uninstall clean distclean
  ../../configure:
 diff --git a/user/v84/Makefile.in b/user/v84/Makefile.in
-index 38977c6..05ef060 100644
+index 0fcefc5f..81f7d5ec 100644
 --- a/user/v84/Makefile.in
 +++ b/user/v84/Makefile.in
-@@ -109,19 +109,19 @@ ifeq ($(WITH_84_SUPPORT),yes)
+@@ -110,19 +110,19 @@ ifeq ($(WITH_84_SUPPORT),yes)
  	install -d $(DESTDIR)$(localstatedir)/lib/drbd
  	install -d $(DESTDIR)$(localstatedir)/run/drbd
  	install -d $(DESTDIR)$(localstatedir)/lock
@@ -104,5 +111,5 @@
  spell:
  	for f in drbdadm_adjust.c drbdadm_main.c drbdadm_parser.c drbdadm_usage_cnt.c drbdsetup.c drbdtool_common.c; do \
 -- 
-2.7.4
+2.33.0
 
diff --git a/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-drbdmon-add-LDFLAGS-when-linking.patch b/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-drbdmon-add-LDFLAGS-when-linking.patch
new file mode 100644
index 0000000..354be0f
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-drbdmon-add-LDFLAGS-when-linking.patch
@@ -0,0 +1,29 @@
+From a61b9ff2d2cb7387a5cd347b2201535ee45a46ee Mon Sep 17 00:00:00 2001
+From: Sakib Sajal <sakib.sajal@windriver.com>
+Date: Thu, 31 Mar 2022 15:09:58 -0400
+Subject: [PATCH] drbdmon: add LDFLAGS when linking
+
+Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
+---
+ user/drbdmon/Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/user/drbdmon/Makefile.in
++++ b/user/drbdmon/Makefile.in
+@@ -1,6 +1,6 @@
+ CXXFLAGS=-std=c++11 -I. -I../shared -Icppdsaext/src -Wall -Werror -pedantic-errors -fPIC -O2 \
+ -Wsign-compare -Wpointer-arith -Wswitch-default -Wswitch-enum -Wtype-limits \
+--Wmissing-declarations -Wshadow
++-Wmissing-declarations -Wshadow -Wno-defaulted-function-deleted -Wno-unused-private-field
+ CXX = @CXX@
+ LIBS = @LIBS@
+ 
+@@ -51,7 +51,7 @@ $(dsaext-obj): $(basename $(dsaext-obj))
+ $(integerparse-obj): $(basename $(integerparse-obj)).cpp $(basename $(integerparse-obj)).h
+ 
+ drbdmon: $(ls-obj)
+-	$(CXX) -o $@ $(CPPFLAGS) $(CXXFLAGS) $^ $(LIBS)
++	$(CXX) -o $@ $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $^ $(LIBS)
+ 
+ # do not try to rebuild Makefile itself
+ Makefile: ;
diff --git a/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-v84-Make-setup_options-definitions-as-extern.patch b/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-v84-Make-setup_options-definitions-as-extern.patch
deleted file mode 100644
index 6702f3b..0000000
--- a/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils/0001-v84-Make-setup_options-definitions-as-extern.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From d095caf6f8f77fe056fb90ccd5d89c207a7f346d Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 12 Aug 2020 12:59:38 -0700
-Subject: [PATCH] v84: Make setup_options definitions as extern
-
-This is already defined in drbdadm_main.c, therefore make this
-declaration to be extern for other modules
-
-Fixes compatibility with gcc-10 which uses -fno-common by default
-
-Upstream-Status: Submitted [https://github.com/LINBIT/drbd-utils/pull/7]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- user/v84/drbdadm.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/user/v84/drbdadm.h b/user/v84/drbdadm.h
-index ed63d78c..8469f1c4 100644
---- a/user/v84/drbdadm.h
-+++ b/user/v84/drbdadm.h
-@@ -251,7 +251,7 @@ struct setup_option {
- 	bool explicit;
- 	char *option;
- };
--struct setup_option *setup_options;
-+extern struct setup_option *setup_options;
- 
- extern void add_setup_option(bool explicit, char *option);
- 
--- 
-2.28.0
-
diff --git a/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils_9.13.1.bb b/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils_9.20.2.bb
similarity index 86%
rename from meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils_9.13.1.bb
rename to meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils_9.20.2.bb
index a246464..640e4e7 100644
--- a/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils_9.13.1.bb
+++ b/meta-openembedded/meta-networking/recipes-support/drbd/drbd-utils_9.20.2.bb
@@ -10,11 +10,11 @@
 
 SRC_URI = "git://github.com/LINBIT/drbd-utils;name=drbd-utils;branch=${PV};protocol=https \
            git://github.com/LINBIT/drbd-headers;name=drbd-headers;destsuffix=git/drbd-headers;branch=master;protocol=https \
-           file://0001-v84-Make-setup_options-definitions-as-extern.patch \
            ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','file://0001-drbd-utils-support-usrmerge.patch','',d)} \
+           file://0001-drbdmon-add-LDFLAGS-when-linking.patch \
           "
-SRCREV_drbd-utils = "b24b0f7e42d500d3538d7eeffa017ec78d08f918"
-SRCREV_drbd-headers = "c757cf357edef67751b8f45a6ea894d287180087"
+SRCREV_drbd-utils = "087ee6b4961ca154d76e4211223b03149373bed8"
+SRCREV_drbd-headers = "f1529aa84e9d2f66c96ad283a1bbb708aabf03f7"
 
 SRCREV_FORMAT = "drbd-utils_drbd-headers"
 
@@ -56,7 +56,10 @@
 FILES:${PN} += "/run"
 FILES:${PN} += "${nonarch_base_libdir}/drbd \
                 ${nonarch_libdir}/drbd \
-                ${nonarch_libdir}/tmpfiles.d"
+                ${nonarch_libdir}/tmpfiles.d \
+                ${nonarch_libdir}/drbdscripts/* \
+                ${systemd_unitdir}/system/* \
+"
 FILES:${PN}-dbg += "${nonarch_base_libdir}/drbd/.debug"
 
 CLEANBROKEN = "1"