mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-05-08 20:43:38 +02:00
app-misc: drop binwalk (use it from the gentoo repo)
This commit is contained in:
parent
cff5563583
commit
40fcb11395
4 changed files with 0 additions and 148 deletions
|
|
@ -1 +0,0 @@
|
|||
DIST binwalk-2.2.0.tar.gz 39594514 BLAKE2B 899a919647258759f16c2e59766b0db68d1a78edf0f5c3755c2a987695199a1851deed2820e6323d82d8af85d294a6f1fcafb655e5d2257d49b673ddae49da67 SHA512 5f3ed31c0b5f9ca3057f86e82787a73b06f9f73747b51dd72130a78e4d69cf43a0207bffc495d177e97811de5bf835b3d0507f314b7a0c960eddf6d1efe0f0f9
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python2_7 python3_{5,6} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="A tool for identifying files embedded inside firmware images"
|
||||
HOMEPAGE="https://github.com/ReFirmLabs/binwalk"
|
||||
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
EGIT_REPO_URI="https://github.com/ReFirmLabs/binwalk"
|
||||
inherit git-r3
|
||||
else
|
||||
SRC_URI="https://github.com/ReFirmLabs/binwalk/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
fi
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
IUSE="graph squashfs test ubifs yaffs"
|
||||
|
||||
DOCS=( API.md INSTALL.md README.md )
|
||||
|
||||
RDEPEND="${PYTHON_DEPS}
|
||||
$(python_gen_cond_dep 'dev-python/backports-lzma[${PYTHON_USEDEP}]' python2_7)
|
||||
dev-libs/capstone[python,${PYTHON_USEDEP}]
|
||||
!!dev-libs/capstone-bindings
|
||||
graph? ( dev-python/pyqtgraph[opengl,${PYTHON_USEDEP}] )
|
||||
sys-apps/file[${PYTHON_USEDEP}]
|
||||
squashfs? (
|
||||
sys-fs/squashfs-tools:0
|
||||
sys-fs/sasquatch
|
||||
)
|
||||
ubifs? ( sys-fs/ubi_reader )
|
||||
yaffs? ( sys-fs/yaffshiv )"
|
||||
|
||||
DEPEND="test? ( dev-python/nose[coverage,${PYTHON_USEDEP}] )"
|
||||
|
||||
pkg_setup() {
|
||||
python_setup
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
distutils-r1_python_install_all
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
einfo "\nbinwalk has many optional dependencies to automatically"
|
||||
einfo "extract/decompress data, see INSTALL.md for more details.\n"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
find testing/tests/input-vectors -type f | while read x; do
|
||||
${PYTHON} testing/test_generator.py $x || die
|
||||
done
|
||||
}
|
||||
|
|
@ -1,67 +0,0 @@
|
|||
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
|
||||
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
<?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>
|
||||
<maintainer type="person">
|
||||
<email>email@linxon.ru</email>
|
||||
<name>Yury Martynov</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="github">ReFirmLabs/binwalk</remote-id>
|
||||
</upstream>
|
||||
<use>
|
||||
<flag name="graph">Enable support for generating entropy graphs</flag>
|
||||
<flag name="squashfs">Using <pkg>sys-fs/sasquatch</pkg> to extract non-standard SquashFS images</flag>
|
||||
<flag name="ubifs">Using <pkg>sys-fs/ubi_reader</pkg> to extract UBIFS file systems</flag>
|
||||
<flag name="yaffs">Using <pkg>sys-fs/yaffshiv</pkg> to extract JFFS2 file systems</flag>
|
||||
</use>
|
||||
</pkgmetadata>
|
||||
Loading…
Reference in a new issue