diff --git a/SOURCES/boost-1.66.0-bjam-build-flags.patch b/SOURCES/boost-1.66.0-bjam-build-flags.patch
index 34ee6ca1f0e3abd9e2b71e4351e4f422216d51b5..872e071fe6503eac828eb55aad6558a120d709b5 100644
--- a/SOURCES/boost-1.66.0-bjam-build-flags.patch
+++ b/SOURCES/boost-1.66.0-bjam-build-flags.patch
@@ -1,5 +1,5 @@
---- boost_1_66_0/tools/build/src/engine/build.jam~	2018-02-07 21:36:14.552201421 +0000
-+++ boost_1_66_0/tools/build/src/engine/build.jam	2018-02-07 21:36:29.014173266 +0000
+--- boost_1_66_0/tools/build/src/engine/build.jam~	2017-12-13 23:56:50.000000000 +0000
++++ boost_1_66_0/tools/build/src/engine/build.jam	2022-06-22 15:14:26.976935832 +0100
 @@ -4,7 +4,7 @@
  #~ http://www.boost.org/LICENSE_1_0.txt)
  
@@ -9,6 +9,15 @@
  {
      local values ;
      for local x in $($(v))
+@@ -54,7 +54,7 @@
+    ! ( --debug in $(ARGV) ) &&
+    ! ( --profile in $(ARGV) )
+ {
+-    ARGV += --release ;
++    # ARGV += --release ;
+ }
+ 
+ # Enable, and configure, Python hooks.
 @@ -215,12 +215,12 @@
      : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
  ## GCC 2.x, 3.x, 4.x
diff --git a/SPECS/boost.spec b/SPECS/boost.spec
index 0ee76f2f214fe1517cd1f24aa42a959df641ad1b..c25f0b57e537cb2cfe4678515711eeaa5353dc32 100644
--- a/SPECS/boost.spec
+++ b/SPECS/boost.spec
@@ -7,9 +7,16 @@
 %global boost_docdir __tmp_docdir
 %global boost_examplesdir __tmp_examplesdir
 
+%if 0%{?flatpak}
+# For bundling in Flatpak, currently build without mpich and openmpi,
+# which aren't needed and cause prefix=/app errors.
+%bcond_with mpich
+%bcond_with openmpi
+%else
 # All arches have openmpi and mpich
 %bcond_without mpich
 %bcond_without openmpi
+%endif
 
 %ifnarch %{ix86} x86_64 ppc64le aarch64
   %bcond_with context
@@ -27,7 +34,7 @@ Name: boost
 Summary: The free peer-reviewed portable C++ source libraries
 Version: 1.66.0
 %global version_enc 1_66_0
-Release: 10%{?dist}
+Release: 13%{?dist}
 License: Boost and MIT and Python
 
 %global toplev_dirname %{name}_%{version_enc}
@@ -81,6 +88,7 @@ BuildRequires: m4
 BuildRequires: libstdc++-devel
 BuildRequires: bzip2-devel
 BuildRequires: zlib-devel
+BuildRequires: xz-devel
 BuildRequires: python3-devel
 BuildRequires: python3-numpy
 BuildRequires: libicu-devel
@@ -1309,6 +1317,16 @@ fi
 %{_mandir}/man1/bjam.1*
 
 %changelog
+* Wed Jun 22 2022 Jonathan Wakely <jwakely@redhat.com> - 1.66.0-13
+- Remove unused libzstd-devel dependency (#2069831)
+- Preserve hardening flags when building bjam
+
+* Tue Jun 21 2022 Jonathan Wakely <jwakely@redhat.com> - 1.66.0-12
+- Build with lzma and zstd support (#2069831)
+
+* Wed Jan 20 2021 Stephan Bergmann <sbergman@redhat.com> - 1.66.0-11
+- Disable openmpi and mpich for Flatpak-bundled builds (#1895928)
+
 * Tue Aug 04 2020 Jonathan Wakely <jwakely@redhat.com> - 1.66.0-10
 - Revert changes for s390x support in Boost.Context