[packages/tcpflow] - up to 1.6.1 - python support has been dropped upstream, remove unneeded detection

baggins baggins at pld-linux.org
Mon Sep 11 17:47:49 CEST 2023


commit 91a64d7398d046badea3a7fe9a455f65f2ae1f51
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Mon Sep 11 16:16:57 2023 +0200

    - up to 1.6.1
    - python support has been dropped upstream, remove unneeded detection

 ...ebian-package-of-libhttp-parser-instead-o.patch | 50 ----------------------
 format-security.patch                              | 11 +++++
 no-python.patch                                    | 39 +++++++++++++++++
 tcpflow.spec                                       | 18 ++++----
 4 files changed, 60 insertions(+), 58 deletions(-)
---
diff --git a/tcpflow.spec b/tcpflow.spec
index 46dcabf..0c85644 100644
--- a/tcpflow.spec
+++ b/tcpflow.spec
@@ -5,13 +5,14 @@
 Summary:	TCP Flow Recorder
 Summary(pl.UTF-8):	Program zapisujący ruch TCP
 Name:		tcpflow
-Version:	1.5.2
-Release:	2
+Version:	1.6.1
+Release:	1
 License:	GPL v3
 Group:		Applications/Networking
-Source0:	http://ftp.debian.org/debian/pool/main/t/tcpflow/%{name}_%{version}+repack1.orig.tar.gz
-# Source0-md5:	4348cdfa9e1d61a459d1f696204fbeff
-Patch0:		0001-using-the-debian-package-of-libhttp-parser-instead-o.patch
+Source0:	http://digitalcorpora.org/downloads/%{name}/%{name}-%{version}.tar.gz
+# Source0-md5:	4946a730747260cbd69e23bb0659b45b
+Patch0:		format-security.patch
+Patch1:		no-python.patch
 URL:		https://github.com/simsong/tcpflow
 BuildRequires:	autoconf
 BuildRequires:	automake
@@ -48,8 +49,9 @@ protokołu - tworząc dwa pliki z danymi na każde przechwycone
 połączenie.
 
 %prep
-%setup -q -n %{name}
+%setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 %{__aclocal} -I m4
@@ -57,7 +59,7 @@ połączenie.
 %{__autoheader}
 %{__automake}
 %configure \
-	CPPFLAGS="%{rpmcppflags} -std=c++11" \
+	--without-o3 \
 	%{!?with_cairo:--enable-cairo=false}
 %{__make}
 
@@ -72,6 +74,6 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS ChangeLog NEWS README.md TODO.txt
+%doc AUTHORS ChangeLog NEWS TODO.txt
 %attr(755,root,root) %{_bindir}/tcpflow
 %{_mandir}/man1/tcpflow.1*
diff --git a/0001-using-the-debian-package-of-libhttp-parser-instead-o.patch b/0001-using-the-debian-package-of-libhttp-parser-instead-o.patch
deleted file mode 100644
index 51b5594..0000000
--- a/0001-using-the-debian-package-of-libhttp-parser-instead-o.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From: Dima Kogan <dima at secretsauce.net>
-Date: Wed, 4 Dec 2013 19:37:48 -0800
-Subject: using the debian package of libhttp-parser instead of this one
-Forwarded: not needed
-
----
- src/Makefile.am   | 10 ++--------
- src/scan_http.cpp |  2 +-
- 2 files changed, 3 insertions(+), 9 deletions(-)
-
-Index: tcpflow/src/Makefile.am
-===================================================================
---- tcpflow.orig/src/Makefile.am
-+++ tcpflow/src/Makefile.am
-@@ -90,20 +90,14 @@ tcpflow_SOURCES = \
- 	scan_netviz.cpp \
- 	pcap_writer.h \
- 	iptree.h \
--	http-parser/http_parser.c \
--	http-parser/http_parser.h \
- 	mime_map.cpp \
- 	mime_map.h 
- 
-+tcpflow_LDADD = -lhttp_parser
-+
- EXTRA_DIST =\
- 	inet_ntop.c \
- 	inet_ntop.h \
--	http-parser/AUTHORS \
--	http-parser/CONTRIBUTIONS \
--	http-parser/LICENSE-MIT \
--	http-parser/Makefile \
--	http-parser/README.md \
--	http-parser/http_parser.gyp \
- 	wifipcap/README.txt \
- 	wifipcap/TimeVal.cpp \
- 	wifipcap/TimeVal.h \
-Index: tcpflow/src/scan_http.cpp
-===================================================================
---- tcpflow.orig/src/scan_http.cpp
-+++ tcpflow/src/scan_http.cpp
-@@ -11,7 +11,7 @@
- #include "tcpip.h"
- #include "tcpdemux.h"
- 
--#include "http-parser/http_parser.h"
-+#include <http_parser.h>
- 
- #include "mime_map.h"
- 
diff --git a/format-security.patch b/format-security.patch
new file mode 100644
index 0000000..e8d52a2
--- /dev/null
+++ b/format-security.patch
@@ -0,0 +1,11 @@
+--- tcpflow-1.6.1/src/datalink.cpp~	2021-02-19 01:46:09.000000000 +0100
++++ tcpflow-1.6.1/src/datalink.cpp	2023-09-11 16:08:06.627029753 +0200
+@@ -174,7 +174,7 @@
+         std::string s(std::string("warning: caught std::logic_error ")
+                       + e.what()
+                       + std::string(" in packet"));
+-        DEBUG(6)(s.c_str());
++        DEBUG(6)("%s", s.c_str());
+     }
+ }
+ 
diff --git a/no-python.patch b/no-python.patch
new file mode 100644
index 0000000..2042bbc
--- /dev/null
+++ b/no-python.patch
@@ -0,0 +1,39 @@
+--- tcpflow-1.6.1/configure.ac~	2021-02-19 01:46:09.000000000 +0100
++++ tcpflow-1.6.1/configure.ac	2023-09-11 16:15:19.177983547 +0200
+@@ -490,36 +490,6 @@
+ ]]
+ )
+ 
+-################################################################
+-# Plugin scan_python.cpp requires header "Python.h"
+-# If the header is not present => Disable the source code of the plugin
+-#
+-AC_CHECK_HEADERS(python2.7/Python.h)  # ==> #define HAVE_PYTHON2_7_PYTHON_H
+-AC_CHECK_LIB(python2.7,Py_Initialize,,[
+-  AC_MSG_WARN([
+-*** Cannot find python library.
+-*** Please install python-devel to enable scanner python.
+-  ])
+-  Fmissing_library="$Fmissing_library python-devel "      # Validated on Fedora 25
+-  Umissing_library="$Umissing_library libpython2.7-dev"   # Should be OK: https://packages.ubuntu.com/yakkety/libpython2.7-dev
+-  Mmissing_library="$Mmissing_library python27"           # Not sure: https://github.com/macports/macports-ports/blob/master/lang/python27/Portfile
+-])
+-
+-################################################################
+-# Plugin scanner_python.cpp requires header "Python.h"
+-# If the header is not present => Disable the source code of the plugin
+-#
+-AC_CHECK_HEADERS(python2.7/Python.h)  # ==> #define HAVE_PYTHON2_7_PYTHON_H
+-AC_CHECK_LIB(python2.7,Py_Initialize,,[
+-  AC_MSG_WARN([
+-*** Cannot find python library.
+-*** Please install python-devel to enable scanner python.
+-  ])
+-  Fmissing_library="$Fmissing_library python-devel "      # Validated on Fedora 25
+-  Umissing_library="$Umissing_library libpython2.7-dev"   # Should be OK: https://packages.ubuntu.com/yakkety/libpython2.7-dev
+-  Mmissing_library="$Mmissing_library python27"           # Not sure: https://github.com/macports/macports-ports/blob/master/lang/python27/Portfile
+-])
+-
+ ############## drop optimization flags if requested ################
+ 
+ # Should we disable optimization?
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/tcpflow.git/commitdiff/91a64d7398d046badea3a7fe9a455f65f2ae1f51



More information about the pld-cvs-commit mailing list