Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package dropwatch for openSUSE:Factory 
checked in at 2022-05-16 18:08:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/dropwatch (Old)
 and      /work/SRC/openSUSE:Factory/.dropwatch.new.1538 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "dropwatch"

Mon May 16 18:08:43 2022 rev:2 rq:977478 version:1.5.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/dropwatch/dropwatch.changes      2020-05-20 
18:46:45.233456416 +0200
+++ /work/SRC/openSUSE:Factory/.dropwatch.new.1538/dropwatch.changes    
2022-05-16 18:11:12.753406768 +0200
@@ -1,0 +2,17 @@
+Mon Apr 18 13:44:52 UTC 2022 - Christian Boltz <suse-b...@cboltz.de>
+
+- Update to version 1.5.4
+  * Support packet drop reason reporting when included in netlink message
+  * fix some minor compilation warnings/errors
+  * clean up some comments about deadline support
+  * convert configure.ac to use AM_PROG_LIBTOOL from outdated LT_INIT
+  * Fix missing SOL_NETLINK define in glibc < 2.24
+  * Fix licensing issues that didn't make sense
+  * ignore ENOBUFS errors on data socket
+  * adding arm64 travis ci testing
+  * man page updates
+  * move to libnl3 from libnl
+- add old-readline.diff to revert (when building for <= 15.x) an
+  upstream change that requires libreadline >= 8.0
+
+-------------------------------------------------------------------

Old:
----
  dropwatch-1.5.3.tar.gz

New:
----
  dropwatch-1.5.4.tar.gz
  old-readline.diff

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

Other differences:
------------------
++++++ dropwatch.spec ++++++
--- /var/tmp/diff_new_pack.oKXBpm/_old  2022-05-16 18:11:13.305407207 +0200
+++ /var/tmp/diff_new_pack.oKXBpm/_new  2022-05-16 18:11:13.309407210 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package dropwatch
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,13 +17,14 @@
 
 
 Name:           dropwatch
-Version:        1.5.3
+Version:        1.5.4
 Release:        0
 Summary:        Kernel dropped packet monitor
 License:        GPL-2.0-only
 Group:          Productivity/Networking/Diagnostic
 URL:            https://github.com/nhorman/dropwatch
 Source:         
https://github.com/nhorman/dropwatch/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
+Patch1:         old-readline.diff
 BuildRequires:  autoconf
 BuildRequires:  automake
 BuildRequires:  binutils-devel
@@ -39,6 +40,9 @@
 
 %prep
 %setup -q
+%if 0%{?suse_version} <= 1590
+%patch1 -p1
+%endif
 ./autogen.sh
 %configure
 

++++++ dropwatch-1.5.3.tar.gz -> dropwatch-1.5.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dropwatch-1.5.3/.travis.yml 
new/dropwatch-1.5.4/.travis.yml
--- old/dropwatch-1.5.3/.travis.yml     2020-03-19 14:19:40.000000000 +0100
+++ new/dropwatch-1.5.4/.travis.yml     2022-04-18 14:11:10.000000000 +0200
@@ -1,6 +1,9 @@
 language: c
-dist: xenial 
-
+dist: focal 
+arch:
+  - arm64
+  - amd64
+  - ppc64le
 compiler:
   - clang
   - gcc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dropwatch-1.5.3/Makefile.am 
new/dropwatch-1.5.4/Makefile.am
--- old/dropwatch-1.5.3/Makefile.am     2020-03-19 14:19:40.000000000 +0100
+++ new/dropwatch-1.5.4/Makefile.am     2022-04-18 14:11:10.000000000 +0200
@@ -1,24 +1,7 @@
 # Makefile.am --
 # Copyright 2018 Neil Horman
 # All Rights Reserved.
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-#
-# Authors:
-#   Steve Grubb <sgr...@redhat.com>
-# 
+# SPDX-License-Identifier: GPL-2.0-or-later
 
 AUTOMAKE_OPTIONS = no-dependencies
 ACLOCAL_AMFLAGS = -I m4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dropwatch-1.5.3/README.md 
new/dropwatch-1.5.4/README.md
--- old/dropwatch-1.5.3/README.md       2020-03-19 14:19:40.000000000 +0100
+++ new/dropwatch-1.5.4/README.md       2022-04-18 14:11:10.000000000 +0200
@@ -8,13 +8,13 @@
 What is Dropwatch?
 ------------------
 Dropwatch is a project I started in an effort to improve the ability for
-developers and system administrator to diagnose problems in the Linux 
Networking
+developers and system administrators to diagnose problems in the Linux 
Networking
 stack, specifically in our ability to diagnose where packets are getting
 dropped.  From my probing, I've come to the conclusion that there are four main
 shortcomings in our current environment:
 
 1) _Consolidation, or lack thereof._  Currently, if you would like to check on 
the
-status of dropped packets in the kernel, you need to check at least 3 places,
+status of dropped packets in the kernel, you need to check at least 4 places,
 and possibly more: The /proc/net/snmp file, the netstat utility, the tc 
utility,
 and ethtool.  This project aims to consolidate several of those checks into one
 tool, making it easier for a sysadmin or developer to detect lost packets
@@ -49,6 +49,6 @@
 
 Questions
 ---------
-Feel free to email me directly at nhor...@redhat.com with question, or if you
-find a bug, open a trac ticket here on the github page
+Feel free to email me directly at nhor...@tuxdriver.com with question, or if 
you
+find a bug, open an issue here on the github page
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dropwatch-1.5.3/autogen.sh 
new/dropwatch-1.5.4/autogen.sh
--- old/dropwatch-1.5.3/autogen.sh      2020-03-19 14:19:40.000000000 +0100
+++ new/dropwatch-1.5.4/autogen.sh      2022-04-18 14:11:10.000000000 +0200
@@ -1,4 +1,6 @@
 #! /bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
+
 set -x -e
 mkdir -p m4
 # --no-recursive is available only in recent autoconf versions
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dropwatch-1.5.3/configure.ac 
new/dropwatch-1.5.4/configure.ac
--- old/dropwatch-1.5.3/configure.ac    2020-03-19 14:19:40.000000000 +0100
+++ new/dropwatch-1.5.4/configure.ac    2022-04-18 14:11:10.000000000 +0200
@@ -1,10 +1,12 @@
-AC_INIT(dropwatch,1.5.3)
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+AC_INIT(dropwatch,1.5.4)
 AC_PREREQ(2.12)dnl
-AM_CONFIG_HEADER(config.h)
+AC_CONFIG_HEADERS(config.h)
 
 AC_CONFIG_MACRO_DIR([m4])
 AM_INIT_AUTOMAKE([foreign] [subdir-objects])
-AM_PROG_LIBTOOL
+LT_INIT
 AC_SUBST(LIBTOOL_DEPS)
 
 AC_PROG_CC
@@ -14,8 +16,8 @@
 AC_CHECK_FUNCS(getopt_long)
 
 PKG_CHECK_MODULES([LIBNL3], [libnl-3.0], [], [AC_MSG_ERROR([libnl-3.0 is 
required])])
-# Fallback on using -lreadline as readline.pc is only available since version 
8.0
-PKG_CHECK_MODULES([READLINE], [readline], [], [READLINE_LIBS=-lreadline])
+PKG_CHECK_MODULES([LIBNLG3], [libnl-genl-3.0], [], 
[AC_MSG_ERROR([libnl-genl-3.0 is required])])
+PKG_CHECK_MODULES([READLINE], [readline], [], [AC_MSG_ERROR([libreadline is 
required])])
 PKG_CHECK_MODULES([LIBPCAP], [libpcap], [], [
         AC_CHECK_LIB(pcap, pcap_open_live,[],
                 [AC_MSG_ERROR([libpcap is required])])])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dropwatch-1.5.3/doc/Makefile.am 
new/dropwatch-1.5.4/doc/Makefile.am
--- old/dropwatch-1.5.3/doc/Makefile.am 2020-03-19 14:19:40.000000000 +0100
+++ new/dropwatch-1.5.4/doc/Makefile.am 2022-04-18 14:11:10.000000000 +0200
@@ -1,2 +1,3 @@
-dist_man_MANS = dropwatch.1
+# SPDX-License-Identifier: GPL-2.0-or-later
+dist_man_MANS = dropwatch.1 dwdump.1
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dropwatch-1.5.3/src/Makefile.am 
new/dropwatch-1.5.4/src/Makefile.am
--- old/dropwatch-1.5.3/src/Makefile.am 2020-03-19 14:19:40.000000000 +0100
+++ new/dropwatch-1.5.4/src/Makefile.am 2022-04-18 14:11:10.000000000 +0200
@@ -1,8 +1,9 @@
-
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
 bin_PROGRAMS = dropwatch dwdump
 
-AM_CFLAGS = -g -Wall -Werror $(LIBNL3_CFLAGS) $(READLINE_CFLAGS)
-AM_LDFLAGS = $(LIBNL3_LIBS) -lnl-genl-3 $(READLINE_LIBS) -lpcap
+AM_CFLAGS = -g -Wall -Werror $(LIBNL3_CFLAGS) $(LIBNLG3_CFLAGS) 
$(READLINE_CFLAGS)
+AM_LDFLAGS = $(LIBNL3_LIBS) $(LIBNLG3_LIBS) $(READLINE_LIBS) -lpcap
 AM_CPPFLAGS = -D_GNU_SOURCE
 
 dropwatch_SOURCES = main.c lookup.c lookup_kas.c
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dropwatch-1.5.3/src/dwdump.c 
new/dropwatch-1.5.4/src/dwdump.c
--- old/dropwatch-1.5.3/src/dwdump.c    2020-03-19 14:19:40.000000000 +0100
+++ new/dropwatch-1.5.4/src/dwdump.c    2022-04-18 14:11:10.000000000 +0200
@@ -15,11 +15,14 @@
 #include <arpa/inet.h>
 #include <linux/if_arp.h>
 #include <linux/if_packet.h>
+#include <linux/netlink.h>
 #include <linux/socket.h>
 #include <netlink/genl/ctrl.h>
 #include <netlink/genl/genl.h>
 #include <netlink/socket.h>
+#include <sys/socket.h>
 #include <sys/time.h>
+#include <sys/types.h>
 
 #include "net_dropmon.h"
 
@@ -81,8 +84,8 @@
 
 static int dwdump_data_init(struct dwdump *dwdump)
 {
+       int fd, optval, family, err;
        struct nl_sock *sk;
-       int family, err;
 
        sk = nl_socket_alloc();
        if (!sk) {
@@ -118,6 +121,15 @@
                goto err_set_buffer_size;
        }
 
+       optval = 1;
+       fd = nl_socket_get_fd(sk);
+       err = setsockopt(fd, SOL_NETLINK, NETLINK_NO_ENOBUFS, &optval,
+                        sizeof(optval));
+       if (err < 0) {
+               fprintf(stderr, "Failed to set NETLINK_NO_ENOBUFS socket 
option\n");
+               goto err_setsockopt;
+       }
+
        err = nl_socket_add_memberships(sk, NET_DM_GRP_ALERT, NFNLGRP_NONE);
        if (err) {
                fprintf(stderr, "Failed to join multicast group\n");
@@ -130,6 +142,7 @@
        return 0;
 
 err_add_memberships:
+err_setsockopt:
 err_set_buffer_size:
 err_genl_ctrl_resolve:
 err_genl_connect:
@@ -611,8 +624,7 @@
                len = recv(fd, dwdump->pkt, dwdump->snaplen, 0);
                if (len < 0) {
                        switch (errno) {
-                       case EINTR: /* fall-through */
-                       case ENOBUFS:
+                       case EINTR:
                                continue;
                        default:
                                perror("recv");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dropwatch-1.5.3/src/lookup_bfd.c 
new/dropwatch-1.5.4/src/lookup_bfd.c
--- old/dropwatch-1.5.3/src/lookup_bfd.c        2020-03-19 14:19:40.000000000 
+0100
+++ new/dropwatch-1.5.4/src/lookup_bfd.c        2022-04-18 14:11:10.000000000 
+0200
@@ -35,7 +35,7 @@
        if(uname(&uts)<0)
                return-1;
 
-       dbibuf = malloc(strlen("/usr/lib/debug/lib/modules") + 
strlen(uts.release) + 1);
+       dbibuf = malloc(strlen("/usr/lib/debug/lib/modules/") + 
sizeof(uts.release));
        sprintf(dbibuf,"/usr/lib/debug/lib/modules/%s", uts.release);
        if (stat(dbibuf,&sb) < 0) {
                free(dbibuf);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dropwatch-1.5.3/src/lookup_kas.c 
new/dropwatch-1.5.4/src/lookup_kas.c
--- old/dropwatch-1.5.3/src/lookup_kas.c        2020-03-19 14:19:40.000000000 
+0100
+++ new/dropwatch-1.5.4/src/lookup_kas.c        2022-04-18 14:11:10.000000000 
+0200
@@ -91,8 +91,13 @@
                 *  - "%pK %c %s\t[%s]\n" (for module-provided symbols)
                 */
                if (fscanf(pf, "%llx %*s %ms [ %*[^]] ]", (unsigned long long 
*)&ppc, &name) < 0) {
-                       perror("Error Scanning File: ");
-                       break;
+                       if (ferror(pf)) {
+                               perror("Error Scanning File: ");
+                               break;
+                       }
+                       if (feof(pf)) {
+                               continue;
+                       }
                }
 
                uppc = (__u64)ppc;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dropwatch-1.5.3/src/main.c 
new/dropwatch-1.5.4/src/main.c
--- old/dropwatch-1.5.3/src/main.c      2020-03-19 14:19:40.000000000 +0100
+++ new/dropwatch-1.5.4/src/main.c      2022-04-18 14:11:10.000000000 +0200
@@ -267,7 +267,7 @@
 
 struct netlink_message *recv_netlink_message(int *err)
 {
-       static unsigned char *buf;
+       static struct nlmsghdr *buf;
        struct netlink_message *msg;
        struct genlmsghdr *glm;
        struct sockaddr_nl nla;
@@ -277,7 +277,7 @@
        *err = 0;
 
        do {
-               rc = nl_recv(nsd, &nla, &buf, NULL);
+               rc = nl_recv(nsd, &nla, (unsigned char **)&buf, NULL);
                if (rc < 0) {
                        switch (errno) {
                        case EINTR:
@@ -294,7 +294,7 @@
                }
        } while (rc == 0);
 
-       msg = wrap_netlink_msg((struct nlmsghdr *)buf);
+       msg = wrap_netlink_msg(buf);
 
        type = ((struct nlmsghdr *)msg->msg)->nlmsg_type;
 
@@ -539,6 +539,10 @@
                printf("original length: %u\n",
                       nla_get_u32(attrs[NET_DM_ATTR_ORIG_LEN]));
 
+       if (attrs[NET_DM_ATTR_REASON])
+               printf("drop reason: %s\n",
+                      nla_get_string(attrs[NET_DM_ATTR_REASON]));
+
        printf("\n");
 
        acount++;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dropwatch-1.5.3/src/net_dropmon.h 
new/dropwatch-1.5.4/src/net_dropmon.h
--- old/dropwatch-1.5.3/src/net_dropmon.h       2020-03-19 14:19:40.000000000 
+0100
+++ new/dropwatch-1.5.4/src/net_dropmon.h       2022-04-18 14:11:10.000000000 
+0200
@@ -6,6 +6,10 @@
 
 #include <linux/netlink.h>
 
+#ifndef SOL_NETLINK
+#define SOL_NETLINK     270
+#endif
+
 struct net_dm_drop_point {
        __u8 pc[8];
        __u32 count;
@@ -87,6 +91,7 @@
        NET_DM_ATTR_SW_DROPS,                   /* flag */
        NET_DM_ATTR_HW_DROPS,                   /* flag */
        NET_DM_ATTR_FLOW_ACTION_COOKIE,         /* binary */
+       NET_DM_ATTR_REASON,                     /* string */
 
        __NET_DM_ATTR_MAX,
        NET_DM_ATTR_MAX = __NET_DM_ATTR_MAX - 1

++++++ old-readline.diff ++++++
This patch REVERTS the commit below

commit c18f3d25a94eb72145c663797794d2697a226594
Author: Neil Horman <nhor...@gmail.com>
Date:   Mon Mar 15 08:26:30 2021 -0400

    Update configure to fail if readline isn't installed
    
    We had libreadline pkg check in configure hacked a bit.  Because
    libreadline didn't have a .pc file for years, we fell back on just
    adding the library as a linker option and letting the compile fail when
    readline.h couldn't be found.  Now that readline 8.0 has been out for 2
    years (which included the .pc file), I think we can safely test for it,
    and fail if its not found
    
    Signed-off-by: Neil Horman <nhor...@tuxdriver.com>

diff --git a/configure.ac b/configure.ac
index 278da54..2a840cc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,6 +16,6 @@ AC_CHECK_FUNCS(getopt_long)
 PKG_CHECK_MODULES([LIBNL3], [libnl-3.0], [], [AC_MSG_ERROR([libnl-3.0 is 
required])])
 PKG_CHECK_MODULES([LIBNLG3], [libnl-genl-3.0], [], 
[AC_MSG_ERROR([libnl-genl-3.0 is required])])
+PKG_CHECK_MODULES([READLINE], [readline], [], [READLINE_LIBS=-lreadline])
-PKG_CHECK_MODULES([READLINE], [readline], [], [AC_MSG_ERROR([libreadline is 
required])])
 PKG_CHECK_MODULES([LIBPCAP], [libpcap], [], [
         AC_CHECK_LIB(pcap, pcap_open_live,[],
                 [AC_MSG_ERROR([libpcap is required])])])

Reply via email to