subtree updates

meta-raspberrypi: 8dc3a31088..c7f4c739a3:
  Khem Raj (5):
        linux-raspberrypi: Upgrade to 5.10.52
        userland: Update to latest master branch
        raspberrypi-firmware: Update to latest
        raspberrypi-tools: Update to latest
        sdcard_image-rpi.bbclass: Fix IMAGE_TYPEDEP override to use new syntax

  Martin Jansa (4):
        Convert to new override syntax
        Manually fix conversion
        layer.conf: Update to honister
        userland: package man pages in PN-doc

  Pierre-Jean Texier (2):
        kas: local.conf: bump CONF_VERSION variable
        kas: local.conf: disable prelink

poky: 17aabc0127..492205ea83:
  Alexander Kanavin (17):
        llvm: update 12.0.0 -> 12.0.1
        systemd: update 248.3 -> 249.1
        python3-testools: update 2.4.0 -> 2.5.0
        libuv: update 1.41.0 -> 1.42.0
        gnu-config: update to latest revision
        vulkan-samples: update to latest revision
        cmake: update 3.20.5 -> 3.21.0
        cmake: update 3.21.0 -> 3.21.1
        mtools: update 4.0.32 -> 4.0.34
        util-linux: update 2.37 -> 2.37.1
        iputils: update 20210202 -> 20210722
        freetype: update 2.10.4 -> 2.11.0
        devtool: print a warning on upgrades if PREFERRED_VERSION is set
        rpm: do not RRECOMMEND rpm-build
        selftest: add core-image-weston to no-gpl3-no-meta-gpl2 image test
        shadow: update 4.8.1 -> 4.9
        local.conf.sample: disable prelink

  Bernhard Rosenkränzer (1):
        gcc: update 11.1 -> 11.2

  Bruce Ashfield (6):
        linux-yocto/5.10: update to v5.10.53
        linux-yocto/5.13: update to v5.13.5
        linux-yocto/5.4: update to v5.4.135
        linux-yocto-rt/5.10: update to -rt47
        linux-yocto/5.13: enable TYPEC_TCPCI in usbc fragment
        linux-yocto/5.10: enable TYPEC_TCPCI in usbc fragment

  Changqing Li (1):
        archiver.bbclass: fix do_ar_configured failure for kernel

  Chen Qi (3):
        zstd: fix CVE_PRODUCT
        insane.bbclass: fix the file-rdeps QA message for the new override syntax
        iputils: fix do_configure failure of missing ip command

  Damian Wrobel (1):
        rootfs: remove ldconfig auxiliary cache where appropriate

  Denys Dmytriyenko (4):
        meta: convert nested overrides leftovers to new syntax
        convert-overrides.py: handle few more cases of overrides
        libwpe: remove rpi-specific custom code
        poky-tiny: drop uclibc override

  Jon Mason (1):
        parselogs.py: qemuarm should be qemuarmv5

  Joshua Watt (4):
        mesa: Fix v3d & vc4 dmabuf import
        bitbake: bitbake: asyncrpc: Catch early SIGTERM
        libxft: Fix bad PKG value
        bitbake: contrib: vim: Update for new override syntax

  Kai Kang (2):
        u-boot_2021.07: set UBOOT_MACHINE for qemumips and qemumips64
        python3-pytest: display correct version info

  Kevin Hao (2):
        meta-yocto-bsp: Introduce the v5.13 bbappend
        meta-yocto-bsp: Bump to the v5.10.55

  Khem Raj (10):
        binutils: Upgrade to 2.37 branch
        texinfo: Update gnulib to fix build with glibc 2.34
        systemd: Fix build on musl
        stress-ng: Drop defining daddr_t
        stress-ng: Detemine minimal stack size via sysconf
        mesa: Define a fallback for DRIDRIVERS
        libssh2: Fix syntax for using ptest override
        toaster-managed-mode.json: Correctly specify term with new override syntax
        distrooverrides.bbclass: Correct override syntax
        devtool.py: Correct override syntax

  Lee Chee Yang (1):
        aspell: fix CVE-2019-25051

  Marek Vasut (2):
        image_types: Restore pre-btrfs-tools 4.14.1 mkfs.btrfs shrink behavior
        kernel-uboot: Handle gzip and lzo compression options

  Martin Jansa (6):
        convert-overrides.py: show processed file and version of this script
        convert-overrides.py: remove base_dep_prepend and autotools_dep_prepend exception
        convert-overrides.py: 0.9.1 include '(' as delimiter for shortvars
        convert-overrides.py: allow specifying multiple target dirs
        convert-overrides.py: allow dots before override in vars_re and shortvars_re
        systemd-boot: use ld.bfd as efi-ld even when gold or lld is used in ${LD}

  Matthias Klein (2):
        runqemu: Fix typo in error message
        runqemu: decouple bios and kernel options

  Matthias Schiffer (3):
        initscripts: populate-volatile.sh: do not log to tty0
        initscripts: populate-volatile.sh: run create_file synchronously
        initscripts: fix creation order for /var/log with VOLATILE_LOG_DIR=true

  Michael Halstead (1):
        releases: update to include 3.3.1

  Michael Opdenacker (18):
        oe-setup-builddir: update YP docs and OE URLs
        conf-notes.txt: now suggesting to run 'runqemu qemux86-64'
        test-manual: document LTO related reproducibility bug
        quick start manual: update "source oe-init-build-env" output
        dev-manual: fix wrong reference to class
        documentation/README: improve BitBake manual referencing guidelines
        manuals: simplify references to BitBake manual
        manuals: remove explicit BitBake variable references
        meta-skeleton: add recipe examples from documentation sources
        bitbake: doc: bitbake-user-manual: fix syntax in example and improve description
        bitbake: doc: bitbake-user-manual: update bitbake option help
        bitbake: doc: bitbake-user-manual: grammar fix for the number of "metadata"
        manuals: initial documentation for CVE management
        ref-manual: remove example recipe source files
        profile-manual: document how to build perf manpages on target
        cve-check: fix comments
        cve-check: update link to NVD website for CVE details
        cve-check: improve comment about CVE patch file names

  Mingli Yu (2):
        perlcross: not break build if already patched
        curl: Upgrade to 7.78.0

  Nicolas Dechesne (4):
        yocto-check-layer: improve missed dependencies
        checklayer: new function get_layer_dependencies()
        checklayer: rename _find_layer_depends
        yocto-check-layer: ensure that all layer dependencies are tested too

  Oleksandr Kravchuk (1):
        bitbake.conf: change GNOME_MIRROR to new one

  Patrick Williams (1):
        pixman: re-disable iwmmxt

  Paul Barker (4):
        bitbake: asyncrpc: Fix bad message error in client
        bitbake: asyncrpc: Set timeout when waiting for reply from server
        bitbake: parse/ast: Substitute '~' when naming anonymous functions
        kernel-yocto: Simplify no git repo case in do_kernel_checkout

  Quentin Schulz (4):
        bitbake: doc: Makefile: turn warnings into errors by default
        bitbake: doc: bitbake-user-manual: ref-variables: order alphabetically the glossary sources
        bitbake: doc: bitbake-user-manual: ref-variables: force glossary output to be alphabetically sorted
        bitbake: doc: bitbake-user-manual: replace ``FOO`` by :term:`FOO` where possible

  Richard Purdie (49):
        Add MAINTAINERS.md file
        yocto-check-layer: Remove duplicated code
        libubootenv: Drop default-env RRECOMMENDS
        bitbake: data_smart: Allow colon in variable expansion regex
        meta-poky/meta-yocto-bsp: Convert to new override syntax
        layer.conf: Update to honister
        autotools/base/icecc: Remove prepend from function names
        scripts/contrib: Add override conversion script
        systemtap: Fix headers issue with x86 and 5.13 headers
        migration-guides: Add start of 3.4 guide with override migration notes
        common-tasks: Fix conversion error in npm example
        bitbake: bitbake: Switch to using new override syntax
        bitbake: doc/lib: Update to use new override syntax containing colons
        bitbake: doc/lib: Add fixes for issues missed by the automated conversion
        bitbake: bitbake: Update to version 1.51.1
        layer.conf: Override changes mean we're only compatible with honister
        Convert to new override syntax
        meta: Manual override fixes
        local.conf.sample: Bump version so users update their config
        sanity.conf: Require bitbake 1.51.1
        dropbear: Fix incorrect package override for postrm
        convert-overrides: Allow script to handle patch/diffs
        sdk: Decouple default install path from built in path
        sstate: Fix rebuilds when changing layer config
        populate_sdk_ext: Fix handling of TOOLCHAIN_HOST_TASK in the eSDK case
        local.conf.sample: Bump version so users update their config
        poky: Use SDKPATHINSTALL instead of SDKPATH
        vim: Clarify where RDEPENDS/RRECOMMENDS apply
        bitbake: data_smart: Fix inactive overide accidental variable value corruption
        local.conf.sample: Fix missed override conversion
        license: Exclude COPYING.MIT from pseudo
        meta: Convert IMAGE_TYPEDEP to use override syntax
        uboot-extlinux-config: Fix missing override conversion
        image/image_types: Convert CONVERSION_CMD/COMPRESS_CMD to new override syntax
        image: Drop COMPRESS_CMD
        devupstream: Allow support of native class extensions
        diffoscope: Upgrade 178 -> 179
        strace: Upgrade 5.12 -> 5.13
        valgrind: Add patches for glibc 2.34 support
        bitbake: runqueue: Improve multiconfig deferred task issues
        elfutils: Add patch from upstream for glibc 2.34 ptest fixes
        bitbake: doc: Fix append/prepend/remove references
        bitbake: fetch/tests/toaster: Override conversion fixups
        bitbake: process: Improve traceback error reporting from main loop
        bitbake: command: Ensure we catch/handle exceptions
        bitbake: ui/taskexp: Improve startup exception handling
        bitbake: ui/taskexp: Fix to work with empty build directories
        oeqa/runtime/cases/ptest: Increase test timeout from 300s to 450s
        packagedata: Fix after override syntax change

  Ross Burton (2):
        glew: fix Makefile race
        libx11: fix xkb compilation with _EVDEVK symbols

  Saul Wold (1):
        MAINTAINERS: Saul will cover devtool and eSDK

  Stefan Wiehler (1):
        dev-manual: fix source release example script

  Stefano Babic (1):
        mtd-utils: upgrade 2.1.2 -> 2.1.3

  Tim Orling (2):
        python3-hypothesis: upgrade 6.14.3 -> 6.14.5
        python3-importlib-metadata: upgrade 4.6.1 -> 4.6.3

  Tony Battersby (2):
        lto.inc: disable LTO for grub
        gcc: Backport patch to make LTO builds more reproducible

  Tony Tascioglu (6):
        ffmpeg: fix-CVE-2020-20446
        ffmpeg: fix CVE-2020-20453
        ffmpeg: fix CVE-2020-22015
        ffmpeg: fix CVE-2020-22021
        ffmpeg: fix CVE-2020-22033 and CVE-2020-22019
        ffmpeg: fix CVE-2021-33815

  Trevor Woerner (1):
        ffmpeg: add libatomic for armv5

  Ulrich Ölmann (2):
        initramfs-framework: fix whitespace issue
        initramfs-framework/setup-live: fix shebang

  Vinay Kumar (1):
        glibc: Fix CVE-2021-33574

  Vivien Didelot (1):
        init-manager-systemd: define weak dev manager

  Zqiang (1):
        python3: use monotonic clock for condvar if possible

  hongxu (1):
        createrepo-c: fix createrepo-c failed in nativesdk

  leimaohui (1):
        archiver.bbclass: Fix patch error for recipes that inherit dos2unix.

  wangmy (3):
        bind: upgrade 9.16.18 -> 9.16.19
        i2c-tools: upgrade 4.2 -> 4.3
        diffoscope: upgrade 177 -> 178

  zangrc (2):
        python3-dbus: upgrade 1.2.16 -> 1.2.18
        python3-pip: upgrade 21.1.3 -> 21.2.1

meta-openembedded: 8fbcfb9f02..3cf2475ea0:
  Anastasios Kavoukis (1):
        pm-qa: fix paths for shell scripts

  Andreas Müller (3):
        mozjs/0001-Port-build-to-python3.patch: Fix typos in description
        jack: upgrade 1.19.18 -> 1.19.19
        fluidsynth: upgrade 2.2.1 -> 2.2.2

  Andrej Valek (1):
        thrift: upgrade to 0.14.2

  Andrew Jeffery (2):
        python3-gmpy: Add native support
        python3-ecdsa: Add native support

  Armin Kuster (2):
        hiawatha: fix url.
        wireshark: update to 3.4.7

  Ben Brown (1):
        android-tools: fix install of adb client when TOOLS is overridden

  Changqing Li (1):
        apache2: upgrade 2.4.46 -> 2.4.48

  Devendra Tewari (1):
        Suppress eol in functionfs setup scripts (#147)

  Gianfranco (1):
        vboxguestdrivers: upgrade 6.1.22 -> 6.1.24

  Joe Slater (2):
        php: move to version 7.4.21
        gtksourceview4: work around dependency deficiency

  Johannes Obermüller (1):
        evtest: fix timestamps in output

  Kai Kang (2):
        python3-blivet: 3.1.4 -> 3.4.0
        python3-blivetgui: 2.1.10 -> 2.2.1

  Khem Raj (23):
        netperf: Update to latest
        netperf: Add systemd unit file
        packagegroup-meta-oe: Add lmdb
        packagegroup-meta-oe: Add mbw
        addcli: check for ns_get16 and ns_get32
        fuse: Define closefrom if not available
        autofs: Fix build with glibc 2.34+
        ntp: Do not use PTHREAD_STACK_MIN on glibc
        ntp: Fix make check
        mongodb: Upgrade to 4.4.7
        vboxguestdrivers: Remove __divmoddi4 patch
        packagegroup-meta-oe: Add jemalloc
        apitrace: Exclude from builds with glibc 2.34+
        libhugetlbfs: Disable build with glibc 2.34+
        fvwm: Package extra files and man pages
        luajit: Fix override syntax
        lua: Drop uclibc patch
        packagegroup-meta-oe: Correct override name and fix syntax
        recipes: Fix override syntax
        emacs,libgpiod,cockpit: Fix override syntax in using FILES_${PN}
        fvwm: Fix build time paths in target perl/python scripts
        nis: Drop uclibc check in anon python function
        jemalloc: Fix build on musl

  Leon Anavi (3):
        python3-networkx: Upgrade 2.6.1 -> 2.6.2
        python3-pysonos: Upgrade 0.0.53 -> 0.0.54
        python3-zeroconf: Upgrade 0.33.1 -> 0.33.2

  Li Wang (1):
        openlldp: fix segfault

  Maksym Sloyko (1):
        libusbgx: Configure the Devices Used

  Martin Jansa (5):
        Convert to new override syntax
        layer.conf: Update to honister
        mariadb: manually fix the conversion
        packagegroup-meta-oe: manually finish override syntax conversion
        klibc.bbclass, image_types_sparse.bbclass, packagegroup-meta-oe.bb: update the overrides syntax conversion

  Mingli Yu (4):
        mariadb: redefine log-error item
        jemalloc: add new recipe
        hdf5: improve reproducibility
        mariadb: Update SRC_URI

  Nicolas Dechesne (1):
        mbw: add new recipe

  Paulo Neves (1):
        htop: Add ncurses-terminfo-base to RDEPENDS

  Sakib Sajal (1):
        lmdb: add recipe

  Salman Ahmed (2):
        nginx: upgrade 1.18.0 -> 1.20.1
        nginx: upgrade 1.19.6 -> 1.21.1

  Tony Battersby (1):
        net-snmp: fix QA Issue after LDFLAGS change

  Yi Zhao (3):
        postfix: upgrade 3.6.1 -> 3.6.2
        audit: upgrade 3.0.2 -> 3.0.3
        audit: fix compile error for 2.8.5

  Zang Ruochen (1):
        python3-robotframework: upgrade 4.0.3 -> 4.1

  wangmy (17):
        evince: upgrade 40.2 -> 40.4
        gnome-backgrounds: upgrade 3.36.0 -> 3.38.0
        gnome-desktop3: upgrade 3.36.6 -> 3.38.8
        cmark: upgrade 0.30.0 -> 0.30.1
        ctags: upgrade 5.9.20210711.0 -> 5.9.20210718.0
        libnet-dns-perl: upgrade 1.31 -> 1.32
        libtalloc: upgrade 2.3.2 -> 2.3.3
        nghttp2: upgrade 1.43.0 -> 1.44.0
        bats: upgrade 1.3.0 -> 1.4.1
        networkmanager: upgrade 1.32.2 -> 1.32.4
        gensio: upgrade 2.2.7 -> 2.2.8
        libmbim: upgrade 1.24.8 -> 1.26.0
        fetchmail: upgrade 6.4.19 -> 6.4.20
        ctags: upgrade 5.9.20210718.0 -> 5.9.20210801.0
        libblockdev: upgrade 2.25 -> 2.26
        libqmi: upgrade 1.28.6 -> 1.28.8
        monit: upgrade 5.28.0 -> 5.28.1

  zangrc (15):
        python3-qrcode: upgrade 7.1 -> 7.2
        python3-rdflib: upgrade 5.0.0 -> 6.0.0
        python3-simplejson: upgrade 3.17.2 -> 3.17.3
        python3-bitstring: upgrade 3.1.7 -> 3.1.9
        python3-iso8601: upgrade 0.1.14 -> 0.1.16
        python3-gmqtt: upgrade 0.6.9 -> 0.6.10
        python3-graphviz: upgrade 0.16 -> 0.17
        python3-smbus: upgrade 4.2 -> 4.3
        python3-pandas: upgrade 1.3.0 -> 1.3.1
        python3-progress: upgrade 1.5 -> 1.6
        python3-sentry-sdk: upgrade 1.3.0 -> 1.3.1
        python3-socketio: upgrade 5.3.0 -> 5.4.0
        python3-tqdm: upgrade 4.61.2 -> 4.62.0
        python3-twisted: upgrade 21.2.0 -> 21.7.0
        python3-xlsxwriter: upgrade 1.4.4 -> 1.4.5

  zhengruoqin (15):
        live555: upgrade 20210710 -> 20210720
        libtest-warnings-perl: upgrade 0.030 -> 0.031
        python3-pybind11: upgrade 2.6.2 -> 2.7.0
        python3-pymongo: upgrade 3.11.4 -> 3.12.0
        python3-sqlalchemy: upgrade 1.4.20 -> 1.4.22
        python3-sentry-sdk: upgrade 1.2.0 -> 1.3.0
        libcurses-perl: upgrade 1.37 -> 1.38
        libdbd-sqlite-perl: upgrade 1.66 -> 1.68
        libencode-perl: upgrade 3.10 -> 3.11
        python3-bitarray: upgrade 2.2.2 -> 2.2.3
        python3-cbor2: upgrade 5.4.0 -> 5.4.1
        python3-gast: upgrade 0.5.0 -> 0.5.1
        poppler: upgrade 21.07.0 -> 21.08.0
        valijson: upgrade 0.4 -> 0.5
        xwd: upgrade 1.0.7 -> 1.0.8

meta-security: 152cdb506b..c885d399cd:
  Armin Kuster (18):
        suricata.inc: exclude ppc in rust version
        suricata: Drop 4.1.x its EOL
        add meta-rust
        crowdsec: add pkg
        packagegroup-core-security.bb: fix suricat-ptest inclusion
        gitlab-ci.yml:  streamline builds matrix
        krill: Add new pkg
        clamav: fix branch name and update
        meta-security: Convert to new override syntax
        meta-tpm: Convert to new override syntax
        meta-integrity: Convert to new override syntax
        meta-hardening: Convert to new override syntax
        meta-security-isafw: Convert to new override syntax
        meta-parsec: Convert to new override syntax
        meta-security-compliance: Convert to new override syntax
        dynamix-layers: Convert to new override syntax
        kas: Convert to new override syntax
        packagegroup-core-security.bb: only include suricat-ptest if rust is included

  Martin Jansa (1):
        layer.conf: Update to honister

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Iec7301cf1c43b7cec462dcf88292a8b1b12a5045
diff --git a/poky/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch b/poky/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch
index ab317b9..95728bc 100644
--- a/poky/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch
+++ b/poky/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch
@@ -1,4 +1,4 @@
-From fa2d9453656641002802d8165e80adb9e6a729d2 Mon Sep 17 00:00:00 2001
+From 30a3906a0a21120fa6bbc918b6258ab9303fbeaa Mon Sep 17 00:00:00 2001
 From: Scott Garman <scott.a.garman@intel.com>
 Date: Thu, 14 Apr 2016 12:28:57 +0200
 Subject: [PATCH] Disable use of syslog for sysroot
@@ -19,12 +19,12 @@
  src/groupmems.c | 3 +++
  src/groupmod.c  | 3 +++
  src/useradd.c   | 3 +++
- src/userdel.c   | 3 +++
+ src/userdel.c   | 4 ++++
  src/usermod.c   | 3 +++
- 7 files changed, 21 insertions(+)
+ 7 files changed, 22 insertions(+)
 
 diff --git a/src/groupadd.c b/src/groupadd.c
-index 2dd8eec..e9c4bb7 100644
+index d7f68b1..5fe5f43 100644
 --- a/src/groupadd.c
 +++ b/src/groupadd.c
 @@ -34,6 +34,9 @@
@@ -38,7 +38,7 @@
  #include <fcntl.h>
  #include <getopt.h>
 diff --git a/src/groupdel.c b/src/groupdel.c
-index f941a84..5a70056 100644
+index 5c89312..2aefc5a 100644
 --- a/src/groupdel.c
 +++ b/src/groupdel.c
 @@ -34,6 +34,9 @@
@@ -52,7 +52,7 @@
  #include <fcntl.h>
  #include <grp.h>
 diff --git a/src/groupmems.c b/src/groupmems.c
-index fc91c8b..2842514 100644
+index 654a8f3..6b2026b 100644
 --- a/src/groupmems.c
 +++ b/src/groupmems.c
 @@ -32,6 +32,9 @@
@@ -66,7 +66,7 @@
  #include <getopt.h>
  #include <grp.h>
 diff --git a/src/groupmod.c b/src/groupmod.c
-index 1dca5fc..bc14438 100644
+index acd6f35..a2c5247 100644
 --- a/src/groupmod.c
 +++ b/src/groupmod.c
 @@ -34,6 +34,9 @@
@@ -80,7 +80,7 @@
  #include <fcntl.h>
  #include <getopt.h>
 diff --git a/src/useradd.c b/src/useradd.c
-index 4af0f7c..1b7bf06 100644
+index 127177e..b80e505 100644
 --- a/src/useradd.c
 +++ b/src/useradd.c
 @@ -34,6 +34,9 @@
@@ -94,21 +94,22 @@
  #include <ctype.h>
  #include <errno.h>
 diff --git a/src/userdel.c b/src/userdel.c
-index cc951e5..153e0be 100644
+index 79a7c89..c1e010a 100644
 --- a/src/userdel.c
 +++ b/src/userdel.c
-@@ -34,6 +34,9 @@
+@@ -31,6 +31,10 @@
+  */
  
- #ident "$Id$"
- 
+ #include <config.h>
++
 +/* Disable use of syslog since we're running this command against a sysroot */
 +#undef USE_SYSLOG
 +
  #include <assert.h>
+ #include <dirent.h>
  #include <errno.h>
- #include <fcntl.h>
 diff --git a/src/usermod.c b/src/usermod.c
-index 05b9871..21c6da9 100644
+index 03bb9b9..e15fdd4 100644
 --- a/src/usermod.c
 +++ b/src/usermod.c
 @@ -34,6 +34,9 @@
diff --git a/poky/meta/recipes-extended/shadow/files/0001-Fix-out-of-tree-builds-with-respect-to-libsubid-incl.patch b/poky/meta/recipes-extended/shadow/files/0001-Fix-out-of-tree-builds-with-respect-to-libsubid-incl.patch
new file mode 100644
index 0000000..c577be6
--- /dev/null
+++ b/poky/meta/recipes-extended/shadow/files/0001-Fix-out-of-tree-builds-with-respect-to-libsubid-incl.patch
@@ -0,0 +1,114 @@
+From eced8077b57946fe0b723e7c6c510e8f344ce89b Mon Sep 17 00:00:00 2001
+From: Serge Hallyn <serge@hallyn.com>
+Date: Fri, 23 Jul 2021 17:51:13 -0500
+Subject: [PATCH] Fix out of tree builds with respect to libsubid includes
+
+There's a better way to do this, and I hope to clean that up,
+but this fixes out of tree builds for me right now.
+
+Closes #386
+
+Signed-off-by: Serge Hallyn <serge@hallyn.com>
+Upstream-Status: Backport [https://github.com/shadow-maint/shadow/commit/537b8cd90be7b47b45c45cfd27765ef85eb0ebf1]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ lib/Makefile.am      | 2 ++
+ libmisc/Makefile.am  | 2 +-
+ libsubid/Makefile.am | 4 ++--
+ src/Makefile.am      | 6 ++++++
+ 4 files changed, 11 insertions(+), 3 deletions(-)
+
+diff --git a/lib/Makefile.am b/lib/Makefile.am
+index ecf3ee25..5ac2e111 100644
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
+@@ -10,6 +10,8 @@ if HAVE_VENDORDIR
+ libshadow_la_CPPFLAGS += -DVENDORDIR=\"$(VENDORDIR)\"
+ endif
+ 
++libshadow_la_CPPFLAGS += -I$(top_srcdir)
++
+ libshadow_la_SOURCES = \
+ 	commonio.c \
+ 	commonio.h \
+diff --git a/libmisc/Makefile.am b/libmisc/Makefile.am
+index 9766a7ec..9f237e0d 100644
+--- a/libmisc/Makefile.am
++++ b/libmisc/Makefile.am
+@@ -1,7 +1,7 @@
+ 
+ EXTRA_DIST = .indent.pro xgetXXbyYY.c
+ 
+-AM_CPPFLAGS = -I$(top_srcdir)/lib $(ECONF_CPPFLAGS)
++AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir) $(ECONF_CPPFLAGS)
+ 
+ noinst_LTLIBRARIES = libmisc.la
+ 
+diff --git a/libsubid/Makefile.am b/libsubid/Makefile.am
+index 189165b0..cdc41fe6 100644
+--- a/libsubid/Makefile.am
++++ b/libsubid/Makefile.am
+@@ -19,8 +19,8 @@ MISCLIBS = \
+ 	$(LIBTCB)
+ 
+ libsubid_la_LIBADD = \
+-	$(top_srcdir)/lib/libshadow.la \
+-	$(top_srcdir)/libmisc/libmisc.la \
++	$(top_builddir)/lib/libshadow.la \
++	$(top_builddir)/libmisc/libmisc.la \
+ 	$(MISCLIBS) -ldl
+ 
+ AM_CPPFLAGS = \
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 35027013..7c1a3491 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -10,6 +10,7 @@ sgidperms = 2755
+ AM_CPPFLAGS = \
+ 	-I${top_srcdir}/lib \
+ 	-I$(top_srcdir)/libmisc \
++	-I$(top_srcdir) \
+ 	-DLOCALEDIR=\"$(datadir)/locale\"
+ 
+ # XXX why are login and su in /bin anyway (other than for
+@@ -183,6 +184,7 @@ list_subid_ranges_LDADD = \
+ list_subid_ranges_CPPFLAGS = \
+ 	-I$(top_srcdir)/lib \
+ 	-I$(top_srcdir)/libmisc \
++	-I$(top_srcdir) \
+ 	-I$(top_srcdir)/libsubid
+ 
+ get_subid_owners_LDADD = \
+@@ -194,11 +196,13 @@ get_subid_owners_LDADD = \
+ get_subid_owners_CPPFLAGS = \
+ 	-I$(top_srcdir)/lib \
+ 	-I$(top_srcdir)/libmisc \
++	-I$(top_srcdir) \
+ 	-I$(top_srcdir)/libsubid
+ 
+ new_subid_range_CPPFLAGS = \
+ 	-I$(top_srcdir)/lib \
+ 	-I$(top_srcdir)/libmisc \
++	-I$(top_srcdir) \
+ 	-I$(top_srcdir)/libsubid
+ 
+ new_subid_range_LDADD = \
+@@ -210,6 +214,7 @@ new_subid_range_LDADD = \
+ free_subid_range_CPPFLAGS = \
+ 	-I$(top_srcdir)/lib \
+ 	-I$(top_srcdir)/libmisc \
++	-I$(top_srcdir) \
+ 	-I$(top_srcdir)/libsubid
+ 
+ free_subid_range_LDADD = \
+@@ -220,6 +225,7 @@ free_subid_range_LDADD = \
+ 
+ check_subid_range_CPPFLAGS = \
+ 	-I$(top_srcdir)/lib \
++	-I$(top_srcdir) \
+ 	-I$(top_srcdir)/libmisc
+ 
+ check_subid_range_LDADD = \
+-- 
+2.31.1
+
diff --git a/poky/meta/recipes-extended/shadow/files/0001-libsubid-link-to-PAM-libraries.patch b/poky/meta/recipes-extended/shadow/files/0001-libsubid-link-to-PAM-libraries.patch
new file mode 100644
index 0000000..ea7a99d
--- /dev/null
+++ b/poky/meta/recipes-extended/shadow/files/0001-libsubid-link-to-PAM-libraries.patch
@@ -0,0 +1,31 @@
+From 4f44617af3a0c59be267ac5fcc33586e3783f5e6 Mon Sep 17 00:00:00 2001
+From: Xi Ruoyao <xry111@mengyan1223.wang>
+Date: Fri, 23 Jul 2021 14:38:08 +0800
+Subject: [PATCH] libsubid: link to PAM libraries
+
+libsubid.so links to libmisc.a, which contains several routines referring to
+PAM functions.
+
+Upstream-Status: Backport [https://github.com/shadow-maint/shadow/commit/f4a84efb468b8be21be124700ce35159c444e9d6]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ libsubid/Makefile.am | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/libsubid/Makefile.am b/libsubid/Makefile.am
+index cdc41fe6..99308c1f 100644
+--- a/libsubid/Makefile.am
++++ b/libsubid/Makefile.am
+@@ -16,7 +16,8 @@ MISCLIBS = \
+ 	$(LIBCRYPT) \
+ 	$(LIBACL) \
+ 	$(LIBATTR) \
+-	$(LIBTCB)
++	$(LIBTCB) \
++	$(LIBPAM)
+ 
+ libsubid_la_LIBADD = \
+ 	$(top_builddir)/lib/libshadow.la \
+-- 
+2.31.1
+
diff --git a/poky/meta/recipes-extended/shadow/files/0002-Allow-for-setting-password-in-clear-text.patch b/poky/meta/recipes-extended/shadow/files/0002-Allow-for-setting-password-in-clear-text.patch
deleted file mode 100644
index c6332e4..0000000
--- a/poky/meta/recipes-extended/shadow/files/0002-Allow-for-setting-password-in-clear-text.patch
+++ /dev/null
@@ -1,301 +0,0 @@
-From a7d995228491ad5255ad86c1f04ba071f6880897 Mon Sep 17 00:00:00 2001
-From: Chen Qi <Qi.Chen@windriver.com>
-Date: Sat, 16 Nov 2013 15:27:47 +0800
-Subject: [PATCH] Allow for setting password in clear text
-
-Upstream-Status: Inappropriate [OE specific]
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
-
----
- src/Makefile.am |  8 ++++----
- src/groupadd.c  | 20 +++++++++++++++-----
- src/groupmod.c  | 20 +++++++++++++++-----
- src/useradd.c   | 21 +++++++++++++++------
- src/usermod.c   | 20 +++++++++++++++-----
- 5 files changed, 64 insertions(+), 25 deletions(-)
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index f31fd7a..4a317a3 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -103,10 +103,10 @@ chsh_LDADD     = $(LDADD) $(LIBPAM) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT_NOPAM)
- chpasswd_LDADD = $(LDADD) $(LIBPAM) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT) $(LIBECONF)
- expiry_LDADD = $(LDADD) $(LIBECONF)
- gpasswd_LDADD  = $(LDADD) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT) $(LIBECONF)
--groupadd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBECONF)
-+groupadd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBECONF) $(LIBCRYPT)
- groupdel_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBECONF)
- groupmems_LDADD = $(LDADD) $(LIBPAM) $(LIBAUDIT) $(LIBSELINUX) $(LIBECONF)
--groupmod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBECONF)
-+groupmod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBECONF) $(LIBCRYPT)
- grpck_LDADD    = $(LDADD) $(LIBAUDIT) $(LIBSELINUX) $(LIBECONF)
- grpconv_LDADD  = $(LDADD) $(LIBAUDIT) $(LIBSELINUX) $(LIBECONF)
- grpunconv_LDADD = $(LDADD) $(LIBAUDIT) $(LIBSELINUX) $(LIBECONF)
-@@ -127,9 +127,9 @@ su_SOURCES     = \
- 	suauth.c
- su_LDADD       = $(LDADD) $(LIBPAM) $(LIBAUDIT) $(LIBCRYPT_NOPAM) $(LIBSKEY) $(LIBMD) $(LIBECONF)
- sulogin_LDADD  = $(LDADD) $(LIBCRYPT) $(LIBECONF)
--useradd_LDADD  = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) $(LIBECONF)
-+useradd_LDADD  = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) $(LIBECONF) $(LIBCRYPT)
- userdel_LDADD  = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBECONF)
--usermod_LDADD  = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) $(LIBECONF)
-+usermod_LDADD  = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) $(LIBECONF) $(LIBCRYPT)
- vipw_LDADD     = $(LDADD) $(LIBAUDIT) $(LIBSELINUX) $(LIBECONF)
- 
- install-am: all-am
-diff --git a/src/groupadd.c b/src/groupadd.c
-index e9c4bb7..d572c00 100644
---- a/src/groupadd.c
-+++ b/src/groupadd.c
-@@ -127,9 +127,10 @@ static /*@noreturn@*/void usage (int status)
- 	(void) fputs (_("  -o, --non-unique              allow to create groups with duplicate\n"
- 	                "                                (non-unique) GID\n"), usageout);
- 	(void) fputs (_("  -p, --password PASSWORD       use this encrypted password for the new group\n"), usageout);
-+	(void) fputs (_("  -P, --clear-password PASSWORD use this clear password for the new group\n"), usageout);
- 	(void) fputs (_("  -r, --system                  create a system account\n"), usageout);
- 	(void) fputs (_("  -R, --root CHROOT_DIR         directory to chroot into\n"), usageout);
--	(void) fputs (_("  -P, --prefix PREFIX_DIR       directory prefix\n"), usageout);
-+	(void) fputs (_("  -A, --prefix PREFIX_DIR       directory prefix\n"), usageout);
- 	(void) fputs ("\n", usageout);
- 	exit (status);
- }
-@@ -391,13 +392,14 @@ static void process_flags (int argc, char **argv)
- 		{"key",        required_argument, NULL, 'K'},
- 		{"non-unique", no_argument,       NULL, 'o'},
- 		{"password",   required_argument, NULL, 'p'},
-+		{"clear-password", required_argument, NULL, 'P'},
- 		{"system",     no_argument,       NULL, 'r'},
- 		{"root",       required_argument, NULL, 'R'},
--		{"prefix",     required_argument, NULL, 'P'},
-+		{"prefix",     required_argument, NULL, 'A'},
- 		{NULL, 0, NULL, '\0'}
- 	};
- 
--	while ((c = getopt_long (argc, argv, "fg:hK:op:rR:P:",
-+	while ((c = getopt_long (argc, argv, "fg:hK:op:P:rR:A:",
- 		                 long_options, NULL)) != -1) {
- 		switch (c) {
- 		case 'f':
-@@ -449,12 +451,20 @@ static void process_flags (int argc, char **argv)
- 			pflg = true;
- 			group_passwd = optarg;
- 			break;
-+		case 'P':
-+			pflg = true;
-+			group_passwd = pw_encrypt (optarg, crypt_make_salt (NULL, NULL));
-+			break;
- 		case 'r':
- 			rflg = true;
- 			break;
- 		case 'R': /* no-op, handled in process_root_flag () */
- 			break;
--		case 'P': /* no-op, handled in process_prefix_flag () */
-+		case 'A': /* no-op, handled in process_prefix_flag () */
-+			fprintf (stderr,
-+				 _("%s: -A is deliberately not supported \n"),
-+				 Prog);
-+			exit (E_BAD_ARG);
- 			break;
- 		default:
- 			usage (E_USAGE);
-@@ -588,7 +598,7 @@ int main (int argc, char **argv)
- 	(void) textdomain (PACKAGE);
- 
- 	process_root_flag ("-R", argc, argv);
--	prefix = process_prefix_flag ("-P", argc, argv);
-+	prefix = process_prefix_flag ("-A", argc, argv);
- 
- 	OPENLOG ("groupadd");
- #ifdef WITH_AUDIT
-diff --git a/src/groupmod.c b/src/groupmod.c
-index bc14438..25ccb44 100644
---- a/src/groupmod.c
-+++ b/src/groupmod.c
-@@ -138,8 +138,9 @@ static void usage (int status)
- 	(void) fputs (_("  -o, --non-unique              allow to use a duplicate (non-unique) GID\n"), usageout);
- 	(void) fputs (_("  -p, --password PASSWORD       change the password to this (encrypted)\n"
- 	                "                                PASSWORD\n"), usageout);
-+	(void) fputs (_("  -P, --clear-password PASSWORD change the password to this clear PASSWORD\n"), usageout);
- 	(void) fputs (_("  -R, --root CHROOT_DIR         directory to chroot into\n"), usageout);
--	(void) fputs (_("  -P, --prefix PREFIX_DIR       prefix directory where are located the /etc/* files\n"), usageout);
-+	(void) fputs (_("  -A, --prefix PREFIX_DIR       prefix directory where are located the /etc/* files\n"), usageout);
- 	(void) fputs ("\n", usageout);
- 	exit (status);
- }
-@@ -387,11 +388,12 @@ static void process_flags (int argc, char **argv)
- 		{"new-name",   required_argument, NULL, 'n'},
- 		{"non-unique", no_argument,       NULL, 'o'},
- 		{"password",   required_argument, NULL, 'p'},
-+		{"clear-password", required_argument, NULL, 'P'},
- 		{"root",       required_argument, NULL, 'R'},
--		{"prefix",     required_argument, NULL, 'P'},
-+		{"prefix",     required_argument, NULL, 'A'},
- 		{NULL, 0, NULL, '\0'}
- 	};
--	while ((c = getopt_long (argc, argv, "g:hn:op:R:P:",
-+	while ((c = getopt_long (argc, argv, "g:hn:op:P:R:A:",
- 		                 long_options, NULL)) != -1) {
- 		switch (c) {
- 		case 'g':
-@@ -418,9 +420,17 @@ static void process_flags (int argc, char **argv)
- 			group_passwd = optarg;
- 			pflg = true;
- 			break;
-+		case 'P':
-+			group_passwd = pw_encrypt (optarg, crypt_make_salt (NULL, NULL));
-+			pflg = true;
-+			break;
- 		case 'R': /* no-op, handled in process_root_flag () */
- 			break;
--		case 'P': /* no-op, handled in process_prefix_flag () */
-+		case 'A': /* no-op, handled in process_prefix_flag () */
-+			fprintf (stderr,
-+				 _("%s: -A is deliberately not supported \n"),
-+				 Prog);
-+			exit (E_BAD_ARG);
- 			break;
- 		default:
- 			usage (E_USAGE);
-@@ -761,7 +771,7 @@ int main (int argc, char **argv)
- 	(void) textdomain (PACKAGE);
- 
- 	process_root_flag ("-R", argc, argv);
--	prefix = process_prefix_flag ("-P", argc, argv);
-+	prefix = process_prefix_flag ("-A", argc, argv);
- 
- 	OPENLOG ("groupmod");
- #ifdef WITH_AUDIT
-diff --git a/src/useradd.c b/src/useradd.c
-index 1b7bf06..44f09e2 100644
---- a/src/useradd.c
-+++ b/src/useradd.c
-@@ -853,9 +853,10 @@ static void usage (int status)
- 	(void) fputs (_("  -o, --non-unique              allow to create users with duplicate\n"
- 	                "                                (non-unique) UID\n"), usageout);
- 	(void) fputs (_("  -p, --password PASSWORD       encrypted password of the new account\n"), usageout);
-+	(void) fputs (_("  -P, --clear-password PASSWORD clear password of the new account\n"), usageout);
- 	(void) fputs (_("  -r, --system                  create a system account\n"), usageout);
- 	(void) fputs (_("  -R, --root CHROOT_DIR         directory to chroot into\n"), usageout);
--	(void) fputs (_("  -P, --prefix PREFIX_DIR       prefix directory where are located the /etc/* files\n"), usageout);
-+	(void) fputs (_("  -A, --prefix PREFIX_DIR       prefix directory where are located the /etc/* files\n"), usageout);
- 	(void) fputs (_("  -s, --shell SHELL             login shell of the new account\n"), usageout);
- 	(void) fputs (_("  -u, --uid UID                 user ID of the new account\n"), usageout);
- 	(void) fputs (_("  -U, --user-group              create a group with the same name as the user\n"), usageout);
-@@ -1133,9 +1134,10 @@ static void process_flags (int argc, char **argv)
- 			{"no-user-group",  no_argument,       NULL, 'N'},
- 			{"non-unique",     no_argument,       NULL, 'o'},
- 			{"password",       required_argument, NULL, 'p'},
-+			{"clear-password", required_argument, NULL, 'P'},
- 			{"system",         no_argument,       NULL, 'r'},
- 			{"root",           required_argument, NULL, 'R'},
--			{"prefix",         required_argument, NULL, 'P'},
-+			{"prefix",         required_argument, NULL, 'A'},
- 			{"shell",          required_argument, NULL, 's'},
- 			{"uid",            required_argument, NULL, 'u'},
- 			{"user-group",     no_argument,       NULL, 'U'},
-@@ -1146,9 +1148,9 @@ static void process_flags (int argc, char **argv)
- 		};
- 		while ((c = getopt_long (argc, argv,
- #ifdef WITH_SELINUX
--		                         "b:c:d:De:f:g:G:hk:K:lmMNop:rR:P:s:u:UZ:",
-+		                         "b:c:d:De:f:g:G:hk:K:lmMNop:P:rR:A:s:u:UZ:",
- #else				/* !WITH_SELINUX */
--		                         "b:c:d:De:f:g:G:hk:K:lmMNop:rR:P:s:u:U",
-+		                         "b:c:d:De:f:g:G:hk:K:lmMNop:P:rR:A:s:u:U",
- #endif				/* !WITH_SELINUX */
- 		                         long_options, NULL)) != -1) {
- 			switch (c) {
-@@ -1320,12 +1322,19 @@ static void process_flags (int argc, char **argv)
- 				}
- 				user_pass = optarg;
- 				break;
-+			case 'P': /* set clear text password */
-+				user_pass = pw_encrypt (optarg, crypt_make_salt (NULL, NULL));
-+				break;
- 			case 'r':
- 				rflg = true;
- 				break;
- 			case 'R': /* no-op, handled in process_root_flag () */
- 				break;
--			case 'P': /* no-op, handled in process_prefix_flag () */
-+			case 'A': /* no-op, handled in process_prefix_flag () */
-+				fprintf (stderr,
-+					 _("%s: -A is deliberately not supported \n"),
-+					 Prog);
-+				exit (E_BAD_ARG);
- 				break;
- 			case 's':
- 				if (   ( !VALID (optarg) )
-@@ -2257,7 +2266,7 @@ int main (int argc, char **argv)
- 
- 	process_root_flag ("-R", argc, argv);
- 
--	prefix = process_prefix_flag("-P", argc, argv);
-+	prefix = process_prefix_flag("-A", argc, argv);
- 
- 	OPENLOG ("useradd");
- #ifdef WITH_AUDIT
-diff --git a/src/usermod.c b/src/usermod.c
-index 21c6da9..cffdb3e 100644
---- a/src/usermod.c
-+++ b/src/usermod.c
-@@ -431,8 +431,9 @@ static /*@noreturn@*/void usage (int status)
- 	                "                                new location (use only with -d)\n"), usageout);
- 	(void) fputs (_("  -o, --non-unique              allow using duplicate (non-unique) UID\n"), usageout);
- 	(void) fputs (_("  -p, --password PASSWORD       use encrypted password for the new password\n"), usageout);
-+	(void) fputs (_("  -P, --clear-password PASSWORD use clear password for the new password\n"), usageout);
- 	(void) fputs (_("  -R, --root CHROOT_DIR         directory to chroot into\n"), usageout);
--	(void) fputs (_("  -P, --prefix PREFIX_DIR       prefix directory where are located the /etc/* files\n"), usageout);
-+	(void) fputs (_("  -A, --prefix PREFIX_DIR       prefix directory where are located the /etc/* files\n"), usageout);
- 	(void) fputs (_("  -s, --shell SHELL             new login shell for the user account\n"), usageout);
- 	(void) fputs (_("  -u, --uid UID                 new UID for the user account\n"), usageout);
- 	(void) fputs (_("  -U, --unlock                  unlock the user account\n"), usageout);
-@@ -1010,8 +1011,9 @@ static void process_flags (int argc, char **argv)
- 			{"move-home",    no_argument,       NULL, 'm'},
- 			{"non-unique",   no_argument,       NULL, 'o'},
- 			{"password",     required_argument, NULL, 'p'},
-+			{"clear-password", required_argument, NULL, 'P'},
- 			{"root",         required_argument, NULL, 'R'},
--			{"prefix",       required_argument, NULL, 'P'},
-+			{"prefix",       required_argument, NULL, 'A'},
- 			{"shell",        required_argument, NULL, 's'},
- 			{"uid",          required_argument, NULL, 'u'},
- 			{"unlock",       no_argument,       NULL, 'U'},
-@@ -1027,7 +1029,7 @@ static void process_flags (int argc, char **argv)
- 			{NULL, 0, NULL, '\0'}
- 		};
- 		while ((c = getopt_long (argc, argv,
--		                         "abc:d:e:f:g:G:hl:Lmop:R:s:u:UP:"
-+		                         "abc:d:e:f:g:G:hl:Lmop:P:R:s:u:UA:"
- #ifdef ENABLE_SUBIDS
- 		                         "v:w:V:W:"
- #endif				/* ENABLE_SUBIDS */
-@@ -1130,9 +1132,17 @@ static void process_flags (int argc, char **argv)
- 				user_pass = optarg;
- 				pflg = true;
- 				break;
-+			case 'P':
-+				user_pass = pw_encrypt (optarg, crypt_make_salt (NULL, NULL));
-+				pflg = true;
-+				break;
- 			case 'R': /* no-op, handled in process_root_flag () */
- 				break;
--			case 'P': /* no-op, handled in process_prefix_flag () */
-+			case 'A': /* no-op, handled in process_prefix_flag () */
-+				fprintf (stderr,
-+					 _("%s: -A is deliberately not supported \n"),
-+					 Prog);
-+				exit (E_BAD_ARG);
- 				break;
- 			case 's':
- 				if (!VALID (optarg)) {
-@@ -2127,7 +2137,7 @@ int main (int argc, char **argv)
- 	(void) textdomain (PACKAGE);
- 
- 	process_root_flag ("-R", argc, argv);
--	prefix = process_prefix_flag ("-P", argc, argv);
-+	prefix = process_prefix_flag ("-A", argc, argv);
- 
- 	OPENLOG ("usermod");
- #ifdef WITH_AUDIT
diff --git a/poky/meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch b/poky/meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch
index 9825216..bd24626 100644
--- a/poky/meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch
+++ b/poky/meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch
@@ -1,4 +1,4 @@
-From 66533c7c6f347d257020675a1ed6e0c59cbbc3f0 Mon Sep 17 00:00:00 2001
+From 1422c24f7266b553c82100e3d18a10c55cd91063 Mon Sep 17 00:00:00 2001
 From: Chen Qi <Qi.Chen@windriver.com>
 Date: Thu, 17 Jul 2014 15:53:34 +0800
 Subject: [PATCH] commonio.c-fix-unexpected-open-failure-in-chroot-env
@@ -21,10 +21,10 @@
  1 file changed, 12 insertions(+), 4 deletions(-)
 
 diff --git a/lib/commonio.c b/lib/commonio.c
-index 16fa7e7..d6bc297 100644
+index cef404b..66908fb 100644
 --- a/lib/commonio.c
 +++ b/lib/commonio.c
-@@ -632,10 +632,18 @@ int commonio_open (struct commonio_db *db, int mode)
+@@ -646,10 +646,18 @@ int commonio_open (struct commonio_db *db, int mode)
  	db->cursor = NULL;
  	db->changed = false;
  
diff --git a/poky/meta/recipes-extended/shadow/shadow.inc b/poky/meta/recipes-extended/shadow/shadow.inc
index 2cbdfbc..2834509 100644
--- a/poky/meta/recipes-extended/shadow/shadow.inc
+++ b/poky/meta/recipes-extended/shadow/shadow.inc
@@ -10,28 +10,28 @@
 DEPENDS = "virtual/crypt"
 
 UPSTREAM_CHECK_URI = "https://github.com/shadow-maint/shadow/releases"
-SRC_URI = "https://github.com/shadow-maint/shadow/releases/download/${PV}/${BP}.tar.gz \
+SRC_URI = "https://github.com/shadow-maint/shadow/releases/download/v${PV}/${BP}.tar.gz \
            file://shadow-4.1.3-dots-in-usernames.patch \
            ${@bb.utils.contains('PACKAGECONFIG', 'pam', '${PAM_SRC_URI}', '', d)} \
            file://shadow-relaxed-usernames.patch \
+           file://0001-Fix-out-of-tree-builds-with-respect-to-libsubid-incl.patch \
+           file://0001-libsubid-link-to-PAM-libraries.patch \
            "
 
-SRC_URI_append_class-target = " \
+SRC_URI:append:class-target = " \
            file://login_defs_pam.sed \
            file://shadow-update-pam-conf.patch \
            "
 
-SRC_URI_append_class-native = " \
+SRC_URI:append:class-native = " \
            file://0001-Disable-use-of-syslog-for-sysroot.patch \
-           file://0002-Allow-for-setting-password-in-clear-text.patch \
            file://commonio.c-fix-unexpected-open-failure-in-chroot-env.patch \
            "
-SRC_URI_append_class-nativesdk = " \
+SRC_URI:append:class-nativesdk = " \
            file://0001-Disable-use-of-syslog-for-sysroot.patch \
            "
 
-SRC_URI[md5sum] = "3d97f11e66bfb0b14702b115fa8be480"
-SRC_URI[sha256sum] = "3ee3081fbbcbcfea5c8916419e46bc724807bab271072104f23e7a29e9668f3a"
+SRC_URI[sha256sum] = "6c4627ff9c9422b96664517ae753c944f2902e92809d0698b65f5fef11985212"
 
 # Additional Policy files for PAM
 PAM_SRC_URI = "file://pam.d/chfn \
@@ -55,9 +55,9 @@
                  ${NSCDOPT}"
 
 NSCDOPT = ""
-NSCDOPT_class-native = "--without-nscd"
-NSCDOPT_class-nativesdk = "--without-nscd"
-NSCDOPT_libc-glibc = "--with-nscd"
+NSCDOPT:class-native = "--without-nscd"
+NSCDOPT:class-nativesdk = "--without-nscd"
+NSCDOPT:libc-glibc = "--with-nscd"
 
 PAM_PLUGINS = "libpam-runtime \
                pam-plugin-faildelay \
@@ -72,21 +72,21 @@
                pam-plugin-shells \
                pam-plugin-rootok"
 
-PAM_PLUGINS_remove_libc-musl = "pam-plugin-lastlog"
+PAM_PLUGINS:remove:libc-musl = "pam-plugin-lastlog"
 
 PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)}"
-PACKAGECONFIG_class-native ??= "${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)}"
-PACKAGECONFIG_class-nativesdk = ""
+PACKAGECONFIG:class-native ??= "${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)}"
+PACKAGECONFIG:class-nativesdk = ""
 PACKAGECONFIG[pam] = "--with-libpam,--without-libpam,libpam,${PAM_PLUGINS}"
 PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
 PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl"
 
-RDEPENDS_${PN} = "shadow-securetty \
+RDEPENDS:${PN} = "shadow-securetty \
                   base-passwd \
                   util-linux-sulogin"
-RDEPENDS_${PN}_class-native = ""
-RDEPENDS_${PN}_class-nativesdk = ""
+RDEPENDS:${PN}:class-native = ""
+RDEPENDS:${PN}:class-nativesdk = ""
 
 do_install() {
 	oe_runmake DESTDIR="${D}" sbindir="${base_sbindir}" usbindir="${sbindir}" install
@@ -115,15 +115,9 @@
 	# Use proper encryption for passwords
 	sed -i 's/^#ENCRYPT_METHOD.*$/ENCRYPT_METHOD SHA512/' ${D}${sysconfdir}/login.defs
 
-	# Now we don't have a mail system. Disable mail creation for now.
-	sed -i 's:/bin/bash:/bin/sh:g' ${D}${sysconfdir}/default/useradd
-	sed -i '/^CREATE_MAIL_SPOOL/ s:^:#:' ${D}${sysconfdir}/default/useradd
-
-	# Use users group by default
-	sed -i 's,^GROUP=1000,GROUP=100,g' ${D}${sysconfdir}/default/useradd
 }
 
-do_install_append() {
+do_install:append() {
 	# Ensure that the image has as a /var/spool/mail dir so shadow can
 	# put mailboxes there if the user reconfigures shadow to its
 	# defaults (see sed below).
@@ -156,7 +150,7 @@
 }
 
 PACKAGES =+ "${PN}-base"
-FILES_${PN}-base = "\
+FILES:${PN}-base = "\
     ${base_bindir}/login.shadow \
     ${base_bindir}/su.shadow \
     ${bindir}/sg \
@@ -166,13 +160,13 @@
     ${sysconfdir}/pam.d/su \
     ${sysconfdir}/login.defs \
 "
-RDEPENDS_${PN} += "${PN}-base"
+RDEPENDS:${PN} += "${PN}-base"
 
 inherit update-alternatives
 
 ALTERNATIVE_PRIORITY = "200"
 
-ALTERNATIVE_${PN} = "passwd chfn chsh chpasswd vipw vigr nologin"
+ALTERNATIVE:${PN} = "passwd chfn chsh chpasswd vipw vigr nologin"
 ALTERNATIVE_LINK_NAME[chfn] = "${bindir}/chfn"
 ALTERNATIVE_LINK_NAME[chsh] = "${bindir}/chsh"
 ALTERNATIVE_LINK_NAME[chpasswd] = "${sbindir}/chpasswd"
@@ -180,19 +174,12 @@
 ALTERNATIVE_LINK_NAME[vigr] = "${base_sbindir}/vigr"
 ALTERNATIVE_LINK_NAME[nologin] = "${base_sbindir}/nologin"
 
-ALTERNATIVE_${PN}-base = "newgrp groups login su"
+ALTERNATIVE:${PN}-base = "newgrp groups login su"
 ALTERNATIVE_LINK_NAME[login] = "${base_bindir}/login"
 ALTERNATIVE_LINK_NAME[su] = "${base_bindir}/su"
 
-ALTERNATIVE_${PN}-doc = "passwd.5 getspnam.3 groups.1 su.1 nologin.8"
-ALTERNATIVE_LINK_NAME[passwd.5] = "${mandir}/man5/passwd.5"
-ALTERNATIVE_LINK_NAME[getspnam.3] = "${mandir}/man3/getspnam.3"
-ALTERNATIVE_LINK_NAME[groups.1] = "${mandir}/man1/groups.1"
-ALTERNATIVE_LINK_NAME[su.1] = "${mandir}/man1/su.1"
-ALTERNATIVE_LINK_NAME[nologin.8] = "${mandir}/man8/nologin.8"
-
 PACKAGE_WRITE_DEPS += "shadow-native"
-pkg_postinst_${PN}_class-target () {
+pkg_postinst:${PN}:class-target () {
 	if [ "x$D" != "x" ]; then
 	  rootarg="--root $D"
 	else
diff --git a/poky/meta/recipes-extended/shadow/shadow_4.8.1.bb b/poky/meta/recipes-extended/shadow/shadow_4.9.bb
similarity index 84%
rename from poky/meta/recipes-extended/shadow/shadow_4.8.1.bb
rename to poky/meta/recipes-extended/shadow/shadow_4.9.bb
index ff4aad9..2fbd81b 100644
--- a/poky/meta/recipes-extended/shadow/shadow_4.8.1.bb
+++ b/poky/meta/recipes-extended/shadow/shadow_4.9.bb
@@ -2,7 +2,7 @@
 
 # Build falsely assumes that if --enable-libpam is set, we don't need to link against
 # libcrypt. This breaks chsh.
-BUILD_LDFLAGS_append_class-target = " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '-lcrypt', '', d)}"
+BUILD_LDFLAGS:append:class-target = " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '-lcrypt', '', d)}"
 
 BBCLASSEXTEND = "native nativesdk"