diff options
Diffstat (limited to 'community/libblockdev')
-rw-r--r-- | community/libblockdev/APKBUILD | 10 | ||||
-rw-r--r-- | community/libblockdev/dont-use-deprecated-g_memdup.patch | 68 |
2 files changed, 5 insertions, 73 deletions
diff --git a/community/libblockdev/APKBUILD b/community/libblockdev/APKBUILD index dbdf148bc7..a67eac2ebe 100644 --- a/community/libblockdev/APKBUILD +++ b/community/libblockdev/APKBUILD @@ -1,8 +1,8 @@ # Contributor: Rasmus Thomsen <oss@cogitri.dev> # Maintainer: Rasmus Thomsen <oss@cogitri.dev> pkgname=libblockdev -pkgver=2.25 -pkgrel=1 +pkgver=2.26 +pkgrel=0 pkgdesc="Library for manipulating block devices" url="https://github.com/storaged-project/libblockdev" arch="all" @@ -13,7 +13,6 @@ makedepends="python3 cryptsetup-dev libbytesize-dev ndctl-dev lvm2-dev subpackages="$pkgname-dev py3-$pkgname:_py3:noarch" source="https://github.com/storaged-project/libblockdev/releases/download/$pkgver-1/libblockdev-$pkgver.tar.gz fix-glibc-glob-onlydir.patch - dont-use-deprecated-g_memdup.patch " build() { @@ -42,6 +41,7 @@ _py3() { mv "$pkgdir"/usr/lib/python3* "$subpkgdir"/usr/lib } -sha512sums="628d05f3a257b44208a9d0b5d84ae248fefd415812d9a93d132c03039b09fefc4d6110beb9aa0d3072e3f0c992e642d7867d0241209056538f132f86a748e195 libblockdev-2.25.tar.gz +sha512sums=" +ddd4e9c22135bd7dad0bb9bc254ac0c63e3bacc592e7c5a0c846e367da3fc248bf6187f1c81407c3bce599d3b0ceeec9a8a0030ad8e981e245f715b35eaec523 libblockdev-2.26.tar.gz 199b184b2955a49320f2d8dd71be31507f170a21652c8dbc5d2821b5a451d8252402c4a14f8c0cef6b95c8a9ae85a6f385d5b9720d2d683b3b41fe1a056fc438 fix-glibc-glob-onlydir.patch -3f4c545bce2c504d4eddacd25ef281d85c9378fc849fe94b54a3d01233f9fe587a160cb94bd738600b69f656c71ba71ed1c368f24576206c56ccffdbecb0991b dont-use-deprecated-g_memdup.patch" +" diff --git a/community/libblockdev/dont-use-deprecated-g_memdup.patch b/community/libblockdev/dont-use-deprecated-g_memdup.patch deleted file mode 100644 index 38201509dd..0000000000 --- a/community/libblockdev/dont-use-deprecated-g_memdup.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 5528baef6ccc835a06c45f9db34a2c9c3f2dd940 Mon Sep 17 00:00:00 2001 -From: Vojtech Trefny <vtrefny@redhat.com> -Date: Tue, 16 Mar 2021 12:05:37 +0100 -Subject: [PATCH] vdo: Do not use g_memdup in bd_vdo_stats_copy - -g_memdup is deprecated and the replacement g_memdup2 is not yet -available so lets just do the copy manually. ---- - src/lib/plugin_apis/vdo.api | 17 ++++++++++++++++- - src/plugins/vdo.c | 17 ++++++++++++++++- - 2 files changed, 32 insertions(+), 2 deletions(-) - -diff --git a/src/lib/plugin_apis/vdo.api b/src/lib/plugin_apis/vdo.api -index 936f8e0c..312de4e5 100644 ---- a/src/lib/plugin_apis/vdo.api -+++ b/src/lib/plugin_apis/vdo.api -@@ -170,7 +170,22 @@ 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)); -+ if (stats == NULL) -+ return NULL; -+ -+ BDVDOStats *new_stats = g_new0 (BDVDOStats, 1); -+ -+ new_stats->block_size = stats->block_size; -+ new_stats->logical_block_size = stats->logical_block_size; -+ new_stats->physical_blocks = stats->physical_blocks; -+ new_stats->data_blocks_used = stats->data_blocks_used; -+ new_stats->overhead_blocks_used = stats->overhead_blocks_used; -+ new_stats->logical_blocks_used = stats->logical_blocks_used; -+ new_stats->used_percent = stats->used_percent; -+ new_stats->saving_percent = stats->saving_percent; -+ new_stats->write_amplification_ratio = stats->write_amplification_ratio; -+ -+ return new_stats; - } - - GType bd_vdo_stats_get_type () { -diff --git a/src/plugins/vdo.c b/src/plugins/vdo.c -index 2352394b..d4430997 100644 ---- a/src/plugins/vdo.c -+++ b/src/plugins/vdo.c -@@ -81,7 +81,22 @@ void bd_vdo_stats_free (BDVDOStats *stats) { - } - - BDVDOStats* bd_vdo_stats_copy (BDVDOStats *stats) { -- return g_memdup (stats, sizeof (BDVDOStats)); -+ if (stats == NULL) -+ return NULL; -+ -+ BDVDOStats *new_stats = g_new0 (BDVDOStats, 1); -+ -+ new_stats->block_size = stats->block_size; -+ new_stats->logical_block_size = stats->logical_block_size; -+ new_stats->physical_blocks = stats->physical_blocks; -+ new_stats->data_blocks_used = stats->data_blocks_used; -+ new_stats->overhead_blocks_used = stats->overhead_blocks_used; -+ new_stats->logical_blocks_used = stats->logical_blocks_used; -+ new_stats->used_percent = stats->used_percent; -+ new_stats->saving_percent = stats->saving_percent; -+ new_stats->write_amplification_ratio = stats->write_amplification_ratio; -+ -+ return new_stats; - } - - |