Fix psdump()/pdfdump()

Fixing https://bugzilla.redhat.com/show_bug.cgi?id=1144784 with
provenpackager hat on.
This commit is contained in:
Lubomir Rintel 2014-10-02 14:05:44 +02:00
parent 774582990e
commit 82896d8d71
3 changed files with 52 additions and 1 deletions

View File

@ -0,0 +1,18 @@
# HG changeset patch
# User Jean-Michel <jean-michel.picod@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

View File

@ -0,0 +1,24 @@
# HG changeset patch
# User Lubomir Rintel <lkundrak@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"

View File

@ -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@v3.sk> - 2.2.0-5
- Fix psdump()/pdfdump()
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild