diff --git a/0010-Fix-vdo-g_memdup-not-compat-with-glib2-2.68.patch b/0010-Fix-vdo-g_memdup-not-compat-with-glib2-2.68.patch new file mode 100644 index 0000000000000000000000000000000000000000..d4d511b57a1d88e0ac6a72d5259fa466789b0786 --- /dev/null +++ b/0010-Fix-vdo-g_memdup-not-compat-with-glib2-2.68.patch @@ -0,0 +1,39 @@ +diff --git a/src/lib/plugin_apis/vdo.api b/src/lib/plugin_apis/vdo.api +index 936f8e0..1c99cab 100644 +--- a/src/lib/plugin_apis/vdo.api ++++ b/src/lib/plugin_apis/vdo.api +@@ -170,7 +170,7 @@ void bd_vdo_stats_free (BDVDOStats *stats) { + * Deprecated: 2.24: Use LVM-VDO integration instead. + */ + BDVDOStats* bd_vdo_stats_copy (BDVDOStats *stats) { +- return g_memdup (stats, sizeof (BDVDOStats)); ++ return g_memdup2 (stats, sizeof (BDVDOStats)); + } + + GType bd_vdo_stats_get_type () { +diff --git a/src/lib/plugin_apis/vdo.c b/src/lib/plugin_apis/vdo.c +index 40563ee..146660f 100644 +--- a/src/lib/plugin_apis/vdo.c ++++ b/src/lib/plugin_apis/vdo.c +@@ -106,7 +106,7 @@ void bd_vdo_stats_free (BDVDOStats *stats) { + * Deprecated: 2.24: Use LVM-VDO integration instead. + */ + BDVDOStats* bd_vdo_stats_copy (BDVDOStats *stats) { +- return g_memdup (stats, sizeof (BDVDOStats)); ++ return g_memdup2 (stats, sizeof (BDVDOStats)); + } + + GType bd_vdo_stats_get_type () { +diff --git a/src/plugins/vdo.c b/src/plugins/vdo.c +index 2352394..3502874 100644 +--- a/src/plugins/vdo.c ++++ b/src/plugins/vdo.c +@@ -81,7 +81,7 @@ void bd_vdo_stats_free (BDVDOStats *stats) { + } + + BDVDOStats* bd_vdo_stats_copy (BDVDOStats *stats) { +- return g_memdup (stats, sizeof (BDVDOStats)); ++ return g_memdup2 (stats, sizeof (BDVDOStats)); + } + + diff --git a/libblockdev.spec b/libblockdev.spec index 8adc9949961e873c0e50f21d820543a6a1bf6b9c..3fac07dfa30317514b2dc5f5923a1cb3b23249c4 100644 --- a/libblockdev.spec +++ b/libblockdev.spec @@ -1,3 +1,5 @@ +%define anolis_release .0.1 + %define with_python2 1 %define with_python3 1 %define with_gtk_doc 1 @@ -125,7 +127,7 @@ Name: libblockdev Version: 2.24 -Release: 11%{?dist} +Release: 11%{anolis_release}%{?dist} Summary: A library for low-level manipulation with block devices License: LGPLv2+ URL: https://github.com/storaged-project/libblockdev @@ -139,6 +141,7 @@ Patch5: 0006-Fix-vdo-stats-calculation.patch Patch6: 0007-ddf-mdadm-uuid-parse-fix.patch Patch7: 0008-mdraid-Fix-copy-paste-error-when-checking-return-val.patch Patch8: 0009-mdraid-Fix-use-after-free.patch +Patch9: 0010-Fix-vdo-g_memdup-not-compat-with-glib2-2.68.patch BuildRequires: glib2-devel %if %{with_gi} @@ -703,6 +706,7 @@ A meta-package that pulls all the libblockdev plugins as dependencies. %patch6 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 %build autoreconf -ivf @@ -1006,6 +1010,9 @@ find %{buildroot} -type f -name "*.la" | xargs %{__rm} %files plugins-all %changelog +* Fri May 26 2023 Chang Gao - 2.24-11.0.1 +- Fix build failed with glib2-2.68 + * Mon Aug 08 2022 Vojtech Trefny - 2.24-11 - mdraid: Fix use after free Related: rhbz#2078815