[gentoo-commits] repo/gentoo:master commit in: net-libs/liboping/files/, net-libs/liboping/
commit: c23d497c3fbdadf86cdc785f5806a36116101e5e Author: Thomas Deutschmann gentoo org> AuthorDate: Mon Jan 14 03:06:58 2019 + Commit: Thomas Deutschmann gentoo org> CommitDate: Mon Jan 14 03:06:58 2019 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c23d497c net-libs/liboping: remove -Werror ...and while we are here, add some upstream patches for issues reported by Gentoo users. Closes: https://bugs.gentoo.org/675344 Package-Manager: Portage-2.3.55, Repoman-2.3.12 Signed-off-by: Thomas Deutschmann gentoo.org> ...ng-1.10.0-do-not-quit-when-ping_send-fail.patch | 53 +++ .../liboping/files/liboping-1.10.0-no-werror.patch | 13 ...-report-right-error-msg-when-select-fails.patch | 33 ++ net-libs/liboping/liboping-1.10.0-r2.ebuild| 77 ++ 4 files changed, 176 insertions(+) diff --git a/net-libs/liboping/files/liboping-1.10.0-do-not-quit-when-ping_send-fail.patch b/net-libs/liboping/files/liboping-1.10.0-do-not-quit-when-ping_send-fail.patch new file mode 100644 index 000..ba0b13eeab9 --- /dev/null +++ b/net-libs/liboping/files/liboping-1.10.0-do-not-quit-when-ping_send-fail.patch @@ -0,0 +1,53 @@ +From c768cc2270d49247357aa6c527f4c8fe2f81d493 Mon Sep 17 00:00:00 2001 +From: Florian Forster +Date: Thu, 14 Sep 2017 08:35:27 +0200 +Subject: [PATCH] src/oping.c: Don't quit when ping_send() fails. + +It appears that sendto(2) sometimes returns ENOBUFS when the upstream link +is saturated, causing [n]oping to quit. + +Fixes: #28 +--- + src/oping.c | 12 +++- + 1 file changed, 3 insertions(+), 9 deletions(-) + +diff --git a/src/oping.c b/src/oping.c +index 36cdf16..c087c80 100644 +--- a/src/oping.c b/src/oping.c +@@ -2042,7 +2042,6 @@ int main (int argc, char **argv) /* {{{ */ + while (opt_count != 0) + { + int index; +- int status; + + if (gettimeofday (_begin, NULL) < 0) + { +@@ -2050,16 +2049,11 @@ int main (int argc, char **argv) /* {{{ */ + return (1); + } + +- status = ping_send (ping); +- if (status == -EINTR) +- { +- continue; +- } +- else if (status < 0) ++ if (ping_send (ping) < 0) + { + fprintf (stderr, "ping_send failed: %s\n", + ping_get_error (ping)); +- return (1); ++ continue; + } + + index = 0; +@@ -2086,7 +2080,7 @@ int main (int argc, char **argv) /* {{{ */ + time_calc (_wait, _int, _begin, _end); + + /* printf ("Sleeping for %i.%09li seconds\n", (int) ts_wait.tv_sec, ts_wait.tv_nsec); */ +- while ((status = nanosleep (_wait, _wait)) != 0) ++ while (nanosleep (_wait, _wait) != 0) + { + if (errno == EINTR) + { diff --git a/net-libs/liboping/files/liboping-1.10.0-no-werror.patch b/net-libs/liboping/files/liboping-1.10.0-no-werror.patch new file mode 100644 index 000..3682622cf10 --- /dev/null +++ b/net-libs/liboping/files/liboping-1.10.0-no-werror.patch @@ -0,0 +1,13 @@ +--- a/src/Makefile.am b/src/Makefile.am +@@ -2,10 +2,6 @@ AUTOMAKE_OPTIONS = foreign no-dependencies + + SUBDIRS = mans + +-if COMPILER_IS_GCC +-AM_CFLAGS = -Wall -Werror +-endif +- + include_HEADERS = oping.h + lib_LTLIBRARIES = liboping.la + diff --git a/net-libs/liboping/files/liboping-1.10.0-report-right-error-msg-when-select-fails.patch b/net-libs/liboping/files/liboping-1.10.0-report-right-error-msg-when-select-fails.patch new file mode 100644 index 000..ce1eea036b3 --- /dev/null +++ b/net-libs/liboping/files/liboping-1.10.0-report-right-error-msg-when-select-fails.patch @@ -0,0 +1,33 @@ +From f9115d65b561adeb6d36ded952949f065ad0a572 Mon Sep 17 00:00:00 2001 +From: Florian Forster +Date: Thu, 14 Sep 2017 08:37:23 +0200 +Subject: [PATCH] src/liboping.c: Report right error message when select() + fails. + +After a successful call to gettimeofday(), the value of errno is +unspecified. +--- + src/liboping.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/liboping.c b/src/liboping.c +index eca5c16..5253e8c 100644 +--- a/src/liboping.c b/src/liboping.c +@@ -1465,6 +1465,7 @@ int ping_send (pingobj_t *obj) + (unsigned) timeout.tv_usec); + + int status = select (max_fd + 1, _fds, _fds, NULL, ); ++ int select_errno = errno; + + if (gettimeofday (, NULL) == -1) + { +@@ -1474,7 +1475,7 @@ int ping_send (pingobj_t *obj) + + if (status == -1) + { +- ping_set_errno (obj, errno); ++ ping_set_errno (obj, select_errno); +
[gentoo-commits] repo/gentoo:master commit in: net-libs/liboping/files/, net-libs/liboping/
commit: ec0d59e42a16886e85682525260b2c1d0b6b046d Author: Thomas Deutschmann gentoo org> AuthorDate: Tue Aug 28 16:59:28 2018 + Commit: Thomas Deutschmann gentoo org> CommitDate: Tue Aug 28 16:59:43 2018 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec0d59e4 net-libs/liboping: drop old Package-Manager: Portage-2.3.48, Repoman-2.3.10 net-libs/liboping/Manifest | 1 - .../liboping-1.8.0-remove-ncurses-automagic.patch | 94 -- net-libs/liboping/liboping-1.9.0.ebuild| 74 - 3 files changed, 169 deletions(-) diff --git a/net-libs/liboping/Manifest b/net-libs/liboping/Manifest index e4c90b7dd09..03cd5bafd45 100644 --- a/net-libs/liboping/Manifest +++ b/net-libs/liboping/Manifest @@ -1,2 +1 @@ DIST liboping-1.10.0.tar.bz2 318150 BLAKE2B 2fa8719df251116c51aa93262697751df72b93368d543e5bb34668eb1bb07d7c0be143c943b32b23ee8d02e94ac2cc66f46f923ee4ab672b414ef16ce2f75acf SHA512 f1e9984cf0c1df89b29f7bc657c19a5439019db7643680744d8f353664b6a53070581f40b51e72f896c7df88799c6868257f6308e1a9d84b4d2a0666491214d8 -DIST liboping-1.9.0.tar.bz2 313884 BLAKE2B faf22b008bc60d8000b44d9fd3082eb6beafc0b1622c144b8b8b2b9fc79e8dc93380973c6c0a85726c2d4de55d9b94ed15dce7394a0b74d724cbd2554aaf25e1 SHA512 dcbadeea5154d4f4c31f806cae4ee5b8d5a8dfe243a9de4dad4b81b5b227538e1bb0c20afef121bd8ad841346da39fd5fb4710db981b89c11acc573c4f401c85 diff --git a/net-libs/liboping/files/liboping-1.8.0-remove-ncurses-automagic.patch b/net-libs/liboping/files/liboping-1.8.0-remove-ncurses-automagic.patch deleted file mode 100644 index 67e389ff139..000 --- a/net-libs/liboping/files/liboping-1.8.0-remove-ncurses-automagic.patch +++ /dev/null @@ -1,94 +0,0 @@ -configure: Make use of ncurses configurable - -https://github.com/octo/liboping/pull/15 - a/configure.ac -+++ b/configure.ac -@@ -206,27 +206,30 @@ AC_CHECK_FUNCS(nanosleep, [], - AC_MSG_ERROR(cannot find nanosleep))) - AM_CONDITIONAL(BUILD_WITH_LIBRT, test "x$nanosleep_needs_rt" = "xyes") - --with_ncurses="no" --AC_CHECK_HEADERS(ncursesw/ncurses.h ncurses.h, [with_ncurses="yes"], []) --if test "x$with_ncurses" = "xyes" --then -- have_ncursesw="no" -- have_ncurses="no" -- NCURSES_LIB="" -+AC_ARG_WITH(ncurses, AS_HELP_STRING([--with-ncurses], [Build oping CLI tool with ncurses support])) -+AS_IF([test "x$with_ncurses" != "xno"], [ -+ can_build_with_ncurses="no" -+ PKG_CHECK_MODULES([NCURSES], [ncursesw], [can_build_with_ncurses=yes], [ -+ PKG_CHECK_MODULES([NCURSES], [ncurses], [can_build_with_ncurses=yes], [ -+ AC_CHECK_LIB(ncursesw, mvwprintw, [NCURSES_LIBS="-lncursesw"; can_build_with_ncurses=yes], [ -+ AC_CHECK_LIB(ncurses, mvwprintw, [NCURSES_LIBS="-lncurses"; can_build_with_ncurses=yes]) -+ ]) -+ ]) -+ ]) - -- AC_CHECK_LIB(ncursesw, mvwprintw, [have_ncursesw="yes"], [have_ncursesw="no"]) -- AC_CHECK_LIB(ncurses, mvwprintw, [have_ncurses="yes"], [have_ncurses="no"]) -+ AS_IF([test "x$can_build_with_ncurses" = "xyes"], [ -+ AC_CHECK_HEADERS([ncursesw/curses.h ncursesw.h ncurses/curses.h ncurses.h], [can_build_with_ncurses=yes; break;], [can_build_with_ncurses=no]) -+ ]) - -- if test "x$have_ncursesw" = "xyes"; then -- NCURSES_LIB="-lncursesw" -- else if test "x$have_ncurses" = "xyes"; then -- NCURSES_LIB="-lncurses" -- else -- with_ncurses="no" -- fi; fi -- AC_SUBST(NCURSES_LIB) --fi --AM_CONDITIONAL(BUILD_WITH_LIBNCURSES, test "x$with_ncurses" = "xyes") -+ AS_IF([test "x$can_build_with_ncurses" = "xno" && test "x$with_ncurses" = "xyes"], [ -+ AC_MSG_ERROR([ncurses not found but explicit enabled]) -+ ], -+ [test "x$can_build_with_ncurses" = "xno"], [ -+ AC_MSG_WARN([Will not build oping with ncurses support -- no suiteable ncurses installation found]) -+ ]) -+]) -+ -+AM_CONDITIONAL(BUILD_WITH_LIBNCURSES, test "x$with_ncurses" != "xno" && test "x$can_build_with_ncurses" = "xyes") - - AC_FUNC_STRERROR_R - a/src/Makefile.am -+++ b/src/Makefile.am -@@ -43,8 +43,8 @@ if BUILD_WITH_LIBNCURSES - bin_PROGRAMS += noping - - noping_SOURCES = oping.c --noping_CPPFLAGS = $(AM_CPPFLAGS) -DUSE_NCURSES=1 --noping_LDADD = liboping.la -lm $(NCURSES_LIB) -+noping_CPPFLAGS = $(AM_CPPFLAGS) -DUSE_NCURSES=1 $(NCURSES_CFLAGS) -+noping_LDADD = liboping.la -lm $(NCURSES_LIBS) - if BUILD_WITH_LIBRT - noping_LDADD += -lrt - endif a/src/oping.c -+++ b/src/oping.c -@@ -82,11 +82,17 @@ - /* http://newsgroups.derkeiler.com/Archive/Rec/rec.games.roguelike.development/2010-09/msg00050.html */ - # define _X_OPEN_SOURCE_EXTENDED - --# if HAVE_NCURSESW_NCURSES_H --# include --# elif HAVE_NCURSES_H -+#if defined HAVE_NCURSESW_CURSES_H -+# include -+#elif defined HAVE_NCURSESW_H -+# include
[gentoo-commits] repo/gentoo:master commit in: net-libs/liboping/files/, net-libs/liboping/
commit: 13c93be34bcf32350b94c0093d85cbf59788122e Author: Thomas Deutschmann gentoo org> AuthorDate: Tue Aug 28 16:58:25 2018 + Commit: Thomas Deutschmann gentoo org> CommitDate: Tue Aug 28 16:59:41 2018 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13c93be3 net-libs/liboping: fix building with GCC8 Package-Manager: Portage-2.3.48, Repoman-2.3.10 RepoMan-Options: --force .../liboping/files/liboping-1.10.0-gcc8-fix.patch | 28 ++ ...ing-1.10.0.ebuild => liboping-1.10.0-r1.ebuild} | 1 + 2 files changed, 29 insertions(+) diff --git a/net-libs/liboping/files/liboping-1.10.0-gcc8-fix.patch b/net-libs/liboping/files/liboping-1.10.0-gcc8-fix.patch new file mode 100644 index 000..a7b3a3edd1c --- /dev/null +++ b/net-libs/liboping/files/liboping-1.10.0-gcc8-fix.patch @@ -0,0 +1,28 @@ +From 18ca43507b351f339ff23062541ee8d58e813a53 Mon Sep 17 00:00:00 2001 +From: Florian Forster +Date: Sun, 29 Jul 2018 14:34:19 +0200 +Subject: [PATCH] ping_host_add: Decrease buffer size to make GCC's truncation + check happy. + +Fixes: #38 +--- + src/liboping.c | 6 ++ + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/src/liboping.c b/src/liboping.c +index 5253e8c..2470988 100644 +--- a/src/liboping.c b/src/liboping.c +@@ -1636,10 +1636,8 @@ int ping_host_add (pingobj_t *obj, const char *host) + } + else + { +- char errmsg[PING_ERRMSG_LEN]; +- +- snprintf (errmsg, PING_ERRMSG_LEN, "Unknown `ai_family': %i", ai_ptr->ai_family); +- errmsg[PING_ERRMSG_LEN - 1] = '\0'; ++ char errmsg[64]; ++ snprintf (errmsg, sizeof(errmsg), "Unknown `ai_family': %d", ai_ptr->ai_family); + + dprintf ("%s", errmsg); + ping_set_error (obj, "getaddrinfo", errmsg); diff --git a/net-libs/liboping/liboping-1.10.0.ebuild b/net-libs/liboping/liboping-1.10.0-r1.ebuild similarity index 97% rename from net-libs/liboping/liboping-1.10.0.ebuild rename to net-libs/liboping/liboping-1.10.0-r1.ebuild index 8f0bc99aa44..50dc00c8fb4 100644 --- a/net-libs/liboping/liboping-1.10.0.ebuild +++ b/net-libs/liboping/liboping-1.10.0-r1.ebuild @@ -19,6 +19,7 @@ RDEPEND=${DEPEND} PATCHES=( "${FILESDIR}/${PN}-1.6.2-nouidmagic.patch" + "${FILESDIR}"/${P}-gcc8-fix.patch ) src_prepare() {