aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2026-11-03 21:28:20 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2026-11-04 15:13:07 +0000
commit772112e449939225672e4614c56869eebd7cbe8c (patch)
tree7f29713c70b4afc2dc8623f38e010a0d20c556f4
parent52550c4e793aaa2922820a39351078b838090945 (diff)
sysutils/inotify-tools: update 4.25.9.0 → 4.26.270
-rw-r--r--sysutils/inotify-tools/Makefile63
-rw-r--r--sysutils/inotify-tools/distinfo8
-rw-r--r--sysutils/inotify-tools/files/patch-configure.ac10
-rw-r--r--sysutils/inotify-tools/files/patch-libinotifytools_src_inotify.rs21
-rw-r--r--sysutils/inotify-tools/files/patch-src_Makefile.am17
-rw-r--r--sysutils/inotify-tools/pkg-plist2
6 files changed, 60 insertions, 61 deletions
diff --git a/sysutils/inotify-tools/Makefile b/sysutils/inotify-tools/Makefile
index f945d96b99d6..1657f4a14002 100644
--- a/sysutils/inotify-tools/Makefile
+++ b/sysutils/inotify-tools/Makefile
@@ -1,6 +1,5 @@
PORTNAME= inotify-tools
-DISTVERSION= 4.25.9.0
-PORTREVISION= 1
+DISTVERSION= 4.26.270
CATEGORIES= sysutils
MAINTAINER= yuri@FreeBSD.org
@@ -10,49 +9,55 @@ WWW= https://github.com/inotify-tools/inotify-tools/
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
+# FreeBSD >= 15 has a native inotify implementation in libc. Older releases
+# need the user-space libinotify-kqueue port. The upstream build.rs checks
+# for /usr/include/sys/inotify.h and links libinotify when it is absent.
+.if !exists(/usr/include/sys/inotify.h)
LIB_DEPENDS= libinotify.so:devel/libinotify
+.endif
+
TEST_DEPENDS= bash:shells/bash
-USES= autoreconf compiler:c11 gmake libtool localbase shebangfix
+USES= cargo gmake
USE_GITHUB= yes
USE_LDCONFIG= yes
-SHEBANG_GLOB= *.t *.sh
-
-GNU_CONFIGURE= yes
-CONFIGURE_ARGS= --disable-doxygen
+CARGO_CRATES= libc-0.2.183
-INSTALL_TARGET= install-strip
+.if !exists(/usr/include/sys/inotify.h)
+CARGO_ENV+= INOTIFYTOOLS_LINK_INOTIFY=1
+.endif
-OPTIONS_DEFINE= STATIC
-OPTIONS_SUB= yes
+post-extract:
+ @${ECHO_CMD} ${DISTVERSION} > ${WRKSRC}/VERSION
-post-patch:
- @${REINPLACE_CMD} \
- -e 's|SHELL_PATH ?= /bin/bash|SHELL_PATH ?= ${LOCALBASE}/bin/bash|' \
- ${WRKSRC}/t/Makefile
+do-build:
+ cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${CARGO_ENV} ${GMAKE} all \
+ CARGO="${CARGO}" \
+ SHELL_PATH="${LOCALBASE}/bin/bash"
-post-build-STATIC-on:
- @cd ${WRKSRC}/src && \
- ${CC} -pthread ${LDFLAGS} -static -o inotifywait.static inotifywait.o common.o ../libinotifytools/src/.libs/libinotifytools.a ${LOCALBASE}/lib/libinotify.a && \
- ${CC} -pthread ${LDFLAGS} -static -o inotifywatch.static inotifywatch.o common.o ../libinotifytools/src/.libs/libinotifytools.a ${LOCALBASE}/lib/libinotify.a
+do-install:
+ cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${CARGO_ENV} ${GMAKE} install-strip \
+ CARGO="${CARGO}" \
+ DESTDIR="${STAGEDIR}" \
+ prefix="${PREFIX}"
post-install:
# delete fsnotify* commands because they are Linux-specific: they depend on Linux's fanotify interface
@${FIND} ${STAGEDIR}${PREFIX} -name "fsnotify*" -delete
-post-install-STATIC-on:
- ${INSTALL_PROGRAM} ${WRKSRC}/src/inotifywait.static ${STAGEDIR}${PREFIX}/bin
- ${INSTALL_PROGRAM} ${WRKSRC}/src/inotifywatch.static ${STAGEDIR}${PREFIX}/bin
-
-do-test: # Some tests are known to fail: https://github.com/inotify-tools/inotify-tools/issues/108
+do-test:
@${ECHO} "====> Unit tests"
- @cd ${WRKSRC}/libinotifytools/src && ${GMAKE} test && ./test
- @${ECHO} "====> Integration tests"
- @cd ${WRKSRC}/t && ${GMAKE}
+ @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${CARGO_ENV} ${GMAKE} unit-test \
+ CARGO="${CARGO}"
+
+# Integration tests are intentionally not run on FreeBSD. They exercise
+# Linux-specific fanotify commands (already removed by post-install) and rely
+# on Linux event semantics (e.g. MOVED_TO) and utilities behaviour (realpath on
+# missing files, chown to the current owner) that do not hold on FreeBSD.
+# The unit-test target provides 480076 cross-platform tests.
-# tests as of 4.25.9.0:
-# Unit tests: Out of 480076 tests, 480076 succeeded and 0 failed. (1-4 tests may fail due to "Too many open files", adjusting kern.maxfiles helps)
-# Integration tests: some tests fail due to unreported MOVED_TO events, see https://github.com/inotify-tools/inotify-tools/issues/238
+# tests as of 4.26.270:
+# Unit tests: Out of 480076 tests, 480076 succeeded and 0 failed.
.include <bsd.port.mk>
diff --git a/sysutils/inotify-tools/distinfo b/sysutils/inotify-tools/distinfo
index fa8e06854d7a..aeababf3e6fd 100644
--- a/sysutils/inotify-tools/distinfo
+++ b/sysutils/inotify-tools/distinfo
@@ -1,3 +1,5 @@
-TIMESTAMP = 1758094445
-SHA256 (inotify-tools-inotify-tools-4.25.9.0_GH0.tar.gz) = d33a4fd24c72c2d08893f129d724adf725b93dae96c359e4f4e9f32573cc853b
-SIZE (inotify-tools-inotify-tools-4.25.9.0_GH0.tar.gz) = 94099
+TIMESTAMP = 1793413338
+SHA256 (rust/crates/libc-0.2.183.crate) = b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d
+SIZE (rust/crates/libc-0.2.183.crate) = 816918
+SHA256 (inotify-tools-inotify-tools-4.26.270_GH0.tar.gz) = c4187f85f9f963fa18b0430fc1beb3daefc69bd6649e1b07c47a885138bc9f03
+SIZE (inotify-tools-inotify-tools-4.26.270_GH0.tar.gz) = 107818
diff --git a/sysutils/inotify-tools/files/patch-configure.ac b/sysutils/inotify-tools/files/patch-configure.ac
deleted file mode 100644
index 6ff698392eac..000000000000
--- a/sysutils/inotify-tools/files/patch-configure.ac
+++ /dev/null
@@ -1,10 +0,0 @@
---- configure.ac.orig 2023-08-21 19:51:56 UTC
-+++ configure.ac
-@@ -55,6 +55,7 @@ fi
- AM_CONDITIONAL(IS_CLANG, test "$IS_CLANG" = "yes")
-
- # Checks for libraries.
-+AC_SEARCH_LIBS(inotify_init, inotify)
-
- # Checks for header files.
- AC_CHECK_HEADERS([sys/inotify.h sys/fanotify.h mcheck.h])
diff --git a/sysutils/inotify-tools/files/patch-libinotifytools_src_inotify.rs b/sysutils/inotify-tools/files/patch-libinotifytools_src_inotify.rs
new file mode 100644
index 000000000000..2a23d67c17fe
--- /dev/null
+++ b/sysutils/inotify-tools/files/patch-libinotifytools_src_inotify.rs
@@ -0,0 +1,21 @@
+-- Fix error handling in remove_inotify_watch() on systems where inotify_rm_watch()
+-- is provided by a user-space library (e.g. FreeBSD's libinotify).
+-- The wrapper returned -1 on failure but stored the return value itself as the
+-- error code instead of reading errno, so inotifytools_error() reported
+-- "Unknown error: -1" and unit tests failed.
+-- Reference: upstream issue https://github.com/inotify-tools/inotify-tools/issues/108
+
+--- libinotifytools/src/inotify.rs.orig 2026-10-07 03:12:00 UTC
++++ libinotifytools/src/inotify.rs
+@@ -531,9 +531,10 @@ impl InotifyState {
+ }
+ let status = unsafe { sys::inotify_rm_watch(self.fd, w.wd) };
+ if status < 0 {
+- ceprint!("Failed to remove watch on ", w.filename, ": ", strerror(status), "\n");
+- self.error = status;
++ let err = errno();
++ ceprint!("Failed to remove watch on ", w.filename, ": ", strerror(err), "\n");
++ self.error = err;
+ return false;
+ }
+ true
diff --git a/sysutils/inotify-tools/files/patch-src_Makefile.am b/sysutils/inotify-tools/files/patch-src_Makefile.am
deleted file mode 100644
index 2c99329855fe..000000000000
--- a/sysutils/inotify-tools/files/patch-src_Makefile.am
+++ /dev/null
@@ -1,17 +0,0 @@
---- src/Makefile.am.orig 2023-09-12 16:26:42 UTC
-+++ src/Makefile.am
-@@ -12,11 +12,11 @@ fsnotifywatch_CPPFLAGS = $(AM_CPPFLAGS) -DENABLE_FANOT
- endif
-
- if IS_CLANG
--AM_CFLAGS = -std=c99 -fno-exceptions -Wall -Wextra -Wshadow -Werror -Wno-unused-command-line-argument -I../libinotifytools/src -I$(srcdir)/../libinotifytools/src
-+AM_CFLAGS = -std=c99 -fno-exceptions -Wall -Wextra -Wshadow -Werror -Wno-unused-command-line-argument -I../libinotifytools/src
- AM_CPPFLAGS = -std=c++17 -fno-exceptions -Wall -Wextra -Wshadow -Werror -Wno-unused-command-line-argument -I../libinotifytools/src -I$(srcdir)/../libinotifytools/src
- else
--AM_CFLAGS = -std=c99 -fno-exceptions -Wall -Wextra -Wshadow -Werror -I../libinotifytools/src -I$(srcdir)/../libinotifytools/src
--AM_CPPFLAGS = -std=c++17 -fno-exceptions -Wall -Wextra -Wshadow -Werror -I../libinotifytools/src -I$(srcdir)/../libinotifytools/src
-+AM_CFLAGS = -std=c99 -fno-exceptions -Wall -Wextra -Wshadow -Werror -I../libinotifytools/src
-+AM_CPPFLAGS = -std=c++17 -fno-exceptions -Wall -Wextra -Wshadow -Werror -I../libinotifytools/src
- endif
-
- LDADD = ../libinotifytools/src/libinotifytools.la
diff --git a/sysutils/inotify-tools/pkg-plist b/sysutils/inotify-tools/pkg-plist
index aaafdc2ef791..39c23f57e27c 100644
--- a/sysutils/inotify-tools/pkg-plist
+++ b/sysutils/inotify-tools/pkg-plist
@@ -1,7 +1,5 @@
bin/inotifywait
bin/inotifywatch
-%%STATIC%%bin/inotifywait.static
-%%STATIC%%bin/inotifywatch.static
include/inotifytools/fanotify-dfid-name.h
include/inotifytools/fanotify.h
include/inotifytools/inotify-nosys.h