From 6728ae1b6f74d57e94701077833f4153c1087cdf Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Thu, 23 Jan 2025 20:34:20 +0100 Subject: [PATCH] Fix F42 build (RHBZ#2339992) - Update to the latest git snapshot - Add patch to fix build errors --- .gitignore | 1 + compsize-1.5_fix_includes.patch | 45 +++++++++++++++++++++++++++++++++ compsize.spec | 18 ++++++++++--- sources | 2 +- 4 files changed, 61 insertions(+), 5 deletions(-) create mode 100644 compsize-1.5_fix_includes.patch diff --git a/.gitignore b/.gitignore index ed7ce29..7b1add9 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /compsize-1.3.tar.gz /compsize-1.4.tar.gz /compsize-1.5.tar.gz +/compsize-d79eacf.tar.gz diff --git a/compsize-1.5_fix_includes.patch b/compsize-1.5_fix_includes.patch new file mode 100644 index 0000000..3a9a4c3 --- /dev/null +++ b/compsize-1.5_fix_includes.patch @@ -0,0 +1,45 @@ +From a471982c82d1917637cce81a084fcd4b02d6e33b Mon Sep 17 00:00:00 2001 +From: David Roman +Date: Mon, 25 Nov 2024 14:10:16 +0100 +Subject: [PATCH] fix build with btrfs-progs >= 6.10.1 + +--- + compsize.c | 2 ++ + radix-tree.h | 4 ---- + 2 files changed, 2 insertions(+), 4 deletions(-) + +diff --git a/compsize.c b/compsize.c +index 42ec304..0f533e5 100644 +--- a/compsize.c ++++ b/compsize.c +@@ -5,12 +5,14 @@ + #include + #include + #include ++#include "kerncompat.h" + #include + #include + #include + #include + #include + #include ++#include + #include + #include + #include +diff --git a/radix-tree.h b/radix-tree.h +index bf96d83..d99ea7e 100644 +--- a/radix-tree.h ++++ b/radix-tree.h +@@ -37,11 +37,7 @@ + #ifndef _LINUX_RADIX_TREE_H + #define _LINUX_RADIX_TREE_H + +-#if BTRFS_FLAT_INCLUDES + #include "kerncompat.h" +-#else +-#include +-#endif /* BTRFS_FLAT_INCLUDES */ + + #define RADIX_TREE_MAX_TAGS 2 + diff --git a/compsize.spec b/compsize.spec index ca3a5bc..ab8ffd5 100644 --- a/compsize.spec +++ b/compsize.spec @@ -1,11 +1,17 @@ +%global commit d79eacf77abe3b799387bb8a4e07a18f1f1031e8 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global date 20250123 + Name: compsize -Version: 1.5 -Release: 11%{?dist} +Version: 1.5^git%{date}.%{shortcommit} +Release: 12%{?dist} Summary: Utility for measuring compression ratio of files on btrfs # Automatically converted from old format: GPLv2+ - review is highly recommended. License: GPL-2.0-or-later URL: https://github.com/kilobyte/compsize -Source: https://github.com/kilobyte/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz +Source: https://github.com/kilobyte/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz +# https://github.com/kilobyte/compsize/pull/54 +Patch: %{name}-1.5_fix_includes.patch BuildRequires: gcc BuildRequires: btrfs-progs-devel BuildRequires: make @@ -16,7 +22,7 @@ measures used compression types and effective compression ratio, producing a report. %prep -%autosetup +%autosetup -n %{name}-%{commit} %build %set_build_flags @@ -33,6 +39,10 @@ install -D -m 0644 %{name}.8 %{buildroot}%{_mandir}/man8/%{name}.8 %{_mandir}/man8/%{name}.8* %changelog +* Thu Jan 23 2025 Juan Orti Alcaine - 1.5^git20250123.d79eacf-12 +- Update to the latest git snapshot +- Add patch to fix build errors + * Thu Jan 16 2025 Fedora Release Engineering - 1.5-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild diff --git a/sources b/sources index db14ad3..d07da54 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (compsize-1.5.tar.gz) = 25d6f1973e8a0a86bd857dc1e1ba99760451cf388f3bd3ede6a6ef35351ff63f100646d313010aff3de9e70b2c68866a31c4ea31d9c6df9254648cd1bd0272fa +SHA512 (compsize-d79eacf.tar.gz) = d6059a77feea45b9bb145cdd5edb4622e5ac261fe2e1ebdc2ad3bbfe36b663f689b6f458f1eae3e88523a9277e8cde0d8ec00bd02a1fafb6360f0d5e68dccede