Hello community, here is the log from the commit of package libuev for openSUSE:Factory checked in at 2018-09-11 17:15:20 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libuev (Old) and /work/SRC/openSUSE:Factory/.libuev.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libuev" Tue Sep 11 17:15:20 2018 rev:3 rq:633991 version:2.1.3 Changes: -------- --- /work/SRC/openSUSE:Factory/libuev/libuev.changes 2018-07-31 16:04:21.712052823 +0200 +++ /work/SRC/openSUSE:Factory/.libuev.new/libuev.changes 2018-09-11 17:15:31.615573559 +0200 @@ -1,0 +2,14 @@ +Fri Sep 7 06:40:04 UTC 2018 - [email protected] + +- Update to 2.1.3: + Changes: + * Update joystick example, use first device, /dev/input/js0 + * Minor refactor of uev_exit(), use _SAFE macros to traverse + list of watchers instead of while() + * New API test to verify that uev_exit() terminates properly + * Make uev_signal_stop() idempotent + Fixes: + * Let uev_timer_stop() call close() on the timerfd directly, + do not call uev_timer_set() since that may cause + lockups or hangs +------------------------------------------------------------------- Old: ---- libuev-2.1.2.tar.gz New: ---- libuev-2.1.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libuev.spec ++++++ --- /var/tmp/diff_new_pack.0AlN6V/_old 2018-09-11 17:15:32.047572894 +0200 +++ /var/tmp/diff_new_pack.0AlN6V/_new 2018-09-11 17:15:32.051572887 +0200 @@ -19,7 +19,7 @@ %define sover 2 Name: libuev -Version: 2.1.2 +Version: 2.1.3 Release: 0 Summary: Event loop library License: MIT ++++++ libuev-2.1.2.tar.gz -> libuev-2.1.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libuev-2.1.2/API.md new/libuev-2.1.3/API.md --- old/libuev-2.1.2/API.md 2018-02-27 00:08:54.000000000 +0100 +++ new/libuev-2.1.3/API.md 2018-09-06 22:03:16.000000000 +0200 @@ -312,7 +312,7 @@ uev_t watcher; uev_ctx_t ctx; - fd = open("/dev/input/js1", O_RDONLY, O_NONBLOCK); + fd = open("/dev/input/js0", O_RDONLY, O_NONBLOCK); if (fd < 0) errx(errno, "Cannot find a joystick attached."); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libuev-2.1.2/ChangeLog.md new/libuev-2.1.3/ChangeLog.md --- old/libuev-2.1.2/ChangeLog.md 2018-02-27 00:08:54.000000000 +0100 +++ new/libuev-2.1.3/ChangeLog.md 2018-09-06 22:03:16.000000000 +0200 @@ -3,6 +3,22 @@ All notable changes to the project are documented in this file. + +[v2.1.3][] - 2018-09-06 +----------------------- + +### Changes +- Update joystick example, use first device, `/dev/input/js0` +- Minor refactor of `uev_exit()`, use `_SAFE` macros to traverse + list of watchers instead of `while()` +- New API test to verify that `uev_exit()` terminates properly +- Make `uev_signal_stop()` idempotent + +### Fixes +- Let `uev_timer_stop()` call `close()` on the timerfd directly, do not + call `uev_timer_set()` since that may cause lockups or hangs + + [v2.1.2][] - 2018-02-27 ----------------------- @@ -350,7 +366,8 @@ Lua users mailing list. -[UNRELEASED]: https://github.com/troglobit/libuev/compare/v2.1.2...HEAD +[UNRELEASED]: https://github.com/troglobit/libuev/compare/v2.1.3...HEAD +[v2.1.3]: https://github.com/troglobit/libuev/compare/v2.1.2...v2.1.3 [v2.1.2]: https://github.com/troglobit/libuev/compare/v2.1.1...v2.1.2 [v2.1.1]: https://github.com/troglobit/libuev/compare/v2.1.0...v2.1.1 [v2.1.0]: https://github.com/troglobit/libuev/compare/v2.0.0...v2.1.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libuev-2.1.2/configure.ac new/libuev-2.1.3/configure.ac --- old/libuev-2.1.2/configure.ac 2018-02-27 00:08:54.000000000 +0100 +++ new/libuev-2.1.3/configure.ac 2018-09-06 22:03:16.000000000 +0200 @@ -1,4 +1,4 @@ -AC_INIT(libuev, 2.1.2, https://github.com/troglobit/libuev/issues) +AC_INIT(libuev, 2.1.3, https://github.com/troglobit/libuev/issues) AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz]) AM_SILENT_RULES([yes]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libuev-2.1.2/debian/changelog new/libuev-2.1.3/debian/changelog --- old/libuev-2.1.2/debian/changelog 2018-02-27 00:08:54.000000000 +0100 +++ new/libuev-2.1.3/debian/changelog 2018-09-06 22:03:16.000000000 +0200 @@ -1,3 +1,14 @@ +libuev (2.1.3) unstable; urgency=medium + + * Minor bugfix release + - Updated joystick example, use first joystick, /dev/input/js0 + - Use LIST_FOREACH_SAFE() instead of while() in uev_exit() + - New API test for uev_exit() + - Don't call uev_timer_set() when stopping a timer, may cause lockups + - Return OK immediately if a signal watcher is already stopped + * Packaging fixes: libuev.so symlink goes in -dev package + -- Joachim Nilsson <[email protected]> Thu, 06 Sep 2018 22:01:24 +0200 + libuev (2.1.2) unstable; urgency=medium * Minor bugfix release diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libuev-2.1.2/debian/libuev-dev.install new/libuev-2.1.3/debian/libuev-dev.install --- old/libuev-2.1.2/debian/libuev-dev.install 2018-02-27 00:08:54.000000000 +0100 +++ new/libuev-2.1.3/debian/libuev-dev.install 2018-09-06 22:03:16.000000000 +0200 @@ -1,3 +1,4 @@ usr/include/uev/*.h -usr/lib/*/lib*.a +usr/lib/*/libuev.a +usr/lib/*/libuev.so usr/lib/*/pkgconfig/lib*.pc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libuev-2.1.2/debian/libuev.install new/libuev-2.1.3/debian/libuev.install --- old/libuev-2.1.2/debian/libuev.install 2018-02-27 00:08:54.000000000 +0100 +++ new/libuev-2.1.3/debian/libuev.install 2018-09-06 22:03:16.000000000 +0200 @@ -1 +1 @@ -usr/lib/*/lib*.so* +usr/lib/*/lib*.so.* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libuev-2.1.2/examples/joystick.c new/libuev-2.1.3/examples/joystick.c --- old/libuev-2.1.2/examples/joystick.c 2018-02-27 00:08:54.000000000 +0100 +++ new/libuev-2.1.3/examples/joystick.c 2018-09-06 22:03:16.000000000 +0200 @@ -78,7 +78,7 @@ uev_t js1_watcher; uev_ctx_t ctx; - fd = open("/dev/input/js1", O_RDONLY, O_NONBLOCK); + fd = open("/dev/input/js0", O_RDONLY, O_NONBLOCK); if (fd < 0) errx(errno, "Cannot find a joystick attached."); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libuev-2.1.2/src/Makefile.am new/libuev-2.1.3/src/Makefile.am --- old/libuev-2.1.2/src/Makefile.am 2018-02-27 00:08:54.000000000 +0100 +++ new/libuev-2.1.3/src/Makefile.am 2018-09-06 22:03:16.000000000 +0200 @@ -2,7 +2,7 @@ libuev_la_SOURCES = uev.c io.c timer.c signal.c cron.c libuev_la_CPPFLAGS = -D_GNU_SOURCE -D_TIME_BITS=64 libuev_la_CFLAGS = -W -Wall -Wextra -libuev_la_LDFLAGS = $(AM_LDFLAGS) -version-info 2:1:0 +libuev_la_LDFLAGS = $(AM_LDFLAGS) -version-info 2:2:0 noinst_PROGRAMS = bench bench_CPPFLAGS = -D_GNU_SOURCE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libuev-2.1.2/src/signal.c new/libuev-2.1.3/src/signal.c --- old/libuev-2.1.2/src/signal.c 2018-02-27 00:08:54.000000000 +0100 +++ new/libuev-2.1.3/src/signal.c 2018-09-06 22:03:16.000000000 +0200 @@ -140,6 +140,9 @@ */ int uev_signal_stop(uev_t *w) { + if (!_uev_watcher_active(w)) + return 0; + if (_uev_watcher_stop(w)) return -1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libuev-2.1.2/src/timer.c new/libuev-2.1.3/src/timer.c --- old/libuev-2.1.2/src/timer.c 2018-02-27 00:08:54.000000000 +0100 +++ new/libuev-2.1.3/src/timer.c 2018-09-06 22:03:16.000000000 +0200 @@ -170,17 +170,12 @@ */ int uev_timer_stop(uev_t *w) { - /* Check if already stopped in uev_run() after cb() or _init() */ if (!_uev_watcher_active(w)) return 0; - /* Stop kernel timer */ - uev_timer_set(w, 0, 0); - if (_uev_watcher_stop(w)) return -1; - /* Close timerfd, will have to be reopened again on reset */ close(w->fd); w->fd = -1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libuev-2.1.2/src/uev.c new/libuev-2.1.3/src/uev.c --- old/libuev-2.1.2/src/uev.c 2018-02-27 00:08:54.000000000 +0100 +++ new/libuev-2.1.3/src/uev.c 2018-09-06 22:03:16.000000000 +0200 @@ -203,14 +203,14 @@ */ int uev_exit(uev_ctx_t *ctx) { + uev_t *w, *next; + if (!ctx) { errno = EINVAL; return -1; } - while (!LIST_EMPTY(&ctx->watchers)) { - uev_t *w = LIST_FIRST(&ctx->watchers); - + LIST_FOREACH_SAFE(w, &ctx->watchers, link, next) { /* Remove from internal list */ LIST_REMOVE(w, link); @@ -233,6 +233,7 @@ } } + LIST_INIT(&ctx->watchers); ctx->running = 0; close(ctx->fd); ctx->fd = -1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libuev-2.1.2/tests/.gitignore new/libuev-2.1.3/tests/.gitignore --- old/libuev-2.1.2/tests/.gitignore 2018-02-27 00:08:54.000000000 +0100 +++ new/libuev-2.1.3/tests/.gitignore 2018-09-06 22:03:16.000000000 +0200 @@ -1,6 +1,7 @@ *.trs *.log active +api complete cronrun signal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libuev-2.1.2/tests/Makefile.am new/libuev-2.1.3/tests/Makefile.am --- old/libuev-2.1.2/tests/Makefile.am 2018-02-27 00:08:54.000000000 +0100 +++ new/libuev-2.1.3/tests/Makefile.am 2018-09-06 22:03:16.000000000 +0200 @@ -3,6 +3,7 @@ TESTS = TESTS += active +TESTS += api TESTS += complete TESTS += cronrun TESTS += signal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libuev-2.1.2/tests/active.c new/libuev-2.1.3/tests/active.c --- old/libuev-2.1.2/tests/active.c 2018-02-27 00:08:54.000000000 +0100 +++ new/libuev-2.1.3/tests/active.c 2018-09-06 22:03:16.000000000 +0200 @@ -30,6 +30,9 @@ fail_unless(!uev_timer_active(&timer2)); fail_unless(!uev_cron_active(&cron2)); + /* Restart timer and see if we fail in uev_exit() */ + uev_timer_start(&timer2); + uev_exit(w->ctx); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libuev-2.1.2/tests/api.c new/libuev-2.1.3/tests/api.c --- old/libuev-2.1.2/tests/api.c 1970-01-01 01:00:00.000000000 +0100 +++ new/libuev-2.1.3/tests/api.c 2018-09-06 22:03:16.000000000 +0200 @@ -0,0 +1,34 @@ +#include "check.h" + +uev_t timer, file; +int counter = 10; + +static void cb(uev_t *w, void *UNUSED(arg), int events) +{ + if (UEV_ERROR == events) + fprintf(stderr, "timer watcher failed, ignoring ...\n"); + + if (counter--) + return; + + uev_exit(w->ctx); +} + +int main(void) +{ + uev_ctx_t ctx; + FILE *fp; + + uev_init(&ctx); + uev_timer_init(&ctx, &timer, cb, NULL, 100, 100); + + fp = fopen("/dev/one", "r"); + if (fp) + uev_io_init(&ctx, &file, cb, NULL, fileno(fp), UEV_READ); + + uev_run(&ctx, 0); + + uev_exit(&ctx); /* Should not hang event loop, troglobit/uftpd#16 */ + + return 0; +}
