diff -Nru cfengine3-3.15.2/debian/changelog cfengine3-3.15.2/debian/changelog
--- cfengine3-3.15.2/debian/changelog	2022-05-22 02:25:35.000000000 +1000
+++ cfengine3-3.15.2/debian/changelog	2022-09-09 17:13:10.000000000 +1000
@@ -1,3 +1,21 @@
+cfengine3 (3.15.2-3.2) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * debian/control:
+    + Build-Depend on pkg-config.
+    + cfengine3: Recommend python3 instead of python (Closes: #998014).
+  * debian/patches:
+    + Drop 883480-fix-crossbuild-libxml2.patch (no longer needed).
+    + Use pkg-config to find libxml2 (Closes: #972893, #949086).
+    + Remove /sbin from the CF3_PATH_ROOT_PROG macro PATH override to ensure
+      system tools can be invoked on usr-merged and non-usr-merged systems
+      (Closes: #992662).
+    + Fix python3 and shell interpreter paths; use python3 syntax in upstream
+      apt_get module (Closes: #945623).
+    + Fix spelling error in openssl3.patch metadata.
+
+ -- Hugh McMaster <hugh.mcmaster@outlook.com>  Fri, 09 Sep 2022 17:13:10 +1000
+
 cfengine3 (3.15.2-3.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru cfengine3-3.15.2/debian/control cfengine3-3.15.2/debian/control
--- cfengine3-3.15.2/debian/control	2022-05-22 02:13:41.000000000 +1000
+++ cfengine3-3.15.2/debian/control	2022-09-09 16:55:06.000000000 +1000
@@ -2,17 +2,19 @@
 Section: admin
 Priority: optional
 Maintainer: Antonio Radici <antonio@debian.org>
-Build-Depends: debhelper (>= 10),
- libssl-dev, 
- flex,
+Build-Depends:
+ debhelper (>= 10),
  bison,
- libpcre3-dev,
- libvirt-dev,
+ flex,
  libacl1-dev,
  liblmdb-dev,
- libxml2-dev,
  libpam0g-dev,
- libyaml-dev
+ libpcre3-dev,
+ libssl-dev,
+ libvirt-dev,
+ libxml2-dev,
+ libyaml-dev,
+ pkg-config
 Standards-Version: 4.1.1
 Homepage: https://cfengine.com/product/community/
 Vcs-Git: https://salsa.debian.org/cfengine-team/cfengine3.git
@@ -21,7 +23,7 @@
 Package: cfengine3
 Architecture: any
 Depends: lsb-base (>= 3.0-6), e2fsprogs, ${shlibs:Depends}, ${misc:Depends}, libpromises3 (= ${binary:Version})
-Recommends: python
+Recommends: python3
 Description: tool for configuring and maintaining network machines
  Cfengine is a suite of programs for integrated autonomic management
  of either individual or networked computers.
diff -Nru cfengine3-3.15.2/debian/patches/0011-fix_interpreters.patch cfengine3-3.15.2/debian/patches/0011-fix_interpreters.patch
--- cfengine3-3.15.2/debian/patches/0011-fix_interpreters.patch	2020-09-14 17:00:24.000000000 +1000
+++ cfengine3-3.15.2/debian/patches/0011-fix_interpreters.patch	2022-09-09 15:54:53.000000000 +1000
@@ -1,3 +1,8 @@
+Description: Update interpreter paths and file names
+Author: Hugh McMaster <hugh.mcmaster@outlook.com>
+Forwarded: no, not-needed
+Last-Update: 2022-09-09
+
 --- a/masterfiles/cfe_internal/core/watchdog/templates/watchdog.mustache
 +++ b/masterfiles/cfe_internal/core/watchdog/templates/watchdog.mustache
 @@ -1,4 +1,4 @@
@@ -6,27 +11,27 @@
  
  # Watchdog events are logged here.
  PIDFILE="/var/cfengine/watchdog.pid"
---- a/masterfiles/modules/packages/apt_get
-+++ b/masterfiles/modules/packages/apt_get
+--- a/masterfiles/modules/packages/apt_get.in
++++ b/masterfiles/modules/packages/apt_get.in
 @@ -1,4 +1,4 @@
--#!/var/cfengine/bin/python
-+#!/usr/bin/python
+-#!@bindir@/python
++#!/usr/bin/python3
  
  import sys
  import os
---- a/masterfiles/modules/packages/yum
-+++ b/masterfiles/modules/packages/yum
+--- a/masterfiles/modules/packages/yum.in
++++ b/masterfiles/modules/packages/yum.in
 @@ -1,4 +1,4 @@
--#!/var/cfengine/bin/python
-+#!/usr/bin/python
+-#!@bindir@/python
++#!/usr/bin/python3
  
  import sys
  import os
---- a/masterfiles/modules/packages/zypper
-+++ b/masterfiles/modules/packages/zypper
+--- a/masterfiles/modules/packages/zypper.in
++++ b/masterfiles/modules/packages/zypper.in
 @@ -1,4 +1,4 @@
--#!/var/cfengine/bin/python
-+#!/usr/bin/python
+-#!@bindir@/python
++#!/usr/bin/python3
  
  #####################################################################################
  # Copyright 2016 Normation SAS
diff -Nru cfengine3-3.15.2/debian/patches/883480-fix-crossbuild-libxml2.patch cfengine3-3.15.2/debian/patches/883480-fix-crossbuild-libxml2.patch
--- cfengine3-3.15.2/debian/patches/883480-fix-crossbuild-libxml2.patch	2020-09-14 17:00:24.000000000 +1000
+++ cfengine3-3.15.2/debian/patches/883480-fix-crossbuild-libxml2.patch	1970-01-01 10:00:00.000000000 +1000
@@ -1,18 +0,0 @@
-Fix an issue with cross-builds where configure insists that xml2-config is
-unusable for cross-builds which will, in turn, break the builds.
-
-Patch provided by Helmut Grohne <helmut@subdivi.de>.
-More details on http://bugs.debian.org/883480.
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -601,8 +601,7 @@
-         XML2_CONFIG=xml2-config
-     fi
- 
--    # xml2-config is only for native builds
--    if test "x$cross_compiling" = "xno" && test x`which $XML2_CONFIG` != x
-+    if test x`which $XML2_CONFIG` != x
-     then
-         xml2_include_dir=`$XML2_CONFIG --cflags`
-         if test -n "$xml2_include_dir"
diff -Nru cfengine3-3.15.2/debian/patches/apt_get-python3.patch cfengine3-3.15.2/debian/patches/apt_get-python3.patch
--- cfengine3-3.15.2/debian/patches/apt_get-python3.patch	1970-01-01 10:00:00.000000000 +1000
+++ cfengine3-3.15.2/debian/patches/apt_get-python3.patch	2022-09-09 16:57:38.000000000 +1000
@@ -0,0 +1,26 @@
+Description: Use python3 syntax
+Author: Hugh McMaster <hugh.mcmaster@outlook.com>
+Bug-Debian: https://bugs.debian.org/945623
+Forwarded: not-needed
+Last-Update: 2022-09-09
+
+--- a/masterfiles/modules/packages/apt_get.in
++++ b/masterfiles/modules/packages/apt_get.in
+@@ -307,7 +307,7 @@
+ 
+     # Convert list of tuples into two lists so that first element of each
+     # tuple belongs to list 'a1' and the second one to list 'a2'.
+-    a1, a2 =  map(list, zip(*args))
++    a1, a2 =  list(map(list, list(zip(*args))))
+ 
+     # For 'repo_insrtall' both 'a1' and 'a2' should be equal so we can operate
+     # on 'a1' elements only.
+@@ -329,7 +329,7 @@
+     # In case of multi arch support elements of 'a1' list should not contain
+     # packages names with ':architecture' suffix for all packages matching native
+     # OS architecture.
+-    a1, a2 =  map(list, zip(*args))
++    a1, a2 =  list(map(list, list(zip(*args))))
+ 
+     # As there seems to be no unified method to remove packages matching
+     # native OS architecture we are trying first to remove packages providing
diff -Nru cfengine3-3.15.2/debian/patches/cf3_path_root_prog.patch cfengine3-3.15.2/debian/patches/cf3_path_root_prog.patch
--- cfengine3-3.15.2/debian/patches/cf3_path_root_prog.patch	1970-01-01 10:00:00.000000000 +1000
+++ cfengine3-3.15.2/debian/patches/cf3_path_root_prog.patch	2022-09-09 14:38:54.000000000 +1000
@@ -0,0 +1,75 @@
+Description: Remove /sbin from the CF3_PATH_ROOT_PROG macro PATH override
+ This ensures system tools can be invoked on usr-merged and non-usr-merged systems.
+Author: Hugh McMaster <hugh.mcmaster@outlook.com>
+Bug-Debian: https://bugs.debian.org/992662
+Forwarded: not-needed
+Last-Update: 2022-09-09
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -890,7 +890,7 @@
+ AC_CHECK_HEADERS([sys/pstat.h])
+ AC_CHECK_FUNCS(pstat_getfile2)
+ 
+-CF3_PATH_ROOT_PROG([CHPASSWD], [chpasswd], [], [/sbin:/usr/sbin:/bin:/usr/bin:$PATH])
++CF3_PATH_ROOT_PROG([CHPASSWD], [chpasswd], [], [/usr/sbin:/bin:/usr/bin:$PATH])
+ AS_IF([test "x$CHPASSWD" != "x"],
+       [AC_DEFINE(HAVE_CHPASSWD, 1, [Define if chpasswd tool is present])]
+       [AC_DEFINE_UNQUOTED(CHPASSWD, ["$CHPASSWD"], [Path to chpasswd tool])]
+@@ -903,19 +903,19 @@
+       [AC_DEFINE_UNQUOTED(PWDADM, ["$PWDADM"], [Path to pwdadm tool])]
+      )
+ 
+-CF3_PATH_ROOT_PROG([USERADD], [useradd], [], [/sbin:/usr/sbin:/bin:/usr/bin:$PATH])
++CF3_PATH_ROOT_PROG([USERADD], [useradd], [], [/usr/sbin:/bin:/usr/bin:$PATH])
+ AS_IF([test "x$USERADD" != "x"],
+       [AC_DEFINE(HAVE_USERADD, 1, [Define if useradd tool is present])]
+       [AC_DEFINE_UNQUOTED(USERADD, ["$USERADD"], [Path to useradd tool])]
+      )
+ 
+-CF3_PATH_ROOT_PROG([USERMOD], [usermod], [], [/sbin:/usr/sbin:/bin:/usr/bin:$PATH])
++CF3_PATH_ROOT_PROG([USERMOD], [usermod], [], [/usr/sbin:/bin:/usr/bin:$PATH])
+ AS_IF([test "x$USERMOD" != "x"],
+       [AC_DEFINE(HAVE_USERMOD, 1, [Define if usermod tool is present])]
+       [AC_DEFINE_UNQUOTED(USERMOD, ["$USERMOD"], [Path to usermod tool])]
+      )
+ 
+-CF3_PATH_ROOT_PROG([USERDEL], [userdel], [], [/sbin:/usr/sbin:/bin:/usr/bin:$PATH])
++CF3_PATH_ROOT_PROG([USERDEL], [userdel], [], [/usr/sbin:/bin:/usr/bin:$PATH])
+ AS_IF([test "x$USERDEL" != "x"],
+       [AC_DEFINE(HAVE_USERDEL, 1, [Define if userdel tool is present])]
+       [AC_DEFINE_UNQUOTED(USERDEL, ["$USERDEL"], [Path to userdel tool])]
+--- a/libntech/configure.ac
++++ b/libntech/configure.ac
+@@ -874,7 +874,7 @@
+ AC_CHECK_HEADERS([sys/pstat.h])
+ AC_CHECK_FUNCS(pstat_getfile2)
+ 
+-CF3_PATH_ROOT_PROG([CHPASSWD], [chpasswd], [], [/sbin:/usr/sbin:/bin:/usr/bin:$PATH])
++CF3_PATH_ROOT_PROG([CHPASSWD], [chpasswd], [], [/usr/sbin:/bin:/usr/bin:$PATH])
+ AS_IF([test "x$CHPASSWD" != "x"],
+       [AC_DEFINE(HAVE_CHPASSWD, 1, [Define if chpasswd tool is present])]
+       [AC_DEFINE_UNQUOTED(CHPASSWD, ["$CHPASSWD"], [Path to chpasswd tool])]
+@@ -887,19 +887,19 @@
+       [AC_DEFINE_UNQUOTED(PWDADM, ["$PWDADM"], [Path to pwdadm tool])]
+      )
+ 
+-CF3_PATH_ROOT_PROG([USERADD], [useradd], [], [/sbin:/usr/sbin:/bin:/usr/bin:$PATH])
++CF3_PATH_ROOT_PROG([USERADD], [useradd], [], [/usr/sbin:/bin:/usr/bin:$PATH])
+ AS_IF([test "x$USERADD" != "x"],
+       [AC_DEFINE(HAVE_USERADD, 1, [Define if useradd tool is present])]
+       [AC_DEFINE_UNQUOTED(USERADD, ["$USERADD"], [Path to useradd tool])]
+      )
+ 
+-CF3_PATH_ROOT_PROG([USERMOD], [usermod], [], [/sbin:/usr/sbin:/bin:/usr/bin:$PATH])
++CF3_PATH_ROOT_PROG([USERMOD], [usermod], [], [/usr/sbin:/bin:/usr/bin:$PATH])
+ AS_IF([test "x$USERMOD" != "x"],
+       [AC_DEFINE(HAVE_USERMOD, 1, [Define if usermod tool is present])]
+       [AC_DEFINE_UNQUOTED(USERMOD, ["$USERMOD"], [Path to usermod tool])]
+      )
+ 
+-CF3_PATH_ROOT_PROG([USERDEL], [userdel], [], [/sbin:/usr/sbin:/bin:/usr/bin:$PATH])
++CF3_PATH_ROOT_PROG([USERDEL], [userdel], [], [/usr/sbin:/bin:/usr/bin:$PATH])
+ AS_IF([test "x$USERDEL" != "x"],
+       [AC_DEFINE(HAVE_USERDEL, 1, [Define if userdel tool is present])]
+       [AC_DEFINE_UNQUOTED(USERDEL, ["$USERDEL"], [Path to userdel tool])]
diff -Nru cfengine3-3.15.2/debian/patches/libxml2.patch cfengine3-3.15.2/debian/patches/libxml2.patch
--- cfengine3-3.15.2/debian/patches/libxml2.patch	1970-01-01 10:00:00.000000000 +1000
+++ cfengine3-3.15.2/debian/patches/libxml2.patch	2022-09-09 17:00:58.000000000 +1000
@@ -0,0 +1,219 @@
+Description: Use pkg-config to find libxml2 and also allow cross-compiling
+Author: Hugh McMaster <hugh.mcmaster@outlook.com>
+Forwarded: https://github.com/cfengine/core/pull/4996
+Applied-Upstream: https://github.com/cfengine/core/commit/ef86e711843798157b24d3d38b484a9aef67baf9.patch
+Bug-Debian: https://bugs.debian.org/949086
+Last-Update: 2022-09-09
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -136,6 +136,14 @@
+ AC_PATH_PROG(GETCONF, getconf, false, $PATH:$prefix/bin:/usr/bin:/usr/local/bin:/sw/bin)
+ AM_CONDITIONAL(CROSS_COMPILING, test "x$cross_compiling" = "xyes")
+ 
++# Check whether `pkg-config' is available
++AC_ARG_VAR([PKG_CONFIG], [path to pkg-config])
++AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to the pkg-config search path])
++AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's search path])
++
++if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
++    AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
++fi
+ 
+ dnl ######################################################################
+ dnl Use pthreads if available
+@@ -587,43 +595,57 @@
+     [],
+     [with_libxml2=check])
+ 
+-if test "x$with_libxml2" != xno
+-then
+-    if test "x$with_libxml2" != xyes &&
+-       test "x$with_libxml2" != xcheck
+-    then
+-        XML2_CONFIG=$with_libxml2/bin/xml2-config
+-    else
+-        XML2_CONFIG=xml2-config
++have_libxml2="no"
++
++if test "x$with_libxml2" != "xno"; then
++    if test -n "$PKG_CONFIG"; then
++        AC_MSG_CHECKING([for libxml2 via pkg-config])
++        if `$PKG_CONFIG --exists libxml-2.0`; then
++            LIBXML2_CFLAGS=`$PKG_CONFIG --cflags libxml-2.0`
++            LIBXML2_CPPFLAGS="$LIBXML2_CFLAGS"
++            LIBXML2_LIBS=`$PKG_CONFIG --libs libxml-2.0`
++            LIBXML2_VERSION=`$PKG_CONFIG --modversion libxml-2.0`
++            AC_MSG_RESULT([found version $LIBXML2_VERSION])
++            have_libxml2="yes"
++        else
++            AC_MSG_RESULT([not found])
++        fi
+     fi
+ 
+-    # xml2-config is only for native builds
+-    if test "x$cross_compiling" = "xno" && test x`which $XML2_CONFIG` != x
+-    then
+-        xml2_include_dir=`$XML2_CONFIG --cflags`
+-        if test -n "$xml2_include_dir"
++    if test "x$have_libxml2" = "xno"; then
++        if test "x$with_libxml2" != "xyes" && test "x$with_libxml2" != "xcheck"
+         then
+-            LIBXML2_CPPFLAGS="$xml2_include_dir"
++            XML2_CONFIG=$with_libxml2/bin/xml2-config
++        else
++            AC_PATH_PROG([XML2_CONFIG], [xml2-config])
++        fi
++
++        # xml2-config is only for native builds
++        if test "x$cross_compiling" = "xno" && test -n "$XML2_CONFIG"; then
++            xml2_include_dir=`$XML2_CONFIG --cflags`
++            if test -n "$xml2_include_dir"; then
++                LIBXML2_CPPFLAGS="$xml2_include_dir"
++            fi
++        else # xml2-config not found
++            # if a path, e.g. /var/cfengine was given, then we
++            # must take into account that libxml2 includes are in
++            # /var/cfengine/include/libxml2
++            LIBXML2_CPPFLAGS=-I$with_libxml2/include/libxml2
+         fi
+-    else                # xml2-config not found
+-        # if a path, e.g. /var/cfengine was given, then we
+-        # must take into account that libxml2 includes are in
+-        # /var/cfengine/include/libxml2
+-        LIBXML2_CPPFLAGS=-I$with_libxml2/include/libxml2
+     fi
++fi
+ 
+-    CF3_WITH_LIBRARY(libxml2,
+-        [AC_CHECK_LIB(xml2, xmlFirstElementChild,
+-            [],
+-            [if test "x$with_libxml2" != xcheck; then
+-                AC_MSG_ERROR(Cannotfind libxml2); fi]
+-        )
+-        AC_CHECK_HEADERS([libxml/xmlwriter.h], [break],
+-            [if test "x$with_libxml2" != xcheck; then
+-                AC_MSG_ERROR(Cannot find libxml2); fi]
+-        )]
++CF3_WITH_LIBRARY(libxml2,
++    [AC_CHECK_LIB(xml2, xmlFirstElementChild,
++    [],
++    [if test "x$with_libxml2" != xcheck; then
++        AC_MSG_ERROR(Cannot find libxml2); fi]
+     )
+-fi
++    AC_CHECK_HEADERS([libxml/xmlwriter.h], [break],
++        [if test "x$with_libxml2" != xcheck; then
++            AC_MSG_ERROR(Cannot find libxml2); fi]
++    )]
++)
+ 
+ AM_CONDITIONAL([HAVE_LIBXML2],
+     [test "x$with_libxml2" != xno &&
+--- a/libntech/configure.ac
++++ b/libntech/configure.ac
+@@ -110,6 +110,14 @@
+ AC_PATH_PROG(GETCONF, getconf, false, $PATH:$prefix/bin:/usr/bin:/usr/local/bin:/sw/bin)
+ AM_CONDITIONAL(CROSS_COMPILING, test "x$cross_compiling" = "xyes")
+ 
++# Check whether `pkg-config' is available
++AC_ARG_VAR([PKG_CONFIG], [path to pkg-config])
++AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to the pkg-config search path])
++AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's search path])
++
++if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
++    AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
++fi
+ 
+ dnl ######################################################################
+ dnl Use pthreads if available
+@@ -569,43 +577,59 @@
+     [],
+     [with_libxml2=check])
+ 
+-if test "x$with_libxml2" != xno
+-then
+-    if test "x$with_libxml2" != xyes &&
+-       test "x$with_libxml2" != xcheck
+-    then
+-        XML2_CONFIG=$with_libxml2/bin/xml2-config
+-    else
+-        XML2_CONFIG=xml2-config
++have_libxml2="no"
++
++if test "x$with_libxml2" != "xno"; then
++    if test -n "$PKG_CONFIG"; then
++        AC_MSG_CHECKING([for libxml2 via pkg-config])
++        if `$PKG_CONFIG --exists libxml-2.0`; then
++            LIBXML2_CFLAGS=`$PKG_CONFIG --cflags libxml-2.0`
++            LIBXML2_CPPFLAGS="$LIBXML2_CFLAGS"
++            LIBXML2_LIBS=`$PKG_CONFIG --libs libxml-2.0`
++            LIBXML2_VERSION=`$PKG_CONFIG --modversion libxml-2.0`
++            AC_MSG_RESULT([found version $LIBXML2_VERSION])
++            have_libxml2="yes"
++        else
++            AC_MSG_RESULT([not found])
++        fi
+     fi
+ 
+-    # xml2-config is only for native builds
+-    if test "x$cross_compiling" = "xno" && test x`which $XML2_CONFIG` != x
+-    then
+-        xml2_include_dir=`$XML2_CONFIG --cflags`
+-        if test -n "$xml2_include_dir"
++    if test "x$have_libxml2" = "xno"; then
++        if test "x$with_libxml2" != "xyes" &&
++           test "x$with_libxml2" != "xcheck" &&
++           test -x "$with_libxml2/bin/xml2-config"
+         then
+-            LIBXML2_CPPFLAGS="$xml2_include_dir"
++            XML2_CONFIG=$with_libxml2/bin/xml2-config
++        else
++            AC_PATH_PROG([XML2_CONFIG], [xml2-config])
++        fi
++
++        # xml2-config is only for native builds
++        if test "x$cross_compiling" = "xno" && test -n "$XML2_CONFIG"; then
++            xml2_include_dir=`$XML2_CONFIG --cflags`
++            if test -n "$xml2_include_dir"; then
++                LIBXML2_CPPFLAGS="$xml2_include_dir"
++            fi
++        else # xml2-config not found
++            # if a path, e.g. /var/cfengine was given, then we
++            # must take into account that libxml2 includes are in
++            # /var/cfengine/include/libxml2
++            LIBXML2_CPPFLAGS=-I$with_libxml2/include/libxml2
+         fi
+-    else                # xml2-config not found
+-        # if a path, e.g. /var/cfengine was given, then we
+-        # must take into account that libxml2 includes are in
+-        # /var/cfengine/include/libxml2
+-        LIBXML2_CPPFLAGS=-I$with_libxml2/include/libxml2
+     fi
++fi
+ 
+-    CF3_WITH_LIBRARY(libxml2,
+-        [AC_CHECK_LIB(xml2, xmlFirstElementChild,
+-            [],
+-            [if test "x$with_libxml2" != xcheck; then
+-                AC_MSG_ERROR(Cannotfind libxml2); fi]
+-        )
+-        AC_CHECK_HEADERS([libxml/xmlwriter.h], [break],
+-            [if test "x$with_libxml2" != xcheck; then
+-                AC_MSG_ERROR(Cannot find libxml2); fi]
+-        )]
++CF3_WITH_LIBRARY(libxml2,
++    [AC_CHECK_LIB(xml2, xmlFirstElementChild,
++    [],
++    [if test "x$with_libxml2" != xcheck; then
++        AC_MSG_ERROR(Cannot find libxml2); fi]
+     )
+-fi
++    AC_CHECK_HEADERS([libxml/xmlwriter.h], [break],
++        [if test "x$with_libxml2" != xcheck; then
++            AC_MSG_ERROR(Cannot find libxml2); fi]
++    )]
++)
+ 
+ AM_CONDITIONAL([HAVE_LIBXML2],
+     [test "x$with_libxml2" != xno &&
diff -Nru cfengine3-3.15.2/debian/patches/openssl3.patch cfengine3-3.15.2/debian/patches/openssl3.patch
--- cfengine3-3.15.2/debian/patches/openssl3.patch	2022-05-22 02:25:35.000000000 +1000
+++ cfengine3-3.15.2/debian/patches/openssl3.patch	2022-09-09 16:54:42.000000000 +1000
@@ -1,4 +1,4 @@
-Description: Allow the use of deprected OpenSSL functions
+Description: Allow the use of deprecated OpenSSL functions
  Also load legacy provider for blowfish.
 Author: Sebastian Ramacher <sramacher@debian.org>
 Last-Update: 2022-05-21
diff -Nru cfengine3-3.15.2/debian/patches/series cfengine3-3.15.2/debian/patches/series
--- cfengine3-3.15.2/debian/patches/series	2022-05-22 02:19:58.000000000 +1000
+++ cfengine3-3.15.2/debian/patches/series	2022-09-09 15:55:17.000000000 +1000
@@ -1,4 +1,3 @@
-883480-fix-crossbuild-libxml2.patch
 0002-clean_xml_output.patch
 0004-remove_rpath.patch
 0005-do_not_build_rpmver.patch
@@ -10,3 +9,6 @@
 0012-CFE-3401-remove_unused_buffer.patch
 0013-rename_package_to_cfengine3.patch
 openssl3.patch
+libxml2.patch
+cf3_path_root_prog.patch
+apt_get-python3.patch
