Index: head/sysutils/inotify-tools/Makefile =================================================================== --- head/sysutils/inotify-tools/Makefile (revision 524671) +++ head/sysutils/inotify-tools/Makefile (revision 524672) @@ -1,41 +1,46 @@ # Created by: Yuri Victorovich # $FreeBSD$ -PORTNAME= inotify-tools -DISTVERSION= 3.20.1 +PORTNAME= inotify-tools # new fork https://github.com/ericcurtin/inotify-tools +DISTVERSION= 3.20.2 CATEGORIES= sysutils MAINTAINER= yuri@FreeBSD.org COMMENT= Command-line utilities to watch for file events LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libinotify.so:devel/libinotify USES= autoreconf gmake libtool localbase USE_GITHUB= yes -GH_ACCOUNT= rvoicilas GNU_CONFIGURE= yes CONFIGURE_ARGS= --disable-doxygen USE_LDCONFIG= yes INSTALL_TARGET= install-strip OPTIONS_DEFINE= STATIC OPTIONS_SUB= yes post-patch: @${REINPLACE_CMD} -e 's|stat64|stat|' \ ${WRKSRC}/src/common.c \ ${WRKSRC}/libinotifytools/src/inotifytools.c 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 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 + @${ECHO} "unit test" + @cd ${WRKSRC}/libinotifytools/src && ${GMAKE} test && ./test + @${ECHO} "integration test" + @cd ${WRKSRC}/t && ${GMAKE} .include Index: head/sysutils/inotify-tools/distinfo =================================================================== --- head/sysutils/inotify-tools/distinfo (revision 524671) +++ head/sysutils/inotify-tools/distinfo (revision 524672) @@ -1,3 +1,3 @@ -TIMESTAMP = 1517817616 -SHA256 (rvoicilas-inotify-tools-3.20.1_GH0.tar.gz) = a433cc1dedba851078276db69b0e97f9fe41e4ba3336d2971adfca4b3a6242ac -SIZE (rvoicilas-inotify-tools-3.20.1_GH0.tar.gz) = 79564 +TIMESTAMP = 1580350866 +SHA256 (inotify-tools-inotify-tools-3.20.2_GH0.tar.gz) = 5ef0519934ac99f58c217fce259832a4ed51e25ded64c8aaf1149791b2c9b2c7 +SIZE (inotify-tools-inotify-tools-3.20.2_GH0.tar.gz) = 80938 Index: head/sysutils/inotify-tools/files/patch-src_Makefile.am =================================================================== --- head/sysutils/inotify-tools/files/patch-src_Makefile.am (revision 524671) +++ head/sysutils/inotify-tools/files/patch-src_Makefile.am (revision 524672) @@ -1,16 +1,11 @@ ---- src/Makefile.am.orig 2014-11-09 20:57:04 UTC +--- src/Makefile.am.orig 2020-01-30 00:04:48 UTC +++ src/Makefile.am -@@ -2,10 +2,11 @@ bin_PROGRAMS = inotifywait inotifywatch +@@ -2,7 +2,7 @@ bin_PROGRAMS = inotifywait inotifywatch inotifywait_SOURCES = inotifywait.c common.c common.h inotifywatch_SOURCES = inotifywatch.c common.c common.h --AM_CFLAGS = -Wall -Werror -Wpointer-arith -std=c99 -I../libinotifytools/src -L../libinotifytools/src -+AM_CFLAGS = -Wall -Werror -Wpointer-arith -std=c99 +-AM_CFLAGS = -Wall -Wextra -Wpointer-arith -Werror -std=c99 -I../libinotifytools/src ++AM_CFLAGS = -Wall -Wextra -Wpointer-arith -Werror -std=c99 AM_CPPFLAGS = -I$(top_srcdir)/libinotifytools/src LDADD = ../libinotifytools/src/libinotifytools.la -+AM_LDFLAGS = -L$(top_srcdir)/libinotifytools/src - if STATIC_BINARY_ENABLE --AM_LDFLAGS = -static-libtool-libs -+AM_LDFLAGS += -static-libtool-libs - endif Index: head/sysutils/inotify-tools/files/patch-src_inotifywatch.c =================================================================== --- head/sysutils/inotify-tools/files/patch-src_inotifywatch.c (revision 524671) +++ head/sysutils/inotify-tools/files/patch-src_inotifywatch.c (revision 524672) @@ -1,51 +1,50 @@ ---- src/inotifywatch.c.orig 2018-01-06 11:10:51 UTC +--- src/inotifywatch.c.orig 2020-01-30 00:04:48 UTC +++ src/inotifywatch.c @@ -12,6 +12,9 @@ #include #include #include +#ifdef __FreeBSD__ +#include +#endif // __FreeBSD__ #include #include #include @@ -82,6 +85,10 @@ int main(int argc, char **argv) { char *inc_regex = NULL; char *inc_iregex = NULL; +#ifdef __FreeBSD__ + sigset_t set, oset; +#endif // __FreeBSD__ + signal(SIGINT, handle_impatient_user); // Parse commandline options, aborting if something goes wrong -@@ -110,11 +117,27 @@ int main(int argc, char **argv) { +@@ -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 + // the 'done' flag is actually honored. + sigemptyset(&set); + sigaddset(&set, SIGINT); + sigaddset(&set, SIGHUP); + sigaddset(&set, SIGTERM); + sigaddset(&set, SIGALRM); + pthread_sigmask(SIG_BLOCK, &set, &oset); +#endif // __FreeBSD__ + if (!inotifytools_initialize()) { warn_inotify_init_error(); return EXIT_FAILURE; } - ++ +#ifdef __FreeBSD__ + pthread_sigmask(SIG_SETMASK, &oset, NULL); +#endif // __FreeBSD__ -+ + // Attempt to watch file // If events is still 0, make it all events. - if (!events) Index: head/sysutils/inotify-tools/pkg-descr =================================================================== --- head/sysutils/inotify-tools/pkg-descr (revision 524671) +++ head/sysutils/inotify-tools/pkg-descr (revision 524672) @@ -1,4 +1,4 @@ The set of command-line programs providing a simple interface to file system events to shell scripts. -WWW: https://github.com/rvoicilas/inotify-tools/ +WWW: https://github.com/inotify-tools/inotify-tools/