sysutils/inotify-tools: Update to 3.20.1

Additional port changes:
* Updated MAINTANER e-mail
* Reformatted the patch to fit reformatted surroundings

Reported by:	portscout
Approved by:	adamw (mentor)
Differential Revision:	https://reviews.freebsd.org/D14202
This commit is contained in:
Yuri Victorovich 2018-02-05 18:04:43 +00:00
parent f3ed529ae4
commit bb22ecf6d0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=461008
3 changed files with 37 additions and 38 deletions

View file

@ -2,12 +2,10 @@
# $FreeBSD$
PORTNAME= inotify-tools
PORTVERSION= 3.14.01
DISTVERSIONPREFIX= v
PORTREVISION= 1
DISTVERSION= 3.20.1
CATEGORIES= sysutils
MAINTAINER= yuri@rawbw.com
MAINTAINER= yuri@FreeBSD.org
COMMENT= Command-line utilities to watch for file events
LICENSE= GPLv2
@ -18,7 +16,6 @@ LIB_DEPENDS= libinotify.so:devel/libinotify
USES= autoreconf gmake libtool localbase
USE_GITHUB= yes
GH_ACCOUNT= rvoicilas
GH_TAGNAME= 1df9af4
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --disable-doxygen
USE_LDCONFIG= yes

View file

@ -1,2 +1,3 @@
SHA256 (rvoicilas-inotify-tools-v3.14.01-1df9af4_GH0.tar.gz) = 3cb567344dad1fbe9a935d5a7c3f9c9bbce151df982631eb319763b2708ef4ea
SIZE (rvoicilas-inotify-tools-v3.14.01-1df9af4_GH0.tar.gz) = 70023
TIMESTAMP = 1517817616
SHA256 (rvoicilas-inotify-tools-3.20.1_GH0.tar.gz) = a433cc1dedba851078276db69b0e97f9fe41e4ba3336d2971adfca4b3a6242ac
SIZE (rvoicilas-inotify-tools-3.20.1_GH0.tar.gz) = 79564

View file

@ -1,4 +1,4 @@
--- src/inotifywatch.c.orig 2015-11-09 01:40:46 UTC
--- src/inotifywatch.c.orig 2018-01-06 11:10:51 UTC
+++ src/inotifywatch.c
@@ -12,6 +12,9 @@
#include <errno.h>
@ -10,41 +10,42 @@
#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;
}
@@ -82,6 +85,10 @@ int main(int argc, char **argv) {
char *inc_regex = NULL;
char *inc_iregex = NULL;
+#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);
+ sigset_t set, oset;
+#endif // __FreeBSD__
+
if ( !inotifytools_initialize() ) {
warn_inotify_init_error();
return EXIT_FAILURE;
}
signal(SIGINT, handle_impatient_user);
// Parse commandline options, aborting if something goes wrong
@@ -110,11 +117,27 @@ int main(int argc, char **argv) {
return EXIT_FAILURE;
}
+#ifdef __FreeBSD__
+ pthread_sigmask(SIG_SETMASK, &oset, NULL);
+ // 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__
+
// Attempt to watch file
// If events is still 0, make it all events.
if ( !events )
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)