subtree updates

poky: 80f2b56ad8..d78650b980:
  Ahmed Hossam (1):
        go.bbclass: Allow adding parameters to go ldflags

  Alejandro Hernandez Samaniego (1):
        baremetal-image: Fix do_image dependencies

  Alexander Kanavin (153):
        meson: update 0.58.1 -> 0.59.1
        libcap: update 2.51 -> 2.54
        lua: add a recipe from meta-oe
        lua: update 5.3.6 -> 5.4.3
        rpm: update 4.16.1.3 -> 4.17.0
        libdnf: fix the rpm sqlite-only target setup
        libsolv: disable rpm bdb format support
        perl: do not build berkeley db module by default
        package_rpm: use zstd instead of xz
        qemu: update 6.0.0 -> 6.1.0
        runqemu: correct vga-virtio option to keep virgl enabled
        gnupg: update 2.3.1 -> 2.3.2
        pinentry: update 1.1.1 -> 1.2.0
        spirv-tools: update 2021.2 -> 2021.3
        glslang: update 11.5.0 -> 11.6.0
        shaderc: update 2021.1 -> 2021.2
        inetutils: update 2.1 -> 2.2
        systemd: update 249.3 -> 249.4
        lsof: update 4.91 -> 4.94.0
        libpam: update 1.5.1 -> 1.5.2
        rt-tests: update 2.1 -> 2.2
        libgit2: update 1.1.1 -> 1.2.0
        libssh2: update 1.9.0 -> 1.10.0
        libhandy: update 1.2.3 -> 1.4.0
        qemu: install qmp module without hardcoding the python version in oeqa scripts
        lttng-tools: replace ad hoc ptest fixup with upstream fixes
        rust: drop PV from include file names
        rust: update 1.54.0 -> 1.55.0
        librsvg: update 2.40.21 -> 2.52.0 (transition to rust!)
        librsvg: do not enable nativesdk
        librsvg: add backports to fix big endian targets (e.g. mips)
        librsvg: use only the target architecture to determine availability of atomic primitives
        librsvg: restore reproducibility
        adwaita-icon-theme: update 3.34/38 -> 41.0
        gstreamer1.0-plugins-bad: disable rsvg on x32
        rust/cargo: exclude UNINATIVE_LOADER from task signature
        rust-common.bbclass: rewrite toolchain wrappers in (native) python
        rust: do not write ar into target json definitions
        rust: generate target definitions from (arch, abi), not just arch
        openssl: update 1.1.1l -> 3.0.0
        cryptodev-tests: do not use -Werror with openssl 3
        serf: add a openssl 3 compatibility fix
        ruby: disable openssl extension
        glib-2.0: update 2.68.4 -> 2.70.0
        glib-networking: update 2.68.2 -> 2.70.0
        bison: update 3.7.6 -> 3.8.1
        libdnf: update 0.63.1 -> 0.64.0
        libexif: update 0.6.22 -> 0.6.23
        sudo: update 1.9.7p2 -> 1.9.8p1
        wget: update 1.21.1 -> 1.21.2
        coreutils: update 8.32 -> 9.0
        itstool: update 2.0.6 -> 2.0.7
        nghttp2: add recipe from meta-oe
        libsoup: add a 3.x recipe
        webkitgtk: trim down DEPENDS
        epiphany: trim down DEPENDS
        webkitgtk: update 2.32.3 -> 2.34.0
        epiphany: update 40.3 -> 41.0
        python3: update 3.9.7 -> 3.10.0
        libjitterentropy: update 3.1.0 -> 3.3.0
        kea: update 1.8.2 -> 2.0.0
        ghostscript: update 9.54.0 -> 9.55.0
        lighttpd: update 1.4.59 -> 1.4.60
        bluez5: update 5.61 -> 5.62
        ovmf: update 202105 -> 202108
        systemd: update 249.4 -> 249.5
        meson: update 0.59.1 -> 0.59.2
        python3-pip: update 21.2.4 -> 21.3
        valgrind: update 3.17.0 -> 3.18.1
        librsvg: update 2.52.0 -> 2.52.2
        libva: update 2.12.0 -> 2.13.0
        liberation-fonts: update 2.1.4 -> 2.1.5
        ca-certificates: update 20210119 -> 20211016
        curl: update 7.78.0 -> 7.79.1
        libgit2: update 1.2.0 -> 1.3.0
        libxcrypt: upgrade 4.4.25 -> 4.4.26
        bison: upgrade 3.8.1 -> 3.8.2
        cmake: update 3.21.2 -> 3.21.3
        git: upgrade 2.33.0 -> 2.33.1
        tzdata: upgrade 2021a -> 2021d
        ofono: upgrade 1.32 -> 1.33
        openssh: upgrade 8.7p1 -> 8.8p1
        sysvinit: upgrade 2.99 -> 3.00
        btrfs-tools: upgrade 5.13.1 -> 5.14.2
        ccache: upgrade 4.4 -> 4.4.2
        createrepo-c: upgrade 0.17.5 -> 0.17.6
        libcomps: upgrade 0.1.17 -> 0.1.18
        libedit: upgrade 20210714-3.1 -> 20210910-3.1
        librepo: upgrade 1.14.1 -> 1.14.2
        python3-jinja2: upgrade 3.0.1 -> 3.0.2
        python3-pygobject: upgrade 3.40.1 -> 3.42.0
        python3-setuptools: upgrade 58.0.4 -> 58.2.0
        vala: upgrade 0.52.5 -> 0.54.2
        acpica: upgrade 20210730 -> 20210930
        asciidoc: upgrade 9.1.0 -> 9.1.1
        libarchive: upgrade 3.5.1 -> 3.5.2
        msmtp: upgrade 1.8.15 -> 1.8.17
        sudo: upgrade 1.9.8p1 -> 1.9.8p2
        gobject-introspection: upgrade 1.68.0 -> 1.70.0
        gsettings-desktop-schemas: upgrade 40.0 -> 41.0
        json-glib: upgrade 1.6.4 -> 1.6.6
        libdazzle: upgrade 3.40.0 -> 3.42.0
        harfbuzz: upgrade 2.9.1 -> 3.0.0
        pango: upgrade 1.48.9 -> 1.48.10
        libinput: upgrade 1.19.0 -> 1.19.1
        linux-firmware: upgrade 20210818 -> 20210919
        wireless-regdb: upgrade 2021.07.14 -> 2021.08.28
        mpg123: upgrade 1.28.2 -> 1.29.0
        puzzles: upgrade to latest revision
        libwpe: upgrade 1.10.1 -> 1.12.0
        diffoscope: upgrade 182 -> 187
        fribidi: upgrade 1.0.10 -> 1.0.11
        iso-codes: upgrade 4.6.0 -> 4.7.0
        libatomic-ops: upgrade 7.6.10 -> 7.6.12
        libcap: upgrade 2.54 -> 2.59
        libmd: upgrade 1.0.3 -> 1.0.4
        libsoup-2.4: upgrade 2.72.0 -> 2.74.0
        gnupg: update 2.3.2 -> 2.3.3
        libssh2: skip one of the ptests until openssh 8.8 compatibility is fixed
        systemd: disable seccomp on mips32
        waffle: convert to git, website is down
        u-boot: upgrade 2021.07 -> 2021.10
        psplash: upgrade to latest revision
        stress-ng: convert to git, website is down
        json-c: correct upstream version check
        createrepo-c: upgrade 0.17.6 -> 0.17.7
        python3-numpy: upgrade 1.21.2 -> 1.21.3
        python3-pip: upgrade 21.3 -> 21.3.1
        python3-setuptools: upgrade 58.2.0 -> 58.3.0
        msmtp: upgrade 1.8.17 -> 1.8.18
        gi-docgen: upgrade 2021.7 -> 2021.8
        piglit: upgrade to latest revision
        libinput: upgrade 1.19.1 -> 1.19.2
        mpg123: upgrade 1.29.0 -> 1.29.2
        puzzles: upgrade to latest revision
        webkitgtk: upgrade 2.34.0 -> 2.34.1
        wpebackend-fdo: upgrade 1.10.0 -> 1.12.0
        diffoscope: upgrade 187 -> 188
        libcap: upgrade 2.59 -> 2.60
        vte: upgrade 0.64.2 -> 0.66.0
        ncurses: update 6.2 -> 6.3
        tzdata: update 2021d -> 2021e
        asciidoc: update 9.1.1 -> 10.0.0
        waffle: update 1.6.1 -> 1.7.0
        virgl: skip headless test on specific older distros and fail otherwise
        gptfdisk: address ncurses 6.3 compatibility
        powertop: address ncurses 6.3 compatibility
        systemtap: address ncurses 6.3 compatibility
        igt-gpu-tools: address meson 0.60 compatibility
        python3-pygobject: do not supply unknown g-i options
        gstreamer1.0-python: do not supply unknown g-i options
        webkitgtk: drop unnecessary SSE disabling patch
        cups: exclude beta/rc versions from version check

  Alexandre Belloni (5):
        inetutils: drop CVE-2021-40491 patch
        oeqa/selftest/sstatetests: fix typo ware -> were
        maintainers.inc: fix up rust-cross entry
        libevent,btrfs-tools: fix Upstream-Status tag
        ruby: fix Upstream-Status

  Andreas Müller (1):
        webkitgtk: add gperf-native to DEPENDS to fix build

  Andrei Gherzan (1):
        qemu: Define libnfs PACKAGECONFIG

  Andrej Valek (3):
        busybox: 1.34.0 -> 1.34.1
        featimage: refactor style
        kernel-fitimage: use correct kernel image

  Andres Beltran (1):
        buildhistory: Fix package output files for SDKs

  Bruce Ashfield (15):
        linux-yocto/5.14: scripts/gcc-plugins: consistently use HOSTCC
        linux-yocto/5.14: update to v5.14.8
        linux-yocto/5.14: bsp/qemuarm*-gfx: use virtio graphics
        linux-yocto/5.10: update to v5.10.69
        linux-yocto/5.10: update to v5.10.70
        linux-yocto/5.14: update to v5.14.9
        kernel-yocto: don't apply config metadata patches twice
        linux-yocto/5.14: revert: scripts/gcc-plugins: consistently use HOSTCC
        linux-yocto/5.10: update to v5.10.73
        linux-yocto/5.14: update to v5.14.12
        linux-yocto/5.14: update to v5.14.13
        linux-yocto/5.10: update to v5.10.74
        linux-yocto/5.14: common-pc: enable CONFIG_ATA_PIIX as built-in
        linux-yocto/5.14: update to v5.14.14
        linux-yocto/5.10: update to v5.10.75

  Caner Altinbasak (2):
        bitbake: npmsw: Avoid race condition with multiple npm fetchers
        bitbake: fetch2: Do not attempt to verify donestamp if download is not complete

  Changhyeok Bae (2):
        iproute2: update to 5.14.0
        ethtool: update to 5.14

  Changqing Li (1):
        lttng-ust: fix do_compile failure for arm32 with DEBUG_BUILD enabled

  Daiane Angolini (2):
        machine/qemuarm*: Fix UBOOT_MACHINE value
        ref-manual: Update how to set a useradd password

  Daniel McGregor (3):
        bison: prevent checking for textstyle.
        bitbake.conf: Add gpg-agent as a host tool
        sstate: Allow validation of sstate singatures against list of keys

  David Joyner (1):
        rust: add support for big endian 64-bit PowerPC

  Denys Dmytriyenko (2):
        wayland-protocols: upgrade 1.21 -> 1.22
        wayland-protocols: upgrade 1.22 -> 1.23

  Fred Liu (1):
        glibc: Drop libcidn package

  Henry Kleynhans (1):
        sstate: Switch to ZStandard compressor support

  Hsia-Jun(Randy) Li (1):
        meson: install native file in sdk

  Ian Ray (1):
        archiver: Configurable tarball compression

  Jon Mason (10):
        oeqa/manual: Fix no longer valid URLs
        bitbake: bitbake:toaster:test: Update SSTATE URL
        yocto-bsp/poky: replace http with https for URLs
        bitbake: bitbake: replace http with https for URLs
        documentation: update sources mirror URL
        documentation: replace http with https for URLs
        documentation: use YOCTO_DL_URL
        dev-manual: remove errant /
        runqemu: add DEPLOY_DIR_IMAGE replacement in QB_OPT_APPEND
        bitbake: bitbake-user-manual: update sources mirror URL

  Jose Quaresma (15):
        gstreamer1.0: 1.18.4 -> 1.18.5
        gstreamer1.0-plugins-base: 1.18.4 -> 1.18.5
        gstreamer1.0-plugins-good: 1.18.4 -> 1.18.5
        gstreamer1.0-plugins-bad: 1.18.4 -> 1.18.5
        gstreamer1.0-plugins-ugly: 1.18.4 -> 1.18.5
        gstreamer1.0-rtsp-server: 1.18.4 -> 1.18.5
        gstreamer1.0-libav: 1.18.4 -> 1.18.5
        gstreamer1.0-vaapi: 1.18.4 -> 1.18.5
        gstreamer1.0-omx: 1.18.4 -> 1.18.5
        gstreamer1.0-python: 1.18.4 -> 1.18.5
        gst-devtools: 1.18.4 -> 1.18.5
        gst-examples: 1.18.4 -> 1.18.5
        patch.bbclass: when the patch fails show more info on the fatal error
        sstate.bbclass: count the files on mirrors using the pre local files
        sstate: fix touching files inside pseudo

  Joshua Watt (4):
        bitbake: async: Close sync client event loop
        bitbake: hashserv: Add tests for diverging reports
        bitbake: hashserv: Fix diverging report race condition
        classes/populate_sdk_base: Add setscene tasks

  Kai Kang (1):
        sudo: update multilib patch for sudo.conf

  Khem Raj (11):
        pkgconfig: Update to latest
        libseccomp: Upgrade to 2.5.2 and beyond
        openssl: Drop riscv32 upstreamed patches
        opensbi-payloads.inc: Use strings for fallback
        mesa: Enable svga for x86 only
        qemu: Add knob for enabling PMDK pmem support
        opensbi-payloads: Add dependency on kernel if fdt is set
        librsvg: Fix vendored libc to work on riscv and musl
        librsvg: Bump to 2.52.0 -> 2.52.2
        rust: Upgrade to 1.56.0
        librsvg: Disable 64bit atomics in crossbeam for rv32

  Kiran Surendran (1):
        ffmpeg: fix CVE-2021-38114

  Konrad Weihmann (1):
        libical: fix append in DEPENDS

  Lukasz Majewski (1):
        glibc: Extract common code to build tests to glibc-tests.inc

  Marek Vasut (1):
        piglit: upgrade to latest revision

  Martin Jansa (2):
        webkitgtk: add PACKAGECONFIG for opengl-or-es
        boost: allow searching for python310

  Maximilian Blenk (1):
        mount-copybind: add rootcontext mountoption for overlayfs

  Michael Halstead (2):
        scripts/autobuilder-worker-prereq-tests: jinja2 check
        releases: update to include 3.4 honister

  Michael Opdenacker (18):
        manuals: font fixes
        ref-manual: document DEBUG_PREFIX_MAP
        manuals: replace "apt-get" by "apt"
        Makefile: allow epub and latexpdf outputs to use diagrams from SVG sources
        conf.py: use PNG first in EPUB output
        overview-manual: SVG diagram for the git workflow
        docs: add "make all" to build old types of docs (html, epub, pdf) at once
        manuals: introduce 'yocto_sstate' extlink
        overview-manual: simplify expression
        dev-manual: correct NO_GENERIC_LICENSE section title
        dev-manual: warn about license compliance issues when static libraries are used
        devpyshell: rename to pydevshell
        ref-manual: document TOOLCHAIN_HOST_TASK_ESDK
        manuals: rename "devpyshell" to "pydevshell"
        ref-manual: document SOURCE_DATE_EPOCH
        ref-manual: fix description of SOURCE_DATE_EPOCH
        releases.rst: fix release number for 3.3.3
        docs: poky.yaml: updates for 3.4

  Mike Crowe (2):
        lib/oe/qa,insane: Move extra error handling functions to library
        insane,license,license_image: Allow treating license problems as errors

  Mingli Yu (1):
        packagedata.py: silence a DeprecationWarning

  Oleh Matiusha (1):
        findutils: add ptest

  Oleksandr Kravchuk (15):
        python3: update to 3.9.7
        python3-git: update to 3.1.24
        python3-dbusmock: update to 0.24.0
        python3-setuptools: update to 58.0.4
        python3-setuptools: minor cleanup
        xf86-input-libinput: update to 1.2.0
        libinput: update to 1.19.0
        libxi: update to 1.8
        xorgproto: update to 2021.5
        xkeyboard-config: update to 2.34
        libxkbcommon: update to 1.3.1
        mirrors.bbclass: remove dead infozip mirrors
        man-pages: update to 5.13
        python3-smmap: update to 5.0.0
        python3-pyparsing: update to 3.0.0

  Pablo Saavedra Rodi?o (1):
        mesa: upgrade 21.2.1 -> 21.2.4

  Paul Barker (1):
        bitbake: doc: bitbake-user-manual: Document BB_GIT_SHALLOW and friends

  Paul Eggleton (7):
        migration-3.4: tweak overrides change section
        ref-manual: remove meta class
        poky.yaml: add lz4 and zstd to essential host packages
        migration-3.4: add additional migration info
        migration: tweak introduction section
        poky.yaml: fix lz4 package name for older Ubuntu versions
        migration-3.4: add some extra packaging notes

  Pavel Zhukov (1):
        weston: wrapper for weston modules argument

  Peter Hoyes (2):
        u-boot: Convert ${UBOOT_ENV}.cmd into ${UBOOT_ENV}.scr
        u-boot: Fix syntax error in ${UBOOT_ENV}.scr compilation

  Peter Kjellerstedt (2):
        meson.bblcass: Remove empty egg-info directories before running meson
        qemu.inc: Remove empty egg-info directories before running meson

  Petr Vorel (1):
        ltp: Update to 20210927

  Pgowda (2):
        Fix rust-native build issue when debug is enabled
        rust-cross: Fix directory not deleted for race glibc vs. musl

  Ralph Siemsen (1):
        tar: filter CVEs using vendor name

  Randy Li (1):
        meson: move lang args to the right section

  Richard Purdie (54):
        sstatesig: Only apply group/other permissions to pseudo files
        rpm: Deterministically set vendor macro entry
        abi_version/sstate: Bump to fix rpm corruption issues
        multilib: Avoid sysroot race issues when multilib enabled
        bitbake: knotty/uihelper: Show setscene task progress in summary output
        bitbake: bitbake-worker: Handle pseudo shutdown in Ctrl+C case
        poky.conf: Update tested distros list with recent changes
        bitbake: hashserv: Improve behaviour for better determinism/sstate reuse
        poky.conf: Bump version for 3.4 honister release
        build-appliance-image: Update to honister head revision
        bitbake: bitbake: Bump to version 1.52.0
        build-appliance-image: Update to honister head revision
        layer.conf: Extend recipes not to install without explict dependencies
        libxml2: Use python3targetconfig to fix reproducibility issue
        libnewt: Use python3targetconfig to fix reproducibility issue
        bootchart2: Don't compile python modules
        linux-yocto-dev: Ensure DEPENDS matches recent 5.14 kernel changes
        base/insane: Import oe.qa by default
        base: Clean up unneeded len() calls
        base: Use repr() for printing exceptions
        bitbake.conf: Add BB_CURRENTTASK to BB_HASHEXCLUDE
        reproducible_build: Drop obsolete sstate workaround
        python: Update now reproducibile builds are the default
        bitbake: bitbake-worker: Set BB_CURRENTTASK earlier
        bitbake: compress: Allow to operate on file descriptor
        bitbake: siggen: Change file format of siginfo files to use zstd compressed json
        sstate: Fixes for eSDK generation after zstd switch
        patch: Use repr() with exceptions instead of str()
        reproducible_build: Drop now unneeded compiler warning
        reproducible: Move class function code into library
        reproducible: Move variable definitions to bitbake.conf
        reproducible: Merge code into base.bbclass
        kernel: Add KERNEL_DEBUG_TIMESTAMPS variable
        reproducible: Drop BUILD_REPRODUCIBLE_BINARIES variable
        kernel: Rework kernel make flag to variable mappings
        oeqa: Update cleanup code to wait for hashserv exit
        poky: Reproducible builds are now the default
        bitbake: tests/runqueue: Ensure hashserv exits before deleting files
        bitbake: bitbake-worker: Add debug when unpickle fails
        bitbake: siggen: Fix type conversion issues
        bitbake: test/fetch: Update urls to match upstream branch name changes
        libtool: Update patchset to match those submitted upstream
        staging: Fix autoconf-native rebuild failure
        patch: Fix exception reporting with repr()
        bitbake: fetch2/perforce: Fix typo
        bitbake: bitbake: Bump to post release verion 1.53.0
        poky.conf: Post release version bump
        gcc: Merge three related patches together
        gcc: Drop sdt (dtrace) header patch
        gcc: Drop broken/unneeded patch
        bitbake: tests/runqueue: Drop python version test decorators
        gcc: Update patches submitted/merged upstream
        gcc: Drop testsuite failure fix patch
        gcc: Add missing patch Upstream-Status

  Ross Burton (21):
        bitbake: tests/utils: mark a regex as a raw string
        bitbake: tests/fetch: prefix the FetcherTest temporary directory
        bitbake: fetch2: clarify the command-no-found error message
        bitbake: fetch2/gitsm: remove the 'nugget' SRCREV caching
        linux-yocto: add libmpc-native to DEPENDS
        bitbake: fetch2: document checkstatus API
        curl: fix CVE-2021-22945 through -22947
        oe/license: implement ast.NodeVisitor.visit_Constant
        license.bbclass: implement ast.NodeVisitor.visit_Constant
        bitbake: codegen: implement ast.NodeVisitor.visit_Constant
        testimage: fix unclosed testdata file
        oe/utils: log exceptions in ThreadedWorker functions
        sstate: don't silently handle all exceptions in sstate_checkhashes
        gawk: replace AR patch with upstreamed patch
        gawk: reduce strictness of the time test
        strace: remove obsolete patch
        strace: remove TOOLCHAIN assignment
        oeqa/runtime: load modules using importlib
        oeqa/runtime: search sys.path explicitly for modules
        testimage: remove target_modules_path
        strace: show test suite log on failure

  Sakib Sajal (1):
        go: upgrade 1.16.7 -> 1.16.8

  Saul Wold (3):
        spdx.py: Add annotation to relationship
        create-spdx: add create_annotation function
        create-spdx: cross recipes are native also

  Stefan Herbrechtsmeier (17):
        bitbake: fetch2: npm: Support npm archives with missing search directory mode
        bitbake: fetch2: npm: Create config npmrc in environment instantiation
        bitbake: fetch2: npmsw: Add support for local tarball and link sources
        npm: Add support for EXTRA_OENPM arguments
        recipetool: Move license md5sums into CSV files
        recipetool: Skip common source files in guess_license
        recipetool: Change default paramter fallback_licenses of function split_pkg_licenses from None to []
        recipetool: ignore empty license files
        recipetool: Add logger info for missing license entries
        recipetool: Add support for linenumbers to licenses.csv
        recipetool: npm: Do not add package.json files to LIC_FILES_CHKSUM
        recipetool: npm: Use README as license fallback
        npm: Add variable NPM_NODEDIR with default value
        npm: Use configs for npm environment and args for npm run command
        recipetool: Rework crunch_license to recognize more variants
        recipetool: Simplify common source files skip in guess_license
        npm: Remove unnecessary configs argument from npm run command

  Teoh Jay Shen (1):
        oeqa/runtime/parselogs: modified drm error in common errors list

  Thomas Perrot (1):
        image_types: allow the creation of block devices on top of UBI volumes

  Tim Orling (17):
        ptest-runner: install -collect-system-data script
        python3-hypothesis: upgrade 6.15.0 -> 6.23.2
        python3-importlib-metadata: upgrade 4.6.4 -> 4.8.1
        python3-more-itertools: upgrade 8.9.0 -> 8.10.0
        python3-zipp: upgrade 3.5.0 -> 3.6.0
        libconvert-asn1-perl: upgrade 0.31 -> 0.33
        python3-pytest: upgrade 6.2.4 -> 6.2.5
        at-spi2-core: upgrade 2.40.3 -> 2.42.0
        python3-packaging: DEPENDS on python3-setuptools-native
        python3-packaging: BBCLASSEXTEND nativesdk
        python3-tomli: add recipe for 1.2.1
        python3-setuptools-scm: upgrade 6.0.1 -> 6.3.2
        python3-setuptools: _distutils/sysconfig fix
        python3-pyyaml: upgrade 5.4.1 -> 6.0
        python3-manifest: -pprint RDEPENDS on -profile
        python3-hypothesis: upgrade 6.23.2 -> 6.24.0
        python3-tomli: upgrade 1.2.1 -> 1.2.2

  Tobias Kaufmann (1):
        mount-copybind: add SELinux support

  Yureka (1):
        systemd: add missing include for musl

  Zoltán Böszörményi (1):
        libpam: Fix build with DISTRO_FEATURES usrmerge

  hongxu (1):
        libcap: fix nativesdk-libcap relocate failure

  wangmy (20):
        diffoscope: upgrade 181 -> 182
        cmake: upgrade 3.21.1 -> 3.21.2
        gzip: upgrade 1.10 -> 1.11
        harfbuzz: upgrade 2.9.0 -> 2.9.1
        vulkan-headers: upgrade 1.2.182 -> 1.2.191
        vulkan-loader: upgrade 1.2.182 -> 1.2.191
        vulkan-tools: upgrade 1.2.182 -> 1.2.191
        help2man: upgrade 1.48.4 -> 1.48.5
        python3-more-itertools: upgrade 8.8.0 -> 8.9.0
        acpid: upgrade 2.0.32 -> 2.0.33
        bind: upgrade 9.16.20 -> 9.16.21
        createrepo-c: upgrade 0.17.4 -> 0.17.5
        dnf: upgrade 4.8.0 -> 4.9.0
        ell: upgrade 0.43 -> 0.44
        libical: upgrade 3.0.10 -> 3.0.11
        dhcpcd: upgrade 9.4.0 -> 9.4.1
        dnf: upgrade 4.9.0 -> 4.10.0
        file: upgrade 5.40 -> 5.41
        libdnf: upgrade 0.64.0 -> 0.65.0
        lttng-tools: upgrade 2.13.0 -> 2.13.1

  zhengruoqin (2):
        libsolv: upgrade 0.7.19 -> 0.7.20
        python3-pycryptodome: upgrade 3.10.1 -> 3.11.0

meta-security: a85fbe980e..e81c15f851:
  Armin Kuster (1):
        python3-fail2ban: fix build failure and cleanup

  Kai Kang (1):
        sssd: re-package to fix QA issues

  Kristian Klausen (1):
        swtpm: update to 0.6.1

  Liwei Song (1):
        recipes-security/chipsec: platform security assessment framework

meta-openembedded: 23dc4f060f..2f6797d8d6:
  Alexander Kanavin (23):
        python3-yappi: add python 3.10 fix
        python3-gmpy2: update 2.0.8 -> 2.1.0rc1
        python3-m2crypto: address build failure with openssl 3.x
        lua: remove recipe as it is now in oe-core
        nghttp2: remove recipe as it is now in oe-core
        kronosnet: update 1.20 -> 1.22
        polkit: update 0.116 -> 0.119
        openflow: disable openssl PACKAGECONFIG
        openipmi: add a python 3.10 compatibility patch
        strongswan: disable openssl PACKAGECONFIG
        pkcs11-helper: backport a openssl 3.x patch
        nodejs: use -fpermissive
        nodejs: add a python 3.10 compatibility patch
        php: disable openssl PACKAGECONFIG
        libsigrokdecode: add a python 3.10 compatibility patch
        freerdp: backport openssl 3.x patches
        opensc: do not use -Werror
        cfengine: blacklist due to openssl 3.x incompatibility
        netplan: do not use -Werror
        boinc-client: blacklist due to openssl 3.x incompatibility
        ldns: blacklist due to openssl 3.x incompatibility
        surf: add a webkit 2.34 compatibility patch
        mozjs: update 60.9.0 -> 91.1.0

  Alexander Thoma (1):
        keyutils: fix install path

  Armin Kuster (1):
        Apache: Several CVE fixes

  Chen Qi (1):
        ntfs-3g-ntfsprogs: upgrade to 2021.8.22

  Gianfranco (2):
        vboxguestdrivers: upgrade 6.1.26 -> 6.1.28
        vboxguestdrivers: Fix build failure due to the last update.

  Ivan Maidanski (1):
        bdwgc: upgrade 8.0.4 -> 8.0.6

  Jeremy Kerr (1):
        mctp: Add MCTP control utilities

  Joshua Watt (2):
        colord-native: Inherit pkgconfig
        mutter: Move gsettings to a separate package

  Justin Bronder (2):
        python3-mccabe: fix LICENSE and RDEPENDS
        python3-pyflakes: fix LICENSE, HOMEPAGE and RDEPENDS

  Khem Raj (44):
        packagegroup-meta-oe: Add lv-drivers and lvgl
        python3-pystache: Remove need for python2x
        python3-behave: Switch to using github src_uri
        python3-simpleeval: Remove use_2to3
        python3-parse-type: Do not ask for 2to3
        python3-anyjson: Do not enable 2to3
        python3-pybluez: Do not set 2to3
        packagegroup-meta-networking: Remove nghttp2
        packagegroup-meta-oe: Remove lua
        gjs: Inherit pkgconfig
        luaposix: Use lua 5.4
        devilspie2: Switch to using github repo
        devilspie2: Add missing dependency on libxinerama
        kronosnet: Correct path to poll.h
        luaposix: Upgrade to 35.1
        xfce.bbclass: Mark string as raw in a regexp
        nodejs: add -fpermissive BUILD_CXXFLAGS
        pcimem: Add riscv64 into COMPATIBLE_HOST
        luaposix: Depend on libxcrypt-native
        libcrypt-openssl-rsa-perl: Upgrade to 0.32
        xrdp: Upgrade to 0.9.17
        yelp,yelp-xsl,yelp-tools: Upgrade to 41 release
        mozjs: Disable JIT on mips
        libcrypt-openssl-rsa-perl: Fix build with openssl3+
        nodejs: Upgrade to 14.18.1
        librest: Use master with libsoup3 support
        gnome-online-accounts: Upgrade to 3.43.1
        iwd: Fix  build with musl
        xrdp: Exclude from builds
        xorgxrdp: Add to exclusion list for now
        bluepy: Set PV and correct syntax for RDEPENDS
        python3-kivy: Use new override syntax in RDEPENDS
        bluepy: Fix permissions on tarball
        nodejs: Upgrade to 16.11.1
        mozjs: Fix build on mips/musl
        mozjs: Fix musl miscompiles with HAVE_THREAD_TLS_KEYWORD
        luaposix: Use virtual/crypt instread of hardcoding libxcrypt
        packagegroup-meta-oe: Add libjs-jquery-globalize and libjs-jquery-cookie
        mozjs: Add riscv32 support
        driverctl: Rename to have PV in recipe name
        tbb: Link with libatomic when using clang compiler on rv32
        gimp: Disable vector icons on mips/rv32 using clang
        mozjs: Update to 91.2.0
        mozjs: Fix build for 32bit systems disabling JIT

  Kurt Kiefer (2):
        mozjs: move large static library into staticdev package
        gyp: fix for compatibility with Python 3.10

  Leon Anavi (6):
        python3-aiohue: Upgrade 2.6.1 -> 2.6.3
        python3-paho-mqtt: Upgrade 1.5.1 -> 1.6.1
        python3-thrift: Upgrade 0.13.0 -> 0.15.0
        python3-prompt-toolkit: Upgrade 3.0.19 -> 3.0.21
        python3-traitlets: Upgrade 5.1.0 -> 5.1.1
        python3-prettytable: Upgrade 2.1.0 -> 2.2.1

  LiweiSong (1):
        Revert "chipsec: platform security assessment framework"

  Marco Cavallini (1):
        bluepy_git.bb: Added recipe for BluePy Python interface to Bluetooth LE on Linux (v2)

  Marek Vasut (3):
        apitrace: Upgrade to latest version
        apitrace: Conditionally enable X11 support
        yavta: Upgrade to latest version and drop downstream patch

  Martin Jansa (4):
        protobuf: import a patch from meta-webosose to fix building protobuf-c with gold linker
        grpc: revert GRPCPP_ABSEIL_SYNC change from 1.40.0 to fix undefined references to absl::lts_20210324::Mutex::~Mutex()
        luaposix: depend on target libxcrypt instead of native
        lv-lib-png: add wayland to REQUIRED_DISTRO_FEATURES

  Matthias Klein (1):
        gpsd: Install also the generated parts of the Python library

  Matthias Schiffer (1):
        byacc: switch to official HTTPS mirror

  Mingli Yu (1):
        opencv: remove setup_vars_opencv4.sh

  Oleksandr Kravchuk (72):
        iwd: update to 1.18
        nano: update to 5.9
        ostree: update to 2021.5
        pegtl: update to 3.2.1
        pmdk: update to 1.11.1
        protobuf-c: update to 1.4.0
        thingsboard-gateway: update to 2.8
        libbpf: fix PV
        libcdio-paranoia: update to 10.2+2.0.1
        ttf-abyssinica: update to 2.100
        ttf-dejavu: add UPSTREAM_CHECK_URI
        ttf-vlgothic: update to 20200720
        networkmanager: update to 1.32.12
        nng: update to 1.4.0
        opensaf: update to 5.21.09
        python3-absl: update 0.14.1
        python3-alembic: update to 1.7.4
        python3-astroid: update to 2.8.2
        python3-cantools: update to 36.4.0
        python3-certifi: update to 2021.10.8
        python3-cffi: update to 1.15.0
        python3-colorlog: update to 6.5.0
        python3-coverage: update to 6.0.2
        python3-cryptography-vectors: update to 35.0.0
        python3-dateparser: update to 1.1.0
        python3-elementpath: update to 2.3.2
        python3-eventlet: update to 0.32.0
        python3-google-api-core: update to 2.1.1
        python3-google-api-python-client: update to 2.26.1
        python3-google-auth: update to 2.3.0
        python3-grpcio-tools: update to 1.41.0
        python3-grpcio: update to 1.41.0
        python3-h2: update to 4.1.0
        python3-haversine: update to 2.5.1
        python3-httplib2: update to 0.20.1
        python3-idna: update to 3.3
        python3-iso3166: update to 2.0.2
        python3-joblib: update to 1.1.0
        python3-jsonrpcserver: update to 5.0.3
        python3-paramiko: update to 2.8.0
        python3-portion: update to 2.2.0
        python3-protobuf: update to 3.18.1
        python3-pulsectl: update to 21.10.4
        python3-pycodestyle: update to 2.8.0
        python3-pyephem: update to 4.1
        python3-pyflakes: update to 2.4.0
        python3-pyjwt: update to 2.2.0
        python3-pykickstart: update to 3.34
        python3-pyopenssl: update to 21.0.0
        python3-pyperf: update to 2.3.0
        python3-pytest-timeout: update 2.0.1
        python3-pytz: update to 2021.3
        python3-regex: update to 2021.10.8
        python3-sentry-sdk: update to 1.4.3
        python3-sympy: udpate to 1.9
        python3-twitter: update to 4.1.0
        python3-uritemplate: update to 4.1.1
        python3-websockets: update to 10.0
        python3-wrapt: update to 1.13.2
        python3-xlsxwriter: update to 3.0.1
        python3-xmlschema: update to 1.8.0
        python3-yarl: update to 1.7.0
        python3-typeguard: update to 2.13.0
        python3-pyatspi: update to 2.38.1
        python3-h5py: update to 3.5.0
        python3-pybind11-json: update to 0.2.11
        python3-pychromecast: update to 9.3.1
        python3-tzlocal: update to 4.0.1
        python3-zeroconf: update to 0.36.9
        leptonica: update to 1.82.0
        redis-plus-plus: update to 1.3.2
        hiredis: update to 1.0.2

  Peter Bergin (3):
        pipewire: remove manpages class
        pipewire: also handle pipewire-media-session in systemd class
        pipewire: rework PACKAGECONFIG for systemd service files

  Philippe Coval (5):
        lvgl: Add recipe for Lightweight Graphics Library
        lv-drivers: Add recipe for lvgl lib
        lv-lib-png: Add recipe for LVGL for handling PNG format
        lvgl: Add lv_lib_png to packagegroup
        lvgl: Lint recipe

  Roland Hieber (1):
        rapidjson: override hard-coded lib install dir

  Shiping Ji (1):
        Add recipe for driverctl

  Tim Orling (6):
        unicode-ucd: upgrade 12.1.0 -> 14.0.0
        gnome-screenshot: add recipe for 40.0
        libgweather: upgrade 3.36.2 -> 40.0
        colord: inherit pkgconfig
        gfbgraph: patch to build with latest rest
        gnome-calendar: upgrade 3.38.1 -> 41.0

  Trevor Gamblin (3):
        python3-posix-ipc: Add recipe for version 1.0.5
        python3-pyinotify: Add fcntl, logging to RDEPENDS
        python3-cvxopt: upgrade 1.2.6 -> 1.2.7

  Vyacheslav Yurkov (3):
        grpc: fix cross-compilation of grpc applications
        grpc: fix cross-compilation of grpc applications
        grpc: upgrade 1.38.1 -> 1.41.0

  Wang Mingyu (1):
        poppler: upgrade 21.09.0 -> 21.10.0

  Yi Zhao (3):
        samba: upgrade 4.14.7 -> 4.14.8
        audit: upgrade 3.0.5 -> 3.0.6
        strongswan: upgrade 5.9.3 -> 5.9.4

  Zoltán Böszörményi (1):
        python3-jsmin: Upgrade to version 3.0.0

  wangmy (11):
        openvpn: upgrade 2.5.3 -> 2.5.4
        redis: upgrade 6.2.5 -> 6.2.6
        span-lite: upgrade 0.10.1 -> 0.10.3
        bdwgc: upgrade 8.0.6 -> 8.2.0
        icewm: upgrade 2.7.0 -> 2.8.0
        ifenslave: upgrade 2.12 -> 2.13
        asio: upgrade 1.18.1.bb -> 1.20.0
        libgusb: upgrade 0.3.7 -> 0.3.8
        libxmlb: upgrade 0.3.2 -> 0.3.3
        xdebug: upgrade 2.9.5 -> 3.1.1
        cryptsetup: upgrade 2.3.6 -> 2.4.1

  zangrc (25):
        python3-ipython: upgrade 7.27.0 -> 7.28.0
        python3-jdatetime: upgrade 3.6.2 -> 3.6.4
        python3-multidict: upgrade 5.1.0 -> 5.2.0
        python3-openpyxl: upgrade 3.0.8 -> 3.0.9
        python3-pyscaffold: upgrade 4.0.2 -> 4.1
        python3-transitions: upgrade 0.8.9 -> 0.8.10
        networkmanager-openvpn: upgrade 1.8.14 -> 1.8.16
        ser2net: upgrade 4.3.3 -> 4.3.4
        python3-humanize: upgrade 3.11.0 -> 3.12.0
        python3-nmap: upgrade 1.5.0 -> 1.5.1
        libjs-jquery-cookie: Add recipe
        libjs-jquery-globalize: Add recipe
        python3-cachetools: upgrade 4.2.2 -> 4.2.4
        python3-cbor2: upgrade 5.4.1 -> 5.4.2
        python3-click: upgrade 8.0.1 -> 8.0.3
        python3-configargparse : upgrade 1.5.2 -> 1.5.3
        python3-flask: upgrade 2.0.1 -> 2.0.2
        python3-pyscaffold: upgrade 4.1 -> 4.1.1
        python3-werkzeug: upgrade 2.0.1 -> 2.0.2
        python3-absl: upgrade 0.14.1 -> 0.15.0
        python3-pandas: upgrade 1.3.3 -> 1.3.4
        python3-pulsectl: upgrade 21.10.4 -> 21.10.5
        python3-pyjwt: upgrade 2.2.0 -> 2.3.0
        python3-pytest-asyncio: upgrade 0.15.1 -> 0.16.0
        python3-robotframework: upgrade 4.1.1 -> 4.1.2

  zhengruoqin (15):
        python3-ujson: upgrade 4.1.0 -> 4.2.0
        python3-urllib3: upgrade 1.26.6 -> 1.26.7
        python3-watchdog: upgrade 2.1.5 -> 2.1.6
        gensio: upgrade 2.2.9 -> 2.3.1
        nlohmann-json: upgrade 3.10.2 -> 3.10.4
        libencode-perl: upgrade 3.12 -> 3.16
        python3-socketio: upgrade 5.4.0 -> 5.4.1
        python3-sqlalchemy: upgrade 1.4.23 -> 1.4.26
        python3-stevedore: upgrade 3.4.0 -> 3.5.0
        autofs: upgrade 5.1.7 -> 5.1.8
        links: upgrade 2.22 -> 2.25
        atftp: upgrade 0.7.4 -> 0.7.5
        python3-gmqtt: upgrade 0.6.10 -> 0.6.11
        python3-google-api-python-client: upgrade 2.26.1 -> 2.27.0
        python3-greenlet: upgrade 1.1.1 -> 1.1.2

meta-raspberrypi: 9eb4879cf4..90b3ac6fb3:
  Zygmunt Krynicki (1):
        rpi-config: warn on config.txt lines exceeding 80 bytes
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I9e75d5bd606a913fbe69e6735c9ecafc436441ba
diff --git a/meta-openembedded/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2017.3.23.bb b/meta-openembedded/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2017.3.23.bb
deleted file mode 100644
index 36fa5ef..0000000
--- a/meta-openembedded/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2017.3.23.bb
+++ /dev/null
@@ -1,52 +0,0 @@
-DESCRIPTION = "The NTFS-3G driver is an open source, freely available NTFS driver for Linux with read and write support."
-HOMEPAGE = "http://www.ntfs-3g.org/"
-DEPENDS = "fuse libgcrypt"
-PROVIDES = "ntfsprogs ntfs-3g"
-LICENSE = "GPLv2 & LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
-                    file://COPYING.LIB;md5=f30a9716ef3762e3467a2f62bf790f0a"
-
-SRC_URI = "http://tuxera.com/opensource/ntfs-3g_ntfsprogs-${PV}.tgz \
-           file://0001-libntfs-3g-Makefile.am-fix-install-failed-while-host.patch \
-"
-S = "${WORKDIR}/ntfs-3g_ntfsprogs-${PV}"
-SRC_URI[md5sum] = "d97474ae1954f772c6d2fa386a6f462c"
-SRC_URI[sha256sum] = "3e5a021d7b761261836dcb305370af299793eedbded731df3d6943802e1262d5"
-
-UPSTREAM_CHECK_URI = "https://www.tuxera.com/community/open-source-ntfs-3g/"
-UPSTREAM_CHECK_REGEX = "ntfs-3g_ntfsprogs-(?P<pver>\d+(\.\d+)+)\.tgz"
-
-inherit autotools pkgconfig
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[uuid] = "--with-uuid,--without-uuid,util-linux"
-
-# required or it calls ldconfig at install step
-EXTRA_OEMAKE = "LDCONFIG=echo"
-
-PACKAGES =+ "ntfs-3g ntfsprogs libntfs-3g"
-
-FILES:ntfs-3g = "${base_sbindir}/*.ntfs-3g ${bindir}/ntfs-3g* ${base_sbindir}/mount.ntfs"
-RDEPENDS:ntfs-3g += "fuse"
-RRECOMMENDS:ntfs-3g = "util-linux-mount"
-
-FILES:ntfsprogs = "${base_sbindir}/* ${bindir}/* ${sbindir}/*"
-FILES:libntfs-3g = "${libdir}/*${SOLIBS}"
-
-do_install:append() {
-    # Standard mount will execute the program /sbin/mount.TYPE when called.
-    # Add a symbolic link to let mount find ntfs.
-    ln -sf mount.ntfs-3g ${D}${base_sbindir}/mount.ntfs
-    rmdir ${D}${libdir}/ntfs-3g
-
-    # Handle when usrmerge is in effect. Some files are installed to /sbin
-    # regardless of the value of ${base_sbindir}.
-    if [ "${base_sbindir}" != /sbin ] && [ -d ${D}/sbin ]; then
-        mkdir -p ${D}${base_sbindir}
-        mv ${D}/sbin/* ${D}${base_sbindir}
-        rmdir ${D}/sbin
-    fi
-}
-
-# Satisfy the -dev runtime dependency
-ALLOW_EMPTY:${PN} = "1"
diff --git a/meta-openembedded/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2021.8.22.bb b/meta-openembedded/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2021.8.22.bb
new file mode 100644
index 0000000..1ebbb41
--- /dev/null
+++ b/meta-openembedded/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2021.8.22.bb
@@ -0,0 +1,52 @@
+DESCRIPTION = "The NTFS-3G driver is an open source, freely available NTFS driver for Linux with read and write support."
+HOMEPAGE = "http://www.ntfs-3g.org/"
+DEPENDS = "fuse libgcrypt"
+PROVIDES = "ntfsprogs ntfs-3g"
+LICENSE = "GPLv2 & LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
+                    file://COPYING.LIB;md5=f30a9716ef3762e3467a2f62bf790f0a"
+
+SRC_URI = "http://tuxera.com/opensource/ntfs-3g_ntfsprogs-${PV}.tgz \
+           file://0001-libntfs-3g-Makefile.am-fix-install-failed-while-host.patch \
+"
+S = "${WORKDIR}/ntfs-3g_ntfsprogs-${PV}"
+SRC_URI[md5sum] = "90da343e78877d388eb34cefae6799ae"
+SRC_URI[sha256sum] = "55b883aa05d94b2ec746ef3966cb41e66bed6db99f22ddd41d1b8b94bb202efb"
+
+UPSTREAM_CHECK_URI = "https://www.tuxera.com/community/open-source-ntfs-3g/"
+UPSTREAM_CHECK_REGEX = "ntfs-3g_ntfsprogs-(?P<pver>\d+(\.\d+)+)\.tgz"
+
+inherit autotools pkgconfig
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[uuid] = "--with-uuid,--without-uuid,util-linux"
+
+# required or it calls ldconfig at install step
+EXTRA_OEMAKE = "LDCONFIG=echo"
+
+PACKAGES =+ "ntfs-3g ntfsprogs libntfs-3g"
+
+FILES:ntfs-3g = "${base_sbindir}/*.ntfs-3g ${bindir}/ntfs-3g* ${base_sbindir}/mount.ntfs"
+RDEPENDS:ntfs-3g += "fuse"
+RRECOMMENDS:ntfs-3g = "util-linux-mount"
+
+FILES:ntfsprogs = "${base_sbindir}/* ${bindir}/* ${sbindir}/*"
+FILES:libntfs-3g = "${libdir}/*${SOLIBS}"
+
+do_install:append() {
+    # Standard mount will execute the program /sbin/mount.TYPE when called.
+    # Add a symbolic link to let mount find ntfs.
+    ln -sf mount.ntfs-3g ${D}${base_sbindir}/mount.ntfs
+    rmdir ${D}${libdir}/ntfs-3g
+
+    # Handle when usrmerge is in effect. Some files are installed to /sbin
+    # regardless of the value of ${base_sbindir}.
+    if [ "${base_sbindir}" != /sbin ] && [ -d ${D}/sbin ]; then
+        mkdir -p ${D}${base_sbindir}
+        mv ${D}/sbin/* ${D}${base_sbindir}
+        rmdir ${D}/sbin
+    fi
+}
+
+# Satisfy the -dev runtime dependency
+ALLOW_EMPTY:${PN} = "1"
diff --git a/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp_2.10.24.bb b/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp_2.10.24.bb
index dbb576a..4b0f43b 100644
--- a/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp_2.10.24.bb
+++ b/meta-openembedded/meta-gnome/recipes-gimp/gimp/gimp_2.10.24.bb
@@ -51,6 +51,9 @@
                 --disable-check-update \
                 --without-wmf"
 
+EXTRA_OECONF:append:toolchain-clang:riscv32 = " --disable-vector-icons"
+EXTRA_OECONF:append:toolchain-clang:mips = " --disable-vector-icons"
+
 do_configure:append() {
     find ${B} -name Makefile | xargs sed -i s:'-I$(includedir)':'-I.':g
     find ${B} -name Makefile | xargs sed -i s:'-I/usr/include':'-I${STAGING_INCDIR}':g
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/devilspie/devilspie2_0.43.bb b/meta-openembedded/meta-gnome/recipes-gnome/devilspie/devilspie2_0.43.bb
index 69c23d5..f48f04f 100644
--- a/meta-openembedded/meta-gnome/recipes-gnome/devilspie/devilspie2_0.43.bb
+++ b/meta-openembedded/meta-gnome/recipes-gnome/devilspie/devilspie2_0.43.bb
@@ -4,15 +4,18 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=00aefaa50aad75c21367df66102d542c \
                     file://GPL3.txt;md5=d32239bcb673463ab874e80d47fae504"
 
-DEPENDS = "gtk+ glib-2.0 libwnck lua virtual/libx11"
+DEPENDS = "gtk+ glib-2.0 libwnck libxinerama lua virtual/libx11"
 
-SRC_URI = " \
-    http://download.savannah.gnu.org/releases/${BPN}/${BPN}_${PV}-src.tar.gz \
+PV .= "+git${SRCPV}"
+
+SRCREV = "a3ee65b815a0247a0dbdaa39353444cef6f93499"
+
+SRC_URI = "git://github.com/dsalt/devilspie2;branch=master \
     file://default.lua \
     file://devilspie2.desktop \
 "
-SRC_URI[md5sum] = "26eed0b5b4af5c7e13c551eceaeab832"
-SRC_URI[sha256sum] = "ecffc17c62b41e196b72340192a90c4223329df041f135e74c0990860595f828"
+
+S = "${WORKDIR}/git"
 
 inherit features_check pkgconfig gettext
 
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/gfbgraph/gfbgraph/0001-Update-rest-requirement-to-rest-1.0.patch b/meta-openembedded/meta-gnome/recipes-gnome/gfbgraph/gfbgraph/0001-Update-rest-requirement-to-rest-1.0.patch
new file mode 100644
index 0000000..c24a9e5
--- /dev/null
+++ b/meta-openembedded/meta-gnome/recipes-gnome/gfbgraph/gfbgraph/0001-Update-rest-requirement-to-rest-1.0.patch
@@ -0,0 +1,72 @@
+From d058e6eb6c9ebf5f4fff89ec0ac93323fc64c1ba Mon Sep 17 00:00:00 2001
+From: Tim Orling <ticotimo@gmail.com>
+Date: Mon, 18 Oct 2021 08:42:35 -0700
+Subject: [PATCH] Update rest requirement to rest-1.0
+
+librest 0.8.1 declares rest-1.0 and was released four years ago.
+
+https://gitlab.gnome.org/GNOME/librest/-/commit/2971b3b92701f70fc368ad64bd25cefaea043f87
+
+Upstream-Status: Submitted
+[https://gitlab.gnome.org/GNOME/libgfbgraph/-/merge_requests/6]
+
+Signed-off-by: Tim Orling <ticotimo@gmail.com>
+
+---
+ .dir-locals.el       | 2 +-
+ configure.ac         | 2 +-
+ gfbgraph/Makefile.am | 2 +-
+ libgfbgraph.pc.in    | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/.dir-locals.el b/.dir-locals.el
+index 77abbf0..d39cdf2 100644
+--- a/.dir-locals.el
++++ b/.dir-locals.el
+@@ -3,7 +3,7 @@
+                                "/usr/include/json-glib-1.0"
+                                "/usr/include/goa-1.0"
+                                "/usr/lib64/goa-1.0/include"
+-                               "/usr/include/rest-0.7"
++                               "/usr/include/rest-1.0"
+                                "/usr/include/dbus-1.0"
+                                "/usr/lib64/dbus-1.0/include"
+                                "/usr/include/gio-unix-2.0/"
+diff --git a/configure.ac b/configure.ac
+index fd1231f..9b49f3f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -40,7 +40,7 @@ AM_CONDITIONAL([ENABLE_GTK_DOC], false)
+ 
+ GOBJECT_INTROSPECTION_CHECK([1.30.0])
+ 
+-PKG_CHECK_MODULES(LIBGFBGRAPH, [glib-2.0 gio-2.0 gobject-2.0 rest-0.7 json-glib-1.0])
++PKG_CHECK_MODULES(LIBGFBGRAPH, [glib-2.0 gio-2.0 gobject-2.0 rest-1.0 json-glib-1.0])
+ 
+ PKG_CHECK_MODULES(SOUP, [libsoup-2.4])
+ SOUP_UNSTABLE_CPPFLAGS=-DLIBSOUP_USE_UNSTABLE_REQUEST_API
+diff --git a/gfbgraph/Makefile.am b/gfbgraph/Makefile.am
+index d07b90d..b993ab7 100644
+--- a/gfbgraph/Makefile.am
++++ b/gfbgraph/Makefile.am
+@@ -60,7 +60,7 @@ GFBGraph_@API_MAJOR@_@API_MINOR@_gir_INCLUDES = \
+ 	GLib-2.0 	\
+ 	Gio-2.0		\
+ 	GObject-2.0	\
+-	Rest-0.7	\
++	Rest-1.0	\
+ 	Json-1.0	\
+ 	Soup-2.4
+ 
+diff --git a/libgfbgraph.pc.in b/libgfbgraph.pc.in
+index f87073e..d4f4e3a 100644
+--- a/libgfbgraph.pc.in
++++ b/libgfbgraph.pc.in
+@@ -9,6 +9,6 @@ apiversion=@API_VERSION@
+ Name: libgfbgraph
+ Description: GObject library for Facebook Graph API
+ Version: @VERSION@
+-Requires: gio-2.0 glib-2.0 goa-1.0 json-glib-1.0 libsoup-2.4 rest-0.7
++Requires: gio-2.0 glib-2.0 goa-1.0 json-glib-1.0 libsoup-2.4 rest-1.0
+ Libs: -L${libdir} -lgfbgraph-${apiversion}
+ Cflags: -I${includedir}/gfbgraph-@API_VERSION@
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/gfbgraph/gfbgraph_0.2.4.bb b/meta-openembedded/meta-gnome/recipes-gnome/gfbgraph/gfbgraph_0.2.4.bb
index 1c5d90f..23b3bf6 100644
--- a/meta-openembedded/meta-gnome/recipes-gnome/gfbgraph/gfbgraph_0.2.4.bb
+++ b/meta-openembedded/meta-gnome/recipes-gnome/gfbgraph/gfbgraph_0.2.4.bb
@@ -10,8 +10,9 @@
     gnome-online-accounts \
 "
 
-inherit gnomebase gtk-doc gobject-introspection
+inherit gnomebase gtk-doc gobject-introspection pkgconfig
 
+SRC_URI += " file://0001-Update-rest-requirement-to-rest-1.0.patch"
 SRC_URI[archive.md5sum] = "c38af63e49f8fe8baad99537956b69ba"
 SRC_URI[archive.sha256sum] = "6065391f35e7335588cc6b0cc4c1abbce7341488573a654551264cb9793b9379"
 
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/gjs/gjs_1.58.8.bb b/meta-openembedded/meta-gnome/recipes-gnome/gjs/gjs_1.58.8.bb
index ccac08d..096e277 100644
--- a/meta-openembedded/meta-gnome/recipes-gnome/gjs/gjs_1.58.8.bb
+++ b/meta-openembedded/meta-gnome/recipes-gnome/gjs/gjs_1.58.8.bb
@@ -9,7 +9,7 @@
 
 DEPENDS = "mozjs gtk+3"
 
-inherit gnomebase gsettings gobject-introspection vala gettext features_check upstream-version-is-even
+inherit gnomebase gsettings gobject-introspection vala gettext features_check upstream-version-is-even pkgconfig
 
 SRC_URI[archive.sha256sum] = "7fb3eb746c17363d9ee47f4a5d0bb048f0075611763eb0da11d85e0e57aff381"
 SRC_URI += "file://0001-Disable-tests-on-host.patch \
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/gnome-calendar/files/8be361b6ce8f0f8053e1609decbdbdc164ec8448.patch b/meta-openembedded/meta-gnome/recipes-gnome/gnome-calendar/files/8be361b6ce8f0f8053e1609decbdbdc164ec8448.patch
deleted file mode 100644
index eabf61a..0000000
--- a/meta-openembedded/meta-gnome/recipes-gnome/gnome-calendar/files/8be361b6ce8f0f8053e1609decbdbdc164ec8448.patch
+++ /dev/null
@@ -1,242 +0,0 @@
-From 8be361b6ce8f0f8053e1609decbdbdc164ec8448 Mon Sep 17 00:00:00 2001
-From: Evangelos Ribeiro Tzaras <devrtz@fortysixandtwo.eu>
-Date: Sat, 5 Sep 2020 02:06:34 +0200
-Subject: [PATCH] project: Switch to libhandy-1
-
-This commit updates the dependencies for libhandy to the tagged 1.0
-release and changes the code to accomodate the changes from
-libhandy-0 to libhandy-1.
-
-Notable changes:
-edit-dialog: HdyDialog has been dropped in [1]
-alarm-row: action child type in HdyActionRow has been removed.
-
-[1] https://gitlab.gnome.org/GNOME/libhandy/-/merge_requests/434
-Upstream-Status: Backport
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- build-aux/flatpak/org.gnome.Calendar.json |  4 ++--
- meson.build                               |  2 +-
- src/gui/gcal-alarm-row.c                  |  2 +-
- src/gui/gcal-alarm-row.ui                 |  2 +-
- src/gui/gcal-application.c                |  4 ++++
- src/gui/gcal-edit-dialog.c                |  4 ++--
- src/gui/gcal-edit-dialog.h                |  3 +--
- src/gui/gcal-edit-dialog.ui               | 20 ++++++++++----------
- 8 files changed, 22 insertions(+), 19 deletions(-)
-
-diff --git a/build-aux/flatpak/org.gnome.Calendar.json b/build-aux/flatpak/org.gnome.Calendar.json
-index 18893ad6..0772ca8d 100644
---- a/build-aux/flatpak/org.gnome.Calendar.json
-+++ b/build-aux/flatpak/org.gnome.Calendar.json
-@@ -174,8 +174,8 @@
-             "sources" : [
-                 {
-                     "type" : "git",
--                    "url" : "https://source.puri.sm/Librem5/libhandy.git",
--                    "branch" : "libhandy-0-0"
-+                    "url" : "https://gitlab.gnome.org/GNOME/libhandy.git",
-+                    "tag" : "1.0.0"
-                 }
-             ]
-         },
-diff --git a/meson.build b/meson.build
-index 2a546252..b81b95c9 100644
---- a/meson.build
-+++ b/meson.build
-@@ -165,7 +165,7 @@ libedataserver_dep = dependency('libedataserver-1.2', version: '>= 3.17.1')
- libecal_dep = dependency('libecal-2.0', version: '>= 3.33.2')
- libsoup_dep = dependency('libsoup-2.4')
- libdazzle_dep = dependency('libdazzle-1.0', version: '>= 3.33.1')
--libhandy_dep = dependency('libhandy-0.0', version: '>= 0.0.9')
-+libhandy_dep = dependency('libhandy-1', version: '>= 1.0.0')
- glib_dep = dependency('glib-2.0', version: '>= 2.58.0')
- gtk_dep = dependency('gtk+-3.0', version: '>= 3.22.20')
- gio_dep = dependency('gio-2.0', version: '>= 2.58.0')
-diff --git a/src/gui/gcal-alarm-row.c b/src/gui/gcal-alarm-row.c
-index 1f95426c..1ada82f4 100644
---- a/src/gui/gcal-alarm-row.c
-+++ b/src/gui/gcal-alarm-row.c
-@@ -214,7 +214,7 @@ setup_alarm (GcalAlarmRow *self)
-   duration = e_cal_component_alarm_trigger_get_duration (trigger);
-   formatted_duration = format_alarm_duration (duration);
- 
--  hdy_action_row_set_title (HDY_ACTION_ROW (self), formatted_duration);
-+  hdy_preferences_row_set_title (HDY_PREFERENCES_ROW (self), formatted_duration);
- 
-   action = e_cal_component_alarm_get_action (self->alarm);
-   gtk_toggle_button_set_active (self->volume_button, action == E_CAL_COMPONENT_ALARM_AUDIO);
-diff --git a/src/gui/gcal-alarm-row.ui b/src/gui/gcal-alarm-row.ui
-index 7d416c4c..bca8af50 100644
---- a/src/gui/gcal-alarm-row.ui
-+++ b/src/gui/gcal-alarm-row.ui
-@@ -3,7 +3,7 @@
-   <template class="GcalAlarmRow" parent="HdyActionRow">
-     <property name="visible">True</property>
-     <property name="can_focus">False</property>
--    <child type="action">
-+    <child>
-       <object class="GtkBox">
-         <property name="visible">True</property>
-         <property name="can_focus">False</property>
-diff --git a/src/gui/gcal-application.c b/src/gui/gcal-application.c
-index b9d46cec..591b95c8 100644
---- a/src/gui/gcal-application.c
-+++ b/src/gui/gcal-application.c
-@@ -34,6 +34,7 @@
- #include <glib-object.h>
- #include <gio/gio.h>
- #include <glib/gi18n.h>
-+#include <handy.h>
- 
- struct _GcalApplication
- {
-@@ -446,6 +447,9 @@ gcal_application_startup (GApplication *app)
-   if ((g_application_get_flags (app) & G_APPLICATION_IS_SERVICE) != 0)
-     g_application_set_inactivity_timeout (app, 3 * 60 * 1000);
- 
-+  /*  initialize libhandy */
-+  hdy_init();
-+
-   GCAL_EXIT;
- }
- 
-diff --git a/src/gui/gcal-edit-dialog.c b/src/gui/gcal-edit-dialog.c
-index ae2b6714..5494a700 100644
---- a/src/gui/gcal-edit-dialog.c
-+++ b/src/gui/gcal-edit-dialog.c
-@@ -47,7 +47,7 @@
- 
- struct _GcalEditDialog
- {
--  HdyDialog         parent;
-+  GtkDialog         parent;
- 
-   gboolean          writable;
- 
-@@ -133,7 +133,7 @@ static void          on_location_entry_changed_cb                (GtkEntry
- static void          on_add_alarm_button_clicked_cb              (GtkWidget          *button,
-                                                                   GcalEditDialog     *self);
- 
--G_DEFINE_TYPE (GcalEditDialog, gcal_edit_dialog, HDY_TYPE_DIALOG)
-+G_DEFINE_TYPE (GcalEditDialog, gcal_edit_dialog, GTK_TYPE_DIALOG)
- 
- enum
- {
-diff --git a/src/gui/gcal-edit-dialog.h b/src/gui/gcal-edit-dialog.h
-index e4f44ec5..a557916b 100644
---- a/src/gui/gcal-edit-dialog.h
-+++ b/src/gui/gcal-edit-dialog.h
-@@ -22,7 +22,6 @@
- #include "gcal-event.h"
- #include "gcal-manager.h"
- 
--#include <handy.h>
- 
- G_BEGIN_DECLS
- 
-@@ -32,7 +31,7 @@ G_BEGIN_DECLS
- 
- #define GCAL_TYPE_EDIT_DIALOG                (gcal_edit_dialog_get_type ())
- 
--G_DECLARE_FINAL_TYPE (GcalEditDialog, gcal_edit_dialog, GCAL, EDIT_DIALOG, HdyDialog);
-+G_DECLARE_FINAL_TYPE (GcalEditDialog, gcal_edit_dialog, GCAL, EDIT_DIALOG, GtkDialog);
- 
- GtkWidget*           gcal_edit_dialog_new                     (void);
- 
-diff --git a/src/gui/gcal-edit-dialog.ui b/src/gui/gcal-edit-dialog.ui
-index a36d8ae6..c28c22bb 100644
---- a/src/gui/gcal-edit-dialog.ui
-+++ b/src/gui/gcal-edit-dialog.ui
-@@ -1,6 +1,6 @@
- <?xml version="1.0" encoding="UTF-8"?>
- <interface>
--  <template class="GcalEditDialog" parent="HdyDialog">
-+  <template class="GcalEditDialog" parent="GtkDialog">
-     <property name="can_focus">False</property>
-     <property name="resizable">False</property>
-     <property name="modal">True</property>
-@@ -156,7 +156,7 @@
-                         <property name="title" translatable="yes">Title</property>
-                         <property name="activatable-widget">summary_entry</property>
- 
--                        <child type="action">
-+                        <child>
-                           <object class="GtkEntry" id="summary_entry">
-                             <property name="visible">True</property>
-                             <property name="valign">center</property>
-@@ -177,7 +177,7 @@
-                         <property name="title" translatable="yes">Location</property>
-                         <property name="activatable-widget">location_entry</property>
- 
--                        <child type="action">
-+                        <child>
-                           <object class="GtkEntry" id="location_entry">
-                             <property name="visible">True</property>
-                             <property name="valign">center</property>
-@@ -226,7 +226,7 @@
-                         <property name="title" translatable="yes">All Day</property>
-                         <property name="activatable-widget">all_day_switch</property>
- 
--                        <child type="action">
-+                        <child>
-                           <object class="GtkSwitch" id="all_day_switch">
-                             <property name="visible">True</property>
-                             <property name="can_focus">True</property>
-@@ -246,7 +246,7 @@
-                         <property name="visible">True</property>
-                         <property name="title" translatable="yes">Starts</property>
- 
--                        <child type="action">
-+                        <child>
-                           <object class="GtkLabel" id="event_start_label">
-                             <property name="visible">True</property>
-                             <property name="can_focus">False</property>
-@@ -294,7 +294,7 @@
-                         <property name="visible">True</property>
-                         <property name="title" translatable="yes">Ends</property>
- 
--                        <child type="action">
-+                        <child>
-                           <object class="GtkLabel" id="event_end_label">
-                             <property name="visible">True</property>
-                             <property name="can_focus">False</property>
-@@ -343,7 +343,7 @@
-                         <property name="title" translatable="yes">Repeat</property>
-                         <property name="activatable-widget">repeat_combo</property>
- 
--                        <child type="action">
-+                        <child>
-                           <object class="GtkComboBoxText" id="repeat_combo">
-                             <property name="visible">True</property>
-                             <property name="can_focus">False</property>
-@@ -372,7 +372,7 @@
-                         <property name="title" translatable="yes">End Repeat</property>
-                         <property name="activatable-widget">repeat_combo</property>
- 
--                        <child type="action">
-+                        <child>
-                           <object class="GtkComboBoxText" id="repeat_duration_combo">
-                             <property name="visible">True</property>
-                             <property name="can_focus">False</property>
-@@ -397,7 +397,7 @@
-                         <property name="title" translatable="yes">Number of Occurrences</property>
-                         <property name="activatable-widget">number_of_occurrences_spin</property>
- 
--                        <child type="action">
-+                        <child>
-                           <object class = "GtkSpinButton" id="number_of_occurrences_spin">
-                             <property name="input_purpose">number</property>
-                             <property name="input-hints">no-emoji</property>
-@@ -415,7 +415,7 @@
-                         <property name="title" translatable="yes">End Repeat Date</property>
-                         <property name="activatable-widget">until_date_selector</property>
- 
--                        <child type="action">
-+                        <child>
-                           <object class = "GcalDateSelector" id="until_date_selector">
-                             <property name="valign">center</property>
-                           </object>
--- 
-GitLab
-
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/gnome-calendar/gnome-calendar_3.38.1.bb b/meta-openembedded/meta-gnome/recipes-gnome/gnome-calendar/gnome-calendar_3.38.1.bb
deleted file mode 100644
index e703ec6..0000000
--- a/meta-openembedded/meta-gnome/recipes-gnome/gnome-calendar/gnome-calendar_3.38.1.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-SUMMARY = "GNOME calendar"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=8f0e2cd40e05189ec81232da84bd6e1a"
-
-SECTION = "x11/gnome"
-
-DEPENDS = " \
-    gtk+3 \
-    libical \
-    gsettings-desktop-schemas \
-    evolution-data-server \
-    libsoup-2.4 \
-    libdazzle \
-    libhandy \
-    libgweather \
-    geoclue \
-"
-
-GNOMEBASEBUILDCLASS = "meson"
-
-inherit gnomebase gsettings gtk-icon-cache gettext features_check upstream-version-is-even
-
-REQUIRED_DISTRO_FEATURES = "x11"
-
-SRC_URI += "file://8be361b6ce8f0f8053e1609decbdbdc164ec8448.patch"
-SRC_URI[archive.sha256sum] = "7280880a082d631624d02a102dd547ceb59498da368311f3e49a06cff897f512"
-
-FILES:${PN} += " \
-    ${datadir}/gnome-shell \
-    ${datadir}/metainfo \
-    ${datadir}/dbus-1 \
-"
-
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/gnome-calendar/gnome-calendar_41.0.bb b/meta-openembedded/meta-gnome/recipes-gnome/gnome-calendar/gnome-calendar_41.0.bb
new file mode 100644
index 0000000..4b9b14a
--- /dev/null
+++ b/meta-openembedded/meta-gnome/recipes-gnome/gnome-calendar/gnome-calendar_41.0.bb
@@ -0,0 +1,32 @@
+SUMMARY = "GNOME calendar"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8f0e2cd40e05189ec81232da84bd6e1a"
+
+SECTION = "x11/gnome"
+
+DEPENDS = " \
+    gtk+3 \
+    libical \
+    gsettings-desktop-schemas \
+    evolution-data-server \
+    libsoup-2.4 \
+    libdazzle \
+    libhandy \
+    libgweather \
+    geoclue \
+"
+
+GNOMEBASEBUILDCLASS = "meson"
+
+inherit gnomebase gsettings gtk-icon-cache gettext features_check upstream-version-is-even mime-xdg
+
+REQUIRED_DISTRO_FEATURES = "x11"
+
+SRC_URI[archive.sha256sum] = "73ac923c6618bd0957d6b7c012a00a47bff67ee934249358817433772ceb193f"
+
+FILES:${PN} += " \
+    ${datadir}/gnome-shell \
+    ${datadir}/metainfo \
+    ${datadir}/dbus-1 \
+"
+
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/gnome-online-accounts/files/0001-Use-GUri-instead-of-SoupURI.patch b/meta-openembedded/meta-gnome/recipes-gnome/gnome-online-accounts/files/0001-Use-GUri-instead-of-SoupURI.patch
new file mode 100644
index 0000000..11fc96b
--- /dev/null
+++ b/meta-openembedded/meta-gnome/recipes-gnome/gnome-online-accounts/files/0001-Use-GUri-instead-of-SoupURI.patch
@@ -0,0 +1,351 @@
+From 5a5abbedb171986dbf6f5a37577ec6afa892b66b Mon Sep 17 00:00:00 2001
+From: Carlos Garcia Campos <cgarcia@igalia.com>
+Date: Mon, 7 Jun 2021 16:31:18 +0200
+Subject: [PATCH 1/2] Use GUri instead of SoupURI
+
+In preparation for libsoup3 where SoupURI has been removed in favor of
+GUri.
+
+Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/gnome-online-accounts/-/merge_requests/73]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac                         |   2 +-
+ src/goabackend/goaoauth2provider.c   |  11 +--
+ src/goabackend/goaoauthprovider.c    |   8 +-
+ src/goabackend/goaowncloudprovider.c | 107 ++++++++++++++++-----------
+ src/goabackend/goawebview.c          |   9 +--
+ 5 files changed, 80 insertions(+), 57 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 1f88bbd..7c0b39d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -90,7 +90,7 @@ GTK_DOC_CHECK([1.3])
+ # Libraries
+ #
+ 
+-PKG_CHECK_MODULES(GLIB, [glib-2.0 gio-2.0 gio-unix-2.0 >= 2.52])
++PKG_CHECK_MODULES(GLIB, [glib-2.0 gio-2.0 gio-unix-2.0 >= 2.67.4])
+ AC_SUBST(GLIB_CFLAGS)
+ AC_SUBST(GLIB_LIBS)
+ 
+diff --git a/src/goabackend/goaoauth2provider.c b/src/goabackend/goaoauth2provider.c
+index 3715431..2757838 100644
+--- a/src/goabackend/goaoauth2provider.c
++++ b/src/goabackend/goaoauth2provider.c
+@@ -763,7 +763,7 @@ on_web_view_decide_policy (WebKitWebView            *web_view,
+   GHashTable *key_value_pairs;
+   WebKitNavigationAction *action;
+   WebKitURIRequest *request;
+-  SoupURI *uri;
++  GUri *uri;
+   const gchar *fragment;
+   const gchar *oauth2_error;
+   const gchar *query;
+@@ -793,9 +793,9 @@ on_web_view_decide_policy (WebKitWebView            *web_view,
+   if (!g_str_has_prefix (requested_uri, redirect_uri))
+     goto default_behaviour;
+ 
+-  uri = soup_uri_new (requested_uri);
+-  fragment = soup_uri_get_fragment (uri);
+-  query = soup_uri_get_query (uri);
++  uri = g_uri_parse (requested_uri, G_URI_FLAGS_ENCODED, NULL);
++  fragment = g_uri_get_fragment (uri);
++  query = g_uri_get_query (uri);
+ 
+   /* Three cases:
+    * 1) we can either have the backend handle the URI for us, or
+@@ -808,7 +808,7 @@ on_web_view_decide_policy (WebKitWebView            *web_view,
+     {
+       gchar *url;
+ 
+-      url = soup_uri_to_string (uri, FALSE);
++      url = g_uri_to_string (uri);
+       if (!goa_oauth2_provider_process_redirect_url (self, url, &priv->access_token, &priv->error))
+         {
+           g_prefix_error (&priv->error, _("Authorization response: "));
+@@ -889,6 +889,7 @@ on_web_view_decide_policy (WebKitWebView            *web_view,
+   goto ignore_request;
+ 
+  ignore_request:
++  g_uri_unref (uri);
+   g_assert (response_id != GTK_RESPONSE_NONE);
+   if (response_id < 0)
+     gtk_dialog_response (priv->dialog, response_id);
+diff --git a/src/goabackend/goaoauthprovider.c b/src/goabackend/goaoauthprovider.c
+index 0bfab6b..ff0927e 100644
+--- a/src/goabackend/goaoauthprovider.c
++++ b/src/goabackend/goaoauthprovider.c
+@@ -643,7 +643,7 @@ on_web_view_decide_policy (WebKitWebView            *web_view,
+ {
+   GHashTable *key_value_pairs;
+   IdentifyData *data = user_data;
+-  SoupURI *uri;
++  GUri *uri;
+   WebKitNavigationAction *action;
+   WebKitURIRequest *request;
+   const gchar *query;
+@@ -664,8 +664,8 @@ on_web_view_decide_policy (WebKitWebView            *web_view,
+   if (!g_str_has_prefix (requested_uri, redirect_uri))
+     goto default_behaviour;
+ 
+-  uri = soup_uri_new (requested_uri);
+-  query = soup_uri_get_query (uri);
++  uri = g_uri_parse (requested_uri, G_URI_FLAGS_ENCODED, NULL);
++  query = g_uri_get_query (uri);
+ 
+   if (query != NULL)
+     {
+@@ -678,6 +678,8 @@ on_web_view_decide_policy (WebKitWebView            *web_view,
+       g_hash_table_unref (key_value_pairs);
+     }
+ 
++  g_uri_unref (uri);
++
+   if (data->oauth_verifier != NULL)
+     goto ignore_request;
+ 
+diff --git a/src/goabackend/goaowncloudprovider.c b/src/goabackend/goaowncloudprovider.c
+index d142966..10734be 100644
+--- a/src/goabackend/goaowncloudprovider.c
++++ b/src/goabackend/goaowncloudprovider.c
+@@ -22,8 +22,6 @@
+ 
+ #include <glib/gi18n-lib.h>
+ 
+-#include <libsoup/soup.h>
+-
+ #include "goahttpclient.h"
+ #include "goaprovider.h"
+ #include "goaowncloudprovider.h"
+@@ -78,45 +76,42 @@ get_provider_features (GoaProvider *provider)
+ /* ---------------------------------------------------------------------------------------------------- */
+ 
+ static char *
+-uri_to_string_with_path (SoupURI *soup_uri, const gchar *path)
++uri_to_string_with_path (GUri *uri, const gchar *path)
+ {
+   gchar *uri_string;
+   gchar *uri_tmp;
+ 
+-  if (soup_uri == NULL)
++  if (uri == NULL)
+     return NULL;
+ 
+-  uri_tmp = soup_uri_to_string (soup_uri, FALSE);
++  uri_tmp = g_uri_to_string (uri);
+   uri_string = g_strconcat (uri_tmp, path, NULL);
+   g_free (uri_tmp);
+ 
+   return uri_string;
+ }
+ 
+-static char *get_webdav_uri (SoupURI *soup_uri)
++static char *get_webdav_uri (GUri *uri)
+ {
+-  SoupURI *uri_tmp;
++  GUri *uri_tmp;
+   gchar *uri_webdav;
+   const gchar *scheme;
+-  guint port;
+ 
+-  if (soup_uri == NULL)
++  if (uri == NULL)
+     return NULL;
+ 
+-  scheme = soup_uri_get_scheme (soup_uri);
+-  port = soup_uri_get_port (soup_uri);
+-  uri_tmp = soup_uri_copy (soup_uri);
+-
+-  if (g_strcmp0 (scheme, SOUP_URI_SCHEME_HTTPS) == 0)
+-    soup_uri_set_scheme (uri_tmp, "davs");
+-  else
+-    soup_uri_set_scheme (uri_tmp, "dav");
+-
+-  if (!soup_uri_uses_default_port (soup_uri))
+-    soup_uri_set_port (uri_tmp, port);
++  scheme = g_uri_get_scheme (uri);
++  uri_tmp = g_uri_build (g_uri_get_flags (uri),
++                         g_strcmp0 (scheme, "https") == 0 ? "davs" : "dav",
++                         g_uri_get_userinfo (uri),
++                         g_uri_get_host (uri),
++                         g_uri_get_port (uri),
++                         g_uri_get_path (uri),
++                         g_uri_get_query (uri),
++                         g_uri_get_fragment (uri));
+ 
+   uri_webdav = uri_to_string_with_path (uri_tmp, WEBDAV_ENDPOINT);
+-  soup_uri_free (uri_tmp);
++  g_uri_unref (uri_tmp);
+ 
+   return uri_webdav;
+ }
+@@ -140,7 +135,7 @@ build_object (GoaProvider         *provider,
+   gchar *uri_carddav;
+   gchar *uri_webdav;
+   GoaPasswordBased *password_based = NULL;
+-  SoupURI *uri = NULL;
++  GUri *uri = NULL;
+   gboolean accept_ssl_errors;
+   gboolean calendar_enabled;
+   gboolean contacts_enabled;
+@@ -176,9 +171,24 @@ build_object (GoaProvider         *provider,
+   account = goa_object_get_account (GOA_OBJECT (object));
+   identity = goa_account_get_identity (account);
+   uri_string = g_key_file_get_string (key_file, group, "Uri", NULL);
+-  uri = soup_uri_new (uri_string);
++  uri = g_uri_parse (uri_string, G_URI_FLAGS_ENCODED, NULL);
+   if (uri != NULL)
+-    soup_uri_set_user (uri, identity);
++    {
++      GUri *tmp_uri;
++
++      tmp_uri = g_uri_build_with_user (g_uri_get_flags (uri),
++                                       g_uri_get_scheme (uri),
++                                       identity,
++                                       g_uri_get_password (uri),
++                                       g_uri_get_auth_params (uri),
++                                       g_uri_get_host (uri),
++                                       g_uri_get_port (uri),
++                                       g_uri_get_path (uri),
++                                       g_uri_get_query (uri),
++                                       g_uri_get_fragment (uri));
++      g_uri_unref (uri);
++      uri = tmp_uri;
++    }
+ 
+   accept_ssl_errors = g_key_file_get_boolean (key_file, group, "AcceptSslErrors", NULL);
+ 
+@@ -224,7 +234,7 @@ build_object (GoaProvider         *provider,
+ 
+  out:
+   g_clear_object (&password_based);
+-  g_clear_pointer (&uri, soup_uri_free);
++  g_clear_pointer (&uri, g_uri_unref);
+   g_free (uri_string);
+   return ret;
+ }
+@@ -354,8 +364,11 @@ add_entry (GtkWidget     *grid,
+ static gchar *
+ normalize_uri (const gchar *address, gchar **server)
+ {
+-  SoupURI *uri = NULL;
++  GUri *uri = NULL;
++  GUri *uri_tmp = NULL;
+   const gchar *path;
++  const gchar *new_scheme;
++  gchar *new_path = NULL;
+   gchar *ret = NULL;
+   gchar *scheme = NULL;
+   gchar *uri_string = NULL;
+@@ -384,48 +397,56 @@ normalize_uri (const gchar *address, gchar **server)
+   else
+     goto out;
+ 
+-  uri = soup_uri_new (uri_string);
++  uri = g_uri_parse (uri_string, G_URI_FLAGS_ENCODED, NULL);
+   if (uri == NULL)
+     goto out;
+ 
+   if (g_strcmp0 (scheme, "dav") == 0)
+-    soup_uri_set_scheme (uri, SOUP_URI_SCHEME_HTTP);
++    new_scheme = "http";
+   else if (g_strcmp0 (scheme, "davs") == 0)
+-    soup_uri_set_scheme (uri, SOUP_URI_SCHEME_HTTPS);
++    new_scheme = "https";
++  else
++    new_scheme = g_uri_get_scheme (uri);
+ 
+-  path = soup_uri_get_path (uri);
++  path = g_uri_get_path (uri);
+   if (!g_str_has_suffix (path, "/"))
+-    {
+-      gchar *new_path;
+-
+       new_path = g_strconcat (path, "/", NULL);
+-      soup_uri_set_path (uri, new_path);
+-      path = soup_uri_get_path (uri);
+-      g_free (new_path);
+-    }
++
++  uri_tmp = g_uri_build (g_uri_get_flags (uri),
++                         new_scheme,
++                         g_uri_get_userinfo (uri),
++                         g_uri_get_host (uri),
++                         g_uri_get_port (uri),
++                         new_path ? new_path : path,
++                         g_uri_get_query (uri),
++                         g_uri_get_fragment (uri));
++  g_free (new_path);
++  g_uri_unref (uri);
++  uri = uri_tmp;
++  path = g_uri_get_path (uri);
+ 
+   if (server != NULL)
+     {
+       gchar *port_string;
+       gchar *pretty_path;
+-      guint port;
++      gint port;
+ 
+-      port = soup_uri_get_port (uri);
+-      port_string = g_strdup_printf (":%u", port);
++      port = g_uri_get_port (uri);
++      port_string = g_strdup_printf (":%d", port);
+ 
+       pretty_path = g_strdup (path);
+       pretty_path[strlen(pretty_path) - 1] = '\0';
+ 
+-      *server = g_strconcat (soup_uri_get_host (uri), (port == std_port) ? "" : port_string, pretty_path, NULL);
++      *server = g_strconcat (g_uri_get_host (uri), (port == std_port || port == -1) ? "" : port_string, pretty_path, NULL);
+ 
+       g_free (port_string);
+       g_free (pretty_path);
+     }
+ 
+-  ret = soup_uri_to_string (uri, FALSE);
++  ret = g_uri_to_string (uri);
+ 
+  out:
+-  g_clear_pointer (&uri, soup_uri_free);
++  g_clear_pointer (&uri, g_uri_unref);
+   g_free (scheme);
+   g_free (uri_string);
+   return ret;
+diff --git a/src/goabackend/goawebview.c b/src/goabackend/goawebview.c
+index 2438e0c..3df600e 100644
+--- a/src/goabackend/goawebview.c
++++ b/src/goabackend/goawebview.c
+@@ -25,7 +25,6 @@
+ #include <glib.h>
+ #include <glib/gi18n-lib.h>
+ #include <jsc/jsc.h>
+-#include <libsoup/soup.h>
+ #include <webkit2/webkit2.h>
+ 
+ #include "goawebview.h"
+@@ -77,17 +76,17 @@ web_view_clear_notify_progress_cb (gpointer user_data)
+ static char *
+ web_view_create_loading_title (const gchar *url)
+ {
+-  SoupURI *uri;
++  GUri *uri;
+   const gchar *hostname;
+   gchar *title;
+ 
+   g_return_val_if_fail (url != NULL && url[0] != '\0', NULL);
+ 
+-  uri = soup_uri_new (url);
+-  hostname = soup_uri_get_host (uri);
++  uri = g_uri_parse (url, G_URI_FLAGS_NONE, NULL);
++  hostname = g_uri_get_host (uri);
+   /* translators: %s here is the address of the web page */
+   title = g_strdup_printf (_("Loading “%s”…"), hostname);
+-  soup_uri_free (uri);
++  g_uri_unref (uri);
+ 
+   return title;
+ }
+-- 
+2.33.1
+
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/gnome-online-accounts/files/0002-Port-to-libsoup3.patch b/meta-openembedded/meta-gnome/recipes-gnome/gnome-online-accounts/files/0002-Port-to-libsoup3.patch
new file mode 100644
index 0000000..0f95908
--- /dev/null
+++ b/meta-openembedded/meta-gnome/recipes-gnome/gnome-online-accounts/files/0002-Port-to-libsoup3.patch
@@ -0,0 +1,841 @@
+From 7d8c5208d095ce8e7123935263ef7a02f0381ae5 Mon Sep 17 00:00:00 2001
+From: Carlos Garcia Campos <cgarcia@igalia.com>
+Date: Mon, 7 Jun 2021 18:28:42 +0200
+Subject: [PATCH 2/2] Port to libsoup3
+
+Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/gnome-online-accounts/-/merge_requests/73]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac                       |   8 +-
+ src/daemon/goadaemon.c             |   2 +-
+ src/goabackend/goaewsclient.c      | 178 +++++++++++++++--------------
+ src/goabackend/goahttpclient.c     |  72 +++++++-----
+ src/goabackend/goalastfmprovider.c |  24 ++--
+ src/goabackend/goaoauth2provider.c |   6 +-
+ src/goabackend/goaoauthprovider.c  |  23 ++--
+ src/goabackend/goarestproxy.h      |   2 -
+ src/goabackend/goasouplogger.c     |  33 ++----
+ src/goabackend/goasouplogger.h     |   3 -
+ src/goabackend/goautils.c          |  27 ++---
+ 11 files changed, 199 insertions(+), 179 deletions(-)
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -113,15 +113,15 @@ if test "$enable_backend" != "no"; then
+   AC_SUBST(GTK_CFLAGS)
+   AC_SUBST(GTK_LIBS)
+ 
+-  PKG_CHECK_MODULES(JAVASCRIPT_CORE_GTK, [javascriptcoregtk-4.0 >= 2.12.0])
++  PKG_CHECK_MODULES(JAVASCRIPT_CORE_GTK, [javascriptcoregtk-4.1 >= 2.33.1])
+   AC_SUBST(JAVASCRIPT_CORE_GTK_CFLAGS)
+   AC_SUBST(JAVASCRIPT_CORE_GTK_LIBS)
+ 
+-  PKG_CHECK_MODULES(WEBKIT_GTK, [webkit2gtk-4.0 >= 2.26.0])
++  PKG_CHECK_MODULES(WEBKIT_GTK, [webkit2gtk-4.1 >= 2.33.1])
+   AC_SUBST(WEBKIT_GTK_CFLAGS)
+   AC_SUBST(WEBKIT_GTK_LIBS)
+ 
+-  PKG_CHECK_MODULES(LIBSOUP, [libsoup-2.4 >= 2.42])
++  PKG_CHECK_MODULES(LIBSOUP, [libsoup-3.0 >= 2.99.8])
+   AC_SUBST(LIBSOUP_CFLAGS)
+   AC_SUBST(LIBSOUP_LIBS)
+ 
+@@ -129,7 +129,7 @@ if test "$enable_backend" != "no"; then
+   AC_SUBST(JSON_GLIB_CFLAGS)
+   AC_SUBST(JSON_GLIB_LIBS)
+ 
+-  PKG_CHECK_MODULES(REST, [rest-0.7])
++  PKG_CHECK_MODULES(REST, [rest-1.0])
+   AC_SUBST(REST_CFLAGS)
+   AC_SUBST(REST_LIBS)
+ 
+--- a/src/daemon/goadaemon.c
++++ b/src/daemon/goadaemon.c
+@@ -1496,7 +1496,7 @@ is_authorization_error (GError *error)
+   g_return_val_if_fail (error != NULL, FALSE);
+ 
+   ret = FALSE;
+-  if (error->domain == REST_PROXY_ERROR || error->domain == SOUP_HTTP_ERROR)
++  if (error->domain == REST_PROXY_ERROR)
+     {
+       if (SOUP_STATUS_IS_CLIENT_ERROR (error->code))
+         ret = TRUE;
+--- a/src/goabackend/goaewsclient.c
++++ b/src/goabackend/goaewsclient.c
+@@ -63,6 +63,12 @@ goa_ews_client_new (void)
+ 
+ typedef struct
+ {
++  gchar *password;
++  gchar *username;
++} AutodiscoverAuthData;
++
++typedef struct
++{
+   GCancellable *cancellable;
+   GError *error;
+   SoupMessage *msgs[2];
+@@ -71,13 +77,16 @@ typedef struct
+   guint pending;
+   gulong cancellable_id;
+   xmlOutputBuffer *buf;
++  AutodiscoverAuthData *auth;
+ } AutodiscoverData;
+ 
+-typedef struct
++static void
++ews_client_autodiscover_auth_data_free (AutodiscoverAuthData *auth)
+ {
+-  gchar *password;
+-  gchar *username;
+-} AutodiscoverAuthData;
++  g_free (auth->password);
++  g_free (auth->username);
++  g_slice_free (AutodiscoverAuthData, auth);
++}
+ 
+ static void
+ ews_client_autodiscover_data_free (gpointer user_data)
+@@ -92,22 +101,12 @@ ews_client_autodiscover_data_free (gpoin
+ 
+   g_clear_error (&data->error);
+ 
+-  /* soup_session_queue_message stole the references to data->msgs */
+   xmlOutputBufferClose (data->buf);
++  g_clear_pointer (&data->auth, ews_client_autodiscover_auth_data_free);
+   g_object_unref (data->session);
+   g_slice_free (AutodiscoverData, data);
+ }
+ 
+-static void
+-ews_client_autodiscover_auth_data_free (gpointer data, GClosure *closure)
+-{
+-  AutodiscoverAuthData *auth = data;
+-
+-  g_free (auth->password);
+-  g_free (auth->username);
+-  g_slice_free (AutodiscoverAuthData, auth);
+-}
+-
+ static gboolean
+ ews_client_check_node (const xmlNode *node, const gchar *name)
+ {
+@@ -115,9 +114,8 @@ ews_client_check_node (const xmlNode *no
+   return node->type == XML_ELEMENT_NODE && !g_strcmp0 ((gchar *) node->name, name);
+ }
+ 
+-static void
+-ews_client_authenticate (SoupSession *session,
+-                         SoupMessage *msg,
++static gboolean
++ews_client_authenticate (SoupMessage *msg,
+                          SoupAuth *auth,
+                          gboolean retrying,
+                          gpointer user_data)
+@@ -125,26 +123,26 @@ ews_client_authenticate (SoupSession *se
+   AutodiscoverAuthData *data = user_data;
+ 
+   if (retrying)
+-    return;
++    return FALSE;
+ 
+   soup_auth_authenticate (auth, data->username, data->password);
++  return TRUE;
+ }
+ 
+-static void
+-ews_client_request_started (SoupSession *session, SoupMessage *msg, SoupSocket *socket, gpointer user_data)
++static gboolean
++ews_client_accept_certificate (SoupMessage *msg, GTlsCertificate *cert, GTlsCertificateFlags cert_flags, gpointer user_data)
+ {
+   AutodiscoverData *data;
+   GTask *task = G_TASK (user_data);
+-  GTlsCertificateFlags cert_flags;
+ 
+-  g_debug ("goa_ews_client_autodiscover(): request started (%p)", msg);
++  g_debug ("goa_ews_client_autodiscover(): accept certificate for request (%p)", msg);
+ 
+   data = (AutodiscoverData *) g_task_get_task_data (task);
+ 
+-  if (!data->accept_ssl_errors
+-      && soup_message_get_https_status (msg, NULL, &cert_flags)
+-      && cert_flags != 0
+-      && data->error == NULL)
++  if (data->accept_ssl_errors || cert_flags == 0)
++    return TRUE;
++
++  if (data->error == NULL)
+     {
+       goa_utils_set_error_ssl (&data->error, cert_flags);
+ 
+@@ -153,6 +151,8 @@ ews_client_request_started (SoupSession
+        */
+       soup_session_abort (data->session);
+     }
++
++  return FALSE;
+ }
+ 
+ static void
+@@ -192,8 +192,10 @@ ews_client_autodiscover_parse_protocol (
+ }
+ 
+ static void
+-ews_client_autodiscover_response_cb (SoupSession *session, SoupMessage *msg, gpointer user_data)
++ews_client_autodiscover_response_cb (SoupSession *session, GAsyncResult *result, gpointer user_data)
+ {
++  SoupMessage *msg;
++  GBytes *body;
+   GError *error = NULL;
+   AutodiscoverData *data;
+   GTask *task = G_TASK (user_data);
+@@ -204,7 +206,11 @@ ews_client_autodiscover_response_cb (Sou
+   xmlDoc *doc;
+   xmlNode *node;
+ 
+-  g_debug ("goa_ews_client_autodiscover(): response (%p, %u)", msg, msg->status_code);
++  msg = soup_session_get_async_result_message (session, result);
++
++  g_debug ("goa_ews_client_autodiscover(): response (%p, %u)", msg, soup_message_get_status (msg));
++
++  body = soup_session_send_and_read_finish (session, result, &error);
+ 
+   data = (AutodiscoverData *) g_task_get_task_data (task);
+   size = sizeof (data->msgs) / sizeof (data->msgs[0]);
+@@ -215,16 +221,19 @@ ews_client_autodiscover_response_cb (Sou
+         break;
+     }
+   if (idx == size || data->pending == 0)
+-    return;
++    {
++      g_bytes_unref (body);
++      g_clear_object (&error);
++      g_object_unref (msg);
++      return;
++    }
+ 
+   data->msgs[idx] = NULL;
+-  status = msg->status_code;
+-
+-  /* status == SOUP_STATUS_CANCELLED, if we are being aborted by the
++  /* G_IO_ERROR_CANCELLED, if we are being aborted by the
+    * GCancellable, an SSL error or another message that was
+    * successful.
+    */
+-  if (status == SOUP_STATUS_CANCELLED)
++  if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
+     {
+       /* If we are being aborted by the GCancellable, then the
+        * GTask is responsible for setting the GError automatically.
+@@ -235,21 +244,23 @@ ews_client_autodiscover_response_cb (Sou
+        */
+       goto out;
+     }
+-  else if (status != SOUP_STATUS_OK)
++
++  status = soup_message_get_status (msg);
++  if (status != SOUP_STATUS_OK || error)
+     {
+-      g_warning ("goa_ews_client_autodiscover() failed: %u — %s", msg->status_code, msg->reason_phrase);
++      g_warning ("goa_ews_client_autodiscover() failed: %u — %s", status, soup_message_get_reason_phrase (msg));
+       g_return_if_fail (data->error == NULL);
+ 
+-      goa_utils_set_error_soup (&error, msg);
++      if (!error)
++        goa_utils_set_error_soup (&error, msg);
+       goto out;
+     }
+ 
+-  soup_buffer_free (soup_message_body_flatten (SOUP_MESSAGE (msg)->response_body));
+   g_debug ("The response headers");
+   g_debug ("===================");
+-  g_debug ("%s", SOUP_MESSAGE (msg)->response_body->data);
++  g_debug ("%s", (char *)g_bytes_get_data (body, NULL));
+ 
+-  doc = xmlReadMemory (msg->response_body->data, msg->response_body->length, "autodiscover.xml", NULL, 0);
++  doc = xmlReadMemory (g_bytes_get_data (body, NULL), g_bytes_get_size (body), "autodiscover.xml", NULL, 0);
+   if (doc == NULL)
+     {
+       g_set_error (&error,
+@@ -333,7 +344,7 @@ ews_client_autodiscover_response_cb (Sou
+           /* The callback (ie. this function) will be invoked after we
+            * have returned to the main loop.
+            */
+-          soup_session_cancel_message (data->session, data->msgs[idx], SOUP_STATUS_CANCELLED);
++          g_cancellable_cancel (data->cancellable);
+         }
+     }
+ 
+@@ -368,6 +379,7 @@ ews_client_autodiscover_response_cb (Sou
+ 
+   g_clear_error (&error);
+   g_object_unref (task);
++  g_object_unref (msg);
+ }
+ 
+ static xmlDoc *
+@@ -399,52 +411,54 @@ static void
+ ews_client_post_restarted_cb (SoupMessage *msg, gpointer data)
+ {
+   xmlOutputBuffer *buf = data;
++  GBytes *body;
+ 
+   /* In violation of RFC2616, libsoup will change a POST request to
+    * a GET on receiving a 302 redirect.
+    */
+   g_debug ("Working around libsoup bug with redirect");
+-  g_object_set (msg, SOUP_MESSAGE_METHOD, "POST", NULL);
++  g_object_set (msg, "method", "POST", NULL);
+ 
+-  soup_message_set_request(msg,
+-                           "text/xml; charset=utf-8",
+-                           SOUP_MEMORY_COPY,
+ #ifdef LIBXML2_NEW_BUFFER
+-                           (gchar *) xmlOutputBufferGetContent(buf),
+-                           xmlOutputBufferGetSize(buf));
++  body = g_bytes_new (xmlOutputBufferGetContent (buf), xmlOutputBufferGetSize (buf));
+ #else
+-                           (gchar *) buf->buffer->content,
+-                           buf->buffer->use);
++  body = g_bytes_new (buf->buffer->content, buf->buffer->use);
+ #endif
++  soup_message_set_request_body_from_bytes (msg, "text/xml; charset=utf-8", body);
++  g_bytes_unref (body);
+ }
+ 
+ static SoupMessage *
+-ews_client_create_msg_for_url (const gchar *url, xmlOutputBuffer *buf)
++ews_client_create_msg_for_url (const gchar *url, xmlOutputBuffer *buf, AutodiscoverAuthData *auth, GTask *task)
+ {
+   SoupMessage *msg;
++  GBytes *body = NULL;
+ 
+   msg = soup_message_new (buf != NULL ? "POST" : "GET", url);
+-  soup_message_headers_append (msg->request_headers, "User-Agent", "libews/0.1");
++  soup_message_headers_append (soup_message_get_request_headers (msg),
++                               "User-Agent", "libews/0.1");
++
++  g_signal_connect (msg, "authenticate",
++                    G_CALLBACK (ews_client_authenticate),
++                    auth);
++  g_signal_connect (msg, "accept-certificate",
++                    G_CALLBACK (ews_client_accept_certificate),
++                    task);
+ 
+   if (buf != NULL)
+     {
+-      soup_message_set_request (msg,
+-                                "text/xml; charset=utf-8",
+-                                SOUP_MEMORY_COPY,
+ #ifdef LIBXML2_NEW_BUFFER
+-                                (gchar *) xmlOutputBufferGetContent(buf),
+-                                xmlOutputBufferGetSize(buf));
++      body = g_bytes_new (xmlOutputBufferGetContent (buf), xmlOutputBufferGetSize (buf));
+ #else
+-                                (gchar *) buf->buffer->content,
+-                                buf->buffer->use);
++      body = g_bytes_new (buf->buffer->content, buf->buffer->use);
+ #endif
++      soup_message_set_request_body_from_bytes (msg, "text/xml; charset=utf-8", body);
+       g_signal_connect (msg, "restarted", G_CALLBACK (ews_client_post_restarted_cb), buf);
+     }
+ 
+-  soup_buffer_free (soup_message_body_flatten (SOUP_MESSAGE (msg)->request_body));
+   g_debug ("The request headers");
+   g_debug ("===================");
+-  g_debug ("%s", SOUP_MESSAGE (msg)->request_body->data);
++  g_debug ("%s", body ? (char *)g_bytes_get_data (body, NULL) : "");
+ 
+   return msg;
+ }
+@@ -497,12 +511,15 @@ goa_ews_client_autodiscover (GoaEwsClien
+    * (successful) one win.
+    */
+ 
++  auth = g_slice_new0 (AutodiscoverAuthData);
++  auth->username = g_strdup (username);
++  auth->password = g_strdup (password);
++  data->auth = auth;
+   data->buf = buf;
+-  data->msgs[0] = ews_client_create_msg_for_url (url1, buf);
+-  data->msgs[1] = ews_client_create_msg_for_url (url2, buf);
++  data->msgs[0] = ews_client_create_msg_for_url (url1, buf, auth, task);
++  data->msgs[1] = ews_client_create_msg_for_url (url2, buf, auth, task);
+   data->pending = sizeof (data->msgs) / sizeof (data->msgs[0]);
+-  data->session = soup_session_new_with_options (SOUP_SESSION_SSL_STRICT, FALSE,
+-                                                 NULL);
++  data->session = soup_session_new ();
+   soup_session_add_feature_by_type (data->session, SOUP_TYPE_AUTH_NTLM);
+   data->accept_ssl_errors = accept_ssl_errors;
+ 
+@@ -515,26 +532,19 @@ goa_ews_client_autodiscover (GoaEwsClien
+                                                     NULL);
+     }
+ 
+-  auth = g_slice_new0 (AutodiscoverAuthData);
+-  auth->username = g_strdup (username);
+-  auth->password = g_strdup (password);
+-  g_signal_connect_data (data->session,
+-                         "authenticate",
+-                         G_CALLBACK (ews_client_authenticate),
+-                         auth,
+-                         ews_client_autodiscover_auth_data_free,
+-                         0);
+-
+-  g_signal_connect (data->session, "request-started", G_CALLBACK (ews_client_request_started), task);
+-
+-  soup_session_queue_message (data->session,
+-                              data->msgs[0],
+-                              ews_client_autodiscover_response_cb,
+-                              g_object_ref (task));
+-  soup_session_queue_message (data->session,
+-                              data->msgs[1],
+-                              ews_client_autodiscover_response_cb,
+-                              g_object_ref (task));
++
++  soup_session_send_and_read_async (data->session,
++                                    data->msgs[0],
++                                    G_PRIORITY_DEFAULT,
++                                    data->cancellable,
++                                    (GAsyncReadyCallback)ews_client_autodiscover_response_cb,
++                                    g_object_ref (task));
++  soup_session_send_and_read_async (data->session,
++                                    data->msgs[1],
++                                    G_PRIORITY_DEFAULT,
++                                    data->cancellable,
++                                    (GAsyncReadyCallback)ews_client_autodiscover_response_cb,
++                                    g_object_ref (task));
+ 
+   g_free (url2);
+   g_free (url1);
+--- a/src/goabackend/goahttpclient.c
++++ b/src/goabackend/goahttpclient.c
+@@ -82,7 +82,7 @@ http_client_check_data_free (gpointer us
+ 
+   g_clear_error (&data->error);
+ 
+-  /* soup_session_queue_message stole the references to data->msg */
++  g_object_unref (data->msg);
+   g_object_unref (data->session);
+   g_slice_free (CheckData, data);
+ }
+@@ -97,9 +97,8 @@ http_client_check_auth_data_free (gpoint
+   g_slice_free (CheckAuthData, auth);
+ }
+ 
+-static void
+-http_client_authenticate (SoupSession *session,
+-                         SoupMessage *msg,
++static gboolean
++http_client_authenticate (SoupMessage *msg,
+                          SoupAuth *auth,
+                          gboolean retrying,
+                          gpointer user_data)
+@@ -107,26 +106,26 @@ http_client_authenticate (SoupSession *s
+   CheckAuthData *data = user_data;
+ 
+   if (retrying)
+-    return;
++    return FALSE;
+ 
+   soup_auth_authenticate (auth, data->username, data->password);
++  return TRUE;
+ }
+ 
+-static void
+-http_client_request_started (SoupSession *session, SoupMessage *msg, SoupSocket *socket, gpointer user_data)
++static gboolean
++http_client_accept_certificate (SoupMessage *msg, GTlsCertificate *cert, GTlsCertificateFlags cert_flags, gpointer user_data)
+ {
+   CheckData *data;
+   GTask *task = G_TASK (user_data);
+-  GTlsCertificateFlags cert_flags;
+ 
+   g_debug ("goa_http_client_check(): request started (%p)", msg);
+ 
+   data = (CheckData *) g_task_get_task_data (task);
+ 
+-  if (!data->accept_ssl_errors
+-      && soup_message_get_https_status (msg, NULL, &cert_flags)
+-      && cert_flags != 0
+-      && data->error == NULL)
++  if (data->accept_ssl_errors || cert_flags == 0)
++    return TRUE;
++
++  if (data->error == NULL)
+     {
+       goa_utils_set_error_ssl (&data->error, cert_flags);
+ 
+@@ -135,6 +134,8 @@ http_client_request_started (SoupSession
+        */
+       soup_session_abort (data->session);
+     }
++
++  return FALSE;
+ }
+ 
+ static void
+@@ -154,21 +155,27 @@ http_client_check_cancelled_cb (GCancell
+ }
+ 
+ static void
+-http_client_check_response_cb (SoupSession *session, SoupMessage *msg, gpointer user_data)
++http_client_check_response_cb (SoupSession *session, GAsyncResult *result, gpointer user_data)
+ {
++  SoupMessage *msg;
+   CheckData *data;
+-  GCancellable *cancellable;
+   GTask *task = G_TASK (user_data);
++  guint status;
++  GBytes *body;
++  GError *error = NULL;
+ 
+-  g_debug ("goa_http_client_check(): response (%p, %u)", msg, msg->status_code);
++  msg = soup_session_get_async_result_message (session, result);
++
++  g_debug ("goa_http_client_check(): response (%p, %u)", msg, soup_message_get_status (msg));
++
++  body = soup_session_send_and_read_finish (session, result, &error);
+ 
+   data = (CheckData *) g_task_get_task_data (task);
+-  cancellable = g_task_get_cancellable (task);
+ 
+-  /* status == SOUP_STATUS_CANCELLED, if we are being aborted by the
++  /* G_IO_ERROR_CANCELLED, if we are being aborted by the
+    * GCancellable or due to an SSL error.
+    */
+-  if (msg->status_code == SOUP_STATUS_CANCELLED)
++  if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
+     {
+       /* If we are being aborted by the GCancellable then there might
+        * or might not be an error. The GCancellable can be triggered
+@@ -176,20 +183,27 @@ http_client_check_response_cb (SoupSessi
+        * of events across threads.
+        */
+       if (data->error == NULL)
+-        g_cancellable_set_error_if_cancelled (cancellable, &data->error);
++        g_propagate_error (&data->error, g_steal_pointer (&error));
+ 
+       goto out;
+     }
+-  else if (msg->status_code != SOUP_STATUS_OK)
++
++  status = soup_message_get_status (msg);
++  if (status != SOUP_STATUS_OK || error)
+     {
+-      g_warning ("goa_http_client_check() failed: %u — %s", msg->status_code, msg->reason_phrase);
++      g_warning ("goa_http_client_check() failed: %u — %s", status, soup_message_get_reason_phrase (msg));
+       g_return_if_fail (data->error == NULL);
+ 
+-      goa_utils_set_error_soup (&data->error, msg);
++      if (error)
++        g_propagate_error (&data->error, g_steal_pointer (&error));
++      else
++        goa_utils_set_error_soup (&data->error, msg);
+       goto out;
+     }
+ 
+  out:
++  g_clear_error (&error);
++  g_clear_pointer (&body, g_bytes_unref);
+   if (data->error != NULL)
+     g_task_return_error (task, g_steal_pointer (&data->error));
+   else
+@@ -225,7 +239,7 @@ goa_http_client_check (GoaHttpClient
+   data = g_slice_new0 (CheckData);
+   g_task_set_task_data (task, data, http_client_check_data_free);
+ 
+-  data->session = soup_session_new_with_options (SOUP_SESSION_SSL_STRICT, FALSE, NULL);
++  data->session = soup_session_new ();
+ 
+   logger = goa_soup_logger_new (SOUP_LOGGER_LOG_BODY, -1);
+   soup_session_add_feature (data->session, SOUP_SESSION_FEATURE (logger));
+@@ -246,15 +260,21 @@ goa_http_client_check (GoaHttpClient
+   auth = g_slice_new0 (CheckAuthData);
+   auth->username = g_strdup (username);
+   auth->password = g_strdup (password);
+-  g_signal_connect_data (data->session,
++  g_signal_connect_data (data->msg,
+                          "authenticate",
+                          G_CALLBACK (http_client_authenticate),
+                          auth,
+                          http_client_check_auth_data_free,
+                          0);
+ 
+-  g_signal_connect (data->session, "request-started", G_CALLBACK (http_client_request_started), task);
+-  soup_session_queue_message (data->session, data->msg, http_client_check_response_cb, g_object_ref (task));
++  g_signal_connect (data->msg, "accept-certificate", G_CALLBACK (http_client_accept_certificate), task);
++
++  soup_session_send_and_read_async (data->session,
++                                    data->msg,
++                                    G_PRIORITY_DEFAULT,
++                                    data->cancellable,
++                                    (GAsyncReadyCallback)http_client_check_response_cb,
++                                    g_object_ref (task));
+ 
+   g_object_unref (task);
+ }
+--- a/src/goabackend/goalastfmprovider.c
++++ b/src/goabackend/goalastfmprovider.c
+@@ -483,8 +483,7 @@ add_account_cb (GoaManager *manager, GAs
+ 
+ static void
+ check_cb (RestProxyCall *call,
+-          const GError *error,
+-          GObject *weak_object,
++          GAsyncResult *result,
+           gpointer user_data)
+ {
+   AddAccountData *data = user_data;
+@@ -494,6 +493,9 @@ check_cb (RestProxyCall *call,
+   JsonObject *session_obj;
+   const gchar *payload;
+ 
++  if (!rest_proxy_call_invoke_finish (call, result, &data->error))
++    goto out;
++
+   parser = NULL;
+ 
+   parser = json_parser_new ();
+@@ -562,12 +564,12 @@ on_rest_proxy_call_cancelled_cb (GCancel
+ }
+ 
+ static void
+-lastfm_login (GoaProvider                  *provider,
+-              const gchar                  *username,
+-              const gchar                  *password,
+-              GCancellable                 *cancellable,
+-              RestProxyCallAsyncCallback   callback,
+-              gpointer                     user_data)
++lastfm_login (GoaProvider          *provider,
++              const gchar          *username,
++              const gchar          *password,
++              GCancellable         *cancellable,
++              GAsyncReadyCallback   callback,
++              gpointer              user_data)
+ {
+   AddAccountData *data = user_data;
+   RestProxyCall *call;
+@@ -598,7 +600,7 @@ lastfm_login (GoaProvider
+   rest_proxy_call_add_param (call, "api_sig", sig_md5);
+   rest_proxy_call_add_param (call, "format", "json");
+ 
+-  rest_proxy_call_async (call, callback, NULL, data, &data->error);
++  rest_proxy_call_invoke_async (call, NULL, callback, data);
+ 
+   g_signal_connect (cancellable, "cancelled", G_CALLBACK (on_rest_proxy_call_cancelled_cb), call);
+ 
+@@ -665,7 +667,7 @@ add_account (GoaProvider    *provider,
+                 username,
+                 password,
+                 data.cancellable,
+-                (RestProxyCallAsyncCallback) check_cb,
++                (GAsyncReadyCallback) check_cb,
+                 &data);
+ 
+   gtk_widget_set_sensitive (data.connect_button, FALSE);
+@@ -819,7 +821,7 @@ refresh_account (GoaProvider    *provide
+                 username,
+                 password,
+                 data.cancellable,
+-                (RestProxyCallAsyncCallback) check_cb,
++                (GAsyncReadyCallback) check_cb,
+                 &data);
+   gtk_widget_set_sensitive (data.connect_button, FALSE);
+   gtk_widget_show (data.progress_grid);
+--- a/src/goabackend/goaoauth2provider.c
++++ b/src/goabackend/goaoauth2provider.c
+@@ -95,11 +95,15 @@ is_authorization_error (GError *error)
+   g_return_val_if_fail (error != NULL, FALSE);
+ 
+   ret = FALSE;
+-  if (error->domain == REST_PROXY_ERROR || error->domain == SOUP_HTTP_ERROR)
++  if (error->domain == REST_PROXY_ERROR)
+     {
+       if (SOUP_STATUS_IS_CLIENT_ERROR (error->code))
+         ret = TRUE;
+     }
++  else if (g_error_matches (error, GOA_ERROR, GOA_ERROR_NOT_AUTHORIZED))
++    {
++      ret = TRUE;
++    }
+   return ret;
+ }
+ 
+--- a/src/goabackend/goaoauthprovider.c
++++ b/src/goabackend/goaoauthprovider.c
+@@ -77,11 +77,15 @@ is_authorization_error (GError *error)
+   g_return_val_if_fail (error != NULL, FALSE);
+ 
+   ret = FALSE;
+-  if (error->domain == REST_PROXY_ERROR || error->domain == SOUP_HTTP_ERROR)
++  if (error->domain == REST_PROXY_ERROR)
+     {
+       if (SOUP_STATUS_IS_CLIENT_ERROR (error->code))
+         ret = TRUE;
+     }
++  else if (g_error_matches (error, GOA_ERROR, GOA_ERROR_NOT_AUTHORIZED))
++    {
++      ret = TRUE;
++    }
+   return ret;
+ }
+ 
+@@ -701,9 +705,15 @@ on_web_view_decide_policy (WebKitWebView
+ }
+ 
+ static void
+-rest_proxy_call_cb (RestProxyCall *call, const GError *error, GObject *weak_object, gpointer user_data)
++rest_proxy_call_cb (GObject *source, GAsyncResult *result, gpointer user_data)
+ {
++  RestProxyCall *call = REST_PROXY_CALL (source);
+   IdentifyData *data = user_data;
++
++  if (!rest_proxy_call_invoke_finish (call, result, &data->error))
++    {
++      g_prefix_error (&data->error, _("Error getting a Request Token: "));
++    }
+   g_main_loop_quit (data->loop);
+ }
+ 
+@@ -770,11 +780,7 @@ get_tokens_and_identity (GoaOAuthProvide
+       for (n = 0; request_params[n] != NULL; n += 2)
+         rest_proxy_call_add_param (call, request_params[n], request_params[n+1]);
+     }
+-  if (!rest_proxy_call_async (call, rest_proxy_call_cb, NULL, &data, &data.error))
+-    {
+-      g_prefix_error (&data.error, _("Error getting a Request Token: "));
+-      goto out;
+-    }
++  rest_proxy_call_invoke_async (call, NULL, rest_proxy_call_cb, &data);
+ 
+   goa_utils_set_dialog_title (GOA_PROVIDER (provider), dialog, add_account);
+ 
+@@ -796,6 +802,9 @@ get_tokens_and_identity (GoaOAuthProvide
+   g_main_loop_run (data.loop);
+   gtk_container_remove (GTK_CONTAINER (grid), spinner);
+ 
++  if (data.error)
++    goto out;
++
+   if (rest_proxy_call_get_status_code (call) != 200)
+     {
+       gchar *msg;
+--- a/src/goabackend/goarestproxy.h
++++ b/src/goabackend/goarestproxy.h
+@@ -27,8 +27,6 @@
+ 
+ G_BEGIN_DECLS
+ 
+-G_DEFINE_AUTOPTR_CLEANUP_FUNC (RestProxy, g_object_unref);
+-
+ #define GOA_TYPE_REST_PROXY (goa_rest_proxy_get_type ())
+ G_DECLARE_FINAL_TYPE (GoaRestProxy, goa_rest_proxy, GOA, REST_PROXY, RestProxy);
+ 
+--- a/src/goabackend/goasouplogger.c
++++ b/src/goabackend/goasouplogger.c
+@@ -22,15 +22,6 @@
+ 
+ #include "goasouplogger.h"
+ 
+-struct _GoaSoupLogger
+-{
+-  SoupLogger parent_instance;
+-};
+-
+-G_DEFINE_TYPE (GoaSoupLogger, goa_soup_logger, SOUP_TYPE_LOGGER);
+-
+-/* ---------------------------------------------------------------------------------------------------- */
+-
+ static void
+ goa_soup_logger_printer (SoupLogger         *logger,
+                          SoupLoggerLogLevel  level,
+@@ -45,24 +36,16 @@ goa_soup_logger_printer (SoupLogger
+   g_free (message);
+ }
+ 
+-/* ---------------------------------------------------------------------------------------------------- */
+-
+-static void
+-goa_soup_logger_init (GoaSoupLogger *self)
+-{
+-  soup_logger_set_printer (SOUP_LOGGER (self), goa_soup_logger_printer, NULL, NULL);
+-}
+-
+-static void
+-goa_soup_logger_class_init (GoaSoupLoggerClass *klass)
+-{
+-}
+-
+-/* ---------------------------------------------------------------------------------------------------- */
+-
+ SoupLogger *
+ goa_soup_logger_new (SoupLoggerLogLevel   level,
+                      gint                 max_body_size)
+ {
+-  return g_object_new (GOA_TYPE_SOUP_LOGGER, "level", level, "max-body-size", max_body_size, NULL);
++  SoupLogger *logger;
++
++  logger = soup_logger_new (level);
++  if (max_body_size != -1)
++    soup_logger_set_max_body_size (logger, max_body_size);
++  soup_logger_set_printer (logger, goa_soup_logger_printer, NULL, NULL);
++
++  return logger;
+ }
+--- a/src/goabackend/goasouplogger.h
++++ b/src/goabackend/goasouplogger.h
+@@ -27,9 +27,6 @@
+ 
+ G_BEGIN_DECLS
+ 
+-#define GOA_TYPE_SOUP_LOGGER (goa_soup_logger_get_type ())
+-G_DECLARE_FINAL_TYPE (GoaSoupLogger, goa_soup_logger, GOA, SOUP_LOGGER, SoupLogger);
+-
+ SoupLogger     *goa_soup_logger_new                (SoupLoggerLogLevel   level,
+                                                     gint                 max_body_size);
+ 
+--- a/src/goabackend/goautils.c
++++ b/src/goabackend/goautils.c
+@@ -841,29 +841,26 @@ goa_utils_set_error_soup (GError **err,
+ {
+   gchar *error_msg = NULL;
+   gint error_code = GOA_ERROR_FAILED; /* TODO: more specific */
++  guint status_code;
+ 
+-  switch (msg->status_code)
++  status_code = soup_message_get_status (msg);
++  switch (status_code)
+     {
+-    case SOUP_STATUS_CANT_RESOLVE:
+-      error_msg = g_strdup (_("Cannot resolve hostname"));
+-      break;
+-
+-    case SOUP_STATUS_CANT_RESOLVE_PROXY:
+-      error_msg = g_strdup (_("Cannot resolve proxy hostname"));
+-      break;
+-
+     case SOUP_STATUS_INTERNAL_SERVER_ERROR:
+     case SOUP_STATUS_NOT_FOUND:
+       error_msg = g_strdup (_("Cannot find WebDAV endpoint"));
+       break;
+ 
+-    case SOUP_STATUS_UNAUTHORIZED:
+-      error_msg = g_strdup (_("Authentication failed"));
+-      error_code = GOA_ERROR_NOT_AUTHORIZED;
+-      break;
+-
+     default:
+-      error_msg = g_strdup_printf (_("Code: %u — Unexpected response from server"), msg->status_code);
++      if (SOUP_STATUS_IS_CLIENT_ERROR (status_code))
++        {
++          error_msg = g_strdup (_("Authentication failed"));
++          error_code = GOA_ERROR_NOT_AUTHORIZED;
++        }
++      else
++        {
++          error_msg = g_strdup_printf (_("Code: %u — Unexpected response from server"), status_code);
++        }
+       break;
+     }
+ 
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/gnome-online-accounts/gnome-online-accounts_3.40.0.bb b/meta-openembedded/meta-gnome/recipes-gnome/gnome-online-accounts/gnome-online-accounts_3.40.0.bb
deleted file mode 100644
index c7e8eec..0000000
--- a/meta-openembedded/meta-gnome/recipes-gnome/gnome-online-accounts/gnome-online-accounts_3.40.0.bb
+++ /dev/null
@@ -1,34 +0,0 @@
-SUMMARY = "GNOME Online Accounts - Single sign-on framework for GNOME"
-LICENSE = "LGPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=34c88b124db5fb2762c1676be7dadd36"
-
-GNOMEBASEBUILDCLASS = "autotools"
-
-inherit gnomebase gsettings gobject-introspection gsettings gtk-doc vala gettext upstream-version-is-even features_check
-
-# for webkitgtk
-REQUIRED_DISTRO_FEATURES = "x11"
-
-DEPENDS = "glib-2.0"
-
-SRC_URI[archive.sha256sum] = "585c4f979f6f543b77bfdb4fb01eb18ba25c2aec5b7866c676d929616fb2c3fa"
-
-# backend is required for gnome-control-center
-PACKAGECONFIG = "backend other"
-
-PACKAGECONFIG[backend] = "--enable-backend,--disable-backend,gtk+3 webkitgtk libsoup-2.4 json-glib libsecret rest libxml2"
-PACKAGECONFIG[krb5] = "--enable-kerberos, --disable-kerberos , krb5 gcr"
-
-# no extra dependencies!
-PACKAGECONFIG[other] = " \
-    --enable-facebook  --enable-foursquare  --enable-exchange  --enable-flickr  --enable-google  --enable-imap-smtp  --enable-owncloud  --enable-windows-live,\
-    --disable-facebook --disable-foursquare --disable-exchange --disable-flickr --disable-google --disable-imap-smtp --disable-owncloud --disable-windows-live, \
-"
-
-FILES:${PN} += " \
-    ${datadir}/dbus-1 \
-    ${libdir}/goa-1.0/web-extensions/*.so \
-"
-
-# looked into pkg-config file: it is not a bug - they mean it
-FILES:${PN}-dev += "${libdir}/goa-1.0/include"
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/gnome-online-accounts/gnome-online-accounts_3.43.1.bb b/meta-openembedded/meta-gnome/recipes-gnome/gnome-online-accounts/gnome-online-accounts_3.43.1.bb
new file mode 100644
index 0000000..8580d29
--- /dev/null
+++ b/meta-openembedded/meta-gnome/recipes-gnome/gnome-online-accounts/gnome-online-accounts_3.43.1.bb
@@ -0,0 +1,38 @@
+SUMMARY = "GNOME Online Accounts - Single sign-on framework for GNOME"
+LICENSE = "LGPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=34c88b124db5fb2762c1676be7dadd36"
+
+GNOMEBASEBUILDCLASS = "autotools"
+
+inherit gnomebase gsettings gobject-introspection gsettings gtk-doc vala gettext features_check
+
+# for webkitgtk
+REQUIRED_DISTRO_FEATURES = "x11"
+
+DEPENDS = "glib-2.0"
+
+SRC_URI += "\
+    file://0001-Use-GUri-instead-of-SoupURI.patch \
+    file://0002-Port-to-libsoup3.patch \
+"
+SRC_URI[archive.sha256sum] = "3bcb3663a12efd4482d9fdda3e171676267fc739eb6440a2b7109a0e87afb7e8"
+
+# backend is required for gnome-control-center
+PACKAGECONFIG = "backend other"
+
+PACKAGECONFIG[backend] = "--enable-backend,--disable-backend,gtk+3 webkitgtk libsoup json-glib libsecret rest libxml2"
+PACKAGECONFIG[krb5] = "--enable-kerberos, --disable-kerberos , krb5 gcr"
+
+# no extra dependencies!
+PACKAGECONFIG[other] = " \
+    --enable-facebook  --enable-foursquare  --enable-exchange  --enable-flickr  --enable-google  --enable-imap-smtp  --enable-owncloud  --enable-windows-live,\
+    --disable-facebook --disable-foursquare --disable-exchange --disable-flickr --disable-google --disable-imap-smtp --disable-owncloud --disable-windows-live, \
+"
+
+FILES:${PN} += " \
+    ${datadir}/dbus-1 \
+    ${libdir}/goa-1.0/web-extensions/*.so \
+"
+
+# looked into pkg-config file: it is not a bug - they mean it
+FILES:${PN}-dev += "${libdir}/goa-1.0/include"
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/gnome-screenshot/gnome-screenshot_40.0.bb b/meta-openembedded/meta-gnome/recipes-gnome/gnome-screenshot/gnome-screenshot_40.0.bb
new file mode 100644
index 0000000..72272f9
--- /dev/null
+++ b/meta-openembedded/meta-gnome/recipes-gnome/gnome-screenshot/gnome-screenshot_40.0.bb
@@ -0,0 +1,22 @@
+SUMMARY = "GNOME Screenshot"
+DESCRIPTION = "GNOME Screenshot is a small utility that takes a screenshot \
+of the whole desktop, the currently focused window, or an area of the screen."
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
+
+SECTION = "x11/gnome"
+
+GNOMEBASEBUILDCLASS = "meson"
+
+inherit features_check gnomebase gettext upstream-version-is-even pkgconfig
+
+SRC_URI[archive.sha256sum] = "368ca95a39e39dc2406c849e8c4205e3f574acdd874c30741873455e3d21a5e2"
+
+DEPENDS += "glib-2.0 glib-2.0-native gtk+3 libhandy xext"
+
+REQUIRED_DISTRO_FEATURES = "x11"
+
+FILES:${PN} += " \
+    ${datadir}/dbus-1 \
+    ${datadir}/metainfo \
+"
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/libgweather/libgweather_3.36.2.bb b/meta-openembedded/meta-gnome/recipes-gnome/libgweather/libgweather_3.36.2.bb
deleted file mode 100644
index 69fe955..0000000
--- a/meta-openembedded/meta-gnome/recipes-gnome/libgweather/libgweather_3.36.2.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-SUMMARY = "A library to access weather information from online services"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-
-GNOMEBASEBUILDCLASS = "meson"
-
-inherit gnomebase gsettings gobject-introspection gettext gtk-doc vala features_check upstream-version-is-even
-
-SRC_URI[archive.md5sum] = "ff399cf89e97a3e574ae05db5617b96b"
-SRC_URI[archive.sha256sum] = "ee1201a8fc25c14e940d3b26db49a34947c8aebf67dee01ee67fbcb06ecb37a0"
-
-# gobject-introspection is mandatory and cannot be configured
-REQUIRED_DISTRO_FEATURES = "gobject-introspection-data"
-UNKNOWN_CONFIGURE_WHITELIST:append = " introspection"
-
-GTKDOC_MESON_OPTION = "gtk_doc"
-
-DEPENDS = " \
-    gtk+3 \
-    json-glib \
-    libsoup-2.4 \
-    geocode-glib \
-"
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/libgweather/libgweather_40.0.bb b/meta-openembedded/meta-gnome/recipes-gnome/libgweather/libgweather_40.0.bb
new file mode 100644
index 0000000..1d9daac
--- /dev/null
+++ b/meta-openembedded/meta-gnome/recipes-gnome/libgweather/libgweather_40.0.bb
@@ -0,0 +1,24 @@
+SUMMARY = "A library to access weather information from online services"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+GNOMEBASEBUILDCLASS = "meson"
+
+inherit gnomebase gsettings gobject-introspection gettext gtk-doc vala features_check upstream-version-is-even
+
+SRC_URI[archive.sha256sum] = "ca4e8f2a4baaa9fc6d75d8856adb57056ef1cd6e55c775ba878ae141b6276ee6"
+
+# gobject-introspection is mandatory and cannot be configured
+REQUIRED_DISTRO_FEATURES = "gobject-introspection-data"
+UNKNOWN_CONFIGURE_WHITELIST:append = " introspection"
+
+GTKDOC_MESON_OPTION = "gtk_doc"
+
+DEPENDS = " \
+    geocode-glib \
+    gtk+3 \
+    json-glib \
+    libsoup-2.4 \
+    python3-pygobject-native \
+"
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/mutter/mutter_3.34.6.bb b/meta-openembedded/meta-gnome/recipes-gnome/mutter/mutter_3.34.6.bb
index 72e7767..b659d92 100644
--- a/meta-openembedded/meta-gnome/recipes-gnome/mutter/mutter_3.34.6.bb
+++ b/meta-openembedded/meta-gnome/recipes-gnome/mutter/mutter_3.34.6.bb
@@ -73,7 +73,9 @@
     done
 }
 
-PACKAGES =+ "${PN}-tests"
+GSETTINGS_PACKAGE = "${PN}-gsettings"
+
+PACKAGES =+ "${PN}-tests ${PN}-gsettings"
 
 FILES:${PN} += " \
     ${datadir}/gnome-control-center \
@@ -93,5 +95,5 @@
     ${libdir}/${MUTTER_API_NAME}/lib*.so \
 "
 
-RDEPENDS:${PN} += "zenity"
+RDEPENDS:${PN} += "zenity ${PN}-gsettings"
 
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/rest/files/0001-Use-GUri-instead-of-SoupURI.patch b/meta-openembedded/meta-gnome/recipes-gnome/rest/files/0001-Use-GUri-instead-of-SoupURI.patch
new file mode 100644
index 0000000..37ba0a0
--- /dev/null
+++ b/meta-openembedded/meta-gnome/recipes-gnome/rest/files/0001-Use-GUri-instead-of-SoupURI.patch
@@ -0,0 +1,181 @@
+From d39fd6d5f4c0a63cc048b84b0f989cb83f31e5fe Mon Sep 17 00:00:00 2001
+From: Carlos Garcia Campos <cgarcia@igalia.com>
+Date: Tue, 8 Jun 2021 10:57:06 +0200
+Subject: [PATCH 1/2] Use GUri instead of SoupURI
+
+Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/librest/-/merge_requests/6]
+---
+ configure.ac               |  2 +-
+ rest-extras/flickr-proxy.c | 19 ++++++++++++++-----
+ rest/oauth-proxy-call.c    | 19 ++++++++++++++-----
+ rest/oauth2-proxy.c        | 22 +++++++++++-----------
+ 4 files changed, 40 insertions(+), 22 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index d15e592..d586e69 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -40,7 +40,7 @@ AM_PROG_CC_C_O
+ LT_PREREQ([2.2.6])
+ LT_INIT([disable-static])
+ 
+-PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.44)
++PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.67.4)
+ PKG_CHECK_MODULES(SOUP, libsoup-2.4 >= 2.42)
+ PKG_CHECK_MODULES(XML, libxml-2.0)
+ PKG_CHECK_MODULES(GTHREAD, gthread-2.0)
+diff --git a/rest-extras/flickr-proxy.c b/rest-extras/flickr-proxy.c
+index 3342a4d..7726359 100644
+--- a/rest-extras/flickr-proxy.c
++++ b/rest-extras/flickr-proxy.c
+@@ -304,13 +304,13 @@ flickr_proxy_build_login_url (FlickrProxy *proxy,
+                               const char  *frob,
+                               const char  *perms)
+ {
+-  SoupURI *uri;
++  GUri *uri;
+   GHashTable *params;
+   char *sig, *s;
++  char *query;
+ 
+   g_return_val_if_fail (FLICKR_IS_PROXY (proxy), NULL);
+ 
+-  uri = soup_uri_new ("http://flickr.com/services/auth/");
+   params = g_hash_table_new (g_str_hash, g_str_equal);
+ 
+   g_hash_table_insert (params, "api_key", proxy->priv->api_key);
+@@ -321,14 +321,23 @@ flickr_proxy_build_login_url (FlickrProxy *proxy,
+ 
+   sig = flickr_proxy_sign (proxy, params);
+   g_hash_table_insert (params, "api_sig", sig);
++  query = soup_form_encode_hash (params);
+ 
+-  soup_uri_set_query_from_form (uri, params);
++  uri = g_uri_build (G_URI_FLAGS_ENCODED,
++                     "http",
++                     NULL,
++                     "flickr.com",
++                     -1,
++                     "services/auth/",
++                     query,
++                     NULL);
+ 
+-  s = soup_uri_to_string (uri, FALSE);
++  s = g_uri_to_string (uri);
+ 
++  g_free (query);
+   g_free (sig);
+   g_hash_table_destroy (params);
+-  soup_uri_free (uri);
++  g_uri_unref (uri);
+ 
+   return s;
+ }
+diff --git a/rest/oauth-proxy-call.c b/rest/oauth-proxy-call.c
+index c90c69d..e238c3c 100644
+--- a/rest/oauth-proxy-call.c
++++ b/rest/oauth-proxy-call.c
+@@ -30,7 +30,7 @@
+ 
+ G_DEFINE_TYPE (OAuthProxyCall, oauth_proxy_call, REST_TYPE_PROXY_CALL)
+ 
+-#define OAUTH_ENCODE_STRING(x_) (x_ ? soup_uri_encode( (x_), "!$&'()*+,;=@") : g_strdup (""))
++#define OAUTH_ENCODE_STRING(x_) (x_ ? g_uri_escape_string( (x_), NULL, TRUE) : g_strdup (""))
+ 
+ static char *
+ sign_plaintext (OAuthProxyPrivate *priv)
+@@ -136,15 +136,24 @@ sign_hmac (OAuthProxy *proxy, RestProxyCall *call, GHashTable *oauth_params)
+   if (priv->oauth_echo) {
+     g_string_append_uri_escaped (text, priv->service_url, NULL, FALSE);
+   } else if (priv->signature_host != NULL) {
+-    SoupURI *url = soup_uri_new (url_str);
++    GUri *url = g_uri_parse (url_str, G_URI_FLAGS_ENCODED, NULL);
++    GUri *new_url;
+     gchar *signing_url;
+ 
+-    soup_uri_set_host (url, priv->signature_host);
+-    signing_url = soup_uri_to_string (url, FALSE);
++    new_url = g_uri_build (g_uri_get_flags (url),
++                           g_uri_get_scheme (url),
++                           g_uri_get_userinfo (url),
++                           priv->signature_host,
++                           g_uri_get_port (url),
++                           g_uri_get_path (url),
++                           g_uri_get_query (url),
++                           g_uri_get_fragment (url));
++    signing_url = g_uri_to_string (new_url);
+ 
+     g_string_append_uri_escaped (text, signing_url, NULL, FALSE);
+ 
+-    soup_uri_free (url);
++    g_uri_unref (new_url);
++    g_uri_unref (url);
+     g_free (signing_url);
+   } else {
+     g_string_append_uri_escaped (text, url_str, NULL, FALSE);
+diff --git a/rest/oauth2-proxy.c b/rest/oauth2-proxy.c
+index 24e5da0..3382f8b 100644
+--- a/rest/oauth2-proxy.c
++++ b/rest/oauth2-proxy.c
+@@ -37,8 +37,6 @@ oauth2_proxy_error_quark (void)
+     return g_quark_from_static_string ("rest-oauth2-proxy");
+ }
+ 
+-#define EXTRA_CHARS_ENCODE "!$&'()*+,;=@"
+-
+ enum {
+   PROP_0,
+   PROP_CLIENT_ID,
+@@ -242,8 +240,8 @@ append_query_param (gpointer key, gpointer value, gpointer user_data)
+     char *encoded_val, *encoded_key;
+     char *param;
+ 
+-    encoded_val = soup_uri_encode (value, EXTRA_CHARS_ENCODE);
+-    encoded_key = soup_uri_encode (key, EXTRA_CHARS_ENCODE);
++    encoded_val = g_uri_escape_string (value, NULL, TRUE);
++    encoded_key = g_uri_escape_string (key, NULL, TRUE);
+ 
+     param = g_strdup_printf ("%s=%s", encoded_key, encoded_val);
+     g_free (encoded_key);
+@@ -295,8 +293,8 @@ oauth2_proxy_build_login_url_full (OAuth2Proxy *proxy,
+         g_hash_table_foreach (extra_params, append_query_param, params);
+     }
+ 
+-    encoded_uri = soup_uri_encode (redirect_uri, EXTRA_CHARS_ENCODE);
+-    encoded_id = soup_uri_encode (proxy->priv->client_id, EXTRA_CHARS_ENCODE);
++    encoded_uri = g_uri_escape_string (redirect_uri, NULL, TRUE);
++    encoded_id = g_uri_escape_string (proxy->priv->client_id, NULL, TRUE);
+ 
+     url = g_strdup_printf ("%s?client_id=%s&redirect_uri=%s&type=user_agent",
+                            proxy->priv->auth_endpoint, encoded_id,
+@@ -378,20 +376,22 @@ oauth2_proxy_extract_access_token (const char *url)
+ {
+   GHashTable *params;
+   char *token = NULL;
+-  SoupURI *soupuri = soup_uri_new (url);
++  const char *fragment;
++  GUri *uri = g_uri_parse (url, G_URI_FLAGS_ENCODED, NULL);
+ 
+-  if (soupuri->fragment != NULL) {
+-    params = soup_form_decode (soupuri->fragment);
++  fragment = g_uri_get_fragment (uri);
++  if (fragment != NULL) {
++    params = soup_form_decode (fragment);
+ 
+     if (params) {
+       char *encoded = g_hash_table_lookup (params, "access_token");
+       if (encoded)
+-        token = soup_uri_decode (encoded);
++        token = g_uri_unescape_string (encoded, NULL);
+ 
+       g_hash_table_destroy (params);
+     }
+   }
+-  soup_uri_free (soupuri);
++  g_uri_unref (uri);
+ 
+   return token;
+ }
+-- 
+2.33.1
+
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/rest/files/0002-Port-to-libsoup3.patch b/meta-openembedded/meta-gnome/recipes-gnome/rest/files/0002-Port-to-libsoup3.patch
new file mode 100644
index 0000000..eed522f
--- /dev/null
+++ b/meta-openembedded/meta-gnome/recipes-gnome/rest/files/0002-Port-to-libsoup3.patch
@@ -0,0 +1,1696 @@
+From 3dc630ae5b9dc6cda1ba318de2cd654aaba7b4a2 Mon Sep 17 00:00:00 2001
+From: Carlos Garcia Campos <cgarcia@igalia.com>
+Date: Tue, 8 Jun 2021 17:44:04 +0200
+Subject: [PATCH 2/2] Port to libsoup3
+
+Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/librest/-/merge_requests/6]
+---
+ configure.ac                |  39 ++++-
+ rest-extras.pc.in           |   2 +-
+ rest-extras/youtube-proxy.c | 110 +++++++++++---
+ rest.pc.in                  |   2 +-
+ rest/rest-private.h         |  22 ++-
+ rest/rest-proxy-auth.c      |  16 ++
+ rest/rest-proxy-call.c      | 296 +++++++++++++++++++++++++++++-------
+ rest/rest-proxy.c           | 209 ++++++++++++++++++++++---
+ tests/custom-serialize.c    |  18 +++
+ tests/proxy-continuous.c    |  37 ++++-
+ tests/proxy.c               |  63 +++++++-
+ tests/threaded.c            |  17 +++
+ 12 files changed, 719 insertions(+), 112 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index d586e69..75c02fe 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -20,12 +20,6 @@ AM_INIT_AUTOMAKE([1.11 foreign -Wno-portability no-define dist-xz])
+ 
+ AM_SILENT_RULES([yes])
+ 
+-API_MAJOR=1
+-API_MINOR=0
+-AC_SUBST([API_VERSION],[$API_MAJOR.$API_MINOR])
+-AC_SUBST([API_VERSION_AM],[$API_MAJOR\_$API_MINOR])
+-AC_DEFINE_UNQUOTED(API_VERSION, [$API_VERSION], [API version])
+-
+ AC_CANONICAL_HOST
+ 
+ AC_PROG_CC
+@@ -41,7 +35,6 @@ LT_PREREQ([2.2.6])
+ LT_INIT([disable-static])
+ 
+ PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.67.4)
+-PKG_CHECK_MODULES(SOUP, libsoup-2.4 >= 2.42)
+ PKG_CHECK_MODULES(XML, libxml-2.0)
+ PKG_CHECK_MODULES(GTHREAD, gthread-2.0)
+ 
+@@ -58,6 +51,37 @@ AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums])
+ localedir=${datadir}/locale
+ AC_SUBST(localedir)
+ 
++AC_MSG_CHECKING([for libsoup version to use])
++AC_ARG_WITH(soup,
++            [AC_HELP_STRING([--soup=2|3],
++                            [version of libsoup library to use (default: 2)])],
++            [case "$withval" in
++                2|3) ;;
++                *) AC_MSG_ERROR([invalid argument "$withval" for --with-soup]) ;;
++             esac],
++            [with_soup=2])
++AC_MSG_RESULT([$with_soup])
++
++API_MAJOR=1
++
++if test "$with_soup" = "2"; then
++    PKG_CHECK_MODULES(SOUP, libsoup-2.4 >= 2.42)
++    SOUP_API_VERSION=2.4
++    API_MINOR=0
++    AC_DEFINE([WITH_SOUP_2],[1],[Define if libsoup version used is 2])
++else
++    PKG_CHECK_MODULES(SOUP, libsoup-3.0 >= 2.99.8)
++    SOUP_API_VERSION=3.0
++    API_MINOR=1
++fi
++
++AM_CONDITIONAL([WITH_SOUP_2],[test "$with_soup" = "2"])
++AC_SUBST(SOUP_API_VERSION)
++
++AC_SUBST([API_VERSION],[$API_MAJOR.$API_MINOR])
++AC_SUBST([API_VERSION_AM],[$API_MAJOR\_$API_MINOR])
++AC_DEFINE_UNQUOTED(API_VERSION, [$API_VERSION], [API version])
++
+ dnl === Coverage report =======================================================
+ AC_PATH_PROG([GCOV], [lcov], [enable_gcov=no])
+ 
+@@ -130,6 +154,7 @@ echo "                 LibRest $VERSION"
+ echo "                 ================"
+ echo ""
+ echo "                   prefix:   ${prefix}"
++echo "          libsoup version:   ${with_soup}"
+ echo ""
+ echo "            Documentation:   ${enable_gtk_doc}"
+ echo "       Introspection data:   ${enable_introspection}"
+diff --git a/rest-extras.pc.in b/rest-extras.pc.in
+index 39f21bf..3723d6d 100644
+--- a/rest-extras.pc.in
++++ b/rest-extras.pc.in
+@@ -9,4 +9,4 @@ Description: RESTful web api query library
+ Version: @VERSION@
+ Libs: -L${libdir} -lrest-extras-${apiversion}
+ Cflags: -I${includedir}/rest-${apiversion}
+-Requires: glib-2.0 libsoup-2.4 libxml-2.0
++Requires: glib-2.0 libsoup-@SOUP_API_VERSION@ libxml-2.0
+diff --git a/rest-extras/youtube-proxy.c b/rest-extras/youtube-proxy.c
+index be0cf08..cd598f4 100644
+--- a/rest-extras/youtube-proxy.c
++++ b/rest-extras/youtube-proxy.c
+@@ -246,6 +246,9 @@ typedef struct {
+   GObject *weak_object;
+   gpointer user_data;
+   gsize uploaded;
++#ifndef WITH_SOUP_2
++  GCancellable *cancellable;
++#endif
+ } YoutubeProxyUploadClosure;
+ 
+ static void
+@@ -255,7 +258,11 @@ _upload_async_weak_notify_cb (gpointer *data,
+   YoutubeProxyUploadClosure *closure =
+     (YoutubeProxyUploadClosure *) data;
+ 
++#ifdef WITH_SOUP_2
+   _rest_proxy_cancel_message (REST_PROXY (closure->proxy), closure->message);
++#else
++  g_cancellable_cancel (closure->cancellable);
++#endif
+ }
+ 
+ static void
+@@ -267,6 +274,9 @@ _upload_async_closure_free (YoutubeProxyUploadClosure *closure)
+                          closure);
+ 
+   g_object_unref (closure->proxy);
++#ifndef WITH_SOUP_2
++  g_object_unref (closure->cancellable);
++#endif
+ 
+   g_slice_free (YoutubeProxyUploadClosure, closure);
+ }
+@@ -286,6 +296,9 @@ _upload_async_closure_new (YoutubeProxy *self,
+   closure->message = message;
+   closure->weak_object = weak_object;
+   closure->user_data = user_data;
++#ifndef WITH_SOUP_2
++  closure->cancellable = g_cancellable_new ();
++#endif
+ 
+   if (weak_object != NULL)
+     g_object_weak_ref (weak_object,
+@@ -295,41 +308,67 @@ _upload_async_closure_new (YoutubeProxy *self,
+ }
+ 
+ static void
+-_upload_completed_cb (SoupSession *session,
+-                      SoupMessage *message,
++_upload_completed_cb (SoupMessage *message,
++                      GBytes      *payload,
++                      GError      *error,
+                       gpointer     user_data)
+ {
+   YoutubeProxyUploadClosure *closure =
+     (YoutubeProxyUploadClosure *) user_data;
+-  GError *error = NULL;
++  gsize length;
++  gconstpointer data;
++  guint status_code;
++  const char *reason_phrase;
+ 
+   if (closure->callback == NULL)
+     return;
+ 
+-  if (message->status_code < 200 || message->status_code >= 300)
+-    error = g_error_new_literal (REST_PROXY_ERROR,
+-                                 message->status_code,
+-                                 message->reason_phrase);
+-
+-  closure->callback (closure->proxy, message->response_body->data,
+-                     message->request_body->length,
+-                     message->request_body->length,
++#ifdef WITH_SOUP_2
++  status_code = message->status_code;
++  reason_phrase = message->reason_phrase;
++#else
++  status_code = soup_message_get_status (message);
++  reason_phrase = soup_message_get_reason_phrase (message);
++#endif
++
++  if (status_code < 200 || status_code >= 300)
++    {
++      g_clear_error (&error);
++      error = g_error_new_literal (REST_PROXY_ERROR,
++                                   status_code,
++                                   reason_phrase);
++    }
++
++  data = g_bytes_get_data (payload, &length);
++  closure->callback (closure->proxy, data, length, length,
+                      error, closure->weak_object, closure->user_data);
++  g_bytes_unref (payload);
+ 
+   _upload_async_closure_free (closure);
+ }
+ 
+ static void
+ _message_wrote_data_cb (SoupMessage               *msg,
++#ifdef WITH_SOUP_2
+                         SoupBuffer                *chunk,
++#else
++                        gsize                      chunk_size,
++#endif
+                         YoutubeProxyUploadClosure *closure)
+ {
+-  closure->uploaded = closure->uploaded + chunk->length;
++#ifdef WITH_SOUP_2
++  gsize chunk_size = chunk->length;
++  goffset content_length = msg->request_body->length;
++#else
++  goffset content_length = soup_message_headers_get_content_length (soup_message_get_request_headers (msg));
++#endif
++
++  closure->uploaded = closure->uploaded + chunk_size;
+ 
+-  if (closure->uploaded < msg->request_body->length)
++  if (closure->uploaded < content_length)
+     closure->callback (closure->proxy,
+                        NULL,
+-                       msg->request_body->length,
++                       content_length,
+                        closure->uploaded,
+                        NULL,
+                        closure->weak_object,
+@@ -364,7 +403,12 @@ youtube_proxy_upload_async (YoutubeProxy              *self,
+   SoupMultipart *mp;
+   SoupMessage *message;
+   SoupMessageHeaders *part_headers;
++  SoupMessageHeaders *request_headers;
++#ifdef WITH_SOUP_2
+   SoupBuffer *sb;
++#else
++  GBytes *sb;
++#endif
+   gchar *content_type;
+   gchar *atom_xml;
+   GMappedFile *map;
+@@ -380,10 +424,17 @@ youtube_proxy_upload_async (YoutubeProxy              *self,
+ 
+   atom_xml = _construct_upload_atom_xml (fields, incomplete);
+ 
++#ifdef WITH_SOUP_2
+   sb = soup_buffer_new_with_owner (atom_xml,
+                                    strlen(atom_xml),
+                                    atom_xml,
+                                    (GDestroyNotify) g_free);
++#else
++  sb = g_bytes_new_with_free_func (atom_xml,
++                                   strlen (atom_xml),
++                                   (GDestroyNotify) g_free,
++                                   atom_xml);
++#endif
+ 
+   part_headers = soup_message_headers_new (SOUP_MESSAGE_HEADERS_MULTIPART);
+ 
+@@ -393,7 +444,11 @@ youtube_proxy_upload_async (YoutubeProxy              *self,
+ 
+   soup_multipart_append_part (mp, part_headers, sb);
+ 
++#ifdef WITH_SOUP_2
+   soup_buffer_free (sb);
++#else
++  g_bytes_unref (sb);
++#endif
+ 
+   content_type = g_content_type_guess (
+       filename,
+@@ -401,24 +456,37 @@ youtube_proxy_upload_async (YoutubeProxy              *self,
+       g_mapped_file_get_length (map),
+       NULL);
+ 
++#ifdef WITH_SOUP_2
+   sb = soup_buffer_new_with_owner (g_mapped_file_get_contents (map),
+                                    g_mapped_file_get_length (map),
+                                    map,
+                                    (GDestroyNotify) g_mapped_file_unref);
++#else
++  sb = g_bytes_new_with_free_func (g_mapped_file_get_contents (map),
++                                   g_mapped_file_get_length (map),
++                                   (GDestroyNotify) g_mapped_file_unref,
++                                   map);
++#endif
+ 
+   soup_message_headers_replace (part_headers, "Content-Type", content_type);
+ 
+   soup_multipart_append_part (mp, part_headers, sb);
+ 
++#ifdef WITH_SOUP_2
+   soup_buffer_free (sb);
+-
+   soup_message_headers_free (part_headers);
+-
+   message = soup_form_request_new_from_multipart (UPLOAD_URL, mp);
++  request_headers = message->request_headers;
++#else
++  g_bytes_unref (sb);
++  soup_message_headers_unref (part_headers);
++  message = soup_message_new_from_multipart (UPLOAD_URL, mp);
++  request_headers = soup_message_get_request_headers (message);
++#endif
+ 
+   soup_multipart_free (mp);
+ 
+-  _set_upload_headers (self, message->request_headers, filename);
++  _set_upload_headers (self, request_headers, filename);
+ 
+   closure = _upload_async_closure_new (self, callback, message, weak_object,
+                                        user_data);
+@@ -429,7 +497,13 @@ youtube_proxy_upload_async (YoutubeProxy              *self,
+                     closure);
+ 
+ 
+-  _rest_proxy_queue_message (REST_PROXY (self), message, _upload_completed_cb,
++  _rest_proxy_queue_message (REST_PROXY (self), message,
++#ifdef WITH_SOUP_2
++                             NULL,
++#else
++                             closure->cancellable,
++#endif
++                             _upload_completed_cb,
+                              closure);
+ 
+   return TRUE;
+diff --git a/rest.pc.in b/rest.pc.in
+index 94c384b..e6bae3e 100644
+--- a/rest.pc.in
++++ b/rest.pc.in
+@@ -9,4 +9,4 @@ Description: RESTful web api query library
+ Version: @VERSION@
+ Libs: -L${libdir} -lrest-${apiversion}
+ Cflags: -I${includedir}/rest-${apiversion}
+-Requires: glib-2.0 libsoup-2.4 libxml-2.0
++Requires: glib-2.0 libsoup-@SOUP_API_VERSION@ libxml-2.0
+diff --git a/rest/rest-private.h b/rest/rest-private.h
+index 9e91fa0..6e71322 100644
+--- a/rest/rest-private.h
++++ b/rest/rest-private.h
+@@ -31,6 +31,11 @@
+ 
+ G_BEGIN_DECLS
+ 
++typedef void (*RestMessageFinishedCallback) (SoupMessage *msg,
++                                             GBytes      *body,
++                                             GError      *error,
++                                             gpointer     user_data);
++
+ typedef enum
+ {
+   REST_DEBUG_XML_PARSER = 1 << 0,
+@@ -53,12 +58,23 @@ gboolean _rest_proxy_get_binding_required (RestProxy *proxy);
+ const gchar *_rest_proxy_get_bound_url (RestProxy *proxy);
+ void _rest_proxy_queue_message (RestProxy   *proxy,
+                                 SoupMessage *message,
+-                                SoupSessionCallback callback,
++                                GCancellable *cancellable,
++                                RestMessageFinishedCallback callback,
+                                 gpointer user_data);
+ void _rest_proxy_cancel_message (RestProxy   *proxy,
+                                  SoupMessage *message);
+-guint _rest_proxy_send_message (RestProxy   *proxy,
+-                                SoupMessage *message);
++GBytes *_rest_proxy_send_message (RestProxy    *proxy,
++                                  SoupMessage  *message,
++                                  GCancellable *cancellable,
++                                  GError      **error);
++void _rest_proxy_send_message_async (RestProxy          *proxy,
++                                     SoupMessage        *message,
++                                     GCancellable       *cancellable,
++                                     GAsyncReadyCallback callback,
++                                     gpointer            user_data);
++GInputStream *_rest_proxy_send_message_finish (RestProxy    *proxy,
++                                               GAsyncResult *result,
++                                               GError      **error);
+ 
+ RestXmlNode *_rest_xml_node_new (void);
+ void         _rest_xml_node_reverse_children_siblings (RestXmlNode *node);
+diff --git a/rest/rest-proxy-auth.c b/rest/rest-proxy-auth.c
+index b96e443..0b2ec9f 100644
+--- a/rest/rest-proxy-auth.c
++++ b/rest/rest-proxy-auth.c
+@@ -29,7 +29,9 @@
+ struct _RestProxyAuthPrivate {
+   /* used to hold state during async authentication */
+   RestProxy *proxy;
++#ifdef WITH_SOUP_2
+   SoupSession *session;
++#endif
+   SoupMessage *message;
+   SoupAuth *auth;
+   gboolean paused;
+@@ -43,7 +45,9 @@ rest_proxy_auth_dispose (GObject *object)
+   RestProxyAuthPrivate *priv = ((RestProxyAuth*)object)->priv;
+ 
+   g_clear_object (&priv->proxy);
++#ifdef WITH_SOUP_2
+   g_clear_object (&priv->session);
++#endif
+   g_clear_object (&priv->message);
+   g_clear_object (&priv->auth);
+ 
+@@ -73,13 +77,17 @@ rest_proxy_auth_new (RestProxy *proxy,
+   RestProxyAuth *rest_auth;
+ 
+   g_return_val_if_fail (REST_IS_PROXY (proxy), NULL);
++#ifdef WITH_SOUP_2
+   g_return_val_if_fail (SOUP_IS_SESSION (session), NULL);
++#endif
+   g_return_val_if_fail (SOUP_IS_MESSAGE (message), NULL);
+   g_return_val_if_fail (SOUP_IS_AUTH (soup_auth), NULL);
+ 
+   rest_auth = REST_PROXY_AUTH (g_object_new (REST_TYPE_PROXY_AUTH, NULL));
+   rest_auth->priv->proxy = g_object_ref(proxy);
++#ifdef WITH_SOUP_2
+   rest_auth->priv->session = g_object_ref(session);
++#endif
+   rest_auth->priv->message = g_object_ref(message);
+   rest_auth->priv->auth = g_object_ref(soup_auth);
+ 
+@@ -104,7 +112,9 @@ rest_proxy_auth_pause (RestProxyAuth *auth)
+       return;
+ 
+   auth->priv->paused = TRUE;
++#ifdef WITH_SOUP_2
+   soup_session_pause_message (auth->priv->session, auth->priv->message);
++#endif
+ }
+ 
+ /**
+@@ -128,7 +138,9 @@ rest_proxy_auth_unpause (RestProxyAuth *auth)
+   soup_auth_authenticate (auth->priv->auth, username, password);
+   g_free (username);
+   g_free (password);
++#ifdef WITH_SOUP_2
+   soup_session_unpause_message (auth->priv->session, auth->priv->message);
++#endif
+   auth->priv->paused = FALSE;
+ }
+ 
+@@ -146,7 +158,11 @@ rest_proxy_auth_cancel (RestProxyAuth *auth)
+ {
+   g_return_if_fail (REST_IS_PROXY_AUTH (auth));
+ 
++#ifdef WITH_SOUP_2
+   soup_session_cancel_message (auth->priv->session, auth->priv->message, SOUP_STATUS_CANCELLED);
++#else
++  soup_auth_cancel (auth->priv->auth);
++#endif
+ }
+ 
+ G_GNUC_INTERNAL gboolean rest_proxy_auth_is_paused (RestProxyAuth *auth)
+diff --git a/rest/rest-proxy-call.c b/rest/rest-proxy-call.c
+index 2ab722f..62b00da 100644
+--- a/rest/rest-proxy-call.c
++++ b/rest/rest-proxy-call.c
+@@ -20,12 +20,14 @@
+  *
+  */
+ 
++#include <config.h>
+ #include <rest/rest-proxy.h>
+ #include <rest/rest-proxy-call.h>
+ #include <rest/rest-params.h>
+ #include <libsoup/soup.h>
+ 
+ #include "rest-private.h"
++#include "rest-proxy-auth-private.h"
+ #include "rest-proxy-call-private.h"
+ 
+ 
+@@ -38,12 +40,15 @@ struct _RestProxyCallAsyncClosure {
+ };
+ typedef struct _RestProxyCallAsyncClosure RestProxyCallAsyncClosure;
+ 
++#define READ_BUFFER_SIZE 8192
++
+ struct _RestProxyCallContinuousClosure {
+   RestProxyCall *call;
+   RestProxyCallContinuousCallback callback;
+   GObject *weak_object;
+   gpointer userdata;
+   SoupMessage *message;
++  guchar buffer[READ_BUFFER_SIZE];
+ };
+ typedef struct _RestProxyCallContinuousClosure RestProxyCallContinuousClosure;
+ 
+@@ -70,8 +75,7 @@ struct _RestProxyCallPrivate {
+   gchar *url;
+ 
+   GHashTable *response_headers;
+-  goffset length;
+-  gchar *payload;
++  GBytes *payload;
+   guint status_code;
+   gchar *status_message;
+ 
+@@ -160,7 +164,7 @@ rest_proxy_call_finalize (GObject *object)
+   g_free (priv->method);
+   g_free (priv->function);
+ 
+-  g_free (priv->payload);
++  g_clear_pointer (&priv->payload, g_bytes_unref);
+   g_free (priv->status_message);
+ 
+   g_free (priv->url);
+@@ -546,14 +550,23 @@ _populate_headers_hash_table (const gchar *name,
+   g_hash_table_insert (headers, g_strdup (name), g_strdup (value));
+ }
+ 
++#ifdef WITH_SOUP_2
+ /* I apologise for this macro, but it saves typing ;-) */
+ #define error_helper(x) g_set_error_literal(error, REST_PROXY_ERROR, x, message->reason_phrase)
++#endif
+ static gboolean
+ _handle_error_from_message (SoupMessage *message, GError **error)
+ {
+-  if (message->status_code < 100)
++  guint status_code;
++  const char *reason_phrase;
++
++#ifdef WITH_SOUP_2
++  status_code = message->status_code;
++
++  if (status_code < 100)
+   {
+-    switch (message->status_code)
++    g_clear_error (error);
++    switch (status_code)
+     {
+       case SOUP_STATUS_CANCELLED:
+         error_helper (REST_PROXY_ERROR_CANCELLED);
+@@ -580,61 +593,84 @@ _handle_error_from_message (SoupMessage *message, GError **error)
+     }
+     return FALSE;
+   }
++  reason_phrase = message->reason_phrase;
++#else
++  status_code = soup_message_get_status (message);
++  reason_phrase = soup_message_get_reason_phrase (message);
++#endif
+ 
+-  if (message->status_code >= 200 && message->status_code < 300)
++  if (status_code >= 200 && status_code < 300)
+   {
+     return TRUE;
+   }
+ 
++  if (*error != NULL)
++    return FALSE;
++
+   /* If we are here we must be in some kind of HTTP error, lets try */
+   g_set_error_literal (error,
+                        REST_PROXY_ERROR,
+-                       message->status_code,
+-                       message->reason_phrase);
++                       status_code,
++                       reason_phrase);
+   return FALSE;
+ }
+ 
+ static gboolean
+-finish_call (RestProxyCall *call, SoupMessage *message, GError **error)
++finish_call (RestProxyCall *call, SoupMessage *message, GBytes *payload, GError **error)
+ {
+   RestProxyCallPrivate *priv = GET_PRIVATE (call);
++  SoupMessageHeaders *response_headers;
+ 
+   g_assert (call);
+   g_assert (message);
++  g_assert (payload);
++
++#ifdef WITH_SOUP_2
++  response_headers = message->response_headers;
++#else
++  response_headers = soup_message_get_response_headers (message);
++#endif
+ 
+   /* Convert the soup headers in to hash */
+   /* FIXME: Eeek..are you allowed duplicate headers? ... */
+   g_hash_table_remove_all (priv->response_headers);
+-  soup_message_headers_foreach (message->response_headers,
++  soup_message_headers_foreach (response_headers,
+       (SoupMessageHeadersForeachFunc)_populate_headers_hash_table,
+       priv->response_headers);
+ 
+-  priv->payload = g_memdup (message->response_body->data,
+-                            message->response_body->length + 1);
+-  priv->length = message->response_body->length;
++  priv->payload = payload;
+ 
++#ifdef WITH_SOUP_2
+   priv->status_code = message->status_code;
+   priv->status_message = g_strdup (message->reason_phrase);
++#else
++  priv->status_code = soup_message_get_status (message);
++  priv->status_message = g_strdup (soup_message_get_reason_phrase (message));
++#endif
+ 
+   return _handle_error_from_message (message, error);
+ }
+ 
+ static void
+-_continuous_call_message_completed_cb (SoupSession *session,
+-                                       SoupMessage *message,
+-                                       gpointer     userdata)
++_continuous_call_message_completed (SoupMessage *message,
++                                    GError      *error,
++                                    gpointer     userdata)
+ {
+   RestProxyCallContinuousClosure *closure;
+   RestProxyCall *call;
+   RestProxyCallPrivate *priv;
+-  GError *error = NULL;
+ 
+   closure = (RestProxyCallContinuousClosure *)userdata;
+   call = closure->call;
+   priv = GET_PRIVATE (call);
+ 
++#ifdef WITH_SOUP_2
+   priv->status_code = message->status_code;
+   priv->status_message = g_strdup (message->reason_phrase);
++#else
++  priv->status_code = soup_message_get_status (message);
++  priv->status_message = g_strdup (soup_message_get_reason_phrase (message));
++#endif
+ 
+   _handle_error_from_message (message, &error);
+ 
+@@ -657,6 +693,7 @@ _continuous_call_message_completed_cb (SoupSession *session,
+ 
+   priv->cur_call_closure = NULL;
+   g_object_unref (closure->call);
++  g_object_unref (message);
+   g_slice_free (RestProxyCallContinuousClosure, closure);
+ }
+ 
+@@ -715,6 +752,49 @@ set_url (RestProxyCall *call)
+   return TRUE;
+ }
+ 
++#ifndef WITH_SOUP_2
++static gboolean
++authenticate (RestProxyCall *call,
++              SoupAuth      *soup_auth,
++              gboolean       retrying,
++              SoupMessage   *message)
++{
++  RestProxyCallPrivate *priv = GET_PRIVATE (call);
++  RestProxyAuth *rest_auth;
++  gboolean try_auth;
++
++  rest_auth = rest_proxy_auth_new (priv->proxy, NULL, message, soup_auth);
++  g_signal_emit_by_name (priv->proxy, "authenticate", rest_auth, retrying, &try_auth);
++  if (try_auth && !rest_proxy_auth_is_paused (rest_auth)) {
++    char *username, *password;
++
++    g_object_get (priv->proxy, "username", &username, "password", &password, NULL);
++    soup_auth_authenticate (soup_auth, username, password);
++    g_free (username);
++    g_free (password);
++  }
++  g_object_unref (rest_auth);
++
++  return try_auth;
++}
++
++static gboolean
++accept_certificate (RestProxyCall        *call,
++                    GTlsCertificate      *tls_certificate,
++                    GTlsCertificateFlags *tls_errors,
++                    SoupMessage          *message)
++{
++        RestProxyCallPrivate *priv = GET_PRIVATE (call);
++        gboolean ssl_strict;
++
++        if (tls_errors == 0)
++                return TRUE;
++
++        g_object_get (priv->proxy, "ssl-strict", &ssl_strict, NULL);
++        return !ssl_strict;
++}
++#endif
++
+ static SoupMessage *
+ prepare_message (RestProxyCall *call, GError **error_out)
+ {
+@@ -722,6 +802,7 @@ prepare_message (RestProxyCall *call, GError **error_out)
+   RestProxyCallClass *call_class;
+   const gchar *user_agent;
+   SoupMessage *message;
++  SoupMessageHeaders *request_headers;
+   GError *error = NULL;
+ 
+   call_class = REST_PROXY_CALL_GET_CLASS (call);
+@@ -748,6 +829,9 @@ prepare_message (RestProxyCall *call, GError **error_out)
+     gchar *content;
+     gchar *content_type;
+     gsize content_len;
++#ifndef WITH_SOUP_2
++    GBytes *body;
++#endif
+ 
+     if (!call_class->serialize_params (call, &content_type,
+                                        &content, &content_len, &error))
+@@ -780,8 +864,14 @@ prepare_message (RestProxyCall *call, GError **error_out)
+                              "Could not parse URI");
+         return NULL;
+     }
++#ifdef WITH_SOUP_2
+     soup_message_set_request (message, content_type,
+                               SOUP_MEMORY_TAKE, content, content_len);
++#else
++    body = g_bytes_new_take (content, content_len);
++    soup_message_set_request_body_from_bytes (message, content_type, body);
++    g_bytes_unref (body);
++#endif
+ 
+     g_free (content_type);
+   } else if (rest_params_are_strings (priv->params)) {
+@@ -798,9 +888,15 @@ prepare_message (RestProxyCall *call, GError **error_out)
+ 
+     hash = rest_params_as_string_hash_table (priv->params);
+ 
++#ifdef WITH_SOUP_2
+     message = soup_form_request_new_from_hash (priv->method,
+                                                priv->url,
+                                                hash);
++#else
++    message = soup_message_new_from_encoded_form (priv->method,
++                                                  priv->url,
++                                                  soup_form_encode_hash (hash));
++#endif
+ 
+     g_hash_table_unref (hash);
+ 
+@@ -827,19 +923,28 @@ prepare_message (RestProxyCall *call, GError **error_out)
+       if (rest_param_is_string (param)) {
+         soup_multipart_append_form_string (mp, name, rest_param_get_content (param));
+       } else {
+-        SoupBuffer *sb;
+-
+-        sb = soup_buffer_new_with_owner (rest_param_get_content (param),
+-                                         rest_param_get_content_length (param),
+-                                         rest_param_ref (param),
+-                                         (GDestroyNotify)rest_param_unref);
++#ifdef WITH_SOUP_2
++        SoupBuffer *sb = soup_buffer_new_with_owner (rest_param_get_content (param),
++                                                     rest_param_get_content_length (param),
++                                                     rest_param_ref (param),
++                                                     (GDestroyNotify)rest_param_unref);
++#else
++        GBytes *sb = g_bytes_new_with_free_func (rest_param_get_content (param),
++                                                 rest_param_get_content_length (param),
++                                                 (GDestroyNotify)rest_param_unref,
++                                                 rest_param_ref (param));
++#endif
+ 
+         soup_multipart_append_form_file (mp, name,
+                                          rest_param_get_file_name (param),
+                                          rest_param_get_content_type (param),
+                                          sb);
+ 
++#ifdef WITH_SOUP_2
+         soup_buffer_free (sb);
++#else
++        g_bytes_unref (sb);
++#endif
+       }
+     }
+ 
+@@ -853,19 +958,36 @@ prepare_message (RestProxyCall *call, GError **error_out)
+         return NULL;
+     }
+ 
++#ifdef WITH_SOUP_2
+     message = soup_form_request_new_from_multipart (priv->url, mp);
++#else
++    message = soup_message_new_from_multipart (priv->url, mp);
++#endif
+ 
+     soup_multipart_free (mp);
+   }
+ 
++#ifdef WITH_SOUP_2
++  request_headers = message->request_headers;
++#else
++  request_headers = soup_message_get_request_headers (message);
++  g_signal_connect_swapped (message, "authenticate",
++                            G_CALLBACK (authenticate),
++                            call);
++  g_signal_connect_swapped (message, "accept-certificate",
++                            G_CALLBACK (accept_certificate),
++                            call);
++#endif
++
++
+   /* Set the user agent, if one was set in the proxy */
+   user_agent = rest_proxy_get_user_agent (priv->proxy);
+   if (user_agent) {
+-    soup_message_headers_append (message->request_headers, "User-Agent", user_agent);
++    soup_message_headers_append (request_headers, "User-Agent", user_agent);
+   }
+ 
+   /* Set the headers */
+-  g_hash_table_foreach (priv->headers, set_header, message->request_headers);
++  g_hash_table_foreach (priv->headers, set_header, request_headers);
+ 
+   return message;
+ }
+@@ -878,17 +1000,17 @@ _call_message_call_cancelled_cb (GCancellable  *cancellable,
+ }
+ 
+ static void
+-_call_message_call_completed_cb (SoupSession *session,
+-                                 SoupMessage *message,
++_call_message_call_completed_cb (SoupMessage *message,
++                                 GBytes      *payload,
++                                 GError      *error,
+                                  gpointer     user_data)
+ {
+   GTask *task = user_data;
+   RestProxyCall *call;
+-  GError *error = NULL;
+ 
+   call = REST_PROXY_CALL (g_task_get_source_object (task));
+ 
+-  finish_call (call, message, &error);
++  finish_call (call, message, payload, &error);
+ 
+   if (error != NULL)
+     g_task_return_error (task, error);
+@@ -938,6 +1060,7 @@ rest_proxy_call_invoke_async (RestProxyCall      *call,
+ 
+   _rest_proxy_queue_message (priv->proxy,
+                              message,
++                             priv->cancellable,
+                              _call_message_call_completed_cb,
+                              task);
+ }
+@@ -962,16 +1085,55 @@ rest_proxy_call_invoke_finish (RestProxyCall  *call,
+ }
+ 
+ static void
+-_continuous_call_message_got_chunk_cb (SoupMessage                    *msg,
+-                                       SoupBuffer                     *chunk,
+-                                       RestProxyCallContinuousClosure *closure)
++_continuous_call_read_cb (GObject      *source,
++                          GAsyncResult *result,
++                          gpointer      user_data)
+ {
++  GInputStream *stream = G_INPUT_STREAM (source);
++  RestProxyCallContinuousClosure *closure = user_data;
++  RestProxyCallPrivate *priv = GET_PRIVATE (closure->call);
++  gssize bytes_read;
++  GError *error = NULL;
++
++  bytes_read = g_input_stream_read_finish (stream, result, &error);
++  if (bytes_read <= 0)
++    {
++      _continuous_call_message_completed (closure->message, error, user_data);
++      return;
++    }
++
+   closure->callback (closure->call,
+-                     chunk->data,
+-                     chunk->length,
++                     (gconstpointer)closure->buffer,
++                     bytes_read,
+                      NULL,
+                      closure->weak_object,
+                      closure->userdata);
++
++  g_input_stream_read_async (stream, closure->buffer, READ_BUFFER_SIZE, G_PRIORITY_DEFAULT,
++                             priv->cancellable, _continuous_call_read_cb, closure);
++}
++
++static void
++_continuous_call_message_sent_cb (GObject      *source,
++                                  GAsyncResult *result,
++                                  gpointer      user_data)
++{
++  RestProxy *proxy = REST_PROXY (source);
++  RestProxyCallContinuousClosure *closure = user_data;
++  RestProxyCallPrivate *priv = GET_PRIVATE (closure->call);
++  GInputStream *stream;
++  GError *error = NULL;
++
++  stream = _rest_proxy_send_message_finish (proxy, result, &error);
++  if (!stream)
++    {
++      _continuous_call_message_completed (closure->message, error, user_data);
++      return;
++    }
++
++  g_input_stream_read_async (stream, closure->buffer, READ_BUFFER_SIZE, G_PRIORITY_DEFAULT,
++                             priv->cancellable, _continuous_call_read_cb, closure);
++  g_object_unref (stream);
+ }
+ 
+ 
+@@ -1021,9 +1183,6 @@ rest_proxy_call_continuous (RestProxyCall                    *call,
+   if (message == NULL)
+     return FALSE;
+ 
+-  /* Must turn off accumulation */
+-  soup_message_body_set_accumulate (message->response_body, FALSE);
+-
+   closure = g_slice_new0 (RestProxyCallContinuousClosure);
+   closure->call = g_object_ref (call);
+   closure->callback = callback;
+@@ -1041,33 +1200,29 @@ rest_proxy_call_continuous (RestProxyCall                    *call,
+         closure);
+   }
+ 
+-  g_signal_connect (message,
+-                    "got-chunk",
+-                    (GCallback)_continuous_call_message_got_chunk_cb,
+-                    closure);
+-
+-  _rest_proxy_queue_message (priv->proxy,
+-                             message,
+-                             _continuous_call_message_completed_cb,
+-                             closure);
++  _rest_proxy_send_message_async (priv->proxy,
++                                  message,
++                                  priv->cancellable,
++                                  _continuous_call_message_sent_cb,
++                                  closure);
+   return TRUE;
+ }
+ 
+ static void
+-_upload_call_message_completed_cb (SoupSession *session,
+-                                   SoupMessage *message,
++_upload_call_message_completed_cb (SoupMessage *message,
++                                   GBytes      *payload,
++                                   GError      *error,
+                                    gpointer     user_data)
+ {
+   RestProxyCall *call;
+   RestProxyCallPrivate *priv;
+-  GError *error = NULL;
+   RestProxyCallUploadClosure *closure;
+ 
+   closure = (RestProxyCallUploadClosure *) user_data;
+   call = closure->call;
+   priv = GET_PRIVATE (call);
+ 
+-  finish_call (call, message, &error);
++  finish_call (call, message, payload, &error);
+ 
+   closure->callback (closure->call,
+                      closure->uploaded,
+@@ -1093,14 +1248,25 @@ _upload_call_message_completed_cb (SoupSession *session,
+ 
+ static void
+ _upload_call_message_wrote_data_cb (SoupMessage                *msg,
++#ifdef WITH_SOUP_2
+                                     SoupBuffer                 *chunk,
++#else
++                                    gsize                       chunk_size,
++#endif
+                                     RestProxyCallUploadClosure *closure)
+ {
+-  closure->uploaded = closure->uploaded + chunk->length;
++#ifdef WITH_SOUP_2
++  gsize chunk_size = chunk->length;
++  goffset content_length = msg->request_body->length;
++#else
++  goffset content_length = soup_message_headers_get_content_length (soup_message_get_request_headers (msg));
++#endif
+ 
+-  if (closure->uploaded < msg->request_body->length)
++  closure->uploaded = closure->uploaded + chunk_size;
++
++  if (closure->uploaded < content_length)
+     closure->callback (closure->call,
+-                       msg->request_body->length,
++                       content_length,
+                        closure->uploaded,
+                        NULL,
+                        closure->weak_object,
+@@ -1178,6 +1344,7 @@ rest_proxy_call_upload (RestProxyCall                *call,
+ 
+   _rest_proxy_queue_message (priv->proxy,
+                              message,
++                             priv->cancellable,
+                              _upload_call_message_completed_cb,
+                              closure);
+   return TRUE;
+@@ -1206,6 +1373,10 @@ rest_proxy_call_cancel (RestProxyCall *call)
+   if (priv->cancellable)
+     {
+       g_signal_handler_disconnect (priv->cancellable, priv->cancel_sig);
++#ifndef WITH_SOUP_2
++      if (!g_cancellable_is_cancelled (priv->cancellable))
++              g_cancellable_cancel (priv->cancellable);
++#endif
+       g_clear_object (&priv->cancellable);
+     }
+ 
+@@ -1240,6 +1411,7 @@ rest_proxy_call_sync (RestProxyCall *call,
+   RestProxyCallPrivate *priv = GET_PRIVATE (call);
+   SoupMessage *message;
+   gboolean ret;
++  GBytes *payload;
+ 
+   g_return_val_if_fail (REST_IS_PROXY_CALL (call), FALSE);
+ 
+@@ -1247,9 +1419,9 @@ rest_proxy_call_sync (RestProxyCall *call,
+   if (!message)
+     return FALSE;
+ 
+-  _rest_proxy_send_message (priv->proxy, message);
++  payload = _rest_proxy_send_message (priv->proxy, message, priv->cancellable, error_out);
+ 
+-  ret = finish_call (call, message, error_out);
++  ret = finish_call (call, message, payload, error_out);
+ 
+   g_object_unref (message);
+ 
+@@ -1314,9 +1486,16 @@ rest_proxy_call_get_response_headers (RestProxyCall *call)
+ goffset
+ rest_proxy_call_get_payload_length (RestProxyCall *call)
+ {
++  GBytes *payload;
++
+   g_return_val_if_fail (REST_IS_PROXY_CALL (call), 0);
+ 
+-  return GET_PRIVATE (call)->length;
++  payload = GET_PRIVATE (call)->payload;
++#ifdef WITH_SOUP_2
++  return payload ? g_bytes_get_size (payload) - 1 : 0;
++#else
++  return payload ? g_bytes_get_size (payload) : 0;
++#endif
+ }
+ 
+ /**
+@@ -1331,9 +1510,12 @@ rest_proxy_call_get_payload_length (RestProxyCall *call)
+ const gchar *
+ rest_proxy_call_get_payload (RestProxyCall *call)
+ {
++  GBytes *payload;
++
+   g_return_val_if_fail (REST_IS_PROXY_CALL (call), NULL);
+ 
+-  return GET_PRIVATE (call)->payload;
++  payload = GET_PRIVATE (call)->payload;
++  return payload ? g_bytes_get_data (payload, NULL) : NULL;
+ }
+ 
+ /**
+diff --git a/rest/rest-proxy.c b/rest/rest-proxy.c
+index 80972a3..171f6cb 100644
+--- a/rest/rest-proxy.c
++++ b/rest/rest-proxy.c
+@@ -45,6 +45,9 @@ struct _RestProxyPrivate {
+   SoupSession *session;
+   gboolean disable_cookies;
+   char *ssl_ca_file;
++#ifndef WITH_SOUP_2
++  gboolean ssl_strict;
++#endif
+ };
+ 
+ 
+@@ -116,11 +119,15 @@ rest_proxy_get_property (GObject   *object,
+       g_value_set_string (value, priv->password);
+       break;
+     case PROP_SSL_STRICT: {
++#ifdef WITH_SOUP_2
+       gboolean ssl_strict;
+       g_object_get (G_OBJECT(priv->session),
+                     "ssl-strict", &ssl_strict,
+                     NULL);
+       g_value_set_boolean (value, ssl_strict);
++#else
++      g_value_set_boolean (value, priv->ssl_strict);
++#endif
+       break;
+     }
+     case PROP_SSL_CA_FILE:
+@@ -172,9 +179,13 @@ rest_proxy_set_property (GObject      *object,
+       priv->password = g_value_dup_string (value);
+       break;
+     case PROP_SSL_STRICT:
++#ifdef WITH_SOUP_2
+       g_object_set (G_OBJECT(priv->session),
+                     "ssl-strict", g_value_get_boolean (value),
+                     NULL);
++#else
++      priv->ssl_strict = g_value_get_boolean (value);
++#endif
+       break;
+     case PROP_SSL_CA_FILE:
+       g_free(priv->ssl_ca_file);
+@@ -207,6 +218,7 @@ default_authenticate_cb (RestProxy *self,
+   return !retrying;
+ }
+ 
++#ifdef WITH_SOUP_2
+ static void
+ authenticate (RestProxy   *self,
+               SoupMessage *msg,
+@@ -224,6 +236,7 @@ authenticate (RestProxy   *self,
+     soup_auth_authenticate (soup_auth, priv->username, priv->password);
+   g_object_unref (G_OBJECT (rest_auth));
+ }
++#endif
+ 
+ static void
+ rest_proxy_constructed (GObject *object)
+@@ -238,14 +251,20 @@ rest_proxy_constructed (GObject *object)
+   }
+ 
+   if (REST_DEBUG_ENABLED(PROXY)) {
++#ifdef WITH_SOUP_2
+     SoupSessionFeature *logger = (SoupSessionFeature*)soup_logger_new (SOUP_LOGGER_LOG_BODY, 0);
++#else
++    SoupSessionFeature *logger = (SoupSessionFeature*)soup_logger_new (SOUP_LOGGER_LOG_HEADERS);
++#endif
+     soup_session_add_feature (priv->session, logger);
+     g_object_unref (logger);
+   }
+ 
++#ifdef WITH_SOUP_2
+   /* session lifetime is same as self, no need to keep signalid */
+   g_signal_connect_swapped (priv->session, "authenticate",
+                             G_CALLBACK(authenticate), object);
++#endif
+ }
+ 
+ static void
+@@ -391,23 +410,62 @@ rest_proxy_class_init (RestProxyClass *klass)
+   proxy_class->authenticate = default_authenticate_cb;
+ }
+ 
++static gboolean
++transform_ssl_ca_file_to_tls_database (GBinding     *binding,
++                                       const GValue *from_value,
++                                       GValue       *to_value,
++                                       gpointer      user_data)
++{
++  g_value_take_object (to_value,
++                       g_tls_file_database_new (g_value_get_string (from_value), NULL));
++  return TRUE;
++}
++
++static gboolean
++transform_tls_database_to_ssl_ca_file (GBinding     *binding,
++                                       const GValue *from_value,
++                                       GValue       *to_value,
++                                       gpointer      user_data)
++{
++  GTlsDatabase *tls_database;
++  char *path = NULL;
++
++  tls_database = g_value_get_object (from_value);
++  if (tls_database)
++    g_object_get (tls_database, "anchors", &path, NULL);
++  g_value_take_string (to_value, path);
++  return TRUE;
++}
++
+ static void
+ rest_proxy_init (RestProxy *self)
+ {
+   RestProxyPrivate *priv = GET_PRIVATE (self);
++  GTlsDatabase *tls_database;
++
++#ifndef WITH_SOUP_2
++  priv->ssl_strict = TRUE;
++#endif
+ 
+   priv->session = soup_session_new ();
+ 
+ #ifdef REST_SYSTEM_CA_FILE
+   /* with ssl-strict (defaults TRUE) setting ssl-ca-file forces all
+    * certificates to be trusted */
+-  g_object_set (priv->session,
+-                "ssl-ca-file", REST_SYSTEM_CA_FILE,
+-                NULL);
++  tls_database = g_tls_file_database_new (REST_SYSTEM_CA_FILE, NULL);
++  if (tls_database) {
++          g_object_set (priv->session,
++                        "tls-database", tls_database,
++                        NULL);
++          g_object_unref (tls_database);
++  }
+ #endif
+-  g_object_bind_property (self, "ssl-ca-file",
+-                          priv->session, "ssl-ca-file",
+-                          G_BINDING_BIDIRECTIONAL);
++  g_object_bind_property_full (self, "ssl-ca-file",
++                               priv->session, "tls-database",
++                               G_BINDING_BIDIRECTIONAL,
++                               transform_ssl_ca_file_to_tls_database,
++                               transform_tls_database_to_ssl_ca_file,
++                               NULL, NULL);
+ }
+ 
+ /**
+@@ -689,27 +747,127 @@ rest_proxy_simple_run (RestProxy *proxy,
+   return ret;
+ }
+ 
++typedef struct {
++  RestMessageFinishedCallback callback;
++  gpointer user_data;
++} RestMessageQueueData;
++
++#ifdef WITH_SOUP_2
++static void
++message_finished_cb (SoupSession *session,
++                     SoupMessage *message,
++                     gpointer     user_data)
++{
++  RestMessageQueueData *data = user_data;
++  GBytes *body;
++  GError *error = NULL;
++
++  body = g_bytes_new (message->response_body->data,
++                      message->response_body->length + 1);
++  data->callback (message, body, error, data->user_data);
++  g_free (data);
++}
++#else
++static void
++message_send_and_read_ready_cb (GObject      *source,
++                                GAsyncResult *result,
++                                gpointer      user_data)
++{
++  SoupSession *session = SOUP_SESSION (source);
++  RestMessageQueueData *data = user_data;
++  GBytes *body;
++  GError *error = NULL;
++
++  body = soup_session_send_and_read_finish (session, result, &error);
++  data->callback (soup_session_get_async_result_message (session, result), body, error, data->user_data);
++  g_free (data);
++}
++#endif
++
+ void
+-_rest_proxy_queue_message (RestProxy   *proxy,
+-                           SoupMessage *message,
+-                           SoupSessionCallback callback,
+-                           gpointer user_data)
++_rest_proxy_queue_message (RestProxy                  *proxy,
++                           SoupMessage                *message,
++                           GCancellable               *cancellable,
++                           RestMessageFinishedCallback callback,
++                           gpointer                    user_data)
+ {
+   RestProxyPrivate *priv = GET_PRIVATE (proxy);
++  RestMessageQueueData *data;
+ 
+   g_return_if_fail (REST_IS_PROXY (proxy));
+   g_return_if_fail (SOUP_IS_MESSAGE (message));
+ 
++  data = g_new0 (RestMessageQueueData, 1);
++  data->callback = callback;
++  data->user_data = user_data;
++
++#ifdef WITH_SOUP_2
+   soup_session_queue_message (priv->session,
+                               message,
+-                              callback,
+-                              user_data);
++                              message_finished_cb,
++                              data);
++#else
++  soup_session_send_and_read_async (priv->session,
++                                    message,
++                                    G_PRIORITY_DEFAULT,
++                                    cancellable,
++                                    message_send_and_read_ready_cb,
++                                    data);
++#endif
++}
++
++static void
++message_send_ready_cb (GObject      *source,
++                       GAsyncResult *result,
++                       gpointer      user_data)
++{
++  SoupSession *session = SOUP_SESSION (source);
++  GTask *task = user_data;
++  GInputStream *stream;
++  GError *error = NULL;
++
++  stream = soup_session_send_finish (session, result, &error);
++  if (stream)
++    g_task_return_pointer (task, stream, g_object_unref);
++  else
++    g_task_return_error (task, error);
++  g_object_unref (task);
++}
++
++void
++_rest_proxy_send_message_async (RestProxy          *proxy,
++                                SoupMessage        *message,
++                                GCancellable       *cancellable,
++                                GAsyncReadyCallback callback,
++                                gpointer            user_data)
++{
++  RestProxyPrivate *priv = GET_PRIVATE (proxy);
++  GTask *task;
++
++  task = g_task_new (proxy, cancellable, callback, user_data);
++  soup_session_send_async (priv->session,
++                           message,
++#ifndef WITH_SOUP_2
++                           G_PRIORITY_DEFAULT,
++#endif
++                           cancellable,
++                           message_send_ready_cb,
++                           task);
++}
++
++GInputStream *
++_rest_proxy_send_message_finish (RestProxy    *proxy,
++                                 GAsyncResult *result,
++                                 GError      **error)
++{
++  return g_task_propagate_pointer (G_TASK (result), error);
+ }
+ 
+ void
+ _rest_proxy_cancel_message (RestProxy   *proxy,
+                             SoupMessage *message)
+ {
++#ifdef WITH_SOUP_2
+   RestProxyPrivate *priv = GET_PRIVATE (proxy);
+ 
+   g_return_if_fail (REST_IS_PROXY (proxy));
+@@ -718,16 +876,31 @@ _rest_proxy_cancel_message (RestProxy   *proxy,
+   soup_session_cancel_message (priv->session,
+                                message,
+                                SOUP_STATUS_CANCELLED);
++#endif
+ }
+ 
+-guint
+-_rest_proxy_send_message (RestProxy   *proxy,
+-                          SoupMessage *message)
++GBytes *
++_rest_proxy_send_message (RestProxy    *proxy,
++                          SoupMessage  *message,
++                          GCancellable *cancellable,
++                          GError      **error)
+ {
+   RestProxyPrivate *priv = GET_PRIVATE (proxy);
++  GBytes *body;
+ 
+-  g_return_val_if_fail (REST_IS_PROXY (proxy), 0);
+-  g_return_val_if_fail (SOUP_IS_MESSAGE (message), 0);
++  g_return_val_if_fail (REST_IS_PROXY (proxy), NULL);
++  g_return_val_if_fail (SOUP_IS_MESSAGE (message), NULL);
++
++#ifdef WITH_SOUP_2
++  soup_session_send_message (priv->session, message);
++  body = g_bytes_new (message->response_body->data,
++                      message->response_body->length + 1);
++#else
++  body = soup_session_send_and_read (priv->session,
++                                     message,
++                                     cancellable,
++                                     error);
++#endif
+ 
+-  return soup_session_send_message (priv->session, message);
++  return body;
+ }
+diff --git a/tests/custom-serialize.c b/tests/custom-serialize.c
+index c3fde93..01b3a56 100644
+--- a/tests/custom-serialize.c
++++ b/tests/custom-serialize.c
+@@ -88,22 +88,40 @@ custom_proxy_call_init (CustomProxyCall *self)
+ }
+ 
+ static void
++#ifdef WITH_SOUP_2
+ server_callback (SoupServer *server, SoupMessage *msg,
+                  const char *path, GHashTable *query,
+                  SoupClientContext *client, gpointer user_data)
++#else
++server_callback (SoupServer *server, SoupServerMessage *msg,
++                 const char *path, GHashTable *query, gpointer user_data)
++#endif
+ {
+   if (g_str_equal (path, "/ping")) {
+     const char *content_type = NULL;
++#ifdef WITH_SOUP_2
+     SoupMessageHeaders *headers = msg->request_headers;
+     SoupMessageBody *body = msg->request_body;
++#else
++    SoupMessageHeaders *headers = soup_server_message_get_request_headers (msg);
++    SoupMessageBody *body = soup_server_message_get_request_body (msg);
++#endif
+     content_type = soup_message_headers_get_content_type (headers, NULL);
+     g_assert_cmpstr (content_type, ==, "application/json");
+ 
+     g_assert_cmpstr (body->data, ==, "{}");
+ 
++#ifdef WITH_SOUP_2
+     soup_message_set_status (msg, SOUP_STATUS_OK);
++#else
++    soup_server_message_set_status (msg, SOUP_STATUS_OK, NULL);
++#endif
+   } else {
++#ifdef WITH_SOUP_2
+     soup_message_set_status (msg, SOUP_STATUS_NOT_IMPLEMENTED);
++#else
++    soup_server_message_set_status (msg, SOUP_STATUS_NOT_IMPLEMENTED, NULL);
++#endif
+   }
+ }
+ 
+diff --git a/tests/proxy-continuous.c b/tests/proxy-continuous.c
+index 8f4b7a8..7967bbd 100644
+--- a/tests/proxy-continuous.c
++++ b/tests/proxy-continuous.c
+@@ -39,9 +39,15 @@ static SoupServer *server;
+ static gboolean
+ send_chunks (gpointer user_data)
+ {
+-  SoupMessage *msg = SOUP_MESSAGE (user_data);
+   guint i;
+   guint8 data[SIZE_CHUNK];
++#ifdef WITH_SOUP_2
++  SoupMessage *msg = SOUP_MESSAGE (user_data);
++  SoupMessageBody *response_body = msg->response_body;
++#else
++  SoupServerMessage *msg = SOUP_SERVER_MESSAGE (user_data);
++  SoupMessageBody *response_body = soup_server_message_get_response_body (msg);
++#endif
+ 
+   for (i = 0; i < SIZE_CHUNK; i++)
+   {
+@@ -49,12 +55,12 @@ send_chunks (gpointer user_data)
+     server_count++;
+   }
+ 
+-  soup_message_body_append (msg->response_body, SOUP_MEMORY_COPY, data, SIZE_CHUNK);
++  soup_message_body_append (response_body, SOUP_MEMORY_COPY, data, SIZE_CHUNK);
+   soup_server_unpause_message (server, msg);
+ 
+   if (server_count == NUM_CHUNKS * SIZE_CHUNK)
+   {
+-    soup_message_body_complete (msg->response_body);
++    soup_message_body_complete (response_body);
+     return FALSE;
+   } else {
+     return TRUE;
+@@ -62,13 +68,28 @@ send_chunks (gpointer user_data)
+ }
+ 
+ static void
++#ifdef WITH_SOUP_2
+ server_callback (SoupServer *server, SoupMessage *msg,
+                  const char *path, GHashTable *query,
+                  SoupClientContext *client, gpointer user_data)
++#else
++server_callback (SoupServer *server, SoupServerMessage *msg,
++                 const char *path, GHashTable *query, gpointer user_data)
++#endif
+ {
++#ifdef WITH_SOUP_2
++  SoupMessageHeaders *response_headers = msg->response_headers;
++#else
++  SoupMessageHeaders *response_headers = soup_server_message_get_response_headers (msg);
++#endif
++
+   g_assert_cmpstr (path, ==, "/stream");
++#ifdef WITH_SOUP_2
+   soup_message_set_status (msg, SOUP_STATUS_OK);
+-  soup_message_headers_set_encoding (msg->response_headers,
++#else
++  soup_server_message_set_status (msg, SOUP_STATUS_OK, NULL);
++#endif
++  soup_message_headers_set_encoding (response_headers,
+                                      SOUP_ENCODING_CHUNKED);
+   soup_server_pause_message (server, msg);
+ 
+@@ -142,13 +163,21 @@ continuous ()
+   uris = soup_server_get_uris (server);
+   g_assert (g_slist_length (uris) > 0);
+ 
++#ifdef WITH_SOUP_2
+   url = soup_uri_to_string (uris->data, FALSE);
++#else
++  url = g_uri_to_string (uris->data);
++#endif
+ 
+   loop = g_main_loop_new (NULL, FALSE);
+ 
+   proxy = rest_proxy_new (url, FALSE);
+   stream_test (proxy);
++#ifdef WITH_SOUP_2
+   g_slist_free_full (uris, (GDestroyNotify)soup_uri_free);
++#else
++  g_slist_free_full (uris, (GDestroyNotify)g_uri_unref);
++#endif
+ 
+   g_main_loop_run (loop);
+   g_free (url);
+diff --git a/tests/proxy.c b/tests/proxy.c
+index 89a9325..652c600 100644
+--- a/tests/proxy.c
++++ b/tests/proxy.c
+@@ -49,20 +49,35 @@ SoupServer *server;
+ GMainLoop *server_loop;
+ 
+ static void
++#ifdef WITH_SOUP_2
+ server_callback (SoupServer *server, SoupMessage *msg,
+                  const char *path, GHashTable *query,
+                  SoupClientContext *client, gpointer user_data)
++#else
++server_callback (SoupServer *server, SoupServerMessage *msg,
++                 const char *path, GHashTable *query, gpointer user_data)
++#endif
+ {
+   if (g_str_equal (path, "/ping")) {
++#ifdef WITH_SOUP_2
+     soup_message_set_status (msg, SOUP_STATUS_OK);
++#else
++    soup_server_message_set_status (msg, SOUP_STATUS_OK, NULL);
++#endif
+   }
+   else if (g_str_equal (path, "/echo")) {
+     const char *value;
+ 
+     value = g_hash_table_lookup (query, "value");
++#ifdef WITH_SOUP_2
+     soup_message_set_response (msg, "text/plain", SOUP_MEMORY_COPY,
+                                value, strlen (value));
+     soup_message_set_status (msg, SOUP_STATUS_OK);
++#else
++    soup_server_message_set_response (msg, "text/plain", SOUP_MEMORY_COPY,
++                                      value, strlen (value));
++    soup_server_message_set_status (msg, SOUP_STATUS_OK, NULL);
++#endif
+   }
+   else if (g_str_equal (path, "/reverse")) {
+     char *value;
+@@ -70,9 +85,15 @@ server_callback (SoupServer *server, SoupMessage *msg,
+     value = g_strdup (g_hash_table_lookup (query, "value"));
+     g_strreverse (value);
+ 
++#ifdef WITH_SOUP_2
+     soup_message_set_response (msg, "text/plain", SOUP_MEMORY_TAKE,
+                                value, strlen (value));
+     soup_message_set_status (msg, SOUP_STATUS_OK);
++#else
++    soup_server_message_set_response (msg, "text/plain", SOUP_MEMORY_TAKE,
++                                       value, strlen (value));
++    soup_server_message_set_status (msg, SOUP_STATUS_OK, NULL);
++#endif
+   }
+   else if (g_str_equal (path, "/status")) {
+     const char *value;
+@@ -81,25 +102,61 @@ server_callback (SoupServer *server, SoupMessage *msg,
+     value = g_hash_table_lookup (query, "status");
+     if (value) {
+       status = atoi (value);
++#ifdef WITH_SOUP_2
+       soup_message_set_status (msg, status ?: SOUP_STATUS_INTERNAL_SERVER_ERROR);
++#else
++      soup_server_message_set_status (msg, status ?: SOUP_STATUS_INTERNAL_SERVER_ERROR, NULL);
++#endif
+     } else {
++#ifdef WITH_SOUP_2
+       soup_message_set_status (msg, SOUP_STATUS_INTERNAL_SERVER_ERROR);
++#else
++      soup_server_message_set_status (msg, SOUP_STATUS_INTERNAL_SERVER_ERROR, NULL);
++#endif
+     }
+   }
+   else if (g_str_equal (path, "/useragent/none")) {
+-    if (soup_message_headers_get (msg->request_headers, "User-Agent") == NULL) {
++#ifdef WITH_SOUP_2
++    SoupMessageHeaders *request_headers = msg->request_headers;
++#else
++    SoupMessageHeaders *request_headers = soup_server_message_get_request_headers (msg);
++#endif
++
++    if (soup_message_headers_get (request_headers, "User-Agent") == NULL) {
++#ifdef WITH_SOUP_2
+       soup_message_set_status (msg, SOUP_STATUS_OK);
++#else
++      soup_server_message_set_status (msg, SOUP_STATUS_OK, NULL);
++#endif
+     } else {
++#ifdef WITH_SOUP_2
+       soup_message_set_status (msg, SOUP_STATUS_EXPECTATION_FAILED);
++#else
++      soup_server_message_set_status (msg, SOUP_STATUS_EXPECTATION_FAILED, NULL);
++#endif
+     }
+   }
+   else if (g_str_equal (path, "/useragent/testsuite")) {
++#ifdef WITH_SOUP_2
++    SoupMessageHeaders *request_headers = msg->request_headers;
++#else
++    SoupMessageHeaders *request_headers = soup_server_message_get_request_headers (msg);
++#endif
+     const char *value;
+-    value = soup_message_headers_get (msg->request_headers, "User-Agent");
++    value = soup_message_headers_get (request_headers, "User-Agent");
+     if (g_strcmp0 (value, "TestSuite-1.0") == 0) {
++#ifdef WITH_SOUP_2
+       soup_message_set_status (msg, SOUP_STATUS_OK);
++#else
++      soup_server_message_set_status (msg, SOUP_STATUS_OK, NULL);
++#endif
+     } else {
++#ifdef WITH_SOUP_2
+       soup_message_set_status (msg, SOUP_STATUS_EXPECTATION_FAILED);
++#else
++      soup_server_message_set_status (msg, SOUP_STATUS_EXPECTATION_FAILED, NULL);
++#endif
++
+     }
+   }
+ }
+@@ -325,7 +382,7 @@ main (int argc, char **argv)
+   char *url;
+   RestProxy *proxy;
+ 
+-  server = soup_server_new ("", NULL);
++  server = soup_server_new (NULL);
+   g_thread_new ("Server Thread", server_thread_func, NULL);
+ 
+   url = g_strdup_printf ("http://127.0.0.1:%d/", PORT);
+diff --git a/tests/threaded.c b/tests/threaded.c
+index a251900..411361c 100644
+--- a/tests/threaded.c
++++ b/tests/threaded.c
+@@ -36,13 +36,22 @@ GMainLoop *main_loop;
+ SoupServer *server;
+ 
+ static void
++#ifdef WITH_SOUP_2
+ server_callback (SoupServer *server, SoupMessage *msg,
+                  const char *path, GHashTable *query,
+                  SoupClientContext *client, gpointer user_data)
++#else
++server_callback (SoupServer *server, SoupServerMessage *msg,
++                 const char *path, GHashTable *query, gpointer user_data)
++#endif
+ {
+   g_assert_cmpstr (path, ==, "/ping");
+ 
++#ifdef WITH_SOUP_2
+   soup_message_set_status (msg, SOUP_STATUS_OK);
++#else
++  soup_server_message_set_status (msg, SOUP_STATUS_OK, NULL);
++#endif
+   g_atomic_int_add (&threads_done, 1);
+ 
+   if (threads_done == N_THREADS) {
+@@ -96,7 +105,11 @@ static void ping ()
+   uris = soup_server_get_uris (server);
+   g_assert (g_slist_length (uris) > 0);
+ 
++#ifdef WITH_SOUP_2
+   url = soup_uri_to_string (uris->data, FALSE);
++#else
++  url = g_uri_to_string (uris->data);
++#endif
+ 
+   main_loop = g_main_loop_new (NULL, TRUE);
+ 
+@@ -109,7 +122,11 @@ static void ping ()
+   g_main_loop_run (main_loop);
+ 
+   g_free (url);
++#ifdef WITH_SOUP_2
+   g_slist_free_full (uris, (GDestroyNotify)soup_uri_free);
++#else
++  g_slist_free_full (uris, (GDestroyNotify)g_uri_unref);
++#endif
+   g_object_unref (server);
+   g_main_loop_unref (main_loop);
+ }
+-- 
+2.33.1
+
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/rest/rest_0.8.1.bb b/meta-openembedded/meta-gnome/recipes-gnome/rest/rest_0.8.1.bb
index 47e3f8d..545224a 100644
--- a/meta-openembedded/meta-gnome/recipes-gnome/rest/rest_0.8.1.bb
+++ b/meta-openembedded/meta-gnome/recipes-gnome/rest/rest_0.8.1.bb
@@ -14,13 +14,13 @@
 
 inherit gnomebase gobject-introspection gtk-doc vala
 
-SRC_URI[archive.md5sum] = "ece4547298a81105f307369d73c21b9d"
-SRC_URI[archive.sha256sum] = "0513aad38e5d3cedd4ae3c551634e3be1b9baaa79775e53b2dba9456f15b01c9"
-
-# * gnome environment requires libsoup build with in gnome PACKAGECONFIG
-# * libsoup-gnome support was removed upstream three years ago [1]
-# [1] https://gitlab.gnome.org/GNOME/librest/commit/8f904a8e2bb38a7bf72245cdf2f1ecad17e9a720
-EXTRA_OECONF = "--without-gnome"
+PV .= "+git${SRCPV}"
+SRCREV = "7b46065dea860ef09861f4d70124728b8270c8b7"
+SRC_URI = "git://gitlab.gnome.org/GNOME/librest;protocol=https;branch=master \
+    file://0001-Use-GUri-instead-of-SoupURI.patch \
+    file://0002-Port-to-libsoup3.patch \
+"
+S = "${WORKDIR}/git"
 
 do_configure:prepend() {
     # rest expects introspection.m4 at custom location (see aclocal.m4).
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/yelp/yelp-tools_40.0.bb b/meta-openembedded/meta-gnome/recipes-gnome/yelp/yelp-tools_40.0.bb
deleted file mode 100644
index 0e7f499..0000000
--- a/meta-openembedded/meta-gnome/recipes-gnome/yelp/yelp-tools_40.0.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "Collection of scripts and build utilities for documentation"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = " \
-    file://COPYING;md5=d67c6f9f1515506abfea4f0d920c0774 \
-    file://COPYING.GPL;md5=eb723b61539feef013de476e68b5c50a \
-"
-
-GNOMEBASEBUILDCLASS = "meson"
-
-inherit gnomebase itstool
-
-DEPENDS += " \
-    libxslt-native \
-    libxml2-native \
-    python3-lxml-native \
-    yelp-xsl \
-"
-
-SRC_URI[archive.sha256sum] = "664bacf2f3dd65ef00a43f79487351ab64a6c4c629c56ac0ceb1723c2eb66aae"
-
-RDEPENDS:${PN} += "python3-core yelp-xsl"
-
-BBCLASSEXTEND = "native"
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/yelp/yelp-tools_41.0.bb b/meta-openembedded/meta-gnome/recipes-gnome/yelp/yelp-tools_41.0.bb
new file mode 100644
index 0000000..ec8edb8
--- /dev/null
+++ b/meta-openembedded/meta-gnome/recipes-gnome/yelp/yelp-tools_41.0.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Collection of scripts and build utilities for documentation"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = " \
+    file://COPYING;md5=d67c6f9f1515506abfea4f0d920c0774 \
+    file://COPYING.GPL;md5=eb723b61539feef013de476e68b5c50a \
+"
+
+GNOMEBASEBUILDCLASS = "meson"
+
+inherit gnomebase itstool
+
+DEPENDS += " \
+    libxslt-native \
+    libxml2-native \
+    python3-lxml-native \
+    yelp-xsl \
+"
+
+SRC_URI[archive.sha256sum] = "37f1acc02bcbe68a31b86e07c129a839bd3276e656dc89eb7fc0a92746eff272"
+
+RDEPENDS:${PN} += "python3-core yelp-xsl"
+
+BBCLASSEXTEND = "native"
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/yelp/yelp-xsl_40.2.bb b/meta-openembedded/meta-gnome/recipes-gnome/yelp/yelp-xsl_40.2.bb
deleted file mode 100644
index 9ac88c1..0000000
--- a/meta-openembedded/meta-gnome/recipes-gnome/yelp/yelp-xsl_40.2.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "XSL stylesheets for the yelp help browser"
-LICENSE = "LGPLv2.1 & GPLv2 & BSD-3-Clause"
-LIC_FILES_CHKSUM = " \
-    file://COPYING;md5=8ca13a5a6972ac1620a1e42a3dacd774 \
-    file://COPYING.GPL;md5=eb723b61539feef013de476e68b5c50a \
-    file://COPYING.LGPL;md5=a6f89e2100d9b6cdffcea4f398e37343 \
-"
-
-inherit gnomebase gettext itstool
-
-DEPENDS += "libxml2"
-
-SRC_URI[archive.sha256sum] = "919c552f846aaec741fe51d5af416b469bcdb25c77effc3b5a15a4b4b7ff814e"
-
-RDEPENDS:${PN}:append:class-target = " libxml2 itstool"
-
-# ensure our native consumers are forced to inherit itstool
-RDEPENDS:${PN}:append:class-native = " libxml2-native"
-
-BBCLASSEXTEND = "native"
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/yelp/yelp-xsl_41.0.bb b/meta-openembedded/meta-gnome/recipes-gnome/yelp/yelp-xsl_41.0.bb
new file mode 100644
index 0000000..029fd02
--- /dev/null
+++ b/meta-openembedded/meta-gnome/recipes-gnome/yelp/yelp-xsl_41.0.bb
@@ -0,0 +1,20 @@
+SUMMARY = "XSL stylesheets for the yelp help browser"
+LICENSE = "LGPLv2.1 & GPLv2 & BSD-3-Clause"
+LIC_FILES_CHKSUM = " \
+    file://COPYING;md5=8ca13a5a6972ac1620a1e42a3dacd774 \
+    file://COPYING.GPL;md5=eb723b61539feef013de476e68b5c50a \
+    file://COPYING.LGPL;md5=a6f89e2100d9b6cdffcea4f398e37343 \
+"
+
+inherit gnomebase gettext itstool
+
+DEPENDS += "libxml2"
+
+SRC_URI[archive.sha256sum] = "c8cd64c093bbd8c5d5e47fd38864e90831b5f9cf7403530870206fa96636a4a5"
+
+RDEPENDS:${PN}:append:class-target = " libxml2 itstool"
+
+# ensure our native consumers are forced to inherit itstool
+RDEPENDS:${PN}:append:class-native = " libxml2-native"
+
+BBCLASSEXTEND = "native"
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/yelp/yelp_40.3.bb b/meta-openembedded/meta-gnome/recipes-gnome/yelp/yelp_40.3.bb
deleted file mode 100644
index c179a61..0000000
--- a/meta-openembedded/meta-gnome/recipes-gnome/yelp/yelp_40.3.bb
+++ /dev/null
@@ -1,34 +0,0 @@
-SUMMARY = "Help browser for the GNOME desktop"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = " \
-    file://COPYING;md5=6e1b9cb787e76d7e6946887a65caa754 \
-"
-
-inherit gnomebase itstool autotools-brokensep gsettings gettext gtk-doc features_check mime-xdg
-
-# for webkitgtk
-REQUIRED_DISTRO_FEATURES = "x11"
-
-SRC_URI[archive.sha256sum] = "a173847851f26189be78ecbb10015d539d8cceffc7c23e8635492bc3ada5ee23"
-
-DEPENDS += " \
-    libxml2-native \
-    glib-2.0-native \
-    gtk+3 \
-    appstream-glib \
-    libxslt \
-    sqlite3 \
-    webkitgtk \
-    yelp-xsl \
-"
-
-do_configure:prepend() {
-    export ITSTOOL=${STAGING_BINDIR_NATIVE}/itstool
-}
-
-FILES:${PN} += " \
-    ${datadir}/metainfo \
-    ${datadir}/yelp-xsl \
-"
-
-RDEPENDS:${PN} += "yelp-xsl"
diff --git a/meta-openembedded/meta-gnome/recipes-gnome/yelp/yelp_41.1.bb b/meta-openembedded/meta-gnome/recipes-gnome/yelp/yelp_41.1.bb
new file mode 100644
index 0000000..980b9a1
--- /dev/null
+++ b/meta-openembedded/meta-gnome/recipes-gnome/yelp/yelp_41.1.bb
@@ -0,0 +1,34 @@
+SUMMARY = "Help browser for the GNOME desktop"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = " \
+    file://COPYING;md5=6e1b9cb787e76d7e6946887a65caa754 \
+"
+
+inherit gnomebase itstool autotools-brokensep gsettings gettext gtk-doc features_check mime-xdg
+
+# for webkitgtk
+REQUIRED_DISTRO_FEATURES = "x11"
+
+SRC_URI[archive.sha256sum] = "456a6415647bceeb0159b90b3553ff328728cf29a608fce08024232504ccb874"
+
+DEPENDS += " \
+    libxml2-native \
+    glib-2.0-native \
+    gtk+3 \
+    appstream-glib \
+    libxslt \
+    sqlite3 \
+    webkitgtk \
+    yelp-xsl \
+"
+
+do_configure:prepend() {
+    export ITSTOOL=${STAGING_BINDIR_NATIVE}/itstool
+}
+
+FILES:${PN} += " \
+    ${datadir}/metainfo \
+    ${datadir}/yelp-xsl \
+"
+
+RDEPENDS:${PN} += "yelp-xsl"
diff --git a/meta-openembedded/meta-gnome/recipes-support/packagegroups/packagegroup-gnome-apps.bb b/meta-openembedded/meta-gnome/recipes-support/packagegroups/packagegroup-gnome-apps.bb
index d47d847..d003e23 100644
--- a/meta-openembedded/meta-gnome/recipes-support/packagegroups/packagegroup-gnome-apps.bb
+++ b/meta-openembedded/meta-gnome/recipes-support/packagegroups/packagegroup-gnome-apps.bb
@@ -16,6 +16,7 @@
     gnome-calendar \
     gnome-font-viewer \
     gnome-photos \
+    gnome-screenshot \
     gnome-terminal \
     gthumb \
     libwnck3 \
diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire_0.3.34.bb b/meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire_0.3.34.bb
index 0fd4133..2abc64e 100644
--- a/meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire_0.3.34.bb
+++ b/meta-openembedded/meta-multimedia/recipes-multimedia/pipewire/pipewire_0.3.34.bb
@@ -16,7 +16,7 @@
 
 S = "${WORKDIR}/git"
 
-inherit meson pkgconfig systemd manpages gettext useradd
+inherit meson pkgconfig systemd gettext useradd
 
 USERADD_PACKAGES = "${PN}"
 
@@ -27,6 +27,8 @@
                        --gid pipewire --groups audio,video \
                        pipewire"
 
+SYSTEMD_PACKAGES = "${PN} ${PN}-media-session"
+
 # For "EVL", look up https://evlproject.org/ . It involves
 # a specially prepared kernel, and is currently unavailable
 # in Yocto.
@@ -37,11 +39,6 @@
 #
 # libcamera support currently does not build successfully.
 #
-# systemd user service files are disabled because per-user
-# PipeWire instances aren't really something that makes
-# much sense in an embedded environment. A system-wide
-# instance does.
-#
 # manpage generation requires xmltoman, which is not available.
 EXTRA_OEMESON += " \
     -Daudiotestsrc=enabled \
@@ -57,7 +54,8 @@
 
 PACKAGECONFIG ??= "\
     ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
-    ${@bb.utils.filter('DISTRO_FEATURES', 'alsa systemd', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd systemd-system-service', '', d)} \
+    ${@bb.utils.filter('DISTRO_FEATURES', 'alsa', d)} \
     gstreamer jack sndfile pw-cat v4l2 \
 "
 
@@ -66,7 +64,6 @@
 # libjack.so* files, thus colliding with the libpack package. This
 # is why these two are marked in their respective packageconfigs
 # as being in conflict.
-
 PACKAGECONFIG[alsa] = "-Dalsa=enabled,-Dalsa=disabled,alsa-lib udev"
 PACKAGECONFIG[bluez] = "-Dbluez5=enabled,-Dbluez5=disabled,bluez5 sbc"
 PACKAGECONFIG[docs] = "-Ddocs=enabled,-Ddocs=disabled,doxygen-native"
@@ -74,7 +71,12 @@
 PACKAGECONFIG[jack] = "-Djack=enabled,-Djack=disabled,jack,,,pipewire-jack"
 PACKAGECONFIG[sdl2] = "-Dsdl2=enabled,-Dsdl2=disabled,virtual/libsdl2"
 PACKAGECONFIG[sndfile] = "-Dsndfile=enabled,-Dsndfile=disabled,libsndfile1"
-PACKAGECONFIG[systemd] = "-Dsystemd=enabled -Dsystemd-system-service=enabled -Dsystemd-user-service=enabled,-Dsystemd=disabled -Dsystemd-system-service=disabled -Dsystemd-user-service=disabled,systemd"
+PACKAGECONFIG[systemd] = "-Dsystemd=enabled,-Dsystemd=disabled,systemd"
+PACKAGECONFIG[systemd-system-service] = "-Dsystemd-system-service=enabled,-Dsystemd-system-service=disabled,systemd"
+# "systemd-user-service" packageconfig  will only install service
+# files to rootfs but not enable them as systemd.bbclass
+# currently lacks the feature of enabling user services.
+PACKAGECONFIG[systemd-user-service] = "-Dsystemd-user-service=enabled,-Dsystemd-user-service=disabled,systemd"
 # pw-cat needs sndfile packageconfig to be enabled
 PACKAGECONFIG[pw-cat] = "-Dpw-cat=enabled,-Dpw-cat=disabled"
 PACKAGECONFIG[v4l2] = "-Dv4l2=enabled,-Dv4l2=disabled,udev"
@@ -189,7 +191,7 @@
 
 PACKAGES_DYNAMIC = "^${PN}-spa-plugins.* ^${PN}-modules.*"
 
-SYSTEMD_SERVICE:${PN} = "pipewire.service"
+SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'systemd-system-service', 'pipewire.service', '', d)}"
 CONFFILES:${PN} += "${datadir}/pipewire/pipewire.conf"
 FILES:${PN} = " \
     ${datadir}/pipewire/pipewire.conf \
@@ -246,7 +248,7 @@
 
 # Example session manager. Not intended for use in production.
 CONFFILES:${PN}-media-session = "${datadir}/pipewire/media-session.d/*"
-SYSTEMD_SERVICE:${PN}-media-session = "pipewire-media-session.service"
+SYSTEMD_SERVICE:${PN}-media-session = "${@bb.utils.contains('PACKAGECONFIG', 'systemd-system-service', 'pipewire-media-session.service', '', d)}"
 FILES:${PN}-media-session = " \
     ${bindir}/pipewire-media-session \
     ${datadir}/pipewire/media-session.d/* \
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/bluepy/bluepy/0001-bluepy-Fix-username-issue-with-tarballs.patch b/meta-openembedded/meta-networking/recipes-connectivity/bluepy/bluepy/0001-bluepy-Fix-username-issue-with-tarballs.patch
new file mode 100644
index 0000000..93b367a
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/bluepy/bluepy/0001-bluepy-Fix-username-issue-with-tarballs.patch
@@ -0,0 +1,32 @@
+From 318a0e7dfaa0f5f233a20c0b347948c8004cf6af Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 20 Oct 2021 14:02:09 -0700
+Subject: [PATCH] bluepy: Fix username issue with tarballs
+
+Fixes
+Cannot change ownership to uid 1000, gid 1000: Operation not permitted
+
+Upstream-Status: Submitted [https://github.com/IanHarvey/bluepy/pull/462]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ bluepy/Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/bluepy/Makefile
++++ b/bluepy/Makefile
+@@ -30,13 +30,13 @@ bluepy-helper: $(LOCAL_SRCS) $(IMPORT_SR
+ 	$(CC) -L. $(CFLAGS) $(CPPFLAGS) -o $@ $(LOCAL_SRCS) $(IMPORT_SRCS) $(LDLIBS)
+ 
+ $(IMPORT_SRCS): bluez-src.tgz
+-	tar xzf $<
++	tar xzf $< --no-same-owner
+ 	touch $(IMPORT_SRCS)
+ 
+ .PHONY: bluez-tarfile
+ 
+ bluez-tarfile:
+-	(cd ..; tar czf bluepy/bluez-src.tgz $(BLUEZ_PATH))
++	(cd ..; tar czf bluepy/bluez-src.tgz $(BLUEZ_PATH) --no-same-owner)
+ 
+ GET_SERVICES=get_services.py
+ 
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/bluepy/bluepy_git.bb b/meta-openembedded/meta-networking/recipes-connectivity/bluepy/bluepy_git.bb
new file mode 100644
index 0000000..887870f
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/bluepy/bluepy_git.bb
@@ -0,0 +1,20 @@
+DESCRIPTION = "Python interface to Bluetooth LE on Linux"
+HOMEPAGE = "https://github.com/IanHarvey/bluepy"
+SECTION = "devel/python"
+LICENSE = "GPLv2 & PD"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=59e0d45ea684dda215889aa1b5acd001"
+DEPENDS = "glib-2.0"
+SRCREV = "7ad565231a97c304c0eff45f2649cd005e69db09"
+PV = "1.3.0+git${SRCPV}"
+
+SRC_URI = "git://github.com/IanHarvey/bluepy.git;protocol=https \
+           file://0001-bluepy-Fix-username-issue-with-tarballs.patch \
+          "
+
+S = "${WORKDIR}/git"
+
+inherit setuptools3 pkgconfig
+
+RDEPENDS:${PN} = "bluez5"
+
+TARGET_CC_ARCH += "${LDFLAGS}"
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/nanomsg/nng_1.4.0.bb b/meta-openembedded/meta-networking/recipes-connectivity/nanomsg/nng_1.4.0.bb
deleted file mode 100644
index 49e2015..0000000
--- a/meta-openembedded/meta-networking/recipes-connectivity/nanomsg/nng_1.4.0.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-SUMMARY = "nanomsg-next-generation -- light-weight brokerless messaging"
-DESCRIPTION = "NNG, like its predecessors nanomsg (and to some extent ZeroMQ), is a lightweight, broker-less library, offering a simple API to solve common recurring messaging problems, such as publish/subscribe, RPC-style request/reply, or service discovery."
-HOMEPAGE = "https://github.com/nanomsg/nng"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a41e579bb4326c21c774f8e51e41d8a3"
-
-SECTION = "libs/networking"
-
-SRCREV = "d020adda8f0348d094790618703b8341a26007a3"
-
-SRC_URI = "git://github.com/nanomsg/nng.git"
-
-S = "${WORKDIR}/git"
-
-inherit cmake pkgconfig
-
-EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON -DNNG_ENABLE_NNGCAT=ON"
-
-PACKAGECONFIG ??= ""
-
-PACKAGECONFIG[mbedtls] = "-DNNG_ENABLE_TLS=ON,-DNNG_ENABLE_TLS=OFF,mbedtls"
-
-PACKAGES =+ "${PN}-tools"
-FILES:${PN}-tools = "${bindir}/*"
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/nanomsg/nng_1.5.2.bb b/meta-openembedded/meta-networking/recipes-connectivity/nanomsg/nng_1.5.2.bb
new file mode 100644
index 0000000..1ffd891
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/nanomsg/nng_1.5.2.bb
@@ -0,0 +1,22 @@
+SUMMARY = "nanomsg-next-generation -- light-weight brokerless messaging"
+DESCRIPTION = "NNG, like its predecessors nanomsg (and to some extent ZeroMQ), is a lightweight, broker-less library, offering a simple API to solve common recurring messaging problems, such as publish/subscribe, RPC-style request/reply, or service discovery."
+HOMEPAGE = "https://github.com/nanomsg/nng"
+SECTION = "libs/networking"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a41e579bb4326c21c774f8e51e41d8a3"
+
+SRC_URI = "git://github.com/nanomsg/nng.git"
+SRCREV = "169221da8d53b2ca4fda76f894bee8505887a7c6"
+
+S = "${WORKDIR}/git"
+
+inherit cmake pkgconfig
+
+EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON -DNNG_ENABLE_NNGCAT=ON"
+
+PACKAGECONFIG ??= ""
+
+PACKAGECONFIG[mbedtls] = "-DNNG_ENABLE_TLS=ON,-DNNG_ENABLE_TLS=OFF,mbedtls"
+
+PACKAGES =+ "${PN}-tools"
+FILES:${PN}-tools = "${bindir}/*"
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan/0001-Makefile-do-not-use-Werror.patch b/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan/0001-Makefile-do-not-use-Werror.patch
new file mode 100644
index 0000000..ddc44c3
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan/0001-Makefile-do-not-use-Werror.patch
@@ -0,0 +1,23 @@
+From a06c77557ed951249d5b344441ad6ec57410e63f Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex@linutronix.de>
+Date: Sun, 3 Oct 2021 21:52:16 +0200
+Subject: [PATCH] Makefile: do not use -Werror
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ Makefile | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 8645aee..50fc0da 100644
+--- a/Makefile
++++ b/Makefile
+@@ -7,7 +7,6 @@ BUILDFLAGS = \
+ 	-D_XOPEN_SOURCE=500 \
+ 	-DSBINDIR=\"$(SBINDIR)\" \
+ 	-Wall \
+-	-Werror \
+ 	$(NULL)
+ 
+ SYSTEMD_GENERATOR_DIR=$(shell pkg-config --variable=systemdsystemgeneratordir systemd)
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan/0001-don-t-fail-if-GLOB_BRACE-is-not-defined.patch b/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan/0001-don-t-fail-if-GLOB_BRACE-is-not-defined.patch
index 0fa6ba4..c7d371d 100644
--- a/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan/0001-don-t-fail-if-GLOB_BRACE-is-not-defined.patch
+++ b/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan/0001-don-t-fail-if-GLOB_BRACE-is-not-defined.patch
@@ -1,16 +1,19 @@
-From ceb4111af317ecc54d97bb21878dcccbfdb2983e Mon Sep 17 00:00:00 2001
+From e0df1f07d1707d5daf0358cc60b30f06121f7e60 Mon Sep 17 00:00:00 2001
 From: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
 Date: Fri, 25 Dec 2020 11:41:43 +0900
 Subject: [PATCH] don't fail if GLOB_BRACE is not defined
 
 Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
+
 ---
  src/util.c | 6 ++++++
  1 file changed, 6 insertions(+)
 
+diff --git a/src/util.c b/src/util.c
+index a4c0dba..fd4542d 100644
 --- a/src/util.c
 +++ b/src/util.c
-@@ -24,6 +24,12 @@
+@@ -25,6 +25,12 @@
  #include "util.h"
  #include "netplan.h"
  
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan_0.103.bb b/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan_0.103.bb
index 682a6b6..3527bce 100644
--- a/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan_0.103.bb
+++ b/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan_0.103.bb
@@ -15,7 +15,9 @@
 PV = "0.103"
 
 SRC_URI = "git://github.com/CanonicalLtd/netplan.git;branch=main \
-           file://0001-parse-nm-fix-32bit-format-string.patch"
+           file://0001-parse-nm-fix-32bit-format-string.patch \
+           file://0001-Makefile-do-not-use-Werror.patch \
+           "
 
 SRC_URI:append:libc-musl = " file://0001-don-t-fail-if-GLOB_BRACE-is-not-defined.patch"
 
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.8.14.bb b/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.8.14.bb
deleted file mode 100644
index 9f3054a..0000000
--- a/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.8.14.bb
+++ /dev/null
@@ -1,53 +0,0 @@
-SUMMARY = "NetworkManager-openvpn-plugin"
-SECTION = "net/misc"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=100d5a599bead70ddcd70dcd73f2e29c"
-
-DEPENDS = "dbus dbus-glib networkmanager openvpn intltool-native glib-2.0-native"
-
-inherit gnomebase useradd gettext systemd
-
-SRC_URI = "${GNOME_MIRROR}/NetworkManager-openvpn/${@gnome_verdir("${PV}")}/NetworkManager-openvpn-${PV}.tar.xz"
-
-SRC_URI[md5sum] = "bef67eca77bee68da703609b92f804a0"
-SRC_URI[sha256sum] = "e7419053fc3b5a7e25f1a7517c313ad4531b6ea280255524ebb85a70c76fdbeb"
-
-S = "${WORKDIR}/NetworkManager-openvpn-${PV}"
-
-# meta-gnome in layers is required using gnome:
-PACKAGECONFIG[gnome] = "--with-gnome,--without-gnome,gtk+3 libnma libsecret"
-
-do_configure:append() {
-    # network-manager-openvpn.metainfo.xml is created in source folder but
-    # compile expects it in build folder. As long as nobody comes up with a
-    # better solution just support build:
-    if [ -e ${S}/appdata/network-manager-openvpn.metainfo.xml ]; then
-        mkdir -p ${B}/appdata
-        cp -f ${S}/appdata/network-manager-openvpn.metainfo.xml ${B}/appdata/
-    fi
-}
-
-do_install:append () {
-    rm -rf ${D}${libdir}/NetworkManager/*.la
-}
-
-# Create user and group nm-openvpn that are needed since version 1.0.6
-USERADD_PACKAGES = "${PN}"
-USERADD_PARAM:${PN} = "--system nm-openvpn"
-
-FILES:${PN} += " \
-    ${datadir}/dbus-1 \
-    ${datadir}/metainfo \
-    ${libdir}/NetworkManager/*.so \
-    ${nonarch_libdir}/NetworkManager/VPN/nm-openvpn-service.name \
-"
-
-FILES:${PN}-staticdev += " \
-    ${libdir}/NetworkManager/*.a \
-"
-
-RDEPENDS:${PN} = " \
-    networkmanager \
-    openvpn \
-"
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.8.16.bb b/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.8.16.bb
new file mode 100644
index 0000000..19cac13
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.8.16.bb
@@ -0,0 +1,52 @@
+SUMMARY = "NetworkManager-openvpn-plugin"
+SECTION = "net/misc"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=100d5a599bead70ddcd70dcd73f2e29c"
+
+DEPENDS = "dbus dbus-glib networkmanager openvpn intltool-native glib-2.0-native"
+
+inherit gnomebase useradd gettext systemd
+
+SRC_URI = "${GNOME_MIRROR}/NetworkManager-openvpn/${@gnome_verdir("${PV}")}/NetworkManager-openvpn-${PV}.tar.xz"
+
+SRC_URI[sha256sum] = "8920de09c7ae5f1f520c83f844455db8faec31427350268fe2dd95b860f91fb5"
+
+S = "${WORKDIR}/NetworkManager-openvpn-${PV}"
+
+# meta-gnome in layers is required using gnome:
+PACKAGECONFIG[gnome] = "--with-gnome,--without-gnome,gtk+3 libnma libsecret"
+
+do_configure:append() {
+    # network-manager-openvpn.metainfo.xml is created in source folder but
+    # compile expects it in build folder. As long as nobody comes up with a
+    # better solution just support build:
+    if [ -e ${S}/appdata/network-manager-openvpn.metainfo.xml ]; then
+        mkdir -p ${B}/appdata
+        cp -f ${S}/appdata/network-manager-openvpn.metainfo.xml ${B}/appdata/
+    fi
+}
+
+do_install:append () {
+    rm -rf ${D}${libdir}/NetworkManager/*.la
+}
+
+# Create user and group nm-openvpn that are needed since version 1.0.6
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM:${PN} = "--system nm-openvpn"
+
+FILES:${PN} += " \
+    ${datadir}/dbus-1 \
+    ${datadir}/metainfo \
+    ${libdir}/NetworkManager/*.so \
+    ${nonarch_libdir}/NetworkManager/VPN/nm-openvpn-service.name \
+"
+
+FILES:${PN}-staticdev += " \
+    ${libdir}/NetworkManager/*.a \
+"
+
+RDEPENDS:${PN} = " \
+    networkmanager \
+    openvpn \
+"
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.32.10.bb b/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.32.10.bb
deleted file mode 100644
index 89f9554..0000000
--- a/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.32.10.bb
+++ /dev/null
@@ -1,180 +0,0 @@
-SUMMARY = "NetworkManager"
-HOMEPAGE = "https://wiki.gnome.org/Projects/NetworkManager"
-SECTION = "net/misc"
-
-LICENSE = "GPLv2+ & LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    file://COPYING.LGPL;md5=4fbd65380cdd255951079008b364516c \
-"
-
-DEPENDS = " \
-    intltool-native \
-    libxslt-native \
-    libnl \
-    udev \
-    util-linux \
-    libndp \
-    libnewt \
-    curl \
-"
-
-inherit gnomebase gettext update-rc.d systemd vala gobject-introspection gtk-doc update-alternatives upstream-version-is-even
-
-SRC_URI = " \
-    ${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManager-${PV}.tar.xz \
-    file://${BPN}.initd \
-    file://0001-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch \
-    file://0002-Do-not-create-settings-settings-property-documentati.patch \
-    file://0003-install-firewalld-to-var-libdir-rather-than-hardcod-.patch \
-"
-SRC_URI[sha256sum] = "3e5ccc66805659e3f11a718e3a599f9726b79a01d6ff14814be6ad8bc5da8bb8"
-
-S = "${WORKDIR}/NetworkManager-${PV}"
-
-EXTRA_OECONF = " \
-    --disable-ifcfg-rh \
-    --disable-more-warnings \
-    --with-iptables=${sbindir}/iptables \
-    --with-tests \
-    --with-nmtui=yes \
-    --with-udev-dir=${nonarch_base_libdir}/udev \
-    --with-dhclient=no \
-    --with-dhcpcd=no \
-    --with-dhcpcanon=no \
-    --with-netconfig=no \
-"
-
-# stolen from https://github.com/void-linux/void-packages/blob/master/srcpkgs/NetworkManager/template
-# avoids:
-# | ../NetworkManager-1.16.0/libnm-core/nm-json.c:106:50: error: 'RTLD_DEEPBIND' undeclared (first use in this function); did you mean 'RTLD_DEFAULT'?
-CFLAGS:append:libc-musl = " \
-    -DRTLD_DEEPBIND=0 \
-"
-
-do_compile:prepend() {
-    export GIR_EXTRA_LIBS_PATH="${B}/src/libnm-client-impl/.libs"
-}
-
-PACKAGECONFIG ??= "nss ifupdown dnsmasq nmcli \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d), d)} \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez5', '', d)} \
-    ${@bb.utils.filter('DISTRO_FEATURES', 'wifi polkit', d)} \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux audit', '', d)} \
-"
-
-inherit ${@bb.utils.contains('PACKAGECONFIG', 'nmcli', 'bash-completion', '', d)}
-
-PACKAGECONFIG[systemd] = " \
-    --with-systemdsystemunitdir=${systemd_unitdir}/system --with-session-tracking=systemd, \
-    --without-systemdsystemunitdir, \
-"
-PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit,polkit"
-PACKAGECONFIG[bluez5] = "--enable-bluez5-dun,--disable-bluez5-dun,bluez5"
-# consolekit is not picked by shlibs, so add it to RDEPENDS too
-PACKAGECONFIG[consolekit] = "--with-session-tracking=consolekit,,consolekit,consolekit"
-PACKAGECONFIG[modemmanager] = "--with-modem-manager-1=yes,--with-modem-manager-1=no,modemmanager"
-PACKAGECONFIG[ppp] = "--enable-ppp,--disable-ppp,ppp,ppp"
-PACKAGECONFIG[dnsmasq] = "--with-dnsmasq=${bindir}/dnsmasq"
-PACKAGECONFIG[nss] = "--with-crypto=nss,,nss"
-PACKAGECONFIG[resolvconf] = "--with-resolvconf=${base_sbindir}/resolvconf,,,resolvconf"
-PACKAGECONFIG[gnutls] = "--with-crypto=gnutls,,gnutls"
-PACKAGECONFIG[wifi] = "--with-wext=yes --enable-wifi=yes,--with-wext=no --enable-wifi=no,,wpa-supplicant"
-PACKAGECONFIG[ifupdown] = "--enable-ifupdown,--disable-ifupdown"
-PACKAGECONFIG[qt4-x11-free] = "--enable-qt,--disable-qt,qt4-x11-free"
-PACKAGECONFIG[cloud-setup] = "--with-nm-cloud-setup=yes,--with-nm-cloud-setup=no"
-PACKAGECONFIG[nmcli] = "--with-nmcli=yes,--with-nmcli=no,readline"
-PACKAGECONFIG[ovs] = "--enable-ovs,--disable-ovs,jansson"
-PACKAGECONFIG[audit] = "--with-libaudit,--without-libaudit,audit"
-PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux"
-
-PACKAGES =+ " \
-  ${PN}-nmcli ${PN}-nmcli-doc \
-  ${PN}-nmtui ${PN}-nmtui-doc \
-  ${PN}-adsl ${PN}-cloud-setup \
-"
-
-SYSTEMD_PACKAGES = "${PN} ${PN}-cloud-setup"
-
-FILES:${PN}-adsl = "${libdir}/NetworkManager/${PV}/libnm-device-plugin-adsl.so"
-
-FILES:${PN}-cloud-setup = " \
-    ${libexecdir}/nm-cloud-setup \
-    ${systemd_system_unitdir}/nm-cloud-setup.service \
-    ${systemd_system_unitdir}/nm-cloud-setup.timer \
-    ${libdir}/NetworkManager/dispatcher.d/90-nm-cloud-setup.sh \
-    ${libdir}/NetworkManager/dispatcher.d/no-wait.d/90-nm-cloud-setup.sh \
-"
-ALLOW_EMPTY:${PN}-cloud-setup = "1"
-SYSTEMD_SERVICE:${PN}-cloud-setup = "${@bb.utils.contains('PACKAGECONFIG', 'cloud-setup', 'nm-cloud-setup.service nm-cloud-setup.timer', '', d)}"
-
-FILES:${PN} += " \
-    ${libexecdir} \
-    ${libdir}/NetworkManager/${PV}/*.so \
-    ${libdir}/NetworkManager \
-    ${libdir}/firewalld/zones \
-    ${nonarch_libdir}/NetworkManager/conf.d \
-    ${nonarch_libdir}/NetworkManager/dispatcher.d \
-    ${nonarch_libdir}/NetworkManager/dispatcher.d/pre-down.d \
-    ${nonarch_libdir}/NetworkManager/dispatcher.d/pre-up.d \
-    ${nonarch_libdir}/NetworkManager/dispatcher.d/no-wait.d \
-    ${nonarch_libdir}/NetworkManager/VPN \
-    ${nonarch_libdir}/NetworkManager/system-connections \
-    ${datadir}/polkit-1 \
-    ${datadir}/dbus-1 \
-    ${nonarch_base_libdir}/udev/* \
-    ${systemd_system_unitdir} \
-    ${libdir}/pppd \
-"
-
-RRECOMMENDS:${PN} += "iptables \
-    ${@bb.utils.filter('PACKAGECONFIG', 'dnsmasq', d)} \
-"
-RCONFLICTS:${PN} = "connman"
-
-FILES:${PN}-dev += " \
-    ${datadir}/NetworkManager/gdb-cmd \
-    ${libdir}/pppd/*/*.la \
-    ${libdir}/NetworkManager/*.la \
-    ${libdir}/NetworkManager/${PV}/*.la \
-"
-
-FILES:${PN}-nmcli = " \
-    ${bindir}/nmcli \
-"
-
-FILES:${PN}-nmcli-doc = " \
-    ${mandir}/man1/nmcli* \
-"
-
-FILES:${PN}-nmtui = " \
-    ${bindir}/nmtui \
-    ${bindir}/nmtui-edit \
-    ${bindir}/nmtui-connect \
-    ${bindir}/nmtui-hostname \
-"
-
-FILES:${PN}-nmtui-doc = " \
-    ${mandir}/man1/nmtui* \
-"
-
-INITSCRIPT_NAME = "network-manager"
-SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'NetworkManager.service NetworkManager-dispatcher.service', '', d)}"
-
-ALTERNATIVE_PRIORITY = "100"
-ALTERNATIVE:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','resolv-conf','',d)}"
-ALTERNATIVE_TARGET[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv-conf.NetworkManager','',d)}"
-ALTERNATIVE_LINK_NAME[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv.conf','',d)}"
-
-do_install:append() {
-    install -Dm 0755 ${WORKDIR}/${BPN}.initd ${D}${sysconfdir}/init.d/network-manager
-
-    rm -rf ${D}/run ${D}${localstatedir}/run
-
-    if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
-        # For read-only filesystem, do not create links during bootup
-        ln -sf ../run/NetworkManager/resolv.conf ${D}${sysconfdir}/resolv-conf.NetworkManager
-
-        # systemd v210 and newer do not need this rule file
-        rm ${D}/${nonarch_base_libdir}/udev/rules.d/84-nm-drivers.rules
-    fi
-}
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.32.12.bb b/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.32.12.bb
new file mode 100644
index 0000000..c45452f
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.32.12.bb
@@ -0,0 +1,180 @@
+SUMMARY = "NetworkManager"
+HOMEPAGE = "https://wiki.gnome.org/Projects/NetworkManager"
+SECTION = "net/misc"
+
+LICENSE = "GPLv2+ & LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://COPYING.LGPL;md5=4fbd65380cdd255951079008b364516c \
+"
+
+DEPENDS = " \
+    intltool-native \
+    libxslt-native \
+    libnl \
+    udev \
+    util-linux \
+    libndp \
+    libnewt \
+    curl \
+"
+
+inherit gnomebase gettext update-rc.d systemd vala gobject-introspection gtk-doc update-alternatives upstream-version-is-even
+
+SRC_URI = " \
+    ${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManager-${PV}.tar.xz \
+    file://${BPN}.initd \
+    file://0001-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch \
+    file://0002-Do-not-create-settings-settings-property-documentati.patch \
+    file://0003-install-firewalld-to-var-libdir-rather-than-hardcod-.patch \
+"
+SRC_URI[sha256sum] = "a8ab36a0a502fe73cd8e3bacb6585f97fbb94ebef79e276cdbaf11c33ff8f54b"
+
+S = "${WORKDIR}/NetworkManager-${PV}"
+
+EXTRA_OECONF = " \
+    --disable-ifcfg-rh \
+    --disable-more-warnings \
+    --with-iptables=${sbindir}/iptables \
+    --with-tests \
+    --with-nmtui=yes \
+    --with-udev-dir=${nonarch_base_libdir}/udev \
+    --with-dhclient=no \
+    --with-dhcpcd=no \
+    --with-dhcpcanon=no \
+    --with-netconfig=no \
+"
+
+# stolen from https://github.com/void-linux/void-packages/blob/master/srcpkgs/NetworkManager/template
+# avoids:
+# | ../NetworkManager-1.16.0/libnm-core/nm-json.c:106:50: error: 'RTLD_DEEPBIND' undeclared (first use in this function); did you mean 'RTLD_DEFAULT'?
+CFLAGS:append:libc-musl = " \
+    -DRTLD_DEEPBIND=0 \
+"
+
+do_compile:prepend() {
+    export GIR_EXTRA_LIBS_PATH="${B}/src/libnm-client-impl/.libs"
+}
+
+PACKAGECONFIG ??= "nss ifupdown dnsmasq nmcli \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d), d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez5', '', d)} \
+    ${@bb.utils.filter('DISTRO_FEATURES', 'wifi polkit', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux audit', '', d)} \
+"
+
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'nmcli', 'bash-completion', '', d)}
+
+PACKAGECONFIG[systemd] = " \
+    --with-systemdsystemunitdir=${systemd_unitdir}/system --with-session-tracking=systemd, \
+    --without-systemdsystemunitdir, \
+"
+PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit,polkit"
+PACKAGECONFIG[bluez5] = "--enable-bluez5-dun,--disable-bluez5-dun,bluez5"
+# consolekit is not picked by shlibs, so add it to RDEPENDS too
+PACKAGECONFIG[consolekit] = "--with-session-tracking=consolekit,,consolekit,consolekit"
+PACKAGECONFIG[modemmanager] = "--with-modem-manager-1=yes,--with-modem-manager-1=no,modemmanager"
+PACKAGECONFIG[ppp] = "--enable-ppp,--disable-ppp,ppp,ppp"
+PACKAGECONFIG[dnsmasq] = "--with-dnsmasq=${bindir}/dnsmasq"
+PACKAGECONFIG[nss] = "--with-crypto=nss,,nss"
+PACKAGECONFIG[resolvconf] = "--with-resolvconf=${base_sbindir}/resolvconf,,,resolvconf"
+PACKAGECONFIG[gnutls] = "--with-crypto=gnutls,,gnutls"
+PACKAGECONFIG[wifi] = "--with-wext=yes --enable-wifi=yes,--with-wext=no --enable-wifi=no,,wpa-supplicant"
+PACKAGECONFIG[ifupdown] = "--enable-ifupdown,--disable-ifupdown"
+PACKAGECONFIG[qt4-x11-free] = "--enable-qt,--disable-qt,qt4-x11-free"
+PACKAGECONFIG[cloud-setup] = "--with-nm-cloud-setup=yes,--with-nm-cloud-setup=no"
+PACKAGECONFIG[nmcli] = "--with-nmcli=yes,--with-nmcli=no,readline"
+PACKAGECONFIG[ovs] = "--enable-ovs,--disable-ovs,jansson"
+PACKAGECONFIG[audit] = "--with-libaudit,--without-libaudit,audit"
+PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux"
+
+PACKAGES =+ " \
+  ${PN}-nmcli ${PN}-nmcli-doc \
+  ${PN}-nmtui ${PN}-nmtui-doc \
+  ${PN}-adsl ${PN}-cloud-setup \
+"
+
+SYSTEMD_PACKAGES = "${PN} ${PN}-cloud-setup"
+
+FILES:${PN}-adsl = "${libdir}/NetworkManager/${PV}/libnm-device-plugin-adsl.so"
+
+FILES:${PN}-cloud-setup = " \
+    ${libexecdir}/nm-cloud-setup \
+    ${systemd_system_unitdir}/nm-cloud-setup.service \
+    ${systemd_system_unitdir}/nm-cloud-setup.timer \
+    ${libdir}/NetworkManager/dispatcher.d/90-nm-cloud-setup.sh \
+    ${libdir}/NetworkManager/dispatcher.d/no-wait.d/90-nm-cloud-setup.sh \
+"
+ALLOW_EMPTY:${PN}-cloud-setup = "1"
+SYSTEMD_SERVICE:${PN}-cloud-setup = "${@bb.utils.contains('PACKAGECONFIG', 'cloud-setup', 'nm-cloud-setup.service nm-cloud-setup.timer', '', d)}"
+
+FILES:${PN} += " \
+    ${libexecdir} \
+    ${libdir}/NetworkManager/${PV}/*.so \
+    ${libdir}/NetworkManager \
+    ${libdir}/firewalld/zones \
+    ${nonarch_libdir}/NetworkManager/conf.d \
+    ${nonarch_libdir}/NetworkManager/dispatcher.d \
+    ${nonarch_libdir}/NetworkManager/dispatcher.d/pre-down.d \
+    ${nonarch_libdir}/NetworkManager/dispatcher.d/pre-up.d \
+    ${nonarch_libdir}/NetworkManager/dispatcher.d/no-wait.d \
+    ${nonarch_libdir}/NetworkManager/VPN \
+    ${nonarch_libdir}/NetworkManager/system-connections \
+    ${datadir}/polkit-1 \
+    ${datadir}/dbus-1 \
+    ${nonarch_base_libdir}/udev/* \
+    ${systemd_system_unitdir} \
+    ${libdir}/pppd \
+"
+
+RRECOMMENDS:${PN} += "iptables \
+    ${@bb.utils.filter('PACKAGECONFIG', 'dnsmasq', d)} \
+"
+RCONFLICTS:${PN} = "connman"
+
+FILES:${PN}-dev += " \
+    ${datadir}/NetworkManager/gdb-cmd \
+    ${libdir}/pppd/*/*.la \
+    ${libdir}/NetworkManager/*.la \
+    ${libdir}/NetworkManager/${PV}/*.la \
+"
+
+FILES:${PN}-nmcli = " \
+    ${bindir}/nmcli \
+"
+
+FILES:${PN}-nmcli-doc = " \
+    ${mandir}/man1/nmcli* \
+"
+
+FILES:${PN}-nmtui = " \
+    ${bindir}/nmtui \
+    ${bindir}/nmtui-edit \
+    ${bindir}/nmtui-connect \
+    ${bindir}/nmtui-hostname \
+"
+
+FILES:${PN}-nmtui-doc = " \
+    ${mandir}/man1/nmtui* \
+"
+
+INITSCRIPT_NAME = "network-manager"
+SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'NetworkManager.service NetworkManager-dispatcher.service', '', d)}"
+
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','resolv-conf','',d)}"
+ALTERNATIVE_TARGET[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv-conf.NetworkManager','',d)}"
+ALTERNATIVE_LINK_NAME[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv.conf','',d)}"
+
+do_install:append() {
+    install -Dm 0755 ${WORKDIR}/${BPN}.initd ${D}${sysconfdir}/init.d/network-manager
+
+    rm -rf ${D}/run ${D}${localstatedir}/run
+
+    if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+        # For read-only filesystem, do not create links during bootup
+        ln -sf ../run/NetworkManager/resolv.conf ${D}${sysconfdir}/resolv-conf.NetworkManager
+
+        # systemd v210 and newer do not need this rule file
+        rm ${D}/${nonarch_base_libdir}/udev/rules.d/84-nm-drivers.rules
+    fi
+}
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.14.7.bb b/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.14.7.bb
deleted file mode 100644
index 47fcd3a..0000000
--- a/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.14.7.bb
+++ /dev/null
@@ -1,346 +0,0 @@
-HOMEPAGE = "https://www.samba.org/"
-SECTION = "console/network"
-
-LICENSE = "GPL-3.0+ & LGPL-3.0+ & GPL-2.0+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
-                    file://${COREBASE}/meta/files/common-licenses/LGPL-3.0-or-later;md5=c51d3eef3be114124d11349ca0d7e117 \
-                    file://${COREBASE}/meta/files/common-licenses/GPL-2.0-or-later;md5=fed54355545ffd980b814dab4a3b312c"
-
-SAMBA_MIRROR = "http://samba.org/samba/ftp"
-MIRRORS += "\
-${SAMBA_MIRROR}    http://mirror.internode.on.net/pub/samba \n \
-${SAMBA_MIRROR}    http://www.mirrorservice.org/sites/ftp.samba.org \n \
-"
-
-SRC_URI = "${SAMBA_MIRROR}/stable/samba-${PV}.tar.gz \
-           file://smb.conf \
-           file://volatiles.03_samba \
-           file://0001-Don-t-check-xsltproc-manpages.patch \
-           file://0002-do-not-import-target-module-while-cross-compile.patch \
-           file://0003-Add-config-option-without-valgrind.patch \
-           file://0004-Add-options-to-configure-the-use-of-libbsd.patch \
-           file://0005-samba-build-dnsserver_common-code.patch \
-           file://0006-samba-defeat-iconv-test.patch \
-           file://0007-wscript_configure_system_gnutls-disable-check-gnutls.patch \
-           file://0008-source3-wscript-disable-check-fcntl-F_OWNER_EX.patch \
-           file://0009-source3-wscript-disable-check-fcntl-RW_HINTS.patch \
-           "
-
-SRC_URI:append:libc-musl = " \
-           file://netdb_defines.patch \
-           file://samba-pam.patch \
-           file://samba-4.3.9-remove-getpwent_r.patch \
-           file://cmocka-uintptr_t.patch \
-           file://samba-fix-musl-lib-without-innetgr.patch \
-           "
-
-SRC_URI[md5sum] = "f0db8302944bb861b31f4163fd302f66"
-SRC_URI[sha256sum] = "6f50353f9602aa20245eb18ceb00e7e5ec793df0974aebd5254c38f16d8f1906"
-
-UPSTREAM_CHECK_REGEX = "samba\-(?P<pver>4\.14(\.\d+)+).tar.gz"
-
-inherit systemd waf-samba cpan-base perlnative update-rc.d perl-version pkgconfig
-
-# CVE-2011-2411 is valnerble only on HP NonStop Servers.
-CVE_CHECK_WHITELIST += "CVE-2011-2411" 
-
-# remove default added RDEPENDS on perl
-RDEPENDS:${PN}:remove = "perl"
-
-DEPENDS += "readline virtual/libiconv zlib popt libtalloc libtdb libtevent libldb libaio libpam libtasn1 jansson libparse-yapp-perl-native gnutls"
-
-inherit features_check
-REQUIRED_DISTRO_FEATURES = "pam"
-
-DEPENDS:append:libc-musl = " libtirpc"
-CFLAGS:append:libc-musl = " -I${STAGING_INCDIR}/tirpc"
-LDFLAGS:append:libc-musl = " -ltirpc"
-
-COMPATIBLE_HOST:riscv32 = "null"
-
-INITSCRIPT_NAME = "samba"
-INITSCRIPT_PARAMS = "start 20 3 5 . stop 20 0 1 6 ."
-
-SYSTEMD_PACKAGES = "${PN}-base ${PN}-ad-dc winbind"
-SYSTEMD_SERVICE:${PN}-base = "nmb.service smb.service"
-SYSTEMD_SERVICE:${PN}-ad-dc = "${@bb.utils.contains('PACKAGECONFIG', 'ad-dc', 'samba.service', '', d)}"
-SYSTEMD_SERVICE:winbind = "winbind.service"
-
-# There are prerequisite settings to enable ad-dc, so disable the service by default.
-# Reference:
-# https://wiki.samba.org/index.php/Setting_up_Samba_as_an_Active_Directory_Domain_Controller
-SYSTEMD_AUTO_ENABLE:${PN}-ad-dc = "disable"
-
-#cross_compile cannot use preforked process, since fork process earlier than point subproces.popen
-#to cross Popen
-export WAF_NO_PREFORK="yes"
-
-# Use krb5.  Build active domain controller.
-#
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd zeroconf', d)} \
-                   acl cups ad-dc ldap mitkrb5 \
-"
-
-RDEPENDS:${PN}-ctdb-tests += "bash util-linux-getopt"
-
-PACKAGECONFIG[acl] = "--with-acl-support,--without-acl-support,acl"
-PACKAGECONFIG[fam] = "--with-fam,--without-fam,gamin"
-PACKAGECONFIG[cups] = "--enable-cups,--disable-cups,cups"
-PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
-PACKAGECONFIG[sasl] = ",,cyrus-sasl"
-PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd"
-PACKAGECONFIG[dmapi] = "--with-dmapi,--without-dmapi,dmapi"
-PACKAGECONFIG[zeroconf] = "--enable-avahi,--disable-avahi,avahi"
-PACKAGECONFIG[valgrind] = ",--without-valgrind,valgrind,"
-PACKAGECONFIG[lttng] = "--with-lttng, --without-lttng,lttng-ust"
-PACKAGECONFIG[archive] = "--with-libarchive, --without-libarchive, libarchive"
-PACKAGECONFIG[libunwind] = ", , libunwind"
-PACKAGECONFIG[gpgme] = ",--without-gpgme,,"
-PACKAGECONFIG[lmdb] = ",--without-ldb-lmdb,lmdb,"
-PACKAGECONFIG[libbsd] = "--with-libbsd, --without-libbsd, libbsd"
-PACKAGECONFIG[ad-dc] = "--with-experimental-mit-ad-dc,--without-ad-dc,python3-markdown python3-dnspython,"
-PACKAGECONFIG[mitkrb5] = "--with-system-mitkrb5 --with-system-mitkdc=/usr/sbin/krb5kdc,,krb5,"
-
-SAMBA4_IDMAP_MODULES="idmap_ad,idmap_rid,idmap_adex,idmap_hash,idmap_tdb2"
-SAMBA4_PDB_MODULES="pdb_tdbsam,${@bb.utils.contains('PACKAGECONFIG', 'ldap', 'pdb_ldap,', '', d)}pdb_ads,pdb_smbpasswd,pdb_wbc_sam,pdb_samba4"
-SAMBA4_AUTH_MODULES="auth_unix,auth_wbc,auth_server,auth_netlogond,auth_script,auth_samba4"
-SAMBA4_MODULES="${SAMBA4_IDMAP_MODULES},${SAMBA4_PDB_MODULES},${SAMBA4_AUTH_MODULES}"
-
-# These libraries are supposed to replace others supplied by packages, but decorate the names of
-# .so files so there will not be a conflict.  This is not done consistantly, so be very careful
-# when adding to this list.
-#
-SAMBA4_LIBS="heimdal,cmocka,NONE"
-
-EXTRA_OECONF += "--enable-fhs \
-                 --with-piddir=/run \
-                 --with-sockets-dir=/run/samba \
-                 --with-modulesdir=${libdir}/samba \
-                 --with-lockdir=${localstatedir}/lib/samba \
-                 --with-cachedir=${localstatedir}/lib/samba \
-                 --disable-rpath-install \
-                 --with-shared-modules=${SAMBA4_MODULES} \
-                 --bundled-libraries=${SAMBA4_LIBS} \
-                 ${@oe.utils.conditional('TARGET_ARCH', 'x86_64', '', '--disable-glusterfs', d)} \
-                 --with-cluster-support \
-                 --with-profiling-data \
-                 --with-libiconv=${STAGING_DIR_HOST}${prefix} \
-                 --with-pam --with-pammodulesdir=${base_libdir}/security \
-                "
-
-LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
-
-do_configure:append () {
-    cd ${S}/pidl/
-    perl Makefile.PL PREFIX=${prefix}
-    sed -e 's,VENDORPREFIX)/lib/perl,VENDORPREFIX)/${baselib}/perl,g' \
-        -e 's,PERLPREFIX)/lib/perl,PERLPREFIX)/${baselib}/perl,g' -i Makefile
-
-}
-
-do_compile:append () {
-    oe_runmake -C ${S}/pidl
-}
-
-do_install:append() {
-    for section in 1 5 7; do
-        install -d ${D}${mandir}/man$section
-        install -m 0644 ctdb/doc/*.$section ${D}${mandir}/man$section
-    done
-    for section in 1 5 7 8; do
-        install -d ${D}${mandir}/man$section
-        install -m 0644 docs/manpages/*.$section ${D}${mandir}/man$section
-    done
-
-    install -d ${D}${systemd_system_unitdir}
-    install -m 0644 ${S}/bin/default/packaging/systemd/*.service ${D}${systemd_system_unitdir}/
-    sed -e 's,\(ExecReload=\).*\(/kill\),\1${base_bindir}\2,' \
-        -e 's,/etc/sysconfig/samba,${sysconfdir}/default/samba,' \
-        -i ${D}${systemd_system_unitdir}/*.service
-
-    if [ "${@bb.utils.contains('PACKAGECONFIG', 'ad-dc', 'yes', 'no', d)}" = "no" ]; then
-        rm -f ${D}${systemd_system_unitdir}/samba.service
-    fi
-
-    install -d ${D}${sysconfdir}/tmpfiles.d
-    install -m644 packaging/systemd/samba.conf.tmp ${D}${sysconfdir}/tmpfiles.d/samba.conf
-    echo "d ${localstatedir}/log/samba 0755 root root -" \
-        >> ${D}${sysconfdir}/tmpfiles.d/samba.conf
-    install -d ${D}${sysconfdir}/init.d
-    install -m 0755 packaging/sysv/samba.init ${D}${sysconfdir}/init.d/samba
-    sed -e 's,/opt/samba/bin,${sbindir},g' \
-        -e 's,/opt/samba/smb.conf,${sysconfdir}/samba/smb.conf,g' \
-        -e 's,/opt/samba/log,${localstatedir}/log/samba,g' \
-        -e 's,/etc/init.d/samba.server,${sysconfdir}/init.d/samba,g' \
-        -e 's,/usr/bin,${base_bindir},g' \
-        -i ${D}${sysconfdir}/init.d/samba
-
-    install -d ${D}${sysconfdir}/samba
-    echo "127.0.0.1 localhost" > ${D}${sysconfdir}/samba/lmhosts
-    install -m644 ${WORKDIR}/smb.conf ${D}${sysconfdir}/samba/smb.conf
-    install -D -m 644 ${WORKDIR}/volatiles.03_samba ${D}${sysconfdir}/default/volatiles/03_samba
-
-    install -d ${D}${sysconfdir}/default
-    install -m644 packaging/systemd/samba.sysconfig ${D}${sysconfdir}/default/samba
-
-    # the items are from ctdb/tests/run_tests.sh
-    for d in cunit eventd eventscripts onnode shellcheck takeover takeover_helper tool; do
-        testdir=${D}${datadir}/ctdb-tests/UNIT/$d
-        install -d $testdir
-        cp ${S}/ctdb/tests/UNIT/$d/*.sh $testdir
-        cp -r ${S}/ctdb/tests/UNIT/$d/scripts ${S}/ctdb/tests/UNIT/$d/stubs $testdir || true
-    done
-
-    # fix file-rdeps qa warning
-    if [ -f ${D}${bindir}/onnode ]; then
-        sed -i 's:\(#!/bin/\)bash:\1sh:' ${D}${bindir}/onnode
-    fi
-
-    chmod 0750 ${D}${sysconfdir}/sudoers.d || true
-    rm -rf ${D}/run ${D}${localstatedir}/run ${D}${localstatedir}/log
-    
-    for f in samba-gpupdate samba_upgradedns samba_spnupdate samba_kcc samba_dnsupdate samba_downgrade_db; do
-        if [ -f "${D}${sbindir}/$f" ]; then
-            sed -i -e 's,${PYTHON},/usr/bin/env python3,g' ${D}${sbindir}/$f
-        fi
-    done
-    if [ -f "${D}${bindir}/samba-tool" ]; then
-        sed -i -e 's,${PYTHON},/usr/bin/env python3,g' ${D}${bindir}/samba-tool
-    fi
-
-    oe_runmake -C ${S}/pidl DESTDIR=${D} install_vendor
-    find ${D}${libdir}/ -type f -name "perllocal.pod" | xargs rm -f
-    rm -rf ${D}${libdir}/perl5/vendor_perl/${PERLVERSION}/${BUILD_SYS}/auto/Parse/Pidl/.packlist
-    sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${bindir}/pidl
-}
-
-PACKAGES =+ "${PN}-python3 ${PN}-pidl \
-             ${PN}-dsdb-modules ${PN}-testsuite registry-tools \
-             winbind \
-             ${PN}-common ${PN}-base ${PN}-ad-dc ${PN}-ctdb-tests \
-             smbclient ${PN}-client ${PN}-server ${PN}-test"
-
-python samba_populate_packages() {
-    def module_hook(file, pkg, pattern, format, basename):
-        pn = d.getVar('PN')
-        d.appendVar('RRECOMMENDS:%s-base' % pn, ' %s' % pkg)
-
-    mlprefix = d.getVar('MLPREFIX') or ''
-    pam_libdir = d.expand('${base_libdir}/security')
-    pam_pkgname = mlprefix + 'pam-plugin%s'
-    do_split_packages(d, pam_libdir, '^pam_(.*)\.so$', pam_pkgname, 'PAM plugin for %s', extra_depends='', prepend=True)
-
-    libdir = d.getVar('libdir')
-    do_split_packages(d, libdir, '^lib(.*)\.so\..*$', 'lib%s', 'Samba %s library', extra_depends='${PN}-common', prepend=True, allow_links=True)
-    pkglibdir = '%s/samba' % libdir
-    do_split_packages(d, pkglibdir, '^lib(.*)\.so$', 'lib%s', 'Samba %s library', extra_depends='${PN}-common', prepend=True)
-    moduledir = '%s/samba/auth' % libdir
-    do_split_packages(d, moduledir, '^(.*)\.so$', 'samba-auth-%s', 'Samba %s authentication backend', hook=module_hook, extra_depends='', prepend=True)
-    moduledir = '%s/samba/pdb' % libdir
-    do_split_packages(d, moduledir, '^(.*)\.so$', 'samba-pdb-%s', 'Samba %s password backend', hook=module_hook, extra_depends='', prepend=True)
-}
-
-PACKAGESPLITFUNCS:prepend = "samba_populate_packages "
-PACKAGES_DYNAMIC = "samba-auth-.* samba-pdb-.*"
-
-RDEPENDS:${PN} += "${PN}-base ${PN}-python3 ${PN}-dsdb-modules python3"
-RDEPENDS:${PN}-python3 += "pytalloc python3-tdb"
-
-FILES:${PN}-base = "${sbindir}/nmbd \
-                    ${sbindir}/smbd \
-                    ${sysconfdir}/init.d \
-                    ${systemd_system_unitdir}/nmb.service \
-                    ${systemd_system_unitdir}/smb.service"
-
-FILES:${PN}-ad-dc = "${sbindir}/samba \
-                     ${systemd_system_unitdir}/samba.service \
-                     ${libdir}/krb5/plugins/kdb/samba.so \
-"
-RDEPENDS:${PN}-ad-dc = "krb5-kdc"
-
-FILES:${PN}-ctdb-tests = "${bindir}/ctdb_run_tests \
-                          ${bindir}/ctdb_run_cluster_tests \
-                          ${sysconfdir}/ctdb/nodes \
-                          ${datadir}/ctdb-tests \
-                          ${datadir}/ctdb/tests \
-                          ${localstatedir}/lib/ctdb \
-                         "
-
-FILES:${BPN}-common = "${sysconfdir}/default \
-                       ${sysconfdir}/samba \
-                       ${sysconfdir}/tmpfiles.d \
-                       ${localstatedir}/lib/samba \
-                       ${localstatedir}/spool/samba \
-"
-
-FILES:${PN} += "${libdir}/vfs/*.so \
-                ${libdir}/charset/*.so \
-                ${libdir}/*.dat \
-                ${libdir}/auth/*.so \
-                ${datadir}/ctdb/events/* \
-"
-
-FILES:${PN}-dsdb-modules = "${libdir}/samba/ldb"
-
-FILES:${PN}-testsuite = "${bindir}/gentest \
-                         ${bindir}/locktest \
-                         ${bindir}/masktest \
-                         ${bindir}/ndrdump \
-                         ${bindir}/smbtorture"
-
-FILES:registry-tools = "${bindir}/regdiff \
-                        ${bindir}/regpatch \
-                        ${bindir}/regshell \
-                        ${bindir}/regtree"
-
-FILES:winbind = "${sbindir}/winbindd \
-                 ${bindir}/wbinfo \
-                 ${bindir}/ntlm_auth \
-                 ${libdir}/samba/idmap \
-                 ${libdir}/samba/nss_info \
-                 ${libdir}/winbind_krb5_locator.so \
-                 ${libdir}/winbind-krb5-localauth.so \
-                 ${sysconfdir}/init.d/winbind \
-                 ${systemd_system_unitdir}/winbind.service"
-
-FILES:${PN}-python3 = "${PYTHON_SITEPACKAGES_DIR}"
-
-FILES:smbclient = "${bindir}/cifsdd \
-                   ${bindir}/rpcclient \
-                   ${bindir}/smbcacls \
-                   ${bindir}/smbclient \
-                   ${bindir}/smbcquotas \
-                   ${bindir}/smbget \
-                   ${bindir}/smbspool \
-                   ${bindir}/smbtar \
-                   ${bindir}/smbtree \
-                   ${libdir}/samba/smbspool_krb5_wrapper"
-
-RDEPENDS:${PN}-pidl:append = " perl libparse-yapp-perl"
-FILES:${PN}-pidl = "${bindir}/pidl \
-                    ${libdir}/perl5 \
-                   "
-
-RDEPENDS:${PN}-client = "\
-    smbclient \
-    winbind \
-    registry-tools \
-    ${PN}-pidl \
-    "
-
-ALLOW_EMPTY:${PN}-client = "1"
-
-RDEPENDS:${PN}-server = "\
-    ${PN} \
-    winbind \
-    registry-tools \
-    "
-
-ALLOW_EMPTY:${PN}-server = "1"
-
-RDEPENDS:${PN}-test = "\
-    ${PN}-ctdb-tests \
-    ${PN}-testsuite \
-    "
-
-ALLOW_EMPTY:${PN}-test = "1"
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.14.8.bb b/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.14.8.bb
new file mode 100644
index 0000000..0dd563c
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.14.8.bb
@@ -0,0 +1,346 @@
+HOMEPAGE = "https://www.samba.org/"
+SECTION = "console/network"
+
+LICENSE = "GPL-3.0+ & LGPL-3.0+ & GPL-2.0+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+                    file://${COREBASE}/meta/files/common-licenses/LGPL-3.0-or-later;md5=c51d3eef3be114124d11349ca0d7e117 \
+                    file://${COREBASE}/meta/files/common-licenses/GPL-2.0-or-later;md5=fed54355545ffd980b814dab4a3b312c"
+
+SAMBA_MIRROR = "http://samba.org/samba/ftp"
+MIRRORS += "\
+${SAMBA_MIRROR}    http://mirror.internode.on.net/pub/samba \n \
+${SAMBA_MIRROR}    http://www.mirrorservice.org/sites/ftp.samba.org \n \
+"
+
+SRC_URI = "${SAMBA_MIRROR}/stable/samba-${PV}.tar.gz \
+           file://smb.conf \
+           file://volatiles.03_samba \
+           file://0001-Don-t-check-xsltproc-manpages.patch \
+           file://0002-do-not-import-target-module-while-cross-compile.patch \
+           file://0003-Add-config-option-without-valgrind.patch \
+           file://0004-Add-options-to-configure-the-use-of-libbsd.patch \
+           file://0005-samba-build-dnsserver_common-code.patch \
+           file://0006-samba-defeat-iconv-test.patch \
+           file://0007-wscript_configure_system_gnutls-disable-check-gnutls.patch \
+           file://0008-source3-wscript-disable-check-fcntl-F_OWNER_EX.patch \
+           file://0009-source3-wscript-disable-check-fcntl-RW_HINTS.patch \
+           "
+
+SRC_URI:append:libc-musl = " \
+           file://netdb_defines.patch \
+           file://samba-pam.patch \
+           file://samba-4.3.9-remove-getpwent_r.patch \
+           file://cmocka-uintptr_t.patch \
+           file://samba-fix-musl-lib-without-innetgr.patch \
+           "
+
+SRC_URI[md5sum] = "5c6636b34a322de0eb917ee0403be322"
+SRC_URI[sha256sum] = "c936b782c2aced8cd7299c13bec67c495fd4affdb217a6ed6150f4fd6d770fde"
+
+UPSTREAM_CHECK_REGEX = "samba\-(?P<pver>4\.14(\.\d+)+).tar.gz"
+
+inherit systemd waf-samba cpan-base perlnative update-rc.d perl-version pkgconfig
+
+# CVE-2011-2411 is valnerble only on HP NonStop Servers.
+CVE_CHECK_WHITELIST += "CVE-2011-2411" 
+
+# remove default added RDEPENDS on perl
+RDEPENDS:${PN}:remove = "perl"
+
+DEPENDS += "readline virtual/libiconv zlib popt libtalloc libtdb libtevent libldb libaio libpam libtasn1 jansson libparse-yapp-perl-native gnutls"
+
+inherit features_check
+REQUIRED_DISTRO_FEATURES = "pam"
+
+DEPENDS:append:libc-musl = " libtirpc"
+CFLAGS:append:libc-musl = " -I${STAGING_INCDIR}/tirpc"
+LDFLAGS:append:libc-musl = " -ltirpc"
+
+COMPATIBLE_HOST:riscv32 = "null"
+
+INITSCRIPT_NAME = "samba"
+INITSCRIPT_PARAMS = "start 20 3 5 . stop 20 0 1 6 ."
+
+SYSTEMD_PACKAGES = "${PN}-base ${PN}-ad-dc winbind"
+SYSTEMD_SERVICE:${PN}-base = "nmb.service smb.service"
+SYSTEMD_SERVICE:${PN}-ad-dc = "${@bb.utils.contains('PACKAGECONFIG', 'ad-dc', 'samba.service', '', d)}"
+SYSTEMD_SERVICE:winbind = "winbind.service"
+
+# There are prerequisite settings to enable ad-dc, so disable the service by default.
+# Reference:
+# https://wiki.samba.org/index.php/Setting_up_Samba_as_an_Active_Directory_Domain_Controller
+SYSTEMD_AUTO_ENABLE:${PN}-ad-dc = "disable"
+
+#cross_compile cannot use preforked process, since fork process earlier than point subproces.popen
+#to cross Popen
+export WAF_NO_PREFORK="yes"
+
+# Use krb5.  Build active domain controller.
+#
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd zeroconf', d)} \
+                   acl cups ad-dc ldap mitkrb5 \
+"
+
+RDEPENDS:${PN}-ctdb-tests += "bash util-linux-getopt"
+
+PACKAGECONFIG[acl] = "--with-acl-support,--without-acl-support,acl"
+PACKAGECONFIG[fam] = "--with-fam,--without-fam,gamin"
+PACKAGECONFIG[cups] = "--enable-cups,--disable-cups,cups"
+PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
+PACKAGECONFIG[sasl] = ",,cyrus-sasl"
+PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd"
+PACKAGECONFIG[dmapi] = "--with-dmapi,--without-dmapi,dmapi"
+PACKAGECONFIG[zeroconf] = "--enable-avahi,--disable-avahi,avahi"
+PACKAGECONFIG[valgrind] = ",--without-valgrind,valgrind,"
+PACKAGECONFIG[lttng] = "--with-lttng, --without-lttng,lttng-ust"
+PACKAGECONFIG[archive] = "--with-libarchive, --without-libarchive, libarchive"
+PACKAGECONFIG[libunwind] = ", , libunwind"
+PACKAGECONFIG[gpgme] = ",--without-gpgme,,"
+PACKAGECONFIG[lmdb] = ",--without-ldb-lmdb,lmdb,"
+PACKAGECONFIG[libbsd] = "--with-libbsd, --without-libbsd, libbsd"
+PACKAGECONFIG[ad-dc] = "--with-experimental-mit-ad-dc,--without-ad-dc,python3-markdown python3-dnspython,"
+PACKAGECONFIG[mitkrb5] = "--with-system-mitkrb5 --with-system-mitkdc=/usr/sbin/krb5kdc,,krb5,"
+
+SAMBA4_IDMAP_MODULES="idmap_ad,idmap_rid,idmap_adex,idmap_hash,idmap_tdb2"
+SAMBA4_PDB_MODULES="pdb_tdbsam,${@bb.utils.contains('PACKAGECONFIG', 'ldap', 'pdb_ldap,', '', d)}pdb_ads,pdb_smbpasswd,pdb_wbc_sam,pdb_samba4"
+SAMBA4_AUTH_MODULES="auth_unix,auth_wbc,auth_server,auth_netlogond,auth_script,auth_samba4"
+SAMBA4_MODULES="${SAMBA4_IDMAP_MODULES},${SAMBA4_PDB_MODULES},${SAMBA4_AUTH_MODULES}"
+
+# These libraries are supposed to replace others supplied by packages, but decorate the names of
+# .so files so there will not be a conflict.  This is not done consistantly, so be very careful
+# when adding to this list.
+#
+SAMBA4_LIBS="heimdal,cmocka,NONE"
+
+EXTRA_OECONF += "--enable-fhs \
+                 --with-piddir=/run \
+                 --with-sockets-dir=/run/samba \
+                 --with-modulesdir=${libdir}/samba \
+                 --with-lockdir=${localstatedir}/lib/samba \
+                 --with-cachedir=${localstatedir}/lib/samba \
+                 --disable-rpath-install \
+                 --with-shared-modules=${SAMBA4_MODULES} \
+                 --bundled-libraries=${SAMBA4_LIBS} \
+                 ${@oe.utils.conditional('TARGET_ARCH', 'x86_64', '', '--disable-glusterfs', d)} \
+                 --with-cluster-support \
+                 --with-profiling-data \
+                 --with-libiconv=${STAGING_DIR_HOST}${prefix} \
+                 --with-pam --with-pammodulesdir=${base_libdir}/security \
+                "
+
+LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
+
+do_configure:append () {
+    cd ${S}/pidl/
+    perl Makefile.PL PREFIX=${prefix}
+    sed -e 's,VENDORPREFIX)/lib/perl,VENDORPREFIX)/${baselib}/perl,g' \
+        -e 's,PERLPREFIX)/lib/perl,PERLPREFIX)/${baselib}/perl,g' -i Makefile
+
+}
+
+do_compile:append () {
+    oe_runmake -C ${S}/pidl
+}
+
+do_install:append() {
+    for section in 1 5 7; do
+        install -d ${D}${mandir}/man$section
+        install -m 0644 ctdb/doc/*.$section ${D}${mandir}/man$section
+    done
+    for section in 1 5 7 8; do
+        install -d ${D}${mandir}/man$section
+        install -m 0644 docs/manpages/*.$section ${D}${mandir}/man$section
+    done
+
+    install -d ${D}${systemd_system_unitdir}
+    install -m 0644 ${S}/bin/default/packaging/systemd/*.service ${D}${systemd_system_unitdir}/
+    sed -e 's,\(ExecReload=\).*\(/kill\),\1${base_bindir}\2,' \
+        -e 's,/etc/sysconfig/samba,${sysconfdir}/default/samba,' \
+        -i ${D}${systemd_system_unitdir}/*.service
+
+    if [ "${@bb.utils.contains('PACKAGECONFIG', 'ad-dc', 'yes', 'no', d)}" = "no" ]; then
+        rm -f ${D}${systemd_system_unitdir}/samba.service
+    fi
+
+    install -d ${D}${sysconfdir}/tmpfiles.d
+    install -m644 packaging/systemd/samba.conf.tmp ${D}${sysconfdir}/tmpfiles.d/samba.conf
+    echo "d ${localstatedir}/log/samba 0755 root root -" \
+        >> ${D}${sysconfdir}/tmpfiles.d/samba.conf
+    install -d ${D}${sysconfdir}/init.d
+    install -m 0755 packaging/sysv/samba.init ${D}${sysconfdir}/init.d/samba
+    sed -e 's,/opt/samba/bin,${sbindir},g' \
+        -e 's,/opt/samba/smb.conf,${sysconfdir}/samba/smb.conf,g' \
+        -e 's,/opt/samba/log,${localstatedir}/log/samba,g' \
+        -e 's,/etc/init.d/samba.server,${sysconfdir}/init.d/samba,g' \
+        -e 's,/usr/bin,${base_bindir},g' \
+        -i ${D}${sysconfdir}/init.d/samba
+
+    install -d ${D}${sysconfdir}/samba
+    echo "127.0.0.1 localhost" > ${D}${sysconfdir}/samba/lmhosts
+    install -m644 ${WORKDIR}/smb.conf ${D}${sysconfdir}/samba/smb.conf
+    install -D -m 644 ${WORKDIR}/volatiles.03_samba ${D}${sysconfdir}/default/volatiles/03_samba
+
+    install -d ${D}${sysconfdir}/default
+    install -m644 packaging/systemd/samba.sysconfig ${D}${sysconfdir}/default/samba
+
+    # the items are from ctdb/tests/run_tests.sh
+    for d in cunit eventd eventscripts onnode shellcheck takeover takeover_helper tool; do
+        testdir=${D}${datadir}/ctdb-tests/UNIT/$d
+        install -d $testdir
+        cp ${S}/ctdb/tests/UNIT/$d/*.sh $testdir
+        cp -r ${S}/ctdb/tests/UNIT/$d/scripts ${S}/ctdb/tests/UNIT/$d/stubs $testdir || true
+    done
+
+    # fix file-rdeps qa warning
+    if [ -f ${D}${bindir}/onnode ]; then
+        sed -i 's:\(#!/bin/\)bash:\1sh:' ${D}${bindir}/onnode
+    fi
+
+    chmod 0750 ${D}${sysconfdir}/sudoers.d || true
+    rm -rf ${D}/run ${D}${localstatedir}/run ${D}${localstatedir}/log
+    
+    for f in samba-gpupdate samba_upgradedns samba_spnupdate samba_kcc samba_dnsupdate samba_downgrade_db; do
+        if [ -f "${D}${sbindir}/$f" ]; then
+            sed -i -e 's,${PYTHON},/usr/bin/env python3,g' ${D}${sbindir}/$f
+        fi
+    done
+    if [ -f "${D}${bindir}/samba-tool" ]; then
+        sed -i -e 's,${PYTHON},/usr/bin/env python3,g' ${D}${bindir}/samba-tool
+    fi
+
+    oe_runmake -C ${S}/pidl DESTDIR=${D} install_vendor
+    find ${D}${libdir}/ -type f -name "perllocal.pod" | xargs rm -f
+    rm -rf ${D}${libdir}/perl5/vendor_perl/${PERLVERSION}/${BUILD_SYS}/auto/Parse/Pidl/.packlist
+    sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${bindir}/pidl
+}
+
+PACKAGES =+ "${PN}-python3 ${PN}-pidl \
+             ${PN}-dsdb-modules ${PN}-testsuite registry-tools \
+             winbind \
+             ${PN}-common ${PN}-base ${PN}-ad-dc ${PN}-ctdb-tests \
+             smbclient ${PN}-client ${PN}-server ${PN}-test"
+
+python samba_populate_packages() {
+    def module_hook(file, pkg, pattern, format, basename):
+        pn = d.getVar('PN')
+        d.appendVar('RRECOMMENDS:%s-base' % pn, ' %s' % pkg)
+
+    mlprefix = d.getVar('MLPREFIX') or ''
+    pam_libdir = d.expand('${base_libdir}/security')
+    pam_pkgname = mlprefix + 'pam-plugin%s'
+    do_split_packages(d, pam_libdir, '^pam_(.*)\.so$', pam_pkgname, 'PAM plugin for %s', extra_depends='', prepend=True)
+
+    libdir = d.getVar('libdir')
+    do_split_packages(d, libdir, '^lib(.*)\.so\..*$', 'lib%s', 'Samba %s library', extra_depends='${PN}-common', prepend=True, allow_links=True)
+    pkglibdir = '%s/samba' % libdir
+    do_split_packages(d, pkglibdir, '^lib(.*)\.so$', 'lib%s', 'Samba %s library', extra_depends='${PN}-common', prepend=True)
+    moduledir = '%s/samba/auth' % libdir
+    do_split_packages(d, moduledir, '^(.*)\.so$', 'samba-auth-%s', 'Samba %s authentication backend', hook=module_hook, extra_depends='', prepend=True)
+    moduledir = '%s/samba/pdb' % libdir
+    do_split_packages(d, moduledir, '^(.*)\.so$', 'samba-pdb-%s', 'Samba %s password backend', hook=module_hook, extra_depends='', prepend=True)
+}
+
+PACKAGESPLITFUNCS:prepend = "samba_populate_packages "
+PACKAGES_DYNAMIC = "samba-auth-.* samba-pdb-.*"
+
+RDEPENDS:${PN} += "${PN}-base ${PN}-python3 ${PN}-dsdb-modules python3"
+RDEPENDS:${PN}-python3 += "pytalloc python3-tdb"
+
+FILES:${PN}-base = "${sbindir}/nmbd \
+                    ${sbindir}/smbd \
+                    ${sysconfdir}/init.d \
+                    ${systemd_system_unitdir}/nmb.service \
+                    ${systemd_system_unitdir}/smb.service"
+
+FILES:${PN}-ad-dc = "${sbindir}/samba \
+                     ${systemd_system_unitdir}/samba.service \
+                     ${libdir}/krb5/plugins/kdb/samba.so \
+"
+RDEPENDS:${PN}-ad-dc = "krb5-kdc"
+
+FILES:${PN}-ctdb-tests = "${bindir}/ctdb_run_tests \
+                          ${bindir}/ctdb_run_cluster_tests \
+                          ${sysconfdir}/ctdb/nodes \
+                          ${datadir}/ctdb-tests \
+                          ${datadir}/ctdb/tests \
+                          ${localstatedir}/lib/ctdb \
+                         "
+
+FILES:${BPN}-common = "${sysconfdir}/default \
+                       ${sysconfdir}/samba \
+                       ${sysconfdir}/tmpfiles.d \
+                       ${localstatedir}/lib/samba \
+                       ${localstatedir}/spool/samba \
+"
+
+FILES:${PN} += "${libdir}/vfs/*.so \
+                ${libdir}/charset/*.so \
+                ${libdir}/*.dat \
+                ${libdir}/auth/*.so \
+                ${datadir}/ctdb/events/* \
+"
+
+FILES:${PN}-dsdb-modules = "${libdir}/samba/ldb"
+
+FILES:${PN}-testsuite = "${bindir}/gentest \
+                         ${bindir}/locktest \
+                         ${bindir}/masktest \
+                         ${bindir}/ndrdump \
+                         ${bindir}/smbtorture"
+
+FILES:registry-tools = "${bindir}/regdiff \
+                        ${bindir}/regpatch \
+                        ${bindir}/regshell \
+                        ${bindir}/regtree"
+
+FILES:winbind = "${sbindir}/winbindd \
+                 ${bindir}/wbinfo \
+                 ${bindir}/ntlm_auth \
+                 ${libdir}/samba/idmap \
+                 ${libdir}/samba/nss_info \
+                 ${libdir}/winbind_krb5_locator.so \
+                 ${libdir}/winbind-krb5-localauth.so \
+                 ${sysconfdir}/init.d/winbind \
+                 ${systemd_system_unitdir}/winbind.service"
+
+FILES:${PN}-python3 = "${PYTHON_SITEPACKAGES_DIR}"
+
+FILES:smbclient = "${bindir}/cifsdd \
+                   ${bindir}/rpcclient \
+                   ${bindir}/smbcacls \
+                   ${bindir}/smbclient \
+                   ${bindir}/smbcquotas \
+                   ${bindir}/smbget \
+                   ${bindir}/smbspool \
+                   ${bindir}/smbtar \
+                   ${bindir}/smbtree \
+                   ${libdir}/samba/smbspool_krb5_wrapper"
+
+RDEPENDS:${PN}-pidl:append = " perl libparse-yapp-perl"
+FILES:${PN}-pidl = "${bindir}/pidl \
+                    ${libdir}/perl5 \
+                   "
+
+RDEPENDS:${PN}-client = "\
+    smbclient \
+    winbind \
+    registry-tools \
+    ${PN}-pidl \
+    "
+
+ALLOW_EMPTY:${PN}-client = "1"
+
+RDEPENDS:${PN}-server = "\
+    ${PN} \
+    winbind \
+    registry-tools \
+    "
+
+ALLOW_EMPTY:${PN}-server = "1"
+
+RDEPENDS:${PN}-test = "\
+    ${PN}-ctdb-tests \
+    ${PN}-testsuite \
+    "
+
+ALLOW_EMPTY:${PN}-test = "1"
diff --git a/meta-openembedded/meta-networking/recipes-core/packagegroups/packagegroup-meta-networking.bb b/meta-openembedded/meta-networking/recipes-core/packagegroups/packagegroup-meta-networking.bb
index dd5d688..e84086e 100644
--- a/meta-openembedded/meta-networking/recipes-core/packagegroups/packagegroup-meta-networking.bb
+++ b/meta-openembedded/meta-networking/recipes-core/packagegroups/packagegroup-meta-networking.bb
@@ -207,6 +207,7 @@
     libtevent \
     linux-atm \
     lksctp-tools \
+    mctp \
     memcached \
     ifenslave \
     netcat \
@@ -233,7 +234,6 @@
     tcpdump \
     tcpslice \
     netcf \
-    nghttp2 \
     tnftp \
     traceroute \
     tunctl \
diff --git a/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp_0.7.4.bb b/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp_0.7.4.bb
deleted file mode 100644
index 7661e9c..0000000
--- a/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp_0.7.4.bb
+++ /dev/null
@@ -1,56 +0,0 @@
-SUMMARY = "Advanced TFTP server and client"
-SECTION = "net"
-HOMEPAGE = "http://packages.debian.org/atftp"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-SRCREV = "e56e8845f1070e89a4a6e509396b681688d03793"
-
-SRC_URI = "git://git.code.sf.net/p/atftp/code \
-           file://atftpd.init \
-           file://atftpd.service \
-"
-
-S = "${WORKDIR}/git"
-
-inherit autotools update-rc.d systemd
-
-PACKAGECONFIG ??= "tcp-wrappers"
-PACKAGECONFIG[pcre] = "--enable-libpcre,--disable-libpcre,libpcre"
-PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers"
-PACKAGECONFIG[readline] = "--enable-libreadline,--disable-libreadline,readline"
-
-INITSCRIPT_PACKAGES = "${PN}d"
-INITSCRIPT_NAME:${PN}d = "atftpd"
-INITSCRIPT_PARAMS:${PN}d = "defaults 80"
-
-
-EXTRA_OEMAKE = "CFLAGS='${CFLAGS} -std=gnu89'"
-
-do_install:append() {
-    install -d ${D}${sysconfdir}/init.d
-    install -m 0755 ${WORKDIR}/atftpd.init ${D}${sysconfdir}/init.d/atftpd
-
-    install -d ${D}/srv/tftp
-
-    rm ${D}${sbindir}/in.tftpd
-
-    install -d ${D}${systemd_unitdir}/system
-    install -m 0644 ${WORKDIR}/atftpd.service ${D}${systemd_unitdir}/system
-}
-
-PACKAGES =+ "${PN}d"
-
-FILES:${PN} = "${bindir}/*"
-
-FILES:${PN}d = "${sbindir}/* \
-    ${sysconfdir} \
-    /srv/tftp \
-    ${systemd_unitdir}/system/atftpd.service \
-"
-
-SYSTEMD_PACKAGES = "${PN}d"
-SYSTEMD_SERVICE:${PN}d = "atftpd.service"
-RPROVIDES:${PN}d += "${PN}d-systemd"
-RREPLACES:${PN}d += "${PN}d-systemd"
-RCONFLICTS:${PN}d += "${PN}d-systemd"
diff --git a/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp_0.7.5.bb b/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp_0.7.5.bb
new file mode 100644
index 0000000..de283df
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-daemons/atftp/atftp_0.7.5.bb
@@ -0,0 +1,56 @@
+SUMMARY = "Advanced TFTP server and client"
+SECTION = "net"
+HOMEPAGE = "http://packages.debian.org/atftp"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=f65159f73e603f89d6867d43191900e5"
+
+SRCREV = "00921e75728e3681b051c2e48c59e36c6cfa2e97"
+
+SRC_URI = "git://git.code.sf.net/p/atftp/code \
+           file://atftpd.init \
+           file://atftpd.service \
+"
+
+S = "${WORKDIR}/git"
+
+inherit autotools update-rc.d systemd
+
+PACKAGECONFIG ??= "tcp-wrappers"
+PACKAGECONFIG[pcre] = "--enable-libpcre,--disable-libpcre,libpcre"
+PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers"
+PACKAGECONFIG[readline] = "--enable-libreadline,--disable-libreadline,readline"
+
+INITSCRIPT_PACKAGES = "${PN}d"
+INITSCRIPT_NAME:${PN}d = "atftpd"
+INITSCRIPT_PARAMS:${PN}d = "defaults 80"
+
+
+EXTRA_OEMAKE = "CFLAGS='${CFLAGS} -std=gnu89'"
+
+do_install:append() {
+    install -d ${D}${sysconfdir}/init.d
+    install -m 0755 ${WORKDIR}/atftpd.init ${D}${sysconfdir}/init.d/atftpd
+
+    install -d ${D}/srv/tftp
+
+    rm ${D}${sbindir}/in.tftpd
+
+    install -d ${D}${systemd_unitdir}/system
+    install -m 0644 ${WORKDIR}/atftpd.service ${D}${systemd_unitdir}/system
+}
+
+PACKAGES =+ "${PN}d"
+
+FILES:${PN} = "${bindir}/*"
+
+FILES:${PN}d = "${sbindir}/* \
+    ${sysconfdir} \
+    /srv/tftp \
+    ${systemd_unitdir}/system/atftpd.service \
+"
+
+SYSTEMD_PACKAGES = "${PN}d"
+SYSTEMD_SERVICE:${PN}d = "atftpd.service"
+RPROVIDES:${PN}d += "${PN}d-systemd"
+RREPLACES:${PN}d += "${PN}d-systemd"
+RCONFLICTS:${PN}d += "${PN}d-systemd"
diff --git a/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Do-not-hardcode-path-for-pkg.m4.patch b/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Do-not-hardcode-path-for-pkg.m4.patch
index d5ea417..f18f237 100644
--- a/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Do-not-hardcode-path-for-pkg.m4.patch
+++ b/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Do-not-hardcode-path-for-pkg.m4.patch
@@ -1,4 +1,4 @@
-From a27217a5437da313d251b4a765bf7cb60ffaa62d Mon Sep 17 00:00:00 2001
+From d7a34bb388e33d16260b67275cdb58f9c877d324 Mon Sep 17 00:00:00 2001
 From: Changqing Li <changqing.li@windriver.com>
 Date: Tue, 27 Nov 2018 15:27:47 +0800
 Subject: [PATCH] From 6d24365f0828185fd1bb4d199209ca07eb95c41d Mon Sep 17
@@ -11,14 +11,17 @@
 
 update patch to version 5.1.6
 Signed-off-by: Changqing Li <changqing.li@windriver.com>
+
 ---
  configure.in | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/configure.in b/configure.in
+index 07c2051..e85d718 100644
 --- a/configure.in
 +++ b/configure.in
 @@ -12,7 +12,7 @@ define([AC_CACHE_SAVE], )dnl
- AC_INIT(.autofs-5.1.7)
+ AC_INIT(.autofs-5.1.8)
  
  # for pkg-config macros
 -m4_include([/usr/share/aclocal/pkg.m4])
diff --git a/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.1.7-use-default-stack-size-for-threads.patch b/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.1.7-use-default-stack-size-for-threads.patch
deleted file mode 100644
index b21e7c0..0000000
--- a/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.1.7-use-default-stack-size-for-threads.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-autofs-5.1.7 - use default stack size for threads
-
-From: Ian Kent <raven@themaw.net>
-
-autofs uses PTHREAD_STACK_MIN to set the stack size for threads it
-creates.
-
-In two cases it is used to reduce the stack size for long running
-service threads while it's used to allocate a larger stack for worker
-threads that can have larger memory requirements.
-
-In recent glibc releases PTHREAD_STACK_MIN is no longer a constant
-which can lead to unexpectedly different stack sizes on different
-architectures and the autofs assumption it's a constant causes a
-compile failure.
-
-The need to alter the stack size was due to observed stack overflow
-which was thought to be due the thread stack being too small for autofs
-and glibc alloca(3) usage.
-
-Quite a bit of that alloca(3) usage has been eliminated from autofs now,
-particularly those that might be allocating largish amounts of storage,
-and there has been a lot of change in glibc too so using the thread
-default stack should be ok.
-
-Signed-off-by: Ian Kent <raven@themaw.net>
----
- CHANGELOG          |    1 +
- daemon/automount.c |   29 -----------------------------
- daemon/state.c     |    6 +-----
- lib/alarm.c        |    6 +-----
- 4 files changed, 3 insertions(+), 39 deletions(-)
-
---- a/daemon/automount.c
-+++ b/daemon/automount.c
-@@ -92,7 +92,6 @@ static size_t kpkt_len;
- /* Attributes for creating detached and joinable threads */
- pthread_attr_t th_attr;
- pthread_attr_t th_attr_detached;
--size_t detached_thread_stack_size = PTHREAD_STACK_MIN * 144;
- 
- struct master_readmap_cond mrc = {
- 	PTHREAD_MUTEX_INITIALIZER, PTHREAD_COND_INITIALIZER, 0, NULL, 0, 0, 0, 0};
-@@ -2617,34 +2616,6 @@ int main(int argc, char *argv[])
- 		if (start_pipefd[1] != -1) {
- 			res = write(start_pipefd[1], pst_stat, sizeof(*pst_stat));
- 			close(start_pipefd[1]);
--		}
--		release_flag_file();
--		macro_free_global_table();
--		exit(1);
--	}
--
--#ifdef _POSIX_THREAD_ATTR_STACKSIZE
--	if (pthread_attr_setstacksize(
--			&th_attr_detached, detached_thread_stack_size)) {
--		logerr("%s: failed to set stack size thread attribute!",
--		       program);
--		if (start_pipefd[1] != -1) {
--			res = write(start_pipefd[1], pst_stat, sizeof(*pst_stat));
--			close(start_pipefd[1]);
--		}
--		release_flag_file();
--		macro_free_global_table();
--		exit(1);
--	}
--#endif
--
--	if (pthread_attr_getstacksize(
--			&th_attr_detached, &detached_thread_stack_size)) {
--		logerr("%s: failed to get detached thread stack size!",
--		       program);
--		if (start_pipefd[1] != -1) {
--			res = write(start_pipefd[1], pst_stat, sizeof(*pst_stat));
--			close(start_pipefd[1]);
- 		}
- 		release_flag_file();
- 		macro_free_global_table();
---- a/daemon/state.c
-+++ b/daemon/state.c
-@@ -1173,12 +1173,8 @@ int st_start_handler(void)
- 	status = pthread_attr_init(pattrs);
- 	if (status)
- 		pattrs = NULL;
--	else {
-+	else
- 		pthread_attr_setdetachstate(pattrs, PTHREAD_CREATE_DETACHED);
--#ifdef _POSIX_THREAD_ATTR_STACKSIZE
--		pthread_attr_setstacksize(pattrs, PTHREAD_STACK_MIN*4);
--#endif
--	}
- 
- 	status = pthread_create(&thid, pattrs, st_queue_handler, NULL);
- 
---- a/lib/alarm.c
-+++ b/lib/alarm.c
-@@ -270,12 +270,8 @@ int alarm_start_handler(void)
- 	status = pthread_attr_init(pattrs);
- 	if (status)
- 		pattrs = NULL;
--	else {
-+	else
- 		pthread_attr_setdetachstate(pattrs, PTHREAD_CREATE_DETACHED);
--#ifdef _POSIX_THREAD_ATTR_STACKSIZE
--		pthread_attr_setstacksize(pattrs, PTHREAD_STACK_MIN*4);
--#endif
--	}
- 
- 	status = pthread_condattr_init(&condattrs);
- 	if (status)
diff --git a/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs_5.1.7.bb b/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs_5.1.7.bb
deleted file mode 100644
index 3fc574f..0000000
--- a/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs_5.1.7.bb
+++ /dev/null
@@ -1,98 +0,0 @@
-SUMMARY = "Kernel based automounter for linux"
-SECTION = "utils"
-LICENSE = "GPL-2.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=ee9324a6f564bb2376b63878ac396798"
-
-DEPENDS += "libtirpc flex-native bison-native e2fsprogs openssl libxml2 util-linux cyrus-sasl libnsl2"
-
-CFLAGS += "-I${STAGING_INCDIR}/tirpc"
-
-inherit autotools-brokensep systemd update-rc.d pkgconfig
-
-SRC_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/autofs-${PV}.tar.gz \
-           file://no-bash.patch \
-           file://cross.patch \
-           file://fix_disable_ldap.patch \
-           file://autofs-5.0.7-fix-lib-deps.patch \
-           file://add-the-needed-stdarg.h.patch \
-           file://using-pkg-config-to-detect-libxml-2.0-and-krb5.patch \
-           file://force-STRIP-to-emtpy.patch \
-           file://remove-bashism.patch \
-           file://fix-the-YACC-rule-to-fix-a-building-failure.patch \
-           file://0001-Define-__SWORD_TYPE-and-_PATH_NSSWITCH_CONF.patch \
-           file://0002-Replace-__S_IEXEC-with-S_IEXEC.patch \
-           file://pkgconfig-libnsl.patch \
-           file://0001-modules-lookup_multi.c-Replace-__S_IEXEC-with-S_IEXE.patch \
-           file://0001-Do-not-hardcode-path-for-pkg.m4.patch \
-           file://0001-Bug-fix-for-pid_t-not-found-on-musl.patch \
-           file://0001-Define-__SWORD_TYPE-if-undefined.patch \
-           file://autofs-5.1.7-use-default-stack-size-for-threads.patch \
-           "
-SRC_URI[sha256sum] = "a18619e5ad18960fe382354eef33f070e57e4e5711d484b010acde080a003312"
-
-UPSTREAM_CHECK_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/"
-
-INITSCRIPT_NAME = "autofs"
-INITSCRIPT_PARAMS = "defaults"
-
-# FIXME: modules/Makefile has crappy rules that don't obey LDFLAGS
-#CFLAGS += "${LDFLAGS}"
-
-PACKAGECONFIG[systemd] = "--with-systemd=${systemd_unitdir}/system,--without-systemd,systemd"
-
-PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
-
-EXTRA_OEMAKE = "DONTSTRIP=1"
-EXTRA_OECONF += "--disable-mount-locking \
-                --enable-ignore-busy --with-openldap=no \
-                --with-confdir=${sysconfdir}/default \
-                --with-fifodir=/run \
-                --with-flagdir=/run \
-                --with-sasl=no --with-libtirpc \
-                --with-mapdir=${sysconfdir} \
-                --with-path=${STAGING_BINDIR_NATIVE} \
-                --with-fifodir=${localstatedir}/run \
-                --with-flagdir=${localstatedir}/run \
-"
-CACHED_CONFIGUREVARS = "ac_cv_path_RANLIB=${RANLIB} \
-                        ac_cv_path_RPCGEN=rpcgen \
-                        initdir=${INIT_D_DIR} \
-                        piddir=/run \
-"
-
-do_configure:prepend () {
-    if [ ! -e ${S}/acinclude.m4 ]; then
-        cp ${S}/aclocal.m4 ${S}/acinclude.m4
-    fi
-    cp ${STAGING_DATADIR_NATIVE}/aclocal/pkg.m4 .
-}
-
-do_install:append () {
-    # samples have been removed from SUBDIRS from 5.1.5, need to install separately
-    oe_runmake 'DESTDIR=${D}' install_samples
-
-    if [ -d ${D}/run ]; then
-        rmdir ${D}/run
-    fi
-    if [ -d ${D}${localstatedir}/run ]; then
-        rmdir ${D}${localstatedir}/run
-    fi
-    # On hybrid systemd/sysvinit builds, we need to install the sysvinit script by hand.
-    if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
-        install -d -m 755 ${D}${INIT_D_DIR}
-        install -m 755 ${S}/samples/rc.autofs ${D}${INIT_D_DIR}/autofs
-    fi
-}
-SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}"
-
-# all the libraries are unversioned, so don't pack it on PN-dev
-SOLIBS = ".so"
-FILES_SOLIBSDEV = ""
-# Some symlinks are created in plugins dir e.g.
-# mount_nfs4.so -> mount_nfs.so
-INSANE_SKIP:${PN} = "dev-so"
-
-RPROVIDES:${PN} += "${PN}-systemd"
-RREPLACES:${PN} += "${PN}-systemd"
-RCONFLICTS:${PN} += "${PN}-systemd"
-SYSTEMD_SERVICE:${PN} = "autofs.service"
diff --git a/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs_5.1.8.bb b/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs_5.1.8.bb
new file mode 100644
index 0000000..c41d0e6
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs_5.1.8.bb
@@ -0,0 +1,97 @@
+SUMMARY = "Kernel based automounter for linux"
+SECTION = "utils"
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=ee9324a6f564bb2376b63878ac396798"
+
+DEPENDS += "libtirpc flex-native bison-native e2fsprogs openssl libxml2 util-linux cyrus-sasl libnsl2"
+
+CFLAGS += "-I${STAGING_INCDIR}/tirpc"
+
+inherit autotools-brokensep systemd update-rc.d pkgconfig
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/autofs-${PV}.tar.gz \
+           file://no-bash.patch \
+           file://cross.patch \
+           file://fix_disable_ldap.patch \
+           file://autofs-5.0.7-fix-lib-deps.patch \
+           file://add-the-needed-stdarg.h.patch \
+           file://using-pkg-config-to-detect-libxml-2.0-and-krb5.patch \
+           file://force-STRIP-to-emtpy.patch \
+           file://remove-bashism.patch \
+           file://fix-the-YACC-rule-to-fix-a-building-failure.patch \
+           file://0001-Define-__SWORD_TYPE-and-_PATH_NSSWITCH_CONF.patch \
+           file://0002-Replace-__S_IEXEC-with-S_IEXEC.patch \
+           file://pkgconfig-libnsl.patch \
+           file://0001-modules-lookup_multi.c-Replace-__S_IEXEC-with-S_IEXE.patch \
+           file://0001-Do-not-hardcode-path-for-pkg.m4.patch \
+           file://0001-Bug-fix-for-pid_t-not-found-on-musl.patch \
+           file://0001-Define-__SWORD_TYPE-if-undefined.patch \
+           "
+SRC_URI[sha256sum] = "0bd401c56f0eb1ca6251344c3a3d70bface3eccf9c67117cd184422c4cace30c"
+
+UPSTREAM_CHECK_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/"
+
+INITSCRIPT_NAME = "autofs"
+INITSCRIPT_PARAMS = "defaults"
+
+# FIXME: modules/Makefile has crappy rules that don't obey LDFLAGS
+#CFLAGS += "${LDFLAGS}"
+
+PACKAGECONFIG[systemd] = "--with-systemd=${systemd_unitdir}/system,--without-systemd,systemd"
+
+PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
+
+EXTRA_OEMAKE = "DONTSTRIP=1"
+EXTRA_OECONF += "--disable-mount-locking \
+                --enable-ignore-busy --with-openldap=no \
+                --with-confdir=${sysconfdir}/default \
+                --with-fifodir=/run \
+                --with-flagdir=/run \
+                --with-sasl=no --with-libtirpc \
+                --with-mapdir=${sysconfdir} \
+                --with-path=${STAGING_BINDIR_NATIVE} \
+                --with-fifodir=${localstatedir}/run \
+                --with-flagdir=${localstatedir}/run \
+"
+CACHED_CONFIGUREVARS = "ac_cv_path_RANLIB=${RANLIB} \
+                        ac_cv_path_RPCGEN=rpcgen \
+                        initdir=${INIT_D_DIR} \
+                        piddir=/run \
+"
+
+do_configure:prepend () {
+    if [ ! -e ${S}/acinclude.m4 ]; then
+        cp ${S}/aclocal.m4 ${S}/acinclude.m4
+    fi
+    cp ${STAGING_DATADIR_NATIVE}/aclocal/pkg.m4 .
+}
+
+do_install:append () {
+    # samples have been removed from SUBDIRS from 5.1.5, need to install separately
+    oe_runmake 'DESTDIR=${D}' install_samples
+
+    if [ -d ${D}/run ]; then
+        rmdir ${D}/run
+    fi
+    if [ -d ${D}${localstatedir}/run ]; then
+        rmdir ${D}${localstatedir}/run
+    fi
+    # On hybrid systemd/sysvinit builds, we need to install the sysvinit script by hand.
+    if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+        install -d -m 755 ${D}${INIT_D_DIR}
+        install -m 755 ${S}/samples/rc.autofs ${D}${INIT_D_DIR}/autofs
+    fi
+}
+SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}"
+
+# all the libraries are unversioned, so don't pack it on PN-dev
+SOLIBS = ".so"
+FILES_SOLIBSDEV = ""
+# Some symlinks are created in plugins dir e.g.
+# mount_nfs4.so -> mount_nfs.so
+INSANE_SKIP:${PN} = "dev-so"
+
+RPROVIDES:${PN} += "${PN}-systemd"
+RREPLACES:${PN} += "${PN}-systemd"
+RCONFLICTS:${PN} += "${PN}-systemd"
+SYSTEMD_SERVICE:${PN} = "autofs.service"
diff --git a/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.21.06.bb b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.21.06.bb
deleted file mode 100644
index caa85e0..0000000
--- a/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.21.06.bb
+++ /dev/null
@@ -1,78 +0,0 @@
-SUMMARY = "OpenSAF is an open source implementation of the SAF AIS specification"
-DESCRIPTION = "OpenSAF is an open source project established to develop a base platform \
-middleware consistent with Service Availability Forum (SA Forum) \
-specifications, under the LGPLv2.1 license. The OpenSAF Foundation was \
-established by leading Communications and Enterprise Computing Companies to \
-facilitate the OpenSAF Project and to accelerate the adoption of the OpenSAF \
-code base in commercial products. \
-The OpenSAF project was launched in mid 2007 and has been under development by \
-an informal group of supporters of the OpenSAF initiative. The OpenSAF \
-Foundation was founded on January 22nd 2008 with Emerson Network Power, \
-Ericsson, Nokia Siemens Networks, HP and Sun Microsystems as founding members."
-HOMEPAGE = "http://www.opensaf.org"
-SECTION = "admin"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7"
-
-DEPENDS = "libxml2 python3"
-TOOLCHAIN = "gcc"
-
-SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/releases/${BPN}-${PV}.tar.gz \
-           file://0001-configure-Pass-linker-specific-options-with-Wl.patch \
-           file://0001-configure-Disable-format-overflow-if-supported-by-gc.patch \
-           file://0001-src-Add-missing-header-limits.h-for-_POSIX_HOST_NAME.patch \
-           file://0001-immpbe_dump.cc-Use-sys-wait.h-instead-of-wait.h.patch \
-           file://0001-create_empty_library-Use-CC-variable-intead-of-hardc.patch \
-           file://0001-immom_python-convert-to-python3.patch \
-           file://0001-Fix-build-with-fno-common.patch \
-           file://0001-Use-correct-printf-format-for-__fsblkcnt_t.patch \
-           "
-SRC_URI[md5sum] = "a60775787ba520a0b1031fcd42e0d65b"
-SRC_URI[sha256sum] = "d29d124506e4b084285d27c8742c7bca66de80be6a0ba9de8e37835ccaa8ee57"
-
-UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/opensaf/files/releases"
-
-inherit autotools useradd systemd pkgconfig
-
-USERADD_PACKAGES = "${PN}"
-GROUPADD_PARAM:${PN} = "-f -r opensaf"
-USERADD_PARAM:${PN} =  "-r -g opensaf -d ${datadir}/opensaf/ -s ${sbindir}/nologin -c \"OpenSAF\" opensaf"
-
-SYSTEMD_SERVICE:${PN} += "opensafd.service"
-SYSTEMD_AUTO_ENABLE = "disable"
-
-PACKAGECONFIG[systemd] = ",,systemd"
-PACKAGECONFIG[openhpi] = "--with-hpi-interface=B03,,openhpi"
-PACKAGECONFIG[plm] = "--enable-ais-plm,--disable-ais-plm,libvirt openhpi"
-
-PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}"
-
-CPPFLAGS += "-Wno-error=stringop-overflow= -Wno-error=stringop-truncation"
-CXXFLAGS += "-Wno-error=stringop-overflow= -Wno-error=stringop-truncation -Wno-error=format-truncation="
-LDFLAGS += "-Wl,--as-needed -latomic -Wl,--no-as-needed"
-
-do_install:append() {
-    rm -fr "${D}${localstatedir}/lock"
-    rm -fr "${D}${localstatedir}/run"
-    rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
-    rmdir --ignore-fail-on-non-empty "${D}${datadir}/java"
-    if [ ! -d "${D}${sysconfdir}/init.d" ]; then
-        install -d ${D}${sysconfdir}/init.d
-        install -m 0755 ${B}/osaf/services/infrastructure/nid/scripts/opensafd ${D}${sysconfdir}/init.d/
-    fi
-}
-
-FILES:${PN} += "${libdir}/libSa*.so ${systemd_unitdir}/system/*.service"
-FILES:${PN}-dev += "${libdir}/libopensaf_core.so"
-FILES:${PN}-staticdev += "${PKGLIBDIR}/*.a"
-
-INSANE_SKIP:${PN} = "dev-so"
-
-RDEPENDS:${PN} += "bash python3-core"
-
-# http://errors.yoctoproject.org/Errors/Details/186970/
-COMPATIBLE_HOST:libc-musl = 'null'
-
-FILES_SOLIBSDEV = ""
diff --git a/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.21.09.bb b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.21.09.bb
new file mode 100644
index 0000000..6c8a481
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.21.09.bb
@@ -0,0 +1,77 @@
+SUMMARY = "OpenSAF is an open source implementation of the SAF AIS specification"
+DESCRIPTION = "OpenSAF is an open source project established to develop a base platform \
+middleware consistent with Service Availability Forum (SA Forum) \
+specifications, under the LGPLv2.1 license. The OpenSAF Foundation was \
+established by leading Communications and Enterprise Computing Companies to \
+facilitate the OpenSAF Project and to accelerate the adoption of the OpenSAF \
+code base in commercial products. \
+The OpenSAF project was launched in mid 2007 and has been under development by \
+an informal group of supporters of the OpenSAF initiative. The OpenSAF \
+Foundation was founded on January 22nd 2008 with Emerson Network Power, \
+Ericsson, Nokia Siemens Networks, HP and Sun Microsystems as founding members."
+HOMEPAGE = "http://www.opensaf.org"
+SECTION = "admin"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7"
+
+DEPENDS = "libxml2 python3"
+TOOLCHAIN = "gcc"
+
+SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/releases/${BPN}-${PV}.tar.gz \
+           file://0001-configure-Pass-linker-specific-options-with-Wl.patch \
+           file://0001-configure-Disable-format-overflow-if-supported-by-gc.patch \
+           file://0001-src-Add-missing-header-limits.h-for-_POSIX_HOST_NAME.patch \
+           file://0001-immpbe_dump.cc-Use-sys-wait.h-instead-of-wait.h.patch \
+           file://0001-create_empty_library-Use-CC-variable-intead-of-hardc.patch \
+           file://0001-immom_python-convert-to-python3.patch \
+           file://0001-Fix-build-with-fno-common.patch \
+           file://0001-Use-correct-printf-format-for-__fsblkcnt_t.patch \
+           "
+SRC_URI[sha256sum] = "227ae1dafb6d51ce6561c9fcaec60087a0183839a8a4da11517e09f2a662b53d"
+
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/opensaf/files/releases"
+
+inherit autotools useradd systemd pkgconfig
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM:${PN} = "-f -r opensaf"
+USERADD_PARAM:${PN} =  "-r -g opensaf -d ${datadir}/opensaf/ -s ${sbindir}/nologin -c \"OpenSAF\" opensaf"
+
+SYSTEMD_SERVICE:${PN} += "opensafd.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+PACKAGECONFIG[systemd] = ",,systemd"
+PACKAGECONFIG[openhpi] = "--with-hpi-interface=B03,,openhpi"
+PACKAGECONFIG[plm] = "--enable-ais-plm,--disable-ais-plm,libvirt openhpi"
+
+PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}"
+
+CPPFLAGS += "-Wno-error=stringop-overflow= -Wno-error=stringop-truncation"
+CXXFLAGS += "-Wno-error=stringop-overflow= -Wno-error=stringop-truncation -Wno-error=format-truncation="
+LDFLAGS += "-Wl,--as-needed -latomic -Wl,--no-as-needed"
+
+do_install:append() {
+    rm -fr "${D}${localstatedir}/lock"
+    rm -fr "${D}${localstatedir}/run"
+    rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
+    rmdir --ignore-fail-on-non-empty "${D}${datadir}/java"
+    if [ ! -d "${D}${sysconfdir}/init.d" ]; then
+        install -d ${D}${sysconfdir}/init.d
+        install -m 0755 ${B}/osaf/services/infrastructure/nid/scripts/opensafd ${D}${sysconfdir}/init.d/
+    fi
+}
+
+FILES:${PN} += "${libdir}/libSa*.so ${systemd_unitdir}/system/*.service"
+FILES:${PN}-dev += "${libdir}/libopensaf_core.so"
+FILES:${PN}-staticdev += "${PKGLIBDIR}/*.a"
+
+INSANE_SKIP:${PN} = "dev-so"
+
+RDEPENDS:${PN} += "bash python3-core"
+
+# http://errors.yoctoproject.org/Errors/Details/186970/
+COMPATIBLE_HOST:libc-musl = 'null'
+
+FILES_SOLIBSDEV = ""
diff --git a/meta-openembedded/meta-networking/recipes-extended/kronosnet/kronosnet/0001-libknet-tests-Correct-include-path-for-poll.h.patch b/meta-openembedded/meta-networking/recipes-extended/kronosnet/kronosnet/0001-libknet-tests-Correct-include-path-for-poll.h.patch
new file mode 100644
index 0000000..0d261fd
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-extended/kronosnet/kronosnet/0001-libknet-tests-Correct-include-path-for-poll.h.patch
@@ -0,0 +1,29 @@
+From cae68083fda5d4ca832ff3cc8a533454df2efe23 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 12 Oct 2021 20:35:53 -0700
+Subject: [PATCH] libknet/tests: Correct include path for poll.h
+
+Fixes
+/usr/include/sys/poll.h:1:2: error: redirec
+ting incorrect #include <sys/poll.h> to <poll.h> [-Werror,-W#warnings]
+| #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
+
+Upstream-Status: Submitted [https://github.com/kronosnet/kronosnet/pull/363]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libknet/tests/test-common.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libknet/tests/test-common.c b/libknet/tests/test-common.c
+index 86b76b0..8f8b6ca 100644
+--- a/libknet/tests/test-common.c
++++ b/libknet/tests/test-common.c
+@@ -20,7 +20,7 @@
+ #include <pthread.h>
+ #include <dirent.h>
+ #include <sys/select.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ 
+ #include "libknet.h"
+ #include "test-common.h"
diff --git a/meta-openembedded/meta-networking/recipes-extended/kronosnet/kronosnet_1.20.bb b/meta-openembedded/meta-networking/recipes-extended/kronosnet/kronosnet_1.20.bb
deleted file mode 100644
index b19482c..0000000
--- a/meta-openembedded/meta-networking/recipes-extended/kronosnet/kronosnet_1.20.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright (C) 2020 Khem Raj <raj.khem@gmail.com>
-# Released under the MIT license (see COPYING.MIT for the terms)
-
-SUMMARY = "Kronosnet, often referred to as knet, is a network abstraction layer \
-           designed for High Availability use cases, where redundancy, security, \
-           fault tolerance and fast fail-over are the core requirements of your application."
-HOMEPAGE = "https://kronosnet.org/"
-LICENSE = "GPL-2.0+ & LGPL-2.1"
-LIC_FILES_CHKSUM = "file://COPYING.applications;md5=751419260aa954499f7abaabaa882bbe \
-                    file://COPYING.libraries;md5=2d5025d4aa3495befef8f17206a5b0a1"
-SECTION = "libs"
-DEPENDS = "doxygen-native libqb-native libxml2-native bzip2 libqb libxml2 libnl lksctp-tools lz4 lzo openssl nss xz zlib zstd"
-
-SRCREV = "b8d18c8360fd39cb04748e8bc1ee26de4afa4cbd"
-SRC_URI = "git://github.com/kronosnet/kronosnet;protocol=https;branch=stable1"
-
-UPSTREAM_CHECK_URI = "https://github.com/kronosnet/kronosnet/releases"
-
-inherit autotools pkgconfig
-
-S = "${WORKDIR}/git"
-
-# libknet/transport_udp.c:326:48: error: comparison of integers of different signs: 'unsigned long' and 'int' [-Werror,-Wsign-compare]
-# for (cmsg = CMSG_FIRSTHDR(&msg);cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) {
-#                                                             ^~~~~~~~~~~~~~~~~~~~~~~
-CFLAGS:append:toolchain-clang = " -Wno-sign-compare"
-
-PACKAGECONFIG[man] = "enable_man="yes", --disable-man, "
-
-PACKAGECONFIG:remove = "man"
diff --git a/meta-openembedded/meta-networking/recipes-extended/kronosnet/kronosnet_1.22.bb b/meta-openembedded/meta-networking/recipes-extended/kronosnet/kronosnet_1.22.bb
new file mode 100644
index 0000000..28d740c
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-extended/kronosnet/kronosnet_1.22.bb
@@ -0,0 +1,32 @@
+# Copyright (C) 2020 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "Kronosnet, often referred to as knet, is a network abstraction layer \
+           designed for High Availability use cases, where redundancy, security, \
+           fault tolerance and fast fail-over are the core requirements of your application."
+HOMEPAGE = "https://kronosnet.org/"
+LICENSE = "GPL-2.0+ & LGPL-2.1"
+LIC_FILES_CHKSUM = "file://COPYING.applications;md5=751419260aa954499f7abaabaa882bbe \
+                    file://COPYING.libraries;md5=2d5025d4aa3495befef8f17206a5b0a1"
+SECTION = "libs"
+DEPENDS = "doxygen-native libqb-native libxml2-native bzip2 libqb libxml2 libnl lksctp-tools lz4 lzo openssl nss xz zlib zstd"
+
+SRCREV = "0123ecebce0ad6aba3cdb320027192e15fd71e23"
+SRC_URI = "git://github.com/kronosnet/kronosnet;protocol=https;branch=stable1 \
+           file://0001-libknet-tests-Correct-include-path-for-poll.h.patch \
+           "
+
+UPSTREAM_CHECK_URI = "https://github.com/kronosnet/kronosnet/releases"
+
+inherit autotools pkgconfig
+
+S = "${WORKDIR}/git"
+
+# libknet/transport_udp.c:326:48: error: comparison of integers of different signs: 'unsigned long' and 'int' [-Werror,-Wsign-compare]
+# for (cmsg = CMSG_FIRSTHDR(&msg);cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) {
+#                                                             ^~~~~~~~~~~~~~~~~~~~~~~
+CFLAGS:append:toolchain-clang = " -Wno-sign-compare"
+
+PACKAGECONFIG[man] = "enable_man="yes", --disable-man, "
+
+PACKAGECONFIG:remove = "man"
diff --git a/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow.inc b/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow.inc
index 1640911..94d9553 100644
--- a/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow.inc
+++ b/meta-openembedded/meta-networking/recipes-protocols/openflow/openflow.inc
@@ -15,7 +15,7 @@
 
 DEPENDS = "virtual/libc"
 
-PACKAGECONFIG ??= "openssl"
+PACKAGECONFIG ??= ""
 PACKAGECONFIG[openssl] = "--enable-ssl,--disable-ssl, openssl openssl-native, libssl"
 
 EXTRA_OECONF += " \
diff --git a/meta-openembedded/meta-networking/recipes-support/ifenslave/ifenslave_2.12.bb b/meta-openembedded/meta-networking/recipes-support/ifenslave/ifenslave_2.12.bb
deleted file mode 100644
index 0254823..0000000
--- a/meta-openembedded/meta-networking/recipes-support/ifenslave/ifenslave_2.12.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "Configure network interfaces for parallel routing"
-HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/bonding"
-SECTION = "net"
-
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://debian/copyright;md5=acc89812938cf9ad6b1debc37cea0253"
-
-inherit manpages
-MAN_PKG = "${PN}"
-
-SRCREV = "88410a7003c31993e79471e151b24662fc2a0d64"
-SRC_URI = "git://salsa.debian.org/debian/ifenslave.git;protocol=https"
-
-S = "${WORKDIR}/git"
-
-do_install() {
-    install -m 0755 -D ${S}/debian/ifenslave.if-pre-up ${D}${sysconfdir}/network/if-pre-up.d/ifenslave
-    install -m 0755 -D ${S}/debian/ifenslave.if-post-down ${D}${sysconfdir}/network/if-post-down.d/ifenslave
-    install -m 0755 -D ${S}/debian/ifenslave.if-up ${D}${sysconfdir}/network/if-up.d/ifenslave
-}
-
-FILES:${PN}-doc:remove = "${mandir}"
diff --git a/meta-openembedded/meta-networking/recipes-support/ifenslave/ifenslave_2.13.bb b/meta-openembedded/meta-networking/recipes-support/ifenslave/ifenslave_2.13.bb
new file mode 100644
index 0000000..a2eb81f
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/ifenslave/ifenslave_2.13.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Configure network interfaces for parallel routing"
+HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/bonding"
+SECTION = "net"
+
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://debian/copyright;md5=acc89812938cf9ad6b1debc37cea0253"
+
+inherit manpages
+MAN_PKG = "${PN}"
+
+SRCREV = "1bdfb472f2f8212056ed418d48387e8b36e61b34"
+SRC_URI = "git://salsa.debian.org/debian/ifenslave.git;protocol=https;branch=main"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+    install -m 0755 -D ${S}/debian/ifenslave.if-pre-up ${D}${sysconfdir}/network/if-pre-up.d/ifenslave
+    install -m 0755 -D ${S}/debian/ifenslave.if-post-down ${D}${sysconfdir}/network/if-post-down.d/ifenslave
+    install -m 0755 -D ${S}/debian/ifenslave.if-up ${D}${sysconfdir}/network/if-up.d/ifenslave
+}
+
+FILES:${PN}-doc:remove = "${mandir}"
diff --git a/meta-openembedded/meta-networking/recipes-support/mctp/mctp_git.bb b/meta-openembedded/meta-networking/recipes-support/mctp/mctp_git.bb
new file mode 100644
index 0000000..cab5d6c
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/mctp/mctp_git.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Management Component Control Protocol utilities"
+HOMEPAGE = "http://www.github.com/CodeConstruct/mctp"
+SECTION = "net"
+LICENSE = "GPLv2"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=4cc91856b08b094b4f406a29dc61db21"
+
+SRCREV = "a8658290b7914f67146a982671b09f2270ba1654"
+
+SRC_URI = "git://github.com/CodeConstruct/mctp;branch=main"
+
+S = "${WORKDIR}/git"
+
+inherit meson pkgconfig systemd
+
+PACKAGECONFIG ??= " \
+    ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
+"
+
+# mctpd will only be built if pkg-config detects libsystemd; in which case
+# we'll want to declare the dep and install the service.
+PACKAGECONFIG[systemd] = ",,systemd,libsystemd"
+SYSTEMD_SERVICE:${PN} = "mctpd.service"
+
+do_install:append () {
+    if ${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'true', 'false', d)}; then
+        install -d ${D}${systemd_system_unitdir}
+        install -m 0644 ${S}/conf/mctpd.service \
+                ${D}${systemd_system_unitdir}/mctpd.service
+    fi
+}
diff --git a/meta-openembedded/meta-networking/recipes-support/nghttp2/nghttp2_1.45.1.bb b/meta-openembedded/meta-networking/recipes-support/nghttp2/nghttp2_1.45.1.bb
deleted file mode 100644
index e4a17cb..0000000
--- a/meta-openembedded/meta-networking/recipes-support/nghttp2/nghttp2_1.45.1.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-SUMMARY = "HTTP/2 C Library and tools"
-HOMEPAGE = "https://nghttp2.org/"
-SECTION = "libs"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=764abdf30b2eadd37ce47dcbce0ea1ec"
-DEPENDS = "c-ares cunit jansson libev libevent libxml2 openssl zlib"
-
-UPSTREAM_CHECK_URI = "https://github.com/nghttp2/nghttp2/releases"
-
-SRC_URI = "\
-    https://github.com/nghttp2/nghttp2/releases/download/v${PV}/nghttp2-${PV}.tar.xz \
-    file://0001-fetch-ocsp-response-use-python3.patch \
-"
-SRC_URI[sha256sum] = "abdc4addccadbc7d89abe27c4d6427d78e57d139f69c1f45749227393c68bf79"
-
-inherit cmake manpages python3native
-PACKAGECONFIG[manpages] = ""
-
-# examples are never installed, and don't need to be built in the
-# first place
-EXTRA_OECMAKE = "-DENABLE_EXAMPLES=OFF -DENABLE_APP=ON -DENABLE_HPACK_TOOLS=OFF"
-
-PACKAGES =+ "lib${PN} ${PN}-client ${PN}-proxy ${PN}-server"
-
-RDEPENDS:${PN} = "${PN}-client (>= ${PV}) ${PN}-proxy (>= ${PV}) ${PN}-server (>= ${PV})"
-RDEPENDS:${PN}:class-native = ""
-RDEPENDS:${PN}-proxy = "openssl python3-core python3-io python3-shell"
-
-ALLOW_EMPTY:${PN} = "1"
-FILES:${PN} = ""
-FILES:lib${PN} = "${libdir}/*${SOLIBS}"
-FILES:${PN}-client = "${bindir}/h2load ${bindir}/nghttp"
-FILES:${PN}-proxy = "${bindir}/nghttpx ${datadir}/${BPN}/fetch-ocsp-response"
-FILES:${PN}-server = "${bindir}/nghttpd"
-
-BBCLASSEXTEND = "native"
diff --git a/meta-openembedded/meta-networking/recipes-support/openipmi/files/0001-m4-ax_python_devel.m4-do-not-check-for-distutils.patch b/meta-openembedded/meta-networking/recipes-support/openipmi/files/0001-m4-ax_python_devel.m4-do-not-check-for-distutils.patch
new file mode 100644
index 0000000..00956fb
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/openipmi/files/0001-m4-ax_python_devel.m4-do-not-check-for-distutils.patch
@@ -0,0 +1,41 @@
+From 3a35611687864cf3599712d0d2ff54532b0118ac Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex@linutronix.de>
+Date: Sun, 3 Oct 2021 21:42:32 +0200
+Subject: [PATCH] m4/ax_python_devel.m4: do not check for distutils
+
+With py 3.10 this prints a deprecation warning which is
+taken as an error. Upstream should rework the code to not
+use distuils.
+
+Upstream-Status: Inappropriate [needs a proper fix upstream]
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ m4/ax_python_devel.m4 | 15 ---------------
+ 1 file changed, 15 deletions(-)
+
+diff --git a/m4/ax_python_devel.m4 b/m4/ax_python_devel.m4
+index e0804c5..cfc0b24 100644
+--- a/m4/ax_python_devel.m4
++++ b/m4/ax_python_devel.m4
+@@ -138,21 +138,6 @@ variable to configure. See ``configure --help'' for reference.
+ 		fi
+ 	fi
+ 
+-	#
+-	# Check if you have distutils, else fail
+-	#
+-	AC_MSG_CHECKING([for the distutils Python package])
+-	ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
+-	if test -z "$ac_distutils_result"; then
+-		AC_MSG_RESULT([yes])
+-	else
+-		AC_MSG_RESULT([no])
+-		AC_MSG_ERROR([cannot import Python module "distutils".
+-Please check your Python installation. The error was:
+-$ac_distutils_result])
+-		PYTHON_VERSION=""
+-	fi
+-
+ 	#
+ 	# Check for Python include path
+ 	#
diff --git a/meta-openembedded/meta-networking/recipes-support/openipmi/openipmi_2.0.31.bb b/meta-openembedded/meta-networking/recipes-support/openipmi/openipmi_2.0.31.bb
index ecc98dd..4b85d94 100644
--- a/meta-openembedded/meta-networking/recipes-support/openipmi/openipmi_2.0.31.bb
+++ b/meta-openembedded/meta-networking/recipes-support/openipmi/openipmi_2.0.31.bb
@@ -31,6 +31,7 @@
            file://include_sys_types.patch \
            file://openipmi-helper \
            file://ipmi.service \
+           file://0001-m4-ax_python_devel.m4-do-not-check-for-distutils.patch \
            "
 
 S = "${WORKDIR}/OpenIPMI-${PV}"
diff --git a/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.5.3.bb b/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.5.3.bb
deleted file mode 100644
index a70e970..0000000
--- a/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.5.3.bb
+++ /dev/null
@@ -1,76 +0,0 @@
-SUMMARY = "A full-featured SSL VPN solution via tun device."
-HOMEPAGE = "https://openvpn.net/"
-SECTION = "net"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=377a495e6f12b2a3adcee797e59540b8"
-DEPENDS = "lzo openssl iproute2 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
-
-inherit autotools systemd update-rc.d
-
-SRC_URI = "http://swupdate.openvpn.org/community/releases/${BP}.tar.gz \
-           file://openvpn \
-           file://openvpn@.service \
-           file://openvpn-volatile.conf"
-
-UPSTREAM_CHECK_URI = "https://openvpn.net/community-downloads"
-
-SRC_URI[md5sum] = "08895fd1142f25fdd94a98315632e1bf"
-SRC_URI[sha256sum] = "75f0044df449430555ca7b995a2b77ab24f2946fdc3668301b8edc23986a5f7e"
-
-# CVE-2020-7224 and CVE-2020-27569 are for Aviatrix OpenVPN client, not for openvpn.
-CVE_CHECK_WHITELIST += "CVE-2020-7224 CVE-2020-27569"
-
-SYSTEMD_SERVICE:${PN} += "openvpn@loopback-server.service openvpn@loopback-client.service"
-SYSTEMD_AUTO_ENABLE = "disable"
-
-INITSCRIPT_PACKAGES = "${PN}"
-INITSCRIPT_NAME:${PN} = "openvpn"
-INITSCRIPT_PARAMS:${PN} = "start 10 2 3 4 5 . stop 70 0 1 6 ."
-
-CFLAGS += "-fno-inline"
-
-# I want openvpn to be able to read password from file (hrw)
-EXTRA_OECONF += "--enable-iproute2"
-EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '', '--disable-plugin-auth-pam', d)}"
-
-# Explicitly specify IPROUTE to bypass the configure-time check for /sbin/ip on the host.
-EXTRA_OECONF += "IPROUTE=${base_sbindir}/ip"
-
-do_install:append() {
-    install -d ${D}/${sysconfdir}/init.d
-    install -m 755 ${WORKDIR}/openvpn ${D}/${sysconfdir}/init.d
-
-    install -d ${D}/${sysconfdir}/openvpn
-    install -d ${D}/${sysconfdir}/openvpn/sample
-    install -m 755 ${S}/sample/sample-config-files/loopback-server  ${D}${sysconfdir}/openvpn/sample/loopback-server.conf
-    install -m 755 ${S}/sample/sample-config-files/loopback-client  ${D}${sysconfdir}/openvpn/sample/loopback-client.conf
-    install -dm 755 ${D}${sysconfdir}/openvpn/sample/sample-keys
-    install -m 644 ${S}/sample/sample-keys/* ${D}${sysconfdir}/openvpn/sample/sample-keys
-
-    if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
-        install -d ${D}/${systemd_unitdir}/system
-        install -m 644 ${WORKDIR}/openvpn@.service ${D}/${systemd_unitdir}/system
-        install -m 644 ${WORKDIR}/openvpn@.service ${D}/${systemd_unitdir}/system/openvpn@loopback-server.service
-        install -m 644 ${WORKDIR}/openvpn@.service ${D}/${systemd_unitdir}/system/openvpn@loopback-client.service
-
-        install -d ${D}/${localstatedir}
-        install -d ${D}/${localstatedir}/lib
-        install -d -m 710 ${D}/${localstatedir}/lib/openvpn
-
-        install -d ${D}${sysconfdir}/tmpfiles.d
-        install -m 0644 ${WORKDIR}/openvpn-volatile.conf ${D}${sysconfdir}/tmpfiles.d/openvpn.conf
-        sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${sysconfdir}/tmpfiles.d/openvpn.conf
-    fi
-}
-
-PACKAGES =+ " ${PN}-sample "
-
-RRECOMMENDS:${PN} = "kernel-module-tun"
-
-FILES:${PN}-dbg += "${libdir}/openvpn/plugins/.debug"
-FILES:${PN} += "${systemd_unitdir}/system/openvpn@.service \
-                ${sysconfdir}/tmpfiles.d \
-               "
-FILES:${PN}-sample += "${systemd_unitdir}/system/openvpn@loopback-server.service \
-                       ${systemd_unitdir}/system/openvpn@loopback-client.service \
-                       ${sysconfdir}/openvpn/sample/"
diff --git a/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.5.4.bb b/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.5.4.bb
new file mode 100644
index 0000000..6b588a5
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/openvpn/openvpn_2.5.4.bb
@@ -0,0 +1,75 @@
+SUMMARY = "A full-featured SSL VPN solution via tun device."
+HOMEPAGE = "https://openvpn.net/"
+SECTION = "net"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=377a495e6f12b2a3adcee797e59540b8"
+DEPENDS = "lzo openssl iproute2 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+
+inherit autotools systemd update-rc.d
+
+SRC_URI = "http://swupdate.openvpn.org/community/releases/${BP}.tar.gz \
+           file://openvpn \
+           file://openvpn@.service \
+           file://openvpn-volatile.conf"
+
+UPSTREAM_CHECK_URI = "https://openvpn.net/community-downloads"
+
+SRC_URI[sha256sum] = "f80f3c3df1b94a8892ae547df84f152583250684a24bd022ccc98ef56fa93d97"
+
+# CVE-2020-7224 and CVE-2020-27569 are for Aviatrix OpenVPN client, not for openvpn.
+CVE_CHECK_WHITELIST += "CVE-2020-7224 CVE-2020-27569"
+
+SYSTEMD_SERVICE:${PN} += "openvpn@loopback-server.service openvpn@loopback-client.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+INITSCRIPT_PACKAGES = "${PN}"
+INITSCRIPT_NAME:${PN} = "openvpn"
+INITSCRIPT_PARAMS:${PN} = "start 10 2 3 4 5 . stop 70 0 1 6 ."
+
+CFLAGS += "-fno-inline"
+
+# I want openvpn to be able to read password from file (hrw)
+EXTRA_OECONF += "--enable-iproute2"
+EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '', '--disable-plugin-auth-pam', d)}"
+
+# Explicitly specify IPROUTE to bypass the configure-time check for /sbin/ip on the host.
+EXTRA_OECONF += "IPROUTE=${base_sbindir}/ip"
+
+do_install:append() {
+    install -d ${D}/${sysconfdir}/init.d
+    install -m 755 ${WORKDIR}/openvpn ${D}/${sysconfdir}/init.d
+
+    install -d ${D}/${sysconfdir}/openvpn
+    install -d ${D}/${sysconfdir}/openvpn/sample
+    install -m 755 ${S}/sample/sample-config-files/loopback-server  ${D}${sysconfdir}/openvpn/sample/loopback-server.conf
+    install -m 755 ${S}/sample/sample-config-files/loopback-client  ${D}${sysconfdir}/openvpn/sample/loopback-client.conf
+    install -dm 755 ${D}${sysconfdir}/openvpn/sample/sample-keys
+    install -m 644 ${S}/sample/sample-keys/* ${D}${sysconfdir}/openvpn/sample/sample-keys
+
+    if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+        install -d ${D}/${systemd_unitdir}/system
+        install -m 644 ${WORKDIR}/openvpn@.service ${D}/${systemd_unitdir}/system
+        install -m 644 ${WORKDIR}/openvpn@.service ${D}/${systemd_unitdir}/system/openvpn@loopback-server.service
+        install -m 644 ${WORKDIR}/openvpn@.service ${D}/${systemd_unitdir}/system/openvpn@loopback-client.service
+
+        install -d ${D}/${localstatedir}
+        install -d ${D}/${localstatedir}/lib
+        install -d -m 710 ${D}/${localstatedir}/lib/openvpn
+
+        install -d ${D}${sysconfdir}/tmpfiles.d
+        install -m 0644 ${WORKDIR}/openvpn-volatile.conf ${D}${sysconfdir}/tmpfiles.d/openvpn.conf
+        sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${sysconfdir}/tmpfiles.d/openvpn.conf
+    fi
+}
+
+PACKAGES =+ " ${PN}-sample "
+
+RRECOMMENDS:${PN} = "kernel-module-tun"
+
+FILES:${PN}-dbg += "${libdir}/openvpn/plugins/.debug"
+FILES:${PN} += "${systemd_unitdir}/system/openvpn@.service \
+                ${sysconfdir}/tmpfiles.d \
+               "
+FILES:${PN}-sample += "${systemd_unitdir}/system/openvpn@loopback-server.service \
+                       ${systemd_unitdir}/system/openvpn@loopback-client.service \
+                       ${sysconfdir}/openvpn/sample/"
diff --git a/meta-openembedded/meta-networking/recipes-support/strongswan/strongswan_5.9.3.bb b/meta-openembedded/meta-networking/recipes-support/strongswan/strongswan_5.9.3.bb
deleted file mode 100644
index ad104e4..0000000
--- a/meta-openembedded/meta-networking/recipes-support/strongswan/strongswan_5.9.3.bb
+++ /dev/null
@@ -1,143 +0,0 @@
-DESCRIPTION = "strongSwan is an OpenSource IPsec implementation for the \
-Linux operating system."
-SUMMARY = "strongSwan is an OpenSource IPsec implementation"
-HOMEPAGE = "http://www.strongswan.org"
-SECTION = "net"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-DEPENDS = "gmp openssl flex-native flex bison-native"
-
-SRC_URI = "http://download.strongswan.org/strongswan-${PV}.tar.bz2 \
-           file://fix-funtion-parameter.patch \
-           file://0001-memory.h-Include-stdint.h-for-uintptr_t.patch \
-           "
-
-SRC_URI[sha256sum] = "9325ab56a0a4e97e379401e1d942ce3e0d8b6372291350ab2caae0755862c6f7"
-
-UPSTREAM_CHECK_REGEX = "strongswan-(?P<pver>\d+(\.\d+)+)\.tar"
-
-EXTRA_OECONF = " \
-        --without-lib-prefix \
-        --with-dev-headers=${includedir}/strongswan \
-"
-
-EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/', '--without-systemdsystemunitdir', d)}"
-
-PACKAGECONFIG ?= "curl gmp openssl sqlite3 swanctl \
-        ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd-charon', 'charon', d)} \
-"
-PACKAGECONFIG[aesni] = "--enable-aesni,--disable-aesni,,${PN}-plugin-aesni"
-PACKAGECONFIG[bfd] = "--enable-bfd-backtraces,--disable-bfd-backtraces,binutils"
-PACKAGECONFIG[charon] = "--enable-charon,--disable-charon,"
-PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl,${PN}-plugin-curl"
-PACKAGECONFIG[eap-identity] = "--enable-eap-identity,--disable-eap-identity,,${PN}-plugin-eap-identity"
-PACKAGECONFIG[eap-mschapv2] = "--enable-eap-mschapv2,--disable-eap-mschapv2,,${PN}-plugin-eap-mschapv2"
-PACKAGECONFIG[gmp] = "--enable-gmp,--disable-gmp,gmp,${PN}-plugin-gmp"
-PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap,openldap,${PN}-plugin-ldap"
-PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5,${PN}-plugin-mysql"
-PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl,${PN}-plugin-openssl"
-PACKAGECONFIG[scep] = "--enable-scepclient,--disable-scepclient,"
-PACKAGECONFIG[soup] = "--enable-soup,--disable-soup,libsoup-2.4,${PN}-plugin-soup"
-PACKAGECONFIG[sqlite3] = "--enable-sqlite,--disable-sqlite,sqlite3,${PN}-plugin-sqlite"
-PACKAGECONFIG[stroke] = "--enable-stroke,--disable-stroke,,${PN}-plugin-stroke"
-PACKAGECONFIG[swanctl] = "--enable-swanctl,--disable-swanctl,,libgcc"
-
-# requires swanctl
-PACKAGECONFIG[systemd-charon] = "--enable-systemd,--disable-systemd,systemd,"
-
-inherit autotools systemd pkgconfig
-
-RRECOMMENDS:${PN} = "kernel-module-ipsec"
-
-FILES:${PN} += "${libdir}/ipsec/lib*${SOLIBS}"
-FILES:${PN}-dbg += "${bindir}/.debug ${sbindir}/.debug ${libdir}/ipsec/.debug ${libexecdir}/ipsec/.debug"
-FILES:${PN}-dev += "${libdir}/ipsec/lib*${SOLIBSDEV} ${libdir}/ipsec/*.la ${libdir}/ipsec/include/config.h"
-FILES:${PN}-staticdev += "${libdir}/ipsec/*.a"
-
-CONFFILES:${PN} = "${sysconfdir}/*.conf ${sysconfdir}/ipsec.d/*.conf ${sysconfdir}/strongswan.d/*.conf"
-
-PACKAGES += "${PN}-plugins"
-ALLOW_EMPTY:${PN}-plugins = "1"
-
-PACKAGES_DYNAMIC += "^${PN}-plugin-.*$"
-NOAUTOPACKAGEDEBUG = "1"
-
-python split_strongswan_plugins () {
-    sysconfdir = d.expand('${sysconfdir}/strongswan.d/charon')
-    libdir = d.expand('${libdir}/ipsec/plugins')
-    dbglibdir = os.path.join(libdir, '.debug')
-
-    def add_plugin_conf(f, pkg, file_regex, output_pattern, modulename):
-        dvar = d.getVar('PKGD')
-        oldfiles = d.getVar('CONFFILES:' + pkg)
-        newfile = '/' + os.path.relpath(f, dvar)
-
-        if not oldfiles:
-            d.setVar('CONFFILES:' + pkg, newfile)
-        else:
-            d.setVar('CONFFILES:' + pkg, oldfiles + " " + newfile)
-
-    split_packages = do_split_packages(d, libdir, 'libstrongswan-(.*)\.so', '${PN}-plugin-%s', 'strongSwan %s plugin', prepend=True)
-    do_split_packages(d, sysconfdir, '(.*)\.conf', '${PN}-plugin-%s', 'strongSwan %s plugin', prepend=True, hook=add_plugin_conf)
-
-    split_dbg_packages = do_split_packages(d, dbglibdir, 'libstrongswan-(.*)\.so', '${PN}-plugin-%s-dbg', 'strongSwan %s plugin - Debugging files', prepend=True, extra_depends='${PN}-dbg')
-    split_dev_packages = do_split_packages(d, libdir, 'libstrongswan-(.*)\.la', '${PN}-plugin-%s-dev', 'strongSwan %s plugin - Development files', prepend=True, extra_depends='${PN}-dev')
-    split_staticdev_packages = do_split_packages(d, libdir, 'libstrongswan-(.*)\.a', '${PN}-plugin-%s-staticdev', 'strongSwan %s plugin - Development files (Static Libraries)', prepend=True, extra_depends='${PN}-staticdev')
-
-    if split_packages:
-        pn = d.getVar('PN')
-        d.setVar('RRECOMMENDS:' + pn + '-plugins', ' '.join(split_packages))
-        d.appendVar('RRECOMMENDS:' + pn + '-dbg', ' ' + ' '.join(split_dbg_packages))
-        d.appendVar('RRECOMMENDS:' + pn + '-dev', ' ' + ' '.join(split_dev_packages))
-        d.appendVar('RRECOMMENDS:' + pn + '-staticdev', ' ' + ' '.join(split_staticdev_packages))
-}
-
-PACKAGESPLITFUNCS:prepend = "split_strongswan_plugins "
-
-# Install some default plugins based on default strongSwan ./configure options
-# See https://wiki.strongswan.org/projects/strongswan/wiki/Pluginlist
-RDEPENDS:${PN} += "\
-    ${PN}-plugin-aes \
-    ${PN}-plugin-attr \
-    ${PN}-plugin-cmac \
-    ${PN}-plugin-constraints \
-    ${PN}-plugin-des \
-    ${PN}-plugin-dnskey \
-    ${PN}-plugin-hmac \
-    ${PN}-plugin-kernel-netlink \
-    ${PN}-plugin-md5 \
-    ${PN}-plugin-nonce \
-    ${PN}-plugin-pem \
-    ${PN}-plugin-pgp \
-    ${PN}-plugin-pkcs1 \
-    ${PN}-plugin-pkcs7 \
-    ${PN}-plugin-pkcs8 \
-    ${PN}-plugin-pkcs12 \
-    ${PN}-plugin-pubkey \
-    ${PN}-plugin-random \
-    ${PN}-plugin-rc2 \
-    ${PN}-plugin-resolve \
-    ${PN}-plugin-revocation \
-    ${PN}-plugin-sha1 \
-    ${PN}-plugin-sha2 \
-    ${PN}-plugin-socket-default \
-    ${PN}-plugin-sshkey \
-    ${PN}-plugin-updown \
-    ${PN}-plugin-vici \
-    ${PN}-plugin-x509 \
-    ${PN}-plugin-xauth-generic \
-    ${PN}-plugin-xcbc \
-    ${PN}-plugin-curve25519 \
-    "
-
-RPROVIDES:${PN} += "${PN}-systemd"
-RREPLACES:${PN} += "${PN}-systemd"
-RCONFLICTS:${PN} += "${PN}-systemd"
-
-# The deprecated legacy 'strongswan-starter' service should only be used when charon and
-# stroke are enabled. When swanctl is in use, 'strongswan.service' is needed.
-# See: https://wiki.strongswan.org/projects/strongswan/wiki/Charon-systemd
-SYSTEMD_SERVICE:${PN} = " \
-    ${@bb.utils.contains('PACKAGECONFIG', 'swanctl', '${BPN}.service', '', d)} \
-    ${@bb.utils.contains('PACKAGECONFIG', 'charon', '${BPN}-starter.service', '', d)} \
-"
diff --git a/meta-openembedded/meta-networking/recipes-support/strongswan/strongswan_5.9.4.bb b/meta-openembedded/meta-networking/recipes-support/strongswan/strongswan_5.9.4.bb
new file mode 100644
index 0000000..cbc263d
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-support/strongswan/strongswan_5.9.4.bb
@@ -0,0 +1,143 @@
+DESCRIPTION = "strongSwan is an OpenSource IPsec implementation for the \
+Linux operating system."
+SUMMARY = "strongSwan is an OpenSource IPsec implementation"
+HOMEPAGE = "http://www.strongswan.org"
+SECTION = "net"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+DEPENDS = "gmp openssl flex-native flex bison-native"
+
+SRC_URI = "http://download.strongswan.org/strongswan-${PV}.tar.bz2 \
+           file://fix-funtion-parameter.patch \
+           file://0001-memory.h-Include-stdint.h-for-uintptr_t.patch \
+           "
+
+SRC_URI[sha256sum] = "45fdf1a4c2af086d8ff5b76fd7b21d3b6f0890f365f83bf4c9a75dda26887518"
+
+UPSTREAM_CHECK_REGEX = "strongswan-(?P<pver>\d+(\.\d+)+)\.tar"
+
+EXTRA_OECONF = " \
+        --without-lib-prefix \
+        --with-dev-headers=${includedir}/strongswan \
+"
+
+EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/', '--without-systemdsystemunitdir', d)}"
+
+PACKAGECONFIG ?= "curl gmp openssl sqlite3 swanctl \
+        ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd-charon', 'charon', d)} \
+"
+PACKAGECONFIG[aesni] = "--enable-aesni,--disable-aesni,,${PN}-plugin-aesni"
+PACKAGECONFIG[bfd] = "--enable-bfd-backtraces,--disable-bfd-backtraces,binutils"
+PACKAGECONFIG[charon] = "--enable-charon,--disable-charon,"
+PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl,${PN}-plugin-curl"
+PACKAGECONFIG[eap-identity] = "--enable-eap-identity,--disable-eap-identity,,${PN}-plugin-eap-identity"
+PACKAGECONFIG[eap-mschapv2] = "--enable-eap-mschapv2,--disable-eap-mschapv2,,${PN}-plugin-eap-mschapv2"
+PACKAGECONFIG[gmp] = "--enable-gmp,--disable-gmp,gmp,${PN}-plugin-gmp"
+PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap,openldap,${PN}-plugin-ldap"
+PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5,${PN}-plugin-mysql"
+PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl,${PN}-plugin-openssl"
+PACKAGECONFIG[scep] = "--enable-scepclient,--disable-scepclient,"
+PACKAGECONFIG[soup] = "--enable-soup,--disable-soup,libsoup-2.4,${PN}-plugin-soup"
+PACKAGECONFIG[sqlite3] = "--enable-sqlite,--disable-sqlite,sqlite3,${PN}-plugin-sqlite"
+PACKAGECONFIG[stroke] = "--enable-stroke,--disable-stroke,,${PN}-plugin-stroke"
+PACKAGECONFIG[swanctl] = "--enable-swanctl,--disable-swanctl,,libgcc"
+
+# requires swanctl
+PACKAGECONFIG[systemd-charon] = "--enable-systemd,--disable-systemd,systemd,"
+
+inherit autotools systemd pkgconfig
+
+RRECOMMENDS:${PN} = "kernel-module-ipsec"
+
+FILES:${PN} += "${libdir}/ipsec/lib*${SOLIBS}"
+FILES:${PN}-dbg += "${bindir}/.debug ${sbindir}/.debug ${libdir}/ipsec/.debug ${libexecdir}/ipsec/.debug"
+FILES:${PN}-dev += "${libdir}/ipsec/lib*${SOLIBSDEV} ${libdir}/ipsec/*.la ${libdir}/ipsec/include/config.h"
+FILES:${PN}-staticdev += "${libdir}/ipsec/*.a"
+
+CONFFILES:${PN} = "${sysconfdir}/*.conf ${sysconfdir}/ipsec.d/*.conf ${sysconfdir}/strongswan.d/*.conf"
+
+PACKAGES += "${PN}-plugins"
+ALLOW_EMPTY:${PN}-plugins = "1"
+
+PACKAGES_DYNAMIC += "^${PN}-plugin-.*$"
+NOAUTOPACKAGEDEBUG = "1"
+
+python split_strongswan_plugins () {
+    sysconfdir = d.expand('${sysconfdir}/strongswan.d/charon')
+    libdir = d.expand('${libdir}/ipsec/plugins')
+    dbglibdir = os.path.join(libdir, '.debug')
+
+    def add_plugin_conf(f, pkg, file_regex, output_pattern, modulename):
+        dvar = d.getVar('PKGD')
+        oldfiles = d.getVar('CONFFILES:' + pkg)
+        newfile = '/' + os.path.relpath(f, dvar)
+
+        if not oldfiles:
+            d.setVar('CONFFILES:' + pkg, newfile)
+        else:
+            d.setVar('CONFFILES:' + pkg, oldfiles + " " + newfile)
+
+    split_packages = do_split_packages(d, libdir, 'libstrongswan-(.*)\.so', '${PN}-plugin-%s', 'strongSwan %s plugin', prepend=True)
+    do_split_packages(d, sysconfdir, '(.*)\.conf', '${PN}-plugin-%s', 'strongSwan %s plugin', prepend=True, hook=add_plugin_conf)
+
+    split_dbg_packages = do_split_packages(d, dbglibdir, 'libstrongswan-(.*)\.so', '${PN}-plugin-%s-dbg', 'strongSwan %s plugin - Debugging files', prepend=True, extra_depends='${PN}-dbg')
+    split_dev_packages = do_split_packages(d, libdir, 'libstrongswan-(.*)\.la', '${PN}-plugin-%s-dev', 'strongSwan %s plugin - Development files', prepend=True, extra_depends='${PN}-dev')
+    split_staticdev_packages = do_split_packages(d, libdir, 'libstrongswan-(.*)\.a', '${PN}-plugin-%s-staticdev', 'strongSwan %s plugin - Development files (Static Libraries)', prepend=True, extra_depends='${PN}-staticdev')
+
+    if split_packages:
+        pn = d.getVar('PN')
+        d.setVar('RRECOMMENDS:' + pn + '-plugins', ' '.join(split_packages))
+        d.appendVar('RRECOMMENDS:' + pn + '-dbg', ' ' + ' '.join(split_dbg_packages))
+        d.appendVar('RRECOMMENDS:' + pn + '-dev', ' ' + ' '.join(split_dev_packages))
+        d.appendVar('RRECOMMENDS:' + pn + '-staticdev', ' ' + ' '.join(split_staticdev_packages))
+}
+
+PACKAGESPLITFUNCS:prepend = "split_strongswan_plugins "
+
+# Install some default plugins based on default strongSwan ./configure options
+# See https://wiki.strongswan.org/projects/strongswan/wiki/Pluginlist
+RDEPENDS:${PN} += "\
+    ${PN}-plugin-aes \
+    ${PN}-plugin-attr \
+    ${PN}-plugin-cmac \
+    ${PN}-plugin-constraints \
+    ${PN}-plugin-des \
+    ${PN}-plugin-dnskey \
+    ${PN}-plugin-hmac \
+    ${PN}-plugin-kernel-netlink \
+    ${PN}-plugin-md5 \
+    ${PN}-plugin-nonce \
+    ${PN}-plugin-pem \
+    ${PN}-plugin-pgp \
+    ${PN}-plugin-pkcs1 \
+    ${PN}-plugin-pkcs7 \
+    ${PN}-plugin-pkcs8 \
+    ${PN}-plugin-pkcs12 \
+    ${PN}-plugin-pubkey \
+    ${PN}-plugin-random \
+    ${PN}-plugin-rc2 \
+    ${PN}-plugin-resolve \
+    ${PN}-plugin-revocation \
+    ${PN}-plugin-sha1 \
+    ${PN}-plugin-sha2 \
+    ${PN}-plugin-socket-default \
+    ${PN}-plugin-sshkey \
+    ${PN}-plugin-updown \
+    ${PN}-plugin-vici \
+    ${PN}-plugin-x509 \
+    ${PN}-plugin-xauth-generic \
+    ${PN}-plugin-xcbc \
+    ${PN}-plugin-curve25519 \
+    "
+
+RPROVIDES:${PN} += "${PN}-systemd"
+RREPLACES:${PN} += "${PN}-systemd"
+RCONFLICTS:${PN} += "${PN}-systemd"
+
+# The deprecated legacy 'strongswan-starter' service should only be used when charon and
+# stroke are enabled. When swanctl is in use, 'strongswan.service' is needed.
+# See: https://wiki.strongswan.org/projects/strongswan/wiki/Charon-systemd
+SYSTEMD_SERVICE:${PN} = " \
+    ${@bb.utils.contains('PACKAGECONFIG', 'swanctl', '${BPN}.service', '', d)} \
+    ${@bb.utils.contains('PACKAGECONFIG', 'charon', '${BPN}-starter.service', '', d)} \
+"
diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/thingsboard-gateway/thingsboard-gateway_2.5.2.bb b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/thingsboard-gateway/thingsboard-gateway_2.5.2.bb
deleted file mode 100644
index 3c89c37..0000000
--- a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/thingsboard-gateway/thingsboard-gateway_2.5.2.bb
+++ /dev/null
@@ -1,68 +0,0 @@
-SUMMARY = "Open-source IoT platform for data collection, processing, visualization, and device management"
-DESCRIPTION = "\
-The Thingsboard IoT Gateway is an open-source solution that allows you \
-to integrate devices connected to legacy and third-party systems with Thingsboard."
-HOMEPAGE = "https://thingsboard.io/"
-
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
-
-SRC_URI[md5sum] = "469c8b5cd1c16c20ef40f0a97a3a0fda"
-SRC_URI[sha256sum] = "b328f4e315c3541ac80a4931974a34a81afe4d1f382f48e8604669a55816c0d7"
-
-inherit pypi setuptools3
-
-PYPI_PACKAGE = "thingsboard-gateway"
-
-RDEPENDS:${PN} += " python3-jsonpath-rw \
-                    python3-regex \
-                    python3-paho-mqtt \
-                    python3-pyyaml \
-                    python3-simplejson \
-                    python3-requests \
-                    python3-pip \
-                    python3-pyrsistent \
-"
-
-SRC_URI += "file://bacnet.json \
-            file://ble.json \
-            file://can.json \
-            file://custom_serial.json \
-            file://modbus.json \
-            file://modbus_serial.json \
-            file://mqtt.json \
-            file://opcua.json \
-            file://odbc.json \
-            file://request.json \
-            file://rest.json \
-            file://snmp.json \
-            file://tb_gateway.yaml \
-            file://logs.conf \
-            file://thingsboard-gateway.service \
-            "
-
-
-inherit systemd
-
-SYSTEMD_PACKAGES = "${PN}"
-SYSTEMD_SERVICE:${PN} = "thingsboard-gateway.service"
-
-FILES:${PN} += "/etc \
-                /lib \
-                /usr \
-"
-
-do_install:append(){
-
-    install -d ${D}${sysconfdir}/thingsboard-gateway/config
-
-    for file in $(find ${WORKDIR} -maxdepth 1 -type f -name *.json); do
-        install -m 0644 "$file" ${D}${sysconfdir}/thingsboard-gateway/config
-    done
-
-    install -m 0644 ${WORKDIR}/tb_gateway.yaml ${D}${sysconfdir}/thingsboard-gateway/config
-    install -m 0644 ${WORKDIR}/logs.conf ${D}${sysconfdir}/thingsboard-gateway/config
-
-    install -d ${D}${systemd_unitdir}/system/
-    install -m 0644 ${WORKDIR}/thingsboard-gateway.service     ${D}${systemd_system_unitdir}/thingsboard-gateway.service
-}
\ No newline at end of file
diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/thingsboard-gateway/thingsboard-gateway_2.8.bb b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/thingsboard-gateway/thingsboard-gateway_2.8.bb
new file mode 100644
index 0000000..6ff98ab
--- /dev/null
+++ b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-connectivity/thingsboard-gateway/thingsboard-gateway_2.8.bb
@@ -0,0 +1,67 @@
+SUMMARY = "Open-source IoT platform for data collection, processing, visualization, and device management"
+DESCRIPTION = "\
+The Thingsboard IoT Gateway is an open-source solution that allows you \
+to integrate devices connected to legacy and third-party systems with Thingsboard."
+HOMEPAGE = "https://thingsboard.io/"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+SRC_URI[sha256sum] = "35a8aa0268e61b15d689439927756934a28757dc77ad5f03ee6a9119edc37199"
+
+inherit pypi setuptools3
+
+PYPI_PACKAGE = "thingsboard-gateway"
+
+RDEPENDS:${PN} += " python3-jsonpath-rw \
+                    python3-regex \
+                    python3-paho-mqtt \
+                    python3-pyyaml \
+                    python3-simplejson \
+                    python3-requests \
+                    python3-pip \
+                    python3-pyrsistent \
+"
+
+SRC_URI += "file://bacnet.json \
+            file://ble.json \
+            file://can.json \
+            file://custom_serial.json \
+            file://modbus.json \
+            file://modbus_serial.json \
+            file://mqtt.json \
+            file://opcua.json \
+            file://odbc.json \
+            file://request.json \
+            file://rest.json \
+            file://snmp.json \
+            file://tb_gateway.yaml \
+            file://logs.conf \
+            file://thingsboard-gateway.service \
+            "
+
+
+inherit systemd
+
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE:${PN} = "thingsboard-gateway.service"
+
+FILES:${PN} += "/etc \
+                /lib \
+                /usr \
+"
+
+do_install:append(){
+
+    install -d ${D}${sysconfdir}/thingsboard-gateway/config
+
+    for file in $(find ${WORKDIR} -maxdepth 1 -type f -name *.json); do
+        install -m 0644 "$file" ${D}${sysconfdir}/thingsboard-gateway/config
+    done
+
+    install -m 0644 ${WORKDIR}/tb_gateway.yaml ${D}${sysconfdir}/thingsboard-gateway/config
+    install -m 0644 ${WORKDIR}/logs.conf ${D}${sysconfdir}/thingsboard-gateway/config
+
+    install -d ${D}${systemd_unitdir}/system/
+    install -m 0644 ${WORKDIR}/thingsboard-gateway.service     ${D}${systemd_system_unitdir}/thingsboard-gateway.service
+}
diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0001-Cargo.toml-do-not-abort-on-panic.patch b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0001-Cargo.toml-do-not-abort-on-panic.patch
new file mode 100644
index 0000000..e09848f
--- /dev/null
+++ b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0001-Cargo.toml-do-not-abort-on-panic.patch
@@ -0,0 +1,29 @@
+From 9e37248870b2b955293754933c789ca00bca06ef Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex@linutronix.de>
+Date: Fri, 1 Oct 2021 13:00:24 +0200
+Subject: [PATCH] Cargo.toml: do not abort on panic
+
+OE's rust is configured to unwind, and this setting clashes with it/
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ Cargo.toml | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/Cargo.toml
++++ b/Cargo.toml
+@@ -51,13 +51,11 @@ opt-level = 1
+ rpath = false
+ lto = false
+ debug-assertions = true
+-panic = "abort"
+ 
+ [profile.release]
+ opt-level = 2
+ rpath = false
+ debug-assertions = false
+-panic = "abort"
+ 
+ # Optimize build dependencies, because bindgen and proc macros / style
+ # compilation take more to run than to build otherwise.
diff --git a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0001-Port-build-to-python3.patch b/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0001-Port-build-to-python3.patch
deleted file mode 100644
index 5cdad93..0000000
--- a/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0001-Port-build-to-python3.patch
+++ /dev/null
@@ -1,6897 +0,0 @@
-From 33a373ba41d978af60c2f0230bcba6ad27357ec8 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
-Date: Wed, 29 Jan 2020 16:25:11 +0100
-Subject: [PATCH] Port build to python3
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-* first tool of choice was 2to3
-* some parts were taken from [1] but during work it was found that this patch
-  introduces interesting effects - see hash functions. Working more on this
-  makes me guess that one has never worked...
-* Few parts were taken from upstream mirror [2]. Since they use six for porting
-  to python3 it adds us a new dependency.
-* To get a better overview what is going on or failing some additional messages
-  were added. The most verbose one is left disabled - see
-  python/mozbuild/mozbuild/configure/__init__.py / Line 310 onwards
-* major changes upstream on build are not to expect so upgrading should cause
-  little trouble and changes can be tracked by [3]
-* some solutions are workarounds/hacks so this patch will not be accepted
-  upstream. This should not be a problem for us: once mozjs >= 68 will arrive
-  we have to go to rust/cargo based build anyway.
-
-[1] https://code.foxkit.us/adelie/packages/blob/f2b5773da19ab397fbe64fd32dacc383cfe4cd77/user/mozjs/python3.patch
-[2] https://github.com/mozilla/gecko-dev
-[3] https://github.com/mozilla/gecko-dev/tree/esr60
-
-Upstream-Status: Inappropriate [Some Hacks]
-
-Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
----
- build/autoconf/config.status.m4               |   2 +-
- build/moz.configure/android-ndk.configure     |   4 +-
- build/moz.configure/checks.configure          |   4 +-
- build/moz.configure/init.configure            |  31 +-
- build/moz.configure/keyfiles.configure        |   4 +-
- build/moz.configure/old.configure             |  32 +-
- build/moz.configure/toolchain.configure       |  18 +-
- build/moz.configure/util.configure            |   9 +-
- build/moz.configure/windows.configure         |  10 +-
- build/templates.mozbuild                      |   2 +-
- config/MozZipFile.py                          |  12 +-
- config/expandlibs.py                          |   6 +-
- config/expandlibs_exec.py                     |  14 +-
- config/expandlibs_gen.py                      |   4 +-
- configure.py                                  |  42 +-
- js/src/build/moz.build                        |   8 +-
- js/src/builtin/embedjs.py                     |  10 +-
- js/src/configure                              |   2 +-
- js/src/frontend/GenerateReservedWords.py      |   6 +-
- js/src/gc/GenerateStatsPhases.py              |   4 +-
- js/src/old-configure.in                       |   2 +
- memory/build/moz.build                        |   8 +-
- mozglue/build/moz.build                       |  22 +-
- .../mozbuild/mozbuild/action/check_binary.py  |   2 +
- .../mozbuild/action/process_define_files.py   |   4 +-
- python/mozbuild/mozbuild/backend/base.py      |   8 +-
- python/mozbuild/mozbuild/backend/common.py    |   8 +-
- .../mozbuild/backend/configenvironment.py     |  14 +-
- .../mozbuild/mozbuild/backend/fastermake.py   |  10 +-
- .../mozbuild/backend/recursivemake.py         | 181 +++----
- python/mozbuild/mozbuild/config_status.py     |   7 +-
- .../mozbuild/mozbuild/configure/__init__.py   |  83 +++-
- .../mozbuild/configure/check_debug_ranges.py  |   6 +-
- python/mozbuild/mozbuild/configure/options.py |  24 +-
- python/mozbuild/mozbuild/configure/util.py    |  12 +-
- .../mozbuild/mozbuild/controller/building.py  |  16 +-
- python/mozbuild/mozbuild/frontend/context.py  |  89 ++--
- python/mozbuild/mozbuild/frontend/data.py     |   8 +-
- python/mozbuild/mozbuild/frontend/emitter.py  |  50 +-
- python/mozbuild/mozbuild/frontend/reader.py   |  49 +-
- python/mozbuild/mozbuild/frontend/sandbox.py  |   3 +-
- python/mozbuild/mozbuild/jar.py               |  12 +-
- python/mozbuild/mozbuild/makeutil.py          |  24 +-
- python/mozbuild/mozbuild/mozinfo.py           |   8 +-
- python/mozbuild/mozbuild/preprocessor.py      |  27 +-
- python/mozbuild/mozbuild/shellutil.py         |   6 +-
- .../test/backend/test_recursivemake.py        |  18 +-
- .../mozbuild/test/configure/common.py         |   8 +-
- .../mozbuild/mozbuild/test/configure/lint.py  |   8 +-
- .../test/configure/test_checks_configure.py   |   8 +-
- .../test/configure/test_compile_checks.py     |   4 +-
- .../mozbuild/test/configure/test_configure.py | 244 +++++-----
- .../mozbuild/test/configure/test_lint.py      |  24 +-
- .../test/configure/test_moz_configure.py      |  32 +-
- .../mozbuild/test/configure/test_options.py   | 450 +++++++++---------
- .../configure/test_toolchain_configure.py     |  22 +-
- .../test/configure/test_toolchain_helpers.py  |  62 +--
- .../configure/test_toolkit_moz_configure.py   |   2 +-
- .../mozbuild/test/configure/test_util.py      |   8 +-
- python/mozbuild/mozbuild/testing.py           |  10 +-
- python/mozbuild/mozbuild/util.py              |  79 ++-
- python/mozbuild/mozbuild/virtualenv.py        |   6 +-
- python/mozbuild/mozpack/chrome/manifest.py    |   6 +-
- python/mozbuild/mozpack/copier.py             |  12 +-
- python/mozbuild/mozpack/files.py              |  22 +-
- python/mozbuild/mozpack/manifests.py          |  16 +-
- python/mozbuild/mozpack/mozjar.py             |  37 +-
- .../manifestparser/manifestparser/ini.py      |  13 +-
- .../manifestparser/manifestparser.py          |  24 +-
- testing/mozbase/mozinfo/mozinfo/mozinfo.py    |  26 +-
- .../mozprocess/mozprocess/processhandler.py   |  10 +-
- third_party/python/which/which.py             |  18 +-
- 72 files changed, 1081 insertions(+), 993 deletions(-)
-
-diff --git a/build/autoconf/config.status.m4 b/build/autoconf/config.status.m4
-index c75575386..543c2d682 100644
---- a/build/autoconf/config.status.m4
-+++ b/build/autoconf/config.status.m4
-@@ -122,7 +122,7 @@ trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
- 
- dnl We're going to need [ ] for python syntax.
- changequote(<<<, >>>)dnl
--echo creating $CONFIG_STATUS
-+echo creating $CONFIG_STATUS in `pwd`
- 
- cat > $CONFIG_STATUS <<EOF
- 
-diff --git a/build/moz.configure/android-ndk.configure b/build/moz.configure/android-ndk.configure
-index 1067b8619..3b592a237 100644
---- a/build/moz.configure/android-ndk.configure
-+++ b/build/moz.configure/android-ndk.configure
-@@ -30,7 +30,7 @@ js_option('--with-android-version',
- 
- 
- @depends('--with-android-version', min_android_version, '--help')
--@imports(_from='__builtin__', _import='ValueError')
-+@imports(_from='builtins', _import='ValueError')
- def android_version(value, min_version, _):
-     if not value:
-         # Someone has passed --without-android-version.
-@@ -68,7 +68,7 @@ add_old_configure_assignment('android_ndk', ndk)
- 
- @depends(ndk)
- @checking('for android ndk version')
--@imports(_from='__builtin__', _import='open')
-+@imports(_from='builtins', _import='open')
- def ndk_version(ndk):
-     if not ndk:
-         # Building 'js/src' for non-Android.
-diff --git a/build/moz.configure/checks.configure b/build/moz.configure/checks.configure
-index 516652da9..11e1091c6 100644
---- a/build/moz.configure/checks.configure
-+++ b/build/moz.configure/checks.configure
-@@ -14,7 +14,7 @@
- 
- 
- @template
--@imports(_from='__builtin__', _import='Exception')
-+@imports(_from='builtins', _import='Exception')
- def _declare_exceptions():
-     class FatalCheckError(Exception):
-         '''An exception to throw from a function decorated with @checking.
-@@ -57,7 +57,7 @@ def checking(what, callback=None):
-                 try:
-                     ret = func(*args, **kwargs)
-                 except FatalCheckError as e:
--                    error = e.message
-+                    error = str(e)
-                 display_ret = callback(ret) if callback else ret
-                 if display_ret is True:
-                     log.info('yes')
-diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure
-index 648ac2ded..4d74547d8 100644
---- a/build/moz.configure/init.configure
-+++ b/build/moz.configure/init.configure
-@@ -14,7 +14,7 @@ option(env='DIST', nargs=1, help='DIST directory')
- 
- 
- @depends('--help', 'DIST')
--@imports(_from='__builtin__', _import='open')
-+@imports(_from='builtins', _import='open')
- @imports(_from='os.path', _import='exists')
- def check_build_environment(help, dist):
-     topobjdir = os.path.realpath(os.path.abspath('.'))
-@@ -65,7 +65,7 @@ def check_build_environment(help, dist):
-     # Check for CRLF line endings.
-     with open(os.path.join(topsrcdir, 'configure.py'), 'rb') as fh:
-         data = fh.read()
--        if '\r' in data:
-+        if b'\r' in data:
-             die('\n ***\n'
-                 ' * The source tree appears to have Windows-style line endings.\n'
-                 ' *\n'
-@@ -269,7 +269,7 @@ def early_options():
-     def early_options():
-         return set(
-             option.env
--            for option in __sandbox__._options.itervalues()
-+            for option in __sandbox__._options.values()
-             if option.env
-         )
-     return early_options
-@@ -307,15 +307,15 @@ def mozconfig_options(mozconfig, automation, help):
-                 log.info('  %s' % arg)
-                 helper.add(arg, origin='mozconfig', args=helper._args)
- 
--        for key, value in mozconfig['env']['added'].iteritems():
-+        for key, value in mozconfig['env']['added'].items():
-             add(key, value)
-             os.environ[key] = value
--        for key, (_, value) in mozconfig['env']['modified'].iteritems():
-+        for key, (_, value) in mozconfig['env']['modified'].items():
-             add(key, value)
-             os.environ[key] = value
--        for key, value in mozconfig['vars']['added'].iteritems():
-+        for key, value in mozconfig['vars']['added'].items():
-             add(key, value)
--        for key, (_, value) in mozconfig['vars']['modified'].iteritems():
-+        for key, (_, value) in mozconfig['vars']['modified'].items():
-             add(key, value)
- 
- 
-@@ -353,7 +353,7 @@ option(env='PYTHON3', nargs=1, help='Python 3 interpreter (3.5 or later)')
- @depends('PYTHON3')
- @checking('for Python 3',
-           callback=lambda x: '%s (%s)' % (x.path, x.str_version) if x else 'no')
--@imports(_from='__builtin__', _import='Exception')
-+@imports(_from='builtins', _import='Exception')
- @imports(_from='mozbuild.pythonutil', _import='find_python3_executable')
- @imports(_from='mozbuild.pythonutil', _import='python_executable_version')
- def python3(env_python):
-@@ -377,9 +377,6 @@ def python3(env_python):
-         if not python:
-             return None
- 
--        # The API returns a bytes whereas everything in configure is unicode.
--        python = python.decode('utf-8')
--
-     return namespace(
-         path=python,
-         version=version,
-@@ -481,6 +478,8 @@ def hg_config(build_env, hg, version):
- @imports('re')
- def git_version(git):
-     out = check_cmd_output(git, '--version').rstrip()
-+    if isinstance(out, bytes):
-+        out = out.decode('utf-8')
- 
-     match = re.search('git version (.*)$', out)
- 
-@@ -551,8 +550,8 @@ option('--target', nargs=1,
- @imports(_from='mozbuild.configure.constants', _import='Endianness')
- @imports(_from='mozbuild.configure.constants', _import='Kernel')
- @imports(_from='mozbuild.configure.constants', _import='OS')
--@imports(_from='__builtin__', _import='KeyError')
--@imports(_from='__builtin__', _import='ValueError')
-+@imports(_from='builtins', _import='KeyError')
-+@imports(_from='builtins', _import='ValueError')
- def split_triplet(triplet, allow_unknown=False):
-     # The standard triplet is defined as
-     #   CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-@@ -562,6 +561,8 @@ def split_triplet(triplet, allow_unknown=False):
-     # Additionally, some may omit "unknown" when the manufacturer
-     # is not specified and emit
-     #   CPU_TYPE-OPERATING_SYSTEM
-+    if isinstance(triplet, bytes):
-+        triplet = triplet.decode('utf-8')
-     parts = triplet.split('-', 2)
-     if len(parts) == 3:
-         cpu, _, os = parts
-@@ -987,7 +988,7 @@ add_old_configure_assignment('MOZ_BUILD_APP', build_project)
- # - otherwise, if we have "a" in GRE_MILESTONE, we're building Nightly or Aurora
- # - otherwise, we're building Release/Beta (define RELEASE_OR_BETA)
- @depends(check_build_environment, '--help')
--@imports(_from='__builtin__', _import='open')
-+@imports(_from='builtins', _import='open')
- @imports('re')
- def milestone(build_env, _):
-     milestone_path = os.path.join(build_env.topsrcdir,
-@@ -1105,7 +1106,7 @@ def enabled_in_nightly(milestone, _):
- def all_configure_options():
-     result = []
-     previous = None
--    for option in __sandbox__._options.itervalues():
-+    for option in __sandbox__._options.values():
-         # __sandbox__._options contains items for both option.name and
-         # option.env. But it's also an OrderedDict, meaning both are
-         # consecutive.
-diff --git a/build/moz.configure/keyfiles.configure b/build/moz.configure/keyfiles.configure
-index 5d51cccea..14a35a3c6 100644
---- a/build/moz.configure/keyfiles.configure
-+++ b/build/moz.configure/keyfiles.configure
-@@ -16,8 +16,8 @@ def keyfile(desc, default=None, help=None, callback=lambda x: x):
- 
-     @depends('--with-%s-keyfile' % name)
-     @checking('for the %s key' % desc, lambda x: x and x is not no_key)
--    @imports(_from='__builtin__', _import='open')
--    @imports(_from='__builtin__', _import='IOError')
-+    @imports(_from='builtins', _import='open')
-+    @imports(_from='builtins', _import='IOError')
-     def keyfile(value):
-         if value:
-             try:
-diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure
-index 81c10b91f..29b496bae 100644
---- a/build/moz.configure/old.configure
-+++ b/build/moz.configure/old.configure
-@@ -64,9 +64,9 @@ set_config('AUTOCONF', autoconf)
- 
- @depends('OLD_CONFIGURE', mozconfig, autoconf, check_build_environment, shell,
-          old_configure_assignments, build_project)
--@imports(_from='__builtin__', _import='open')
--@imports(_from='__builtin__', _import='print')
--@imports(_from='__builtin__', _import='sorted')
-+@imports(_from='builtins', _import='open')
-+@imports(_from='builtins', _import='print')
-+@imports(_from='builtins', _import='sorted')
- @imports('glob')
- @imports('itertools')
- @imports('subprocess')
-@@ -113,7 +113,7 @@ def prepare_configure(old_configure, mozconfig, autoconf, build_env, shell,
- 
-         # Make old-configure append to config.log, where we put our own log.
-         # This could be done with a m4 macro, but it's way easier this way
--        script = script.replace('>./config.log', '>>./config.log')
-+        script = script.replace(b'>./config.log', b'>>./config.log')
- 
-         with open(old_configure, 'wb') as fh:
-             fh.write(script)
-@@ -282,8 +282,8 @@ def old_configure_options(*options):
-     '--x-includes',
-     '--x-libraries',
- )
--@imports(_from='__builtin__', _import='compile')
--@imports(_from='__builtin__', _import='open')
-+@imports(_from='builtins', _import='compile')
-+@imports(_from='builtins', _import='open')
- @imports('logging')
- @imports('os')
- @imports('subprocess')
-@@ -326,7 +326,7 @@ def old_configure(prepare_configure, extra_old_configure_args, all_options,
-     log.debug('Running %s', quote(*cmd))
-     if extra_env:
-         log.debug('with extra environment: %s',
--                  ' '.join('%s=%s' % pair for pair in extra_env.iteritems()))
-+                  ' '.join('%s=%s' % pair for pair in extra_env.items()))
- 
-     # Our logging goes to config.log, the same file old.configure uses.
-     # We can't share the handle on the file, so close it. We assume nothing
-@@ -359,7 +359,7 @@ def old_configure(prepare_configure, extra_old_configure_args, all_options,
-         # Every variation of the exec() function I tried led to:
-         # SyntaxError: unqualified exec is not allowed in function 'main' it
-         # contains a nested function with free variables
--        exec code in raw_config # noqa
-+        exec(code, raw_config) # noqa
- 
-     # Ensure all the flags known to old-configure appear in the
-     # @old_configure_options above.
-@@ -393,16 +393,24 @@ def set_old_configure_define(name, value):
- @depends(old_configure)
- @imports('types')
- def post_old_configure(raw_config):
-+    log.info('post_old_configure started')
-+
-     for k, v in raw_config['substs']:
-         set_old_configure_config(
--            k[1:-1], v[1:-1] if isinstance(v, types.StringTypes) else v)
-+            k[1:-1], v[1:-1] if isinstance(v, str) else v)
-+
-+    log.info('post_old_configure 1 finished')
- 
--    for k, v in dict(raw_config['defines']).iteritems():
-+    for k, v in dict(raw_config['defines']).items():
-         set_old_configure_define(k[1:-1], v[1:-1])
- 
-+    log.info('post_old_configure 2 finished')
-+
-     set_old_configure_config('non_global_defines',
-                              raw_config['non_global_defines'])
- 
-+    log.info('post_old_configure 3 finished')
-+
- 
- # Assuming no other option is declared after this function, handle the
- # env options that were injected by mozconfig_options by creating dummy
-@@ -414,6 +422,7 @@ def post_old_configure(raw_config):
- @imports('__sandbox__')
- @imports(_from='mozbuild.configure.options', _import='Option')
- def remaining_mozconfig_options(_):
-+    log.info('remaining_mozconfig_options started')
-     helper = __sandbox__._helper
-     for arg in helper:
-         if helper._origins[arg] != 'mozconfig':
-@@ -422,5 +431,6 @@ def remaining_mozconfig_options(_):
-         if name.isupper() and name not in __sandbox__._options:
-             option = Option(env=name, nargs='*', help=name)
-             helper.handle(option)
-+    log.info('remaining_mozconfig_options finished')
- 
- # Please do not add anything after remaining_mozconfig_options()
-diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure
-index fc640c75e..c5508dfb7 100755
---- a/build/moz.configure/toolchain.configure
-+++ b/build/moz.configure/toolchain.configure
-@@ -391,7 +391,7 @@ def get_compiler_info(compiler, language):
-         ('CPU', CPU_preprocessor_checks),
-         ('KERNEL', kernel_preprocessor_checks),
-     ):
--        for n, (value, condition) in enumerate(preprocessor_checks.iteritems()):
-+        for n, (value, condition) in enumerate(preprocessor_checks.items()):
-             check += dedent('''\
-                 #%(if)s %(condition)s
-                 %%%(name)s "%(value)s"
-@@ -425,9 +425,9 @@ def get_compiler_info(compiler, language):
-     data = {}
-     for line in result.splitlines():
-         if line.startswith(b'%'):
--            k, _, v = line.partition(' ')
--            k = k.lstrip('%')
--            data[k] = v.replace(' ', '').lstrip('"').rstrip('"')
-+            k, _, v = line.partition(b' ')
-+            k = k.lstrip(b'%').decode('utf-8')
-+            data[k] = v.replace(b' ', b'').lstrip(b'"').rstrip(b'"').decode('utf-8')
-             log.debug('%s = %s', k, data[k])
- 
-     try:
-@@ -551,7 +551,7 @@ def check_compiler(compiler, language, target):
-     )
- 
- 
--@imports(_from='__builtin__', _import='open')
-+@imports(_from='builtins', _import='open')
- @imports('json')
- @imports('subprocess')
- @imports('sys')
-@@ -606,7 +606,7 @@ def vs_major_version(value):
- 
- 
- @depends(host, target, vs_major_version, check_build_environment, '--with-visual-studio-version')
--@imports(_from='__builtin__', _import='sorted')
-+@imports(_from='builtins', _import='sorted')
- @imports(_from='operator', _import='itemgetter')
- @imports('platform')
- def vc_compiler_path(host, target, vs_major_version, env, vs_release_name):
-@@ -807,7 +807,7 @@ def compiler(language, host_or_target, c_compiler=None, other_compiler=None,
-                     target.os != 'Android':
-                 return namespace(**{
-                     k: [] if k == 'flags' else v
--                    for k, v in other_compiler.__dict__.iteritems()
-+                    for k, v in other_compiler.__dict__.items()
-                 })
- 
-     # Normally, we'd use `var` instead of `_var`, but the interaction with
-@@ -1238,7 +1238,7 @@ set_config('VISIBILITY_FLAGS', visibility_flags)
- 
- @depends(c_compiler)
- @imports('multiprocessing')
--@imports(_from='__builtin__', _import='min')
-+@imports(_from='builtins', _import='min')
- def pgo_flags(compiler):
-     if compiler.type in ('gcc', 'clang'):
-         return namespace(
-@@ -1517,6 +1517,8 @@ def enable_gnu_linker(enable_gold_option, c_compiler, developer_options, build_e
-         gold = check_cmd_output(*detection_cmd).strip()
-         if not gold:
-             return
-+        if isinstance(gold, bytes):
-+            gold = gold.decode('utf-8')
- 
-         goldFullPath = find_program(gold)
-         if goldFullPath is None:
-diff --git a/build/moz.configure/util.configure b/build/moz.configure/util.configure
-index 3284fd8b5..218813e2d 100644
---- a/build/moz.configure/util.configure
-+++ b/build/moz.configure/util.configure
-@@ -25,7 +25,6 @@ def configure_error(message):
- # does not.
- 
- 
--@imports(_from='__builtin__', _import='unicode')
- @imports('subprocess')
- @imports('sys')
- @imports(_from='mozbuild.configure.util', _import='LineIO')
-@@ -39,10 +38,10 @@ def check_cmd_output(*args, **kwargs):
-     if 'env' in kwargs:
-         normalized_env = {}
-         for k, v in kwargs['env'].items():
--            if isinstance(k, unicode):
-+            if isinstance(k, str):
-                 k = k.encode('utf-8', 'strict')
- 
--            if isinstance(v, unicode):
-+            if isinstance(v, str):
-                 v = v.encode('utf-8', 'strict')
- 
-             normalized_env[k] = v
-@@ -285,7 +284,7 @@ def unique_list(l):
- #     ('19.0', 'x64', r'C:\...\amd64\cl.exe')
- #     ('19.0', 'x86', r'C:\...\amd64_x86\cl.exe')
- @imports(_import='_winreg', _as='winreg')
--@imports(_from='__builtin__', _import='WindowsError')
-+@imports(_from='builtins', _import='WindowsError')
- @imports(_from='fnmatch', _import='fnmatch')
- def get_registry_values(pattern, get_32_and_64_bit=False):
-     def enum_helper(func, key):
-@@ -360,6 +359,8 @@ def get_registry_values(pattern, get_32_and_64_bit=False):
- @imports(_from='mozbuild.configure.util', _import='Version', _as='_Version')
- def Version(v):
-     'A version number that can be compared usefully.'
-+    if isinstance(v, bytes):
-+        v = v.decode('utf-8')
-     return _Version(v)
- 
- # Denotes a deprecated option. Combines option() and @depends:
-diff --git a/build/moz.configure/windows.configure b/build/moz.configure/windows.configure
-index a5b790e3b..2b88fc447 100644
---- a/build/moz.configure/windows.configure
-+++ b/build/moz.configure/windows.configure
-@@ -10,7 +10,7 @@ option('--with-windows-version', nargs=1, default='603',
- 
- 
- @depends('--with-windows-version')
--@imports(_from='__builtin__', _import='ValueError')
-+@imports(_from='builtins', _import='ValueError')
- def valid_windows_version(value):
-     if not value:
-         die('Cannot build with --without-windows-version')
-@@ -50,8 +50,8 @@ def windows_sdk_dir(value, host):
- 
- @imports('os')
- @imports('re')
--@imports(_from='__builtin__', _import='sorted')
--@imports(_from='__builtin__', _import='WindowsError')
-+@imports(_from='builtins', _import='sorted')
-+@imports(_from='builtins', _import='WindowsError')
- def get_sdk_dirs(sdk, subdir):
-     def get_dirs_containing(sdk, stem, subdir):
-         base = os.path.join(sdk, stem)
-@@ -96,7 +96,7 @@ def valid_windows_sdk_dir_result(value):
- 
- @depends(c_compiler, windows_sdk_dir, valid_windows_version, 'WINDOWSSDKDIR')
- @checking('for Windows SDK', valid_windows_sdk_dir_result)
--@imports(_from='__builtin__', _import='sorted')
-+@imports(_from='builtins', _import='sorted')
- @imports(_from='textwrap', _import='dedent')
- def valid_windows_sdk_dir(compiler, windows_sdk_dir, target_version,
-                           windows_sdk_dir_env):
-@@ -174,7 +174,7 @@ def valid_ucrt_sdk_dir_result(value):
- @depends(windows_sdk_dir, 'WINDOWSSDKDIR', c_compiler)
- @checking('for Universal CRT SDK', valid_ucrt_sdk_dir_result)
- @imports('os')
--@imports(_from='__builtin__', _import='sorted')
-+@imports(_from='builtins', _import='sorted')
- @imports(_import='mozpack.path', _as='mozpath')
- def valid_ucrt_sdk_dir(windows_sdk_dir, windows_sdk_dir_env, c_compiler):
-     if windows_sdk_dir_env:
-diff --git a/build/templates.mozbuild b/build/templates.mozbuild
-index 3da850ce5..ae5e410fe 100644
---- a/build/templates.mozbuild
-+++ b/build/templates.mozbuild
-@@ -10,7 +10,7 @@ def Binary():
-     templates.'''
- 
-     # Add -llog by default, since we use it all over the place.
--    if CONFIG['OS_TARGET'] == 'Android':
-+    if str(CONFIG['OS_TARGET']) == 'Android':
-         OS_LIBS += ['log']
- 
- 
-diff --git a/config/MozZipFile.py b/config/MozZipFile.py
-index 337fe0521..dc7add4c3 100644
---- a/config/MozZipFile.py
-+++ b/config/MozZipFile.py
-@@ -18,7 +18,7 @@ class ZipFile(zipfile.ZipFile):
-   def __init__(self, file, mode="r", compression=zipfile.ZIP_STORED,
-                lock = False):
-     if lock:
--      assert isinstance(file, basestring)
-+      assert isinstance(file, str)
-       self.lockfile = lock_file(file + '.lck')
-     else:
-       self.lockfile = None
-@@ -46,7 +46,7 @@ class ZipFile(zipfile.ZipFile):
-                               date_time=time.localtime(time.time()))
-       zinfo.compress_type = self.compression
-       # Add some standard UNIX file access permissions (-rw-r--r--).
--      zinfo.external_attr = (0x81a4 & 0xFFFF) << 16L
-+      zinfo.external_attr = (0x81a4 & 0xFFFF) << 16
-     else:
-       zinfo = zinfo_or_arcname
- 
-@@ -58,7 +58,7 @@ class ZipFile(zipfile.ZipFile):
-     # as the old, reuse the existing entry.
- 
-     doSeek = False # store if we need to seek to the eof after overwriting
--    if self.NameToInfo.has_key(zinfo.filename):
-+    if zinfo.filename in self.NameToInfo:
-       # Find the last ZipInfo with our name.
-       # Last, because that's catching multiple overwrites
-       i = len(self.filelist)
-@@ -109,14 +109,14 @@ class ZipFile(zipfile.ZipFile):
-       # adjust file mode if we originally just wrote, now we rewrite
-       self.fp.close()
-       self.fp = open(self.filename, 'r+b')
--    all = map(lambda zi: (zi, True), self.filelist) + \
--        map(lambda zi: (zi, False), self._remove)
-+    all = [(zi, True) for zi in self.filelist] + \
-+        [(zi, False) for zi in self._remove]
-     all.sort(lambda l, r: cmp(l[0].header_offset, r[0].header_offset))
-     # empty _remove for multiple closes
-     self._remove = []
- 
-     lengths = [all[i+1][0].header_offset - all[i][0].header_offset
--               for i in xrange(len(all)-1)]
-+               for i in range(len(all)-1)]
-     lengths.append(self.end - all[-1][0].header_offset)
-     to_pos = 0
-     for (zi, keep), length in zip(all, lengths):
-diff --git a/config/expandlibs.py b/config/expandlibs.py
-index ac06c432f..df1fed15d 100644
---- a/config/expandlibs.py
-+++ b/config/expandlibs.py
-@@ -26,7 +26,7 @@ ${LIB_PREFIX}${ROOT}.${LIB_SUFFIX} following these rules:
-   descriptor contains. And for each of these LIBS, also apply the same
-   rules.
- '''
--from __future__ import with_statement
-+
- import sys, os, errno
- import expandlibs_config as conf
- 
-@@ -36,7 +36,7 @@ def ensureParentDir(file):
-     if dir and not os.path.exists(dir):
-         try:
-             os.makedirs(dir)
--        except OSError, error:
-+        except OSError as error:
-             if error.errno != errno.EEXIST:
-                 raise
- 
-@@ -140,4 +140,4 @@ class ExpandArgs(list):
-         return [relativize(arg)]
- 
- if __name__ == '__main__':
--    print " ".join(ExpandArgs(sys.argv[1:]))
-+    print(" ".join(ExpandArgs(sys.argv[1:])))
-diff --git a/config/expandlibs_exec.py b/config/expandlibs_exec.py
-index df656016c..fb786a6a8 100644
---- a/config/expandlibs_exec.py
-+++ b/config/expandlibs_exec.py
-@@ -20,7 +20,7 @@ With the --symbol-order argument, followed by a file name, it will add the
- relevant linker options to change the order in which the linker puts the
- symbols appear in the resulting binary. Only works for ELF targets.
- '''
--from __future__ import with_statement
-+
- import sys
- import os
- from expandlibs import (
-@@ -304,11 +304,11 @@ class SectionFinder(object):
-         return syms
- 
- def print_command(out, args):
--    print >>out, "Executing: " + " ".join(args)
-+    print("Executing: " + " ".join(args), file=out)
-     for tmp in [f for f in args.tmp if os.path.isfile(f)]:
--        print >>out, tmp + ":"
-+        print(tmp + ":", file=out)
-         with open(tmp) as file:
--            print >>out, "".join(["    " + l for l in file.readlines()])
-+            print("".join(["    " + l for l in file.readlines()]), file=out)
-     out.flush()
- 
- def main(args, proc_callback=None):
-@@ -338,13 +338,13 @@ def main(args, proc_callback=None):
-             proc = subprocess.Popen(args, stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
-             if proc_callback:
-                 proc_callback(proc)
--        except Exception, e:
--            print >>sys.stderr, 'error: Launching', args, ':', e
-+        except Exception as e:
-+            print('error: Launching', args, ':', e, file=sys.stderr)
-             raise e
-         (stdout, stderr) = proc.communicate()
-         if proc.returncode and not options.verbose:
-             print_command(sys.stderr, args)
--        sys.stderr.write(stdout)
-+        sys.stderr.write(stdout.decode("utf-8"))
-         sys.stderr.flush()
-         if proc.returncode:
-             return proc.returncode
-diff --git a/config/expandlibs_gen.py b/config/expandlibs_gen.py
-index b1de63cd0..dc62bd184 100644
---- a/config/expandlibs_gen.py
-+++ b/config/expandlibs_gen.py
-@@ -5,7 +5,7 @@
- '''Given a list of object files and library names, prints a library
- descriptor to standard output'''
- 
--from __future__ import with_statement
-+
- import sys
- import os
- import expandlibs_config as conf
-@@ -38,4 +38,4 @@ if __name__ == '__main__':
- 
-     ensureParentDir(options.output)
-     with open(options.output, 'w') as outfile:
--        print >>outfile, generate(args)
-+        print(generate(args), file=outfile)
-diff --git a/configure.py b/configure.py
-index 771e34e38..bee329d7c 100644
---- a/configure.py
-+++ b/configure.py
-@@ -2,10 +2,11 @@
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
- 
--from __future__ import print_function, unicode_literals
-+
- 
- import codecs
- import itertools
-+import logging
- import os
- import sys
- import textwrap
-@@ -34,7 +35,9 @@ from mozbuild.util import (
- def main(argv):
-     config = {}
-     sandbox = ConfigureSandbox(config, os.environ, argv)
-+    print('sandbox.run started')
-     sandbox.run(os.path.join(os.path.dirname(__file__), 'moz.configure'))
-+    print('sandbox.run finished')
- 
-     if sandbox._help:
-         return 0
-@@ -56,12 +59,21 @@ def config_status(config):
- 
-     sanitized_config = {}
-     sanitized_config['substs'] = {
--        k: sanitized_bools(v) for k, v in config.iteritems()
-+        k: sanitized_bools(v) for k, v in config.items()
-         if k not in ('DEFINES', 'non_global_defines', 'TOPSRCDIR', 'TOPOBJDIR',
-                      'ALL_CONFIGURE_PATHS')
-     }
-+
-+    # Hack around OptionValue entries unknown during compile
-+    for opt in ('BUILD_BACKENDS', 'MOZ_UI_LOCALE', 'RUSTFLAGS' ):
-+        old = sanitized_config['substs'][opt]
-+        new = []
-+        for setting in old:
-+            new.append(setting)
-+        sanitized_config['substs'][opt] = new
-+
-     sanitized_config['defines'] = {
--        k: sanitized_bools(v) for k, v in config['DEFINES'].iteritems()
-+        k: sanitized_bools(v) for k, v in config['DEFINES'].items()
-     }
-     sanitized_config['non_global_defines'] = config['non_global_defines']
-     sanitized_config['topsrcdir'] = config['TOPSRCDIR']
-@@ -71,20 +83,17 @@ def config_status(config):
-     # Create config.status. Eventually, we'll want to just do the work it does
-     # here, when we're able to skip configure tests/use cached results/not rely
-     # on autoconf.
--    print("Creating config.status", file=sys.stderr)
--    encoding = 'mbcs' if sys.platform == 'win32' else 'utf-8'
--    with codecs.open('config.status', 'w', encoding) as fh:
-+    logging.getLogger('moz.configure').info('Creating config.status')
-+    with codecs.open('config.status', 'w', 'utf-8') as fh:
-         fh.write(textwrap.dedent('''\
-             #!%(python)s
--            # coding=%(encoding)s
--            from __future__ import unicode_literals
--            from mozbuild.util import encode
--            encoding = '%(encoding)s'
--        ''') % {'python': config['PYTHON'], 'encoding': encoding})
-+            # coding=utf-8
-+            print("config.status started")
-+        ''') % {'python': config['PYTHON']})
-         # A lot of the build backend code is currently expecting byte
-         # strings and breaks in subtle ways with unicode strings. (bug 1296508)
--        for k, v in sanitized_config.iteritems():
--            fh.write('%s = encode(%s, encoding)\n' % (k, indented_repr(v)))
-+        for k, v in sanitized_config.items():
-+            fh.write('%s = %s\n' % (k, indented_repr(v)))
-         fh.write("__all__ = ['topobjdir', 'topsrcdir', 'defines', "
-                  "'non_global_defines', 'substs', 'mozconfig']")
- 
-@@ -97,6 +106,9 @@ def config_status(config):
-                     args = dict([(name, globals()[name]) for name in __all__])
-                     config_status(**args)
-             '''))
-+        fh.write(textwrap.dedent('''
-+            print("config.status finished")
-+        '''))
- 
-     partial_config = PartialConfigEnvironment(config['TOPOBJDIR'])
-     partial_config.write_vars(sanitized_config)
-@@ -116,7 +128,7 @@ def config_status(config):
-     # executable permissions.
-     os.chmod('config.status', 0o755)
-     if config.get('MOZ_BUILD_APP') != 'js' or config.get('JS_STANDALONE'):
--        os.environ[b'WRITE_MOZINFO'] = b'1'
-+        os.environ['WRITE_MOZINFO'] = '1'
-         from mozbuild.config_status import config_status
- 
-         # Some values in sanitized_config also have more complex types, such as
-@@ -127,7 +139,7 @@ def config_status(config):
- 
-         # A lot of the build backend code is currently expecting byte strings
-         # and breaks in subtle ways with unicode strings.
--        return config_status(args=[], **encode(sanitized_config, encoding))
-+        return config_status(args=[], **sanitized_config)
-     return 0
- 
- 
-diff --git a/js/src/build/moz.build b/js/src/build/moz.build
-index a7f5fa4ce..856cae32d 100644
---- a/js/src/build/moz.build
-+++ b/js/src/build/moz.build
-@@ -47,22 +47,22 @@ USE_LIBS += [
-     'zlib',
- ]
- 
--if CONFIG['OS_ARCH'] not in ('WINNT', 'HP-UX'):
-+if str(CONFIG['OS_ARCH']) not in ('WINNT', 'HP-UX'):
-     OS_LIBS += [
-         'm',
-     ]
- 
--if CONFIG['OS_ARCH'] == 'FreeBSD':
-+if str(CONFIG['OS_ARCH']) == 'FreeBSD':
-     OS_LIBS += [
-         '-pthread',
-     ]
- 
--if CONFIG['OS_ARCH'] == 'Linux':
-+if str(CONFIG['OS_ARCH']) == 'Linux':
-     OS_LIBS += [
-         'dl',
-     ]
- 
--if CONFIG['OS_ARCH'] == 'SunOS':
-+if str(CONFIG['OS_ARCH']) == 'SunOS':
-     OS_LIBS += [
-         'posix4',
-         'dl',
-diff --git a/js/src/builtin/embedjs.py b/js/src/builtin/embedjs.py
-index ba25e71c1..d4f2de122 100644
---- a/js/src/builtin/embedjs.py
-+++ b/js/src/builtin/embedjs.py
-@@ -36,7 +36,7 @@
- #
- # It uses the C preprocessor to process its inputs.
- 
--from __future__ import with_statement
-+
- import re, sys, os, subprocess
- import shlex
- import which
-@@ -52,8 +52,8 @@ def ToCAsciiArray(lines):
- 
- def ToCArray(lines):
-   result = []
--  for chr in lines:
--    result.append(str(ord(chr)))
-+  for char in lines:
-+    result.append("0x%0.2X" % char)
-   return ", ".join(result)
- 
- HEADER_TEMPLATE = """\
-@@ -87,7 +87,7 @@ def embed(cxx, preprocessorOption, cppflags, msgs, sources, c_out, js_out, names
- 
-   js_out.write(processed)
-   import zlib
--  compressed = zlib.compress(processed)
-+  compressed = zlib.compress(processed.encode('utf-8'))
-   data = ToCArray(compressed)
-   c_out.write(HEADER_TEMPLATE % {
-     'sources_type': 'unsigned char',
-@@ -107,7 +107,7 @@ def preprocess(cxx, preprocessorOption, source, args = []):
-   tmpOut = 'self-hosting-preprocessed.pp';
-   outputArg = shlex.split(preprocessorOption + tmpOut)
- 
--  with open(tmpIn, 'wb') as input:
-+  with open(tmpIn, 'w') as input:
-     input.write(source)
-   print(' '.join(cxx + outputArg + args + [tmpIn]))
-   result = subprocess.Popen(cxx + outputArg + args + [tmpIn]).wait()
-diff --git a/js/src/configure b/js/src/configure
-index 3b3a39af3..8f5ea41d0 100755
---- a/js/src/configure
-+++ b/js/src/configure
-@@ -24,4 +24,4 @@ export OLD_CONFIGURE="$SRCDIR"/old-configure
- 
- set -- "$@" --enable-project=js
- 
--which python2.7 > /dev/null && exec python2.7 "$TOPSRCDIR/configure.py" "$@" || exec python "$TOPSRCDIR/configure.py" "$@"
-+which python3 > /dev/null && exec python3 "$TOPSRCDIR/configure.py" "$@" || exec python "$TOPSRCDIR/configure.py" "$@"
-diff --git a/js/src/frontend/GenerateReservedWords.py b/js/src/frontend/GenerateReservedWords.py
-index 3aa2307b9..381c8e2b4 100644
---- a/js/src/frontend/GenerateReservedWords.py
-+++ b/js/src/frontend/GenerateReservedWords.py
-@@ -80,14 +80,14 @@ def split_list_per_column(reserved_word_list, column):
-         per_column = column_dict.setdefault(word[column], [])
-         per_column.append(item)
- 
--    return sorted(column_dict.items(), key=lambda (char, word): ord(char))
-+    return sorted(list(column_dict.items()), key=lambda char_word: ord(char_word[0]))
- 
- def generate_letter_switch(opt, unprocessed_columns, reserved_word_list,
-                            columns=None):
-     assert(len(reserved_word_list) != 0);
- 
-     if not columns:
--        columns = range(0, unprocessed_columns)
-+        columns = list(range(0, unprocessed_columns))
- 
-     if len(reserved_word_list) == 1:
-         index, word = reserved_word_list[0]
-@@ -161,7 +161,7 @@ def split_list_per_length(reserved_word_list):
-         per_length = length_dict.setdefault(len(word), [])
-         per_length.append(item)
- 
--    return sorted(length_dict.items(), key=lambda (length, word): length)
-+    return sorted(list(length_dict.items()), key=lambda length_word: length_word[0])
- 
- def generate_switch(opt, reserved_word_list):
-     assert(len(reserved_word_list) != 0);
-diff --git a/js/src/gc/GenerateStatsPhases.py b/js/src/gc/GenerateStatsPhases.py
-index 2daf83555..e39a26a4b 100644
---- a/js/src/gc/GenerateStatsPhases.py
-+++ b/js/src/gc/GenerateStatsPhases.py
-@@ -267,7 +267,7 @@ def generateHeader(out):
-     #
-     # Generate PhaseKind enum.
-     #
--    phaseKindNames = map(lambda phaseKind: phaseKind.name, AllPhaseKinds)
-+    phaseKindNames = [phaseKind.name for phaseKind in AllPhaseKinds]
-     extraPhaseKinds = [
-         "NONE = LIMIT",
-         "EXPLICIT_SUSPENSION = LIMIT",
-@@ -279,7 +279,7 @@ def generateHeader(out):
-     #
-     # Generate Phase enum.
-     #
--    phaseNames = map(lambda phase: phase.name, AllPhases)
-+    phaseNames = [phase.name for phase in AllPhases]
-     extraPhases = [
-         "NONE = LIMIT",
-         "EXPLICIT_SUSPENSION = LIMIT",
-diff --git a/js/src/old-configure.in b/js/src/old-configure.in
-index 11c3d5a2e..389265404 100644
---- a/js/src/old-configure.in
-+++ b/js/src/old-configure.in
-@@ -1884,3 +1884,5 @@ if test "$JS_STANDALONE"; then
- fi
- 
- rm -fr confdefs* $ac_clean_files
-+echo confdefs* $ac_clean_files removed
-+echo "old-configure done"
-diff --git a/memory/build/moz.build b/memory/build/moz.build
-index e2c715271..f09ce7935 100644
---- a/memory/build/moz.build
-+++ b/memory/build/moz.build
-@@ -30,7 +30,7 @@ else:
-         'fallback.cpp',
-     ]
- 
--if CONFIG['OS_TARGET'] == 'Darwin' and (CONFIG['MOZ_REPLACE_MALLOC'] or
-+if str(CONFIG['OS_TARGET']) == 'Darwin' and (CONFIG['MOZ_REPLACE_MALLOC'] or
-         CONFIG['MOZ_MEMORY']):
-     SOURCES += [
-         'zone.c',
-@@ -38,15 +38,15 @@ if CONFIG['OS_TARGET'] == 'Darwin' and (CONFIG['MOZ_REPLACE_MALLOC'] or
- 
- Library('memory')
- 
--if CONFIG['OS_TARGET'] == 'Android' and CONFIG['CC_TYPE'] == 'clang':
-+if str(CONFIG['OS_TARGET']) == 'Android' and str(CONFIG['CC_TYPE']) == 'clang':
-     CXXFLAGS += [
-         '-Wno-tautological-pointer-compare',
-     ]
- 
--if CONFIG['MOZ_BUILD_APP'] != 'memory':
-+if str(CONFIG['MOZ_BUILD_APP']) != 'memory':
-     FINAL_LIBRARY = 'mozglue'
- 
--if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
-+if str(CONFIG['CC_TYPE']) in ('msvc', 'clang-cl'):
-     CXXFLAGS += ['-wd4273'] # inconsistent dll linkage (bug 558163)
- 
- if CONFIG['MOZ_REPLACE_MALLOC_STATIC']:
-diff --git a/mozglue/build/moz.build b/mozglue/build/moz.build
-index 53758485a..5e9308802 100644
---- a/mozglue/build/moz.build
-+++ b/mozglue/build/moz.build
-@@ -9,12 +9,12 @@
- # If this is ever changed, update MOZ_SHARED_MOZGLUE in browser/installer/Makefile.in
- if CONFIG['JS_STANDALONE'] and not CONFIG['MOZ_MEMORY']:
-     Library('mozglue')
--elif CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android'):
-+elif str(CONFIG['OS_TARGET']) in ('WINNT', 'Darwin', 'Android'):
-     SharedLibrary('mozglue')
- else:
-     Library('mozglue')
- 
--if CONFIG['OS_TARGET'] == 'Android':
-+if str(CONFIG['OS_TARGET']) == 'Android':
-     SOURCES += [
-         'BionicGlue.cpp',
-     ]
-@@ -24,14 +24,14 @@ if CONFIG['MOZ_ASAN']:
-         'AsanOptions.cpp',
-     ]
- 
--if CONFIG['OS_TARGET'] == 'WINNT':
-+if str(CONFIG['OS_TARGET']) == 'WINNT':
-     DEFFILE = 'mozglue.def'
-     # We'll break the DLL blocklist if we immediately load user32.dll
-     DELAYLOAD_DLLS += [
-         'user32.dll',
-     ]
- 
--    if CONFIG['CC_TYPE'] == "msvc":
-+    if str(CONFIG['CC_TYPE']) == "msvc":
-         CFLAGS += ['-guard:cf']
-         CXXFLAGS += ['-guard:cf']
-         LDFLAGS += ['-guard:cf']
-@@ -48,12 +48,12 @@ if CONFIG['MOZ_WIDGET_TOOLKIT']:
-             'dummy.cpp',
-         ]
- 
--    if CONFIG['OS_TARGET'] == 'WINNT':
-+    if str(CONFIG['OS_TARGET']) == 'WINNT':
-         LOCAL_INCLUDES += [
-             '/memory/build',
-         ]
- 
--        if CONFIG['CC_TYPE'] == "msvc":
-+        if str(CONFIG['CC_TYPE']) == "msvc":
-             SOURCES += ['WindowsCFGStatus.cpp']
-         SOURCES += [
-             'Authenticode.cpp',
-@@ -85,17 +85,17 @@ if CONFIG['MOZ_WIDGET_TOOLKIT']:
-         'WindowsDllBlocklist.h',
-     ]
- 
--    if CONFIG['CPU_ARCH'].startswith('x86'):
-+    if str(CONFIG['CPU_ARCH']).startswith('x86'):
-         SOURCES += [
-             'SSE.cpp',
-         ]
- 
--    if CONFIG['CPU_ARCH'] == 'arm':
-+    if str(CONFIG['CPU_ARCH']) == 'arm':
-         SOURCES += [
-             'arm.cpp',
-         ]
- 
--    if CONFIG['CPU_ARCH'].startswith('mips'):
-+    if str(CONFIG['CPU_ARCH']).startswith('mips'):
-         SOURCES += [
-             'mips.cpp',
-         ]
-@@ -114,7 +114,7 @@ LIBRARY_DEFINES['MOZ_HAS_MOZGLUE'] = True
- 
- LDFLAGS += CONFIG['MOZ_GLUE_WRAP_LDFLAGS']
- 
--if CONFIG['OS_TARGET'] == 'Darwin':
-+if str(CONFIG['OS_TARGET']) == 'Darwin':
-     # On OSX 10.10.3, a dead lock happens in some cases involving dynamic
-     # symbol resolution for symbols that jemalloc itself uses. While it
-     # might be possible to find a way to avoid all such symbol resolutions,
-@@ -124,7 +124,7 @@ if CONFIG['OS_TARGET'] == 'Darwin':
-     # for TLS.
-     LDFLAGS += ['-Wl,-bind_at_load']
- 
--if CONFIG['MOZ_LINKER'] and CONFIG['TARGET_CPU'] == 'arm':
-+if CONFIG['MOZ_LINKER'] and str(CONFIG['TARGET_CPU']) == 'arm':
-     LDFLAGS += ['-Wl,-version-script,%s/arm-eabi-filter' % SRCDIR]
- 
- DIST_INSTALL = True
-diff --git a/python/mozbuild/mozbuild/action/check_binary.py b/python/mozbuild/mozbuild/action/check_binary.py
-index 5665ef053..b696f73d6 100644
---- a/python/mozbuild/mozbuild/action/check_binary.py
-+++ b/python/mozbuild/mozbuild/action/check_binary.py
-@@ -104,6 +104,8 @@ def iter_readelf_symbols(target, binary):
- 
- def iter_readelf_dynamic(target, binary):
-     for line in get_output(target['readelf'], '-d', binary):
-+        if isinstance(line, bytes):
-+            line=line.decode('utf-8')
-         data = line.split(None, 2)
-         if data and len(data) == 3 and data[0].startswith('0x'):
-             yield data[1].rstrip(')').lstrip('('), data[2]
-diff --git a/python/mozbuild/mozbuild/action/process_define_files.py b/python/mozbuild/mozbuild/action/process_define_files.py
-index 563fbb8fa..c3df2869b 100644
---- a/python/mozbuild/mozbuild/action/process_define_files.py
-+++ b/python/mozbuild/mozbuild/action/process_define_files.py
-@@ -2,7 +2,7 @@
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
- 
--from __future__ import absolute_import, print_function, unicode_literals
-+
- 
- import argparse
- import os
-@@ -53,7 +53,7 @@ def process_define_file(output, input):
-                                 'CONFIGURE_DEFINE_FILE')
-                         defines = '\n'.join(sorted(
-                             '#define %s %s' % (name, val)
--                            for name, val in config.defines['ALLDEFINES'].iteritems()))
-+                            for name, val in config.defines['ALLDEFINES'].items()))
-                         l = l[:m.start('cmd') - 1] \
-                             + defines + l[m.end('name'):]
-                     elif cmd == 'define':
-diff --git a/python/mozbuild/mozbuild/backend/base.py b/python/mozbuild/mozbuild/backend/base.py
-index a8d5c94e0..7cda63475 100644
---- a/python/mozbuild/mozbuild/backend/base.py
-+++ b/python/mozbuild/mozbuild/backend/base.py
-@@ -2,7 +2,7 @@
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
- 
--from __future__ import absolute_import, unicode_literals
-+
- 
- from abc import (
-     ABCMeta,
-@@ -31,7 +31,7 @@ from .configenvironment import ConfigEnvironment
- from mozbuild.base import ExecutionSummary
- 
- 
--class BuildBackend(LoggingMixin):
-+class BuildBackend(LoggingMixin, metaclass=ABCMeta):
-     """Abstract base class for build backends.
- 
-     A build backend is merely a consumer of the build configuration (the output
-@@ -39,8 +39,6 @@ class BuildBackend(LoggingMixin):
-     is the discretion of the specific implementation.
-     """
- 
--    __metaclass__ = ABCMeta
--
-     def __init__(self, environment):
-         assert isinstance(environment, (ConfigEnvironment, EmptyConfig))
-         self.populate_logger()
-@@ -311,7 +309,7 @@ class BuildBackend(LoggingMixin):
-         srcdir = mozpath.dirname(obj.input_path)
-         pp.context.update({
-             k: ' '.join(v) if isinstance(v, list) else v
--            for k, v in obj.config.substs.iteritems()
-+            for k, v in obj.config.substs.items()
-         })
-         pp.context.update(
-             top_srcdir=obj.topsrcdir,
-diff --git a/python/mozbuild/mozbuild/backend/common.py b/python/mozbuild/mozbuild/backend/common.py
-index d00cbbcaf..f747df446 100644
---- a/python/mozbuild/mozbuild/backend/common.py
-+++ b/python/mozbuild/mozbuild/backend/common.py
-@@ -2,7 +2,7 @@
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
- 
--from __future__ import absolute_import, unicode_literals
-+
- 
- import json
- import os
-@@ -174,7 +174,7 @@ class CommonBackend(BuildBackend):
-         if len(self._idl_manager.idls):
-             self._write_rust_xpidl_summary(self._idl_manager)
-             self._handle_idl_manager(self._idl_manager)
--            self._handle_generated_sources(mozpath.join(self.environment.topobjdir, 'dist/include/%s.h' % idl['root']) for idl in self._idl_manager.idls.values())
-+            self._handle_generated_sources(mozpath.join(self.environment.topobjdir, 'dist/include/%s.h' % idl['root']) for idl in list(self._idl_manager.idls.values()))
- 
- 
-         for config in self._configs:
-@@ -372,14 +372,14 @@ class CommonBackend(BuildBackend):
- 
-         with self._write_file(mozpath.join(topobjdir, 'dist', 'xpcrs', 'rt', 'all.rs')) as fh:
-             fh.write("// THIS FILE IS GENERATED - DO NOT EDIT\n\n")
--            for idl in manager.idls.values():
-+            for idl in list(manager.idls.values()):
-                 fh.write(include_tmpl % ("rt", idl['root']))
-                 fh.write(";\n")
- 
-         with self._write_file(mozpath.join(topobjdir, 'dist', 'xpcrs', 'bt', 'all.rs')) as fh:
-             fh.write("// THIS FILE IS GENERATED - DO NOT EDIT\n\n")
-             fh.write("&[\n")
--            for idl in manager.idls.values():
-+            for idl in list(manager.idls.values()):
-                 fh.write(include_tmpl % ("bt", idl['root']))
-                 fh.write(",\n")
-             fh.write("]\n")
-diff --git a/python/mozbuild/mozbuild/backend/configenvironment.py b/python/mozbuild/mozbuild/backend/configenvironment.py
-index 3676a7d18..f0896cea4 100644
---- a/python/mozbuild/mozbuild/backend/configenvironment.py
-+++ b/python/mozbuild/mozbuild/backend/configenvironment.py
-@@ -2,14 +2,14 @@
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
- 
--from __future__ import absolute_import
-+
- 
- import os
- import sys
- import json
- 
- from collections import Iterable, OrderedDict
--from types import StringTypes, ModuleType
-+from types import ModuleType
- 
- import mozpack.path as mozpath
- 
-@@ -22,7 +22,7 @@ from mozbuild.shellutil import quote as shell_quote
- 
- 
- if sys.version_info.major == 2:
--    text_type = unicode
-+    text_type = str
- else:
-     text_type = str
- 
-@@ -151,7 +151,7 @@ class ConfigEnvironment(object):
-             shell_quote(self.defines[name]).replace('$', '$$'))
-             for name in sorted(global_defines)])
-         def serialize(name, obj):
--            if isinstance(obj, StringTypes):
-+            if isinstance(obj, str):
-                 return obj
-             if isinstance(obj, Iterable):
-                 return ' '.join(obj)
-@@ -185,8 +185,8 @@ class ConfigEnvironment(object):
-                 except UnicodeDecodeError:
-                     return v.decode('utf-8', 'replace')
- 
--        for k, v in self.substs.items():
--            if not isinstance(v, StringTypes):
-+        for k, v in list(self.substs.items()):
-+            if not isinstance(v, str):
-                 if isinstance(v, Iterable):
-                     type(v)(decode(i) for i in v)
-             elif not isinstance(v, text_type):
-@@ -255,7 +255,7 @@ class PartialConfigDict(object):
-         existing_files = self._load_config_track()
- 
-         new_files = set()
--        for k, v in values.iteritems():
-+        for k, v in values.items():
-             new_files.add(self._write_file(k, v))
- 
-         for filename in existing_files - new_files:
-diff --git a/python/mozbuild/mozbuild/backend/fastermake.py b/python/mozbuild/mozbuild/backend/fastermake.py
-index b029aa10f..b66ade64f 100644
---- a/python/mozbuild/mozbuild/backend/fastermake.py
-+++ b/python/mozbuild/mozbuild/backend/fastermake.py
-@@ -2,7 +2,7 @@
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
- 
--from __future__ import absolute_import, unicode_literals, print_function
-+
- 
- from mozbuild.backend.base import PartialBackend
- from mozbuild.backend.common import CommonBackend
-@@ -140,7 +140,7 @@ class FasterMakeBackend(CommonBackend, PartialBackend):
-         # Add information for chrome manifest generation
-         manifest_targets = []
- 
--        for target, entries in self._manifest_entries.iteritems():
-+        for target, entries in self._manifest_entries.items():
-             manifest_targets.append(target)
-             install_target = mozpath.basedir(target, install_manifests_bases)
-             self._install_manifests[install_target].add_content(
-@@ -152,13 +152,13 @@ class FasterMakeBackend(CommonBackend, PartialBackend):
-                          % ' '.join(self._install_manifests.keys()))
- 
-         # Add dependencies we infered:
--        for target, deps in self._dependencies.iteritems():
-+        for target, deps in self._dependencies.items():
-             mk.create_rule([target]).add_dependencies(
-                 '$(TOPOBJDIR)/%s' % d for d in deps)
- 
-         mk.add_statement('include $(TOPSRCDIR)/config/faster/rules.mk')
- 
--        for base, install_manifest in self._install_manifests.iteritems():
-+        for base, install_manifest in self._install_manifests.items():
-             with self._write_file(
-                     mozpath.join(self.environment.topobjdir, 'faster',
-                                  'install_%s' % base.replace('/', '_'))) as fh:
-@@ -167,7 +167,7 @@ class FasterMakeBackend(CommonBackend, PartialBackend):
-         # For artifact builds only, write a single unified manifest for consumption by |mach watch|.
-         if self.environment.is_artifact_build:
-             unified_manifest = InstallManifest()
--            for base, install_manifest in self._install_manifests.iteritems():
-+            for base, install_manifest in self._install_manifests.items():
-                 # Expect 'dist/bin/**', which includes 'dist/bin' with no trailing slash.
-                 assert base.startswith('dist/bin')
-                 base = base[len('dist/bin'):]
-diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild/mozbuild/backend/recursivemake.py
-index dd9020d62..aa89cc297 100644
---- a/python/mozbuild/mozbuild/backend/recursivemake.py
-+++ b/python/mozbuild/mozbuild/backend/recursivemake.py
-@@ -2,7 +2,7 @@
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
- 
--from __future__ import absolute_import, unicode_literals
-+
- 
- import logging
- import os
-@@ -12,7 +12,7 @@ from collections import (
-     defaultdict,
-     namedtuple,
- )
--from StringIO import StringIO
-+from io import StringIO
- from itertools import chain
- 
- from mozpack.manifests import (
-@@ -80,75 +80,76 @@ from ..util import (
- )
- from ..makeutil import Makefile
- from mozbuild.shellutil import quote as shell_quote
-+from functools import reduce
- 
- MOZBUILD_VARIABLES = [
--    b'ASFLAGS',
--    b'CMSRCS',
--    b'CMMSRCS',
--    b'CPP_UNIT_TESTS',
--    b'DIRS',
--    b'DIST_INSTALL',
--    b'EXTRA_DSO_LDOPTS',
--    b'EXTRA_JS_MODULES',
--    b'EXTRA_PP_COMPONENTS',
--    b'EXTRA_PP_JS_MODULES',
--    b'FORCE_SHARED_LIB',
--    b'FORCE_STATIC_LIB',
--    b'FINAL_LIBRARY',
--    b'HOST_CFLAGS',
--    b'HOST_CSRCS',
--    b'HOST_CMMSRCS',
--    b'HOST_CXXFLAGS',
--    b'HOST_EXTRA_LIBS',
--    b'HOST_LIBRARY_NAME',
--    b'HOST_PROGRAM',
--    b'HOST_SIMPLE_PROGRAMS',
--    b'JAR_MANIFEST',
--    b'JAVA_JAR_TARGETS',
--    b'LIBRARY_NAME',
--    b'LIBS',
--    b'MAKE_FRAMEWORK',
--    b'MODULE',
--    b'NO_DIST_INSTALL',
--    b'NO_EXPAND_LIBS',
--    b'NO_INTERFACES_MANIFEST',
--    b'NO_JS_MANIFEST',
--    b'OS_LIBS',
--    b'PARALLEL_DIRS',
--    b'PREF_JS_EXPORTS',
--    b'PROGRAM',
--    b'RESOURCE_FILES',
--    b'SHARED_LIBRARY_LIBS',
--    b'SHARED_LIBRARY_NAME',
--    b'SIMPLE_PROGRAMS',
--    b'SONAME',
--    b'STATIC_LIBRARY_NAME',
--    b'TEST_DIRS',
--    b'TOOL_DIRS',
-+    'ASFLAGS',
-+    'CMSRCS',
-+    'CMMSRCS',
-+    'CPP_UNIT_TESTS',
-+    'DIRS',
-+    'DIST_INSTALL',
-+    'EXTRA_DSO_LDOPTS',
-+    'EXTRA_JS_MODULES',
-+    'EXTRA_PP_COMPONENTS',
-+    'EXTRA_PP_JS_MODULES',
-+    'FORCE_SHARED_LIB',
-+    'FORCE_STATIC_LIB',
-+    'FINAL_LIBRARY',
-+    'HOST_CFLAGS',
-+    'HOST_CSRCS',
-+    'HOST_CMMSRCS',
-+    'HOST_CXXFLAGS',
-+    'HOST_EXTRA_LIBS',
-+    'HOST_LIBRARY_NAME',
-+    'HOST_PROGRAM',
-+    'HOST_SIMPLE_PROGRAMS',
-+    'JAR_MANIFEST',
-+    'JAVA_JAR_TARGETS',
-+    'LIBRARY_NAME',
-+    'LIBS',
-+    'MAKE_FRAMEWORK',
-+    'MODULE',
-+    'NO_DIST_INSTALL',
-+    'NO_EXPAND_LIBS',
-+    'NO_INTERFACES_MANIFEST',
-+    'NO_JS_MANIFEST',
-+    'OS_LIBS',
-+    'PARALLEL_DIRS',
-+    'PREF_JS_EXPORTS',
-+    'PROGRAM',
-+    'RESOURCE_FILES',
-+    'SHARED_LIBRARY_LIBS',
-+    'SHARED_LIBRARY_NAME',
-+    'SIMPLE_PROGRAMS',
-+    'SONAME',
-+    'STATIC_LIBRARY_NAME',
-+    'TEST_DIRS',
-+    'TOOL_DIRS',
-     # XXX config/Makefile.in specifies this in a make invocation
-     #'USE_EXTENSION_MANIFEST',
--    b'XPCSHELL_TESTS',
--    b'XPIDL_MODULE',
-+    'XPCSHELL_TESTS',
-+    'XPIDL_MODULE',
- ]
- 
- DEPRECATED_VARIABLES = [
--    b'EXPORT_LIBRARY',
--    b'EXTRA_LIBS',
--    b'HOST_LIBS',
--    b'LIBXUL_LIBRARY',
--    b'MOCHITEST_A11Y_FILES',
--    b'MOCHITEST_BROWSER_FILES',
--    b'MOCHITEST_BROWSER_FILES_PARTS',
--    b'MOCHITEST_CHROME_FILES',
--    b'MOCHITEST_FILES',
--    b'MOCHITEST_FILES_PARTS',
--    b'MOCHITEST_METRO_FILES',
--    b'MOCHITEST_ROBOCOP_FILES',
--    b'MODULE_OPTIMIZE_FLAGS',
--    b'MOZ_CHROME_FILE_FORMAT',
--    b'SHORT_LIBNAME',
--    b'TESTING_JS_MODULES',
--    b'TESTING_JS_MODULE_DIR',
-+    'EXPORT_LIBRARY',
-+    'EXTRA_LIBS',
-+    'HOST_LIBS',
-+    'LIBXUL_LIBRARY',
-+    'MOCHITEST_A11Y_FILES',
-+    'MOCHITEST_BROWSER_FILES',
-+    'MOCHITEST_BROWSER_FILES_PARTS',
-+    'MOCHITEST_CHROME_FILES',
-+    'MOCHITEST_FILES',
-+    'MOCHITEST_FILES_PARTS',
-+    'MOCHITEST_METRO_FILES',
-+    'MOCHITEST_ROBOCOP_FILES',
-+    'MODULE_OPTIMIZE_FLAGS',
-+    'MOZ_CHROME_FILE_FORMAT',
-+    'SHORT_LIBNAME',
-+    'TESTING_JS_MODULES',
-+    'TESTING_JS_MODULE_DIR',
- ]
- 
- MOZBUILD_VARIABLES_MESSAGE = 'It should only be defined in moz.build files.'
-@@ -207,7 +208,7 @@ class BackendMakeFile(object):
-         self.fh.write(buf)
- 
-     def write_once(self, buf):
--        if isinstance(buf, unicode):
-+        if isinstance(buf, str):
-             buf = buf.encode('utf-8')
-         if b'\n' + buf not in self.fh.getvalue():
-             self.write(buf)
-@@ -280,7 +281,7 @@ class RecursiveMakeTraversal(object):
-         Helper function to call a filter from compute_dependencies and
-         traverse.
-         """
--        return filter(current, self.get_subdirs(current))
-+        return list(filter(current, self.get_subdirs(current)))
- 
-     def compute_dependencies(self, filter=None):
-         """
-@@ -710,7 +711,7 @@ class RecursiveMakeBackend(CommonBackend):
-         convenience variables, and the other dependency definitions for a
-         hopefully proper directory traversal.
-         """
--        for tier, no_skip in self._no_skip.items():
-+        for tier, no_skip in list(self._no_skip.items()):
-             self.log(logging.DEBUG, 'fill_root_mk', {
-                 'number': len(no_skip), 'tier': tier
-                 }, 'Using {number} directories during {tier}')
-@@ -757,7 +758,7 @@ class RecursiveMakeBackend(CommonBackend):
-         for tier, filter in filters:
-             main, all_deps = \
-                 self._traversal.compute_dependencies(filter)
--            for dir, deps in all_deps.items():
-+            for dir, deps in list(all_deps.items()):
-                 if deps is not None or (dir in self._idl_dirs \
-                                         and tier == 'export'):
-                     rule = root_deps_mk.create_rule(['%s/%s' % (dir, tier)])
-@@ -770,7 +771,7 @@ class RecursiveMakeBackend(CommonBackend):
-                 rule.add_dependencies('%s/%s' % (d, tier) for d in main)
- 
-         all_compile_deps = reduce(lambda x,y: x|y,
--            self._compile_graph.values()) if self._compile_graph else set()
-+            list(self._compile_graph.values())) if self._compile_graph else set()
-         # Include the following as dependencies of the top recursion target for
-         # compilation:
-         # - nodes that are not dependended upon by anything. Typically, this
-@@ -783,7 +784,7 @@ class RecursiveMakeBackend(CommonBackend):
-         #   as direct dependencies of the top recursion target, to somehow
-         #   prioritize them.
-         #   1. See bug 1262241 comment 5.
--        compile_roots = [t for t, deps in self._compile_graph.iteritems()
-+        compile_roots = [t for t, deps in list(self._compile_graph.items())
-                          if not deps or t not in all_compile_deps]
- 
-         rule = root_deps_mk.create_rule(['recurse_compile'])
-@@ -845,14 +846,14 @@ class RecursiveMakeBackend(CommonBackend):
-             rule.add_dependencies(['$(CURDIR)/%: %'])
- 
-     def _check_blacklisted_variables(self, makefile_in, makefile_content):
--        if b'EXTERNALLY_MANAGED_MAKE_FILE' in makefile_content:
-+        if 'EXTERNALLY_MANAGED_MAKE_FILE' in makefile_content:
-             # Bypass the variable restrictions for externally managed makefiles.
-             return
- 
-         for l in makefile_content.splitlines():
-             l = l.strip()
-             # Don't check comments
--            if l.startswith(b'#'):
-+            if l.startswith('#'):
-                 continue
-             for x in chain(MOZBUILD_VARIABLES, DEPRECATED_VARIABLES):
-                 if x not in l:
-@@ -909,11 +910,11 @@ class RecursiveMakeBackend(CommonBackend):
-                     # Directories with a Makefile containing a tools target, or
-                     # XPI_PKGNAME or INSTALL_EXTENSION_ID can't be skipped and
-                     # must run during the 'tools' tier.
--                    for t in (b'XPI_PKGNAME', b'INSTALL_EXTENSION_ID',
--                            b'tools'):
-+                    for t in ('XPI_PKGNAME', 'INSTALL_EXTENSION_ID',
-+                            'tools'):
-                         if t not in content:
-                             continue
--                        if t == b'tools' and not re.search('(?:^|\s)tools.*::', content, re.M):
-+                        if t == 'tools' and not re.search('(?:^|\s)tools.*::', content, re.M):
-                             continue
-                         if objdir == self.environment.topobjdir:
-                             continue
-@@ -933,7 +934,7 @@ class RecursiveMakeBackend(CommonBackend):
-         self._fill_root_mk()
- 
-         # Make the master test manifest files.
--        for flavor, t in self._test_manifests.items():
-+        for flavor, t in list(self._test_manifests.items()):
-             install_prefix, manifests = t
-             manifest_stem = mozpath.join(install_prefix, '%s.ini' % flavor)
-             self._write_master_test_manifest(mozpath.join(
-@@ -1039,7 +1040,7 @@ class RecursiveMakeBackend(CommonBackend):
-         for p in ('Makefile', 'backend.mk', '.deps/.mkdir.done'):
-             build_files.add_optional_exists(p)
- 
--        for idl in manager.idls.values():
-+        for idl in list(manager.idls.values()):
-             self._install_manifests['dist_idl'].add_link(idl['source'],
-                 idl['basename'])
-             self._install_manifests['dist_include'].add_optional_exists('%s.h'
-@@ -1086,7 +1087,7 @@ class RecursiveMakeBackend(CommonBackend):
- 
-         interfaces_manifests = []
-         dist_dir = mozpath.join(self.environment.topobjdir, 'dist')
--        for manifest, entries in manager.interface_manifests.items():
-+        for manifest, entries in list(manager.interface_manifests.items()):
-             interfaces_manifests.append(mozpath.join('$(DEPTH)', manifest))
-             for xpt in sorted(entries):
-                 registered_xpt_files.add(mozpath.join(
-@@ -1194,7 +1195,7 @@ class RecursiveMakeBackend(CommonBackend):
-         # Don't allow files to be defined multiple times unless it is allowed.
-         # We currently allow duplicates for non-test files or test files if
-         # the manifest is listed as a duplicate.
--        for source, (dest, is_test) in obj.installs.items():
-+        for source, (dest, is_test) in list(obj.installs.items()):
-             try:
-                 self._install_manifests['_test_files'].add_link(source, dest)
-             except ValueError:
-@@ -1558,7 +1559,7 @@ class RecursiveMakeBackend(CommonBackend):
-         man_dir = mozpath.join(self.environment.topobjdir, '_build_manifests',
-             dest)
- 
--        for k, manifest in manifests.items():
-+        for k, manifest in list(manifests.items()):
-             with self._write_file(mozpath.join(man_dir, k)) as fh:
-                 manifest.write(fileobj=fh)
- 
-@@ -1593,20 +1594,20 @@ class RecursiveMakeBackend(CommonBackend):
-                 pp.context.update(extra)
-             if not pp.context.get('autoconfmk', ''):
-                 pp.context['autoconfmk'] = 'autoconf.mk'
--            pp.handleLine(b'# THIS FILE WAS AUTOMATICALLY GENERATED. DO NOT MODIFY BY HAND.\n');
--            pp.handleLine(b'DEPTH := @DEPTH@\n')
--            pp.handleLine(b'topobjdir := @topobjdir@\n')
--            pp.handleLine(b'topsrcdir := @top_srcdir@\n')
--            pp.handleLine(b'srcdir := @srcdir@\n')
--            pp.handleLine(b'VPATH := @srcdir@\n')
--            pp.handleLine(b'relativesrcdir := @relativesrcdir@\n')
--            pp.handleLine(b'include $(DEPTH)/config/@autoconfmk@\n')
-+            pp.handleLine('# THIS FILE WAS AUTOMATICALLY GENERATED. DO NOT MODIFY BY HAND.\n');
-+            pp.handleLine('DEPTH := @DEPTH@\n')
-+            pp.handleLine('topobjdir := @topobjdir@\n')
-+            pp.handleLine('topsrcdir := @top_srcdir@\n')
-+            pp.handleLine('srcdir := @srcdir@\n')
-+            pp.handleLine('VPATH := @srcdir@\n')
-+            pp.handleLine('relativesrcdir := @relativesrcdir@\n')
-+            pp.handleLine('include $(DEPTH)/config/@autoconfmk@\n')
-             if not stub:
-                 pp.do_include(obj.input_path)
-             # Empty line to avoid failures when last line in Makefile.in ends
-             # with a backslash.
--            pp.handleLine(b'\n')
--            pp.handleLine(b'include $(topsrcdir)/config/recurse.mk\n')
-+            pp.handleLine('\n')
-+            pp.handleLine('include $(topsrcdir)/config/recurse.mk\n')
-         if not stub:
-             # Adding the Makefile.in here has the desired side-effect
-             # that if the Makefile.in disappears, this will force
-diff --git a/python/mozbuild/mozbuild/config_status.py b/python/mozbuild/mozbuild/config_status.py
-index d46f1332d..a9a27a699 100644
---- a/python/mozbuild/mozbuild/config_status.py
-+++ b/python/mozbuild/mozbuild/config_status.py
-@@ -77,6 +77,7 @@ def config_status(topobjdir='.', topsrcdir='.', defines=None,
-     See build/autoconf/config.status.m4.
-     '''
- 
-+    print("config_status started")
-     if 'CONFIG_FILES' in os.environ:
-         raise Exception('Using the CONFIG_FILES environment variable is not '
-             'supported.')
-@@ -119,7 +120,7 @@ def config_status(topobjdir='.', topsrcdir='.', defines=None,
-     if 'WRITE_MOZINFO' in os.environ:
-         write_mozinfo(os.path.join(topobjdir, 'mozinfo.json'), env, os.environ)
- 
--    cpu_start = time.clock()
-+    cpu_start = time.perf_counter()
-     time_start = time.time()
- 
-     # Make appropriate backend instances, defaulting to RecursiveMakeBackend,
-@@ -155,7 +156,7 @@ def config_status(topobjdir='.', topsrcdir='.', defines=None,
-             summary = obj.gyp_summary()
-             print(summary, file=sys.stderr)
- 
--    cpu_time = time.clock() - cpu_start
-+    cpu_time = time.perf_counter() - cpu_start
-     wall_time = time.time() - time_start
-     efficiency = cpu_time / wall_time if wall_time else 100
-     untracked = wall_time - execution_time
-@@ -179,3 +180,5 @@ def config_status(topobjdir='.', topsrcdir='.', defines=None,
-     # Advertise Android Studio if it is appropriate.
-     if MachCommandConditions.is_android(env):
-         print(ANDROID_IDE_ADVERTISEMENT)
-+
-+    print("config_status finished")
-diff --git a/python/mozbuild/mozbuild/configure/__init__.py b/python/mozbuild/mozbuild/configure/__init__.py
-index d03615707..13d623d4f 100644
---- a/python/mozbuild/mozbuild/configure/__init__.py
-+++ b/python/mozbuild/mozbuild/configure/__init__.py
-@@ -2,9 +2,9 @@
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
- 
--from __future__ import absolute_import, print_function, unicode_literals
- 
--import __builtin__
-+
-+import builtins
- import inspect
- import logging
- import os
-@@ -38,6 +38,8 @@ from mozbuild.util import (
- 
- import mozpack.path as mozpath
- 
-+import traceback
-+
- 
- class ConfigureError(Exception):
-     pass
-@@ -69,7 +71,7 @@ class SandboxDependsFunction(object):
-     def __getattr__(self, key):
-         return self._getattr(key).sandboxed
- 
--    def __nonzero__(self):
-+    def __bool__(self):
-         raise ConfigureError(
-             'Cannot do boolean operations on @depends functions.')
- 
-@@ -96,6 +98,7 @@ class DependsFunction(object):
-             sandbox._value_for(self)
-         elif not sandbox._help:
-             sandbox._execution_queue.append((sandbox._value_for, (self,)))
-+            sandbox.tasks_debug_out("DependsFunction.__init %s" % func.__name__)
- 
-     @property
-     def name(self):
-@@ -206,6 +209,15 @@ class CombinedDependsFunction(DependsFunction):
-     def __ne__(self, other):
-         return not self == other
- 
-+    def __hash__(self):
-+        # This was one was taken from [1] initially. Should not have done that:
-+        # it causes explosion of ConfigureSandbox._execution_queue with 100%
-+        # CPU load and eating all avaliable memory...
-+        #
-+        # [1] https://code.foxkit.us/adelie/packages/blob/f2b5773da19ab397fbe64fd32dacc383cfe4cd77/user/mozjs/python3.patch#L8068
-+        return hash((self._name, tuple(self.dependencies)))
-+
-+
- class SandboxedGlobal(dict):
-     '''Identifiable dict type for use as function global'''
- 
-@@ -253,11 +265,12 @@ class ConfigureSandbox(dict):
-     # The default set of builtins. We expose unicode as str to make sandboxed
-     # files more python3-ready.
-     BUILTINS = ReadOnlyDict({
--        b: getattr(__builtin__, b)
-+        b: getattr(builtins, b)
-         for b in ('None', 'False', 'True', 'int', 'bool', 'any', 'all', 'len',
-                   'list', 'tuple', 'set', 'dict', 'isinstance', 'getattr',
--                  'hasattr', 'enumerate', 'range', 'zip')
--    }, __import__=forbidden_import, str=unicode)
-+                  'hasattr', 'enumerate', 'range', 'zip', '__build_class__',
-+                  'bytes', 'exec')
-+    }, __import__=forbidden_import, str=str)
- 
-     # Expose a limited set of functions from os.path
-     OS = ReadOnlyNamespace(path=ReadOnlyNamespace(**{
-@@ -294,6 +307,11 @@ class ConfigureSandbox(dict):
-         # Queue of functions to execute, with their arguments
-         self._execution_queue = []
- 
-+        # For debugging: Show number of tasks started in run() / added elsewhere
-+        # and some additional info
-+        self.task_debug = False # set True to enable
-+        self.tasks_started = 0
-+
-         # Store the `when`s associated to some options.
-         self._conditions = {}
- 
-@@ -331,7 +349,7 @@ class ConfigureSandbox(dict):
-                 return method
-             def wrapped(*args, **kwargs):
-                 out_args = [
--                    arg.decode(encoding) if isinstance(arg, str) else arg
-+                    arg.decode(encoding) if isinstance(arg, bytes) else arg
-                     for arg in args
-                 ]
-                 return method(*out_args, **kwargs)
-@@ -360,6 +378,14 @@ class ConfigureSandbox(dict):
-             handler.setFormatter(formatter)
-             logger.addHandler(handler)
- 
-+    def tasks_debug_out(self, text):
-+        if self.task_debug:
-+            print("%s / queued %i / done %i" %(text, len(self._execution_queue), self.tasks_started))
-+            #if len(self._execution_queue) > 5000:
-+            #    traceback.print_stack(file=sys.stdout)
-+            #if len(self._execution_queue) > 5010:
-+            #    raise Exception("Too many tasks")
-+
-     def include_file(self, path):
-         '''Include one file in the sandbox. Users of this class probably want
-         to use `run` instead.
-@@ -380,6 +406,9 @@ class ConfigureSandbox(dict):
-         if path in self._all_paths:
-             raise ConfigureError(
-                 'Cannot include `%s` because it was included already.' % path)
-+
-+        if self.task_debug:
-+            print("include_file", path)
-         self._paths.append(path)
-         self._all_paths.add(path)
- 
-@@ -398,7 +427,7 @@ class ConfigureSandbox(dict):
-         if path:
-             self.include_file(path)
- 
--        for option in self._options.itervalues():
-+        for option in self._options.values():
-             # All options must be referenced by some @depends function
-             if option not in self._seen:
-                 raise ConfigureError(
-@@ -425,6 +454,8 @@ class ConfigureSandbox(dict):
- 
-         # Run the execution queue
-         for func, args in self._execution_queue:
-+            self.tasks_started += 1
-+            self.tasks_debug_out("ConfigureSandbox.run(%s)" % func.__name__)
-             func(*args)
- 
-         if self._help:
-@@ -504,7 +535,7 @@ class ConfigureSandbox(dict):
-                     value = PositiveOptionValue()
-                 elif value is False or value == ():
-                     value = NegativeOptionValue()
--                elif isinstance(value, types.StringTypes):
-+                elif isinstance(value, (str,)):
-                     value = PositiveOptionValue((value,))
-                 elif isinstance(value, tuple):
-                     value = PositiveOptionValue(value)
-@@ -544,7 +575,7 @@ class ConfigureSandbox(dict):
-         return value
- 
-     def _dependency(self, arg, callee_name, arg_name=None):
--        if isinstance(arg, types.StringTypes):
-+        if isinstance(arg, (str,)):
-             prefix, name, values = Option.split_option(arg)
-             if values != ():
-                 raise ConfigureError("Option must not contain an '='")
-@@ -608,7 +639,7 @@ class ConfigureSandbox(dict):
-         '''
-         when = self._normalize_when(kwargs.get('when'), 'option')
-         args = [self._resolve(arg) for arg in args]
--        kwargs = {k: self._resolve(v) for k, v in kwargs.iteritems()
-+        kwargs = {k: self._resolve(v) for k, v in kwargs.items()
-                                       if k != 'when'}
-         option = Option(*args, **kwargs)
-         if when:
-@@ -689,7 +720,7 @@ class ConfigureSandbox(dict):
-         with self.only_when_impl(when):
-             what = self._resolve(what)
-             if what:
--                if not isinstance(what, types.StringTypes):
-+                if not isinstance(what, (str,)):
-                     raise TypeError("Unexpected type: '%s'" % type(what).__name__)
-                 self.include_file(what)
- 
-@@ -707,7 +738,7 @@ class ConfigureSandbox(dict):
-             (k[:-len('_impl')], getattr(self, k))
-             for k in dir(self) if k.endswith('_impl') and k != 'template_impl'
-         )
--        glob.update((k, v) for k, v in self.iteritems() if k not in glob)
-+        glob.update((k, v) for k, v in self.items() if k not in glob)
- 
-         # Any function argument to the template must be prepared to be sandboxed.
-         # If the template itself returns a function (in which case, it's very
-@@ -731,7 +762,7 @@ class ConfigureSandbox(dict):
-             def wrapper(*args, **kwargs):
-                 args = [maybe_prepare_function(arg) for arg in args]
-                 kwargs = {k: maybe_prepare_function(v)
--                          for k, v in kwargs.iteritems()}
-+                          for k, v in kwargs.items()}
-                 ret = template(*args, **kwargs)
-                 if isfunction(ret):
-                     # We can't expect the sandboxed code to think about all the
-@@ -766,7 +797,7 @@ class ConfigureSandbox(dict):
-         for value, required in (
-                 (_import, True), (_from, False), (_as, False)):
- 
--            if not isinstance(value, types.StringTypes) and (
-+            if not isinstance(value, (str,)) and (
-                     required or value is not None):
-                 raise TypeError("Unexpected type: '%s'" % type(value).__name__)
-             if value is not None and not self.RE_MODULE.match(value):
-@@ -807,7 +838,7 @@ class ConfigureSandbox(dict):
-         # Special case for the open() builtin, because otherwise, using it
-         # fails with "IOError: file() constructor not accessible in
-         # restricted mode"
--        if what == '__builtin__.open':
-+        if what == 'builtins.open':
-             return lambda *args, **kwargs: open(*args, **kwargs)
-         # Until this proves to be a performance problem, just construct an
-         # import statement and execute it.
-@@ -829,7 +860,7 @@ class ConfigureSandbox(dict):
-         name = self._resolve(name, need_help_dependency=False)
-         if name is None:
-             return
--        if not isinstance(name, types.StringTypes):
-+        if not isinstance(name, (str,)):
-             raise TypeError("Unexpected type: '%s'" % type(name).__name__)
-         if name in data:
-             raise ConfigureError(
-@@ -850,6 +881,7 @@ class ConfigureSandbox(dict):
- 
-         self._execution_queue.append((
-             self._resolve_and_set, (self._config, name, value, when)))
-+        self.tasks_debug_out("ConfigureSandbox.set_config_impl / %s(%s" % (name, value))
- 
-     def set_define_impl(self, name, value, when=None):
-         '''Implementation of set_define().
-@@ -864,6 +896,7 @@ class ConfigureSandbox(dict):
-         defines = self._config.setdefault('DEFINES', {})
-         self._execution_queue.append((
-             self._resolve_and_set, (defines, name, value, when)))
-+        self.tasks_debug_out("ConfigureSandbox.set_define_impl / %s(%s)" % (name, value))
- 
-     def imply_option_impl(self, option, value, reason=None, when=None):
-         '''Implementation of imply_option().
-@@ -922,7 +955,7 @@ class ConfigureSandbox(dict):
-                 if isinstance(possible_reasons[0], Option):
-                     reason = possible_reasons[0]
-         if not reason and (isinstance(value, (bool, tuple)) or
--                           isinstance(value, types.StringTypes)):
-+                           isinstance(value, (str,))):
-             # A reason can be provided automatically when imply_option
-             # is called with an immediate value.
-             _, filename, line, _, _, _ = inspect.stack()[1]
-@@ -955,10 +988,10 @@ class ConfigureSandbox(dict):
-         if not inspect.isfunction(func):
-             raise TypeError("Unexpected type: '%s'" % type(func).__name__)
-         if func in self._prepared_functions:
--            return func, func.func_globals
-+            return func, func.__globals__
- 
-         glob = SandboxedGlobal(
--            (k, v) for k, v in func.func_globals.iteritems()
-+            (k, v) for k, v in func.__globals__.items()
-             if (inspect.isfunction(v) and v not in self._templates) or (
-                 inspect.isclass(v) and issubclass(v, Exception))
-         )
-@@ -979,20 +1012,20 @@ class ConfigureSandbox(dict):
-         # Note this is not entirely bullet proof (if the value is e.g. a list,
-         # the list contents could have changed), but covers the bases.
-         closure = None
--        if func.func_closure:
-+        if func.__closure__:
-             def makecell(content):
-                 def f():
-                     content
--                return f.func_closure[0]
-+                return f.__closure__[0]
- 
-             closure = tuple(makecell(cell.cell_contents)
--                            for cell in func.func_closure)
-+                            for cell in func.__closure__)
- 
-         new_func = self.wraps(func)(types.FunctionType(
--            func.func_code,
-+            func.__code__,
-             glob,
-             func.__name__,
--            func.func_defaults,
-+            func.__defaults__,
-             closure
-         ))
-         @self.wraps(new_func)
-diff --git a/python/mozbuild/mozbuild/configure/check_debug_ranges.py b/python/mozbuild/mozbuild/configure/check_debug_ranges.py
-index c0caa9cc5..a3e1f37e1 100644
---- a/python/mozbuild/mozbuild/configure/check_debug_ranges.py
-+++ b/python/mozbuild/mozbuild/configure/check_debug_ranges.py
-@@ -6,7 +6,7 @@
- # to a given compilation unit. This is used as a helper to find a bug in some
- # versions of GNU ld.
- 
--from __future__ import absolute_import
-+
- 
- import subprocess
- import sys
-@@ -45,6 +45,8 @@ def get_range_length(range, debug_ranges):
- def main(bin, compilation_unit):
-     p = subprocess.Popen(['objdump', '-W', bin], stdout = subprocess.PIPE, stderr = subprocess.PIPE)
-     (out, err) = p.communicate()
-+    if isinstance(out, bytes):
-+        out = out.decode('utf-8')
-     sections = re.split('\n(Contents of the|The section) ', out)
-     debug_info = [s for s in sections if s.startswith('.debug_info')]
-     debug_ranges = [s for s in sections if s.startswith('.debug_ranges')]
-@@ -59,4 +61,4 @@ def main(bin, compilation_unit):
- 
- 
- if __name__ == '__main__':
--    print(main(*sys.argv[1:]))
-+    print((main(*sys.argv[1:])))
-diff --git a/python/mozbuild/mozbuild/configure/options.py b/python/mozbuild/mozbuild/configure/options.py
-index 53ae2ae6d..4d80cad86 100644
---- a/python/mozbuild/mozbuild/configure/options.py
-+++ b/python/mozbuild/mozbuild/configure/options.py
-@@ -2,7 +2,7 @@
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
- 
--from __future__ import absolute_import, print_function, unicode_literals
-+
- 
- import os
- import sys
-@@ -12,7 +12,7 @@ from collections import OrderedDict
- 
- def istupleofstrings(obj):
-     return isinstance(obj, tuple) and len(obj) and all(
--        isinstance(o, types.StringTypes) for o in obj)
-+        isinstance(o, (str,)) for o in obj)
- 
- 
- class OptionValue(tuple):
-@@ -88,7 +88,7 @@ class PositiveOptionValue(OptionValue):
-     in the form of a tuple for when values are given to the option (in the form
-     --option=value[,value2...].
-     '''
--    def __nonzero__(self):
-+    def __bool__(self):
-         return True
- 
- 
-@@ -113,7 +113,7 @@ class ConflictingOptionError(InvalidOptionError):
-         if format_data:
-             message = message.format(**format_data)
-         super(ConflictingOptionError, self).__init__(message)
--        for k, v in format_data.iteritems():
-+        for k, v in format_data.items():
-             setattr(self, k, v)
- 
- 
-@@ -149,7 +149,7 @@ class Option(object):
-                 'At least an option name or an environment variable name must '
-                 'be given')
-         if name:
--            if not isinstance(name, types.StringTypes):
-+            if not isinstance(name, (str,)):
-                 raise InvalidOptionError('Option must be a string')
-             if not name.startswith('--'):
-                 raise InvalidOptionError('Option must start with `--`')
-@@ -158,7 +158,7 @@ class Option(object):
-             if not name.islower():
-                 raise InvalidOptionError('Option must be all lowercase')
-         if env:
--            if not isinstance(env, types.StringTypes):
-+            if not isinstance(env, (str,)):
-                 raise InvalidOptionError(
-                     'Environment variable name must be a string')
-             if not env.isupper():
-@@ -168,8 +168,8 @@ class Option(object):
-                 isinstance(nargs, int) and nargs >= 0):
-             raise InvalidOptionError(
-                 "nargs must be a positive integer, '?', '*' or '+'")
--        if (not isinstance(default, types.StringTypes) and
--                not isinstance(default, (bool, types.NoneType)) and
-+        if (not isinstance(default, (str,)) and
-+                not isinstance(default, (bool, type(None))) and
-                 not istupleofstrings(default)):
-             raise InvalidOptionError(
-                 'default must be a bool, a string or a tuple of strings')
-@@ -241,7 +241,7 @@ class Option(object):
-                     ', '.join("'%s'" % c for c in choices))
-         elif has_choices:
-             maxargs = self.maxargs
--            if len(choices) < maxargs and maxargs != sys.maxint:
-+            if len(choices) < maxargs and maxargs != sys.maxsize:
-                 raise InvalidOptionError('Not enough `choices` for `nargs`')
-         self.choices = choices
-         self.help = help
-@@ -255,7 +255,7 @@ class Option(object):
-         where prefix is one of 'with', 'without', 'enable' or 'disable'.
-         The '=values' part is optional. Values are separated with commas.
-         '''
--        if not isinstance(option, types.StringTypes):
-+        if not isinstance(option, (str,)):
-             raise InvalidOptionError('Option must be a string')
- 
-         elements = option.split('=', 1)
-@@ -308,7 +308,7 @@ class Option(object):
-     def maxargs(self):
-         if isinstance(self.nargs, int):
-             return self.nargs
--        return 1 if self.nargs == '?' else sys.maxint
-+        return 1 if self.nargs == '?' else sys.maxsize
- 
-     def _validate_nargs(self, num):
-         minargs, maxargs = self.minargs, self.maxargs
-@@ -499,5 +499,5 @@ class CommandLineHelper(object):
- 
-     def __iter__(self):
-         for d in (self._args, self._extra_args):
--            for arg, pos in d.itervalues():
-+            for arg, pos in d.values():
-                 yield arg
-diff --git a/python/mozbuild/mozbuild/configure/util.py b/python/mozbuild/mozbuild/configure/util.py
-index 9d8b2eb0e..a12986e48 100644
---- a/python/mozbuild/mozbuild/configure/util.py
-+++ b/python/mozbuild/mozbuild/configure/util.py
-@@ -77,15 +77,7 @@ class ConfigureOutputHandler(logging.Handler):
-         # Python has this feature where it sets the encoding of pipes to
-         # ascii, which blatantly fails when trying to print out non-ascii.
-         def fix_encoding(fh):
--            try:
--                isatty = fh.isatty()
--            except AttributeError:
--                isatty = True
--
--            if not isatty:
--                encoding = getpreferredencoding()
--                if encoding:
--                    return codecs.getwriter(encoding)(fh)
-+            # no magic on oe / python3
-             return fh
- 
-         self._stdout = fix_encoding(stdout)
-@@ -200,7 +192,7 @@ class LineIO(object):
-         self._errors = errors
- 
-     def write(self, buf):
--        if self._encoding and isinstance(buf, str):
-+        if self._encoding and isinstance(buf, bytes):
-             buf = buf.decode(self._encoding, self._errors)
-         lines = buf.splitlines()
-         if not lines:
-diff --git a/python/mozbuild/mozbuild/controller/building.py b/python/mozbuild/mozbuild/controller/building.py
-index d5af532f7..e9810fe58 100644
---- a/python/mozbuild/mozbuild/controller/building.py
-+++ b/python/mozbuild/mozbuild/controller/building.py
-@@ -2,7 +2,7 @@
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
- 
--from __future__ import absolute_import, unicode_literals
-+
- 
- import errno
- import getpass
-@@ -146,7 +146,7 @@ class TierStatus(object):
-         """
-         o = []
- 
--        for tier, state in self.tiers.items():
-+        for tier, state in list(self.tiers.items()):
-             t_entry = dict(
-                 name=tier,
-                 start=state['begin_time'],
-@@ -574,7 +574,7 @@ class BuildProgressFooter(Footer):
- 
-     def __init__(self, terminal, monitor):
-         Footer.__init__(self, terminal)
--        self.tiers = monitor.tiers.tier_status.viewitems()
-+        self.tiers = monitor.tiers.tier_status.items()
- 
-     def draw(self):
-         """Draws this footer in the terminal."""
-@@ -911,8 +911,8 @@ class CCacheStats(object):
- 
-         return '\n'.join(lines)
- 
--    def __nonzero__(self):
--        relative_values = [v for k, v in self._values.items()
-+    def __bool__(self):
-+        relative_values = [v for k, v in list(self._values.items())
-                            if k not in self.ABSOLUTE_KEYS]
-         return (all(v >= 0 for v in relative_values) and
-                 any(v > 0 for v in relative_values))
-@@ -1156,7 +1156,7 @@ class BuildDriver(MozbuildObject):
- 
-         high_finder, finder_percent = monitor.have_high_finder_usage()
-         if high_finder:
--            print(FINDER_SLOW_MESSAGE % finder_percent)
-+            print((FINDER_SLOW_MESSAGE % finder_percent))
- 
-         ccache_end = monitor.ccache_stats()
- 
-@@ -1276,8 +1276,8 @@ class BuildDriver(MozbuildObject):
-         """Install test files."""
- 
-         if self.is_clobber_needed():
--            print(INSTALL_TESTS_CLOBBER.format(
--                  clobber_file=os.path.join(self.topobjdir, 'CLOBBER')))
-+            print((INSTALL_TESTS_CLOBBER.format(
-+                  clobber_file=os.path.join(self.topobjdir, 'CLOBBER'))))
-             sys.exit(1)
- 
-         if not test_objs:
-diff --git a/python/mozbuild/mozbuild/frontend/context.py b/python/mozbuild/mozbuild/frontend/context.py
-index fbdbefc1d..1aef6a65a 100644
---- a/python/mozbuild/mozbuild/frontend/context.py
-+++ b/python/mozbuild/mozbuild/frontend/context.py
-@@ -14,7 +14,7 @@ If you are looking for the absolute authority on what moz.build files can
- contain, you've come to the right place.
- """
- 
--from __future__ import absolute_import, unicode_literals
-+
- 
- import os
- 
-@@ -237,15 +237,15 @@ class Context(KeyedDefaultDict):
-         This function is transactional: if setitem fails for one of the values,
-         the context is not updated at all."""
-         if isinstance(iterable, dict):
--            iterable = iterable.items()
-+            iterable = list(iterable.items())
- 
-         update = {}
--        for key, value in itertools.chain(iterable, kwargs.items()):
-+        for key, value in itertools.chain(iterable, list(kwargs.items())):
-             stored_type = self._validate(key, value)
-             # Don't create an instance of stored_type if coercion is needed,
-             # until all values are validated.
-             update[key] = (value, stored_type)
--        for key, (value, stored_type) in update.items():
-+        for key, (value, stored_type) in list(update.items()):
-             if not isinstance(value, stored_type):
-                 update[key] = stored_type(value)
-             else:
-@@ -311,7 +311,7 @@ class BaseCompileFlags(ContextDerivedValue, dict):
-         # a template were set and which were provided as defaults.
-         template_name = getattr(context, 'template', None)
-         if template_name in (None, 'Gyp'):
--            dict.__init__(self, ((k, v if v is None else TypedList(unicode)(v))
-+            dict.__init__(self, ((k, v if v is None else TypedList(str)(v))
-                                  for k, v, _ in self.flag_variables))
-         else:
-             dict.__init__(self)
-@@ -520,13 +520,13 @@ class CompileFlags(BaseCompileFlags):
-         if key in self and self[key] is None:
-             raise ValueError('`%s` may not be set in COMPILE_FLAGS from moz.build, this '
-                              'value is resolved from the emitter.' % key)
--        if not (isinstance(value, list) and all(isinstance(v, basestring) for v in value)):
-+        if not (isinstance(value, list) and all(isinstance(v, str) for v in value)):
-             raise ValueError('A list of strings must be provided as a value for a '
-                              'compile flags category.')
-         dict.__setitem__(self, key, value)
- 
- 
--class FinalTargetValue(ContextDerivedValue, unicode):
-+class FinalTargetValue(ContextDerivedValue, str):
-     def __new__(cls, context, value=""):
-         if not value:
-             value = 'dist/'
-@@ -536,7 +536,7 @@ class FinalTargetValue(ContextDerivedValue, unicode):
-                 value += 'bin'
-             if context['DIST_SUBDIR']:
-                 value += '/' + context['DIST_SUBDIR']
--        return unicode.__new__(cls, value)
-+        return str.__new__(cls, value)
- 
- 
- def Enum(*values):
-@@ -584,7 +584,7 @@ class PathMeta(type):
-                 cls = SourcePath
-         return super(PathMeta, cls).__call__(context, value)
- 
--class Path(ContextDerivedValue, unicode):
-+class Path(ContextDerivedValue, str, metaclass=PathMeta):
-     """Stores and resolves a source path relative to a given context
- 
-     This class is used as a backing type for some of the sandbox variables.
-@@ -595,7 +595,6 @@ class Path(ContextDerivedValue, unicode):
-       - '!objdir/relative/paths'
-       - '%/filesystem/absolute/paths'
-     """
--    __metaclass__ = PathMeta
- 
-     def __new__(cls, context, value=None):
-         return super(Path, cls).__new__(cls, value)
-@@ -612,10 +611,14 @@ class Path(ContextDerivedValue, unicode):
-         """
-         return Path(self.context, mozpath.join(self, *p))
- 
-+    @staticmethod
-+    def cmp(a, b):
-+        return (a > b) - (a < b)
-+
-     def __cmp__(self, other):
-         if isinstance(other, Path) and self.srcdir != other.srcdir:
--            return cmp(self.full_path, other.full_path)
--        return cmp(unicode(self), other)
-+            return self.cmp(self.full_path, other.full_path)
-+        return self.cmp(str(self), other)
- 
-     # __cmp__ is not enough because unicode has __eq__, __ne__, etc. defined
-     # and __cmp__ is only used for those when they don't exist.
-@@ -773,7 +776,7 @@ def ContextDerivedTypedRecord(*fields):
-         __slots__ = tuple([name for name, _ in fields])
- 
-         def __init__(self, context):
--            for fname, ftype in self._fields.items():
-+            for fname, ftype in list(self._fields.items()):
-                 if issubclass(ftype, ContextDerivedValue):
-                     setattr(self, fname, self._fields[fname](context))
-                 else:
-@@ -909,8 +912,8 @@ def TypedListWithAction(typ, action):
-     return _TypedListWithAction
- 
- WebPlatformTestManifest = TypedNamedTuple("WebPlatformTestManifest",
--                                          [("manifest_path", unicode),
--                                           ("test_root", unicode)])
-+                                          [("manifest_path", str),
-+                                           ("test_root", str)])
- ManifestparserManifestList = OrderedPathListWithAction(read_manifestparser_manifest)
- ReftestManifestList = OrderedPathListWithAction(read_reftest_manifest)
- WptManifestList = TypedListWithAction(WebPlatformTestManifest, read_wpt_manifest)
-@@ -918,18 +921,18 @@ WptManifestList = TypedListWithAction(WebPlatformTestManifest, read_wpt_manifest
- OrderedSourceList = ContextDerivedTypedList(SourcePath, StrictOrderingOnAppendList)
- OrderedTestFlavorList = TypedList(Enum(*all_test_flavors()),
-                                   StrictOrderingOnAppendList)
--OrderedStringList = TypedList(unicode, StrictOrderingOnAppendList)
-+OrderedStringList = TypedList(str, StrictOrderingOnAppendList)
- DependentTestsEntry = ContextDerivedTypedRecord(('files', OrderedSourceList),
-                                                 ('tags', OrderedStringList),
-                                                 ('flavors', OrderedTestFlavorList))
- BugzillaComponent = TypedNamedTuple('BugzillaComponent',
--                        [('product', unicode), ('component', unicode)])
-+                        [('product', str), ('component', str)])
- SchedulingComponents = ContextDerivedTypedRecord(
--        ('inclusive', TypedList(unicode, StrictOrderingOnAppendList)),
--        ('exclusive', TypedList(unicode, StrictOrderingOnAppendList)))
-+        ('inclusive', TypedList(str, StrictOrderingOnAppendList)),
-+        ('exclusive', TypedList(str, StrictOrderingOnAppendList)))
- 
- GeneratedFilesList = StrictOrderingOnAppendListWithFlagsFactory({
--    'script': unicode,
-+    'script': str,
-     'inputs': list,
-     'flags': list, })
- 
-@@ -1096,7 +1099,7 @@ class Files(SubContext):
-         self.test_tags |= other.test_tags
-         self.test_flavors |= other.test_flavors
- 
--        for k, v in other.items():
-+        for k, v in list(other.items()):
-             if k == 'IMPACTED_TESTS':
-                 self.test_files |= set(mozpath.relpath(e.full_path, e.context.config.topsrcdir)
-                                        for e in v.files)
-@@ -1154,7 +1157,7 @@ class Files(SubContext):
- 
-         bug_components = Counter()
- 
--        for f in files.values():
-+        for f in list(files.values()):
-             bug_component = f.get('BUG_COMPONENT')
-             if bug_component:
-                 bug_components[bug_component] += 1
-@@ -1232,7 +1235,7 @@ VARIABLES = {
-         RustLibrary template instead.
-         """),
- 
--    'RUST_LIBRARY_TARGET_DIR': (unicode, unicode,
-+    'RUST_LIBRARY_TARGET_DIR': (str, str,
-         """Where CARGO_TARGET_DIR should point when compiling this library.  If
-         not set, it defaults to the current objdir.  It should be a relative path
-         to the current objdir; absolute paths should not be used.
-@@ -1248,7 +1251,7 @@ VARIABLES = {
-         HostRustLibrary template instead.
-         """),
- 
--    'RUST_TEST': (unicode, unicode,
-+    'RUST_TEST': (str, str,
-         """Name of a Rust test to build and run via `cargo test`.
- 
-         This variable should not be used directly; you should be using the
-@@ -1487,7 +1490,7 @@ VARIABLES = {
-         """Like ``OBJDIR_FILES``, with preprocessing. Use sparingly.
-         """),
- 
--    'FINAL_LIBRARY': (unicode, unicode,
-+    'FINAL_LIBRARY': (str, str,
-         """Library in which the objects of the current directory will be linked.
- 
-         This variable contains the name of a library, defined elsewhere with
-@@ -1528,7 +1531,7 @@ VARIABLES = {
-         with the host compiler.
-         """),
- 
--    'HOST_LIBRARY_NAME': (unicode, unicode,
-+    'HOST_LIBRARY_NAME': (str, str,
-         """Name of target library generated when cross compiling.
-         """),
- 
-@@ -1546,7 +1549,7 @@ VARIABLES = {
-         libraries that link into this library via FINAL_LIBRARY.
-         """),
- 
--    'LIBRARY_NAME': (unicode, unicode,
-+    'LIBRARY_NAME': (str, str,
-         """The code name of the library generated for a directory.
- 
-         By default STATIC_LIBRARY_NAME and SHARED_LIBRARY_NAME take this name.
-@@ -1558,7 +1561,7 @@ VARIABLES = {
-         ``example/components/xpcomsample.lib`` on Windows.
-         """),
- 
--    'SHARED_LIBRARY_NAME': (unicode, unicode,
-+    'SHARED_LIBRARY_NAME': (str, str,
-         """The name of the static library generated for a directory, if it needs to
-         differ from the library code name.
- 
-@@ -1572,7 +1575,7 @@ VARIABLES = {
-         Implies FORCE_SHARED_LIB.
-         """),
- 
--    'STATIC_LIBRARY_NAME': (unicode, unicode,
-+    'STATIC_LIBRARY_NAME': (str, str,
-         """The name of the static library generated for a directory, if it needs to
-         differ from the library code name.
- 
-@@ -1604,31 +1607,31 @@ VARIABLES = {
- 
-         This variable contains a list of system libaries to link against.
-         """),
--    'RCFILE': (unicode, unicode,
-+    'RCFILE': (str, str,
-         """The program .rc file.
- 
-         This variable can only be used on Windows.
-         """),
- 
--    'RESFILE': (unicode, unicode,
-+    'RESFILE': (str, str,
-         """The program .res file.
- 
-         This variable can only be used on Windows.
-         """),
- 
--    'RCINCLUDE': (unicode, unicode,
-+    'RCINCLUDE': (str, str,
-         """The resource script file to be included in the default .res file.
- 
-         This variable can only be used on Windows.
-         """),
- 
--    'DEFFILE': (unicode, unicode,
-+    'DEFFILE': (str, str,
-         """The program .def (module definition) file.
- 
-         This variable can only be used on Windows.
-         """),
- 
--    'SYMBOLS_FILE': (Path, unicode,
-+    'SYMBOLS_FILE': (Path, str,
-         """A file containing a list of symbols to export from a shared library.
- 
-         The given file contains a list of symbols to be exported, and is
-@@ -1649,7 +1652,7 @@ VARIABLES = {
-         ``BIN_SUFFIX``, the name will remain unchanged.
-         """),
- 
--    'SONAME': (unicode, unicode,
-+    'SONAME': (str, str,
-         """The soname of the shared object currently being linked
- 
-         soname is the "logical name" of a shared object, often used to provide
-@@ -1719,7 +1722,7 @@ VARIABLES = {
-         ``GENERATED_FILES``.
-         """),
- 
--    'PROGRAM' : (unicode, unicode,
-+    'PROGRAM' : (str, str,
-         """Compiled executable name.
- 
-         If the configuration token ``BIN_SUFFIX`` is set, its value will be
-@@ -1727,7 +1730,7 @@ VARIABLES = {
-         ``BIN_SUFFIX``, ``PROGRAM`` will remain unchanged.
-         """),
- 
--    'HOST_PROGRAM' : (unicode, unicode,
-+    'HOST_PROGRAM' : (str, str,
-         """Compiled host executable name.
- 
-         If the configuration token ``HOST_BIN_SUFFIX`` is set, its value will be
-@@ -1765,7 +1768,7 @@ VARIABLES = {
-         files.
-         """),
- 
--    'XPIDL_MODULE': (unicode, unicode,
-+    'XPIDL_MODULE': (str, str,
-         """XPCOM Interface Definition Module Name.
- 
-         This is the name of the ``.xpt`` file that is created by linking
-@@ -1924,14 +1927,14 @@ VARIABLES = {
- 
- 
-     # The following variables are used to control the target of installed files.
--    'XPI_NAME': (unicode, unicode,
-+    'XPI_NAME': (str, str,
-         """The name of an extension XPI to generate.
- 
-         When this variable is present, the results of this directory will end up
-         being packaged into an extension instead of the main dist/bin results.
-         """),
- 
--    'DIST_SUBDIR': (unicode, unicode,
-+    'DIST_SUBDIR': (str, str,
-         """The name of an alternate directory to install files to.
- 
-         When this variable is present, the results of this directory will end up
-@@ -1939,7 +1942,7 @@ VARIABLES = {
-         otherwise be placed.
-         """),
- 
--    'FINAL_TARGET': (FinalTargetValue, unicode,
-+    'FINAL_TARGET': (FinalTargetValue, str,
-         """The name of the directory to install targets to.
- 
-         The directory is relative to the top of the object directory. The
-@@ -1970,7 +1973,7 @@ VARIABLES = {
- 
-     'GYP_DIRS': (StrictOrderingOnAppendListWithFlagsFactory({
-             'variables': dict,
--            'input': unicode,
-+            'input': str,
-             'sandbox_vars': dict,
-             'no_chromium': bool,
-             'no_unified': bool,
-@@ -2194,7 +2197,7 @@ VARIABLES = {
- }
- 
- # Sanity check: we don't want any variable above to have a list as storage type.
--for name, (storage_type, input_types, docs) in VARIABLES.items():
-+for name, (storage_type, input_types, docs) in list(VARIABLES.items()):
-     if storage_type == list:
-         raise RuntimeError('%s has a "list" storage type. Use "List" instead.'
-             % name)
-diff --git a/python/mozbuild/mozbuild/frontend/data.py b/python/mozbuild/mozbuild/frontend/data.py
-index 442fc9e0a..837453a9f 100644
---- a/python/mozbuild/mozbuild/frontend/data.py
-+++ b/python/mozbuild/mozbuild/frontend/data.py
-@@ -15,7 +15,7 @@ contains the code for converting executed mozbuild files into these data
- structures.
- """
- 
--from __future__ import absolute_import, unicode_literals
-+
- 
- from mozbuild.util import StrictOrderingOnAppendList
- from mozpack.chrome.manifest import ManifestEntry
-@@ -182,7 +182,7 @@ class ComputedFlags(ContextDerived):
-             if value:
-                 for dest_var in dest_vars:
-                     flags[dest_var].extend(value)
--        return flags.items()
-+        return list(flags.items())
- 
- class XPIDLFile(ContextDerived):
-     """Describes an XPIDL file to be compiled."""
-@@ -213,7 +213,7 @@ class BaseDefines(ContextDerived):
-         self.defines = defines
- 
-     def get_defines(self):
--        for define, value in self.defines.iteritems():
-+        for define, value in self.defines.items():
-             if value is True:
-                 yield('-D%s' % define)
-             elif value is False:
-@@ -494,7 +494,7 @@ class SimpleProgram(BaseProgram):
-     KIND = 'target'
- 
-     def source_files(self):
--        for srcs in self.sources.values():
-+        for srcs in list(self.sources.values()):
-             for f in srcs:
-                 if mozpath.basename(mozpath.splitext(f)[0]) == mozpath.splitext(self.program)[0]:
-                     return [f]
-diff --git a/python/mozbuild/mozbuild/frontend/emitter.py b/python/mozbuild/mozbuild/frontend/emitter.py
-index 642b381c0..c28344a75 100644
---- a/python/mozbuild/mozbuild/frontend/emitter.py
-+++ b/python/mozbuild/mozbuild/frontend/emitter.py
-@@ -2,7 +2,7 @@
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
- 
--from __future__ import absolute_import, unicode_literals
-+
- 
- import itertools
- import logging
-@@ -116,8 +116,8 @@ class TreeMetadataEmitter(LoggingMixin):
-         # arguments. This gross hack works around the problem until we
-         # rid ourselves of 2.6.
-         self.info = {}
--        for k, v in mozinfo.info.items():
--            if isinstance(k, unicode):
-+        for k, v in list(mozinfo.info.items()):
-+            if isinstance(k, str):
-                 k = k.encode('ascii')
-             self.info[k] = v
- 
-@@ -234,7 +234,7 @@ class TreeMetadataEmitter(LoggingMixin):
- 
- 
-         # Next do FINAL_LIBRARY linkage.
--        for lib in (l for libs in self._libs.values() for l in libs):
-+        for lib in (l for libs in list(self._libs.values()) for l in libs):
-             if not isinstance(lib, (StaticLibrary, RustLibrary)) or not lib.link_into:
-                 continue
-             if lib.link_into not in self._libs:
-@@ -294,13 +294,13 @@ class TreeMetadataEmitter(LoggingMixin):
-                         lib.link_into == outerlib.basename):
-                     propagate_defines(lib, defines)
- 
--        for lib in (l for libs in self._libs.values() for l in libs):
-+        for lib in (l for libs in list(self._libs.values()) for l in libs):
-             if isinstance(lib, Library):
-                 propagate_defines(lib, lib.lib_defines)
-             yield lib
- 
- 
--        for lib in (l for libs in self._libs.values() for l in libs):
-+        for lib in (l for libs in list(self._libs.values()) for l in libs):
-             lib_defines = list(lib.lib_defines.get_defines())
-             if lib_defines:
-                 objdir_flags = self._compile_flags[lib.objdir]
-@@ -310,13 +310,13 @@ class TreeMetadataEmitter(LoggingMixin):
-                 if objdir_flags:
-                     objdir_flags.resolve_flags('LIBRARY_DEFINES', lib_defines)
- 
--        for flags_obj in self._compile_flags.values():
-+        for flags_obj in list(self._compile_flags.values()):
-             yield flags_obj
- 
--        for flags_obj in self._compile_as_flags.values():
-+        for flags_obj in list(self._compile_as_flags.values()):
-             yield flags_obj
- 
--        for obj in self._binaries.values():
-+        for obj in list(self._binaries.values()):
-             yield obj
- 
- 
-@@ -409,7 +409,7 @@ class TreeMetadataEmitter(LoggingMixin):
-                         libs[key] = l
-                     if key not in libs:
-                         libs[key] = l
--            candidates = libs.values()
-+            candidates = list(libs.values())
-             if force_static and not candidates:
-                 if dir:
-                     raise SandboxValidationError(
-@@ -473,9 +473,9 @@ class TreeMetadataEmitter(LoggingMixin):
- 
-     def _verify_deps(self, context, crate_dir, crate_name, dependencies, description='Dependency'):
-         """Verify that a crate's dependencies all specify local paths."""
--        for dep_crate_name, values in dependencies.iteritems():
-+        for dep_crate_name, values in dependencies.items():
-             # A simple version number.
--            if isinstance(values, (str, unicode)):
-+            if isinstance(values, str):
-                 raise SandboxValidationError(
-                     '%s %s of crate %s does not list a path' % (description, dep_crate_name, crate_name),
-                     context)
-@@ -529,7 +529,7 @@ class TreeMetadataEmitter(LoggingMixin):
- 
-         cargo_target_dir = context.get('RUST_LIBRARY_TARGET_DIR', '.')
- 
--        dependencies = set(config.get('dependencies', {}).iterkeys())
-+        dependencies = set(config.get('dependencies', {}).keys())
- 
-         features = context.get(cls.FEATURES_VAR, [])
-         unique_features = set(features)
-@@ -863,7 +863,7 @@ class TreeMetadataEmitter(LoggingMixin):
-         assert not gen_sources['UNIFIED_SOURCES']
- 
-         no_pgo = context.get('NO_PGO')
--        no_pgo_sources = [f for f, flags in all_flags.iteritems()
-+        no_pgo_sources = [f for f, flags in all_flags.items()
-                           if flags.no_pgo]
-         if no_pgo:
-             if no_pgo_sources:
-@@ -890,7 +890,7 @@ class TreeMetadataEmitter(LoggingMixin):
- 
-         # The inverse of the above, mapping suffixes to their canonical suffix.
-         canonicalized_suffix_map = {}
--        for suffix, alternatives in suffix_map.iteritems():
-+        for suffix, alternatives in suffix_map.items():
-             alternatives.add(suffix)
-             for a in alternatives:
-                 canonicalized_suffix_map[a] = suffix
-@@ -914,7 +914,7 @@ class TreeMetadataEmitter(LoggingMixin):
-         # Source files to track for linkables associated with this context.
-         ctxt_sources = defaultdict(lambda: defaultdict(list))
- 
--        for variable, (klass, gen_klass, suffixes) in varmap.items():
-+        for variable, (klass, gen_klass, suffixes) in list(varmap.items()):
-             allowed_suffixes = set().union(*[suffix_map[s] for s in suffixes])
- 
-             # First ensure that we haven't been given filetypes that we don't
-@@ -941,20 +941,20 @@ class TreeMetadataEmitter(LoggingMixin):
-                     obj = cls(*arglist)
-                     srcs = obj.files
-                     if isinstance(obj, UnifiedSources) and obj.have_unified_mapping:
--                        srcs = dict(obj.unified_source_mapping).keys()
-+                        srcs = list(dict(obj.unified_source_mapping).keys())
-                     ctxt_sources[variable][canonical_suffix] += sorted(srcs)
-                     yield obj
- 
-         if ctxt_sources:
-             for linkable in linkables:
-                 for target_var in ('SOURCES', 'UNIFIED_SOURCES'):
--                    for suffix, srcs in ctxt_sources[target_var].items():
-+                    for suffix, srcs in list(ctxt_sources[target_var].items()):
-                         linkable.sources[suffix] += srcs
-             for host_linkable in host_linkables:
--                for suffix, srcs in ctxt_sources['HOST_SOURCES'].items():
-+                for suffix, srcs in list(ctxt_sources['HOST_SOURCES'].items()):
-                     host_linkable.sources[suffix] += srcs
- 
--        for f, flags in all_flags.iteritems():
-+        for f, flags in all_flags.items():
-             if flags.flags:
-                 ext = mozpath.splitext(f)[1]
-                 yield PerSourceFlag(context, f, flags.flags)
-@@ -1143,7 +1143,7 @@ class TreeMetadataEmitter(LoggingMixin):
-         for obj in self._handle_linkables(context, passthru, generated_files):
-             yield obj
- 
--        generated_files.update(['%s%s' % (k, self.config.substs.get('BIN_SUFFIX', '')) for k in self._binaries.keys()])
-+        generated_files.update(['%s%s' % (k, self.config.substs.get('BIN_SUFFIX', '')) for k in list(self._binaries.keys())])
- 
-         components = []
-         for var, cls in (
-@@ -1277,7 +1277,7 @@ class TreeMetadataEmitter(LoggingMixin):
-         for obj in self._process_jar_manifests(context):
-             yield obj
- 
--        for name, jar in context.get('JAVA_JAR_TARGETS', {}).items():
-+        for name, jar in list(context.get('JAVA_JAR_TARGETS', {}).items()):
-             yield ContextWrapped(context, jar)
- 
-         computed_as_flags.resolve_flags('MOZBUILD',
-@@ -1346,7 +1346,7 @@ class TreeMetadataEmitter(LoggingMixin):
-             script = mozpath.join(mozpath.dirname(mozpath.dirname(__file__)),
-                                   'action', 'process_define_files.py')
-             yield GeneratedFile(context, script, 'process_define_file',
--                                unicode(path),
-+                                str(path),
-                                 [Path(context, path + '.in')])
- 
-         generated_files = context.get('GENERATED_FILES') or []
-@@ -1393,7 +1393,7 @@ class TreeMetadataEmitter(LoggingMixin):
-                                     flags.flags, localized=localized)
- 
-     def _process_test_manifests(self, context):
--        for prefix, info in TEST_MANIFESTS.items():
-+        for prefix, info in list(TEST_MANIFESTS.items()):
-             for path, manifest in context.get('%s_MANIFESTS' % prefix, []):
-                 for obj in self._process_test_manifest(context, info, path, manifest):
-                     yield obj
-@@ -1479,7 +1479,7 @@ class TreeMetadataEmitter(LoggingMixin):
- 
-                 process_support_files(test)
- 
--            for path, m_defaults in mpmanifest.manifest_defaults.items():
-+            for path, m_defaults in list(mpmanifest.manifest_defaults.items()):
-                 process_support_files(m_defaults)
- 
-             # We also copy manifests into the output directory,
-diff --git a/python/mozbuild/mozbuild/frontend/reader.py b/python/mozbuild/mozbuild/frontend/reader.py
-index c1efc1c3d..0cdf8b8db 100644
---- a/python/mozbuild/mozbuild/frontend/reader.py
-+++ b/python/mozbuild/mozbuild/frontend/reader.py
-@@ -16,7 +16,7 @@ The BuildReader contains basic logic for traversing a tree of mozbuild files.
- It does this by examining specific variables populated during execution.
- """
- 
--from __future__ import absolute_import, print_function, unicode_literals
-+
- 
- import ast
- import inspect
-@@ -81,12 +81,13 @@ from .context import (
- 
- from mozbuild.base import ExecutionSummary
- from concurrent.futures.process import ProcessPoolExecutor
-+from functools import reduce
- 
- 
- 
- if sys.version_info.major == 2:
--    text_type = unicode
--    type_type = types.TypeType
-+    text_type = str
-+    type_type = type
- else:
-     text_type = str
-     type_type = type
-@@ -127,7 +128,7 @@ class EmptyConfig(object):
- 
-         self.substs = self.PopulateOnGetDict(EmptyValue, substs or self.default_substs)
-         udict = {}
--        for k, v in self.substs.items():
-+        for k, v in list(self.substs.items()):
-             if isinstance(v, str):
-                 udict[k.decode('utf-8')] = v.decode('utf-8')
-             else:
-@@ -311,7 +312,7 @@ class MozbuildSandbox(Sandbox):
-             raise Exception('`template` is a function decorator. You must '
-                 'use it as `@template` preceding a function declaration.')
- 
--        name = func.func_name
-+        name = func.__name__
- 
-         if name in self.templates:
-             raise KeyError(
-@@ -390,7 +391,7 @@ class MozbuildSandbox(Sandbox):
-             klass = self._context.__class__
-             self._context.__class__ = TemplateContext
-             # The sandbox will do all the necessary checks for these merges.
--            for key, value in context.items():
-+            for key, value in list(context.items()):
-                 if isinstance(value, dict):
-                     self[key].update(value)
-                 elif isinstance(value, (list, HierarchicalStringList)):
-@@ -407,12 +408,14 @@ class MozbuildSandbox(Sandbox):
- 
- class TemplateFunction(object):
-     def __init__(self, func, sandbox):
--        self.path = func.func_code.co_filename
--        self.name = func.func_name
-+        self.path = func.__code__.co_filename
-+        self.name = func.__name__
- 
--        code = func.func_code
-+        code = func.__code__
-         firstlineno = code.co_firstlineno
-         lines = sandbox._current_source.splitlines(True)
-+        if len(lines) and isinstance(lines[0], bytes):
-+            lines = [l.decode('utf-8') for l in lines]
-         lines = inspect.getblock(lines[firstlineno - 1:])
- 
-         # The code lines we get out of inspect.getsourcelines look like
-@@ -430,7 +433,7 @@ class TemplateFunction(object):
-         # actually never calls __getitem__ and __setitem__, so we need to
-         # modify the AST so that accesses to globals are properly directed
-         # to a dict.
--        self._global_name = b'_data' # AST wants str for this, not unicode
-+        self._global_name = '_data'
-         # In case '_data' is a name used for a variable in the function code,
-         # prepend more underscores until we find an unused name.
-         while (self._global_name in code.co_names or
-@@ -449,8 +452,8 @@ class TemplateFunction(object):
-             compile(func_ast, self.path, 'exec'),
-             glob,
-             self.name,
--            func.func_defaults,
--            func.func_closure,
-+            func.__defaults__,
-+            func.__closure__,
-         )
-         func()
- 
-@@ -464,11 +467,11 @@ class TemplateFunction(object):
-             '__builtins__': sandbox._builtins
-         }
-         func = types.FunctionType(
--            self._func.func_code,
-+            self._func.__code__,
-             glob,
-             self.name,
--            self._func.func_defaults,
--            self._func.func_closure
-+            self._func.__defaults__,
-+            self._func.__closure__
-         )
-         sandbox.exec_function(func, args, kwargs, self.path,
-                               becomes_current_path=False)
-@@ -484,7 +487,7 @@ class TemplateFunction(object):
-         def visit_Str(self, node):
-             # String nodes we got from the AST parser are str, but we want
-             # unicode literals everywhere, so transform them.
--            node.s = unicode(node.s)
-+            node.s = str(node.s)
-             return node
- 
-         def visit_Name(self, node):
-@@ -617,7 +620,7 @@ class BuildReaderError(Exception):
- 
-             for l in traceback.format_exception(type(self.other), self.other,
-                 self.trace):
--                s.write(unicode(l))
-+                s.write(str(l))
- 
-         return s.getvalue()
- 
-@@ -767,7 +770,7 @@ class BuildReaderError(Exception):
-             s.write('    %s\n' % inner.args[2])
-             s.write('\n')
-             close_matches = difflib.get_close_matches(inner.args[2],
--                                                      VARIABLES.keys(), 2)
-+                                                      list(VARIABLES.keys()), 2)
-             if close_matches:
-                 s.write('Maybe you meant %s?\n' % ' or '.join(close_matches))
-                 s.write('\n')
-@@ -1152,7 +1155,7 @@ class BuildReader(object):
-                         context)
-                 non_unified_sources.add(source)
-             action_overrides = {}
--            for action, script in gyp_dir.action_overrides.iteritems():
-+            for action, script in gyp_dir.action_overrides.items():
-                 action_overrides[action] = SourcePath(context, script)
- 
-             gyp_processor = GypProcessor(context.config,
-@@ -1188,7 +1191,7 @@ class BuildReader(object):
- 
-                 recurse_info[d][key] = dict(sandbox.metadata[key])
- 
--        for path, child_metadata in recurse_info.items():
-+        for path, child_metadata in list(recurse_info.items()):
-             child_path = path.join('moz.build').full_path
- 
-             # Ensure we don't break out of the topsrcdir. We don't do realpath
-@@ -1279,7 +1282,7 @@ class BuildReader(object):
-         # There is room to improve this code (and the code in
-         # _find_relevant_mozbuilds) to better handle multiple files in the same
-         # directory. Bug 1136966 tracks.
--        for path, mbpaths in relevants.items():
-+        for path, mbpaths in list(relevants.items()):
-             path_mozbuilds[path] = [mozpath.join(topsrcdir, p) for p in mbpaths]
- 
-             for i, mbpath in enumerate(mbpaths[0:-1]):
-@@ -1316,7 +1319,7 @@ class BuildReader(object):
-             all_contexts.append(context)
- 
-         result = {}
--        for path, paths in path_mozbuilds.items():
-+        for path, paths in list(path_mozbuilds.items()):
-             result[path] = reduce(lambda x, y: x + y, (contexts[p] for p in paths), [])
- 
-         return result, all_contexts
-@@ -1356,7 +1359,7 @@ class BuildReader(object):
- 
-         r = {}
- 
--        for path, ctxs in paths.items():
-+        for path, ctxs in list(paths.items()):
-             # Should be normalized by read_relevant_mozbuilds.
-             assert '\\' not in path
- 
-diff --git a/python/mozbuild/mozbuild/frontend/sandbox.py b/python/mozbuild/mozbuild/frontend/sandbox.py
-index b2090802e..6d94291ea 100644
---- a/python/mozbuild/mozbuild/frontend/sandbox.py
-+++ b/python/mozbuild/mozbuild/frontend/sandbox.py
-@@ -17,7 +17,7 @@ KeyError are machine parseable. This machine-friendly data is used to present
- user-friendly error messages in the case of errors.
- """
- 
--from __future__ import absolute_import, unicode_literals
-+
- 
- import os
- import sys
-@@ -112,6 +112,7 @@ class Sandbox(dict):
-         'int': int,
-         'set': set,
-         'tuple': tuple,
-+        'str': str,
-     })
- 
-     def __init__(self, context, finder=default_finder):
-diff --git a/python/mozbuild/mozbuild/jar.py b/python/mozbuild/mozbuild/jar.py
-index 47a2eff63..96aea63ce 100644
---- a/python/mozbuild/mozbuild/jar.py
-+++ b/python/mozbuild/mozbuild/jar.py
-@@ -8,7 +8,7 @@ processing jar.mn files.
- See the documentation for jar.mn on MDC for further details on the format.
- '''
- 
--from __future__ import absolute_import
-+
- 
- import sys
- import os
-@@ -17,7 +17,7 @@ import re
- import logging
- from time import localtime
- from MozZipFile import ZipFile
--from cStringIO import StringIO
-+from io import StringIO
- from collections import defaultdict
- 
- from mozbuild.preprocessor import Preprocessor
-@@ -302,9 +302,9 @@ class JarMaker(object):
-         '''updateManifest replaces the % in the chrome registration entries
-         with the given chrome base path, and updates the given manifest file.
-         '''
--        myregister = dict.fromkeys(map(lambda s: s.replace('%',
--            chromebasepath), register))
--        addEntriesToListFile(manifestPath, myregister.iterkeys())
-+        myregister = dict.fromkeys([s.replace('%',
-+            chromebasepath) for s in register])
-+        addEntriesToListFile(manifestPath, iter(myregister.keys()))
- 
-     def makeJar(self, infile, jardir):
-         '''makeJar is the main entry point to JarMaker.
-@@ -322,7 +322,7 @@ class JarMaker(object):
-         elif self.relativesrcdir:
-             self.localedirs = \
-                 self.generateLocaleDirs(self.relativesrcdir)
--        if isinstance(infile, basestring):
-+        if isinstance(infile, str):
-             logging.info('processing ' + infile)
-             self.sourcedirs.append(_normpath(os.path.dirname(infile)))
-         pp = self.pp.clone()
-diff --git a/python/mozbuild/mozbuild/makeutil.py b/python/mozbuild/mozbuild/makeutil.py
-index fcd45bed2..f77c5d2c3 100644
---- a/python/mozbuild/mozbuild/makeutil.py
-+++ b/python/mozbuild/mozbuild/makeutil.py
-@@ -2,11 +2,10 @@
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
- 
--from __future__ import absolute_import
-+
- 
- import os
- import re
--from types import StringTypes
- from collections import Iterable
- 
- 
-@@ -66,7 +65,7 @@ class _SimpleOrderedSet(object):
-         self._list = []
-         self._set = set()
- 
--    def __nonzero__(self):
-+    def __bool__(self):
-         return bool(self._set)
- 
-     def __iter__(self):
-@@ -103,19 +102,19 @@ class Rule(object):
- 
-     def add_targets(self, targets):
-         '''Add additional targets to the rule.'''
--        assert isinstance(targets, Iterable) and not isinstance(targets, StringTypes)
-+        assert isinstance(targets, Iterable) and not isinstance(targets, str)
-         self._targets.update(targets)
-         return self
- 
-     def add_dependencies(self, deps):
-         '''Add dependencies to the rule.'''
--        assert isinstance(deps, Iterable) and not isinstance(deps, StringTypes)
-+        assert isinstance(deps, Iterable) and not isinstance(deps, str)
-         self._dependencies.update(deps)
-         return self
- 
-     def add_commands(self, commands):
-         '''Add commands to the rule.'''
--        assert isinstance(commands, Iterable) and not isinstance(commands, StringTypes)
-+        assert isinstance(commands, Iterable) and not isinstance(commands, str)
-         self._commands.extend(commands)
-         return self
- 
-@@ -139,13 +138,16 @@ class Rule(object):
-         '''
-         if not self._targets:
-             return
--        fh.write('%s:' % ' '.join(self._targets))
-+        wstring = '%s:' % ' '.join(self._targets)
-         if self._dependencies:
--            fh.write(' %s' % ' '.join(self.dependencies()))
--        fh.write('\n')
-+            wstring += ' %s' % ' '.join(self.dependencies())
-+        wstring += '\n'
-         for cmd in self._commands:
--            fh.write('\t%s\n' % cmd)
--
-+            wstring += '\t%s\n' % cmd
-+        try:
-+            fh.write(wstring.encode('utf-8'))
-+        except TypeError:
-+            fh.write(wstring)
- 
- # colon followed by anything except a slash (Windows path detection)
- _depfilesplitter = re.compile(r':(?![\\/])')
-diff --git a/python/mozbuild/mozbuild/mozinfo.py b/python/mozbuild/mozbuild/mozinfo.py
-index 7e7ad1b2a..f03f20ba3 100755
---- a/python/mozbuild/mozbuild/mozinfo.py
-+++ b/python/mozbuild/mozbuild/mozinfo.py
-@@ -5,7 +5,7 @@
- # This module produces a JSON file that provides basic build info and
- # configuration metadata.
- 
--from __future__ import absolute_import
-+
- 
- import os
- import re
-@@ -33,7 +33,7 @@ def build_dict(config, env=os.environ):
-         d['mozconfig'] = config.mozconfig
- 
-     # os
--    o = substs["OS_TARGET"]
-+    o = str(substs["OS_TARGET"])
-     known_os = {"Linux": "linux",
-                 "WINNT": "win",
-                 "Darwin": "mac",
-@@ -148,7 +148,7 @@ def write_mozinfo(file, config, env=os.environ):
-     and what keys are produced.
-     """
-     build_conf = build_dict(config, env)
--    if isinstance(file, basestring):
--        file = open(file, 'wb')
-+    if isinstance(file, str):
-+        file = open(file, 'w')
- 
-     json.dump(build_conf, file, sort_keys=True, indent=4)
-diff --git a/python/mozbuild/mozbuild/preprocessor.py b/python/mozbuild/mozbuild/preprocessor.py
-index 6780b8b72..19e59884e 100644
---- a/python/mozbuild/mozbuild/preprocessor.py
-+++ b/python/mozbuild/mozbuild/preprocessor.py
-@@ -27,7 +27,8 @@ import os
- import re
- from optparse import OptionParser
- import errno
--from makeutil import Makefile
-+from .makeutil import Makefile
-+from functools import reduce
- 
- # hack around win32 mangling our line endings
- # http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65443
-@@ -230,7 +231,7 @@ class Expression:
-         def __repr__(self):
-             return self.value.__repr__()
- 
--    class ParseError(StandardError):
-+    class ParseError(Exception):
-         """
-         Error raised when parsing fails.
-         It has two members, offset and content, which give the offset of the
-@@ -278,7 +279,7 @@ class Preprocessor:
-         self.context = Context()
-         for k,v in {'FILE': '',
-                     'LINE': 0,
--                    'DIRECTORY': os.path.abspath('.')}.iteritems():
-+                    'DIRECTORY': os.path.abspath('.')}.items():
-             self.context[k] = v
-         self.actionLevel = 0
-         self.disableLevel = 0
-@@ -292,21 +293,21 @@ class Preprocessor:
-         self.cmds = {}
-         for cmd, level in {'define': 0,
-                            'undef': 0,
--                           'if': sys.maxint,
--                           'ifdef': sys.maxint,
--                           'ifndef': sys.maxint,
-+                           'if': sys.maxsize,
-+                           'ifdef': sys.maxsize,
-+                           'ifndef': sys.maxsize,
-                            'else': 1,
-                            'elif': 1,
-                            'elifdef': 1,
-                            'elifndef': 1,
--                           'endif': sys.maxint,
-+                           'endif': sys.maxsize,
-                            'expand': 0,
-                            'literal': 0,
-                            'filter': 0,
-                            'unfilter': 0,
-                            'include': 0,
-                            'includesubst': 0,
--                           'error': 0}.iteritems():
-+                           'error': 0}.items():
-             self.cmds[cmd] = (level, getattr(self, 'do_' + cmd))
-         self.out = sys.stdout
-         self.setMarker(marker)
-@@ -434,7 +435,7 @@ class Preprocessor:
-         filteredLine = self.applyFilters(aLine)
-         if filteredLine != aLine:
-             self.actionLevel = 2
--        self.out.write(filteredLine)
-+        self.out.write(filteredLine.encode('utf-8'))
- 
-     def handleCommandLine(self, args, defaultToStdin = False):
-         """
-@@ -468,7 +469,7 @@ class Preprocessor:
-                 raise Preprocessor.Error(self, "--depend doesn't work with stdout",
-                                          None)
-             try:
--                from makeutil import Makefile
-+                from .makeutil import Makefile
-             except:
-                 raise Preprocessor.Error(self, "--depend requires the "
-                                                "mozbuild.makeutil module", None)
-@@ -683,7 +684,7 @@ class Preprocessor:
-         current = dict(self.filters)
-         for f in filters:
-             current[f] = getattr(self, 'filter_' + f)
--        filterNames = current.keys()
-+        filterNames = list(current.keys())
-         filterNames.sort()
-         self.filters = [(fn, current[fn]) for fn in filterNames]
-         return
-@@ -693,7 +694,7 @@ class Preprocessor:
-         for f in filters:
-             if f in current:
-                 del current[f]
--        filterNames = current.keys()
-+        filterNames = list(current.keys())
-         filterNames.sort()
-         self.filters = [(fn, current[fn]) for fn in filterNames]
-         return
-@@ -738,7 +739,7 @@ class Preprocessor:
-         args can either be a file name, or a file-like object.
-         Files should be opened, and will be closed after processing.
-         """
--        isName = type(args) == str or type(args) == unicode
-+        isName = type(args) == str or type(args) == str
-         oldCheckLineNumbers = self.checkLineNumbers
-         self.checkLineNumbers = False
-         if isName:
-diff --git a/python/mozbuild/mozbuild/shellutil.py b/python/mozbuild/mozbuild/shellutil.py
-index 185a970ee..c0c15f8f2 100644
---- a/python/mozbuild/mozbuild/shellutil.py
-+++ b/python/mozbuild/mozbuild/shellutil.py
-@@ -15,7 +15,7 @@ def _tokens2re(**tokens):
-     # which matches the pattern and captures it in a named match group.
-     # The group names and patterns are given as arguments.
-     all_tokens = '|'.join('(?P<%s>%s)' % (name, value)
--                          for name, value in tokens.iteritems())
-+                          for name, value in tokens.items())
-     nonescaped = r'(?<!\\)(?:%s)' % all_tokens
- 
-     # The final pattern matches either the above pattern, or an escaped
-@@ -96,7 +96,7 @@ class _ClineSplitter(object):
-             self.cline = self.cline[m.end():]
- 
-             match = {name: value
--                     for name, value in m.groupdict().items() if value}
-+                     for name, value in list(m.groupdict().items()) if value}
-             if 'quote' in match:
-                 # " or ' start a quoted string
-                 if match['quote'] == '"':
-@@ -144,7 +144,7 @@ class _ClineSplitter(object):
-             self._push(self.cline[:m.start()])
-             self.cline = self.cline[m.end():]
-             match = {name: value
--                     for name, value in m.groupdict().items() if value}
-+                     for name, value in list(m.groupdict().items()) if value}
-             if 'quote' in match:
-                 # a double quote ends the quoted string, so go back to
-                 # unquoted parsing
-diff --git a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
-index a05059f8a..355a96165 100644
---- a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
-+++ b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
-@@ -2,9 +2,9 @@
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
- 
--from __future__ import unicode_literals
- 
--import cPickle as pickle
-+
-+import pickle as pickle
- import json
- import os
- import unittest
-@@ -333,7 +333,7 @@ class TestRecursiveMakeBackend(BackendTester):
-             ],
-         }
- 
--        for var, val in expected.items():
-+        for var, val in list(expected.items()):
-             # print("test_variable_passthru[%s]" % (var))
-             found = [str for str in lines if str.startswith(var)]
-             self.assertEqual(found, val)
-@@ -372,7 +372,7 @@ class TestRecursiveMakeBackend(BackendTester):
-             ],
-         }
- 
--        for var, val in expected.items():
-+        for var, val in list(expected.items()):
-             found = [str for str in lines if str.startswith(var)]
-             self.assertEqual(found, val)
- 
-@@ -563,7 +563,7 @@ class TestRecursiveMakeBackend(BackendTester):
- 
-         # This is not the most robust test in the world, but it gets the job
-         # done.
--        entries = [e for e in m._dests.keys() if '**' in e]
-+        entries = [e for e in list(m._dests.keys()) if '**' in e]
-         self.assertEqual(len(entries), 1)
-         self.assertIn('support/**', entries[0])
- 
-@@ -590,11 +590,11 @@ class TestRecursiveMakeBackend(BackendTester):
-                          set(['child/test_sub.js',
-                               'child/data/**',
-                               'child/another-file.sjs']))
--        for key in test_installs.keys():
-+        for key in list(test_installs.keys()):
-             self.assertIn(key, test_installs)
- 
-         synthesized_manifest = InstallManifest()
--        for item, installs in test_installs.items():
-+        for item, installs in list(test_installs.items()):
-             for install_info in installs:
-                 if len(install_info) == 3:
-                     synthesized_manifest.add_pattern_link(*install_info)
-@@ -602,7 +602,7 @@ class TestRecursiveMakeBackend(BackendTester):
-                     synthesized_manifest.add_link(*install_info)
- 
-         self.assertEqual(len(synthesized_manifest), 3)
--        for item, info in synthesized_manifest._dests.items():
-+        for item, info in list(synthesized_manifest._dests.items()):
-             self.assertIn(item, m)
-             self.assertEqual(info, m._dests[item])
- 
-@@ -864,7 +864,7 @@ class TestRecursiveMakeBackend(BackendTester):
-         expected[mozpath.join(env.topobjdir, 'final-target')] = [
-             'FINAL_TARGET = $(DEPTH)/random-final-target'
-         ]
--        for key, expected_rules in expected.iteritems():
-+        for key, expected_rules in expected.items():
-             backend_path = mozpath.join(key, 'backend.mk')
-             lines = [l.strip() for l in open(backend_path, 'rt').readlines()[2:]]
-             found = [str for str in lines if
-diff --git a/python/mozbuild/mozbuild/test/configure/common.py b/python/mozbuild/mozbuild/test/configure/common.py
-index 150c6e393..5e2c2afaa 100644
---- a/python/mozbuild/mozbuild/test/configure/common.py
-+++ b/python/mozbuild/mozbuild/test/configure/common.py
-@@ -2,7 +2,7 @@
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
- 
--from __future__ import absolute_import, print_function, unicode_literals
-+
- 
- import copy
- import errno
-@@ -16,7 +16,7 @@ from mozbuild.configure import ConfigureSandbox
- from mozbuild.util import ReadOnlyNamespace
- from mozpack import path as mozpath
- 
--from StringIO import StringIO
-+from io import StringIO
- from which import WhichError
- 
- from buildconfig import (
-@@ -77,10 +77,10 @@ class ConfigureTestSandbox(ConfigureSandbox):
-         self._search_path = environ.get('PATH', '').split(os.pathsep)
- 
-         self._subprocess_paths = {
--            mozpath.abspath(k): v for k, v in paths.iteritems() if v
-+            mozpath.abspath(k): v for k, v in paths.items() if v
-         }
- 
--        paths = paths.keys()
-+        paths = list(paths.keys())
- 
-         environ = dict(environ)
-         if 'CONFIG_SHELL' not in environ:
-diff --git a/python/mozbuild/mozbuild/test/configure/lint.py b/python/mozbuild/mozbuild/test/configure/lint.py
-index 98f5f4fe7..a549b4bcf 100644
---- a/python/mozbuild/mozbuild/test/configure/lint.py
-+++ b/python/mozbuild/mozbuild/test/configure/lint.py
-@@ -2,11 +2,11 @@
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
- 
--from __future__ import absolute_import, print_function, unicode_literals
-+
- 
- import os
- import unittest
--from StringIO import StringIO
-+from io import StringIO
- from mozunit import main
- from buildconfig import (
-     topobjdir,
-@@ -40,9 +40,7 @@ class LintMeta(type):
-         return type.__new__(mcs, name, bases, attrs)
- 
- 
--class Lint(unittest.TestCase):
--    __metaclass__ = LintMeta
--
-+class Lint(unittest.TestCase, metaclass=LintMeta):
-     def setUp(self):
-         self._curdir = os.getcwd()
-         os.chdir(topobjdir)
-diff --git a/python/mozbuild/mozbuild/test/configure/test_checks_configure.py b/python/mozbuild/mozbuild/test/configure/test_checks_configure.py
-index c60000bb2..07091c077 100644
---- a/python/mozbuild/mozbuild/test/configure/test_checks_configure.py
-+++ b/python/mozbuild/mozbuild/test/configure/test_checks_configure.py
-@@ -2,9 +2,9 @@
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
- 
--from __future__ import absolute_import, print_function, unicode_literals
- 
--from StringIO import StringIO
-+
-+from io import StringIO
- import os
- import sys
- import textwrap
-@@ -447,7 +447,7 @@ class TestChecksConfigure(unittest.TestCase):
-             checking for a... %s
-         ''' % self.OTHER_A))
- 
--        dirs = map(mozpath.dirname, (self.OTHER_A, self.KNOWN_A))
-+        dirs = list(map(mozpath.dirname, (self.OTHER_A, self.KNOWN_A)))
-         config, out, status = self.get_result(textwrap.dedent('''\
-             check_prog("A", ("known-a",), paths=["%s"])
-         ''' % os.pathsep.join(dirs)))
-@@ -457,7 +457,7 @@ class TestChecksConfigure(unittest.TestCase):
-             checking for a... %s
-         ''' % self.OTHER_A))
- 
--        dirs = map(mozpath.dirname, (self.KNOWN_A, self.KNOWN_B))
-+        dirs = list(map(mozpath.dirname, (self.KNOWN_A, self.KNOWN_B)))
-         config, out, status = self.get_result(textwrap.dedent('''\
-             check_prog("A", ("known-a",), paths=["%s", "%s"])
-         ''' % (os.pathsep.join(dirs), self.OTHER_A)))
-diff --git a/python/mozbuild/mozbuild/test/configure/test_compile_checks.py b/python/mozbuild/mozbuild/test/configure/test_compile_checks.py
-index b5be3bf2e..282000bb2 100644
---- a/python/mozbuild/mozbuild/test/configure/test_compile_checks.py
-+++ b/python/mozbuild/mozbuild/test/configure/test_compile_checks.py
-@@ -2,14 +2,14 @@
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
- 
--from __future__ import absolute_import, print_function, unicode_literals
-+
- 
- import os
- import textwrap
- import unittest
- import mozpack.path as mozpath
- 
--from StringIO import StringIO
-+from io import StringIO
- 
- from buildconfig import topsrcdir
- from common import ConfigureTestSandbox
-diff --git a/python/mozbuild/mozbuild/test/configure/test_configure.py b/python/mozbuild/mozbuild/test/configure/test_configure.py
-index f37e2701f..eb0ca84fb 100644
---- a/python/mozbuild/mozbuild/test/configure/test_configure.py
-+++ b/python/mozbuild/mozbuild/test/configure/test_configure.py
-@@ -2,9 +2,9 @@
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
- 
--from __future__ import absolute_import, print_function, unicode_literals
- 
--from StringIO import StringIO
-+
-+from io import StringIO
- import os
- import sys
- import textwrap
-@@ -43,7 +43,7 @@ class TestConfigure(unittest.TestCase):
- 
-         if '--help' in options:
-             return out.getvalue(), config
--        self.assertEquals('', out.getvalue())
-+        self.assertEqual('', out.getvalue())
-         return config
- 
-     def moz_configure(self, source):
-@@ -55,7 +55,7 @@ class TestConfigure(unittest.TestCase):
-     def test_defaults(self):
-         config = self.get_config()
-         self.maxDiff = None
--        self.assertEquals({
-+        self.assertEqual({
-             'CHOICES': NegativeOptionValue(),
-             'DEFAULTED': PositiveOptionValue(('not-simple',)),
-             'IS_GCC': NegativeOptionValue(),
-@@ -71,9 +71,9 @@ class TestConfigure(unittest.TestCase):
-     def test_help(self):
-         help, config = self.get_config(['--help'], prog='configure')
- 
--        self.assertEquals({}, config)
-+        self.assertEqual({}, config)
-         self.maxDiff = None
--        self.assertEquals(
-+        self.assertEqual(
-             'Usage: configure [options]\n'
-             '\n'
-             'Options: [defaults in brackets after descriptions]\n'
-@@ -109,7 +109,7 @@ class TestConfigure(unittest.TestCase):
-         ):
-             self.assertNotIn('ENABLED_SIMPLE', config)
-             self.assertIn('SIMPLE', config)
--            self.assertEquals(NegativeOptionValue(), config['SIMPLE'])
-+            self.assertEqual(NegativeOptionValue(), config['SIMPLE'])
- 
-         for config in (
-                 self.get_config(['--enable-simple']),
-@@ -117,7 +117,7 @@ class TestConfigure(unittest.TestCase):
-         ):
-             self.assertIn('ENABLED_SIMPLE', config)
-             self.assertIn('SIMPLE', config)
--            self.assertEquals(PositiveOptionValue(), config['SIMPLE'])
-+            self.assertEqual(PositiveOptionValue(), config['SIMPLE'])
-             self.assertIs(config['SIMPLE'], config['ENABLED_SIMPLE'])
- 
-         # --enable-simple doesn't take values.
-@@ -135,7 +135,7 @@ class TestConfigure(unittest.TestCase):
-                                 env={'MOZ_WITH_ENV': '1'}),
-         ):
-             self.assertIn('WITH_ENV', config)
--            self.assertEquals(NegativeOptionValue(), config['WITH_ENV'])
-+            self.assertEqual(NegativeOptionValue(), config['WITH_ENV'])
- 
-         for config in (
-                 self.get_config(['--enable-with-env']),
-@@ -145,7 +145,7 @@ class TestConfigure(unittest.TestCase):
-                                 env={'MOZ_WITH_ENV': ''}),
-         ):
-             self.assertIn('WITH_ENV', config)
--            self.assertEquals(PositiveOptionValue(), config['WITH_ENV'])
-+            self.assertEqual(PositiveOptionValue(), config['WITH_ENV'])
- 
-         with self.assertRaises(InvalidOptionError):
-             self.get_config(['--enable-with-env=value'])
-@@ -160,23 +160,23 @@ class TestConfigure(unittest.TestCase):
-             self.get_config(['--enable-values', '--disable-values']),
-         ):
-             self.assertIn(name, config)
--            self.assertEquals(NegativeOptionValue(), config[name])
-+            self.assertEqual(NegativeOptionValue(), config[name])
- 
-         for config in (
-             self.get_config(['--enable-values']),
-             self.get_config(['--disable-values', '--enable-values']),
-         ):
-             self.assertIn(name, config)
--            self.assertEquals(PositiveOptionValue(), config[name])
-+            self.assertEqual(PositiveOptionValue(), config[name])
- 
-         config = self.get_config(['--enable-values=foo'])
-         self.assertIn(name, config)
--        self.assertEquals(PositiveOptionValue(('foo',)), config[name])
-+        self.assertEqual(PositiveOptionValue(('foo',)), config[name])
- 
-         config = self.get_config(['--enable-values=foo,bar'])
-         self.assertIn(name, config)
-         self.assertTrue(config[name])
--        self.assertEquals(PositiveOptionValue(('foo', 'bar')), config[name])
-+        self.assertEqual(PositiveOptionValue(('foo', 'bar')), config[name])
- 
-     def test_values2(self):
-         self.test_values('VALUES2')
-@@ -187,12 +187,12 @@ class TestConfigure(unittest.TestCase):
-     def test_returned_default(self):
-         config = self.get_config(['--enable-simple'])
-         self.assertIn('DEFAULTED', config)
--        self.assertEquals(
-+        self.assertEqual(
-             PositiveOptionValue(('simple',)), config['DEFAULTED'])
- 
-         config = self.get_config(['--disable-simple'])
-         self.assertIn('DEFAULTED', config)
--        self.assertEquals(
-+        self.assertEqual(
-             PositiveOptionValue(('not-simple',)), config['DEFAULTED'])
- 
-     def test_returned_choices(self):
-@@ -200,13 +200,13 @@ class TestConfigure(unittest.TestCase):
-             config = self.get_config(
-                 ['--enable-values=alpha', '--returned-choices=%s' % val])
-             self.assertIn('CHOICES', config)
--            self.assertEquals(PositiveOptionValue((val,)), config['CHOICES'])
-+            self.assertEqual(PositiveOptionValue((val,)), config['CHOICES'])
- 
-         for val in ('0', '1', '2'):
-             config = self.get_config(
-                 ['--enable-values=numeric', '--returned-choices=%s' % val])
-             self.assertIn('CHOICES', config)
--            self.assertEquals(PositiveOptionValue((val,)), config['CHOICES'])
-+            self.assertEqual(PositiveOptionValue((val,)), config['CHOICES'])
- 
-         with self.assertRaises(InvalidOptionError):
-             self.get_config(['--enable-values=numeric',
-@@ -218,12 +218,12 @@ class TestConfigure(unittest.TestCase):
-     def test_included(self):
-         config = self.get_config(env={'CC': 'gcc'})
-         self.assertIn('IS_GCC', config)
--        self.assertEquals(config['IS_GCC'], True)
-+        self.assertEqual(config['IS_GCC'], True)
- 
-         config = self.get_config(
-             ['--enable-include=extra.configure', '--extra'])
-         self.assertIn('EXTRA', config)
--        self.assertEquals(PositiveOptionValue(), config['EXTRA'])
-+        self.assertEqual(PositiveOptionValue(), config['EXTRA'])
- 
-         with self.assertRaises(InvalidOptionError):
-             self.get_config(['--extra'])
-@@ -231,7 +231,7 @@ class TestConfigure(unittest.TestCase):
-     def test_template(self):
-         config = self.get_config(env={'CC': 'gcc'})
-         self.assertIn('CFLAGS', config)
--        self.assertEquals(config['CFLAGS'], ['-Werror=foobar'])
-+        self.assertEqual(config['CFLAGS'], ['-Werror=foobar'])
- 
-         config = self.get_config(env={'CC': 'clang'})
-         self.assertNotIn('CFLAGS', config)
-@@ -288,7 +288,7 @@ class TestConfigure(unittest.TestCase):
-             sandbox
-         )
- 
--        import __builtin__
-+        import builtins
-         self.assertIs(sandbox['foo'](), __builtin__)
- 
-         exec_(textwrap.dedent('''
-@@ -300,7 +300,7 @@ class TestConfigure(unittest.TestCase):
-         )
- 
-         f = sandbox['foo']()
--        self.assertEquals(f.name, os.devnull)
-+        self.assertEqual(f.name, os.devnull)
-         f.close()
- 
-         # This unlocks the sandbox
-@@ -336,8 +336,8 @@ class TestConfigure(unittest.TestCase):
-         self.assertIs(sandbox['foo'](), sandbox)
- 
-         # Nothing leaked from the function being executed
--        self.assertEquals(sandbox.keys(), ['__builtins__', 'foo'])
--        self.assertEquals(sandbox['__builtins__'], ConfigureSandbox.BUILTINS)
-+        self.assertEqual(list(sandbox.keys()), ['__builtins__', 'foo'])
-+        self.assertEqual(sandbox['__builtins__'], ConfigureSandbox.BUILTINS)
- 
-         exec_(textwrap.dedent('''
-             @template
-@@ -354,7 +354,7 @@ class TestConfigure(unittest.TestCase):
-         with self.assertRaises(NameError) as e:
-             sandbox._depends[sandbox['bar']].result()
- 
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "global name 'sys' is not defined")
- 
-     def test_apply_imports(self):
-@@ -380,28 +380,28 @@ class TestConfigure(unittest.TestCase):
-             sandbox
-         )
- 
--        self.assertEquals(len(imports), 1)
-+        self.assertEqual(len(imports), 1)
- 
-     def test_os_path(self):
-         config = self.get_config(['--with-imports=%s' % __file__])
-         self.assertIn('HAS_ABSPATH', config)
--        self.assertEquals(config['HAS_ABSPATH'], True)
-+        self.assertEqual(config['HAS_ABSPATH'], True)
-         self.assertIn('HAS_GETATIME', config)
--        self.assertEquals(config['HAS_GETATIME'], True)
-+        self.assertEqual(config['HAS_GETATIME'], True)
-         self.assertIn('HAS_GETATIME2', config)
--        self.assertEquals(config['HAS_GETATIME2'], False)
-+        self.assertEqual(config['HAS_GETATIME2'], False)
- 
-     def test_template_call(self):
-         config = self.get_config(env={'CC': 'gcc'})
-         self.assertIn('TEMPLATE_VALUE', config)
--        self.assertEquals(config['TEMPLATE_VALUE'], 42)
-+        self.assertEqual(config['TEMPLATE_VALUE'], 42)
-         self.assertIn('TEMPLATE_VALUE_2', config)
--        self.assertEquals(config['TEMPLATE_VALUE_2'], 21)
-+        self.assertEqual(config['TEMPLATE_VALUE_2'], 21)
- 
-     def test_template_imports(self):
-         config = self.get_config(['--enable-imports-in-template'])
-         self.assertIn('PLATFORM', config)
--        self.assertEquals(config['PLATFORM'], sys.platform)
-+        self.assertEqual(config['PLATFORM'], sys.platform)
- 
-     def test_decorators(self):
-         config = {}
-@@ -419,27 +419,27 @@ class TestConfigure(unittest.TestCase):
-             return self.get_config(*args, configure='set_config.configure')
- 
-         help, config = get_config(['--help'])
--        self.assertEquals(config, {})
-+        self.assertEqual(config, {})
- 
-         config = get_config(['--set-foo'])
-         self.assertIn('FOO', config)
--        self.assertEquals(config['FOO'], True)
-+        self.assertEqual(config['FOO'], True)
- 
-         config = get_config(['--set-bar'])
-         self.assertNotIn('FOO', config)
-         self.assertIn('BAR', config)
--        self.assertEquals(config['BAR'], True)
-+        self.assertEqual(config['BAR'], True)
- 
-         config = get_config(['--set-value=qux'])
-         self.assertIn('VALUE', config)
--        self.assertEquals(config['VALUE'], 'qux')
-+        self.assertEqual(config['VALUE'], 'qux')
- 
-         config = get_config(['--set-name=hoge'])
-         self.assertIn('hoge', config)
--        self.assertEquals(config['hoge'], True)
-+        self.assertEqual(config['hoge'], True)
- 
-         config = get_config([])
--        self.assertEquals(config, {'BAR': False})
-+        self.assertEqual(config, {'BAR': False})
- 
-         with self.assertRaises(ConfigureError):
-             # Both --set-foo and --set-name=FOO are going to try to
-@@ -454,11 +454,11 @@ class TestConfigure(unittest.TestCase):
-             set_config('QUX', 'qux', when='--with-qux')
-         '''):
-             config = self.get_config()
--            self.assertEquals(config, {
-+            self.assertEqual(config, {
-                 'FOO': 'foo',
-             })
-             config = self.get_config(['--with-qux'])
--            self.assertEquals(config, {
-+            self.assertEqual(config, {
-                 'FOO': 'foo',
-                 'QUX': 'qux',
-             })
-@@ -468,27 +468,27 @@ class TestConfigure(unittest.TestCase):
-             return self.get_config(*args, configure='set_define.configure')
- 
-         help, config = get_config(['--help'])
--        self.assertEquals(config, {'DEFINES': {}})
-+        self.assertEqual(config, {'DEFINES': {}})
- 
-         config = get_config(['--set-foo'])
-         self.assertIn('FOO', config['DEFINES'])
--        self.assertEquals(config['DEFINES']['FOO'], True)
-+        self.assertEqual(config['DEFINES']['FOO'], True)
- 
-         config = get_config(['--set-bar'])
-         self.assertNotIn('FOO', config['DEFINES'])
-         self.assertIn('BAR', config['DEFINES'])
--        self.assertEquals(config['DEFINES']['BAR'], True)
-+        self.assertEqual(config['DEFINES']['BAR'], True)
- 
-         config = get_config(['--set-value=qux'])
-         self.assertIn('VALUE', config['DEFINES'])
--        self.assertEquals(config['DEFINES']['VALUE'], 'qux')
-+        self.assertEqual(config['DEFINES']['VALUE'], 'qux')
- 
-         config = get_config(['--set-name=hoge'])
-         self.assertIn('hoge', config['DEFINES'])
--        self.assertEquals(config['DEFINES']['hoge'], True)
-+        self.assertEqual(config['DEFINES']['hoge'], True)
- 
-         config = get_config([])
--        self.assertEquals(config['DEFINES'], {'BAR': False})
-+        self.assertEqual(config['DEFINES'], {'BAR': False})
- 
-         with self.assertRaises(ConfigureError):
-             # Both --set-foo and --set-name=FOO are going to try to
-@@ -503,11 +503,11 @@ class TestConfigure(unittest.TestCase):
-             set_define('QUX', 'qux', when='--with-qux')
-         '''):
-             config = self.get_config()
--            self.assertEquals(config['DEFINES'], {
-+            self.assertEqual(config['DEFINES'], {
-                 'FOO': 'foo',
-             })
-             config = self.get_config(['--with-qux'])
--            self.assertEquals(config['DEFINES'], {
-+            self.assertEqual(config['DEFINES'], {
-                 'FOO': 'foo',
-                 'QUX': 'qux',
-             })
-@@ -518,19 +518,19 @@ class TestConfigure(unittest.TestCase):
-                 *args, configure='imply_option/simple.configure')
- 
-         help, config = get_config(['--help'])
--        self.assertEquals(config, {})
-+        self.assertEqual(config, {})
- 
-         config = get_config([])
--        self.assertEquals(config, {})
-+        self.assertEqual(config, {})
- 
-         config = get_config(['--enable-foo'])
-         self.assertIn('BAR', config)
--        self.assertEquals(config['BAR'], PositiveOptionValue())
-+        self.assertEqual(config['BAR'], PositiveOptionValue())
- 
-         with self.assertRaises(InvalidOptionError) as e:
-             get_config(['--enable-foo', '--disable-bar'])
- 
--        self.assertEquals(
-+        self.assertEqual(
-             e.exception.message,
-             "'--enable-bar' implied by '--enable-foo' conflicts with "
-             "'--disable-bar' from the command-line")
-@@ -541,31 +541,31 @@ class TestConfigure(unittest.TestCase):
-                 *args, configure='imply_option/negative.configure')
- 
-         help, config = get_config(['--help'])
--        self.assertEquals(config, {})
-+        self.assertEqual(config, {})
- 
-         config = get_config([])
--        self.assertEquals(config, {})
-+        self.assertEqual(config, {})
- 
-         config = get_config(['--enable-foo'])
-         self.assertIn('BAR', config)
--        self.assertEquals(config['BAR'], NegativeOptionValue())
-+        self.assertEqual(config['BAR'], NegativeOptionValue())
- 
-         with self.assertRaises(InvalidOptionError) as e:
-             get_config(['--enable-foo', '--enable-bar'])
- 
--        self.assertEquals(
-+        self.assertEqual(
-             e.exception.message,
-             "'--disable-bar' implied by '--enable-foo' conflicts with "
-             "'--enable-bar' from the command-line")
- 
-         config = get_config(['--disable-hoge'])
-         self.assertIn('BAR', config)
--        self.assertEquals(config['BAR'], NegativeOptionValue())
-+        self.assertEqual(config['BAR'], NegativeOptionValue())
- 
-         with self.assertRaises(InvalidOptionError) as e:
-             get_config(['--disable-hoge', '--enable-bar'])
- 
--        self.assertEquals(
-+        self.assertEqual(
-             e.exception.message,
-             "'--disable-bar' implied by '--disable-hoge' conflicts with "
-             "'--enable-bar' from the command-line")
-@@ -576,23 +576,23 @@ class TestConfigure(unittest.TestCase):
-                 *args, configure='imply_option/values.configure')
- 
-         help, config = get_config(['--help'])
--        self.assertEquals(config, {})
-+        self.assertEqual(config, {})
- 
-         config = get_config([])
--        self.assertEquals(config, {})
-+        self.assertEqual(config, {})
- 
-         config = get_config(['--enable-foo=a'])
-         self.assertIn('BAR', config)
--        self.assertEquals(config['BAR'], PositiveOptionValue(('a',)))
-+        self.assertEqual(config['BAR'], PositiveOptionValue(('a',)))
- 
-         config = get_config(['--enable-foo=a,b'])
-         self.assertIn('BAR', config)
--        self.assertEquals(config['BAR'], PositiveOptionValue(('a','b')))
-+        self.assertEqual(config['BAR'], PositiveOptionValue(('a','b')))
- 
-         with self.assertRaises(InvalidOptionError) as e:
-             get_config(['--enable-foo=a,b', '--disable-bar'])
- 
--        self.assertEquals(
-+        self.assertEqual(
-             e.exception.message,
-             "'--enable-bar=a,b' implied by '--enable-foo' conflicts with "
-             "'--disable-bar' from the command-line")
-@@ -603,15 +603,15 @@ class TestConfigure(unittest.TestCase):
-                 *args, configure='imply_option/infer.configure')
- 
-         help, config = get_config(['--help'])
--        self.assertEquals(config, {})
-+        self.assertEqual(config, {})
- 
-         config = get_config([])
--        self.assertEquals(config, {})
-+        self.assertEqual(config, {})
- 
-         with self.assertRaises(InvalidOptionError) as e:
-             get_config(['--enable-foo', '--disable-bar'])
- 
--        self.assertEquals(
-+        self.assertEqual(
-             e.exception.message,
-             "'--enable-bar' implied by '--enable-foo' conflicts with "
-             "'--disable-bar' from the command-line")
-@@ -619,7 +619,7 @@ class TestConfigure(unittest.TestCase):
-         with self.assertRaises(ConfigureError) as e:
-             self.get_config([], configure='imply_option/infer_ko.configure')
- 
--        self.assertEquals(
-+        self.assertEqual(
-             e.exception.message,
-             "Cannot infer what implies '--enable-bar'. Please add a `reason` "
-             "to the `imply_option` call.")
-@@ -630,25 +630,25 @@ class TestConfigure(unittest.TestCase):
-                 *args, configure='imply_option/imm.configure')
- 
-         help, config = get_config(['--help'])
--        self.assertEquals(config, {})
-+        self.assertEqual(config, {})
- 
-         config = get_config([])
--        self.assertEquals(config, {})
-+        self.assertEqual(config, {})
- 
-         config_path = mozpath.abspath(
-             mozpath.join(test_data_path, 'imply_option', 'imm.configure'))
- 
--        with self.assertRaisesRegexp(InvalidOptionError,
-+        with self.assertRaisesRegex(InvalidOptionError,
-             "--enable-foo' implied by 'imply_option at %s:7' conflicts with "
-             "'--disable-foo' from the command-line" % config_path):
-             get_config(['--disable-foo'])
- 
--        with self.assertRaisesRegexp(InvalidOptionError,
-+        with self.assertRaisesRegex(InvalidOptionError,
-             "--enable-bar=foo,bar' implied by 'imply_option at %s:16' conflicts"
-             " with '--enable-bar=a,b,c' from the command-line" % config_path):
-             get_config(['--enable-bar=a,b,c'])
- 
--        with self.assertRaisesRegexp(InvalidOptionError,
-+        with self.assertRaisesRegex(InvalidOptionError,
-             "--enable-baz=BAZ' implied by 'imply_option at %s:25' conflicts"
-             " with '--enable-baz=QUUX' from the command-line" % config_path):
-             get_config(['--enable-baz=QUUX'])
-@@ -660,7 +660,7 @@ class TestConfigure(unittest.TestCase):
-             '''):
-                 self.get_config()
- 
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "`--with-foo`, emitted from `%s` line 2, is unknown."
-                           % mozpath.join(test_data_path, 'moz.configure'))
- 
-@@ -675,7 +675,7 @@ class TestConfigure(unittest.TestCase):
-             '''):
-                 self.get_config()
- 
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "Unexpected type: 'int'")
- 
-     def test_imply_option_when(self):
-@@ -686,12 +686,12 @@ class TestConfigure(unittest.TestCase):
-             set_config('QUX', depends('--with-qux')(lambda x: x))
-         '''):
-             config = self.get_config()
--            self.assertEquals(config, {
-+            self.assertEqual(config, {
-                 'QUX': NegativeOptionValue(),
-             })
- 
-             config = self.get_config(['--with-foo'])
--            self.assertEquals(config, {
-+            self.assertEqual(config, {
-                 'QUX': PositiveOptionValue(),
-             })
- 
-@@ -700,7 +700,7 @@ class TestConfigure(unittest.TestCase):
-             with self.moz_configure('option("--with-foo", help="foo")'):
-                 self.get_config()
- 
--        self.assertEquals(
-+        self.assertEqual(
-             e.exception.message,
-             'Option `--with-foo` is not handled ; reference it with a @depends'
-         )
-@@ -712,7 +712,7 @@ class TestConfigure(unittest.TestCase):
-             '''):
-                 self.get_config()
- 
--        self.assertEquals(
-+        self.assertEqual(
-             e.exception.message,
-             'Option `--with-foo` already defined'
-         )
-@@ -724,7 +724,7 @@ class TestConfigure(unittest.TestCase):
-             '''):
-                 self.get_config()
- 
--        self.assertEquals(
-+        self.assertEqual(
-             e.exception.message,
-             'Option `MOZ_FOO` already defined'
-         )
-@@ -736,7 +736,7 @@ class TestConfigure(unittest.TestCase):
-             '''):
-                 self.get_config()
- 
--        self.assertEquals(
-+        self.assertEqual(
-             e.exception.message,
-             'Option `MOZ_FOO` already defined'
-         )
-@@ -748,7 +748,7 @@ class TestConfigure(unittest.TestCase):
-             '''):
-                 self.get_config()
- 
--        self.assertEquals(
-+        self.assertEqual(
-             e.exception.message,
-             'Option `MOZ_FOO` already defined'
-         )
-@@ -760,7 +760,7 @@ class TestConfigure(unittest.TestCase):
-             '''):
-                 self.get_config()
- 
--        self.assertEquals(
-+        self.assertEqual(
-             e.exception.message,
-             'Option `--with-foo` already defined'
-         )
-@@ -776,18 +776,18 @@ class TestConfigure(unittest.TestCase):
-             set_config('QUX', depends('--with-qux', when='--with-foo')(lambda x: x))
-         '''):
-             config = self.get_config()
--            self.assertEquals(config, {
-+            self.assertEqual(config, {
-                 'FOO': NegativeOptionValue(),
-             })
- 
-             config = self.get_config(['--with-foo'])
--            self.assertEquals(config, {
-+            self.assertEqual(config, {
-                 'FOO': PositiveOptionValue(),
-                 'QUX': NegativeOptionValue(),
-             })
- 
-             config = self.get_config(['--with-foo', '--with-qux'])
--            self.assertEquals(config, {
-+            self.assertEqual(config, {
-                 'FOO': PositiveOptionValue(),
-                 'QUX': PositiveOptionValue(),
-             })
-@@ -795,7 +795,7 @@ class TestConfigure(unittest.TestCase):
-             with self.assertRaises(InvalidOptionError) as e:
-                 self.get_config(['--with-bar'])
- 
--            self.assertEquals(
-+            self.assertEqual(
-                 e.exception.message,
-                 '--with-bar is not available in this configuration'
-             )
-@@ -803,7 +803,7 @@ class TestConfigure(unittest.TestCase):
-             with self.assertRaises(InvalidOptionError) as e:
-                 self.get_config(['--with-qux'])
- 
--            self.assertEquals(
-+            self.assertEqual(
-                 e.exception.message,
-                 '--with-qux is not available in this configuration'
-             )
-@@ -811,18 +811,18 @@ class TestConfigure(unittest.TestCase):
-             with self.assertRaises(InvalidOptionError) as e:
-                 self.get_config(['QUX=1'])
- 
--            self.assertEquals(
-+            self.assertEqual(
-                 e.exception.message,
-                 'QUX is not available in this configuration'
-             )
- 
-             config = self.get_config(env={'QUX': '1'})
--            self.assertEquals(config, {
-+            self.assertEqual(config, {
-                 'FOO': NegativeOptionValue(),
-             })
- 
-             help, config = self.get_config(['--help'])
--            self.assertEquals(help, textwrap.dedent('''\
-+            self.assertEqual(help, textwrap.dedent('''\
-                 Usage: configure [options]
- 
-                 Options: [defaults in brackets after descriptions]
-@@ -833,7 +833,7 @@ class TestConfigure(unittest.TestCase):
-             '''))
- 
-             help, config = self.get_config(['--help', '--with-foo'])
--            self.assertEquals(help, textwrap.dedent('''\
-+            self.assertEqual(help, textwrap.dedent('''\
-                 Usage: configure [options]
- 
-                 Options: [defaults in brackets after descriptions]
-@@ -851,7 +851,7 @@ class TestConfigure(unittest.TestCase):
-             with self.assertRaises(ConfigureError) as e:
-                 self.get_config()
- 
--            self.assertEquals(e.exception.message,
-+            self.assertEqual(e.exception.message,
-                               '@depends function needs the same `when` as '
-                               'options it depends on')
- 
-@@ -868,7 +868,7 @@ class TestConfigure(unittest.TestCase):
-             with self.assertRaises(ConfigureError) as e:
-                 self.get_config()
- 
--            self.assertEquals(e.exception.message,
-+            self.assertEqual(e.exception.message,
-                               '@depends function needs the same `when` as '
-                               'options it depends on')
- 
-@@ -896,7 +896,7 @@ class TestConfigure(unittest.TestCase):
-             with self.moz_configure('include("../foo.configure")'):
-                 self.get_config()
- 
--        self.assertEquals(
-+        self.assertEqual(
-             e.exception.message,
-             'Cannot include `%s` because it is not in a subdirectory of `%s`'
-             % (mozpath.normpath(mozpath.join(test_data_path, '..',
-@@ -911,7 +911,7 @@ class TestConfigure(unittest.TestCase):
-             '''):
-                 self.get_config()
- 
--        self.assertEquals(
-+        self.assertEqual(
-             e.exception.message,
-             'Cannot include `%s` because it was included already.'
-             % mozpath.normpath(mozpath.join(test_data_path,
-@@ -924,7 +924,7 @@ class TestConfigure(unittest.TestCase):
-             '''):
-                 self.get_config()
- 
--        self.assertEquals(e.exception.message, "Unexpected type: 'int'")
-+        self.assertEqual(e.exception.message, "Unexpected type: 'int'")
- 
-     def test_include_when(self):
-         with MockedOpen({
-@@ -967,26 +967,26 @@ class TestConfigure(unittest.TestCase):
-             '''),
-         }):
-             config = self.get_config()
--            self.assertEquals(config, {})
-+            self.assertEqual(config, {})
- 
-             config = self.get_config(['--with-foo'])
--            self.assertEquals(config, {})
-+            self.assertEqual(config, {})
- 
-             config = self.get_config(['--with-bar'])
--            self.assertEquals(config, {
-+            self.assertEqual(config, {
-                 'BAR': 'bar',
-             })
- 
-             with self.assertRaises(InvalidOptionError) as e:
-                 self.get_config(['--with-qux'])
- 
--            self.assertEquals(
-+            self.assertEqual(
-                 e.exception.message,
-                 '--with-qux is not available in this configuration'
-             )
- 
-             config = self.get_config(['--with-foo', '--with-foo-really'])
--            self.assertEquals(config, {
-+            self.assertEqual(config, {
-                 'FOO': 'foo',
-                 'FOO2': True,
-             })
-@@ -998,7 +998,7 @@ class TestConfigure(unittest.TestCase):
-             '''):
-                 self.get_config()
- 
--        self.assertEquals(e.exception.message, 'Cannot reassign builtins')
-+        self.assertEqual(e.exception.message, 'Cannot reassign builtins')
- 
-         with self.assertRaises(KeyError) as e:
-             with self.moz_configure('''
-@@ -1006,7 +1006,7 @@ class TestConfigure(unittest.TestCase):
-             '''):
-                 self.get_config()
- 
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           'Cannot assign `foo` because it is neither a '
-                           '@depends nor a @template')
- 
-@@ -1019,7 +1019,7 @@ class TestConfigure(unittest.TestCase):
-             '''):
-                 self.get_config()
- 
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "@depends needs at least one argument")
- 
-         with self.assertRaises(ConfigureError) as e:
-@@ -1030,7 +1030,7 @@ class TestConfigure(unittest.TestCase):
-             '''):
-                 self.get_config()
- 
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "'--with-foo' is not a known option. Maybe it's "
-                           "declared too late?")
- 
-@@ -1042,7 +1042,7 @@ class TestConfigure(unittest.TestCase):
-             '''):
-                 self.get_config()
- 
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "Option must not contain an '='")
- 
-         with self.assertRaises(TypeError) as e:
-@@ -1053,7 +1053,7 @@ class TestConfigure(unittest.TestCase):
-             '''):
-                 self.get_config()
- 
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "Cannot use object of type 'int' as argument "
-                           "to @depends")
- 
-@@ -1065,7 +1065,7 @@ class TestConfigure(unittest.TestCase):
-             '''):
-                 self.get_config()
- 
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "Cannot decorate generator functions with @depends")
- 
-         with self.assertRaises(TypeError) as e:
-@@ -1074,7 +1074,7 @@ class TestConfigure(unittest.TestCase):
-             '''):
-                 self.get_config()
- 
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "Unexpected type: 'int'")
- 
-         with self.assertRaises(ConfigureError) as e:
-@@ -1088,7 +1088,7 @@ class TestConfigure(unittest.TestCase):
-             '''):
-                 self.get_config()
- 
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "The `foo` function may not be called")
- 
-         with self.assertRaises(TypeError) as e:
-@@ -1099,7 +1099,7 @@ class TestConfigure(unittest.TestCase):
-             '''):
-                 self.get_config()
- 
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "depends_impl() got an unexpected keyword argument 'foo'")
- 
-     def test_depends_when(self):
-@@ -1124,12 +1124,12 @@ class TestConfigure(unittest.TestCase):
-             set_config('QUX', qux)
-         '''):
-             config = self.get_config()
--            self.assertEquals(config, {
-+            self.assertEqual(config, {
-                 'FOO': 'foo',
-             })
- 
-             config = self.get_config(['--with-qux'])
--            self.assertEquals(config, {
-+            self.assertEqual(config, {
-                 'FOO': 'foo',
-                 'QUX': 'qux',
-             })
-@@ -1144,7 +1144,7 @@ class TestConfigure(unittest.TestCase):
-             '''):
-                 self.get_config()
- 
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           '@imports must appear after @template')
- 
-         with self.assertRaises(ConfigureError) as e:
-@@ -1157,7 +1157,7 @@ class TestConfigure(unittest.TestCase):
-             '''):
-                 self.get_config()
- 
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           '@imports must appear after @depends')
- 
-         for import_ in (
-@@ -1174,7 +1174,7 @@ class TestConfigure(unittest.TestCase):
-                 ''' % import_):
-                     self.get_config()
- 
--            self.assertEquals(e.exception.message, "Unexpected type: 'int'")
-+            self.assertEqual(e.exception.message, "Unexpected type: 'int'")
- 
-         with self.assertRaises(TypeError) as e:
-             with self.moz_configure('''
-@@ -1185,7 +1185,7 @@ class TestConfigure(unittest.TestCase):
-             '''):
-                 self.get_config()
- 
--        self.assertEquals(e.exception.message, "Unexpected type: 'int'")
-+        self.assertEqual(e.exception.message, "Unexpected type: 'int'")
- 
-         with self.assertRaises(ValueError) as e:
-             with self.moz_configure('''
-@@ -1195,7 +1195,7 @@ class TestConfigure(unittest.TestCase):
-             '''):
-                 self.get_config()
- 
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "Invalid argument to @imports: 'os*'")
- 
-     def test_only_when(self):
-@@ -1250,7 +1250,7 @@ class TestConfigure(unittest.TestCase):
-             with self.assertRaises(InvalidOptionError) as e:
-                 self.get_config(['--foo'])
- 
--            self.assertEquals(e.exception.message,
-+            self.assertEqual(e.exception.message,
-                               '--foo is not available in this configuration')
- 
-         # Cannot depend on an option defined in a only_when block, because we
-@@ -1261,7 +1261,7 @@ class TestConfigure(unittest.TestCase):
-             with self.assertRaises(ConfigureError) as e:
-                 self.get_config()
- 
--            self.assertEquals(e.exception.message,
-+            self.assertEqual(e.exception.message,
-                               '@depends function needs the same `when` as '
-                               'options it depends on')
- 
-@@ -1278,7 +1278,7 @@ class TestConfigure(unittest.TestCase):
-             with self.assertRaises(InvalidOptionError) as e:
-                 self.get_config()
- 
--            self.assertEquals(e.exception.message,
-+            self.assertEqual(e.exception.message,
-                               '--foo is not available in this configuration')
- 
-         # And similarly doesn't fail when the condition is true.
-diff --git a/python/mozbuild/mozbuild/test/configure/test_lint.py b/python/mozbuild/mozbuild/test/configure/test_lint.py
-index 6d8d4c49f..6ad897839 100644
---- a/python/mozbuild/mozbuild/test/configure/test_lint.py
-+++ b/python/mozbuild/mozbuild/test/configure/test_lint.py
-@@ -2,9 +2,9 @@
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
- 
--from __future__ import absolute_import, print_function, unicode_literals
- 
--from StringIO import StringIO
-+
-+from io import StringIO
- import os
- import textwrap
- import unittest
-@@ -62,7 +62,7 @@ class TestLint(unittest.TestCase):
-             '''):
-                 self.lint_test()
- 
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "`bar` depends on '--help' and `foo`. "
-                           "`foo` must depend on '--help'")
- 
-@@ -85,7 +85,7 @@ class TestLint(unittest.TestCase):
-             '''):
-                 self.lint_test()
- 
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "`bar` depends on '--help' and `foo`. "
-                           "`foo` must depend on '--help'")
- 
-@@ -111,7 +111,7 @@ class TestLint(unittest.TestCase):
-             '''):
-                 self.lint_test()
- 
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "Missing @depends for `foo`: '--help'")
- 
-         with self.assertRaises(ConfigureError) as e:
-@@ -130,7 +130,7 @@ class TestLint(unittest.TestCase):
-             '''):
-                 self.lint_test()
- 
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "Missing @depends for `foo`: '--help'")
- 
-         with self.assertRaises(ConfigureError) as e:
-@@ -145,7 +145,7 @@ class TestLint(unittest.TestCase):
-             '''):
-                 self.lint_test()
- 
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "Missing @depends for `foo`: '--help'")
- 
-         # This would have failed with "Missing @depends for `foo`: '--help'"
-@@ -178,7 +178,7 @@ class TestLint(unittest.TestCase):
-             '''):
-                 self.lint_test()
- 
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "Missing @depends for `foo`: '--help'")
- 
-         # There is a default restricted `os` module when there is no explicit
-@@ -205,7 +205,7 @@ class TestLint(unittest.TestCase):
-             '''):
-                 self.lint_test()
- 
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "%s:3: The dependency on `--foo` is unused."
-                           % mozpath.join(test_data_path, 'moz.configure'))
- 
-@@ -222,7 +222,7 @@ class TestLint(unittest.TestCase):
-             '''):
-                 self.lint_test()
- 
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "%s:5: The dependency on `bar` is unused."
-                           % mozpath.join(test_data_path, 'moz.configure'))
- 
-@@ -236,7 +236,7 @@ class TestLint(unittest.TestCase):
-             '''):
-                 self.lint_test()
- 
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "%s:2: The dependency on `<lambda>` is unused."
-                           % mozpath.join(test_data_path, 'moz.configure'))
- 
-@@ -257,7 +257,7 @@ class TestLint(unittest.TestCase):
-             '''):
-                 self.lint_test()
- 
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "%s:9: The dependency on `qux` is unused."
-                           % mozpath.join(test_data_path, 'moz.configure'))
- 
-diff --git a/python/mozbuild/mozbuild/test/configure/test_moz_configure.py b/python/mozbuild/mozbuild/test/configure/test_moz_configure.py
-index b3342e268..7a26e9e09 100644
---- a/python/mozbuild/mozbuild/test/configure/test_moz_configure.py
-+++ b/python/mozbuild/mozbuild/test/configure/test_moz_configure.py
-@@ -2,7 +2,7 @@
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
- 
--from __future__ import absolute_import, print_function, unicode_literals
-+
- 
- from mozunit import main
- from mozpack import path as mozpath
-@@ -27,10 +27,10 @@ class TestMozConfigure(BaseConfigureTest):
-             shell = mozpath.abspath('/bin/sh')
-             return result.replace('CONFIG_SHELL=%s ' % shell, '')
- 
--        self.assertEquals('--enable-application=browser',
-+        self.assertEqual('--enable-application=browser',
-                           get_value_for(['--enable-application=browser']))
- 
--        self.assertEquals('--enable-application=browser '
-+        self.assertEqual('--enable-application=browser '
-                           'MOZ_VTUNE=1',
-                           get_value_for(['--enable-application=browser',
-                                          'MOZ_VTUNE=1']))
-@@ -39,25 +39,25 @@ class TestMozConfigure(BaseConfigureTest):
-             environ={'MOZ_VTUNE': '1'},
-             mozconfig='ac_add_options --enable-project=js')
- 
--        self.assertEquals('--enable-project=js MOZ_VTUNE=1',
-+        self.assertEqual('--enable-project=js MOZ_VTUNE=1',
-                           value)
- 
-         # --disable-js-shell is the default, so it's filtered out.
--        self.assertEquals('--enable-application=browser',
-+        self.assertEqual('--enable-application=browser',
-                           get_value_for(['--enable-application=browser',
-                                          '--disable-js-shell']))
- 
-         # Normally, --without-foo would be filtered out because that's the
-         # default, but since it is a (fake) old-configure option, it always
-         # appears.
--        self.assertEquals('--enable-application=browser --without-foo',
-+        self.assertEqual('--enable-application=browser --without-foo',
-                           get_value_for(['--enable-application=browser',
-                                          '--without-foo']))
--        self.assertEquals('--enable-application=browser --with-foo',
-+        self.assertEqual('--enable-application=browser --with-foo',
-                           get_value_for(['--enable-application=browser',
-                                          '--with-foo']))
- 
--        self.assertEquals("--enable-application=browser '--with-foo=foo bar'",
-+        self.assertEqual("--enable-application=browser '--with-foo=foo bar'",
-                           get_value_for(['--enable-application=browser',
-                                          '--with-foo=foo bar']))
- 
-@@ -69,7 +69,7 @@ class TestMozConfigure(BaseConfigureTest):
-                 self.version = version
- 
-             def __call__(self, stdin, args):
--                this.assertEquals(args, ('-version',))
-+                this.assertEqual(args, ('-version',))
-                 return 0, self.version, ''
- 
-         def check_nsis_version(version):
-@@ -84,13 +84,13 @@ class TestMozConfigure(BaseConfigureTest):
-         with self.assertRaises(SystemExit) as e:
-             check_nsis_version('v3.0a2')
- 
--        self.assertEquals(check_nsis_version('v3.0b1'), '3.0b1')
--        self.assertEquals(check_nsis_version('v3.0b2'), '3.0b2')
--        self.assertEquals(check_nsis_version('v3.0rc1'), '3.0rc1')
--        self.assertEquals(check_nsis_version('v3.0'), '3.0')
--        self.assertEquals(check_nsis_version('v3.0-2'), '3.0')
--        self.assertEquals(check_nsis_version('v3.0.1'), '3.0')
--        self.assertEquals(check_nsis_version('v3.1'), '3.1')
-+        self.assertEqual(check_nsis_version('v3.0b1'), '3.0b1')
-+        self.assertEqual(check_nsis_version('v3.0b2'), '3.0b2')
-+        self.assertEqual(check_nsis_version('v3.0rc1'), '3.0rc1')
-+        self.assertEqual(check_nsis_version('v3.0'), '3.0')
-+        self.assertEqual(check_nsis_version('v3.0-2'), '3.0')
-+        self.assertEqual(check_nsis_version('v3.0.1'), '3.0')
-+        self.assertEqual(check_nsis_version('v3.1'), '3.1')
- 
- 
- if __name__ == '__main__':
-diff --git a/python/mozbuild/mozbuild/test/configure/test_options.py b/python/mozbuild/mozbuild/test/configure/test_options.py
-index 9defccb2c..330ce3b1f 100644
---- a/python/mozbuild/mozbuild/test/configure/test_options.py
-+++ b/python/mozbuild/mozbuild/test/configure/test_options.py
-@@ -2,7 +2,7 @@
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
- 
--from __future__ import absolute_import, print_function, unicode_literals
-+
- 
- import unittest
- 
-@@ -28,139 +28,139 @@ class Option(Option):
- class TestOption(unittest.TestCase):
-     def test_option(self):
-         option = Option('--option')
--        self.assertEquals(option.prefix, '')
--        self.assertEquals(option.name, 'option')
--        self.assertEquals(option.env, None)
-+        self.assertEqual(option.prefix, '')
-+        self.assertEqual(option.name, 'option')
-+        self.assertEqual(option.env, None)
-         self.assertFalse(option.default)
- 
-         option = Option('--enable-option')
--        self.assertEquals(option.prefix, 'enable')
--        self.assertEquals(option.name, 'option')
--        self.assertEquals(option.env, None)
-+        self.assertEqual(option.prefix, 'enable')
-+        self.assertEqual(option.name, 'option')
-+        self.assertEqual(option.env, None)
-         self.assertFalse(option.default)
- 
-         option = Option('--disable-option')
--        self.assertEquals(option.prefix, 'disable')
--        self.assertEquals(option.name, 'option')
--        self.assertEquals(option.env, None)
-+        self.assertEqual(option.prefix, 'disable')
-+        self.assertEqual(option.name, 'option')
-+        self.assertEqual(option.env, None)
-         self.assertTrue(option.default)
- 
-         option = Option('--with-option')
--        self.assertEquals(option.prefix, 'with')
--        self.assertEquals(option.name, 'option')
--        self.assertEquals(option.env, None)
-+        self.assertEqual(option.prefix, 'with')
-+        self.assertEqual(option.name, 'option')
-+        self.assertEqual(option.env, None)
-         self.assertFalse(option.default)
- 
-         option = Option('--without-option')
--        self.assertEquals(option.prefix, 'without')
--        self.assertEquals(option.name, 'option')
--        self.assertEquals(option.env, None)
-+        self.assertEqual(option.prefix, 'without')
-+        self.assertEqual(option.name, 'option')
-+        self.assertEqual(option.env, None)
-         self.assertTrue(option.default)
- 
-         option = Option('--without-option-foo', env='MOZ_OPTION')
--        self.assertEquals(option.env, 'MOZ_OPTION')
-+        self.assertEqual(option.env, 'MOZ_OPTION')
- 
-         option = Option(env='MOZ_OPTION')
--        self.assertEquals(option.prefix, '')
--        self.assertEquals(option.name, None)
--        self.assertEquals(option.env, 'MOZ_OPTION')
-+        self.assertEqual(option.prefix, '')
-+        self.assertEqual(option.name, None)
-+        self.assertEqual(option.env, 'MOZ_OPTION')
-         self.assertFalse(option.default)
- 
-         with self.assertRaises(InvalidOptionError) as e:
-             Option('--option', nargs=0, default=('a',))
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "The given `default` doesn't satisfy `nargs`")
- 
-         with self.assertRaises(InvalidOptionError) as e:
-             Option('--option', nargs=1, default=())
--        self.assertEquals(
-+        self.assertEqual(
-             e.exception.message,
-             'default must be a bool, a string or a tuple of strings')
- 
-         with self.assertRaises(InvalidOptionError) as e:
-             Option('--option', nargs=1, default=True)
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "The given `default` doesn't satisfy `nargs`")
- 
-         with self.assertRaises(InvalidOptionError) as e:
-             Option('--option', nargs=1, default=('a', 'b'))
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "The given `default` doesn't satisfy `nargs`")
- 
-         with self.assertRaises(InvalidOptionError) as e:
-             Option('--option', nargs=2, default=())
--        self.assertEquals(
-+        self.assertEqual(
-             e.exception.message,
-             'default must be a bool, a string or a tuple of strings')
- 
-         with self.assertRaises(InvalidOptionError) as e:
-             Option('--option', nargs=2, default=True)
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "The given `default` doesn't satisfy `nargs`")
- 
-         with self.assertRaises(InvalidOptionError) as e:
-             Option('--option', nargs=2, default=('a',))
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "The given `default` doesn't satisfy `nargs`")
- 
-         with self.assertRaises(InvalidOptionError) as e:
-             Option('--option', nargs='?', default=('a', 'b'))
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "The given `default` doesn't satisfy `nargs`")
- 
-         with self.assertRaises(InvalidOptionError) as e:
-             Option('--option', nargs='+', default=())
--        self.assertEquals(
-+        self.assertEqual(
-             e.exception.message,
-             'default must be a bool, a string or a tuple of strings')
- 
-         with self.assertRaises(InvalidOptionError) as e:
-             Option('--option', nargs='+', default=True)
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "The given `default` doesn't satisfy `nargs`")
- 
-         # --disable options with a nargs value that requires at least one
-         # argument need to be given a default.
-         with self.assertRaises(InvalidOptionError) as e:
-             Option('--disable-option', nargs=1)
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "The given `default` doesn't satisfy `nargs`")
- 
-         with self.assertRaises(InvalidOptionError) as e:
-             Option('--disable-option', nargs='+')
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "The given `default` doesn't satisfy `nargs`")
- 
-         # Test nargs inference from default value
-         option = Option('--with-foo', default=True)
--        self.assertEquals(option.nargs, 0)
-+        self.assertEqual(option.nargs, 0)
- 
-         option = Option('--with-foo', default=False)
--        self.assertEquals(option.nargs, 0)
-+        self.assertEqual(option.nargs, 0)
- 
-         option = Option('--with-foo', default='a')
--        self.assertEquals(option.nargs, '?')
-+        self.assertEqual(option.nargs, '?')
- 
-         option = Option('--with-foo', default=('a',))
--        self.assertEquals(option.nargs, '?')
-+        self.assertEqual(option.nargs, '?')
- 
-         option = Option('--with-foo', default=('a', 'b'))
--        self.assertEquals(option.nargs, '*')
-+        self.assertEqual(option.nargs, '*')
- 
-         option = Option(env='FOO', default=True)
--        self.assertEquals(option.nargs, 0)
-+        self.assertEqual(option.nargs, 0)
- 
-         option = Option(env='FOO', default=False)
--        self.assertEquals(option.nargs, 0)
-+        self.assertEqual(option.nargs, 0)
- 
-         option = Option(env='FOO', default='a')
--        self.assertEquals(option.nargs, '?')
-+        self.assertEqual(option.nargs, '?')
- 
-         option = Option(env='FOO', default=('a',))
--        self.assertEquals(option.nargs, '?')
-+        self.assertEqual(option.nargs, '?')
- 
-         option = Option(env='FOO', default=('a', 'b'))
--        self.assertEquals(option.nargs, '*')
-+        self.assertEqual(option.nargs, '*')
- 
-     def test_option_option(self):
-         for option in (
-@@ -170,70 +170,70 @@ class TestOption(unittest.TestCase):
-             '--with-option',
-             '--without-option',
-         ):
--            self.assertEquals(Option(option).option, option)
--            self.assertEquals(Option(option, env='FOO').option, option)
-+            self.assertEqual(Option(option).option, option)
-+            self.assertEqual(Option(option, env='FOO').option, option)
- 
-             opt = Option(option, default=False)
--            self.assertEquals(opt.option,
-+            self.assertEqual(opt.option,
-                               option.replace('-disable-', '-enable-')
-                                     .replace('-without-', '-with-'))
- 
-             opt = Option(option, default=True)
--            self.assertEquals(opt.option,
-+            self.assertEqual(opt.option,
-                               option.replace('-enable-', '-disable-')
-                                     .replace('-with-', '-without-'))
- 
--        self.assertEquals(Option(env='FOO').option, 'FOO')
-+        self.assertEqual(Option(env='FOO').option, 'FOO')
- 
-     def test_option_choices(self):
-         with self.assertRaises(InvalidOptionError) as e:
-             Option('--option', nargs=3, choices=('a', 'b'))
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           'Not enough `choices` for `nargs`')
- 
-         with self.assertRaises(InvalidOptionError) as e:
-             Option('--without-option', nargs=1, choices=('a', 'b'))
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           'A `default` must be given along with `choices`')
- 
-         with self.assertRaises(InvalidOptionError) as e:
-             Option('--without-option', nargs='+', choices=('a', 'b'))
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           'A `default` must be given along with `choices`')
- 
-         with self.assertRaises(InvalidOptionError) as e:
-             Option('--without-option', default='c', choices=('a', 'b'))
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "The `default` value must be one of 'a', 'b'")
- 
-         with self.assertRaises(InvalidOptionError) as e:
-             Option('--without-option', default=('a', 'c',), choices=('a', 'b'))
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "The `default` value must be one of 'a', 'b'")
- 
-         with self.assertRaises(InvalidOptionError) as e:
-             Option('--without-option', default=('c',), choices=('a', 'b'))
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "The `default` value must be one of 'a', 'b'")
- 
-         option = Option('--with-option', nargs='+', choices=('a', 'b'))
-         with self.assertRaises(InvalidOptionError) as e:
-             option.get_value('--with-option=c')
--        self.assertEquals(e.exception.message, "'c' is not one of 'a', 'b'")
-+        self.assertEqual(e.exception.message, "'c' is not one of 'a', 'b'")
- 
-         value = option.get_value('--with-option=b,a')
-         self.assertTrue(value)
--        self.assertEquals(PositiveOptionValue(('b', 'a')), value)
-+        self.assertEqual(PositiveOptionValue(('b', 'a')), value)
- 
-         option = Option('--without-option', nargs='*', default='a',
-                         choices=('a', 'b'))
-         with self.assertRaises(InvalidOptionError) as e:
-             option.get_value('--with-option=c')
--        self.assertEquals(e.exception.message, "'c' is not one of 'a', 'b'")
-+        self.assertEqual(e.exception.message, "'c' is not one of 'a', 'b'")
- 
-         value = option.get_value('--with-option=b,a')
-         self.assertTrue(value)
--        self.assertEquals(PositiveOptionValue(('b', 'a')), value)
-+        self.assertEqual(PositiveOptionValue(('b', 'a')), value)
- 
-         # Test nargs inference from choices
-         option = Option('--with-option', choices=('a', 'b'))
-@@ -244,37 +244,37 @@ class TestOption(unittest.TestCase):
-                         choices=('a', 'b', 'c', 'd'))
- 
-         value = option.get_value('--with-option=+d')
--        self.assertEquals(PositiveOptionValue(('b', 'c', 'd')), value)
-+        self.assertEqual(PositiveOptionValue(('b', 'c', 'd')), value)
- 
-         value = option.get_value('--with-option=-b')
--        self.assertEquals(PositiveOptionValue(('c',)), value)
-+        self.assertEqual(PositiveOptionValue(('c',)), value)
- 
-         value = option.get_value('--with-option=-b,+d')
--        self.assertEquals(PositiveOptionValue(('c','d')), value)
-+        self.assertEqual(PositiveOptionValue(('c','d')), value)
- 
-         # Adding something that is in the default is fine
-         value = option.get_value('--with-option=+b')
--        self.assertEquals(PositiveOptionValue(('b', 'c')), value)
-+        self.assertEqual(PositiveOptionValue(('b', 'c')), value)
- 
-         # Removing something that is not in the default is fine, as long as it
-         # is one of the choices
-         value = option.get_value('--with-option=-a')
--        self.assertEquals(PositiveOptionValue(('b', 'c')), value)
-+        self.assertEqual(PositiveOptionValue(('b', 'c')), value)
- 
-         with self.assertRaises(InvalidOptionError) as e:
-             option.get_value('--with-option=-e')
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "'e' is not one of 'a', 'b', 'c', 'd'")
- 
-         # Other "not a choice" errors.
-         with self.assertRaises(InvalidOptionError) as e:
-             option.get_value('--with-option=+e')
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "'e' is not one of 'a', 'b', 'c', 'd'")
- 
-         with self.assertRaises(InvalidOptionError) as e:
-             option.get_value('--with-option=e')
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "'e' is not one of 'a', 'b', 'c', 'd'")
- 
-     def test_option_value_compare(self):
-@@ -294,7 +294,7 @@ class TestOption(unittest.TestCase):
- 
-         # For usability reasons, we raise TypeError when attempting to compare
-         # against a non-tuple.
--        with self.assertRaisesRegexp(TypeError, 'cannot compare a'):
-+        with self.assertRaisesRegex(TypeError, 'cannot compare a'):
-             val == 'foo'
- 
-         # But we allow empty option values to compare otherwise we can't
-@@ -313,36 +313,36 @@ class TestOption(unittest.TestCase):
- 
-     def test_option_value_format(self):
-         val = PositiveOptionValue()
--        self.assertEquals('--with-value', val.format('--with-value'))
--        self.assertEquals('--with-value', val.format('--without-value'))
--        self.assertEquals('--enable-value', val.format('--enable-value'))
--        self.assertEquals('--enable-value', val.format('--disable-value'))
--        self.assertEquals('--value', val.format('--value'))
--        self.assertEquals('VALUE=1', val.format('VALUE'))
-+        self.assertEqual('--with-value', val.format('--with-value'))
-+        self.assertEqual('--with-value', val.format('--without-value'))
-+        self.assertEqual('--enable-value', val.format('--enable-value'))
-+        self.assertEqual('--enable-value', val.format('--disable-value'))
-+        self.assertEqual('--value', val.format('--value'))
-+        self.assertEqual('VALUE=1', val.format('VALUE'))
- 
-         val = PositiveOptionValue(('a',))
--        self.assertEquals('--with-value=a', val.format('--with-value'))
--        self.assertEquals('--with-value=a', val.format('--without-value'))
--        self.assertEquals('--enable-value=a', val.format('--enable-value'))
--        self.assertEquals('--enable-value=a', val.format('--disable-value'))
--        self.assertEquals('--value=a', val.format('--value'))
--        self.assertEquals('VALUE=a', val.format('VALUE'))
-+        self.assertEqual('--with-value=a', val.format('--with-value'))
-+        self.assertEqual('--with-value=a', val.format('--without-value'))
-+        self.assertEqual('--enable-value=a', val.format('--enable-value'))
-+        self.assertEqual('--enable-value=a', val.format('--disable-value'))
-+        self.assertEqual('--value=a', val.format('--value'))
-+        self.assertEqual('VALUE=a', val.format('VALUE'))
- 
-         val = PositiveOptionValue(('a', 'b'))
--        self.assertEquals('--with-value=a,b', val.format('--with-value'))
--        self.assertEquals('--with-value=a,b', val.format('--without-value'))
--        self.assertEquals('--enable-value=a,b', val.format('--enable-value'))
--        self.assertEquals('--enable-value=a,b', val.format('--disable-value'))
--        self.assertEquals('--value=a,b', val.format('--value'))
--        self.assertEquals('VALUE=a,b', val.format('VALUE'))
-+        self.assertEqual('--with-value=a,b', val.format('--with-value'))
-+        self.assertEqual('--with-value=a,b', val.format('--without-value'))
-+        self.assertEqual('--enable-value=a,b', val.format('--enable-value'))
-+        self.assertEqual('--enable-value=a,b', val.format('--disable-value'))
-+        self.assertEqual('--value=a,b', val.format('--value'))
-+        self.assertEqual('VALUE=a,b', val.format('VALUE'))
- 
-         val = NegativeOptionValue()
--        self.assertEquals('--without-value', val.format('--with-value'))
--        self.assertEquals('--without-value', val.format('--without-value'))
--        self.assertEquals('--disable-value', val.format('--enable-value'))
--        self.assertEquals('--disable-value', val.format('--disable-value'))
--        self.assertEquals('', val.format('--value'))
--        self.assertEquals('VALUE=', val.format('VALUE'))
-+        self.assertEqual('--without-value', val.format('--with-value'))
-+        self.assertEqual('--without-value', val.format('--without-value'))
-+        self.assertEqual('--disable-value', val.format('--enable-value'))
-+        self.assertEqual('--disable-value', val.format('--disable-value'))
-+        self.assertEqual('', val.format('--value'))
-+        self.assertEqual('VALUE=', val.format('VALUE'))
- 
-     def test_option_value(self, name='option', nargs=0, default=None):
-         disabled = name.startswith(('disable-', 'without-'))
-@@ -359,28 +359,28 @@ class TestOption(unittest.TestCase):
- 
-         if nargs in (0, '?', '*') or disabled:
-             value = option.get_value('--%s' % name, 'option')
--            self.assertEquals(value, posOptionValue())
--            self.assertEquals(value.origin, 'option')
-+            self.assertEqual(value, posOptionValue())
-+            self.assertEqual(value.origin, 'option')
-         else:
-             with self.assertRaises(InvalidOptionError) as e:
-                 option.get_value('--%s' % name)
-             if nargs == 1:
--                self.assertEquals(e.exception.message,
-+                self.assertEqual(e.exception.message,
-                                   '--%s takes 1 value' % name)
-             elif nargs == '+':
--                self.assertEquals(e.exception.message,
-+                self.assertEqual(e.exception.message,
-                                   '--%s takes 1 or more values' % name)
-             else:
--                self.assertEquals(e.exception.message,
-+                self.assertEqual(e.exception.message,
-                                   '--%s takes 2 values' % name)
- 
-         value = option.get_value('')
--        self.assertEquals(value, defaultValue)
--        self.assertEquals(value.origin, 'default')
-+        self.assertEqual(value, defaultValue)
-+        self.assertEqual(value.origin, 'default')
- 
-         value = option.get_value(None)
--        self.assertEquals(value, defaultValue)
--        self.assertEquals(value.origin, 'default')
-+        self.assertEqual(value, defaultValue)
-+        self.assertEqual(value.origin, 'default')
- 
-         with self.assertRaises(AssertionError):
-             value = option.get_value('MOZ_OPTION=', 'environment')
-@@ -393,47 +393,47 @@ class TestOption(unittest.TestCase):
- 
-         if nargs in (1, '?', '*', '+') and not disabled:
-             value = option.get_value('--%s=' % name, 'option')
--            self.assertEquals(value, PositiveOptionValue(('',)))
--            self.assertEquals(value.origin, 'option')
-+            self.assertEqual(value, PositiveOptionValue(('',)))
-+            self.assertEqual(value.origin, 'option')
-         else:
-             with self.assertRaises(InvalidOptionError) as e:
-                 option.get_value('--%s=' % name)
-             if disabled:
--                self.assertEquals(e.exception.message,
-+                self.assertEqual(e.exception.message,
-                                   'Cannot pass a value to --%s' % name)
-             else:
--                self.assertEquals(e.exception.message,
-+                self.assertEqual(e.exception.message,
-                                   '--%s takes %d values' % (name, nargs))
- 
-         if nargs in (1, '?', '*', '+') and not disabled:
-             value = option.get_value('--%s=foo' % name, 'option')
--            self.assertEquals(value, PositiveOptionValue(('foo',)))
--            self.assertEquals(value.origin, 'option')
-+            self.assertEqual(value, PositiveOptionValue(('foo',)))
-+            self.assertEqual(value.origin, 'option')
-         else:
-             with self.assertRaises(InvalidOptionError) as e:
-                 option.get_value('--%s=foo' % name)
-             if disabled:
--                self.assertEquals(e.exception.message,
-+                self.assertEqual(e.exception.message,
-                                   'Cannot pass a value to --%s' % name)
-             else:
--                self.assertEquals(e.exception.message,
-+                self.assertEqual(e.exception.message,
-                                   '--%s takes %d values' % (name, nargs))
- 
-         if nargs in (2, '*', '+') and not disabled:
-             value = option.get_value('--%s=foo,bar' % name, 'option')
--            self.assertEquals(value, PositiveOptionValue(('foo', 'bar')))
--            self.assertEquals(value.origin, 'option')
-+            self.assertEqual(value, PositiveOptionValue(('foo', 'bar')))
-+            self.assertEqual(value.origin, 'option')
-         else:
-             with self.assertRaises(InvalidOptionError) as e:
-                 option.get_value('--%s=foo,bar' % name, 'option')
-             if disabled:
--                self.assertEquals(e.exception.message,
-+                self.assertEqual(e.exception.message,
-                                   'Cannot pass a value to --%s' % name)
-             elif nargs == '?':
--                self.assertEquals(e.exception.message,
-+                self.assertEqual(e.exception.message,
-                                   '--%s takes 0 or 1 values' % name)
-             else:
--                self.assertEquals(e.exception.message,
-+                self.assertEqual(e.exception.message,
-                                   '--%s takes %d value%s'
-                                   % (name, nargs, 's' if nargs != 1 else ''))
- 
-@@ -441,59 +441,59 @@ class TestOption(unittest.TestCase):
-                         default=default)
-         if nargs in (0, '?', '*') or disabled:
-             value = option.get_value('--%s' % name, 'option')
--            self.assertEquals(value, posOptionValue())
--            self.assertEquals(value.origin, 'option')
-+            self.assertEqual(value, posOptionValue())
-+            self.assertEqual(value.origin, 'option')
-         else:
-             with self.assertRaises(InvalidOptionError) as e:
-                 option.get_value('--%s' % name)
-             if disabled:
--                self.assertEquals(e.exception.message,
-+                self.assertEqual(e.exception.message,
-                                   'Cannot pass a value to --%s' % name)
-             elif nargs == '+':
--                self.assertEquals(e.exception.message,
-+                self.assertEqual(e.exception.message,
-                                   '--%s takes 1 or more values' % name)
-             else:
--                self.assertEquals(e.exception.message,
-+                self.assertEqual(e.exception.message,
-                                   '--%s takes %d value%s'
-                                   % (name, nargs, 's' if nargs != 1 else ''))
- 
-         value = option.get_value('')
--        self.assertEquals(value, defaultValue)
--        self.assertEquals(value.origin, 'default')
-+        self.assertEqual(value, defaultValue)
-+        self.assertEqual(value.origin, 'default')
- 
-         value = option.get_value(None)
--        self.assertEquals(value, defaultValue)
--        self.assertEquals(value.origin, 'default')
-+        self.assertEqual(value, defaultValue)
-+        self.assertEqual(value.origin, 'default')
- 
-         value = option.get_value('MOZ_OPTION=', 'environment')
--        self.assertEquals(value, NegativeOptionValue())
--        self.assertEquals(value.origin, 'environment')
-+        self.assertEqual(value, NegativeOptionValue())
-+        self.assertEqual(value.origin, 'environment')
- 
-         if nargs in (0, '?', '*'):
-             value = option.get_value('MOZ_OPTION=1', 'environment')
--            self.assertEquals(value, PositiveOptionValue())
--            self.assertEquals(value.origin, 'environment')
-+            self.assertEqual(value, PositiveOptionValue())
-+            self.assertEqual(value.origin, 'environment')
-         elif nargs in (1, '+'):
-             value = option.get_value('MOZ_OPTION=1', 'environment')
--            self.assertEquals(value, PositiveOptionValue(('1',)))
--            self.assertEquals(value.origin, 'environment')
-+            self.assertEqual(value, PositiveOptionValue(('1',)))
-+            self.assertEqual(value.origin, 'environment')
-         else:
-             with self.assertRaises(InvalidOptionError) as e:
-                 option.get_value('MOZ_OPTION=1', 'environment')
--            self.assertEquals(e.exception.message, 'MOZ_OPTION takes 2 values')
-+            self.assertEqual(e.exception.message, 'MOZ_OPTION takes 2 values')
- 
-         if nargs in (1, '?', '*', '+') and not disabled:
-             value = option.get_value('--%s=' % name, 'option')
--            self.assertEquals(value, PositiveOptionValue(('',)))
--            self.assertEquals(value.origin, 'option')
-+            self.assertEqual(value, PositiveOptionValue(('',)))
-+            self.assertEqual(value.origin, 'option')
-         else:
-             with self.assertRaises(InvalidOptionError) as e:
-                 option.get_value('--%s=' % name, 'option')
-             if disabled:
--                self.assertEquals(e.exception.message,
-+                self.assertEqual(e.exception.message,
-                                   'Cannot pass a value to --%s' % name)
-             else:
--                self.assertEquals(e.exception.message,
-+                self.assertEqual(e.exception.message,
-                                   '--%s takes %d values' % (name, nargs))
- 
-         with self.assertRaises(AssertionError):
-@@ -501,26 +501,26 @@ class TestOption(unittest.TestCase):
- 
-         if nargs in (1, '?', '*', '+'):
-             value = option.get_value('MOZ_OPTION=foo', 'environment')
--            self.assertEquals(value, PositiveOptionValue(('foo',)))
--            self.assertEquals(value.origin, 'environment')
-+            self.assertEqual(value, PositiveOptionValue(('foo',)))
-+            self.assertEqual(value.origin, 'environment')
-         else:
-             with self.assertRaises(InvalidOptionError) as e:
-                 option.get_value('MOZ_OPTION=foo', 'environment')
--            self.assertEquals(e.exception.message,
-+            self.assertEqual(e.exception.message,
-                               'MOZ_OPTION takes %d values' % nargs)
- 
-         if nargs in (2, '*', '+'):
-             value = option.get_value('MOZ_OPTION=foo,bar', 'environment')
--            self.assertEquals(value, PositiveOptionValue(('foo', 'bar')))
--            self.assertEquals(value.origin, 'environment')
-+            self.assertEqual(value, PositiveOptionValue(('foo', 'bar')))
-+            self.assertEqual(value.origin, 'environment')
-         else:
-             with self.assertRaises(InvalidOptionError) as e:
-                 option.get_value('MOZ_OPTION=foo,bar', 'environment')
-             if nargs == '?':
--                self.assertEquals(e.exception.message,
-+                self.assertEqual(e.exception.message,
-                                   'MOZ_OPTION takes 0 or 1 values')
-             else:
--                self.assertEquals(e.exception.message,
-+                self.assertEqual(e.exception.message,
-                                   'MOZ_OPTION takes %d value%s'
-                                   % (nargs, 's' if nargs != 1 else ''))
- 
-@@ -532,26 +532,26 @@ class TestOption(unittest.TestCase):
-             env_option.get_value('--%s' % name)
- 
-         value = env_option.get_value('')
--        self.assertEquals(value, defaultValue)
--        self.assertEquals(value.origin, 'default')
-+        self.assertEqual(value, defaultValue)
-+        self.assertEqual(value.origin, 'default')
- 
-         value = env_option.get_value('MOZ_OPTION=', 'environment')
--        self.assertEquals(value, negOptionValue())
--        self.assertEquals(value.origin, 'environment')
-+        self.assertEqual(value, negOptionValue())
-+        self.assertEqual(value.origin, 'environment')
- 
-         if nargs in (0, '?', '*'):
-             value = env_option.get_value('MOZ_OPTION=1', 'environment')
--            self.assertEquals(value, posOptionValue())
-+            self.assertEqual(value, posOptionValue())
-             self.assertTrue(value)
--            self.assertEquals(value.origin, 'environment')
-+            self.assertEqual(value.origin, 'environment')
-         elif nargs in (1, '+'):
-             value = env_option.get_value('MOZ_OPTION=1', 'environment')
--            self.assertEquals(value, PositiveOptionValue(('1',)))
--            self.assertEquals(value.origin, 'environment')
-+            self.assertEqual(value, PositiveOptionValue(('1',)))
-+            self.assertEqual(value.origin, 'environment')
-         else:
-             with self.assertRaises(InvalidOptionError) as e:
-                 env_option.get_value('MOZ_OPTION=1', 'environment')
--            self.assertEquals(e.exception.message, 'MOZ_OPTION takes 2 values')
-+            self.assertEqual(e.exception.message, 'MOZ_OPTION takes 2 values')
- 
-         with self.assertRaises(AssertionError) as e:
-             env_option.get_value('--%s' % name)
-@@ -561,26 +561,26 @@ class TestOption(unittest.TestCase):
- 
-         if nargs in (1, '?', '*', '+'):
-             value = env_option.get_value('MOZ_OPTION=foo', 'environment')
--            self.assertEquals(value, PositiveOptionValue(('foo',)))
--            self.assertEquals(value.origin, 'environment')
-+            self.assertEqual(value, PositiveOptionValue(('foo',)))
-+            self.assertEqual(value.origin, 'environment')
-         else:
-             with self.assertRaises(InvalidOptionError) as e:
-                 env_option.get_value('MOZ_OPTION=foo', 'environment')
--            self.assertEquals(e.exception.message,
-+            self.assertEqual(e.exception.message,
-                               'MOZ_OPTION takes %d values' % nargs)
- 
-         if nargs in (2, '*', '+'):
-             value = env_option.get_value('MOZ_OPTION=foo,bar', 'environment')
--            self.assertEquals(value, PositiveOptionValue(('foo', 'bar')))
--            self.assertEquals(value.origin, 'environment')
-+            self.assertEqual(value, PositiveOptionValue(('foo', 'bar')))
-+            self.assertEqual(value.origin, 'environment')
-         else:
-             with self.assertRaises(InvalidOptionError) as e:
-                 env_option.get_value('MOZ_OPTION=foo,bar', 'environment')
-             if nargs == '?':
--                self.assertEquals(e.exception.message,
-+                self.assertEqual(e.exception.message,
-                                   'MOZ_OPTION takes 0 or 1 values')
-             else:
--                self.assertEquals(e.exception.message,
-+                self.assertEqual(e.exception.message,
-                                   'MOZ_OPTION takes %d value%s'
-                                   % (nargs, 's' if nargs != 1 else ''))
- 
-@@ -592,28 +592,28 @@ class TestOption(unittest.TestCase):
-                                         default=default)
- 
-         value = option.get_value('--%s-option' % disable, 'option')
--        self.assertEquals(value, NegativeOptionValue())
--        self.assertEquals(value.origin, 'option')
-+        self.assertEqual(value, NegativeOptionValue())
-+        self.assertEqual(value.origin, 'option')
- 
-         option = self.test_option_value('%s-option' % disable, nargs=nargs,
-                                         default=default)
- 
-         if nargs in (0, '?', '*'):
-             value = option.get_value('--%s-option' % enable, 'option')
--            self.assertEquals(value, PositiveOptionValue())
--            self.assertEquals(value.origin, 'option')
-+            self.assertEqual(value, PositiveOptionValue())
-+            self.assertEqual(value.origin, 'option')
-         else:
-             with self.assertRaises(InvalidOptionError) as e:
-                 option.get_value('--%s-option' % enable, 'option')
-             if nargs == 1:
--                self.assertEquals(e.exception.message,
-+                self.assertEqual(e.exception.message,
-                                   '--%s-option takes 1 value' % enable)
-             elif nargs == '+':
--                self.assertEquals(e.exception.message,
-+                self.assertEqual(e.exception.message,
-                                   '--%s-option takes 1 or more values'
-                                   % enable)
-             else:
--                self.assertEquals(e.exception.message,
-+                self.assertEqual(e.exception.message,
-                                   '--%s-option takes 2 values' % enable)
- 
-     def test_option_value_with(self):
-@@ -622,12 +622,12 @@ class TestOption(unittest.TestCase):
-     def test_option_value_invalid_nargs(self):
-         with self.assertRaises(InvalidOptionError) as e:
-             Option('--option', nargs='foo')
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "nargs must be a positive integer, '?', '*' or '+'")
- 
-         with self.assertRaises(InvalidOptionError) as e:
-             Option('--option', nargs=-2)
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "nargs must be a positive integer, '?', '*' or '+'")
- 
-     def test_option_value_nargs_1(self):
-@@ -638,7 +638,7 @@ class TestOption(unittest.TestCase):
-         # A default is required
-         with self.assertRaises(InvalidOptionError) as e:
-             Option('--disable-option', nargs=1)
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "The given `default` doesn't satisfy `nargs`")
- 
-     def test_option_value_nargs_2(self):
-@@ -649,7 +649,7 @@ class TestOption(unittest.TestCase):
-         # A default is required
-         with self.assertRaises(InvalidOptionError) as e:
-             Option('--disable-option', nargs=2)
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "The given `default` doesn't satisfy `nargs`")
- 
-     def test_option_value_nargs_0_or_1(self):
-@@ -676,7 +676,7 @@ class TestOption(unittest.TestCase):
-         # A default is required
-         with self.assertRaises(InvalidOptionError) as e:
-             Option('--disable-option', nargs='+')
--        self.assertEquals(e.exception.message,
-+        self.assertEqual(e.exception.message,
-                           "The given `default` doesn't satisfy `nargs`")
- 
- 
-@@ -684,21 +684,21 @@ class TestCommandLineHelper(unittest.TestCase):
-     def test_basic(self):
-         helper = CommandLineHelper({}, ['cmd', '--foo', '--bar'])
- 
--        self.assertEquals(['--foo', '--bar'], list(helper))
-+        self.assertEqual(['--foo', '--bar'], list(helper))
- 
-         helper.add('--enable-qux')
- 
--        self.assertEquals(['--foo', '--bar', '--enable-qux'], list(helper))
-+        self.assertEqual(['--foo', '--bar', '--enable-qux'], list(helper))
- 
-         value, option = helper.handle(Option('--bar'))
--        self.assertEquals(['--foo', '--enable-qux'], list(helper))
--        self.assertEquals(PositiveOptionValue(), value)
--        self.assertEquals('--bar', option)
-+        self.assertEqual(['--foo', '--enable-qux'], list(helper))
-+        self.assertEqual(PositiveOptionValue(), value)
-+        self.assertEqual('--bar', option)
- 
-         value, option = helper.handle(Option('--baz'))
--        self.assertEquals(['--foo', '--enable-qux'], list(helper))
--        self.assertEquals(NegativeOptionValue(), value)
--        self.assertEquals(None, option)
-+        self.assertEqual(['--foo', '--enable-qux'], list(helper))
-+        self.assertEqual(NegativeOptionValue(), value)
-+        self.assertEqual(None, option)
- 
-         with self.assertRaises(AssertionError):
-             CommandLineHelper({}, ['--foo', '--bar'])
-@@ -707,89 +707,89 @@ class TestCommandLineHelper(unittest.TestCase):
-         foo = Option('--with-foo', nargs='*')
-         helper = CommandLineHelper({}, ['cmd', '--with-foo=a,b'])
-         value, option = helper.handle(foo)
--        self.assertEquals(PositiveOptionValue(('a', 'b')), value)
--        self.assertEquals('command-line', value.origin)
--        self.assertEquals('--with-foo=a,b', option)
-+        self.assertEqual(PositiveOptionValue(('a', 'b')), value)
-+        self.assertEqual('command-line', value.origin)
-+        self.assertEqual('--with-foo=a,b', option)
- 
-         helper = CommandLineHelper({}, ['cmd', '--with-foo=a,b',
-                                         '--without-foo'])
-         value, option = helper.handle(foo)
--        self.assertEquals(NegativeOptionValue(), value)
--        self.assertEquals('command-line', value.origin)
--        self.assertEquals('--without-foo', option)
-+        self.assertEqual(NegativeOptionValue(), value)
-+        self.assertEqual('command-line', value.origin)
-+        self.assertEqual('--without-foo', option)
- 
-         helper = CommandLineHelper({}, ['cmd', '--without-foo',
-                                         '--with-foo=a,b'])
-         value, option = helper.handle(foo)
--        self.assertEquals(PositiveOptionValue(('a', 'b')), value)
--        self.assertEquals('command-line', value.origin)
--        self.assertEquals('--with-foo=a,b', option)
-+        self.assertEqual(PositiveOptionValue(('a', 'b')), value)
-+        self.assertEqual('command-line', value.origin)
-+        self.assertEqual('--with-foo=a,b', option)
- 
-         foo = Option('--with-foo', env='FOO', nargs='*')
-         helper = CommandLineHelper({'FOO': ''}, ['cmd', '--with-foo=a,b'])
-         value, option = helper.handle(foo)
--        self.assertEquals(PositiveOptionValue(('a', 'b')), value)
--        self.assertEquals('command-line', value.origin)
--        self.assertEquals('--with-foo=a,b', option)
-+        self.assertEqual(PositiveOptionValue(('a', 'b')), value)
-+        self.assertEqual('command-line', value.origin)
-+        self.assertEqual('--with-foo=a,b', option)
- 
-         helper = CommandLineHelper({'FOO': 'a,b'}, ['cmd', '--without-foo'])
-         value, option = helper.handle(foo)
--        self.assertEquals(NegativeOptionValue(), value)
--        self.assertEquals('command-line', value.origin)
--        self.assertEquals('--without-foo', option)
-+        self.assertEqual(NegativeOptionValue(), value)
-+        self.assertEqual('command-line', value.origin)
-+        self.assertEqual('--without-foo', option)
- 
-         helper = CommandLineHelper({'FOO': ''}, ['cmd', '--with-bar=a,b'])
-         value, option = helper.handle(foo)
--        self.assertEquals(NegativeOptionValue(), value)
--        self.assertEquals('environment', value.origin)
--        self.assertEquals('FOO=', option)
-+        self.assertEqual(NegativeOptionValue(), value)
-+        self.assertEqual('environment', value.origin)
-+        self.assertEqual('FOO=', option)
- 
-         helper = CommandLineHelper({'FOO': 'a,b'}, ['cmd', '--without-bar'])
-         value, option = helper.handle(foo)
--        self.assertEquals(PositiveOptionValue(('a', 'b')), value)
--        self.assertEquals('environment', value.origin)
--        self.assertEquals('FOO=a,b', option)
-+        self.assertEqual(PositiveOptionValue(('a', 'b')), value)
-+        self.assertEqual('environment', value.origin)
-+        self.assertEqual('FOO=a,b', option)
- 
-         helper = CommandLineHelper({}, ['cmd', '--with-foo=a,b', 'FOO='])
-         value, option = helper.handle(foo)
--        self.assertEquals(NegativeOptionValue(), value)
--        self.assertEquals('command-line', value.origin)
--        self.assertEquals('FOO=', option)
-+        self.assertEqual(NegativeOptionValue(), value)
-+        self.assertEqual('command-line', value.origin)
-+        self.assertEqual('FOO=', option)
- 
-         helper = CommandLineHelper({}, ['cmd', '--without-foo', 'FOO=a,b'])
-         value, option = helper.handle(foo)
--        self.assertEquals(PositiveOptionValue(('a', 'b')), value)
--        self.assertEquals('command-line', value.origin)
--        self.assertEquals('FOO=a,b', option)
-+        self.assertEqual(PositiveOptionValue(('a', 'b')), value)
-+        self.assertEqual('command-line', value.origin)
-+        self.assertEqual('FOO=a,b', option)
- 
-         helper = CommandLineHelper({}, ['cmd', 'FOO=', '--with-foo=a,b'])
-         value, option = helper.handle(foo)
--        self.assertEquals(PositiveOptionValue(('a', 'b')), value)
--        self.assertEquals('command-line', value.origin)
--        self.assertEquals('--with-foo=a,b', option)
-+        self.assertEqual(PositiveOptionValue(('a', 'b')), value)
-+        self.assertEqual('command-line', value.origin)
-+        self.assertEqual('--with-foo=a,b', option)
- 
-         helper = CommandLineHelper({}, ['cmd', 'FOO=a,b', '--without-foo'])
-         value, option = helper.handle(foo)
--        self.assertEquals(NegativeOptionValue(), value)
--        self.assertEquals('command-line', value.origin)
--        self.assertEquals('--without-foo', option)
-+        self.assertEqual(NegativeOptionValue(), value)
-+        self.assertEqual('command-line', value.origin)
-+        self.assertEqual('--without-foo', option)
- 
-     def test_extra_args(self):
-         foo = Option('--with-foo', env='FOO', nargs='*')
-         helper = CommandLineHelper({}, ['cmd'])
-         helper.add('FOO=a,b,c', 'other-origin')
-         value, option = helper.handle(foo)
--        self.assertEquals(PositiveOptionValue(('a', 'b', 'c')), value)
--        self.assertEquals('other-origin', value.origin)
--        self.assertEquals('FOO=a,b,c', option)
-+        self.assertEqual(PositiveOptionValue(('a', 'b', 'c')), value)
-+        self.assertEqual('other-origin', value.origin)
-+        self.assertEqual('FOO=a,b,c', option)
- 
-         helper = CommandLineHelper({}, ['cmd'])
-         helper.add('FOO=a,b,c', 'other-origin')
-         helper.add('--with-foo=a,b,c', 'other-origin')
-         value, option = helper.handle(foo)
--        self.assertEquals(PositiveOptionValue(('a', 'b', 'c')), value)
--        self.assertEquals('other-origin', value.origin)
--        self.assertEquals('--with-foo=a,b,c', option)
-+        self.assertEqual(PositiveOptionValue(('a', 'b', 'c')), value)
-+        self.assertEqual('other-origin', value.origin)
-+        self.assertEqual('--with-foo=a,b,c', option)
- 
-         # Adding conflicting options is not allowed.
-         helper = CommandLineHelper({}, ['cmd'])
-@@ -809,9 +809,9 @@ class TestCommandLineHelper(unittest.TestCase):
-         # But adding the same is allowed.
-         helper.add('FOO=a,b,c', 'other-origin')
-         value, option = helper.handle(foo)
--        self.assertEquals(PositiveOptionValue(('a', 'b', 'c')), value)
--        self.assertEquals('other-origin', value.origin)
--        self.assertEquals('FOO=a,b,c', option)
-+        self.assertEqual(PositiveOptionValue(('a', 'b', 'c')), value)
-+        self.assertEqual('other-origin', value.origin)
-+        self.assertEqual('FOO=a,b,c', option)
- 
-         # The same rule as above applies when using the option form vs. the
-         # variable form. But we can't detect it when .add is called.
-@@ -837,9 +837,9 @@ class TestCommandLineHelper(unittest.TestCase):
-         helper.add('FOO=a,b,c', 'other-origin')
-         helper.add('--with-foo=a,b,c', 'other-origin')
-         value, option = helper.handle(foo)
--        self.assertEquals(PositiveOptionValue(('a', 'b', 'c')), value)
--        self.assertEquals('other-origin', value.origin)
--        self.assertEquals('--with-foo=a,b,c', option)
-+        self.assertEqual(PositiveOptionValue(('a', 'b', 'c')), value)
-+        self.assertEqual('other-origin', value.origin)
-+        self.assertEqual('--with-foo=a,b,c', option)
- 
-         # Conflicts are also not allowed against what is in the
-         # environment/on the command line.
-@@ -869,19 +869,19 @@ class TestCommandLineHelper(unittest.TestCase):
-         foo = Option('--foo',
-                      possible_origins=('command-line',))
-         value, option = helper.handle(foo)
--        self.assertEquals(PositiveOptionValue(), value)
--        self.assertEquals('command-line', value.origin)
--        self.assertEquals('--foo', option)
-+        self.assertEqual(PositiveOptionValue(), value)
-+        self.assertEqual('command-line', value.origin)
-+        self.assertEqual('--foo', option)
- 
-         bar = Option('--bar',
-                      possible_origins=('mozconfig',))
--        with self.assertRaisesRegexp(InvalidOptionError,
-+        with self.assertRaisesRegex(InvalidOptionError,
-             "--bar can not be set by command-line. Values are accepted from: mozconfig"):
-             helper.handle(bar)
- 
-         baz = Option(env='BAZ',
-                      possible_origins=('implied',))
--        with self.assertRaisesRegexp(InvalidOptionError,
-+        with self.assertRaisesRegex(InvalidOptionError,
-             "BAZ=1 can not be set by environment. Values are accepted from: implied"):
-             helper.handle(baz)
- 
-diff --git a/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py b/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
-index cb7ff709e..c339a32bf 100755
---- a/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
-+++ b/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
-@@ -2,12 +2,12 @@
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
- 
--from __future__ import absolute_import, print_function, unicode_literals
-+
- 
- import logging
- import os
- 
--from StringIO import StringIO
-+from io import StringIO
- 
- from mozunit import main
- 
-@@ -366,9 +366,9 @@ class BaseToolchainTest(BaseConfigureTest):
-                 compiler = sandbox._value_for(sandbox[var])
-                 # Add var on both ends to make it clear which of the
-                 # variables is failing the test when that happens.
--                self.assertEquals((var, compiler), (var, result))
-+                self.assertEqual((var, compiler), (var, result))
-             except SystemExit:
--                self.assertEquals((var, result),
-+                self.assertEqual((var, result),
-                                   (var, self.out.getvalue().strip()))
-                 return
- 
-@@ -407,7 +407,7 @@ class BaseToolchainTest(BaseConfigureTest):
-             'RUST_LIB_SUFFIX',
-             'OBJ_SUFFIX',
-         ):
--            self.assertEquals('%s=%s' % (k, sandbox.get_config(k)),
-+            self.assertEqual('%s=%s' % (k, sandbox.get_config(k)),
-                               '%s=%s' % (k, library_name_info[k]))
- 
- 
-@@ -584,7 +584,7 @@ class LinuxToolchainTest(BaseToolchainTest):
-         # We'll try gcc and clang, but since there is no gcc (gcc-x.y doesn't
-         # count), find clang.
-         paths = {
--            k: v for k, v in self.PATHS.iteritems()
-+            k: v for k, v in self.PATHS.items()
-             if os.path.basename(k) not in ('gcc', 'g++')
-         }
-         self.do_toolchain_test(paths, {
-@@ -619,7 +619,7 @@ class LinuxToolchainTest(BaseToolchainTest):
-         # Even if there are gcc-x.y or clang-x.y compilers available, we
-         # don't try them. This could be considered something to improve.
-         paths = {
--            k: v for k, v in self.PATHS.iteritems()
-+            k: v for k, v in self.PATHS.items()
-             if os.path.basename(k) not in ('gcc', 'g++', 'clang', 'clang++')
-         }
-         self.do_toolchain_test(paths, {
-@@ -800,7 +800,7 @@ class OSXToolchainTest(BaseToolchainTest):
-     def test_not_gcc(self):
-         # We won't pick GCC if it's the only thing available.
-         paths = {
--            k: v for k, v in self.PATHS.iteritems()
-+            k: v for k, v in self.PATHS.items()
-             if os.path.basename(k) not in ('clang', 'clang++')
-         }
-         self.do_toolchain_test(paths, {
-@@ -976,7 +976,7 @@ class WindowsToolchainTest(BaseToolchainTest):
-     def test_clang_cl(self):
-         # We'll pick clang-cl if msvc can't be found.
-         paths = {
--            k: v for k, v in self.PATHS.iteritems()
-+            k: v for k, v in self.PATHS.items()
-             if os.path.basename(k) != 'cl'
-         }
-         self.do_toolchain_test(paths, {
-@@ -987,7 +987,7 @@ class WindowsToolchainTest(BaseToolchainTest):
-     def test_gcc(self):
-         # We'll pick GCC if msvc and clang-cl can't be found.
-         paths = {
--            k: v for k, v in self.PATHS.iteritems()
-+            k: v for k, v in self.PATHS.items()
-             if os.path.basename(k) not in ('cl', 'clang-cl')
-         }
-         self.do_toolchain_test(paths, {
-@@ -1006,7 +1006,7 @@ class WindowsToolchainTest(BaseToolchainTest):
-     def test_clang(self):
-         # We'll pick clang if nothing else is found.
-         paths = {
--            k: v for k, v in self.PATHS.iteritems()
-+            k: v for k, v in self.PATHS.items()
-             if os.path.basename(k) not in ('cl', 'clang-cl', 'gcc')
-         }
-         self.do_toolchain_test(paths, {
-diff --git a/python/mozbuild/mozbuild/test/configure/test_toolchain_helpers.py b/python/mozbuild/mozbuild/test/configure/test_toolchain_helpers.py
-index 8ec33a8b7..ba046ed12 100644
---- a/python/mozbuild/mozbuild/test/configure/test_toolchain_helpers.py
-+++ b/python/mozbuild/mozbuild/test/configure/test_toolchain_helpers.py
-@@ -2,7 +2,7 @@
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
- 
--from __future__ import absolute_import, print_function, unicode_literals
-+
- 
- import copy
- import re
-@@ -10,7 +10,7 @@ import types
- import unittest
- 
- from fnmatch import fnmatch
--from StringIO import StringIO
-+from io import StringIO
- from textwrap import dedent
- 
- from mozunit import (
-@@ -43,7 +43,7 @@ class CompilerPreprocessor(Preprocessor):
-         # Hack around it enough that the configure tests work properly.
-         context = self.context
-         def normalize_numbers(value):
--            if isinstance(value, types.StringTypes):
-+            if isinstance(value, (str,)):
-                 if value[-1:] == 'L' and value[:-1].isdigit():
-                     value = int(value[:-1])
-             return value
-@@ -53,7 +53,7 @@ class CompilerPreprocessor(Preprocessor):
-             return self.HAS_FEATURE.sub(r'\1\2', expr)
-         self.context = self.Context(
-             (normalize_has_feature(k), normalize_numbers(v))
--            for k, v in context.iteritems()
-+            for k, v in context.items()
-         )
-         try:
-             return Preprocessor.do_if(self, normalize_has_feature(expression),
-@@ -95,7 +95,7 @@ class TestCompilerPreprocessor(unittest.TestCase):
-         input.name = 'foo'
-         pp.do_include(input)
- 
--        self.assertEquals(pp.out.getvalue(), '1 . 2 . c "D"')
-+        self.assertEqual(pp.out.getvalue(), '1 . 2 . c "D"')
- 
-     def test_condition(self):
-         pp = CompilerPreprocessor({
-@@ -125,7 +125,7 @@ class TestCompilerPreprocessor(unittest.TestCase):
-         input.name = 'foo'
-         pp.do_include(input)
- 
--        self.assertEquals('IFDEF_A\nIF_A\nIF_B\nIF_NOT_C\n', pp.out.getvalue())
-+        self.assertEqual('IFDEF_A\nIF_A\nIF_B\nIF_NOT_C\n', pp.out.getvalue())
- 
- 
- class FakeCompiler(dict):
-@@ -164,9 +164,9 @@ class FakeCompiler(dict):
-     '''
-     def __init__(self, *definitions):
-         for definition in definitions:
--            if all(not isinstance(d, dict) for d in definition.itervalues()):
-+            if all(not isinstance(d, dict) for d in definition.values()):
-                 definition = {None: definition}
--            for key, value in definition.iteritems():
-+            for key, value in definition.items():
-                 self.setdefault(key, {}).update(value)
- 
-     def __call__(self, stdin, args):
-@@ -178,14 +178,14 @@ class FakeCompiler(dict):
-             pp = CompilerPreprocessor(self[None])
- 
-             def apply_defn(defn):
--                for k, v in defn.iteritems():
-+                for k, v in defn.items():
-                     if v is False:
-                         if k in pp.context:
-                             del pp.context[k]
-                     else:
-                         pp.context[k] = v
- 
--            for glob, defn in self.iteritems():
-+            for glob, defn in self.items():
-                 if glob and not glob.startswith('-') and fnmatch(file, glob):
-                     apply_defn(defn)
- 
-@@ -216,7 +216,7 @@ class TestFakeCompiler(unittest.TestCase):
-                 'A': '1',
-                 'B': '2',
-             })
--            self.assertEquals(compiler(None, ['-E', 'file']),
-+            self.assertEqual(compiler(None, ['-E', 'file']),
-                               (0, '1 2 C', ''))
- 
-             compiler = FakeCompiler({
-@@ -238,25 +238,25 @@ class TestFakeCompiler(unittest.TestCase):
-                     'B': '42',
-                 },
-             })
--            self.assertEquals(compiler(None, ['-E', 'file']),
-+            self.assertEqual(compiler(None, ['-E', 'file']),
-                               (0, '1 2 C', ''))
--            self.assertEquals(compiler(None, ['-E', '-foo', 'file']),
-+            self.assertEqual(compiler(None, ['-E', '-foo', 'file']),
-                               (0, '1 2 foo', ''))
--            self.assertEquals(compiler(None, ['-E', '-bar', 'file']),
-+            self.assertEqual(compiler(None, ['-E', '-bar', 'file']),
-                               (0, '1 bar bar', ''))
--            self.assertEquals(compiler(None, ['-E', '-qux', 'file']),
-+            self.assertEqual(compiler(None, ['-E', '-qux', 'file']),
-                               (0, '1 B C', ''))
--            self.assertEquals(compiler(None, ['-E', '-foo', '-bar', 'file']),
-+            self.assertEqual(compiler(None, ['-E', '-foo', '-bar', 'file']),
-                               (0, '1 bar bar', ''))
--            self.assertEquals(compiler(None, ['-E', '-bar', '-foo', 'file']),
-+            self.assertEqual(compiler(None, ['-E', '-bar', '-foo', 'file']),
-                               (0, '1 bar foo', ''))
--            self.assertEquals(compiler(None, ['-E', '-bar', '-qux', 'file']),
-+            self.assertEqual(compiler(None, ['-E', '-bar', '-qux', 'file']),
-                               (0, '1 B bar', ''))
--            self.assertEquals(compiler(None, ['-E', '-qux', '-bar', 'file']),
-+            self.assertEqual(compiler(None, ['-E', '-qux', '-bar', 'file']),
-                               (0, '1 bar bar', ''))
--            self.assertEquals(compiler(None, ['-E', 'file.c']),
-+            self.assertEqual(compiler(None, ['-E', 'file.c']),
-                               (0, '1 42 C', ''))
--            self.assertEquals(compiler(None, ['-E', '-bar', 'file.c']),
-+            self.assertEqual(compiler(None, ['-E', '-bar', 'file.c']),
-                               (0, '1 bar bar', ''))
- 
-     def test_multiple_definitions(self):
-@@ -267,7 +267,7 @@ class TestFakeCompiler(unittest.TestCase):
-             'C': 3,
-         })
- 
--        self.assertEquals(compiler, {
-+        self.assertEqual(compiler, {
-             None: {
-                 'A': 1,
-                 'B': 2,
-@@ -282,7 +282,7 @@ class TestFakeCompiler(unittest.TestCase):
-             'C': 3,
-         })
- 
--        self.assertEquals(compiler, {
-+        self.assertEqual(compiler, {
-             None: {
-                 'A': 1,
-                 'B': 4,
-@@ -302,7 +302,7 @@ class TestFakeCompiler(unittest.TestCase):
-             },
-         })
- 
--        self.assertEquals(compiler, {
-+        self.assertEqual(compiler, {
-             None: {
-                 'A': 1,
-                 'B': 4,
-@@ -330,7 +330,7 @@ class TestFakeCompiler(unittest.TestCase):
-             },
-         })
- 
--        self.assertEquals(compiler, {
-+        self.assertEqual(compiler, {
-             None: {
-                 'A': 1,
-                 'B': 2,
-@@ -370,7 +370,7 @@ class CompilerResult(ReadOnlyNamespace):
-     def __add__(self, other):
-         assert isinstance(other, dict)
-         result = copy.deepcopy(self.__dict__)
--        for k, v in other.iteritems():
-+        for k, v in other.items():
-             if k == 'flags':
-                 result.setdefault(k, []).extend(v)
-             else:
-@@ -381,7 +381,7 @@ class CompilerResult(ReadOnlyNamespace):
- class TestCompilerResult(unittest.TestCase):
-     def test_compiler_result(self):
-         result = CompilerResult()
--        self.assertEquals(result.__dict__, {
-+        self.assertEqual(result.__dict__, {
-             'wrapper': [],
-             'compiler': mozpath.abspath(''),
-             'version': '',
-@@ -397,7 +397,7 @@ class TestCompilerResult(unittest.TestCase):
-             language='C',
-             flags=['-std=gnu99'],
-         )
--        self.assertEquals(result.__dict__, {
-+        self.assertEqual(result.__dict__, {
-             'wrapper': [],
-             'compiler': mozpath.abspath('/usr/bin/gcc'),
-             'version': '4.2.1',
-@@ -407,7 +407,7 @@ class TestCompilerResult(unittest.TestCase):
-         })
- 
-         result2 = result + {'flags': ['-m32']}
--        self.assertEquals(result2.__dict__, {
-+        self.assertEqual(result2.__dict__, {
-             'wrapper': [],
-             'compiler': mozpath.abspath('/usr/bin/gcc'),
-             'version': '4.2.1',
-@@ -416,14 +416,14 @@ class TestCompilerResult(unittest.TestCase):
-             'flags': ['-std=gnu99', '-m32'],
-         })
-         # Original flags are untouched.
--        self.assertEquals(result.flags, ['-std=gnu99'])
-+        self.assertEqual(result.flags, ['-std=gnu99'])
- 
-         result3 = result + {
-             'compiler': '/usr/bin/gcc-4.7',
-             'version': '4.7.3',
-             'flags': ['-m32'],
-         }
--        self.assertEquals(result3.__dict__, {
-+        self.assertEqual(result3.__dict__, {
-             'wrapper': [],
-             'compiler': mozpath.abspath('/usr/bin/gcc-4.7'),
-             'version': '4.7.3',
-diff --git a/python/mozbuild/mozbuild/test/configure/test_toolkit_moz_configure.py b/python/mozbuild/mozbuild/test/configure/test_toolkit_moz_configure.py
-index ac35d745f..cdd8ece1b 100644
---- a/python/mozbuild/mozbuild/test/configure/test_toolkit_moz_configure.py
-+++ b/python/mozbuild/mozbuild/test/configure/test_toolkit_moz_configure.py
-@@ -2,7 +2,7 @@
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
- 
--from __future__ import absolute_import, print_function, unicode_literals
-+
- 
- import os
- 
-diff --git a/python/mozbuild/mozbuild/test/configure/test_util.py b/python/mozbuild/mozbuild/test/configure/test_util.py
-index 9f9575fd0..c2db1a628 100644
---- a/python/mozbuild/mozbuild/test/configure/test_util.py
-+++ b/python/mozbuild/mozbuild/test/configure/test_util.py
-@@ -2,7 +2,7 @@
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
- 
--from __future__ import absolute_import, print_function, unicode_literals
-+
- 
- import logging
- import os
-@@ -11,7 +11,7 @@ import textwrap
- import unittest
- import sys
- 
--from StringIO import StringIO
-+from io import StringIO
- 
- from mozunit import main
- from mozpack import path as mozpath
-@@ -434,11 +434,11 @@ class TestLogSubprocessOutput(unittest.TestCase):
-         except SystemExit as e:
-             status = e.code
- 
--        self.assertEquals(status, 0)
-+        self.assertEqual(status, 0)
-         quote_char = "'"
-         if getpreferredencoding().lower() == 'utf-8':
-             quote_char = '\u00B4'.encode('utf-8')
--        self.assertEquals(out.getvalue().strip(), quote_char)
-+        self.assertEqual(out.getvalue().strip(), quote_char)
- 
- 
- class TestVersion(unittest.TestCase):
-diff --git a/python/mozbuild/mozbuild/testing.py b/python/mozbuild/mozbuild/testing.py
-index 3229c3f77..82d250fab 100644
---- a/python/mozbuild/mozbuild/testing.py
-+++ b/python/mozbuild/mozbuild/testing.py
-@@ -2,9 +2,9 @@
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
- 
--from __future__ import absolute_import, unicode_literals
- 
--import cPickle as pickle
-+
-+import pickle as pickle
- import os
- import sys
- 
-@@ -70,7 +70,7 @@ REFTEST_FLAVORS = ('crashtest', 'reftest')
- WEB_PLATFORM_TESTS_FLAVORS = ('web-platform-tests',)
- 
- def all_test_flavors():
--    return ([v[0] for v in TEST_MANIFESTS.values()] +
-+    return ([v[0] for v in list(TEST_MANIFESTS.values())] +
-             list(REFTEST_FLAVORS) +
-             list(WEB_PLATFORM_TESTS_FLAVORS))
- 
-@@ -210,7 +210,7 @@ def install_test_files(topsrcdir, topobjdir, tests_root, test_objs):
-     only a few tests need to be run.
-     """
-     flavor_info = {flavor: (root, prefix, install)
--                   for (flavor, root, prefix, install) in TEST_MANIFESTS.values()}
-+                   for (flavor, root, prefix, install) in list(TEST_MANIFESTS.values())}
-     objdir_dest = mozpath.join(topobjdir, tests_root)
- 
-     converter = SupportFilesConverter()
-@@ -292,7 +292,7 @@ def read_wpt_manifest(context, paths):
-         paths_file = os.path.join(context.config.topsrcdir, "testing",
-                                   "web-platform", "tests", "tools", "localpaths.py")
-         _globals = {"__file__": paths_file}
--        execfile(paths_file, _globals)
-+        exec(compile(open(paths_file, "rb").read(), paths_file, 'exec'), _globals)
-         import manifest as wptmanifest
-     finally:
-         sys.path = old_path
-diff --git a/python/mozbuild/mozbuild/util.py b/python/mozbuild/mozbuild/util.py
-index 4ea227dc0..79cb15713 100644
---- a/python/mozbuild/mozbuild/util.py
-+++ b/python/mozbuild/mozbuild/util.py
-@@ -5,7 +5,7 @@
- # This file contains miscellaneous utility functions that don't belong anywhere
- # in particular.
- 
--from __future__ import absolute_import, unicode_literals, print_function
-+
- 
- import argparse
- import collections
-@@ -21,6 +21,9 @@ import stat
- import sys
- import time
- import types
-+import pprint
-+import six
-+import subprocess
- 
- from collections import (
-     defaultdict,
-@@ -36,7 +39,7 @@ from io import (
- if sys.version_info[0] == 3:
-     str_type = str
- else:
--    str_type = basestring
-+    str_type = str
- 
- if sys.platform == 'win32':
-     _kernel32 = ctypes.windll.kernel32
-@@ -78,7 +81,7 @@ def hash_file(path, hasher=None):
-     return h.hexdigest()
- 
- 
--class EmptyValue(unicode):
-+class EmptyValue(str):
-     """A dummy type that behaves like an empty string and sequence.
- 
-     This type exists in order to support
-@@ -92,7 +95,7 @@ class EmptyValue(unicode):
- class ReadOnlyNamespace(object):
-     """A class for objects with immutable attributes set at initialization."""
-     def __init__(self, **kwargs):
--        for k, v in kwargs.iteritems():
-+        for k, v in kwargs.items():
-             super(ReadOnlyNamespace, self).__setattr__(k, v)
- 
-     def __delattr__(self, key):
-@@ -224,7 +227,7 @@ class FileAvoidWrite(BytesIO):
-         self.mode = mode
- 
-     def write(self, buf):
--        if isinstance(buf, unicode):
-+        if isinstance(buf, str):
-             buf = buf.encode('utf-8')
-         BytesIO.write(self, buf)
- 
-@@ -267,6 +270,10 @@ class FileAvoidWrite(BytesIO):
-             if 'b' in self.mode:
-                 writemode += 'b'
-             with open(self.name, writemode) as file:
-+                if 'b' in self.mode and isinstance(buf, str):
-+                    buf = buf.encode('utf-8')
-+                elif 'b' not in self.mode and isinstance(buf, bytes):
-+                    buf = buf.decode('utf-8')
-                 file.write(buf)
- 
-         if self._capture_diff:
-@@ -381,7 +388,7 @@ class ListMixin(object):
-     def __add__(self, other):
-         # Allow None and EmptyValue is a special case because it makes undefined
-         # variable references in moz.build behave better.
--        other = [] if isinstance(other, (types.NoneType, EmptyValue)) else other
-+        other = [] if isinstance(other, (type(None), EmptyValue)) else other
-         if not isinstance(other, list):
-             raise ValueError('Only lists can be appended to lists.')
- 
-@@ -390,7 +397,7 @@ class ListMixin(object):
-         return new_list
- 
-     def __iadd__(self, other):
--        other = [] if isinstance(other, (types.NoneType, EmptyValue)) else other
-+        other = [] if isinstance(other, (type(None), EmptyValue)) else other
-         if not isinstance(other, list):
-             raise ValueError('Only lists can be appended to lists.')
- 
-@@ -561,14 +568,14 @@ def FlagsFactory(flags):
-     functions below.
-     """
-     assert isinstance(flags, dict)
--    assert all(isinstance(v, type) for v in flags.values())
-+    assert all(isinstance(v, type) for v in list(flags.values()))
- 
-     class Flags(object):
--        __slots__ = flags.keys()
-+        __slots__ = list(flags.keys())
-         _flags = flags
- 
-         def update(self, **kwargs):
--            for k, v in kwargs.iteritems():
-+            for k, v in kwargs.items():
-                 setattr(self, k, v)
- 
-         def __getattr__(self, name):
-@@ -1006,8 +1013,6 @@ def TypedNamedTuple(name, fields):
-                                     'got %s, expected %s' % (fname,
-                                     type(value), ftype))
- 
--            super(TypedTuple, self).__init__(*args, **kwargs)
--
-     TypedTuple._fields = fields
- 
-     return TypedTuple
-@@ -1099,14 +1104,14 @@ def group_unified_files(files, unified_prefix, unified_suffix,
-     # issue.  So we do a little dance to filter it out ourselves.
-     dummy_fill_value = ("dummy",)
-     def filter_out_dummy(iterable):
--        return itertools.ifilter(lambda x: x != dummy_fill_value,
-+        return filter(lambda x: x != dummy_fill_value,
-                                  iterable)
- 
-     # From the itertools documentation, slightly modified:
-     def grouper(n, iterable):
-         "grouper(3, 'ABCDEFG', 'x') --> ABC DEF Gxx"
-         args = [iter(iterable)] * n
--        return itertools.izip_longest(fillvalue=dummy_fill_value, *args)
-+        return itertools.zip_longest(fillvalue=dummy_fill_value, *args)
- 
-     for i, unified_group in enumerate(grouper(files_per_unified_file,
-                                               files)):
-@@ -1123,7 +1128,7 @@ def pair(iterable):
-         [(1,2), (3,4), (5,6)]
-     '''
-     i = iter(iterable)
--    return itertools.izip_longest(i, i)
-+    return itertools.zip_longest(i, i)
- 
- 
- VARIABLES_RE = re.compile('\$\((\w+)\)')
-@@ -1141,7 +1146,7 @@ def expand_variables(s, variables):
-         value = variables.get(name)
-         if not value:
-             continue
--        if not isinstance(value, types.StringTypes):
-+        if not isinstance(value, (str,)):
-             value = ' '.join(value)
-         result += value
-     return result
-@@ -1168,7 +1173,7 @@ class EnumStringComparisonError(Exception):
-     pass
- 
- 
--class EnumString(unicode):
-+class EnumString(str):
-     '''A string type that only can have a limited set of values, similarly to
-     an Enum, and can only be compared against that set of values.
- 
-@@ -1185,8 +1190,8 @@ class EnumString(unicode):
-     def __eq__(self, other):
-         if other not in self.POSSIBLE_VALUES:
-             raise EnumStringComparisonError(
--                'Can only compare with %s'
--                % ', '.join("'%s'" % v for v in self.POSSIBLE_VALUES))
-+                '%s is not in %s'
-+                % (other, ', '.join("'%s'" % v for v in self.POSSIBLE_VALUES)))
-         return super(EnumString, self).__eq__(other)
- 
-     def __ne__(self, other):
-@@ -1204,14 +1209,14 @@ def _escape_char(c):
-     # quoting could be done with either ' or ".
-     if c == "'":
-         return "\\'"
--    return unicode(c.encode('unicode_escape'))
-+    return str(c.encode('unicode_escape'))
- 
- # Mapping table between raw characters below \x80 and their escaped
- # counterpart, when they differ
- _INDENTED_REPR_TABLE = {
-     c: e
-     for c, e in map(lambda x: (x, _escape_char(x)),
--                    map(unichr, range(128)))
-+                    map(chr, range(128)))
-     if c != e
- }
- # Regexp matching all characters to escape.
-@@ -1219,7 +1224,33 @@ _INDENTED_REPR_RE = re.compile(
-     '([' + ''.join(_INDENTED_REPR_TABLE.values()) + ']+)')
- 
- 
-+# Stolen from gecko master [1]
-+# [1] https://github.com/mozilla/gecko-dev/blob/4165a2e843c494bfb3e35d8a1fbf9c61209e3675/python/mozbuild/mozbuild/util.py#L1286
-+
-+# The default PrettyPrinter has some issues with UTF-8, so we need to override
-+# some stuff here.
-+class _PrettyPrinter(pprint.PrettyPrinter):
-+    def format(self, object, context, maxlevels, level):
-+        if not (isinstance(object, six.text_type) or
-+                isinstance(object, six.binary_type)):
-+            return super(_PrettyPrinter, self).format(
-+                object, context, maxlevels, level)
-+        # This is super hacky and weird, but the output of 'repr' actually
-+        # varies based on the default I/O encoding of the process, which isn't
-+        # necessarily utf-8. Instead we open a new shell and ask what the repr
-+        # WOULD be assuming the default encoding is utf-8. If you can come up
-+        # with a better way of doing this without simply re-implementing the
-+        # logic of "repr", please replace this.
-+        env = dict(os.environ)
-+        env['PYTHONIOENCODING'] = 'utf-8'
-+        ret = six.ensure_text(subprocess.check_output(
-+            [sys.executable], input='print(repr(%s))' % repr(object),
-+            universal_newlines=Tr