git: 9e491d3cb2bf - main - sysutils/inotify-tools: Update 3.20.11.0 -> 3.21.9.6

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Sat, 20 Nov 2021 08:54:17 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9e491d3cb2bfaf33c008fa8299ce6b90cfb44e7e

commit 9e491d3cb2bfaf33c008fa8299ce6b90cfb44e7e
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2021-11-20 08:53:03 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2021-11-20 08:54:10 +0000

    sysutils/inotify-tools: Update 3.20.11.0 -> 3.21.9.6
    
    Reported by:    portscout
---
 sysutils/inotify-tools/Makefile                    |  6 ++++--
 sysutils/inotify-tools/distinfo                    |  6 +++---
 sysutils/inotify-tools/files/patch-configure.ac    |  6 +++---
 sysutils/inotify-tools/files/patch-src_Makefile.am | 12 +++++------
 .../inotify-tools/files/patch-src_inotifywatch.c   | 24 ++++++++++------------
 sysutils/inotify-tools/pkg-plist                   |  4 ++++
 6 files changed, 31 insertions(+), 27 deletions(-)

diff --git a/sysutils/inotify-tools/Makefile b/sysutils/inotify-tools/Makefile
index adb1be3989c8..ce5fb4ba8b74 100644
--- a/sysutils/inotify-tools/Makefile
+++ b/sysutils/inotify-tools/Makefile
@@ -1,7 +1,7 @@
 # Created by: Yuri Victorovich <yuri@rawbw.com>
 
 PORTNAME=	inotify-tools # new fork https://github.com/ericcurtin/inotify-tools
-DISTVERSION=	3.20.11.0
+DISTVERSION=	3.21.9.6
 CATEGORIES=	sysutils
 
 MAINTAINER=	yuri@FreeBSD.org
@@ -14,9 +14,11 @@ LIB_DEPENDS=	libinotify.so:devel/libinotify
 
 USES=		autoreconf compiler:c11 gmake libtool localbase
 USE_GITHUB=	yes
+USE_LDCONFIG=	yes
+
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS=	--disable-doxygen
-USE_LDCONFIG=	yes
+
 INSTALL_TARGET=	install-strip
 
 OPTIONS_DEFINE=	STATIC
diff --git a/sysutils/inotify-tools/distinfo b/sysutils/inotify-tools/distinfo
index eb818e8aabe1..8e5c6d6de324 100644
--- a/sysutils/inotify-tools/distinfo
+++ b/sysutils/inotify-tools/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1605329236
-SHA256 (inotify-tools-inotify-tools-3.20.11.0_GH0.tar.gz) = 58a3cde89e4a5111a87ac16b56b06a8f885460fca0aea51b69c856ce30a37a14
-SIZE (inotify-tools-inotify-tools-3.20.11.0_GH0.tar.gz) = 84827
+TIMESTAMP = 1637397925
+SHA256 (inotify-tools-inotify-tools-3.21.9.6_GH0.tar.gz) = 0ca3d5a632149e26375bbb0b542193698bc44da027925f7b7473a5617984d7e3
+SIZE (inotify-tools-inotify-tools-3.21.9.6_GH0.tar.gz) = 91668
diff --git a/sysutils/inotify-tools/files/patch-configure.ac b/sysutils/inotify-tools/files/patch-configure.ac
index 4ecbb4ede887..851282839de2 100644
--- a/sysutils/inotify-tools/files/patch-configure.ac
+++ b/sysutils/inotify-tools/files/patch-configure.ac
@@ -1,10 +1,10 @@
---- configure.ac.orig	2014-11-09 20:57:04 UTC
+--- configure.ac.orig	2021-09-28 08:39:16 UTC
 +++ configure.ac
-@@ -44,6 +44,7 @@ AM_CONDITIONAL([STATIC_BINARY_ENABLE], t
+@@ -45,6 +45,7 @@ AM_CONDITIONAL([STATIC_BINARY_ENABLE], test "$STATIC_B
  
  
  # Checks for libraries.
 +AC_SEARCH_LIBS(inotify_init, inotify)
  
  # Checks for header files.
- AC_CHECK_HEADERS([sys/inotify.h mcheck.h])
+ AC_CHECK_HEADERS([sys/inotify.h sys/fanotify.h mcheck.h])
diff --git a/sysutils/inotify-tools/files/patch-src_Makefile.am b/sysutils/inotify-tools/files/patch-src_Makefile.am
index 42e6b358e7ed..5214cd1fdfb3 100644
--- a/sysutils/inotify-tools/files/patch-src_Makefile.am
+++ b/sysutils/inotify-tools/files/patch-src_Makefile.am
@@ -1,11 +1,11 @@
---- src/Makefile.am.orig	2020-11-13 10:52:25 UTC
+--- src/Makefile.am.orig	2021-09-28 08:39:16 UTC
 +++ src/Makefile.am
-@@ -2,7 +2,7 @@ bin_PROGRAMS = inotifywait inotifywatch
- inotifywait_SOURCES = inotifywait.c common.c common.h
- inotifywatch_SOURCES = inotifywatch.c common.c common.h
+@@ -11,7 +11,7 @@ fsnotifywatch_SOURCES = inotifywatch.c common.c common
+ fsnotifywatch_CPPFLAGS = -DENABLE_FANOTIFY
+ endif
  
--AM_CFLAGS = -Wall -Wextra -Wshadow -Wpointer-arith -Werror -std=c99 -I../libinotifytools/src
-+AM_CFLAGS = -Wall -Wextra -Wshadow -Wpointer-arith -Werror -std=c99
+-AM_CFLAGS = -Wall -Wextra -Wshadow -Werror -std=c99 -I../libinotifytools/src
++AM_CFLAGS = -Wall -Wextra -Wshadow -Werror -std=c99
  AM_CPPFLAGS = -I$(top_srcdir)/libinotifytools/src
  LDADD = ../libinotifytools/src/libinotifytools.la
  
diff --git a/sysutils/inotify-tools/files/patch-src_inotifywatch.c b/sysutils/inotify-tools/files/patch-src_inotifywatch.c
index dfc768d6c927..3b16e9a71dca 100644
--- a/sysutils/inotify-tools/files/patch-src_inotifywatch.c
+++ b/sysutils/inotify-tools/files/patch-src_inotifywatch.c
@@ -1,18 +1,18 @@
---- src/inotifywatch.c.orig	2020-01-30 00:04:48 UTC
+--- src/inotifywatch.c.orig	2021-09-28 08:39:16 UTC
 +++ src/inotifywatch.c
-@@ -12,6 +12,9 @@
+@@ -11,6 +11,9 @@
  #include <errno.h>
  #include <fcntl.h>
  #include <getopt.h>
 +#ifdef __FreeBSD__
 +#include <pthread.h>
 +#endif // __FreeBSD__
+ #include <limits.h>
  #include <regex.h>
  #include <signal.h>
- #include <stdbool.h>
-@@ -82,6 +85,10 @@ int main(int argc, char **argv) {
-     char *inc_regex = NULL;
+@@ -96,8 +99,24 @@ int main(int argc, char **argv) {
      char *inc_iregex = NULL;
+     int rc;
  
 +#ifdef __FreeBSD__
 +    sigset_t set, oset;
@@ -20,11 +20,6 @@
 +
      signal(SIGINT, handle_impatient_user);
  
-     // Parse commandline options, aborting if something goes wrong
-@@ -110,10 +117,26 @@ int main(int argc, char **argv) {
-         return EXIT_FAILURE;
-     }
- 
 +#ifdef __FreeBSD__
 +    // Block some signals in libinotify's worker thread, so that
 +    // handle_signal runs in the context of the main thread and
@@ -37,9 +32,12 @@
 +    pthread_sigmask(SIG_BLOCK, &set, &oset);
 +#endif // __FreeBSD__
 +
-     if (!inotifytools_initialize()) {
-         warn_inotify_init_error();
-         return EXIT_FAILURE;
+     // Parse commandline options, aborting if something goes wrong
+     if (!parse_opts(&argc, &argv, &events, &timeout, &verbose, &zero, &sort,
+ 		    &recursive, &no_dereference, &fromfile, &exc_regex,
+@@ -130,6 +149,10 @@ int main(int argc, char **argv) {
+ 	    warn_inotify_init_error(fanotify);
+ 	    return EXIT_FAILURE;
      }
 +
 +#ifdef __FreeBSD__
diff --git a/sysutils/inotify-tools/pkg-plist b/sysutils/inotify-tools/pkg-plist
index 3fb813799798..affa0afdf7b3 100644
--- a/sysutils/inotify-tools/pkg-plist
+++ b/sysutils/inotify-tools/pkg-plist
@@ -2,6 +2,8 @@ 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
 include/inotifytools/inotify.h
 include/inotifytools/inotifytools.h
@@ -9,5 +11,7 @@ lib/libinotifytools.a
 lib/libinotifytools.so
 lib/libinotifytools.so.0
 lib/libinotifytools.so.0.4.1
+man/man1/fsnotifywait.1.gz
+man/man1/fsnotifywatch.1.gz
 man/man1/inotifywait.1.gz
 man/man1/inotifywatch.1.gz