[packages/bfs] Up to 4.1.4
arekm
arekm at pld-linux.org
Fri Oct 23 16:53:46 CEST 2026
commit 87706b609b5d97338ade8090acff2b79b76af4c9
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Fri Oct 23 16:52:24 2026 +0200
Up to 4.1.4
Pin library bconds with explicit --with/--without; backport getfilecon leak fix.
bfs-getfilecon-leak.patch | 22 ++++++++++++++++++++++
bfs.spec | 17 ++++++++++-------
2 files changed, 32 insertions(+), 7 deletions(-)
---
diff --git a/bfs.spec b/bfs.spec
index 46911c7..ecc1267 100644
--- a/bfs.spec
+++ b/bfs.spec
@@ -9,13 +9,15 @@
Summary: Breadth-first version of the UNIX find command
Name: bfs
-Version: 4.1
+Version: 4.1.4
Release: 1
License: 0BSD
Group: Applications/File
#Source0Download: https://github.com/tavianator/bfs/releases
Source0: https://github.com/tavianator/bfs/releases/download/%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 40397f6c724a1845016ff2367d20c3fe
+# Source0-md5: 2647c6dd6f4f9bec2a367bc1081f1027
+# https://github.com/tavianator/bfs/commit/568c1bd03a723df7585b293b18d0f43d0b051295
+Patch0: %{name}-getfilecon-leak.patch
URL: https://bfs.tavianator.com/
BuildRequires: pkgconfig >= 1:0.9.0
BuildRequires: rpm-build >= 4.6
@@ -65,17 +67,18 @@ zsh-completion for bfs.
%prep
%setup -qc -n %{name}-%{version}
+%patch -P0 -p1
%build
./configure \
--prefix=%{_prefix} \
--mandir=%{_mandir} \
--enable-release \
- %{!?with_acl:--without-libacl} \
- %{!?with_cap:--without-libcap} \
- %{!?with_selinux:--without-libselinux} \
- %{!?with_uring:--without-liburing} \
- %{!?with_oniguruma:--without-oniguruma} \
+ --with%{!?with_acl:out}-libacl \
+ --with%{!?with_cap:out}-libcap \
+ --with%{!?with_selinux:out}-libselinux \
+ --with%{!?with_uring:out}-liburing \
+ --with%{!?with_oniguruma:out}-oniguruma \
CC="%{__cc}" \
EXTRA_CPPFLAGS="%{rpmcppflags}" \
EXTRA_CFLAGS="%{rpmcflags}" \
diff --git a/bfs-getfilecon-leak.patch b/bfs-getfilecon-leak.patch
new file mode 100644
index 0000000..960ac9f
--- /dev/null
+++ b/bfs-getfilecon-leak.patch
@@ -0,0 +1,22 @@
+From 568c1bd03a723df7585b293b18d0f43d0b051295 Mon Sep 17 00:00:00 2001
+From: Tavian Barnes <tavianator at tavianator.com>
+Date: Thu, 9 Jul 2026 14:09:17 -0400
+Subject: [PATCH] fsade: Fix memory leak in bfs_getfilecon()
+
+---
+ src/fsade.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/fsade.c b/src/fsade.c
+index 3d4c8ba9..0c450c04 100644
+--- a/src/fsade.c
++++ b/src/fsade.c
+@@ -501,6 +501,8 @@ char *bfs_getfilecon(const struct BFTW *ftwbuf) {
+ ret = getfilecon(path, &con);
+ }
+
++ free_fake_at(ftwbuf, path);
++
+ if (ret >= 0) {
+ return con;
+ } else {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/bfs.git/commitdiff/87706b609b5d97338ade8090acff2b79b76af4c9
More information about the pld-cvs-commit
mailing list