Fix F42 build (RHBZ#2339992)

- Update to the latest git snapshot
- Add patch to fix build errors
This commit is contained in:
Juan Orti Alcaine 2025-01-23 20:34:20 +01:00
parent ab8b22ec75
commit 6728ae1b6f
4 changed files with 61 additions and 5 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@
/compsize-1.3.tar.gz
/compsize-1.4.tar.gz
/compsize-1.5.tar.gz
/compsize-d79eacf.tar.gz

View File

@ -0,0 +1,45 @@
From a471982c82d1917637cce81a084fcd4b02d6e33b Mon Sep 17 00:00:00 2001
From: David Roman <droman@ifae.es>
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 <unistd.h>
#include <fcntl.h>
#include <dirent.h>
+#include "kerncompat.h"
#include <btrfs/ioctl.h>
#include <btrfs/ctree.h>
#include <stdarg.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <inttypes.h>
+#include <errno.h>
#include <linux/limits.h>
#include <getopt.h>
#include <signal.h>
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 <btrfs/kerncompat.h>
-#endif /* BTRFS_FLAT_INCLUDES */
#define RADIX_TREE_MAX_TAGS 2

View File

@ -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 <jortialc@redhat.com> - 1.5^git20250123.d79eacf-12
- Update to the latest git snapshot
- Add patch to fix build errors
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.5-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (compsize-1.5.tar.gz) = 25d6f1973e8a0a86bd857dc1e1ba99760451cf388f3bd3ede6a6ef35351ff63f100646d313010aff3de9e70b2c68866a31c4ea31d9c6df9254648cd1bd0272fa
SHA512 (compsize-d79eacf.tar.gz) = d6059a77feea45b9bb145cdd5edb4622e5ac261fe2e1ebdc2ad3bbfe36b663f689b6f458f1eae3e88523a9277e8cde0d8ec00bd02a1fafb6360f0d5e68dccede