[scapy] Fix psdump()/pdfdump()

Lubomir Rintel lkundrak at fedoraproject.org
Thu Oct 2 12:07:15 UTC 2014


commit 82896d8d713c5706357cd40af811caa28f547b1a
Author: Lubomir Rintel <lkundrak at v3.sk>
Date:   Thu Oct 2 14:05:44 2014 +0200

    Fix psdump()/pdfdump()
    
    Fixing https://bugzilla.redhat.com/show_bug.cgi?id=1144784 with
    provenpackager hat on.

 scapy-2.2.0-subprocess-import.patch |   18 ++++++++++++++++++
 scapy-2.2.0-xdg-open.patch          |   24 ++++++++++++++++++++++++
 scapy.spec                          |   11 ++++++++++-
 3 files changed, 52 insertions(+), 1 deletions(-)
---
diff --git a/scapy-2.2.0-subprocess-import.patch b/scapy-2.2.0-subprocess-import.patch
new file mode 100644
index 0000000..e3a82b1
--- /dev/null
+++ b/scapy-2.2.0-subprocess-import.patch
@@ -0,0 +1,18 @@
+# HG changeset patch
+# User Jean-Michel <jean-michel.picod at cassidian.com>
+# Date 1400096697 -7200
+# Node ID 3bd59a1a75ff4a96e3f549840d27fe707d9f7b8c
+# Parent  6dd464d5ac302325e9e06f9ee2cf1d8e81637554
+Adding missing import for psdump() and pdfdump() methods
+
+diff --git a/scapy/packet.py b/scapy/packet.py
+--- a/scapy/packet.py
++++ b/scapy/packet.py
+@@ -15,6 +15,7 @@
+ from volatile import VolatileValue
+ from utils import import_hexcap,tex_escape,colgen,get_temp_file
+ from error import Scapy_Exception,log_runtime
++import subprocess
+ 
+ try:
+     import pyx
diff --git a/scapy-2.2.0-xdg-open.patch b/scapy-2.2.0-xdg-open.patch
new file mode 100644
index 0000000..8edfde2
--- /dev/null
+++ b/scapy-2.2.0-xdg-open.patch
@@ -0,0 +1,24 @@
+# HG changeset patch
+# User Lubomir Rintel <lkundrak at v3.sk>
+# Date 1411237938 -7200
+# Node ID 0ce553161b799e9dc91f63de73dfdb0f50360056
+# Parent  ac04713bb61839a3476b72118e3d1c3ce5c81e86
+Do not default to acroread and gv
+
+They are not very likely to be present nowadays. Default to user's preferred
+application instead.
+
+diff --git a/scapy/config.py b/scapy/config.py
+--- a/scapy/config.py
++++ b/scapy/config.py
+@@ -56,8 +56,8 @@
+ 
+     
+ class ProgPath(ConfClass):
+-    pdfreader = "acroread"
+-    psreader = "gv"
++    pdfreader = "xdg-open"
++    psreader = "xdg-open"
+     dot = "dot"
+     display = "display"
+     tcpdump = "tcpdump"
diff --git a/scapy.spec b/scapy.spec
index 7b03d0e..eaa062b 100644
--- a/scapy.spec
+++ b/scapy.spec
@@ -2,13 +2,17 @@
 
 Name: scapy
 Version: 2.2.0
-Release: 4%{?dist}
+Release: 5%{?dist}
 Summary: Interactive packet manipulation tool and network scanner
 
 Group: Applications/Internet
 License: GPLv2
 URL: http://www.secdev.org/projects/scapy/
 Source0: http://www.secdev.org/projects/scapy/files/scapy-%{version}.tar.gz
+# http://bb.secdev.org/scapy/commits/3bd59a1a75ff4a96e3f549840d27fe707d9f7b8c/raw/
+Patch0: scapy-2.2.0-subprocess-import.patch
+# https://bitbucket.org/secdev/scapy/pull-request/80
+Patch1: scapy-2.2.0-xdg-open.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildArch: noarch
@@ -25,6 +29,8 @@ requests and replies, and much more.
 
 %prep
 %setup -q -n scapy-%{version}
+%patch0 -p1
+%patch1 -p1
 
 %build
 %{__python} setup.py build
@@ -48,6 +54,9 @@ requests and replies, and much more.
 %{python_sitelib}/scapy-*.egg-info
 
 %changelog
+* Thu Oct 02 2014 Lubomir Rintel <lkundrak at v3.sk> - 2.2.0-5
+- Fix psdump()/pdfdump()
+
 * Sun Jun 08 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.2.0-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 


More information about the scm-commits mailing list