bulk_extractor: bump to 1.6.0_p20190416 (remove old patches)

This commit is contained in:
Yury Martynov 2019-04-17 15:12:53 +03:00
parent b0b03316aa
commit dcd25d47df
No known key found for this signature in database
GPG key ID: EBE62DD0CCEAE19E
8 changed files with 7 additions and 237 deletions

View file

@ -41,9 +41,9 @@ src_prepare() {
# Using -I rather than -isystem for BOOST_CPPFLAGS
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129
# Add exiv-0.27.0 support and other minor fixes...
eapply "${FILESDIR}/add_exiv2-0.27.0_support.patch"
eapply "${FILESDIR}/fix_call_of_overloaded_errors.patch"
eapply "${FILESDIR}/other_minor_fixes.patch"
eapply "${FILESDIR}/add_exiv2-0.27_api_support.patch"
eapply "${FILESDIR}/${P}_fix_call_of_overloaded_errors.patch"
eapply "${FILESDIR}/${P}_other_minor_fixes.patch"
eautoreconf
eapply_user

View file

@ -1,120 +0,0 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit autotools eutils git-r3 gnome2-utils xdg-utils
DESCRIPTION="Scans a disk image for regular expressions and other content"
HOMEPAGE="https://github.com/simsong/bulk_extractor"
SRC_URI=""
EGIT_REPO_URI="https://github.com/simsong/bulk_extractor"
if [[ ${PV} != *9999 ]]; then
#EGIT_COMMIT="${PV}"
EGIT_COMMIT="215ed3f1c0ef2dfc0a662cfbe7448ab9cbe2f511"
KEYWORDS="~amd64 ~x86"
fi
RESTRICT="mirror"
LICENSE="GPL-2"
SLOT="0"
IUSE="aff doc +beviewer +ewf +exiv2 hashdb rar"
RDEPEND="
aff? ( app-forensics/afflib )
beviewer? ( virtual/jdk:* )
dev-libs/boost[threads]
dev-libs/expat
dev-libs/openssl:0=
dev-db/sqlite:3
dev-libs/libxml2
ewf? ( app-forensics/libewf )
exiv2? ( >=media-gfx/exiv2-0.27.0 )
sys-libs/zlib
hashdb? ( >=dev-libs/hashdb-3.1.0 )"
DEPEND="${RDEPEND}
doc? ( app-doc/doxygen )
sys-devel/flex
virtual/man
virtual/pkgconfig"
src_prepare() {
# Update to the latest commit for: src/scan_hashdb.cpp
# https://github.com/simsong/bulk_extractor/blob/8bb26e4c16f543fd6c912521147615bfa48e545e/src/scan_hashdb.cpp
use hashdb && \
eapply "${FILESDIR}/update_to_match_hashdb_source_interface_change.patch"
# Add exiv-0.27.0 support and other minor fixes...
eapply "${FILESDIR}/add_exiv2-0.27.0_support.patch"
eapply "${FILESDIR}/fix_call_of_overloaded_errors.patch"
eautoreconf
eapply_user
}
src_configure() {
econf \
--without-o3 \
$(use aff || echo "--disable-afflib") \
$(use beviewer || echo "--disable-BEViewer") \
$(use ewf || echo "--disable-libewf") \
$(use exiv2 && echo "--enable-exiv2") \
$(use hashdb || echo "--disable-hashdb") \
$(use rar || echo "--disable-rar" )
}
src_install() {
dobin src/${PN} plugins/plugin_test
doman man/*.1
dodoc AUTHORS ChangeLog NEWS README.md
if use doc ; then
pushd doc/doxygen >/dev/null || die
doxygen || die "doxygen failed"
popd >/dev/null || die
dodoc -r \
doc/doxygen/html \
doc/Diagnostics_Notes \
doc/announce \
doc/*.{pdf,txt,md} \
doc/programmer_manual/*.pdf
fi
if use beviewer; then
local bev_dir="/opt/beviewer-${PV}"
insinto "${bev_dir}"
doins java_gui/BEViewer.jar
insinto /usr/share/pixmaps
newins java_gui/icons/24/run-build-install.png ${PN}.png
make_wrapper "beviewer" \
"/usr/bin/java -Xmx1g -jar \"${bev_dir}/BEViewer.jar\""
make_desktop_entry \
"beviewer" \
"BEViewer (bulk_extractor)" \
"${PN}" "Utility"
fi
}
pkg_preinst() {
use beviewer && gnome2_icon_savelist
}
pkg_postinst() {
if use beviewer; then
xdg_desktop_database_update
gnome2_icon_cache_update
fi
}
pkg_postrm() {
if use beviewer; then
xdg_desktop_database_update
gnome2_icon_cache_update
fi
}

View file

@ -0,0 +1 @@
bulk_extractor-9999.ebuild

View file

@ -9,10 +9,11 @@ DESCRIPTION="Scans a disk image for regular expressions and other content"
HOMEPAGE="https://github.com/simsong/bulk_extractor"
SRC_URI=""
# Please check a ".gitmodules" file on upstream before bump it
EGIT_REPO_URI="https://github.com/simsong/bulk_extractor"
if [[ ${PV} != *9999 ]]; then
#EGIT_COMMIT="${PV}"
EGIT_COMMIT="215ed3f1c0ef2dfc0a662cfbe7448ab9cbe2f511"
EGIT_COMMIT="164fdf948167f8121184b5ab88dd2f9b51882123"
KEYWORDS="~amd64 ~x86"
fi
@ -41,14 +42,7 @@ DEPEND="${RDEPEND}
virtual/pkgconfig"
src_prepare() {
# Update to the latest commit for: src/scan_hashdb.cpp
# https://github.com/simsong/bulk_extractor/blob/8bb26e4c16f543fd6c912521147615bfa48e545e/src/scan_hashdb.cpp
use hashdb && \
eapply "${FILESDIR}/update_to_match_hashdb_source_interface_change.patch"
# Add exiv-0.27.0 support and other minor fixes...
eapply "${FILESDIR}/add_exiv2-0.27.0_support.patch"
eapply "${FILESDIR}/fix_call_of_overloaded_errors.patch"
eapply "${FILESDIR}/add_exiv2-0.27_api_support.patch"
eautoreconf
eapply_user

View file

@ -1,105 +0,0 @@
diff -ur a/src/scan_hashdb.cpp b/src/scan_hashdb.cpp
--- a/src/scan_hashdb.cpp 2019-03-16 18:29:36.077818000 +0300
+++ b/src/scan_hashdb.cpp 2019-03-16 14:07:05.887464616 +0300
@@ -38,12 +38,11 @@
#include <iostream>
#include <cmath>
-#include <unistd.h> // for getpid
-#include <sys/types.h> // for getpid
+#include <unistd.h> // for getpid
+#include <sys/types.h> // for getpid
// user settings
static std::string hashdb_mode="none"; // import or scan
-static uint32_t hashdb_byte_alignment=512; // import only
static uint32_t hashdb_block_size=512; // import or scan
static uint32_t hashdb_step_size=512; // import or scan
static std::string hashdb_scan_path="your_hashdb_directory"; // scan only
@@ -198,14 +197,6 @@
<< " scan - Scan for matching block hashes.";
sp.info->get_config("hashdb_mode", &hashdb_mode, ss_hashdb_mode.str());
- // hashdb_byte_alignment
- std::stringstream ss_hashdb_byte_alignment;
- ss_hashdb_byte_alignment
- << "Selects the byte alignment to use in the new import\n"
- << " database.";
- sp.info->get_config("hashdb_byte_alignment", &hashdb_byte_alignment,
- ss_hashdb_byte_alignment.str());
-
// hashdb_block_size
sp.info->get_config("hashdb_block_size", &hashdb_block_size,
"Selects the block size to hash, in bytes.");
@@ -276,13 +267,6 @@
exit(1);
}
- // hashdb_byte_alignment
- if (hashdb_byte_alignment == 0) {
- std::cerr << "Error. Value for parameter 'hashdb_byte_alignment' is invalid.\n"
- << "Cannot continue.\n";
- exit(1);
- }
-
// hashdb_block_size
if (hashdb_block_size == 0) {
std::cerr << "Error. Value for parameter 'hashdb_block_size' is invalid.\n"
@@ -297,16 +281,6 @@
exit(1);
}
- // for valid operation, scan sectors must align on byte aligned boundaries
- if (hashdb_step_size % hashdb_byte_alignment != 0) {
- std::cerr << "Error: invalid byte alignment=" << hashdb_byte_alignment
- << " for step size=" << hashdb_step_size << ".\n"
- << "Steps must fit along byte alignment boundaries.\n"
- << "Specifically, hashdb_step_size \% hashdb_byte_alignment must be zero.\n"
- << "Cannot continue.\n";
- exit(1);
- }
-
// indicate hashdb version
std::cout << "hashdb: hashdb_version=" << hashdb_version() << "\n";
@@ -318,7 +292,6 @@
// show relevant settable options
std::cout << "hashdb: hashdb_mode=" << hashdb_mode << "\n"
- << "hashdb: hashdb_byte_alignment= " << hashdb_byte_alignment << "\n"
<< "hashdb: hashdb_block_size=" << hashdb_block_size << "\n"
<< "hashdb: hashdb_step_size= " << hashdb_step_size << "\n"
<< "hashdb: hashdb_repository_name= " << hashdb_repository_name << "\n"
@@ -327,7 +300,6 @@
// open hashdb for importing
// currently, hashdb_dir is required to not exist
hashdb::settings_t settings;
- settings.byte_alignment = hashdb_byte_alignment;
settings.block_size = hashdb_block_size;
std::string error_message = hashdb::create_hashdb(hashdb_dir, settings, "");
if (error_message.size() != 0) {
@@ -472,9 +444,6 @@
const md5_t hash = hash_one_block(sbuf_to_hash);
const std::string binary_hash(reinterpret_cast<const char*>(hash.digest), 16);
- // calculate the offset from the start of the media image
- const uint64_t image_offset = sbuf_to_hash.pos0.offset;
-
// put together any block classification labels
// set flags based on specific tests on the block
// Construct an sbuf from the block and subject it to the other tests
@@ -498,8 +467,7 @@
import_manager->insert_hash(binary_hash,
0, // entropy
ss_flags.str(),
- file_binary_hash,
- image_offset);
+ file_binary_hash);
}
// insert the source name pair
@@ -581,4 +549,3 @@
}
#endif
-