diff options
author | Tobias Geerinckx-Rice <me@tobias.gr> | 2021-11-03 18:44:02 +0100 |
---|---|---|
committer | Tobias Geerinckx-Rice <me@tobias.gr> | 2021-11-03 18:44:06 +0100 |
commit | 5c1ad6b9247a0c8e04add9331ffd8aec6a5e4ddf (patch) | |
tree | 2e89fabe1753438cdaf3a1741589e726b675e78f | |
parent | 9b917c2615d8a03bcced6d453d8e5d3020da7d6b (diff) | |
download | guix-5c1ad6b9247a0c8e04add9331ffd8aec6a5e4ddf.tar.gz |
gnu: libblockdev: Update to 2.26.
* gnu/packages/disk.scm (libblockdev): Update to 2.26. [source]: Remove patch. * gnu/packages/patches/libblockdev-glib-compat.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it.
-rw-r--r-- | gnu/local.mk | 1 | ||||
-rw-r--r-- | gnu/packages/disk.scm | 5 | ||||
-rw-r--r-- | gnu/packages/patches/libblockdev-glib-compat.patch | 61 |
3 files changed, 2 insertions, 65 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index 5ae09d7d57..05258ac054 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1333,7 +1333,6 @@ dist_patch_DATA = \ %D%/packages/patches/julia-SOURCE_DATE_EPOCH-mtime.patch \ %D%/packages/patches/julia-tracker-16-compat.patch \ %D%/packages/patches/kdbusaddons-kinit-file-name.patch \ - %D%/packages/patches/libblockdev-glib-compat.patch \ %D%/packages/patches/libffi-3.3-powerpc-fixes.patch \ %D%/packages/patches/libffi-float128-powerpc64le.patch \ %D%/packages/patches/libvirt-add-install-prefix.patch \ diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm index abe49d7ad3..c457bfd1bf 100644 --- a/gnu/packages/disk.scm +++ b/gnu/packages/disk.scm @@ -923,16 +923,15 @@ to create devices with respective mappings for the ATARAID sets discovered.") (define-public libblockdev (package (name "libblockdev") - (version "2.25") + (version "2.26") (source (origin (method url-fetch) (uri (string-append "https://github.com/storaged-project/" "libblockdev/releases/download/" version "-1/libblockdev-" version ".tar.gz")) - (patches (search-patches "libblockdev-glib-compat.patch")) (sha256 (base32 - "0s0nazkpzpn4an00qghjkk9n7gdm5a8dqfr5hfnlk5mk5lma8njm")))) + "0sg068jb87ljhn8yazrqxi6ri10ic2sh1lp6ikd2nqxc6l5y3h64")))) (build-system gnu-build-system) (arguments `(#:phases diff --git a/gnu/packages/patches/libblockdev-glib-compat.patch b/gnu/packages/patches/libblockdev-glib-compat.patch deleted file mode 100644 index bb25d5d963..0000000000 --- a/gnu/packages/patches/libblockdev-glib-compat.patch +++ /dev/null @@ -1,61 +0,0 @@ -Don't use g_memdup() which is removed in newer versions of GLib. - -See <https://github.com/storaged-project/libblockdev/pull/623>. - -Taken from upstream: -https://github.com/storaged-project/libblockdev/commit/5528baef6ccc835a06c45f9db34a2c9c3f2dd940 - -diff --git a/src/lib/plugin_apis/vdo.api b/src/lib/plugin_apis/vdo.api ---- 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 ---- 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; - } - - |