summaryrefslogtreecommitdiff
path: root/app-misc/binwalk
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-misc/binwalk
reinit the tree, so we can have metadata
Diffstat (limited to 'app-misc/binwalk')
-rw-r--r--app-misc/binwalk/Manifest7
-rw-r--r--app-misc/binwalk/binwalk-2.1.1.ebuild41
-rw-r--r--app-misc/binwalk/binwalk-9999.ebuild39
-rw-r--r--app-misc/binwalk/files/0001-Added-check-for-backports.lzma-when-importing-lzma-m.patch67
-rw-r--r--app-misc/binwalk/metadata.xml23
5 files changed, 177 insertions, 0 deletions
diff --git a/app-misc/binwalk/Manifest b/app-misc/binwalk/Manifest
new file mode 100644
index 000000000000..85d64b5048aa
--- /dev/null
+++ b/app-misc/binwalk/Manifest
@@ -0,0 +1,7 @@
+AUX 0001-Added-check-for-backports.lzma-when-importing-lzma-m.patch 2295 SHA256 60d15dd80a2555380e0b6643e1bcdfab4263d5c6188b7620d324b713f84a9b5f SHA512 ad0a89521948ea381fef71c53f2a85e692ac46666fd93a18955f568fca583f5b5685a024152cd774a33df30e9b965513a57139d43db8357836e145d22710c006 WHIRLPOOL 5bd1d00d4a8c6cff6a9028c861cbafcdb4b06934171eaeb09190816cbd9f31d35c58233624fca439600c3dea6152eefbb00e05ab3c890c366eeb1916627c3f33
+DIST binwalk-2.1.1.tar.gz 263977 SHA256 1b70a5b03489d29f60fef18008a2164974234874faab48a4f47ec53d461d284a SHA512 373e276a4d6ec845952f1091f85f953d3b0d52d561d9b74a54000ebdef85d13cafc997a4f8f76f25842db8b76fdcd1e602d4d81792a3ea01c9dea6c6ed5c2168 WHIRLPOOL 3cb8faedd02c6a4859467c285efe00e73ea3e52c48ce2b55e0344853e8a5b7884f9d15eb502ab16bba7262e38dfdb0cbcfadc7d3af4015e4357d9d2d248e6113
+EBUILD binwalk-2.1.1.ebuild 1099 SHA256 0f8f77999cecaf9afa9a49d92ad3b45d86762de4c45c6c6ba999fa4378ebfd61 SHA512 afcff195011fa4c8cfb56d82b0984057c51e15919243260b6830ae093ffe11aeb6f22a69602ea61e14d6603db0c224bfa2c17b4b23affd752a3db13f50dcdfa4 WHIRLPOOL 22e19c6fa420b6517d0e19f82d90dcbb2ca3a394410ea3715f2a4bff0cb45fc7ffbdabbdf18446150ba61ec77e2dd25d411c94e74d6054bd42a801b6591b240a
+EBUILD binwalk-9999.ebuild 1010 SHA256 1b688e70225df59d0267e0fff12fd57990abbcb715ae9fd407719a37d5f825d4 SHA512 112d781d9aa9e513df88669b9552677a786e4dd1de435eaba983439699167fc2ac185e221a82627dd676ac3f3711c78e79531568447bcf5bb15eaa87b227084c WHIRLPOOL d515f0e668ee5edc4032fd8c769fbab7ceb1c0111b837bbdc629330e91502447e31c74ca8665ad816a24dd6c103617a7ce274ea90233f0d255aa0fc9bd2fe378
+MISC ChangeLog 2527 SHA256 e55fb3e896c9cd38f37baf47ae89998032a83360a8c55c81a1a64b75b30ede13 SHA512 97ecfcd9f4622279a173b58acb90efa70c4005e18c06412635fd7e445f436437701d599a452a0c0280882a094ffd48d515ae46449acc84f31203fb434819d9a4 WHIRLPOOL a5a93c63f9c8740ea98598380e687cf18b7065c0094cddd4651d5883f22cbd8420b2c0081caf5347861c46d9b03b63be692e89e7299b63a4989ea3fe988daac1
+MISC ChangeLog-2015 5465 SHA256 f363ee47e84936bf80c047360e4e81faa02937c022a33dbbdd699d1af07fa02b SHA512 0dd251e78b8652e910da14ad0b05ebe1fdc62830675bf7f9a5341d16169aaa58b3316ddd5a864bc3a379ee83991f48619c657344a349760ca89179d6f41b9b3b WHIRLPOOL 64db2ea313ccb792dbb8435d658878dea83cf88d9c9711100c490473b2fe549ba2a90567b6202c7b21779434943c9226fce86a1fe6dc0cd17f0e77664c8ffa4a
+MISC metadata.xml 1048 SHA256 15dfbab87582f53dab8252374a85bd91f0c790e9772833c400cb02585c0b7378 SHA512 21f3a889f181898140303550591b01df8aaa39ae61cd1fa14f1451742ad5ac750495afcb26c52ae3373972ad4098238959fac10bc462b18f5623ef8cf92770b4 WHIRLPOOL db0f17cbd5500336908cce9e20339676365c8b895277f7ccda017ff747520ebae5c131fd2a9c04ae3f72bffcdb6f9d23f02639c58f1b8e633055c84dad916108
diff --git a/app-misc/binwalk/binwalk-2.1.1.ebuild b/app-misc/binwalk/binwalk-2.1.1.ebuild
new file mode 100644
index 000000000000..5bd6562744d1
--- /dev/null
+++ b/app-misc/binwalk/binwalk-2.1.1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+
+inherit distutils-r1
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/devttys0/binwalk.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/devttys0/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="amd64 x86"
+fi
+
+DESCRIPTION="A tool for identifying files embedded inside firmware images"
+HOMEPAGE="https://github.com/devttys0/binwalk"
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="graph"
+
+RDEPEND="
+ $(python_gen_cond_dep 'dev-python/backports-lzma[${PYTHON_USEDEP}]' python2_7)
+ graph? ( dev-python/pyqtgraph[opengl,${PYTHON_USEDEP}] )
+"
+
+PATCHES=( "${FILESDIR}"/0001-Added-check-for-backports.lzma-when-importing-lzma-m.patch )
+
+python_install_all() {
+ local DOCS=( API.md INSTALL.md README.md )
+ distutils-r1_python_install_all
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "binwalk has many optional dependencies to automatically"
+ elog "extract/decompress data, see INSTALL.md for more details."
+ fi
+}
diff --git a/app-misc/binwalk/binwalk-9999.ebuild b/app-misc/binwalk/binwalk-9999.ebuild
new file mode 100644
index 000000000000..4b5c50dcc0bc
--- /dev/null
+++ b/app-misc/binwalk/binwalk-9999.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+
+inherit distutils-r1
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/devttys0/binwalk.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/devttys0/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="A tool for identifying files embedded inside firmware images"
+HOMEPAGE="https://github.com/devttys0/binwalk"
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="graph"
+
+RDEPEND="
+ $(python_gen_cond_dep 'dev-python/backports-lzma[${PYTHON_USEDEP}]' python2_7)
+ graph? ( dev-python/pyqtgraph[opengl,${PYTHON_USEDEP}] )
+"
+
+python_install_all() {
+ local DOCS=( API.md INSTALL.md README.md )
+ distutils-r1_python_install_all
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "binwalk has many optional dependencies to automatically"
+ elog "extract/decompress data, see INSTALL.md for more details."
+ fi
+}
diff --git a/app-misc/binwalk/files/0001-Added-check-for-backports.lzma-when-importing-lzma-m.patch b/app-misc/binwalk/files/0001-Added-check-for-backports.lzma-when-importing-lzma-m.patch
new file mode 100644
index 000000000000..708498060bc7
--- /dev/null
+++ b/app-misc/binwalk/files/0001-Added-check-for-backports.lzma-when-importing-lzma-m.patch
@@ -0,0 +1,67 @@
+From 95bce4edcc6e92c9517b80ccb1fb956f591e0738 Mon Sep 17 00:00:00 2001
+From: Craig Heffner <heffnercj@gmail.com>
+Date: Tue, 5 Jan 2016 13:28:24 -0500
+Subject: [PATCH] Added check for backports.lzma when importing lzma module
+
+---
+ src/binwalk/modules/compression.py | 5 ++++-
+ src/binwalk/plugins/lzmaextract.py | 6 +++++-
+ src/binwalk/plugins/lzmavalid.py | 5 ++++-
+ 3 files changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/src/binwalk/modules/compression.py b/src/binwalk/modules/compression.py
+index 97ca68d..e919f7e 100644
+--- a/src/binwalk/modules/compression.py
++++ b/src/binwalk/modules/compression.py
+@@ -2,11 +2,14 @@
+
+ import os
+ import zlib
+-import lzma
+ import struct
+ import binwalk.core.compat
+ import binwalk.core.common
+ from binwalk.core.module import Option, Kwarg, Module
++try:
++ import lzma
++except ImportError:
++ from backports import lzma
+
+ class LZMAHeader(object):
+ def __init__(self, **kwargs):
+diff --git a/src/binwalk/plugins/lzmaextract.py b/src/binwalk/plugins/lzmaextract.py
+index 137b4cc..93f6240 100755
+--- a/src/binwalk/plugins/lzmaextract.py
++++ b/src/binwalk/plugins/lzmaextract.py
+@@ -12,7 +12,11 @@ class LZMAExtractPlugin(binwalk.core.plugin.Plugin):
+ # lzma package in Python 2.0 decompress() does not handle multiple
+ # compressed streams, only first stream is extracted.
+ # backports.lzma package could be used to keep consistent behaviour.
+- import lzma
++ try:
++ import lzma
++ except ImportError:
++ from backports import lzma
++
+ self.decompressor = lzma.decompress
+
+ # If the extractor is enabled for the module we're currently loaded
+diff --git a/src/binwalk/plugins/lzmavalid.py b/src/binwalk/plugins/lzmavalid.py
+index a343656..62e15b9 100644
+--- a/src/binwalk/plugins/lzmavalid.py
++++ b/src/binwalk/plugins/lzmavalid.py
+@@ -17,7 +17,10 @@ class LZMAPlugin(binwalk.core.plugin.Plugin):
+
+ def init(self):
+ try:
+- import lzma
++ try:
++ import lzma
++ except ImportError:
++ from backports import lzma
+ self.decompressor = lzma.decompress
+ except ImportError as e:
+ self.decompressor = None
+--
+2.12.2
+
diff --git a/app-misc/binwalk/metadata.xml b/app-misc/binwalk/metadata.xml
new file mode 100644
index 000000000000..4dac81d24622
--- /dev/null
+++ b/app-misc/binwalk/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>radhermit@gentoo.org</email>
+ <name>Tim Harder</name>
+ </maintainer>
+ <longdescription lang="en">Binwalk is a tool for searching a given binary image for embedded files.
+ Specifically, it is designed for identifying files embedded inside of firmware
+ images. Binwalk uses the libmagic library, so it is compatible with magic
+ signatures created for the Unix file utility.
+ Binwalk also includes a custom magic signature file which contains improved
+ signatures for files that are commonly found in firmware images such as
+ compressed/archived files, firmware headers, Linux kernels, bootloaders,
+ filesystems, etc.</longdescription>
+ <upstream>
+ <remote-id type="google-code">binwalk</remote-id>
+ <remote-id type="github">devttys0/binwalk</remote-id>
+ </upstream>
+ <use>
+ <flag name="graph">Enable support for generating entropy graphs</flag>
+ </use>
+</pkgmetadata>