Package init

This commit is contained in:
overweight 2019-09-30 10:53:26 -04:00
commit a4b7fd39be
5 changed files with 93 additions and 0 deletions

9
iptstate-2.1-man8.patch Normal file
View File

@ -0,0 +1,9 @@
--- iptstate-2.1/Makefile.man8 2006-10-06 07:49:11.000000000 +0200
+++ iptstate-2.1/Makefile 2006-10-06 17:43:16.000000000 +0200
@@ -68,6 +68,5 @@
uninstall:
/bin/rm -rf $(SBIN)/iptstate
- /bin/rm -rf $(MAN)/man1/iptstate.1
/bin/rm -rf $(MAN)/man8/iptstate.8

View File

@ -0,0 +1,18 @@
commit e8f591165f8ff077a183ff02147beb4129519f7d
Author: Thomas Woerner <twoerner@redhat.com>
Date: Wed Sep 28 13:08:49 2016 +0200
Drop debug output for tmpint in getopt_long while loop
diff --git a/iptstate.cc b/iptstate.cc
index b03e566..5c9ddb1 100644
--- a/iptstate.cc
+++ b/iptstate.cc
@@ -2179,7 +2179,6 @@ int main(int argc, char *argv[])
// Command Line Arguments
while ((tmpint = getopt_long(argc, argv, "Cd:D:hlmcoLfpR:r1b:s:S:tv",
long_options, &option_index)) != EOF) {
- printf("loop: %d\n", tmpint);
switch (tmpint) {
case 0:
/* Apparently this test is needed?! Seems lame! */

View File

@ -0,0 +1,27 @@
commit e78a4bc9a921f597224af07def876ba18b8733c5
Author: Thomas Woerner <twoerner@redhat.com>
Date: Tue Oct 25 12:40:45 2016 +0200
Fix segmentation fault if used with the options -1 -C
Curses is not used with the "-1" single option, but c_warn is used if
counters are not enabled in the kernel and "-C" option is given.
Fixes: RHBZ#599181
diff --git a/iptstate.cc b/iptstate.cc
index 5874605..b4b6108 100644
--- a/iptstate.cc
+++ b/iptstate.cc
@@ -2407,7 +2407,10 @@ int main(int argc, char *argv[])
prompt = "Counters requested, but not enabled in the";
prompt += " kernel!";
flags.counters = 0;
- c_warn(mainwin, prompt, flags);
+ if (flags.single)
+ cerr << prompt << endl;
+ else
+ c_warn(mainwin, prompt, flags);
}
// Sort our table

BIN
iptstate-2.2.6.tar.bz2 Normal file

Binary file not shown.

39
iptstate.spec Normal file
View File

@ -0,0 +1,39 @@
Name: iptstate
Summary: A top-like display of IP Tables state table entries
Version: 2.2.6
Release: 8
License: zlib
URL: http://www.phildev.net/iptstate/
Source: https://github.com/jaymzh/iptstate/releases/download/v%{version}/%{name}-%{version}.tar.bz2
Patch0: iptstate-2.1-man8.patch
Patch1: iptstate-2.2.6-no_debug.patch
Patch2: iptstate-2.2.6-rhbz599181.patch
Requires: iptables
BuildRequires: gcc-c++ ncurses-devel libnetfilter_conntrack-devel
%description
This package is written to display the top-like in IP Tables
%package_help
%prep
%autosetup -n %{name}-%{version} -p1
%build
%make_build CXXFLAGS="$RPM_OPT_FLAGS $RPM_LD_FLAGS"
%install
make install PREFIX=%{buildroot}%{_prefix} INSTALL="install -p"
%files
%doc LICENSE
%{_sbindir}/iptstate
%{_mandir}/man8/iptstate.*
%files help
%doc README.md
%changelog
* Wed Sep 10 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.2.6-8
- Package init