FreeBSD Bugzilla – Attachment 163214 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]
patch
inotify-tools.patch (text/plain), 6.10 KB, created by
Yuri Victorovich
on 2015-11-16 22:13:43 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Yuri Victorovich
Created:
2015-11-16 22:13:43 UTC
Size:
6.10 KB
patch
obsolete
>diff -ruN sysutils/inotify-tools/Makefile sysutils/inotify-tools/Makefile >--- sysutils/inotify-tools/Makefile 2015-11-16 14:10:37.770857000 -0800 >+++ sysutils/inotify-tools/Makefile 2015-11-16 14:07:24.899962000 -0800 >@@ -3,8 +3,9 @@ > > PORTNAME= inotify-tools > PORTVERSION= 3.14 >-CATEGORIES= sysutils > DISTVERSIONPREFIX= v >+PORTREVISION= 1 >+CATEGORIES= sysutils > > MAINTAINER= yuri@rawbw.com > COMMENT= Command-line utilities to watch for file events >@@ -15,6 +16,7 @@ > > USE_GITHUB= yes > GH_ACCOUNT= rvoicilas >+GH_TAGNAME= 1df9af4 > > USES= autoreconf gmake libtool > GNU_CONFIGURE= yes >@@ -24,6 +26,5 @@ > > CPPFLAGS+= -I${LOCALBASE}/include > LDFLAGS+= -L${LOCALBASE}/lib >-LIBS+= -linotify > > .include <bsd.port.mk> >diff -ruN sysutils/inotify-tools/distinfo sysutils/inotify-tools/distinfo >--- sysutils/inotify-tools/distinfo 2015-11-16 14:10:37.771659000 -0800 >+++ sysutils/inotify-tools/distinfo 2015-11-16 14:07:10.396114000 -0800 >@@ -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-1df9af4_GH0.tar.gz) = 3cb567344dad1fbe9a935d5a7c3f9c9bbce151df982631eb319763b2708ef4ea >+SIZE (rvoicilas-inotify-tools-v3.14-1df9af4_GH0.tar.gz) = 70023 >diff -ruN sysutils/inotify-tools/files/patch-configure.ac sysutils/inotify-tools/files/patch-configure.ac >--- sysutils/inotify-tools/files/patch-configure.ac 1969-12-31 16:00:00.000000000 -0800 >+++ sysutils/inotify-tools/files/patch-configure.ac 2015-11-08 17:45:32.830214000 -0800 >@@ -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 -ruN sysutils/inotify-tools/files/patch-libinotifytools_src_inotifytools.c sysutils/inotify-tools/files/patch-libinotifytools_src_inotifytools.c >--- sysutils/inotify-tools/files/patch-libinotifytools_src_inotifytools.c 2015-11-16 14:10:37.827232000 -0800 >+++ sysutils/inotify-tools/files/patch-libinotifytools_src_inotifytools.c 1969-12-31 16:00:00.000000000 -0800 >@@ -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 -ruN sysutils/inotify-tools/files/patch-src_Makefile.am sysutils/inotify-tools/files/patch-src_Makefile.am >--- sysutils/inotify-tools/files/patch-src_Makefile.am 1969-12-31 16:00:00.000000000 -0800 >+++ sysutils/inotify-tools/files/patch-src_Makefile.am 2015-11-08 17:45:32.839170000 -0800 >@@ -0,0 +1,16 @@ >+--- src/Makefile.am.orig 2014-11-09 20:57:04 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 -ruN sysutils/inotify-tools/files/patch-src_inotifywatch.c sysutils/inotify-tools/files/patch-src_inotifywatch.c >--- sysutils/inotify-tools/files/patch-src_inotifywatch.c 1969-12-31 16:00:00.000000000 -0800 >+++ sysutils/inotify-tools/files/patch-src_inotifywatch.c 2015-11-08 17:45:32.848469000 -0800 >@@ -0,0 +1,50 @@ >+--- src/inotifywatch.c.orig 2015-11-09 01:40:46 UTC >++++ src/inotifywatch.c >+@@ -12,6 +12,9 @@ >+ #include <errno.h> >+ #include <fcntl.h> >+ #include <getopt.h> >++#ifdef __FreeBSD__ >++#include <pthread.h> >++#endif // __FreeBSD__ >+ #include <regex.h> >+ #include <signal.h> >+ #include <stdbool.h> >+@@ -93,6 +96,9 @@ int main(int argc, char ** argv) >+ char * exc_iregex = NULL; >+ char * inc_regex = NULL; >+ char * inc_iregex = NULL; >++#ifdef __FreeBSD__ >++ sigset_t set, oset; >++#endif // __FreeBSD__ >+ >+ signal( SIGINT, handle_impatient_user ); >+ >+@@ -121,11 +127,27 @@ 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 )
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
Flags:
yuri
:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 204366
:
162885
|
162903
|
162904
|
163214
|
163215
|
164261