diff -pruN 0.15.0-2/debian/changelog 0.15.0-4/debian/changelog
--- 0.15.0-2/debian/changelog	2021-10-01 06:49:55.000000000 +0000
+++ 0.15.0-4/debian/changelog	2022-05-14 19:46:12.000000000 +0000
@@ -1,3 +1,17 @@
+spice (0.15.0-4) unstable; urgency=medium
+
+  * test-leaks-fix-the-test-with-OpenSSL3.patch:
+    patch from upstream to fix FTBFS with OpenSSL3
+
+ -- Michael Tokarev <mjt@tls.msk.ru>  Sat, 14 May 2022 22:46:12 +0300
+
+spice (0.15.0-3) unstable; urgency=medium
+
+  * patch from upstream to fix ftbfs (Closes: #1005451):
+    build-Correctly-check-for-Python-modules.patch
+
+ -- Michael Tokarev <mjt@tls.msk.ru>  Mon, 14 Mar 2022 11:00:39 +0300
+
 spice (0.15.0-2) unstable; urgency=medium
 
   * switch from $DEB_TARGET_MULTIARCH to $DEB_HOST_MULTIARCH
diff -pruN 0.15.0-2/debian/patches/build-Correctly-check-for-Python-modules.patch 0.15.0-4/debian/patches/build-Correctly-check-for-Python-modules.patch
--- 0.15.0-2/debian/patches/build-Correctly-check-for-Python-modules.patch	1970-01-01 00:00:00.000000000 +0000
+++ 0.15.0-4/debian/patches/build-Correctly-check-for-Python-modules.patch	2022-03-14 07:59:46.000000000 +0000
@@ -0,0 +1,34 @@
+From a7b5474bf808934cf0ee1107a58d5f4d97b9afbf Mon Sep 17 00:00:00 2001
+From: Frediano Ziglio <freddy77@gmail.com>
+Date: Thu, 28 Oct 2021 16:45:34 +0100
+Subject: build: Correctly check for Python modules
+
+Currently using Meson the command "python -m <MODULE_NAME>" is
+run. However this command instead of trying to import the module
+tried to execute it as a script failing for the updated pyparsing
+with:
+
+    /usr/bin/python3: No module named pyparsing.__main__; 'pyparsing' is a package and cannot be directly executed
+
+So instead use "python -c 'import <MODULE_NAME>".
+Autoconf is already using that command (see m4/ax_python_module.m4).
+
+Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
+---
+ subprojects/spice-common/meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/subprojects/spice-common/meson.build b/subprojects/spice-common/meson.build
+index aff6243..eeccecd 100644
+--- a/subprojects/spice-common/meson.build
++++ b/subprojects/spice-common/meson.build
+@@ -132,7 +132,7 @@ if spice_common_generate_client_code or spice_common_generate_server_code
+   if get_option('python-checks')
+     foreach module : ['six', 'pyparsing']
+       message('Checking for python module @0@'.format(module))
+-      cmd = run_command(python, '-m', module)
++      cmd = run_command(python, '-c', 'import @0@'.format(module))
+       if cmd.returncode() != 0
+         error('Python module @0@ not found'.format(module))
+       endif
+-- 
diff -pruN 0.15.0-2/debian/patches/series 0.15.0-4/debian/patches/series
--- 0.15.0-2/debian/patches/series	2021-10-01 06:40:42.000000000 +0000
+++ 0.15.0-4/debian/patches/series	2022-05-14 19:45:46.000000000 +0000
@@ -1,2 +1,4 @@
 disable-failing-test-listen.patch
 do-not-run-nonexisting-doxygen-sh.patch
+build-Correctly-check-for-Python-modules.patch
+test-leaks-fix-the-test-with-OpenSSL3.patch
diff -pruN 0.15.0-2/debian/patches/test-leaks-fix-the-test-with-OpenSSL3.patch 0.15.0-4/debian/patches/test-leaks-fix-the-test-with-OpenSSL3.patch
--- 0.15.0-2/debian/patches/test-leaks-fix-the-test-with-OpenSSL3.patch	1970-01-01 00:00:00.000000000 +0000
+++ 0.15.0-4/debian/patches/test-leaks-fix-the-test-with-OpenSSL3.patch	2022-05-14 19:46:12.000000000 +0000
@@ -0,0 +1,45 @@
+From 3d32295f9e99054ae1a40d220ccef53a176c8aed Mon Sep 17 00:00:00 2001
+From: Simon Chopin <simon.chopin@canonical.com>
+Date: Wed, 10 Nov 2021 14:03:58 +0100
+Subject: [PATCH] test-leaks: fix the test with OpenSSL3
+
+In OpenSSL3, the SSL_accept call now emits proper errors, which we dump
+*before* emitting the expected "SSL_accept failed" error message. The
+g_test_expect_message framework doesn't really allow us to discard
+messages AFAICT, so instead we add a new expectation with fairly loose
+criteria.
+
+Fixes #63
+
+Signed-off-by: Simon Chopin <simon.chopin@canonical.com>
+Acked-by: Frediano Ziglio <freddy77@gmail.com>
+---
+ server/tests/test-leaks.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/server/tests/test-leaks.c b/server/tests/test-leaks.c
+index be9fe2d2..53e15ba8 100644
+--- a/server/tests/test-leaks.c
++++ b/server/tests/test-leaks.c
+@@ -31,6 +31,7 @@
+ #include <config.h>
+ #include <unistd.h>
+ #include <spice.h>
++#include <openssl/ssl.h>
+ 
+ #include "test-glib-compat.h"
+ #include "basic-event-loop.h"
+@@ -68,6 +69,10 @@ static void server_leaks(void)
+     g_assert_cmpint(result, ==, 0);
+ 
+     /* spice_server_add_ssl_client should not leak when it's given a disconnected socket */
++#if (OPENSSL_VERSION_NUMBER >= 0x30000000L)
++    /* Discard the OpenSSL-generated error logs */
++    g_test_expect_message(G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, "*error:*:SSL*");
++#endif
+     g_test_expect_message(G_LOG_DOMAIN, G_LOG_LEVEL_WARNING,
+                           "*SSL_accept failed*");
+     g_assert_cmpint(socketpair(AF_LOCAL, SOCK_STREAM, 0, sv), ==, 0);
+-- 
+2.30.2
+
