diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/.gitignore b/.gitignore index 371c672..e8a6050 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/dropwatch-Fix-license-specifiers.patch b/dropwatch-Fix-license-specifiers.patch deleted file mode 100644 index d2e23d5..0000000 --- a/dropwatch-Fix-license-specifiers.patch +++ /dev/null @@ -1,91 +0,0 @@ -From ab2965faeeb63fb22b938cc4c80a417b3bf7716b Mon Sep 17 00:00:00 2001 -From: Neil Horman -Date: Wed, 7 Jul 2021 08:36:48 -0400 -Subject: [PATCH] Fix license specifiers - -It was noted that there was an LGPL license in a makefile, which is -rather non-sensical in my mind, and clearly erroneous. So lets fix up -the other build files to match the spdx header in the source code - -Signed-off-by: Neil Horman ---- - Makefile.am | 19 +------------------ - autogen.sh | 2 ++ - configure.ac | 2 ++ - doc/Makefile.am | 1 + - src/Makefile.am | 3 ++- - 5 files changed, 8 insertions(+), 19 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index fb2cfd6..dba20d4 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -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 --# -+# SPDX-License-Identifier: GPL-2.0-or-later - - AUTOMAKE_OPTIONS = no-dependencies - ACLOCAL_AMFLAGS = -I m4 -diff --git a/autogen.sh b/autogen.sh -index b792e8b..35a8644 100755 ---- a/autogen.sh -+++ b/autogen.sh -@@ -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 --git a/configure.ac b/configure.ac -index 3671f27..3b51fb2 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1,3 +1,5 @@ -+# SPDX-License-Identifier: GPL-2.0-or-later -+ - AC_INIT(dropwatch,1.5.3) - AC_PREREQ(2.12)dnl - AC_CONFIG_HEADERS(config.h) -diff --git a/doc/Makefile.am b/doc/Makefile.am -index 3d61286..76da64e 100644 ---- a/doc/Makefile.am -+++ b/doc/Makefile.am -@@ -1,2 +1,3 @@ -+# SPDX-License-Identifier: GPL-2.0-or-later - dist_man_MANS = dropwatch.1 dwdump.1 - -diff --git a/src/Makefile.am b/src/Makefile.am -index f56a39d..1fd6c33 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -1,4 +1,5 @@ -- -+# SPDX-License-Identifier: GPL-2.0-or-later -+# - bin_PROGRAMS = dropwatch dwdump - - AM_CFLAGS = -g -Wall -Werror $(LIBNL3_CFLAGS) $(READLINE_CFLAGS) --- -2.31.1 - diff --git a/dropwatch-configure-update-obsoleted-m4-macros.patch b/dropwatch-configure-update-obsoleted-m4-macros.patch deleted file mode 100644 index c9d878f..0000000 --- a/dropwatch-configure-update-obsoleted-m4-macros.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 6259779e26c928d59b7aae66273da095fcfcb49b Mon Sep 17 00:00:00 2001 -From: Hangbin Liu -Date: Tue, 6 Jul 2021 19:11:43 +0800 -Subject: [PATCH] configure: update obsoleted m4 macros - -Replace obsoleted AM_CONFIG_HEADER[1] with AC_CONFIG_HEADERS. -Also replace deprecated AM_PROG_LIBTOOL[2] with LT_INIT. - -[1] https://www.gnu.org/software/automake/manual/html_node/Optional.html -[2] https://www.gnu.org/software/libtool/manual/html_node/LT_005fINIT.html - -Signed-off-by: Hangbin Liu ---- - configure.ac | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 2a840cc..3671f27 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1,10 +1,10 @@ - AC_INIT(dropwatch,1.5.3) - 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 --- -2.31.1 - diff --git a/dropwatch-gcc11.patch b/dropwatch-gcc11.patch deleted file mode 100644 index 6662498..0000000 --- a/dropwatch-gcc11.patch +++ /dev/null @@ -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); diff --git a/dropwatch-install-dwdump-manpage.patch b/dropwatch-install-dwdump-manpage.patch deleted file mode 100644 index 1872328..0000000 --- a/dropwatch-install-dwdump-manpage.patch +++ /dev/null @@ -1,17 +0,0 @@ -From a6a152f111766afefcdf3a3ba271cdeb3f387553 Mon Sep 17 00:00:00 2001 -From: Sebastian Wiesinger -Date: Wed, 13 Jan 2021 12:30:06 +0100 -Subject: [PATCH] Install manpage for dwdump - ---- - doc/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/doc/Makefile.am b/doc/Makefile.am -index 6ff1152..3d61286 100644 ---- a/doc/Makefile.am -+++ b/doc/Makefile.am -@@ -1,2 +1,2 @@ --dist_man_MANS = dropwatch.1 -+dist_man_MANS = dropwatch.1 dwdump.1 - diff --git a/dropwatch.spec b/dropwatch.spec index 136e5f1..568b88e 100644 --- a/dropwatch.spec +++ b/dropwatch.spec @@ -1,15 +1,11 @@ Name: dropwatch -Version: 1.5.3 -Release: 6%{?dist} +Version: 1.5.5 +Release: 2%{?dist} Summary: Kernel dropped packet monitor -License: GPLv2+ +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 -Patch0: %{name}-gcc11.patch -Patch1: %{name}-install-dwdump-manpage.patch -Patch2: %{name}-configure-update-obsoleted-m4-macros.patch -Patch3: %{name}-Fix-license-specifiers.patch BuildRequires: autoconf BuildRequires: automake @@ -50,6 +46,58 @@ network packets. %license COPYING %changelog +* Wed Jul 23 2025 Fedora Release Engineering - 1.5.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Wed Apr 30 2025 Hangbin Liu - 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 - 1.5.4-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Wed Jul 17 2024 Fedora Release Engineering - 1.5.4-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Wed Jan 24 2024 Fedora Release Engineering - 1.5.4-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 19 2024 Fedora Release Engineering - 1.5.4-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Tue Nov 14 2023 Hangbin Liu - 1.5.4-5 +- Update License to SPDX format + +* Wed Jul 19 2023 Fedora Release Engineering - 1.5.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Thu Jan 19 2023 Fedora Release Engineering - 1.5.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Thu Jul 21 2022 Fedora Release Engineering - 1.5.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Thu May 5 2022 Hangbin Liu - 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 - 1.5.3-8 +- Fix compilation error with gcc 12 + +* Thu Jan 20 2022 Fedora Release Engineering - 1.5.3-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Wed Jul 21 2021 Fedora Release Engineering - 1.5.3-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild diff --git a/plans.fmf b/plans.fmf new file mode 100644 index 0000000..20f21fd --- /dev/null +++ b/plans.fmf @@ -0,0 +1,9 @@ +summary: Run dropwatch selftest +discover: + how: fmf +prepare: + how: install + # install psmisc for killall + package: [dropwatch, psmisc] +execute: + how: tmt diff --git a/sources b/sources index 27f2b55..e954bb7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (dropwatch-1.5.3.tar.gz) = 098e464084ac3bc5509f5a523fe499ab54cca78ba53bebbcccd57a6c01260740c07e5b62b1218c6a62bf2147a74c056b3880dbbc92b3e11425efe8fe83af8878 +SHA512 (dropwatch-1.5.5.tar.gz) = b85de34d9b7c1f8232720dd8d4d843cb251ef96d2d9bd592e001d889bd55c2c6821cb8fb3af061bd8e5e2488f9f3aef4c45d1a0c41de3e626bc7c3794c1a4405 diff --git a/tests/README b/tests/README deleted file mode 100644 index 44fb438..0000000 --- a/tests/README +++ /dev/null @@ -1,2 +0,0 @@ -initial tests: -run make check, which runs any selftests in the upstream source tarball diff --git a/tests/inventory b/tests/inventory deleted file mode 100755 index 6238138..0000000 --- a/tests/inventory +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -export TEST_DOCKER_EXTRA_ARGS="--security-opt seccomp:unconfined" -exec merge-standard-inventory "$@" diff --git a/tests/main.fmf b/tests/main.fmf new file mode 100644 index 0000000..6189cf3 --- /dev/null +++ b/tests/main.fmf @@ -0,0 +1,2 @@ +summary: Smoke test +test: ./run_tests.sh diff --git a/tests/run_tests.sh b/tests/run_tests.sh new file mode 100755 index 0000000..6777d3c --- /dev/null +++ b/tests/run_tests.sh @@ -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 diff --git a/tests/selftest/Makefile b/tests/selftest/Makefile deleted file mode 100644 index 7b452de..0000000 --- a/tests/selftest/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/patch/Sanity/selftest -# Description: Executes upstream test suite -# Author: Miroslav Vadkerti -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# 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 " > $(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) diff --git a/tests/selftest/PURPOSE b/tests/selftest/PURPOSE deleted file mode 100644 index 971cc3f..0000000 --- a/tests/selftest/PURPOSE +++ /dev/null @@ -1,4 +0,0 @@ -PURPOSE of /CoreOS/dropwatch/Sanity/selftest -Description: Executes rngtest to validate integrity of dropwatch -Author: Neil Horman - diff --git a/tests/selftest/runtest.sh b/tests/selftest/runtest.sh deleted file mode 100755 index a9f6055..0000000 --- a/tests/selftest/runtest.sh +++ /dev/null @@ -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 -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# 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 diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index a4aef7b..0000000 --- a/tests/tests.yml +++ /dev/null @@ -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