diff -pruN 0.8.0-2/debian/changelog 0.8.0-2ubuntu2/debian/changelog
--- 0.8.0-2/debian/changelog	2022-01-05 20:40:57.000000000 +0000
+++ 0.8.0-2ubuntu2/debian/changelog	2022-03-01 21:46:02.000000000 +0000
@@ -1,3 +1,17 @@
+capnproto (0.8.0-2ubuntu2) jammy; urgency=medium
+
+  * d/patches/stringify-most-negative.patch: backport part of upstream commit
+    to fix undefined behaviour causing test failures on ppc64el. 
+
+ -- Michael Hudson-Doyle <michael.hudson@ubuntu.com>  Wed, 02 Mar 2022 10:46:02 +1300
+
+capnproto (0.8.0-2ubuntu1) jammy; urgency=medium
+
+  * d/p/fix_tls_self_signed_test.patch: add TLS test fix to fix the FTBFS on
+    Ubuntu.
+
+ -- Łukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com>  Mon, 24 Jan 2022 12:31:53 +0100
+
 capnproto (0.8.0-2) unstable; urgency=medium
 
   * Upload to unstable (Closes: #1002975)
diff -pruN 0.8.0-2/debian/control 0.8.0-2ubuntu2/debian/control
--- 0.8.0-2/debian/control	2022-01-05 20:40:57.000000000 +0000
+++ 0.8.0-2ubuntu2/debian/control	2022-03-01 19:44:16.000000000 +0000
@@ -1,7 +1,8 @@
 Source: capnproto
 Section: devel
 Priority: optional
-Maintainer: Tom Lee <debian@tomlee.co>
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+XSBC-Original-Maintainer: Tom Lee <debian@tomlee.co>
 Uploaders: tony mancill <tmancill@debian.org>
 Build-Depends: cmake,
  debhelper-compat (= 13),
diff -pruN 0.8.0-2/debian/patches/fix_tls_self_signed_test.patch 0.8.0-2ubuntu2/debian/patches/fix_tls_self_signed_test.patch
--- 0.8.0-2/debian/patches/fix_tls_self_signed_test.patch	1970-01-01 00:00:00.000000000 +0000
+++ 0.8.0-2ubuntu2/debian/patches/fix_tls_self_signed_test.patch	2022-03-01 19:44:16.000000000 +0000
@@ -0,0 +1,22 @@
+Description: Fix TLS certificate test expected error messages
+Author: Łukasz 'sil2100' Zemczak <lukasz.zemczak@canonical.com>
+Forwarded: no
+
+--- a/src/kj/compat/tls-test.c++
++++ b/src/kj/compat/tls-test.c++
+@@ -489,13 +489,13 @@
+ 
+ KJ_TEST("TLS certificate validation") {
+   expectInvalidCert("wrong.com", TlsCertificate(kj::str(VALID_CERT, INTERMEDIATE_CERT)),
+-                    "Hostname mismatch");
++                    "hostname mismatch");
+   expectInvalidCert("example.com", TlsCertificate(VALID_CERT),
+                     "unable to get local issuer certificate");
+   expectInvalidCert("example.com", TlsCertificate(kj::str(EXPIRED_CERT, INTERMEDIATE_CERT)),
+                     "certificate has expired");
+   expectInvalidCert("example.com", TlsCertificate(SELF_SIGNED_CERT),
+-                    "self signed certificate");
++                    "self-signed certificate");
+ }
+ 
+ // BoringSSL seems to print error messages differently.
diff -pruN 0.8.0-2/debian/patches/series 0.8.0-2ubuntu2/debian/patches/series
--- 0.8.0-2/debian/patches/series	2022-01-05 20:40:57.000000000 +0000
+++ 0.8.0-2ubuntu2/debian/patches/series	2022-03-01 21:29:03.000000000 +0000
@@ -2,3 +2,5 @@
 02_fixup_cmake.patch
 03_fix_typos.patch
 06_tests_fail_with_ipv6.patch
+fix_tls_self_signed_test.patch
+stringify-most-negative.patch
diff -pruN 0.8.0-2/debian/patches/stringify-most-negative.patch 0.8.0-2ubuntu2/debian/patches/stringify-most-negative.patch
--- 0.8.0-2/debian/patches/stringify-most-negative.patch	1970-01-01 00:00:00.000000000 +0000
+++ 0.8.0-2ubuntu2/debian/patches/stringify-most-negative.patch	2022-03-01 21:29:03.000000000 +0000
@@ -0,0 +1,17 @@
+Index: capnproto-0.8.0/src/kj/string.c++
+===================================================================
+--- capnproto-0.8.0.orig/src/kj/string.c++
++++ capnproto-0.8.0/src/kj/string.c++
+@@ -187,7 +187,11 @@ static CappedArray<char, sizeof(T) * 3 +
+   // We don't use sprintf() because it's not async-signal-safe (for strPreallocated()).
+   CappedArray<char, sizeof(T) * 3 + 2> result;
+   bool negative = i < 0;
+-  Unsigned u = negative ? -i : i;
++  // Note that if `i` is the most-negative value, negating it produces the same bit value. But
++  // since it's a signed integer, this is considered an overflow. We therefore must make it
++  // unsigned first, then negate it, to avoid ubsan complaining.
++  Unsigned u = i;
++  if (negative) u = -u;
+   uint8_t reverse[sizeof(T) * 3 + 1];
+   uint8_t* p = reverse;
+   if (u == 0) {
