diff -pruN 1.3.9-1/debian/changelog 1.3.9-1ubuntu2/debian/changelog
--- 1.3.9-1/debian/changelog	2021-08-31 14:29:45.000000000 +0000
+++ 1.3.9-1ubuntu2/debian/changelog	2022-10-05 14:22:49.000000000 +0000
@@ -1,3 +1,18 @@
+powerpc-utils (1.3.9-1ubuntu2) kinetic; urgency=medium
+
+  * d/p/lp1986667/*.patch: fix FTBFS due to new GCC 12 warnings (LP: #1986667)
+
+ -- Simon Chopin <schopin@ubuntu.com>  Wed, 05 Oct 2022 16:22:49 +0200
+
+powerpc-utils (1.3.9-1ubuntu1) jammy; urgency=medium
+
+  * Merge with Debian; remaining changes:
+    - Add d/p/0002-Fix-gcc-10-compilation.patch to fix more compilation
+      under GCC-10.
+    - Disable lto for now. See LP #1922078.
+
+ -- Lukas Märdian <slyon@ubuntu.com>  Thu, 20 Jan 2022 10:00:03 +0100
+
 powerpc-utils (1.3.9-1) unstable; urgency=medium
 
   * New upstream release
@@ -8,12 +23,40 @@ powerpc-utils (1.3.9-1) unstable; urgenc
 
  -- John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>  Tue, 31 Aug 2021 16:29:45 +0200
 
+powerpc-utils (1.3.8-3ubuntu2) impish; urgency=medium
+
+  * No-change rebuild to build packages with zstd compression.
+
+ -- Matthias Klose <doko@ubuntu.com>  Thu, 07 Oct 2021 12:22:25 +0200
+
+powerpc-utils (1.3.8-3ubuntu1) impish; urgency=medium
+
+  * Merge with Debian; remaining changes:
+    - Add d/p/0002-Fix-gcc-10-compilation.patch to fix more compilation
+      under GCC-10.
+    - Disable lto for now. See LP #1922078.
+
+ -- Matthias Klose <doko@ubuntu.com>  Mon, 10 May 2021 14:23:14 +0200
+
 powerpc-utils (1.3.8-3) unstable; urgency=medium
 
   * Add patch to move definition of SYS_PATH from l2of_vs() to l2of_scsi()
 
  -- John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>  Tue, 09 Feb 2021 00:40:45 +0100
 
+powerpc-utils (1.3.8-2ubuntu2) hirsute; urgency=medium
+
+  * Disable lto for now. See LP #1922078.
+
+ -- Matthias Klose <doko@ubuntu.com>  Wed, 31 Mar 2021 12:53:30 +0100
+
+powerpc-utils (1.3.8-2ubuntu1) hirsute; urgency=medium
+
+  * Add d/p/0002-Fix-gcc-10-compilation.patch to fix more compilation
+    under GCC-10.
+
+ -- Dave Jones <dave.jones@canonical.com>  Mon, 02 Nov 2020 13:20:08 +0000
+
 powerpc-utils (1.3.8-2) unstable; urgency=medium
 
   * Add patch to fix format specifiers in printf() and sprintf() calls
diff -pruN 1.3.9-1/debian/control 1.3.9-1ubuntu2/debian/control
--- 1.3.9-1/debian/control	2021-08-31 14:29:45.000000000 +0000
+++ 1.3.9-1ubuntu2/debian/control	2022-01-20 08:59:19.000000000 +0000
@@ -1,7 +1,8 @@
 Source: powerpc-utils
 Section: utils
 Priority: important
-Maintainer: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+XSBC-Original-Maintainer: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
 Uploaders: Frederic Bonnard <frederic@fr.ibm.com>
 Build-Depends: debhelper-compat (= 12), dh-autoreconf, libnuma-dev, librtas-dev, librtasevent-dev, zlib1g-dev
 Standards-Version: 4.5.1
diff -pruN 1.3.9-1/debian/patches/0002-Fix-gcc-10-compilation.patch 1.3.9-1ubuntu2/debian/patches/0002-Fix-gcc-10-compilation.patch
--- 1.3.9-1/debian/patches/0002-Fix-gcc-10-compilation.patch	1970-01-01 00:00:00.000000000 +0000
+++ 1.3.9-1ubuntu2/debian/patches/0002-Fix-gcc-10-compilation.patch	2022-01-20 08:56:15.000000000 +0000
@@ -0,0 +1,41 @@
+Author: Dave Jones <dave.jones@canonical.com>
+Forwarded: no
+Description: Fix compilation errors under GCC-10
+
+Index: powerpc-utils-1.3.8/src/drmgr/common.c
+===================================================================
+--- powerpc-utils-1.3.8.orig/src/drmgr/common.c
++++ powerpc-utils-1.3.8/src/drmgr/common.c
+@@ -18,6 +18,7 @@
+  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+  */
+ 
++#include <assert.h>
+ #include <fcntl.h>
+ #include <sys/stat.h>
+ #include <time.h>
+@@ -731,6 +732,7 @@ get_att_prop(const char *path, const cha
+ 		break;
+ 
+ 	    case 's':	/* sysfs */
++		assert(attr_type);
+ 		rc = fscanf(fp, attr_type, (int *)buf);
+ 		break;
+ 	}
+Index: powerpc-utils-1.3.8/src/drmgr/common_pci.c
+===================================================================
+--- powerpc-utils-1.3.8.orig/src/drmgr/common_pci.c
++++ powerpc-utils-1.3.8/src/drmgr/common_pci.c
+@@ -422,8 +422,10 @@ create_vio_nodes(const char *ofdt_path,
+ 		if ((de->d_type != DT_DIR) || is_dot_dir(de->d_name))
+ 			continue;
+ 
+-		snprintf(child_path, DR_PATH_MAX, "%s/%s", ofdt_path,
+-			 de->d_name);
++		assert(strlen(ofdt_path) + 1 + strlen(de->d_name) < DR_PATH_MAX);
++		if (snprintf(child_path, DR_PATH_MAX, "%s/%s", ofdt_path,
++			     de->d_name) >= DR_PATH_MAX)
++			abort();
+ 		if (get_my_drc_index(child_path, &my_drc_index))
+ 			continue;
+ 		drc = NULL;
diff -pruN 1.3.9-1/debian/patches/lp1986667/0001-vcpustat-fix-GCC-12-uninitialized-field-warning.patch 1.3.9-1ubuntu2/debian/patches/lp1986667/0001-vcpustat-fix-GCC-12-uninitialized-field-warning.patch
--- 1.3.9-1/debian/patches/lp1986667/0001-vcpustat-fix-GCC-12-uninitialized-field-warning.patch	1970-01-01 00:00:00.000000000 +0000
+++ 1.3.9-1ubuntu2/debian/patches/lp1986667/0001-vcpustat-fix-GCC-12-uninitialized-field-warning.patch	2022-10-05 14:22:49.000000000 +0000
@@ -0,0 +1,32 @@
+From f997adc664a6de8e50f56b7b3512c6027e1f271f Mon Sep 17 00:00:00 2001
+From: Simon Chopin <simon.chopin@canonical.com>
+Date: Wed, 5 Oct 2022 15:02:29 +0200
+Subject: [PATCH 1/3] vcpustat: fix GCC-12 uninitialized field warning
+
+This warning might actually have been legitimate, as the '-r -n' option
+combination doesn't look prohibited in the tool.
+
+Bug: https://github.com/ibm-power-utilities/powerpc-utils/issues/85
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/powerpc-utils/+bug/1986667
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1018039
+Forwarded: https://github.com/ibm-power-utilities/powerpc-utils/pull/87
+---
+ src/vcpustat.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/vcpustat.c b/src/vcpustat.c
+index 415846f..d17afe7 100644
+--- a/src/vcpustat.c
++++ b/src/vcpustat.c
+@@ -141,7 +141,7 @@ void print_stats(struct vcpudispatch_stat stats1[],
+ 	char raw_header1[] = "%22s %43s | %32s\n";
+ 	char raw_header2[] = "%-7s | %10s | %10s %10s %10s %10s | %10s %10s %10s\n";
+ 	char raw_fmt[] = "cpu%-4d | %10d | %10d %10d %10d %10d | %10d %10d %10d\n";
+-	struct vcpudispatch_stat stat;
++	struct vcpudispatch_stat stat = {};
+ 	int i;
+ 
+ 	if (stats_off) {
+-- 
+2.37.2
+
diff -pruN 1.3.9-1/debian/patches/lp1986667/0002-ppc64_cpu-Variable-maybe-unitilized-at-the-time-of-r.patch 1.3.9-1ubuntu2/debian/patches/lp1986667/0002-ppc64_cpu-Variable-maybe-unitilized-at-the-time-of-r.patch
--- 1.3.9-1/debian/patches/lp1986667/0002-ppc64_cpu-Variable-maybe-unitilized-at-the-time-of-r.patch	1970-01-01 00:00:00.000000000 +0000
+++ 1.3.9-1ubuntu2/debian/patches/lp1986667/0002-ppc64_cpu-Variable-maybe-unitilized-at-the-time-of-r.patch	2022-10-05 14:22:49.000000000 +0000
@@ -0,0 +1,40 @@
+From 50b52d3bdae3eaa8629e1bf2f31bc5d07cc76638 Mon Sep 17 00:00:00 2001
+From: "Pratik R. Sampat" <psampat@linux.ibm.com>
+Date: Tue, 8 Jun 2021 19:22:25 +0530
+Subject: [PATCH 2/3] ppc64_cpu: Variable maybe unitilized at the time of
+ return
+
+Variable "rc" maybe unitilized, as rc's value is assigned within a loop
+with no guarantee the loop will execute and can return undefined values.
+
+Therefore, fix the bug by initializing the return code to zero.
+
+Fixes: 49ad3ef26883 ("This is really more of a re-write than an update")
+Signed-off-by: Pratik R. Sampat <psampat@linux.ibm.com>
+Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
+
+Origin: upstream, https://github.com/ibm-power-utilities/powerpc-utils/commit/0255a7b2bc62a8b41b79e3fe446361e1278cf374
+Applied-Upstrea: 1.3.10
+Bug: https://github.com/ibm-power-utilities/powerpc-utils/issues/85
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/powerpc-utils/+bug/1986667
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1018039
+---
+ src/ppc64_cpu.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/ppc64_cpu.c b/src/ppc64_cpu.c
+index 2b0f66c..49834b4 100644
+--- a/src/ppc64_cpu.c
++++ b/src/ppc64_cpu.c
+@@ -291,7 +291,7 @@ static int set_one_smt_state(int thread, int online_threads)
+ 
+ static int set_smt_state(int smt_state)
+ {
+-	int i, j, rc;
++	int i, j, rc = 0;
+ 	int error = 0;
+ 
+ 	if (!sysattr_is_writeable("online")) {
+-- 
+2.37.2
+
diff -pruN 1.3.9-1/debian/patches/lp1986667/0003-Ignore-Waddress-warnings-telling-us-to-remove-NULL-c.patch 1.3.9-1ubuntu2/debian/patches/lp1986667/0003-Ignore-Waddress-warnings-telling-us-to-remove-NULL-c.patch
--- 1.3.9-1/debian/patches/lp1986667/0003-Ignore-Waddress-warnings-telling-us-to-remove-NULL-c.patch	1970-01-01 00:00:00.000000000 +0000
+++ 1.3.9-1ubuntu2/debian/patches/lp1986667/0003-Ignore-Waddress-warnings-telling-us-to-remove-NULL-c.patch	2022-10-05 14:22:49.000000000 +0000
@@ -0,0 +1,57 @@
+From 96a8ddf0cfbdf163d9dda12c7016082ebc33f8bf Mon Sep 17 00:00:00 2001
+From: Simon Chopin <simon.chopin@canonical.com>
+Date: Wed, 5 Oct 2022 15:59:46 +0200
+Subject: [PATCH 3/3] Ignore -Waddress warnings telling us to remove NULL
+ checks
+
+GCC 12 seems to think those checks are useless, but it's not really
+obvious that they are. So rather than doing the easy thing and remove
+the guard clauses, we disable the warnings locally.
+
+Bug: https://github.com/ibm-power-utilities/powerpc-utils/issues/85
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/powerpc-utils/+bug/1986667
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1018039
+Forwarded: no, waiting for a proper upstream fix instead
+---
+ src/drmgr/common_pci.c      | 3 +++
+ src/drmgr/drslot_chrp_hea.c | 3 +++
+ 2 files changed, 6 insertions(+)
+
+diff --git a/src/drmgr/common_pci.c b/src/drmgr/common_pci.c
+index cbd48c9..0fe0051 100644
+--- a/src/drmgr/common_pci.c
++++ b/src/drmgr/common_pci.c
+@@ -462,8 +462,11 @@ devspec_check_node(struct dr_node *node, char *sysfs_path,
+ 
+ 	*found = 0;
+ 
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Waddress"
+ 	if (node->ofdt_path == NULL)
+ 		return 0;
++#pragma GCC diagnostic pop
+ 
+ 	if (! strcmp(full_of_path, node->ofdt_path)) {
+ 		snprintf(node->sysfs_dev_path, DR_PATH_MAX, "%s", sysfs_path);
+diff --git a/src/drmgr/drslot_chrp_hea.c b/src/drmgr/drslot_chrp_hea.c
+index 98b96e0..abe2454 100644
+--- a/src/drmgr/drslot_chrp_hea.c
++++ b/src/drmgr/drslot_chrp_hea.c
+@@ -121,11 +121,14 @@ hotplug_port(int action, struct dr_node *hea, struct dr_node *port)
+ 
+ 	say(DEBUG, "Attempting to hotplug %s Port.\n", action_str);
+ 	
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Waddress"
+ 	if (! hea->sysfs_dev_path) {
+ 		say(DEBUG, "Non-existant sysfs dev path for Port, hotplug "
+ 		    "failed.\n");
+ 		return -EINVAL;
+ 	}
++#pragma GCC diagnostic pop
+ 
+ 	rc = get_property(port->ofdt_path, "ibm,hea-port-no", &port_no,
+ 			  sizeof(port_no));
+-- 
+2.37.2
+
diff -pruN 1.3.9-1/debian/patches/series 1.3.9-1ubuntu2/debian/patches/series
--- 1.3.9-1/debian/patches/series	2021-08-31 14:29:45.000000000 +0000
+++ 1.3.9-1ubuntu2/debian/patches/series	2022-10-05 14:22:33.000000000 +0000
@@ -1,3 +1,7 @@
 0001-Change-program-path-for-udevadm-from-usr-bin-to-bin.patch
 0002-Fix-format-specifiers-in-printf-and-sprintf-calls.patch
 0003-Replace-incorrect-use-of-strncpy-with-memcpy.patch
+0002-Fix-gcc-10-compilation.patch
+lp1986667/0001-vcpustat-fix-GCC-12-uninitialized-field-warning.patch
+lp1986667/0002-ppc64_cpu-Variable-maybe-unitilized-at-the-time-of-r.patch
+lp1986667/0003-Ignore-Waddress-warnings-telling-us-to-remove-NULL-c.patch
diff -pruN 1.3.9-1/debian/rules 1.3.9-1ubuntu2/debian/rules
--- 1.3.9-1/debian/rules	2021-08-31 14:29:45.000000000 +0000
+++ 1.3.9-1ubuntu2/debian/rules	2022-01-20 08:56:15.000000000 +0000
@@ -4,6 +4,8 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+export DEB_BUILD_MAINT_OPTIONS = optimize=-lto
+
 %:
 	dh $@ --with autoreconf --parallel
 
