diff -pruN 3.22.5+dfsg1-2/debian/changelog 3.22.5+dfsg1-2ubuntu2/debian/changelog
--- 3.22.5+dfsg1-2/debian/changelog	2025-04-15 17:07:42.000000000 +0000
+++ 3.22.5+dfsg1-2ubuntu2/debian/changelog	2025-09-07 12:26:42.000000000 +0000
@@ -1,3 +1,19 @@
+petsc (3.22.5+dfsg1-2ubuntu2) questing; urgency=medium
+
+  * No-change rebuild for gfortran 15.
+
+ -- Matthias Klose <doko@ubuntu.com>  Sun, 07 Sep 2025 14:26:42 +0200
+
+petsc (3.22.5+dfsg1-2ubuntu1) plucky; urgency=low
+
+  * Merge from Debian unstable. Remaining changes:
+    - debian/rules: pass -Wl,-z,defs to the linker to guard against future
+      misbuilds.
+    - debian/patches/gcc-13.patch: fix misdetection of required C++
+      library with gcc-13.
+
+ -- Gianfranco Costamagna <locutusofborg@debian.org>  Wed, 16 Apr 2025 11:48:33 +0200
+
 petsc (3.22.5+dfsg1-2) unstable; urgency=medium
 
   * dev packages: complement Depends: mpi-default-dev with
@@ -9,6 +25,16 @@ petsc (3.22.5+dfsg1-2) unstable; urgency
 
  -- Drew Parsons <dparsons@debian.org>  Tue, 15 Apr 2025 19:07:42 +0200
 
+petsc (3.22.5+dfsg1-1ubuntu1) plucky; urgency=low
+
+  * Merge from Debian unstable. Remaining changes:
+    - debian/rules: pass -Wl,-z,defs to the linker to guard against future
+      misbuilds.
+    - debian/patches/gcc-13.patch: fix misdetection of required C++
+      library with gcc-13.
+
+ -- Gianfranco Costamagna <locutusofborg@debian.org>  Tue, 01 Apr 2025 08:02:11 +0200
+
 petsc (3.22.5+dfsg1-1) unstable; urgency=medium
 
   * New upstream release
@@ -18,6 +44,16 @@ petsc (3.22.5+dfsg1-1) unstable; urgency
 
  -- Drew Parsons <dparsons@debian.org>  Mon, 31 Mar 2025 13:03:44 +0200
 
+petsc (3.22.4+dfsg1-2ubuntu1) plucky; urgency=medium
+
+  * Merge from Debian unstable. Remaining changes:
+    - debian/rules: pass -Wl,-z,defs to the linker to guard against future
+      misbuilds.
+    - debian/patches/gcc-13.patch: fix misdetection of required C++
+      library with gcc-13.
+
+ -- Gianfranco Costamagna <locutusofborg@debian.org>  Fri, 14 Mar 2025 18:04:24 +0100
+
 petsc (3.22.4+dfsg1-2) unstable; urgency=medium
 
   * debian/tests: set OMPI_MCA_btl_tcp_if_include=lo to avoid openmpi
@@ -26,24 +62,82 @@ petsc (3.22.4+dfsg1-2) unstable; urgency
 
  -- Drew Parsons <dparsons@debian.org>  Fri, 14 Mar 2025 11:25:18 +0100
 
+petsc (3.22.4+dfsg1-1ubuntu1) plucky; urgency=low
+
+  * Merge from Debian unstable. Remaining changes:
+    - debian/rules: pass -Wl,-z,defs to the linker to guard against future
+      misbuilds.
+    - debian/patches/gcc-13.patch: fix misdetection of required C++
+      library with gcc-13.
+
+ -- Gianfranco Costamagna <locutusofborg@debian.org>  Wed, 12 Mar 2025 08:32:08 +0100
+
 petsc (3.22.4+dfsg1-1) unstable; urgency=medium
 
   * New upstream release
 
  -- Drew Parsons <dparsons@debian.org>  Tue, 11 Mar 2025 15:25:50 +0100
 
+petsc (3.22.3+dfsg1-1ubuntu1) plucky; urgency=low
+
+  * Merge from Debian unstable. Remaining changes:
+    - debian/rules: pass -Wl,-z,defs to the linker to guard against future
+      misbuilds.
+    - debian/patches/gcc-13.patch: fix misdetection of required C++
+      library with gcc-13.
+
+ -- Gianfranco Costamagna <locutusofborg@debian.org>  Mon, 03 Mar 2025 10:22:17 +0100
+
 petsc (3.22.3+dfsg1-1) unstable; urgency=medium
 
   * New upstream release
 
  -- Drew Parsons <dparsons@debian.org>  Tue, 18 Feb 2025 15:00:59 +0100
 
+petsc (3.22.2+dfsg1-1ubuntu2) plucky; urgency=medium
+
+  * No-change rebuild against libhdf5-310
+
+ -- Miriam España Acebal <miriam.espana@canonical.com>  Sun, 26 Jan 2025 11:05:24 +0000
+
+petsc (3.22.2+dfsg1-1ubuntu1) plucky; urgency=medium
+
+  * Merge from Debian unstable. Remaining changes:
+    - debian/rules: pass -Wl,-z,defs to the linker to guard against future
+      misbuilds.
+    - debian/patches/gcc-13.patch: fix misdetection of required C++
+      library with gcc-13.
+
+ -- Sudip Mukherjee <sudipm.mukherjee@gmail.com>  Mon, 16 Dec 2024 22:20:21 +0000
+
 petsc (3.22.2+dfsg1-1) unstable; urgency=medium
 
   * New upstream release
 
  -- Drew Parsons <dparsons@debian.org>  Sun, 08 Dec 2024 19:23:27 +0100
 
+petsc (3.22.1+dfsg1-2ubuntu3) plucky; urgency=medium
+
+  * No-change rebuild for mpich_4.2.1-2.
+
+ -- Sudip Mukherjee <sudipm.mukherjee@gmail.com>  Wed, 11 Dec 2024 22:01:14 +0000
+
+petsc (3.22.1+dfsg1-2ubuntu2) plucky; urgency=medium
+
+  * No-change rebuild for libopenmpi40
+
+ -- Sudip Mukherjee <sudipm.mukherjee@gmail.com>  Thu, 05 Dec 2024 12:02:32 +0000
+
+petsc (3.22.1+dfsg1-2ubuntu1) plucky; urgency=low
+
+  * Merge from Debian unstable. Remaining changes:
+    - debian/rules: pass -Wl,-z,defs to the linker to guard against future
+      misbuilds.
+    - debian/patches/gcc-13.patch: fix misdetection of required C++
+      library with gcc-13.
+
+ -- Gianfranco Costamagna <locutusofborg@debian.org>  Sat, 30 Nov 2024 10:55:21 +0100
+
 petsc (3.22.1+dfsg1-2) unstable; urgency=medium
 
   * upload petsc 3.22 to unstable. Transition #1082552.
@@ -80,6 +174,22 @@ petsc (3.21.6+dfsg1-3) unstable; urgency
 
  -- Francesco Ballarin <francesco.ballarin@unicatt.it>  Wed, 20 Nov 2024 06:42:09 +0000
 
+petsc (3.21.6+dfsg1-2ubuntu2) plucky; urgency=medium
+
+  * No-change rebuild for libsuperlu7
+
+ -- Sudip Mukherjee <sudipm.mukherjee@gmail.com>  Mon, 04 Nov 2024 15:17:00 +0000
+
+petsc (3.21.6+dfsg1-2ubuntu1) plucky; urgency=low
+
+  * Merge from Debian unstable. Remaining changes:
+    - debian/rules: pass -Wl,-z,defs to the linker to guard against future
+      misbuilds.
+    - debian/patches/gcc-13.patch: fix misdetection of required C++
+      library with gcc-13.
+
+ -- Gianfranco Costamagna <locutusofborg@debian.org>  Fri, 01 Nov 2024 15:40:36 +0100
+
 petsc (3.21.6+dfsg1-2) unstable; urgency=medium
 
   * Add Francesco Ballarin to uploaders
@@ -125,6 +235,22 @@ petsc (3.21.4+dfsg1-1exp1) experimental;
 
  -- Drew Parsons <dparsons@debian.org>  Sat, 24 Aug 2024 18:22:02 +0200
 
+petsc (3.20.6+dfsg1-3ubuntu3) oracular; urgency=medium
+
+  * No-change rebuild against mpi-defaults 1.17
+
+ -- Graham Inggs <ginggs@ubuntu.com>  Sat, 21 Sep 2024 14:51:30 +0000
+
+petsc (3.20.6+dfsg1-3ubuntu2) oracular; urgency=medium
+
+  * Merge with Debian; remaining changes:
+    - debian/rules: pass -Wl,-z,defs to the linker to guard against future
+      misbuilds.
+    - debian/patches/gcc-13.patch: fix misdetection of required C++
+      library with gcc-13.
+
+ -- Matthias Klose <doko@ubuntu.com>  Fri, 23 Aug 2024 14:34:09 +0200
+
 petsc (3.20.6+dfsg1-3) unstable; urgency=medium
 
   * build 64-bit petsc against scotch-int64 not scotch-long
@@ -151,6 +277,16 @@ petsc (3.20.6+dfsg1-2) unstable; urgency
 
  -- Drew Parsons <dparsons@debian.org>  Wed, 21 Aug 2024 20:09:11 +0200
 
+petsc (3.20.6+dfsg1-1ubuntu1) oracular; urgency=medium
+
+  * Merge from Debian unstable. Remaining changes:
+    - debian/patches/gcc-13.patch: fix misdetection of required C++
+      library with gcc-13.
+    - debian/rules: pass -Wl,-z,defs to the linker to guard against future
+      misbuilds.
+
+ -- Gianfranco Costamagna <locutusofborg@debian.org>  Sat, 18 May 2024 10:01:06 +0200
+
 petsc (3.20.6+dfsg1-1) unstable; urgency=medium
 
   * New upstream release.
@@ -183,6 +319,28 @@ petsc (3.20.3+dfsg1-1exp1) experimental;
 
  -- Drew Parsons <dparsons@debian.org>  Tue, 12 Mar 2024 19:57:49 +0100
 
+petsc (3.19.6+dfsg1-2.2ubuntu3) oracular; urgency=medium
+
+  * Rebuild against new libhypre-2.29.0.
+
+ -- Gianfranco Costamagna <locutusofborg@debian.org>  Sat, 18 May 2024 08:34:10 +0200
+
+petsc (3.19.6+dfsg1-2.2ubuntu2) noble; urgency=medium
+
+  * No-change rebuild for CVE-2024-3094
+
+ -- Steve Langasek <steve.langasek@ubuntu.com>  Sun, 31 Mar 2024 06:45:22 +0000
+
+petsc (3.19.6+dfsg1-2.2ubuntu1) noble; urgency=low
+
+  * Merge from Debian unstable. Remaining changes:
+    - debian/patches/gcc-13.patch: fix misdetection of required C++
+      library with gcc-13.
+    - debian/rules: pass -Wl,-z,defs to the linker to guard against future
+      misbuilds.
+
+ -- Gianfranco Costamagna <locutusofborg@debian.org>  Mon, 04 Mar 2024 09:20:10 +0100
+
 petsc (3.19.6+dfsg1-2.2) unstable; urgency=medium
 
   * Non-maintainer upload.
@@ -191,6 +349,16 @@ petsc (3.19.6+dfsg1-2.2) unstable; urgen
 
  -- Steve Langasek <vorlon@debian.org>  Sun, 03 Mar 2024 21:40:10 +0000
 
+petsc (3.19.6+dfsg1-2.1ubuntu1) noble; urgency=low
+
+  * Merge from Debian unstable. Remaining changes:
+    - debian/patches/gcc-13.patch: fix misdetection of required C++
+      library with gcc-13.
+    - debian/rules: pass -Wl,-z,defs to the linker to guard against future
+      misbuilds.
+
+ -- Gianfranco Costamagna <locutusofborg@debian.org>  Fri, 01 Mar 2024 12:16:48 +0100
+
 petsc (3.19.6+dfsg1-2.1) unstable; urgency=medium
 
   * Non-maintainer upload.
@@ -198,6 +366,16 @@ petsc (3.19.6+dfsg1-2.1) unstable; urgen
 
  -- Benjamin Drung <bdrung@debian.org>  Thu, 29 Feb 2024 20:22:10 +0000
 
+petsc (3.19.6+dfsg1-2ubuntu1) noble; urgency=medium
+
+  * Merge from Debian unstable. Remaining changes:
+    - debian/patches/gcc-13.patch: fix misdetection of required C++
+      library with gcc-13.
+    - debian/rules: pass -Wl,-z,defs to the linker to guard against future
+      misbuilds.
+
+ -- Gianfranco Costamagna <locutusofborg@debian.org>  Mon, 22 Jan 2024 08:53:48 +0100
+
 petsc (3.19.6+dfsg1-2) unstable; urgency=medium
 
   * Update debian/patches/soname_extension to also add a define PETSC_LIB_EXT,
@@ -206,6 +384,16 @@ petsc (3.19.6+dfsg1-2) unstable; urgency
 
  -- Francesco Ballarin <francesco.ballarin@unicatt.it>  Sun, 21 Jan 2024 06:41:21 +0000
 
+petsc (3.19.6+dfsg1-1ubuntu1) noble; urgency=low
+
+  * Merge from Debian unstable. Remaining changes:
+    - debian/patches/gcc-13.patch: fix misdetection of required C++
+      library with gcc-13.
+    - debian/rules: pass -Wl,-z,defs to the linker to guard against future
+      misbuilds.
+
+ -- Gianfranco Costamagna <locutusofborg@debian.org>  Sun, 24 Dec 2023 09:35:58 +0100
+
 petsc (3.19.6+dfsg1-1) unstable; urgency=medium
 
   * New upstream release.
@@ -233,6 +421,33 @@ petsc (3.19.2+dfsg1-1exp1) experimental;
 
  -- Drew Parsons <dparsons@debian.org>  Tue, 20 Jun 2023 16:17:08 +0200
 
+petsc (3.18.6+dfsg1-1ubuntu3) noble; urgency=medium
+
+  * Rebuild against new libcholmod5.
+
+ -- Gianfranco Costamagna <locutusofborg@debian.org>  Thu, 23 Nov 2023 17:47:49 +0100
+
+petsc (3.18.6+dfsg1-1ubuntu2) noble; urgency=medium
+
+  * Rebuild against new libspqr4.
+
+ -- Gianfranco Costamagna <locutusofborg@debian.org>  Fri, 27 Oct 2023 10:49:22 +0200
+
+petsc (3.18.6+dfsg1-1ubuntu1) mantic; urgency=medium
+
+  * debian/patches/gcc-13.patch: fix misdetection of required C++
+    library with gcc-13.
+  * debian/rules: pass -Wl,-z,defs to the linker to guard against future
+    misbuilds.
+
+ -- Steve Langasek <steve.langasek@ubuntu.com>  Wed, 16 Aug 2023 08:42:11 -0700
+
+petsc (3.18.6+dfsg1-1build1) mantic; urgency=medium
+
+  * No-change rebuild against libamd3
+
+ -- Steve Langasek <steve.langasek@ubuntu.com>  Sun, 30 Jul 2023 20:56:16 +0000
+
 petsc (3.18.6+dfsg1-1) unstable; urgency=medium
 
   * New upstream release.
diff -pruN 3.22.5+dfsg1-2/debian/control 3.22.5+dfsg1-2ubuntu2/debian/control
--- 3.22.5+dfsg1-2/debian/control	2025-04-15 17:07:42.000000000 +0000
+++ 3.22.5+dfsg1-2ubuntu2/debian/control	2025-04-15 22:28:05.000000000 +0000
@@ -1,7 +1,8 @@
 Source: petsc
 Section: devel
 Priority: optional
-Maintainer: Debian Science Maintainers <debian-science-maintainers@lists.alioth.debian.org>
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+XSBC-Original-Maintainer: Debian Science Maintainers <debian-science-maintainers@lists.alioth.debian.org>
 Uploaders:
  "Adam C. Powell, IV" <hazelsct@debian.org>,
  Drew Parsons <dparsons@debian.org>,
diff -pruN 3.22.5+dfsg1-2/debian/patches/gcc-13.patch 3.22.5+dfsg1-2ubuntu2/debian/patches/gcc-13.patch
--- 3.22.5+dfsg1-2/debian/patches/gcc-13.patch	1970-01-01 00:00:00.000000000 +0000
+++ 3.22.5+dfsg1-2ubuntu2/debian/patches/gcc-13.patch	2024-12-16 22:18:25.000000000 +0000
@@ -0,0 +1,27 @@
+Description: fix misdetection of required C++ library with gcc-13
+ petsc tries to autodetect what libraries need to be passed to the C
+ compiler in order to correctly link C++ code.  Unfortunately, the test
+ case somehow manages to build just fine without an explicit -lstdc++
+ argument under gcc-13, causing missing linkage.  Hard code the library
+ option instead.
+Author: Steve Langasek <steve.langasek@ubuntu.com>
+Forwarded: no
+Last-Update: 2023-08-15
+
+Index: petsc-3.19.6+dfsg1-1ubuntu1/config/BuildSystem/config/compilers.py
+===================================================================
+--- petsc-3.19.6+dfsg1-1ubuntu1.orig/config/BuildSystem/config/compilers.py
++++ petsc-3.19.6+dfsg1-1ubuntu1/config/BuildSystem/config/compilers.py
+@@ -458,6 +458,12 @@
+     '''Determines the libraries needed to link using the C or Fortran compiler C++ source code compiled with C++. Result is stored in cxxlibs'''
+     skipcxxlibraries = 1
+     self.setCompilers.saveLog()
++    oldLibs = self.setCompilers.LIBS
++    self.setCompilers.LIBS = '-lstdc++ '+self.setCompilers.LIBS
++    self.logWrite(self.setCompilers.restoreLog())
++    self.logPrint('C++ requires -lstdc++ to link with C compiler', 3, 'compilers')
++    return
++
+     body   = '''#include <iostream>\n#include <vector>\nvoid asub(void)\n{std::vector<int> v;\ntry  { throw 20;  }  catch (int e)  { std::cout << "An exception occurred";  }}'''
+     oldLibs = ''
+     try:
diff -pruN 3.22.5+dfsg1-2/debian/patches/series 3.22.5+dfsg1-2ubuntu2/debian/patches/series
--- 3.22.5+dfsg1-2/debian/patches/series	2025-04-15 17:07:42.000000000 +0000
+++ 3.22.5+dfsg1-2ubuntu2/debian/patches/series	2025-04-15 22:28:05.000000000 +0000
@@ -12,3 +12,4 @@ label_tests.patch
 downloaded_SAWs.js.patch
 configure_python3.patch
 petscmatmod_split.patch
+gcc-13.patch
diff -pruN 3.22.5+dfsg1-2/debian/rules 3.22.5+dfsg1-2ubuntu2/debian/rules
--- 3.22.5+dfsg1-2/debian/rules	2025-04-15 17:07:42.000000000 +0000
+++ 3.22.5+dfsg1-2ubuntu2/debian/rules	2025-04-15 22:28:05.000000000 +0000
@@ -165,7 +165,9 @@ CONFIGURATION_OPTIONS=--with-shared-libr
 	  --with-fftw=1 --with-fftw-include=[] --with-fftw-lib="-lfftw3 -lfftw3_mpi" \
 	  --with-yaml=1 \
 	  $(VALGRIND_CONFIG) \
-	  $(PETSC_HDF5_FLAGS) --CXX_LINKER_FLAGS="-Wl,--no-as-needed"
+	  $(PETSC_HDF5_FLAGS) \
+          --CXX_LINKER_FLAGS="-Wl,--no-as-needed -Wl,-z,defs" \
+          --CC_LINKER_FLAGS="-Wl,-z,defs"
 
 
 # hypre is only supported with real numbers, not complex
