Compare commits

...
Sign in to create a new pull request.

36 commits

Author SHA1 Message Date
Hangbin Liu
14117825e6 Convert test to tmt
Resolves: rhbz#2382892

Signed-off-by: Hangbin Liu <haliu@redhat.com>
2025-07-29 17:00:36 +08:00
Fedora Release Engineering
27a66461c5 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-23 19:32:03 +00:00
Hangbin Liu
3d952b57a6 1.5.5-1
Update to 1.5.5

Signed-off-by: Hangbin Liu <haliu@redhat.com>
2025-04-30 11:32:39 +08:00
Fedora Release Engineering
e81c726cb8 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-16 16:15:23 +00:00
Fedora Release Engineering
6af13c8c8e Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-17 21:24:38 +00:00
Fedora Release Engineering
7b46e6148d Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-24 09:51:10 +00:00
Fedora Release Engineering
beb90bd4f9 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-19 17:34:25 +00:00
Hangbin Liu
e0f464424e spec: update license to SPDX format
Signed-off-by: Hangbin Liu <haliu@redhat.com>
2023-11-14 14:05:09 +08:00
Fedora Release Engineering
b350a3983c Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-19 17:54:57 +00:00
Fedora Release Engineering
c66c962c45 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 01:48:58 +00:00
Fedora Release Engineering
a61dc00337 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-21 00:57:57 +00:00
Hangbin Liu
a966910798 1.5.4-1
Update to latest upstream version

Signed-off-by: Hangbin Liu <haliu@redhat.com>
2022-05-05 14:52:59 +08:00
Hangbin Liu
dfb9c27b13 1.5.3-8
Resolves: rhbz#2045324

Signed-off-by: Hangbin Liu <haliu@redhat.com>
2022-01-29 17:55:44 +08:00
Fedora Release Engineering
efd0d56be9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-20 01:03:36 +00:00
Fedora Release Engineering
a7edd2c46b - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-21 21:08:43 +00:00
Hangbin Liu
2a09140ade Install new command dwdump
- Install new command dwdump
- Update obsoleted m4 macros
- Update Makefile license
- Update spec file
2021-07-12 16:40:41 +08:00
500ac66ab7 Revert "Orphaned for 6+ weeks"
This reverts commit 73190a619d.

Unretirement request: https://pagure.io/releng/issue/10207

Signed-off-by: Tomas Hrcka <thrcka@redhat.com>
2021-07-12 09:29:45 +02:00
Miro Hrončok
73190a619d Orphaned for 6+ weeks 2021-06-08 21:17:53 +02:00
Fedora Release Engineering
5300abb293 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 03:47:01 +00:00
Tom Stellard
b186dfd820 Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2020-12-17 04:44:20 +00:00
Jeff Law
71ffcb93de Fix off-by-one buffer overflow caught by gcc-11 2020-11-13 21:37:55 -07:00
Fedora Release Engineering
16cf611c53 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-27 15:46:18 +00:00
Neil Horman
9c938ec11e Update to latest upstream 2020-03-19 10:35:18 -04:00
Fedora Release Engineering
2d9a14f9ed - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-28 16:18:23 +00:00
Fedora Release Engineering
4e7bd904b9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-24 22:25:43 +00:00
Igor Gnatenko
eb85303fcf Rebuild for readline 8.0 2019-02-17 09:30:49 +01:00
Fedora Release Engineering
b123727587 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-01-31 17:38:11 +00:00
Igor Gnatenko
4e1ec8b2eb Remove obsolete Group tag
References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag
2019-01-28 20:23:59 +01:00
Fedora Release Engineering
2ff812875a - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-12 23:10:21 +00:00
Jason Tibbitts
93e0b24d6f Remove needless use of %defattr 2018-07-10 00:41:17 -05:00
Neil Horman
634d9703e6 Adding rpm-build to tests.yml inventory 2018-05-18 13:10:47 -04:00
Neil Horman
aca7d773c9 Add wget to test.yml inventory, trying to get CI tests to pass 2018-05-18 11:10:53 -04:00
Neil Horman
032f0c9de1 bump release 2018-05-18 10:39:01 -04:00
Neil Horman
b30dda201b Make inventory script executable 2018-05-18 10:37:02 -04:00
Neil Horman
5a973f2630 Update to latest upstream and add CI harness 2018-05-15 14:58:45 -04:00
Neil Horman
84998050e4 Updating source url for github 2018-05-08 08:47:15 -04:00
10 changed files with 169 additions and 69 deletions

1
.fmf/version Normal file
View file

@ -0,0 +1 @@
1

4
.gitignore vendored
View file

@ -2,3 +2,7 @@ dropwatch-1.0.tbz2
dropwatch-1.1-0.tbz2
dropwatch-1.2.tbz2
/dropwatch-1.4.tbz2
/dropwatch-1.5.tar.gz
/dropwatch-1.5.3.tar.gz
/dropwatch-1.5.4.tar.gz
/dropwatch-1.5.5.tar.gz

View file

@ -1,12 +0,0 @@
diff -up ./src/lookup_kas.c.orig ./src/lookup_kas.c
--- ./src/lookup_kas.c.orig 2012-05-30 18:43:23.000000000 -0400
+++ ./src/lookup_kas.c 2015-07-06 09:03:59.093744007 -0400
@@ -102,7 +102,7 @@ static int lookup_kas_proc(__u64 pc, str
* - "%pK %c %s\n" (for kernel internal symbols), or
* - "%pK %c %s\t[%s]\n" (for module-provided symbols)
*/
- if (fscanf(pf, "%llx %*s %as [ %*[^]] ]", &ppc, &name) < 0) {
+ if (fscanf(pf, "%llx %*s %ms [ %*[^]] ]", (unsigned long long *)&ppc, &name) < 0) {
perror("Error Scanning File: ");
break;
}

View file

@ -1,11 +0,0 @@
diff -up ./src/Makefile.linker ./src/Makefile
--- ./src/Makefile.linker 2012-05-30 18:35:40.000000000 -0400
+++ ./src/Makefile 2018-02-02 07:19:25.625443850 -0500
@@ -1,6 +1,6 @@
all: dropwatch
CFLAGS+=-c -g -D_GNU_SOURCE -Wall -Werror `pkg-config --cflags libnl-3.0`
-LDFLAGS=-lbfd -lreadline -lnl-3 -lnl-genl-3
+LDFLAGS+=-lbfd -lreadline -lnl-3 -lnl-genl-3
OBJFILES := main.o lookup.o\
lookup_bfd.o lookup_kas.o

View file

@ -1,54 +1,158 @@
Summary: Kernel dropped packet monitor
Name: dropwatch
Version: 1.4
Release: 22%{?dist}
Source0: https://fedorahosted.org/releases/d/r/dropwatch/dropwatch-%{version}.tbz2
URL: http://fedorahosted.org/dropwatch
License: GPLv2+
Group: Applications/System
BuildRequires: kernel-headers readline-devel
BuildRequires: binutils-devel libnl3-devel pkgconfig
Requires: libnl3, readline
Name: dropwatch
Version: 1.5.5
Release: 2%{?dist}
Summary: Kernel dropped packet monitor
Patch0: convert-a-to-m-in-scanf-line.patch
Patch1: printf-format-fix.patch
Patch2: dropwatch-linker-fix.patch
License: GPL-2.0-or-later
URL: https://github.com/nhorman/dropwatch
Source0: https://github.com/nhorman/dropwatch/archive/v%{version}/%{name}-%{version}.tar.gz
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gcc
BuildRequires: make
BuildRequires: pkgconfig
BuildRequires: libtool
BuildRequires: kernel-headers
BuildRequires: binutils-devel
BuildRequires: libnl3-devel
BuildRequires: libpcap-devel
BuildRequires: readline-devel
Requires: libnl3
Requires: readline
%description
dropwatch is an utility to interface to the kernel to monitor for dropped
network packets.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%autosetup -p1
%build
cd src
export CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS"
make
./autogen.sh
%configure
%make_build
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_bindir}
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
install -m0755 src/dropwatch $RPM_BUILD_ROOT%{_bindir}
install -m0644 doc/dropwatch.1 $RPM_BUILD_ROOT%{_mandir}/man1
%{make_install}
%files
%defattr(-,root,root,-)
%{_bindir}/*
%{_mandir}/man1/*
%doc README
%doc COPYING
%{_bindir}/dropwatch
%{_bindir}/dwdump
%{_mandir}/man1/dropwatch.1*
%{_mandir}/man1/dwdump.1*
%doc README.md
%license COPYING
%changelog
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Wed Apr 30 2025 Hangbin Liu <haliu@redhat.com> - 1.5.5-1
- Update to version 1.5.5
- kas is the default symbol lookup method now
- Fix building without libtool installed
- Misc fixes for kas lookup logic
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.4-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.4-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.4-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.4-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Tue Nov 14 2023 Hangbin Liu <haliu@redhat.com> - 1.5.4-5
- Update License to SPDX format
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Thu May 5 2022 Hangbin Liu <haliu@redhat.com> - 1.5.4-1
- 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
* Sat Jan 29 2022 Hangbin Liu <haliu@redhat.com> - 1.5.3-8
- Fix compilation error with gcc 12
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.3-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.3-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Mon Jul 12 2021 Hangbin Liu <haliu@redhat.com> - 1.5.3-5
- Update spec file
- Update Makefile license
- Update obsoleted m4 macros
- Install new command dwdump
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Fri Nov 13 2020 Jeff Law <law@redhat.com> - 1.5.3-3
- Fix off-by-one buffer overflow caught by gcc-11
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Thu Mar 19 2020 Neil Horman <nhorman@redhat.com> - 1.5.3-1
- Update to latest upstream
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.5-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.5-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sun Feb 17 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.5-7
- Rebuild for readline 8.0
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.5-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.5-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Fri May 18 2018 Neil Horman <nhorman@redhat.com> - 1.5-4
- add rpm-build to test.yml inventory
* Fri May 18 2018 Neil Horman <nhorman@redhat.com> - 1.5-3
- add wget to test.yml inventory
* Fri May 18 2018 Neil Horman <nhorman@redhat.com> - 1.5-2
- Make inventory script executable
* Tue May 15 2018 Neil Horman <nhorman@redhat.com> - 1.5-1
- Update to latest upstream and add CI harness
* Tue May 08 2018 Neil Horman <nhorman@redhat.com> - 1.4-23
- Updated specfile url and source location for github
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Fri Feb 1 2018 Neil Horman <nhorman@redhat.com> - 1.4-21
* Thu Feb 01 2018 Neil Horman <nhorman@redhat.com> - 1.4-21
- Fix linker flag recognition (bz 1541058)
* Thu Feb 1 2018 Florian Weimer <fweimer@redhat.com> - 1.4-20

9
plans.fmf Normal file
View file

@ -0,0 +1,9 @@
summary: Run dropwatch selftest
discover:
how: fmf
prepare:
how: install
# install psmisc for killall
package: [dropwatch, psmisc]
execute:
how: tmt

View file

@ -1,12 +0,0 @@
diff -up ./src/main.c.fixup ./src/main.c
--- ./src/main.c.fixup 2017-01-13 07:26:06.255896365 -0500
+++ ./src/main.c 2017-01-13 07:26:34.349677272 -0500
@@ -333,7 +333,7 @@ void handle_dm_alert_msg(struct netlink_
printf ("%d drops at location %p\n", alert->points[i].count, location);
else
printf ("%d drops at %s+%llx (%p)\n",
- alert->points[i].count, res.symbol, res.offset, location);
+ alert->points[i].count, res.symbol, (long long unsigned)res.offset, location);
acount++;
if (alimit && (acount == alimit)) {
printf("Alert limit reached, deactivating!\n");

View file

@ -1 +1 @@
5145753b3e9255bd9b190251ba4d3bbf dropwatch-1.4.tbz2
SHA512 (dropwatch-1.5.5.tar.gz) = b85de34d9b7c1f8232720dd8d4d843cb251ef96d2d9bd592e001d889bd55c2c6821cb8fb3af061bd8e5e2488f9f3aef4c45d1a0c41de3e626bc7c3794c1a4405

2
tests/main.fmf Normal file
View file

@ -0,0 +1,2 @@
summary: Smoke test
test: ./run_tests.sh

15
tests/run_tests.sh Executable file
View file

@ -0,0 +1,15 @@
#!/bin/bash
abort_dropwatch() {
sleep 5
killall -SIGINT dropwatch
}
abort_dropwatch &
echo -e "set alertlimit 1\nstart\nstop\nexit" | dropwatch -l kas &> "$TMT_TEST_DATA"/dropwatch.log
# shellcheck disable=SC2181
[ $? -eq 0 ] && exit 0
# If the platform doesn't support NET_DM, skip this test
# Usually we got this issue in container as no privilege permission
grep -q NET_DM "$TMT_TEST_DATA"/dropwatch.log && exit 0 || exit 1