From dcd25d47df8c6a93b7a655678d8addc1cc52c5a5 Mon Sep 17 00:00:00 2001 From: Yury Martynov Date: Wed, 17 Apr 2019 15:12:53 +0300 Subject: [PATCH] bulk_extractor: bump to 1.6.0_p20190416 (remove old patches) --- .../bulk_extractor-1.5.5-r1.ebuild | 6 +- .../bulk_extractor-1.6.0_p20181112.ebuild | 120 ------------------ .../bulk_extractor-1.6.0_p20190416.ebuild | 1 + .../bulk_extractor/bulk_extractor-9999.ebuild | 12 +- ...patch => add_exiv2-0.27_api_support.patch} | 0 ...1.5.5_fix_call_of_overloaded_errors.patch} | 0 ...k_extractor-1.5.5_other_minor_fixes.patch} | 0 ...match_hashdb_source_interface_change.patch | 105 --------------- 8 files changed, 7 insertions(+), 237 deletions(-) delete mode 100644 app-forensics/bulk_extractor/bulk_extractor-1.6.0_p20181112.ebuild create mode 120000 app-forensics/bulk_extractor/bulk_extractor-1.6.0_p20190416.ebuild rename app-forensics/bulk_extractor/files/{add_exiv2-0.27.0_support.patch => add_exiv2-0.27_api_support.patch} (100%) rename app-forensics/bulk_extractor/files/{fix_call_of_overloaded_errors.patch => bulk_extractor-1.5.5_fix_call_of_overloaded_errors.patch} (100%) rename app-forensics/bulk_extractor/files/{other_minor_fixes.patch => bulk_extractor-1.5.5_other_minor_fixes.patch} (100%) delete mode 100644 app-forensics/bulk_extractor/files/update_to_match_hashdb_source_interface_change.patch diff --git a/app-forensics/bulk_extractor/bulk_extractor-1.5.5-r1.ebuild b/app-forensics/bulk_extractor/bulk_extractor-1.5.5-r1.ebuild index def763e29..d47bcde06 100644 --- a/app-forensics/bulk_extractor/bulk_extractor-1.5.5-r1.ebuild +++ b/app-forensics/bulk_extractor/bulk_extractor-1.5.5-r1.ebuild @@ -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 diff --git a/app-forensics/bulk_extractor/bulk_extractor-1.6.0_p20181112.ebuild b/app-forensics/bulk_extractor/bulk_extractor-1.6.0_p20181112.ebuild deleted file mode 100644 index 9e6f01cf4..000000000 --- a/app-forensics/bulk_extractor/bulk_extractor-1.6.0_p20181112.ebuild +++ /dev/null @@ -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 -} diff --git a/app-forensics/bulk_extractor/bulk_extractor-1.6.0_p20190416.ebuild b/app-forensics/bulk_extractor/bulk_extractor-1.6.0_p20190416.ebuild new file mode 120000 index 000000000..8c282a4b0 --- /dev/null +++ b/app-forensics/bulk_extractor/bulk_extractor-1.6.0_p20190416.ebuild @@ -0,0 +1 @@ +bulk_extractor-9999.ebuild \ No newline at end of file diff --git a/app-forensics/bulk_extractor/bulk_extractor-9999.ebuild b/app-forensics/bulk_extractor/bulk_extractor-9999.ebuild index 9e6f01cf4..8b5e9bfa0 100644 --- a/app-forensics/bulk_extractor/bulk_extractor-9999.ebuild +++ b/app-forensics/bulk_extractor/bulk_extractor-9999.ebuild @@ -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 diff --git a/app-forensics/bulk_extractor/files/add_exiv2-0.27.0_support.patch b/app-forensics/bulk_extractor/files/add_exiv2-0.27_api_support.patch similarity index 100% rename from app-forensics/bulk_extractor/files/add_exiv2-0.27.0_support.patch rename to app-forensics/bulk_extractor/files/add_exiv2-0.27_api_support.patch diff --git a/app-forensics/bulk_extractor/files/fix_call_of_overloaded_errors.patch b/app-forensics/bulk_extractor/files/bulk_extractor-1.5.5_fix_call_of_overloaded_errors.patch similarity index 100% rename from app-forensics/bulk_extractor/files/fix_call_of_overloaded_errors.patch rename to app-forensics/bulk_extractor/files/bulk_extractor-1.5.5_fix_call_of_overloaded_errors.patch diff --git a/app-forensics/bulk_extractor/files/other_minor_fixes.patch b/app-forensics/bulk_extractor/files/bulk_extractor-1.5.5_other_minor_fixes.patch similarity index 100% rename from app-forensics/bulk_extractor/files/other_minor_fixes.patch rename to app-forensics/bulk_extractor/files/bulk_extractor-1.5.5_other_minor_fixes.patch diff --git a/app-forensics/bulk_extractor/files/update_to_match_hashdb_source_interface_change.patch b/app-forensics/bulk_extractor/files/update_to_match_hashdb_source_interface_change.patch deleted file mode 100644 index 26702a828..000000000 --- a/app-forensics/bulk_extractor/files/update_to_match_hashdb_source_interface_change.patch +++ /dev/null @@ -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 - #include --#include // for getpid --#include // for getpid -+#include // for getpid -+#include // 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(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 --