Compare commits
18 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
14117825e6 | ||
|
|
27a66461c5 | ||
|
|
3d952b57a6 | ||
|
|
e81c726cb8 | ||
|
|
6af13c8c8e | ||
|
|
7b46e6148d | ||
|
|
beb90bd4f9 | ||
|
|
e0f464424e | ||
|
|
b350a3983c | ||
|
|
c66c962c45 | ||
|
|
a61dc00337 | ||
|
|
a966910798 | ||
|
|
dfb9c27b13 | ||
|
|
efd0d56be9 | ||
|
|
a7edd2c46b | ||
|
|
2a09140ade | ||
| 500ac66ab7 | |||
|
|
73190a619d |
14 changed files with 121 additions and 207 deletions
1
.fmf/version
Normal file
1
.fmf/version
Normal file
|
|
@ -0,0 +1 @@
|
|||
1
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -4,3 +4,5 @@ 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
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/src/lookup_bfd.c b/src/lookup_bfd.c
|
||||
index 8fa4833..e09dc3f 100644
|
||||
--- a/src/lookup_bfd.c
|
||||
+++ b/src/lookup_bfd.c
|
||||
@@ -35,7 +35,7 @@ static int lookup_bfd_init(void)
|
||||
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/") + strlen(uts.release) + 1);
|
||||
sprintf(dbibuf,"/usr/lib/debug/lib/modules/%s", uts.release);
|
||||
if (stat(dbibuf,&sb) < 0) {
|
||||
free(dbibuf);
|
||||
116
dropwatch.spec
116
dropwatch.spec
|
|
@ -1,46 +1,112 @@
|
|||
Summary: Kernel dropped packet monitor
|
||||
Name: dropwatch
|
||||
Version: 1.5.3
|
||||
Release: 4%{?dist}
|
||||
Source0: https://github.com/nhorman/dropwatch/archive/dropwatch-%{version}.tar.gz
|
||||
Patch0: %{name}-gcc11.patch
|
||||
URL: https://github.com/nhorman/dropwatch
|
||||
License: GPLv2+
|
||||
BuildRequires: kernel-headers readline-devel
|
||||
BuildRequires: binutils-devel libnl3-devel pkgconfig
|
||||
BuildRequires: autoconf automake libtool libpcap-devel
|
||||
BuildRequires: make
|
||||
Requires: libnl3, readline
|
||||
Name: dropwatch
|
||||
Version: 1.5.5
|
||||
Release: 2%{?dist}
|
||||
Summary: Kernel dropped packet monitor
|
||||
|
||||
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
|
||||
%patch0 -p1
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
./autogen.sh
|
||||
%configure
|
||||
make %{?_smp_mflags}
|
||||
%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
|
||||
%{_bindir}/*
|
||||
%{_mandir}/man1/*
|
||||
%{_bindir}/dropwatch
|
||||
%{_bindir}/dwdump
|
||||
%{_mandir}/man1/dropwatch.1*
|
||||
%{_mandir}/man1/dwdump.1*
|
||||
%doc README.md
|
||||
%doc COPYING
|
||||
%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
|
||||
|
||||
|
|
|
|||
9
plans.fmf
Normal file
9
plans.fmf
Normal 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
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (dropwatch-1.5.3.tar.gz) = 098e464084ac3bc5509f5a523fe499ab54cca78ba53bebbcccd57a6c01260740c07e5b62b1218c6a62bf2147a74c056b3880dbbc92b3e11425efe8fe83af8878
|
||||
SHA512 (dropwatch-1.5.5.tar.gz) = b85de34d9b7c1f8232720dd8d4d843cb251ef96d2d9bd592e001d889bd55c2c6821cb8fb3af061bd8e5e2488f9f3aef4c45d1a0c41de3e626bc7c3794c1a4405
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
initial tests:
|
||||
run make check, which runs any selftests in the upstream source tarball
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/bash
|
||||
export TEST_DOCKER_EXTRA_ARGS="--security-opt seccomp:unconfined"
|
||||
exec merge-standard-inventory "$@"
|
||||
2
tests/main.fmf
Normal file
2
tests/main.fmf
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
summary: Smoke test
|
||||
test: ./run_tests.sh
|
||||
15
tests/run_tests.sh
Executable file
15
tests/run_tests.sh
Executable 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
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /CoreOS/patch/Sanity/selftest
|
||||
# Description: Executes upstream test suite
|
||||
# Author: Miroslav Vadkerti <mvadkert@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2010 Red Hat, Inc. All rights reserved.
|
||||
#
|
||||
# This copyrighted material is made available to anyone wishing
|
||||
# to use, modify, copy, or redistribute it subject to the terms
|
||||
# and conditions of the GNU General Public License version 2.
|
||||
#
|
||||
# This program 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 General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public
|
||||
# License along with this program; if not, write to the Free
|
||||
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
export TEST=/CoreOS/rng-tools/Sanity/selftest
|
||||
export TESTVERSION=1.0
|
||||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE
|
||||
|
||||
.PHONY: all install download clean
|
||||
|
||||
run: $(FILES) build
|
||||
./runtest.sh
|
||||
|
||||
build: $(BUILT_FILES)
|
||||
chmod a+x runtest.sh
|
||||
|
||||
clean:
|
||||
rm -f *~ $(BUILT_FILES)
|
||||
|
||||
|
||||
include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
$(METADATA): Makefile
|
||||
@echo "Owner: Miroslav Vadkerti <mvadkert@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: Executes upstream test suite" >> $(METADATA)
|
||||
@echo "Type: Sanity" >> $(METADATA)
|
||||
@echo "TestTime: 30m" >> $(METADATA)
|
||||
@echo "RunFor: patch" >> $(METADATA)
|
||||
@echo "Requires: patch gcc rpm-build automake libselinux-devel ed libattr-devel" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Releases: -RHEL3 -RHEL4 -RHELServer5 -RHELClient5" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
PURPOSE of /CoreOS/dropwatch/Sanity/selftest
|
||||
Description: Executes rngtest to validate integrity of dropwatch
|
||||
Author: Neil Horman <nhorman@redhat.com>
|
||||
|
||||
|
|
@ -1,74 +0,0 @@
|
|||
#!/bin/bash
|
||||
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /CoreOS/rng-tools/Sanity/selftest
|
||||
# Description: Executes the upstream test suite comming with the package
|
||||
# Author: Miroslav Vadkerti <mvadkert@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2010 Red Hat, Inc. All rights reserved.
|
||||
#
|
||||
# This copyrighted material is made available to anyone wishing
|
||||
# to use, modify, copy, or redistribute it subject to the terms
|
||||
# and conditions of the GNU General Public License version 2.
|
||||
#
|
||||
# This program 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 General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public
|
||||
# License along with this program; if not, write to the Free
|
||||
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
# Include rhts environment
|
||||
. /usr/bin/rhts-environment.sh || exit 1
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
PACKAGE="dropwatch"
|
||||
PACKAGES="dropwatch automake autoconf libtool kernel-headers readline-devel binutils-devel libnl3-devel pkgconf-pkg-config"
|
||||
UPSTREAMPKG="dropwatch-*"
|
||||
BUILDLOG=`mktemp`
|
||||
TESTLOG=`mktemp`
|
||||
TARGET=$(echo `uname -m` | egrep ppc)
|
||||
if [[ $TARGET != "" ]]; then TARGET="--target `uname -m`"; fi
|
||||
TOPDIR=`mktemp -d`
|
||||
SPEC="$TOPDIR/SPECS/$PACKAGE*.spec"
|
||||
TESTDIR="$TOPDIR/BUILD/$UPSTREAMPKG/"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
for PKG in $PACKAGES; do
|
||||
rlAssertRpm $PKG
|
||||
done
|
||||
rlPhaseEnd
|
||||
rlPhaseStartTest
|
||||
rlFetchSrcForInstalled $PACKAGE
|
||||
rlRun "rpm -ivh --define '_topdir $TOPDIR' $PACKAGE*.src.rpm" 0 "Installing $PACKAGE src rpm"
|
||||
echo "+ Building $PACKAGE (Log: $BUILDLOG)"
|
||||
echo "+ Build command: rpmbuild -bc $SPEC $TARGET"
|
||||
rlRun "rpmbuild --define '_topdir $TOPDIR' -bc $SPEC $TARGET &> $BUILDLOG"
|
||||
echo "+ Buildlog:"
|
||||
tail -n 100 $BUILDLOG
|
||||
rlRun "pushd ."
|
||||
rlRun "cd $TESTDIR"
|
||||
rlRun "make check &> $TESTLOG"
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
rlPass "Selftest Passed"
|
||||
else
|
||||
rlFail "Selftest Failed"
|
||||
fi
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -rf $PACKAGE*.src.rpm" 0 "Removing source rpm"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
---
|
||||
# This first play always runs on the local staging system
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: standard-test-beakerlib
|
||||
tags:
|
||||
- classic
|
||||
tests:
|
||||
- selftest
|
||||
required_packages:
|
||||
- autoconf
|
||||
- automake
|
||||
- libtool
|
||||
- kernel-headers
|
||||
- readline-devel
|
||||
- binutils-devel
|
||||
- libnl3-devel
|
||||
- pkgconf-pkg-config
|
||||
- libnl3-devel
|
||||
- wget
|
||||
- rpm-build
|
||||
Loading…
Add table
Add a link
Reference in a new issue