Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package entr for openSUSE:Factory checked in 
at 2021-12-29 21:11:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/entr (Old)
 and      /work/SRC/openSUSE:Factory/.entr.new.2520 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "entr"

Wed Dec 29 21:11:01 2021 rev:11 rq:943032 version:5.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/entr/entr.changes        2021-07-05 
22:23:05.561669614 +0200
+++ /work/SRC/openSUSE:Factory/.entr.new.2520/entr.changes      2021-12-29 
21:11:32.430314328 +0100
@@ -1,0 +2,10 @@
+Tue Dec 28 17:28:11 UTC 2021 - Martin Hauke <mar...@gmx.de>
+
+- Update to version 5.1
+  * Detect files moved to or from directories on Linux.
+  * Allow detection of directory entries beginning with '.' by
+    specifying '-d' twice.
+  * Only reset terminal settings in exit handler if settings were
+    changed.
+
+-------------------------------------------------------------------

Old:
----
  entr-5.0.tar.gz
  entr-5.0.tar.gz.sig

New:
----
  entr-5.1.tar.gz
  entr-5.1.tar.gz.sig

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ entr.spec ++++++
--- /var/tmp/diff_new_pack.owbJPO/_old  2021-12-29 21:11:32.866314687 +0100
+++ /var/tmp/diff_new_pack.owbJPO/_new  2021-12-29 21:11:32.870314690 +0100
@@ -18,7 +18,7 @@
 
 
 Name:           entr
-Version:        5.0
+Version:        5.1
 Release:        0
 Summary:        A utility for running arbitrary commands when files change
 License:        ISC

++++++ entr-5.0.tar.gz -> entr-5.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/entr-5.0/Makefile.bsd new/entr-5.1/Makefile.bsd
--- old/entr-5.0/Makefile.bsd   2021-07-02 16:50:26.000000000 +0200
+++ new/entr-5.1/Makefile.bsd   2021-12-28 03:16:20.000000000 +0100
@@ -1,6 +1,6 @@
 PREFIX ?= /usr/local
 MANPREFIX ?= ${PREFIX}/man
-RELEASE = 5.0
+RELEASE = 5.1
 CPPFLAGS += -DRELEASE=\"${RELEASE}\"
 
 all: versioncheck entr
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/entr-5.0/NEWS new/entr-5.1/NEWS
--- old/entr-5.0/NEWS   2021-07-02 16:50:26.000000000 +0200
+++ new/entr-5.1/NEWS   2021-12-28 03:16:20.000000000 +0100
@@ -1,5 +1,11 @@
 = Release History
 
+== 5.1: December 28, 2021
+
+ - Detect files moved to or from directories on Linux
+ - Allow detection of directory entries beginning with '.' by specifying '-d' 
twice
+ - Only reset terminal settings in exit handler if settings were changed
+
 == 5.0: July 2, 2021
 
  - Add missing call to getrlimit(3) on MacOS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/entr-5.0/entr.1 new/entr-5.1/entr.1
--- old/entr-5.0/entr.1 2021-07-02 16:50:26.000000000 +0200
+++ new/entr-5.1/entr.1 2021-12-28 03:16:20.000000000 +0100
@@ -13,7 +13,7 @@
 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\"
-.Dd July 2, 2021
+.Dd August 13, 2021
 .Dt ENTR 1
 .Os
 .Sh NAME
@@ -55,7 +55,8 @@
 Track the directories of regular files provided as input and exit if a new file
 is added.
 This option also enables directories to be specified explicitly.
-Files with names beginning with
+If specified twice, all new entries to a directory are recognized,
+otherwise files with names beginning with
 .Ql \&.
 are ignored.
 .It Fl n
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/entr-5.0/entr.c new/entr-5.1/entr.c
--- old/entr-5.0/entr.c 2021-07-02 16:50:26.000000000 +0200
+++ new/entr-5.1/entr.c 2021-12-28 03:16:20.000000000 +0100
@@ -31,9 +31,9 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <termios.h>
 #include <time.h>
 #include <unistd.h>
-#include <termios.h>
 
 #include "missing/compat.h"
 
@@ -79,10 +79,12 @@
 int clear_opt;
 int dirwatch_opt;
 int noninteractive_opt;
+int oneshot_opt;
 int postpone_opt;
 int restart_opt;
 int shell_opt;
-int oneshot_opt;
+
+int termios_set;
 struct termios canonical_tty;
 
 /* forwards */
@@ -261,7 +263,7 @@
 
 void
 handle_exit(int sig) {
-       if (!noninteractive_opt)
+       if ((!noninteractive_opt) && (termios_set))
                xtcsetattr(STDIN_FILENO, TCSADRAIN, &canonical_tty);
        terminate_utility();
        if ((sig == SIGINT || sig == SIGHUP))
@@ -318,7 +320,7 @@
                        n_files++;
                }
                /* also watch the directory if it's not already in the list */
-               if (dirwatch_opt == 1) {
+               if (dirwatch_opt > 0) {
                        if (S_ISDIR(sb.st_mode) != 0)
                                path = &buf[0];
                        else
@@ -351,7 +353,7 @@
        if (dfd == NULL)
                errx(1, "unable to open directory: '%s'", dir);
        while((dp = readdir(dfd)) != NULL)
-               if (dp->d_name[0] != '.')
+               if ((dirwatch_opt == 2) || (dp->d_name[0] != '.'))
                        count++;
        closedir(dfd);
        return count;
@@ -377,7 +379,7 @@
                        clear_opt = clear_opt ? 2 : 1;
                        break;
                case 'd':
-                       dirwatch_opt = 1;
+                       dirwatch_opt = dirwatch_opt ? 2 : 1;
                        break;
                case 'n':
                        noninteractive_opt = 1;
@@ -600,8 +602,11 @@
        }
 
 main:
-       if (!noninteractive_opt)
+       if (!noninteractive_opt) {
                xtcsetattr(STDIN_FILENO, TCSADRAIN, &character_tty);
+               termios_set = 1;
+       }
+
        if ((reopen_only == 1) || (collate_only == 1)) {
                nev = xkevent(kq, NULL, 0, evList, 32, &evTimeout);
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/entr-5.0/entr_spec.c new/entr-5.1/entr_spec.c
--- old/entr-5.0/entr_spec.c    2021-07-02 16:50:26.000000000 +0200
+++ new/entr-5.1/entr_spec.c    2021-12-28 03:16:20.000000000 +0100
@@ -84,10 +84,10 @@
        clear_opt = 0;
        dirwatch_opt = 0;
        noninteractive_opt = 0;
+       oneshot_opt = 0;
        postpone_opt = 0;
        restart_opt = 0;
        shell_opt = 0;
-       oneshot_opt = 0;
 
        leading_edge = 0;
        files = calloc(max_files, sizeof(WatchFile *));
@@ -885,7 +885,7 @@
        return 0;
 }
 /*
- * Substitue '/_' with the first file that leading_edge
+ * Substitute '/_' with the first file that leading_edge
  */
 int run_utility_01() {
        static char *argv[] = { "psql", "-f", "/_", NULL };
@@ -907,7 +907,7 @@
 }
 
 /*
- * Substitue only the first occurance of '/_'
+ * Substitute only the first occurrence of '/_'
  */
 int run_utility_02() {
        static char *argv[] = { "/_", "/_", NULL };
@@ -934,19 +934,19 @@
         signal(SIGSEGV, sighandler);
 
        /* set up pointers to test doubles */
-       xstat = fake_stat;
-       xkevent = fake_kevent;
-       xkillpg = fake_killpg;
-       xwaitpid = fake_waitpid;
+       xerrx = fake_errx;
        xexecvp = fake_execvp;
        xfork = fake_fork;
-       xopen = fake_open;
-       xrealpath = fake_realpath;
        xfree = fake_free;
-       xerrx = fake_errx;
-       xwarnx = fake_warnx;
+       xkevent = fake_kevent;
+       xkillpg = fake_killpg;
        xlist_dir = fake_list_dir;
+       xopen = fake_open;
+       xrealpath = fake_realpath;
+       xstat = fake_stat;
        xtcsetattr = fake_tcsetattr;
+       xwaitpid = fake_waitpid;
+       xwarnx = fake_warnx;
 
        /* all tests */
        run(process_input_01);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/entr-5.0/missing/kqueue_inotify.c 
new/entr-5.1/missing/kqueue_inotify.c
--- old/entr-5.0/missing/kqueue_inotify.c       2021-07-02 16:50:26.000000000 
+0200
+++ new/entr-5.1/missing/kqueue_inotify.c       2021-12-28 03:16:20.000000000 
+0100
@@ -81,7 +81,7 @@
 
 #define EVENT_SIZE (sizeof (struct inotify_event))
 #define EVENT_BUF_LEN (32 * (EVENT_SIZE + 16))
-#define IN_ALL IN_CLOSE_WRITE|IN_DELETE_SELF|IN_MOVE_SELF|IN_ATTRIB|IN_CREATE
+#define IN_ALL 
IN_CLOSE_WRITE|IN_DELETE_SELF|IN_MOVE_SELF|IN_MOVED_TO|IN_MOVED_FROM|IN_ATTRIB|IN_CREATE
 
 /*
  * inotify and kqueue ids both have the type `int`
@@ -192,6 +192,8 @@
                                if (iev->mask & IN_CLOSE_WRITE) fflags |= 
NOTE_WRITE;
                                if (iev->mask & IN_CREATE)      fflags |= 
NOTE_WRITE;
                                if (iev->mask & IN_MOVE_SELF)   fflags |= 
NOTE_RENAME;
+                               if (iev->mask & IN_MOVED_TO)    fflags |= 
NOTE_RENAME;
+                               if (iev->mask & IN_MOVED_FROM)  fflags |= 
NOTE_RENAME;
                                if (iev->mask & IN_ATTRIB)      fflags |= 
NOTE_ATTRIB;
                                if (getenv("ENTR_INOTIFY_WORKAROUND"))
                                        if (iev->mask & IN_MODIFY)  fflags |= 
NOTE_WRITE;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/entr-5.0/system_test.sh new/entr-5.1/system_test.sh
--- old/entr-5.0/system_test.sh 2021-07-02 16:50:26.000000000 +0200
+++ new/entr-5.1/system_test.sh 2021-12-28 03:16:20.000000000 +0100
@@ -174,6 +174,17 @@
        assert "$(cat $tmp/exec.err)" "entr: directory altered"
        rmdir $tmp/newdir
 
+try "exec single shell utility and exit when a hidden subdirectory is added"
+       setup
+       ls -d $tmp | ./entr -ddp sh -c 'echo ping' >$tmp/exec.out 
2>$tmp/exec.err \
+           || true &
+       bgpid=$! ; zz
+       mkdir $tmp/.newdir
+       wait $bgpid || assert "$?" "130"
+       assert "$(cat $tmp/exec.out)" "ping"
+       assert "$(cat $tmp/exec.err)" "entr: directory altered"
+       rmdir $tmp/.newdir
+
 try "exec single shell utility and exit when a file is added to a specific 
path"
        setup
        ls -d $tmp | ./entr -dp sh -c 'echo ping' >$tmp/exec.out 
2>$tmp/exec.err \

Reply via email to