pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/sysutils/bfs



Module Name:    pkgsrc
Committed By:   schmonz
Date:           Wed Jun 24 14:54:24 UTC 2026

Modified Files:
        pkgsrc/sysutils/bfs: Makefile PLIST distinfo
Removed Files:
        pkgsrc/sysutils/bfs/patches: patch-mtab.c

Log Message:
bfs: update to 4.1.3. Changes:

## Bug fixes

- Fixed a segfault when binaries built on macOS 26.4+ were run on older macOS
  versions (#229)
- Fixed a potential hang in the test suite
- Fixed `./configure`-time detection of `sysctlbyname()` on FreeBSD (#219)
- Bumped the default version number, which was missed in 4.1.1
- Fixed `./configure CFLAGS=...` being overridden by auto-detected flags
- Fixed the build for WASIX
- Fixed the build on Android < 11 (#215)
- `bfs` now takes system-wide open file limits into account.
  Previously, a handful of concurrent `bfs` instances could overwhelm a system
  with a low global limit, particularly macOS.
- Fixed an invalid optimization that transformed

      $ bfs -user you -or -user me

  into just

      $ bfs -user you

  The bug was originally introduced in bfs 2.0 (October 14, 2020). (#155)
- Only the last `-files0-from` argument now has any effect, to match GNU find
- Fixed `-execdir {}`, which was inadvertently broken in bfs 4.0
- Fixed `-fstype` with btrfs subvolumes (requires Linux 5.8+)
- Fixed `-ls` with timestamps very far in the future
- Fixed the `posix/exec_sigmask` test on mips64el Linux
- Fixed time-related tests with `mawk 1.3.4 20250131` (#152)
- Fixed a bug that could cause child processes (e.g. from `-exec`) to run with
  all signals blocked.
  The bug was introduced in version 3.3.
- Fixed a man page typo (#144)
- Fixed the build on PowerPC macOS (#145)
- Fixed a bug introduced in bfs 4.0.3 that colorized every file as if it had
  capabilities on non-Linux systems (#146)
- Fixed an assertion failure when `$LS_COLORS` contained escaped NUL bytes like
  `*\0.gz=`
- Fixed a use-after-free bug introduced in bfs 4.0 when unregistering and
  re-registering signal hooks.
  This could be reproduced with `bfs -nocolor` by repeatedly sending
  `SIGINFO`/`SIGUSR1` to toggle the status bar.
- Fixed a hang present since bfs 3.0 colorizing paths like `notdir/file`, where
  `notdir` is a symlink pointing to a non-directory file.
- Fixed `./configure --help`, which was broken since `bfs` 4.0
- Fixed compiler flag auto-detection on systems with non-GNU `sed`.
  This fixes a potential race condition on FreeBSD since `bfs` 4.0 due to the
  switch to `_Fork()` without passing `-z now` to the linker.
- Fixed `$MAKE distcheck` when `$MAKE` is not `make`, e.g. `gmake distcheck` on
  BSD
- Fixed some roff syntax issues in the `bfs` manpage
- Fixed an assertion failure optimizing expressions like `bfs -not \( -prune ,
  -type f \)` since `bfs` 3.1.
  Release builds were not affected, since their assertions are disabled and the
  behaviour was otherwise correct.
- `bfs` no longer prints a "suppressed errors" warning unless `-noerror` is
  actually suppressing errors
- Fixed commands like `./configure CC=clang --enable-release` that set variables
  before other options
- Fixed the build on RISC-V with GCC versions older than 14
- Fixed running `bfs` under Valgrind
- Fixed the exit code when failing to execute a non-existent command with
  `-exec`/`-ok` on some platforms including OpenBSD and HPPA
- Fixed `$LS_COLORS` case-sensitivity to match GNU ls more closely when the same
  extension is specified multiple times
- Fixed the `-status` bar on Solaris/Illumos
- Reduced the scope of the symbolic link loop change in version 3.3.
  `-xtype l` remains true for symbolic link loops, matching a change in GNU
  findutils 4.10.0.
  However, `-L` will report an error, just like `bfs` prior to 3.3 and other
  `find` implementations, as required by POSIX.
- `-regextype emacs` now supports shy (non-capturing) groups
- Fixed `-status` bar visual corruption when the terminal is resized
- `bfs` now prints a reset escape sequence when terminated by a signal in the
  middle of colored output (#138)
- `./configure CFLAGS=...` no longer overrides flags from `pkg-config` during
  configuration
- Fixed some rarely-used code paths that clean up after allocation failures
- On Linux, the `io_uring` feature probing introduced in `bfs` 3.1.2 only
  applied to one thread, causing all other threads to avoid using io_uring
  entirely.
  The probe results are now copied to all threads correctly.
- On Linux, we now check for supported `io_uring` operations before using them,
  which should fix `bfs` on 5.X series kernels that support `io_uring` but not
  all of `openat()`/`close()`/`statx()`
- Fixed a test failure triggered by certain filesystem types for `/tmp` (#131)
- Fixed parsing and interpretation of timezone offsets for explicit reference
  times used in `-*since` and `-newerXt`
- Fixed the build on m68k
- `-quit` and `-exit` could be ignored in the iterative deepening modes (`-S
  {ids,eds}`).
  This is now fixed.
  The bug was introduced in version 3.0.3.
- Fixed two possible errors in sort mode (`-s`):
  - Too many open files
  - Out of memory
- Fixed handling of FreeBSD union mounts
- Fixed `NO_COLOR` handling when it's set to the empty string
- Fixed some portability issues:
  - OpenBSD
  - NetBSD
  - DragonFly BSD
  - Illumos
- Fixed a segfault when reporting errors under musl
- Iterative deepening modes (`-S {ids,eds}`) were performing iterative
  *breadth*-first searches since `bfs` 3.0, negating any advantages they may
  have had over normal breadth-first search.
  They now do iterative *depth*-first searches as expected.
- Fixed a linked-list corruption that could lead to an infinite loop on macOS
  and other non-Linux, non-FreeBSD platforms
- Fixed an out-of-bounds memory read that could occur when escaping a string
  containing an incomplete multi-byte character
- Traversal fixes that mostly affect large directory trees (#107)
  - `bfs` could encounter `EMFILE`, close a file, and retry many times,
    particularly with `-j1`
  - Breadth-first search could become highly unbalanced, negating many of the
    benefits of `bfs`
  - On non-{Linux,FreeBSD} platforms, directories could stay open longer than
    necessary, consuming extra memory
- Fixed handling of the "normal text" color (`no` in `$LS_COLORS`) to match GNU
  ls

## New features

- Added support for the `$LSCOLORS` variable used by FreeBSD and macOS (#54,
  #157)
- Implemented `./configure --version=X.Y.Z`, mainly for packagers to override
  the version number
- To match BSD `find` (and the POSIX Utility Syntax Guidelines), multiple flags
  can now be given in a single argument like `-LEXO2`.
  Previously, you would have had to write `-L -E -X -O2`.
- Explicit timestamps can now be written as `@SECONDS_SINCE_EPOCH`.
  For example, `bfs -newermt @946684800` will print files modified since January
  1, 2000 (UTC).
- The new `-noerror` option suppresses all error messages during traversal.
  (#142)
- The `-status` bar can now be toggled by `SIGINFO`
  (<kbd>Ctrl</kbd>+<kbd>T</kbd>) on systems that support it, and `SIGUSR1` on
  other systems
- `-regextype` now supports all regex types from GNU find (#21)
- File birth times are now supported on OpenBSD
- New `-limit N` action that quits immediately after `N` results
- Implemented `-context` (from GNU find) for matching SELinux contexts (#27)
- Implemented `-printf %Z` for printing SELinux contexts
- On Linux, `bfs` now uses io_uring for async I/O
- On all platforms, `bfs` can now perform `stat()` calls in parallel,
  accelerating queries like `-links`, `-newer`, and `-size`, as well as
  colorized output
- On FreeBSD, `-type w` now works to find whiteouts like the system `find`
- `bfs` now reads directories asynchronously and in parallel (#101).
  Performance is significantly improved as a result.
  Parallelism is controlled by the new `-j` flag, e.g. `-j1`, `-j2`, etc.

## Changes

- Switched from C17 to C23 by default.
  C17 is still supported as a fallback as long as your compiler supports some
  common extensions.
- `bfs` now takes CPU affinity into account when picking how many threads to use
- `-execdir /bin/...` is now allowed even with a relative path in `$PATH`
- *Expect* is no longer a test suite dependency
- Fixed the build against old liburing versions (#147)
- Async I/O performance optimizations
- Minor refactoring of the build system
- `-mount` now excludes mount points entirely, to comply with the recently
  published POSIX 2024 standard.
  Use `-xdev` to include the mount point itself, but not its contents.
  `bfs` has been warning about this change since version 1.5.1 (September 2019).
- `-perm` now takes the current file creation mask into account when parsing a
  symbolic mode like `+rw`, as clarified by POSIX defect 1392.
    This matches the behaviour of BSD `find`, contrary to the behaviour of GNU
    `find`.
- Symbolic link loops are now treated like other broken links, rather than an
  error
- `./configure` now expects `--with-libacl`, `--without-libcap`, etc. rather
  than `--enable-`/`--disable-`
- The ` ` (space) flag is now restricted to numeric `-printf` specifiers
- The build system has been rewritten, and there is now a configure step:

      $ ./configure
      $ make

  See `./configure --help` or docs/BUILDING.md for more details.
- Improved platform support
  - Implemented `-acl` on Solaris/Illumos
  - Implemented `-xattr` on DragonFly BSD
- Performance and scalability improvements
- The file count in `bfs -status` now has a thousands separator
- Improved `bfs -j2` performance
- Optimized `-exec` by using `posix_spawn()` when possible, which can avoid the
  overhead of `fork()`
- `-execdir` and `-okdir` are now rejected if `$PATH` contains a relative path,
  matching the behaviour of GNU find
- Leading whitespace is no longer accepted in integer command line arguments
  like `-links ' 1'`
- Iterative deepening modes (`-S {ids,eds}`) were optimized by delaying teardown
  until the very end
- Parallel depth-first search (`-S dfs`) was optimized to avoid enqueueing every
  file separately
- `-files0-from` now allows an empty set of paths to be given, matching GNU
  findutils 4.9.0
- Reduced memory consumption in multi-threaded searches
- Many man page updates
- `bfs` now uses the C17 standard version, up from C11
- Due to #101, `bfs` now requires some additional C and POSIX features:
  - Standard C atomics (`<stdatomic.h>`)
  - POSIX threads (`<pthread.h>`)
- `$LS_COLORS` extensions written in different cases (e.g.
  `*.jpg=35:*.JPG=01;35`) are now matched case-sensitively, to match the new
  behaviour of GNU ls since coreutils version 9.2
- Added a warning/error if `$LS_COLORS` can't be parsed, depending on whether
  `-color` is requested explicitly
- Filenames with control characters are now escaped when printing with `-color`
- Build flags like `WITH_ONIGURUMA` have been renamed to `USE_ONIGURUMA`

## Other changes

- Fixed running the tests as root on Linux `8b24de3`
- Fixed some tests on Android `2724dfb` `0a5a80c`
- Stopped relying on non-POSIX touch(1) features in the tests.
  This should fix the tests on at least OpenBSD.
  `2d5edb3`
- User/group caches are now filled lazily instead of eagerly `b41dca5`
- More caches and I/O streams are flushed before -exec/-ok `f98a1c4`
- Fixed various memory safety issues found by fuzzing
  `712b137` `5ce883d` `da02def` `c55e855`
- Fixed a test failure on certain macOS versions `8b24de3`
- Mitigated a race condition when determining filesystem types (#97)
- Lots of refactoring and optimization
- Fixed use of uninitialized memory on parsing errors involving `-fprintf`
- Fixed Android build issues (#96)
- Refactored the test suite
- Fix `stat()` errors on GNU Hurd systems with glibc older than 2.35
- Added fish shell tab completion (#94).
  Thanks @xfgusta!
- Fixed deleting large NFS directories on FreeBSD (#67).
- Added support for a `bfs`-specific `BFS_COLORS` environment variable.
- Refactored the build system, directory structure, and documentation (#88, #89,
  #91).
  Thanks @ElectronicsArchiver!
- Added `zsh` completion (#86).
  Thanks @VorpalBlade!
- Updated the default color scheme to match GNU coreutils 9.1.
  Files with capabilities set are no longer colored differently by default,
  resulting in a significant performance improvement.
- Became less aggressive at triggering automounts
- Added support for out-of-tree builds with `BUILDDIR`
- Added compiler-style context for errors and warnings.
  Errors look like this:

      $ bfs -nam needle
      bfs: error: bfs -nam needle
      bfs: error:     ~~~~
      bfs: error: Unknown argument; did you mean -name?

  and warnings look like this:

      $ bfs -print -name 'needle'
      bfs: warning: bfs -print -name needle
      bfs: warning:            ~~~~~~~~~~~~
      bfs: warning: The result of this expression is ignored.
- Updated from C99 to C11
- Fixed the tests when built against musl
- Fixed a build error reported on Manjaro
- Fixed the build when Oniguruma is not installed in the default search paths
  (#82)
- Fixed string encoding bugs with Oniguruma enabled
- Fixed regex error reporting bugs
- Added the Oniguruma regular expression library as an (optional, but enabled by
  default) dependency (#81).
  Oniguruma supports more regular expression syntax types than the POSIX regex
  API, and often performs better.
  To build `bfs` without this new dependency, do `make WITH_ONIGURUMA=` to
  disable it.
  Thanks @data-man!
- Added support for the `ed`, `emacs`, `grep`, and `sed` regular expression
  types (#21)
- Before executing a process with `-execdir`/`-okdir`, `bfs` now ensures all
  output streams are flushed.
  Previously, I/O from subprocesses could be interleaved unpredictably with
  buffered I/O from `bfs` itself.
- Fixed the build on Debian kFreeBSD
- Fixed a crash on GNU Hurd when piping bfs's output
- Fixed a double-`close()` on non-Linux platforms if `fdopendir()` fails
- Reduced memory allocations on startup
- More tweaks to `PAGER` and `LESS` handling for `bfs -help` (#76)
- Use 512-byte blocks for `-ls` when `POSIXLY_CORRECT` is set (#77)
- Implemented `-files0-from FILE` to take a list of `'\0'`-separated starting
  paths.
  GNU find will implement the same feature in an upcoming release.
- Added colors to `-printf` output (#62)
- Faster recovery from `E2BIG` during `-exec`
- Fixed some incorrect coloring of broken links when links are being followed
  (`-L`)
- Made the tests work when run as root by dropping privileges.
  This may be helpful for certain packaging or CI environments, but is not
  recommended.
- Treat empty `PAGER` and `LESS` environment variables like they're unset, for
  `bfs -help` (#71).
  Thanks @markus-oberhumer!
- The soft `RLIMIT_NOFILE` is now raised automatically to a fairly large value
  when possible.
  This provides a minor performance benefit for large directory trees.
- Implemented time units for `-mtime` as found in FreeBSD find (#75)
- Fixed `-hidden` on hidden start paths
- Added a Bash completion script.
  Thanks @bmundt6!
- Fixed rounding in `-used`.
  Corresponding fixes were made to GNU find in version 4.8.0.
- Optimized the open directory representation.
  On Linux, much libc overhead is bypassed by issuing syscalls directly.
  On all platforms, a few fewer syscalls and open file descriptors will be used.
- Implemented `-flags` from BSD find
- Added a new `-status` option that displays the search progress in a bar at the
  bottom of the terminal
- Fixed an optimizer bug introduced in version 2.0 that affected some
  combinations of `-user`/`-group` and `-nouser`/`-nogroup`
- #8: New `-exclude <expression>` syntax to more easily and reliably filter out
  paths.
  For example:

      bfs -name config -exclude -name .git

  will find all files named `config`, without searching any directories (or
  files) named `.git`.
  In this case, the same effect could have been achieved (more awkwardly) with
  `-prune`:

      bfs ! \( -name .git -prune \) -name config

  But `-exclude` will work in more cases:

      # -exclude works with -depth, while -prune doesn't:
      bfs -depth -name config -exclude -name .git

      # -exclude applies even to paths below the minimum depth:
      bfs -mindepth 3 -name config -exclude -name .git
- #30: `-nohidden` is now equivalent to `-exclude -hidden`.
  This changes the behavior of command lines like

      bfs -type f -nohidden

  to do what was intended.
- Optimized the iterative deepening (`-S ids`) implementation
- Added a new search strategy: exponential deepening search (`-S eds`).
  This strategy provides many of the benefits of iterative deepening, but much
  faster due to fewer re-traversals.
- Fixed an optimizer bug that could skip `-empty`/`-xtype` if they didn't always
  lead to an action
- Implemented `-xattrname` to find files with a particular extended attribute
  (from macOS find)
- Made `-printf %l` still respect the width specifier (e.g. `%10l`) for
  non-links, to match GNU find
- Made `bfs` fail if `-color` is given explicitly and `LS_COLORS` can't be
  parsed, rather than falling back to non-colored output
- Fixed `-ls` printing numeric IDs instead of user/group names in large
  directory trees
- Cached the user and group tables for a performance boost
- Fixed interpretation of "default" ACLs
- Implemented `-s` flag to sort results
- Implemented `-newerXt` (explicit reference times), `-since`, `-asince`, etc.
- Fixed `-empty` to skip special files (pipes, devices, sockets, etc.)
- Fixed the build on NetBSD
- Added support for NFSv4 ACLs on FreeBSD
- Added a `+` after the file mode for files with ACLs in `-ls`
- Supported more file types (whiteouts, doors) in symbolic modes for
  `-ls`/`-printf %M`
- Implemented `-xattr` on FreeBSD


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 pkgsrc/sysutils/bfs/Makefile
cvs rdiff -u -r1.2 -r1.3 pkgsrc/sysutils/bfs/PLIST
cvs rdiff -u -r1.5 -r1.6 pkgsrc/sysutils/bfs/distinfo
cvs rdiff -u -r1.2 -r0 pkgsrc/sysutils/bfs/patches/patch-mtab.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/sysutils/bfs/Makefile
diff -u pkgsrc/sysutils/bfs/Makefile:1.3 pkgsrc/sysutils/bfs/Makefile:1.4
--- pkgsrc/sysutils/bfs/Makefile:1.3    Sat Dec 28 12:16:53 2019
+++ pkgsrc/sysutils/bfs/Makefile        Wed Jun 24 14:54:24 2026
@@ -1,19 +1,28 @@
-# $NetBSD: Makefile,v 1.3 2019/12/28 12:16:53 mef Exp $
+# $NetBSD: Makefile,v 1.4 2026/06/24 14:54:24 schmonz Exp $
 
-DISTNAME=      bfs-1.5.1
-CATEGORIES=    sysutils
-MASTER_SITES=  ${MASTER_SITE_GITHUB:=tavianator/}
+DISTNAME=              bfs-4.1.3
+CATEGORIES=            sysutils
+MASTER_SITES=          ${MASTER_SITE_GITHUB:=tavianator/}
+
+MAINTAINER=            pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=              https://github.com/tavianator/bfs/
+COMMENT=               Breadth-first version of the UNIX find command
+LICENSE=               0-clause-bsd
+
+USE_LANGUAGES=         c
+USE_CC_FEATURES=       c99
+USE_TOOLS+=            gmake
+HAS_CONFIGURE=         yes
+
+CONFIGURE_ARGS+=       --enable-release
+CONFIGURE_ARGS+=       --prefix=${PREFIX:Q}
+CONFIGURE_ARGS+=       --mandir=${PREFIX:Q}/${PKGMANDIR:Q}
+CONFIGURE_ARGS+=       --without-libacl
+CONFIGURE_ARGS+=       --without-libcap
+CONFIGURE_ARGS+=       --without-libselinux
+CONFIGURE_ARGS+=       --without-liburing
+CONFIGURE_ARGS+=       --without-oniguruma
 
-MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
-HOMEPAGE=      https://github.com/tavianator/bfs/
-COMMENT=       Breadth-first version of the UNIX find command
-LICENSE=       0-clause-bsd
-
-USE_LANGUAGES= c c99
-USE_TOOLS+=    gmake
-
-MAKE_ENV+=     MANDIR=${PREFIX}/${PKGMANDIR}
-
-INSTALLATION_DIRS+=    bin
+INSTALLATION_DIRS+=    bin ${PKGMANDIR}
 
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/sysutils/bfs/PLIST
diff -u pkgsrc/sysutils/bfs/PLIST:1.2 pkgsrc/sysutils/bfs/PLIST:1.3
--- pkgsrc/sysutils/bfs/PLIST:1.2       Sun Dec 15 12:29:01 2019
+++ pkgsrc/sysutils/bfs/PLIST   Wed Jun 24 14:54:24 2026
@@ -1,3 +1,6 @@
-@comment $NetBSD: PLIST,v 1.2 2019/12/15 12:29:01 mef Exp $
+@comment $NetBSD: PLIST,v 1.3 2026/06/24 14:54:24 schmonz Exp $
 bin/bfs
 man/man1/bfs.1
+share/bash-completion/completions/bfs
+share/fish/vendor_completions.d/bfs.fish
+share/zsh/site-functions/_bfs

Index: pkgsrc/sysutils/bfs/distinfo
diff -u pkgsrc/sysutils/bfs/distinfo:1.5 pkgsrc/sysutils/bfs/distinfo:1.6
--- pkgsrc/sysutils/bfs/distinfo:1.5    Tue Oct 26 11:19:22 2021
+++ pkgsrc/sysutils/bfs/distinfo        Wed Jun 24 14:54:24 2026
@@ -1,6 +1,5 @@
-$NetBSD: distinfo,v 1.5 2021/10/26 11:19:22 nia Exp $
+$NetBSD: distinfo,v 1.6 2026/06/24 14:54:24 schmonz Exp $
 
-BLAKE2s (bfs-1.5.1.tar.gz) = 7c4506daf5d0438e48189483439d4921d859098fa99a492b56db812154a61d5b
-SHA512 (bfs-1.5.1.tar.gz) = f501f2acaa19c772a350863539030c60299c3b001ebd3d473add4e8975f4fda3a79a6a524a0d1fbf729a66a943557cb66aa6d65a8aae41ab88b81a7740b17874
-Size (bfs-1.5.1.tar.gz) = 113824 bytes
-SHA1 (patch-mtab.c) = 591269c91adff55bae9c4b9ab7b66a621b11486f
+BLAKE2s (bfs-4.1.3.tar.gz) = a07e5a3a6d871f07edb4a7bb1b4f733adf1b68dde31fe175a6afeef8ea63a463
+SHA512 (bfs-4.1.3.tar.gz) = 2ddf87df20c493d5aa944ac615320c945112e4480c9fc0229d24c5394e9b50cb11ed2cffbed117eaeda294801f64c88086a1800663ac672c0347eabe225b769a
+Size (bfs-4.1.3.tar.gz) = 300677 bytes



Home | Main Index | Thread Index | Old Index