FreeBSD Bugzilla – Attachment 162885 Details for
Bug 204366
sysutils/inotify-tools: Update to 3.14.40 (Fixes inotifywatch)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
inotify-tools fix and update
0001-Update-sysutils-inotify-tools-to-latest-git-version.patch (text/plain), 7.90 KB, created by
wjenkner
on 2015-11-07 17:32:43 UTC
(
hide
)
Description:
inotify-tools fix and update
Filename:
MIME Type:
Creator:
wjenkner
Created:
2015-11-07 17:32:43 UTC
Size:
7.90 KB
patch
obsolete
>From 6f3d251483d5c798371dd2759142373c6c83de41 Mon Sep 17 00:00:00 2001 >From: Wolfgang Jenkner <wjenkner@inode.at> >Date: Sun, 1 Nov 2015 16:47:21 +0100 >Subject: [PATCH] Update sysutils/inotify-tools to latest git version. > >The patch for configure.ac is the essential part of the build support. >The changes to src/Makefile.am are needed only because clang is picky >about unused arguments. > >Those patches have been written with a view to submitting them >upstream. > >On the other hand, the patch to src/inotifywatch.c works around an >incompatibility between libinotify and native Linux inotify, which >should perhaps be addressed in libinotify at some point. >--- > sysutils/inotify-tools/Makefile | 6 ++-- > sysutils/inotify-tools/distinfo | 4 +-- > sysutils/inotify-tools/files/patch-configure.ac | 18 ++++++++++ > .../files/patch-libinotifytools_src_inotifytools.c | 31 ---------------- > sysutils/inotify-tools/files/patch-src_Makefile.am | 16 +++++++++ > sysutils/inotify-tools/files/patch-src_common.c | 14 -------- > .../inotify-tools/files/patch-src_inotifywatch.c | 42 ++++++++++++++++++++++ > 7 files changed, 81 insertions(+), 50 deletions(-) > create mode 100644 sysutils/inotify-tools/files/patch-configure.ac > delete mode 100644 sysutils/inotify-tools/files/patch-libinotifytools_src_inotifytools.c > create mode 100644 sysutils/inotify-tools/files/patch-src_Makefile.am > delete mode 100644 sysutils/inotify-tools/files/patch-src_common.c > create mode 100644 sysutils/inotify-tools/files/patch-src_inotifywatch.c > >diff --git a/sysutils/inotify-tools/Makefile b/sysutils/inotify-tools/Makefile >index a9129fc..10a3077 100644 >--- a/sysutils/inotify-tools/Makefile >+++ b/sysutils/inotify-tools/Makefile >@@ -2,9 +2,9 @@ > # $FreeBSD$ > > PORTNAME= inotify-tools >-PORTVERSION= 3.14 >-CATEGORIES= sysutils >+PORTVERSION= 3.14.40 > DISTVERSIONPREFIX= v >+CATEGORIES= sysutils > > MAINTAINER= yuri@rawbw.com > COMMENT= Command-line utilities to watch for file events >@@ -15,6 +15,7 @@ LIB_DEPENDS= libinotify.so:${PORTSDIR}/devel/libinotify > > USE_GITHUB= yes > GH_ACCOUNT= rvoicilas >+GH_TAGNAME= 1df9af4 > > USES= autoreconf gmake libtool > GNU_CONFIGURE= yes >@@ -24,6 +25,5 @@ INSTALL_TARGET= install-strip > > CPPFLAGS+= -I${LOCALBASE}/include > LDFLAGS+= -L${LOCALBASE}/lib >-LIBS+= -linotify > > .include <bsd.port.mk> >diff --git a/sysutils/inotify-tools/distinfo b/sysutils/inotify-tools/distinfo >index a380059..1376470 100644 >--- a/sysutils/inotify-tools/distinfo >+++ b/sysutils/inotify-tools/distinfo >@@ -1,2 +1,2 @@ >-SHA256 (rvoicilas-inotify-tools-v3.14_GH0.tar.gz) = 97a4fdf9132da47c2baa677c1a427c435ee55a26df42b2b74a41489b9fbd2323 >-SIZE (rvoicilas-inotify-tools-v3.14_GH0.tar.gz) = 66905 >+SHA256 (rvoicilas-inotify-tools-v3.14.40-1df9af4_GH0.tar.gz) = 3cb567344dad1fbe9a935d5a7c3f9c9bbce151df982631eb319763b2708ef4ea >+SIZE (rvoicilas-inotify-tools-v3.14.40-1df9af4_GH0.tar.gz) = 70023 >diff --git a/sysutils/inotify-tools/files/patch-configure.ac b/sysutils/inotify-tools/files/patch-configure.ac >new file mode 100644 >index 0000000..beecd02 >--- /dev/null >+++ b/sysutils/inotify-tools/files/patch-configure.ac >@@ -0,0 +1,18 @@ >+--- configure.ac.orig 2014-11-09 20:57:04 UTC >++++ configure.ac >+@@ -44,6 +44,7 @@ AM_CONDITIONAL([STATIC_BINARY_ENABLE], t >+ >+ >+ # Checks for libraries. >++AC_SEARCH_LIBS(inotify_init, inotify) >+ >+ # Checks for header files. >+ AC_CHECK_HEADERS([sys/inotify.h mcheck.h]) >+@@ -62,6 +63,7 @@ AC_C_CONST >+ AC_C_INLINE >+ >+ # Checks for library functions. >++AC_CHECK_FUNCS(stat64, [], [CPPFLAGS="$CPPFLAGS -Dstat64=stat -Dlstat64=lstat"]) >+ >+ # Set variables used in man page templates >+ MAN_DATE=$(date +'%B %d, %Y') >diff --git a/sysutils/inotify-tools/files/patch-libinotifytools_src_inotifytools.c b/sysutils/inotify-tools/files/patch-libinotifytools_src_inotifytools.c >deleted file mode 100644 >index a3b3f26..0000000 >--- a/sysutils/inotify-tools/files/patch-libinotifytools_src_inotifytools.c >+++ /dev/null >@@ -1,31 +0,0 @@ >---- libinotifytools/src/inotifytools.c.orig 2010-02-02 14:55:19 UTC >-+++ libinotifytools/src/inotifytools.c >-@@ -1309,14 +1309,14 @@ int inotifytools_watch_recursively_with_ >- >- static struct dirent * ent; >- char * next_file; >-- static struct stat64 my_stat; >-+ static struct stat my_stat; >- ent = readdir( dir ); >- // Watch each directory within this directory >- while ( ent ) { >- if ( (0 != strcmp( ent->d_name, "." )) && >- (0 != strcmp( ent->d_name, ".." )) ) { >- nasprintf(&next_file,"%s%s", my_path, ent->d_name); >-- if ( -1 == lstat64( next_file, &my_stat ) ) { >-+ if ( -1 == lstat( next_file, &my_stat ) ) { >- error = errno; >- free( next_file ); >- if ( errno != EACCES ) { >-@@ -1595,9 +1595,9 @@ int inotifytools_error() { >- * @internal >- */ >- int isdir( char const * path ) { >-- static struct stat64 my_stat; >-+ static struct stat my_stat; >- >-- if ( -1 == lstat64( path, &my_stat ) ) { >-+ if ( -1 == lstat( path, &my_stat ) ) { >- if (errno == ENOENT) return 0; >- fprintf(stderr, "Stat failed on %s: %s\n", path, strerror(errno)); >- return 0; >diff --git a/sysutils/inotify-tools/files/patch-src_Makefile.am b/sysutils/inotify-tools/files/patch-src_Makefile.am >new file mode 100644 >index 0000000..20a2272 >--- /dev/null >+++ b/sysutils/inotify-tools/files/patch-src_Makefile.am >@@ -0,0 +1,16 @@ >+--- src/Makefile.am.orig 2015-11-02 16:26:29 UTC >++++ src/Makefile.am >+@@ -2,10 +2,11 @@ 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_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 >diff --git a/sysutils/inotify-tools/files/patch-src_common.c b/sysutils/inotify-tools/files/patch-src_common.c >deleted file mode 100644 >index 703e044..0000000 >--- a/sysutils/inotify-tools/files/patch-src_common.c >+++ /dev/null >@@ -1,14 +0,0 @@ >---- src/common.c.orig 2010-02-02 14:55:19 UTC >-+++ src/common.c >-@@ -41,9 +41,9 @@ void print_event_descriptions() { >- } >- >- int isdir( char const * path ) { >-- static struct stat64 my_stat; >-+ static struct stat my_stat; >- >-- if ( -1 == lstat64( path, &my_stat ) ) { >-+ if ( -1 == lstat( path, &my_stat ) ) { >- if (errno == ENOENT) return 0; >- fprintf(stderr, "Stat failed on %s: %s\n", path, strerror(errno)); >- return 0; >diff --git a/sysutils/inotify-tools/files/patch-src_inotifywatch.c b/sysutils/inotify-tools/files/patch-src_inotifywatch.c >new file mode 100644 >index 0000000..a53eeb2 >--- /dev/null >+++ b/sysutils/inotify-tools/files/patch-src_inotifywatch.c >@@ -0,0 +1,42 @@ >+--- src/inotifywatch.c.orig 2015-11-02 17:01:50 UTC >++++ src/inotifywatch.c >+@@ -12,6 +12,7 @@ >+ #include <errno.h> >+ #include <fcntl.h> >+ #include <getopt.h> >++#include <pthread.h> >+ #include <regex.h> >+ #include <signal.h> >+ #include <stdbool.h> >+@@ -93,6 +94,7 @@ int main(int argc, char ** argv) >+ char * exc_iregex = NULL; >+ char * inc_regex = NULL; >+ char * inc_iregex = NULL; >++ sigset_t set, oset; >+ >+ signal( SIGINT, handle_impatient_user ); >+ >+@@ -121,11 +123,23 @@ int main(int argc, char ** argv) >+ return EXIT_FAILURE; >+ } >+ >++ // 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); >++ >+ if ( !inotifytools_initialize() ) { >+ warn_inotify_init_error(); >+ return EXIT_FAILURE; >+ } >+ >++ pthread_sigmask(SIG_SETMASK, &oset, NULL); >++ >+ // Attempt to watch file >+ // If events is still 0, make it all events. >+ if ( !events ) >-- >2.6.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 204366
:
162885
|
162903
|
162904
|
163214
|
163215
|
164261