diff --git a/binwalk-2.0.0-fix-binvis-python3.patch b/binwalk-2.0.0-fix-binvis-python3.patch new file mode 100644 index 0000000..90b4be6 --- /dev/null +++ b/binwalk-2.0.0-fix-binvis-python3.patch @@ -0,0 +1,15 @@ +This is part of upstream commit bfd3f88652f4c0eb055776238c1083e4e0916510 + +diff --git a/src/binwalk/modules/binvis.py b/src/binwalk/modules/binvis.py +index 4835537..a542cff 100644 +--- a/src/binwalk/modules/binvis.py ++++ b/src/binwalk/modules/binvis.py +@@ -98,7 +98,7 @@ def _generate_plot_points(self, data_points): + + # If the number of data points exceeds the maximum number of allowed data points, use a + # weighting system to eliminate data points that occur less freqently. +- if sum(data_points.itervalues()) > self.max_points: ++ if sum(data_points.values()) > self.max_points: + + # First, generate a set of weight values 1 - 10 + for i in range(1, 11): diff --git a/binwalk.spec b/binwalk.spec index ed6dd09..dcd5787 100644 --- a/binwalk.spec +++ b/binwalk.spec @@ -1,15 +1,17 @@ Name: binwalk Version: 2.0.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Firmware analysis tool License: MIT URL: http://www.binwalk.org/ Source0: https://github.com/devttys0/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz Patch0: binwalk-2.0.0-unbundle-miniz.patch Patch1: binwalk-2.0.0-use-system-miniz.patch +Patch2: binwalk-2.0.0-fix-binvis-python3.patch BuildRequires: python3-devel BuildRequires: miniz-devel Requires: file-libs +Suggests: python3-pyqtgraph %description Binwalk is a tool for searching a given binary image for embedded files and @@ -18,9 +20,7 @@ embedded inside of firmware images. Binwalk uses the python-magic library, so it is compatible with magic signatures created for the Unix file utility. %prep -%setup -q -%patch0 -p1 -b .unbundle-miniz -%patch1 -p1 -b .use-system-miniz +%autosetup -p1 %build %configure --disable-bundles @@ -33,12 +33,17 @@ chmod -c +x src/build/lib/binwalk/libs/*.so %{__python3} setup.py install --install-lib=%{python3_sitearch} --prefix=%{_prefix} --root=%{buildroot} %files -%doc API.md INSTALL.md LICENSE README.md +%doc API.md INSTALL.md README.md +%license LICENSE %{_bindir}/%{name} %{python3_sitearch}/%{name}/ %{python3_sitearch}/%{name}-%{version}*.egg-info %changelog +* Mon Aug 24 2015 Scott Talbert - 2.0.0-5 +- Cherry-pick patch from upstream for python3 fix +- Add weak dependency on python3-pyqtgraph (#1248735) + * Thu Jul 30 2015 Scott Talbert - 2.0.0-4 - Switch to python3