From fbfd479585ec95dadb1660c429892a71503af05aec10d84c5e9df2f527c85376 Mon Sep 17 00:00:00 2001
From: Denisart Benjamin
Date: Sat, 15 Aug 2015 11:34:27 +0000
Subject: [PATCH] Accepting request 323216 from security:forensics
Resubmit of v1.2.10+139 upgrade. Maintains SLE11 support.
OBS-URL: https://build.opensuse.org/request/show/323216
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pefile?expand=0&rev=4
---
force_version.patch | 18 ++++++++++++++++++
pefile-1.2.10-121.tar.gz | 3 ---
pefile-1.2.10-139.tar.gz | 3 +++
python-pefile.changes | 23 ++++++++++++++++++++++-
python-pefile.spec | 21 +++++++++++++--------
5 files changed, 56 insertions(+), 12 deletions(-)
create mode 100644 force_version.patch
delete mode 100644 pefile-1.2.10-121.tar.gz
create mode 100644 pefile-1.2.10-139.tar.gz
diff --git a/force_version.patch b/force_version.patch
new file mode 100644
index 0000000..1303d57
--- /dev/null
+++ b/force_version.patch
@@ -0,0 +1,18 @@
+# upstream depends on $LastChangedRevision$ being set.
+# This is apparently done by SVN on checkout, but it is not appropriate for
+# openSUSE packaging. This patch forces it to the correct revision, but
+# will need mahual editing with every update.
+
+Index: pefile-pefile-1.2.10-139/pefile.py
+===================================================================
+--- pefile-pefile-1.2.10-139.orig/pefile.py
++++ pefile-pefile-1.2.10-139/pefile.py
+@@ -22,7 +22,7 @@ the root of the distribution archive.
+
+ __revision__ = "$LastChangedRevision$"
+ __author__ = 'Ero Carrera'
+-__version__ = '1.2.10-%d' % int( __revision__[21:-2] )
++__version__ = '1.2.10-139'
+ __contact__ = 'ero.carrera@gmail.com'
+
+
diff --git a/pefile-1.2.10-121.tar.gz b/pefile-1.2.10-121.tar.gz
deleted file mode 100644
index a5847bb..0000000
--- a/pefile-1.2.10-121.tar.gz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:ab1e3b774fba99a107722fa215399825048cb39fed50a5bd906db3e44622bd7e
-size 46393
diff --git a/pefile-1.2.10-139.tar.gz b/pefile-1.2.10-139.tar.gz
new file mode 100644
index 0000000..6e9507f
--- /dev/null
+++ b/pefile-1.2.10-139.tar.gz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3297cb72e6a51befefc3d9b27ec7690b743ee826538629ecf68f4eee64f331ab
+size 56819
diff --git a/python-pefile.changes b/python-pefile.changes
index 445412c..3ba3fac 100644
--- a/python-pefile.changes
+++ b/python-pefile.changes
@@ -1,3 +1,24 @@
+-------------------------------------------------------------------
+Thu May 14 21:30:03 UTC 2015 - Greg.Freemyer@gmail.com
+
+- upgrade to v1.2.10-139
+ * Merged path from ThreatGrid's Wesley Brown. Thanks!
+ Summary: changed memory mapping usage,
+ revamped to use bytearrays rather than list,
+ complete rewrite of the checksum generation algorithm to be much more memory efficient,
+ less susceptible to PE bomb attacks
+ * Corrected some doctrings
+ * Added WIndow 8 support
+ * Added more subsystem types
+ * Added Mandiant's ordlookup to resolve the names for some symbols
+ * Better handling of the Rich Header
+- updated license to BSD-3-Clause
+- moved UserDB.txt to /usr/share/python-pefile
+ * This is a PE file signature database.
+ * It is available to callers of python-pefile,
+ but the caller must explicitely point the USERDB variable at it.
+- Add force-version.patch because upstream depends on SCR checkout mechanism
+
-------------------------------------------------------------------
Tue Nov 20 19:25:06 UTC 2012 - saschpe@suse.de
@@ -9,6 +30,6 @@ Tue Nov 20 19:25:06 UTC 2012 - saschpe@suse.de
Fri Sep 21 20:49:38 UTC 2012 - Greg.Freemyer@gmail.com
- initial package
-- v1.2.10
+- v1.2.10-121
- call dos2unix on a couple text files that have dos line endings
diff --git a/python-pefile.spec b/python-pefile.spec
index 395925e..6916ea0 100644
--- a/python-pefile.spec
+++ b/python-pefile.spec
@@ -1,7 +1,7 @@
#
# spec file for package python-pefile
#
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -11,19 +11,21 @@
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-#
+
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
+
Name: python-pefile
-Version: 1.2.10+121
+Version: 1.2.10+139
Release: 0
-License: GPL-2.0+
Summary: A python module to work with PE (pertable executable) files
-Url: http://code.google.com/p/pefile
+License: BSD-3-Clause
Group: Development/Libraries/Python
-Source0: pefile-1.2.10-121.tar.gz
+Url: https://github.com/erocarrera/pefile
+Source0: https://github.com/erocarrera/pefile/archive/pefile-1.2.10-139.tar.gz
Source1: http://reverse-engineering-scripts.googlecode.com/files/UserDB.TXT
+Patch1: force_version.patch
BuildRequires: python-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
@@ -36,7 +38,8 @@ BuildArch: noarch
PEFILE is a python module that is often used in malware analysis. (Replace this with text from website.)
%prep
-%setup -q -n pefile-1.2.10-121
+%setup -q -n pefile-pefile-1.2.10-139
+%patch1 -p1
cp %{SOURCE1} .
sed -i "s|\r||" COPYING UserDB.TXT
@@ -45,10 +48,12 @@ python setup.py build
%install
python setup.py install --root=%{buildroot} --prefix=%{_prefix}
+install -D -m 644 UserDB.TXT %{buildroot}%{_datadir}/python-pefile/UserDB.TXT
%files
%defattr(-,root,root)
-%doc UserDB.TXT COPYING README
+%doc COPYING README
+%{_datadir}/python-pefile/
%{python_sitelib}/*
%changelog