From 1bff822a1285c5cc264bce89ca0e6a1b1471e416 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 7 May 2019 00:20:06 -0400 Subject: [PATCH] import iptstate-2.2.6-6.el8 --- .gitignore | 1 + .iptstate.metadata | 1 + SOURCES/iptstate-2.1-man8.patch | 9 ++ SOURCES/iptstate-2.2.6-no_debug.patch | 18 +++ SOURCES/iptstate-2.2.6-rhbz599181.patch | 27 ++++ SPECS/iptstate.spec | 188 ++++++++++++++++++++++++ 6 files changed, 244 insertions(+) create mode 100644 .gitignore create mode 100644 .iptstate.metadata create mode 100644 SOURCES/iptstate-2.1-man8.patch create mode 100644 SOURCES/iptstate-2.2.6-no_debug.patch create mode 100644 SOURCES/iptstate-2.2.6-rhbz599181.patch create mode 100644 SPECS/iptstate.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e045666 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/iptstate-2.2.6.tar.bz2 diff --git a/.iptstate.metadata b/.iptstate.metadata new file mode 100644 index 0000000..5c71c5b --- /dev/null +++ b/.iptstate.metadata @@ -0,0 +1 @@ +0eb3c33c0b36b36b701a82a1a4c4b2f47931b491 SOURCES/iptstate-2.2.6.tar.bz2 diff --git a/SOURCES/iptstate-2.1-man8.patch b/SOURCES/iptstate-2.1-man8.patch new file mode 100644 index 0000000..3fb9661 --- /dev/null +++ b/SOURCES/iptstate-2.1-man8.patch @@ -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 + diff --git a/SOURCES/iptstate-2.2.6-no_debug.patch b/SOURCES/iptstate-2.2.6-no_debug.patch new file mode 100644 index 0000000..24ad628 --- /dev/null +++ b/SOURCES/iptstate-2.2.6-no_debug.patch @@ -0,0 +1,18 @@ +commit e8f591165f8ff077a183ff02147beb4129519f7d +Author: Thomas Woerner +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! */ diff --git a/SOURCES/iptstate-2.2.6-rhbz599181.patch b/SOURCES/iptstate-2.2.6-rhbz599181.patch new file mode 100644 index 0000000..b756179 --- /dev/null +++ b/SOURCES/iptstate-2.2.6-rhbz599181.patch @@ -0,0 +1,27 @@ +commit e78a4bc9a921f597224af07def876ba18b8733c5 +Author: Thomas Woerner +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 diff --git a/SPECS/iptstate.spec b/SPECS/iptstate.spec new file mode 100644 index 0000000..e15cc8f --- /dev/null +++ b/SPECS/iptstate.spec @@ -0,0 +1,188 @@ +Name: iptstate +Summary: A top-like display of IP Tables state table entries +Version: 2.2.6 +Release: 6%{?dist} +Source: https://github.com/jaymzh/iptstate/releases/download/v%{version}/iptstate-%{version}.tar.bz2 +Patch0: iptstate-2.1-man8.patch +Patch1: iptstate-2.2.6-no_debug.patch +Patch2: iptstate-2.2.6-rhbz599181.patch +Group: System Environment/Base +URL: http://www.phildev.net/iptstate/ +License: zlib +Requires: iptables +BuildRequires: ncurses-devel +BuildRequires: libnetfilter_conntrack-devel + +%description +IP Tables State (iptstate) was originally written to implement +the "state top" feature of IP Filter in IP Tables. "State top" +displays the states held by your stateful firewall in a top-like +manner. + +Since IP Tables doesn't have a built in way to easily display +this information even once, an option was added to just have it +display the state table once. + + Features include: + - Top-like realtime state table information + - Sorting by any field + - Reversible sorting + - Single display of state table + - Customizable refresh rate + - Display filtering + - Color-coding + - Open Source + - much more... + +%prep +%setup -q +%patch0 -p1 -b .man8 +%patch1 -p1 -b .no_debug +%patch2 -p1 -b .rhbz599181 + +%build +make %{?_smp_mflags} CXXFLAGS="$RPM_OPT_FLAGS $RPM_LD_FLAGS" + +%install +rm -rf %{buildroot} +make install PREFIX=%{buildroot}%{_prefix} INSTALL="install -p" + +%files +%defattr(-,root,root,0755) +%doc LICENSE README.md +%{_sbindir}/iptstate +%{_mandir}/man8/iptstate.* + +%changelog +* Fri Feb 23 2018 Florian Weimer - 2.2.6-6 +- Use LDFLAGS from redhat-rpm-config + +* Wed Feb 07 2018 Fedora Release Engineering - 2.2.6-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Aug 02 2017 Fedora Release Engineering - 2.2.6-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 2.2.6-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 2.2.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Tue Oct 25 2016 Thomas Woerner 2.2.6-1 +- New upstream version 2.2.6 + - Located at github + - Fixes (RHBZ#1294913 and RHBZ#1375395) +- Additional upstream patch (no_debug) to drop some debugging remains +- Additional proposed patch to fix segmentation fault with -1 -C (RHBZ#599181) + +* Thu Feb 04 2016 Fedora Release Engineering - 2.2.5-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jun 17 2015 Fedora Release Engineering - 2.2.5-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat May 02 2015 Kalev Lember - 2.2.5-6 +- Rebuilt for GCC 5 C++11 ABI change + +* Sat Aug 16 2014 Fedora Release Engineering - 2.2.5-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 2.2.5-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sat Aug 03 2013 Fedora Release Engineering - 2.2.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Feb 14 2013 Fedora Release Engineering - 2.2.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Mon Oct 8 2012 Thomas Woerner 2.2.5-1 +- new upstream version 2.2.5 with IPv6 and ICMP6 support + +* Thu Jul 19 2012 Fedora Release Engineering - 2.2.2-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Tue Feb 28 2012 Fedora Release Engineering - 2.2.2-7 +- Rebuilt for c++ ABI breakage + +* Fri Jan 13 2012 Fedora Release Engineering - 2.2.2-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Feb 09 2011 Fedora Release Engineering - 2.2.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Wed May 5 2010 Thomas Woerner 2.2.2-4 +- release bump + +* Wed Nov 11 2009 Paul P. Komkoff Jr - 2.2.2-3 +- messed up the rebuild. + +* Tue Nov 10 2009 Paul P. Komkoff Jr - 2.2.2-2 +- rebuild for libnetfilter_conntrack-0.0.100 + +* Tue Nov 10 2009 Thomas Woerner 2.2.2-1 +- new version 2.2.2 +- removed upstream strerror patch +- fixed package description (rhbz#140516) + +* Fri Jul 24 2009 Fedora Release Engineering - 2.2.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Feb 25 2009 Fedora Release Engineering - 2.2.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Mon Jan 19 2009 Thomas Woerner 2.2.1-4 +- merge review (rhbz#225908) + +* Mon Feb 25 2008 Thomas Woerner 2.2.1-3 +- fixed compile problem because of strerror undefined in scope + Fixes (rhbz#434482) +- fixed description (rhbz#140516) + +* Wed Feb 20 2008 Fedora Release Engineering - 2.2.1-2 +- Autorebuild for GCC 4.3 + +* Thu Aug 23 2007 Thomas Woerner 2.2.1-1 +- added dist tag + +* Tue Aug 21 2007 Thomas Woerner 2.2.1-1 +- new version 2.2.1 +- spec file fixes + +* Wed Oct 25 2006 Thomas Woerner 2.1-1 +- new version 2.1 + +* Wed Jul 12 2006 Jesse Keating - 1.4-1.1.2.2 +- rebuild + +* Fri Feb 10 2006 Jesse Keating - 1.4-1.1.2.1 +- bump again for double-long bug on ppc(64) + +* Tue Feb 07 2006 Jesse Keating - 1.4-1.1.2 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Fri Dec 09 2005 Jesse Keating +- rebuilt + +* Mon Apr 18 2005 Thomas Woerner 1.4-1.1 +- fixed man page: install as man8 instead of man1, fixed reference for + iptables(8) + +* Sun Apr 17 2005 Warren Togami 1.4-1 +- 1.4 + +* Wed Feb 9 2005 Thomas Woerner 1.3-5 +- rebuild + +* Tue Jun 15 2004 Elliot Lee +- rebuilt + +* Fri Feb 13 2004 Elliot Lee +- rebuilt + +* Mon Feb 2 2004 Thomas Woerner 1.3-2 +- added BuildRequires for ncurses-devel + +* Mon Jan 26 2004 Thomas Woerner 1.3-1 +- initial package